| | |
| | | handleEquipmentChange(id) { |
| | | getAction(this.url.queryByEquipmentId, {equipmentId: id}).then(res => { |
| | | if (res.success) { |
| | | console.log(res.result) |
| | | this.model = { |
| | | ...this.model, |
| | | standardId: res.result.id, |
| | |
| | | this.$message.error("请完成所有必填信息后再提交!") |
| | | } else { |
| | | let tableData = this.$refs.table.getTableData().fullData |
| | | if (!tableData || tableData.length === 0) { |
| | | this.$message.error("点检项为空,无法提交!") |
| | | return |
| | | } |
| | | const data = { |
| | | ...this.model, |
| | | workOrderId: this.workOrderId, |
| | |
| | | }) |
| | | }, |
| | | resetFormData() { |
| | | this.$refs.form.resetFields() |
| | | if (this.$refs.form) { |
| | | this.$refs.form.resetFields() |
| | | } |
| | | this.model = {} |
| | | this.dataSource = [] |
| | | }, |