ww664853070 1 year ago
parent
commit
556ccfe222
  1. 18
      api/app/lib/controllers/data/index.js
  2. 2
      api/app/lib/controllers/data/videoCenter.js
  3. 4
      api/app/lib/controllers/overview/building.js
  4. 3
      api/app/lib/controllers/report/index.js
  5. 6
      api/app/lib/models/project.js
  6. 9
      api/app/lib/models/report.js
  7. 39
      api/app/lib/schedule/index.js
  8. 8
      scripts/1.2.3/schema/7.update_project.sql
  9. 2
      scripts/1.2.4/schema/1.update_report.sql
  10. 1
      weapp/src/packages/patrol/index.jsx
  11. 8
      weapp/src/packages/patrolView/index.jsx
  12. 2
      web/client/src/sections/fillion/components/maintenanceTable.js
  13. 31
      web/client/src/sections/fillion/components/patrolTable.js
  14. 4
      web/client/src/sections/fillion/nav-item.js
  15. 4
      web/client/src/sections/organization/containers/user.js
  16. 2
      web/client/src/sections/quanju/containers/footer/build/index.js
  17. 134
      web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js
  18. 4
      web/client/src/sections/quanju/containers/footer/conserve/right/right-top.js
  19. 45
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js
  20. 14
      web/client/src/sections/quanju/containers/public/olMap.js

18
api/app/lib/controllers/data/index.js

@ -6,6 +6,7 @@ const request = require('superagent');
async function dataExport(ctx) {
try {
let tableAttributesCopy = {}
const models = ctx.fs.dc.models;
const { userId } = ctx.fs.api
const { exp, ids, roadLevel, municipalType,
@ -36,7 +37,7 @@ async function dataExport(ctx) {
tableName: 'MunicipalBusiness',
},
{
n: '工程一览',
n: '在建项目',
k: 'project',
tableName: 'Project',
},
@ -87,8 +88,21 @@ async function dataExport(ctx) {
const exportData = await models[modalOption.tableName].findAll(findOption)
const tableAttributes = models[modalOption.tableName].tableAttributes
//过滤project部门字段
if (modalOption.tableName === 'Project') {
const { entryName, projectMileage, investment, buildUnit,
constructionControlUnit, designUnit, constructionUnit, qutityUnit, startTime, remark, done } = tableAttributes
tableAttributesCopy = {
entryName, projectMileage, investment, buildUnit,
constructionControlUnit, designUnit, constructionUnit, qutityUnit, startTime, remark, done
}
} else {
tableAttributesCopy = tableAttributes
}
let header = []
for (let k in tableAttributes) {
console.log('tableAttributesCopy', tableAttributesCopy)
for (let k in tableAttributesCopy) {
let comment = tableAttributes[k].comment
if (k != 'id' && comment) {
if (comment == '品名' && municipalType == '出租车') {

2
api/app/lib/controllers/data/videoCenter.js

@ -38,7 +38,7 @@ function videoList (opts) {
})
ctx.status = 200;
ctx.body = (deviceRes.data || []).map(item => {
ctx.body = [] || (deviceRes.data || []).map(item => {
return {
...item,
token: yingshiToken,

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

@ -38,7 +38,7 @@ async function roadState(ctx) {
})
//在建工程
const buildingCount = await models.Project.count({
where: { done: true }
where: { done: false }
})
const bridgeRes = await models.Bridge.findAll({})
@ -196,7 +196,7 @@ async function roadState(ctx) {
}
}
if (p.buildUnit && p.done) {
if (p.buildUnit && !p.done) {
let townName = p.buildUnit.replace('人民政府', '').replace('南昌县', '').replace('管委会', '')
if (roadState.townProject[townName]) {
roadState.townProject[townName] += 1

3
api/app/lib/controllers/report/index.js

@ -43,7 +43,8 @@ async function reportList(ctx) {
where: {
},
attributes: ['id', 'road', 'time', 'projectType', 'roadSectionStart', 'performerId', 'roadSectionEnd', 'reportType', 'content', 'longitude', 'latitude', 'projectName', 'handleState', 'codeRoad'],
attributes: ['id', 'road', 'time', 'projectType', 'roadSectionStart', 'performerId', 'roadSectionEnd', 'reportType',
'content', 'longitude', 'latitude', 'projectName', 'handleState', 'codeRoad', 'handleContent', 'handlePic','videoUrl'],
include: [{
model: models.User,
attributes: ['name']

6
api/app/lib/models/project.js

@ -47,7 +47,7 @@ module.exports = dc => {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "建设单位",
comment: "业主单位",
primaryKey: false,
field: "build_unit",
autoIncrement: false
@ -101,7 +101,7 @@ module.exports = dc => {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: null,
comment: null,
comment: "是否已完成",
primaryKey: false,
field: "done",
autoIncrement: false
@ -137,7 +137,7 @@ module.exports = dc => {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "质量检测单位",
comment: "质量监督单位",
primaryKey: false,
field: "qutity_unit",
autoIncrement: false

9
api/app/lib/models/report.js

@ -223,6 +223,15 @@ module.exports = dc => {
field: "handle_pic",
autoIncrement: false
},
videoUrl: {
type: DataTypes.ARRAY(DataTypes.STRING),
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "video_url",
autoIncrement: false
},
}, {
tableName: "report",
comment: "",

39
api/app/lib/schedule/index.js

@ -0,0 +1,39 @@
'use strict';
const fs = require('fs');
const nodeSchedule = require('node-schedule');
// 将定时任务汇集未来可根据需要选取操作
module.exports = async function (app, opts) {
const scheduleInit = ({
interval, immediate, proRun, disabled
}, callback) => {
if (disabled) {
return;
}
if (proRun && opts.dev) {
return;
}
const j = nodeSchedule.scheduleJob(interval, callback);
if (immediate && (!proRun || (proRun && !opts.dev))) {
setTimeout(callback, 0)
}
return j;
}
app.fs.scheduleInit = scheduleInit
fs.readdirSync(__dirname).forEach((filename) => {
if (!['index.js'].some(f => filename == f)) {
const scheduleList = require(`./${filename}`)(app, opts)
for (let k of Object.keys(scheduleList)) {
console.info(`定时任务 ${k} 启动`);
}
app.fs.schedule = {
...app.fs.schedule,
...scheduleList,
}
}
});
};

8
scripts/1.2.3/schema/7.update_project.sql

@ -0,0 +1,8 @@
COMMENT ON COLUMN project.build_unit IS '业主单位';
COMMENT ON COLUMN project.qutity_unit IS '质量监督单位';
COMMENT ON COLUMN project.done IS '是否已完成';

2
scripts/1.2.4/schema/1.update_report.sql

@ -0,0 +1,2 @@
alter table report
add video_url varchar(1024) [];

1
weapp/src/packages/patrol/index.jsx

@ -161,6 +161,7 @@ const Index = () => {
// type: 'wgs84',
type: 'gcj02',
isHighAccuracy: true,
// isHighAccuracy: false,
highAccuracyExpireTime: 1000 * 6,
success: function (res) {
setLongitude(res.longitude)

8
weapp/src/packages/patrolView/index.jsx

@ -14,7 +14,7 @@ import patrolActiveIcon from '../../static/img/patrolView/patrol-active.svg'
import conserveIcon from '../../static/img/patrolView/conserve.svg'
import conserveActiveIcon from '../../static/img/patrolView/conserve-active.svg'
function Index() {
function Index () {
const userInfo = Taro.getStorageSync('userInfo') || {};
const router = useRouter()
const { params: { filter, kind, } } = router
@ -40,7 +40,7 @@ function Index() {
Taro.setNavigationBarTitle({ title: '在建项目' })
} else if (isAnomaly) {
Taro.setNavigationBarTitle({ title: '异常反馈' })
}else if(ishandle){
} else if (ishandle) {
Taro.setNavigationBarTitle({ title: '已办事项' })
} else if (kind == 'conserve') {
Taro.setNavigationBarTitle({ title: '养护上报' })
@ -60,7 +60,7 @@ function Index() {
getList(page == 0 ? true : false)
}, [num])
function dealError(error) {
function dealError (error) {
Taro.showToast({
title: error,
icon: 'none',
@ -77,7 +77,7 @@ function Index() {
endTime: datePicker ? datePicker + ' 23:59:59' : '',
keyword: filterText,
reportType: isWait || ishandle ? 'anomaly' : reportType,
userId: filter === 'my' ? userInfo.id : '',
userId: filter === 'my' && !ishandle ? userInfo.id : '',
handleState: isWait ? '待处理' : ishandle ? '已处理' : '',
performerId: isWait || ishandle ? userInfo.id : ''
}

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

@ -23,10 +23,12 @@ const DetailForm = (props) => {
{ key: '所在路段', name: 'road' },
{ key: '具体位置', name: 'address' },
{ key: '巡查内容', name: 'content' },
{ key: '路线代码', name: 'codeRoad' },
// { key: '病害照片', name: 'scenePic' },
{ key: '养护前', name: 'conserveBeforePic' },
{ key: '养护中', name: 'conserveUnderwayPic' },
{ key: '养护后', name: 'conserveAfterPic' },
];
const renderContent = (data) => {

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

@ -40,21 +40,23 @@ const DetailForm = (props) => {
const keyList = [
// { key: '编号', name: 'id' },
// isPatrol ?'巡查管理详情' :isRoad ? '建设上报详情' : '异常反馈详情'
{ key: '工程类型', name: 'projectType', skip: !isPatrol },
{ key: '反馈类型', name: 'projectType', skip: !isAnomaly },
{ key: '工程名称', name: 'projectName', skip: !isRoad },
{ key: '所在路段', name: 'road', skip: isRoad },
{ key: '具体位置', name: 'address' },
{ key: '巡查内容', name: 'content' },
{ key: '路线代码', name: 'codeRoad' },
{ key: '路线代码', name: 'codeRoad', skip: !isAnomaly && !isPatrol },
{ key: '现场照片', name: 'scenePic' },
{ key: '处理详情', name: 'handleContent', skip: !isAnomaly },
{ key: '处理图片', name: 'handlePic', skip: !isAnomaly },
{ key: '处理人', name: 'performerName', skip: !isAnomaly }
];
const renderContent = (data) => {
if (data) {
// Object.keys(data).map(key => {
// })
return keyList.map(obj => {
return (
@ -62,9 +64,7 @@ const DetailForm = (props) => {
<div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', margin: '12px 0' }}>
<span style={{ fontSize: 16, color: 'gray', minWidth: '26%' }}>{obj.key}</span>
{
obj.name != 'scenePic' ?
obj.name != 'scenePic' && obj.name != 'handlePic' ?
<Input
style={{ width: '70%' }}
value={
@ -73,18 +73,19 @@ const DetailForm = (props) => {
:
obj.name == 'projectType' ?
reportTypeText(data[obj.name]) :
data[obj.name]
data[obj.name] || null
}
disabled
/>
:
<div style={{ width: '70%', display: 'flex', position: 'relative', flexWrap: 'wrap' }}>
{
data.scenePic && data.scenePic instanceof Array ? data.scenePic.map(imgSrc => {
data[obj.name] && data[obj.name] instanceof Array ? data[obj.name].map(imgSrc => {
return <div style={{ width: '44%', margin: 6 }}>
<Image src={qndmn + '/' + imgSrc} width={'100%'} style={{ marginBottom: 4 }} />
</div>
}) : '暂无图片'
})
: '暂无图片'
}
</div>
@ -593,7 +594,7 @@ const PatrolTable = (props) => {
const [detailVisible, setDetailVisible] = useState(false)
const [activeTabKey1, setActiveTabKey1] = useState('tab1');
const { RangePicker } = DatePicker;
const [reportDetailCopy, setReportDetailCopy] = useState({})//匹配执行者的名字
const isRoad = pathname.includes('road')
const isAnomaly = pathname.includes('anomaly')
const isPatrol = !isRoad && !isAnomaly
@ -604,10 +605,10 @@ const PatrolTable = (props) => {
}, [])
useEffect(() => {
// if (userList && userList instanceof Array) {
// setRecord(userList[0]);
// }
}, [userList])
if (userList && userList instanceof Array && reportDetail && reportDetail instanceof Object) {
setReportDetailCopy(Object.assign(reportDetail, { performerName: userList.find(item => item.id === reportDetail.performerId)?.name }))
}
}, [userList, reportDetail])
useEffect(() => {
queryData();
@ -752,7 +753,7 @@ const PatrolTable = (props) => {
<DetailForm
visible={detailVisible}
handleClose={handleClose}
data={reportDetail}
data={reportDetailCopy}
loading={reportDetailLoading}
isPatrol={isPatrol} isRoad={isRoad} isAnomaly={isAnomaly}
/>

4
web/client/src/sections/fillion/nav-item.js

@ -95,10 +95,10 @@ export function getNavItem(user, dispatch) {
<Menu.Item key="fillionassess">
<Link to="/fillion/assess">考核评分</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'VIDEOCENTER') ?
{/* {user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'VIDEOCENTER') ?
<Menu.Item key="fillionvideoCenter">
<Link to="/fillion/videoCenter">视频中心</Link>
</Menu.Item> : ''}
</Menu.Item> : ''} */}
</SubMenu> : null
);
}

4
web/client/src/sections/organization/containers/user.js

@ -269,11 +269,11 @@ const UserManage = (props) => {
<div style={{ width: '30%' }} >
{
selectedTree == id ? <>
<FormOutlined onClick={() => {
{user?.username === 'SuperAdmin' ? <FormOutlined onClick={() => {
setDepModalRecord(item)
setDepModalVisible(true)
setDepModalType('edit')
}} />
}} /> : null}
{user?.username === 'SuperAdmin' ? <Popconfirm title='是否确认删除?' onConfirm={() => { delDepartment(id) }} >
<DeleteOutlined style={{ marginLeft: 5 }} />
</Popconfirm> : ''}

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

@ -291,7 +291,7 @@ const Build = (props) => {
width: "100%",
height: " 33%", marginTop: '3%'
}} customize={true}>
{sunonlineproject !== 0 ? <Rightcenter data={onlineproject} sundata={sunonlineproject} /> : <NoData />}
{sunonlineproject !== 0 ? <Rightcenter data={onlineproject} sundata={buildingCount} /> : <NoData />}
</Module>
<Module title={"各路段技术等级统计"} style={{
width: "100%",

134
web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js

@ -18,67 +18,79 @@ import PieChart from '../chart/pie-chart';
const type = ['culvert', '', 'road', 'bridge']
const RightBottom = (props) => {
const { roadMaintenances } = props
let totalData = null
let typesNum = null
const list = roadMaintenances?.reportCount?.map((r, index) => {
totalData += Number(r.count)
if (r.projectType === 'culvert' || 'road' || 'bridge') {
typesNum += Number(r.count)
}
switch (r.projectType) {
case 'road':
return {
name: '道路',
value: r.count,
colorList: 'rgba(7,185,254,1)',
underColorList: 'rgba(7,185,254,0.5)'
const { roadMaintenances } = props
let totalData = null
let typesNum = null
let list = roadMaintenances?.reportCount?.map((r, index) => {
totalData += Number(r.count)
if (r.projectType === 'culvert' || 'road' || 'bridge') {
typesNum += Number(r.count)
}
switch (r.projectType) {
case 'road':
case 'countyRoad':
case 'villageRoad':
case 'rusticRoad':
return {
name: '道路',
value: r.count,
colorList: 'rgba(7,185,254,1)',
underColorList: 'rgba(7,185,254,0.5)'
};
case 'culvert':
return {
name: '涵洞',
value: r.count,
colorList: 'rgba(4,251,240,1)',
underColorList: 'rgba(4,251,240,0.5)'
};
case 'bridge':
return {
name: '桥梁',
value: r.count,
colorList: 'rgba(28,96,254,1)',
underColorList: 'rgba(28,96,254,0.5)'
};
case 'other':
return {
name: '其他',
value: r.count,
colorList: 'rgba(255,194,20,1)',
underColorList: 'rgba(255,194,20,0.5)'
};
}
}).filter(f => f !== undefined)
console.log('list:',list);
let colorList = list?.map(c => c.colorList)
let underColorList =list?.map(c => c.underColorList)
const style = { height: "31%", marginTop: "3%" }
return (
<>
<Module style={style} title={"养护完成情况"}>
{/* <div ref = {chartRef} style={{ width: '100%', height: '100%' }}></div> */}
<PieChart
data={list}
width='100%'
height='100%'
text='养护总数'
textLeft={'21%'}
numLeft={'22%'}
total={totalData || 0}
colorList={colorList}
underColorList={underColorList}
/>
</Module>
</>
)
};
case 'culvert':
return {
name: '涵洞',
value: r.count,
colorList: 'rgba(4,251,240,1)',
underColorList: 'rgba(4,251,240,0.5)'
};
case 'bridge':
return {
name: '桥梁',
value: r.count,
colorList: 'rgba(28,96,254,1)',
underColorList: 'rgba(28,96,254,0.5)'
};
case 'other':
return {
name: '其他',
value: r.count,
colorList: 'rgba(255,194,20,1)',
underColorList: 'rgba(255,194,20,0.5)'
};
}
}).filter(f => f !== undefined)
list = list?.reduce((pre, cur) => {
let existIndex = pre.findIndex(p => p.name == cur.name)
if (existIndex > -1) {
pre[existIndex].value = parseInt(pre[existIndex].value) + parseInt(cur.value)
} else {
pre.push(cur)
}
return pre
}, [])
let colorList = list?.map(c => c.colorList)
let underColorList = list?.map(c => c.underColorList)
const style = { height: "31%", marginTop: "3%" }
return (
<>
<Module style={style} title={"养护完成情况"}>
{/* <div ref = {chartRef} style={{ width: '100%', height: '100%' }}></div> */}
<PieChart
data={list}
width='100%'
height='100%'
text='养护总数'
textLeft={'21%'}
numLeft={'22%'}
total={totalData || 0}
colorList={colorList}
underColorList={underColorList}
/>
</Module>
</>
)
}
export default RightBottom

4
web/client/src/sections/quanju/containers/footer/conserve/right/right-top.js

@ -4,7 +4,7 @@ import Module from '../../../public/module'
import { connect } from 'react-redux'
import Lun from "../../leadership/right/lunbo"
import { getRoadmaintain } from "../../../../actions/example"
import Hua from "../../leadership/right/hudong"
import Hua from "../../leadership/centerleft/hudong"
import moment from 'moment'
const iconSrc = [
@ -48,7 +48,7 @@ const RightTop = (props) => {
useEffect(() => {
dispatch(getRoadmaintain()).then((res) => {
setRoadmaintainList(res.payload.data.reportList.filter((item, index) => {
return item.projectType == "road"
return item.projectType == "road" || item.projectType == "countyRoad" || item.projectType == "villageRoad" || item.projectType == "rusticRoad"
}))
})
}, [])

45
web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js

@ -16,16 +16,15 @@ const Right = (props) => {
const [shuzu, setShuzu] = useState([])
useEffect(() => {
const daolus = dispatch(getRoadmaintain()).then((res) => {
// console.log(res);
setList(res.payload.data.reportList.filter((item, index) => {
return item.projectType == "road"
}))
setNums(res.payload.data.reportCount.filter((item, index) => {
return item.projectType == "road"
return item.projectType == "road" || item.projectType == "countyRoad" || item.projectType == "villageRoad" || item.projectType == "rusticRoad"
}))
// console.log(res.payload.data);
setNums(res.payload.data.reportCount.reduce((count, item) => {
if (item.projectType == "road" || item.projectType == "countyRoad" || item.projectType == "villageRoad" || item.projectType == "rusticRoad") {
count += parseInt(item.count)
}
return count
}, 0))
})
}, [])
useEffect(() => {
@ -35,7 +34,7 @@ const Right = (props) => {
// const
})
}, [])
// console.log("1211", nums);
console.log("1211", nums);
const renderBody = () => {
return (
@ -64,18 +63,19 @@ const Right = (props) => {
<p style={{ textAlign: "left", width: "25%", position: "absolute", left: "5%", color: beijing == index ? "#ffffff" : "rgba(216,240,255,0.8)" }} >{item.road ? item.road : "--"}</p>
<p style={{ textAlign: "right", width: "30%", position: "absolute", right: "3%", color: beijing == index ? "#ffffff" : "rgba(216,240,255,0.8)" }}>{moment(item.time).format("YYYY-MM-DD HH:mm:ss") ? moment(item.time).format("YYYY-MM-DD HH:mm:ss") : "--"}</p>
{
num == index ? <div style={{ position: "fixed", width: "400px", height: "200px", zIndex: 100, left: "50%", marginTop: "0", top: "35%" }}>
<img src='/assets/images/leadership/beijinglan.png' style={{ width: "100%", height: "100%" }} />
<div style={{ width: "50%", height: "100%", position: "absolute", top: "0", }}>
<Hua shuzu={[{ "imgs": item.conserveAfterPic ? item.conserveAfterPic[0] : "" }, { "imgs": item.conserveBeforePic ? item.conserveBeforePic[0] : "" }, { "imgs": item.conserveUnderwayPic ? item.conserveUnderwayPic[0] : "" }]} />
</div>
<div style={{ position: "absolute", top: "0", width: "50%", left: "50%", paddingRight: "10px" }}>
<p style={{ marginTop: "20px", color: "#FFFFFF", fontSize: "16px", fontFamily: "YouSheBiaoTiHei" }}>{item.roadSectionStart ? item.roadSectionStart : ""}{item.roadSectionStart && item.roadSectionEnd ? "——" : ""}{item.roadSectionEnd ? item.roadSectionEnd : ""}{item.roadSectionStart || item.roadSectionEnd ? "" : "--"}</p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>养护类型<span style={{ color: "#EEF4FF", marginLeft: "30px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>日常养护</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>负责人<span style={{ color: "#EEF4FF", marginLeft: "45px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{item.user?.name ? item.user.name : "--"}</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>日期<span style={{ color: "#EEF4FF", marginLeft: "60px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{moment(item.time).format("YYYY-MM-DD") ? moment(item.time).format("YYYY-MM-DD") : "--"}</span></p>
</div>
</div> : ""
num == index ?
<div style={{ position: "fixed", width: "400px", height: "200px", zIndex: 100, left: "50%", marginTop: "0", top: "35%" }}>
<img src='/assets/images/leadership/beijinglan.png' style={{ width: "100%", height: "100%" }} />
<div style={{ width: "50%", height: "100%", position: "absolute", top: "0", }}>
<Hua shuzu={[{ "imgs": item.conserveAfterPic ? item.conserveAfterPic[0] : "" }, { "imgs": item.conserveBeforePic ? item.conserveBeforePic[0] : "" }, { "imgs": item.conserveUnderwayPic ? item.conserveUnderwayPic[0] : "" }]} />
</div>
<div style={{ position: "absolute", top: "0", width: "50%", left: "50%", paddingRight: "10px" }}>
<p style={{ marginTop: "20px", color: "#FFFFFF", fontSize: "16px", fontFamily: "YouSheBiaoTiHei" }}>{item.roadSectionStart ? item.roadSectionStart : ""}{item.roadSectionStart && item.roadSectionEnd ? "——" : ""}{item.roadSectionEnd ? item.roadSectionEnd : ""}{item.roadSectionStart || item.roadSectionEnd ? "" : "--"}</p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>养护类型<span style={{ color: "#EEF4FF", marginLeft: "30px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>日常养护</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>负责人<span style={{ color: "#EEF4FF", marginLeft: "45px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{item.user?.name ? item.user.name : "--"}</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>日期<span style={{ color: "#EEF4FF", marginLeft: "60px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{moment(item.time).format("YYYY-MM-DD") ? moment(item.time).format("YYYY-MM-DD") : "--"}</span></p>
</div>
</div> : ""
}
</li>
)
@ -88,7 +88,6 @@ const Right = (props) => {
}
return (
<>
{/* <Spin spinning={!nums && list && roads} tip="Loading" size="large" > */}
<div style={{ width: "100%", height: "100%", float: "right", marginRight: "1%", position: "relative" }}>
<div style={{ width: "100%", height: "43%", position: "relative", left: "1%" }}>
@ -118,7 +117,7 @@ const Right = (props) => {
{/* <p>{title || []}</p> */}
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "18%" }} />
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "19px" }}>养护事件</span>
<p style={{ position: "absolute", color: "#D8F0FF", fontSize: "14px", right: "6%" }}><span style={{ marginLeft: "-20%" }}>道路</span><span style={{ fontSize: "18px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", marginLeft: "10%" }}>{nums ? nums[0]?.count : 0}</span><span style={{ marginLeft: "10%" }}></span></p>
<p style={{ position: "absolute", color: "#D8F0FF", fontSize: "14px", right: "6%" }}><span style={{ marginLeft: "-20%" }}>道路</span><span style={{ fontSize: "18px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", marginLeft: "10%" }}>{nums}</span><span style={{ marginLeft: "10%" }}></span></p>
{/* <img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} /> */}
</div>
{/* <Spin spinning={true} style={{ height: "80%" }}> */}

14
web/client/src/sections/quanju/containers/public/olMap.js

@ -47,7 +47,7 @@ const OlMap = (props) => {
// console.log(p)
})
olMapTool.map.on('singleclick', function (p) {
setOlMapOpenData([])
olMapTool.closeOverlay('clickOpen')
olMapTool.removeGeometryLayer('geometry0')
@ -70,8 +70,8 @@ const OlMap = (props) => {
// geometryType: 'Point',
},
],
style: { stroke: { width: 10, color: '#9933FF' } },
selectStyle: { stroke: { width: 5, color: '#9933FF' } },
style: { stroke: { width: 5, color: '#9933FF' } },
selectStyle: { stroke: { width: 8, color: '#9933FF' } },
layerName: 'geometry' + index++
});
const config = {
@ -113,10 +113,10 @@ const OlMap = (props) => {
v: de['roadends'],
}, {
n: '路段里程',
v:
!isNaN(de['roadends']) && !isNaN(de['roadstart']) ?
de['roadends'] - de['roadstart']
: '-',
v: de['f067']
// !isNaN(de['roadends']) && !isNaN(de['roadstart']) ?
// de['roadends'] - de['roadstart']
// : '-',
}, {
n: '技术等级',
v: de['f014'],

Loading…
Cancel
Save