过滤限制增加防止报错

This commit is contained in:
home孙 2025-06-13 14:06:40 +08:00
parent 9c45d8e390
commit 769c941f9b
2 changed files with 47 additions and 37 deletions

View File

@ -332,7 +332,7 @@ var iccidList=[]
data.forEach((el,index)=>{ data.forEach((el,index)=>{
if(this.validateIccid(el.iccid)){ if(this.validateIccid(el.iccid)){
this.api.qibenGeticcid(el).then(res=>{ this.api.qibenGeticcid(el).then(res=>{
if(res.data.code==200){ if(res.data.code==200&&res.data.data){
iccidList.push(res.data.data) iccidList.push(res.data.data)
this.$store.state.iccidList=iccidList this.$store.state.iccidList=iccidList
if(res1.data.data&&res.data.data.expired){ if(res1.data.data&&res.data.data.expired){

View File

@ -654,11 +654,11 @@
</template> </template>
<script> <script>
import EZUIKit from 'ezuikit-js'; // import EZUIKit from 'ezuikit-js';
import { getnowtime } from '../../assets/js/nowTime' import { getnowtime } from '../../assets/js/nowTime'
import { realTimeLine, statusCharts } from '@/assets/js/charts' import { realTimeLine, statusCharts } from '@/assets/js/charts'
import videojs from 'video.js'; // import videojs from 'video.js';
import video_zhCN from 'video.js/dist/lang/zh-CN.json' // import video_zhCN from 'video.js/dist/lang/zh-CN.json'
import vueSeamless from 'vue-seamless-scroll' import vueSeamless from 'vue-seamless-scroll'
export default { export default {
@ -798,12 +798,22 @@ export default {
}, },
methods: { methods: {
getPackageTime(){ getPackageTime(){
var item= this.$store.state.iccidList.find(item=>item.iccid==this.$store.state.equipmentList[this.indexs - 1].iccidcode)
var item= this.$store.state.iccidList.find(item=>{
if(item){
item.iccid==this.$store.state.equipmentList[this.indexs - 1].iccidcode
}
})
return item? item.packageTime:'无数据' return item? item.packageTime:'无数据'
}, },
getPackageTimeColor(){ getPackageTimeColor(){
var item= this.$store.state.iccidList.find(item=>item.iccid==this.$store.state.equipmentList[this.indexs - 1].iccidcode)
var item= this.$store.state.iccidList.find(item=>{
if(item){
item.iccid==this.$store.state.equipmentList[this.indexs - 1].iccidcode
}
})
return item? item.expired:false return item? item.expired:false
}, },
@ -929,24 +939,24 @@ export default {
padString(str, length) { padString(str, length) {
return str.padStart(length, '0'); return str.padStart(length, '0');
}, },
createVideoNew(accessToken) { // createVideoNew(accessToken) {
// divWdivH 使div // // divWdivH 使div
let divW = this.$refs.monitor.clientWidth // let divW = this.$refs.monitor.clientWidth
let divH = this.$refs.monitor.clientHeight // let divH = this.$refs.monitor.clientHeight
this.player = new EZUIKit.EZUIKitPlayer({ // this.player = new EZUIKit.EZUIKitPlayer({
id: 'video-js', // ID // id: 'video-js', // ID
accessToken: accessToken, // accessToken: accessToken,
url: this.url, // url: this.url,
// urlezopen://open.ys7.com/G39444019/1.live .live GitHub // // urlezopen://open.ys7.com/G39444019/1.live .live GitHub
// simple-; standard-; security-; voice-; GitHub // // simple-; standard-; security-; voice-; GitHub
template: 'security', // template: 'security',
useHardDev: true,// 7.7.x 2023.11.7 7.7.6 // useHardDev: true,// 7.7.x 2023.11.7 7.7.6
plugin: ["talk"], // talk- // plugin: ["talk"], // talk-
width: divW, // 1920 px // width: divW, // 1920 px
height: divH, // 1080 px // height: divH, // 1080 px
}) // })
}, // },
getIcon(item) { getIcon(item) {
var index = item.index var index = item.index
if (item.type == 3) { if (item.type == 3) {
@ -1047,21 +1057,21 @@ export default {
} }
} }
}, },
createVideo() { // createVideo() {
// // //
videojs.addLanguage('zh-CN', video_zhCN) // videojs.addLanguage('zh-CN', video_zhCN)
this.player = videojs(this.$refs.videoPlayer, { // this.player = videojs(this.$refs.videoPlayer, {
techOrder: ['html5', 'hls'], // 使HTML5使HLS // techOrder: ['html5', 'hls'], // 使HTML5使HLS
sources: [{ // sources: [{
src: this.url, // .m3u8 // src: this.url, // .m3u8
type: 'application/x-mpegURL' // type: 'application/x-mpegURL'
}], // }],
autoplay: true, // // autoplay: true, //
controls: true, // // controls: true, //
language: 'zh-CN' // language: 'zh-CN'
}); // });
}, // },
countData100(data) { countData100(data) {
var num = 0 var num = 0
if (data) { if (data) {