From 487754376a1eb675d430a64b7a4aa9e7ffeb405b Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期五, 25 八月 2023 09:54:15 +0800
Subject: [PATCH] 调整

---
 src/views/mdc/base/EquipmentList.vue |  184 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 183 insertions(+), 1 deletions(-)

diff --git a/src/views/mdc/base/EquipmentList.vue b/src/views/mdc/base/EquipmentList.vue
index 02bd2c3..78fc6ff 100644
--- a/src/views/mdc/base/EquipmentList.vue
+++ b/src/views/mdc/base/EquipmentList.vue
@@ -138,6 +138,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",
@@ -248,6 +249,7 @@
           // exportXlsUrl: "/sys/user/exportXls",
           // importExcelUrl: "sys/user/importExcel",
         },
+        isDepartType:''
       }
     },
     computed: {
@@ -255,7 +257,187 @@
       //   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: 120,
+                  // sorter: true
+                },
+                {
+                  title: '璁惧鍚嶇О',
+                  align: "center",
+                  width: 150,
+                  dataIndex: 'equipmentName',
+                },
+                {
+                  title: '杞﹂棿',
+                  align: "center",
+                  width: 180,
+                  dataIndex: 'productionName'
+                },
+                {
+                  title: '璁惧绫诲瀷',
+                  align: "center",
+                  width: 120,
+                  dataIndex: 'equipmentType',
+                  // scopedSlots: {customRender: "avatarslot"}
+                },
+
+                {
+                  title: '椹卞姩绫诲瀷',
+                  align: "center",
+                  width: 80,
+                  dataIndex: 'driveType',
+                  // sorter: true
+                },
+                {
+                  title: '鏈哄簥IP',
+                  align: "center",
+                  width: 100,
+                  dataIndex: 'equipmentIp'
+                },
+                {
+                  title: '璁惧鍔熺巼',
+                  align: "center",
+                  width: 100,
+                  dataIndex: 'devicePower'
+                },
+                // {
+                //   title: '閮ㄩ棬',
+                //   align: "center",
+                //   width: 180,
+                //   dataIndex: 'orgCodeTxt'
+                // },
+
+                {
+                  title: '绯荤粺鐗堟湰',
+                  align: "center",
+                  width: 80,
+                  dataIndex: 'systemVersion'
+                },
+                {
+                  title: '鎿嶄綔',
+                  dataIndex: 'action',
+                  scopedSlots: {customRender: 'action'},
+                  align: "center",
+                  width: 120
+                }
+
+              ]
+            }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: 120,
+                  // sorter: true
+                },
+                {
+                  title: '璁惧鍚嶇О',
+                  align: "center",
+                  width: 150,
+                  dataIndex: 'equipmentName',
+                },
+                {
+                  title: '杞﹂棿',
+                  align: "center",
+                  width: 180,
+                  dataIndex: 'productionName'
+                },
+                {
+                  title: '璁惧绫诲瀷',
+                  align: "center",
+                  width: 120,
+                  dataIndex: 'equipmentType',
+                  // scopedSlots: {customRender: "avatarslot"}
+                },
+
+                {
+                  title: '椹卞姩绫诲瀷',
+                  align: "center",
+                  width: 80,
+                  dataIndex: 'driveType',
+                  // sorter: true
+                },
+                {
+                  title: '鏈哄簥IP',
+                  align: "center",
+                  width: 100,
+                  dataIndex: 'equipmentIp'
+                },
+                {
+                  title: '璁惧鍔熺巼',
+                  align: "center",
+                  width: 100,
+                  dataIndex: 'devicePower'
+                },
+                {
+                  title: '閮ㄩ棬',
+                  align: "center",
+                  width: 180,
+                  dataIndex: 'orgCodeTxt'
+                },
+
+                {
+                  title: '绯荤粺鐗堟湰',
+                  align: "center",
+                  width: 80,
+                  dataIndex: 'systemVersion'
+                },
+                {
+                  title: '鎿嶄綔',
+                  dataIndex: 'action',
+                  scopedSlots: {customRender: 'action'},
+                  align: "center",
+                  width: 120
+                }
+
+              ]
+            }
+
+          } 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 = "缂栬緫";
@@ -303,7 +485,7 @@
               frozenBatch({ids: ids, status: status}).then((res) => {
                 if (res.success) {
                   // that.$message.success(res.message);
-                  that.$notification.warning({
+                  that.$notification.success({
                     message:'娑堟伅',
                     description:res.message
                   });

--
Gitblit v1.9.3