From 85dbc018b0e9255bb6ee5927451e38f1d6cd318b Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Thu, 14 Jul 2022 17:33:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BE=BD=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../personalCenter/components/MyApply.vue | 37 +++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/front/src/views/personalCenter/components/MyApply.vue b/front/src/views/personalCenter/components/MyApply.vue index 97e86943..73ed4267 100644 --- a/front/src/views/personalCenter/components/MyApply.vue +++ b/front/src/views/personalCenter/components/MyApply.vue @@ -374,6 +374,8 @@ } // 选择类型 const changeType = (item, index) => { + num.value = [] + showType.value = '' console.log(item, index) tabIndex.value = 0 ended.value = '' @@ -496,13 +498,13 @@ finished: 0, unfinished: 0, }) - const initNum = (name) => { + const initNum = () => { num.value = [] getMyProcessInstancePage({ page: 1, limit: 4, ended: 'false', - name: name, + processDefinitionKey: processDefinitionKey.value, }).then((res) => { if (res.data.code == 0) { num.value.unfinished = res.data.data.total @@ -510,7 +512,28 @@ page: 1, limit: 4, ended: 'true', - name: name, + processDefinitionKey: processDefinitionKey.value, + }).then((res) => { + if (res.data.code == 0) { + num.value.finished = res.data.data.total + } + }) + } + }) + } + const initNum2 = () => { + num.value = [] + getTabilityapplication({ + page: 1, + limit: 4, + ended: 'false', + }).then((res) => { + if (res.data.code == 0) { + num.value.unfinished = res.data.data.total + getTabilityapplication({ + page: 1, + limit: 4, + ended: 'true', }).then((res) => { if (res.data.code == 0) { num.value.finished = res.data.data.total @@ -524,6 +547,7 @@ const showType = ref('') const page = ref('1') const ended = ref('') + const processDefinitionKey = ref('') // 搜索框 const onSearch = (name) => { console.log(name.value) @@ -547,20 +571,25 @@ contentList.data = res.data.data.list total.value = res.data.data.total showType.value = '能力申请' + initNum2() }) } else if (typeIndex.value !== 1) { switch (typeIndex.value) { case 2: params.processDefinitionKey = 'resourcemountapply' + processDefinitionKey.value = 'resourcemountapply' break case 3: params.processDefinitionKey = 'resourcundercarriageapply' + processDefinitionKey.value = 'resourcundercarriageapply' break case 4: params.processDefinitionKey = 'abilitydemandapply' + processDefinitionKey.value = 'abilitydemandapply' break case 5: params.processDefinitionKey = 'comment_review' + processDefinitionKey.value = 'comment_review' break } getMyProcessInstancePage(params).then((res) => { @@ -569,6 +598,7 @@ console.log(res.data.data.list) contentList.data = res.data.data.list total.value = res.data.data.total + initNum() switch (typeIndex.value) { case 2: contentList.data.map((val) => { @@ -641,6 +671,7 @@ }) } else { contentList.data = [] + num.value = [] showType.value = '' } }