lchao 1 year ago
parent
commit
0e44a34300
1 changed files with 637 additions and 3 deletions
  1. 637 3
      zhsq_qk-ui/src/views/fusion/index.vue

+ 637 - 3
zhsq_qk-ui/src/views/fusion/index.vue

@@ -167,12 +167,646 @@ import "@/assets/images/qkq_index.css";
 
 
 export default {
-  name: 'App',
+  name: 'statistics',
   mounted() {
-    // 页面加载后的操作
+    this.doingBusiness();
+    this.grid();
+    this.economic();
   },
   methods: {
-    // 可以添加页面中需要的方法
+    doingBusiness(){
+      //	营商环境
+      var myChart = echarts.init(document.getElementById('yshj'));
+      let option = {
+        tooltip: {},
+
+        radar: {
+          radius: "65%", //大小
+          nameGap: 1, // 图中工艺等字距离图的距离
+          center: ["40%", "40%"], // 图的位置
+          name: {
+            textStyle: {
+              color: "rgba(175, 190, 211, 1)",
+              fontSize: 10
+            },
+            formatter: function (name) {
+              return name;
+            }
+          },
+          indicator: [{
+            "name": '规上入统',
+            "max": "100"
+          }, {
+            "name": '大型企业',
+            "max": "100"
+          }, {
+            "name": '中型企业',
+            "max": "100"
+          }, {
+            "name": '小型企业',
+            "max": "100"
+          }, {
+            "name": '微型企业',
+            "max": "100"
+          }, {
+            "name": '汽配产业',
+            "max": "100"
+          },
+
+          ],
+          axisLine: {
+            lineStyle: {
+
+              color: "rgba(2, 96, 176, 0.8)"
+            }
+          },
+          splitArea: {
+            show: false,
+            areaStyle: {
+              color: "rgba(255,0,0,0)" // 图表背景的颜色
+            }
+          },
+          splitLine: {
+            show: true,
+            lineStyle: {
+              width: 1,
+              color: "rgba(2, 96, 176, 0.8)" // 设置网格的颜色
+            }
+          }
+        },
+
+        series: [{
+          name: "营商环境分析",
+          type: "radar",
+          symbol: "angle",
+          itemStyle: {
+            normal: {
+              areaStyle: {
+                type: "default"
+              }
+            }
+          },
+          data: [{
+            symbol: "circle",
+            symbolSize: 5,
+            value: [70, 42, 63, 84, 75, 34],
+            areaStyle: {
+              color: "rgba(2, 96, 176, 0.8)"
+            },
+            itemStyle: {
+              normal: {
+                borderWidth: 1,
+                color: "RGBA(0, 34, 66, 1)",
+                borderColor: "rgba(2, 96, 176, 1)"
+              }
+            },
+            lineStyle: {
+              color: "rgba(2, 96, 176, 1)",
+              width: 1
+            }
+          }]
+        }]
+      }
+
+      if (option) {
+        myChart.setOption(option);
+      }
+    },
+    grid(){
+      //	网格管理
+      var myChart = echarts.init(document.getElementById('wggl'));
+      //柱状图  渐变色双y轴
+
+      //可以鼠标滚动
+
+      //点击背景和点击图形触发不同的事件
+
+      let dataList = [{
+        name: '前程街道',
+        value: '56'
+      }, {
+        name: '富民街道',
+        value: '75'
+      }, {
+        name: '广兴街道',
+        value: '85'
+      }, {
+        name: '东风街道',
+        value: '78'
+      }, {
+        name: '锦绣街道',
+        value: '76'
+      }]
+
+
+      var option = {
+        grid: {
+          left: "10%", //距离左边的距离
+          right: "2%", //距离右边的距离
+          bottom: "10%", //距离下边的距离
+          top: "8%" //距离上边的距离
+        },
+        title: {
+          text: '',
+          left: 26,
+          top: 26,
+          textStyle: {
+            color: '#FFFFFF',
+            fontSize: 12,
+            fontWeight: 50000,
+            fontFamily: 'PingFang SC'
+          }
+        },
+
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            type: "shadow",
+            crossStyle: {
+              color: "#999"
+            }
+          },
+        },
+        xAxis: [{
+          type: "category",
+          data: ['前程街道', '富民街道', '广兴街道', '东风街道', '锦绣街道'],
+          axisLabel: {
+            textStyle: {
+              color: "#ffffff",
+              fontSize: 10,
+              fontFamily: "Microsoft YaHei"
+            }
+          },
+          axisLine: {
+            show: true
+          },
+          axisTick: {
+            show: false
+          }
+        }],
+        yAxis: [{
+          type: "value",
+          axisLabel: {
+            formatter: "{value}",
+            textStyle: {
+              color: "#fff",
+              fontSize: 12,
+              fontFamily: "Microsoft YaHei"
+            },
+          },
+          splitLine: {
+            show: false,
+            lineStyle: {
+              color: "#666"
+            }
+          },
+          axisLine: {
+            show: true
+          },
+          axisTick: {
+            show: false
+          }
+        },
+
+        ],
+        dataZoom: [{
+          type: 'inside',
+          start: 0,
+          end: dataList.length > 15 ? 35 : 100
+        }],
+        series: [{
+          name: "",
+          type: "bar",
+          data: dataList,
+          barGap: '-100%',
+          barCategoryGap: '70%',
+          itemStyle: {
+            normal: {
+              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+                offset: 0,
+                color: 'rgba(39,116,212,1)'
+              }, {
+                offset: 1,
+                color: 'rgba(1,23,60,1)'
+              }])
+            },
+            emphasis: {
+              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+                offset: 0,
+                color: 'rgba(39,116,212,1)'
+              }, {
+                offset: 1,
+                color: 'rgba(1,23,60,1)'
+              }])
+            }
+          },
+        },
+
+        ]
+      }
+
+
+
+      if (option) {
+        myChart.setOption(option);
+      }
+    },
+    economic(){
+      //	经济运行
+      var myChart = echarts.init(document.getElementById('jjyx'));
+
+      // $("#mySelect").on('change', function () {
+      //   var selectedValue = $(this).val();
+      //
+      //   if (selectedValue === 'option1') {
+
+        var barWidth = 15;
+          // 2023
+          var zzx1 = [27, 38, 41, 21, 27];
+          var zx = zzx1.map((item) => {
+            return 100 - item;
+          });
+          // 2024
+          var wgx1 = [37, 40, 63, 61, 64];
+          var wg = wgx1.map((item) => {
+            return 100 - item;
+          });
+
+
+        // } else if (selectedValue === 'option2') {
+
+
+          // 2023
+          var zzx1 = [57, 18, 31, 61, 37];
+          var zx = zzx1.map((item) => {
+            return 100 - item;
+          });
+          // 2024
+          var wgx1 = [27, 60, 23, 11, 34];
+          var wg = wgx1.map((item) => {
+            return 100 - item;
+          });
+
+
+        // } else if (selectedValue === 'option3') {
+
+
+          // 2023
+          var zzx1 = [57, 18, 31, 61, 37];
+          var zx = zzx1.map((item) => {
+            return 100 - item;
+          });
+          // 2024
+          var wgx1 = [27, 60, 23, 11, 34];
+          var wg = wgx1.map((item) => {
+            return 100 - item;
+          });
+
+
+        // } else if (selectedValue === 'option4') {
+
+
+          // 2023
+          var zzx1 = [37, 18, 71, 61, 37];
+          var zx = zzx1.map((item) => {
+            return 100 - item;
+          });
+          // 2024
+          var wgx1 = [27, 80, 43, 11, 54];
+          var wg = wgx1.map((item) => {
+            return 100 - item;
+          });
+
+
+        // } else if (selectedValue === 'option5') {
+
+
+          // 2023
+          var zzx1 = [57, 18, 81, 61, 67];
+          var zx = zzx1.map((item) => {
+            return 100 - item;
+          });
+          // 2024
+          var wgx1 = [14, 62, 23, 11, 34];
+          var wg = wgx1.map((item) => {
+            return 100 - item;
+          });
+
+
+        // } else if (selectedValue === 'option6') {
+
+
+          // 2023
+          var zzx1 = [43, 18, 63, 27, 44];
+          var zx = zzx1.map((item) => {
+            return 100 - item;
+          });
+          // 2024
+          var wgx1 = [34, 26, 75, 44, 26];
+          var wg = wgx1.map((item) => {
+            return 100 - item;
+          });
+
+
+        // }
+
+        var option = {
+          tooltip: {
+            trigger: "axis",
+            axisPointer: {
+              // 坐标轴指示器,坐标轴触发有效
+              type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
+            },
+            formatter: function (e) {
+              // console.log(e);
+              var str =
+                e[6].axisValue +
+                "<br>" +
+                "<span style='display:inline-block;margin-right:5px;border-radius:10px;width:4px;height:4px;background-color:" +
+                e[6].color.colorStops[0].color +
+                ";'></span>" +
+                "" +
+                e[6].seriesName +
+                " : " +
+                e[6].value +
+                "<br>" +
+                "<span style='display:inline-block;margin-right:5px;border-radius:10px;width:4px;height:4px;background-color:" +
+                e[8].color.colorStops[0].color +
+                ";'></span>" +
+                "" +
+                e[8].seriesName +
+                " : " +
+                e[8].value;
+              return str;
+            },
+          },
+          grid: {
+            left: "2%",
+            right: "4%",
+            bottom: "5%",
+            top: "10%",
+            containLabel: true,
+          },
+          legend: {
+            data: ["2023年度", "2024年度"],
+
+            top: 1,
+            textStyle: {
+              color: "#deebff",
+              fontSize: 12,
+            },
+            itemWidth: 12,
+            itemHeight: 10,
+            itemGap: 35,
+            color: "#242424",
+            selectedMode: false,
+          },
+          xAxis: {
+            type: "category",
+            data: [
+              "第一季度",
+              "第二季度",
+              "第三季度",
+              "第四季度",
+            ],
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: "#010710",
+              },
+            },
+            axisTick: {
+              show: true,
+            },
+            axisLabel: {
+              // interval: 0,
+              // rotate: 40,
+              textStyle: {
+                fontFamily: "Microsoft YaHei",
+                color: "#fff", // x轴颜色
+                fontWeight: "normal",
+                fontSize: "12",
+                lineHeight: 10,
+              },
+              interval: 0, //标签设置为全部显示
+              margin: 15,
+              lineHeight: 15,
+              // fontSize: 11,
+              //             formatter: function(params) {
+              //                 var a = params.substring(0, params.length - 5);
+              //                 //   console.log(params.substring(0, params.length - 3));
+              //                 var newParamsName = a + "/n";
+              //
+              //                 //将最终的字符串返回
+              //                 return newParamsName;
+              //             },
+            },
+          },
+
+          yAxis: {
+            min: 0,
+            max: 100,
+            type: "value",
+
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: "#010710",
+              },
+            },
+            splitLine: {
+              show: false,
+              lineStyle: {
+                color: "rgba(135,140,147,1)", //左侧显示线
+              },
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              formatter: "{value}",
+              textStyle: {
+                color: "#deebff",
+                fontSize: 12,
+              },
+            },
+          },
+          series: [
+            // 计划产值中间正方形
+            {
+              type: "pictorialBar",
+              symbol: "diamond",
+
+              symbolSize: [barWidth, 4],
+              symbolOffset: [-10, -2],
+              symbolPosition: "end",
+              z: 12,
+              color: "rgba(0,222,255,1)",
+              data: zzx1,
+            },
+            // 实际产值中间正方形
+            {
+              type: "pictorialBar",
+              symbol: "diamond",
+              symbolSize: [barWidth, 4],
+              symbolOffset: [10, -2],
+              symbolPosition: "end",
+              z: 12,
+              color: "rgba(59,237,222,1)",
+              data: wgx1,
+            },
+            //  计划产值底部正方形
+            {
+              type: "pictorialBar",
+              symbol: "diamond",
+              symbolSize: [barWidth, 3],
+              symbolOffset: [-10, 4],
+              z: 12,
+              color: "rgba(8,13,18,0)",
+              data: zzx1,
+            },
+            // 实际产值底部正方形
+            {
+              name: "",
+              type: "pictorialBar",
+              symbol: "diamond",
+              symbolSize: [barWidth, 3],
+              symbolOffset: [10, 4],
+              color: "rgba(8,13,18,0)",
+              z: 12,
+              data: wgx1,
+            },
+            // 计划产值上部正方形
+            {
+              data: [100, 100, 100, 100, 100],
+              type: "pictorialBar",
+
+              symbol: "diamond",
+              symbolSize: [barWidth, 4],
+              symbolOffset: [-10, -2],
+              color: "rgba(8,13,18,0)",
+
+              symbolPosition: "end",
+            },
+            // 实际产值上部正方形
+            {
+              data: [100, 100, 100, 100, 100],
+              type: "pictorialBar",
+
+              symbol: "diamond",
+              symbolSize: [barWidth, 4],
+              symbolOffset: [10, -2],
+              color: "rgba(8,13,18,0)",
+
+              symbolPosition: "end",
+            },
+            // 计划产值进度柱子
+            {
+              name: "2023年度",
+              type: "bar",
+              barWidth: barWidth,
+              // zlevel: 2,
+              stack: "1",
+              itemStyle: {
+                normal: {
+                  opacity: 0.7,
+                  color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+                    offset: 0,
+                    color: "rgba(0,222,255,1)",
+                  }, {
+                    offset: 1,
+                    color: "rgba(0,222,255,0)",
+                  }, ]),
+                  barBorderRadius: 0,
+                },
+              },
+              label: {
+                show: true,
+                position: ["-18", "-18"],
+                color: "#00f8ff",
+                fontSize: 12,
+              },
+              data: zzx1,
+            },
+            // 计划产值底部柱子
+            {
+              data: zx,
+              type: "bar",
+
+              barWidth: barWidth,
+              stack: "1",
+
+              zlevel: -1,
+              itemStyle: {
+                normal: {
+                  opacity: 0.7,
+                  color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+                    offset: 0,
+                    color: "rgba(8,13,18,0)",
+                  }, {
+                    offset: 1,
+                    color: "rgba(8,13,18,0)",
+                  }, ]),
+                  barBorderRadius: 0,
+                },
+              },
+            },
+            // 实际产值进度柱子
+            {
+              name: "2024年度",
+              type: "bar",
+              stack: "2",
+              barWidth: barWidth,
+              itemStyle: {
+                normal: {
+                  opacity: 0.7,
+                  color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+                    offset: 0,
+                    color: "rgba(59,237,222,1)",
+                  }, {
+                    offset: 1,
+                    color: "rgba(59,237,222,0)",
+                  }, ]),
+                  barBorderRadius: 0,
+                },
+              },
+              label: {
+                show: true,
+                position: ["18", "-18"],
+                color: "#00f8ff",
+                fontSize: 12,
+              },
+              data: wgx1,
+            },
+            // 实际产值底部柱子
+            {
+              data: wg,
+              type: "bar",
+              barWidth: barWidth,
+              stack: "2",
+
+              zlevel: -1,
+              itemStyle: {
+                normal: {
+                  opacity: 0.7,
+                  color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+                    offset: 0,
+                    color: "rgba(8,13,18,0.4)",
+                  }, {
+                    offset: 1,
+                    color: "rgba(8,13,18,0)",
+                  }, ]),
+                  barBorderRadius: 0,
+                },
+              },
+            },
+          ],
+        };
+
+        myChart.setOption(option);
+
+      // })
+    },
   }
 }
 </script>