LUCAS
3 years ago
33 changed files with 1972 additions and 281 deletions
@ -0,0 +1,155 @@ |
|||
'use strict'; |
|||
|
|||
async function lineGet (ctx) { |
|||
try { |
|||
const models = ctx.fs.dc.models; |
|||
const { fleet } = ctx.query; |
|||
const findOption = { |
|||
order: [['id', 'DESC']], |
|||
where: { |
|||
|
|||
}, |
|||
} |
|||
if (fleet) { |
|||
findOption.where.fleet = { $like: `%${fleet}%` } |
|||
} |
|||
|
|||
const roadRes = await models.BusLine.findAll(findOption) |
|||
|
|||
ctx.status = 200; |
|||
ctx.body = roadRes |
|||
} catch (error) { |
|||
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); |
|||
ctx.status = 400; |
|||
ctx.body = { |
|||
message: typeof error == 'string' ? error : undefined |
|||
} |
|||
} |
|||
} |
|||
|
|||
async function lineEdit (ctx) { |
|||
try { |
|||
const models = ctx.fs.dc.models; |
|||
const data = ctx.request.body; |
|||
|
|||
if (!data.lineId) { |
|||
await models.BusLine.create(data) |
|||
} else { |
|||
await models.BusLine.update( |
|||
data, { |
|||
where: { |
|||
id: data.lineId |
|||
} |
|||
}) |
|||
} |
|||
|
|||
ctx.status = 204 |
|||
} catch (error) { |
|||
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); |
|||
ctx.status = 400; |
|||
ctx.body = { |
|||
message: typeof error == 'string' ? error : undefined |
|||
} |
|||
} |
|||
} |
|||
|
|||
async function lineDel (ctx) { |
|||
try { |
|||
const models = ctx.fs.dc.models; |
|||
const { lineId } = ctx.params; |
|||
|
|||
await models.BusLine.destroy({ |
|||
where: { |
|||
id: lineId |
|||
} |
|||
}) |
|||
|
|||
ctx.status = 204 |
|||
} catch (error) { |
|||
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); |
|||
ctx.status = 400; |
|||
ctx.body = { |
|||
message: typeof error == 'string' ? error : undefined |
|||
} |
|||
} |
|||
} |
|||
|
|||
|
|||
async function carGet (ctx) { |
|||
try { |
|||
const models = ctx.fs.dc.models; |
|||
const { fleet } = ctx.query; |
|||
const findOption = { |
|||
order: [['id', 'DESC']], |
|||
where: { |
|||
|
|||
}, |
|||
} |
|||
if (fleet) { |
|||
findOption.where.fleet = { $like: `%${fleet}%` } |
|||
} |
|||
|
|||
const roadRes = await models.BusCar.findAll(findOption) |
|||
|
|||
ctx.status = 200; |
|||
ctx.body = roadRes |
|||
} catch (error) { |
|||
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); |
|||
ctx.status = 400; |
|||
ctx.body = { |
|||
message: typeof error == 'string' ? error : undefined |
|||
} |
|||
} |
|||
} |
|||
|
|||
async function carEdit (ctx) { |
|||
try { |
|||
const models = ctx.fs.dc.models; |
|||
const data = ctx.request.body; |
|||
|
|||
if (!data.carId) { |
|||
await models.BusCar.create(data) |
|||
} else { |
|||
await models.BusCar.update( |
|||
data, { |
|||
where: { |
|||
id: data.carId |
|||
} |
|||
}) |
|||
} |
|||
|
|||
ctx.status = 204 |
|||
} catch (error) { |
|||
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); |
|||
ctx.status = 400; |
|||
ctx.body = { |
|||
message: typeof error == 'string' ? error : undefined |
|||
} |
|||
} |
|||
} |
|||
|
|||
async function carDel (ctx) { |
|||
try { |
|||
const models = ctx.fs.dc.models; |
|||
const { carId } = ctx.params; |
|||
|
|||
await models.BusCar.destroy({ |
|||
where: { |
|||
id: carId |
|||
} |
|||
}) |
|||
|
|||
ctx.status = 204 |
|||
} catch (error) { |
|||
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); |
|||
ctx.status = 400; |
|||
ctx.body = { |
|||
message: typeof error == 'string' ? error : undefined |
|||
} |
|||
} |
|||
} |
|||
|
|||
module.exports = { |
|||
lineGet, lineEdit, lineDel, |
|||
carGet, carEdit, carDel, |
|||
}; |
@ -0,0 +1,493 @@ |
|||
/* eslint-disable*/ |
|||
'use strict'; |
|||
|
|||
module.exports = dc => { |
|||
const DataTypes = dc.ORM; |
|||
const sequelize = dc.orm; |
|||
const BusCar = sequelize.define("busCar", { |
|||
id: { |
|||
type: DataTypes.INTEGER, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: true, |
|||
field: "id", |
|||
autoIncrement: true, |
|||
unique: "bus_car_id_uindex" |
|||
}, |
|||
company: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "所属公司", |
|||
primaryKey: false, |
|||
field: "company", |
|||
autoIncrement: false |
|||
}, |
|||
fleet: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "所属车队", |
|||
primaryKey: false, |
|||
field: "fleet", |
|||
autoIncrement: false |
|||
}, |
|||
line: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "所属线路", |
|||
primaryKey: false, |
|||
field: "line", |
|||
autoIncrement: false |
|||
}, |
|||
vehicleNumber: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "车辆编号", |
|||
primaryKey: false, |
|||
field: "vehicle_number", |
|||
autoIncrement: false |
|||
}, |
|||
vehicleLicensePlateNumber: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "车辆牌照号", |
|||
primaryKey: false, |
|||
field: "vehicle_license_plate_number", |
|||
autoIncrement: false |
|||
}, |
|||
operationCategory: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "运营类别", |
|||
primaryKey: false, |
|||
field: "operation_category", |
|||
autoIncrement: false |
|||
}, |
|||
serviceLife: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "已使用年限", |
|||
primaryKey: false, |
|||
field: "service_life", |
|||
autoIncrement: false |
|||
}, |
|||
engineModel: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "发动机型号", |
|||
primaryKey: false, |
|||
field: "engine_model", |
|||
autoIncrement: false |
|||
}, |
|||
vehicleModel: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "车辆型号", |
|||
primaryKey: false, |
|||
field: "vehicle_model", |
|||
autoIncrement: false |
|||
}, |
|||
vehicleCategory: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "车辆类别", |
|||
primaryKey: false, |
|||
field: "vehicle_category", |
|||
autoIncrement: false |
|||
}, |
|||
vehicleStatus: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "车辆状态", |
|||
primaryKey: false, |
|||
field: "vehicle_status", |
|||
autoIncrement: false |
|||
}, |
|||
dateOfEntry: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "入户日期", |
|||
primaryKey: false, |
|||
field: "date_of_entry", |
|||
autoIncrement: false |
|||
}, |
|||
purchaseDate: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "购进日期", |
|||
primaryKey: false, |
|||
field: "purchase_date", |
|||
autoIncrement: false |
|||
}, |
|||
energyConsumptionType: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "能耗类型", |
|||
primaryKey: false, |
|||
field: "energy_consumption_type", |
|||
autoIncrement: false |
|||
}, |
|||
numberOfStandardUnits: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "标台数", |
|||
primaryKey: false, |
|||
field: "number_of_standard_units", |
|||
autoIncrement: false |
|||
}, |
|||
maintenanceUnit: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "维保单位", |
|||
primaryKey: false, |
|||
field: "maintenance_unit", |
|||
autoIncrement: false |
|||
}, |
|||
vehicleType: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "车辆类型", |
|||
primaryKey: false, |
|||
field: "vehicle_type", |
|||
autoIncrement: false |
|||
}, |
|||
brandAndModel: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "厂牌型号", |
|||
primaryKey: false, |
|||
field: "brand_and_model", |
|||
autoIncrement: false |
|||
}, |
|||
manufacturer: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "生产厂家", |
|||
primaryKey: false, |
|||
field: "manufacturer", |
|||
autoIncrement: false |
|||
}, |
|||
drivingLicenseNo: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "行驶证编号", |
|||
primaryKey: false, |
|||
field: "driving_license_no", |
|||
autoIncrement: false |
|||
}, |
|||
engineNumber: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "发动机编号", |
|||
primaryKey: false, |
|||
field: "engine_number", |
|||
autoIncrement: false |
|||
}, |
|||
mainEnergyConsumption: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "主能耗", |
|||
primaryKey: false, |
|||
field: "main_energy_consumption", |
|||
autoIncrement: false |
|||
}, |
|||
secondaryEnergyConsumption: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "副能耗", |
|||
primaryKey: false, |
|||
field: "secondary_energy_consumption", |
|||
autoIncrement: false |
|||
}, |
|||
emissionStandard: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "排放标准", |
|||
primaryKey: false, |
|||
field: "emission_standard", |
|||
autoIncrement: false |
|||
}, |
|||
startDate: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "启用日期", |
|||
primaryKey: false, |
|||
field: "start_date", |
|||
autoIncrement: false |
|||
}, |
|||
lastTransferDate: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "最近一次调动日期", |
|||
primaryKey: false, |
|||
field: "last_transfer_date", |
|||
autoIncrement: false |
|||
}, |
|||
conductor: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "车长", |
|||
primaryKey: false, |
|||
field: "conductor", |
|||
autoIncrement: false |
|||
}, |
|||
vehicleWidth: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "车宽", |
|||
primaryKey: false, |
|||
field: "vehicle_width", |
|||
autoIncrement: false |
|||
}, |
|||
carHeight: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "车高", |
|||
primaryKey: false, |
|||
field: "car_height", |
|||
autoIncrement: false |
|||
}, |
|||
approvedPassengerCapacity: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "核定载客数", |
|||
primaryKey: false, |
|||
field: "approved_passenger_capacity", |
|||
autoIncrement: false |
|||
}, |
|||
vehicleIdentificationNumber: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "车辆识别号", |
|||
primaryKey: false, |
|||
field: "vehicle_identification_number", |
|||
autoIncrement: false |
|||
}, |
|||
gearboxBrand: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "变速箱品牌", |
|||
primaryKey: false, |
|||
field: "gearbox_brand", |
|||
autoIncrement: false |
|||
}, |
|||
manualCarWashingFee: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "人工洗车费", |
|||
primaryKey: false, |
|||
field: "manual_car_washing_fee", |
|||
autoIncrement: false |
|||
}, |
|||
laborCost: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "劳务费", |
|||
primaryKey: false, |
|||
field: "labor_cost", |
|||
autoIncrement: false |
|||
}, |
|||
curbWeight: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "整备质量", |
|||
primaryKey: false, |
|||
field: "curb_weight", |
|||
autoIncrement: false |
|||
}, |
|||
totalMass: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "总质量", |
|||
primaryKey: false, |
|||
field: "total_mass", |
|||
autoIncrement: false |
|||
}, |
|||
airConditioningTemperature: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "空调温度", |
|||
primaryKey: false, |
|||
field: "air_conditioning_temperature", |
|||
autoIncrement: false |
|||
}, |
|||
airConditionedCarOrNot: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "是否空调车", |
|||
primaryKey: false, |
|||
field: "air_conditioned_car_or_not", |
|||
autoIncrement: false |
|||
}, |
|||
turnOnTheAirConditioningTemperature: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "开空调温度", |
|||
primaryKey: false, |
|||
field: "turn_on_the_air_conditioning_temperature", |
|||
autoIncrement: false |
|||
}, |
|||
power: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "功率", |
|||
primaryKey: false, |
|||
field: "power", |
|||
autoIncrement: false |
|||
}, |
|||
transmission: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "变速器", |
|||
primaryKey: false, |
|||
field: "transmission", |
|||
autoIncrement: false |
|||
}, |
|||
seatingCapacity: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "座位数", |
|||
primaryKey: false, |
|||
field: "seating_capacity", |
|||
autoIncrement: false |
|||
}, |
|||
airConditioningBrand: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "空调品牌", |
|||
primaryKey: false, |
|||
field: "air_conditioning_brand", |
|||
autoIncrement: false |
|||
}, |
|||
seatType: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "座椅类型", |
|||
primaryKey: false, |
|||
field: "seat_type", |
|||
autoIncrement: false |
|||
}, |
|||
tireSpecifications: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "轮胎规格", |
|||
primaryKey: false, |
|||
field: "tire_specifications", |
|||
autoIncrement: false |
|||
}, |
|||
roadTransportCertificateNo: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "道路运输证号", |
|||
primaryKey: false, |
|||
field: "road_transport_certificate_no", |
|||
autoIncrement: false |
|||
}, |
|||
parkingPoint: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "停放点", |
|||
primaryKey: false, |
|||
field: "parking_point", |
|||
autoIncrement: false |
|||
}, |
|||
carWashingType: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "洗车类型", |
|||
primaryKey: false, |
|||
field: "car_washing_type", |
|||
autoIncrement: false |
|||
}, |
|||
maintenanceFreeWheelEnd: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "免维护轮端", |
|||
primaryKey: false, |
|||
field: "maintenance_free_wheel_end", |
|||
autoIncrement: false |
|||
}, |
|||
firstGuaranteeDate: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "首保日期", |
|||
primaryKey: false, |
|||
field: "first_guarantee_date", |
|||
autoIncrement: false |
|||
}, |
|||
dateOfRenovation: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "整修日期", |
|||
primaryKey: false, |
|||
field: "date_of_renovation", |
|||
autoIncrement: false |
|||
}, |
|||
motorVehicleOwner: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "机动车所有人", |
|||
primaryKey: false, |
|||
field: "motor_vehicle_owner", |
|||
autoIncrement: false |
|||
} |
|||
}, { |
|||
tableName: "bus_car", |
|||
comment: "", |
|||
indexes: [] |
|||
}); |
|||
dc.models.BusCar = BusCar; |
|||
return BusCar; |
|||
}; |
@ -0,0 +1,232 @@ |
|||
/* eslint-disable*/ |
|||
'use strict'; |
|||
|
|||
module.exports = dc => { |
|||
const DataTypes = dc.ORM; |
|||
const sequelize = dc.orm; |
|||
const BusLine = sequelize.define("busLine", { |
|||
id: { |
|||
type: DataTypes.INTEGER, |
|||
allowNull: false, |
|||
defaultValue: null, |
|||
comment: null, |
|||
primaryKey: true, |
|||
field: "id", |
|||
autoIncrement: true, |
|||
unique: "bus_line_id_uindex" |
|||
}, |
|||
company: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "公司", |
|||
primaryKey: false, |
|||
field: "company", |
|||
autoIncrement: false |
|||
}, |
|||
fleet: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "车队", |
|||
primaryKey: false, |
|||
field: "fleet", |
|||
autoIncrement: false |
|||
}, |
|||
carCaptain: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "车队长", |
|||
primaryKey: false, |
|||
field: "car_captain", |
|||
autoIncrement: false |
|||
}, |
|||
assistantCarCaptain: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "副车队长", |
|||
primaryKey: false, |
|||
field: "assistant_car_captain", |
|||
autoIncrement: false |
|||
}, |
|||
officeLocation: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "办公地点", |
|||
primaryKey: false, |
|||
field: "office_location", |
|||
autoIncrement: false |
|||
}, |
|||
lineName: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "线路名称", |
|||
primaryKey: false, |
|||
field: "line_name", |
|||
autoIncrement: false |
|||
}, |
|||
lineType: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "线路类型", |
|||
primaryKey: false, |
|||
field: "line_type", |
|||
autoIncrement: false |
|||
}, |
|||
lineDivision: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "线路划分", |
|||
primaryKey: false, |
|||
field: "line_division", |
|||
autoIncrement: false |
|||
}, |
|||
gpsNumber: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "GPS编号", |
|||
primaryKey: false, |
|||
field: "gps_number", |
|||
autoIncrement: false |
|||
}, |
|||
startingPointEndPoint: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "起点终点", |
|||
primaryKey: false, |
|||
field: "starting_point_end_point", |
|||
autoIncrement: false |
|||
}, |
|||
numberOfVehicles: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "车辆数", |
|||
primaryKey: false, |
|||
field: "number_of_vehicles", |
|||
autoIncrement: false |
|||
}, |
|||
totalKilometers: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "全程公里数", |
|||
primaryKey: false, |
|||
field: "total_kilometers", |
|||
autoIncrement: false |
|||
}, |
|||
ticketPrice: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "票价", |
|||
primaryKey: false, |
|||
field: "ticket_price", |
|||
autoIncrement: false |
|||
}, |
|||
openingTime: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "开通时间", |
|||
primaryKey: false, |
|||
field: "opening_time", |
|||
autoIncrement: false |
|||
}, |
|||
runningTime: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "运行时间", |
|||
primaryKey: false, |
|||
field: "running_time", |
|||
autoIncrement: false |
|||
}, |
|||
openingTimeSummer: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "开班时间夏令", |
|||
primaryKey: false, |
|||
field: "opening_time_summer", |
|||
autoIncrement: false |
|||
}, |
|||
shiftClosingTimeSummer: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "收班时间夏令", |
|||
primaryKey: false, |
|||
field: "shift_closing_time_summer", |
|||
autoIncrement: false |
|||
}, |
|||
openingTimeWinter: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "开班时间冬令", |
|||
primaryKey: false, |
|||
field: "opening_time_winter", |
|||
autoIncrement: false |
|||
}, |
|||
shiftClosingTimeWinter: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "收班时间冬令", |
|||
primaryKey: false, |
|||
field: "shift_closing_time_winter", |
|||
autoIncrement: false |
|||
}, |
|||
uplinkOfStationsAlongTheWay: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "沿途站点上行", |
|||
primaryKey: false, |
|||
field: "uplink_of_stations_along_the_way", |
|||
autoIncrement: false |
|||
}, |
|||
downlinkOfStationsAlongTheWay: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "沿途站点下行", |
|||
primaryKey: false, |
|||
field: "downlink_of_stations_along_the_way", |
|||
autoIncrement: false |
|||
}, |
|||
area: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "所属区域", |
|||
primaryKey: false, |
|||
field: "area", |
|||
autoIncrement: false |
|||
}, |
|||
remarks: { |
|||
type: DataTypes.STRING, |
|||
allowNull: true, |
|||
defaultValue: null, |
|||
comment: "备注", |
|||
primaryKey: false, |
|||
field: "remarks", |
|||
autoIncrement: false |
|||
} |
|||
}, { |
|||
tableName: "bus_line", |
|||
comment: "", |
|||
indexes: [] |
|||
}); |
|||
dc.models.BusLine = BusLine; |
|||
return BusLine; |
|||
}; |
@ -1,4 +0,0 @@ |
|||
-- ---------------------------- |
|||
-- Records of user |
|||
-- ---------------------------- |
|||
INSERT INTO "public"."user" VALUES (1, '管理员', 'SuperAdmin', 'e10adc3949ba59abbe56e057f20f883e', 1, 'f', NULL, NULL, NULL, TRUE); |
@ -0,0 +1,8 @@ |
|||
-- ---------------------------- |
|||
-- Records of DEP |
|||
-- ---------------------------- |
|||
INSERT INTO "department" VALUES (1, '默认部门', NULL, false); |
|||
-- ---------------------------- |
|||
-- Records of user |
|||
-- ---------------------------- |
|||
INSERT INTO "user" VALUES (1, '管理员', 'SuperAdmin', 'e10adc3949ba59abbe56e057f20f883e', 1, 'f', NULL, NULL, NULL, TRUE); |
Binary file not shown.
@ -0,0 +1,54 @@ |
|||
{ |
|||
"所属公司": "company", |
|||
"所属车队": "fleet", |
|||
"所属线路": "line", |
|||
"车辆编号": "vehicleNumber", |
|||
"车辆牌照号": "vehicleLicensePlateNumber", |
|||
"运营类别": "operationCategory", |
|||
"已使用年限": "serviceLife", |
|||
"发动机型号": "engineModel", |
|||
"车辆型号": "vehicleModel", |
|||
"车辆类别": "vehicleCategory", |
|||
"车辆状态": "vehicleStatus", |
|||
"入户日期": "dateOfEntry", |
|||
"购进日期": "purchaseDate", |
|||
"能耗类型": "energyConsumptionType", |
|||
"标台数": "numberOfStandardUnits", |
|||
"维保单位": "maintenanceUnit", |
|||
"车辆类型": "vehicleType", |
|||
"厂牌型号": "brandAndModel", |
|||
"生产厂家": "manufacturer", |
|||
"行驶证编号": "drivingLicenseNo", |
|||
"发动机编号": "engineNumber", |
|||
"主能耗": "mainEnergyConsumption", |
|||
"副能耗": "secondaryEnergyConsumption", |
|||
"排放标准": "emissionStandard", |
|||
"启用日期": "startDate", |
|||
"最近一次调动日期": "lastTransferDate", |
|||
"车长": "conductor", |
|||
"车宽": "vehicleWidth", |
|||
"车高": "carHeight", |
|||
"核定载客数": "approvedPassengerCapacity", |
|||
"车辆识别号": "vehicleIdentificationNumber", |
|||
"变速箱品牌": "gearboxBrand", |
|||
"人工洗车费": "manualCarWashingFee", |
|||
"劳务费": "laborCost", |
|||
"整备质量": "curbWeight", |
|||
"总质量": "totalMass", |
|||
"空调温度": "airConditioningTemperature", |
|||
"是否空调车": "airConditionedCarOrNot", |
|||
"开空调温度": "turnOnTheAirConditioningTemperature", |
|||
"功率": "power", |
|||
"变速器": "transmission", |
|||
"座位数": "seatingCapacity", |
|||
"空调品牌": "airConditioningBrand", |
|||
"座椅类型": "seatType", |
|||
"轮胎规格": "tireSpecifications", |
|||
"道路运输证号": "roadTransportCertificateNo", |
|||
"停放点": "parkingPoint", |
|||
"洗车类型": "carWashingType", |
|||
"免维护轮端": "maintenanceFreeWheelEnd", |
|||
"首保日期": "firstGuaranteeDate", |
|||
"整修日期": "dateOfRenovation", |
|||
"机动车所有人": "motorVehicleOwner" |
|||
} |
@ -0,0 +1,54 @@ |
|||
{ |
|||
"company": "所属公司", |
|||
"fleet": "所属车队", |
|||
"line": "所属线路", |
|||
"vehicleNumber": "车辆编号", |
|||
"vehicleLicensePlateNumber": "车辆牌照号", |
|||
"operationCategory": "运营类别", |
|||
"serviceLife": "已使用年限", |
|||
"engineModel": "发动机型号", |
|||
"vehicleModel": "车辆型号", |
|||
"vehicleCategory": "车辆类别", |
|||
"vehicleStatus": "车辆状态", |
|||
"dateOfEntry": "入户日期", |
|||
"purchaseDate": "购进日期", |
|||
"energyConsumptionType": "能耗类型", |
|||
"numberOfStandardUnits": "标台数", |
|||
"maintenanceUnit": "维保单位", |
|||
"vehicleType": "车辆类型", |
|||
"brandAndModel": "厂牌型号", |
|||
"manufacturer": "生产厂家", |
|||
"drivingLicenseNo": "行驶证编号", |
|||
"engineNumber": "发动机编号", |
|||
"mainEnergyConsumption": "主能耗", |
|||
"secondaryEnergyConsumption": "副能耗", |
|||
"emissionStandard": "排放标准", |
|||
"startDate": "启用日期", |
|||
"lastTransferDate": "最近一次调动日期", |
|||
"conductor": "车长", |
|||
"vehicleWidth": "车宽", |
|||
"carHeight": "车高", |
|||
"approvedPassengerCapacity": "核定载客数", |
|||
"vehicleIdentificationNumber": "车辆识别号", |
|||
"gearboxBrand": "变速箱品牌", |
|||
"manualCarWashingFee": "人工洗车费", |
|||
"laborCost": "劳务费", |
|||
"curbWeight": "整备质量", |
|||
"totalMass": "总质量", |
|||
"airConditioningTemperature": "空调温度", |
|||
"airConditionedCarOrNot": "是否空调车", |
|||
"turnOnTheAirConditioningTemperature": "开空调温度", |
|||
"power": "功率", |
|||
"transmission": "变速器", |
|||
"seatingCapacity": "座位数", |
|||
"airConditioningBrand": "空调品牌", |
|||
"seatType": "座椅类型", |
|||
"tireSpecifications": "轮胎规格", |
|||
"roadTransportCertificateNo": "道路运输证号", |
|||
"parkingPoint": "停放点", |
|||
"carWashingType": "洗车类型", |
|||
"maintenanceFreeWheelEnd": "免维护轮端", |
|||
"firstGuaranteeDate": "首保日期", |
|||
"dateOfRenovation": "整修日期", |
|||
"motorVehicleOwner": "机动车所有人" |
|||
} |
@ -0,0 +1,54 @@ |
|||
{ |
|||
"所属公司": "company", |
|||
"所属车队": "fleet", |
|||
"所属线路": "line", |
|||
"车辆编号": "vehicle_number", |
|||
"车辆牌照号": "vehicle_license_plate_number", |
|||
"运营类别": "operation_category", |
|||
"已使用年限": "service_life", |
|||
"发动机型号": "engine_model", |
|||
"车辆型号": "vehicle_model", |
|||
"车辆类别": "vehicle_category", |
|||
"车辆状态": "vehicle_status", |
|||
"入户日期": "date_of_entry", |
|||
"购进日期": "purchase_date", |
|||
"能耗类型": "energy_consumption_type", |
|||
"标台数": "number_of_standard_units", |
|||
"维保单位": "maintenance_unit", |
|||
"车辆类型": "vehicle_type", |
|||
"厂牌型号": "brand_and_model", |
|||
"生产厂家": "manufacturer", |
|||
"行驶证编号": "driving_license_No", |
|||
"发动机编号": "engine_number", |
|||
"主能耗": "main_energy_consumption", |
|||
"副能耗": "secondary_energy_consumption", |
|||
"排放标准": "emission_standard", |
|||
"启用日期": "start_date", |
|||
"最近一次调动日期": "last_transfer_date", |
|||
"车长": "conductor", |
|||
"车宽": "vehicle_width", |
|||
"车高": "car_height", |
|||
"核定载客数": "approved_passenger_capacity", |
|||
"车辆识别号": "vehicle_identification_number", |
|||
"变速箱品牌": "gearbox_brand", |
|||
"人工洗车费": "manual_car_washing_fee", |
|||
"劳务费": "labor_cost", |
|||
"整备质量": "curb_weight", |
|||
"总质量": "total_mass", |
|||
"空调温度": "air_conditioning_temperature", |
|||
"是否空调车": "air_conditioned_car_or_not", |
|||
"开空调温度": "turn_on_the_air_conditioning_temperature", |
|||
"功率": "power", |
|||
"变速器": "transmission", |
|||
"座位数": "seating_capacity", |
|||
"空调品牌": "air_conditioning_brand", |
|||
"座椅类型": "seat_type", |
|||
"轮胎规格": "tire_specifications", |
|||
"道路运输证号": "road_Transport_Certificate_No", |
|||
"停放点": "parking_point", |
|||
"洗车类型": "car_washing_type", |
|||
"免维护轮端": "maintenance_free_wheel_end", |
|||
"首保日期": "first_guarantee_date", |
|||
"整修日期": "date_of_renovation", |
|||
"机动车所有人": "motor_vehicle_owner" |
|||
} |
@ -0,0 +1,58 @@ |
|||
-- 公交车辆 |
|||
|
|||
CREATE TABLE if not exists "bus_car" ( id serial not null ); |
|||
|
|||
CREATE unique index if not exists bus_car_id_uindex |
|||
ON bus_car (id); alter TABLE bus_car add constraint bus_car_pk primary key (id); alter TABLE bus_car add Company varchar(1024); comment |
|||
ON column bus_car.Company is '所属公司'; alter TABLE bus_car add Fleet varchar(1024); comment |
|||
ON column bus_car.Fleet is '所属车队'; alter TABLE bus_car add Line varchar(1024); comment |
|||
ON column bus_car.Line is '所属线路'; alter TABLE bus_car add Vehicle_Number varchar(1024); comment |
|||
ON column bus_car.Vehicle_Number is '车辆编号'; alter TABLE bus_car add Vehicle_License_Plate_Number varchar(1024); comment |
|||
ON column bus_car.Vehicle_License_Plate_Number is '车辆牌照号'; alter TABLE bus_car add Operation_Category varchar(1024); comment |
|||
ON column bus_car.Operation_Category is '运营类别'; alter TABLE bus_car add Service_Life varchar(1024); comment |
|||
ON column bus_car.Service_Life is '已使用年限'; alter TABLE bus_car add Engine_Model varchar(1024); comment |
|||
ON column bus_car.Engine_Model is '发动机型号'; alter TABLE bus_car add Vehicle_Model varchar(1024); comment |
|||
ON column bus_car.Vehicle_Model is '车辆型号'; alter TABLE bus_car add Vehicle_Category varchar(1024); comment |
|||
ON column bus_car.Vehicle_Category is '车辆类别'; alter TABLE bus_car add Vehicle_Status varchar(1024); comment |
|||
ON column bus_car.Vehicle_Status is '车辆状态'; alter TABLE bus_car add Date_Of_Entry varchar(1024); comment |
|||
ON column bus_car.Date_Of_Entry is '入户日期'; alter TABLE bus_car add Purchase_Date varchar(1024); comment |
|||
ON column bus_car.Purchase_Date is '购进日期'; alter TABLE bus_car add Energy_Consumption_Type varchar(1024); comment |
|||
ON column bus_car.Energy_Consumption_Type is '能耗类型'; alter TABLE bus_car add Number_Of_Standard_Units varchar(1024); comment |
|||
ON column bus_car.Number_Of_Standard_Units is '标台数'; alter TABLE bus_car add Maintenance_Unit varchar(1024); comment |
|||
ON column bus_car.Maintenance_Unit is '维保单位'; alter TABLE bus_car add Vehicle_Type varchar(1024); comment |
|||
ON column bus_car.Vehicle_Type is '车辆类型'; alter TABLE bus_car add Brand_And_Model varchar(1024); comment |
|||
ON column bus_car.Brand_And_Model is '厂牌型号'; alter TABLE bus_car add Manufacturer varchar(1024); comment |
|||
ON column bus_car.Manufacturer is '生产厂家'; alter TABLE bus_car add Driving_License_No varchar(1024); comment |
|||
ON column bus_car.Driving_License_No is '行驶证编号'; alter TABLE bus_car add Engine_Number varchar(1024); comment |
|||
ON column bus_car.Engine_Number is '发动机编号'; alter TABLE bus_car add Main_Energy_Consumption varchar(1024); comment |
|||
ON column bus_car.Main_Energy_Consumption is '主能耗'; alter TABLE bus_car add Secondary_Energy_Consumption varchar(1024); comment |
|||
ON column bus_car.Secondary_Energy_Consumption is '副能耗'; alter TABLE bus_car add Emission_Standard varchar(1024); comment |
|||
ON column bus_car.Emission_Standard is '排放标准'; alter TABLE bus_car add Start_Date varchar(1024); comment |
|||
ON column bus_car.Start_Date is '启用日期'; alter TABLE bus_car add Last_Transfer_Date varchar(1024); comment |
|||
ON column bus_car.Last_Transfer_Date is '最近一次调动日期'; alter TABLE bus_car add Conductor varchar(1024); comment |
|||
ON column bus_car.Conductor is '车长'; alter TABLE bus_car add Vehicle_Width varchar(1024); comment |
|||
ON column bus_car.Vehicle_Width is '车宽'; alter TABLE bus_car add Car_Height varchar(1024); comment |
|||
ON column bus_car.Car_Height is '车高'; alter TABLE bus_car add Approved_Passenger_Capacity varchar(1024); comment |
|||
ON column bus_car.Approved_Passenger_Capacity is '核定载客数'; alter TABLE bus_car add Vehicle_Identification_Number varchar(1024); comment |
|||
ON column bus_car.Vehicle_Identification_Number is '车辆识别号'; alter TABLE bus_car add Gearbox_Brand varchar(1024); comment |
|||
ON column bus_car.Gearbox_Brand is '变速箱品牌'; alter TABLE bus_car add Manual_Car_Washing_Fee varchar(1024); comment |
|||
ON column bus_car.Manual_Car_Washing_Fee is '人工洗车费'; alter TABLE bus_car add Labor_Cost varchar(1024); comment |
|||
ON column bus_car.Labor_Cost is '劳务费'; alter TABLE bus_car add Curb_Weight varchar(1024); comment |
|||
ON column bus_car.Curb_Weight is '整备质量'; alter TABLE bus_car add Total_Mass varchar(1024); comment |
|||
ON column bus_car.Total_Mass is '总质量'; alter TABLE bus_car add Air_Conditioning_Temperature varchar(1024); comment |
|||
ON column bus_car.Air_Conditioning_Temperature is '空调温度'; alter TABLE bus_car add Air_Conditioned_Car_Or_Not varchar(1024); comment |
|||
ON column bus_car.Air_Conditioned_Car_Or_Not is '是否空调车'; alter TABLE bus_car add Turn_On_The_Air_Conditioning_Temperature varchar(1024); comment |
|||
ON column bus_car.Turn_On_The_Air_Conditioning_Temperature is '开空调温度'; alter TABLE bus_car add Power varchar(1024); comment |
|||
ON column bus_car.Power is '功率'; alter TABLE bus_car add Transmission varchar(1024); comment |
|||
ON column bus_car.Transmission is '变速器'; alter TABLE bus_car add Seating_Capacity varchar(1024); comment |
|||
ON column bus_car.Seating_Capacity is '座位数'; alter TABLE bus_car add Air_Conditioning_Brand varchar(1024); comment |
|||
ON column bus_car.Air_Conditioning_Brand is '空调品牌'; alter TABLE bus_car add Seat_Type varchar(1024); comment |
|||
ON column bus_car.Seat_Type is '座椅类型'; alter TABLE bus_car add Tire_Specifications varchar(1024); comment |
|||
ON column bus_car.Tire_Specifications is '轮胎规格'; alter TABLE bus_car add Road_Transport_Certificate_No varchar(1024); comment |
|||
ON column bus_car.Road_Transport_Certificate_No is '道路运输证号'; alter TABLE bus_car add Parking_Point varchar(1024); comment |
|||
ON column bus_car.Parking_Point is '停放点'; alter TABLE bus_car add Car_Washing_Type varchar(1024); comment |
|||
ON column bus_car.Car_Washing_Type is '洗车类型'; alter TABLE bus_car add Maintenance_Free_Wheel_End varchar(1024); comment |
|||
ON column bus_car.Maintenance_Free_Wheel_End is '免维护轮端'; alter TABLE bus_car add First_Guarantee_Date varchar(1024); comment |
|||
ON column bus_car.First_Guarantee_Date is '首保日期'; alter TABLE bus_car add Date_Of_Renovation varchar(1024); comment |
|||
ON column bus_car.Date_Of_Renovation is '整修日期'; alter TABLE bus_car add Motor_Vehicle_Owner varchar(1024); comment |
|||
ON column bus_car.Motor_Vehicle_Owner is '机动车所有人'; |
After Width: | Height: | Size: 543 B |
After Width: | Height: | Size: 373 B |
@ -1,30 +1,222 @@ |
|||
import { Col, Row } from 'antd' |
|||
import React from 'react' |
|||
import { useEffect } from 'react' |
|||
import { useEffect, useRef } from 'react' |
|||
import Module from '../../../public/module' |
|||
import * as echarts from 'echarts'; |
|||
|
|||
const LeftCenter = () => { |
|||
const style = { height: "31%", marginTop: "3%" } |
|||
const style = { height: "31%", marginTop: "3%" } |
|||
const chartRef = useRef(null); |
|||
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", |
|||
}, |
|||
}, |
|||
grid: { |
|||
left: "5%", |
|||
top: "12%", |
|||
right: "1%", |
|||
bottom: "8%", |
|||
containLabel: true, |
|||
}, |
|||
|
|||
useEffect(() => { |
|||
xAxis: { |
|||
type: "value", |
|||
show: true, |
|||
position: "bottom", |
|||
axisTick: { |
|||
show: true, |
|||
lineStyle: { |
|||
color: "rgba(176,215,255,0.25)", |
|||
// type: "dashed",
|
|||
}, |
|||
}, |
|||
axisLine: { |
|||
show: false, |
|||
lineStyle: { |
|||
color: "rgba(216,240,255,0.8000)", |
|||
}, |
|||
}, |
|||
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: ["县级可绿化里程", "乡级可绿化里程", "村级可绿化里程"], |
|||
}, |
|||
{ |
|||
type: "category", |
|||
axisTick: { |
|||
show: false, |
|||
alignWithLabel: false, |
|||
length: 5, |
|||
}, |
|||
splitLine: { |
|||
//网格线
|
|||
show: false, |
|||
}, |
|||
axisLabel: { |
|||
show: true, |
|||
backgroundColor: { |
|||
image: 'assets/images/quanju/kelvhua_bdbg.png', |
|||
}, |
|||
width: 50, |
|||
height: 20, |
|||
color: '#D8F0FF', |
|||
margin:40, |
|||
verticalAlign: 'middle', |
|||
align: 'center' |
|||
// formatter:(f) =>{console.log('f:',f);}
|
|||
}, |
|||
inverse: true, //排序
|
|||
axisLine: { |
|||
show: false, |
|||
lineStyle: { |
|||
color: "rgba(176,215,255,0.8)", |
|||
}, |
|||
|
|||
}, []) |
|||
}, |
|||
data: [60, 132, 89], |
|||
}, |
|||
], |
|||
series: [ |
|||
{ |
|||
name: '背景', |
|||
type: "bar", |
|||
barWidth: 3, |
|||
barGap: "100%", |
|||
barCategoryGap: "50%", |
|||
color: "#15356E", |
|||
data: [150, 150, 150, 150], |
|||
tooltip: { |
|||
show: false, |
|||
}, |
|||
}, |
|||
{ |
|||
name: "", |
|||
type: "bar", |
|||
zlevel: 1, |
|||
barWidth: 3, |
|||
barGap: "-100%", |
|||
barCategoryGap: "50%", |
|||
data: [60, 132, 89], |
|||
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, |
|||
}, |
|||
|
|||
return ( |
|||
<> |
|||
<Module style={style} title={"可绿化里程统计"}> |
|||
|
|||
<Row align='middle' style={{ padding: 10 }}> |
|||
<Col span={15}> |
|||
<img src='assets/images/quanju/kelvhua_icon.png' alt='icon' /> |
|||
<span style={{ color: '#C2EEFF', marginLeft: 5 }}>可绿化里程总数</span> |
|||
</Col> |
|||
<Col span={9} style={{ fontSize: 28, fontFamily: 'YouSheBiaoTiHei', color: '#fff' }}>1234.123</Col> |
|||
</Row> |
|||
<div>图表</div> |
|||
], |
|||
// globalCoord: false,
|
|||
}; |
|||
}, |
|||
barBorderRadius: 70, |
|||
borderWidth: 0, |
|||
borderColor: "#333", |
|||
}, |
|||
}, |
|||
emphasis: { |
|||
disabled: true //禁止移入柱子改变颜色
|
|||
} |
|||
}, |
|||
], |
|||
}; |
|||
chartInstance.setOption(option); |
|||
window.onresize = function () { |
|||
chartInstance.resize(); |
|||
} |
|||
}, []); |
|||
|
|||
</Module> |
|||
</> |
|||
) |
|||
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' /> |
|||
<span style={{ color: '#C2EEFF', marginLeft: 5 }}>可绿化里程总数</span> |
|||
</Col> |
|||
<Col span={9} style={{ fontSize: 28, fontFamily: 'YouSheBiaoTiHei', color: '#fff' }}>1234.123</Col> |
|||
</Row> |
|||
<div ref={chartRef} style={{ height: "14.5vh", width: "96%" }}></div> |
|||
|
|||
</Module> |
|||
</> |
|||
) |
|||
} |
|||
export default LeftCenter |
Loading…
Reference in new issue