Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly
This commit is contained in:
commit
79e21f84cc
@ -199,11 +199,11 @@ export function getAllPublishTrainingList(params) {
|
||||
});
|
||||
}
|
||||
/** 查询组织已发布实训的基础信息 */
|
||||
export function getPublishTrainingListInOrg(params) {
|
||||
export function getPublishTrainingListInOrg(data) {
|
||||
return request({
|
||||
url: `/api/v2/training/published/infos`,
|
||||
method: 'get',
|
||||
params
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 根据实训id查该已发布实训的所有信息 */
|
||||
|
@ -56,8 +56,16 @@ export default {
|
||||
methods: {
|
||||
initLoadPage() {
|
||||
const trainingType = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.trainingType : '';
|
||||
console.log(trainingType, this.$store.state.training.domConfig);
|
||||
getPublishTrainingListInOrg({mapId: this.mapId, type: trainingType.toLowerCase()}).then(response => {
|
||||
// labels: ['车站', '控制权']
|
||||
const data = {mapId: this.mapId, type: trainingType.toLowerCase()};
|
||||
if (this.$route.query.labels) {
|
||||
const labels = this.$route.query.labels.split('-');
|
||||
const labelMap = { loc: '现地', dis: '行调', section: '区段', signal: '信号机', switch: '道岔', stand: '站台', station: '车站', control: '控制权' };
|
||||
const newLabels = [];
|
||||
labels.forEach(item => newLabels.push(labelMap[item]));
|
||||
data.labels = newLabels;
|
||||
}
|
||||
getPublishTrainingListInOrg(data).then(response => {
|
||||
this.trainingList = response.data;
|
||||
EventBus.$emit('setTrainingList', this.trainingList);
|
||||
}).catch(error => {
|
||||
|
Loading…
Reference in New Issue
Block a user