添加徽章

This commit is contained in:
a0049873 2022-07-14 17:33:01 +08:00
parent bf6676dd06
commit 85dbc018b0
1 changed files with 34 additions and 3 deletions

View File

@ -374,6 +374,8 @@
} }
// //
const changeType = (item, index) => { const changeType = (item, index) => {
num.value = []
showType.value = ''
console.log(item, index) console.log(item, index)
tabIndex.value = 0 tabIndex.value = 0
ended.value = '' ended.value = ''
@ -496,13 +498,13 @@
finished: 0, finished: 0,
unfinished: 0, unfinished: 0,
}) })
const initNum = (name) => { const initNum = () => {
num.value = [] num.value = []
getMyProcessInstancePage({ getMyProcessInstancePage({
page: 1, page: 1,
limit: 4, limit: 4,
ended: 'false', ended: 'false',
name: name, processDefinitionKey: processDefinitionKey.value,
}).then((res) => { }).then((res) => {
if (res.data.code == 0) { if (res.data.code == 0) {
num.value.unfinished = res.data.data.total num.value.unfinished = res.data.data.total
@ -510,7 +512,28 @@
page: 1, page: 1,
limit: 4, limit: 4,
ended: 'true', 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) => { }).then((res) => {
if (res.data.code == 0) { if (res.data.code == 0) {
num.value.finished = res.data.data.total num.value.finished = res.data.data.total
@ -524,6 +547,7 @@
const showType = ref('') const showType = ref('')
const page = ref('1') const page = ref('1')
const ended = ref('') const ended = ref('')
const processDefinitionKey = ref('')
// //
const onSearch = (name) => { const onSearch = (name) => {
console.log(name.value) console.log(name.value)
@ -547,20 +571,25 @@
contentList.data = res.data.data.list contentList.data = res.data.data.list
total.value = res.data.data.total total.value = res.data.data.total
showType.value = '能力申请' showType.value = '能力申请'
initNum2()
}) })
} else if (typeIndex.value !== 1) { } else if (typeIndex.value !== 1) {
switch (typeIndex.value) { switch (typeIndex.value) {
case 2: case 2:
params.processDefinitionKey = 'resourcemountapply' params.processDefinitionKey = 'resourcemountapply'
processDefinitionKey.value = 'resourcemountapply'
break break
case 3: case 3:
params.processDefinitionKey = 'resourcundercarriageapply' params.processDefinitionKey = 'resourcundercarriageapply'
processDefinitionKey.value = 'resourcundercarriageapply'
break break
case 4: case 4:
params.processDefinitionKey = 'abilitydemandapply' params.processDefinitionKey = 'abilitydemandapply'
processDefinitionKey.value = 'abilitydemandapply'
break break
case 5: case 5:
params.processDefinitionKey = 'comment_review' params.processDefinitionKey = 'comment_review'
processDefinitionKey.value = 'comment_review'
break break
} }
getMyProcessInstancePage(params).then((res) => { getMyProcessInstancePage(params).then((res) => {
@ -569,6 +598,7 @@
console.log(res.data.data.list) console.log(res.data.data.list)
contentList.data = res.data.data.list contentList.data = res.data.data.list
total.value = res.data.data.total total.value = res.data.data.total
initNum()
switch (typeIndex.value) { switch (typeIndex.value) {
case 2: case 2:
contentList.data.map((val) => { contentList.data.map((val) => {
@ -641,6 +671,7 @@
}) })
} else { } else {
contentList.data = [] contentList.data = []
num.value = []
showType.value = '' showType.value = ''
} }
} }