样式调整
信息体组件自动带部门 tab标题显示业务功能名称 修改流程默认节点名称、修改流程线名称可为空 表单流程验证跳过
This commit is contained in:
@ -11,10 +11,14 @@
|
||||
value: 'key',
|
||||
}"
|
||||
@select="changeTarget"
|
||||
:placeholder="props.placeholder||t('请选择表单字段')"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {useI18n} from "/@/hooks/web/useI18n";
|
||||
|
||||
const { t } = useI18n();
|
||||
const emit = defineEmits(['update:target']);
|
||||
const props = defineProps({
|
||||
target: {
|
||||
@ -25,6 +29,10 @@
|
||||
type: Array, //类型
|
||||
default: null, //默认值
|
||||
},
|
||||
placeholder:{
|
||||
type: String,
|
||||
required: false
|
||||
}
|
||||
});
|
||||
|
||||
function changeTarget(value, node) {
|
||||
|
||||
@ -31,8 +31,9 @@ export const getLabelName = (type: InfoType) => {
|
||||
// 初始化开始节点信息
|
||||
export const initStartProperties = () => {
|
||||
const bpmnStore = useBpmnStore();
|
||||
initProperties(getStartNodeId, BpmnNodeKey.START, t('开始节点'), bpmnStore.processInfo.processId);
|
||||
initProperties('Activity_draft', BpmnNodeKey.USER, '发起审批', bpmnStore.processInfo.processId);
|
||||
initProperties(getStartNodeId, BpmnNodeKey.START, t('开始'), 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) => {
|
||||
@ -163,13 +164,13 @@ export const getInitializeXml = (resourceId: string) => {
|
||||
<?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: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:startEvent>
|
||||
<bpmn:userTask id="Activity_draft" name="发起审批">
|
||||
<bpmn:userTask id="Activity_draft" name="提交申请">
|
||||
<bpmn:incoming>Flow_line_draft</bpmn:incoming>
|
||||
</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>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1m1pmsz">
|
||||
|
||||
@ -310,8 +310,8 @@ export const propertiesByType: Map<InfoType, any> = new Map([
|
||||
]);
|
||||
// 根据节点类型获取节点名称
|
||||
export const nodeNameByType: Map<InfoType, any> = new Map([
|
||||
[BpmnNodeKey.START, t('开始节点')],
|
||||
[BpmnNodeKey.END, t('结束节点')],
|
||||
[BpmnNodeKey.START, t('开始')],
|
||||
[BpmnNodeKey.END, t('结束')],
|
||||
[BpmnNodeKey.USER, t('用户节点')],
|
||||
[BpmnNodeKey.SCRIPT, t('脚本节点')],
|
||||
[BpmnNodeKey.EXCLUSIVE, t('互斥网关')],
|
||||
@ -319,6 +319,6 @@ export const nodeNameByType: Map<InfoType, any> = new Map([
|
||||
[BpmnNodeKey.PARALLEL, t('并行网关')],
|
||||
[BpmnNodeKey.SUB_PROCESS, t('子流程')],
|
||||
[BpmnNodeKey.CALLACTIVITY, t('外部流程')],
|
||||
[BpmnNodeKey.SEQUENCEFLOW, t('流程线')],
|
||||
[BpmnNodeKey.SEQUENCEFLOW, t('')],
|
||||
[BpmnNodeKey.PROCESS, t('流程模板')],
|
||||
]);
|
||||
|
||||
@ -203,7 +203,7 @@
|
||||
} else {
|
||||
if (CanInitializeProperties(NewElement.id) && NewElement.type !== 'label') {
|
||||
let name = getLabelName(NewElement.type);
|
||||
if (name) {
|
||||
if (name||NewElement.type==BpmnNodeKey.SEQUENCEFLOW) {
|
||||
initProperties(NewElement.id, NewElement.type, name, NewElement.parent.id);
|
||||
const modeling = bpmnModeler.get('modeling');
|
||||
modeling.updateProperties(NewElement, { name });
|
||||
@ -228,7 +228,7 @@
|
||||
e.element.type !== 'label'
|
||||
) {
|
||||
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);
|
||||
const modeling = bpmnModeler.get('modeling');
|
||||
modeling.updateProperties(e.element, { name });
|
||||
|
||||
Reference in New Issue
Block a user