Merge remote-tracking branch 'remotes/origin/test'
This commit is contained in:
commit
43c5392205
@ -159,5 +159,8 @@ export default {
|
|||||||
enterLastStep: 'Please enter a hint and click next',
|
enterLastStep: 'Please enter a hint and click next',
|
||||||
pleaseOpearte: 'Please proceed',
|
pleaseOpearte: 'Please proceed',
|
||||||
help: 'help',
|
help: 'help',
|
||||||
city: 'City'
|
city: 'City',
|
||||||
|
simulationSystem: 'The simulation system',
|
||||||
|
lessonSystem: 'The lesson system',
|
||||||
|
examSystem: 'The exam system'
|
||||||
};
|
};
|
||||||
|
@ -159,5 +159,8 @@ export default {
|
|||||||
enterLastStep: '请输入提示并点击下一步',
|
enterLastStep: '请输入提示并点击下一步',
|
||||||
pleaseOpearte: '请开始操作',
|
pleaseOpearte: '请开始操作',
|
||||||
help: '帮助',
|
help: '帮助',
|
||||||
city: '城市'
|
city: '城市',
|
||||||
|
simulationSystem: '仿真系统',
|
||||||
|
lessonSystem: '课程系统',
|
||||||
|
examSystem: '考试系统'
|
||||||
};
|
};
|
||||||
|
@ -96,7 +96,7 @@ export function JLmapDriving(dom, data, skinCode,storemod) {
|
|||||||
// 地图模型数据
|
// 地图模型数据
|
||||||
let mapdata = new Jl3ddata();
|
let mapdata = new Jl3ddata();
|
||||||
|
|
||||||
let camera = new THREE.PerspectiveCamera(70, dom.clientWidth/dom.clientHeight, 1, 11000);
|
let camera = new THREE.PerspectiveCamera(70, dom.clientWidth/dom.clientHeight, 1, 1000);
|
||||||
camera.position.set( 0, 0, 0 );
|
camera.position.set( 0, 0, 0 );
|
||||||
camera.aspect = window.innerWidth / window.innerHeight;
|
camera.aspect = window.innerWidth / window.innerHeight;
|
||||||
camera.updateProjectionMatrix();
|
camera.updateProjectionMatrix();
|
||||||
|
@ -157,13 +157,13 @@ export function Jl3dDriving(updatemmi,sound) {
|
|||||||
if (trainlisttest.list[code].runMode == '02') {
|
if (trainlisttest.list[code].runMode == '02') {
|
||||||
|
|
||||||
if (trainlisttest.list[code].isStandTrack == true) {
|
if (trainlisttest.list[code].isStandTrack == true) {
|
||||||
trainlisttest.list[code].speeds = parseFloat(data.body[tl].v*10/36/21/trainlisttest.list[code].len);
|
trainlisttest.list[code].speeds = parseFloat(data.body[tl].v*10/36/23/trainlisttest.list[code].len);
|
||||||
} else {
|
} else {
|
||||||
trainlisttest.list[code].speeds = parseFloat(data.body[tl].v*10/36/21/trainlisttest.list[code].len);
|
trainlisttest.list[code].speeds = parseFloat(data.body[tl].v*10/36/23/trainlisttest.list[code].len);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
trainlisttest.list[code].speeds = parseFloat(data.body[tl].v*10/36/21/trainlisttest.list[code].len);
|
trainlisttest.list[code].speeds = parseFloat(data.body[tl].v*10/36/23/trainlisttest.list[code].len);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (code == drivingcode) {
|
if (code == drivingcode) {
|
||||||
@ -357,7 +357,7 @@ export function Jl3dDriving(updatemmi,sound) {
|
|||||||
// trainlisttest.list[code].startmark = 1;
|
// trainlisttest.list[code].startmark = 1;
|
||||||
}else{
|
}else{
|
||||||
trainlisttest.list[code].speeds = data.body[i].speed;
|
trainlisttest.list[code].speeds = data.body[i].speed;
|
||||||
trainlisttest.list[code].speeds = parseFloat(data.body[i].speed*10/36/22/trainlisttest.list[code].len);
|
trainlisttest.list[code].speeds = parseFloat(data.body[i].speed*10/36/23/trainlisttest.list[code].len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -505,7 +505,7 @@ export function Jl3dDriving(updatemmi,sound) {
|
|||||||
trainlisttest.list[code].curve = rails.linkrail[data.body[i].linkCode].lineleft;
|
trainlisttest.list[code].curve = rails.linkrail[data.body[i].linkCode].lineleft;
|
||||||
trainlisttest.list[code].len = rails.linkrail[data.body[i].linkCode].lengthfact;
|
trainlisttest.list[code].len = rails.linkrail[data.body[i].linkCode].lengthfact;
|
||||||
trainlisttest.list[code].progress = data.body[i].linkOffsetPercent;
|
trainlisttest.list[code].progress = data.body[i].linkOffsetPercent;
|
||||||
trainlisttest.list[code].speeds = parseFloat(trainlisttest.list[code].speed*10/36/21/trainlisttest.list[code].len);
|
trainlisttest.list[code].speeds = parseFloat(trainlisttest.list[code].speed*10/36/23/trainlisttest.list[code].len);
|
||||||
}
|
}
|
||||||
}else if(data.body[i].directionType == '03'){
|
}else if(data.body[i].directionType == '03'){
|
||||||
if(rails.linkrail[data.body[i].linkCode].lineright){
|
if(rails.linkrail[data.body[i].linkCode].lineright){
|
||||||
@ -513,7 +513,7 @@ export function Jl3dDriving(updatemmi,sound) {
|
|||||||
trainlisttest.list[code].curve = rails.linkrail[data.body[i].linkCode].lineright;
|
trainlisttest.list[code].curve = rails.linkrail[data.body[i].linkCode].lineright;
|
||||||
trainlisttest.list[code].len = rails.linkrail[data.body[i].linkCode].lengthfact;
|
trainlisttest.list[code].len = rails.linkrail[data.body[i].linkCode].lengthfact;
|
||||||
trainlisttest.list[code].progress = 1-data.body[i].linkOffsetPercent;
|
trainlisttest.list[code].progress = 1-data.body[i].linkOffsetPercent;
|
||||||
trainlisttest.list[code].speeds = parseFloat(trainlisttest.list[code].speed*10/36/21/trainlisttest.list[code].len);
|
trainlisttest.list[code].speeds = parseFloat(trainlisttest.list[code].speed*10/36/23/trainlisttest.list[code].len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
trainlisttest.list[code].nextcode = nextcode;
|
trainlisttest.list[code].nextcode = nextcode;
|
||||||
|
@ -142,11 +142,11 @@ export function UpdateTrain(camera,traindata,control){
|
|||||||
// if(trainmodel.status == '02'){
|
// if(trainmodel.status == '02'){
|
||||||
// }else if(trainmodel.status == '03'){
|
// }else if(trainmodel.status == '03'){
|
||||||
// }
|
// }
|
||||||
|
|
||||||
trainmodel.progress = 0;
|
trainmodel.progress = 0;
|
||||||
trainmodel.len = trainmodel.nextlen;
|
trainmodel.len = trainmodel.nextlen;
|
||||||
trainmodel.nowcode = trainmodel.nextcode;
|
trainmodel.nowcode = trainmodel.nextcode;
|
||||||
trainmodel.speeds = parseFloat(trainmodel.speed*10/36/21/trainmodel.len);
|
trainmodel.speeds = parseFloat(trainmodel.speed*10/36/22/trainmodel.len);
|
||||||
trainmodel.curve = trainmodel.nextcurve;
|
trainmodel.curve = trainmodel.nextcurve;
|
||||||
|
|
||||||
trainmodel.nextcurve = null;
|
trainmodel.nextcurve = null;
|
||||||
|
@ -9,7 +9,7 @@ let defaultsignal = {
|
|||||||
deviceType:"signal",
|
deviceType:"signal",
|
||||||
type:"low",
|
type:"low",
|
||||||
picUrl:"",
|
picUrl:"",
|
||||||
assetUrl:"https://test.joylink.club/oss/models/signal/d3d.FBX"
|
assetUrl:"https://joylink.club/oss/models/signal/d3d.FBX"
|
||||||
}
|
}
|
||||||
|
|
||||||
let defaulttrain = {
|
let defaulttrain = {
|
||||||
@ -18,7 +18,7 @@ let defaulttrain = {
|
|||||||
deviceType:"train",
|
deviceType:"train",
|
||||||
type:"num4",
|
type:"num4",
|
||||||
picUrl:"",
|
picUrl:"",
|
||||||
assetUrl:"https://test.joylink.club/oss/models/train/train.FBX"
|
assetUrl:"https://joylink.club/oss/models/train/train.FBX"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ let defaultstation = {
|
|||||||
deviceType:"stand",
|
deviceType:"stand",
|
||||||
type:"num4",
|
type:"num4",
|
||||||
picUrl:"",
|
picUrl:"",
|
||||||
assetUrl:"https://test.joylink.club/oss/models/station/fuzhou/fuzhou.FBX"
|
assetUrl:"https://joylink.club/oss/models/station/fuzhou/fuzhou.FBX"
|
||||||
}
|
}
|
||||||
//https://test.joylink.club/oss/models/station/fuzhou/fuzhou.FBX
|
//https://test.joylink.club/oss/models/station/fuzhou/fuzhou.FBX
|
||||||
//https://joylink.club/oss/models/station/fuzhou/fuzhou.FBX
|
//https://joylink.club/oss/models/station/fuzhou/fuzhou.FBX
|
||||||
@ -58,7 +58,7 @@ let defaultsuidao = {
|
|||||||
deviceType:"suidao",
|
deviceType:"suidao",
|
||||||
type:"suidao",
|
type:"suidao",
|
||||||
picUrl:"",
|
picUrl:"",
|
||||||
assetUrl:"https://test.joylink.club/oss/models/suidao/suidao.FBX"
|
assetUrl:"https://joylink.club/oss/models/suidao/suidao.FBX"
|
||||||
}
|
}
|
||||||
//https://test.joylink.club/oss/models/suidao/suidao.FBX
|
//https://test.joylink.club/oss/models/suidao/suidao.FBX
|
||||||
//https://joylink.club/oss/models/suidao/suidao.FBX
|
//https://joylink.club/oss/models/suidao/suidao.FBX
|
||||||
@ -70,7 +70,7 @@ let defaultautorail = {
|
|||||||
deviceType:"autorail",
|
deviceType:"autorail",
|
||||||
type:"autorail",
|
type:"autorail",
|
||||||
picUrl:"",
|
picUrl:"",
|
||||||
assetUrl:"../../static/model/auto/rail.FBX"
|
assetUrl:"https://joylink.club/oss/models/auto/rail.FBX"
|
||||||
}
|
}
|
||||||
|
|
||||||
let defaultautosuidao = {
|
let defaultautosuidao = {
|
||||||
@ -79,7 +79,7 @@ let defaultautosuidao = {
|
|||||||
deviceType:"autosuidao",
|
deviceType:"autosuidao",
|
||||||
type:"autosuidao",
|
type:"autosuidao",
|
||||||
picUrl:"",
|
picUrl:"",
|
||||||
assetUrl:"https://test.joylink.club/oss/models/auto/suidao.FBX"
|
assetUrl:"https://joylink.club/oss/models/auto/suidao.FBX"
|
||||||
}
|
}
|
||||||
|
|
||||||
let autoswitch1 = {
|
let autoswitch1 = {
|
||||||
@ -88,7 +88,7 @@ let autoswitch1 = {
|
|||||||
deviceType:"autoswitch1",
|
deviceType:"autoswitch1",
|
||||||
type:"fuzhou",
|
type:"fuzhou",
|
||||||
picUrl:"",
|
picUrl:"",
|
||||||
assetUrl:"https://test.joylink.club/oss/models/auto/switch1.FBX"
|
assetUrl:"https://joylink.club/oss/models/auto/switch1.FBX"
|
||||||
}
|
}
|
||||||
|
|
||||||
let autoswitch2 = {
|
let autoswitch2 = {
|
||||||
@ -97,7 +97,7 @@ let autoswitch2 = {
|
|||||||
deviceType:"autoswitch2",
|
deviceType:"autoswitch2",
|
||||||
type:"fuzhou",
|
type:"fuzhou",
|
||||||
picUrl:"",
|
picUrl:"",
|
||||||
assetUrl:"https://test.joylink.club/oss/models/auto/switch2.FBX"
|
assetUrl:"https://joylink.club/oss/models/auto/switch2.FBX"
|
||||||
}
|
}
|
||||||
|
|
||||||
export function AssetLoader(){
|
export function AssetLoader(){
|
||||||
|
@ -358,11 +358,11 @@ export const asyncRouter = [
|
|||||||
component: Mapedit,
|
component: Mapedit,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// path: 'lesson/edit/:type',
|
path: 'lesson/edit/:type',
|
||||||
// component: LessonEdit,
|
component: LessonEdit,
|
||||||
// hidden: true
|
hidden: true
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
path: 'runPlan/detail/:mapId',
|
path: 'runPlan/detail/:mapId',
|
||||||
component: PlanMonitorDetail,
|
component: PlanMonitorDetail,
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
// 登陆配置参数
|
// 登陆配置参数
|
||||||
export const LoginParams = {
|
export const LoginParams = {
|
||||||
LianKeTang: { clientId: '1', secret: 'joylink' }, // "琏课堂"
|
LianKeTang: { clientId: '1', secret: 'joylink' }, // "琏课堂"
|
||||||
DaPing: { clientId: '2', secret: 'bigscreen' }, // "大屏系统"
|
// DaPing: { clientId: '2', secret: 'bigscreen' }, // "大屏系统"
|
||||||
LianJiHua: { clientId: '3', secret: 'linkplan' }, // "琏计划"
|
// LianJiHua: { clientId: '3', secret: 'linkplan' }, // "琏计划"
|
||||||
Assistant: { clientId: '4', secret: 'linkassistant' }, // "琏课堂助手"
|
Assistant: { clientId: '4', secret: 'linkassistant' }, // "琏课堂助手"
|
||||||
Design: { clientId: '6', secret: 'design' } // "城市轨道交通设计平台"
|
Design: { clientId: '2', secret: 'design' } // "城市轨道交通设计平台"
|
||||||
};
|
};
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { listPublishMap } from '@/api/jmap/map';
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
// import { getTrainingSystemList} from '@/api/trainingPlatform';
|
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/auth';
|
import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/auth';
|
||||||
import FilterCity from '@/views/components/filterCity';
|
import FilterCity from '@/views/components/filterCity';
|
||||||
|
@ -57,6 +57,7 @@ import { PermissionType } from '@/scripts/ConstDic';
|
|||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import LimitList from '@/views/components/limits/index';
|
import LimitList from '@/views/components/limits/index';
|
||||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||||
|
import localStore from 'storejs';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ExamDetailView',
|
name: 'ExamDetailView',
|
||||||
@ -198,6 +199,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
backLessonList() {
|
backLessonList() {
|
||||||
|
localStore.remove('examDetail'+this.$route.params.subSystem);
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.examHome}/${this.$route.params.subSystem}`});
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.examHome}/${this.$route.params.subSystem}`});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getSubSystemDetail } from '@/api/trainingPlatform';
|
import { getSubSystemDetail } from '@/api/trainingPlatform';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
|
import localStore from 'storejs';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ExamHome',
|
name: 'ExamHome',
|
||||||
@ -46,6 +47,11 @@ export default {
|
|||||||
loading: false
|
loading: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
$route(newVal) {
|
||||||
|
this.loadInitPage();
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadInitPage();
|
this.loadInitPage();
|
||||||
},
|
},
|
||||||
@ -62,6 +68,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
goLesson(row) {
|
goLesson(row) {
|
||||||
|
localStore.set('examDetail'+this.$route.params.subSystem, `${UrlConfig.trainingPlatform.course}/${this.$route.params.subSystem}?lessonId=${row.id}`);
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.params.subSystem}`, query: {lessonId: row.id}});
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.params.subSystem}`, query: {lessonId: row.id}});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,28 +23,38 @@
|
|||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
<transition>
|
<transition>
|
||||||
<router-view />
|
<router-view @refresh="refresh" />
|
||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
|
<operate-menu ref="menu" :point="point" :node="node" @refresh="refresh" @changeRouter="changeRouter" />
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getLessonTree } from '@/api/jmap/lessondraft';
|
import { getLessonTree } from '@/api/jmap/lessondraft';
|
||||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||||
|
import OperateMenu from './operateMenu';
|
||||||
export default {
|
export default {
|
||||||
name: 'LessonDetail',
|
name: 'LessonDetail',
|
||||||
|
components: {
|
||||||
|
OperateMenu
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
treeList: [],
|
treeList: [],
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'name',
|
label: 'name'
|
||||||
disabled: this.showNode
|
|
||||||
},
|
},
|
||||||
name: '',
|
name: '',
|
||||||
lessonId: '',
|
lessonId: '',
|
||||||
expandList: []
|
expandList: [],
|
||||||
|
point: {
|
||||||
|
x: 0,
|
||||||
|
y: 0
|
||||||
|
},
|
||||||
|
node: {
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -66,7 +76,6 @@ export default {
|
|||||||
this.lessonId = resp.data[0].id;
|
this.lessonId = resp.data[0].id;
|
||||||
this.treeList = resp.data;
|
this.treeList = resp.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.editLesson();
|
this.editLesson();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -78,22 +87,44 @@ export default {
|
|||||||
return data.name.indexOf(value) !== -1;
|
return data.name.indexOf(value) !== -1;
|
||||||
},
|
},
|
||||||
editLesson() {
|
editLesson() {
|
||||||
this.$router.push( {path: `/design/lesson/details/edit/lessonEdit`, query: {id: this.treeList[0].id, skinCode: this.$route.query.skinCode}} );
|
this.$router.push( {path: `/design/lesson/details/edit/lessonEdit`, query: {id: this.lessonId, skinCode: this.$route.query.skinCode, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId}} );
|
||||||
},
|
},
|
||||||
showNode(obj) {
|
createChapte(node) {
|
||||||
return obj.type !== 'Training';
|
this.$router.push({path: `/design/lesson/details/edit/chapterCreate`, query: {id: node.data.id, lessonId: this.lessonId, skinCode: this.$route.query.skinCode, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId}});
|
||||||
|
},
|
||||||
|
updateChapte(node) {
|
||||||
|
this.$router.push( {path: `/design/lesson/details/edit/chapterEdit`, query: {id: node.data.id, skinCode: this.$route.query.skinCode, lessonId: this.lessonId, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId}});
|
||||||
},
|
},
|
||||||
showContextMenu(e, obj, node, vueElem) {
|
showContextMenu(e, obj, node, vueElem) {
|
||||||
if (obj && obj.type === 'TrainingType' || obj.type === 'Training') {
|
if (obj && obj.type === 'Lesson' || obj.type === 'Chapter') {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.point = {
|
this.point = {
|
||||||
x: e.clientX,
|
x: e.clientX,
|
||||||
y: e.clientY
|
y: e.clientY
|
||||||
};
|
};
|
||||||
this.node = node;
|
this.node = node;
|
||||||
const menu = DeviceMenu.Training;
|
const menu = DeviceMenu.Lesson;
|
||||||
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
|
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
changeRouter(params) {
|
||||||
|
switch (params.event) {
|
||||||
|
case '01':
|
||||||
|
this.editLesson();
|
||||||
|
break;
|
||||||
|
case '02':
|
||||||
|
this.createChapte(params.node);
|
||||||
|
break;
|
||||||
|
case '03':
|
||||||
|
this.updateChapte(params.node);
|
||||||
|
break;
|
||||||
|
case '04':
|
||||||
|
this.createChapte(params.node);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
refresh() {
|
||||||
|
this.initPageData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -181,6 +181,14 @@ export default {
|
|||||||
return row.status ==='0'&& !this.hasRelease;
|
return row.status ==='0'&& !this.hasRelease;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: this.$t('lesson.review'),
|
||||||
|
handleClick: this.review,
|
||||||
|
type: 'primary',
|
||||||
|
showControl: (row) => {
|
||||||
|
return row.status==='1';
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('global.delete'),
|
name: this.$t('global.delete'),
|
||||||
handleClick: this.deleteLesson,
|
handleClick: this.deleteLesson,
|
||||||
@ -200,7 +208,10 @@ export default {
|
|||||||
{
|
{
|
||||||
name: '课程详情',
|
name: '课程详情',
|
||||||
handleClick: this.goDetail,
|
handleClick: this.goDetail,
|
||||||
type: 'primary'
|
type: 'primary',
|
||||||
|
showControl: (row) => {
|
||||||
|
return row.status !=='1';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -230,6 +241,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
|
this.loading = true;
|
||||||
getLessonTree(this.$route.params.skinCode).then(response=> {
|
getLessonTree(this.$route.params.skinCode).then(response=> {
|
||||||
response.data.forEach(elem => {
|
response.data.forEach(elem => {
|
||||||
if (elem.children) {
|
if (elem.children) {
|
||||||
@ -279,9 +291,6 @@ export default {
|
|||||||
refresh() {
|
refresh() {
|
||||||
this.$refs.queryListPage.refresh(true);
|
this.$refs.queryListPage.refresh(true);
|
||||||
},
|
},
|
||||||
editLesson(row) {
|
|
||||||
this.$router.push( {path: `${UrlConfig.design.lessonEdit}/lessonEdit`, query: {id: row.id, skinCode: row.code}} );
|
|
||||||
},
|
|
||||||
lessonCreate() {
|
lessonCreate() {
|
||||||
this.$router.push({ path: `${UrlConfig.design.lessonEdit}/lessonCreate`, query: {skinCode: this.$route.params.skinCode} });
|
this.$router.push({ path: `${UrlConfig.design.lessonEdit}/lessonCreate`, query: {skinCode: this.$route.params.skinCode} });
|
||||||
},
|
},
|
||||||
@ -304,15 +313,8 @@ export default {
|
|||||||
this.$messageBox(this.$t('tip.failDelete'));
|
this.$messageBox(this.$t('tip.failDelete'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
createChapter(index, row) {
|
|
||||||
if (row.type === 'Lesson') {
|
|
||||||
this.$router.push({path: `${UrlConfig.design.lessonEdit}/chapterCreate`, query: {lessonId: row.id}});
|
|
||||||
} else if (row.type === 'Chapter') {
|
|
||||||
this.$router.push( {path: `${UrlConfig.design.lessonEdit}/chapterEdit`, query: {id: row.id, lessonId: row.parentId}} );
|
|
||||||
}
|
|
||||||
},
|
|
||||||
treeSort(index, row) {
|
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() {
|
taskManage() {
|
||||||
this.$router.push({path: `${UrlConfig.design.taskManage}`, query: {mapId: this.$route.params.mapId, skinCode: this.$route.params.skinCode}});
|
this.$router.push({path: `${UrlConfig.design.taskManage}`, query: {mapId: this.$route.params.mapId, skinCode: this.$route.params.skinCode}});
|
||||||
@ -340,9 +342,11 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
review(index, row) {
|
||||||
|
this.$refs.lessonDetail.show(row.id);
|
||||||
|
},
|
||||||
goDetail(index, row) {
|
goDetail(index, row) {
|
||||||
// this.$refs.lessonDetail.show(row.id);
|
this.$router.push({path: `/design/lesson/details`, query: {lessonId: row.id, skinCode: this.$route.params.skinCode, cityCode: this.$route.query.cityCode, mapId: this.$route.params.mapId}});
|
||||||
this.$router.push({path: `/design/lesson/details`, query: {lessonId: row.id, skinCode: this.$route.params.skinCode}});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
<el-form-item :label="this.$t('lesson.courseName')" prop="lessonName">
|
<el-form-item :label="this.$t('lesson.courseName')" prop="lessonName">
|
||||||
<el-input v-model="chapterModel.lessonName" :disabled="true" />
|
<el-input v-model="chapterModel.lessonName" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--<el-form-item :label="this.$t('lesson.parentChapter')" prop="parentName">
|
<el-form-item :label="this.$t('lesson.parentChapter')" prop="parentName">
|
||||||
<el-input v-model="chapterModel.parentName" :disabled="true"></el-input>
|
<el-input v-model="chapterModel.parentName" :disabled="true" />
|
||||||
</el-form-item>-->
|
</el-form-item>
|
||||||
<el-form-item :label="this.$t('lesson.chapterName')" prop="name">
|
<el-form-item :label="this.$t('lesson.chapterName')" prop="name">
|
||||||
<el-input v-model="chapterModel.name" />
|
<el-input v-model="chapterModel.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { createLessonChapter, updateLessonChapter, getLessonDetail, getLessonChapterDetail } from '@/api/jmap/lessondraft';
|
import { createLessonChapter, updateLessonChapter, getLessonDetail, getLessonChapterDetail } from '@/api/jmap/lessondraft';
|
||||||
import localStore from 'storejs';
|
import { UrlConfig } from '@/router/index';
|
||||||
import TrainList from './list';
|
import TrainList from './list';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -97,7 +97,9 @@ export default {
|
|||||||
lessonName: '',
|
lessonName: '',
|
||||||
name: '',
|
name: '',
|
||||||
remarks: '',
|
remarks: '',
|
||||||
trainings: []
|
trainings: [],
|
||||||
|
parentId: null,
|
||||||
|
parentName: ''
|
||||||
},
|
},
|
||||||
detail: {
|
detail: {
|
||||||
mapId: '',
|
mapId: '',
|
||||||
@ -125,16 +127,12 @@ export default {
|
|||||||
initData(isNew, data) {
|
initData(isNew, data) {
|
||||||
this.isEdit = !isNew;
|
this.isEdit = !isNew;
|
||||||
this.clearForm();
|
this.clearForm();
|
||||||
if (isNew) {
|
this.loadTrainingList(data);
|
||||||
this.loadTrainingList(data);
|
|
||||||
} else {
|
|
||||||
this.loadTrainingList(data);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getChapter(data) {
|
getChapter(data) {
|
||||||
getLessonChapterDetail(data).then(response => {
|
getLessonChapterDetail(data).then(response => {
|
||||||
this.setChapterModel(response.data);
|
this.setChapterModel(response.data);
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('error.obtainChapterDataFailed'));
|
this.$messageBox(this.$t('error.obtainChapterDataFailed'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -156,10 +154,21 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
setChapterModel(data) {
|
setChapterModel(data) {
|
||||||
const lessonName = this.chapterModel.lessonName;
|
if (!this.isEdit) {
|
||||||
this.chapterModel = data;
|
const lessonName = this.chapterModel.lessonName;
|
||||||
this.chapterModel.trainings = data.trainings || [];
|
const parentName = data.name;
|
||||||
this.chapterModel.lessonName = lessonName;
|
const parentId = data.id;
|
||||||
|
this.chapterModel.lessonId = data.lessonId;
|
||||||
|
this.chapterModel.trainings = [];
|
||||||
|
this.chapterModel.lessonName = lessonName;
|
||||||
|
this.chapterModel.parentName = parentName;
|
||||||
|
this.chapterModel.parentId = parentId;
|
||||||
|
} else {
|
||||||
|
const lessonName = this.chapterModel.lessonName;
|
||||||
|
this.chapterModel = data;
|
||||||
|
this.chapterModel.trainings = data.trainings || [];
|
||||||
|
this.chapterModel.lessonName = lessonName;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
clearForm() {
|
clearForm() {
|
||||||
this.chapterModel.trainingId = '';
|
this.chapterModel.trainingId = '';
|
||||||
@ -174,10 +183,10 @@ export default {
|
|||||||
this.detail.prdCode = resp.data.prdCode;
|
this.detail.prdCode = resp.data.prdCode;
|
||||||
this.chapterModel.lessonId = resp.data.id;
|
this.chapterModel.lessonId = resp.data.id;
|
||||||
this.chapterModel.lessonName = resp.data.name;
|
this.chapterModel.lessonName = resp.data.name;
|
||||||
if (this.isEdit) {
|
if (data.id !== data.lessonId) {
|
||||||
this.getChapter(data);
|
this.getChapter(data);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('error.obtainCourseDetailsFailed'));
|
this.$messageBox(this.$t('error.obtainCourseDetailsFailed'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -187,7 +196,7 @@ export default {
|
|||||||
createLessonChapter(this.chapterModel).then(response => {
|
createLessonChapter(this.chapterModel).then(response => {
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
this.$message.success(this.$t('tip.createSuccess'));
|
this.$message.success(this.$t('tip.createSuccess'));
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('error.refreshFailed'));
|
this.$messageBox(this.$t('error.refreshFailed'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -199,14 +208,14 @@ export default {
|
|||||||
updateLessonChapter(this.chapterModel).then(response => {
|
updateLessonChapter(this.chapterModel).then(response => {
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
this.$message.success(this.$t('tip.updateSuccessfully'));
|
this.$message.success(this.$t('tip.updateSuccessfully'));
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('error.refreshFailed'));
|
this.$messageBox(this.$t('error.refreshFailed'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
back() {
|
back() {
|
||||||
this.$router.go(-1);
|
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.$route.query.mapId}/${this.$route.query.skinCode}`, query: {cityCode: this.$route.query.cityCode} });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -57,9 +57,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { createLesson, updateLesson, getLessonDetail, delLesson } from '@/api/jmap/lessondraft';
|
import { createLesson, updateLesson, getLessonDetail } from '@/api/jmap/lessondraft';
|
||||||
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
||||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||||
|
import { UrlConfig } from '@/router/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CourseEdit',
|
name: 'CourseEdit',
|
||||||
@ -146,7 +147,8 @@ export default {
|
|||||||
createLesson(model).then(response => {
|
createLesson(model).then(response => {
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
this.$message.success(this.$t('tip.createSuccess'));
|
this.$message.success(this.$t('tip.createSuccess'));
|
||||||
}).catch(error => {
|
this.back();
|
||||||
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('tip.creatingFailed'));
|
this.$messageBox(this.$t('tip.creatingFailed'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -165,7 +167,7 @@ export default {
|
|||||||
updateLesson(model).then(response => {
|
updateLesson(model).then(response => {
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
this.$message.success(this.$t('tip.updateSuccessfully'));
|
this.$message.success(this.$t('tip.updateSuccessfully'));
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('tip.updateFailed'));
|
this.$messageBox(this.$t('tip.updateFailed'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -182,13 +184,13 @@ export default {
|
|||||||
name: data.name,
|
name: data.name,
|
||||||
remarks: data.remarks
|
remarks: data.remarks
|
||||||
};
|
};
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('error.obtainCourseInformationFailed'));
|
this.$messageBox(this.$t('error.obtainCourseInformationFailed'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
back() {
|
back() {
|
||||||
this.$router.back();
|
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.$route.query.mapId}/${this.$route.query.skinCode}`, query: {cityCode: this.$route.query.cityCode} });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -81,19 +81,19 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
allowDrop(draggingNode, dropNode, type) {
|
allowDrop(draggingNode, dropNode, type) {
|
||||||
if (draggingNode && draggingNode.data.type === 'chapter') {
|
if (draggingNode && draggingNode.data.type === 'Chapter') {
|
||||||
return dropNode && draggingNode.parent == dropNode.parent && (
|
return dropNode && draggingNode.parent == dropNode.parent && (
|
||||||
dropNode.data.type === 'chapter' && type !== 'inner');
|
dropNode.data.type === 'Chapter' && type !== 'Inner');
|
||||||
} else if (draggingNode && draggingNode.data.type === 'training') {
|
} else if (draggingNode && draggingNode.data.type === 'Training') {
|
||||||
return dropNode && draggingNode.parent == dropNode.parent && (
|
return dropNode && draggingNode.parent == dropNode.parent && (
|
||||||
dropNode.data.type === 'training' && type !== 'inner');
|
dropNode.data.type === 'Training' && type !== 'Inner');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
allowDrag(draggingNode) {
|
allowDrag(draggingNode) {
|
||||||
return draggingNode && (draggingNode.data.type === 'chapter' || draggingNode.data.type === 'training');
|
return draggingNode && (draggingNode.data.type === 'Chapter' || draggingNode.data.type === 'Training');
|
||||||
},
|
},
|
||||||
getLeesonId(node) {
|
getLeesonId(node) {
|
||||||
if (node.parent.data.type === 'lesson') {
|
if (node.parent.data.type === 'Lesson') {
|
||||||
return node.parent.data.id;
|
return node.parent.data.id;
|
||||||
} else {
|
} else {
|
||||||
return this.getLeesonId(node.parent);
|
return this.getLeesonId(node.parent);
|
||||||
|
@ -46,6 +46,28 @@ export default {
|
|||||||
return this.$store.state.app.height - 125;
|
return this.$store.state.app.height - 125;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
$route() {
|
||||||
|
const data = this.$route.query;
|
||||||
|
switch (this.$route.params.type) {
|
||||||
|
case 'lessonCreate':
|
||||||
|
this.lessonCreate(data);
|
||||||
|
break;
|
||||||
|
case 'lessonEdit':
|
||||||
|
this.lessonEdit(data);
|
||||||
|
break;
|
||||||
|
case 'chapterCreate':
|
||||||
|
this.chapterCreate(data);
|
||||||
|
break;
|
||||||
|
case 'chapterEdit':
|
||||||
|
this.chapterEdit(data);
|
||||||
|
break;
|
||||||
|
case 'treeSort':
|
||||||
|
this.treeSort(data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const data = this.$route.query;
|
const data = this.$route.query;
|
||||||
switch (this.$route.params.type) {
|
switch (this.$route.params.type) {
|
||||||
@ -112,6 +134,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
refresh(filterSelect) {
|
refresh(filterSelect) {
|
||||||
|
this.$emit('refresh');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
114
src/views/lesson/operateMenu.vue
Normal file
114
src/views/lesson/operateMenu.vue
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||||
|
import PopMenu from '@/components/PopMenu';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TrainingOperateMenu',
|
||||||
|
components: {
|
||||||
|
PopMenu
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
point: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
node: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
menuShow: false,
|
||||||
|
menu: [],
|
||||||
|
menuChapte: [
|
||||||
|
{
|
||||||
|
label: '更新章节',
|
||||||
|
handler: this.updateChapter
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '创建章节',
|
||||||
|
handler: this.createChapterInChapter
|
||||||
|
}
|
||||||
|
],
|
||||||
|
menuLesson: [
|
||||||
|
{
|
||||||
|
label: '创建章节',
|
||||||
|
handler: this.createChapter
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '编辑课程',
|
||||||
|
handler: this.editLesson
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
node: function (val, old) {
|
||||||
|
if (val && val.data) {
|
||||||
|
switch (val.data.type) {
|
||||||
|
case 'Lesson':
|
||||||
|
this.menu = this.menuLesson;
|
||||||
|
break;
|
||||||
|
case 'Chapter':
|
||||||
|
this.menu = this.menuChapte;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Lesson)) {
|
||||||
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
|
} else {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.closeEvent();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
closeEvent() {
|
||||||
|
const self = this;
|
||||||
|
window.onclick = function (e) {
|
||||||
|
self.doClose();
|
||||||
|
};
|
||||||
|
},
|
||||||
|
doShow(point) {
|
||||||
|
this.closeEvent();
|
||||||
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
|
this.$refs.popMenu.resetShowPosition(point);
|
||||||
|
}
|
||||||
|
this.menuShow = true;
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
|
this.$refs.popMenu.close();
|
||||||
|
}
|
||||||
|
this.menuShow = false;
|
||||||
|
},
|
||||||
|
updateChapter() {
|
||||||
|
this.$emit('changeRouter', {event: '03', node: this.node});
|
||||||
|
},
|
||||||
|
createChapter() {
|
||||||
|
this.$emit('changeRouter', {event: '02', node: this.node});
|
||||||
|
},
|
||||||
|
editLesson() {
|
||||||
|
this.$emit('changeRouter', {event: '01', node: this.node});
|
||||||
|
},
|
||||||
|
createChapterInChapter() {
|
||||||
|
this.$emit('changeRouter', {event: '04', node: this.node});
|
||||||
|
},
|
||||||
|
refresh(filterSelect) {
|
||||||
|
this.$emit('refresh', filterSelect);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -173,20 +173,8 @@ export default {
|
|||||||
model.project = this.$route.params.project;
|
model.project = this.$route.params.project;
|
||||||
removeSessionStorage('againEnter');
|
removeSessionStorage('againEnter');
|
||||||
this.$store.dispatch('Login', model).then(() => {
|
this.$store.dispatch('Login', model).then(() => {
|
||||||
this.$store.dispatch('GetUserConfigInfo');
|
this.$store.dispatch('SetAccount', model.username);
|
||||||
this.$store.dispatch('SetAccount', model.username);
|
this.handleLoginSucessRoute();
|
||||||
// 设置路由
|
|
||||||
this.loading = false;
|
|
||||||
this.tipsMsg = '';
|
|
||||||
let path = localStore.get('trainingPlatformRoute'+model.username);
|
|
||||||
if (!path || !path.startsWith('/trainingPlatform')) {
|
|
||||||
path = UrlConfig.trainingPlatform.trainingPlatformHome;
|
|
||||||
}
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$i18n.locale = 'zh';
|
|
||||||
Cookies.set('user_lang', 'zh');
|
|
||||||
});
|
|
||||||
this.$router.push({ path: path });
|
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.tipsMsg = error.message;
|
this.tipsMsg = error.message;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -237,15 +225,7 @@ export default {
|
|||||||
self.$store.dispatch('QrLoginSetting', { key: 'SET_TOKEN', value: response.data.token }).then(() => {
|
self.$store.dispatch('QrLoginSetting', { key: 'SET_TOKEN', value: response.data.token }).then(() => {
|
||||||
// 清除定时器,设置路由
|
// 清除定时器,设置路由
|
||||||
self.clearTimer(self.checkLogin);
|
self.clearTimer(self.checkLogin);
|
||||||
let path = '/login';
|
this.handleLoginSucessRoute();
|
||||||
if (this.project) {
|
|
||||||
path = path + '/' + this.project;
|
|
||||||
}
|
|
||||||
self.$router.push({ path: path });
|
|
||||||
self.$nextTick(() => {
|
|
||||||
self.$i18n.locale = 'zh';
|
|
||||||
Cookies.set('user_lang', 'zh');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
if (error.data && error.data.status == '1') {
|
if (error.data && error.data.status == '1') {
|
||||||
@ -278,20 +258,8 @@ export default {
|
|||||||
}
|
}
|
||||||
removeSessionStorage('againEnter');
|
removeSessionStorage('againEnter');
|
||||||
this.$store.dispatch('Login', model).then(() => {
|
this.$store.dispatch('Login', model).then(() => {
|
||||||
this.$store.dispatch('GetUserConfigInfo');
|
this.$store.dispatch('SetAccount', model.username);
|
||||||
this.$store.dispatch('SetAccount', model.username);
|
this.handleLoginSucessRoute();
|
||||||
// 设置路由
|
|
||||||
this.loading = false;
|
|
||||||
this.tipsMsg = '';
|
|
||||||
let path = localStore.get('trainingPlatformRoute'+model.username);
|
|
||||||
if (!path || !path.startsWith('/trainingPlatform')) {
|
|
||||||
path = UrlConfig.trainingPlatform.trainingPlatformHome;
|
|
||||||
}
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$i18n.locale = 'zh';
|
|
||||||
Cookies.set('user_lang', 'zh');
|
|
||||||
});
|
|
||||||
this.$router.push({ path: path });
|
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.tipsMsg = error.message;
|
this.tipsMsg = error.message;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -302,7 +270,18 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
handleLoginSucessRoute() {
|
||||||
|
// 设置路由
|
||||||
|
this.loading = false;
|
||||||
|
this.tipsMsg = '';
|
||||||
|
const path = UrlConfig.trainingPlatform.trainingPlatformHome;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$i18n.locale = 'zh';
|
||||||
|
Cookies.set('user_lang', 'zh');
|
||||||
|
});
|
||||||
|
this.$router.push({ path: path });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -206,12 +206,15 @@ export default {
|
|||||||
// 设置扫码登录
|
// 设置扫码登录
|
||||||
self.$store.dispatch('QrLoginSetting', { key: 'SET_TOKENDESIGN', value: response.data.token }).then(() => {
|
self.$store.dispatch('QrLoginSetting', { key: 'SET_TOKENDESIGN', value: response.data.token }).then(() => {
|
||||||
// 清除定时器,设置路由
|
// 清除定时器,设置路由
|
||||||
self.clearTimer(self.checkLogin);
|
self.clearTimer(self.checkLogin);
|
||||||
self.$router.push({ path: '/design/login' });
|
|
||||||
|
this.$router.push({ path: `${UrlConfig.design.prefix}` });
|
||||||
self.$nextTick(() => {
|
self.$nextTick(() => {
|
||||||
self.$i18n.locale = 'zh';
|
self.$i18n.locale = 'zh';
|
||||||
Cookies.set('user_lang', 'zh');
|
Cookies.set('user_lang', 'zh');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
if (error.data && error.data.status == '1') {
|
if (error.data && error.data.status == '1') {
|
||||||
@ -244,16 +247,25 @@ export default {
|
|||||||
model.type = 'design';
|
model.type = 'design';
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('Login', model).then(() => {
|
// this.$store.dispatch('Login', model).then(() => {
|
||||||
this.$store.dispatch('GetUserConfigInfo');
|
// this.$store.dispatch('GetUserConfigInfo');
|
||||||
// 设置路由
|
// // 设置路由
|
||||||
this.loading = false;
|
// this.loading = false;
|
||||||
this.tipsMsg = '';
|
// this.tipsMsg = '';
|
||||||
this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
this.$i18n.locale = 'zh';
|
// this.$i18n.locale = 'zh';
|
||||||
Cookies.set('user_lang', 'zh');
|
// Cookies.set('user_lang', 'zh');
|
||||||
});
|
// });
|
||||||
this.$router.push({ path: `${UrlConfig.design.prefix}` });
|
// this.$router.push({ path: `${UrlConfig.design.prefix}` });
|
||||||
|
// }).catch(error => {
|
||||||
|
// this.tipsMsg = error.message;
|
||||||
|
// this.loading = false;
|
||||||
|
// setTimeout(() => { this.tipsMsg = ''; }, 5000);
|
||||||
|
// });
|
||||||
|
|
||||||
|
this.$store.dispatch('Login', model).then(() => {
|
||||||
|
this.$store.dispatch('SetAccount', model.username);
|
||||||
|
this.handleLoginSucessRoute();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.tipsMsg = error.message;
|
this.tipsMsg = error.message;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -265,7 +277,18 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
handleLoginSucessRoute() {
|
||||||
|
// 设置路由
|
||||||
|
this.loading = false;
|
||||||
|
this.tipsMsg = '';
|
||||||
|
const path = UrlConfig.design.prefix;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$i18n.locale = 'zh';
|
||||||
|
Cookies.set('user_lang', 'zh');
|
||||||
|
});
|
||||||
|
this.$router.push({ path: path });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -167,15 +167,14 @@ export default {
|
|||||||
model.project = this.$route.params.project;
|
model.project = this.$route.params.project;
|
||||||
removeSessionStorage('againEnter');
|
removeSessionStorage('againEnter');
|
||||||
this.$store.dispatch('Login', model).then(() => {
|
this.$store.dispatch('Login', model).then(() => {
|
||||||
this.$store.dispatch('GetUserConfigInfo');
|
|
||||||
this.$store.dispatch('SetAccount', model.username);
|
this.$store.dispatch('SetAccount', model.username);
|
||||||
// 设置路由
|
// 设置路由
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.tipsMsg = '';
|
this.tipsMsg = '';
|
||||||
let path = localStore.get('trainingPlatformRoute'+model.username);
|
// let path = localStore.get('trainingPlatformRoute'+model.username);
|
||||||
if (!path || !path.startsWith('/trainingPlatform')) {
|
// if (!path || !path.startsWith('/trainingPlatform')) {
|
||||||
path = UrlConfig.trainingPlatform.trainingPlatformHome;
|
path = UrlConfig.trainingPlatform.trainingPlatformHome;
|
||||||
}
|
// }
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$i18n.locale = 'en';
|
this.$i18n.locale = 'en';
|
||||||
Cookies.set('user_lang', 'en');
|
Cookies.set('user_lang', 'en');
|
||||||
@ -273,21 +272,10 @@ export default {
|
|||||||
Cookies.set('UserToken', model.password, { expires: 1/48});
|
Cookies.set('UserToken', model.password, { expires: 1/48});
|
||||||
}
|
}
|
||||||
removeSessionStorage('againEnter');
|
removeSessionStorage('againEnter');
|
||||||
this.$store.dispatch('Login', model).then(() => {
|
|
||||||
this.$store.dispatch('GetUserConfigInfo');
|
this.$store.dispatch('Login', model).then(() => {
|
||||||
this.$store.dispatch('SetAccount', model.username);
|
this.$store.dispatch('SetAccount', model.username);
|
||||||
// 设置路由
|
this.handleLoginSucessRoute();
|
||||||
this.loading = false;
|
|
||||||
this.tipsMsg = '';
|
|
||||||
let path = localStore.get('trainingPlatformRoute'+model.username);
|
|
||||||
if (!path || !path.startsWith('/trainingPlatform')) {
|
|
||||||
path = UrlConfig.trainingPlatform.trainingPlatformHome;
|
|
||||||
}
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$i18n.locale = 'en';
|
|
||||||
Cookies.set('user_lang', 'en');
|
|
||||||
});
|
|
||||||
this.$router.push({ path: path });
|
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.tipsMsg = error.message;
|
this.tipsMsg = error.message;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -298,7 +286,18 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
handleLoginSucessRoute() {
|
||||||
|
// 设置路由
|
||||||
|
this.loading = false;
|
||||||
|
this.tipsMsg = '';
|
||||||
|
const path = UrlConfig.trainingPlatform.trainingPlatformHome;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$i18n.locale = 'en';
|
||||||
|
Cookies.set('user_lang', 'en');
|
||||||
|
});
|
||||||
|
this.$router.push({ path: path });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -214,7 +214,8 @@ export default {
|
|||||||
self.$store.dispatch('QrLoginSetting', { key: 'SET_TOKENDESIGN', value: response.data.token }).then(() => {
|
self.$store.dispatch('QrLoginSetting', { key: 'SET_TOKENDESIGN', value: response.data.token }).then(() => {
|
||||||
// 清除定时器,设置路由
|
// 清除定时器,设置路由
|
||||||
self.clearTimer(self.checkLogin);
|
self.clearTimer(self.checkLogin);
|
||||||
self.$router.push({ path: '/design/login' });
|
// self.$router.push({ path: '/design/login' });
|
||||||
|
this.$router.push({ path: `${UrlConfig.design.prefix}` });
|
||||||
self.$nextTick(() => {
|
self.$nextTick(() => {
|
||||||
self.$i18n.locale = 'en';
|
self.$i18n.locale = 'en';
|
||||||
Cookies.set('user_lang', 'en');
|
Cookies.set('user_lang', 'en');
|
||||||
@ -249,16 +250,25 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('Login', model).then(() => {
|
// this.$store.dispatch('Login', model).then(() => {
|
||||||
this.$store.dispatch('GetUserConfigInfo');
|
// this.$store.dispatch('GetUserConfigInfo');
|
||||||
// 设置路由
|
// // 设置路由
|
||||||
this.loading = false;
|
// this.loading = false;
|
||||||
this.tipsMsg = '';
|
// this.tipsMsg = '';
|
||||||
this.$router.push({ path: `${UrlConfig.design.prefix}` });
|
// this.$router.push({ path: `${UrlConfig.design.prefix}` });
|
||||||
this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
this.$i18n.locale = 'en';
|
// this.$i18n.locale = 'en';
|
||||||
Cookies.set('user_lang', 'en');
|
// Cookies.set('user_lang', 'en');
|
||||||
});
|
// });
|
||||||
|
// }).catch(error => {
|
||||||
|
// this.tipsMsg = error.message;
|
||||||
|
// this.loading = false;
|
||||||
|
// setTimeout(() => { this.tipsMsg = ''; }, 5000);
|
||||||
|
// });
|
||||||
|
|
||||||
|
this.$store.dispatch('Login', model).then(() => {
|
||||||
|
this.$store.dispatch('SetAccount', model.username);
|
||||||
|
this.handleLoginSucessRoute();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.tipsMsg = error.message;
|
this.tipsMsg = error.message;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -270,7 +280,18 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
handleLoginSucessRoute() {
|
||||||
|
// 设置路由
|
||||||
|
this.loading = false;
|
||||||
|
this.tipsMsg = '';
|
||||||
|
const path = UrlConfig.design.prefix;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$i18n.locale = 'en';
|
||||||
|
Cookies.set('user_lang', 'en');
|
||||||
|
});
|
||||||
|
this.$router.push({ path: path });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -17,11 +17,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
:props="defaultProps"
|
:props="defaultProps"
|
||||||
:filter-node-method="filterNode"
|
:filter-node-method="filterNode"
|
||||||
highlight-current
|
highlight-current
|
||||||
|
default-expand-all
|
||||||
:default-expanded-keys="expandList"
|
:default-expanded-keys="expandList"
|
||||||
:span="22"
|
:span="22"
|
||||||
@node-click="clickEvent"
|
@node-click="clickEvent"
|
||||||
@ -56,6 +57,7 @@ import LimitList from '@/views/components/limits/index';
|
|||||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||||
import { trainingNotify } from '@/api/simulation';
|
import { trainingNotify } from '@/api/simulation';
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
|
import localStore from 'storejs';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LessonDetail',
|
name: 'LessonDetail',
|
||||||
@ -204,6 +206,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
backLessonList() {
|
backLessonList() {
|
||||||
|
localStore.remove('teachDetail'+this.$route.params.subSystem);
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${this.$route.params.subSystem}`});
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${this.$route.params.subSystem}`});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
goLesson(row) {
|
goLesson(row) {
|
||||||
|
localStore.set('teachDetail'+this.$route.params.subSystem, `${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}});
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}`, query: {lessonId: row.id, mapId: row.mapId, prdCode: row.prdCode}});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>{{ $t('global.mapList') }}</span>
|
<span>{{ $t('global.mapList') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- v-if="project!=='xty' " -->
|
<!-- v-if="project!=='xty' " -->
|
||||||
<filter-city ref="filerCity" filter-empty :query-function="queryFunction" :local-param-name="localParamName" @filterSelectChange="refresh" />
|
<filter-city ref="filerCity" filter-empty :query-function="queryFunction" :local-param-name="localParamName" @filterSelectChange="refresh" />
|
||||||
<!-- v-if="project!=='xty' " -->
|
<!-- v-if="project!=='xty' " -->
|
||||||
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-(project?50:125)) +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-(project?50:125)) +'px' }">
|
||||||
<el-tree
|
<el-tree
|
||||||
@ -22,11 +22,14 @@
|
|||||||
@node-expand="nodeExpand"
|
@node-expand="nodeExpand"
|
||||||
@node-collapse="nodeCollapse"
|
@node-collapse="nodeCollapse"
|
||||||
>
|
>
|
||||||
<span slot-scope="{ node:tnode, data }">
|
<span slot-scope="{ node }">
|
||||||
<span
|
<span
|
||||||
class="el-icon-tickets"
|
class="el-icon-tickets"
|
||||||
:style="{color: data.valid ? 'green':''}"
|
/>
|
||||||
> {{ tnode.label }}</span>
|
<span v-if="node.data.id ==='Simulation'"> {{ node.data.name+ $t('global.simulationSystem') }}</span>
|
||||||
|
<span v-else-if="node.data.id ==='Lesson'"> {{ node.data.name+ $t('global.lessonSystem') }}</span>
|
||||||
|
<span v-else-if="node.data.id ==='Exam'"> {{ node.data.name+ $t('global.examSystem') }}</span>
|
||||||
|
<span v-else> {{ node.data.name }}</span>
|
||||||
</span>
|
</span>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
@ -34,7 +37,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getPublishMapTree } from '@/api/management/mapprd';
|
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 { UrlConfig } from '@/router/index';
|
||||||
import FilterCity from '@/views/components/filterCity';
|
import FilterCity from '@/views/components/filterCity';
|
||||||
import localStore from 'storejs';
|
import localStore from 'storejs';
|
||||||
@ -72,8 +75,8 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
account() {
|
userId() {
|
||||||
return this.$store.state.user.account;
|
return this.$store.state.user.id;
|
||||||
},
|
},
|
||||||
project() {
|
project() {
|
||||||
return getSessionStorage('project');
|
return getSessionStorage('project');
|
||||||
@ -87,9 +90,10 @@ export default {
|
|||||||
beforeDestroy () {
|
beforeDestroy () {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// if (this.project === 'xty') {
|
const path = localStore.get('trainingPlatformRoute'+ this.userId);
|
||||||
// this.projectInitData('18');
|
if (path && path.startsWith('/trainingPlatform')) {
|
||||||
// }
|
this.$router.push(path);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
filterNode(value, data) {
|
filterNode(value, data) {
|
||||||
@ -103,7 +107,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
clickEvent(obj, data, ele) {
|
clickEvent(obj, data, ele) {
|
||||||
localStore.set('trainingPlatformCheckId'+this.filterSelect+this.account, obj.id);
|
localStore.set('trainingPlatformCheckId'+this.filterSelect+this.userId, obj.id);
|
||||||
while (data) {
|
while (data) {
|
||||||
if (data.data.type === 'Map') {
|
if (data.data.type === 'Map') {
|
||||||
this.mapId = data.data.id;
|
this.mapId = data.data.id;
|
||||||
@ -116,16 +120,25 @@ export default {
|
|||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.permission}/${this.mapId}`});
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.permission}/${this.mapId}`});
|
||||||
} else if ( obj.type === 'MapSystem') {
|
} else if ( obj.type === 'MapSystem') {
|
||||||
getSubSystemInfo(obj.id).then(resp => {
|
getSubSystemInfo(obj.id).then(resp => {
|
||||||
|
let router = '';
|
||||||
switch (resp.data.type) {
|
switch (resp.data.type) {
|
||||||
case 'Exam':
|
case 'Exam':
|
||||||
this.setLocalRoute(`${UrlConfig.trainingPlatform.examHome}/${obj.id}`);
|
this.setLocalRoute(`${UrlConfig.trainingPlatform.examHome}/${obj.id}`);
|
||||||
// this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${obj.id}`});
|
router = localStore.get('examDetail' + obj.id);
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.examHome}/${obj.id}`});
|
if (router) {
|
||||||
|
this.$router.push(router);
|
||||||
|
} else {
|
||||||
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.examHome}/${obj.id}`});
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'Lesson':
|
case 'Lesson':
|
||||||
this.setLocalRoute(`${UrlConfig.trainingPlatform.teachHome}/${obj.id}`);
|
this.setLocalRoute(`${UrlConfig.trainingPlatform.teachHome}/${obj.id}`);
|
||||||
// this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${obj.id}`});
|
router = localStore.get('teachDetail' + obj.id);
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${obj.id}`});
|
if (router) {
|
||||||
|
this.$router.push(router);
|
||||||
|
} else {
|
||||||
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${obj.id}`});
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'Simulation':
|
case 'Simulation':
|
||||||
this.setLocalRoute(`${UrlConfig.trainingPlatform.prodDetail}/${obj.id}?mapId=${this.mapId}`);
|
this.setLocalRoute(`${UrlConfig.trainingPlatform.prodDetail}/${obj.id}?mapId=${this.mapId}`);
|
||||||
@ -135,13 +148,13 @@ export default {
|
|||||||
// this.$router.push({ path: `${UrlConfig.trainingPlatform.runPlan}/${this.mapId}`, query: {skinCode: '02'} });
|
// this.$router.push({ path: `${UrlConfig.trainingPlatform.runPlan}/${this.mapId}`, query: {skinCode: '02'} });
|
||||||
// break;
|
// break;
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch((error) => {
|
||||||
this.$messageBox('获取子系统信息失败!');
|
this.$messageBox('获取子系统信息失败!'+error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setLocalRoute(path) {
|
setLocalRoute(path) {
|
||||||
localStore.set('trainingPlatformRoute'+this.account, path);
|
localStore.set('trainingPlatformRoute'+this.userId, path);
|
||||||
},
|
},
|
||||||
async refresh(filterSelect) {
|
async refresh(filterSelect) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -149,10 +162,10 @@ export default {
|
|||||||
this.filterSelect = filterSelect;
|
this.filterSelect = filterSelect;
|
||||||
try {
|
try {
|
||||||
let params={};
|
let params={};
|
||||||
if(this.project === 'xty'){
|
if (this.project === 'xty') {
|
||||||
params={'customized':'xty'};
|
params={'customized': 'xty'};
|
||||||
}
|
}
|
||||||
const res = await getTrainingSystemList(filterSelect,params);
|
const res = await getTrainingSystemList(filterSelect, params);
|
||||||
res.data.forEach(item =>{
|
res.data.forEach(item =>{
|
||||||
item.key = item.id + item.type;
|
item.key = item.id + item.type;
|
||||||
item.children && item.children.forEach(childrenItem => {
|
item.children && item.children.forEach(childrenItem => {
|
||||||
@ -163,7 +176,7 @@ export default {
|
|||||||
this.getExpandList(filterSelect);
|
this.getExpandList(filterSelect);
|
||||||
// this.changeCityWithPage(this.treeList);
|
// this.changeCityWithPage(this.treeList);
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const checkId = localStore.get('trainingPlatformCheckId'+filterSelect+this.account) || null;
|
const checkId = localStore.get('trainingPlatformCheckId'+filterSelect+this.userId) || null;
|
||||||
this.$refs.tree && this.$refs.tree.setCurrentKey(checkId);
|
this.$refs.tree && this.$refs.tree.setCurrentKey(checkId);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
@ -172,38 +185,19 @@ export default {
|
|||||||
this.$messageBox(this.$t('error.refreshFailed'));
|
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) {
|
nodeExpand(obj, node, ele) {
|
||||||
const key = obj.id;
|
const key = obj.id;
|
||||||
this.expandList = this.expandList.filter(item => item!==key);
|
this.expandList = this.expandList.filter(item => item!==key);
|
||||||
this.expandList.push(key);
|
this.expandList.push(key);
|
||||||
localStore.set('trainIngPlatformExpandList'+this.filterSelect+this.account, this.expandList);
|
localStore.set('trainIngPlatformExpandList'+this.filterSelect+this.userId, this.expandList);
|
||||||
},
|
},
|
||||||
nodeCollapse(obj, node, ele) {
|
nodeCollapse(obj, node, ele) {
|
||||||
const key = obj.id;
|
const key = obj.id;
|
||||||
this.expandList = this.expandList.filter(item => item!==key);
|
this.expandList = this.expandList.filter(item => item!==key);
|
||||||
localStore.set('trainIngPlatformExpandList'+this.filterSelect+this.account, this.expandList);
|
localStore.set('trainIngPlatformExpandList'+this.filterSelect+this.userId, this.expandList);
|
||||||
},
|
},
|
||||||
getExpandList(filterSelect) {
|
getExpandList(filterSelect) {
|
||||||
let expand = localStore.get('trainIngPlatformExpandList'+filterSelect+this.account);
|
let expand = localStore.get('trainIngPlatformExpandList'+filterSelect+this.userId);
|
||||||
expand = expand?(expand+'').split(','):'';
|
expand = expand?(expand+'').split(','):'';
|
||||||
if (expand instanceof Array) {
|
if (expand instanceof Array) {
|
||||||
this.expandList = expand;
|
this.expandList = expand;
|
||||||
|
Loading…
Reference in New Issue
Block a user