Merge pull request '修复 错误的变量' (#14) from orzsoft_admin/Admin.NET.Pro:main into main
Reviewed-on: http://101.43.53.74:3000/Admin.NET/Admin.NET.Pro/pulls/14
This commit is contained in:
commit
f3ef7cb69d
@ -190,7 +190,7 @@ import { useVxeTable } from '/@@/hooks/vxeTableOptionsHook';
|
|||||||
|
|
||||||
@foreach (var column in Model.TableField) {
|
@foreach (var column in Model.TableField) {
|
||||||
@if(@column.WhetherTable == "Y") {
|
@if(@column.WhetherTable == "Y") {
|
||||||
import { SysFile } from '/@@/api-services/models';
|
@:import { SysFile } from '/@@/api-services/models';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,10 +211,10 @@ import ModifyRecord from '/@@/components/table/modifyRecord.vue';
|
|||||||
import { getAPI } from '/@@/utils/axios-utils';
|
import { getAPI } from '/@@/utils/axios-utils';
|
||||||
|
|
||||||
// 接口
|
// 接口
|
||||||
import { @(@Model.EntityName)Api } from '/@@/api-services/api';
|
import { @(@Model.ClassName)Api } from '/@@/api-services/api';
|
||||||
|
|
||||||
// 模型
|
// 模型
|
||||||
import { @(@Model.EntityName), @(@Model.EntityName)Input, @(@Model.EntityName)Output } from '/@@/api-services/models';
|
import { @(@Model.ClassName), @(@Model.ClassName)Input, @(@Model.ClassName)Output } from '/@@/api-services/models';
|
||||||
|
|
||||||
// 子窗口对象
|
// 子窗口对象
|
||||||
const xGrid = ref<VxeGridInstance>();
|
const xGrid = ref<VxeGridInstance>();
|
||||||
@ -243,8 +243,8 @@ const state = reactive({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 表格参数配置
|
// 表格参数配置
|
||||||
const options = useVxeTable<@(@Model.EntityName)>({
|
const options = useVxeTable<@(@Model.ClassName)>({
|
||||||
id: '@(@Model.EntityName)',
|
id: '@(@Model.ClassName)',
|
||||||
name: '@(@Model.BusName)',
|
name: '@(@Model.BusName)',
|
||||||
columns: [
|
columns: [
|
||||||
{ type: 'seq', title: '序号', width: 60, fixed: 'left' },
|
{ type: 'seq', title: '序号', width: 60, fixed: 'left' },
|
||||||
@ -301,7 +301,7 @@ const handleQuery = async (reset = false) => {
|
|||||||
// 获取数据
|
// 获取数据
|
||||||
const fetchData = async (tableParams: any) => {
|
const fetchData = async (tableParams: any) => {
|
||||||
let params = Object.assign(state.queryParams, state.tableParams, tableParams);
|
let params = Object.assign(state.queryParams, state.tableParams, tableParams);
|
||||||
return getAPI(@(@Model.EntityName)Api).api@(@Model.EntityName)PagePost(params);
|
return getAPI(@(@Model.ClassName)Api).api@(@Model.ClassName)PagePost(params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 重置操作
|
// 重置操作
|
||||||
@ -365,7 +365,7 @@ const handleDelete = (row: any) => {
|
|||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
await getAPI(@(@Model.EntityName)Api).api@(@Model.EntityName)DeletePost({ id: row.id });
|
await getAPI(@(@Model.ClassName)Api).api@(@Model.ClassName)DeletePost({ id: row.id });
|
||||||
handleQuery();
|
handleQuery();
|
||||||
ElMessage.success('删除成功');
|
ElMessage.success('删除成功');
|
||||||
})
|
})
|
||||||
@ -377,7 +377,7 @@ const handleDelete = (row: any) => {
|
|||||||
@:const @LowerFirstLetter(@column.FkEntityName)@(@column.PropertyName)DropdownList = ref<any>([]);
|
@:const @LowerFirstLetter(@column.FkEntityName)@(@column.PropertyName)DropdownList = ref<any>([]);
|
||||||
@:const get@(@column.FkEntityName)@(@column.PropertyName)DropdownList = async () => {
|
@:const get@(@column.FkEntityName)@(@column.PropertyName)DropdownList = async () => {
|
||||||
//@:let list = await get@(@column.FkEntityName)@(@column.PropertyName)Dropdown();
|
//@:let list = await get@(@column.FkEntityName)@(@column.PropertyName)Dropdown();
|
||||||
@:let list = await getAPI(@(@Model.EntityName)Api).api@(@Model.EntityName)@(@column.FkEntityName)@(@column.PropertyName)DropdownGet();
|
@:let list = await getAPI(@(@Model.ClassName)Api).api@(@Model.ClassName)@(@column.FkEntityName)@(@column.PropertyName)DropdownGet();
|
||||||
@:@LowerFirstLetter(@column.FkEntityName)@(@column.PropertyName)DropdownList.value = list.data.result ?? [];
|
@:@LowerFirstLetter(@column.FkEntityName)@(@column.PropertyName)DropdownList.value = list.data.result ?? [];
|
||||||
@:};
|
@:};
|
||||||
@:get@(@column.FkEntityName)@(@column.PropertyName)DropdownList();
|
@:get@(@column.FkEntityName)@(@column.PropertyName)DropdownList();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user