From cb4e11b19446843188cf628ac8f6be5fe1fa68c7 Mon Sep 17 00:00:00 2001 From: fujunling <2984387807@qq.com> Date: 星期二, 06 六月 2023 18:01:52 +0800 Subject: [PATCH] 配置 --- Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue | 44 +++++--------------------------------------- 1 files changed, 5 insertions(+), 39 deletions(-) diff --git a/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue b/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue index 18b9d68..19297f2 100644 --- a/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue +++ b/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue @@ -35,7 +35,7 @@ </template> <script> -import { getFormTemplate, getFormDetail } from "@/api/formTemplate"; +import { getFormDetail } from "@/api/formTemplate"; import { getDictionary } from "../../api/system/dict"; import vciWebRefer from "../refer/vciWebRefer.vue"; export default { @@ -497,33 +497,6 @@ this.handleResize(); }, methods: { - // 鍒濆鍖� - init(columnList) { - if (Array.isArray(columnList)) { - this.templateRender(columnList); - } else { - this.getFormTemplate(); - } - }, - // 鎺ュ彛鑾峰彇琛ㄥ崟鏁版嵁 - getFormTemplate() { - getFormTemplate({ - templateOid: this.templateOid, - codeClassifyOid: this.codeClassifyOid, - }) - .then((res) => { - if (res.status === 200) { - this.templateRender(this.testItems); - // 娴嬭瘯鏁版嵁灞曠ず - // this.templateRender(res.data.formDefineVO.items); - this.$emit("getFormTemplateEnd", res.data); - } - }) - .catch((err) => { - this.loading = false; - console.log(err); - }); - }, // 娓叉煋琛ㄥ崟妯℃澘 templateRender(formItemList) { // 鏃犻渶鍒嗙粍鏁版嵁 @@ -583,9 +556,6 @@ maxlength: formItem.maxlength, filterable: true, referConfig: formItem.referConfig, - change: () => { - this.changeFun(formItem.displayExtension, formItem.prop); - }, span: formItem.type === "textarea" ? 24 : this.trendsSpan, rules: [ { @@ -618,8 +588,7 @@ this.formIndex++; this.loading = false; this.geDictData(dictKeys); - // 娴嬭瘯鏁版嵁灞曠ず - // this.getFormDetail(); + this.getFormDetail(); }, // 浣跨敤浼犲叆鐨勮〃鍗曟暟鎹厤缃� resetFormConfig(formItem) { @@ -665,11 +634,6 @@ if ((type === "text" && !isIcon) || (type === "icon" && isIcon)) { return val; } - }, - changeFun(displayExtension, prop) { - // executeCode({displayExtension, data: this.form}).then(res => { - // this.form[prop] = res.data.data - // }) }, // 鑾峰彇swich鍜屽凡鎷垮埌鐨勪笅鎷夋暟鎹� getDataList(type, dicData) { @@ -725,9 +689,11 @@ }, // 鑾峰彇琛ㄥ崟璇︽儏鏁版嵁 getFormDetail() { + if (this.type === 'add') return if (this.type === "add") return; - getFormDetail({ templateOid: this.templateOid, oid: this.rowOid }).then( + getFormDetail({ templateOid: this.templateOid, oid: '213D13D5-76D3-6B42-0932-705693F6B6E4' }).then( (res) => { + this.form = Object.assign(this.form, res.obj) console.log(res, "res"); } ); -- Gitblit v1.9.3