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 | 22 +++++++--------------- 1 files changed, 7 insertions(+), 15 deletions(-) diff --git a/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue b/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue index 6afac39..c8e5b43 100644 --- a/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue +++ b/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue @@ -564,9 +564,6 @@ placeholder: formItem.inputTip, options:formItem.referConfig }:{}, - change: () => { - this.changeFun(formItem.displayExtension, formItem.prop); - }, span: formItem.type === "textarea" ? 24 : this.trendsSpan, rules: [ { @@ -597,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(); }, @@ -646,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") { @@ -692,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); @@ -706,11 +699,10 @@ // 鑾峰彇琛ㄥ崟璇︽儏鏁版嵁 getFormDetail() { if (this.type === 'add') return - if (this.type === "add") return; - getFormDetail({ templateOid: this.templateOid, oid: '213D13D5-76D3-6B42-0932-705693F6B6E4' }).then( + 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