@ -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,153 @@ |
|||
'use strict'; |
|||
|
|||
const areaCode = { |
|||
"360121100000": "莲塘镇", |
|||
"360121101000": "向塘镇", |
|||
"360121102000": "三江镇", |
|||
"360121103000": "塘南镇", |
|||
"360121104000": "幽兰镇", |
|||
"360121105000": "蒋巷镇", |
|||
"360121106000": "武阳镇", |
|||
"360121107000": "冈上镇", |
|||
"360121108000": "广福镇", |
|||
"360121191000": "昌东镇", |
|||
"360121192000": "麻丘镇", |
|||
"360121200000": "泾口乡", |
|||
"360121201000": "南新乡", |
|||
"360121202000": "塔城乡", |
|||
"360121203000": "黄马乡", |
|||
"360121204000": "富山乡", |
|||
"360121205000": "东新乡", |
|||
"360121206000": "八一乡", |
|||
"360121403000": "小蓝经济开发区", |
|||
"360121471000": "银三角管理委员会", |
|||
"360121501000": "五星垦殖场", |
|||
"360121572000": "良种繁殖场", |
|||
} |
|||
|
|||
async function roadState (ctx) { |
|||
try { |
|||
const models = ctx.fs.dc.models; |
|||
const { userId } = ctx.fs.api; |
|||
|
|||
const roadRes = await models.Road.findAll({}) |
|||
const projectRoadRes = await models.Project.findAll({ |
|||
type: 'road', |
|||
}) |
|||
|
|||
const roadState = { |
|||
// 在建数量
|
|||
buildingRoad: 0, |
|||
// 已建数量
|
|||
buildedRoad: 0, |
|||
// 乡镇统计
|
|||
townRoad: { |
|||
|
|||
}, |
|||
// 类型统计
|
|||
roadType: { |
|||
'县': 0, |
|||
'乡': 0, |
|||
'村': 0, |
|||
}, |
|||
// 在建项目统计
|
|||
townProject: { |
|||
|
|||
}, |
|||
// 等级统计
|
|||
roadLevel: { |
|||
|
|||
}, |
|||
// 养护周期
|
|||
curingPeriod: { |
|||
frequent: 0, |
|||
season: 0, |
|||
}, |
|||
// 绿化里程
|
|||
greenMileage: { |
|||
'县': { |
|||
canBeGreen: 0, |
|||
isGreen: 0, |
|||
}, |
|||
'乡': { |
|||
canBeGreen: 0, |
|||
isGreen: 0, |
|||
}, |
|||
'村': { |
|||
canBeGreen: 0, |
|||
isGreen: 0, |
|||
}, |
|||
} |
|||
} |
|||
|
|||
let roadCode = new Set() |
|||
|
|||
for (let r of roadRes) { |
|||
roadCode.add(r.routeCode) |
|||
let townName = areaCode[r.townshipCode] || '其他' |
|||
if (roadState.townRoad[townName]) { |
|||
roadState.townRoad[townName].roadCode.add(r.routeCode) |
|||
roadState.townRoad[townName].mileage += Number(r.chainageMileage) || 0 |
|||
} else { |
|||
roadState.townRoad[townName] = { |
|||
roadCode: new Set([r.routeCode]), |
|||
mileage: Number(r.chainageMileage) || 0, |
|||
} |
|||
} |
|||
|
|||
roadState.roadType[r.level] = (roadState.roadType[r.level] || 0) + (Number(r.chainageMileage) || 0) |
|||
|
|||
if (roadState.roadLevel[r.technicalLevel]) { |
|||
roadState.roadLevel[r.technicalLevel] += 1 |
|||
} else { |
|||
roadState.roadLevel[r.technicalLevel] = 1 |
|||
} |
|||
|
|||
if (r.curingTime) { |
|||
if (r.curingTime.indexOf('经常') > -1) { |
|||
roadState.curingPeriod.frequent += 1 |
|||
} else if (r.curingTime.indexOf('季节') > -1) { |
|||
roadState.curingPeriod.season += 1 |
|||
} |
|||
} |
|||
|
|||
roadState.greenMileage[r.level].canBeGreen += (Number(r.greeningMileage) || 0) |
|||
roadState.greenMileage[r.level].isGreen += (Number(r.greeningMileaged) || 0) |
|||
} |
|||
for (let p of projectRoadRes) { |
|||
if (p.type == 'road') { |
|||
if (p.done) { |
|||
roadState.buildedRoad += 1 |
|||
} else { |
|||
roadState.buildingRoad += 1 |
|||
} |
|||
} |
|||
|
|||
let townName = p.buildUnit.replace('人民政府', '').replace('南昌县', '').replace('管委会', '') |
|||
if (roadState.townProject[townName]) { |
|||
roadState.townProject[townName] += 1 |
|||
} else { |
|||
roadState.townProject[townName] = 1 |
|||
} |
|||
} |
|||
|
|||
roadState.buildedRoad += roadCode.size |
|||
for (let t of Object.keys(roadState.townRoad)) { |
|||
roadState.townRoad[t].roadCount = roadState.townRoad[t].roadCode.size |
|||
delete roadState.townRoad[t].roadCode |
|||
} |
|||
|
|||
ctx.status = 200 |
|||
ctx.body = roadState |
|||
} catch (error) { |
|||
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); |
|||
ctx.status = 400; |
|||
ctx.body = { |
|||
message: typeof error == 'string' ? error : undefined |
|||
} |
|||
} |
|||
} |
|||
|
|||
module.exports = { |
|||
roadState, |
|||
}; |
@ -0,0 +1,2 @@ |
|||
'use strict'; |
|||
|
@ -0,0 +1,68 @@ |
|||
'use strict'; |
|||
|
|||
async function overSpeedList (ctx) { |
|||
try { |
|||
const models = ctx.fs.dc.models; |
|||
const { userId } = ctx.fs.api; |
|||
|
|||
const overSpeedRes = await models.Overspeed.findAll({ |
|||
attributes: ['id', 'licensePlate', 'overrunRate', 'deductPoints', 'fine', 'processingTime'], |
|||
order: [['testTime', 'DESC']], |
|||
}) |
|||
|
|||
ctx.status = 200 |
|||
ctx.body = { |
|||
processed: overSpeedRes.filter(s => s.processingTime).length, |
|||
overSpeedList: overSpeedRes, |
|||
} |
|||
} catch (error) { |
|||
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); |
|||
ctx.status = 400; |
|||
ctx.body = { |
|||
message: typeof error == 'string' ? error : undefined |
|||
} |
|||
} |
|||
} |
|||
|
|||
async function overSpeedProcessed (ctx) { |
|||
try { |
|||
const models = ctx.fs.dc.models; |
|||
const { userId } = ctx.fs.api; |
|||
|
|||
const overSpeedCountRes = await models.Overspeed.count({ |
|||
attributes: ['nameOfInspectionPoint'], |
|||
group: ['nameOfInspectionPoint'], |
|||
}) |
|||
const overSpeedCountProcessedRes = await models.Overspeed.count({ |
|||
attributes: ['nameOfInspectionPoint'], |
|||
where: { processingTime: { $ne: null } }, |
|||
group: ['nameOfInspectionPoint'], |
|||
}) |
|||
|
|||
let data = [] |
|||
for (let c of overSpeedCountRes) { |
|||
const corProcessed = overSpeedCountProcessedRes.find(d => d.nameOfInspectionPoint == c.nameOfInspectionPoint) |
|||
if (corProcessed) { |
|||
data.push({ |
|||
name: c.nameOfInspectionPoint, |
|||
processed: corProcessed.count, |
|||
total: c.count, |
|||
}) |
|||
} |
|||
} |
|||
|
|||
ctx.status = 200 |
|||
ctx.body = data |
|||
} catch (error) { |
|||
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); |
|||
ctx.status = 400; |
|||
ctx.body = { |
|||
message: typeof error == 'string' ? error : undefined |
|||
} |
|||
} |
|||
} |
|||
|
|||
module.exports = { |
|||
overSpeedList, |
|||
overSpeedProcessed |
|||
}; |
@ -0,0 +1,49 @@ |
|||
'use strict'; |
|||
|
|||
async function busCarLevelList (ctx) { |
|||
try { |
|||
const models = ctx.fs.dc.models; |
|||
const { userId } = ctx.fs.api; |
|||
|
|||
let data = [] |
|||
const busCarRes = await models.BusCar.findAll({ |
|||
attributes: ['id', 'company', 'fleet', 'vehicleLicensePlateNumber'], |
|||
}) |
|||
for (let c of busCarRes) { |
|||
const { company, fleet } = c |
|||
const corCompany = data.find(d => d.name === company) |
|||
if (!corCompany) { |
|||
data.push({ |
|||
name: company, |
|||
child: [{ |
|||
name: fleet, |
|||
child: [{ ...c.dataValues }] |
|||
}] |
|||
}) |
|||
} else { |
|||
const corFleet = corCompany.child.find(d => d.name === fleet) |
|||
if (!corFleet) { |
|||
corCompany.child.push({ |
|||
name: fleet, |
|||
child: [{ ...c.dataValues }] |
|||
}) |
|||
} else { |
|||
corFleet.child.push({ ...c.dataValues }) |
|||
} |
|||
} |
|||
} |
|||
|
|||
ctx.status = 200 |
|||
ctx.body = data |
|||
} catch (error) { |
|||
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); |
|||
ctx.status = 400; |
|||
ctx.body = { |
|||
message: typeof error == 'string' ? error : undefined |
|||
} |
|||
} |
|||
} |
|||
|
|||
module.exports = { |
|||
busCarLevelList |
|||
}; |
@ -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; |
|||
}; |
@ -0,0 +1,26 @@ |
|||
'use strict'; |
|||
|
|||
const operation = require('../../controllers/overview/operation'); |
|||
const management = require('../../controllers/overview/management'); |
|||
const build = require('../../controllers/overview/building'); |
|||
|
|||
module.exports = function (app, router, opts) { |
|||
// 运营
|
|||
app.fs.api.logAttr['GET/operation/car_level'] = { content: '获取公交车辆层级信息', visible: false }; |
|||
router.get('/operation/car_level', operation.busCarLevelList); |
|||
|
|||
// 管理
|
|||
app.fs.api.logAttr['GET/manage/overspeed'] = { content: '获取治超详情列', visible: false }; |
|||
router.get('/manage/overspeed', management.overSpeedList); |
|||
|
|||
app.fs.api.logAttr['GET/manage/overspeed/processed'] = { content: '获取治超监测点处理数据', visible: false }; |
|||
router.get('/manage/overspeed/processed', management.overSpeedProcessed); |
|||
|
|||
// 建设
|
|||
app.fs.api.logAttr['GET/build/road_state'] = { content: '获取道路统计', visible: false }; |
|||
router.get('/build/road_state', build.roadState); |
|||
|
|||
// 领导驾驶
|
|||
|
|||
// 养护
|
|||
} |
@ -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); |
@ -0,0 +1,25 @@ |
|||
{ |
|||
"公司": "company", |
|||
"车队": "fleet", |
|||
"车队长": "carCaptain", |
|||
"副车队长": "assistantCarCaptain", |
|||
"办公地点": "officeLocation", |
|||
"线路名称": "lineName", |
|||
"线路类型": "lineType", |
|||
"线路划分": "lineDivision", |
|||
"GPS编号": "gPSNumber", |
|||
"起点终点": "startingPointEndPoint", |
|||
"车辆数": "numberOfVehicles", |
|||
"全程公里数": "totalKilometers", |
|||
"票价": "ticketPrice", |
|||
"开通时间": "openingTime", |
|||
"运行时间": "runningTime", |
|||
"开班时间夏令": "openingTimeSummer", |
|||
"收班时间夏令": "shiftClosingTimeSummer", |
|||
"开班时间冬令": "openingTimeWinter", |
|||
"收班时间冬令": "shiftClosingTimeWinter", |
|||
"沿途站点上行": "uplinkOfStationsAlongTheWay", |
|||
"沿途站点下行": "downlinkOfStationsAlongTheWay", |
|||
"所属区域": "area", |
|||
"备注": "remarks" |
|||
} |
@ -0,0 +1,25 @@ |
|||
{ |
|||
"company": "公司", |
|||
"fleet": "车队", |
|||
"carCaptain": "车队长", |
|||
"assistantCarCaptain": "副车队长", |
|||
"officeLocation": "办公地点", |
|||
"lineName": "线路名称", |
|||
"lineType": "线路类型", |
|||
"lineDivision": "线路划分", |
|||
"gPSNumber": "GPS编号", |
|||
"startingPointEndPoint": "起点终点", |
|||
"numberOfVehicles": "车辆数", |
|||
"totalKilometers": "全程公里数", |
|||
"ticketPrice": "票价", |
|||
"openingTime": "开通时间", |
|||
"runningTime": "运行时间", |
|||
"openingTimeSummer": "开班时间夏令", |
|||
"shiftClosingTimeSummer": "收班时间夏令", |
|||
"openingTimeWinter": "开班时间冬令", |
|||
"shiftClosingTimeWinter": "收班时间冬令", |
|||
"uplinkOfStationsAlongTheWay": "沿途站点上行", |
|||
"downlinkOfStationsAlongTheWay": "沿途站点下行", |
|||
"area": "所属区域", |
|||
"remarks": "备注" |
|||
} |
@ -0,0 +1,25 @@ |
|||
{ |
|||
"公司": "company", |
|||
"车队": "fleet", |
|||
"车队长": "car_Captain", |
|||
"副车队长": "assistant_car_Captain", |
|||
"办公地点": "office_location", |
|||
"线路名称": "line_name", |
|||
"线路类型": "line_type", |
|||
"线路划分": "line_division", |
|||
"GPS编号": "gPS_number", |
|||
"起点终点": "starting_point_end_point", |
|||
"车辆数": "number_of_vehicles", |
|||
"全程公里数": "total_kilometers", |
|||
"票价": "ticket_Price", |
|||
"开通时间": "opening_time", |
|||
"运行时间": "running_time", |
|||
"开班时间夏令": "opening_time_summer", |
|||
"收班时间夏令": "shift_closing_time_summer", |
|||
"开班时间冬令": "opening_time_Winter", |
|||
"收班时间冬令": "shift_closing_time_winter", |
|||
"沿途站点上行": "uplink_of_stations_along_the_way", |
|||
"沿途站点下行": "downlink_of_stations_along_the_way", |
|||
"所属区域": "area", |
|||
"备注": "remarks" |
|||
} |
@ -0,0 +1,29 @@ |
|||
-- 公交线路 |
|||
|
|||
CREATE TABLE if not exists "bus_line" ( id serial not null ); |
|||
|
|||
CREATE unique index if not exists bus_line_id_uindex |
|||
ON bus_line (id); alter TABLE bus_line add constraint bus_line_pk primary key (id); alter TABLE bus_line add Company varchar(1024); comment |
|||
ON column bus_line.Company is '公司'; alter TABLE bus_line add Fleet varchar(1024); comment |
|||
ON column bus_line.Fleet is '车队'; alter TABLE bus_line add Car_Captain varchar(1024); comment |
|||
ON column bus_line.Car_Captain is '车队长'; alter TABLE bus_line add Assistant_Car_Captain varchar(1024); comment |
|||
ON column bus_line.Assistant_Car_Captain is '副车队长'; alter TABLE bus_line add Office_Location varchar(1024); comment |
|||
ON column bus_line.Office_Location is '办公地点'; alter TABLE bus_line add Line_Name varchar(1024); comment |
|||
ON column bus_line.Line_Name is '线路名称'; alter TABLE bus_line add Line_Type varchar(1024); comment |
|||
ON column bus_line.Line_Type is '线路类型'; alter TABLE bus_line add Line_Division varchar(1024); comment |
|||
ON column bus_line.Line_Division is '线路划分'; alter TABLE bus_line add GPS_Number varchar(1024); comment |
|||
ON column bus_line.GPS_Number is 'GPS编号'; alter TABLE bus_line add Starting_Point_End_Point varchar(1024); comment |
|||
ON column bus_line.Starting_Point_End_Point is '起点终点'; alter TABLE bus_line add Number_Of_Vehicles varchar(1024); comment |
|||
ON column bus_line.Number_Of_Vehicles is '车辆数'; alter TABLE bus_line add Total_Kilometers varchar(1024); comment |
|||
ON column bus_line.Total_Kilometers is '全程公里数'; alter TABLE bus_line add Ticket_Price varchar(1024); comment |
|||
ON column bus_line.Ticket_Price is '票价'; alter TABLE bus_line add Opening_Time varchar(1024); comment |
|||
ON column bus_line.Opening_Time is '开通时间'; alter TABLE bus_line add Running_Time varchar(1024); comment |
|||
ON column bus_line.Running_Time is '运行时间'; alter TABLE bus_line add Opening_Time_Summer varchar(1024); comment |
|||
ON column bus_line.Opening_Time_Summer is '开班时间夏令'; alter TABLE bus_line add Shift_Closing_Time_Summer varchar(1024); comment |
|||
ON column bus_line.Shift_Closing_Time_Summer is '收班时间夏令'; alter TABLE bus_line add Opening_Time_Winter varchar(1024); comment |
|||
ON column bus_line.Opening_Time_Winter is '开班时间冬令'; alter TABLE bus_line add Shift_Closing_Time_Winter varchar(1024); comment |
|||
ON column bus_line.Shift_Closing_Time_Winter is '收班时间冬令'; alter TABLE bus_line add Uplink_Of_Stations_Along_The_Way varchar(1024); comment |
|||
ON column bus_line.Uplink_Of_Stations_Along_The_Way is '沿途站点上行'; alter TABLE bus_line add Downlink_Of_Stations_Along_The_Way varchar(1024); comment |
|||
ON column bus_line.Downlink_Of_Stations_Along_The_Way is '沿途站点下行'; alter TABLE bus_line add Area varchar(1024); comment |
|||
ON column bus_line.Area is '所属区域'; alter TABLE bus_line add Remarks varchar(1024); comment |
|||
ON column bus_line.Remarks is '备注'; |
@ -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 '机动车所有人'; |
@ -0,0 +1,3 @@ |
|||
export default { |
|||
navigationBarTitleText: '巡查养护' |
|||
} |
@ -1,9 +1,246 @@ |
|||
import React from 'react' |
|||
import { View } from '@tarojs/components'; |
|||
import React, { useState, useEffect } from 'react'; |
|||
import Taro from '@tarojs/taro'; |
|||
import { |
|||
View, |
|||
RadioGroup, |
|||
Radio, |
|||
Button, |
|||
Image, |
|||
Input, |
|||
Textarea, |
|||
Picker |
|||
} from '@tarojs/components'; |
|||
import { AtForm, AtInput, AtButton, AtTextarea, AtImagePicker, AtTimeline } from 'taro-ui'; |
|||
// import InputPicker from '../components/inputPicker'; |
|||
import './index.scss'; |
|||
import arrowIcon from '../../static/img/patrol/arrow-down.svg'; |
|||
|
|||
const Index = () => { |
|||
const [isPatrol, setIsPatrol] = useState(true) // 巡查 or 养护 |
|||
const [prjTypeSelector, setPrjTypeSelector] = useState([]) |
|||
const [roadSelector, setRoadSelector] = useState([]) |
|||
const [projectType, setProjectType] = useState('') |
|||
const [road, setRoad] = useState('') |
|||
|
|||
const [images, setimages] = useState([]) |
|||
|
|||
const reportType = [ |
|||
{ |
|||
value: '巡查', |
|||
text: '巡查', |
|||
checked: true |
|||
}, |
|||
{ |
|||
value: '养护', |
|||
text: '养护', |
|||
checked: false |
|||
} |
|||
] |
|||
|
|||
useEffect(() => { |
|||
const prjTypeSelector = ['道路', '桥梁', '涵洞', '其他'] |
|||
const roadSelector = ['富山一路', '金沙大道', '玉湖路'] |
|||
setPrjTypeSelector(prjTypeSelector) |
|||
setRoadSelector(roadSelector) |
|||
}, []) |
|||
|
|||
useEffect(() => { |
|||
if (projectType) { |
|||
setPrjTypeSelector(prjTypeSelector.filter(s => s.includes(projectType))) |
|||
} |
|||
}, [projectType]) |
|||
// useEffect(() => { |
|||
// if (projectType) { |
|||
// setPrjTypeSelector(prjTypeSelector.filter(s => s.includes(projectType))) |
|||
// } |
|||
// }, [projectType]) |
|||
|
|||
function onTypeChange(e) { |
|||
if (e.detail.value === '巡查') { |
|||
setIsPatrol(true) |
|||
} else { |
|||
setIsPatrol(false) |
|||
} |
|||
} |
|||
|
|||
function onPrjTypeChange(e) { |
|||
setProjectType(selector[e.detail.value]) |
|||
} |
|||
|
|||
function onImgPickerChange(files) { |
|||
setimages(files) |
|||
} |
|||
function onImageClick(index, file) { |
|||
Taro.previewImage({ |
|||
urls: [file.url] // 需要预览的图片http链接列表 |
|||
}) |
|||
} |
|||
|
|||
useEffect(() => { |
|||
console.log(images); |
|||
}, [images]) |
|||
|
|||
return ( |
|||
<View>巡查养护</View> |
|||
<View className='patrol'> |
|||
<View className='report-type'> |
|||
<View className='text'>上报类型</View> |
|||
<RadioGroup onChange={onTypeChange}> |
|||
{ |
|||
reportType.map((item, i) => { |
|||
return ( |
|||
<Radio |
|||
key={i} |
|||
value={item.value} |
|||
checked={item.checked} |
|||
className='radio' |
|||
color='#346FC2' |
|||
> |
|||
{item.text} |
|||
</Radio> |
|||
) |
|||
}) |
|||
} |
|||
</RadioGroup> |
|||
</View> |
|||
|
|||
<View className='input-picker'> |
|||
<AtInput |
|||
className='input' |
|||
title='工程类型:' |
|||
type='text' |
|||
placeholder='请选择工程类型' |
|||
border={false} |
|||
value={projectType} |
|||
onChange={value => setProjectType(value)} |
|||
/> |
|||
<Picker mode='selector' range={prjTypeSelector} onChange={onPrjTypeChange}> |
|||
<Image src={arrowIcon} className='img-r' /> |
|||
</Picker> |
|||
</View> |
|||
<View className='input-picker'> |
|||
<AtInput |
|||
className='input' |
|||
title='所在道路:' |
|||
type='text' |
|||
placeholder='请选择您所在的道路' |
|||
border={false} |
|||
value={road} |
|||
onChange={value => setRoad(value)} |
|||
/> |
|||
<Picker mode='selector' range={roadSelector} onChange={onPrjTypeChange}> |
|||
<Image src={arrowIcon} className='img-r' /> |
|||
</Picker> |
|||
</View> |
|||
|
|||
{/* <InputPicker |
|||
className='input-picker' |
|||
title='工程类型:' |
|||
placeholder='请选择工程类型' |
|||
value={projectType} |
|||
onChange={setProjectType} |
|||
selector={prjTypeSelector} |
|||
/> |
|||
<InputPicker |
|||
className='input-picker' |
|||
title='所在道路:' |
|||
placeholder='请选择您所在的道路' |
|||
value={road} |
|||
onChange={setRoad} |
|||
selector={roadSelector} |
|||
/> */} |
|||
|
|||
<View className='input-picker'> |
|||
<AtInput |
|||
className='input' |
|||
title='所属路段:' |
|||
type='text' |
|||
placeholder='路段名称' |
|||
border={false} |
|||
// value={this.state.value} |
|||
// onChange={this.handleChange.bind(this, 'value')} |
|||
/> |
|||
<Picker mode='selector' range={roadSelector} onChange={onPrjTypeChange}> |
|||
<Image src={arrowIcon} className='img-l' /> |
|||
</Picker> |
|||
<AtInput |
|||
className='input' |
|||
type='text' |
|||
placeholder='路段名称' |
|||
border={false} |
|||
// value={this.state.value} |
|||
// onChange={this.handleChange.bind(this, 'value')} |
|||
/> |
|||
<Picker mode='selector' range={roadSelector} onChange={onPrjTypeChange}> |
|||
<Image src={arrowIcon} className='img-r' /> |
|||
</Picker> |
|||
</View> |
|||
|
|||
<AtTextarea |
|||
count={false} |
|||
title='具体位置:' |
|||
placeholder='具体位置:根据定位自动获取,可手动修改' |
|||
// value={this.state.value} |
|||
// onChange={this.handleChange.bind(this, 'value')} |
|||
/> |
|||
<AtTextarea |
|||
count={false} |
|||
title='巡查内容:' |
|||
placeholder='请输入巡查内容' |
|||
// value={this.state.value} |
|||
// onChange={this.handleChange.bind(this, 'value')} |
|||
/> |
|||
|
|||
{ |
|||
isPatrol ? |
|||
<View className='patrol-picker'> |
|||
现场图片: |
|||
<AtImagePicker |
|||
className='img-picker' |
|||
count={3 - images.length} |
|||
showAddBtn={images.length >= 3 ? false : true} |
|||
files={images} |
|||
onChange={onImgPickerChange} |
|||
onImageClick={onImageClick} |
|||
/> |
|||
</View> : |
|||
<View className='conserve-picker'> |
|||
养护图片: |
|||
<View className='horizontal-line hl-one'> |
|||
<View className='circle c-one'></View> |
|||
<View className='text t-one'>养护前</View> |
|||
</View> |
|||
<AtImagePicker |
|||
className='img-picker' |
|||
count={3} |
|||
files={images} |
|||
onChange={onImgPickerChange} |
|||
/> |
|||
<View className='horizontal-line hl-two'> |
|||
<View className='circle c-two'></View> |
|||
<View className='text t-two'>养护中</View> |
|||
</View> |
|||
<AtImagePicker |
|||
className='img-picker' |
|||
count={3} |
|||
files={images} |
|||
onChange={onImgPickerChange} |
|||
/> |
|||
<View className='horizontal-line hl-three'> |
|||
<View className='circle c-three'></View> |
|||
<View className='text t-three'>养护后</View> |
|||
</View> |
|||
<AtImagePicker |
|||
className='img-picker' |
|||
count={3} |
|||
files={images} |
|||
onChange={onImgPickerChange} |
|||
/> |
|||
</View> |
|||
} |
|||
|
|||
<AtButton formType='submit' type='primary' className='sub-btn'>上报</AtButton> |
|||
|
|||
</View> |
|||
) |
|||
} |
|||
|
|||
|
@ -0,0 +1,116 @@ |
|||
.patrol { |
|||
height: 100vh; |
|||
width: 100vw; |
|||
background-color: #f6f6f6; |
|||
padding-top: 20px; |
|||
|
|||
.report-type { |
|||
height: 96px; |
|||
background-color: #fff; |
|||
margin-bottom: 20px; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
|
|||
.text { |
|||
margin-left: 30px; |
|||
} |
|||
|
|||
.radio { |
|||
margin-right: 30px; |
|||
} |
|||
} |
|||
|
|||
.input-picker { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
background-color: #fff; |
|||
margin-bottom: 5px; |
|||
|
|||
.img-r { |
|||
width: 24px; |
|||
height: 14px; |
|||
margin-right: 30px; |
|||
// margin-left: 10px; |
|||
} |
|||
.img-l { |
|||
width: 24px; |
|||
height: 14px; |
|||
} |
|||
} |
|||
|
|||
.patrol-picker { |
|||
background-color: #fff; |
|||
padding: 20px; |
|||
|
|||
} |
|||
|
|||
.conserve-picker { |
|||
background-color: #fff; |
|||
padding: 20px; |
|||
|
|||
.horizontal-line { |
|||
height: 30px; |
|||
width: 100%; |
|||
display: flex; |
|||
justify-content: left; |
|||
align-items: center; |
|||
|
|||
.circle { |
|||
margin-left: 4px; |
|||
width: 22px; |
|||
height: 22px; |
|||
background-color: #fff; |
|||
border-radius: 50%; |
|||
} |
|||
|
|||
.text { |
|||
margin-left: 46px; |
|||
font-size: 24px; |
|||
} |
|||
} |
|||
.hl-one { |
|||
background-color: #DFDFDF; |
|||
|
|||
.c-one { |
|||
border: solid 4px #999999; |
|||
} |
|||
|
|||
.t-one { |
|||
color: #999999; |
|||
} |
|||
} |
|||
.hl-two { |
|||
background-color: #f7d3a5; |
|||
|
|||
.c-two { |
|||
border: solid 4px #FE9B1C; |
|||
} |
|||
|
|||
.t-two { |
|||
color: #FE9B1C; |
|||
} |
|||
} |
|||
.hl-three { |
|||
background-color: #a0f3a4; |
|||
|
|||
.c-three { |
|||
border: solid 4px #08D514; |
|||
} |
|||
|
|||
.t-three { |
|||
color: #08D514; |
|||
} |
|||
} |
|||
|
|||
.img-picker { |
|||
margin: 20px; |
|||
} |
|||
} |
|||
|
|||
.sub-btn { |
|||
width: 70%; |
|||
margin-top: 100px; |
|||
} |
|||
} |
@ -0,0 +1,125 @@ |
|||
import React, { useState } from 'react' |
|||
import Taro, { useDidShow } from '@tarojs/taro' |
|||
import { View, Picker, Input, Image } from '@tarojs/components' |
|||
import moment from 'moment' |
|||
import './index.scss' |
|||
import NoData from '@/components/no-data/noData' |
|||
import chevronDown from '../../static/img/patrolView/chevron-down.png' |
|||
import searchIcon from '../../static/img/patrolView/search.png' |
|||
import cardImg from '../../static/img/patrolView/card-img.png' |
|||
import patrolIcon from '../../static/img/patrolView/patrol.svg' |
|||
import patrolActiveIcon from '../../static/img/patrolView/patrol-active.svg' |
|||
import conserveIcon from '../../static/img/patrolView/conserve.svg' |
|||
import conserveActiveIcon from '../../static/img/patrolView/conserve-active.svg' |
|||
|
|||
function Index() { |
|||
const [datePicker, setDatePicker] = useState(moment().format('YYYY-MM-DD')) |
|||
const [listData, setListData] = useState([]) |
|||
const [inputSite, setInputSite] = useState('') |
|||
const [page, setPage] = useState(0) |
|||
const [total, setTotal] = useState(0) |
|||
const [num, setNum] = useState(Math.random()) |
|||
const [systemInfo, setSystemInfo] = useState('') |
|||
|
|||
const data = [ |
|||
{ |
|||
place: { |
|||
name: '飞尚' |
|||
}, |
|||
user: { |
|||
name: '用户1' |
|||
}, |
|||
time: '2022-7-1' |
|||
} |
|||
] |
|||
|
|||
useDidShow(() => { |
|||
let refresh = Taro.getStorageSync('refresh'); // 返回列表需要刷新 |
|||
if (refresh) { |
|||
setPage(0) |
|||
setNum(Math.random()) |
|||
Taro.removeStorageSync('refresh'); // 返回列表需要刷新 |
|||
} |
|||
Taro.getSystemInfo({ |
|||
success: (res) => { |
|||
// windows | mac为pc端 |
|||
// android | ios为手机端 |
|||
setSystemInfo(res.platform); |
|||
} |
|||
}); |
|||
}) |
|||
|
|||
const onDateChange = e => { |
|||
setDatePicker(e.detail.value); |
|||
} |
|||
|
|||
const handleConfirm = () => { |
|||
setPage(0) |
|||
setListData([]); |
|||
setTotal(0); |
|||
setNum(Math.random()) |
|||
} |
|||
|
|||
const handleInput = e => { |
|||
setInputSite(e.detail.value); |
|||
if (!e.detail.value) { |
|||
setPage(0) |
|||
setListData([]); |
|||
setTotal(0); |
|||
setNum(Math.random()) |
|||
} |
|||
} |
|||
|
|||
return ( |
|||
<View> |
|||
<View className='type-box'> |
|||
<View className='item left'> |
|||
<Image className='type-img' src={patrolIcon} /> |
|||
<View>巡查</View> |
|||
</View> |
|||
<View className='line'></View> |
|||
<View className='item'> |
|||
<Image className='type-img' src={conserveIcon} /> |
|||
<View>养护</View> |
|||
</View> |
|||
</View> |
|||
<View className='filter-box'> |
|||
<View className='filter-item'> |
|||
<View style={{ float: 'left', marginLeft: '20rpx', color: '#333' }}>日期:</View> |
|||
<Picker className='picker' style={{ overflow: 'hidden', float: 'left' }} mode='date' end={(systemInfo == 'windows' || systemInfo == 'mac') ? moment().add(1, 'd').format('YYYY-MM-DD') : moment().format('YYYY-MM-DD')} onChange={onDateChange}> |
|||
<View className='filter-name'>{datePicker || '请选择'}</View> |
|||
<Image className='filter-img' src={chevronDown} /> |
|||
</Picker> |
|||
</View> |
|||
<View class='head-search'> |
|||
<Image className='search-img' src={searchIcon} /> |
|||
<Input class='heard-search-input' value={inputSite} placeholder='请输入场所名称' onConfirm={handleConfirm} onInput={handleInput} /> |
|||
</View> |
|||
</View> |
|||
|
|||
<View style={{ marginTop: '70px' }}> |
|||
{ |
|||
data && data.length > 0 ? data && data.map((e, index) => { |
|||
return ( |
|||
<View className='cardBox' key={index} onClick={() => handleDetail(index)}> |
|||
<View className='card-item' > |
|||
<Image className='card-bg' src={cardImg} /> |
|||
<View className='card-position'> |
|||
<View className='card-title'>{e.place.name}</View> |
|||
<View style={{ float: 'left', width: '100%', fontSize: '28rpx', marginTop: '16rpx' }}> |
|||
<View style={{ float: 'left' }}>填报人:</View> |
|||
<View style={{ float: 'left' }}>{e.user.name}</View> |
|||
</View> |
|||
<View className='card-date'>{moment(e.time).format('YYYY-MM-DD HH:mm:ss')}</View> |
|||
</View> |
|||
</View> |
|||
</View> |
|||
) |
|||
}) : <NoData top='400rpx'></NoData> |
|||
} |
|||
</View> |
|||
</View> |
|||
) |
|||
} |
|||
|
|||
export default Index |
@ -0,0 +1,135 @@ |
|||
page { |
|||
background-color: #f6f6f6; |
|||
|
|||
.type-box { |
|||
background-color: #fff; |
|||
height: 80px; |
|||
display: flex; |
|||
justify-content: space-around; |
|||
align-items: center; |
|||
|
|||
.item { |
|||
flex-grow: 1; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
|
|||
.type-img { |
|||
width: 40px; |
|||
height: 40px; |
|||
margin: 0 10px; |
|||
} |
|||
} |
|||
.line { |
|||
|
|||
width: 1px; |
|||
height: 30px; |
|||
background-color: #f6f6f6; |
|||
} |
|||
} |
|||
|
|||
.filter-box { |
|||
position: fixed; |
|||
top: 80px; |
|||
display: flex; |
|||
width: 100%; |
|||
z-index: 100; |
|||
background: #fff; |
|||
color: #999999; |
|||
font-size: 28rpx; |
|||
border-top: 2rpx solid #f6f6f6; |
|||
|
|||
.filter-item { |
|||
overflow: hidden; |
|||
height: 98rpx; |
|||
line-height: 98rpx; |
|||
flex: 1; |
|||
|
|||
.filter-name { |
|||
float: left; |
|||
// margin-left: 20rpx; |
|||
} |
|||
|
|||
.filter-img { |
|||
width: 14px; |
|||
height: 8px; |
|||
float: left; |
|||
margin: 46rpx 20rpx 18rpx 10rpx; |
|||
} |
|||
} |
|||
|
|||
.head-search { |
|||
width: 400rpx; |
|||
display: flex; |
|||
background: #fff; |
|||
padding: 10rpx 26rpx 15rpx; |
|||
box-sizing: border-box; |
|||
border-radius: 50rpx; |
|||
box-shadow: 0 8rpx 10rpx 0rpx #00000008; |
|||
border: 2rpx solid #00000011; |
|||
height: 68rpx; |
|||
line-height: 68rpx; |
|||
margin: 14rpx 30rpx 14rpx 0; |
|||
|
|||
.search-img { |
|||
width: 36rpx; |
|||
height: 36rpx; |
|||
margin-top: 5rpx; |
|||
} |
|||
|
|||
.heard-search-input { |
|||
margin-left: 26rpx; |
|||
font-size: 28rpx; |
|||
width: 100%; |
|||
color: #333; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.cardBox { |
|||
width: 690rpx; |
|||
margin: 50rpx auto; |
|||
|
|||
.card-item { |
|||
position: relative; |
|||
margin-bottom: 10rpx; |
|||
|
|||
.card-bg { |
|||
width: 100%; |
|||
height: 260rpx; |
|||
display: block; |
|||
|
|||
} |
|||
|
|||
.card-position { |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
width: 88%; |
|||
padding: 16rpx 0 16rpx 36rpx; |
|||
overflow: hidden; |
|||
text-align: justify; |
|||
|
|||
.card-title { |
|||
font-size: 28rpx; |
|||
color: #333333; |
|||
float: left; |
|||
margin-bottom: 30rpx; |
|||
width: 470rpx; |
|||
text-overflow: ellipsis; |
|||
white-space: nowrap; |
|||
overflow: hidden; |
|||
margin-top: 8rpx; |
|||
} |
|||
|
|||
.card-date { |
|||
float: left; |
|||
font-size: 28rpx; |
|||
color: #999999; |
|||
margin-top: 30rpx; |
|||
width: 100%; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
@ -1,29 +1,29 @@ |
|||
.page { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
|
|||
.fill { |
|||
margin-top: 30px; |
|||
padding: 10px; |
|||
width: 94%; |
|||
height: 360px; |
|||
background: url('../../static/img/patrol//fill-bg.svg') no-repeat; |
|||
background-size:100% 100%; |
|||
} |
|||
.fill { |
|||
margin-top: 30px; |
|||
padding: 10px; |
|||
width: 94%; |
|||
height: 360px; |
|||
background: url('../../static/img/home/fill-bg.svg') no-repeat; |
|||
background-size: 100% 100%; |
|||
} |
|||
|
|||
.title { |
|||
margin: 50px 0 0 48px; |
|||
color: #fff; |
|||
font-size: 48px; |
|||
} |
|||
.title { |
|||
margin: 50px 0 0 48px; |
|||
color: #fff; |
|||
font-size: 48px; |
|||
} |
|||
|
|||
.btn { |
|||
margin: 20px 0 0 50px; |
|||
color: #fff; |
|||
text-align: center; |
|||
width: 200px; |
|||
border: solid 1px #fff; |
|||
border-radius: 10px; |
|||
} |
|||
.btn { |
|||
margin: 30px 0 0 50px; |
|||
color: #fff; |
|||
text-align: center; |
|||
width: 200px; |
|||
border: solid 1px #fff; |
|||
border-radius: 10px; |
|||
} |
|||
} |
@ -1,45 +1,92 @@ |
|||
.page { |
|||
height: 100vh; |
|||
background: #F0F2F5; |
|||
box-sizing: border-box; |
|||
|
|||
.personal { |
|||
padding: 20px; |
|||
|
|||
.info { |
|||
border-radius: 10px; |
|||
background: #fff; |
|||
height: 30vh; |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
justify-content: center; |
|||
|
|||
.icon { |
|||
width: 150px; |
|||
height: 150px; |
|||
border-radius: 50%; |
|||
background: #f6f6f6; |
|||
display: flex; |
|||
flex-direction: column; |
|||
|
|||
.myBox { |
|||
width: 90%; |
|||
height: 300rpx; |
|||
margin: 30rpx auto; |
|||
background: url('../../static/img/my/card-bg.svg') no-repeat; |
|||
background-size: 100%; |
|||
border-radius: 8rpx; |
|||
|
|||
.my-top { |
|||
overflow: hidden; |
|||
padding: 70rpx 0 28rpx 30rpx; |
|||
|
|||
.my-portrait { |
|||
width: 120rpx; |
|||
height: 120rpx; |
|||
display: block; |
|||
float: left; |
|||
} |
|||
|
|||
.name { |
|||
font-size: 30px; |
|||
margin-top: 30px; |
|||
.my-item { |
|||
float: left; |
|||
margin-left: 32rpx; |
|||
width: 70%; |
|||
|
|||
.my-username { |
|||
font-size: 32rpx; |
|||
color: #FFFFFF; |
|||
margin-bottom: 24rpx; |
|||
margin-top: 6rpx; |
|||
display: -webkit-box; |
|||
-webkit-box-orient: vertical; |
|||
-webkit-line-clamp: 2; |
|||
overflow: hidden; |
|||
} |
|||
|
|||
.my-phone { |
|||
font-size: 28rpx; |
|||
font-weight: bold; |
|||
color: #FFFFFF; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.box { |
|||
overflow: hidden; |
|||
background-color: #fff; |
|||
width: 100%; |
|||
height: 92rpx; |
|||
line-height: 92rpx; |
|||
|
|||
.box-img { |
|||
width: 52rpx; |
|||
height: 52rpx; |
|||
display: block; |
|||
float: left; |
|||
padding: 20rpx 20rpx 20rpx 30rpx; |
|||
} |
|||
|
|||
.box-txt { |
|||
float: left; |
|||
font-size: 28rpx; |
|||
color: #333333; |
|||
} |
|||
|
|||
.img { |
|||
width: 52rpx; |
|||
height: 52rpx; |
|||
display: block; |
|||
float: right; |
|||
padding: 20rpx 30rpx 20rpx 0; |
|||
} |
|||
} |
|||
|
|||
.logout { |
|||
box-sizing: border-box; |
|||
width: 100vw; |
|||
margin-top: 50px; |
|||
padding: 0 20px; |
|||
|
|||
.btn { |
|||
background: #fff; |
|||
font-size: 28px; |
|||
padding: 8px 0; |
|||
} |
|||
width: 550rpx; |
|||
height: 80rpx; |
|||
line-height: 80rpx; |
|||
background: #346FC2; |
|||
border-radius: 8rpx; |
|||
font-size: 28rpx; |
|||
color: #FFFFFF; |
|||
margin: 98rpx auto 0; |
|||
text-align: center; |
|||
} |
|||
} |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 889 B |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 174 B |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 93 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 543 B |
After Width: | Height: | Size: 373 B |
@ -1,118 +0,0 @@ |
|||
// import React, { useEffect, useState } from 'react';
|
|||
// import { connect } from 'react-redux';
|
|||
// import { Spin, Drawer, Button } from 'antd';
|
|||
// import '../style.less';
|
|||
// import { EditableProTable } from '@ant-design/pro-table';
|
|||
|
|||
// const CompileDrawer = (props) => {
|
|||
// const { dispatch, actions, user, loading, visible, checkRow, close, reportRectifyDetail, checkAction } = props
|
|||
// const [requesting, setRequesting] = useState(false)
|
|||
// const [dataSource, setDataSource] = useState([])
|
|||
// const { report } = actions
|
|||
// const isCheck = checkAction == 'check'
|
|||
|
|||
// useEffect(() => {
|
|||
// if (checkRow.day) {
|
|||
// dispatch(report.reportRectifyDetail(checkRow.day, checkRow.depId))
|
|||
// }
|
|||
// }, [checkRow])
|
|||
|
|||
// useEffect(() => {
|
|||
// let data = reportRectifyDetail
|
|||
// let i = 1
|
|||
// for (let d of data) {
|
|||
// d.index_ = i++
|
|||
// }
|
|||
// setDataSource(data)
|
|||
// }, [reportRectifyDetail])
|
|||
|
|||
// return (
|
|||
// <Drawer
|
|||
// title={"合用场所安全隐患排查整治汇总表"}
|
|||
// placement="right"
|
|||
// onClose={() => {
|
|||
// close()
|
|||
// }}
|
|||
// visible={visible}
|
|||
// width={'82%'}
|
|||
// >
|
|||
// <Spin spinning={loading || requesting}>
|
|||
// <EditableProTable
|
|||
// columns={[
|
|||
// {
|
|||
// title: '序号',
|
|||
// dataIndex: 'index_',
|
|||
// readonly: true,
|
|||
// },
|
|||
// {
|
|||
// title: '名称',
|
|||
// dataIndex: 'name',
|
|||
// readonly: true,
|
|||
// }, {
|
|||
// title: '地址',
|
|||
// dataIndex: 'address',
|
|||
// readonly: true,
|
|||
// }, {
|
|||
// title: '排查发现隐患',
|
|||
// dataIndex: 'hiddenDanger',
|
|||
// readonly: true,
|
|||
// }, {
|
|||
// title: '采取整改措施',
|
|||
// dataIndex: 'correctiveAction',
|
|||
// }, {
|
|||
// title: '实施处罚、强制措施情况',
|
|||
// dataIndex: 'punishment',
|
|||
// },
|
|||
// ]}
|
|||
// controlled={true}
|
|||
// value={dataSource}
|
|||
// onChange={setDataSource}
|
|||
// rowKey="id"
|
|||
// headerTitle={`填报单位:${checkRow.region};时间:${checkRow.day}`}
|
|||
// maxLength={5}
|
|||
// recordCreatorProps={false}
|
|||
// editable={{
|
|||
// type: 'multiple',
|
|||
// editableKeys: isCheck ? [] : dataSource.map(r => r.id)
|
|||
// }}
|
|||
// toolBarRender={() => [
|
|||
// isCheck ? '' :
|
|||
// <Button
|
|||
// type="primary"
|
|||
// key="save"
|
|||
// onClick={() => {
|
|||
// // dataSource 就是当前数据,可以调用 api 将其保存
|
|||
// setRequesting(true)
|
|||
// const data = dataSource
|
|||
// for (let d of data) {
|
|||
// d.userId = user.id
|
|||
// delete d.index_
|
|||
// }
|
|||
// dispatch(report.compileReportRectifyDetail(dataSource)).then(res => {
|
|||
// setRequesting(false)
|
|||
// })
|
|||
// }}
|
|||
// >
|
|||
// 保存数据
|
|||
// </Button>
|
|||
// ]}
|
|||
// >
|
|||
|
|||
// </EditableProTable>
|
|||
// </Spin>
|
|||
// </Drawer >
|
|||
// )
|
|||
// }
|
|||
|
|||
// function mapStateToProps (state) {
|
|||
// const { auth, global, members, reportRectifyDetail } = state;
|
|||
// return {
|
|||
// loading: reportRectifyDetail.isRequesting,
|
|||
// user: auth.user,
|
|||
// actions: global.actions,
|
|||
// members: members.data,
|
|||
// reportRectifyDetail: reportRectifyDetail.data || []
|
|||
// };
|
|||
// }
|
|||
|
|||
// export default connect(mapStateToProps)(CompileDrawer);
|
@ -1,124 +0,0 @@ |
|||
// import React, { useEffect, useRef } from 'react';
|
|||
// import { connect } from 'react-redux';
|
|||
// import { Spin, Button, Modal, Form, Switch } from 'antd';
|
|||
// import ProForm, { ProFormText, ProFormSelect } from '@ant-design/pro-form';
|
|||
// import { useState } from 'react';
|
|||
|
|||
// const ConfigModal = (props) => {
|
|||
// const { dispatch, actions, user, loading, visible, close, editData, allAreas, reportType } = props
|
|||
// const [excuteTimeOptions, setExcuteTimeOptions] = useState([])
|
|||
// const formRef = useRef()
|
|||
// const { report } = actions
|
|||
|
|||
// useEffect(() => {
|
|||
// let excuteTimeOptions = []
|
|||
// for (let i = 0; i < 24; i++) {
|
|||
// let curT = i
|
|||
// if (curT < 10) {
|
|||
// curT = '0' + curT
|
|||
// }
|
|||
// excuteTimeOptions.push({
|
|||
// value: curT + ':00',
|
|||
// label: curT + ':00',
|
|||
// })
|
|||
// excuteTimeOptions.push({
|
|||
// value: curT + ':30',
|
|||
// label: curT + ':30',
|
|||
// })
|
|||
// }
|
|||
// setExcuteTimeOptions(excuteTimeOptions);
|
|||
// }, [])
|
|||
|
|||
// return (
|
|||
// <Modal
|
|||
// title={`${editData ? '编辑' : '新增'}报表配置`}
|
|||
// visible={visible}
|
|||
// onOk={() => {
|
|||
// formRef.current.validateFields().then(v => {
|
|||
// v.excuteTime = String(v.excuteTime)
|
|||
// console.log(v);
|
|||
// dispatch(editData ? report.editReportConfig(v, editData.id) : report.addReportConfig(v)).then(res => {
|
|||
// if (res.success) {
|
|||
// dispatch(report.getReportConfig())
|
|||
// close()
|
|||
// }
|
|||
// })
|
|||
// })
|
|||
// }}
|
|||
// onCancel={() => {
|
|||
// close()
|
|||
// }}
|
|||
// >
|
|||
// <ProForm
|
|||
// formRef={formRef}
|
|||
// autoFocusFirstInput
|
|||
// layout={'horizontal'}
|
|||
// labelCol={{ span: 4 }}
|
|||
// wrapperCol={{ span: 18 }}
|
|||
// initialValues={
|
|||
// editData ?
|
|||
// editData :
|
|||
// {
|
|||
// excuteTime: '00:00',
|
|||
// isEnable: true
|
|||
// }
|
|||
// }
|
|||
// submitter={false}
|
|||
// formKey='config-form'
|
|||
// >
|
|||
// <ProFormText
|
|||
// name={'reportName'}
|
|||
// label="报表名称"
|
|||
// placeholder="请输入名称"
|
|||
// required
|
|||
// rules={[{ required: true, message: '请输入名称' }]}
|
|||
// />
|
|||
// <ProFormSelect
|
|||
// options={reportType}
|
|||
// cacheForSwr
|
|||
// name="reportTypeId"
|
|||
// label="报表类型"
|
|||
// required
|
|||
// rules={[{ required: true, message: '请选择报表类型' }]}
|
|||
// />
|
|||
// <ProFormSelect
|
|||
// options={
|
|||
// allAreas.map(a => {
|
|||
// return {
|
|||
// value: a.id,
|
|||
// label: a.name,
|
|||
// }
|
|||
// })}
|
|||
// cacheForSwr
|
|||
// name="regionId"
|
|||
// label="区域"
|
|||
// required
|
|||
// rules={[{ required: true, message: '请选择区域' }]}
|
|||
// />
|
|||
// <Form.Item name="isEnable" label="状态" valuePropName="checked">
|
|||
// <Switch checkedChildren="启用" unCheckedChildren="禁用" />
|
|||
// </Form.Item>
|
|||
// <ProFormSelect
|
|||
// options={excuteTimeOptions}
|
|||
// addonBefore={'每天'}
|
|||
// addonAfter={'时'}
|
|||
// cacheForSwr
|
|||
// name="excuteTime"
|
|||
// label="生成时间"
|
|||
// />
|
|||
// </ProForm>
|
|||
// </Modal>
|
|||
// )
|
|||
// }
|
|||
|
|||
// function mapStateToProps (state) {
|
|||
// const { auth, global, allAreas } = state;
|
|||
// console.log(allAreas);
|
|||
// return {
|
|||
// user: auth.user,
|
|||
// actions: global.actions,
|
|||
// allAreas: allAreas.data || []
|
|||
// };
|
|||
// }
|
|||
|
|||
// export default connect(mapStateToProps)(ConfigModal);
|
@ -1,124 +0,0 @@ |
|||
// import React from 'react';
|
|||
// import { connect } from 'react-redux';
|
|||
// import { Spin, Table } from 'antd';
|
|||
// import { ModalForm } from '@ant-design/pro-form';
|
|||
// import moment from 'moment';
|
|||
// const UserModal = (props) => {
|
|||
// const { visible, onVisibleChange } = props
|
|||
// const datas = props.modalRecord || {}
|
|||
// const scopeOfExamination = { ...datas }.hiddenDangerItem12
|
|||
// const arr = [
|
|||
// ' 1、合用场所的所有权人、使用人是否遵守消防法律、法规、规章;',
|
|||
// ' 2、住宿场所是否违规搭建;',
|
|||
// ' 3、合用场所是否配置灭火器、消防应急照明等消防器材和设施;',
|
|||
// ' 4、合用场所的电器产品的安装、使用及其线路和管路的设计、敷设、维护保养、检测,是否符合消防技术标准和管理规定;',
|
|||
// ' 5、合用场所住宿是否超过2人;(judge_0) 若超过,人员住宿是否设置在首层,并直通室外安全出口;(judge_1)',
|
|||
// ' 6、电动自行车是否违规室内充电、停放;',
|
|||
// ' 7、合用场所是否违规生产、储存、经营易燃易爆危险品;',
|
|||
// ' 8、合用场所除厨房外是否违规使用或者放置瓶装液化石油气、可燃液体;',
|
|||
// ' 9、放置瓶装液化石油气的厨房是否采取防火分隔措施,并设置自然排风窗;',
|
|||
// ' 10、合用场所疏散通道、安全出口是否保持畅通;',
|
|||
// ' 11、合用场所的外窗或阳台是否设置金属栅栏;(judge_0) 若设置,是否能从内部易于开启。(judge_1)',
|
|||
// ' 12、存在其他安全隐患;',
|
|||
// ]
|
|||
// const columns = [
|
|||
// {
|
|||
// title: '场所名称',
|
|||
// dataIndex: 'reportName',
|
|||
// hideInSearch: true,
|
|||
// render: () => {
|
|||
// return <div>{datas.placeName}</div>
|
|||
// }
|
|||
// }, {
|
|||
// title: '场所基本情况',
|
|||
// dataIndex: 'reportName',
|
|||
// hideInSearch: true,
|
|||
// render: () => {
|
|||
// return <div>
|
|||
// <li>使用性质:{datas.placeType}</li>
|
|||
// <li>地址:{datas.address}</li>
|
|||
// <li>负责人:{datas.placeOwner}</li>
|
|||
// <li>电话:{datas.phone}</li>
|
|||
// <li>面积:{datas.dimension}</li>
|
|||
// <li>层数:{datas.floors}</li>
|
|||
// <li>常驻人口:{datas.numberOfPeople}</li>
|
|||
// </div>
|
|||
// }
|
|||
// }, {
|
|||
// title: '检查内容',
|
|||
// dataIndex: 'reportName',
|
|||
// hideInSearch: true,
|
|||
// render: () => {
|
|||
// return datas.hiddenDangerItem12 ?
|
|||
// scopeOfExamination.map((item, index) => {
|
|||
// let message = arr[index]
|
|||
// if (arr[index].indexOf('judge_') > -1) {
|
|||
// if (item.child && item.child.itemIndex) {
|
|||
// message = message.replace(`judge_${item.child.itemIndex}`, item.child.value ? "是" : "否")
|
|||
// } else {
|
|||
// message = message.replace(`judge_1`, '---')
|
|||
// }
|
|||
|
|||
// if (arr[index].indexOf('judge_0') > -1) {
|
|||
// return <li key={index}>{message.replace(`judge_0`, item.value ? "是" : "否")}</li>
|
|||
// }
|
|||
// }
|
|||
// return <li key={index}>{message}({item.value ? "是" : "否"})</li>
|
|||
// })
|
|||
// : '---'
|
|||
// }
|
|||
// }, {
|
|||
// title: '存在具体问题',
|
|||
// dataIndex: 'reportName',
|
|||
// hideInSearch: true,
|
|||
// render: () => {
|
|||
// return <div>{datas.description ? datas.description : '---'}</div>
|
|||
// }
|
|||
// },
|
|||
// ]
|
|||
// const data = [
|
|||
// {
|
|||
// key: '1',
|
|||
|
|||
// address: 'New York No. 1 Lake Park',
|
|||
// tags: ['nice', 'developer'],
|
|||
// },
|
|||
// ];
|
|||
// return (
|
|||
// <Spin spinning={false}>
|
|||
// <ModalForm
|
|||
// width={'90rem'}
|
|||
// visible={visible}
|
|||
// onVisibleChange={onVisibleChange}
|
|||
// submitter={false}
|
|||
// >
|
|||
// <div style={{ width:'71vw'}}><span style={{ fontSize: '16px' }}>排查单位:{(datas || {}).checkAreaName || ''}</span>
|
|||
// <span style={{ fontSize: '16px', float:'right',marginBottom:'10px'}}>填报日期:{moment((datas || {}).time).format('YYYY-MM-DD') || ''}</span><span style={{clear:'both'}}></span></div>
|
|||
// <Table columns={columns} dataSource={data} width={'50rem'} pagination={false}
|
|||
|
|||
// />
|
|||
// <div style={{ width:'71vw',marginTop:'10px'}}>
|
|||
// <span style={{ fontSize: '16px' }}>排查人:{(datas || {}).checkUserName || ''}</span>
|
|||
// <span style={{ fontSize: '16px',float:'right' }}>手机号:{(datas || {}).checkUserPhone || ''}</span></div>
|
|||
// </ModalForm>
|
|||
// </Spin>
|
|||
// )
|
|||
// }
|
|||
// function mapStateToProps (state) {
|
|||
// const { depMessage } = state;
|
|||
// const pakData = (dep) => {
|
|||
// return dep.map((d) => {
|
|||
// return {
|
|||
// title: d.name,
|
|||
// value: d.id,
|
|||
// children: pakData(d.subordinate)
|
|||
// }
|
|||
// })
|
|||
// }
|
|||
// let depData = pakData(depMessage.data || [])
|
|||
// return {
|
|||
// loading: depMessage.isRequesting,
|
|||
// depData,
|
|||
// };
|
|||
// }
|
|||
// export default connect(mapStateToProps)(UserModal);
|