任务列表

This commit is contained in:
shijingjing
2022-06-11 13:16:21 +08:00
parent ca02cfc24e
commit 231717f862
3 changed files with 54 additions and 36 deletions

View File

@@ -22,7 +22,7 @@
<el-table-column slot="options" label="操作" align="center" width="280" fixed="right">
<template slot-scope="{ row }">
<!-- <el-button type="text" @click="close(row.id)">停播</el-button> -->
<el-button type="text" @click="toTaskList(row.id)">任务列表</el-button>
<el-button type="text" @click="toTaskList(row.deviceId)">任务列表</el-button>
<el-button type="text" @click="bind(row)">绑定行政区划</el-button>
<!-- <el-button type="text" @click="locate=true">地图标绘</el-button>-->
</template>
@@ -73,13 +73,15 @@ export default {
ids: [],
colConfigs: [
{
prop: 'deviceName',
prop: 'name',
label: '设备名称',
width: '200',
},
{
prop: 'areaName',
label: '所属行政区划',
align: 'center',
width: '200',
},
{
prop: 'serialNo',
@@ -89,7 +91,7 @@ export default {
{
prop: 'devStatus',
label: '设备状态',
width: '100',
width: '200',
align: 'center',
render: (h, {row}) => {
return h('span', null, this.dict.getLabel('dlbDevStatus', row.devStatus))
@@ -98,10 +100,9 @@ export default {
{
prop: 'bind',
label: '是否绑定区划',
width: '120',
align: 'center',
render: (h, {row}) => {
return h('span', null, this.dict.getLabel('yesOrNo', row.bind))
return h('span', null, (row.areaId? '是': '否'))
},
},
{
@@ -175,7 +176,7 @@ export default {
})
},
getList() {
this.instance.post(`/app/appdlbquipment/getDlbDeviceList`, null, {
this.instance.post(`/app/appdlbquipment/list`, null, {
params: {
...this.page,
...this.search,

View File

@@ -5,17 +5,17 @@
<template #content>
<ai-search-bar bottomBorder>
<template slot="right">
<el-input v-model="search.keyword" size="small" placeholder="资名称/创建人" clearable
<el-input v-model="search.keyword" size="small" placeholder="资名称/创建人" clearable
v-throttle="() => {page.current = 1, getList()}"
@clear=";(page.current = 1), (search.keyword = ''), getList()" suffix-icon="iconfont iconSearch"/>
</template>
</ai-search-bar>
<ai-table :tableData="tableData" :col-configs="colConfigs" :total="total" ref="aitableex"
<ai-table :tableData="tableData" :col-configs="colConfigs" :total="page.total" ref="aitableex"
:current.sync="page.current" :size.sync="page.size" @getList="getList"
@selection-change="(v) => (ids = v.map((e) => e.id))">
<el-table-column slot="options" label="操作" align="center" width="280" fixed="right">
<template slot-scope="{ row }">
<el-button type="text" @click="close(row.id)">撤回任务</el-button>
<template slot-scope="{ row }" v-if="row.taskType == 1">
<el-button type="text" @click="reset(row.id)">撤回任务</el-button>
</template>
</el-table-column>
</ai-table>
@@ -38,53 +38,56 @@ export default {
page: {
current: 1,
size: 10,
total: 0,
},
total: 0,
search: {
bind: '',
keyword: '',
},
tableData: [],
colConfigs: [
{
prop: 'deviceName',
prop: 'sourceName',
label: '任务名称',
},
{
prop: 'areaName',
prop: 'cyclingType',
label: '媒资类型',
width: '200',
align: 'center',
render: (h, { row })=>{
return h('span',null,this.dict.getLabel('dlbDyclingType',row.cyclingType))
}
},
{
prop: 'serialNo',
prop: 'messageLevel',
label: '级别',
align: 'center',
render: (h, { row })=>{
return h('span',null,this.dict.getLabel('dlbMessageUrgency',row.messageLevel))
}
},
{
prop: 'devStatus',
prop: 'taskType',
label: '播发方式',
width: '100',
width: '220',
align: 'center',
render: (h, {row}) => {
return h('span', null, this.dict.getLabel('dlbDevStatus', row.devStatus))
return h('span', null, (row.taskType == 1? '定时播放':'立即播放'))
},
},
{
prop: 'bind',
prop: 'startTime',
label: '开始时间',
width: '120',
align: 'center',
render: (h, {row}) => {
return h('span', null, this.dict.getLabel('yesOrNo', row.bind))
},
},
// {
// prop: 'serialNo',
// label: '状态',
// align: 'center',
// },
{
prop: 'serialNo',
label: '状态',
align: 'center',
},
{
prop: 'serialNo',
prop: 'createUserName',
label: '创建人',
align: 'center',
},
@@ -96,18 +99,33 @@ export default {
],
}
},
create() {
created() {
this.$dict.load('dlbDyclingType','dlbMessageUrgency').then(()=>{
this.getList()
})
},
methods: {
getList() {},
getList() {
this.instance.post(`/app/appzyvideobroadcast/list?deviceId`,null,{
params: {
...this.page,
...this.search,
deviceId: this.params.deviceId
}
}).then(res=>{
if(res?.data) {
this.tableData = res.data.records
this.page.total = res.data.total
}
})
},
close(id) {
this.$confirm('确定停播该设备?').then(() => {
this.instance.post(`/app/appdlbquipment/stop?deviceId=${id}`).then((res) => {
reset(id) {
this.$confirm('确定要撤回该任务吗?').then(() => {
this.instance.post(`/app/appzyvideobroadcast/getBroadcastRecall?broadcastId=${id}`).then((res) => {
if (res.code == 0) {
this.$message.success('停播成功!')
this.$message.success('撤回成功!')
this.getList()
}
})

View File

@@ -175,7 +175,6 @@ export default {
getItemInfo (id) {
this.instance.post(`/app/appdlbresource/queryDetailById?id=${id}`).then(res => {
if (res?.data) {
console.log(res);
this.info = res.data
this.detailDialog = true
}