|
@@ -8,13 +8,19 @@
|
|
|
<!-- <template #icon>
|
|
|
<a href="">设置比例</a>
|
|
|
</template> -->
|
|
|
- <ui-input type="range" v-model="custom.currentModel.scale" v-bind="scaleOption" width="100%" />
|
|
|
+ <ui-input type="range" v-model="custom.currentModel.scale" v-bind="scaleOption" width="100%">
|
|
|
+ <template #icon>%</template>
|
|
|
+ </ui-input>
|
|
|
</ui-group-option>
|
|
|
<ui-group-option label="离地高度">
|
|
|
- <ui-input type="range" v-model="custom.currentModel.bottom" v-bind="bottomOption" width="100%" />
|
|
|
+ <ui-input type="range" v-model="custom.currentModel.bottom" v-bind="bottomOption" width="100%">
|
|
|
+ <template #icon>m</template>
|
|
|
+ </ui-input>
|
|
|
</ui-group-option>
|
|
|
<ui-group-option label="模型不透明度">
|
|
|
- <ui-input type="range" v-model="custom.currentModel.opacity" v-bind="opacityOption" width="100%" />
|
|
|
+ <ui-input type="range" v-model="custom.currentModel.opacity" v-bind="opacityOption" width="100%">
|
|
|
+ <template #icon>%</template>
|
|
|
+ </ui-input>
|
|
|
</ui-group-option>
|
|
|
<!-- <ui-group-option>
|
|
|
<ui-button>配准</ui-button>
|
|
@@ -35,6 +41,7 @@ import { getSceneModel } from '@/sdk'
|
|
|
import { useViewStack } from '@/hook'
|
|
|
import { showLeftCtrlPanoStack, showLeftPanoStack, custom, modelsChangeStoreStack } from '@/env'
|
|
|
import { ref, nextTick } from 'vue'
|
|
|
+import { Dialog } from 'bill/expose-common'
|
|
|
|
|
|
import type { ActionsProps } from '@/components/actions/index.vue'
|
|
|
|
|
@@ -51,9 +58,9 @@ const defaultAttrs: ModelAttrs = {
|
|
|
position: {x: 0, y: 0, z: 0},
|
|
|
rotation: {x: 0, y: 0, z: 0}
|
|
|
}
|
|
|
-const opacityOption = { min: 0.01, max: 1, step: 0.01, }
|
|
|
-const bottomOption = { min: -101, max: 100, step: 0.1, }
|
|
|
-const scaleOption = { min: 0.01, max: 1, step: 0.01, }
|
|
|
+const opacityOption = { min: 0, max: 100, step: 0.01, ctrl: false }
|
|
|
+const bottomOption = { min: -30, max: 70, step: 0.1, ctrl: false }
|
|
|
+const scaleOption = { min: 0, max: 200, step: 0.01, ctrl: false }
|
|
|
const actionItems: ActionsProps['items'] = [
|
|
|
{
|
|
|
icon: 'move',
|
|
@@ -76,12 +83,11 @@ const actionItems: ActionsProps['items'] = [
|
|
|
},
|
|
|
]
|
|
|
|
|
|
-const reset = () => {
|
|
|
- if (custom.currentModel) {
|
|
|
+const reset = async () => {
|
|
|
+ if (custom.currentModel && await Dialog.confirm('确定恢复默认?此操作无法撤销')) {
|
|
|
Object.assign(custom.currentModel, defaultAttrs)
|
|
|
- nextTick(() => {
|
|
|
- custom.currentModel && (custom.currentModel.bottom = 0)
|
|
|
- })
|
|
|
+ await nextTick()
|
|
|
+ custom.currentModel && (custom.currentModel.bottom = 0)
|
|
|
}
|
|
|
}
|
|
|
|