Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
32b16077f3
@ -108,5 +108,12 @@ export default {
|
||||
getRealDeviceFailed: 'Failed to get real device failed',
|
||||
mapDataError: 'Map data error',
|
||||
runningChartDataError: 'Running chart data error',
|
||||
runningChartIsNotLoaded: 'Running chart is not loaded'
|
||||
runningChartIsNotLoaded: 'Running chart is not loaded',
|
||||
runningDataError: 'Running data error',
|
||||
systemError: 'System error',
|
||||
simulationDoesNotExist: 'Simulation does not exist',
|
||||
simulationOperationIsNotDefined: 'The simulation operation is not defined',
|
||||
simulationOperationFailed: 'The simulation operation failed',
|
||||
operationConflict: 'Operation conflict',
|
||||
simulationOperationProcessingMethodNotFound: 'Simulation operation processing method not found'
|
||||
};
|
||||
|
@ -108,5 +108,12 @@ export default {
|
||||
getRealDeviceFailed: '获取真实设备失败!',
|
||||
mapDataError: '地图数据错误',
|
||||
runningChartDataError: '运行图数据错误',
|
||||
runningChartIsNotLoaded: '运行图未加载'
|
||||
runningChartIsNotLoaded: '运行图未加载',
|
||||
runningDataError: '运行数据错误',
|
||||
systemError: '系统错误',
|
||||
simulationDoesNotExist: '仿真不存在',
|
||||
simulationOperationIsNotDefined: '仿真操做未定义',
|
||||
simulationOperationFailed: '仿真操做执行失败',
|
||||
operationConflict: '操做冲突',
|
||||
simulationOperationProcessingMethodNotFound: '仿真操做处理方法未找到'
|
||||
};
|
||||
|
@ -25,7 +25,8 @@
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="this.$t('menu.speedLimitValue')" label-width="80px">
|
||||
<el-select :id="domIdChoose" v-model="formData.speedLimitValue" size="small" :disabled="spdDisabled" @change="speedSelectChange">
|
||||
<el-option v-for="item in speedList" :key="item" :label="item" :value="item" />
|
||||
<!-- <el-option v-for="item in speedList" :key="item" :label="item" :value="item" /> -->
|
||||
<el-option v-for="item in speedList" :key="item.value" :label="item.name" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -119,7 +119,6 @@ export default {
|
||||
/** 将后台数据解析成图表*/
|
||||
convertDataToModels(data, stations, kmRangeCoordMap, lineStyle) {
|
||||
var models = [];
|
||||
|
||||
if (data && data.serviceNumberDataList && data.serviceNumberDataList.length) {
|
||||
/** 按服务遍历数据*/
|
||||
data.serviceNumberDataList.forEach((service) => {
|
||||
@ -203,7 +202,6 @@ export default {
|
||||
if (!runPlanData[elem.serviceNumber]) {
|
||||
/** 创建一个新服务号标记*/
|
||||
runPlanData[elem.serviceNumber] = {};
|
||||
|
||||
/** 不存在此服务号,则需要创建一条新的line*/
|
||||
series.push(createSeriesModel({
|
||||
zlevel: 1,
|
||||
|
@ -12,7 +12,8 @@ const runPlan = {
|
||||
selected: {}, // 选择的对象
|
||||
width: 800, // 运行图canvas 容器 宽度
|
||||
height: 600, // 运行图canvas 容器 高度
|
||||
refreshCount: 0 // 刷新页面重新加载
|
||||
refreshCount: 0, // 刷新页面重新加载
|
||||
setInitialPlanData: {} // 运行图原始数据
|
||||
},
|
||||
getters: {
|
||||
stations: (state) => {
|
||||
@ -61,6 +62,19 @@ const runPlan = {
|
||||
setStations: (state, stations) => {
|
||||
state.stations = stations;
|
||||
},
|
||||
setInitialPlanData: (state, data) => {
|
||||
state.initialPlanData = {};
|
||||
if (data && data.serviceNumberDataList && data.serviceNumberDataList.length) {
|
||||
const serviceList = data.serviceNumberDataList;
|
||||
serviceList.forEach((service, i) => {
|
||||
const trainList = service.tripNumberDataList;
|
||||
state.initialPlanData[service.serviceNumber] = { oldIndex: i, serviceNumber: service.serviceNumber, backup: service.backup, trainMap: {} };
|
||||
trainList.forEach((train, j) => {
|
||||
state.initialPlanData[service.serviceNumber].trainMap[`${train.directionCode}${train.tripNumber}`] = { oldIndex: j, tripNumber: train.tripNumber, directionCode: train.directionCode, reentry: train.reentry, stationTimeList: train.stationTimeList };
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
setPlanData: (state, data) => {
|
||||
state.planData = data;
|
||||
state.editData = {};
|
||||
@ -119,6 +133,10 @@ const runPlan = {
|
||||
setPlanData: ({ commit }, data) => {
|
||||
commit('setPlanData', data);
|
||||
},
|
||||
/** 设置初始运行图数据 */
|
||||
setInitialPlanData: ({ commit }, data) => {
|
||||
commit('setInitialPlanData', data);
|
||||
},
|
||||
/** 增加服务号*/
|
||||
addserviceNumber: ({ commit }, serviceNumber) => {
|
||||
commit('addserviceNumber', serviceNumber);
|
||||
|
@ -25,6 +25,7 @@ function handle(state, data) {
|
||||
break;
|
||||
case 'Simulation_RunFact': // 仿真-列车实际到发车站消息
|
||||
let runFactMsg = msg;
|
||||
console.log(msg, '----------------');
|
||||
if (runFactMsg.constructor !== Array ) {
|
||||
runFactMsg = [msg];
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ export function getBaseUrl() {
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
} else {
|
||||
|
@ -154,7 +154,8 @@
|
||||
absoluteTime: 2 * 3600,
|
||||
indexKmRangeMap: {},
|
||||
runPlanData: {},
|
||||
dialogLoading: false
|
||||
dialogLoading: false,
|
||||
initialPlanData: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -188,6 +189,7 @@
|
||||
mounted() {
|
||||
getPublishMapInfo(this.$route.query.mapId).then(res=>{
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(res.data.lineCode);
|
||||
this.initialPlanData = this.$store.state.runPlan.planData;
|
||||
this.loadChartPage();
|
||||
});
|
||||
},
|
||||
@ -233,7 +235,6 @@
|
||||
if (this.myChart && this.myChart.isDisposed) {
|
||||
this.myChart.clear();
|
||||
}
|
||||
|
||||
let startValue = 3600 + this.PlanConvert.TranslationTime;
|
||||
const offsetTime = 3600;
|
||||
const initTime = toTimeStamp(formatDuring(this.$store.state.training.initTime));
|
||||
@ -252,11 +253,21 @@
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
updateRunPlanData(data) {
|
||||
const stations = this.$store.state.runPlan.stations;
|
||||
const planData = this.$store.state.runPlan.planData;
|
||||
const initialPlanData = this.$store.state.runPlan.initialPlanData;
|
||||
if (data[0] && initialPlanData[data[0].serviceNumber]) {
|
||||
Object.keys(initialPlanData[data[0].serviceNumber].trainMap).forEach(item => {
|
||||
if (initialPlanData[data[0].serviceNumber].trainMap[item+''].tripNumber == data[0].tripNumber) {
|
||||
data[0].directionCode = initialPlanData[data[0].serviceNumber].trainMap[item + ''].directionCode;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (data[0]) {
|
||||
data[0].secondTime = data[0].second;
|
||||
}
|
||||
this.series = this.PlanConvert.updateDataToModels(data, stations, this.kmRangeCoordMap,
|
||||
planData, this.series, { color: '#FF00DE', width: 0.5 }
|
||||
);
|
||||
|
@ -173,6 +173,20 @@ export default {
|
||||
this.$messageBox(this.$t('error.runningChartDataError') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '5003') {
|
||||
this.$messageBox(this.$t('error.runningChartIsNotLoaded') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '5004') {
|
||||
this.$messageBox(this.$t('error.runningDataError') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '5000') {
|
||||
this.$messageBox(this.$t('error.systemError') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '4000') {
|
||||
this.$messageBox(this.$t('error.simulationDoesNotExist') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '4001') {
|
||||
this.$messageBox(this.$t('error.simulationOperationIsNotDefined') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '4002') {
|
||||
this.$messageBox(this.$t('error.simulationOperationProcessingMethodNotFound') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '4003') {
|
||||
this.$messageBox(this.$t('error.simulationOperationFailed') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '4004') {
|
||||
this.$messageBox(this.$t('error.operationConflict') + ',' + this.$t('error.startSimulationFailed'));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -111,6 +111,7 @@ export default {
|
||||
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
||||
getEveryDayRunPlanNew(this.group).then(resp => {
|
||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||
this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
|
||||
this.viewDisabled = false;
|
||||
}).catch(error => {
|
||||
this.$store.dispatch('runPlan/setPlanData', []);
|
||||
|
@ -114,6 +114,20 @@ export default {
|
||||
this.$messageBox(this.$t('error.runningChartDataError') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '5003') {
|
||||
this.$messageBox(this.$t('error.runningChartIsNotLoaded') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '5004') {
|
||||
this.$messageBox(this.$t('error.runningDataError') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '5000') {
|
||||
this.$messageBox(this.$t('error.systemError') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '4000') {
|
||||
this.$messageBox(this.$t('error.simulationDoesNotExist') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '4001') {
|
||||
this.$messageBox(this.$t('error.simulationOperationIsNotDefined') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '4002') {
|
||||
this.$messageBox(this.$t('error.simulationOperationProcessingMethodNotFound') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '4003') {
|
||||
this.$messageBox(this.$t('error.simulationOperationFailed') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '4004') {
|
||||
this.$messageBox(this.$t('error.operationConflict') + ',' + this.$t('error.startSimulationFailed'));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -296,6 +296,20 @@ export default {
|
||||
this.$messageBox(this.$t('error.runningChartDataError') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '5003') {
|
||||
this.$messageBox(this.$t('error.runningChartIsNotLoaded') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '5004') {
|
||||
this.$messageBox(this.$t('error.runningDataError') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '5000') {
|
||||
this.$messageBox(this.$t('error.systemError') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '4000') {
|
||||
this.$messageBox(this.$t('error.simulationDoesNotExist') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '4001') {
|
||||
this.$messageBox(this.$t('error.simulationOperationIsNotDefined') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '4002') {
|
||||
this.$messageBox(this.$t('error.simulationOperationProcessingMethodNotFound') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '4003') {
|
||||
this.$messageBox(this.$t('error.simulationOperationFailed') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '4004') {
|
||||
this.$messageBox(this.$t('error.operationConflict') + ',' + this.$t('error.startSimulationFailed'));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user