|  | @@ -12,18 +12,25 @@
 | 
	
		
			
				|  |  |          </a-spin>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |        <div class="right-box">
 | 
	
		
			
				|  |  | +        <div class="status">
 | 
	
		
			
				|  |  | +          <div class="icon"></div>
 | 
	
		
			
				|  |  | +          <div class="status-content">
 | 
	
		
			
				|  |  | +            <span class="conten">{{ get(resData, 'curStatus') }}</span>
 | 
	
		
			
				|  |  | +            <span>钻杆状态</span>
 | 
	
		
			
				|  |  | +          </div>
 | 
	
		
			
				|  |  | +        </div>
 | 
	
		
			
				|  |  |          <div class="count">
 | 
	
		
			
				|  |  |            <div class="icon"></div>
 | 
	
		
			
				|  |  |            <div class="count-content">
 | 
	
		
			
				|  |  | -            <span class="conten">{{ usedCount }}</span>
 | 
	
		
			
				|  |  | +            <span class="conten">{{ get(resData, 'usedCount') }}</span>
 | 
	
		
			
				|  |  |              <span>钻孔计数</span>
 | 
	
		
			
				|  |  |            </div>
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  | -        <div class="status">
 | 
	
		
			
				|  |  | +        <div class="count">
 | 
	
		
			
				|  |  |            <div class="icon"></div>
 | 
	
		
			
				|  |  | -          <div class="status-content">
 | 
	
		
			
				|  |  | -            <span class="conten">{{ curStatus }}</span>
 | 
	
		
			
				|  |  | -            <span>钻杆状态</span>
 | 
	
		
			
				|  |  | +          <div class="count-content">
 | 
	
		
			
				|  |  | +            <span class="conten">{{ get(resData, 'usedPercent') ? Number(get(resData, 'usedPercent')).toFixed(2) + '%' : '-' }}</span>
 | 
	
		
			
				|  |  | +            <span>钻孔剩余</span>
 | 
	
		
			
				|  |  |            </div>
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |        </div>
 | 
	
	
		
			
				|  | @@ -37,15 +44,16 @@
 | 
	
		
			
				|  |  |    import customHeader from '/@/components/vent/customHeader.vue';
 | 
	
		
			
				|  |  |    import { useGlobSetting } from '/@/hooks/setting';
 | 
	
		
			
				|  |  |    import Player, { I18N } from 'xgplayer';
 | 
	
		
			
				|  |  | -  import ZH from 'xgplayer/es/lang/zh-cn';
 | 
	
		
			
				|  |  |    import Mp4Plugin from 'xgplayer-mp4';
 | 
	
		
			
				|  |  | +  import { get } from '@/utils/ventutil';
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    const globSetting = useGlobSetting();
 | 
	
		
			
				|  |  |    const baseApiUrl = globSetting.domainUrl;
 | 
	
		
			
				|  |  |    const videoPlayTime = ref(0); //视频开始播放时间
 | 
	
		
			
				|  |  | -  const curStatus = ref(''); //当前状态
 | 
	
		
			
				|  |  | -  const usedCount = ref(''); //钻孔计数
 | 
	
		
			
				|  |  | -  const videoUrl = ref('');
 | 
	
		
			
				|  |  | +  // const curStatus = ref(''); //当前状态
 | 
	
		
			
				|  |  | +  // const usedCount = ref(''); //钻孔计数
 | 
	
		
			
				|  |  | +  // const videoUrl = ref('');
 | 
	
		
			
				|  |  | +  const resData = ref({});
 | 
	
		
			
				|  |  |    const video = ref();
 | 
	
		
			
				|  |  |    const loadding = ref(true);
 | 
	
		
			
				|  |  |    let timer: IntervalHandle; //定时器
 | 
	
	
		
			
				|  | @@ -59,9 +67,10 @@
 | 
	
		
			
				|  |  |          const res = await getGasZkStatus({
 | 
	
		
			
				|  |  |            playTime: videoPlayTime.value,
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  | +        resData.value = res;
 | 
	
		
			
				|  |  |          // 更新数据
 | 
	
		
			
				|  |  | -        usedCount.value = res.usedCount;
 | 
	
		
			
				|  |  | -        curStatus.value = res.curStatus;
 | 
	
		
			
				|  |  | +        // usedCount.value = res.usedCount;
 | 
	
		
			
				|  |  | +        // curStatus.value = res.curStatus;
 | 
	
		
			
				|  |  |          startPolling();
 | 
	
		
			
				|  |  |        } catch (error) {
 | 
	
		
			
				|  |  |          console.error('请求失败,停止轮询', error);
 | 
	
	
		
			
				|  | @@ -91,7 +100,7 @@
 | 
	
		
			
				|  |  |        autoplay: true,
 | 
	
		
			
				|  |  |        loop: true,
 | 
	
		
			
				|  |  |        // fluid: false,
 | 
	
		
			
				|  |  | -      isLive: true,
 | 
	
		
			
				|  |  | +      isLive: false,
 | 
	
		
			
				|  |  |        playsinline: false,
 | 
	
		
			
				|  |  |        screenShot: false,
 | 
	
		
			
				|  |  |        // closeVideoClick: true,
 | 
	
	
		
			
				|  | @@ -99,9 +108,6 @@
 | 
	
		
			
				|  |  |        // closePauseVideoFocus: true,
 | 
	
		
			
				|  |  |        // closePlayVideoFocus: true,
 | 
	
		
			
				|  |  |        // topBarAutoHide: false,
 | 
	
		
			
				|  |  | -      customConfig: {
 | 
	
		
			
				|  |  | -        isClickPlayBack: false,
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  |        controls: false,
 | 
	
		
			
				|  |  |        // ignores: ['time', 'start', 'definition', 'error', 'fullscreen', 'i18n', 'loading', 'mobile', 'pc', 'play', 'poster', 'progress', 'replay', 'volume', 'loading', 'pc', 'fullscreen', 'error', 'definition'],
 | 
	
		
			
				|  |  |        mp4plugin: {
 | 
	
	
		
			
				|  | @@ -109,22 +115,42 @@
 | 
	
		
			
				|  |  |          // minBufferLength: 10,
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  | -    player.on('play', async () => {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    player.on('complete', async () => {
 | 
	
		
			
				|  |  | +      player.play();
 | 
	
		
			
				|  |  |        try {
 | 
	
		
			
				|  |  | -        loadding.value = false;
 | 
	
		
			
				|  |  | -        videoPlayTime.value = await getVideoPlayTime();
 | 
	
		
			
				|  |  | -        // 第一次请求
 | 
	
		
			
				|  |  | -        const res = await getGasZkStatus({
 | 
	
		
			
				|  |  | -          playTime: videoPlayTime.value,
 | 
	
		
			
				|  |  | -        });
 | 
	
		
			
				|  |  | -        usedCount.value = res.usedCount;
 | 
	
		
			
				|  |  | -        curStatus.value = res.curStatus;
 | 
	
		
			
				|  |  | -        // 启动轮询
 | 
	
		
			
				|  |  | -        startPolling();
 | 
	
		
			
				|  |  | +        if (loadding.value) {
 | 
	
		
			
				|  |  | +          loadding.value = false;
 | 
	
		
			
				|  |  | +          videoPlayTime.value = await getVideoPlayTime();
 | 
	
		
			
				|  |  | +          // 第一次请求
 | 
	
		
			
				|  |  | +          const res = await getGasZkStatus({
 | 
	
		
			
				|  |  | +            playTime: videoPlayTime.value,
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +          resData.value = res;
 | 
	
		
			
				|  |  | +          // 启动轮询
 | 
	
		
			
				|  |  | +          startPolling();
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |        } catch (error) {
 | 
	
		
			
				|  |  |          console.error('初始化失败', error);
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  | +    // player.on('play', async () => {
 | 
	
		
			
				|  |  | +    //   try {
 | 
	
		
			
				|  |  | +    //     if (loadding.value) {
 | 
	
		
			
				|  |  | +    //       loadding.value = false;
 | 
	
		
			
				|  |  | +    //       videoPlayTime.value = await getVideoPlayTime();
 | 
	
		
			
				|  |  | +    //       // 第一次请求
 | 
	
		
			
				|  |  | +    //       const res = await getGasZkStatus({
 | 
	
		
			
				|  |  | +    //         playTime: videoPlayTime.value,
 | 
	
		
			
				|  |  | +    //       });
 | 
	
		
			
				|  |  | +    //       resData.value = res;
 | 
	
		
			
				|  |  | +    //       // 启动轮询
 | 
	
		
			
				|  |  | +    //       startPolling();
 | 
	
		
			
				|  |  | +    //     }
 | 
	
		
			
				|  |  | +    //   } catch (error) {
 | 
	
		
			
				|  |  | +    //     console.error('初始化失败', error);
 | 
	
		
			
				|  |  | +    //   }
 | 
	
		
			
				|  |  | +    // });
 | 
	
		
			
				|  |  |    };
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    onMounted(async () => {
 |