瀏覽代碼

大屏可视化,报警记录更改

钞小赢 3 年之前
父節點
當前提交
fa5db11c88

+ 11 - 1
src/api/modules/visualized/index.api.js

@@ -20,7 +20,7 @@ export default ({
20 20
     })
21 21
   },
22 22
  
23
-//历史预警趋势
23
+//历史预警趋势/温湿度变换
24 24
 hisWarning(params) {
25 25
   return request({
26 26
     url: '/vis/monthAndWeek',
@@ -29,4 +29,14 @@ hisWarning(params) {
29 29
   })
30 30
 },
31 31
 
32
+
33
+//预警信息
34
+warnInfo(params) {
35
+  return request({
36
+    url: '/vis/alarmRecord',
37
+    method: 'post',
38
+    params
39
+  })
40
+},
41
+
32 42
 })

+ 16 - 16
src/router/routes.js

@@ -8,14 +8,14 @@ const _import = require('@/libs/util.import.' + process.env.NODE_ENV)
8 8
  * 在主框架内显示
9 9
  */
10 10
 const frameIn = [
11
-  {  // 大屏首页
12
-    path: '/visualized',
13
-    name: 'visualized',
14
-    meta: {
15
-      auth: true
16
-    },
17
-    component: _import('system/visualized')
18
-  },
11
+  // {  // 大屏首页
12
+  //   path: '/visualized',
13
+  //   name: 'visualized',
14
+  //   meta: {
15
+  //     auth: true
16
+  //   },
17
+  //   component: _import('system/visualized')
18
+  // },
19 19
 
20 20
   {
21 21
     path: '/',
@@ -316,14 +316,14 @@ const frameIn = [
316 316
  * 在主框架之外显示
317 317
  */
318 318
 const frameOut = [
319
-  // {  // 大屏首页
320
-  //   path: '/visualized',
321
-  //   name: 'visualized',
322
-  //   // meta: {
323
-  //   //   auth: true
324
-  //   // },
325
-  //   component: _import('system/visualized')
326
-  // },
319
+  {  // 大屏首页
320
+    path: '/visualized',
321
+    name: 'visualized',
322
+    // meta: {
323
+    //   auth: true
324
+    // },
325
+    component: _import('system/visualized')
326
+  },
327 327
   // 登录
328 328
   {
329 329
     path: '/login',

+ 12 - 0
src/views/demo/equipmentManage/compontents/addDialogC.vue

@@ -21,6 +21,18 @@
21 21
               placeholder="请输入"
22 22
             ></el-input>
23 23
           </el-form-item>
24
+          <el-form-item label="设备标签编码" prop="labelCode" >
25
+            <!-- <el-select v-model="addForm.name" placeholder="请选择" >
26
+              <el-option label="区域一" value="shanghai"></el-option>
27
+              <el-option label="区域二" value="beijing"></el-option>
28
+            </el-select> -->
29
+            <el-input
30
+            style="width:220px"
31
+           
32
+              v-model.trim="addForm.labelCode"
33
+              placeholder="请输入"
34
+            ></el-input>
35
+          </el-form-item>
24 36
           <el-form-item label="备注:">
25 37
             <el-input
26 38
               style="width: 80%"

+ 2 - 0
src/views/demo/equipmentManage/equipmentTag/index.vue

@@ -55,6 +55,8 @@
55 55
                   :index="indexMethod"
56 56
                   show-overflow-tooltip
57 57
                 ></el-table-column>
58
+                <el-table-column prop="labelCode" label="标签编码" align="center">
59
+                </el-table-column>
58 60
                 <el-table-column prop="labelName" label="标签名称" align="center">
59 61
                 </el-table-column>
60 62
 

+ 16 - 5
src/views/demo/parameManagement/alarmParame/index.vue

@@ -143,7 +143,12 @@
143 143
       >
144 144
 
145 145
         <el-form-item label="报警类型:" prop="alarmTypeName">
146
-          <el-select
146
+          <!-- <el-cascader
147
+    v-model="addForm.alarmTypeName"
148
+    :options="bjlxArr"
149
+    :props="{ expandTrigger: 'hover' }"
150
+   ></el-cascader> -->
151
+       <el-select
147 152
             size="mini"
148 153
             v-model="addForm.alarmTypeName"
149 154
             placeholder="请选择"
@@ -451,7 +456,9 @@ export default {
451 456
       formInline: {},
452 457
       addSbDialog: false,
453 458
       tableData: [{}],
454
-      addForm: {},
459
+      addForm: {
460
+    
461
+      },
455 462
       rules: {
456 463
         alarmValueMax: [
457 464
           { required: true, message: "请输入高限阈值", trigger: "blur" },
@@ -648,7 +655,8 @@ export default {
648 655
       }
649 656
       this.$refs[formName].validate((valid) => {
650 657
         if (valid) {
651
-          this.addForm.orgCode=this.orgCode;
658
+          this.addForm.orgCode=localStorage.getItem('orgCode')
659
+          console.log(this.addForm.orgCode,"this.addForm.orgCode")
652 660
           this.addForm.devInfoList = this.yxTableData;
653 661
           if (this.title1 == "新建报警配置信息") {
654 662
             api.alarmParamsSave(this.addForm).then((res) => {
@@ -677,6 +685,7 @@ export default {
677 685
             str += item.validateMessage;
678 686
           });
679 687
           if (this.yxTableData.length > 0 && str == "请选择设备") {
688
+            this.addForm.orgCode=localStorage.getItem('orgCode')
680 689
             this.addForm.devInfoList = this.yxTableData;
681 690
             if (this.title1 == "新建报警配置信息") {
682 691
               api.alarmParamsSave(this.addForm).then((res) => {
@@ -719,7 +728,7 @@ export default {
719 728
       console.log(data);
720 729
       this.$set(this.addForm, "alarmTypeCode", data.enumCode);
721 730
       this.$set(this.addForm, "alarmTypeName", data.enumName);
722
-      this.$set(this.addForm, "label", data.enumName);
731
+      // this.$set(this.addForm, "label", data.enumName);
723 732
       // 使 input 失去焦点,并隐藏下拉框
724 733
       this.$refs.selectTree1.blur();
725 734
     },
@@ -971,10 +980,12 @@ export default {
971 980
     },
972 981
     getBjlxArr() {
973 982
       var condition = {
974
-        enumName: "报警类型",
983
+        enumCode: "110000",
975 984
       };
976 985
       condition = JSON.stringify(condition);
977 986
       var data = {
987
+        pageIndex:1,
988
+        pageSize:1,
978 989
         condition: condition,
979 990
       };
980 991
       api

+ 407 - 0
src/views/system/visualized/cnTemp/index.vue

@@ -0,0 +1,407 @@
1
+<template >
2
+  <div class="cnTemp">
3
+            <div class="title">仓内温度云图</div>
4
+            <div class="cnwdShow">
5
+              <div class="lsyj-right">
6
+                <div class="right-bottom" style="height: 100%">
7
+                  <div id="cnwdCharts" style="height: 100%"></div>
8
+                </div>
9
+              </div>
10
+            </div>
11
+          </div>
12
+</template>
13
+<script>
14
+import * as echarts from "echarts";
15
+export default {
16
+    data(){
17
+        return{
18
+
19
+        }
20
+    },
21
+    methods:{
22
+       //仓内温度
23
+
24
+    drawCnwd() {
25
+      var myChart4 = this.$echarts.init(document.getElementById("cnwdCharts"));
26
+      myChart4.setOption({
27
+        grid: {
28
+          // 让图表占满容器
29
+          top: "20px",
30
+          left: "30px",
31
+          right: "20px",
32
+          bottom: "20px",
33
+        },
34
+        xAxis: {
35
+          scale: true,
36
+          axisLine: {
37
+            lineStyle: {
38
+              color: "#40524f",
39
+            },
40
+          },
41
+          axisLabel: {
42
+            color: "white",
43
+          },
44
+          splitLine: {
45
+            lineStyle: {
46
+              color: "#011F13",
47
+            },
48
+          },
49
+        },
50
+        yAxis: {
51
+          scale: true,
52
+          axisLine: {
53
+            lineStyle: {
54
+              color: "#40524f",
55
+            },
56
+          },
57
+          axisLabel: {
58
+            color: "white",
59
+          },
60
+          splitLine: {
61
+            lineStyle: {
62
+              color: "#011F13",
63
+            },
64
+          },
65
+        },
66
+        series: [
67
+          {
68
+            //涟漪类型
69
+            type: "effectScatter",
70
+            symbolSize: 15,
71
+            rippleEffect: {
72
+              color: "#4ac4af",
73
+              scale: 2.5,
74
+            },
75
+            itemStyle: {
76
+              // 137c6b---4ac4af
77
+              normal: {
78
+                color: "#4ac4af",
79
+                lineStyle: {
80
+                  color: "#137c6b;",
81
+                },
82
+              },
83
+            },
84
+            data: [
85
+              [172.7, 105.2],
86
+              [153.4, 42],
87
+              [170.0, 59.0],
88
+              [159.8, 50.0],
89
+              [176.5, 71.8],
90
+            ],
91
+          },
92
+          {
93
+            type: "scatter",
94
+            // prettier-ignore
95
+            // symbol:"pin",
96
+            itemStyle: {
97
+        normal: {
98
+            color: "#2c695f",
99
+            lineStyle: {
100
+                color: "#77f0dc;"
101
+            }
102
+        },
103
+        
104
+    },
105
+
106
+            data: [
107
+              [161.2, 51.6],
108
+              [167.5, 59.0],
109
+              [159.5, 49.2],
110
+              [157.0, 63.0],
111
+              [155.8, 53.6],
112
+              [170.0, 59.0],
113
+              [166.0, 69.8],
114
+              [176.2, 66.8],
115
+              [172.5, 55.2],
116
+              [170.9, 54.2],
117
+              [172.9, 62.5],
118
+              [153.4, 42.0],
119
+              [147.2, 49.8],
120
+              [168.2, 49.2],
121
+              [175.0, 73.2],
122
+              [157.0, 47.8],
123
+              [167.6, 68.8],
124
+              [175.0, 82.5],
125
+              [166.8, 57.2],
126
+              [176.5, 87.8],
127
+              [170.2, 72.8],
128
+              [174.0, 54.5],
129
+              [173.0, 59.8],
130
+              [179.9, 67.3],
131
+              [170.5, 67.8],
132
+              [154.4, 46.2],
133
+              [162.0, 55.0],
134
+              [176.5, 83.0],
135
+              [152.0, 45.8],
136
+              [162.1, 53.6],
137
+              [170.0, 73.2],
138
+              [166.4, 56.6],
139
+              [168.9, 62.3],
140
+              [163.8, 58.5],
141
+              [167.6, 54.5],
142
+              [167.6, 58.3],
143
+              [165.1, 56.2],
144
+              [160.0, 50.2],
145
+              [170.0, 72.9],
146
+              [167.6, 61.0],
147
+              [163.2, 55.9],
148
+              [152.4, 46.5],
149
+              [168.3, 54.8],
150
+              [180.3, 60.7],
151
+              [165.5, 60.0],
152
+              [165.0, 62.0],
153
+              [164.5, 60.3],
154
+              [156.0, 52.7],
155
+              [160.0, 74.3],
156
+              [163.0, 62.0],
157
+              [165.7, 73.1],
158
+              [166.0, 53.2],
159
+              [174.0, 75.7],
160
+              [172.7, 61.1],
161
+              [167.6, 55.7],
162
+              [151.1, 48.7],
163
+              [164.5, 52.3],
164
+              [163.5, 50.0],
165
+              [152.0, 59.3],
166
+              [169.0, 62.5],
167
+              [164.0, 55.7],
168
+              [161.2, 54.8],
169
+              [155.0, 45.9],
170
+              [170.0, 70.6],
171
+              [176.2, 67.2],
172
+              [170.0, 69.4],
173
+              [162.5, 58.2],
174
+              [170.3, 64.8],
175
+              [164.1, 71.6],
176
+              [169.5, 52.8],
177
+              [163.2, 59.8],
178
+              [154.5, 49.0],
179
+              [159.8, 50.0],
180
+              [173.2, 69.2],
181
+              [170.0, 55.9],
182
+              [161.4, 63.4],
183
+              [169.0, 58.2],
184
+              [166.2, 58.6],
185
+              [159.4, 45.7],
186
+              [162.5, 52.2],
187
+              [159.0, 48.6],
188
+              [162.8, 57.8],
189
+              [159.0, 55.6],
190
+              [179.8, 66.8],
191
+              [162.9, 59.4],
192
+              [161.0, 53.6],
193
+              [151.1, 73.2],
194
+              [168.2, 53.4],
195
+              [168.9, 69.0],
196
+              [173.2, 58.4],
197
+              [171.8, 56.2],
198
+              [178.0, 70.6],
199
+              [164.3, 59.8],
200
+              [163.0, 72.0],
201
+              [168.5, 65.2],
202
+              [166.8, 56.6],
203
+              [172.7, 105.2],
204
+              [163.5, 51.8],
205
+              [169.4, 63.4],
206
+              [167.8, 59.0],
207
+              [159.5, 47.6],
208
+              [167.6, 63.0],
209
+              [161.2, 55.2],
210
+              [160.0, 45.0],
211
+              [163.2, 54.0],
212
+              [162.2, 50.2],
213
+              [161.3, 60.2],
214
+              [149.5, 44.8],
215
+              [157.5, 58.8],
216
+              [163.2, 56.4],
217
+              [172.7, 62.0],
218
+              [155.0, 49.2],
219
+              [156.5, 67.2],
220
+              [164.0, 53.8],
221
+              [160.9, 54.4],
222
+              [162.8, 58.0],
223
+              [167.0, 59.8],
224
+              [160.0, 54.8],
225
+              [160.0, 43.2],
226
+              [168.9, 60.5],
227
+              [158.2, 46.4],
228
+              [156.0, 64.4],
229
+              [160.0, 48.8],
230
+              [167.1, 62.2],
231
+              [158.0, 55.5],
232
+              [167.6, 57.8],
233
+              [156.0, 54.6],
234
+              [162.1, 59.2],
235
+              [173.4, 52.7],
236
+              [159.8, 53.2],
237
+              [170.5, 64.5],
238
+              [159.2, 51.8],
239
+              [157.5, 56.0],
240
+              [161.3, 63.6],
241
+              [162.6, 63.2],
242
+              [160.0, 59.5],
243
+              [168.9, 56.8],
244
+              [165.1, 64.1],
245
+              [162.6, 50.0],
246
+              [165.1, 72.3],
247
+              [166.4, 55.0],
248
+              [160.0, 55.9],
249
+              [152.4, 60.4],
250
+              [170.2, 69.1],
251
+              [162.6, 84.5],
252
+              [170.2, 55.9],
253
+              [158.8, 55.5],
254
+              [172.7, 69.5],
255
+              [167.6, 76.4],
256
+              [162.6, 61.4],
257
+              [167.6, 65.9],
258
+              [156.2, 58.6],
259
+              [175.2, 66.8],
260
+              [172.1, 56.6],
261
+              [162.6, 58.6],
262
+              [160.0, 55.9],
263
+              [165.1, 59.1],
264
+              [182.9, 81.8],
265
+              [166.4, 70.7],
266
+              [165.1, 56.8],
267
+              [177.8, 60.0],
268
+              [165.1, 58.2],
269
+              [175.3, 72.7],
270
+              [154.9, 54.1],
271
+              [158.8, 49.1],
272
+              [172.7, 75.9],
273
+              [168.9, 55.0],
274
+              [161.3, 57.3],
275
+              [167.6, 55.0],
276
+              [165.1, 65.5],
277
+              [175.3, 65.5],
278
+              [157.5, 48.6],
279
+              [163.8, 58.6],
280
+              [167.6, 63.6],
281
+              [165.1, 55.2],
282
+              [165.1, 62.7],
283
+              [168.9, 56.6],
284
+              [162.6, 53.9],
285
+              [164.5, 63.2],
286
+              [176.5, 73.6],
287
+              [168.9, 62.0],
288
+              [175.3, 63.6],
289
+              [159.4, 53.2],
290
+              [160.0, 53.4],
291
+              [170.2, 55.0],
292
+              [162.6, 70.5],
293
+              [167.6, 54.5],
294
+              [162.6, 54.5],
295
+              [160.7, 55.9],
296
+              [160.0, 59.0],
297
+              [157.5, 63.6],
298
+              [162.6, 54.5],
299
+              [152.4, 47.3],
300
+              [170.2, 67.7],
301
+              [165.1, 80.9],
302
+              [172.7, 70.5],
303
+              [165.1, 60.9],
304
+              [170.2, 63.6],
305
+              [170.2, 54.5],
306
+              [170.2, 59.1],
307
+              [161.3, 70.5],
308
+              [167.6, 52.7],
309
+              [167.6, 62.7],
310
+              [165.1, 86.3],
311
+              [162.6, 66.4],
312
+              [152.4, 67.3],
313
+              [168.9, 63.0],
314
+              [170.2, 73.6],
315
+              [175.2, 62.3],
316
+              [175.2, 57.7],
317
+              [160.0, 55.4],
318
+              [165.1, 104.1],
319
+              [174.0, 55.5],
320
+              [170.2, 77.3],
321
+              [160.0, 80.5],
322
+              [167.6, 64.5],
323
+              [167.6, 72.3],
324
+              [167.6, 61.4],
325
+              [154.9, 58.2],
326
+              [162.6, 81.8],
327
+              [175.3, 63.6],
328
+              [171.4, 53.4],
329
+              [157.5, 54.5],
330
+              [165.1, 53.6],
331
+              [160.0, 60.0],
332
+              [174.0, 73.6],
333
+              [162.6, 61.4],
334
+              [174.0, 55.5],
335
+              [162.6, 63.6],
336
+              [161.3, 60.9],
337
+              [156.2, 60.0],
338
+              [149.9, 46.8],
339
+              [169.5, 57.3],
340
+              [160.0, 64.1],
341
+              [175.3, 63.6],
342
+              [169.5, 67.3],
343
+              [160.0, 75.5],
344
+              [172.7, 68.2],
345
+              [162.6, 61.4],
346
+              [157.5, 76.8],
347
+              [176.5, 71.8],
348
+              [164.4, 55.5],
349
+              [160.7, 48.6],
350
+              [174.0, 66.4],
351
+              [163.8, 67.3],
352
+
353
+              //   [166.8, 56.6], [172.7, 105.2], [163.5, 51.8], [169.4, 63.4], [167.8, 59.0],
354
+              //   [159.5, 47.6], [167.6, 63.0],
355
+              //   [167.6, 57.8],  [159.8, 53.2],
356
+              //   [170.5, 64.5],  [162.6, 58.6],
357
+
358
+              //  [163.8, 67.3]
359
+            ],
360
+          },
361
+        ],
362
+      });
363
+      window.addEventListener("resize", () => {
364
+        setTimeout(() => {
365
+          myChart4.resize();
366
+        }, 1000);
367
+      });
368
+    },
369
+    },
370
+    created(){
371
+        this.$nextTick(() => {
372
+     this.drawCnwd()
373
+
374
+
375
+    });
376
+    }
377
+}
378
+
379
+</script>
380
+<style lang="scss" scoped>
381
+
382
+      .cnTemp {
383
+        height: 100%;
384
+        width: 21%;
385
+        background: url("../../../../assets/images/bigScreen/tempBorder.png")
386
+          no-repeat;
387
+        background-size: 100% 100%;
388
+        .title {
389
+          height: 37px;
390
+          line-height: 37px;
391
+          margin-left: 10px;
392
+          color: #fff;
393
+          font-weight: 600;
394
+        }
395
+      }
396
+      .cnTemp {
397
+        width: 25%;
398
+        .cnwdShow {
399
+          height: calc(100% - 37px);
400
+          .lsyj-right {
401
+            height: 100%;
402
+          }
403
+        }
404
+      }
405
+   
406
+    
407
+</style>

文件差異過大導致無法顯示
+ 551 - 1134
src/views/system/visualized/index copy.vue


文件差異過大導致無法顯示
+ 603 - 1142
src/views/system/visualized/index.vue


+ 202 - 0
src/views/system/visualized/lsyj/index.vue

@@ -0,0 +1,202 @@
1
+<template >
2
+    <div class="lsyj">
3
+            <div class="title">历史预警趋势</div>
4
+            <div class="lsyj-right">
5
+              <div class="right-top">
6
+                <div style="font-size: 14px">最高温度:{{maxTemp}}</div>
7
+                <div style="font-size: 14px">最低温度:{{minTemp}}</div>
8
+              </div>
9
+              <div class="right-bottom" style="height: calc(100% - 30px)">
10
+                <div id="lsyjCharts" style="height: 100%"></div>
11
+              </div>
12
+            </div>
13
+          </div>
14
+</template>
15
+<script>
16
+import * as echarts from "echarts";
17
+import api from "@/api";
18
+export default {
19
+    data(){
20
+        return{
21
+         lsyjData:[],
22
+         maxTemp:null,
23
+         minTemp:null,
24
+        }
25
+    },
26
+    methods:{
27
+       //历史月趋势
28
+    getHisWarning() {
29
+      let params = {
30
+        labelCode: "307038864601222",
31
+        orgCode: localStorage.getItem("orgCode"),
32
+
33
+        round: 2,
34
+      };
35
+      api.hisWarning(params).then((res) => {
36
+        console.log(res, "月趋势");
37
+        if(res.code==200){
38
+          this.lsyjData=res.data.avgTemp
39
+          this.maxTemp=res.data.maxTemp
40
+          this.minTemp=res.data.minTemp
41
+        this.drawLsyj()
42
+        }
43
+       
44
+      });
45
+    },
46
+         // 历史预警
47
+         drawLsyj() {
48
+      var myChart2 = this.$echarts.init(document.getElementById("lsyjCharts"));
49
+      myChart2.setOption({
50
+        title: {
51
+          text: "",
52
+        },
53
+        tooltip: {
54
+          trigger: "axis",
55
+          axisPointer: {
56
+            type: "cross",
57
+            label: {
58
+              backgroundColor: "#6a7985",
59
+            },
60
+          },
61
+        },
62
+        // legend: {
63
+        //   data: ['温度', '湿度'],
64
+        //   left:'middle',
65
+        //   top:"6%",
66
+        //   textStyle:{
67
+        //     color:'#fff'
68
+        //   }
69
+
70
+        // },
71
+        toolbox: {
72
+          // feature: {
73
+          //   saveAsImage: {}
74
+          // }
75
+        },
76
+        grid: {
77
+          left: "3%",
78
+          right: "4%",
79
+          bottom: "3%",
80
+          top: "7%",
81
+
82
+          containLabel: true,
83
+        },
84
+        xAxis: [
85
+          {
86
+            name: "月",
87
+
88
+            nameTextStyle: {
89
+              //关键代码
90
+              padding: [50, 0, 10, -13],
91
+            },
92
+            type: "category",
93
+            // boundaryGap: false,
94
+            data: [
95
+              "1",
96
+              "2",
97
+              "3",
98
+              "4",
99
+              "5",
100
+              "6",
101
+              "7",
102
+              "8",
103
+              "9",
104
+              "10",
105
+              "11",
106
+              "12",
107
+            ],
108
+            axisLabel: {
109
+              color: "white",
110
+            },
111
+          },
112
+        ],
113
+        yAxis: [
114
+          {
115
+            type: "value",
116
+            axisLabel: {
117
+              color: "white",
118
+            },
119
+            splitLine: {
120
+              lineStyle: {
121
+                color: "#011F13",
122
+              },
123
+            },
124
+          },
125
+        ],
126
+        series: [
127
+          {
128
+            name: "温度",
129
+            itemStyle: {
130
+              normal: {
131
+                // barBorderRadius: [10, 10, 0, 0],
132
+                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
133
+                  { offset: 0, color: "#00ffa7" },
134
+                  { offset: 1, color: "#00caae" },
135
+                ]),
136
+              },
137
+            },
138
+            type: "bar",
139
+            smooth: true,
140
+            lineStyle: {
141
+              color: "#2496ef",
142
+            },
143
+            stack: "Total",
144
+            areaStyle: {
145
+              opacity: 0.3,
146
+            },
147
+            emphasis: {
148
+              focus: "series",
149
+            },
150
+            data: this.lsyjData,
151
+          },
152
+        ],
153
+      });
154
+      window.addEventListener("resize", () => {
155
+        setTimeout(() => {
156
+          myChart2.resize();
157
+        }, 1000);
158
+      });
159
+    
160
+        }
161
+    },
162
+    created(){
163
+    
164
+        this.getHisWarning()
165
+  
166
+   
167
+       
168
+    }
169
+}
170
+
171
+</script>
172
+<style lang="scss" scoped>
173
+ .lsyj{
174
+        height: 100%;
175
+        width: 21%;
176
+        background: url("../../../../assets/images/bigScreen/tempBorder.png")
177
+          no-repeat;
178
+        background-size: 100% 100%;
179
+        .title {
180
+          height: 37px;
181
+          line-height: 37px;
182
+          margin-left: 10px;
183
+          color: #fff;
184
+          font-weight: 600;
185
+        }
186
+      }
187
+  
188
+    
189
+      .lsyj {
190
+        .lsyj-right {
191
+          height: calc(100% - 37px);
192
+          .right-top {
193
+            height: 30px;
194
+            display: flex;
195
+            justify-content: space-around;
196
+            align-items: center;
197
+            color: #fff;
198
+          }
199
+        }
200
+      }
201
+     
202
+</style>

+ 241 - 0
src/views/system/visualized/wsdbh/index.vue

@@ -0,0 +1,241 @@
1
+<template >
2
+      <div class="wsdbh">
3
+            <div class="title">温湿度变换趋势</div>
4
+            <div class="wsdbhShow">
5
+              <div class="wsdbh-left">
6
+                <div class="left1">
7
+                  <div
8
+                    style="margin-left: 27px; margin-top: 10px; color: #01e0c2"
9
+                  >
10
+                    {{maxTemp}}°C
11
+                  </div>
12
+                  <div
13
+                    style="
14
+                      margin-left: 29px;
15
+                      font-size: 12px;
16
+                      margin-top: 5px;
17
+                      color: #fff;
18
+                    "
19
+                  >
20
+                    温度
21
+                  </div>
22
+                </div>
23
+                <div class="left2">
24
+                  <div
25
+                    style="margin-left: 27px; margin-top: 10px; color: #01e0c2"
26
+                  >
27
+                    {{maxWet}}%
28
+                  </div>
29
+                  <div
30
+                    style="
31
+                      margin-left: 29px;
32
+                      font-size: 12px;
33
+                      margin-top: 5px;
34
+                      color: #fff;
35
+                    "
36
+                  >
37
+                    湿度
38
+                  </div>
39
+                </div>
40
+              </div>
41
+              <div class="wsdbh-right">
42
+                <div id="wsdbhCharts" style="height: 100%"></div>
43
+              </div>
44
+            </div>
45
+          </div>
46
+</template>
47
+<script>
48
+import * as echarts from "echarts";
49
+import api from "@/api";
50
+export default {
51
+    data(){
52
+        return{
53
+          avgWet:[],
54
+          avgTemp:[],
55
+          maxTemp:null,
56
+          maxWet:null
57
+
58
+        }
59
+    },
60
+    methods:{
61
+         //历史月趋势
62
+    getHisWarning() {
63
+      let params = {
64
+        labelCode: "307038864601222",
65
+        orgCode: localStorage.getItem("orgCode"),
66
+
67
+        round: 7,
68
+      };
69
+      api.hisWarning(params).then((res) => {
70
+        console.log(res, "温湿度变换趋势");
71
+        if(res.code==200){
72
+          this.avgTemp=res.data.avgTemp
73
+          this.avgWet=res.data.avgWet
74
+          this.maxTemp=res.data.maxTemp
75
+         this.maxWet=res.data.maxWet
76
+        this.drawWsdbh()
77
+        }
78
+       
79
+      });
80
+    },
81
+      //温湿度
82
+    drawWsdbh() {
83
+      var myChart1 = this.$echarts.init(document.getElementById("wsdbhCharts"));
84
+      myChart1.setOption({
85
+        title: {
86
+          text: "",
87
+        },
88
+        tooltip: {
89
+          trigger: "axis",
90
+          axisPointer: {
91
+            type: "cross",
92
+            label: {
93
+              backgroundColor: "#6a7985",
94
+            },
95
+          },
96
+        },
97
+        legend: {
98
+          data: ["温度", "湿度"],
99
+          left: "middle",
100
+          top: "6%",
101
+          textStyle: {
102
+            color: "#fff",
103
+          },
104
+        },
105
+        toolbox: {
106
+          // feature: {
107
+          //   saveAsImage: {}
108
+          // }
109
+        },
110
+        grid: {
111
+          left: "3%",
112
+          right: "4%",
113
+          bottom: "3%",
114
+
115
+          containLabel: true,
116
+        },
117
+        xAxis: [
118
+          {
119
+            type: "category",
120
+            boundaryGap: false,
121
+            data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
122
+            axisLabel: {
123
+              color: "white",
124
+            },
125
+          },
126
+        ],
127
+        yAxis: [
128
+          {
129
+            type: "value",
130
+            axisLabel: {
131
+              color: "white",
132
+            },
133
+            splitLine: {
134
+              lineStyle: {
135
+                color: "#011F13",
136
+              },
137
+            },
138
+          },
139
+        ],
140
+        series: [
141
+          {
142
+            name: "温度",
143
+            type: "line",
144
+            smooth: true,
145
+            lineStyle: {
146
+              color: "#2496ef",
147
+            },
148
+            stack: "Total",
149
+            areaStyle: {
150
+              opacity: 0.3,
151
+            },
152
+            emphasis: {
153
+              focus: "series",
154
+            },
155
+            data: this.avgTemp,
156
+          },
157
+          {
158
+            name: "湿度",
159
+            type: "line",
160
+            stack: "Total",
161
+            smooth: true,
162
+            areaStyle: {
163
+              opacity: 0.3,
164
+            },
165
+            lineStyle: {
166
+              color: "#ffd726",
167
+            },
168
+            emphasis: {
169
+              focus: "series",
170
+            },
171
+            data: this.avgWet
172
+          },
173
+        ],
174
+      });
175
+      window.addEventListener("resize", () => {
176
+        setTimeout(() => {
177
+          myChart1.resize();
178
+        }, 1000);
179
+      });
180
+    },
181
+    },
182
+    created(){
183
+        this.$nextTick(() => {
184
+     this.getHisWarning()
185
+
186
+
187
+    });
188
+    }
189
+}
190
+
191
+</script>
192
+<style lang="scss" scoped>
193
+
194
+
195
+      .wsdbh {
196
+        height: 100%;
197
+        width: 21%;
198
+        background: url("../../../../assets/images/bigScreen/tempBorder.png")
199
+          no-repeat;
200
+        background-size: 100% 100%;
201
+        .title {
202
+          height: 37px;
203
+          line-height: 37px;
204
+          margin-left: 10px;
205
+          color: #fff;
206
+          font-weight: 600;
207
+        }
208
+      }
209
+    
210
+      .wsdbh {
211
+        height: 100%;
212
+        width: 30%;
213
+        .wsdbhShow {
214
+          height: calc(100% - 37px);
215
+          display: flex;
216
+          justify-content: space-between;
217
+          .wsdbh-left {
218
+            width: 90px;
219
+            display: flex;
220
+            flex-direction: column;
221
+            justify-content: center;
222
+            //  background: url("../../../assets/images/bigScreen/cangfang.png");
223
+            // background-size: cover;
224
+            .left1,
225
+            .left2 {
226
+              height: 60px;
227
+              background: url("../../../../assets/images/bigScreen/wsdbh.png");
228
+              background-size: 100% 100%;
229
+            }
230
+          }
231
+          .wsdbh-right {
232
+            flex: 1;
233
+            .wsdbhCharts {
234
+              height: 100%;
235
+            }
236
+          }
237
+        }
238
+      }
239
+     
240
+      
241
+</style>

+ 180 - 0
src/views/system/visualized/yjxx/index.vue

@@ -0,0 +1,180 @@
1
+<template >
2
+<div class="yjxx">
3
+            <div class="title">预警信息</div>
4
+            <div class="dataShow">
5
+              <ul class="outUl">
6
+                <li style="color: #26dec5">预警信息</li>
7
+                <li style="color: #26dec5">预警点</li>
8
+                <li style="color: #26dec5">监测时间</li>
9
+              </ul>
10
+              <vue-seamless-scroll
11
+                :data="tableData"
12
+                :class-option="classOption"
13
+                class="scroll"
14
+                id="yjxxScroll"
15
+              >
16
+                <ul
17
+                  class="DataList_top inUl"
18
+                  v-for="(item, index) in tableData"
19
+                  :key="index"
20
+                >
21
+                  <li class="DataList_left">
22
+                    <span
23
+                      style="
24
+                        width: 5px;
25
+                        height: 5px;
26
+                        border-radius: 50%;
27
+                        background: rgb(38, 222, 197);
28
+                        display: inline-block;
29
+
30
+                        margin-right: 5px;
31
+                      "
32
+                    ></span
33
+                    >{{ item.alarmRemark }}
34
+                  </li>
35
+                  <li class="DataList_left">
36
+                    {{ item.deviceName }}
37
+                  </li>
38
+                  <li class="DataList_left">
39
+                    {{ item.alarmTime }}
40
+                  </li>
41
+                </ul>
42
+              </vue-seamless-scroll>
43
+            
44
+            </div>
45
+          </div>
46
+</template>
47
+<script>
48
+import vueSeamlessScroll from "vue-seamless-scroll";
49
+import * as echarts from "echarts";
50
+import api from "@/api";
51
+export default {
52
+  components: {
53
+    vueSeamlessScroll,
54
+   
55
+  },
56
+    data(){
57
+        return{
58
+          tableData:[
59
+            {
60
+              temp:30,
61
+              shidu:36,
62
+              jcsj:"2021-10-25"
63
+
64
+            }
65
+          ]
66
+        }
67
+    },
68
+    computed: {
69
+    classOption() {
70
+      return {
71
+        step: 0.2, // 数值越大速度滚动越快
72
+        limitMoveNum: 5, // 开始无缝滚动的数据量 this.dataList.length
73
+        hoverStop: true, // 是否开启鼠标悬停stop
74
+        direction: 1, // 0向下 1向上 2向左 3向右
75
+        openWatch: true, // 开启数据实时监控刷新dom
76
+        singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
77
+        singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
78
+        waitTime: 0, // 单步运动停止的时间(默认值1000ms)
79
+      };
80
+    },
81
+  },
82
+    methods:{
83
+       //历史月趋势
84
+    getWarnInfo() {
85
+      let params = {
86
+        labelCode: "307038864601222",
87
+        orgCode: localStorage.getItem("orgCode"),
88
+
89
+        pageSize: 5,
90
+      };
91
+      api.warnInfo(params).then((res) => {
92
+        console.log(res, "预警信息");
93
+        if(res.code==200){
94
+          this.tableData=res.data
95
+        }
96
+       
97
+      });
98
+    },
99
+        
100
+    },
101
+    created(){
102
+    
103
+        this.getWarnInfo()
104
+  
105
+   
106
+       
107
+    }
108
+}
109
+
110
+</script>
111
+<style lang="scss" scoped>
112
+
113
+      .yjxx {
114
+        height: 100%;
115
+        width: 21%;
116
+        background: url("../../../../assets/images/bigScreen/tempBorder.png")
117
+          no-repeat;
118
+        background-size: 100% 100%;
119
+        .title {
120
+          height: 37px;
121
+          line-height: 37px;
122
+          margin-left: 10px;
123
+          color: #fff;
124
+          font-weight: 600;
125
+        }
126
+        .dataShow {
127
+        padding-top: 10px;
128
+      }
129
+      }
130
+
131
+      .outUl {
132
+    display: flex;
133
+
134
+    justify-content: space-around;
135
+    //   padding: 7px 0;
136
+    color: #ccc;
137
+    font-weight: bolder;
138
+
139
+    li {
140
+      display: flex;
141
+
142
+      justify-content: space-around;
143
+      text-align: center;
144
+      width: 27%;
145
+      font-size: 14px;
146
+    }
147
+    li:nth-child(3) {
148
+      width: 46%;
149
+    }
150
+    //   // li:nth-child(1) {
151
+    //   //   width: 24%;
152
+    //   // }
153
+  }
154
+  .inUl {
155
+    display: flex;
156
+
157
+    justify-content: space-around;
158
+
159
+    li {
160
+      line-height: 29px;
161
+      text-align: center;
162
+      width: 27%;
163
+      font-size: 12px;
164
+      color: rgb(204, 236, 232);
165
+      // color:rgb(29, 221, 196);
166
+    }
167
+
168
+    li:nth-child(3) {
169
+      width: 46%;
170
+    }
171
+  }
172
+  #yjxxScroll {
173
+  height: 140px;
174
+  overflow: hidden;
175
+}
176
+    
177
+    
178
+   
179
+  
180
+</style>