Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
2db65c3dd0
@ -336,10 +336,35 @@ export function competitionPracticalSceneStart(group, memberId, mode) {
|
||||
}
|
||||
|
||||
/** 退出场景 */
|
||||
export function exitCompetitionPracticalScene(group) {
|
||||
export function competitionPracticalSceneExit(group) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/exit/${group}`,
|
||||
method: 'PUT'
|
||||
});
|
||||
}
|
||||
|
||||
/** 退出场景 */
|
||||
export function competitionPracticalSceneFinish(group) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/finish/${group}`,
|
||||
method: 'PUT'
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取空白运营数据 */
|
||||
export function getEmptyOperationalStatistics(group) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/detail/os/${group}`,
|
||||
method: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交运营数据 */
|
||||
export function submitOperationalStatistics(group, data) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/detail/os/${group}`,
|
||||
method: 'PUT',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,11 @@ function handle(state, data) {
|
||||
case 'Simulation_IbpStatus':
|
||||
state.simulationIbpStatus = msg;
|
||||
break;
|
||||
case 'Simulation_Competition_Practice_Finish':
|
||||
state.competitionPracticeFinish++;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 操作聊天信息
|
||||
@ -269,7 +273,8 @@ const socket = {
|
||||
memberChangeCount: 0, // 仿真成员变更
|
||||
roomInvite: {},
|
||||
simulationTimeSync: '', // 仿真时间
|
||||
simulationIbpStatus: null
|
||||
simulationIbpStatus: null,
|
||||
competitionPracticeFinish:0 // 竞赛场景结束标识
|
||||
},
|
||||
getters: {
|
||||
},
|
||||
|
@ -1,14 +1,30 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="station-nav">
|
||||
<div class="station-line" />
|
||||
<div v-for="(item, index) in stationList" :key="index" class="station-box-out">
|
||||
<div class="station-box">
|
||||
<div class="leftRect" />
|
||||
<div class="rightRect" />
|
||||
<div class="nav-list-box station-list-box" :class="{'active': selectStationIndex == index}" @click="changeStation(item,index)" />
|
||||
<div class="station-nav-out">
|
||||
<div class="station-nav">
|
||||
<div class="station-line" />
|
||||
<div class="stationList">
|
||||
<div v-for="(item, index) in stationList" :key="index" class="station-box-out">
|
||||
<div class="station-box">
|
||||
<div class="leftRect" />
|
||||
<div class="rightRect" />
|
||||
<div class="nav-list-box station-list-box" :class="{'active': selectStation == item.id}" @click="changeStation(item,index)" />
|
||||
</div>
|
||||
<div class="station-name" :class="index==0?'station-name-first':index%2==1?'station-name-up':'station-name-down'">{{ item.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rightButtonGroup">
|
||||
<div class="rightButtonGroupL">
|
||||
<div class="controlCenter">
|
||||
<div class="nav-list-box station-list-box" :class="{'active': selectStation == 'controlCenter'}" @click="changeStation(item,index)" />
|
||||
</div>
|
||||
<div class="stationDepot">{{ '' }}</div>
|
||||
<div class="parkingLot">{{ '' }}</div>
|
||||
</div>
|
||||
<div class="rightButtonGroupR">
|
||||
{{ '' }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="station-name" :class="index==0?'station-name-first':index%2==1?'station-name-up':'station-name-down'">{{ item.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-box">
|
||||
@ -49,7 +65,7 @@ export default {
|
||||
name:'StationNav',
|
||||
data() {
|
||||
return {
|
||||
selectStationIndex: 0,
|
||||
selectStation: 'controlCenter',
|
||||
stationList:[],
|
||||
group:'',
|
||||
lineCode:'',
|
||||
@ -266,11 +282,17 @@ export default {
|
||||
this.selectChildren(child.id, false);
|
||||
},
|
||||
changeStation(item, index) {
|
||||
this.selectStationIndex = index;
|
||||
this.selectStation = item.id;
|
||||
this.selectChildren(this.$route.params.mode, false);
|
||||
},
|
||||
selectChildren(type, isReplace = false) { // 选择菜单
|
||||
const query = {stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id, group: this.group, lineCode:this.lineCode };
|
||||
let stationName = '';
|
||||
const station = this.stationList.find(each=>{ return each.id == this.selectStation; });
|
||||
if (station) {
|
||||
stationName = station.name;
|
||||
}
|
||||
const query = {stationName: stationName, stationId: this.selectStation, group: this.group, lineCode:this.lineCode };
|
||||
|
||||
if (isReplace) {
|
||||
this.$router.replace({ path: `/displayIscs/system/stationConfig/${type}`, query: query });
|
||||
} else {
|
||||
@ -299,9 +321,7 @@ export default {
|
||||
width: 100%;
|
||||
height: 65px;
|
||||
background-color: #ACACAC;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
position: relative;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.station-line{
|
||||
@ -481,4 +501,20 @@ background:rgba(231,237,253,0.9);
|
||||
.eachButtonText{
|
||||
padding:0px 1vw;
|
||||
}
|
||||
.stationList{
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
}
|
||||
.station-nav-out{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.rightButtonGroup{
|
||||
display: inline-block;
|
||||
float: right;
|
||||
width: 17vw;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
@ -72,6 +72,9 @@
|
||||
<!-- <theory-quiz ref="theoryQuiz" @commitResult="commitResult" />
|
||||
<throry-result ref="theoryResult" @restart="goTheoryQuiz" /> -->
|
||||
<select-role ref="selectRole" :member-list="currentPlayList" @selectRole="selectRole" />
|
||||
|
||||
<operational-statistic ref="operationalStatistic" />
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
@ -97,10 +100,12 @@ import { ScriptMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
import SelectRole from '@/views/newMap/displayNew/scriptDisplay/component/selectRole';
|
||||
import { setGoodsTryUse } from '@/api/management/goods';
|
||||
// import {loadScriptNewMode } from '@/api/simulation';
|
||||
import {endScriptTraining } from '@/api/script';
|
||||
import {competitionPracticalSceneStart, exitCompetitionPracticalScene} from '@/api/competition';
|
||||
|
||||
import {competitionPracticalSceneStart, competitionPracticalSceneExit, competitionPracticalSceneFinish, getEmptyOperationalStatistics} from '@/api/competition';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { createSimulationNew } from '@/api/simulation';
|
||||
import OperationalStatistic from './operationalStatistic.vue';
|
||||
import Vue from 'vue';
|
||||
|
||||
export default {
|
||||
@ -113,6 +118,7 @@ export default {
|
||||
SceneList,
|
||||
TheoryExamSelect,
|
||||
TheoryExam,
|
||||
OperationalStatistic,
|
||||
// TheoryQuiz,
|
||||
// ThroryResult,
|
||||
SelectRole
|
||||
@ -203,6 +209,9 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
'$store.state.socket.competitionPracticeFinish':function(val) {
|
||||
this.getEmptyOperationalStatistics();
|
||||
},
|
||||
// '$store.state.socket.simulationOver':function(val) {
|
||||
// !this.isGoback && this.back();
|
||||
// },
|
||||
@ -379,8 +388,9 @@ export default {
|
||||
});
|
||||
},
|
||||
handleQuitQuest() {
|
||||
exitCompetitionPracticalScene(this.group).then(resp => {
|
||||
competitionPracticalSceneExit(this.group).then(resp => {
|
||||
getSimulationInfoNew(this.group).then((res)=>{
|
||||
EventBus.$emit('quitScene');
|
||||
this.quitQuest();
|
||||
// this.initLoadPage();
|
||||
this.clearAllData();
|
||||
@ -451,7 +461,7 @@ export default {
|
||||
this.runScriptMode(memberId);
|
||||
},
|
||||
endTraining() {
|
||||
endScriptTraining(this.group).then(res=>{
|
||||
competitionPracticalSceneFinish(this.group).then(res=>{
|
||||
this.isScriptRun = false;
|
||||
if (this.scriptMode == ScriptMode.TEST) {
|
||||
this.formatScore = res.data;
|
||||
@ -588,6 +598,11 @@ export default {
|
||||
},
|
||||
startTheoryExam(mode) {
|
||||
this.$refs.theoryExam.doShow(mode);
|
||||
},
|
||||
getEmptyOperationalStatistics() {
|
||||
getEmptyOperationalStatistics(this.group).then(res=>{
|
||||
this.$refs.operationalStatistic.doShow(res.data);
|
||||
});
|
||||
}
|
||||
// commitResult(result) {
|
||||
// this.$refs.theoryResult.doShow(result);
|
||||
|
@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="提交运营统计数据"
|
||||
:visible.sync="dialogShow"
|
||||
top="50px"
|
||||
width="400px"
|
||||
:before-do-close="roleDoClose"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div v-for="(item,index) in resultData.itemVOS" :key="index" style="margin-top:10px;">
|
||||
<span style="margin-left: 20px;">{{ item.description+':' }}</span>
|
||||
<el-time-picker
|
||||
v-model="dataList[index]"
|
||||
value-format="HH:mm"
|
||||
format="HH:mm"
|
||||
size="small"
|
||||
style="width:200px;display:inline-block;"
|
||||
:placeholder="item.description"
|
||||
@change="((val)=>{changeData(val,index)}) "
|
||||
/>
|
||||
</div>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="roleDoClose">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="confirm">{{ $t('global.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { submitOperationalStatistics} from '@/api/competition';
|
||||
export default {
|
||||
name:'OperationalStatistics',
|
||||
data() {
|
||||
return {
|
||||
dialogShow:false,
|
||||
resultData:{
|
||||
score:0,
|
||||
itemVOS:[]
|
||||
},
|
||||
dataList:[]
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
doShow(resultData) {
|
||||
this.dialogShow = true;
|
||||
this.resultData.score = resultData.score;
|
||||
this.resultData.itemVOS = resultData.itemVOS;
|
||||
},
|
||||
roleDoClose() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
confirm() {
|
||||
let result = true;
|
||||
if (this.resultData.itemVOS.length > 0) {
|
||||
this.resultData.itemVOS.forEach(item=>{
|
||||
if (!item.timeFilledInByUser) {
|
||||
result = result && false;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (!result) {
|
||||
this.$messageBox('请填写表单');
|
||||
} else {
|
||||
submitOperationalStatistics(this.$route.query.group, this.resultData).then(res=>{
|
||||
this.$message.success('运营统计数据提交成功');
|
||||
this.dialogShow = false;
|
||||
}).catch(error=>{
|
||||
this.$message.error('运营统计数据提交失败:' + error.message);
|
||||
});
|
||||
}
|
||||
},
|
||||
changeData(val, index) {
|
||||
this.resultData.itemVOS[index].timeFilledInByUser = val + ':00';
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -30,7 +30,7 @@ export default {
|
||||
if (val.type == 'Accept_Conversation_Invitation') {
|
||||
this.scriptTipMessage = '请接受会话邀请';
|
||||
} else if (val.type == 'Conversation') {
|
||||
this.scriptTipMessage = '请说:' + val.content;
|
||||
this.scriptTipMessage = '请说:' + val.content.replace(/%s/g, '[当前时间]');
|
||||
} else if (val.type == 'Operation') {
|
||||
this.scriptTipMessage = covertOperate(val.operationType, val.operationParamMap);
|
||||
// this.scriptTipMessage = '请找到' + deviceName + ',执行【' + operateName.label + '】操作';
|
||||
|
Loading…
Reference in New Issue
Block a user