优化错误提示
This commit is contained in:
@@ -63,8 +63,12 @@ export default {
|
||||
})
|
||||
this.jtChannel = data
|
||||
})
|
||||
.catch(function(error) {
|
||||
console.log(error)
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$store.dispatch('jtDevice/addChannel', this.jtChannel)
|
||||
@@ -76,8 +80,12 @@ export default {
|
||||
})
|
||||
this.jtChannel = data
|
||||
})
|
||||
.catch(function(error) {
|
||||
console.log(error)
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -234,8 +234,12 @@ export default {
|
||||
this.initData()
|
||||
}, 1000)
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err)
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
this.isLoging = false
|
||||
@@ -266,8 +270,12 @@ export default {
|
||||
.then((data) => {
|
||||
this.initData()
|
||||
})
|
||||
.catch(function(error) {
|
||||
console.error(error)
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
},
|
||||
getSnap: function(row) {
|
||||
@@ -302,8 +310,12 @@ export default {
|
||||
},
|
||||
updateChannel: function(row) {
|
||||
this.$store.dispatch('jtDevice/updateChannel', row)
|
||||
.catch((e) => {
|
||||
console.log(e)
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
},
|
||||
refresh: function() {
|
||||
|
||||
@@ -256,6 +256,13 @@ export default {
|
||||
.then(data => {
|
||||
this.getList()
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
@@ -330,6 +337,13 @@ export default {
|
||||
this.serverId = data.addOn.serverId
|
||||
this.$refs.configInfo.openDialog(data, 'jt1078Config')
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
},
|
||||
queryAttribute: function(itemData) {
|
||||
this.$store.dispatch('jtDevice/queryAttribute', itemData.phoneNumber)
|
||||
|
||||
Reference in New Issue
Block a user