实训列表调整1
This commit is contained in:
parent
48b02ae784
commit
8856586404
@ -36,23 +36,30 @@ export default {
|
||||
return this.$route.query.mapId;
|
||||
},
|
||||
trainingDetail() {
|
||||
console.log(this.$store.state.trainingNew.trainingDetail, '****');
|
||||
return this.$store.state.trainingNew.trainingDetail;
|
||||
},
|
||||
group () {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
trainingSwitch() {
|
||||
return this.$store.state.trainingNew.trainingSwitch;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
EventBus.$on('handleSliderShow', () => {
|
||||
if (!this.trainingList || !this.trainingList.length) {
|
||||
this.initLoadPage();
|
||||
}
|
||||
this.handleSliderShow(true);
|
||||
});
|
||||
this.initLoadPage();
|
||||
},
|
||||
methods: {
|
||||
initLoadPage() {
|
||||
getPublishTrainingListInOrg({mapId: this.mapId}).then(response => {
|
||||
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() + 's'}).then(response => {
|
||||
this.trainingList = response.data;
|
||||
// EventBus.$emit('setTrainingList', this.trainingList);
|
||||
}).catch(error => {
|
||||
this.$message.error(this.$t('tip.failedCourse') + ':' + error.message);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user