提交 | 用户 | 时间
|
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.className" placeholder="设备分类" clearable></el-input> |
|
7 |
</el-form-item> |
|
8 |
<el-form-item> |
|
9 |
<el-input v-model="dataForm.faultType" placeholder="故障类型" clearable></el-input> |
|
10 |
</el-form-item> |
|
11 |
<el-form-item> |
|
12 |
<el-button @click="getDataList()">{{ $t('query') }}</el-button> |
|
13 |
</el-form-item> |
|
14 |
<el-form-item> |
|
15 |
<el-button v-if="$hasPermission('device:device-fault:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> |
|
16 |
</el-form-item> |
|
17 |
<el-form-item> |
|
18 |
<el-button v-if="$hasPermission('device:device-fault:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button> |
|
19 |
</el-form-item> |
|
20 |
</el-form> |
|
21 |
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> |
|
22 |
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> |
|
23 |
<el-table-column prop="classNo" label="设备分类编码" header-align="center" align="center"></el-table-column> |
|
24 |
<el-table-column prop="className" label="设备分类名称" header-align="center" align="center"></el-table-column> |
|
25 |
<el-table-column prop="indexType" label="评价指标" header-align="center" align="center"> |
|
26 |
</el-table-column> |
|
27 |
<el-table-column prop="faultType" label="故障类型" header-align="center" align="center"> |
|
28 |
</el-table-column> |
|
29 |
<el-table-column prop="faultCode" label="故障码" header-align="center" align="center"></el-table-column> |
|
30 |
<el-table-column prop="solution" label="处理对策" header-align="center" align="left" width="600"></el-table-column> |
|
31 |
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="100"> |
|
32 |
<template slot-scope="scope"> |
|
33 |
<el-button v-if="$hasPermission('device:device-fault:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button> |
|
34 |
<el-button v-if="$hasPermission('device:device-fault:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button> |
|
35 |
</template> |
|
36 |
</el-table-column> |
|
37 |
</el-table> |
|
38 |
<el-pagination |
|
39 |
:current-page="page" |
|
40 |
:page-sizes="[10, 20, 50, 100]" |
|
41 |
:page-size="limit" |
|
42 |
:total="total" |
|
43 |
layout="total, sizes, prev, pager, next, jumper" |
|
44 |
@size-change="pageSizeChangeHandle" |
|
45 |
@current-change="pageCurrentChangeHandle"> |
|
46 |
</el-pagination> |
|
47 |
<!-- 弹窗, 新增 / 修改 --> |
|
48 |
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> |
|
49 |
</div> |
|
50 |
</el-card> |
|
51 |
</template> |
|
52 |
|
|
53 |
<script> |
|
54 |
import mixinViewModule from '@/mixins/view-module' |
|
55 |
import AddOrUpdate from './device-fault-add-or-update' |
|
56 |
import DictSelectTag from "@/components/dict/dict-select-tag.vue"; |
|
57 |
export default { |
|
58 |
mixins: [mixinViewModule], |
|
59 |
data () { |
|
60 |
return { |
|
61 |
mixinViewModuleOptions: { |
|
62 |
getDataListURL: '/iailab-ntt-model/device/device-fault/page', |
|
63 |
getDataListIsPage: true, |
|
64 |
deleteURL: '/iailab-ntt-model/device/device-fault', |
|
65 |
deleteIsBatch: true |
|
66 |
}, |
|
67 |
dataForm: { |
|
68 |
className: '', |
|
69 |
faultType: '' |
|
70 |
} |
|
71 |
} |
|
72 |
}, |
|
73 |
components: { |
|
74 |
DictSelectTag, |
|
75 |
AddOrUpdate |
|
76 |
} |
|
77 |
} |
|
78 |
</script> |