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({
|
return request({
|
||||||
url: `/api/v2/training/published/infos`,
|
url: `/api/v2/training/published/infos`,
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/** 根据实训id查该已发布实训的所有信息 */
|
/** 根据实训id查该已发布实训的所有信息 */
|
||||||
|
@ -56,8 +56,16 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
initLoadPage() {
|
initLoadPage() {
|
||||||
const trainingType = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.trainingType : '';
|
const trainingType = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.trainingType : '';
|
||||||
console.log(trainingType, this.$store.state.training.domConfig);
|
// labels: ['车站', '控制权']
|
||||||
getPublishTrainingListInOrg({mapId: this.mapId, type: trainingType.toLowerCase()}).then(response => {
|
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;
|
this.trainingList = response.data;
|
||||||
EventBus.$emit('setTrainingList', this.trainingList);
|
EventBus.$emit('setTrainingList', this.trainingList);
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
Loading…
Reference in New Issue
Block a user