Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
# Conflicts: # src/router/index_Common.js
This commit is contained in:
commit
f2430c3625
@ -238,3 +238,12 @@ export function realDeviceIsUsedNew(group, projectCode) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 获取所有需要值班员的车站(新版)
|
||||
export function getAvailableStaionList(mapId) {
|
||||
return request({
|
||||
url: `/api/map/${mapId}/station/needSupervisor`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -75,5 +75,6 @@ export default {
|
||||
deviceManage: 'Device management',
|
||||
iscsDraw: 'Iscs Draw',
|
||||
iscsSystem: 'Iscs System',
|
||||
studentManage: 'Student manage'
|
||||
studentManage: 'Student manage',
|
||||
examDetail: 'Exam detail'
|
||||
};
|
||||
|
@ -32,7 +32,7 @@ export default {
|
||||
|
||||
save: '保存',
|
||||
updata: '更新',
|
||||
updateObj: '修改名称',
|
||||
updateObj: '修改',
|
||||
updateObjAxis: '更新坐标',
|
||||
saveAs: '另存为',
|
||||
publish: '发布',
|
||||
|
@ -79,5 +79,6 @@ export default {
|
||||
studentManage: '学生管理',
|
||||
competitionManage: '竞赛管理',
|
||||
refereeJManage: '仿真管理',
|
||||
homeJsxt: '首页'
|
||||
homeJsxt: '首页',
|
||||
examDetail: '考试详情'
|
||||
};
|
||||
|
@ -161,8 +161,8 @@ export default class Switch extends Group {
|
||||
z: this.z + 6,
|
||||
_subType: 'enabled', // 标识
|
||||
style: {
|
||||
x: arrowTextX,
|
||||
y: arrowTextY + 10,
|
||||
x: nameTextX,
|
||||
y: nameTextY + directy * 20,
|
||||
fontSize: 12,
|
||||
text: 'E',
|
||||
textAlign: 'center',
|
||||
|
@ -81,6 +81,16 @@ export default {
|
||||
cmdType: CMD.Station.active
|
||||
}
|
||||
// {
|
||||
// label: '所有进路交人工控',
|
||||
// handler: this.humanControlALL,
|
||||
// cmdType: ''
|
||||
// },
|
||||
// {
|
||||
// label: '所有进路交ATS自动控',
|
||||
// handler: this.atsAutoControlALL,
|
||||
// cmdType: ''
|
||||
// }
|
||||
// {
|
||||
// label: '执行关键操作测试',
|
||||
// handler: this.execKeyOperationTest,
|
||||
// cmdType: CMD.Station.active,
|
||||
|
@ -121,6 +121,7 @@ const DeviceManage = () => import('@/views/system/deviceManage/index');
|
||||
const MapSort = () => import('@/views/publish/publishMap/mapSort');
|
||||
const StudentManage = () => import('@/views/studentManage');
|
||||
|
||||
const CompetitionDetail = () => import('@/views/jsxt/competition/examDetail');
|
||||
const CompetitionManage = () => import('@/views/jsxt/competition/index');
|
||||
const CompetitionHome = () => import('@/views/jsxt/competition/home');
|
||||
const theoryManage = () => import('@/views/jsxt/competition/theory/index');
|
||||
@ -1023,6 +1024,15 @@ export const JSXT = [
|
||||
meta: {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'examDetail',
|
||||
component: CompetitionDetail,
|
||||
meta: {
|
||||
il8n: 'router.examDetail',
|
||||
icon: 'design',
|
||||
hidden: true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
348
src/views/jsxt/competition/examDetail.vue
Normal file
348
src/views/jsxt/competition/examDetail.vue
Normal file
@ -0,0 +1,348 @@
|
||||
<template>
|
||||
<div class="joylink-card">
|
||||
<div class="card-title">
|
||||
<b>{{ $t('exam.nameOfTestPaper') +': ' + examDetails.name }}</b>
|
||||
</div>
|
||||
<div class="card_content">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<p class="list-item">
|
||||
<span class="list-label">{{ $t('exam.examStartTime') +':' }}</span>
|
||||
<span v-if="examDetails.startTime" class="list-elem">
|
||||
{{ examDetails.startTime }} - {{ examDetails.endTime }}</span>
|
||||
<span v-else class="list-elem">{{ $t('exam.theExamIsReadyAnyTime') }}</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">{{ $t('exam.testExplanation') + ':' }}</span>
|
||||
<span class="list-elem">{{ examDetails.remarks }}</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">{{ $t('exam.examTimeAvailable') + ':' }}</span>
|
||||
<span class="list-elem" v-html="parseInt(examDetails.duration) / 60 + $t('exam.minutes')" />
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">{{ $t('exam.fullMarksInTheExam') + ':' }}</span>
|
||||
<span class="list-elem">{{ examDetails.fullPoint }}</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">{{ $t('exam.passMarkTheExam') + ':' }}</span>
|
||||
<span class="list-elem">{{ examDetails.passingPoint }}</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">{{ $t('exam.examinationRules') + ':' }}</span>
|
||||
<span class="list-elem">
|
||||
<p class="list-table">
|
||||
<el-table :data="examDetails.examDefinitionRulesVOList" border show-summary>
|
||||
<el-table-column prop="name" :label="this.$t('exam.trainingType')" width="180" />
|
||||
<el-table-column prop="num" :label="this.$t('exam.numberOfQuestions')" />
|
||||
<el-table-column prop="point" :label="this.$t('exam.score')" />
|
||||
<el-table-column prop="chapterIdLong" :label="this.$t('exam.totalScore')" />
|
||||
</el-table>
|
||||
</p>
|
||||
</span>
|
||||
</p>
|
||||
<div class="btn-start">
|
||||
<el-button :disabled="disabled" type="primary" @click="exmaStart">{{ $t('exam.startTheExam') }}</el-button>
|
||||
<el-button :disabled="disabled" @click="back">{{ $t('global.back') }}</el-button>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { examNotify, examNotifyNew } from '@/api/simulation';
|
||||
import { getExamLessonDetail } from '@/api/management/exam';
|
||||
import { generateExamList } from '@/api/management/userexam';
|
||||
import { getPublishLessonDetail } from '@/api/jmap/lesson';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import LangStorage from '@/utils/lang';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'ExamDetailView',
|
||||
data() {
|
||||
return {
|
||||
disabled: false,
|
||||
examDetails: {
|
||||
lessonId: '',
|
||||
name: '',
|
||||
remarks: '',
|
||||
examDefinitionRulesVOList: [],
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
fullPoint: '',
|
||||
passingPoint: '',
|
||||
duration: 0,
|
||||
type: ''
|
||||
},
|
||||
typeList: [],
|
||||
examList: [],
|
||||
trainingOperateTypeMap: {},
|
||||
drawWay: false,
|
||||
lineCode: '' // 线路对应的皮肤
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('trainingList', [
|
||||
'trainingList'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$route.params.examId': function (val) {
|
||||
this.loadInitPage(val);
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
// this.loadInitPage(this.$route.params.examId);
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
this.typeList = [];
|
||||
for (const val in ConstConfig.ConstSelect.trainingDeviceType) {
|
||||
this.typeList.push({name: LangStorage.getLang() == 'en' ? ConstConfig.ConstSelect.trainingDeviceType[val].enlabel : ConstConfig.ConstSelect.trainingDeviceType[val].label, code: val});
|
||||
}
|
||||
this.trainingOperateTypeMap = {
|
||||
Switch: [],
|
||||
Section: [],
|
||||
Signal: [],
|
||||
Stand: [],
|
||||
Station: [],
|
||||
ControlConvertMenu: [],
|
||||
TrainWindow: []
|
||||
};
|
||||
let ele;
|
||||
for ( ele in CMD['Switch']) {
|
||||
this.trainingOperateTypeMap['Switch'].push(CMD['Switch'][ele]);
|
||||
}
|
||||
for ( ele in CMD['Section']) {
|
||||
this.trainingOperateTypeMap['Section'].push(CMD['Section'][ele]);
|
||||
}
|
||||
for ( ele in CMD['Signal']) {
|
||||
this.trainingOperateTypeMap['Signal'].push(CMD['Signal'][ele]);
|
||||
}
|
||||
for ( ele in CMD['Stand']) {
|
||||
this.trainingOperateTypeMap['Stand'].push(CMD['Stand'][ele]);
|
||||
}
|
||||
for ( ele in CMD['Station']) {
|
||||
this.trainingOperateTypeMap['Station'].push(CMD['Station'][ele]);
|
||||
}
|
||||
for ( ele in CMD['ControlConvertMenu']) {
|
||||
this.trainingOperateTypeMap['ControlConvertMenu'].push(CMD['ControlConvertMenu'][ele]);
|
||||
}
|
||||
for ( ele in CMD['Train']) {
|
||||
this.trainingOperateTypeMap['TrainWindow'].push(CMD['Train'][ele]);
|
||||
}
|
||||
},
|
||||
async loadInitPage(examId) {
|
||||
if (examId) {
|
||||
try {
|
||||
const response = await getPublishMapInfo(this.$route.query.mapId);
|
||||
if (response.data) {
|
||||
this.drawWay = response.data.drawWay;
|
||||
this.lineCode = response.data.lineCode;
|
||||
this.typeList = [];
|
||||
await this.getList();
|
||||
}
|
||||
} catch (e) {
|
||||
this.$message.error(this.$t('error.getMapDataFailed'));
|
||||
}
|
||||
const res = await getExamLessonDetail(examId);
|
||||
this.examDetails = res.data;
|
||||
this.examDetails.examDefinitionRulesVOList.forEach((res, index) => {
|
||||
res.chapterIdLong = Number(res.num) * Number(res.point);
|
||||
this.typeList.forEach(v => {
|
||||
if (res.trainingType == v.code) {
|
||||
this.examDetails.examDefinitionRulesVOList[index].name = v.name;
|
||||
if (res.operateType) {
|
||||
this.trainingOperateTypeMap[res.trainingType].forEach(item => {
|
||||
if ((item.code || item.value) === res.operateType) {
|
||||
this.examDetails.examDefinitionRulesVOList[index].name = `${this.examDetails.examDefinitionRulesVOList[index].name}-${item.name || item.label}`;
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
buy() {
|
||||
getPublishLessonDetail({ id: this.examDetails.lessonId }).then((res) => {
|
||||
this.$router.push({
|
||||
path: `${UrlConfig.trainingPlatform.pay}/${this.examDetails.lessonId}`,
|
||||
query: { permissionType: PermissionType.EXAM, lessonId: this.examDetails.lessonId, prdType: res.data.prdType, mapId: res.data.mapId }
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('error.obtainCourseDetailsFailed'));
|
||||
});
|
||||
|
||||
},
|
||||
async examDetail() {
|
||||
const data = this.examDetails;
|
||||
try {
|
||||
const response = await generateExamList(data.id);
|
||||
this.examList = response.data.userExamQuestionsVOs;
|
||||
this.userExam = response.data;
|
||||
const list = response.data.userExamQuestionsVOs;
|
||||
await this.$store.dispatch('exam/setUsedTime', this.userExam.usedTime);
|
||||
await this.$store.dispatch('exam/setTotalTime', this.userExam.duration);
|
||||
await this.$store.dispatch('trainingList/setTrainingList', list);
|
||||
} catch (error) {
|
||||
// 判断是否有考试权限,如果没有权限则跳到购买页面,否则报错
|
||||
if (error.code === 500004) {
|
||||
this.$confirm( this.$t('tip.noCourseAuthority'), this.$t('tip.hint'), {
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
type: 'warning',
|
||||
center: true
|
||||
}).then(() => {
|
||||
this.buy();
|
||||
}).catch(() => { });
|
||||
} else if (error.code === 500005) {
|
||||
this.$messageBox(this.$t('tip.notWithinTheScopeOfTheExamination'));
|
||||
} else {
|
||||
this.$messageBox(`${error.message}`);
|
||||
}
|
||||
}
|
||||
},
|
||||
async exmaStart() {
|
||||
this.disabled = true;
|
||||
await this.examDetail();
|
||||
if (this.examList.length && !this.drawWay) {
|
||||
examNotify({ examId: this.$route.params.examId }).then(resp => {
|
||||
const query = {
|
||||
group: resp.data,
|
||||
trainingId: this.examList[0].trainingId,
|
||||
userExamId: this.userExam.id,
|
||||
examQuestionId: this.examList[0].id,
|
||||
subSystem: this.$route.query.subSystem,
|
||||
examId: this.$route.params.examId,
|
||||
mapId: this.$route.query.mapId,
|
||||
lineCode: this.lineCode
|
||||
};
|
||||
this.$router.push({ path: `${UrlConfig.display}/exam`, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.disabled = false;
|
||||
this.$messageBox( this.$t('error.createSimulationFailed') + `: ${error.message}`);
|
||||
});
|
||||
} else if (this.examList.length && this.drawWay) {
|
||||
examNotifyNew({ examId: this.$route.params.examId }).then(resp => {
|
||||
const query = {
|
||||
group: resp.data,
|
||||
trainingId: this.examList[0].trainingId,
|
||||
userExamId: this.userExam.id,
|
||||
examQuestionId: this.examList[0].id,
|
||||
subSystem: this.$route.query.subSystem,
|
||||
examId: this.$route.params.examId,
|
||||
mapId: this.$route.query.mapId,
|
||||
lineCode: this.lineCode
|
||||
};
|
||||
this.$router.push({ path: `${UrlConfig.displayNew}/exam`, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.disabled = false;
|
||||
this.$messageBox( this.$t('error.createSimulationFailed') + `: ${error.message}`);
|
||||
});
|
||||
} else {
|
||||
this.disabled = false;
|
||||
}
|
||||
},
|
||||
back() {
|
||||
this.disabled = true;
|
||||
setTimeout(() => {
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.query.subSystem}`, query: {lessonId: this.examDetails.lessonId}});
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
.joylink-card{
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
.card-title{
|
||||
height: 47px;
|
||||
line-height: 47px;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #e6e6e6;
|
||||
}
|
||||
.card_content{
|
||||
padding:50px;
|
||||
padding-right: 0;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.menu li {
|
||||
border-right: solid white 1px;
|
||||
}
|
||||
|
||||
ul {
|
||||
line-height: 22px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.noList {
|
||||
text-align: center;
|
||||
padding-top: 20px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.btn-buy {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding-right: 50px;
|
||||
transform: translateY(-30px);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
/deep/ {
|
||||
.el-table__footer-wrapper {
|
||||
.is-leaf:nth-child(3) {
|
||||
font-size: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
.list-item {
|
||||
font-size: 16px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.list-label {
|
||||
display: -moz-inline-box;
|
||||
display: inline-block;
|
||||
text-align: right;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.list-table {
|
||||
padding-top: 10px;
|
||||
padding-left: 120px;
|
||||
width: calc(100% - 80px);
|
||||
}
|
||||
|
||||
.list-elem {
|
||||
color: #808080 !important;
|
||||
}
|
||||
|
||||
.btn-start {
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
@ -24,8 +24,12 @@
|
||||
:offset="offset"
|
||||
:offset-bottom="offsetBottom"
|
||||
:group="group"
|
||||
:show-station="showStation"
|
||||
:station-list="stationList"
|
||||
:show-select-station="showSelectStation"
|
||||
@switchMode="switchMode"
|
||||
@selectQuest="selectQuest"
|
||||
@switchStationMode="switchStationMode"
|
||||
/>
|
||||
|
||||
<menu-system-time ref="menuSystemTime" :offset="offset" :right="right" :group="group" />
|
||||
@ -104,6 +108,9 @@ export default {
|
||||
simulationShow: false,
|
||||
drivingShow: false,
|
||||
questId: 0, // 加载任务的Id
|
||||
showStation: '',
|
||||
stationList: [],
|
||||
showSelectStation: false, // 是否展示现地选择设备集中站select
|
||||
group: '',
|
||||
prdTypeMap: {
|
||||
'01': '01', // 现地 => 现地
|
||||
@ -162,6 +169,12 @@ export default {
|
||||
'$store.state.map.mapViewLoadedCount': function (val) {
|
||||
this.mapBoxP = document.getElementById(this.canvasId).children[0];
|
||||
this.mapBoxP.style.cursor = '';
|
||||
this.switchStationMode(this.showStation);
|
||||
},
|
||||
'$store.state.training.centerStationCode': function(code) {
|
||||
if (code) {
|
||||
this.showStation = code;
|
||||
}
|
||||
},
|
||||
// '$store.state.training.prdType': function(val) {
|
||||
// debugger;
|
||||
@ -172,6 +185,10 @@ export default {
|
||||
'$store.state.app.windowSizeCount': function() {
|
||||
this.setWindowSize();
|
||||
},
|
||||
'$store.state.map.map': function (val) {
|
||||
this.showSelectStation = val.skinVO.code === '06' && this.$store.state.training.prdType === '01';
|
||||
this.showSelectStation && this.setStationList(val);
|
||||
},
|
||||
$route() {
|
||||
this.$nextTick(() => {
|
||||
this.initLoadData();
|
||||
@ -436,6 +453,26 @@ export default {
|
||||
this.$store.dispatch('config/resize', { width, height });
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode });
|
||||
});
|
||||
},
|
||||
switchStationMode(val) {
|
||||
if (val == null && this.stationList.length > 0) {
|
||||
this.showStation = this.stationList[0].value;
|
||||
} else {
|
||||
this.showStation = val;
|
||||
}
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation);
|
||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
},
|
||||
setStationList(val) {
|
||||
this.stationList = [];
|
||||
(val.stationList || []).forEach(item => {
|
||||
if (item.centralized) {
|
||||
this.stationList.push({value: item.code, name: item.name});
|
||||
}
|
||||
});
|
||||
if (this.stationList.length) {
|
||||
this.showStation = this.stationList[0].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -627,9 +627,15 @@ export default {
|
||||
}
|
||||
},
|
||||
switchStationMode(val) {
|
||||
this.showStation = val;
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation);
|
||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
if (this.stationList.length > 0) {
|
||||
if (val == null) {
|
||||
this.showStation = this.stationList[0].value;
|
||||
} else {
|
||||
this.showStation = val;
|
||||
}
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation);
|
||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
}
|
||||
},
|
||||
setStationList(val) {
|
||||
this.stationList = [];
|
||||
|
@ -329,11 +329,12 @@ export default {
|
||||
font-size: 18px !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.display-draft {
|
||||
position: absolute;
|
||||
float: right;
|
||||
right: 20px;
|
||||
bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.display-draft {
|
||||
position: absolute;
|
||||
float: right;
|
||||
right: 20px;
|
||||
bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="schema" :style="{top: offset+'px'}">
|
||||
<el-select v-if="isScript || isDesignPlatform" v-model="swch" size="small" :placeholder="$t('display.schema.selectProduct')" @change="switchMode">
|
||||
<el-select v-if="(isScript&&!isScriptCommand) || isDesignPlatform" v-model="swch" size="small" :placeholder="$t('display.schema.selectProduct')" @change="switchMode">
|
||||
<el-option v-for="item in swchList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
<el-select v-if="showSelectStation" v-model="showStation" style="width: 100px;" size="small" @change="switchStationMode">
|
||||
<el-select v-if="showSelectStation&&!isScriptCommand && swch=='01'" v-model="showStation" style="width: 100px;" size="small" @change="switchStationMode">
|
||||
<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
<el-button-group>
|
||||
@ -89,6 +89,7 @@ export default {
|
||||
viewDisabled: true,
|
||||
runing: false,
|
||||
swch: '01',
|
||||
isScriptCommand:false,
|
||||
swchList: [
|
||||
{ value: '01', name: '现地' },
|
||||
{ value: '02', name: '行调' }
|
||||
@ -126,10 +127,14 @@ export default {
|
||||
await this.loadRunData(this.$route.query);
|
||||
}
|
||||
}
|
||||
},
|
||||
'$store.state.scriptRecord.bgSet':function (val) {
|
||||
this.isScriptCommand = val;
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
await this.loadRunData(this.$route.query);
|
||||
this.isScriptCommand = this.$store.state.scriptRecord.bgSet;
|
||||
},
|
||||
methods: {
|
||||
loadRunData(opt) {
|
||||
@ -185,7 +190,7 @@ export default {
|
||||
},
|
||||
switchMode(swch) {
|
||||
this.$emit('switchMode', swch);
|
||||
let showMode = '02';
|
||||
let showMode = '03';
|
||||
if (swch == '01') {
|
||||
showMode = '03';
|
||||
} else if (swch == '02') {
|
||||
@ -202,6 +207,11 @@ export default {
|
||||
}
|
||||
});
|
||||
this.$jlmap.updateShowMode(list, showMode);
|
||||
if (swch == '02') {
|
||||
this.switchStationMode('');
|
||||
} else {
|
||||
this.switchStationMode(null);
|
||||
}
|
||||
},
|
||||
switchStationMode(val) {
|
||||
this.$emit('switchStationMode', val);
|
||||
|
@ -31,6 +31,7 @@ import Vue from 'vue';
|
||||
import AddAction from '../scriptRecord/addAction';
|
||||
import GetAction from '../scriptRecord/getAction';
|
||||
import AddRole from '../scriptRecord/addRole';
|
||||
import {getDraftScriptByGroupNew} from '@/api/script';
|
||||
import {saveScriptScenes, saveScriptScenesNew, saveScriptData, saveScriptDataNew, dumpScriptData, dumpScriptDataNew, updateMapLocation, updateMapLocationNew, scriptPause, simulationPause, executeScript, executeScriptNew} from '@/api/simulation';
|
||||
|
||||
export default {
|
||||
@ -85,7 +86,15 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
// this.initAutoSaveScript();
|
||||
this.backDisabled = this.$store.state.scriptRecord.bgSet;
|
||||
if (this.drawWay) {
|
||||
getDraftScriptByGroupNew(this.group).then(response=>{
|
||||
this.backDisabled = response.data.bgSet;
|
||||
this.$store.dispatch('scriptRecord/updateBgSet', response.data.bgSet);
|
||||
});
|
||||
} else {
|
||||
this.backDisabled = this.$store.state.scriptRecord.bgSet;
|
||||
}
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.clearAutoSave();
|
||||
|
@ -271,19 +271,19 @@ export default {
|
||||
});
|
||||
return lastData;
|
||||
},
|
||||
hover(field) {
|
||||
if (this.field == '') {
|
||||
if (this.isFirstTips) {
|
||||
this.$message('请在右侧地图上选择操作');
|
||||
this.isFirstTips = false;
|
||||
}
|
||||
this.field = field;
|
||||
this.$store.dispatch('scriptRecord/updateIsScriptCommand', true);
|
||||
} else {
|
||||
this.field = '';
|
||||
this.$store.dispatch('scriptRecord/updateIsScriptCommand', false);
|
||||
}
|
||||
},
|
||||
// hover(field) {
|
||||
// if (this.field == '') {
|
||||
// if (this.isFirstTips) {
|
||||
// this.$message('请在右侧地图上选择操作');
|
||||
// this.isFirstTips = false;
|
||||
// }
|
||||
// this.field = field;
|
||||
// this.$store.dispatch('scriptRecord/updateIsScriptCommand', true);
|
||||
// } else {
|
||||
// this.field = '';
|
||||
// this.$store.dispatch('scriptRecord/updateIsScriptCommand', false);
|
||||
// }
|
||||
// },
|
||||
changeRole(index) {
|
||||
const role = this.orginMemberList.find(elem=>{ return elem.id == index; }).role;
|
||||
const data = {role:role};
|
||||
|
@ -33,8 +33,8 @@
|
||||
@change="handleUpdUser(node, index)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in deviceList"
|
||||
:key="item.code"
|
||||
v-for="(item,deviceIndex) in deviceList"
|
||||
:key="deviceIndex"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
:disabled="item.disabled"
|
||||
|
@ -155,6 +155,12 @@ export default {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
availableStationList:{
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
standList: {
|
||||
type: Array,
|
||||
default() {
|
||||
@ -200,15 +206,20 @@ export default {
|
||||
return this.room.state == '02';
|
||||
},
|
||||
stationListForAttendant() {
|
||||
return this.stationList.filter(elem => { return elem.centralized; }).map(item => {
|
||||
const elem = { code: item.code, name: item.name, disabled: false };
|
||||
this.attendantList.forEach(nor => {
|
||||
if (elem.code == nor.deviceCode) {
|
||||
elem.disabled = true;
|
||||
}
|
||||
if (this.drawWay === 'true') {
|
||||
return this.availableStationList;
|
||||
} else {
|
||||
return this.stationList.filter(elem => { return elem.centralized; }).map(item => {
|
||||
const elem = { code: item.code, name: item.name, disabled: false };
|
||||
this.attendantList.forEach(nor => {
|
||||
if (elem.code == nor.deviceCode) {
|
||||
elem.disabled = true;
|
||||
}
|
||||
});
|
||||
return elem;
|
||||
});
|
||||
return elem;
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
stationListForIBP() {
|
||||
return this.stationList.map(item => {
|
||||
|
@ -22,6 +22,7 @@
|
||||
:members="members"
|
||||
:height="height"
|
||||
:station-list="stationList"
|
||||
:available-station-list="availableStationList"
|
||||
:stand-list="standList"
|
||||
:door-list="doorList"
|
||||
@message="messageInfo"
|
||||
@ -47,7 +48,7 @@ import eMembers from './e-members';
|
||||
import eChat from './e-chat';
|
||||
import eRoles from './e-roles';
|
||||
import { postRoomDetail, getJointTrainRoomUserList, getRealDevices, putJointTrainingSimulationEntrance, getjointTraining } from '@/api/chat';
|
||||
import { postRoomDetailNew, getJointTrainRoomUserListNew, putJointTrainingSimulationEntranceNew, getjointTrainingNew, getRealDevicesNew} from '@/api/jointTraining';
|
||||
import { postRoomDetailNew, getJointTrainRoomUserListNew, putJointTrainingSimulationEntranceNew, getjointTrainingNew, getRealDevicesNew, getAvailableStaionList} from '@/api/jointTraining';
|
||||
import { getPublishMapInfo, hasDoorStationList } from '@/api/jmap/map';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { getStationList } from '@/api/runplan';
|
||||
@ -76,6 +77,7 @@ export default {
|
||||
userMap: [],
|
||||
members: [],
|
||||
stationList: [],
|
||||
availableStationList:[],
|
||||
standList: [],
|
||||
doorList: [],
|
||||
timer: null
|
||||
@ -138,6 +140,9 @@ export default {
|
||||
await this.getUserList();
|
||||
await this.getStandList();
|
||||
await this.getStaionList(this.room.mapId);
|
||||
if (this.drawWay === 'true') {
|
||||
await this.getAvailableStaionList(this.room.mapId);
|
||||
}
|
||||
await this.getDoorList(this.room.mapId, this.stationList);
|
||||
if (this.timer) { clearInterval(this.timer); }
|
||||
this.timer = setInterval(() => {
|
||||
@ -170,6 +175,10 @@ export default {
|
||||
const resp = await getStationList(mapId);
|
||||
this.stationList = resp.data || [];
|
||||
},
|
||||
async getAvailableStaionList(mapId) {
|
||||
const resp = await getAvailableStaionList(mapId);
|
||||
this.availableStationList = resp.data || [];
|
||||
},
|
||||
async getDoorList(mapId, stationList) {
|
||||
const doorList = [];
|
||||
hasDoorStationList(mapId).then(res =>{
|
||||
|
Loading…
Reference in New Issue
Block a user