Commit 51340d16 authored by 杨思琦's avatar 杨思琦

fix: 跳转修改

parent 9867bba3
Pipeline #67903 passed with stages
...@@ -314,7 +314,7 @@ class NoticeIconView extends Component { ...@@ -314,7 +314,7 @@ class NoticeIconView extends Component {
this.renderSysPlatform(message); this.renderSysPlatform(message);
}; };
handlerUnknowDetail = (message, type) => { handlerUnknowDetail = (message, product, type) => {
// 需要有跳转路径 // 需要有跳转路径
if (!message.webPath) if (!message.webPath)
return notification.info({ message: '提示', duration: 3, description: '未配置跳转路径' }); return notification.info({ message: '提示', duration: 3, description: '未配置跳转路径' });
...@@ -343,11 +343,11 @@ class NoticeIconView extends Component { ...@@ -343,11 +343,11 @@ class NoticeIconView extends Component {
} }
params._source = '消息通知'; params._source = '消息通知';
params._target = message.webPath; params._target = message.webPath;
if (type) { if (product) {
if (/civweb4/.test(targetMenuPath)) return true; if (/civweb4/.test(targetMenuPath)) return true;
} }
sessionStorage.setItem('routerParams', JSON.stringify(params)); sessionStorage.setItem('routerParams', JSON.stringify(params));
window.history.pushState(params, '', `/civbase/${targetMenuPath}?v=${Date.now()}`); window.history.pushState(params, '', `/civbase/${targetMenuPath}${type ? '' : `?v=${Date.now()}`}`);
} }
render() { render() {
......
...@@ -41,7 +41,7 @@ const Alarm = ({ message, confirmRead, config, handlerUnknowDetail }) => { ...@@ -41,7 +41,7 @@ const Alarm = ({ message, confirmRead, config, handlerUnknowDetail }) => {
const alarmThreshold = message?.infoContent?.alarmThreshold; const alarmThreshold = message?.infoContent?.alarmThreshold;
const goPath = (item) => { const goPath = (item) => {
if(handlerUnknowDetail && handlerUnknowDetail(message, 'alarm')) { if(handlerUnknowDetail && handlerUnknowDetail(message, 'civweb4')) {
const widgetID = 'widget_city_综合运营_管网监控_实时监控_报警监控'; const widgetID = 'widget_city_综合运营_管网监控_实时监控_报警监控';
const webPath = 'product/scada/AlertMonitoring/AlertMonitoring'; const webPath = 'product/scada/AlertMonitoring/AlertMonitoring';
const widget = findPathByWidget( const widget = findPathByWidget(
...@@ -57,7 +57,7 @@ const Alarm = ({ message, confirmRead, config, handlerUnknowDetail }) => { ...@@ -57,7 +57,7 @@ const Alarm = ({ message, confirmRead, config, handlerUnknowDetail }) => {
url: widget.url || webPath, url: widget.url || webPath,
}); });
} else { } else {
handlerUnknowDetail(message); handlerUnknowDetail(message, null, 'alarm');
} }
} }
confirmRead(false, [message.id]); confirmRead(false, [message.id]);
......
...@@ -30,7 +30,7 @@ const Case = ({ message, confirmRead, handlerUnknowDetail }) => { ...@@ -30,7 +30,7 @@ const Case = ({ message, confirmRead, handlerUnknowDetail }) => {
const content = message?.infoContent?.content; const content = message?.infoContent?.content;
const goPath = item => { const goPath = item => {
if (handlerUnknowDetail && handlerUnknowDetail(message, 'case')) { if (handlerUnknowDetail && handlerUnknowDetail(message, 'civweb4')) {
const messageType = item.messType; const messageType = item.messType;
let label = ''; let label = '';
let widgetID = ''; let widgetID = '';
...@@ -60,7 +60,7 @@ const Case = ({ message, confirmRead, handlerUnknowDetail }) => { ...@@ -60,7 +60,7 @@ const Case = ({ message, confirmRead, handlerUnknowDetail }) => {
url: webPath, url: webPath,
}); });
} else { } else {
handlerUnknowDetail(message); handlerUnknowDetail(message, null, 'case');
} }
} }
confirmRead(false, [message.id]); confirmRead(false, [message.id]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment