From 7f1971310aa80bc2bdeaf11a0d2bcfd725b30f39 Mon Sep 17 00:00:00 2001 From: fujunling <2984387807@qq.com> Date: 星期四, 08 六月 2023 15:26:25 +0800 Subject: [PATCH] fjl --- Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue | 44 +++++++++++++++++++++++++------------------- 1 files changed, 25 insertions(+), 19 deletions(-) diff --git a/Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue b/Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue index 86dce48..da90c5c 100644 --- a/Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue +++ b/Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue @@ -1,7 +1,14 @@ <template> <div> - <el-table :data="tableData" v-loading="loading" height="250" :border="true"> + <el-table + :data="tableData" + v-loading="loading" + height="250" + :border="true" + size="small" + > <el-table-column + v-if="column.length > 0" type="index" width="60" label="搴忓彿" @@ -29,7 +36,9 @@ ref="FormTemplateDialog" type="detail" :visible.sync="formTemplateVisible" - :templateOid="this.resembleTemplateOid" + :templateOid="resembleTemplateOid" + :rowOid="rowOid" + title="鏌ョ湅璇︾粏淇℃伅" :codeClassifyOid="this.resembleCodeClassifyOid" ></FormTemplateDialog> </div> @@ -37,11 +46,10 @@ <script> import { findLike } from "@/api/formTemplate.js"; -import FormTemplateDialog from "./index.vue"; export default { name: "ResembleQuery", - components: { FormTemplateDialog }, + components: { FormTemplateDialog: () => import('./index.vue') }, props: { column: { type: Array, @@ -55,6 +63,10 @@ type: String, default: "", }, + codeRuleOid: { + type: String, + default: "", + }, type: { type: String, default: "add", @@ -63,20 +75,16 @@ type: Object, default: () => ({}), }, - codeRuleOid: { - type: String, - default: "", - }, }, data() { return { - tableVisible: true, formTemplateVisible: false, activeName: "findlike", tableData: [], loading: false, resembleTemplateOid: "78B8C7C5-A042-0B96-FE6D-65421451782A", resembleCodeClassifyOid: "4524E801-6CC6-92E8-1AC3-2AB9604E8F96", + rowOid: '', defaultValue: {}, secVOList: [], defaultKeys: [ @@ -114,11 +122,9 @@ formItems: [], }; }, - created() {}, - computed: {}, methods: { // 鐩镐技椤规煡璇� - resembleQuery(form) { + async resembleQuery(form) { this.loading = true; this.activeName = "findlike"; const { defaultValue, formValue } = @@ -127,18 +133,18 @@ codeClassifyOid: this.codeClassifyOid, codeRuleOid: this.codeRuleOid, templateOid: this.templateOid, - data: formValue + data: formValue, }; params = Object.assign(params, defaultValue); - this.tableVisible = true; - 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.codetemplateoid = row.codetemplateoid; + this.resembleTemplateOid = row.codetemplateoid + this.resembleCodeClassifyOid = row.codeClassifyOid + this.rowOid = row.oid this.formTemplateVisible = true; }, getDefaultValueAndFormValues(form) { -- Gitblit v1.9.3