Browse Source

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

lkk 1 year ago
parent
commit
eac13beb47

+ 5 - 3
src/views/cockpit/common/DialWatch.vue

@@ -19,9 +19,11 @@
 
         </div>
         <div class="rt_box box_dial_watch">
-            <div class="text">
+            <div class="text" @click="draw_vector">
                 <p>{{ dial_watch_info.rt.key }}</p>
                 <span>{{ dial_watch_info.rt.value }}</span>{{ dial_watch_info.rt.unit }}
+                <i v-show="dial_watch_info.rt.viewer" style="pointer-events:all" :class="{ 'el-icon-view': true }"></i>
+
             </div>
         </div>
         <div class="rb_box box_dial_watch">
@@ -101,7 +103,7 @@ export default {
             let option = {
                 backgroundColor: 'rgba(0,0,0,0)',
                 title: {
-                    text: `{num|${demoData.value}%} ` + '\n' + `{label|完成率}`,
+                    text: `{num|${demoData.value}} ` + '\n' + `{label|完成率}`,
 
                     x: '49%',
                     y: '70%',
@@ -360,7 +362,7 @@ export default {
         position: relative;
         top: -7rem;
         left: 16rem;
-        z-index: -1;
+        z-index: 1;
 
         .text {
             margin-left: 4rem;

+ 53 - 7
src/views/cockpit/common/VectorSpace/BoxCommonVector.vue

@@ -54,7 +54,52 @@ export default {
         };
     },
     methods: {
+        multiPolygonToPolygons(multiPolygon) {
+            const polygons = [];
+            multiPolygon.coordinates.forEach(polygonCoordinates => {
+                polygons.push({
+                    type: 'Polygon',
+                    coordinates: polygonCoordinates
+                });
+            });
+            return polygons;
+        },
+        // draw_vector_tdgy_gy_jd(data) {
+        //     const that = this;
+        //     data.forEach((res) => {
+        //         res.type = this.title
+        //         if (res.geom) {
+        //             res.geom.coordinates.forEach((res_coordinates) => {
+        //                 // let arrayt = [];
+        //                 // if (res_coordinates.length == 1) {
+        //                 //     arrayt = res_coordinates[0]
+        //                 //     const twoDArray = arrayt;
+        //                 //     const oneDArray = twoDArray.reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);
+        //                 //     tdsy.add(res, oneDArray);
+        //                 // } else {
+        //                 //     // arrayt = res_coordinates
+        //                 // }
+
+        //                 // 多面转单面
+        //                 // if (res.geom.type == 'MultiPolygon') {
+        //                 //     let polygons = that.multiPolygonToPolygons(geojson);
+
+        //                 //     // 在
+        //                 //     polygons.forEach((res) => {
+        //                 //         that.add_viewer_for_vector(res, data);
+        //                 //         tdsy.add(res, oneDArray);
+
+        //                 //     })
+        //                 // } else {
+
+        //                 // }
+
+        //             })
+        //         }
+        //     })
+        // },
         draw_vector_tdgy_gy_jd(data) {
+            // tdsy.remove();
             data.forEach((res) => {
                 res.type = this.title
                 if (res.geom) {
@@ -62,19 +107,17 @@ export default {
                         let arrayt = [];
                         if (res_coordinates.length == 1) {
                             arrayt = res_coordinates[0]
-                            const twoDArray = arrayt;
-                            const oneDArray = twoDArray.reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);
-                            tdsy.add(res, oneDArray);
                         } else {
-                            // arrayt = res_coordinates
+                            arrayt = res_coordinates
                         }
 
-
+                        const twoDArray = arrayt;
+                        const oneDArray = twoDArray.reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);
+                        tdsy.add(res, oneDArray);
                     })
                 }
             })
         },
-
         close() {
 
             store.setViewerFlagb(true);
@@ -314,6 +357,10 @@ export default {
                     obj.endTime = undefined
 
             }
+            if (this.title == '土地收储计划项目') {
+                obj.beginTime = undefined
+                obj.endTime = undefined
+            }
             let data = await QueryList(obj);
             data.data.map((res) => {
                 if (res.geom) {
@@ -321,7 +368,6 @@ export default {
                 }
             });
             this.active_dableData = data.data
-
             this.tableData = data.data
         },
 

+ 0 - 1
src/views/cockpit/gdbh.vue

@@ -681,7 +681,6 @@ export default {
       });
       this.zbpg_hz.jcpg.lrgd = res.data.lrgd == '暂无' ? 0 : res.data.lrgd
       this.zbpg_hz.jcpg.lcgd = res.data.lcgd == '暂无' ? 0 : res.data.lcgd
-      console.log(params, "params");
 
       this.zbpg_hz.jcpg.lc_st = res.data.lc_st == '暂无' ? 0 : res.data.lc_st
       this.zbpg_hz.jcpg.lc_hd = res.data.lc_hd == '暂无' ? 0 : res.data.lc_hd

+ 244 - 10
src/views/cockpit/tdsc.vue

@@ -10,10 +10,12 @@
       </el-select>
     </div>
     <div v-show="tab == options[1].value">
-      <BarGraph3D ref="tdsc_bar_graph"  />
+      <!-- <BarGraph3D ref="tdsc_bar_graph" /> -->
+      <div id="tdsc_jg_echart"></div>
+
     </div>
     <div v-show="tab == options[0].value">
-      <DialWatch :dial_watch_info="dial_watch_info" ref="tdsc_scjd" class="tdsc_scjd" @draw_vector="dra"/>
+      <DialWatch :dial_watch_info="dial_watch_info" ref="tdsc_scjd" class="tdsc_scjd" @draw_vector="dra" />
     </div>
   </div>
 </template>
@@ -57,6 +59,7 @@ export default {
           key: "计划收储项目",
           value: 0,
           unit: "个",
+          viewer: true,
 
         }, rb: {
           key: "完成收储项目",
@@ -76,9 +79,231 @@ export default {
   }, //生命周期 - 创建完成(可以访问当前this实例)
   beforeMount() { }, //生命周期 - 挂载之前
   methods: {
-    dra(){
-      console.log(123123);
-      
+    init_tu_gy_echart(xdata, result) {
+      var dom = document.getElementById("tdsc_jg_echart");
+      var myChart = window.echarts.init(dom);
+
+      var option = {
+        backgroundColor: 'rgba(0,0,0,0)',
+        tooltip: {
+          backgroundColor: 'RGBA(20, 106, 178, 0.4)',
+          trigger: "axis",
+          textStyle: { fontSize: '100%' },
+          formatter: params => {
+            let rander = params.map(item =>
+              `
+                        
+                    <div style='
+                        border:none;
+                        border-radius:3px;
+                        color:#FFF;
+                        font-size:12px
+                        '>
+                            ${item.seriesName}: ${item.value}
+                    </div>`).join('')
+            return rander
+          }
+        },
+        grid: {
+          left: '2%',
+          right: '4%',
+          bottom: '15%',
+          top: '20%',
+          containLabel: true
+        },
+        legend: {
+          data: ['收储面积', '收储个数'],
+          left: '7%',
+          top: '5%',
+          textStyle: {
+            color: "#666666"
+          },
+          itemWidth: 15,
+          itemHeight: 10,
+          itemGap: 25
+        },
+        xAxis: {
+          axisTick: { show: false },
+          axisLine: { lineStyle: { color: "#BCD3E5" } },
+          axisLabel: {
+            textStyle: { fontSize: 12, color: "#BCD3E5" },
+          },
+          axisLabel: {
+            interval: 0,
+            formatter: function (value) {
+              // 当文字长度大于2时,使用slice方法截取字符串并拼接省略号;否则直接返回原文字
+              if (value.length > 4) {
+                return `${value.slice(0, 4)}...`;
+              } else {
+                return value;
+              }
+            },
+          },
+          data: xdata,
+        },
+        yAxis: [{
+          type: 'value',
+          splitLine: {
+            show: true,
+            lineStyle: {
+              color: 'rgba(163, 163, 163, 0.5)',
+              type: 'dashed'
+            }
+          },
+          axisLabel: {
+            color: '#A0A4AA'
+          },
+          axisLine: {
+            show: true,
+            lineStyle: {
+              color: 'rgba(65, 97, 128, 0.5)',
+            },
+          },
+        },
+        {
+          type: "value",
+          name: "",
+          nameTextStyle: {
+            color: "#666666"
+          },
+          position: "right",
+          axisLine: {
+            lineStyle: {
+              color: '#cdd5e2'
+            }
+          },
+          splitLine: {
+            show: false,
+          },
+          axisLabel: {
+            show: false,
+            formatter: "{value} %", //右侧Y轴文字显示
+            textStyle: {
+              color: "#666666"
+            }
+          }
+        }
+        ],
+        dataZoom: [{
+          "show": true,
+          "height": 12,
+          "xAxisIndex": [
+            0
+          ],
+          top: '88%',
+          "start": 0,
+          "end": 40,
+          handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
+          handleSize: '110%',
+          handleStyle: {
+            color: "#d3dee5",
+
+          },
+          textStyle: {
+            color: "#333"
+          },
+          borderColor: "#90979c"
+        }, {
+          "type": "inside",
+          "show": true,
+          "height": 15,
+          "start": 1,
+          "end": 35
+        }],
+        series: [{
+          name: '收储面积',
+          type: 'bar',
+          barWidth: '12px',
+          itemStyle: {
+            normal: {
+              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+                offset: 0,
+                color: '#12BDDF'
+              }, {
+                offset: 1,
+                color: 'rgba(24, 253, 255, 0)'
+              }]),
+            },
+          },
+          data: result[0].data
+        }
+          , {
+          name: "收储个数",
+          type: "line",
+          yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
+          smooth: true, //平滑曲线显示
+
+          symbol: "circle", //标记的图形为实心圆
+          symbolSize: 0, //标记的大小
+          itemStyle: {
+            normal: {
+              color: '#0AF37A',
+              borderColor: '#0AF37A',  //圆点透明 边框
+              borderWidth: 0,
+              lineStyle: {
+                color: "#0AF37A"
+              },
+              areaStyle: {
+                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+                  offset: 0,
+                  color: '#46C118'
+                }, {
+                  offset: 1,
+                  color: 'rgba(12, 162, 13, 0)'
+                }])
+              },
+            },
+          },
+          data: result[1].data
+        }
+        ]
+      };
+      myChart.setOption(option);
+    },
+    async init_tdsc_jg(params) {
+      const that = this;
+      let obj = {
+        jscType: "jsc_tdsc_ywfl",
+        id: params ? params.id : "4602",
+      };
+      let data = await QueryList(obj);
+      let xdata = [];
+      let result = [
+        {
+          name: "计划收储",
+          data: [],
+        },
+        {
+          name: "完成收储",
+          data: [],
+        },
+      ];
+      data.data.forEach((res) => {
+        xdata.push(res.tdyt);
+        result[0].data.push(res.xzqdm_number);
+        result[1].data.push(res.kgmj);
+      });
+
+      that.init_tu_gy_echart(xdata, result);
+    },
+    dra() {
+      store.setViewerFlagb(false);
+      store.setToolBarShow(false);
+      store.setXzqh_flag(false);
+      store.setCockpit_vector({
+        title: "土地收储计划项目",
+        tableData: [],
+        tablejscType: 'jsc_tdsc_zbmx',
+        columns: [
+          "序号",
+          "所属区",
+          "收储方式",
+          "收储项目名称",
+          "收储面积(亩)",
+          "预计收储成本(万元)",
+          "说明",
+        ],
+      });
     },
     change_model(e) {
       this.$forceUpdate();
@@ -107,6 +332,7 @@ export default {
           key: "计划收储项目",
           value: data.data.jh_xzqdm_number,
           unit: "个",
+          viewer: true,
 
         }, rb: {
           key: "完成收储项目",
@@ -116,8 +342,8 @@ export default {
       }
       that.dial_watch_info = proData;
       let echart_data = 0;
-      if (data.data.sj_mj == 0) {
-        echart_data = 0
+      if (data.data.sj_mj == '暂无') {
+        echart_data = '暂无'
       } else if (data.data.jh_mj == 0 && data.data.sj_mj > 0) {
         echart_data = 100
       } else {
@@ -132,9 +358,9 @@ export default {
     const that = this;
     this.$nextTick((res) => {
       this.init_scjd();
+      // this.init_tdsc_jg();
 
-
-      this.$refs.tdsc_bar_graph.setOptions(this.legendData, this.xdata, this.result);
+      // this.$refs.tdsc_bar_graph.setOptions(this.legendData, this.xdata, this.result);
 
     })
   },
@@ -264,7 +490,15 @@ export default {
   width: 26rem;
   height: 10rem;
 }
-.tdsc_scjd{
+
+.tdsc_scjd {
   color: #163253;
 }
+
+#tdsc_jg_echart {
+  left: 0rem;
+  top: 0.1rem;
+  width: 26rem;
+  height: 10rem;
+}
 </style>

+ 1 - 0
src/views/cockpit/tdsy.vue

@@ -402,6 +402,7 @@ export default {
           100
         ).toFixed(2);
       }
+      echart_data += '%'
       that.$refs.tdgy_gyjd.init_dial_watch(echart_data);
 
       this.$refs.tdgy_echart_gyjd.setOptions(

+ 2 - 0
src/views/viewer.vue

@@ -145,6 +145,8 @@ export default {
             // 卫片监管
             this.$refs.wpjg_ref.init_wpjg_title(this.params);
 
+            // 土地收储
+            this.$refs.tdsc_ref.init_tdsc_jg(this.params);
             this.$refs.tdsc_ref.init_scjd(this.params);
             // 土地供应
             this.$refs.tdgy_ref.init_tdgy_gy_jd(this.params);