Commit b98a991d authored by cuijiahao's avatar cuijiahao

fix: 云平台某行业无站点选择器

parent 6dfdec6f
This diff was suppressed by a .gitattributes entry.
...@@ -216,7 +216,7 @@ const renderSite = ({data, config, loading, setLoading, action}) => { ...@@ -216,7 +216,7 @@ const renderSite = ({data, config, loading, setLoading, action}) => {
onVisibleChange={visible => setVisible(visible)} onVisibleChange={visible => setVisible(visible)}
> >
{ {
Array.isArray(data.stations) && data.stations.length > 0 ? ( Array.isArray(data.stations) ? (
<div className={layoutStyles.toggleSite}> <div className={layoutStyles.toggleSite}>
<img src={require('../assets/basic/site.png')} className={layoutStyles.site}/> <img src={require('../assets/basic/site.png')} className={layoutStyles.site}/>
<span className={layoutStyles.name}>{data.currentStationName}</span> <span className={layoutStyles.name}>{data.currentStationName}</span>
......
...@@ -382,6 +382,7 @@ class Site { ...@@ -382,6 +382,7 @@ class Site {
} }
}) })
.catch(error => { .catch(error => {
this.setLoading(false);
message.warning('切换企业失败'); message.warning('切换企业失败');
}); });
} }
...@@ -400,10 +401,12 @@ class Site { ...@@ -400,10 +401,12 @@ class Site {
this.writeCookie(token, site); this.writeCookie(token, site);
} else { } else {
message.warning('企业切换失败,请联系管理员排查问题!'); message.warning('企业切换失败,请联系管理员排查问题!');
this.setLoading(false);
} }
}) })
.catch(e => { .catch(e => {
message.warning('企业切换失败,请联系管理员排查问题!'); message.warning('企业切换失败,请联系管理员排查问题!');
this.setLoading(false);
}); });
} }
......
...@@ -18,7 +18,8 @@ const industries = [ ...@@ -18,7 +18,8 @@ const industries = [
{ name: '农饮水', type: '农饮水', subTitle: 'RURAL POTABLE WATER' }, { name: '农饮水', type: '农饮水', subTitle: 'RURAL POTABLE WATER' },
{ name: '排水', type: '排水', subTitle: 'DRAINAGE' }, { name: '排水', type: '排水', subTitle: 'DRAINAGE' },
{ name: '能源', type: '能源', subTitle: 'ENERGY SOURCES' }, { name: '能源', type: '能源', subTitle: 'ENERGY SOURCES' },
{ name: '水资源', type: '水资源', subTitle: 'WATER RESOURCES' }, { name: '直饮水', type: '直饮水', subTitle: 'DRINGKING WATER' },
// { name: '水资源', type: '水资源', subTitle: 'WATER RESOURCES' },
{ name: '熊猫智能实验室', type: '实验室', subTitle: 'PANDA AI. LAB' }, { name: '熊猫智能实验室', type: '实验室', subTitle: 'PANDA AI. LAB' },
{ name: '大数据', type: '大数据', subTitle: 'BIG DATA' }, { name: '大数据', type: '大数据', subTitle: 'BIG DATA' },
{ name: '项目案例', type: '项目案例', subTitle: 'PROJECT CASE' }, { name: '项目案例', type: '项目案例', subTitle: 'PROJECT CASE' },
......
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