😎库表管理排除zero_开头的表,service.cs.vm模板修复分页查询有外键的时候排序字段不明确
This commit is contained in:
parent
b59780ae4e
commit
c0f44005e1
@ -109,7 +109,11 @@ if (@column.QueryWhether == "Y"){
|
|||||||
} else {
|
} else {
|
||||||
@:.Select<@(@Model.ClassName)Output>();
|
@:.Select<@(@Model.ClassName)Output>();
|
||||||
}
|
}
|
||||||
return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize);
|
@if(@Model.TableField.Any(x=>x.EffectType == "fk")){
|
||||||
|
@:return await query.OrderBuilder(input,"[u].","[@(PKName)]").ToPagedListAsync(input.Page, input.PageSize);
|
||||||
|
}else{
|
||||||
|
@:return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -190,7 +194,6 @@ if(@column.EffectType == "fk" && (@column.WhetherAddUpdate == "Y" || column.Quer
|
|||||||
@:/// <summary>
|
@:/// <summary>
|
||||||
@:/// 获取@(@column.ColumnComment)列表
|
@:/// 获取@(@column.ColumnComment)列表
|
||||||
@:/// </summary>
|
@:/// </summary>
|
||||||
@:/// <param name="input"></param>
|
|
||||||
@:/// <returns></returns>
|
@:/// <returns></returns>
|
||||||
@:[ApiDescriptionSettings(Name = "@(@column.FkEntityName)@(@column.PropertyName)Dropdown"), HttpGet]
|
@:[ApiDescriptionSettings(Name = "@(@column.FkEntityName)@(@column.PropertyName)Dropdown"), HttpGet]
|
||||||
@:public async Task<dynamic> @(@column.FkEntityName)@(@column.PropertyName)Dropdown()
|
@:public async Task<dynamic> @(@column.FkEntityName)@(@column.PropertyName)Dropdown()
|
||||||
|
|||||||
@ -83,9 +83,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
@<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10">
|
@<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10">
|
||||||
@<el-form-item>
|
@<el-form-item @(Model.QueryWhetherList.Count > 0?"":"label-width=\"0px\"")>
|
||||||
@<el-button-group style="display: flex; align-items: center;">
|
@<el-button-group style="display: flex; align-items: center;">
|
||||||
@<el-button type="primary" icon="ele-Search" @@click="handleQuery" v-auth="'@(@Model.LowerClassName):page'"> 查询 </el-button>
|
@<el-button type="primary" icon="ele-Search" @@click="handleQuery" v-auth="'@(@Model.LowerClassName):page'"> @(Model.QueryWhetherList.Count > 0?"查询":"刷新") </el-button>
|
||||||
@if(Model.QueryWhetherList.Count > 0){
|
@if(Model.QueryWhetherList.Count > 0){
|
||||||
@:<el-button icon="ele-Refresh" @@click="() => queryParams = {}"> 重置 </el-button>
|
@:<el-button icon="ele-Refresh" @@click="() => queryParams = {}"> 重置 </el-button>
|
||||||
@if(haveLikeCdt){
|
@if(haveLikeCdt){
|
||||||
|
|||||||
@ -134,7 +134,13 @@ const handleQueryTable = async () => {
|
|||||||
state.loading = true;
|
state.loading = true;
|
||||||
|
|
||||||
var res = await getAPI(SysDatabaseApi).apiSysDatabaseTableListConfigIdGet(state.configId);
|
var res = await getAPI(SysDatabaseApi).apiSysDatabaseTableListConfigIdGet(state.configId);
|
||||||
state.tableData = res.data.result ?? [];
|
let tableData = res.data.result ?? [];
|
||||||
|
tableData.forEach((element: any) => {
|
||||||
|
// 排除 zero_ 开头的表
|
||||||
|
if (!element.name.startsWith('zero_')) {
|
||||||
|
state.tableData.push(element);
|
||||||
|
}
|
||||||
|
});
|
||||||
state.loading = false;
|
state.loading = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user