From 542aee413b7632acab12b23923a843e6a555fb40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Mon, 20 Jun 2022 11:01:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/cpd.js | 31 +------ src/components/NoticeMsgBar/index.vue | 94 +++++--------------- src/store/modules/noticeMsg.js | 16 +--- src/views/myWork/message/index.scss | 12 ++- src/views/myWork/message/index.vue | 67 ++------------- src/views/myWork/message/notifyMsg.vue | 113 +++++++++++++++++++++++++ 6 files changed, 157 insertions(+), 176 deletions(-) create mode 100644 src/views/myWork/message/notifyMsg.vue diff --git a/src/api/cpd.js b/src/api/cpd.js index 3c1aa098..7038c9b0 100644 --- a/src/api/cpd.js +++ b/src/api/cpd.js @@ -2,36 +2,11 @@ import axios from '@/utils/request' import config from '@/common/config' -let base = config.getMallmBasePath(); +let base = config.getSysBasePath(); //export const getNoticeMsg = params => { return axios.get(`${base}/mallm/cpd/index/toHandleOrdersCount`, { params: params }); }; -export const getNoticeMsg = params => { - if(process.env.CONTEXT=='mallm'){ - return axios.get(`${base}/mallm/cpd/index/toHandleOrdersCount`, { params: params }); - }else{ - return new Promise((resolve, reject) => { - var res={ - data:{ - tips:{ - isOk:true, - msg:'请求成功' - }, - data:{ - toPayNum:0, - toSendNum:0, - toReceNum:0, - toApprovaNum:0, - hadApprovaNum:0, - hadFinishNum:0, - hadCloseNum:0, - hadCancelNum:0, - totalNum:0, - } - } - } - resolve(res) - }) - } +export const getNoticeMsg = params => { + return axios.get(`${base}/sys/notifyMsg/list`, { params: params }); }; diff --git a/src/components/NoticeMsgBar/index.vue b/src/components/NoticeMsgBar/index.vue index 110d46a0..0d3178a6 100644 --- a/src/components/NoticeMsgBar/index.vue +++ b/src/components/NoticeMsgBar/index.vue @@ -17,12 +17,10 @@ --> -
-
- - 消息中心 -
-
+ +
+ 消息中心 +
diff --git a/src/store/modules/noticeMsg.js b/src/store/modules/noticeMsg.js index 17ec7d7e..6a384e4f 100644 --- a/src/store/modules/noticeMsg.js +++ b/src/store/modules/noticeMsg.js @@ -1,16 +1,8 @@ const noticeMsg = { state: { - noticeMsg:{ - toPayNum:0, - toSendNum:0, - toReceNum:0, - toApprovaNum:0, - hadApprovaNum:0, - hadFinishNum:0, - hadCloseNum:0, - hadCancelNum:0, - totalNum:0, - }, + noticeMsg:[ + /**{id:'消息编号 主键',sendUserid:'操作人id',sendUsername:'操作人名字',operTime:'操作时间',objType:'对象类型:项目-1/任务-2/产品-3/需求-4/bug-5/迭代-6/团队-7',msg:'备注-完整描述',gloNo:'全局根踪号,用于跟踪日志',branchId:'机构编号',ip:'ip地址',bizId:'业务主键编号',pbizId:'对象上级编号,项目时填项目编号,任务时填项目编号,产品时填产品编号,需求时填产品编号,bug时填产品编号,迭代时填产品编号',bizName:'对象名称',toUserid:'接收用户编号',toUsername:'接收用户名称',hadRead:'是否已读'} */ + ], }, @@ -36,6 +28,6 @@ const noticeMsg = { var noticeMsgLocal=localStorage.getItem("noticeMsg"); if(noticeMsgLocal){ - noticeMsg.state.noticeMsg=Object.assign( noticeMsg.state.noticeMsg,JSON.parse(noticeMsgLocal)) + noticeMsg.state.noticeMsg=JSON.parse(noticeMsgLocal) } export default noticeMsg \ No newline at end of file diff --git a/src/views/myWork/message/index.scss b/src/views/myWork/message/index.scss index fd751905..44c8ddb1 100644 --- a/src/views/myWork/message/index.scss +++ b/src/views/myWork/message/index.scss @@ -1,8 +1,8 @@ .message_card { - font-size: 24px; + font-size: 18px; font-weight: bold; color: #303030; - line-height: 54px; + line-height: 30px; .message_type { cursor: pointer; margin-right: 58px; @@ -31,8 +31,9 @@ background: #fff; overflow: auto; cursor: pointer; - padding: 20px; + padding: 10px; .message_content_box { + padding:10px; .title { font-size: 18px; font-weight: bold; @@ -41,6 +42,7 @@ position: relative; } + .title::after { content: ""; position: absolute; @@ -69,4 +71,8 @@ opacity: 0.43; } } + + .message_content>.message_content_box:hover{ + background-color: #eee; + } } \ No newline at end of file diff --git a/src/views/myWork/message/index.vue b/src/views/myWork/message/index.vue index 25413686..dc4b7ddf 100644 --- a/src/views/myWork/message/index.vue +++ b/src/views/myWork/message/index.vue @@ -2,10 +2,7 @@
- 聊天消息 - 客服消息 - 审批流消息 - 任务消息 + 站内消息 内部公告 平台公告
@@ -14,13 +11,10 @@
-
-
- -
+
- +
@@ -40,68 +34,23 @@ import {listArchive} from '@/api/mdp/arc/archive' import archive from "./archive" import prichatIm from "./prichatIm" import groupIm from "./groupIm" +import notifyMsg from "./notifyMsg" export default { components:{ - archive,prichatIm,groupIm + archive,prichatIm,groupIm,notifyMsg, }, data() { return { - currentType: 1, - messageData: [ - { - type: '审批消息', - time: '2022-04-26 12:00:00', - text: '李孝基发起申请领用办公电脑,因工作要求,自己没有电脑所以申请使用公司现有的huaWei办公电脑' - }, - { - type: '系统消息', - time: '2022-04-26 12:00:00', - text: '李孝基发起申请领用办公电脑,因工作要求,自己没有电脑所以申请使用公司现有的huaWei办公电脑' - }, - { - type: '审批消息', - time: '2022-04-26 12:00:00', - text: '李孝基发起申请领用办公电脑,因工作要求,自己没有电脑所以申请使用公司现有的huaWei办公电脑' - }, - { - type: '审批消息', - time: '2022-04-26 12:00:00', - text: '李孝基发起申请领用办公电脑,因工作要求,自己没有电脑所以申请使用公司现有的huaWei办公电脑' - }, - { - type: '审批消息', - time: '2022-04-26 12:00:00', - text: '李孝基发起申请领用办公电脑,因工作要求,自己没有电脑所以申请使用公司现有的huaWei办公电脑' - }, - { - type: '审批消息', - time: '2022-04-26 12:00:00', - text: '李孝基发起申请领用办公电脑,因工作要求,自己没有电脑所以申请使用公司现有的huaWei办公电脑' - }, - - ], - - arcArchives:[], + currentType: 4, } }, - methods:{ - searcArchives(){ - var params={archiveType:'3'} - listArchive({}).then(res=>{ - this.arcArchives=res.data.data; - }) - }, - goToArchive(item){ - var curlDomain=window.location.protocol+"//"+window.location.host; // 返回https://mp.csdn.net - window.open(curlDomain+"/api/"+process.env.VERSION+"/arc/arc/archive/showArchive?id="+item.id) - } + methods:{ }, - mounted() { - this.searcArchives(); + mounted() { } } diff --git a/src/views/myWork/message/notifyMsg.vue b/src/views/myWork/message/notifyMsg.vue new file mode 100644 index 00000000..4c9709f8 --- /dev/null +++ b/src/views/myWork/message/notifyMsg.vue @@ -0,0 +1,113 @@ + + + + + \ No newline at end of file