Rorschach vor 5 Jahren
Ursprung
Commit
51158143a8
4 geänderte Dateien mit 26 neuen und 44 gelöschten Zeilen
  1. 23 35
      src/api/teamApi.js
  2. 1 3
      src/pages/customer/index.vue
  3. 1 3
      src/pages/provider/index.vue
  4. 1 3
      src/pages/team/index.vue

+ 23 - 35
src/api/teamApi.js

@@ -1,44 +1,32 @@
 import request from 'utils/request'
-import { baseApi } from 'utils/config' 
-import {fetch,post,put} from 'utils/http';
+import {
+  baseApi
+} from 'utils/config'
+import {
+  fetch,
+  post,
+  put
+} from 'utils/http';
 
 //获取部门信息
-export function getTeamList (type) {
-  return fetch('manageBase/dept/tree',{deptId: 12345,type: type})
-  // return request({
-  //   url: baseApi + 'manageBase/dept/tree',
-  //   method: 'get',
-  //   params: {
-  //     deptId
-  //   }
-  // })
+export function getTeamList(deptId, type) {
+  return fetch('manageBase/dept/tree', {
+    deptId: deptId,
+    type: type
+  })
 }
 //获取子部门信息
-export function getTeamChildList (deptId,type) {
-  return fetch('manageBase/dept/child',{deptId: deptId,type:type})
-  // return request({
-  //   url: baseApi + 'manageBase/dept/child',
-  //   method: 'get',
-  //   params: {
-  //     deptId
-  //   }
-  // })
+export function getTeamChildList(deptId, type) {
+  return fetch('manageBase/dept/child', {
+    deptId: deptId,
+    type: type
+  })
 }
 //新增部门
-export function addTeam (data) {
-  return post('manageBase/dept',data)
-  // return request({
-  //   url: baseApi + 'manageBase/dept',
-  //   method: 'post',
-  //   data,
-  // })
+export function addTeam(data) {
+  return post('manageBase/dept', data)
 }
 //修改部门
-export function setTeam (data) {
-  return put('manageBase/dept',data)
-  // return request({
-  //   url: baseApi + 'manageBase/dept',
-  //   method: 'put',
-  //   data,
-  // })
-}
+export function setTeam(data) {
+  return put('manageBase/dept', data)
+}

+ 1 - 3
src/pages/customer/index.vue

@@ -142,9 +142,7 @@ export default {
     }
   },
   created () {
-    getTeamList('PARTNER').then(res => {
-      console.log(res.data)
-      console.log(res.data.children[0].children)
+    getTeamList(12345678,'PARTNER').then(res => {
       this.teamData.push(res.data)
     });
   },

+ 1 - 3
src/pages/provider/index.vue

@@ -142,9 +142,7 @@ export default {
     }
   },
   created () {
-    getTeamList('OTHERS').then(res => {
-      console.log(res.data)
-      console.log(res.data.children[0].children)
+    getTeamList(1234567,'OTHERS').then(res => {
       this.teamData.push(res.data)
     });
   },

+ 1 - 3
src/pages/team/index.vue

@@ -142,9 +142,7 @@ export default {
     }
   },
   created () {
-    getTeamList('COMPANY').then(res => {
-      console.log(res.data)
-      console.log(res.data.children[0].children)
+    getTeamList(123456,'COMPANY').then(res => {
       this.teamData.push(res.data)
     });
   },