处理服务重启或设备重新上线时的订阅,优化通道导入重复的处理
This commit is contained in:
@@ -127,8 +127,6 @@
|
||||
count: that.count
|
||||
}
|
||||
}).then(function (res) {
|
||||
console.log(res);
|
||||
console.log(res.data.list);
|
||||
that.total = res.data.total;
|
||||
that.pushList = res.data.list;
|
||||
that.getDeviceListLoading = false;
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
drag
|
||||
:action="uploadUrl"
|
||||
name="file"
|
||||
:on-success="successHook"
|
||||
:on-error="errorHook"
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
@@ -23,14 +25,19 @@
|
||||
</el-upload>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<ShowErrorData ref="showErrorData" :gbIds="errorGBIds" :streams="errorStreams" ></ShowErrorData>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import ShowErrorData from './importChannelShowErrorData.vue'
|
||||
|
||||
export default {
|
||||
name: "importChannel",
|
||||
computed: {},
|
||||
components: {
|
||||
ShowErrorData,
|
||||
},
|
||||
created() {},
|
||||
data() {
|
||||
return {
|
||||
@@ -38,6 +45,8 @@ export default {
|
||||
showDialog: false,
|
||||
isLoging: false,
|
||||
isEdit: false,
|
||||
errorStreams: null,
|
||||
errorGBIds: null,
|
||||
uploadUrl: process.env.NODE_ENV === 'development'?`debug/api/push/upload`:`api/push/upload`,
|
||||
};
|
||||
},
|
||||
@@ -73,8 +82,35 @@ export default {
|
||||
},
|
||||
close: function () {
|
||||
this.showDialog = false;
|
||||
this.$refs.form.resetFields();
|
||||
},
|
||||
successHook: function(response, file, fileList){
|
||||
if (response.code === 0) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: response.msg,
|
||||
type: "success",
|
||||
});
|
||||
}else if (response.code === 1) {
|
||||
this.errorGBIds = response.data.gbId
|
||||
this.errorStreams = response.data.stream
|
||||
console.log(this.$refs)
|
||||
console.log(this.$refs.showErrorData)
|
||||
this.$refs.showErrorData.openDialog()
|
||||
}else {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: response.msg,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
},
|
||||
errorHook: function (err, file, fileList) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: err,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -82,4 +118,8 @@ export default {
|
||||
.upload-box{
|
||||
text-align: center;
|
||||
}
|
||||
.errDataBox{
|
||||
max-height: 15rem;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
64
web_src/src/components/dialog/importChannelShowErrorData.vue
Normal file
64
web_src/src/components/dialog/importChannelShowErrorData.vue
Normal file
@@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<div id="importChannelShowErrorData" v-loading="isLoging">
|
||||
<el-dialog
|
||||
title="导入通道数据成功,但数据存在重复"
|
||||
width="30rem"
|
||||
top="2rem"
|
||||
:append-to-body="true"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="showDialog"
|
||||
:destroy-on-close="true"
|
||||
@close="close()"
|
||||
>
|
||||
<div >
|
||||
重复国标ID:
|
||||
<el-button style="float: right;" type="primary" size="mini" icon="el-icon-document-copy" title="点击拷贝" v-clipboard="gbIds.join(',')" @success="$message({type:'success', message:'成功拷贝到粘贴板'})">复制</el-button>
|
||||
<ul class="errDataBox">
|
||||
<li v-for="id in gbIds" >
|
||||
{{ id }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div >
|
||||
重复App/stream:
|
||||
<el-button style="float: right;" type="primary" size="mini" icon="el-icon-document-copy" title="点击拷贝" v-clipboard="streams.join(',')" @success="$message({type:'success', message:'成功拷贝到粘贴板'})">复制</el-button>
|
||||
<ul class="errDataBox">
|
||||
<li v-for="id in streams" >
|
||||
{{ id }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "importChannelShowErrorData",
|
||||
computed: {},
|
||||
created() {},
|
||||
props: ['gbIds', 'streams'],
|
||||
data() {
|
||||
return {
|
||||
isLoging: false,
|
||||
showDialog: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
openDialog: function () {
|
||||
this.showDialog = true;
|
||||
},
|
||||
close: function () {
|
||||
this.showDialog = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.errDataBox{
|
||||
max-height: 15rem;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -78,7 +78,7 @@ export default {
|
||||
this.jessibuca = new window.Jessibuca(Object.assign(
|
||||
{
|
||||
container: this.$refs.container,
|
||||
videoBuffer: 0.5, // 最大缓冲时长,单位秒
|
||||
videoBuffer: 0.2, // 最大缓冲时长,单位秒
|
||||
isResize: true,
|
||||
isFlv: true,
|
||||
decoder: "./static/js/jessibuca/index.js",
|
||||
|
||||
Reference in New Issue
Block a user