bpm:完善流程分配任务的弹窗

This commit is contained in:
YunaiV 2023-01-21 19:08:35 +08:00
parent 8992f64eb4
commit 1b60975ebb

View File

@ -3,9 +3,12 @@
<!-- 列表 -->
<XTable @register="registerTable">
<template #options_default="{ row }">
<el-tag :key="option" v-for="option in row.options">
<span :key="option" v-for="option in row.options">
<el-tag>
{{ getAssignRuleOptionName(row.type, option) }}
</el-tag>
&nbsp;
</span>
</template>
<!-- 操作 -->
<template #actionbtns_default="{ row }" v-if="modelId">
@ -21,14 +24,7 @@
<!-- 添加/修改弹窗 -->
<XModal v-model="dialogVisible" title="修改任务规则" width="800" height="35%">
<el-form
ref="formRef"
:model="formData"
:rules="rules"
label-width="120px"
size="default"
status-icon
>
<el-form ref="formRef" :model="formData" :rules="rules" label-width="80px">
<el-form-item label="任务名称" prop="taskDefinitionName">
<el-input v-model="formData.taskDefinitionName" placeholder="请输入流标标识" disabled />
</el-form-item>
@ -69,6 +65,7 @@
:props="defaultProps"
:data="deptTreeOptions"
empty-text="加载中,请稍后"
multiple
/>
</el-form-item>
<el-form-item label="指定岗位" prop="postIds" span="24" v-if="formData.type === 22">
@ -138,7 +135,7 @@
</template>
<script setup lang="ts" name="TaskAssignRule">
// import
import type { FormInstance } from 'element-plus'
import { FormInstance } from 'element-plus'
// import
import * as TaskAssignRuleApi from '@/api/bpm/taskAssignRule'
import { listSimpleRolesApi } from '@/api/system/role'
@ -233,10 +230,11 @@ const formData = ref() // 表单数据
//
const submitForm = async () => {
const elForm = unref(formRef)?.getElFormRef()
//
const elForm = unref(formRef)
if (!elForm) return
elForm.validate(async (valid) => {
if (valid) {
const valid = await elForm.validate()
if (!valid) return
//
let form = {
...formData.value,
@ -282,8 +280,6 @@ const submitForm = async () => {
//
await reload()
}
}
})
}
//