diff --git a/src/api/publish/urgentMessage.js b/src/api/publish/urgentMessage.js index 2a43385..245dab9 100644 --- a/src/api/publish/urgentMessage.js +++ b/src/api/publish/urgentMessage.js @@ -4,8 +4,8 @@ import request from '@/utils/request' // 编辑紧急发布 export function reqUrgentMessage(parameter) { return request({ - url: 'api/release/editNotice', - method: 'post', - data: parameter + url: 'api/release/getUrgentNoticeList', + method: 'get', + params: parameter }) } \ No newline at end of file diff --git a/src/views/device/deviceConfig.vue b/src/views/device/deviceConfig.vue index 7c98c89..c0a993b 100644 --- a/src/views/device/deviceConfig.vue +++ b/src/views/device/deviceConfig.vue @@ -42,9 +42,9 @@ - + - {{ row.create_time | parseTime }} + {{ row.update_time | parseTime }} @@ -58,7 +58,19 @@ - + + + @@ -230,10 +242,11 @@ export default { device_id: '', device_name: '', is_state: '', - page: '1', - size: '3' + page: 1, + size: 3 }, - // 开关机列表的数据 + total:0, + // 开关机列表的数据 startUpList: [], form: { device_direction: null, @@ -312,11 +325,14 @@ export default { }, methods: { // 获取开关机列表 - getStartUpList() { + getStartUpList(pager=1) { + this.queryInfo.page=pager const params = this.queryInfo reqStartUpList(params).then(res => { if (res.code == 200) { this.startUpList = res.data.content + this.total=res.data.totalElements + this.queryInfo.size=res.data.size } else { return this.$message.error('获取设备列表失败!') } @@ -335,9 +351,9 @@ export default { if (row.open_weekly) { this.selectOpenWeekly = row.open_weekly.split(',') } - console.log(this.form.open_weekly) - console.log(typeof this.form.open_weekly) - console.log(this.selectOpenWeekly) + // console.log(this.form.open_weekly) + // console.log(typeof this.form.open_weekly) + // console.log(this.selectOpenWeekly) this.form.close_weekly = row.close_weekly if (row.close_weekly) { this.selectCloseweekly = row.close_weekly.split(',') @@ -409,9 +425,6 @@ export default { } }) }, - // handleAvatarSuccess(res, file) { - // this.form.startup_screen = res.data - // }, // 列表多选操作 - 清空btn状态 // 单选单个复选框 handleSelectionChange(sels) { @@ -429,7 +442,7 @@ export default { ids.push(item.device_id) }) // console.log(ids) - this.$confirm('确定要清空选中配置的周期和启动画面吗?','提示', { + this.$confirm('确定要清空选中的配置周期和启动画面吗?','提示', { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning", @@ -444,8 +457,8 @@ export default { message: '清空成功', type: 'success' }) - this.getDevice() - } + this.getStartUpList() + } }).catch(()=>{ this.$message({ message:'清空失败', @@ -453,7 +466,13 @@ export default { }) }) }) - } + }, + // 每条显示数据改变时的事件 + handleSizeChange(size) { + //整理参数 + this.queryInfo.size = size + this.getPageList(); + }, } } diff --git a/src/views/device/index.vue b/src/views/device/index.vue index c61696a..b00a0d6 100644 --- a/src/views/device/index.vue +++ b/src/views/device/index.vue @@ -78,9 +78,9 @@ 查看 - + - {{ row.create_time | parseTime}} + {{ row.update_time | parseTime}} @@ -97,18 +97,18 @@ - + - - + + @@ -220,8 +220,8 @@ export default { device_id:'', device_name:'', is_state:'', - page:'1', - size:'3' + page:1, + size:1 }, total: 0, // device_id:'', @@ -241,6 +241,7 @@ export default { form: { account: null, name: null, + orientation_name:null, orientation: null, device_id:'', orga_id:'1310000' @@ -262,13 +263,14 @@ export default { }, methods: { // 获取设备列表的数据 - getDevice(){ - // this.page=pager + getDevice(pager=1){ + this.queryInfo.page=pager const params = this.queryInfo ReqDeviceList(params).then(res => { if(res.code==200) { this.deviceList=res.data.content this.total=res.data.totalElements + this.queryInfo.size=res.data.size }else{ return this.$message.error('获取设备列表失败!') } @@ -280,9 +282,15 @@ export default { this.addFromVisible = true this.form.account = row.device_account this.form.name=row.device_name - this.form.orientation=row.device_direction==1?'竖屏':'横屏' + this.form.orientation_name=row.device_direction==1?'竖屏':'横屏' + this.form.orientation=row.device_direction this.form.device_id=row.device_id - // console.log(this.form.device_id) + }, + // 选择设备方向处理 + selectDirection(selVal) { + console.log(selVal) + this.form.orientation = selVal.key + this.form.orientation_name = selVal.name }, // 解绑 removeDevice(row){ @@ -301,7 +309,8 @@ export default { message: '解绑成功', type: 'success' }) - this.getDevice(this.deviceList.length>1?this.page:this.page-1) + // 解绑时 如果一页设备只剩下一个 则返回上一页 + this.getDevice(this.deviceList.length>1?this.queryInfo.page:this.queryInfo.page-1) } }) }).catch(()=>{ @@ -310,18 +319,6 @@ export default { type:'info' }) }) - // .catch(err => err) //用catch来捕获错误消息 - - // if ('cancel' === confirmRes) {//用户点击了取消 - // return this.$message.info('已经取消了删除') - // } - // if ('confirm' === confirmRes) { //用户点击了确认 - // ReqRemoveDevice(row.id).then(res=>{ - // console.log(res) - // }) - - // } - }, recordData(index, row) { @@ -372,6 +369,12 @@ export default { } }) }, + // 每条显示数据改变时的事件 + handleSizeChange(size) { + //整理参数 + this.queryInfo.size = size + this.getPageList(); + }, } } diff --git a/src/views/publishContent/historyList/index.vue b/src/views/publishContent/historyList/index.vue index 540d214..acee127 100644 --- a/src/views/publishContent/historyList/index.vue +++ b/src/views/publishContent/historyList/index.vue @@ -2,9 +2,9 @@ + -