Browse Source

web 7niu

release_0.0.4
巴林闲侠 2 years ago
parent
commit
2bf256cba7
  1. 2
      api/app/lib/controllers/data/vehicle.js
  2. 18
      api/app/lib/controllers/overview/operation.js
  3. 8
      web/config.js

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

@ -213,7 +213,7 @@ async function businessDel (ctx) {
const models = ctx.fs.dc.models;
const { businessId } = ctx.params;
await models.Vehicle.MunicipalBusiness({
await models.MunicipalBusiness.destroy({
where: {
id: businessId
}

18
api/app/lib/controllers/overview/operation.js

@ -14,11 +14,11 @@ async function busCarLevelList (ctx) {
const corCompany = data.find(d => d.name === company)
if (!corCompany) {
data.push({
name: company,
name: company || '--',
child: [{
name: fleet,
name: fleet || '--',
child: [{
name: line,
name: line || '--',
child: [{
id: c.id,
name: vehicleLicensePlateNumber,
@ -30,12 +30,12 @@ async function busCarLevelList (ctx) {
const corFleet = corCompany.child.find(d => d.name === fleet)
if (!corFleet) {
corCompany.child.push({
name: fleet,
name: fleet || '--',
child: [{
name: line,
name: line || '--',
child: [{
id: c.id,
name: vehicleLicensePlateNumber,
name: vehicleLicensePlateNumber || '--',
}]
}]
})
@ -43,16 +43,16 @@ async function busCarLevelList (ctx) {
const corLine = corFleet.child.find(d => d.name === line)
if (!corLine) {
corFleet.child.push({
name: line,
name: line || '--',
child: [{
id: c.id,
name: vehicleLicensePlateNumber,
name: vehicleLicensePlateNumber || '--',
}]
})
} else {
corLine.child.push({
id: c.id,
name: vehicleLicensePlateNumber,
name: vehicleLicensePlateNumber || '--',
})
}
}

8
web/config.js

@ -16,9 +16,11 @@ dev && console.log('\x1B[33m%s\x1b[0m', '请遵循并及时更新 readme.md,
args.option(['p', 'port'], '启动端口');
args.option(['u', 'api-url'], 'webapi的URL');
args.option(['r', 'report-node'], '报表进程地址');
args.option(['r', 'report-node'], '报表进程地址');
const flags = args.parse(process.argv);
const FS_UNIAPP_API = process.env.FS_UNIAPP_API || flags.apiUrl;
const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURC || flags.qndmn;
if (!FS_UNIAPP_API) {
console.log('缺少启动参数,异常退出');
@ -35,6 +37,12 @@ const product = {
host: FS_UNIAPP_API,
match: /^\/_api\//,
}
}, {
entry: require('./middlewares/proxy').entry,
opts: {
host: QINIU_DOMAIN_QNDMN_RESOURCE,
match: /^\/_file-server\//,
}
}, {
entry: require('./middlewares/proxy').entry,
opts: {

Loading…
Cancel
Save