流程绑定表单可以选到历史表单
流程命名规则增加流程变量且流程变量可从表单赋值
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<a-tree-select
|
||||
:value="props.target.key"
|
||||
:value="props.target?.key"
|
||||
autoExpandParent
|
||||
treeDefaultExpandAll
|
||||
:tree-data="props.formSettingTree"
|
||||
@ -28,7 +28,7 @@
|
||||
});
|
||||
|
||||
function changeTarget(value, node) {
|
||||
let target = props.target;
|
||||
let target = props.target||{};
|
||||
target.formId = node.formId;
|
||||
target.key = value;
|
||||
target.formField = node.formField;
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
<a-button type="primary" @click="add">{{ t('添加') }}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<span>(在流程开始节点开始、用户节点结束、脚本节点结束事件中赋值)</span>
|
||||
<div class="list">
|
||||
<div class="row head">
|
||||
<span class="source">{{ t('赋值来源') }}</span>
|
||||
|
||||
@ -57,6 +57,11 @@
|
||||
v-model="record.apiConfig"
|
||||
:need-hide-components="true"
|
||||
/>
|
||||
<FormTargetItem
|
||||
v-if="record.type == OperationType.FORM_DATA"
|
||||
v-model:target="record.formConfig"
|
||||
:formSettingTree="formTree"
|
||||
/>
|
||||
</template>
|
||||
<template v-if="column.key === 'operation'">
|
||||
<a-popconfirm @confirm="deleteItem(index)">
|
||||
@ -80,6 +85,7 @@
|
||||
import Icon from '/@/components/Icon/index';
|
||||
//import ScriptApiSelect from '/@bpmn/components/arguments/ApiSelect.vue'; //之前是调的这个,现在换成ScriptApiSelect.vue
|
||||
import ScriptApiSelect from '/@bpmn/components/arguments/ScriptApiSelect.vue';
|
||||
import FormTargetItem from './FormTargetItem.vue';
|
||||
import { ProcessArgumentTreeData } from '/@bpmn/config/rules';
|
||||
import { OperationType } from '/@/enums/workflowEnum';
|
||||
import { useBpmnStore } from '/@bpmn/store/bpmn';
|
||||
@ -87,7 +93,10 @@
|
||||
import { randomNum } from '/@bpmn/util/random';
|
||||
import { updateProcessParameterRelevance } from '/@bpmn/config/useUpdateAllFormInfo';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import {computed} from "vue";
|
||||
import {getFormSettingTree} from "/@bpmn/config/info";
|
||||
const { t } = useI18n();
|
||||
const bpmnStore = useBpmnStore();
|
||||
const configColumns = [
|
||||
{
|
||||
title: t('参数名称'),
|
||||
@ -128,8 +137,25 @@
|
||||
id: OperationType.API,
|
||||
name: 'API',
|
||||
},
|
||||
{
|
||||
id: OperationType.FORM_DATA,
|
||||
name: '表单数据',
|
||||
},
|
||||
];
|
||||
let variableTree = ProcessArgumentTreeData;
|
||||
const formTree = computed(() => {
|
||||
const { info } = bpmnStore;
|
||||
let infoId="Event_start_node";//启动流程就需要获取表单数据,因此取开始节点表单
|
||||
if (infoId && info.has(infoId)) {
|
||||
let value = info.get(infoId);
|
||||
if (value?.formConfigs) {
|
||||
return getFormSettingTree(value.formConfigs, infoId, value.name, true);
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
return [];
|
||||
});
|
||||
// 新增
|
||||
function add() {
|
||||
processInfo.value.processParamConfigs.push({
|
||||
@ -145,6 +171,7 @@
|
||||
requestHeaderConfigs: [], //Header
|
||||
requestBodyConfigs: [], //Body
|
||||
},
|
||||
formConfig: { key: '', formId: '', formField: '' },
|
||||
});
|
||||
}
|
||||
//删除
|
||||
|
||||
Reference in New Issue
Block a user