| | |
| | | edit(record) { |
| | | let that = this; |
| | | that.getInspectionCycle() |
| | | that.initOptions(); |
| | | // that.initOptions(); |
| | | that.dataSource = []; |
| | | that.form.resetFields(); |
| | | that.model = Object.assign({}, record); |
| | |
| | | let obj; |
| | | if (!this.model.id) { |
| | | formData.versionStatus = '1' |
| | | formData.approvalStatus = '1' |
| | | obj = postAction(this.url.add, formData); |
| | | } else { |
| | | if (this.isRevise) { |
| | | formData.versionStatus = '1' |
| | | formData.approvalStatus = '1' |
| | | obj = postAction(this.url.revise, formData); |
| | | } else { |
| | | obj = requestPut(this.url.edit, formData, { id: this.model.id }); |