|
@@ -27,10 +27,10 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- getData() {
|
|
|
+ getData(id) {
|
|
|
new Promise((resolve) => {
|
|
|
this.$http
|
|
|
- .get(`/sc-gate-web/gate/find/${this.params.row.deviceId}`)
|
|
|
+ .get(`/sc-gate-web/gate/find/${id}`)
|
|
|
.then(({ status, data, msg }) => {
|
|
|
if (status == 0) {
|
|
|
resolve && resolve(data);
|
|
@@ -75,7 +75,7 @@ export default {
|
|
|
openType(id) {
|
|
|
this.$msgBox(`远程开门`, `是否远程开门?`)
|
|
|
.then(() => {
|
|
|
- this.$http.post('/sc-gate-web/gate/remoteOpenDoor', { ids: id }).then(({ status, data, msg }) => {
|
|
|
+ this.$http.post('/sc-gate-web/gate/remoteOpenDoor', { ids: [id] }).then(({ status, data, msg }) => {
|
|
|
if (0 === status) {
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
@@ -99,7 +99,7 @@ export default {
|
|
|
showCancelButton: true,
|
|
|
props: {
|
|
|
row: this.params.row,
|
|
|
- deviceNo: this.formData.deviceNo
|
|
|
+ deviceNo: this.formData.tenantId
|
|
|
}
|
|
|
});
|
|
|
this.params.callback();
|
|
@@ -107,7 +107,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getData();
|
|
|
+ let ids = JSON.parse(JSON.stringify(this.params.row.deviceId));
|
|
|
+ let newIds = ids.split(',');
|
|
|
+ debugger;
|
|
|
+ this.formData.nodeId = newIds[0];
|
|
|
+ this.formData.tenantId = newIds[1];
|
|
|
+ this.getData(newIds[0]);
|
|
|
}
|
|
|
};
|
|
|
</script>
|