瀏覽代碼

Merge branch 'master' of http://114.244.114.158:8802/siwei/real3d-portalsite

gushoubang 11 月之前
父節點
當前提交
ecd9f79766
共有 38 個文件被更改,包括 1473 次插入1206 次删除
  1. 8 0
      src/api/kfgx/gxzy.js
  2. 2 2
      src/api/zt/ztApi.js
  3. 7 6
      src/components/Combinations/LayerManage/LayerManageSplit.vue
  4. 13 25
      src/components/Query/clickQuery/MultiLevelQuery.vue
  5. 16 19
      src/components/Query/clickQuery/clickQuery.vue
  6. 178 65
      src/components/TerrainAnalysis/TerrainCutFillAnalysis/TerrainCutFillAnalysisNew.vue
  7. 13 2
      src/router/index.js
  8. 0 397
      src/views/ConstructionApplication3D/BenchmarkLandPriceAnalysis/BenchmarkLandPrice_old.js
  9. 124 41
      src/views/ConstructionApplication3D/Demolition/CQSetInfo.vue
  10. 21 4
      src/views/ConstructionApplication3D/Demolition/CQShowInfo.vue
  11. 3 5
      src/views/ConstructionApplication3D/Demolition/DemolitionList.vue
  12. 84 40
      src/views/ConstructionApplication3D/Demolition/QMSetInfo.vue
  13. 21 10
      src/views/ConstructionApplication3D/Demolition/QMShowInfo.vue
  14. 89 49
      src/views/ConstructionApplication3D/Demolition/ZDSetInfo.vue
  15. 45 26
      src/views/ConstructionApplication3D/Demolition/ZDShowInfo.vue
  16. 0 0
      src/views/ConstructionApplication3D/Demolition/zdAnalyse.min.js
  17. 12 1
      src/views/ConstructionApplication3D/billboard/addBiillboardModel.vue
  18. 45 1
      src/views/ConstructionApplication3D/billboard/billboardCheckList.vue
  19. 1 0
      src/views/ConstructionApplication3D/billboard/billboardChekInfo.vue
  20. 156 0
      src/views/ConstructionApplication3D/billboard/billboardChekResults.vue
  21. 358 353
      src/views/ConstructionApplication3D/billboard/billboardDesign.vue
  22. 9 0
      src/views/ConstructionApplication3D/projectInfo/addProjectInfo.vue
  23. 55 31
      src/views/ConstructionApplication3D/projectManagement/projectManagement.vue
  24. 4 4
      src/views/ConstructionApplication3D/skylineAnalysis/TJXResult.vue
  25. 1 1
      src/views/ConstructionApplication3D/skylineAnalysis/skylineAnalysis.vue
  26. 0 0
      src/views/ConstructionApplication3D/skylineAnalysis/skylineExecute.js
  27. 2 2
      src/views/LandscapeProject/index.vue
  28. 2 3
      src/views/ResourceShare/myApplication/components/addEdtModal.vue
  29. 10 10
      src/views/ResourceShare/myApplication/config.js
  30. 2 2
      src/views/cockpit/common/VectorSpace/BoxCommonVector.vue
  31. 10 14
      src/views/farmlandProtection/components/fxjg.vue
  32. 40 58
      src/views/farmlandProtection/components/fzjcyp.vue
  33. 2 3
      src/views/farmlandProtection/components/interDetails.vue
  34. 65 23
      src/views/farmlandProtection/components/zdyModelPop.vue
  35. 10 3
      src/views/farmlandProtection/index.vue
  36. 64 6
      src/views/shareResources/components/ServiceDetails.vue
  37. 1 0
      src/views/shareResources/index.vue
  38. 二進制
      static/images/map/texture.png

+ 8 - 0
src/api/kfgx/gxzy.js

@@ -0,0 +1,8 @@
+import request from '@/utils/request'
+export function GetByBsm(params) {
+    return request({
+        url: '/apply/yzt/zyml/GetByBsm',
+        method: 'get',
+        params
+    })
+}

+ 2 - 2
src/api/zt/ztApi.js

@@ -451,7 +451,7 @@ export function getZdBcbzList(query) {
 // 征地  补偿标准 getbyid
 export function getZdBcbzById(id) {
   return request({
-    url: "/model/zdbcbz/getInfo/" + id,
+    url: "/model/zdbcbz/" + id,
     method: "get",
   });
 }
@@ -521,7 +521,7 @@ export function delQmbcbz(id) {
 // 03 拆迁 补偿标准列表 list
 export function getCqBcbzList(query) {
   return request({
-    url: "/model/cqbczd/list",
+    url: "/model/cqbcbz/list",
     method: "get",
     params: query,
   });

+ 7 - 6
src/components/Combinations/LayerManage/LayerManageSplit.vue

@@ -96,7 +96,7 @@
                     : node.label
                 }}</span>
                 <span>
-                  <i class="el-icon-notebook-2" v-if="data.url != '' && $props.type == 'share'" @click="showDetail"></i>
+                  <i class="el-icon-notebook-2" v-if="data.url != '' && $props.type == 'share'" @click="showDetail(data)"></i>
                   <Icon
                     :type="!data.favorite ? 'ios-star-outline' : 'ios-star'"
                     color="green"
@@ -121,7 +121,7 @@
       >
         <div class="tckz">
           <List split size="large">
-            <ListItem v-for="(item, index) in addlayerdataCopy" :key="index">
+            <ListItem v-for="(item, index) in addlayerdata" :key="index">
               {{ item.title }}
               <div class="listBtn">
                 <i-switch
@@ -155,7 +155,7 @@
                   :title="Resource.MoveDownOneLevel"
                   @click="lower(item)"
                   v-if="
-                    index < addlayerdataCopy.length - 1 &&
+                    index < addlayerdata.length - 1 &&
                     (item.type == 'Vector' || item.type == 'IMG')
                   "
                 />
@@ -239,7 +239,7 @@ export default {
         endYears: "",
         treeSearchText: "",
       },
-      addlayerdataCopy:[],//用于双向绑定
+      addlayerdata:[],//用于双向绑定
       defaultProps: {
         children: "children",
         label: "label",
@@ -269,7 +269,8 @@ export default {
   },
 
   methods: {
-    showDetail(){
+    showDetail(data){
+      console.log(data,'woshidata');
       this.$emit("updateParent", "isShowService", true);
     },
     toggleVisibility() {
@@ -435,7 +436,7 @@ export default {
       immediate: true,
     },
     addlayerdata(val){
-      this.addlayerdataCopy = val
+      this.addlayerdata = val
     }
   },
 };

+ 13 - 25
src/components/Query/clickQuery/MultiLevelQuery.vue

@@ -47,7 +47,7 @@
         <pie
           class="echart"
           unit="平方米"
-          :ref="`echartRef`"
+          :ref="`echartRef${index}`"
           @echartClick="echartClick"
         ></pie>
 
@@ -495,41 +495,33 @@ export default {
           let res = await GetTabsPane(pane_obj);
 
           let filteredData =
-            index == 0
+            element.name == "规划地块"
               ? res.data.data[0].filter((res) => {
                   return res.filed != "geom";
                 })
               : [];
 
-          if (element.defaultType == "0") {
-            // store.state.query_pick_pane.push({
-            //     name: element.name,
-            //     value: res,
-            //     close: 'closable',
-            //     show: true
-            // });
+          if (element.defaultType == "0" || index == 0) {
             this.check_list_active.push(element.name);
-          } else {
           }
-
           store.state.query_pick_pane.push({
             name: element.name,
             value: res,
             filteredData,
             close: "closable",
-            show: element.defaultType == "0" ? true : false,
+            show: element.defaultType == "0" || index == 0,
           });
 
           this.check_list.push({
             label: element.name,
-            ckeck: element.defaultType == "0" ? true : false,
+            ckeck: element.defaultType == "0" || index == 0,
           });
         }
 
         // this.highlightResults(longitude, latitude);
         this.highlightResultsPng(longitude, latitude);
         this.activeName = store.state.query_pick_pane[0].name;
-        this.handleClick();
+        this.handleClick({});
         that.handler_multi_level_query.destroy();
         that.handler_multi_level_query = null;
       }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
@@ -571,6 +563,8 @@ export default {
       if (this.activeName == "权属") {
         this.qwnershipTabsFun();
       } else if (tabData) {
+        this.active_tabs_table = tabData.value.data.data;
+        this.rawData = tabData.value.data.data;
         tabData.value.data.datalist.forEach((res, ci) => {
           loadGeoJSON(
             res.geomvalue,
@@ -582,26 +576,21 @@ export default {
           );
         });
 
-        if (tab) {
-          let index = Number(tab.index) - 2;
+        if (this.activeName !== "规划地块") {
           let data = [];
-
-          this.active_tabs_table = tabData.value.data.data;
-          this.rawData = tabData.value.data.data;
           tabData.value.data.datalist.forEach((res) => {
             data.push({
               name: res.groupvalue,
               value: res.sumvalue,
             });
           });
-          this.setEchart(data, "vertical", index);
+          this.setEchart(data, "vertical", tab.index || 0);
         }
       }
     },
     handleClickQwnership(tab, event) {
-      let index = 0;
       this.reset();
-      this.qwnershipTabs.forEach((res) => {
+      this.qwnershipTabs.forEach((res, i) => {
         if (res.dataname == tab.name) {
           this.rawData_qwnership = res.data;
           let data = [];
@@ -619,8 +608,7 @@ export default {
               }
             );
           });
-          this.setEchart_qwnership(data, "vertical", index);
-          index++;
+          this.setEchart_qwnership(data, "vertical", 0);
         }
       });
     },
@@ -651,7 +639,7 @@ export default {
       this.$nextTick(() => {
         let max = 7;
         let legend_right = "4%";
-        this.$refs.echartRef[index].setOptions({
+        this.$refs[`echartRef${index}`][0].setOptions({
           data,
           type,
           max,

+ 16 - 19
src/components/Query/clickQuery/clickQuery.vue

@@ -309,8 +309,8 @@ export default {
           this.removeGeoJSON();
           loadGeoJSON(
             cur,
-            "#0000ff",
-            { isfly: true, fill_a: 0.001 },
+            "#ff0000",
+            { isfly: true, fill_a: 0.001, sw: 5 },
             (data) => (data.name = "geoserver")
           );
         } else {
@@ -329,7 +329,7 @@ export default {
         loadGeoJSON(
           geom,
           "#0000ff",
-          { fill_a: 0.001 },
+          { fill_a: 0.001, sw: 5 },
           (data) => (data.name = "geoserver")
         );
       });
@@ -634,23 +634,20 @@ export default {
     async getGeoserver(xy, obj) {
       this.queryResults[obj.id] = [];
       this.queryResultsGeom[obj.id] = [];
-      let url = obj.url.substring(0, obj.url.indexOf("geoserver") + 9) + "/wms";
+      let url = obj.url.substring(0, obj.url.indexOf("geoserver") + 9) + "/ows";
       let params = {
-        service: "WMS",
-        version: "1.1.1",
-        request: "GetFeatureInfo",
-        layers: `${obj.fwgzkj}:${obj.fwmc}`,
-        query_layers: `${obj.fwgzkj}:${obj.fwmc}`,
-        info_format: "application/json",
-        srs: "EPSG:4326",
-        x: 50,
-        y: 50,
-        width: 101,
-        height: 101,
-        bbox: bbox(xy, 10), // "12152284.626610054,2080930.4355590942,12153248.563804159,2081894.3727532008",
+        service: "WFS",
+        version: "1.0.0",
+        request: "GetFeature",
+        typeName: `${obj.fwgzkj}:${obj.fwmc}`,
+        outputFormat: "application/json",
+        srsName: "EPSG:4326",
+        filter: `<Filter xmlns='http://www.opengis.net/ogc' xmlns:gml='http://www.opengis.net/gml'><Intersects><PropertyName>geom</PropertyName><gml:Point srsName='EPSG:4326'><gml:coordinates>
+          ${xy.lng},${xy.lat}</gml:coordinates></gml:Point></Intersects></Filter>`,
       };
+      console.log("----", params);
       let res = await axios.get(url, { params });
-      if (res.data && res.data.features.length > 0) {
+      if (res.data && res.data.features && res.data.features.length > 0) {
         this.addLayerList(obj.title, obj);
         res.data.features.forEach((feitem) => {
           let cur = [];
@@ -878,7 +875,7 @@ export default {
         case 3: {
           this.removeMapLayerQuery(); //清除
           clearTranslate();
-          pick_cockpit_vector.clear_data(); //矢量拾取清除
+          // pick_cockpit_vector.clear_data(); //矢量拾取清除
           this.$refs.MultiLevelQuery.clear_data(); //多级查询
 
           this.remove_query_click();
@@ -887,7 +884,7 @@ export default {
         }
         case 4: {
           //驾驶舱矢量数据点选查询
-          pick_cockpit_vector.init_handler();
+          // pick_cockpit_vector.init_handler();
           break;
         }
         case 5: {

+ 178 - 65
src/components/TerrainAnalysis/TerrainCutFillAnalysis/TerrainCutFillAnalysisNew.vue

@@ -30,6 +30,19 @@
         <span> 最大:{{ cutData.max || 0 }}米 </span>
         <span> 平均:{{ cutData.avg || 0 }}米 </span>
       </el-form-item>
+      <el-form-item label="缓冲区获取高程" label-width="130px">
+        <el-input
+          v-model="form.buffer"
+          placeholder="修改缓冲区获取高程"
+          size="mini"
+          @change="getDsm()"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="点击获取高程" label-width="130px">
+        <el-button type="primary" size="mini" @click="clickPoint">
+          查询
+        </el-button>
+      </el-form-item>
       <el-form-item label="填挖基准:" v-if="radio == 'cut'" prop="height">
         <!-- readonly="readonly" -->
         <el-input
@@ -38,9 +51,6 @@
           size="mini"
         ></el-input>
       </el-form-item>
-      <el-form-item label="缓冲区:" prop="height">
-        <el-input v-model="form.buffer" placeholder="" size="mini"></el-input>
-      </el-form-item>
       <div class="sdatadiv">
         分析结果:
         <p v-for="(sitem, index) in sdata" :key="index">
@@ -65,16 +75,23 @@
         >导出结果</span
       >
     </div>
-    <el-descriptions border size="mini" :column="2">
-      <el-descriptions-item v-for="item in sdh" :key="item" :label="item.scS"
-        ><div
-          style="width: 4.5rem; height: 100%"
-          :style="{ 'background-color': item.fill }"
-        >
-          &nbsp;
-        </div>
-      </el-descriptions-item>
-    </el-descriptions>
+    <div class="lend">
+      <el-checkbox
+        v-model="checked"
+        @change="changelen"
+        title="显示图例"
+      ></el-checkbox>
+      <el-descriptions border size="mini" :column="2">
+        <el-descriptions-item v-for="item in sdh" :key="item" :label="item.scS"
+          ><div
+            style="width: 4.5rem; height: 100%"
+            :style="{ 'background-color': item.fill }"
+          >
+            &nbsp;
+          </div>
+        </el-descriptions-item>
+      </el-descriptions>
+    </div>
   </div>
 </template>
 
@@ -82,22 +99,25 @@
 import { getDsm, cutFill } from "@/api/analse";
 import * as turf from "@turf/turf";
 import parse from "wellknown";
-import { listToMatrix, loadGeoJSON, download } from "@/utils/MapHelper/help.js";
+import { loadGeoJSON, download, pickPoint } from "@/utils/MapHelper/help.js";
 import range from "@/components/mapview/range.vue"; ///mapview/range
+let dataSource = {};
 export default {
   name: "TerrainCutFillAnalysis",
   components: { range },
   data() {
     return {
       radio: "cut",
+      // dsmtype: "",
       sharedState: store.state,
       loading: false,
       form: {
         height: "",
-        buffer: 5,
+        buffer: "",
         geom: "",
       },
       cutData: {},
+      checked: true,
       // 石方量
       sdata: [
         { name: "填土体积:", prop: "fillVolume", unit: "立方米" },
@@ -123,6 +143,12 @@ export default {
   watch: {},
   //方法集合
   methods: {
+    clickPoint() {
+      pickPoint(true, (lon, lat, height) => {
+        this.form.height = height.toFixed(2);
+        this.form.buffer = "";
+      });
+    },
     reset() {
       this.cutData = {};
       this.form = {
@@ -133,6 +159,9 @@ export default {
       this.$refs.range.reset();
       viewer.entities.removeAll();
       viewer.dataSources.removeAll();
+      viewer.scene.globe.removeAllModifyRegion();
+      // viewer.scene.globe.removeAllExtractRegion();
+      // viewer.scene.globe.removeAllExcavationRegion();
     },
     submitData() {
       var _temp = this.$refs.range.getRange();
@@ -143,41 +172,144 @@ export default {
       this.form.geom = _temp.geom;
       this.cutFill();
     },
+    flatten(coordinates) {
+      if (coordinates.length === 0) {
+        return [];
+      }
+      let result = [];
+      coordinates.forEach((c) => {
+        if (Array.isArray(c[0])) {
+          result = result.concat(this.flatten(c));
+        } else {
+          result.push(c[0]);
+          result.push(c[1]);
+          result.push(Number(this.cutData.midHeight));
+        }
+      });
+      return result;
+    },
+    // geojson 转一维数组
+    geojsonToFlatArray(geojson) {
+      if (geojson.type === "MultiLineString" || geojson.type === "Polygon") {
+        return this.flatten(geojson.coordinates[0]);
+      }
+      if (geojson.type === "MultiPolygon") {
+        return this.flatten(geojson.coordinates[0]);
+        // return this.flatten(geojson.coordinates.map((polygon) => polygon[0]));
+      }
+    },
     clear() {
       common.clearHandlerDrawing("Polygon");
     },
 
     async getDsm(geom) {
-      let res = await getDsm({ geom, type: "all" });
+      if (geom) this.form.geom = geom;
+      if (!this.form.geom) {
+        this.$message.warning("请绘制或导入分析范围!");
+        return;
+      }
+      let res = await getDsm({
+        geom: this.form.geom,
+        type: "all",
+        buffer: this.form.buffer,
+      });
+      if (!res.data)
+        this.$message.error("抱歉!不在分析范围内,请在抱坡区进行分析");
       this.cutData = {
         min: res.data.min.toFixed(2),
         max: res.data.max.toFixed(2),
         avg: res.data.avg.toFixed(2),
       };
+      this.form.height = res.data.avg.toFixed(2);
     },
     async cutFill() {
       this.loading = true;
-      let res = await cutFill(this.form);
+      viewer.entities.removeAll();
+      viewer.dataSources.removeAll();
+      viewer.scene.globe.removeAllModifyRegion();
+      let res = await cutFill({ ...this.form, buffer: undefined });
       this.loading = false;
       if (res.success) {
         this.$refs.range.reset();
-        if (!res.data) this.$message.error("抱歉!不在分析范围内");
+        if (!res.data)
+          this.$message.error("抱歉!不在分析范围内,请在抱坡区进行分析");
         // this.cutData = { ...this.cutData, ...res.data };
         Object.keys(res.data).forEach((key) => {
           if (typeof res.data[key] == "number")
             this.cutData[key] = res.data[key].toFixed(2);
         });
-        this.cutData.cz = this.cutData.cutVolume - this.cutData.fillVolume;
+        this.cutData.cz = Number(
+          this.cutData.cutVolume - this.cutData.fillVolume
+        ).toFixed(2);
 
         // let pitch = Cesium.Math.toRadians(-45.0);
-        let params = { sw: 0.001, fill_a: 0.8 };
+        let params = { sw: 0.001, fill_a: 0.2 };
         // let fn = (data) => {  data.name = "cut_fill" };
-        viewer.entities.removeAll();
-        viewer.dataSources.removeAll();
-        loadGeoJSON(res.data.bottomGeom, "#1E90A8", params);
-        loadGeoJSON(res.data.midGeom, "#ff0000", params);
+
+        loadGeoJSON(res.data.bottomGeomBuffer, "#916E54", {}, (data) => {
+          data.entities.values.forEach((entity, ei) => {
+            if (entity.polygon) {
+              // entity.polygon.perPositionHeight = true;
+              entity.polygon.material = new Cesium.ImageMaterialProperty({
+                image: "./static/images/map/texture.png",
+                transparent: true,
+              });
+            }
+          });
+        });
+        loadGeoJSON(res.data.bottomGeom, "#1E90A8", params, (data) => {
+          dataSource.bottom = data;
+          dataSource.bottom.show = this.checked;
+        });
+        loadGeoJSON(res.data.midGeom, "#ff0000", params, (data) => {
+          dataSource.mid = data;
+          dataSource.mid.show = this.checked;
+        });
+        let threeArray = this.geojsonToFlatArray(parse(this.form.geom));
+        // this.cutana(threeArray);
+        this.smooth(threeArray);
+        // let bthree = this.geojsonToFlatArray(parse(res.data.bottomGeom));
+        // let mthree = this.geojsonToFlatArray(parse(res.data.midGeom));
+        // console.log(parse(res.data.bottomGeom), bthree, "--");
+        // this.extract(bthree);
+        // console.log(parse(res.data.midGeom), mthree, "--");
+        // this.cutana(mthree);
       }
     },
+    changelen() {
+      if (dataSource.bottom) dataSource.bottom.show = this.checked;
+      if (dataSource.mid) dataSource.mid.show = this.checked;
+    },
+    //地形抽出部分
+    extract(positions) {
+      viewer.scene.globe.removeAllExtractRegion();
+      viewer.scene.globe.addExtractRegion({
+        name: "extract", //名称
+        position: positions, //区域
+        height: this.cutData.midHeight, //开挖深度
+        transparent: false, //封边是否透明
+        extractHeight: Number(this.cutData.midHeight), //抽出高度
+        granularity: 1, //精度
+      });
+    },
+    cutana(positions) {
+      console.log(positions, "----");
+      viewer.scene.globe.removeAllExcavationRegion();
+      viewer.scene.globe.addExcavationRegion({
+        name: "ggg",
+        position: positions,
+        height: Number(this.cutData.midHeight),
+        transparent: false,
+      });
+    },
+    //地形抽出部分
+    smooth(positions) {
+      viewer.scene.globe.removeAllModifyRegion();
+      viewer.scene.globe.addModifyRegion({
+        name: "ggg",
+        position: positions,
+      });
+    },
     ExportResult() {
       var legends = [];
       // legends.push({ name: "最小高程", value: this.cutData.min, unit: "米" });
@@ -194,47 +326,6 @@ export default {
         download(base64data, legends);
       });
     },
-    /**
-     * 根据图片生成画布
-     */
-
-    // 绘制图例
-    drawLegends(canvas, ctx) {
-      var padding = 10; // 图例与边缘的间距
-      var lineHeight = 30; // 每行图例的高度
-      var labW = 200;
-      var x = canvas.width - padding - labW; // 图例的起始X坐标
-      var y = canvas.height - legends.length * lineHeight - padding; // 图例的起始Y坐标
-      // 绘制颜色块
-      ctx.fillStyle = "#ffffff";
-      ctx.fillRect(
-        x - padding,
-        y - padding,
-        canvas.width - x + padding,
-        canvas.height - y + padding
-      );
-      legends.forEach(function (legend, index) {
-        // 绘制文本
-        if (legend.scS) {
-          ctx.fillStyle = "black";
-          ctx.fillText(legend.scS, x, y + index * lineHeight + lineHeight / 2);
-          // 绘制颜色块
-          ctx.fillStyle = legend.fill;
-          ctx.fillRect(
-            x + (labW / 3) * 2,
-            y + index * lineHeight,
-            30,
-            lineHeight
-          );
-        } else {
-          ctx.fillStyle = "black";
-          let text = `${legend.name}:${_this.cutData[legend.prop]}${
-            legend.unit
-          }`;
-          ctx.fillText(text, x, y + index * lineHeight + lineHeight / 2);
-        }
-      });
-    },
   },
 };
 </script>
@@ -245,6 +336,7 @@ export default {
   padding: 20px;
   box-sizing: border-box;
   position: relative;
+  text-align: left;
   .ruleForm {
     width: 100%;
     height: calc(100% - 120px);
@@ -261,6 +353,19 @@ export default {
     text-align: left;
     line-height: 40px;
   }
+  .iwidth {
+    width: calc(100% - 120px);
+    margin-left: 20px;
+  }
+  /deep/ .el-button--mini {
+    background: #0f7ac8;
+    border: none;
+    border-radius: 0;
+    color: #fff;
+    width: 60px;
+    height: 26px;
+    font-size: 14px;
+  }
   .ptitle {
     width: 100px;
     color: #cddeeb;
@@ -308,12 +413,20 @@ export default {
     }
   }
 }
+.lend {
+  display: flex;
+  .el-checkbox {
+    margin-top: 20px;
+  }
+}
 </style>
 <style lang="scss">
 .cut_fill_box {
   .el-descriptions {
     color: #fff;
     margin-top: 20px;
+    margin-left: 20px;
+    width: calc(100% - 20px);
     // position: absolute;
     // bottom: 20px;
   }

+ 13 - 2
src/router/index.js

@@ -1,7 +1,7 @@
 import Vue from 'vue'
 import Router from 'vue-router'
 import { hidden_xzqh, hidden_wall } from "@/common/js/cockpit.js";
-
+import { setToken } from '@/utils/auth'
 Vue.use(Router)
 
 
@@ -152,6 +152,17 @@ const router = new Router({
     scrollBehavior: () => ({ y: 0 }),
     routes: constantRoutes
 })
-
+router.beforeEach(async (to, from, next) => {
+    // document.title = getPageTitle(to.meta.title)
+    var hrefs = to.path//window.location.href 
+    let hrefIdx = hrefs.indexOf('token=');
+    let token = hrefs.substring(hrefIdx + 10, hrefs.length);
+    if (hrefIdx > -1) {
+        setToken(token)
+        next('/siteselection');
+    } else {
+        next()
+    }
+})
 
 export default router;

+ 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


+ 12 - 1
src/views/ConstructionApplication3D/billboard/addBiillboardModel.vue

@@ -577,7 +577,7 @@ export default {
         templateCentre: {},
         templateBottom: {},
       },
-      options: window.billboardReviewList,
+      options: window.billboardReviewList.filter((c) => c.id != "wew1"),
       /**
        * 编辑句柄
        */
@@ -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>

+ 358 - 353
src/views/ConstructionApplication3D/billboard/billboardDesign.vue

@@ -229,16 +229,17 @@ export default {
      * @param Mitem 模型实体
      */
     locationSingleModel(Mitem) {
-      let entitie = viewer.entities.getById("pointBillboard_" + Mitem.id);
-      if (entitie) {
-        viewer.flyTo(entitie);
-      } else {
-        //渲染单个广告牌
-        // if (billboardModel.id == Mitem.id) {
-        this.DrawBillboard(Mitem);
-        let entitie = viewer.entities.getById("pointBillboard_" + Mitem.id);
-        viewer.flyTo(entitie);
-        // }
+      if (Mitem.isAddModel) {
+        let entitie = viewer.entities.getById("point_Billboard_" + Mitem.id);
+        if (!entitie) {
+          //渲染单个广告牌
+          // if (billboardModel.id == Mitem.id) {
+          this.DrawBillboard(Mitem);
+          // viewer.flyTo(entitie);
+          // }
+        }
+
+        viewer.camera.setView(JSON.parse(Mitem.viewing_angle));
       }
     },
     /**
@@ -400,376 +401,378 @@ export default {
      * 绘制广告牌
      */
     DrawBillboard(billboardModel) {
-      if (billboardModel.template) {
-        if (typeof billboardModel.template === "string") {
-          billboardModel.template = JSON.parse(billboardModel.template);
+      if (billboardModel.isAddModel) {
+        if (billboardModel.template) {
+          if (typeof billboardModel.template === "string") {
+            billboardModel.template = JSON.parse(billboardModel.template);
+          }
+        } else {
+          billboardModel.template = {};
         }
-      } else {
-        billboardModel.template = {};
-      }
 
-      if (billboardModel.templateBottom) {
-        if (typeof billboardModel.templateBottom === "string") {
-          billboardModel.templateBottom = JSON.parse(
-            billboardModel.templateBottom
-          );
+        if (billboardModel.templateBottom) {
+          if (typeof billboardModel.templateBottom === "string") {
+            billboardModel.templateBottom = JSON.parse(
+              billboardModel.templateBottom
+            );
+          }
+        } else {
+          billboardModel.templateBottom = {};
         }
-      } else {
-        billboardModel.templateBottom = {};
-      }
-      if (billboardModel.templateCentre) {
-        if (typeof billboardModel.templateCentre === "string") {
-          billboardModel.templateCentre = JSON.parse(
-            billboardModel.templateCentre
-          );
+        if (billboardModel.templateCentre) {
+          if (typeof billboardModel.templateCentre === "string") {
+            billboardModel.templateCentre = JSON.parse(
+              billboardModel.templateCentre
+            );
+          }
+        } else {
+          billboardModel.templateCentre = {};
         }
-      } else {
-        billboardModel.templateCentre = {};
-      }
-      if (billboardModel.templateTop) {
-        if (typeof billboardModel.templateTop === "string") {
-          billboardModel.templateTop = JSON.parse(billboardModel.templateTop);
+        if (billboardModel.templateTop) {
+          if (typeof billboardModel.templateTop === "string") {
+            billboardModel.templateTop = JSON.parse(billboardModel.templateTop);
+          }
+        } else {
+          billboardModel.templateTop = {};
         }
-      } else {
-        billboardModel.templateTop = {};
-      }
 
-      debugger;
-      var newposition = Cesium.Cartesian3.fromDegrees(
-        billboardModel.x,
-        billboardModel.y,
-        billboardModel.z
-      );
+        debugger;
+        var newposition = Cesium.Cartesian3.fromDegrees(
+          billboardModel.x,
+          billboardModel.y,
+          billboardModel.z
+        );
 
-      if (billboardModel.template) {
-        var imageurl = "../../../../static/ModelData/billboard/1.jpg";
-        var modelurl = "../../../../static/ModelData/billboard/box.gltf";
-        switch (billboardModel.template.ModelType) {
-          //矩形广告
-          case "rectangleBillboard":
-            var orientation = Cesium.Transforms.headingPitchRollQuaternion(
-              newposition,
-              new Cesium.HeadingPitchRoll(
-                Cesium.Math.toRadians(billboardModel.rotateZ),
-                Cesium.Math.toRadians(billboardModel.rotateY),
-                Cesium.Math.toRadians(billboardModel.rotateX)
-              )
-            );
-            //计算当前实体的xyz
-            var p = Cesium.Cartesian3.fromDegrees(
-              Number(billboardModel.templateTop.x),
-              Number(billboardModel.templateTop.y),
-              Number(billboardModel.templateTop.z)
-            );
-            var topentity = viewer.entities.add({
-              id: "top_billboard_" + billboardModel.id,
-              name: "gltf",
-              show: true,
-              position: p,
-              /**
-               * 长方体
-               */
-              box: {
-                dimensions: new Cesium.Cartesian3(
-                  Number(billboardModel.templateTop.xL),
-                  Number(billboardModel.templateTop.zL),
-                  Number(billboardModel.templateTop.yL)
-                ),
+        if (billboardModel.template) {
+          var imageurl = "../../../../static/ModelData/billboard/1.jpg";
+          var modelurl = "../../../../static/ModelData/billboard/box.gltf";
+          switch (billboardModel.template.ModelType) {
+            //矩形广告
+            case "rectangleBillboard":
+              var orientation = Cesium.Transforms.headingPitchRollQuaternion(
+                newposition,
+                new Cesium.HeadingPitchRoll(
+                  Cesium.Math.toRadians(billboardModel.rotateZ),
+                  Cesium.Math.toRadians(billboardModel.rotateY),
+                  Cesium.Math.toRadians(billboardModel.rotateX)
+                )
+              );
+              //计算当前实体的xyz
+              var p = Cesium.Cartesian3.fromDegrees(
+                Number(billboardModel.templateTop.x),
+                Number(billboardModel.templateTop.y),
+                Number(billboardModel.templateTop.z)
+              );
+              var topentity = viewer.entities.add({
+                id: "top_billboard_" + billboardModel.id,
+                name: "gltf",
                 show: true,
-                material: Cesium.Color.LIGHTGREEN,
-              },
-              orientation: orientation,
-            });
-            entityList.push(topentity);
+                position: p,
+                /**
+                 * 长方体
+                 */
+                box: {
+                  dimensions: new Cesium.Cartesian3(
+                    Number(billboardModel.templateTop.xL),
+                    Number(billboardModel.templateTop.zL),
+                    Number(billboardModel.templateTop.yL)
+                  ),
+                  show: true,
+                  material: Cesium.Color.LIGHTGREEN,
+                },
+                orientation: orientation,
+              });
+              entityList.push(topentity);
 
-            break;
-          // 立杆型广告
-          case "postsBillboard":
-            var orientation = Cesium.Transforms.headingPitchRollQuaternion(
-              newposition,
-              new Cesium.HeadingPitchRoll(
-                Cesium.Math.toRadians(billboardModel.rotateZ),
-                Cesium.Math.toRadians(billboardModel.rotateY),
-                Cesium.Math.toRadians(billboardModel.rotateX)
-              )
-            );
-            var c_p = Cesium.Cartesian3.fromDegrees(
-              billboardModel.templateCentre.x,
-              billboardModel.templateCentre.y,
-              billboardModel.templateCentre.z
-            );
-            var Centreentity = viewer.entities.add({
-              id: "Centre_billboard_" + billboardModel.id,
-              name: "gltf",
-              show: true,
-              position: c_p,
-              /**
-               * 圆柱
-               */
-              cylinder: {
-                length: billboardModel.templateCentre.yL, //圆柱体长度
-                topRadius: billboardModel.templateCentre.rL, //圆柱顶部半径
-                bottomRadius: billboardModel.templateCentre.rL, //圆柱体底部半径
-                material: Cesium.Color.LIGHTGREEN,
-                shadows: Cesium.ShadowMode.DISABLED, //指定圆柱体是否从每个光源投射或接收阴影
-              },
-              orientation: Cesium.Transforms.headingPitchRollQuaternion(
+              break;
+            // 立杆型广告
+            case "postsBillboard":
+              var orientation = Cesium.Transforms.headingPitchRollQuaternion(
                 newposition,
                 new Cesium.HeadingPitchRoll(
                   Cesium.Math.toRadians(billboardModel.rotateZ),
-                  Cesium.Math.toRadians(0),
-                  Cesium.Math.toRadians(0)
+                  Cesium.Math.toRadians(billboardModel.rotateY),
+                  Cesium.Math.toRadians(billboardModel.rotateX)
                 )
-              ),
-            });
-            entityList.push(Centreentity);
+              );
+              var c_p = Cesium.Cartesian3.fromDegrees(
+                billboardModel.templateCentre.x,
+                billboardModel.templateCentre.y,
+                billboardModel.templateCentre.z
+              );
+              var Centreentity = viewer.entities.add({
+                id: "Centre_billboard_" + billboardModel.id,
+                name: "gltf",
+                show: true,
+                position: c_p,
+                /**
+                 * 圆柱
+                 */
+                cylinder: {
+                  length: billboardModel.templateCentre.yL, //圆柱体长度
+                  topRadius: billboardModel.templateCentre.rL, //圆柱顶部半径
+                  bottomRadius: billboardModel.templateCentre.rL, //圆柱体底部半径
+                  material: Cesium.Color.LIGHTGREEN,
+                  shadows: Cesium.ShadowMode.DISABLED, //指定圆柱体是否从每个光源投射或接收阴影
+                },
+                orientation: Cesium.Transforms.headingPitchRollQuaternion(
+                  newposition,
+                  new Cesium.HeadingPitchRoll(
+                    Cesium.Math.toRadians(billboardModel.rotateZ),
+                    Cesium.Math.toRadians(0),
+                    Cesium.Math.toRadians(0)
+                  )
+                ),
+              });
+              entityList.push(Centreentity);
 
-            //计算当前实体的xyz
+              //计算当前实体的xyz
 
-            var t_p = Cesium.Cartesian3.fromDegrees(
-              Number(billboardModel.templateTop.x),
-              Number(billboardModel.templateTop.y),
-              Number(billboardModel.templateTop.z)
-            );
-            var topentity = viewer.entities.add({
-              id: "top_billboard_" + billboardModel.id,
-              name: "gltf",
-              show: true,
-              position: t_p,
-              /**
-               * 矩形
-               */
-              box: {
-                dimensions: new Cesium.Cartesian3(
-                  Number(billboardModel.templateTop.xL),
-                  Number(billboardModel.templateTop.zL),
-                  Number(billboardModel.templateTop.yL)
+              var t_p = Cesium.Cartesian3.fromDegrees(
+                Number(billboardModel.templateTop.x),
+                Number(billboardModel.templateTop.y),
+                Number(billboardModel.templateTop.z)
+              );
+              var topentity = viewer.entities.add({
+                id: "top_billboard_" + billboardModel.id,
+                name: "gltf",
+                show: true,
+                position: t_p,
+                /**
+                 * 矩形
+                 */
+                box: {
+                  dimensions: new Cesium.Cartesian3(
+                    Number(billboardModel.templateTop.xL),
+                    Number(billboardModel.templateTop.zL),
+                    Number(billboardModel.templateTop.yL)
+                  ),
+                  material: Cesium.Color.LIGHTGREEN,
+                  // outline: false,
+                  // outlineColor: Cesium.Color.SPRINGGREEN,
+                  // outlineWidth: 1,
+                },
+                orientation: orientation,
+              });
+              entityList.push(topentity);
+
+              break;
+            //底座型立杆广告
+            case "ColumnWithaseBillboard":
+              var orientation = Cesium.Transforms.headingPitchRollQuaternion(
+                newposition,
+                new Cesium.HeadingPitchRoll(
+                  Cesium.Math.toRadians(billboardModel.rotateZ),
+                  Cesium.Math.toRadians(billboardModel.rotateY),
+                  Cesium.Math.toRadians(billboardModel.rotateX)
+                )
+              );
+              var b_p = Cesium.Cartesian3.fromDegrees(
+                billboardModel.templateBottom.x,
+                billboardModel.templateBottom.y,
+                billboardModel.templateBottom.z
+              );
+              var bottomentity = viewer.entities.add({
+                id: "bottom_billboard_" + billboardModel.id,
+                name: "gltf",
+                show: true,
+                position: b_p,
+                /**
+                 * 矩形
+                 */
+                box: {
+                  dimensions: new Cesium.Cartesian3(
+                    billboardModel.templateBottom.xL,
+                    billboardModel.templateBottom.zL,
+                    billboardModel.templateBottom.yL
+                  ),
+                  material: Cesium.Color.LIGHTGREEN,
+                  // outline: false,
+                  // outlineColor: Cesium.Color.SPRINGGREEN,
+                  // outlineWidth: 1,
+                },
+                orientation: Cesium.Transforms.headingPitchRollQuaternion(
+                  newposition,
+                  new Cesium.HeadingPitchRoll(
+                    Cesium.Math.toRadians(billboardModel.rotateZ),
+                    Cesium.Math.toRadians(0),
+                    Cesium.Math.toRadians(0)
+                  )
                 ),
-                material: Cesium.Color.LIGHTGREEN,
-                // outline: false,
-                // outlineColor: Cesium.Color.SPRINGGREEN,
-                // outlineWidth: 1,
-              },
-              orientation: orientation,
-            });
-            entityList.push(topentity);
+              });
+              entityList.push(bottomentity);
 
-            break;
-          //底座型立杆广告
-          case "ColumnWithaseBillboard":
-            var orientation = Cesium.Transforms.headingPitchRollQuaternion(
-              newposition,
-              new Cesium.HeadingPitchRoll(
-                Cesium.Math.toRadians(billboardModel.rotateZ),
-                Cesium.Math.toRadians(billboardModel.rotateY),
-                Cesium.Math.toRadians(billboardModel.rotateX)
-              )
-            );
-            var b_p = Cesium.Cartesian3.fromDegrees(
-              billboardModel.templateBottom.x,
-              billboardModel.templateBottom.y,
-              billboardModel.templateBottom.z
-            );
-            var bottomentity = viewer.entities.add({
-              id: "bottom_billboard_" + billboardModel.id,
-              name: "gltf",
-              show: true,
-              position: b_p,
-              /**
-               * 矩形
-               */
-              box: {
-                dimensions: new Cesium.Cartesian3(
-                  billboardModel.templateBottom.xL,
-                  billboardModel.templateBottom.zL,
-                  billboardModel.templateBottom.yL
+              var c_p = Cesium.Cartesian3.fromDegrees(
+                billboardModel.templateCentre.x,
+                billboardModel.templateCentre.y,
+                billboardModel.templateCentre.z
+              );
+              var Centreentity = viewer.entities.add({
+                id: "Centre_billboard_" + billboardModel.id,
+                name: "gltf",
+                show: true,
+                position: c_p,
+                /**
+                 * 圆柱
+                 */
+                cylinder: {
+                  length: billboardModel.templateCentre.yL, //圆柱体长度
+                  topRadius: billboardModel.templateCentre.rL, //圆柱顶部半径
+                  bottomRadius: billboardModel.templateCentre.rL, //圆柱体底部半径
+                  material: Cesium.Color.LIGHTGREEN,
+                  shadows: Cesium.ShadowMode.DISABLED, //指定圆柱体是否从每个光源投射或接收阴影
+                },
+                orientation: Cesium.Transforms.headingPitchRollQuaternion(
+                  newposition,
+                  new Cesium.HeadingPitchRoll(
+                    Cesium.Math.toRadians(billboardModel.rotateZ),
+                    Cesium.Math.toRadians(0),
+                    Cesium.Math.toRadians(0)
+                  )
                 ),
-                material: Cesium.Color.LIGHTGREEN,
-                // outline: false,
-                // outlineColor: Cesium.Color.SPRINGGREEN,
-                // outlineWidth: 1,
-              },
-              orientation: Cesium.Transforms.headingPitchRollQuaternion(
+              });
+              entityList.push(Centreentity);
+
+              var t_p = Cesium.Cartesian3.fromDegrees(
+                Number(billboardModel.templateTop.x),
+                Number(billboardModel.templateTop.y),
+                Number(billboardModel.templateTop.z)
+              );
+
+              var topentity = viewer.entities.add({
+                id: "top_billboard_" + billboardModel.id,
+                name: "gltf",
+                show: true,
+                position: t_p,
+                /**
+                 * 矩形
+                 */
+                box: {
+                  dimensions: new Cesium.Cartesian3(
+                    Number(billboardModel.templateTop.xL),
+                    Number(billboardModel.templateTop.zL),
+                    Number(billboardModel.templateTop.yL)
+                  ),
+                  material: Cesium.Color.LIGHTGREEN,
+                  // outline: false,
+                  // outlineColor: Cesium.Color.SPRINGGREEN,
+                  // outlineWidth: 1,
+                },
+                orientation: orientation,
+              });
+              entityList.push(topentity);
+
+              break;
+            //实物型广告(模型型)
+            case "ModelBillboard":
+              var orientation = Cesium.Transforms.headingPitchRollQuaternion(
                 newposition,
                 new Cesium.HeadingPitchRoll(
                   Cesium.Math.toRadians(billboardModel.rotateZ),
-                  Cesium.Math.toRadians(0),
-                  Cesium.Math.toRadians(0)
+                  Cesium.Math.toRadians(billboardModel.rotateY),
+                  Cesium.Math.toRadians(billboardModel.rotateX)
                 )
-              ),
-            });
-            entityList.push(bottomentity);
-
-            var c_p = Cesium.Cartesian3.fromDegrees(
-              billboardModel.templateCentre.x,
-              billboardModel.templateCentre.y,
-              billboardModel.templateCentre.z
-            );
-            var Centreentity = viewer.entities.add({
-              id: "Centre_billboard_" + billboardModel.id,
-              name: "gltf",
-              show: true,
-              position: c_p,
-              /**
-               * 圆柱
-               */
-              cylinder: {
-                length: billboardModel.templateCentre.yL, //圆柱体长度
-                topRadius: billboardModel.templateCentre.rL, //圆柱顶部半径
-                bottomRadius: billboardModel.templateCentre.rL, //圆柱体底部半径
-                material: Cesium.Color.LIGHTGREEN,
-                shadows: Cesium.ShadowMode.DISABLED, //指定圆柱体是否从每个光源投射或接收阴影
-              },
-              orientation: Cesium.Transforms.headingPitchRollQuaternion(
+              );
+              var p = Cesium.Cartesian3.fromDegrees(
+                Number(billboardModel.templateTop.x),
+                Number(billboardModel.templateTop.y),
+                Number(billboardModel.templateTop.z)
+              );
+              var url = billboardModel.template.templateTopUrl || modelurl;
+              var entity = viewer.entities.add({
+                id: "top_billboard_" + billboardModel.id,
+                name: "gltf",
+                show: true,
+                position: p,
+                /**
+                 * 模型
+                 */
+                model: {
+                  uri: url,
+                  scale: billboardModel.templateTop.scaleL,
+                },
+                orientation: orientation,
+              });
+              entityList.push(entity);
+              break;
+            //图片型广告
+            case "imgBillboard":
+              var orientation = Cesium.Transforms.headingPitchRollQuaternion(
                 newposition,
                 new Cesium.HeadingPitchRoll(
                   Cesium.Math.toRadians(billboardModel.rotateZ),
-                  Cesium.Math.toRadians(0),
-                  Cesium.Math.toRadians(0)
+                  Cesium.Math.toRadians(billboardModel.rotateY),
+                  Cesium.Math.toRadians(billboardModel.rotateX)
                 )
-              ),
-            });
-            entityList.push(Centreentity);
-
-            var t_p = Cesium.Cartesian3.fromDegrees(
-              Number(billboardModel.templateTop.x),
-              Number(billboardModel.templateTop.y),
-              Number(billboardModel.templateTop.z)
-            );
-
-            var topentity = viewer.entities.add({
-              id: "top_billboard_" + billboardModel.id,
-              name: "gltf",
-              show: true,
-              position: t_p,
-              /**
-               * 矩形
-               */
-              box: {
-                dimensions: new Cesium.Cartesian3(
-                  Number(billboardModel.templateTop.xL),
-                  Number(billboardModel.templateTop.zL),
-                  Number(billboardModel.templateTop.yL)
-                ),
-                material: Cesium.Color.LIGHTGREEN,
-                // outline: false,
-                // outlineColor: Cesium.Color.SPRINGGREEN,
-                // outlineWidth: 1,
-              },
-              orientation: orientation,
-            });
-            entityList.push(topentity);
+              );
+              var p = Cesium.Cartesian3.fromDegrees(
+                Number(billboardModel.templateTop.x),
+                Number(billboardModel.templateTop.y),
+                Number(billboardModel.templateTop.z)
+              );
+              var url = billboardModel.template.templateTopUrl || imageurl;
+              var entity = viewer.entities.add({
+                id: "top_billboard_" + billboardModel.id,
+                name: "gltf",
+                show: true,
+                position: p,
+                /**
+                 * 广告牌
+                 */
+                billboard: {
+                  image: url,
+                  width: Number(billboardModel.templateTop.xL),
+                  height: Number(billboardModel.templateTop.yL),
+                  rotation: Number(billboardModel.rotateX),
+                  sizeInMeters: true,
+                },
+                orientation: orientation,
+              });
+              entityList.push(entity);
+              break;
+          }
 
-            break;
-          //实物型广告(模型型)
-          case "ModelBillboard":
-            var orientation = Cesium.Transforms.headingPitchRollQuaternion(
-              newposition,
-              new Cesium.HeadingPitchRoll(
-                Cesium.Math.toRadians(billboardModel.rotateZ),
-                Cesium.Math.toRadians(billboardModel.rotateY),
-                Cesium.Math.toRadians(billboardModel.rotateX)
-              )
-            );
-            var p = Cesium.Cartesian3.fromDegrees(
-              Number(billboardModel.templateTop.x),
-              Number(billboardModel.templateTop.y),
-              Number(billboardModel.templateTop.z)
-            );
-            var url = billboardModel.template.templateTopUrl || modelurl;
-            var entity = viewer.entities.add({
-              id: "top_billboard_" + billboardModel.id,
-              name: "gltf",
-              show: true,
-              position: p,
-              /**
-               * 模型
-               */
-              model: {
-                uri: url,
-                scale: billboardModel.templateTop.scaleL,
-              },
-              orientation: orientation,
-            });
-            entityList.push(entity);
-            break;
-          //图片型广告
-          case "imgBillboard":
-            var orientation = Cesium.Transforms.headingPitchRollQuaternion(
-              newposition,
-              new Cesium.HeadingPitchRoll(
-                Cesium.Math.toRadians(billboardModel.rotateZ),
-                Cesium.Math.toRadians(billboardModel.rotateY),
-                Cesium.Math.toRadians(billboardModel.rotateX)
-              )
-            );
-            var p = Cesium.Cartesian3.fromDegrees(
+          var h = 0;
+          if (billboardModel.templateTop.yL) {
+            h = Number(billboardModel.templateTop.yL) / 2;
+          }
+          viewer.entities.removeById("point_Billboard_" + billboardModel.id);
+          lodash.remove(
+            entityList,
+            (entity) => entity.id === "point_Billboard_" + billboardModel.id
+          );
+          const point = viewer.entities.add({
+            id: "point_Billboard_" + billboardModel.id,
+            //点
+            position: Cesium.Cartesian3.fromDegrees(
               Number(billboardModel.templateTop.x),
               Number(billboardModel.templateTop.y),
-              Number(billboardModel.templateTop.z)
-            );
-            var url = billboardModel.template.templateTopUrl || imageurl;
-            var entity = viewer.entities.add({
-              id: "top_billboard_" + billboardModel.id,
-              name: "gltf",
-              show: true,
-              position: p,
-              /**
-               * 广告牌
-               */
-              billboard: {
-                image: url,
-                width: Number(billboardModel.templateTop.xL),
-                height: Number(billboardModel.templateTop.yL),
-                rotation: Number(billboardModel.rotateX),
-                sizeInMeters: true,
-              },
-              orientation: orientation,
-            });
-            entityList.push(entity);
-            break;
-        }
-
-        var h = 0;
-        if (billboardModel.templateTop.yL) {
-          h = Number(billboardModel.templateTop.yL) / 2;
-        }
-        viewer.entities.removeById("pointBillboard_" + billboardModel.id);
-        lodash.remove(
-          entityList,
-          (entity) => entity.id === "pointBillboard_" + billboardModel.id
-        );
-        const point = viewer.entities.add({
-          id: "pointBillboard_" + billboardModel.id,
-          //点
-          position: Cesium.Cartesian3.fromDegrees(
-            Number(billboardModel.templateTop.x),
-            Number(billboardModel.templateTop.y),
-            Number(billboardModel.templateTop.z) + h
-          ),
-          label: {
-            text: billboardModel.billboardName, //描述内容
-            font: "20px Sans-Serif", //字体大小 类型
-            fillColor: Cesium.Color.RED, //颜色
-            outlineColor: Cesium.Color.GOLD,
-            style: Cesium.LabelStyle.CENTER_LABEL,
-            // 垂直位置
-            verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
-            // 中心位置
-            pixelOffset: new Cesium.Cartesian2(0, -10),
-            //设置背景颜色透明
-            backgroundColor: new Cesium.Color(0.0, 0.0, 0.0, 0.0),
-            //打开背景  打开背景 (不会被线段覆盖)
-            showBackground: true,
-            // heightReference: Cesium.HeightReference.RELATIVE_TO_GROUND,
-            distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
-              0.0,
-              300.0
+              Number(billboardModel.templateTop.z) + h
             ),
-            heightReference: Cesium.HeightReference.NONE,
-          },
-        });
-        entityList.push(point);
+            label: {
+              text: billboardModel.billboardName, //描述内容
+              font: "20px Sans-Serif", //字体大小 类型
+              fillColor: Cesium.Color.RED, //颜色
+              outlineColor: Cesium.Color.GOLD,
+              style: Cesium.LabelStyle.CENTER_LABEL,
+              // 垂直位置
+              verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
+              // 中心位置
+              pixelOffset: new Cesium.Cartesian2(0, -10),
+              //设置背景颜色透明
+              backgroundColor: new Cesium.Color(0.0, 0.0, 0.0, 0.0),
+              //打开背景  打开背景 (不会被线段覆盖)
+              showBackground: true,
+              // heightReference: Cesium.HeightReference.RELATIVE_TO_GROUND,
+              distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
+                0.0,
+                300.0
+              ),
+              heightReference: Cesium.HeightReference.NONE,
+            },
+          });
+          entityList.push(point);
+        }
       }
 
       // if (billboardModel.isAddModel) {
@@ -829,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,
@@ -923,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
         );
       }
     },
@@ -951,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) => {

+ 55 - 31
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(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">
@@ -2473,9 +2475,31 @@ export default {
      * 指标分析
      * @param Minfo
      */
-    normAnalysis(Minfo) {
+    normAnalysis(info, Minfo) {
       let that = this;
+      if (!info.plotnumber) {
+        that.$message({
+          message: "请现在项目信息中补全项目地块编码",
+          type: "warning",
+        });
+        return;
+      }
       this.getGuiHuaDiKuai(function () {
+        for (let index = 0; index < that.LandPlanningList.length; index++) {
+          const LandPlanning = that.LandPlanningList[index];
+          let DKBM = LandPlanning.data.find((c) => c.label == "DKBM")
+            ? LandPlanning.data.find((c) => c.label == "DKBM").value
+            : "";
+          let plotnumbers = info.plotnumber.split(",");
+          let isInclude = plotnumbers.some((element) => element.includes(DKBM));
+          if (!isInclude || !DKBM) {
+            that.$message({
+              message: "请选择项目内的地块进行查询",
+              type: "warning",
+            });
+            return;
+          }
+        }
         that.HighLimit(Minfo);
         that.getnorm(Minfo);
       });
@@ -3106,7 +3130,6 @@ export default {
           //指标分析数据
           this.removeLandPlanningList();
           //限高分析数据
-          this.removeLandPlanningList();
           this.removeHighLimit();
         },
       });
@@ -3272,8 +3295,9 @@ export default {
           Cesium.ScreenSpaceEventType.LEFT_CLICK
         );
       }
-      this.removeModel();
       this.removeAll();
+      this.removeModel();
+
       undergroundMode(false);
     },
   },

+ 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


+ 2 - 2
src/views/LandscapeProject/index.vue

@@ -3,9 +3,9 @@
   <div class="ghzc LandscapeProject">
     <Boxcommon :islist="islist" ref="Boxcommon">
       <template v-slot:title>
-        <span class="clearBtn" @click="changeType">
+        <!-- <span class="clearBtn" @click="changeType">
           切换到工程{{ islist ? "总览" : "列表" }}
-        </span>
+        </span> -->
       </template>
       <template v-slot:all>
         <div class="xz_box" v-show="!islist">

+ 2 - 3
src/views/ResourceShare/myApplication/components/addEdtModal.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="dialog">
     <el-dialog
-      :title="formData.carNo"
+      :title="formData.JGMC"
       width="40%"
       :visible.sync="dialogVisible"
       :before-close="close"
@@ -25,7 +25,6 @@
               name="shjl"
               v-if="formData.type == 1 || formData.type == 2"
             >
-              {{ activetime }}
               <el-tabs
                 type="border-card"
                 class="xz_box"
@@ -44,7 +43,7 @@
               </el-tabs>
             </el-tab-pane>
             <el-tab-pane label="撤回记录" name="chjl" v-if="formData.type == 3">
-              <CustomDetails :model="formData" :config="detailInfos">
+              <CustomDetails :model="formData" :config="chInfos">
               </CustomDetails>
             </el-tab-pane>
           </el-tabs>

+ 10 - 10
src/views/ResourceShare/myApplication/config.js

@@ -97,16 +97,16 @@ export const detailInfos = [
 ]
 export const shjlInfos = [
   [[
-    { flag: 'label', value: '审核结果', span: 8 },
-    { flag: 'value', value: 'carNo', span: 16 }
+    { flag: 'label', value: '审核结果', span: 4 },
+    { flag: 'value', value: 'jg', span: 20 }
   ]],
   [[
-    { flag: 'label', value: '审核意见', span: 8 },
-    { flag: 'value', value: 'carTypeName', span: 16 }
+    { flag: 'label', value: '审核意见', span: 4 },
+    { flag: 'value', value: 'carTypeName', span: 20 }
   ]],
   [[
-    { flag: 'label', value: '有效截止日期', span: 8 },
-    { flag: 'value', value: 'carColorName', span: 16 }
+    { flag: 'label', value: '有效截止日期', span: 4 },
+    { flag: 'value', value: 'carColorName', span: 20 }
   ]],
   [[
     { flag: 'label', value: '审核人', span: 4 },
@@ -119,12 +119,12 @@ export const shjlInfos = [
 ]
 export const chInfos = [
   [[
-    { flag: 'label', value: '撤回时间', span: 8 },
-    { flag: 'value', value: 'carNo', span: 16 }
+    { flag: 'label', value: '撤回时间', span: 4 },
+    { flag: 'value', value: 'carNo', span: 20 }
   ]],
   [[
-    { flag: 'label', value: '撤回原因', span: 8 },
-    { flag: 'value', value: 'carTypeName', span: 16 }
+    { flag: 'label', value: '撤回原因', span: 4 },
+    { flag: 'value', value: 'carTypeName', span: 20 }
   ]],
 ]
 

+ 2 - 2
src/views/cockpit/common/VectorSpace/BoxCommonVector.vue

@@ -4,8 +4,8 @@
       <h2 class="PangetitleVector darg-div">
         <span class="pange_textVector">{{ title }}</span>
         <slot name="title"></slot>
-        <span class="clearBtn" @click="cockpit">
-          <i class="el-icon-thumb"></i>
+        <span class="clearBtn" @click="cockpit" v-if="!cockpit_vector.mapType">
+          <i class="el-icon-thumb" ></i>
           图斑详情查询
         </span>
         <i class="el-icon-close" v-if="$route.path == '/overview'" @click="close"></i>

+ 10 - 14
src/views/farmlandProtection/components/fxjg.vue

@@ -117,7 +117,6 @@ export default {
 
   methods: {
     download() {
-      console.log(this.resultData.xmxx,'this.$props.fxjgObj');
       window.open(
         window.axiosURI +
           "/analyse/fzss/DownloadReport?filePath=" +
@@ -152,12 +151,10 @@ export default {
           this.$nextTick(() => {
             this.$refs.echartRef.setOptions({ data, type }, 1);
           });
-
-          // this.$refs.echartRef.res
           this.resultData = res.data;
-
-          // this.drawWktPloygon(res.data.xmxx.geom, "#ff0000", "all"); //res.data.bsm
-          this.loadGeoJSON(parse(res.data.xmxx.geom), "#ff0000", "all");
+          if (res.data.xmxx.geom) {
+            this.loadGeoJSON(parse(res.data.xmxx.geom), "#ff0000", "all");
+          }
         } else {
           this.$message.error(res.message);
         }
@@ -172,8 +169,7 @@ export default {
             this.loadGeoJSON(parse(res.geom), res.itemStyle.color, "all");
           }
         }
-
-      })
+      });
     },
     drawWktPloygon(item, itemColor, id) {
       // console.log(geometry, "geometry");
@@ -190,7 +186,7 @@ export default {
     },
     // 加载GeoJSON数据
     loadGeoJSON(geojson, yanse, id, height, name) {
-      viewer.dataSources.removeAll()
+      viewer.dataSources.removeAll();
       let _this = this;
       let fcolor =
         id && id != "all"
@@ -247,11 +243,11 @@ export default {
   overflow-x: hidden;
   padding-right: 10px;
   line-height: 40px;
-.echartCon{
-  height: 350px;
-  overflow: hidden;
-  overflow-y: auto;
-}
+  .echartCon {
+    height: 350px;
+    overflow: hidden;
+    overflow-y: auto;
+  }
   .echart {
     // width: 19rem;
     // height: 350px;

+ 40 - 58
src/views/farmlandProtection/components/fzjcyp.vue

@@ -25,7 +25,13 @@
         <el-button size="mini" @click="zdyModel">自定义模型</el-button>
       </div>
       <div class="treeDiv">
-        <el-table ref="multipleTable" :data="anaModels" style="width: 100%" :show-header="false" @selection-change="handleSelectionChange">
+        <el-table
+          ref="multipleTable"
+          :data="anaModels"
+          style="width: 100%"
+          :show-header="false"
+          @selection-change="handleSelectionChange"
+        >
           <el-table-column type="selection" width="33"> </el-table-column>
           <el-table-column prop="bsmmc" show-overflow-tooltip>
           </el-table-column>
@@ -44,7 +50,11 @@
       <span class="clearBtn" @click="reset">取消</span>
       <span class="sureBtn" @click="submitData">确定</span>
     </div>
-    <zdyModelPop :tableData="templateYZ" :editData="editData" ref="zdyPop"></zdyModelPop>
+    <zdyModelPop
+      :tableData="templateYZ"
+      :editData="editData"
+      ref="zdyPop"
+    ></zdyModelPop>
   </div>
 </template>
 
@@ -53,7 +63,7 @@ import range from "@/components/mapview/range.vue"; //绘制范围
 import zdyModelPop from "./zdyModelPop.vue"; //自定义模型面板
 import moment from "moment";
 import { Message } from "element-ui";
-import { GetMxList ,AddGdbh} from "../../../api/ghss/gdbh.js";
+import { GetMxList, AddGdbh } from "../../../api/ghss/gdbh.js";
 export default {
   components: {
     range,
@@ -77,47 +87,14 @@ export default {
         ],
       },
       //分析模型列表
-      anaModels: [
-      ],
+      anaModels: [],
+      anaModelsCopy:[],//用于存放分析模型初始数据
       templateYZ: [], //用地性质模版因子
-      editData:{},//编辑的对象
-      multipleSelection: []
+      editData: {}, //编辑的对象
+      multipleSelection: [],
     };
   },
   methods: {
-    testInit() {
-      this.templateYZ = [
-        {
-          id: "2fcc1664e6264bf8b3199bac7a4b22d4",
-          bsm: "TB_DLZX",
-          name: "城市道路",
-          level: 2,
-          parentId: "a83e3af0479c49f9bb229ce044e33d4d",
-          conditionInfo: null,
-        },
-        {
-          id: "aac6e14452ee48f6883afc5c047ea235",
-          bsm: "TB_QS_GYUSEQ",
-          name: "国有使用权",
-          level: 1,
-          parentId: "3ae55964b3744393b14bf0e7e647c280",
-          conditionInfo: null,
-        },
-        {
-          id: "bff0dcb5ffd04c3498067e566a5fc302",
-          bsm: "TB_YEY",
-          name: "幼儿园服务半径",
-          level: 1,
-          parentId: "12c81a1e8ba4487ea73f08b93b796b3d",
-          conditionInfo: null,
-        },
-      ];
-      this.templateYZ.forEach((item) => {
-        item.children = [];
-      });
-      this.anaModels = this.templateYZ;
-      this.$refs.zdyPop.yzTableData = this.templateYZ;
-    },
     handleSelectionChange(val) {
       this.multipleSelection = val;
     },
@@ -138,13 +115,16 @@ export default {
     //自定义模型按钮
     zdyModel() {
       this.$refs.zdyPop.dialogVisible = true;
-      this.editData={}
-      this.$refs.zdyPop.reset()
+      this.$refs.zdyPop.title = "自定义模型";
+      this.editData = {};
+      this.$refs.zdyPop.reset();
       this.$refs.zdyPop.yzTableData = [];
     },
     handleEdit(item) {
-      this.editData = item
+      this.editData = item;
+      this.$refs.zdyPop.title = "分析模型编辑";
       this.$refs.zdyPop.dialogVisible = true;
+      this.$refs.zdyPop.ruleForm.fxmxmc = item.bsmmc;
       this.templateYZ = item.gdbhMxYzRet;
       this.templateYZ.forEach((item) => {
         item.children = [];
@@ -159,6 +139,7 @@ export default {
         xzmj: 0,
         xmmc: "耕地保护项目_" + this.getCurrentDateTime(),
       };
+      this.anaModels = this.anaModelsCopy
       this.$refs.ruleForm.resetFields();
       this.$refs.multipleTable.clearSelection();
       this.$refs.range.reset();
@@ -176,7 +157,7 @@ export default {
           let obj = {
             xzfw: this.$refs.range.fileDataID,
             xmmc: this.ruleForm.xmmc,
-            mxlist:this.multipleSelection
+            mxlist: this.multipleSelection,
           };
 
           const loading = this.$loading({
@@ -192,20 +173,21 @@ export default {
             this.$refs.multipleTable.clearSelection();
           }, 1000);
           AddGdbh(obj)
-              .then((res) => {
-                loading.close();
-                this.activeTabs = "lsju";
-                this.$emit("updateParent", "activeTabs", "lsju");
-                this.$refs.multipleTable.clearSelection();
-                this.$message({
-                  message: res.message,
-                  type: res.success ? "success" : "warning",
-                });
-                this.reset();
-              }).catch((error) => {
-                loading.close();
-                Message.error(error)
+            .then((res) => {
+              loading.close();
+              this.activeTabs = "lsju";
+              this.$emit("updateParent", "activeTabs", "lsju");
+              this.$refs.multipleTable.clearSelection();
+              this.$message({
+                message: res.message,
+                type: res.success ? "success" : "warning",
               });
+              this.reset();
+            })
+            .catch((error) => {
+              loading.close();
+              Message.error(error);
+            });
         } else {
           loading.close();
           console.log("error submit!!");
@@ -217,6 +199,7 @@ export default {
       GetMxList()
         .then((res) => {
           this.anaModels = res.data;
+          this.anaModelsCopy = JSON.parse(JSON.stringify(res.data))
         })
         .catch((erro) => {
           console.log(erro);
@@ -225,7 +208,6 @@ export default {
   },
   mounted() {
     this.GetMxList();
-    // this.testInit()
   },
 };
 </script>

+ 2 - 3
src/views/farmlandProtection/components/interDetails.vue

@@ -98,7 +98,6 @@
               </div>
             </div>
           </el-tab-pane>
-          <!-- -->
           <el-tab-pane label="基本信息" name="jbxx">
             <div class="inter_result" v-if="activeTabs == 'jbxx'">
               <el-table
@@ -126,11 +125,11 @@
                 >
                 </el-table-column>
               </el-table>
-              <el-carousel indicator-position="outside">
+              <!-- <el-carousel indicator-position="outside">
                 <el-carousel-item v-for="item in 4" :key="item">
                   <h3>{{ item }}</h3>
                 </el-carousel-item>
-              </el-carousel>
+              </el-carousel> -->
             </div>
           </el-tab-pane>
         </el-tabs>

+ 65 - 23
src/views/farmlandProtection/components/zdyModelPop.vue

@@ -1,15 +1,33 @@
 <template>
   <div class="dialog">
-    <el-dialog title="自定义模型" :visible.sync="dialogVisible" width="40%" :before-close="close"
-      :modal-append-to-body="false" :close-on-click-modal="false">
+    <el-dialog
+      :title="title"
+      :visible.sync="dialogVisible"
+      width="40%"
+      :before-close="close"
+      :modal-append-to-body="false"
+      :close-on-click-modal="false"
+    >
       <!-- <div class="modelTitle"> -->
       <!-- <div class="siteCon">
           <span>分析模型名称:</span>
         </div>
         <el-input v-model="fxmxmc" size="mini" placeholder="请输入项目名称"></el-input> -->
-      <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="110px" class="demo-ruleForm">
+      <el-form
+        :model="ruleForm"
+        :rules="rules"
+        ref="ruleForm"
+        label-width="110px"
+        class="demo-ruleForm"
+      >
         <el-form-item label="分析模型名称:" prop="fxmxmc">
-          <el-input v-model="ruleForm.fxmxmc" size="mini" placeholder="请输入项目名称"></el-input></el-form-item></el-form>
+          <el-input
+            v-model="ruleForm.fxmxmc"
+            size="mini"
+            placeholder="请输入项目名称"
+            :disabled="title == '分析模型编辑' ? true : false"
+          ></el-input></el-form-item
+      ></el-form>
       <!-- </div> -->
 
       <el-row>
@@ -18,20 +36,41 @@
           <el-scrollbar class="left-tree">
             <el-input placeholder="输入查询内容" v-model="filterText" clearable>
             </el-input>
-            <el-tree :data="options" :props="defaultProps" highlight-current show-checkbox node-key="id" ref="tree"
-              :default-checked-keys="defaultArr" :filter-node-method="filterNode"></el-tree>
+            <el-tree
+              :data="options"
+              :props="defaultProps"
+              highlight-current
+              show-checkbox
+              node-key="id"
+              ref="tree"
+              :default-checked-keys="defaultArr"
+              :filter-node-method="filterNode"
+            ></el-tree>
           </el-scrollbar>
         </el-col>
         <el-col :span="2">
           <div class="grid-content bg_purple">
-            <el-button icon="el-icon-d-arrow-right" @click="turnLeftToRight"></el-button>
-            <el-button icon="el-icon-d-arrow-left" @click="turnRightToLeft"></el-button>
+            <el-button
+              icon="el-icon-d-arrow-right"
+              @click="turnLeftToRight"
+            ></el-button>
+            <el-button
+              icon="el-icon-d-arrow-left"
+              @click="turnRightToLeft"
+            ></el-button>
           </div>
         </el-col>
         <el-col :span="11">
           <div class="yztitle">已选数据</div>
-          <el-table ref="multipleTable" :data="dialogData" border class="right-table scroll-style" size="small"
-            style="width: 100%" @selection-change="handleSelectionChange">
+          <el-table
+            ref="multipleTable"
+            :data="dialogData"
+            border
+            class="right-table scroll-style"
+            size="small"
+            style="width: 100%"
+            @selection-change="handleSelectionChange"
+          >
             <el-table-column type="selection" width="55" align="center">
             </el-table-column>
             <el-table-column prop="name" label="数据名称"> </el-table-column>
@@ -62,6 +101,7 @@ export default {
 
   data() {
     return {
+      title: "自定义模型",
       // fxmxmc: "", //分析模型名称
       filterText: "", //树结构搜索关键字
       defaultProps: {
@@ -69,12 +109,17 @@ export default {
         label: "name",
       },
       ruleForm: {
-        fxmxmc: ""
+        fxmxmc: "",
       },
       rules: {
         fxmxmc: [
-          { required: true, message: '请输入活动名称', trigger: 'blur' },
-          { min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' }
+          { required: true, message: "请输入活动名称", trigger: "blur" },
+          {
+            min: 1,
+            max: 20,
+            message: "长度在 1 到 20 个字符",
+            trigger: "blur",
+          },
         ],
       },
       dialogVisible: false,
@@ -105,11 +150,9 @@ export default {
       this.yzTableData = [];
       this.GetFactorList(); //重新获取分析数据
       this.dialogData = []; //清空已选数据表单
-      this.$nextTick(() =>{
-        this.$refs['ruleForm'].resetFields();
-
-      })
-
+      this.$nextTick(() => {
+        this.$refs["ruleForm"].resetFields();
+      });
     },
     testInput(val) {
       val = Number(val);
@@ -249,16 +292,15 @@ export default {
             this.$refs.multipleTable.clearSelection(); //清空勾选
           } else {
             this.$message({
-              message: '请选择分析数据',
-              type: 'warning'
+              message: "请选择分析数据",
+              type: "warning",
             });
           }
         } else {
-          console.log('error submit!!');
+          console.log("error submit!!");
           return false;
         }
       });
-
     },
     setData(data) {
       data.filter((item) => {
@@ -358,7 +400,7 @@ export default {
     justify-content: center;
     height: 400px;
 
-    .el-button+.el-button {
+    .el-button + .el-button {
       margin-left: 0;
       margin-top: 20px;
     }

+ 10 - 3
src/views/farmlandProtection/index.vue

@@ -20,7 +20,12 @@
         </el-tab-pane>
       </el-tabs>
     </div>
-    <RzDtails :rzBsm="rzBsm" :rzMc="nowObj.xmmc" @updateParent="changeData"></RzDtails>
+    <interDetails :rzBsm="rzBsm" @updateParent="changeData" :interObj="interObj" v-if="showInter"></interDetails>
+    <RzDtails
+      :rzBsm="rzBsm"
+      :rzMc="nowObj.xmmc"
+      @updateParent="changeData"
+    ></RzDtails>
   </div>
 </template>
 
@@ -28,6 +33,7 @@
 import FZJCYP from "./components/fzjcyp.vue";
 import FXJG from "./components/fxjg.vue";
 import Lsjl from "../complianceAnalysis/components/lsjl.vue";
+import interDetails from "./components/interDetails.vue";
 import RzDtails from "../complianceAnalysis/components/rzDtails.vue";
 export default {
   name: "farmlandProtection",
@@ -35,7 +41,8 @@ export default {
     FZJCYP,
     Lsjl,
     FXJG,
-    RzDtails
+    interDetails,
+    RzDtails,
   },
   data() {
     return {
@@ -72,7 +79,7 @@ export default {
         this.$nextTick(() => {
           this.$refs.fxjg.initData();
         });
-      } else {
+      }else{
         this.showInter = false
       }
     },

+ 64 - 6
src/views/shareResources/components/ServiceDetails.vue

@@ -7,7 +7,7 @@
       </div>
       <div class="ServiceCon">
         <div class="detailList">
-          <el-descriptions title="自定义样式列表" :column="1" border>
+          <el-descriptions :column="1" border>
             <el-descriptions-item
               label="服务名称"
               label-class-name="my-label"
@@ -33,7 +33,7 @@
         </div>
         <div class="btnCon">
           <span @click="dialogVisible = true">申请调用</span>
-          <span><i>申请记录</i></span>
+          <span><i @click="dialogVisible2 = true">申请记录</i></span>
         </div>
       </div>
     </div>
@@ -131,6 +131,39 @@
         <el-button @click="resetForm('ruleForm')">确定</el-button>
       </span>
     </el-dialog>
+
+    <el-dialog
+      title="提示"
+      :visible.sync="dialogVisible2"
+      width="30%"
+      :before-close="handleClose"
+    >
+      <div>
+        <el-table :data="tableData" style="width: 100%">
+          <el-table-column prop="date" label="申请时间" >
+          </el-table-column>
+          <el-table-column prop="sqbm" label="申请部门" >
+          </el-table-column>
+          <el-table-column prop="sjfw" label="数据服务" >
+          </el-table-column>
+          <el-table-column prop="fwlx" label="服务类型" >
+          </el-table-column>
+          <el-table-column prop="sqfw" label="申请范围" >
+          </el-table-column>
+          <el-table-column prop="sqly" label="申请理由" >
+          </el-table-column>
+          <el-table-column prop="xtmc" label="系统名称"> </el-table-column>
+          <el-table-column prop="dyip" label="调用IP"> </el-table-column>
+          <el-table-column prop="yqTime" label="预期使用时间"> </el-table-column>
+        </el-table>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible2 = false">取 消</el-button>
+        <el-button type="primary" @click="dialogVisible2 = false"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -141,6 +174,7 @@ export default {
     return {
       isDetailsShow: false,
       dialogVisible: false,
+      dialogVisible2: false,
       xzqTreeData: [], //申请范围
       fileList: [], //文件
       ruleForm: {
@@ -165,10 +199,21 @@ export default {
         xzqTreeValue: [
           { required: true, message: "请选择申请范围", trigger: "change" },
         ],
-        dyip: [
-          { required: true, message: "请填写调用IP", trigger: "blur" },
-        ],
+        dyip: [{ required: true, message: "请填写调用IP", trigger: "blur" }],
       },
+      tableData: [
+        {
+          date: "2016-05-02",
+          sqbm: "研发部",
+          sjfw: "XXXXXX",
+          fwlx:'iServer',
+          sqfw:'吉阳区',
+          sqly:'申请理由',
+          xtmc:'系统名称',
+          dyip:'调用ip',
+          yqTime:'预期时间',
+        },
+      ],
     };
   },
   created() {
@@ -236,7 +281,7 @@ export default {
 <style lang="scss" scoped>
 .ServiceCon {
   height: 760px;
-  background-color: aliceblue;
+//   background-color: aliceblue;
   cursor: auto;
 
   .btnCon {
@@ -293,6 +338,19 @@ export default {
 .sm-panel {
   top: 38px;
 }
+
+/deep/ .el-icon-close:before{
+    right: 2px;
+    top: 0px;
+}
+/deep/ .el-descriptions-item__label.is-bordered-label{
+    color: #fff;
+    background-color: transparent;
+}
+/deep/ .el-descriptions__body{
+    color: #fff;
+    background-color: transparent;
+}
 </style>
 <style>
 .my-content {

+ 1 - 0
src/views/shareResources/index.vue

@@ -31,6 +31,7 @@ export default {
   data() {
     return {
       isShowService:false,
+      objData:null,
     };
   },
   mounted() {

二進制
static/images/map/texture.png


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