删除旧版本 云广播

This commit is contained in:
yanran200730
2022-06-14 09:00:17 +08:00
parent dcf0271990
commit 7f06def5c0
57 changed files with 165 additions and 1450 deletions

View File

@@ -0,0 +1,190 @@
<template>
<div class="AppPlayList">
<AiTopFixed>
<div class="currentLeft-top">
<div class="left">
<AiSelect @data="selectType" :list="typeList" v-model="type"></AiSelect>
</div>
<u-search v-model="keyword" :clearabled="true" placeholder="请输入素材名称/发布人员" :show-action="false" bg-color="#F5F5F5" search-icon-color="#ccc" color="#666" height="58" @search="getList" @clear="handerClear"></u-search>
</div>
</AiTopFixed>
<div class="list">
<div class="item" v-for="(item, index) in list" :key="index" @click="toDetail(item)" >
<div class="left">
<p>{{ item.sourceName }}</p>
<div>{{item.createUserName}} {{ item.createTime }}</div>
<div>{{ $dict.getLabel('dlbMessageUrgency', item.messageLevel) }} {{item.taskType == 1 ? '定时播放' : '立即播放'}}</div>
</div>
<div class="right">
<div class="status" v-if="item.broadcastStatus == 6" style="color: #999;">已取消</div>
<div class="status" v-if="item.broadcastStatus == 3" style="color: #5aad6a;">播发成功</div>
<div class="status" v-if="item.broadcastStatus == 0">已下发</div>
<div v-if="item.broadcastStatus == 0 || item.broadcastStatus == 1 || item.broadcastStatus == 2">
<div class="cancel-btn" @click.stop="cancel(item.id)" v-if="item.taskType == 1">撤销</div>
<div class="cancel-btn bg-AFD0FC" v-else>撤销</div>
</div>
<div class="cancel-btn bg-AFD0FC" v-else>撤销</div>
</div>
</div>
</div>
<AiEmpty v-if="!list.length"></AiEmpty>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: "AppPlayList",
data() {
return {
list: [],
current: 1,
type: '0',
typeList: [{label: '全部', value: '0'}, {label: '我发布的', value: '1'}],
keyword: '',
}
},
computed: { ...mapState(['user']) },
onLoad(query) {
this.$dict.load(['dlbMessageUrgency']).then(() => {
this.getList()
})
},
onShow() {
document.title = '播放记录'
},
methods: {
selectType(selecteds) {
this.type = selecteds?.[0]?.value
this.getListInit()
},
getListInit() {
this.list = []
this.current = 1
this.getList()
},
getList() {
this.$http.post(`/app/appzyvideobroadcast/list`, null, {
params: {
sourceName: this.keyword,
current: this.current,
size: 10,
createUserId: this.type == 1 ? this.user.id : ''
}
}).then(res => {
if (res.code == 0) {
if (this.current > 1) {
this.list = [...this.list, ...res.data.records]
} else {
this.list = res.data.records
}
} else {
uni.hideLoading()
}
}).catch(() => {
uni.hideLoading()
})
},
cancel(id) {
this.$confirm('确定撤回该广播?').then(() => {
this.$http.post(`/app/appzyvideobroadcast/getBroadcastRecall?broadcastId=${id}`).then((res) => {
if (res.code == 0) {
this.$u.toast('撤回成功!')
this.getList()
}
})
})
},
toDetail(item) {
uni.navigateTo({url: `./detail?id=${item.id}`})
}
},
onReachBottom() {
this.current ++
this.getList()
}
}
</script>
<style lang="scss" scoped>
.AppPlayList {
// ::v-deep .AiTopFixed{
// .content{
// padding: 0;
// }
// }
.currentLeft-top {
display: flex;
align-items: center;
.left {
width: 200px;
display: flex;
align-items: center;
img {
width: 48px;
height: 48px;
}
}
}
.list{
padding-left: 32px;
background-color: #fff;
.item{
display: flex;
padding: 16px 40px 16px 0;
box-sizing: border-box;
border-bottom: 1px solid #ddd;
.left{
width: calc(100% - 176px);
p{
font-size: 34px;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #333;
line-height: 48px;
word-break: break-all;
margin-bottom: 8px;
}
div{
font-size: 26px;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #999;
line-height: 36px;
margin-bottom: 8px;
}
}
.right{
width: 160px;
text-align: center;
.status{
font-size: 34px;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #4E8EEE;
line-height: 48px;
margin-bottom: 28px;
}
.cancel-btn{
width: 154px;
height: 60px;
line-height: 60px;
text-align: center;
background: #3975C6;
border-radius: 8px;
font-size: 30px;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #FFF;
}
.bg-AFD0FC{
background: #AFD0FC;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,251 @@
<template>
<div class="detail">
<div class="info-content">
<div class="info border-none">
<h2>播发任务</h2>
<h3 v-if="info.broadcastStatus == 6" style="color: #999;">已取消</h3>
<h3 v-if="info.broadcastStatus == 3" style="color: #5aad6a;">播发成功</h3>
<h3 v-if="info.broadcastStatus == 0">已下发</h3>
</div>
<div class="info">
<span>播发级别</span>
<span class="color-333">{{ $dict.getLabel('dlbMessageUrgency', info.messageLevel) }}</span>
</div>
<div class="info">
<span>播放方式</span>
<span class="color-333">{{info.taskType == 1 ? '定时播放' : '立即播放'}}
<span v-if="info.taskType == 1 ">-{{ $dict.getLabel('dlbDyclingType', info.cyclingType) }}</span>
</span>
</div>
<div v-if="info.taskType == 1">
<div class="info" v-if="info.cyclingType != 1">
<span>播放天数</span>
<span class="color-333" v-if="info.cyclingType == 3">{{info.broadcastDay}}</span>
<span class="color-333" v-if="info.cyclingType == 2">
<span v-for="(item, index) in info.cyclingDateList" :key="index"><span v-if="index > 0">,</span>{{dayList[item]}}</span>
</span>
</div>
<div class="info">
<span>开始日期</span>
<span class="color-333">{{info.startDate}}</span>
</div>
<div class="info">
<span>开始时间</span>
<span class="color-333">{{info.startTime}}</span>
</div>
<div class="info">
<span>结束时间</span>
<span class="color-333">{{info.endTime}}</span>
</div>
</div>
<div class="info">
<span>创建人</span>
<span class="color-333">{{info.createUserName}}</span>
</div>
<div class="info">
<span>创建时间</span>
<span class="color-333">{{info.createTime}}</span>
</div>
<div class="info">
<span>播发设备</span>
<span class="color-333" @click="toEquipmentList"><span style="color:#1174FE;" v-if="info.devices">{{info.devices.length}}</span>个设备<u-icon name="arrow-right" size="28" color="#999999" style="margin-left:8px;"></u-icon></span>
</div>
</div>
<div class="media-content">
<h2>播发素材</h2>
<div class="media-item" v-for="(item, index) in info.materials" :key="index">
<img :src="`${$cdn}video/play-icon.png`" alt="" @click="choose(item)">
<div class="info">
<!-- <p>{{info.sourceName}}</p> -->
<div>{{item.createUserName}} {{item.createTime}}</div>
</div>
</div>
</div>
<div style="height:120px;"></div>
<div v-if="info.broadcastStatus == 0 || info.broadcastStatus == 1 || info.broadcastStatus == 2">
<div class="btn" v-if="info.taskType == 1" @click="cancel">撤销任务</div>
</div>
<u-popup v-model="isShow" mode="bottom">
<div class="audio">
<AiVideo :src="url" autoplay></AiVideo>
<!-- <audio :src="url" ref="audio" :controls="true" :name="autioName" style="display: block;"></audio> -->
</div>
</u-popup>
</div>
</template>
<script>
export default {
name: "detail",
data() {
return {
isShow: false,
url: '',
id: '',
info: {},
dayList: ['', '每周一', '每周二', '每周三', '每周四', '每周五', '每周六', '每周日'],
}
},
onLoad(option) {
this.id = option.id
this.$dict.load(['dlbMessageUrgency', 'dlbDyclingType']).then(() => {
this.getDetail()
})
},
onShow() {
document.title = '任务详情'
},
methods: {
choose(item) {
this.url = item.url
this.isShow = true
},
toEquipmentList() {
uni.navigateTo({url: `./equipmentList?id=${this.id}`})
},
getDetail() {
this.$http.post(`/app/appzyvideobroadcast/queryDetailById?id=${this.id}`).then(res => {
if (res.code == 0) {
this.info = res.data
if(this.info.cyclingType == 2) {
this.info.cyclingDateList = this.info.cyclingDate.split(',')
}
}
}).catch(() => {
uni.hideLoading()
})
},
cancel() {
this.$confirm('确定撤回该广播?').then(() => {
this.$http.post(`/app/appzyvideobroadcast/getBroadcastRecall?broadcastId=${this.info.id}`).then((res) => {
if (res.code == 0) {
this.$u.toast('撤回成功!')
this.getDetail()
}
})
})
},
},
}
</script>
<style lang="scss" scoped>
.detail {
.info-content{
padding-left: 32px;
background-color: #fff;
p{
padding: 32px 32px 32px 0;
font-size: 38px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #333;
line-height: 56px;
word-break: break-all;
}
.info{
display: flex;
justify-content: space-between;
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 44px;
padding: 34px 32px 32px 0;
border-bottom: 1px solid #ddd;
.color-333{
color: #333;
}
h2{
font-size: 38px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #333;
line-height: 52px;
}
h3{
font-size: 34px;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #4E8EEE;
line-height: 52px;
}
}
.border-none{
border-bottom: 0;
}
}
.audio {
width: 100%;
height: 400px;
box-sizing: border-box;
padding: 104px 0 46px;
}
.media-content{
margin-top: 16px;
background-color: #fff;
h2{
padding: 32px;
font-size: 38px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #333;
line-height: 52px;
}
.media-item {
width: 100%;
display: flex;
border-bottom: 1px solid #ddd;
padding: 32px 30px;
box-sizing: border-box;
img {
width: 56px;
height: 56px;
margin-right: 14px;
}
.info {
width: calc(100% - 70px);
line-height: 44px;
font-size: 34px;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #333;
p {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
}
div{
font-size: 26px;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #999;
line-height: 36px;
margin-top: 8px;
}
}
}
}
.btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
background: #fff;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #F46;
border-top: 1px solid #ddd;
}
}
</style>

View File

@@ -0,0 +1,119 @@
<template>
<div class="equipmentList">
<p class="title">播发设备<span class="mini-title"><span style="color:#1174FE;">{{info.devices.length}}</span>个设备</span></p>
<div class="record">
<div class="item" v-for="(item, index) in info.devices" :key="index">
<img src="../img/lb@2x.png" alt="" class="voice-img">
<div class="info">
<div class="text">
<p>{{item.name}}</p>
<span>{{item.areaName}}</span>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: "equipmentList",
data() {
return {
id: '',
info: {},
}
},
computed: { ...mapState(['user']) },
onLoad(option) {
this.id = option.id
this.getDetail()
},
methods: {
getDetail() {
this.$http.post(`/app/appzyvideobroadcast/queryDetailById?id=${this.id}`).then(res => {
if (res.code == 0) {
this.info = res.data
}
}).catch(() => {
uni.hideLoading()
})
},
}
}
</script>
<style lang="scss" scoped>
.equipmentList {
.title{
padding: 32px;
background-color: #fff;
font-size: 38px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #333;
line-height: 52px;
.mini-title{
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
margin-left: 16px;
}
}
.record {
padding-left: 32px;
background-color: #fff;
.item {
width: 100%;
display: flex;
border-bottom: 1px solid #ddd;
.check-img {
width: 44px;
height: 44px;
margin: 32px 32px 0 0;
}
.voice-img {
width: 48px;
height: 48px;
margin: 28px 16px 0 0;
}
.info {
width: calc(100% - 160px);
padding: 18px 0;
line-height: 44px;
font-size: 34px;
display: flex;
justify-content: space-between;
.text {
p {
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #333;
margin-bottom: 8px;
}
span {
font-size: 26px;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #999;
line-height: 36px;
}
}
.status {
font-size: 34px;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #4E8EEE;
line-height: 48px;
}
}
}
}
}
</style>