From ab9bc35f9f3e6fe2e57fe054aa0dc898fe9a8d2c Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期四, 02 九月 2021 15:45:57 +0800 Subject: [PATCH] update MP字段验证策略更改为 NOT_NULL 个别特殊字段使用注解单独处理 --- ruoyi-generator/src/main/resources/vm/vue/index.vue.vm | 24 +++++++----------------- 1 files changed, 7 insertions(+), 17 deletions(-) diff --git a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm index b4349c1..aec95db 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm @@ -135,7 +135,11 @@ </template> </el-table-column> #elseif($column.list && $column.dictType && "" != $column.dictType) - <el-table-column label="${comment}" align="center" prop="${javaField}" :formatter="${javaField}Format" /> + <el-table-column label="${comment}" align="center" prop="${javaField}"> + <template slot-scope="scope"> + <dict-tag :options="${javaField}Options" :value="scope.row.${javaField}"/> + </template> + </el-table-column> #elseif($column.list && "" != $javaField) <el-table-column label="${comment}" align="center" prop="${javaField}" /> #end @@ -308,7 +312,6 @@ <script> import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"; -import { downLoadExcel } from "@/utils/download"; export default { name: "${BusinessName}", @@ -364,6 +367,7 @@ queryParams: { pageNum: 1, pageSize: 10, + reasonable: true, #foreach ($column in $columns) #if($column.query) $column.javaField: undefined#if($velocityCount != $columns.size()),#end @@ -427,20 +431,6 @@ this.loading = false; }); }, -#foreach ($column in $columns) -#if(${column.dictType} && ${column.dictType} != '') -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end - // $comment瀛楀吀缈昏瘧 - ${column.javaField}Format(row, column) { - return this.selectDictLabel#if($column.htmlType == "checkbox")s#end(this.${column.javaField}Options, row.${column.javaField}); - }, -#end -#end // 鍙栨秷鎸夐挳 cancel() { this.open = false; @@ -601,7 +591,7 @@ #end /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { - downLoadExcel('/${moduleName}/${businessName}/export', this.queryParams); + this.downLoadExcel('/${moduleName}/${businessName}/export', this.queryParams); } } }; -- Gitblit v1.9.3