【标准一号线】强制站控提示位置有问题

This commit is contained in:
fan 2022-12-15 14:47:40 +08:00
parent 2339cbc8c7
commit 0f2a40b6cb
10 changed files with 45 additions and 26 deletions

View File

@ -153,11 +153,13 @@ export default {
'$store.state.map.controlTransfer':function (controlTransferList) {
controlTransferList.forEach(controlTransfer=>{
this.updateTableValue(controlTransfer);
if (controlTransfer.applicantId && controlTransfer.applicantId == this.$store.state.training.myMemberId && this.$store.state.map.picture === 'localWork') {
this.$emit('warningInfoDoShow', controlTransfer);
}
});
},
'$store.state.socket.controlTransfer': function(val) {
if (val && val.applicantId == this.$store.state.training.myMemberId && this.$store.state.map.picture === 'localWork') {
this.$emit('warningInfoDoShow', val);
}
},
//
tableData: {
handler(val, oldVal) {

View File

@ -83,7 +83,7 @@ export default {
},
computed: {
closeAlarm() {
return OperationEvent.Command.close.alarm;
return OperationEvent.StationControl.requestStationControl.awaitAlarm;
}
},
methods: {
@ -91,7 +91,7 @@ export default {
const operate = {
cancel: true,
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Command.close.alarm.operation
operation: this.closeAlarm.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
@ -100,7 +100,7 @@ export default {
});
},
doShow(info) {
const station = this.$store.getters['map/getDeviceByCode'](info.code);
const station = this.$store.getters['map/getDeviceByCode'](info.stationCode);
this.stationName = station.name;
this.time = parseTime(this.$store.state.training.initTime);
this.show = true;

View File

@ -161,14 +161,13 @@ export default {
'$store.state.map.controlTransfer':function (controlTransferList) {
controlTransferList.forEach(controlTransfer=>{
this.updateTableValue(controlTransfer);
if (controlTransfer.applicantId && this.$store.state.training.memberData[controlTransfer.applicantId] &&
this.$store.state.training.memberData[controlTransfer.applicantId].userId == this.$store.state.user.id &&
this.work === 'localWork'
) {
this.$emit('warningInfoDoShow', controlTransfer);
}
});
},
'$store.state.socket.controlTransfer': function(val) {
if (val && val.applicantId == this.$store.state.training.myMemberId && this.$store.state.map.picture === 'localWork') {
this.$emit('warningInfoDoShow', val);
}
},
//
tableData: {
handler(val, oldVal) {

View File

@ -83,7 +83,7 @@ export default {
},
computed: {
closeAlarm() {
return OperationEvent.Command.close.alarm;
return OperationEvent.StationControl.requestStationControl.awaitAlarm;
}
},
methods: {
@ -91,7 +91,7 @@ export default {
const operate = {
cancel: true,
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Command.close.alarm.operation
operation: this.closeAlarm.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
@ -100,7 +100,7 @@ export default {
});
},
doShow(info) {
const station = this.$store.getters['map/getDeviceByCode'](info.code);
const station = this.$store.getters['map/getDeviceByCode'](info.stationCode);
this.stationName = station.name;
this.time = parseTime(this.$store.state.training.initTime);
this.show = true;

View File

@ -1239,6 +1239,10 @@ export const OperationEvent = {
menuButton: {
operation: '2024',
domId: '_Tips-Control-Request-Menu{BOTTOM}'
},
awaitAlarm: {
operation: '2025',
domId: '_Tips-Control-Request-AwaitAlarm'
}
},
// 强行站控

View File

@ -117,7 +117,8 @@ const socket = {
endStationName: ''
},
simulationWorkParam: {},
conversationMessage: {}
conversationMessage: {},
controlTransfer: {}
},
getters: {
},
@ -385,6 +386,9 @@ const socket = {
},
setConversationMessage: (state, message) => {
state.conversationMessage = message;
},
setControlTransfer: (state, transfer) => {
state.controlTransfer = transfer;
}
},
@ -610,8 +614,10 @@ const socket = {
commit('setSimulationWorkParam', data);
},
setConversationMessage: ({ commit }, message) => {
console.log('----------------');
commit('setConversationMessage', message);
},
setControlTransfer: ({ commit }, transfer) => {
commit('setControlTransfer', transfer);
}
}
};

View File

@ -23,7 +23,7 @@ export function handlerUrl() {
let OSS_URL;
if (process.env.NODE_ENV === 'development') {
// 开发分支
BASE_API = 'http://192.168.3.233/rtss-server';
// BASE_API = 'http://192.168.3.233/rtss-server';
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://114.116.51.125/jlcloud';
@ -31,7 +31,7 @@ export function handlerUrl() {
// BASE_API = 'http://192.168.3.94:9000'; // 旭强
// BASE_API = 'http://192.168.3.15:9000'; // 张赛
// BASE_API = 'http://192.168.3.5:9000'; // 夏增彬
// BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛

View File

@ -183,6 +183,9 @@ function handle(data) {
case 'Simulation_Training_Audio_MATCH_RESULT':
store.dispatch('trainingNew/handleMatchVoice', msg);
break;
case 'Simulation_Control_Transfer_Result':
store.dispatch('socket/setControlTransfer', msg);
break;
}
}
// 仿真内部聊天

View File

@ -114,13 +114,11 @@ export default {
this.tagIndex = index;
},
backDesignPane() {
const tipPosition = {};
if (this.stepDetail.operations[this.tagIndex] && this.trainingType === 'SINGLE') {
this.stepDetail.tipPosition.domId = this.stepDetail.operations[this.tagIndex].domId;
this.stepDetail.tipPosition.deviceCode = this.stepDetail.operations[this.tagIndex].deviceCode;
this.stepDetail.tipPosition.operateIndex = this.tagIndex;
}
console.log(tipPosition, this.trainingType, '-------');
this.$emit('backDesignPane');
this.tagIndex = 0;
this.editMode = false;

View File

@ -10,7 +10,7 @@ import PopTip from './poptip';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import { getDomOffset } from '@/utils/index';
import { ScriptMode } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainingTips',
components: { PopTip },
@ -42,7 +42,8 @@ export default {
},
watch: {
'$store.state.trainingNew.stepInfo': function(val) {
if (val && this.trainingDetail && this.trainingDetail.type === 'SINGLE' && val.memberId == this.myMemberId) {
const awaitOperateFlag = val && val.tipPosition && val.tipPosition.domId === OperationEvent.StationControl.requestStationControl.awaitAlarm.operation;
if (val && this.trainingDetail && this.trainingDetail.type === 'SINGLE' && val.memberId == this.myMemberId && !awaitOperateFlag) {
this.tipInit();
} else {
this.tip = '';
@ -77,6 +78,13 @@ export default {
this.tipInit();
}
}, 10);
},
'$store.state.socket.controlTransfer': function(val) {
const stepInfo = this.$store.state.trainingNew.stepInfo;
const domId = OperationEvent.StationControl.requestStationControl.awaitAlarm.operation;
if (val && val.applicantId == this.$store.state.training.myMemberId && stepInfo && stepInfo.tipPosition && stepInfo.tipPosition.domId === domId) {
setTimeout(() => { this.tipInit(); }, 10);
}
}
},
methods: {
@ -181,14 +189,13 @@ export default {
} else if (this.tipAlignIsTop(tipPosition, domId)) {
align = 'top';
}
const width = align === 'right' ? 0 : btnDom.clientWidth / 2;
// const width = align === 'right' ? 0 : btnDom.clientWidth / 2;
resolve({
align: align,
x: offset.x + width,
x: offset.x + btnDom.clientWidth / 2,
y: offset.y
});
} else {
console.log('235s');
resolve(null);
}
} catch (err) {