Browse Source

中图代码合并

lkk 10 months ago
parent
commit
d1c2865ccb

+ 1 - 1
index.html

@@ -26,7 +26,7 @@
     <script src="https://cdnjs.cloudflare.com/ajax/libs/echarts-gl/2.0.8/echarts-gl.min.js" async></script> -->
     <script src="./static/js/echarts.min.js"></script>
     <script src="./static/js/echarts-gl.min.js"></script>
-
+    <script src="./static/js/shp.js"></script>
 </head>
 
 <body>

+ 177 - 0
src/api/zt/ztApi.js

@@ -0,0 +1,177 @@
+import axios from "axios";
+import vuex from "@/store/index.js";
+import errorCode from "@/utils/errorCode";
+import { tansParams, blobValidate } from "@/utils/ruoyi";
+import cache from "@/plugins/cache";
+import { Notification, MessageBox, Message, Loading } from "element-ui";
+import { saveAs } from "file-saver";
+axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8";
+// 创建axios实例
+const ZTservice = axios.create({
+  // axios中请求配置有baseURL选项,表示请求URL公共部分
+  baseURL: window.ZTaxiosURI,
+  //baseURL: "http://192.168.100.252:8080",
+  // 超时
+  timeout: 100000,
+});
+
+// request拦截器
+ZTservice.interceptors.request.use(
+  (config) => {
+    // 是否需要防止数据重复提交
+    const isRepeatSubmit = (config.headers || {}).repeatSubmit === false;
+    // get请求映射params参数
+    if (config.method === "get" && config.params) {
+      let url = config.url + "?" + tansParams(config.params);
+      url = url.slice(0, -1);
+      config.params = {};
+      config.url = url;
+    }
+    if (
+      !isRepeatSubmit &&
+      (config.method === "post" || config.method === "put")
+    ) {
+      const requestObj = {
+        url: config.url,
+        data:
+          typeof config.data === "object"
+            ? JSON.stringify(config.data)
+            : config.data,
+        time: new Date().getTime(),
+      };
+      const sessionObj = cache.session.getJSON("sessionObj");
+      if (
+        sessionObj === undefined ||
+        sessionObj === null ||
+        sessionObj === ""
+      ) {
+        cache.session.setJSON("sessionObj", requestObj);
+      } else {
+        const s_url = sessionObj.url; // 请求地址
+        const s_data = sessionObj.data; // 请求数据
+        const s_time = sessionObj.time; // 请求时间
+        const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交
+        if (
+          s_data === requestObj.data &&
+          requestObj.time - s_time < interval &&
+          s_url === requestObj.url
+        ) {
+          const message = "数据正在处理,请勿重复提交";
+          console.warn(`[${s_url}]: ` + message);
+          return Promise.reject(new Error(message));
+        } else {
+          cache.session.setJSON("sessionObj", requestObj);
+        }
+      }
+    }
+    return config;
+  },
+  (error) => {
+    console.log(error);
+    Promise.reject(error);
+  }
+);
+
+// 响应拦截器
+ZTservice.interceptors.response.use(
+  (res) => {
+    // 未设置状态码则默认成功状态
+    const code = res.data.code || 200;
+    // 获取错误信息
+    const msg = errorCode[code] || res.data.msg || errorCode["default"];
+    // 二进制数据则直接返回
+    if (
+      res.request.responseType === "blob" ||
+      res.request.responseType === "arraybuffer"
+    ) {
+      return res.data;
+    }
+    if (code === 401) {
+      if (!isReloginShow) {
+        isReloginShow = !isReloginShow;
+        MessageBox.confirm(
+          "登录状态已过期,您可以继续留在该页面,或者重新登录",
+          "系统提示",
+          {
+            confirmButtonText: "重新登录",
+            cancelButtonText: "取消",
+            type: "warning",
+          }
+        )
+          .then(() => {
+            isReloginShow = !isReloginShow;
+            vuex.dispatch("LogOut").then(() => {
+              location.href = "/login";
+            });
+          })
+          .catch(() => {
+            isReloginShow = !isReloginShow;
+          });
+      }
+      return Promise.reject("无效的会话,或者会话已过期,请重新登录。");
+    } else if (code === 500) {
+      Message({
+        message: msg,
+        type: "error",
+      });
+      return Promise.reject(new Error(msg));
+    } else if (code === 601) {
+      Message({
+        message: msg,
+        type: "warning",
+      });
+      return Promise.reject("error");
+    } else if (code !== 200) {
+      Notification.error({
+        title: msg,
+      });
+      return Promise.reject("error");
+    } else {
+      return res.data;
+    }
+  },
+  (error) => {
+    console.log("err" + error);
+    let { message } = error;
+    if (message == "Network Error") {
+      message = "后端接口连接异常";
+    } else if (message.includes("timeout")) {
+      message = "系统接口请求超时";
+    } else if (message.includes("Request failed with status code")) {
+      message = "系统接口" + message.substr(message.length - 3) + "异常";
+    }
+    Message({
+      message: message,
+      type: "error",
+      duration: 5 * 1000,
+    });
+    return Promise.reject(error);
+  }
+);
+
+export async function getJZDJWord(data) {
+  return await ZTservice({
+    url: "/sanya/exportWord4",
+    method: "post",
+    data: data,
+  });
+}
+export async function getWord(data) {
+  let dataFile = await ZTservice({
+    url: "/sanya/getWord",
+    method: "post",
+    responseType: "blob",
+    params: data,
+  });
+  const isBlob = blobValidate(dataFile);
+  if (isBlob) {
+    const blob = new Blob([dataFile]);
+    saveAs(blob, data.fileName);
+  } else {
+    const resText = await dataFile.text();
+    const rspObj = JSON.parse(resText);
+    const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode["default"];
+    Message.error(errMsg);
+  }
+  return;
+}

BIN
src/assets/images/loc.png


BIN
src/assets/images/location1.png


+ 136 - 25
src/views/ConstructionApplication3D/BenchmarkLandPriceAnalysis/BenchmarkLandPrice.vue

@@ -28,7 +28,7 @@
                   <el-input size="mini" v-model="form.ProjectName"></el-input>
                 </el-col>
               </el-form-item>
-              <el-form-item label="项目土地用途" size="mini" prop="ProjectType">
+              <el-form-item label="项目类型" size="mini" prop="ProjectType">
                 <el-col :span="20">
                   <!-- <el-select
                     v-model="form.ProjectType"
@@ -43,7 +43,7 @@
                       :value="dict.value"
                     />
                   </el-select> -->
-                  <el-cascader
+                  <!-- <el-cascader
                     placeholder="请选择土地用途"
                     v-model="form.ProjectType"
                     :options="landUseNatureRelation"
@@ -56,12 +56,15 @@
                       children: 'children',
                       emitPath: false,
                     }"
-                  ></el-cascader>
+                  ></el-cascader> -->
+                  <el-input size="mini" v-model="form.ProjectType"></el-input>
                 </el-col>
               </el-form-item>
               <el-form-item label="选址范围" size="mini" prop="ProjectScope">
                 <el-col :span="20">
-                  <el-button type="primary">导入范围</el-button>
+                  <input @change="handleUpload" type="file" style="display:none" id="fileInput" accept=".zip"></input>
+            <el-button type="primary" @click="inputGeometry">导入范围</el-button>
+                  <!-- <el-button type="primary">导入范围</el-button> -->
                   <el-button type="primary" @click="getProjectScope"
                     >绘制范围</el-button
                   >
@@ -160,7 +163,10 @@
                               @click="openAnalyzeResults(itemModel)"
                               >结果</el-button
                             >
-                            <el-button size="mini" type="default"
+                            <el-button
+                              size="mini"
+                              type="default"
+                              @click="handleGetBG(itemModel)"
                               >报告</el-button
                             >
                           </div>
@@ -198,7 +204,8 @@ import {
   midpoint,
   difference,
 } from "@turf/turf";
-
+import { getJZDJWord, getWord } from "@/api/zt/ztApi.js";
+let handlerPolygon;var polygonEntity = null;
 export default {
   data() {
     return {
@@ -209,7 +216,7 @@ export default {
        */
       activeName: "first",
       //绘制事件
-      handlerPolygon: null,
+      // handlerPolygon: null,
 
       form: {
         id: "",
@@ -217,6 +224,7 @@ export default {
         ProjectName: "",
         ProjectType: "",
         ConstructionUnit: "",
+        ReportPath: "",
       },
       rules: {
         ProjectName: [
@@ -284,29 +292,29 @@ export default {
     getProjectScope() {
       let that = this;
       this.clearScope();
-      this.handlerPolygon = new Cesium.DrawHandler(
+      handlerPolygon = new Cesium.DrawHandler(
         viewer,
         Cesium.DrawMode.Polygon,
         Cesium.ClampMode.Space
       );
-      this.handlerPolygon.activate();
-      this.handlerPolygon.activeEvt.addEventListener(function (isActive) {
+      handlerPolygon.activate();
+      handlerPolygon.activeEvt.addEventListener(function (isActive) {
         if (isActive == true) {
-          viewer.enableCursorStyle = false;
-          viewer._element.style.cursor = "";
+          // viewer.enableCursorStyle = false;
+          // viewer._element.style.cursor = "";
           document.body.classList.add("drawCur");
         } else {
-          viewer.enableCursorStyle = true;
+          // viewer.enableCursorStyle = true;
           document.body.classList.remove("drawCur");
         }
       });
-      this.handlerPolygon.movingEvt.addEventListener((windowPosition) => {
+      handlerPolygon.movingEvt.addEventListener((windowPosition) => {
         that.tooltip.showAt(
           windowPosition,
           "<p>点击鼠标左键开始绘制分析区域</p>"
         );
       });
-      this.handlerPolygon.drawEvt.addEventListener((result) => {
+      handlerPolygon.drawEvt.addEventListener((result) => {
         that.tooltip.setVisible(false);
         var polygon = result.object;
         if (!polygon) {
@@ -324,11 +332,12 @@ export default {
             points.push(points[0]);
           }
         }
-        if (this.calculateBooleanContains(positions)) {
-          that.form.ProjectScope = points;
-        } else {
-          this.$message.error("请在规划地块范围内选择范围");
-        }
+        that.form.ProjectScope = points;
+        // if (this.calculateBooleanContains(positions)) {
+        //   that.form.ProjectScope = points;
+        // } else {
+        //   this.$message.error("请在规划地块范围内选择范围");
+        // }
       });
     },
     submitForm(formName) {
@@ -359,6 +368,99 @@ export default {
       this.clear();
       this.$refs[formName].resetFields();
     },
+    /**
+     * 点击导入范围
+     */
+     inputGeometry() {
+      var element = document.getElementById('fileInput')
+      // debugger
+      // document.getElementsByClassName("el-upload__input")= ""
+      if (element)
+        element.click();
+
+    },
+    handleUpload(event) {
+      this.clearScope();
+      debugger
+      
+      // let fileName = document.getElementsByClassName("el-upload__input")[0].value
+      let fileName = event.target.files[0];
+      var size = fileName.size
+      if (size > 512*1024) {
+        {
+          this.$message("文件大小超限,请重新输入!");
+          event.target.value = ''
+          return
+        }
+      }
+      let reader = new FileReader();
+      var geojson;
+      var that = this
+
+      reader.readAsArrayBuffer(fileName);
+      reader.onload = function (e) {
+        debugger;
+        let res = e.target.result; //ArrayBuffer
+        shp(res)
+          .then(function (res) {
+            // self.addGeometry(res)
+            geojson = res;
+            console.log(geojson);
+            that.addGeometry(geojson)
+          })
+          .catch(function (e) {
+            console.log(e);
+          });
+        event.target.value = ''
+      };
+      // this.parsingZip();
+    },
+        /**
+     * 导入范围添加图形
+     */
+     addGeometry(geojson) {
+      var that = this;
+      debugger
+      var coordinates = geojson.features[0].geometry.coordinates;
+      var box = geojson.features[0].geometry.bbox;
+      var centerX = (box[0] + box[2]) / 2;
+      var centerY = (box[1] + box[3]) / 2;
+      var positions = [];
+      that.form.ProjectScope = [];
+      for (var i = 0; i < coordinates.length; i++) {
+        var coor = coordinates[i];
+        if (coor && coor.length > 0) {
+          for (var j = 0; j < coor.length; j++) {
+            that.form.ProjectScope.push({ x: coor[j][0], y: coor[j][1] })
+            positions.push(coor[j][0])
+            positions.push(coor[j][1])
+          }
+        }
+      }
+      viewer.entities.removeById('polygon');
+      polygonEntity = new Cesium.Entity({
+        id:'polygon',
+
+        position: Cesium.Cartesian3.fromDegreesArray([
+          centerX,
+          centerY,
+        ]),
+        // classificationType: ClassificationType.TERRAIN,
+        polygon: {
+          hierarchy: new Cesium.PolygonHierarchy(
+            new Cesium.Cartesian3.fromDegreesArray(positions)
+          ),
+          // positions: new Cesium.Cartesian3.fromDegreesArray(positions),
+          material: new Cesium.Color(255 / 255, 211 / 255, 128 / 255, 1),
+          outline: true,
+          outlineColor: Cesium.Color.BLACK,
+          outlineWidth: 1.0,
+        },
+      });
+      
+      viewer.entities.add(polygonEntity);
+      viewer.flyTo(polygonEntity)
+    },
 
     /**
      * 打开分析结果弹窗
@@ -535,7 +637,13 @@ export default {
         });
       }
     },
-
+    async handleGetBG(item) {
+      debugger;
+      if (item.ReportPath != "") {
+        debugger;
+        await getWord({ fileName: item.ReportPath });
+      }
+    },
     /**
      * 与已有的规划地块比较看是否包含
      * @param points
@@ -609,10 +717,13 @@ export default {
       this.LayerData.GHDKData = [];
     },
     clearScope() {
-      if (this.handlerPolygon) {
-        this.handlerPolygon.clear();
-        this.handlerPolygon.deactivate();
-        this.handlerPolygon = null;
+      if (polygonEntity) {
+        viewer.entities.remove(polygonEntity)
+      }
+      if (handlerPolygon) {
+        handlerPolygon.clear();
+        handlerPolygon.deactivate();
+        handlerPolygon = null;
       }
       this.tooltip.setVisible(false);
     },

+ 231 - 18
src/views/ConstructionApplication3D/BenchmarkLandPriceAnalysis/jzdjfxsmjg.vue

@@ -5,10 +5,35 @@
   >
     <el-row :gutter="10" style="display: flex; align-items: center">
       <el-col :span="18">
-        {{ info.BenchmarkLandPrice.ProjectName }}
+        {{ thisBenchmarkLandPrice.ProjectName }}
       </el-col>
       <el-col :span="6">
-        <el-button size="mini" type="default">导出报告</el-button>
+        <el-button
+          :disabled="thisBenchmarkLandPrice.AnalysisStatus != '完成'"
+          size="mini"
+          type="default"
+          @click="handleGetBG"
+          >导出报告</el-button
+        >
+      </el-col>
+    </el-row>
+    <el-row :gutter="10" style="display: flex; align-items: center">
+      <el-col :span="24">
+        土地用途:
+        <el-select
+          size="mini"
+          v-model="jzdj_LandUse"
+          placeholder="请选择土地用途"
+          clearable
+          @change="handleChange"
+        >
+          <el-option
+            v-for="dict in zt_jzdj_LandUse"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
       </el-col>
     </el-row>
     <el-row :gutter="10">
@@ -60,7 +85,7 @@
             <div class="con-col" style="align-items: flex-start">
               <a style="color: white">总地价(万元)</a>
               <a style="font-weight: bold; color: rgba(2, 167, 240, 1)">{{
-                ((formData.gyzdj + formData.jtzdj) / 10000).toFixed(2)
+                (formData.zdj / 10000).toFixed(2)
               }}</a>
             </div>
           </el-col>
@@ -187,20 +212,23 @@ import {
   midpoint,
   difference,
 } from "@turf/turf";
+import { getJZDJWord, getWord } from "@/api/zt/ztApi.js";
 export default {
   data() {
     return {
+      thisBenchmarkLandPrice: null,
       //点查entities事件
-      getEntitiesHandler: null,
+      getEntitiesHandler: {},
       tooltip: createTooltip(document.body),
       zt_jzdj_LandUse: window.dict.zt_jzdj_LandUse,
       jzdj_LandUse: "商服用地",
       GYmyChart: null,
       JTmyChart: null,
       formData: {
-        fxzmj: 0,
-        gyzdj: 0,
-        jtzdj: 0,
+        fxzmj: 0, //分析面积
+        zdj: 0,
+        gyzdj: 0, //国有总地价
+        jtzdj: 0, //集体总地价
       },
       LayerData: {
         GYData: [],
@@ -234,6 +262,10 @@ export default {
       },
     },
   },
+  created() {
+    debugger;
+    this.thisBenchmarkLandPrice = this.info.BenchmarkLandPrice;
+  },
   mounted() {
     const erd = elementResizeDetectorMaker();
     let that = this;
@@ -307,10 +339,10 @@ export default {
      */
     async CalculateJZDJ() {
       let that = this;
-      let BenchmarkLandPrice = this.info.BenchmarkLandPrice;
-      if (BenchmarkLandPrice.ProjectType) {
+      debugger;
+      if (that.jzdj_LandUse) {
         let landUseNatureRelation = flatten(window.landUseNatureRelation).find(
-          (c) => c.tdyt == BenchmarkLandPrice.ProjectType
+          (c) => c.tdyt == that.jzdj_LandUse
         );
         if (landUseNatureRelation) {
           let layerinfos = landUseNatureRelation.layerinfo;
@@ -382,6 +414,16 @@ export default {
                     ps.push(element.x);
                     ps.push(element.y);
                   }
+                  // var orangePolygon1 = viewer.entities.add({
+                  //   id: uuidv4(),
+                  //   polygon: {
+                  //     hierarchy: Cesium.Cartesian3.fromDegreesArray(ps),
+                  //     material: Cesium.Color.FUCHSIA.withAlpha(0.4),
+                  //     outline: true,
+                  //     outlineColor: Cesium.Color.BLACK,
+                  //     outlineWidth: 2.0,
+                  //   },
+                  // });
                   that.LayerData.JZDJData.push(layerData);
                 });
               }
@@ -393,12 +435,20 @@ export default {
               );
             }
           }
+
+          //转换成超图格式面
+          let HZgeometry = {
+            partTopo: [1],
+            parts: [this.info.BenchmarkLandPrice.ProjectScope.length],
+            points: this.info.BenchmarkLandPrice.ProjectScope,
+          };
           // 循环国有土地
           that.LayerData.GYData.forEach((Data) => {
             that.LayerData.JZDJData.forEach((JZDJ) => {
               let area = that.calculateIntersectArea(
                 Data.geometry,
-                JZDJ.geometry
+                JZDJ.geometry,
+                HZgeometry
               );
               if (Number(area) > 0) {
                 let fromData = { area: area };
@@ -423,7 +473,8 @@ export default {
             that.LayerData.JZDJData.forEach((JZDJ) => {
               let area = that.calculateIntersectArea(
                 Data.geometry,
-                JZDJ.geometry
+                JZDJ.geometry,
+                HZgeometry
               );
               if (Number(area) > 0) {
                 let fromData = { area: area };
@@ -444,8 +495,8 @@ export default {
               }
             });
           });
-
           that.gyjtzdj();
+          that.setFXBG();
           debugger;
         } else {
           this.$message.error("未配置当前土地用途,请联系管理员添加");
@@ -454,8 +505,9 @@ export default {
         this.$message.error("请在土地用途");
       }
     },
-    //
+    //计算国有和集体分别总地价
     gyjtzdj() {
+      this.formData.zdj = 0;
       this.formData.gyzdj = 0;
       this.formData.jtzdj = 0;
       this.LayerData.GYData.forEach((gyelement) => {
@@ -468,6 +520,25 @@ export default {
           this.formData.jtzdj += element.zdj;
         });
       });
+      // 循环得出总地价
+      //转换成超图格式面
+      let HZgeometry = {
+        partTopo: [1],
+        parts: [this.info.BenchmarkLandPrice.ProjectScope.length],
+        points: this.info.BenchmarkLandPrice.ProjectScope,
+      };
+      this.LayerData.JZDJData.forEach((JZDJ) => {
+        let area = this.calculateIntersectArea(JZDJ.geometry, HZgeometry);
+        if (Number(area) > 0) {
+          //单价
+          let djval = JZDJ.data.find(
+            (c) => c.label == JZDJ.layerInfo.ydlxPriceField
+          );
+          if (djval) {
+            this.formData.zdj += Number(area * Number(djval.value));
+          }
+        }
+      });
     },
 
     /**
@@ -700,16 +771,141 @@ export default {
         },
       });
     },
+    /**
+     * 打印分析报告
+     */
+    async handleGetBG() {
+      debugger;
+      if (this.info.BenchmarkLandPrice.ReportPath != "") {
+        debugger;
+        await getWord({ fileName: this.info.BenchmarkLandPrice.ReportPath });
+      }
+    },
+
+    /**
+     * 生成报告
+     */
+    async setFXBG() {
+      let data = {
+        projectName: this.info.BenchmarkLandPrice.ProjectName, //项目名称
+        analysisDate: moment(new Date()).format("YYYY-MM-DD HH:mm:ss"), //分析时间
+        projectType: this.info.BenchmarkLandPrice.ProjectType, //项目类型
+        buildUnit: this.info.BenchmarkLandPrice.ConstructionUnit, //建设单位
+        analysisArea: this.formData.fxzmj, //分析面积(平方米)
+        totalLandPrice: this.formData.zdj, //总地价(万元) 国有+集体 总地价预估合计
+        areaSCL: 0, //国有建设用地面积(平方米) 国有 土地面积合计
+        baseLandPriceSCL: 0, //国有建设用地基准地价(万元)
+        areaCCL: 0, //集体建设用地面积(平方米) 集体 土地面积合计
+        baseLandPriceCCL: 0, //集体建设用地基准地价(万元)
+        picList: [], //图片集 分析范围
+        definitionBLP: this.jzdj_LandUse, //报告类型名称
+        totalArea: 0, //国有+集体土地面积合计 平方米 tableList01 土地面积 + tableList01土地面积
+        landPriceESCL: 0, //国有土地地价预估 万元 国有 总地价预估合计 tableList01 总地价预估 累加
+        landPriceECCL: 0, // 集体土地地价预估 万元 集体 总地价预估合计 tableList02 总地价预估 累加
+        tableList01: [], //国有建设用地
+        tableList02: [], //集体建设用地
+      };
+      debugger;
+      this.LayerData.GYData.forEach((gyelement) => {
+        gyelement.fromData.forEach((element) => {
+          data.totalArea += element.area;
+          data.baseLandPriceSCL += element.zdj;
+          data.areaSCL += element.area;
+          data.landPriceESCL += element.zdj;
+          data.tableList01.push({
+            lv: element.tdjb,
+            landPrice: Number((element.dj * 666.67).toFixed(2)),
+            area: Number((element.area / 666.67).toFixed(2)),
+            landPriceES: Number((element.zdj / 10000).toFixed(2)),
+          });
+        });
+      });
+      this.LayerData.JTData.forEach((jtelement) => {
+        jtelement.fromData.forEach((element) => {
+          data.totalArea += element.area;
+          data.baseLandPriceCCL += element.zdj;
+          data.areaCCL += element.area;
+          data.landPriceECCL += element.zdj;
+          data.tableList02.push({
+            lv: element.tdjb,
+            landPrice: Number((element.dj * 666.67).toFixed(2)),
+            area: Number((element.area / 666.67).toFixed(2)),
+            landPriceES: Number((element.zdj / 10000).toFixed(2)),
+          });
+        });
+      });
+      data.analysisArea = Number((data.analysisArea / 666.67).toFixed(2));
+      data.totalLandPrice = Number((data.totalLandPrice / 10000).toFixed(2));
+      data.areaSCL = Number((data.areaSCL / 666.67).toFixed(2));
+      data.areaCCL = Number((data.areaCCL / 666.67).toFixed(2));
+      data.totalArea = Number((data.totalArea / 666.67).toFixed(2));
+      data.landPriceESCL = Number((data.landPriceESCL / 10000).toFixed(2));
+      data.landPriceECCL = Number((data.landPriceECCL / 10000).toFixed(2));
+      data.baseLandPriceCCL = Number(
+        (data.baseLandPriceCCL / 10000).toFixed(2)
+      );
+      data.baseLandPriceSCL = Number(
+        (data.baseLandPriceSCL / 10000).toFixed(2)
+      );
+      debugger;
+      let JZDJWordPath = await getJZDJWord(data);
+      debugger;
+      if (JZDJWordPath.code == 200) {
+        this.info.BenchmarkLandPrice.AnalysisStatus = "完成";
+        this.info.BenchmarkLandPrice.ReportPath = JZDJWordPath.msg;
+        let BenchmarkLandPrice = window.BenchmarkLandPriceList.find(
+          (c) => (c.id = this.info.BenchmarkLandPrice.id)
+        );
+        BenchmarkLandPrice.AnalysisStatus = "完成";
+        BenchmarkLandPrice.ReportPath = JZDJWordPath.msg;
+
+        // this.$notify({
+        //   title: "成功",
+        //   message:
+        //     this.info.BenchmarkLandPrice.ProjectName + "报告已生成,可下载",
+        //   type: "success",
+        // });
+      } else {
+        this.info.BenchmarkLandPrice.AnalysisStatus = "异常";
+        let BenchmarkLandPrice = window.BenchmarkLandPriceList.find(
+          (c) => (c.id = this.info.BenchmarkLandPrice.id)
+        );
+        BenchmarkLandPrice.AnalysisStatus = "异常";
+        this.$notify.error({
+          title: "异常",
+          message:
+            this.info.BenchmarkLandPrice.ProjectName +
+            "报告生成异常,请重新选取区域分析",
+        });
+      }
+    },
 
     /**
      * 计算两个面的交集面积
      * @param Points1
      * @param Points2
+     * @param Points3
      */
-    calculateIntersectArea(Points1, Points2) {
-      const geometry1 = this.AssemblySurface(Points1);
-      const geometry2 = this.AssemblySurface(Points2);
-      let areaPs = intersect(geometry1, geometry2);
+    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) {
         const areadifference = area(areaPs);
         return Number(areadifference.toFixed(2));
@@ -958,6 +1154,23 @@ export default {
 
       this.JTmyChart.setOption(option);
     },
+    //切换用地类型时加载用地规划图层
+    async handleChange() {
+      //先清空数据
+      this.formData.gyzdj = 0;
+      this.formData.jtzdj = 0;
+      this.LayerData.GYData.forEach((element) => {
+        element.fromData = [];
+      });
+      this.LayerData.JTData.forEach((element) => {
+        element.fromData = [];
+      });
+      this.LayerData.JZDJData = [];
+
+      await this.CalculateJZDJ();
+      await this.initGY();
+      await this.initJT();
+    },
 
     /**
      * 对数组字段分组并求和计算每个土地级别的总地价

+ 1 - 1
src/views/ConstructionApplication3D/ConstructionModelInfo/addConstructionModelInfo.vue

@@ -120,7 +120,7 @@ export default {
         if (valid) {
           that.form.projectinformationid = that.info.id;
           window.constructionmodel.push(that.form);
-          that.lyoption.cancel();
+          // that.lyoption.cancel();
           that.$layer.close(that.layerid);
         } else {
           return false;

File diff suppressed because it is too large
+ 528 - 324
src/views/ConstructionApplication3D/Demolition/DemolitionList.vue


+ 22 - 0
src/views/ConstructionApplication3D/Demolition/Property.vue

@@ -0,0 +1,22 @@
+<template>
+    <div class="ZTGlobal" >
+        <el-table :data="tableData" style="width: 100%">
+            <el-table-column prop="name" label="字段名" width="180">
+            </el-table-column>
+            <el-table-column prop="value" label="字段值" width="180">
+            </el-table-column>
+        </el-table>
+    </div>
+</template>
+
+<script>
+export default {
+    name: "Property",
+    props: ["tableData"],
+    data() {
+        return {
+
+        }
+    }
+}
+</script>

+ 95 - 101
src/views/ConstructionApplication3D/NightscapeAnalysis/NightscapeAnalysis.vue

@@ -137,26 +137,28 @@
 
 <script>
 import { v4 as uuidv4 } from "uuid";
+let entityPointLightPairs = new Map(),
+  entitySpotLightPairs = new Map(),
+  entityDirectionalLightPairs = new Map(),
+  GeoJsonLayerList = [],
+  liudongGntities = [],
+  pointLightSourceDrawHandler = null,
+  spotOrDirectionalLightSourceDrawHandler = null,
+  spotOrDirectionalLightSourceCountHandler = null,
+  spotOrDirectionalLightSourceAdding = false,
+  spotOrDirectionalLightPositions = [],
+  directionalLight_1 = null,
+  directionalLight_3 = null,
+  directionalLight_4 = null,
+  imageLayer = null;
 export default {
   data() {
     return {
       tooltip: createTooltip(document.body),
-      GeoJsonLayerList: [],
-      liudongGntities: [],
+      // GeoJsonLayerList: [],
+      // liudongGntities: [],
       sharedState: store.state,
       isNightscaoe: false,
-      directionalLight_1: null,
-      directionalLight_2: null,
-      directionalLight_3: null,
-      directionalLight_4: null,
-      pointLight3: null,
-      pointLight4: null,
-      pointLight5: null,
-      pointLight7: null,
-      pointLight8: null,
-
-      imageLayer: null,
-      layer: null,
       gyTableData: [],
       dgyform: {
         id: "",
@@ -172,14 +174,14 @@ export default {
         //   z: 0,
         // },
       },
-      pointLightSourceDrawHandler: null,
-      spotOrDirectionalLightSourceDrawHandler: null,
-      spotOrDirectionalLightSourceCountHandler: null,
-      spotOrDirectionalLightSourceAdding: false,
-      spotOrDirectionalLightPositions: [],
-      entityPointLightPairs: new Map(), // Entity和点光源对象的键值对
-      entitySpotLightPairs: new Map(), // Entity和聚光灯对象的键值对
-      entityDirectionalLightPairs: new Map(), // Entity和平行光对象的键值对
+      // pointLightSourceDrawHandler: null,
+      // spotOrDirectionalLightSourceDrawHandler: null,
+      // spotOrDirectionalLightSourceCountHandler: null,
+      // spotOrDirectionalLightSourceAdding: false,
+      // spotOrDirectionalLightPositions: [],
+      // entityPointLightPairs: new Map(), // Entity和点光源对象的键值对
+      // entitySpotLightPairs: new Map(), // Entity和聚光灯对象的键值对
+      // entityDirectionalLightPairs: new Map(), // Entity和平行光对象的键值对
       tycindex: 0,
     };
   },
@@ -255,7 +257,7 @@ export default {
 
         this.switchLight(true); //白天
         this.setHypsometric(false); //夜景材质
-        viewer.imageryLayers.remove(this.imageLayer);
+        viewer.imageryLayers.remove(imageLayer);
       } else {
         scene.sun.show = false;
         if (scene.layers.find("白天"))
@@ -269,7 +271,7 @@ export default {
         roadLine1
           .then(function (dataSource) {
             viewer.dataSources.add(dataSource);
-            that.GeoJsonLayerList.push(dataSource);
+            GeoJsonLayerList.push(dataSource);
             let lines_1 = dataSource.entities.values;
             for (let i = 0; i < lines_1.length; i++) {
               let line = lines_1[i];
@@ -296,7 +298,7 @@ export default {
         roadLine2
           .then(function (dataSource) {
             viewer.dataSources.add(dataSource);
-            that.GeoJsonLayerList.push(dataSource);
+            GeoJsonLayerList.push(dataSource);
             let lines_1 = dataSource.entities.values;
             for (let i = 0; i < lines_1.length; i++) {
               let line = lines_1[i];
@@ -464,12 +466,12 @@ export default {
         scene.skyAtmosphere.show = false;
 
         this.setHypsometric(true); //夜景
-        this.imageLayer = viewer.imageryLayers.addImageryProvider(
+        imageLayer = viewer.imageryLayers.addImageryProvider(
           new Cesium.SingleTileImageryProvider({
             url: "static/images/zt/Nightscape/BlackMarble_2016-1.jpg",
           })
         );
-        this.imageLayer.alpha = 0.5;
+        imageLayer.alpha = 0.5;
         this.gyTableData.forEach((element) => {
           this.addLightSource(element);
         });
@@ -660,13 +662,12 @@ export default {
           color: new Cesium.Color(220 / 255, 230 / 255, 240 / 255, 0.5),
           intensity: 1,
         };
-        this.directionalLight_1 &&
-          scene.removeLightSource(this.directionalLight_1);
-        this.directionalLight_1 = new Cesium.DirectionalLight(
+        directionalLight_1 && scene.removeLightSource(directionalLight_1);
+        directionalLight_1 = new Cesium.DirectionalLight(
           position,
           dirLightOptions
         );
-        scene.addLightSource(this.directionalLight_1);
+        scene.addLightSource(directionalLight_1);
 
         //新增直射光1--东北侧光
         var position3 = new Cesium.Cartesian3.fromDegrees(
@@ -684,13 +685,12 @@ export default {
           color: new Cesium.Color(220 / 255, 223 / 255, 227 / 255, 0.5),
           intensity: 1.5,
         };
-        this.directionalLight_3 &&
-          scene.removeLightSource(this.directionalLight_3);
-        this.directionalLight_3 = new Cesium.DirectionalLight(
+        directionalLight_3 && scene.removeLightSource(directionalLight_3);
+        directionalLight_3 = new Cesium.DirectionalLight(
           position3,
           dirLightOptions3
         );
-        scene.addLightSource(this.directionalLight_3);
+        scene.addLightSource(directionalLight_3);
         //新增直射光1--顶光
         var position4 = new Cesium.Cartesian3.fromDegrees(
           109.5264539133307,
@@ -708,13 +708,12 @@ export default {
           color: Cesium.Color.SILVER.withAlpha(0.5),
           intensity: 0.1,
         };
-        this.directionalLight_4 &&
-          scene.removeLightSource(this.directionalLight_4);
-        this.directionalLight_4 = new Cesium.DirectionalLight(
+        directionalLight_4 && scene.removeLightSource(directionalLight_4);
+        directionalLight_4 = new Cesium.DirectionalLight(
           position4,
           dirLightOptions4
         );
-        scene.addLightSource(this.directionalLight_4);
+        scene.addLightSource(directionalLight_4);
       }
     },
     //设置白膜自发光纹理
@@ -828,7 +827,7 @@ export default {
               ),
             },
           });
-          this.liudongGntities.push(dl);
+          liudongGntities.push(dl);
           let dls = viewer.entities.add({
             id: route.properties.OBJECTID,
             polyline: {
@@ -853,7 +852,7 @@ export default {
               }),
             },
           });
-          this.liudongGntities.push(dls);
+          liudongGntities.push(dls);
         });
       });
     },
@@ -918,28 +917,28 @@ export default {
     addPoint() {
       switch (this.dgyform.gyType) {
         case "点光源":
-          if (this.pointLightSourceDrawHandler) {
-            this.pointLightSourceDrawHandler.clear();
-            this.pointLightSourceDrawHandler = null;
+          if (pointLightSourceDrawHandler) {
+            pointLightSourceDrawHandler.clear();
+            pointLightSourceDrawHandler = null;
           }
           this.initPointLightSourceDrawHandler();
-          this.pointLightSourceDrawHandler.activate();
+          pointLightSourceDrawHandler.activate();
           break;
         case "聚光灯":
         case "直射光":
-          if (this.spotOrDirectionalLightSourceDrawHandler) {
-            this.spotOrDirectionalLightSourceDrawHandler.clear();
-            this.spotOrDirectionalLightSourceDrawHandler = null;
-            this.spotOrDirectionalLightPositions = [];
-            this.spotOrDirectionalLightSourceDrawHandler.deactivate();
+          if (spotOrDirectionalLightSourceDrawHandler) {
+            spotOrDirectionalLightSourceDrawHandler.clear();
+            spotOrDirectionalLightSourceDrawHandler = null;
+            spotOrDirectionalLightPositions = [];
+            spotOrDirectionalLightSourceDrawHandler.deactivate();
           }
-          if (this.spotOrDirectionalLightSourceCountHandler) {
-            this.spotOrDirectionalLightSourceCountHandler.destroy();
-            this.spotOrDirectionalLightSourceCountHandler = undefined;
+          if (spotOrDirectionalLightSourceCountHandler) {
+            spotOrDirectionalLightSourceCountHandler.destroy();
+            spotOrDirectionalLightSourceCountHandler = undefined;
           }
           this.initSpotOrDirectionalLightSourceDrawHandler();
-          this.spotOrDirectionalLightSourceAdding = true;
-          this.spotOrDirectionalLightSourceDrawHandler.activate();
+          spotOrDirectionalLightSourceAdding = true;
+          spotOrDirectionalLightSourceDrawHandler.activate();
           break;
         default:
           break;
@@ -948,11 +947,11 @@ export default {
     initPointLightSourceDrawHandler() {
       let that = this;
       this.clearLightSource();
-      this.pointLightSourceDrawHandler = new Cesium.DrawHandler(
+      pointLightSourceDrawHandler = new Cesium.DrawHandler(
         viewer,
         Cesium.DrawMode.Point
       );
-      this.pointLightSourceDrawHandler.activeEvt.addEventListener(function (
+      pointLightSourceDrawHandler.activeEvt.addEventListener(function (
         isActive
       ) {
         if (isActive == true) {
@@ -964,7 +963,7 @@ export default {
           document.body.classList.remove("drawCur");
         }
       });
-      this.pointLightSourceDrawHandler.movingEvt.addEventListener(
+      pointLightSourceDrawHandler.movingEvt.addEventListener(
         (windowPosition) => {
           that.tooltip.showAt(
             windowPosition,
@@ -972,7 +971,7 @@ export default {
           );
         }
       );
-      this.pointLightSourceDrawHandler.drawEvt.addEventListener((result) => {
+      pointLightSourceDrawHandler.drawEvt.addEventListener((result) => {
         let xyz = result.object.position;
         let cartesian = this.cartesianToWgs84(xyz.x, xyz.y, xyz.z);
         this.dgyform.cartesian = cartesian;
@@ -1004,23 +1003,23 @@ export default {
             disableDepthTestDistance: Number.POSITIVE_INFINITY, // 关闭深度检测,使billboard不至于被裁剪
           },
         });
-        console.log(this.entityPointLightPairs);
-        this.entityPointLightPairs.set(entityAsKey, pointLight);
-        this.pointLightSourceDrawHandler.clear();
-        this.pointLightSourceDrawHandler = null;
+        console.log(entityPointLightPairs);
+        entityPointLightPairs.set(entityAsKey, pointLight);
+        pointLightSourceDrawHandler.clear();
+        pointLightSourceDrawHandler = null;
         this.tooltip.setVisible(false);
       });
     },
     initSpotOrDirectionalLightSourceDrawHandler() {
       let that = this;
       that.clearLightSource();
-      this.spotOrDirectionalLightSourceDrawHandler = new Cesium.DrawHandler(
+      spotOrDirectionalLightSourceDrawHandler = new Cesium.DrawHandler(
         viewer,
         Cesium.DrawMode.Line
       );
-      this.spotOrDirectionalLightSourceCountHandler =
+      spotOrDirectionalLightSourceCountHandler =
         new Cesium.ScreenSpaceEventHandler(scene.canvas);
-      this.spotOrDirectionalLightSourceDrawHandler.activeEvt.addEventListener(
+      spotOrDirectionalLightSourceDrawHandler.activeEvt.addEventListener(
         function (isActive) {
           if (isActive == true) {
             viewer.enableCursorStyle = false;
@@ -1032,7 +1031,7 @@ export default {
           }
         }
       );
-      this.spotOrDirectionalLightSourceDrawHandler.movingEvt.addEventListener(
+      spotOrDirectionalLightSourceDrawHandler.movingEvt.addEventListener(
         (windowPosition) => {
           this.tooltip.showAt(
             windowPosition,
@@ -1040,7 +1039,7 @@ export default {
           );
         }
       );
-      this.spotOrDirectionalLightSourceDrawHandler.drawEvt.addEventListener(
+      spotOrDirectionalLightSourceDrawHandler.drawEvt.addEventListener(
         (result) => {
           let positions = (result.object && result.object.positions) || result;
           if (positions.length !== 2) {
@@ -1074,7 +1073,7 @@ export default {
                 disableDepthTestDistance: Number.POSITIVE_INFINITY, // 关闭深度检测,使billboard不至于被裁剪
               },
             });
-            this.entitySpotLightPairs.set(entityAsKey, spotLight);
+            entitySpotLightPairs.set(entityAsKey, spotLight);
           } else if (that.dgyform.gyType === "直射光") {
             let directionalLightOptions = {
               targetPosition: positions[1],
@@ -1099,36 +1098,31 @@ export default {
                 disableDepthTestDistance: Number.POSITIVE_INFINITY, // 关闭深度检测,使billboard不至于被裁剪
               },
             });
-            this.entityDirectionalLightPairs.set(entityAsKey, directionalLight);
+            entityDirectionalLightPairs.set(entityAsKey, directionalLight);
           }
-          this.spotOrDirectionalLightPositions = [];
-          this.spotOrDirectionalLightSourceDrawHandler.clear();
-          this.spotOrDirectionalLightSourceDrawHandler = null;
+          spotOrDirectionalLightPositions = [];
+          spotOrDirectionalLightSourceDrawHandler.clear();
+          spotOrDirectionalLightSourceDrawHandler = null;
           this.tooltip.setVisible(false);
         }
       );
 
-      this.spotOrDirectionalLightSourceCountHandler.setInputAction(function (
-        e
-      ) {
-        if (that.spotOrDirectionalLightSourceAdding) {
-          that.spotOrDirectionalLightPositions.push(
-            scene.pickPosition(e.position)
-          );
-          if (that.spotOrDirectionalLightPositions.length === 2) {
-            if (that.spotOrDirectionalLightSourceCountHandler) {
-              that.spotOrDirectionalLightSourceCountHandler.destroy();
-              that.spotOrDirectionalLightSourceCountHandler = undefined;
+      spotOrDirectionalLightSourceCountHandler.setInputAction(function (e) {
+        if (spotOrDirectionalLightSourceAdding) {
+          spotOrDirectionalLightPositions.push(scene.pickPosition(e.position));
+          if (spotOrDirectionalLightPositions.length === 2) {
+            if (spotOrDirectionalLightSourceCountHandler) {
+              spotOrDirectionalLightSourceCountHandler.destroy();
+              spotOrDirectionalLightSourceCountHandler = undefined;
             }
-            that.spotOrDirectionalLightSourceDrawHandler.deactivate();
-            that.spotOrDirectionalLightSourceAdding = false;
-            that.spotOrDirectionalLightSourceDrawHandler.drawEvt.raiseEvent(
-              that.spotOrDirectionalLightPositions
+            spotOrDirectionalLightSourceDrawHandler.deactivate();
+            spotOrDirectionalLightSourceAdding = false;
+            spotOrDirectionalLightSourceDrawHandler.drawEvt.raiseEvent(
+              spotOrDirectionalLightPositions
             );
           }
         }
-      },
-      Cesium.ScreenSpaceEventType.LEFT_CLICK);
+      }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
     },
 
     addLightSource(gyData) {
@@ -1209,26 +1203,26 @@ export default {
       isRemoveLightSource = true,
       isAllRemoveLightSource = false
     ) {
-      for (let key of this.entityPointLightPairs.keys()) {
+      for (let key of entityPointLightPairs.keys()) {
         viewer.entities.remove(key);
         if (isRemoveLightSource)
-          scene.removeLightSource(this.entityPointLightPairs.get(key));
+          scene.removeLightSource(entityPointLightPairs.get(key));
       }
-      this.entityPointLightPairs.clear();
+      entityPointLightPairs.clear();
 
-      for (let key of this.entitySpotLightPairs.keys()) {
+      for (let key of entitySpotLightPairs.keys()) {
         viewer.entities.remove(key);
         if (isRemoveLightSource)
-          scene.removeLightSource(this.entitySpotLightPairs.get(key));
+          scene.removeLightSource(entitySpotLightPairs.get(key));
       }
-      this.entitySpotLightPairs.clear();
+      entitySpotLightPairs.clear();
 
-      for (let key of this.entityDirectionalLightPairs.keys()) {
+      for (let key of entityDirectionalLightPairs.keys()) {
         viewer.entities.remove(key);
         if (isRemoveLightSource)
-          scene.removeLightSource(this.entityDirectionalLightPairs.get(key));
+          scene.removeLightSource(entityDirectionalLightPairs.get(key));
       }
-      this.entityDirectionalLightPairs.clear();
+      entityDirectionalLightPairs.clear();
 
       if (isAllRemoveLightSource) {
         while (scene.lightSource.pointLight.values.length > 0) {
@@ -1240,10 +1234,10 @@ export default {
         while (scene.lightSource.directionalLight.values.length > 0) {
           scene.removeLightSource(scene.lightSource.directionalLight.values[0]);
         }
-        this.GeoJsonLayerList.forEach((element) => {
+        GeoJsonLayerList.forEach((element) => {
           viewer.dataSources.remove(element);
         });
-        this.liudongGntities.forEach((element) => {
+        liudongGntities.forEach((element) => {
           viewer.entities.remove(element);
         });
       }

+ 42 - 41
src/views/ConstructionApplication3D/SunlightAnalysis/SunlightAnalysis.vue

@@ -105,6 +105,9 @@
 </template>
 
 <script>
+let handlerPolygon = null,
+  layers = null,
+  shadowQuery = null;
 export default {
   data() {
     return {
@@ -121,8 +124,8 @@ export default {
       datavalue: [8, 18],
       positions: [],
       points: [],
-      layers: null,
-      shadowQuery: null,
+      // layers: null,
+      // shadowQuery: null,
       marks: {
         8: "8点",
         12: {
@@ -133,7 +136,6 @@ export default {
         },
         20: "20点",
       },
-      handlerPolygon: null,
     };
   },
   props: {
@@ -166,7 +168,7 @@ export default {
   },
   methods: {
     init() {
-      if (this.layers) {
+      if (layers) {
         return;
       }
       if (viewer.shadows == false) {
@@ -174,29 +176,28 @@ export default {
         viewer.terrainShadows = true; //地形阴影
       }
       let scene = viewer.scene;
-      this.layers = scene.layers.layerQueue;
+      layers = scene.layers.layerQueue;
       //图层模型设置阴影
-      for (let i = 0; i < this.layers.length; i++) {
-        if (this.layers[i].shadowType !== 2) {
-          this.layers[i].shadowType = 2;
-          // this.layers[i].refresh();
+      for (let i = 0; i < layers.length; i++) {
+        if (layers[i].shadowType !== 2) {
+          layers[i].shadowType = 2;
+          // layers[i].refresh();
         }
       }
 
       //创建阴影查询对象
-      if (!this.shadowQuery) {
-        this.shadowQuery = new Cesium.ShadowQueryPoints(scene);
-        this.shadowQuery.build();
+      if (!shadowQuery) {
+        shadowQuery = new Cesium.ShadowQueryPoints(scene);
+        shadowQuery.build();
       }
       let that = this;
       //   this.setCurrentTime();
       this.dqSunlight();
-      this.handlerPolygon = new Cesium.DrawHandler(
+      handlerPolygon = new Cesium.DrawHandler(
         viewer,
         Cesium.DrawMode.Polygon,
         0
       );
-      let handlerPolygon = this.handlerPolygon;
       handlerPolygon.activeEvt.addEventListener(function (isActive) {
         if (isActive == true) {
           viewer.enableCursorStyle = false;
@@ -245,27 +246,27 @@ export default {
         var dateValue = that.form.selDate;
         var st = new Date(dateValue);
         st.setHours(Number(that.form.startTime));
-        that.shadowQuery.startTime = Cesium.JulianDate.fromDate(st);
+        shadowQuery.startTime = Cesium.JulianDate.fromDate(st);
 
         var et = new Date(dateValue);
         et.setHours(Number(that.form.endTime));
-        that.shadowQuery.endTime = Cesium.JulianDate.fromDate(et);
+        shadowQuery.endTime = Cesium.JulianDate.fromDate(et);
 
         //设置当前时间
         that.setCurrentTime();
 
-        that.shadowQuery.spacing = that.form.spacing;
-        that.shadowQuery.timeInterval = that.form.timeInterval;
+        shadowQuery.spacing = that.form.spacing;
+        shadowQuery.timeInterval = that.form.timeInterval;
 
         //设置分析区域、底部高程和拉伸高度
         var bh = Number(that.form.bottomHeight);
         var eh = Number(that.form.extrudeHeight);
-        that.shadowQuery.qureyRegion({
+        shadowQuery.qureyRegion({
           position: points,
           bottom: bh,
           extend: eh,
         });
-        that.shadowQuery.build();
+        shadowQuery.build();
       });
     },
 
@@ -283,12 +284,12 @@ export default {
     analysis() {
       // this.init();
 
-      this.handlerPolygon.deactivate();
-      this.handlerPolygon.activate();
+      handlerPolygon.deactivate();
+      handlerPolygon.activate();
     },
     clear() {
-      if (this.handlerPolygon) {
-        this.handlerPolygon.deactivate();
+      if (handlerPolygon) {
+        handlerPolygon.deactivate();
       }
       this.tooltip.setVisible(false);
       // common.clearHandlerDrawing();
@@ -298,8 +299,8 @@ export default {
       // for (var i = 0; i < layers.length; i++) {
       //   layers[i].shadowType = 0;
       // }
-      if (this.shadowQuery) {
-        this.shadowQuery.qureyRegion({
+      if (shadowQuery) {
+        shadowQuery.qureyRegion({
           position: [0, 0],
           bottom: 0,
           extend: 0,
@@ -364,23 +365,23 @@ export default {
       st.setHours(this.form.startTime);
       let et = new Date(newValue);
       et.setHours(this.form.endTime);
-      this.shadowQuery.startTime = Cesium.JulianDate.fromDate(st);
-      this.shadowQuery.endTime = Cesium.JulianDate.fromDate(et);
+      shadowQuery.startTime = Cesium.JulianDate.fromDate(st);
+      shadowQuery.endTime = Cesium.JulianDate.fromDate(et);
     },
     "form.startTime": function (newValue) {
       let thisdate = new Date(this.form.selDate);
       var st = thisdate;
       st.setHours(Number(newValue));
-      this.shadowQuery.startTime = Cesium.JulianDate.fromDate(st);
+      shadowQuery.startTime = Cesium.JulianDate.fromDate(st);
     },
     "form.endTime": function (newValue) {
       let thisdate = new Date(this.form.selDate);
       var et = thisdate;
       et.setHours(Number(newValue));
-      this.shadowQuery.endTime = Cesium.JulianDate.fromDate(et);
+      shadowQuery.endTime = Cesium.JulianDate.fromDate(et);
     },
     "form.timeInterval": function (newValue) {
-      this.shadowQuery.timeInterval = Number(newValue);
+      shadowQuery.timeInterval = Number(newValue);
       // var bh = Number(this.bottomHeight);
       // var eh = Number(this.extrudeHeight);
       // shadowQuery.qureyRegion({
@@ -388,10 +389,10 @@ export default {
       //   bottom: bh,
       //   extend: eh
       // });
-      this.shadowQuery.build();
+      shadowQuery.build();
     },
     "form.spacing": function (newValue) {
-      this.shadowQuery.spacing = Number(newValue);
+      shadowQuery.spacing = Number(newValue);
       // var bh = Number(this.bottomHeight);
       // var eh = Number(this.extrudeHeight);
       // shadowQuery.qureyRegion({
@@ -399,34 +400,34 @@ export default {
       //   bottom: bh,
       //   extend: eh
       // });
-      this.shadowQuery.build();
+      shadowQuery.build();
     },
     "form.bottomHeight": function (newValue) {
       var bh = Number(newValue);
       var eh = Number(this.form.extrudeHeight);
-      this.shadowQuery.qureyRegion({
+      shadowQuery.qureyRegion({
         position: this.points,
         bottom: bh,
         extend: eh,
       });
-      this.shadowQuery.build();
+      shadowQuery.build();
     },
     "form.extrudeHeight": function (newValue) {
       var bh = Number(this.form.bottomHeight);
       var eh = Number(newValue);
-      this.shadowQuery.qureyRegion({
+      shadowQuery.qureyRegion({
         position: this.points,
         bottom: bh,
         extend: eh,
       });
-      this.shadowQuery.build();
+      shadowQuery.build();
     },
   },
   beforeDestroy() {
     this.clear();
-    this.shadowQuery.destroy();
-    this.handlerPolygon.deactivate();
-    this.handlerPolygon = undefined;
+    shadowQuery.destroy();
+    handlerPolygon.deactivate();
+    handlerPolygon = undefined;
     this.dqSunlight();
   },
 };

+ 13 - 13
src/views/ConstructionApplication3D/billboard/addBiillboardModel.vue

@@ -196,7 +196,10 @@
 import { Image } from "element-ui";
 import { watch } from "vue";
 import { v4 as uuidv4 } from "uuid";
-
+/**
+ * 添加的模型集合
+ */
+let modelList = [];
 export default {
   props: {
     layerid: {
@@ -254,10 +257,7 @@ export default {
        * 当前编辑模型
        */
       currentEntity: null,
-      /**
-       * 添加的模型集合
-       */
-      modelList: [],
+
       point3D: null,
       GUID: "",
     };
@@ -287,13 +287,13 @@ export default {
      */
     addModel() {
       var that = this;
-      if (this.modelList.length > 0) {
-        for (let index = 0; index < this.modelList.length; index++) {
-          const element = this.modelList[index];
+      if (modelList.length > 0) {
+        for (let index = 0; index < modelList.length; index++) {
+          const element = modelList[index];
           viewer.entities.removeById(element.id);
         }
 
-        this.modelList = [];
+        modelList = [];
       }
 
       viewer._container.style.cursor = "pointer";
@@ -373,7 +373,7 @@ export default {
           orientation: orientation,
         });
         debugger;
-        that.modelList.push(entity);
+        modelList.push(entity);
         if (that.handlerPoint)
           that.handlerPoint.removeInputAction(
             Cesium.ScreenSpaceEventType.LEFT_CLICK
@@ -490,7 +490,7 @@ export default {
         return;
       }
 
-      if (that.modelList.length == 0) {
+      if (modelList.length == 0) {
         this.$message.error("请先完成[添加广告牌],再保存");
         return;
       }
@@ -502,7 +502,7 @@ export default {
         type: "success",
       });
       viewer.entities.removeAll();
-      that.lyoption.cancel();
+      // that.lyoption.cancel();
       that.$layer.close(that.layerid);
     },
     //取消
@@ -511,7 +511,7 @@ export default {
         this.handlerPoint.removeInputAction(
           Cesium.ScreenSpaceEventType.LEFT_CLICK
         );
-      this.modelList = [];
+      modelList = [];
       viewer.entities.removeAll();
 
       this.$layer.close(this.layerid);

+ 1 - 1
src/views/ConstructionApplication3D/billboard/addBillboardPoject.vue

@@ -141,7 +141,7 @@ export default {
         if (valid) {
           that.form.id = uuidv4();
           window.billboardInfoList.push(that.form);
-          that.lyoption.cancel();
+          // that.lyoption.cancel();
           that.$layer.close(that.layerid);
         } else {
           return false;

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

@@ -282,7 +282,7 @@ export default {
         message: "审查完成",
         type: "success",
       });
-      this.lyoption.cancel();
+      // this.lyoption.cancel();
       this.$layer.close(this.layerid);
     },
     /**

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

@@ -98,6 +98,7 @@ import billboarddetail from "@/views/ConstructionApplication3D/billboard/billboa
 import billboardCheck from "@/views/ConstructionApplication3D/billboard/billboardCheckList.vue";
 import addBiillboardModel from "@/views/ConstructionApplication3D/billboard/addBiillboardModel.vue";
 import lodash from "lodash-es";
+let entityList = [];
 export default {
   data() {
     return {
@@ -108,18 +109,17 @@ export default {
       deltailLayerId: null,
       checklLayerId: null,
       addlLayerId: null,
-      entityList: [],
+      // entityList: [],
     };
   },
   computed: {},
   mounted() {
     // this.init();
-    debugger;
     let that = this;
     var promisse11w = scene.open(window.billboardModelLT.url);
     Cesium.when(promisse11w, function (layers) {
       layers.forEach((element) => {
-        that.thislayers.push(element);
+        that.thislayers.push(element.name);
       });
     });
   },
@@ -162,7 +162,7 @@ export default {
         }
       });
 
-      window.viewer.flyTo(this.entityList);
+      window.viewer.flyTo(entityList);
     },
 
     /**
@@ -190,8 +190,8 @@ export default {
 
     billboarddetial(item) {
       this.locationModel(item);
-      if (this.deltailLayerId != null) this.$layer.close(this.deltailLayerId);
-      this.deltailLayerId = this.$layer.iframe({
+      this.$layer.iframe({
+        id: "billboarddetail",
         content: {
           content: billboarddetail, //传递的组件对象
           parent: this, //当前的vue对象
@@ -325,7 +325,7 @@ export default {
           clampToGround: true,
         },
       });
-      this.entityList.push(line);
+      entityList.push(line);
     },
     /**
      * 绘制广告牌
@@ -385,7 +385,7 @@ export default {
         // },
         orientation: orientation,
       });
-      this.entityList.push(entity);
+      entityList.push(entity);
       const point = viewer.entities.add({
         id: "pointBillboard_" + billboardModel.id,
         //点
@@ -421,7 +421,7 @@ export default {
       if (item) {
         viewer.entities.removeById("ggwxmfw-" + item.id);
         lodash.remove(
-          this.entityList,
+          entityList,
           (entity) => entity.id === "ggwxmfw-" + item.id
         );
       }
@@ -431,26 +431,26 @@ export default {
       if (item) {
         viewer.entities.removeById("billboard_" + item.id);
         lodash.remove(
-          this.entityList,
+          entityList,
           (entity) => entity.id === "billboard_" + item.id
         );
         viewer.entities.removeById("pointBillboard_" + item.id);
         lodash.remove(
-          this.entityList,
+          entityList,
           (entity) => entity.id === "pointBillboard_" + item.id
         );
       }
     },
     removeAllentities() {
       viewer.entities.removeAll();
-      this.entityList = [];
+      entityList = [];
     },
   },
   beforeDestroy() {
     this.removeAllentities();
     debugger;
     this.thislayers.forEach((element) => {
-      scene.layers.remove(element.name);
+      scene.layers.remove(element);
     });
   },
 };

+ 1 - 1
src/views/ConstructionApplication3D/projectInfo/addProjectInfo.vue

@@ -180,7 +180,7 @@ export default {
           that.form.meetingProgress = 0;
           window.projectinformation.push(that.form);
           debugger;
-          that.lyoption.cancel();
+          // that.lyoption.cancel();
           that.$layer.close(that.layerid);
         } else {
           return false;

+ 13 - 11
src/views/ConstructionApplication3D/projectManagement/projectManagement.vue

@@ -920,7 +920,7 @@ export default {
       Cesium.when(modelLayer, async function (layers) {
         debugger;
         layers.forEach((layer) => {
-          that.layerList.push(layer);
+          that.layerList.push(layer.name);
         });
 
         //获取模型信息
@@ -1050,7 +1050,7 @@ export default {
                   }
                 }
 
-                modelData.layers.push(element);
+                modelData.layers.push(element.name);
               });
               //获取模型信息
               let queryBySQLParameters = {
@@ -1175,7 +1175,7 @@ export default {
     removeModel() {
       // this.qxyp();
       this.layerList.forEach((element) => {
-        scene.layers.remove(element.name);
+        scene.layers.remove(element);
       });
       this.layerList = [];
       this.layerDataList.forEach((element) => {
@@ -1187,7 +1187,7 @@ export default {
       //清除多模型图层,数据
       this.modelsload.forEach((model) => {
         model.layers.forEach((element) => {
-          scene.layers.remove(element.name);
+          scene.layers.remove(element);
         });
 
         // model.layerDataList.forEach((layerData) => {
@@ -1200,7 +1200,8 @@ export default {
     //定位模型
     positionModel(Minfo) {
       if (this.layerList.length > 0) {
-        viewer.flyTo(this.layerList[0]);
+        let layer = scene.layers.find(this.layerList[0]);
+        viewer.flyTo(layer);
       } else {
         this.addModel(Minfo);
       }
@@ -1669,7 +1670,7 @@ export default {
                 clampToGround: true,
               },
             });
-            DLlayerData.entities.push(line);
+            DLlayerData.entities.push(line.id);
 
             that.DLlayerDatas.push(DLlayerData);
           });
@@ -1748,7 +1749,7 @@ export default {
                   clampToGround: true,
                 },
               });
-              DLlayerData.entities.push(line);
+              DLlayerData.entities.push(line.id);
             } else {
               const line = viewer.entities.add({
                 id: "DLX-" + DLlayerData.id,
@@ -1759,7 +1760,7 @@ export default {
                   clampToGround: true,
                 },
               });
-              DLlayerData.entities.push(line);
+              DLlayerData.entities.push(line.id);
             }
 
             that.DLlayerDatas.push(DLlayerData);
@@ -1833,7 +1834,7 @@ export default {
               },
             });
 
-            DLlayerData.entities.push(line);
+            DLlayerData.entities.push(line.id);
             that.DLlayerDatas.push(DLlayerData);
           });
         }
@@ -2340,9 +2341,10 @@ export default {
       viewer.entities.removeById("polygonA");
       viewer.entities.removeById("JZXGD-A");
 
-      this.layerList.forEach((layer) => {
+      this.layerList.forEach((layerName) => {
         var hyp = new Cesium.HypsometricSetting();
         hyp.MaxVisibleValue = -1000;
+        let layer = scene.layers.find(layerName);
         layer.hypsometricSetting = {
           hypsometricSetting: hyp,
           analysisMode:
@@ -2381,7 +2383,7 @@ export default {
       for (let index = 0; index < this.DLlayerDatas.length; index++) {
         const element = this.DLlayerDatas[index];
         element.entities.forEach((entitie) => {
-          viewer.entities.remove(entitie);
+          viewer.entities.removeById(entitie);
         });
       }
       this.DLlayerDatas = [];

+ 38 - 37
src/views/ConstructionApplication3D/skylineAnalysis/skylineAnalysis.vue

@@ -132,6 +132,7 @@
 
 <script>
 import elementResizeDetectorMaker from "element-resize-detector";
+let skyline = null;
 export default {
   data() {
     return {
@@ -149,7 +150,7 @@ export default {
         highlightBarrier: false,
         Skyline2D: false,
       },
-      skyline: null,
+      // skyline: null,
       myChart: null,
       s3mInstance: null,
       flag: false,
@@ -211,8 +212,8 @@ export default {
       let that = this;
       this.clear(); // 清除上一次分析结果
       this.flag = true;
-      if (!this.skyline) {
-        this.skyline = new Cesium.Skyline(scene);
+      if (!skyline) {
+        skyline = new Cesium.Skyline(scene);
       }
 
       let cartographic = scene.camera.positionCartographic;
@@ -220,25 +221,25 @@ export default {
       let latitude = Cesium.Math.toDegrees(cartographic.latitude);
       let height = cartographic.height;
       // 天际线分析的视口位置设置成当前相机位置
-      this.skyline.viewPosition = [longitude, latitude, height];
+      skyline.viewPosition = [longitude, latitude, height];
 
       this.form.viewlongitude = longitude.toFixed(6);
       this.form.viewlatitude = latitude.toFixed(6);
       this.form.viewheight = height.toFixed(6);
 
       //设置俯仰和方向
-      this.skyline.pitch = Cesium.Math.toDegrees(scene.camera.pitch);
-      this.skyline.direction = Cesium.Math.toDegrees(scene.camera.heading);
+      skyline.pitch = Cesium.Math.toDegrees(scene.camera.pitch);
+      skyline.direction = Cesium.Math.toDegrees(scene.camera.heading);
 
-      this.form.pitch = this.skyline.pitch;
-      this.form.direction = this.skyline.direction;
-      this.skyline.radius = this.form.skylineRadius;
-      this.skyline.lineWidth = Number(this.form.lineWidth);
+      this.form.pitch = skyline.pitch;
+      this.form.direction = skyline.direction;
+      skyline.radius = this.form.skylineRadius;
+      skyline.lineWidth = Number(this.form.lineWidth);
       let color = Cesium.Color.fromCssColorString(this.form.skylineColor);
-      this.skyline.color = color;
-      this.skyline.displayStyle = this.form.skylineMode;
-      this.skyline.setVisibleInViewport(1);
-      this.skyline.build();
+      skyline.color = color;
+      skyline.displayStyle = this.form.skylineMode;
+      skyline.setVisibleInViewport(1);
+      skyline.build();
 
       setTimeout(function () {
         // 延时执行的函数
@@ -257,9 +258,9 @@ export default {
       this.getSkyline2D(false);
       // viewer.entities.removeAll();
       // scene.primitives._primitives = [];
-      if (this.skyline) {
-        this.skyline.clear();
-        this.skyline = null;
+      if (skyline) {
+        skyline.clear();
+        skyline = null;
       }
 
       for (var i = 0; i < scene.layers._layerQueue.length; i++) {
@@ -282,21 +283,21 @@ export default {
      * @param isShow 是否显示
      */
     ObstacleSwitching(isShow = true) {
-      console.log(JSON.stringify(this.skyline.getObjectIds()));
-      if (this.skyline && isShow) {
+      console.log(JSON.stringify(skyline.getObjectIds()));
+      if (skyline && isShow) {
         let BarrierColor = Cesium.Color.fromCssColorString(
           this.form.highlightBarrierColor
         );
-        let ObjectIds = this.skyline.getObjectIds();
+        let ObjectIds = skyline.getObjectIds();
         for (let index in ObjectIds) {
           //   let layer = scene.layers.findByIndex(Number(index)); // 底层索引从3开始
           let layer = scene.layers.layerQueue.find(
             (c) => c.id == Number(index)
           );
-          let ids = this.skyline.getObjectIds()[index];
+          let ids = skyline.getObjectIds()[index];
           layer.setObjsColor(ids, BarrierColor);
         }
-      } else if (this.skyline && !isShow) {
+      } else if (skyline && !isShow) {
         for (var i = 0; i < scene.layers._layerQueue.length; i++) {
           var layer = scene.layers.findByIndex(i);
           layer.removeAllObjsColor();
@@ -313,7 +314,7 @@ export default {
         console.log(this.$refs.echartF.style.display);
         this.myChart = window.echarts.init(this.$refs.skyEcharts);
 
-        let object = this.skyline.getSkyline2D();
+        let object = skyline.getSkyline2D();
         let option = {
           backgroundColor: "rgba(73,139,156,0.0)",
           grid: {
@@ -366,29 +367,29 @@ export default {
 
     "form.direction": function (newValue) {
       if (this.flag) {
-        this.skyline.direction = parseFloat(newValue);
+        skyline.direction = parseFloat(newValue);
       }
     },
     "form.pitch": function (newValue) {
       if (this.flag) {
-        this.skyline.pitch = parseFloat(newValue);
+        skyline.pitch = parseFloat(newValue);
       }
     },
     "form.skylineRadius": function (newValue) {
       if (this.flag) {
-        this.skyline.radius = parseFloat(newValue);
+        skyline.radius = parseFloat(newValue);
       }
     },
     "form.lineWidth": function (newValue) {
       if (this.flag) {
-        this.skyline.lineWidth = parseFloat(newValue);
+        skyline.lineWidth = parseFloat(newValue);
       }
     },
     "form.skylineColor": function (newValue) {
       if (this.flag) {
         let color = Cesium.Color.fromCssColorString(newValue);
-        if (this.skyline) {
-          this.skyline.color = color;
+        if (skyline) {
+          skyline.color = color;
         }
       }
     },
@@ -396,31 +397,31 @@ export default {
       this.form.highlightBarrierColor = newValue;
     },
     "form.highlightBarrier": function (newValue) {
-      // let skyline = this.skyline;
-      if (newValue && this.skyline) {
+      // let skyline = skyline;
+      if (newValue && skyline) {
         this.ObstacleSwitching(true);
-      } else if (!newValue && this.skyline) {
+      } else if (!newValue && skyline) {
         this.ObstacleSwitching(false);
       }
     },
     "form.Skyline2D": function (newValue) {
-      if (newValue && this.skyline) {
+      if (newValue && skyline) {
         this.getSkyline2D(true);
-      } else if (!newValue && this.skyline) {
+      } else if (!newValue && skyline) {
         this.getSkyline2D(false);
       }
     },
     "form.skylineMode": function (newValue) {
       this.form.skylineMode = Number(newValue);
-      if (!this.skyline) {
+      if (!skyline) {
         return;
       }
       let value = newValue;
       if (value == "0") {
-        this.skyline.displayStyle = 0;
+        skyline.displayStyle = 0;
         // scene.primitives._primitives = [];
       } else if (value == "1") {
-        this.skyline.displayStyle = 1;
+        skyline.displayStyle = 1;
         // scene.primitives._primitives = [];
       }
     },

+ 214 - 102
static/Config/config.js

@@ -65,6 +65,104 @@ window.layerTreeNodes = [
     ],
   },
 ];
+/**
+ * 用地用海分类颜色
+ */
+window.colorList = [
+  { name: "水田,旱地,水浇地", color: "rgb(245,248,220)" },
+  { name: "果园,茶园,橡胶园地,油料园地,其他园地", color: "rgb(191,233,170)" },
+  { name: "乔木林地,竹林地,灌木林地,其他林地", color: "rgb(104,177,103)" },
+  { name: "天然牧草地,人工牧草地,其他草地", color: "rgb(205,245,122)" },
+  {
+    name: "森林沼泽,灌丛沼泽,沼泽草地,其他沼泽地,沿海滩涂,内陆滩涂,红树林地",
+    color: "rgb(101,205,170)",
+  },
+  {
+    name: "农村道路,村道用地,田间道,设施农用地,种植设施建设用地,畜禽养殖设施建设用地,水产养殖设施建设用地",
+    color: "rgb(216,215,159)",
+  },
+  {
+    name: "城镇住宅用地,一类城镇住宅用地,二类城镇住宅用地,三类城镇住宅用地,城镇社区服务设施用地",
+    color: "rgb(255,255,45)",
+  },
+  {
+    name: "一类农村宅基地,二类农村宅基地,农村社区服务设施用地",
+    color: "rgb(255,211,128)",
+  },
+  { name: "机关团体用地", color: "rgb(255,0,255)" },
+  { name: "文化用地,图书与展览用地,文化活动用地", color: "rgb(255,127,0)" },
+  {
+    name: "教育用地,高等教育用地,中等职业教育用地,中小学用地,幼儿园用地,其他教育用地",
+    color: "rgb(255,133,201)",
+  },
+  { name: "科研用地", color: "rgb(230,0,92)" },
+  { name: "体育用地,体育场馆用地,体育训练用地", color: "rgb(0,165,124)" },
+  {
+    name: "医疗卫生用地,医院用地,基层医疗卫生设施用地,公共卫生用地",
+    color: "rgb(255,127,126)",
+  },
+  {
+    name: "社会福利用地,老年人社会福利用地,儿童社会福利用地,残疾人社会福利用地,其他社会福利用地",
+    color: "rgb(255,159,127)",
+  },
+  {
+    name: "商业服务业用地,商业用地,零售商业用地,批发市场用地,餐饮用地,旅馆用地,公用设施营业网点用地,商务金融用地,娱乐用地,其他商业服务业用地",
+    color: "rgb(255,0,0)",
+  },
+  {
+    name: "工业用地,一类工业用地,二类工业用地,三类工业用地",
+    color: "rgb(187,150,116)",
+  },
+  { name: "采矿用地", color: "rgb(158,108,84)" },
+  { name: "盐田", color: "rgb(0,0,255)" },
+  {
+    name: "仓储用地,物流仓储用地,一类物流仓储用地,二类物流仓储用地,三类物流仓储用地",
+    color: "rgb(135,97,211)",
+  },
+  { name: "储备库用地", color: "rgb(153,153,255)" },
+  { name: "铁路用地,交通运输用地", color: "rgb(183,183,183)" },
+  { name: "公路用地", color: "rgb(173,173,173)" },
+  { name: "城镇村道路用地", color: "rgb(163,163,163)" },
+  { name: "管道运输用地", color: "rgb(153,153,153)" },
+  {
+    name: "公用设施用地,供水用地,排水用地,供电用地,供燃气用地,供热用地,通信用地,邮政用地,广播电视设施用地,环卫用地,消防用地,水工设施用地,其他公用设施用地",
+    color: "rgb(0,99,128)",
+  },
+  { name: "公园绿地", color: "rgb(0,255,0)" },
+  { name: "防护绿地", color: "rgb(20,141,74)" },
+  { name: "广场用地", color: "rgb(172,255,207)" },
+  {
+    name: "特殊用地,军事设施用地,使领馆用地,宗教用地,文物古迹用地,监教场所用地,殡葬用地,其他特殊用地",
+    color: "rgb(133,145,86)",
+  },
+  { name: "留白用地", color: "rgb(255,255,255)" },
+  {
+    name: "陆地水域,河流水面,湖泊水面,水库水面,坑塘水面,沟渠,冰川及常年积雪",
+    color: "rgb(51,142,192)",
+  },
+  {
+    name: "渔业用海,渔业基础设施用海,增养殖用海,捕捞海域,农林牧业用岛",
+    color: "rgb(148,213,235)",
+  },
+  {
+    name: "工矿通信用海,工业用海,盐田用海,固体矿产用海,油气用海,可再生能源用海,海底电缆管道用海",
+    color: "rgb(86,166,211)",
+  },
+  {
+    name: "交通运输用海,港口用海,航运用海,路桥隧道用海,机场用海,其他交通运输用海",
+    color: "rgb(108,139,209)",
+  },
+  { name: "游憩用海,风景旅游用海,文体休闲娱乐用海", color: "rgb(26,170,230)" },
+  {
+    name: "特殊用海,军事用海,科研教育用海,海洋保护修复及海岸防护工程用海,排污倾倒用海,水下文物保护用海,其他特殊用海",
+    color: "rgb(131,188,214)",
+  },
+  {
+    name: "其他土地,空闲地,后备耕地,田坎,盐碱地,沙地,裸土地,裸岩石砾地",
+    color: "rgb(238,238,238)",
+  },
+  { name: "其他海域", color: "rgb(214,234,243)" },
+];
 
 /**
  * 模型对应数据图层
@@ -1445,12 +1543,13 @@ window.billboardModelLT = {
  */
 
 /** 征收补偿预估标准
-  */
+ */
 window.ZSBC = {
   /**
    * 征地补偿数据服务
    */
-  dataServiceUrl: 'http://192.168.60.2:8090/iserver/services/data-sanyamap1/rest/data/featureResults.rjson?returnContent=true&hasGeometry=true"',
+  dataServiceUrl:
+    'http://192.168.60.2:8090/iserver/services/data-sanyamap1/rest/data/featureResults.rjson?returnContent=true&hasGeometry=true"',
 
   /**征地补偿标准 */
   ZDBCList: [
@@ -1493,7 +1592,6 @@ window.ZSBC = {
       value: "1",
       BCBZ: [
         {
-
           ID: 1,
           JG: "框架结构",
           GRADE: 1,
@@ -1597,8 +1695,8 @@ window.ZSBC = {
           GRADE: 4,
           BZ: 10,
           DES: "茅草、编叶、柳叶等",
-        }
-      ]
+        },
+      ],
     },
   ],
   /**青苗补偿标准 */
@@ -1620,7 +1718,6 @@ window.ZSBC = {
    * 征地补偿计算
    */
   ZDBCJS: {
-
     /**
      * 地类图斑
      */
@@ -1628,35 +1725,50 @@ window.ZSBC = {
       /**
        * 地图图斑图层名称
        */
-      layerName: '地类图斑',
+      layerName: "地类图斑",
       /**
        * 地图图斑数据集
        */
-      layerDataSource: 'sanya:地类图斑', //[数据集:图层名]
+      layerDataSource: "sanya:地类图斑", //[数据集:图层名]
       /**
        * 地类名称字段
        */
-      dlmc: { field: 'DLMC', cnName: '地类名称' },
+      dlmc: { field: "DLMC", cnName: "地类名称" },
       /**
        * 地类编码字段
        */
-      dlbm: { field: 'DLBM', cnName: '地类编码' },
+      dlbm: { field: "DLBM", cnName: "地类编码" },
       /**
        * 面积字段
        */
-      tbmj: { field: 'TBMJ', cnName: '面积' },
+      tbmj: { field: "TBMJ", cnName: "面积" },
       /**
        * 树木分类
        */
-      smfl: { dlbm: "0301,0302,0303,0304", dlmc: "乔木林地,竹林地,灌木林地,其他林地" },
+      smfl: {
+        fl:"树木",
+        dlbm: "0301,0302,0303,0304",
+        dlmc: "乔木林地,竹林地,灌木林地,其他林地",
+        color:"rgb(104,177,103)" ,
+      },
       /**
        * 农作物分类
        */
-      nzwfl: { dlbm: "0101,0102,0103", dlmc: "水田,水浇地,旱地" },
+      nzwfl: { 
+        fl:"农作物",
+        dlbm: "0101,0102,0103", dlmc: "水田,水浇地,旱地" ,
+        color:"rgb(245,248,220)" ,
+      },
+        
       /**
        * 经济作物分类
        */
-      jjzwfl: { dlbm: '0201,0202,0203,0204', dlmc: '果园,茶园,橡胶园,其他园地' },
+      jjzwfl: {
+        fl:"经济作物",
+        dlbm: "0201,0202,0203,0204",
+        dlmc: "果园,茶园,橡胶园,其他园地",
+        color:"rgb(191,233,170)" ,
+      },
     },
     /**
      * 不动产
@@ -1665,44 +1777,43 @@ window.ZSBC = {
       /**
        *不动产图层
        */
-      layerName: '不动产',
+      layerName: "不动产",
       /**
        * 不动产数据集
        */
-      layerDataSource: 'sanya:不动产', //[数据集:图层名]
+      layerDataSource: "sanya:不动产", //[数据集:图层名]
       /**
        * 产权人
        */
-      cqr: { field: 'CQR', cnName: '产权人' },
+      cqr: { field: "CQR", cnName: "产权人" },
       /**
-      * 房屋结构
-      */
-      fwjg: { field: 'FWJG', cnName: '房屋结构', defaultVal: '混合结构' },
+       * 房屋结构
+       */
+      fwjg: { field: "FWJG", cnName: "房屋结构", defaultVal: "混合结构" },
       /**
-  * 房屋等级
-  */
-      fwdj: { field: 'FWDJ', cnName: '房屋等级', defaultVal: 1 },
+       * 房屋等级
+       */
+      fwdj: { field: "FWDJ", cnName: "房屋等级", defaultVal: 1 },
       /**
        * 占地面积
        */
-      zdmj: { field: 'ZDMJ', cnName: '占地面积' },
+      zdmj: { field: "ZDMJ", cnName: "占地面积" },
       /**
        * 层数
        */
-      floor: { field: 'Floor', cnName: '层数', defaultVal: 1 },
+      floor: { field: "Floor", cnName: "层数", defaultVal: 1 },
       /**
        * 建筑面积
        */
-      jzmj: { field: 'JZMJ', cnName: '建筑面积' },
+      jzmj: { field: "JZMJ", cnName: "建筑面积" },
       /**
        * 房屋地址
        */
-      address: { field: 'ADDRESS', cnName: '房屋地址' },
-    }
-  }
+      address: { field: "ADDRESS", cnName: "房屋地址" },
+    },
+  },
 };
 
-
 /**
  * 灯光文件地址
  */
@@ -1775,6 +1886,7 @@ window.BenchmarkLandPriceList = [
   //   ConstructionUnit: "建设单位名称",
   //   analysisDate: "2024-06-01 10:11:21",
   //   AnalysisStatus: "完成",
+  //   ReportPath:""
   // },
 ];
 //基准地价 规划中的用地性质与地价分析中的土地用途对应关系
@@ -1789,12 +1901,12 @@ window.landUseNatureRelation = [
         ydlxTypeField: "",
         ydlxPriceField: "集体楼面单价_终",
       },
-      {
-        layerCore: "006001",
-        tdjbField: "土地级别",
-        ydlxTypeField: "",
-        ydlxPriceField: "楼面单价",
-      },
+      // {
+      //   layerCore: "006001",
+      //   tdjbField: "土地级别",
+      //   ydlxTypeField: "",
+      //   ydlxPriceField: "楼面单价",
+      // },
     ],
   },
   {
@@ -1807,12 +1919,12 @@ window.landUseNatureRelation = [
         ydlxTypeField: "",
         ydlxPriceField: "集体楼面单价_终",
       },
-      {
-        layerCore: "006008",
-        tdjbField: "土地级别",
-        ydlxTypeField: "",
-        ydlxPriceField: "楼面单价",
-      },
+      // {
+      //   layerCore: "006008",
+      //   tdjbField: "土地级别",
+      //   ydlxTypeField: "",
+      //   ydlxPriceField: "楼面单价",
+      // },
     ],
   },
   {
@@ -1822,12 +1934,12 @@ window.landUseNatureRelation = [
       { ydxz: "仓储用地", ydxzdl: "11" },
     ],
     layerinfo: [
-      {
-        layerCore: "006003",
-        tdjbField: "土地级别",
-        ydlxTypeField: "",
-        ydlxPriceField: "楼面单价",
-      },
+      // {
+      //   layerCore: "006003",
+      //   tdjbField: "土地级别",
+      //   ydlxTypeField: "",
+      //   ydlxPriceField: "楼面单价",
+      // },
       {
         layerCore: "006005",
         tdjbField: "级别_终",
@@ -1845,12 +1957,12 @@ window.landUseNatureRelation = [
         tdyt: "机关团体用地",
         GHDKType: [{ ydxz: "机关团体用地", ydxzdl: "0801" }],
         layerinfo: [
-          {
-            layerCore: "006004",
-            tdjbField: "土地级别",
-            ydlxTypeField: "机关团体用地",
-            ydlxPriceField: "机关_地价",
-          },
+          // {
+          //   layerCore: "006004",
+          //   tdjbField: "土地级别",
+          //   ydlxTypeField: "机关团体用地",
+          //   ydlxPriceField: "机关_地价",
+          // },
           {
             layerCore: "006009",
             tdjbField: "级别_终",
@@ -1863,12 +1975,12 @@ window.landUseNatureRelation = [
         tdyt: "科研用地",
         GHDKType: [{ ydxz: "科研用地", ydxzdl: "0802" }],
         layerinfo: [
-          {
-            layerCore: "006004",
-            tdjbField: "土地级别",
-            ydlxTypeField: "教育、科研用地",
-            ydlxPriceField: "教育_地价",
-          },
+          // {
+          //   layerCore: "006004",
+          //   tdjbField: "土地级别",
+          //   ydlxTypeField: "教育、科研用地",
+          //   ydlxPriceField: "教育_地价",
+          // },
           {
             layerCore: "006009",
             tdjbField: "级别_终",
@@ -1881,12 +1993,12 @@ window.landUseNatureRelation = [
         tdyt: "文化用地",
         GHDKType: [{ ydxz: "文化用地", ydxzdl: "0803" }],
         layerinfo: [
-          {
-            layerCore: "006004",
-            tdjbField: "土地级别",
-            ydlxTypeField: "文化设施、体育用地",
-            ydlxPriceField: "文化_地价",
-          },
+          // {
+          //   layerCore: "006004",
+          //   tdjbField: "土地级别",
+          //   ydlxTypeField: "文化设施、体育用地",
+          //   ydlxPriceField: "文化_地价",
+          // },
           {
             layerCore: "006009",
             tdjbField: "级别_终",
@@ -1899,12 +2011,12 @@ window.landUseNatureRelation = [
         tdyt: "教育用地",
         GHDKType: [{ ydxz: "教育用地", ydxzdl: "0804" }],
         layerinfo: [
-          {
-            layerCore: "006004",
-            tdjbField: "土地级别",
-            ydlxTypeField: "教育、科研用地",
-            ydlxPriceField: "教育_地价",
-          },
+          // {
+          //   layerCore: "006004",
+          //   tdjbField: "土地级别",
+          //   ydlxTypeField: "教育、科研用地",
+          //   ydlxPriceField: "教育_地价",
+          // },
           {
             layerCore: "006009",
             tdjbField: "级别_终",
@@ -1917,12 +2029,12 @@ window.landUseNatureRelation = [
         tdyt: "体育用地",
         GHDKType: [{ ydxz: "体育用地", ydxzdl: "0805" }],
         layerinfo: [
-          {
-            layerCore: "006004",
-            tdjbField: "土地级别",
-            ydlxTypeField: "文化设施、体育用地",
-            ydlxPriceField: "文化_地价",
-          },
+          // {
+          //   layerCore: "006004",
+          //   tdjbField: "土地级别",
+          //   ydlxTypeField: "文化设施、体育用地",
+          //   ydlxPriceField: "文化_地价",
+          // },
           {
             layerCore: "006009",
             tdjbField: "级别_终",
@@ -1935,12 +2047,12 @@ window.landUseNatureRelation = [
         tdyt: "医疗卫生用地",
         GHDKType: [{ ydxz: "医疗卫生用地", ydxzdl: "0806" }],
         layerinfo: [
-          {
-            layerCore: "006004",
-            tdjbField: "土地级别",
-            ydlxTypeField: "医疗卫生、社会福利用地",
-            ydlxPriceField: "医疗_地价",
-          },
+          // {
+          //   layerCore: "006004",
+          //   tdjbField: "土地级别",
+          //   ydlxTypeField: "医疗卫生、社会福利用地",
+          //   ydlxPriceField: "医疗_地价",
+          // },
           {
             layerCore: "006009",
             tdjbField: "级别_终",
@@ -1953,12 +2065,12 @@ window.landUseNatureRelation = [
         tdyt: "社会福利用地",
         GHDKType: [{ ydxz: "社会福利用地", ydxzdl: "0807" }],
         layerinfo: [
-          {
-            layerCore: "006004",
-            tdjbField: "土地级别",
-            ydlxTypeField: "医疗卫生、社会福利用地",
-            ydlxPriceField: "医疗_地价",
-          },
+          // {
+          //   layerCore: "006004",
+          //   tdjbField: "土地级别",
+          //   ydlxTypeField: "医疗卫生、社会福利用地",
+          //   ydlxPriceField: "医疗_地价",
+          // },
           {
             layerCore: "006009",
             tdjbField: "级别_终",
@@ -1978,12 +2090,12 @@ window.landUseNatureRelation = [
         tdyt: "公共设施用地",
         GHDKType: [{ ydxz: "公共设施用地", ydxzdl: "13" }],
         layerinfo: [
-          {
-            layerCore: "006004",
-            tdjbField: "土地级别",
-            ydlxTypeField: "公园与绿地、公用设施用地",
-            ydlxPriceField: "公园_地价",
-          },
+          // {
+          //   layerCore: "006004",
+          //   tdjbField: "土地级别",
+          //   ydlxTypeField: "公园与绿地、公用设施用地",
+          //   ydlxPriceField: "公园_地价",
+          // },
           {
             layerCore: "006009",
             tdjbField: "级别_终",
@@ -1996,12 +2108,12 @@ window.landUseNatureRelation = [
         tdyt: "绿地与开敞空间用地",
         GHDKType: [{ ydxz: "绿地与开敞空间用地", ydxzdl: "14" }],
         layerinfo: [
-          {
-            layerCore: "006004",
-            tdjbField: "土地级别",
-            ydlxTypeField: "公园与绿地、公用设施用地",
-            ydlxPriceField: "公园_地价",
-          },
+          // {
+          //   layerCore: "006004",
+          //   tdjbField: "土地级别",
+          //   ydlxTypeField: "公园与绿地、公用设施用地",
+          //   ydlxPriceField: "公园_地价",
+          // },
           {
             layerCore: "006009",
             tdjbField: "级别_终",

File diff suppressed because it is too large
+ 9605 - 0
static/js/shp.js


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