修复 错误的变量
This commit is contained in:
parent
31b3e87ff7
commit
1f8699670f
@ -190,7 +190,7 @@ import { useVxeTable } from '/@@/hooks/vxeTableOptionsHook';
|
||||
|
||||
@foreach (var column in Model.TableField) {
|
||||
@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 { @(@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>();
|
||||
@ -243,8 +243,8 @@ const state = reactive({
|
||||
});
|
||||
|
||||
// 表格参数配置
|
||||
const options = useVxeTable<@(@Model.EntityName)>({
|
||||
id: '@(@Model.EntityName)',
|
||||
const options = useVxeTable<@(@Model.ClassName)>({
|
||||
id: '@(@Model.ClassName)',
|
||||
name: '@(@Model.BusName)',
|
||||
columns: [
|
||||
{ type: 'seq', title: '序号', width: 60, fixed: 'left' },
|
||||
@ -301,7 +301,7 @@ const handleQuery = async (reset = false) => {
|
||||
// 获取数据
|
||||
const fetchData = async (tableParams: any) => {
|
||||
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: '取消',
|
||||
type: 'warning',
|
||||
}).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();
|
||||
ElMessage.success('删除成功');
|
||||
})
|
||||
@ -377,7 +377,7 @@ const handleDelete = (row: any) => {
|
||||
@:const @LowerFirstLetter(@column.FkEntityName)@(@column.PropertyName)DropdownList = ref<any>([]);
|
||||
@:const get@(@column.FkEntityName)@(@column.PropertyName)DropdownList = async () => {
|
||||
//@: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 ?? [];
|
||||
@:};
|
||||
@:get@(@column.FkEntityName)@(@column.PropertyName)DropdownList();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user