This commit is contained in:
yanran200730
2022-06-13 11:19:09 +08:00
143 changed files with 1006 additions and 13669 deletions

View File

@@ -24,6 +24,7 @@
</div>
</div>
</div>
<AiEmpty v-if="!list.length"></AiEmpty>
</div>
</template>
<script>
@@ -57,8 +58,8 @@ export default {
this.current = 1
this.getList()
},
getList() {
this.$http.post(`/app/appdlbquipment/list?current=1&size=20&name=${this.keyword}`).then((res) => {
getList() { //&areaId=${this.areaId}
this.$http.post(`/app/appdlbquipment/list?current=1&size=20&name=${this.keyword}&areaId=${this.areaId}`).then((res) => {
if (res.code == 0) {
if (this.current > 1) {
this.list = [...this.list, ...res.data.records]

View File

@@ -31,23 +31,29 @@
</div>
<div class="list-content" v-else>
<div class="list">
<div class="item" @click="toTaskDetail">
<div class="item" v-for="(item, index) in list" :key="index" @click="toPlayDetail(item)">
<div class="left">
<p>韩红-我的祖国.mp3</p>
<div>李毅 2022-06-09 09:43:05</div>
<div>日常 立即播发</div>
<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">已下发</div>
<div class="cancel-btn">撤销</div>
<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> -->
<AiEmpty v-if="!list.length"></AiEmpty>
</div>
</div>
<div class="btn" @click="setVolume">设置音量</div>
<div class="btn" @click="setVolume" v-if="currIndex != 1">设置音量</div>
<u-popup v-model="isShow" mode="bottom" class="popup">
<div class="title">
<span @click="isShow=false">取消</span>
@@ -102,16 +108,15 @@ export default {
change(index) {
this.currIndex = index
},
toTaskDetail(item) {
uni.navigateTo({url: `./taskDetail`})
toPlayDetail(item) {
uni.navigateTo({url: `../AppPlayList/detail?id=${item.id}`})
},
setVolume() {
this.isShow = true
this.volume = this.info.volume * 10 || 10
this.volume = this.info.volume
},
confirmAdd() {
var volume = parseInt(this.volume/10)
this.$http.post(`/app/appdlbquipment/volumeControl?deviceId=${this.info.deviceId}&volume=${volume}`).then((res) => {
this.$http.post(`/app/appdlbquipment/volumeControl?deviceId=${this.info.deviceId}&volume=${this.volume}`).then((res) => {
if (res.code == 0) {
this.getDetail()
this.isShow = false
@@ -123,9 +128,31 @@ export default {
this.$http.post(`/app/appdlbquipment/queryDetailById?id=${this.id}`).then((res) => {
if (res.code == 0) {
this.info = res.data
this.getPlayList()
}
})
}
},
getPlayList() {
this.$http.post(`/app/appzyvideobroadcast/list?current=${this.current}&size=10&serialNo=${this.info.serialNo}`).then(res => {
if (res.code == 0) {
if (this.current > 1) {
this.list = [...this.list, ...res.data.records]
} else {
this.list = res.data.records
}
}
})
},
cancel(id) {
this.$confirm('确定撤回该广播?').then(() => {
this.$http.post(`/app/appzyvideobroadcast/getBroadcastRecall?broadcastId=${id}`).then((res) => {
if (res.code == 0) {
this.$u.toast('撤回成功!')
this.getList()
}
})
})
},
},
onReachBottom() {

View File

@@ -1,206 +0,0 @@
<template>
<div class="taskDetail">
<div class="info-content">
<div class="info border-none">
<h2>播发任务</h2>
<h3>已下发</h3>
</div>
<div class="info">
<span>播发级别</span>
<span class="color-333">121312312312</span>
</div>
<div class="info">
<span>播放方式</span>
<span style="color: #4E8EEE">在线</span>
</div>
<div>
<div class="info">
<span>播放天数</span>
<span class="color-333">每周一每周二每周三</span>
</div>
<div class="info">
<span>开始日期</span>
<span class="color-333">2022-06-10</span>
</div>
<div class="info">
<span>开始时间</span>
<span class="color-333">18:00:00</span>
</div>
<div class="info">
<span>结束时间</span>
<span class="color-333">19:00:00</span>
</div>
</div>
<div class="info">
<span>创建人</span>
<span class="color-333">一般</span>
</div>
<div class="info">
<span>创建时间</span>
<span class="color-333"></span>
</div>
</div>
<div class="media-content">
<h2>播发素材</h2>
<div class="media-item">
<img :src="`${$cdn}video/play-icon.png`" alt="" @click="choose()">
<div class="info">
<p>五一活动唱红歌.mp3</p>
<div>李毅 2022-06-09 09:43:05</div>
</div>
</div>
</div>
<div class="btn">撤销任务</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: "taskDetail",
data() {
return {
isShow: false
}
},
onLoad(query) {
},
onShow() {
document.title = '任务详情'
},
methods: {
choose(item) {
console.log(item.url)
this.url = item.url
this.isShow = tru
},
},
}
</script>
<style lang="scss" scoped>
.taskDetail {
.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

@@ -11,21 +11,27 @@
<div class="list">
<div class="item" v-for="(item, index) in list" :key="index" @click="toDetail(item)" >
<div class="left">
<p>{{ item.messageName }}</p>
<div>{{item.createUserName}} {{ item.startDate }}</div>
<div>日常 立即播发</div>
<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">已下发</div>
<div class="cancel-btn">撤销</div>
<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> -->
<AiEmpty v-if="!list.length"></AiEmpty>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: "AppPlayList",
data() {
@@ -34,17 +40,18 @@ export default {
current: 1,
type: '0',
typeList: [{label: '全部', value: '0'}, {label: '我发布的', value: '1'}],
keyword: ''
keyword: '',
}
},
computed: { ...mapState(['user']) },
onLoad(query) {
this.getList()
this.$dict.load(['dlbMessageUrgency']).then(() => {
this.getList()
})
},
onShow() {
document.title = '播放记录'
},
methods: {
selectType(selecteds) {
this.type = selecteds?.[0]?.value
@@ -57,11 +64,12 @@ export default {
},
getList() {
this.$http.post(`/app/appzyvideobroadcast/getBroadcastRecords`, null, {
this.$http.post(`/app/appzyvideobroadcast/list`, null, {
params: {
...this.search,
sourceName: this.keyword,
current: this.current,
size: 10
size: 10,
createUserId: this.type == 1 ? this.user.id : ''
}
}).then(res => {
if (res.code == 0) {
@@ -77,6 +85,17 @@ export default {
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}`})
}

View File

@@ -3,57 +3,67 @@
<div class="info-content">
<div class="info border-none">
<h2>播发任务</h2>
<h3>已下发</h3>
<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">121312312312</span>
<span class="color-333">{{ $dict.getLabel('dlbMessageUrgency', info.messageLevel) }}</span>
</div>
<div class="info">
<span>播放方式</span>
<span style="color: #4E8EEE">在线</span>
<span class="color-333">{{info.taskType == 1 ? '定时播放' : '立即播放'}}
<span v-if="info.taskType == 1 ">-{{ $dict.getLabel('dlbDyclingType', info.cyclingType) }}</span>
</span>
</div>
<div>
<div class="info">
<div v-if="info.taskType == 1">
<div class="info" v-if="info.cyclingType != 1">
<span>播放天数</span>
<span class="color-333">每周一每周二每周三</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">2022-06-10</span>
<span class="color-333">{{info.startDate}}</span>
</div>
<div class="info">
<span>开始时间</span>
<span class="color-333">18:00:00</span>
<span class="color-333">{{info.startTime}}</span>
</div>
<div class="info">
<span>结束时间</span>
<span class="color-333">19:00:00</span>
<span class="color-333">{{info.endTime}}</span>
</div>
</div>
<div class="info">
<span>创建人</span>
<span class="color-333">一般</span>
<span class="color-333">{{info.createUserName}}</span>
</div>
<div class="info">
<span>创建时间</span>
<span class="color-333"></span>
<span class="color-333">{{info.createTime}}</span>
</div>
<div class="info">
<span>播发设备</span>
<span class="color-333" @click="toEquipmentList"><span style="color:#1174FE;">10</span>个设备<u-icon name="arrow-right" size="28" color="#999999" style="margin-left:8px;"></u-icon></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">
<img :src="`${$cdn}video/play-icon.png`" alt="" @click="choose()">
<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>五一活动唱红歌.mp3</p>
<div>李毅 2022-06-09 09:43:05</div>
<p>{{info.sourceName}}</p>
<div>{{item.createUserName}} {{item.createTime}}</div>
</div>
</div>
</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>
@@ -71,13 +81,15 @@ export default {
isShow: false,
url: '',
id: '',
info: {}
info: {},
dayList: ['', '每周一', '每周二', '每周三', '每周四', '每周五', '每周六', '每周日'],
}
},
onLoad(option) {
console.log(option)
this.id = option.id
this.getDetail()
this.$dict.load(['dlbMessageUrgency', 'dlbDyclingType']).then(() => {
this.getDetail()
})
},
onShow() {
@@ -86,22 +98,34 @@ export default {
methods: {
choose(item) {
console.log(item.url)
this.url = item.url
this.isShow = tru
this.isShow = true
},
toEquipmentList() {
uni.navigateTo({url: `./equipmentList`})
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.getList()
}
})
})
},
},
}
</script>

View File

@@ -1,22 +1,13 @@
<template>
<div class="equipmentList">
<p class="title">播发设备<span class="mini-title"><span style="color:#1174FE;">10</span>个设备</span></p>
<p class="title">播发设备<span class="mini-title"><span style="color:#1174FE;">{{info.devices.length}}</span>个设备</span></p>
<div class="record">
<div class="item">
<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>村头大喇叭</p>
<span>刘家河居委会</span>
</div>
</div>
</div>
<div class="item">
<img src="../img/lb@2x.png" alt="" class="voice-img">
<div class="info">
<div class="text">
<p>村头大喇叭</p>
<span>刘家河居委会</span>
<p>{{item.name}}</p>
<span>{{item.areaName}}</span>
</div>
</div>
</div>
@@ -29,17 +20,25 @@ export default {
name: "equipmentList",
data() {
return {
id: '',
info: {},
}
},
computed: { ...mapState(['user']) },
onLoad(option) {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
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>

View File

@@ -16,9 +16,9 @@
<img :src="`${$cdn}video/play-icon.png`" alt="" @click.stop="choose(item)">
<div class="info">
<p>{{ item.name ? item.name.split('.')[0] : '-' }}</p>
<div>{{ item.createUserName }}{{ item.createTime }}</div>
<div class="time">{{ item.createUserName }} {{ item.createTime }}</div>
</div>
<div class="btn">发布</div>
<div class="btn" @click.stop="toAddBroadcast(item)">发布</div>
</div>
</div>
<div class="record-text" v-else>
@@ -26,8 +26,9 @@
<div class="info">
<div>{{ item.name }}</div>
<p>{{ item.content }}</p>
<div class="time">{{ item.createUserName }} {{ item.createTime }}</div>
</div>
<div class="btn">发布</div>
<div class="btn" @click.stop="toAddBroadcast(item)">发布</div>
</div>
</div>
<AiEmpty v-if="!list.length"></AiEmpty>
@@ -92,7 +93,7 @@ export default {
add() {
uni.navigateTo({
url: `./addPlay?type=${this.currIndex === 0 ? 1 : 3}`
url: `./addMedia?type=${this.currIndex === 0 ? 1 : 3}`
})
},
@@ -149,6 +150,9 @@ export default {
},
toDetail(item) {
uni.navigateTo({url: `./detail?id=${item.id}`})
},
toAddBroadcast(item) {
uni.navigateTo({ url: `../addPlay?mediaId=${item.id}&mediaName=${item.name}` })
}
},
@@ -166,6 +170,12 @@ export default {
}
}
.time{
font-size: 28px!important;
color: #999!important;
margin: 8px 0 0 0!important;
}
.tab {
border-bottom: 1px solid #ddd;
margin-bottom: 4px;
@@ -261,7 +271,6 @@ export default {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-bottom: 12px;
.color-0063E5 {
color: #0063E5;

View File

@@ -3,7 +3,7 @@
<div class="header">
<img :src="`${$cdn}video/play-icon.png`" alt="">
<div class="right">
<h2>{{info.name}}.mp3</h2>
<h2>{{info.name}}</h2>
<p>{{info.createTime}}</p>
</div>
</div>

View File

@@ -26,6 +26,7 @@
</div>
</div>
</div>
<AiEmpty v-if="!list.length"></AiEmpty>
<div class="btn">
<div @click="confirm">确定选择</div>
</div>
@@ -58,7 +59,7 @@ export default {
// this.getList()
},
getList() {
this.$http.post(`/app/appdlbquipment/list?current=1&size=20&name=${this.keyword}&devStatus=5`).then((res) => {
this.$http.post(`/app/appdlbquipment/list?current=1&size=20&name=${this.keyword}&devStatus=5&areaId=${thyis.areaId}`).then((res) => {
if (res.code == 0) {
res.data.records.map(item => {
item.isCheck = false

View File

@@ -125,6 +125,7 @@ export default {
type: this.currIndex === 0 ? 1 : 3,
current: this.current,
size: 10,
areaId: this.areaId
}
}).then(res => {
if (res.code == 0) {

View File

@@ -1,77 +0,0 @@
<template>
<div class="selectMp3">
<div class="record">
<div class="item">
<img src="./img/cir.png" alt="">
<div class="info">
<p>村头大喇叭</p>
</div>
</div>
</div>
<div class="btn">
<div>确定选择</div>
</div>
</div>
</template>
<script>
export default {
name: "selectMp3",
}
</script>
<style lang="scss" scoped>
.selectMp3 {
padding-bottom: 128px;
.record {
padding-left: 32px;
background-color: #fff;
.item {
width: 100%;
display: flex;
img {
width: 32px;
height: 32px;
margin: 40px 16px 0 0;
}
.info {
width: calc(100% - 60px);
padding: 34px 0;
line-height: 44px;
border-bottom: 1px solid #ddd;
font-size: 34px;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #333;
margin-left: 16px;
}
}
}
.btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 128px;
background: #FFF;
border-top: 1px solid #ddd;
padding: 24px 32px 24px 0;
box-sizing: border-box;
div {
width: 192px;
height: 80px;
line-height: 80px;
text-align: center;
background: #3975C6;
border-radius: 4px;
color: #fff;
font-size: 32px;
float: right;
}
}
}
</style>