| | |
| | | placeholder: formItem.inputTip, |
| | | options:formItem.referConfig |
| | | }:{}, |
| | | change: () => { |
| | | this.changeFun(formItem.displayExtension, formItem.prop); |
| | | }, |
| | | span: formItem.type === "textarea" ? 24 : this.trendsSpan, |
| | | rules: [ |
| | | { |
| | |
| | | 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(); |
| | | }, |
| | |
| | | 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") { |
| | |
| | | // 表单校验 |
| | | 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); |
| | |
| | | // 获取表单详情数据 |
| | | 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; |
| | | } |
| | | ); |
| | | }, |