修改项目大屏报错,无法展示问题

This commit is contained in:
2026-03-04 09:59:32 +08:00
parent 4df9bd124b
commit a67719927e
4 changed files with 11 additions and 24 deletions

View File

@ -21,14 +21,12 @@ import videojs from "video.js/dist/video.min";
import "video.js/dist/video-js.min.css"; import "video.js/dist/video-js.min.css";
import emitter from "@/utils/eventBus.js"; import emitter from "@/utils/eventBus.js";
import { import {
defineComponent, defineProps,
onMounted, onMounted,
onBeforeUnmount, onBeforeUnmount,
onUnmounted,
ref, ref,
watch, watch,
nextTick, nextTick,
onUpdated
} from "vue"; } from "vue";
const myPlayer = ref(null); //视频对象 const myPlayer = ref(null); //视频对象
const videoIds = ref(0); //视频对象ID const videoIds = ref(0); //视频对象ID
@ -54,19 +52,19 @@ onBeforeUnmount(() => {
//销毁视频对象 //销毁视频对象
myPlayer.value.dispose(); myPlayer.value.dispose();
}); });
// 监听视频地址变化
watch(
() => props.src,
(n) => {
changeVideoSource(n);
}
);
//参数 //参数
const props = defineProps({ const props = defineProps({
//视频地址 //视频地址
src: String src: String
}); });
// 监听视频地址变化
watch(
() => props.src,
(n) => {
changeVideoSource(n);
}
);
//初始化视频 //初始化视频
function initVideoSourc() { function initVideoSourc() {
myPlayer.value = videojs( myPlayer.value = videojs(

View File

@ -14,20 +14,14 @@
<script setup> <script setup>
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import VideoPay from "@/components/VideoPay/index.vue"; import VideoPay from "@/components/VideoPay/index.vue";
import { dateFormat } from "@/utils/auth";
import { http } from "@/api/service"; import { http } from "@/api/service";
import emitter from "@/utils/eventBus.js"; import emitter from "@/utils/eventBus.js";
import { import {
ref, ref,
onMounted, onMounted,
onUnmounted, onUnmounted,
reactive,
computed,
getCurrentInstance
} from "vue"; } from "vue";
const isShowVideo = ref(false); const isShowVideo = ref(false);
const player = ref(null);
const { proxy } = getCurrentInstance();
const sbbh = ref(null); const sbbh = ref(null);
const url = ref(); const url = ref();

View File

@ -18,7 +18,6 @@
<AddQwDialog /> <AddQwDialog />
<!-- 展示大图 --> <!-- 展示大图 -->
<ImgBox /> <ImgBox />
</div> </div>
</template> </template>
@ -32,7 +31,6 @@ import GrouListZl from "./dialog/grouListZl.vue";
import ViedeoDialog from "@/components/video/index.vue"; import ViedeoDialog from "@/components/video/index.vue";
import AddQwDialog from "./dialog/addQwDialog.vue"; import AddQwDialog from "./dialog/addQwDialog.vue";
import ImgBox from "./dialog/imgBox.vue"; import ImgBox from "./dialog/imgBox.vue";
import { ref, defineProps, onMounted, onUnmounted, reactive } from "vue";
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -14,8 +14,7 @@
<el-button type="primary" @click="">上传</el-button> <el-button type="primary" @click="">上传</el-button>
<el-button type="primary">下载</el-button> <el-button type="primary">下载</el-button>
</div> --> </div> -->
<div class="leftSiecle transition" :style="{ left: showClassL ? '-20px' : '370px' }" <div class="leftSiecle transition" :style="{ left: showClassL ? '-20px' : '370px' }" @click="showClassL = !showClassL"></div>
@click="showClassL = !showClassL"></div>
<div class="asideBox transition" :style="{ left: showClassL ? '-386px' : '0px' }"> <div class="asideBox transition" :style="{ left: showClassL ? '-386px' : '0px' }">
<!-- 工作情况 --> <!-- 工作情况 -->
<div class="boder-small"> <div class="boder-small">
@ -26,8 +25,7 @@
<StreetGroup /> <StreetGroup />
</div> </div>
</div> </div>
<div class="rightSiecle transition" :style="{ right: showClassR ? '-20px' : '370px' }" <div class="rightSiecle transition" :style="{ right: showClassR ? '-20px' : '370px' }" @click="showClassR = !showClassR"></div>
@click="showClassR = !showClassR"></div>
<div class="asideBox transition" :style="{ right: showClassR ? '-386px' : '0px' }"> <div class="asideBox transition" :style="{ right: showClassR ? '-386px' : '0px' }">
<div class="boder-big"> <div class="boder-big">
<StreetCondition /> <StreetCondition />
@ -43,7 +41,7 @@
<CountModel /> <CountModel />
</div> </div>
<!-- 底部按钮 --> <!-- 底部按钮 -->
<!-- <BottomBtn /> --> <BottomBtn />
<div class="footBox"> <div class="footBox">
<ul> <ul>
<li v-for="(item, index) in btnTatol" :key="item"> <li v-for="(item, index) in btnTatol" :key="item">
@ -71,7 +69,6 @@
<XiafaZl /> <XiafaZl />
<!-- 犯罪预测 --> <!-- 犯罪预测 -->
<FzycDialog v-if="isShowFZYC" :data="fzycInfo" /> <FzycDialog v-if="isShowFZYC" :data="fzycInfo" />
</div> </div>
</template> </template>