临时提交

pull/1642/head
648540858 2024-08-26 17:59:29 +08:00
parent c45bf5d6af
commit b2b7426871
16 changed files with 378 additions and 98 deletions

View File

@ -163,15 +163,23 @@ export default {
}).then((res)=> { }).then((res)=> {
this.saveLoading = false; this.saveLoading = false;
if (typeof (res.data.code) != "undefined" && res.data.code === 0) { if (typeof (res.data.code) != "undefined" && res.data.code === 0) {
this.$message.success("保存成功"); this.$message.success({
console.log(res.data.data) showClose: true,
message: "保存成功"
});
this.streamProxy = res.data.data this.streamProxy = res.data.data
}else { }else {
this.$message.error(res.data.msg); this.$message.error({
showClose: true,
message: res.data.msg
})
} }
this.saveLoading = false; this.saveLoading = false;
}).catch((error) =>{ }).catch((error) =>{
this.$message.error(error); this.$message.error({
showClose: true,
message: error
});
this.saveLoading = false; this.saveLoading = false;
}).finally(()=>{ }).finally(()=>{
console.log("finally==finally") console.log("finally==finally")
@ -185,13 +193,22 @@ export default {
}).then((res)=> { }).then((res)=> {
this.saveLoading = false; this.saveLoading = false;
if (typeof (res.data.code) != "undefined" && res.data.code === 0) { if (typeof (res.data.code) != "undefined" && res.data.code === 0) {
this.$message.success("保存成功"); this.$message.success({
showClose: true,
message: "保存成功"
});
this.streamProxy = res.data.data this.streamProxy = res.data.data
}else { }else {
this.$message.error(res.data.msg); this.$message.error({
showClose: true,
message: res.data.msg
})
} }
}).catch((error) =>{ }).catch((error) =>{
this.$message.error(res.data.error); this.$message.error({
showClose: true,
message: error
})
this.saveLoading = false; this.saveLoading = false;
}).finally(()=>{ }).finally(()=>{
this.saveLoading = false; this.saveLoading = false;

View File

@ -225,14 +225,23 @@
} }
}) })
}else { }else {
this.$message.success("未找到可用设备"); this.$message.success({
showClose: true,
message: "未找到可用设备"
});
} }
}else { }else {
this.$message.error(res.data.msg); this.$message.error({
showClose: true,
message: res.data.msg
})
} }
}).catch((error)=> { }).catch((error)=> {
this.$message.error(error.response.data.msg); this.$message.error({
showClose: true,
message: error
})
}); });
}, },
@ -302,21 +311,24 @@
this.$router.push(`/cloudRecordDetail/${row.app}/${row.stream}`) this.$router.push(`/cloudRecordDetail/${row.app}/${row.stream}`)
}, },
deleteStreamProxy: function(row){ deleteStreamProxy: function(row){
let that = this;
this.$confirm('确定删除此代理吗?', '提示', { this.$confirm('确定删除此代理吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
that.$axios({ this.$axios({
method:"delete", method:"delete",
url:"/api/proxy/delete", url:"/api/proxy/delete",
params:{ params:{
id: row.id, id: row.id,
} }
}).then((res)=>{ }).then((res)=>{
that.initData() this.$message.success({
}).catch(function (error) { showClose: true,
message: "删除成功"
})
this.initData()
}).catch((error) =>{
console.log(error); console.log(error);
}); });
}).catch(() => { }).catch(() => {

View File

@ -73,12 +73,21 @@ export default {
data: this.streamPush data: this.streamPush
}).then((res) => { }).then((res) => {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success("保存成功"); this.$message.success({
showClose: true,
message: '保存成功',
});
}else { }else {
this.$message.error(res.data.msg) this.$message.error({
showClose: true,
message: res.data.msg
})
} }
}).catch((error) => { }).catch((error) => {
this.$message.error(error) this.$message.error({
showClose: true,
message: error
})
}).finally(()=>[ }).finally(()=>[
this.locading = false this.locading = false
]) ])
@ -89,13 +98,23 @@ export default {
data: this.streamPush data: this.streamPush
}).then((res) => { }).then((res) => {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success("保存成功"); this.$message.success({
showClose: true,
message: '保存成功',
});
this.streamPush = res.data.data this.streamPush = res.data.data
}else { }else {
this.$message.error(res.data.msg) this.$message.error({
showClose: true,
message: res.data.msg
})
} }
}).catch((error) => { }).catch((error) => {
this.$message.error(error) this.$message.error({
showClose: true,
message: error
})
}).finally(()=>[ }).finally(()=>[
this.locading = false this.locading = false
]) ])

View File

@ -245,15 +245,24 @@ export default {
data: this.form data: this.form
}).then((res) => { }).then((res) => {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success("保存成功"); this.$message.success({
showClose: true,
message: "保存成功"
});
if (this.saveSuccess) { if (this.saveSuccess) {
this.saveSuccess() this.saveSuccess()
} }
}else { }else {
this.$message.error(res.data.msg); this.$message.error({
showClose: true,
message: res.data.msg
})
} }
}).catch((error) => { }).catch((error) => {
this.$message.error(error); this.$message.error({
showClose: true,
message: error
});
}).finally(()=>[ }).finally(()=>[
this.locading = false this.locading = false
]) ])
@ -264,16 +273,25 @@ export default {
data: this.form data: this.form
}).then((res) => { }).then((res) => {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success("保存成功"); this.$message.success({
showClose: true,
message: "保存成功"
});
this.form = res.data.data this.form = res.data.data
if (this.saveSuccess) { if (this.saveSuccess) {
this.saveSuccess() this.saveSuccess()
} }
}else { }else {
this.$message.error(res.data.msg); this.$message.error({
showClose: true,
message: res.data.msg
})
} }
}).catch((error) => { }).catch((error) => {
this.$message.error(error); this.$message.error({
showClose: true,
message: error
});
}).finally(()=>[ }).finally(()=>[
this.locading = false this.locading = false
]) ])
@ -296,7 +314,10 @@ export default {
} }
}).then((res) => { }).then((res) => {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success("重置成功 已保存"); this.$message.success({
showClose: true,
message: "重置成功 已保存"
});
this.getCommonChannel() this.getCommonChannel()
} }
}).catch((error) => { }).catch((error) => {

View File

@ -260,18 +260,27 @@ export default {
} }
}).then((res)=> { }).then((res)=> {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success("保存成功") this.$message.success({
showClose: true,
message: "保存成功"
})
if (this.onChannelChange) { if (this.onChannelChange) {
this.onChannelChange() this.onChannelChange()
} }
node.loaded = false node.loaded = false
node.expand(); node.expand();
}else { }else {
this.$message.error(res.data.msg) this.$message.error({
showClose: true,
message: res.data.msg
})
} }
this.loading = false this.loading = false
}).catch((error)=> { }).catch((error)=> {
this.$message.error(error) this.$message.error({
showClose: true,
message: error
})
this.loading = false this.loading = false
}); });
}) })
@ -290,18 +299,27 @@ export default {
} }
}).then((res)=> { }).then((res)=> {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success("保存成功") this.$message.success({
showClose: true,
message: "保存成功"
})
if (this.onChannelChange) { if (this.onChannelChange) {
this.onChannelChange() this.onChannelChange()
} }
node.loaded = false node.loaded = false
node.expand(); node.expand();
}else { }else {
this.$message.error(res.data.msg) this.$message.error({
showClose: true,
message: res.data.msg
})
} }
this.loading = false this.loading = false
}).catch((error)=> { }).catch((error)=> {
this.$message.error(error) this.$message.error({
showClose: true,
message: error
})
this.loading = false this.loading = false
}); });
}) })

View File

@ -258,18 +258,27 @@ export default {
} }
}).then((res)=> { }).then((res)=> {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success("保存成功") this.$message.success({
showClose: true,
message: "保存成功"
})
if (this.onChannelChange) { if (this.onChannelChange) {
this.onChannelChange() this.onChannelChange()
} }
node.loaded = false node.loaded = false
node.expand(); node.expand();
}else { }else {
this.$message.error(res.data.msg) this.$message.error({
showClose: true,
message: res.data.msg
})
} }
this.loading = false this.loading = false
}).catch((error)=> { }).catch((error)=> {
this.$message.error(error) this.$message.error({
showClose: true,
message: error
})
this.loading = false this.loading = false
}); });
}) })
@ -288,18 +297,27 @@ export default {
} }
}).then((res)=> { }).then((res)=> {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success("保存成功") this.$message.success({
showClose: true,
message: "保存成功"
})
if (this.onChannelChange) { if (this.onChannelChange) {
this.onChannelChange() this.onChannelChange()
} }
node.loaded = false node.loaded = false
node.expand(); node.expand();
}else { }else {
this.$message.error(res.data.msg) this.$message.error({
showClose: true,
message: res.data.msg
})
} }
this.loading = false this.loading = false
}).catch((error)=> { }).catch((error)=> {
this.$message.error(error) this.$message.error({
showClose: true,
message: error
})
this.loading = false this.loading = false
}); });
}) })

View File

@ -229,7 +229,11 @@ export default {
parent = this.allVal[0].val + this.allVal[1].val parent = this.allVal[0].val + this.allVal[1].val
} }
if (this.activeKey !== '0' && parent === '') { if (this.activeKey !== '0' && parent === '') {
this.$message.error('请先选择上级行政区划'); this.$message.error({
showClose: true,
message: '请先选择上级行政区划'
})
} }
this.queryChildList(parent); this.queryChildList(parent);
} else if (this.activeKey === '4') { } else if (this.activeKey === '4') {
@ -253,10 +257,16 @@ export default {
if (res.data.code === 0) { if (res.data.code === 0) {
this.regionList = res.data.data this.regionList = res.data.data
} else { } else {
this.$message.error(res.data.msg); this.$message.error({
showClose: true,
message: res.data.msg
})
} }
}).catch((error) => { }).catch((error) => {
this.$message.error(error); this.$message.error({
showClose: true,
message: error
});
}); });
}, },
queryIndustryCodeList: function(){ queryIndustryCodeList: function(){
@ -268,10 +278,16 @@ export default {
if (res.data.code === 0) { if (res.data.code === 0) {
this.industryCodeTypeList = res.data.data this.industryCodeTypeList = res.data.data
} else { } else {
this.$message.error(res.data.msg); this.$message.error({
showClose: true,
message: res.data.msg
})
} }
}).catch((error) => { }).catch((error) => {
this.$message.error(error); this.$message.error({
showClose: true,
message: error
});
}); });
}, },
queryDeviceTypeList: function(){ queryDeviceTypeList: function(){
@ -283,10 +299,16 @@ export default {
if (res.data.code === 0) { if (res.data.code === 0) {
this.deviceTypeList = res.data.data this.deviceTypeList = res.data.data
} else { } else {
this.$message.error(res.data.msg); this.$message.error({
showClose: true,
message: res.data.msg
})
} }
}).catch((error) => { }).catch((error) => {
this.$message.error(error); this.$message.error({
showClose: true,
message: error
});
}); });
}, },
queryNetworkIdentificationTypeList: function(){ queryNetworkIdentificationTypeList: function(){
@ -298,10 +320,16 @@ export default {
if (res.data.code === 0) { if (res.data.code === 0) {
this.networkIdentificationTypeList = res.data.data this.networkIdentificationTypeList = res.data.data
} else { } else {
this.$message.error(res.data.msg); this.$message.error({
showClose: true,
message: res.data.msg
})
} }
}).catch((error) => { }).catch((error) => {
this.$message.error(error); this.$message.error({
showClose: true,
message: error
});
}); });
}, },
closeModel: function (){ closeModel: function (){

View File

@ -7,7 +7,7 @@
v-if="Object.keys(this.player).length > 1"> v-if="Object.keys(this.player).length > 1">
<el-tab-pane label="Jessibuca" name="jessibuca"> <el-tab-pane label="Jessibuca" name="jessibuca">
<jessibucaPlayer v-if="activePlayer === 'jessibuca'" ref="jessibuca" :visible.sync="showVideoDialog" <jessibucaPlayer v-if="activePlayer === 'jessibuca'" ref="jessibuca" :visible.sync="showVideoDialog"
:videoUrl="videoUrl" :error="videoError" :message="videoError" :videoUrl="videoUrl" :error="videoError" :message="videoError"
:hasAudio="hasAudio" fluent autoplay live></jessibucaPlayer> :hasAudio="hasAudio" fluent autoplay live></jessibucaPlayer>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="WebRTC" name="webRTC"> <el-tab-pane label="WebRTC" name="webRTC">
@ -636,7 +636,10 @@ export default {
copyUrl: function (dropdownItem) { copyUrl: function (dropdownItem) {
console.log(dropdownItem) console.log(dropdownItem)
this.$copyText(dropdownItem).then((e) => { this.$copyText(dropdownItem).then((e) => {
this.$message.success("成功拷贝到粘贴板"); this.$message.success({
showClose: true,
message: "成功拷贝到粘贴板"
})
}, (e) => { }, (e) => {
}) })

View File

@ -78,7 +78,10 @@ export default {
data: this.group data: this.group
}).then((res)=> { }).then((res)=> {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success("保存成功") this.$message.success({
showClose: true,
message: "保存成功"
})
if (this.submitCallback)this.submitCallback(this.group) if (this.submitCallback)this.submitCallback(this.group)
}else { }else {
this.$message({ this.$message({

View File

@ -84,7 +84,10 @@ export default {
this.callback(res.data.data) this.callback(res.data.data)
this.close() this.close()
}else { }else {
this.$message.error(res.data.msg); this.$message.error({
showClose: true,
message: res.data.msg,
});
} }
} }

View File

@ -218,7 +218,10 @@ export default {
} }
} }
if (this.activeKey !== '0' && parent === '') { if (this.activeKey !== '0' && parent === '') {
this.$message.error('请先选择上级行政区划'); this.$message.error({
showClose: true,
message: "请先选择上级行政区划"
})
} }
if (parent !== "") { if (parent !== "") {
this.queryChildList(parent); this.queryChildList(parent);
@ -241,10 +244,16 @@ export default {
if (res.data.code === 0) { if (res.data.code === 0) {
this.regionList = res.data.data this.regionList = res.data.data
} else { } else {
this.$message.error(res.data.msg); this.$message.error({
showClose: true,
message: res.data.msg
})
} }
}).catch((error) => { }).catch((error) => {
this.$message.error(error); this.$message.error({
showClose: true,
message: error
});
}); });
}, },
closeModel: function (){ closeModel: function (){
@ -286,10 +295,16 @@ export default {
} }
this.showVideoDialog = false this.showVideoDialog = false
} else { } else {
this.$message.error(res.data.msg); this.$message.error({
showClose: true,
message: res.data.msg
})
} }
}).catch((error) => { }).catch((error) => {
this.$message.error(error); this.$message.error({
showClose: true,
message: error
});
}); });
}else { }else {
this.$axios({ this.$axios({
@ -303,10 +318,16 @@ export default {
} }
this.showVideoDialog = false this.showVideoDialog = false
} else { } else {
this.$message.error(res.data.msg); this.$message.error({
showClose: true,
message: res.data.msg
})
} }
}).catch((error) => { }).catch((error) => {
this.$message.error(error); this.$message.error({
showClose: true,
message: error
});
}); });
} }

View File

@ -178,7 +178,10 @@ export default {
channels.push(this.multipleSelection[i].gbId) channels.push(this.multipleSelection[i].gbId)
} }
if (channels.length === 0) { if (channels.length === 0) {
this.$message.info("请选择右侧通道") this.$message.info({
showClose: true,
message: "请选择右侧通道"
})
return; return;
} }
this.loading = true this.loading = true
@ -192,14 +195,23 @@ export default {
} }
}).then((res)=> { }).then((res)=> {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success("保存成功") this.$message.success({
showClose: true,
message: "保存成功"
})
this.getChannelList() this.getChannelList()
}else { }else {
this.$message.error(res.data.msg) this.$message.error({
showClose: true,
message: res.data.msg
})
} }
this.loading = false this.loading = false
}).catch((error)=> { }).catch((error)=> {
this.$message.error(error) this.$message.error({
showClose: true,
message: error
})
this.loading = false this.loading = false
}); });
}, },
@ -221,14 +233,23 @@ export default {
} }
}).then((res)=> { }).then((res)=> {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success("保存成功") this.$message.success({
showClose: true,
message: "保存成功"
})
this.getChannelList() this.getChannelList()
}else { }else {
this.$message.error(res.data.msg) this.$message.error({
showClose: true,
message: res.data.msg
})
} }
this.loading = false this.loading = false
}).catch((error)=> { }).catch((error)=> {
this.$message.error(error) this.$message.error({
showClose: true,
message: error
})
this.loading = false this.loading = false
}); });
}).catch(() => { }).catch(() => {
@ -245,7 +266,10 @@ export default {
channels.push(this.multipleSelection[i].gbId) channels.push(this.multipleSelection[i].gbId)
} }
if (channels.length === 0) { if (channels.length === 0) {
this.$message.info("请选择右侧通道") this.$message.info({
showClose: true,
message: "请选择右侧通道"
})
return; return;
} }
this.loading = true this.loading = true
@ -259,14 +283,23 @@ export default {
} }
}).then((res)=> { }).then((res)=> {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success("保存成功") this.$message.success({
showClose: true,
message: "保存成功"
})
this.getChannelList() this.getChannelList()
}else { }else {
this.$message.error(res.data.msg) this.$message.error({
showClose: true,
message: res.data.msg
})
} }
this.loading = false this.loading = false
}).catch((error)=> { }).catch((error)=> {
this.$message.error(error) this.$message.error({
showClose: true,
message: error
})
this.loading = false this.loading = false
}); });
}, },
@ -288,14 +321,23 @@ export default {
} }
}).then((res)=> { }).then((res)=> {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success("保存成功") this.$message.success({
showClose: true,
message: "保存成功"
})
this.getChannelList() this.getChannelList()
}else { }else {
this.$message.error(res.data.msg) this.$message.error({
showClose: true,
message: res.data.msg
})
} }
this.loading = false this.loading = false
}).catch((error)=> { }).catch((error)=> {
this.$message.error(error) this.$message.error({
showClose: true,
message: error
})
this.loading = false this.loading = false
}); });
}).catch(() => { }).catch(() => {

View File

@ -181,7 +181,10 @@ export default {
}, },
add: function (row) { add: function (row) {
if (!this.groupId) { if (!this.groupId) {
this.$message.info("请选择左侧行政区划节点") this.$message.info({
showClose: true,
message: "请选择左侧行政区划节点"
})
return; return;
} }
let channels = [] let channels = []
@ -189,7 +192,10 @@ export default {
channels.push(this.multipleSelection[i].gbId) channels.push(this.multipleSelection[i].gbId)
} }
if (channels.length === 0) { if (channels.length === 0) {
this.$message.info("请选择右侧通道") this.$message.info({
showClose: true,
message: "请选择右侧通道"
})
return; return;
} }
this.loading = true this.loading = true
@ -204,16 +210,25 @@ export default {
} }
}).then((res)=> { }).then((res)=> {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success("保存成功") this.$message.success({
showClose: true,
message: "保存成功"
})
this.getChannelList() this.getChannelList()
// //
this.$refs.groupTree.refresh(this.groupId) this.$refs.groupTree.refresh(this.groupId)
}else { }else {
this.$message.error(res.data.msg) this.$message.error({
showClose: true,
message: res.data.msg
})
} }
this.loading = false this.loading = false
}).catch((error)=> { }).catch((error)=> {
this.$message.error(error) this.$message.error({
showClose: true,
message: error
})
this.loading = false this.loading = false
}); });
}, },
@ -224,7 +239,10 @@ export default {
channels.push(this.multipleSelection[i].gbId) channels.push(this.multipleSelection[i].gbId)
} }
if (channels.length === 0) { if (channels.length === 0) {
this.$message.info("请选择右侧通道") this.$message.info({
showClose: true,
message: "请选择右侧通道"
})
return; return;
} }
this.loading = true this.loading = true
@ -237,16 +255,25 @@ export default {
} }
}).then((res)=> { }).then((res)=> {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success("保存成功") this.$message.success({
showClose: true,
message: "保存成功"
})
this.getChannelList() this.getChannelList()
// //
this.$refs.groupTree.refresh(this.groupId) this.$refs.groupTree.refresh(this.groupId)
}else { }else {
this.$message.error(res.data.msg) this.$message.error({
showClose: true,
message: res.data.msg
})
} }
this.loading = false this.loading = false
}).catch((error)=> { }).catch((error)=> {
this.$message.error(error) this.$message.error({
showClose: true,
message: error
})
this.loading = false this.loading = false
}); });
}, },

View File

@ -110,7 +110,10 @@ export default {
clickEvent: function (device, data, isCatalog) { clickEvent: function (device, data, isCatalog) {
if (data.channelId && !isCatalog) { if (data.channelId && !isCatalog) {
if (device.online === 0) { if (device.online === 0) {
this.$message.error('设备离线!不允许点播'); this.$message.error({
showClose: true,
message: "设备离线!不允许点播"
})
}else { }else {
this.sendDevicePush(data) this.sendDevicePush(data)
} }

View File

@ -103,7 +103,10 @@ export default {
if (data.channelId && !isCatalog) { if (data.channelId && !isCatalog) {
// //
if (data[this.longitudeStr] * data[this.latitudeStr] === 0) { if (data[this.longitudeStr] * data[this.latitudeStr] === 0) {
this.$message.error('未获取到位置信息'); this.$message.error({
showClose: true,
message: "未获取到位置信息"
})
} else { } else {
if (this.layer != null) { if (this.layer != null) {
this.$refs.map.removeLayer(this.layer); this.$refs.map.removeLayer(this.layer);
@ -235,10 +238,16 @@ export default {
} else if (params.length > 1) { } else if (params.length > 1) {
this.$refs.map.fit(this.layer) this.$refs.map.fit(this.layer)
} else { } else {
this.$message.error('未获取到位置信息'); this.$message.error({
showClose: true,
message: "未获取到位置信息"
})
} }
} else { } else {
this.$message.error('未获取到位置信息'); this.$message.error({
showClose: true,
message: "未获取到位置信息"
})
} }
}, },
getImageByChannel: function (channel) { getImageByChannel: function (channel) {
@ -314,7 +323,10 @@ export default {
}); });
}, },
edit: function (data) { edit: function (data) {
this.$message.warning('暂不支持'); this.$message.warning({
showClose: true,
message: "暂不支持"
})
}, },
getTrace: function (data) { getTrace: function (data) {
// this.$message.warning(''); // this.$message.warning('');
@ -323,7 +335,10 @@ export default {
console.log("getTrace") console.log("getTrace")
console.log(channelPositions) console.log(channelPositions)
if (channelPositions.length === 0) { if (channelPositions.length === 0) {
this.$message.success('未查询到轨迹信息'); this.$message.info({
showClose: true,
message: "未查询到轨迹信息"
})
} else { } else {
let positions = []; let positions = [];
for (let i = 0; i < channelPositions.length; i++) { for (let i = 0; i < channelPositions.length; i++) {
@ -333,7 +348,10 @@ export default {
} }
if (positions.length === 0) { if (positions.length === 0) {
this.$message.success('未查询到轨迹信息'); this.$message.info({
showClose: true,
message: "未查询到轨迹信息"
})
return; return;
} }
this.lineLayer = this.$refs.map.addLineLayer(positions) this.lineLayer = this.$refs.map.addLineLayer(positions)

View File

@ -181,7 +181,10 @@ export default {
}, },
add: function (row) { add: function (row) {
if (!this.regionId) { if (!this.regionId) {
this.$message.info("请选择左侧行政区划节点") this.$message.info({
showClose: true,
message: "请选择左侧行政区划节点"
})
return; return;
} }
let channels = [] let channels = []
@ -189,7 +192,10 @@ export default {
channels.push(this.multipleSelection[i].gbId) channels.push(this.multipleSelection[i].gbId)
} }
if (channels.length === 0) { if (channels.length === 0) {
this.$message.info("请选择右侧通道") this.$message.info({
showClose: true,
message: "请选择右侧通道"
})
return; return;
} }
this.loading = true this.loading = true
@ -203,16 +209,25 @@ export default {
} }
}).then((res)=> { }).then((res)=> {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success("保存成功") this.$message.success({
showClose: true,
message: "保存成功"
})
this.getChannelList() this.getChannelList()
// //
this.$refs.regionTree.refresh(this.regionId) this.$refs.regionTree.refresh(this.regionId)
}else { }else {
this.$message.error(res.data.msg) this.$message.error({
showClose: true,
message: res.data.msg
})
} }
this.loading = false this.loading = false
}).catch((error)=> { }).catch((error)=> {
this.$message.error(error) this.$message.error({
showClose: true,
message: error
})
this.loading = false this.loading = false
}); });
}, },
@ -222,7 +237,10 @@ export default {
channels.push(this.multipleSelection[i].gbId) channels.push(this.multipleSelection[i].gbId)
} }
if (channels.length === 0) { if (channels.length === 0) {
this.$message.info("请选择右侧通道") this.$message.info({
showClose: true,
message: "请选择右侧通道"
})
return; return;
} }
this.loading = true this.loading = true
@ -235,16 +253,25 @@ export default {
} }
}).then((res)=> { }).then((res)=> {
if (res.data.code === 0) { if (res.data.code === 0) {
this.$message.success("保存成功") this.$message.success({
showClose: true,
message: "保存成功"
})
this.getChannelList() this.getChannelList()
// //
this.$refs.regionTree.refresh(this.regionId) this.$refs.regionTree.refresh(this.regionId)
}else { }else {
this.$message.error(res.data.msg) this.$message.error({
showClose: true,
message: res.data.msg
})
} }
this.loading = false this.loading = false
}).catch((error)=> { }).catch((error)=> {
this.$message.error(error) this.$message.error({
showClose: true,
message: error
})
this.loading = false this.loading = false
}); });
}, },