From 7bf7f4969afaa8ccc57cb161427b800d7c3f7c2e Mon Sep 17 00:00:00 2001
From: hailu <962012470@qq.com>
Date: 星期日, 17 十二月 2023 16:53:38 +0800
Subject: [PATCH] 故障,滤芯

---
 src/views/equipmentManagement/faultList.vue |   61 ++++++++++++++++++++++--------
 1 files changed, 45 insertions(+), 16 deletions(-)

diff --git a/src/views/equipmentManagement/faultList.vue b/src/views/equipmentManagement/faultList.vue
index 83a70b1..09c322e 100644
--- a/src/views/equipmentManagement/faultList.vue
+++ b/src/views/equipmentManagement/faultList.vue
@@ -14,16 +14,36 @@
                 <el-form-item>
                     <el-button size="mini" type="primary" icon="el-icon-search">鎼滅储</el-button></el-form-item>
             </el-form>
-            <el-table :data="tableData" style="width: 100%">
-                <el-table-column prop="id" label="缂栧彿" width="60">
+            <el-table :data="faultList" style="width: 100%">
+                <el-table-column prop="deviceId" label="璁惧缂栧彿" width="80">
                 </el-table-column>
-                <el-table-column prop="id" label="璁惧鍚嶇О">
+                <el-table-column prop="deviceName" label="璁惧鍚嶇О">
                 </el-table-column>
-                <el-table-column prop="erectoName" label="瀹㈡埛鍚�" width="100">
+                <el-table-column prop="userName" label="瀹㈡埛鍚�" width="100">
                 </el-table-column>
-                <el-table-column prop="userName" label="瀹㈡埛鐢佃瘽" width="100">
+                <el-table-column prop="userPhone" label="瀹㈡埛鐢佃瘽" width="100">
                 </el-table-column>
                 <el-table-column prop="userPhone" label="璁惧鏁呴殰鎻忚堪">
+                    <template slot-scope="scope">
+                        <div v-if="scope.row.sysStatus == 0">
+                            姝e父绌洪棽鐘舵��
+                        </div>
+                        <div v-if="scope.row.sysStatus == 1">
+                            缂烘按鍋滄満鐘舵��
+                        </div>
+                        <div v-if="scope.row.sysStatus == 2">
+                            鍒舵按涓�
+                        </div>
+                        <div v-if="scope.row.sysStatus == 3">
+                            鍐叉礂涓�
+                        </div>
+                        <div v-if="scope.row.sysStatus == 4">
+                            缁存姢涓�
+                        </div>
+                        <div v-if="scope.row.sysStatus == 5">
+                            鏈縺娲�
+                        </div>
+                    </template>
                 </el-table-column>
             </el-table>
             <el-pagination background :current-page="pageIndex" @current-change="changePage" :page-size="pageSize"
@@ -49,7 +69,7 @@
     data() {
         return {
             state: -1,
-            tableData: [],
+            faultList: [],
             pageIndex: 1,
             pageSize: 10,
             total: 0,
@@ -57,7 +77,7 @@
     },
 
     mounted() {
-
+        this.getList()
     },
     methods: {
         changePage(e) {
@@ -65,17 +85,26 @@
             this.getList();
         },
         getList() {
+            let data = {
+                pageNum: 1,//椤电爜
+                pageSize: 5,//姣忛〉鏉℃暟
+                userId: localStorage.getItem('userID'),//鐢ㄦ埛id
+                roleKey: this.roleKey,//瑙掕壊
+                //
+            }
             request({
-                url: '/api/Equipment/GetFaultList',
-                method: 'get',
-                params: {
-                    pageIndex: this.pageIndex,
-                    pageSize: this.pageSize,
-                    state: this.state,
+                // url: `/iot/device/faultList/${localStorage.getItem('userID')}`,
+                url: `/iot/device/deviceMalfunction`,//鎺ュ彛鏂瑰紡
+                method: "get",
+                // params:data,  //濡傛灉闇�瑕佷紶鍙傚氨鏀惧紑
+            }).then((res) => {
+                if (res.code == 200) {
+                    this.faultList = res.rows
+                } else {
+                    this.faultList = []
                 }
-            }).then(res => {
-                this.tableData = res.data.data;
-                this.total = res.data.total;
+            }).catch((res) => {
+                this.faultList = []
             })
         }
 

--
Gitblit v1.8.0