lilei 3 лет назад
Родитель
Сommit
a81b0f891e
2 измененных файлов с 7 добавлено и 4 удалено
  1. 1 1
      src/utils/request.js
  2. 6 3
      src/views/common/dingDepartUser.js

+ 1 - 1
src/utils/request.js

@@ -8,7 +8,7 @@ import { VueAxios } from './axios'
 // 创建 axios 实例
 const service = axios.create({
   baseURL: process.env.VUE_APP_API_BASE_URL, // api base_url
-  timeout: 1000000 // 请求超时时间
+  timeout: 6000000 // 请求超时时间
 })
 
 const err = (error) => {

+ 6 - 3
src/views/common/dingDepartUser.js

@@ -2,7 +2,6 @@ import { getDingTalkAllDeptUser, refashDingTalkAllDeptUser } from '@/api/expense
 const DingDepartUser = {
   template: `
       <a-tree-select
-          :disabled="disabled"
           :value="defaultVal"
           tree-data-simple-mode
           style="width: 100%"
@@ -77,8 +76,11 @@ const DingDepartUser = {
             disableCheckbox: true,
             checkable: false
           }
-          if(item.deptUserList||item.deptList){
-            node.children = this.formatData(item.deptUserList||item.deptList,item.deptList?'bm':'yg')
+          if(item.deptUserList){
+            node.children = this.formatData(item.deptUserList,'yg')
+          }
+          if(item.deptList){
+            node.children = this.formatData(item.deptList,'bm')
           }
           ret.push(node)
         }else{
@@ -102,6 +104,7 @@ const DingDepartUser = {
     // 获取部门人员
     async genTreeNode() {
        let ret = await getDingTalkAllDeptUser().then(res => res.data)
+       console.log(ret)
        const res1 = ret.deptList||[]
        const res2 = ret.deptUserList||[]
        this.treeData = this.treeData.concat(this.formatData(res1,'bm')).concat(this.formatData(res2,'yg'));