KouJin 2 anni fa
parent
commit
3ff339a2af

+ 4 - 4
package-lock.json

@@ -12,7 +12,7 @@
12 12
         "core-js": "^3.8.3",
13 13
         "crypto-js": "^4.2.0",
14 14
         "echarts": "^5.5.0",
15
-        "element-plus": "^2.5.6",
15
+        "element-plus": "^2.6.0",
16 16
         "js-cookie": "^3.0.5",
17 17
         "nprogress": "^0.2.0",
18 18
         "qs": "^6.11.2",
@@ -5604,9 +5604,9 @@
5604 5604
       "dev": true
5605 5605
     },
5606 5606
     "node_modules/element-plus": {
5607
-      "version": "2.5.6",
5608
-      "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.5.6.tgz",
5609
-      "integrity": "sha512-zctKTiyIDmcnMp3K5WG1hglgraW9EbiCLiIDVtaMCS5mPMl2fRKdS0vOFGnECIq9taFoxnyoDwxHD81nv0B4RA==",
5607
+      "version": "2.6.0",
5608
+      "resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.6.0.tgz",
5609
+      "integrity": "sha512-MP+N48P+diyndR+GjY+0VOrUmFnajD4U0CkrXIMzmeRmq4+dwi0bdzVo587v4wDo9Hs+ggviyacqm3NS8JYVqw==",
5610 5610
       "dependencies": {
5611 5611
         "@ctrl/tinycolor": "^3.4.1",
5612 5612
         "@element-plus/icons-vue": "^2.3.1",

+ 1 - 1
package.json

@@ -14,7 +14,7 @@
14 14
     "core-js": "^3.8.3",
15 15
     "crypto-js": "^4.2.0",
16 16
     "echarts": "^5.5.0",
17
-    "element-plus": "^2.5.6",
17
+    "element-plus": "^2.6.0",
18 18
     "js-cookie": "^3.0.5",
19 19
     "nprogress": "^0.2.0",
20 20
     "qs": "^6.11.2",

+ 3 - 3
src/main.ts

@@ -5,8 +5,8 @@ import router from "./router";
5 5
 
6 6
 import "./styles/common.scss";
7 7
 
8
-import ElementPlus from "element-plus";
9
-import "element-plus/dist/index.css";
8
+import ElementPlus from 'element-plus'
9
+import 'element-plus/dist/index.css'
10 10
 import zhCn from "element-plus/es/locale/lang/zh-cn";
11 11
 
12 12
 import "./permission";
@@ -44,5 +44,5 @@ app.use(router);
44 44
 app.use(ElementPlus, {
45 45
   locale: zhCn
46 46
 });
47
-
47
+app.use(ElementPlus)
48 48
 app.mount("#app");

+ 141 - 11
src/views/DataVisualization/home/components/wzdyqk.vue

@@ -2,40 +2,105 @@
2 2
 
3 3
 <template>
4 4
     <div class="box">
5
-        <div ref="wzqk" class="charts">
5
+        <div class="table">
6
+            <el-table highlight-current-row="false" class="eltable" stripe
7
+                :header-cell-style="{ background: 'transparent' }" :data="tableData"
8
+                style="width: 100%  ;height: 100%; border: none;  background: transparent;">
9
+                <el-table-column style="background: transparent; border: none;" fixed prop="date" label="省份名称" />
10
+                <el-table-column style="background: transparent; border: none;" prop="name" label="数量" />
11
+                <el-table-column style="background: transparent; border: none;" prop="state" label="价值(万元)" />
12
+
13
+            </el-table>
6 14
         </div>
7 15
         <div class="title">物资调用情况</div>
16
+        <el-select class="select"  size="small" placeholder="Select" style="width: 150px ; height: 21px;">
17
+            <el-option value="1" label="1" />
18
+            <el-option value="2" label="2" />
19
+            <el-option value="3" label="3" />
20
+        </el-select>
8 21
     </div>
9
-
10 22
 </template>
11 23
 
12 24
 <script setup lang="ts">
13 25
 import * as echarts from "echarts";
14 26
 import { onMounted, ref } from "vue";
15
-const wzqk = ref(null);
27
+import header from "./header.vue";
28
+const tableData = [
29
+    {
30
+        date: '河北',
31
+        name: '4442',
32
+        state: '2222',
33
+    },
34
+    {
35
+        date: '河北',
36
+        name: '4442',
37
+        state: '2222',
38
+    },
39
+    {
40
+        date: '河北',
41
+        name: '4442',
42
+        state: '2222',
43
+    },
44
+    {
45
+        date: '河北',
46
+        name: '4442',
47
+        state: '2222',
48
+    },
49
+    {
50
+        date: '河北',
51
+        name: '4442',
52
+        state: '2222',
53
+    },
54
+    {
55
+        date: '河北',
56
+        name: '4442',
57
+        state: '2222',
58
+    },
16 59
 
60
+]
17 61
 
18 62
 onMounted(() => {
19
-    let myChart = echarts.init(wzqk.value)
20
-    let option: any;
21
-
22
-
23 63
 })
24 64
 </script>
25 65
 
26 66
 <style scoped>
67
+
68
+.select .el-select-dropdown{
69
+    background: rgba(255,255,255,0.5) !important;;
70
+}
71
+.select{
72
+    position: absolute;
73
+    left:14%;
74
+    top:20%;
75
+    /* height: 10%; */
76
+}
77
+:deep(.el-select__wrapper){
78
+    /* position: absolute; */
79
+    /* width: 50%; */
80
+    /* height: 4%; */
81
+    /* left: 20%;
82
+    top:; */
83
+    background: transparent !important;
84
+    border: rgba(255, 255, 255,0.2) 1px solid  !important;
85
+    box-shadow: none;
86
+
87
+}
27 88
 .box {
28 89
     width: 100%;
29 90
     height: 100%;
30 91
     position: relative;
31 92
 }
32 93
 
33
-.box .charts {
34
-    width: 100%;
35
-    height: 100%;
94
+.box .table {
95
+    position: absolute;
96
+    bottom: 7%;
97
+    left: 14%;
98
+    width: 80%;
99
+    height: 67%;
36 100
     /* background: pink; */
37 101
 
38
-
102
+    z-index: 22;
103
+    background-color: transparent;
39 104
 }
40 105
 
41 106
 
@@ -49,6 +114,71 @@ onMounted(() => {
49 114
     background: linear-gradient(to bottom, #ffffff, rgb(29, 233, 234));
50 115
     -webkit-background-clip: text;
51 116
     -webkit-text-fill-color: transparent;
117
+}
118
+.el-table {
119
+    background: transparent;
120
+}
121
+
122
+:deep(.el-table) {
123
+    background: transparent;
124
+}
125
+/*最外层透明*/
126
+:deep(.el-table),
127
+:deep(.el-table__expanded-cell) {
128
+    background-color: transparent;
129
+    color: rgba(255, 255, 255, 0.5);
130
+    opacity: 0.8;
131
+    font-size: 12px;
132
+
133
+}
134
+
135
+/* 表格内背景颜色 */
136
+:deep(.el-table th),
137
+:deep(.el-table tr),
138
+:deep(.el-table td) {
139
+    background-color: transparent;
140
+    color: rgb(255, 255, 255);
141
+}
142
+
143
+::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td {
144
+    /* background: red; */
145
+    backdrop-filter: blur(10px);
146
+    background: rgba(34, 62, 165, 0.3);
147
+}
148
+
149
+:deep(.el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf, .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf) {
150
+    border: none !important;
151
+}
152
+
153
+:deep(.el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf) {
154
+    border: none !important;
155
+}
156
+
157
+.el-table tbody tr:hover>td {
158
+    background-color: transparent !important
159
+}
160
+
161
+.el-table__body tr.hover-row.current-row>td.el-table__cell,
162
+.el-table__body tr.hover-row.el-table__row--striped.current-row>td.el-table__cell,
163
+.el-table__body tr.hover-row.el-table__row--striped>td.el-table__cell,
164
+.el-table__body tr.hover-row>td.el-table__cell {
165
+    background-color: transparent !important;
166
+}
167
+
168
+:deep(.el-table tbody tr:hover > td) {
169
+    background-color: transparent !important
170
+}
171
+
172
+.el-table td.el-table__cell,
173
+.el-table th.el-table__cell.is-leaf {
174
+    border-bottom: none;
175
+}
176
+
177
+:deep(.el-table_row > td) {
178
+    border: non;
179
+}
52 180
 
181
+:deep(.el-table) {
182
+    --el-table-border-color: transparent;
53 183
 }
54 184
 </style>

+ 97 - 1
src/views/DataVisualization/home/components/wzqk.vue

@@ -13,14 +13,110 @@
13 13
 import * as echarts from "echarts";
14 14
 import { onMounted, ref } from "vue";
15 15
 const wzqk = ref(null);
16
-
16
+let data = [
17
+    [34, 123, 22, 80, 150, 200,123,233,222],
18
+    [122, 233, 143, 120, 170, 160,222,122,122]
19
+]
20
+let xdata = ['被服', '床具', '用具', '帐篷', '抢险物料', '救生器材','抢险机具','排水设备','供水器具']
21
+let legends = ['可用物资', '不可以物资']
22
+const series = data.map((item, index) => {
23
+    return {
24
+        name: legends[index],
25
+        type: 'bar',
26
+        stack: 'total',
27
+        label: {
28
+            show: false
29
+        },
30
+        emphasis: {
31
+            focus: 'series'
32
+        },
33
+        data: item
34
+    };
35
+});
36
+let zeroArr = xdata.map((v) => 0);
17 37
 
18 38
 onMounted(() => {
19 39
     let myChart = echarts.init(wzqk.value)
20 40
     let option: any;
41
+    series.push({
42
+        name: null,
43
+        type: 'bar',
44
+        stack: 'total',
45
+        barWidth: '30%',
46
+        label: {
47
+            show: true,
48
+            color: '#333',
49
+            position: 'top',
50
+            distance: 10,
51
+            fontSize: 12,
52
+            formatter: function (lp) {
53
+                let datas = 0;
54
+                option.series.map((v) => {
55
+                    let data_ = v.data[lp.dataIndex];
56
+                    datas += data_;
57
+                });
58
+                return datas || '';
59
+            }
60
+        },
61
+        emphasis: {
62
+            select: false
63
+        },
64
+        tooltip: {
65
+            show: false
66
+        },
67
+        data: zeroArr
68
+    });
69
+    option = {
70
+        backgroundColor: '',
71
+        tooltip: {
72
+            trigger: 'axis',
73
+            axisPointer: {
74
+                // Use axis to trigger tooltip
75
+                type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
76
+            }
77
+        },
78
+        legend: {
79
+            top:'20%',
80
+            right:'10%',
81
+            color:'#fff',
82
+            textStyle: {
83
+                color: '#fff',
84
+                fontSize: 12,
85
+                lineHeight: 24,
86
+            },
87
+            
88
+        },
89
+        grid: {
90
+            left: '18%',
91
+            // right: '4%',
92
+            // bottom: '3%',
93
+            top:'40%',
94
+            width:'70%',
95
+            height:'60%',
21 96
 
97
+            containLabel: true
98
+        },
99
+        yAxis: {
100
+            type: 'value'
101
+        },
102
+        xAxis: {
103
+            type: 'category',
104
+            axisLabel: {
105
+                color: '#fff',
106
+                interval:0,
107
+                rotate:45
108
+                // fontSize:12,
109
+                // padding:0
110
+            },
111
+            data: xdata
112
+        },
113
+        color: ['#98EECC', '#FC4F00'],
114
+        series: series
115
+    };
116
+    myChart.setOption(option)
22 117
 
23 118
 })
119
+
24 120
 </script>
25 121
 
26 122
 <style scoped>

+ 145 - 4
src/views/DataVisualization/home/components/wzrkqk.vue

@@ -13,12 +13,153 @@
13 13
 import * as echarts from "echarts";
14 14
 import { onMounted, ref } from "vue";
15 15
 const wzqk = ref(null);
16
-
17
-
16
+const myColor = ['#eb2100', '#eb3600', '#d0570e', '#d0a00e', '#34da62', '#00e9db', '#00c0e9', '#0096f3', '#33CCFF', '#33FFCC'];
17
+const Ydata = ['抢险物料','救生器材','抢险机具','排水设备','供水器具'];
18
+const Xdata = [10, 13, 25, 29, 38, 47, 56, 68, 76, 82];
18 19
 onMounted(() => {
19 20
     let myChart = echarts.init(wzqk.value)
20
-    let option: any;
21
-
21
+    let option = {
22
+        //你的代码
23
+        backgroundColor: '',
24
+        grid: {
25
+            left: '21%',
26
+            top: '38%',
27
+            right: '10%',
28
+            width:'70%',
29
+            height:'60%',
30
+            bottom: '8%',
31
+            containLabel: true
32
+        },
33
+        dataZoom: [
34
+            {
35
+                yAxisIndex: 0, //这里是从X轴的0刻度开始
36
+                show: false, //是否显示滑动条,不影响使用
37
+                type: "slider", // 这个 dataZoom 组件是 slider 型 dataZoom 组件
38
+                startValue: 0, // 从头开始。
39
+                endValue: 4, // 一次性展示5个。。
40
+            }
41
+        ],
42
+        xAxis: [{
43
+            show: false,
44
+        }],
45
+        yAxis: [{
46
+            axisTick: 'none',
47
+            axisLine: 'none',
48
+            offset: '12',
49
+            axisLabel: {
50
+                textStyle: {
51
+                    color: '#ffffff',
52
+                    fontSize: '12',
53
+                }
54
+            },
55
+            data: Ydata,
56
+        },
57
+        {
58
+            axisTick: 'none',
59
+            axisLine: 'none',
60
+            axisLabel: {
61
+                textStyle: {
62
+                    color: '#ffffff',
63
+                    fontSize: '12',
64
+                }
65
+            },
66
+            //y
67
+            data: ['5', '4', '3', '2', '1']
68
+        },
69
+        // {
70
+        //     name: '滚动TOP 10',
71
+        //     nameGap: '50',
72
+        //     nameTextStyle: {
73
+        //         color: '#ffffff',
74
+        //         fontSize: '16',
75
+        //     },
76
+        //     axisLine: {
77
+        //         lineStyle: {
78
+        //             color: 'rgba(0,0,0,0)'
79
+        //         }
80
+        //     },
81
+        //     data: [],
82
+        // }
83
+    ],
84
+        series: [{
85
+            name: '条',
86
+            type: 'bar',
87
+            yAxisIndex: 0,
88
+            data: Xdata,
89
+            label: {
90
+                normal: {
91
+                    show: true,
92
+                    position: 'right',
93
+                    textStyle: {
94
+                        color: '#ffffff',
95
+                        fontSize: '16',
96
+                    }
97
+                }
98
+            },
99
+            barWidth: 12,
100
+            itemStyle: {
101
+                normal: {
102
+                    color: function (params) {
103
+                        var num = myColor.length;
104
+                        return myColor[params.dataIndex % num]
105
+                    },
106
+                }
107
+            },
108
+            z: 2
109
+        }, {
110
+            name: '白框',
111
+            type: 'bar',
112
+            yAxisIndex: 1,
113
+            barGap: '-100%',
114
+            data: [99, 99.5, 99.5, 99.5, 99.5],
115
+            barWidth: 20,
116
+            itemStyle: {
117
+                normal: {
118
+                    color: 'transparent',
119
+                    barBorderRadius: 5,
120
+                }
121
+            },
122
+            z: 1
123
+        }, 
124
+        // {
125
+        //     name: '外框',
126
+        //     type: 'bar',
127
+        //     yAxisIndex: 2,
128
+        //     barGap: '-100%',
129
+        //     data: [100, 100, 100, 100, 100],
130
+        //     barWidth: 24,
131
+        //     itemStyle: {
132
+        //         normal: {
133
+        //             color: function (params) {
134
+        //                 var num = myColor.length;
135
+        //                 return myColor[params.dataIndex % num]
136
+        //             },
137
+        //             barBorderRadius: 5,
138
+        //         }
139
+        //     },
140
+        //     z: 0
141
+        // },
142
+            // {
143
+            //     name: '外圆',
144
+            //     type: 'scatter',
145
+            //     hoverAnimation: false,
146
+            //     data: [0, 0, 0, 0, 0],
147
+            //     yAxisIndex: 2,
148
+            //     symbolSize: 35,
149
+            //     itemStyle: {
150
+            //         normal: {
151
+            //             color: function(params) {
152
+            //                 var num = myColor.length;
153
+            //                 return myColor[params.dataIndex % num]
154
+            //             },
155
+            //             opacity: 1,
156
+            //         }
157
+            //     },
158
+            //     z: 2
159
+            // }
160
+        ]
161
+    };
162
+    myChart.setOption(option)
22 163
 
23 164
 })
24 165
 </script>

+ 12 - 9
src/views/DataVisualization/home/components/wzsyqkpm.vue

@@ -36,11 +36,11 @@ onMounted(() => {
36 36
         backgroundColor: '',
37 37
         color: ['#0C65F6', '#00FFA6', '#F4DF58'],
38 38
         grid: {
39
-            left: '25%',
40
-            right: '34%',
41
-            width:'60%',
42
-            height:'50%',
43
-            bottom: '10%',
39
+            left: '20%',
40
+            // right: '35%',
41
+            width:'70%',
42
+            height:'46%',
43
+            bottom: '18%',
44 44
             // top: '30%',
45 45
         },
46 46
         // legend: {
@@ -101,12 +101,15 @@ onMounted(() => {
101 101
                     color: 'rgba(255,255,255,0.45)',
102 102
                 },
103 103
             },
104
-            textStyle:{
105
-                fontSize:12
106
-            },
104
+            // textStyle:{
105
+            //     fontSize:12
106
+            // },
107 107
             axisLabel: {
108 108
                 color: '#fff',
109
-                fontSize:12,
109
+                interval:0,
110
+                rotate:45
111
+                // fontSize:12,
112
+                // padding:0
110 113
             },
111 114
             axisTick: {
112 115
                 show: false,

+ 4 - 4
src/views/DataVisualization/home/index.vue

@@ -70,7 +70,7 @@ import Wzsyqkpm from '@/views/DataVisualization/home/components/wzsyqkpm.vue'
70 70
 }
71 71
 .container .top {
72 72
   width: 100%;
73
-  height: 80px;
73
+  height: 64px;
74 74
   text-align: center;
75 75
   font-size: 24px;
76 76
   font-weight: 700;
@@ -125,7 +125,7 @@ import Wzsyqkpm from '@/views/DataVisualization/home/components/wzsyqkpm.vue'
125 125
 }
126 126
 .container .content .left {
127 127
   /* background: skyblue; */
128
-  width: 28%;
128
+  width: 30%;
129 129
   height: 100%;
130 130
   display: flex;
131 131
   flex-direction: column;
@@ -142,7 +142,7 @@ import Wzsyqkpm from '@/views/DataVisualization/home/components/wzsyqkpm.vue'
142 142
 
143 143
 .container .content .right {
144 144
   /* background: skyblue; */
145
-  width: 28%;
145
+  width: 30%;
146 146
   height: 100%;
147 147
   display: flex;
148 148
   flex-direction: column;
@@ -156,7 +156,7 @@ import Wzsyqkpm from '@/views/DataVisualization/home/components/wzsyqkpm.vue'
156 156
 }
157 157
 
158 158
 .container .content .center {
159
-  width: 40%;
159
+  width: 35%;
160 160
   height: 100%;
161 161
 }
162 162
 </style>