优化错误提示
This commit is contained in:
@@ -316,7 +316,15 @@ export default {
|
||||
setTimeout(() => {
|
||||
this.initData()
|
||||
}, 1000)
|
||||
}).finally(() => {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
itemData.playLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
@@ -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'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,7 +236,13 @@ export default {
|
||||
}).then((data) => {
|
||||
this.total = data.total
|
||||
this.deviceList = data.list
|
||||
}).finally(() => {
|
||||
}).catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
}).finally(() => {
|
||||
this.getDeviceListLoading = false
|
||||
})
|
||||
},
|
||||
@@ -256,6 +262,13 @@ export default {
|
||||
.then((data) => {
|
||||
this.getDeviceList()
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
showChannelList: function(row) {
|
||||
@@ -284,7 +297,15 @@ export default {
|
||||
this.$refs.syncChannelProgress.openDialog(itemData.deviceId, () => {
|
||||
this.getDeviceList()
|
||||
})
|
||||
}).finally(() => {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
this.getDeviceList()
|
||||
})
|
||||
},
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -116,9 +116,16 @@ export default {
|
||||
this.$store.dispatch('user/login', this.loginForm).then((re) => {
|
||||
this.$router.push({ path: this.redirect || '/' })
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}).catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
|
||||
@@ -242,6 +242,13 @@ export default {
|
||||
.then(data => {
|
||||
this.play(data)
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -253,6 +260,13 @@ export default {
|
||||
.then(data => {
|
||||
this.editPosition(data)
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -264,6 +278,13 @@ export default {
|
||||
.then(data => {
|
||||
this.edit(data)
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -345,7 +366,15 @@ export default {
|
||||
streamInfo: data,
|
||||
hasAudio: channel.hasAudio
|
||||
})
|
||||
}).finally(() => {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
},
|
||||
@@ -444,6 +473,13 @@ export default {
|
||||
this.$refs.deviceTree.refresh('channel' + channel.gbId)
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
},
|
||||
showDrawThinBox: function(show){
|
||||
this.showDrawThin = show
|
||||
@@ -453,6 +489,13 @@ export default {
|
||||
if (this.drawThinId !== null) {
|
||||
// 发送消息 清空抽稀结果
|
||||
this.$store.dispatch('commonChanel/clearThin', this.drawThinId)
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
this.drawThinId = null
|
||||
}
|
||||
if (this.drawThinLayer !== null) {
|
||||
@@ -496,6 +539,13 @@ export default {
|
||||
this.showDrawThinLayer(drawThinId)
|
||||
})
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
this.quicklyDrawThinLoading = false
|
||||
})
|
||||
@@ -556,6 +606,13 @@ export default {
|
||||
this.showDrawThinLayer(drawThinId)
|
||||
})
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
this.boxDrawThinLoading = false
|
||||
})
|
||||
@@ -590,6 +647,13 @@ export default {
|
||||
})
|
||||
this.showDrawThinBox(false)
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
this.saveDrawThinLoading = false
|
||||
})
|
||||
@@ -607,6 +671,13 @@ export default {
|
||||
message: '数据还原成功'
|
||||
})
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +158,11 @@ export default {
|
||||
this.initData()
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error)
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
|
||||
@@ -243,7 +243,11 @@ export default {
|
||||
})
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error)
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
row.playLoading = false
|
||||
@@ -258,7 +262,11 @@ export default {
|
||||
})
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error)
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
},
|
||||
queryCloudRecords: function(row) {
|
||||
@@ -278,6 +286,13 @@ export default {
|
||||
})
|
||||
this.initData()
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
@@ -244,6 +244,13 @@ export default {
|
||||
hasAudio: true
|
||||
})
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
row.playLoading = false
|
||||
})
|
||||
@@ -263,6 +270,13 @@ export default {
|
||||
})
|
||||
this.initData()
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
@@ -299,6 +313,13 @@ export default {
|
||||
this.initData()
|
||||
this.$refs.pushListTable.clearSelection()
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
|
||||
@@ -145,7 +145,11 @@ export default {
|
||||
this.getUserList()
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error)
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: error,
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user