From 4d4123243cf6272e824769684637a8b9c42da033 Mon Sep 17 00:00:00 2001
From: Ricky <hk_ricky@163.com>
Date: Thu, 25 Nov 2021 13:42:06 +0800
Subject: [PATCH] 修复代码生成复选框字典遗漏问题

---
 ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
index 292ce7c..2f698f4 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
@@ -136,7 +136,11 @@
 #elseif($column.list && "" != $column.dictType)
       <el-table-column label="${comment}" align="center" prop="${javaField}">
         <template slot-scope="scope">
+#if($column.htmlType == "checkbox")
+          <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
+#else
           <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/>
+#end
         </template>
       </el-table-column>
 #elseif($column.list && "" != $javaField)
@@ -543,7 +547,7 @@
     /** ${subTable.functionName}删除按钮操作 */
     handleDelete${subClassName}() {
       if (this.checked${subClassName}.length == 0) {
-        this.msgError("请先选择要删除的${subTable.functionName}数据");
+        this.#[[$modal]]#.msgError("请先选择要删除的${subTable.functionName}数据");
       } else {
         const ${subclassName}List = this.${subclassName}List;
         const checked${subClassName} = this.checked${subClassName};
@@ -561,7 +565,7 @@
     handleExport() {
       this.download('${moduleName}/${businessName}/export', {
         ...this.queryParams
-      }, `${moduleName}_${businessName}.xlsx`)
+      }, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`)
     }
   }
 };

--
Gitblit v1.9.3