|
@@ -1,4 +1,4 @@
|
|
|
-@{
|
|
|
|
|
|
|
+@{
|
|
|
var pkField = Model.TableField.Where(c => c.ColumnKey == "True").FirstOrDefault();
|
|
var pkField = Model.TableField.Where(c => c.ColumnKey == "True").FirstOrDefault();
|
|
|
string pkFieldName = LowerFirstLetter(pkField.PropertyName);
|
|
string pkFieldName = LowerFirstLetter(pkField.PropertyName);
|
|
|
Dictionary<string, int> definedObjects = new Dictionary<string, int>();
|
|
Dictionary<string, int> definedObjects = new Dictionary<string, int>();
|
|
@@ -47,7 +47,7 @@
|
|
|
}else if(@column.EffectType == "Select"){
|
|
}else if(@column.EffectType == "Select"){
|
|
|
@:<el-form-item label="@column.ColumnComment">
|
|
@:<el-form-item label="@column.ColumnComment">
|
|
|
@:<el-select clearable="" v-model="queryParams.@(@column.LowerPropertyName)" placeholder="请选择@(@column.ColumnComment)">
|
|
@:<el-select clearable="" v-model="queryParams.@(@column.LowerPropertyName)" placeholder="请选择@(@column.ColumnComment)">
|
|
|
- @:<el-option v-for="(item,index) in get@(@column.LowerPropertyName)Data" :key="index" :value="item.code" :label="item.value" />
|
|
|
|
|
|
|
+ @:<el-option v-for="(item,index) in dl('@(@column.DictTypeCode)')" :key="index" :value="item.code" :label="`[${item.code}] ${item.value}`" />
|
|
|
@:
|
|
@:
|
|
|
</el-select>
|
|
</el-select>
|
|
|
@:
|
|
@:
|
|
@@ -128,6 +128,13 @@
|
|
|
@:
|
|
@:
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
}
|
|
}
|
|
|
|
|
+ else if(@column.EffectType == "Select"){
|
|
|
|
|
+ @:<el-table-column prop="@column.LowerPropertyName" label="@column.ColumnComment" width="@(column.ColumnComment!=null && column.ColumnComment.Length > 5 ? column.ColumnComment.Length * 15 : 140)" show-overflow-tooltip="" >
|
|
|
|
|
+ @:<template #default="scope">
|
|
|
|
|
+ @:<el-tag :type="di('@(@column.DictTypeCode)', scope.row.@(@column.LowerPropertyName))?.tagType"> {{di("@(@column.DictTypeCode)", scope.row.@(@column.LowerPropertyName))?.value}} </el-tag>
|
|
|
|
|
+ @:</template>
|
|
|
|
|
+ @:</el-table-column>
|
|
|
|
|
+ }
|
|
|
else if(@column.EffectType == "EnumSelector"){
|
|
else if(@column.EffectType == "EnumSelector"){
|
|
|
@:<el-table-column prop="@column.LowerPropertyName" label="@column.ColumnComment" width="@(column.ColumnComment!=null && column.ColumnComment.Length > 5 ? column.ColumnComment.Length * 15 : 140)" show-overflow-tooltip="" >
|
|
@:<el-table-column prop="@column.LowerPropertyName" label="@column.ColumnComment" width="@(column.ColumnComment!=null && column.ColumnComment.Length > 5 ? column.ColumnComment.Length * 15 : 140)" show-overflow-tooltip="" >
|
|
|
@:<template #default="scope">
|
|
@:<template #default="scope">
|
|
@@ -174,6 +181,7 @@
|
|
|
@if(@Model.TableField.Any(x=>x.EffectType == "ConstSelector")){
|
|
@if(@Model.TableField.Any(x=>x.EffectType == "ConstSelector")){
|
|
|
@:import { codeToName, getConstType } from "/@@/utils/constHelper";
|
|
@:import { codeToName, getConstType } from "/@@/utils/constHelper";
|
|
|
}
|
|
}
|
|
|
|
|
+ import { getDictDataItem as di, getDictDataList as dl } from '/@@/utils/dict-utils';
|
|
|
//import { formatDate } from '/@@/utils/formatTime';
|
|
//import { formatDate } from '/@@/utils/formatTime';
|
|
|
|
|
|
|
|
import editDialog from '/@@/views/main/@(@Model.LowerClassName)/component/editDialog.vue'
|
|
import editDialog from '/@@/views/main/@(@Model.LowerClassName)/component/editDialog.vue'
|
|
@@ -183,12 +191,6 @@
|
|
|
@:import { get@(@column.FkEntityName)@(@column.PropertyName)Dropdown } from '/@@/api/main/@(@Model.LowerClassName)';
|
|
@:import { get@(@column.FkEntityName)@(@column.PropertyName)Dropdown } from '/@@/api/main/@(@Model.LowerClassName)';
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- @foreach (var column in Model.QueryWhetherList){
|
|
|
|
|
- if(@column.EffectType == "Select"){
|
|
|
|
|
- @:import { getDictDataList } from '/@@/api/system/admin';
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
@if(@Model.QueryWhetherList.Any(x=>x.EffectType == "EnumSelector")){
|
|
@if(@Model.QueryWhetherList.Any(x=>x.EffectType == "EnumSelector")){
|
|
|
@:import { getAPI } from '/@@/utils/axios-utils';
|
|
@:import { getAPI } from '/@@/utils/axios-utils';
|
|
|
@:import { SysEnumApi } from '/@@/api-services/api';
|
|
@:import { SysEnumApi } from '/@@/api-services/api';
|
|
@@ -196,9 +198,6 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@foreach (var column in Model.QueryWhetherList){
|
|
@foreach (var column in Model.QueryWhetherList){
|
|
|
- if(@column.EffectType == "Select"){
|
|
|
|
|
- @:const get@(@column.LowerPropertyName)Data = ref<any>([]);
|
|
|
|
|
- }
|
|
|
|
|
if(@column.EffectType == "EnumSelector"){
|
|
if(@column.EffectType == "EnumSelector"){
|
|
|
@:const getEnum@(@column.PropertyName)Data = ref<any>([]);
|
|
@:const getEnum@(@column.PropertyName)Data = ref<any>([]);
|
|
|
}
|
|
}
|
|
@@ -228,9 +227,6 @@
|
|
|
tableParams.value.total = res.data.result?.total;
|
|
tableParams.value.total = res.data.result?.total;
|
|
|
loading.value = false;
|
|
loading.value = false;
|
|
|
@foreach (var column in Model.QueryWhetherList){
|
|
@foreach (var column in Model.QueryWhetherList){
|
|
|
- if(@column.EffectType == "Select"){
|
|
|
|
|
- @:get@(@column.LowerPropertyName)Data.value = await dictTypeDataList('@(@column.DictTypeCode)');
|
|
|
|
|
- }
|
|
|
|
|
if(@column.EffectType == "EnumSelector"){
|
|
if(@column.EffectType == "EnumSelector"){
|
|
|
@:getEnum@(@column.PropertyName)Data.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('@(@column.DictTypeCode)')).data.result ?? [];
|
|
@:getEnum@(@column.PropertyName)Data.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('@(@column.DictTypeCode)')).data.result ?? [];
|
|
|
}
|
|
}
|
|
@@ -287,16 +283,6 @@
|
|
|
@:
|
|
@:
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-@foreach (var column in Model.QueryWhetherList){
|
|
|
|
|
- if(@column.EffectType == "Select"){
|
|
|
|
|
- @:const dictTypeDataList = async (val: any) => {
|
|
|
|
|
- @:let list = await getDictDataList(val);
|
|
|
|
|
- @:return list.data.result ?? [];
|
|
|
|
|
- @:};
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
handleQuery();
|
|
handleQuery();
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|