From dc41a85c4eadeae567973157f64c549d414f49ec Mon Sep 17 00:00:00 2001 From: fujunling <2984387807@qq.com> Date: 星期一, 05 六月 2023 18:09:43 +0800 Subject: [PATCH] 配置文件修改 --- Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue | 67 ++++++++++++++------------------- 1 files changed, 28 insertions(+), 39 deletions(-) diff --git a/Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue b/Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue index 894b3c0..b5c685d 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="搴忓彿" @@ -25,13 +32,14 @@ </template> </el-table-column> </el-table> - <FormTemplate - ref="FormTemplate" + <FormTemplateDialog + ref="FormTemplateDialog" type="detail" :visible.sync="formTemplateVisible" :templateOid="this.resembleTemplateOid" + :rowOid="rowOid" :codeClassifyOid="this.resembleCodeClassifyOid" - ></FormTemplate> + ></FormTemplateDialog> </div> </template> @@ -40,6 +48,7 @@ export default { name: "ResembleQuery", + components: { FormTemplateDialog: () => import('./index.vue') }, props: { column: { type: Array, @@ -53,9 +62,9 @@ type: String, default: "", }, - hasResemble: { - type: Boolean, - default: false, + codeRuleOid: { + type: String, + default: "", }, type: { type: String, @@ -65,20 +74,18 @@ type: Object, default: () => ({}), }, - codeRuleOid: { - type: String, - default: '' - } }, data() { return { - tableVisible: true, formTemplateVisible: false, activeName: "findlike", - tableData: [], + tableData: [ + {id: '*****', materialclassifyText: '001', tuhao: 'tuhao', iod: '123123131312'} + ], loading: false, resembleTemplateOid: "78B8C7C5-A042-0B96-FE6D-65421451782A", resembleCodeClassifyOid: "4524E801-6CC6-92E8-1AC3-2AB9604E8F96", + rowOid: '', defaultValue: {}, secVOList: [], defaultKeys: [ @@ -116,29 +123,13 @@ formItems: [], }; }, - created() { - this.getCodeRule(); - }, - computed: { - showCodeOrder() { - if (this.type === "add") { - if (this.secVOList.length == 0 && this.hasResemble) { - return false; - } - } else { - if (this.hasResemble) { - return false; - } - } - return true; - }, - }, methods: { // 鐩镐技椤规煡璇� resembleQuery(form) { this.loading = true; this.activeName = "findlike"; - const { defaultValue, formValue } = this.getDefaultValueAndFormValues(form); + const { defaultValue, formValue } = + this.getDefaultValueAndFormValues(form); let params = { codeClassifyOid: this.codeClassifyOid, codeRuleOid: this.codeRuleOid, @@ -146,18 +137,17 @@ data: formValue, }; params = Object.assign(params, defaultValue); - this.tableVisible = true; findLike(params).then((res) => { this.loading = false; - this.tableData = res.data.data || []; + // this.tableData = res.data.data || []; }); }, - + openFormTemlpate(row) { - this.$nextTick(() => { - console.log(this.$refs.FormTemplate); - }); + this.$forceUpdate() + console.log(row, 'row.oid'); this.codetemplateoid = row.codetemplateoid; + this.rowOid = row.oid this.formTemplateVisible = true; }, getDefaultValueAndFormValues(form) { @@ -179,6 +169,5 @@ }; }, }, - }; -</script> \ No newline at end of file +</script> -- Gitblit v1.9.3