| | |
| | | }, |
| | | |
| | | async submit() { |
| | | let res = {}; |
| | | if (this.addObj.type == "cluster") { |
| | | const res = await addCluster({ |
| | | res = await addCluster({ |
| | | clusterPwd: this.auth_password, |
| | | clusterId: this.addObj.id, |
| | | }); |
| | | } else { |
| | | const res = await addDeviceToUser({ |
| | | res = await addDeviceToUser({ |
| | | clusterPwd: this.auth_password, |
| | | deviceId: this.addObj.id, |
| | | clusterId: this.addObj.cid, |
| | | }); |
| | | } |
| | | |
| | | if (res && res.success) { |
| | | this.$notify({ |
| | | type: "success", |
| | | message: "添加成功", |
| | | }); |
| | | this.close(); |
| | | } |
| | | }, |
| | | showBox(type, id, cid) { |
| | | console.log(cid); |
| | | this.auth_password = ""; |
| | | this.showPasswordBox = true; |
| | | this.addObj = { |
| | | type, |