Merge branch 'main' of http://123.132.248.154:10000/HC_YFZX/CaiYuanYiTiHua
commit
5927453973
File diff suppressed because it is too large
Load Diff
|
|
@ -16,7 +16,7 @@
|
|||
@select="handleSelect"
|
||||
/>
|
||||
<div style="display: flex;width:100%;">
|
||||
<div class="table-container" :style="`${haveMap? 'width:50%;':'width:100%'}`">
|
||||
<div class="table-container" :style="`${haveMap? `width:${100 - mapSetData.width}%;`:'width:100%'}`">
|
||||
<BasicTable @register="registerTable" @row-click="handRowClick">
|
||||
<template #toolbar>
|
||||
<div v-for="(item, index) in btnArr" :key="index">
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
<ShowFormModal v-if="openShowFormModal" :showFormModalData="showFormModalData" :mapgemoList="mapgemoList"
|
||||
@closeShowFormModal="closeShowFormModal" @success="submitsuccess"/>
|
||||
</div>
|
||||
<div v-if="haveMap" style="width:50%;height:calc(100vh - 78px) ">
|
||||
<div v-if="haveMap" class="showMap" :style="`width:${mapSetData.width}%;height:calc(100vh - 78px) `">
|
||||
<MapboxMap
|
||||
:layers="layers"
|
||||
:location="location"
|
||||
|
|
@ -82,6 +82,9 @@
|
|||
{ label: '删除', prop: 'Delete', class: 'error' },
|
||||
{ label: '详情', prop: 'Details', class: 'default' },
|
||||
];
|
||||
const mapSetData = ref({
|
||||
width:100
|
||||
})
|
||||
const mapgemoList = ref([])
|
||||
const MapboxComponent = ref()
|
||||
const openShowFormModal = ref(false)
|
||||
|
|
@ -384,10 +387,7 @@
|
|||
showFormModalData.value = toProps
|
||||
openShowFormModal.value = true
|
||||
mapgemoList.value = []
|
||||
// const feature = "POLYGON ((118.54774514802972 35.80786133598188, 118.54515277045988 35.79816597053564, 118.55919536113471 35.80085134034624, 118.56021460056033 35.80462789316549, 118.5595188628206 35.80695604583504, 118.5580066425723 35.80815336506183, 118.54774514802972 35.80786133598188))"
|
||||
// MapboxComponent.value.handlerDraw(feature)
|
||||
// MapboxComponent.value.handlerLocation([118.54774514802972,35.80786133598188]);
|
||||
MapboxComponent.value.handlerDraw()
|
||||
mapSetData.value.isAllowAddPolygon && MapboxComponent.value.handlerDraw()
|
||||
}else{
|
||||
openModal(true, toProps);
|
||||
}
|
||||
|
|
@ -419,7 +419,7 @@
|
|||
if(haveMap.value){
|
||||
showFormModalData.value = toProps
|
||||
openShowFormModal.value = true
|
||||
MapboxComponent.value.handlerDraw(mapgemoList.value)
|
||||
MapboxComponent.value.handlerDraw(mapgemoList.value,mapSetData.value.isAllowEditPolygon)
|
||||
console.log(mapgemoList.value)
|
||||
}else{
|
||||
openModal(true, toProps);
|
||||
|
|
@ -468,8 +468,7 @@
|
|||
if(haveMap.value){
|
||||
showFormModalData.value = toProps
|
||||
openShowFormModal.value = true
|
||||
MapboxComponent.value.handlerDraw(mapgemoList.value)
|
||||
// MapboxComponent.value.handlerLocation([1113.640352364387,35.8665000676054])
|
||||
MapboxComponent.value.handlerDraw(mapgemoList.value,false)
|
||||
}else{
|
||||
openModal(true, toProps);
|
||||
}
|
||||
|
|
@ -500,7 +499,28 @@
|
|||
let formObj = JSON.parse(res.formScheme.scheme);
|
||||
|
||||
// TODO 判断是否有地图
|
||||
haveMap.value = formObj.formInfo.schemas.findIndex(item => item.field === "MapGeom") !== -1
|
||||
let mapgeomData = formObj.formInfo.schemas.find(item => item.field === "MapGeom")
|
||||
haveMap.value = mapgeomData !== undefined
|
||||
if(haveMap.value){
|
||||
mapSetData.value = mapgeomData.mapSetData || { isAllowAddPolygon: false,
|
||||
isAllowEditPolygon: false,
|
||||
isEnablePostionJump: false,
|
||||
width: 50,
|
||||
layerFields: {},
|
||||
}
|
||||
console.log(mapSetData.value,'mapSetData')
|
||||
}
|
||||
// todo 修改赋值
|
||||
mapSetData.value = {
|
||||
width: 50,
|
||||
// 可否添加图斑
|
||||
isAllowAddPolygon: true,
|
||||
// 可否编辑图斑
|
||||
isAllowEditPolygon: false,
|
||||
// 可否跳转到图斑
|
||||
isEnablePostionJump: false,
|
||||
layerFields: {},
|
||||
}
|
||||
|
||||
console.log(formObj,'formObj');
|
||||
paramsId.value = res.formScheme.id;
|
||||
|
|
@ -640,4 +660,9 @@
|
|||
.table-container{
|
||||
position:relative;
|
||||
}
|
||||
.showMap{
|
||||
width:100%;
|
||||
background-color: #fff;
|
||||
z-index: 1;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue