add 添加已办查看

This commit is contained in:
gssong 2024-03-21 21:20:42 +08:00
parent e26f6423aa
commit 66a31b620b

View File

@ -42,9 +42,9 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="startTime" label="创建时间" width="160"></el-table-column> <el-table-column align="center" prop="startTime" label="创建时间" width="160"></el-table-column>
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="200">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" size="small" icon="Document" @click="handleApprovalRecord(scope.row)">审批记录</el-button> <el-button type="primary" size="small" icon="View" @click="handleView(scope.row)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -56,17 +56,13 @@
@pagination="handleQuery" @pagination="handleQuery"
/> />
</el-card> </el-card>
<!-- 审批记录 -->
<approvalRecord ref="approvalRecordRef" />
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { getPageByTaskFinish } from '@/api/workflow/task'; import { getPageByTaskFinish } from '@/api/workflow/task';
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
import { TaskQuery, TaskVO } from '@/api/workflow/task/types'; import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
// //
const approvalRecordRef = ref<InstanceType<typeof ApprovalRecord>>();
const queryFormRef = ref<ElFormInstance>(); const queryFormRef = ref<ElFormInstance>();
const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { proxy } = getCurrentInstance() as ComponentInternalInstance;
// //
@ -91,15 +87,6 @@ const queryParams = ref<TaskQuery>({
processDefinitionName: undefined, processDefinitionName: undefined,
processDefinitionKey: undefined processDefinitionKey: undefined
}); });
onMounted(() => {
getFinishList();
});
//
const handleApprovalRecord = (row: TaskVO) => {
if (approvalRecordRef.value) {
approvalRecordRef.value.init(row.processInstanceId);
}
};
/** 搜索按钮操作 */ /** 搜索按钮操作 */
const handleQuery = () => { const handleQuery = () => {
getFinishList(); getFinishList();
@ -125,4 +112,13 @@ const getFinishList = () => {
loading.value = false; loading.value = false;
}); });
}; };
/** 查看按钮操作 */
const handleView = (row) => {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push(`/demo/leaveEdit/index/${row.id}/view`);
};
onMounted(() => {
getFinishList();
});
</script> </script>