فهرست منبع

fix:功能权限加载状态

snow 1 سال پیش
والد
کامیت
5accaa2d10

+ 3 - 1
src/apis/service/serviceParam/organize/index.js

@@ -2,6 +2,8 @@
 import http from "@/apis/axios";
 const api = "admin/customer_item/";
 
+const cusAPI = "admin/customer/"
+
 export default {
     // 列表
     list: (data, params) => http(api + "list", data, "post", params),
@@ -18,7 +20,7 @@ export default {
 
 
     // 企业新建
-    qadd: (data, params) => http(api + "customarcreate", data, "post", params),
+    qadd: (data, params) => http(cusAPI + "create", data, "post", params),
     // 企业更新
     qupdate: (data, params) => http(api + "customaredit", data, "post", params),
     // 企业详情

+ 3 - 19
src/views/serviceParam/organize/addEdit.vue

@@ -144,14 +144,6 @@ export default {
             trigger: 'change'
           }
         ],
-        code: [
-          {
-            required: true,
-            message: '企业所在区域不能为空',
-            trigger: 'blur',
-            validator: validator.bind(this)
-          }
-        ],
         name: [
           {
             required: true,
@@ -161,7 +153,7 @@ export default {
         ],
         companyName: [
           {
-            required: false,
+            required: true,
             message: '企业名称不能为空',
             trigger: 'blur'
           }
@@ -343,18 +335,10 @@ export default {
               res = await asyncRequest.zupdate(zitem)
             }
           } else {
-            if (this.tableData.length === 0) {
-              this.$message.warning('至少填写一个联系人!')
-              this.loading = false
-              return
-            }
             const qitem = {
               id: id,
-              parent: pid,
-              branch: this.area === '0' ? '0' : this.branch,
-              middle: this.area === '0' ? '0' : this.middle,
-              area: this.area === '0' ? '不限区域' : area,
-              customer_member: this.getCustomer()
+              itemid: pid,
+              companyName: this.ruleForm.companyName
             }
             if (this.isDetail === '003') {
               delete qitem['id']

+ 4 - 2
src/views/system/action/index.vue

@@ -406,11 +406,13 @@ export default {
 
       if (res && res.code === 1 && res.data) {
         let resD = res.data
-        this.action = res.data.action
+        this.action = Array.isArray(res.data) ? res.data : res.data.action
         this.ruleForm = resD;
-
         this.refreshRoleCheckAllStatus();
       } 
+
+      console.log(this.isBtnDisabled)
+
       this.isBtnDisabled = false;
     },
     // 初始化功能权限列表

+ 1 - 1
src/views/system/setBtn/index.vue

@@ -262,7 +262,7 @@ export default {
       resolve(data.map(item => ({ ...item, isLeaf: true })))
       const hasFisrtChildren = pid === this.defaultExpandKeys[0] && data.length > 0
       if(hasFisrtChildren && this.isInit){
-        this.handleNodeClick(data[0], 1)
+        await this.handleNodeClick(data[0], 1)
         this.isInit = false
       }
     },