|
@@ -2,18 +2,18 @@
|
|
<HcCard>
|
|
<HcCard>
|
|
<template #header>
|
|
<template #header>
|
|
<div class="w-32">
|
|
<div class="w-32">
|
|
- <el-select v-model="searchForm.taskType" block clearable placeholder="任务类型" size="large">
|
|
|
|
|
|
+ <el-select v-model="searchForm.typeValue" block clearable placeholder="任务类型" size="large">
|
|
<el-option v-for="item in tasksType" :label="item.dictValue" :value="item.dictKey" />
|
|
<el-option v-for="item in tasksType" :label="item.dictValue" :value="item.dictKey" />
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
<div class="w-32 ml-3">
|
|
<div class="w-32 ml-3">
|
|
- <el-select v-model="searchForm.taskStatus" block clearable placeholder="任务状态" size="large">
|
|
|
|
|
|
+ <el-select v-model="searchForm.statusValue" block clearable placeholder="任务状态" size="large">
|
|
<el-option v-for="item in tasksStatus" :label="item.dictValue" :value="item.dictKey" />
|
|
<el-option v-for="item in tasksStatus" :label="item.dictValue" :value="item.dictKey" />
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
<div class="w-32 ml-3">
|
|
<div class="w-32 ml-3">
|
|
<el-select
|
|
<el-select
|
|
- v-model="searchForm.contractId" block clearable placeholder="合同段" size="large"
|
|
|
|
|
|
+ v-model="searchForm.contractIdValue" block clearable placeholder="合同段" size="large"
|
|
@change="ContractIdChange"
|
|
@change="ContractIdChange"
|
|
>
|
|
>
|
|
<el-option v-for="item in contractList" :label="item.contractName" :value="item.id" />
|
|
<el-option v-for="item in contractList" :label="item.contractName" :value="item.id" />
|
|
@@ -64,23 +64,16 @@
|
|
<template #taskName="{ row }">
|
|
<template #taskName="{ row }">
|
|
<span class="text-link" @click="rowTaskName(row)">{{ row?.taskName }}</span>
|
|
<span class="text-link" @click="rowTaskName(row)">{{ row?.taskName }}</span>
|
|
</template>
|
|
</template>
|
|
- <template #taskStatus="{ row }">
|
|
|
|
|
|
+ <template #taskStatusName="{ row }">
|
|
<el-tag
|
|
<el-tag
|
|
- v-if="row?.taskStatus?.statusValue"
|
|
|
|
- :type="`${row.taskStatus.status === 2 ? 'success' : row.taskStatus.status === 3 ? 'warning' : 'info'}`" class="mx-1" effect="dark"
|
|
|
|
|
|
+ v-if="row?.taskStatusName"
|
|
|
|
+ :type="`${row.taskStatusName === '已审批' ? 'success' : row.taskStatusName === '已废除' ? 'warning' : 'info'}`" class="mx-1" effect="dark"
|
|
>
|
|
>
|
|
- {{ row.taskStatus.statusValue }}
|
|
|
|
|
|
+ {{ row.taskStatusName }}
|
|
</el-tag>
|
|
</el-tag>
|
|
</template>
|
|
</template>
|
|
- <template #waitingUserList="{ row }">
|
|
|
|
- <template v-for="item in row.waitingUserList">
|
|
|
|
- <el-tag
|
|
|
|
- v-if="item.waitingUserName"
|
|
|
|
- :type="`${item.status === 2 ? 'success' : item.status === 3 ? 'warning' : item.status === 999 ? 'danger' : 'info'}`" class="mx-1" effect="dark"
|
|
|
|
- >
|
|
|
|
- {{ item.waitingUserName }}
|
|
|
|
- </el-tag>
|
|
|
|
- </template>
|
|
|
|
|
|
+ <template #taskReportUserName="{ row }">
|
|
|
|
+ {{ row.taskReportUserName }}
|
|
</template>
|
|
</template>
|
|
</HcTable>
|
|
</HcTable>
|
|
<template #action>
|
|
<template #action>
|
|
@@ -149,7 +142,7 @@ nextTick(() => {
|
|
|
|
|
|
//获取相关数据
|
|
//获取相关数据
|
|
const setQueryData = () => {
|
|
const setQueryData = () => {
|
|
- searchForm.value.contractId = contractId.value
|
|
|
|
|
|
+ searchForm.value.contractIdValue = contractId.value
|
|
queryTaskType()
|
|
queryTaskType()
|
|
queryTaskStatus()
|
|
queryTaskStatus()
|
|
searchClick()
|
|
searchClick()
|
|
@@ -186,7 +179,7 @@ const queryTaskStatus = async () => {
|
|
const ContractIdChange = () => {
|
|
const ContractIdChange = () => {
|
|
searchForm.value.batch = null
|
|
searchForm.value.batch = null
|
|
queryBatchList()
|
|
queryBatchList()
|
|
- queryUserStartFlow()
|
|
|
|
|
|
+ // queryUserStartFlow()
|
|
getTableData()
|
|
getTableData()
|
|
}
|
|
}
|
|
|
|
|
|
@@ -211,7 +204,7 @@ const queryBatchList = async () => {
|
|
|
|
|
|
//搜索表单
|
|
//搜索表单
|
|
const searchForm = ref({
|
|
const searchForm = ref({
|
|
- queryValue: null, taskType: null, taskStatus: null, batch: null, startTime: null, endTime: null,
|
|
|
|
|
|
+ queryValue: null, typeValue: null, statusValue: null, batch: null, startTimeValue: null, endTimeValue: null,
|
|
current: 1, size: 200, total: 0,
|
|
current: 1, size: 200, total: 0,
|
|
})
|
|
})
|
|
|
|
|
|
@@ -219,8 +212,8 @@ const searchForm = ref({
|
|
const betweenTime = ref(null)
|
|
const betweenTime = ref(null)
|
|
const betweenTimeUpdate = ({ val, arr }) => {
|
|
const betweenTimeUpdate = ({ val, arr }) => {
|
|
betweenTime.value = arr
|
|
betweenTime.value = arr
|
|
- searchForm.value.startTime = val['start']
|
|
|
|
- searchForm.value.endTime = val['end']
|
|
|
|
|
|
+ searchForm.value.startTimeValue = val['start']
|
|
|
|
+ searchForm.value.endTimeValue = val['end']
|
|
}
|
|
}
|
|
|
|
|
|
//回车搜索
|
|
//回车搜索
|
|
@@ -248,36 +241,66 @@ const pageChange = ({ current, size }) => {
|
|
const tableLoading = ref(false)
|
|
const tableLoading = ref(false)
|
|
const tableListColumn = ref([
|
|
const tableListColumn = ref([
|
|
{ key: 'taskName', name: '任务名称' },
|
|
{ key: 'taskName', name: '任务名称' },
|
|
- { key: 'typeValue', name: '任务类型', width: '120' },
|
|
|
|
- { key: 'taskStatus', name: '任务状态', width: '160' },
|
|
|
|
|
|
+ { key: 'taskTypeName', name: '任务类型', width: '120' },
|
|
|
|
+ { key: 'taskStatusName', name: '任务状态', width: '160' },
|
|
{ key: 'startTime', name: '开始时间', width: '180' },
|
|
{ key: 'startTime', name: '开始时间', width: '180' },
|
|
{ key: 'endTime', name: '限定时间', width: '180' },
|
|
{ key: 'endTime', name: '限定时间', width: '180' },
|
|
- { key: 'taskContent', name: '任务描述' },
|
|
|
|
- { key: 'reportUserName', name: '上报人', width: '120' },
|
|
|
|
- { key: 'waitingUserList', name: '签字人员' },
|
|
|
|
- { key: 'evisaContent', name: '电签状态' },
|
|
|
|
|
|
+ { key: 'taskDesc', name: '任务描述' },
|
|
|
|
+ { key: 'taskReportUserName', name: '上报人', width: '120' },
|
|
|
|
+ { key: 'taskApproveUserNames', name: '签字人员' },
|
|
|
|
+ { key: 'evisaStatus', name: '电签状态' },
|
|
])
|
|
])
|
|
const tableListData = ref([])
|
|
const tableListData = ref([])
|
|
const getTableData = () => {
|
|
const getTableData = () => {
|
|
const key = isTableKey.value
|
|
const key = isTableKey.value
|
|
tableListRef.value?.clearSelection()
|
|
tableListRef.value?.clearSelection()
|
|
tableCheckedKeys.value = []
|
|
tableCheckedKeys.value = []
|
|
|
|
+ // if (key === 'key1') {
|
|
|
|
+ // queryUserToDoTaskList()
|
|
|
|
+ // } else if (key === 'key2') {
|
|
|
|
+ // queryUserDoneTaskList()
|
|
|
|
+ // } else if (key === 'key3') {
|
|
|
|
+ // queryUserStartFlow()
|
|
|
|
+ // }
|
|
if (key === 'key1') {
|
|
if (key === 'key1') {
|
|
- queryUserToDoTaskList()
|
|
|
|
|
|
+ searchForm.value.selectedType = 1
|
|
} else if (key === 'key2') {
|
|
} else if (key === 'key2') {
|
|
- queryUserDoneTaskList()
|
|
|
|
|
|
+ searchForm.value.selectedType = 2
|
|
} else if (key === 'key3') {
|
|
} else if (key === 'key3') {
|
|
- queryUserStartFlow()
|
|
|
|
|
|
+ searchForm.value.selectedType = 3
|
|
}
|
|
}
|
|
|
|
+ queryPage()
|
|
}
|
|
}
|
|
|
|
|
|
//待办任务列表
|
|
//待办任务列表
|
|
-const queryUserToDoTaskList = async () => {
|
|
|
|
|
|
+// const queryUserToDoTaskList = async () => {
|
|
|
|
+// tableLoading.value = true
|
|
|
|
+// const { error, code, data } = await tasksApi.queryUserToDoTaskList({
|
|
|
|
+// ...searchForm.value,
|
|
|
|
+// projectId: projectId.value,
|
|
|
|
+// currentContractId:currentContractId.value,
|
|
|
|
+// })
|
|
|
|
+// //处理数据
|
|
|
|
+// tableLoading.value = false
|
|
|
|
+// if (!error && code === 200) {
|
|
|
|
+// tableListData.value = getArrValue(data['records'])
|
|
|
|
+// searchForm.value.total = data.total || 0
|
|
|
|
+// } else {
|
|
|
|
+// tableListData.value = []
|
|
|
|
+// searchForm.value.total = 0
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+//任务列表
|
|
|
|
+const queryPage = async () => {
|
|
tableLoading.value = true
|
|
tableLoading.value = true
|
|
- const { error, code, data } = await tasksApi.queryUserToDoTaskList({
|
|
|
|
|
|
+ const { error, code, data } = await tasksApi.getTaskPage({
|
|
...searchForm.value,
|
|
...searchForm.value,
|
|
- projectId: projectId.value,
|
|
|
|
|
|
+
|
|
|
|
+ projectIdValue: projectId.value,
|
|
|
|
+
|
|
currentContractId:currentContractId.value,
|
|
currentContractId:currentContractId.value,
|
|
|
|
+
|
|
})
|
|
})
|
|
//处理数据
|
|
//处理数据
|
|
tableLoading.value = false
|
|
tableLoading.value = false
|