Blame view

src/views/standard/device/error.vue 2.41 KB
8ef22809   梁保满   软件下载页面添加.net环境下载
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
  <template>
    <div>
      <back-box>
        <template slot="title">
          <span>异常设备信息</span>
        </template>
      </back-box>
      <div class="page-content">
        <el-table :data="tableData" border style="width: 100%">
          <el-table-column
            prop="sn"
            label="设备编码"
            align="center"
            width="160"
          ></el-table-column>
          <el-table-column
            prop="type"
            label="设备类型"
            align="center"
          ></el-table-column>
          <el-table-column
            prop="operationTime"
            label="异常类型"
            align="center"
          ></el-table-column>
          <el-table-column
            prop="operationTime"
            label="最早发现时间"
            align="center"
            width="200"
          ></el-table-column>
          <el-table-column
            prop="operationTime"
            label="异常后答题次数"
            align="center"
          ></el-table-column>
          <el-table-column
            prop="operationTime"
            label="状态"
            align="center"
          ></el-table-column>
          <el-table-column label="操作" align="center"  width="200"
            ><template slot-scope="scoped">
              <el-link>处理</el-link></template
            ></el-table-column
          >
        </el-table>
        <div class="pagination-box">
          <el-pagination
            small=""
            layout="total,prev, pager, next"
            :hide-on-single-page="true"
            :total="total"
            @current-change="changePage"
            :current-page="page"
            :page-size="size"
          >
          </el-pagination>
        </div>
      </div>
    </div>
  </template>
  
  <script>
  export default {
    data() {
      return {
        tableData: [],
        total: 0,
        page: 1,
        size: 20,
      };
    },
    created() {
      this._QueryData()
    },
    methods: {
      changePage(page) {
        this.page = page;
        this._QueryData();
      },
      async _QueryData() {
        this.loading = true;
        const {
          data = {},
          status,
          info,
        } = await this.$request.pDeviceLogList({
          page: this.page,
          size: this.size,
        });
        this.loading = false;
        if (status === 0) {
          this.tableData = (data?.list && [...data?.list]) || [];
          this.total = data.count;
        } else {
          this.$message.error(info);
        }
      },
    },
  };
  </script>
  
  <style lang="scss" scoped>
  .page-content {
    padding: 20px;
  }
  </style>