From 85f024c8203d4611ce22199409b0ba95e062a29c Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期日, 27 十二月 2020 10:04:58 +0800
Subject: [PATCH] Excel注解支持Image图片导出

---
 src/main/resources/vm/vue/index-tree.vue.vm |   53 +++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/src/main/resources/vm/vue/index-tree.vue.vm b/src/main/resources/vm/vue/index-tree.vue.vm
index 10a9862..e81c203 100644
--- a/src/main/resources/vm/vue/index-tree.vue.vm
+++ b/src/main/resources/vm/vue/index-tree.vue.vm
@@ -38,14 +38,27 @@
           <el-option label="璇烽�夋嫨瀛楀吀鐢熸垚" value="" />
         </el-select>
       </el-form-item>
-#elseif($column.htmlType == "datetime")
+#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN")
       <el-form-item label="${comment}" prop="${column.javaField}">
-        <el-date-picker clearable size="small" style="width: 200px"
+        <el-date-picker clearable size="small"
           v-model="queryParams.${column.javaField}"
           type="date"
           value-format="yyyy-MM-dd"
           placeholder="閫夋嫨${comment}">
         </el-date-picker>
+      </el-form-item>
+#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
+      <el-form-item label="${comment}">
+        <el-date-picker
+          v-model="daterange${AttrName}"
+          size="small"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="寮�濮嬫棩鏈�"
+          end-placeholder="缁撴潫鏃ユ湡"
+        ></el-date-picker>
       </el-form-item>
 #end
 #end
@@ -139,6 +152,10 @@
         <el-form-item label="${comment}" prop="${field}">
           <el-input v-model="form.${field}" placeholder="璇疯緭鍏�${comment}" />
         </el-form-item>
+#elseif($column.htmlType == "uploadImage")
+        <el-form-item label="${comment}">
+          <uploadImage v-model="form.${field}"/>
+        </el-form-item>
 #elseif($column.htmlType == "editor")
         <el-form-item label="${comment}">
           <editor v-model="form.${field}" :min-height="192"/>
@@ -197,7 +214,7 @@
         </el-form-item>
 #elseif($column.htmlType == "datetime")
         <el-form-item label="${comment}" prop="${field}">
-          <el-date-picker clearable size="small" style="width: 200px"
+          <el-date-picker clearable size="small"
             v-model="form.${field}"
             type="date"
             value-format="yyyy-MM-dd"
@@ -226,6 +243,12 @@
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 #foreach($column in $columns)
+#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "uploadImage")
+import UploadImage from '@/components/UploadImage';
+#break
+#end
+#end
+#foreach($column in $columns)
 #if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "editor")
 import Editor from '@/components/Editor';
 #break
@@ -235,6 +258,12 @@
 export default {
   name: "${BusinessName}",
   components: {
+#foreach($column in $columns)
+#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "uploadImage")
+    UploadImage,
+#break
+#end
+#end
 #foreach($column in $columns)
 #if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "editor")
     Editor,
@@ -420,19 +449,15 @@
 #end
           if (this.form.${pkColumn.javaField} != null) {
             update${BusinessName}(this.form).then(response => {
-              if (response.code === 200) {
-                this.msgSuccess("淇敼鎴愬姛");
-                this.open = false;
-                this.getList();
-              }
+              this.msgSuccess("淇敼鎴愬姛");
+              this.open = false;
+              this.getList();
             });
           } else {
             add${BusinessName}(this.form).then(response => {
-              if (response.code === 200) {
-                this.msgSuccess("鏂板鎴愬姛");
-                this.open = false;
-                this.getList();
-              }
+              this.msgSuccess("鏂板鎴愬姛");
+              this.open = false;
+              this.getList();
             });
           }
         }
@@ -449,7 +474,7 @@
         }).then(() => {
           this.getList();
           this.msgSuccess("鍒犻櫎鎴愬姛");
-        }).catch(function() {});
+        })
     }
   }
 };

--
Gitblit v1.9.3