houzhongjian
2024-07-23 8501060c4f921d1e744c477e4dc08eb47b52693c
提交 | 用户 | 时间
850106 1 <template>
H 2   <el-dialog
3       :title="title"
4       :modal="false"
5       :close-on-click-modal="false"
6       :close-on-press-escape="false"
7       :visible.sync="visible">
8     <div class="mod-mcs__runlog}">
9       <el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
10         <el-table-column prop="deviceName" label="设备名称" header-align="center" align="center"></el-table-column>
11         <el-table-column prop="deviceClass" label="设备分类" header-align="center" align="center"></el-table-column>
12         <el-table-column prop="runState" label="运行状态" header-align="center" align="center">
13           <template slot-scope="scope">
14             <el-tag v-if="scope.row.runState === 2" size="small" type="success">正常</el-tag>
15             <el-tag v-else size="small" type="danger">异常</el-tag>
16           </template>
17         </el-table-column>
18         <el-table-column prop="createDate" label="运行时间" header-align="center" align="center"></el-table-column>
19       </el-table>
20       <el-pagination
21           :current-page="page"
22           :page-sizes="[10, 20, 50]"
23           :page-size="10"
24           :total="total"
25           layout="total, sizes, prev, pager, next, jumper"
26           @size-change="pageSizeChangeHandle"
27           @current-change="pageCurrentChangeHandle">
28       </el-pagination>
29     </div>
30   </el-dialog>
31 </template>
32 <script>
33 import mixinViewModule from '@/mixins/view-module'
34 export default {
35   mixins: [mixinViewModule],
36   data() {
37     return {
38       mixinViewModuleOptions: {
39         getDataListURL: '/iailab-ntt-model/device/device-account-history/page',
40         getDataListIsPage: true,
41       },
42       visible: false,
43       title: '',
44       dataList: [],
45       dataForm: {
46         deviceId: '',
47       }
48     }
49   },
50   methods: {
51     init() {
52       this.visible = true
53       if (this.dataForm.deviceId) {
54         this.getDataList()
55       }
56     }
57   }
58 }
59
60 </script>