diff --git a/src/views/newMap/display/terminals/index.vue b/src/views/newMap/display/terminals/index.vue
index 2e039260f..18630c6ef 100644
--- a/src/views/newMap/display/terminals/index.vue
+++ b/src/views/newMap/display/terminals/index.vue
@@ -32,7 +32,7 @@
+
diff --git a/src/views/newMap/display/voiceChatBox/chatSetting.vue b/src/views/newMap/display/voiceChatBox/chatSetting.vue
new file mode 100644
index 000000000..9a996c089
--- /dev/null
+++ b/src/views/newMap/display/voiceChatBox/chatSetting.vue
@@ -0,0 +1,126 @@
+
+
+
+
+
+
diff --git a/src/views/newMap/display/voiceChatBox/index.vue b/src/views/newMap/display/voiceChatBox/index.vue
new file mode 100644
index 000000000..b327830db
--- /dev/null
+++ b/src/views/newMap/display/voiceChatBox/index.vue
@@ -0,0 +1,1212 @@
+
+
+
+
+
+
diff --git a/src/views/publish/publishMap/editSubsystem.vue b/src/views/publish/publishMap/editSubsystem.vue
index 2d6f6b031..83615ea91 100644
--- a/src/views/publish/publishMap/editSubsystem.vue
+++ b/src/views/publish/publishMap/editSubsystem.vue
@@ -155,7 +155,8 @@ export default {
{ key: 'hasTraining', label: '是否有实训', value: false, type: 'checkbox'},
{ key: 'hasExam', label: '是否有考试', value: false, type: 'checkbox' },
{ key: 'trainingDesign', label: '是否实训设计', value: false, type: 'checkbox' },
- { key: 'hasLpf', label: '是否有大客流', value: false, type: 'checkbox' }
+ { key: 'hasLpf', label: '是否有大客流', value: false, type: 'checkbox' },
+ { key: 'hasVoice', label: '是否有语音指令', value: false, type: 'checkbox' }
],
endTableData: [
{ key: 'DEFAULT_MEMBER', label: '默认仿真成员', value: '', type: 'select', optionList: [] },
@@ -359,7 +360,8 @@ export default {
{ key: 'client', label: '初始客户端', value: '', type: 'select', optionList: this.clientList},
{ key: 'hasTraining', label: '是否有实训', value: false, type: 'checkbox'},
{ key: 'hasExam', label: '是否有考试', value: false, type: 'checkbox' },
- { key: 'trainingDesign', label: '是否实训设计', value: false, type: 'checkbox' }
+ { key: 'trainingDesign', label: '是否实训设计', value: false, type: 'checkbox' },
+ { key: 'hasVoice', label: '是否有语音指令', value: false, type: 'checkbox' }
];
this.endTableData = [
{ key: 'DEFAULT_MEMBER', label: '默认仿真成员', value: '', type: 'select', optionList: [] },
From 2caebf5d2093b4a2e695c08c1853dc9d409e90b2 Mon Sep 17 00:00:00 2001
From: fan
Date: Mon, 7 Nov 2022 16:37:26 +0800
Subject: [PATCH 09/14] =?UTF-8?q?=E7=BA=BF=E8=B7=AF=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=E6=89=B9=E9=87=8F=E7=94=9F=E6=88=90=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/publish/publishMap/subsystem.vue | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/views/publish/publishMap/subsystem.vue b/src/views/publish/publishMap/subsystem.vue
index 79c4de377..fd552f5b0 100644
--- a/src/views/publish/publishMap/subsystem.vue
+++ b/src/views/publish/publishMap/subsystem.vue
@@ -219,6 +219,13 @@ export default {
this.$refs.ruleForm.validate((valid) => {
if (valid) {
generateMapFunctionNew(this.$route.query.mapId, this.form).then(resp => {
+ if (resp.data && resp.data.length) {
+ let message = '';
+ resp.data.forEach(item => {
+ message = message + item + ';';
+ });
+ this.$messageBox(message);
+ }
this.reloadTable();
this.doCloseGenerate();
}).catch(error => {
From fe68d15acf469a34ffb933c92cb3816f88c2bad8 Mon Sep 17 00:00:00 2001
From: fan
Date: Mon, 7 Nov 2022 18:00:26 +0800
Subject: [PATCH 10/14] =?UTF-8?q?=E5=A4=A7=E5=AE=A2=E6=B5=81=E8=AE=A2?=
=?UTF-8?q?=E9=98=85=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/permission.js | 1 -
src/utils/stomp.js | 3 +++
src/views/newMap/display/flowData.vue | 17 ++++++++++-------
src/views/newMap/display/terminals/index.vue | 5 +++++
.../terminals/largePassengerStrategy.vue | 17 +++++++++--------
5 files changed, 27 insertions(+), 16 deletions(-)
diff --git a/src/permission.js b/src/permission.js
index 47e9b90d7..9eece9784 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -63,7 +63,6 @@ function handleRoute(to, next, loginPath) {
// 除没有动态改变权限的需求可直接next() 删下方权限判断
if (to.path === '/404' && to.redirectedFrom === '/') {
const project = getSessionStorage('project');
- console.log(localStore.get('trainingPlatformRoute' + store.getters.id + project, '-------------'));
next(localStore.get('trainingPlatformRoute' + store.getters.id + project) || '/trainingPlatform');
} else {
next();
diff --git a/src/utils/stomp.js b/src/utils/stomp.js
index 69df0b34c..664821d4a 100644
--- a/src/utils/stomp.js
+++ b/src/utils/stomp.js
@@ -56,6 +56,9 @@ export function getTopic(type, group, param) {
case 'COMMON':
topic = `/user/queue/simulation/${group}`;
break;
+ case 'LPF':
+ topic = `/user/queue/simulation/passenger/${group}`;
+ break;
}
return topic;
diff --git a/src/views/newMap/display/flowData.vue b/src/views/newMap/display/flowData.vue
index 96c02d0ec..2c3d0c459 100644
--- a/src/views/newMap/display/flowData.vue
+++ b/src/views/newMap/display/flowData.vue
@@ -138,16 +138,19 @@ export default {
this.flowDataShow = true;
this.isDisabled = true;
const simulationWorkParam = this.$store.state.socket.simulationWorkParam;
- if (simulationWorkParam && simulationWorkParam.itemMap && simulationWorkParam.itemMap.LPF) {
- const currentFlowData = this.flowDataList.find(each=>{ return each.id == simulationWorkParam.itemMap.LPF; });
- if (currentFlowData) {
- this.currentFlowDataId = currentFlowData.id;
- this.currentFlowDataName = currentFlowData.name;
- }
- } else {
+ if (this.currentFlowDataName) {
const currentFlowData = this.flowDataList.find(each=>{ return each.name == this.currentFlowDataName; });
if (currentFlowData) { this.currentFlowDataId = currentFlowData.id; }
+ } else {
+ if (simulationWorkParam && simulationWorkParam.itemMap && simulationWorkParam.itemMap.LPF) {
+ const currentFlowData = this.flowDataList.find(each=>{ return each.id == simulationWorkParam.itemMap.LPF; });
+ if (currentFlowData) {
+ this.currentFlowDataId = currentFlowData.id;
+ this.currentFlowDataName = currentFlowData.name;
+ }
+ }
}
+
}
},
clearSubscribe() {
diff --git a/src/views/newMap/display/terminals/index.vue b/src/views/newMap/display/terminals/index.vue
index 18630c6ef..738dbd076 100644
--- a/src/views/newMap/display/terminals/index.vue
+++ b/src/views/newMap/display/terminals/index.vue
@@ -165,6 +165,9 @@ export default {
case 'CTC':
creatSubscribe(getTopic(type, this.group), header, defaultCallback);
break;
+ case 'LPF':
+ creatSubscribe(getTopic(type, this.group), header, defaultCallback);
+ break;
}
// creatSubscribe(`${displayTopic}\/${this.group}`, header, defaultCallback);
// creatSubscribe(getTopic('STATE', this.group), header, stateCallback);
@@ -191,6 +194,8 @@ export default {
this.$nextTick(() => { this.$refs.jl3dDrive.show(this.mapId, this.group); this.mapViewLoaded(true); });
} else if (val === 'trafficTerminal') {
this.$nextTick(() => { this.subscribe('CTC'); });
+ } else if (val === 'largePassengerView') {
+ this.$nextTick(() => { this.subscribe('LPF'); });
}
this.$nextTick(() => { this.loading = false; });
},
diff --git a/src/views/newMap/display/terminals/largePassengerStrategy.vue b/src/views/newMap/display/terminals/largePassengerStrategy.vue
index 24cb3a5fa..3e11ae403 100644
--- a/src/views/newMap/display/terminals/largePassengerStrategy.vue
+++ b/src/views/newMap/display/terminals/largePassengerStrategy.vue
@@ -56,8 +56,8 @@
import echarts from 'echarts';
import { mapGetters } from 'vuex';
// import { clearSimulation } from '@/api/simulation';
-import { creatSubscribe, clearSubscribe, LPFTopic} from '@/utils/stomp';
-import { getToken } from '@/utils/auth';
+import { clearSubscribe, LPFTopic} from '@/utils/stomp';
+// import { getToken } from '@/utils/auth';
import { loadMapDataById } from '@/utils/loaddata';
export default {
name:'BigLPFStrategy',
@@ -167,7 +167,7 @@ export default {
}
});
this.loadInitData();
- this.subscribe();
+ // this.subscribe();
},
'$store.state.socket.standPfiNum':function(val) {
if (val) {
@@ -199,11 +199,12 @@ export default {
loadMapDataById(this.$route.query.mapId, 'parse');
},
methods:{
- async subscribe() {
- this.clearSubscribe();
- const header = { group: this.group || '', 'X-Token': getToken() };
- creatSubscribe(`${LPFTopic}\/${this.$route.query.group}`, header);
- },
+ // async subscribe() {
+ // this.clearSubscribe();
+ // const header = { group: this.group || '', 'X-Token': getToken() };
+ // creatSubscribe(`${LPFTopic}\/${this.$route.query.group}`, header);
+ // console.log('----------------');
+ // },
clearSubscribe() {
clearSubscribe(`${LPFTopic}\/${this.group}`);
},
From 8b45548a55ff732fdfcf03806d0021ef5ad2dfd1 Mon Sep 17 00:00:00 2001
From: dong <58670809@qq.com>
Date: Mon, 7 Nov 2022 18:17:22 +0800
Subject: [PATCH 11/14] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../newMap/display/voiceChatBox/chatSetting.vue | 7 ++++---
src/views/newMap/display/voiceChatBox/index.vue | 12 +++++++-----
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/src/views/newMap/display/voiceChatBox/chatSetting.vue b/src/views/newMap/display/voiceChatBox/chatSetting.vue
index 9a996c089..7ec309380 100644
--- a/src/views/newMap/display/voiceChatBox/chatSetting.vue
+++ b/src/views/newMap/display/voiceChatBox/chatSetting.vue
@@ -72,11 +72,12 @@ export default {
diff --git a/src/views/newMap/display/trainingList/index.vue b/src/views/newMap/display/trainingList/index.vue
deleted file mode 100644
index 250e38ba4..000000000
--- a/src/views/newMap/display/trainingList/index.vue
+++ /dev/null
@@ -1,235 +0,0 @@
-
-
-
-
- {{ `当前实训名称:${training.name || ''}` }}
- {{ `当前实训描述:${training.description || ''}` }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/newMap/display/trainingList/trainingMenu.vue b/src/views/newMap/display/trainingList/trainingMenu.vue
index ee36f6d97..2f13bc277 100644
--- a/src/views/newMap/display/trainingList/trainingMenu.vue
+++ b/src/views/newMap/display/trainingList/trainingMenu.vue
@@ -78,8 +78,6 @@ import { clearSimulation } from '@/api/simulation';
import { startTraining, endTraining } from '@/api/jmap/training';
import ScenePlayRole from './scenePlayRole';
import { getPublishSingleList, getPublishTrainingDetail, loadPublishTraining, getPublishScenesList } from '@/api/jmap/training';
-import Cookies from 'js-cookie';
-import ConstConfig from '@/scripts/ConstConfig';
export default {
name: 'TipTrainingDetail',
components: {
@@ -99,6 +97,7 @@ export default {
TrainingMode: ScriptMode,
activeName: 'first',
showMenu: false,
+ scoreList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
@@ -109,14 +108,6 @@ export default {
reset: true,
show:false
},
- prdTypeMap: {
- DISPATCHER: '02',
- STATION_SUPERVISOR: '01',
- STATION_ASSISTANT: '01',
- DEPOT_DISPATCHER: '09',
- DRIVER: '04',
- RAIL_CTC: '10'
- },
queryList: {
query: this.queryFunction,
selectCheckShow: false,
@@ -132,13 +123,6 @@ export default {
title: this.$t('trainingManage.description'),
prop: 'description'
},
- {
- title: this.$t('trainingManage.type'),
- prop: 'type',
- type: 'tag',
- columnValue: (row) => { return this.covertData(row); },
- tagType: (row) => { return ''; }
- },
{
title: this.$t('trainingManage.labelJson'),
prop: 'labelJson'
@@ -172,13 +156,6 @@ export default {
title: this.$t('trainingManage.description'),
prop: 'description'
},
- {
- title: this.$t('trainingManage.type'),
- prop: 'type',
- type: 'tag',
- columnValue: (row) => { return this.covertData(row); },
- tagType: (row) => { return ''; }
- },
{
title: this.$t('trainingManage.labelJson'),
prop: 'labelJson'
@@ -196,16 +173,15 @@ export default {
]
}
]
- }
+ },
+ playerId: '',
+ trainingScore: 0
};
},
computed: {
trainingSwitch() {
return this.$store.state.trainingNew.trainingSwitch;
},
- trainingScore() {
- return this.$store.state.trainingNew.trainingScore;
- },
trainingDetail() {
return this.$store.state.trainingNew.trainingDetail;
},
@@ -222,14 +198,21 @@ export default {
watch: {
'$store.state.trainingNew.stepOrder': function(val) {
const stepList = JSON.parse(this.$store.state.trainingNew.trainingDetail.stepJson);
+ const scoringRule = JSON.parse(this.$store.state.trainingNew.trainingDetail.scoringRuleJson);
+ const rule = scoringRule.find(rule => rule.memberId == this.playerId);
+ if (rule.details && stepList[val - 1]) {
+ const scoreRule = rule.details.find(item => item.elementId == stepList[val - 1].id );
+ this.scoreList.push(scoreRule);
+ this.trainingScore += scoreRule.score;
+ console.log(this.scoreList, this.trainingScore, rule, scoreRule, stepList[val - 1].id, scoreRule.score, scoreRule.elementId);
+ }
if (val >= 1 && val < stepList.length) {
const msg = {content:stepList[val].description, memberId:stepList[val].memberId};
- this.$store.dispatch('socket/setTrainingStepTip', msg);
+ this.$store.dispatch('trainingNew/setTrainingStepTip', msg);
} else {
- this.$store.dispatch('socket/setTrainingStepTip', null);
+ this.$store.dispatch('trainingNew/setTrainingStepTip', null);
val && this.$store.dispatch('socket/trainingOverCountIncrease');
}
- // operateOrder;
}
},
mounted() {
@@ -270,21 +253,21 @@ export default {
this.$store.dispatch('trainingNew/changeTeachMode', this.demoMode);
startTraining(this.group, {mode: this.demoMode}).then(() => {
this.$store.dispatch('trainingNew/trainingStart');
- this.$store.dispatch('trainingNew/setTrainingScore', '');
const stepList = JSON.parse(this.$store.state.trainingNew.trainingDetail.stepJson);
const msg = {content:stepList[0].description, memberId:stepList[0].memberId};
- this.$store.dispatch('socket/setTrainingStepTip', msg);
+ this.$store.dispatch('trainingNew/setTrainingStepTip', msg);
}).catch(() => {
this.$message.error('开始实训失败!');
});
},
handlerEnd() {
- endTraining(this.group).then((resp) => {
+ endTraining(this.group, { scoreList: this.scoreList }).then((resp) => {
this.$store.dispatch('trainingNew/trainingEnd');
- this.$store.dispatch('socket/clearTrainingStepTip');
+ this.$store.dispatch('trainingNew/clearTrainingStepTip');
this.$store.dispatch('trainingNew/clearStepOrder');
this.$store.dispatch('trainingNew/clearOperateOrder');
- this.$store.dispatch('trainingNew/setTrainingScore', resp.data);
+ this.scoreList = [];
+ this.trainingScore = 0;
}).catch(() => {
this.$message.error('结束实训失败!');
});
@@ -312,41 +295,22 @@ export default {
const mapLocation = JSON.parse(detailResp.data.mapLocationJson);
this.$jlmap.updateTransform(mapLocation.scale, {x:mapLocation.x, y:mapLocation.y});
}
+ this.playerId = '';
if (detailResp.data.playerIdJson) {
- const playerId = JSON.parse(detailResp.data.playerIdJson)[0];
- if (playerId) {
- const member = this.$store.state.training.memberData[playerId];
- this.$store.dispatch('training/setPrdType', this.prdTypeMap[member.type]);
- this.$store.dispatch('training/setRoles', member.type);
- }
+ this.playerId = JSON.parse(detailResp.data.playerIdJson)[0];
+ // if (playerId) {
+ // const member = this.$store.state.training.memberData[playerId];
+ // this.$store.dispatch('training/setPrdType', this.prdTypeMap[member.type]);
+ // this.$store.dispatch('training/setRoles', member.type);
+ // }
}
+ this.showMenu = true;
this.$store.dispatch('trainingNew/setTrainingDetail', detailResp.data);
- this.$store.dispatch('trainingNew/setTrainingScore', '');
await loadPublishTraining(this.group, data.id, {mode: this.teachMode});
this.$message.success('加载实训成功!');
} catch (e) {
this.$message.error('加载实训失败!');
}
- },
- covertData(row) {
- const releaseReview = ConstConfig.ConstSelect.trainingType;
- const lastData = Object.assign({}, row);
- if (Cookies.get('user_lang') == 'en') {
- releaseReview.forEach(function(element) {
- const rolename = element.value;
- if (lastData.type == rolename) {
- lastData.type = element.enlabel;
- }
- });
- } else {
- releaseReview.forEach(function(element) {
- const rolename = element.value;
- if (lastData.type == rolename) {
- lastData.type = element.label;
- }
- });
- }
- return lastData.type;
}
}
};
diff --git a/src/views/newMap/display/trainingList/trainingPositionTip.vue b/src/views/newMap/display/trainingList/trainingPositionTip.vue
index 230062398..5b9377505 100644
--- a/src/views/newMap/display/trainingList/trainingPositionTip.vue
+++ b/src/views/newMap/display/trainingList/trainingPositionTip.vue
@@ -38,7 +38,7 @@ export default {
}
},
watch: {
- '$store.state.socket.trainingStepTip': function(val) {
+ '$store.state.trainingNew.trainingStepTip': function(val) {
if (val && this.trainingDetail.type === 'SINGLE') {
const member = this.$store.state.training.memberData[val.memberId];
this.$nextTick(function() {
@@ -83,7 +83,7 @@ export default {
if (steps && steps.length) {
const step = steps[stepOrder];
const distance = 5;
- this.tip = this.$store.state.socket.trainingStepTip ? this.$store.state.socket.trainingStepTip.content : '';
+ this.tip = this.$store.state.trainingNew.trainingStepTip ? this.$store.state.trainingNew.trainingStepTip.content : '';
if (step && step.tipPosition && step.tipPosition.deviceCode) {
const position = this.getShapeTipPoint(step.tipPosition);
if (position) {
diff --git a/src/views/newMap/display/trainingList/trainingTip.vue b/src/views/newMap/display/trainingList/trainingTip.vue
index 1272dba96..014ec9e16 100644
--- a/src/views/newMap/display/trainingList/trainingTip.vue
+++ b/src/views/newMap/display/trainingList/trainingTip.vue
@@ -21,7 +21,7 @@ export default {
}
},
watch: {
- '$store.state.socket.trainingStepTip': function(val) {
+ '$store.state.trainingNew.trainingStepTip': function(val) {
if (val && this.trainingDetail.type === 'SCENE') {
const member = this.$store.state.training.memberData[val.memberId];
this.$nextTick(function() {