Explorar el Código

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

maxiaoxiao hace 9 meses
padre
commit
5825fb7fd1

+ 14 - 0
src/api/cockpitNew.js

@@ -52,3 +52,17 @@ export function GetTabsPanePost(params) {
     })
 }
 
+export function WriteWkt(data) {
+    return request({
+        url: '/spatial/shp/write/wkt',
+        method: 'post',
+        data: data
+    })
+}
+export function DownFile(params) {
+    return request({
+        url: '/analyse/fzss/DownloadReport',
+        method: 'get',
+        params
+    })
+}

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

@@ -323,6 +323,8 @@ export default {
             const that = this;
             store.state.query_pick_last_pane = null;
             store.state.query_pick_pane = [];
+            this.tableData = [];
+            this.tableData_qwnership = [];
 
             this.remove_query_click_by_iserver();
 
@@ -388,7 +390,6 @@ export default {
 
                 for (let index = 0; index < data.data.length; index++) {
                     const element = data.data[index];
-                    console.log('element: ', element);
                     let tableId = element.tableId;
                     let pane_obj = {
                         sourcePointWkt: wkt,
@@ -415,6 +416,7 @@ export default {
 
                     } else {
                         let res = await GetTabsPane(pane_obj);
+
                         if (element.defaultType == "0") {
                             // store.state.query_pick_pane.push({
                             //     name: element.name,
@@ -487,23 +489,21 @@ export default {
             if (tab.name == '权属') {
                 this.qwnershipTabsFun();
             } else {
-                if (tab.closable == true) {
-                    store.state.query_pick_pane.forEach((res) => {
-                        if (res.name == tab.name) {
-                            let data = [];
-
-                            this.active_tabs_table = res.value.data.data;
-                            this.rawData = res.value.data.data
-                            res.value.data.datalist.forEach((res) => {
-                                data.push({
-                                    name: res.groupvalue,
-                                    value: res.sumvalue
-                                })
+                store.state.query_pick_pane.forEach((res) => {
+                    if (res.name == tab.name) {
+                        let data = [];
+
+                        this.active_tabs_table = res.value.data.data;
+                        this.rawData = res.value.data.data
+                        res.value.data.datalist.forEach((res) => {
+                            data.push({
+                                name: res.groupvalue,
+                                value: res.sumvalue
                             })
-                            this.setEchart(data, "vertical", index);
-                        }
-                    })
-                }
+                        })
+                        this.setEchart(data, "vertical", index);
+                    }
+                })
             }
 
 
@@ -547,8 +547,8 @@ export default {
         },
         setEchart(data, type, index) {
             this.$nextTick(() => {
-                let max = index == 0 ? 3 : 10
-                let legend_right = index == 0 ? "2%" : "10%"
+                let max = 5
+                let legend_right = "10%"
                 this.$refs.echartRef[index].setOptions({ data, type, max, legend_right });
             });
         },

+ 0 - 1
src/components/Query/clickQuery/clickQuery.vue

@@ -847,7 +847,6 @@ export default {
         }
         case 4: {//驾驶舱矢量数据点选查询
           pick_cockpit_vector.init_handler();
-
           break;
         } case 5: {//联级查询
           this.$refs.MultiLevelQuery.init_handler();

+ 3 - 2
src/components/echartsTemplate/pie.vue

@@ -169,7 +169,6 @@ export default {
   },
   methods: {
     setOptions(cartData) {
-      console.log('cartData: ', cartData);
       let _this = this;
       if (!this.myChart) {
         // var dom = document.getElementById("pie_echart");
@@ -227,10 +226,12 @@ export default {
         return `${params.name} : ${params.value} ${_this.$props.unit}`;
       };
       this.myChart.resize();
-      console.log('cartData.data.length: ', cartData.data.length);
 
       if (cartData.data.length <= 0) {
         option.title.show = true;
+      }else{
+        option.title.show = false;
+
       }
       this.myChart.setOption(option);
       // if (cartData.isclick) {

+ 48 - 19
src/views/cockpit/common/VectorSpace/BoxCommonVector.vue

@@ -9,13 +9,14 @@
 
             <el-input clearable v-model="state" @input="change_witch" class="search" placeholder="请输入内容"></el-input>
 
-            <el-table :data="active_dableData" style="width: 100%" height="650" :header-cell-style="{
-                background: 'rgba(10, 25, 38, 0.6)',
-                color: '#66b1ff',
-                fontSize: '14px',
-                fontFamily: 'Microsoft YaHei',
-                fontWeight: '400',
-            }">
+            <el-table :row-class-name="tableRowClassName" ref="singleTable" :data="active_dableData" style="width: 100%"
+                height="650" :header-cell-style="{
+                    background: 'rgba(10, 25, 38, 0.6)',
+                    color: '#66b1ff',
+                    fontSize: '14px',
+                    fontFamily: 'Microsoft YaHei',
+                    fontWeight: '400',
+                }">
 
 
                 <el-table-column show-overflow-tooltip="true" v-for="(index, item) in store.state.cockpit_vector.columns"
@@ -52,10 +53,17 @@ export default {
             active_dableData: null,
             tableData: null,
             layersData: {},
+            scrollTop_index: null
         };
     },
     methods: {
-        async draw_vector_server(jscType){
+        tableRowClassName({ row, rowIndex }) {
+            if (rowIndex === this.scrollTop_index) {
+                return 'warning-row';
+            }
+            return '';
+        },
+        async draw_vector_server(jscType) {
             let res = await QueryOne({ jscType, id: "4602" });
             this.layersData = { ...res.data, title: this.title }
             tdsy.addLayer(this.layersData);
@@ -127,8 +135,9 @@ export default {
         // },
         draw_vector_tdgy_gy_jd(data) {
             // tdsy.remove();
-            data.forEach((res) => {
+            data.forEach((res, index) => {
                 res.type = '图斑上图'
+                res.index = index
                 if (res.geom) {
 
                     let geojson = res.geom;
@@ -219,14 +228,8 @@ export default {
             })
         },
         go(item) {
-            if(!item.geom){
-                this.$message.warning( "缺少定位图斑" );
-            }else{
-               if(this.cockpit_vector.mapType) {
-                this.setLayerStatus(item)
-               }
-               else 
-               this.addpolygon(item)
+            if (!item.geom) {
+                this.$message.warning("缺少定位图斑");
             }
             store.setVectordataid(item.dataid)
             let arr = [];
@@ -444,7 +447,9 @@ export default {
         cockpit_vector() {
             return store.state.cockpit_vector;
         },
-
+        computed_vectorData() {
+            return store.state.vectorData;
+        },
     },
     watch: {
         cockpit_vector(newVal, oldVal) {
@@ -464,10 +469,30 @@ export default {
             if (newVal.goitem) {
                 this.go(newVal.goitem)
             }
+
         },
         active_dableData(newVal, oldVal) {
-            if(this.cockpit_vector.mapType) this.draw_vector_server(this.cockpit_vector.mapType)
+            if (this.cockpit_vector.mapType) this.draw_vector_server(this.cockpit_vector.mapType)
             else this.draw_vector_tdgy_gy_jd(newVal);
+        },
+        computed_vectorData(newVal, oldVal) {
+            newVal.forEach((res) => {
+                if (res.name == 'index') {
+
+                    const TableRows = this.$refs.singleTable.bodyWrapper.querySelectorAll('.el-table__body tbody .el-table__row')
+                    let scrollTop = 0
+                    for (let i = 0; i < TableRows.length; i++) {
+                        if (i === res.value) {
+                            break
+                        }
+                        scrollTop += TableRows[i].offsetHeight
+                    }
+                    this.$refs.singleTable.bodyWrapper.scrollTop = scrollTop
+                    this.scrollTop_index = res.value
+
+                }
+            })
+
         }
     },
     mounted() {
@@ -662,5 +687,9 @@ export default {
 .el-table::before {
     background: rgba(10, 25, 38, 0) !important;
 }
+
+/deep/ .el-table .warning-row {
+    background: rgb(102, 177, 255) !important;
+}
 </style>
   

+ 21 - 17
src/views/siteselection/components/dkDetailsNew.vue

@@ -31,19 +31,12 @@
     <div v-if="title == '三维分析'">
       <el-form :model="ruleForm" ref="ruleForm" label-width="100px">
         <el-form-item label="拉膜高度:" prop="height">
-          <el-input
-            class="inputwidth"
-            v-model="ruleForm.height"
-            size="mini"
-            type="number"
-            placeholder="请输入地块拉白膜高度"
-          ></el-input>
+          <el-input class="inputwidth" v-model="ruleForm.height" size="mini" type="number"
+            placeholder="请输入地块拉白膜高度"></el-input>
         </el-form-item>
       </el-form>
-      <el-button class="heiBtn" type="primary" size="mini" @click="submit"
-        >确 定</el-button
-      >
+      <el-button class="heiBtn" type="primary" size="mini" @click="submit">确 定</el-button>
     </div>
   </div>
 </template>
@@ -74,19 +67,29 @@ export default {
   },
   methods: {
     async show(item, title) {
+
+
       this.title = title;
       this.isDateilsShow = true;
       this.optional = item;
-      if (this.title == "规划信息") this.getCollapseList();
+      if (this.title == "规划信息") {
+        let data = await GetCascadeList();
+        this.tabs_list = data.data;
+        this.getCollapseList();
+        this.handleClick({
+          name: "规划地块",
+          index: 0
+        }, {})
+      }
       else if (this.title == "三维分析") this.ruleForm.height = 50;
     },
     submit() {
       this.$emit("pullUp", this.optional, this.ruleForm.height);
     },
-    async getCollapseList(){
-       let data = await GetCascadeList();
-       this.tabs_list = data.data;
-       this.loading = false
+    async getCollapseList() {
+      let data = await GetCascadeList();
+      this.tabs_list = data.data;
+      this.loading = false
     },
     setEchart(data, type, index) {
       this.$nextTick(() => {
@@ -99,9 +102,8 @@ export default {
       this.rawData = [];
       this.tabs_list.forEach(async element => {
         if (element.tableName == tab.name) {
-
           let pane_obj = {
-            sourcePolygonWkt: this.optional.geom,
+            sourcePolygonWkt: this.optional.geom.split(";")[1],
             // sourcePolygonWkt: 'POLYGON((109.49712143164533 18.309279728765855,109.49711192926624 18.310380990351096,109.49711161665255 18.310417116323478,109.4972007070708 18.31050362418087,109.49850056210042 18.310513852191068,109.49859113294231 18.31042875918721,109.49859144375941 18.31039263236441,109.4986014051776 18.309237180686633,109.4984888696287 18.309127909086385,109.49725521594395 18.30911820207864,109.49712174425906 18.30924360340898,109.49712143164533 18.309279728765855))',
 
             sourceLayerId: this.tabs_list[0].tableId,
@@ -267,9 +269,11 @@ export default {
   margin-right: 0px !important;
   width: auto !important;
 }
+
 .inputwidth {
   width: calc(100% - 50px);
 }
+
 .heiBtn {
   position: absolute;
   right: 20px;

+ 37 - 52
src/views/siteselection/components/xzjg.vue

@@ -8,22 +8,12 @@
       </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,10 +23,8 @@
               </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>
@@ -45,41 +33,21 @@
     </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"
-                  @click.stop="mapview(item)"
-                ></i>
-                <i
-                  class="header-icon el-icon-s-order"
-                  @click="planInfo1($event, item)"
-                ></i>
-                <!-- <i
-                  class="header-icon el-icon-receiving"
-                  @click="nowInfo($event, item)"
-                ></i> -->
-                <i
-                  class="header-icon el-icon-receiving"
-                  @click="threeInfo($event, item)"
-                ></i>
-                <i
-                  class="header-icon el-icon-plus"
-                  @click="addprogramme($event, item)"
-                ></i>
+                <i class="header-icon el-icon-place" @click.stop="mapview(item)"></i>
+                <i class="header-icon el-icon-s-order" @click="planInfo1($event, item)"></i>
+                <i class="header-icon el-icon-download" @click="download($event, item)"></i>
+                <i class="header-icon el-icon-receiving" @click="threeInfo($event, item)"></i>
+                <i class="header-icon el-icon-plus" @click="addprogramme($event, item)"></i>
               </span>
             </template>
             <div class="collapseCon">
@@ -90,10 +58,8 @@
               <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>
@@ -125,6 +91,8 @@
 <script>
 import { GetXzjg, DownloadLandReport } from "../../../api/ghss/ghxz.js";
 import dkDetails from "./dkDetailsNew.vue";
+import { WriteWkt,DownFile } from "@/api/cockpitNew";
+
 // 使用
 import parse from "wellknown";
 let dataSources = {};
@@ -203,8 +171,8 @@ export default {
           (res) => {
             window.open(
               window.axiosURI +
-                "/analyse/fzss/DownloadReport?filePath=" +
-                `${res.data.fxbg}`
+              "/analyse/fzss/DownloadReport?filePath=" +
+              `${res.data.fxbg}`
             );
           }
         );
@@ -336,8 +304,25 @@ export default {
       this.$refs.dkDetails.getCollapseList();
     },
     planInfo1(e, item) {
-      console.log("item: ", item);
       this.$refs.dkDetails.show(item, "规划信息");
+    },
+    async download(e, item) {
+
+      let wkt = item.geom.split(";")[1]
+
+      var data = JSON.stringify({
+        "wkt": wkt,
+        "fileName": ""
+      });
+      let path = await WriteWkt(data);
+      console.log('path: ', path.data.path);
+      window.open(
+              window.axiosURI +
+              "/analyse/fzss/DownloadReport?filePath=" +
+              `${path.data.path}`
+            );
+      
+
     },
     //现状信息
     nowInfo(e, item) {
@@ -393,7 +378,7 @@ export default {
       window.open(this.model.zip, "_blank");
     },
 
-    loadJgMap() {},
+    loadJgMap() { },
 
     loadJg(bsm) {
       console.log(bsm, "bsm");