feat 调整 mysql 、pgsql 初始化数据; 完善pgsql 兼容性,适配代码生成逻辑

This commit is contained in:
孟帅
2025-11-08 12:40:03 +08:00
parent 3989996448
commit a7234bc330
49 changed files with 5360 additions and 5201 deletions

View File

@@ -72,7 +72,7 @@
<n-button @click="closeForm">
取消
</n-button>
<n-button type="info" :loading="formBtnLoading" @click="confirmForm">
<n-button type="info" :loading="formBtnLoading" :disabled="!isFormValid" @click="confirmForm">
确定
</n-button>
</n-space>
@@ -106,6 +106,7 @@
const dialogWidth = computed(() => {
return adaModalWidth(840);
});
const isFormValid = ref(true);
// 提交表单
function confirmForm(e) {

View File

@@ -13,26 +13,27 @@ const { hasPermission } = usePermission();
const $message = window['$message'];
export class State {
public id = 0; // ID
public categoryId = null; // 测试分类
public title = ''; // 标题
public description = ''; // 描述
public content = ''; // 内容
public image = ''; // 单图
public attachfile = ''; // 附件
public cityId = null; // 所在城市
public switch = 2; // 显示开关
public sort = 0; // 排序
public status = 1; // 状态
public createdBy = 0; // 创建者
public createdBySumma?: null | MemberSumma = null; // 创建者摘要信息
public updatedBy = 0; // 更新者
public updatedBySumma?: null | MemberSumma = null; // 更新者摘要信息
public deletedBy = 0; // 删除者
public createdAt = ''; // 创建时间
public updatedAt = ''; // 修改时间
public deletedAt = ''; // 删除时间
public id = 0;//ID
public categoryId = null;//测试分类
public title = '';//标题
public description = '';//描述
public content = '';//内容
public image = '';//单图
public attachfile = '';//附件
public cityId = null;//所在城市
public switch = 2;//显示开关
public sort = 0;//排序
public status = 1;//状态
public createdBy = 0;//创建者
public createdBySumma?: null | MemberSumma = null;//创建者摘要信息
public updatedBy = 0;//更新者
public updatedBySumma?: null | MemberSumma = null;//更新者摘要信息
public deletedBy = 0;//删除者
public deletedBySumma?: null | MemberSumma = null;//删除者摘要信息
public createdAt = '';//创建时间
public updatedAt = '';//修改时间
public deletedAt = '';//删除时间
constructor(state?: Partial<State>) {
if (state) {
Object.assign(this, state);
@@ -124,6 +125,17 @@ export const schemas = ref<FormSchema[]>([
},
},
},
{
field: 'deletedBy',
component: 'NInput',
label: '删除者',
componentProps: {
placeholder: '请输入ID|用户名|姓名|手机号',
onUpdateValue: (e: any) => {
console.log(e);
},
},
},
{
field: 'createdAt',
component: 'NDatePicker',
@@ -233,6 +245,15 @@ export const columns = [
return renderPopoverMemberSumma(row.updatedBySumma);
},
},
{
title: '删除者',
key: 'deletedBy',
align: 'left',
width: -1,
render(row: State) {
return renderPopoverMemberSumma(row.deletedBySumma);
},
},
{
title: '创建时间',
key: 'createdAt',

View File

@@ -184,7 +184,7 @@
code: '',
name: '',
remark: '',
sort: null,
sort: 10,
status: 1,
};
const formParams = ref<any>(resetFormParams);