This commit is contained in:
yanran200730
2022-06-10 19:31:18 +08:00
6 changed files with 39 additions and 84 deletions

View File

@@ -52,7 +52,7 @@ export default {
{
title: '音频录制',
text: '音频文件的录制',
path: './addPlay?type=1',
path: './AppResourcesManage/addPlay?type=1',
imgUrl: require('./img/bigHorn-icon33@2x.png'),
bgClass: 'bg-E5B565'
},

View File

@@ -9,10 +9,10 @@
</div>
</AiTopFixed>
<div class="list">
<div class="item" @click="toDetail">
<div class="item" v-for="(item, index) in list" :key="index" @click="toDetail(item)" >
<div class="left">
<p>韩红-我的祖国.mp3</p>
<div>李毅 2022-06-09 09:43:05</div>
<p>{{ item.messageName }}</p>
<div>{{item.createUserName}} {{ item.startDate }}</div>
<div>日常 立即播发</div>
</div>
<div class="right">
@@ -31,16 +31,14 @@ export default {
data() {
return {
list: [],
currIndex: 1,
current: 1,
type: '0',
typeList: [{label: '全部', value: '0'}, {label: '我发布的', value: '1'}],
isMore: false,
keyword: ''
}
},
onLoad(query) {
this.getList()
},
onShow() {
@@ -53,19 +51,15 @@ export default {
this.getListInit()
},
getListInit() {
this.isMore = false
this.list = []
this.current = 1
this.getList()
},
getList() {
if (this.isMore) return
this.$http.post(`/app/appdlbresource/list`, null, {
this.$http.post(`/app/appzyvideobroadcast/getBroadcastRecords`, null, {
params: {
...this.search,
type: this.currIndex === 0 ? 1 : 3,
current: this.current,
size: 10
}
@@ -76,16 +70,6 @@ export default {
} else {
this.list = res.data.records
}
uni.hideLoading()
if (res.data.records.length < 10) {
this.isMore = true
return false
}
this.current = this.current + 1
} else {
uni.hideLoading()
}
@@ -94,15 +78,13 @@ export default {
})
},
toDetail(item) {
uni.navigateTo({url: `./detail`})
uni.navigateTo({url: `./detail?id=${item.id}`})
}
},
onReachBottom() {
if(this.currIndex == 1) {
this.current ++
this.getList()
}
this.current ++
this.getList()
}
}
</script>

View File

@@ -69,11 +69,15 @@ export default {
data() {
return {
isShow: false,
url: ''
url: '',
id: '',
info: {}
}
},
onLoad(query) {
onLoad(option) {
console.log(option)
this.id = option.id
this.getDetail()
},
onShow() {
@@ -88,7 +92,16 @@ export default {
},
toEquipmentList() {
uni.navigateTo({url: `./equipmentList`})
}
},
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

@@ -106,7 +106,7 @@ export default {
mediaId: '',
mediaName: '请选择',
serialNo: '',
serialName: '请选择',
serialName: '',
messageLevel: '',
messageLevelName: '请选择',
taskType: '0',
@@ -207,9 +207,10 @@ export default {
if (!this.formData.mediaId) {
return this.$u.toast('请选择播发内容')
}
if (!this.formData.serialNo) {
if (!this.equipmentList.length) {
return this.$u.toast('请选择播放设备')
}
if (!this.formData.messageLevel) {
return this.$u.toast('播发级别')
}
@@ -236,6 +237,11 @@ export default {
if (this.formData.taskType != 0 && this.formData.cyclingType == 2) {
this.formData.cyclingDate = cyclingDateList.join(',')
}
var serialNoList = []
this.equipmentList.map(item => {
serialNoList.push(item.serialNo)
})
this.formData.serialNo = serialNoList.join(',')
this.formData.coverageType = '4'
this.$http.post(`/app/appzyvideobroadcast/play`, {...this.formData,}).then((res) => {
if (res.code == 0) {
@@ -302,38 +308,6 @@ export default {
this[showType] = true
this.selectList = list
},
getMediaList() {
this.$http.post(`/app/appdlbresource/list?current=1&size=10000`).then((res) => {
if (res.code == 0) {
this.mediaList = []
if (res.data && res.data.records.length) {
res.data.records.map((item) => {
let info = {
dictName: item.name,
dictValue: item.id
}
this.mediaList.push(info)
})
}
}
})
},
getEquipmentList() {
this.$http.post(`/app/appdlbquipment/getDlbDeviceList?current=1&size=10000&keyword=`).then((res) => {
if (res.code == 0) {
this.equipmentList = []
if (res.data && res.data.records.length) {
res.data.records.map((item) => {
let info = {
dictName: item.deviceName,
dictValue: item.serialNo
}
this.equipmentList.push(info)
})
}
}
})
},
checkClick(index) {
this.dayList[index].isCheck = !this.dayList[index].isCheck
},
@@ -371,8 +345,6 @@ export default {
},
created() {
this.$dict.load('dlbMessageUrgency', 'dlbBroadTaskType', 'dlbDyclingType').then(() => {
this.getMediaList()
this.getEquipmentList()
this.messageLevelList = this.$dict.getDict('dlbMessageUrgency')
this.cyclingTypeList = this.$dict.getDict('dlbDyclingType')
})