|
@@ -2,7 +2,7 @@
|
|
|
<el-dialog
|
|
|
:visible.sync="showDialog"
|
|
|
title="查看设备"
|
|
|
- :modal-append-to-body="false"
|
|
|
+ append-to-body
|
|
|
:modal="true"
|
|
|
style="text-align:left;"
|
|
|
@close="closeDialog"
|
|
@@ -169,34 +169,39 @@ export default {
|
|
|
var idList = this.multipleSelection.map(record => {
|
|
|
return record.device.id;
|
|
|
});
|
|
|
- if (confirm("是否绑定?")) {
|
|
|
- self.loading = true;
|
|
|
- var formData = new FormData();
|
|
|
- formData.append("companyId", self.companyId);
|
|
|
- formData.append("deviceIds", idList);
|
|
|
- return companyInfoApi.bindDevice(formData).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"
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ this.$confirm("是否绑定?","提示","warning").then((result)=>{
|
|
|
+ if (result) {
|
|
|
+ self.loading = true;
|
|
|
+ var formData = new FormData();
|
|
|
+ formData.append("companyId", self.companyId);
|
|
|
+ formData.append("deviceIds", idList);
|
|
|
+ return companyInfoApi.bindDevice(formData).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"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
handleBound(record) {
|
|
|
//绑定设备
|
|
|
var self = this;
|
|
|
- if (confirm("是否绑定?")) {
|
|
|
+
|
|
|
+ this.$confirm("是否绑定?","提示",{type:"success"}).then((result)=>{
|
|
|
+ if (result) {
|
|
|
self.loading = true;
|
|
|
var formData = new FormData();
|
|
|
formData.append("companyId", self.companyId);
|
|
@@ -219,6 +224,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ });
|
|
|
},
|
|
|
handleUnBound(record) {
|
|
|
//取消绑定
|