【缺陷修复】延迟器节点名称修复问题,延迟器节点高亮问题

pull/686/head
jason 2025-01-26 14:34:23 +08:00
parent f35f62d2f8
commit 503a35f44e
5 changed files with 21 additions and 29 deletions

View File

@ -47,10 +47,9 @@ import {
SimpleFlowNode, SimpleFlowNode,
ConditionType, ConditionType,
COMPARISON_OPERATORS, COMPARISON_OPERATORS,
ProcessVariableEnum
} from '../consts' } from '../consts'
import { getDefaultConditionNodeName } from '../utils' import { getDefaultConditionNodeName } from '../utils'
import { useFormFields } from '../node' import { useFormFieldsAndStartUser } from '../node'
import Condition from './components/Condition.vue' import Condition from './components/Condition.vue'
const message = useMessage() // const message = useMessage() //
defineOptions({ defineOptions({
@ -176,23 +175,12 @@ const getShowText = (): string => {
} }
return showText return showText
} }
//
const fieldsInfo = useFormFields() const fieldOptions = useFormFieldsAndStartUser()
/** 条件规则可选择的表单字段 */
const fieldOptions = computed(() => {
const fieldsCopy = fieldsInfo.slice()
// ID
fieldsCopy.unshift({
field: ProcessVariableEnum.START_USER_ID,
title: '发起人',
required: true
})
return fieldsCopy
})
/** 获取字段名称 */ /** 获取字段名称 */
const getFieldTitle = (field: string) => { const getFieldTitle = (field: string) => {
const item = fieldOptions.value.find((item) => item.field === field) const item = fieldOptions.find((item) => item.field === field)
return item?.title return item?.title
} }

View File

@ -124,6 +124,7 @@ const saveConfig = async () => {
if (!valid) return false if (!valid) return false
const showText = getShowText() const showText = getShowText()
if (!showText) return false if (!showText) return false
currentNode.value.name = nodeName.value!
currentNode.value.showText = showText currentNode.value.showText = showText
if (configForm.value.delayType === DelayTypeEnum.FIXED_TIME_DURATION) { if (configForm.value.delayType === DelayTypeEnum.FIXED_TIME_DURATION) {
currentNode.value.delaySetting = { currentNode.value.delaySetting = {

View File

@ -192,6 +192,7 @@ const saveConfig = async () => {
if (!valid) return false if (!valid) return false
const showText = getShowText() const showText = getShowText()
if (!showText) return false if (!showText) return false
currentNode.value.name = nodeName.value!
currentNode.value.showText = showText currentNode.value.showText = showText
currentNode.value.triggerSetting = configForm.value currentNode.value.triggerSetting = configForm.value
settingVisible.value = false settingVisible.value = false

View File

@ -138,11 +138,10 @@ import {
COMPARISON_OPERATORS, COMPARISON_OPERATORS,
CONDITION_CONFIG_TYPES, CONDITION_CONFIG_TYPES,
ConditionType, ConditionType,
DEFAULT_CONDITION_GROUP_VALUE, DEFAULT_CONDITION_GROUP_VALUE
ProcessVariableEnum
} from '../../consts' } from '../../consts'
import { BpmModelFormType } from '@/utils/constants' import { BpmModelFormType } from '@/utils/constants'
import { useFormFields } from '../../node' import { useFormFieldsAndStartUser } from '../../node'
const props = defineProps({ const props = defineProps({
modelValue: { modelValue: {
@ -170,17 +169,10 @@ const conditionConfigTypes = computed(() => {
} }
}) })
}) })
/** 条件规则可选择的表单字段 */ /** 条件规则可选择的表单字段 */
const fieldOptions = computed(() => { const fieldOptions = useFormFieldsAndStartUser()
const fieldsCopy = useFormFields().slice()
// ID
fieldsCopy.unshift({
field: ProcessVariableEnum.START_USER_ID,
title: '发起人',
required: true
})
return fieldsCopy
})
// //
const formRules = reactive({ const formRules = reactive({
conditionType: [{ required: true, message: '配置方式不能为空', trigger: 'blur' }], conditionType: [{ required: true, message: '配置方式不能为空', trigger: 'blur' }],

View File

@ -114,6 +114,16 @@ const setSimpleModelNodeTaskStatus = (
simpleModel.activityStatus = TaskStatusEnum.NOT_START simpleModel.activityStatus = TaskStatusEnum.NOT_START
} }
} }
//
if (simpleModel.type === NodeType.TRIGGER_NODE) {
// ,
if (finishedActivityIds.includes(simpleModel.id)) {
simpleModel.activityStatus = TaskStatusEnum.APPROVE
} else {
simpleModel.activityStatus = TaskStatusEnum.NOT_START
}
}
// SequenceFlow // SequenceFlow
if (simpleModel.type === NodeType.CONDITION_NODE) { if (simpleModel.type === NodeType.CONDITION_NODE) {
// , // ,