四好公路
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.7 KiB

3 years ago
'use strict';
const vehicle = require('../../controllers/data/vehicle');
const road = require('../../controllers/data/road');
const bridge = require('../../controllers/data/bridge');
3 years ago
module.exports = function (app, router, opts) {
3 years ago
// 运政
//客运车
3 years ago
app.fs.api.logAttr['GET/vehicle'] = { content: '获取运政列表', visible: true };
router.get('/vehicle', vehicle.get);
3 years ago
app.fs.api.logAttr['PUT/vehicle'] = { content: '编辑运政数据', visible: true };
3 years ago
router.put('/vehicle', vehicle.edit);
app.fs.api.logAttr['DEL/vehicle/:vehicleId'] = { content: '删除运政数据', visible: false };
router.del('/vehicle/:vehicleId', vehicle.del);
3 years ago
// 出租/危货
app.fs.api.logAttr['GET/vehicle/specific'] = { content: '获取具体车辆列表', visible: true };
router.get('/vehicle/specific', vehicle.specificGet);
app.fs.api.logAttr['PUT/vehicle/specific'] = { content: '编辑具体车辆数据', visible: true };
router.put('/vehicle/specific', vehicle.specificEdit);
app.fs.api.logAttr['DEL/vehicle/:vehicleId/specific'] = { content: '删除具体车辆数据', visible: false };
router.del('/vehicle/:vehicleId/specific', vehicle.specificDel);
// 业户
app.fs.api.logAttr['GET/vehicle/business'] = { content: '获取业户列表', visible: true };
router.get('/vehicle/business', vehicle.businessGet);
app.fs.api.logAttr['PUT/vehicle/business'] = { content: '编辑业户数据', visible: true };
router.put('/vehicle/business', vehicle.businessEdit);
app.fs.api.logAttr['DEL/vehicle/business/:businessId'] = { content: '删除业户数据', visible: false };
router.del('/vehicle/business/:businessId', vehicle.businessDel);
// 运政 END
// 道路
app.fs.api.logAttr['POST/road/import'] = { content: '导入道路数据', visible: true };
router.post('/road/import', road.importIn);
3 years ago
app.fs.api.logAttr['GET/road'] = { content: '获取道路数据', visible: true };
router.post('/road', road.get);
app.fs.api.logAttr['put/road'] = { content: '编辑道路数据', visible: true };
router.put('/road', road.edit);
app.fs.api.logAttr['DEL/road/:roadId'] = { content: '删除道路数据', visible: false };
router.del('/road/:roadId', road.del);
// 道路 END
// 桥梁
app.fs.api.logAttr['GET/bridge'] = { content: '获取桥梁数据', visible: true };
router.get('/bridge', bridge.bridgeGet);
app.fs.api.logAttr['PUT/bridge'] = { content: '编辑桥梁数据', visible: true };
router.put('/bridge', bridge.bridgeEdit);
app.fs.api.logAttr['DEL/bridge/:bridgeId'] = { content: '删除桥梁数据', visible: false };
router.del('/bridge/:bridgeId', bridge.bridgeDel);
// 桥梁 END
3 years ago
};