mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 18:28:43 +08:00 
			
		
		
		
	bpm:流程详情的审批表单
This commit is contained in:
		| @@ -61,6 +61,8 @@ declare module '@vue/runtime-core' { | |||||||
|     ElTabPane: typeof import('element-plus/es')['ElTabPane'] |     ElTabPane: typeof import('element-plus/es')['ElTabPane'] | ||||||
|     ElTabs: typeof import('element-plus/es')['ElTabs'] |     ElTabs: typeof import('element-plus/es')['ElTabs'] | ||||||
|     ElTag: typeof import('element-plus/es')['ElTag'] |     ElTag: typeof import('element-plus/es')['ElTag'] | ||||||
|  |     ElTimeline: typeof import('element-plus/es')['ElTimeline'] | ||||||
|  |     ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] | ||||||
|     ElTooltip: typeof import('element-plus/es')['ElTooltip'] |     ElTooltip: typeof import('element-plus/es')['ElTooltip'] | ||||||
|     ElTransfer: typeof import('element-plus/es')['ElTransfer'] |     ElTransfer: typeof import('element-plus/es')['ElTransfer'] | ||||||
|     ElTree: typeof import('element-plus/es')['ElTree'] |     ElTree: typeof import('element-plus/es')['ElTree'] | ||||||
|   | |||||||
| @@ -12,7 +12,7 @@ | |||||||
|       </template> |       </template> | ||||||
|       <el-col :span="16" :offset="6"> |       <el-col :span="16" :offset="6"> | ||||||
|         <el-form |         <el-form | ||||||
|           :ref="auditFormRefs" |           :ref="'form' + index" | ||||||
|           :model="auditForms[index]" |           :model="auditForms[index]" | ||||||
|           :rules="auditRule" |           :rules="auditRule" | ||||||
|           label-width="100px" |           label-width="100px" | ||||||
| @@ -119,6 +119,7 @@ | |||||||
|   </ContentWrap> |   </ContentWrap> | ||||||
| </template> | </template> | ||||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||||
|  | import { getCurrentInstance } from 'vue' | ||||||
| import dayjs from 'dayjs' | import dayjs from 'dayjs' | ||||||
| import * as ProcessInstanceApi from '@/api/bpm/processInstance' | import * as ProcessInstanceApi from '@/api/bpm/processInstance' | ||||||
| import * as TaskApi from '@/api/bpm/task' | import * as TaskApi from '@/api/bpm/task' | ||||||
| @@ -126,6 +127,7 @@ import { formatPast2 } from '@/utils/formatTime' | |||||||
|  |  | ||||||
| const { query } = useRoute() // 查询参数 | const { query } = useRoute() // 查询参数 | ||||||
| const message = useMessage() // 消息弹窗 | const message = useMessage() // 消息弹窗 | ||||||
|  | const { proxy } = getCurrentInstance() | ||||||
|  |  | ||||||
| // ========== 审批信息 ========== | // ========== 审批信息 ========== | ||||||
| const id = query.id as unknown as number | const id = query.id as unknown as number | ||||||
| @@ -141,12 +143,14 @@ const auditRule = reactive({ | |||||||
| const handleAudit = async (task, pass) => { | const handleAudit = async (task, pass) => { | ||||||
|   // 1.1 获得对应表单 |   // 1.1 获得对应表单 | ||||||
|   const index = runningTasks.value.indexOf(task) |   const index = runningTasks.value.indexOf(task) | ||||||
|   // const auditFormRef = ref<any>([]).value.get(index) |   const auditFormRef = proxy.$refs['form' + index][0] | ||||||
|  |   // alert(auditFormRef) | ||||||
|  |  | ||||||
|   // 1.2 校验表单 |   // 1.2 校验表单 | ||||||
|   // const elForm = unref(auditFormRef) |   const elForm = unref(auditFormRef) | ||||||
|   // if (!elForm) return |   if (!elForm) return | ||||||
|   // const valid = await auditFormRef.validate() |   const valid = await elForm.validate() | ||||||
|   // if (!valid) return |   if (!valid) return | ||||||
|  |  | ||||||
|   // 2.1 提交审批 |   // 2.1 提交审批 | ||||||
|   const data = { |   const data = { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV