样式调整

信息体组件自动带部门
tab标题显示业务功能名称
修改流程默认节点名称、修改流程线名称可为空
表单流程验证跳过
This commit is contained in:
yaoyn
2024-05-29 09:28:48 +08:00
parent 5e85ad2c2f
commit f6209b9476
16 changed files with 113 additions and 78 deletions

View File

@ -647,6 +647,21 @@
generatorConfig.listConfig.buttonConfigs.length === 0 generatorConfig.listConfig.buttonConfigs.length === 0
) { ) {
generatorConfig.listConfig.buttonConfigs = [ generatorConfig.listConfig.buttonConfigs = [
{
isUse: true,
name: t('新增'),
code: 'add',
icon: 'ant-design:plus-outlined',
isDefault: true,
type: 'primary'
},
{
isUse: true,
name: t('编辑'),
code: 'edit',
icon: 'ant-design:form-outlined',
isDefault: true,
},
{ {
isUse: true, isUse: true,
name: t('刷新'), name: t('刷新'),
@ -661,20 +676,6 @@
icon: 'ant-design:eye-outlined', icon: 'ant-design:eye-outlined',
isDefault: true, isDefault: true,
}, },
{
isUse: true,
name: t('新增'),
code: 'add',
icon: 'ant-design:plus-outlined',
isDefault: true,
},
{
isUse: true,
name: t('编辑'),
code: 'edit',
icon: 'ant-design:form-outlined',
isDefault: true,
},
{ {
isUse: true, isUse: true,
name: t('删除'), name: t('删除'),

View File

@ -41,13 +41,15 @@ import {inject, ref, watchEffect} from 'vue';
if (props && props.value) { if (props && props.value) {
//当前用户 //当前用户
if (props.infoType === 0) { if (props.infoType === 0) {
let deptId=formModel![props.deptField]; const deptId=formModel?.[props.deptField];
let deptName=deptId?await getDepartment(deptId):""; const dept=deptId?await getDepartment(deptId):null;
const deptName=dept?.name||"";
//判断传入的值 是不是当前登录人 或需要二次加载 就不需要发请求获取用户信息了 //判断传入的值 是不是当前登录人 或需要二次加载 就不需要发请求获取用户信息了
if (props.value === userStore.getUserInfo.id || props.loadAgain) { if (props.value === userStore.getUserInfo.id || props.loadAgain) {
name.value = userStore.getUserInfo.name+(props.userNameWithDepartment&&(deptName||userStore.getUserInfo.departmentName)?("/"+(deptName||userStore.getUserInfo.departmentName)):""); name.value = userStore.getUserInfo.name+(props.userNameWithDepartment&&(deptName||userStore.getUserInfo.departmentName)?("/"+(deptName||userStore.getUserInfo.departmentName)):"");
emit('update:value', userStore.getUserInfo.id); emit('update:value', userStore.getUserInfo.id);
} else { } else {
name.value = props.value;
//如果不是当前登陆人 需要用户id 查询当前用户信息 //如果不是当前登陆人 需要用户id 查询当前用户信息
const userInfo = await getUser(props.value); const userInfo = await getUser(props.value);
name.value = userInfo.name; name.value = userInfo.name;
@ -61,6 +63,7 @@ import {inject, ref, watchEffect} from 'vue';
name.value = userStore.getUserInfo.departmentName; name.value = userStore.getUserInfo.departmentName;
emit('update:value', userStore.getUserInfo.departmentId); emit('update:value', userStore.getUserInfo.departmentId);
} else { } else {
name.value = props.value;
//如果不是当前登陆人 需要用户id 查询当前用户信息 //如果不是当前登陆人 需要用户id 查询当前用户信息
const dept = await getDepartment(props.value); const dept = await getDepartment(props.value);
name.value = dept.name; name.value = dept.name;
@ -78,8 +81,9 @@ import {inject, ref, watchEffect} from 'vue';
} else { } else {
//当前用户 //当前用户
if (props.infoType === 0) { if (props.infoType === 0) {
let deptId=formModel![props.deptField]; const deptId=formModel?.[props.deptField];
let deptName=deptId?await getDepartment(deptId):""; const dept=deptId?await getDepartment(deptId):null;
const deptName=dept?.name||"";
//判断传入的值 是不是当前登录人 就不需要发请求获取用户信息了 //判断传入的值 是不是当前登录人 就不需要发请求获取用户信息了
name.value = userStore.getUserInfo.name+(props.userNameWithDepartment&&(deptName||userStore.getUserInfo.departmentName)?("/"+(deptName||userStore.getUserInfo.departmentName)):""); name.value = userStore.getUserInfo.name+(props.userNameWithDepartment&&(deptName||userStore.getUserInfo.departmentName)?("/"+(deptName||userStore.getUserInfo.departmentName)):"");
emit('update:value', userStore.getUserInfo.id); emit('update:value', userStore.getUserInfo.id);

View File

@ -67,7 +67,7 @@ function handleIndexColumn(
flag: INDEX_COLUMN_FLAG, flag: INDEX_COLUMN_FLAG,
width: 50, width: 50,
title: t('序号'), title: t('序号'),
align: 'center', align: 'right',
customRender: ({ index }) => { customRender: ({ index }) => {
const getPagination = unref(getPaginationRef); const getPagination = unref(getPaginationRef);
if (isBoolean(getPagination)) { if (isBoolean(getPagination)) {

View File

@ -67,7 +67,7 @@ function handleIndexColumn(
flag: INDEX_COLUMN_FLAG, flag: INDEX_COLUMN_FLAG,
width: 50, width: 50,
title: t('序号'), title: t('序号'),
align: 'center', align: 'right',
customRender: ({ index }) => { customRender: ({ index }) => {
const getPagination = unref(getPaginationRef); const getPagination = unref(getPaginationRef);
if (isBoolean(getPagination)) { if (isBoolean(getPagination)) {

View File

@ -27,7 +27,8 @@ export function useTitle() {
return; return;
} }
const tTitle = t(route?.meta?.title as string); const metaTitle=typeof route?.meta?.title=='function'?route.meta.title(route):route?.meta?.title;
const tTitle = t(metaTitle);
pageTitle.value = tTitle pageTitle.value = tTitle
? ` ${tTitle} - ${title} ` ? ` ${tTitle} - ${title} `
: `${title}`; : `${title}`;

View File

@ -45,7 +45,8 @@
const getTitle = computed(() => { const getTitle = computed(() => {
const tabItem = props.tabItem as any; const tabItem = props.tabItem as any;
const meta = tabItem.meta || {}; const meta = tabItem.meta || {};
return tabItem.tabTitle || (meta && t(meta.title as string)); const metaTitle=typeof meta?.title=='function'?meta.title(tabItem):meta?.title;
return tabItem.tabTitle || (meta && t(metaTitle as string));
}); });
const getIsTabs = computed(() => !props.isExtra); const getIsTabs = computed(() => !props.isExtra);

View File

@ -126,6 +126,8 @@ export interface ButtonConfig {
icon: string; icon: string;
//是否新增 //是否新增
isDefault: boolean; isDefault: boolean;
//按钮类型
type: string;
} }
/** /**

View File

@ -138,7 +138,7 @@ export const FLOW_ROUTE: AppRouteRecordRaw[] = [{
name: 'CreateFlow', name: 'CreateFlow',
component: () => import('/@/views/secondDev/createFlow.vue'), component: () => import('/@/views/secondDev/createFlow.vue'),
meta: { meta: {
title: '新建流程' title: (route) => '新建'+(route.query.formName||'流程')
} }
}, },
{ {
@ -146,7 +146,7 @@ export const FLOW_ROUTE: AppRouteRecordRaw[] = [{
name: 'ApproveFlow', name: 'ApproveFlow',
component: () => import('/@/views/secondDev/approveFlowPage.vue'), component: () => import('/@/views/secondDev/approveFlowPage.vue'),
meta: { meta: {
title: '审批流程' title: (route) => '审批'+(route.query.formName||'流程')
} }
} }
] ]
@ -197,7 +197,7 @@ export const FLOW_ROUTE: AppRouteRecordRaw[] = [{
name: 'createForm', name: 'createForm',
component: () => import('/@/views/secondDev/formCreatePage.vue'), component: () => import('/@/views/secondDev/formCreatePage.vue'),
meta: { meta: {
title: '新建表单' title: (route) => '新建'+(route.query.formName||'表单')
} }
}, },
{ {
@ -205,7 +205,7 @@ export const FLOW_ROUTE: AppRouteRecordRaw[] = [{
name: 'updateForm', name: 'updateForm',
component: () => import('/@/views/secondDev/formCreatePage.vue'), component: () => import('/@/views/secondDev/formCreatePage.vue'),
meta: { meta: {
title: '更新表单' title: (route) => '更新'+(route.query.formName||'表单')
} }
}, },
{ {
@ -213,7 +213,7 @@ export const FLOW_ROUTE: AppRouteRecordRaw[] = [{
name: 'viewForm', name: 'viewForm',
component: () => import('/@/views/secondDev/formCreatePage.vue'), component: () => import('/@/views/secondDev/formCreatePage.vue'),
meta: { meta: {
title: '查看表单' title: (route) => '查看'+(route.query.formName||'表单')
} }
} }
] ]

View File

@ -534,11 +534,11 @@ export function buildListCode(model: GeneratorConfig): string {
} }
<template #toolbar> <template #toolbar>
<template v-for="button in tableButtonConfig" :key="button.code"> <template v-for="button in tableButtonConfig" :key="button.code">
<a-button v-if="button.isDefault" type="primary" @click="buttonClick(button.code)"> <a-button v-if="button.isDefault" :type="button.type" @click="buttonClick(button.code)">
<template #icon><Icon :icon="button.icon" /></template> <template #icon><Icon :icon="button.icon" /></template>
{{ button.name }} {{ button.name }}
</a-button> </a-button>
<a-button v-else type="primary"> <a-button v-else :type="button.type">
<template #icon><Icon :icon="button.icon" /></template> <template #icon><Icon :icon="button.icon" /></template>
{{ button.name }} {{ button.name }}
</a-button> </a-button>
@ -908,10 +908,11 @@ ${hasTemplatePrint ? ' reactive ' : ''}
` `
: '' : ''
} }
const formName='${model.outputConfig?.comment || pascalClassName}';
const [registerTable, { reload, ${hasFilterButton ? 'setColumns,' : ''} ${ const [registerTable, { reload, ${hasFilterButton ? 'setColumns,' : ''} ${
hasPrintButton ? 'getRawDataSource,' : '' hasPrintButton ? 'getRawDataSource,' : ''
} }] = useTable({ } }] = useTable({
title: '${model.listConfig?.listTitle || pascalClassName + '列表'}', title: '${model.listConfig?.listTitle||''}' || (formName + '列表'),
api: get${pascalMainTableName}Page, api: get${pascalMainTableName}Page,
rowKey: '${camelCaseString(mainTable.pkField)}', rowKey: '${camelCaseString(mainTable.pkField)}',
columns: filterColumns, columns: filterColumns,
@ -1003,7 +1004,8 @@ ${hasTemplatePrint ? ' reactive ' : ''}
router.push({ router.push({
path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow',
query: { query: {
taskId: taskIds[0] taskId: taskIds[0],
formName: formName
} }
}); });
} else if (record.workflowData?.schemaId && !record.workflowData.taskIds) { } else if (record.workflowData?.schemaId && !record.workflowData.taskIds) {
@ -1012,14 +1014,16 @@ ${hasTemplatePrint ? ' reactive ' : ''}
path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow',
query: { query: {
readonly: 1, readonly: 1,
taskId: '' taskId: '',
formName: formName
} }
}); });
} else { } else {
router.push({ router.push({
path: '/form/${lowerClassName}/' + record.id + '/viewForm', path: '/form/${lowerClassName}/' + record.id + '/viewForm',
query: { query: {
formPath: '${model.outputConfig.outputValue}/${lowerClassName}' formPath: '${model.outputConfig.outputValue}/${lowerClassName}',
formName: formName
} }
}); });
} }
@ -1047,7 +1051,8 @@ ${hasTemplatePrint ? ' reactive ' : ''}
router.push({ router.push({
path: '/form/${lowerClassName}/0/createForm', path: '/form/${lowerClassName}/0/createForm',
query: { query: {
formPath: '${model.outputConfig.outputValue}/${lowerClassName}' formPath: '${model.outputConfig.outputValue}/${lowerClassName}',
formName: formName
} }
}); });
} }
@ -1064,7 +1069,8 @@ ${hasTemplatePrint ? ' reactive ' : ''}
router.push({ router.push({
path: '/form/${lowerClassName}/' + record.id + '/updateForm', path: '/form/${lowerClassName}/' + record.id + '/updateForm',
query: { query: {
formPath: '${model.outputConfig.outputValue}/${lowerClassName}' formPath: '${model.outputConfig.outputValue}/${lowerClassName}',
formName: formName
} }
});` });`
: ` : `
@ -1348,7 +1354,8 @@ ${hasTemplatePrint ? ' reactive ' : ''}
router.push({ router.push({
path: '/form/${lowerClassName}/' + record.id + '/viewForm', path: '/form/${lowerClassName}/' + record.id + '/viewForm',
query: { query: {
formPath: '${model.outputConfig.outputValue}/${lowerClassName}' formPath: '${model.outputConfig.outputValue}/${lowerClassName}',
formName: formName
} }
});` });`
: ` : `
@ -1491,7 +1498,7 @@ ${hasTemplatePrint ? ' reactive ' : ''}
} }
${hasFlowRecordButton ? `if (button.code === 'flowRecord') hasFlowRecord = true;` : ''} ${hasFlowRecordButton ? `if (button.code === 'flowRecord') hasFlowRecord = true;` : ''}
}); });
if (record.workflowData.enabled) { if (record.workflowData?.enabled) {
//与工作流有关联的表单 //与工作流有关联的表单
if (record.workflowData.status) { if (record.workflowData.status) {
//如果是本人需要审批的数据 就会有taskIds 所以需要修改绑定事件 //如果是本人需要审批的数据 就会有taskIds 所以需要修改绑定事件
@ -1529,7 +1536,7 @@ ${hasTemplatePrint ? ' reactive ' : ''}
actionsList = actionsList.concat(editAndDelBtn); actionsList = actionsList.concat(editAndDelBtn);
} }
} else { } else {
if (!record.workflowData.processId) { if (!record.workflowData?.processId) {
//与工作流没有关联的表单并且在当前页面新增的数据 如选择编辑、删除按钮则加上 //与工作流没有关联的表单并且在当前页面新增的数据 如选择编辑、删除按钮则加上
actionsList = actionsList.concat(editAndDelBtn); actionsList = actionsList.concat(editAndDelBtn);
} }
@ -1570,7 +1577,8 @@ ${hasTemplatePrint ? ' reactive ' : ''}
path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow',
query: { query: {
readonly: 1, readonly: 1,
taskId: '' taskId: '',
formName: formName
} }
}); });
} }
@ -1614,7 +1622,8 @@ ${hasTemplatePrint ? ' reactive ' : ''}
router.push({ router.push({
path: '/flow/' + schemaId + '/' + processId + '/approveFlow', path: '/flow/' + schemaId + '/' + processId + '/approveFlow',
query: { query: {
taskId: taskIds[0] taskId: taskIds[0],
formName: formName
} }
}); });
} }

View File

@ -539,6 +539,21 @@
generatorConfig.listConfig.buttonConfigs.length === 0 generatorConfig.listConfig.buttonConfigs.length === 0
) { ) {
generatorConfig.listConfig.buttonConfigs = [ generatorConfig.listConfig.buttonConfigs = [
{
isUse: true,
name: t('新增'),
code: 'add',
icon: 'ant-design:plus-outlined',
isDefault: true,
type: 'primary'
},
{
isUse: true,
name: t('编辑'),
code: 'edit',
icon: 'ant-design:form-outlined',
isDefault: true,
},
{ {
isUse: true, isUse: true,
name: t('刷新'), name: t('刷新'),
@ -553,20 +568,6 @@
icon: 'ant-design:eye-outlined', icon: 'ant-design:eye-outlined',
isDefault: true, isDefault: true,
}, },
{
isUse: true,
name: t('新增'),
code: 'add',
icon: 'ant-design:plus-outlined',
isDefault: true,
},
{
isUse: true,
name: t('编辑'),
code: 'edit',
icon: 'ant-design:form-outlined',
isDefault: true,
},
{ {
isUse: true, isUse: true,
name: t('删除'), name: t('删除'),

View File

@ -323,6 +323,12 @@
selectIds: [] selectIds: []
}; };
}); });
const strictDesign=false;
if (strictDesign&&taskList.length > 0) {
notificationError('提交失败', '流程设计错误,开始后的第一个节点必须是审批人为发起人的起草节点。');
data.submitLoading = false;
loading.value = false;
} else {
createFlowSuccess(taskList); createFlowSuccess(taskList);
} else { } else {
createFlowSuccess(); createFlowSuccess();

View File

@ -172,6 +172,21 @@
}, },
columnConfigs: [], columnConfigs: [],
buttonConfigs: [ buttonConfigs: [
{
isUse: true,
name: '新增',
code: 'add',
icon: 'ant-design:plus-outlined',
isDefault: true,
type: 'primary'
},
{
isUse: true,
name: '编辑',
code: 'edit',
icon: 'ant-design:form-outlined',
isDefault: true,
},
{ {
isUse: true, isUse: true,
name: '刷新', name: '刷新',
@ -186,20 +201,6 @@
icon: 'ant-design:eye-outlined', icon: 'ant-design:eye-outlined',
isDefault: true, isDefault: true,
}, },
{
isUse: true,
name: '新增',
code: 'add',
icon: 'ant-design:plus-outlined',
isDefault: true,
},
{
isUse: true,
name: '编辑',
code: 'edit',
icon: 'ant-design:form-outlined',
isDefault: true,
},
{ {
isUse: true, isUse: true,
name: '删除', name: '删除',

View File

@ -11,10 +11,14 @@
value: 'key', value: 'key',
}" }"
@select="changeTarget" @select="changeTarget"
:placeholder="props.placeholder||t('请选择表单字段')"
/> />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {useI18n} from "/@/hooks/web/useI18n";
const { t } = useI18n();
const emit = defineEmits(['update:target']); const emit = defineEmits(['update:target']);
const props = defineProps({ const props = defineProps({
target: { target: {
@ -25,6 +29,10 @@
type: Array, //类型 type: Array, //类型
default: null, //默认值 default: null, //默认值
}, },
placeholder:{
type: String,
required: false
}
}); });
function changeTarget(value, node) { function changeTarget(value, node) {

View File

@ -31,8 +31,9 @@ export const getLabelName = (type: InfoType) => {
// 初始化开始节点信息 // 初始化开始节点信息
export const initStartProperties = () => { export const initStartProperties = () => {
const bpmnStore = useBpmnStore(); const bpmnStore = useBpmnStore();
initProperties(getStartNodeId, BpmnNodeKey.START, t('开始节点'), bpmnStore.processInfo.processId); initProperties(getStartNodeId, BpmnNodeKey.START, t('开始'), bpmnStore.processInfo.processId);
initProperties('Activity_draft', BpmnNodeKey.USER, '发起审批', bpmnStore.processInfo.processId); initProperties('Activity_draft', BpmnNodeKey.USER, '提交申请', bpmnStore.processInfo.processId);
initProperties('Flow_line_draft', BpmnNodeKey.SEQUENCEFLOW, '', bpmnStore.processInfo.processId);
}; };
// 修改流程属性 // 修改流程属性
export const changeProcessProperties = async (processConfig: ProcessConfig) => { export const changeProcessProperties = async (processConfig: ProcessConfig) => {
@ -163,13 +164,13 @@ export const getInitializeXml = (resourceId: string) => {
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_1u51epq" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.2.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.17.0"> <bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_1u51epq" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.2.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.17.0">
<bpmn:process id="${resourceId}" name="${resourceId}" isExecutable="true"> <bpmn:process id="${resourceId}" name="${resourceId}" isExecutable="true">
<bpmn:startEvent id="${getStartNodeId}" name="开始节点"> <bpmn:startEvent id="${getStartNodeId}" name="开始">
<bpmn:outgoing>Flow_line_draft</bpmn:outgoing> <bpmn:outgoing>Flow_line_draft</bpmn:outgoing>
</bpmn:startEvent> </bpmn:startEvent>
<bpmn:userTask id="Activity_draft" name="发起审批"> <bpmn:userTask id="Activity_draft" name="提交申请">
<bpmn:incoming>Flow_line_draft</bpmn:incoming> <bpmn:incoming>Flow_line_draft</bpmn:incoming>
</bpmn:userTask> </bpmn:userTask>
<bpmn:sequenceFlow id="Flow_line_draft" name="流程线" sourceRef="${getStartNodeId}" targetRef="Activity_draft" /> <bpmn:sequenceFlow id="Flow_line_draft" name="" sourceRef="${getStartNodeId}" targetRef="Activity_draft" />
</bpmn:process> </bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1m1pmsz"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1m1pmsz">

View File

@ -310,8 +310,8 @@ export const propertiesByType: Map<InfoType, any> = new Map([
]); ]);
// 根据节点类型获取节点名称 // 根据节点类型获取节点名称
export const nodeNameByType: Map<InfoType, any> = new Map([ export const nodeNameByType: Map<InfoType, any> = new Map([
[BpmnNodeKey.START, t('开始节点')], [BpmnNodeKey.START, t('开始')],
[BpmnNodeKey.END, t('结束节点')], [BpmnNodeKey.END, t('结束')],
[BpmnNodeKey.USER, t('用户节点')], [BpmnNodeKey.USER, t('用户节点')],
[BpmnNodeKey.SCRIPT, t('脚本节点')], [BpmnNodeKey.SCRIPT, t('脚本节点')],
[BpmnNodeKey.EXCLUSIVE, t('互斥网关')], [BpmnNodeKey.EXCLUSIVE, t('互斥网关')],
@ -319,6 +319,6 @@ export const nodeNameByType: Map<InfoType, any> = new Map([
[BpmnNodeKey.PARALLEL, t('并行网关')], [BpmnNodeKey.PARALLEL, t('并行网关')],
[BpmnNodeKey.SUB_PROCESS, t('子流程')], [BpmnNodeKey.SUB_PROCESS, t('子流程')],
[BpmnNodeKey.CALLACTIVITY, t('外部流程')], [BpmnNodeKey.CALLACTIVITY, t('外部流程')],
[BpmnNodeKey.SEQUENCEFLOW, t('流程线')], [BpmnNodeKey.SEQUENCEFLOW, t('')],
[BpmnNodeKey.PROCESS, t('流程模板')], [BpmnNodeKey.PROCESS, t('流程模板')],
]); ]);

View File

@ -203,7 +203,7 @@
} else { } else {
if (CanInitializeProperties(NewElement.id) && NewElement.type !== 'label') { if (CanInitializeProperties(NewElement.id) && NewElement.type !== 'label') {
let name = getLabelName(NewElement.type); let name = getLabelName(NewElement.type);
if (name) { if (name||NewElement.type==BpmnNodeKey.SEQUENCEFLOW) {
initProperties(NewElement.id, NewElement.type, name, NewElement.parent.id); initProperties(NewElement.id, NewElement.type, name, NewElement.parent.id);
const modeling = bpmnModeler.get('modeling'); const modeling = bpmnModeler.get('modeling');
modeling.updateProperties(NewElement, { name }); modeling.updateProperties(NewElement, { name });
@ -228,7 +228,7 @@
e.element.type !== 'label' e.element.type !== 'label'
) { ) {
let name = getLabelName(e.element.type); let name = getLabelName(e.element.type);
if (name) { if (name||e.element.type==BpmnNodeKey.SEQUENCEFLOW) {
initProperties(e.element.id, e.element.type, name, e.element.parent.id); initProperties(e.element.id, e.element.type, name, e.element.parent.id);
const modeling = bpmnModeler.get('modeling'); const modeling = bpmnModeler.get('modeling');
modeling.updateProperties(e.element, { name }); modeling.updateProperties(e.element, { name });