代码调整

This commit is contained in:
dong 2022-11-02 17:56:27 +08:00
parent c92c66f17c
commit 8794db68f2
2 changed files with 3 additions and 13 deletions

View File

@ -64,7 +64,7 @@
<script> <script>
import {getPublishTrainingDetail, loadPublishTraining} from '@/api/jmap/training'; import {getPublishTrainingDetail, loadPublishTraining} from '@/api/jmap/training';
import { getPostByProjectCode } from '@/api/learn'; import { getPostByProjectCode } from '@/api/learn';
import { getSessionStorage, getLocalStorage } from '@/utils/auth'; import { getSessionStorage } from '@/utils/auth';
import { ProjectCode } from '@/scripts/ProjectConfig'; import { ProjectCode } from '@/scripts/ProjectConfig';
import ContectUs from './contectUs'; import ContectUs from './contectUs';
import ModifyTime from './modifyTime'; import ModifyTime from './modifyTime';
@ -142,7 +142,6 @@ export default {
return { return {
isShowMenuList: false, isShowMenuList: false,
scriptMode: ScriptMode.TEACH, scriptMode: ScriptMode.TEACH,
showConfig: {},
menuList: [], menuList: [],
active: -1, active: -1,
openBigLPF: null, openBigLPF: null,
@ -499,7 +498,7 @@ export default {
return this.$store.state.trainingNew.trainingDetail; return this.$store.state.trainingNew.trainingDetail;
}, },
trainingDesignShow() { trainingDesignShow() {
return this.showConfig.trainingDesign || false; return this.$store.state.training.domConfig.trainingDesign || false;
} }
}, },
watch:{ watch:{
@ -541,9 +540,6 @@ export default {
this.menuList = [...this.allMenuList]; this.menuList = [...this.allMenuList];
} }
}, },
created() {
this.getDomConfig();
},
mounted() { mounted() {
// jl3dmodel // jl3dmodel
// const dataMap = { // const dataMap = {
@ -582,11 +578,6 @@ export default {
this.$store.dispatch('trainingNew/changeTeachMode', ''); this.$store.dispatch('trainingNew/changeTeachMode', '');
}, },
methods: { methods: {
getDomConfig() {
let domConfig = getLocalStorage('domConfig') || `{}`;
domConfig = JSON.parse(domConfig);
this.showConfig = domConfig;
},
showChidren(data, index) { showChidren(data, index) {
event.stopPropagation(); event.stopPropagation();
this.active = index; this.active = index;

View File

@ -27,7 +27,7 @@ import { superAdmin, admin } from '@/router/index';
import selectRole from './selectRole/list'; import selectRole from './selectRole/list';
import { launchFullscreen } from '@/utils/screen'; import { launchFullscreen } from '@/utils/screen';
import { createSimulation } from '@/api/simulation'; import { createSimulation } from '@/api/simulation';
import { getSessionStorage, setLocalStorage } from '@/utils/auth'; import { getSessionStorage } from '@/utils/auth';
export default { export default {
name: 'Simulation', name: 'Simulation',
@ -216,7 +216,6 @@ export default {
} }
}, },
enterSimulation(system) { enterSimulation(system) {
setLocalStorage('domConfig', JSON.stringify(system.paramVO.domConfig || {}));
createSimulation(system.id).then(resp => { createSimulation(system.id).then(resp => {
const query = { lineCode: this.$route.query.lineCode, group: resp.data, mapId: system.mapId, project: this.project}; const query = { lineCode: this.$route.query.lineCode, group: resp.data, mapId: system.mapId, project: this.project};
if (this.loadingProjectList.includes(this.project)) { if (this.loadingProjectList.includes(this.project)) {