|
|
@@ -1,4 +1,4 @@
|
|
|
-<template>
|
|
|
+<template>
|
|
|
<div class="@(@Model.LowerClassName)-container">
|
|
|
<el-card shadow="hover" :body-style="{ paddingBottom: '0' }">
|
|
|
@if(Model.QueryWhetherList.Count > 0){
|
|
|
@@ -22,7 +22,7 @@
|
|
|
}else if(@column.EffectType == "fk"){
|
|
|
@:<el-form-item label="@column.ColumnComment">
|
|
|
@:<el-select clearable="" filterable="" v-model="queryParams.@(@column.LowerColumnName)" placeholder="请选择@(@column.ColumnComment)">
|
|
|
- @:<el-option v-for="(item,index) in @LowerFirstLetter(@column.FkEntityName)DropdownList" :key="index" :value="item.value" :label="item.label" />
|
|
|
+ @:<el-option v-for="(item,index) in @LowerFirstLetter(@column.FkEntityName)@(@column.ColumnName)DropdownList" :key="index" :value="item.value" :label="item.label" />
|
|
|
@:
|
|
|
</el-select>
|
|
|
@:
|
|
|
@@ -138,13 +138,16 @@
|
|
|
import { ref } from "vue";
|
|
|
import { ElMessageBox, ElMessage } from "element-plus";
|
|
|
import { auth } from '/@@/utils/authFunction';
|
|
|
+ @if(@Model.TableField.Any(x=>x.EffectType == "ConstSelector")){
|
|
|
+ @:import { codeToName, getConstType } from "/@@/utils/constHelper";
|
|
|
+ }
|
|
|
//import { formatDate } from '/@@/utils/formatTime';
|
|
|
|
|
|
import editDialog from '/@@/views/main/@(@Model.LowerClassName)/component/editDialog.vue'
|
|
|
import { page@(@Model.ClassName), delete@(@Model.ClassName) } from '/@@/api/main/@(@Model.LowerClassName)';
|
|
|
@foreach (var column in Model.QueryWhetherList){
|
|
|
if(@column.EffectType == "fk"){
|
|
|
- @:import { get@(@column.FkEntityName)Dropdown } from '/@@/api/main/@(@Model.LowerClassName)';
|
|
|
+ @:import { get@(@column.FkEntityName)@(@column.ColumnName)Dropdown } from '/@@/api/main/@(@Model.LowerClassName)';
|
|
|
}
|
|
|
}
|
|
|
@foreach (var column in Model.QueryWhetherList){
|
|
|
@@ -229,12 +232,12 @@
|
|
|
|
|
|
@foreach (var column in Model.QueryWhetherList){
|
|
|
if(@column.EffectType == "fk"){
|
|
|
- @:const @LowerFirstLetter(@column.FkEntityName)DropdownList = ref<any>([]);
|
|
|
-@:const get@(@column.FkEntityName)DropdownList = async () => {
|
|
|
- @:let list = await get@(@column.FkEntityName)Dropdown();
|
|
|
- @:@LowerFirstLetter(@column.FkEntityName)DropdownList.value = list.data.result ?? [];
|
|
|
+ @:const @LowerFirstLetter(@column.FkEntityName)@(@column.ColumnName)DropdownList = ref<any>([]);
|
|
|
+@:const get@(@column.FkEntityName)@(@column.ColumnName)DropdownList = async () => {
|
|
|
+ @:let list = await get@(@column.FkEntityName)@(@column.ColumnName)Dropdown();
|
|
|
+ @:@LowerFirstLetter(@column.FkEntityName)@(@column.ColumnName)DropdownList.value = list.data.result ?? [];
|
|
|
@:};
|
|
|
-@:get@(@column.FkEntityName)DropdownList();
|
|
|
+@:get@(@column.FkEntityName)@(@column.ColumnName)DropdownList();
|
|
|
@:
|
|
|
}
|
|
|
}
|