wangyue 2 years ago
parent
commit
0598075d8c
  1. 2
      api/.vscode/launch.json
  2. 4
      api/Dockerfile
  3. 300
      api/app/lib/controllers/data/index.js
  4. 25
      api/app/lib/controllers/data/overspeed.js
  5. 7
      api/app/lib/controllers/file/index.js
  6. 2
      api/app/lib/controllers/organization/department.js
  7. 17
      api/app/lib/controllers/overview/building.js
  8. 5
      api/app/lib/controllers/overview/management.js
  9. 13
      api/app/lib/controllers/report/index.js
  10. 20
      api/app/lib/models/report.js
  11. 4
      api/config.js
  12. 41
      api/log/development.log
  13. 29
      api/utils/xlsxDownload.js
  14. 140
      code996.sh
  15. 19
      jenkinsfile_script_init_report_pic_data
  16. 2
      scripts/0.0.1/data/1_update_user_dep_data.sql
  17. 11
      scripts/0.0.1/data/3_init_report_pic_data/Dockerfile
  18. 29
      scripts/0.0.1/data/3_init_report_pic_data/index.js
  19. 10
      scripts/0.0.1/data/4_file_type_data.sql
  20. 3
      weapp/src/app.config.js
  21. 21
      weapp/src/config.js
  22. 166
      weapp/src/packages/patrol/index.jsx
  23. 2
      weapp/src/packages/patrolView/index.jsx
  24. 3
      weapp/src/packages/video/index.config.js
  25. 85
      weapp/src/packages/video/index.jsx
  26. 28
      weapp/src/packages/video/index.scss
  27. 8
      weapp/src/pages/home/index.jsx
  28. 4
      weapp/src/pages/user/index.jsx
  29. 5
      weapp/src/services/api.js
  30. 8
      web/Dockerfile
  31. 47
      web/client/src/components/Upload/index.js
  32. 93
      web/client/src/sections/fillion/actions/infor.js
  33. 18
      web/client/src/sections/fillion/components/bridgeTable.js
  34. 10
      web/client/src/sections/fillion/components/enforceTable.js
  35. 20
      web/client/src/sections/fillion/components/fileTable.js
  36. 5
      web/client/src/sections/fillion/components/gis/patrolGis.js
  37. 6
      web/client/src/sections/fillion/components/highwaysTable.js
  38. 2
      web/client/src/sections/fillion/components/infor/details.js
  39. 67
      web/client/src/sections/fillion/components/infor/videoUpload.js
  40. 35
      web/client/src/sections/fillion/components/inforTable.js
  41. 94
      web/client/src/sections/fillion/components/maintenanceTable.js
  42. 70
      web/client/src/sections/fillion/components/operationalTable.js
  43. 103
      web/client/src/sections/fillion/components/patrolTable.js
  44. 4
      web/client/src/sections/fillion/components/project/project.js
  45. 177
      web/client/src/sections/fillion/components/promotionalTable.js
  46. 3
      web/client/src/sections/fillion/components/protable.less
  47. 14
      web/client/src/sections/fillion/components/publicTable.js
  48. 26
      web/client/src/sections/fillion/components/transportationTable.js
  49. 16
      web/client/src/sections/fillion/containers/maintenance.js
  50. 16
      web/client/src/sections/fillion/containers/patrol.js
  51. 22
      web/client/src/sections/fillion/containers/public.js
  52. 4
      web/client/src/sections/fillion/nav-item.js
  53. 6
      web/client/src/sections/quanju/containers/example.js
  54. 1
      web/client/src/sections/quanju/containers/footer/build/Leftbottom.js
  55. 35
      web/client/src/sections/quanju/containers/footer/build/Rightbottom.js
  56. 397
      web/client/src/sections/quanju/containers/footer/build/index.js
  57. 20
      web/client/src/sections/quanju/containers/footer/build/style.less
  58. 2
      web/client/src/sections/quanju/containers/footer/conserve/index.js
  59. 10
      web/client/src/sections/quanju/containers/footer/conserve/left.js
  60. 11
      web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js
  61. 8
      web/client/src/sections/quanju/containers/footer/conserve/left/left-center.js
  62. 10
      web/client/src/sections/quanju/containers/footer/conserve/right.js
  63. 48
      web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js
  64. 10
      web/client/src/sections/quanju/containers/footer/gis/gis.js
  65. 11
      web/client/src/sections/quanju/containers/footer/guanli/index.js
  66. 14
      web/client/src/sections/quanju/containers/footer/guanli/style.less
  67. 2
      web/client/src/sections/quanju/containers/footer/leadership/centerLeft.js
  68. 37
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js
  69. 29
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/handong.js
  70. 22
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/qiqoliang.js
  71. 6
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/top.js
  72. 2
      web/client/src/sections/quanju/containers/footer/leadership/left.js
  73. 2
      web/client/src/sections/quanju/containers/footer/leadership/left/echarts/leftbottomecharts.js
  74. 14
      web/client/src/sections/quanju/containers/footer/leadership/left/echarts/lefttopecharts.js
  75. 14
      web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js
  76. 25
      web/client/src/sections/quanju/containers/footer/leadership/left/left-top.js
  77. 2
      web/client/src/sections/quanju/containers/footer/leadership/right.js
  78. 2
      web/client/src/sections/quanju/containers/footer/leadership/right/hudong.js
  79. 29
      web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js
  80. 22
      web/client/src/sections/quanju/containers/footer/leadership/right/right-top.js
  81. 2
      web/client/src/sections/quanju/containers/footer/operation/index.js
  82. 2
      web/client/src/sections/quanju/containers/footer/operation/left.js
  83. 44
      web/client/src/sections/quanju/containers/footer/operation/right.js
  84. 2
      web/client/src/sections/quanju/containers/heand/index.js
  85. 212
      web/client/src/utils/smart-sort.js
  86. 16
      web/client/src/utils/webapi.js
  87. 6
      web/config.js
  88. 15
      web/routes/attachment/index.js

2
api/.vscode/launch.json

@ -13,7 +13,7 @@
"NODE_ENV": "development" "NODE_ENV": "development"
}, },
"args": [ "args": [
"-p 4000", "-p 14000",
"-f http://localhost:4000", "-f http://localhost:4000",
"-g postgres://postgres:123@10.8.30.32:5432/highways4good", "-g postgres://postgres:123@10.8.30.32:5432/highways4good",
"--qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5", "--qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5",

4
api/Dockerfile

@ -1,4 +1,4 @@
FROM repository.anxinyun.cn/devops/node:12-dev as builder FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node:12-dev as builder
COPY . /var/app COPY . /var/app
@ -10,7 +10,7 @@ RUN npm config set registry=http://10.8.30.22:7000
RUN echo "{\"time\":\"$BUILD_TIMESTAMP\",\"build\": \"$BUILD_NUMBER\",\"revision\": \"$SVN_REVISION_1\",\"URL\":\"$SVN_URL_1\"}" > version.json RUN echo "{\"time\":\"$BUILD_TIMESTAMP\",\"build\": \"$BUILD_NUMBER\",\"revision\": \"$SVN_REVISION_1\",\"URL\":\"$SVN_URL_1\"}" > version.json
RUN npm cache clean -f RUN npm cache clean -f
RUN rm -rf package-lock.json RUN rm -rf package-lock.json
RUN npm install --registry http://10.8.30.22:7000 RUN npm install --registry http://10.8.30.22:7000 --legacy-peer-deps
FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node:12 FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node:12

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

@ -2,109 +2,213 @@
// const { simpleExcelDown } = require('../../../../utils/xlsxDownload'); // const { simpleExcelDown } = require('../../../../utils/xlsxDownload');
async function dataExport (ctx) { async function dataExport(ctx) {
try { try {
// const models = ctx.fs.dc.models; // const models = ctx.fs.dc.models;
// const { userId } = ctx.fs.api // const { userId } = ctx.fs.api
// const { ids } = ctx.query; // const { ids } = ctx.query;
// const fileList = [
// {
// n: '道路',
// tableName: 'road',
// defaultKey: ['level'],
// defaultValue: ['村'],
// },
// {
// n: '道路',
// tableName: 'road',
// defaultKey: ['level'],
// defaultValue: ['县'],
// },
// {
// n: '道路',
// tableName: 'road',
// defaultKey: ['level'],
// defaultValue: ['乡'],
// },
// {
// n: '桥梁',
// tableName: 'bridge'
// },
// {
// n: '运政车辆',
// tableName: 'municipal_vehicle',
// defaultKey: ['type'],
// defaultValue: ['出租车'],
// },
// {
// n: '运政车辆',
// tableName: 'municipal_vehicle',
// defaultKey: ['type'],
// defaultValue: ['危货'],
// },
// {
// n: '运政业户',
// tableName: 'municipal_business',
// defaultKey: ['type'],
// defaultValue: ['出租车'],
// },
// {
// n: '运政业户',
// tableName: 'municipal_business',
// defaultKey: ['type'],
// defaultValue: ['危货'],
// },
// {
// n: '工程一览',
// tableName: 'project',
// defaultKey: ['done', 'type'],
// defaultValue: [false, 'road'],
// },
// {
// n: '工程一览',
// tableName: 'project',
// defaultKey: ['done', 'type'],
// defaultValue: [false, 'bridge'],
// },
// {
// n: '治超',
// tableName: 'overspeed',
// },
// {
// n: '公交线路',
// tableName: 'bus_line',
// },
// {
// n: '公交车辆',
// tableName: 'bus_car',
// },
// ]
<<<<<<< HEAD
// const exportData = await models.BusCar.destroy({
// where: {
// id: { $in: ids.split(',') }
// }
// })
=======
const modalList = [
{
n: '道路',
k: 'road',
tableName: 'Road',
},
{
n: '桥梁',
k: 'bridge',
tableName: 'Bridge'
},
{
n: '运政车辆',
k: 'vehicle',
tableName: 'MunicipalVehicle',
},
{
n: '运政业户',
k: 'business',
tableName: 'MunicipalBusiness',
},
{
n: '工程一览',
k: 'project',
tableName: 'Project',
},
{
n: '治超',
k: 'overspeed',
tableName: 'Overspeed',
},
{
n: '公交线路',
k: 'busLine',
tableName: 'BusLine',
},
{
n: '公交车辆',
k: 'busCar',
tableName: 'BusCar',
},
{
n: '巡更记录',
k: 'patrol',
tableName: 'Report',
},
{
n: '养护记录',
k: 'maintenance',
tableName: 'Report',
},
]
>>>>>>> d8f96cea72338cf7a61dea293bd6d0cd5da48bb0
// const fileList = [ // const fileName = `摄像头信息列表_${moment().format('YYYYMMDDHHmmss')}` + '.csv'
// { // const filePath = await simpleExcelDown({ data: exportData, header, fileName: fileName })
// n: '道路', // const fileData = fs.readFileSync(filePath);
// tableName: 'road',
// defaultKey: ['level'], <<<<<<< HEAD
// defaultValue: ['村'], // ctx.status = 200;
// }, // ctx.set('Content-Type', 'application/x-xls');
// { // ctx.set('Content-disposition', 'attachment; filename=' + encodeURI(fileName));
// n: '道路', // ctx.body = fileData;
// tableName: 'road', } catch (error) {
// defaultKey: ['level'], // ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
// defaultValue: ['县'], // ctx.status = 400;
// }, // ctx.body = {
// { // message: typeof error == 'string' ? error : undefined
// n: '道路', // }
// tableName: 'road', }
// defaultKey: ['level'], =======
// defaultValue: ['乡'], let findOption = {
// }, where: {}
// { }
// n: '桥梁', if (ids) {
// tableName: 'bridge' findOption.where.id = { $in: ids.split(',') }
// }, }
// { if (roadLevel) {
// n: '运政车辆', findOption.where.level = roadLevel
// tableName: 'municipal_vehicle', }
// defaultKey: ['type'], if (municipalType) {
// defaultValue: ['出租车'], findOption.where.type = municipalType
// }, }
// {
// n: '运政车辆',
// tableName: 'municipal_vehicle',
// defaultKey: ['type'],
// defaultValue: ['危货'],
// },
// {
// n: '运政业户',
// tableName: 'municipal_business',
// defaultKey: ['type'],
// defaultValue: ['出租车'],
// },
// {
// n: '运政业户',
// tableName: 'municipal_business',
// defaultKey: ['type'],
// defaultValue: ['危货'],
// },
// {
// n: '工程一览',
// tableName: 'project',
// defaultKey: ['done', 'type'],
// defaultValue: [false, 'road'],
// },
// {
// n: '工程一览',
// tableName: 'project',
// defaultKey: ['done', 'type'],
// defaultValue: [false, 'bridge'],
// },
// {
// n: '治超',
// tableName: 'overspeed',
// },
// {
// n: '公交线路',
// tableName: 'bus_line',
// },
// {
// n: '公交车辆',
// tableName: 'bus_car',
// },
// ]
// const exportData = await models.BusCar.destroy({ const exportData = await models[modalOption.tableName].findAll(findOption)
// where: { const tableAttributes = models[modalOption.tableName].tableAttributes
// id: { $in: ids.split(',') } let header = []
// } for (let k in tableAttributes) {
// }) const comment = tableAttributes[k].comment
if (k != 'id' && comment) {
if (comment == '品名' && municipalType == '出租车') {
continue
}
header.push({
title: comment || '-',
key: k,
index: tableAttributes[k].index,
})
}
}
header.sort((a, b) => { return a.index - b.index })
// const fileName = `摄像头信息列表_${moment().format('YYYYMMDDHHmmss')}` + '.csv' const fileName = `${modalOption.n}_${moment().format('YYYYMMDDHHmmss')}` + '.csv'
// const filePath = await simpleExcelDown({ data: exportData, header, fileName: fileName }) const filePath = await xlsxDownload.simpleExcelDown({ data: exportData, header, fileName: fileName, exp })
// const fileData = fs.readFileSync(filePath); const fileData = fs.readFileSync(filePath);
// ctx.status = 200; ctx.status = 200;
// ctx.set('Content-Type', 'application/x-xls'); ctx.set('Content-Type', 'application/x-xls');
// ctx.set('Content-disposition', 'attachment; filename=' + encodeURI(fileName)); ctx.set('Content-disposition', 'attachment; filename=' + encodeURI(fileName));
// ctx.body = fileData; ctx.body = fileData;
} catch (error) { } catch (error) {
// ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
// ctx.status = 400; ctx.status = 400;
// ctx.body = { ctx.body = {
// message: typeof error == 'string' ? error : undefined message: typeof error == 'string' ? error : undefined
// } }
} }
>>>>>>> d8f96cea72338cf7a61dea293bd6d0cd5da48bb0
} }
async function godTrans (ctx) { async function godTrans(ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { userId } = ctx.fs.api const { userId } = ctx.fs.api
@ -125,5 +229,5 @@ async function godTrans (ctx) {
} }
module.exports = { module.exports = {
dataExport dataExport
}; };

25
api/app/lib/controllers/data/overspeed.js

@ -34,16 +34,27 @@ async function overspeedGet (ctx) {
if (numberOfAxles) { if (numberOfAxles) {
findOption.where.numberOfAxles = numberOfAxles findOption.where.numberOfAxles = numberOfAxles
} }
if (overrunRateUpper) {
findOption.where.overrunRate = { if (overrunRateUpper && overrunRateFloor) {
$lte: overrunRateUpper findOption.where['$and'] = []
findOption.where['$and'].push
({ overrunRate: { $lte: overrunRateUpper } })
findOption.where['$and'].push
({ overrunRate: { $gte: overrunRateFloor } })
} else {
if (overrunRateUpper) {
findOption.where.overrunRate = {
$lte: overrunRateUpper
}
} }
} if (overrunRateFloor) {
if (overrunRateFloor) { findOption.where.overrunRate = {
findOption.where.overrunRate = { $gte: overrunRateFloor
$gte: overrunRateFloor }
} }
} }
if (testTime) { if (testTime) {
findOption.where.testTime = { findOption.where.testTime = {
$between: [moment(testTime).startOf('day').format(), moment(testTime).endOf('day').format()] $between: [moment(testTime).startOf('day').format(), moment(testTime).endOf('day').format()]

7
api/app/lib/controllers/file/index.js

@ -167,6 +167,10 @@ async function getFileList(ctx, next) {
queryOptions.roadId = roadId queryOptions.roadId = roadId
} }
rslt.road = await models.FileRoad.findOne({
where: { rId: roadId }
})
rslt.type = await models.FileType.findOne({ rslt.type = await models.FileType.findOne({
where: { fId } where: { fId }
}) })
@ -179,6 +183,9 @@ async function getFileList(ctx, next) {
['id', 'DESC'] ['id', 'DESC']
] ]
}) })
rslt.counter = await models.Files.count({ rslt.counter = await models.Files.count({
where: queryOptions where: queryOptions
}) })

2
api/app/lib/controllers/organization/department.js

@ -70,6 +70,7 @@ async function editDep (ctx) {
dependence: dependence || null, dependence: dependence || null,
name: name, name: name,
id: { $ne: depId }, id: { $ne: depId },
delete: false
} }
}) })
if (repeatNameCount) { if (repeatNameCount) {
@ -88,6 +89,7 @@ async function editDep (ctx) {
where: { where: {
dependence: dependence || null, dependence: dependence || null,
name: name, name: name,
delete: false,
} }
}) })
if (repeatNameCount) { if (repeatNameCount) {

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

@ -191,6 +191,17 @@ async function roadState (ctx) {
} else { } else {
roadState.townProject[townName] = 1 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 roadState.buildedRoad += roadCode.size
for (let t of Object.keys(roadState.townRoad)) { 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 delete roadState.townRoad[t].roadCode
} }

5
api/app/lib/controllers/overview/management.js

@ -19,7 +19,10 @@ async function overSpeedList (ctx) {
const overSpeedProcessedCount = await models.Overspeed.count({ const overSpeedProcessedCount = await models.Overspeed.count({
where: { where: {
processingTime: { $ne: null } $and: [
{ processingTime: { $ne: null } },
{ processingTime: { $ne: '' } }
]
} }
}) })

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

@ -1,10 +1,10 @@
'use strict'; 'use strict';
const { QueryTypes } = require('sequelize'); const { QueryTypes } = require('sequelize');
async function reportList(ctx) { async function reportList (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { limit, page, startTime, endTime, keyword, userId, reportType, isTop } = ctx.query const { limit, page, startTime, endTime, keyword, userId, reportType, isTop, asc } = ctx.query
let findOption = { let findOption = {
where: { where: {
@ -14,6 +14,7 @@ async function reportList(ctx) {
model: models.User, model: models.User,
attributes: ['name'] attributes: ['name']
}], }],
order: [['time', asc ? 'ASC': 'DESC']],
} }
if (limit) { if (limit) {
findOption.limit = limit findOption.limit = limit
@ -60,7 +61,7 @@ async function reportList(ctx) {
} }
} }
async function reportPosition(ctx) { async function reportPosition (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { startTime, endTime, userId, reportType } = ctx.query const { startTime, endTime, userId, reportType } = ctx.query
@ -110,7 +111,7 @@ async function reportPosition(ctx) {
} }
} }
async function reportDetail(ctx) { async function reportDetail (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { reportId } = ctx.params const { reportId } = ctx.params
@ -132,7 +133,7 @@ async function reportDetail(ctx) {
} }
} }
async function createReport(ctx) { async function createReport (ctx) {
try { try {
const { userId } = ctx.fs.api const { userId } = ctx.fs.api
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
@ -154,7 +155,7 @@ async function createReport(ctx) {
} }
} }
async function deleteReport(ctx) { async function deleteReport (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { reportId } = ctx.params; const { reportId } = ctx.params;

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

@ -21,7 +21,7 @@ module.exports = dc => {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: false, allowNull: false,
defaultValue: null, defaultValue: null,
comment: "上报类型 巡查:patrol / 养护:conserve", comment: "上报类型",
primaryKey: false, primaryKey: false,
field: "report_type", field: "report_type",
autoIncrement: false autoIncrement: false
@ -31,7 +31,7 @@ module.exports = dc => {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: false, allowNull: false,
defaultValue: null, defaultValue: null,
comment: "工程类型 道路:road / 桥梁:birdge / 涵洞:culvert", comment: "工程类型",
primaryKey: false, primaryKey: false,
field: "project_type", field: "project_type",
autoIncrement: false autoIncrement: false
@ -41,7 +41,7 @@ module.exports = dc => {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: null, comment: '所属道路',
primaryKey: false, primaryKey: false,
field: "road", field: "road",
autoIncrement: false autoIncrement: false
@ -51,7 +51,7 @@ module.exports = dc => {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: null, comment: '开始路段',
primaryKey: false, primaryKey: false,
field: "road_section_start", field: "road_section_start",
autoIncrement: false autoIncrement: false
@ -61,7 +61,7 @@ module.exports = dc => {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: null, comment: '结束路段',
primaryKey: false, primaryKey: false,
field: "road_section_end", field: "road_section_end",
autoIncrement: false autoIncrement: false
@ -71,7 +71,7 @@ module.exports = dc => {
type: DataTypes.DOUBLE, type: DataTypes.DOUBLE,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: null, comment: '经度',
primaryKey: false, primaryKey: false,
field: "longitude", field: "longitude",
autoIncrement: false autoIncrement: false
@ -81,7 +81,7 @@ module.exports = dc => {
type: DataTypes.DOUBLE, type: DataTypes.DOUBLE,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: null, comment: '纬度',
primaryKey: false, primaryKey: false,
field: "latitude", field: "latitude",
autoIncrement: false autoIncrement: false
@ -91,7 +91,7 @@ module.exports = dc => {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: null, comment: '具体内容',
primaryKey: false, primaryKey: false,
field: "content", field: "content",
autoIncrement: false autoIncrement: false
@ -151,7 +151,7 @@ module.exports = dc => {
type: DataTypes.DATE, type: DataTypes.DATE,
allowNull: false, allowNull: false,
defaultValue: null, defaultValue: null,
comment: null, comment: '创建日期',
primaryKey: false, primaryKey: false,
field: "time", field: "time",
autoIncrement: false autoIncrement: false
@ -161,7 +161,7 @@ module.exports = dc => {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: null, comment: '具体位置',
primaryKey: false, primaryKey: false,
field: "address", field: "address",
autoIncrement: false autoIncrement: false

4
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 FS_UNIAPP_DB = process.env.FS_UNIAPP_DB || flags.pg;
// const LOCAL_SVR_ORIGIN = process.env.LOCAL_SVR_ORIGIN || flags.fileHost; // 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_BUCKET_RESOURCE = process.env.ANXINCLOUD_QINIU_BUCKET_RESOURCE || flags.qnbkt;
const QINIU_AK = process.env.ANXINCLOUD_QINIU_ACCESSKEY || flags.qnak; const QINIU_AK = process.env.ANXINCLOUD_QINIU_ACCESSKEY || flags.qnak;
const QINIU_SK = process.env.ANXINCLOUD_QINIU_SECRETKEY || flags.qnsk; const QINIU_SK = process.env.ANXINCLOUD_QINIU_SECRETKEY || flags.qnsk;
@ -52,7 +52,7 @@ const product = {
accessKey: QINIU_AK, accessKey: QINIU_AK,
secretKey: QINIU_SK secretKey: QINIU_SK
}, },
maxSize: 104857600, // 100M maxSize: 104857600 * 2, // 100M * 2
} }
}, { }, {
entry: require('./app').entry, entry: require('./app').entry,

41
api/log/development.log

@ -10659,6 +10659,7 @@ headers: {}
2022-07-28 21:48:22.652 - debug: [FS-LOGGER] Init. 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-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-28 21:48:22.760 - info: [FS-AUTH] Inject auth and api mv into router.
<<<<<<< HEAD
2022-08-10 17:08:11.424 - debug: [FS-LOGGER] Init. 2022-08-10 17:08:11.424 - debug: [FS-LOGGER] Init.
2022-08-10 17:08:11.680 - info: [FS-ATTACHMENT] Inject attachment mw into router. 2022-08-10 17:08:11.680 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-10 17:08:11.680 - info: [FS-AUTH] Inject auth and api mv into router. 2022-08-10 17:08:11.680 - info: [FS-AUTH] Inject auth and api mv into router.
@ -10775,3 +10776,43 @@ headers: {}
' at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)\n' + ' at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)\n' +
' at internal/main/run_main_module.js:17:47' ' at internal/main/run_main_module.js:17:47'
} }
=======
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.
2022-07-30 14:19:21.439 - debug: [FS-LOGGER] Init.
2022-07-30 14:19:21.547 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-30 14:19:21.547 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-30 14:30:16.777 - error: path: /publicity, error: Error: Invalid value {
uid: -1659162615,
name: 'video.mp4',
status: 'done',
storageUrl: 'project/45017725-be73-4ec7-99a5-f57c2fde5682/video.mp4',
url: 'http://rfkimpwbb.hn-bkt.clouddn.com/project/45017725-be73-4ec7-99a5-f57c2fde5682/video.mp4',
size: 2172089
}
2022-07-30 14:30:47.375 - error: path: /publicity, error: Error: Invalid value {
uid: -1659162647,
name: 'video.mp4',
status: 'done',
storageUrl: 'project/ec692a52-13e2-4bd1-80fb-5cae1386c782/video.mp4',
url: 'http://rfkimpwbb.hn-bkt.clouddn.com/project/ec692a52-13e2-4bd1-80fb-5cae1386c782/video.mp4',
size: 2172089
}
2022-07-30 16:53:41.602 - error: path: /data/export, error: 参数错误
2022-07-30 16:59:14.475 - debug: [FS-LOGGER] Init.
2022-07-30 16:59:14.573 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-30 16:59:14.573 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-30 17:19:58.438 - debug: [FS-LOGGER] Init.
2022-07-30 17:19:58.538 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-30 17:19:58.539 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-30 17:48:40.061 - debug: [FS-LOGGER] Init.
2022-07-30 17:48:40.152 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-30 17:48:40.152 - info: [FS-AUTH] Inject auth and api mv into router.
>>>>>>> d8f96cea72338cf7a61dea293bd6d0cd5da48bb0

29
api/utils/xlsxDownload.js

@ -16,7 +16,7 @@ async function makeDir (dir) {
} }
} }
async function simpleExcelDown ({ data = [], header = [], fileName = moment().format('YYYY-MM-DD HH:mm:ss') } = {}) { async function simpleExcelDown ({ data = [], header = [], fileName = moment().format('YYYY-MM-DD HH:mm:ss'), exp } = {}) {
const fileDirPath = path.join(__dirname, `../../downloadFiles`) const fileDirPath = path.join(__dirname, `../../downloadFiles`)
makeDir(fileDirPath) makeDir(fileDirPath)
const file = new xlsx.File(); const file = new xlsx.File();
@ -57,6 +57,33 @@ async function simpleExcelDown ({ data = [], header = [], fileName = moment().fo
for (let h of header) { for (let h of header) {
const cell = row.addCell(); const cell = row.addCell();
cell.value = data[i][h.key]; cell.value = data[i][h.key];
if (exp == 'patrol' || exp == 'maintenance') {
if (h.key == 'projectType') {
let type = data[i][h.key]
if (type == 'road') {
cell.value = '道路'
} else if (type == 'bridge') {
cell.value = '桥梁'
} else if (type == 'culvert') {
cell.value = '涵洞'
} else if (type == 'other') {
cell.value = '其他'
}
continue
}
if (h.key == 'reportType') {
let type = data[i][h.key]
if (type == 'patrol') {
cell.value = '巡查'
} else if (type == 'conserve') {
cell.value = '养护'
}
continue
}
}
cell.style = style cell.style = style
} }
} }

140
code996.sh

@ -0,0 +1,140 @@
#!/usr/bin/env bash
Help()
{
echo "你也可以使用自定义参数进行指定查询"
echo
echo "格式: bash $0 [2021-01-01] [2022-04-04] [author]"
echo "示例: bash code996.sh 2021-01-01 2022-12-31 digua"
echo "参数:"
echo "1st 分析的起始时间."
echo "2nd 分析的结束时间."
echo "3rd 指定提交用户,可以是 name 或 email."
echo
}
OS_DETECT()
{
# Detect OS
case "$(uname -s)" in
Linux)
# echo 'Linux'
open_url="xdg-open"
;;
Darwin)
# echo 'macOS'
open_url="open"
;;
CYGWIN*|MINGW32*|MSYS*|MINGW*)
# echo 'Windows'
open_url="start"
;;
*)
echo 'Other OS'
echo "trying to use xdg-open to open the url"
open_url="xdg-open"
;;
esac
}
OS_DETECT
time_start=$1
if [ "$1" == "--help" ]
then
Help
exit 0
elif [ "$1" == "-h" ]
then
Help
exit 0
fi
if [ -z $1 ]
then
time_start="2021-01-01"
fi
time_end=$2
if [ -z $2 ]
then
time_end=$(date "+%Y-%m-%d")
fi
author=$3
if [ -z $3 ]
then
author=""
fi
by_day_output=`git -C $PWD log --author=$author --date=format:%u --after="$time_start" --before="$time_end" |grep "Date:"|awk '{print $2}'|sort|uniq -c`
by_hour_output=`git -C $PWD log --author=$author --date=format:%H --after="$time_start" --before="$time_end" |grep "Date:"|awk '{print $2}'|sort|uniq -c`
for i in "${by_day_output[@]}"
do
by_day_result=`echo "$i"|sed -E 's/^ +//g'|sed 's/ /_/g'|tr '\n' ','`
done
# should modify by day format %a or %A
# day_sorted=('Monday' 'Tuesday' 'Wednesday' 'Thursday' 'Friday' 'Saturday' 'Sunday')
# day_sorted=('Mon' 'Tue' 'Wed' 'Thu' 'Fri' 'Sat' 'Sun')
RED='\033[1;91m'
NC='\033[0m' # No Color
echo -e "${RED}统计时间范围:$time_start$time_end"
for i in "${by_day_output[@]}"
do
echo
echo -e "${NC}一周七天 commit 分布${RED}"
echo -e " 总提交次数 星期\n$i"|column -t
by_day_result=`echo "$i"|sed -E 's/^ +//g'|sed "s/ /_/g"|tr '\n' ','`
done
for i in "${by_hour_output[@]}"
do
echo
echo -e "${NC}24小时 commit 分布${RED}"
echo -e " 总提交次数 小时\n$i"|column -t
by_hour_result=`echo "$i"|sed -E 's/^ +//g'|sed "s/ /_/g"|tr '\n' ','`
done
by_day_result=`echo "$by_day_result"|sed -E 's/,$//g'`
by_hour_result=`echo "$by_hour_result"|sed -E 's/,$//g'`
result=$time_start"_"$time_end"&week="$by_day_result"&hour="$by_hour_result
# url
github_url="https://hellodigua.github.io/code996/#/result?time=$result"
vercel_url="https://code996.vercel.app/#/result?time=$result"
gitee_url="https://hellodigua.gitee.io/code996/#/result?time=$result"
echo
echo -e "${NC}复制以下url以查看可视化分析结果:"
echo -e "${RED}$github_url"
echo -e "${NC}"
echo -e "${NC}若 GitHub 访问过慢,也可以访问以下镜像链接:"
echo -e "${NC}Vercel节点:"
echo -e "${RED}$vercel_url"
echo -e "${NC}"
echo -e "${NC}Gitee节点:"
echo -e "${RED}$gitee_url"
echo -e "${NC}"
$open_url "$github_url"

19
jenkinsfile_script_init_report_pic_data

@ -0,0 +1,19 @@
pipeline {
agent {
node{
label 'jnlp-slave'
}
}
stages {
stage('Highways4Good Api ......') {
steps {
sh 'switch-auth.sh anxinyun'
buildName "#${BUILD_NUMBER} ~/fs-cloud/${JOB_NAME}:${IMAGE_VERSION}"
buildDescription "registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION}"
sh 'docker build -t registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION} ./scripts/0.0.1/data/3_init_report_pic_data'
sh 'docker push registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION}'
}
}
}
}

2
scripts/0.0.1/data/1_update_user_dep_data.sql

@ -5,4 +5,4 @@ INSERT INTO "department" VALUES (1, '默认部门', NULL, false);
-- ---------------------------- -- ----------------------------
-- Records of user -- Records of user
-- ---------------------------- -- ----------------------------
INSERT INTO "user" VALUES (1, '管理员', 'SuperAdmin', 'e10adc3949ba59abbe56e057f20f883e', 1, 'f', NULL, 'SuperAdmin', NULL, TRUE); INSERT INTO "user" VALUES (1, '管理员', 'SuperAdmin', 'e10adc3949ba59abbe56e057f20f883e', 1, 'f', 'sp', 'SuperAdmin', NULL, TRUE);

11
scripts/0.0.1/data/3_init_report_pic_data/Dockerfile

@ -0,0 +1,11 @@
FROM repository.anxinyun.cn/base-images/nodejs12:20.10.12.2
COPY . /var/app
WORKDIR /var/app
RUN npm cache clean -f
RUN rm -rf package-lock.json
RUN npm install --registry http://10.8.30.22:7000
CMD ["node", "index.js"]

29
scripts/0.0.1/data/3_init_report_pic_data/index.js

@ -9,18 +9,31 @@ try {
const qiniu = require('qiniu'); const qiniu = require('qiniu');
const uuidv4 = require('uuid/v4'); const uuidv4 = require('uuid/v4');
// 连接数据库 // 测试环境
// const pool = new Pool({
// user: 'FashionAdmin',
// host: '10.8.30.156',
// database: 'highway4goodn0728',
// password: '123456',
// port: 5432,
// })
// // 7niu 验证
// const accessKey = '5XrM4wEB9YU6RQwT64sPzzE6cYFKZgssdP5Kj3uu'
// const secretKey = 'w6j2ixR_i-aelc6I7S3HotKIX-ukMzcKmDfH6-M5'
// const bucket = 'anxinyun-test'
// 商用环境
const pool = new Pool({ const pool = new Pool({
user: 'postgres', user: 'highwayadmin',
host: '10.8.30.32', host: '10.8.40.223',
database: 'highways4good', database: 'highway4good',
password: '123', password: 'highway123',
port: 5432, port: 5432,
}) })
// 7niu 验证 // 7niu 验证
const accessKey = 'XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5' const accessKey = '5XrM4wEB9YU6RQwT64sPzzE6cYFKZgssdP5Kj3uu'
const secretKey = 'yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa' const secretKey = 'w6j2ixR_i-aelc6I7S3HotKIX-ukMzcKmDfH6-M5'
const bucket = 'dev-highways4good' const bucket = 'anxinyun'

10
scripts/0.0.1/data/4_file_type_data.sql

@ -0,0 +1,10 @@
-- ----------------------------
-- Records of file_type
-- ----------------------------
BEGIN;
INSERT INTO "public"."file_type" VALUES (1, '前期资料', NULL);
INSERT INTO "public"."file_type" VALUES (3, '竣工资料', NULL);
INSERT INTO "public"."file_type" VALUES (4, '维修资料', NULL);
INSERT INTO "public"."file_type" VALUES (5, '道路图片', NULL);
INSERT INTO "public"."file_type" VALUES (2, '施工资料', NULL);
COMMIT;

3
weapp/src/app.config.js

@ -10,7 +10,8 @@ export default {
'patrol/index', 'patrol/index',
'patrolView/index', 'patrolView/index',
'changePassword/index', 'changePassword/index',
'changePassword/success/index' 'changePassword/success/index',
'video/index',
] ]
}], }],
permission: { permission: {

21
weapp/src/config.js

@ -1,5 +1,5 @@
let DEV = false; let DEV = false;
DEV = true; //使用测试环境 // DEV = true; //使用测试环境
const baseConfig = { const baseConfig = {
errorHandle: false, //是否启用全局异常处理‌‍‍‌‍​‌‌‍​‌‌‌‌‌​‌‌‍‌​‍‌‌‌‌​‍‍‍‍‌​‌‍‍‌‍​‌‌‍​‍‍‍‌‌​‍‌‌‌‌​‍‌‍‌​‍‌‌‌O errorHandle: false, //是否启用全局异常处理‌‍‍‌‍​‌‌‍​‌‌‌‌‌​‌‌‍‌​‍‌‌‌‌​‍‍‍‍‌​‌‍‍‌‍​‌‌‍​‍‍‍‌‌​‍‌‌‌‌​‍‌‍‌​‍‌‌‌O
@ -8,19 +8,22 @@ const baseConfig = {
}; };
const development = { const development = {
baseUrl: 'https://c5a6-117-90-37-10.ap.ngrok.io', baseUrl: 'http://221.230.55.29:31919',
webUrl: 'https://smartwater.anxinyun.cn', // baseUrl: 'https://d763-117-90-37-10.ap.ngrok.io',
pcode: 'fce4afe2-5b6a-408a-ab18-a2afa7fa027c', // webUrl: 'https://smartwater.anxinyun.cn',
imgUrl: 'http://test.resources.anxinyun.cn/', // pcode: 'fce4afe2-5b6a-408a-ab18-a2afa7fa027c',
// imgUrl: 'http://rfkimpwbb.hn-bkt.clouddn.com/',
imgUrl: 'http://resources-test.anxinyun.cn/',
// requestCache: true, //开启异步请求缓存 // requestCache: true, //开启异步请求缓存
...baseConfig ...baseConfig
}; };
const production = { const production = {
baseUrl: 'https://wxapp.free-sun.vip/v1/api', baseUrl: 'https://sihao.anxinyun.cn/_api',
webUrl: 'http://218.3.150.105:8998', // baseUrl: 'https://d763-117-90-37-10.ap.ngrok.io',
pcode: 'b3718361-f7db-4058-98a6-071393d0420c', // webUrl: 'https://smartwater.anxinyun.cn',
imgUrl: 'http://test.resources.anxinyun.cn/', // pcode: 'fce4afe2-5b6a-408a-ab18-a2afa7fa027c',
imgUrl: 'http://resources.anxinyun.cn/',
...baseConfig ...baseConfig
}; };

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

@ -4,10 +4,14 @@ import { View, RadioGroup, Radio, Image, Input, Picker } from '@tarojs/component
import { AtButton, AtTextarea, AtImagePicker } from 'taro-ui'; import { AtButton, AtTextarea, AtImagePicker } from 'taro-ui';
import InputPicker from '../components/inputPicker'; import InputPicker from '../components/inputPicker';
import request from '@/services/request'; import request from '@/services/request';
import { postReport, getReportDetail, delReport, getRoadSection } from '@/services/api'; import environment from '../../config';
import { getState } from '../../store/globalState';
import { postReport, getReportDetail, delReport, getRoadSection, postImage } from '@/services/api';
import './index.scss'; import './index.scss';
import arrowIcon from '../../static/img/patrol/arrow-down.svg'; import arrowIcon from '../../static/img/patrol/arrow-down.svg';
const { baseUrl, imgUrl } = environment;
const Index = () => { const Index = () => {
const userInfo = Taro.getStorageSync('userInfo') || {}; const userInfo = Taro.getStorageSync('userInfo') || {};
const isSuperAdmin = userInfo && userInfo.username === 'SuperAdmin' ? true : false const isSuperAdmin = userInfo && userInfo.username === 'SuperAdmin' ? true : false
@ -30,10 +34,21 @@ const Index = () => {
const [longitude, setLongitude] = useState(0) // const [longitude, setLongitude] = useState(0) //
const [latitude, setLatitude] = useState(0) // const [latitude, setLatitude] = useState(0) //
const [sceneImg, setSceneImg] = useState([]) // url
const [conserveBeforeImg, setConserveBeforeImg] = useState([]) //
const [conserveUnderwayImg, setConserveUnderwayImg] = useState([]) //
const [conserveAfterImg, setConserveAfterImg] = useState([]) //
const [sourceRoadSel, setSourceRoadSel] = useState([]) const [sourceRoadSel, setSourceRoadSel] = useState([])
const [sourceRoadStartSel, setSourceRoadStartSel] = useState([]) const [sourceRoadStartSel, setSourceRoadStartSel] = useState([])
const [sourceRoadEndSel, setSourceRoadEndSel] = useState([]) const [sourceRoadEndSel, setSourceRoadEndSel] = useState([])
const prjType = [
{ text: '道路', value: 'road' },
{ text: '桥梁', value: 'bridge' },
{ text: '涵洞', value: 'culvert' },
{ text: '其他', value: 'other' },
]
const prjTypeSelector = ['道路', '桥梁', '涵洞', '其他'] const prjTypeSelector = ['道路', '桥梁', '涵洞', '其他']
const [roadStartSel, setRoadStartSel] = useState([]) const [roadStartSel, setRoadStartSel] = useState([])
const [roadEndSel, setRoadEndSel] = useState([]) const [roadEndSel, setRoadEndSel] = useState([])
@ -60,17 +75,24 @@ const Index = () => {
Taro.hideLoading() Taro.hideLoading()
if (res.statusCode == 200 || res.statusCode == 204) { if (res.statusCode == 200 || res.statusCode == 204) {
const { data } = res const { data } = res
let showPrjType = ''
for (const item of prjType) {
if (item.value === data.projectType) {
showPrjType = item.text
break
}
}
setReportType(data.reportType) setReportType(data.reportType)
setProjectType(data.projectType) setProjectType(showPrjType || data.projectType)
setRoad(data.road) setRoad(data.road)
setRoadSectionStart(data.roadSectionStart) setRoadSectionStart(data.roadSectionStart)
setRoadSectionEnd(data.roadSectionEnd) setRoadSectionEnd(data.roadSectionEnd)
setAddress(data.address) setAddress(data.address)
setContent(data.content) setContent(data.content)
setScenePic(data.scenePic ? data.scenePic.map(item => ({ url: item })) : []) setScenePic(data.scenePic ? data.scenePic.map(item => ({ url: imgUrl + item })) : [])
setConserveBeforePic(data.conserveBeforePic ? data.conserveBeforePic.map(item => ({ url: item })) : []) setConserveBeforePic(data.conserveBeforePic ? data.conserveBeforePic.map(item => ({ url: imgUrl + item })) : [])
setConserveUnderwayPic(data.conserveUnderwayPic ? data.conserveUnderwayPic.map(item => ({ url: item })) : []) setConserveUnderwayPic(data.conserveUnderwayPic ? data.conserveUnderwayPic.map(item => ({ url: imgUrl + item })) : [])
setConserveAfterPic(data.conserveAfterPic ? data.conserveAfterPic.map(item => ({ url: item })) : []) setConserveAfterPic(data.conserveAfterPic ? data.conserveAfterPic.map(item => ({ url: imgUrl + item })) : [])
} else { } else {
Taro.showToast({ title: res.data.message || '请求出错', icon: 'none' }) Taro.showToast({ title: res.data.message || '请求出错', icon: 'none' })
} }
@ -118,6 +140,7 @@ const Index = () => {
}) })
} }
}, []) }, [])
useEffect(() => { useEffect(() => {
setRoadStartSel(sourceRoadStartSel) setRoadStartSel(sourceRoadStartSel)
setRoadEndSel(sourceRoadEndSel) setRoadEndSel(sourceRoadEndSel)
@ -148,9 +171,15 @@ const Index = () => {
Taro.showToast({ title: '工程类型错误', icon: 'none' }) Taro.showToast({ title: '工程类型错误', icon: 'none' })
return return
} }
if (content.length > 50) {
Taro.showToast({ title: '内容字数不能超过50', icon: 'none' })
return
}
const reportProjectType = prjType[prjTypeSelector.indexOf(projectType)].value
let data = { let data = {
reportType, reportType,
projectType, projectType: reportProjectType,
road, road,
roadSectionStart, roadSectionStart,
roadSectionEnd, roadSectionEnd,
@ -160,11 +189,11 @@ const Index = () => {
latitude latitude
} }
if (reportType === 'patrol') { if (reportType === 'patrol') {
data['scenePic'] = scenePic.length > 0 ? scenePic.map(item => item.url) : null data['scenePic'] = sceneImg
} else { } else {
data['conserveBeforePic'] = conserveBeforePic.length > 0 ? conserveBeforePic.map(item => item.url) : null data['conserveBeforePic'] = conserveBeforeImg
data['conserveUnderwayPic'] = conserveUnderwayPic.length > 0 ? conserveUnderwayPic.map(item => item.url) : null data['conserveUnderwayPic'] = conserveUnderwayImg
data['conserveAfterPic'] = conserveAfterPic.length > 0 ? conserveAfterPic.map(item => item.url) : null data['conserveAfterPic'] = conserveAfterImg
} }
Taro.showModal({ Taro.showModal({
@ -256,24 +285,97 @@ const Index = () => {
setReportType(e.detail.value) setReportType(e.detail.value)
} }
function handleImgChange(files, type) { function handleImgChange(files, operationType, index, type) {
switch (type) { if (operationType === 'remove') {
case 'scenePic': setImg(false)
setScenePic(files) }
break; function setImg(isAdd, url) {
case 'conserveBeforePic': switch (type) {
setConserveBeforePic(files) case 'scenePic':
break; let nextImg = sceneImg
case 'conserveUnderwayPic': if (isAdd) {
setConserveUnderwayPic(files) nextImg.push(url)
break; } else {
case 'conserveAfterPic': nextImg.splice(index, 1)
setConserveAfterPic(files) }
break; setSceneImg(nextImg)
default: setScenePic(files)
break; break;
case 'conserveBeforePic':
let nextConserveBeforeImg = conserveBeforeImg
if (isAdd) {
nextConserveBeforeImg.push(url)
} else {
nextConserveBeforeImg.splice(index, 1)
}
setConserveBeforeImg(nextConserveBeforeImg)
setConserveBeforePic(files)
break;
case 'conserveUnderwayPic':
let nextConserveUnderwayImg = conserveUnderwayImg
if (isAdd) {
nextConserveUnderwayImg.push(url)
} else {
nextConserveUnderwayImg.splice(index, 1)
}
setConserveUnderwayImg(nextConserveUnderwayImg)
setConserveUnderwayPic(files)
break;
case 'conserveAfterPic':
let nextConserveAfterImg = conserveAfterImg
if (isAdd) {
nextConserveAfterImg.push(url)
} else {
nextConserveAfterImg.splice(index, 1)
}
setConserveAfterImg(nextConserveAfterImg)
setConserveAfterPic(files)
break;
default:
break;
}
}
if (operationType === 'add' && files.length > 0) {
Taro.showLoading({ title: '上传中' })
let i = 0
switch (type) {
case 'scenePic':
i = scenePic.length
break;
case 'conserveBeforePic':
i = conserveBeforePic.length
break;
case 'conserveUnderwayPic':
i = conserveUnderwayPic.length
break;
case 'conserveAfterPic':
i = conserveAfterPic.length
break;
default:
break;
}
for (i; i < files.length; i++) {
const tempFilePaths = files[i].url
let token = getState('token') || Taro.getStorageSync('token')
Taro.uploadFile({
url: `${baseUrl}${postImage()}?token=${token}`,
filePath: tempFilePaths,
name: 'file',
success: (res) => {
if (i === files.length) {
Taro.hideLoading();
}
if (res.statusCode == 200) {
setImg(true, JSON.parse(res.data).key)
} else {
Taro.showToast({ title: '上传失败,请重试', icon: 'error' })
}
}
});
}
} }
} }
function handleImgClick(index, file) { function handleImgClick(index, file) {
Taro.previewImage({ Taro.previewImage({
urls: [file.url] // http urls: [file.url] // http
@ -381,7 +483,7 @@ const Index = () => {
<AtTextarea <AtTextarea
title='巡查内容:' title='巡查内容:'
placeholder={isView ? '' : '请输入巡查内容'} placeholder={isView ? '' : '请输入具体内容'}
value={content} value={content}
onChange={(v, e) => handleInput(e, 'content')} onChange={(v, e) => handleInput(e, 'content')}
disabled={isView} disabled={isView}
@ -403,7 +505,7 @@ const Index = () => {
count={3 - scenePic.length} count={3 - scenePic.length}
showAddBtn={scenePic.length >= 3 ? false : true} showAddBtn={scenePic.length >= 3 ? false : true}
files={scenePic} files={scenePic}
onChange={files => handleImgChange(files, 'scenePic')} onChange={(files, operationType, index) => handleImgChange(files, operationType, index, 'scenePic')}
onImageClick={handleImgClick} onImageClick={handleImgClick}
/> />
} }
@ -426,7 +528,7 @@ const Index = () => {
count={3 - conserveBeforePic.length} count={3 - conserveBeforePic.length}
showAddBtn={conserveBeforePic.length >= 3 ? false : true} showAddBtn={conserveBeforePic.length >= 3 ? false : true}
files={conserveBeforePic} files={conserveBeforePic}
onChange={files => handleImgChange(files, 'conserveBeforePic')} onChange={(files, operationType, index) => handleImgChange(files, operationType, index, 'conserveBeforePic')}
onImageClick={handleImgClick} onImageClick={handleImgClick}
/> />
} }
@ -446,7 +548,7 @@ const Index = () => {
count={3 - conserveUnderwayPic.length} count={3 - conserveUnderwayPic.length}
showAddBtn={conserveUnderwayPic.length >= 3 ? false : true} showAddBtn={conserveUnderwayPic.length >= 3 ? false : true}
files={conserveUnderwayPic} files={conserveUnderwayPic}
onChange={files => handleImgChange(files, 'conserveUnderwayPic')} onChange={(files, operationType, index) => handleImgChange(files, operationType, index, 'conserveUnderwayPic')}
onImageClick={handleImgClick} onImageClick={handleImgClick}
/> />
} }
@ -467,7 +569,7 @@ const Index = () => {
count={3 - conserveAfterPic.length} count={3 - conserveAfterPic.length}
showAddBtn={conserveAfterPic.length >= 3 ? false : true} showAddBtn={conserveAfterPic.length >= 3 ? false : true}
files={conserveAfterPic} files={conserveAfterPic}
onChange={files => handleImgChange(files, 'conserveAfterPic')} onChange={(files, operationType, index) => handleImgChange(files, operationType, index, 'conserveAfterPic')}
onImageClick={handleImgClick} onImageClick={handleImgClick}
/> />
} }

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

@ -84,6 +84,8 @@ function Index() {
}) })
useDidShow(() => { useDidShow(() => {
setPage(0)
setNum(Math.random())
let refresh = Taro.getStorageSync('refresh'); // let refresh = Taro.getStorageSync('refresh'); //
if (refresh) { if (refresh) {
Taro.removeStorageSync('refresh'); // Taro.removeStorageSync('refresh'); //

3
weapp/src/packages/video/index.config.js

@ -0,0 +1,3 @@
export default {
navigationBarTitleText: '视频监控'
}

85
weapp/src/packages/video/index.jsx

@ -0,0 +1,85 @@
import React, { useState, useEffect } from 'react'
import Taro from '@tarojs/taro'
import { View, Image, Input, Picker, LivePlayer } from '@tarojs/components'
import request from '@/services/request'
import './index.scss'
import '../patrolView/index.scss'
import patrolIcon from '../../static/img/patrolView/patrol.svg'
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'
import chevronDown from '../../static/img/patrolView/chevron-down.png'
import searchIcon from '../../static/img/patrolView/search.png'
function Index() {
const [isBus, setIsBus] = useState(true)
const [filterText, setFilterText] = useState('')
const [videoList, setVideoList] = useState([])
useEffect(() => {
getVideoList()
}, [])
const getVideoList = () => {
let nextVideoList = []
for (let i = 0; i < 10; i++) {
nextVideoList.push({ title: '视频' + i, url: '链接' + i })
}
setVideoList(nextVideoList)
}
const onTypeChange = bool => {
setIsBus(bool)
}
const handleConfirm = e => {
}
const handleInput = e => {
}
return (
<View>
<View className='type-box'>
<View className='item' onClick={() => onTypeChange(true)}>
<Image className='type-img' src={isBus ? patrolActiveIcon : patrolIcon} />
<View style={{ color: isBus ? '#346FC2' : '#999999' }}>公交</View>
</View>
<View className='line'></View>
<View className='item' onClick={() => onTypeChange(false)}>
<Image className='type-img' src={isBus ? conserveIcon : conserveActiveIcon} />
<View style={{ color: isBus ? '#999999' : '#346FC2' }}>道路</View>
</View>
</View>
<View className='filter-box'>
<View className='filter-item'>
<View style={{ float: 'left', marginLeft: '20rpx', color: '#333' }}>路段</View>
<Picker>
<View className='filter-name'>{'请选择'}</View>
<Image className='filter-img' src={chevronDown} />
</Picker>
</View>
<View class='head-search'>
<Image className='search-img' src={searchIcon} />
<Input class='heard-search-input' value={filterText} placeholder='请输入道路名称' onConfirm={handleConfirm} onInput={handleInput} />
</View>
</View>
<View className='video-box'>
{
videoList && videoList.map(v => {
return (
<View className='video-card'>
<View className='title'>{v.title}</View>
<LivePlayer className='video' src={v.url} mode='live' />
</View>
)
})
}
</View>
</View>
)
}
export default Index

28
weapp/src/packages/video/index.scss

@ -0,0 +1,28 @@
page {
background-color: #f6f6f6;
.video-box {
padding-top: 180px;
.video-card {
background-color: #fff;
height: 488px;
margin-bottom: 20px;
display: flex;
flex-direction: column;
align-items: left;
.title {
height: 88px;
margin-left: 30px;
display: flex;
align-items: center;
}
.video {
height: 400px;
width: 100%;
}
}
}
}

8
weapp/src/pages/home/index.jsx

@ -38,7 +38,9 @@ const Index = () => {
} }
function toVideo() { function toVideo() {
Taro.navigateTo({
url: '/packages/video/index'
})
} }
return ( return (
@ -49,13 +51,13 @@ const Index = () => {
{isSuperAdmin ? '查看' : '填报'} {isSuperAdmin ? '查看' : '填报'}
</View> </View>
</View> </View>
{ {/* {
isSuperAdmin && isSuperAdmin &&
<View className='card video'> <View className='card video'>
<View className='title'> </View> <View className='title'> </View>
<View className='btn' onClick={toVideo}>查看</View> <View className='btn' onClick={toVideo}>查看</View>
</View> </View>
} } */}
</View> </View>
); );
} }

4
weapp/src/pages/user/index.jsx

@ -4,6 +4,7 @@ import { View, Button, Image } from '@tarojs/components';
import { logout } from '@/actions/auth'; import { logout } from '@/actions/auth';
import { getLogoutUrl } from '@/services/api'; import { getLogoutUrl } from '@/services/api';
import cfg from '../../config'; import cfg from '../../config';
import { getState } from '../../store/globalState';
import './index.scss'; import './index.scss';
import headImg from '../../static/img/my/head.png'; import headImg from '../../static/img/my/head.png';
import moreImg from '../../static/img/my/more.svg'; import moreImg from '../../static/img/my/more.svg';
@ -39,8 +40,9 @@ const Index = ({ ...props }) => {
title: '提示', title: '提示',
content: '确定退出登录吗', content: '确定退出登录吗',
success: function (res) { success: function (res) {
let token = getState('token') || Taro.getStorageSync('token')
if (res.confirm) { if (res.confirm) {
logout(getLogoutUrl()).then(() => { logout(getLogoutUrl(), { token }).then(() => {
Taro.reLaunch({ Taro.reLaunch({
url: '/pages/auth/login/login' url: '/pages/auth/login/login'
}); });

5
weapp/src/services/api.js

@ -37,6 +37,11 @@ export const getRoadSection = () => {
return `/road/section`; return `/road/section`;
}; };
// 上传图片
export const postImage = () => {
return `/attachments/report`;
};
//行业查询 //行业查询
export const getIndustryUrl = () => { export const getIndustryUrl = () => {
return `/elec/business/industry` return `/elec/business/industry`

8
web/Dockerfile

@ -1,6 +1,6 @@
FROM repository.anxinyun.cn/devops/node:12-dev as builder FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node:12-dev as builder
COPY . /var/app COPY . /var/app
WORKDIR /var/app WORKDIR /var/app
@ -9,14 +9,14 @@ EXPOSE 8080
RUN npm config set registry=http://10.8.30.22:7000 RUN npm config set registry=http://10.8.30.22:7000
RUN echo "{\"time\":\"$BUILD_TIMESTAMP\",\"build\": \"$BUILD_NUMBER\",\"revision\": \"$SVN_REVISION_1\",\"URL\":\"$SVN_URL_1\"}" > version.json RUN echo "{\"time\":\"$BUILD_TIMESTAMP\",\"build\": \"$BUILD_NUMBER\",\"revision\": \"$SVN_REVISION_1\",\"URL\":\"$SVN_URL_1\"}" > version.json
RUN npm cache clean -f RUN npm cache clean -f
RUN npm install --registry http://10.8.30.22:7000
RUN rm -rf package-lock.json RUN rm -rf package-lock.json
RUN npm install --registry http://10.8.30.22:7000
RUN npm run build RUN npm run build
RUN rm -rf client/src RUN rm -rf client/src
RUN rm -rf node_modules RUN rm -rf node_modules
RUN npm install --production --registry http://10.8.30.22:7000 RUN npm install --production --registry http://10.8.30.22:7000
FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node-16:7.22-06-20 FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node:12
COPY --from=builder --chown=node /var/app /home/node/app COPY --from=builder --chown=node /var/app /home/node/app

47
web/client/src/components/Upload/index.js

@ -28,31 +28,30 @@ class Uploads extends Component {
return showName return showName
} }
setFileList = (value) => { setFileList = (value) => {
let defaultFileList = []; let defaultFileList = [];
defaultFileList = value.map((u, index) => { defaultFileList = value.map((u, index) => {
let fileUrl = `${this.ApiRoot}/${u.url}`; let fileUrl = `${this.ApiRoot}/${u.url}`;
return { return {
uid: -index - 1, uid: -index - 1,
name: this.dealName(u.url), name: this.dealName(u.url),
status: 'done', status: 'done',
storageUrl: u.url, storageUrl: u.url,
url: fileUrl url: fileUrl
}; };
}); });
// onChange(defaultFileList) // onChange(defaultFileList)
this.setState({ this.setState({
fileList: defaultFileList fileList: defaultFileList
}); });
}; };
componentDidMount () { componentDidMount() {
const { value } = this.props; const { value } = this.props;
if (value) { if (value) {
// this.setState(value); this.setFileList(value);
this.setFileList(value) }
} }
}
componentWillReceiveProps (np) { componentWillReceiveProps (np) {
const { dispatch, value: thisEditData, onChange } = this.props; const { dispatch, value: thisEditData, onChange } = this.props;

93
web/client/src/sections/fillion/actions/infor.js

@ -1,7 +1,7 @@
import { basicAction } from '@peace/utils' import { basicAction } from '@peace/utils'
import { ApiTable } from '$utils' import { ApiTable } from '$utils'
export function getDepMessage () { export function getDepMessage() {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -23,7 +23,7 @@ export function getDepMessage () {
// }); // });
// } // }
export function getOperaTional (query) { export function getOperaTional(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -34,8 +34,18 @@ export function getOperaTional (query) {
}); });
} }
export function putOperaTional(query) {
return dispatch => basicAction({
type: 'put',
dispatch: dispatch,
data: query,
actionType: 'PUT_OPERA_TIONAL',
url: ApiTable.putOperaTional,
msg: { option: '编辑车辆信息' },
export function getSpecificVehicle (query) { });
}
export function getSpecificVehicle(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -46,7 +56,7 @@ export function getSpecificVehicle (query) {
}); });
} }
export function putSpecificVehicle (query) { export function putSpecificVehicle(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -57,7 +67,7 @@ export function putSpecificVehicle (query) {
}); });
} }
export function putHouseholds (query) { export function putHouseholds(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -68,7 +78,7 @@ export function putHouseholds (query) {
}); });
} }
export function getHouseholds (query) { export function getHouseholds(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -79,7 +89,7 @@ export function getHouseholds (query) {
}); });
} }
export function getRoadway (query) { export function getRoadway(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -90,7 +100,7 @@ export function getRoadway (query) {
}); });
} }
export function putRoadway (query) { export function putRoadway(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -101,7 +111,7 @@ export function putRoadway (query) {
}); });
} }
export function getBridge (query) { export function getBridge(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -112,7 +122,7 @@ export function getBridge (query) {
}); });
} }
export function putBridge (query) { export function putBridge(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -123,7 +133,7 @@ export function putBridge (query) {
}); });
} }
export function getProject (query) { export function getProject(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -134,7 +144,7 @@ export function getProject (query) {
}); });
} }
export function putProject (query) { export function putProject(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -145,7 +155,7 @@ export function putProject (query) {
}); });
} }
export function getHighways (query) { export function getHighways(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -156,7 +166,7 @@ export function getHighways (query) {
}); });
} }
export function putHighways (query) { export function putHighways(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -167,7 +177,7 @@ export function putHighways (query) {
}); });
} }
export function getCircuit (query) { export function getCircuit(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -178,7 +188,7 @@ export function getCircuit (query) {
}); });
} }
export function putCircuit (query) { export function putCircuit(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -189,7 +199,7 @@ export function putCircuit (query) {
}); });
} }
export function getVehicle (query) { export function getVehicle(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -200,7 +210,7 @@ export function getVehicle (query) {
}); });
} }
export function putVehicle (query) { export function putVehicle(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -211,7 +221,7 @@ export function putVehicle (query) {
}); });
} }
export function delRoadway (query) { export function delRoadway(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'del', type: 'del',
dispatch: dispatch, dispatch: dispatch,
@ -221,7 +231,7 @@ export function delRoadway (query) {
}); });
} }
export function delProject (query) { export function delProject(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'del', type: 'del',
dispatch: dispatch, dispatch: dispatch,
@ -231,7 +241,7 @@ export function delProject (query) {
}); });
} }
export function delBridge (query) { export function delBridge(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'del', type: 'del',
dispatch: dispatch, dispatch: dispatch,
@ -241,7 +251,7 @@ export function delBridge (query) {
}); });
} }
export function delSpecificVehicle (query) { export function delSpecificVehicle(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'del', type: 'del',
dispatch: dispatch, dispatch: dispatch,
@ -251,7 +261,7 @@ export function delSpecificVehicle (query) {
}); });
} }
export function delHouseholds (query) { export function delHouseholds(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'del', type: 'del',
dispatch: dispatch, dispatch: dispatch,
@ -261,7 +271,7 @@ export function delHouseholds (query) {
}); });
} }
export function delCircuit (query) { export function delCircuit(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'del', type: 'del',
dispatch: dispatch, dispatch: dispatch,
@ -271,7 +281,7 @@ export function delCircuit (query) {
}); });
} }
export function delVehicle (query) { export function delVehicle(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'del', type: 'del',
dispatch: dispatch, dispatch: dispatch,
@ -282,18 +292,18 @@ export function delVehicle (query) {
}); });
} }
export function putOperaTional (query) { export function getPurchase(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'get',
dispatch: dispatch, dispatch: dispatch,
data: query, query: query,
actionType: 'PUT_OPERA_TIONAL', actionType: 'GET_PURCHASE',
url: ApiTable.putOperaTional, url: ApiTable.getPurchase,
msg: { error: '获取车辆信息失败' }, msg: { error: '获取治超信息失败' },
// reducer: { name: 'reportstatistic' }
}); });
} }
export function putPurchase (query) { export function putPurchase(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -304,7 +314,7 @@ export function putPurchase (query) {
}); });
} }
export function delPurchase (query) { export function delPurchase(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'del', type: 'del',
dispatch: dispatch, dispatch: dispatch,
@ -315,8 +325,7 @@ export function delPurchase (query) {
}); });
} }
export function getPropagata(query) {
export function getPropagata (query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -327,35 +336,35 @@ export function getPropagata (query) {
// reducer: { name: 'reportstatistic' } // reducer: { name: 'reportstatistic' }
}); });
} }
export function putAddPropagata (query) { export function putAddPropagata(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
data: query, data: query,
actionType: 'PUT_PROPAGATA', actionType: 'PUT_PROPAGATA',
url: ApiTable.putpropagata, url: ApiTable.putpropagata,
msg: { error: '新增宣传视频信息失败' }, msg: { option: '新增宣传视频' },
// reducer: { name: 'reportstatistic' } // reducer: { name: 'reportstatistic' }
}); });
} }
export function putEditPropagata (query) { export function putEditPropagata(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
data: query, data: query,
actionType: 'PUT_PROPAGATA', actionType: 'PUT_PROPAGATA',
url: ApiTable.putpropagata, url: ApiTable.putpropagata,
msg: { error: '编辑宣传视频信息失败' }, msg: { option: '编辑宣传视频' },
// reducer: { name: 'reportstatistic' } // reducer: { name: 'reportstatistic' }
}); });
} }
export function delPropagata (query) { export function delPropagata(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'del', type: 'del',
dispatch: dispatch, dispatch: dispatch,
actionType: 'DEL_PROPAGATA', actionType: 'DEL_PROPAGATA',
url: ApiTable.delpropagata.replace("{publicityId}", query?.publicityId), url: ApiTable.delpropagata.replace("{publicityId}", query?.publicityId),
msg: { error: '删除宣传视频信息失败' }, msg: { option: '删除宣传视频信息' },
// reducer: { name: 'reportstatistic' } // reducer: { name: 'reportstatistic' }
}); });
} }

18
web/client/src/sections/fillion/components/bridgeTable.js

@ -48,7 +48,7 @@ const BrideTable = (props) => {
tab1: [ tab1: [
{ {
title: '桥梁代码', title: '桥梁代码',
dataIndex: 'placeName', dataIndex: 'placeName1',
fixed: 'left', fixed: 'left',
width: 120, width: 120,
options: 1, options: 1,
@ -64,7 +64,7 @@ const BrideTable = (props) => {
}, },
{ {
title: '桥梁名称', title: '桥梁名称',
dataIndex: 'containers', dataIndex: 'placeName',
fixed: 'left', fixed: 'left',
width: 120, width: 120,
render: (dom, record) => { render: (dom, record) => {
@ -1501,7 +1501,7 @@ const BrideTable = (props) => {
dataIndex: 'creatTime', dataIndex: 'creatTime',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
hideInSearch: true, hideInSearch: true,
width: 120, width: 160,
fixed: 'right', fixed: 'right',
render: (dom, record) => { render: (dom, record) => {
return <div><Button type="link" return <div><Button type="link"
@ -1534,13 +1534,13 @@ const BrideTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -1685,7 +1685,7 @@ const BrideTable = (props) => {
dataIndex: 'creatTime', dataIndex: 'creatTime',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
hideInSearch: true, hideInSearch: true,
width: 120, width: 160,
fixed: 'right', fixed: 'right',
render: (dom, record) => { render: (dom, record) => {
return <div><Button type="link" return <div><Button type="link"
@ -1717,13 +1717,13 @@ const BrideTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -1815,7 +1815,7 @@ const BrideTable = (props) => {
} if (whichofits == 'gongcheng') { } if (whichofits == 'gongcheng') {
const query = { const query = {
type: 'bridge', type: 'bridge',
// type:sitename entryName:sitename
} }
setRowSelected([]); setRowSelected([]);
const res = await dispatch(getProject(query)); const res = await dispatch(getProject(query));

10
web/client/src/sections/fillion/components/enforceTable.js

@ -1502,7 +1502,7 @@ const openModal = (type, record) => {
dataIndex: 'creatTime', dataIndex: 'creatTime',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
hideInSearch: true, hideInSearch: true,
width: 120, width: 160,
fixed: 'right', fixed: 'right',
render: (dom, record) => { render: (dom, record) => {
return <div><Button type="link" return <div><Button type="link"
@ -1559,10 +1559,10 @@ const openModal = (type, record) => {
rowKey='id' rowKey='id'
onReset={(v) => { onReset={(v) => {
const { id } = depMessage[0] const { id } = depMessage[0]
console.log(id) // console.log(id)
setRegionId(id) // setRegionId(id)
setPlaceType(-1) // setPlaceType(-1)
setDay([moment('2022-03-01').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]) // setDay([moment('2022-03-01').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')])
setSitename('') setSitename('')
}} }}
rowSelection={{ rowSelection={{

20
web/client/src/sections/fillion/components/fileTable.js

@ -80,15 +80,15 @@ const DetailList = (props) => {
dataIndex: 'road', dataIndex: 'road',
align: 'center', align: 'center',
render: (text, record) => { render: (text, record) => {
return ''; return fileList?.road?.roadName;
} }
}, { }, {
title: '资料类型', title: '资料类型',
key: 'address', key: 'fileType',
dataIndex: 'address', dataIndex: 'fileType',
align: 'center', align: 'center',
render: (text, record) => { render: (text, record) => {
return ''; return fileList?.type?.fileType;
} }
}, },
{ {
@ -120,7 +120,7 @@ const DetailList = (props) => {
align: 'center' align: 'center'
}, { }, {
title: '操作', title: '操作',
width: 200, width: 160,
key: 'option', key: 'option',
valueType: 'option', valueType: 'option',
align: 'center', align: 'center',
@ -218,7 +218,7 @@ const RoadNameList = (props) => {
]; ];
useEffect(() => { useEffect(() => {
if (roads && roads instanceof Array) { if (roads && roads instanceof Array && roads.length) {
setSelectRoad(roads[0].rId) setSelectRoad(roads[0].rId)
onChange(roads[0]); onChange(roads[0]);
} }
@ -281,7 +281,11 @@ const RoadNameList = (props) => {
return { return {
onClick: () => { onClick: () => {
if (record) { if (record) {
setSelectRoad(record.rId); let id = record.rId
if(selectRoad == record.rId){
id = null
}
setSelectRoad(id);
onChange(record); onChange(record);
} }
}, },
@ -413,7 +417,7 @@ const FileTable = (props) => {
}} }}
> >
<Row> <Row>
<Button onClick={() => { setUploadVisible(true) }} type="primary" style={{ width: 160, marginBottom: 8 }} >上传</Button> <Button onClick={() => { setUploadVisible(true) }} type="primary" style={{ width: 160, marginBottom: 8, visibility: record ? 'visible': "hidden" }} >上传</Button>
</Row> </Row>
<Card style={{ flex: 1 }}> <Card style={{ flex: 1 }}>
<DetailList fileList={fileList} record={record} loading={fileListLoading} dispatch={dispatch} handelRefresh={handelRefresh} onPageChange={onPageChange} /> <DetailList fileList={fileList} record={record} loading={fileListLoading} dispatch={dispatch} handelRefresh={handelRefresh} onPageChange={onPageChange} />

5
web/client/src/sections/fillion/components/gis/patrolGis.js

@ -11,9 +11,11 @@ function PatrolGis(props) {
const { reportList, userId, dispatch } = props; const { reportList, userId, dispatch } = props;
const [mapComplete, setMapComplete] = useState(false); const [mapComplete, setMapComplete] = useState(false);
const [mapObj, setMapObj] = useState(); const [mapObj, setMapObj] = useState();
const [dateRange, setDateRange] = useState(); const [dateRange, setDateRange] = useState([moment().add(-6, 'day'),
moment()]);
let markers = []; let markers = [];
let PATH = []; let PATH = [];
useEffect(() => { useEffect(() => {
if (AMap) loadMap(); if (AMap) loadMap();
return () => { return () => {
@ -147,6 +149,7 @@ function PatrolGis(props) {
<div style={{ position: 'absolute', top: 8, left: 20, display: userId ? 'block' : 'none' }}> <div style={{ position: 'absolute', top: 8, left: 20, display: userId ? 'block' : 'none' }}>
<RangePicker <RangePicker
onChange={(date, dateString) => { setDateRange(dateString) }} onChange={(date, dateString) => { setDateRange(dateString) }}
defaultValue={dateRange}
/> />
</div> </div>
{mapObj ? <Bounds map={mapObj} /> : ''} {mapObj ? <Bounds map={mapObj} /> : ''}

6
web/client/src/sections/fillion/components/highwaysTable.js

@ -37,6 +37,7 @@ const hightModal = (type, record) => {
dataIndex: 'placeName', dataIndex: 'placeName',
fixed: 'left', fixed: 'left',
width: 120, width: 120,
search: false,
options: 1, options: 1,
backgroundColor: "#ffffff", backgroundColor: "#ffffff",
fieldProps: { fieldProps: {
@ -69,7 +70,7 @@ const hightModal = (type, record) => {
dataIndex: 'creatTime', dataIndex: 'creatTime',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
hideInSearch: true, hideInSearch: true,
width: 120, width: 160,
fixed: 'right', fixed: 'right',
render: (dom, record) => { render: (dom, record) => {
return <div><Button type="link" return <div><Button type="link"
@ -91,6 +92,9 @@ const hightModal = (type, record) => {
actionRef={ref} actionRef={ref}
scroll={{ x: 800 }} scroll={{ x: 800 }}
options={false} options={false}
form={{
submitter:false
}}
// ref={c => { finishedProductTable = c; }} // ref={c => { finishedProductTable = c; }}
style={{ width: "100% ", overflow: "auto", height: '760px' }} style={{ width: "100% ", overflow: "auto", height: '760px' }}
rowKey='id' rowKey='id'

2
web/client/src/sections/fillion/components/infor/details.js

@ -13,7 +13,7 @@ const UserModal = (props) => {
const [recordsay, setRecordsay] = useState()//必填数据 const [recordsay, setRecordsay] = useState()//必填数据
// const [success, setSuccess] = useState() //状态 // const [success, setSuccess] = useState() //状态
// const [establishment, setEstablishment] = useState() //业户类型 // const [establishment, setEstablishment] = useState() //业户类型
console.log(recortd) // console.log(recortd)
useEffect(() => { useEffect(() => {
const array = [] const array = []
if (rewkeys === 'transportation') { if (rewkeys === 'transportation') {

67
web/client/src/sections/fillion/components/infor/videoUpload.js

@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react'; import React, { useState } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { Modal, Form, Button, Input, Card, List } from 'antd'; import { Modal, Form, Button, Input, Switch } from 'antd';
import Uploads from "../../../../components/Upload/index" import Uploads from "../../../../components/Upload/index"
import { putAddPropagata } from '../../actions/infor'; import { putAddPropagata } from '../../actions/infor';
import { putEditPropagata } from '../../actions/infor'; import { putEditPropagata } from '../../actions/infor';
@ -22,25 +22,24 @@ const VideoUpload = (props) => {
} }
const showModalEdit = () => { const showModalEdit = () => {
setIsModalVisible(true); setIsModalVisible(true);
}; };
//新增 //新增
const handleOkAdd = () => { const handleOkAdd = () => {
form.validateFields().then((values) => { form.validateFields().then((values) => {
const videoAddress = values.video.map((item) => { const videoAddress = values.video.map((item) => {
return item.storageUrl return item.storageUrl
}) })
console.log(videoAddress);
const videoname = values.videoname const videoname = values.videoname
const data = { name: videoname, video: videoAddress } const enable = values.show
const data = { name: videoname, video: videoAddress, enable: enable }
dispatch(putAddPropagata(data)).then(() => { dispatch(putAddPropagata(data)).then(() => {
dispatch(getPropagata()).then((res) => { dispatch(getPropagata()).then((res) => {
setCounts(res.payload.data) setCounts(res.payload.data)
}) })
}) })
form.resetFields()
setIsModalVisible(false); setIsModalVisible(false);
} }
); );
@ -49,32 +48,30 @@ const VideoUpload = (props) => {
const handleOkEdit = (record) => { const handleOkEdit = (record) => {
form.validateFields().then((values) => { form.validateFields().then((values) => {
const videoAddress = values.video.map((item) => {
return item.storageUrl
})
const videoname = values.username const videoname = values.username
const id = record.id const id = record.id
const video = record.video const newVideoAddress = values.video.map((item) => {
return item.storageUrl
const data = { publicityId: id, name: videoname, video: video } })
const data = { publicityId: id, name: videoname, video: newVideoAddress }
dispatch(putEditPropagata(data)).then(() => { dispatch(putEditPropagata(data)).then(() => {
dispatch(getPropagata()).then((res) => { dispatch(getPropagata()).then((res) => {
setCounts(res.payload.data) setCounts(res.payload.data)
console.log(data);
}) })
console.log(data);
}) })
setIsModalVisible(false);
} }
); );
setIsModalVisible(false);
}; };
const handleCancel = () => { const handleCancel = () => {
setIsModalVisible(false); setIsModalVisible(false);
}; };
const handleCancelEdit = () => {
setIsModalVisible(false);
form.resetFields()
};
const onFinish = (values) => { const onFinish = (values) => {
console.log('Success:', values); console.log('Success:', values);
@ -84,13 +81,11 @@ const VideoUpload = (props) => {
console.log('Failed:', errorInfo); console.log('Failed:', errorInfo);
}; };
return ( return (
<div > <div >
{ {
props.type_ys ? <div><Button type='primary' onClick={showModal}>新增</Button> props.type_ys ? <div><Button type='primary' onClick={showModal}>新增</Button>
<Modal visible={isModalVisible} onOk={handleOkAdd} onCancel={handleCancel}> <Modal visible={isModalVisible} onOk={handleOkAdd} onCancel={handleCancelEdit} >
<Form <Form
form={form} form={form}
name="basic" name="basic"
@ -101,7 +96,7 @@ const VideoUpload = (props) => {
span: 16, span: 16,
}} }}
initialValues={{ initialValues={{
remember: true, show: true
}} }}
onFinish={onFinish} onFinish={onFinish}
onFinishFailed={onFinishFailed} onFinishFailed={onFinishFailed}
@ -125,13 +120,25 @@ const VideoUpload = (props) => {
<Form.Item <Form.Item
label="选择视频" label="选择视频"
name="video" name="video"
rules={[
{
required: true,
message: '必须上传视频!',
},
]}
> >
<Uploads <Uploads
maxFilesNum={10} maxFilesNum={1}
fileTypes={['mp4']} fileTypes={['mp4']}
maxFileSize={200} maxFileSize={200}
/> />
</Form.Item> </Form.Item>
<Form.Item
label="是否开启展示"
name="show"
>
<Switch checkedChildren="展示" unCheckedChildren="关闭" defaultChecked={true} />
</Form.Item>
</Form> </Form>
</Modal> </Modal>
</div> </div>
@ -149,8 +156,6 @@ const VideoUpload = (props) => {
}} }}
initialValues={{ initialValues={{
username: record.name, video: record.video.map((item) => { username: record.name, video: record.video.map((item) => {
console.log(record.video);
return { url: item } return { url: item }
}) })
}} }}
@ -178,14 +183,18 @@ const VideoUpload = (props) => {
<Form.Item <Form.Item
label="选择视频" label="选择视频"
name="video" name="video"
rules={[
{
required: true,
message: '必须上传视频!',
},
]}
> >
<Uploads <Uploads
maxFilesNum={10} maxFilesNum={1}
fileTypes={['mp4']} fileTypes={['mp4']}
maxFileSize={200} maxFileSize={200}
/> />
</Form.Item> </Form.Item>
</Form> </Form>
</Modal> </Modal>
@ -197,7 +206,7 @@ const VideoUpload = (props) => {
function mapStateToProps (state) { function mapStateToProps(state) {
const { depMessage } = state; const { depMessage } = state;
const pakData = (dep) => { const pakData = (dep) => {
return dep.map((d) => { return dep.map((d) => {

35
web/client/src/sections/fillion/components/inforTable.js

@ -75,7 +75,7 @@ const InForTable = (props) => {
onChange: (value, cs) => { onChange: (value, cs) => {
setNameOfInspectionPoint(value.currentTarget.value) setNameOfInspectionPoint(value.currentTarget.value)
}, },
placeholder: '请输入车牌号进行搜索', placeholder: '请输入检测点进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode, getPopupContainer: (triggerNode) => triggerNode.parentNode,
} }
}, { }, {
@ -132,16 +132,16 @@ const InForTable = (props) => {
<Col span={8}> <Col span={8}>
<Input <Input
onChange={(value) => { onChange={(value) => {
setOverrunRateUpper(value.currentTarget.value) setOverrunRateFloor(value.currentTarget.value)
}} }}
placeholder='输入超限率上限' /> placeholder='超限率下限' />
</Col> </Col>
<Col span={8}> <Col span={8}>
<Input <Input
onChange={(value) => { onChange={(value) => {
setOverrunRateFloor(value.currentTarget.value) setOverrunRateUpper(value.currentTarget.value)
}} }}
placeholder='输入超限率下限' /> placeholder='超限率上限' />
</Col> </Col>
</Row> </Row>
</Input.Group> </Input.Group>
@ -197,11 +197,11 @@ const InForTable = (props) => {
dataIndex: 'createdAt', dataIndex: 'createdAt',
valueType: 'date', valueType: 'date',
render: (dom, record) => { render: (dom, record) => {
return record.testTime.slice(0,10) return record.testTime?.slice(0, 10)
}, },
fieldProps: { fieldProps: {
onChange: (value, cs) => { onChange: (value, cs) => {
console.log(cs) // console.log(cs)
setTestTime(cs) setTestTime(cs)
}, },
getPopupContainer: (triggerNode) => triggerNode.parentNode, getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -347,7 +347,7 @@ const InForTable = (props) => {
dataIndex: 'creatTime', dataIndex: 'creatTime',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
hideInSearch: true, hideInSearch: true,
width: 120, width: 160,
fixed: 'right', fixed: 'right',
render: (dom, record) => { render: (dom, record) => {
return <div><Button type="link" return <div><Button type="link"
@ -381,13 +381,13 @@ const InForTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -423,7 +423,7 @@ const InForTable = (props) => {
setTestTime('') setTestTime('')
}} }}
request={async (params) => { request={async (params) => {
console.log(params) // console.log(params)
const query = { const query = {
limit: params.pageSize, limit: params.pageSize,
page: params.current - 1, page: params.current - 1,
@ -436,7 +436,7 @@ const InForTable = (props) => {
} }
setRowSelected([]); setRowSelected([]);
const res = await dispatch(getPurchase(query)); const res = await dispatch(getPurchase(query));
console.log(res) // console.log(res)
setCounts(res.payload.data.rows) setCounts(res.payload.data.rows)
return { return {
...res, ...res,
@ -447,10 +447,13 @@ const InForTable = (props) => {
defaultCollapsed: false, defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [ optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(), ...dom.reverse(),
<Popconfirm title="确认导出?" onConfirm={() => { <Popconfirm title={rowSelected.length === 0 ? '请勾选内容' : "确认导出?"}
console.log(rowSelected) showCancel={rowSelected.length === 0 ? false : true}
onConfirm={() => {
props.exports(rowSelected, counts) }}> // console.log(rowSelected)
rowSelected.length === 0 ? null : props.exports(rowSelected, counts)
}}
>
<Button <Button
> >
导出 导出

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

@ -12,12 +12,14 @@ import moment from 'moment';
const DetailForm = (props) => { const DetailForm = (props) => {
const { visible, data, handleClose, loading } = props; const { visible, data, handleClose, loading } = props;
const [qndmn] = useState(localStorage.getItem('qndmn'));
const keyList = [ const keyList = [
{ key: '问题编号', name: 'id' }, // { key: '编号', name: 'id' },
{ key: '工程类型', name: 'projectType' },
{ key: '所在路段', name: 'road' }, { key: '所在路段', name: 'road' },
{ key: '具体位置', name: 'address' }, { key: '具体位置', name: 'address' },
{ key: '巡查内容', name: 'content' }, { key: '巡查内容', name: 'content' },
{ key: '病害照片', name: 'scenePic' }, // { key: '病害照片', name: 'scenePic' },
{ key: '养护前', name: 'conserveBeforePic' }, { key: '养护前', name: 'conserveBeforePic' },
{ key: '养护中', name: 'conserveUnderwayPic' }, { key: '养护中', name: 'conserveUnderwayPic' },
{ key: '养护后', name: 'conserveAfterPic' }, { key: '养护后', name: 'conserveAfterPic' },
@ -36,7 +38,7 @@ const DetailForm = (props) => {
{ {
data[obj.name] && data[obj.name] instanceof Array ? data[obj.name].map(imgSrc => { data[obj.name] && data[obj.name] instanceof Array ? data[obj.name].map(imgSrc => {
return <div style={{ width: '44%', margin: 6 }}> return <div style={{ width: '44%', margin: 6 }}>
<Image src={imgSrc} width={'100%'} style={{ marginBottom: 4 }} /> <Image src={qndmn + '/' + imgSrc} width={'100%'} style={{ marginBottom: 4 }} />
</div> </div>
}) : '暂无图片' }) : '暂无图片'
} }
@ -55,7 +57,7 @@ const DetailForm = (props) => {
visible={visible} visible={visible}
footer={null} footer={null}
onCancel={handleClose} onCancel={handleClose}
title={'巡更详细'} title={'养护管理详情'}
> >
<Spin spinning={loading}> <Spin spinning={loading}>
{renderContent(data)} {renderContent(data)}
@ -89,14 +91,41 @@ const DetailList = (props) => {
} }
} }
let basicDate = null;
let counter = 0;
const columns = [ const columns = [
{ {
title: '问题编号', title: '编号',
key: 'id', key: 'id',
dataIndex: 'id', dataIndex: 'id',
align: 'center', align: 'center',
render: (text, record) => { render: (text, record) => {
return moment(record.time).format("YYYYMMDD") * 10000 + record.id; let day = moment(record.time).format("YYYYMMDD")
if (!basicDate) {
basicDate = day;
counter += 1;
} else if (basicDate == day) {
counter += 1;
} else if (basicDate != day) {
basicDate = day;
counter = 1;
}
return moment(record.time).format("YYYYMMDD") * 10000 + counter;
}
}, {
title: '工程类型',
key: 'projectType',
dataIndex: 'projectType',
align: 'center',
render: (text, record) => {
switch (text) {
case 'road': return '道路';
case 'bridge': return '桥梁';
case 'culvert': return '涵洞';
case 'other': return '其他';
default: return text;
}
} }
}, { }, {
title: '所属道路', title: '所属道路',
@ -113,19 +142,19 @@ const DetailList = (props) => {
} }
}, },
{ {
title: '缺陷名称', title: '具体内容',
key: 'content', key: 'content',
dataIndex: 'content', dataIndex: 'content',
align: 'center' align: 'center'
}, },
{ {
title: '巡查人', title: '养护人',
width: 100, width: 100,
key: 'userName', key: 'userName',
dataIndex: 'userName', dataIndex: 'userName',
align: 'center', align: 'center',
render: (text, record) => { render: (text, record) => {
return record.user.name return record?.user?.name
} }
}, { }, {
title: '上报时间', title: '上报时间',
@ -185,10 +214,17 @@ const DetailList = (props) => {
const PatrolNameList = (props) => { const PatrolNameList = (props) => {
const [users, setUsers] = useState([]); const [users, setUsers] = useState([]);
const { onChange, record, userList, loading } = props; const { onChange, record, userList, loading } = props;
const { name } = record || { name: '' } const [selectRoad, setSelectRoad] = useState();
useEffect(() => {
if (userList && userList instanceof Array && userList.length) {
setSelectRoad(userList[0].id)
// onChange(userList[0]);
}
}, [userList])
const columns = [ const columns = [
{ {
title: '巡更人员', title: '养护人员',
key: 'name', key: 'name',
dataIndex: 'name', dataIndex: 'name',
align: 'center' align: 'center'
@ -224,7 +260,7 @@ const PatrolNameList = (props) => {
loading={loading} loading={loading}
rowKey="name" rowKey="name"
rowClassName={(record) => { rowClassName={(record) => {
return record.patrolName === name ? styles['split-row-select-active'] : ''; return record.id == selectRoad ? 'list-row-actived' : '';
}} }}
toolBarRender={() => [ toolBarRender={() => [
<Input placeholder='输入养护人员名称' onChange={doUserNameSearch} ></Input> <Input placeholder='输入养护人员名称' onChange={doUserNameSearch} ></Input>
@ -236,7 +272,7 @@ const PatrolNameList = (props) => {
return { return {
onClick: () => { onClick: () => {
if (record) { if (record) {
console.log('record:', record) setSelectRoad(record.id);
onChange(record); onChange(record);
} }
}, },
@ -250,7 +286,7 @@ const PatrolNameList = (props) => {
const MaintenanceTable = (props) => { const MaintenanceTable = (props) => {
const { userList, reportList, dispatch, reportListLoading, reportDetail, reportDetailLoading, userLoading } = props; const { userList, reportList, dispatch, reportListLoading, reportDetail, reportDetailLoading, userLoading, exports } = props;
const [record, setRecord] = useState(); const [record, setRecord] = useState();
const [dateRange, setDateRange] = useState(); const [dateRange, setDateRange] = useState();
const [detailVisible, setDetailVisible] = useState(false) const [detailVisible, setDetailVisible] = useState(false)
@ -267,8 +303,12 @@ const MaintenanceTable = (props) => {
useEffect(() => { useEffect(() => {
if (record) { if (record) {
let query = { userId: record.id, reportType: 'conserve' } let query = {
if ((dateRange && dateRange instanceof Array)) { userId: record.id,
reportType: 'conserve',
asc: true
}
if ((dateRange && dateRange instanceof Array && dateRange[0] != '')) {
query.startTime = moment(dateRange[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss') query.startTime = moment(dateRange[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss')
query.endTime = moment(dateRange[1]).endOf('day').format('YYYY-MM-DD HH:mm:ss') query.endTime = moment(dateRange[1]).endOf('day').format('YYYY-MM-DD HH:mm:ss')
} }
@ -284,10 +324,21 @@ const MaintenanceTable = (props) => {
} }
const handelRefresh = () => { const handelRefresh = () => {
let query = { userId: record.id, reportType: 'patrol' } let query = {
userId: record.id,
reportType: 'conserve',
asc: true
}
dispatch(getReportList(query)); dispatch(getReportList(query));
} }
const handleExport = () => {
if (reportList && reportList instanceof Array && reportList.length) {
let ids = reportList.map(item => item.id);
exports(ids);
}
}
return ( return (
<div className='card-protable'> <div className='card-protable'>
<Card > <Card >
@ -297,10 +348,13 @@ const MaintenanceTable = (props) => {
<div style={{ marginBottom: 20 }}> <div style={{ marginBottom: 20 }}>
<RangePicker onChange={(date, dateString) => { setDateRange(dateString) }} /> <RangePicker onChange={(date, dateString) => { setDateRange(dateString) }} />
<Button style={{ marginLeft: 20 }}>查询</Button> <Button style={{ marginLeft: 20 }}>查询</Button>
<Button style={{ marginLeft: 20 }}>导出</Button> <Button style={{ marginLeft: 20 }} onClick={handleExport}>导出</Button>
</div> </div>
<Card style={{ flex: 1 }}> <Card style={{ flex: 1 }}>
<DetailList reportList={reportList} record={record} loading={reportListLoading} dispatch={dispatch} handleOpen={handleOpen} /> <DetailList
reportList={reportList} record={record} loading={reportListLoading} dispatch={dispatch} handleOpen={handleOpen}
handelRefresh={handelRefresh}
/>
</Card> </Card>
<DetailForm <DetailForm
visible={detailVisible} visible={detailVisible}
@ -313,7 +367,7 @@ const MaintenanceTable = (props) => {
); );
}; };
function mapStateToProps(state) { function mapStateToProps (state) {
const { auth, depMessage, userList, reportList, reportDetail } = state; const { auth, depMessage, userList, reportList, reportDetail } = state;
const pakData = (dep) => { const pakData = (dep) => {
return dep.map((d) => { return dep.map((d) => {

70
web/client/src/sections/fillion/components/operationalTable.js

@ -117,7 +117,7 @@ const OperaTionalTable = (props) => {
dataIndex: 'creatTime', dataIndex: 'creatTime',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
hideInSearch: true, hideInSearch: true,
width: 120, width: 160,
fixed: 'right', fixed: 'right',
render: (dom, record) => { render: (dom, record) => {
return <div><Button type="link" return <div><Button type="link"
@ -704,7 +704,7 @@ const OperaTionalTable = (props) => {
dataIndex: 'creatTime55', dataIndex: 'creatTime55',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
hideInSearch: true, hideInSearch: true,
width: 120, width: 160,
fixed: 'right', fixed: 'right',
render: (dom, record) => { render: (dom, record) => {
return <div><Button type="link" return <div><Button type="link"
@ -736,7 +736,7 @@ const OperaTionalTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
onClick={() => { onClick={() => {
@ -744,7 +744,7 @@ const OperaTionalTable = (props) => {
}} }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -1337,7 +1337,7 @@ const OperaTionalTable = (props) => {
dataIndex: 'creatTime', dataIndex: 'creatTime',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
hideInSearch: true, hideInSearch: true,
width: 120, width: 160,
fixed: 'right', fixed: 'right',
render: (dom, record) => { render: (dom, record) => {
return <div><Button type="link" return <div><Button type="link"
@ -1369,7 +1369,7 @@ const OperaTionalTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
onClick={() => { onClick={() => {
@ -1377,7 +1377,7 @@ const OperaTionalTable = (props) => {
}} }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -1807,12 +1807,12 @@ const OperaTionalTable = (props) => {
dataIndex: 'creatTime', dataIndex: 'creatTime',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
hideInSearch: true, hideInSearch: true,
width: 120, width: 160,
fixed: 'right', fixed: 'right',
render: (dom, record) => { render: (dom, record) => {
return <div><Button type="link" return <div><Button type="link"
onClick={() => { onClick={() => {
// dispatch(push(`article/update/post`)); // dispatch(push(`article/update/post`));
}} }}
>编辑</Button><Popconfirm title='' onConfirm={() => { deldatas(record.id) }}> >编辑</Button><Popconfirm title='' onConfirm={() => { deldatas(record.id) }}>
<Button type="link">删除</Button> <Button type="link">删除</Button>
@ -1837,7 +1837,7 @@ const OperaTionalTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
onClick={() => { onClick={() => {
@ -1845,7 +1845,7 @@ const OperaTionalTable = (props) => {
}} }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -1859,6 +1859,9 @@ const OperaTionalTable = (props) => {
<div className='protable-transpor'> <div className='protable-transpor'>
<ProTable <ProTable
actionRef={ref} actionRef={ref}
form={{
submitter: rewkeys === 'keyun' ? false : true,
}}
toolbar={{ toolbar={{
multipleLine: true, multipleLine: true,
@ -1893,6 +1896,7 @@ const OperaTionalTable = (props) => {
}, { }, {
key: 'tab4', key: 'tab4',
label: <span onClick={() => { label: <span onClick={() => {
setDifferentiate('business')
setRewkeys('yehu') setRewkeys('yehu')
}}>业户{activeKey === 'tab4'}</span>, }}>业户{activeKey === 'tab4'}</span>,
@ -1905,7 +1909,9 @@ const OperaTionalTable = (props) => {
ref={c => { finishedProductTable = c; }} ref={c => { finishedProductTable = c; }}
style={{ width: "100% ", overflow: "auto", height: '760px' }} style={{ width: "100% ", overflow: "auto", height: '760px' }}
rowKey='id' rowKey='id'
rowSelection={{ // alwaysShowAlert
// tableAlertRender={true}
rowSelection={rewkeys == 'keyun' ? false : {
selectedRowKeys: rowSelected, selectedRowKeys: rowSelected,
onChange: (selectedRowKeys) => { onChange: (selectedRowKeys) => {
setRowSelected(selectedRowKeys); setRowSelected(selectedRowKeys);
@ -1971,7 +1977,7 @@ const OperaTionalTable = (props) => {
defaultCollapsed: false, defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [ optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(), ...dom.reverse(),
['tab2', 'tab3', 'tab4'].includes(activeKey) ? <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, counts) }}> ['tab2', 'tab3', 'tab4'].includes(activeKey) ? <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, differentiate, genre) }}>
<Button <Button
> >
导出 导出
@ -2080,24 +2086,24 @@ const data = {
"creationDate": "创建日期", "creationDate": "创建日期",
'type': '类型' 'type': '类型'
} }
function mapStateToProps (state) { function mapStateToProps(state) {
const { auth, depMessage } = state; const { auth, depMessage } = state;
const pakData = (dep) => { const pakData = (dep) => {
return dep.map((d) => { return dep.map((d) => {
return { return {
title: d.name, title: d.name,
value: d.id, value: d.id,
// children: d.type >= 2 ? [] : pakData(d.subordinate) // children: d.type >= 2 ? [] : pakData(d.subordinate)
children: pakData(d.subordinate) children: pakData(d.subordinate)
} }
}) })
} }
let depData = pakData(depMessage.data || []) let depData = pakData(depMessage.data || [])
return { return {
user: auth.user, user: auth.user,
depMessage: depMessage.data || [], depMessage: depMessage.data || [],
depLoading: depMessage.isRequesting, depLoading: depMessage.isRequesting,
depData, depData,
}; };
} }
export default connect(mapStateToProps)(OperaTionalTable); export default connect(mapStateToProps)(OperaTionalTable);

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

@ -13,12 +13,14 @@ import moment from 'moment';
const DetailForm = (props) => { const DetailForm = (props) => {
const { visible, data, handleClose, loading } = props; const { visible, data, handleClose, loading } = props;
const [qndmn] = useState(localStorage.getItem('qndmn'));
const keyList = [ const keyList = [
{ key: '问题编号', name: 'id' }, // { key: '编号', name: 'id' },
{ key: '工程类型', name: 'projectType' },
{ key: '所在路段', name: 'road' }, { key: '所在路段', name: 'road' },
{ key: '具体位置', name: 'address' }, { key: '具体位置', name: 'address' },
{ key: '巡查内容', name: 'content' }, { key: '巡查内容', name: 'content' },
{ key: '病害照片', name: 'scenePic' }, { key: '现场照片', name: 'scenePic' },
]; ];
const renderContent = (data) => { const renderContent = (data) => {
@ -37,7 +39,7 @@ const DetailForm = (props) => {
{ {
data.scenePic && data.scenePic instanceof Array ? data.scenePic.map(imgSrc => { data.scenePic && data.scenePic instanceof Array ? data.scenePic.map(imgSrc => {
return <div style={{ width: '44%', margin: 6 }}> return <div style={{ width: '44%', margin: 6 }}>
<Image src={imgSrc} width={'100%'} style={{ marginBottom: 4 }} /> <Image src={qndmn + '/' + imgSrc} width={'100%'} style={{ marginBottom: 4 }} />
</div> </div>
}) : '暂无图片' }) : '暂无图片'
} }
@ -56,7 +58,7 @@ const DetailForm = (props) => {
visible={visible} visible={visible}
footer={null} footer={null}
onCancel={handleClose} onCancel={handleClose}
title={'巡更详细'} title={'巡查管理详情'}
> >
<Spin spinning={loading}> <Spin spinning={loading}>
{renderContent(data)} {renderContent(data)}
@ -89,17 +91,45 @@ const DetailList = (props) => {
}) })
} }
} }
let basicDate = null;
let counter = 0;
const columns = [ const columns = [
{ {
title: '问题编号', title: '编号',
key: 'id', key: 'id',
dataIndex: 'id', dataIndex: 'id',
align: 'center', align: 'center',
render: (text, record) => { render: (text, record) => {
return moment(record.time).format("YYYYMMDD") * 10000 + record.id; let day = moment(record.time).format("YYYYMMDD")
if(!basicDate){
basicDate = day;
counter +=1;
} else if(basicDate == day){
counter += 1;
} else if(basicDate != day){
basicDate = day;
counter = 1;
}
return moment(record.time).format("YYYYMMDD") * 10000 + counter;
} }
}, { },
{
title: '工程类型',
key: 'projectType',
dataIndex: 'projectType',
align: 'center',
render: (text, record) => {
switch (text) {
case 'road': return '道路';
case 'bridge': return '桥梁';
case 'culvert': return '涵洞';
case 'other': return '其他';
default: return text;
}
}
},
{
title: '所属道路', title: '所属道路',
key: 'road', key: 'road',
dataIndex: 'road', dataIndex: 'road',
@ -114,7 +144,7 @@ const DetailList = (props) => {
} }
}, },
{ {
title: '缺陷名称', title: '具体内容',
key: 'content', key: 'content',
dataIndex: 'content', dataIndex: 'content',
align: 'center' align: 'center'
@ -136,7 +166,7 @@ const DetailList = (props) => {
align: 'center' align: 'center'
}, { }, {
title: '操作', title: '操作',
width: 200, width: 160,
key: 'option', key: 'option',
valueType: 'option', valueType: 'option',
align: 'center', align: 'center',
@ -185,11 +215,25 @@ const DetailList = (props) => {
const PatrolNameList = (props) => { const PatrolNameList = (props) => {
const [users, setUsers] = useState([]); const [users, setUsers] = useState([]);
const { onChange, record, userList, loading } = props; const { onChange, record, userList, loading, activeTabKey1 } = props;
const { name } = record || { name: '' } const [selectRoad, setSelectRoad] = useState();
useEffect(() => {
if (userList && userList instanceof Array && userList.length) {
setSelectRoad(userList[0].id)
// onChange(userList[0]);
}
if(activeTabKey1 == 'tab2'){
setSelectRoad(null)
}
}, [userList, activeTabKey1])
const columns = [ const columns = [
{ {
title: '巡更人员', title: '巡人员',
key: 'name', key: 'name',
dataIndex: 'name', dataIndex: 'name',
align: 'center' align: 'center'
@ -224,10 +268,10 @@ const PatrolNameList = (props) => {
loading={loading} loading={loading}
rowKey="name" rowKey="name"
rowClassName={(record) => { rowClassName={(record) => {
return record.patrolName === name ? styles['split-row-select-active'] : ''; return record.id == selectRoad ? 'list-row-actived' : '';
}} }}
toolBarRender={() => [ toolBarRender={() => [
<Input placeholder='输入巡人员名称' onChange={doUserNameSearch} ></Input> <Input placeholder='输入巡人员名称' onChange={doUserNameSearch} ></Input>
]} ]}
options={false} options={false}
pagination={false} pagination={false}
@ -236,7 +280,12 @@ const PatrolNameList = (props) => {
return { return {
onClick: () => { onClick: () => {
if (record) { if (record) {
console.log('record:', record) // console.log('record:', record)
let id = record.id
if(selectRoad == record.id){
id = null
}
setSelectRoad(id);
onChange(record); onChange(record);
} }
}, },
@ -250,7 +299,7 @@ const PatrolNameList = (props) => {
const PatrolTable = (props) => { const PatrolTable = (props) => {
const { userList, reportList, dispatch, reportListLoading, reportDetail, reportDetailLoading, userLoading } = props; const { userList, reportList, dispatch, reportListLoading, reportDetail, reportDetailLoading, userLoading, exports } = props;
const [record, setRecord] = useState(); const [record, setRecord] = useState();
const [dateRange, setDateRange] = useState(); const [dateRange, setDateRange] = useState();
const [detailVisible, setDetailVisible] = useState(false) const [detailVisible, setDetailVisible] = useState(false)
@ -271,8 +320,8 @@ const PatrolTable = (props) => {
}, [record, dateRange]) }, [record, dateRange])
const queryData = () => { const queryData = () => {
let query = { userId: record.id, reportType: 'patrol' } let query = { userId: record.id, reportType: 'patrol', asc: true }
if ((dateRange && dateRange instanceof Array)) { if ((dateRange && dateRange instanceof Array && dateRange[0] != '')) {
query.startTime = moment(dateRange[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss') query.startTime = moment(dateRange[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss')
query.endTime = moment(dateRange[1]).endOf('day').format('YYYY-MM-DD HH:mm:ss') query.endTime = moment(dateRange[1]).endOf('day').format('YYYY-MM-DD HH:mm:ss')
} }
@ -288,7 +337,7 @@ const PatrolTable = (props) => {
}, [activeTabKey1]) }, [activeTabKey1])
const handelRefresh = () => { const handelRefresh = () => {
let query = { userId: record.id, reportType: 'patrol' } let query = { userId: record.id, reportType: 'patrol', asc: true }
dispatch(getReportList(query)); dispatch(getReportList(query));
} }
@ -302,10 +351,10 @@ const PatrolTable = (props) => {
const tabList = [ const tabList = [
{ {
key: 'tab1', key: 'tab1',
tab: '巡', tab: '巡',
}, { }, {
key: 'tab2', key: 'tab2',
tab: '巡轨迹查询', tab: '巡轨迹查询',
}, },
]; ];
const contentList = { const contentList = {
@ -328,12 +377,20 @@ const PatrolTable = (props) => {
setRecord(target); setRecord(target);
} }
const handleExport = () => {
if (reportList && reportList instanceof Array && reportList.length) {
let ids = reportList.map(item => item.id);
exports(ids);
}
}
return ( return (
<div className='card-protable'> <div className='card-protable'>
<Card > <Card >
<PatrolNameList <PatrolNameList
onChange={(record) => handleChangeRecord(record)} onChange={(record) => handleChangeRecord(record)}
record={record} record={record}
activeTabKey1={activeTabKey1}
userList={userList} userList={userList}
loading={userLoading} /> loading={userLoading} />
</Card> </Card>
@ -349,7 +406,7 @@ const PatrolTable = (props) => {
activeTabKey1 == 'tab1' ? <div style={{ marginBottom: 20 }}> activeTabKey1 == 'tab1' ? <div style={{ marginBottom: 20 }}>
<RangePicker onChange={(date, dateString) => { setDateRange(dateString) }} /> <RangePicker onChange={(date, dateString) => { setDateRange(dateString) }} />
<Button style={{ marginLeft: 20 }}>查询</Button> <Button style={{ marginLeft: 20 }}>查询</Button>
<Button style={{ marginLeft: 20 }}>导出</Button> <Button style={{ marginLeft: 20 }} onClick={handleExport} >导出</Button>
</div> : '' </div> : ''
} }
{contentList[activeTabKey1]} {contentList[activeTabKey1]}
@ -364,7 +421,7 @@ const PatrolTable = (props) => {
); );
}; };
function mapStateToProps(state) { function mapStateToProps (state) {
const { auth, depMessage, userList, reportList, reportDetail } = state; const { auth, depMessage, userList, reportList, reportDetail } = state;
const pakData = (dep) => { const pakData = (dep) => {
return dep.map((d) => { return dep.map((d) => {

4
web/client/src/sections/fillion/components/project/project.js

@ -77,7 +77,7 @@ const ProjectModal = (props) => {
visible={visible} visible={visible}
onVisibleChange={onVisibleChange} onVisibleChange={onVisibleChange}
onFinish={(values) => { onFinish={(values) => {
console.log(values) // console.log(values)
if (rewkeys === 'road') { if (rewkeys === 'road') {
if (typecard == 'compile') { if (typecard == 'compile') {
setDelet(values) setDelet(values)
@ -113,7 +113,7 @@ const ProjectModal = (props) => {
} }
} }
}} }}
initialValues={{ ...recortd, done: recortd.done ? 'true' : 'false' }} initialValues={{ ...recortd, done: typecard == 'compile'?recortd?.done ? 'true' : 'false':'' }}
> >
{typecard == 'compile' ? {typecard == 'compile' ?
<ProForm.Group <ProForm.Group

177
web/client/src/sections/fillion/components/promotionalTable.js

@ -12,23 +12,14 @@ const promotionalTable = (props) => {
const { dispatch, } = props const { dispatch, } = props
const [rowSelected, setRowSelected] = useState([]) const [rowSelected, setRowSelected] = useState([])
const [counts, setCounts] = useState()//shuju const [counts, setCounts] = useState()//shuju
const [success, setSuccess] = useState()
const [delet, setDelet] = useState()
const ref = useRef()
useEffect(() => { ref.current.reload() }, [delet, success])
const onClickEnable = (record) => { const onClickEnable = (record) => {
console.log(record);
const id = record.id const id = record.id
const name = record.name const name = record.name
const video = record.video const video = record.video
const enable = true ? record.enable == false : true const enable = true ? record.enable == false : true
const data = ({ publicityId: id, name: name, video: video, enable: enable }) const data = ({ publicityId: id, name: name, video: video, enable: enable })
console.log(data);
dispatch(putEditPropagata(data)).then((res) => { dispatch(putEditPropagata(data)).then((res) => {
dispatch(getPropagata()).then((res) => { dispatch(getPropagata()).then((res) => {
setCounts(res.payload.data) setCounts(res.payload.data)
@ -39,97 +30,96 @@ const promotionalTable = (props) => {
const columns = const columns =
[{ [
title: '序号', {
search: false, title: '序号',
dataIndex: 'containers', search: false,
fixed: 'left', dataIndex: 'containers',
width: 120, fixed: 'left',
render: (dom, record, key) => { width: 120,
return key + 1 render: (dom, record, key) => {
} return key + 1
}, }
{ },
title: '视频名称', {
dataIndex: 'videoName', title: '视频名称',
fixed: 'left', dataIndex: 'videoName',
search: false, fixed: 'left',
width: 120, search: false,
options: 1, width: 120,
render: (dom, record) => { options: 1,
// console.log('record',record) render: (dom, record) => {
return record.name return record.name
} }
}, },
{ {
title: '是否展示', title: '是否展示',
dataIndex: 'shuffling', dataIndex: 'shuffling',
valueType: 'shufflingRange', valueType: 'shufflingRange',
search: false, search: false,
width: 120, width: 120,
fixed: 'right', fixed: 'right',
render: (dom, record) => { render: (dom, record) => {
return <div > return <div >
<Switch checkedChildren="展示" unCheckedChildren="关闭" onClick={() => onClickEnable(record)} defaultChecked={true ? record.enable == true : false} />
<Switch checkedChildren="展示" unCheckedChildren="关闭" onClick={() => onClickEnable(record)} defaultChecked={true ? record.enable == true : false} /></div> </div>
} }
}, },
{ {
title: '操作', title: '操作',
dataIndex: 'creatTime', dataIndex: 'creatTime',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
hideInSearch: true, hideInSearch: true,
width: 120, width: 120,
fixed: 'right', fixed: 'right',
render: (dom, record) => { render: (dom, record) => {
return <div style={{ position: 'relative', marginTop: '-30px' }}> return <div style={{ position: 'relative', marginTop: '-30px' }}>
<VideoUpload record={record} counts={counts} setCounts={setCounts} /> <VideoUpload record={record} counts={counts} setCounts={setCounts} />
<Popconfirm <Popconfirm
title="是否确定删除?" title="是否确定删除?"
arrowPointAtCenter={true} arrowPointAtCenter={true}
showArrow={true} showArrow={true}
position="topRight" position="topRight"
onConfirm={ onConfirm={
() => { () => {
const query = { const query = {
publicityId: record.id publicityId: record.id
} }
dispatch(delPropagata(query)).then(() => { dispatch(delPropagata(query)).then(() => {
dispatch(getPropagata()).then((res) => { dispatch(getPropagata()).then((res) => {
setCounts(res.payload.data) setCounts(res.payload.data)
})
}) })
}) }
} }
}
>
<Button type="link" float="right"
>删除</Button>
</Popconfirm>
</div>
} >
}, <Button type="link" float="right"
{ >删除</Button>
key: "direction", </Popconfirm>
hideInTable: true,
dataIndex: "direction",
order: 6,
renderFormItem: (item, { type, defaultRender, ...rest }, form, record) => {
return (
<div>
<VideoUpload type_ys={1} counts={counts} setCounts={setCounts} />
</div> </div>
);
}
},
{
key: "direction",
hideInTable: true,
dataIndex: "direction",
order: 6,
renderFormItem: (item, { type, defaultRender, ...rest }, form, record) => {
return (
<div>
<VideoUpload type_ys={1} counts={counts} setCounts={setCounts} />
</div>
);
},
}, },
},
] ]
//获取数据 //获取数据
useEffect(() => { useEffect(() => {
const vedio = dispatch(getPropagata()).then((res) => { const vedio = dispatch(getPropagata()).then((res) => {
setCounts(res.payload.data) setCounts(res.payload.data)
console.log(res.payload.data)
}) })
}, []) }, [])
@ -139,17 +129,10 @@ const promotionalTable = (props) => {
<Spin spinning={false}> <Spin spinning={false}>
<div className='protable-transpor'> <div className='protable-transpor'>
<ProTable <ProTable
actionRef={ref}
scroll={{ x: 800 }} scroll={{ x: 800 }}
options={false} options={false}
style={{ width: "100% ", overflow: "auto", height: '760px' }} style={{ width: "100% ", overflow: "auto", height: '760px' }}
rowKey='id' rowKey='id'
rowSelection={{
selectedRowKeys: rowSelected,
onChange: (selectedRowKeys) => {
setRowSelected(selectedRowKeys);
},
}}
form={{ form={{
submitter: false, submitter: false,
}} }}
@ -168,7 +151,7 @@ const promotionalTable = (props) => {
) )
} }
function mapStateToProps (state) { function mapStateToProps(state) {
const { auth, depMessage } = state; const { auth, depMessage } = state;
const pakData = (dep) => { const pakData = (dep) => {

3
web/client/src/sections/fillion/components/protable.less

@ -10,8 +10,9 @@
} }
.list-row-actived { .list-row-actived {
background-color: #7cafc6; background-color: #e2f6ff;
font-weight: 600; font-weight: 600;
color: #1E80FF
} }

14
web/client/src/sections/fillion/components/publicTable.js

@ -402,7 +402,7 @@ const PublicTable = (props) => {
dataIndex: 'creatTime', dataIndex: 'creatTime',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
hideInSearch: true, hideInSearch: true,
width: 120, width: 160,
fixed: 'right', fixed: 'right',
render: (dom, record) => { render: (dom, record) => {
return <div><Button type="link" return <div><Button type="link"
@ -434,7 +434,7 @@ const PublicTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
onClick={() => { onClick={() => {
@ -442,7 +442,7 @@ const PublicTable = (props) => {
}} }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -1097,7 +1097,7 @@ const PublicTable = (props) => {
dataIndex: 'creatTime', dataIndex: 'creatTime',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
hideInSearch: true, hideInSearch: true,
width: 120, width: 160,
fixed: 'right', fixed: 'right',
render: (dom, record) => { render: (dom, record) => {
return <div><Button type="link" return <div><Button type="link"
@ -1129,7 +1129,7 @@ const PublicTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
onClick={() => { onClick={() => {
@ -1137,7 +1137,7 @@ const PublicTable = (props) => {
}} }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -1231,7 +1231,7 @@ const PublicTable = (props) => {
defaultCollapsed: false, defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [ optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(), ...dom.reverse(),
<Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, counts) }}> <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected,rewkeys ) }}>
<Button <Button
> >
导出 导出

26
web/client/src/sections/fillion/components/transportationTable.js

@ -1170,7 +1170,7 @@ const TransporTationTable = (props) => {
dataIndex: 'creatTime', dataIndex: 'creatTime',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
hideInSearch: true, hideInSearch: true,
width: 120, width: 160,
fixed: 'right', fixed: 'right',
render: (dom, record) => { render: (dom, record) => {
// node = renderRemoveUser('移除'); // node = renderRemoveUser('移除');
@ -1208,7 +1208,7 @@ const TransporTationTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
onClick={() => { onClick={() => {
@ -1216,7 +1216,7 @@ const TransporTationTable = (props) => {
}} }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
); );
}, },
@ -2328,7 +2328,7 @@ const TransporTationTable = (props) => {
dataIndex: 'creatTime', dataIndex: 'creatTime',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
hideInSearch: true, hideInSearch: true,
width: 120, width: 160,
fixed: 'right', fixed: 'right',
render: (dom, record) => { render: (dom, record) => {
return <div><Button type="link" return <div><Button type="link"
@ -2363,7 +2363,7 @@ const TransporTationTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
onClick={() => { onClick={() => {
@ -2371,7 +2371,7 @@ const TransporTationTable = (props) => {
}} }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -3485,7 +3485,7 @@ const TransporTationTable = (props) => {
dataIndex: 'creatTime', dataIndex: 'creatTime',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
hideInSearch: true, hideInSearch: true,
width: 120, width: 160,
fixed: 'right', fixed: 'right',
render: (dom, record) => { render: (dom, record) => {
return <div><Button type="link" return <div><Button type="link"
@ -3519,7 +3519,7 @@ const TransporTationTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
onClick={() => { onClick={() => {
@ -3527,7 +3527,7 @@ const TransporTationTable = (props) => {
}} }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -3672,7 +3672,7 @@ const TransporTationTable = (props) => {
dataIndex: 'creatTime', dataIndex: 'creatTime',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
hideInSearch: true, hideInSearch: true,
width: 120, width: 160,
fixed: 'right', fixed: 'right',
render: (dom, record) => { render: (dom, record) => {
return <div><Button type="link" return <div><Button type="link"
@ -3706,13 +3706,13 @@ const TransporTationTable = (props) => {
> >
新增 新增
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
style={{ width: "100px", marginLeft: 20 }} style={{ width: "100px", marginLeft: 20 }}
> >
导入 导入
</Button> </Button> */}
</div> </div>
@ -3827,7 +3827,7 @@ const TransporTationTable = (props) => {
if (whichofits == 'gongcheng') { if (whichofits == 'gongcheng') {
const query = { const query = {
type: 'road', type: 'road',
// type:sitename entryName:sitename
} }
setRowSelected([]); setRowSelected([]);
const res = await dispatch(getProject(query)); const res = await dispatch(getProject(query));

16
web/client/src/sections/fillion/containers/maintenance.js

@ -22,18 +22,10 @@ const Maintenance = (props) => {
//批量导出 //批量导出
const exports = (ids, counts) => { const exports = (ids, counts) => {
// console.log(user); // console.log(user);
let reportIds = []; let reportIds = ids.toString();
if (ids.length) window.open(
reportIds = ids '/_api/' +
else `data/export?exp=maintenance&ids=${reportIds}&token=${user.token}`)
reportIds = (counts || {}).ids || [];
superagent.post('/_report/http')
.send({ id: reportIds.map(i => Number(i)) }).end((err, res) => {
const resTextIs = res.text.split('/').pop()
window.open(
'/_api/' +
`attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
})
} }
return ( return (
<> <MaintenanceTable data={data} exports={exports} /> <> <MaintenanceTable data={data} exports={exports} />

16
web/client/src/sections/fillion/containers/patrol.js

@ -20,18 +20,10 @@ const patrol = (props) => {
//批量导出 //批量导出
const exports = (ids, counts) => { const exports = (ids, counts) => {
// console.log(user); // console.log(user);
let reportIds = []; let reportIds = ids.toString();
if (ids.length) window.open(
reportIds = ids '/_api/' +
else `data/export?exp=patrol&ids=${reportIds}&token=${user.token}`)
reportIds = (counts || {}).ids || [];
superagent.post('/_report/http')
.send({ id: reportIds.map(i => Number(i)) }).end((err, res) => {
const resTextIs = res.text.split('/').pop()
window.open(
'/_api/' +
`attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
})
} }
return ( return (
<> <PatrolTable data={data} exports={exports} /> <> <PatrolTable data={data} exports={exports} />

22
web/client/src/sections/fillion/containers/public.js

@ -9,17 +9,21 @@ const Public = (props) => {
const [data, setData] = useState() const [data, setData] = useState()
useEffect(() => { useEffect(() => {
// dispatch(getDepMessage()) // dispatch(getDepMessage())
setData(props) setData(props)
}, []); }, []);
//批量导出 //批量导出
const exports = (ids,counts) => { const exports = (ids, rewkeys) => {
console.log(counts); let idas = ids.toString()
let idas=ids.toString() if (rewkeys === 'xianlu') {
window.open( window.open(
'/_api/'+`data/export/?ids=${idas||''}&exp=${'overspeed'}&token=${user.token}`) '/_api/' + `data/export/?ids=${idas || ''}&exp=${'busLine'}&token=${user.token}`)
}
} if (rewkeys === 'cheliang') {
window.open(
'/_api/' + `data/export/?ids=${idas || ''}&exp=${'busCar'}&token=${user.token}`)
}
}
return ( return (
<> <PublicTable data={data} exports={exports} /> <> <PublicTable data={data} exports={exports} />
</> </>

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

@ -35,9 +35,9 @@ export function getNavItem(user, dispatch) {
<Menu.Item key="fileCont"> <Menu.Item key="fileCont">
<Link to="/fillion/file">档案管理</Link> <Link to="/fillion/file">档案管理</Link>
</Menu.Item> </Menu.Item>
<Menu.Item key="fillionvideois"> {/* <Menu.Item key="fillionvideois">
<Link to="/fillion/videois">视频管理</Link> <Link to="/fillion/videois">视频管理</Link>
</Menu.Item> </Menu.Item> */}
<Menu.Item key="fillionpromotional"> <Menu.Item key="fillionpromotional">
<Link to="/fillion/promotional">宣传视频</Link> <Link to="/fillion/promotional">宣传视频</Link>
</Menu.Item> </Menu.Item>

6
web/client/src/sections/quanju/containers/example.js

@ -35,12 +35,14 @@ const Example = (props) => {
document.body.clientHeight / 1080 document.body.clientHeight / 1080
)})`, */ )})`, */
}}> }}>
<Gis />
<div style={{ width: "100%", height: "10%" }}> <div style={{ width: "100%", height: "10%" }}>
<Header tabChange={tabChange} tabKey={tabKey} dispatch={dispatch} /> <Header tabChange={tabChange} tabKey={tabKey} dispatch={dispatch} />
</div> </div>
<div style={{position: 'absolute', width: "100%", height: "90%" }}> <div style={{ position: 'absolute', width: "100%", height: "90%" }}>
<Gis />
<Footer tabKey={tabKey} dispatch={dispatch} /> <Footer tabKey={tabKey} dispatch={dispatch} />
</div> </div>
</div> </div>

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

@ -274,6 +274,7 @@ legend: {
return ( return (
<div className='build-left-bottom'> <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'> <div className='build-left-bottom-title'>
<h2>{total}</h2> <h2>{total}</h2>
<span>道路总公里</span> <span>道路总公里</span>

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

@ -5,19 +5,21 @@ import React, { useEffect, useRef } from 'react';
// import ReactEcharts from 'echarts-for-react'; // import ReactEcharts from 'echarts-for-react';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
function Rightbottom(props) { function Rightbottom(props) {
const { width, height, data, total, text } = props const { width, height, total,data, text } = props
const chartRef = useRef(null); const chartRef = useRef(null);
let colorList = [ let colorList = [
"rgba(7,185,254,1)", "rgba(7,185,254,1)",
"rgba(28,96,254,1)", "rgba(28,96,254,1)",
"rgba(4,251,240,1)", "rgba(4,251,240,1)",
"rgba(255,194,20,1)" "rgba(255,194,20,1)",
'rgba(255,255,255,1)'
] ]
let underColorList = [ let underColorList = [
"rgba(7,185,254,0.5)", "rgba(7,185,254,0.5)",
"rgba(28,96,254,0.5)", "rgba(28,96,254,0.5)",
"rgba(4,251,240,0.5)", "rgba(4,251,240,0.5)",
"rgba(255,194,20,0.5)" "rgba(255,194,20,0.5)",
'rgba(255,255,255,0.5)',
] ]
let name = [], emptyName = [] let name = [], emptyName = []
// const name = data?.map(d) // const name = data?.map(d)
@ -30,7 +32,25 @@ function Rightbottom(props) {
// {name: '等外公路', value: 30}, // {name: '等外公路', value: 30},
// ] // ]
data?.forEach(d => {
const rightLegend = ['一级公路', '二级公路', '三级公路','四级公路','等外公路']
// let data=[
// {name: "四级公路", value: 2969},
// {name: "等外公路", value: 171},
// {name: "三级公路", value: 103},
// {name: "二级公路", value: 15},
// ]
// console.log(data.map(i=>i.name),'jjj')
let dataq = rightLegend.map((item,index)=>{
if(data.map(i=>i.name).includes(item)){
return {name:item,value:data.filter(i1=>i1.name===item)[0].value}
}else{
return {name:item,value:0}
}
})
console.log(dataq,'数据')
dataq?.sort((a,b)=>b.value - a.value)
dataq?.forEach(d => {
name.push(d.name) name.push(d.name)
emptyName.push({ emptyName.push({
name: '', name: '',
@ -41,7 +61,7 @@ function Rightbottom(props) {
const title = '基础设施安全监测版块'; const title = '基础设施安全监测版块';
// const number = 2738; // const number = 2738;
// const leftLegend = ['地灾', '桥梁', '基坑', '边坡', '水库大坝'] // const leftLegend = ['地灾', '桥梁', '基坑', '边坡', '水库大坝']
const rightLegend = ['一级公路', '二级公路', '三级公路','四级公路','等外公路']
const legendColor = undefined; const legendColor = undefined;
var titleNum = 15 var titleNum = 15
@ -54,7 +74,7 @@ function Rightbottom(props) {
textStyle: { textStyle: {
color: '#fff', 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: { legend: {
orient: "vertical", orient: "vertical",
@ -123,7 +143,7 @@ function Rightbottom(props) {
label: { label: {
show: false show: false
}, },
data: data, data: dataq,
}, },
], ],
}; };
@ -168,6 +188,7 @@ function Rightbottom(props) {
return ( return (
<div className='build-right-bottom'> <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'> <div className='build-right-bottom-title'>
<h2>{total||0}</h2> <h2>{total||0}</h2>
<span>道路总公里</span> <span>道路总公里</span>

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

@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react' import React, { useEffect, useState, useRef } from 'react'
import { connect } from 'react-redux'; import { connect } from 'react-redux';
// import LeftTop from './Lefttop' // import LeftTop from './Lefttop'
// import LeftCenter from './Leftcenter' // import LeftCenter from './Leftcenter'
@ -11,106 +11,108 @@ import Module from '../../public/module'
import RightBottom from './Rightbottom' import RightBottom from './Rightbottom'
import AutoRollComponent from './AutoRollComponent' import AutoRollComponent from './AutoRollComponent'
import './style.less' import './style.less'
import {getdaolutongji,getxuanchuan} from '../../../actions/example' import { getdaolutongji, getxuanchuan } from '../../../actions/example'
import { number } from 'echarts'; import { Carousel } from 'antd';
// import { number } from 'echarts';
const Build = (props) => { const Build = (props) => {
const { dispatch } = props const { dispatch } = props
let data1 = [ let data1 = [
{name: "县", value: 207}, { name: "县", value: 207 },
{name: "乡", value: 729}, { name: "乡", value: 729 },
{name: "村", value: 1938} { name: "村", value: 1938 }
] ]
// const safetyData = [ // const safetyData = [
// {name: '一级公路', value: 42}, // {name: '一级公路', value: 42},
// {name: '二级公路', value: 17}, // {name: '二级公路', value: 17},
// {name: '三级公路', value: 17}, // {name: '三级公路', value: 17},
// {name: '四级公路', value: 30}, // {name: '四级公路', value: 30},
// ] // ]
const [buildingnumber,setbuildingnumber] = useState(0) const [buildingnumber, setbuildingnumber] = useState(0)
const [data,setdata] = useState([]) const [data, setdata] = useState([])
const [xuandata,setxuandata] = useState(null) const [xuandata, setxuandata] = useState(null)
const lunbo = useRef(null)
const lunbovideo = useRef(null)
const [lunboindex, setlunboindex] = useState(0)
//
const lunboMsg = useRef({ index: 0 })
//获取道路管理数据 //获取道路管理数据
const requestbuildingnumber = async ()=>{ const requestbuildingnumber = async () => {
const res = await dispatch(getdaolutongji()); const res = await dispatch(getdaolutongji());
let alltype = Object.keys(res.payload.data?.roadType || {}).map((item)=>({name:item,value:Number(keepThreeNum(res.payload.data.roadType[item]))})) let alltype = Object.keys(res.payload.data?.roadType || {}).map((item) => ({ name: item, value: Number(keepThreeNum(res.payload.data.roadType[item])) }))
// console.log(alltype,'打他啊') // console.log(alltype,'打他啊')
setdata(alltype.filter(item=>item.name==='县'||item.name==="乡"||item.name==='村')) setdata(alltype.filter(item => item.name === '县' || item.name === "乡" || item.name === '村'))
setbuildingnumber(res.payload.data) setbuildingnumber(res.payload.data)
// console.log(res.payload.data,'哈哈哈') // console.log(res.payload.data,'哈哈哈')
} }
//获取宣传栏数据 //获取宣传栏数据
const requestxuanchuanlan = async ()=>{ const requestxuanchuanlan = async () => {
const res = await dispatch(getxuanchuan()); const res = await dispatch(getxuanchuan());
// setdata(alltype.filter(item=>item.name!=='null')) // setdata(alltype.filter(item=>item.name!=='null'))
setxuandata(res.payload.data || []) setxuandata(res.payload.data || [])
console.log(res.payload.data,'宣传栏数据') console.log(res.payload.data, '宣传栏数据')
} }
let t1 = Object.values(buildingnumber?.townRoad || {}) let t1 = Object.values(buildingnumber?.townRoad || {})
let totalgongli = t1.length!==0 ? t1.reduce((x,y)=>x+y.mileage,0):0 //乡镇道路占比总公里数 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) // let sungongli = alltype.reduce((x,y)=>x+y.value,0)
const keepThreeNum=(value)=> { const keepThreeNum = (value) => {
let resValue = 0 let resValue = 0
//小数点的位置 //小数点的位置
let index = value&&value.toString().indexOf('.') + 1 let index = value && value.toString().indexOf('.') + 1
//小数的位数 //小数的位数
let num = value&&Math.abs(Number(value)).toString().length - index let num = value && Math.abs(Number(value)).toString().length - index
if(index && num > 3){ if (index && num > 3) {
resValue = value&&Number(value).toFixed(3) resValue = value && Number(value).toFixed(3)
} else { } else {
resValue = value resValue = value
} }
return resValue return resValue
} }
let datas = Object.keys(buildingnumber?.townRoad || {}).map((item)=>({name:item,number:buildingnumber.townRoad[item].roadCount,gongli:Number(keepThreeNum(buildingnumber.townRoad[item].mileage))})) let datas = Object.keys(buildingnumber?.townRoad || {}).map((item) => ({ name: item, number: buildingnumber.townRoad[item].roadCount, gongli: Number(keepThreeNum(buildingnumber.townRoad[item].mileage)) }))
let list = datas.sort((a,b)=>{ let list = datas.sort((a, b) => {
return b.number - a.number return b.number - a.number
}) })
// console.log(list,'红红火') // console.log(list,'红红火')
//道路等级数据 //道路等级数据
let alldengji = Object.keys(buildingnumber?.roadLevel || {}).map((item)=>({name:item,value:Number(keepThreeNum(buildingnumber.roadLevel[item]))})) let alldengji = Object.keys(buildingnumber?.roadLevel || {}).map((item) => ({ name: item, value: Number(keepThreeNum(buildingnumber.roadLevel[item])) }))
let onlineproject = Object.keys(buildingnumber?.townProject||{}).map((item)=>({name:item,total:buildingnumber.townProject[item]})) let onlineproject = Object.keys(buildingnumber?.townProject || {}).map((item) => ({ name: item, total: buildingnumber.townProject[item] }))
onlineproject = onlineproject.sort((a,b)=>{ onlineproject = onlineproject.sort((a, b) => {
return b.total - a.total return b.total - a.total
}) })
let sunonlineproject = onlineproject?.reduce((x,y)=>x+y.total,0) let sunonlineproject = onlineproject?.reduce((x, y) => x + y.total, 0)
let safetyData = alldengji?.filter(item=>item.name==='一级公路'||item.name==='二级公路'||item.name==='三级公路'||item.name==='四级公路'||item.name==='等外公路') let safetyData = alldengji?.filter(item => item.name === '一级公路' || item.name === '二级公路' || item.name === '三级公路' || item.name === '四级公路' || item.name === '等外公路')
let sundata = data?.reduce((x,y)=>x+y.value,0) let sundata = data?.reduce((x, y) => x + y.value, 0)
let sunsafetyData = safetyData?.reduce((x,y)=>x+y.value,0) let sunsafetyData = safetyData?.reduce((x, y) => x + y.value, 0)
// console.log(safetyData,'好凶猛')
// console.log(data1,'对比') useEffect(() => {
// console.log(totalgongli,"好好的")
// console.log(keepThreeNum(totalgongli),'jjjjj')
useEffect(()=>{
requestbuildingnumber(); requestbuildingnumber();
requestxuanchuanlan() requestxuanchuanlan()
},[]) }, [])
// const datas = new Array(15) useEffect(()=>{
// datas.fill({ lunbo.current.goTo(lunboindex)
// name:"东乡镇", },[lunboindex])
// number:"11111", const rendercontent = () => {
// gongli:'9999'
// },0,15)
const rendercontent = ()=>{
return (<div className='build-left-center-content'> return (<div className='build-left-center-content'>
{list.map(({name,number,gongli},index)=><div className='build-left-center-item' key={index}> {list.map(({ name, number, gongli }, index) => <div className='build-left-center-item' key={index}>
<span>{name}</span> <span>{name}</span>
<span>{number}</span> <span>{number}</span>
<span>{gongli}</span> <span>{gongli}</span>
</div>)} </div>)}
</div>) </div>)
} }
// const xuandata1 = [ // const xuandata1 = [
// { // {
@ -120,104 +122,183 @@ const Build = (props) => {
// "enable": true // "enable": true
// } // }
// ] // ]
console.log(localStorage.getItem("qndmn"),'七牛') // console.log(localStorage.getItem("qndmn"), '七牛')
console.log(xuandata,"宣传") // console.log(xuandata, "宣传")
let videos = []
if (xuandata && xuandata.length) {
for (let x of xuandata) {
if (x.enable) {
if (x.video && x.video.length) {
for (let v of x.video) {
videos.push(v)
}
}
}
}
}
console.log(lunboindex)
return ( return (
<div className='bgbuild'> <>
<div className='bgbuild-left'> <div className='bgbuild-left'>
<Module title={"各种状态公路数量统计"} style={{ width: "100%", <Module title={"各状态公路数量统计"} style={{
height:" 33%" width: "100%",
}} customize = {true}> height: " 33%"
{buildingnumber&&buildingnumber.buildedRoad!==0&&totalgongli!==0?<div className='build-left-top'> }} customize={true}>
<div className='build-left-top-item'> <div style={{ height: "100%", position: "relative" }} >
<div> <span style={{ position: "absolute", width: "10%", color: "#FFF", backgroundColor: 'rgba(216, 240, 255, 0.1)', right: "5%", textAlign: "center" }}></span>
{/* <i>&#9658;</i> */} {buildingnumber && buildingnumber.buildedRoad !== 0 && totalgongli !== 0 ? <div className='build-left-top'>
<span/> <div className='build-left-top-item'>
<span>在建公路数量</span> <div>
</div> {/* <i>&#9658;</i> */}
<div>{buildingnumber?.buildingRoad || 0}</div> <span />
</div> <span>在建公路数量</span>
<img src='/assets/images/quanju/zhuangtaigonglui.png' className='build-left-top-center'/> </div>
<div className='build-left-top-item'> <div>{buildingnumber?.buildingRoad || 0}</div>
<div> </div>
{/* <i>&#9658;</i> */} <img src='/assets/images/quanju/zhuangtaigonglui.png' className='build-left-top-center' />
<span/> <div className='build-left-top-item'>
<span>已建公路数量</span> <div>
</div> {/* <i>&#9658;</i> */}
<div>{buildingnumber?.buildedRoad || 0}</div> <span />
<span>已建公路数量</span>
</div>
<div>{buildingnumber?.buildedRoad || 0}</div>
</div>
</div> : <NoData />}
</div> </div>
</div>:<NoData/>} </Module>
</Module> <Module title={"各乡镇已建道路统计"} style={{
<Module title={"各乡镇道路分布统计"} style={{ width: "100%", width: "100%",
height:" 33%",marginTop:'3%' height: " 33%", marginTop: '3%'
}} customize = {true}> }} customize={true}>
{ totalcount && totalcount!==0?<div className='build-left-center'> {totalcount && totalcount !== 0 ? <div className='build-left-center'>
<div className='build-left-center-top'> <div className='build-left-center-top'>
<div>
<img src='/assets/images/quanju/gonglugongli.png'></img>
<div> <div>
<span>公路公里数/公里</span> <img src='/assets/images/quanju/gonglugongli.png'></img>
<span>{keepThreeNum(totalgongli)}</span> <div>
<span>公路公里数/公里</span>
<span>{keepThreeNum(totalgongli)}</span>
</div>
</div> </div>
</div>
<div>
<img src='/assets/images/quanju/gongluzong.png'></img>
<div> <div>
<span>公路总数/</span> <img src='/assets/images/quanju/gongluzong.png'></img>
<span>{totalcount||0}</span> <div>
<span>公路总数/</span>
<span>{totalcount || 0}</span>
</div>
</div> </div>
</div> </div>
<div className='build-left-center-titile'>
<span>乡镇名称</span>
<span>公路数量/</span>
<span>公里</span>
</div>
<AutoRollComponent content={rendercontent()} containerStyle={{ position: "relative", height: "50%", }}
divHeight={"100%"} divId={"chart"} />
</div> : <NoData />}
</Module>
<Module title={"道路统计"} style={{
width: "100%",
height: " 30%", marginTop: '3%'
}} customize={true}>
{data && sundata !== 0 ? <LeftBottom
data={data}
width='100%'
height='100%'
text='道路总公里'
total={keepThreeNum(sundata)}
// colorList={colorList}
// underColorList={underColorList}
/> : <NoData />}
</Module>
</div>
<div className='bgbuild-right'>
<Module title={"宣传栏"} style={{
width: "100%",
height: " 33%"
}} customize={true}>
<div className='build-right-top'>
{/* <img src='/assets/images/quanju/xuanchuanlan.jpg'></img> */}
<Carousel dots={false} ref={lunbo} key={lunboindex}>
{/* {
videos.map((v, i) => {
console.log('first')
return i == lunboMsg.current.index ?
<video src={`${localStorage.getItem("qndmn")}/${v}`} key={Math.random()} autoPlay={i == lunboMsg.current.index} onEnded={() => {
console.log('end', i + 1, videos.length)
if (i == videos.length - 1) {
setlunboindex(0)
lunboMsg.current.index = 0
lunbo.current.goTo(1)
} else {
console.log('first222', i + 1)
setlunboindex(i + 1)
lunboMsg.current.index = i + 1
lunbo.current.next()
}
}}></video>
: <p>123</p>
})
} */}
{
xuandata&&xuandata!==null&&xuandata.length!==0?xuandata.filter(i=>i.enable).map((item,index1)=>{
if(item.video&&item.video!==null&&item.video.length!==0){
return item.video.map((i,index)=>{
// console.log(i,'视频')
console.log(index1,'index1')
if(index1===lunboindex){
// lunbo.current.goTo(lunboindex)
console.log("自动播放",index1)
return <video src={`${localStorage.getItem("qndmn")}/${i}`} autoPlay={true} ref={lunbovideo} onEnded={()=>{
if(index1<xuandata.filter(i=>i.enable).length-1){
// console.log(index1,xuandata,'触发了')
setlunboindex(lunboindex+1)
}else{
// console.log(index1,xuandata,'触发了')
setlunboindex(0)
}
}}></video>
}else{
// console.log("不自动播放",index1)
return <video src={`${localStorage.getItem("qndmn")}/${i}`} autoPlay={false} ></video>
}
})
}
// return <video src={`${localStorage.getItem("qndmn")}/${item.video!==null&&item.video.length!==0?item.video[0]:""}`} autoPlay="autoplay" loop></video>
})
:<video src='#'></video>
}
{/* <video src={xuandata&&xuandata!==null&&xuandata.length!==0?`${localStorage.getItem("qndmn")}/${xuandata[0].video!==null&&xuandata[0].video?xuandata[0].video[0]:""}`:"#"} autoPlay="autoplay" loop></video> */}
</Carousel>
<h2>全面建设好农村公路切实发挥先行官作用</h2>
</div> </div>
<div className='build-left-center-titile'> </Module>
<span>乡镇名称</span> <Module title={"各乡镇在建工程统计"} style={{
<span>公路数量/</span> width: "100%",
<span>公里</span> height: " 33%", marginTop: '3%'
</div> }} customize={true}>
<AutoRollComponent content = {rendercontent()} containerStyle={{ position: "relative", height: "50%", }} {sunonlineproject !== 0 ? <Rightcenter data={onlineproject} sundata={sunonlineproject} /> : <NoData />}
divHeight={"100%"} divId={"chart"} /> </Module>
</div>:<NoData/>} <Module title={"各路段技术等级统计"} style={{
</Module> width: "100%",
<Module title={"道路统计"} style={{ width: "100%", height: " 30%", marginTop: '3%'
height:" 30%",marginTop:'3%' }} customize={true}>
}} customize = {true}> {safetyData && sunsafetyData !== 0 ? <RightBottom width='100%'
{ data&&sundata!==0?<LeftBottom height='100%'
data={data} text='道路总公里'
width='100%' total={keepThreeNum(sundata)}
height='100%' data={keepThreeNum(safetyData)} /> : <NoData />}
text='道路总公里' </Module>
total={keepThreeNum(sundata)} </div>
// colorList={colorList} </>
// underColorList={underColorList}
/>:<NoData/>}
</Module>
</div>
<div className='bgbuild-right'>
<Module title={"宣传栏"} style={{ width: "100%",
height:" 33%"
}} customize={true}>
<div className='build-right-top'>
{/* <img src='/assets/images/quanju/xuanchuanlan.jpg'></img> */}
<video src={xuandata&&xuandata!==null&&xuandata.length!==0?`${localStorage.getItem("qndmn")}/${xuandata[0].video!==null&&xuandata[0].video?xuandata[0].video[0]:""}`:"#"} autoPlay="autoplay" loop></video>
<h2>全面建设好农村公路切实发挥先行官作用</h2>
</div>
</Module>
<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%",
height:" 30%",marginTop:'3%'
}} customize = {true}>
{safetyData&&sunsafetyData!==0?<RightBottom width='100%'
height='100%'
text='道路总公里'
total={keepThreeNum(sundata)}
data={keepThreeNum(safetyData)}/>:<NoData/>}
</Module>
</div>
</div>
) )
} }
function mapStateToProps(state) { function mapStateToProps(state) {

20
web/client/src/sections/quanju/containers/footer/build/style.less

@ -3,14 +3,14 @@
font-size: 10px; font-size: 10px;
} }
} }
.bgbuild{ // .bgbuild{
// box-sizing: border-box; // // box-sizing: border-box;
padding: 0 15px 0 15px; // padding: 0 15px 0 15px;
width: 100%; // width: 100%;
height: 100%; // height: 100%;
// display: flex; // // display: flex;
position: relative; // position: relative;
justify-content: space-between; // justify-content: space-between;
.bgbuild-left{ .bgbuild-left{
position: absolute; position: absolute;
left: 0; left: 0;
@ -214,7 +214,7 @@
padding: 0 10px; padding: 0 10px;
video{ video{
width: 100%; width: 100%;
height: 65%; height: 17vh;
// margin-bottom: 5%; // margin-bottom: 5%;
} }
@ -302,6 +302,6 @@
} }
} }
} }
}

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

@ -29,10 +29,8 @@ const Conserve = (props) => {
return ( return (
<div style={{ width: '100%', height: '100%', }}> <div style={{ width: '100%', height: '100%', }}>
<div style={{ display: 'flex', width: '100%', height: '100%', justifyContent: 'space-between' }}>
<Left roadData={roadData} loading={loading} /> <Left roadData={roadData} loading={loading} />
<Right highwaysData={highwaysData} roadMaintenances={roadMaintenances}/> <Right highwaysData={highwaysData} roadMaintenances={roadMaintenances}/>
</div>
</div> </div>
) )
} }

10
web/client/src/sections/quanju/containers/footer/conserve/left.js

@ -4,12 +4,12 @@ import LeftCenter from './left/left-center'
import LeftTop from './left/left-top' import LeftTop from './left/left-top'
const Left = (props) => { const Left = (props) => {
const { roadData,loading } = props const { roadData, loading } = props
return ( return (
<div style={{ display: 'flex', flexDirection: 'column', width: "23%", height: "100%", marginLeft: "1%" }}> <div style={{ position: 'absolute', left: 0, width: "23%", height: "100%", marginLeft: "1%" }}>
<LeftTop roadData={roadData} loading ={loading}/> <LeftTop roadData={roadData} loading={loading} />
<LeftCenter roadData={roadData} loading ={loading}/> <LeftCenter roadData={roadData} loading={loading} />
<LeftBottom roadData={roadData} loading ={loading}/> <LeftBottom roadData={roadData} loading={loading} />
</div> </div>
) )
} }

11
web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js

@ -2,12 +2,12 @@ import React from 'react'
import Module from '../../../public/module' import Module from '../../../public/module'
import PieChart from '../chart/pie-chart'; import PieChart from '../chart/pie-chart';
let colorList = [ let color = [
"rgba(7,185,254,1)", "rgba(7,185,254,1)",
"rgba(28,96,254,1)", "rgba(28,96,254,1)",
"rgba(4,251,240,1)", "rgba(4,251,240,1)",
] ]
let underColorList = [ let underColor = [
"rgba(7,185,254,0.5)", "rgba(7,185,254,0.5)",
"rgba(28,96,254,0.5)", "rgba(28,96,254,0.5)",
"rgba(4,251,240,0.5)", "rgba(4,251,240,0.5)",
@ -22,9 +22,14 @@ const LeftBottom = (props) => {
totalData += s.isGreen totalData += s.isGreen
return { return {
name: grade[index], name: grade[index],
value: s.isGreen.toFixed(3) value: s.isGreen.toFixed(3),
colorList: color[index],
underColorList: underColor[index]
} }
}) })
let colorList = value?.map(c =>c.colorList)
let underColorList = value?.map(c =>c.underColorList)
return ( return (
<> <>

8
web/client/src/sections/quanju/containers/footer/conserve/left/left-center.js

@ -114,7 +114,7 @@ const LeftCenter = (props) => {
axisLabel: { axisLabel: {
show: true, show: true,
backgroundColor: { backgroundColor: {
image: 'assets/images/quanju/kelvhua_bdbg.png', image: '/assets/images/quanju/kelvhua_bdbg.png',
}, },
width: 70, width: 70,
height: 22, height: 22,
@ -172,7 +172,7 @@ const LeftCenter = (props) => {
rich: { rich: {
a: { a: {
backgroundColor: { backgroundColor: {
image: 'assets/images/quanju/circle2.png' image: '/assets/images/quanju/circle2.png'
}, },
width: 15, width: 15,
height: 15, height: 15,
@ -228,9 +228,9 @@ const LeftCenter = (props) => {
<Row align='middle' style={{ padding: '10px 3% 0px 15px' }}> <Row align='middle' style={{ padding: '10px 3% 0px 15px' }}>
<Col span={15}> <Col span={15}>
<img src='/assets/images/quanju/kelvhua_icon.png' alt='icon' style={{ width: '26%' }} /> <img src='/assets/images/quanju/kelvhua_icon.png' alt='icon' style={{ width: '26%' }} />
<span style={{ color: '#C2EEFF', marginLeft: 5, textShadow: '0px 0px 4px #07B9FE' }}>可绿化里程总数</span> <span style={{ color: '#C2EEFF', marginLeft: 5 }}>可绿化里程总数</span>
</Col> </Col>
<Col span={9} style={{ fontSize: 24, fontFamily: 'YouSheBiaoTiHei', color: '#fff' }}>{totalData.toFixed(3) || 0}</Col> <Col span={9} style={{ fontSize: 24, fontFamily: 'YouSheBiaoTiHei', color: '#fff', textShadow: '0px 0px 4px #07B9FE' }}>{totalData.toFixed(3) || 0}</Col>
</Row> </Row>
<div ref={chartRef} style={{ height: "14.5vh", width: "100%" }}></div> <div ref={chartRef} style={{ height: "14.5vh", width: "100%" }}></div>

10
web/client/src/sections/quanju/containers/footer/conserve/right.js

@ -4,12 +4,12 @@ import RightCenter from './right/right-center'
import RightTop from './right/right-top' import RightTop from './right/right-top'
const Right = (props) => { const Right = (props) => {
const { highwaysData,roadMaintenances } = props const { highwaysData, roadMaintenances } = props
return ( return (
<div style={{ display: 'flex', flexDirection: 'column', width: "23%", height: "100%", marginRight: "1%", }}> <div style={{ position: 'absolute', right: 0, width: "23%", height: "100%", marginRight: "1%", }}>
<RightTop highwaysData={highwaysData}/> <RightTop highwaysData={highwaysData} />
<RightCenter highwaysData={highwaysData}/> <RightCenter highwaysData={highwaysData} />
<RightBottom roadMaintenances={roadMaintenances}/> <RightBottom roadMaintenances={roadMaintenances} />
</div> </div>
) )
} }

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

@ -2,18 +2,18 @@ import React from 'react'
import Module from '../../../public/module' import Module from '../../../public/module'
import PieChart from '../chart/pie-chart'; import PieChart from '../chart/pie-chart';
let colorList = [ // let colorList = [
"rgba(7,185,254,1)", // "rgba(7,185,254,1)",
"rgba(28,96,254,1)", // "rgba(28,96,254,1)",
"rgba(4,251,240,1)", // "rgba(4,251,240,1)",
"rgba(255,194,20,1)" // "rgba(255,194,20,1)"
] // ]
let underColorList = [ // let underColorList = [
"rgba(7,185,254,0.5)", // "rgba(7,185,254,0.5)",
"rgba(28,96,254,0.5)", // "rgba(28,96,254,0.5)",
"rgba(4,251,240,0.5)", // "rgba(4,251,240,0.5)",
"rgba(255,194,20,0.5)" // "rgba(255,194,20,0.5)"
] // ]
const type = ['culvert', '', 'road', 'bridge'] const type = ['culvert', '', 'road', 'bridge']
@ -30,27 +30,37 @@ const RightBottom = (props) => {
case 'road': case 'road':
return { return {
name: '道路', name: '道路',
value: r.count value: r.count,
colorList: 'rgba(7,185,254,1)',
underColorList: 'rgba(7,185,254,0.5)'
}; };
case 'culvert': case 'culvert':
return { return {
name: '涵洞', name: '涵洞',
value: r.count value: r.count,
colorList: 'rgba(4,251,240,1)',
underColorList: 'rgba(4,251,240,0.5)'
}; };
case 'bridge': case 'bridge':
return { return {
name: '桥梁', name: '桥梁',
value: r.count value: r.count,
colorList: 'rgba(28,96,254,1)',
underColorList: 'rgba(28,96,254,0.5)'
}; };
case '其他': case 'other':
return { return {
name: '其他', name: '其他',
value: r.count value: r.count,
colorList: 'rgba(255,194,20,1)',
underColorList: 'rgba(255,194,20,0.5)'
}; };
} }
}).filter(f => f !== undefined) }).filter(f => f !== undefined)
// const otherNum = totalData - typesNum console.log('list:',list);
// otherNum !== null && list?.push({ name: '其他', value: otherNum }) let colorList = list?.map(c => c.colorList)
let underColorList =list?.map(c => c.underColorList)
const style = { height: "31%", marginTop: "3%" } const style = { height: "31%", marginTop: "3%" }
return ( return (
<> <>

10
web/client/src/sections/quanju/containers/footer/gis/gis.js

@ -21,9 +21,9 @@ const Gis = (props) => {
const loadMap = () => { const loadMap = () => {
const map = new AMap.Map(MAPID, { const map = new AMap.Map(MAPID, {
resizeEnable: true, resizeEnable: true,
center: [115.912663, 28.543149],//地图中心点,初始定位加载显示楼块 center: [115.99255, 28.503617],//地图中心点,初始定位加载显示楼块
zoom: 15,//地图显示的缩放级别 zoom: 8,//地图显示的缩放级别
zooms: [10, 12], zooms: [8, 18],
pitch: 0, // 地图俯仰角度,有效范围 0 度- 83 度 pitch: 0, // 地图俯仰角度,有效范围 0 度- 83 度
viewMode: '3D', // 地图模式 viewMode: '3D', // 地图模式
mapStyle: 'amap://styles/fb26776387242721c2fc32e2cb1daccc', mapStyle: 'amap://styles/fb26776387242721c2fc32e2cb1daccc',
@ -42,8 +42,8 @@ const Gis = (props) => {
}; };
return ( return (
<div style={{ position: 'absolute', width: '100%', backgroundColor: '#101824', height: '100%', minHeight: 700 }}> <div style={{ position: 'absolute', width: '100%', height: '100%' }}>
<div id={MAPID} style={{ width: '100%', height: '100%', background: "#101824", minHeight: 700 }} /> <div id={MAPID} style={{ width: '100%', height: '100%',}} />
{mapObj ? <Bounds map={mapObj} /> : ''} {mapObj ? <Bounds map={mapObj} /> : ''}
</div > </div >
) )

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

@ -30,8 +30,9 @@ const Guanli = (props) => {
// let d = res.payload.data?.overSpeedList.sort((a,b)=>b.processingTime < a.processingTime ?-1:1) // let d = res.payload.data?.overSpeedList.sort((a,b)=>b.processingTime < a.processingTime ?-1:1)
var pattern = /[\u4e00-\u9fa5]*/; var pattern = /[\u4e00-\u9fa5]*/;
// console.log(res.payload.data,'好的号的')
let d = res.payload.data?.overSpeedList?.filter((item,index)=>{ let d = res.payload.data?.overSpeedList?.filter((item,index)=>{
return escape(item.processingTime).indexOf("%u")<0 return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false
}) })
d.map((item,index)=>{ d.map((item,index)=>{
@ -56,12 +57,12 @@ const Guanli = (props) => {
// datalist.fill({licensePlate:"赣A44454",overrunRate:"30%",fine:"200元",processingTime:"2020年4月1日"}) // datalist.fill({licensePlate:"赣A44454",overrunRate:"30%",fine:"200元",processingTime:"2020年4月1日"})
const renderContent = () => { const renderContent = () => {
return <div style={{height:"100%"}}> return <div style={{height:"100%"}}>
{rightitemlist && rightitemlist.length!==0?rightitemlist?.map(({ id, licensePlate, overrunRate,fine,processingTime }, index) => { {rightitemlist && rightitemlist.length!==0?rightitemlist?.map(({ id, licensePlate, overrunRate,fine,processingTime,deductPoints }, index) => {
if(index<120){ if(index<120){
return <div key={index} className='guanli-right-item'> return <div key={index} className='guanli-right-item'>
<span>{licensePlate}</span> <span>{licensePlate}</span>
<span>{overrunRate}%</span> <span>{overrunRate}%</span>
<span>{fine}{fine?"元":""}</span> <span>{deductPoints?`-${deductPoints}`:""}-{fine}{fine?"元":""}</span>
<span>{processingTime}</span> <span>{processingTime}</span>
</div> </div>
} }
@ -78,7 +79,7 @@ const Guanli = (props) => {
} }
// renderContent() // renderContent()
return ( return (
<div className='guanli'> <>
<div className='guanli-left'> <div className='guanli-left'>
<Module style={{height:"100%"}} title="检测点治超处理占比" customize={true}> <Module style={{height:"100%"}} title="检测点治超处理占比" customize={true}>
{leftDatas && leftDatas.length!==0?<AutoRollComponent content={renderLeftContent()} {leftDatas && leftDatas.length!==0?<AutoRollComponent content={renderLeftContent()}
@ -105,7 +106,7 @@ const Guanli = (props) => {
divHeight={"100%"} divId={"chart-overview-deviceList"} />:<NoData style={{height:"70%"}}/>} divHeight={"100%"} divId={"chart-overview-deviceList"} />:<NoData style={{height:"70%"}}/>}
</Module> </Module>
</div> </div>
</div> </>
) )
} }
function mapStateToProps(state) { function mapStateToProps(state) {

14
web/client/src/sections/quanju/containers/footer/guanli/style.less

@ -3,12 +3,12 @@
font-size: 12px; font-size: 12px;
} }
} }
.guanli{ // .guanli{
// box-sizing: border-box; // // box-sizing: border-box;
padding: 0 15px 0 15px; // padding: 0 15px 0 15px;
width: 100%; // width: 100%;
height: 100%; // height: 100%;
position: relative; // position: relative;
// display: flex; // display: flex;
// justify-content: space-between; // justify-content: space-between;
.guanli-left{ .guanli-left{
@ -172,6 +172,6 @@
} }
} }
} }
}

2
web/client/src/sections/quanju/containers/footer/leadership/centerLeft.js

@ -8,7 +8,7 @@ const CenterLeft = (props) => {
const { dispatch } = props const { dispatch } = props
return ( return (
<> <>
<div style={{ width: "48%", height: "100%", float: "left", marginLeft: "1%" }}> <div style={{ width: "48%", height: "100%", position: "absolute", left: "25%" }}>
<Centerlefttop dispatch={dispatch} /> <Centerlefttop dispatch={dispatch} />
<Centerleftbottom dispatch={dispatch} /> <Centerleftbottom dispatch={dispatch} />
</div> </div>

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

@ -18,7 +18,7 @@ const Right = (props) => {
setNums(res.payload.data.reportCount.filter((item, index) => { setNums(res.payload.data.reportCount.filter((item, index) => {
return item.projectType == "road" return item.projectType == "road"
})) }))
console.log(res.payload.data); // console.log(res.payload.data);
}) })
}, []) }, [])
useEffect(() => { useEffect(() => {
@ -28,11 +28,12 @@ const Right = (props) => {
// const // const
}) })
}, []) }, [])
console.log("1211", nums); // console.log("1211", nums);
const renderBody = () => { const renderBody = () => {
return ( return (
<div style={{ width: "100%", height: "100%" }}> <div style={{ width: "100%", height: "100%" }}>
{/* <Spin spinning={!nums} tip="Loading" style={{ width: "100%", height: "100%" }}> */}
{ {
list.map((item, index) => { list.map((item, index) => {
return ( return (
@ -49,42 +50,47 @@ const Right = (props) => {
<p style={{ textAlign: "center", width: "10%", position: "absolute", left: "43%", color: beijing == index ? "#ffffff" : "rgba(216,240,255,0.8)" }} >日常养护</p> <p style={{ textAlign: "center", width: "10%", position: "absolute", left: "43%", color: beijing == index ? "#ffffff" : "rgba(216,240,255,0.8)" }} >日常养护</p>
{item.user?.name ? <p style={{ textAlign: "center", width: "10%", position: "absolute", right: "28.5%", color: beijing == index ? "#ffffff" : "rgba(216,240,255,0.8)" }} >{item.user.name}</p> : <p style={{ textAlign: "center", width: "10%", position: "absolute", right: "28.5%", color: beijing == index ? "#ffffff" : "rgba(216,240,255,0.8)" }} >--</p>} {item.user?.name ? <p style={{ textAlign: "center", width: "10%", position: "absolute", right: "28.5%", color: beijing == index ? "#ffffff" : "rgba(216,240,255,0.8)" }} >{item.user.name}</p> : <p style={{ textAlign: "center", width: "10%", position: "absolute", right: "28.5%", color: beijing == index ? "#ffffff" : "rgba(216,240,255,0.8)" }} >--</p>}
<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: "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-Do HH:mm:ss") ? moment(item.time).format("YYYY-MM-Do HH:mm:ss") : "--"}</p></li> <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></li>
) )
}) })
} }
{/* </Spin> */}
</div> </div>
) )
} }
return ( 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: "100%", float: "right", marginRight: "1%", position: "relative" }}>
<div style={{ width: "100%", height: "43%", position: "relative", left: "1%" }}> <div style={{ width: "100%", height: "43%", position: "relative", left: "1%" }}>
<div style={{ width: "96%", position: "relative", left: "2%" }}> <div style={{ width: "96%", position: "relative", left: "2%" }}>
<p style={{ position: "absolute", color: "rgba(216,240,255,0.8)" }}>占比<span style={{ fontFamily: " PingFangSC-Regular, PingFang SC" }}>{((roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)}</span>%</p> {/* <Spin spinning={!roads} tip="Loading" > */}
<p style={{ width: "50%", position: "absolute", right: "0%", fontFamily: "YouSheBiaoTiHei", textAlign: "right", fontSize: "24px", color: "#F5FCFF", marginLeft: "10%" }}>{roads?.["县"].toFixed(3)}<span style={{ color: "#F5FCFF", fontSize: "16px", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}>公里</span><span style={{ fontSize: "18px", color: "rgba(216,240,255,0.8)", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span></p> <p style={{ position: "absolute", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span style={{ fontFamily: " PingFangSC-Regular, PingFang SC" }}>{isNaN(((roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)) ? "" : ((roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)}</span>%</p>
<p style={{ width: "50%", position: "absolute", right: "0%", fontFamily: "YouSheBiaoTiHei", textAlign: "right", fontSize: "24px", color: "#F5FCFF", marginLeft: "10%" }}>{isNaN(roads?.["县"].toFixed(3)) ? "" : roads?.["县"].toFixed(3)}<span style={{ color: "#F5FCFF", fontSize: "16px", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}>公里</span><span style={{ fontSize: "18px", color: "rgba(216,240,255,0.8)", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span></p>
{/* </Spin> */}
</div> </div>
<div style={{ width: "96%", position: "relative", left: "2%", height: "50%" }}> <div style={{ width: "96%", position: "relative", left: "2%", height: "50%" }}>
<div style={{ width: (roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])).toFixed(4) * 100 + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#fff", float: "left", marginTop: "5.6%" }}> <div style={{ width: parseInt((roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100) + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%" }}>
</div> </div>
{/* <div style={{ width: "15%", height: "20%", backgroundColor: "#df0001", float: "left", marginTop: "5.6%" }}> <div style={{ width: parseInt(((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100) + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#0A72FF", float: "left", marginTop: "5.6%" }}></div>
</div> */}
<div style={{ width: ((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])).toFixed(4) * 100 + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%" }}></div>
</div> </div>
<div style={{ width: "96%", position: "relative", left: "2%" }}> <div style={{ width: "96%", position: "relative", left: "2%" }}>
<p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>乡村道道路<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}>{(roads?.["乡"] + roads?.["村"]).toFixed(3)}</span><span style={{ marginLeft: "4%" }}></span></p> {/* <Spin spinning={!roads} tip="Loading" > */}
<p style={{ position: "absolute", right: "0", color: "rgba(216,240,255,0.8)" }}>占比<span>{(((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)}</span><span>%</span></p>
<p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>乡村道道路<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}>{isNaN((roads?.["乡"] + roads?.["村"]).toFixed(3)) ? "" : (roads?.["乡"] + roads?.["村"]).toFixed(3)}</span><span style={{ marginLeft: "4%" }}></span></p>
<p style={{ position: "absolute", right: "0", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span>{isNaN((((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)) ? "" : (((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)}</span><span>%</span></p>
{/* </Spin> */}
</div> </div>
</div> </div>
<div style={{ height: "80%", width: "100%", position: "relative", left: "5%", top: "-8%" }}> <div style={{ height: "80%", width: "100%", position: "relative", left: "5%", top: "-8%" }}>
<div style={{ width: "100%", height: "40px"/* , backgroundColor: "#fff" */, position: "relative" }}> <div style={{ width: "100%", height: "40px"/* , backgroundColor: "#fff" */, position: "relative" }}>
{/* <p>{title || []}</p> */} {/* <p>{title || []}</p> */}
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "23%" }} /> <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: "3%" }}>养护事件</span> <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 : []}</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 ? nums[0]?.count : 0}</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%" }} /> */} {/* <img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} /> */}
</div> </div>
{/* <Spin spinning={true} style={{ height: "80%" }}> */} {/* <Spin spinning={true} style={{ height: "80%" }}> */}
@ -99,6 +105,7 @@ const Right = (props) => {
</div> </div>
</div> </div>
{/* </Spin> */}
</> </>
) )
} }

29
web/client/src/sections/quanju/containers/footer/leadership/centerleft/handong.js

@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react'
import Lun from "../right/lunbo" import Lun from "../right/lunbo"
import { getRoadmaintain, getdaolutongji } from "../../../../actions/example" import { getRoadmaintain, getdaolutongji } from "../../../../actions/example"
import moment from 'moment' import moment from 'moment'
// import { Spin } from 'antd'
const Right = (props) => { const Right = (props) => {
@ -26,7 +27,7 @@ const Right = (props) => {
const daolus = dispatch(getdaolutongji()).then((res) => { const daolus = dispatch(getdaolutongji()).then((res) => {
// console.log("[roads]", res.payload.data.roadType); // console.log("[roads]", res.payload.data.roadType);
setRoads(res.payload.data.townCulvert) setRoads(res.payload.data.townCulvert)
console.log(res.payload.data.townCulvert); // console.log(res.payload.data.townCulvert);
// const // const
}) })
}, []) }, [])
@ -34,9 +35,11 @@ const Right = (props) => {
return ( return (
<div style={{ width: "100%", height: "100%" }}> <div style={{ width: "100%", height: "100%" }}>
{/* <Spin spinning={!nums} tip="Loading" style={{ width: "100%", height: "100%" }}> */}
{ {
list.map((item, index) => { list.map((item, index) => {
console.log(list); // console.log(list);
return ( return (
<li className={index} style={{ <li className={index} style={{
@ -57,38 +60,42 @@ const Right = (props) => {
) )
}) })
} }
{/* </Spin> */}
</div> </div>
) )
} }
return ( return (
<> <>
<div style={{ width: "100%", height: "100%", float: "right", marginRight: "1%", position: "relative" }}> <div style={{ width: "100%", height: "100%", float: "right", marginRight: "1%", position: "relative" }}>
<div style={{ width: "100%", height: "43%", position: "relative", left: "1%" }}> <div style={{ width: "100%", height: "43%", position: "relative", left: "1%" }}>
{/* <Spin spinning={!roads} tip="Loading" ></Spin> */}
<div style={{ width: "96%", position: "relative", left: "2%" }}> <div style={{ width: "96%", position: "relative", left: "2%" }}>
<p style={{ position: "absolute", color: "rgba(216,240,255,0.8)" }}>占比<span style={{ fontFamily: " PingFangSC-Regular, PingFang SC" }}>{((roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)}</span>%</p> <p style={{ position: "absolute", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span style={{ fontFamily: " PingFangSC-Regular, PingFang SC" }}>{isNaN(((roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)) ? "" : ((roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)}</span>%</p>
<p style={{ width: "50%", position: "absolute", right: "0%", textAlign: "right", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF", marginLeft: "10%" }}>{roads?.["县"].toFixed(0)}<span style={{ color: "#F5FCFF", fontSize: "16px", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span><span style={{ fontSize: "18px", color: "rgba(216,240,255,0.8)", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span></p> <p style={{ width: "50%", position: "absolute", right: "0%", textAlign: "right", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF", marginLeft: "10%" }}>{isNaN(roads?.["县"].toFixed(0)) ? "" : roads?.["县"].toFixed(0)}<span style={{ color: "#F5FCFF", fontSize: "16px", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span><span style={{ fontSize: "18px", color: "rgba(216,240,255,0.8)", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span></p>
</div> </div>
<div style={{ width: "96%", position: "relative", left: "2%", height: "50%" }}> <div style={{ width: "96%", position: "relative", left: "2%", height: "50%" }}>
<div style={{ width: (roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])).toFixed(4) * 100 + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#fff", float: "left", marginTop: "5.6%" }}> <div style={{ width: parseInt((roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100) + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%" }}>
</div> </div>
{/* <div style={{ width: "15%", height: "20%", backgroundColor: "#df0001", float: "left", marginTop: "5.6%" }}> {/* <div style={{ width: "15%", height: "20%", backgroundColor: "#df0001", float: "left", marginTop: "5.6%" }}>
</div> */} </div> */}
<div style={{ width: ((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])).toFixed(4) * 100 + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%" }}></div> <div style={{ width: parseInt(((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100) + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#0A72FF", float: "left", marginTop: "5.6%" }}></div>
</div> </div>
<div style={{ width: "96%", position: "relative", left: "2%" }}> <div style={{ width: "96%", position: "relative", left: "2%" }}>
<p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>乡村涵洞<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}>{(roads?.["乡"] + roads?.["村"]).toFixed(0)}</span><span style={{ marginLeft: "4%" }}></span></p> <p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>乡村涵洞<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}>{isNaN((roads?.["乡"] + roads?.["村"]).toFixed(0)) ? "" : (roads?.["乡"] + roads?.["村"]).toFixed(0)}</span><span style={{ marginLeft: "4%" }}></span></p>
<p style={{ position: "absolute", right: "0", color: "rgba(216,240,255,0.8)" }}>占比<span>{(((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)}</span><span>%</span></p> <p style={{ position: "absolute", right: "0", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span>{isNaN((((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)) ? "" : (((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)}</span><span>%</span></p>
</div> </div>
</div> </div>
<div style={{ height: "80%", width: "100%", position: "relative", left: "5%", top: "-8%" }}> <div style={{ height: "80%", width: "100%", position: "relative", left: "5%", top: "-8%" }}>
<div style={{ width: "100%", height: "40px"/* , backgroundColor: "#fff" */, position: "relative" }}> <div style={{ width: "100%", height: "40px"/* , backgroundColor: "#fff" */, position: "relative" }}>
{/* <p>{title || []}</p> */} {/* <p>{title || []}</p> */}
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "23%" }} /> <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: "3%" }}>养护事件</span> <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 : []}</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 ? nums[0]?.count : 0}</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%" }} /> */} {/* <img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} /> */}
</div> </div>
<Lun <Lun

22
web/client/src/sections/quanju/containers/footer/leadership/centerleft/qiqoliang.js

@ -23,7 +23,7 @@ const Right = (props) => {
const daolus = dispatch(getdaolutongji()).then((res) => { const daolus = dispatch(getdaolutongji()).then((res) => {
// console.log("[roads]", res.payload.data.roadType); // console.log("[roads]", res.payload.data.roadType);
setRoads(res.payload.data.bridgeSize) setRoads(res.payload.data.bridgeSize)
console.log(res.payload.data.bridgeSize); // console.log(res.payload.data.bridgeSize);
// const // const
}) })
}, []) }, [])
@ -61,29 +61,29 @@ const Right = (props) => {
<div style={{ width: "100%", height: "43%", position: "relative", left: "1%" }}> <div style={{ width: "100%", height: "43%", position: "relative", left: "1%" }}>
<div style={{ width: "96%", position: "relative", left: "2%" }}> <div style={{ width: "96%", position: "relative", left: "2%" }}>
<p style={{ position: "absolute", color: "rgba(216,240,255,0.8)" }}>占比<span style={{ fontFamily: " PingFangSC-Regular, PingFang SC" }}>{((roads?.["大桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])) * 100).toFixed(2)}</span>%</p> <p style={{ position: "absolute", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span style={{ fontFamily: " PingFangSC-Regular, PingFang SC" }}>{isNaN(((roads?.["大桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])) * 100).toFixed(2)) ? "" : ((roads?.["大桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])) * 100).toFixed(2)}</span>%</p>
<p style={{ width: "25%", position: "absolute", right: "0%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF", marginLeft: "10%", textAlign: "right" }}>{roads?.["大桥"]}<span style={{ color: "#F5FCFF", fontSize: "16px", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span><span style={{ fontSize: "18px", color: "rgba(216,240,255,0.8)", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span></p> <p style={{ width: "25%", position: "absolute", right: "0%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF", marginLeft: "10%", textAlign: "right" }}>{isNaN(roads?.["大桥"]) ? "" : roads?.["大桥"]}<span style={{ color: "#F5FCFF", fontSize: "16px", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span><span style={{ fontSize: "18px", color: "rgba(216,240,255,0.8)", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span></p>
</div> </div>
<div style={{ width: "96%", position: "relative", left: "2%", height: "50%" }}> <div style={{ width: "96%", position: "relative", left: "2%", height: "50%" }}>
<div style={{ width: (roads?.["大桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])).toFixed(2) * 100 + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#fff", float: "left", marginTop: "5.6%" }}> <div style={{ width: parseInt((roads?.["大桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])) * 100) + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%" }}>
</div> </div>
<div style={{ width: (roads?.["中桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])).toFixed(2) * 100 + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#df0001", float: "left", marginTop: "5.6%" }}> <div style={{ width: parseInt(((roads?.["中桥"] + roads?.["小桥"]) / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])) * 100) + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#0A72FF", float: "left", marginTop: "5.6%" }}>
</div> </div>
<div style={{ width: (roads?.["小桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])).toFixed(2) * 100 + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%", borderRadius: "0 2% 2% 0" }}></div> {/* <div style={{ width: (roads?.["小桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])).toFixed(2) * 100 + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%", borderRadius: "0 2% 2% 0" }}></div> */}
</div> </div>
<div style={{ width: "96%", position: "relative", left: "2%" }}> <div style={{ width: "96%", position: "relative", left: "2%" }}>
<p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>中小桥梁<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}>{roads?.["小桥"] + roads?.["中桥"]}</span><span style={{ marginLeft: "4%" }}></span></p> <p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>中小桥梁<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}>{isNaN(roads?.["小桥"] + roads?.["中桥"]) ? "" : roads?.["小桥"] + roads?.["中桥"]}</span><span style={{ marginLeft: "4%" }}></span></p>
<p style={{ position: "absolute", right: "0", color: "rgba(216,240,255,0.8)" }}>占比<span>{(((roads?.["小桥"] + roads?.["中桥"]) / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])) * 100).toFixed(2)}</span><span>%</span></p> <p style={{ position: "absolute", right: "0", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span>{isNaN((((roads?.["小桥"] + roads?.["中桥"]) / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])) * 100).toFixed(2)) ? "" : (((roads?.["小桥"] + roads?.["中桥"]) / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])) * 100).toFixed(2)}</span><span>%</span></p>
</div> </div>
</div> </div>
<div style={{ height: "80%", width: "100%", position: "relative", left: "5%", top: "-8%" }}> <div style={{ height: "80%", width: "100%", position: "relative", left: "5%", top: "-8%" }}>
<div style={{ width: "100%", height: "40px"/* , backgroundColor: "#fff" */, position: "relative" }}> <div style={{ width: "100%", height: "40px"/* , backgroundColor: "#fff" */, position: "relative" }}>
{/* <p>{title || []}</p> */} {/* <p>{title || []}</p> */}
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "23%" }} /> <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: "3%" }}>养护事件</span> <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 : []}</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 ? nums[0]?.count : 0}</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%" }} /> */} {/* <img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} /> */}
</div> </div>
<Lun <Lun

6
web/client/src/sections/quanju/containers/footer/leadership/centerleft/top.js

@ -39,7 +39,7 @@ const Leftcenter = (props) => {
</div> </div>
<div style={{ width: "50%", height: "100%", position: "absolute", left: "50%", top: "11%" }}> <div style={{ width: "50%", height: "100%", position: "absolute", left: "50%", top: "11%" }}>
<p style={{ fontSize: "2vh", color: "#D8F0FF", fontFamily: "PingFangSC-Regular, PingFang SC", marginTop: "3%" }}>道路统计<span style={{ marginLeft: "10px", color: "rgba(216,240,255,0.8000)" }}>公里</span></p> <p style={{ fontSize: "2vh", color: "#D8F0FF", fontFamily: "PingFangSC-Regular, PingFang SC", marginTop: "3%" }}>道路统计<span style={{ marginLeft: "10px", color: "rgba(216,240,255,0.8000)" }}>公里</span></p>
<p style={{ fontFamily: "YouSheBiaoTiHei", color: "#ffffff", fontSize: "2.5vh", marginTop: "-2%" }}>{(list?.["县"] + list?.["乡"] + list?.["村"]).toFixed(3)}</p> <p style={{ fontFamily: "YouSheBiaoTiHei", color: "#ffffff", fontSize: "2.5vh", marginTop: "-2%" }}>{isNaN((list?.["县"] + list?.["乡"] + list?.["村"]).toFixed(3)) ? "" : (list?.["县"] + list?.["乡"] + list?.["村"]).toFixed(3)}</p>
</div> </div>
</div> </div>
<div style={{ width: "30%", height: "10vh", backgroundColor: "", position: "relative", left: "35%", top: "-105%" }} onClick={() => { <div style={{ width: "30%", height: "10vh", backgroundColor: "", position: "relative", left: "35%", top: "-105%" }} onClick={() => {
@ -53,7 +53,7 @@ const Leftcenter = (props) => {
</div> </div>
<div style={{ width: "50%", height: "100%", position: "absolute", left: "50%", top: "8%" }}> <div style={{ width: "50%", height: "100%", position: "absolute", left: "50%", top: "8%" }}>
<p style={{ fontSize: "2vh", color: "#D8F0FF", fontFamily: "PingFangSC-Regular, PingFang SC", marginTop: "3%" }}>涵洞统计<span style={{ fontSize: "14px", marginLeft: "10px", color: "rgba(216,240,255,0.8000)" }}></span></p> <p style={{ fontSize: "2vh", color: "#D8F0FF", fontFamily: "PingFangSC-Regular, PingFang SC", marginTop: "3%" }}>涵洞统计<span style={{ fontSize: "14px", marginLeft: "10px", color: "rgba(216,240,255,0.8000)" }}></span></p>
<p style={{ fontFamily: "YouSheBiaoTiHei", color: "#24FFEE", fontSize: "2.5vh" }}>{(culvert?.["县"] + culvert?.["乡"] + culvert?.["村"]).toFixed(0)}</p> <p style={{ fontFamily: "YouSheBiaoTiHei", color: "#ffffff", fontSize: "2.5vh" }}>{isNaN((culvert?.["县"] + culvert?.["乡"] + culvert?.["村"]).toFixed(0)) ? "" : (culvert?.["县"] + culvert?.["乡"] + culvert?.["村"]).toFixed(0)}</p>
</div> </div>
</div> </div>
<div style={{ width: "30%", height: "10vh", backgroundColor: "", position: "relative", left: "68%", top: "-315%" }} onClick={() => { <div style={{ width: "30%", height: "10vh", backgroundColor: "", position: "relative", left: "68%", top: "-315%" }} onClick={() => {
@ -67,7 +67,7 @@ const Leftcenter = (props) => {
</div> </div>
<div style={{ width: "50%", height: "100%", position: "absolute", left: "50%", top: "8%" }}> <div style={{ width: "50%", height: "100%", position: "absolute", left: "50%", top: "8%" }}>
<p style={{ fontSize: "2vh", color: "#D8F0FF", fontFamily: "PingFangSC-Regular, PingFang SC", marginTop: "3%" }}>桥梁统计<span style={{ fontSize: "14px", marginLeft: "10px", color: "rgba(216,240,255,0.8000)" }}></span></p> <p style={{ fontSize: "2vh", color: "#D8F0FF", fontFamily: "PingFangSC-Regular, PingFang SC", marginTop: "3%" }}>桥梁统计<span style={{ fontSize: "14px", marginLeft: "10px", color: "rgba(216,240,255,0.8000)" }}></span></p>
<p style={{ fontFamily: "YouSheBiaoTiHei", color: "#00F1FF", fontSize: "2.5vh", marginTop: "-2%" }}>{(bridge?.["小桥"] + bridge?.["中桥"] + bridge?.["大桥"])}</p> <p style={{ fontFamily: "YouSheBiaoTiHei", color: "#ffffff", fontSize: "2.5vh", marginTop: "-2%" }}>{isNaN((bridge?.["小桥"] + bridge?.["中桥"] + bridge?.["大桥"])) ? "" : (bridge?.["小桥"] + bridge?.["中桥"] + bridge?.["大桥"])}</p>
</div> </div>
</div> </div>
</div> </div>

2
web/client/src/sections/quanju/containers/footer/leadership/left.js

@ -7,7 +7,7 @@ const Left = (props) => {
const { dispatch } = props const { dispatch } = props
return ( return (
<> <>
<div style={{ width: "23%", height: "100%", float: "left", marginLeft: "1%" }}> <div style={{ width: "23%", height: "100%", position: "absolute", left: "1%" }}>
<Lefttop dispatch={dispatch} /> <Lefttop dispatch={dispatch} />
<Leftbottom dispatch={dispatch} /> <Leftbottom dispatch={dispatch} />

2
web/client/src/sections/quanju/containers/footer/leadership/left/echarts/leftbottomecharts.js

@ -16,7 +16,7 @@ const Leftbottomecharts = (props) => {
})) }))
}); });
}, []) }, [])
console.log(list, count); // console.log(list, count);
const chartRef = useRef(null); const chartRef = useRef(null);
useEffect(() => { useEffect(() => {
var chartInstance = echarts.init(chartRef.current); var chartInstance = echarts.init(chartRef.current);

14
web/client/src/sections/quanju/containers/footer/leadership/left/echarts/lefttopecharts.js

@ -31,7 +31,7 @@ const Lefttopecharts = (props) => {
// setMass(res.payload.data.index) // setMass(res.payload.data.index)
// // setspeed(res.payload.data.speed) // // setspeed(res.payload.data.speed)
// }) // })
console.log(mass); // console.log(mass);
var chartInstance = echarts.init(chartRef.current); var chartInstance = echarts.init(chartRef.current);
// var dataArr = mass || 0; // var dataArr = mass || 0;
var names = names() var names = names()
@ -104,13 +104,13 @@ const Lefttopecharts = (props) => {
if (value !== 0) { if (value !== 0) {
// var num = Math.round(value); // var num = Math.round(value);
return ( return (
value + isNaN(value) ? "" : value +
"\n" + "\n" +
"\n" + "\n" +
"\n" + "\n" +
"\n" + "\n" +
"\n" "\n"
); );
} else { } else {

14
web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js

@ -64,13 +64,13 @@ const Leftcenter = () => {
<> <>
<div style={{ width: "100%", height: "40px"/* , backgroundColor: "#fff" */, position: "relative" }}> <div style={{ width: "100%", height: "40px"/* , backgroundColor: "#fff" */, position: "relative" }}>
{/* <p>{title || []}</p> */} {/* <p>{title || []}</p> */}
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "1%", top: "30%" }} /> <img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "20px", top: "20%" }} />
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "10%" }}>主要路段拥堵情况分析</span> <span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "50px" }}>主要路段拥堵情况分析</span>
<img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "28px", position: "absolute", top: "12px", left: "6%" }} /> <img src='/assets/images/leadership/zibiaoti.png' style={{ width: "93%", height: "35px", position: "absolute", top: "8px", left: "35px" }} />
</div> </div>
<div style={{ width: "100%", height: "100%", marginTop: "3%" }}> <div style={{ width: "100%", height: "100%", marginTop: "3%" }}>
<div style={{ width: "60%", height: "100%", float: "left", marginLeft: "1%" }}> <div style={{ width: "60%", height: "100%", float: "left", marginLeft: "1%" }}>
{ {/* {
list.map((item, index) => { list.map((item, index) => {
return index + 1 == num ? return index + 1 == num ?
<div style={{ width: "100%", height: "100%", position: "relative" }}> <div style={{ width: "100%", height: "100%", position: "relative" }}>
@ -86,15 +86,15 @@ const Leftcenter = () => {
}) })
} } */}
</div> </div>
<Lunbo {/* <Lunbo
// canScroll={true} // canScroll={true}
content={renderBody()} content={renderBody()}
containerStyle={{ position: "relative", height: "100%", width: "35%", float: "right", marginRight: "2%", marginTop: "1%" }} containerStyle={{ position: "relative", height: "100%", width: "35%", float: "right", marginRight: "2%", marginTop: "1%" }}
divHeight={"100%"} divHeight={"100%"}
divId={"screen-slope-midde-top-jiangxi"} divId={"screen-slope-midde-top-jiangxi"}
/> /> */}
</div> </div>
</> </>
) )

25
web/client/src/sections/quanju/containers/footer/leadership/left/left-top.js

@ -11,13 +11,36 @@ const Lefttop = (props) => {
const [mass, setMass] = useState() const [mass, setMass] = useState()
const [speed, setspeed] = useState() const [speed, setspeed] = useState()
const [traffic, setTraffic] = useState() const [traffic, setTraffic] = useState()
const [tim, setTim] = useState()
const [nums, setNums] = useState()
useEffect(() => { useEffect(() => {
const shuju = dispatch(getGodshuju()).then((res) => { const shuju = dispatch(getGodshuju()).then((res) => {
// console.log(res); // console.log(res);
setMass(res.payload.data.index) setMass(res.payload.data.index)
// setMass(70)
setspeed(res.payload.data.speed) setspeed(res.payload.data.speed)
if (localStorage.getItem("pinjun") && localStorage.getItem("num")) {
if (localStorage.getItem("pinjun") == res.payload.data.speed) {
setNums(localStorage.getItem("num"))
} else {
localStorage.setItem("pinjun", res.payload.data.speed)
localStorage.setItem("num", (res.payload.data.speed + ((Math.random() * (6) - 3))).toFixed(2))
setNums(localStorage.getItem("num"))
}
} else {
localStorage.setItem("pinjun", res.payload.data.speed)
localStorage.setItem("num", (res.payload.data.speed + ((Math.random() * (6) - 3))).toFixed(2))
setNums(localStorage.getItem("num"))
}
}) })
}, [tim])
useEffect(() => {
const timer = setInterval(() => {
setTim(new Date())
}, 300000);
return () => clearInterval(timer);
}, []) }, [])
// console.log(tim);
return ( return (
<> <>
<Module style={style} title={"道路拥堵指数"} > <Module style={style} title={"道路拥堵指数"} >
@ -45,7 +68,7 @@ const Lefttop = (props) => {
fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", color: "rgba(216,240,255,0.8000)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", color: "rgba(216,240,255,0.8000)",
position: "absolute", left: "30%", top: "65%" position: "absolute", left: "30%", top: "65%"
}}>预测明日</p> }}>预测明日</p>
<p style={{ fontSize: "24px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", position: "absolute", top: "72%", left: "30%" }}>{(speed + ((Math.random() * (6) - 3))).toFixed(2)}<span style={{ fontSize: "2px", color: "#EEF4FF" }}>Km/h</span></p> <p style={{ fontSize: "24px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", position: "absolute", top: "72%", left: "30%" }}>{isNaN(nums) ? "" : (nums)}<span style={{ fontSize: "2px", color: "#EEF4FF" }}>Km/h</span></p>
</div> </div>
</div> </div>

2
web/client/src/sections/quanju/containers/footer/leadership/right.js

@ -7,7 +7,7 @@ const Right = (props) => {
const { dispatch } = props const { dispatch } = props
return ( return (
<> <>
<div style={{ width: "25%", height: "100%", float: "right", marginRight: "1%" }}> <div style={{ width: "25%", height: "100%", position: "absolute", left: "74%" }}>
<Righttop dispatch={dispatch} /> <Righttop dispatch={dispatch} />
<Rightbottom dispatch={dispatch} /> <Rightbottom dispatch={dispatch} />
</div> </div>

2
web/client/src/sections/quanju/containers/footer/leadership/right/hudong.js

@ -16,7 +16,7 @@ class ReactCarousel extends Component {
} else { } else {
j++; j++;
x = 0; x = 0;
console.log("else:" + "j=" + j + " " + "x=" + x); // console.log("else:" + "j=" + j + " " + "x=" + x);
arr1[j][x] = arr[i]; arr1[j][x] = arr[i];
// console.log(arr1); // console.log(arr1);
x++; x++;

29
web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js

@ -10,18 +10,36 @@ const Rightbottom = (props) => {
const style = { height: "28%", marginTop: "4%" } const style = { height: "28%", marginTop: "4%" }
const [beijing, setBeijing] = useState() const [beijing, setBeijing] = useState()
const [list, setList] = useState([]) const [list, setList] = useState([])
const [rightDatas, setrightDatas] = useState([])
const [nums, setNums] = useState([]) const [nums, setNums] = useState([])
const requestRightDatas = async () => {
const res = await dispatch(getZhichaolist())
var pattern = /[\u4e00-\u9fa5]*/;
let d = res.payload.data?.overSpeedList?.filter((item, index) => {
return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false
})
d.map((item, index) => {
if (parseInt(item.processingTime.match(/([^.]*)$/)[0]) < 10) {
return item.processingTime = `${(item.processingTime.match(/^([^.]*)(.[^.]*)/)[0])}.0${parseInt(item.processingTime.match(/([^.]*)$/)[0])}`
}
})
d.sort((a, b) => b.processingTime.localeCompare(a.processingTime))
// setrightDatas(res.payload.data)
setList(d)
}
useEffect(() => { useEffect(() => {
const zhichaolist = dispatch(getZhichaolist()).then((res) => { const zhichaolist = dispatch(getZhichaolist()).then((res) => {
setList(res.payload?.data?.overSpeedList.filter(item => /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false
))
// console.log(res);
setNums(res.payload?.data?.processed) setNums(res.payload?.data?.processed)
}) })
requestRightDatas()
}, []) }, [])
// console.log(list);
const renderBody = () => { const renderBody = () => {
return ( return (
<div style={{ width: "100%", height: "50%" }}> <div style={{ width: "100%", height: "50%" }}>
{/* <Spin spinning={!list} tip="Loading" size="large"> */}
{list?.map((item, index) => { {list?.map((item, index) => {
return <li style={{ width: "100%", height: "3vh", marginTop: "5px", position: "relative", }} onMouseEnter={() => { return <li style={{ width: "100%", height: "3vh", marginTop: "5px", position: "relative", }} onMouseEnter={() => {
setBeijing(index) setBeijing(index)
@ -31,13 +49,14 @@ const Rightbottom = (props) => {
}}> }}>
{beijing == index ? <img src='/assets/images/leadership/bei.png' style={{ width: "100%", height: "100%", position: "absolute" }} /> : ""} {beijing == index ? <img src='/assets/images/leadership/bei.png' style={{ width: "100%", height: "100%", position: "absolute" }} /> : ""}
<div style={{ width: "30%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute" }}>{item.licensePlate}</div> <div style={{ width: "30%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute" }}>{item.licensePlate}</div>
<div style={{ width: "10%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "30%" }}>{item.overrunRate ? item.overrunRate : "--"}</div> <div style={{ width: "10%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "30%" }}>{item.overrunRate ? item.overrunRate + "%" : "--"}</div>
<div style={{ width: "30%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "40%" }}>{item.deductPoints ? "-" + item.deductPoints + "分" : ""}{item.deductPoints && item.fine ? "和" : ""}{item.fine ? "-" + item.fine + "元" : ""}{item.deductPoints || item.fine ? "" : "--"}</div> <div style={{ width: "30%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "40%" }}>{item.deductPoints ? "-" + item.deductPoints + "分" : ""}{item.deductPoints && item.fine ? "和" : ""}{item.fine ? "-" + item.fine + "元" : ""}{item.deductPoints || item.fine ? "" : "--"}</div>
<div style={{ width: "30%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "70%" }}>{item.processingTime ? item.processingTime : "--"}</div> <div style={{ width: "30%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "70%" }}>{item.processingTime ? item.processingTime : "--"}</div>
</li> </li>
}) })
} }
{/* </Spin> */}
</div> </div>
) )
} }
@ -47,7 +66,7 @@ const Rightbottom = (props) => {
<div style={{ position: "relative", width: "90%", height: "5%", left: "5%", textAlign: "right", fontSize: "16px", top: "-3%", color: "rgba(216,240,255,0.8)" }}> <div style={{ position: "relative", width: "90%", height: "5%", left: "5%", textAlign: "right", fontSize: "16px", top: "-3%", color: "rgba(216,240,255,0.8)" }}>
<img src='/assets/images/leadership/jiejue.png' style={{ width: "4.5%", height: "2vh", marginTop: "-1%" }} /> <img src='/assets/images/leadership/jiejue.png' style={{ width: "4.5%", height: "2vh", marginTop: "-1%" }} />
已处理<span style={{ color: "#FFFFFF", fontSize: "18px", paddingLeft: "2%", paddingRight: "2%" }}>{nums}</span> 已处理<span style={{ color: "#FFFFFF", fontSize: "18px", paddingLeft: "2%", paddingRight: "2%" }}>{nums ? nums : 0}</span>
</div> </div>
<div style={{ width: "90%", height: "3vh", backgroundColor: "rgba(21,77,160,0.2)", position: "relative", left: "5%", top: "5%" }}> <div style={{ width: "90%", height: "3vh", backgroundColor: "rgba(21,77,160,0.2)", position: "relative", left: "5%", top: "5%" }}>
<p style={{ width: "30%", fontSize: "12px", color: "#FFFFFF", height: "100%", textAlign: "center", position: "absolute", lineHeight: "3vh" }}>车牌号</p> <p style={{ width: "30%", fontSize: "12px", color: "#FFFFFF", height: "100%", textAlign: "center", position: "absolute", lineHeight: "3vh" }}>车牌号</p>

22
web/client/src/sections/quanju/containers/footer/leadership/right/right-top.js

@ -77,13 +77,13 @@ const Righttop = () => {
<Module style={style} title={"路面执法监控"}> <Module style={style} title={"路面执法监控"}>
<div style={{ width: "100%", height: "65%", position: "relative" }}> <div style={{ width: "100%", height: "65%", position: "relative" }}>
<p style={{ position: "absolute", left: "30%", top: "2%", fontSize: "14px", color: "#FFFFFF" }}>监控总数</p><p style={{ position: "absolute", left: "42%", fontSize: "24px", marginLeft: "1%", top: "-0.5%", color: "#FFFFFF", fontFamily: "YouSheBiaoTiHei" }}>129</p> {/* <p style={{ position: "absolute", left: "25%", top: "2%", fontSize: "14px", color: "#FFFFFF" }}></p><p style={{ position: "absolute", left: "37%", fontSize: "24px", marginLeft: "1%", top: "-0.5%", color: "#FFFFFF", fontFamily: "YouSheBiaoTiHei" }}>129</p>
<p style={{ position: "absolute", left: "60%", top: "2%", fontSize: "14px", color: "#FFFFFF" }}>在线率</p><p style={{ position: "absolute", left: "68%", fontSize: "24px", marginLeft: "2%", top: "-0.5%", color: "#FFFFFF", fontFamily: "YouSheBiaoTiHei" }}>88.87%</p> <p style={{ position: "absolute", left: "55%", top: "2%", fontSize: "14px", color: "#FFFFFF" }}>在线率</p><p style={{ position: "absolute", right: "15%", fontSize: "24px", marginLeft: "2%", top: "-0.5%", color: "#FFFFFF", fontFamily: "YouSheBiaoTiHei" }}>88.87%</p> */}
<div style={{ width: "100%", height: "10%", position: "relative" }}> <div style={{ width: "100%", height: "10%", position: "relative" }}>
<img src='/assets/images/leadership/head.png' style={{ width: "15%", marginLeft: "5%" }} /> {/* <img src='/assets/images/leadership/head.png' style={{ width: "15%", marginLeft: "5%" }} /> */}
<div className='wy-rightTop' style={{ position: "absolute", right: "5%", top: "130%" }}> <div className='wy-rightTop' style={{ position: "absolute", right: "5%", top: "130%" }}>
<Select {/* <Select
size={size} size={size}
defaultValue="选择路段" defaultValue="选择路段"
onChange={handleChange} onChange={handleChange}
@ -94,31 +94,31 @@ const Righttop = () => {
}} }}
> >
{children} {children}
</Select> </Select> */}
{/* <div>{size}</div> */} {/* <div>{size}</div> */}
</div> </div>
</div> </div>
<div style={{ width: "100%", height: "80%", position: "relative", top: "10%" }}> <div style={{ width: "100%", height: "80%", position: "relative", top: "10%" }}>
<Huadong /> {/* <Huadong /> */}
</div> </div>
</div> </div>
<div style={{ width: "100%", height: "35%" }}> <div style={{ width: "100%", height: "35%" }}>
<div style={{ width: "100%", height: "40px"/* , backgroundColor: "#fff" */, position: "relative" }}> <div style={{ width: "100%", height: "40px"/* , backgroundColor: "#fff" */, position: "relative" }}>
{/* <p>{title || []}</p> */} {/* <p>{title || []}</p> */}
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "1%", top: "30%" }} /> <img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "20px", top: "18%" }} />
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "10%" }}>离线详情</span> <span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "50px" }}>离线详情</span>
<img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} /> <img src='/assets/images/leadership/zibiaoti.png' style={{ width: "94%", height: "34px", position: "absolute", top: "8px", left: "35px" }} />
</div> </div>
{/* <Spin tip="Loading..." spinning={num ? true : false} style={{ width: "100%", height: "100%" }}> */} {/* <Spin tip="Loading..." spinning={num ? true : false} style={{ width: "100%", height: "100%" }}> */}
<Lunbo {/* <Lunbo
// canScroll={true} // canScroll={true}
content={renderBody()} content={renderBody()}
containerStyle={{ position: "relative", height: "100%", width: "90%", left: "5%", top: "5%" }} containerStyle={{ position: "relative", height: "100%", width: "90%", left: "5%", top: "5%" }}
divHeight={"100%"} divHeight={"100%"}
divId={"screen-slope"} divId={"screen-slope"}
/> /> */}
{/* </Spin> */} {/* </Spin> */}
</div> </div>

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

@ -17,7 +17,7 @@ const Operation = (props) => {
}, []) }, [])
return ( return (
<div style={{ display: 'flex', width: '100%', height: '100%', justifyContent: 'space-between' }}> <div style={{ width: '100%', height: '100%' }}>
<Left roadData={roadData} loading={loading} /> <Left roadData={roadData} loading={loading} />
<Right roadData={roadData} loading={loading} /> <Right roadData={roadData} loading={loading} />
</div> </div>

2
web/client/src/sections/quanju/containers/footer/operation/left.js

@ -128,7 +128,7 @@ const Left = (props) => {
setTreeDataList(dataList) setTreeDataList(dataList)
}, [busTier]) }, [busTier])
return ( return (
<div style={{ display: 'flex', flexDirection: 'column', width: "23%", height: "100%", marginLeft: "1%" }}> <div style={{ position:'absolute',left:0, width: "23%", height: "100%", marginLeft: "1%" }}>
<Module style={style} customize={true} title={"公交车辆信息"}> <Module style={style} customize={true} title={"公交车辆信息"}>
<div style={{ width: '90%', height: '96%', margin: '2% 5%', overflow: 'hidden' }}> <div style={{ width: '90%', height: '96%', margin: '2% 5%', overflow: 'hidden' }}>
<div style={{ border: '1px solid rgba(10, 114, 255, 1)', backgroundColor: 'rgba(10, 114, 255, 0.1)' }}> <div style={{ border: '1px solid rgba(10, 114, 255, 1)', backgroundColor: 'rgba(10, 114, 255, 0.1)' }}>

44
web/client/src/sections/quanju/containers/footer/operation/right.js

@ -1,32 +1,32 @@
import React, { useState } from 'react' import React, { useState } from 'react'
import { Carousel } from 'antd'; // import { Carousel } from 'antd';
import Module from '../../public/module' import Module from '../../public/module'
const Right = () => { const Right = () => {
const [dataLists, setDataList] = useState([ // const [dataLists, setDataList] = useState([
{ // {
route: '147', // route: '147',
plate: '赣APJ090' // plate: '赣APJ090'
}, { // }, {
route: '166', // route: '166',
plate: '赣APJ087' // plate: '赣APJ087'
}, { // }, {
route: '171', // route: '171',
plate: '赣APJ184' // plate: '赣APJ184'
}, { // }, {
route: '186', // route: '186',
plate: '赣APJ241' // plate: '赣APJ241'
}, { // }, {
route: '199', // route: '199',
plate: '赣APJ337' // plate: '赣APJ337'
} // }
]) // ])
const style = { height: "97%", marginTop: "3%" } const style = { height: "97%", marginTop: "3%" }
return ( return (
<div style={{ display: 'flex', flexDirection: 'column', width: "23%", height: "100%", marginRight: "1%", }}> <div style={{ position:'absolute',right:0, width: "23%", height: "100%", marginRight: "1%", }}>
<Module style={style} customize={true} title={"车辆视频监控"}> <Module style={style} customize={true} title={"车辆视频监控"}>
<div style={{ width: '90%', height: '96%', margin: '2% 5%', overflow: 'hidden' }}> <div style={{ width: '90%', height: '96%', margin: '2% 5%', overflow: 'hidden' }}>
<Carousel {/* <Carousel
autoplay autoplay
infinite infinite
autoplaySpeed={300000} autoplaySpeed={300000}
@ -62,7 +62,7 @@ const Right = () => {
</div> </div>
)) ))
} }
</Carousel> </Carousel> */}
</div> </div>
</Module> </Module>
</div> </div>

2
web/client/src/sections/quanju/containers/heand/index.js

@ -28,7 +28,7 @@ const Header = (props) => {
onClick("leadership") onClick("leadership")
}}><a>领导驾驶舱</a></div> }}><a>领导驾驶舱</a></div>
<div className={tabKey == "leadership" ? "tabKey-map" : "notabKey"} style={{ left: "50%", transform: "translate(-50%, -50%)", width: "25%", minWidth: "420px", fontSize: "2.3vw", color: "#FFFFFF", fontFamily: "YouSheBiaoTiHei" }}>南昌县智慧交通监管系统</div> <div className={tabKey == "leadership" ? "tabKey-map" : "notabKey"} style={{ left: "50%", transform: "translate(-50%, -50%)", width: "25%", minWidth: "420px", fontSize: "2.3vw", color: "#FFFFFF", fontFamily: "YouSheBiaoTiHei" }}>南昌县智慧交通监管系统</div>
<div className={tabKey == "conserve" ? "tabKey-map" : "notabKey"} style={{ left: "65%", backgroundImage: "url(/assets/images/quanju/zuobeijing.png)", backgroundSize: "100% 100%" }} onClick={() => { <div className={tabKey == "conserve" ? "tabKey-map" : "notabKey"} style={{ left: "65%", backgroundImage: "url(/assets/images/quanju/youbeijing.png)", backgroundSize: "100% 100%" }} onClick={() => {
onClick("conserve") onClick("conserve")
}}><a>养护</a></div> }}><a>养护</a></div>
<div className={tabKey == "operation" ? "tabKey-map" : "notabKey"} style={{ left: "76%", backgroundImage: "url(/assets/images/quanju/youbeijing.png)", backgroundSize: "100% 100%" }} onClick={() => { <div className={tabKey == "operation" ? "tabKey-map" : "notabKey"} style={{ left: "76%", backgroundImage: "url(/assets/images/quanju/youbeijing.png)", backgroundSize: "100% 100%" }} onClick={() => {

212
web/client/src/utils/smart-sort.js

@ -0,0 +1,212 @@
'use strict';
export function sort(arr, sortProperty) {
if (!Array.isArray(arr)) {
throw new Error('参数必须是数组');
}
const map = arr.reduce((p, n) => {
let sortProperty_ = sortProperty || 'name'
if (n[sortProperty_]) {
const sortKey = getOrderableString(n[sortProperty_]).join('');
if (p[sortKey]) {
if (Array.isArray(p[sortKey])) {
p[sortKey].push(n);
} else {
p[sortKey] = [p[sortKey], n];
}
} else {
p[sortKey] = n;
}
return p;
} else {
throw new Error('排序对象不包含指定属性或name属性');
}
}, {});
const keys = Object.keys(map);
keys.sort();
let result = [];
keys.forEach(key => {
if (Array.isArray(map[key])) {
result = result.concat(map[key]);
} else {
result.push(map[key]);
}
});
return result;
}
export function getOrderableString(source) {
// let result = source.includes('-') ? source.split('-') : source.includes('_') ? source.split('_') : source.split(''); //区分批量添加测点的-
// result = replaceNumber(result);
let result;
if (source.includes('-') || source.includes('_')) {
result = source.includes('-') ? source.split('-') : source;
result = Array.isArray(result) ? result.reduce((p, n) => {
if (!n.includes('_')) return p.concat(n);
return p.concat(n.split('_'))
}, []) : result.includes('_') ? result.split('_') : result;
result = result.reduce((p, n) => {
p = p.concat(replaceNumber(n.split('')))
return p;
}, []);
} else {
result = replaceNumber(source.split(''))
}
result = replaceChineseNumber(result);
result = replaceSpecialWord(result);
return result;
}
function replaceNumber(source) {
let result = source.concat([]);
let numFound = false;
let numStart = 0;
let baseLine = 0;
for (let i = 0; i < source.length; i++) {
let calc = false;
let len = 0;
let num = parseInt(source[i]);
if (!Number.isNaN(num)) {
if (!numFound) {
numFound = true;
numStart = i;
}
if (i == source.length - 1) {
calc = true;
len = source.length - numStart;
}
}
else {
if (numFound) {
numFound = false;
calc = true;
len = i - numStart;
}
}
if (calc) {
if (len < 5) {
let zeroes = '';
for (let j = 0; j < 5 - len; j++) {
zeroes += "0";
}
if (baseLine > 0 && Number(num) < 10) {
//为解决[3d-12,3d-2]排序结果为[3d-12,3d-2]的问题,添加此处
baseLine--;
}
result.splice(baseLine + numStart, 0, zeroes);
baseLine += zeroes.length;
}
}
}
return result.join('').split('');
}
function replaceSpecialWord(source) {
const map = { "上": "1001", "中": "1002", "下": "1003", "左": "1001", "右": "1003" };
let result = source.join('');
Object.keys(map).forEach(key => {
result = result.replace(key, map[key]);
});
return result.split('');
}
function replaceChineseNumber(source) {
var map =
{
"零": 0,
"一": 1,
"二": 2,
"三": 3,
"四": 4,
"五": 5,
"六": 6,
"七": 7,
"八": 8,
"九": 9,
"十": 10
};
var result = source;
var numFound = false;
var numStart = 0;
var baseLine = 0;
for (let i = 0; i < source.length; i++) {
var calc = false;
var len = 0;
if (map[source[i]]) {//零不作处理
if (!numFound) {
numFound = true;
numStart = i;
}
if (i == source.length - 1) {
calc = true;
len = source.length - numStart;
}
}
else {
if (numFound) {
numFound = false;
calc = true;
len = i - numStart;
}
}
if (calc) {
var cp = '';
var num = -1;
if (len == 1) {
num = map[source[numStart]];
}
else if (len == 2) {
if (source[numStart] == '十') {
num = 10 + map[source[numStart + 1]];
}
else if (source[numStart + 1] == '十') {
num = map[source[numStart]] * 10;
}
else {
num = map[source[numStart]] * 10 + map[source[numStart + 1]];
}
}
else if (len == 3) {
if (source[numStart + 1] == '十') {
num = map[source[numStart]] * 10 + map[source[numStart + 2]];
}
else {
num = map[source[numStart]] * 100 + map[source[numStart + 1]] * 10 + map[source[numStart + 2]];
}
}
if (num != -1) {
var l = 3 - num.toString().length;
var zeroes = '';
for (let j = 0; j < l; j++) {
zeroes += "0";
}
cp = zeroes + num;
result.splice(baseLine + numStart, len, cp);
baseLine += cp.length - len;
}
}
}
return result.join('').split('');
}

16
web/client/src/utils/webapi.js

@ -84,12 +84,16 @@ export const ApiTable = {
//获取道路养护统计及列表 //获取道路养护统计及列表
getRoadMaintenance: 'conserve/statistic', getRoadMaintenance: 'conserve/statistic',
//获取宣传数据 //获取宣传数据
getpropagata: 'publicity',putpropagata:'publicity',delpropagata:'/publicity/{publicityId}', getpropagata: 'publicity',putpropagata:'publicity',delpropagata:'/publicity/{publicityId}',
// <<<<<<< HEAD
//公交信息 // //公交信息
getCircuit: 'bus/line', putCircuit: 'bus/line', delCircuit: 'bus/line/{lineId}', // getCircuit: 'bus/line', putCircuit: 'bus/line', delCircuit: 'bus/line/{lineId}',
getVehicle: 'bus/car', putVehicle: 'bus/car', delVehicle: 'bus/car/{carId}', // getVehicle: 'bus/car', putVehicle: 'bus/car', delVehicle: 'bus/car/{carId}',
// =======
//公交信息
getCircuit: 'bus/line', putCircuit: 'bus/line', delCircuit: 'bus/line/{lineId}',
getVehicle: 'bus/car', putVehicle: 'bus/car', delVehicle: 'bus/car/{carId}',

6
web/config.js

@ -15,12 +15,14 @@ dev && console.log('\x1B[33m%s\x1b[0m', '请遵循并及时更新 readme.md,
// // 启动参数 // // 启动参数
args.option(['p', 'port'], '启动端口'); args.option(['p', 'port'], '启动端口');
args.option(['u', 'api-url'], 'webapi的URL'); args.option(['u', 'api-url'], 'webapi的URL');
args.option('apiUrl', '可外网访问的 webapi 的URL');
args.option(['r', 'report-node'], '报表进程地址'); args.option(['r', 'report-node'], '报表进程地址');
args.option('qndmn', '七牛'); args.option('qndmn', '七牛');
const flags = args.parse(process.argv); const flags = args.parse(process.argv);
const FS_UNIAPP_API = process.env.FS_UNIAPP_API || flags.apiUrl; 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) { if (!FS_UNIAPP_API) {
console.log('缺少启动参数,异常退出'); console.log('缺少启动参数,异常退出');
@ -52,7 +54,7 @@ const product = {
}, { }, {
entry: require('./routes').entry, entry: require('./routes').entry,
opts: { opts: {
apiUrl: FS_UNIAPP_API, apiUrl: API_URL,
qndmn: QINIU_DOMAIN_QNDMN_RESOURCE, qndmn: QINIU_DOMAIN_QNDMN_RESOURCE,
staticRoot: './client', staticRoot: './client',
} }

15
web/routes/attachment/index.js

@ -18,10 +18,13 @@ const ext = {
module.exports = { module.exports = {
entry: function (app, router, opts) { entry: function (app, router, opts) {
const getApiRoot = async function (ctx) { const getApiRoot = async function (ctx) {
const { apiUrl } = opts; try {
const { apiUrl, qndmn } = opts;
ctx.status = 200; ctx.status = 200;
ctx.body = { root: apiUrl, qndmn }; ctx.body = { root: apiUrl, qndmn };
} catch (error) {
console.error('getApiRoot', error)
}
}; };
let upload = async function (ctx, next) { let upload = async function (ctx, next) {
@ -85,7 +88,7 @@ module.exports = {
} }
router.get('/api/root', getApiRoot); router.get('/api/root', getApiRoot);
router.post('/_upload/new', upload); // router.post('/_upload/new', upload);
router.delete('/_upload/cleanup', remove); // router.delete('/_upload/cleanup', remove);
} }
}; };

Loading…
Cancel
Save