feat:代码生成模板新增下拉多选查询

This commit is contained in:
不做码农
2022-10-17 17:59:52 +08:00
parent f5c0588f42
commit cfc8eee2a3
5 changed files with 19 additions and 7 deletions

View File

@@ -37,7 +37,7 @@ $if(column.HtmlType == "datetime")
:shortcuts="dateOptions">
</el-date-picker>
</el-form-item>
$elseif(column.HtmlType == "select" || column.HtmlType == "radio")
$elseif(column.HtmlType == "select" || column.HtmlType == "radio" || column.HtmlType == "selectMulti")
<el-form-item label="${labelName}" prop="${columnName}">
<el-select clearable $if(column.HtmlType == "selectMulti")multiple$end v-model="queryParams.${columnName}" placeholder="请选择${labelName}">
<el-option v-for="item in $if(column.DictType != "") options.${column.DictType} $else options.${column.CsharpFieldFl}Options$end" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
@@ -140,7 +140,7 @@ $elseif(column.HtmlType == "imageUpload")
</el-image>
</template>
</el-table-column>
$elseif(column.HtmlType == "checkbox" || column.HtmlType == "select" || column.HtmlType == "radio")
$elseif(column.HtmlType == "checkbox" || column.HtmlType == "select" || column.HtmlType == "radio" || column.HtmlType == "selectMulti")
<el-table-column prop="${columnName}" label="${labelName}" align="center"${column.sortStr} v-if="columns.showColumn('${columnName}')">
<template #default="scope">
$if(column.HtmlType == "checkbox")
@@ -243,7 +243,7 @@ $elseif(column.HtmlType == "editor")
<editor v-model="form.${columnName}" :min-height="200" />
</el-form-item>
</el-col>
$elseif(column.HtmlType == "select")
$elseif(column.HtmlType == "select" || column.HtmlType == "selectMulti")
<el-col :lg="${options.ColNum}">
<el-form-item label="${labelName}" prop="${columnName}">
<el-select v-model="form.${columnName}" placeholder="请选择${labelName}"${column.DisabledStr}>
@@ -361,7 +361,7 @@ $end
$set(index = 0)
var dictParams = [
$foreach(item in genTable.Columns)
$if((item.HtmlType == "radio" || item.HtmlType == "select" || item.HtmlType == "checkbox") && item.DictType != "")
$if((item.HtmlType == "radio" || item.HtmlType == "select" || item.HtmlType == "selectMulti" || item.HtmlType == "checkbox") && item.DictType != "")
{ dictType: "${item.DictType}" },
$set(index = index + 1)
$end