Sfoglia il codice sorgente

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

zpf 10 mesi fa
parent
commit
12d06ce1fd

+ 13 - 0
src/api/ghss/hgxfx.js

@@ -9,6 +9,7 @@ const hgxfxApi = {
     // ShapeUpload:'/file/uploadShpZip',
     ShapeUpload: '/onemap-file/saveGeom',
     GetLog: '/apply/hgxfx/GetLog',
+    AddHgxfxV1:'/apply/hgxfx/AddHgxfxV1'
 }
 
 /**
@@ -139,4 +140,16 @@ export function UpdateScx(parameter) {
             'Content-Type': 'application/json;charset=UTF-8'
         }
     })
+}
+
+export function AddHgxfxV1(parameter) {
+    // parameter.scxs = parameter.scxs.toString();
+    return request({
+        url: hgxfxApi.AddHgxfxV1,
+        method: 'post',
+        data: parameter,
+        headers: {
+            'Content-Type': 'application/json;charset=UTF-8'
+        }
+    })
 }

+ 69 - 17
src/views/siteselection/components/dkDetails.vue

@@ -1,30 +1,67 @@
 <template>
   <div class="dkxq_Container">
-      <pie
-        v-if="litem.scxstyle == 0"
-        :class="`echart${litem.dataList.length <= 6 ? '' : '_vertical'}`"
-        unit="亩"
-        @echartClick="(name, iseyes) => echartClick(name, iseyes)"
-        :ref="`echartRef`"
-      ></pie>
+    {{ title }}
+    <pie
+      v-if="title == '现状信息'"
+      :class="`echart`"
+      unit="亩"
+      @echartClick="echartClick"
+      :ref="`echartRef`"
+    ></pie>
   </div>
 </template>
 
 <script>
+import pie from "@/components/echartsTemplate/pie.vue";
+import { AddHgxfxV1 } from "@/api/ghss/hgxfx.js";
 export default {
-  props: {
-    litem: {
-      type: Object,
+  components: { pie },
+  props: {},
+  data() {
+    return {
+      title: "",
+    };
+  },
+  methods: {
+    show(item, title) {
+      this.title = title;
+      this.getData(item);
     },
-    piseyes: {
-      type: Boolean,
-      default: false,
+    getData(item) {
+      let formdata = {
+        xmmc: "选址调用",
+        xzfw: item.geom.replace("SRID=4326;", ""),
+        fxmj: item.area,
+        scxList: [
+          {
+            scxbsm: "TDXZ",
+            parameter:
+              '{"parameter":[{"key":"范围内","value":"intersection"}],"find":"intersection"}',
+          },
+        ],
+      };
+      AddHgxfxV1(formdata).then((res) => {
+        if (res.success) {
+          res.data.data.forEach((e) => {
+            let c = e.dataList || [];
+            c.map((ci) => {
+              ci.name = ci.yslx_name;
+              ci.value = ci.mj;
+              ci.geom = ci.geom || "";
+            });
+            if (e.scxstyle == 0) this.setEchart(c, "vertical");
+          });
+        }
+      });
     },
+    setEchart(data, title) {
+      console.log("res.data", this.$refs.echartRef);
+      this.$nextTick(() => {
+        this.$refs.echartRef.setOptions({ data, title });
+      });
+    },
+    echartClick(name) {},
   },
-  data() {
-    return {};
-  },
-  methods: {},
   mounted() {},
   computed: {},
 };
@@ -38,5 +75,20 @@ export default {
   position: fixed;
   bottom: 16%;
   right: 10px;
+
+  cursor: pointer;
+  background: url(/static/images/ghzc/内容框.png) no-repeat;
+  background-size: 100% 100%;
+  background-position: center;
+  padding: 0px 10px;
+  box-sizing: content-box;
+  text-align: left;
+  line-height: 40px;
+  overflow-x: hidden;
+  overflow-y: auto;
+  .echart {
+    width: 400px;
+    height: 450px;
+  }
 }
 </style>

+ 5 - 31
src/views/siteselection/components/xzjg.vue

@@ -114,18 +114,18 @@
         >
       </div>
     </div> -->
-<dkDetails></dkDetails>
+    <dkDetails ref="dkDetails"></dkDetails>
   </div>
 </template>
 
 <script>
 import { GetXzjg, DownloadLandReport } from "../../../api/ghss/ghxz.js";
-import dkDetails from './dkDetails.vue'
+import dkDetails from "./dkDetails.vue";
 // 使用
 import parse from "wellknown";
 let dataSources = {};
 export default {
-  components: {dkDetails},
+  components: { dkDetails },
   props: {
     activeTabs: {
       type: String,
@@ -167,7 +167,7 @@ export default {
       arrww: [],
       tempdataSourcesId: null,
       xzjgBSM: "",
-      echarts:[],
+      echarts: [],
     };
   },
   mounted() {
@@ -308,33 +308,7 @@ export default {
     },
     //现状信息
     nowInfo(e, item) {
-      console.log(e, item, "现状信息");
-      // GetFxjg({ bsm: item.bsm }).then((res) => {
-      //   if (res.success) {
-      //     res.data.forEach((e) => {
-      //       let c = e.dataList || [];
-      //       c.map((ci) => {
-      //         ci.name = ci.yslx_name || ci.scxname;
-      //         // ci.value = this.compute(ci.mj);
-      //         ci.value = ci.mj;
-      //         ci.geom = ci.geom || "";
-      //         // ci.label = ci.mc_name;
-      //       });
-      //       this.echarts.push({
-      //         id: e.scxbsm,
-      //         label: e.scxname,
-      //         dataList: e.dataList,
-      //         lchildren: e.children || [],
-      //         iseyes: false,
-      //         isshow: false,
-      //         scxstyle: e.scxstyle,
-      //       });
-      //       if (e.scxstyle == 0) this.setEchart(c, e.scxbsm);
-      //       if (e.children) this.lForEach(e.children, "echart");
-      //     });
-      //     this.$emit("updateParent", "loading", false);
-      //   }
-      // });
+      this.$refs.dkDetails.show(item, "现状信息");
     },
 
     deleteprogramme(e, item) {