فهرست منبع

Merge branch 'develop' of http://git.zanxiangnet.com/wjx/ad-manage

shenwu 2 سال پیش
والد
کامیت
78a933a9fd
3فایلهای تغییر یافته به همراه24 افزوده شده و 10 حذف شده
  1. 12 8
      src/pages/launchSystemNew/account/appointPut.tsx
  2. 4 2
      src/pages/launchSystemNew/account/index.tsx
  3. 8 0
      src/services/launchAdq/adq.ts

+ 12 - 8
src/pages/launchSystemNew/account/appointPut.tsx

@@ -40,16 +40,20 @@ const AppointPut: React.FC<Props> = (props) => {
             let res = allOfMember?.data || await allOfMember.run()
             if (res?.data) {
                 let useAll: any = []
-                res?.data?.forEach((item: { key: { userId: any; nickName: any; }; value: any[]; }) => {
+                res?.data?.forEach((item: any) => {
                     let obj = {
-                        key: item.key.userId,
-                        label: item.key.nickName
-                    }
-                    if (item?.value) {
-                        obj['childrenarr'] = item?.value?.map(item => {
-                            return { key: item.accountId + '_' + item.id, label: item?.remark ? item.accountId + '_' + item?.remark : item.accountId }
-                        })
+                        key: item.userId,
+                        label: item.nickname
                     }
+                    // let obj = {
+                    //     key: item.key.userId,
+                    //     label: item.key.nickName
+                    // }
+                    // if (item?.value) {
+                    //     obj['childrenarr'] = item?.value?.map(item => {
+                    //         return { key: item.accountId + '_' + item.id, label: item?.remark ? item.accountId + '_' + item?.remark : item.accountId }
+                    //     })
+                    // }
                     useAll.push(obj)
                 })
                 setUserAll(useAll)

+ 4 - 2
src/pages/launchSystemNew/account/index.tsx

@@ -11,7 +11,7 @@ import GroupLeft from './groupLeft'
 import QQAuth from './qqAuto'
 import { MenuFoldOutlined, MenuUnfoldOutlined, PlusOutlined, SwapOutlined } from '@ant-design/icons'
 import TeamMembers from '../components/teamMembers'
-import { getAdAccountAllOfMember } from '@/services/launchAdq/adq'
+import { getAdAccountAllOfMember, getErpUserAll } from '@/services/launchAdq/adq'
 import AddAccountToGroup from './addAccountToGroup'
 import { delAccountToGroupApi } from '@/services/launchAdq/subgroup'
 import { useModel } from 'umi'
@@ -59,10 +59,12 @@ const AdAuthorize: React.FC = () => {
     const delAccountToGroup = useAjax((params) => delAccountToGroupApi(params))
     const getAdAccountList = useAjax((params) => getAdAccountListApi(params), { formatResult: true })
     const allOfMember = useAjax(() => getAdAccountAllOfMember(), { formatResult: true })
+    const erpUserALL = useAjax(() => getErpUserAll(), { formatResult: true })
     /*************************/
 
     useEffect(() => {
         groupListInit()
+        !erpUserALL.data  && erpUserALL.run()
     }, [])
 
     useEffect(() => {
@@ -234,7 +236,7 @@ const AdAuthorize: React.FC = () => {
         {/* 切号 */}
         {checkAccShow && <CheckAccount value={data} visible={checkAccShow} onChange={() => { getList(); setCheckAccShow(false); setSelectAccData([]) }} onClose={() => { setCheckAccShow(false) }} />}
         {/* 指派 */}
-        {puShow && <AppointPut value={puData} visible={puShow} onClose={() => { setPuShow(false) }} allOfMember={allOfMember} onChange={() => { setPuShow(false); getAdAccountList.refresh(); setSelectAccData([]) }} />}
+        {puShow && <AppointPut value={puData} visible={puShow} onClose={() => { setPuShow(false) }} allOfMember={erpUserALL} onChange={() => { setPuShow(false); getAdAccountList.refresh(); setSelectAccData([]) }} />}
 
         {remarkData.visible && <Modal
             visible={remarkData.visible}

+ 8 - 0
src/services/launchAdq/adq.ts

@@ -7,6 +7,14 @@ import { api } from '../api';
 export async function getAdAccountAllOfMember() {
   return request(api + '/adq/adAccount/allOfMember');
 }
+/***
+ * 无权限限制获取全部用户列表
+ * 
+ */ 
+export async function getErpUserAll(){
+  return request(api+`/erp/user/all`)
+}
+
 
 /**
  * 获取ADQ账号列表