|
@@ -97,6 +97,10 @@ const { scrollIntoView, noticeList } = toRefs(state);
|
|
|
* @跳转相应类型系统
|
|
|
*/
|
|
|
function goContentDetails(e) {
|
|
|
+ //是否已读
|
|
|
+ if (!e.readFlag) {
|
|
|
+ updateMceReceiveStatus({ id: e.id });
|
|
|
+ }
|
|
|
if (e.infoType == 4) {
|
|
|
proxy.$tab.navigateTo(`/pages/business/fireIot/alarmManage/alarmDetails/index?contentId=${e.contentId}`).then(() => {});
|
|
|
} else if (e.infoType == 5) {
|
|
@@ -113,18 +117,27 @@ function goContentDetails(e) {
|
|
|
} else {
|
|
|
proxy.$tab.navigateTo(`/pages/business/common/projectMange/record/details?reportId=${e.moduleId}`);
|
|
|
}
|
|
|
- } else {
|
|
|
//通知公告
|
|
|
- if(e.infoType == 1){
|
|
|
- proxy.$tab.navigateTo(`/pages/common/appMessage/nociteDetails?moduleId=${e.moduleId}`).then(() => {});
|
|
|
- }else{
|
|
|
- proxy.$tab.navigateTo(`/pages/common/appMessage/details?contentId=${e.contentId}`).then(() => {});
|
|
|
+ }else if(e.infoType == 1){
|
|
|
+ proxy.$tab.navigateTo(`/pages/common/appMessage/nociteDetails?moduleId=${e.moduleId}`).then(() => {});
|
|
|
+ }else if(e.infoType == 3){//OA消息
|
|
|
+ console.log(e)
|
|
|
+ if(e.infoContent){
|
|
|
+ console.log(e.infoContent.includes("新的审批任务"))
|
|
|
+ if(e.infoContent){
|
|
|
+ if(e.infoContent.includes("新的审批任务")){
|
|
|
+ proxy.$common.toPage(2,"todo")
|
|
|
+ }else{
|
|
|
+ proxy.$common.toPage(2,"me")
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ proxy.$common.toPage(2,"todo")
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- //是否已读
|
|
|
- if (!e.readFlag) {
|
|
|
- updateMceReceiveStatus({ id: e.id });
|
|
|
+ }else{
|
|
|
+ proxy.$tab.navigateTo(`/pages/common/appMessage/details?contentId=${e.contentId}`).then(() => {});
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -145,37 +158,52 @@ function noticeDelete(e) {
|
|
|
* @api接口调用
|
|
|
*/
|
|
|
function init(obj) {
|
|
|
+ console.log(obj)
|
|
|
uni.setNavigationBarTitle({
|
|
|
title: obj.typeName ? obj.typeName : "消息列表",
|
|
|
});
|
|
|
|
|
|
state.loading = true;
|
|
|
- getMceList({
|
|
|
- size: state.size,
|
|
|
- current: state.current,
|
|
|
- infoType: obj?.type,
|
|
|
- })
|
|
|
- .then((requset) => {
|
|
|
- if (requset.status === "SUCCESS") {
|
|
|
- state.noticeList = requset.data.records;
|
|
|
- state.total = requset.data.total;
|
|
|
- state.loading = false;
|
|
|
+ if(obj.id){
|
|
|
+ if(obj.type == 3){
|
|
|
+ console.log(4444)
|
|
|
+ if(obj?.oaType){
|
|
|
+ proxy.$common.toPage(2,obj.oaType)
|
|
|
}
|
|
|
- setTimeout(() => {
|
|
|
- scrollIntoView.value = "bottomInfo";
|
|
|
- }, 0);
|
|
|
-
|
|
|
- if ("id" in obj) {
|
|
|
- state.noticeList.forEach((e) => {
|
|
|
- if (e.id == obj.id) {
|
|
|
- goContentDetails(e);
|
|
|
- }
|
|
|
+ }else{
|
|
|
+ getMceList({
|
|
|
+ size: 1,
|
|
|
+ current: 1,
|
|
|
+ infoId: obj.id,
|
|
|
+ infoType: obj?.type,
|
|
|
+ })
|
|
|
+ .then((requset) => {
|
|
|
+ goContentDetails(requset.data.records[0]);
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ state.loading = false;
|
|
|
});
|
|
|
}
|
|
|
+ }else{
|
|
|
+ getMceList({
|
|
|
+ size: state.size,
|
|
|
+ current: state.current,
|
|
|
+ infoType: obj?.type,
|
|
|
})
|
|
|
- .catch((err) => {
|
|
|
- state.loading = false;
|
|
|
- });
|
|
|
+ .then((requset) => {
|
|
|
+ if (requset.status === "SUCCESS") {
|
|
|
+ state.noticeList = requset.data.records;
|
|
|
+ state.total = requset.data.total;
|
|
|
+ state.loading = false;
|
|
|
+ }
|
|
|
+ setTimeout(() => {
|
|
|
+ scrollIntoView.value = "bottomInfo";
|
|
|
+ }, 0);
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ state.loading = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|