改造广播设备管理
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<section class="taskList">
|
||||
<ai-list>
|
||||
<ai-title slot="title" title="任务列表" isShowBack isShowBottomBorder @onBackClick="cancel(true)"/>
|
||||
<ai-title slot="title" title="任务列表" isShowBack isShowBottomBorder @onBackClick="cancel"/>
|
||||
<template #content>
|
||||
<ai-search-bar bottomBorder>
|
||||
<template slot="right">
|
||||
@@ -25,13 +25,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapMutations} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'taskList',
|
||||
components: {},
|
||||
props: {
|
||||
dict: Object,
|
||||
instance: Function,
|
||||
params: Object,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -54,16 +54,16 @@ export default {
|
||||
label: '媒资类型',
|
||||
width: '200',
|
||||
align: 'center',
|
||||
render: (h, { row })=>{
|
||||
return h('span',null,this.dict.getLabel('dlbResourceType',row.type))
|
||||
render: (h, {row}) => {
|
||||
return h('span', null, this.dict.getLabel('dlbResourceType', row.type))
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'messageLevel',
|
||||
label: '级别',
|
||||
align: 'center',
|
||||
render: (h, { row })=>{
|
||||
return h('span',null,this.dict.getLabel('dlbMessageUrgency',row.messageLevel))
|
||||
render: (h, {row}) => {
|
||||
return h('span', null, this.dict.getLabel('dlbMessageUrgency', row.messageLevel))
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -72,7 +72,7 @@ export default {
|
||||
width: '220',
|
||||
align: 'center',
|
||||
render: (h, {row}) => {
|
||||
return h('span', null, (row.taskType == 1? '定时播放':'立即播放'))
|
||||
return h('span', null, (row.taskType == 1 ? '定时播放' : '立即播放'))
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -85,8 +85,8 @@ export default {
|
||||
prop: 'broadcastStatus',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
render: (h, { row })=>{
|
||||
return h('span',null, (row.broadcastStatus == 0? '已下发': row.broadcastStatus == 3? '播发成功': row.broadcastStatus == 6? '已取消': ''))
|
||||
render: (h, {row}) => {
|
||||
return h('span', null, (row.broadcastStatus == 0 ? '已下发' : row.broadcastStatus == 3 ? '播发成功' : row.broadcastStatus == 6 ? '已取消' : ''))
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -103,27 +103,23 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$dict.load('dlbDyclingType','dlbMessageUrgency','dlbBroadcastStatus','dlbResourceType').then(()=>{
|
||||
this.getList()
|
||||
})
|
||||
this.setPageTitle("设备任务列表")
|
||||
this.dict.load('dlbDyclingType', 'dlbMessageUrgency', 'dlbBroadcastStatus', 'dlbResourceType')
|
||||
this.getList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapMutations(['setPageTitle']),
|
||||
getList() {
|
||||
this.instance.post(`/app/appzyvideobroadcast/list?deviceId`,null,{
|
||||
params: {
|
||||
...this.page,
|
||||
...this.search,
|
||||
deviceId: this.params.deviceId
|
||||
}
|
||||
}).then(res=>{
|
||||
if(res?.data) {
|
||||
const {id: deviceId} = this.$route.query
|
||||
this.instance.post(`/app/appzyvideobroadcast/list`, null, {
|
||||
params: {...this.page, ...this.search, deviceId}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
reset(id) {
|
||||
this.$confirm('确定要撤回该任务吗?').then(() => {
|
||||
this.instance.post(`/app/appzyvideobroadcast/getBroadcastRecall?broadcastId=${id}`).then((res) => {
|
||||
@@ -134,11 +130,8 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
cancel(isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'list',
|
||||
isRefresh: !!isRefresh,
|
||||
})
|
||||
cancel() {
|
||||
this.$router.push({})
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -148,4 +141,4 @@ export default {
|
||||
.taskList {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user