maxiaoxiao 9 月之前
父節點
當前提交
240fdc9848
共有 1 個文件被更改,包括 88 次插入48 次删除
  1. 88 48
      src/views/siteselection/components/xzjg.vue

+ 88 - 48
src/views/siteselection/components/xzjg.vue

@@ -2,9 +2,9 @@
   <div class="xzjg">
     <div>
       <span class="xmmc">
-          项目名称:
-          <span class="text">{{ rzMc}}</span>
-        </span>
+        项目名称:
+        <span class="text">{{ rzMc }}</span>
+      </span>
       <div
         class="eicon"
         :class="isshowAll ? 'eyes' : 'close_eyes'"
@@ -18,12 +18,22 @@
       </div>
       <div class="bxCon" style="height: 90%">
         <el-collapse accordion v-model="activeNames">
-          <el-collapse-item :name="'gb' + index1" v-for="(item1, index1) in bgList" :key="index1">
+          <el-collapse-item
+            :name="'gb' + index1"
+            v-for="(item1, index1) in bgList"
+            :key="index1"
+          >
             <template slot="title">
               地块编号{{ item1.dkbm }} ({{ item1.area || 0 }})亩
               <span class="tools">
-                <i class="header-icon el-icon-place" @click.stop="mapview(item1)"></i>
-                <i class="header-icon el-icon-delete" @click="deleteprogramme($event, item1)"></i>
+                <i
+                  class="header-icon el-icon-place"
+                  @click.stop="mapview(item1)"
+                ></i>
+                <i
+                  class="header-icon el-icon-delete"
+                  @click="deleteprogramme($event, item1)"
+                ></i>
               </span>
             </template>
             <div class="collapseCon">
@@ -33,8 +43,10 @@
               </p>
               <p style="color: #cddeeb">
                 <img src="/static/images/ghzc/iconSun.png" />
-                <span style="margin-left: 20px">基准地价:</span><span style="color: #02a7f0">{{ item1.landPrice || 0
-                }}万元</span>
+                <span style="margin-left: 20px">基准地价:</span
+                ><span style="color: #02a7f0"
+                  >{{ item1.landPrice || 0 }}万元</span
+                >
               </p>
             </div>
           </el-collapse-item>
@@ -43,21 +55,46 @@
     </div>
     <div style="height: 47%; width: 100%" v-if="xzjgObj">
       <div class="title flex-box">
-        <span class="block-title">备选地块 ({{ xzjgObj.dks ? xzjgObj.dks.length : 0 }})
+        <span class="block-title"
+          >备选地块 ({{ xzjgObj.dks ? xzjgObj.dks.length : 0 }})
         </span>
       </div>
       <div class="bxCon">
         <el-collapse accordion v-model="activeNames">
-          <el-collapse-item :name="index" v-for="(item, index) in xzjgObj.dks" :key="item.dkbm">
+          <el-collapse-item
+            :name="index"
+            v-for="(item, index) in xzjgObj.dks"
+            :key="item.dkbm"
+          >
             <template slot="title">
               <!-- 地块编号B_P_123 -->
               {{ item.dkbm }} ({{ item.area || 0 }})亩
               <span class="tools">
-                <i class="header-icon el-icon-place" title="定位"  @click.stop="mapview(item)"></i>
-                <i class="header-icon el-icon-s-order" title="规划信息" @click="planInfo1($event, item)"></i>
-                <i class="header-icon el-icon-download" title="下载报告" @click="downloadFile($event, item)"></i>
-                <i class="header-icon el-icon-receiving" title="三维分析" @click="threeInfo($event, item)"></i>
-                <i class="header-icon el-icon-plus" title="加入备选" @click="addprogramme($event, item)"></i>
+                <i
+                  class="header-icon el-icon-place"
+                  title="定位"
+                  @click.stop="mapview(item)"
+                ></i>
+                <i
+                  class="header-icon el-icon-s-order"
+                  title="规划信息"
+                  @click="planInfo1($event, item)"
+                ></i>
+                <i
+                  class="header-icon el-icon-download"
+                  title="下载报告"
+                  @click="downloadFile($event, item)"
+                ></i>
+                <i
+                  class="header-icon el-icon-receiving"
+                  title="三维分析"
+                  @click="threeInfo($event, item)"
+                ></i>
+                <i
+                  class="header-icon el-icon-plus"
+                  title="加入备选"
+                  @click="addprogramme($event, item)"
+                ></i>
               </span>
             </template>
             <div class="collapseCon">
@@ -68,8 +105,10 @@
               <p style="color: #cddeeb">
                 <!-- <i class="iconSun"></i> -->
                 <img src="/static/images/ghzc/iconSun.png" />
-                <span style="margin-left: 20px">基准地价:</span><span style="color: #02a7f0">{{ item.landPrice || 0
-                }}万元</span>
+                <span style="margin-left: 20px">基准地价:</span
+                ><span style="color: #02a7f0"
+                  >{{ item.landPrice || 0 }}万元</span
+                >
               </p>
             </div>
           </el-collapse-item>
@@ -94,7 +133,12 @@
         >
       </div>
     </div> -->
-    <dkDetails ref="dkDetails" @mapview="mapview" @pullClear="pullClear" @pullUp="pullUp"></dkDetails>
+    <dkDetails
+      ref="dkDetails"
+      @mapview="mapview"
+      @pullClear="pullClear"
+      @pullUp="pullUp"
+    ></dkDetails>
   </div>
 </template>
 
@@ -152,7 +196,6 @@ export default {
       itemObj: {},
       isshowAll: false,
       loading: null,
-
     };
   },
   mounted() {
@@ -168,7 +211,7 @@ export default {
           this.xzjgObj.dks.forEach((item) => {
             this.drawWktPloygon(item.geom, "#0000ff"); //item.dkbm
           });
-          this.drawWktPloygon(res.data.geom, "#ff0000", 'all'); //res.data.bsm
+          this.drawWktPloygon(res.data.geom, "#ff0000", "all"); //res.data.bsm
         } else {
           this.$message.error(res.message);
         }
@@ -201,14 +244,12 @@ export default {
           (res) => {
             window.open(
               window.axiosURI +
-              "/analyse/fzss/DownloadReport?filePath=" +
-              `${res.data.fxbg}`
+                "/analyse/fzss/DownloadReport?filePath=" +
+                `${res.data.fxbg}`
             );
             that.loading.close();
-
           }
         );
-
       } else {
         this.$message({
           message: "请选择意向地块",
@@ -274,11 +315,11 @@ export default {
 
     // 加载GeoJSON数据
     loadGeoJSON(geojson, yanse, id, height) {
-      let _this = this
+      let _this = this;
       let fcolor =
-      id && id != "all"
-        ? Cesium.Color.fromCssColorString(yanse)
-        : Cesium.Color.WHITE;
+        id && id != "all"
+          ? Cesium.Color.fromCssColorString(yanse)
+          : Cesium.Color.WHITE;
       const dataSource = new Cesium.GeoJsonDataSource();
       dataSource
         .load(geojson, {
@@ -342,22 +383,19 @@ export default {
       this.$refs.dkDetails.show(item, "规划信息");
     },
     async downloadFile(e, item) {
-
-      let wkt = item.geom.split(";")[1]
+      let wkt = item.geom.split(";")[1];
 
       var data = JSON.stringify({
-        "wkt": wkt,
-        "fileName": ""
+        wkt: wkt,
+        fileName: "",
       });
       let path = await WriteWkt(data);
-      console.log('path: ', path.data.path);
+      console.log("path: ", path.data.path);
       window.open(
         window.axiosURI +
-        "/analyse/fzss/DownloadReport?filePath=" +
-        `${path.data.path}`
+          "/analyse/fzss/DownloadReport?filePath=" +
+          `${path.data.path}`
       );
-
-
     },
     //现状信息
     nowInfo(e, item) {
@@ -389,16 +427,17 @@ export default {
       this.bgList = [];
     },
     mapview(item) {
-      if (!dataSources[item.id]){
+      if (!dataSources[item.id]) {
         this.drawWktPloygon(item.geom, "#ff0000", item.id);
         this.tempdataSourcesId = item.id;
       }
     },
     pullUp(item, height) {
-      if (!dataSources[item.id])
-        this.loadGeoJSON(parse(item.geom), "#000000", item.id, height);
+      let upid = "up" + item.id;
+      if (!dataSources[upid])
+        this.loadGeoJSON(parse(item.geom), "#000000", upid, height);
       else {
-        let entities = dataSources[item.id].entities.values;
+        let entities = dataSources[upid].entities.values;
         entities.forEach((entity) => {
           if (height && entity.polygon) {
             entity.polygon.extrudedHeight = height;
@@ -406,10 +445,11 @@ export default {
         });
       }
     },
-    pullClear(item){
-      if (dataSources[item.id]){
-        viewer.dataSources.remove(dataSources[item.id]);
-        dataSources[item.id] = null
+    pullClear(item) {
+      let upid = "up" + item.id;
+      if (dataSources[upid]) {
+        viewer.dataSources.remove(dataSources[upid]);
+        dataSources[upid] = null;
       }
     },
 
@@ -421,7 +461,7 @@ export default {
       window.open(this.model.zip, "_blank");
     },
 
-    loadJgMap() { },
+    loadJgMap() {},
 
     loadJg(bsm) {
       console.log(bsm, "bsm");
@@ -473,8 +513,8 @@ export default {
   padding: 0px 10px;
 
   .xmmc {
-      width: calc(100% - 60px);
-      display: inline-block;
+    width: calc(100% - 60px);
+    display: inline-block;
   }
 
   .blue {