|
@@ -9,10 +9,7 @@
|
|
|
<h3 class="headCompany">{{ user.corpname }}</h3>
|
|
|
</div>
|
|
|
<div class="headBtn">
|
|
|
- <el-popover placement="left-start" title="" width="400" trigger="hover">
|
|
|
- <div class="popover-content" v-html="html"></div>
|
|
|
- <el-button slot="reference"><span class="el-icon-message info_icon"></span></el-button>
|
|
|
- </el-popover>
|
|
|
+ <notice :list="noticeList" :total="total" @delete="noticeDelete"></notice>
|
|
|
<!-- <span class="mr14">|</span> -->
|
|
|
<!-- <a href="" class="mr14" style="color:red" title="云校招企业服务平台简明使用手册"> <span class="el-icon-question info_icon"></span> 帮助 </a> -->
|
|
|
<span class="mr14">|</span>
|
|
@@ -48,12 +45,15 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import notice from '@publics/src/components/notice.vue';
|
|
|
import { mapActions, mapState, mapMutations } from 'vuex';
|
|
|
const jwt = require('jsonwebtoken');
|
|
|
export default {
|
|
|
name: 'heads',
|
|
|
props: {},
|
|
|
- components: {},
|
|
|
+ components: {
|
|
|
+ notice,
|
|
|
+ },
|
|
|
data: () => ({
|
|
|
dialog: false,
|
|
|
form: {},
|
|
@@ -62,17 +62,26 @@ export default {
|
|
|
},
|
|
|
formLabelWidth: '120px',
|
|
|
html: '<ul class="popoverCon"><li>没有消息</li></ul><a class="popoverBtn">点击进入信息中心<span class="el-icon-d-arrow-right info_icon"></span></a>',
|
|
|
+ noticeList: [],
|
|
|
+ total: 0,
|
|
|
}),
|
|
|
created() {
|
|
|
this.setUser();
|
|
|
this.check();
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ $route: {
|
|
|
+ handler(val) {
|
|
|
+ this.getNoticeList();
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations(['setUser']),
|
|
|
- ...mapActions(['userOperation']),
|
|
|
+ ...mapActions(['userOperation', 'noticeOperation']),
|
|
|
check() {
|
|
|
if (!this.user.corpid) this.$router.push({ path: '/login' });
|
|
|
},
|
|
@@ -105,6 +114,19 @@ export default {
|
|
|
this.setUser(undefined);
|
|
|
this.$router.push('/login');
|
|
|
},
|
|
|
+ async getNoticeList() {
|
|
|
+ let result = await this.noticeOperation({ type: 'list', data: { userid: this.user.corpid, type: 1 } });
|
|
|
+ if (`${result.errcode}` === '0') {
|
|
|
+ this.$set(this, `total`, result.total);
|
|
|
+ this.$set(this, `noticeList`, result.data ? result.data : []);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async noticeDelete(id) {
|
|
|
+ let result = await this.noticeOperation({ type: 'delete', data: { id: id } });
|
|
|
+ if (`${result.errcode}` === '0') {
|
|
|
+ this.getNoticeList();
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -168,6 +190,11 @@ a {
|
|
|
.popover-content {
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
+ .el-col {
|
|
|
+ border-bottom: 1px dashed #cccccc;
|
|
|
+ font-size: 0.8rem;
|
|
|
+ height: 1.25rem;
|
|
|
+ }
|
|
|
}
|
|
|
/deep/.el-popper {
|
|
|
border: 1px solid #ccc;
|