更新
This commit is contained in:
@ -13,9 +13,9 @@
|
|||||||
<el-form-item label="行政区划" prop="xzqh" v-if="listQuery.qylx">
|
<el-form-item label="行政区划" prop="xzqh" v-if="listQuery.qylx">
|
||||||
<MOSTY.Select v-model="listQuery.xzqh" filterable :dictEnum="props.dic.D_BZ_XZQHDM" width="100%" clearable placeholder="请选择行政区划"/>
|
<MOSTY.Select v-model="listQuery.xzqh" filterable :dictEnum="props.dic.D_BZ_XZQHDM" width="100%" clearable placeholder="请选择行政区划"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="地图范围" prop="dtfw" class="ww100">
|
<el-form-item label="地图范围" prop="pgis" class="ww100">
|
||||||
<div class="flex ww100">
|
<div class="flex ww100">
|
||||||
<el-input v-model="listQuery.pgis" placeholder="请输入地图范围" style="flex: 1;"></el-input>
|
<el-input v-model="listQuery.pgis" readonly placeholder="请输入地图范围" style="flex: 1;"></el-input>
|
||||||
<el-button type="primary" style="width: 136px;" class="ml10" @click="chooseMap">
|
<el-button type="primary" style="width: 136px;" class="ml10" @click="chooseMap">
|
||||||
<el-icon style="vertical-align: middle"><CirclePlus /></el-icon>
|
<el-icon style="vertical-align: middle"><CirclePlus /></el-icon>
|
||||||
<span style="vertical-align: middle">选择地图范围</span>
|
<span style="vertical-align: middle">选择地图范围</span>
|
||||||
@ -26,9 +26,7 @@
|
|||||||
<div class="flex ww100">
|
<div class="flex ww100">
|
||||||
<div class="boo">
|
<div class="boo">
|
||||||
<span v-if="!listQuery.sxts || listQuery.sxts.length == 0" class="f12 ml10" style="color: #e1e1e1;">感知元信息</span>
|
<span v-if="!listQuery.sxts || listQuery.sxts.length == 0" class="f12 ml10" style="color: #e1e1e1;">感知元信息</span>
|
||||||
<el-tag class="ml4 mr4" v-for="(it,idx) in listQuery.sxts" :key="idx">
|
<el-tag class="ml4 mr4" v-for="(it,idx) in listQuery.sxts" :key="idx">{{ it.sbmc }}</el-tag>
|
||||||
{{ it.sbmc }}
|
|
||||||
</el-tag>
|
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" style="width: 136px;" class="ml10" :disabled="disabled">
|
<el-button type="primary" style="width: 136px;" class="ml10" :disabled="disabled">
|
||||||
<el-icon style="vertical-align: middle"><CirclePlus /></el-icon>
|
<el-icon style="vertical-align: middle"><CirclePlus /></el-icon>
|
||||||
@ -62,7 +60,7 @@ const loading = ref(false)
|
|||||||
const modelShow = ref(false);
|
const modelShow = ref(false);
|
||||||
const emit = defineEmits(["change"]);
|
const emit = defineEmits(["change"]);
|
||||||
const title = ref("新增区域");
|
const title = ref("新增区域");
|
||||||
const listQuery = ref({});
|
const listQuery = ref({sxts:[],pgis:[]});
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const showMap = ref(false);
|
const showMap = ref(false);
|
||||||
const rules = {
|
const rules = {
|
||||||
@ -93,19 +91,38 @@ onMounted(()=>{
|
|||||||
})
|
})
|
||||||
|
|
||||||
// 初始化
|
// 初始化
|
||||||
const init = (type) => {
|
const init = (type,row) => {
|
||||||
|
listQuery.value = {sxts:[],pgis:[]};
|
||||||
title.value = type === "add" ? "新增区域" : "编辑区域";
|
title.value = type === "add" ? "新增区域" : "编辑区域";
|
||||||
modelShow.value = true;
|
modelShow.value = true;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
showMap.value = true;
|
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 = () =>{
|
const chooseMap = () =>{
|
||||||
listQuery.value.pgis = [];
|
listQuery.value.pgis = [];
|
||||||
listQuery.value.sxts = [];
|
listQuery.value.sxts = [];
|
||||||
emitter.emit('removeEara','bkqy_ht')
|
emitter.emit('removeEara','bkqy_ht')
|
||||||
|
emitter.emit('deletePointArea','bkqy')
|
||||||
emitter.emit('deletePointArea','gzy_ht')
|
emitter.emit('deletePointArea','gzy_ht')
|
||||||
emitter.emit('drawShape',{type:'polygon',flag:'bkqy_ht'})
|
emitter.emit('drawShape',{type:'polygon',flag:'bkqy_ht'})
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,9 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #xzqh="{ row }">
|
<template #xzqh="{ row }">
|
||||||
<DictTag :tag="false" :value="row.xzqh" :options="D_BZ_XZQHDM" />
|
<DictTag :tag="false" :value="row.xzqh" :options="D_BZ_XZQHDM" />
|
||||||
|
</template>
|
||||||
|
<template #sxts="{ row }">
|
||||||
|
<span v-for="(it,idx) in row.sxts" :key="idx">{{ it.sbmc }} <span v-if="idx < row.sxts.length-1">、</span></span>
|
||||||
</template>
|
</template>
|
||||||
<template #sfqy="{ row }">
|
<template #sfqy="{ row }">
|
||||||
<el-switch v-model="row.sfqy" inline-prompt active-value="1" inactive-value="0" active-text="是" inactive-text="否"/>
|
<el-switch v-model="row.sfqy" inline-prompt active-value="1" inactive-value="0" active-text="是" inactive-text="否"/>
|
||||||
|
Reference in New Issue
Block a user