From 1d45ea75308850ad0ef575ca28ba3f93552f097c Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期三, 24 一月 2024 16:01:58 +0800
Subject: [PATCH] 设备监控页面状态反馈按钮添加二次确认功能以及调整异常设备列表项字体颜色为红色显示

---
 src/views/mdc/base/EquipmentList.vue |  236 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 222 insertions(+), 14 deletions(-)

diff --git a/src/views/mdc/base/EquipmentList.vue b/src/views/mdc/base/EquipmentList.vue
index c523877..c2b147a 100644
--- a/src/views/mdc/base/EquipmentList.vue
+++ b/src/views/mdc/base/EquipmentList.vue
@@ -19,6 +19,14 @@
               <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉�" v-model="queryParam.equipmentName"></a-input>
             </a-form-item>
           </a-col>
+
+          <a-col :md="6" :sm="8">
+            <a-form-item label="杞﹂棿鍚嶇О">
+              <!--<a-input placeholder="璇疯緭鍏ヨ处鍙锋煡璇�" v-model="queryParam.username"></a-input>-->
+              <a-input placeholder="璇疯緭鍏ヨ溅闂村悕绉�" v-model="queryParam.productionName"></a-input>
+            </a-form-item>
+          </a-col>
+
           <a-col :md="6" :sm="8">
             <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
             <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
@@ -56,6 +64,7 @@
         bordered
         size="middle"
         rowKey="id"
+        :scroll="{x:'max-content',y:465}"
         :columns="columns"
         :dataSource="dataSource"
         :pagination="ipagination"
@@ -138,6 +147,7 @@
   import UserRecycleBinModal from './modules/EquipmentList/UserRecycleBinModal'
   import JSuperQuery from '@/components/jeecg/JSuperQuery'
   import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton'
+  import {mapActions} from 'vuex'
 
   export default {
     name: "EquipmentList",
@@ -171,25 +181,25 @@
             title: '璁惧缂栧彿',
             align: "center",
             dataIndex: 'equipmentId',
-            width: 120,
+            width: 200,
             // sorter: true
           },
           {
             title: '璁惧鍚嶇О',
             align: "center",
-            width: 150,
+            width: 200,
             dataIndex: 'equipmentName',
           },
           {
             title: '杞﹂棿',
             align: "center",
-            width: 180,
+            width: 200,
             dataIndex: 'productionName'
           },
           {
             title: '璁惧绫诲瀷',
             align: "center",
-            width: 120,
+            width: 200,
             dataIndex: 'equipmentType',
             // scopedSlots: {customRender: "avatarslot"}
           },
@@ -197,33 +207,33 @@
           {
             title: '椹卞姩绫诲瀷',
             align: "center",
-            width: 80,
+            width: 200,
             dataIndex: 'driveType',
             // sorter: true
           },
           {
             title: '鏈哄簥IP',
             align: "center",
-            width: 100,
+            width: 200,
             dataIndex: 'equipmentIp'
           },
           {
             title: '璁惧鍔熺巼',
             align: "center",
-            width: 100,
+            width: 200,
             dataIndex: 'devicePower'
           },
           {
             title: '閮ㄩ棬',
             align: "center",
-            width: 180,
+            width: 200,
             dataIndex: 'orgCodeTxt'
           },
 
           {
             title: '绯荤粺鐗堟湰',
             align: "center",
-            width: 80,
+            width: 200,
             dataIndex: 'systemVersion'
           },
           {
@@ -231,7 +241,8 @@
             dataIndex: 'action',
             scopedSlots: {customRender: 'action'},
             align: "center",
-            width: 120
+            width: 150,
+            fixed:'right'
           }
 
         ],
@@ -248,6 +259,7 @@
           // exportXlsUrl: "/sys/user/exportXls",
           // importExcelUrl: "sys/user/importExcel",
         },
+        isDepartType:''
       }
     },
     computed: {
@@ -255,12 +267,196 @@
       //   return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
       // }
     },
+    created() {
+      this.queryTreeData()
+    },
     methods: {
+      ...mapActions(['QueryDepartTree']),
+      queryTreeData() {
+        this.QueryDepartTree().then(res => {
+          if (res.success) {
+            this.isDepartType = res.result[0].value
+            if(this.isDepartType == -1){
+              this.columns=[
+                {
+                  title: '#',
+                  dataIndex: '',
+                  key:'rowIndex',
+                  width:60,
+                  align:"center",
+                  customRender:function (t,r,index) {
+                    return parseInt(index)+1;
+                  }
+                },
+                {
+                  title: '璁惧缂栧彿',
+                  align: "center",
+                  dataIndex: 'equipmentId',
+                  width: 200,
+                  // sorter: true
+                },
+                {
+                  title: '璁惧鍚嶇О',
+                  align: "center",
+                  width: 200,
+                  dataIndex: 'equipmentName',
+                },
+                {
+                  title: '杞﹂棿',
+                  align: "center",
+                  width: 200,
+                  dataIndex: 'productionName'
+                },
+                {
+                  title: '璁惧绫诲瀷',
+                  align: "center",
+                  width: 200,
+                  dataIndex: 'equipmentType',
+                  // scopedSlots: {customRender: "avatarslot"}
+                },
+
+                {
+                  title: '椹卞姩绫诲瀷',
+                  align: "center",
+                  width: 200,
+                  dataIndex: 'driveType',
+                  // sorter: true
+                },
+                {
+                  title: '鏈哄簥IP',
+                  align: "center",
+                  width: 200,
+                  dataIndex: 'equipmentIp'
+                },
+                {
+                  title: '璁惧鍔熺巼',
+                  align: "center",
+                  width: 200,
+                  dataIndex: 'devicePower'
+                },
+                // {
+                //   title: '閮ㄩ棬',
+                //   align: "center",
+                //   width: 200,
+                //   dataIndex: 'orgCodeTxt'
+                // },
+
+                {
+                  title: '绯荤粺鐗堟湰',
+                  align: "center",
+                  width: 200,
+                  dataIndex: 'systemVersion'
+                },
+                {
+                  title: '鎿嶄綔',
+                  dataIndex: 'action',
+                  scopedSlots: {customRender: 'action'},
+                  align: "center",
+                  width: 150,
+                  fixed:'right'
+                }
+
+              ]
+            }else{
+              this.columns=[
+                {
+                  title: '#',
+                  dataIndex: '',
+                  key:'rowIndex',
+                  width:60,
+                  align:"center",
+                  customRender:function (t,r,index) {
+                    return parseInt(index)+1;
+                  }
+                },
+                {
+                  title: '璁惧缂栧彿',
+                  align: "center",
+                  dataIndex: 'equipmentId',
+                  width: 200,
+                  // sorter: true
+                },
+                {
+                  title: '璁惧鍚嶇О',
+                  align: "center",
+                  width: 200,
+                  dataIndex: 'equipmentName',
+                },
+                {
+                  title: '杞﹂棿',
+                  align: "center",
+                  width: 200,
+                  dataIndex: 'productionName'
+                },
+                {
+                  title: '璁惧绫诲瀷',
+                  align: "center",
+                  width: 200,
+                  dataIndex: 'equipmentType',
+                  // scopedSlots: {customRender: "avatarslot"}
+                },
+
+                {
+                  title: '椹卞姩绫诲瀷',
+                  align: "center",
+                  width: 200,
+                  dataIndex: 'driveType',
+                  // sorter: true
+                },
+                {
+                  title: '鏈哄簥IP',
+                  align: "center",
+                  width: 200,
+                  dataIndex: 'equipmentIp'
+                },
+                {
+                  title: '璁惧鍔熺巼',
+                  align: "center",
+                  width: 200,
+                  dataIndex: 'devicePower'
+                },
+                {
+                  title: '閮ㄩ棬',
+                  align: "center",
+                  width: 200,
+                  dataIndex: 'orgCodeTxt'
+                },
+
+                {
+                  title: '绯荤粺鐗堟湰',
+                  align: "center",
+                  width: 200,
+                  dataIndex: 'systemVersion'
+                },
+                {
+                  title: '鎿嶄綔',
+                  dataIndex: 'action',
+                  scopedSlots: {customRender: 'action'},
+                  align: "center",
+                  width: 150,
+                  fixed:'right'
+                }
+
+              ]
+            }
+
+          } else {
+            // this.$message.warn(res.message)
+            this.$notification.warning({
+              message:'娑堟伅',
+              description:res.message
+            });
+          }
+        }).finally(() =>{
+        })
+      },
       handleEdit: function (record) {
         this.$refs.modalForm.edit(record);
         this.$refs.modalForm.title = "缂栬緫";
         this.$refs.modalForm.disableSubmit = false;
         this.$refs.modalForm.disSeach = true;
+        // 璋冪敤鎶藉眽琛ㄥ崟缁勪欢涓殑娓呴櫎琛ㄥ崟楠岃瘉鏂规硶
+        this.$refs.modalForm.removeValidate()
       },
       handleAdd: function () {
         this.$refs.modalForm.add();
@@ -271,10 +467,13 @@
       getAvatarView: function (avatar) {
         return getFileAccessHttpUrl(avatar)
       },
-
       batchFrozen: function (status) {
         if (this.selectedRowKeys.length <= 0) {
-          this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒');
+          // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒');
+          this.$notification.warning({
+            message:'娑堟伅',
+            description:"璇烽�夋嫨涓�鏉¤褰�"
+          });
           return false;
         } else {
           let ids = "";
@@ -298,11 +497,20 @@
             onOk: function () {
               frozenBatch({ids: ids, status: status}).then((res) => {
                 if (res.success) {
-                  that.$message.success(res.message);
+                  // that.$message.success(res.message);
+                  that.$notification.success({
+                    message:'娑堟伅',
+                    description:res.message
+                  });
                   that.loadData();
                   that.onClearSelected();
                 } else {
-                  that.$message.warning(res.message);
+                  // that.$message.warning(res.message);
+                  that.$notification.warning({
+                    message:'娑堟伅',
+                    description:res.message
+                  });
+
                 }
               });
             }

--
Gitblit v1.9.3