|
@@ -373,6 +373,7 @@ export default class extends Vue {
|
|
|
addDevice() {
|
|
|
this.status = '添加'
|
|
|
this.dialogVisible = true
|
|
|
+ this.currRowContent = {}
|
|
|
}
|
|
|
|
|
|
|
|
@@ -384,7 +385,15 @@ export default class extends Vue {
|
|
|
|
|
|
// 添加 事件处理
|
|
|
handleDataForm() {
|
|
|
- console.log(this.$refs.dataForm.form)
|
|
|
+ const eq = tools.formatData(this.$refs.dataForm.form);
|
|
|
+ if (eq.id) {
|
|
|
+ //更新
|
|
|
+ this.handleUpdateEquip(eq);
|
|
|
+ } else {
|
|
|
+ eq.classCode = this.deviceVal[1]
|
|
|
+ // 创建
|
|
|
+ this.handleCreateEquip(eq);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 编辑当前行
|