wangyue 2 years ago
parent
commit
0598075d8c
  1. 2
      api/.vscode/launch.json
  2. 4
      api/Dockerfile
  3. 104
      api/app/lib/controllers/data/index.js
  4. 11
      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. 15
      api/app/lib/controllers/overview/building.js
  8. 5
      api/app/lib/controllers/overview/management.js
  9. 3
      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. 136
      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. 6
      web/Dockerfile
  31. 3
      web/client/src/components/Upload/index.js
  32. 31
      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. 65
      web/client/src/sections/fillion/components/infor/videoUpload.js
  40. 35
      web/client/src/sections/fillion/components/inforTable.js
  41. 92
      web/client/src/sections/fillion/components/maintenanceTable.js
  42. 30
      web/client/src/sections/fillion/components/operationalTable.js
  43. 101
      web/client/src/sections/fillion/components/patrolTable.js
  44. 4
      web/client/src/sections/fillion/components/project/project.js
  45. 25
      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. 12
      web/client/src/sections/fillion/containers/maintenance.js
  50. 12
      web/client/src/sections/fillion/containers/patrol.js
  51. 12
      web/client/src/sections/fillion/containers/public.js
  52. 4
      web/client/src/sections/fillion/nav-item.js
  53. 4
      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. 129
      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. 2
      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. 2
      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. 4
      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. 6
      web/client/src/utils/webapi.js
  87. 6
      web/config.js
  88. 11
      web/routes/attachment/index.js

2
api/.vscode/launch.json

@ -13,7 +13,7 @@
"NODE_ENV": "development"
},
"args": [
"-p 4000",
"-p 14000",
"-f http://localhost:4000",
"-g postgres://postgres:123@10.8.30.32:5432/highways4good",
"--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
@ -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 npm cache clean -f
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

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

@ -81,16 +81,72 @@ async function dataExport (ctx) {
// },
// ]
<<<<<<< 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 fileName = `摄像头信息列表_${moment().format('YYYYMMDDHHmmss')}` + '.csv'
// const filePath = await simpleExcelDown({ data: exportData, header, fileName: fileName })
// const fileData = fs.readFileSync(filePath);
<<<<<<< HEAD
// ctx.status = 200;
// ctx.set('Content-Type', 'application/x-xls');
// ctx.set('Content-disposition', 'attachment; filename=' + encodeURI(fileName));
@ -102,6 +158,54 @@ async function dataExport (ctx) {
// message: typeof error == 'string' ? error : undefined
// }
}
=======
let findOption = {
where: {}
}
if (ids) {
findOption.where.id = { $in: ids.split(',') }
}
if (roadLevel) {
findOption.where.level = roadLevel
}
if (municipalType) {
findOption.where.type = municipalType
}
const exportData = await models[modalOption.tableName].findAll(findOption)
const tableAttributes = models[modalOption.tableName].tableAttributes
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 = `${modalOption.n}_${moment().format('YYYYMMDDHHmmss')}` + '.csv'
const filePath = await xlsxDownload.simpleExcelDown({ data: exportData, header, fileName: fileName, exp })
const fileData = fs.readFileSync(filePath);
ctx.status = 200;
ctx.set('Content-Type', 'application/x-xls');
ctx.set('Content-disposition', 'attachment; filename=' + encodeURI(fileName));
ctx.body = fileData;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
>>>>>>> d8f96cea72338cf7a61dea293bd6d0cd5da48bb0
}
async function godTrans(ctx) {

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

@ -34,6 +34,14 @@ async function overspeedGet (ctx) {
if (numberOfAxles) {
findOption.where.numberOfAxles = numberOfAxles
}
if (overrunRateUpper && overrunRateFloor) {
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
@ -44,6 +52,9 @@ async function overspeedGet (ctx) {
$gte: overrunRateFloor
}
}
}
if (testTime) {
findOption.where.testTime = {
$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
}
rslt.road = await models.FileRoad.findOne({
where: { rId: roadId }
})
rslt.type = await models.FileType.findOne({
where: { fId }
})
@ -179,6 +183,9 @@ async function getFileList(ctx, next) {
['id', 'DESC']
]
})
rslt.counter = await models.Files.count({
where: queryOptions
})

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

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

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

@ -191,6 +191,17 @@ async function roadState (ctx) {
} else {
roadState.townProject[townName] = 1
}
if (p.type == 'road' && p.done) {
if (roadState.townRoad[townName]) {
if (roadState.townRoad[townName].roadCount) {
roadState.townRoad[townName].roadCount += 1
} else {
roadState.townRoad[townName].roadCount = roadState.townRoad[townName].roadCode.size
roadState.townRoad[townName].roadCount += 1
}
}
}
}
}
@ -202,7 +213,11 @@ async function roadState (ctx) {
roadState.buildedRoad += roadCode.size
for (let t of Object.keys(roadState.townRoad)) {
if (roadState.townRoad[t].roadCount) {
} else {
roadState.townRoad[t].roadCount = roadState.townRoad[t].roadCode.size
}
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({
where: {
processingTime: { $ne: null }
$and: [
{ processingTime: { $ne: null } },
{ processingTime: { $ne: '' } }
]
}
})

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

@ -4,7 +4,7 @@ const { QueryTypes } = require('sequelize');
async function reportList (ctx) {
try {
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 = {
where: {
@ -14,6 +14,7 @@ async function reportList(ctx) {
model: models.User,
attributes: ['name']
}],
order: [['time', asc ? 'ASC': 'DESC']],
}
if (limit) {
findOption.limit = limit

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

@ -21,7 +21,7 @@ module.exports = dc => {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "上报类型 巡查:patrol / 养护:conserve",
comment: "上报类型",
primaryKey: false,
field: "report_type",
autoIncrement: false
@ -31,7 +31,7 @@ module.exports = dc => {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "工程类型 道路:road / 桥梁:birdge / 涵洞:culvert",
comment: "工程类型",
primaryKey: false,
field: "project_type",
autoIncrement: false
@ -41,7 +41,7 @@ module.exports = dc => {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
comment: '所属道路',
primaryKey: false,
field: "road",
autoIncrement: false
@ -51,7 +51,7 @@ module.exports = dc => {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
comment: '开始路段',
primaryKey: false,
field: "road_section_start",
autoIncrement: false
@ -61,7 +61,7 @@ module.exports = dc => {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
comment: '结束路段',
primaryKey: false,
field: "road_section_end",
autoIncrement: false
@ -71,7 +71,7 @@ module.exports = dc => {
type: DataTypes.DOUBLE,
allowNull: true,
defaultValue: null,
comment: null,
comment: '经度',
primaryKey: false,
field: "longitude",
autoIncrement: false
@ -81,7 +81,7 @@ module.exports = dc => {
type: DataTypes.DOUBLE,
allowNull: true,
defaultValue: null,
comment: null,
comment: '纬度',
primaryKey: false,
field: "latitude",
autoIncrement: false
@ -91,7 +91,7 @@ module.exports = dc => {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
comment: '具体内容',
primaryKey: false,
field: "content",
autoIncrement: false
@ -151,7 +151,7 @@ module.exports = dc => {
type: DataTypes.DATE,
allowNull: false,
defaultValue: null,
comment: null,
comment: '创建日期',
primaryKey: false,
field: "time",
autoIncrement: false
@ -161,7 +161,7 @@ module.exports = dc => {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
comment: '具体位置',
primaryKey: false,
field: "address",
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 LOCAL_SVR_ORIGIN = process.env.LOCAL_SVR_ORIGIN || flags.fileHost;
const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURC || flags.qndmn;
const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE || flags.qndmn;
const QINIU_BUCKET_RESOURCE = process.env.ANXINCLOUD_QINIU_BUCKET_RESOURCE || flags.qnbkt;
const QINIU_AK = process.env.ANXINCLOUD_QINIU_ACCESSKEY || flags.qnak;
const QINIU_SK = process.env.ANXINCLOUD_QINIU_SECRETKEY || flags.qnsk;
@ -52,7 +52,7 @@ const product = {
accessKey: QINIU_AK,
secretKey: QINIU_SK
},
maxSize: 104857600, // 100M
maxSize: 104857600 * 2, // 100M * 2
}
}, {
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.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.
<<<<<<< HEAD
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-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 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`)
makeDir(fileDirPath)
const file = new xlsx.File();
@ -57,6 +57,33 @@ async function simpleExcelDown ({ data = [], header = [], fileName = moment().fo
for (let h of header) {
const cell = row.addCell();
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
}
}

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
-- ----------------------------
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 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({
user: 'postgres',
host: '10.8.30.32',
database: 'highways4good',
password: '123',
user: 'highwayadmin',
host: '10.8.40.223',
database: 'highway4good',
password: 'highway123',
port: 5432,
})
// 7niu 验证
const accessKey = 'XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5'
const secretKey = 'yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa'
const bucket = 'dev-highways4good'
const accessKey = '5XrM4wEB9YU6RQwT64sPzzE6cYFKZgssdP5Kj3uu'
const secretKey = 'w6j2ixR_i-aelc6I7S3HotKIX-ukMzcKmDfH6-M5'
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',
'patrolView/index',
'changePassword/index',
'changePassword/success/index'
'changePassword/success/index',
'video/index',
]
}],
permission: {

21
weapp/src/config.js

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

136
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 InputPicker from '../components/inputPicker';
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 arrowIcon from '../../static/img/patrol/arrow-down.svg';
const { baseUrl, imgUrl } = environment;
const Index = () => {
const userInfo = Taro.getStorageSync('userInfo') || {};
const isSuperAdmin = userInfo && userInfo.username === 'SuperAdmin' ? true : false
@ -30,10 +34,21 @@ const Index = () => {
const [longitude, setLongitude] = 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 [sourceRoadStartSel, setSourceRoadStartSel] = useState([])
const [sourceRoadEndSel, setSourceRoadEndSel] = useState([])
const prjType = [
{ text: '道路', value: 'road' },
{ text: '桥梁', value: 'bridge' },
{ text: '涵洞', value: 'culvert' },
{ text: '其他', value: 'other' },
]
const prjTypeSelector = ['道路', '桥梁', '涵洞', '其他']
const [roadStartSel, setRoadStartSel] = useState([])
const [roadEndSel, setRoadEndSel] = useState([])
@ -60,17 +75,24 @@ const Index = () => {
Taro.hideLoading()
if (res.statusCode == 200 || res.statusCode == 204) {
const { data } = res
let showPrjType = ''
for (const item of prjType) {
if (item.value === data.projectType) {
showPrjType = item.text
break
}
}
setReportType(data.reportType)
setProjectType(data.projectType)
setProjectType(showPrjType || data.projectType)
setRoad(data.road)
setRoadSectionStart(data.roadSectionStart)
setRoadSectionEnd(data.roadSectionEnd)
setAddress(data.address)
setContent(data.content)
setScenePic(data.scenePic ? data.scenePic.map(item => ({ url: item })) : [])
setConserveBeforePic(data.conserveBeforePic ? data.conserveBeforePic.map(item => ({ url: item })) : [])
setConserveUnderwayPic(data.conserveUnderwayPic ? data.conserveUnderwayPic.map(item => ({ url: item })) : [])
setConserveAfterPic(data.conserveAfterPic ? data.conserveAfterPic.map(item => ({ url: item })) : [])
setScenePic(data.scenePic ? data.scenePic.map(item => ({ url: imgUrl + item })) : [])
setConserveBeforePic(data.conserveBeforePic ? data.conserveBeforePic.map(item => ({ url: imgUrl + item })) : [])
setConserveUnderwayPic(data.conserveUnderwayPic ? data.conserveUnderwayPic.map(item => ({ url: imgUrl + item })) : [])
setConserveAfterPic(data.conserveAfterPic ? data.conserveAfterPic.map(item => ({ url: imgUrl + item })) : [])
} else {
Taro.showToast({ title: res.data.message || '请求出错', icon: 'none' })
}
@ -118,6 +140,7 @@ const Index = () => {
})
}
}, [])
useEffect(() => {
setRoadStartSel(sourceRoadStartSel)
setRoadEndSel(sourceRoadEndSel)
@ -148,9 +171,15 @@ const Index = () => {
Taro.showToast({ title: '工程类型错误', icon: 'none' })
return
}
if (content.length > 50) {
Taro.showToast({ title: '内容字数不能超过50', icon: 'none' })
return
}
const reportProjectType = prjType[prjTypeSelector.indexOf(projectType)].value
let data = {
reportType,
projectType,
projectType: reportProjectType,
road,
roadSectionStart,
roadSectionEnd,
@ -160,11 +189,11 @@ const Index = () => {
latitude
}
if (reportType === 'patrol') {
data['scenePic'] = scenePic.length > 0 ? scenePic.map(item => item.url) : null
data['scenePic'] = sceneImg
} else {
data['conserveBeforePic'] = conserveBeforePic.length > 0 ? conserveBeforePic.map(item => item.url) : null
data['conserveUnderwayPic'] = conserveUnderwayPic.length > 0 ? conserveUnderwayPic.map(item => item.url) : null
data['conserveAfterPic'] = conserveAfterPic.length > 0 ? conserveAfterPic.map(item => item.url) : null
data['conserveBeforePic'] = conserveBeforeImg
data['conserveUnderwayPic'] = conserveUnderwayImg
data['conserveAfterPic'] = conserveAfterImg
}
Taro.showModal({
@ -256,24 +285,97 @@ const Index = () => {
setReportType(e.detail.value)
}
function handleImgChange(files, type) {
function handleImgChange(files, operationType, index, type) {
if (operationType === 'remove') {
setImg(false)
}
function setImg(isAdd, url) {
switch (type) {
case 'scenePic':
let nextImg = sceneImg
if (isAdd) {
nextImg.push(url)
} else {
nextImg.splice(index, 1)
}
setSceneImg(nextImg)
setScenePic(files)
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) {
Taro.previewImage({
urls: [file.url] // http
@ -381,7 +483,7 @@ const Index = () => {
<AtTextarea
title='巡查内容:'
placeholder={isView ? '' : '请输入巡查内容'}
placeholder={isView ? '' : '请输入具体内容'}
value={content}
onChange={(v, e) => handleInput(e, 'content')}
disabled={isView}
@ -403,7 +505,7 @@ const Index = () => {
count={3 - scenePic.length}
showAddBtn={scenePic.length >= 3 ? false : true}
files={scenePic}
onChange={files => handleImgChange(files, 'scenePic')}
onChange={(files, operationType, index) => handleImgChange(files, operationType, index, 'scenePic')}
onImageClick={handleImgClick}
/>
}
@ -426,7 +528,7 @@ const Index = () => {
count={3 - conserveBeforePic.length}
showAddBtn={conserveBeforePic.length >= 3 ? false : true}
files={conserveBeforePic}
onChange={files => handleImgChange(files, 'conserveBeforePic')}
onChange={(files, operationType, index) => handleImgChange(files, operationType, index, 'conserveBeforePic')}
onImageClick={handleImgClick}
/>
}
@ -446,7 +548,7 @@ const Index = () => {
count={3 - conserveUnderwayPic.length}
showAddBtn={conserveUnderwayPic.length >= 3 ? false : true}
files={conserveUnderwayPic}
onChange={files => handleImgChange(files, 'conserveUnderwayPic')}
onChange={(files, operationType, index) => handleImgChange(files, operationType, index, 'conserveUnderwayPic')}
onImageClick={handleImgClick}
/>
}
@ -467,7 +569,7 @@ const Index = () => {
count={3 - conserveAfterPic.length}
showAddBtn={conserveAfterPic.length >= 3 ? false : true}
files={conserveAfterPic}
onChange={files => handleImgChange(files, 'conserveAfterPic')}
onChange={(files, operationType, index) => handleImgChange(files, operationType, index, 'conserveAfterPic')}
onImageClick={handleImgClick}
/>
}

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

@ -84,6 +84,8 @@ function Index() {
})
useDidShow(() => {
setPage(0)
setNum(Math.random())
let refresh = Taro.getStorageSync('refresh'); //
if (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() {
Taro.navigateTo({
url: '/packages/video/index'
})
}
return (
@ -49,13 +51,13 @@ const Index = () => {
{isSuperAdmin ? '查看' : '填报'}
</View>
</View>
{
{/* {
isSuperAdmin &&
<View className='card video'>
<View className='title'> </View>
<View className='btn' onClick={toVideo}>查看</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 { getLogoutUrl } from '@/services/api';
import cfg from '../../config';
import { getState } from '../../store/globalState';
import './index.scss';
import headImg from '../../static/img/my/head.png';
import moreImg from '../../static/img/my/more.svg';
@ -39,8 +40,9 @@ const Index = ({ ...props }) => {
title: '提示',
content: '确定退出登录吗',
success: function (res) {
let token = getState('token') || Taro.getStorageSync('token')
if (res.confirm) {
logout(getLogoutUrl()).then(() => {
logout(getLogoutUrl(), { token }).then(() => {
Taro.reLaunch({
url: '/pages/auth/login/login'
});

5
weapp/src/services/api.js

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

6
web/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
@ -9,14 +9,14 @@ EXPOSE 8080
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 npm cache clean -f
RUN npm install --registry http://10.8.30.22:7000
RUN rm -rf package-lock.json
RUN npm install --registry http://10.8.30.22:7000
RUN npm run build
RUN rm -rf client/src
RUN rm -rf node_modules
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

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

@ -49,8 +49,7 @@ class Uploads extends Component {
componentDidMount() {
const { value } = this.props;
if (value) {
// this.setState(value);
this.setFileList(value)
this.setFileList(value);
}
}

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

@ -34,7 +34,17 @@ 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) {
return dispatch => basicAction({
type: 'get',
@ -282,15 +292,15 @@ export function delVehicle (query) {
});
}
export function putOperaTional (query) {
export function getPurchase(query) {
return dispatch => basicAction({
type: 'put',
type: 'get',
dispatch: dispatch,
data: query,
actionType: 'PUT_OPERA_TIONAL',
url: ApiTable.putOperaTional,
msg: { error: '获取车辆信息失败' },
// reducer: { name: 'reportstatistic' }
query: query,
actionType: 'GET_PURCHASE',
url: ApiTable.getPurchase,
msg: { error: '获取治超信息失败' },
});
}
export function putPurchase(query) {
@ -315,7 +325,6 @@ export function delPurchase (query) {
});
}
export function getPropagata(query) {
return dispatch => basicAction({
type: 'get',
@ -334,7 +343,7 @@ export function putAddPropagata (query) {
data: query,
actionType: 'PUT_PROPAGATA',
url: ApiTable.putpropagata,
msg: { error: '新增宣传视频信息失败' },
msg: { option: '新增宣传视频' },
// reducer: { name: 'reportstatistic' }
});
}
@ -345,7 +354,7 @@ export function putEditPropagata (query) {
data: query,
actionType: 'PUT_PROPAGATA',
url: ApiTable.putpropagata,
msg: { error: '编辑宣传视频信息失败' },
msg: { option: '编辑宣传视频' },
// reducer: { name: 'reportstatistic' }
});
}
@ -355,7 +364,7 @@ export function delPropagata (query) {
dispatch: dispatch,
actionType: 'DEL_PROPAGATA',
url: ApiTable.delpropagata.replace("{publicityId}", query?.publicityId),
msg: { error: '删除宣传视频信息失败' },
msg: { option: '删除宣传视频信息' },
// reducer: { name: 'reportstatistic' }
});
}

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

@ -48,7 +48,7 @@ const BrideTable = (props) => {
tab1: [
{
title: '桥梁代码',
dataIndex: 'placeName',
dataIndex: 'placeName1',
fixed: 'left',
width: 120,
options: 1,
@ -64,7 +64,7 @@ const BrideTable = (props) => {
},
{
title: '桥梁名称',
dataIndex: 'containers',
dataIndex: 'placeName',
fixed: 'left',
width: 120,
render: (dom, record) => {
@ -1501,7 +1501,7 @@ const BrideTable = (props) => {
dataIndex: 'creatTime',
valueType: 'dateTimeRange',
hideInSearch: true,
width: 120,
width: 160,
fixed: 'right',
render: (dom, record) => {
return <div><Button type="link"
@ -1534,13 +1534,13 @@ const BrideTable = (props) => {
>
新增
</Button>
<Button
{/* <Button
type="primary"
style={{ width: "100px", marginLeft: 20 }}
>
导入
</Button>
</Button> */}
</div>
@ -1685,7 +1685,7 @@ const BrideTable = (props) => {
dataIndex: 'creatTime',
valueType: 'dateTimeRange',
hideInSearch: true,
width: 120,
width: 160,
fixed: 'right',
render: (dom, record) => {
return <div><Button type="link"
@ -1717,13 +1717,13 @@ const BrideTable = (props) => {
>
新增
</Button>
<Button
{/* <Button
type="primary"
style={{ width: "100px", marginLeft: 20 }}
>
导入
</Button>
</Button> */}
</div>
@ -1815,7 +1815,7 @@ const BrideTable = (props) => {
} if (whichofits == 'gongcheng') {
const query = {
type: 'bridge',
// type:sitename
entryName:sitename
}
setRowSelected([]);
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',
valueType: 'dateTimeRange',
hideInSearch: true,
width: 120,
width: 160,
fixed: 'right',
render: (dom, record) => {
return <div><Button type="link"
@ -1559,10 +1559,10 @@ const openModal = (type, record) => {
rowKey='id'
onReset={(v) => {
const { id } = depMessage[0]
console.log(id)
setRegionId(id)
setPlaceType(-1)
setDay([moment('2022-03-01').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')])
// console.log(id)
// setRegionId(id)
// setPlaceType(-1)
// setDay([moment('2022-03-01').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')])
setSitename('')
}}
rowSelection={{

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

@ -80,15 +80,15 @@ const DetailList = (props) => {
dataIndex: 'road',
align: 'center',
render: (text, record) => {
return '';
return fileList?.road?.roadName;
}
}, {
title: '资料类型',
key: 'address',
dataIndex: 'address',
key: 'fileType',
dataIndex: 'fileType',
align: 'center',
render: (text, record) => {
return '';
return fileList?.type?.fileType;
}
},
{
@ -120,7 +120,7 @@ const DetailList = (props) => {
align: 'center'
}, {
title: '操作',
width: 200,
width: 160,
key: 'option',
valueType: 'option',
align: 'center',
@ -218,7 +218,7 @@ const RoadNameList = (props) => {
];
useEffect(() => {
if (roads && roads instanceof Array) {
if (roads && roads instanceof Array && roads.length) {
setSelectRoad(roads[0].rId)
onChange(roads[0]);
}
@ -281,7 +281,11 @@ const RoadNameList = (props) => {
return {
onClick: () => {
if (record) {
setSelectRoad(record.rId);
let id = record.rId
if(selectRoad == record.rId){
id = null
}
setSelectRoad(id);
onChange(record);
}
},
@ -413,7 +417,7 @@ const FileTable = (props) => {
}}
>
<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>
<Card style={{ flex: 1 }}>
<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 [mapComplete, setMapComplete] = useState(false);
const [mapObj, setMapObj] = useState();
const [dateRange, setDateRange] = useState();
const [dateRange, setDateRange] = useState([moment().add(-6, 'day'),
moment()]);
let markers = [];
let PATH = [];
useEffect(() => {
if (AMap) loadMap();
return () => {
@ -147,6 +149,7 @@ function PatrolGis(props) {
<div style={{ position: 'absolute', top: 8, left: 20, display: userId ? 'block' : 'none' }}>
<RangePicker
onChange={(date, dateString) => { setDateRange(dateString) }}
defaultValue={dateRange}
/>
</div>
{mapObj ? <Bounds map={mapObj} /> : ''}

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

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

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

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

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

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

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

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

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

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

@ -117,7 +117,7 @@ const OperaTionalTable = (props) => {
dataIndex: 'creatTime',
valueType: 'dateTimeRange',
hideInSearch: true,
width: 120,
width: 160,
fixed: 'right',
render: (dom, record) => {
return <div><Button type="link"
@ -704,7 +704,7 @@ const OperaTionalTable = (props) => {
dataIndex: 'creatTime55',
valueType: 'dateTimeRange',
hideInSearch: true,
width: 120,
width: 160,
fixed: 'right',
render: (dom, record) => {
return <div><Button type="link"
@ -736,7 +736,7 @@ const OperaTionalTable = (props) => {
>
新增
</Button>
<Button
{/* <Button
type="primary"
style={{ width: "100px", marginLeft: 20 }}
onClick={() => {
@ -744,7 +744,7 @@ const OperaTionalTable = (props) => {
}}
>
导入
</Button>
</Button> */}
</div>
@ -1337,7 +1337,7 @@ const OperaTionalTable = (props) => {
dataIndex: 'creatTime',
valueType: 'dateTimeRange',
hideInSearch: true,
width: 120,
width: 160,
fixed: 'right',
render: (dom, record) => {
return <div><Button type="link"
@ -1369,7 +1369,7 @@ const OperaTionalTable = (props) => {
>
新增
</Button>
<Button
{/* <Button
type="primary"
style={{ width: "100px", marginLeft: 20 }}
onClick={() => {
@ -1377,7 +1377,7 @@ const OperaTionalTable = (props) => {
}}
>
导入
</Button>
</Button> */}
</div>
@ -1807,7 +1807,7 @@ const OperaTionalTable = (props) => {
dataIndex: 'creatTime',
valueType: 'dateTimeRange',
hideInSearch: true,
width: 120,
width: 160,
fixed: 'right',
render: (dom, record) => {
return <div><Button type="link"
@ -1837,7 +1837,7 @@ const OperaTionalTable = (props) => {
>
新增
</Button>
<Button
{/* <Button
type="primary"
style={{ width: "100px", marginLeft: 20 }}
onClick={() => {
@ -1845,7 +1845,7 @@ const OperaTionalTable = (props) => {
}}
>
导入
</Button>
</Button> */}
</div>
@ -1859,6 +1859,9 @@ const OperaTionalTable = (props) => {
<div className='protable-transpor'>
<ProTable
actionRef={ref}
form={{
submitter: rewkeys === 'keyun' ? false : true,
}}
toolbar={{
multipleLine: true,
@ -1893,6 +1896,7 @@ const OperaTionalTable = (props) => {
}, {
key: 'tab4',
label: <span onClick={() => {
setDifferentiate('business')
setRewkeys('yehu')
}}>业户{activeKey === 'tab4'}</span>,
@ -1905,7 +1909,9 @@ const OperaTionalTable = (props) => {
ref={c => { finishedProductTable = c; }}
style={{ width: "100% ", overflow: "auto", height: '760px' }}
rowKey='id'
rowSelection={{
// alwaysShowAlert
// tableAlertRender={true}
rowSelection={rewkeys == 'keyun' ? false : {
selectedRowKeys: rowSelected,
onChange: (selectedRowKeys) => {
setRowSelected(selectedRowKeys);
@ -1971,7 +1977,7 @@ const OperaTionalTable = (props) => {
defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [
...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
>
导出

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

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

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

@ -77,7 +77,7 @@ const ProjectModal = (props) => {
visible={visible}
onVisibleChange={onVisibleChange}
onFinish={(values) => {
console.log(values)
// console.log(values)
if (rewkeys === 'road') {
if (typecard == 'compile') {
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' ?
<ProForm.Group

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

@ -12,23 +12,14 @@ const promotionalTable = (props) => {
const { dispatch, } = props
const [rowSelected, setRowSelected] = useState([])
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) => {
console.log(record);
const id = record.id
const name = record.name
const video = record.video
const enable = true ? record.enable == false : true
const data = ({ publicityId: id, name: name, video: video, enable: enable })
console.log(data);
dispatch(putEditPropagata(data)).then((res) => {
dispatch(getPropagata()).then((res) => {
setCounts(res.payload.data)
@ -39,7 +30,8 @@ const promotionalTable = (props) => {
const columns =
[{
[
{
title: '序号',
search: false,
dataIndex: 'containers',
@ -57,7 +49,6 @@ const promotionalTable = (props) => {
width: 120,
options: 1,
render: (dom, record) => {
// console.log('record',record)
return record.name
}
},
@ -70,8 +61,8 @@ const promotionalTable = (props) => {
fixed: 'right',
render: (dom, record) => {
return <div >
<Switch checkedChildren="展示" unCheckedChildren="关闭" onClick={() => onClickEnable(record)} defaultChecked={true ? record.enable == true : false} /></div>
<Switch checkedChildren="展示" unCheckedChildren="关闭" onClick={() => onClickEnable(record)} defaultChecked={true ? record.enable == true : false} />
</div>
}
},
{
@ -129,7 +120,6 @@ const promotionalTable = (props) => {
useEffect(() => {
const vedio = dispatch(getPropagata()).then((res) => {
setCounts(res.payload.data)
console.log(res.payload.data)
})
}, [])
@ -139,17 +129,10 @@ const promotionalTable = (props) => {
<Spin spinning={false}>
<div className='protable-transpor'>
<ProTable
actionRef={ref}
scroll={{ x: 800 }}
options={false}
style={{ width: "100% ", overflow: "auto", height: '760px' }}
rowKey='id'
rowSelection={{
selectedRowKeys: rowSelected,
onChange: (selectedRowKeys) => {
setRowSelected(selectedRowKeys);
},
}}
form={{
submitter: false,
}}

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

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

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

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

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

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

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

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

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

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

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

@ -13,12 +13,16 @@ const Public = (props) => {
setData(props)
}, []);
//批量导出
const exports = (ids,counts) => {
console.log(counts);
const exports = (ids, rewkeys) => {
let idas = ids.toString()
if (rewkeys === 'xianlu') {
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 (
<> <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">
<Link to="/fillion/file">档案管理</Link>
</Menu.Item>
<Menu.Item key="fillionvideois">
{/* <Menu.Item key="fillionvideois">
<Link to="/fillion/videois">视频管理</Link>
</Menu.Item>
</Menu.Item> */}
<Menu.Item key="fillionpromotional">
<Link to="/fillion/promotional">宣传视频</Link>
</Menu.Item>

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

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

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

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

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 * as echarts from 'echarts';
function Rightbottom(props) {
const { width, height, data, total, text } = props
const { width, height, total,data, text } = props
const chartRef = useRef(null);
let colorList = [
"rgba(7,185,254,1)",
"rgba(28,96,254,1)",
"rgba(4,251,240,1)",
"rgba(255,194,20,1)"
"rgba(255,194,20,1)",
'rgba(255,255,255,1)'
]
let underColorList = [
"rgba(7,185,254,0.5)",
"rgba(28,96,254,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 = []
// const name = data?.map(d)
@ -30,7 +32,25 @@ function Rightbottom(props) {
// {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)
emptyName.push({
name: '',
@ -41,7 +61,7 @@ function Rightbottom(props) {
const title = '基础设施安全监测版块';
// const number = 2738;
// const leftLegend = ['地灾', '桥梁', '基坑', '边坡', '水库大坝']
const rightLegend = ['一级公路', '二级公路', '三级公路','四级公路','等外公路']
const legendColor = undefined;
var titleNum = 15
@ -54,7 +74,7 @@ function Rightbottom(props) {
textStyle: {
color: '#fff',
},
formatter: (values) => `${values.seriesName}<br /> ${values.marker} ${values.name}<b>${values.value}</b>`,
formatter: (values) => `${values.seriesName}<br /> ${values.marker} ${values.name}<b>${values.value}</b>`,
},
legend: {
orient: "vertical",
@ -123,7 +143,7 @@ function Rightbottom(props) {
label: {
show: false
},
data: data,
data: dataq,
},
],
};
@ -168,6 +188,7 @@ function Rightbottom(props) {
return (
<div className='build-right-bottom'>
<span style={{position:"absolute",width:"10%",color:"#FFF",backgroundColor:'rgba(216, 240, 255, 0.1)',right:"5%",textAlign:"center",top:0}}></span>
<div className='build-right-bottom-title'>
<h2>{total||0}</h2>
<span>道路总公里</span>

129
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 LeftTop from './Lefttop'
// import LeftCenter from './Leftcenter'
@ -12,7 +12,8 @@ import RightBottom from './Rightbottom'
import AutoRollComponent from './AutoRollComponent'
import './style.less'
import { getdaolutongji, getxuanchuan } from '../../../actions/example'
import { number } from 'echarts';
import { Carousel } from 'antd';
// import { number } from 'echarts';
const Build = (props) => {
const { dispatch } = props
let data1 = [
@ -31,6 +32,12 @@ const Build = (props) => {
const [buildingnumber, setbuildingnumber] = useState(0)
const [data, setdata] = useState([])
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 () => {
@ -55,7 +62,8 @@ const Build = (props) => {
let t1 = Object.values(buildingnumber?.townRoad || {})
let totalgongli = t1.length !== 0 ? t1.reduce((x, y) => x + y.mileage, 0) : 0 //乡镇道路占比总公里数
let totalcount = t1.length !==0 ? t1.reduce((x,y)=>x+y.roadCount,0):0 //乡镇道路占比公路总条数
// let totalcount = t1.length !==0 ? t1.reduce((x,y)=>x+y.roadCount,0):0 //乡镇道路占比公路总条数
let totalcount = buildingnumber?.buildedRoad || 0
// let sungongli = alltype.reduce((x,y)=>x+y.value,0)
@ -89,20 +97,14 @@ const Build = (props) => {
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 sunsafetyData = safetyData?.reduce((x, y) => x + y.value, 0)
// console.log(safetyData,'好凶猛')
// console.log(data1,'对比')
// console.log(totalgongli,"好好的")
// console.log(keepThreeNum(totalgongli),'jjjjj')
useEffect(() => {
requestbuildingnumber();
requestxuanchuanlan()
}, [])
// const datas = new Array(15)
// datas.fill({
// name:"东乡镇",
// number:"11111",
// gongli:'9999'
// },0,15)
useEffect(()=>{
lunbo.current.goTo(lunboindex)
},[lunboindex])
const rendercontent = () => {
return (<div className='build-left-center-content'>
{list.map(({ name, number, gongli }, index) => <div className='build-left-center-item' key={index}>
@ -120,14 +122,31 @@ const Build = (props) => {
// "enable": true
// }
// ]
console.log(localStorage.getItem("qndmn"),'七牛')
console.log(xuandata,"宣传")
// console.log(localStorage.getItem("qndmn"), '七牛')
// 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 (
<div className='bgbuild'>
<>
<div className='bgbuild-left'>
<Module title={"各种状态公路数量统计"} style={{ width: "100%",
<Module title={"各状态公路数量统计"} style={{
width: "100%",
height: " 33%"
}} customize={true}>
<div style={{ height: "100%", position: "relative" }} >
<span style={{ position: "absolute", width: "10%", color: "#FFF", backgroundColor: 'rgba(216, 240, 255, 0.1)', right: "5%", textAlign: "center" }}></span>
{buildingnumber && buildingnumber.buildedRoad !== 0 && totalgongli !== 0 ? <div className='build-left-top'>
<div className='build-left-top-item'>
<div>
@ -147,8 +166,10 @@ const Build = (props) => {
<div>{buildingnumber?.buildedRoad || 0}</div>
</div>
</div> : <NoData />}
</div>
</Module>
<Module title={"各乡镇道路分布统计"} style={{ width: "100%",
<Module title={"各乡镇已建道路统计"} style={{
width: "100%",
height: " 33%", marginTop: '3%'
}} customize={true}>
{totalcount && totalcount !== 0 ? <div className='build-left-center'>
@ -177,7 +198,8 @@ const Build = (props) => {
divHeight={"100%"} divId={"chart"} />
</div> : <NoData />}
</Module>
<Module title={"道路统计"} style={{ width: "100%",
<Module title={"道路统计"} style={{
width: "100%",
height: " 30%", marginTop: '3%'
}} customize={true}>
{data && sundata !== 0 ? <LeftBottom
@ -193,21 +215,80 @@ const Build = (props) => {
</div>
<div className='bgbuild-right'>
<Module title={"宣传栏"} style={{ width: "100%",
<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>
<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>
</Module>
<Module title={"各乡镇在建公路工程"} style={{ width: "100%",
<Module title={"各乡镇在建工程统计"} style={{
width: "100%",
height: " 33%", marginTop: '3%'
}} customize={true}>
{sunonlineproject !== 0 ? <Rightcenter data={onlineproject} sundata={sunonlineproject} /> : <NoData />}
</Module>
<Module title={"公路等级统计"} style={{ width: "100%",
<Module title={"各路段技术等级统计"} style={{
width: "100%",
height: " 30%", marginTop: '3%'
}} customize={true}>
{safetyData && sunsafetyData !== 0 ? <RightBottom width='100%'
@ -217,7 +298,7 @@ const Build = (props) => {
data={keepThreeNum(safetyData)} /> : <NoData />}
</Module>
</div>
</div>
</>
)
}
function mapStateToProps(state) {

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

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

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

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

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

@ -6,7 +6,7 @@ import LeftTop from './left/left-top'
const Left = (props) => {
const { roadData, loading } = props
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} />
<LeftCenter roadData={roadData} loading={loading} />
<LeftBottom roadData={roadData} loading={loading} />

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 PieChart from '../chart/pie-chart';
let colorList = [
let color = [
"rgba(7,185,254,1)",
"rgba(28,96,254,1)",
"rgba(4,251,240,1)",
]
let underColorList = [
let underColor = [
"rgba(7,185,254,0.5)",
"rgba(28,96,254,0.5)",
"rgba(4,251,240,0.5)",
@ -22,9 +22,14 @@ const LeftBottom = (props) => {
totalData += s.isGreen
return {
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 (
<>

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

@ -114,7 +114,7 @@ const LeftCenter = (props) => {
axisLabel: {
show: true,
backgroundColor: {
image: 'assets/images/quanju/kelvhua_bdbg.png',
image: '/assets/images/quanju/kelvhua_bdbg.png',
},
width: 70,
height: 22,
@ -172,7 +172,7 @@ const LeftCenter = (props) => {
rich: {
a: {
backgroundColor: {
image: 'assets/images/quanju/circle2.png'
image: '/assets/images/quanju/circle2.png'
},
width: 15,
height: 15,
@ -228,9 +228,9 @@ const LeftCenter = (props) => {
<Row align='middle' style={{ padding: '10px 3% 0px 15px' }}>
<Col span={15}>
<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 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>
<div ref={chartRef} style={{ height: "14.5vh", width: "100%" }}></div>

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

@ -6,7 +6,7 @@ import RightTop from './right/right-top'
const Right = (props) => {
const { highwaysData, roadMaintenances } = props
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} />
<RightCenter highwaysData={highwaysData} />
<RightBottom roadMaintenances={roadMaintenances} />

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

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

@ -21,9 +21,9 @@ const Gis = (props) => {
const loadMap = () => {
const map = new AMap.Map(MAPID, {
resizeEnable: true,
center: [115.912663, 28.543149],//地图中心点,初始定位加载显示楼块
zoom: 15,//地图显示的缩放级别
zooms: [10, 12],
center: [115.99255, 28.503617],//地图中心点,初始定位加载显示楼块
zoom: 8,//地图显示的缩放级别
zooms: [8, 18],
pitch: 0, // 地图俯仰角度,有效范围 0 度- 83 度
viewMode: '3D', // 地图模式
mapStyle: 'amap://styles/fb26776387242721c2fc32e2cb1daccc',
@ -42,8 +42,8 @@ const Gis = (props) => {
};
return (
<div style={{ position: 'absolute', width: '100%', backgroundColor: '#101824', height: '100%', minHeight: 700 }}>
<div id={MAPID} style={{ width: '100%', height: '100%', background: "#101824", minHeight: 700 }} />
<div style={{ position: 'absolute', width: '100%', height: '100%' }}>
<div id={MAPID} style={{ width: '100%', height: '100%',}} />
{mapObj ? <Bounds map={mapObj} /> : ''}
</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)
var pattern = /[\u4e00-\u9fa5]*/;
// console.log(res.payload.data,'好的号的')
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)=>{
@ -56,12 +57,12 @@ const Guanli = (props) => {
// datalist.fill({licensePlate:"赣A44454",overrunRate:"30%",fine:"200元",processingTime:"2020年4月1日"})
const renderContent = () => {
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){
return <div key={index} className='guanli-right-item'>
<span>{licensePlate}</span>
<span>{overrunRate}%</span>
<span>{fine}{fine?"元":""}</span>
<span>{deductPoints?`-${deductPoints}`:""}-{fine}{fine?"元":""}</span>
<span>{processingTime}</span>
</div>
}
@ -78,7 +79,7 @@ const Guanli = (props) => {
}
// renderContent()
return (
<div className='guanli'>
<>
<div className='guanli-left'>
<Module style={{height:"100%"}} title="检测点治超处理占比" customize={true}>
{leftDatas && leftDatas.length!==0?<AutoRollComponent content={renderLeftContent()}
@ -105,7 +106,7 @@ const Guanli = (props) => {
divHeight={"100%"} divId={"chart-overview-deviceList"} />:<NoData style={{height:"70%"}}/>}
</Module>
</div>
</div>
</>
)
}
function mapStateToProps(state) {

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

@ -3,12 +3,12 @@
font-size: 12px;
}
}
.guanli{
// box-sizing: border-box;
padding: 0 15px 0 15px;
width: 100%;
height: 100%;
position: relative;
// .guanli{
// // box-sizing: border-box;
// padding: 0 15px 0 15px;
// width: 100%;
// height: 100%;
// position: relative;
// display: flex;
// justify-content: space-between;
.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
return (
<>
<div style={{ width: "48%", height: "100%", float: "left", marginLeft: "1%" }}>
<div style={{ width: "48%", height: "100%", position: "absolute", left: "25%" }}>
<Centerlefttop dispatch={dispatch} />
<Centerleftbottom dispatch={dispatch} />
</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) => {
return item.projectType == "road"
}))
console.log(res.payload.data);
// console.log(res.payload.data);
})
}, [])
useEffect(() => {
@ -28,11 +28,12 @@ const Right = (props) => {
// const
})
}, [])
console.log("1211", nums);
// console.log("1211", nums);
const renderBody = () => {
return (
<div style={{ width: "100%", height: "100%" }}>
{/* <Spin spinning={!nums} tip="Loading" style={{ width: "100%", height: "100%" }}> */}
{
list.map((item, index) => {
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>
{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: "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>
)
}
return (
<>
{/* <Spin spinning={!nums && list && roads} tip="Loading" size="large" > */}
<div style={{ width: "100%", height: "100%", float: "right", marginRight: "1%", position: "relative" }}>
<div style={{ width: "100%", height: "43%", position: "relative", left: "1%" }}>
<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={{ 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>
{/* <Spin spinning={!roads} tip="Loading" > */}
<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 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 style={{ width: "15%", height: "20%", backgroundColor: "#df0001", float: "left", marginTop: "5.6%" }}>
</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 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>
<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>
{/* <Spin spinning={!roads} tip="Loading" > */}
<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 style={{ height: "80%", width: "100%", position: "relative", left: "5%", top: "-8%" }}>
<div style={{ width: "100%", height: "40px"/* , backgroundColor: "#fff" */, position: "relative" }}>
{/* <p>{title || []}</p> */}
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "23%" }} />
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "3%" }}>养护事件</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>
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "18%" }} />
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "19px" }}>养护事件</span>
<p style={{ position: "absolute", color: "#D8F0FF", fontSize: "14px", right: "6%" }}><span style={{ marginLeft: "-20%" }}>道路</span><span style={{ fontSize: "18px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", marginLeft: "10%" }}>{nums ? nums[0]?.count : 0}</span><span style={{ marginLeft: "10%" }}></span></p>
{/* <img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} /> */}
</div>
{/* <Spin spinning={true} style={{ height: "80%" }}> */}
@ -99,6 +105,7 @@ const Right = (props) => {
</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 { getRoadmaintain, getdaolutongji } from "../../../../actions/example"
import moment from 'moment'
// import { Spin } from 'antd'
const Right = (props) => {
@ -26,7 +27,7 @@ const Right = (props) => {
const daolus = dispatch(getdaolutongji()).then((res) => {
// console.log("[roads]", res.payload.data.roadType);
setRoads(res.payload.data.townCulvert)
console.log(res.payload.data.townCulvert);
// console.log(res.payload.data.townCulvert);
// const
})
}, [])
@ -34,9 +35,11 @@ const Right = (props) => {
return (
<div style={{ width: "100%", height: "100%" }}>
{/* <Spin spinning={!nums} tip="Loading" style={{ width: "100%", height: "100%" }}> */}
{
list.map((item, index) => {
console.log(list);
// console.log(list);
return (
<li className={index} style={{
@ -57,38 +60,42 @@ const Right = (props) => {
)
})
}
{/* </Spin> */}
</div>
)
}
return (
<>
<div style={{ width: "100%", height: "100%", float: "right", marginRight: "1%", position: "relative" }}>
<div style={{ width: "100%", height: "43%", position: "relative", left: "1%" }}>
{/* <Spin spinning={!roads} tip="Loading" ></Spin> */}
<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={{ 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={{ 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%" }}>{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 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 style={{ width: "15%", height: "20%", backgroundColor: "#df0001", float: "left", marginTop: "5.6%" }}>
</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 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={{ 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(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)", 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 style={{ height: "80%", width: "100%", position: "relative", left: "5%", top: "-8%" }}>
<div style={{ width: "100%", height: "40px"/* , backgroundColor: "#fff" */, position: "relative" }}>
{/* <p>{title || []}</p> */}
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "23%" }} />
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "3%" }}>养护事件</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>
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "18%" }} />
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "19px" }}>养护事件</span>
<p style={{ position: "absolute", color: "#D8F0FF", fontSize: "14px", right: "6%" }}><span style={{ marginLeft: "-20%" }}>涵洞</span><span style={{ fontSize: "18px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", marginLeft: "10%" }}>{nums ? nums[0]?.count : 0}</span><span style={{ marginLeft: "10%" }}></span></p>
{/* <img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} /> */}
</div>
<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) => {
// console.log("[roads]", res.payload.data.roadType);
setRoads(res.payload.data.bridgeSize)
console.log(res.payload.data.bridgeSize);
// console.log(res.payload.data.bridgeSize);
// const
})
}, [])
@ -61,29 +61,29 @@ const Right = (props) => {
<div style={{ width: "100%", height: "43%", position: "relative", left: "1%" }}>
<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={{ 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={{ 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" }}>{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 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 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 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 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={{ 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?.["中桥"]) ? "" : roads?.["小桥"] + roads?.["中桥"]}</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>
</div>
</div>
<div style={{ height: "80%", width: "100%", position: "relative", left: "5%", top: "-8%" }}>
<div style={{ width: "100%", height: "40px"/* , backgroundColor: "#fff" */, position: "relative" }}>
{/* <p>{title || []}</p> */}
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "23%" }} />
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "3%" }}>养护事件</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>
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "18%" }} />
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "19px" }}>养护事件</span>
<p style={{ position: "absolute", color: "#D8F0FF", fontSize: "14px", right: "6%" }}><span style={{ marginLeft: "-20%" }}>桥梁</span><span style={{ fontSize: "18px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", marginLeft: "10%" }}>{nums ? nums[0]?.count : 0}</span><span style={{ marginLeft: "10%" }}></span></p>
{/* <img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} /> */}
</div>
<Lun

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

@ -39,7 +39,7 @@ const Leftcenter = (props) => {
</div>
<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={{ 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 style={{ width: "30%", height: "10vh", backgroundColor: "", position: "relative", left: "35%", top: "-105%" }} onClick={() => {
@ -53,7 +53,7 @@ const Leftcenter = (props) => {
</div>
<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={{ 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 style={{ width: "30%", height: "10vh", backgroundColor: "", position: "relative", left: "68%", top: "-315%" }} onClick={() => {
@ -67,7 +67,7 @@ const Leftcenter = (props) => {
</div>
<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={{ 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>

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

@ -7,7 +7,7 @@ const Left = (props) => {
const { dispatch } = props
return (
<>
<div style={{ width: "23%", height: "100%", float: "left", marginLeft: "1%" }}>
<div style={{ width: "23%", height: "100%", position: "absolute", left: "1%" }}>
<Lefttop 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);
useEffect(() => {
var chartInstance = echarts.init(chartRef.current);

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

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

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" }}>
{/* <p>{title || []}</p> */}
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "1%", top: "30%" }} />
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "10%" }}>主要路段拥堵情况分析</span>
<img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "28px", position: "absolute", top: "12px", left: "6%" }} />
<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: "50px" }}>主要路段拥堵情况分析</span>
<img src='/assets/images/leadership/zibiaoti.png' style={{ width: "93%", height: "35px", position: "absolute", top: "8px", left: "35px" }} />
</div>
<div style={{ width: "100%", height: "100%", marginTop: "3%" }}>
<div style={{ width: "60%", height: "100%", float: "left", marginLeft: "1%" }}>
{
{/* {
list.map((item, index) => {
return index + 1 == num ?
<div style={{ width: "100%", height: "100%", position: "relative" }}>
@ -86,15 +86,15 @@ const Leftcenter = () => {
})
}
} */}
</div>
<Lunbo
{/* <Lunbo
// canScroll={true}
content={renderBody()}
containerStyle={{ position: "relative", height: "100%", width: "35%", float: "right", marginRight: "2%", marginTop: "1%" }}
divHeight={"100%"}
divId={"screen-slope-midde-top-jiangxi"}
/>
/> */}
</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 [speed, setspeed] = useState()
const [traffic, setTraffic] = useState()
const [tim, setTim] = useState()
const [nums, setNums] = useState()
useEffect(() => {
const shuju = dispatch(getGodshuju()).then((res) => {
// console.log(res);
setMass(res.payload.data.index)
// setMass(70)
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 (
<>
<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)",
position: "absolute", left: "30%", top: "65%"
}}>预测明日</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>

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

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

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

@ -16,7 +16,7 @@ class ReactCarousel extends Component {
} else {
j++;
x = 0;
console.log("else:" + "j=" + j + " " + "x=" + x);
// console.log("else:" + "j=" + j + " " + "x=" + x);
arr1[j][x] = arr[i];
// console.log(arr1);
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 [beijing, setBeijing] = useState()
const [list, setList] = useState([])
const [rightDatas, setrightDatas] = 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(() => {
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)
})
requestRightDatas()
}, [])
// console.log(list);
const renderBody = () => {
return (
<div style={{ width: "100%", height: "50%" }}>
{/* <Spin spinning={!list} tip="Loading" size="large"> */}
{list?.map((item, index) => {
return <li style={{ width: "100%", height: "3vh", marginTop: "5px", position: "relative", }} onMouseEnter={() => {
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" }} /> : ""}
<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: "70%" }}>{item.processingTime ? item.processingTime : "--"}</div>
</li>
})
}
{/* </Spin> */}
</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)" }}>
<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 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>

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

@ -77,13 +77,13 @@ const Righttop = () => {
<Module style={style} title={"路面执法监控"}>
<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: "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: "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: "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" }}>
<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%" }}>
<Select
{/* <Select
size={size}
defaultValue="选择路段"
onChange={handleChange}
@ -94,31 +94,31 @@ const Righttop = () => {
}}
>
{children}
</Select>
</Select> */}
{/* <div>{size}</div> */}
</div>
</div>
<div style={{ width: "100%", height: "80%", position: "relative", top: "10%" }}>
<Huadong />
{/* <Huadong /> */}
</div>
</div>
<div style={{ width: "100%", height: "35%" }}>
<div style={{ width: "100%", height: "40px"/* , backgroundColor: "#fff" */, position: "relative" }}>
{/* <p>{title || []}</p> */}
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "1%", top: "30%" }} />
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "10%" }}>离线详情</span>
<img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} />
<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: "50px" }}>离线详情</span>
<img src='/assets/images/leadership/zibiaoti.png' style={{ width: "94%", height: "34px", position: "absolute", top: "8px", left: "35px" }} />
</div>
{/* <Spin tip="Loading..." spinning={num ? true : false} style={{ width: "100%", height: "100%" }}> */}
<Lunbo
{/* <Lunbo
// canScroll={true}
content={renderBody()}
containerStyle={{ position: "relative", height: "100%", width: "90%", left: "5%", top: "5%" }}
divHeight={"100%"}
divId={"screen-slope"}
/>
/> */}
{/* </Spin> */}
</div>

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

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

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

@ -128,7 +128,7 @@ const Left = (props) => {
setTreeDataList(dataList)
}, [busTier])
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={"公交车辆信息"}>
<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)' }}>

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

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

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

@ -28,7 +28,7 @@ const Header = (props) => {
onClick("leadership")
}}><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 == "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")
}}><a>养护</a></div>
<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('');
}

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

@ -86,7 +86,11 @@ export const ApiTable = {
//获取宣传数据
getpropagata: 'publicity',putpropagata:'publicity',delpropagata:'/publicity/{publicityId}',
// <<<<<<< HEAD
// //公交信息
// getCircuit: 'bus/line', putCircuit: 'bus/line', delCircuit: 'bus/line/{lineId}',
// 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(['u', 'api-url'], 'webapi的URL');
args.option('apiUrl', '可外网访问的 webapi 的URL');
args.option(['r', 'report-node'], '报表进程地址');
args.option('qndmn', '七牛');
const flags = args.parse(process.argv);
const FS_UNIAPP_API = process.env.FS_UNIAPP_API || flags.apiUrl;
const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURC || flags.qndmn;
const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE || flags.qndmn;
const API_URL = process.env.API_URL || flags.apiUrl;
if (!FS_UNIAPP_API) {
console.log('缺少启动参数,异常退出');
@ -52,7 +54,7 @@ const product = {
}, {
entry: require('./routes').entry,
opts: {
apiUrl: FS_UNIAPP_API,
apiUrl: API_URL,
qndmn: QINIU_DOMAIN_QNDMN_RESOURCE,
staticRoot: './client',
}

11
web/routes/attachment/index.js

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

Loading…
Cancel
Save