From 1772fc5e211f9e9e0ab4cdc6c29b436aac178c2a Mon Sep 17 00:00:00 2001 From: jinlin <jinlin> Date: 星期五, 23 二月 2024 12:19:55 +0800 Subject: [PATCH] 修改 --- zt/core/src/main/resources/template/add-or-update.vue.vm | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/zt/core/src/main/resources/template/add-or-update.vue.vm b/zt/core/src/main/resources/template/add-or-update.vue.vm index 8c2775c..2955394 100644 --- a/zt/core/src/main/resources/template/add-or-update.vue.vm +++ b/zt/core/src/main/resources/template/add-or-update.vue.vm @@ -3,7 +3,11 @@ <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px"> #foreach($column in $columns) <zt-form-item label="${column.comments}" prop="${column.attrName}" rules="required"> - <el-input v-model="dataForm.${column.attrName}"></el-input> + #if($column.dictType != 'null' && $column.dictType != '') + <zt-dict v-model="dataForm.${column.attrName}" dict="$column.dictType"></zt-dict> + #else + <el-input v-model="dataForm.${column.attrName}"></el-input> + #end </zt-form-item> #end </el-form> @@ -26,7 +30,7 @@ methods: { // 鑾峰彇淇℃伅 async getInfo() { - let res = await #[[this.$http.get(]]#`/${moduleName}/${pathName}/#[[${]]#this.dataForm.${pk.attrName}}`) + let res = await #[[this.$http.get(]]#`/${moduleName}/${className}/#[[${]]#this.dataForm.id}`) this.dataForm = { ...this.dataForm, ...res.data @@ -34,7 +38,7 @@ }, // 琛ㄥ崟鎻愪氦 async formSubmit() { - let res = await #[[this.$http]]#[!this.dataForm.${pk.attrName} ? 'post' : 'put']('/${moduleName}/${pathName}/', this.dataForm) + let res = await #[[this.$http]]#[!this.dataForm.id ? 'post' : 'put']('/${moduleName}/${className}/', this.dataForm) if (res.success) { await this.$tip.success() this.$refs.dialog.close() -- Gitblit v1.9.1