巴林闲侠 2 years ago
parent
commit
eb7f48c698
  1. 2
      api/.vscode/launch.json
  2. 19
      api/Dockerfile
  3. 147
      api/app/lib/controllers/roadMaintenance/index.js
  4. 115
      api/app/lib/models/road_maintenance.js
  5. 110
      api/app/lib/models/road_maintenance_cost.js
  6. 19
      api/app/lib/routes/roadMaintenance/index.js
  7. 126
      api/log/development.log
  8. 4
      api/package.json
  9. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/养护/南昌县农村公路各管养责任单位管养汇总表.xlsx
  10. 13
      scripts/0.0.1/data/工具脚本(无需执行)/dataIn.js
  11. 5
      scripts/0.0.1/data/工具脚本(无需执行)/index.js
  12. 21
      scripts/0.0.1/data/工具脚本(无需执行)/养护_字段对应.json
  13. 21
      scripts/0.0.1/data/工具脚本(无需执行)/养护_数据字段对应.json
  14. 21
      scripts/0.0.1/data/工具脚本(无需执行)/养护_数据库表对应.json
  15. 44
      scripts/0.0.1/data/工具脚本(无需执行)/养护_数据脚本对应.sql
  16. 23
      scripts/0.0.1/schema/2.init_road_maintenance_cost.sql
  17. 25
      scripts/1.1.0/data/2.insert_road_maintenance.sql
  18. 76
      t --hard
  19. 25
      web/Dockerfile
  20. BIN
      web/client/assets/images/zhexian.png
  21. BIN
      web/client/assets/images/zhuzhuang.png
  22. 49
      web/client/src/sections/fillion/actions/infor.js
  23. 1
      web/client/src/sections/fillion/components/bridgeTable.js
  24. 113
      web/client/src/sections/fillion/components/highways/guanli.js
  25. 27
      web/client/src/sections/fillion/components/highways/highwaysdata.js
  26. 293
      web/client/src/sections/fillion/components/highwaysTable.js
  27. 3
      web/client/src/sections/fillion/components/transportationTable.js
  28. 2
      web/client/src/sections/fillion/nav-item.js
  29. 2
      web/client/src/sections/fillion/routes.js
  30. 11
      web/client/src/sections/quanju/actions/example.js
  31. 21
      web/client/src/sections/quanju/containers/footer/conserve/action/index.js
  32. 25
      web/client/src/sections/quanju/containers/footer/conserve/index.js
  33. 4
      web/client/src/sections/quanju/containers/footer/conserve/left.js
  34. 101
      web/client/src/sections/quanju/containers/footer/conserve/left/Lb.js
  35. 33
      web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js
  36. 249
      web/client/src/sections/quanju/containers/footer/conserve/left/left-center.js
  37. 396
      web/client/src/sections/quanju/containers/footer/conserve/left/left-top.js
  38. 7
      web/client/src/sections/quanju/containers/footer/conserve/left/lun.less
  39. 110
      web/client/src/sections/quanju/containers/footer/conserve/left/lunbo.js
  40. 99
      web/client/src/sections/quanju/containers/footer/conserve/left/lunbozujian.js
  41. 168
      web/client/src/sections/quanju/containers/footer/conserve/left/shituzujian.js
  42. 282
      web/client/src/sections/quanju/containers/footer/conserve/left/zhexin.js
  43. 139
      web/client/src/sections/quanju/containers/footer/conserve/left/zidong.js
  44. 2
      web/client/src/sections/quanju/containers/footer/index.js
  45. 1
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js
  46. 184
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/huadong.js
  47. 98
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/left.less
  48. 2
      web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js
  49. 7
      web/client/src/utils/webapi.js
  50. 66047
      web/log/development.txt
  51. 172
      web/package-lock.json

2
api/.vscode/launch.json

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

19
api/Dockerfile

@ -1,4 +1,7 @@
FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node:12-dev as builder
# FROM node:8-alpine
FROM repository.anxinyun.cn/base-images/nodejs12:20.10.12.2
MAINTAINER liuxinyi "liu.xinyi@free-sun.com.cn"
COPY . /var/app
@ -6,16 +9,6 @@ WORKDIR /var/app
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 rm -rf package-lock.json
RUN npm install --registry http://10.8.30.22:7000 --legacy-peer-deps
FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node:12
COPY --from=builder --chown=node /var/app /home/node/app
WORKDIR /home/node/app
CMD ["-a", "http://10.8.30.35:19084", "-e", "iota-n1:9200,iota-n2:9200,iota-n3:9200,iota-n4:9200"]
CMD ["node", "server.js"]
ENTRYPOINT [ "node", "server.js" ]

147
api/app/lib/controllers/roadMaintenance/index.js

@ -0,0 +1,147 @@
'use strict';
'use strict';
const moment = require('moment');
const { QueryTypes } = require('sequelize');
async function getLastMonthCost(ctx) {
const { fourceUpdate } = ctx.query;
let rslt = [];
try {
const startTime = new Date(moment().startOf('year')), endTime = new Date(moment().endOf('year').valueOf());
const models = ctx.fs.dc.models;
const costList = await models.RoadMaintenanceCost.findAll({
where: {
maintenanceDate: { '$between': [startTime, endTime] },
countyName: { $not: '南昌县*' }
}
})
if (!costList || !costList.length || fourceUpdate) {
const dataList = await models.RoadMaintenance.findAll();
if (fourceUpdate) {
await models.RoadMaintenanceCost.destroy({ where: { id: { $not: null } } });
}
for (var i = 0; i < 12; i++) {
const dateTime = new Date(moment().month(i));
let nanChang = {
countyName: '南昌县*',
roadLengthCounty: 0,
roadLengthTownship: 0,
roadLengthVillage: 0,
roadCostCounty: 0,
roadCostTownship: 0,
roadCostVillage: 0,
maintenanceDate: dateTime
};
dataList.map(item => {
const { countyHighway, townshipRoad, villageRoad, responsibleUnitForManagementAndMaintenance } = item;
const randomNum = 0.1 * (0.8 + Math.random() / 2);
let data = {
countyName: responsibleUnitForManagementAndMaintenance,
roadLengthCounty: countyHighway ? countyHighway * randomNum : 0,
roadLengthTownship: townshipRoad ? townshipRoad * randomNum : 0,
roadLengthVillage: villageRoad ? villageRoad * randomNum : 0,
maintenanceDate: dateTime
}
data.roadCostCounty = typeof data.roadLengthCounty == 'number' && !isNaN(data.roadLengthCounty) ? data.roadLengthCounty * 15000 / 12 : 0,
data.roadCostTownship = typeof data.roadLengthTownship == 'number' && !isNaN(data.roadLengthTownship) ? data.roadLengthTownship * 7500 / 12 : 0,
data.roadCostVillage = typeof data.roadLengthVillage == 'number' && !isNaN(data.roadLengthVillage) ? data.roadLengthVillage * 3900 / 12 : 0;
rslt.push(data)
nanChang.roadLengthCounty += data.roadLengthCounty;
nanChang.roadLengthTownship += data.roadLengthTownship;
nanChang.roadLengthVillage += data.roadLengthVillage;
nanChang.roadCostCounty += data.roadCostCounty;
nanChang.roadCostTownship += data.roadCostTownship;
nanChang.roadCostVillage += data.roadCostVillage;
models.RoadMaintenanceCost.create(data)
})
models.RoadMaintenanceCost.create(nanChang)
}
} else {
rslt = costList
}
ctx.status = 200;
ctx.body = rslt;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
async function getConcatData(ctx) {
try {
let startTime = new Date(moment().startOf('year')),
endTime = new Date(moment().endOf('month'));
if (moment().year() == 2022) {
startTime = new Date(moment().startOf('year').month(3))
}
const models = ctx.fs.dc.models;
const costList = await models.RoadMaintenanceCost.findAll({
where: {
maintenanceDate: { '$between': [startTime, endTime] },
countyName: '南昌县*'
},
order: [['maintenanceDate', 'DESC']]
})
ctx.status = 200;
ctx.body = costList;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
async function getRoadMaintenanceList(ctx) {
try {
const models = ctx.fs.dc.models;
const list = await models.RoadMaintenance.findAll();
ctx.status = 200;
ctx.body = list;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
async function updateRoadMaintenanceList(ctx) {
try {
const data = ctx.request.body;
const models = ctx.fs.dc.models;
// const list = await models.RoadMaintenance.findAll();
await models.RoadMaintenance.update(data, { where: { id: data.id } })
ctx.status = 200;
ctx.body = {message:'编辑成功'};
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
module.exports = {
getLastMonthCost,
getConcatData,
getRoadMaintenanceList,
updateRoadMaintenanceList,
}

115
api/app/lib/models/road_maintenance.js

@ -0,0 +1,115 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const RoadMaintenance = sequelize.define("roadMaintenance", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "road_maintenance_id_uindex"
},
serialNumber: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "序号",
primaryKey: false,
field: "serial_number",
autoIncrement: false
},
responsibleUnitForManagementAndMaintenance: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "管养责任单位",
primaryKey: false,
field: "responsible_unit_for_management_and_maintenance",
autoIncrement: false
},
maintenanceUnit: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "养护单位",
primaryKey: false,
field: "maintenance_unit",
autoIncrement: false
},
management: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "管理人员",
primaryKey: false,
field: "management",
autoIncrement: false
},
worker: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "工人",
primaryKey: false,
field: "worker",
autoIncrement: false
},
publicWelfarePost: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "公益岗位",
primaryKey: false,
field: "public_welfare_post",
autoIncrement: false
},
countyHighway: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "县道",
primaryKey: false,
field: "county_highway",
autoIncrement: false
},
townshipRoad: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "乡道 ",
primaryKey: false,
field: "township_road",
autoIncrement: false
},
villageRoad: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "村道",
primaryKey: false,
field: "village_road",
autoIncrement: false
},
bridge: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "桥梁 ",
primaryKey: false,
field: "bridge",
autoIncrement: false
}
}, {
tableName: "road_maintenance",
comment: "",
indexes: []
});
dc.models.RoadMaintenance = RoadMaintenance;
return RoadMaintenance;
};

110
api/app/lib/models/road_maintenance_cost.js

@ -0,0 +1,110 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const RoadMaintenanceCost = sequelize.define("roadMaintenanceCost", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
},
mId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "养护id",
primaryKey: false,
field: "mId",
autoIncrement: false
},
countyName: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "管养责任单位",
primaryKey: false,
field: "county_name",
autoIncrement: false
},
roadLengthCounty: {
type: DataTypes.FLOAT,
allowNull: true,
defaultValue: null,
comment: "养护长度",
primaryKey: false,
field: "road_length_county",
autoIncrement: false
},
roadCostCounty: {
type: DataTypes.DOUBLE,
allowNull: true,
defaultValue: null,
comment: "养护费用",
primaryKey: false,
field: "road_cost_county",
autoIncrement: false
},
roadLengthVillage: {
type: DataTypes.FLOAT,
allowNull: true,
defaultValue: null,
comment: "养护长度",
primaryKey: false,
field: "road_length_village",
autoIncrement: false
},
roadCostVillage: {
type: DataTypes.DOUBLE,
allowNull: true,
defaultValue: null,
comment: "养护费用",
primaryKey: false,
field: "road_cost_village",
autoIncrement: false
},
roadLengthTownship: {
type: DataTypes.FLOAT,
allowNull: true,
defaultValue: null,
comment: "养护长度",
primaryKey: false,
field: "road_length_township",
autoIncrement: false
},
roadCostTownship: {
type: DataTypes.DOUBLE,
allowNull: true,
defaultValue: null,
comment: "养护费用",
primaryKey: false,
field: "road_cost_township",
autoIncrement: false
},
maintenanceDate: {
type: DataTypes.DATE,
allowNull: true,
defaultValue: null,
comment: "养护日期",
primaryKey: false,
field: "maintenance_date",
autoIncrement: false
},
}, {
tableName: "road_maintenance_cost",
comment: "",
indexes: []
});
dc.models.RoadMaintenanceCost = RoadMaintenanceCost;
return RoadMaintenanceCost;
};

19
api/app/lib/routes/roadMaintenance/index.js

@ -0,0 +1,19 @@
'use strict';
const roadMaintenance = require('../../controllers/roadMaintenance');
module.exports = function (app, router, opts) {
app.fs.api.logAttr['GET/road/maintenance/cost/query'] = { content: '获取上月道路养护费用', visible: false };
router.get('/road/maintenance/cost/query', roadMaintenance.getLastMonthCost);
app.fs.api.logAttr['GET/road/maintenance/cost/nanchang/query'] = { content: '获取南昌县道路养护费用', visible: false };
router.get('/road/maintenance/cost/nanchang/query', roadMaintenance.getConcatData);
app.fs.api.logAttr['GET/road/maintenance'] = { content: '获取南昌县道路养护数据', visible: false };
router.get('/road/maintenance', roadMaintenance.getRoadMaintenanceList);
app.fs.api.logAttr['POST/road/maintenance'] = { content: '更新南昌县道路养护数据', visible: false };
router.post('/road/maintenance', roadMaintenance.updateRoadMaintenanceList);
}

126
api/log/development.log

@ -1,3 +1,4 @@
<<<<<<< Updated upstream
2021-06-11 09:24:57.968 - debug: [FS-LOGGER] Init.
2021-06-11 09:24:58.371 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2021-06-11 09:24:58.371 - info: [FS-AUTH] Inject auth and api mv into router.
@ -11074,6 +11075,131 @@ headers: {}
2022-08-12 11:07:40.465 - debug: [FS-LOGGER] Init.
2022-08-12 11:07:40.545 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-12 11:07:40.545 - info: [FS-AUTH] Inject auth and api mv into router.
<<<<<<< Updated upstream
2022-08-12 15:35:49.622 - debug: [FS-LOGGER] Init.
2022-08-12 15:35:49.700 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-12 15:35:49.700 - info: [FS-AUTH] Inject auth and api mv into router.
=======
<<<<<<< Updated upstream
2022-08-25 16:36:38.540 - debug: [FS-LOGGER] Init.
2022-08-25 16:36:38.625 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-25 16:36:38.626 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-25 16:59:51.659 - debug: [FS-LOGGER] Init.
2022-08-25 16:59:51.742 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-25 16:59:51.742 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-26 11:12:28.406 - debug: [FS-LOGGER] Init.
2022-08-26 11:12:28.488 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-26 11:12:28.489 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-29 16:04:37.717 - debug: [FS-LOGGER] Init.
2022-08-29 16:04:38.471 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-29 16:04:38.471 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-29 16:12:00.460 - debug: [FS-LOGGER] Init.
2022-08-29 16:12:00.541 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-29 16:12:00.541 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-30 09:43:41.776 - debug: [FS-LOGGER] Init.
2022-08-30 09:43:42.448 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-30 09:43:42.448 - info: [FS-AUTH] Inject auth and api mv into router.
>>>>>>> Stashed changes
<<<<<<< Updated upstream
2022-08-30 16:36:05.846 - debug: [FS-LOGGER] Init.
2022-08-30 16:36:05.939 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-30 16:36:05.939 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-30 16:36:13.025 - debug: [FS-LOGGER] Init.
2022-08-30 16:36:13.105 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-30 16:36:13.105 - info: [FS-AUTH] Inject auth and api mv into router.
=======
>>>>>>> Stashed changes
=======
2022-08-25 14:22:05.295 - debug: [FS-LOGGER] Init.
2022-08-25 14:22:07.381 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-25 14:22:07.382 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-25 14:22:49.419 - debug: [FS-LOGGER] Init.
2022-08-25 14:22:49.501 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-25 14:22:49.501 - info: [FS-AUTH] Inject auth and api mv into router.
>>>>>>> Stashed changes
2022-08-25 14:47:29.269 - debug: [FS-LOGGER] Init.
2022-08-25 14:47:29.347 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-25 14:47:29.347 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-25 14:49:07.574 - debug: [FS-LOGGER] Init.
2022-08-25 14:49:07.652 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-25 14:49:07.653 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-25 14:50:22.022 - debug: [FS-LOGGER] Init.
2022-08-25 14:50:22.096 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-25 14:50:22.096 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-31 20:42:09.758 - debug: [FS-LOGGER] Init.
2022-08-31 20:42:11.288 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-31 20:42:11.288 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-31 21:11:04.831 - debug: [FS-LOGGER] Init.
2022-08-31 21:11:04.913 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-31 21:11:04.913 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-31 21:11:34.545 - debug: [FS-LOGGER] Init.
2022-08-31 21:11:34.625 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-31 21:11:34.625 - info: [FS-AUTH] Inject auth and api mv into router.
>>>>>>> Stashed changes
2022-09-01 01:09:46.801 - debug: [FS-LOGGER] Init.
2022-09-01 01:09:47.410 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-09-01 01:09:47.410 - info: [FS-AUTH] Inject auth and api mv into router.
2022-09-01 16:38:47.964 - error: [FS-ERRHD]
{
message: 'request aborted',
stack: 'BadRequestError: request aborted\n' +
' at IncomingMessage.onAborted (f:\\项目\\sihao\\Highways4Good\\api\\node_modules\\raw-body\\index.js:238:10)\n' +
' at IncomingMessage.emit (events.js:314:20)\n' +
' at abortIncoming (_http_server.js:533:9)\n' +
' at socketOnClose (_http_server.js:526:3)\n' +
' at Socket.emit (events.js:326:22)\n' +
' at TCP.<anonymous> (net.js:675:12)\n' +
' at TCP.callbackTrampoline (internal/async_hooks.js:126:14)',
name: 'BadRequestError',
code: 'ECONNABORTED',
expected: 234,
length: 234,
received: 190,
type: 'request.aborted'
}
2022-09-01 16:41:01.852 - error: [FS-ERRHD]
{
message: 'request aborted',
stack: 'BadRequestError: request aborted\n' +
' at IncomingMessage.onAborted (f:\\项目\\sihao\\Highways4Good\\api\\node_modules\\raw-body\\index.js:238:10)\n' +
' at IncomingMessage.emit (events.js:314:20)\n' +
' at abortIncoming (_http_server.js:533:9)\n' +
' at socketOnClose (_http_server.js:526:3)\n' +
' at Socket.emit (events.js:326:22)\n' +
' at TCP.<anonymous> (net.js:675:12)\n' +
' at TCP.callbackTrampoline (internal/async_hooks.js:126:14)',
name: 'BadRequestError',
code: 'ECONNABORTED',
expected: 175,
length: 175,
received: 146,
type: 'request.aborted'
}
2022-09-01 17:03:43.087 - debug: [FS-LOGGER] Init.
2022-09-01 17:03:44.040 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-09-01 17:03:44.040 - info: [FS-AUTH] Inject auth and api mv into router.
2022-09-01 17:07:15.155 - debug: [FS-LOGGER] Init.
2022-09-01 17:07:15.234 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-09-01 17:07:15.234 - info: [FS-AUTH] Inject auth and api mv into router.
2022-09-01 17:07:18.088 - error: path: /department, error: TypeError: Cannot read property 'userInfo' of undefined
2022-09-01 17:12:04.208 - debug: [FS-LOGGER] Init.
2022-09-01 17:12:04.286 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-09-01 17:12:04.287 - info: [FS-AUTH] Inject auth and api mv into router.
2022-09-01 17:12:06.685 - debug: [FS-LOGGER] Init.
2022-09-01 17:12:06.763 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-09-01 17:12:06.763 - info: [FS-AUTH] Inject auth and api mv into router.
2022-09-01 17:13:23.786 - error: path: /department, error: TypeError: Cannot read property 'userInfo' of undefined
2022-09-01 17:20:58.071 - error: path: /department, error: TypeError: Cannot read property 'userInfo' of undefined
2022-09-01 17:26:53.932 - error: path: /department, error: TypeError: Cannot read property 'userInfo' of undefined
2022-09-01 18:25:21.474 - debug: [FS-LOGGER] Init.
2022-09-01 18:25:22.990 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-09-01 18:25:22.990 - info: [FS-AUTH] Inject auth and api mv into router.
2022-09-02 15:33:27.837 - debug: [FS-LOGGER] Init.
2022-09-02 15:33:29.977 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-09-02 15:33:29.978 - info: [FS-AUTH] Inject auth and api mv into router.
2022-09-05 14:03:29.503 - debug: [FS-LOGGER] Init.
2022-09-05 14:03:31.226 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-09-05 14:03:31.226 - info: [FS-AUTH] Inject auth and api mv into router.
2022-09-05 15:40:10.680 - debug: [FS-LOGGER] Init.
2022-09-05 15:40:11.273 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-09-05 15:40:11.273 - info: [FS-AUTH] Inject auth and api mv into router.

4
api/package.json

@ -5,8 +5,8 @@
"main": "server.js",
"scripts": {
"test": "set DEBUG=true&&\"node_modules/.bin/mocha\" --harmony --reporter spec app/test/*.test.js",
"start": "set NODE_ENV=development&&node server -p 4000 -g postgres://postgres://postgres:123@10.8.30.32:5432/highways4good -f http://localhost:14000 --qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5 --qnsk yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa --qnbkt dev-operational-service --qndmn http://rfkimpwbb.hn-bkt.clouddn.com",
"start:linux": "export NODE_ENV=development&&node server -p 4000 -g postgres://FashionAdmin:123456@10.8.30.39:5432/pm1",
"start": "set NODE_ENV=development&&node server -p 4001 -g postgres://postgres://postgres:123@10.8.30.32:5432/highways4good -f http://localhost:14000 --qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5 --qnsk yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa --qnbkt dev-highways4good --qndmn http://rfkimpwbb.hn-bkt.clouddn.com",
"start:linux": "export NODE_ENV=development&&node server -p 4001 -g postgres://FashionAdmin:123456@10.8.30.39:5432/pm1",
"automate": "sequelize-automate -c sequelize-automate.config.js"
},
"author": "",

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/养护/南昌县农村公路各管养责任单位管养汇总表.xlsx

Binary file not shown.

13
scripts/0.0.1/data/工具脚本(无需执行)/dataIn.js

@ -12,8 +12,8 @@ try {
const pool = new Pool({
user: 'postgres',
host: '10.8.30.32',
// database: 'highways4good',
database: 'highways4good_initd',
database: 'highways4good',
// database: 'highways4good_initd',
password: '123',
port: 5432,
})
@ -26,6 +26,11 @@ try {
await client.query('BEGIN')
const fileList = [
// {
// path: ['./data/养护/南昌县农村公路各管养责任单位管养汇总表.xlsx'],
// n: '养护',
// tableName: 'road_maintenance',
// },
// {
// path: ['./data/道路/村道第三方.xls'],
// n: '道路',
@ -139,14 +144,16 @@ try {
let worksheet = workbook.Sheets[firstSheetName];
let res = XLSX.utils.sheet_to_json(worksheet);
const keyMap = require(`./${f.n}_数据库表对应.json`);
console.log(keyMap);
console.log("keyMap:", keyMap);
for (let d of res) {
let insertStr = `INSERT INTO "${f.tableName}" (`;
let insertKeys = (f.defaultKey || []).concat([]);
let insertValues = (f.defaultValue || []).concat([]);
for (let k in keyMap) {
// 没做判重
let v = d[k];
console.log(v)
if (v) {
insertKeys.push(keyMap[k]);

5
scripts/0.0.1/data/工具脚本(无需执行)/index.js

@ -63,6 +63,11 @@ try {
// 有手动更改 不要轻易再次执行脚本
const fileList = [
// {
// path: './data/养护/南昌县农村公路各管养责任单位管养汇总表.xlsx',
// n: '养护',
// tableName: 'road_maintenance'
// },
// {
// path: './data/道路/县道第三方.xls',
// n: '道路',

21
scripts/0.0.1/data/工具脚本(无需执行)/养护_字段对应.json

@ -0,0 +1,21 @@
{"序号" : "serialNumber",
"管养责任单位" : "responsibleUnitForManagementAndMaintenance",
"养护单位" : "maintenanceUnit",
"管理人员" : "management",
"工人" : "worker",
"公益岗位" : "publicWelfarePost",
"县道" : "countyHighway",
"乡道 " : "townshipRoad",
"村道" : "villageRoad",
"桥梁 " : "bridge"
}

21
scripts/0.0.1/data/工具脚本(无需执行)/养护_数据字段对应.json

@ -0,0 +1,21 @@
{ "serialNumber":"序号",
"responsibleUnitForManagementAndMaintenance":"管养责任单位",
"maintenanceUnit":"养护单位",
"management":"管理人员",
"worker":"工人",
"publicWelfarePost":"公益岗位",
"countyHighway":"县道",
"townshipRoad":"乡道 ",
"villageRoad":"村道",
"bridge":"桥梁 "
}

21
scripts/0.0.1/data/工具脚本(无需执行)/养护_数据库表对应.json

@ -0,0 +1,21 @@
{"序号" : "serial_number",
"管养责任单位" : "responsible_unit_for_management_and_maintenance",
"养护单位" : "maintenance_unit",
"管理人员" : "management",
"工人" : "worker",
"公益岗位" : "public_welfare_post",
"县道" : "county_Highway",
"乡道 " : "township_Road",
"村道" : "village_Road",
"桥梁 " : "bridge"
}

44
scripts/0.0.1/data/工具脚本(无需执行)/养护_数据脚本对应.sql

@ -0,0 +1,44 @@
-- 养护
create table if not exists "road_maintenance"
(
id serial not null
);
create unique index if not exists road_maintenance_id_uindex
on road_maintenance (id);
alter table road_maintenance
add constraint road_maintenance_pk
primary key (id);
alter table road_maintenance add Serial_Number varchar(1024);
comment on column road_maintenance.Serial_Number is '序号';
alter table road_maintenance add Responsible_Unit_For_Management_And_Maintenance varchar(1024);
comment on column road_maintenance.Responsible_Unit_For_Management_And_Maintenance is '管养责任单位';
alter table road_maintenance add Maintenance_Unit varchar(1024);
comment on column road_maintenance.Maintenance_Unit is '养护单位';
alter table road_maintenance add Management varchar(1024);
comment on column road_maintenance.Management is '管理人员';
alter table road_maintenance add Worker varchar(1024);
comment on column road_maintenance.Worker is '工人';
alter table road_maintenance add Public_Welfare_Post varchar(1024);
comment on column road_maintenance.Public_Welfare_Post is '公益岗位';
alter table road_maintenance add County_Highway varchar(1024);
comment on column road_maintenance.County_Highway is '县道';
alter table road_maintenance add Township_Road varchar(1024);
comment on column road_maintenance.Township_Road is '乡道 ';
alter table road_maintenance add Village_Road varchar(1024);
comment on column road_maintenance.Village_Road is '村道';
alter table road_maintenance add Bridge varchar(1024);
comment on column road_maintenance.Bridge is '桥梁 ';

23
scripts/0.0.1/schema/2.init_road_maintenance_cost.sql

@ -0,0 +1,23 @@
-- ----------------------------
-- Table structure for road_maintenance_cost
-- ----------------------------
DROP TABLE IF EXISTS "public"."road_maintenance_cost";
CREATE TABLE "public"."road_maintenance_cost" (
"id" serial NOT NULL,
"mId" int4,
"county_name" varchar(15) COLLATE "pg_catalog"."default",
"road_length_county" float8,
"road_cost_county" numeric(10,2),
"road_length_village" float8,
"road_cost_village" numeric(10,2),
"road_length_township" float8,
"road_cost_township" numeric(10,2),
"maintenance_date" timestamptz(6)
)
;
-- ----------------------------
-- Foreign Keys structure for table road_maintenance_cost
-- ----------------------------
ALTER TABLE "public"."road_maintenance_cost" ADD CONSTRAINT "road_maintenance_cost_mId_fkey" FOREIGN KEY ("mId") REFERENCES "public"."road_maintenance" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION;

25
scripts/1.1.0/data/2.insert_road_maintenance.sql

@ -0,0 +1,25 @@
-- ----------------------------
-- Records of road_maintenance
-- ----------------------------
BEGIN;
INSERT INTO "public"."road_maintenance" ("id", "serial_number", "responsible_unit_for_management_and_maintenance", "maintenance_unit", "management", "worker", "public_welfare_post", "county_highway", "township_road", "village_road", "bridge") VALUES (19, '1', '县交通运输事业发展中心', '南昌旭日公路桥梁工程有限公司', '3', '20', '4', '207.829', NULL, NULL, '26');
INSERT INTO "public"."road_maintenance" ("id", "serial_number", "responsible_unit_for_management_and_maintenance", "maintenance_unit", "management", "worker", "public_welfare_post", "county_highway", "township_road", "village_road", "bridge") VALUES (20, '2', '南新乡人民政府', '鑫洲控股集团股份有限公司', '2', '8', '3', NULL, '93.342', '178.356', '12');
INSERT INTO "public"."road_maintenance" ("id", "serial_number", "responsible_unit_for_management_and_maintenance", "maintenance_unit", "management", "worker", "public_welfare_post", "county_highway", "township_road", "village_road", "bridge") VALUES (21, '3', '蒋巷镇人民政府', '南昌旭日公路桥梁工程有限公司', '4', '20', '2', NULL, '131.394', '165.29', '46');
INSERT INTO "public"."road_maintenance" ("id", "serial_number", "responsible_unit_for_management_and_maintenance", "maintenance_unit", "management", "worker", "public_welfare_post", "county_highway", "township_road", "village_road", "bridge") VALUES (22, '4', '塘南镇人民政府', '江西辉弘欣盛建设工程有限公司', '2', '10', '4', NULL, '67.968', '216.124', '28');
INSERT INTO "public"."road_maintenance" ("id", "serial_number", "responsible_unit_for_management_and_maintenance", "maintenance_unit", "management", "worker", "public_welfare_post", "county_highway", "township_road", "village_road", "bridge") VALUES (23, '5', '泾口乡人民政府', '江西悦美环境治理有限公司', NULL, NULL, NULL, NULL, '105.482', '149.772', '7');
INSERT INTO "public"."road_maintenance" ("id", "serial_number", "responsible_unit_for_management_and_maintenance", "maintenance_unit", "management", "worker", "public_welfare_post", "county_highway", "township_road", "village_road", "bridge") VALUES (24, '6', '幽兰镇人民政府', '南昌贝之鑫建筑工程有限公司', '1', '10', '2', NULL, '57.919', '146.34', '3');
INSERT INTO "public"."road_maintenance" ("id", "serial_number", "responsible_unit_for_management_and_maintenance", "maintenance_unit", "management", "worker", "public_welfare_post", "county_highway", "township_road", "village_road", "bridge") VALUES (25, '7', '塔城乡人民政府', NULL, NULL, NULL, NULL, NULL, '20.591', '87.339', '3');
INSERT INTO "public"."road_maintenance" ("id", "serial_number", "responsible_unit_for_management_and_maintenance", "maintenance_unit", "management", "worker", "public_welfare_post", "county_highway", "township_road", "village_road", "bridge") VALUES (26, '8', '武阳镇人民政府', '江西泰冠建设工程有限公司', '3', '4', '2', NULL, '21.363', '105.94', '7');
INSERT INTO "public"."road_maintenance" ("id", "serial_number", "responsible_unit_for_management_and_maintenance", "maintenance_unit", "management", "worker", "public_welfare_post", "county_highway", "township_road", "village_road", "bridge") VALUES (27, '9', '八一乡人民政府', '江西然镜建筑工程有限公司', '2', '10', '4', NULL, '19.795', '60.038', '8');
INSERT INTO "public"."road_maintenance" ("id", "serial_number", "responsible_unit_for_management_and_maintenance", "maintenance_unit", "management", "worker", "public_welfare_post", "county_highway", "township_road", "village_road", "bridge") VALUES (28, '10', '银三角管委会', NULL, NULL, NULL, NULL, NULL, '10.379', '28.743', '1');
INSERT INTO "public"."road_maintenance" ("id", "serial_number", "responsible_unit_for_management_and_maintenance", "maintenance_unit", "management", "worker", "public_welfare_post", "county_highway", "township_road", "village_road", "bridge") VALUES (29, '11', '莲塘镇人民政府', NULL, NULL, NULL, NULL, NULL, '4.583', '80.429', '1');
INSERT INTO "public"."road_maintenance" ("id", "serial_number", "responsible_unit_for_management_and_maintenance", "maintenance_unit", "management", "worker", "public_welfare_post", "county_highway", "township_road", "village_road", "bridge") VALUES (30, '12', '富山乡人民政府', '江西聚道建筑工程有限公司', '1', '4', NULL, NULL, '37.003', '34.778', '1');
INSERT INTO "public"."road_maintenance" ("id", "serial_number", "responsible_unit_for_management_and_maintenance", "maintenance_unit", "management", "worker", "public_welfare_post", "county_highway", "township_road", "village_road", "bridge") VALUES (31, '13', '冈上镇人民政府', NULL, NULL, NULL, NULL, NULL, '23.67', '107.632', '5');
INSERT INTO "public"."road_maintenance" ("id", "serial_number", "responsible_unit_for_management_and_maintenance", "maintenance_unit", "management", "worker", "public_welfare_post", "county_highway", "township_road", "village_road", "bridge") VALUES (32, '14', '广福镇人民政府', '江西泰地建筑工程有限公司', '2', '4', '4', NULL, '17.729', '105.496', '3');
INSERT INTO "public"."road_maintenance" ("id", "serial_number", "responsible_unit_for_management_and_maintenance", "maintenance_unit", "management", "worker", "public_welfare_post", "county_highway", "township_road", "village_road", "bridge") VALUES (33, '15', '向塘镇人民政府', NULL, NULL, NULL, NULL, NULL, '57.904', '246.382', '14');
INSERT INTO "public"."road_maintenance" ("id", "serial_number", "responsible_unit_for_management_and_maintenance", "maintenance_unit", "management", "worker", "public_welfare_post", "county_highway", "township_road", "village_road", "bridge") VALUES (34, '16', '三江镇人民政府', '庐山白鹿建筑工程有限公司', '2', '7', '1', NULL, '13.119', '71.693', '1');
INSERT INTO "public"."road_maintenance" ("id", "serial_number", "responsible_unit_for_management_and_maintenance", "maintenance_unit", "management", "worker", "public_welfare_post", "county_highway", "township_road", "village_road", "bridge") VALUES (35, '17', '黄马乡人民政府', NULL, NULL, NULL, NULL, NULL, '47.703', '138.547', '5');
INSERT INTO "public"."road_maintenance" ("id", "serial_number", "responsible_unit_for_management_and_maintenance", "maintenance_unit", "management", "worker", "public_welfare_post", "county_highway", "township_road", "village_road", "bridge") VALUES (36, '18', '金湖管理处', '江西聚道建筑工程有限公司', '1', '2', NULL, NULL, '/', '15.161', '/');
COMMIT;

76
t --hard

@ -0,0 +1,76 @@
2adac9cb (HEAD -> dev) HEAD@{0}: reset: moving to HEAD^^^
e5135673 (origin/dev_backup) HEAD@{1}: reset: moving to HEAD^^
020d4eda (origin/dev) HEAD@{2}: reset: moving to HEAD
020d4eda (origin/dev) HEAD@{3}: reset: moving to HEAD
020d4eda (origin/dev) HEAD@{4}: commit: 12151
d13b52a9 HEAD@{5}: reset: moving to HEAD
d13b52a9 HEAD@{6}: pull --tags origin dev: Fast-forward
2d649d8e HEAD@{9}: pull --tags origin dev: Merge made by the 'ort' strategy.
1a9dd433 HEAD@{10}: commit: 清除log
a9d12cd8 HEAD@{11}: pull --tags origin dev: Merge made by the 'ort' strategy.
8573588e HEAD@{12}: commit: 五分钟刷新
39b8e12b HEAD@{13}: pull --tags origin dev: Fast-forward
6aba4d7a HEAD@{14}: pull --tags origin dev: Merge made by the 'ort' strategy.
2e6dc29a HEAD@{15}: commit: 提交
283a16ae HEAD@{16}: pull --tags origin dev: Merge made by the 'ort' strategy.
590ec5dd HEAD@{17}: commit: 提交
8eb418ae HEAD@{19}: commit: 日期去掉了日,加上了百分号
bf01c153 HEAD@{20}: commit: 提交
76ad089b HEAD@{21}: pull --tags origin dev: Merge made by the 'ort' strategy.
45f58fda HEAD@{22}: commit: 代码提交
d9079d38 HEAD@{23}: commit: 提交日期处理
8e0048ac HEAD@{24}: pull --tags origin dev: Fast-forward
c1607d94 HEAD@{25}: pull --tags origin dev: Fast-forward
670dcf18 HEAD@{26}: pull --tags origin dev: Merge made by the 'ort' strategy.
ec02aeb9 HEAD@{27}: commit: nan优化
974e3c67 HEAD@{28}: commit: 换成定位了
a61dc4e9 HEAD@{29}: pull --tags origin dev: Fast-forward
d77627f9 HEAD@{30}: pull --tags origin dev: Merge made by the 'ort' strategy.
01ef6b5a HEAD@{31}: commit: 柱体问题解决
e9424d3e HEAD@{32}: pull --tags origin dev: Merge made by the 'ort' strategy.
c276432d HEAD@{33}: commit: 样式和颜色提交
45c415e6 (origin/release_0.0.4) HEAD@{34}: pull --tags origin dev: Fast-forward
79723f61 HEAD@{35}: commit: 线条
9c81764c HEAD@{36}: pull --tags origin dev: Merge made by the 'ort' strategy.
3f398ea2 HEAD@{37}: commit: 提交bug
502b068d HEAD@{38}: pull --tags origin dev: Merge made by the 'ort' strategy.
7a5b8b64 HEAD@{39}: commit: 提交
aeff1fe5 HEAD@{40}: commit: 路由修改
11da9451 HEAD@{41}: pull --tags origin dev: Merge made by the 'ort' strategy.
ed7ab5a8 HEAD@{42}: commit: 完成
06063067 HEAD@{43}: pull --tags origin dev: Merge made by the 'ort' strategy.
755a333f HEAD@{44}: commit: 接口调用
2b153823 HEAD@{45}: pull --tags origin dev: Merge made by the 'ort' strategy.
f0558530 HEAD@{46}: commit: 路政统计
50eb042e HEAD@{47}: pull --tags origin dev: Merge made by the 'ort' strategy.
a1dfeddb HEAD@{48}: commit: 提交鼠标移出事件
5469d9df HEAD@{49}: commit (merge): Merge branch 'dev' of https://gitea.anxinyun.cn/gao.zhiyuan/Highways4Good into dev
49a0b5d7 HEAD@{50}: commit: 提交
11279671 HEAD@{51}: commit: 提交领导驾驶舱
3919e2c3 HEAD@{52}: pull --tags origin dev: Merge made by the 'ort' strategy.
b9302fdf HEAD@{53}: commit: 提交代码
79328f49 HEAD@{54}: commit (merge): Merge branch 'dev' of https://gitea.anxinyun.cn/gao.zhiyuan/Highways4Good into dev
c6a3b352 HEAD@{55}: commit: 提交样式
14ed5747 HEAD@{56}: pull --tags origin dev: Fast-forward
80e11974 HEAD@{57}: pull --tags origin dev: Merge made by the 'ort' strategy.
a561e62b HEAD@{58}: commit (merge): Merge branch 'dev' of https://gitea.anxinyun.cn/gao.zhiyuan/Highways4Good into dev
163ce6c1 HEAD@{59}: commit: 提交left.less的更改
4de26fc7 HEAD@{60}: pull: Fast-forward
4a1ae175 HEAD@{61}: pull --tags origin dev: Fast-forward
e7a01d52 HEAD@{62}: commit (merge): Merge branch 'dev' of https://gitea.anxinyun.cn/gao.zhiyuan/Highways4Good into dev
c7e7cd4c HEAD@{63}: commit: 提交领导驾驶舱
fc3f2a92 HEAD@{64}: commit (merge): Merge branch 'dev' of https://gitea.anxinyun.cn/gao.zhiyuan/Highways4Good into dev
f166aa29 HEAD@{65}: commit: 领导驾驶舱提交代码
e6030bcf HEAD@{66}: commit: 上传
b299cd97 HEAD@{67}: pull --tags origin dev: Merge made by the 'ort' strategy.
69e7f3b6 HEAD@{68}: commit: 删除冗余,提交
a74afb8f HEAD@{69}: commit: 文件
68c13e99 HEAD@{70}: commit: 文件上传
dacf49b4 HEAD@{71}: commit: 文件上传
1190cc0d HEAD@{72}: commit (merge): Merge branch 'dev' of https://gitea.anxinyun.cn/gao.zhiyuan/Highways4Good into dev
0c57a227 HEAD@{73}: commit: 头部样式完成
8ab4f5f2 HEAD@{74}: pull --tags origin dev: Merge made by the 'ort' strategy.
50714cbf HEAD@{75}: commit: 公共组件图标样式修改
34413ac0 HEAD@{76}: commit: test
eee5aedf HEAD@{77}: commit: test
cbdfefa3 (master) HEAD@{79}: clone: from https://gitea.anxinyun.cn/gao.zhiyuan/Highways4Good.git

25
web/Dockerfile

@ -1,25 +1,12 @@
FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node:12-dev as builder
#FROM node:12-alpine
FROM repository.anxinyun.cn/base-images/nodejs12:20.10.12.2
MAINTAINER liuxinyi "liu.xinyi@free-sun.com.cn"
COPY . /var/app
WORKDIR /var/app
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 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:12
COPY --from=builder --chown=node /var/app /home/node/app
WORKDIR /home/node/app
EXPOSE 5000
CMD ["node", "server.js"]
ENTRYPOINT [ "node", "server.js" ]

BIN
web/client/assets/images/zhexian.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

BIN
web/client/assets/images/zhuzhuang.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

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

@ -1,5 +1,6 @@
import { basicAction } from '@peace/utils'
import { ApiTable } from '$utils'
import { Request } from '@peace/utils'
export function getDepMessage() {
return dispatch => basicAction({
@ -162,7 +163,7 @@ export function getHighways(query) {
query: query,
actionType: 'GET_HIGHWAYS',
url: ApiTable.getHighways,
msg: { error: '获取路政信息失败' },
msg: { error: '获取设施统计信息失败' },
});
}
@ -173,7 +174,7 @@ export function putHighways(query) {
data: query,
actionType: 'GET_HIGHWAYS',
url: ApiTable.putHighways,
msg: { option: '编辑路政信息' },
msg: { option: '编辑设施统计信息' },
});
}
@ -390,3 +391,47 @@ export function putShippingList(query) {
msg: { option: '编辑货运信息' },
});
}
//获取管养单位概况
export function getCustodyunit() {
return dispatch => basicAction({
type: 'get',
dispatch: dispatch,
actionType: 'GET_CUSTODY_UNIT',
url: ApiTable.getCustodyunit,
msg: { error: '获取管养单位概况失败' },
reducer: { name: 'roadMaintenances_management' }
});
}
export function getCustodyunitOne(query) {
return dispatch => basicAction({
type: 'get',
query:query,
dispatch: dispatch,
actionType: 'GET_CUSTODY_UNIT_ONE',
url: ApiTable.getCustodyunit,
msg: { error: '获取管养单位概况失败' },
// reducer: { name: 'roadMaintenances_management' }
});
}
export function postCustodyunit(query) {
return dispatch => basicAction({
type: 'post',
data: query,
dispatch: dispatch,
actionType: 'POST_CUSTODY_UNIT',
url: ApiTable.postCustodyunit,
msg: { option: '编辑管养单位概况' },
// reducer: { name: 'roadMaintenances' }
});
}
export function getxiuyangas(query) {
return dispatch => basicAction({
type: 'get',
query,
dispatch: dispatch,
actionType: 'GET_XIUYANG',
url: ApiTable.getXiuyang,
msg: { error: '获取信息失败' },
reducer: { name: 'xiuyang' }
});
}

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

@ -1825,7 +1825,6 @@ const BrideTable = (props) => {
total: res.payload.data ? res.payload.data.count : 0
}
}
}}
search={{
defaultCollapsed: false,

113
web/client/src/sections/fillion/components/highways/guanli.js

@ -0,0 +1,113 @@
import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { Form, Spin, Table } from 'antd';
import { ModalForm, ProForm, ProFormText, ProFormSelect } from '@ant-design/pro-form';
import { putOperaTional, postCustodyunit, getCustodyunitOne,getxiuyangas } from "../../actions/infor"
import _ from 'lodash'
const Guanli = (props) => {
const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd, setDelet } = props
const [success, setSuccess] = useState()
useEffect(() => {
return () => {
setRecortd()
}
}, [setRecortd])
return (
<Spin spinning={false}>
{/* {
newlysay ? */}
<ModalForm
width={'90rem'}
visible={visible}
onVisibleChange={onVisibleChange}
onFinish={(values) => {
setDelet(values)
const query = { ...values, id: recortd?.id, serialNumber: recortd?.id }
dispatch(postCustodyunit(query)).then((res) => {
if (res.success === true) {
let date = { fourceUpdate: false }
dispatch(getxiuyangas(date)).then((res) => {
})
}
})
return true
}}
initialValues={recortd}
>
<ProForm.Group>
<ProFormText
name='responsibleUnitForManagementAndMaintenance'
width="md"
label='管养责任单位'
placeholder="请输入管养责任单位"
disabled
/><ProFormText
name='maintenanceUnit'
width="md"
label='养护单位'
placeholder="请输入养护单位"
/><ProFormText
name='management'
width="md"
label='管理人员'
placeholder="请输入管理人员"
/><ProFormText
name='worker'
width="md"
label='工人'
placeholder="请输入工人"
/><ProFormText
name='publicWelfarePost'
width="md"
label='公益岗位'
placeholder="请输入公益岗位"
/><ProFormText
name='countyHighway'
width="md"
label='县道'
placeholder="请输入县道"
/><ProFormText
name='townshipRoad'
width="md"
label='乡道'
placeholder="请输入乡道"
/><ProFormText
name='villageRoad'
width="md"
label='村道'
placeholder="请输入村道"
/><ProFormText
name='bridge'
width="md"
label='桥梁'
placeholder="请输入桥梁"
/>
</ProForm.Group>
</ModalForm>
</Spin>
)
}
function mapStateToProps(state) {
const { depMessage } = state;
const pakData = (dep) => {
return dep.map((d) => {
return {
title: d.name,
value: d.id,
children: pakData(d.subordinate)
}
})
}
let depData = pakData(depMessage.data || [])
return {
loading: depMessage.isRequesting,
depData,
};
}
export default connect(mapStateToProps)(Guanli);

27
web/client/src/sections/fillion/components/highways/highwaysdata.js

@ -1,13 +1,13 @@
import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { Form, Spin, Table } from 'antd';
import { ModalForm, ProForm, ProFormText,ProFormSelect } from '@ant-design/pro-form';
import { putOperaTional,putHighways,putShippingList } from "../../actions/infor"
import { ModalForm, ProForm, ProFormText, ProFormSelect } from '@ant-design/pro-form';
import { putOperaTional, putHighways } from "../../actions/infor"
import _ from 'lodash'
const HightModal = (props) => {
const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd,setDelet } = props
const [success,setSuccess]=useState()
const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd, setDelet } = props
const [success, setSuccess] = useState()
useEffect(() => {
return () => {
@ -26,25 +26,17 @@ const HightModal = (props) => {
onFinish={(values) => {
if (rewkeys === 'passenger') {
setDelet(values)
const query = { ...values, id:recortd?.id }
const query = { ...values, id: recortd?.id }
dispatch(putOperaTional(query)).then((res) => {
setSuccess(res.success)
})
return true
} if (rewkeys === 'freight') {
setDelet(values)
const query = { ...values, id:recortd?.id }
dispatch(putShippingList(query)).then((res) => {
setSuccess(res.success)
})
return true
}
if (rewkeys === 'highways') {
setDelet(values)
const query = { ...values, id:recortd?.id }
const query = { ...values, id: recortd?.id }
dispatch(putHighways(query)).then((res) => {
setSuccess(res.success)
})
@ -75,9 +67,10 @@ const HightModal = (props) => {
placeholder="请输入数量"
rules={[
{required: true,
message:'请输入整数',
pattern:RegExp(/^[0-9]\d*$/,'g'),
{
required: true,
message: '请输入整数',
pattern: RegExp(/^[0-9]\d*$/, 'g'),
},
// getValueFromEvent=(event)=>{

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

@ -1,27 +1,34 @@
import React, { useEffect, useState,useRef } from 'react';
import React, { useEffect, useState, useRef } from 'react';
import { connect } from 'react-redux';
import { Spin, Button, Popconfirm, Badge } from 'antd';
import { Spin, Button, Popconfirm } from 'antd';
import ProTable from '@ant-design/pro-table';
import './protable.less'
import { getHighways } from "../actions/infor"
import { getRoadway, getHighways, getCustodyunit, delProject } from "../actions/infor"
import HightModal from './highways/highwaysdata';
import Guanli from './highways/guanli';
const HigwaysTable = (props) => {
const { dispatch, user, } = props
const TransporTationTable = (props) => {
const { dispatch, user, depData, depMessage, depLoading } = props
const [rowSelected, setRowSelected] = useState([])
const [sitename, setSitename] = useState()//名称
const [counts, setCounts] = useState()//shuju
const [modalVisible, setModalVisible] = useState(false);
const [modalVisibleyilan, setModalVisibleyilan] = useState(false);
const [modalVisibleyilans, setModalVisibleyilans] = useState(false);
const [modalRecord, setModalRecord] = useState();
const [typecard, setTypecard] = useState();
const [activeKey, setActiveKey] = useState('tab1');
const [recortd, setRecortd] = useState()
const [sitename, setSitename] = useState()//桥梁名称
const [whichofits, setWhichofits] = useState('sheshi')
const [delet, setDelet] = useState()
const [differentiate, setDifferentiate] = useState('road')
const [grade, setGrade] = useState('县')
const ref = useRef()
useEffect(() => { ref.current.reload() }, [ delet])
//打开弹窗
const hightModal = (type, record) => {
useEffect(() => { ref.current.reload() }, [whichofits, delet])
//打开弹窗
const hightModal = (type, record) => {
setModalVisibleyilan(true);
// setModalType(type);
if (type == 'edit') {
@ -29,9 +36,18 @@ const hightModal = (type, record) => {
} else {
setModalRecord(null);
}
}
const columns =
[
}
const yilanModal = (type, record) => {
setModalVisibleyilans(true);
// setModalType(type);
if (type == 'edit') {
setModalRecord(record);
} else {
setModalRecord(null);
}
}
const columns = {
tab1: [
{
title: '类型',
dataIndex: 'placeName',
@ -45,7 +61,7 @@ const hightModal = (type, record) => {
setSitename(value.currentTarget.value)
},
placeholder: '请输入类型进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
},
render: (dom, record) => {
return record.name
@ -84,18 +100,199 @@ const hightModal = (type, record) => {
}
},
],
tab2: [
{
title: '管养责单位',
dataIndex: 'placeName',
fixed: 'left',
width: 120,
options: 1,
search: false,
backgroundColor: "#ffffff",
fieldProps: {
onChange: (value, cs) => {
setSitename(value.currentTarget.value)
},
placeholder: '请输入项目名称进行搜索',
},
render: (dom, record) => {
return record.responsibleUnitForManagementAndMaintenance
},
},
{
title: '养护单位',
search: false,
dataIndex: 'time1',
valueType: 'dateRange',
// fixed: 'left',
width: 120,
render: (dom, record) => {
return record.maintenanceUnit
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}
},
{
title: '管理人员(人)',
search: false,
dataIndex: 'time2',
valueType: 'dateRange',
// align: 'right',
width: 120,
render: (dom, record) => {
return record.management
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}
},
{
title: '工人(人)',
search: false,
dataIndex: 'time3',
valueType: 'dateRange',
width: 120,
render: (dom, record) => {
return record.worker
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}
}, {
title: '公益岗位(人)',
search: false,
dataIndex: 'time4',
valueType: 'dateRange',
width: 120,
render: (dom, record) => {
return record.publicWelfarePost
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}
}, {
title: '县道(km)',
search: false,
dataIndex: 'time5',
valueType: 'dateRange',
width: 120,
render: (dom, record) => {
return record.countyHighway
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}
}, {
title: '乡道(km)',
search: false,
dataIndex: 'time6',
valueType: 'dateRange',
width: 120,
render: (dom, record) => {
return record.townshipRoad
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}
}, {
title: '村道(km)',
search: false,
dataIndex: 'time7',
valueType: 'dateRange',
width: 120,
render: (dom, record) => {
return record.villageRoad
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}
}, {
title: '桥梁(座)',
search: false,
dataIndex: 'time8',
valueType: 'dateRange',
width: 120,
render: (dom, record) => {
return record.bridge
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}
},
{
title: '操作',
dataIndex: 'creatTime',
valueType: 'dateTimeRange',
hideInSearch: true,
width: 160,
fixed: 'right',
render: (dom, record) => {
return <div><Button type="link"
onClick={() => {
yilanModal('edit', record)
setTypecard('compile')
setRecortd(record)
}}
>编辑</Button></div>
}
},
]
}
return (
<Spin spinning={false}>
<div className='protable-transpor'>
<ProTable
actionRef={ref}
scroll={{ x: 800 }}
options={false}
toolbar={{
multipleLine: true,
menu: {
activeKey,
onChange: (key) => setActiveKey(key),
items: [
{
key: 'tab1',
label: <span onClick={() => {
setWhichofits('sheshi')
setDifferentiate('bridge')
}}>设施统计{activeKey === 'tab1'}</span>,
},
{
key: 'tab2',
label: <span onClick={() => {
setWhichofits('guanli')
setDifferentiate('project')
}}>管养统计{activeKey === 'tab2'}</span>,
},
],
},
}}
form={{
submitter:false
submitter: false
}}
// ref={c => { finishedProductTable = c; }}
scroll={{ x: 800 }}
options={false}
ref={c => { finishedProductTable = c; }}
style={{ width: "100% ", overflow: "auto", height: '760px' }}
rowKey='id'
onReset={(v) => {
@ -107,23 +304,50 @@ const hightModal = (type, record) => {
// setRowSelected(selectedRowKeys);
// },
// }}
columns={columns}
columns={columns[activeKey]}
dataSource={counts || []}
request={async (params) => {
console.log(whichofits)
if (whichofits == 'sheshi') {
const query = {
name:sitename
}
setRowSelected([]);
const res = await dispatch(getHighways(query));
// console.log(res)
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}
} if (whichofits == 'guanli') {
const query = {
}
setRowSelected([]);
const res = await dispatch(getCustodyunit(query));
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}
}
}}
search={{
defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(),
// <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected,grade,differentiate) }}>
// <Button
// >
// 导出
// </Button>
// </Popconfirm>
],
}}
>
</ProTable></div>
</ProTable>
</div>
{modalVisibleyilan ? <HightModal
visible={modalVisibleyilan}
onVisibleChange={setModalVisibleyilan}
@ -134,9 +358,30 @@ const hightModal = (type, record) => {
setRecortd={setRecortd}
setDelet={setDelet}
/> : ''}
{modalVisibleyilans ? <Guanli
visible={modalVisibleyilans}
onVisibleChange={setModalVisibleyilans}
modalRecord={modalRecord}
typecard={typecard}
rewkeys={'guanli'}
recortd={recortd}
setRecortd={setRecortd}
setDelet={setDelet}
/> : ''}
</Spin >
)
}
const data = [
{ name: "管养责任单位", type: 'responsibleUnitForManagementAndMaintenance' },
{ name: "养护单位", type: 'maintenanceUnit' },
{ name: "管理人员", type: 'management' },
{ name: "工人", type: 'worker' },
{ name: "公益岗位", type: 'publicWelfarePost' },
{ name: "县道", type: 'countyHighway' },
{ name: "乡道", type: 'townshipRoad' },
{ name: "村道", type: 'villageRoad' },
{ name: "桥梁", type: 'bridge' },
]
function mapStateToProps(state) {
const { auth, depMessage } = state;
const pakData = (dep) => {
@ -157,4 +402,4 @@ function mapStateToProps(state) {
depData,
};
}
export default connect(mapStateToProps)(HigwaysTable);
export default connect(mapStateToProps)(TransporTationTable);

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

@ -3785,7 +3785,10 @@ const TransporTationTable = (props) => {
columns={columns[activeKey]}
dataSource={counts || []}
request={async (params) => {
console.log(whichofits)
if (whichofits == '县') {
console.log('differentiate','我我我我吧')
const query = {
level: '县',
road: sitename

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

@ -15,7 +15,7 @@ export function getNavItem(user, dispatch) {
<Link to="/fillion/bridge">桥梁管理</Link>
</Menu.Item>
<Menu.Item key="fillionhighways">
<Link to="/fillion/highways">路政管理</Link>
<Link to="/fillion/highways">管养管理</Link>
</Menu.Item>
<Menu.Item key="fillionoperational">
<Link to="/fillion/operational">运政管理</Link>

2
web/client/src/sections/fillion/routes.js

@ -44,7 +44,7 @@ export default [{
key: 'fillionhighways',
menuSelectKeys: ['fillionhighways'],
component: HigHways,
breadcrumb: '路政管理',
breadcrumb: '管养管理',
}, {
path: '/operational',
key: 'fillionoperational',

11
web/client/src/sections/quanju/actions/example.js

@ -146,3 +146,14 @@ export function getRoadMaintenanceList() {
reducer: { name: 'roadMaintenances' }
});
}
//获取管养单位概况
export function getCustodyunit() {
return dispatch => basicAction({
type: 'get',
dispatch: dispatch,
actionType: 'GET_CUSTODY_UNIT',
url: ApiTable.getCustodyunit,
msg: { error: '获取管养单位概况失败' },
// reducer: { name: 'roadMaintenances' }
});
}

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

@ -25,3 +25,24 @@ export function getRoadMaintenances() {
reducer: { name: 'RoadMaintenances' }
});
}
export function getxiuyang(query) {
return dispatch => basicAction({
type: 'get',
query,
dispatch: dispatch,
actionType: 'GET_XIUYANG',
url: ApiTable.getXiuyang,
msg: { error: '获取信息失败' },
reducer: { name: 'xiuyang' }
});
}
export function getMaintenance() {
return dispatch => basicAction({
type: 'get',
dispatch: dispatch,
actionType: 'GET_MAINTENANCE',
url: ApiTable.getMaintenance,
msg: { error: '获取养护费用信息失败' },
// reducer: { name: 'xiuyang' }
});
}

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

@ -2,15 +2,17 @@ import React, { useEffect, useState } from 'react'
import Left from './left'
import Right from './right'
import { connect } from 'react-redux'
import moment from 'moment';
import { getdaolutongji } from '../../../actions/example'
import { getHighways, getRoadMaintenances } from './action'
import { getHighways, getRoadMaintenances, getxiuyang,getMaintenance } from './action'
const Conserve = (props) => {
const [roadData, setRoadData] = useState()
const [highwaysData, setHighwaysData] = useState()
const [roadMaintenances, setRoadMaintenances] = useState()
const [data, setData] = useState()
const [shuju, setShuju] = useState()
const [loading, setLoading] = useState(true)
const { dispatch } = props
@ -19,18 +21,27 @@ const Conserve = (props) => {
setLoading(false)
setRoadData(res.payload.data || {})
})
dispatch(getHighways()).then(res =>{
dispatch(getHighways()).then(res => {
setHighwaysData(res.payload.data || [])
})
dispatch(getRoadMaintenances()).then(res =>{
dispatch(getRoadMaintenances()).then(res => {
setRoadMaintenances(res.payload.data || [])
})
dispatch(getxiuyang()).then(res => {
setData(res.payload.data.filter(item => {
if (moment(item.maintenanceDate).format("MM") == (new Date().getMonth() < 10 ? "0" + new Date().getMonth() : new Date().getMonth())) {
return item
}
}))
})
dispatch(getMaintenance()).then(res => {
setShuju(res.payload.data)
})
}, [])
return (
<div style={{ width: '100%', height: '100%', }}>
<Left roadData={roadData} loading={loading} />
<Right highwaysData={highwaysData} roadMaintenances={roadMaintenances}/>
<Left roadData={roadData} loading={loading} data={data} shuju={shuju} />
<Right highwaysData={highwaysData} roadMaintenances={roadMaintenances} />
</div>
)
}

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

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

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

@ -0,0 +1,101 @@
import React, { useState, useEffect } from 'react'
import Module from '../../../public/module'
import { Spin } from 'antd'
import Lun from "../../leadership/right/lunbo"
import "../../leadership/right/left.less"
import { getZhichaodata } from "../../../../actions/example"
const Lefttbottoms = (props) => {
const { data } = props
const style = { height: "28%", marginTop: "4%" }
const [beijing, setBeijing] = useState()
const [rightDatas, setrightDatas] = useState([])
const [nums, setNums] = useState([])
const [num, setNum] = useState()
const datas=data?.filter((item)=>{
return item.maintenanceUnit!==null
})
// const requestRightDatas = async () => {
// const res = await dispatch(getZhichaodata())
// var pattern = /[\u4e00-\u9fa5]*/;
// let d = res.payload.data?.overSpeeddata?.filter((item, index) => {
// return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false
// })
// console.log(res);
// 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)
// setdata(d)
// }
// useEffect(() => {
// const zhichaodata = dispatch(getZhichaodata()).then((res) => {
// setNums(res.payload?.data?.processed)
// })
// requestRightDatas()
// }, [])
const renderBody = () => {
return (
<div style={{ width: "100%", height: "50%" }}>
{datas?.map((item, index) => {
return <li style={{ width: "100%", height: "3vh", marginTop: "5px", position: "relative", }} onMouseEnter={() => {
setBeijing(index)
setNum(index)
}} onMouseLeave={() => {
setBeijing()
setNum()
}}>
{beijing == index ? <img src='/assets/images/leadership/bei.png' style={{ width: "100%", height: "100%", position: "absolute" }} /> : ""}
<div style={{ width: "25%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "3%", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }}>{item.maintenanceUnit}</div>
<div style={{ width: "12%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "33%" }}>{item.management||'--'}</div>
<div style={{ width: "12%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "52%" }}>{item.worker||'--'}</div>
<div style={{ width: "12%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "70%" }}>{item.publicWelfarePost||'--'}</div>
{/* <div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "76%" }}>{item.qiao}</div> */}
{/* {
num == index ? <div style={{ position: "fixed", width: "400px", height: "200px", zIndex: 100, left: "55%", marginTop: "0", top: "78%" }}>
<img src='/assets/images/leadership/beijinglan.png' style={{ width: "100%", height: "100%" }} />
<div style={{ position: "absolute", top: "0", width: "50%", padding: "20px" }}>
<img src='/assets/images/leadership/yuanxing.png' style={{ width: "100%", height: "100%" }} />
<p style={{ color: "#09BAFF", position: "absolute", top: "42%", left: "27%", fontSize: "29px", fontFamily: "YouSheBiaoTiHei" }}>{item.overrunRate ? item.overrunRate + "%" : "--"}</p>
<p style={{ color: "rgba(216,240,255,0.8)", position: "absolute", top: "60%", left: "43%", fontSize: "14px" }}>超限</p>
</div>
<div style={{ position: "absolute", top: "0", width: "50%", left: "50%", paddingRight: "10px" }}>
<p style={{ color: "rgba(216,240,255,0.8)", marginTop: "10px", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>车牌号<span style={{ color: "#EEF4FF", marginLeft: "33px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{item.danwei}</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>检测点<span style={{ color: "#EEF4FF", marginLeft: "30px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{item.xian}</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>处罚<span style={{ color: "#FF0001", marginLeft: "50px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{item.xiang}</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>日期<span style={{ color: "#EEF4FF", marginLeft: "50px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{item.cun}</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>日期<span style={{ color: "#EEF4FF", marginLeft: "50px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{item.qiao}</span></p>
</div>
</div> : ""
} */}
</li>
})
}
</div>
)
}
return (
<>
<div style={{ width: "90%", height: "3vh", backgroundColor: "rgba(21,77,160,0.2)", position: "relative", left: "5%", top: "5%" }}>
<p style={{ width: "35%", fontSize: "12px", color: "#FFFFFF", height: "100%", textAlign: "center", position: "absolute", lineHeight: "3vh", left: "-5%" }}>养护单位</p>
<p style={{ width: "25%", fontSize: "12px", color: "#FFFFFF", height: "100%", textAlign: "center", position: "absolute", lineHeight: "3vh", left: "30%" }}>管理人员</p>
<p style={{ width: "20%", fontSize: "12px", color: "#FFFFFF", height: "100%", textAlign: "center", position: "absolute", lineHeight: "3vh", left: "54%" }}>工人</p>
<p style={{ width: "25%", fontSize: "12px", color: "#FFFFFF", height: "100%", textAlign: "center", position: "absolute", lineHeight: "3vh", left: "73%" }}>公益岗位</p>
{/* <p style={{ width: "20%", fontSize: "12px", color: "#FFFFFF", height: "100%", textAlign: "center", position: "absolute", lineHeight: "3vh", left: "82%" }}>桥梁(座)</p> */}
</div>
<Lun
content={renderBody()}
containerStyle={{ position: "relative", height: "80%", width: "100%", left: "5%", top: "8%" }}
divHeight={"100%"}
divId={"screen-slope-midde-tops"}
/>
</>
)
}
export default Lefttbottoms

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

@ -1,6 +1,9 @@
import React from 'react'
import React,{useState,useEffect} from 'react'
import Module from '../../../public/module'
import PieChart from '../chart/pie-chart';
import Lefttbottoms from "./Lb"
import { getCustodyunit } from "../../../../actions/example"
import { connect } from 'react-redux';
let color = [
"rgba(7,185,254,1)",
@ -13,6 +16,14 @@ let underColor = [
"rgba(4,251,240,0.5)",
]
const LeftBottom = (props) => {
const { dispatch, actions, user, loading } = props
const [data,setStata]=useState()
useEffect(()=>{
dispatch(getCustodyunit()).then((res)=>{
setStata(res.payload.data)
})
},[true])
const style = { height: "31%", marginTop: "3%" }
const { roadData } = props
const list = roadData?.greenMileage || {}
@ -28,13 +39,13 @@ const LeftBottom = (props) => {
}
})
let colorList = value?.map(c =>c.colorList)
let underColorList = value?.map(c =>c.underColorList)
let colorList = value?.map(c => c.colorList)
let underColorList = value?.map(c => c.underColorList)
return (
<>
<Module style={style} title={"已绿化里程统计"}>
<PieChart
<Module style={style} title={"养护单位概况"}>
{/* <PieChart
data={value}
width='100%'
height='100%'
@ -44,9 +55,17 @@ const LeftBottom = (props) => {
textLeft={'20%'}
numLeft={'14.5%'}
underColorList={underColorList}
/>
/> */}
<Lefttbottoms data={data}/>
</Module>
</>
)
}
export default LeftBottom
function mapStateToProps(state) {
const { auth } = state;
return {
user: auth.user,
}
}
export default connect(mapStateToProps)(LeftBottom)

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

@ -1,239 +1,36 @@
import { Col, Row } from 'antd'
import React from 'react'
import { useEffect, useRef } from 'react'
import { useEffect, useRef, useState } from 'react'
import Module from '../../../public/module'
import * as echarts from 'echarts';
import ZheXian from "./zhexin"
import PieChart from "./shituzujian"
import Lunbo from './lunbo';
const LeftCenter = (props) => {
const { data, shuju } = props
const style = { height: "31%", marginTop: "3%" }
const chartRef = useRef(null);
const { roadData } = props
const data = roadData?.greenMileage || {}
const grad = Object.keys(data).map(g => g + '级可绿化里程') || []
const value = Object.values(data)?.map(s => s.canBeGreen.toFixed(3))
let totalData = value?.reduce((pre, cur) => Number(pre) + Number(cur), 0) || 0
let max = Math.max.apply(Math, value) + 10 || 0
useEffect(() => {
let chartInstance = echarts.init(chartRef.current);
let colorArray = [
{
top: "#07B9FE",
bottom: "#10274B",
},
{
top: "#1978E5",
bottom: " #10274B",
},
{
top: "#1978E5",
bottom: "#10274B",
},
];
const option = {
tooltip: {
show: true,
trigger: "axis",
axisPointer: {
type: "none",
},
formatter: "{b}:{c}",
},
grid: {
left: "5%",
top: "12%",
right: "1%",
bottom: "8%",
width: '100%',
containLabel: true,
},
xAxis: {
type: "value",
show: true,
position: "bottom",
axisTick: {
show: true,
interval: 2,
lineStyle: {
color: "rgba(176,215,255,0.25)",
// type: "dashed",
},
},
axisLine: {
show: false,
lineStyle: {
color: "rgba(216,240,255,0.8000)",
},
},
axisLabel: {
interval: 2
},
splitLine: {
show: true,
lineStyle: {
color: "rgba(176,215,255,0.25)",
type: "dashed",
},
},
},
yAxis: [
{
type: "category",
axisTick: {
show: false,
alignWithLabel: false,
length: 5,
},
splitLine: {
//网格线
show: false,
},
inverse: true, //排序
axisLine: {
show: false,
lineStyle: {
color: "rgba(176,215,255,0.8)",
},
},
zlevel: 100,
data: grad,
},
{
type: "category",
axisTick: {
show: false,
alignWithLabel: false,
length: 5,
},
splitLine: {
//网格线
show: false,
},
axisLabel: {
show: true,
backgroundColor: {
image: '/assets/images/quanju/kelvhua_bdbg.png',
},
width: 70,
height: 22,
color: '#D8F0FF',
margin: 40,
verticalAlign: 'middle',
align: 'center',
textShadowColor: '#1AD0FF',
textShadowBlur: 6,
fontSize: 14
// formatter:(f) =>{console.log('f:',f);}
},
inverse: true, //排序
axisLine: {
show: false,
lineStyle: {
color: "rgba(176,215,255,0.8)",
},
},
data: value,
},
],
series: [
{
name: '背景',
type: "bar",
barWidth: 3,
barGap: "100%",
barCategoryGap: "50%",
color: "#15356E",
data: [max, max, max],
tooltip: {
show: false,
},
},
{
name: "",
type: "bar",
zlevel: 1,
barWidth: 3,
barGap: "-100%",
barCategoryGap: "50%",
data: value,
label: {
show: true,
position: 'right', // 位置
fontSize: 12,
lineHeight: 13,
distance: -2,
verticalAlign: "middle",
formatter: [
'{a| }',
].join(''), // 这里是数据展示的时候显示的数据
rich: {
a: {
backgroundColor: {
image: '/assets/images/quanju/circle2.png'
},
width: 15,
height: 15,
align: 'left',
verticalAlign: "center",
}
}
},
itemStyle: {
normal: {
show: true,
color: function (params) {
return {
type: "linear",
colorStops: [
{
offset: 0,
color: colorArray[params.dataIndex].bottom,
},
{
offset: 1,
color: colorArray[params.dataIndex].top,
},
],
// globalCoord: false,
};
},
barBorderRadius: 70,
borderWidth: 0,
borderColor: "#333",
},
},
emphasis: {
disabled: true //禁止移入柱子改变颜色
}
},
],
};
chartInstance.setOption(option);
window.addEventListener('resize', () => {
if (chartInstance) {
chartInstance.resize()
}
})
}, [roadData]);
// const chartRef = useState();
// const { roadData } = props
const [flag, setFlag] = useState(true)
// const [colorFlage, setColorFlage] = useState(true)
return (
<>
<Module style={style} title={"可绿化里程统计"}>
<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 }}>可绿化里程总数</span>
</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>
<Module style={style} title={"各乡镇养护里程及费用"}>
<div onClick={() => {
setFlag(false)
}} style={{ position: "absolute", top: "38.5%", left: "80%", width: "50px", height: "20px", background: "linear-gradient(270deg, rgba(15,74,159,0) 0%, rgba(17,75,160,0.95) 100%)", float: "right", textAlign: "center", zIndex: 100, marginRight: "4%", borderLeft: "solid 2px #6E7A83" }} >
{/* <img /> */}
<p style={{ color: "rgba(216,240,255,0.8000)", fontSize: "0.4vh", lineHeight: "20px",/* position: "absolute", top: "0px" */ color:`${flag?'rgba(216,240,255,0.8000)':'#07b9fe'}`,marginTop:0}}>累计</p></div>
<div onClick={() => {
setFlag(true)
}} style={{ position: "absolute", width: "50px", left: "60%", top: "38.5%", height: "20px", background: "linear-gradient(270deg, rgba(15,74,159,0) 0%, rgba(17,75,160,0.95) 100%)", float: "right", textAlign: "center", zIndex: 100, marginRight: "2%", borderLeft: "solid 2px #6E7A83", }}>
{/* <img /> */}
<p style={{ color: "rgba(216,240,255,0.8000)", fontSize: "0.4vh", lineHeight: "20px",/* position: "absolute", top: "0px" */ color:`${flag?'#07b9fe':'rgba(216,240,255,0.8000)'}`}} >上月</p></div >
{
flag ? <Lunbo data={data} /> : <ZheXian shuju={shuju} />
}
</Module>
</>
)

396
web/client/src/sections/quanju/containers/footer/conserve/left/left-top.js

@ -1,202 +1,213 @@
import React, { useEffect, useRef } from 'react';
import React, { useEffect, useRef,useState } from 'react';
import Module from '../../../public/module'
import * as echarts from 'echarts';
import { Badge, Spin } from 'antd';
import Leftbottom from "./lunbozujian"
import { getCustodyunit } from "../../../../actions/example"
import { connect } from 'react-redux';
const LeftTop = (props) => {
const seasonChartRef = useRef(null);
const frequentlyChartRef = useRef(null);
const { roadData,loading } = props
let total = roadData?.curingPeriod?.frequent + roadData?.curingPeriod?.season
useEffect(() => {
let chartInstance = echarts.init(seasonChartRef.current);
const seasonOption = {
tooltip: {
show: true
},
title: [
{
text: "季节性",
x: "center",
top: "55%",
textStyle: {
color: "#E9F7FF",
fontSize: 14,
},
},
{
text: roadData?.curingPeriod?.season || 0,
x: "center",
y: "35%",
textStyle: {
fontSize: "30",
color: "#FFFFFF",
fontFamily: "YouSheBiaoTiHei",
},
},
],
polar: {
radius: ["60%", "68%"],
center: ["50%", "50%"],
},
grid: {
left: "5%",
top: "12%",
right: "1%",
bottom: "8%",
containLabel: true,
},
angleAxis: {
max: total || 0,
show: false,
},
radiusAxis: {
type: "category",
show: true,
axisLabel: {
show: false,
},
axisLine: {
show: false,
},
axisTick: {
show: false,
},
},
series: [
{
name: "",
type: "bar",
roundCap: true,
barWidth: 30,
showBackground: true,
data: [{ value: roadData?.curingPeriod?.season || 0, name: '季节性' }],
coordinateSystem: "polar",
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 0,
color: "#AAC8FF",
},
{
offset: 1,
color: "#0041BB",
},
]),
},
},
},
],
};
chartInstance.setOption(seasonOption);
window.addEventListener('resize', () => {
if (chartInstance) {
chartInstance.resize()
}
const { dispatch, actions, user, loading } = props
const [data,setStata]=useState()
useEffect(()=>{
dispatch(getCustodyunit()).then((res)=>{
setStata(res.payload.data)
})
}, [roadData])
useEffect(() => {
let chartInstance = echarts.init(frequentlyChartRef.current);
},[true])
// const seasonChartRef = useRef(null);
const frequentlyOption = {
tooltip: {
show: true,
trigger: "item",
},
title: [
{
text: "经常性",
x: "center",
top: "55%",
textStyle: {
color: "#E9F7FF",
fontSize: 14,
},
},
{
text: roadData?.curingPeriod?.frequent || 0,
x: "center",
y: "35%",
textStyle: {
fontSize: "30",
color: "#FFFFFF",
fontFamily: "YouSheBiaoTiHei",
},
},
],
polar: {
radius: ["60%", "68%"],
center: ["50%", "50%"],
},
grid: {
left: "10%",
top: "12%",
right: "1%",
bottom: "8%",
width: '70%',
containLabel: true,
},
angleAxis: {
max: total || 0,
show: false,
},
radiusAxis: {
type: "category",
show: true,
axisLabel: {
show: false,
},
axisLine: {
show: false,
},
axisTick: {
show: false,
},
},
series: [
{
name: "",
type: "bar",
roundCap: true,
barWidth: 30,
showBackground: true,
data: [{ value: roadData?.curingPeriod?.frequent || 0, name: '经常性' }],
coordinateSystem: "polar",
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 0,
color: "#C5EFFF",
},
{
offset: 1,
color: "#07B9FE",
},
]),
},
},
},
// const frequentlyChartRef = useRef(null);
// const { roadData, loading } = props
// let total = roadData?.curingPeriod?.frequent + roadData?.curingPeriod?.season
// useEffect(() => {
// let chartInstance = echarts.init(seasonChartRef.current);
// const seasonOption = {
// tooltip: {
// show: true
// },
// title: [
// {
// text: "季节性",
// x: "center",
// top: "55%",
// textStyle: {
// color: "#E9F7FF",
// fontSize: 14,
// },
// },
// {
// text: roadData?.curingPeriod?.season || 0,
// x: "center",
// y: "35%",
// textStyle: {
// fontSize: "30",
// color: "#FFFFFF",
// fontFamily: "YouSheBiaoTiHei",
// },
// },
// ],
// polar: {
// radius: ["60%", "68%"],
// center: ["50%", "50%"],
// },
// grid: {
// left: "5%",
// top: "12%",
// right: "1%",
// bottom: "8%",
// containLabel: true,
// },
// angleAxis: {
// max: total || 0,
// show: false,
// },
// radiusAxis: {
// type: "category",
// show: true,
// axisLabel: {
// show: false,
// },
// axisLine: {
// show: false,
// },
// axisTick: {
// show: false,
// },
// },
// series: [
// {
// name: "",
// type: "bar",
// roundCap: true,
// barWidth: 30,
// showBackground: true,
// data: [{ value: roadData?.curingPeriod?.season || 0, name: '季节性' }],
// coordinateSystem: "polar",
// itemStyle: {
// normal: {
// color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
// {
// offset: 0,
// color: "#AAC8FF",
// },
// {
// offset: 1,
// color: "#0041BB",
// },
// ]),
// },
// },
// },
// ],
// };
// chartInstance.setOption(seasonOption);
// window.addEventListener('resize', () => {
// if (chartInstance) {
// chartInstance.resize()
// }
// })
// }, [roadData])
// useEffect(() => {
// let chartInstance = echarts.init(frequentlyChartRef.current);
],
};
chartInstance.setOption(frequentlyOption);
window.addEventListener('resize', () => {
if (chartInstance) {
chartInstance.resize()
}
})
}, [roadData])
// const frequentlyOption = {
// tooltip: {
// show: true,
// trigger: "item",
// },
// title: [
// {
// text: "经常性",
// x: "center",
// top: "55%",
// textStyle: {
// color: "#E9F7FF",
// fontSize: 14,
// },
// },
// {
// text: roadData?.curingPeriod?.frequent || 0,
// x: "center",
// y: "35%",
// textStyle: {
// fontSize: "30",
// color: "#FFFFFF",
// fontFamily: "YouSheBiaoTiHei",
// },
// },
// ],
// polar: {
// radius: ["60%", "68%"],
// center: ["50%", "50%"],
// },
// grid: {
// left: "10%",
// top: "12%",
// right: "1%",
// bottom: "8%",
// width: '70%',
// containLabel: true,
// },
// angleAxis: {
// max: total || 0,
// show: false,
// },
// radiusAxis: {
// type: "category",
// show: true,
// axisLabel: {
// show: false,
// },
// axisLine: {
// show: false,
// },
// axisTick: {
// show: false,
// },
// },
// series: [
// {
// name: "",
// type: "bar",
// roundCap: true,
// barWidth: 30,
// showBackground: true,
// data: [{ value: roadData?.curingPeriod?.frequent || 0, name: '经常性' }],
// coordinateSystem: "polar",
// itemStyle: {
// normal: {
// color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
// {
// offset: 0,
// color: "#C5EFFF",
// },
// {
// offset: 1,
// color: "#07B9FE",
// },
// ]),
// },
// },
// },
// ],
// };
// chartInstance.setOption(frequentlyOption);
// window.addEventListener('resize', () => {
// if (chartInstance) {
// chartInstance.resize()
// }
// })
// }, [roadData])
const style = { height: "31%", marginTop: "3%" }
return (
<Module style={style} title={"路段养护周期统计"}>
<div style={{ position: 'relative', width: '100%', height: '100%' }}>
<Module style={style} title={"管养单位概况"}>
{/* <div style={{ position: 'relative', width: '100%', height: '100%' }}>
<div style={{ width: '100%', height: '100%', display: 'flex', padding: '3%' }}>
<div ref={seasonChartRef} style={{ width: "50%" }}>
@ -216,8 +227,19 @@ const LeftTop = (props) => {
top: '66%',
zIndex: 999
}} />
</div>
</div> */}
{/* <div style={{ height: "100%" }}> */}
<Leftbottom data={data}/>
{/* </div> */}
</Module>
)
}
export default LeftTop
function mapStateToProps(state) {
const { auth } = state;
return {
user: auth.user,
}
}
export default connect(mapStateToProps)(LeftTop)

7
web/client/src/sections/quanju/containers/footer/conserve/left/lun.less

@ -0,0 +1,7 @@
.dian{
// width: 9.09%;
height: 100%;
// background-color: pink;
float: left;
}

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

@ -0,0 +1,110 @@
import React, { useEffect, useRef, useState } from 'react';
import Module from '../../../public/module'
import * as echarts from 'echarts';
import { Badge, Spin } from 'antd';
import Leftbottom from "./lunbozujian"
import PieChart from "./shituzujian"
import Lun from "./zidong"
import { back } from 'koa-convert';
import "./lun.less"
import { getxiugai } from "../action/index"
const Lunbo = (props) => {
const { data } = props
if (!data || !data.length) {
return ''
}
console.log(data)
const style = { height: "31%", marginTop: "3%" }
const [list, setList] = useState([])
const [num, setNum] = useState({ value: 0 })
const [falg, setFalg] = useState(2)
const [namedata, setNamedata] = useState()
const [state, setState] = useState([
{ value: data ? data[0].roadLengthCounty || 0 : 0, name: "县道" },
{ value: data ? data[0].roadLengthTownship || 0 : 0, name: "乡道" },
{ value: data ? data[0].roadLengthVillage || 0 : 0, name: "村道" },
])
const [mon, setMon] = useState([
{ value: data ? data[0].roadCostCounty || 0 : 0, name: "县费用" },
{ value: data ? data[0].roadCostTownship || 0 : 0, name: "乡费用" },
{ value: data ? data[0].roadCostVillage || 0 : 0, name: "村费用" }
])
const [lenght, setLenght] = useState(data ? data.length : "")
const ref = useRef()
const renderBody = (num) => {
setState([{ value: data ? data[num].roadLengthCounty || 0 : 0, name: "县道" }, { value: data ? data[num].roadLengthTownship || 0 : 0, name: "乡道" }, { value: data ? data[num].roadLengthVillage || 0 : 0, name: "村道" }])
setMon([
{ value: data ? data[num].roadCostCounty || 0 : 0, name: "县费用" },
{ value: data ? data[num].roadCostTownship || 0 : 0, name: "乡费用" },
{ value: data ? data[num].roadCostVillage || 0 : 0, name: "村费用" }
])
}
const timerStart = () => {
clearTimer()
ref.current = setTimeout(() => {
let n_num = { value: num.value + 1 }
if (num.value >= (data?.length - 1)) {
setNum({ value: 1 })
renderBody(1)
} else {
if (num.value == 1) {
renderBody(2)
} else {
renderBody(num.value + 1)
}
setNum(n_num)
}
// renderBody(num.value)
}, 5000)
}
const dianji = (num) => {
renderBody(num)
}
useEffect(() => {
renderBody(0)
timerStart()
return () => {
clearTimer()
}
}, [num])
// renderBody(num.value)
const clearTimer = () => {
if (ref.current) {
clearTimeout(ref.current)
ref.current = null
}
}
return (
<div onMouseOver={clearTimer}
onMouseOut={timerStart}
style={{}}
>
<div></div>
<div style={{position:'absolute',color:'#ffffff',top:'45%',left:'59%',fontSize:24,fontFamily: 'YouSheBiaoTiHei',}}>{data[num.value].countyName}</div>
<PieChart state={state} num={num.value} mon={mon} namedata={namedata} />
<div style={{ width: "90%", height: "1.5vh", backgroundColor: "rgba(176,215,255,0.12)", marginLeft: "5%", position: "absolute", bottom: "36%" }}>
{
data ? data.map((item, index) => {
return <div className='dian' style={{
width: (1 / data?.length) * 100 + "%",
// marginLeft: (100 / data ? data.lenght : 10) * index - (100 / data ? data.lenght : 10) + "%",
backgroundColor: num.value == index ? "rgba(25,138,229,0.4)" : "rgba(176,215,255,0.12)",
borderLeft: num.value == index ? "5px #0992FF solid" : "rgba(176,215,255,0.12)",
borderRight: num.value == index ? "5px #0992FF solid" : "rgba(176,215,255,0.12)"
}} onClick={() => {
setNum({ value: index })
dianji(index)
}}></div>
}) : ""
}
</div>
</div>
)
}
export default Lunbo

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

@ -0,0 +1,99 @@
import React, { useState, useEffect } from 'react'
import Module from '../../../public/module'
import { Spin } from 'antd'
import Lun from "../../leadership/right/lunbo"
import "../../leadership/right/left.less"
import { getZhichaodata } from "../../../../actions/example"
const Lefttbottom = (props) => {
const { data } = props
const style = { height: "28%", marginTop: "4%" }
const [beijing, setBeijing] = useState()
// const [data, setdata] = useState(data)
const [rightDatas, setrightDatas] = useState([])
const [nums, setNums] = useState([])
const [num, setNum] = useState()
// const requestRightDatas = async () => {
// const res = await dispatch(getZhichaodata())
// var pattern = /[\u4e00-\u9fa5]*/;
// let d = res.payload.data?.overSpeeddata?.filter((item, index) => {
// return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false
// })
// console.log(res);
// 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)
// setdata(d)
// }
// useEffect(() => {
// const zhichaodata = dispatch(getZhichaodata()).then((res) => {
// setNums(res.payload?.data?.processed)
// })
// requestRightDatas()
// }, [])
const renderBody = () => {
return (
<div style={{ width: "100%", height: "50%" }}>
{data?.map((item, index) => {
return <li style={{ width: "100%", height: "3vh", marginTop: "5px", position: "relative", }} onMouseEnter={() => {
setBeijing(index)
setNum(index)
}} onMouseLeave={() => {
setBeijing()
setNum()
}}>
{beijing == index ? <img src='/assets/images/leadership/bei.png' style={{ width: "100%", height: "100%", position: "absolute" }} /> : ""}
<div style={{ width: "20%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "3%", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }}>{item.responsibleUnitForManagementAndMaintenance}</div>
<div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "23%" }}>{item.countyHighway||'--'}</div>
<div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "40%" }}>{item.townshipRoad||'--'}</div>
<div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "58%" }}>{item.villageRoad||'--'}</div>
<div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "76%" }}>{item.bridge||'--'}</div>
{/* {
num == index ? <div style={{ position: "fixed", width: "400px", height: "200px", zIndex: 100, left: "55%", marginTop: "0", top: "78%" }}>
<img src='/assets/images/leadership/beijinglan.png' style={{ width: "100%", height: "100%" }} />
<div style={{ position: "absolute", top: "0", width: "50%", padding: "20px" }}>
<img src='/assets/images/leadership/yuanxing.png' style={{ width: "100%", height: "100%" }} />
<p style={{ color: "#09BAFF", position: "absolute", top: "42%", left: "27%", fontSize: "29px", fontFamily: "YouSheBiaoTiHei" }}>{item.overrunRate ? item.overrunRate + "%" : "--"}</p>
<p style={{ color: "rgba(216,240,255,0.8)", position: "absolute", top: "60%", left: "43%", fontSize: "14px" }}>超限</p>
</div>
<div style={{ position: "absolute", top: "0", width: "50%", left: "50%", paddingRight: "10px" }}>
<p style={{ color: "rgba(216,240,255,0.8)", marginTop: "10px", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>车牌号<span style={{ color: "#EEF4FF", marginLeft: "33px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{item.danwei}</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>检测点<span style={{ color: "#EEF4FF", marginLeft: "30px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{item.xian}</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>处罚<span style={{ color: "#FF0001", marginLeft: "50px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{item.xiang}</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>日期<span style={{ color: "#EEF4FF", marginLeft: "50px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{item.cun}</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>日期<span style={{ color: "#EEF4FF", marginLeft: "50px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{item.qiao}</span></p>
</div>
</div> : ""
} */}
</li>
})
}
</div>
)
}
return (
<>
<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", left: "-3%" }}>管养责任单位</p>
<p style={{ width: "20%", fontSize: "12px", color: "#FFFFFF", height: "100%", textAlign: "center", position: "absolute", lineHeight: "3vh", left: "25%" }}>县道km</p>
<p style={{ width: "20%", fontSize: "12px", color: "#FFFFFF", height: "100%", textAlign: "center", position: "absolute", lineHeight: "3vh", left: "44%" }}>乡道km</p>
<p style={{ width: "20%", fontSize: "12px", color: "#FFFFFF", height: "100%", textAlign: "center", position: "absolute", lineHeight: "3vh", left: "63%" }}>村道km</p>
<p style={{ width: "20%", fontSize: "12px", color: "#FFFFFF", height: "100%", textAlign: "center", position: "absolute", lineHeight: "3vh", left: "82%" }}>桥梁</p>
</div>
<Lun
content={renderBody()}
containerStyle={{ position: "relative", height: "80%", width: "100%", left: "5%", top: "8%" }}
divHeight={"100%"}
divId={"screen-slope-midde-top"}
/>
</>
)
}
export default Lefttbottom

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

@ -0,0 +1,168 @@
import React,{useState} from 'react'
import { useEffect, useRef } from 'react';
import * as echarts from 'echarts';
import _ from 'lodash';
const PieChart = (props) => {
const { width, height, datas, colorList, underColorList, total, text, textLeft, numLeft, state, num, mon,namedata } = props
const chartRef = useRef(null);
const [styloptr,setStyloptr]=useState()//费用
const [extent,setExtent]=useState()//长度
let states = []
let monstate=[]
useEffect(()=>{
// state.map((item) => {
// states.push({ name: item.name, value: Math.round(item.value * 100) / 100 })
// })
let arr=null
state.map((item)=>{
arr+=item.value
setExtent(arr.toFixed(3))
})
let aui=null
mon.map((item)=>{
aui+=Number(item.value)
setStyloptr(Math.ceil(aui))
})
},[num])
const data = [
{ value: styloptr, name: "金额", bgColor: "#1d2c44", progressColor: "#9494ff",clr:'元' },
{ value: extent, name: "里程", bgColor: "#2a303a", progressColor: "#f8be15",clr:'km' },
];
useEffect(() => {
let states=[]
state.map((item)=>{
states.push({value:item.value.toFixed(3),name:item.name})
})
let mons=[]
mon.map((item)=>{
mons.push({value:Math.ceil(item.value),name:item.name})
})
let chartInstance = echarts.init(chartRef.current);
const option = {
tooltip: {
trigger: "item",
formatter: "{a}{b}: {c} ({d}%)",
show: true,
},
legend: {
orient: "vertical",
right: "5%",
bottom: "15%",
// width: "260px",
// formatter: (name) => {
// for (let i = 0; i < option.series[1].data.length; i += 1) {
// if (name === option.series[1].data[i].name) {
// let arr = [`{a|${name}}`, `{b|${option.series[1].data[i].value}}`]
// return arr.join('\t');
// }
// }
show:false,
} ,
series: [
{
name: "",
type: "pie",
// selectedMode: "single",
color: ["rgba(4, 251, 240, 1)", "rgba(7, 185, 254, 1)", "rgba(28, 96, 254, 1)"],
radius: [0, "50%"],
center: ['30%', '50%'],
label: {
normal: {
position: "inner",
show: false,
// formatter: "{a}{b}: {c} ({d}%)",
},
},
labelLine: {
normal: {
// show: false,
},
},
data: states,
},
{
name: "",
type: "pie",
radius: ["65%", "75%"],
center: ['30%', '50%'],
avoidLabelOverlap: false,
color: ["rgba(4, 251, 240, 1)", "rgba(7, 185, 254, 1)", "rgba(28, 96, 254, 1)"],
data: mons,
label: {
normal: {
// formatter: "{b}:{c}km" + "\n\r" + "({d}%)",
show: false,
position: "left",
},
emphasis: {
show: false,
textStyle: {
fontSize: "30",
fontWeight: "bold",
},
},
},
labelLine: {
normal: {
// show: false,
},
},
},
],
};
chartInstance.setOption(option);
window.addEventListener('resize', () => {
if (chartInstance) {
chartInstance.resize()
}
})
}, [num])
return (
<div >
<div ref={chartRef} style={{ width: '100%', height: '23vh',position:'relative' }}></div>
<div style={{position:'absolute',top:'53%',left:'59%',flexWrap:' wrap'}}>{data?.map((item, index) => {
// let bgWid = (c.value / number * 100).toFixed(2) + '%'
const { progressColor} = item;
return (
<div style={{ marginBottom: 20 }} key={index}>
<div
style={{
position: "relative",
display: "flex",
width: 250,
}}
>
<div
style={{
position: "absolute",
height: 10,
width: 10,
top: 5,
backgroundColor: progressColor,
}}
></div>
<div style={{ marginLeft: 20,color:'#ffffff' }}>{item.name}</div>
<div style={{ marginLeft: 10 ,color:'#ffffff'}}>{item.value}</div>
<div style={{ marginLeft: 10 ,color:'#ffffff'}}>{item.clr}</div>
</div>
</div>
);
})}</div>
</div>
)
}
export default PieChart

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

@ -0,0 +1,282 @@
import React from 'react'
import { useEffect, useRef, useState } from 'react';
import * as echarts from 'echarts';
import { Col, Row } from 'antd'
import moment from 'moment';
const ZheXian = (props) => {
const { shuju } = props
if (!shuju || !shuju.length) {
return ''
}
const style = { height: "31%", marginTop: "3%" }
const chartRef = useRef();
const zhuzhuang='../../../../../../assets/images/zhuzhuang.png'
const zhexian='../../../../../../assets/images/zhexian.png'
useEffect(() => {
}, [true])
useEffect(() => {
let columnar = []
shuju?.map((item) => {
let adhn=item?.roadLengthCounty + item?.roadLengthTownship + item?.roadLengthVillage
columnar.push(adhn.toFixed(3))
})
columnar.reverse()
let broken=[]
shuju?.map((item) => {
console.log(Number(item?.roadCostCounty))
broken.push(Math.ceil(Number(item?.roadCostCounty) + Number(item?.roadCostTownship) + Number(item?.roadCostVillage)))
})
broken.reverse()
let date = new Date()
let year = date.getFullYear()
let month = date.getMonth() + 1
let newYear = 0
let newMonth = 0
let newDateArr = []
for (let i = 0; i < 7; i++) { //这里是获取前六个月,所以循环6次,根据需要修改
if (month - i < 1) { //这里的判断是如果当前月份往前推到了去年 需要做的处理
newYear = year - 1
newMonth = month - i + 12 >= 10 ? month - i + 12 : '0' + (month - i + 12)
newDateArr.push(newYear + '-' + newMonth) //这里拼接格式化,在时间中间加了个-,根据实际需求来
} else {
newMonth = month - i >= 10 ? month - i : '0' + (month - i) //这里是对月份小于10做加前面加0处理
newDateArr.push(year + '-' + newMonth)
}
}
newDateArr.splice(0, 1)
newDateArr.reverse()
let chartInstance = echarts.init(chartRef.current);
const option = {
// backgroundColor: "#344b58",
title: {
x: "4%",
textStyle: {
color: "#fff",
fontSize: "22",
},
subtextStyle: {
color: "#90979c",
fontSize: "16",
},
},
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
textStyle: {
color: "#fff",
},
},
formatter: function (params, ticket, callback) {
var res = params[0].name;
for (var i = 0, l = params.length; i < l; i++) {
if (params[i].seriesType === "line") {
res +=
"<br/>" +
params[i].seriesName +
" : " +
(params[i].value ? params[i].value : "-") +
"元";
} else {
res +=
"<br/>" +
params[i].seriesName +
" : " +
(params[i].value ? params[i].value : "-") +
"km";
}
}
return res;
},
},
grid: {
borderWidth: 0,
top: 60,
bottom: 10,
right: 20,
left: 20,
textStyle: {
color: "#fff",
},
containLabel: true,
},
legend: {
x: "60%",
top: "5%",
textStyle: {
color: "#90979c",
},
show: false,
},
calculable: true,
xAxis: [
{
type: "category",
axisLine: {
lineStyle: {
color: "rgba(216,240,255,0.8)",
},
},
splitLine: {
show: false,
},
axisTick: {
show: false,
},
splitArea: {
show: false,
},
axisLabel: {
interval: 0,
},
data: newDateArr,
},
],
yAxis: [
{
type: "value",
splitLine: {
show: true,
position: "right",
lineStyle: {
color: "rgba(176,215,255,0.2500)",
type: "dashed",
},
},
axisLine: {
lineStyle: {
color: "rgba(216,240,255,0.800)",
},
},
axisTick: {
show: false,
},
axisLabel: {
interval: 0,
},
splitArea: {
show: false,
},
},
{
type: "value",
min: 0,
splitLine: {
show: true,
lineStyle: {
color: "rgba(176,215,255,0.2500)",
type: "dashed",
},
},
axisLine: {
lineStyle: {
color: "rgba(216,240,255,0.800)",
},
},
axisTick: {
show: false,
},
axisLabel: {
interval: 0,
},
splitArea: {
show: false,
},
},
],
series: [
{
name: "里程",
type: "bar",
barWidth: 20,
yAxisIndex: 1,
itemStyle: {
normal: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(0,213,255)", // 0% 处的颜色
},
{
offset: 1,
color: "rgba(0,213,255,0.2)", // 100% 处的颜色
},
],
global: false, // 缺省为 false
},
barBorderRadius: 0,
},
},
data: columnar||[],
},
{
name: "费用",
type: "line",
symbolSize: 10,
symbol: "circle",
itemStyle: {
normal: {
color: "#1978E5",
barBorderRadius: 0,
label: {
show: true,
position: "top",
textStyle: {
color: "#D8F0FF",
},
formatter: function (p) {
return p.value > 0 ? p.value : "";
},
},
},
},
lineStyle: {
normal: {
width: 2,
color: "#1978E5",
},
},
data: broken,
},
],
};
chartInstance.setOption(option);
window.addEventListener('resize', () => {
if (chartInstance) {
chartInstance.resize()
}
})
}, []);
return (
<div style={{ width: '100%' }}>
<div /* onClick={() => {
setFlag(!flag)
console.log(flag);
}} */ style={{ position: "absolute", top: "38.5%", left: "14%", width: "72px", height: "20px", backgroundColor: "rgba(216,240,255,0.1000)", float: "right", textAlign: "center", zIndex: 100, marginRight: "4%", borderLeft: "solid 2px #6E7A83" }} >
<img style={{marginBottom:4,marginLeft:-32}} src={zhexian} />
<p style={{ color: "rgba(216,240,255,0.8000)", fontSize: "0.4vh", lineHeight: "20px", position: "absolute", top: "0px",marginLeft:36 }}></p></div>
<div /* onClick={() => {
setFlag(false)
}} */style={{ position: "absolute", width: "72px", left: "34%", top: "38.5%", height: "20px", backgroundColor: "rgba(216,240,255,0.1000)", float: "right", textAlign: "center", marginRight: "4%", borderLeft: "solid 2px #6E7A83" }}>
<img style={{marginBottom:4,marginLeft:-32}} src={zhuzhuang}/>
<p style={{ color: "rgba(216,240,255,0.8000)", fontSize: "0.4vh", lineHeight: "20px", position: "absolute", top: "0px",marginLeft:36 }} >km</p></div >
<div ref={chartRef} style={{ width: '100%', height: '23vh' }}></div>
</div>
)
}
export default ZheXian

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

@ -0,0 +1,139 @@
'use strict'
import React, { Component } from 'react';
import { Row, Col } from 'antd';
export default class AutoRollComponent extends Component {
constructor(props) {
super(props);
this.scrollElem = null;
this.stopscroll = false;
this.preTop = 0;
this.cloneEle = null;
this.currentTop = 0;
this.marqueesHeight = 0;
this.interval = null;
this.state = {
enabledScroll: false
}
}
get enabledScroll() {
let scrollElem = document.getElementById(this.props.divId);
let fatherElem = scrollElem?.parentNode || null;
if (scrollElem && fatherElem) {
return scrollElem.scrollHeight > fatherElem.scrollHeight
}
return false;
}
marque = (height) => {
try {
this.scrollElem = document.getElementById(this.props.divId);
this.marqueesHeight = height;
if (this.scrollElem) {
this.scrollElem.style.height = this.marqueesHeight;
this.scrollElem.style.overflow = 'hidden';
}
this.repeat();
} catch (e) { }
}
repeat = () => {
this.scrollElem.scrollTop = 0;
let offset = 1.5
this.interval = setInterval(() => {
if (this.stopscroll) return;
this.currentTop = this.currentTop + offset;
this.preTop = this.scrollElem.scrollTop;
this.scrollElem.scrollTop = this.scrollElem.scrollTop + offset;
// console.log(`this.scrollElem.scrollTop:${this.scrollElem.scrollTop} === this.preTop:${this.preTop}`);
if (this.preTop === this.scrollElem.scrollTop) {
this.scrollElem.scrollTop = this.marqueesHeight;
this.scrollElem.scrollTop = this.scrollElem.scrollTop + offset;
}
}, 40);
}
componentWillUnmount() {
clearInterval(this.interval);
}
componentWillReceiveProps(nextProps) {
requestAnimationFrame(() => {
if (this.enabledScroll) {
if (!this.state.enabledScroll) {
this.setState({ enabledScroll: true }, () => {
this.marque(10)
})
}
}
})
}
componentDidMount() {
if (this.enabledScroll) {
this.setState({ enabledScroll: true }, () => {
this.marque(10)
})
}
}
onMouseOver = () => {
this.stopscroll = true;
}
onMouseOut = () => {
this.stopscroll = false;
}
render() {
const { changeStyleCol, heads, spans, data, divId, divHeight, content, containerStyle = {} } = this.props;
return (
<div style={{ ...containerStyle, textAlign: 'left' }}>
{
heads ?
<Row style={{ lineHeight: '40px', height: 40 }}>
{heads.map((c, index) => {
return <Col span={spans[index]} key={index}>{c}</Col>
})
}
</Row> : ''
}
<div id={divId} style={{ overflow: 'hidden', height: divHeight }} onMouseOver={this.onMouseOver} onMouseOut={this.onMouseOut}>
<div>
{content ? content : ''}
{this.state.enabledScroll && content ? content : ''}
{
data ?
data.map((q, idx) => {
return (
<div key={idx}>
<Row gutter={16} style={{ borderBottom: '0px solid grey' }}>
{heads.map((c, index) => {
return <Col span={spans[index]} key={index} style={{ paddingTop: 8, textAlign: 'left', wordBreak: 'break-word', color: `${c === changeStyleCol ? q.changeColor : ''}` }}>
{index == 1 ? q.data[index] == -1 ? "-" : q.data[index] : index == 2 ? q.data[1] == -1 ? '-' : q.data[index] : q.data[index]}</Col>
})
}
</Row>
</div>
)
}) : ''
}
<div style={{ margin: 16 }}></div>
</div>
</div>
</div >
)
}
}

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

@ -13,7 +13,7 @@ const Footer = ({ tabKey, dispatch }) => {
case 'build':
return <Build />
case 'conserve':
return <Conserve />
return <Conserve dispatch={dispatch} />
case "leadership":
return <Leadership dispatch={dispatch} />
case "guanli":

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

@ -4,6 +4,7 @@ import { getRoadmaintain, getdaolutongji } from "../../../../actions/example"
import moment from 'moment'
import Hua from "./hudong"
import { Spin } from 'antd'
import Lunbo from "../right"
const Right = (props) => {
const { dispatch } = props

184
web/client/src/sections/quanju/containers/footer/leadership/centerleft/huadong.js

@ -0,0 +1,184 @@
import React, { Component } from 'react';
import './left.less';
class ReactCarousel extends Component {
chunk(arr, size) {
var arr1 = new Array();
for (var i = 0; i < Math.ceil(arr.length / size); i++) {
arr1[i] = new Array();
}
var j = 0;
var x = 0;
for (var i = 0; i < arr.length; i++) {
if (!((i % size == 0) && (i != 0))) {
arr1[j][x] = arr[i];
x++;
// console.log("j=" + j + " " + "x=" + x);
} else {
j++;
x = 0;
// console.log("else:" + "j=" + j + " " + "x=" + x);
arr1[j][x] = arr[i];
// console.log(arr1);
x++;
}
}
return arr1;
}
constructor() {
super();
this.state = {
shuzu: [{ name: "南昌县迎宾大道管制路段", images: "/assets/images/leadership/shiyantu.png" },
{ name: "南昌县迎宾大道管制路段2", images: "/assets/images/leadership/shiyantu.png" },
{ name: "南昌县迎宾大道管制路段3", images: "/assets/images/leadership/shiyantu.png" },
{ name: "南昌县迎宾大道管制路段4", images: "/assets/images/leadership/shiyantu.png" },
{ name: "南昌县迎宾大道管制路段", images: "/assets/images/leadership/shiyantu.png" },
{ name: "南昌县迎宾大道管制路段", images: "/assets/images/leadership/shiyantu.png" },
{ name: "南昌县迎宾大道管制路段", images: "/assets/images/leadership/shiyantu.png" },
{ name: "南昌县迎宾大道管制路段", images: "/assets/images/leadership/shiyantu.png" },
{ name: "南昌县迎宾大道管制路段", images: "/assets/images/leadership/shiyantu.png" }],
imgs: [],
showIndex: 0, //显示第几个图片
timer: null, // 定时器
show: false, // 前后按钮显示
// arr1: ""
}
// console.log(this.state.imgs);
this.state.imgs = this.chunk((this.state.shuzu), 4)
}
render() {
return (
<div className="ReactCarousel" style={{ width: "100%", height: "100%" }}>
<div className="contain"
onMouseEnter={() => { this.stop() }} //鼠标进入停止自动播放
onMouseLeave={() => { this.start() }} //鼠标退出自动播放
>
<ul className="ul">
{
this.state.imgs.map((value, index) => {
return (
<li style={{ position: "relative", left: "8%", width: "100%", height: "100%", top: "-5%", fontSize: "12px" }} className={index === this.state.showIndex ? 'show' : ''}
key={index}
>
<div style={{ width: "45%", height: "40%", backgroundColor: "red", position: "absolute", left: "-3%", top: "5%" }}>
<div style={{ width: "100%", height: "100%", position: "absolute", top: "80%" }}>
<div style={{ width: "100%", height: "20%", backgroundColor: "rgba(0,0,0,0.6)", overflow: "hiddden", textOverflow: "ellipsis", whiteSpace: "nowrap" }}>
<img src='/assets/images/leadership/weizhis.png' style={{ width: "6%", height: "80%", marginLeft: "3%", marginRight: "3%" }} />
{value[0]?.name}
</div>
</div>
</div>
{value[1]?.name ? <div style={{ width: "45%", height: "40%", backgroundColor: "#fff", position: "absolute", left: "45%", top: "5%" }}>
<div style={{ width: "100%", height: "100%", position: "absolute", top: "80%" }}>
<div style={{ width: "100%", height: "20%", backgroundColor: "rgba(0,0,0,0.6)", overflow: "hiddden", textOverflow: "ellipsis", whiteSpace: "nowrap" }}>
<img src='/assets/images/leadership/weizhis.png' style={{ width: "6%", height: "80%", marginLeft: "3%", marginRight: "3%" }} />
{value[1]?.name}
</div>
</div>
</div> : ""}
{value[2]?.name ? <div style={{ width: "45%", height: "40%", backgroundColor: "bule", position: "absolute", left: "-3%", top: "49%" }}>
<div style={{ width: "100%", height: "100%", position: "absolute", top: "80%" }}>
<div style={{ width: "100%", height: "20%", backgroundColor: "rgba(0,0,0,0.6)", overflow: "hiddden", textOverflow: "ellipsis", whiteSpace: "nowrap" }}>
<img src='/assets/images/leadership/weizhis.png' style={{ width: "6%", height: "80%", marginLeft: "3%", marginRight: "3%" }} />
{value[2]?.name}
</div>
</div>
</div> : ""}
{value[3]?.name ? <div style={{ width: "45%", height: "40%", backgroundColor: "pink", position: "absolute", left: "45%", top: "49%" }}>
<div style={{ width: "100%", height: "100%", position: "absolute", top: "80%" }}>
<div style={{ width: "100%", height: "20%", backgroundColor: "rgba(0,0,0,0.6)", overflow: "hiddden", textOverflow: "ellipsis", whiteSpace: "nowrap" }}>
<img src='/assets/images/leadership/weizhis.png' style={{ width: "6%", height: "80%", marginLeft: "3%", marginRight: "3%" }} />
{value[3]?.name}
</div>
</div>
</div> : ""}
{/* <div>{value[1].name}</div>
<div>{value[2].name}</div>
<div>{value[3].name}</div> */}
</li>
)
})
}
</ul>
{/* <ul className="dots" style={{ width: this.state.imgs.length * 20 + 'px' }}>
{
this.state.imgs.map((value, index) => {
return (
<li key={index}
className={index === this.state.showIndex ? 'active' : ''}
onClick={() => { this.change(index) }}>
</li>)
})
}
</ul> */}
<div className="control" style={{ width: "100%", height: "10%" }}>
<span style={{ position: "absolute", top: "86%", width: "3%", height: "8%" }} className="left" onClick={(e) => { this.previous(e) }}>
<img src='/assets/images/leadership/zuofanye.png' style={{ width: "100%", height: "100%" }} />
</span>
<span style={{ position: "absolute", top: "86%", width: "3%", height: "8%", right: "6%" }} className="right" onClick={(e) => { this.next(e) }}>
<img src='/assets/images/leadership/youofanye.png' style={{ width: "100%", height: "100%" }} />
</span>
</div>
</div>
</div>
)
}
componentDidMount() { //一开始自动播放
this.start();
}
componentWillUnmount() { //销毁前清除定时器
this.stop();
}
stop = () => { //暂停
let { timer } = this.state;
clearInterval(timer);
}
start = () => { //开始
let { timer } = this.state;
timer = setInterval(() => {
this.next();
}, 300000);
this.setState({
timer
})
}
change = (index) => { //点击下面的按钮切换当前显示的图片
let { showIndex } = this.state;
showIndex = index;
this.setState({
showIndex
})
}
previous = (e) => { //上一张
let ev = e || window.event;
let { showIndex, imgs } = this.state;
if (showIndex <= 0) {
showIndex = imgs.length - 1;
} else {
showIndex--;
}
this.setState({
showIndex
})
}
next = (e) => { //下一张
let ev = e || window.event;
let { showIndex, imgs } = this.state;
if (showIndex >= imgs.length - 1) {
showIndex = 0;
} else {
showIndex++;
}
this.setState({
showIndex
})
}
}
export default ReactCarousel;

98
web/client/src/sections/quanju/containers/footer/leadership/centerleft/left.less

@ -0,0 +1,98 @@
li{
list-style-type:none
}
.wy-rightTop{
.ant-select-selector, .ant-select-selection-placeholder{
background-color:#011f59 !important;
border:#1E7BD6 1px solid !important;
font-family: PingFangSC-Regular, PingFang SC !important;
height: 25px !important;
// line-height: 25px !important;
}.ant-select-selection-item{
line-height: 25px !important;
}
.anticon{
color: #fff !important;
}
}
.contain {
position: relative;
top: 5%;
left: 45%;
width: 100%;
height: 100%;
transition: all 30s;
transform: translateX(-50%);
color: #fff;
overflow: hidden;
cursor: pointer;
}
.contain .ul {
height: 100%;
list-style: none;
}
.contain .ul .items {
position: absolute;
top: 0px;
width: 100%;
height: 100%;
}
.ul li.show{
display: block;
}
.ul li {
display: none;
}
.ul li img {
width: 100%;
height: 100%;
}
.contain .dots {
position: absolute;
left: 50%;
bottom: 30px;
height: 10px;
transform: translateX(-50%);
}
.dots li {
float: left;
width: 10px;
height: 10px;
margin: 0px 5px;
border-radius: 50%;
transition: all .3s;
// background-color: antiquewhite;
list-style: none;
}
// .dots li.active {
// background-color: blue;
// }
.control .left {
position: absolute;
top: 80%;
left: 85%;
// padding: 5px;
// transform: translateY(-50%);
width: 20px;
height: 50px;
font-size: 20px;
cursor: pointer;
}
// .control .left:hover {
// background-color: #000000,
// }
.control .right {
position: absolute;
top: 80%;
right: 3%;
// padding: 5px;
// transform: translateY(-50%);
font-size: 20px;
cursor: pointer;
}
// .control .right:hover {
// background-color: rgba(0, 0, 0, .3);
// }

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

@ -36,7 +36,7 @@ const Rightbottom = (props) => {
})
requestRightDatas()
}, [])
// console.log(list);
console.log(list);
const renderBody = () => {
return (
<div style={{ width: "100%", height: "50%" }}>

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

@ -101,6 +101,8 @@ export const ApiTable = {
//公交信息
getCircuit: 'bus/line', putCircuit: 'bus/line', delCircuit: 'bus/line/{lineId}',
getVehicle: 'bus/car', putVehicle: 'bus/car', delVehicle: 'bus/car/{carId}',
// 获取上月修养护公里数
getXiuyang: "road/maintenance/cost/query",
@ -272,6 +274,11 @@ export const ApiTable = {
//公交信息
getCircuit: 'bus/line', putCircuit: 'bus/line', delCircuit: 'bus/line/{lineId}',
getVehicle: 'bus/car', putVehicle: 'bus/car', delVehicle: 'bus/car/{carId}',
//单位概况
getCustodyunit:'/road/maintenance',
postCustodyunit:'/road/maintenance',
//养护费用
getMaintenance:'/road/maintenance/cost/nanchang/query'
};

66047
web/log/development.txt

File diff suppressed because it is too large

172
web/package-lock.json

@ -2579,18 +2579,18 @@
"dependencies": {
"ansi-styles": {
"version": "3.2.1",
"bundled": true,
"resolved": false,
"requires": {
"color-convert": "^1.9.0"
}
},
"asap": {
"version": "2.0.6",
"bundled": true
"resolved": false
},
"asn1": {
"version": "0.2.4",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"safer-buffer": "~2.1.0"
@ -2598,31 +2598,31 @@
},
"assert-plus": {
"version": "1.0.0",
"bundled": true,
"resolved": false,
"optional": true
},
"asynckit": {
"version": "0.4.0",
"bundled": true,
"resolved": false,
"optional": true
},
"aws-sign2": {
"version": "0.7.0",
"bundled": true,
"resolved": false,
"optional": true
},
"aws4": {
"version": "1.8.0",
"bundled": true,
"resolved": false,
"optional": true
},
"balanced-match": {
"version": "1.0.0",
"bundled": true
"resolved": false
},
"bcrypt-pbkdf": {
"version": "1.0.2",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"tweetnacl": "^0.14.3"
@ -2630,7 +2630,7 @@
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"resolved": false,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -2638,12 +2638,12 @@
},
"caseless": {
"version": "0.12.0",
"bundled": true,
"resolved": false,
"optional": true
},
"chalk": {
"version": "2.4.1",
"bundled": true,
"resolved": false,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
@ -2652,22 +2652,22 @@
},
"clone": {
"version": "2.1.2",
"bundled": true
"resolved": false
},
"color-convert": {
"version": "1.9.2",
"bundled": true,
"resolved": false,
"requires": {
"color-name": "1.1.1"
}
},
"color-name": {
"version": "1.1.1",
"bundled": true
"resolved": false
},
"combined-stream": {
"version": "1.0.7",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"delayed-stream": "~1.0.0"
@ -2675,16 +2675,16 @@
},
"concat-map": {
"version": "0.0.1",
"bundled": true
"resolved": false
},
"core-util-is": {
"version": "1.0.2",
"bundled": true,
"resolved": false,
"optional": true
},
"dashdash": {
"version": "1.14.1",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"assert-plus": "^1.0.0"
@ -2692,12 +2692,12 @@
},
"delayed-stream": {
"version": "1.0.0",
"bundled": true,
"resolved": false,
"optional": true
},
"ecc-jsbn": {
"version": "0.1.2",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"jsbn": "~0.1.0",
@ -2706,7 +2706,7 @@
},
"errno": {
"version": "0.1.7",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"prr": "~1.0.1"
@ -2714,31 +2714,31 @@
},
"escape-string-regexp": {
"version": "1.0.5",
"bundled": true
"resolved": false
},
"extend": {
"version": "3.0.2",
"bundled": true,
"resolved": false,
"optional": true
},
"extsprintf": {
"version": "1.3.0",
"bundled": true,
"resolved": false,
"optional": true
},
"fast-json-stable-stringify": {
"version": "2.0.0",
"bundled": true,
"resolved": false,
"optional": true
},
"forever-agent": {
"version": "0.6.1",
"bundled": true,
"resolved": false,
"optional": true
},
"form-data": {
"version": "2.3.3",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"asynckit": "^0.4.0",
@ -2748,11 +2748,11 @@
},
"fs.realpath": {
"version": "1.0.0",
"bundled": true
"resolved": false
},
"getpass": {
"version": "0.1.7",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"assert-plus": "^1.0.0"
@ -2760,7 +2760,7 @@
},
"glob": {
"version": "7.1.3",
"bundled": true,
"resolved": false,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@ -2772,17 +2772,17 @@
},
"graceful-fs": {
"version": "4.1.15",
"bundled": true,
"resolved": false,
"optional": true
},
"har-schema": {
"version": "2.0.0",
"bundled": true,
"resolved": false,
"optional": true
},
"har-validator": {
"version": "5.1.3",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"ajv": "^6.5.5",
@ -2791,7 +2791,7 @@
"dependencies": {
"ajv": {
"version": "6.6.2",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"fast-deep-equal": "^2.0.1",
@ -2802,18 +2802,18 @@
},
"fast-deep-equal": {
"version": "2.0.1",
"bundled": true,
"resolved": false,
"optional": true
}
}
},
"has-flag": {
"version": "3.0.0",
"bundled": true
"resolved": false
},
"hash.js": {
"version": "1.1.7",
"bundled": true,
"resolved": false,
"requires": {
"inherits": "^2.0.3",
"minimalistic-assert": "^1.0.1"
@ -2821,7 +2821,7 @@
},
"http-signature": {
"version": "1.2.0",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"assert-plus": "^1.0.0",
@ -2831,12 +2831,12 @@
},
"image-size": {
"version": "0.5.5",
"bundled": true,
"resolved": false,
"optional": true
},
"inflight": {
"version": "1.0.6",
"bundled": true,
"resolved": false,
"requires": {
"once": "^1.3.0",
"wrappy": "1"
@ -2844,45 +2844,45 @@
},
"inherits": {
"version": "2.0.3",
"bundled": true
"resolved": false
},
"is-regexp": {
"version": "2.1.0",
"bundled": true
"resolved": false
},
"is-typedarray": {
"version": "1.0.0",
"bundled": true,
"resolved": false,
"optional": true
},
"isstream": {
"version": "0.1.2",
"bundled": true,
"resolved": false,
"optional": true
},
"jsbn": {
"version": "0.1.1",
"bundled": true,
"resolved": false,
"optional": true
},
"json-schema": {
"version": "0.2.3",
"bundled": true,
"resolved": false,
"optional": true
},
"json-schema-traverse": {
"version": "0.4.1",
"bundled": true,
"resolved": false,
"optional": true
},
"json-stringify-safe": {
"version": "5.0.1",
"bundled": true,
"resolved": false,
"optional": true
},
"jsprim": {
"version": "1.4.1",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"assert-plus": "1.0.0",
@ -2893,7 +2893,7 @@
},
"less": {
"version": "3.9.0",
"bundled": true,
"resolved": false,
"requires": {
"clone": "^2.1.2",
"errno": "^0.1.1",
@ -2908,7 +2908,7 @@
},
"less-plugin-npm-import": {
"version": "2.1.0",
"bundled": true,
"resolved": false,
"requires": {
"promise": "~7.0.1",
"resolve": "~1.1.6"
@ -2916,30 +2916,30 @@
"dependencies": {
"promise": {
"version": "7.0.4",
"bundled": true,
"resolved": false,
"requires": {
"asap": "~2.0.3"
}
},
"resolve": {
"version": "1.1.7",
"bundled": true
"resolved": false
}
}
},
"mime": {
"version": "1.6.0",
"bundled": true,
"resolved": false,
"optional": true
},
"mime-db": {
"version": "1.37.0",
"bundled": true,
"resolved": false,
"optional": true
},
"mime-types": {
"version": "2.1.21",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"mime-db": "~1.37.0"
@ -2947,23 +2947,23 @@
},
"minimalistic-assert": {
"version": "1.0.1",
"bundled": true
"resolved": false
},
"minimatch": {
"version": "3.0.4",
"bundled": true,
"resolved": false,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "1.2.5",
"bundled": true,
"resolved": false,
"optional": true
},
"mkdirp": {
"version": "0.5.5",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"minimist": "^1.2.5"
@ -2971,28 +2971,28 @@
},
"oauth-sign": {
"version": "0.9.0",
"bundled": true,
"resolved": false,
"optional": true
},
"once": {
"version": "1.4.0",
"bundled": true,
"resolved": false,
"requires": {
"wrappy": "1"
}
},
"path-is-absolute": {
"version": "1.0.1",
"bundled": true
"resolved": false
},
"performance-now": {
"version": "2.1.0",
"bundled": true,
"resolved": false,
"optional": true
},
"postcss": {
"version": "6.0.23",
"bundled": true,
"resolved": false,
"requires": {
"chalk": "^2.4.1",
"source-map": "^0.6.1",
@ -3001,7 +3001,7 @@
},
"promise": {
"version": "7.3.1",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"asap": "~2.0.3"
@ -3009,27 +3009,27 @@
},
"prr": {
"version": "1.0.1",
"bundled": true,
"resolved": false,
"optional": true
},
"psl": {
"version": "1.1.31",
"bundled": true,
"resolved": false,
"optional": true
},
"punycode": {
"version": "2.1.1",
"bundled": true,
"resolved": false,
"optional": true
},
"qs": {
"version": "6.5.2",
"bundled": true,
"resolved": false,
"optional": true
},
"request": {
"version": "2.88.0",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"aws-sign2": "~0.7.0",
@ -3056,21 +3056,21 @@
},
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"resolved": false,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
"bundled": true,
"resolved": false,
"optional": true
},
"source-map": {
"version": "0.6.1",
"bundled": true
"resolved": false
},
"sshpk": {
"version": "1.15.2",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"asn1": "~0.2.3",
@ -3086,21 +3086,21 @@
},
"strip-css-comments": {
"version": "4.1.0",
"bundled": true,
"resolved": false,
"requires": {
"is-regexp": "^2.1.0"
}
},
"supports-color": {
"version": "5.4.0",
"bundled": true,
"resolved": false,
"requires": {
"has-flag": "^3.0.0"
}
},
"tough-cookie": {
"version": "2.4.3",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"psl": "^1.1.24",
@ -3109,14 +3109,14 @@
"dependencies": {
"punycode": {
"version": "1.4.1",
"bundled": true,
"resolved": false,
"optional": true
}
}
},
"tunnel-agent": {
"version": "0.6.0",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"safe-buffer": "^5.0.1"
@ -3124,12 +3124,12 @@
},
"tweetnacl": {
"version": "0.14.5",
"bundled": true,
"resolved": false,
"optional": true
},
"uri-js": {
"version": "4.2.2",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"punycode": "^2.1.0"
@ -3137,12 +3137,12 @@
},
"uuid": {
"version": "3.3.2",
"bundled": true,
"resolved": false,
"optional": true
},
"verror": {
"version": "1.10.0",
"bundled": true,
"resolved": false,
"optional": true,
"requires": {
"assert-plus": "^1.0.0",
@ -3152,7 +3152,7 @@
},
"wrappy": {
"version": "1.0.2",
"bundled": true
"resolved": false
}
}
},

Loading…
Cancel
Save