Browse Source

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

lkk 6 tháng trước cách đây
mục cha
commit
f4c256fb27

+ 67 - 0
src/api/ghss/gdbhadd.js

@@ -0,0 +1,67 @@
+import request from '@/utils/request.js'
+
+export function GetJctbDate(params) {
+    return request({
+        url: '/apply/gdbh/jctb/date/list',
+        method: 'get',
+        params
+    })
+}
+export function GetFactorList(params) {
+    return request({
+        url: '/apply/gdbh/GetFactorList',
+        method: 'get',
+        params
+    })
+}
+//添加模型分析研判
+export function AddGdbh(data) {
+    return request({
+        url: '/apply/gdbh/AddGdbh',
+        method: 'post',
+        data: data
+    })
+}
+//历史记录查询
+export function SelectGdbhList(params) {
+    return request({
+        url: '/apply/gdbh/SelectGdbhList',
+        method: 'get',
+        params
+    })
+}
+export function QueryGdbhJg(params) {
+    return request({
+        url: '/apply/gdbh/QueryGdbhJg',
+        method: 'get',
+        params
+    })
+}
+// 删除报建模型
+export function DeleteGdbh(bsm) {
+    return request({
+      url: "/apply/gdbh/DeleteGdbh/" + bsm,
+      method: "delete",
+    });
+  }
+  export function getYZ(params) {
+    return request({
+        url: '/apply/gdbh/QueryGdbhJg/yz',
+        method: 'get',
+        params
+    })
+}
+export function getgeoms(params) {
+    return request({
+        url: '/apply/gdbh/QueryGdbhJg/geom',
+        method: 'get',
+        params
+    })
+}
+  export function getOneDetail(params) {
+    return request({
+        url: '/apply/gdbh/QueryGdbhJg/id',
+        method: 'get',
+        params
+    })
+}

+ 28 - 9
src/utils/MapHelper/help.js

@@ -59,8 +59,9 @@ export function loadGeoJSON(geom, yanse, adata, fun) {
         offset: new Cesium.HeadingPitchRange(0, -45),
       });
     fun(data)
-    if (!geojson.type.includes("Polygon")) {
-      data.entities.values.forEach((entity, ei) => {
+    console.log(adata.name, '---')
+    data.entities.values.forEach((entity, ei) => {
+      if (!geojson.type.includes("Polygon")) {
         if (entity.billboard) {
           entity.billboard = new Cesium.BillboardGraphics({
             image: "@/.././static/images/flypng/hos_point.png",
@@ -69,14 +70,32 @@ export function loadGeoJSON(geom, yanse, adata, fun) {
             scale: 1.0,
             pixelOffset: new Cesium.Cartesian2(0, -16),
           });
-          // entity.point = {
-          //   pixelsize: 20,
-          //   color: Cesium.Color.fromCssColorString(colors),
-          // };
         }
-      });
-    }
-
+        // entity.point = {
+        //   pixelsize: 20,
+        //   color: Cesium.Color.fromCssColorString(colors),
+        // };
+      }
+      if (adata.name && entity.polygon) {
+        if (!adata.lab_pos || !ei) {
+          let center = adata.lab_pos ? parse(adata.lab_pos).coordinates : getCentroid(geojson, ei);
+          entity.position = Cesium.Cartesian3.fromDegrees(
+            center[0],
+            center[1],
+            adata.lab_height || 0
+          );
+          entity.label = {
+            font: "bolder 18px sans-serif",
+            distanceDisplayCondition: new Cesium.DistanceDisplayCondition(100, adata.lab_max || 10000),
+            style: Cesium.LabelStyle.FILL_AND_OUTLINE,
+            text: adata.name, //图标名称
+            fillColor: Cesium.Color.fromCssColorString(yanse),
+            pixelOffset: new Cesium.Cartesian2(0, -20),
+            zIndex: 3,
+          };
+        }
+      }
+    });
   });
   // let polygon = Cesium.GeoJsonDataSource.load(geojson, {
   //   clampToGround: true,

+ 28 - 8
src/views/LandConsolidation/components/sdgk.vue

@@ -193,6 +193,16 @@ export default {
       this.$emit("updateParent", "loading", false);
     },
     async Getkjxx() {
+      let jxres = await QueryList({
+        jscType: "qytuzz_sdzl_kjxx_jx",
+        id: this.region,
+      });
+      if (jxres.data && jxres.data.length)
+        loadGeoJSON(jxres.data[0].geom, "#ffffff", { isfly: true }, (data) => {
+          // geoSources[ri] = data;
+          data.name = "sdqy";
+          data.show = false;
+        });
       let res = await QueryList({
         jscType: "qytuzz_sdzl_kjxx",
         id: this.region,
@@ -203,14 +213,24 @@ export default {
       newVal.forEach((res, ri) => {
         let color = legends[res.type].color;
         if (res.geom)
-          loadGeoJSON(res.geom, color, { isfly: true }, (data) => {
-            geoSources[ri] = data;
-            data.name = res.type = 0 ? "sdqy" : "zzqy";
-            // data.show = false;
-            // data.entities.values.forEach((entity) => {
-            //   entity.properties = { type: "图斑上图", id: res.id };
-            // });
-          });
+          loadGeoJSON(
+            res.geom,
+            color,
+            {
+              isfly: false,
+              name: res.name,
+              lab_pos: res.centroid,
+              lab_max: res.type ? 3000 : 100000,
+            },
+            (data) => {
+              geoSources[ri] = data;
+              data.name = res.type == 0 ? "sdqy" : "zzqy";
+              // data.show = false;
+              // data.entities.values.forEach((entity) => {
+              //   entity.properties = { type: "图斑上图", id: res.id };
+              // });
+            }
+          );
       });
     },
     sourcesshow(isshow) {

+ 49 - 6
src/views/LandConsolidation/index.vue

@@ -17,7 +17,18 @@
       <div class="innerContainer leftPane" v-drag>
         <h2 class="Pangetitle darg-div el-col">
           <span class="pange_text">全域土地综合整治专题 </span>
-          <i class="document el-icon-document" @click="drawer = !drawer"></i>
+
+          <el-dropdown @command="download">
+            <span class="document el-icon-document"> </span>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item
+                v-for="file in filelist"
+                :key="file"
+                :command="file"
+                >{{ file.slice(19) }}
+              </el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
           <div class="region">
             <!-- clearable -->
             <el-cascader
@@ -112,13 +123,16 @@
     <!-- <iframe
       v-if="drawer"
       type="module"
-      :srcdoc="require('@/../static/data/aa.html')"
+      :srcdoc="htmlContent"
       style="width: 100%; height: 100%; position: absolute"
     ></iframe> -->
+    <!-- <div v-if="drawer" v-html="htmlContent"></div> -->
   </div>
 </template>
 
 <script>
+// import htmlContent from "@/../static/data/aa.html";
+import { QueryOne } from "@/api/cockpitNew";
 import Organize from "./components/organize.vue";
 import Sdgk from "./components/sdgk.vue";
 import Qhdb from "./components/qhdb.vue";
@@ -146,6 +160,8 @@ export default {
   },
   data() {
     return {
+      // htmlContent: htmlContent,
+      filelist: [],
       loading: false,
       drawer: false,
       xzqh: "",
@@ -180,7 +196,7 @@ export default {
       store.setCockpitDate(sessionStorage.getItem("cockpitDate").split(","));
   },
   mounted() {
-    this.xzqh = store.state.cockpit_region.id;
+    this.xzqh = "460202"; //store.state.cockpit_region.id;
     this.regionChange();
     this.bus.$on("handleView", this.handleView);
   },
@@ -188,6 +204,23 @@ export default {
     changeData(name, updata) {
       this[name] = updata;
     },
+    async getssfa() {
+      let res = await QueryOne({
+        jscType: "qytuzz_sdzl_sdmb_ssfa",
+        id: this.xzqh,
+      });
+      console.log(res.data);
+      this.filelist = res.data.zzwafile.split(",");
+    },
+    handleClick() {},
+    download(file) {
+      console.log(file, "aa");
+      // window.open(this.$props.scjgObj.fxbg); //this.$props.scjgObj.task.fxbg
+      window.open(
+        ` ${window.axiosURI}/analyse/fzss/ShowReport?filePath=${file}`,
+        "_blank"
+      );
+    },
     goContrast(dbdata) {
       this.$refs.sdgk.sourcesshow(false);
       this.iscontrast = true;
@@ -207,6 +240,7 @@ export default {
     regionChange() {
       this.onClick(this.activeIndex);
       this.$refs.detailModal.closeInster();
+      this.getssfa();
     },
     cockpit() {
       //驾驶舱矢量数据点选查询
@@ -305,9 +339,6 @@ export default {
 .newContainer {
   top: 40px !important;
 }
-.el-select-dropdown {
-  background-color: rgba(4, 28, 50, 1) !important;
-}
 </style>
 <style lang="scss">
 .LandConsolidation {
@@ -372,5 +403,17 @@ export default {
     }
   }
 }
+.el-dropdown-menu,
+.el-select-dropdown {
+  background-color: rgba(4, 28, 50, 1) !important;
+  border: 1px solid rgba(15, 122, 200, 0.4) !important;
+}
+.el-dropdown-menu__item {
+  color: #fff !important;
+}
+.el-dropdown-menu__item:focus,
+.el-dropdown-menu__item:not(.is-disabled):hover {
+  background-color: rgba(255, 255, 255, 0.35) !important;
+}
 @import "../complianceAnalysis/ghzc.scss";
 </style>

+ 38 - 3
src/views/farmlandProtection/components/jclxqk.vue

@@ -16,7 +16,7 @@
         placeholder="行政区"
         :props="{ checkStrictly: true, expandTrigger: 'hover' }"
         clearable
-        v-model="xzqTreeValue"
+        v-model="region"
       ></el-cascader>
       <el-select v-model="monitorVal" placeholder="请选择">
         <el-option
@@ -41,7 +41,7 @@
             <span style="color: #fff">监测图斑数</span>
           </div>
           <div>
-            <span class="numberColor">{{ 158.38 }}km²</span>
+            <span class="numberColor">{{ sdata.jcgs }}个</span>
           </div>
         </div>
       </div>
@@ -57,7 +57,7 @@
             <span style="color: #fff">监测面积</span>
           </div>
           <div>
-            <span class="numberColor">{{ 153.17 }}km²</span>
+            <span class="numberColor">{{  sdata.jcmj }}km²</span>
           </div>
         </div>
       </div>
@@ -99,18 +99,21 @@
 <script>
 import Statistics from "./statistics";
 import { GetXzqhTree } from "@/api/map";
+import { QueryOne, QueryList } from "@/api/cockpitNew";
 export default {
   components: {
     Statistics,
   },
   data() {
     return {
+      region: "4602",
       xzqTreeData: [], //申请范围
       tab: 1,
       options: [
         { name: "图斑数", value: 1 },
         { name: "监测面积", value: 2 },
       ],
+      sdata: {},
       myChart: null,
       cityList: [
         {
@@ -202,6 +205,7 @@ export default {
   mounted() {
     this.initEcharts();
     this.getXzqTreeData();
+    this.getData();
   },
   methods: {
     getXzqTreeData() {
@@ -218,6 +222,37 @@ export default {
         }
       });
     },
+    getData() {
+      this.getzl();
+      this.GetCityList();
+    },
+    async getzl() {
+      let sdres = await QueryOne({
+        jscType: "t_gdbh_jctb_tbzl",
+        id: this.region,
+        val0: "2024-02-17 00:00:00",
+        val1: "2024-12-31 23:59:59",
+        val2: "",
+      });
+      this.sdata = sdres.data;
+    },
+    async GetCityList() {
+      this.cityList = [];
+      let flres = await QueryList({
+        jscType: "t_gdbh_jctb_qxfl",
+        id: this.region,
+        val0: "2024-02-17 00:00:00",
+        val1: "2024-12-31 23:59:59",
+      });
+      flres.data.forEach((fl) => {
+        this.cityList.push({
+          name: fl.xzqmc,
+          number: fl.jcgs,
+          area: fl.jcmj,
+          unit: "km²",
+        });
+      });
+    },
     initEcharts(payload) {
       console.log(payload);
       this.myChart = echarts.init(this.$refs.echars_pie);

+ 39 - 40
src/views/farmlandProtection/gdzl/index.vue

@@ -142,6 +142,7 @@ import bar from "@/components/echartsTemplate/bar.vue";
 import Statistics from "../components/statistics.vue";
 import { overview, district, reason } from "@/api/Idleland.js";
 import { QueryOne, QueryList } from "@/api/cockpitNew";
+import { GetJctbDate, DeleteGdbh } from "@/api/ghss/gdbhadd.js";
 import { legends } from "../config.js";
 import { loadGeoJSON } from "@/utils/MapHelper/help.js";
 export default {
@@ -203,44 +204,7 @@ export default {
         yData: [[-10, 10, 10, 10]],
         legend: [""],
       },
-      cityList: [
-        {
-          name: "天涯区",
-          number: 125,
-          area: 48.73,
-          unit: "km²",
-        },
-        {
-          name: "崖州区",
-          number: 125,
-          area: 48.73,
-          unit: "km²",
-        },
-        {
-          name: "海棠区",
-          number: 125,
-          area: 48.73,
-          unit: "km²",
-        },
-        {
-          name: "吉阳区",
-          number: 125,
-          area: 48.73,
-          unit: "km²",
-        },
-        {
-          name: "吉阳区",
-          number: 125,
-          area: 48.73,
-          unit: "km²",
-        },
-        {
-          name: "吉阳区",
-          number: 125,
-          area: 48.73,
-          unit: "km²",
-        },
-      ],
+      cityList: [],
     };
   },
   components: {
@@ -249,6 +213,7 @@ export default {
   },
   mounted() {
     this.getYear();
+    this.GetData();
     this.typeList = [{ label: "耕地" }, ...legends];
   },
   methods: {
@@ -263,6 +228,12 @@ export default {
         this.yearList.push({ value: i, label: i + "年" });
       }
     },
+    GetData() {
+      GetJctbDate().then((res) => {
+        this.xzdata = res.data;
+        this.$emit("updateParent", "loading", false);
+      });
+    },
     regionChange(region) {
       this.region = region;
       this.getData();
@@ -271,15 +242,25 @@ export default {
       this.$emit("updateParent", "loading", true);
       this.Getzzxm();
       this.Getxzxx();
-
       this.Getkjxx();
+      this.GetCityList();
     },
     async Getzzxm() {
       let sdres = await QueryOne({
-        jscType: "qytuzz_sdzl_sdqk",
+        jscType: "t_gdbh_jctb_tbzl",
         id: this.region,
+        val0: "2024-02-17 00:00:00",
+        val1: "2024-12-31 23:59:59",
+        val2: "",
       });
       this.sdata = sdres.data;
+      let lxres = await QueryList({
+        jscType: "t_gdbh_jctb_jclx",
+        id: this.region,
+      });
+
+      console.log(lxres, "lx");
+
       let { data } = await QueryList({
         jscType: "jsc_stxf_ywfl_tdzz",
         id: this.region,
@@ -292,6 +273,7 @@ export default {
       });
       this.setEchart(this.eData, 0);
     },
+
     async Getxzxx() {
       let res = await QueryOne({
         jscType: `qytuzz_sdzl_xzxx_${this.tab}`,
@@ -300,6 +282,23 @@ export default {
       this.xzdata = res.data;
       this.$emit("updateParent", "loading", false);
     },
+    async GetCityList() {
+      this.cityList = [];
+      let flres = await QueryList({
+        jscType: "t_gdbh_jctb_qxfl",
+        id: this.region,
+        val0: "2024-02-17 00:00:00",
+        val1: "2024-12-31 23:59:59",
+      });
+      flres.data.forEach((fl) => {
+        this.cityList.push({
+          name: fl.xzqmc,
+          number: fl.jcgs,
+          area: fl.jcmj,
+          unit: "km²",
+        });
+      });
+    },
 
     async Getkjxx() {
       let res = await QueryList({

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

@@ -115,11 +115,9 @@ export default {
       if (val != 0) this.$refs.gdzl.reset();
       if (val == 0) {
         this.$refs.gdzl.regionChange(this.xzqh);
-        this.$refs.qhdb.regionChange(this.xzqh);
-        this.$refs.organize.regionChange(this.xzqh);
       }
-      if (val == 1) this.$refs.list.regionChange(this.xzqh);
-      if (val == 2) this.$refs.xzgd.getData();
+      if (val == 1) this.$refs.gdzl.regionChange(this.xzqh);
+      // if (val == 2) this.$refs.xzgd.getData();
     },
   },
   watch: {