|
|
@@ -69,7 +69,7 @@
|
|
|
import { reactive, ref, onMounted } from 'vue';
|
|
|
import $tab from '@/plugins/tab.js'
|
|
|
import $modal from '@/plugins/modal.js'
|
|
|
- import { getUserProcess, getUserProcessed, getUserProcessing, getUserAllProcess, cancelProcessFlow, getProcessList, getProcessFormInfo } from '@/api/process';
|
|
|
+ import { getUserProcess, getUserProcessed, getUserProcessing, getUserAllProcess, getUserCopyProcess, cancelProcessFlow, getProcessList, getProcessFormInfo } from '@/api/process';
|
|
|
import { useUserStore } from '@/store/user';
|
|
|
|
|
|
onMounted(() => {
|
|
|
@@ -178,9 +178,9 @@
|
|
|
}
|
|
|
|
|
|
// 分段器选项
|
|
|
- const items = reactive(['我的', '待办', '在办', '办结'])
|
|
|
+ const items = reactive(['我的', '抄送', '待办', '在办', '办结'])
|
|
|
// 分段器选项
|
|
|
- const current = ref(1)
|
|
|
+ const current = ref(items.findIndex(item => item == '待办'))
|
|
|
// 子组件
|
|
|
const processListRef = ref(null)
|
|
|
|
|
|
@@ -196,6 +196,13 @@
|
|
|
|
|
|
// 获取待办列表数据
|
|
|
const point = ref(0)
|
|
|
+ const requestMap = [
|
|
|
+ getUserAllProcess, // 我的
|
|
|
+ getUserCopyProcess, // 抄送
|
|
|
+ getUserProcess, // 待办
|
|
|
+ getUserProcessing, // 在办
|
|
|
+ getUserProcessed // 办结
|
|
|
+ ]
|
|
|
function getProcessData({ pageNo, pSize }, callback) {
|
|
|
const flag = point.value = new Date().getTime()
|
|
|
const params = {
|
|
|
@@ -206,17 +213,14 @@
|
|
|
control: 1,
|
|
|
queryParams: queryParams.value
|
|
|
}
|
|
|
- const requestMap = [
|
|
|
- getUserAllProcess, // 我的
|
|
|
- getUserProcess, // 待办
|
|
|
- getUserProcessing, // 在办
|
|
|
- getUserProcessed // 办结
|
|
|
- ]
|
|
|
- requestMap[current.value](params).then(({ returnParams }) => {
|
|
|
- // processes.value = returnParams.list
|
|
|
+ requestMap[current.value](params).then(( { returnParams, Rows, Total } ) => {
|
|
|
// 只加载最新数据 防止快速连续点击分段器造成数据错乱
|
|
|
if (flag == point.value) {
|
|
|
- callback(returnParams.list, returnParams.total, pageNo)
|
|
|
+ callback(
|
|
|
+ current.value == 1 ? Rows : returnParams.list,
|
|
|
+ current.value == 1 ? Total : returnParams.total,
|
|
|
+ pageNo
|
|
|
+ )
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
@@ -230,21 +234,18 @@
|
|
|
control: 1,
|
|
|
queryParams: queryParams.value
|
|
|
}
|
|
|
- const requestMap = [
|
|
|
- getUserAllProcess, // 我的
|
|
|
- getUserProcess, // 待办
|
|
|
- getUserProcessing, // 在办
|
|
|
- getUserProcessed // 办结
|
|
|
- ]
|
|
|
- requestMap[current.value](params).then(({ returnParams }) => {
|
|
|
- // processes.value.push(...returnParams.list)
|
|
|
- callback(returnParams.list, returnParams.total, pageNo)
|
|
|
+ requestMap[current.value](params).then(( { returnParams, Rows, Total } ) => {
|
|
|
+ callback(
|
|
|
+ current.value == 1 ? Rows : returnParams.list,
|
|
|
+ current.value == 1 ? Total : returnParams.total,
|
|
|
+ pageNo
|
|
|
+ )
|
|
|
})
|
|
|
}
|
|
|
// 跳转到流程详情页
|
|
|
function handleToProcessDetail({ username, insId, tinsId, insName, control }) {
|
|
|
let url = '/pages/process/detail/index?insId=' + insId + '&insName=' + insName + '&control=' + control
|
|
|
- if (tinsId) {
|
|
|
+ if (tinsId && current.value != 1) { // 排除抄送流程的tinsId
|
|
|
url = url + '&tinsId=' + tinsId
|
|
|
}
|
|
|
// console.log('url', url)
|