|
@@ -25,10 +25,12 @@
|
|
|
<div class="popover-main">消息盒子</div>
|
|
|
<div class="popover-item" v-for="item in popoverData">
|
|
|
<p class="popover-title">
|
|
|
- {{item.title}}
|
|
|
- <span class="popover-type">[{{item.type}}]</span>
|
|
|
+ {{item.projectName}}
|
|
|
+ <span class="popover-type" v-if="item.noticeType == 0">[审批]</span>
|
|
|
+ <span class="popover-type" v-else-if="item.noticeType == 1">[警告]</span>
|
|
|
+ <span class="popover-type" v-else-if="item.noticeType == 2">[保养]</span>
|
|
|
</p>
|
|
|
- <p>{{item.article}}</p>
|
|
|
+ <p>{{item.content}}</p>
|
|
|
</div>
|
|
|
<router-link :to="'/message'" tag="div" class="popover-button">查看全部</router-link>
|
|
|
</el-popover>
|
|
@@ -188,23 +190,8 @@ export default {
|
|
|
passRule: {
|
|
|
password: [{ required: true, message: "请输入新密码", trigger: "blur" }]
|
|
|
},
|
|
|
- popoverData: [
|
|
|
- {
|
|
|
- title: "墨盒测试项目——零件文档",
|
|
|
- article: "模具开发人员:王有财已上传完毕,待您审核",
|
|
|
- type: "审批"
|
|
|
- },
|
|
|
- {
|
|
|
- title: "墨盒测试项目——零件文档",
|
|
|
- article: "您上传的文档未通过项目经理:张多金审批,请修改后重新上传",
|
|
|
- type: "审批"
|
|
|
- },
|
|
|
- {
|
|
|
- title: "墨盒测试项目——零件文档",
|
|
|
- article: "该模具需要保养,请前往处理",
|
|
|
- type: "保养"
|
|
|
- }
|
|
|
- ]
|
|
|
+ //消息数据
|
|
|
+ popoverData: []
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -271,9 +258,28 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- //消息提示
|
|
|
- loadNotice(){
|
|
|
-
|
|
|
+ //读取消息提示
|
|
|
+ loadNotice() {
|
|
|
+ this.http.post(
|
|
|
+ this.port.notice.list,
|
|
|
+ {},
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.popoverData = res.data.list;
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -281,6 +287,7 @@ export default {
|
|
|
var user = JSON.parse(this.user);
|
|
|
this.user = user;
|
|
|
this.sysUserName = user.username || "";
|
|
|
+ this.loadNotice();
|
|
|
} else {
|
|
|
this.$router.push("/login");
|
|
|
}
|