Ver código fonte

20241030中图代码

lkk 9 meses atrás
pai
commit
32465f3d82

+ 12 - 11
src/components/VueLayer/src/css/index.less

@@ -48,7 +48,7 @@
     top: 50%;
     transform: perspective(1px) translate(-50%, -50%);
     -ms-transform: perspective(1px) translate(-50%, -50%);
-    background-color: rgba(0, 0, 0, .6);
+    background-color: rgba(0, 0, 0, 0.6);
   }
 
   &.vl-notify-tips-p {
@@ -97,7 +97,7 @@
       width: 100%;
       height: 42px;
       line-height: 43px;
-      background-color: #F8F8F8;
+      background-color: #f8f8f8;
       border-bottom: 1px solid #eee;
       font-size: 14px;
       padding-left: 15px;
@@ -157,9 +157,11 @@
         }
       }
 
-      .lv-icon-max {}
+      .lv-icon-max {
+      }
 
-      .lv-icon-mini {}
+      .lv-icon-mini {
+      }
     }
 
     .vl-notify-content {
@@ -168,6 +170,7 @@
       .vl-notify-content-div {
         margin-left: 10px;
         flex: 1;
+        color: #ffffff;
       }
     }
   }
@@ -219,7 +222,7 @@
       border-top: 2px solid #999999;
       border-right: 2px solid #999999;
       border-radius: 50%;
-      animation: loading 1.0s infinite linear;
+      animation: loading 1s infinite linear;
     }
   }
 
@@ -233,7 +236,7 @@
     top: 50%;
     transform: translate(-50%, -50%);
     -ms-transform: translate(-50%, -50%);
-    background-color: rgba(0, 0, 0, .6);
+    background-color: rgba(0, 0, 0, 0.6);
     color: #fff;
     padding: 12px 25px;
     text-align: center;
@@ -278,7 +281,6 @@
   }
 
   &.vl-notify-tips-0 {
-
     //上
     &:after {
       border-top-color: transparent !important;
@@ -290,7 +292,6 @@
   }
 
   &.vl-notify-tips-1 {
-
     //右
     &:after {
       border-top-color: transparent !important;
@@ -302,7 +303,6 @@
   }
 
   &.vl-notify-tips-2 {
-
     //下
     &:after {
       border-top-color: transparent !important;
@@ -335,6 +335,7 @@
     bottom: 0;
     z-index: 100000;
     cursor: nw-resize;
-    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='17' height='17'%3E%3Cpath d='M765.558 510.004a93.65 93.65 0 1 0 191.665 0 93.65 93.65 0 1 0-191.665 0zM765.558 821.46a93.65 93.65 0 1 0 191.665 0 93.65 93.65 0 1 0-191.665 0zM422.15700000000004 821.46a93.65 93.65 0 1 0 191.665 0 93.65 93.65 0 1 0-191.665 0zM422.15700000000004 510.004a93.65 93.65 0 1 0 191.665 0 93.65 93.65 0 1 0-191.665 0zM765.558 202.54a93.65 93.65 0 1 0 191.665 0 93.65 93.65 0 1 0-191.665 0zM66.77700000000002 821.46a93.65 93.65 0 1 0 191.665 0 93.65 93.65 0 1 0-191.665 0z' fill='%23BFBFBF'/%3E%3C/svg%3E") no-repeat center;
+    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='17' height='17'%3E%3Cpath d='M765.558 510.004a93.65 93.65 0 1 0 191.665 0 93.65 93.65 0 1 0-191.665 0zM765.558 821.46a93.65 93.65 0 1 0 191.665 0 93.65 93.65 0 1 0-191.665 0zM422.15700000000004 821.46a93.65 93.65 0 1 0 191.665 0 93.65 93.65 0 1 0-191.665 0zM422.15700000000004 510.004a93.65 93.65 0 1 0 191.665 0 93.65 93.65 0 1 0-191.665 0zM765.558 202.54a93.65 93.65 0 1 0 191.665 0 93.65 93.65 0 1 0-191.665 0zM66.77700000000002 821.46a93.65 93.65 0 1 0 191.665 0 93.65 93.65 0 1 0-191.665 0z' fill='%23BFBFBF'/%3E%3C/svg%3E")
+      no-repeat center;
   }
-}
+}

+ 1 - 1
src/utils/MapHelper/MapHelper.js

@@ -132,7 +132,7 @@ export const flatten = (arr, children = "children") => {
  */
 export const undergroundMode = (state) => {
   if (state) {
-    viewer.scene.globe.globeAlpha = 0.3;
+    viewer.scene.globe.globeAlpha = window.Layeralpha;
   } else {
     viewer.scene.globe.globeAlpha = 1;
   }

+ 282 - 199
src/views/ConstructionApplication3D/Demolition/CQSetInfo.vue

@@ -4,8 +4,18 @@
     <el-row :gutter="10">
       <el-col :span="6">征地补偿标准:</el-col>
       <el-col :span="18">
-        <el-select v-model="bcbz" style="width: 90%" @change="selectZDBZ" placeholder="请选择">
-          <el-option v-for="item in bcbzList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+        <el-select
+          v-model="bcbz"
+          style="width: 90%"
+          @change="selectZDBZ"
+          placeholder="请选择"
+        >
+          <el-option
+            v-for="item in bcbzList"
+            :key="item.id"
+            :label="item.name"
+            :value="item.id"
+          ></el-option>
         </el-select>
       </el-col>
     </el-row>
@@ -15,46 +25,75 @@
             </el-table-column> -->
       <el-table-column prop="jg" label="房屋结构" width="80">
         <template slot-scope="scope">
-          <el-input v-model="scope.row.jg" v-show="scope.row.seen" @focus="handleSetFoucsSetData(scope.row)"
-            @blur="loseFoucs(scope.row)"></el-input>
+          <el-input
+            v-model="scope.row.jg"
+            v-show="scope.row.seen"
+            @focus="handleSetFoucsSetData(scope.row)"
+            @blur="loseFoucs(scope.row)"
+          ></el-input>
           <div v-show="!scope.row.seen">{{ scope.row.jg }}</div>
         </template>
       </el-table-column>
       <el-table-column prop="grade" label="等级" width="60">
         <template slot-scope="scope">
-          <el-input v-model="scope.row.grade" v-show="scope.row.seen" @focus="handleSetFoucsSetData(scope.row)"
-            @blur="loseFoucs(scope.row)"></el-input>
+          <el-input
+            v-model="scope.row.grade"
+            v-show="scope.row.seen"
+            @focus="handleSetFoucsSetData(scope.row)"
+            @blur="loseFoucs(scope.row)"
+          ></el-input>
           <div v-show="!scope.row.seen">{{ scope.row.grade }}</div>
         </template>
       </el-table-column>
       <el-table-column prop="bz" label="单价(元/平方米)" width="80">
         <template slot-scope="scope">
-          <el-input v-model="scope.row.bz" v-show="scope.row.seen" @focus="handleSetFoucsSetData(scope.row)"
-            @blur="loseFoucs(scope.row)"></el-input>
+          <el-input
+            v-model="scope.row.bz"
+            v-show="scope.row.seen"
+            @focus="handleSetFoucsSetData(scope.row)"
+            @blur="loseFoucs(scope.row)"
+          ></el-input>
           <div v-show="!scope.row.seen">{{ scope.row.bz }}</div>
         </template>
       </el-table-column>
       <el-table-column prop="des" label="结构及装饰特征(规格)">
         <template slot-scope="scope">
-          <el-input v-model="scope.row.des" v-show="scope.row.seen" @focus="handleSetFoucsSetData(scope.row)"
-            @blur="loseFoucs(scope.row)"></el-input>
+          <el-input
+            v-model="scope.row.des"
+            v-show="scope.row.seen"
+            @focus="handleSetFoucsSetData(scope.row)"
+            @blur="loseFoucs(scope.row)"
+          ></el-input>
           <div v-show="!scope.row.seen">{{ scope.row.des }}</div>
         </template>
       </el-table-column>
       <el-table-column fixed="right" label="操作" width="100">
         <template slot-scope="scope">
-          <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button>
-          <el-button type="text" size="small" @click="handleDeleteClick(scope.row)">删除</el-button>
+          <el-button @click="handleClick(scope.row)" type="text" size="small"
+            >编辑</el-button
+          >
+          <el-button
+            type="text"
+            size="small"
+            @click="handleDeleteClick(scope.row)"
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
     <el-row justify="center" type="flex">
       <el-button type="primary" @click="save()">保存</el-button>
-      <el-button type="primary" @click="saveAs()">另存为</el-button>
+      <el-button type="primary" @click="saveAs('ruleForm')">另存为</el-button>
       <el-button type="primary" @click="reset()">重置</el-button>
       <el-button type="primary" @click="delBZ()">删除</el-button>
     </el-row>
-    <el-dialog title="标准名称设置" :modal="false" :visible.sync="dialogFormVisible" append-to-body="true" width="20rem">
+    <el-dialog
+      title="标准名称设置"
+      :modal="false"
+      :visible.sync="dialogFormVisible"
+      append-to-body="true"
+      width="20rem"
+    >
       <el-form :model="ruleForm" :rules="rules" ref="ruleForm">
         <el-form-item label="名称" prop="name">
           <el-input v-model="ruleForm.name" autocomplete="off"></el-input>
@@ -62,10 +101,18 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible = false">取消</el-button>
-        <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
+        <el-button type="primary" @click="submitForm('ruleForm')"
+          >确 定</el-button
+        >
       </div>
     </el-dialog>
-    <el-dialog title="编辑" :modal="false" :visible.sync="editFormVisible" append-to-body="true" width="20rem">
+    <el-dialog
+      title="编辑"
+      :modal="false"
+      :visible.sync="editFormVisible"
+      append-to-body="true"
+      width="20rem"
+    >
       <el-form :model="oldRow" :rules="rowRules" ref="rowForm">
         <el-form-item label="房屋结构" prop="jg">
           <el-select v-model="oldRow.jg">
@@ -77,26 +124,49 @@
           </el-select>
         </el-form-item>
         <el-form-item label="房屋等级" prop="grade">
-          <el-input v-model.number="oldRow.grade" type="number" min="1" max="5"></el-input>
+          <el-input
+            v-model.number="oldRow.grade"
+            type="number"
+            min="1"
+            max="5"
+          ></el-input>
         </el-form-item>
         <el-form-item label="单价(元/平方米)" prop="bz">
-          <el-input v-model.number="oldRow.bz" type="number" min="0" max="10000000000"></el-input>
+          <el-input
+            v-model.number="oldRow.bz"
+            type="number"
+            min="0"
+            max="10000000000"
+          ></el-input>
         </el-form-item>
         <el-form-item label="规格" prop="des">
-          <el-input type="textarea" :rows="4" v-model="oldRow.des" autocomplete="off"></el-input>
+          <el-input
+            type="textarea"
+            :rows="4"
+            v-model="oldRow.des"
+            autocomplete="off"
+          ></el-input>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="editFormVisible = false">取消</el-button>
-        <el-button type="primary" @click="submitEditForm('rowForm')">确 定</el-button>
+        <el-button type="primary" @click="submitEditForm('rowForm')"
+          >确 定</el-button
+        >
       </div>
     </el-dialog>
   </div>
 </template>
 <script>
 import {
-  getCqBcbzList, getCqBcbzItemList, getCqBcbzById,
-  addCqBcbz, updateCqBcbz, updateCqBcbzItem, delCqBcbzItem, delCqBcbz
+  getCqBcbzList,
+  getCqBcbzItemList,
+  getCqBcbzById,
+  addCqBcbz,
+  updateCqBcbz,
+  updateCqBcbzItem,
+  delCqBcbzItem,
+  delCqBcbz,
 } from "@/api/zt/ztApi.js";
 export default {
   props: {
@@ -111,12 +181,10 @@ export default {
   name: "ZDShowInfo",
   data() {
     var bzValidate = (rule, value, callback) => {
-      if (value == "" || value == null)
-        callback(new Error("不能为空"))
+      if (value == "" || value == null) callback(new Error("不能为空"));
       else if (value < 0) {
-        callback(new Error("不能小于0"))
-      }
-      else callback()
+        callback(new Error("不能小于0"));
+      } else callback();
     };
     return {
       editFormVisible: false,
@@ -132,12 +200,8 @@ export default {
         ],
       },
       rulesEdit: {
-        grade: [
-          { validate: bzValidate, trigger: 'blur' }
-        ],
-        bz: [
-          { validate: bzValidate, trigger: 'blur' }
-        ],
+        grade: [{ validate: bzValidate, trigger: "blur" }],
+        bz: [{ validate: bzValidate, trigger: "blur" }],
       },
 
       // rowForm: {
@@ -148,15 +212,26 @@ export default {
       // },
 
       rowRules: {
-
         grade: [
           // { required: true, message: "不能为空", trigger: "blur" },
-          { type: 'number', min: 1, max: 5, message: "范围1-5之间", trigger: 'blur' }
+          {
+            type: "number",
+            min: 1,
+            max: 5,
+            message: "范围1-5之间",
+            trigger: "blur",
+          },
         ],
         bz: [
           // { required: true, message: "不能为空", trigger: "blur" },
           // /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/
-          { type: 'number', min: 0, max: 10000000000, message: "不能小于0", trigger: 'blur' }
+          {
+            type: "number",
+            min: 0,
+            max: 10000000000,
+            message: "不能小于0",
+            trigger: "blur",
+          },
         ],
       },
       /**
@@ -296,53 +371,53 @@ export default {
       that.bcbz = that.cqValue;
       if (window.isUseDB) {
         that.curBCBZ = {
-          id: '',
-          name: '',
-          bcbz: []
-        }
-        getCqBcbzList().then((res) => {
-          that.bcbzList = res.rows;
-          if (that.bcbz == null || that.bcbz == "") {
-            if (that.bcbzList.length > 0) {
-              that.cqValue = that.bcbzList[0].id
-              that.bcbz = that.cqValue
-              that.curBCBZ.id = that.bcbz
-              that.curBCBZ.name = that.bcbzList[0].name;
+          id: "",
+          name: "",
+          bcbz: [],
+        };
+        getCqBcbzList()
+          .then((res) => {
+            that.bcbzList = res.rows;
+            if (that.bcbz == null || that.bcbz == "") {
+              if (that.bcbzList.length > 0) {
+                that.cqValue = that.bcbzList[0].id;
+                that.bcbz = that.cqValue;
+                that.curBCBZ.id = that.bcbz;
+                that.curBCBZ.name = that.bcbzList[0].name;
+              }
+            } else {
+              var item = that.bcbzList.find((t) => t.id == that.bcbz);
+              if (item) {
+                that.curBCBZ.id = item.id;
+                that.curBCBZ.name = item.name;
+              }
             }
-          }
-          else {
-            var item = that.bcbzList.find(t => t.id == that.bcbz)
-            if (item) {
-              that.curBCBZ.id = item.id;
-              that.curBCBZ.name = item.name;
-            }
-          }
-          var queryParams =
-          {
-            "bz": null,
-            "des": null,
-            "grade": null,
-            "id": null,
-            "jg": null,
-            "pid": that.bcbz
-          }
-          getCqBcbzItemList(queryParams).then((response) => {
-            if (response) {
-              that.curBCBZ.bcbz = response.rows;
-            }
-          }).catch((err) => {
-            console.log(err)
+            var queryParams = {
+              bz: null,
+              des: null,
+              grade: null,
+              id: null,
+              jg: null,
+              pid: that.bcbz,
+            };
+            getCqBcbzItemList(queryParams)
+              .then((response) => {
+                if (response) {
+                  that.curBCBZ.bcbz = response.rows;
+                }
+              })
+              .catch((err) => {
+                console.log(err);
+              });
           })
-        }).catch((err) => {
-          console.log(err)
-        })
-      }
-      else {
+          .catch((err) => {
+            console.log(err);
+          });
+      } else {
         that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.CQBCList));
         if (that.cqValue != null && that.cqValue != "") {
           that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
-        }
-        else {
+        } else {
           if (that.bcbzList.length > 0) {
             that.cqValue = that.bcbzList[0].id;
             that.bcbz = that.cqValue;
@@ -359,36 +434,35 @@ export default {
       if (that.bcbz && that.bcbz != "") {
         if (window.isUseDB) {
           that.curBCBZ = {
-            id: '',
-            name: '',
-            bcbz: []
-          }
-          var queryParams =
-          {
-            "bz": null,
-            "des": null,
-            "grade": null,
-            "id": null,
-            "jg": null,
-            "pid": that.bcbz
-          }
-          getCqBcbzItemList(queryParams).then((response) => {
-            if (response) {
-              that.curBCBZ.bcbz = response.rows;
-            }
-          }).catch((err) => {
-            console.log(err)
-          })
-        }
-        else {
+            id: "",
+            name: "",
+            bcbz: [],
+          };
+          var queryParams = {
+            bz: null,
+            des: null,
+            grade: null,
+            id: null,
+            jg: null,
+            pid: that.bcbz,
+          };
+          getCqBcbzItemList(queryParams)
+            .then((response) => {
+              if (response) {
+                that.curBCBZ.bcbz = response.rows;
+              }
+            })
+            .catch((err) => {
+              console.log(err);
+            });
+        } else {
           this.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.CQBCList));
           if (this.cqValue != undefined && this.cqValue != "") {
             this.curBCBZ = this.bcbzList.find((t) => t.id == this.bcbz);
           }
         }
-      }
-      else {
-        that.$message.warning("请选择标准")
+      } else {
+        that.$message.warning("请选择标准");
       }
     },
 
@@ -416,18 +490,17 @@ export default {
         var item = {
           id: that.curBCBZ.id,
           name: that.curBCBZ.name,
-          bcbz: that.curBCBZ.bcbz
-        }
-        updateCqBcbz(item).then((res) => {
-          if (res)
-            that.getInitData();
-          that.$layer.alert("保存完成");
-
-        }).catch((err) => {
-          console.log(err)
-        })
-      }
-      else {
+          bcbz: that.curBCBZ.bcbz,
+        };
+        updateCqBcbz(item)
+          .then((res) => {
+            if (res) that.getInitData();
+            that.$layer.alert("保存完成");
+          })
+          .catch((err) => {
+            console.log(err);
+          });
+      } else {
         var index = window.ZSBC.CQBCList.findIndex((t) => t.value == this.bcbz);
         if (index > -1) {
           window.ZSBC.CQBCList[index] = this.curBCBZ;
@@ -438,12 +511,16 @@ export default {
     /***
      * 另存为
      */
-    saveAs() {
+    saveAs(formName) {
+      debugger;
       // if (this.bcbz == "") {
       //     this.$layer.alert("请选择补偿标准");
       //     return
       // }
       this.dialogFormVisible = true;
+      this.$nextTick(function () {
+        this.$refs[formName].resetFields();
+      });
     },
     submitForm(formName) {
       this.$refs[formName].validate((valid) => {
@@ -451,8 +528,6 @@ export default {
           // alert('submit!');
           this.dialogFormVisible = false;
           this.saveData();
-
-
         } else {
           console.log("error submit!!");
           return false;
@@ -473,17 +548,16 @@ export default {
         bcbz: that.curBCBZ.bcbz,
       };
       if (window.isUseDB) {
-        addCqBcbz(newBCBZ).then((res) => {
-          if (res)
-            that.getInitData();
-          that.lyoption.content.parent.initSetting();
-          that.$layer.alert("保存完成");
-
-        }).catch((err) => {
-          console.log(err)
-        })
-      }
-      else {
+        addCqBcbz(newBCBZ)
+          .then((res) => {
+            if (res) that.getInitData();
+            that.lyoption.content.parent.initSetting();
+            that.$layer.alert("保存完成");
+          })
+          .catch((err) => {
+            console.log(err);
+          });
+      } else {
         window.ZSBC.CQBCList.push(newBCBZ);
         that.bcbzList = window.ZSBC.CQBCList;
         that.bcbz = val;
@@ -491,7 +565,7 @@ export default {
     },
     updateZDWindow() {
       var that = this;
-      that.$layer.close(window.zdWindowId)
+      that.$layer.close(window.zdWindowId);
       window.zdWindowId = this.$layer.iframe({
         layerStyle: {
           padding: "0.3vw 1vw 0.3vw 2.5vw",
@@ -520,32 +594,35 @@ export default {
      * 编辑按钮
      */
     handleClick(row) {
-      debugger
+      debugger;
 
-      this.oldRow = row;
+      this.oldRow = JSON.parse(JSON.stringify(row));
       this.editFormVisible = true;
     },
     handleDeleteClick(row) {
       var that = this;
-      if (row == undefined)
-        return;
-      var index = that.curBCBZ.bcbz.findIndex(t => t.id = row.id)
-      var formId = that.$layer.confirm("确定要删除吗?", {}, function () {
-        delCqBcbzItem([row.id]).then((res) => {
-          if (res) {
-            that.$message("数据已删除!");
-            if (index > -1)
-              that.curBCBZ.bcbz.splice(index, 1)
-            that.$layer.close(formId)
-          }
-        }).catch((err) => {
-          console.log(err)
-        })
-
-      }, function () {
-        return
-      });
-
+      if (row == undefined) return;
+      var index = that.curBCBZ.bcbz.findIndex((t) => (t.id = row.id));
+      var formId = that.$layer.confirm(
+        "确定要删除吗?",
+        {},
+        function () {
+          delCqBcbzItem([row.id])
+            .then((res) => {
+              if (res) {
+                that.$message("数据已删除!");
+                if (index > -1) that.curBCBZ.bcbz.splice(index, 1);
+                that.$layer.close(formId);
+              }
+            })
+            .catch((err) => {
+              console.log(err);
+            });
+        },
+        function () {
+          return;
+        }
+      );
     },
     /**
      * 开启行编辑
@@ -558,46 +635,51 @@ export default {
       // if (!this.chageBCBZ())
       //   return false;
       // else {
-      console.log(this.oldRow.bz)
-      console.log(this.oldRow.grade)
+      console.log(this.oldRow.bz);
+      console.log(this.oldRow.grade);
       this.$refs[formName].validate((valid) => {
-
         if (valid) {
           // alert('submit!');
           this.editFormVisible = false;
           this.updateItem();
           // this.$layer.alert("保存完成");
-          return true
+          return true;
         } else {
           console.log("error submit!!");
           return false;
         }
-      })
+      });
 
       // }
     },
     /**
-     * 
+     *
      */
     updateItem() {
-      var that = this
-      var model =
-      {
-        "bz": that.oldRow.bz,
-        "des": that.oldRow.des,
-        "grade": that.oldRow.grade,
-        "id": that.oldRow.id,
-        "jg": that.oldRow.jg,
-        "pid": that.oldRow.pid,
-
-      }
-      updateCqBcbzItem(model).then((res) => {
-        if (res)
-          that.$layer.alert("保存完成");
-
-      }).catch((err) => {
-        console.log(err)
-      })
+      var that = this;
+      var model = {
+        bz: that.oldRow.bz,
+        des: that.oldRow.des,
+        grade: that.oldRow.grade,
+        id: that.oldRow.id,
+        jg: that.oldRow.jg,
+        pid: that.oldRow.pid,
+      };
+      updateCqBcbzItem(model)
+        .then((res) => {
+          if (res) {
+            that.$layer.alert("保存完成");
+            debugger;
+            let bcbz = that.curBCBZ.bcbz.find((c) => c.id == model.id);
+            bcbz.bz = model.bz;
+            bcbz.des = model.des;
+            bcbz.grade = model.grade;
+            bcbz.jg = model.jg;
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
     },
     /**
      * 保存当前行
@@ -608,12 +690,12 @@ export default {
     },
     chageBCBZ() {
       if (this.oldRow.grade < 1) {
-        this.$message.warning('不能小于1');
-        return false
+        this.$message.warning("不能小于1");
+        return false;
       }
       if (this.oldRow.bz < 0) {
-        this.$message.warning('不能小于0');
-        return false
+        this.$message.warning("不能小于0");
+        return false;
       }
       return true;
     },
@@ -622,31 +704,32 @@ export default {
 
       var formId = that.$layer.confirm("确定要删除吗?", {}, function () {
         if (window.isUseDB) {
-          delCqBcbz(that.bcbz).then((res) => {
-            if (res) {
-              that.$layer.alert("数据已删除");
-              that.cqValue = "";
-              that.bcbz = that.cqValue;
-              that.getInitData();
-              that.lyoption.content.parent.initSetting()
-            }
-          }).catch((err) => {
-            console.log(err)
-          })
-        }
-        else {
-          var index = window.ZSBC.CQBCList.findIndex(t => t.id == that.bcbz);
+          delCqBcbz(that.bcbz)
+            .then((res) => {
+              if (res) {
+                that.$layer.alert("数据已删除");
+                that.cqValue = "";
+                that.bcbz = that.cqValue;
+                that.getInitData();
+                that.lyoption.content.parent.initSetting();
+              }
+            })
+            .catch((err) => {
+              console.log(err);
+            });
+        } else {
+          var index = window.ZSBC.CQBCList.findIndex((t) => t.id == that.bcbz);
           if (index > -1) {
             window.ZSBC.CQBCList.splice(index, 1);
           }
           that.cqValue = "";
           that.bcbz = that.cqValue;
-          that.getInitData()
-          that.lyoption.content.parent.initSetting()
+          that.getInitData();
+          that.lyoption.content.parent.initSetting();
         }
-        that.$layer.close(formId)
-      })
-    }
+        that.$layer.close(formId);
+      });
+    },
   },
 };
 </script>
@@ -659,7 +742,7 @@ export default {
     color: #02a7f0;
     font-weight: 400;
 } */
-.el-input>>>.el-input__inner {
+.el-input >>> .el-input__inner {
   text-align: right !important;
 }
 

+ 20 - 4
src/views/ConstructionApplication3D/Demolition/DemolitionList.vue

@@ -1493,6 +1493,14 @@ export default {
      */
     loadInitData() {
       var that = this;
+
+      if(popupBox){
+        popupBox.destroy();
+        popupBox=null;
+    }
+
+
+
       that.entities.forEach((item) => {
         viewer.entities.removeById(item.id);
       });
@@ -4101,15 +4109,23 @@ export default {
       //   }).catch((err) => {
       //     console.log(err)
       //   })
-    }
+    },
+
+    /**
+     * 清除绘制范围
+     */
+    removePolygonEntity(){
+      if (polygonEntity) {
+      viewer.entities.remove(polygonEntity)
+      }
+    },
+
   },
   /**
    * 清楚临时图元
    */
   beforeDestroy() {
-    if (polygonEntity) {
-      viewer.entities.remove(polygonEntity)
-    }
+    this.removePolygonEntity();
     if (handlerPolygon) {
       handlerPolygon.deactivate();
       handlerPolygon.clear();

+ 159 - 117
src/views/ConstructionApplication3D/Demolition/QMSetInfo.vue

@@ -5,53 +5,94 @@
       <el-col :span="6">青苗补偿标准:</el-col>
       <el-col :span="18">
         <el-select v-model="bcbz" style="width: 90%" @change="selectZDBZ">
-          <el-option v-for="item in bcbzList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+          <el-option
+            v-for="item in bcbzList"
+            :key="item.id"
+            :label="item.name"
+            :value="item.id"
+          ></el-option>
         </el-select>
       </el-col>
     </el-row>
 
     <el-row>
       <el-col :span="6">农作物补偿:</el-col>
-      <el-col :span="16"><el-input style="width: 100%" type="number" min="0" placeholder="请输入" v-model="curBCBZ.nzw"
-          @change="changeBCBZ" @input="inputChange"> </el-input>
+      <el-col :span="16"
+        ><el-input
+          style="width: 100%"
+          type="number"
+          min="0"
+          placeholder="请输入"
+          v-model="curBCBZ.nzw"
+          @change="changeBCBZ"
+          @input="inputChange"
+        >
+        </el-input>
       </el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row>
       <el-col :span="6">经济作物:</el-col>
       <el-col :span="16">
-        <el-input style="width: 100%" placeholder="请输入" type="number" min="0" v-model="curBCBZ.jjzw" @change="changeBCBZ"
-          @input="inputChange"></el-input></el-col>
+        <el-input
+          style="width: 100%"
+          placeholder="请输入"
+          type="number"
+          min="0"
+          v-model="curBCBZ.jjzw"
+          @change="changeBCBZ"
+          @input="inputChange"
+        ></el-input
+      ></el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row>
       <el-col :span="6">树木补偿:</el-col>
       <el-col :span="16">
-        <el-input style="width: 100%" placeholder="请输入" type="number" min="0" v-model="curBCBZ.sm" @change="changeBCBZ"
-          @input="inputChange"></el-input></el-col>
+        <el-input
+          style="width: 100%"
+          placeholder="请输入"
+          type="number"
+          min="0"
+          v-model="curBCBZ.sm"
+          @change="changeBCBZ"
+          @input="inputChange"
+        ></el-input
+      ></el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row justify="center" type="flex">
       <el-button type="primary" @click="save()">保存</el-button>
-      <el-button type="primary" @click="saveAs()">另存为</el-button>
+      <el-button type="primary" @click="saveAs('ruleForm')">另存为</el-button>
       <el-button type="primary" @click="reset()">重置</el-button>
       <el-button type="primary" @click="delBZ()">删除</el-button>
-
     </el-row>
-    <el-dialog title="标准名称设置" :modal="false" :visible.sync="dialogFormVisible" append-to-body="true" width="20rem">
+    <el-dialog
+      title="标准名称设置"
+      :modal="false"
+      :visible.sync="dialogFormVisible"
+      append-to-body="true"
+      width="20rem"
+    >
       <el-form :model="ruleForm" :rules="rules" ref="ruleForm">
         <el-form-item label="名称" prop="name">
           <el-input v-model="ruleForm.name" autocomplete="off"></el-input>
         </el-form-item>
         <el-button @click="dialogFormVisible = false">取消</el-button>
-        <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
+        <el-button type="primary" @click="submitForm('ruleForm')"
+          >确 定</el-button
+        >
       </el-form>
     </el-dialog>
   </div>
 </template>
 <script>
 import {
-  getQmbcbzList, updateQmbcbz, addQmbcbz, getQmbcbzById, delQmbcbz
+  getQmbcbzList,
+  updateQmbcbz,
+  addQmbcbz,
+  getQmbcbzById,
+  delQmbcbz,
 } from "@/api/zt/ztApi.js";
 export default {
   props: {
@@ -94,7 +135,7 @@ export default {
         id: null,
         nzw: 0,
         jjzw: 0,
-        sm: 0
+        sm: 0,
       },
     };
   },
@@ -110,34 +151,33 @@ export default {
       var that = this;
       that.bcbz = that.qmValue;
       if (window.isUseDB) {
-        getQmbcbzList().then((response) => {
-          if (response) {
-            that.bcbzList = response.rows
-            if (that.bcbz != null && that.bcbz != "") {
-              that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
-            }
-            else {
-              if (that.bcbzList.length > 0) {
-                that.curBCBZ = that.bcbzList[0]
-                that.bcbz = that.curBCBZ.id
-                that.qmValue = that.bcbz
+        getQmbcbzList()
+          .then((response) => {
+            if (response) {
+              that.bcbzList = response.rows;
+              if (that.bcbz != null && that.bcbz != "") {
+                that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
+              } else {
+                if (that.bcbzList.length > 0) {
+                  that.curBCBZ = that.bcbzList[0];
+                  that.bcbz = that.curBCBZ.id;
+                  that.qmValue = that.bcbz;
+                }
               }
             }
-          }
-        }).catch((err) => {
-          console.log(err)
-        })
-      }
-      else {
+          })
+          .catch((err) => {
+            console.log(err);
+          });
+      } else {
         that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.QMBCList));
         if (that.bcbz != null && that.bcbz != "") {
-          that.curBCBZ = that.bcbzList.find(t => t.id == that.bcbz);
-        }
-        else {
+          that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
+        } else {
           if (that.bcbzList.length > 0) {
             that.curBCBZ = that.bcbzList[0];
-            that.bcbz = that.curBCBZ.id
-            that.zdValue = that.bcbz
+            that.bcbz = that.curBCBZ.id;
+            that.zdValue = that.bcbz;
           }
         }
       }
@@ -145,29 +185,26 @@ export default {
     selectZDBZ() {
       var that = this;
       if (that.bcbz == null || that.bcbz == "") {
-        that.$message.warning("请选择标准")
+        that.$message.warning("请选择标准");
         return;
       }
       that.qmValue = that.bcbz;
       if (window.isUseDB) {
-        getQmbcbzById(that.bcbz).then((response) => {
-          if (response) {
-            that.curBCBZ = response.data
-
-          }
-        }).catch((err) => {
-          console.log(err)
-        })
-      }
-      else {
+        getQmbcbzById(that.bcbz)
+          .then((response) => {
+            if (response) {
+              that.curBCBZ = response.data;
+            }
+          })
+          .catch((err) => {
+            console.log(err);
+          });
+      } else {
         that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.QMBCList));
         if (that.bcbzList.length > 0) {
           that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
         }
       }
-
-
-
     },
     /**
      * 选择标准改变
@@ -184,7 +221,7 @@ export default {
      * 重置
      */
     reset() {
-      this.getInitData()
+      this.getInitData();
     },
     /**
      * 保存修改
@@ -195,27 +232,28 @@ export default {
         that.$layer.alert("请选择补偿标准");
         return;
       }
-      if (!that.changeBCBZ())
-        return;
+      if (!that.changeBCBZ()) return;
       debugger;
       var model = {
-        "id": that.curBCBZ.id,
-        "name": that.curBCBZ.name,
-        "jjzw": that.curBCBZ.jjzw,
-        "nzw": that.curBCBZ.nzw,
-        "sm": that.curBCBZ.sm,
-      }
-      if (window.isUseDB) {//数据库
-        updateQmbcbz(model).then((response) => {
-          if (response.code == 200) {
-            that.getInitData()
-            that.$layer.alert("保存完成");
-          }
-        }).catch((err) => {
-          console.log(err.console)
-        })
-      }
-      else {
+        id: that.curBCBZ.id,
+        name: that.curBCBZ.name,
+        jjzw: that.curBCBZ.jjzw,
+        nzw: that.curBCBZ.nzw,
+        sm: that.curBCBZ.sm,
+      };
+      if (window.isUseDB) {
+        //数据库
+        updateQmbcbz(model)
+          .then((response) => {
+            if (response.code == 200) {
+              that.getInitData();
+              that.$layer.alert("保存完成");
+            }
+          })
+          .catch((err) => {
+            console.log(err.console);
+          });
+      } else {
         var index = window.ZSBC.QMBCList.findIndex((t) => t.value == this.bcbz);
         if (index > -1) {
           window.ZSBC.QMBCList[index] = that.curBCBZ;
@@ -226,10 +264,12 @@ export default {
     /***
      * 另存为
      */
-    saveAs() {
-      if (!this.changeBCBZ())
-        return;
+    saveAs(formName) {
+      if (!this.changeBCBZ()) return;
       this.dialogFormVisible = true;
+      this.$nextTick(function () {
+        this.$refs[formName].resetFields();
+      });
     },
     submitForm(formName) {
       var that = this;
@@ -245,7 +285,6 @@ export default {
           return false;
         }
       });
-
     },
     /**
      * 另存数据
@@ -256,82 +295,85 @@ export default {
       var date = new Date();
       var val = date.getTime().toString();
       var newBCBZ = {
-        "id": val,
-        "jjzw": that.curBCBZ.jjzw,
-        "name": that.ruleForm.name,
-        "nzw": that.curBCBZ.nzw,
-        "sm": that.curBCBZ.sm,
+        id: val,
+        jjzw: that.curBCBZ.jjzw,
+        name: that.ruleForm.name,
+        nzw: that.curBCBZ.nzw,
+        sm: that.curBCBZ.sm,
       };
       if (window.isUseDB) {
-        newBCBZ.id = null
-        addQmbcbz(newBCBZ).then((response) => {
-          if (response && response.code == 200) {
-            that
-            that.getInitData();
-            that.$layer.alert("保存完成");
-            that.lyoption.content.parent.initSetting();
-          }
-        }).catch((err) => {
-          console.log(err)
-        })
-      }
-      else {
+        newBCBZ.id = null;
+        addQmbcbz(newBCBZ)
+          .then((response) => {
+            if (response && response.code == 200) {
+              that;
+              that.getInitData();
+              that.$layer.alert("保存完成");
+              that.lyoption.content.parent.initSetting();
+            }
+          })
+          .catch((err) => {
+            console.log(err);
+          });
+      } else {
         window.ZSBC.QMBCList.push(newBCBZ);
-        that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.QMBCList))
+        that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.QMBCList));
         that.bcbz = val;
-        that.curBCBZ = that.bcbzList.find(t => t.id == that.bcbz);
+        that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
       }
     },
     changeBCBZ() {
       if (this.curBCBZ.sm < 0) {
-        this.$message.warning("输入数值不能小于0")
+        this.$message.warning("输入数值不能小于0");
         return false;
       }
       if (this.curBCBZ.jjzw < 0) {
-        this.$message.warning("输入数值不能小于0")
+        this.$message.warning("输入数值不能小于0");
         return false;
       }
       if (this.curBCBZ.nzw < 0) {
-        this.$message.warning("输入数值不能小于0")
+        this.$message.warning("输入数值不能小于0");
         return false;
       }
       return true;
     },
     inputChange() {
-      this.changeBCBZ()
+      this.changeBCBZ();
     },
     delBZ() {
       var that = this;
       if (that.qmValue == null || that.qmValue == "") {
         that.$layer.alert("请选择标准后再删除");
-        return
+        return;
       }
       var formId = that.$layer.confirm("确定要删除吗?", {}, function () {
         if (window.isUseDB) {
-          delQmbcbz([that.qmValue]).then((res) => {
-            if (res) {
-              that.$layer.alert("数据已删除");
-              that.qmValue = null;
-              that.bcbz = that.qmValue;
-              that.getInitData();
-              that.lyoption.content.parent.initSetting();
-            }
-          }).catch((err) => {
-            console.log(err)
-          })
-        }
-        else {
-          var index = window.ZSBC.QMBCList.findIndex(t => t.id == that.qmValue);
+          delQmbcbz([that.qmValue])
+            .then((res) => {
+              if (res) {
+                that.$layer.alert("数据已删除");
+                that.qmValue = null;
+                that.bcbz = that.qmValue;
+                that.getInitData();
+                that.lyoption.content.parent.initSetting();
+              }
+            })
+            .catch((err) => {
+              console.log(err);
+            });
+        } else {
+          var index = window.ZSBC.QMBCList.findIndex(
+            (t) => t.id == that.qmValue
+          );
           if (index > -1) {
             window.ZSBC.QMBCList.splice(index, 1);
             that.getInitData();
           }
         }
-        that.$layer.close(formId)
+        that.$layer.close(formId);
       });
-    }
-
-  }
+    },
+  },
 };
 </script>
 <style lang="scss">
@@ -350,7 +392,7 @@ export default {
   font-weight: 400;
 }
 
-.el-input>>>.el-input__inner {
+.el-input >>> .el-input__inner {
   text-align: right !important;
 }
 

+ 201 - 131
src/views/ConstructionApplication3D/Demolition/ZDSetInfo.vue

@@ -4,8 +4,18 @@
     <el-row>
       <el-col :span="6">征地补偿标准:</el-col>
       <el-col :span="18">
-        <el-select v-model="bcbz" style="width: 90%" @change="selectZDBZ" placeholder="请选择">
-          <el-option v-for="item in bcbzList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+        <el-select
+          v-model="bcbz"
+          style="width: 90%"
+          @change="selectZDBZ"
+          placeholder="请选择"
+        >
+          <el-option
+            v-for="item in bcbzList"
+            :key="item.id"
+            :label="item.name"
+            :value="item.id"
+          ></el-option>
         </el-select>
       </el-col>
     </el-row>
@@ -14,58 +24,114 @@
     </el-row>
     <el-row>
       <el-col :span="6">土地年产值:</el-col>
-      <el-col :span="16"><el-input style="width: 100%" type="number" min="0" placeholder="请输入"
-          v-model.number="curBCBZ.tdcz" @change="changeZDBZ" @input="inputChange"></el-input>
+      <el-col :span="16"
+        ><el-input
+          style="width: 100%"
+          type="number"
+          min="0"
+          placeholder="请输入"
+          v-model.number="curBCBZ.tdcz"
+          @change="changeZDBZ"
+          @input="inputChange"
+        ></el-input>
       </el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row class="subtitle">
       <el-col :span="12">土地补偿费</el-col>
-      <el-col :span="12" style="font-size: small; color: aqua">统一年产值 X 综合补偿倍数</el-col>
+      <el-col :span="12" style="font-size: small; color: aqua"
+        >统一年产值 X 综合补偿倍数</el-col
+      >
     </el-row>
     <el-row>
       <el-col :span="6">综合补偿倍数:</el-col>
-      <el-col :span="16"><el-input style="width: 100%" type="number" min="0" placeholder="请输入"
-          v-model.number="curBCBZ.tdbcbs" @change="changeZDBZ" @input="inputChange"></el-input></el-col>
+      <el-col :span="16"
+        ><el-input
+          style="width: 100%"
+          type="number"
+          min="0"
+          placeholder="请输入"
+          v-model.number="curBCBZ.tdbcbs"
+          @change="changeZDBZ"
+          @input="inputChange"
+        ></el-input
+      ></el-col>
     </el-row>
     <el-row>
       <el-col :span="6">土地补偿费:</el-col>
       <el-col :span="16">
-        <el-input placeholder="自动计算" readonly type="number" v-model.number="curBCBZ.tdbcf"></el-input></el-col>
+        <el-input
+          placeholder="自动计算"
+          readonly
+          type="number"
+          v-model.number="curBCBZ.tdbcf"
+        ></el-input
+      ></el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row class="subtitle">
       <el-col :span="12">安置补偿费</el-col>
-      <el-col :span="12" style="font-size: small; color: aqua">统一年产值 X 综合补偿倍数</el-col>
+      <el-col :span="12" style="font-size: small; color: aqua"
+        >统一年产值 X 综合补偿倍数</el-col
+      >
     </el-row>
     <el-row>
       <el-col :span="6">综合补偿倍数</el-col>
-      <el-col :span="16"><el-input type="number" min="0" style="width: 100%" placeholder="请输入" v-model="curBCBZ.azbcbs"
-          @change="changeZDBZ" @input="inputChange"></el-input></el-col>
+      <el-col :span="16"
+        ><el-input
+          type="number"
+          min="0"
+          style="width: 100%"
+          placeholder="请输入"
+          v-model="curBCBZ.azbcbs"
+          @change="changeZDBZ"
+          @input="inputChange"
+        ></el-input
+      ></el-col>
     </el-row>
     <el-row>
       <el-col :span="6">安置补偿费:</el-col>
-      <el-col :span="16"><el-input v-model.number="curBCBZ.azbcf" readonly type="number"
-          placeholder="自动计算"></el-input></el-col>
+      <el-col :span="16"
+        ><el-input
+          v-model.number="curBCBZ.azbcf"
+          readonly
+          type="number"
+          placeholder="自动计算"
+        ></el-input
+      ></el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row class="subtitle">
       <el-col :span="12">补偿费及安置补助费合计</el-col>
-      <el-col :span="12" style="font-size: small; color: aqua">统一年产值 X 综合补偿倍数</el-col>
+      <el-col :span="12" style="font-size: small; color: aqua"
+        >统一年产值 X 综合补偿倍数</el-col
+      >
     </el-row>
     <el-row>
       <el-col :span="6">征地补偿合计:</el-col>
-      <el-col :span="16"><el-input v-model.number="curBCBZ.bchj" readonly type="number"
-          placeholder="自动计算"></el-input></el-col>
+      <el-col :span="16"
+        ><el-input
+          v-model.number="curBCBZ.bchj"
+          readonly
+          type="number"
+          placeholder="自动计算"
+        ></el-input
+      ></el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row justify="center" type="flex">
       <el-button type="primary" @click="save()">保存</el-button>
-      <el-button type="primary" @click="saveAs()">另存为</el-button>
+      <el-button type="primary" @click="saveAs('ruleForm')">另存为</el-button>
       <el-button type="primary" @click="reset()">重置</el-button>
       <el-button type="primary" @click="delBZ()">删除</el-button>
     </el-row>
-    <el-dialog title="标准名称设置" :modal="false" :visible.sync="dialogFormVisible" append-to-body="true" width="20rem">
+    <el-dialog
+      title="标准名称设置"
+      :modal="false"
+      :visible.sync="dialogFormVisible"
+      append-to-body="true"
+      width="20rem"
+    >
       <el-form :model="ruleForm" :rules="rules" ref="ruleForm">
         <el-form-item label="名称" prop="name">
           <el-input v-model="ruleForm.name"></el-input>
@@ -74,14 +140,20 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible = false">取消</el-button>
-        <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
+        <el-button type="primary" @click="submitForm('ruleForm')"
+          >确 定</el-button
+        >
       </div>
     </el-dialog>
   </div>
 </template>
 <script>
 import {
-  getZdBcbzList, updateZdBcbz, addZdBcbz, getZdBcbzById, delZdBcbz
+  getZdBcbzList,
+  updateZdBcbz,
+  addZdBcbz,
+  getZdBcbzById,
+  delZdBcbz,
 } from "@/api/zt/ztApi.js";
 export default {
   props: {
@@ -95,7 +167,6 @@ export default {
   },
   name: "ZDShowInfo",
   data() {
-
     return {
       dialogFormVisible: false,
       ruleForm: {
@@ -149,7 +220,6 @@ export default {
          * 补偿合计
          */
         bchj: 0,
-
       },
     };
   },
@@ -183,20 +253,21 @@ export default {
 
       var that = this;
       if (that.bcbz == null || that.bcbz == "") {
-        that.$message.warning("请选择标准")
+        that.$message.warning("请选择标准");
         return;
       }
       that.zdValue = that.bcbz;
       if (window.isUseDB) {
-        getZdBcbzById(that.bcbz).then((response) => {
-          if (response) {
-            that.curBCBZ = response.data
-          }
-        }).catch((err) => {
-          console.log(err)
-        })
-      }
-      else {
+        getZdBcbzById(that.bcbz)
+          .then((response) => {
+            if (response) {
+              that.curBCBZ = response.data;
+            }
+          })
+          .catch((err) => {
+            console.log(err);
+          });
+      } else {
         that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.ZDBCList));
         if (that.bcbzList.length > 0) {
           that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
@@ -206,52 +277,51 @@ export default {
     getInitData() {
       var that = this;
       that.bcbz = that.zdValue;
-      if (window.isUseDB) {//数据库
-        getZdBcbzList().then((response) => {
-          that.bcbzList = response.rows;
-          if (that.bcbz != null && that.bcbz != "") {
-            that.curBCBZ = that.bcbzList.find(t => t.id == that.bcbz);
-          }
-          else {
-            if (that.bcbzList.length> 0) {
-              that.curBCBZ = that.bcbzList[0]
-              that.bcbz = that.curBCBZ.id
-              that.zdValue = that.bcbz
+      if (window.isUseDB) {
+        //数据库
+        getZdBcbzList()
+          .then((response) => {
+            that.bcbzList = response.rows;
+            if (that.bcbz != null && that.bcbz != "") {
+              that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
+            } else {
+              if (that.bcbzList.length > 0) {
+                that.curBCBZ = that.bcbzList[0];
+                that.bcbz = that.curBCBZ.id;
+                that.zdValue = that.bcbz;
+              }
             }
-          }
-        }).catch((err) => {
-          console.log(err)
-        })
-      }
-      else {
-        that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.ZDBCList))
+          })
+          .catch((err) => {
+            console.log(err);
+          });
+      } else {
+        that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.ZDBCList));
         if (that.bcbz != null && that.bcbz != "") {
-          that.curBCBZ = that.bcbzList.find(t => t.id == that.bcbz);
-        }
-        else {
+          that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
+        } else {
           if (that.bcbzList.length > 0) {
             that.curBCBZ = that.bcbzList[0];
-            that.bcbz = that.curBCBZ.id
-            that.zdValue = that.bcbz
+            that.bcbz = that.curBCBZ.id;
+            that.zdValue = that.bcbz;
           }
         }
       }
-
     },
     /**
      * 选择标准改变
      */
     changeZDBZ() {
       if (this.curBCBZ.tdcz < 0) {
-        this.$message.warning("输入数值不能小于0")
+        this.$message.warning("输入数值不能小于0");
         return false;
       }
       if (this.curBCBZ.tdbcbs < 0) {
-        this.$message.warning("输入数值不能小于0")
+        this.$message.warning("输入数值不能小于0");
         return false;
       }
       if (this.curBCBZ.azbcbs < 0) {
-        this.$message.warning("输入数值不能小于0")
+        this.$message.warning("输入数值不能小于0");
         return false;
       }
       this.curBCBZ.tdbcf =
@@ -277,32 +347,30 @@ export default {
         that.$layer.alert("请选择补偿标准");
         return;
       }
-      if (!that.changeZDBZ())
-        return;
+      if (!that.changeZDBZ()) return;
       debugger;
       if (window.isUseDB) {
-        var Model =
-        {
-          "id": that.curBCBZ.id,
-          "name": that.curBCBZ.name,
-          "tdcz": that.curBCBZ.tdcz,
-          "tdbcbs": that.curBCBZ.tdbcbs,
-          "tdbcf": that.curBCBZ.tdbcf,
-          "azbcbs": that.curBCBZ.azbcbs,
-          "azbcf": that.curBCBZ.azbcf,
-          "bchj": that.curBCBZ.bchj
+        var Model = {
+          id: that.curBCBZ.id,
+          name: that.curBCBZ.name,
+          tdcz: that.curBCBZ.tdcz,
+          tdbcbs: that.curBCBZ.tdbcbs,
+          tdbcf: that.curBCBZ.tdbcf,
+          azbcbs: that.curBCBZ.azbcbs,
+          azbcf: that.curBCBZ.azbcf,
+          bchj: that.curBCBZ.bchj,
         };
-        updateZdBcbz(Model).then((response) => {
-          if (response && response.code == 200) {
-            that.$layer.alert("保存完成");
-            that.getInitData();
-          }
-
-        }).catch((err) => {
-          console.log(err)
-        });
-      }
-      else {
+        updateZdBcbz(Model)
+          .then((response) => {
+            if (response && response.code == 200) {
+              that.$layer.alert("保存完成");
+              that.getInitData();
+            }
+          })
+          .catch((err) => {
+            console.log(err);
+          });
+      } else {
         var index = window.ZSBC.ZDBCList.findIndex((t) => t.value == that.bcbz);
         if (index > -1) {
           window.ZSBC.ZDBCList[index] = that.curBCBZ;
@@ -313,15 +381,17 @@ export default {
     /***
      * 另存为
      */
-    saveAs() {
-      if (!this.changeZDBZ())
-        return
+    saveAs(formName) {
+      if (!this.changeZDBZ()) return;
+
       this.dialogFormVisible = true;
+      this.$nextTick(function () {
+        this.$refs[formName].resetFields();
+      });
     },
     submitForm(formName) {
       var that = this;
-      if (!that.changeZDBZ())
-        return false;
+      if (!that.changeZDBZ()) return false;
       else {
         that.$refs[formName].validate((valid) => {
           if (valid) {
@@ -334,7 +404,6 @@ export default {
             return false;
           }
         });
-
       }
     },
     /**
@@ -344,72 +413,73 @@ export default {
       debugger;
       var date = new Date();
       var val = date.getTime().toString();
-      var that = this
-      var newBCBZ =
-      {
-        "azbcbs": that.curBCBZ.azbcbs,
-        "azbcf": that.curBCBZ.azbcf,
-        "bchj": that.curBCBZ.bchj,
-        "id": val,
-        "name": that.ruleForm.name,
-        "tdcz": that.curBCBZ.tdcz,
-        "tdbcbs": that.curBCBZ.tdbcbs,
-        "tdbcf": that.curBCBZ.tdbcf,
+      var that = this;
+      var newBCBZ = {
+        azbcbs: that.curBCBZ.azbcbs,
+        azbcf: that.curBCBZ.azbcf,
+        bchj: that.curBCBZ.bchj,
+        id: val,
+        name: that.ruleForm.name,
+        tdcz: that.curBCBZ.tdcz,
+        tdbcbs: that.curBCBZ.tdbcbs,
+        tdbcf: that.curBCBZ.tdbcf,
       };
       if (window.isUseDB) {
-        addZdBcbz(newBCBZ).then((response) => {
-          if (response && response.code == 200) {
-            that.$layer.alert("保存完成");
-            that.getInitData();
-            that.lyoption.content.parent.initSetting();
-          }
-        }).catch((err) => {
-          console.log(err)
-        });
-      }
-      else {
+        addZdBcbz(newBCBZ)
+          .then((response) => {
+            if (response && response.code == 200) {
+              that.$layer.alert("保存完成");
+              that.getInitData();
+              that.lyoption.content.parent.initSetting();
+            }
+          })
+          .catch((err) => {
+            console.log(err);
+          });
+      } else {
         window.ZSBC.ZDBCList.push(newBCBZ);
         that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.ZDBCList));
         that.bcbz = val;
-        that.curBCBZ = that.bcbzList.find(t => t.id == that.bcbz);
+        that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
         that.$layer.alert("保存完成");
       }
-
     },
     inputChange() {
       this.changeZDBZ();
     },
     delBZ() {
-    
       var that = this;
       if (that.zdValue == null || that.zdValue == "") {
         that.$layer.alert("请选择标准后再删除");
-        return
+        return;
       }
       var formId = that.$layer.confirm("确定要删除吗?", {}, function () {
         if (window.isUseDB) {
-          delZdBcbz([that.zdValue]).then((res) => {
-            if (res) {
-              that.$layer.alert("数据已删除");
-              that.zdValue = null;
-              that.bcbz = that.zdValue;
-              that.getInitData();
-              that.lyoption.content.parent.initSetting();
-            }
-          }).catch((err) => {
-            console.log(err)
-          })
-        }
-        else {
-          var index = window.ZSBC.ZDBCList.findIndex(t => t.id == that.zdValue);
+          delZdBcbz([that.zdValue])
+            .then((res) => {
+              if (res) {
+                that.$layer.alert("数据已删除");
+                that.zdValue = null;
+                that.bcbz = that.zdValue;
+                that.getInitData();
+                that.lyoption.content.parent.initSetting();
+              }
+            })
+            .catch((err) => {
+              console.log(err);
+            });
+        } else {
+          var index = window.ZSBC.ZDBCList.findIndex(
+            (t) => t.id == that.zdValue
+          );
           if (index > -1) {
             window.ZSBC.ZDBCList.splice(index, 1);
             that.getInitData();
           }
         }
-        that.$layer.close(formId)
+        that.$layer.close(formId);
       });
-    }
+    },
   },
 };
 </script>
@@ -426,7 +496,7 @@ export default {
   font-weight: 400;
 }
 
-.el-input>>>.el-input__inner {
+.el-input >>> .el-input__inner {
   text-align: right !important;
 }
 

+ 8 - 2
src/views/ConstructionApplication3D/billboard/billboardChekInfo.vue

@@ -79,6 +79,7 @@ export default {
       ReviewComments: "",
       messageNum: 0,
       layerDataList: [],
+      layerids: [],
     };
   },
   props: {
@@ -559,6 +560,7 @@ export default {
                             ps.push(element.y);
                           }
                           var id = uuidv4();
+                          that.layerids.push(id);
                           //添加建筑退线线
                           viewer.entities.add({
                             id: "JZTX_" + id,
@@ -662,7 +664,8 @@ export default {
                           var po = buffered.geometry.coordinates[0].flat();
                           debugger;
                           var id = uuidv4();
-                          //添加建筑退线线
+                          that.layerids.push(id);
+                          //添加道路面
                           viewer.entities.add({
                             id: "DLM_" + id,
                             polygon: {
@@ -856,7 +859,10 @@ export default {
     },
   },
   beforeDestroy() {
-    // viewer.entities.removeAll();
+    this.layerids.forEach((id) => {
+      viewer.entities.removeById("JZTX_" + id);
+      viewer.entities.removeById("DLM_" + id);
+    });
   },
 };
 </script>

+ 13 - 7
src/views/ConstructionApplication3D/billboard/billboardDesign.vue

@@ -177,8 +177,8 @@ export default {
 
     // 新增项目
     addProjectInfo() {
-      if (this.addlLayerId != null) this.$layer.close(this.addlLayerId);
-      this.addlLayerId = this.$layer.iframe({
+      this.$layer.iframe({
+        id: "addXM",
         content: {
           content: addbillboardProject, //传递的组件对象
           parent: this, //当前的vue对象
@@ -281,13 +281,13 @@ export default {
 
     async checkModel(item) {
       await this.locationModel(item, false);
-      if (this.checklLayerId != null) this.$layer.close(this.checklLayerId);
       var width = 400;
       var top = 250;
       var left = Math.floor(document.body.clientWidth - width / 2);
       var height = 400;
 
-      this.checklLayerId = this.$layer.iframe({
+      this.$layer.iframe({
+        id: "MXSCList",
         content: {
           content: billboardCheck, //传递的组件对象
           parent: this, //当前的vue对象
@@ -358,16 +358,16 @@ export default {
     importModel(project) {
       this.intoModel(project);
       // this.locationModel(project);
-      if (this.addlLayerId != null) this.$layer.close(this.addlLayerId);
       var width = 600;
       var top = 420;
       var left = Math.floor(document.body.clientWidth - width / 2 + 130);
       var height = 350;
-      this.addlLayerId = this.$layer.iframe({
+      this.$layer.iframe({
+        id: "addMX",
         content: {
           content: addBiillboardModel, //传递的组件对象
           parent: this, //当前的vue对象
-          data: { layerId: this.addlLayerId, projectId: project.id }, //props
+          data: { layerId: "addMX", projectId: project.id }, //props
         },
         offset: [left.toString(), top.toString()], //left top  左上角(left=430px/2;top=(800px+header高)/2)
         area: ["350px", "720px"],
@@ -1026,6 +1026,12 @@ export default {
     },
   },
   beforeDestroy() {
+    this.$layer.close("MXSCList");
+    this.$layer.close("addXM");
+    this.$layer.close("GGPMXXQ");
+    this.$layer.close("addMX");
+    this.$layer.close("billboarddetail");
+
     if (this.getEntitiesHandler) {
       this.getEntitiesHandler.removeInputAction(
         Cesium.ScreenSpaceEventType.LEFT_CLICK

+ 9 - 1
src/views/ConstructionApplication3D/projectManagement/projectManagement.vue

@@ -138,7 +138,7 @@
                         <el-row>
                           <el-col :span="24">
                             <el-checkbox
-                              @click.stop.native=""
+                              @click.stop.native="selectchekbox()"
                               v-model="itemModel.checked"
                               :key="'itemModelChecked' + itemModel.id"
                               >{{ itemModel.modelname }}</el-checkbox
@@ -1592,6 +1592,14 @@ export default {
         this.SelectConstructionModelHendle(Minfo);
       }
     },
+
+    //项目对比复选框选定
+    selectchekbox() {
+      //关闭事件
+      this.DestroyAll();
+      this.WaitingSelectionModel = null;
+    },
+
     //模型对比按钮
     ModelComparison(info) {
       let that = this;