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({
|
return request({
|
||||||
url: `/api/v1/competitionPractical/exit/${group}`,
|
url: `/api/v1/competitionPractical/exit/${group}`,
|
||||||
method: 'PUT'
|
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':
|
case 'Simulation_IbpStatus':
|
||||||
state.simulationIbpStatus = msg;
|
state.simulationIbpStatus = msg;
|
||||||
break;
|
break;
|
||||||
|
case 'Simulation_Competition_Practice_Finish':
|
||||||
|
state.competitionPracticeFinish++;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 操作聊天信息
|
// 操作聊天信息
|
||||||
@ -269,7 +273,8 @@ const socket = {
|
|||||||
memberChangeCount: 0, // 仿真成员变更
|
memberChangeCount: 0, // 仿真成员变更
|
||||||
roomInvite: {},
|
roomInvite: {},
|
||||||
simulationTimeSync: '', // 仿真时间
|
simulationTimeSync: '', // 仿真时间
|
||||||
simulationIbpStatus: null
|
simulationIbpStatus: null,
|
||||||
|
competitionPracticeFinish:0 // 竞赛场景结束标识
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
},
|
},
|
||||||
|
@ -1,14 +1,30 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="station-nav">
|
<div class="station-nav-out">
|
||||||
<div class="station-line" />
|
<div class="station-nav">
|
||||||
<div v-for="(item, index) in stationList" :key="index" class="station-box-out">
|
<div class="station-line" />
|
||||||
<div class="station-box">
|
<div class="stationList">
|
||||||
<div class="leftRect" />
|
<div v-for="(item, index) in stationList" :key="index" class="station-box-out">
|
||||||
<div class="rightRect" />
|
<div class="station-box">
|
||||||
<div class="nav-list-box station-list-box" :class="{'active': selectStationIndex == index}" @click="changeStation(item,index)" />
|
<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>
|
||||||
<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>
|
</div>
|
||||||
<div class="bottom-box">
|
<div class="bottom-box">
|
||||||
@ -49,7 +65,7 @@ export default {
|
|||||||
name:'StationNav',
|
name:'StationNav',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectStationIndex: 0,
|
selectStation: 'controlCenter',
|
||||||
stationList:[],
|
stationList:[],
|
||||||
group:'',
|
group:'',
|
||||||
lineCode:'',
|
lineCode:'',
|
||||||
@ -266,11 +282,17 @@ export default {
|
|||||||
this.selectChildren(child.id, false);
|
this.selectChildren(child.id, false);
|
||||||
},
|
},
|
||||||
changeStation(item, index) {
|
changeStation(item, index) {
|
||||||
this.selectStationIndex = index;
|
this.selectStation = item.id;
|
||||||
this.selectChildren(this.$route.params.mode, false);
|
this.selectChildren(this.$route.params.mode, false);
|
||||||
},
|
},
|
||||||
selectChildren(type, isReplace = 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) {
|
if (isReplace) {
|
||||||
this.$router.replace({ path: `/displayIscs/system/stationConfig/${type}`, query: query });
|
this.$router.replace({ path: `/displayIscs/system/stationConfig/${type}`, query: query });
|
||||||
} else {
|
} else {
|
||||||
@ -299,9 +321,7 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 65px;
|
height: 65px;
|
||||||
background-color: #ACACAC;
|
background-color: #ACACAC;
|
||||||
position: absolute;
|
position: relative;
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
.station-line{
|
.station-line{
|
||||||
@ -481,4 +501,20 @@ background:rgba(231,237,253,0.9);
|
|||||||
.eachButtonText{
|
.eachButtonText{
|
||||||
padding:0px 1vw;
|
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>
|
</style>
|
||||||
|
@ -72,6 +72,9 @@
|
|||||||
<!-- <theory-quiz ref="theoryQuiz" @commitResult="commitResult" />
|
<!-- <theory-quiz ref="theoryQuiz" @commitResult="commitResult" />
|
||||||
<throry-result ref="theoryResult" @restart="goTheoryQuiz" /> -->
|
<throry-result ref="theoryResult" @restart="goTheoryQuiz" /> -->
|
||||||
<select-role ref="selectRole" :member-list="currentPlayList" @selectRole="selectRole" />
|
<select-role ref="selectRole" :member-list="currentPlayList" @selectRole="selectRole" />
|
||||||
|
|
||||||
|
<operational-statistic ref="operationalStatistic" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@ -97,10 +100,12 @@ import { ScriptMode, TrainingMode } from '@/scripts/ConstDic';
|
|||||||
import SelectRole from '@/views/newMap/displayNew/scriptDisplay/component/selectRole';
|
import SelectRole from '@/views/newMap/displayNew/scriptDisplay/component/selectRole';
|
||||||
import { setGoodsTryUse } from '@/api/management/goods';
|
import { setGoodsTryUse } from '@/api/management/goods';
|
||||||
// import {loadScriptNewMode } from '@/api/simulation';
|
// 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 { launchFullscreen } from '@/utils/screen';
|
||||||
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
import { createSimulationNew } from '@/api/simulation';
|
import { createSimulationNew } from '@/api/simulation';
|
||||||
|
import OperationalStatistic from './operationalStatistic.vue';
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -113,6 +118,7 @@ export default {
|
|||||||
SceneList,
|
SceneList,
|
||||||
TheoryExamSelect,
|
TheoryExamSelect,
|
||||||
TheoryExam,
|
TheoryExam,
|
||||||
|
OperationalStatistic,
|
||||||
// TheoryQuiz,
|
// TheoryQuiz,
|
||||||
// ThroryResult,
|
// ThroryResult,
|
||||||
SelectRole
|
SelectRole
|
||||||
@ -203,6 +209,9 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
'$store.state.socket.competitionPracticeFinish':function(val) {
|
||||||
|
this.getEmptyOperationalStatistics();
|
||||||
|
},
|
||||||
// '$store.state.socket.simulationOver':function(val) {
|
// '$store.state.socket.simulationOver':function(val) {
|
||||||
// !this.isGoback && this.back();
|
// !this.isGoback && this.back();
|
||||||
// },
|
// },
|
||||||
@ -379,8 +388,9 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleQuitQuest() {
|
handleQuitQuest() {
|
||||||
exitCompetitionPracticalScene(this.group).then(resp => {
|
competitionPracticalSceneExit(this.group).then(resp => {
|
||||||
getSimulationInfoNew(this.group).then((res)=>{
|
getSimulationInfoNew(this.group).then((res)=>{
|
||||||
|
EventBus.$emit('quitScene');
|
||||||
this.quitQuest();
|
this.quitQuest();
|
||||||
// this.initLoadPage();
|
// this.initLoadPage();
|
||||||
this.clearAllData();
|
this.clearAllData();
|
||||||
@ -451,7 +461,7 @@ export default {
|
|||||||
this.runScriptMode(memberId);
|
this.runScriptMode(memberId);
|
||||||
},
|
},
|
||||||
endTraining() {
|
endTraining() {
|
||||||
endScriptTraining(this.group).then(res=>{
|
competitionPracticalSceneFinish(this.group).then(res=>{
|
||||||
this.isScriptRun = false;
|
this.isScriptRun = false;
|
||||||
if (this.scriptMode == ScriptMode.TEST) {
|
if (this.scriptMode == ScriptMode.TEST) {
|
||||||
this.formatScore = res.data;
|
this.formatScore = res.data;
|
||||||
@ -588,6 +598,11 @@ export default {
|
|||||||
},
|
},
|
||||||
startTheoryExam(mode) {
|
startTheoryExam(mode) {
|
||||||
this.$refs.theoryExam.doShow(mode);
|
this.$refs.theoryExam.doShow(mode);
|
||||||
|
},
|
||||||
|
getEmptyOperationalStatistics() {
|
||||||
|
getEmptyOperationalStatistics(this.group).then(res=>{
|
||||||
|
this.$refs.operationalStatistic.doShow(res.data);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
// commitResult(result) {
|
// commitResult(result) {
|
||||||
// this.$refs.theoryResult.doShow(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') {
|
if (val.type == 'Accept_Conversation_Invitation') {
|
||||||
this.scriptTipMessage = '请接受会话邀请';
|
this.scriptTipMessage = '请接受会话邀请';
|
||||||
} else if (val.type == 'Conversation') {
|
} else if (val.type == 'Conversation') {
|
||||||
this.scriptTipMessage = '请说:' + val.content;
|
this.scriptTipMessage = '请说:' + val.content.replace(/%s/g, '[当前时间]');
|
||||||
} else if (val.type == 'Operation') {
|
} else if (val.type == 'Operation') {
|
||||||
this.scriptTipMessage = covertOperate(val.operationType, val.operationParamMap);
|
this.scriptTipMessage = covertOperate(val.operationType, val.operationParamMap);
|
||||||
// this.scriptTipMessage = '请找到' + deviceName + ',执行【' + operateName.label + '】操作';
|
// this.scriptTipMessage = '请找到' + deviceName + ',执行【' + operateName.label + '】操作';
|
||||||
|
Loading…
Reference in New Issue
Block a user