From ee6c8a0cfe0120a394d229d6f18e51f907c7973f Mon Sep 17 00:00:00 2001 From: zhengpengju Date: Mon, 24 Jan 2022 15:20:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=BA=E6=9E=84=E9=80=89=E6=8B=A9=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=A4=9A=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/src/pages/training/option/index.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/admin/src/pages/training/option/index.tsx b/admin/src/pages/training/option/index.tsx index bf705e1..a38fbe5 100644 --- a/admin/src/pages/training/option/index.tsx +++ b/admin/src/pages/training/option/index.tsx @@ -101,7 +101,7 @@ const getJsonTree = (data: [], pId: number) => { //console.log('f') //console.log('node?.pId',node?.pId) //console.log('pId',pId) - if (node?.pId === pId) { + if (node?.pId === Number(pId)) { console.log('if') const treeNode: children = {}; treeNode.value = node?.id; @@ -154,15 +154,20 @@ const TableList: React.FC = () => { { title: '培训对象', valueType: 'treeSelect', + fieldProps: (form, config)=>{ + return {multiple: true} + }, dataIndex: 'org_names', request: async () => { const Value = await queryValueByKey({}); const orgId = Value['common.org.id'] ? Value['common.org.id'] : 0; // 平台全局设置 const tree = await queryOrgTree({ - org_id: orgId, + org_id: Number(orgId), org_type: 2, school_type:1, }) + console.log('orgId', orgId) + console.log('tree.table_List', tree.table_List) return getJsonTree(tree.table_List, orgId) }, sorter: false,