瀏覽代碼

异常中心-设备异常

devilhell 2 年之前
父節點
當前提交
f8e9520667

+ 14 - 7
imcs-bt-fe/imcs-bt-fe/imcs-ui/src/api/adSomeelse.js

@@ -1,9 +1,9 @@
 /*
  * @Author: wangj
  * @Date: 2023-02-27 20:58:17
- * @LastEditors: wangj
- * @LastEditTime: 2023-03-02 20:46:43
- * @FilePath: \code\src\api\adSomeelse.js
+ * @LastEditors: @EXtreeDesigner
+ * @LastEditTime: 2023-03-03 23:25:18
+ * @FilePath: \imcs-ui\src\api\adSomeelse.js
  * @Description: 异常中心-设备异常、广告管理、优惠券管理
  */
 import axiosApi from './AxiosApi.js'
@@ -14,6 +14,10 @@ const apiList = {
     url: `/authority/equ-status/page`,
     method: 'POST'
   },
+  bugdelete: {
+    url: `/authority/equ-status`,
+    method: 'DELETE'
+  },
   mark: {
     url: `/msgs/msgsCenterInfo/mark`,
     method: 'GET'
@@ -22,10 +26,6 @@ const apiList = {
     url: `/msgs/msgsCenterInfo`,
     method: 'POST'
   },
-  delete: {
-    url: `/msgs/msgsCenterInfo`,
-    method: 'DELETE'
-  },
   preview: {
     method: 'POST',
     url: `/msgs/msgsCenterInfo/preview`
@@ -46,5 +46,12 @@ export const bug = {
         ...apiList.bugpage,
         data,
       })
+    },
+    delete (data) {
+      return axiosApi({
+        ...apiList.bugdelete,
+        // data:{"ids[]" :data},
+        data
+      })
     }
 }

+ 10 - 27
imcs-bt-fe/imcs-bt-fe/imcs-ui/src/views/zuihou/bughub/epuip/Index.vue

@@ -134,12 +134,13 @@
         align="center"
         prop="status"
         width="110px"
+        :formatter="columnformatter"
       >
       <!-- 状态 -->
-      <template>
-        {{ tableData.records.status}}
+      <!-- <template> -->
+        <!-- {{ tableData.records.status}} -->
         <!-- {{ ['离线','在线', '异常', '缺料'][tableData?.records?.status] }} -->
-        </template>
+        <!-- </template> -->
       </el-table-column>
       <el-table-column
         :label="$t('_bug.table.10')"
@@ -228,6 +229,9 @@ export default {
     this.fetch();
   },
   methods: {
+    columnformatter(...e){
+      return ['离线','在线', '异常', '缺料'][e[2]]
+    },
     onSelectChange(selection) {
       this.selection = selection;
     },
@@ -251,32 +255,9 @@ export default {
           if (res.code === 0 && res.isSuccess) {
             this.tableData = res.data;
           }
-          console.log(res);
-          debugger;
         })
         .finally(() => (this.loading = false));
     },
-    clear(type) {
-      this.$confirm("确认要清除日志吗?", this.$t("common.tips"), {
-        confirmButtonText: this.$t("common.confirm"),
-        cancelButtonText: this.$t("common.cancel"),
-        type: "warning",
-      })
-        .then(() => {
-          optLogApi.clear({ type: type }).then((response) => {
-            const res = response.data;
-            if (res.isSuccess) {
-              this.$message({
-                message: this.$t("tips.deleteSuccess"),
-                type: "success",
-              });
-            }
-
-            this.search();
-          });
-        })
-        .catch(() => {});
-    },
     singleDelete(row) {
       this.$refs.table.clearSelection();
       this.$refs.table.toggleRowSelection(row, true);
@@ -307,7 +288,9 @@ export default {
       this.$refs.table.clearSelection();
     },
     delete(logIds) {
-      optLogApi.delete({ ids: logIds }).then((response) => {
+      console.log('+++++++++++++')
+      console.log(logIds)
+      bug.delete({ ids: logIds }).then((response) => {
         const res = response.data;
         if (res.isSuccess) {
           this.$message({