Sfoglia il codice sorgente

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

lkk 5 mesi fa
parent
commit
c1f862d85b

+ 6 - 2
src/components/mapView/tablePage.vue

@@ -13,7 +13,7 @@
       :tree-props="treeProps"
       row-key="bsm"
     >
-      <el-table-column v-if="indexed" label="序号" width="70px">
+      <el-table-column v-if="indexed" label="序号" width="70px" align="center">
         <template slot-scope="scope">{{ scope.$index + 1 }}</template>
       </el-table-column>
       <el-table-column
@@ -24,6 +24,7 @@
         show-overflow-tooltip
         :width="item.width || null"
         :fixed="item.fixed"
+        :align="item.align || 'left'"
       >
         <template #default="scope">
           <slot
@@ -35,7 +36,10 @@
         </template>
       </el-table-column>
     </el-table>
-    <div class="tabs-pagation pagination" v-if="table.data.length && table.total">
+    <div
+      class="tabs-pagation pagination"
+      v-if="table.data.length && table.total"
+    >
       <!-- <div class="font" v-if="showTotal">共{{ table.total }}条记录</div> -->
       <!-- <el-pagination class="tabone-pagination" background layout="prev, pager, next" :current-page="pageNum"
             :pager-count="5" :page-size="5" :total="table.total" @current-change="changePage" /> -->

+ 0 - 1
src/utils/MapHelper/help.js

@@ -59,7 +59,6 @@ export function loadGeoJSON(geom, yanse, adata, fun) {
         offset: new Cesium.HeadingPitchRange(0, -45),
       });
     fun(data)
-    console.log(adata.name, '---')
     data.entities.values.forEach((entity, ei) => {
       if (!geojson.type.includes("Polygon")) {
         if (entity.billboard) {

+ 8 - 5
src/views/LandConsolidation/components/AsideBottom.vue

@@ -47,10 +47,7 @@ export default {
     stepPropsClick(active) {
       if (this.activeVal == active) return;
       this.activeVal = active;
-      if (this.timer) {
-        clearInterval(this.timer);
-        this.timer = null;
-      }
+      this.clearTimer();
       this.$emit("activeValChange", this.activeVal);
     },
     clickHandler() {
@@ -67,9 +64,15 @@ export default {
       if (this.activeVal > this.dataArray.length) this.activeVal = 0;
       this.$emit("activeValChange", this.activeVal);
     },
+    clearTimer() {
+      if (this.timer) {
+        clearInterval(this.timer);
+        this.timer = null;
+      }
+    },
   },
   beforeDestroy() {
-    clearInterval(this.timer);
+    this.clearTimer();
   },
   watch: {},
 };

+ 9 - 8
src/views/LandConsolidation/components/config.js

@@ -35,10 +35,10 @@ export const reasonList = [
   { name: "乡村历史文化保护项目", code: 3 },
 ]
 export const TableHeader = [
-  { label: "项目名称", prop: "xmmc" },
-  { label: "主管部门", prop: "zgbm", width: '80px' },// slot: "mj"
-  { label: "建设规模", prop: "gm", },
-  { label: "操作", slot: "action" },
+  { label: "项目名称", prop: "xmmc", align: 'center' },
+  // { label: "主管部门", prop: "zgbm", width: '80px' },// slot: "mj"
+  { label: "建设规模", prop: "gm", width: '80px', align: 'center' },
+  { label: "操作", slot: "action", width: '80px', align: 'center' },
 ]
 
 export const xzForm = [
@@ -59,10 +59,10 @@ export const xzForm = [
   ]
 ]
 export const xzTableHeader = [
-  { label: "地块编号", prop: "xzgdlydlbm" },
-  { label: "面积(亩)", prop: "xzgdmj", slot: "mj" },
-  { label: "等别", prop: "xzgddb", },
-  { label: "操作", slot: "action", width: '80px', },
+  { label: "地块编号", prop: "xzgdlydlbm", align: 'center', align: 'center' },
+  { label: "面积(亩)", prop: "xzgdmj", slot: "mj", align: 'center' },
+  { label: "等别", prop: "xzgddb", align: 'center' },
+  { label: "操作", slot: "action", width: '80px', align: 'center' },
 ]
 export const detailInfosold = [
   [[
@@ -121,6 +121,7 @@ export const detailInfosold = [
 // 整治项目详情
 export const detailInfos = [
   { name: '项目名称', value: 'xmmc' },
+  { name: '项目类型', value: 'xmlx' },
   { name: '主管部门', value: 'zgbm' },
   { name: '申请立项部门', value: 'sqlxbm' },
   { name: '批复部门', value: 'pfbm' },

+ 9 - 6
src/views/LandConsolidation/components/contrast.vue

@@ -92,7 +92,7 @@ export default {
     closeInster() {
       this.onClick(-1);
       removeGeoJSON("fpdb");
-      this.nolayer = this.layersData[0].year;
+
       this.$emit("close");
     },
     show(data) {
@@ -128,14 +128,16 @@ export default {
           setImageryRoller(layer);
         });
       } else {
-        hideImageryRoller(this.imagelayers[this.nolayer]);
-        useRoller(false);
+        // hideImageryRoller(this.imagelayers[this.nolayer]);
+        // useRoller(false);
       }
       this.multiView();
       if (i == 2) {
         this.$refs.aside.activeVal == 0;
         this.$refs.aside.clickHandler();
       } else {
+        this.$refs.aside.clearTimer();
+        // this.nolayer = this.layersData[0].year;
         // this.layersData.forEach((img) => {
         //   this.setImager(img, false);
         // });
@@ -184,14 +186,15 @@ export default {
       newVal.forEach((res, index) => {
         this.checkdata[0].push(res.dlbmmc);
         // this.checkdata[1].push(res.dlbmmc);
+        let adata = { isfly: true, fill_a: 0.8 };
         if (res.qgeom)
-          loadGeoJSON(res.qgeom, res.dict_color, { isfly: true }, (data) => {
+          loadGeoJSON(res.qgeom, res.dict_color, adata, (data) => {
             geoSources[res.dlbmmc + "q"] = data;
             data.name = "fpdb";
             data.setVisibleInViewport(1, false);
           });
         if (res.hgeom)
-          loadGeoJSON(res.hgeom, res.dict_color, { isfly: true }, (data) => {
+          loadGeoJSON(res.hgeom, res.dict_color, adata, (data) => {
             geoSources[res.dlbmmc + "h"] = data;
             data.name = "fpdb";
             data.setVisibleInViewport(0, false);
@@ -209,7 +212,7 @@ export default {
   },
   watch: {
     nolayer(newVal, oldVal) {
-      console.log(newVal, oldVal,'---nolayer');
+      console.log(newVal, oldVal, "---nolayer");
       if (oldVal) this.setImager({ year: oldVal }, false);
     },
   },

+ 1 - 1
src/views/LandConsolidation/components/details.vue

@@ -88,7 +88,7 @@ export default {
               let unit = res.data[key.unitpro] || key.unit || "";
               this.jbxxData.push({
                 name: key.name,
-                value: res.data[key.value] + unit,
+                value: (res.data[key.value] || "——") + unit,
               });
             });
           } else {

+ 3 - 3
src/views/LandConsolidation/components/list.vue

@@ -137,14 +137,14 @@ export default {
         });
       });
     },
-    flyTo(item) {
+    flyTo(item, fill_a = 0.4) {
       // let xzqdm = "h_" + item.xzqdm;
       // this.tempdataLayerId = xzqdm;
       // if (geoSources[xzqdm]) return;
       removeGeoJSON("zzxmhig");
       item.tQytdzzZzxm.forEach((res) => {
         if (res.geom)
-          loadGeoJSON(res.geom, "#ff0000", { isfly: true }, (data) => {
+          loadGeoJSON(res.geom, "#ff0000", { isfly: true, fill_a }, (data) => {
             data.name = "zzxmhig";
             geoSources[res.pid + res.id + "h"] = data;
             res.entity = "整治图斑";
@@ -172,7 +172,7 @@ export default {
     },
     async handle(row) {
       removeGeoJSON("zzxm");
-      this.flyTo(row);
+      this.flyTo(row, 0.01);
       let res = await QueryList({
         jscType: "qytuzz_zzxm_qhdb",
         id: row.id,

+ 6 - 2
src/views/LandConsolidation/components/qhdb.vue

@@ -51,7 +51,7 @@ export default {
       jdData: {
         legend_data: ["整治前", "整治后", "变化面积"],
         x_data: [],
-        yAxis: [{ name: "面积(km²)" }, { name: "变化面积(km²)" }],
+        yAxis: [{ name: "面积(公顷)" }, { name: "变化面积(公顷)" }],
         legendmap: [{ type: "bar" }, { type: "bar" }, { type: "line" }],
         params: {},
         region: "",
@@ -100,7 +100,11 @@ export default {
         jscType: `qytuzz_sdzl_tdlyqhdb_dlbh_${this.tab}`,
         id: this.region,
       }).then((res) => {
-        this.dbdata = { id: this.region, fp: res.data };
+        this.dbdata = {
+          id: this.region,
+          fp: res.data,
+          type: this.tab,
+        };
         res.data.forEach((jdData) => {
           this.jdData.x_data.push(jdData.dlbmmc);
           this.jdData.result[0].push(jdData.qtbdlmj.toFixed(2));

+ 15 - 2
src/views/LandConsolidation/components/sdgk.vue

@@ -96,7 +96,7 @@ import pie from "@/components/echartsTemplate/pie.vue";
 import { overview, district, reason } from "@/api/Idleland.js";
 import { QueryOne, QueryList } from "@/api/cockpitNew";
 import { legends } from "./config.js";
-import { loadGeoJSON } from "@/utils/MapHelper/help.js";
+import { loadGeoJSON, removeGeoJSON } from "@/utils/MapHelper/help.js";
 let geoSources = {};
 export default {
   props: {},
@@ -207,6 +207,8 @@ export default {
         jscType: "qytuzz_sdzl_kjxx",
         id: this.region,
       });
+      this.zlgeom = res.data;
+
       this.active_tableData(res.data);
     },
     active_tableData(newVal) {
@@ -233,7 +235,18 @@ export default {
           );
       });
     },
-    sourcesshow(isshow) {
+    flyTo(type) {
+      removeGeoJSON("zlhig");
+      this.zlgeom.forEach((res) => {
+        if (res.geom && res.type == type)
+          loadGeoJSON(res.geom, "#ff0000", { fill_a: 0.01 }, (data) => {
+            data.name = "zlhig";
+          });
+      });
+    },
+    sourcesshow(isshow, type) {
+      if (!isshow) type && this.flyTo(type == "sd" ? 0 : 1);
+      else removeGeoJSON("zlhig");
       Object.keys(geoSources).forEach((name) => {
         console.log(name, geoSources[name]);
         geoSources[name].show = isshow;

+ 8 - 7
src/views/LandConsolidation/components/xzgd.vue

@@ -1,12 +1,13 @@
 <template>
   <div class="xzgd">
-    <div class="tdTitle" :title="xmdata.xmmc">
-      新增耕地{{ xmdata.xmmc ? `(${xmdata.xmmc})` : "" }}
-    </div>
+    <div class="tdTitle">新增耕地</div>
     <span class="clearBtn" @click="cockpit">
       <i class="el-icon-thumb"></i>
       图斑详情查询
     </span>
+    <div class="tdTitle mcTitle" v-if="xmdata.xmmc" :title="xmdata.xmmc">
+      {{ xmdata.xmmc }}
+    </div>
     <el-tabs
       type="border-card"
       class="xz_box"
@@ -165,9 +166,9 @@ export default {
         this.$refs[`echartRef${id}`].setOptions(data, links);
       });
     },
-    reset(){
-      this.$refs.xzlist.reset()
-    }
+    reset() {
+      this.$refs.xzlist.reset();
+    },
   },
   watch: {
     region(newValue) {
@@ -180,7 +181,7 @@ export default {
 <style lang="scss" scoped>
 .xzgd {
   height: 100%;
-  .tdTitle {
+  .mcTitle {
     width: 100%;
     white-space: nowrap; /* 确保文本在一行内显示 */
     overflow: hidden; /* 超出容器的文本隐藏 */

+ 1 - 1
src/views/LandConsolidation/index.vue

@@ -222,7 +222,7 @@ export default {
       );
     },
     goContrast(dbdata) {
-      this.$refs.sdgk.sourcesshow(false);
+      this.$refs.sdgk.sourcesshow(false, dbdata.type);
       this.iscontrast = true;
       this.$refs.contrastModal.show(dbdata);
     },