问题调整

This commit is contained in:
fan 2019-10-22 18:18:21 +08:00
parent 6760cdc7e3
commit 9134be8c19
7 changed files with 30 additions and 36 deletions

View File

@ -358,11 +358,11 @@ export const asyncRouter = [
component: Mapedit,
hidden: true
},
// {
// path: 'lesson/edit/:type',
// component: LessonEdit,
// hidden: true
// },
{
path: 'lesson/edit/:type',
component: LessonEdit,
hidden: true
},
{
path: 'runPlan/detail/:mapId',
component: PlanMonitorDetail,

View File

@ -3,8 +3,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.3.5:9000'; // 袁琪
// BASE_API = 'https://test.joylink.club/jlcloud';
BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
} else {

View File

@ -46,6 +46,11 @@ export default {
loading: false
};
},
watch: {
$route(newVal) {
this.loadInitPage();
}
},
mounted() {
this.loadInitPage();
},

View File

@ -314,7 +314,7 @@ export default {
});
},
treeSort(index, row) {
this.$router.push({path: `${UrlConfig.design.lessonEdit}/treeSort`, query: row});
this.$router.push({path: `${UrlConfig.design.lessonEdit}/treeSort`, query: {id: row.id}});
},
taskManage() {
this.$router.push({path: `${UrlConfig.design.taskManage}`, query: {mapId: this.$route.params.mapId, skinCode: this.$route.params.skinCode}});

View File

@ -57,6 +57,7 @@ import LimitList from '@/views/components/limits/index';
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
import { trainingNotify } from '@/api/simulation';
import { launchFullscreen } from '@/utils/screen';
import localStore from 'storejs';
export default {
name: 'LessonDetail',
@ -205,6 +206,7 @@ export default {
}
},
backLessonList() {
localStore.remove('teachDetail'+this.$route.query.mapId);
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${this.$route.params.subSystem}`});
}
}

View File

@ -68,6 +68,7 @@ export default {
}
},
goLesson(row) {
localStore.set('teachDetail'+row.mapId, `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}?lessonId=${row.id}&mapId=${row.mapId}&prdCode=${row.prdCode}`);
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}`, query: {lessonId: row.id, mapId: row.mapId, prdCode: row.prdCode}});
}
}

View File

@ -34,7 +34,7 @@
</template>
<script>
import { getPublishMapTree } from '@/api/management/mapprd';
import { getTrainingSystemList, getTrainingSystemListByMapId, getSubSystemInfo } from '@/api/trainingPlatform';
import { getTrainingSystemList, getSubSystemInfo } from '@/api/trainingPlatform';
import { UrlConfig } from '@/router/index';
import FilterCity from '@/views/components/filterCity';
import localStore from 'storejs';
@ -87,9 +87,6 @@ export default {
beforeDestroy () {
},
mounted() {
// if (this.project === 'xty') {
// this.projectInitData('18');
// }
},
methods: {
filterNode(value, data) {
@ -116,6 +113,7 @@ export default {
this.$router.push({ path: `${UrlConfig.trainingPlatform.permission}/${this.mapId}`});
} else if ( obj.type === 'MapSystem') {
getSubSystemInfo(obj.id).then(resp => {
// let router = '';
switch (resp.data.type) {
case 'Exam':
this.setLocalRoute(`${UrlConfig.trainingPlatform.examHome}/${obj.id}`);
@ -123,8 +121,15 @@ export default {
this.$router.push({ path: `${UrlConfig.trainingPlatform.examHome}/${obj.id}`});
break;
case 'Lesson':
this.setLocalRoute(`${UrlConfig.trainingPlatform.teachHome}/${obj.id}`);
// this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${obj.id}`});
/* router = localStore.get('teachDetail' + this.mapId);
if (teachDetail) {
this.$router.push(teachDetail);
} else {
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${obj.id}`});
}*/
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${obj.id}`});
break;
case 'Simulation':
@ -172,25 +177,6 @@ export default {
this.$messageBox(this.$t('error.refreshFailed'));
}
},
// async projectInitData(mapId) {
// this.loading = true;
// this.treeList = [];
// try {
// debugger;
// const resp = await getTrainingSystemListByMapId(mapId);
// this.treeList = resp.data;
// this.loading = false;
// this.getExpandList(this.filterSelect);
// this.$nextTick(() => {
// const checkId = localStore.get('trainingPlatformCheckId'+this.filterSelect+this.account) || null;
// this.$refs.tree && this.$refs.tree.setCurrentKey(checkId);
// this.loading = false;
// });
// } catch (e) {
// this.loading = false;
// this.$messageBox(this.$t('error.failedToGetSystemData'));
// }
// },
nodeExpand(obj, node, ele) {
const key = obj.id;
this.expandList = this.expandList.filter(item => item!==key);