From 8e75a78f55d60565eb48b25eafd4eb07939ce2cc Mon Sep 17 00:00:00 2001
From: zenglf <18502938215@163.com>
Date: 星期四, 28 九月 2023 14:09:05 +0800
Subject: [PATCH] Merge branch 'master' into develop

---
 src/views/system/DepartList.vue |   87 ++++++++++++++++++++++++++++++++++++-------
 1 files changed, 73 insertions(+), 14 deletions(-)

diff --git a/src/views/system/DepartList.vue b/src/views/system/DepartList.vue
index 25b23eb..c9446ce 100644
--- a/src/views/system/DepartList.vue
+++ b/src/views/system/DepartList.vue
@@ -106,10 +106,11 @@
             </a-empty>
           </a-card>
         </a-tab-pane>
-        <!--<a-tab-pane tab="閮ㄩ棬鏉冮檺" key="2" forceRender>-->
+        <a-tab-pane tab="閮ㄩ棬鏉冮檺" key="2" forceRender>
           <!--<depart-auth-modal ref="departAuth"/>-->
-        <!--</a-tab-pane>-->
-        <a-tab-pane tab="璁惧鍒楄〃" key="2" forceRender>
+          <depart-m-auth-modal ref="departMAuth"></depart-m-auth-modal>
+        </a-tab-pane>
+        <a-tab-pane v-if="isDepartType == 0" tab="璁惧鍒楄〃" key="3" forceRender>
           <depart-auth-modal ref="departAuth"/>
         </a-tab-pane>
       </a-tabs>
@@ -119,11 +120,15 @@
   </a-row>
 </template>
 <script>
+  import {mapActions} from 'vuex'
+  import DepartMModal from './modules/DepartModal'
   import DepartModal from './modules/DepartList/DepartModal'
   import {queryDepartTreeList, searchByKeywords, deleteByDepartId} from '@/api/api'
   import {httpAction, deleteAction} from '@/api/manage'
   import {JeecgListMixin} from '@/mixins/JeecgListMixin'
   import DepartAuthModal from './modules/DepartList/DepartAuthModal'
+  import DepartMAuthModal from './modules/DepartAuthModal'
+
   // 琛ㄥご
   const columns = [
     {
@@ -168,10 +173,13 @@
     mixins: [JeecgListMixin],
     components: {
       DepartAuthModal,
-      DepartModal
+      DepartModal,
+      DepartMModal,
+      DepartMAuthModal
     },
     data() {
       return {
+        isDepartType:"",
         iExpandedKeys: [],
         loading: false,
         autoExpandParent: true,
@@ -229,6 +237,21 @@
       }
     },
     methods: {
+      ...mapActions(['QueryDepartTree']),
+      queryTreeData() {
+        this.QueryDepartTree().then(res => {
+          if (res.success) {
+            this.isDepartType = res.result[0].value
+          } else {
+            // this.$message.warn(res.message)
+            this.$notification.warning({
+              message:'娑堟伅',
+              description:res.message
+            });
+          }
+        }).finally(() =>{
+        })
+      },
       loadData() {
         this.refresh();
       },
@@ -293,9 +316,12 @@
         this.$refs.nodeModal.add(this.currFlowId, '')
       },
       batchDel: function () {
-        console.log(this.checkedKeys)
         if (this.checkedKeys.length <= 0) {
-          this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒')
+          // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒')
+          this.$notification.warning({
+            message:'娑堟伅',
+            description:"璇烽�夋嫨涓�鏉¤褰�"
+          });
         } else {
           var ids = ''
           for (var a = 0; a < this.checkedKeys.length; a++) {
@@ -308,11 +334,19 @@
             onOk: function () {
               deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => {
                 if (res.success) {
-                  that.$message.success(res.message)
+                  // that.$message.success(res.message)
+                  that.$notification.warning({
+                    message:'娑堟伅',
+                    description:res.message
+                  });
                   that.loadTree()
                   that.onClearSelected()
                 } else {
-                  that.$message.warning(res.message)
+                  // that.$message.warning(res.message)
+                  that.$notification.warning({
+                    message:'娑堟伅',
+                    description:res.message
+                  });
                 }
               })
             }
@@ -330,7 +364,11 @@
                 that.departTree.push(temp)
               }
             } else {
-              that.$message.warning(res.message)
+              // that.$message.warning(res.message)
+              that.$notification.warning({
+                message:'娑堟伅',
+                description:res.message
+              });
             }
           })
         } else {
@@ -368,7 +406,11 @@
         this.selectedKeys = [record.key]
         this.model.parentId = record.parentId
         this.setValuesToForm(record)
-        this.$refs.departAuth.show(record.id);
+        if(this.isDepartType == 0){
+          this.$refs.departAuth.show(record.id);
+        }
+
+        this.$refs.departMAuth.show(record.id)
 
       },
       // 瑙﹀彂onSelect浜嬩欢鏃�,涓洪儴闂ㄦ爲鍙充晶鐨刦orm琛ㄥ崟璧嬪��
@@ -387,7 +429,11 @@
         this.checkedKeys = []
         this.currSelected = {}
         this.selectedKeys = []
-        this.$refs.departAuth.departId = ''
+        if(this.isDepartType == 0){
+          this.$refs.departAuth.departId = ''
+
+        }
+        this.$refs.departMAuth.departId = ''
       },
       handleNodeTypeChange(val) {
         this.currSelected.nodeType = val
@@ -402,16 +448,28 @@
         this.$refs.form.validate(valid => {
           if (valid) {
             if (!this.currSelected.id) {
-              this.$message.warning('璇风偣鍑婚�夋嫨瑕佷慨鏀归儴闂�!')
+              // this.$message.warning('璇风偣鍑婚�夋嫨瑕佷慨鏀归儴闂�!')
+              this.$notification.warning({
+                message:'娑堟伅',
+                description:"璇风偣鍑婚�夋嫨瑕佷慨鏀归儴闂�"
+              });
               return
             }
 
             httpAction(this.url.edit, this.currSelected, 'put').then((res) => {
               if (res.success) {
-                this.$message.success('淇濆瓨鎴愬姛!')
+                // this.$message.success('淇濆瓨鎴愬姛!')
+                this.$notification.warning({
+                  message:'娑堟伅',
+                  description:"淇濆瓨鎴愬姛"
+                });
                 this.loadTree()
               } else {
-                this.$message.error(res.message)
+                // this.$message.error(res.message)
+                this.$notification.warning({
+                  message:'娑堟伅',
+                  description:res.message
+                });
               }
             })
           }
@@ -529,6 +587,7 @@
 
     },
     created() {
+      this.queryTreeData()
       this.currFlowId = this.$route.params.id
       this.currFlowName = this.$route.params.name
       // this.loadTree()

--
Gitblit v1.9.3