Răsfoiți Sursa

选择营业部的bug

chenlei 2 săptămâni în urmă
părinte
comite
7cba4f45cb

+ 4 - 0
src/api/system/user.js

@@ -33,6 +33,10 @@ export default {
   allUserForDepart:params=>{
     return get('/seller/list',params)
   },
+  // 获取系统中所有用户 按部门分级
+  sellerUserTree:params=>{
+    return get('/seller/user_tree',params)
+  },
   // 系统用户修改密码
   modifyPwd:params=>{
     return post('/sys_user/reset_my_pass',params)

+ 8 - 8
src/components/AllUserForDepart.vue

@@ -36,18 +36,18 @@ function formatData(arr){
       item.disabled=!item.SysUserId&&!item.ChildrenList?true:false
     }
     
-    if(item.ChildrenList){
-      formatData(item.ChildrenList)
+    if(item.Children){
+      formatData(item.Children)
     }
   });
   return arr
 }
 
 async function getData(){
-  const res=await apiSystemUser.allUserForDepart({AllEnabled:false})//true显示所有销售(包含被禁用的)false表示仅显示启用的用户,默认false
+  const res=await apiSystemUser.sellerUserTree()//true显示所有销售(包含被禁用的)false表示仅显示启用的用户,默认false
   if(res.Ret!=200) return
-  const arr=res.Data.List||[]
-  options.value=formatData(arr)
+  const arr=res.Data||[]
+  options.value = arr
 }
 getData()
 
@@ -60,9 +60,9 @@ function handleChange(){
   <el-cascader
     :options="options"
     :props="{
-      value: 'value',
-      label: 'label',
-      children: 'ChildrenList',
+      value: 'NodeId',
+      label: 'NodeName',
+      children: 'Children',
       ...props.props
     }"
     v-model="model"

+ 0 - 1
src/views/customer/UserList.vue

@@ -349,7 +349,6 @@ function handleGoReadTimes(e){
             style="width: 100%"
             :props="{
               emitPath: false,
-              checkStrictly: true,
               multiple: true,
             }"
             :filterable="true"