感知元信息
-
- {{ it.sbmc }}
-
+ {{ it.sbmc }}
@@ -62,7 +60,7 @@ const loading = ref(false)
const modelShow = ref(false);
const emit = defineEmits(["change"]);
const title = ref("新增区域");
-const listQuery = ref({});
+const listQuery = ref({sxts:[],pgis:[]});
const formRef = ref();
const showMap = ref(false);
const rules = {
@@ -93,19 +91,38 @@ onMounted(()=>{
})
// 初始化
-const init = (type) => {
+const init = (type,row) => {
+ listQuery.value = {sxts:[],pgis:[]};
title.value = type === "add" ? "新增区域" : "编辑区域";
modelShow.value = true;
nextTick(() => {
showMap.value = true;
});
+ if(type === "edit") getDateById(row.id)
};
+// 更具id获取数据
+const getDateById = (id) =>{
+ qcckGet({id},'/mosty-gsxt/tbGsxtBkQy/selectByid').then(res=>{
+ res.pgis = res.pgis ? [res.pgis]:[[[]]]
+ let icon = require('@/assets/point/sp.png');
+ nextTick(()=>{
+ if(res.sxts && res.sxts.length > 0) emitter.emit('addPointArea',{flag:'gzy_ht',icon,coords:res.sxts});
+ if(res.pgis){
+ let obj = { position: res.pgis, text:'', id: res.id };
+ emitter.emit("echoPlane", { coords: [obj], flag: "bkqy", type: "polygon" });
+ }
+ })
+ listQuery.value = res || {};
+ })
+}
+
// 地图选择
const chooseMap = () =>{
listQuery.value.pgis = [];
listQuery.value.sxts = [];
emitter.emit('removeEara','bkqy_ht')
+ emitter.emit('deletePointArea','bkqy')
emitter.emit('deletePointArea','gzy_ht')
emitter.emit('drawShape',{type:'polygon',flag:'bkqy_ht'})
}
diff --git a/src/views/backOfficeSystem/IntelligentControl/DeploymentArea/index.vue b/src/views/backOfficeSystem/IntelligentControl/DeploymentArea/index.vue
index fe9d39a..33e721c 100644
--- a/src/views/backOfficeSystem/IntelligentControl/DeploymentArea/index.vue
+++ b/src/views/backOfficeSystem/IntelligentControl/DeploymentArea/index.vue
@@ -35,6 +35,9 @@
+
+
+ {{ it.sbmc }} 、