任务详情

This commit is contained in:
shijingjing
2022-06-08 17:57:19 +08:00
parent fc220c7868
commit d24898b558
6 changed files with 133 additions and 12 deletions

View File

@@ -9,6 +9,7 @@
<script> <script>
import List from './components/List' import List from './components/List'
import Add from './components/Add' import Add from './components/Add'
import Detail from './components/Detail'
export default { export default {
label: '播发记录', label: '播发记录',
@@ -20,7 +21,7 @@ export default {
data() { data() {
return { return {
component: 'List', component: 'Detail',
params: {}, params: {},
include: [], include: [],
} }
@@ -28,7 +29,8 @@ export default {
components: { components: {
Add, Add,
List List,
Detail
}, },
methods: { methods: {
onChange(data) { onChange(data) {
@@ -37,6 +39,11 @@ export default {
this.params = data.params this.params = data.params
} }
if (data.type === 'detail') {
this.component = 'Detail'
this.params = data.params
}
if (data.type == 'list') { if (data.type == 'list') {
this.component = 'List' this.component = 'List'
this.params = data.params this.params = data.params

View File

@@ -0,0 +1,96 @@
<template>
<ai-detail isHasSidebar>
<template slot="title">
<ai-title title="任务详情" isShowBack isShowBottomBorder @onBackClick="cancel(true)">
</ai-title>
</template>
<template slot="content">
<AiSidebar :tabTitle="tabList" v-model="currIndex"></AiSidebar>
<div v-show="currIndex == 0">
<ai-card title="播发任务" v-show="currIndex === 0">
<template #content>
<!-- <ai-wrapper
label-width="120px">
<ai-info-item label="姓名" :value="info.name"></ai-info-item>
<ai-info-item label="上报时间" :value="info.createTime"></ai-info-item>
<ai-info-item label="身份证号" :value="info.idNumber"></ai-info-item>
<ai-info-item label="所属地区" :value="info.areaName"></ai-info-item>
<ai-info-item label="详细地址" isLine :value="info.address"></ai-info-item>
</ai-wrapper> -->
</template>
</ai-card>
</div>
<ai-card title="播发设备" v-show="currIndex == 1">
<template #content>
<ai-table
class="detail-table__table"
:tableData="tableData"
:col-configs="colConfigs"
:total="total"
:current.sync="search.current"
:size.sync="search.size"
@getList="getList">
<el-table-column slot="options" width="140px" fixed="right" label="操作" align="center">
<template slot-scope="{ row }">
<div class="table-options">
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
</div>
</template>
</el-table-column>
</ai-table>
</template>
</ai-card>
<ai-card title="播发素材" v-show="currIndex == 2">
<template #content>
<ai-table
class="detail-table__table"
:tableData="tableData"
:col-configs="colConfigs"
:total="total"
:current.sync="search.current"
:size.sync="search.size"
@getList="getList">
<el-table-column slot="options" width="140px" fixed="right" label="操作" align="center">
<template slot-scope="{ row }">
<div class="table-options">
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
</div>
</template>
</el-table-column>
</ai-table>
</template>
</ai-card>
</template>
</ai-detail>
</template>
<script>
export default {
name: 'Detail',
components: {},
props: {
dict: Object,
params: Object,
instance: Function,
},
data() {
return {
tabList: ['播发任务','播发设备','播发素材']
}
},
methods: {
cancel(isRefresh) {
this.$emit('change', {
type: 'list',
isRefresh: !!isRefresh,
})
},
}
}
</script>
<style lang="scss" scoped>
.Detail {
height: 100%;
}
</style>

View File

@@ -31,6 +31,7 @@
<el-table-column slot="options" label="操作" align="center" width="180" fixed="right"> <el-table-column slot="options" label="操作" align="center" width="180" fixed="right">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-button type="text" @click="onAdd(row.broadcastId)">复制</el-button> <el-button type="text" @click="onAdd(row.broadcastId)">复制</el-button>
<el-button type="text" @click="toDetail(row.broadcastId)">详情</el-button>
<el-button type="text" @click="cancel(row.broadcastId)" <el-button type="text" @click="cancel(row.broadcastId)"
v-if="row.broadcastStatus == 0 || row.broadcastStatus == 1 || row.broadcastStatus == 2">撤回 v-if="row.broadcastStatus == 0 || row.broadcastStatus == 1 || row.broadcastStatus == 2">撤回
</el-button> </el-button>
@@ -126,6 +127,14 @@ export default {
} }
}) })
}, },
toDetail(id) {
this.$emit('change', {
type: 'detail',
params: {
id: id || ''
}
})
},
cancel(id) { cancel(id) {
this.$confirm('确定撤回该广播?').then(() => { this.$confirm('确定撤回该广播?').then(() => {
this.instance.post(`/app/appzyvideobroadcast/getBroadcastRecall?broadcastId=${id}`).then((res) => { this.instance.post(`/app/appzyvideobroadcast/getBroadcastRecall?broadcastId=${id}`).then((res) => {

View File

@@ -8,7 +8,7 @@
<script> <script>
import List from './components/List' import List from './components/List'
import taskList from './components/taskList' import TaskList from './components/TaskList'
export default { export default {
label: '广播设备管理', label: '广播设备管理',
@@ -20,7 +20,7 @@ export default {
data() { data() {
return { return {
component: 'taskList', component: 'TaskList',
params: {}, params: {},
include: [], include: [],
} }
@@ -28,12 +28,12 @@ export default {
components: { components: {
List, List,
taskList, TaskList,
}, },
methods: { methods: {
onChange(data) { onChange(data) {
if (data.type === 'taskList') { if (data.type === 'taskList') {
this.component = 'taskList' this.component = 'TaskList'
this.params = data.params this.params = data.params
} }

View File

@@ -164,7 +164,16 @@ export default {
}) })
} }
}, },
close(id) {
this.$confirm('确定停播该设备?').then(() => {
this.instance.post(`/app/appdlbquipment/stop?deviceId=${id}`).then((res) => {
if (res.code == 0) {
this.$message.success('停播成功!')
this.getList()
}
})
})
},
getList() { getList() {
this.instance.post(`/app/appdlbquipment/getDlbDeviceList`, null, { this.instance.post(`/app/appdlbquipment/getDlbDeviceList`, null, {
params: { params: {

View File

@@ -1,7 +1,7 @@
<template> <template>
<section class="taskList"> <section class="TaskList">
<ai-list> <ai-list>
<ai-title slot="title" title="任务列表" isShowBack isShowBottomBorder @onBackClick="cancel(false)"/> <ai-title slot="title" title="任务列表" isShowBack isShowBottomBorder @onBackClick="cancel(true)"/>
<template #content> <template #content>
<ai-search-bar bottomBorder> <ai-search-bar bottomBorder>
<template slot="right"> <template slot="right">
@@ -26,7 +26,7 @@
<script> <script>
export default { export default {
name: 'taskList', name: 'TaskList',
components: {}, components: {},
props: { props: {
dict: Object, dict: Object,
@@ -115,7 +115,7 @@ export default {
}, },
cancel(isRefresh) { cancel(isRefresh) {
this.$emit('change', { this.$emit('change', {
type: 'List', type: 'list',
isRefresh: !!isRefresh, isRefresh: !!isRefresh,
}) })
}, },
@@ -124,7 +124,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.taskList { .TaskList {
height: 100%; height: 100%;
} }
</style> </style>