添加项目文件。
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
/**
|
||||
* @@description @(@Model.FunctionName+@Model.FunctionNameSuffix)接口
|
||||
* @@license Apache License Version 2.0
|
||||
* @@Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @@remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
@{
|
||||
var busName= @Model.BusName;//业务名称
|
||||
var author= @Model.AuthorName;//作者
|
||||
var currentTime =@Model.GenTime;
|
||||
var name=@Model.FunctionName+@Model.FunctionNameSuffix;//接口名称
|
||||
var tableFieIds=@Model.TableFields;//获取字段
|
||||
}
|
||||
|
||||
import { ReqPage } from "@@/api/interface";
|
||||
|
||||
/**
|
||||
* @@Description: @(@Model.FunctionName+@Model.FunctionNameSuffix)接口
|
||||
* @@Author: @author
|
||||
* @@Date: @currentTime
|
||||
*/
|
||||
export namespace @Model.EntityName {
|
||||
|
||||
/**@(@Model.FunctionName)分页查询 */
|
||||
export interface Page extends ReqPage {
|
||||
@{PageQueryParams();}
|
||||
}
|
||||
|
||||
/** @(@Model.FunctionName)信息 */
|
||||
export interface @(@Model.EntityName)Info {
|
||||
@{EntityToInterfaceParams();}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@{
|
||||
//生成查询条件
|
||||
void PageQueryParams()
|
||||
{
|
||||
var queryParams = tableFieIds.Where(x => x.QueryWhether=="Y").ToList();
|
||||
//遍历字段
|
||||
foreach (var column in queryParams){
|
||||
@:/** @column.FieldRemark */
|
||||
if(@column.FieldNetType.ToLower() == "string")//判断是否是字符串类型
|
||||
{
|
||||
@:@column.FieldNameFirstLower: string;
|
||||
}
|
||||
if(@column.FieldNetType.ToLower() == "int"||@column.FieldNetType.ToLower() == "long")//判断是否是数字类型
|
||||
{
|
||||
@:@column.FieldNameFirstLower: number;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//实体字段转接口参数
|
||||
void EntityToInterfaceParams(){
|
||||
var numberParams =new string[]{"int","long","decimal","double"};//数字类型
|
||||
var tableParams = tableFieIds.Where(x => x.WhetherTable=="Y"||x.IsPrimaryKey=="Y"||x.SortCode<99).ToList();
|
||||
//遍历字段
|
||||
foreach (var column in tableParams){
|
||||
@:/** @column.FieldRemark */
|
||||
if(numberParams.Contains(@column.FieldNetType.ToLower()))//判断是否是数字类型
|
||||
{
|
||||
@:@column.FieldNameFirstLower: number;
|
||||
}
|
||||
else if(@column.FieldNetType.ToLower() == "bool")//判断是否是数字类型
|
||||
{
|
||||
@:@column.FieldNameFirstLower: boolean;
|
||||
}
|
||||
else
|
||||
{
|
||||
@:@column.FieldNameFirstLower: string;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* @@description @(@Model.FunctionName+@Model.FunctionNameSuffix)Api
|
||||
* @@license Apache License Version 2.0
|
||||
* @@Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @@remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
*/
|
||||
|
||||
@{
|
||||
var busName= @Model.BusName;//业务名称
|
||||
var author= @Model.AuthorName;//作者
|
||||
var currentTime =@Model.GenTime;
|
||||
var name=@Model.FunctionName+@Model.FunctionNameSuffix;//接口名称
|
||||
var tableFieIds=@Model.TableFields;//获取字段
|
||||
}
|
||||
|
||||
import { ReqId, ResPage,@Model.EntityName,moduleRequest } from "@@/api";
|
||||
const http = moduleRequest("@(@Model.RouteName)/@Model.BusName/");
|
||||
|
||||
/**
|
||||
* @@Description: @name
|
||||
* @@Author: @author
|
||||
* @@Date: @currentTime
|
||||
*/
|
||||
const @(@Model.ClassNameFirstLower)Api = {
|
||||
/** 获取@(@Model.FunctionName)分页 */
|
||||
page(params: @(@Model.EntityName).Page) {
|
||||
return http.get<ResPage<@Model.EntityName.@(@Model.EntityName)Info>>("page", params);
|
||||
},
|
||||
/** 获取@(@Model.FunctionName)详情 */
|
||||
detail(params: ReqId) {
|
||||
return http.get<@Model.EntityName.@(@Model.EntityName)Info>("detail", params);
|
||||
},
|
||||
/** 提交表单 edit为true时为编辑,默认为新增 */
|
||||
submitForm(params = {}, edit: boolean = false) {
|
||||
return http.post(edit ? "edit" : "add", params);
|
||||
},
|
||||
/** 删除@(@Model.FunctionName) */
|
||||
delete(params: ReqId[]) {
|
||||
return http.post("delete", params);
|
||||
},
|
||||
};
|
||||
|
||||
export { @(@Model.ClassNameFirstLower)Api };
|
||||
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* @description 接口
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
@@ -0,0 +1,191 @@
|
||||
@{
|
||||
var name=@Model.FunctionName+@Model.FunctionNameSuffix;//接口名称
|
||||
var author= @Model.AuthorName;//作者
|
||||
var tableFieIds=@Model.TableFields;//获取字段
|
||||
var currentTime =@Model.GenTime;
|
||||
var funcName= @Model.FunctionName;//获取功能名称
|
||||
var busName= @Model.BusName;//获取业务名称
|
||||
var props=@Model.BusName+"Props";
|
||||
var updateColumns= tableFieIds.Where(it => it.WhetherAddUpdate == "Y").ToList();//获取需要显示的字段
|
||||
var dictTypes= tableFieIds.Where(it => !string.IsNullOrEmpty(it.DictTypeCode)).ToList();//获取需要显示的字段
|
||||
}
|
||||
|
||||
<!--
|
||||
* @@Description: @(@name)表单页面
|
||||
* @@Author: @author
|
||||
* @@Date: @currentTime
|
||||
!-->
|
||||
|
||||
<template>
|
||||
<form-container v-model="visible" :title="`${@(@props).opt}@(@funcName)`" form-size="600px">
|
||||
<el-form
|
||||
ref="@(@busName)FormRef"
|
||||
:rules="rules"
|
||||
:disabled="@(@props).disabled"
|
||||
:model="@(@props).record"
|
||||
:hide-required-asterisk="@(@props).disabled"
|
||||
label-width="auto"
|
||||
label-suffix=" :"
|
||||
>
|
||||
@{FormItem();}
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @@click="onClose"> 取消 </el-button>
|
||||
<el-button v-show="!@(@props).disabled" type="primary" @@click="handleSubmit"> 确定 </el-button>
|
||||
</template>
|
||||
</form-container>
|
||||
</template>
|
||||
@{
|
||||
|
||||
void FormItem(){
|
||||
foreach(var column in updateColumns){
|
||||
@:<s-form-item label="@(@column.FieldRemark)" prop="@(@column.FieldNameFirstLower)">
|
||||
@switch (@column.EffectType) {
|
||||
case "input":
|
||||
<s-input v-model="@(@props).record.@(@column.FieldNameFirstLower)"></s-input>
|
||||
break;
|
||||
case "inputNumber":
|
||||
<el-input-number v-model="@(@props).record.@(@column.FieldNameFirstLower)" :min="1" :max="100" />
|
||||
break;
|
||||
case "radio":
|
||||
<s-radio-group v-model="@(@props).record.@(@column.FieldNameFirstLower)" :options="@(@column.FieldNameFirstLower)Options" button />
|
||||
break;
|
||||
case "select":
|
||||
<s-select v-model="@(@props).record.@(@column.FieldNameFirstLower)" :options="@(@column.FieldNameFirstLower)Options"></s-select>
|
||||
break;
|
||||
case "textarea":
|
||||
<s-input v-model="@(@props).record.@(@column.FieldNameFirstLower)" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }"></s-input>
|
||||
break;
|
||||
case "checkbox":
|
||||
<a-checkbox-group v-model="@(@props).record.@(@column.FieldNameFirstLower)" :options="@(@column.FieldNameFirstLower)Options" />
|
||||
break;
|
||||
case "datepicker":
|
||||
<date-picker v-model="@(@props).record.@(@column.FieldNameFirstLower)"></date-picker>
|
||||
break;
|
||||
case "fk":
|
||||
<s-select v-model:value="@(@props).record.@(@column.FieldNameFirstLower)" :options="fk@(@column.FieldNameFirstLower)OptionsOptions" />
|
||||
break;
|
||||
|
||||
}
|
||||
</s-form-item>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<script setup lang="ts">
|
||||
import { @(@Model.ClassNameFirstLower)Api,@(@Model.EntityName) } from "@@/api";
|
||||
import { FormOptEnum } from "@@/enums";
|
||||
import { required } from "@@/utils/formRules";
|
||||
import { FormInstance } from "element-plus";
|
||||
@if(dictTypes.Count>0){
|
||||
@:import { useDictStore } from "@@/stores/modules";
|
||||
}
|
||||
|
||||
const visible = ref(false); //是否显示表单
|
||||
@{DictStore();}
|
||||
|
||||
// 表单参数
|
||||
const @(@props) = reactive<FormProps.Base<@(@Model.EntityName).@(@Model.EntityName)Info>>({
|
||||
opt: FormOptEnum.ADD,
|
||||
record: {},
|
||||
disabled: false
|
||||
});
|
||||
|
||||
@{Rules();}
|
||||
|
||||
/**
|
||||
* 打开表单
|
||||
* @@param props 表单参数
|
||||
*/
|
||||
function onOpen(props: FormProps.Base<@(@Model.EntityName).@(@Model.EntityName)Info>) {
|
||||
Object.assign(@(@props), props); //合并参数
|
||||
if (props.opt == FormOptEnum.ADD) {
|
||||
|
||||
@foreach (var column in updateColumns){//遍历增改字段
|
||||
@if(column.FieldName=="SortCode"){//如果是SortCode
|
||||
@://如果是新增,设置默认值
|
||||
@:@(@props).record.sortCode = 99;
|
||||
continue;
|
||||
}
|
||||
@if(column.FieldType=="int"){//如果是int
|
||||
@:@(@props).record.@(@column.FieldNameFirstLower) = 0;
|
||||
continue;
|
||||
}
|
||||
@if(!string.IsNullOrWhiteSpace(column.DictTypeCode)){//如果是有字典
|
||||
@:@(@props).record.@(@column.FieldNameFirstLower) = @(@column.FieldNameFirstLower)Options[0].value;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
visible.value = true; //显示表单
|
||||
if (props.record.id) {
|
||||
//如果传了id,就去请求api获取record
|
||||
@(@Model.ClassNameFirstLower)Api.detail({ id: props.record.id }).then(res => {
|
||||
@(@props).record = res.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 提交数据(新增/编辑)
|
||||
const @(@busName)FormRef = ref<FormInstance>();
|
||||
/** 提交表单 */
|
||||
async function handleSubmit() {
|
||||
@(@busName)FormRef.value?.validate(async valid => {
|
||||
if (!valid) return; //表单验证失败
|
||||
//提交表单
|
||||
await @(@Model.ClassNameFirstLower)Api
|
||||
.submitForm(@(@props).record, @(@props).record.id != undefined)
|
||||
.then(() => {
|
||||
@(@props).successful!(); //调用父组件的successful方法
|
||||
})
|
||||
.finally(() => {
|
||||
onClose();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/** 关闭表单*/
|
||||
function onClose() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
// 暴露给父组件的方法
|
||||
defineExpose({
|
||||
onOpen
|
||||
});
|
||||
</script>
|
||||
|
||||
@{
|
||||
|
||||
//字典生成
|
||||
void DictStore(){
|
||||
if(dictTypes.Count>0){
|
||||
@:const dictStore = useDictStore();
|
||||
@foreach(var column in dictTypes){
|
||||
@:const @(@column.FieldNameFirstLower)Options = dictStore.getDictList("@column.DictTypeCode"); //@(@column.FieldRemark)选项
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Rules(){
|
||||
// 表单验证规则
|
||||
@:const rules = reactive({
|
||||
@foreach(var column in updateColumns){
|
||||
@if(column.WhetherRequired=="Y"){
|
||||
@switch (column.EffectType){
|
||||
case "input":
|
||||
@:@(@column.FieldNameFirstLower): [required("请输入@(@column.FieldRemark)")],
|
||||
break;
|
||||
case "select":
|
||||
case "radio":
|
||||
@:@(@column.FieldNameFirstLower): [required("请选择@(@column.FieldRemark)")],
|
||||
break;
|
||||
deault:
|
||||
@:@(@column.FieldNameFirstLower): [required("请输入@(@column.FieldRemark)")],
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@:});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
@{
|
||||
var busName= @Model.BusName;//获取业务名称
|
||||
var funcName= @Model.FunctionName;//获取功能名称
|
||||
var author= @Model.AuthorName;//作者
|
||||
var currentTime =@Model.GenTime;
|
||||
var name=@Model.FunctionName+@Model.FunctionNameSuffix;//接口名称
|
||||
var tableFieIds=@Model.TableFields;//获取字段
|
||||
var dataPermission=@Model.DataPermission=="Y";//是否需要数据权限
|
||||
var isLeftTree=@Model.LeftTree!="null";//是否有左侧树
|
||||
var isTreeList = @Model.ModuleType=="treeList";//是否是树表-列表
|
||||
var isTreeTree = @Model.ModuleType=="treeTree"; //是否是树-树
|
||||
var isMasterChild = @Model.ModuleType=="masterChild";//是否是主子表
|
||||
var treeId=@SimpleTool.StringHelper.FirstCharToLower(@Model.TreeId);//获取树的id
|
||||
var treeName=@SimpleTool.StringHelper.FirstCharToLower(@Model.TreeName);//获取树的名称
|
||||
var treePid=@SimpleTool.StringHelper.FirstCharToLower(@Model.TreePid);//获取树的父级id
|
||||
var showColumns= tableFieIds.Where(it => it.WhetherTable == "Y").ToList();//获取需要显示的字段
|
||||
var resizeColumn=showColumns.Any(it => it.WhetherResizable == "Y");//获取需要显示的字段
|
||||
var dictTypes= tableFieIds.Where(it => !string.IsNullOrEmpty(it.DictTypeCode)).ToList();//获取需要显示的字段
|
||||
}
|
||||
<!--
|
||||
* @@Description: @name
|
||||
* @@Author: @author
|
||||
* @@Date: @currentTime
|
||||
!-->
|
||||
<template>
|
||||
@{Template();}
|
||||
</template>
|
||||
|
||||
@{
|
||||
//Template部分
|
||||
void Template()
|
||||
{
|
||||
ProTable();
|
||||
}
|
||||
|
||||
//表格部分
|
||||
void ProTable()
|
||||
{
|
||||
<div class="table-box">
|
||||
<ProTable ref="proTable" title="@(@funcName)列表" :columns="columns" :request-api="@(@Model.ClassNameFirstLower)Api.page">
|
||||
<!-- 表格 header 按钮 -->
|
||||
<template #tableHeader="scope">
|
||||
<s-button suffix="@funcName" @@click="onOpen(FormOptEnum.ADD)" />
|
||||
<s-button
|
||||
type="danger"
|
||||
plain
|
||||
suffix="@funcName"
|
||||
:opt="FormOptEnum.DELETE"
|
||||
:disabled="!scope.isSelected"
|
||||
@@click="onDelete(scope.selectedListIds, '删除所选@(@funcName)')"
|
||||
/>
|
||||
</template>
|
||||
@{Solt();}
|
||||
@{Operation();}
|
||||
</ProTable>
|
||||
@{Form();}
|
||||
</div>
|
||||
}
|
||||
|
||||
//表格自定义字段
|
||||
void Solt(){
|
||||
foreach(var column in showColumns){
|
||||
@switch (@column.EffectType) {
|
||||
case "image"://图片
|
||||
<!-- @column.FieldName -->
|
||||
<template #@(@column.FieldNameFirstLower)="scope">
|
||||
<el-image :src="scope.row.@(@column.FieldNameFirstLower)" :size="30" />
|
||||
</template>
|
||||
break;
|
||||
case "datepicker"://日期
|
||||
@if(@column.FieldNetType.ToLower()=="date")
|
||||
{
|
||||
<!-- @column.FieldName -->
|
||||
<template #@(@column.FieldNameFirstLower)="scope">
|
||||
{{ scope.row.@(@column.FieldNameFirstLower) && scope.row.@(@column.FieldNameFirstLower).substr(0, 10) }}
|
||||
</template>
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//表格操作
|
||||
void Operation(){
|
||||
<!-- 操作 -->
|
||||
<template #operation="scope">
|
||||
<s-button link :opt="FormOptEnum.EDIT" @@click="onOpen(FormOptEnum.EDIT, scope.row)" />
|
||||
<s-button link :opt="FormOptEnum.DELETE" @@click="onDelete([scope.row.id], `删除所选@(@funcName)`)" />
|
||||
</template>
|
||||
}
|
||||
|
||||
//表单
|
||||
void Form(){
|
||||
<!-- 新增/编辑表单 -->
|
||||
<Form ref="formRef" />
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
<script setup lang="ts" name="@busName">
|
||||
import { @(@Model.ClassNameFirstLower)Api,@(@Model.EntityName) } from "@@/api";
|
||||
import { FormOptEnum } from "@@/enums";
|
||||
import { ColumnProps, ProTableInstance } from "@@/components/ProTable/interface";
|
||||
import Form from "./components/form.vue";
|
||||
import { useHandleData } from "@@/hooks/useHandleData";
|
||||
@if(dictTypes.Count>0){
|
||||
@:import { useDictStore } from "@@/stores/modules";
|
||||
}
|
||||
|
||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||
const proTable = ref<ProTableInstance>();
|
||||
@{DictStore();}
|
||||
|
||||
@{Colums();}
|
||||
|
||||
// 表单引用
|
||||
const formRef = ref<InstanceType<typeof Form> | null>(null);
|
||||
|
||||
/**
|
||||
* 打开表单
|
||||
* @@param opt 操作类型
|
||||
* @@param record 记录
|
||||
*/
|
||||
function onOpen(opt: FormOptEnum, record: {} | @(@Model.EntityName).@(@Model.EntityName)Info = {}) {
|
||||
formRef.value?.onOpen({ opt: opt, record: record, successful: RefreshTable });
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @@param ids id数组
|
||||
*/
|
||||
async function onDelete(ids: string[], msg: string) {
|
||||
// 二次确认 => 请求api => 刷新表格
|
||||
await useHandleData(@(@Model.ClassNameFirstLower)Api.delete, { ids }, msg);
|
||||
RefreshTable();
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新表格
|
||||
*/
|
||||
function RefreshTable() {
|
||||
proTable.value?.refresh();
|
||||
}
|
||||
</script>
|
||||
|
||||
@{
|
||||
|
||||
//字典生成
|
||||
void DictStore(){
|
||||
if(dictTypes.Count>0){
|
||||
@:const dictStore = useDictStore();
|
||||
@foreach(var column in dictTypes){
|
||||
@:const @(@column.FieldNameFirstLower)Options = dictStore.getDictList("@column.DictTypeCode"); //@(@column.FieldRemark)选项
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 表格配置项
|
||||
void Colums(){
|
||||
// 表格配置项
|
||||
@:const columns: ColumnProps<@(@Model.EntityName).@(@Model.EntityName)Info>[] = [
|
||||
@:{ type: "selection", fixed: "left", width: 80 },
|
||||
@foreach(var column in showColumns){
|
||||
@:{ prop: "@column.FieldNameFirstLower", label: "@column.FieldRemark" @{GetEnum(@column);} @{GetSearch(@column);} },
|
||||
}
|
||||
@:{ prop: "operation", label: "操作", width: 230, fixed: "right" }
|
||||
@:];
|
||||
}
|
||||
|
||||
//判断需要添加emum属性
|
||||
void GetEnum(SimpleAdmin.System.GenConfig column){
|
||||
@if(!string.IsNullOrEmpty(column.DictTypeCode)){//如果字典不为空
|
||||
@:,enum: @(@column.FieldNameFirstLower)Options
|
||||
}
|
||||
}
|
||||
|
||||
void GetSearch(SimpleAdmin.System.GenConfig column){
|
||||
@if(column.QueryWhether=="Y"){//如果字典不为空
|
||||
@switch (column.EffectType){
|
||||
case "input":
|
||||
@:, search: { el: "input" }
|
||||
break;
|
||||
case "select":
|
||||
case "radio":
|
||||
@:, search: { el: "select" }
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
Reference in New Issue
Block a user