Browse Source

事件列表,视频轮播

wangqin
zhoule 8 months ago
parent
commit
8d999fbc0c
  1. 13
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/Carousel/index.vue
  2. 103
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue
  3. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue

13
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/Carousel/index.vue

@ -11,6 +11,12 @@
</div> </div>
</VueSlickCarousel> </VueSlickCarousel>
<VueSlickCarousel v-if="videos.length > 0" v-bind="settings" ref="CarouselRef" class="vueSlickCarousel">
<div v-for="(item, index) in videos " :key="index" class="item">
<Video style="height: 100%;" :showHeader="false" :url="item || ''" videoType="mp4" />
</div>
</VueSlickCarousel>
<img src="./images/arrow.svg" @click="nextSlide" class="arrow" /> <img src="./images/arrow.svg" @click="nextSlide" class="arrow" />
</div> </div>
</template> </template>
@ -21,10 +27,11 @@ import VueSlickCarousel from 'vue-slick-carousel'
import 'vue-slick-carousel/dist/vue-slick-carousel.css' import 'vue-slick-carousel/dist/vue-slick-carousel.css'
// optional style for arrows & dots // optional style for arrows & dots
import 'vue-slick-carousel/dist/vue-slick-carousel-theme.css' import 'vue-slick-carousel/dist/vue-slick-carousel-theme.css'
import Video from "@screen/components/Video";
export default { export default {
name: "Carousel", name: "Carousel",
components: { VueSlickCarousel }, components: { VueSlickCarousel,Video },
props: { props: {
pictures: { pictures: {
type: Array, type: Array,
@ -39,6 +46,10 @@ export default {
// "require('@screen/images/shareWith/weChat-active.svg')" // "require('@screen/images/shareWith/weChat-active.svg')"
] ]
}, },
videos: {
type: Array,
default: () => []
},
}, },
data() { data() {
return { return {

103
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue

@ -1,89 +1,44 @@
<template> <template>
<Dialog v-model="modelVisible" title="事件详情" width="890px" top="11%"> <Dialog v-model="modelVisible" title="事件详情" width="890px" top="11%">
<div <div class="EventDetail" :style="{
class="EventDetail" height: activeName == '-1' || activeName == '0' ? '380px' : '598px',
:style="{ }">
height: activeName == '-1' || activeName == '0' ? '380px' : '598px',
}"
>
<Form :formList="formList" :dFormData="formData" label-width="100px" /> <Form :formList="formList" :dFormData="formData" label-width="100px" />
<div class="video-pic"> <div class="video-pic">
<Video
style="height: 100%; width: 380px"
:showHeader="false"
:url="
formData.videoList && formData.videoList.length > 0
? formData.videoList[0]
: ''
"
:camId="formData.upCamId"
:pileNum="formData.stakeMark"
rangeIndex="upCamera"
:videoType="formData.videoType"
/>
<Video
v-if="activeName != '-1'"
style="height: 100%; width: 380px"
:showHeader="false"
:url="
formData.videoList && formData.videoList.length > 0
? formData.videoList[1]
: ''
"
:camId="formData.downCamId"
:pileNum="formData.stakeMark"
rangeIndex="downCamera"
:videoType="formData.videoType"
/>
<Carousel v-else style="flex: 1" :pictures="formData.pictures" /> <Video v-if="activeName != '-1'" style="height: 100%; width: 380px" :showHeader="false" :url="formData.videoList && formData.videoList.length > 0
? formData.videoList[0] : ''" :camId="formData.upCamId" :pileNum="formData.stakeMark" rangeIndex="upCamera"
:videoType="formData.videoType" />
<Video v-if="activeName != '-1'" style="height: 100%; width: 380px" :showHeader="false" :url="formData.videoList && formData.videoList.length > 0
? formData.videoList[1] : ''" :camId="formData.downCamId" :pileNum="formData.stakeMark" rangeIndex="downCamera"
:videoType="formData.videoType" />
<Carousel v-if="activeName == '-1'" style="flex: 1" :videos="formData.videoList" :pictures="[]"/>
<Carousel v-if="activeName == '-1'" style="flex: 1" :pictures="formData.pictures" :videos="[]"/>
</div> </div>
<!-- <div>{{ formData.videoList[0] }}</div> --> <!-- <div>{{ formData.videoList[0] }}</div> -->
<TimeLine1 <TimeLine1 v-if="activeName == '1' || activeName == '2'" :data="timeLine1List" />
v-if="activeName == '1' || activeName == '2'" <TimeLine2 v-if="activeName == '1' || activeName == '2'" :data="timeLine2List" style="flex: 1" />
:data="timeLine1List"
/>
<TimeLine2
v-if="activeName == '1' || activeName == '2'"
:data="timeLine2List"
style="flex: 1"
/>
</div> </div>
<!-- 确认弹窗 --> <!-- 确认弹窗 -->
<EventPlanDialog <EventPlanDialog :visible="isShowDialog" :info="info" :eventFormData="formData" :activeName="activeName"
:visible="isShowDialog" @reInitData="() => {
:info="info" this.$emit('update:value', false);
:eventFormData="formData" this.$emit('queryData', true);
:activeName="activeName" }
@reInitData=" " @close="onCloseAddNew" />
() => {
this.$emit('update:value', false);
this.$emit('queryData', true);
}
"
@close="onCloseAddNew"
/>
<template #footer> <template #footer>
<Button <Button v-if="activeName == '-1' || activeName == '0'" style="padding: 0 24px"
v-if="activeName == '-1' || activeName == '0'" @click.native="onDelete">误报</Button>
style="padding: 0 24px" <Button :style="{ backgroundColor: '#C9C9C9', padding: '0 24px' }"
@click.native="onDelete" @click.native="modelVisible = false">取消</Button>
>误报</Button <Button v-if="activeName == '-1' || activeName == '0'" style="padding: 0 24px"
> @click.native="onSubmit">确认</Button>
<Button
:style="{ backgroundColor: '#C9C9C9', padding: '0 24px' }"
@click.native="modelVisible = false"
>取消</Button
>
<Button
v-if="activeName == '-1' || activeName == '0'"
style="padding: 0 24px"
@click.native="onSubmit"
>确认</Button
>
</template> </template>
</Dialog> </Dialog>
</template> </template>
@ -124,7 +79,7 @@ export default {
activeName: String, activeName: String,
formData: { formData: {
type: Object, type: Object,
default: () => {}, default: () => { },
}, },
}, },
data() { data() {

5
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue

@ -294,8 +294,9 @@ export default {
data.visibility = otherConfig.visibility; data.visibility = otherConfig.visibility;
data.pictures = otherConfig.pictures || []; data.pictures = otherConfig.pictures || [];
data.videoList = otherConfig.videoList || [] data.videoList = otherConfig.videoList || [];
// data.videoList = otherConfig.videoList || ['https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-480p.mp4'] // data.videoList = ['https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-480p.mp4',
// 'https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-480p.mp4']
} }
data.videoType = "mp4"; data.videoType = "mp4";
this.detailDialogFormData = data; this.detailDialogFormData = data;

Loading…
Cancel
Save