diff --git a/src/api/modules/http.js b/src/api/modules/http.js index 1cb9b0e..67596bb 100644 --- a/src/api/modules/http.js +++ b/src/api/modules/http.js @@ -864,7 +864,7 @@ export function theCirculation(query) { // 更新记录列表 export function updateListApi(data) { return request({ - url: 'autoSR/api/zkMessage/messagePage', + url: 'autoSR/api/zkMessage/findByPage', method: 'get', params: data }) @@ -892,4 +892,23 @@ export function updateDelApi(params) { method: 'get', params }) +} + +// 升级公告 +export function messageList(params) { + return request({ + url: 'autoSR/api/zkMessage/messageList', + method: 'get', + params + }) +} + + +// 升级公告更新阅读 +export function updateRead(params) { + return request({ + url: 'autoSR/api/zkMessage/updateFlag', + method: 'get', + params + }) } \ No newline at end of file diff --git a/src/main.js b/src/main.js index c98f5e4..57228ca 100644 --- a/src/main.js +++ b/src/main.js @@ -21,6 +21,10 @@ import basicContainer from './components/basic-container/main' import api from './api' +import 'echarts' +import ECharts from 'vue-echarts' +Vue.component('v-chart', ECharts) + import AudioPlayer from '@liripeng/vue-audio-player' // import '@liripeng/vue-audio-player/lib/vue-audio-player.css' diff --git a/src/page/index/top/index.vue b/src/page/index/top/index.vue index a34a146..84333eb 100644 --- a/src/page/index/top/index.vue +++ b/src/page/index/top/index.vue @@ -88,23 +88,43 @@ - + + + + + + + + + + + + + + + + + + + { + console.log(res, 'asdkdakl;asdadl;skdasl;adskl;sadkl;dsak;ldsa;lksd') + if (res.success) { + this.gridData = res.data.list.records + } + }).catch(e => { + console.log(e) + }) + }, + // 跳转公告列表页面 + toMessageList() { + this.$router.push('/message') + }, + // 弹窗消息点击触发事件 + msgTaps(e) { + console.log(e, 'asdjilksajl') + return + + // 日报 + // this.$router.push('/reportExcel/dayReport') + // 周报 + // this.$router.push('/reportExcel/weekReport') + }, // 弹窗消息点击触发事件 msgTap(e) { console.log(e, 'asdjilksajl') - this.$router.push('/message') + this.$store.commit('setMessage', e) + this.$router.push('/message/detail') }, handleScreen() { diff --git a/src/router/page/index.js b/src/router/page/index.js index c35cb69..eaf0bdb 100644 --- a/src/router/page/index.js +++ b/src/router/page/index.js @@ -14,12 +14,36 @@ export default [{ path: '/wel', component: Layout, redirect: '/wel/index', - children: [{ - path: 'index', - name: '首页', - component: () => - import(/* webpackChunkName: "views" */ '@/page/wel') - }] + children: [ + { + path: 'index', + name: '首页', + component: () => + import(/* webpackChunkName: "views" */ '@/page/wel') + }, + { + path: '/message', + component: () => import(/* webpackChunkName: "views" */ '@/views/msg/index'), + name: '公告列表', + }, + + { + path: '/message/detail', + component: () => import(/* webpackChunkName: "views" */ '@/views/msg/detail'), + name: '公告详情', + }, + { + path: '/reportExcel/dayReport', + component: () => import(/* webpackChunkName: "views" */ '@/views/reportExcel/dayReport'), + name: '报告详情', // 日报 + }, + { + path: '/reportExcel/weekReport', + component: () => import(/* webpackChunkName: "views" */ '@/views/reportExcel/weekReport'), + name: '报告详情', // 周报 + } + + ] }, { path: '/lock', @@ -134,17 +158,4 @@ export default [{ isAuth: false } }, - - -{ - path: '/message', - component: () => import(/* webpackChunkName: "views" */ '@/views/msg/index'), - name: '公告列表', -}, - -{ - path: '/message/detail', - component: () => import(/* webpackChunkName: "views" */ '@/views/msg/detail'), - name: '公告详情', -} ] diff --git a/src/store/getters.js b/src/store/getters.js index d0f89ba..c2999da 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -22,6 +22,6 @@ const getters = { menuAll: state => state.user.menuAll, logsList: state => state.logs.logsList, logsLen: state => state.logs.logsList.length || 0, - logsFlag: (state, getters) => getters.logsLen === 0 + logsFlag: (state, getters) => getters.logsLen === 0, } export default getters diff --git a/src/store/index.js b/src/store/index.js index 2ea7545..1d05ec5 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -8,13 +8,22 @@ import getters from './getters' Vue.use(Vuex) const store = new Vuex.Store({ + state: { + messageObj: {}, // 信息对象 + }, modules: { user, common, logs, tags }, - getters + getters, + mutations: { + // 储存消息详情 + setMessage(state, obj) { + state.messageObj = obj + } + } }) export default store diff --git a/src/views/admin/log/msg.vue b/src/views/admin/log/msg.vue index fafdce1..53dc8dd 100644 --- a/src/views/admin/log/msg.vue +++ b/src/views/admin/log/msg.vue @@ -1,6 +1,6 @@