From f3d1f2d610fc02b02455e114232bf16825858d86 Mon Sep 17 00:00:00 2001 From: xudanya <707166741@qq.com> Date: Thu, 24 Mar 2022 20:01:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B4=A7=E6=80=A5=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/publish/urgentMessage.js | 19 +- src/views/device/index.vue | 10 +- .../publishContent/urgentMessage/index.vue | 170 ++++++++++++++---- 3 files changed, 152 insertions(+), 47 deletions(-) diff --git a/src/api/publish/urgentMessage.js b/src/api/publish/urgentMessage.js index b32f8ed..f77bccc 100644 --- a/src/api/publish/urgentMessage.js +++ b/src/api/publish/urgentMessage.js @@ -3,9 +3,18 @@ import request from '@/utils/request' // 编辑紧急发布 export function reqUrgentMessage(parameter) { - return request({ - url: 'api/release/getUrgentNoticeList', - method: 'get', - params: parameter - }) + return request({ + url: 'api/release/getUrgentNoticeList', + method: 'get', + params: parameter + }) } + +// 根据id查询紧急通知 +export function reqQueryMessage(parameter) { + return request({ + url: 'api/release/getNoticeById', + method: 'get', + params: parameter + }) +} \ No newline at end of file diff --git a/src/views/device/index.vue b/src/views/device/index.vue index b00a0d6..f42d14c 100644 --- a/src/views/device/index.vue +++ b/src/views/device/index.vue @@ -221,7 +221,7 @@ export default { device_name:'', is_state:'', page:1, - size:1 + size:3 }, total: 0, // device_id:'', @@ -263,10 +263,11 @@ export default { }, methods: { // 获取设备列表的数据 - getDevice(pager=1){ - this.queryInfo.page=pager + getDevice(){ + // this.queryInfo.page=pager const params = this.queryInfo ReqDeviceList(params).then(res => { + console.log(res) if(res.code==200) { this.deviceList=res.data.content this.total=res.data.totalElements @@ -310,7 +311,8 @@ export default { type: 'success' }) // 解绑时 如果一页设备只剩下一个 则返回上一页 - this.getDevice(this.deviceList.length>1?this.queryInfo.page:this.queryInfo.page-1) + this.getDevice() + // this.deviceList.length>1?this.queryInfo.page:this.queryInfo.page-1 } }) }).catch(()=>{ diff --git a/src/views/publishContent/urgentMessage/index.vue b/src/views/publishContent/urgentMessage/index.vue index 7fa82ea..67d4947 100644 --- a/src/views/publishContent/urgentMessage/index.vue +++ b/src/views/publishContent/urgentMessage/index.vue @@ -46,7 +46,7 @@ - +
@@ -68,7 +68,7 @@ - + - + - + - - 所有设备 - 部分设备添加 + + 所有设备 + 部分设备添加 -
所有设备都将被发送
-
+
所有设备都将被发送
+
以下设备都将被发送总计{{ deviceTags.length }}个设备 @@ -145,21 +145,21 @@ - {{ tag }} + {{ tag.device_name}}
@@ -173,15 +173,15 @@ width="400px" > - {{ tag }} + {{ tag.device_name }}
@@ -190,7 +190,8 @@