Explorar el Código

行政区划提出

maxiaoxiao hace 9 meses
padre
commit
5716dda123

+ 6 - 3
src/api/Idleland.js

@@ -68,22 +68,25 @@ export function idleLandList(data) {
 
 
 // 统计
-export function overview() {
+export function overview(params) {
     return request({
         url: `/apply/tdtj/overview`,
         method: 'get',
+        params
     })
 }
-export function district() {
+export function district(params) {
     return request({
         url: `/apply/tdtj/district`,
         method: 'get',
+        params
     })
 }
-export function reason() {
+export function reason(params) {
     return request({
         url: `/apply/tdtj/reason`,
         method: 'get',
+        params
     })
 }
 

+ 1 - 1
src/components/Combinations/LayerManage/LayerManageSplit.vue

@@ -385,7 +385,7 @@ export default {
 
           store.state.tempResourceTree = res.data;
         } else {
-          console.log(e);
+          console.log(res);
         }
       });
     },

+ 45 - 12
src/views/Idleland/index.vue

@@ -1,9 +1,29 @@
 <!--闲置土地-->
 <template>
-  <div class="ghzc complianceAnalysis">
+  <div class="ghzc Idleland">
     <div class="innerContainer leftPane" v-drag>
-      <h2 class="Pangetitle darg-div">
-        <span class="pange_text">闲置土地</span>
+      <h2 class="Pangetitle darg-div el-col">
+        <span class="pange_text">闲置土地 </span>
+        <div class="region">
+          <!-- clearable -->
+          <el-cascader
+            v-model="xzqh"
+            :show-all-levels="false"
+            :options="store.state.region_tree"
+            @change="regionChange"
+            placeholder="行政区"
+            size="mini"
+            :props="{
+              checkStrictly: true,
+              expandTrigger: 'hover',
+              emitPath: false,
+            }"
+          ></el-cascader>
+        </div>
+        <!-- <span class="clearBtn" @click="cockpit">
+          <i class="el-icon-thumb"></i>
+          图斑详情查询
+        </span> -->
       </h2>
       <el-tabs type="border-card" class="xz_box" v-model="activeTabs" stretch>
         <el-tab-pane label="统计总览" name="tjzl">
@@ -32,7 +52,7 @@ import Xzgl from "./components/xzgl.vue";
 import Details from "./components/details.vue";
 // import TabelView from "./components/tabelView.vue";
 export default {
-  name: "complianceAnalysis",
+  name: "Idleland",
   components: {
     Tjzl,
     Xzgl,
@@ -42,11 +62,14 @@ export default {
   data() {
     return {
       loading: false,
-      activeTabs: "xzgl",
+      activeTabs: "tjzl",
+      xzqh: "",
     };
   },
   created() {},
   mounted() {
+    this.xzqh = store.state.cockpit_region.id;
+    this.regionChange();
     this.bus.$on("handleView", this.handleView);
   },
   methods: {
@@ -56,24 +79,24 @@ export default {
     handleView(row, type) {
       this.$refs.detailModal.handleView(row, type);
     },
+    regionChange() {
+      this.$refs.tjzl.regionChange(this.xzqh);
+      this.$refs.xzgl.regionChange(this.xzqh);
+    },
+    cockpit() {},
   },
   watch: {
     activeTabs(newValue) {
-      // if (newValue != "tjzl") this.$refs.tjzl.reset();
       if (newValue != "xzgl") this.$refs.xzgl.reset();
-
       if (newValue == "tjzl") this.$refs.tjzl.getData();
-      if (newValue == "xzgl") {
-        this.$refs.xzgl.reset();
-        this.$refs.xzgl.changeForm();
-      }
+      // if (newValue == "xzgl") this.$refs.xzgl.changeForm();
     },
   },
 };
 </script>
 
 <style lang="scss" scoped>
-.complianceAnalysis {
+.Idleland {
   .xz_box {
     padding-bottom: 0;
     .title {
@@ -95,5 +118,15 @@ export default {
 }
 </style>
 <style lang="scss">
+.Idleland {
+  .region {
+    width: 100px !important;
+    margin: 0 20px;
+  }
+  .el-cascader--mini {
+    top: 0px;
+    background: transparent;
+  }
+}
 @import "../complianceAnalysis/ghzc.scss";
 </style>

+ 54 - 32
src/views/cockpit/ydjc.vue

@@ -65,10 +65,9 @@
             <ThreeStackedBarAndLine class="qxjc_echart"></ThreeStackedBarAndLine>
         </div> -->
       <!-- 农专用地 -->
-
       <ThreeStackedBarAndLine
         :ref="`${value}_echart`"
-        v-show="xzqh_flag"
+        v-show="xzqh_flag&&value != 'xztd'"
         class="qxjc_echart"
       ></ThreeStackedBarAndLine>
       <!-- <XZQHPieChart v-show="!xzqh_flag"></XZQHPieChart> -->
@@ -103,27 +102,27 @@
       <div class="stacontent_ydjc">
         <div class="item cursor" @click="toIdleland">
           <span class="dlabel"> 闲置土地:</span>
-          <span class="dvalue">{{ title.tb_num || 0 }}宗</span>
+          <span class="dvalue">{{ sdata[value].count || 0 }}宗</span>
           <i style="pointer-events: all" :class="{ 'el-icon-view': true }"></i>
         </div>
         <div class="item">
           <span class="dlabel"> 闲置面积:</span>
-          <span class="dvalue">{{ title.tb_mj.toFixed(2) || 0 }}亩</span>
+          <span class="dvalue">{{ sdata[value].mj|| 0 }}亩</span>
         </div>
         <div class="item">
           <span class="dlabel">已处置面积:</span>
-          <span class="dvalue">{{ title.czmj }}亩</span>
+          <span class="dvalue">{{ sdata[value].czmj }}亩</span>
         </div>
         <div class="item">
           <span class="dlabel"> 处置率:</span>
-          <span class="dvalue">{{ title.czl }}</span>
+          <span class="dvalue">{{ sdata[value].czl }}%</span>
         </div>
       </div>
       <pie3d
         id="ydjc_echart_xztd"
         unit="亩"
         :legendFlag="true"
-        ref="xztd_echart"
+        ref="tdxz_echart"
       ></pie3d>
     </div>
   </div>
@@ -153,9 +152,8 @@ export default {
       ],
       value: "lsyd",
       xzqh_flag: true,
-      sdata: { lsyd: {}, nzyd: {} },
+      sdata: { lsyd: {}, nzyd: {} ,xztd:{}},
       list: [],
-      title: { tb_mj: 0 },
     };
   },
   //监听属性 类似于data概念
@@ -200,7 +198,6 @@ export default {
           else number_data.push(0);
         });
       }
-
       if (this.value == "nzyd") {
         let obj = {
           legend_data: ["农转用面积", "建设项目数"],
@@ -220,19 +217,6 @@ export default {
         this.$nextTick(() => {
           this.$refs.lsyd_echart.setOptions(obj);
         });
-      } else {
-        this.$nextTick(() => {
-          //data.data[0].ce_crmj
-          this.$refs.xztd_echart.setOptions(
-            [
-              { name: "政府原因", value: 66 },
-              { name: "企业原因", value: 66 },
-              { name: "非政府原因和不可抗力", value: 20 },
-              { name: "其他", value: 100 },
-            ],
-            0.2
-          );
-        });
       }
     },
     GetQueryOne(params) {
@@ -289,20 +273,58 @@ export default {
       });
     },
     changeChartsLeft(e) {
-      this.GetQueryOne();
-      if (this.xzqh_flag) this.getqxfl();
-      else this.getInfo();
+      
+      if (this.value == "xztd") {
+        this.getxztd();
+      } else {
+        this.GetQueryOne();
+        if (this.xzqh_flag) this.getqxfl();
+        else this.getInfo();
+      }
     },
     switch_xzqh(value) {
-      this.GetQueryOne(value);
-      if (value.id == "4602") {
-        this.xzqh_flag = true;
-        this.getqxfl(value);
+      if (this.value == "xztd") {
+        this.getxztd(value);
       } else {
-        this.xzqh_flag = false;
-        this.getInfo(value);
+        this.GetQueryOne(value);
+        if (value.id == "4602") {
+          this.xzqh_flag = true;
+          this.getqxfl(value);
+        } else {
+          this.xzqh_flag = false;
+          this.getInfo(value);
+        }
       }
     },
+    getxztd(params) {
+      let param = {
+        districtCode: params ? params.id : store.state.cockpit_region.id,
+        startTime: params ? params.beginTime : store.state.cockpit_date[0],
+        endTime: params ? params.endTime : store.state.cockpit_date[1],
+      };
+      this.GetOverview(param);
+      this.GetSumList(param);
+    },
+    GetOverview(params) {
+      overview(params).then((res) => {
+        // this.sdata[this.value] = { sh_mj: 0, sj_number: 0 };
+        this.sdata[this.value] = {
+          count: res.data.confirm.count,
+          mj: res.data.confirm.area.toFixed(2),
+          czmj: res.data.disposal.area.toFixed(2),
+          czl: (res.data.disposalRate * 100).toFixed(2),
+        };
+      });
+    },
+    GetSumList(params) {
+      reason(params).then((res) => {
+        res.data.map((a) => {
+          a.name = a.reason;
+          a.value = a.area.toFixed(2);
+        });
+        this.$refs.tdxz_echart.setOptions(res.data, 0.2);
+      });
+    },
   },
   mounted() {},
   beforeUpdate() {}, //生命周期 - 更新之前