6.28 党建攻坚第二版

This commit is contained in:
jl-zhoujl2
2022-06-28 16:48:36 +08:00
parent 39fc4276ec
commit 918c790b06
24 changed files with 415 additions and 387 deletions

View File

@ -33,6 +33,7 @@
background-size: 100%;
display: flex;
align-items: flex-end;
cursor: pointer;
.carousel-textbg {
display: flex;
@ -54,16 +55,15 @@
.carousel-text-click {
font-size: 14px;
margin-left: 10px;
cursor: pointer;
}
.carousel-text-click:hover {
color: #fff;
text-decoration: underline;
}
}
}
}
.carousel-content:hover {
-webkit-filter: brightness(105%);
filter: brightness(105%);
}
}
.left-carousel .slick-dots-bottom {
@ -151,7 +151,7 @@
.left-graceful {
background: #fff;
padding: 24px 24px 50px;
padding: 16px 24px 50px;
.left-graceful-bg {
height: 198px;
@ -189,7 +189,7 @@
.left-project {
margin-top: 20px;
background: #fff;
padding: 24px 24px 40px;
padding: 16px 24px 40px;
.left-project-content {
display: flex;
@ -279,7 +279,7 @@
letter-spacing: 1px;
.right-display-content-percentage {
margin-left: 12px;
margin-left: 8px;
.right-display-content-percentage-increase {
color: #28e099;
@ -317,6 +317,10 @@
}
}
.right-display-content-pointer {
cursor: pointer;
}
}
.right-divider {
@ -352,7 +356,7 @@
.bottom-global {
margin: 0px 12px 84px;
background: #fff;
padding: 24px 24px 28px;
padding: 16px 24px 28px;
.left-card-top {
display: flex;
@ -468,6 +472,12 @@
vertical-align: text-bottom;
margin-left: 5px;
}
.bottom-close-icon {
transform: rotate(-90deg);
vertical-align: text-bottom;
margin-left: 5px;
}
}
}
}
@ -508,18 +518,23 @@
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
background: #eeeeee;
padding: 12px;
padding: 16px;
}
.topic-home-modal .ant-modal-content .ant-modal-body .bottom-modal-body {
display: flex;
flex-direction: column;
align-items: center;
.radio-group {
padding: 0 40px 8px;
width: 260px;
margin-bottom: 12px;
.radio-content {
font-size: 17.16px;
font-family: '黑体';
color: #939393;
margin-left: 12px;
margin-left: 16px;
}
}
@ -533,11 +548,18 @@
justify-content: space-between;
align-items: center;
margin-top: 8px;
width: 100%;
.submit-text {
color: #939393;
}
.submit-cancelbutton {
border-radius: 8px;
border-color: #d44026;
color: #d44026;
}
.submit-button {
border-radius: 8px;
background: #d44026;

View File

@ -20,8 +20,9 @@ import topic_header_img from '@/assets/topic/topic_header_img.png'
import topic_banner_default from '@/assets/topic/topic_banner_default.jpg'
import topic_activity_default from '@/assets/topic/topic_activity_default.jpg'
import { getHomeActivity, getHomeBanner, getHomeContact, getHomeGraceful, getHomeProject, getHomeRight, submitAdvice } from './service';
import { formatTime, getImageUrl } from '../utils';
import { formatTime, getImageUrl, isEmpty, isNotEmpty } from '../utils';
//卡片头
const LeftCardTop = (props: any) => {
return (
<>
@ -39,7 +40,7 @@ const LeftCardTop = (props: any) => {
</>
)
}
//右侧专业线标题
const RightDisplayTitle = (props: any) => {
return (
<div className='right-display-title'>
@ -47,11 +48,18 @@ const RightDisplayTitle = (props: any) => {
</div>
)
}
//右侧专业线内容
const RightDisplayContent = (props: any) => {
const displayContentClick = () => {
if (props.index == 0) {//党员数量
window.open("/partyMemberTopic/personInfor");
} else if (props.index == 1) {//党支部数量
window.open("/partyMemberTopic/partyBranch");
}
}
return (
props.data?.length > 0 ? (
<div className='right-display-content'>
<div className={props.index == 0 || props.index == 1 ? 'right-display-content right-display-content-pointer' : 'right-display-content'} onClick={() => displayContentClick()}>
<img src={props.img} className='right-display-content-img' />
<div className='right-display-content-right'>
<div className='right-display-content-title'>
@ -74,7 +82,7 @@ const RightDisplayContent = (props: any) => {
) : null
)
}
//右侧图表内容
const RightGraphContent = (props: any) => {
const random = Math.random().toString();
useEffect(() => {
@ -94,7 +102,7 @@ const RightGraphContent = (props: any) => {
data: props.data,
label: {
formatter: props.type != null ? `{b}\n\n{c}${props.type} {d}%` : '{b}',
fontSize: 14,
fontSize: '90%',
color: '#fff',
position: 'inner',
},
@ -114,7 +122,7 @@ const RightGraphContent = (props: any) => {
<div id={random} style={{ width: '100%', height: '100%' }}></div>
)
}
//活动联系人卡片内容
const BottomCardContent = (props: any) => {
return (
@ -124,7 +132,7 @@ const BottomCardContent = (props: any) => {
<div className='bottom-card-title'>
<Tooltip placement="topLeft" title={`${props.data.remark} ${props.data.contactName}`}>
<span>{props.data.contactName}</span>
<span className='bottom-card-title-type'>({props.data.remark})</span>
{isNotEmpty(props.data.remark) && <span className='bottom-card-title-type'>({props.data.remark})</span>}
</Tooltip>
</div>
@ -139,7 +147,7 @@ const BottomCardContent = (props: any) => {
</Col>
)
}
//活动联系人-我要提意见Modal
const CommentModal = (props: any) => {
const { TextArea } = Input;
const [modalLoading, setModalLoading] = useState<boolean>(false);
@ -161,7 +169,7 @@ const CommentModal = (props: any) => {
}
const onSubmit = async () => {
if (textRef.current == '' || textRef.current == null) {
if (isEmpty(textRef.current)) {
message.info("请先输入意见内容");
return;
}
@ -200,7 +208,7 @@ const CommentModal = (props: any) => {
footer={null}
centered
maskStyle={{ backgroundColor: 'rgba(0, 0, 0, 0.3)' }}
width={350}
width={450}
>
<Spin spinning={modalLoading}>
<div className='bottom-modal-body'>
@ -213,20 +221,23 @@ const CommentModal = (props: any) => {
</Radio.Group>
</div>
<TextArea
rows={6}
rows={11}
className='bottom-modal-textarea'
maxLength={50}
allowClear
showCount
defaultValue={''}
onChange={onTextChange}
placeholder="在这里输入我要提出的意见"
placeholder="在这里输入我要提出的意见最多输入50字"
/>
<div className='bottom-modal-submit'>
<span className='submit-text'>{props.data?.contactDepartment}{props.data?.contactName}</span>
<Button type='primary' className='submit-button' onClick={onSubmit}>
</Button>
<div>
<Button className='submit-cancelbutton' onClick={onCancel}>
</Button>
<Button type='primary' className='submit-button' onClick={onSubmit}>
</Button>
</div>
</div>
</div>
</Spin>
@ -333,7 +344,7 @@ const Home: React.FC<{}> = () => {
if (res?.code == 200) {
const data = Object.entries(res?.data);
if (data.length > 3) {
setContactData(data.slice(0, 6));
setContactData(data.slice(0, 3));
totalContactData.current = data;
} else {
setContactData(data);
@ -354,6 +365,15 @@ const Home: React.FC<{}> = () => {
window.open("/partyMemberTopic/newsDetail");
}
//other buttom onclick
const bottomOtherClick = (param: string) => {
if (param == '0') {
setContactData([...totalContactData.current]);
} else {
setContactData([...totalContactData.current.slice(0, 3)]);
}
}
useEffect(() => {
getBannerList();
getGracefulList();
@ -374,11 +394,11 @@ const Home: React.FC<{}> = () => {
<Carousel className='left-carousel' autoplay>
{bannerList?.length > 0 && bannerList.map(item => (
<div key={item.id}>
<div className='carousel-content' style={{ backgroundImage: `url(${item.imageUrl})` }}>
<div className='carousel-content' style={{ backgroundImage: `url(${item.imageUrl})` }} onClick={() => newsDetailClick(item)}>
<div className='carousel-textbg'>
<div className='carousel-text'>
<span className='carousel-text-content'>{item.imageWord}</span>
<span className='carousel-text-click' onClick={() => newsDetailClick(item)}></span>
<span className='carousel-text-click'></span>
</div>
</div>
</div>
@ -417,7 +437,7 @@ const Home: React.FC<{}> = () => {
<Col span={8} key={index}>
<div className='left-graceful-bg' style={{ backgroundImage: `url(${item.imageUrl})` }} onClick={() => newsDetailClick(item)}>
<div className='left-graceful-textbg'>
<span className='left-graceful-text'>{item.imageWord}</span>
<span className='left-graceful-text'>{item.title}</span>
</div>
</div>
</Col>
@ -473,7 +493,7 @@ const Home: React.FC<{}> = () => {
{item.dataClass}
</div>
<div className='right-graph-subtitle'>
{item.dataName != null && `${item.dataName}${item.dataValue}${item.dataType}`}
{isNotEmpty(item.dataName) && `${item.dataName}${item.dataValue}${item.dataType}`}
</div>
<div className='right-graph-content'>
<RightGraphContent name={item.dataClass} type={item.dataType} data={item.data} />
@ -496,11 +516,11 @@ const Home: React.FC<{}> = () => {
</div>
</div>
))}
{totalContactData.current != null && (
{contactData.length != 0 && contactData.length > 2 && (
<div className='bottom-other'>
<div>
<span className='bottom-other-text'></span>
<img src={topic_other} className='bottom-other-icon' />
<span className='bottom-other-text' onClick={() => bottomOtherClick(contactData.length > 3 ? '1' : '0')}>{contactData.length > 3 ? '收起' : '更多'}</span>
<img src={topic_other} className={contactData.length > 3 ? 'bottom-close-icon' : 'bottom-other-icon'} />
</div>
</div>
)}

View File

@ -7,7 +7,10 @@ export async function getHomeBanner() {
//活动风采列表
export async function getHomeGraceful() {
return request('/api/biz-service-ebtp-extend/v1/eventpartybranch/eventStyle/list');
return request('/api/biz-service-ebtp-extend/v1/eventpartybranch/eventStyle/list', {
method: 'POST',
data: {},
});
}
//活动宣言
@ -17,7 +20,10 @@ export async function getHomeActivity() {
//攻坚克难项目
export async function getHomeProject() {
return request('/api/biz-service-ebtp-extend/v1/eventpartybranch/eventSubject/list');
return request('/api/biz-service-ebtp-extend/v1/eventpartybranch/eventSubject/list', {
method: 'POST',
data: {},
});
}
//右侧专业线数据