Bladeren bron

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

lkk 9 maanden geleden
bovenliggende
commit
34141df95b

+ 8 - 2
src/api/stxf/tdzz.js

@@ -1,8 +1,14 @@
 import request from '@/utils/request'
-export function QueryOne(params) {
+export function getXmList(params) {
     return request({
-        url: '/apply/jsc/QueryOne',
+        url: '/apply/qytdzz/tdzzxm/list',
         method: 'get',
         params
     })
+}
+export function getXm(id) {
+    return request({
+        url: `/apply/qytdzz/tdzzxm/${id}`,
+        method: 'get',
+    })
 }

+ 1 - 1
src/components/mapView/tablePage.vue

@@ -35,7 +35,7 @@
         </template>
       </el-table-column>
     </el-table>
-    <div class="tabs-pagation" 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" /> -->

+ 3 - 5
src/views/Idleland/components/list.vue

@@ -140,11 +140,9 @@ export default {
   },
   methods: {
     searchFun(page = {}) {
-      this.getTableData({
-        ...this.pageObj,
-        pageNum: page.pageIndex || 1,
-        pageSize: page.size || 10,
-      });
+      this.pageObj.pageNum = page.pageIndex || 1;
+      this.pageObj.pageSize = page.size || 10;
+      this.getTableData();
     },
     getTableData() {
       this.$emit("updateParent", "loading", true);

+ 3 - 3
src/views/LandConsolidation/components/config.js

@@ -8,7 +8,7 @@ export const zzForm = [
     },
     {
       label: '',
-      prop: 'val0',
+      prop: 'xmmc',
       span: 10,
       component: 'ElInput',
       componentProps: {
@@ -36,8 +36,8 @@ export const reasonList = [
 ]
 export const TableHeader = [
   { label: "项目名称", prop: "xmmc" },
-  { label: "主管部门", prop: "crmj", width: '80px', slot: "mj" },
-  { label: "建设规模", prop: "ydkgsj", },
+  { label: "主管部门", prop: "zgbm", width: '80px' },// slot: "mj"
+  { label: "建设规模", prop: "tygm", },
   { label: "操作", slot: "action" },
 ]
 

+ 25 - 32
src/views/LandConsolidation/components/list.vue

@@ -7,7 +7,7 @@
     </span>
     <custom-form ref="formRef" :model="pageObj" :config="formConfig">
       <template #type>
-        <el-select v-model="pageObj.val1" placeholder="项目类型">
+        <el-select v-model="pageObj.lxfl" placeholder="项目类型" clearable>
           <el-option
             v-for="item in reasonList"
             :key="item.code"
@@ -32,7 +32,7 @@
       :cloumn="cloumn"
       :table="table"
       :indexed="false"
-      layout="prev, pager,next"
+      layout="total, sizes, prev, next, jumper"
       ref="tableDialogRef"
       @currentChange="searchFun"
     >
@@ -51,6 +51,7 @@
 import tablePage from "@/components/mapView/tablePage.vue";
 import customForm from "@/components/mapView/custom-form.vue";
 import { QueryOne, QueryList } from "@/api/cockpitNew";
+import { getXmList, getXm } from "@/api/stxf/tdzz.js";
 import { GetList } from "@/api/Idleland.js";
 import { zzForm, TableHeader, reasonList } from "./config";
 import { loadGeoJSON } from "@/utils/MapHelper/help.js";
@@ -71,9 +72,9 @@ export default {
   data() {
     return {
       pageObj: {
-        id: "",
-        val0: "",
-        val1: "",
+        xzqdm: "",
+        xmmc: "",
+        lxfl: "",
         pageNum: 1,
         pageSize: 10,
       },
@@ -98,37 +99,28 @@ export default {
     },
     regionChange(region) {
       this.region = region;
-      this.pageObj.id = region;
+      this.pageObj.xzqdm = region;
       this.searchFun();
     },
     searchFun(page = {}) {
-      this.getTableData({
-        ...this.pageObj,
-        pageNum: page.pageIndex || 1,
-        pageSize: page.size || 10,
-      });
+      this.pageObj.pageNum = page.pageIndex || 1;
+      this.pageObj.pageSize = page.size || 10;
+      this.getTableData();
     },
     getTableData() {
       this.$emit("updateParent", "loading", true);
       this.removeGeoJSON();
-      QueryList({ jscType: "qytuzz_zzxm_xmlb", ...this.pageObj }).then(
+      getXmList({ jscType: "qytuzz_zzxm_xmlb", ...this.pageObj }).then(
         (res) => {
           this.$emit("updateParent", "loading", false);
-          this.table = {
-            ...res.data,
-            total: res.data.length,
-            data: res.data,
-          };
+          this.table = { total: res.total, data: res.rows };
           this.active_tableData(res.data);
         }
       );
     },
 
-    Getjxyd() {
-      QueryOne({
-        jscType: "qytuzz_zzxm_xmxq",
-        id: this.region,
-      }).then((res) => {
+    Getjxyd(row) {
+      getXm(row.id).then((res) => {
         this.jxyddata = res.data || {};
         this.$emit("updateParent", "loading", false);
       });
@@ -143,23 +135,23 @@ export default {
       newVal.forEach((res, index) => {
         if (res.geom)
           loadGeoJSON(res.geom, "#55A1E3", { isfly: false }, (data) => {
-            geoSources[res.id] = data;
+            geoSources[res.xzqdm] = data;
             data.name = "Idleland";
             data.entities.values.forEach((entity) => {
-              entity.properties = { type: "图斑上图", id: res.id };
+              entity.properties = { type: "图斑上图", xzqdm: res.xzqdm };
             });
           });
       });
     },
     flyTo(item) {
-      let id = "h_" + item.id;
-      this.tempdataLayerId = id;
-      if (geoSources[id]) return;
+      let xzqdm = "h_" + item.xzqdm;
+      this.tempdataLayerId = xzqdm;
+      if (geoSources[xzqdm]) return;
       loadGeoJSON(item.geom, "#ff0000", { isfly: true }, (data) => {
         data.name = "Idleland";
-        geoSources[id] = data;
+        geoSources[xzqdm] = data;
         data.entities.values.forEach((entity) => {
-          entity.properties = { type: "图斑上图", id: item.id };
+          entity.properties = { type: "图斑上图", xzqdm: item.xzqdm };
         });
       });
     },
@@ -174,14 +166,15 @@ export default {
 
     reset(xzqh) {
       this.pageObj = {
-        id: this.region,
-        val0: "",
-        val1: "",
+        xzqdm: this.region,
+        xmmc: "",
+        lxfl: "",
         pageNum: 1,
         pageSize: 10,
       };
     },
     detail(row) {
+      this.Getjxyd(row);
       this.flyTo(row);
       this.bus.$emit("handleView", row, "整治项目");
     },

+ 72 - 42
src/views/LandConsolidation/components/organize.vue

@@ -1,8 +1,13 @@
 <template>
-  <div class="OrganizeCon">
+  <div class="OrganizeCon" v-loading="loading">
     <div class="tdTitle">试点目标</div>
     <div class="echars">
-      <pie unit="亩" class="pie_echart" ref="echartRef0"  @echartClickTitle="(name) => echartClickTitle(name)"></pie>
+      <pie
+        unit="亩"
+        class="pie_echart"
+        ref="echartRef0"
+        @echartClickTitle="(name) => echartClickTitle(name)"
+      ></pie>
     </div>
     <div class="content">
       <div class="item" v-for="(sd, index) in orgnList" :key="index">
@@ -124,14 +129,24 @@
   <script>
 import pie from "@/components/echartsTemplate/pie.vue";
 import { QueryOne, QueryList } from "@/api/cockpitNew";
+const color = [
+  "#6172D3",
+  "#F5A539",
+  "#FED969",
+  "#469AE3",
+  "#F97A3C",
+  "#2FD9F2",
+  "#A9DB32",
+  "#6151F1",
+];
 export default {
   props: {},
   data() {
     return {
+      loading: false,
       tab: 0,
       imgs: {
         loc: require("../../../../static/images/overview/icon_yrkkg.png"),
-
         zd1: require("../../../../static/images/overview/icon_yrkkg.png"),
       },
       orgnList: [
@@ -160,10 +175,10 @@ export default {
     pie,
   },
   mounted() {
-    this.initEcharts();
+    // this.initEcharts();
   },
   methods: {
-    echartClickTitle(name){
+    echartClickTitle(name) {
       // console.log(name,'-------------------------');
     },
     changeData(name, updata) {
@@ -174,9 +189,10 @@ export default {
       this.getData();
     },
     getData() {
-      this.$emit("updateParent", "loading", true);
+      this.loading = true;
       this.Getzzlx();
       this.GetOverview();
+      this.GetjxydList();
       this.Getjxyd();
     },
 
@@ -202,7 +218,7 @@ export default {
         id: this.region,
       }).then((res) => {
         this.sdata = res.data.length ? res.data[0] : {};
-        this.$emit("updateParent", "loading", false);
+        this.loading = false;
       });
     },
     Getjxyd() {
@@ -211,7 +227,25 @@ export default {
         id: this.region,
       }).then((res) => {
         this.jxyddata = res.data || {};
-        this.$emit("updateParent", "loading", false);
+        this.loading = false;
+      });
+    },
+    GetjxydList() {
+      QueryList({
+        jscType: "qytuzz_sdzl_ydzlqk_jxyd",
+        id: this.region,
+      }).then((res) => {
+        res.data.forEach((yd, index) => {
+          yd.name = yd.key;
+          yd.label = { color: color[index] };
+        });
+        this.initEcharts({
+          toolTip: true,
+          title: "用地占比",
+          unit: "公顷",
+          data: res.data,
+        });
+        this.loading = false;
       });
     },
     changeCharts(e) {},
@@ -220,41 +254,32 @@ export default {
         this.$refs[`echartRef${id}`].setOptions(data);
       });
     },
-    initEcharts() {
+    initEcharts(payload) {
+      console.log(payload);
       this.myChart = echarts.init(this.$refs.second_pie);
-      const payload = {
-        id: "left-center-1",
-        title: "年龄占比",
-        toolTip: true,
-        data: {
-          total: "4.38",
-          data: ["0.59", "0", "3.02", "0.55", "0.22"],
-          x: ["占用草地", "占用耕地", "占用林地", "占用园地", "占用其他农用地"],
-        },
-      };
+      // const payload = {
+      //   id: "left-center-1",
+      //   title: "年龄占比",
+      //   toolTip: true,
+      //   data: {
+      //     total: "4.38",
+      //     data: ["0.59", "0", "3.02", "0.55", "0.22"],
+      //     x: ["占用草地", "占用耕地", "占用林地", "占用园地", "占用其他农用地"],
+      //   },
+      // };
 
-      let data = [];
+      // let data = [];
 
-      const color = [
-        "#6172D3",
-        "#F5A539",
-        "#FED969",
-        "#469AE3",
-        "#F97A3C",
-        "#2FD9F2",
-        "#A9DB32",
-        "#6151F1",
-      ];
-      payload.data.x.forEach((item, index) => {
-        data.push({
-          value: payload.data.data[index],
-          name: item,
-          label: { color: color[index] },
-        });
-      });
+      // payload.data.x.forEach((item, index) => {
+      //   data.push({
+      //     value: payload.data.data[index],
+      //     name: item,
+      //     label: { color: color[index] },
+      //   });
+      // });
 
-      const tooltip = payload.toolTip !== undefined ? payload.toolTip : true;
-      let countdata = payload.data.data.reduce((a, b) => Number(a) + Number(b));
+      // const tooltip = payload.toolTip !== undefined ? payload.toolTip : true;
+      // let countdata = payload.data.data.reduce((a, b) => Number(a) + Number(b));
       let option = {
         backgroundColor: "transparent",
         grid: {
@@ -265,7 +290,7 @@ export default {
           containLabel: true,
         },
         tooltip: {
-          show: tooltip,
+          show: true,
           backgroundColor: "rgba(9, 30, 60, 0.6)",
           extraCssText: "box-shadow: 0 0 8px rgba(0, 128, 255, 0.27) inset;",
           borderWidth: 0,
@@ -300,7 +325,7 @@ export default {
         },
         series: [
           {
-            name: payload.title,
+            name: "",
             type: "pie",
             radius: ["55%", "75%"],
             minAngle: 8,
@@ -336,10 +361,15 @@ export default {
                 },
               },
             },
-            data,
+            data: [],
           },
         ],
       };
+      option.tooltip = payload.toolTip || true;
+      option.series[0].name = payload.title;
+      option.series[0].label.formatter = `{b}\n{a|{c}${payload.unit}}`;
+      option.series[0].data = payload.data;
+
       this.myChart.setOption(option);
     },
   },

+ 3 - 5
src/views/LandConsolidation/components/xzlist.vue

@@ -83,11 +83,9 @@ export default {
       this.$emit("cockpit");
     },
     searchFun(page = {}) {
-      this.getTableData({
-        ...this.pageObj,
-        pageNum: page.pageIndex || 1,
-        pageSize: page.size || 10,
-      });
+      this.pageObj.pageNum = page.pageIndex || 1;
+      this.pageObj.pageSize = page.size || 10;
+      this.getTableData();
     },
     getTableData() {
       this.$emit("updateParent", "loading", true);

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

@@ -257,6 +257,9 @@ export default {
   height: 758px !important;
   top: 70px !important;
 }
+.el-select-dropdown {
+  background-color: rgba(4, 28, 50, 1) !important;
+}
 </style>
 <style lang="scss">
 .LandConsolidation {
@@ -321,6 +324,5 @@ export default {
     }
   }
 }
-
 @import "../complianceAnalysis/ghzc.scss";
 </style>

+ 5 - 0
src/views/cockpit/datePicker.scss

@@ -63,6 +63,11 @@
   border-radius: 6px;
 }
 
+.el-picker-panel__icon-btn,
+.el-date-picker__header-label {
+  color: #fff;
+}
+
 .el-time-spinner__item {
   color: #fff;
 

+ 2 - 0
src/views/complianceAnalysis/ghzc.scss

@@ -253,6 +253,8 @@
         }
     }
 
+
+
     .el-collapse-item__header {
         color: #fff;
         /* 修改标题颜色 */