提交 | 用户 | 时间
|
850106
|
1 |
<template> |
H |
2 |
<el-card shadow="never" class="aui-card--fill"> |
|
3 |
<div class="mod-device__devicefault}"> |
|
4 |
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> |
|
5 |
<el-form-item> |
|
6 |
<el-input v-model="dataForm.devNo" placeholder="设备编号" clearable></el-input> |
|
7 |
</el-form-item> |
|
8 |
<el-form-item> |
|
9 |
<el-input v-model="dataForm.devName" placeholder="设备名称" clearable></el-input> |
|
10 |
</el-form-item> |
|
11 |
<el-form-item> |
|
12 |
<el-date-picker |
|
13 |
v-model="dataForm.startTime" |
|
14 |
type="datetime" |
|
15 |
value-format="yyyy-MM-dd HH:mm:ss" |
|
16 |
placeholder="开始时间"> |
|
17 |
</el-date-picker> |
|
18 |
</el-form-item> |
|
19 |
<el-form-item> |
|
20 |
<el-date-picker |
|
21 |
v-model="dataForm.endTime" |
|
22 |
type="datetime" |
|
23 |
value-format="yyyy-MM-dd HH:mm:ss" |
|
24 |
placeholder="结束时间"> |
|
25 |
</el-date-picker> |
|
26 |
</el-form-item> |
|
27 |
|
|
28 |
<el-form-item> |
|
29 |
<el-button @click="getDataList()">{{ $t('query') }}</el-button> |
|
30 |
</el-form-item> |
|
31 |
</el-form> |
|
32 |
<el-table v-loading="dataListLoading" :data="dataList" border |
|
33 |
@selection-change="dataListSelectionChangeHandle" style="width: 100%;"> |
|
34 |
<el-table-column prop="devNo" label="设备编码" header-align="center" align="center" width="100"></el-table-column> |
|
35 |
<el-table-column prop="devName" label="设备名称" header-align="center" align="center" width="160"></el-table-column> |
|
36 |
<el-table-column prop="alarmIndexTypes" label="故障指标" header-align="center" align="center" width="180"></el-table-column> |
|
37 |
<el-table-column prop="alarmSolutions" label="故障建议" header-align="center" align="center" width="auto"> |
|
38 |
<template slot-scope="scope"> |
|
39 |
<el-tooltip placement="top"> |
|
40 |
<div slot="content" class="text_warp"> |
|
41 |
{{ scope.row.alarmSolutions }} |
|
42 |
</div> |
|
43 |
<div style="color: #000" class="text_els"> |
|
44 |
{{ scope.row.alarmSolutions }} |
|
45 |
</div> |
|
46 |
</el-tooltip> |
|
47 |
</template> |
|
48 |
</el-table-column> |
|
49 |
<el-table-column prop="faultTime" label="故障时间" header-align="center" align="center" width="200"></el-table-column> |
|
50 |
<el-table-column prop="isPushed" label="已推送工单" header-align="center" align="center" width="100" :formatter="(row, column, cellValue, index) => dictFormater(row, column, cellValue, index,'is-pushed')"></el-table-column> |
|
51 |
<el-table-column prop="pushType" label="推送方式" header-align="center" align="center" width="100" :formatter="(row, column, cellValue, index) => dictFormater(row, column, cellValue, index,'push-type')"></el-table-column> |
|
52 |
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="100"> |
|
53 |
<template slot-scope="scope"> |
|
54 |
<!-- <el-button v-if="$hasPermission('device:device-fault:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>--> |
|
55 |
<!-- <el-button v-if="$hasPermission('device:device-fault:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>--> |
|
56 |
<el-button type="text" size="small" @click="showInfo(scope.row.id)">{{ '详情' }}</el-button> |
|
57 |
</template> |
|
58 |
</el-table-column> |
|
59 |
</el-table> |
|
60 |
<el-pagination |
|
61 |
:current-page="page" |
|
62 |
:page-sizes="[10, 20, 50, 100]" |
|
63 |
:page-size="limit" |
|
64 |
:total="total" |
|
65 |
layout="total, sizes, prev, pager, next, jumper" |
|
66 |
@size-change="pageSizeChangeHandle" |
|
67 |
@current-change="pageCurrentChangeHandle"> |
|
68 |
</el-pagination> |
|
69 |
<device-health-alarm-info v-if="infoVisible" ref="info"></device-health-alarm-info> |
|
70 |
</div> |
|
71 |
</el-card> |
|
72 |
</template> |
|
73 |
|
|
74 |
|
|
75 |
<script> |
|
76 |
import mixinViewModule from '@/mixins/view-module' |
|
77 |
import DictSelectTag from "@/components/dict/dict-select-tag.vue"; |
|
78 |
import DeviceHealthAlarmInfo from "./device-health-alarm-info.vue"; |
|
79 |
|
|
80 |
export default { |
|
81 |
mixins: [mixinViewModule], |
|
82 |
data() { |
|
83 |
return { |
|
84 |
infoVisible: false, |
|
85 |
mixinViewModuleOptions: { |
|
86 |
getDataListURL: '/iailab-ntt-model/device/health-alarm/page', |
|
87 |
getDataListIsPage: true, |
|
88 |
deleteURL: '/iailab-ntt-model/device/health-alarm', |
|
89 |
deleteIsBatch: true |
|
90 |
}, |
|
91 |
dataForm: { |
|
92 |
className: '', |
|
93 |
faultType: '' |
|
94 |
}, |
|
95 |
time: '', |
|
96 |
} |
|
97 |
}, |
|
98 |
components: { |
|
99 |
DictSelectTag, |
|
100 |
DeviceHealthAlarmInfo |
|
101 |
}, |
|
102 |
methods: { |
|
103 |
showInfo(id) { |
|
104 |
this.infoVisible = true |
|
105 |
this.$nextTick(() => { |
|
106 |
this.$refs.info.dataForm.id = id |
|
107 |
this.$refs.info.init() |
|
108 |
}) |
|
109 |
}, |
|
110 |
dictFormater(row, column, cellValue, index, key) { |
|
111 |
return this.$getDictItem(key, cellValue) |
|
112 |
} |
|
113 |
} |
|
114 |
} |
|
115 |
</script> |
|
116 |
<style scoped> |
|
117 |
.text_warp{ |
|
118 |
display: block; |
|
119 |
max-width: 500px; |
|
120 |
white-space: pre-line; |
|
121 |
} |
|
122 |
.text_els{ |
|
123 |
width: 100%; |
|
124 |
overflow: hidden; |
|
125 |
white-space: nowrap; |
|
126 |
text-overflow: ellipsis; |
|
127 |
} |
|
128 |
</style> |