Browse Source

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

lkk 5 tháng trước cách đây
mục cha
commit
1fccad2055

+ 6 - 0
src/router/index.js

@@ -107,6 +107,12 @@ export const constantRoutes = [{
             import('@/views/farmlandProtection/indexNew.vue'),
         hidden: true
     },
+    {
+        path: '/geologyDisaster',
+        component: () =>
+            import('@/views/geologyDisaster/index.vue'),
+        hidden: true
+    },
     {
         path: '/echarts',
         component: () =>

+ 8 - 7
src/utils/MapHelper/map.js

@@ -42,28 +42,29 @@ export function setImageryRollerMode() {
     // else hideImageryRoller(imageryLayer);
 }
 
-export function setImageryRoller(imageryLayer) {
-    console.log("---", Cesium.SplitDirection.RIGHT)
-    switch (rollerShutterConfig.splitDirection) {
-        case Cesium.SplitDirection.LEFT:
+export function setImageryRoller(imageryLayer, layersplit) {
+    // console.log("-splitDirection--", rollerShutterConfig.splitDirection)
+    let direction = layersplit ? layersplit : rollerShutterConfig.splitDirection
+    switch (direction) {
+        case Cesium.SplitDirection.LEFT://1
             imageryLayer.splitDirection = new Cesium.Cartesian2(
                 Cesium.ImagerySplitDirection.RIGHT,
                 Cesium.ImagerySplitDirection.NONE
             );
             break;
-        case Cesium.SplitDirection.RIGHT:
+        case Cesium.SplitDirection.RIGHT://2
             imageryLayer.splitDirection = new Cesium.Cartesian2(
                 Cesium.ImagerySplitDirection.LEFT,
                 Cesium.ImagerySplitDirection.NONE
             );
             break;
-        case Cesium.SplitDirection.TOP:
+        case Cesium.SplitDirection.TOP://-1
             imageryLayer.splitDirection = new Cesium.Cartesian2(
                 Cesium.ImagerySplitDirection.NONE,
                 Cesium.ImagerySplitDirection.BOTTOM
             );
             break;
-        case Cesium.SplitDirection.BOTTOM:
+        case Cesium.SplitDirection.BOTTOM://-2
             imageryLayer.splitDirection = new Cesium.Cartesian2(
                 Cesium.ImagerySplitDirection.NONE,
                 Cesium.ImagerySplitDirection.TOP

+ 43 - 27
src/views/LandConsolidation/components/contrast.vue

@@ -22,7 +22,7 @@
       :list="dbdata.fp"
       :tname="ptaye == 'gdbh' ? 'year' : 'dlbmmc'"
       @toolChick="$set(layers, i, !layers[i])"
-      @checkChange="(name, c, data) => clickcheck(i, name, c)"
+      @checkChange="(name, c, data) => clickcheck(i, name, c, data)"
       :checkdata="ptaye == 'gdbh' ? gdjlcheck[i] : checkdata[0]"
       :toolTitle="
         ptaye == 'gdbh'
@@ -166,21 +166,27 @@ export default {
     checkedChange(value) {
       console.log(value);
     },
-    clickcheck(i, name, checked) {
+    clickcheck(i, name, checked, data) {
       if (this.$props.ptaye == "gdbh") {
+        this.$set(this.gdjlcheck, i, data);
+        let dobj = this.dbdata.fp.find((d) => d.year == name);
         if (this.active == 0) {
-          if (i == 0) {
-            let dobj = this.dbdata.fp.fined((d) => d.year == name);
-            this.setImager(dobj, checked, (layer) => {
-              setImageryRoller(layer);
-            });
-          }
+          let a = {
+            ...dobj,
+            year: dobj.year + (i ? "right" : ""),
+            isfly: checked,
+          };
+          this.setImager(a, checked, (layer) => {
+            if (checked) setImageryRoller(layer, i ? 1 : 2);
+            else hideImageryRoller(layer);
+          });
         } else if (this.active == 1) {
-          let lay = this.imagelayers[name];
-          viewer.flyTo(lay);
-          lay.setVisibleInViewport(i, checked);
+          this.setImager({ ...dobj, isfly: checked }, true, (layer) => {
+            layer.setVisibleInViewport(i, checked);
+          });
         }
       } else {
+        this.checkdata[0] = data;
         let geodata = geoSources[`${name}${i ? "h" : "q"}`];
         if (geodata) {
           if (checked)
@@ -205,6 +211,7 @@ export default {
     },
 
     async onGdbhClick(i) {
+      this.gdjlcheck = [[], []];
       if (i == 3) {
         this.reset();
         return;
@@ -216,14 +223,20 @@ export default {
         });
       }
       if (i == 0) {
-        
         this.layers = [false, false];
         this.gdjlcheck[0].push(this.dbdata.fp[0].year);
         this.gdjlcheck[1].push(this.dbdata.fp[1].year);
-        this.setImager({ ...this.dbdata.fp[0], top: true }, true);
-        this.setImager({ ...this.dbdata.fp[1], top: false }, true, (layer) => {
+        this.setImager({ ...this.dbdata.fp[0], top: true }, true, (layer) => {
           useRoller(true, "lrRoller", "leftRoller", "", false);
-          setImageryRoller(layer);
+          setImageryRoller(layer, 2);
+        });
+        let data = {
+          ...this.dbdata.fp[1],
+          year: this.dbdata.fp[1].year + "right",
+          top: false,
+        };
+        this.setImager(data, true, (layer) => {
+          setImageryRoller(layer, 1);
         });
       } else {
         Object.keys(this.imagelayers).forEach((key) => {
@@ -236,6 +249,8 @@ export default {
 
       if (i == 1) {
         this.layers = [false, false];
+        this.gdjlcheck[0].push(this.dbdata.fp[0].year);
+        this.gdjlcheck[1].push(this.dbdata.fp[1].year);
         this.setImager({ ...this.dbdata.fp[0] }, true, (layer) => {
           layer.setVisibleInViewport(1, false);
         });
@@ -270,13 +285,19 @@ export default {
         store.setaddNode([
           { id: "ttzz", url: this.dbdata.zzq, label: "土地整治对比" },
         ]);
-        this.setImager({ url: this.dbdata.zzq, year: "qian", top: true }, true);
         this.setImager(
-          { url: this.dbdata.zzh, year: "hou", top: true },
+          { url: this.dbdata.zzq, year: "qian", top: true },
           true,
           (layer) => {
             useRoller(true, "lrRoller", "leftRoller", "", false);
-            setImageryRoller(layer);
+            setImageryRoller(layer, 2);
+          }
+        );
+        this.setImager(
+          { url: this.dbdata.zzh, year: "hou", top: true },
+          true,
+          (layer) => {
+            setImageryRoller(layer, 1);
           }
         );
       } else {
@@ -311,12 +332,12 @@ export default {
           }
         });
       else if (this.active == 2) {
-        this.$refs.aside.activeVal == 1;
-        this.$refs.aside.clearTimer();
         this.layersData.forEach((img) => {
           this.setImager(img, false);
         });
       }
+      this.$refs.aside.activeVal == 1;
+      this.$refs.aside.clearTimer();
     },
     async Getlayers() {
       let res = await QueryList({
@@ -328,7 +349,7 @@ export default {
     playChange(acti) {
       if (acti) {
         this.nolayer = this.layersData[acti - 1].year;
-        this.setImager(this.layersData[acti - 1], true);
+        this.setImager({ ...this.layersData[acti - 1], isfly: true }, true);
       }
     },
     setImager(obj, isshow = true, fun) {
@@ -341,7 +362,7 @@ export default {
       }
       if (obj.top) viewer.imageryLayers.raiseToTop(this.imagelayers[obj.year]);
       fun && fun(this.imagelayers[obj.year]);
-      // viewer.flyTo(this.imagelayers[obj.year]);
+      if (obj.isfly) viewer.flyTo(this.imagelayers[obj.year]);
     },
     roller() {
       rollerShutterConfig.splitDirection = new Cesium.Cartesian2(
@@ -374,11 +395,6 @@ export default {
           });
       });
     },
-
-    setImageryRollers(imageryLayer) {
-      if (this.active == 1) setImageryRoller(imageryLayer);
-      else hideImageryRoller(imageryLayer);
-    },
   },
   watch: {
     nolayer(newVal, oldVal) {

+ 3 - 0
src/views/farmlandProtection/gdzl/details.vue

@@ -44,6 +44,9 @@ export default {
     //关闭详情
     closeInster() {
       this.isShallow = false;
+      this.$nextTick(() => {
+        viewer.entities.removeAll();
+      });
     },
     handleView({ parts, queryData, geoms, e }, type) {
       this.type = type;

+ 28 - 15
src/views/farmlandProtection/gdzl/index.vue

@@ -43,7 +43,7 @@
             v-model="region"
             :show-all-levels="false"
             :options="store.state.region_tree"
-            @change="regionChange()"
+            @change="xzqhChange()"
             placeholder="行政区"
             size="mini"
             :props="{
@@ -286,24 +286,36 @@ export default {
       this.regionChange();
     },
     dlbmChange() {
-      let nowtype = this.typeList.find((x) => x.id == this.dlbm);
-      this.gtype = nowtype.label;
+      // let nowtype = this.typeList.find((x) => x.id == this.dlbm);
+      this.gtype = this.typeList.find((x) => x.id == this.dlbm).label;
+      this.xzqhChange();
+      // this.regionChange();
+      // if (this.dlbm == "01") {
+      //   this.nowlayer = this.nowyear;
+      // } else {
+      //   if (nowtype.layerID) {
+      //     this.nowlayer = this.nowyear + nowtype.layerID;
+      //   } else if (this.layers.length) {
+      //     let yobj = this.yearList.find((y) => y.year == this.nowyear);
+      //     if (yobj) this.goLayer(yobj, nowtype);
+      //   }
+      // }
+    },
+    xzqhChange() {
       this.regionChange();
-      if (this.dlbm == "01") {
-        this.nowlayer = this.nowyear;
-      } else {
-        if (nowtype.layerID) {
-          this.nowlayer = this.nowyear + nowtype.layerID;
-        } else if (this.layers.length) {
-          let yobj = this.yearList.find((y) => y.year == this.nowyear);
-          if (yobj) this.goLayer(yobj, nowtype);
-        }
+      if (this.layers.length) {
+        let yobj = this.yearList.find((y) => y.year == this.nowyear);
+        if (yobj) this.goLayer(yobj);
       }
     },
     goLayer(lobj, nowtype) {
       let lname = this.layers[0].name; // `dlbm like '${this.dlbm}%'`,
-      SetParameters(lname, `dlbm = '${this.dlbm}'`, this.provider, (lid) => {
-        this.typeList[nowtype.index].layerID = lid;
+      let sql = `dlbm LIKE '${this.dlbm}%' and ${
+        this.pageType ? "xzqdm" : "qsdwdm"
+      } LIKE '%${this.region}%'`;
+      SetParameters(lname, sql, this.provider, (lid) => {
+        // this.typeList[nowtype.index].layerID = lid;
+        console.log(lid);
         this.nowlayer = this.nowyear + lid;
         this.setImager({ ...lobj, lid });
       });
@@ -484,13 +496,14 @@ export default {
       this.setImager({ year: this.nowlayer }, show);
     },
     reset() {
+      store.setaddNode([]);
       this.$nextTick(() => {
         // this.sourcesshow(false);
         Object.keys(this.imagelayers).forEach((key) => {
           viewer.imageryLayers.remove(this.imagelayers[key]);
         });
         this.imagelayers = {};
-        this.typeList = [...JSON.parse(JSON.stringify(legends))];
+        this.typeList = [...JSON.parse(JSON.stringify(legends))];    
       });
     },
     setEchart(data, id) {

+ 4 - 1
src/views/farmlandProtection/indexNew.vue

@@ -135,7 +135,10 @@ export default {
     },
     onClick(val) {
       this.activeIndex = val;
-      if (val != 0 || val != 1) this.$refs.gdzl.reset();
+      if (val != 0 || val != 1) {
+        this.$refs.gdzl.reset();
+        this.$refs.detailModal.closeInster();
+      }
       if (val == 0 || val == 1) {
         this.$nextTick(() => {
           this.$refs.gdzl.regionChange(true);

+ 297 - 0
src/views/geologyDisaster/index.vue

@@ -0,0 +1,297 @@
+<template>
+  <div class="ghzc geologyDisaster">
+    <div class="innerContainer leftPane" v-drag>
+      <h2 class="Pangetitle darg-div">
+        <span class="pange_text"> 地质灾害隐患点 </span>
+        <div>共:{{ total }}个</div>
+      </h2>
+      <div class="xz_box">
+        <div class="el-col headerSelect">
+          <el-input
+            clearable
+            v-model="pageObj.LA"
+            @input="searchFun"
+            class="search"
+            placeholder="请输入查询内容"
+          ></el-input>
+          <el-cascader
+            v-model="pageObj.xzqh"
+            :show-all-levels="false"
+            :options="store.state.region_tree"
+            placeholder="行政区"
+            :props="{
+              checkStrictly: true,
+              expandTrigger: 'hover',
+              emitPath: false,
+            }"
+            @change="searchFun"
+          ></el-cascader>
+        </div>
+        <tablePage
+          class="tablePage"
+          :cloumn="cloumn"
+          :table="table"
+          :indexed="false"
+          layout="total, sizes, prev, next, jumper"
+          ref="tableDialogRef"
+          @currentChange="searchFun"
+        >
+          <template #mj="{ row }">
+            {{ Number(row.gm).toFixed(2) }}
+          </template>
+          <template #action="{ row }">
+            <span class="usable" @click="detail(row)">详情</span>
+            <span class="usable" @click="handle(row)"> 对比 </span>
+          </template>
+        </tablePage>
+        <!-- <el-table
+        :row-class-name="tableRowClassName"
+        ref="singleTable"
+        :data="active_dableData"
+        style="width: 100%"
+        height="670"
+        :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="(item, index) in store.state.cockpit_vector.columns"
+          :key="index"
+          :width="index ? 100 : cockpit_vector.columns.length > 2 ? 150 : 230"
+          :prop="item"
+          :label="item"
+        >
+        </el-table-column>
+        <el-table-column
+          fixed="right"
+          label="操作"
+          :width="cockpit_vector.action ? 100 : 50"
+        >
+          <template slot-scope="scope">
+           
+            <el-button @click="go(scope.row)" type="text" size="small"
+              >定位</el-button
+            >
+            <el-button
+              v-if="cockpit_vector.action"
+              @click="start(scope.row)"
+              type="text"
+              size="small"
+              >开工</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table> -->
+      </div>
+
+      <!-- <slot name="all"></slot> -->
+    </div>
+    <div class="sm-panel sm-function-module-query" v-if="isShallow" v-drag>
+      <div class="sm-panel-header">
+        <span>详情</span>
+        <i class="el-icon-close" @click="closeIsShallow"></i>
+      </div>
+      <el-tabs
+        type="border-card"
+        class="xz_box info"
+        v-model="activeTabs"
+        stretch
+      >
+        <el-tab-pane label="基本信息" name="base">
+          <!-- <CockpitVector :baseData="details"></CockpitVector> -->
+        </el-tab-pane>
+
+        <el-tab-pane
+          label="全过程管理信息"
+          name="qgc"
+          v-if="title.includes('山水工程')"
+        >
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+  </div>
+</template>
+
+<script>
+import tablePage from "@/components/mapView/tablePage.vue";
+import customForm from "@/components/mapView/custom-form.vue";
+import { QueryList } from "@/api/cockpitNew";
+import { getXmList } from "@/api/stxf/tdzz.js";
+import { zzForm, TableHeader, reasonList } from "./config";
+import { loadGeoJSON, removeGeoJSON } from "@/utils/MapHelper/help.js";
+let geoSources = {};
+export default {
+  components: {
+    tablePage,
+    customForm,
+  },
+  props: {
+    type: {
+      type: String,
+    },
+    recordBsm: {
+      type: String,
+    },
+  },
+  data() {
+    return {
+      pageObj: {
+        xzqdm: "",
+        xmmc: "",
+        lxfl: "",
+        pageNum: 1,
+        pageSize: 10,
+      },
+      region: "",
+      formConfig: zzForm,
+      cloumn: TableHeader,
+      reasonList: reasonList,
+      table: {
+        data: [{}],
+        total: 20,
+      },
+      now: "",
+      tempdataLayerId: "",
+    };
+  },
+  mounted() {
+    this.reset();
+  },
+  methods: {
+    cockpit() {
+      this.$emit("cockpit");
+    },
+    regionChange(region) {
+      this.region = region;
+      this.pageObj.xzqdm = region;
+      this.searchFun();
+    },
+    searchFun(page = {}) {
+      this.pageObj.pageNum = page.pageIndex || 1;
+      this.pageObj.pageSize = page.size || 10;
+      this.getTableData();
+    },
+    getTableData() {
+      this.$emit("updateParent", "loading", true);
+      removeGeoJSON("zzxm");
+      getXmList(this.pageObj).then((res) => {
+        this.$emit("updateParent", "loading", false);
+        this.table = { total: res.total, data: res.rows };
+        this.active_tableData(res.rows);
+      });
+    },
+
+    tableRowClassName({ row, rowIndex }) {
+      // if (rowIndex === this.scrollTop_index) {
+      //   return "warning-row";
+      // }
+      // return "";
+    },
+    active_tableData(newVal) {
+      newVal.forEach((item, index) => {
+        item.tQytdzzZzxm.forEach((res) => {
+          if (res.geom)
+            loadGeoJSON(res.geom, "#facd91", { isfly: false }, (data) => {
+              geoSources[res.pid + res.id] = data;
+              data.name = "zzxm";
+              res.entity = "整治图斑";
+              data.entities.values.forEach((entity) => {
+                entity.properties = { type: "图斑上图", res };
+              });
+            });
+        });
+      });
+    },
+    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, fill_a }, (data) => {
+            data.name = "zzxmhig";
+            geoSources[res.pid + res.id + "h"] = data;
+            res.entity = "整治图斑";
+            data.entities.values.forEach((entity) => {
+              entity.properties = { type: "图斑上图", res };
+            });
+          });
+      });
+    },
+
+    reset(xzqh) {
+      this.pageObj = {
+        xzqdm: this.region,
+        xmmc: "",
+        lxfl: "",
+        pageNum: 1,
+        pageSize: 10,
+      };
+      removeGeoJSON("zzxm");
+      removeGeoJSON("zzxmhig");
+    },
+    detail(row) {
+      this.flyTo(row);
+      this.bus.$emit("handleView", row, "整治项目");
+    },
+    async handle(row) {
+      removeGeoJSON("zzxm");
+      this.flyTo(row, 0.01);
+      let res = await QueryList({
+        jscType: "qytuzz_zzxm_qhdb",
+        id: row.id,
+      });
+      console.log("----", res);
+      this.$emit("contrast", { id: this.region, fp: res.data });
+    },
+
+    changerdxz() {
+      this.pageObj.isConfirm = !this.pageObj.isConfirm;
+      this.searchFun();
+    },
+  },
+  watch: {
+    tempdataLayerId(newVal, oldVal) {
+      if (oldVal && geoSources[oldVal]) {
+        viewer.dataSources.remove(geoSources[oldVal]);
+        geoSources[oldVal] = null;
+      }
+    },
+  },
+  beforeDestroy() {},
+};
+</script>
+
+<style lang="scss" scoped>
+@import "../complianceAnalysis/ghzc.scss";
+.geologyDisaster {
+  width: 100%;
+  height: 100%;
+
+  .headerSelect {
+    width: 100%;
+    height: 26px;
+    //   background: #00ffff;
+    margin: 5px 0px;
+    display: flex;
+    justify-content: space-between;
+  }
+  .tablePage {
+    height: calc(100% - 120px);
+  }
+}
+</style>
+
+<style lang="scss">
+.geologyDisaster {
+  .el-col {
+    padding-right: 0 !important;
+  }
+}
+</style>

+ 2 - 2
src/views/map3d.vue

@@ -71,7 +71,7 @@
           active-text-color="white"
         >
           <template v-for="(item, index) in menu_right">
-            <el-menu-item v-if="!item.children" :index="item.path">{{
+            <el-menu-item class="right-submenu" v-if="!item.children" :index="item.path">{{
               item.title
             }}</el-menu-item>
             <el-submenu
@@ -246,7 +246,7 @@ export default {
     GetRouters() {
       getRouters().then((res) => {
         this.menu_left = res.data[0].children.slice(0, 3);
-        this.menu_right = res.data[0].children.slice(3, 5);
+        this.menu_right = res.data[0].children.slice(3, 6);
 
         let curRouter = this.$router.currentRoute.path;
         if (curRouter == "/") {