Browse Source

Merge branch 'ztMaster'

maxiaoxiao 8 months ago
parent
commit
efa2f9fed2
19 changed files with 657 additions and 618 deletions
  1. 0 397
      src/views/ConstructionApplication3D/BenchmarkLandPriceAnalysis/BenchmarkLandPrice_old.js
  2. 124 41
      src/views/ConstructionApplication3D/Demolition/CQSetInfo.vue
  3. 21 4
      src/views/ConstructionApplication3D/Demolition/CQShowInfo.vue
  4. 3 5
      src/views/ConstructionApplication3D/Demolition/DemolitionList.vue
  5. 84 40
      src/views/ConstructionApplication3D/Demolition/QMSetInfo.vue
  6. 21 10
      src/views/ConstructionApplication3D/Demolition/QMShowInfo.vue
  7. 89 49
      src/views/ConstructionApplication3D/Demolition/ZDSetInfo.vue
  8. 45 26
      src/views/ConstructionApplication3D/Demolition/ZDShowInfo.vue
  9. 0 0
      src/views/ConstructionApplication3D/Demolition/zdAnalyse.min.js
  10. 11 0
      src/views/ConstructionApplication3D/billboard/addBiillboardModel.vue
  11. 45 1
      src/views/ConstructionApplication3D/billboard/billboardCheckList.vue
  12. 1 0
      src/views/ConstructionApplication3D/billboard/billboardChekInfo.vue
  13. 156 0
      src/views/ConstructionApplication3D/billboard/billboardChekResults.vue
  14. 13 12
      src/views/ConstructionApplication3D/billboard/billboardDesign.vue
  15. 9 0
      src/views/ConstructionApplication3D/projectInfo/addProjectInfo.vue
  16. 30 28
      src/views/ConstructionApplication3D/projectManagement/projectManagement.vue
  17. 4 4
      src/views/ConstructionApplication3D/skylineAnalysis/TJXResult.vue
  18. 1 1
      src/views/ConstructionApplication3D/skylineAnalysis/skylineAnalysis.vue
  19. 0 0
      src/views/ConstructionApplication3D/skylineAnalysis/skylineExecute.js

+ 0 - 397
src/views/ConstructionApplication3D/BenchmarkLandPriceAnalysis/BenchmarkLandPrice_old.js

@@ -1,397 +0,0 @@
-import { v4 as uuidv4 } from "uuid";
-import moment from "moment";
-import {
-  cartesian3ToWGS84,
-  mapQuery,
-  flatten,
-  mercator2lonLat,
-  undergroundMode,
-} from "@/utils/MapHelper/MapHelper.js";
-import {
-  area,
-  intersect,
-  polygon,
-  point,
-  midpoint,
-  difference,
-} from "@turf/turf";
-const BenchmarkLandPrice = {
-  /**
-   * 基准地价分析
-   * @param {*} BenchmarkLandPrice {
-        ProjectScope: [],分析范围
-        ProjectName: "",项目名称
-        ConstructionUnit: "",建设单位
-        imageBase64: [],输出图片
-      }
-   * @param {*} isOutputImg 是否输出范围图片 true false 如需输出图片,请确保要输出的范围已在屏幕正确认为
-   * @param {*} Callback 回调
-   */
-  async calculateLandPrice(BenchmarkLandPrice, isOutputImg = false, Callback) {
-    let GHDKList = await this.getGHDKs(BenchmarkLandPrice);
-    await this.GetJZDJ(BenchmarkLandPrice, GHDKList);
-    let data = await this.CalculateJZDJ(BenchmarkLandPrice, GHDKList);
-    if (isOutputImg) {
-      if (data && data.picBase64List) {
-        var promise = scene.outputSceneToFile();
-        Cesium.when(promise, function (base64data) {
-          data.picBase64List.push(base64data);
-          if (Callback) Callback(data);
-        });
-      } else {
-        if (Callback) Callback(false);
-      }
-    } else {
-      if (data) {
-        if (Callback) Callback(data);
-      } else {
-        if (Callback) Callback(false);
-      }
-    }
-  },
-
-  /**
-   * 查询区域内规划地块
-   * @param {*} BenchmarkLandPrice 基准地价信息
-   * @returns {*} 图层返回信息
-   * {
-          id: uuidv4(),
-          layerInfo: layer,
-          data: [],
-          geometry: feature.geometry,
-        }
-   */
-  async getGHDKs(BenchmarkLandPrice) {
-    let featureDataList = [];
-    //查询规划地块
-    let layer = flatten(window.layerTree).find((item) => item.core == "003006");
-    let points = BenchmarkLandPrice.ProjectScope;
-    let geo = {
-      id: 0,
-      style: null,
-      parts: [points.length],
-      points: points,
-      type: "REGION",
-      prjCoordSys: {
-        epsgCode: null,
-      },
-    };
-    let queryByGeometryParameters = {
-      getFeatureMode: "SPATIAL",
-      datasetNames: [
-        layer.date_server.dataSourceName + ":" + layer.date_server.datasetName,
-      ],
-      geometry: geo,
-      spatialQueryMode: "INTERSECT",
-      hasGeometry: "true",
-    };
-    let e = await mapQuery(
-      layer.date_server.url + "/featureResults.json?returnContent=true",
-      queryByGeometryParameters
-    );
-    if (e && e.totalCount > 0) {
-      e.features.forEach((feature) => {
-        let featureData = {
-          id: uuidv4(),
-          layerInfo: layer,
-          data: [],
-          geometry: feature.geometry,
-        };
-
-        feature.fieldNames.forEach((fieldName, i) => {
-          let Field = e.datasetInfos
-            ? e.datasetInfos[0].fieldInfos.find(
-                (c) =>
-                  c.name &&
-                  c.name.toUpperCase() == fieldName.toUpperCase() &&
-                  c.name.toUpperCase().indexOf("SM") == -1
-              )
-            : null;
-          if (Field) {
-            featureData.data.push({
-              label: fieldName,
-              labelCN: Field ? Field.caption : fieldName,
-              value: feature.fieldValues[i],
-            });
-          }
-        });
-        featureDataList.push(featureData);
-      });
-    }
-    return featureDataList;
-  },
-
-  /**
-   * 获取基准地价
-   * @param {*} BenchmarkLandPrice
-   * @param {*} GHDKList
-   * @returns
-   */
-  async GetJZDJ(BenchmarkLandPrice, GHDKList) {
-    for (let GHDKindex = 0; GHDKindex < GHDKList.length; GHDKindex++) {
-      let GHDK = GHDKList[GHDKindex];
-      GHDK.JZDJList = [];
-      let KZXXGYDDM = GHDK.data.find((c) => c.label == "KZXXGYDDM");
-      let landUseNatureRelation = flatten(window.landUseNatureRelation).find(
-        (c) => {
-          let GHDKType = c.GHDKType.find((a) =>
-            KZXXGYDDM.value.startsWith(a.ydxzdl)
-          );
-
-          return GHDKType != null;
-        }
-      );
-      if (landUseNatureRelation) {
-        let layerinfos = landUseNatureRelation.layerinfo;
-        for (let index = 0; index < layerinfos.length; index++) {
-          let layerinfo = layerinfos[index];
-          let layer = flatten(window.layerTree).find(
-            (item) => item.core == layerinfo.layerCore
-          );
-          if (layer && layer.date_server && layer.date_server.url) {
-            let points = BenchmarkLandPrice.ProjectScope;
-            let geo = {
-              id: 0,
-              style: null,
-              parts: [points.length],
-              points: points,
-              type: "REGION",
-              prjCoordSys: {
-                epsgCode: null,
-              },
-            };
-            let queryByGeometryParameters = {
-              getFeatureMode: "SPATIAL",
-              datasetNames: [
-                layer.date_server.dataSourceName +
-                  ":" +
-                  layer.date_server.datasetName,
-              ],
-              geometry: geo,
-              spatialQueryMode: "INTERSECT",
-              hasGeometry: "true",
-            };
-            let e = await mapQuery(
-              layer.date_server.url + "/featureResults.json?returnContent=true",
-              queryByGeometryParameters
-            );
-            if (e && e.totalCount > 0) {
-              e.features.forEach((feature) => {
-                let layerData = {
-                  id: uuidv4(),
-                  layerInfo: layerinfo,
-                  data: [],
-                  geometry: feature.geometry,
-                };
-                feature.fieldNames.forEach((fieldName, i) => {
-                  let Field = e.datasetInfos
-                    ? e.datasetInfos[0].fieldInfos.find(
-                        (c) =>
-                          c.name &&
-                          c.name.toUpperCase() == fieldName.toUpperCase() &&
-                          c.name.toUpperCase().indexOf("SM") == -1
-                      )
-                    : null;
-                  if (Field) {
-                    layerData.data.push({
-                      label: fieldName,
-                      labelCN: Field ? Field.caption : fieldName,
-                      value: feature.fieldValues[i],
-                    });
-                  }
-                });
-                GHDK.JZDJList.push(layerData);
-              });
-            }
-          } else {
-            console.log(
-              "服务编码【" + layerinfo.layerCore + "】配置不正确,请检查后重试"
-            );
-          }
-        }
-      } else {
-        console.log(KZXXGYDDM + "未配置当前土地用途,请联系管理员添加");
-      }
-    }
-  },
-
-  /**
-   * 计算基准地价
-   */
-  async CalculateJZDJ(BenchmarkLandPrice, GHDKList) {
-    //转换成超图格式面
-    let HZgeometry = {
-      partTopo: [1],
-      parts: [BenchmarkLandPrice.ProjectScope.length],
-      points: BenchmarkLandPrice.ProjectScope,
-    };
-    // 循环规划地块区域信息
-    GHDKList.forEach((GHDK) => {
-      GHDK.fromData = [];
-      GHDK.JZDJList.forEach((JZDJ) => {
-        let area = this.calculateIntersectArea(
-          GHDK.geometry,
-          JZDJ.geometry,
-          HZgeometry
-        );
-        if (Number(area) > 0) {
-          let fromData = { data: JZDJ.data, area: Number(area) / 666.66 };
-          //土地级别
-          let tdjb = JZDJ.data.find(
-            (c) => c.label == JZDJ.layerInfo.tdjbField
-          ).value;
-          fromData.tdjb = tdjb;
-          //单价
-          let dj = JZDJ.data.find(
-            (c) => c.label == JZDJ.layerInfo.ydlxPriceField
-          ).value;
-          fromData.dj = (Number(dj) * 666.66) / 10000;
-          //占用面积地价
-          fromData.zdj = Number(area * dj) / 10000;
-          fromData.geometry = JZDJ.geometry;
-          GHDK.fromData.push(fromData);
-        }
-      });
-    });
-
-    //计算分析面积
-    let fxzmj = this.CalculateAnalysisArea(BenchmarkLandPrice);
-    //总地价
-    let zdj = 0;
-    //参与地价计算的面积(规划地块+绘制范围+地价地块范围三者交集)
-    let jszmj = 0;
-    //规划地块详细地价
-    let ghdkDetailedDjList = [];
-    GHDKList.forEach((GHDK) => {
-      let ghdkDetailed = {};
-      ghdkDetailed.id = GHDK.id;
-      ghdkDetailed.geometry = GHDK.geometry;
-      ghdkDetailed.data = GHDK.data;
-      ghdkDetailed.ghyt = GHDK.data.find((c) => c.label == "KZXXGYDMC").value;
-      ghdkDetailed.dkbm = GHDK.data.find((c) => c.label == "DKBM").value;
-      //占用土地
-      ghdkDetailed.zytdList = GHDK.fromData;
-      ghdkDetailedDjList.push(ghdkDetailed);
-      GHDK.fromData.forEach((fromData) => {
-        zdj += fromData.zdj;
-        jszmj += fromData.area;
-      });
-    });
-    ghdkDetailedDjList = ghdkDetailedDjList.filter(
-      (c) => c.zytdList && c.zytdList.length > 0
-    );
-
-    return {
-      projectName: BenchmarkLandPrice.ProjectName, //项目名称
-      analysisDate: moment(new Date()).format("YYYY-MM-DD HH:mm:ss"), //分析时间
-      // projectType: BenchmarkLandPrice.ProjectType, //项目类型
-      buildUnit: BenchmarkLandPrice.ConstructionUnit, //建设单位
-      analysisArea: fxzmj, //分析面积(亩)
-      ParticipationArea: jszmj, //参与地价计算的面积(亩)
-      totalLandPrice: zdj, //总地价(万元)  总地价预估合计
-      ghdkDetailedDjList: ghdkDetailedDjList, //规划地块详细地价
-      picBase64List: [], //图片集 分析范围
-    };
-  },
-
-  /**
-   * 计算分析面积
-   * @param {*} BenchmarkLandPrice 基准地价信息
-   * @returns {number} 分析总面积
-   */
-  CalculateAnalysisArea(BenchmarkLandPrice) {
-    let fxzmj = 0;
-    let points = BenchmarkLandPrice.ProjectScope;
-    let DataPs = points.map((item) => [item.x, item.y]);
-    if (DataPs.length > 0) {
-      if (
-        JSON.stringify(DataPs[0]) != JSON.stringify(DataPs[DataPs.length - 1])
-      ) {
-        DataPs.push(DataPs[0]);
-      }
-      debugger;
-      let polygonPs = polygon([DataPs]);
-      let sdsd = area(polygonPs);
-      let areaPs = area(polygonPs) * window.earthRadius;
-      fxzmj = Number(areaPs / 666.66).toFixed(2);
-    }
-    return fxzmj;
-  },
-
-  /**
-   * 计算两个面的交集面积
-   * @param Points1
-   * @param Points2
-   * @param Points3
-   */
-  calculateIntersectArea(Points1, Points2, Points3) {
-    var geometry1;
-    var geometry2;
-    var geometry3;
-    if (Points1) {
-      geometry1 = this.AssemblySurface(Points1);
-    }
-    if (Points2) {
-      geometry2 = this.AssemblySurface(Points2);
-    }
-    if (Points3) {
-      geometry3 = this.AssemblySurface(Points3);
-    }
-    let areaPs;
-    if (geometry1 && geometry2) {
-      areaPs = intersect(geometry1, geometry2);
-    }
-    if (areaPs && geometry3) {
-      areaPs = intersect(areaPs, geometry3);
-    }
-    if (areaPs) {
-      let areadifference = area(areaPs) * window.earthRadius;
-      return Number(areadifference.toFixed(2));
-    } else {
-      return 0;
-    }
-  },
-  /**
-   * 组装带洞和不带洞的面
-   * @param geometry 超图返回的图形数组
-   */
-  AssemblySurface(geometry) {
-    let point3ds = [];
-    let pointholes = [];
-    let startindex = 0;
-    for (let index = 0; index < geometry.parts.length; index++) {
-      let thisps = [];
-      let endindex = startindex + geometry.parts[index];
-      let geometryPoints = geometry.points.slice(startindex, endindex);
-      for (
-        let pointindex = 0;
-        pointindex < geometryPoints.length;
-        pointindex++
-      ) {
-        let point = geometryPoints[pointindex];
-        thisps.push([point.x, point.y]);
-      }
-      if (geometry.partTopo[index] === 1) {
-        point3ds.push(thisps);
-      } else {
-        pointholes.push(thisps);
-      }
-
-      startindex = endindex;
-    }
-
-    // 主多边形
-    var mainPolygon = polygon(point3ds);
-
-    // 岛洞多边形
-    var holePolygon = polygon(pointholes);
-
-    // 计算差集 得到有导洞的图形
-    var getdifference = difference(mainPolygon, holePolygon);
-    return getdifference;
-  },
-};
-/**
- * 基准地价分析
- */
-export default BenchmarkLandPrice;

+ 124 - 41
src/views/ConstructionApplication3D/Demolition/CQSetInfo.vue

@@ -53,7 +53,7 @@
       <el-button type="primary" @click="saveAs()">另存为</el-button>
       <el-button type="primary" @click="reset()">重置</el-button>
     </el-row>
-    <el-dialog title="标准名称设置" :modal="false" :visible.sync="dialogFormVisible" modal-append-to-body>
+    <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>
@@ -65,7 +65,7 @@
       </div>
     </el-dialog>
     <el-dialog title="编辑" :modal="false" :visible.sync="editFormVisible" append-to-body="true" width="20rem">
-      <el-form :model="oldRow" :rules="rules" ref="oldRow">
+      <el-form :model="oldRow" :rules="rowRules" ref="rowForm">
         <el-form-item label="房屋结构" prop="jg">
           <el-select v-model="oldRow.jg">
             <el-option label="框架结构" value="框架结构"></el-option>
@@ -76,10 +76,10 @@
           </el-select>
         </el-form-item>
         <el-form-item label="房屋等级" prop="grade">
-          <el-input v-model="oldRow.grade" type="number" min="1" max="5" autocomplete="off"></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 type="number" min="0" max="100000000" v-model="oldRow.bz" autocomplete="off"></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>
@@ -94,13 +94,21 @@
 </template>
 <script>
 import {
-  getCqBcbzList, getCqBcbzItemList,
-  addCqBcbz, updateCqBcbz, addCqBcbzItem, updateCqBcbzItem, delCqBcbzItem
+  getCqBcbzList, getCqBcbzItemList, getCqBcbzById,
+  addCqBcbz, updateCqBcbz, updateCqBcbzItem, delCqBcbzItem
 } from "@/api/zt/ztApi.js";
 export default {
   props: ["cqValue"],
   name: "ZDShowInfo",
   data() {
+    var bzValidate = (rule, value, callback) => {
+      if (value == "" || value == null)
+        callback(new Error("不能为空"))
+      else if (value < 0) {
+        callback(new Error("不能小于0"))
+      }
+      else callback()
+    };
     return {
       editFormVisible: false,
       dialogFormVisible: false,
@@ -110,31 +118,36 @@ export default {
       rules: {
         name: [
           { required: true, message: "请输入名称", trigger: "blur" },
+
           // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
         ],
       },
+      rulesEdit: {
+        grade: [
+          { validate: bzValidate, trigger: 'blur' }
+        ],
+        bz: [
+          { validate: bzValidate, trigger: 'blur' }
+        ],
+      },
+
       // rowForm: {
       //     JG: "框架结构",
       //     GRADE: 1,
       //     BZ: 1350,
       //     DES: ''
       // },
+
       rowRules: {
-        jg: [
-          { required: true, message: "请选择结构", trigger: "blur" },
-          // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
-        ],
+
         grade: [
-          { required: true, message: "请选择等级", trigger: "blur" },
-          // { min: 1, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
+          // { required: true, message: "不能为空", trigger: "blur" },
+          { type: 'number', min: 1, max: 5, message: "范围1-5之间", trigger: 'blur' }
         ],
         bz: [
-          { required: true, message: "请输入名称", trigger: "blur" },
-          // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
-        ],
-        des: [
-          { required: true, message: "请输入规划", trigger: "blur" },
-          // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
+          // { required: true, message: "不能为空", trigger: "blur" },
+          // /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/
+          { type: 'number', min: 0, max: 10000000000, message: "不能小于0", trigger: 'blur' }
         ],
       },
       /**
@@ -261,7 +274,7 @@ export default {
      */
     initForm() {
       debugger;
-      console.log(this.cqValue);
+
       // if (this.cqValue && this.cqValue != "") {
       //   this.bcbz = this.cqValue;
       //   var item = this.bcbzList.find((t) => t.value == this.bcbz);
@@ -316,9 +329,40 @@ export default {
      * 选择标准下拉框
      */
     selectZDBZ() {
-      debugger;
-      if (this.bcbz && this.bcbz != "") {
-        this.curBCBZ = this.bcbzList.find((t) => t.value == this.bcbz);
+      var that = this;
+      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 {
+          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("请选择标准")
       }
     },
 
@@ -342,16 +386,16 @@ export default {
         that.$layer.alert("请选择补偿标准");
         return;
       }
-
-      debugger;
       if (window.isUseDB) {
         var item = {
           id: that.curBCBZ.id,
-          name: that.curBCBZ.name
+          name: that.curBCBZ.name,
+          bcbz: that.curBCBZ.bcbz
         }
         updateCqBcbz(item).then((res) => {
           if (res)
-            that.$layer.alert("保存完成");
+            that.getInitData();
+          that.$layer.alert("保存完成");
 
         }).catch((err) => {
           console.log(err)
@@ -393,18 +437,20 @@ export default {
      */
     saveData() {
       debugger;
-      var val = (window.ZSBC.CQBCList.length + 1).toString();
-      var that=this;
+      var date = new Date();
+      var val = date.getTime().toString();
+      var that = this;
       var newBCBZ = {
-          id: val,
-          name: that.ruleForm.name,
-          bcbz: that.curBCBZ.bcbz,
-        };
+        id: val,
+        name: that.ruleForm.name,
+        bcbz: that.curBCBZ.bcbz,
+      };
       if (window.isUseDB) {
-        addCqBcbz(newBCBZ).then((res)=>{
-          if(res)
+        addCqBcbz(newBCBZ).then((res) => {
+          if (res)
+            that.getInitData();
           that.$layer.alert("保存完成");
-        }).catch((err)=>{
+        }).catch((err) => {
           console.log(err)
         })
       }
@@ -419,16 +465,23 @@ export default {
      */
     handleClick(row) {
       debugger
+
       this.oldRow = row;
       this.editFormVisible = true;
     },
     handleDeleteClick(row) {
+      var that = this;
       if (row == undefined)
         return;
-      this.$layer.confirm("确定要删除吗?", {}, function () {
+      var index = that.curBCBZ.bcbz.findIndex(t => t.id = row.id)
+      var formId = that.$layer.confirm("确定要删除吗?", {}, function () {
         delCqBcbzItem([row.id]).then((res) => {
-          if (res)
-            this.$layer.alert("数据已删除!");
+          if (res) {
+            that.$message("数据已删除!");
+            if (index > -1)
+              that.curBCBZ.bcbz.splice(index, 1)
+            that.$layer.close(formId)
+          }
         }).catch((err) => {
           console.log(err)
         })
@@ -445,9 +498,27 @@ export default {
     handleSetFoucsSetData(row) {
       this.oldRow = row;
     },
-    submitEditForm() {
-      this.editFormVisible = false;
-      this.updateItem()
+    submitEditForm(formName) {
+      // if (!this.chageBCBZ())
+      //   return false;
+      // else {
+      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
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      })
+
+      // }
     },
     /**
      * 
@@ -479,6 +550,18 @@ export default {
     saveHandleClick(row) {
       row.seen = false;
     },
+    chageBCBZ() {
+      if (this.oldRow.grade < 1) {
+        this.$message.warning('不能小于1')
+        return false
+      }
+      if (this.oldRow.bz < 0) {
+        this.$message.warning('不能小于0')
+        return false
+      }
+
+      return true;
+    }
   },
 };
 </script>

+ 21 - 4
src/views/ConstructionApplication3D/Demolition/CQShowInfo.vue

@@ -311,15 +311,32 @@ export default {
      */
     selectZDBZ() {
       debugger;
-      if (this.bcbz == undefined && this.bcbz == "") {
+      var that = this;
+      if (that.bcbz == undefined && that.bcbz == "") {
+        that.$message.warning("请选择标准")
         return;
       }
       if (window.isUseDB) {
-
-        var name
+        var queryParams =
+        {
+          "bz": null,
+          "des": null,
+          "grade": null,
+          "id": null,
+          "jg": null,
+          "pid": this.bcbz
+        }
+        getCqBcbzItemList(queryParams).then((response) => {
+          if (response) {
+            that.curBCBZ.bcbz = response.rows;
+          }
+        }).catch((err) => {
+          console.log(err)
+        })
       }
       else {
-        this.curBCBZ = this.bcbzList.find((t) => t.value == this.bcbz);
+        that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.CQBCList));
+        that.curBCBZ = that.bcbzList.find(t => t.id == this.bcbz)
       }
 
     },

+ 3 - 5
src/views/ConstructionApplication3D/Demolition/DemolitionList.vue

@@ -112,8 +112,8 @@
               </el-col>
             </el-row>
           </el-card>
-          <el-pagination background layout="prev, pager, next" :page-size="pageSize" :current-page="currentPage"
-            :total="rowsCount" @current-change="onCurrentChange">
+          <el-pagination background layout="prev, pager, next" :page-size="pageSize"   :total="rowsCount" :current-page="currentPage"
+           @current-change="onCurrentChange">
           </el-pagination>
         </div>
       </el-tab-pane>
@@ -488,8 +488,6 @@
                   </li>
                 </ul>
               </el-tab-pane>
-
-
             </el-tabs>
           </el-tab-pane>
         </el-tabs>
@@ -1200,7 +1198,7 @@ export default {
         debugger
         getZdProjectList(queryParams).then((res) => {
           that.projectList = res.rows;
-          that.rowsCount = res.toatl;
+          that.rowsCount = res.total;
         }).catch((err) => {
           console.log(err)
         })

+ 84 - 40
src/views/ConstructionApplication3D/Demolition/QMSetInfo.vue

@@ -4,7 +4,7 @@
     <el-row :gutter="10">
       <el-col :span="6">青苗补偿标准:</el-col>
       <el-col :span="18">
-        <el-select v-model="bcbz" style="width: 90%" @change="selectZDBZ()">
+        <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-select>
       </el-col>
@@ -12,21 +12,23 @@
 
     <el-row>
       <el-col :span="6">农作物补偿:</el-col>
-      <el-col :span="16"><el-input style="width: 100%" type="number" placeholder="请输入"
-          v-model="curBCBZ.nzw"></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" v-model="curBCBZ.jjzw"></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" v-model="curBCBZ.sm"></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">
@@ -47,7 +49,7 @@
 </template>
 <script>
 import {
-  getQmbcbzList, updateQmbcbz, addQmbcbz
+  getQmbcbzList, updateQmbcbz, addQmbcbz, getQmbcbzById
 } from "@/api/zt/ztApi.js";
 export default {
   props: ["qmValue"],
@@ -91,7 +93,7 @@ export default {
   methods: {
     initForm() {
       debugger;
-      this.getInitData()
+      this.getInitData();
     },
     getInitData() {
       var that = this;
@@ -100,7 +102,7 @@ export default {
         getQmbcbzList().then((response) => {
           if (response) {
             that.bcbzList = response.rows
-            if (that.qmValue != undefined || that.qmValue != "") {
+            if (that.bcbz != undefined || that.bcbz != "") {
               that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
             }
           }
@@ -110,17 +112,31 @@ export default {
       }
       else {
         that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.QMBCList));
-        if (that.qmValue != undefined || this.qmValue != "") {
-          that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
-        }
+        that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
       }
     },
     selectZDBZ() {
-      debugger;
-      if (this.bcbz && this.bcbz != "") {
-        this.curBCBZ = this.bcbzList.find((t) => t.id == this.bcbz);
+      var that = this;
+      if (that.bcbz == null && that.bcbz == "") {
+        that.$message.warning("请选择标准")
+        return;
+      }
+      if (window.isUseDB) {
+        getQmbcbzById(that.bcbz).then((response) => {
+          if (response) {
+            that.curBCBZ = response.data
+          }
+        }).catch((err) => {
+          console.log(err)
+        })
       }
-      // this.changeZDBZ();
+      else {
+        that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.QMBCList));
+        that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
+      }
+
+
+
     },
     /**
      * 选择标准改变
@@ -143,34 +159,36 @@ export default {
      * 保存修改
      */
     save() {
-      if (this.bcbz == "") {
-        this.$layer.alert("请选择补偿标准");
+      var that = this;
+      if (that.bcbz == "") {
+        that.$layer.alert("请选择补偿标准");
         return;
       }
+      if (!that.changeBCBZ())
+        return;
       debugger;
       var model = {
-        "id": this.curBCBZ.id,
-        "jjzw": this.curBCBZ.jjzw,
-        "name": this.curBCBZ.name,
-        "nzw": this.curBCBZ.nzw,
-        "sm": this.curBCBZ.sm,
+        "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) {
-            this.$layer.alert("保存完成");
+            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] = this.curBCBZ;
-          this.$layer.alert("保存完成");
+          window.ZSBC.QMBCList[index] = that.curBCBZ;
+          that.$layer.alert("保存完成");
         }
       }
     },
@@ -178,52 +196,78 @@ export default {
      * 另存为
      */
     saveAs() {
+      if (!this.changeBCBZ())
+        return;
       this.dialogFormVisible = true;
     },
     submitForm(formName) {
-      this.$refs[formName].validate((valid) => {
+      var that = this;
+      that.$refs[formName].validate((valid) => {
         if (valid) {
           // alert('submit!');
-          this.dialogFormVisible = false;
-          this.saveData();
+          that.dialogFormVisible = false;
+          that.saveData();
+         
           // this.$layer.alert("保存完成");
         } else {
           console.log("error submit!!");
           return false;
         }
       });
+
     },
     /**
      * 另存数据
      */
     saveData() {
       debugger;
-      var val = (window.ZSBC.QMBCList.length + 1).toString();
+      var  that=this;
+      var date=new Date();
+      var val = date.getTime().toString();
       var newBCBZ = {
         "id": val,
-        "jjzw": this.curBCBZ.jjzw,
-        "name": this.ruleForm.name,
-        "nzw": this.curBCBZ.nzw,
-        "sm": this.curBCBZ.sm,
+        "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) {
-            this.$layer.alert("保存完成");
+            that.getInitData();
+            that.$layer.alert("保存完成");
           }
         }).catch((err) => {
-
           console.log(err)
         })
       }
       else {
         window.ZSBC.QMBCList.push(newBCBZ);
-        this.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.QMBCList))
-        this.bcbz = val;
-        this.curBCBZ = this.bcbzList.find(t => t.id == this.bcbz);
+        that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.QMBCList))
+        that.bcbz = val;
+        that.curBCBZ = that.bcbzList.find(t => t.id == that.bcbz);
       }
     },
+    changeBCBZ() {
+      if (this.curBCBZ.sm < 0) {
+        this.$message.warning("输入数值不能小于0")
+        return false;
+      }
+      if (this.curBCBZ.jjzw < 0) {
+        this.$message.warning("输入数值不能小于0")
+        return false;
+      }
+      if (this.curBCBZ.nzw < 0) {
+        this.$message.warning("输入数值不能小于0")
+        return false;
+      }
+      return true;
+    },
+    inputChange() {
+      this.changeBCBZ()
+    }
+
   }
 };
 </script>

+ 21 - 10
src/views/ConstructionApplication3D/Demolition/QMShowInfo.vue

@@ -4,7 +4,7 @@
     <el-row :gutter="10">
       <el-col :span="6">青苗补偿标准:</el-col>
       <el-col :span="18">
-        <el-select v-model="bcbz" style="width: 90%" @change="selectZDBZ()">
+        <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-select>
       </el-col>
@@ -19,13 +19,14 @@
     <el-row>
       <el-col :span="6">经济作物:</el-col>
       <el-col :span="16">
-        <el-input style="width: 100%" placeholder="请输入" v-model="curBCBZ.jjzw"></el-input></el-col>
+        <el-input style="width: 100%" placeholder="请输入" v-model="curBCBZ.jjzw" readonly></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%; text-align: right" placeholder="请输入" v-model="curBCBZ.sm"></el-input></el-col>
+        <el-input style="width: 100%; text-align: right" placeholder="请输入" v-model="curBCBZ.sm"
+          readonly></el-input></el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <!-- <el-row justify="center" type="flex">
@@ -48,9 +49,8 @@
 </template>
 <script>
 import {
-  getQmbcbzList
+  getQmbcbzList, getQmbcbzById
 } from "@/api/zt/ztApi.js";
-import { triangleGrid } from "@turf/turf";
 export default {
   props: ["qmValue"],
   name: "QMSetInfo",
@@ -104,11 +104,9 @@ export default {
         getQmbcbzList().then((response) => {
           if (response) {
             that.bcbzList = response.rows
-            if (that.qmValue != undefined || that.qmValue != "") {
               that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
-            }
           }
-        }).catch((err)=>{
+        }).catch((err) => {
           console.log(err)
         })
       }
@@ -121,9 +119,22 @@ export default {
 
     },
     selectZDBZ() {
-      debugger;
       var that = this;
-      if (that.bcbz && that.bcbz != "") {
+      if (that.bcbz==null && that.bcbz == "")  {
+        that.$message.warning("请选择标准")
+        return;
+      }
+      if (window.isUseDB) {
+        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));
         that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
       }
     },

+ 89 - 49
src/views/ConstructionApplication3D/Demolition/ZDSetInfo.vue

@@ -14,8 +14,8 @@
     </el-row>
     <el-row>
       <el-col :span="6">土地年产值:</el-col>
-      <el-col :span="16"><el-input style="width: 100%" type="number" placeholder="请输入" v-model="curBCBZ.tdcz"
-          @change="changeZDBZ"></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>
@@ -25,13 +25,13 @@
     </el-row>
     <el-row>
       <el-col :span="6">综合补偿倍数:</el-col>
-      <el-col :span="16"><el-input style="width: 100%" type="number" placeholder="请输入" v-model="curBCBZ.tdbcbs"
-          @change="changeZDBZ"></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="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">
@@ -40,12 +40,13 @@
     </el-row>
     <el-row>
       <el-col :span="6">综合补偿倍数</el-col>
-      <el-col :span="16"><el-input type="number" style="width: 100%" placeholder="请输入" v-model="curBCBZ.azbcbs"
-          @change="changeZDBZ"></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="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">
@@ -54,7 +55,8 @@
     </el-row>
     <el-row>
       <el-col :span="6">征地补偿合计:</el-col>
-      <el-col :span="16"><el-input v-model="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">
@@ -78,12 +80,13 @@
 </template>
 <script>
 import {
-  getZdBcbzList, updateZdBcbz, addZdBcbz
+  getZdBcbzList, updateZdBcbz, addZdBcbz, getZdBcbzById
 } from "@/api/zt/ztApi.js";
 export default {
   props: ["zdValue"],
   name: "ZDShowInfo",
   data() {
+
     return {
       dialogFormVisible: false,
       ruleForm: {
@@ -148,14 +151,25 @@ export default {
     initForm() {
       debugger;
       this.getInitData();
-
     },
     selectZDBZ() {
-      debugger;
-      if (this.bcbz && this.bcbz != "") {
-        this.curBCBZ = this.bcbzList.find((t) => t.id == this.bcbz);
+      var that = this;
+      if (that.bcbz == null && that.bcbz == "") {
+        that.$message.warning("请选择标准");
+        return;
       }
-      this.changeZDBZ();
+      if (window.isUseDB) {//数据库
+        getZdBcbzById(that.bcbz).then((response) => {
+          that.curBCBZ = response.data;
+        }).catch((err) => {
+          console.log(err)
+        })
+      }
+      else {
+        that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.ZDBCList));
+        that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
+      }
+
     },
     getInitData() {
       var that = this;
@@ -182,12 +196,25 @@ export default {
      * 选择标准改变
      */
     changeZDBZ() {
+      if (this.curBCBZ.tdcz < 0) {
+        this.$message.warning("输入数值不能小于0")
+        return false;
+      }
+      if (this.curBCBZ.tdbcbs < 0) {
+        this.$message.warning("输入数值不能小于0")
+        return false;
+      }
+      if (this.curBCBZ.azbcbs < 0) {
+        this.$message.warning("输入数值不能小于0")
+        return false;
+      }
       this.curBCBZ.tdbcf =
-        this.curBCBZ.tdcz * this.curBCBZ.tdbcbs;
+        parseFloat(this.curBCBZ.tdcz) * parseFloat(this.curBCBZ.tdbcbs);
       this.curBCBZ.azbcf =
-        this.curBCBZ.tdcz * this.curBCBZ.azbcbs;
+        parseFloat(this.curBCBZ.tdcz) * parseFloat(this.curBCBZ.azbcbs);
       this.curBCBZ.bchj =
-        this.curBCBZ.tdbcf + this.curBCBZ.azbcf;
+        parseFloat(this.curBCBZ.tdbcf) + parseFloat(this.curBCBZ.azbcf);
+      return true;
     },
     /**
      * 重置
@@ -199,39 +226,41 @@ export default {
      * 保存修改
      */
     save() {
-      if (this.bcbz == "") {
-        this.$layer.alert("请选择补偿标准");
+      var that = this;
+      if (that.bcbz == "") {
+        that.$layer.alert("请选择补偿标准");
         return;
       }
+      if (!that.changeZDBZ())
+        return;
       debugger;
       if (window.isUseDB) {
         var Model =
         {
-          "azbcbs": this.curBCBZ.azbcbs,
-          "azbcf": this.curBCBZ.azbcf,
-          "bchj": this.curBCBZ.bchj,
-          "id": this.curBCBZ.id,
-          "name": this.curBCBZ.name,
-          "tbcz": this.curBCBZ.tbcz,
-          "tdbcbs": this.curBCBZ.tdbcbs,
-          "tdbcf": this.curBCBZ.tdbcf,
+          "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) {
-            this.$layer.alert("保存完成");
+            that.$layer.alert("保存完成");
             that.getInitData();
           }
-         
+
         }).catch((err) => {
           console.log(err)
         });
       }
       else {
-        var index = window.ZSBC.ZDBCList.findIndex((t) => t.value == this.bcbz);
+        var index = window.ZSBC.ZDBCList.findIndex((t) => t.value == that.bcbz);
         if (index > -1) {
-          window.ZSBC.ZDBCList[index] = this.curBCBZ;
-          this.$layer.alert("保存完成");
+          window.ZSBC.ZDBCList[index] = that.curBCBZ;
+          that.$layer.alert("保存完成");
         }
       }
     },
@@ -239,29 +268,37 @@ export default {
      * 另存为
      */
     saveAs() {
-
+      if (!this.changeZDBZ())
+        return
       this.dialogFormVisible = true;
     },
     submitForm(formName) {
-      this.$refs[formName].validate((valid) => {
-        if (valid) {
-          // alert('submit!');
-          this.dialogFormVisible = false;
-          this.saveData();
-          // this.$layer.alert("保存完成");
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
+      var that = this;
+      if (!that.changeZDBZ())
+        return false;
+      else {
+        that.$refs[formName].validate((valid) => {
+          if (valid) {
+            // alert('submit!');
+            that.dialogFormVisible = false;
+            that.saveData();
+            // this.$layer.alert("保存完成");
+          } else {
+            console.log("error submit!!");
+            return false;
+          }
+        });
+
+      }
     },
     /**
      * 另存数据
      */
     saveData() {
       debugger;
-      var val = (window.ZSBC.ZDBCList.length + 1)
-      var that=this;
+      var date = new Date();
+      var val = date.getTime().toString();
+      var that = this
       var newBCBZ =
       {
         "azbcbs": that.curBCBZ.azbcbs,
@@ -269,7 +306,7 @@ export default {
         "bchj": that.curBCBZ.bchj,
         "id": val,
         "name": that.ruleForm.name,
-        "tbcz": that.curBCBZ.tbcz,
+        "tdcz": that.curBCBZ.tdcz,
         "tdbcbs": that.curBCBZ.tdbcbs,
         "tdbcf": that.curBCBZ.tdbcf,
       };
@@ -292,6 +329,9 @@ export default {
       }
 
     },
+    inputChange() {
+      this.changeZDBZ();
+    }
   },
 };
 </script>

+ 45 - 26
src/views/ConstructionApplication3D/Demolition/ZDShowInfo.vue

@@ -4,8 +4,9 @@
       <el-col :span="6">征地补偿标准:</el-col>
       <el-col :span="18">
         <el-select size="mini" 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-option v-for="item in bcbzList" :key="item.id" :label="item.name" readonly :value="item.id"></el-option>
         </el-select>
+
       </el-col>
     </el-row>
     <el-row class="subtitle">
@@ -13,8 +14,8 @@
     </el-row>
     <el-row style="display: flex; align-items: center">
       <el-col :span="6">土地年产值:</el-col>
-      <el-col :span="16"><el-input controls-position="right" size="mini" style="width: 100%" 
-          placeholder="请输入" v-model="curBCBZ.tdcz" @change="changeZDBZ"></el-input>
+      <el-col :span="16"><el-input controls-position="right" size="mini" style="width: 100%" placeholder="请输入"
+          v-model="curBCBZ.tdcz" readonly @change="changeZDBZ"></el-input>
       </el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
@@ -24,13 +25,13 @@
     </el-row>
     <el-row>
       <el-col :span="6">综合补偿倍数:</el-col>
-      <el-col :span="16"><el-input size="mini" style="width: 100%"  placeholder="请输入"
-          v-model="curBCBZ.tdbcbs" @change="changeZDBZ"></el-input></el-col>
+      <el-col :span="16"><el-input size="mini" style="width: 100%" placeholder="请输入" v-model="curBCBZ.tdbcbs"
+          @change="changeZDBZ" readonly></el-input></el-col>
     </el-row>
     <el-row>
       <el-col :span="6">土地补偿费:</el-col>
       <el-col :span="16">
-        <el-input size="mini" placeholder="自动计算" readonly  v-model="curBCBZ.tdbcf"></el-input></el-col>
+        <el-input size="mini" placeholder="自动计算" readonly v-model="curBCBZ.tdbcf"></el-input></el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row class="subtitle">
@@ -39,13 +40,12 @@
     </el-row>
     <el-row>
       <el-col :span="6">综合补偿倍数</el-col>
-      <el-col :span="16"><el-input size="mini"  style="width: 100%" placeholder="请输入"
-          v-model="curBCBZ.azbcbs" @change="changeZDBZ"></el-input></el-col>
+      <el-col :span="16"><el-input size="mini" style="width: 100%" placeholder="请输入" v-model="curBCBZ.azbcbs"
+          @change="changeZDBZ" readonly></el-input></el-col>
     </el-row>
     <el-row>
       <el-col :span="6">安置补偿费:</el-col>
-      <el-col :span="16"><el-input size="mini" v-model="curBCBZ.azbcf" readonly 
-          placeholder="自动计算"></el-input></el-col>
+      <el-col :span="16"><el-input size="mini" v-model="curBCBZ.azbcf" readonly placeholder="自动计算"></el-input></el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row class="subtitle">
@@ -62,7 +62,7 @@
 </template>
 <script>
 import {
-  getZdBcbzList
+  getZdBcbzList, getZdBcbzById
 } from "@/api/zt/ztApi.js";
 export default {
   props: ["zdValue"],
@@ -81,35 +81,35 @@ export default {
        * 当前标准
        */
       curBCBZ: {
-        name: "征地标准01",
-        id: "1",
+        name: "",
+        id: "",
 
         /**
          * 土地统一年产值
          */
-        tdcz: 1000,
+        tdcz: 0,
         /**
          * 土地补偿倍数
          */
 
-        tdbcbs: 10,
+        tdbcbs: 0,
         /**
          * 土地补偿费
          */
-        tdbcf: 10000,
+        tdbcf: 0,
         /**
          * 安置补偿倍数
          */
 
-        azbcbs: 10,
+        azbcbs: 0,
         /**
          * 安置补偿费
          */
-        azbcf: 10000,
+        azbcf: 0,
         /**
          * 补偿合计
          */
-        bchj: 20000,
+        bchj: 0,
       },
     };
   },
@@ -122,22 +122,41 @@ export default {
       debugger
       var that = this
       that.bcbz = that.zdValue;
+      if (that.bcbz==null && that.bcbz == "")  {
+        console.log("未选择标准")
+        return;
+      }
       if (window.isUseDB) {//数据库
         getZdBcbzList().then((response) => {
           that.bcbzList = response.rows;
-          if (that.bcbz != undefined && that.bcbz != "") {
-            that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
-          }
+          that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
         }).catch((err) => {
           console.log(err)
         })
       }
       else {
-        this.bcbzList = window.ZSBC.ZDBCList;
-        if (that.bcbz != undefined && this.bcbz != "") {
-          that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
-        }
+        that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.ZDBCList));
+        that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
+      }
+    },
+    selectZDBZ() {
+      var that = this;
+      if (that.bcbz==null && that.bcbz == "") {
+        that.$message.warning("请选择标准");
+        return;
+      }
+      if (window.isUseDB) {//数据库
+        getZdBcbzById(that.bcbz).then((response) => {
+          that.curBCBZ = response.data;
+        }).catch((err) => {
+          console.log(err)
+        })
       }
+      else {
+        that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.ZDBCList));
+        that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
+      }
+
     }
   },
 };

File diff suppressed because it is too large
+ 0 - 0
src/views/ConstructionApplication3D/Demolition/zdAnalyse.min.js


+ 11 - 0
src/views/ConstructionApplication3D/billboard/addBiillboardModel.vue

@@ -1524,6 +1524,17 @@ export default {
       data.templateBottom = JSON.stringify(data.templateBottom);
       data.templateCentre = JSON.stringify(data.templateCentre);
       data.templateTop = JSON.stringify(data.templateTop);
+      data.viewing_angle = JSON.stringify({
+        destination: viewer.camera.position,
+        orientation: {
+          // 方向
+          heading: viewer.camera.heading,
+          // 视角
+          pitch: viewer.camera.pitch,
+          // 倾斜角度
+          roll: viewer.camera.roll,
+        },
+      });
       debugger;
       let result = await addBillboardModelList(data);
       debugger;

+ 45 - 1
src/views/ConstructionApplication3D/billboard/billboardCheckList.vue

@@ -77,6 +77,18 @@
             style="color: aqua"
             >审查</el-button
           >
+          <el-button
+            v-if="
+              (scope.row.ReviewStatus != undefined) &
+              (scope.row.ReviewStatus != '') &
+              (scope.row.ReviewStatus != null)
+            "
+            @click="checkResult(scope.row)"
+            type="text"
+            size="small"
+            style="color: aqua"
+            >详情</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
@@ -84,6 +96,7 @@
 </template>
 <script>
 import billboardChekInfo from "@/views/ConstructionApplication3D/billboard/billboardChekInfo.vue";
+import billboardChekResults from "@/views/ConstructionApplication3D/billboard/billboardChekResults.vue";
 import { listBillboardModelList } from "@/api/zt/ztApi.js";
 export default {
   data() {
@@ -170,7 +183,7 @@ export default {
      * @param {*} row
      */
     check(row) {
-      this.locationClick(row);
+      // this.locationClick(row);
       if (this.deltailLayerId != null) this.$layer.close(this.deltailLayerId);
       var width = 400;
 
@@ -196,6 +209,37 @@ export default {
         },
       });
     },
+
+    /**
+     * 弹窗审查结果
+     * @param {*} row
+     */
+    checkResult(row) {
+      if (this.deltailLayerId != null) this.$layer.close(this.deltailLayerId);
+      var width = 400;
+
+      var top = 500;
+      var left = Math.floor(document.body.clientWidth - width / 2);
+      var height = 500;
+
+      this.deltailLayerId = this.$layer.iframe({
+        content: {
+          content: billboardChekResults, //传递的组件对象
+          parent: this, //当前的vue对象
+          data: { info: JSON.parse(JSON.stringify(row)), pinfo: this.info }, //props
+        },
+        offset: [left.toString(), top.toString()], //left top  左上角(left=430px/2;top=(800px+header高)/2)
+        area: [width.toString() + "px", height.toString() + "px"],
+        title: "广告牌审查结果",
+        maxmin: false,
+        shade: false, //是否显示遮罩
+        shadeClose: false, //点击遮罩是否关闭
+        cancel: () => {
+          //关闭事件
+          this.init();
+        },
+      });
+    },
   },
 };
 </script>

+ 1 - 0
src/views/ConstructionApplication3D/billboard/billboardChekInfo.vue

@@ -722,6 +722,7 @@ export default {
         id: item.id,
         ReviewComments: item.ReviewComments,
         ReviewStatus: item.ReviewStatus,
+        results: JSON.stringify(that.tableData),
       });
       debugger;
       if (result.code == 200) {

+ 156 - 0
src/views/ConstructionApplication3D/billboard/billboardChekResults.vue

@@ -0,0 +1,156 @@
+<template>
+  <div class="ZTGlobal" style="width: 400px; padding: 5px; height: 100%">
+    <el-row>
+      <span style="color: white">{{ info.billboardType }}</span>
+    </el-row>
+    <el-row
+      ><span style="color: aqua">{{ info.billboardName }}</span></el-row
+    >
+    <el-table :data="tableData" border style="width: 100%">
+      <el-table-column type="index"> </el-table-column>
+      <el-table-column prop="ReviewContent" label="审查项"> </el-table-column>
+      <el-table-column prop="ReviewMethod" label="审查方式"> </el-table-column>
+
+      <el-table-column fixed="right" label="结果" width="100">
+        <template slot-scope="scope">
+          {{ scope.row.ruleResult == "true" ? "符合" : "不符合" }}
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <el-row>
+      <el-input
+        type="textarea"
+        :autosize="{ minRows: 2, maxRows: 4 }"
+        placeholder="请输入审查意见"
+        v-model="info.ReviewComments"
+      >
+      </el-input>
+    </el-row>
+  </div>
+</template>
+<script>
+import {
+  cartesian3ToWGS84,
+  mapQuery,
+  flatten,
+  mercator2lonLat,
+  undergroundMode,
+  getGroundPoint,
+} from "@/utils/MapHelper/MapHelper.js";
+import {
+  pointToLineDistance,
+  point,
+  lineString,
+  difference,
+  buffer,
+  lineToPolygon,
+} from "@turf/turf";
+import { v4 as uuidv4 } from "uuid";
+import { updateBillboardModelList } from "@/api/zt/ztApi.js";
+export default {
+  data() {
+    return {
+      layerDatas: [],
+      tableData: [],
+      messageNum: 0,
+      layerDataList: [],
+    };
+  },
+  props: {
+    info: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+    pinfo: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+    layerid: {
+      type: String,
+      default: "",
+    },
+    lydata: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+    lyoption: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+  },
+  created() {
+    let that = this;
+    if (that.info.template) {
+      if (typeof that.info.template === "string") {
+        that.info.template = JSON.parse(that.info.template);
+      }
+    } else {
+      that.info.template = {};
+    }
+
+    if (that.info.templateBottom) {
+      if (typeof that.info.templateBottom === "string") {
+        that.info.templateBottom = JSON.parse(that.info.templateBottom);
+      }
+    } else {
+      that.info.templateBottom = {};
+    }
+    if (that.info.templateCentre) {
+      if (typeof that.info.templateCentre === "string") {
+        that.info.templateCentre = JSON.parse(that.info.templateCentre);
+      }
+    } else {
+      that.info.templateCentre = {};
+    }
+    if (that.info.templateTop) {
+      if (typeof that.info.templateTop === "string") {
+        that.info.templateTop = JSON.parse(that.info.templateTop);
+      }
+    } else {
+      that.info.templateTop = {};
+    }
+    if (that.info.results) {
+      if (typeof that.info.results === "string") {
+        that.info.results = JSON.parse(that.info.results);
+      }
+    } else {
+      that.info.results = [];
+    }
+    this.init();
+  },
+  mounted() {},
+  methods: {
+    async init() {
+      debugger;
+      let that = this;
+      that.tableData = that.info.results;
+    },
+  },
+  beforeDestroy() {
+    viewer.entities.removeAll();
+  },
+};
+</script>
+<style lang="scss">
+@import "@/../../zt.scss";
+</style>
+<style scoped>
+div
+  .el-row
+  .el-table
+  .el-row
+  .el-table-column
+  .el-radio__label
+  .el-table-column {
+  font-size: 10px;
+}
+</style>

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

@@ -230,17 +230,16 @@ export default {
      */
     locationSingleModel(Mitem) {
       if (Mitem.isAddModel) {
-        let entitie = viewer.entities.getById("pointBillboard_" + Mitem.id);
-        if (entitie) {
-          viewer.flyTo(entitie);
-        } else {
+        let entitie = viewer.entities.getById("point_Billboard_" + Mitem.id);
+        if (!entitie) {
           //渲染单个广告牌
           // if (billboardModel.id == Mitem.id) {
           this.DrawBillboard(Mitem);
-          let entitie = viewer.entities.getById("pointBillboard_" + Mitem.id);
-          viewer.flyTo(entitie);
+          // viewer.flyTo(entitie);
           // }
         }
+
+        viewer.camera.setView(JSON.parse(Mitem.viewing_angle));
       }
     },
     /**
@@ -737,13 +736,13 @@ export default {
           if (billboardModel.templateTop.yL) {
             h = Number(billboardModel.templateTop.yL) / 2;
           }
-          viewer.entities.removeById("pointBillboard_" + billboardModel.id);
+          viewer.entities.removeById("point_Billboard_" + billboardModel.id);
           lodash.remove(
             entityList,
-            (entity) => entity.id === "pointBillboard_" + billboardModel.id
+            (entity) => entity.id === "point_Billboard_" + billboardModel.id
           );
           const point = viewer.entities.add({
-            id: "pointBillboard_" + billboardModel.id,
+            id: "point_Billboard_" + billboardModel.id,
             //点
             position: Cesium.Cartesian3.fromDegrees(
               Number(billboardModel.templateTop.x),
@@ -833,7 +832,7 @@ export default {
       //   });
       //   entityList.push(entity);
       //   const point = viewer.entities.add({
-      //     id: "pointBillboard_" + billboardModel.id,
+      //     id: "point_Billboard_" + billboardModel.id,
       //     //点
       //     position: Cesium.Cartesian3.fromDegrees(
       //       billboardModel.x,
@@ -927,10 +926,10 @@ export default {
           entityList,
           (entity) => entity.id === "billboard_" + item.id
         );
-        viewer.entities.removeById("pointBillboard_" + item.id);
+        viewer.entities.removeById("point_Billboard_" + item.id);
         lodash.remove(
           entityList,
-          (entity) => entity.id === "pointBillboard_" + item.id
+          (entity) => entity.id === "point_Billboard_" + item.id
         );
       }
     },
@@ -955,8 +954,10 @@ export default {
           try {
             var promisse11w = scene.open(info.url);
             Cesium.when(promisse11w, function (layers) {
+              debugger;
               layers.forEach((element) => {
                 that.thislayers.push(element.name);
+                window.viewer.flyTo(element);
               });
             });
             that.yp(info);

+ 9 - 0
src/views/ConstructionApplication3D/projectInfo/addProjectInfo.vue

@@ -147,10 +147,12 @@ export default {
         landarea: [
           { required: true, message: "不能为空", trigger: "blur" },
           { type: "number", message: "必须为数字值", trigger: "blur" },
+          { validator: this.validateNumber, trigger: "blur" },
         ],
         totalprojectinvestment: [
           { required: true, message: "不能为空", trigger: "blur" },
           { type: "number", message: "必须为数字值", trigger: "blur" },
+          { validator: this.validateNumber, trigger: "blur" },
         ],
       },
     };
@@ -196,6 +198,13 @@ export default {
     }
   },
   methods: {
+    validateNumber(rule, value, callback) {
+      if (value < 0) {
+        return callback(new Error("数字需大于等于0"));
+      } else {
+        callback();
+      }
+    },
     submitForm(formName) {
       let that = this;
       this.$refs[formName].validate(async (valid) => {

+ 30 - 28
src/views/ConstructionApplication3D/projectManagement/projectManagement.vue

@@ -217,9 +217,9 @@
                               <el-button
                                 type="primary"
                                 size="mini"
-                                @click.stop="openNightscapeAnalysis(itemModel)"
-                                >夜景分析</el-button
-                              >
+                                @click.stop="normAnalysis(item, itemModel)"
+                                >指标分析
+                              </el-button>
                             </el-col>
                             <el-col :span="8">
                               <el-button
@@ -247,20 +247,21 @@
                                 >控规分析
                               </el-button>
                             </el-col>
+
                             <el-col :span="8">
                               <el-button
                                 type="primary"
                                 size="mini"
-                                @click.stop="normAnalysis(item, itemModel)"
-                                >指标分析
+                                @click.stop="CheckPark(itemModel, true)"
+                                >车位审核
                               </el-button>
                             </el-col>
                             <el-col :span="8">
                               <el-button
                                 type="primary"
                                 size="mini"
-                                @click.stop="CheckPark(itemModel, true)"
-                                >车位审核
+                                @click.stop="RSAnalysis(itemModel)"
+                                >人视分析
                               </el-button>
                             </el-col>
                             <!-- <el-col :span="8">
@@ -327,19 +328,19 @@
                               <el-button
                                 type="primary"
                                 size="mini"
-                                @click.stop="RSAnalysis(itemModel)"
-                                >人视分析
+                                @click.stop="
+                                  BuildingStretchingAnalysis(itemModel)
+                                "
+                                >楼体拉伸
                               </el-button>
                             </el-col>
                             <el-col :span="8">
                               <el-button
                                 type="primary"
                                 size="mini"
-                                @click.stop="
-                                  BuildingStretchingAnalysis(itemModel)
-                                "
-                                >楼体拉伸
-                              </el-button>
+                                @click.stop="openNightscapeAnalysis(itemModel)"
+                                >夜景分析</el-button
+                              >
                             </el-col>
                           </el-row>
                           <el-row :gutter="24">
@@ -516,11 +517,9 @@
                                 <el-button
                                   type="primary"
                                   size="mini"
-                                  @click.stop="
-                                    openNightscapeAnalysis(itemModel)
-                                  "
-                                  >夜景分析</el-button
-                                >
+                                  @click.stop="normAnalysis(itemModel)"
+                                  >指标分析
+                                </el-button>
                               </el-col>
                               <el-col :span="8">
                                 <el-button
@@ -548,20 +547,21 @@
                                   >控规分析
                                 </el-button>
                               </el-col>
+
                               <el-col :span="8">
                                 <el-button
                                   type="primary"
                                   size="mini"
-                                  @click.stop="normAnalysis(itemModel)"
-                                  >指标分析
+                                  @click.stop="CheckPark(itemModel, true)"
+                                  >车位审核
                                 </el-button>
                               </el-col>
                               <el-col :span="8">
                                 <el-button
                                   type="primary"
                                   size="mini"
-                                  @click.stop="CheckPark(itemModel, true)"
-                                  >车位审核
+                                  @click.stop="RSAnalysis(itemModel)"
+                                  >人视分析
                                 </el-button>
                               </el-col>
                               <!-- <el-col :span="8">
@@ -628,8 +628,10 @@
                                 <el-button
                                   type="primary"
                                   size="mini"
-                                  @click.stop="RSAnalysis(itemModel)"
-                                  >人视分析
+                                  @click.stop="
+                                    BuildingStretchingAnalysis(itemModel)
+                                  "
+                                  >楼体拉伸
                                 </el-button>
                               </el-col>
                               <el-col :span="8">
@@ -637,10 +639,10 @@
                                   type="primary"
                                   size="mini"
                                   @click.stop="
-                                    BuildingStretchingAnalysis(itemModel)
+                                    openNightscapeAnalysis(itemModel)
                                   "
-                                  >楼体拉伸
-                                </el-button>
+                                  >夜景分析</el-button
+                                >
                               </el-col>
                             </el-row>
                             <el-row :gutter="24">

+ 4 - 4
src/views/ConstructionApplication3D/skylineAnalysis/TJXResult.vue

@@ -3,8 +3,8 @@
         <!-- <img :src="imageData.data" style="height: auto; width: auto;" />"> -->
         <el-button type="primary" @click="download">下载</el-button>
         <br>
-        <canvas id="mycan1" ref="mycan1" style="height: 100%;height: 100%;background-color: transparent;"></canvas>
-        <!-- <canvas id="mycan2" ref="mycan2" width="907" height="350" style="height: 100%;height: 100%;"></canvas> -->
+        <canvas id="mycan1" ref="mycan1" style="height: inherit;background-color: transparent;"></canvas>
+        <!-- <canvas id="mycan2" ref="mycan2" style="height: inherit;display: none;"></canvas> -->
 
     </div>
 </template>
@@ -31,8 +31,8 @@ export default {
 
             var skyRgb = that.imageData.rgb
             var canvas1 = that.$refs["mycan1"]
-
-            skylineExecute.drawCanvas(canvas1, that.imageData.data, viewW, viewH, skyRgb)
+            var canvas2 = that.$refs["mycan2"]
+            skylineExecute.drawCanvas(canvas1, canvas2, that.imageData.data, viewW, viewH, skyRgb)
         },
         download() {
             var canvas = this.$refs['mycan1']

+ 1 - 1
src/views/ConstructionApplication3D/skylineAnalysis/skylineAnalysis.vue

@@ -75,7 +75,7 @@ export default {
         0
       );
       drawHandler.activate()
-
+      facade.setBoundByPoints(null,null)
       drawHandler.drawEvt.addEventListener(function (result) {
         debugger
         startPoint = result.object.positions[0];

File diff suppressed because it is too large
+ 0 - 0
src/views/ConstructionApplication3D/skylineAnalysis/skylineExecute.js


Some files were not shown because too many files changed in this diff