From a0ce657912768b913291bfc2b3773153a1460f13 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Wed, 28 Oct 2020 16:54:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=88=97=E8=BD=A6=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/race_01.js | 1 + src/jmapNew/shape/Train/TrainBody.js | 16 +++++++++++++--- src/utils/baseUrl.js | 4 ++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/jmapNew/config/skinCode/race_01.js b/src/jmapNew/config/skinCode/race_01.js index fbeb8cce2..b03a1a6d8 100644 --- a/src/jmapNew/config/skinCode/race_01.js +++ b/src/jmapNew/config/skinCode/race_01.js @@ -688,6 +688,7 @@ class SkinCode extends defaultStyle { trainServer: { serviceNumberPrefix: '00', // 服务号(表号)前缀 defaultServiceNumber: 'AA', // 默认服务号(表号) + defaultServiceHeadNum: 'MM', // 人工车号 trainServerOffset: { x: 4, y: 4 }// 列车服务号偏移 }, trainTarget: { diff --git a/src/jmapNew/shape/Train/TrainBody.js b/src/jmapNew/shape/Train/TrainBody.js index f69fda857..1b5a6e889 100644 --- a/src/jmapNew/shape/Train/TrainBody.js +++ b/src/jmapNew/shape/Train/TrainBody.js @@ -40,12 +40,22 @@ export default class TrainBody extends Group { create() { const model = this.model; const style = this.model.style; - const serviceNumber = style.Train.trainServer.serviceNumberPrefix + (model.serviceNumber || model.model.specialServiceNumber || style.Train.trainServer.defaultServiceNumber);// 服务号(表号) + this.nameFormat = model.nameFormat; const tripNumber = style.Train.trainTarget.tripNumberPrefix + (style.Train.trainTarget.defaultDirectionCode ? (model.directionCode || style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber) - : model.tripNumber || style.Train.trainTarget.defaultTripNumber); // 车次号 - let targetCode = style.Train.trainNumber.targetCodePrefix + (model.destinationCode || style.Train.trainNumber.defaultTargetCode); // 目的地码 + : model.tripNumber || style.Train.trainTarget.defaultTripNumber); // 车次号 const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (style.Train.trainTargetNumber.lineNumber || '') + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber); // 车组号 + let serviceNumber = ''; // 服务号(表号) + if (this.model.type == 'PLAN') { // 计划车 + serviceNumber = style.Train.trainServer.serviceNumberPrefix + (model.serviceNumber || model.model.specialServiceNumber || style.Train.trainServer.defaultServiceNumber); + } else if (this.model.type == 'HEAD') { // 头码车 + serviceNumber = style.Train.trainServer.serviceNumberPrefix + (model.destinationCode || style.Train.trainNumber.defaultTargetCode); + this.nameFormat = 'serviceNumber:groupNumber'; + } else if (this.model.type == 'MANUAL') { // 人工车 + serviceNumber = style.Train.trainServer.serviceNumberPrefix + (model.serviceNumber || model.model.specialServiceNumber || style.Train.trainServer.defaultServiceHeadNum); + this.nameFormat = 'serviceNumber:groupNumber'; + } + let targetCode = style.Train.trainNumber.targetCodePrefix + (model.destinationCode || style.Train.trainNumber.defaultTargetCode); // 目的地码 if (Vue.prototype.$jlmap.lineCode == '09') { // 暂时先写死 后面有了删掉就好 targetCode = '01'; } diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index e459aa552..1628a46bf 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,8 +2,8 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - // BASE_API = 'https://test.joylink.club/jlcloud'; - BASE_API = 'http://192.168.8.107:9000'; // 袁琪 + BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'http://192.168.8.107:9000'; // 袁琪 // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.8.144:9000'; // 旭强 // BASE_API = 'http://192.168.3.175:9000'; // 张赛