| | |
| | | }, |
| | | created() { |
| | | this.elementManagementL(); |
| | | this.alarmMajorEquipmentErt(); |
| | | }, |
| | | methods: { |
| | | alarmMajorEquipmentErt(){ |
| | | majorEquipmentErt().then(res=>{ |
| | | console.log(res) |
| | | this.equipmentName=res.data.result |
| | | }) |
| | | }, |
| | | async elementManagementL() { |
| | | var res = await majorEquipmentList(this.listQuery); |
| | | console.log(res); |
| | |
| | | this.$nextTick(() => { |
| | | this.$refs["form"].clearValidate(); |
| | | }); |
| | | majorEquipmentErt().then(res=>{ |
| | | console.log(res) |
| | | this.equipmentName=res.data.result |
| | | }) |
| | | if (type == "新增") { |
| | | this.title = "新增"; |
| | | this.form = { |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | majorEquipmentDel({id:val}).then((res) => { |
| | | if (res.data.code == 200) { |
| | | this.elementManagementL(); |
| | | this.$notify({ |
| | | title: "成功", |
| | | message: "删除成功", |
| | | type: "success", |
| | | duration: 2000, |
| | | }); |
| | | } |
| | | }); |
| | | .then(()=>{ |
| | | majorEquipmentDel({id:val}).then((res) => { |
| | | if (res.data.code == 200) { |
| | | this.elementManagementL(); |
| | | this.$notify({ |
| | | title: "成功", |
| | | message: "删除成功", |
| | | type: "success", |
| | | duration: 2000, |
| | | }); |
| | | } |
| | | }) |
| | | }) |
| | | .catch(error =>{ |
| | | }); |
| | | }, |
| | | find(){ |
| | | this.elementManagementL(); |