diff --git a/api/app/lib/controllers/data/vehicle.js b/api/app/lib/controllers/data/vehicle.js index 1cae9b49..db6c8e8e 100644 --- a/api/app/lib/controllers/data/vehicle.js +++ b/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 } diff --git a/api/app/lib/controllers/overview/operation.js b/api/app/lib/controllers/overview/operation.js index 91ede643..d21eed83 100644 --- a/api/app/lib/controllers/overview/operation.js +++ b/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 || '--', }) } } diff --git a/web/config.js b/web/config.js index 436708a8..20df1b7f 100644 --- a/web/config.js +++ b/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: {