图纸 优化
This commit is contained in:
@ -81,9 +81,8 @@
|
||||
<UserSelect ref="multiInstanceUserRef" :multiple="true" @confirm-call-back="addMultiInstanceUser"></UserSelect>
|
||||
<!-- 弹窗选人 -->
|
||||
<UserSelect ref="porUserRef" :multiple="true" :userIds="popUserIds" @confirm-call-back="handlePopUser"></UserSelect>
|
||||
|
||||
<!-- 驳回开始 -->
|
||||
<el-dialog v-model="backVisible" draggable title="驳回" width="40%" :close-on-click-modal="false">
|
||||
<el-dialog v-model="backVisible" draggable title="驳回" :width="isDrawing ? '800px' : '40%'" :close-on-click-modal="false">
|
||||
<el-form v-if="task.flowStatus === 'waiting'" v-loading="backLoading" :model="backForm" label-width="120px">
|
||||
<el-form-item label="驳回节点">
|
||||
<el-select v-model="backForm.nodeCode" clearable placeholder="请选择" style="width: 300px">
|
||||
@ -108,6 +107,10 @@
|
||||
<el-input v-model="backForm.message" type="textarea" resize="none" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="box" v-if="isDrawing">
|
||||
<span>设计验证</span>
|
||||
<detailForm ref="detailFormRef"></detailForm>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer" style="float: right; padding-bottom: 20px">
|
||||
<el-button :disabled="backButtonDisabled" type="primary" @click="handleBackProcess">确认</el-button>
|
||||
@ -129,6 +132,15 @@
|
||||
</el-table>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="isShowTermination" title="终止任务" width="800px" draggable :close-on-click-modal="false">
|
||||
<detailForm ref="detailFormTeRef"></detailForm>
|
||||
<template #footer>
|
||||
<div class="dialog-footer" style="float: right; padding-bottom: 20px">
|
||||
<el-button type="primary" @click="handleTermination">确认</el-button>
|
||||
<el-button @click="isShowTermination = false">取消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -151,12 +163,14 @@ import UserSelect from '@/components/UserSelect';
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
import { UserVO } from '@/api/system/user/types';
|
||||
import { FlowTaskVO, TaskOperationBo } from '@/api/workflow/task/types';
|
||||
|
||||
import detailForm from '@/views/design/drawingreview/detailForm.vue';
|
||||
const userSelectCopyRef = ref<InstanceType<typeof UserSelect>>();
|
||||
const transferTaskRef = ref<InstanceType<typeof UserSelect>>();
|
||||
const delegateTaskRef = ref<InstanceType<typeof UserSelect>>();
|
||||
const multiInstanceUserRef = ref<InstanceType<typeof UserSelect>>();
|
||||
const porUserRef = ref<InstanceType<typeof UserSelect>>();
|
||||
const detailFormRef = ref<InstanceType<typeof detailForm>>();
|
||||
const detailFormTeRef = ref<InstanceType<typeof detailForm>>();
|
||||
|
||||
const props = defineProps({
|
||||
taskVariables: {
|
||||
@ -185,6 +199,9 @@ const backButtonDisabled = ref(true);
|
||||
// 可驳回得任务节点
|
||||
const taskNodeList = ref([]);
|
||||
const nickName = ref({});
|
||||
const isDrawing = ref(false); //图纸评审标志
|
||||
const businessId = ref(''); //业务id
|
||||
const isShowTermination = ref(false); //显示终止
|
||||
//节点编码
|
||||
const nodeCode = ref<string>('');
|
||||
const buttonObj = ref<any>({
|
||||
@ -242,7 +259,9 @@ const backForm = ref<Record<string, any>>({
|
||||
});
|
||||
|
||||
//打开弹窗
|
||||
const openDialog = async (id?: string) => {
|
||||
const openDialog = async (id?: string, Drawing?: boolean, Id?: string) => {
|
||||
businessId.value = Id || '';
|
||||
isDrawing.value = Drawing;
|
||||
selectCopyUserIds.value = undefined;
|
||||
selectCopyUserList.value = [];
|
||||
form.value.fileId = undefined;
|
||||
@ -326,6 +345,7 @@ const handleBackProcessOpen = async () => {
|
||||
backLoading.value = true;
|
||||
backButtonDisabled.value = true;
|
||||
const data = await getBackTaskNode(task.value.definitionId, task.value.nodeCode);
|
||||
// 调用子组件
|
||||
taskNodeList.value = data.data;
|
||||
backLoading.value = false;
|
||||
backButtonDisabled.value = false;
|
||||
@ -341,6 +361,9 @@ const handleBackProcess = async () => {
|
||||
await backProcess(backForm.value).finally(() => {
|
||||
loading.value = false;
|
||||
buttonDisabled.value = false;
|
||||
if (isDrawing.value) {
|
||||
detailFormRef.value.submit(businessId.value);
|
||||
}
|
||||
});
|
||||
dialog.visible = false;
|
||||
backLoading.value = false;
|
||||
@ -472,8 +495,28 @@ const handleDelegateTask = async (data) => {
|
||||
proxy?.$modal.msgWarning('请选择用户!');
|
||||
}
|
||||
};
|
||||
const handleTermination = async () => {
|
||||
// 终止任务
|
||||
const params = {
|
||||
taskId: taskId.value,
|
||||
comment: form.value.message
|
||||
};
|
||||
await terminationTask(params).finally(() => {
|
||||
// 提交设计验证
|
||||
detailFormTeRef.value.submit(businessId.value);
|
||||
loading.value = false;
|
||||
buttonDisabled.value = false;
|
||||
});
|
||||
dialog.visible = false;
|
||||
emits('submitCallback');
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
};
|
||||
//终止任务
|
||||
const handleTerminationTask = async () => {
|
||||
if (isDrawing.value) {
|
||||
isShowTermination.value = true;
|
||||
return;
|
||||
}
|
||||
const params = {
|
||||
taskId: taskId.value,
|
||||
comment: form.value.message
|
||||
@ -527,3 +570,15 @@ defineExpose({
|
||||
openDialog
|
||||
});
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.box {
|
||||
border: 1px solid #f1f1f1;
|
||||
padding: 16px;
|
||||
border-radius: 10px;
|
||||
> span {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #0090f9;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user