Compare commits
2 Commits
8d6afe004d
...
01be1d3280
| Author | SHA1 | Date |
|---|---|---|
|
|
01be1d3280 | |
|
|
ef05780cbf |
|
|
@ -229,6 +229,7 @@
|
|||
authFields: [],
|
||||
messageType: '',
|
||||
isInit: true,
|
||||
formTitle: '',
|
||||
};
|
||||
break;
|
||||
case 'bpmn:EndEvent':
|
||||
|
|
@ -256,6 +257,7 @@
|
|||
formRelations: [],
|
||||
formType: '1',
|
||||
formCode: '',
|
||||
formTitle: '',
|
||||
formVerison: '',
|
||||
formRelationId: '',
|
||||
formUrl: '',
|
||||
|
|
|
|||
|
|
@ -62,6 +62,9 @@
|
|||
:options="data.formRelations"
|
||||
/>
|
||||
</a-space-compact>
|
||||
<a-space-compact block>
|
||||
<a-input v-model:value="node.formTitle" placeholder="请输入表单标题" />
|
||||
</a-space-compact>
|
||||
</a-space>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="系统表单">
|
||||
|
|
@ -73,6 +76,9 @@
|
|||
@change="updateWfData('formUrl')"
|
||||
/>
|
||||
</a-space-compact>
|
||||
<a-space-compact block>
|
||||
<a-input v-model:value="node.formTitle" placeholder="请输入PC端表单标题" />
|
||||
</a-space-compact>
|
||||
<a-space-compact block>
|
||||
<a-input
|
||||
v-model:value="node.formAppUrl"
|
||||
|
|
@ -262,6 +268,7 @@
|
|||
onMounted(() => {
|
||||
if (props.element.type == 'bpmn:StartEvent') {
|
||||
const currentNode = flowWfDataStore.getWfDataNode(props.element.id);
|
||||
console.log(currentNode);
|
||||
if (currentNode) {
|
||||
node.value = currentNode;
|
||||
} else {
|
||||
|
|
@ -285,6 +292,7 @@
|
|||
function tabsChange() {
|
||||
data.formName = '';
|
||||
node.value.formCode = '';
|
||||
node.value.formTitle = '';
|
||||
node.value.formVerison = '';
|
||||
node.value.formRelationId = '';
|
||||
node.value.formUrl = '';
|
||||
|
|
@ -340,13 +348,13 @@
|
|||
obj.label = `${optionsElement.label} - ${childrenElement.label}`;
|
||||
obj.fieldName = childrenElement.componentProps.fieldName;
|
||||
result.push(obj);
|
||||
if(childrenElement.component === 'CardGroup'){
|
||||
result = cardComponentChild(childrenElement.componentProps.options, result)
|
||||
if (childrenElement.component === 'CardGroup') {
|
||||
result = cardComponentChild(childrenElement.componentProps.options, result);
|
||||
}
|
||||
});
|
||||
});
|
||||
return result
|
||||
}
|
||||
return result;
|
||||
};
|
||||
function loadFormScheme(strScheme, isChange) {
|
||||
const scheme = JSON.parse(strScheme);
|
||||
let fields: any[] = [];
|
||||
|
|
@ -462,7 +470,7 @@
|
|||
obj.fieldName = element.componentProps.fieldName;
|
||||
obj.label = `卡片组-${element.label}`;
|
||||
fields.push(obj);
|
||||
fields = cardComponentChild(element.componentProps.options, fields)
|
||||
fields = cardComponentChild(element.componentProps.options, fields);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -206,6 +206,9 @@
|
|||
:options="data.formRelations"
|
||||
/>
|
||||
</a-space-compact>
|
||||
<a-space-compact block>
|
||||
<a-input v-model:value="node.formTitle" placeholder="请输入表单标题" />
|
||||
</a-space-compact>
|
||||
</a-space>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="系统表单">
|
||||
|
|
@ -217,6 +220,9 @@
|
|||
@change="updateWfData('formUrl')"
|
||||
/>
|
||||
</a-space-compact>
|
||||
<a-space-compact block>
|
||||
<a-input v-model:value="node.formTitle" placeholder="请输入PC端表单标题" />
|
||||
</a-space-compact>
|
||||
<a-space-compact block>
|
||||
<a-input
|
||||
v-model:value="node.formAppUrl"
|
||||
|
|
@ -848,6 +854,7 @@
|
|||
// 切换自定义表单和系统表单
|
||||
function tabsChange() {
|
||||
data.formName = '';
|
||||
node.value.formTitle = '';
|
||||
node.value.formCode = '';
|
||||
node.value.formVerison = '';
|
||||
node.value.formRelationId = '';
|
||||
|
|
@ -894,14 +901,32 @@
|
|||
});
|
||||
loadFormScheme(obj.scheme, isChange);
|
||||
}
|
||||
const cardComponentChild = (data, result) => {
|
||||
data.forEach((optionsElement) => {
|
||||
optionsElement.children.forEach((childrenElement) => {
|
||||
let obj: any = childrenElement;
|
||||
obj.required = childrenElement.itemProps.required;
|
||||
obj.disabled = true;
|
||||
obj.ifShow = true;
|
||||
obj.label = `${optionsElement.label} - ${childrenElement.label}`;
|
||||
obj.fieldName = childrenElement.componentProps.fieldName;
|
||||
result.push(obj);
|
||||
if (childrenElement.component === 'CardGroup') {
|
||||
result = cardComponentChild(childrenElement.componentProps.options, result);
|
||||
}
|
||||
});
|
||||
});
|
||||
return result;
|
||||
};
|
||||
function loadFormScheme(strScheme, isChange) {
|
||||
const scheme = JSON.parse(strScheme);
|
||||
const fields: any[] = [];
|
||||
let fields: any[] = [];
|
||||
const rfields: {
|
||||
label?: string;
|
||||
value?: string;
|
||||
}[] = [];
|
||||
scheme.formInfo.tabList = cardNestStructure(scheme.formInfo.tabList);
|
||||
console.log(scheme.formInfo.tabList);
|
||||
scheme.formInfo.tabList.forEach((tabElement) => {
|
||||
tabElement.schemas.forEach(
|
||||
(element: { label?: string; field?: string; component: any; itemProps: any }) => {
|
||||
|
|
@ -912,7 +937,6 @@
|
|||
value: element.field,
|
||||
});
|
||||
}
|
||||
|
||||
if (
|
||||
![
|
||||
'Divider',
|
||||
|
|
@ -928,12 +952,13 @@
|
|||
) {
|
||||
let obj: any = element;
|
||||
obj.required = element.itemProps.required;
|
||||
// obj.componentProps.disabled = true;
|
||||
// obj.componentProps.disabled = false;
|
||||
obj.disabled = true;
|
||||
obj.ifShow = true;
|
||||
obj.fieldName = element.componentProps.fieldName;
|
||||
fields.push(obj);
|
||||
} else if (['Grid'].includes(element.component) || element.type == 'subTable') {
|
||||
console.log('gridtable');
|
||||
fields.push({
|
||||
field: `${element.field}_add`,
|
||||
label: `${element.label || '表格'}-添加按钮`,
|
||||
|
|
@ -962,7 +987,6 @@
|
|||
element.columns.forEach((child) => {
|
||||
child.children.forEach((t) => {
|
||||
fields.push({
|
||||
type: 'childData',
|
||||
gridprop: element.field,
|
||||
field: t.field,
|
||||
label: `${element.label || '表格'}-${t.label}`,
|
||||
|
|
@ -975,6 +999,7 @@
|
|||
});
|
||||
});
|
||||
} else if (['Card'].includes(element.component)) {
|
||||
console.log(3);
|
||||
element.columns.forEach((child) => {
|
||||
child.children.forEach((t) => {
|
||||
fields.push({
|
||||
|
|
@ -1008,18 +1033,7 @@
|
|||
obj.fieldName = element.componentProps.fieldName;
|
||||
obj.label = `卡片组-${element.label}`;
|
||||
fields.push(obj);
|
||||
element.componentProps.options.forEach((optionsElement) => {
|
||||
optionsElement.children.forEach((childrenElement) => {
|
||||
let obj: any = childrenElement;
|
||||
obj.required = childrenElement.itemProps.required;
|
||||
// obj.componentProps.disabled = false;
|
||||
obj.disabled = true;
|
||||
obj.ifShow = true;
|
||||
obj.label = `${optionsElement.label} - ${childrenElement.label}`;
|
||||
obj.fieldName = childrenElement.componentProps.fieldName;
|
||||
fields.push(obj);
|
||||
});
|
||||
});
|
||||
fields = cardComponentChild(element.componentProps.options, fields);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
|
@ -1029,6 +1043,7 @@
|
|||
node.value.authFields = fields;
|
||||
}
|
||||
}
|
||||
|
||||
function handleAddAuthField() {
|
||||
node.value.authFields.push({
|
||||
field: '',
|
||||
|
|
|
|||
|
|
@ -21,7 +21,15 @@
|
|||
</a-button>
|
||||
</div>
|
||||
<a-tabs v-model:activeKey="activeName" @change="changeActive">
|
||||
<a-tab-pane key="form" tab="表单信息" v-if="formVisble">
|
||||
<a-tab-pane
|
||||
key="form"
|
||||
:tab="
|
||||
designerData.formCurrentNode.formTitle
|
||||
? designerData.formCurrentNode.formTitle
|
||||
: '表单信息'
|
||||
"
|
||||
v-if="formVisble"
|
||||
>
|
||||
<FormViewer
|
||||
ref="formBoxRef"
|
||||
:formConfig="formConfig"
|
||||
|
|
@ -219,30 +227,34 @@
|
|||
formBoxRef.value
|
||||
.getForm()
|
||||
.then(async (res) => {
|
||||
if (!props.isUpdate) {
|
||||
res[designerData.formCurrentNode.formRelationId] = processId;
|
||||
querys.pkeyValue = processId;
|
||||
}
|
||||
console.log(res);
|
||||
for (var item in res) {
|
||||
if (res[item] == undefined) {
|
||||
res[item] = '';
|
||||
if (item.search('_input_guid') != -1 && !props.isUpdate) {
|
||||
res[item] = buildGUID();
|
||||
}
|
||||
} else {
|
||||
if (props.isUpdate) {
|
||||
if (item.search('_input_guid') != -1) {
|
||||
querys.pkeyValue = res[item];
|
||||
if (res) {
|
||||
if (!props.isUpdate) {
|
||||
res[designerData.formCurrentNode.formRelationId] = processId;
|
||||
querys.pkeyValue = processId;
|
||||
}
|
||||
console.log(res);
|
||||
for (var item in res) {
|
||||
if (res[item] == undefined) {
|
||||
res[item] = '';
|
||||
if (item.search('_input_guid') != -1 && !props.isUpdate) {
|
||||
res[item] = buildGUID();
|
||||
}
|
||||
} else {
|
||||
if (props.isUpdate) {
|
||||
if (item.search('_input_guid') != -1) {
|
||||
querys.pkeyValue = res[item];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(res);
|
||||
querys.data = JSON.stringify(res);
|
||||
const formValue = await functionsaveForm(querys);
|
||||
if (formValue) {
|
||||
handleCreateFlow(processId, querys.pkeyValue);
|
||||
console.log(res);
|
||||
querys.data = JSON.stringify(res);
|
||||
const formValue = await functionsaveForm(querys);
|
||||
if (formValue) {
|
||||
handleCreateFlow(processId, querys.pkeyValue);
|
||||
}
|
||||
} else {
|
||||
createMessage.error('请检查表单必填项');
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,15 @@
|
|||
</a-button>
|
||||
</div>
|
||||
<a-tabs v-model:activeKey="activeName" @change="changeActive">
|
||||
<a-tab-pane key="form" tab="表单信息" v-if="formVisble">
|
||||
<a-tab-pane
|
||||
key="form"
|
||||
:tab="
|
||||
designerData.formCurrentNode.formTitle
|
||||
? designerData.formCurrentNode.formTitle
|
||||
: '表单信息'
|
||||
"
|
||||
v-if="formVisble"
|
||||
>
|
||||
<FormViewer
|
||||
ref="formBoxRef"
|
||||
:formConfig="formConfig"
|
||||
|
|
@ -25,7 +33,15 @@
|
|||
v-if="formVisble"
|
||||
/>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="form" tab="系统表单信息" v-if="formUrlVisble">
|
||||
<a-tab-pane
|
||||
key="form"
|
||||
:tab="
|
||||
designerData.formCurrentNode.formTitle
|
||||
? designerData.formCurrentNode.formTitle
|
||||
: '系统表单信息'
|
||||
"
|
||||
v-if="formUrlVisble"
|
||||
>
|
||||
<AsyncComponent ref="pcForm" />
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="flow" tab="流程信息" force-render>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,15 @@
|
|||
<a-layout>
|
||||
<a-layout-content>
|
||||
<a-tabs v-model:activeKey="activeName" @change="changeActive">
|
||||
<a-tab-pane key="form" tab="表单信息" v-if="formVisble">
|
||||
<a-tab-pane
|
||||
key="form"
|
||||
:tab="
|
||||
designerData.formCurrentNode.formTitle
|
||||
? designerData.formCurrentNode.formTitle
|
||||
: '表单信息'
|
||||
"
|
||||
v-if="formVisble"
|
||||
>
|
||||
<FormViewer
|
||||
ref="formBoxRef"
|
||||
:formConfig="formConfig"
|
||||
|
|
@ -21,7 +29,15 @@
|
|||
v-if="formVisble"
|
||||
/>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="form" tab="系统表单信息" v-if="formUrlVisble">
|
||||
<a-tab-pane
|
||||
key="form"
|
||||
:tab="
|
||||
designerData.formCurrentNode.formTitle
|
||||
? designerData.formCurrentNode.formTitle
|
||||
: '系统表单信息'
|
||||
"
|
||||
v-if="formUrlVisble"
|
||||
>
|
||||
<AsyncComponent ref="pcForm" />
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="flow" tab="流程信息" force-render>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,15 @@
|
|||
<a-layout>
|
||||
<a-layout-content>
|
||||
<a-tabs v-model:activeKey="activeName" @change="changeActive">
|
||||
<a-tab-pane key="form" tab="表单信息" v-if="formVisble">
|
||||
<a-tab-pane
|
||||
key="form"
|
||||
:tab="
|
||||
designerData.formCurrentNode.formTitle
|
||||
? designerData.formCurrentNode.formTitle
|
||||
: '表单信息'
|
||||
"
|
||||
v-if="formVisble"
|
||||
>
|
||||
<FormViewer
|
||||
ref="formBoxRef"
|
||||
:formConfig="formConfig"
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
const auditOpen = ref(false);
|
||||
const previewOpen = ref(false);
|
||||
const childRecord = ref();
|
||||
|
||||
// searchInfo.name = 'deded';
|
||||
const [registerTable, { reload }] = useTable({
|
||||
api: getLoadMyUncompletedPage,
|
||||
columns: [
|
||||
|
|
|
|||
Loading…
Reference in New Issue