From dcc5dc0d16a657eff0b24b2a0b1ca9ff7aabe7bc Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Sun, 29 Aug 2021 17:39:10 +0800
Subject: [PATCH] 修复带utc日期格式 yyyy-MM-dd'T'HH:mm:ss.SSS 在safari浏览器中无法正确格式化的问题
---
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm | 57 +++++++++------------------------------------------------
1 files changed, 9 insertions(+), 48 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 a404b4d..3bf618a 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
@@ -309,47 +309,9 @@
<script>
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
-#foreach($column in $columns)
-#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "imageUpload")
-import ImageUpload from '@/components/ImageUpload';
-#break
-#end
-#end
-#foreach($column in $columns)
-#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "fileUpload")
-import FileUpload from '@/components/FileUpload';
-#break
-#end
-#end
-#foreach($column in $columns)
-#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "editor")
-import Editor from '@/components/Editor';
-#break
-#end
-#end
export default {
name: "${BusinessName}",
- components: {
-#foreach($column in $columns)
-#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "imageUpload")
- ImageUpload,
-#break
-#end
-#end
-#foreach($column in $columns)
-#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "fileUpload")
- FileUpload,
-#break
-#end
-#end
-#foreach($column in $columns)
-#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "editor")
- Editor,
-#break
-#end
-#end
- },
data() {
return {
// 遮罩层
@@ -587,7 +549,7 @@
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
- }).catch((err)=>{})
+ }).catch(() => {});
},
#if($table.sub)
/** ${subTable.functionName}序号 */
@@ -608,19 +570,18 @@
/** ${subTable.functionName}删除按钮操作 */
handleDelete${subClassName}() {
if (this.checked${subClassName}.length == 0) {
- this.$alert("请先选择要删除的${subTable.functionName}数据", "提示", { confirmButtonText: "确定", });
+ this.msgError("请先选择要删除的${subTable.functionName}数据");
} else {
- this.${subclassName}List.splice(this.checked${subClassName}[0].index - 1, 1);
+ const ${subclassName}List = this.${subclassName}List;
+ const checked${subClassName} = this.checked${subClassName};
+ this.${subclassName}List = ${subclassName}List.filter(function(item) {
+ return checked${subClassName}.indexOf(item.index) == -1
+ });
}
},
- /** 单选框选中数据 */
+ /** 复选框选中数据 */
handle${subClassName}SelectionChange(selection) {
- if (selection.length > 1) {
- this.$refs.${subclassName}.clearSelection();
- this.$refs.${subclassName}.toggleRowSelection(selection.pop());
- } else {
- this.checked${subClassName} = selection;
- }
+ this.checked${subClassName} = selection.map(item => item.index)
},
#end
/** 导出按钮操作 */
--
Gitblit v1.9.3