From e5498c84797de1a07bbd0a8584dc4d14cabcc693 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期三, 31 七月 2024 15:05:03 +0800
Subject: [PATCH] 1、新增统计分析和报警分析页面 2、调整用户管理页面字段

---
 src/views/system/UserList.vue |  239 ++++++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 208 insertions(+), 31 deletions(-)

diff --git a/src/views/system/UserList.vue b/src/views/system/UserList.vue
index 73dceb5..5a29723 100644
--- a/src/views/system/UserList.vue
+++ b/src/views/system/UserList.vue
@@ -114,7 +114,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 +178,7 @@
 </template>
 
 <script>
+
   import UserModal from './modules/UserModal'
   import PasswordModal from './modules/PasswordModal'
   import {putAction,getFileAccessHttpUrl} from '@/api/manage';
@@ -188,6 +189,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 +235,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: 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,
+            width: 240,
             dataIndex: 'orgCodeTxt'
           },
           {
-            title: '璐熻矗閮ㄩ棬',
+            title: '杞﹂棿',
             align: "center",
-            width: 180,
-            dataIndex: 'departIds_dictText'
+            width: 240,
+            dataIndex: 'productionName',
+            ellipsis: true,
           },
           {
             title: '鐘舵��',
@@ -278,12 +281,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 +309,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 +535,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