Commit 61be4530 authored by 程恺文's avatar 程恺文

fix:'水利集成登录页开发'

parent 589595ec
This diff was suppressed by a .gitattributes entry.
......@@ -22,6 +22,7 @@ import JianshiPage from './project/jianshi';
import XinyuanPage from './project/xinyuan';
import SuzhouPage from './project/suzhou';
import IntegrationNewPage from './integrationNew';
import SLPage from './project/SL';
export const guidePage = [
// type 为true 则需要 功能配置 isPanda 为true
{
......@@ -79,6 +80,11 @@ export const guidePage = [
value: 'wulaingyePage',
previewSrc: require('@/assets/images/integration/previewImg/五粮液.png'),
},
{
label: '水利集成登录',
value: 'SLPage',
previewSrc: require('@/assets/images/integration/previewImg/水利.png'),
},
{
label: '爱众液集成登录',
value: 'aizhongPage',
......@@ -128,4 +134,5 @@ export const BootPageTemplate = {
wulaingyePage: WuliangyePage,
aizhongPage: AizhongPage,
suzhouPage: SuzhouPage,
SLPage:SLPage
};
/*
* @Author: 634665781 634665781@qq.com
* @Date: 2024-02-26 10:02:27
* @LastEditors: 634665781 634665781@qq.com
* @LastEditTime: 2025-04-07 17:16:26
* @FilePath: \civ_hydrology\src\pages\projects\reservoir\monitorAR\BIContent\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import React, { useCallback, useEffect, useState } from 'react';
import styles from './index.less';
const getContent = () => {
const width = document.documentElement.clientWidth;
const height = document.documentElement.clientHeight;
return { width, height };
};
const BIContent = (props) => {
let { type = 'base', id } = props;
const [size, setSize] = useState(getContent());
const getStyle = (size) => {
if (!id) {
if (props.children.props) {
id = props.children.props.id;
} else {
props.children.map((v) => {
!id && v?.props?.id;
});
}
}
let element = document.getElementById(id);
if (!element) return {};
let BI_width = element.offsetWidth;
let BI_height = element.offsetHeight;
console.log(BI_width,BI_height,size,'BI_width,BI_heightBI_width,BI_height,size');
let elements = document.querySelector('aside'); //(".panda-civ-3d-layout-slider-fixed");
let elements1 = document.querySelector(
`.panda-civ-${type}-global-page-header-header,.panda-console-base-pro-global-header`,
);
let elements2 = document.querySelector(
`.panda-civ-${type}-menu-item-children,.panda-console-base-tabs-nav`,
);
let Width = elements?.offsetWidth || 0;
let height =
(elements1?.offsetHeight || 0) + (elements2?.offsetHeight || 0);
return size
? {
transform: `scale(${(size.width - Width) / BI_width}, ${
(size.height - height) / BI_height
})`,
}
: {};
};
const onResize = useCallback(() => {
// 将".className"替换为要获取宽高的元素的类名
setTimeout(() => {
setSize(getContent());
}, 100);
}, []);
useEffect(() => {
// 目标元素
const targetElement = document.querySelector('aside');
// 创建观察器配置项
const config = { attributes: true }; // 只关注属性变化
// 创建 MutationObserver 实例并传入回调函数
const observer = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
if (
mutation.type === 'attributes' &&
mutation.attributeName === 'style'
) {
// console.log('元素宽度发生了变化');
// 这里可以添加其他处理逻辑
setTimeout(() => {
onResize();
}, 300);
}
});
});
// 开始观察目标元素
targetElement&& observer.observe(targetElement, config);
onResize();
window.addEventListener('resize', onResize);
return () => {
window.removeEventListener('resize', onResize);
};
}, []);
return (
<div className={styles.bIContent}>
<div style={getStyle(size)} className={styles.shrink_box}>
{props.children}
</div>
</div>
);
};
export default BIContent;
.bIContent {
// position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999;
user-select: none;
.shrink_box {
transform-origin: left top;
// width: 1920px;
// height: 1080px;
width: 100%;
height: 100%;
transition: 0.3s all;
}
}
\ No newline at end of file
/*
* @Author: 634665781 634665781@qq.com
* @Date: 2025-04-08 09:12:30
* @LastEditors: 634665781 634665781@qq.com
* @LastEditTime: 2025-04-08 16:12:47
* @FilePath: \CivWeb\src\pages\bootpage\template\project\SL\MySwiper.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import React, { useRaf } from 'react';
import { Swiper, SwiperSlide } from 'swiper/react';
import SwiperCore, { Autoplay, EffectCoverflow } from 'swiper/core';
import { getImageUrl, searchUrl } from '@/utils/utils';
import styles from './index.less';
import 'swiper/swiper-bundle.min.css'; // 主样式文件‌:ml-citation{ref="1,2" data="citationList"}
//import 'swiper/components/effect-coverflow/effect-coverflow.scss'; // 3D 效果模块样式‌:ml-citation{ref="5" data="citationList"}
SwiperCore.use([EffectCoverflow, Autoplay]); // 手动注册模块‌:ml-citation{ref="1" data="citationList"}
import 防汛 from './img/防汛-轮播.png';
import 高亮 from './img/高亮框.png';
import 灌区 from './img/灌区-轮播.png';
import 河湖 from './img/河湖-轮播.png';
import 水库 from './img/水库-轮播.png';
import 水资源调度 from './img/水资源调度-轮播.png';
const MySwiper = props => {
let { swiperRef, onLink,integrationData,loginAction } = props;
const data =[]
for(var i in integrationData) {
data.push({
id: integrationData[i].id, image:integrationData[i].backgroundImage? getImageUrl(integrationData[i].backgroundImage):'', name: integrationData[i].name
})
}
/*const data = [
{ id: 1, image: 防汛, name: '防汛决策' },
{ id: 2, image: 灌区, name: '智慧灌区' },
{ id: 3, image: 河湖, name: '智慧河湖' },
{ id: 4, image: 水库, name: '水库平台' },
{ id: 5, image: 水资源调度, name: '水资源调度' },
// ...更多图片数据
]; */
console.log(data,'datadatadata');
return (
<Swiper
onSwiper={swiper => {
swiperRef.current = swiper;
// 鼠标悬浮暂停效果
swiper.$el[0].addEventListener('mouseover', () => swiper.autoplay.stop());
// 鼠标移开后继续自动滚屏效果
swiper.$el[0].addEventListener('mouseleave', () => {
swiper.autoplay.start()
});
}}
effect="coverflow"
slidesPerView={2} // 同时显示3张幻灯片‌:ml-citation{ref="5" data="citationList"}
loop={true}
autoplay={{ delay: 1000*8 }}
slidesPerGroup={1} // 每次滑动移动1张(避免跳跃)
spaceBetween={2} // 卡片间距固定值
centeredSlides={true} // 中心对齐
coverflowEffect={{
rotate: -15, // 侧边卡片旋转角度‌:ml-citation{ref="5" data="citationList"}
stretch: 0, // 卡片间距拉伸比例‌:ml-citation{ref="5" data="citationList"}
depth: 150, // 层叠深度(值越大3D效果越明显)‌:ml-citation{ref="5" data="citationList"}
modifier: 2, // 效果强度系数‌:ml-citation{ref="5" data="citationList"}
slideShadows:false, // 启用投影效果‌:ml-citation{ref="5" data="citationList"}
}}
>
{data.map(item => (
<SwiperSlide key={item.id}>
<img
title={`点击${item.name}跳转`}
onClick={() => {
item.name ? onLink(integrationData[item.name], loginAction) : null;
}}
src= {item.image?('http://192.168.10.168:8688'+item.image):null}
alt={`Image ${item.id}`}
style={{ height: 'auto' }}
/>
<span style={{ background: `url(${高亮}) center/100% 100% no-repeat` }} className={styles.阴影}></span>
</SwiperSlide>
))}
</Swiper>
);
};
export default MySwiper;
/* eslint-disable prettier/prettier */
import Icon1 from "@/assets/images/integration/wuliangye/1.png";
import Icon2 from "@/assets/images/integration/wuliangye/2.png";
import Icon3 from "@/assets/images/integration/wuliangye/3.png";
import Icon4 from "@/assets/images/integration/wuliangye/4.png";
import Icon5 from "@/assets/images/integration/wuliangye/5.png";
import Icon6 from "@/assets/images/integration/wuliangye/6.png";
import Icon7 from "@/assets/images/integration/wuliangye/7.png";
import Icon8 from "@/assets/images/integration/wuliangye/8.png";
import Icon9 from "@/assets/images/integration/wuliangye/厂区一张图.png";
import Icon10 from "@/assets/images/integration/wuliangye/驾驶舱.png";
import Icon11 from "@/assets/images/integration/wuliangye/三维模型.png";
import Icon12 from "@/assets/images/integration/wuliangye/园区一张图.png";
export default {
modalConfig: [
{ name: '再生水厂', bgImg: Icon1 },
{ name: '智能控制', bgImg: Icon2 },
{ name: '设备巡检', bgImg: Icon3 },
{ name: '维修工单', bgImg: Icon4 },
{ name: '', bgImg: '' },
{ name: '资产管理', bgImg: Icon5 },
{ name: '管网GIS', bgImg: Icon6 },
{ name: '报警中心', bgImg: Icon7 },
{ name: '系统设置', bgImg: Icon8 }
],
BIConfig: [
{ name: '领导驾驶舱', icon: Icon10 },
{
name: '三维模型', icon: Icon11
},
{ name: '厂区一张图', icon: Icon9 },
{ name: '园区一张图', icon: Icon12 },
]
}
\ No newline at end of file
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
/* eslint-disable indent */
/* eslint-disable react/jsx-first-prop-new-line */
/* eslint-disable jsx-a11y/alt-text */
/* eslint-disable prettier/prettier */
import { appService } from '@/api';
import { FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons';
import { message, Button } from 'antd';
import classNames from 'classnames';
import { debounce } from 'lodash';
import { searchUrl } from '@/utils/utils';
import React, { useRef, useEffect, useState, useMemo } from 'react';
import backImg from '@/assets/images/demonstration/返回.png';
import arrowLeftImg from '@/assets/images/demonstration/左箭头.png';
import LoadPage from '@/components/LoadPage';
import { connect } from 'react-redux';
import { actionCreators } from '@/containers/App/store';
import { getWebSiteConfig } from '@/api/service/base';
import axios from 'axios';
import { useHistory, useAliveController } from '@wisdom-utils/runtime';
import Cookies from 'js-cookie';
import { store } from '@wisdom-utils/utils';
import LoginAction from '@/pages/user/login/login';
import { defaultApp } from '@/micro';
import BIContent from './BIContent'
import titleIcon from "./img/标题.png";
import Icon10 from "@/assets/images/integration/wuliangye/酒瓶.png";
import tipIcon from "@/assets/images/integration/wuliangye/tip框.png";
import BGIcon from "./img/水利.png";
import 一底板 from "./img/一底板.png";
import 七能力 from "./img/七能力.png";
import N场景 from "./img/N场景.png";
import 轮播图左 from "./img/轮播图左.png";
import 轮播图右 from "./img/轮播图右.png";
import 底板 from './img/底板.png'
import 能力 from './img/能力.png'
import 场景 from './img/场景.png'
import dxIcon from "@/assets/images/integration/wuliangye/动效1.gif";
import dxIcon2 from "@/assets/images/integration/wuliangye/动效2.gif";
import styles from './index.less';
import useFullScreen from '../../demonstration/components/useFullScreen';
import pageConfig from "./config";
import MySwiper from './MySwiper';
const { modalConfig, BIConfig } = pageConfig
const boxWidth = 1920;
const boxHeight = 930;
const IntegrationQinzhou = props => {
const integratedConfig = props.integratedConfig?.toObject
? props.integratedConfig.toObject()
: props.integratedConfig || {};
const swiperRef =useRef(null)
const [ref, isFullscreen, handleFullScreen, handleExitFullScreen] = useFullScreen(false);
const clientRef = useRef(props.global.client);
const jpRef = useRef();
const cardRef = useRef();
const integrationClient = integratedConfig?.client || window?.globalConfig?.client || 'city'; // 集成登录client
const [integrationData, setIntegrationData] = useState(JSON.parse(localStorage.getItem('integrationData')) || {}); // 所有子站
const loadingTime = integratedConfig?.loadingTime || 5;
const clientInfo = useRef({}); // 跳转子站信息
const history = useHistory();
const { clear } = useAliveController();
const timer2 = useRef(null);
const timer3 = useRef(null);
const progressRef2 = useRef(0);
// 退出
const exit = () => {
if (isFullscreen) {
handleExitFullScreen && handleExitFullScreen();
} else {
handleFullScreen && handleFullScreen();
}
};
const [boxSize, setBoxSize] = useState({
scale: 1,
boxHeight: 930,
});
const [linkUrl, setLinkUrl] = useState('');
const [jumpLoading, setJumpLoading] = useState(false);
const [progressValue2, setProgressValue2] = useState(0);
const [showBackBtn, setShowBackBtn] = useState(false); // 是否显示iframe 返回按钮,三维平台用
const [loginAction, setAction] = useState(() => new LoginAction(props));
const configName = '集成配置文件';
const jumpProgressStart = () => {
if (timer2.current) {
clearInterval(timer2.current);
timer2.current = null;
}
progressRef2.current = 0;
setProgressValue2(0);
timer2.current = setInterval(() => {
if (progressRef2.current < 97.5) {
progressRef2.current += 2.5;
setProgressValue2(progressRef2.current);
} else {
setProgressValue2(99);
timer2.current && clearInterval(timer2.current);
timer2.current = null;
}
}, 100);
};
const jumpProgressEnd = () => {
setProgressValue2(100);
timer2.current && clearInterval(timer2.current);
timer2.current = null;
};
const getData = async () => {
const token = props.global?.token || Cookies.get('token');
const client = integratedConfig?.client || sessionStorage.getItem('client') || props?.global?.client || '';
localStorage.setItem('integrationClient', client);
appService
.GetIntegrationConfig({
type: '集成登录',
userId: window.globalConfig.userInfo?.OID ?? null,
isEnable: true,
client,
})
.then(res1 => {
console.log('res1:', res1);
const list = res1.data || [];
const obj = {};
list.forEach(i => {
obj[i.name] = i;
});
list.length && localStorage.setItem('integrationData', JSON.stringify(obj));
setIntegrationData(obj);
});
};
const onResize = () => {
if (ref?.current) {
const { clientWidth, clientHeight } = ref.current;
if (!boxWidth || !boxHeight) return;
const xScale = clientWidth / boxWidth;
const yScale = clientHeight / boxHeight;
const poor = clientHeight / clientWidth - boxHeight / boxWidth;
let n = Math.min(xScale, yScale);
let bHeight = boxHeight;
if (poor > 0.05) {
bHeight = boxHeight + 30;
}
// 高度为偶数
bHeight = parseInt(bHeight, 10);
if (bHeight % 2 !== 0) {
bHeight += 1;
}
n = Number(n.toFixed(4));
setBoxSize({
scale: n,
boxHeight: bHeight,
});
if (jpRef?.current && n) {
const jpHeight = bHeight * n
const bl = (Math.abs(clientHeight - jpHeight)) / 2
jpRef.current.style.bottom = `${(184 - bl)}px`
}
if (cardRef?.current && n) {
const jpHeight = bHeight * n
const bl = (Math.abs(clientHeight - jpHeight)) / 2
cardRef.current.style.bottom = `-${(bl)}px`
}
}
};
const startTiming = (time = 2) => {
if (timer3.current) {
clearInterval(timer3.current);
timer3.current = null;
}
timer3.current = setTimeout(() => {
setJumpLoading(false);
timer2.current && clearInterval(timer2.current);
timer2.current = null;
}, time * 1000);
};
const toRevenue = async item => {
setJumpLoading(true);
jumpProgressStart();
startTiming(10);
window.jumpLoadingProgress = 99;
try {
const res = await appService.getTicketByToken({ token: window.globalConfig?.token });
if (res.code === 0) {
// 营收是api-bcs,直饮水是api-ddw
// /api-ddw/sysUser/ssoGCK
// res.data = 'e44a2883a2ac4c4b8c8f1186cf27ca1dcc406c1dda1247cabe04bff3c06d28e7'; // 测试token
const apiPath = `${item.url + (item.url.indexOf('?') > 0 ? '&' : '?') + item.paramValue}=${res.data}`;
if (item?.openOpt === '当前页打开') {
props.history.push('/thirdParty', { linkUrl: apiPath });
} else {
setJumpLoading(false);
jumpProgressEnd();
window.open(apiPath, '_blank');
}
} else {
res.msg && message.error(res.msg);
setJumpLoading(false);
jumpProgressEnd();
}
} catch (error) {
setJumpLoading(false);
jumpProgressEnd();
}
};
const toClient = async (item, loginA) => {
const token = props.global?.token || Cookies.get('token');
const cli = item.client;
const res = await getWebSiteConfig({
identity: token,
client: cli,
});
if (!res?.data?.[0]?.widgets?.length) {
message.error({
duration: 3,
content: '您没有该板块权限,请联系管理员',
});
return;
}
if (window.qiankunIsCache) {
store.set('event:dropCache');
}
Cookies.set('client', cli, {
expires: 86400000 / (24 * 60 * 60 * 1000),
path: '/',
});
sessionStorage.setItem('client', cli);
const currentProduct = `__global__recent_productIndex__micro_${window.location.hostname}_${window.globalConfig
?.client ?? 'city'}`;
sessionStorage.removeItem(currentProduct);
const currentProductNew = `__global__recent_productIndex__micro_${window.location.hostname}_${cli || 'city'}`;
sessionStorage.setItem(currentProductNew, 0);
// 用全局存跳转信息,跳转过程页面会刷新
window.clientInfo = item;
clientRef.current = cli;
const config = props.global;
config.uiwidgets = [];
config.widgets = [];
config.allWidgets = [];
window.qiankunStarted = false;
if (cli) {
config.client = cli;
}
setJumpLoading(true);
jumpProgressStart();
startTiming(loadingTime);
// window.jumpLoadingProgress = 99;
// if (loginA.globalConfig?.size === 0 && window.globalConfig) {
// loginA.updateConfig(window.globalConfig);
// }
loginA && loginA.getUserInfoAndConfig('', true);
};
const onLink = (item, loginA) => {
if (!item) return;
if (window.clientInfo) {
window.clientInfo = null;
}
const token = props.global?.token || Cookies.get('token');
if (!token) {
history.push(`/user/login?client=${integrationClient}`, { reload: true });
clear();
props.logout();
return;
}
const { url, client } = item;
if (item.subType === '内链' && client) {
toClient(item, loginA);
} else {
if (!url) return;
if (url?.indexOf('{userId}') >= 0) {
item.url = url.replace('{userId}', window.globalConfig?.userInfo?.OID);
}
let link = item.url;
if (item.paramName) {
link = `${item.url + (item.url.indexOf('?') > 0 ? '&' : '?') + item.paramName}=${window.globalConfig?.token}`;
}
if (item.subType === '外链') {
if (item.paramValue === 'ticket') {
toRevenue(item); // 去营收
return;
}
if (item?.openOpt === '当前页打开') {
props.history.push('/thirdParty', { linkUrl: url });
} else {
window.open(url, '_blank');
}
return;
}
axios({
url: link,
method: 'get',
dataType: 'json',
}).then(res => {
if (res?.data?.code === 0) {
if (item?.openOpt === '当前页打开') {
props.history.push('/thirdParty', { linkUrl: res.data?.data });
} else {
window.open(res.data?.data, '_blank');
}
}
});
}
};
useEffect(() => {
console.log('componentDidmount--come:');
getData();
window.addEventListener('resize', debounce(onResize, 300));
onResize();
return () => {
window.removeEventListener('resize', onResize);
timer2.current && clearInterval(timer2.current);
timer2.current = null;
timer3.current && clearInterval(timer3.current);
timer3.current = null;
};
}, []);
useEffect(() => {
const handleToggleIndustry = event => {
window.jumpLoadingProgress = 0;
let url = '';
if (window.clientInfo?.url && window.clientInfo.subType === '内链') {
url = searchUrl(window.clientInfo.url);
window.clientInfo = null;
}
props.history.push(`/?client=${clientRef.current || props.global.client}`);
props.updateCurrentIndex && props.updateCurrentIndex(0);
defaultApp(url);
setJumpLoading(false);
jumpProgressEnd();
};
const handleError = () => {
window.jumpLoadingProgress = 0;
setJumpLoading(false);
jumpProgressEnd();
};
loginAction.events.on('loginSuccess', handleToggleIndustry);
loginAction.events.on('loginError', handleError);
return () => {
loginAction && loginAction.events && loginAction.events.removeListener('loginSuccess', handleToggleIndustry);
loginAction && loginAction.events && loginAction.events.removeListener('loginError', handleError);
};
}, []);
const [currentSlide, setCurrentSlide] = useState(0);
const nextSlide = () => {
setCurrentSlide((prevSlide) => (prevSlide + 1) % 3);
};
const prevSlide = () => {
setCurrentSlide((prevSlide) => (prevSlide - 1 + 3) % 3);
};
useEffect(() => {
const interval = setInterval(nextSlide, 5000); // 每5秒切换一次
return () => clearInterval(interval);
}, []);
return (
<BIContent>
<div id='integrationQinzhou' className={classNames(styles.integrationQinzhou, 'integrationQinzhou')} style={{ background: `url(${BGIcon}) center/100% 100% no-repeat` }} ref={ref} >
{/* 动态特效 */}
{/* <div className={styles.DX1} style={{ background: `url(${dxIcon}) no-repeat center center` }} />
<div className={styles.DX2} style={{ background: `url(${dxIcon}) no-repeat center center` }} />
<div className={styles.DX3} style={{ background: `url(${dxIcon2}) no-repeat center center` }} />
<div className={styles.DX4} style={{ background: `url(${dxIcon2}) no-repeat center center` }} /> */}
{jumpLoading ? (
<div className={styles.integrationJumpLoad} key="jumpLoading">
<div style={{ width: '285px' }}>
<LoadPage percent={progressValue2 / 100} text="页面加载中~" />
</div>
</div>
) : null}
{!linkUrl ? (
<div className={styles.integrationQinzhou_exit} onClick={exit}>
<Button type="text" style={{ color: '#fff', fontSize: '24px' }}>
{isFullscreen ? <FullscreenExitOutlined /> : <FullscreenOutlined />}
</Button>
</div>
) : null}
<div
className={styles.integration_content}
style={{
// width: boxWidth,
//height: boxSize.boxHeight,
// transform: `scale(${boxSize.scale}) translate(-50%,-50%)`,
width:'100%',
height:'100%'
}}
>
<div className={styles.integrationQinzhou_title}>
<img src={titleIcon} />
</div>
<div className={styles.top_}>
<img src={require('./img/标题箭头左.png')}></img>
<img src={require('./img/数字化映射.png')}></img>
<img src={require('./img/智慧化模拟.png')}></img>
<img src={require('./img/精准化决策.png')}></img>
<img src={require('./img/标题箭头右.png')}></img>
</div>
<div className={styles.con_}>
<div style={{ background: `url(${轮播图左}) center/100% 100% no-repeat` }} onClick={prevSlide}>
<img onClick={()=>{
swiperRef.current.slidePrev();
}} src={require('./img/轮播左箭头.png')}></img>
</div>
<div className={styles.轮播图}>
<MySwiper loginAction={loginAction} integrationData={integrationData} onLink={onLink} swiperRef={swiperRef}></MySwiper>
</div>
<div style={{ background: `url(${轮播图右}) center/100% 100% no-repeat` }} onClick={nextSlide}>
<img onClick={()=>{
swiperRef.current.slideNext();
}} src={require('./img/轮播右箭头.png')}></img>
</div>
</div>
<div className={styles.bom_}>
<div style={{ background: `url(${一底板}) center/100% 100% no-repeat` }}>
数据接入统一化
<img src={底板}></img>
</div>
<div style={{ background: `url(${七能力}) center/100% 100% no-repeat` }}>
系统赋能智能化
<img src={能力}></img>
</div>
<div style={{ background: `url(${N场景}) center/100% 100% no-repeat` }}>
智慧应用多元化
<img src={场景}></img>
</div>
</div>
</div>
{
linkUrl && showBackBtn ? (
<div
className={classNames(styles.iframeExit, 'animate__animated', 'animate__fadeIn')}
onClick={() => setLinkUrl('')}
>
<div className={styles.iframeBackLeft}>
<img src={arrowLeftImg} alt="返回" />
</div>
<div className={styles.iframeExitIcon}>
<img src={backImg} alt="返回" />
返回
</div>
</div>
) : null
}
</div >
</BIContent>
);
};
const mapStateToProps = state => ({
global: state.getIn(['global', 'globalConfig']),
integratedConfig: state.getIn(['global', 'integratedConfig']),
});
const mapDispatchToProps = dispatch => ({
updateConfig(config) {
dispatch(actionCreators.getConfig(config));
},
createContext(data) {
dispatch(actionCreators.createContext(data));
},
updateCurrentIndex(index) {
dispatch(actionCreators.updateCurrentIndex(index));
},
logout() {
dispatch(actionCreators.logout());
},
});
export default connect(
mapStateToProps,
mapDispatchToProps,
)(IntegrationQinzhou);
.integrationQinzhou {
/* 容器尺寸与透视 */
:global {.swiper-container {
width: 100%;
padding: 50px 0; /* 预留阴影空间‌:ml-citation{ref="5" data="citationList"} */
}
/*.swiper-slide.swiper-slide-active::after {
content: '';
position: absolute;
top: 48px; linear-gradient(0deg, #80FEFF) 10 10;
left: 35px;
right: 41px;
bottom: 37px;
box-shadow: 0px 5px 14px 2px rgba(0,30,47,0.8);
pointer-events: none;
clip-path: inset(-10px -10px 4% -10px);
} */
/* 卡片3D效果 */
.swiper-slide {
transform-style: preserve-3d; /* 启用3D变换‌:ml-citation{ref="7" data="citationList"} */
box-shadow: 0 15px 35px rgba(0,0,0,0.2); /* 增强立体感‌:ml-citation{ref="5" data="citationList"} */
}
.swiper-slide{
img{
width: 100%
}
}
.swiper-slide-active{
span{
display: block;
width: 774px;
height: 337px;
background: transparent;
position: absolute;
left: 7px;
z-index: 99;
top: 19px;
pointer-events: none;
}
/* span::before {
content: "";
position: absolute;
top: 9px;
left: 2px;
right: 2px;
bottom: -3px;
z-index: -1;
box-shadow: 0px 0 30px #80FEFF;
} */
}
}
.top_{
display: flex;
align-items: center;
justify-content: center;
margin-top: 56px;
>img:nth-child(2){
margin-left: 54px;
margin-right: 90px;
}
>img:nth-child(4){
margin-right: 54px;
margin-left: 90px;
}
}
.con_{
img{
cursor: pointer;
}
display: flex;
align-items: center;
justify-content: center;
.轮播图 {
width: 1600px;
perspective: 1000px; /* 添加透视效果 */
position: relative;
overflow: hidden;
height: 517px;
}
.轮播图__container {
width: 100%;
height: 100%;
display: flex;
transform-style: preserve-3d; /* 保持3D效果 */
transition: transform 0.5s ease-in-out; /* 添加过渡效果 */
}
.轮播图__item {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden; /* 隐藏背面 */
transition: transform 0.5s ease-in-out; /* 添加过渡效果 */
}
/* 示例:三个轮播项 */
.轮播图__item:nth-child(1) {
transform: rotateY(0deg) translateZ(400px);
width: 327px;
height: 468px;
}
.轮播图__item:nth-child(2) {
transform: rotateY(120deg) translateZ(400px);
width: 988px;
height: 528px;
}
.轮播图__item:nth-child(3) {
transform: rotateY(240deg) translateZ(400px);
width: 303px;
height: 490px;
}
>div:nth-child(1){
img{
width: 48px;
height: 46px;
margin-left: 8px;
}
width:108px;
height: 494px;
display: flex;
align-items: center;
background: url('./img/轮播图左.png') center/100% 100% no-repeat;
}
>div:nth-child(3){
img{
width: 48px;
height: 46px;
margin-right: 8px;
}
width:108px;
height: 494px;
display: flex;
align-items: center;
justify-content: right;
background: url('./img/轮播图右.png') center/100% 100% no-repeat;
}
}
.bom_{
font-family: Microsoft YaHei;
font-weight: bold;
font-size: 26px;
color: #00FFF6;
display: flex;
align-items: center;
margin-top: 80px;
img{
margin-left: 17px;
}
>div:nth-child(1){
width: 528px;
height: 84px;
background: url('./img/一底板.png');
padding-left: 280px;
padding-top: 26px;
}
>div:nth-child(2){
width: 528px;
height: 84px;
background: url('./img/七能力.png') ;
margin: 0 74px;
padding-left: 280px;
padding-top: 26px;
}
>div:nth-child(3){
width: 528px;
height: 84px;
background: url('./img/N场景.png') ;
padding-left: 280px;
padding-top: 26px;
}
}
width: 1920px;
position: relative;
height: 1080px;
overflow: hidden;
// ('@/assets/images/integration2/right.png')
background: url('./img/水利.png') center/100% 100% no-repeat;
.DX1 {
width: 256px;
height: 256px;
background-size: cover;
mix-blend-mode: screen;
position: absolute;
left: calc(30vw + 40px);
bottom: 130px;
}
.DX2 {
width: 256px;
height: 256px;
background-size: cover;
mix-blend-mode: screen;
position: absolute;
left: calc(50vw + 70px);
bottom: 200px;
}
.DX3 {
width: 243px;
height: 449px;
background-size: cover;
mix-blend-mode: screen;
position: absolute;
right: 0px;
bottom: 0px;
}
.DX4 {
width: 243px;
height: 449px;
background-size: cover;
mix-blend-mode: screen;
position: absolute;
left: 0px;
bottom: 0px;
}
.iframeExitIcon {
position: absolute;
top: 0;
left: -45px;
display: flex;
height: 44px;
width: 44px;
background: rgba(28, 94, 180, 0.95);
border-radius: 0 7px 7px 0;
flex-direction: column;
justify-content: space-around;
align-items: center;
font-size: 12px;
transition: all 0.2s;
padding: 3px 0;
img {
width: 17px;
height: 12px;
}
}
.iframeExit:hover {
.iframeExitIcon {
left: 0;
}
.iframeBackLeft {
left: -15px;
}
}
.iframeBackLeft {
position: absolute;
top: 0;
left: 0;
width: 14px;
height: 44px;
background: rgba(28, 94, 180, 0.95);
border-radius: 0 7px 7px 0;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s;
img {
width: 6px;
height: 11px;
}
}
.iframeExit {
width: 44px;
height: 44px;
position: absolute;
top: 4px;
left: 0;
color: #FFF;
cursor: pointer;
user-select: none;
position: absolute;
z-index: 110;
}
.integrationQinzhou_exit {
position: absolute;
right: 10px;
top: 10px;
z-index: 100;
}
.integration_content {
display: flex;
flex-direction: column;
align-items: center;
transform-origin: left top;
position: absolute;
// left: 50%;
// top: 50%;
padding: 0px 20px 10px;
}
.integration_row {
display: flex;
width: 100%;
overflow: hidden;
margin-bottom: 14px;
padding: 0px 20px;
.integration_row_title {
flex: none;
margin-right: 8px;
position: relative;
writing-mode: vertical-rl;
font-weight: bold;
font-size: 18px;
color: #fff;
line-height: 33px;
text-shadow: 0 0 18px rgba(0, 144, 255, 0.5);
display: flex;
align-items: flex-start;
justify-content: center;
letter-spacing: 3px;
padding-right: 30px;
}
.integration_row_list {
flex: 1;
display: flex;
align-items: center;
}
}
.showCenter {
position: absolute;
text-align: center;
align-items: center;
display: flex;
justify-content: center;
// top: calc(50vh - 290px);
bottom: 185px;
img {
width: 344px;
height: 580px;
}
}
.integrationTips {
display: flex;
position: relative;
justify-content: space-around;
width: 100%;
top: -11px;
height: 360px;
.integration_card {
text-align: center;
position: relative;
.integration_TitBG {
width: 200px;
height: 88px;
line-height: 88px;
background: url('@/assets/images/integration/wuliangye/tip框.png') center/100% 100% no-repeat;
font-family: Microsoft YaHei;
font-weight: bold;
font-size: 22px;
color: #FFFFFF;
text-shadow: 0px 0px 13px rgba(0, 156, 255, 0.5);
}
}
.integration_card[name='三维模型'] {
left: -57px;
top: 78px;
}
.integration_card[name='厂区一张图'] {
// left: -76px;
top: 78px;
right: -41px;
}
.integration_card[name='园区一张图'] {
right: 47px;
}
.integration_card[name='领导驾驶舱'] {
left: 41px;
}
}
.integration_row_col {
position: relative;
cursor: pointer;
}
.integration_row_col_text {
font-weight: bold;
font-size: 20px;
color: #FFFFFF;
transition: all 0.1s;
position: relative;
white-space: nowrap;
}
.integration_row_col_no {
filter: grayscale(100%) brightness(90%);
cursor: not-allowed;
}
.integration_row_col_link {
transition: transform 0.3s ease;
/* 平滑过渡 */
}
.integration_row_col_link:hover {
filter: brightness(120%);
transform: translateY(-10px);
}
// 业务应用start
.integration_row[type='业务应用'] {
overflow: hidden;
display: flex;
align-items: center;
.integration_row_list {
height: 100%;
padding-top: 6px;
flex: 1;
padding-left: 2px;
}
}
.integration_row_grid[type='业务应用'] {
display: flex;
justify-content: space-between;
width: 100%;
}
.integration_row_col[type='业务应用'] {
width: 194px;
height: 426px;
position: relative;
flex: none;
}
//基础平台end
.integrationQinzhou_title {
display: flex;
align-items: center;
justify-content: center;
margin-top: 48px;
// padding-top: 30px;
// padding-bottom: 30px;
&_left {
width: 372px;
height: 75px;
background: url('@/assets/images/integration2/left.png') center/100% 100% no-repeat;
}
&_text {
flex: none;
color: #fff;
span {
line-height: 97px;
color: #fff;
font-size: 50px;
font-weight: bold;
letter-spacing: 4px;
background: linear-gradient(0deg, #56A1EF 0%, #FFFFFF 59%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
position: relative;
// top: -8px;
font-weight: bolder;
padding: 0px 10px;
}
}
&_right {
width: 372px;
height: 75px;
background: url('@/assets/images/integration2/right.png') center/100% 100% no-repeat;
}
}
}
.integrationJumpLoad {
width: 100%;
height: 100%;
position: absolute;
display: flex;
align-items: center;
justify-content: center;
top: 0;
left: 0;
z-index: 1080;
padding-bottom: 50px;
background-color: rgba(0, 0, 0, 0.6);
}
.hide {
visibility: hidden;
}
@-webkit-keyframes scale-in-center {
0% {
-webkit-transform: scaleY(0);
transform: scaleY(0);
opacity: 1;
}
100% {
-webkit-transform: scaleY(1);
transform: scaleY(1);
opacity: 1;
}
}
@keyframes scale-in-center {
0% {
-webkit-transform: scaleY(0);
transform: scaleY(0);
opacity: 1;
}
100% {
-webkit-transform: scaleY(1);
transform: scaleY(1);
opacity: 1;
}
}
.scaleInCenter {
visibility: visible;
-webkit-animation: scale-in-center .3s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
animation: scale-in-center .3s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}
& :global {
.integrationQinzhou {
.anticon {
vertical-align: 0.125em;
}
}
}
\ 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