| | |
| | | <template> |
| | | <div class="noticeBtn" @click="noticeBtn"> |
| | | <el-badge v-if="!view"> |
| | | <img src="img/notice/xiaoxi-png.png" style="width: 28px;height: 28px; display: flex;" /> |
| | | <img src="img/notice/xiaoxi-png.png" style="width: 26px;height: 26px; display: flex;" /> |
| | | </el-badge> |
| | | <el-badge v-if="view"> |
| | | <!-- <i class="el-icon-bell"></i> --> |
| | | <img src="img/notice/xiaoxi-gif.gif" style="width: 28px;height: 28px; display: flex;" /> |
| | | <img src="img/notice/xiaoxi-gif.gif" style="width: 26px;height: 26px; display: flex;" /> |
| | | </el-badge> |
| | | </div> |
| | | <!-- <el-popover placement="bottom" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { updateView, getList } from "@/api/task/reportForRepairs"; |
| | | import { updateView, getList } from "@/api/task/reportForRepairs" |
| | | let list = [{ |
| | | img: '/img/bg/vip1.png', |
| | | title: '史蒂夫·乔布斯 关注了你', |
| | |
| | | subtitle: '05-08 15:08', |
| | | status: 4, |
| | | tag: '已完成' |
| | | }]; |
| | | }] |
| | | export default { |
| | | name: "top-notice", |
| | | data() { |
| | |
| | | var values = { |
| | | viewType: 2 |
| | | } |
| | | var that = this; |
| | | var that = this |
| | | // 获取通知数量 |
| | | getList(1, 10, values).then((res) => { |
| | | const data = res.data.data; |
| | | that.total = data.total; |
| | | const data = res.data.data |
| | | that.total = data.total |
| | | if (that.total > 0) { |
| | | that.view = true |
| | | } else { |
| | |
| | | updateView(data).then((res) => { |
| | | }) |
| | | // 菜单跳转 |
| | | this.$router.push({ path: '/task/index' }); |
| | | this.$router.push({ path: '/task/index' }) |
| | | }, |
| | | createEventSource() { |
| | | this.baseUrl = `${window.location.protocol}//${window.location.host}` |
| | |
| | | pageChange(page, done) { |
| | | setTimeout(() => { |
| | | this.$message.success('页码' + page) |
| | | this.data = this.data.concat(list); |
| | | done(); |
| | | this.data = this.data.concat(list) |
| | | done() |
| | | }, 1000) |
| | | |
| | | }, |
| | | } |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |