From 96f565bbe4dc43380c4229f3c03856d2b64a37ad Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Sat, 11 Jun 2022 14:36:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=92=AD=E5=8F=91=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/AppBroadcast/components/Detail.vue | 58 +++++++++++-------- .../device/AppBroadcast/components/List.vue | 40 +++++++------ .../components/taskList.vue | 6 +- .../device/AppMediaManage/components/Play.vue | 50 ---------------- 4 files changed, 59 insertions(+), 95 deletions(-) diff --git a/packages/device/AppBroadcast/components/Detail.vue b/packages/device/AppBroadcast/components/Detail.vue index ddd1681d..85e4f94f 100644 --- a/packages/device/AppBroadcast/components/Detail.vue +++ b/packages/device/AppBroadcast/components/Detail.vue @@ -11,23 +11,24 @@ - - - - - - - - - - + {{ $dict.getLabel('dlbMessageUrgency',info.messageLevel) }} - {{ $dict.getLabel('dlbDyclingType', info.cyclingType) }} + {{ info.taskType==1? '定时播放': '立即播放'}} + + + + + + ,{{dayList[item]}} + + + - 共10个设备 + 共{{info.devices.length}}个设备 + @getList="getDetail"> - + @@ -70,16 +69,23 @@ export default { search: {}, total: 0, colConfigs: [ - {prop: 'messageName', label: '设备名称', width: 400}, - {prop: 'messageType', label: '行政区划', align: 'center', dict: "dlbResourceType"}, - {prop: 'messageUrgency', label: '状态', align: 'center', dict: "dlbMessageUrgency"}, + {prop: 'name', label: '设备名称', width: 400}, + {prop: 'areaName', label: '行政区划', align: 'center'}, + {prop: 'devStatus', label: '状态', align: 'center', render: (h, { row })=>{ + return h('span',null,this.dict.getLabel('dlbDevStatus',row.devStatus)) + }}, ], + dayList: ['', '每周一', '每周二', '每周三', '每周四', '每周五', '每周六', '每周日'], + voiceList: [], } }, created() { - if(this.params.id) { - this.getDetail() - } + this.$dict.load('dlbMessageUrgency','dlbDyclingType','dlbDevStatus').then(()=>{ + if(this.params.id) { + this.getDetail() + } + }) + }, methods: { @@ -91,10 +97,16 @@ export default { }, getDetail() { this.instance.post(`/app/appzyvideobroadcast/queryDetailById?id=${this.params.id}`).then((res) => { - console.log(res); + if(res?.data) { + this.info = res.data + this.tableData = res.data.devices + this.total = res.data.devices.length + if(this.info.cyclingType == 2) { + this.info.cyclingDateList = this.info.cyclingDate.split(',') + } + } }) }, - getList() {}, } } diff --git a/packages/device/AppBroadcast/components/List.vue b/packages/device/AppBroadcast/components/List.vue index 9bd656b9..1b002801 100644 --- a/packages/device/AppBroadcast/components/List.vue +++ b/packages/device/AppBroadcast/components/List.vue @@ -5,15 +5,15 @@ - - - @@ -30,9 +30,9 @@ @selection-change="(v) => (ids = v.map((e) => e.id))"> - 复制 - 详情 - 复制 --> + 详情 + 撤回 @@ -63,19 +63,21 @@ export default { }, total: 0, search: { - messageName: '', - messageType: '', - messageUrgency: '', + sourceName: '', + cyclingType: '', + messageLevel: '', }, id: '', ids: [], colConfigs: [ - {prop: 'messageName', label: '媒资名称', width: 400}, - {prop: 'messageType', label: '媒资类型', align: 'center', dict: "dlbResourceType"}, - {prop: 'messageUrgency', label: '级别', align: 'center', dict: "dlbMessageUrgency"}, - {prop: 'taskType', label: '播发方式', align: 'center', dict: "dlbBroadTaskType"}, - {prop: 'startDate', label: '开始时间', align: 'center', width: 180}, - {prop: 'broadcastStatus', label: '状态', align: 'center', dict: "dlbBroadcastStatus"}, + {prop: 'sourceName', label: '媒资名称', width: 200}, + {prop: 'cyclingType', label: '媒资类型', align: 'center', dict: "dlbResourceType"}, + {prop: 'messageLevel', label: '级别', align: 'center', dict: "dlbMessageUrgency"}, + {prop: 'taskType', label: '播发方式', align: 'center', render: (h, {row}) => { + return h('span', null, (row.taskType == 1? '定时播放':'立即播放'))}, + }, + {prop: 'startTime', label: '开始时间', align: 'center', width: 180}, + // {prop: 'broadcastStatus', label: '状态', align: 'center', dict: "dlbBroadcastStatus"}, {prop: 'areaName', label: '地区', align: 'center'}, {prop: 'createUserName', label: '创建人', align: 'center'}, {slot: 'options'}, @@ -100,7 +102,7 @@ export default { created() { this.areaId = this.user.info.areaId - this.dict.load('dlbResourceType', 'dlbMessageUrgency', 'dlbBroadTaskType', 'dlbBroadcastStatus', 'dlbMessageUrgency').then(() => { + this.dict.load('dlbDyclingType', 'dlbMessageUrgency', 'dlbBroadTaskType', 'dlbBroadcastStatus', 'dlbMessageUrgency').then(() => { this.getList() this.loading = true }) @@ -108,7 +110,7 @@ export default { methods: { getList() { - this.instance.post(`/app/appzyvideobroadcast/getBroadcastRecords`, null, { + this.instance.post(`/app/appzyvideobroadcast/list`, null, { params: { ...this.page, ...this.search, @@ -140,8 +142,8 @@ export default { } }) }, - cancel(id) { - this.$confirm('确定撤回该广播?').then(() => { + reset(id) { + this.$confirm('确定要撤回该广播?').then(() => { this.instance.post(`/app/appzyvideobroadcast/getBroadcastRecall?broadcastId=${id}`).then((res) => { if (res.code == 0) { this.$message.success('撤回成功!') diff --git a/packages/device/AppEquipmentManage/components/taskList.vue b/packages/device/AppEquipmentManage/components/taskList.vue index b55652f8..7f6728b9 100644 --- a/packages/device/AppEquipmentManage/components/taskList.vue +++ b/packages/device/AppEquipmentManage/components/taskList.vue @@ -5,9 +5,9 @@ - + @clear=";(page.current = 1), (search.sourceName = ''), getList()" suffix-icon="iconfont iconSearch"/>