From af348f9edce6002139c6bce9074106fd5ac3b06e Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期五, 30 七月 2021 11:36:20 +0800
Subject: [PATCH] 定时任务屏蔽http(s)远程调用
---
src/main/resources/vm/vue/index-tree.vue.vm | 56 ++++++++++++++++++++++++++------------------------------
1 files changed, 26 insertions(+), 30 deletions(-)
diff --git a/src/main/resources/vm/vue/index-tree.vue.vm b/src/main/resources/vm/vue/index-tree.vue.vm
index d9b6f4d..f7105cb 100644
--- a/src/main/resources/vm/vue/index-tree.vue.vm
+++ b/src/main/resources/vm/vue/index-tree.vue.vm
@@ -73,7 +73,7 @@
<el-col :span="1.5">
<el-button
type="primary"
- plain
+ plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
@@ -108,7 +108,11 @@
#elseif($column.list && "" != $column.dictType)
<el-table-column label="${comment}" align="center" prop="${javaField}" :formatter="${javaField}Format" />
#elseif($column.list && "" != $javaField)
+#if(${foreach.index} == 1)
+ <el-table-column label="${comment}" prop="${javaField}" />
+#else
<el-table-column label="${comment}" align="center" prop="${javaField}" />
+#end
#end
#end
<el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
@@ -120,6 +124,13 @@
@click="handleUpdate(scope.row)"
v-hasPermi="['${moduleName}:${businessName}:edit']"
>淇敼</el-button>
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-plus"
+ @click="handleAdd(scope.row)"
+ v-hasPermi="['${moduleName}:${businessName}:add']"
+ >鏂板</el-button>
<el-button
size="mini"
type="text"
@@ -156,6 +167,10 @@
#elseif($column.htmlType == "imageUpload")
<el-form-item label="${comment}">
<imageUpload v-model="form.${field}"/>
+ </el-form-item>
+#elseif($column.htmlType == "fileUpload")
+ <el-form-item label="${comment}">
+ <fileUpload v-model="form.${field}"/>
</el-form-item>
#elseif($column.htmlType == "editor")
<el-form-item label="${comment}">
@@ -243,34 +258,10 @@
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName}, export${BusinessName} } from "@/api/${moduleName}/${businessName}";
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 == "imageUpload")
-import ImageUpload from '@/components/ImageUpload';
-#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 == "editor")
- Editor,
-#break
-#end
-#end
Treeselect
},
data() {
@@ -378,7 +369,7 @@
children: node.children
};
},
- /** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */
+ /** 鏌ヨ${functionName}涓嬫媺鏍戠粨鏋� */
getTreeselect() {
list${BusinessName}().then(response => {
this.${businessName}Options = [];
@@ -440,16 +431,21 @@
this.handleQuery();
},
/** 鏂板鎸夐挳鎿嶄綔 */
- handleAdd() {
+ handleAdd(row) {
this.reset();
- this.getTreeselect();
+ this.getTreeselect();
+ if (row != null && row.${treeCode}) {
+ this.form.${treeParentCode} = row.${treeCode};
+ } else {
+ this.form.${treeParentCode} = 0;
+ }
this.open = true;
this.title = "娣诲姞${functionName}";
},
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
this.reset();
- this.getTreeselect();
+ this.getTreeselect();
if (row != null) {
this.form.${treeParentCode} = row.${treeCode};
}
@@ -500,7 +496,7 @@
}).then(() => {
this.getList();
this.msgSuccess("鍒犻櫎鎴愬姛");
- })
+ }).catch(() => {});
}
}
};
--
Gitblit v1.9.3