wangyue 2 years ago
parent
commit
283a16ae14
  1. 17
      api/app/lib/controllers/overview/building.js
  2. 2
      api/config.js
  3. 9
      api/log/development.log
  4. 7
      web/client/src/sections/fillion/components/maintenanceTable.js
  5. 9
      web/client/src/sections/fillion/components/patrolTable.js
  6. 1
      web/client/src/sections/quanju/containers/footer/build/Leftbottom.js
  7. 3
      web/client/src/sections/quanju/containers/footer/build/Rightbottom.js
  8. 11
      web/client/src/sections/quanju/containers/footer/build/index.js
  9. 2
      web/config.js

17
api/app/lib/controllers/overview/building.js

@ -191,6 +191,17 @@ async function roadState (ctx) {
} else {
roadState.townProject[townName] = 1
}
if (p.type == 'road' && p.done) {
if (roadState.townRoad[townName]) {
if (roadState.townRoad[townName].roadCount) {
roadState.townRoad[townName].roadCount += 1
} else {
roadState.townRoad[townName].roadCount = roadState.townRoad[townName].roadCode.size
roadState.townRoad[townName].roadCount += 1
}
}
}
}
}
@ -202,7 +213,11 @@ async function roadState (ctx) {
roadState.buildedRoad += roadCode.size
for (let t of Object.keys(roadState.townRoad)) {
roadState.townRoad[t].roadCount = roadState.townRoad[t].roadCode.size
if (roadState.townRoad[t].roadCount) {
} else {
roadState.townRoad[t].roadCount = roadState.townRoad[t].roadCode.size
}
delete roadState.townRoad[t].roadCode
}

2
api/config.js

@ -23,7 +23,7 @@ const flags = args.parse(process.argv);
const FS_UNIAPP_DB = process.env.FS_UNIAPP_DB || flags.pg;
// const LOCAL_SVR_ORIGIN = process.env.LOCAL_SVR_ORIGIN || flags.fileHost;
const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURC || flags.qndmn;
const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE || flags.qndmn;
const QINIU_BUCKET_RESOURCE = process.env.ANXINCLOUD_QINIU_BUCKET_RESOURCE || flags.qnbkt;
const QINIU_AK = process.env.ANXINCLOUD_QINIU_ACCESSKEY || flags.qnak;
const QINIU_SK = process.env.ANXINCLOUD_QINIU_SECRETKEY || flags.qnsk;

9
api/log/development.log

@ -10659,3 +10659,12 @@ headers: {}
2022-07-28 21:48:22.652 - debug: [FS-LOGGER] Init.
2022-07-28 21:48:22.760 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-28 21:48:22.760 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-30 11:38:34.527 - debug: [FS-LOGGER] Init.
2022-07-30 11:38:34.600 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-30 11:38:34.600 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-30 11:40:20.216 - debug: [FS-LOGGER] Init.
2022-07-30 11:40:20.300 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-30 11:40:20.300 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-30 12:38:46.294 - debug: [FS-LOGGER] Init.
2022-07-30 12:38:46.394 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-30 12:38:46.394 - info: [FS-AUTH] Inject auth and api mv into router.

7
web/client/src/sections/fillion/components/maintenanceTable.js

@ -99,6 +99,11 @@ const DetailList = (props) => {
render: (text, record) => {
return moment(record.time).format("YYYYMMDD") * 10000 + record.id;
}
}, {
title: '工程类型',
key: 'projectType',
dataIndex: 'projectType',
align: 'center',
}, {
title: '所属道路',
key: 'road',
@ -120,7 +125,7 @@ const DetailList = (props) => {
align: 'center'
},
{
title: '巡查人',
title: '养护人',
width: 100,
key: 'userName',
dataIndex: 'userName',

9
web/client/src/sections/fillion/components/patrolTable.js

@ -100,7 +100,14 @@ const DetailList = (props) => {
render: (text, record) => {
return moment(record.time).format("YYYYMMDD") * 10000 + record.id;
}
}, {
},
{
title: '工程类型',
key: 'projectType',
dataIndex: 'projectType',
align: 'center',
},
{
title: '所属道路',
key: 'road',
dataIndex: 'road',

1
web/client/src/sections/quanju/containers/footer/build/Leftbottom.js

@ -274,6 +274,7 @@ legend: {
return (
<div className='build-left-bottom'>
<span style={{position:"absolute",width:"10%",color:"#FFF",backgroundColor:'rgba(216, 240, 255, 0.1)',right:"5%",textAlign:"center",top:0}}>公里</span>
<div className='build-left-bottom-title'>
<h2>{total}</h2>
<span>道路总公里</span>

3
web/client/src/sections/quanju/containers/footer/build/Rightbottom.js

@ -58,7 +58,7 @@ function Rightbottom(props) {
textStyle: {
color: '#fff',
},
formatter: (values) => `${values.seriesName}<br /> ${values.marker} ${values.name}<b>${values.value}</b>`,
formatter: (values) => `${values.seriesName}<br /> ${values.marker} ${values.name}<b>${values.value}</b>`,
},
legend: {
orient: "vertical",
@ -172,6 +172,7 @@ function Rightbottom(props) {
return (
<div className='build-right-bottom'>
<span style={{position:"absolute",width:"10%",color:"#FFF",backgroundColor:'rgba(216, 240, 255, 0.1)',right:"5%",textAlign:"center",top:0}}></span>
<div className='build-right-bottom-title'>
<h2>{total||0}</h2>
<span>道路总公里</span>

11
web/client/src/sections/quanju/containers/footer/build/index.js

@ -56,7 +56,8 @@ const Build = (props) => {
let t1 = Object.values(buildingnumber?.townRoad || {})
let totalgongli = t1.length!==0 ? t1.reduce((x,y)=>x+y.mileage,0):0 //乡镇道路占比总公里数
let totalcount = t1.length !==0 ? t1.reduce((x,y)=>x+y.roadCount,0):0 //乡镇道路占比公路总条数
// let totalcount = t1.length !==0 ? t1.reduce((x,y)=>x+y.roadCount,0):0 //乡镇道路占比公路总条数
let totalcount = buildingnumber?.buildedRoad || 0
// let sungongli = alltype.reduce((x,y)=>x+y.value,0)
@ -117,7 +118,7 @@ const Build = (props) => {
return (
<>
<div className='bgbuild-left'>
<Module title={"各状态公路数量统计"} style={{ width: "100%",
<Module title={"各状态公路数量统计"} style={{ width: "100%",
height:" 33%"
}} customize = {true}>
<div style={{height:"100%",position:"relative"}} >
@ -143,7 +144,7 @@ const Build = (props) => {
</div>:<NoData/>}
</div>
</Module>
<Module title={"各乡镇道路分布统计"} style={{ width: "100%",
<Module title={"各乡镇已建道路统计"} style={{ width: "100%",
height:" 33%",marginTop:'3%'
}} customize = {true}>
{ totalcount && totalcount!==0?<div className='build-left-center'>
@ -210,12 +211,12 @@ const Build = (props) => {
<h2>全面建设好农村公路切实发挥先行官作用</h2>
</div>
</Module>
<Module title={"各乡镇在建公路工程"} style={{ width: "100%",
<Module title={"各乡镇在建工程统计"} style={{ width: "100%",
height:" 33%",marginTop:'3%'
}} customize = {true}>
{sunonlineproject!==0?<Rightcenter data={onlineproject} sundata={sunonlineproject}/>:<NoData/>}
</Module>
<Module title={"公路等级统计"} style={{ width: "100%",
<Module title={"各路段技术等级统计"} style={{ width: "100%",
height:" 30%",marginTop:'3%'
}} customize = {true}>
{safetyData&&sunsafetyData!==0?<RightBottom width='100%'

2
web/config.js

@ -21,7 +21,7 @@ args.option('qndmn', '七牛');
const flags = args.parse(process.argv);
const FS_UNIAPP_API = process.env.FS_UNIAPP_API || flags.apiUrl;
const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURC || flags.qndmn;
const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE || flags.qndmn;
const API_URL = process.env.API_URL || flags.apiUrl;
if (!FS_UNIAPP_API) {

Loading…
Cancel
Save