mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-01 02:38:43 +08:00 
			
		
		
		
	代码生成:完善 Vue3 标准模版的列表,在 80 长度下的排版问题
This commit is contained in:
		| @@ -105,6 +105,8 @@ public class CodegenEngine { | |||||||
|             // Vue3 |             // Vue3 | ||||||
|             .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("views/index.vue"), |             .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("views/index.vue"), | ||||||
|                     vue3FilePath("views/${table.moduleName}/${classNameVar}/index.vue")) |                     vue3FilePath("views/${table.moduleName}/${classNameVar}/index.vue")) | ||||||
|  |             .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("views/form.vue"), | ||||||
|  |                     vue3FilePath("views/${table.moduleName}/${classNameVar}/form.vue")) | ||||||
| //            .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("views/data.ts"), | //            .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("views/data.ts"), | ||||||
| //                    vue3FilePath("views/${table.moduleName}/${classNameVar}/${classNameVar}.data.ts")) | //                    vue3FilePath("views/${table.moduleName}/${classNameVar}/${classNameVar}.data.ts")) | ||||||
|             .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("api/api.ts"), |             .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("api/api.ts"), | ||||||
|   | |||||||
| @@ -1,165 +1,116 @@ | |||||||
| <!-- 对话框(添加 / 修改) --> | <template> | ||||||
| <el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body> |   <Dialog :title="modelTitle" v-model="modelVisible"> | ||||||
|   <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |     <el-form | ||||||
|       #foreach($column in $columns) |       ref="formRef" | ||||||
|           #if ($column.createOperation || $column.updateOperation) |       :model="formData" | ||||||
|               #set ($dictType = $column.dictType) |       :rules="formRules" | ||||||
|               #set ($javaField = $column.javaField) |       label-width="100px" | ||||||
|               #set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) |       v-loading="formLoading" | ||||||
|               #set ($comment = $column.columnComment) |     > | ||||||
|               #if ($column.htmlType == "input") | #foreach($column in $columns) | ||||||
|                   #if (!$column.primaryKey)## 忽略主键,不用在表单里 |  | ||||||
|                     <el-form-item label="${comment}" prop="${javaField}"> |  | ||||||
|                       <el-input v-model="form.${javaField}" placeholder="请输入${comment}" /> |  | ||||||
|                     </el-form-item> |  | ||||||
|                   #end |  | ||||||
|               #elseif($column.htmlType == "imageUpload")## 图片上传 |  | ||||||
|                   #set ($hasImageUploadColumn = true) |  | ||||||
|                 <el-form-item label="${comment}"> |  | ||||||
|                   <imageUpload v-model="form.${javaField}"/> |  | ||||||
|                 </el-form-item> |  | ||||||
|               #elseif($column.htmlType == "fileUpload")## 文件上传 |  | ||||||
|                   #set ($hasFileUploadColumn = true) |  | ||||||
|                 <el-form-item label="${comment}"> |  | ||||||
|                   <fileUpload v-model="form.${javaField}"/> |  | ||||||
|                 </el-form-item> |  | ||||||
|               #elseif($column.htmlType == "editor")## 文本编辑器 |  | ||||||
|                   #set ($hasEditorColumn = true) |  | ||||||
|                 <el-form-item label="${comment}"> |  | ||||||
|                   <editor v-model="form.${javaField}" :min-height="192"/> |  | ||||||
|                 </el-form-item> |  | ||||||
|               #elseif($column.htmlType == "select")## 下拉框 |  | ||||||
|                 <el-form-item label="${comment}" prop="${javaField}"> |  | ||||||
|                   <el-select v-model="form.${javaField}" placeholder="请选择${comment}"> |  | ||||||
|                       #if ("" != $dictType)## 有数据字典 |  | ||||||
|                         <el-option v-for="dict in this.getDictDatas(DICT_TYPE.$dictType.toUpperCase())" |  | ||||||
|                                    :key="dict.value" :label="dict.label" #if ($column.javaType == "Integer" || $column.javaType == "Long"):value="parseInt(dict.value)"#else:value="dict.value"#end /> |  | ||||||
|                       #else##没数据字典 |  | ||||||
|                         <el-option label="请选择字典生成" value="" /> |  | ||||||
|                       #end |  | ||||||
|                   </el-select> |  | ||||||
|                 </el-form-item> |  | ||||||
|               #elseif($column.htmlType == "checkbox")## 多选框 |  | ||||||
|                 <el-form-item label="${comment}" prop="${javaField}"> |  | ||||||
|                   <el-checkbox-group v-model="form.${javaField}"> |  | ||||||
|                       #if ("" != $dictType)## 有数据字典 |  | ||||||
|                         <el-checkbox v-for="dict in this.getDictDatas(DICT_TYPE.$dictType.toUpperCase())" |  | ||||||
|                                      :key="dict.value" #if($column.javaType == "Integer" || $column.javaType == "Long"):label="parseInt(dict.value)"#else:label="dict.value"#end>{{dict.label}}</el-checkbox> |  | ||||||
|                       #else##没数据字典 |  | ||||||
|                         <el-checkbox>请选择字典生成</el-checkbox> |  | ||||||
|                       #end |  | ||||||
|                   </el-checkbox-group> |  | ||||||
|                 </el-form-item> |  | ||||||
|               #elseif($column.htmlType == "radio")## 单选框 |  | ||||||
|                 <el-form-item label="${comment}" prop="${javaField}"> |  | ||||||
|                   <el-radio-group v-model="form.${javaField}"> |  | ||||||
|                       #if ("" != $dictType)## 有数据字典 |  | ||||||
|                         <el-radio v-for="dict in this.getDictDatas(DICT_TYPE.$dictType.toUpperCase())" |  | ||||||
|                                   :key="dict.value" #if($column.javaType == "Integer" || $column.javaType == "Long"):label="parseInt(dict.value)"#else:label="dict.value"#end>{{dict.label}}</el-radio> |  | ||||||
|                       #else##没数据字典 |  | ||||||
|                         <el-radio label="1">请选择字典生成</el-radio> |  | ||||||
|                       #end |  | ||||||
|                   </el-radio-group> |  | ||||||
|                 </el-form-item> |  | ||||||
|               #elseif($column.htmlType == "datetime")## 时间框 |  | ||||||
|                 <el-form-item label="${comment}" prop="${javaField}"> |  | ||||||
|                   <el-date-picker clearable v-model="form.${javaField}" type="date" value-format="timestamp" placeholder="选择${comment}" /> |  | ||||||
|                 </el-form-item> |  | ||||||
|               #elseif($column.htmlType == "textarea")## 文本框 |  | ||||||
|                 <el-form-item label="${comment}" prop="${javaField}"> |  | ||||||
|                   <el-input v-model="form.${javaField}" type="textarea" placeholder="请输入内容" /> |  | ||||||
|                 </el-form-item> |  | ||||||
|               #end |  | ||||||
|           #end |  | ||||||
|       #end |  | ||||||
|   </el-form> |  | ||||||
|   <div slot="footer" class="dialog-footer"> |  | ||||||
|     <el-button type="primary" @click="submitForm">确 定</el-button> |  | ||||||
|     <el-button @click="cancel">取 消</el-button> |  | ||||||
|   </div> |  | ||||||
| </el-dialog> |  | ||||||
|  |  | ||||||
|  |  | ||||||
| // 弹出层标题 |  | ||||||
| title: "", |  | ||||||
| // 是否显示弹出层 |  | ||||||
| open: false, |  | ||||||
|  |  | ||||||
| // 表单参数 |  | ||||||
| form: {}, |  | ||||||
| // 表单校验 |  | ||||||
| rules: { |  | ||||||
| #foreach ($column in $columns) |  | ||||||
|     #if (($column.createOperation || $column.updateOperation) && !$column.nullable && !${column.primaryKey})## 创建或者更新操作 && 要求非空 && 非主键 |  | ||||||
|         #set($comment=$column.columnComment) |  | ||||||
|         $column.javaField: [{ required: true, message: "${comment}不能为空", trigger: #if($column.htmlType == "select")"change"#else"blur"#end }], |  | ||||||
|     #end |  | ||||||
| #end |  | ||||||
| } |  | ||||||
|  |  | ||||||
|  |  | ||||||
| /** 表单重置 */ |  | ||||||
| reset() { |  | ||||||
| this.form = { |  | ||||||
| #foreach ($column in $columns) |  | ||||||
|     #if ($column.createOperation || $column.updateOperation) |     #if ($column.createOperation || $column.updateOperation) | ||||||
|         #if ($column.htmlType == "checkbox") |         #set ($dictType = $column.dictType) | ||||||
|             $column.javaField: [], |         #set ($javaField = $column.javaField) | ||||||
|         #else |         #set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) | ||||||
|             $column.javaField: undefined, |         #set ($comment = $column.columnComment) | ||||||
|  |         #set ($dictMethod = "getDictOptions") ## 计算使用哪个 dict 字典方法 | ||||||
|  |             #if ($javaType == "Integer" || $javaType == "Long" || $javaType == "Byte" || $javaType == "Short") | ||||||
|  |                 #set ($dictMethod = "getIntDictOptions") | ||||||
|  |             #elseif ($javaType == "String") | ||||||
|  |                 #set ($dictMethod = "getStrDictOptions") | ||||||
|  |             #elseif ($javaType == "Boolean") | ||||||
|  |                 #set ($dictMethod = "getBoolDictOptions") | ||||||
|  |             #end | ||||||
|  |         #if ($column.htmlType == "input" && !$column.primaryKey) ## 忽略主键,不用在表单里 | ||||||
|  |       <el-form-item label="${comment}" prop="${javaField}"> | ||||||
|  |         <el-input v-model="form.${javaField}" placeholder="请输入${comment}" /> | ||||||
|  |       </el-form-item> | ||||||
|  |         #elseif($column.htmlType == "imageUpload")## 图片上传 TODO 芋艿:待测试 | ||||||
|  |             #set ($hasImageUploadColumn = true) | ||||||
|  |           <el-form-item label="${comment}"> | ||||||
|  |             <imageUpload v-model="form.${javaField}"/> | ||||||
|  |           </el-form-item> | ||||||
|  |         #elseif($column.htmlType == "fileUpload")## 文件上传 TODO 芋艿:待测试 | ||||||
|  |             #set ($hasFileUploadColumn = true) | ||||||
|  |           <el-form-item label="${comment}"> | ||||||
|  |             <fileUpload v-model="form.${javaField}"/> | ||||||
|  |           </el-form-item> | ||||||
|  |         #elseif($column.htmlType == "editor")## 文本编辑器 TODO 芋艿:待测试 | ||||||
|  |             #set ($hasEditorColumn = true) | ||||||
|  |           <el-form-item label="${comment}"> | ||||||
|  |             <editor v-model="form.${javaField}" :min-height="192"/> | ||||||
|  |           </el-form-item> | ||||||
|  |         #elseif($column.htmlType == "select")## 下拉框 | ||||||
|  |           <el-form-item label="${comment}" prop="${javaField}"> | ||||||
|  |             <el-select v-model="form.${javaField}" placeholder="请选择${comment}"> | ||||||
|  |                 #if ("" != $dictType)## 有数据字典 | ||||||
|  |                     #if (!$dictMethods.contains($dictMethod)) ## 如果不存在,则添加到 dictMethods 数组中,后续好 import | ||||||
|  |                       #( $dictMethods.add($dictMethod) ) | ||||||
|  |                     #end | ||||||
|  |               <el-option | ||||||
|  |                 v-for="dict in $dictMethod(DICT_TYPE.$dictType.toUpperCase())" | ||||||
|  |                 :key="dict.value" | ||||||
|  |                 :label="dict.label" | ||||||
|  |                 :value="dict.value" | ||||||
|  |               /> | ||||||
|  |                 #else##没数据字典 | ||||||
|  |               <el-option label="请选择字典生成" value="" /> | ||||||
|  |                 #end | ||||||
|  |             </el-select> | ||||||
|  |           </el-form-item> | ||||||
|  |         #elseif($column.htmlType == "checkbox")## 多选框 TODO 芋艿:待测试 | ||||||
|  |           <el-form-item label="${comment}" prop="${javaField}"> | ||||||
|  |             <el-checkbox-group v-model="form.${javaField}"> | ||||||
|  |                 #if ("" != $dictType)## 有数据字典 | ||||||
|  |                     #if (!$dictMethods.contains($dictMethod)) ## 如果不存在,则添加到 dictMethods 数组中,后续好 import | ||||||
|  |                       #( $dictMethods.add($dictMethod) ) | ||||||
|  |                     #end | ||||||
|  |               <el-checkbox | ||||||
|  |                 v-for="dict in $dictMethod(DICT_TYPE.$dictType.toUpperCase())" | ||||||
|  |                 key="dict.value" | ||||||
|  |                 :label="dict.value"> | ||||||
|  |                 {{dict.label}} | ||||||
|  |               </el-checkbox> | ||||||
|  |                 #else##没数据字典 | ||||||
|  |                   <el-checkbox>请选择字典生成</el-checkbox> | ||||||
|  |                 #end | ||||||
|  |             </el-checkbox-group> | ||||||
|  |           </el-form-item> | ||||||
|  |         #elseif($column.htmlType == "radio")## 单选框 | ||||||
|  |           <el-form-item label="${comment}" prop="${javaField}"> | ||||||
|  |             <el-radio-group v-model="form.${javaField}"> | ||||||
|  |                 #if ("" != $dictType)## 有数据字典 | ||||||
|  |                     #if (!$dictMethods.contains($dictMethod)) ## 如果不存在,则添加到 dictMethods 数组中,后续好 import | ||||||
|  |                       #( $dictMethods.add($dictMethod) ) | ||||||
|  |                     #end | ||||||
|  |                   <el-radio | ||||||
|  |                     v-for="dict in $dictMethod(DICT_TYPE.$dictType.toUpperCase())" | ||||||
|  |                     :key="dict.value" | ||||||
|  |                     :label="dict.value"> | ||||||
|  |                     {{dict.label}} | ||||||
|  |                   </el-radio> | ||||||
|  |                 #else##没数据字典 | ||||||
|  |                   <el-radio label="1">请选择字典生成</el-radio> | ||||||
|  |                 #end | ||||||
|  |             </el-radio-group> | ||||||
|  |           </el-form-item> | ||||||
|  |         #elseif($column.htmlType == "datetime")## 时间框 TODO 芋艿:待测试 | ||||||
|  |           <el-form-item label="${comment}" prop="${javaField}"> | ||||||
|  |             <el-date-picker clearable v-model="form.${javaField}" type="date" value-format="timestamp" placeholder="选择${comment}" /> | ||||||
|  |           </el-form-item> | ||||||
|  |         #elseif($column.htmlType == "textarea")## 文本框 TODO 芋艿:待测试 | ||||||
|  |           <el-form-item label="${comment}" prop="${javaField}"> | ||||||
|  |             <el-input v-model="form.${javaField}" type="textarea" placeholder="请输入内容" /> | ||||||
|  |           </el-form-item> | ||||||
|         #end |         #end | ||||||
|     #end |     #end | ||||||
| #end | #end | ||||||
| }; |     </el-form> | ||||||
| this.resetForm("form"); |     <template #footer> | ||||||
| }, |       <div class="dialog-footer"> | ||||||
|  |         <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> | ||||||
| /** 新增按钮操作 */ |         <el-button @click="modelVisible = false">取 消</el-button> | ||||||
| handleAdd() { |       </div> | ||||||
| this.reset(); |     </template> | ||||||
| this.open = true; |   </Dialog> | ||||||
| this.title = "添加${table.classComment}"; | </template> | ||||||
| }, |  | ||||||
| /** 修改按钮操作 */ |  | ||||||
| handleUpdate(row) { |  | ||||||
| this.reset(); |  | ||||||
| const ${primaryColumn.javaField} = row.${primaryColumn.javaField}; |  | ||||||
| get${simpleClassName}(${primaryColumn.javaField}).then(response => { |  | ||||||
| this.form = response.data; |  | ||||||
| #foreach ($column in $columns) |  | ||||||
|     #if($column.htmlType == "checkbox")## checkbox 特殊处理 |  | ||||||
|     this.form.$column.javaField = this.form.${column.javaField}.split(","); |  | ||||||
|     #end |  | ||||||
| #end |  | ||||||
| this.open = true; |  | ||||||
| this.title = "修改${table.classComment}"; |  | ||||||
| }); |  | ||||||
| }, |  | ||||||
| /** 提交按钮 */ |  | ||||||
| submitForm() { |  | ||||||
| this.#[[$]]#refs["form"].validate(valid => { |  | ||||||
| if (!valid) { |  | ||||||
| return; |  | ||||||
| } |  | ||||||
| #foreach ($column in $columns) |  | ||||||
| #if($column.htmlType == "checkbox") |  | ||||||
| this.form.$column.javaField = this.form.${column.javaField}.join(","); |  | ||||||
| #end |  | ||||||
| #end |  | ||||||
| // 修改的提交 |  | ||||||
| if (this.form.${primaryColumn.javaField} != null) { |  | ||||||
| update${simpleClassName}(this.form).then(response => { |  | ||||||
| this.#[[$modal]]#.msgSuccess("修改成功"); |  | ||||||
| this.open = false; |  | ||||||
| this.getList(); |  | ||||||
| }); |  | ||||||
| return; |  | ||||||
| } |  | ||||||
| // 添加的提交 |  | ||||||
| create${simpleClassName}(this.form).then(response => { |  | ||||||
| this.#[[$modal]]#.msgSuccess("新增成功"); |  | ||||||
| this.open = false; |  | ||||||
| this.getList(); |  | ||||||
| }); |  | ||||||
| }); |  | ||||||
| }, |  | ||||||
|   | |||||||
| @@ -8,15 +8,23 @@ | |||||||
|       :inline="true" |       :inline="true" | ||||||
|       label-width="68px" |       label-width="68px" | ||||||
|     > |     > | ||||||
|     #set ($dictMethods = []) ## 使用到的 dict 字典方法 |     #set ($dictMethods = [])## 使用到的 dict 字典方法 | ||||||
|     #foreach($column in $columns) |     #foreach($column in $columns) | ||||||
|       #if ($column.listOperation) |         #if ($column.listOperation) | ||||||
|         #set ($dictType = $column.dictType) |             #set ($dictType = $column.dictType) | ||||||
|         #set ($javaField = $column.javaField) |             #set ($javaField = $column.javaField) | ||||||
|         #set ($javaType = $column.javaType) |             #set ($javaType = $column.javaType) | ||||||
|         #set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) |             #set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) | ||||||
|         #set ($comment = $column.columnComment) |             #set ($comment = $column.columnComment) | ||||||
|         #if ($column.htmlType == "input") |             #set ($dictMethod = "getDictOptions")## 计算使用哪个 dict 字典方法 | ||||||
|  |             #if ($javaType == "Integer" || $javaType == "Long" || $javaType == "Byte" || $javaType == "Short") | ||||||
|  |                 #set ($dictMethod = "getIntDictOptions") | ||||||
|  |             #elseif ($javaType == "String") | ||||||
|  |                 #set ($dictMethod = "getStrDictOptions") | ||||||
|  |             #elseif ($javaType == "Boolean") | ||||||
|  |                 #set ($dictMethod = "getBoolDictOptions") | ||||||
|  |             #end | ||||||
|  |             #if ($column.htmlType == "input") | ||||||
|       <el-form-item label="${comment}" prop="${javaField}"> |       <el-form-item label="${comment}" prop="${javaField}"> | ||||||
|         <el-input |         <el-input | ||||||
|           v-model="queryParams.${javaField}" |           v-model="queryParams.${javaField}" | ||||||
| @@ -26,35 +34,31 @@ | |||||||
|           class="!w-240px" |           class="!w-240px" | ||||||
|         /> |         /> | ||||||
|       </el-form-item> |       </el-form-item> | ||||||
|     #elseif ($column.htmlType == "select" || $column.htmlType == "radio") |             #elseif ($column.htmlType == "select" || $column.htmlType == "radio") | ||||||
|       <el-form-item label="${comment}" prop="${javaField}"> |       <el-form-item label="${comment}" prop="${javaField}"> | ||||||
|  |                 #if ($javaField.length() + $comment.length() > 8) | ||||||
|         <el-select |         <el-select | ||||||
|           v-model="queryParams.${javaField}" |           v-model="queryParams.${javaField}" | ||||||
|           placeholder="请选择${comment}" |           placeholder="请选择${comment}" | ||||||
|           clearable |           clearable | ||||||
|           class="!w-240px" |           class="!w-240px" | ||||||
|         > |         > | ||||||
|           #if ("" != $dictType)## 设置了 dictType 数据字典的情况 |                 #else | ||||||
|               #set ($dictMethod = "getDictOptions") ## 计算使用哪个 dict 字典方法 |         <el-select v-model="queryParams.${javaField}" placeholder="请选择${comment}" clearable class="!w-240px"> | ||||||
|               #if ($javaType == "Integer" || $javaType == "Long" || $javaType == "Byte" || $javaType == "Short") |                 #end | ||||||
|                 #set ($dictMethod = "getIntDictOptions") |                 #if ("" != $dictType)## 设置了 dictType 数据字典的情况 | ||||||
|               #elseif ($javaType == "String") |                     #if (!$dictMethods.contains($dictMethod))## 如果不存在,则添加到 dictMethods 数组中,后续好 import | ||||||
|                 #set ($dictMethod = "getStrDictOptions") |                         #set($ignore = $dictMethods.add($dictMethod) ) | ||||||
|               #elseif ($javaType == "Boolean") |                     #end | ||||||
|                 #set ($dictMethod = "getBoolDictOptions") |  | ||||||
|               #end |  | ||||||
|               #if (!$dictMethods.contains($dictMethod)) ## 如果不存在,则添加到 dictMethods 数组中,后续好 import |  | ||||||
|                   #( $dictMethods.add($dictMethod) ) |  | ||||||
|               #end |  | ||||||
|           <el-option |           <el-option | ||||||
|             v-for="dict in $dictMethod(DICT_TYPE.$dictType.toUpperCase())" |             v-for="dict in $dictMethod(DICT_TYPE.$dictType.toUpperCase())" | ||||||
|             :key="dict.value" |             :key="dict.value" | ||||||
|             :label="dict.label" |             :label="dict.label" | ||||||
|             :value="dict.value" |             :value="dict.value" | ||||||
|           /> |           /> | ||||||
|           #else## 未设置 dictType 数据字典的情况 |                 #else## 未设置 dictType 数据字典的情况 | ||||||
|           <el-option label="请选择字典生成" value="" /> |           <el-option label="请选择字典生成" value="" /> | ||||||
|           #end |                 #end | ||||||
|         </el-select> |         </el-select> | ||||||
|       </el-form-item> |       </el-form-item> | ||||||
|     #elseif($column.htmlType == "datetime") |     #elseif($column.htmlType == "datetime") | ||||||
| @@ -88,7 +92,15 @@ | |||||||
|       <el-form-item> |       <el-form-item> | ||||||
|         <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button> |         <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button> | ||||||
|         <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> |         <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> | ||||||
|  |         #if ($permissionPrefix <= 14) | ||||||
|         <el-button type="primary" @click="openModal('create')" v-hasPermi="['${permissionPrefix}:create']"> |         <el-button type="primary" @click="openModal('create')" v-hasPermi="['${permissionPrefix}:create']"> | ||||||
|  |         #else | ||||||
|  |         <el-button | ||||||
|  |           type="primary" | ||||||
|  |           @click="openModal('create')" | ||||||
|  |           v-hasPermi="['${permissionPrefix}:create']" | ||||||
|  |         > | ||||||
|  |         #end | ||||||
|           <Icon icon="ep:plus" class="mr-5px" /> 新增 |           <Icon icon="ep:plus" class="mr-5px" /> 新增 | ||||||
|         </el-button> |         </el-button> | ||||||
|         <el-button |         <el-button | ||||||
| @@ -179,7 +191,7 @@ const list = ref([]) // 列表的数据 | |||||||
| const queryParams = reactive({ | const queryParams = reactive({ | ||||||
|   pageNo: 1, |   pageNo: 1, | ||||||
|   pageSize: 10, |   pageSize: 10, | ||||||
|   #set ($listOperationLastIndex = -1) ## 求最后一个需要 , 的地方 |   #set ($listOperationLastIndex = -1)## 求最后一个需要 , 的地方 | ||||||
|   #foreach ($column in $columns) |   #foreach ($column in $columns) | ||||||
|     #if ($column.listOperation) |     #if ($column.listOperation) | ||||||
|       #set ($listOperationLastIndex = $foreach.index) |       #set ($listOperationLastIndex = $foreach.index) | ||||||
| @@ -249,7 +261,7 @@ const handleExport = async () => { | |||||||
|     await message.exportConfirm() |     await message.exportConfirm() | ||||||
|     // 发起导出 |     // 发起导出 | ||||||
|     exportLoading.value = true |     exportLoading.value = true | ||||||
|     const data = await ${simpleClassName}Api.export${simpleClassName}Api(queryParams) |     const data = await ${simpleClassName}Api.export${simpleClassName}(queryParams) | ||||||
|     download.excel(data, '${table.classComment}.xls') |     download.excel(data, '${table.classComment}.xls') | ||||||
|   } catch { |   } catch { | ||||||
|   } finally { |   } finally { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV