From 75212b53168e4979db4fa2939109fe2f9a489524 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 09 六月 2023 19:58:05 +0800
Subject: [PATCH] 代码整合,查询接口

---
 Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue b/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue
index 4272125..c8e5b43 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue
@@ -594,7 +594,9 @@
       this.$set(this.option, "column", column);
       this.$set(this.option, "group", group);
       this.formIndex++;
-      this.loading = false;
+      if (this.type === 'add') {
+        this.loading = false;
+      }
       this.geDictData(dictKeys);
       this.getFormDetail();
     },
@@ -643,11 +645,6 @@
         return val;
       }
     },
-    changeFun(displayExtension, prop) {
-      // executeCode({displayExtension, data: this.form}).then(res => {
-      //   this.form[prop] = res.data.data
-      // })
-    },
     // 鑾峰彇swich鍜屽凡鎷垮埌鐨勪笅鎷夋暟鎹�
     getDataList(type, dicData) {
       if (type === "truefalse") {
@@ -689,8 +686,7 @@
     // 琛ㄥ崟鏍¢獙
     validate() {
       return new Promise((resolve) => {
-        this.$refs.form.validate((valid, done, msg) => {
-          console.error(msg, valid);
+        this.$refs.form.validate((valid, done) => {
           if (valid) {
             done();
             resolve(true);
@@ -705,8 +701,8 @@
       if (this.type === 'add') return
       getFormDetail({ templateOid: this.templateOid, oid: this.rowOid }).then(
         (res) => {
-          this.form = Object.assign(this.form, res.obj)
-          console.log(res, "res");
+          this.form = Object.assign(this.form, res.data.data[0])
+          this.loading = false;
         }
       );
     },

--
Gitblit v1.9.3