update 移除所有的节点描述

This commit is contained in:
LiuHao 2024-01-22 21:53:54 +08:00
parent 53a682250d
commit 4923f3c667
7 changed files with 7 additions and 32 deletions

View File

@ -30,14 +30,6 @@ export default (ops: Options) => {
updateProperties({ name: newVal }); updateProperties({ name: newVal });
} }
}; };
const documentationChange = (newVal: string) => {
if (newVal) {
const documentationElement = modeler.get<Moddle>('moddle').create('bpmn:Documentation', { text: newVal });
updateProperties({ documentation: [documentationElement] });
} else {
updateProperties({ documentation: null });
}
};
return { return {
elementType, elementType,
@ -45,7 +37,6 @@ export default (ops: Options) => {
updateProperties, updateProperties,
idChange, idChange,
nameChange, nameChange
documentationChange
}; };
}; };

View File

@ -7,9 +7,6 @@
<el-form-item prop="name" label="节点名称"> <el-form-item prop="name" label="节点名称">
<el-input v-model="formData.name" @change="nameChange"> </el-input> <el-input v-model="formData.name" @change="nameChange"> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="documentation" label="节点描述">
<el-input v-model="formData.documentation" @change="documentationChange"> </el-input>
</el-form-item>
<el-form-item label="执行监听器" style="margin-bottom: 0"> </el-form-item> <el-form-item label="执行监听器" style="margin-bottom: 0"> </el-form-item>
<ExecutionListener :modeler="modeler" :element="element"></ExecutionListener> <ExecutionListener :modeler="modeler" :element="element"></ExecutionListener>
</el-form> </el-form>
@ -29,7 +26,7 @@ interface PropType {
const props = withDefaults(defineProps<PropType>(), { const props = withDefaults(defineProps<PropType>(), {
categorys: () => [] categorys: () => []
}); });
const { documentationChange, nameChange, idChange } = usePanel({ const { nameChange, idChange } = usePanel({
modeler: props.modeler, modeler: props.modeler,
element: toRaw(props.element) element: toRaw(props.element)
}); });

View File

@ -25,17 +25,14 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance;
interface PropType { interface PropType {
modeler: Modeler; modeler: Modeler;
element: Element; element: Element;
categorys?: any[];
} }
const props = withDefaults(defineProps<PropType>(), { const props = withDefaults(defineProps<PropType>(), {});
categorys: () => []
});
const { parse, formData } = useParseElement<ProcessPanel>({ const { parse, formData } = useParseElement<ProcessPanel>({
modeler: props.modeler, modeler: props.modeler,
element: toRaw(props.element) element: toRaw(props.element)
}); });
const { idChange, nameChange, documentationChange } = usePanel({ const { idChange, nameChange } = usePanel({
modeler: props.modeler, modeler: props.modeler,
element: toRaw(props.element) element: toRaw(props.element)
}); });

View File

@ -7,9 +7,6 @@
<el-form-item prop="name" label="节点名称"> <el-form-item prop="name" label="节点名称">
<el-input v-model="formData.name" @change="nameChange"> </el-input> <el-input v-model="formData.name" @change="nameChange"> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="documentation" label="节点描述">
<el-input v-model="formData.documentation" @change="documentationChange"> </el-input>
</el-form-item>
<el-form-item prop="conditionExpression" label="跳过条件"> <el-form-item prop="conditionExpression" label="跳过条件">
<el-input v-model="formData.conditionExpression" @change="conditionExpressionChange"> </el-input> <el-input v-model="formData.conditionExpression" @change="conditionExpressionChange"> </el-input>
</el-form-item> </el-form-item>
@ -35,7 +32,7 @@ interface PropType {
const props = withDefaults(defineProps<PropType>(), { const props = withDefaults(defineProps<PropType>(), {
categorys: () => [] categorys: () => []
}); });
const { documentationChange, nameChange, idChange, updateProperties } = usePanel({ const { nameChange, idChange, updateProperties } = usePanel({
modeler: props.modeler, modeler: props.modeler,
element: toRaw(props.element) element: toRaw(props.element)
}); });

View File

@ -7,9 +7,6 @@
<el-form-item prop="name" label="节点名称"> <el-form-item prop="name" label="节点名称">
<el-input v-model="formData.name" @change="nameChange"> </el-input> <el-input v-model="formData.name" @change="nameChange"> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="documentation" label="节点描述">
<el-input v-model="formData.documentation" @change="documentationChange"> </el-input>
</el-form-item>
<el-form-item label="执行监听器" style="margin-bottom: 0"> </el-form-item> <el-form-item label="执行监听器" style="margin-bottom: 0"> </el-form-item>
<ExecutionListener :modeler="modeler" :element="element"></ExecutionListener> <ExecutionListener :modeler="modeler" :element="element"></ExecutionListener>
</el-form> </el-form>
@ -29,7 +26,7 @@ interface PropType {
const props = withDefaults(defineProps<PropType>(), { const props = withDefaults(defineProps<PropType>(), {
categorys: () => [] categorys: () => []
}); });
const { documentationChange, nameChange, idChange } = usePanel({ const { nameChange, idChange } = usePanel({
modeler: props.modeler, modeler: props.modeler,
element: toRaw(props.element) element: toRaw(props.element)
}); });

View File

@ -7,9 +7,6 @@
<el-form-item prop="name" label="节点名称"> <el-form-item prop="name" label="节点名称">
<el-input v-model="formData.name" @change="nameChange"> </el-input> <el-input v-model="formData.name" @change="nameChange"> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="documentation" label="节点描述">
<el-input v-model="formData.documentation" @change="documentationChange"> </el-input>
</el-form-item>
<el-form-item prop="userType" label="人员类型"> <el-form-item prop="userType" label="人员类型">
<el-input v-model="formData.userType"> </el-input> <el-input v-model="formData.userType"> </el-input>
</el-form-item> </el-form-item>
@ -34,7 +31,7 @@ interface PropType {
const props = withDefaults(defineProps<PropType>(), { const props = withDefaults(defineProps<PropType>(), {
categorys: () => [] categorys: () => []
}); });
const { documentationChange, nameChange, idChange } = usePanel({ const { nameChange, idChange } = usePanel({
modeler: props.modeler, modeler: props.modeler,
element: toRaw(props.element) element: toRaw(props.element)
}); });

View File

@ -23,7 +23,6 @@ declare module 'bpmnDesign' {
interface BasePanel { interface BasePanel {
id: string; id: string;
name: string; name: string;
documentation?: string;
} }
export interface ProcessPanel extends BasePanel { export interface ProcessPanel extends BasePanel {
processCategory: string; processCategory: string;