Skip to content

Commit 9bdafb0

Browse files
committed
【缺陷修复】1、条件配置的表单字段必须为必填 2、配置方式 bug
1 parent 8e4d91f commit 9bdafb0

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,13 @@
2626
</div>
2727
</template>
2828
<div>
29-
<div class="mb-3 font-size-16px" v-if="currentNode.defaultFlow">未满足其它条件时,将进入此分支(该分支不可编辑和删除)</div>
29+
<div class="mb-3 font-size-16px" v-if="currentNode.defaultFlow"
30+
>未满足其它条件时,将进入此分支(该分支不可编辑和删除)</div
31+
>
3032
<div v-else>
31-
<el-form
32-
ref="formRef"
33-
:model="currentNode"
34-
:rules="formRules"
35-
label-position="top"
36-
>
33+
<el-form ref="formRef" :model="currentNode" :rules="formRules" label-position="top">
3734
<el-form-item label="配置方式" prop="conditionType">
38-
<el-radio-group
39-
v-model="currentNode.conditionType"
40-
@change="changeConditionType"
41-
>
35+
<el-radio-group v-model="currentNode.conditionType" @change="changeConditionType">
4236
<el-radio
4337
v-for="(dict, index) in conditionConfigTypes"
4438
:key="index"
@@ -112,6 +106,7 @@
112106
:key="index"
113107
:label="item.title"
114108
:value="item.field"
109+
:disabled ="!item.required"
115110
/>
116111
</el-select>
117112
</div>
@@ -169,6 +164,7 @@ import {
169164
} from '../consts'
170165
import { getDefaultConditionNodeName } from '../utils'
171166
import { useFormFields } from '../node'
167+
import { BpmModelFormType } from '@/utils/constants'
172168
const message = useMessage() // 消息弹窗
173169
defineOptions({
174170
name: 'ConditionNodeConfig'
@@ -177,8 +173,8 @@ const formType = inject<Ref<number>>('formType') // 表单类型
177173
const conditionConfigTypes = computed(() => {
178174
return CONDITION_CONFIG_TYPES.filter((item) => {
179175
// 业务表单暂时去掉条件规则选项
180-
if (formType?.value !== 10) {
181-
return item.value === ConditionType.RULE
176+
if (formType?.value === BpmModelFormType.CUSTOM && item.value === ConditionType.RULE) {
177+
return false
182178
} else {
183179
return true
184180
}

0 commit comments

Comments
 (0)