vchannelSelect
This commit is contained in:
parent
3696aa6725
commit
5617114e1b
|
|
@ -5,21 +5,23 @@
|
||||||
<el-button type="primary" icon="el-icon-refresh" @click="syncData" :loading="syncLoading">同步</el-button>
|
<el-button type="primary" icon="el-icon-refresh" @click="syncData" :loading="syncLoading">同步</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<!-- <el-input
|
<el-select v-model="areaId" placeholder="选择区域">
|
||||||
v-model="query.channelCode"
|
<el-option
|
||||||
placeholder="编号"
|
v-for="item in areaoptions"
|
||||||
clearable
|
:key="item.id"
|
||||||
@click="handleQuery"
|
:label="item.name"
|
||||||
></el-input>
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
></el-button> -->
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id" :params="apiParams" :pageStr="pageStr"
|
<scTable ref="table" :apiObj="apiObj" row-key="id" :params="apiParams" :pageStr="pageStr" :data="pageData"
|
||||||
:pageSizeStr="pageSizeStr" :orderStr="orderStr" :parseData="parseData" @selection-change="selectionChange"
|
:pageSizeStr="pageSizeStr" :orderStr="orderStr" :parseData="parseData" @selection-change="selectionChange"
|
||||||
stripe @resetQuery="resetQuery">
|
stripe @resetQuery="resetQuery">
|
||||||
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||||
|
|
@ -132,9 +134,12 @@ export default {
|
||||||
},
|
},
|
||||||
code: "video_realtime",
|
code: "video_realtime",
|
||||||
},
|
},
|
||||||
|
areaId:'',
|
||||||
channelCode: '',
|
channelCode: '',
|
||||||
channelId: '',
|
channelId: '',
|
||||||
channelArea: '',
|
channelArea: '',
|
||||||
|
pageData:[],
|
||||||
|
areaoptions: [],
|
||||||
channelAreas: [],
|
channelAreas: [],
|
||||||
channelLocation: {},
|
channelLocation: {},
|
||||||
flvPlayer: null,
|
flvPlayer: null,
|
||||||
|
|
@ -150,8 +155,21 @@ export default {
|
||||||
scriptInfo.setAttribute("data-callType", "callScript");
|
scriptInfo.setAttribute("data-callType", "callScript");
|
||||||
scriptInfo.src = "https://cdn.bootcdn.net/ajax/libs/flv.js/1.6.2/flv.js";
|
scriptInfo.src = "https://cdn.bootcdn.net/ajax/libs/flv.js/1.6.2/flv.js";
|
||||||
document.head.appendChild(scriptInfo);
|
document.head.appendChild(scriptInfo);
|
||||||
|
this.getAllVchannel();
|
||||||
|
},
|
||||||
|
mounted(){
|
||||||
|
this.getArea();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getAllVchannel(){
|
||||||
|
debugger;
|
||||||
|
this.$API.am.video.list.req({pageSize:999}).then(res=>{
|
||||||
|
debugger;
|
||||||
|
console.log(res)
|
||||||
|
let allVchannel = JSON.stringify(res.pageData);
|
||||||
|
localStorage.setItem('allVchannel',allVchannel)
|
||||||
|
})
|
||||||
|
},
|
||||||
handleView(row) {
|
handleView(row) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.channelCode = row.channelCode;
|
that.channelCode = row.channelCode;
|
||||||
|
|
@ -174,9 +192,15 @@ export default {
|
||||||
},
|
},
|
||||||
viewClose() {
|
viewClose() {
|
||||||
this.limitedVisible = false;
|
this.limitedVisible = false;
|
||||||
|
},
|
||||||
|
//区域
|
||||||
|
getArea() {
|
||||||
|
this.$API.am.area.list.req({ page: 0 }).then((res) => {
|
||||||
|
this.areaoptions = res;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handlePosition(row) {
|
handlePosition(row) {
|
||||||
debugger;
|
// debugger;
|
||||||
console.log(row)
|
console.log(row)
|
||||||
if(row.my_info.id&&row.my_info.id!==null){
|
if(row.my_info.id&&row.my_info.id!==null){
|
||||||
this.channelId = row.my_info.id ? row.my_info.id : null;
|
this.channelId = row.my_info.id ? row.my_info.id : null;
|
||||||
|
|
@ -196,7 +220,24 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
//搜索
|
//搜索
|
||||||
handleQuery() { this.$refs.table.refresh(); },
|
handleQuery() {
|
||||||
|
debugger;
|
||||||
|
let that = this;
|
||||||
|
let vchannel = localStorage.getItem('allVchannel');
|
||||||
|
console.log(vchannel)
|
||||||
|
let allVchannel = JSON.parse(vchannel);
|
||||||
|
debugger;
|
||||||
|
console.log(allVchannel)
|
||||||
|
console.log(that.areaId)
|
||||||
|
|
||||||
|
that.pageData = allVchannel.filter(item=>{
|
||||||
|
if(item.my_info.area == that.areaId){
|
||||||
|
debugger;
|
||||||
|
}
|
||||||
|
return item.my_info.area == that.areaId;
|
||||||
|
})
|
||||||
|
// console.log(localStorage.getItem('allVchannel'))
|
||||||
|
},
|
||||||
|
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
|
|
|
||||||
|
|
@ -2197,6 +2197,25 @@ export default {
|
||||||
this.music.play();//播放
|
this.music.play();//播放
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
beforeRouteLeave(to, from, next){
|
||||||
|
next();
|
||||||
|
if (this.timerUser) {
|
||||||
|
clearInterval(this.timerUser);
|
||||||
|
this.timerUser = null;
|
||||||
|
}
|
||||||
|
if (this.timerTime) {
|
||||||
|
clearInterval(this.timerTime);
|
||||||
|
this.timerTime = null;
|
||||||
|
}
|
||||||
|
if (this.eventTimer) {
|
||||||
|
clearInterval(this.eventTimer);
|
||||||
|
this.eventTimer = null;
|
||||||
|
}
|
||||||
|
if (this.eventAudioTimer) {
|
||||||
|
clearInterval(this.eventAudioTimer);
|
||||||
|
this.eventAudioTimer = null;
|
||||||
|
}
|
||||||
|
},
|
||||||
unmounted() {
|
unmounted() {
|
||||||
// window.map.destroy();
|
// window.map.destroy();
|
||||||
window.map = null;
|
window.map = null;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue