| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addQualityMonitorDetail, |
| | | updateQualityMonitorDetail |
| | | } from "@/api/cnas/process/ensureResultsValidity/qualityMonitor"; |
| | | |
| | | export default { |
| | | name: 'detailFormDialog', |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | |
| | | let entity = this.HaveJson(this.form) |
| | | entity.qualityMonitorId = this.qualityMonitorId |
| | | this.upLoad = true |
| | | this.$axios.post(this.$api.qualityMonitor.addQualityMonitorDetail, entity, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | addQualityMonitorDetail(entity).then(res => { |
| | | this.upLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('新增成功') |
| | |
| | | handleEdit () { |
| | | const entity = this.HaveJson(this.form) |
| | | this.upLoad = true |
| | | this.$axios.post(this.$api.qualityMonitor.updateQualityMonitorDetail, entity, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | updateQualityMonitorDetail(entity).then(res => { |
| | | this.upLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('修改成功') |