瀏覽代碼

规划选址选择意向地块下载报告

lkk 1 年之前
父節點
當前提交
70c428fb48

+ 7 - 0
src/api/ghss/ghxz.js

@@ -80,4 +80,11 @@ export function DownloadReport(params) {
         method: 'get',
         params
     })
+}
+export function DownloadLandReport(data) {
+    return request({
+        url: '/analyse/fzss/DownloadLandReport',
+        method: 'post',
+        data
+    })
 }

+ 1 - 1
src/views/complianceAnalysis/components/lsjl.vue

@@ -57,7 +57,7 @@
           <div>
             <span class="button" @click.stop="checkRz(item)">日志</span>
             <span class="button" @click="checkDetails(item)">结果</span>
-            <span class="button" v-if="item.fxbg" @click.stop="report(item)"
+            <span class="button" v-if="item.fxbg && type == 'hgxfx'" @click.stop="report(item)"
               >报告</span
             >
             <span

+ 43 - 16
src/views/siteselection/components/xzjg.vue

@@ -68,12 +68,20 @@
                   class="header-icon el-icon-plus"
                   @click="addprogramme($event, item)"
                 ></i>
+                <i
+                  class="header-icon el-icon-s-order"
+                  @click="planInfo($event, item)"
+                ></i>
+                <i
+                  class="header-icon el-icon-receiving"
+                  @click="nowInfo($event, item)"
+                ></i>
               </span>
             </template>
             <div class="collapseCon">
               <p class="oneItem">
                 <span>{{ item.kzxxgydmc }}</span>
-                <span>{{ item.area || 0}}亩</span>
+                <span>{{ item.area || 0 }}亩</span>
               </p>
               <p style="color: #cddeeb">
                 <!-- <i class="iconSun"></i> -->
@@ -112,11 +120,11 @@
 <script>
 import drawData from "./draw.json";
 import ghjgData from "./规划结果.json";
-import { GetXzjg } from "../../../api/ghss/ghxz.js";
+import { GetXzjg, DownloadLandReport } from "../../../api/ghss/ghxz.js";
 // 使用
 import parse from "wellknown";
 import data from "../../../../static/data/ghss/data";
-let dataSources = {}
+let dataSources = {};
 export default {
   components: {},
   props: {
@@ -163,7 +171,7 @@ export default {
     };
   },
   mounted() {
-    this.GetXzjg()
+    this.GetXzjg();
   },
   methods: {
     GetXzjg() {
@@ -182,15 +190,25 @@ export default {
       });
     },
     download() {
-      window.open(this.$props.scjgObj.task.fxbg);
-    },
-    viewReport() {
-      window.open(
-        this.$props.scjgObj.task.fxbg.replace(".docx", ".pdf"),
-        "_blank"
-      );
-    },
+      let dkIds = [];
+      if (this.bgList.length) {
+        this.bgList.forEach((item) => {
+          dkIds.push(item.id);
+        });
+        DownloadLandReport({ bsm: this.$props.rwBsm, dkIds: dkIds}).then(
+          (res) => {
+            window.open(window.axiosURI + '/analyse/fzss/DownloadReport?filePath='+`${res.data.fxbg}`);
+          }
+        );
+      } else {
+        this.$message({
+          message: "请选择意向地块",
+          type: "warning",
+        });
+      }
 
+      // window.open(this.$props.scjgObj.task.fxbg);
+    },
     // 手动处理为GeoJSON
     getGeoJSON(data) {
       return {
@@ -265,7 +283,7 @@ export default {
           });
           if (id) {
             this.tempdataSourcesId = id;
-          dataSources[id] = dataSource;
+            dataSources[id] = dataSource;
           }
         });
     },
@@ -277,11 +295,20 @@ export default {
       if (list.length == 0) {
         this.bgList.push(item);
         const list = this.xzjgObj.dks.filter((item1) => {
-          return item1.dkbm != item.dkbm;
+          return item1.id != item.id;
         });
         this.xzjgObj.dks = list;
       }
     },
+    //规划信息
+    planInfo(e,item){
+      console.log(e,item,'规划');
+    },
+    //现状信息
+    nowInfo(e,item){
+      console.log(e,item,'现状信息')
+    },
+
 
     deleteprogramme(e, item) {
       e.stopPropagation();
@@ -305,7 +332,7 @@ export default {
       this.bgList = [];
     },
     mapview(item) {
-      console.log(item)
+      console.log(item);
       this.drawWktPloygon(item.geom, "#ff0000", item.id);
     },
 
@@ -345,7 +372,7 @@ export default {
     },
     //监听区域id的变化,用于删除上一次点击生成的geojson区域面
     tempdataSourcesId(newVal, oldVal) {
-      console.log(newVal, oldVal,'newVal, oldVal');
+      console.log(newVal, oldVal, "newVal, oldVal");
       if (oldVal) {
         viewer.dataSources.remove(dataSources[oldVal]);
       }

+ 0 - 4
src/views/siteselection/index.vue

@@ -35,7 +35,6 @@
           <XZJG
             :activeTabs="activeTabs"
             :loading="loading"
-            :scjgObj="scjgObj"
             :rwBsm="rwBsm"
             v-if="activeTabs == 'xzjg'"
           ></XZJG>
@@ -68,9 +67,6 @@ export default {
       activeTabs: "fzxz",
       rzBsm: "",
       rwBsm: "",
-      scjgObj: {
-        task: { fxbg: "@/../static/data/ghss/选址报告.docx" },
-      },
       nowObj: {},
       rzMc: "",
       loading: false,