优化错误提示
This commit is contained in:
@@ -333,7 +333,15 @@ export default {
|
||||
message: '保存成功'
|
||||
})
|
||||
this.$emit('submitSuccess')
|
||||
}).finally(() => {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
@@ -346,7 +354,15 @@ export default {
|
||||
if (this.saveSuccess) {
|
||||
this.saveSuccess()
|
||||
}
|
||||
}).finally(() => {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
@@ -371,9 +387,15 @@ export default {
|
||||
message: '重置成功 已保存'
|
||||
})
|
||||
this.getCommonChannel(this.form.gbId)
|
||||
}).catch((error) => {
|
||||
console.error(error)
|
||||
}).finally(() => {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
@@ -393,6 +415,13 @@ export default {
|
||||
this.getPaths()
|
||||
this.getRegionPaths()
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
|
||||
@@ -373,6 +373,13 @@ export default {
|
||||
node.parent.expand()
|
||||
this.$emit('onChannelChange', node.data.deviceId)
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
},
|
||||
addChannelFormDevice: function(id, node) {
|
||||
this.$refs.gbDeviceSelect.openDialog((rows) => {
|
||||
@@ -393,7 +400,15 @@ export default {
|
||||
this.$emit('onChannelChange', node.data.deviceId)
|
||||
node.loaded = false
|
||||
node.expand()
|
||||
}).finally(() => {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
@@ -413,7 +428,15 @@ export default {
|
||||
this.$emit('onChannelChange', node.data.deviceId)
|
||||
node.loaded = false
|
||||
node.expand()
|
||||
}).finally(() => {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
|
||||
@@ -73,6 +73,13 @@ export default {
|
||||
}
|
||||
this.initMap()
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
},
|
||||
initMap(){
|
||||
let center = fromLonLat([116.41020, 39.915119])
|
||||
|
||||
@@ -119,7 +119,6 @@ import VueEasyTree from '@wchbrad/vue-easy-tree'
|
||||
import regionEdit from './../dialog/regionEdit'
|
||||
import gbDeviceSelect from './../dialog/GbDeviceSelect'
|
||||
import GbChannelSelect from '../dialog/GbChannelSelect.vue'
|
||||
import chooseCivilCode from '@/views/dialog/chooseCivilCode.vue'
|
||||
|
||||
export default {
|
||||
name: 'DeviceTree',
|
||||
@@ -199,6 +198,7 @@ export default {
|
||||
})
|
||||
},
|
||||
loadNode: function(node, resolve) {
|
||||
console.log(22222)
|
||||
if (node.level === 0) {
|
||||
resolve([{
|
||||
treeId: '',
|
||||
@@ -364,8 +364,13 @@ export default {
|
||||
this.$emit('onChannelChange', node.data.deviceId)
|
||||
node.parent.loaded = false
|
||||
node.parent.expand()
|
||||
}).catch(function(error) {
|
||||
console.log(error)
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
},
|
||||
addChannelFormDevice: function(id, node) {
|
||||
|
||||
@@ -602,6 +602,13 @@ export default {
|
||||
this.startBroadcast(streamInfo.rtc)
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
} else if (this.broadcastStatus === 1) {
|
||||
this.broadcastStatus = -1
|
||||
this.broadcastRtc.close()
|
||||
@@ -690,6 +697,13 @@ export default {
|
||||
this.broadcastRtc.close()
|
||||
this.broadcastStatus = -1
|
||||
this.$store.dispatch('play/broadcastStop', [this.channelId])
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user