Commit 30946ab0 authored by 周宏民's avatar 周宏民

fix: 演示功能入口修改

parent 4241b2af
...@@ -23,7 +23,7 @@ const BottomItem = props => { ...@@ -23,7 +23,7 @@ const BottomItem = props => {
</div> </div>
)); ));
}; };
const toPage = (e, url) => { const toPage = url => {
if (!isJump) return message.warning('该用户没有权限!'); if (!isJump) return message.warning('该用户没有权限!');
handToPage(url); handToPage(url);
}; };
...@@ -57,7 +57,7 @@ const BottomItem = props => { ...@@ -57,7 +57,7 @@ const BottomItem = props => {
</div> </div>
<div className={styles.list_item_info_wrap}> <div className={styles.list_item_info_wrap}>
<div className={styles.list_item_info_tip} type={col['所属行业']}> <div className={styles.list_item_info_tip} type={col['所属行业']}>
{col['所属行业']} {col['所属行业'] === '能源' ? '节水' : col['所属行业']}
</div> </div>
<div className={styles.list_item_info_name}> <div className={styles.list_item_info_name}>
<Tooltip title={col['客户名称']} color="#1685FF"> <Tooltip title={col['客户名称']} color="#1685FF">
......
...@@ -182,12 +182,11 @@ ...@@ -182,12 +182,11 @@
background: url('@{imgSrc}/供水.png') no-repeat center/100% 100%; background: url('@{imgSrc}/供水.png') no-repeat center/100% 100%;
} }
.list_item_info_tip[type='农饮水'] { .list_item_info_tip[type='水利'] {
background: url('@{imgSrc}/农水.png') no-repeat center/100% 100%; background: url('@{imgSrc}/农水.png') no-repeat center/100% 100%;
font-size: 10px;
} }
.list_item_info_tip[type='水利'] { .list_item_info_tip[type='能源'] {
background: url('@{imgSrc}/节水.png') no-repeat center/100% 100%; background: url('@{imgSrc}/节水.png') no-repeat center/100% 100%;
} }
......
...@@ -29,7 +29,7 @@ import { platformData } from './components/configData'; ...@@ -29,7 +29,7 @@ import { platformData } from './components/configData';
const boxWidth = 1920; const boxWidth = 1920;
const boxHeight = 911; const boxHeight = 911;
const projectType = ['供水', '排水', '农饮水', '水利']; const projectType = ['供水', '排水', '能源', '水利'];
const Demonstration = props => { const Demonstration = props => {
const onLineUrl = window.globalConfig?.mainserver || 'https://panda-water.cn/'; const onLineUrl = window.globalConfig?.mainserver || 'https://panda-water.cn/';
const showFullScreen = true; const showFullScreen = true;
...@@ -85,6 +85,7 @@ const Demonstration = props => { ...@@ -85,6 +85,7 @@ const Demonstration = props => {
const loginAction = new LoginAction({ ...props, global: config }); const loginAction = new LoginAction({ ...props, global: config });
loginAction && loginAction.getUserInfoAndConfig(failCallback, true, data.industry); loginAction && loginAction.getUserInfoAndConfig(failCallback, true, data.industry);
}; };
// 新产品跳转 // 新产品跳转
const handToProduct = data => { const handToProduct = data => {
if (!data.site) return message.warning('该用户没有权限!'); if (!data.site) return message.warning('该用户没有权限!');
...@@ -164,11 +165,18 @@ const Demonstration = props => { ...@@ -164,11 +165,18 @@ const Demonstration = props => {
}); });
}; };
const handToPage = (url, type) => { const handToPage = url => {
if (!url) return message.warning('该环境未配置,请联系管理员'); if (!url) return message.warning('该环境未配置,请联系管理员');
window.open(url, '_blank'); window.open(url, '_blank');
}; };
const handToPlatform = col => {
if (col['数值'] && col['数值'].includes('http')) {
handToPage(col['数值']);
}
handToProduct(col);
};
const renderCenter = useMemo(() => { const renderCenter = useMemo(() => {
let list = [...platformData]; let list = [...platformData];
list = list.map(l => { list = list.map(l => {
...@@ -183,14 +191,15 @@ const Demonstration = props => { ...@@ -183,14 +191,15 @@ const Demonstration = props => {
</div> </div>
); );
} }
const isJump = col.site || (col['数值'] && col['数值'].includes('http'));
return ( return (
<Tooltip title={col.site ? '点击体验' : ''} color="#1685FF"> <Tooltip title={isJump ? '点击体验' : ''} color="#1685FF">
<div <div
onClick={() => handToProduct(col)} onClick={() => handToPlatform(col)}
className={styles.center_col} className={styles.center_col}
style={{ flex: col.flex }} style={{ flex: col.flex }}
type={col.title} type={col.title}
isJump={col.site ? 'yes' : 'no'} isJump={isJump ? 'yes' : 'no'}
> >
<img src={require(`@/assets/demonstration/${col.icon}`)} alt="" /> <img src={require(`@/assets/demonstration/${col.icon}`)} alt="" />
{col.title} {col.title}
...@@ -331,7 +340,7 @@ const Demonstration = props => { ...@@ -331,7 +340,7 @@ const Demonstration = props => {
</div> </div>
{loading ? ( {loading ? (
<div className={styles.loadingWrap}> <div className={styles.loadingWrap}>
<div className={styles.loading} /> <div className={styles.loader} />
</div> </div>
) : null} ) : null}
{!loading ? ( {!loading ? (
......
...@@ -254,52 +254,81 @@ ...@@ -254,52 +254,81 @@
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 40%; top: 40%;
transform: translate(-50%, -20px); transform: translate(-50%, -38px);
} }
.loading { .loader {
display: block; animation: rotate 2s infinite;
position: relative; height: 50px;
width: 6px; width: 50px;
height: 10px;
animation: rectangle infinite 1s ease-in-out -0.2s;
background-color: #f6ff00;
} }
.loading:before, .loader:before,
.loading:after { .loader:after {
position: absolute; border-radius: 50%;
width: 6px;
height: 10px;
content: ""; content: "";
background-color: #f6ff00; display: block;
height: 20px;
width: 20px;
} }
.loading:before { .loader:before {
left: -14px; animation: ball1 2s infinite;
background-color: #fff;
box-shadow: 30px 0 0 #1685FF;
margin-bottom: 10px;
}
animation: rectangle infinite 1s ease-in-out -0.4s; .loader:after {
animation: ball2 2s infinite;
background-color: #1685FF;
box-shadow: 30px 0 0 #fff;
} }
.loading:after { @keyframes rotate {
right: -14px; 0% {
transform: rotate(0deg) scale(0.8)
}
animation: rectangle infinite 1s ease-in-out; 50% {
transform: rotate(360deg) scale(1.2)
}
100% {
transform: rotate(720deg) scale(0.8)
}
} }
@keyframes rectangle { @keyframes ball1 {
0% {
box-shadow: 30px 0 0 #1685FF;
}
50% {
box-shadow: 0 0 0 #1685FF;
margin-bottom: 0;
transform: translate(15px, 15px);
}
0%,
80%,
100% { 100% {
height: 20px; box-shadow: 30px 0 0 #1685FF;
box-shadow: 0 0 #f6ff00; margin-bottom: 10px;
}
}
@keyframes ball2 {
0% {
box-shadow: 30px 0 0 #fff;
} }
40% { 50% {
height: 30px; box-shadow: 0 0 0 #fff;
box-shadow: 0 -20px #f6ff00; margin-top: -20px;
transform: translate(15px, 15px);
}
100% {
box-shadow: 30px 0 0 #fff;
margin-top: 0;
} }
} }
\ No newline at end of file
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