add 添加已办查看
This commit is contained in:
		| @ -42,9 +42,9 @@ | ||||
|           </template> | ||||
|         </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"> | ||||
|             <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> | ||||
|         </el-table-column> | ||||
|       </el-table> | ||||
| @ -56,17 +56,13 @@ | ||||
|         @pagination="handleQuery" | ||||
|       /> | ||||
|     </el-card> | ||||
|     <!-- 审批记录 --> | ||||
|     <approvalRecord ref="approvalRecordRef" /> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script lang="ts" setup> | ||||
| import { getPageByTaskFinish } from '@/api/workflow/task'; | ||||
| import ApprovalRecord from '@/components/Process/approvalRecord.vue'; | ||||
| import { TaskQuery, TaskVO } from '@/api/workflow/task/types'; | ||||
| //审批记录组件 | ||||
| const approvalRecordRef = ref<InstanceType<typeof ApprovalRecord>>(); | ||||
| const queryFormRef = ref<ElFormInstance>(); | ||||
| const { proxy } = getCurrentInstance() as ComponentInternalInstance; | ||||
| // 遮罩层 | ||||
| @ -91,15 +87,6 @@ const queryParams = ref<TaskQuery>({ | ||||
|   processDefinitionName: undefined, | ||||
|   processDefinitionKey: undefined | ||||
| }); | ||||
| onMounted(() => { | ||||
|   getFinishList(); | ||||
| }); | ||||
| //审批记录 | ||||
| const handleApprovalRecord = (row: TaskVO) => { | ||||
|   if (approvalRecordRef.value) { | ||||
|     approvalRecordRef.value.init(row.processInstanceId); | ||||
|   } | ||||
| }; | ||||
| /** 搜索按钮操作 */ | ||||
| const handleQuery = () => { | ||||
|   getFinishList(); | ||||
| @ -125,4 +112,13 @@ const getFinishList = () => { | ||||
|     loading.value = false; | ||||
|   }); | ||||
| }; | ||||
| /** 查看按钮操作 */ | ||||
| const handleView = (row) => { | ||||
|   proxy.$tab.closePage(proxy.$route); | ||||
|   proxy.$router.push(`/demo/leaveEdit/index/${row.id}/view`); | ||||
| }; | ||||
|  | ||||
| onMounted(() => { | ||||
|   getFinishList(); | ||||
| }); | ||||
| </script> | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 gssong
					gssong