From 329c95196e5803e1472f0c7bda087f6771b2789f Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期三, 02 六月 2021 17:15:20 +0800
Subject: [PATCH] update 更新测试案例

---
 ruoyi-generator/src/main/resources/vm/vue/index.vue.vm |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 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 c8b3e51..1c87a46 100644
--- a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
+++ b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
@@ -108,6 +108,7 @@
           plain
           icon="el-icon-download"
           size="mini"
+		  :loading="exportLoading"
           @click="handleExport"
           v-hasPermi="['${moduleName}:${businessName}:export']"
         >瀵煎嚭</el-button>
@@ -158,7 +159,7 @@
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
       v-show="total>0"
       :total="total"
@@ -253,8 +254,8 @@
         <el-form-item label="${comment}" prop="${field}">
           <el-date-picker clearable size="small"
             v-model="form.${field}"
-            type="date"
-            value-format="yyyy-MM-dd"
+            type="datetime"
+            value-format="yyyy-MM-dd HH:mm:ss"
             placeholder="閫夋嫨${comment}">
           </el-date-picker>
         </el-form-item>
@@ -354,6 +355,8 @@
     return {
       // 閬僵灞�
       loading: true,
+      // 瀵煎嚭閬僵灞�
+      exportLoading: false,
       // 閫変腑鏁扮粍
       ids: [],
 #if($table.sub)
@@ -531,9 +534,11 @@
     },
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleUpdate(row) {
+      this.loading = true;
       this.reset();
       const ${pkColumn.javaField} = row.${pkColumn.javaField} || this.ids
       get${BusinessName}(${pkColumn.javaField}).then(response => {
+        this.loading = false;
         this.form = response.data;
 #foreach ($column in $columns)
 #if($column.htmlType == "checkbox")
@@ -551,6 +556,7 @@
     submitForm() {
       this.#[[$]]#refs["form"].validate(valid => {
         if (valid) {
+          this.loading = true;
 #foreach ($column in $columns)
 #if($column.htmlType == "checkbox")
           this.form.$column.javaField = this.form.${column.javaField}.join(",");
@@ -561,12 +567,14 @@
 #end
           if (this.form.${pkColumn.javaField} != null) {
             update${BusinessName}(this.form).then(response => {
+              this.loading = false;
               this.msgSuccess("淇敼鎴愬姛");
               this.open = false;
               this.getList();
             });
           } else {
             add${BusinessName}(this.form).then(response => {
+              this.loading = false;
               this.msgSuccess("鏂板鎴愬姛");
               this.open = false;
               this.getList();
@@ -582,9 +590,11 @@
           confirmButtonText: "纭畾",
           cancelButtonText: "鍙栨秷",
           type: "warning"
-        }).then(function() {
+        }).then(() => {
+          this.loading = true;
           return del${BusinessName}(${pkColumn.javaField}s);
         }).then(() => {
+          this.loading = false;
           this.getList();
           this.msgSuccess("鍒犻櫎鎴愬姛");
         })
@@ -630,10 +640,12 @@
           confirmButtonText: "纭畾",
           cancelButtonText: "鍙栨秷",
           type: "warning"
-        }).then(function() {
+        }).then(() => {
+          this.exportLoading = true;
           return export${BusinessName}(queryParams);
         }).then(response => {
           this.download(response.msg);
+          this.exportLoading = false;
         })
     }
   }

--
Gitblit v1.9.3