Commit a18ba60094ff563cca9538f005a7f96a50a023e3
1 parent
e47fb2bc
地磁故障api
Showing
4 changed files
with
47 additions
and
21 deletions
src/App.vue
src/components/geomagnetism.vue
src/components/screen.vue
1 | 1 | <template> |
2 | 2 | <div class=""> |
3 | 3 | <ul class="dici-wrap"> |
4 | - <li> | |
5 | - <p class="parkName">赤峰诱导屏名称</p> | |
4 | + <li v-for="(item, index) in queryscreenList" :key="index"> | |
5 | + <p class="parkName">{{item.guideName}}</p> | |
6 | 6 | <ul class="diciList"> |
7 | 7 | <li> |
8 | - 编号 :B8888B8888 | |
8 | + 编号 :{{item.guideNo}} | |
9 | 9 | </li> |
10 | 10 | <li> |
11 | - 异常类型 :设备故障 | |
11 | + 异常类型 :{{item.ledDeviceStatus | screenFilter(item.ledScreenStatus)}} | |
12 | 12 | </li> |
13 | 13 | <li> |
14 | - 故障时间 :2019-01-91 15:31:00 | |
14 | + 故障时间 :{{item.lastUpdateDate | dataFilter}} | |
15 | 15 | </li> |
16 | 16 | </ul> |
17 | 17 | |
18 | 18 | </li> |
19 | - <li> | |
20 | - <p class="parkName">赤峰诱导屏名称</p> | |
21 | - <ul class="diciList"> | |
22 | - <li> | |
23 | - 编号 :B8888B8888 | |
24 | - </li> | |
25 | - <li> | |
26 | - 异常类型 :设备故障 | |
27 | - </li> | |
28 | - <li> | |
29 | - 故障时间 :2019-01-91 15:31:00 | |
30 | - </li> | |
31 | - </ul> | |
32 | - </li> | |
19 | + | |
33 | 20 | </ul> |
34 | 21 | </div> |
35 | 22 | </template> |
36 | 23 | <script> |
24 | +import { screenAddress } from '../utils/api' | |
37 | 25 | export default { |
38 | 26 | name: 'screen', |
27 | + data() { | |
28 | + return{ | |
29 | + modifyTimeBegin: new Date('2019-04-01 00:00:00'), | |
30 | + modifyTimeEnd: new Date('2019-04-04 00:00:00'), | |
31 | + queryscreenList: [] | |
32 | + } | |
33 | + | |
34 | + }, | |
39 | 35 | created() { |
40 | 36 | document.title = '诱导屏故障' |
37 | + | |
38 | + screenAddress({ | |
39 | + modifyTimeBegin:this.modifyTimeBegin, | |
40 | + modifyTimeEnd: this.modifyTimeEnd, | |
41 | + orgId: 10003, | |
42 | + sysCode:'1001', | |
43 | + }) | |
44 | + .then((res) => { | |
45 | + console.log(res.data.data) | |
46 | + const queryscreenList = res.data.data | |
47 | + this.queryscreenList = queryscreenList | |
48 | + }) | |
49 | + .catch((res) => { | |
50 | + console.log(res) | |
51 | + }) | |
52 | + }, | |
53 | + filters: { | |
54 | + screenFilter(device,screen){ | |
55 | + if(device === 2 && screen === 2){ | |
56 | + return '设备故障,屏幕已关闭' | |
57 | + } else if(device ===1 && screen ===2){ | |
58 | + return '屏幕已关闭' | |
59 | + } else if(device ===2 && screen ===1){ | |
60 | + return '设备故障' | |
61 | + } else { | |
62 | + return '正常' | |
63 | + } | |
64 | + | |
65 | + } | |
41 | 66 | } |
42 | 67 | } |
43 | 68 | </script> | ... | ... |