6.27 集成

This commit is contained in:
jl-zhoujl2
2022-06-27 09:12:56 +08:00
parent 66fbfb9269
commit f17ebf9c5d
23 changed files with 630 additions and 143 deletions

View File

@ -1,8 +1,11 @@
import React, { useEffect } from 'react';
import React, { useEffect, useState } from 'react';
import '../Style/ld_style.less';
import { Input, List, Pagination } from 'antd';
import list_pic from '@/assets/topic/listNewsPic01.jpg'
import time_icon from '@/assets/topic/timeIcon.png'
import { getGracefulList } from './service';
import { getImageUrl } from '../utils';
import { history } from 'umi';
const { Search } = Input;
@ -29,13 +32,43 @@ const data = [
}
];
const PersonInfor: React.FC<{}> = () => {
//graceful data
const [gracefulList, setGracefulList] = useState<any[]>([]);
//get graceful
const getGracefulData = () => {
getGracefulList().then(async res => {
if (res?.code == 200) {
const data = await getImageUrl(res?.data, 'image');
setGracefulList(data);
}
})
}
//onclick
const clickTitle = (data: any) => {
sessionStorage.setItem("detailData", JSON.stringify(data));
history.push("/partyMemberTopic/newsDetail");
}
//to home
const toHome = () => {
history.push("/partyMemberTopic/home");
}
//goback lastpage
const toGoBack = () => {
window.history.go(-1);
}
useEffect(() => {
getGracefulData();
}, [])
return (
<div className="page-container">
<div className="top-banner">
<div className="back-home">
<span></span>
<span></span>
<span onClick={() => toHome()}></span>
<span onClick={() => toGoBack()}></span>
</div>
</div>
<div className="search">
@ -52,14 +85,20 @@ const PersonInfor: React.FC<{}> = () => {
<div className="list-content">
<List
itemLayout="horizontal"
dataSource={data}
pagination={{
onChange: page => {
console.log(page);
},
pageSize: 2,
}}
dataSource={gracefulList}
renderItem={item => (
<List.Item>
<div className="list-pic">
<img src={list_pic} />
<p className="tit"></p>
<p className="detail">线</p>
<span className="time"><img src={time_icon} />2022-05-01</span>
<img src={item.imageUrl} />
<p className="tit" onClick={() => clickTitle(item)}>{item.title}</p>
<p className="detail">{item.content}</p>
<span className="time"><img src={time_icon} />{item.sendTime}</span>
</div>
</List.Item>
)}

View File

@ -0,0 +1,6 @@
import request from '@/utils/request';
//活动风采列表
export async function getGracefulList() {
return request('/api/biz-service-ebtp-extend/v1/eventpartybranch/eventStyle/list');
}

View File

@ -0,0 +1,34 @@
import React, { useEffect } from 'react';
import '../Style/detailStyle.less';
import bannerProjectPic from '@/assets/topic/bannerProjectPic.jpg'
import { history } from 'umi'
const HardDetail: React.FC<{}> = () => {
//to home
const toHome = () => {
history.push("/partyMemberTopic/home");
}
return (
<div className="hard-news-global">
<div className="wrapBlock">
<div className="bannerBlock">
<img src={bannerProjectPic} alt="" />
</div>
<div className="backHomeBlock">
<span onClick={() => toHome()}></span>
</div>
<div className="contentBlock01">
<h3></h3>
<div className="informText01">
<p> 线 5G业务研发与试验5G网络和工业网络融合系统架构5G网络应用指标线5G统一接入网关和CPE终端设备</p>
<p>5G工业互联网试验验证平台UPF下沉到园区的5G本地专网方案AGV5G公网方案5G网络进行优化配置广</p>
<p>2021CUBE-Net3.0ICT融合服务CUBE-Net3.05G确定性网络关键技术5G高速率+5G和工业应用的深度融合</p>
<p>100</p>
</div>
</div>
</div>
</div>
)
}
export default HardDetail;

View File

@ -123,6 +123,12 @@
font-family: '黑体';
font-size: 18px;
color: #a2a2a2;
cursor: pointer;
}
.left-card-other:hover {
color: #369;
text-decoration: underline;
}
.left-card-otherimg {
@ -177,7 +183,7 @@
justify-content: left;
.left-project-content-list {
margin-left: 70px;
margin-left: 40px;
.left-project-content-item {
font-size: 21px;
@ -188,6 +194,11 @@
color: #535353
}
.left-project-content-item-title:hover {
color: #369;
text-decoration: underline;
}
.left-project-content-item-time {
color: #a2a2a2;
margin-left: 8px;
@ -217,6 +228,12 @@
.right-material {
width: 100%;
cursor: pointer;
}
.right-material:hover {
-webkit-filter: brightness(108%);
filter: brightness(108%);
}
.right-display {
@ -249,7 +266,7 @@
letter-spacing: 1px;
.right-display-content-percentage {
margin-left: 24px;
margin-left: 18px;
.right-display-content-percentage-increase {
color: #28e099;
@ -346,6 +363,12 @@
font-family: '黑体';
font-size: 18px;
color: #a2a2a2;
cursor: pointer;
}
.left-card-other:hover {
color: #369;
text-decoration: underline;
}
.left-card-otherimg {
@ -487,6 +510,7 @@
border-radius: 8px;
background: #d44026;
margin-left: 8px;
border-color: #d44026;
}
}
}

View File

@ -18,9 +18,7 @@ import topic_commodity from '@/assets/topic/topic_commodity.png'
import topic_protocol from '@/assets/topic/topic_protocol.png'
import topic_header_img from '@/assets/topic/topic_header_img.png'
import { getHomeActivity, getHomeBanner, getHomeContact, getHomeGraceful, getHomeProject, getHomeRight, submitAdvice } from './service';
import { getFilelist } from '@/services/download_';
import { pictureDisplayPath } from '@/utils/DownloadUtils';
import moment from 'moment';
import { formatTime, getImageUrl } from '../utils';
const LeftCardTop = (props: any) => {
return (
@ -30,7 +28,7 @@ const LeftCardTop = (props: any) => {
<span className='left-card-title'>{props.title}</span>
<img src={topic_red_flag} className='left-card-flag' />
</div>
<div>
<div onClick={() => window.open(props.url)}>
<span className='left-card-other'></span>
<img src={topic_other} className='left-card-otherimg' />
</div>
@ -158,6 +156,10 @@ const CommentModal = (props: any) => {
}
const onSubmit = async () => {
if (textRef.current == '' || textRef.current == null) {
message.info("请先输入意见内容");
return;
}
setModalLoading(true);
const params = {
contactName: props.data?.contactName,
@ -211,6 +213,7 @@ const CommentModal = (props: any) => {
maxLength={200}
defaultValue={''}
onChange={onTextChange}
placeholder="在这里输入我要提出的意见"
/>
<div className='bottom-modal-submit'>
<span className='submit-text'>{props.data?.contactDepartment}{props.data?.contactName}</span>
@ -244,22 +247,6 @@ const Home: React.FC<{}> = () => {
//bottom advice modal data
const [adviceItemData, setAdviceItemData] = useState<Object>({});
const getImageUrl = async (data: any[], paramName: string) => {
for (const ite of data) {
await getFilelist([ite[paramName]]).then(response => {//获取主图
if (response?.success && response?.data?.length > 0) {
const returnUrl = window.location.origin + pictureDisplayPath + '?filePath=' + response?.data[0].filePath;
ite["imageUrl"] = returnUrl;
}
})
}
return data;
}
const formatProjectTime = (time: string) => {
return moment(time).format('MM-DD HH:mm');
}
const openModal = (item: any) => {
setAdviceItemData(item);
setAdviceVisible(true);
@ -340,6 +327,18 @@ const Home: React.FC<{}> = () => {
})
}
//to hard project
const hardProjectClick = (data: any) => {
sessionStorage.setItem("detailData", JSON.stringify(data));
window.open("/partyMemberTopic/hardDetail");
}
//to hard project
const newsDetailClick = (data: any) => {
sessionStorage.setItem("detailData", JSON.stringify(data));
window.open("/partyMemberTopic/newsDetail");
}
useEffect(() => {
getBannerList();
getGracefulList();
@ -364,7 +363,7 @@ const Home: React.FC<{}> = () => {
<div className='carousel-textbg'>
<div className='carousel-text'>
<span className='carousel-text-content'>{item.imageWord}</span>
<span className='carousel-text-click'></span>
<span className='carousel-text-click' onClick={() => newsDetailClick(item)}></span>
</div>
</div>
</div>
@ -396,12 +395,12 @@ const Home: React.FC<{}> = () => {
</div>
<div className='left-card'>
<div className='left-graceful'>
<LeftCardTop title="活动风采" />
<LeftCardTop title="活动风采" url="/partyMemberTopic/activityStyle" />
<div>
<Row gutter={[20, 31]}>
{gracefulList?.length > 0 && gracefulList.map((item, index) => (
<Col span={8} key={index}>
<div className='left-graceful-bg' style={{ backgroundImage: `url(${item.imageUrl})` }}>
<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>
</div>
@ -412,7 +411,7 @@ const Home: React.FC<{}> = () => {
</div>
</div>
<div className='left-project'>
<LeftCardTop title="攻坚克难项目" />
<LeftCardTop title="攻坚克难项目" url="/partyMemberTopic/overDifficult" />
<div className='left-project-content'>
<img src={topic_project_picture} />
<div className='left-project-content-list'>
@ -423,8 +422,8 @@ const Home: React.FC<{}> = () => {
renderItem={item => (
<List.Item>
<div className='left-project-content-item'>
<span className='left-project-content-item-title'>{item.title}</span>
<span className='left-project-content-item-time'>{formatProjectTime(item.createTime)}</span>
<a onClick={() => hardProjectClick(item)} className='left-project-content-item-title'>{item.title}</a>
<span className='left-project-content-item-time'>{formatTime(item.createTime, 'MM-DD HH:mm')}</span>
</div>
</List.Item>
)}
@ -437,7 +436,7 @@ const Home: React.FC<{}> = () => {
</div>
<div className='right-global'>
<div>
<img src={topic_right_material} className='right-material' />
<img src={topic_right_material} className='right-material' onClick={() => window.open("/partyMemberTopic/partyBranch")} />
</div>
<div className='right-display'>
<RightDisplayTitle title="党员及支部数量情况" />
@ -469,14 +468,14 @@ const Home: React.FC<{}> = () => {
</div>
</div>
<div className='bottom-global'>
<LeftCardTop title="活动联系人" />
<LeftCardTop title="活动联系人" url="" />
{Object.entries(contactData).map(([name, value], index) => (
<div key={index}>
<div className='bottom-title'>{name}</div>
<div className='bottom-content'>
<Row gutter={[20, 20]}>
{value.map((item: any) => (
<BottomCardContent data={item} onClick={() => openModal(item)} />
<BottomCardContent data={item} onClick={() => openModal(item)} key={item.id} />
))}
</Row>
</div>

View File

@ -20,7 +20,7 @@ export async function getHomeProject() {
return request('/api/biz-service-ebtp-extend/v1/eventpartybranch/eventSubject/list');
}
//攻坚克难项目
//右侧专业线数据
export async function getHomeRight() {
return request('/api/biz-service-ebtp-extend/v1/eventpartybranch/data/list');
}

View File

@ -0,0 +1,38 @@
import React, { useEffect } from 'react';
import '../Style/detailStyle.less';
import bannerPic from '@/assets/topic/bannerPic.jpg'
import newsTempPic from '@/assets/topic/newsTempPic.jpg'
import { formatTime, getDetailData } from '../utils';
import { history } from 'umi';
const NewsDetail: React.FC<{}> = () => {
const item = getDetailData();
//to home
const toHome = () => {
history.push("/partyMemberTopic/home");
}
return (
<div className="hard-news-global">
<div className="wrapBlock">
<div className="bannerBlock">
<img src={bannerPic} alt="" />
</div>
<div className="backHomeBlock">
<span onClick={() => toHome()}></span>
</div>
<div className="contentBlock02">
<h3>{item?.title}</h3>
<span>{formatTime(item?.createTime, 'MM-DD HH:mm')}</span>
<div className="informText02">
<img src={item?.imageUrl} alt="" />
<p>218 202220212022</p>
<p>202220222022</p>
<p>2021</p>
</div>
</div>
</div>
</div>
)
}
export default NewsDetail;

View File

@ -1,6 +1,9 @@
import React, { useEffect } from 'react';
import React, { useEffect, useState } from 'react';
import '../Style/ld_style.less';
import { Input, List, Pagination } from 'antd';
import { getProjectList } from './service';
import { formatTime } from '../utils';
import { history } from 'umi';
const { Search } = Input;
@ -43,12 +46,42 @@ const data = [
];
const PersonInfor: React.FC<{}> = () => {
//project data
const [projectList, setProjectList] = useState<any[]>([]);
//get project
const getProjectData = () => {
getProjectList().then(res => {
if (res?.code == 200) {
setProjectList(res?.data);
}
})
}
//onclick
const clickTitle = (data: any) => {
sessionStorage.setItem("detailData", JSON.stringify(data));
history.push("/partyMemberTopic/hardDetail");
}
//to home
const toHome = () => {
history.push("/partyMemberTopic/home");
}
//goback lastpage
const toGoBack = () => {
window.history.go(-1);
}
useEffect(() => {
getProjectData();
}, [])
return (
<div className="page-container">
<div className="top-banner">
<div className="back-home">
<span></span>
<span></span>
<span onClick={() => toHome()}></span>
<span onClick={() => toGoBack()}></span>
</div>
</div>
<div className="search">
@ -65,12 +98,18 @@ const PersonInfor: React.FC<{}> = () => {
<div className="list-content">
<List
itemLayout="horizontal"
dataSource={data}
pagination={{
onChange: page => {
console.log(page);
},
pageSize: 2,
}}
dataSource={projectList}
renderItem={item => (
<List.Item>
<div className="list-box">
<p></p>
<span>2022-04-03</span>
<p onClick={() => clickTitle(item)}>{item.title}</p>
<span>{formatTime(item.createTime, 'YYYY-MM-DD')}</span>
</div>
</List.Item>
)}

View File

@ -0,0 +1,6 @@
import request from '@/utils/request';
//攻坚克难项目
export async function getProjectList() {
return request('/api/biz-service-ebtp-extend/v1/eventpartybranch/eventSubject/list');
}

View File

@ -1,6 +1,8 @@
import React, { useEffect } from 'react';
import React, { useEffect, useState } from 'react';
import '../Style/ld_style.less';
import { Input, List } from 'antd';
import { history } from 'umi'
import { getBranchList, getMemberAndBranch } from './service';
const { Search } = Input;
@ -71,12 +73,51 @@ const data = [
},
];
const PartyBranch: React.FC<{}> = () => {
//member number and branch number
const [memberNumber, setMemberNumber] = useState<any>({});
//branch list
const [branchData, setBranchData] = useState<any[]>([]);
//get member and branch
const getMemberNumber = () => {
getMemberAndBranch().then(res => {
if (res?.code == 200) {
setMemberNumber(res?.data);
}
})
}
//get member and branch
const getBranchData = () => {
getBranchList().then(res => {
if (res?.code == 200) {
setBranchData(res?.data);
}
})
}
//onclick
const clickCard = (data: any) => {
sessionStorage.setItem("detailData", JSON.stringify(data));
history.push("/partyMemberTopic/personInfor");
}
//to home
const toHome = () => {
history.push("/partyMemberTopic/home");
}
useEffect(() => {
getMemberNumber();
getBranchData();
}, [])
return (
<div className="page-container">
<div className="top-banner">
<div className="back-home">
<span></span>
<span onClick={() => toHome()}></span>
</div>
</div>
<div className="search">
@ -91,21 +132,21 @@ const PartyBranch: React.FC<{}> = () => {
</div>
</div>
<div className="static-box">
<div className="person-num"><span>3451</span></div>
<div className="party-num"><span>51</span></div>
<div className="person-num"><span>{memberNumber?.member}</span></div>
<div className="party-num"><span>{memberNumber?.branch}</span></div>
</div>
<div className="mess-box">
<List
grid={{ gutter: 16, column: 4 }}
dataSource={data}
renderItem={item => (
dataSource={branchData}
renderItem={(item: any) => (
<List.Item>
<div className="wrapper">
<div className="pic-bg">{item.title}</div>
<div className="wrapper" onClick={() => clickCard(item)}>
<div className="pic-bg">{item.branchName}</div>
<div className="mess">
<div className="mess-left"></div>
<div className="mess-right">
<span>{item.num}</span>
<span>{item.count}</span>
</div>
</div>
</div>

View File

@ -0,0 +1,11 @@
import request from '@/utils/request';
//获取党员数量,党支部数量
export async function getMemberAndBranch() {
return request('/api/biz-service-ebtp-extend/v1/eventpartybranch/partyBranchMember/count');
}
//获取党支部列表
export async function getBranchList() {
return request('/api/biz-service-ebtp-extend/v1/eventpartybranch/partyBranch/list');
}

View File

@ -1,6 +1,9 @@
import React, { useEffect } from 'react';
import React, { useEffect, useState } from 'react';
import '../Style/ld_style.less';
import { Input, List } from 'antd';
import { getMemberList } from './service';
import { getDetailData } from '../utils';
import { history } from 'umi';
const { Search } = Input;
@ -43,12 +46,36 @@ const data = [
];
const PersonInfor: React.FC<{}> = () => {
//member list
const [memberData, setMemberData] = useState<any[]>([]);
//get session
const item = getDetailData();
//get member list
const getMemberData = () => {
getMemberList({ belongBranch: 4 }).then(res => {
if (res?.code == 200) {
setMemberData(res?.data);
}
})
}
//to home
const toHome = () => {
history.push("/partyMemberTopic/home");
}
//goback lastpage
const toGoBack = () => {
window.history.go(-1);
}
useEffect(() => {
getMemberData();
}, [])
return (
<div className="page-container">
<div className="top-banner">
<div className="back-home">
<span></span>
<span></span>
<span onClick={() => toHome()}></span>
<span onClick={() => toGoBack()}></span>
</div>
</div>
<div className="search">
@ -65,19 +92,19 @@ const PersonInfor: React.FC<{}> = () => {
<div className="mess-box mess-detail">
<List
grid={{ gutter: 16, column: 4 }}
dataSource={data}
dataSource={memberData}
renderItem={item => (
<List.Item>
<div className="wrapper">
<div className="top-bg">
<div className="tit">{item.title}</div>
<div className="text-r">{item.name}</div>
<div className="text-r yellow">{item.position}</div>
<div className="tit">{item.branchName}</div>
<div className="text-r">{item.contactName}</div>
<div className="text-r yellow">{item.contactUnit}</div>
</div>
<div className="mess">
<div></div>
<div>12345@chinaunicom.cn</div>
<div>12345678</div>
<div>{item.contactUnit}</div>
<div>{item.contactEmail}</div>
<div>{item.contactMobiphone}</div>
</div>
</div>
</List.Item>

View File

@ -0,0 +1,9 @@
import request from '@/utils/request';
//党员列表
export async function getMemberList(params: any) {
return request('/api/biz-service-ebtp-extend/v1/eventpartybranch/partyMember/list', {
method: 'GET',
params: params
});
}

View File

@ -0,0 +1,114 @@
.hard-news-global {
width: 100%;
background: #fff;
margin: 0;
padding: 0;
list-style: none;
text-decoration: none;
border: none;
.wrapBlock {
margin: 0 auto;
width: 1460px;
overflow: hidden;
.bannerBlock {
width: 100%;
height: 473px;
}
.backHomeBlock {
padding-left: 5%;
width: 95%;
height: 49px;
line-height: 49px;
color: #fff;
background: #fd0100;
font-size: 22px;
width: 100%;
}
.backHomeBlock span {
color: #fff;
cursor: pointer;
}
.backHomeBlock span:hover {
text-decoration: underline;
}
.contentBlock01 {
padding-bottom: 50px;
width: 100%;
background: #f1f1f1;
}
.contentBlock01 h3 {
padding: 30px 5px;
font-size: 30px;
line-height: 1.5;
color: #888;
text-align: center;
margin: 0;
font-weight: bold;
}
.contentBlock01 .informText01 {
margin: 0 2%;
padding: 10px 0;
width: 96%;
background: #fff;
font-size: 22px;
color: #888;
border-radius: 8px;
}
.contentBlock01 .informText01 p {
padding: 20px;
text-indent: 45px;
line-height: 1.5;
}
.contentBlock02 {
padding-bottom: 50px;
width: 100%;
background: url("~@/assets/topic/newsDetailBg.jpg") center bottom no-repeat #a81b0b;
}
.contentBlock02 h3 {
padding: 30px 5px;
font-size: 30px;
line-height: 1.5;
color: #fff;
text-align: center;
margin: 0;
font-weight: bold;
}
.contentBlock02 span {
display: block;
text-align: center;
font-size: 20px;
color: #fff;
}
.contentBlock02 .informText02 {
margin: 0 5%;
padding: 10px 0;
width: 90%;
font-size: 22px;
color: #fff;
}
.contentBlock02 .informText02 img {
display: inherit;
margin: 10px auto;
}
.contentBlock02 .informText02 p {
padding: 20px;
text-indent: 45px;
line-height: 1.5;
}
}
}

View File

@ -1,15 +1,17 @@
@import '~antd/es/style/themes/default.less';
.page-container{
.page-container {
width: 1460px;
margin: 0 auto;
.top-banner{
.top-banner {
position: relative;
width: 100%;
height: 318px;
background: url("../../../assets/topic/bannerListPic.jpg") no-repeat;
background-size: 100% 100%;
.back-home{
.back-home {
height: 50px;
background: #fd0100;
color: #fff;
@ -17,7 +19,8 @@
bottom: 0;
left: 0;
right: 0;
span{
span {
line-height: 46px;
font-size: 24px;
font-weight: 600;
@ -27,64 +30,83 @@
}
}
}
.search{
.search {
height: 68px;
line-height: 64px;
overflow: hidden;
.text{
.text {
font-size: 20px;
color: #0e0e0e;
span{
color: #0e0e0e;
span {
color: #ff3838;
}
}
.search-box{
.search-box {
float: right;
margin-top: 18px;
.ant-btn-primary{
.ant-btn-primary {
background-color: #fd0100;
border-color: #fd0100;
}
}
}
.static-box{
.static-box {
position: relative;
height: 145px;
background: url("../../../assets/topic/static-bg.png") no-repeat;
background-size: 100% 100%;
div{
div {
font-size: 24px;
color: #fff;
span{
span {
font-size: 60px;
vertical-align: -13px;
margin: 0 8px;
}
}
.person-num{
.person-num {
position: absolute;
right: 360px;
top: 24px;
}
.party-num{
.party-num {
position: absolute;
right: 80px;
top: 24px;
}
}
.mess-box{
.ant-row{
.mess-box {
.ant-row {
margin-left: -20px !important;
margin-right: -20px !important;
}
.ant-col{
.ant-col {
margin-top: 34px;
padding: 0 20px !important;
}
.wrapper{
// border: 1px solid #aaa;
.wrapper {
cursor: pointer;
}
.pic-bg{
.wrapper:hover {
-webkit-filter: brightness(108%);
filter: brightness(108%);
}
.pic-bg {
height: 80px;
background: url("../../../assets/topic/card-bg.png") no-repeat;
background-size: cover;
@ -94,11 +116,13 @@
text-align: center;
line-height: 76px;
}
.mess{
.mess {
border: 1px solid #aaaaaa;
border-top: 0;
}
.mess-left{
.mess-left {
display: inline-block;
width: 50%;
background: url("../../../assets/topic/person.png") no-repeat 30px 10px;
@ -108,71 +132,86 @@
font-weight: 600;
color: #302f2f;
}
.mess-right{
.mess-right {
display: inline-block;
width: 50%;
color: #959595;
font-size: 24px;
span{
span {
color: #ffb119;
font-size: 70px;
font-weight: 600;
}
}
}
.mess-detail{
.ant-row{
.mess-detail {
.ant-row {
width: 100%;
margin: 0 !important;
}
.ant-col{
.ant-col {
margin-top: 0;
margin-bottom: 34px;
}
.top-bg{
.top-bg {
background: url("../../../assets/topic/person-bg.jpg") no-repeat;
background-size: cover;
height: 88px;
.tit{
.tit {
padding: 8px 0 0 15px;
font-size: 16px;
color: #fff;
font-weight: 600;
}
.text-r{
.text-r {
text-align: right;
padding-right: 10px;
color: #fff;
font-size: 18px;
}
.yellow{
.yellow {
color: #ffd03f;
font-size: 14px;
}
}
.mess{
.mess {
color: #959595;
font-size: 14px;
padding: 30px 0 30px 15px;
}
}
.list-content{
.list-content {
margin-top: 10px;
.list-box{
.list-box {
position: relative;
width: 100%;
color: #333;
font-size: 16px;
span{
span {
position: absolute;
right: 8px;
top: 0;
}
p{
p {
margin-bottom: 0;
padding-left: 30px;
cursor: pointer;
}
p::before{
p::before {
content: "";
width: 8px;
height: 8px;
@ -182,40 +221,53 @@
top: 8px;
left: 10px;
}
p:hover {
color: #369;
text-decoration: underline;
}
}
.ant-list-split .ant-list-item{
.ant-list-split .ant-list-item {
border-bottom: 0 !important;
}
.list-pic{
.list-pic {
margin-top: 0;
width: 100%;
height: 110px;
position: relative;
img{
img {
width: 182px;
height: 110px;
float: left;
}
p{
p {
padding-left: 206px;
}
.tit{
.tit {
font-size: 18px;
color: #333;
font-weight: 600;
}
.detail{
.detail {
text-indent: 2em;
font-size: 16px;
color: #666;
}
.time{
.time {
position: absolute;
right: 4px;
bottom: 0;
color: #666;
font-size: 16px;
img{
img {
position: absolute;
bottom: 3px;
right: 80px;
@ -226,12 +278,14 @@
}
}
}
.ant-pagination{
.ant-pagination {
text-align: center;
margin-top: 20px;
padding-bottom: 20px;
}
.ant-pagination-item-active{
.ant-pagination-item-active {
background: #fd0100;
}
}

View File

@ -0,0 +1,37 @@
import { getFilelist } from "@/services/download_";
import { pictureDisplayPath } from "@/utils/DownloadUtils";
import moment from "moment";
/**
* 传入list数据插入图片展示路径 imageUrl
* @param data 数组
* @param paramName 字段名
* @returns
*/
export const getImageUrl = async (data: any[], paramName: string) => {
for (const ite of data) {
await getFilelist([ite[paramName]]).then(response => {//获取主图
if (response?.success && response?.data?.length > 0) {
const returnUrl = window.location.origin + pictureDisplayPath + '?filePath=' + response?.data[0].filePath;
ite["imageUrl"] = returnUrl;
}
})
}
return data;
}
/**
* 时间格式化
* @param time 时间(字符串)
* @param format 格式
* @returns
*/
export const formatTime = (time: string, format: string) => {
return moment(time).format(format);
}
/**
* 获取详情数据
* @returns
*/
export const getDetailData = () => {
return JSON.parse(sessionStorage.getItem('detailData') as any);
}