Gary Gu
4 days ago c139d1c4ecfc45bd1e2b95e23a29eec75d04db5e
feat: 增加实况默认选中
1 files modified
4 ■■■ changed files
src/views/Home.vue 4 ●●● patch | view | raw | blame | history
src/views/Home.vue
@@ -25,7 +25,7 @@
   </div>
    <!-- 项目实况-->
    <div class="side-menu z-[100]" v-if="currentView === 'project'">
      <el-cascader popper-class="custom-dropdown" v-model="videoSrc" :options="liveList" @change="handleLiveChange" :props="{ value: 'id',label: 'label',children: 'JSCProjectMonitorList'}"/>
      <el-cascader popper-class="custom-dropdown" v-model="liveValue" :options="liveList" @change="handleLiveChange" :props="{ value: 'id',label: 'label',children: 'JSCProjectMonitorList'}"/>
    </div>
@@ -100,6 +100,7 @@
  },
 data() {
  return {
    liveValue:[],
    playerStatus: '未就绪',
    errorMessage:'',
    flvPlayer:null,
@@ -398,6 +399,7 @@
         }
         this.isLoading = false
         this.liveList = result
         this.liveValue = [result[0].id, result[0].JSCProjectMonitorList[0].id]
         this.videoSrc = this.liveList[0].JSCProjectMonitorList[0].MonitorUrl
         this.loadVideo();
       }