|
|
@ -5,11 +5,10 @@ |
|
|
|
功能概述:原生的折现属性面板 添加一个场景选择器功能,用于决定防区添加到哪个区域(场景)下 |
|
|
|
--> |
|
|
|
<template> |
|
|
|
<ApiTreeSelect :api="sceneIdTree" v-model:value="sceneId" placeholder="请选择所属区域" |
|
|
|
:disabled="disabled" |
|
|
|
@change="(value: any) => handleChange(value)" |
|
|
|
> |
|
|
|
</ApiTreeSelect> |
|
|
|
<ApiTreeSelect :api="sceneIdTree" v-model:value="sceneId" placeholder="请选择所属区域" :disabled="disabled" |
|
|
|
:allowClear="false" |
|
|
|
@change="(value: any) => handleChange(value)"> |
|
|
|
</ApiTreeSelect> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script lang="ts" setup> |
|
|
@ -39,13 +38,13 @@ const props = defineProps({ |
|
|
|
}) |
|
|
|
|
|
|
|
let sceneId = ref<string>(); |
|
|
|
onMounted(()=>{ |
|
|
|
// console.log("currentModelaaaaaa",props.currentModel); |
|
|
|
// console.log("currentModelaaaaaa",props); |
|
|
|
// console.log("proxy",proxy); |
|
|
|
sceneId.value = props.currentModel.sceneId? props.currentModel.sceneId: ""; |
|
|
|
onMounted(() => { |
|
|
|
// console.log("currentModelaaaaaa",props.currentModel); |
|
|
|
// console.log("currentModelaaaaaa",props); |
|
|
|
// console.log("proxy",proxy); |
|
|
|
sceneId.value = props.currentModel.sceneId ? props.currentModel.sceneId : null; |
|
|
|
}) |
|
|
|
function handleChange(params:type) { |
|
|
|
function handleChange(params: type) { |
|
|
|
// console.log("params",params); |
|
|
|
let model = window.$earth.getObject(props.currentModel.xbsjGuid); |
|
|
|
model.sceneId = params; |
|
|
@ -59,42 +58,45 @@ const sceneIdTree = () => defHttp.get<Recordable[]> |
|
|
|
sceneId: userStore.userInfo?.sceneId + "*" |
|
|
|
} |
|
|
|
}).then(res => { return [res]; }) |
|
|
|
; |
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped lang="less"> |
|
|
|
:deep(.ant-select) { |
|
|
|
width: 180px !important; |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.ant-select-selector){ |
|
|
|
background-color: rgba(0,0,0,.5) !important |
|
|
|
:deep(.ant-select-selector) { |
|
|
|
background-color: rgba(0, 0, 0, .5) !important; |
|
|
|
width: 180px !important; |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.ant-select-selection-placeholder){ |
|
|
|
color: #ddd !important; |
|
|
|
:deep(.ant-select-selection-placeholder) { |
|
|
|
color: #ddd !important; |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.ant-select-arrow){ |
|
|
|
color: #474747 !important; |
|
|
|
:deep(.ant-select-arrow) { |
|
|
|
color: #474747 !important; |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.ant-select-dropdown){ |
|
|
|
background-color: #8a8a8a !important; |
|
|
|
color: #ddd !important; |
|
|
|
:deep(.ant-select-dropdown) { |
|
|
|
background-color: #8a8a8a !important; |
|
|
|
color: #ddd !important; |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.ant-select-tree){ |
|
|
|
background-color: #8a8a8a !important; |
|
|
|
color: #ddd !important; |
|
|
|
:deep(.ant-select-tree) { |
|
|
|
background-color: #8a8a8a !important; |
|
|
|
color: #ddd !important; |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.ant-select-tree .ant-select-tree-node-content-wrapper:hover){ |
|
|
|
:deep(.ant-select-tree .ant-select-tree-node-content-wrapper:hover) { |
|
|
|
background: #6b6b6b; |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.ant-select-selection-item){ |
|
|
|
color: #ddd !important; |
|
|
|
:deep(.ant-select-selection-item) { |
|
|
|
color: #ddd !important; |
|
|
|
} |
|
|
|
|
|
|
|
</style> |