From 19bf2f951b153090bbc63c4a551b2970c809a5d6 Mon Sep 17 00:00:00 2001 From: "joshen@zcwytd.com" Date: Wed, 2 Aug 2023 14:01:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A1=88=E4=BE=8B=E6=8E=A8=E8=8D=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CaseManage/CommonRecommend.vue | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/components/CaseManage/CommonRecommend.vue b/src/components/CaseManage/CommonRecommend.vue index 7c5e3a49..27e54cf4 100644 --- a/src/components/CaseManage/CommonRecommend.vue +++ b/src/components/CaseManage/CommonRecommend.vue @@ -406,7 +406,7 @@ const stageId = ref(); const nameSearch = ref({ keyword: "", - departId: null, + departId: '', }); const stuTreeSelectKeys = ref([]); const stuTreeExpandedKeys = ref([]); @@ -415,30 +415,30 @@ const audienceName = ref({ }); const searchOrgName = ref({ keyword: "", - page: 1, + pageNo: 1, pageSize: 10, }); const stageIds = computed(() => props.stage); -const { data: orgData, fetch: searchOrg } = useRequest( +const { data: orgData, fetchData: searchOrg } = useRequest( ORG_LIST, searchOrgName.value ); const { data: treeData, loading: orgLoading } = useRequest( ORG_LIST, { keyword: "" }, - { - init: true, - result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })), - } + // { + // init: true, + // result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })), + // } ); const { data: treeOrgData, loading: orgOrgLoading } = useRequest( ORG_LIST, { keyword: "" }, - { - init: true, - result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })), - } + // { + // init: true, + // result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })), + // } ); const projectStuColumns = ref([ @@ -597,7 +597,8 @@ function searchAudi() { function onLoadData(treeNode) { return request(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then( (r) => { - treeNode.dataRef.treeChildList = r.result.directChildList; + // treeNode.dataRef.treeChildList = r.result.directChildList; + treeNode.dataRef.treeChildList = r.data; treeData.value = [...treeData.value]; } ); @@ -606,7 +607,7 @@ function onLoadData(treeNode) { function onLoadOrgData(treeNode) { return request(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then( (r) => { - treeNode.dataRef.treeChildList = r.result.directChildList; + treeNode.dataRef.treeChildList = r.data; treeOrgData.value = [...treeOrgData.value]; } ); @@ -653,7 +654,7 @@ function orgDel(i) { const listData = reactive({ departId: '', keyword: "", - page: 1, + pageNo: 1, pageSize: 10, }) @@ -682,9 +683,9 @@ const httpList = (addOrMinus) => { userList(listData).then((res) => { if (res.status == 200) { if (!addOrMinus) { - counts.value -= res.data.result.totalElement + counts.value -= res.data.result.total } else { - counts.value += res.data.result.totalElement + counts.value += res.data.result.total } } console.log(counts.value); @@ -693,7 +694,7 @@ const httpList = (addOrMinus) => { const resetStu = () => { nameSearch.value.keyword = ""; - stuTableRef.value.reset({ keyword: "", departId: null }); + stuTableRef.value.reset({ keyword: "", departId: '' }); }; //清空选择部门信息 const deleteDepSelect = () => { @@ -823,7 +824,7 @@ watch(visiable, () => { auditTableRef.value && auditTableRef.value.clear(); auditTableRef.value && auditTableRef.value.reset({ keyword: "" }); stuTableRef.value && stuTableRef.value.clear(); - stuTableRef.value && stuTableRef.value.reset({ keyword: "", departId: null }); + stuTableRef.value && stuTableRef.value.reset({ keyword: "", departId: '' }); projectStuTableRef.value && projectStuTableRef.value.clear(); projectStuTableRef.value && projectStuTableRef.value.reset({ pid: props.infoId, type: props.infoType, studentName: "" }); }