Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
8370b0cbd2
@ -207,7 +207,7 @@ import StepDescription from './stepDescription';
|
|||||||
// import OperateStatistic from './operateStatistic';
|
// import OperateStatistic from './operateStatistic';
|
||||||
import {covertOperate} from '@/views/newMap/displayNew/scriptDisplay/component/covertOperation';
|
import {covertOperate} from '@/views/newMap/displayNew/scriptDisplay/component/covertOperation';
|
||||||
import {updateCompetitionPracticalStep, getCompetitionPracticalSceneById} from '@/api/competition';
|
import {updateCompetitionPracticalStep, getCompetitionPracticalSceneById} from '@/api/competition';
|
||||||
import {getPublishMapDetailById} from '@/api/jmap/map';
|
import { loadNewMapDataByMapId } from '@/utils/loaddata';
|
||||||
export default {
|
export default {
|
||||||
name:'ModifyStep',
|
name:'ModifyStep',
|
||||||
components:{
|
components:{
|
||||||
@ -299,10 +299,11 @@ export default {
|
|||||||
this.stepVOs = stepVOs;
|
this.stepVOs = stepVOs;
|
||||||
});
|
});
|
||||||
// 加载地图数据
|
// 加载地图数据
|
||||||
getPublishMapDetailById(res.data.mapId).then(resp => {
|
loadNewMapDataByMapId(res.data.mapId).then(() => {
|
||||||
this.$store.dispatch('map/setMapData', resp.data);
|
// this.$store.dispatch('map/setMapData', resp.data);
|
||||||
const stationMap = {};
|
const stationMap = {};
|
||||||
resp.data.stationList.forEach(station=>{
|
const stationList = this.$store.state.map.map.stationList;
|
||||||
|
stationList.forEach(station=>{
|
||||||
stationMap[station.code] = station;
|
stationMap[station.code] = station;
|
||||||
});
|
});
|
||||||
let lastData = JSON.stringify(res.data.memberList);
|
let lastData = JSON.stringify(res.data.memberList);
|
||||||
@ -349,7 +350,9 @@ export default {
|
|||||||
covert(element) {
|
covert(element) {
|
||||||
const member = this.memberList[element.memberId];
|
const member = this.memberList[element.memberId];
|
||||||
let resultData = '';
|
let resultData = '';
|
||||||
if (element.type == 'Conversation') {
|
if (element.type == 'Accept_Conversation_Invitation') {
|
||||||
|
resultData = member.label + '请接受会话邀请';
|
||||||
|
} else if (element.type == 'Conversation') {
|
||||||
resultData = member.label + '说:' + element.content;
|
resultData = member.label + '说:' + element.content;
|
||||||
} else if (element.type == 'Operation') {
|
} else if (element.type == 'Operation') {
|
||||||
resultData = covertOperate(element.operationType, element.operationParamMap);
|
resultData = covertOperate(element.operationType, element.operationParamMap);
|
||||||
@ -360,11 +363,19 @@ export default {
|
|||||||
} else if (element.type == 'Start_Conversation' ) {
|
} else if (element.type == 'Start_Conversation' ) {
|
||||||
const inviteMember = [];
|
const inviteMember = [];
|
||||||
// this.$emit('allowCreatCoversition');
|
// this.$emit('allowCreatCoversition');
|
||||||
element.conversationMemberIds.forEach(id=>{
|
if (element.communicationObject) {
|
||||||
if (element.memberId != id) {
|
if (element.communicationObject == 'ALL_STATION') {
|
||||||
inviteMember.push((this.memberList[id] || {label: ''}).label);
|
inviteMember.push('所有车站');
|
||||||
|
} else if (element.communicationObject == 'ALL_TRAIN') {
|
||||||
|
inviteMember.push('所有司机');
|
||||||
}
|
}
|
||||||
});
|
} else {
|
||||||
|
element.conversationMemberIds.forEach(id=>{
|
||||||
|
if (element.memberId != id) {
|
||||||
|
inviteMember.push((this.memberList[id] || {label: ''}).label);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
resultData = member.label + '创建会话,选择' + inviteMember.toString();
|
resultData = member.label + '创建会话,选择' + inviteMember.toString();
|
||||||
} else if (element.type == 'Command') {
|
} else if (element.type == 'Command') {
|
||||||
const targetName = this.memberList[element.commandInitiateVO.targetMemberId];
|
const targetName = this.memberList[element.commandInitiateVO.targetMemberId];
|
||||||
|
@ -58,6 +58,7 @@ export default {
|
|||||||
{type: '供电系统故障', scene: '接触轨(网)断电'},
|
{type: '供电系统故障', scene: '接触轨(网)断电'},
|
||||||
{type: '供电系统故障', scene: '车站照明熄灭影响乘降'},
|
{type: '供电系统故障', scene: '车站照明熄灭影响乘降'},
|
||||||
{type: '车站机电设备故障', scene: '站台门故障'},
|
{type: '车站机电设备故障', scene: '站台门故障'},
|
||||||
|
{type: '限速', scene: '列车限速'},
|
||||||
{type: '轨道故障', scene: '线路故障影响列车运行'}
|
{type: '轨道故障', scene: '线路故障影响列车运行'}
|
||||||
],
|
],
|
||||||
deputySceneData: [
|
deputySceneData: [
|
||||||
@ -82,7 +83,10 @@ export default {
|
|||||||
this.mainSceneData[4].id = each.id;
|
this.mainSceneData[4].id = each.id;
|
||||||
} else if (each.name == '场景9') {
|
} else if (each.name == '场景9') {
|
||||||
this.mainSceneData[6].id = each.id;
|
this.mainSceneData[6].id = each.id;
|
||||||
|
} else if (each.name == '场景10') {
|
||||||
|
this.mainSceneData[7].id = each.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
/>
|
/>
|
||||||
<menu-dispather-contest v-if="isContest" ref="menuDispatherContest" :offset="offset" :offset-bottom="offsetBottom" :data-error="dataError" :text-status-height="textStatusHeight" />
|
<menu-dispather-contest v-if="isContest" ref="menuDispatherContest" :offset="offset" :offset-bottom="offsetBottom" :data-error="dataError" :text-status-height="textStatusHeight" />
|
||||||
</template>
|
</template>
|
||||||
<menu-train-list v-if="isDemon" @setCenter="setCenter" />
|
<menu-train-list v-if="isDemon||isContest" @setCenter="setCenter" />
|
||||||
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
|
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -51,11 +51,11 @@ export const operateEnum = {
|
|||||||
Section_Set_Limit_Speed:{
|
Section_Set_Limit_Speed:{
|
||||||
code:'speedLimitValue',
|
code:'speedLimitValue',
|
||||||
name:'限速值为'
|
name:'限速值为'
|
||||||
},
|
|
||||||
Section_Cancel_Limit_Speed:{
|
|
||||||
code:'speedLimitValue',
|
|
||||||
name:'限速值为'
|
|
||||||
}
|
}
|
||||||
|
// Section_Cancel_Limit_Speed:{
|
||||||
|
// code:'speedLimitValue',
|
||||||
|
// name:'限速值为'
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
ControlConvertMenu:{
|
ControlConvertMenu:{
|
||||||
CM_Apply_For_Station_Control:{
|
CM_Apply_For_Station_Control:{
|
||||||
@ -142,12 +142,34 @@ export const operateEnum = {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Train:{
|
TrainWindow:{
|
||||||
code:'groupNumber',
|
code:'groupNumber',
|
||||||
type:'列车',
|
type:'列车',
|
||||||
Train_Set_Plan:{
|
Train_Set_Plan:{
|
||||||
code:'serviceNumber',
|
isList:true,
|
||||||
name:'服务号'
|
params:[
|
||||||
|
{
|
||||||
|
code:'serviceNumber',
|
||||||
|
name:'服务号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code:'tripNumber',
|
||||||
|
name:'车次号'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
Train_Set_Head:{
|
||||||
|
isList:true,
|
||||||
|
params:[
|
||||||
|
{
|
||||||
|
code:'serviceNumber',
|
||||||
|
name:'服务号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code:'destinationCode',
|
||||||
|
name:'目的地号'
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -182,6 +204,21 @@ export function covertOperate(operationType, operationParamMap) {
|
|||||||
if (device == 'CM') {
|
if (device == 'CM') {
|
||||||
device = 'ControlConvertMenu';
|
device = 'ControlConvertMenu';
|
||||||
}
|
}
|
||||||
|
const list = ['Train_Update_Type',
|
||||||
|
'Train_Add_Train_Trace',
|
||||||
|
'Train_Remove_Train_Trace',
|
||||||
|
'Train_Move_Train_Trace',
|
||||||
|
'Train_Set_Plan',
|
||||||
|
'Train_Set_Head',
|
||||||
|
'Train_Set_Manual',
|
||||||
|
'Train_Set_Crew_Number',
|
||||||
|
'Train_Tag_Atp_Cut',
|
||||||
|
'Train_Tag_Atp_Recover',
|
||||||
|
'Train_Allow_Pass',
|
||||||
|
'Train_Info'];
|
||||||
|
if (list.includes(operationType)) {
|
||||||
|
device = 'TrainWindow';
|
||||||
|
}
|
||||||
const operateName = Object.values(CMD[device]).find(res=>{ return res.value == operationType; });
|
const operateName = Object.values(CMD[device]).find(res=>{ return res.value == operationType; });
|
||||||
const deviceInfo = covertOperation(device, operationParamMap, operationType);
|
const deviceInfo = covertOperation(device, operationParamMap, operationType);
|
||||||
let tip = '请';
|
let tip = '请';
|
||||||
@ -211,7 +248,13 @@ function covertOperation(deviceType, operationParamMap, operationType) {
|
|||||||
deviceName += '【' + operateEnum[deviceType].type + ' ' + parentSection.name + '-' + device.name + '】';
|
deviceName += '【' + operateEnum[deviceType].type + ' ' + parentSection.name + '-' + device.name + '】';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
deviceName += '【' + operateEnum[deviceType].type + ' ' + device.name + '】';
|
let deviceNameIn = '';
|
||||||
|
if (device.name) {
|
||||||
|
deviceNameIn = device.name;
|
||||||
|
} else {
|
||||||
|
deviceNameIn = '(车组号:' + device.groupNumber + ')';
|
||||||
|
}
|
||||||
|
deviceName += '【' + operateEnum[deviceType].type + ' ' + deviceNameIn + '】';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const paramInfo = operateEnum[deviceType][operationType];
|
const paramInfo = operateEnum[deviceType][operationType];
|
||||||
@ -239,27 +282,32 @@ function covertOperation(deviceType, operationParamMap, operationType) {
|
|||||||
params.forEach((param, index)=>{
|
params.forEach((param, index)=>{
|
||||||
paramName += ' ' + param.name;
|
paramName += ' ' + param.name;
|
||||||
const data = operationParamMap[param.code];
|
const data = operationParamMap[param.code];
|
||||||
param.result.forEach(result=>{
|
if (param.result) {
|
||||||
switch (result.judge) {
|
param.result.forEach(result=>{
|
||||||
case '=': {
|
switch (result.judge) {
|
||||||
if (data == result.data) {
|
case '=': {
|
||||||
paramName += '为' + result.name;
|
if (data == result.data) {
|
||||||
if (result.showUnit) {
|
paramName += '为' + result.name;
|
||||||
paramName += ',值为' + data + result.showUnit;
|
if (result.showUnit) {
|
||||||
|
paramName += ',值为' + data + result.showUnit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
break;
|
} case '>': {
|
||||||
} case '>': {
|
if (data > result.data) {
|
||||||
if (data > result.data) {
|
paramName += '为' + result.name;
|
||||||
paramName += '为' + result.name;
|
if (result.showUnit) {
|
||||||
if (result.showUnit) {
|
paramName += ',值为' + data + result.showUnit;
|
||||||
paramName += ',值为' + data + result.showUnit;
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
}
|
});
|
||||||
}
|
} else {
|
||||||
});
|
paramName += ',值为' + data;
|
||||||
|
}
|
||||||
|
|
||||||
if (index != params.length - 1) {
|
if (index != params.length - 1) {
|
||||||
paramName += ',';
|
paramName += ',';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user