|
@@ -1,8 +1,9 @@
|
|
|
<template>
|
|
|
<div id="index">
|
|
|
<el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <span v-if="type == '1'">
|
|
|
+ {{ notice.content }}
|
|
|
+ <!--<el-col :span="24">
|
|
|
+ <span v-if="type == '1'">
|
|
|
学校
|
|
|
</span>
|
|
|
<span v-else-if="type == '2'">
|
|
@@ -11,7 +12,7 @@
|
|
|
<span v-else-if="type == '3'">
|
|
|
<class-index :dayList="dayList" :lessonList="lessonList" :classInfo="classInfo" />
|
|
|
</span>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -20,12 +21,14 @@
|
|
|
import _ from 'lodash';
|
|
|
import classIndex from './worker/index.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: notice } = createNamespacedHelpers('notice');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
|
- components: { classIndex },
|
|
|
+ components: {}, //classIndex
|
|
|
data: function() {
|
|
|
return {
|
|
|
+ notice: {},
|
|
|
type: '3',
|
|
|
lessonList: [
|
|
|
{ _id: '5f2a10297f40d16be433e81b', subname: '报道+开班仪式', day: '0', date: '2020-04-07', time: '13:30-16:30' },
|
|
@@ -104,8 +107,18 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.dealLesson();
|
|
|
+ this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
+ ...notice(['fetch', 'lookFetch']),
|
|
|
+ async search() {
|
|
|
+ const res = await this.fetch(this.noticeid);
|
|
|
+ if (res.errcode == '0') {
|
|
|
+ this.$set(this, `notice`, res.data);
|
|
|
+ const r = await this.lookFetch({ noticeid: this.noticeid, userid: this.userid });
|
|
|
+ if (r.errcode == '0') this.$toast.success('消息已确认');
|
|
|
+ }
|
|
|
+ },
|
|
|
dealLesson() {
|
|
|
let dl = _.cloneDeep(this.lessonList);
|
|
|
dl = _.groupBy(dl, 'date');
|
|
@@ -125,8 +138,11 @@ export default {
|
|
|
classid() {
|
|
|
return this.$route.query.classid;
|
|
|
},
|
|
|
- infoid() {
|
|
|
- return this.$route.query.infoid;
|
|
|
+ noticeid() {
|
|
|
+ return this.$route.query.noticeid;
|
|
|
+ },
|
|
|
+ userid() {
|
|
|
+ return this.$route.query.userid;
|
|
|
},
|
|
|
},
|
|
|
metaInfo() {
|