|
@@ -3,7 +3,7 @@
|
|
:visible.sync="showDialog"
|
|
:visible.sync="showDialog"
|
|
title="查看设备"
|
|
title="查看设备"
|
|
:modal-append-to-body="false"
|
|
:modal-append-to-body="false"
|
|
- :modal="false"
|
|
|
|
|
|
+ :modal="true"
|
|
style="text-align:left;"
|
|
style="text-align:left;"
|
|
@close="closeDialog"
|
|
@close="closeDialog"
|
|
width="60%"
|
|
width="60%"
|
|
@@ -133,6 +133,7 @@ export default {
|
|
.isUnbindDeviceList(formData)
|
|
.isUnbindDeviceList(formData)
|
|
.then(function(response) {
|
|
.then(function(response) {
|
|
self.loading = false;
|
|
self.loading = false;
|
|
|
|
+
|
|
var jsonData = response.data.data;
|
|
var jsonData = response.data.data;
|
|
|
|
|
|
self.tableData = jsonData.data;
|
|
self.tableData = jsonData.data;
|
|
@@ -161,39 +162,44 @@ export default {
|
|
},
|
|
},
|
|
handleBound(record) {
|
|
handleBound(record) {
|
|
var self = this;
|
|
var self = this;
|
|
- self.loading = true;
|
|
|
|
- this.$confirm("是否绑定?", "提示", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning",
|
|
|
|
- distinguishCancelAndClose: true
|
|
|
|
- })
|
|
|
|
- .then(() => {
|
|
|
|
- self.formModel.personId = self.personId;
|
|
|
|
- self.formModel.deviceId = record.id;
|
|
|
|
|
|
+ // this.$confirm("是否绑定?", "提示", {
|
|
|
|
+ // confirmButtonText: "确定",
|
|
|
|
+ // cancelButtonText: "取消",
|
|
|
|
+ // type: "warning",
|
|
|
|
+ // distinguishCancelAndClose: true
|
|
|
|
+ // })
|
|
|
|
+ // .then(() => {
|
|
|
|
+ if(confirm("是否绑定?")){
|
|
|
|
+ self.formModel.personId = self.personId;
|
|
|
|
+ self.formModel.deviceId = record.id;
|
|
|
|
|
|
- return personDeviceRelationApi
|
|
|
|
- .add(self.formModel)
|
|
|
|
- .then(function(response) {
|
|
|
|
- var jsonData = response.data;
|
|
|
|
- self.changePage(self.pageIndex);
|
|
|
|
- if (jsonData.result) {
|
|
|
|
- self.$message({
|
|
|
|
- message: "绑定成功!",
|
|
|
|
- type: "success"
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- self.$message({
|
|
|
|
- message: jsonData.message + "",
|
|
|
|
- type: "warning"
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- })
|
|
|
|
- .catch(error => {
|
|
|
|
- self.loading = false;
|
|
|
|
- // self.$message.error(error + "");
|
|
|
|
- });
|
|
|
|
|
|
+ self.loading = true;
|
|
|
|
+
|
|
|
|
+ return personDeviceRelationApi
|
|
|
|
+ .add(self.formModel)
|
|
|
|
+ .then(function(response) {
|
|
|
|
+ self.loading = false;
|
|
|
|
+
|
|
|
|
+ var jsonData = response.data;
|
|
|
|
+ self.changePage(self.pageIndex);
|
|
|
|
+ if (jsonData.result) {
|
|
|
|
+ self.$message({
|
|
|
|
+ message: "绑定成功!",
|
|
|
|
+ type: "success"
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ self.$message({
|
|
|
|
+ message: jsonData.message + "",
|
|
|
|
+ type: "warning"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ // })
|
|
|
|
+ // .catch(error => {
|
|
|
|
+ // self.loading = false;
|
|
|
|
+ // // self.$message.error(error + "");
|
|
|
|
+ // });
|
|
},
|
|
},
|
|
handleBatchBound() {
|
|
handleBatchBound() {
|
|
var self = this;
|
|
var self = this;
|