--添加全局数据版本字段
This commit is contained in:
@ -44,7 +44,7 @@
|
|||||||
v-model:value="record.fieldName"
|
v-model:value="record.fieldName"
|
||||||
:placeholder="t(`请填写{title}`, { title: column.title })"
|
:placeholder="t(`请填写{title}`, { title: column.title })"
|
||||||
@change="changeComponentName(record, 'field')"
|
@change="changeComponentName(record, 'field')"
|
||||||
:disabled="record.key === 'rule_user_id'"
|
:disabled="record.key === 'rule_user_id' || record.key === 'data_version'"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.dataIndex === 'fieldLength'">
|
<template v-else-if="column.dataIndex === 'fieldLength'">
|
||||||
@ -58,7 +58,7 @@
|
|||||||
<a-input
|
<a-input
|
||||||
v-model:value.number="record.fieldComment"
|
v-model:value.number="record.fieldComment"
|
||||||
:placeholder="t('请填写备注')"
|
:placeholder="t('请填写备注')"
|
||||||
:disabled="record.key === 'rule_user_id'"
|
:disabled="record.key === 'rule_user_id' || record.key === 'data_version'"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.dataIndex === 'fieldType'">
|
<template v-else-if="column.dataIndex === 'fieldType'">
|
||||||
@ -558,11 +558,24 @@
|
|||||||
showActionButtonGroup: false,
|
showActionButtonGroup: false,
|
||||||
});
|
});
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const { outputConfig } = generatorConfig!;
|
const { outputConfig,tableStructureConfigs} = generatorConfig!;
|
||||||
if (
|
if (
|
||||||
!isCustomForm &&
|
!isCustomForm &&
|
||||||
(outputConfig?.className || outputConfig?.comment || outputConfig?.outputArea)
|
(outputConfig?.className || outputConfig?.comment || outputConfig?.outputArea)
|
||||||
) {
|
) {
|
||||||
|
if(tableStructureConfigs && tableStructureConfigs.length > 0){
|
||||||
|
let tableConf = tableStructureConfigs[0];
|
||||||
|
let hasVersion = tableConf.tableFieldConfigs.some((item) => item.key=='data_version');
|
||||||
|
if(!hasVersion){
|
||||||
|
tableConf.tableFieldConfigs.push({
|
||||||
|
key: 'data_version',
|
||||||
|
fieldName: 'dataVersion',
|
||||||
|
fieldLength: 10,
|
||||||
|
fieldType: 0,
|
||||||
|
fieldComment: t('数据版本'),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
setFieldsValue({
|
setFieldsValue({
|
||||||
className: outputConfig?.className,
|
className: outputConfig?.className,
|
||||||
comment: outputConfig?.comment,
|
comment: outputConfig?.comment,
|
||||||
|
|||||||
Reference in New Issue
Block a user