From f360cde8ff0b28ba677a4693cf45f47f206dd746 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期三, 21 五月 2025 17:52:54 +0800
Subject: [PATCH] 1、设备管理中设备属性的字段显隐权限调整到设备状态字段 2、设备日志添加批量导出功能

---
 src/views/system/UserList.vue |  297 +++++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 226 insertions(+), 71 deletions(-)

diff --git a/src/views/system/UserList.vue b/src/views/system/UserList.vue
index 73dceb5..0e25598 100644
--- a/src/views/system/UserList.vue
+++ b/src/views/system/UserList.vue
@@ -7,55 +7,33 @@
         <a-row :gutter="24">
 
           <a-col :md="6" :sm="12">
-            <a-form-item label="璐﹀彿">
+            <a-form-item label="鐢ㄦ埛璐﹀彿">
               <!--<a-input placeholder="璇疯緭鍏ヨ处鍙锋煡璇�" v-model="queryParam.username"></a-input>-->
               <j-input placeholder="杈撳叆璐﹀彿妯$硦鏌ヨ" v-model="queryParam.username"></j-input>
             </a-form-item>
           </a-col>
 
+
           <a-col :md="6" :sm="8">
-            <a-form-item label="鎬у埆">
-              <a-select v-model="queryParam.sex" placeholder="璇烽�夋嫨鎬у埆">
-                <a-select-option value="">璇烽�夋嫨</a-select-option>
-                <a-select-option value="1">鐢�</a-select-option>
-                <a-select-option value="2">濂�</a-select-option>
-              </a-select>
+            <a-form-item label="鐢ㄦ埛濮撳悕">
+              <a-input placeholder="璇疯緭鍏ョ敤鎴峰鍚�" v-model="queryParam.realname"></a-input>
             </a-form-item>
           </a-col>
 
-
-          <template v-if="toggleSearchStatus">
-            <a-col :md="6" :sm="8">
-              <a-form-item label="鐪熷疄鍚嶅瓧">
-                <a-input placeholder="璇疯緭鍏ョ湡瀹炲悕瀛�" v-model="queryParam.realname"></a-input>
-              </a-form-item>
-            </a-col>
-
-            <a-col :md="6" :sm="8">
-              <a-form-item label="鎵嬫満鍙风爜">
-                <a-input placeholder="璇疯緭鍏ユ墜鏈哄彿鐮佹煡璇�" v-model="queryParam.phone"></a-input>
-              </a-form-item>
-            </a-col>
-
-            <a-col :md="6" :sm="8">
-              <a-form-item label="鐢ㄦ埛鐘舵��">
-                <a-select v-model="queryParam.status" placeholder="璇烽�夋嫨">
-                  <a-select-option value="">璇烽�夋嫨</a-select-option>
-                  <a-select-option value="1">姝e父</a-select-option>
-                  <a-select-option value="2">鍐荤粨</a-select-option>
-                </a-select>
-              </a-form-item>
-            </a-col>
-          </template>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="鐢ㄦ埛鐘舵��">
+              <a-select v-model="queryParam.status" placeholder="璇烽�夋嫨">
+                <a-select-option value="">璇烽�夋嫨</a-select-option>
+                <a-select-option value="1">姝e父</a-select-option>
+                <a-select-option value="2">鍐荤粨</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
 
           <a-col :md="6" :sm="8">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
               <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
-              <a @click="handleToggleSearch" style="margin-left: 8px">
-                {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }}
-                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
-              </a>
             </span>
           </a-col>
 
@@ -114,7 +92,7 @@
         :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         @change="handleTableChange">
 
-        <template slot="avatarslot" slot-scope="text, record, index">
+        <template slot="avatarslot" slot-scope="text, record">
           <div class="anty-img-wrap">
             <a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>
           </div>
@@ -178,6 +156,7 @@
 </template>
 
 <script>
+
   import UserModal from './modules/UserModal'
   import PasswordModal from './modules/PasswordModal'
   import {putAction,getFileAccessHttpUrl} from '@/api/manage';
@@ -188,6 +167,7 @@
   import UserRecycleBinModal from './modules/UserRecycleBinModal'
   import JSuperQuery from '@/components/jeecg/JSuperQuery'
   import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton'
+  import {mapActions} from 'vuex'
 
   export default {
     name: "UserList",
@@ -233,41 +213,42 @@
           {
             title: '澶村儚',
             align: "center",
-            width: 120,
+            width: 80,
             dataIndex: 'avatar',
             scopedSlots: {customRender: "avatarslot"}
           },
 
+          // {
+          //   title: '鎬у埆',
+          //   align: "center",
+          //   width: 80,
+          //   dataIndex: 'sex_dictText',
+          //   sorter: true
+          // },
+          // {
+          //   title: '鐢熸棩',
+          //   align: "center",
+          //   width: 100,
+          //   dataIndex: 'birthday'
+          // },
+          // {
+          //   title: '鎵嬫満鍙风爜',
+          //   align: "center",
+          //   width: 100,
+          //   dataIndex: 'phone'
+          // },
+          // {
+          //   title: '閮ㄩ棬',
+          //   align: "center",
+          //   width: 240,
+          //   dataIndex: 'orgCodeTxt'
+          // },
           {
-            title: '鎬у埆',
+            title: '杞﹂棿',
             align: "center",
-            width: 80,
-            dataIndex: 'sex_dictText',
-            sorter: true
-          },
-          {
-            title: '鐢熸棩',
-            align: "center",
-            width: 100,
-            dataIndex: 'birthday'
-          },
-          {
-            title: '鎵嬫満鍙风爜',
-            align: "center",
-            width: 100,
-            dataIndex: 'phone'
-          },
-          {
-            title: '閮ㄩ棬',
-            align: "center",
-            width: 180,
-            dataIndex: 'orgCodeTxt'
-          },
-          {
-            title: '璐熻矗閮ㄩ棬',
-            align: "center",
-            width: 180,
-            dataIndex: 'departIds_dictText'
+            width: 240,
+            dataIndex: 'productionName',
+            ellipsis: true,
           },
           {
             title: '鐘舵��',
@@ -278,12 +259,14 @@
           {
             title: '鎿嶄綔',
             dataIndex: 'action',
-            scopedSlots: {customRender: 'action'},
+            scopedSlots: { customRender: 'action' },
             align: "center",
-            width: 170
-          }
+            width: 80
+          },
+
 
         ],
+        isDepartType:'',
         superQueryFieldList: [
           { type: 'input', value: 'username', text: '鐢ㄦ埛璐﹀彿', },
           { type: 'input', value: 'realname', text: '鐢ㄦ埛濮撳悕', },
@@ -304,14 +287,180 @@
         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: '鐢ㄦ埛璐﹀彿',
+                  align: "center",
+                  dataIndex: 'username',
+                  width: 120,
+                  sorter: true
+                },
+                {
+                  title: '鐢ㄦ埛濮撳悕',
+                  align: "center",
+                  width: 100,
+                  dataIndex: 'realname',
+                },
+                {
+                  title: '澶村儚',
+                  align: "center",
+                  width: 80,
+                  dataIndex: 'avatar',
+                  scopedSlots: {customRender: "avatarslot"}
+                },
+
+                // {
+                //   title: '鎬у埆',
+                //   align: "center",
+                //   width: 80,
+                //   dataIndex: 'sex_dictText',
+                //   sorter: true
+                // },
+                // {
+                //   title: '鐢熸棩',
+                //   align: "center",
+                //   width: 100,
+                //   dataIndex: 'birthday'
+                // },
+                // {
+                //   title: '鎵嬫満鍙风爜',
+                //   align: "center",
+                //   width: 100,
+                //   dataIndex: 'phone'
+                // },
+                {
+                  title: '杞﹂棿',
+                  align: "center",
+                  width: 240,
+                  dataIndex: 'productionName',
+                  ellipsis: true,
+                },
+                {
+                  title: '鐘舵��',
+                  align: "center",
+                  width: 80,
+                  dataIndex: 'status_dictText'
+                },
+                {
+                  title: '鎿嶄綔',
+                  dataIndex: 'action',
+                  scopedSlots: { customRender: 'action' },
+                  align: "center",
+                  width: 80
+                },
+
+
+              ]
+            }else{
+              this.columns= [
+                {
+                  title: '鐢ㄦ埛璐﹀彿',
+                  align: "center",
+                  dataIndex: 'username',
+                  width: 120,
+                  sorter: true
+                },
+                {
+                  title: '鐢ㄦ埛濮撳悕',
+                  align: "center",
+                  width: 100,
+                  dataIndex: 'realname',
+                },
+                {
+                  title: '澶村儚',
+                  align: "center",
+                  width: 80,
+                  dataIndex: 'avatar',
+                  scopedSlots: {customRender: "avatarslot"}
+                },
+
+                // {
+                //   title: '鎬у埆',
+                //   align: "center",
+                //   width: 80,
+                //   dataIndex: 'sex_dictText',
+                //   sorter: true
+                // },
+                // {
+                //   title: '鐢熸棩',
+                //   align: "center",
+                //   width: 100,
+                //   dataIndex: 'birthday'
+                // },
+                // {
+                //   title: '鎵嬫満鍙风爜',
+                //   align: "center",
+                //   width: 100,
+                //   dataIndex: 'phone'
+                // },
+                {
+                  title: '閮ㄩ棬',
+                  align: "center",
+                  width: 240,
+                  dataIndex: 'orgCodeTxt'
+                },
+                {
+                  title: '杞﹂棿',
+                  align: "center",
+                  width: 240,
+                  dataIndex: 'productionName',
+                  ellipsis: true,
+                },
+                {
+                  title: '鐝粍',
+                  align: "center",
+                  width: 240,
+                  dataIndex: 'teamId_dictText'
+                },
+                {
+                  title: '鐘舵��',
+                  align: "center",
+                  width: 80,
+                  dataIndex: 'status_dictText'
+                },
+                {
+                  title: '鎿嶄綔',
+                  dataIndex: 'action',
+                  scopedSlots: { customRender: 'action' },
+                  align: "center",
+                  width: 80
+                }
+
+
+              ]
+            }
+
+          } else {
+            // this.$message.warn(res.message)
+            this.$notification.warning({
+              message:'娑堟伅',
+              description:res.message
+            });
+          }
+        }).finally(() =>{
+        })
+      },
       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 = "";
@@ -364,10 +513,16 @@
         }
         frozenBatch({ids: id, status: status}).then((res) => {
           if (res.success) {
-            that.$message.success(res.message);
+            that.$notification.success({
+              message:'娑堟伅',
+              description:res.message
+            });
             that.loadData();
           } else {
-            that.$message.warning(res.message);
+            that.$notification.warning({
+              message:'娑堟伅',
+              description:res.message
+            });
           }
         });
       },

--
Gitblit v1.9.3