jinlin
2023-11-06 6e912707b2c73bb183563f197b92b08ac19790ff
zt/core/src/main/resources/template/add-or-update.vue.vm
@@ -26,7 +26,7 @@
    methods: {
      // 获取信息
      async getInfo() {
        let res = await #[[this.$http.get(]]#`/${moduleName}/${pathName}/#[[${]]#this.dataForm.${pk.attrName}}`)
        let res = await #[[this.$http.get(]]#`/${moduleName}/${pathName}/#[[${]]#this.dataForm.id}`)
        this.dataForm = {
          ...this.dataForm,
          ...res.data
@@ -34,7 +34,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}/${pathName}/', this.dataForm)
        if (res.success) {
          await this.$tip.success()
          this.$refs.dialog.close()