|
@@ -97,19 +97,19 @@
|
|
|
<div ref="mapRef" class="map"></div>
|
|
|
</div>
|
|
|
<div class="tool-group">
|
|
|
- <!-- <div class="btn" @click="handleCancel">
|
|
|
+ <!-- <div class="btn" @click="handleCancel" v-show="isEdit&&mapData.point">
|
|
|
<img
|
|
|
class="icon"
|
|
|
src="@/assets/images/common/back-black-icon.png"
|
|
|
alt=""
|
|
|
/>
|
|
|
<span>撤销</span>
|
|
|
- </div>
|
|
|
- <div class="btn" @click="handleDeletePoint">
|
|
|
+ </div> -->
|
|
|
+ <!-- <div class="btn" @click="handleDeletePoint">
|
|
|
<el-icon size="15"><CloseBold /></el-icon>
|
|
|
<span>删除点</span>
|
|
|
</div> -->
|
|
|
- <div class="btn delete" @click="handleDelete" v-show="isEdit">
|
|
|
+ <div class="btn delete" @click="handleDelete" v-show="isEdit&&mapData.selectPointArr.length>0">
|
|
|
<el-icon size="15" color="#fff"><CloseBold /></el-icon>
|
|
|
<span>删除地块</span>
|
|
|
</div>
|
|
@@ -120,10 +120,12 @@
|
|
|
<img src="@/assets/images/common/chart-icon.png" alt="" />
|
|
|
<span>地块属性</span>
|
|
|
</div>
|
|
|
- <div v-show="disabledForm" class="edit" @click="handleEdit">
|
|
|
- 编辑
|
|
|
+ <div class="btn-group">
|
|
|
+ <div v-show="disabledForm" class="edit" @click="handleEdit">
|
|
|
+ 编辑
|
|
|
+ </div>
|
|
|
+ <div v-show="mapData.selectPointArr.length>0" class="edit ml" @click="handlePrint">打印</div>
|
|
|
</div>
|
|
|
- <div class="edit" @click="handlePrint">打印</div>
|
|
|
</div>
|
|
|
<div class="edit-cont">
|
|
|
<el-form
|
|
@@ -403,7 +405,12 @@ const onSubmit = () => {
|
|
|
ruleFormRef.value.validate((valid, fields) => {
|
|
|
if (valid) {
|
|
|
VE_API.authentic.saveData(formInline).then((res) => {
|
|
|
- onCancel();
|
|
|
+ isUpdata.value = false
|
|
|
+ authenticMap.endDraw();
|
|
|
+ const point = mapData.curPointData
|
|
|
+ getList().then(()=>{
|
|
|
+ authenticMap.getSelectPointArr(point.id)
|
|
|
+ })
|
|
|
});
|
|
|
}
|
|
|
});
|
|
@@ -411,7 +418,6 @@ const onSubmit = () => {
|
|
|
|
|
|
// 打印
|
|
|
const handlePrint = () =>{
|
|
|
- console.log('打印');
|
|
|
pdfShow.value = true
|
|
|
}
|
|
|
|
|
@@ -442,8 +448,9 @@ const handleDelete = () => {
|
|
|
};
|
|
|
|
|
|
// 创建
|
|
|
+const isRefresh = ref(true)
|
|
|
const handleAdd = () => {
|
|
|
- isUpdata.value = true;
|
|
|
+ isRefresh.value = false
|
|
|
authenticMap.clearMapData("curPointData", {});
|
|
|
authenticMap.clearMapData("isEdit", false);
|
|
|
authenticMap.setPoint("point");
|
|
@@ -451,8 +458,13 @@ const handleAdd = () => {
|
|
|
pointList.value = [];
|
|
|
isEdit.value = false;
|
|
|
ruleFormRef.value.resetFields();
|
|
|
+ if (isUpdata.value) {
|
|
|
+ authenticMap.cancelDraw();
|
|
|
+ } else {
|
|
|
+ getList();
|
|
|
+ isUpdata.value = true;
|
|
|
+ }
|
|
|
authenticMap.startDraw();
|
|
|
- authenticMap.cancelDraw();
|
|
|
};
|
|
|
|
|
|
// 删除点
|
|
@@ -547,6 +559,7 @@ const updatePointList = () => {
|
|
|
};
|
|
|
|
|
|
watchEffect(() => {
|
|
|
+ isRefresh.value = true
|
|
|
if (mapData.isEdit && mapData.selectPointArr.length < 2) {
|
|
|
isEdit.value = true;
|
|
|
disabledForm.value = false;
|
|
@@ -569,8 +582,10 @@ watch(
|
|
|
const id = mapData.selectPointArr.map((item) => item.values_.id);
|
|
|
getDetailsData(id[0]);
|
|
|
} else {
|
|
|
- isEdit.value = false;
|
|
|
- authenticMap.endDraw();
|
|
|
+ if(isRefresh.value){
|
|
|
+ isEdit.value = false;
|
|
|
+ authenticMap.endDraw();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
);
|
|
@@ -742,6 +757,12 @@ watch(
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
+ .btn-group{
|
|
|
+ display: flex;
|
|
|
+ .ml{
|
|
|
+ margin-left: 20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
.name {
|
|
|
display: flex;
|
|
|
padding: 12px 0px;
|
|
@@ -765,6 +786,7 @@ watch(
|
|
|
width: calc(100% - 32px);
|
|
|
height: calc(100% - 64px - 84px);
|
|
|
.form-inline {
|
|
|
+ height: 320px;
|
|
|
::v-deep {
|
|
|
.el-input {
|
|
|
width: 200px;
|
|
@@ -785,12 +807,13 @@ watch(
|
|
|
}
|
|
|
.list-box {
|
|
|
width: 100%;
|
|
|
+ height: calc(100% - 320px);
|
|
|
span {
|
|
|
color: #bbbbbb;
|
|
|
}
|
|
|
.list-cont {
|
|
|
width: 100%;
|
|
|
- height: 190px;
|
|
|
+ height: calc(100% - 20px);
|
|
|
border-radius: 4px;
|
|
|
margin-top: 5px;
|
|
|
background: rgba(68, 68, 68, 0.4);
|
|
@@ -800,7 +823,7 @@ watch(
|
|
|
|
|
|
.list-item {
|
|
|
width: 100%;
|
|
|
- margin-bottom: 12px;
|
|
|
+ margin-bottom: 8px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
.item-box {
|