| | |
| | | <template #header> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" plain icon="Edit" @click="handleUpdate">ä¿®æ¹åç人</el-button> |
| | | <el-button type="primary" plain icon="Edit" :disabled="multiple" @click="handleUpdate">ä¿®æ¹åç人</el-button> |
| | | </el-col> |
| | | <right-toolbar v-model:showSearch="showSearch" @query-table="handleQuery"></right-toolbar> |
| | | </el-row> |
| | |
| | | </el-card> |
| | | <!-- 审æ¹è®°å½ --> |
| | | <approvalRecord ref="approvalRecordRef" /> |
| | | <!-- æäº¤ç»ä»¶ --> |
| | | <submitVerify ref="submitVerifyRef" :task-id="taskId" @submit-callback="handleQuery" /> |
| | | <!-- å ç¾ç»ä»¶ --> |
| | | <multiInstanceUser ref="multiInstanceUserRef" :title="title" @submit-callback="handleQuery" /> |
| | | <!-- é人ç»ä»¶ --> |
| | | <selectSysUser ref="selectSysUserRef" :multiple="true" @submit-callback="submitCallback" /> |
| | | <UserSelect ref="userSelectRef" :multiple="false" @confirm-call-back="submitCallback"></UserSelect> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | import { getPageByAllTaskWait, getPageByAllTaskFinish, updateAssignee } from '@/api/workflow/task'; |
| | | import ApprovalRecord from '@/components/Process/approvalRecord.vue'; |
| | | import SubmitVerify from '@/components/Process/submitVerify.vue'; |
| | | import MultiInstanceUser from '@/components/Process/multiInstanceUser.vue'; |
| | | import SelectSysUser from '@/components/Process/selectSysUser.vue'; |
| | | import UserSelect from '@/components/UserSelect'; |
| | | import { TaskQuery, TaskVO } from '@/api/workflow/task/types'; |
| | | //æäº¤ç»ä»¶ |
| | | const submitVerifyRef = ref<InstanceType<typeof SubmitVerify>>(); |
| | | //审æ¹è®°å½ç»ä»¶ |
| | | const approvalRecordRef = ref<InstanceType<typeof ApprovalRecord>>(); |
| | | //å ç¾ç»ä»¶ |
| | | const multiInstanceUserRef = ref<InstanceType<typeof MultiInstanceUser>>(); |
| | | //é人ç»ä»¶ |
| | | const selectSysUserRef = ref<InstanceType<typeof SelectSysUser>>(); |
| | | //é人ç»ä»¶ |
| | | const userSelectRef = ref<InstanceType<typeof UserSelect>>(); |
| | | |
| | | const queryFormRef = ref<ElFormInstance>(); |
| | | const { proxy } = getCurrentInstance() as ComponentInternalInstance; |
| | |
| | | const total = ref(0); |
| | | // 模åå®ä¹è¡¨æ ¼æ°æ® |
| | | const taskList = ref([]); |
| | | // ä»»å¡id |
| | | const taskId = ref(''); |
| | | const title = ref(''); |
| | | // æ¥è¯¢åæ° |
| | | const queryParams = ref<TaskQuery>({ |
| | |
| | | loading.value = false; |
| | | }); |
| | | }; |
| | | //æå¼ä¿®æ¹é人 |
| | | const handleUpdate = () => { |
| | | if (selectSysUserRef.value) { |
| | | selectSysUserRef.value.getUserList([]); |
| | | } |
| | | userSelectRef.value.open(); |
| | | }; |
| | | //ä¿®æ¹åç人 |
| | | const submitCallback = (data) => { |
| | | if (data && data.value.length > 0) { |
| | | updateAssignee(ids.value, data.value[0].userId).then((resp) => { |
| | | selectSysUserRef.value.close(); |
| | | proxy?.$modal.msgSuccess('æä½æå'); |
| | | handleQuery(); |
| | | }); |
| | | const submitCallback = async (data) => { |
| | | if(data && data.length > 0){ |
| | | await proxy?.$modal.confirm('æ¯å¦ç¡®è®¤æäº¤ï¼'); |
| | | loading.value = true; |
| | | await updateAssignee(ids.value, data[0].userId) |
| | | handleQuery() |
| | | proxy?.$modal.msgSuccess('æä½æå'); |
| | | }else{ |
| | | proxy?.$modal.msgWarning('è¯·éæ©ç¨æ·ï¼'); |
| | | } |
| | | }; |
| | | </script> |