Browse Source

紧急发布新增 状态的改变

dev
xudanya 3 years ago
parent
commit
245bdc9e18
  1. 8
      src/api/publish/urgentMessage.js
  2. 18
      src/views/device/deviceConfig.vue
  3. 14
      src/views/device/index.vue
  4. 41
      src/views/publishContent/index.vue
  5. 1103
      src/views/publishContent/urgentMessage/index.vue

8
src/api/publish/urgentMessage.js

@ -26,4 +26,12 @@ export function reqEditMessage(parameter) {
method: 'post',
data: parameter
})
}
// 改变紧急通知的状态
export function reqChangeMessage(parameter) {
return request({
url: 'api/release/updateNoticeState',
method: 'post',
data: parameter
})
}

18
src/views/device/deviceConfig.vue

@ -195,18 +195,6 @@
<div class="setting_cont upload_img">
<el-form-item prop="startup_screen">
<UploadCover ref="childUpload" />
<!-- <el-upload
class="avatar-uploader"
action=""
:show-file-list="false"
:on-success="handleAvatarSuccess"
>
<img v-if="form.startup_screen" :src="form.startup_screen" class="avatar" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> -->
<!-- <el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt />
</el-dialog>-->
</el-form-item>
</div>
</div>
@ -416,7 +404,7 @@ export default {
message: '修改设备成功'
})
this.addFromVisible = false
this.getStartUpList()
this.getStartUpList(this.queryInfo.page)
}
})
} else {
@ -457,7 +445,7 @@ export default {
message: '清空成功',
type: 'success'
})
this.getStartUpList()
this.getStartUpList(this.deviceList.length>1?this.queryInfo.page:this.queryInfo.page-1)
}
}).catch(()=>{
this.$message({
@ -471,7 +459,7 @@ export default {
handleSizeChange(size) {
//
this.queryInfo.size = size
this.getPageList();
this.getStartUpList();
},
}
}

14
src/views/device/index.vue

@ -263,8 +263,8 @@ export default {
},
methods: {
//
getDevice(){
// this.queryInfo.page=pager
getDevice(pager=1){
this.queryInfo.page=pager
const params = this.queryInfo
ReqDeviceList(params).then(res => {
console.log(res)
@ -311,8 +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(()=>{
@ -351,7 +351,7 @@ export default {
});
}
this.addFromVisible=false
this.getDevice()
this.getDevice(this.queryInfo.page)
})
} else {
console.log('error submit!!')
@ -375,10 +375,10 @@ export default {
handleSizeChange(size) {
//
this.queryInfo.size = size
this.getPageList();
this.getDevice()
},
}
}
}
</script>
<style lang="scss" scoped>

41
src/views/publishContent/index.vue

@ -1,24 +1,35 @@
<template>
<div class="app-container">
<div class="content_warp">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="发布列表" name="first">
<el-tabs v-model="activeName"
@tab-click="handleClick">
<el-tab-pane label="发布列表"
name="first">
<PublistList />
</el-tab-pane>
<el-tab-pane label="发布历史" name="second">
<el-tab-pane label="发布历史"
name="second">
<HistoryList />
</el-tab-pane>
<el-tab-pane label="紧急通知" name="third">
<UrgentMessage />
<el-tab-pane label="紧急通知"
name="third">
<UrgentMessage ref="message" />
</el-tab-pane>
</el-tabs>
</div>
<div v-if="activeName !== 'third'" class="home_publish_btn">
<el-button round @click="publishHandle(0)">即时发布</el-button>
<el-button round type="primary" @click="publishHandle(1)">定时发布</el-button>
<div v-if="activeName !== 'third'"
class="home_publish_btn">
<el-button round
@click="publishHandle(0)">即时发布</el-button>
<el-button round
type="primary"
@click="publishHandle(1)">定时发布</el-button>
</div>
<div v-else class="home_publish_btn">
<el-button round>紧急发布</el-button>
<div v-else
class="home_publish_btn">
<el-button type="primary"
round
@click="addMessage">紧急发布</el-button>
</div>
</div>
</template>
@ -30,22 +41,26 @@ import UrgentMessage from './urgentMessage/index'
export default {
name: 'PublishContent',
components: { PublistList, HistoryList, UrgentMessage },
data() {
data () {
return {
activeName: 'first',
mulitText: '多选'
}
},
methods: {
handleClick(tab, event) {
handleClick (tab, event) {
console.log(tab, event)
},
publishHandle(index) {
publishHandle (index) {
this.$router.push(
{
path: '/release', query: { tag: index }
}
)
},
//
addMessage () {
this.$refs.message.addFormData()
}
}
}

1103
src/views/publishContent/urgentMessage/index.vue
File diff suppressed because it is too large
View File

Loading…
Cancel
Save