|
@@ -8,19 +8,25 @@
|
|
|
<!-- <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>
|
|
|
</ui-group-option> -->
|
|
|
<ui-group-option>
|
|
|
- <ui-button @click="Object.assign(custom.currentModel as any, defaultAttrs)">恢复默认</ui-button>
|
|
|
+ <ui-button @click="reset">恢复默认</ui-button>
|
|
|
</ui-group-option>
|
|
|
</ui-group>
|
|
|
</RightPano>
|
|
@@ -34,7 +40,8 @@ import Actions from '@/components/actions/index.vue'
|
|
|
import { getSceneModel } from '@/sdk'
|
|
|
import { useViewStack } from '@/hook'
|
|
|
import { showLeftCtrlPanoStack, showLeftPanoStack, custom, modelsChangeStoreStack } from '@/env'
|
|
|
-import { ref } from 'vue'
|
|
|
+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: 1, max: 100, step: 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,6 +83,14 @@ const actionItems: ActionsProps['items'] = [
|
|
|
},
|
|
|
]
|
|
|
|
|
|
+const reset = async () => {
|
|
|
+ if (custom.currentModel && await Dialog.confirm('确定恢复默认?此操作无法撤销')) {
|
|
|
+ Object.assign(custom.currentModel, defaultAttrs)
|
|
|
+ await nextTick()
|
|
|
+ custom.currentModel && (custom.currentModel.bottom = 0)
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
useViewStack(() => togetherCallback([
|
|
|
showLeftCtrlPanoStack.push(ref(false)),
|
|
|
showLeftPanoStack.push(ref(true)),
|