Compare commits

...

4 Commits

  1. 123
      api/app/lib/controllers/data/index.js
  2. 413
      api/app/lib/controllers/data/vehicle.js
  3. 62
      api/app/lib/models/file-road.js
  4. 64
      api/app/lib/models/file-type.js
  5. 146
      api/app/lib/models/files.js
  6. 119
      api/log/development.log
  7. 8
      weapp/src/packages/changePassword/index.jsx
  8. 36
      web/client/assets/color.less
  9. BIN
      web/client/assets/images/leadership/handong.png
  10. BIN
      web/client/assets/images/leadership/qiao.png
  11. 548
      web/client/src/components/Upload/index.js
  12. 66
      web/client/src/sections/fillion/actions/infor.js
  13. 143
      web/client/src/sections/fillion/components/infor/details.js
  14. 5
      web/client/src/sections/fillion/components/infor/videoUpload.js
  15. 36
      web/client/src/sections/fillion/components/operationalTable.js
  16. 4
      web/client/src/sections/fillion/components/promotionalTable.js
  17. 2
      web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js
  18. 8
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/echarts/centerleftecharts.js
  19. 348
      web/client/src/utils/webapi.js
  20. 66679
      web/log/development.txt
  21. 2
      web/package.json

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

@ -1,19 +1,93 @@
'use strict'; 'use strict';
const fs = require('fs');
const xlsxDownload = require('../../../../utils/xlsxDownload.js');
const moment = require('moment');
const request = require('superagent');
async function dataExport (ctx) { // const { simpleExcelDown } = require('../../../../utils/xlsxDownload');
async function dataExport(ctx) {
try { try {
const models = ctx.fs.dc.models; // const models = ctx.fs.dc.models;
const { userId } = ctx.fs.api // const { userId } = ctx.fs.api
const { exp, ids, roadLevel, municipalType } = ctx.query; // const { ids } = ctx.query;
if (!exp) { // const fileList = [
throw '参数错误'; // {
} // n: '道路',
// tableName: 'road',
// defaultKey: ['level'],
// defaultValue: ['村'],
// },
// {
// n: '道路',
// tableName: 'road',
// defaultKey: ['level'],
// defaultValue: ['县'],
// },
// {
// n: '道路',
// tableName: 'road',
// defaultKey: ['level'],
// defaultValue: ['乡'],
// },
// {
// n: '桥梁',
// tableName: 'bridge'
// },
// {
// n: '运政车辆',
// tableName: 'municipal_vehicle',
// defaultKey: ['type'],
// defaultValue: ['出租车'],
// },
// {
// n: '运政车辆',
// tableName: 'municipal_vehicle',
// defaultKey: ['type'],
// defaultValue: ['危货'],
// },
// {
// n: '运政业户',
// tableName: 'municipal_business',
// defaultKey: ['type'],
// defaultValue: ['出租车'],
// },
// {
// n: '运政业户',
// tableName: 'municipal_business',
// defaultKey: ['type'],
// defaultValue: ['危货'],
// },
// {
// n: '工程一览',
// tableName: 'project',
// defaultKey: ['done', 'type'],
// defaultValue: [false, 'road'],
// },
// {
// n: '工程一览',
// tableName: 'project',
// defaultKey: ['done', 'type'],
// defaultValue: [false, 'bridge'],
// },
// {
// n: '治超',
// tableName: 'overspeed',
// },
// {
// n: '公交线路',
// tableName: 'bus_line',
// },
// {
// n: '公交车辆',
// tableName: 'bus_car',
// },
// ]
<<<<<<< HEAD
// const exportData = await models.BusCar.destroy({
// where: {
// id: { $in: ids.split(',') }
// }
// })
=======
const modalList = [ const modalList = [
{ {
n: '道路', n: '道路',
@ -66,12 +140,25 @@ async function dataExport (ctx) {
tableName: 'Report', tableName: 'Report',
}, },
] ]
>>>>>>> d8f96cea72338cf7a61dea293bd6d0cd5da48bb0
const modalOption = modalList.find(item => item.k == exp); // const fileName = `摄像头信息列表_${moment().format('YYYYMMDDHHmmss')}` + '.csv'
if (!modalOption) { // const filePath = await simpleExcelDown({ data: exportData, header, fileName: fileName })
throw '参数错误'; // const fileData = fs.readFileSync(filePath);
}
<<<<<<< HEAD
// ctx.status = 200;
// ctx.set('Content-Type', 'application/x-xls');
// ctx.set('Content-disposition', 'attachment; filename=' + encodeURI(fileName));
// ctx.body = fileData;
} catch (error) {
// ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
// ctx.status = 400;
// ctx.body = {
// message: typeof error == 'string' ? error : undefined
// }
}
=======
let findOption = { let findOption = {
where: {} where: {}
} }
@ -118,9 +205,10 @@ async function dataExport (ctx) {
message: typeof error == 'string' ? error : undefined message: typeof error == 'string' ? error : undefined
} }
} }
>>>>>>> d8f96cea72338cf7a61dea293bd6d0cd5da48bb0
} }
async function godTrans (ctx) { async function godTrans(ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { userId } = ctx.fs.api const { userId } = ctx.fs.api
@ -141,6 +229,5 @@ async function godTrans (ctx) {
} }
module.exports = { module.exports = {
dataExport, dataExport
godTrans
}; };

413
api/app/lib/controllers/data/vehicle.js

@ -1,239 +1,236 @@
'use strict'; 'use strict';
async function get (ctx) { async function get (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { type } = ctx.request.body; const { type } = ctx.request.body;
const { name } = ctx.query; const { name } = ctx.query;
let findOption = { let findOption = {
where: { where: {
type type
}, }
order: [['id', 'DESC']] }
} if (name) {
if (name) { findOption.where.name = {
findOption.where.name = { $like: `%${name}%`
$like: `%${name}%` }
} }
} const vehicleRes = await models.Statistic.findAll(findOption)
const vehicleRes = await models.Statistic.findAll(findOption)
ctx.status = 200;
ctx.status = 200; ctx.body = vehicleRes
ctx.body = vehicleRes } catch (error) {
} catch (error) { ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.status = 400;
ctx.status = 400; ctx.body = {
ctx.body = { message: typeof error == 'string' ? error : undefined
message: typeof error == 'string' ? error : undefined }
} }
}
} }
async function edit (ctx) { async function edit (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { id, name, count, type } = ctx.request.body; const { id, name, count, type } = ctx.request.body;
if (!id) { if (!id) {
await models.Statistic.create({ await models.Statistic.create({
name, count, type: type name, count, type: type
}) })
} else { } else {
await models.Statistic.update({ await models.Statistic.update({
name, count, type: type name, count, type: type
}, { }, {
where: { where: {
id: id id: id
} }
}) })
} }
ctx.status = 204 ctx.status = 204
} catch (error) { } catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400; ctx.status = 400;
ctx.body = { ctx.body = {
message: typeof error == 'string' ? error : undefined message: typeof error == 'string' ? error : undefined
} }
} }
} }
async function del (ctx) { async function del (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { id } = ctx.params; const { id } = ctx.params;
await models.Statistic.destroy({ await models.Statistic.destroy({
where: { where: {
id: id id: id
} }
}) })
ctx.status = 204 ctx.status = 204
} catch (error) { } catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400; ctx.status = 400;
ctx.body = { ctx.body = {
message: typeof error == 'string' ? error : undefined message: typeof error == 'string' ? error : undefined
} }
} }
} }
async function specificGet (ctx) { async function specificGet (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { type } = ctx.query; const { type } = ctx.query;
const { nameOfBusinessOwner } = ctx.query; const { nameOfBusinessOwner } = ctx.query;
let findOption = { let findOption = {
where: { where: {
type type
}, }
order: [['id', 'DESC']] }
} if (nameOfBusinessOwner) {
if (nameOfBusinessOwner) { findOption.where.nameOfBusinessOwner = {
findOption.where.nameOfBusinessOwner = { $like: `%${nameOfBusinessOwner}%`
$like: `%${nameOfBusinessOwner}%` }
} }
}
const vehicleRes = await models.MunicipalVehicle.findAll(findOption)
const vehicleRes = await models.MunicipalVehicle.findAll(findOption)
ctx.status = 200;
ctx.status = 200; ctx.body = vehicleRes
ctx.body = vehicleRes } catch (error) {
} catch (error) { ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.status = 400;
ctx.status = 400; ctx.body = {
ctx.body = { message: typeof error == 'string' ? error : undefined
message: typeof error == 'string' ? error : undefined }
} }
}
} }
async function specificEdit (ctx) { async function specificEdit (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const data = ctx.request.body; const data = ctx.request.body;
if (!data.vehicleId) { if (!data.vehicleId) {
const vehicleRes = await models.MunicipalVehicle.create(data) const vehicleRes = await models.Vehicle.create(data)
} else { } else {
const vehicleRes = await models.MunicipalVehicle.update(data, { const vehicleRes = await models.Vehicle.update(data, {
where: { where: {
id: data.vehicleId id: data.vehicleId
} }
}) })
} }
ctx.status = 204 ctx.status = 204
} catch (error) { } catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400; ctx.status = 400;
ctx.body = { ctx.body = {
message: typeof error == 'string' ? error : undefined message: typeof error == 'string' ? error : undefined
} }
} }
} }
async function specificDel (ctx) { async function specificDel (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { vehicleId } = ctx.params; const { vehicleId } = ctx.params;
const vehicleRes = await models.MunicipalVehicle.destroy({ const vehicleRes = await models.Vehicle.destroy({
where: { where: {
id: vehicleId id: vehicleId
} }
}) })
ctx.status = 204 ctx.status = 204
} catch (error) { } catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400; ctx.status = 400;
ctx.body = { ctx.body = {
message: typeof error == 'string' ? error : undefined message: typeof error == 'string' ? error : undefined
} }
} }
} }
async function businessGet (ctx) { async function businessGet (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { nameOfBusinessOwner } = ctx.query; const { nameOfBusinessOwner } = ctx.query;
let findOption = { let findOption = {
where: { where: {
}, }
order: [['id', 'DESC']] }
} if (nameOfBusinessOwner) {
if (nameOfBusinessOwner) { findOption.where.nameOfBusinessOwner = {
findOption.where.nameOfBusinessOwner = { $like: `%${nameOfBusinessOwner}%`
$like: `%${nameOfBusinessOwner}%` }
} }
} const businessRes = await models.MunicipalBusiness.findAll(findOption)
const businessRes = await models.MunicipalBusiness.findAll(findOption)
ctx.status = 200;
ctx.status = 200; ctx.body = businessRes
ctx.body = businessRes } catch (error) {
} catch (error) { ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.status = 400;
ctx.status = 400; ctx.body = {
ctx.body = { message: typeof error == 'string' ? error : undefined
message: typeof error == 'string' ? error : undefined }
} }
}
} }
async function businessEdit (ctx) { async function businessEdit (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const data = ctx.request.body; const data = ctx.request.body;
if (!data.businessId) { if (!data.businessId) {
await models.MunicipalBusiness.create(data) await models.MunicipalBusiness.create(data)
} else { } else {
await models.MunicipalBusiness.update(data, { await models.MunicipalBusiness.update(data, {
where: { where: {
id: data.businessId id: data.businessId
} }
}) })
} }
ctx.status = 204 ctx.status = 204
} catch (error) { } catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400; ctx.status = 400;
ctx.body = { ctx.body = {
message: typeof error == 'string' ? error : undefined message: typeof error == 'string' ? error : undefined
} }
} }
} }
async function businessDel (ctx) { async function businessDel (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { businessId } = ctx.params; const { businessId } = ctx.params;
await models.MunicipalBusiness.destroy({ await models.Vehicle.MunicipalBusiness({
where: { where: {
id: businessId id: businessId
} }
}) })
ctx.status = 204 ctx.status = 204
} catch (error) { } catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400; ctx.status = 400;
ctx.body = { ctx.body = {
message: typeof error == 'string' ? error : undefined message: typeof error == 'string' ? error : undefined
} }
} }
} }
module.exports = { module.exports = {
get, edit, del, get, edit, del,
specificGet, specificEdit, specificDel, specificGet, specificEdit, specificDel,
businessGet, businessEdit, businessDel businessGet, businessEdit, businessDel
}; };

62
api/app/lib/models/file-road.js

@ -1,31 +1,31 @@
'use strict'; 'use strict';
module.exports = function (dc) { module.exports = function (dc) {
const FileRoad = dc.orm.define( const FileRoad = dc.orm.define(
'fileRoad', 'fileRoad',
{ {
rId: { rId: {
field: 'id', field: 'id',
type: dc.ORM.INTEGER, type: dc.ORM.INTEGER,
primaryKey: true, primaryKey: true,
autoIncrement: true, autoIncrement: true,
allowNull: false allowNull: false
}, },
roadName: { roadName: {
field: 'road_name', field: 'road_name',
type: dc.ORM.STRING, type: dc.ORM.STRING,
}, },
originalData: { originalData: {
field: 'original_data', field: 'original_data',
type: dc.ORM.STRING, type: dc.ORM.STRING,
}, },
}, },
{ {
tableName: 'file_road' tableName: 'file_road'
} }
); );
dc.models.FileRoad = FileRoad; dc.models.FileRoad = FileRoad;
return FileRoad; return FileRoad;
}; };

64
api/app/lib/models/file-type.js

@ -1,32 +1,32 @@
'use strict'; 'use strict';
module.exports = function (dc) { module.exports = function (dc) {
const FileType = dc.orm.define( const FileType = dc.orm.define(
'fileType', 'fileType',
{ {
fId: { fId: {
field: 'id', field: 'id',
type: dc.ORM.INTEGER, type: dc.ORM.INTEGER,
primaryKey: true, primaryKey: true,
autoIncrement: true, autoIncrement: true,
allowNull: false allowNull: false
}, },
fileType: { fileType: {
field: 'file_type', field: 'file_type',
type: dc.ORM.STRING, type: dc.ORM.STRING,
}, },
rId: { rId: {
field: 'file_road', field: 'file_road',
type: dc.ORM.INTEGER, type: dc.ORM.INTEGER,
allowNull: false allowNull: false
}, },
}, },
{ {
tableName: 'file_type' tableName: 'file_type'
} }
); );
dc.models.FileType = FileType; dc.models.FileType = FileType;
return FileType; return FileType;
}; };

146
api/app/lib/models/files.js

@ -1,73 +1,73 @@
'use strict'; 'use strict';
module.exports = function (dc) { module.exports = function (dc) {
const Files = dc.orm.define( const Files = dc.orm.define(
'files', 'files',
{ {
id: { id: {
field: 'id', field: 'id',
type: dc.ORM.INTEGER, type: dc.ORM.INTEGER,
primaryKey: true, primaryKey: true,
autoIncrement: true, autoIncrement: true,
allowNull: false allowNull: false
}, },
fId: { fId: {
field: 'file_type', field: 'file_type',
type: dc.ORM.INTEGER type: dc.ORM.INTEGER
}, },
roadId: { roadId: {
field: 'road_id', field: 'road_id',
type: dc.ORM.INTEGER type: dc.ORM.INTEGER
}, },
uploaderId: { uploaderId: {
field: 'uploader_id', field: 'uploader_id',
type: dc.ORM.INTEGER type: dc.ORM.INTEGER
}, },
uploaderName: { uploaderName: {
field: 'uploader_name', field: 'uploader_name',
type: dc.ORM.INTEGER type: dc.ORM.INTEGER
}, },
startDate: { startDate: {
field: 'start_date', field: 'start_date',
type: dc.ORM.DATE, type: dc.ORM.DATE,
}, },
endDate: { endDate: {
field: 'end_date', field: 'end_date',
type: dc.ORM.DATE, type: dc.ORM.DATE,
}, },
createDate: { createDate: {
field: 'create_date', field: 'create_date',
type: dc.ORM.DATE, type: dc.ORM.DATE,
}, },
fileSize: { fileSize: {
field: 'file_size', field: 'file_size',
type: dc.ORM.INTEGER, type: dc.ORM.INTEGER,
}, },
fileName: { fileName: {
field: 'file_name', field: 'file_name',
type: dc.ORM.STRING, type: dc.ORM.STRING,
}, },
fileUrl: { fileUrl: {
field: 'file_url', field: 'file_url',
type: dc.ORM.STRING, type: dc.ORM.STRING,
}, },
fileExt: { fileExt: {
field: 'file_ext', field: 'file_ext',
type: dc.ORM.STRING, type: dc.ORM.STRING,
}, },
isDelete: { isDelete: {
field: 'is_delete', field: 'is_delete',
type: dc.ORM.BOOLEAN, type: dc.ORM.BOOLEAN,
}, },
}, },
{ {
tableName: 'files' tableName: 'files'
} }
); );
dc.models.Files = Files; dc.models.Files = Files;
return Files; return Files;
}; };

119
api/log/development.log

@ -10659,6 +10659,124 @@ headers: {}
2022-07-28 21:48:22.652 - debug: [FS-LOGGER] Init. 2022-07-28 21:48:22.652 - debug: [FS-LOGGER] Init.
2022-07-28 21:48:22.760 - info: [FS-ATTACHMENT] Inject attachment mw into router. 2022-07-28 21:48:22.760 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-28 21:48:22.760 - info: [FS-AUTH] Inject auth and api mv into router. 2022-07-28 21:48:22.760 - info: [FS-AUTH] Inject auth and api mv into router.
<<<<<<< HEAD
2022-08-10 17:08:11.424 - debug: [FS-LOGGER] Init.
2022-08-10 17:08:11.680 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-10 17:08:11.680 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-10 17:08:11.709 - error: [app]
{
message: 'middleware must be a function',
stack: 'TypeError: middleware must be a function\n' +
' at f:\\Highways4Good\\api\\node_modules\\koa-66\\index.js:269:23\n' +
' at Array.forEach (<anonymous>)\n' +
' at Koa66.register (f:\\Highways4Good\\api\\node_modules\\koa-66\\index.js:262:21)\n' +
' at Koa66.<computed> [as get] (f:\\Highways4Good\\api\\node_modules\\koa-66\\index.js:327:30)\n' +
' at module.exports (f:\\Highways4Good\\api\\app\\lib\\routes\\data\\index.js:20:12)\n' +
' at f:\\Highways4Good\\api\\app\\lib\\routes\\index.js:11:48\n' +
' at Array.forEach (<anonymous>)\n' +
' at f:\\Highways4Good\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (f:\\Highways4Good\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (f:\\Highways4Good\\api\\app\\lib\\index.js:21:14)\n' +
' at f:\\Highways4Good\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)\n' +
' at scaffold (f:\\Highways4Good\\api\\node_modules\\fs-web-server-scaffold\\index.js:71:16)\n' +
' at Object.<anonymous> (f:\\Highways4Good\\api\\server.js:12:18)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)\n' +
' at internal/main/run_main_module.js:17:47'
}
2022-08-10 17:10:26.846 - debug: [FS-LOGGER] Init.
2022-08-10 17:10:26.920 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-10 17:10:26.920 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-10 17:10:26.930 - error: [app]
{
message: 'middleware must be a function',
stack: 'TypeError: middleware must be a function\n' +
' at F:\\Highways4Good\\api\\node_modules\\koa-66\\index.js:269:23\n' +
' at Array.forEach (<anonymous>)\n' +
' at Koa66.register (F:\\Highways4Good\\api\\node_modules\\koa-66\\index.js:262:21)\n' +
' at Koa66.<computed> [as get] (F:\\Highways4Good\\api\\node_modules\\koa-66\\index.js:327:30)\n' +
' at module.exports (F:\\Highways4Good\\api\\app\\lib\\routes\\data\\index.js:20:12)\n' +
' at F:\\Highways4Good\\api\\app\\lib\\routes\\index.js:11:48\n' +
' at Array.forEach (<anonymous>)\n' +
' at F:\\Highways4Good\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (F:\\Highways4Good\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (F:\\Highways4Good\\api\\app\\lib\\index.js:21:14)\n' +
' at F:\\Highways4Good\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)\n' +
' at scaffold (F:\\Highways4Good\\api\\node_modules\\fs-web-server-scaffold\\index.js:71:16)\n' +
' at Object.<anonymous> (F:\\Highways4Good\\api\\server.js:12:18)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)\n' +
' at internal/main/run_main_module.js:17:47'
}
2022-08-10 17:24:43.135 - debug: [FS-LOGGER] Init.
2022-08-10 17:24:43.211 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-10 17:24:43.211 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-10 17:24:43.221 - error: [app]
{
message: 'middleware must be a function',
stack: 'TypeError: middleware must be a function\n' +
' at F:\\Highways4Good\\api\\node_modules\\koa-66\\index.js:269:23\n' +
' at Array.forEach (<anonymous>)\n' +
' at Koa66.register (F:\\Highways4Good\\api\\node_modules\\koa-66\\index.js:262:21)\n' +
' at Koa66.<computed> [as get] (F:\\Highways4Good\\api\\node_modules\\koa-66\\index.js:327:30)\n' +
' at module.exports (F:\\Highways4Good\\api\\app\\lib\\routes\\data\\index.js:20:12)\n' +
' at F:\\Highways4Good\\api\\app\\lib\\routes\\index.js:11:48\n' +
' at Array.forEach (<anonymous>)\n' +
' at F:\\Highways4Good\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (F:\\Highways4Good\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (F:\\Highways4Good\\api\\app\\lib\\index.js:21:14)\n' +
' at F:\\Highways4Good\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)\n' +
' at scaffold (F:\\Highways4Good\\api\\node_modules\\fs-web-server-scaffold\\index.js:71:16)\n' +
' at Object.<anonymous> (F:\\Highways4Good\\api\\server.js:12:18)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)\n' +
' at internal/main/run_main_module.js:17:47'
}
2022-08-11 09:29:34.482 - debug: [FS-LOGGER] Init.
2022-08-11 09:29:34.563 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-11 09:29:34.564 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-11 09:29:34.575 - error: [app]
{
message: 'middleware must be a function',
stack: 'TypeError: middleware must be a function\n' +
' at F:\\Highways4Good\\api\\node_modules\\koa-66\\index.js:269:23\n' +
' at Array.forEach (<anonymous>)\n' +
' at Koa66.register (F:\\Highways4Good\\api\\node_modules\\koa-66\\index.js:262:21)\n' +
' at Koa66.<computed> [as get] (F:\\Highways4Good\\api\\node_modules\\koa-66\\index.js:327:30)\n' +
' at module.exports (F:\\Highways4Good\\api\\app\\lib\\routes\\data\\index.js:20:12)\n' +
' at F:\\Highways4Good\\api\\app\\lib\\routes\\index.js:11:48\n' +
' at Array.forEach (<anonymous>)\n' +
' at F:\\Highways4Good\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (F:\\Highways4Good\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (F:\\Highways4Good\\api\\app\\lib\\index.js:21:14)\n' +
' at F:\\Highways4Good\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)\n' +
' at scaffold (F:\\Highways4Good\\api\\node_modules\\fs-web-server-scaffold\\index.js:71:16)\n' +
' at Object.<anonymous> (F:\\Highways4Good\\api\\server.js:12:18)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)\n' +
' at internal/main/run_main_module.js:17:47'
}
=======
2022-07-30 11:38:34.527 - debug: [FS-LOGGER] Init. 2022-07-30 11:38:34.527 - debug: [FS-LOGGER] Init.
2022-07-30 11:38:34.600 - info: [FS-ATTACHMENT] Inject attachment mw into router. 2022-07-30 11:38:34.600 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-30 11:38:34.600 - info: [FS-AUTH] Inject auth and api mv into router. 2022-07-30 11:38:34.600 - info: [FS-AUTH] Inject auth and api mv into router.
@ -10697,3 +10815,4 @@ headers: {}
2022-07-30 17:48:40.061 - debug: [FS-LOGGER] Init. 2022-07-30 17:48:40.061 - debug: [FS-LOGGER] Init.
2022-07-30 17:48:40.152 - info: [FS-ATTACHMENT] Inject attachment mw into router. 2022-07-30 17:48:40.152 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-30 17:48:40.152 - info: [FS-AUTH] Inject auth and api mv into router. 2022-07-30 17:48:40.152 - info: [FS-AUTH] Inject auth and api mv into router.
>>>>>>> d8f96cea72338cf7a61dea293bd6d0cd5da48bb0

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

@ -14,10 +14,10 @@ function Index() {
function confirm() { function confirm() {
if (!password) { if (!password) {
Taro.showToast({ title: '请输入密码', icon: 'none' }) Taro.showToast({ title: '请输入密码' })
return return
} else if (password !== password2) { } else if (password !== password2) {
Taro.showToast({ title: '两次输入的密码不一致', icon: 'none' }) Taro.showToast({ title: '两次输入的密码不一致' })
return return
} else { } else {
Taro.showModal({ Taro.showModal({
@ -50,11 +50,11 @@ function Index() {
</View> </View>
<View className='pswd'> <View className='pswd'>
<View className='title'>新的密码</View> <View className='title'>新的密码</View>
<Input value={password} type='password' onInput={e => setPassword(e.detail.value)} /> <Input value={password} onInput={e => setPassword(e.detail.value)} />
</View> </View>
<View className='pswd'> <View className='pswd'>
<View className='title'>再次输入新的密码</View> <View className='title'>再次输入新的密码</View>
<Input value={password2} type='password' onInput={e => setPassword2(e.detail.value)} /> <Input value={password2} onInput={e => setPassword2(e.detail.value)} />
</View> </View>
<AtButton className='btn' type='primary' onClick={confirm}>确认</AtButton> <AtButton className='btn' type='primary' onClick={confirm}>确认</AtButton>
</View> </View>

36
web/client/assets/color.less

@ -785,19 +785,17 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
.ant-divider-horizontal.ant-divider-with-text.ant-divider-dashed::before, .ant-divider-horizontal.ant-divider-with-text.ant-divider-dashed::after {border-style: dashed none none;} .ant-divider-horizontal.ant-divider-with-text.ant-divider-dashed::before, .ant-divider-horizontal.ant-divider-with-text.ant-divider-dashed::after {border-style: dashed none none;}
.ant-divider-vertical.ant-divider-dashed {border-width: 0 0 0 1px;} .ant-divider-vertical.ant-divider-dashed {border-width: 0 0 0 1px;}
.ant-divider-plain.ant-divider-with-text {color: @text-color;} .ant-divider-plain.ant-divider-with-text {color: @text-color;}
.ant-drawer-left.ant-drawer-open .ant-drawer-content-wrapper {box-shadow: 6px 0 16px -8px rgba(0, 0, 0, 0.08), 9px 0 28px 0 rgba(0, 0, 0, 0.05), 12px 0 48px 16px rgba(0, 0, 0, 0.03);} .ant-drawer-mask {background: rgba(0, 0, 0, 0.45);}
.ant-drawer-right.ant-drawer-open .ant-drawer-content-wrapper {box-shadow: -6px 0 16px -8px rgba(0, 0, 0, 0.08), -9px 0 28px 0 rgba(0, 0, 0, 0.05), -12px 0 48px 16px rgba(0, 0, 0, 0.03);} .ant-drawer-left .ant-drawer-content {box-shadow: 6px 0 16px -8px rgba(0, 0, 0, 0.08), 9px 0 28px 0 rgba(0, 0, 0, 0.05), 12px 0 48px 16px rgba(0, 0, 0, 0.03);}
.ant-drawer-top.ant-drawer-open .ant-drawer-content-wrapper {box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.08), 0 9px 28px 0 rgba(0, 0, 0, 0.05), 0 12px 48px 16px rgba(0, 0, 0, 0.03);} .ant-drawer-right .ant-drawer-content {box-shadow: -6px 0 16px -8px rgba(0, 0, 0, 0.08), -9px 0 28px 0 rgba(0, 0, 0, 0.05), -12px 0 48px 16px rgba(0, 0, 0, 0.03);}
.ant-drawer-bottom.ant-drawer-open .ant-drawer-content-wrapper {box-shadow: 0 -6px 16px -8px rgba(0, 0, 0, 0.08), 0 -9px 28px 0 rgba(0, 0, 0, 0.05), 0 -12px 48px 16px rgba(0, 0, 0, 0.03);} .ant-drawer-top .ant-drawer-content {box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.08), 0 9px 28px 0 rgba(0, 0, 0, 0.05), 0 12px 48px 16px rgba(0, 0, 0, 0.03);}
.ant-drawer-title {color: @heading-color;} .ant-drawer-bottom .ant-drawer-content {box-shadow: 0 -6px 16px -8px rgba(0, 0, 0, 0.08), 0 -9px 28px 0 rgba(0, 0, 0, 0.05), 0 -12px 48px 16px rgba(0, 0, 0, 0.03);}
.ant-drawer-content {background-color: @drawer-bg;background-clip: padding-box;border: 0;} .ant-drawer-wrapper-body {background: @drawer-bg;}
.ant-drawer-header {border-bottom: 1px solid @border-color-split;}
.ant-drawer-close {color: @text-color-secondary;background: transparent;border: 0;} .ant-drawer-close {color: @text-color-secondary;background: transparent;border: 0;}
.ant-drawer-close:focus, .ant-drawer-close:hover {color: @icon-color-hover;} .ant-drawer-close:focus, .ant-drawer-close:hover {color: @icon-color-hover;}
.ant-drawer-header {color: @text-color;background: @drawer-bg;border-bottom: 1px solid @border-color-split;border-radius: 2px 2px 0 0;} .ant-drawer-title {color: @heading-color;}
.ant-drawer-header-close-only {border: none;}
.ant-drawer-footer {border-top: 1px solid @border-color-split;} .ant-drawer-footer {border-top: 1px solid @border-color-split;}
.ant-drawer-mask {background-color: rgba(0, 0, 0, 0.45);}
.ant-drawer .ant-picker-clear {background: @popover-background;}
.ant-dropdown-menu-item.ant-dropdown-menu-item-danger {color: #ff4d4f;} .ant-dropdown-menu-item.ant-dropdown-menu-item-danger {color: #ff4d4f;}
.ant-dropdown-menu-item.ant-dropdown-menu-item-danger:hover {color: #fff;background-color: #ff4d4f;} .ant-dropdown-menu-item.ant-dropdown-menu-item-danger:hover {color: #fff;background-color: #ff4d4f;}
.ant-dropdown {color: @text-color;} .ant-dropdown {color: @text-color;}
@ -1128,10 +1126,10 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
.ant-mentions-dropdown-menu-item-active {background-color: @item-hover-bg;} .ant-mentions-dropdown-menu-item-active {background-color: @item-hover-bg;}
.ant-menu-item-danger.ant-menu-item {color: #ff4d4f;} .ant-menu-item-danger.ant-menu-item {color: #ff4d4f;}
.ant-menu-item-danger.ant-menu-item:hover, .ant-menu-item-danger.ant-menu-item-active {color: #ff4d4f;} .ant-menu-item-danger.ant-menu-item:hover, .ant-menu-item-danger.ant-menu-item-active {color: #ff4d4f;}
.ant-menu-item-danger.ant-menu-item:active {background: color(~`colorPalette("@{select-clear-background}", 1)`);} .ant-menu-item-danger.ant-menu-item:active {background: color(~`colorPalette("@{segmented-hover-bg}", 1)`);}
.ant-menu-item-danger.ant-menu-item-selected {color: #ff4d4f;} .ant-menu-item-danger.ant-menu-item-selected {color: #ff4d4f;}
.ant-menu-item-danger.ant-menu-item-selected > a, .ant-menu-item-danger.ant-menu-item-selected > a:hover {color: #ff4d4f;} .ant-menu-item-danger.ant-menu-item-selected > a, .ant-menu-item-danger.ant-menu-item-selected > a:hover {color: #ff4d4f;}
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {background-color: color(~`colorPalette("@{select-clear-background}", 1)`);} .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {background-color: color(~`colorPalette("@{segmented-hover-bg}", 1)`);}
.ant-menu-inline .ant-menu-item-danger.ant-menu-item::after {border-right-color: #ff4d4f;} .ant-menu-inline .ant-menu-item-danger.ant-menu-item::after {border-right-color: #ff4d4f;}
.ant-menu-dark .ant-menu-item-danger.ant-menu-item, .ant-menu-dark .ant-menu-item-danger.ant-menu-item:hover, .ant-menu-dark .ant-menu-item-danger.ant-menu-item > a {color: #ff4d4f;} .ant-menu-dark .ant-menu-item-danger.ant-menu-item, .ant-menu-dark .ant-menu-item-danger.ant-menu-item:hover, .ant-menu-dark .ant-menu-item-danger.ant-menu-item > a {color: #ff4d4f;}
.ant-menu-dark.ant-menu-dark:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {color: #fff;background-color: #ff4d4f;} .ant-menu-dark.ant-menu-dark:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {color: #fff;background-color: #ff4d4f;}
@ -1702,15 +1700,15 @@ tr.ant-table-expanded-row:hover > td {background: @table-expanded-row-bg;}
.ant-tag-checkable:active, .ant-tag-checkable-checked {color: #fff;} .ant-tag-checkable:active, .ant-tag-checkable-checked {color: #fff;}
.ant-tag-checkable-checked {background-color: @primary-color;} .ant-tag-checkable-checked {background-color: @primary-color;}
.ant-tag-checkable:active {background-color: color(~`colorPalette("@{primary-color}", 7)`);} .ant-tag-checkable:active {background-color: color(~`colorPalette("@{primary-color}", 7)`);}
.ant-tag-pink {color: #c41d7f;background: color(~`colorPalette("@{modal-footer-border-color-split}", 1)`);border-color: #ffadd2;} .ant-tag-pink {color: #c41d7f;background: color(~`colorPalette("@{table-fixed-header-sort-active-bg}", 3)`);border-color: #ffadd2;}
.ant-tag-pink-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;} .ant-tag-pink-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;}
.ant-tag-magenta {color: #c41d7f;background: color(~`colorPalette("@{modal-footer-border-color-split}", 1)`);border-color: #ffadd2;} .ant-tag-magenta {color: #c41d7f;background: color(~`colorPalette("@{table-fixed-header-sort-active-bg}", 3)`);border-color: #ffadd2;}
.ant-tag-magenta-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;} .ant-tag-magenta-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;}
.ant-tag-red {color: #cf1322;background: color(~`colorPalette("@{select-clear-background}", 1)`);border-color: #ffa39e;} .ant-tag-red {color: #cf1322;background: color(~`colorPalette("@{segmented-hover-bg}", 1)`);border-color: #ffa39e;}
.ant-tag-red-inverse {color: #fff;background: #f5222d;border-color: #f5222d;} .ant-tag-red-inverse {color: #fff;background: #f5222d;border-color: #f5222d;}
.ant-tag-volcano {color: #d4380d;background: #fff2e8;border-color: #ffbb96;} .ant-tag-volcano {color: #d4380d;background: #fff2e8;border-color: #ffbb96;}
.ant-tag-volcano-inverse {color: #fff;background: #fa541c;border-color: #fa541c;} .ant-tag-volcano-inverse {color: #fff;background: #fa541c;border-color: #fa541c;}
.ant-tag-orange {color: #d46b08;background: #fff7e6;border-color: #ffd591;} .ant-tag-orange {color: #d46b08;background: color(~`colorPalette("@{descriptions-bg}", 1)`);border-color: #ffd591;}
.ant-tag-orange-inverse {color: #fff;background: #fa8c16;border-color: #fa8c16;} .ant-tag-orange-inverse {color: #fff;background: #fa8c16;border-color: #fa8c16;}
.ant-tag-yellow {color: #d4b106;background: #feffe6;border-color: #fffb8f;} .ant-tag-yellow {color: #d4b106;background: #feffe6;border-color: #fffb8f;}
.ant-tag-yellow-inverse {color: #fff;background: #fadb14;border-color: #fadb14;} .ant-tag-yellow-inverse {color: #fff;background: #fadb14;border-color: #fadb14;}
@ -1718,15 +1716,15 @@ tr.ant-table-expanded-row:hover > td {background: @table-expanded-row-bg;}
.ant-tag-gold-inverse {color: #fff;background: #faad14;border-color: #faad14;} .ant-tag-gold-inverse {color: #fff;background: #faad14;border-color: #faad14;}
.ant-tag-cyan {color: #08979c;background: #e6fffb;border-color: #87e8de;} .ant-tag-cyan {color: #08979c;background: #e6fffb;border-color: #87e8de;}
.ant-tag-cyan-inverse {color: #fff;background: #13c2c2;border-color: #13c2c2;} .ant-tag-cyan-inverse {color: #fff;background: #13c2c2;border-color: #13c2c2;}
.ant-tag-lime {color: #7cb305;background: color(~`colorPalette("@{steps-nav-arrow-color}", 1)`);border-color: #eaff8f;} .ant-tag-lime {color: #7cb305;background: color(~`colorPalette("@{layout-header-background}", 1)`);border-color: #eaff8f;}
.ant-tag-lime-inverse {color: #fff;background: #a0d911;border-color: #a0d911;} .ant-tag-lime-inverse {color: #fff;background: #a0d911;border-color: #a0d911;}
.ant-tag-green {color: #389e0d;background: #f6ffed;border-color: #b7eb8f;} .ant-tag-green {color: #389e0d;background: #f6ffed;border-color: #b7eb8f;}
.ant-tag-green-inverse {color: #fff;background: #52c41a;border-color: #52c41a;} .ant-tag-green-inverse {color: #fff;background: #52c41a;border-color: #52c41a;}
.ant-tag-blue {color: #096dd9;background: color(~`colorPalette("@{pagination-item-input-bg}", 1)`);border-color: color(~`colorPalette("@{pagination-item-input-bg}", 3)`);} .ant-tag-blue {color: #096dd9;background: color(~`colorPalette("@{pagination-item-input-bg}", 1)`);border-color: color(~`colorPalette("@{pagination-item-input-bg}", 3)`);}
.ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;} .ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;}
.ant-tag-geekblue {color: #1d39c4;background: color(~`colorPalette("@{modal-content-bg}", 1)`);border-color: #adc6ff;} .ant-tag-geekblue {color: #1d39c4;background: #f0f5ff;border-color: #adc6ff;}
.ant-tag-geekblue-inverse {color: #fff;background: #2f54eb;border-color: #2f54eb;} .ant-tag-geekblue-inverse {color: #fff;background: #2f54eb;border-color: #2f54eb;}
.ant-tag-purple {color: #531dab;background: #f9f0ff;border-color: #d3adf7;} .ant-tag-purple {color: #531dab;background: color(~`colorPalette("@{alert-success-bg-color}", 2)`);border-color: #d3adf7;}
.ant-tag-purple-inverse {color: #fff;background: #722ed1;border-color: #722ed1;} .ant-tag-purple-inverse {color: #fff;background: #722ed1;border-color: #722ed1;}
.ant-tag-success {color: #52c41a;background: @success-color-deprecated-bg;border-color: @success-color-deprecated-border;} .ant-tag-success {color: #52c41a;background: @success-color-deprecated-bg;border-color: @success-color-deprecated-border;}
.ant-tag-processing {color: @primary-color;background: @info-color-deprecated-bg;border-color: @info-color-deprecated-border;} .ant-tag-processing {color: @primary-color;background: @info-color-deprecated-bg;border-color: @info-color-deprecated-border;}

BIN
web/client/assets/images/leadership/handong.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

BIN
web/client/assets/images/leadership/qiao.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 17 KiB

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

@ -7,25 +7,26 @@ import moment from 'moment';
import { PlusOutlined, UploadOutlined, CloseOutlined } from '@ant-design/icons'; import { PlusOutlined, UploadOutlined, CloseOutlined } from '@ant-design/icons';
class Uploads extends Component { class Uploads extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.ApiRoot = localStorage.getItem('tyApiRoot') this.ApiRoot = localStorage.getItem('tyApiRoot')
this.state = { this.state = {
fileUploading: false, fileUploading: false,
fileList: [], fileList: [],
curPreviewPic: '', curPreviewPic: '',
delPicIng: false, delPicIng: false,
removeFilesList: [] removeFilesList: []
}; };
} }
dealName = (uploaded) => { dealName = (uploaded) => {
let realName = uploaded.split('/')[2] console.log(uploaded)
let x1 = realName.split('.') let realName = uploaded.split('/')[2]
let x2 = x1[0].split('_') let x1 = realName.split('.')
let showName = `${x2[0]}.${x1[1]}` let x2 = x1[0].split('_')
return showName let showName = `${x2[0]}.${x1[1]}`
} return showName
}
setFileList = (value) => { setFileList = (value) => {
let defaultFileList = []; let defaultFileList = [];
@ -52,271 +53,274 @@ class Uploads extends Component {
} }
} }
componentWillReceiveProps(np) { componentWillReceiveProps (np) {
const { dispatch, value: thisEditData, onChange } = this.props; const { dispatch, value: thisEditData, onChange } = this.props;
const { value: nextEditData, clearFileList } = np; const { value: nextEditData, clearFileList } = np;
const setFileList = () => { const setFileList = () => {
let defaultFileList = []; let defaultFileList = [];
defaultFileList = nextEditData.map((u, index) => { defaultFileList = nextEditData.map((u, index) => {
let fileUrl = `${this.ApiRoot}/${u.storageUrl}`; let fileUrl = `${this.ApiRoot}/${u.storageUrl}`;
return { return {
uid: -index - 1, uid: -index - 1,
name: this.dealName(u.storageUrl), name: this.dealName(u.storageUrl),
status: 'done', status: 'done',
storageUrl: u.storageUrl, storageUrl: u.storageUrl,
url: fileUrl, url: fileUrl,
size: u.size || -1 size: u.size || -1
}; };
}); });
this.setState({ this.setState({
fileList: defaultFileList fileList: defaultFileList
}); });
}; };
if (nextEditData && nextEditData.length) { if (nextEditData && nextEditData.length) {
if (!thisEditData || !this.state.fileList.length) { if (!thisEditData || !this.state.fileList.length) {
setFileList(); setFileList();
} else if (nextEditData.length != thisEditData.length) { } else if (nextEditData.length != thisEditData.length) {
setFileList(); setFileList();
} else { } else {
let repeat = true; let repeat = true;
for (let i = 0; i < thisEditData.length; i++) { for (let i = 0; i < thisEditData.length; i++) {
if (thisEditData[i] != nextEditData[i]) { if (thisEditData[i] != nextEditData[i]) {
repeat = false; repeat = false;
break; break;
} }
}
if (!repeat) {
setFileList();
}
} }
} if (!repeat) {
setFileList();
}
}
}
if (clearFileList) {
this.setState({
fileList: []
});
}
if (clearFileList) {
// else{
// this.setState({
// fileList:[],
// })
// }
}
render () {
const UploadPath = {
project: ['txt', 'dwg', 'doc', 'docx', 'xls', 'xlsx', 'pdf', 'png', 'jpg', 'rar', 'zip'],
report: ['doc', 'docx', 'xls', 'xlsx', 'pdf'],
data: ['txt', 'xls', 'xlsx'],
image: ['png', 'jpg', 'svg', 'jpeg'],
three: ['js'],
video: ['mp4']
};
/**
* uploadType string 主要区别文件上传路径 以及类型 web/routes/attachment/index.js UploadPath key 值为准默认 project
* disabled boolean 上传是否可用
* maxFilesNum number 最大上传数量
* fileTypes array[string] 可允许上传的文件类型
* maxFileSize number 单个文件最大大小 M
* listType antd upload 组件的属性
* onChange function 文件数量变化时候回调 返回文件
* value array[obj] 编辑数据 [{url:'xxx', [size:999]}]
* onStateChange function 文件状态改变回调函数 上传中 return { uploading:true/false }
*/
const {
uploadType,
disabled,
maxFilesNum,
fileTypes,
maxFileSize,
listType,
onChange,
value,
showUploadList,
onStateChange
} = this.props;
const { fileList, curPreviewPic, delPicIng, removeFilesList } = this.state;
const that = this;
let uploadType_ = uploadType || 'project';
let maxFilesNum_ = maxFilesNum || 1;
let defaultFileTypes = fileTypes || UploadPath[uploadType_];
const uploadProps = {
name: 'checkFile_',
multiple: false,
showUploadList: showUploadList || true,
action: `${this.ApiRoot}/attachments/${uploadType_}`,
listType: listType || 'text',
disabled: disabled,
beforeUpload: (file) => {
if (fileList.length >= maxFilesNum_) {
message.warning(`最多选择${maxFilesNum_}个文件上传`);
return false;
}
if (file.name.length > 60) {
message.warning(`文件名过长(大于60字符),请修改后上传`);
return false;
}
const extNames = file.name.split('.');
var reg = /^[\.\s\u4e00-\u9fa5a-zA-Z0-9_-]{0,}$/;
if (!reg.exec(file.name)) {
message.warning(`文件名包含除字母、汉字、数字、中划线、下划线之外的字符,请修改后上传`);
return false;
}
let isDAE = false;
if (extNames.length > 0) {
let fileType = extNames[extNames.length - 1].toLowerCase();
isDAE = defaultFileTypes.some((f) => f == fileType);
}
if (!isDAE) {
message.error(`只能上传 ${defaultFileTypes.join()} 格式的文件!`);
return false;
}
const isLt = file.size / 1024 / 1024 < (maxFileSize || 3);
if (!isLt) {
message.error(`文件必须小于${maxFileSize || 3}MB!`);
return false;
}
this.setState({ this.setState({
fileList: [] fileUploading: true
}); });
} if (onStateChange) {
// else{ onStateChange({ uploading: true });
// this.setState({ }
// fileList:[], },
// }) onChange (info) {
// } const status = info.file.status;
} if (status === 'uploading') {
that.setState({
render() { fileList: info.fileList
const UploadPath = { });
project: ['txt', 'dwg', 'doc', 'docx', 'xls', 'xlsx', 'pdf', 'png', 'jpg', 'rar', 'zip'],
report: ['doc', 'docx', 'xls', 'xlsx', 'pdf'],
data: ['txt', 'xls', 'xlsx'],
image: ['png', 'jpg', 'svg', 'jpeg'],
three: ['js'],
video: ['mp4']
};
/**
* uploadType string 主要区别文件上传路径 以及类型 web/routes/attachment/index.js UploadPath key 值为准默认 project
* disabled boolean 上传是否可用
* maxFilesNum number 最大上传数量
* fileTypes array[string] 可允许上传的文件类型
* maxFileSize number 单个文件最大大小 M
* listType antd upload 组件的属性
* onChange function 文件数量变化时候回调 返回文件
* value array[obj] 编辑数据 [{url:'xxx', [size:999]}]
* onStateChange function 文件状态改变回调函数 上传中 return { uploading:true/false }
*/
const {
uploadType,
disabled,
maxFilesNum,
fileTypes,
maxFileSize,
listType,
onChange,
value,
showUploadList,
onStateChange
} = this.props;
const { fileList, curPreviewPic, delPicIng, removeFilesList } = this.state;
const that = this;
let uploadType_ = uploadType || 'project';
let maxFilesNum_ = maxFilesNum || 1;
let defaultFileTypes = fileTypes || UploadPath[uploadType_];
const uploadProps = {
name: 'checkFile_',
multiple: false,
showUploadList: showUploadList || true,
action: `${this.ApiRoot}/attachments/${uploadType_}`,
listType: listType || 'text',
disabled: disabled,
beforeUpload: (file) => {
if (fileList.length >= maxFilesNum_) {
message.warning(`最多选择${maxFilesNum_}个文件上传`);
return false;
}
if (file.name.length > 60) {
message.warning(`文件名过长(大于60字符),请修改后上传`);
return false;
}
const extNames = file.name.split('.');
var reg = /^[\.\s\u4e00-\u9fa5a-zA-Z0-9_-]{0,}$/;
if (!reg.exec(file.name)) {
message.warning(`文件名包含除字母、汉字、数字、中划线、下划线之外的字符,请修改后上传`);
return false;
}
let isDAE = false;
if (extNames.length > 0) {
let fileType = extNames[extNames.length - 1].toLowerCase();
isDAE = defaultFileTypes.some((f) => f == fileType);
}
if (!isDAE) {
message.error(`只能上传 ${defaultFileTypes.join()} 格式的文件!`);
return false;
}
const isLt = file.size / 1024 / 1024 < (maxFileSize || 3);
if (!isLt) {
message.error(`文件必须小于${maxFileSize || 3}MB!`);
return false;
}
this.setState({
fileUploading: true
});
if (onStateChange) {
onStateChange({ uploading: true });
}
},
onChange(info) {
const status = info.file.status;
if (status === 'uploading') {
that.setState({
fileList: info.fileList
});
}
if (status === 'done') {
let { uploaded, url } = info.file.response;
let size = info.file.size;
let nextFileList = fileList;
nextFileList[nextFileList.length - 1] = {
uid: -moment().unix(),
name: that.dealName(uploaded),
status: 'done',
storageUrl: uploaded,
url: url,
size: size
};
onChange(nextFileList);
that.setState({
fileUploading: false,
fileList: nextFileList
});
if (onStateChange) {
onStateChange({ uploading: false });
}
} else if (status === 'error') {
that.setState({
fileUploading: false
});
message.error(`${info.file.name} 上传失败,请重试`);
if (onStateChange) {
onStateChange({ uploading: false });
}
}
},
onRemove(file) {
let nextFileList = [];
fileList.map((f, i) => {
if (f.uid != file.uid) {
nextFileList.push(f);
}
});
let nextRemoveFiles = removeFilesList.concat([file.storageUrl]);
if (curPreviewPic == file.url) {
that.setState({
curPreviewPic: ''
});
}
onChange(nextFileList);
that.setState({
fileList: nextFileList,
removeFilesList: nextRemoveFiles
});
},
onPreview(file) {
let filePostfix = file.url.split('.').pop();
filePostfix = filePostfix.toLowerCase();
if (UploadPath.image.some((img) => img == filePostfix)) {
that.setState({
curPreviewPic: file.url
});
} else {
message.warn('仅支持图片预览');
}
} }
}; if (status === 'done') {
let { uploaded, url } = info.file.response;
let size = info.file.size;
let nextFileList = fileList;
nextFileList[nextFileList.length - 1] = {
uid: -moment().unix(),
name: that.dealName(uploaded),
status: 'done',
storageUrl: uploaded,
url: url,
size: size
};
onChange(nextFileList);
that.setState({
fileUploading: false,
fileList: nextFileList
});
if (onStateChange) {
onStateChange({ uploading: false });
}
} else if (status === 'error') {
that.setState({
fileUploading: false
});
message.error(`${info.file.name} 上传失败,请重试`);
if (onStateChange) {
onStateChange({ uploading: false });
}
}
},
onRemove (file) {
let nextFileList = [];
fileList.map((f, i) => {
if (f.uid != file.uid) {
nextFileList.push(f);
}
});
let nextRemoveFiles = removeFilesList.concat([file.storageUrl]);
if (curPreviewPic == file.url) {
that.setState({
curPreviewPic: ''
});
}
onChange(nextFileList);
that.setState({
fileList: nextFileList,
removeFilesList: nextRemoveFiles
});
},
onPreview (file) {
let filePostfix = file.url.split('.').pop();
filePostfix = filePostfix.toLowerCase();
if (UploadPath.image.some((img) => img == filePostfix)) {
that.setState({
curPreviewPic: file.url
});
} else {
message.warn('仅支持图片预览');
}
}
};
let fileList_ = fileList let fileList_ = fileList
// .map(f => { // .map(f => {
// if (f.storageUrl) { // if (f.storageUrl) {
// let realName = f.storageUrl.split('/').pop() // let realName = f.storageUrl.split('/').pop()
// if (f.name != realName) { // if (f.name != realName) {
// f.name = realName // f.name = realName
// } // }
// } // }
// return f // return f
// }) // })
return ( return (
<div> <div>
<Spin spinning={delPicIng}> <Spin spinning={delPicIng}>
<Upload {...uploadProps} fileList={fileList_}> <Upload {...uploadProps} fileList={fileList_}>
{ {
disabled ? ( disabled ? (
'' ''
) : ) :
listType == 'picture-card' ? listType == 'picture-card' ?
( (
fileList.length >= maxFilesNum_ ? null : ( fileList.length >= maxFilesNum_ ? null : (
<div style={{}}> <div style={{}}>
<PlusOutlined /> <PlusOutlined />
<div>上传图片</div> <div>上传图片</div>
</div> </div>
) )
) : ( ) : (
<Button disabled={fileList.length >= maxFilesNum_} icon={<UploadOutlined />}> 文件上传 </Button> <Button disabled={fileList.length >= maxFilesNum_} icon={<UploadOutlined />}> 文件上传 </Button>
) )
} }
</Upload> </Upload>
{ {
curPreviewPic ? ( curPreviewPic ? (
<Card <Card
bodyStyle={{ bodyStyle={{
padding: 8 padding: 8
}} }}
> >
<div style={{ marginBottom: 8 }} > <div style={{ marginBottom: 8 }} >
<span>文件预览</span> <span>文件预览</span>
<span <span
style={{ float: 'right' }} style={{ float: 'right' }}
onClick={() => { this.setState({ curPreviewPic: '' }); }} onClick={() => { this.setState({ curPreviewPic: '' }); }}
> >
<CloseOutlined style={{ fontSize: 20 }} /> <CloseOutlined style={{ fontSize: 20 }} />
</span> </span>
</div> </div>
<img style={{ width: '100%' }} src={curPreviewPic}></img> <img style={{ width: '100%' }} src={curPreviewPic}></img>
</Card> </Card>
) : '' ) : ''
} }
</Spin> </Spin>
</div> </div>
); );
} }
} }
function mapStateToProps(state) { function mapStateToProps (state) {
const { auth } = state const { auth } = state
return { return {
user: auth.user user: auth.user
}; };
} }
export default connect(mapStateToProps)(Uploads); export default connect(mapStateToProps)(Uploads);

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

@ -1,7 +1,7 @@
import { basicAction } from '@peace/utils' import { basicAction } from '@peace/utils'
import { ApiTable } from '$utils' import { ApiTable } from '$utils'
export function getDepMessage () { export function getDepMessage() {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -23,7 +23,7 @@ export function getDepMessage () {
// }); // });
// } // }
export function getOperaTional (query) { export function getOperaTional(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -34,7 +34,7 @@ export function getOperaTional (query) {
}); });
} }
export function putOperaTional (query) { export function putOperaTional(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -45,7 +45,7 @@ export function putOperaTional (query) {
}); });
} }
export function getSpecificVehicle (query) { export function getSpecificVehicle(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -56,7 +56,7 @@ export function getSpecificVehicle (query) {
}); });
} }
export function putSpecificVehicle (query) { export function putSpecificVehicle(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -67,7 +67,7 @@ export function putSpecificVehicle (query) {
}); });
} }
export function putHouseholds (query) { export function putHouseholds(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -78,7 +78,7 @@ export function putHouseholds (query) {
}); });
} }
export function getHouseholds (query) { export function getHouseholds(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -89,7 +89,7 @@ export function getHouseholds (query) {
}); });
} }
export function getRoadway (query) { export function getRoadway(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -100,7 +100,7 @@ export function getRoadway (query) {
}); });
} }
export function putRoadway (query) { export function putRoadway(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -111,7 +111,7 @@ export function putRoadway (query) {
}); });
} }
export function getBridge (query) { export function getBridge(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -122,7 +122,7 @@ export function getBridge (query) {
}); });
} }
export function putBridge (query) { export function putBridge(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -133,7 +133,7 @@ export function putBridge (query) {
}); });
} }
export function getProject (query) { export function getProject(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -144,7 +144,7 @@ export function getProject (query) {
}); });
} }
export function putProject (query) { export function putProject(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -155,7 +155,7 @@ export function putProject (query) {
}); });
} }
export function getHighways (query) { export function getHighways(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -166,7 +166,7 @@ export function getHighways (query) {
}); });
} }
export function putHighways (query) { export function putHighways(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -177,7 +177,7 @@ export function putHighways (query) {
}); });
} }
export function getCircuit (query) { export function getCircuit(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -188,7 +188,7 @@ export function getCircuit (query) {
}); });
} }
export function putCircuit (query) { export function putCircuit(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -199,7 +199,7 @@ export function putCircuit (query) {
}); });
} }
export function getVehicle (query) { export function getVehicle(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -210,7 +210,7 @@ export function getVehicle (query) {
}); });
} }
export function putVehicle (query) { export function putVehicle(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -221,7 +221,7 @@ export function putVehicle (query) {
}); });
} }
export function delRoadway (query) { export function delRoadway(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'del', type: 'del',
dispatch: dispatch, dispatch: dispatch,
@ -231,7 +231,7 @@ export function delRoadway (query) {
}); });
} }
export function delProject (query) { export function delProject(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'del', type: 'del',
dispatch: dispatch, dispatch: dispatch,
@ -241,7 +241,7 @@ export function delProject (query) {
}); });
} }
export function delBridge (query) { export function delBridge(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'del', type: 'del',
dispatch: dispatch, dispatch: dispatch,
@ -251,7 +251,7 @@ export function delBridge (query) {
}); });
} }
export function delSpecificVehicle (query) { export function delSpecificVehicle(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'del', type: 'del',
dispatch: dispatch, dispatch: dispatch,
@ -261,7 +261,7 @@ export function delSpecificVehicle (query) {
}); });
} }
export function delHouseholds (query) { export function delHouseholds(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'del', type: 'del',
dispatch: dispatch, dispatch: dispatch,
@ -271,7 +271,7 @@ export function delHouseholds (query) {
}); });
} }
export function delCircuit (query) { export function delCircuit(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'del', type: 'del',
dispatch: dispatch, dispatch: dispatch,
@ -281,7 +281,7 @@ export function delCircuit (query) {
}); });
} }
export function delVehicle (query) { export function delVehicle(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'del', type: 'del',
dispatch: dispatch, dispatch: dispatch,
@ -292,7 +292,7 @@ export function delVehicle (query) {
}); });
} }
export function getPurchase (query) { export function getPurchase(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -303,7 +303,7 @@ export function getPurchase (query) {
}); });
} }
export function putPurchase (query) { export function putPurchase(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -314,7 +314,7 @@ export function putPurchase (query) {
}); });
} }
export function delPurchase (query) { export function delPurchase(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'del', type: 'del',
dispatch: dispatch, dispatch: dispatch,
@ -325,7 +325,7 @@ export function delPurchase (query) {
}); });
} }
export function getPropagata (query) { export function getPropagata(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
@ -336,7 +336,7 @@ export function getPropagata (query) {
// reducer: { name: 'reportstatistic' } // reducer: { name: 'reportstatistic' }
}); });
} }
export function putAddPropagata (query) { export function putAddPropagata(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -347,7 +347,7 @@ export function putAddPropagata (query) {
// reducer: { name: 'reportstatistic' } // reducer: { name: 'reportstatistic' }
}); });
} }
export function putEditPropagata (query) { export function putEditPropagata(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'put', type: 'put',
dispatch: dispatch, dispatch: dispatch,
@ -358,7 +358,7 @@ export function putEditPropagata (query) {
// reducer: { name: 'reportstatistic' } // reducer: { name: 'reportstatistic' }
}); });
} }
export function delPropagata (query) { export function delPropagata(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'del', type: 'del',
dispatch: dispatch, dispatch: dispatch,

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

@ -1,12 +1,12 @@
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { Form, Spin, Table } from 'antd'; import { Form, Spin, Table } from 'antd';
import { DrawerForm, ProForm, ProFormText, ProFormSelect,ProFormDatePicker } from '@ant-design/pro-form'; import { DrawerForm, ProForm, ProFormText, ProFormSelect } from '@ant-design/pro-form';
import { putRoadway, putSpecificVehicle, putHouseholds, putCircuit, putVehicle, putPurchase } from "../../actions/infor" import { putRoadway, putSpecificVehicle, putHouseholds,putCircuit,putVehicle } from "../../actions/infor"
import { putBridge } from "../../actions/infor" import { putBridge } from "../../actions/infor"
import _ from 'lodash' import _ from 'lodash'
const UserModal = (props) => { const UserModal = (props) => {
const { visible, onVisibleChange, typecard, rewkeys, data, recortd, sitename, dispatch, setRecortd, setMonitor, setDelet, whichofits } = props const { visible, onVisibleChange, typecard, rewkeys, data, recortd, sitename, dispatch, setRecortd, engineering } = props
const [newlys, setNewlys] = useState() //必填数据 const [newlys, setNewlys] = useState() //必填数据
const [newlysay, setNewlysay] = useState() //处理hou const [newlysay, setNewlysay] = useState() //处理hou
const [records, setRecords] = useState()//处理 const [records, setRecords] = useState()//处理
@ -65,14 +65,6 @@ const UserModal = (props) => {
setNewlys(array?.splice(0, 2)) setNewlys(array?.splice(0, 2))
setNewlysay(array) setNewlysay(array)
} }
if (rewkeys === 'zhichao') {
_.forIn(data, function (value, key) {
array.push({ name: value, type: key })
});
setNewlys(array?.splice(0, 2))
array?.splice(6, 1)
setNewlysay(array)
}
}, []) }, [])
useEffect(() => { useEffect(() => {
const arr = [] const arr = []
@ -125,13 +117,6 @@ const UserModal = (props) => {
setRecordsay(arr.splice(1, 2)) setRecordsay(arr.splice(1, 2))
// setEstablishment(arr.splice(-1, 1)) // setEstablishment(arr.splice(-1, 1))
setRecords(arr) setRecords(arr)
} if (rewkeys === 'zhichao') {
_.forIn(recortd, function (value, key) {
arr.push({ value: value, type: key })
});
setRecordsay(arr.splice(1, 2))
// setEstablishment(arr.splice(-1, 1))
setRecords(arr)
} }
}, [recortd]) }, [recortd])
useEffect(() => { useEffect(() => {
@ -151,143 +136,104 @@ const UserModal = (props) => {
onFinish={(values) => { onFinish={(values) => {
if (Object.values(values).length > 0) { if (Object.values(values).length > 0) {
if (rewkeys === 'transportation') { if (rewkeys === 'transportation') {
if (typecard == 'compile') { if (typecard == '111') {
setDelet(values) setDelet(values)
const query = { ...values, level: whichofits, roadId: records?.[0]?.value || '' } const query = { ...values, level: whichofits, roadId: records?.[0]?.value || '' }
dispatch(putRoadway(query)).then((res) => { dispatch(putRoadway(query)).then((res) => {
})
return true })
return true
} else { } else {
setDelet(values) setDelet(values)
const query = { ...values, level: whichofits } const query = { ...values, level: whichofits }
dispatch(putRoadway(query)).then((res) => { dispatch(putRoadway(query)).then((res) => {
}) })
return true return true
} }
} }
if (rewkeys === 'bridge') { if (rewkeys === 'bridge') {
if (typecard == 'compile') { if (typecard == '111') {
setDelet(values) setDelet(values)
const query = { ...values, bridgeId: records?.[0]?.value || '' } const query = { ...values, roadId: records?.[0]?.value || '' }
dispatch(putBridge(query)).then((res) => { dispatch(putBridge(query)).then((res) => {
}) })
return true return true
} else { } else {
setDelet(values) setDelet(values)
const query = { ...values } const query = { ...values }
dispatch(putBridge(query)).then((res) => { dispatch(putBridge(query)).then((res) => {
}) })
return true return true
} }
} }
if (rewkeys === 'weihuo') { if (rewkeys === 'weihuo' || rewkeys === 'chuzu') {
if (typecard == 'compile') { if (typecard == '111') {
setDelet(values) setDelet(values)
const query = { ...values, vehicleId: records?.[0]?.value || '', type: '危货' } const query = { ...values, vehicleId: records?.[0]?.value || '', type: rewkeys == 'chuzu' ? '出租车' : '危货' }
dispatch(putSpecificVehicle(query)).then((res) => { dispatch(putSpecificVehicle(query)).then((res) => {
}) })
return true return true
} else { } else {
setDelet(values)
setDelet(values) const query = { ...values, type: rewkeys == 'chuzu' ? '出租车' : '危货' }
const query = { ...values, type: '危货' }
dispatch(putSpecificVehicle(query)).then((res) => { dispatch(putSpecificVehicle(query)).then((res) => {
})
return true
}
}
if (rewkeys === 'chuzu') {
if (typecard == 'compile') {
setDelet(values)
const query = { ...values, vehicleId: records?.[0]?.value || '', type: '出租车' }
dispatch(putSpecificVehicle(query)).then((res) => {
})
return true
} else {
setDelet(values)
const query = { ...values, type: '出租车' }
dispatch(putSpecificVehicle(query)).then((res) => {
}) })
return true return true
} }
} }
if (rewkeys === 'yehu') { if (rewkeys === 'yehu') {
if (typecard == 'compile') { if (typecard == '111') {
setDelet(values) setDelet(values)
const query = { ...values, businessId: records?.[0]?.value, type: values.type } const query = { ...values, businessId: records?.[0]?.value, type: rewkeys == 'chuzu' ? '出租车' : '危货' }
dispatch(putHouseholds(query)).then((res) => { dispatch(putHouseholds(query)).then((res) => {
}) })
return true return true
} else { } else {
setDelet(values) setDelet(values)
const query = { ...values, type: values.type } const query = { ...values, type: rewkeys === 'chuzu' ? '出租车' : '危货' }
dispatch(putHouseholds(query)).then((res) => { dispatch(putHouseholds(query)).then((res) => {
}) })
return true return true
} }
} if (rewkeys === 'xianlu') { } if (rewkeys === 'xianlu') {
if (typecard == 'compile') { if (typecard == '111') {
setDelet(values) setDelet(values)
const query = { ...values, lineId: records?.[0]?.value || '' } const query = { ...values, lineId: records?.[0]?.value || '' }
dispatch(putCircuit(query)).then((res) => { dispatch(putCircuit(query)).then((res) => {
}) })
return true return true
} else { } else {
setDelet(values) setDelet(values)
const query = { ...values } const query = { ...values }
dispatch(putCircuit(query)).then((res) => { dispatch(putCircuit(query)).then((res) => {
}) })
return true return true
} }
} }
if (rewkeys === 'cheliang') { if (rewkeys === 'cheliang') {
if (typecard == 'compile') { if (typecard == '111') {
setDelet(values) setDelet(values)
const query = { ...values, carId: records?.[0]?.value || '' } const query = { ...values, carId: records?.[0]?.value || '' }
dispatch(putVehicle(query)).then((res) => { dispatch(putVehicle(query)).then((res) => {
}) })
return true return true
} else { } else {
setDelet(values) setDelet(values)
const query = { ...values } const query = { ...values }
dispatch(putVehicle(query)).then((res) => { dispatch(putVehicle(query)).then((res) => {
})
return true
}
}
if (rewkeys === 'zhichao') {
if (typecard == 'compile') {
setDelet(values)
const query = { ...values, overspeedId: records?.[0]?.value || '' }
dispatch(putPurchase(query)).then((res) => {
setMonitor(res)
})
return true
} else {
setDelet(values)
const query = { ...values }
dispatch(putPurchase(query)).then((res) => {
setMonitor(res)
}) })
return true return true
} }
@ -297,13 +243,14 @@ const UserModal = (props) => {
}} }}
initialValues={recortd} initialValues={recortd}
> >
{typecard == 'compile' ? {typecard == '111' ?
<ProForm.Group <ProForm.Group
> >
<ProFormText <ProFormText
name={newlys?.[0]?.type} name={newlys?.[0]?.type}
width="md" width="md"
label={newlys?.[0]?.name} label={newlys?.[0]?.name}
placeholder="请输入名称" placeholder="请输入名称"
value={recordsay?.[0]?.value} value={recordsay?.[0]?.value}
// rules={[{ required: true, message: "必填" }]} // rules={[{ required: true, message: "必填" }]}
@ -311,7 +258,7 @@ const UserModal = (props) => {
name={newlys?.[1]?.type} name={newlys?.[1]?.type}
width="md" width="md"
label={newlys?.[1]?.name} label={newlys?.[1]?.name}
placeholder="请输入名称" placeholder="请输入名称"
value={recordsay?.[1]?.value} value={recordsay?.[1]?.value}
// rules={[{ required: true, message: "必填" }]} // rules={[{ required: true, message: "必填" }]}
@ -332,7 +279,6 @@ const UserModal = (props) => {
label='类型' label='类型'
/> : null /> : null
} }
{rewkeys === 'zhichao'?<ProFormDatePicker name="testTime" label="检测时间" />:''}
{newlysay?.map((item, index) => { {newlysay?.map((item, index) => {
return <ProFormText width="md" return <ProFormText width="md"
name={item?.type} label={newlysay[index]?.name} placeholder="请输入名称" name={item?.type} label={newlysay[index]?.name} placeholder="请输入名称"
@ -346,7 +292,7 @@ const UserModal = (props) => {
name={newlys?.[0]?.type} name={newlys?.[0]?.type}
width="md" width="md"
label={newlys?.[0]?.name} label={newlys?.[0]?.name}
placeholder="请输入名称" placeholder="请输入名称"
// value={recordssy?.[0]?.value} // value={recordssy?.[0]?.value}
// rules={[{ required: true, message: "必填" }]} // rules={[{ required: true, message: "必填" }]}
@ -354,7 +300,7 @@ const UserModal = (props) => {
name={newlys?.[1]?.type} name={newlys?.[1]?.type}
width="md" width="md"
label={newlys?.[1]?.name} label={newlys?.[1]?.name}
placeholder="请输入名称" placeholder="请输入名称"
// value={recordssy?.[1]?.value} // value={recordssy?.[1]?.value}
// rules={[{ required: true, message: "必填" }]} // rules={[{ required: true, message: "必填" }]}
@ -375,11 +321,10 @@ const UserModal = (props) => {
label='类型' label='类型'
/> : null /> : null
} }
{rewkeys === 'zhichao'?<ProFormDatePicker name="testTime" label="检测时间" />:''}
{newlysay?.map((item, index) => { {newlysay?.map((item, index) => {
return <ProFormText width="md" return <ProFormText width="md"
name={item?.type} label={newlysay[index]?.name} placeholder="请输入名称" key={index} name={item?.type} label={newlysay[index]?.name} placeholder="请输入名称" key={index}
/> />
})} })}

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

@ -8,8 +8,11 @@ import { getPropagata } from '../../actions/infor';
const VideoUpload = (props) => { const VideoUpload = (props) => {
// const [counts, setCounts] = useState()//shuju
const { dispatch, record, counts, setCounts } = props const { dispatch, record, counts, setCounts } = props
const [success, setSuccess] = useState() //状态
const [form] = Form.useForm(); const [form] = Form.useForm();
//弹窗 //弹窗
@ -203,7 +206,7 @@ const VideoUpload = (props) => {
function mapStateToProps (state) { function mapStateToProps(state) {
const { depMessage } = state; const { depMessage } = state;
const pakData = (dep) => { const pakData = (dep) => {
return dep.map((d) => { return dep.map((d) => {

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

@ -22,9 +22,6 @@ const OperaTionalTable = (props) => {
const [recortd, setRecortd] = useState() const [recortd, setRecortd] = useState()
const [rewkeys, setRewkeys] = useState('keyun') const [rewkeys, setRewkeys] = useState('keyun')
const [delet, setDelet] = useState() const [delet, setDelet] = useState()
const [differentiate, setDifferentiate] = useState()
const [genre, setGenre] = useState()
const ref = useRef() const ref = useRef()
useEffect(() => { ref.current.reload() }, [rewkeys, activeKey, delet]) useEffect(() => { ref.current.reload() }, [rewkeys, activeKey, delet])
@ -65,6 +62,22 @@ const OperaTionalTable = (props) => {
setModalRecord(null); setModalRecord(null);
} }
} }
//批量导出
const exports = (ids, counts) => {
// console.log(user);
let reportIds = [];
if (ids.length)
reportIds = ids
else
reportIds = (counts || {}).ids || [];
superagent.post('/_report/http')
.send({ id: reportIds.map(i => Number(i)) }).end((err, res) => {
const resTextIs = res.text.split('/').pop()
window.open(
'/_api/' +
`attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
})
}
const columns = { const columns = {
tab1: [ tab1: [
{ {
@ -110,7 +123,7 @@ const OperaTionalTable = (props) => {
return <div><Button type="link" return <div><Button type="link"
onClick={() => { onClick={() => {
hightModal('edit', record) hightModal('edit', record)
setTypecard('compile') setTypecard('111')
setRecortd(record) setRecortd(record)
}} }}
>编辑</Button></div> >编辑</Button></div>
@ -697,7 +710,7 @@ const OperaTionalTable = (props) => {
return <div><Button type="link" return <div><Button type="link"
onClick={() => { onClick={() => {
openModal('edit', record) openModal('edit', record)
setTypecard('compile') setTypecard('111')
setRecortd(record) setRecortd(record)
}} }}
>编辑</Button> <Popconfirm title='' onConfirm={() => { deldata(record.id) }}> >编辑</Button> <Popconfirm title='' onConfirm={() => { deldata(record.id) }}>
@ -1330,7 +1343,7 @@ const OperaTionalTable = (props) => {
return <div><Button type="link" return <div><Button type="link"
onClick={() => { onClick={() => {
openModal('edit', record) openModal('edit', record)
setTypecard('compile') setTypecard('111')
setRecortd(record) setRecortd(record)
}} }}
>编辑</Button> <Popconfirm title='' onConfirm={() => { deldata(record.id) }}> >编辑</Button> <Popconfirm title='' onConfirm={() => { deldata(record.id) }}>
@ -1799,9 +1812,7 @@ const OperaTionalTable = (props) => {
render: (dom, record) => { render: (dom, record) => {
return <div><Button type="link" return <div><Button type="link"
onClick={() => { onClick={() => {
openModal('edit', record) // dispatch(push(`article/update/post`));
setTypecard('compile')
setRecortd(record)
}} }}
>编辑</Button><Popconfirm title='' onConfirm={() => { deldatas(record.id) }}> >编辑</Button><Popconfirm title='' onConfirm={() => { deldatas(record.id) }}>
<Button type="link">删除</Button> <Button type="link">删除</Button>
@ -1870,8 +1881,6 @@ const OperaTionalTable = (props) => {
label: <span onClick={() => { label: <span onClick={() => {
{ {
setRewkeys('chuzu') setRewkeys('chuzu')
setDifferentiate('vehicle')
setGenre('出租车')
} }
}}>出租车{activeKey === 'tab2'}</span>, }}>出租车{activeKey === 'tab2'}</span>,
@ -1881,9 +1890,6 @@ const OperaTionalTable = (props) => {
label: <span onClick={() => { label: <span onClick={() => {
{ {
setRewkeys('weihuo') setRewkeys('weihuo')
setDifferentiate('vehicle')
setGenre('危货')
} }
}}>危险货运{activeKey === 'tab3'}</span>, }}>危险货运{activeKey === 'tab3'}</span>,
@ -1905,7 +1911,7 @@ const OperaTionalTable = (props) => {
rowKey='id' rowKey='id'
// alwaysShowAlert // alwaysShowAlert
// tableAlertRender={true} // tableAlertRender={true}
rowSelection={ rewkeys=='keyun'?false:{ rowSelection={rewkeys == 'keyun' ? false : {
selectedRowKeys: rowSelected, selectedRowKeys: rowSelected,
onChange: (selectedRowKeys) => { onChange: (selectedRowKeys) => {
setRowSelected(selectedRowKeys); setRowSelected(selectedRowKeys);

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

@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState, useRef } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { Spin, Button, Popconfirm, Switch } from 'antd'; import { Spin, Button, Popconfirm, Switch } from 'antd';
import ProTable from '@ant-design/pro-table'; import ProTable from '@ant-design/pro-table';
@ -151,7 +151,7 @@ const promotionalTable = (props) => {
) )
} }
function mapStateToProps (state) { function mapStateToProps(state) {
const { auth, depMessage } = state; const { auth, depMessage } = state;
const pakData = (dep) => { const pakData = (dep) => {

2
web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js

@ -15,7 +15,7 @@ export default function LeftItem({datas}) {
textStyle: { textStyle: {
color: '#fff', color: '#fff',
}, },
formatter: (values) => `${values.name}<b>${datas.processed}</b>`, formatter: (values) => ` ${values.name}<b>${datas.processed}</b>`,
}, },
title: { title: {
text: `${(datas.processed*100/datas.total).toFixed(2)}%`, text: `${(datas.processed*100/datas.total).toFixed(2)}%`,

8
web/client/src/sections/quanju/containers/footer/leadership/centerleft/echarts/centerleftecharts.js

@ -9,9 +9,9 @@ const Leftbottomecharts = (props) => {
const [max, setMax] = useState() const [max, setMax] = useState()
useEffect(() => { useEffect(() => {
const yunzheng = dispatch(getyunzheng()).then((res) => { const yunzheng = dispatch(getyunzheng()).then((res) => {
// console.log(res.payload); console.log(res.payload);
setMax(Math.max.apply(null, [res.payload.data.passengerTransport, res.payload.data.hazardousGoods, res.payload.data.taxi, res.payload.data.bus])); setMax(Math.max.apply(null, [res.payload.data.passengerTransport, res.payload.data.hazardousGoods, res.payload.data.taxi, res.payload.data.bus]));
setList([res.payload.data.passengerTransport, res.payload.data.hazardousGoods, res.payload.data.taxi, res.payload.data.bus]) setList([res.payload.data.passengerTransport, res.payload.data.hazardousGoodsBusiness.length, res.payload.data.hazardousGoods, res.payload.data.taxi, res.payload.data.bus])
}) })
}, []) }, [])
@ -100,7 +100,7 @@ const Leftbottomecharts = (props) => {
width: 2, width: 2,
}, },
}, },
data: ["客运车", "危险货运", "出租车", "公交"], data: ["客运车", "货运", "危险货运", "出租车", "公交"],
}, },
], ],
series: [ series: [
@ -111,7 +111,7 @@ const Leftbottomecharts = (props) => {
// zlevel: 1, // zlevel: 1,
barCategoryGap: "50%", barCategoryGap: "50%",
color: "#042B7F", color: "#042B7F",
data: [max + 20, max + 20, max + 20, max + 20], data: [max + 20, max + 20, max + 20, max + 20, max + 20],
tooltip: { tooltip: {
show: false, show: false,
}, },

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

@ -3,95 +3,86 @@ import { ProxyRequest } from "@peace/utils";
export const GodTransRequest = new ProxyRequest("_godTrans"); export const GodTransRequest = new ProxyRequest("_godTrans");
export const ApiTable = { export const ApiTable = {
login: 'login', login: 'login',
logout: 'logout', logout: 'logout',
getEnterprisesMembers: 'enterprises/{enterpriseId}/members', getEnterprisesMembers: 'enterprises/{enterpriseId}/members',
//组织管理-用户管理-部门 //组织管理-用户管理-部门
getDepMessage: 'department', getDepMessage: 'department',
createDepMessage: 'department', createDepMessage: 'department',
updateDepMessage: 'department', updateDepMessage: 'department',
delDepMessage: 'department/{depId}', delDepMessage: 'department/{depId}',
//组织管理-用户管理-用户 //组织管理-用户管理-用户
getDepUser: 'department/{depId}/user', getDepUser: 'department/{depId}/user',
createUser: 'department/user', createUser: 'department/user',
updateUser: 'department/user/{userId}', updateUser: 'department/user/{userId}',
delUser: 'department/user/{userIds}', delUser: 'department/user/{userIds}',
resetPwd: 'department/user/{userId}/password', resetPwd: 'department/user/{userId}/password',
//用户权限 //用户权限
getResource: 'resource', getResource: 'resource',
getUserResource: 'user/resource', getUserResource: 'user/resource',
postUserRes: 'user/resource', postUserRes: 'user/resource',
//报表配置 //报表配置
allAreas: 'allAreas', allAreas: 'allAreas',
addReportConfig: 'report/config', addReportConfig: 'report/config',
getReportConfig: 'report/config', getReportConfig: 'report/config',
editReportConfig: 'report/{reportId}/config', editReportConfig: 'report/{reportId}/config',
delReportConfig: 'report/{reportId}/config', delReportConfig: 'report/{reportId}/config',
// 报表编辑 // 报表编辑
getReportRectify: 'report/rectify', getReportRectify: 'report/rectify',
getReportRectifyDetail: 'report/rectify/detail', getReportRectifyDetail: 'report/rectify/detail',
compileReportRectifyDetail: 'report/rectify/detail', compileReportRectifyDetail: 'report/rectify/detail',
getReportList: 'report/list', getReportList: 'report/list',
getReportDetail: 'report/{reportId}/detail', getReportDetail: 'report/{reportId}/detail',
getUsers: 'user', getUsers: 'user',
//档案管理
uploadFile: 'netdisk-files/upload', //运政管理
deleteFile: 'netdisk-files/delete', getOperaTional: 'vehicle', putOperaTional: 'vehicle',
getFileList: 'netdisk-files/query', getSpecificVehicle: 'vehicle/specific', putSpecificVehicle: 'vehicle/specific', delSpecificVehicle: 'vehicle/{vehicleId}/specific',
createFileDir: 'create/struct/dir', getHouseholds: 'vehicle/business', putHouseholds: 'vehicle/business', delHouseholds: 'vehicle/business/{businessId}',
delFileDir: 'netdisk-files/dir/delete', getRoadway: 'road',
queryFileDIr: 'get/file/dirs', // 获取运政统计
updateFileDir: 'netdisk-files/struct/dir/update', getYunZheng: "transportation/statistic",
//桥梁管理
getBridge: 'bridge',
//运政管理 putBridge: 'bridge',
getOperaTional: 'vehicle', putOperaTional: 'vehicle', delBridge: 'bridge/{bridgeId}',
getSpecificVehicle: 'vehicle/specific', putSpecificVehicle: 'vehicle/specific', delSpecificVehicle: 'vehicle/{vehicleId}/specific', //工程数据
getHouseholds: 'vehicle/business', putHouseholds: 'vehicle/business', delHouseholds: 'vehicle/business/{businessId}', getProject: 'project',
getRoadway: 'road', putProject: 'project',
// 获取运政统计 delProject: 'project/{projectId}',
getYunZheng: "transportation/statistic", //道路数据
//桥梁管理 getRoadway: 'road',
getBridge: 'bridge', putRoadway: 'road',
putBridge: 'bridge', delRoadway: 'road/{roadId}',
delBridge: 'bridge/{bridgeId}', //道路统计
//工程数据 getBgroadstatistics: "build/road_state",
getProject: 'project',
putProject: 'project', //治超监测点处理数据
delProject: 'project/{projectId}', getzhichaomanager: 'manage/overspeed/processed',
//道路数据
getRoadway: 'road', //获取治超详情数据
putRoadway: 'road', getzhichaodetail: '/manage/overspeed',
delRoadway: 'road/{roadId}', // 获取道路养护统计及列表
//道路统计 getroadmaintain: "conserve/statistic",
getBgroadstatistics: "build/road_state", // 获取治超详情列
getzhichaoList: "manage/overspeed",
//治超监测点处理数据
getzhichaomanager: 'manage/overspeed/processed', //大屏运营 —— 公交车辆层级信息
getBusTier: '/operation/car_level',
//获取治超详情数据
getzhichaodetail: '/manage/overspeed', //获取路政列表
// 获取道路养护统计及列表 getHighways: 'road_manage', putHighways: 'road_manage',
getroadmaintain: "conserve/statistic",
// 获取治超详情列 //获取道路养护统计及列表
getzhichaoList: "manage/overspeed", getRoadMaintenance: 'conserve/statistic',
//大屏运营 —— 公交车辆层级信息
getBusTier: '/operation/car_level',
//获取路政列表
getHighways: 'road_manage', putHighways: 'road_manage',
//获取道路养护统计及列表
getRoadMaintenance: 'conserve/statistic',
//获取宣传数据 //获取宣传数据
getpropagata: 'publicity',putpropagata:'publicity',delpropagata:'/publicity/{publicityId}', getpropagata: 'publicity',putpropagata:'publicity',delpropagata:'/publicity/{publicityId}',
@ -105,19 +96,178 @@ export const ApiTable = {
getVehicle: 'bus/car', putVehicle: 'bus/car', delVehicle: 'bus/car/{carId}', getVehicle: 'bus/car', putVehicle: 'bus/car', delVehicle: 'bus/car/{carId}',
// 获取道路拥堵指数
getgodshuju: "data/god_trans",
//治超管理
getPurchase: 'overspeed', //治超管理
putPurchase: 'overspeed', getPurchase: 'overspeed',
delPurchase: 'overspeed/{overspeedId}', putPurchase: 'overspeed',
// >>>>>>> a3fe9bee43370f1e5ceb69dcdef1b9b7cbf9c84c delPurchase: 'overspeed/{overspeedId}',
login: 'login',
logout: 'logout',
getEnterprisesMembers: 'enterprises/{enterpriseId}/members',
//组织管理-用户管理-部门
getDepMessage: 'department',
createDepMessage: 'department',
updateDepMessage: 'department',
delDepMessage: 'department/{depId}',
//组织管理-用户管理-用户
getDepUser: 'department/{depId}/user',
createUser: 'department/user',
updateUser: 'department/user/{userId}',
delUser: 'department/user/{userIds}',
resetPwd: 'department/user/{userId}/password',
//用户权限
getResource: 'resource',
getUserResource: 'user/resource',
postUserRes: 'user/resource',
//报表配置
allAreas: 'allAreas',
addReportConfig: 'report/config',
getReportConfig: 'report/config',
editReportConfig: 'report/{reportId}/config',
delReportConfig: 'report/{reportId}/config',
// 报表编辑
getReportRectify: 'report/rectify',
getReportRectifyDetail: 'report/rectify/detail',
compileReportRectifyDetail: 'report/rectify/detail',
getReportList: 'report/list',
getReportDetail: 'report/{reportId}/detail',
getUsers: 'user',
//运政管理
getOperaTional: 'vehicle', putOperaTional: 'vehicle',
getSpecificVehicle: 'vehicle/specific', putSpecificVehicle: 'vehicle/specific', delSpecificVehicle: 'vehicle/{vehicleId}/specific',
getHouseholds: 'vehicle/business', putHouseholds: 'vehicle/business', delHouseholds: 'vehicle/business/{businessId}',
getRoadway: 'road',
// 获取运政统计
getYunZheng: "transportation/statistic",
//桥梁管理
getBridge: 'bridge',
putBridge: 'bridge',
delBridge: 'bridge/{bridgeId}',
//工程数据
getProject: 'project',
putProject: 'project',
delProject: 'project/{projectId}',
//道路数据
getRoadway: 'road',
putRoadway: 'road',
delRoadway: 'road/{roadId}',
//道路统计
getBgroadstatistics: "build/road_state",
//治超监测点处理数据
getzhichaomanager: 'manage/overspeed/processed',
//获取治超详情数据
getzhichaodetail: '/manage/overspeed',
// 获取道路养护统计及列表
getroadmaintain: "conserve/statistic",
// 获取治超详情列
getzhichaoList: "manage/overspeed",
//大屏运营 —— 公交车辆层级信息
getBusTier: '/operation/car_level',
//获取路政列表
getHighways: 'road_manage', putHighways: 'road_manage',
//获取道路养护统计及列表
getRoadMaintenance: 'conserve/statistic',
//获取宣传数据
getpropagata: 'publicity',
login: 'login',
logout: 'logout',
getEnterprisesMembers: 'enterprises/{enterpriseId}/members',
//组织管理-用户管理-部门
getDepMessage: 'department',
createDepMessage: 'department',
updateDepMessage: 'department',
delDepMessage: 'department/{depId}',
//组织管理-用户管理-用户
getDepUser: 'department/{depId}/user',
createUser: 'department/user',
updateUser: 'department/user/{userId}',
delUser: 'department/user/{userIds}',
resetPwd: 'department/user/{userId}/password',
//用户权限
getResource: 'resource',
getUserResource: 'user/resource',
postUserRes: 'user/resource',
//报表配置
allAreas: 'allAreas',
addReportConfig: 'report/config',
getReportConfig: 'report/config',
editReportConfig: 'report/{reportId}/config',
delReportConfig: 'report/{reportId}/config',
// 报表编辑
getReportRectify: 'report/rectify',
getReportRectifyDetail: 'report/rectify/detail',
compileReportRectifyDetail: 'report/rectify/detail',
getReportList: 'report/list',
getReportDetail: 'report/{reportId}/detail',
getUsers: 'user',
//运政管理
getOperaTional: 'vehicle',
getSpecificVehicle: 'vehicle/specific',
getHouseholds: 'vehicle/business',
getRoadway: 'road',
//桥梁管理
getBridge: 'bridge',
putBridge: 'bridge',
//工程数据
getProject: 'project',
putProject: 'project',
//道路统计
getBgroadstatistics: "build/road_state",
//治超监测点处理数据
getzhichaomanager: 'manage/overspeed/processed',
//获取治超详情数据
getzhichaodetail: '/manage/overspeed',
//大屏运营 —— 公交车辆层级信息
getBusTier: '/operation/car_level',
//获取路政列表
getHighways: 'road_manage',
//获取道路养护统计及列表
getRoadMaintenance: 'conserve/statistic',
//获取宣传数据
getpropagata: 'publicity',
//编辑/新增宣传数据
putpropagata: 'publicity',
//公交信息
getCircuit: 'bus/line', putCircuit: 'bus/line', delCircuit: 'bus/line/{lineId}',
getVehicle: 'bus/car', putVehicle: 'bus/car', delVehicle: 'bus/car/{carId}',
}; };
export const RouteTable = { export const RouteTable = {
apiRoot: '/api/root', apiRoot: '/api/root',
fileUpload: '/_upload/new', fileUpload: '/_upload/new',
cleanUpUploadTrash: '/_upload/cleanup', cleanUpUploadTrash: '/_upload/cleanup',
}; };

66679
web/log/development.txt

File diff suppressed because it is too large

2
web/package.json

@ -6,7 +6,7 @@
"scripts": { "scripts": {
"test": "mocha", "test": "mocha",
"start": "cross-env NODE_ENV=development npm run start-params", "start": "cross-env NODE_ENV=development npm run start-params",
"start-params": "node server -p 5000 -u http://localhost:14000 --qndmn http://rfkimpwbb.hn-bkt.clouddn.com", "start-params": "node server -p 5000 -u http://10.8.30.157:9119/ --qndmn http://rfkimpwbb.hn-bkt.clouddn.com",
"deploy": "export NODE_ENV=production&&npm run color && npm run build && node server", "deploy": "export NODE_ENV=production&&npm run color && npm run build && node server",
"build-dev": "export NODE_ENV=development&&webpack --config webpack.config.js", "build-dev": "export NODE_ENV=development&&webpack --config webpack.config.js",
"build": "export NODE_ENV=production&&webpack --config webpack.config.prod.js", "build": "export NODE_ENV=production&&webpack --config webpack.config.prod.js",

Loading…
Cancel
Save