表单设计->添加更新表结构新的方式
https://e.gitee.com/gdyditc/projects/725584/tasks/table?issue=IBNWJ7
This commit is contained in:
@ -22,9 +22,9 @@
|
||||
@change="handleOperator(record)"
|
||||
v-else
|
||||
>
|
||||
<a-radio :value="1" v-if="record.status !== 2">沿用旧表</a-radio>
|
||||
<a-radio :value="2">创建新表(重新生成表名)</a-radio>
|
||||
<a-radio :value="3">
|
||||
<a-radio :style="radioStyle" :value="1" v-if="record.status !== 2">沿用旧表</a-radio>
|
||||
<a-radio :style="radioStyle" :value="2">创建新表(重新生成表名)</a-radio>
|
||||
<a-radio :style="radioStyle" :value="3">
|
||||
覆盖旧表(
|
||||
<span class="text-red-500" v-if="record.status === 1">此操作会清空旧表数据</span>
|
||||
<span class="text-red-500" v-else>
|
||||
@ -32,6 +32,9 @@
|
||||
</span>
|
||||
)
|
||||
</a-radio>
|
||||
<a-radio :style="radioStyle" :value="5">更新表
|
||||
<span class="text-red-500">此操作会保留原表(含数据),只更新字段</span>
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'newTableName'">
|
||||
@ -46,7 +49,7 @@
|
||||
</BasicModal>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { inject } from 'vue';
|
||||
import { inject,reactive } from 'vue';
|
||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||
import { BasicTable, useTable, BasicColumn } from '/@/components/Table';
|
||||
import { GeneratorConfig } from '/@/model/generator/generatorConfig';
|
||||
@ -54,6 +57,11 @@
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
|
||||
const radioStyle = reactive({
|
||||
display: 'flex',
|
||||
height: '30px',
|
||||
lineHeight: '30px',
|
||||
});
|
||||
const { notification } = useMessage();
|
||||
const { t } = useI18n();
|
||||
|
||||
@ -104,8 +112,8 @@
|
||||
afterFetch: (data) => {
|
||||
if (Array.isArray(data) && data.length) {
|
||||
data.map((item) => {
|
||||
const operator = item.status === 3 ? 4 : item.status === 2 ? 2 : 1;
|
||||
item.operator = operator;
|
||||
// const operator = item.status === 3 ? 4 : item.status === 2 ? 2 : 1;
|
||||
item.operator = 5;
|
||||
item.newTableName = '';
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user