From f8fe13b6f7d8ad1ae53e7bf6a6cf83f584d52a4d Mon Sep 17 00:00:00 2001
From: fujunling <2984387807@qq.com>
Date: 星期二, 06 六月 2023 17:39:24 +0800
Subject: [PATCH] 动态表单组件重构

---
 Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue b/Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue
index b5c685d..7195205 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue
@@ -38,6 +38,7 @@
       :visible.sync="formTemplateVisible"
       :templateOid="this.resembleTemplateOid"
       :rowOid="rowOid"
+      title="鏌ョ湅璇︾粏淇℃伅"
       :codeClassifyOid="this.resembleCodeClassifyOid"
     ></FormTemplateDialog>
   </div>
@@ -79,9 +80,7 @@
     return {
       formTemplateVisible: false,
       activeName: "findlike",
-      tableData: [
-        {id: '*****', materialclassifyText: '001', tuhao: 'tuhao', iod: '123123131312'}
-      ],
+      tableData: [],
       loading: false,
       resembleTemplateOid: "78B8C7C5-A042-0B96-FE6D-65421451782A",
       resembleCodeClassifyOid: "4524E801-6CC6-92E8-1AC3-2AB9604E8F96",
@@ -125,7 +124,7 @@
   },
   methods: {
     // 鐩镐技椤规煡璇�
-    resembleQuery(form) {
+    async resembleQuery(form) {
       this.loading = true;
       this.activeName = "findlike";
       const { defaultValue, formValue } =
@@ -137,17 +136,14 @@
         data: formValue,
       };
       params = Object.assign(params, defaultValue);
-      findLike(params).then((res) => {
-        this.loading = false;
-        // this.tableData = res.data.data || [];
-      });
+      this.tableData = (await findLike(params)).data.data || []
+      this.loading = false
+      return this.tableData
     },
 
     openFormTemlpate(row) {
-      this.$forceUpdate()
-      console.log(row, 'row.oid');
       this.codetemplateoid = row.codetemplateoid;
-      this.rowOid = row.oid
+      this.rowOid = row.iod
       this.formTemplateVisible = true;
     },
     getDefaultValueAndFormValues(form) {

--
Gitblit v1.9.3