feat: 新增需求
This commit is contained in:
@@ -103,30 +103,35 @@ const statusMap = {
|
||||
|
||||
import {
|
||||
getOperatorList,
|
||||
getFlowLaunchList
|
||||
getFlowLaunchList,
|
||||
getMyPage,
|
||||
getTodoPage,
|
||||
getDonePage,
|
||||
getCcMyPage
|
||||
} from '@/api/workFlow/template'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
mescrollTop: 206,
|
||||
statusList: [],
|
||||
|
||||
tabsList: [{
|
||||
fullName: '在办',
|
||||
fullName: '我的消息',
|
||||
category: '1',
|
||||
key: 3,
|
||||
enCode: "workFlow.flowLaunch"
|
||||
},{
|
||||
fullName: '待办任务',
|
||||
category: '2',
|
||||
key: 2,
|
||||
enCode: "workFlow.flowDoing"
|
||||
}, {
|
||||
fullName: '发起',
|
||||
category: null,
|
||||
key: 3,
|
||||
enCode: "workFlow.flowLaunch"
|
||||
}, {
|
||||
fullName: '已办',
|
||||
fullName: '已办任务',
|
||||
category: '3',
|
||||
key: 4,
|
||||
enCode: "workFlow.flowDone"
|
||||
}, {
|
||||
fullName: '抄送',
|
||||
fullName: '抄送任务',
|
||||
category: '4',
|
||||
key: 5,
|
||||
enCode: "workFlow.flowCirculate"
|
||||
@@ -147,7 +152,7 @@ export default {
|
||||
return
|
||||
}
|
||||
this.statusList = statusMap[this.tabsList[val].key]
|
||||
this.mescrollTop = 322 / 2
|
||||
this.mescrollTop = 220 / 2
|
||||
this.category = this.tabsList[this.current].category
|
||||
},
|
||||
immediate: true,
|
||||
@@ -182,9 +187,9 @@ export default {
|
||||
}
|
||||
}
|
||||
];
|
||||
configToCheck.forEach(config => {
|
||||
if (this.sysConfigInfo[config.key] === 1) return this.tabsList.unshift(config.tab);
|
||||
});
|
||||
// configToCheck.forEach(config => {
|
||||
// if (this.sysConfigInfo[config.key] === 1) return this.tabsList.unshift(config.tab);
|
||||
// });
|
||||
this.menuList = uni.getStorageSync("menuList");
|
||||
let workFlowList = this.menuList.filter(o => o.enCode === 'workFlow')
|
||||
if (!workFlowList.length) return
|
||||
@@ -203,6 +208,8 @@ export default {
|
||||
/* tab1 */
|
||||
change(index) {
|
||||
let item = this.tabsList[index]
|
||||
console.log(item,'item------------')
|
||||
console.log(index,'index------------')
|
||||
this.current = index;
|
||||
this.status = ''
|
||||
this.keyword = ''
|
||||
@@ -225,13 +232,13 @@ export default {
|
||||
},
|
||||
/* 列表数据 */
|
||||
upCallback(page) {
|
||||
let methods = this.category ? getOperatorList : getFlowLaunchList;
|
||||
let methods = this.getList(this.category)
|
||||
let query = {
|
||||
currentPage: page.num,
|
||||
pageNo: page.num,
|
||||
pageSize: page.size,
|
||||
keyword: this.keyword,
|
||||
category: this.tabsList[this.current].category,
|
||||
status: this.status
|
||||
// category: this.tabsList[this.current].category,
|
||||
// status: this.status
|
||||
}
|
||||
methods(query, {
|
||||
load: page.num == 1
|
||||
@@ -245,11 +252,32 @@ export default {
|
||||
'swipeAction': this.swipeAction(o.status),
|
||||
...o
|
||||
}))
|
||||
console.log(list,'list---')
|
||||
this.list = this.list.concat(list);
|
||||
}).catch(() => {
|
||||
this.mescroll.endErr();
|
||||
})
|
||||
},
|
||||
// 流程列表接口
|
||||
getList(category){
|
||||
let methods = ''
|
||||
console.log(category,'category---')
|
||||
switch(category){
|
||||
case '1':
|
||||
methods = getMyPage
|
||||
break;
|
||||
case '2':
|
||||
methods = getTodoPage
|
||||
break;
|
||||
case '3':
|
||||
methods = getDonePage
|
||||
break;
|
||||
case '4':
|
||||
methods = getCcMyPage
|
||||
break;
|
||||
}
|
||||
return methods
|
||||
},
|
||||
swipeAction(status) {
|
||||
let swipeAction = true
|
||||
if (this.tabsList[this.current].key === 3 && !this.category && (status == '0' || status == '9'))
|
||||
|
||||
Reference in New Issue
Block a user