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