diff --git a/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm
index d4c5e42..fca5538 100644
--- a/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm
+++ b/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm
@@ -108,8 +108,12 @@
#elseif($column.list && "" != $column.dictType)
#elseif($column.list && "" != $javaField)
+#if(${foreach.index} == 1)
+
+#else
#end
+#end
#end
@@ -120,6 +124,13 @@
@click="handleUpdate(scope.row)"
v-hasPermi="['${moduleName}:${businessName}:edit']"
>修改
+ 新增
{
this.${businessName}Options = [];
@@ -456,16 +467,21 @@ export default {
this.handleQuery();
},
/** 新增按钮操作 */
- handleAdd() {
+ handleAdd(row) {
this.reset();
- this.getTreeselect();
+ this.getTreeselect();
+ if (row != null && row.dkAreaCode) {
+ 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};
}