Browse Source

(*) 背景图大小压缩 租户来源统计调整

master
peng.peng 1 year ago
parent
commit
00c80de351
  1. 17
      api/app/lib/controllers/superScreen/community.js
  2. BIN
      super-screen/client/assets/images/homepage/communtity/bg.webp
  3. 19
      super-screen/client/src/sections/community-safty/components/traffic-ranking.js
  4. 2
      super-screen/client/src/sections/community-safty/containers/style.less
  5. 2
      super-screen/client/src/sections/fire-control/containers/style.less
  6. 2
      super-screen/client/src/sections/water-prevention/containers/style.less

17
api/app/lib/controllers/superScreen/community.js

@ -66,7 +66,7 @@ function getHomeInfo(opts) {
], ],
group: ['houseCommunity'], // 分组的字段 group: ['houseCommunity'], // 分组的字段
where: { where: {
houseStatus: false houseStatus: false,
} }
}); });
@ -78,7 +78,7 @@ function getHomeInfo(opts) {
], ],
group: ['house_id'], // 分组的字段 group: ['house_id'], // 分组的字段
where: { where: {
houseStatus: false, houseStatus: false,
houseCommunity: communitys[i].houseCommunity houseCommunity: communitys[i].houseCommunity
} }
}) })
@ -119,12 +119,23 @@ function getHomeInfo(opts) {
} }
}); });
let communityPersons = await models.AffordableHousing.count({
attributes: [
'person_community', // 分组的字段
],
group: ['person_community'], // 分组的字段
where: {
houseStatus: false
}
});
ctx.status = 200; ctx.status = 200;
ctx.body = { ctx.body = {
inuse: inuse, //租赁中套数 inuse: inuse, //租赁中套数
unuse: unuse, //空置套数 unuse: unuse, //空置套数
communityInUse, communityInUse,
communityUnUse communityUnUse,
communityPersons
}; };
} catch (error) { } catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);

BIN
super-screen/client/assets/images/homepage/communtity/bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

19
super-screen/client/src/sections/community-safty/components/traffic-ranking.js

@ -5,14 +5,15 @@ import { communtity_data } from '../constants/index'
function DataTop5({ communtityInfo }) { function DataTop5({ communtityInfo }) {
const content = <div className='rank_content_overflow'> const content = <div className='rank_content_overflow'>
{communtity_data.map(s => { {communtityInfo?.communityPersons
let inuse = communtityInfo?.communityInUse?.find(v => v.houseCommunity == s.name)?.count || 0 ?.filter(x => !!x.person_community)
// let unuse = communtityInfo?.communityUnUse?.find(v => v.houseCommunity == s.name)?.count || 0 ?.sort((a, b) => b.count - a.count)
return <div className='_rank_content'> ?.map(s => {
<div className='_rank_item2'>{s?.name}</div> return <div className='_rank_content'>
<div className='_rank_item3'>{parseInt(inuse)}</div> <div className='_rank_item2'>{s?.person_community}</div>
</div> <div className='_rank_item3'>{parseInt(s?.count)}</div>
})} </div>
})}
</div> </div>
@ -20,7 +21,7 @@ function DataTop5({ communtityInfo }) {
<div className='_traffic_ranking'> <div className='_traffic_ranking'>
<div className='_rank_title'> <div className='_rank_title'>
<div className='_rank_item2'>社区名称</div> <div className='_rank_item2'>社区名称</div>
<div className='_rank_item3'> / <span style={{ fontSize: 14 }}></span></div> <div className='_rank_item3'> / <span style={{ fontSize: 14 }}></span></div>
</div> </div>
<AutoRollComponent canScroll={true} content={content} data={[]} divHeight={200} divId={`community-right-bottom`} /> <AutoRollComponent canScroll={true} content={content} data={[]} divHeight={200} divId={`community-right-bottom`} />

2
super-screen/client/src/sections/community-safty/containers/style.less

@ -4,7 +4,7 @@
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
background: url('/assets/images/homepage/communtity/bg.png'); background: url('/assets/images/homepage/communtity/bg.webp');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
overflow: hidden; overflow: hidden;

2
super-screen/client/src/sections/fire-control/containers/style.less

@ -4,7 +4,7 @@
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
background: url('/assets/images/homepage/communtity/bg.png'); background: url('/assets/images/homepage/communtity/bg.webp');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
overflow: hidden; overflow: hidden;

2
super-screen/client/src/sections/water-prevention/containers/style.less

@ -4,7 +4,7 @@
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
background: url('/assets/images/homepage/communtity/bg.png'); background: url('/assets/images/homepage/communtity/bg.webp');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
overflow: hidden; overflow: hidden;

Loading…
Cancel
Save