任务列表
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import List from './components/List'
|
import List from './components/List'
|
||||||
|
import taskList from './components/taskList'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
label: '广播设备管理',
|
label: '广播设备管理',
|
||||||
@@ -19,19 +20,20 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
component: 'List',
|
component: 'taskList',
|
||||||
params: {},
|
params: {},
|
||||||
include: [],
|
include: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
List
|
List,
|
||||||
|
taskList,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onChange(data) {
|
onChange(data) {
|
||||||
if (data.type === 'add') {
|
if (data.type === 'taskList') {
|
||||||
this.component = 'Add'
|
this.component = 'taskList'
|
||||||
this.params = data.params
|
this.params = data.params
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,9 +21,10 @@
|
|||||||
@selection-change="(v) => (ids = v.map((e) => e.id))">
|
@selection-change="(v) => (ids = v.map((e) => e.id))">
|
||||||
<el-table-column slot="options" label="操作" align="center" width="280" fixed="right">
|
<el-table-column slot="options" label="操作" align="center" width="280" fixed="right">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<el-button type="text" @click="close(row.id)">停播</el-button>
|
<!-- <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="bind(row)">绑定行政区划</el-button>
|
<el-button type="text" @click="bind(row)">绑定行政区划</el-button>
|
||||||
<!-- <el-button type="text" @click="locate=true">地图标绘</el-button>-->
|
<!-- <el-button type="text" @click="locate=true">地图标绘</el-button>-->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</ai-table>
|
</ai-table>
|
||||||
@@ -163,16 +164,7 @@ 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: {
|
||||||
@@ -187,6 +179,16 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toTaskList(id) {
|
||||||
|
this.$emit('change', {
|
||||||
|
type: 'taskList',
|
||||||
|
params: {
|
||||||
|
id: id || '',
|
||||||
|
// areaId: this.areaId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
130
packages/device/AppEquipmentManage/components/taskList.vue
Normal file
130
packages/device/AppEquipmentManage/components/taskList.vue
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
<template>
|
||||||
|
<section class="taskList">
|
||||||
|
<ai-list>
|
||||||
|
<ai-title slot="title" title="任务列表" isShowBack isShowBottomBorder @onBackClick="cancel(false)"/>
|
||||||
|
<template #content>
|
||||||
|
<ai-search-bar bottomBorder>
|
||||||
|
<template slot="right">
|
||||||
|
<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"
|
||||||
|
: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>
|
||||||
|
</el-table-column>
|
||||||
|
</ai-table>
|
||||||
|
</template>
|
||||||
|
</ai-list>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'taskList',
|
||||||
|
components: {},
|
||||||
|
props: {
|
||||||
|
dict: Object,
|
||||||
|
instance: Function,
|
||||||
|
params: Object,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
page: {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
search: {
|
||||||
|
bind: '',
|
||||||
|
keyword: '',
|
||||||
|
},
|
||||||
|
tableData: [],
|
||||||
|
colConfigs: [
|
||||||
|
{
|
||||||
|
prop: 'deviceName',
|
||||||
|
label: '任务名称',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'areaName',
|
||||||
|
label: '媒资类型',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'serialNo',
|
||||||
|
label: '级别',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'devStatus',
|
||||||
|
label: '播发方式',
|
||||||
|
width: '100',
|
||||||
|
align: 'center',
|
||||||
|
render: (h, {row}) => {
|
||||||
|
return h('span', null, this.dict.getLabel('dlbDevStatus', row.devStatus))
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'bind',
|
||||||
|
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',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
slot: 'options',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
create() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
getList() {},
|
||||||
|
|
||||||
|
close(id) {
|
||||||
|
this.$confirm('确定停播该设备?').then(() => {
|
||||||
|
this.instance.post(`/app/appdlbquipment/stop?deviceId=${id}`).then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('停播成功!')
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
cancel(isRefresh) {
|
||||||
|
this.$emit('change', {
|
||||||
|
type: 'List',
|
||||||
|
isRefresh: !!isRefresh,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.taskList {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user