|
|
@@ -1,108 +1,94 @@
|
|
|
@{
|
|
|
var pkField = Model.TableField.Where(c => c.ColumnKey == "True").FirstOrDefault();
|
|
|
- string pkFieldName = null;
|
|
|
- if(pkField != null && !string.IsNullOrEmpty(pkField.PropertyName))
|
|
|
- {
|
|
|
- pkFieldName = LowerFirstLetter(pkField.PropertyName);
|
|
|
- }
|
|
|
- Dictionary<string, int> definedObjects = new Dictionary<string, int>();
|
|
|
- bool haveLikeCdt = false;
|
|
|
- foreach (var column in Model.TableField){
|
|
|
- if (column.QueryWhether == "Y" && column.QueryType == "like"){
|
|
|
- haveLikeCdt = true;
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+ string pkFieldName = pkField != null && !string.IsNullOrEmpty(pkField.PropertyName) ? LowerFirstLetter(pkField.PropertyName) : null;
|
|
|
+
|
|
|
+ var definedObjects = new Dictionary<string, int>();
|
|
|
+
|
|
|
bool hasImport = Model.TableField.Any(x => x.WhetherImport == "Y");
|
|
|
+
|
|
|
+ bool haveLikeCdt = Model.TableField.Any(col => col.QueryWhether == "Y" && col.QueryType == "like");
|
|
|
+
|
|
|
+ var hasSetStatus = Model.TableField.Any(col => col.NetType == "StatusEnum" && col.PropertyName == "Status");
|
|
|
+
|
|
|
+ var isStatus = false;
|
|
|
}
|
|
|
<template>
|
|
|
<div class="@(@Model.LowerClassName)-container">
|
|
|
<el-card shadow="hover" :body-style="{ paddingBottom: '0' }">
|
|
|
- @<el-form :model="queryParams" ref="queryForm" labelWidth="90">
|
|
|
- @<el-row>
|
|
|
+ <el-form :model="queryParams" ref="queryForm" labelWidth="90">
|
|
|
+ <el-row>
|
|
|
@if(Model.QueryWhetherList.Count > 0){
|
|
|
- @if(haveLikeCdt){
|
|
|
+ if(haveLikeCdt){
|
|
|
@:<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10">
|
|
|
@:<el-form-item label="关键字">
|
|
|
@:<el-input v-model="queryParams.searchKey" clearable="" placeholder="请输入模糊查询关键字"/>
|
|
|
- @:
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
+ @:</el-form-item>
|
|
|
+ @:</el-col>
|
|
|
}
|
|
|
foreach (var column in Model.QueryWhetherList){
|
|
|
@:<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
|
|
if(@column.EffectType == "Input" || @column.EffectType == "InputTextArea"){
|
|
|
@:<el-form-item label="@column.ColumnComment">
|
|
|
@:<el-input v-model="queryParams.@(@column.LowerPropertyName)" clearable="" placeholder="请输入@(@column.ColumnComment)"/>
|
|
|
- @:
|
|
|
- </el-form-item>
|
|
|
+ @:</el-form-item>
|
|
|
}else if(@column.EffectType == "InputTextArea"){
|
|
|
@:<el-form-item label="@column.ColumnComment">
|
|
|
@:<el-input-number v-model="queryParams.@(@column.LowerPropertyName)" clearable="" placeholder="请输入@(@column.ColumnComment)"/>
|
|
|
@:
|
|
|
- </el-form-item>
|
|
|
+ @:</el-form-item>
|
|
|
}else if(@column.EffectType == "InputNumber"){
|
|
|
@:<el-form-item label="@column.ColumnComment">
|
|
|
@:<el-input-number v-model="queryParams.@(@column.LowerPropertyName)" clearable="" placeholder="请输入@(@column.ColumnComment)"/>
|
|
|
- @:
|
|
|
- </el-form-item>
|
|
|
+ @:</el-form-item>
|
|
|
}else if(@column.EffectType == "fk"){
|
|
|
@:<el-form-item label="@column.ColumnComment">
|
|
|
@:<el-select clearable="" filterable="" v-model="queryParams.@(@column.LowerPropertyName)" placeholder="请选择@(@column.ColumnComment)">
|
|
|
@:<el-option v-for="(item,index) in @LowerFirstLetter(@column.FkEntityName)@(@column.PropertyName)DropdownList" :key="index" :value="item.value" :label="item.label" />
|
|
|
- @:
|
|
|
- </el-select>
|
|
|
- @:
|
|
|
- </el-form-item>
|
|
|
+ @:</el-select>
|
|
|
+ @:</el-form-item>
|
|
|
}else if(@column.EffectType == "Select"){
|
|
|
@:<el-form-item label="@column.ColumnComment">
|
|
|
@:<el-select clearable="" v-model="queryParams.@(@column.LowerPropertyName)" placeholder="请选择@(@column.ColumnComment)">
|
|
|
@:<el-option v-for="(item,index) in dl('@(@column.DictTypeCode)')" :key="index" :value="item.code" :label="`[${item.code}] ${item.value}`" />
|
|
|
- @:
|
|
|
- </el-select>
|
|
|
- @:
|
|
|
- </el-form-item>
|
|
|
+ @:</el-select>
|
|
|
+ @:</el-form-item>
|
|
|
}else if(@column.EffectType == "EnumSelector"){
|
|
|
@:<el-form-item label="@column.ColumnComment">
|
|
|
@:<el-select clearable="" v-model="queryParams.@(@column.LowerPropertyName)" placeholder="请选择@(@column.ColumnComment)">
|
|
|
@:<el-option v-for="(item,index) in dl('@(@column.DictTypeCode)')" :key="index" :value="item.value" :label="`${item.name} (${item.code}) [${item.value}] `" />
|
|
|
- @:
|
|
|
- </el-select>
|
|
|
- @:
|
|
|
- </el-form-item>
|
|
|
+ @:</el-select>
|
|
|
+ @:</el-form-item>
|
|
|
}else if(@column.EffectType == "DatePicker"){
|
|
|
@:<el-form-item label="@column.ColumnComment">
|
|
|
if(@column.QueryType == "~"){
|
|
|
@:<el-date-picker type="daterange" v-model="queryParams.@(@column.LowerPropertyName)Range" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" />
|
|
|
- }else
|
|
|
- {
|
|
|
+ } else {
|
|
|
@:<el-date-picker placeholder="请选择@(@column.ColumnComment)" value-format="YYYY/MM/DD" v-model="queryParams.@(@column.LowerPropertyName)" />
|
|
|
}
|
|
|
- @:
|
|
|
- </el-form-item>
|
|
|
+ @:</el-form-item>
|
|
|
}
|
|
|
@:</el-col>
|
|
|
- }
|
|
|
- }
|
|
|
- @<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10">
|
|
|
- @<el-form-item @(Model.QueryWhetherList.Count > 0?"":"label-width=\"0px\"")>
|
|
|
- @<el-button-group style="display: flex; align-items: center;">
|
|
|
- @<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){
|
|
|
- @:<el-button icon="ele-Refresh" @@click="() => queryParams = {}"> 重置 </el-button>
|
|
|
- @if(haveLikeCdt){
|
|
|
- @:<el-button icon="ele-ZoomIn" @@click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI" style="margin-left:5px;"> 高级查询 </el-button>
|
|
|
- @:<el-button icon="ele-ZoomOut" @@click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> 隐藏 </el-button>
|
|
|
- }
|
|
|
- }
|
|
|
- @<el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @@click="openAdd@(@Model.ClassName)" v-auth="'@(@Model.LowerClassName):add'"> 新增 </el-button>
|
|
|
- @
|
|
|
+ }
|
|
|
+ }
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10">
|
|
|
+ <el-form-item @(Model.QueryWhetherList.Count > 0?"":"label-width=\"0px\"")>
|
|
|
+ <el-button-group style="display: flex; align-items: center;">
|
|
|
+ <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){
|
|
|
+ @:<el-button icon="ele-Refresh" @@click="() => queryParams = {}"> 重置 </el-button>
|
|
|
+ @if(haveLikeCdt){
|
|
|
+ @:<el-button icon="ele-ZoomIn" @@click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI" style="margin-left:5px;"> 高级查询 </el-button>
|
|
|
+ @:<el-button icon="ele-ZoomOut" @@click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> 隐藏 </el-button>
|
|
|
+ }
|
|
|
+ }
|
|
|
+ <el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @@click="openAdd@(@Model.ClassName)" v-auth="'@(@Model.LowerClassName):add'"> 新增 </el-button>
|
|
|
@if (hasImport) {
|
|
|
- @:<el-button type="warning" icon="ele-MostlyCloudy" @@click="importDataRef.openDialog" v-auth="'@(@Model.LowerClassName):import'"> 导入 </el-button>
|
|
|
+ @:<el-button type="warning" icon="ele-MostlyCloudy" @@click="importDataRef.openDialog()" v-auth="'@(@Model.LowerClassName):import'"> 导入 </el-button>
|
|
|
}
|
|
|
</el-button-group>
|
|
|
</el-form-item>
|
|
|
- @
|
|
|
- @</el-col>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
@* 操作区另起一行
|
|
|
@:<el-row>
|
|
|
@@ -111,25 +97,14 @@
|
|
|
@:<el-button type="primary" icon="ele-Plus" @@click="openAdd@(@Model.ClassName)" v-auth="'@(@Model.LowerClassName):add'"> 新增 </el-button>
|
|
|
</el-button-group>
|
|
|
@:</el-col>
|
|
|
- </el-row>
|
|
|
+ @:</el-row>
|
|
|
*@
|
|
|
</el-form>
|
|
|
</el-card>
|
|
|
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
|
|
|
- <el-table
|
|
|
- :data="tableData"
|
|
|
- style="width: 100%"
|
|
|
- v-loading="loading"
|
|
|
- tooltip-effect="light"
|
|
|
- @if(@pkFieldName != null)
|
|
|
- {
|
|
|
- @:row-key="@(@pkFieldName)"
|
|
|
- }
|
|
|
- @@sort-change="sortChange"
|
|
|
- border="">
|
|
|
+ <el-table :data="tableData" style="width: 100%" v-loading="loading" tooltip-effect="light" @(@pkFieldName != null ? $"row-key=\"{@pkFieldName}\"" : "") @@sort-change="sortChange" border="">
|
|
|
<el-table-column type="index" label="序号" width="55" align="center"/>
|
|
|
- @foreach (var column in Model.TableField){
|
|
|
- if(@column.WhetherTable == "Y"){
|
|
|
+ @foreach (var column in Model.TableField.Where(u => u.WhetherTable == "Y")){
|
|
|
if(@column.EffectType == "Upload"||@column.EffectType == "fk"||@column.EffectType == "ApiTreeSelect"||@column.EffectType == "Switch"||@column.EffectType == "ConstSelector"){
|
|
|
@:<el-table-column prop="@column.LowerPropertyName" label="@column.ColumnComment" @(column.WhetherSortable == "Y" ? "sortable='custom'" : "") show-overflow-tooltip="">
|
|
|
@:<template #default="scope">
|
|
|
@@ -154,38 +129,34 @@
|
|
|
}else if(@column.EffectType == "ConstSelector"){
|
|
|
@:<span>{{codeToName(scope.row.@(@column.LowerPropertyName), '@(@column.DictTypeCode)')}}</span>
|
|
|
}
|
|
|
- @:
|
|
|
- </template>
|
|
|
- @:
|
|
|
- </el-table-column>
|
|
|
- }
|
|
|
- else if(@column.EffectType == "Select"){
|
|
|
- @:<el-table-column prop="@column.LowerPropertyName" label="@column.ColumnComment" @(column.WhetherSortable == "Y" ? "sortable='custom'" : "") show-overflow-tooltip="" >
|
|
|
- @:<template #default="scope">
|
|
|
- @:<dict-label :value="scope.row.@column.LowerPropertyName" code="@column.DictTypeCode" prop-label="value" prop-value="code" />
|
|
|
- @:</template>
|
|
|
- @:</el-table-column>
|
|
|
- }
|
|
|
- else if(@column.EffectType == "EnumSelector"){
|
|
|
- @:<el-table-column prop="@column.LowerPropertyName" label="@column.ColumnComment" @(column.WhetherSortable == "Y" ? "sortable='custom'" : "") show-overflow-tooltip="" >
|
|
|
- @:<template #default="scope">
|
|
|
- @:<dict-label :value="scope.row.@column.LowerPropertyName" code="@column.DictTypeCode"/>
|
|
|
- @:</template>
|
|
|
- @:</el-table-column>
|
|
|
- }
|
|
|
- else {
|
|
|
+ @:</template>
|
|
|
+ @:</el-table-column>
|
|
|
+ } else if (@column.EffectType == "Select"){
|
|
|
+ @:<el-table-column prop="@column.LowerPropertyName" label="@column.ColumnComment" @(column.WhetherSortable == "Y" ? "sortable='custom'" : "") show-overflow-tooltip="" >
|
|
|
+ @:<template #default="scope">
|
|
|
+ @:<dict-label :value="scope.row.@column.LowerPropertyName" code="@column.DictTypeCode" prop-label="value" prop-value="code" />
|
|
|
+ @:</template>
|
|
|
+ @:</el-table-column>
|
|
|
+ } else if (@column.EffectType == "EnumSelector"){
|
|
|
+ {@ isStatus = column.NetType == "StatusEnum" && column.PropertyName == "Status"; }
|
|
|
+ @:<el-table-column prop="@column.LowerPropertyName" label="@column.ColumnComment" @(column.WhetherSortable == "Y" ? "sortable='custom'" : "") show-overflow-tooltip="" @(isStatus ? $"v-auth=\"'{@Model.LowerClassName}:setStatus'\"": "")>
|
|
|
+ @:<template #default="scope">
|
|
|
+ if (isStatus) {
|
|
|
+ @:<el-switch v-model="scope.row.@column.LowerPropertyName" :active-value="1" :inactive-value="2" size="small" @@change="change@(@Model.ClassName)Status(scope.row)" />
|
|
|
+ } else {
|
|
|
+ @:<dict-label :value="scope.row.@column.LowerPropertyName" code="@column.DictTypeCode" prop-label="value" prop-value="code" />
|
|
|
+ }
|
|
|
+ @:</template>
|
|
|
+ @:</el-table-column>
|
|
|
+ } else {
|
|
|
@:<el-table-column prop="@column.LowerPropertyName" label="@column.ColumnComment" @(column.WhetherSortable == "Y" ? "sortable='custom'" : "") show-overflow-tooltip="" />
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- @if(@Model.PrintType == "custom"){
|
|
|
- @:<el-table-column label="操作" width="200" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('@(@Model.LowerClassName):update') || auth('@(@Model.LowerClassName):delete')">
|
|
|
- @:<template #default="scope">
|
|
|
+ <el-table-column label="操作" width="@(@Model.PrintType == "custom" ? "200" : "140")" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('@(@Model.LowerClassName):update') || auth('@(@Model.LowerClassName):delete')">
|
|
|
+ <template #default="scope">
|
|
|
+ @if (Model.PrintType == "custom"){
|
|
|
@:<el-button icon="ele-Printer" size="small" text="" type="primary" @@click="openPrint@(@Model.ClassName)(scope.row)" v-auth="'@(@Model.LowerClassName):print'"> 打印 </el-button>
|
|
|
- }else{
|
|
|
- @:<el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('@(@Model.LowerClassName):update') || auth('@(@Model.LowerClassName):delete')">
|
|
|
- @:<template #default="scope">
|
|
|
- }
|
|
|
+ }
|
|
|
<el-button icon="ele-Edit" size="small" text="" type="primary" @@click="openEdit@(@Model.ClassName)(scope.row)" v-auth="'@(@Model.LowerClassName):update'"> 编辑 </el-button>
|
|
|
<el-button icon="ele-Delete" size="small" text="" type="primary" @@click="del@(@Model.ClassName)(scope.row)" v-auth="'@(@Model.LowerClassName):delete'"> 删除 </el-button>
|
|
|
</template>
|
|
|
@@ -214,57 +185,53 @@
|
|
|
</el-card>
|
|
|
</div>
|
|
|
@if (hasImport) {
|
|
|
- @:<ImportData ref="importDataRef" :import="import@(@Model.ClassName)Data" :download="download@(@Model.ClassName)Template" v-auth="'@(@Model.LowerClassName):import'" @@refresh="handleQuery" />
|
|
|
+ @:<ImportData
|
|
|
+ @:ref="importDataRef"
|
|
|
+ @::import="import@(@Model.ClassName)Data"
|
|
|
+ @::download="download@(@Model.ClassName)Template"
|
|
|
+ @:v-auth="'@(@Model.LowerClassName):import'"
|
|
|
+ @:@@refresh="handleQuery"
|
|
|
+ @:/>
|
|
|
}
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup="" name="@(@Model.LowerClassName)">
|
|
|
import { ref } from "vue";
|
|
|
- import { ElMessageBox, ElMessage } from "element-plus";
|
|
|
import { auth } from '/@@/utils/authFunction';
|
|
|
import { getAPI } from '/@@/utils/axios-utils';
|
|
|
-
|
|
|
- @if(@Model.TableField.Any(x=>x.EffectType == "ConstSelector")){
|
|
|
- @:import { codeToName, getConstType } from "/@@/utils/constHelper";
|
|
|
- }
|
|
|
- @if(@Model.TableField.Any(x=>x.EffectType == "Select") || @Model.TableField.Any(x=>x.EffectType == "EnumSelector")){
|
|
|
- @:import { getDictDataList as dl } from '/@@/utils/dict-utils';
|
|
|
- }
|
|
|
- @if(@Model.TableField.Any(x=>x.EffectType == "DatePicker")){
|
|
|
+ import { ElMessageBox, ElMessage } from "element-plus";
|
|
|
+ @if(Model.TableField.Any(x => x.EffectType == "DatePicker")) {
|
|
|
@:import { formatDate } from '/@@/utils/formatTime';
|
|
|
}
|
|
|
-
|
|
|
- @if(@Model.PrintType == "custom"){
|
|
|
+ @if(Model.TableField.Any(x => x.EffectType == "ConstSelector")) {
|
|
|
+ @:import { codeToName, getConstType } from '/@@/utils/constHelper';
|
|
|
+ }
|
|
|
+ @if(Model.TableField.Any(x => x.EffectType == "Select" || x.EffectType == "EnumSelector")) {
|
|
|
+ @:import { getDictDataList as dl } from '/@@/utils/dict-utils';
|
|
|
+ }
|
|
|
+ @if(Model.PrintType == "custom") {
|
|
|
@:// 推荐设置操作 width 为 200
|
|
|
@:import { hiprint } from 'vue-plugin-hiprint';
|
|
|
@:import { SysPrintApi } from '/@@/api-services/api';
|
|
|
@:import { SysPrint } from '/@@/api-services/models';
|
|
|
}
|
|
|
-
|
|
|
- @if(@Model.TableField.Any(x=>x.EffectType == "EnumSelector" || x.EffectType == "Select")){
|
|
|
- @:import { DictLabel } from "/@@/components/table/dictLabel.vue";
|
|
|
+ @if(@Model.TableField.Any(x => x.EffectType == "Select" || x.EffectType == "EnumSelector")) {
|
|
|
+ @:import DictLabel from "/@@/components/table/dictLabel.vue";
|
|
|
}
|
|
|
- import printDialog from '/@@/views/system/print/component/hiprint/preview.vue'
|
|
|
- import editDialog from '/@@/views/@(@Model.PagePath)/@(@Model.LowerClassName)/component/editDialog.vue'
|
|
|
- import { page@(@Model.ClassName), delete@(@Model.ClassName) } from '/@@/api/@(@Model.PagePath)/@(@Model.LowerClassName)';
|
|
|
- @if (hasImport) {
|
|
|
- @:import { ImportData } from "/@@/components/table/importData.vue";
|
|
|
- @:import { download@(@Model.ClassName)Template, import@(@Model.ClassName)Data } from '/@@/api/@(@Model.PagePath)/@(@Model.LowerClassName)';
|
|
|
+ @if(hasImport) {
|
|
|
+ @:import ImportData from "/@@/components/table/importData.vue";
|
|
|
}
|
|
|
- @foreach (var column in Model.QueryWhetherList){
|
|
|
- if(@column.EffectType == "fk"){
|
|
|
+ import editDialog from '/@@/views/@(@Model.PagePath)/@(@Model.LowerClassName)/component/editDialog.vue'
|
|
|
+ import printDialog from '/@@/views/system/print/component/hiprint/preview.vue'
|
|
|
+ import { page@(@Model.ClassName), delete@(@Model.ClassName) @(hasImport ? $", download{@Model.ClassName}Template, import{@Model.ClassName}Data" : "")@(hasSetStatus ? $", set{@Model.ClassName}Status" : "") } from '/@@/api/@(@Model.PagePath)/@(@Model.LowerClassName)';
|
|
|
+ @foreach (var column in Model.QueryWhetherList.Where(u => u.EffectType == "fk")) {
|
|
|
@:import { get@(@column.FkEntityName)@(@column.PropertyName)Dropdown } from '/@@/api/@(@Model.PagePath)/@(@Model.LowerClassName)';
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- @if(haveLikeCdt){
|
|
|
- @:const showAdvanceQueryUI = ref(false);
|
|
|
- }else {
|
|
|
- @:const showAdvanceQueryUI = ref(true);
|
|
|
- }
|
|
|
+ const showAdvanceQueryUI = ref(@(@haveLikeCdt ? "false" : "true"));
|
|
|
const printDialogRef = ref();
|
|
|
const editDialogRef = ref();
|
|
|
- @if (hasImport) {
|
|
|
+ @if (hasImport){
|
|
|
@:const importDataRef = ref();
|
|
|
}
|
|
|
const loading = ref(false);
|
|
|
@@ -306,9 +273,24 @@
|
|
|
// 打开新增页面
|
|
|
const openAdd@(@Model.ClassName) = () => {
|
|
|
edit@(@Model.ClassName)Title.value = '添加@(@Model.BusName)';
|
|
|
- editDialogRef.value.openDialog({});
|
|
|
+ const data = {
|
|
|
+@if (hasSetStatus) {
|
|
|
+ @:status: 1,
|
|
|
+}
|
|
|
+@if (Model.TableField.Any(col => col.PropertyName == "OrderNo")) {
|
|
|
+ @:orderNo: 100,
|
|
|
+}
|
|
|
+ };
|
|
|
+ editDialogRef.value.openDialog(data);
|
|
|
};
|
|
|
|
|
|
+ // 设置状态
|
|
|
+ const change@(@Model.ClassName)Status = async (row: any) => {
|
|
|
+ await set@(@Model.ClassName)Status({ id: row.id, status: row.status })
|
|
|
+ .then(() => ElMessage.success('状态设置成功'))
|
|
|
+ .catch(() => { row.status = row.status == 1 ? 2 : 1; });
|
|
|
+ };
|
|
|
+
|
|
|
// 打开打印页面
|
|
|
const openPrint@(@Model.ClassName) = async (row: any) => {
|
|
|
print@(@Model.ClassName)Title.value = '打印@(@Model.BusName)';
|
|
|
@@ -354,8 +336,7 @@
|
|
|
handleQuery();
|
|
|
};
|
|
|
|
|
|
- @foreach (var column in Model.QueryWhetherList){
|
|
|
- if(@column.EffectType == "fk"){
|
|
|
+ @foreach (var column in Model.QueryWhetherList.Where(u => u.EffectType == "fk")){
|
|
|
@: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();
|
|
|
@@ -363,15 +344,12 @@
|
|
|
@:};
|
|
|
@:get@(@column.FkEntityName)@(@column.PropertyName)DropdownList();
|
|
|
@:
|
|
|
- }
|
|
|
}
|
|
|
handleQuery();
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
-:deep(.el-input),
|
|
|
-:deep(.el-select),
|
|
|
-:deep(.el-input-number) {
|
|
|
- width: 100%;
|
|
|
+:deep(.el-input), :deep(.el-select), :deep(.el-input-number) {
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
</style>
|
|
|
|