|
@@ -2,29 +2,57 @@
|
|
<RightPano v-if="custom.currentModel && active">
|
|
<RightPano v-if="custom.currentModel && active">
|
|
<ui-group>
|
|
<ui-group>
|
|
<template #header>
|
|
<template #header>
|
|
- <Actions class="edit-header" :items="actionItems" />
|
|
|
|
|
|
+ <Actions class="edit-header" :items="actionItems" v-model:current="currentItem" />
|
|
</template>
|
|
</template>
|
|
<ui-group-option label="等比缩放">
|
|
<ui-group-option label="等比缩放">
|
|
- <!-- <template #icon>
|
|
|
|
- <a href="">设置比例</a>
|
|
|
|
- </template> -->
|
|
|
|
- <ui-input type="range" v-model="custom.currentModel.scale" v-bind="modelRange.scaleRange" :ctrl="false" width="100%">
|
|
|
|
|
|
+ <template #icon>
|
|
|
|
+ <a @click="router.push({
|
|
|
|
+ name: RoutesName.proportion,
|
|
|
|
+ params: { id: custom.currentModel!.id, save: '1' },
|
|
|
|
+ })"
|
|
|
|
+ >设置比例</a>
|
|
|
|
+ </template>
|
|
|
|
+ <ui-input
|
|
|
|
+ type="range"
|
|
|
|
+ v-model="custom.currentModel.scale"
|
|
|
|
+ v-bind="modelRange.scaleRange"
|
|
|
|
+ :ctrl="false"
|
|
|
|
+ width="100%"
|
|
|
|
+ >
|
|
<template #icon>%</template>
|
|
<template #icon>%</template>
|
|
</ui-input>
|
|
</ui-input>
|
|
</ui-group-option>
|
|
</ui-group-option>
|
|
<ui-group-option label="离地高度">
|
|
<ui-group-option label="离地高度">
|
|
- <ui-input type="range" v-model="custom.currentModel.bottom" v-bind="modelRange.bottomRange" :ctrl="false" width="100%">
|
|
|
|
|
|
+ <ui-input
|
|
|
|
+ type="range"
|
|
|
|
+ v-model="custom.currentModel.bottom"
|
|
|
|
+ v-bind="modelRange.bottomRange"
|
|
|
|
+ :ctrl="false"
|
|
|
|
+ width="100%"
|
|
|
|
+ >
|
|
<template #icon>m</template>
|
|
<template #icon>m</template>
|
|
</ui-input>
|
|
</ui-input>
|
|
</ui-group-option>
|
|
</ui-group-option>
|
|
<ui-group-option label="模型不透明度">
|
|
<ui-group-option label="模型不透明度">
|
|
- <ui-input type="range" v-model="custom.currentModel.opacity" v-bind="modelRange.opacityRange" :ctrl="false" width="100%">
|
|
|
|
|
|
+ <ui-input
|
|
|
|
+ type="range"
|
|
|
|
+ v-model="custom.currentModel.opacity"
|
|
|
|
+ v-bind="modelRange.opacityRange"
|
|
|
|
+ :ctrl="false"
|
|
|
|
+ width="100%"
|
|
|
|
+ >
|
|
<template #icon>%</template>
|
|
<template #icon>%</template>
|
|
</ui-input>
|
|
</ui-input>
|
|
</ui-group-option>
|
|
</ui-group-option>
|
|
- <!-- <ui-group-option>
|
|
|
|
- <ui-button>配准</ui-button>
|
|
|
|
- </ui-group-option> -->
|
|
|
|
|
|
+ <ui-group-option>
|
|
|
|
+ <ui-button
|
|
|
|
+ :disabled="currentItem"
|
|
|
|
+ @click="router.push({
|
|
|
|
+ name: RoutesName.registration,
|
|
|
|
+ params: {id: custom.currentModel!.id, save: '1' }
|
|
|
|
+ })"
|
|
|
|
+ >配准</ui-button>
|
|
|
|
+ </ui-group-option>
|
|
<ui-group-option>
|
|
<ui-group-option>
|
|
<ui-button @click="reset">恢复默认</ui-button>
|
|
<ui-button @click="reset">恢复默认</ui-button>
|
|
</ui-group-option>
|
|
</ui-group-option>
|
|
@@ -33,33 +61,29 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
|
+import { RoutesName, router } from '@/router'
|
|
import { RightPano } from '@/layout'
|
|
import { RightPano } from '@/layout'
|
|
import { autoSaveFuseModels, defaultFuseModelAttrs } from '@/store'
|
|
import { autoSaveFuseModels, defaultFuseModelAttrs } from '@/store'
|
|
import { togetherCallback } from '@/utils'
|
|
import { togetherCallback } from '@/utils'
|
|
-import Actions from '@/components/actions/index.vue'
|
|
|
|
import { getSceneModel, modelRange } from '@/sdk'
|
|
import { getSceneModel, modelRange } from '@/sdk'
|
|
-import { useViewStack } from '@/hook'
|
|
|
|
|
|
+import { useViewStack, useActive } from '@/hook'
|
|
import { showLeftCtrlPanoStack, showLeftPanoStack, custom, modelsChangeStoreStack } from '@/env'
|
|
import { showLeftCtrlPanoStack, showLeftPanoStack, custom, modelsChangeStoreStack } from '@/env'
|
|
import { ref, nextTick } from 'vue'
|
|
import { ref, nextTick } from 'vue'
|
|
import { Dialog } from 'bill/expose-common'
|
|
import { Dialog } from 'bill/expose-common'
|
|
|
|
|
|
-import type { ActionsProps } from '@/components/actions/index.vue'
|
|
|
|
|
|
+import Actions from '@/components/actions/index.vue'
|
|
|
|
+
|
|
|
|
+import type { ActionsProps, ActionsItem } from '@/components/actions/index.vue'
|
|
|
|
|
|
-const active = ref(true)
|
|
|
|
-useViewStack(() => {
|
|
|
|
- active.value = true
|
|
|
|
- return () => active.value = false
|
|
|
|
-})
|
|
|
|
|
|
+const active = useActive()
|
|
|
|
+const currentItem = ref<ActionsItem | null>(null)
|
|
const actionItems: ActionsProps['items'] = [
|
|
const actionItems: ActionsProps['items'] = [
|
|
{
|
|
{
|
|
icon: 'move',
|
|
icon: 'move',
|
|
text: '移动',
|
|
text: '移动',
|
|
action: () => {
|
|
action: () => {
|
|
getSceneModel(custom.currentModel)?.enterMoveMode()
|
|
getSceneModel(custom.currentModel)?.enterMoveMode()
|
|
- return () => {
|
|
|
|
- console.log(getSceneModel(custom.currentModel), 'leave')
|
|
|
|
- getSceneModel(custom.currentModel)?.leaveTransform()
|
|
|
|
- }
|
|
|
|
|
|
+ return () => getSceneModel(custom.currentModel)?.leaveTransform()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|