添加徽章

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) => {
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 = ''
}
}