diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
index d4c5e42..6d67c2e 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
@@ -108,9 +108,13 @@
#elseif($column.list && "" != $column.dictType)
#elseif($column.list && "" != $javaField)
+#if(${foreach.index} == 1)
+
+#else
#end
#end
+#end
新增
+ {
this.${businessName}Options = [];
@@ -456,16 +467,21 @@ export default {
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};
}