Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
e897673742
@ -53,3 +53,11 @@ export function overConversationMessage(group, conversationMessageId) {
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
/** 发送会话文字 */
|
||||
export function sendConversationText (group, id, data) {
|
||||
return request({
|
||||
url: `/api/simulation/${group}/conversation/${id}/chat/text?`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
@disableQuery="disableQuery"
|
||||
@enableQuery="enableQuery"
|
||||
/>
|
||||
<el-card v-loading="loading">
|
||||
<el-card v-loading="loading" :style="{padding: cardPadding+'px'}">
|
||||
<el-table
|
||||
ref="table2"
|
||||
highlight-current-row
|
||||
@ -211,7 +211,11 @@ export default {
|
||||
queryList: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
cardPadding: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -141,6 +141,13 @@ function handle(state, data) {
|
||||
case 'Simulation_Alarm':
|
||||
state.simulationAlarmInfo = msg;
|
||||
break;
|
||||
case 'Simulation_Scenes_Reload':
|
||||
if (msg) {
|
||||
store.dispatch('training/start');
|
||||
} else {
|
||||
store.dispatch('training/over');
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
<el-button size="small" type="primary" class="createScript" style="margin-top: 5px" @click="handleCreate">{{ $t('scriptRecord.scriptCreate') }}</el-button>
|
||||
<el-button size="small" type="primary" class="createScript" @click="createByPublish">发布数据创建</el-button>
|
||||
</div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
|
||||
<QueryListPage ref="queryListPage" :cardPadding="50" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
|
||||
<create-ibp ref="createScript" :title="'创建数据'" @reloadTable="reloadTable" />
|
||||
<create-ibp ref="modifyScript" :title="'修改数据'" @reloadTable="reloadTable" />
|
||||
<copy-ibp ref="copyIbp" @reloadTable="reloadTable" />
|
||||
|
@ -9,7 +9,7 @@
|
||||
<el-button size="mini" type="primary" @click="lessonCreate">{{ $t('lesson.newConstruction') }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<QueryListPage ref="queryListPage" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
|
||||
<QueryListPage ref="queryListPage" :cardPadding="50" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
|
||||
<publish-create ref="publishCreate" @refresh="refresh" />
|
||||
<publish-lesson ref="publishLesson" @refresh="refresh" />
|
||||
<lesson-detail ref="lessonDetail" />
|
||||
|
@ -88,6 +88,8 @@
|
||||
</el-button>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-input v-if="isRecord" v-model="textContent" size="small" placeholder="请输入会话文字,点击T发送" style="width: 340px;margin-top: 10px;margin-left: 6px;" :rows="1" />
|
||||
<el-button v-if="isRecord" size="mini" class="chat-box-footer-create" style="right: 105px" :disabled="contentSend" @click="sendText">T</el-button>
|
||||
<el-button v-if="isButtonShow && !commonConversation" size="mini" type="danger" class="chat-box-footer-create chat-box-footer-quit" :disabled="audioPlay" :loading="quitLoading" @click="quitConversition()">
|
||||
<i class="el-icon-phone" />
|
||||
</el-button>
|
||||
@ -150,7 +152,7 @@ import ChatSetting from './chatSetting';
|
||||
import ChatContent from './chatContent';
|
||||
import ChatMemberList from './chatMemberList';
|
||||
import RecordRTC from 'recordrtc';
|
||||
import {sendSimulationConversition, startConversition, overSimulationConversition, getAllConversition, acceptConversitionInvite} from '@/api/chat';
|
||||
import {sendSimulationConversition, startConversition, overSimulationConversition, getAllConversition, acceptConversitionInvite, sendConversationText} from '@/api/chat';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
export default {
|
||||
name: 'ChatBox',
|
||||
@ -210,13 +212,17 @@ export default {
|
||||
commonMessageList: [],
|
||||
conversitionStateMap:{},
|
||||
myMemberId: '',
|
||||
audioPlay:false
|
||||
audioPlay:false,
|
||||
textContent: ''
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
isButtonShow() {
|
||||
return this.userRole != 'AUDIENCE';
|
||||
},
|
||||
contentSend() {
|
||||
return !this.textContent;
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
},
|
||||
@ -230,7 +236,6 @@ export default {
|
||||
return this.$store.state.user.id;
|
||||
},
|
||||
conversitionId() {
|
||||
// console.log(this.conversitionStateMap, this.myMemberId, this.conversitionStateMap[this.myMemberId], (this.conversitionStateMap[this.myMemberId] || {conversitionId:''}));
|
||||
return (this.conversitionStateMap[this.myMemberId] || {conversitionId:''}).conversitionId;
|
||||
},
|
||||
connect() {
|
||||
@ -241,6 +246,9 @@ export default {
|
||||
},
|
||||
privateMessageList() {
|
||||
return (this.conversitionStateMap[this.myMemberId] || {privateMessageList: []}).privateMessageList;
|
||||
},
|
||||
isRecord() {
|
||||
return !!this.$route.query.record;
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
@ -318,9 +326,6 @@ export default {
|
||||
if (activeTrainList.length <= 0) {
|
||||
this.resetCoversition();
|
||||
}
|
||||
// if (this.$refs.tree) {
|
||||
// this.$refs.tree.filter(this.queryMember);
|
||||
// }
|
||||
},
|
||||
'$store.state.training.simulationUserList': {
|
||||
handler(val, o) {
|
||||
@ -477,7 +482,10 @@ export default {
|
||||
},
|
||||
'$store.state.socket.simulationReset': function () { // 仿真重置
|
||||
this.conversitionStateMap = {};
|
||||
document.querySelector('#teleName').classList.remove('flash');
|
||||
const teleName = document.querySelector('#teleName');
|
||||
if (teleName) {
|
||||
teleName.classList.remove('flash');
|
||||
}
|
||||
document.querySelector('#teleRing').pause();
|
||||
},
|
||||
'$store.state.socket.acceptConversionInvite':function(val) {
|
||||
@ -764,10 +772,11 @@ export default {
|
||||
fd.append('file', blob);
|
||||
sendSimulationConversition(that.group, that.conversitionId, fd)
|
||||
.then((data) => {
|
||||
that.textContent = '';
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
this.$message.error('语音发送失败: ' + error.message);
|
||||
that.$message.error('语音发送失败: ' + error.message);
|
||||
});
|
||||
if (that.microphone) {
|
||||
that.microphone.stop();
|
||||
@ -777,6 +786,13 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
sendText() {
|
||||
sendConversationText(this.group, this.conversitionId, {content: this.textContent}).then(resp => {
|
||||
this.textContent = '';
|
||||
}).catch(() => {
|
||||
this.$message.error('发送会话文字失败');
|
||||
});
|
||||
},
|
||||
handleSetting() {
|
||||
this.$refs.chatSetting.doShow();
|
||||
},
|
||||
@ -985,15 +1001,11 @@ export default {
|
||||
},
|
||||
changeMessageList(data) {
|
||||
this.commonMessageList.push(data.message);
|
||||
// if (this.conversitionStateMap[data.message.memberId]) {
|
||||
// this.conversitionStateMap[data.message.memberId].privateMessageList.push(data.message);
|
||||
// }
|
||||
if (this.conversitionStateMap[data.message.memberId]) {
|
||||
(this.conversitionStateMap[data.message.memberId].privateMemberList || []).forEach(member => {
|
||||
this.conversitionStateMap[member.memberId] && this.conversitionStateMap[member.memberId].privateMessageList.push(data.message);
|
||||
});
|
||||
}
|
||||
// console.log(this.commonConversation, this.conversitionId, data.id, this.myMemberId, this.conversitionId === data.id, this.conversitionStateMap, '/////////////////////////');
|
||||
if (this.commonConversation) {
|
||||
this.messageList.push(data.message);
|
||||
} else if (!this.commonConversation && this.conversitionId === data.id) {
|
||||
@ -1029,8 +1041,9 @@ export default {
|
||||
resetCoversition() {
|
||||
this.commonMessageList = [];
|
||||
this.conversitionStateMap = {};
|
||||
this.messageList = this.commonMessageList;
|
||||
this.messageList = [];
|
||||
this.connectSuccess = false;
|
||||
this.$store.dispatch('scriptRecord/updateAudioPlay', false);
|
||||
this.treeData.forEach(item => {
|
||||
if (item.children) {
|
||||
const memberList = Object.values(item.children);
|
||||
|
@ -96,7 +96,6 @@ export default {
|
||||
this.isPlay = true;
|
||||
this.$store.dispatch('scriptRecord/updateAudioPlay', true);
|
||||
this.playAllAudio();
|
||||
//
|
||||
}
|
||||
}
|
||||
this.scrollTop();
|
||||
|
@ -149,7 +149,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isDisable: false,
|
||||
tryTime: 0, // 进入页面多少秒
|
||||
timeNow: 0, // 进入页面 相对时间
|
||||
time: null, // 定时器
|
||||
@ -198,6 +197,9 @@ export default {
|
||||
},
|
||||
scriptModeList() {
|
||||
return ScriptMode;
|
||||
},
|
||||
isDisable() {
|
||||
return this.$store.state.training.started;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -236,8 +238,6 @@ export default {
|
||||
const initTime = new Date(this.$store.state.training.initTime || null);
|
||||
const model = {initTime:this.formatTime(initTime)};
|
||||
this.start(model);
|
||||
} else {
|
||||
this.isDisable = true;
|
||||
}
|
||||
},
|
||||
isScriptLoad(val) {
|
||||
@ -292,9 +292,6 @@ export default {
|
||||
const ss = prefixIntrger(initTime.getSeconds(), 2);
|
||||
return `${hh}:${mm}:${ss}`;
|
||||
},
|
||||
initPlannedDriving(isDisable) {
|
||||
this.isDisable = isDisable;
|
||||
},
|
||||
loadInitData() {
|
||||
const data = {
|
||||
mapId: this.$route.query.mapId,
|
||||
@ -340,7 +337,6 @@ export default {
|
||||
});
|
||||
},
|
||||
start(model) { // 开始仿真
|
||||
this.isDisable = true;
|
||||
const data = {
|
||||
time: model.initTime
|
||||
};
|
||||
@ -350,7 +346,6 @@ export default {
|
||||
ranAsPlan(data, this.group).then(res => {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
|
||||
}).catch(error => {
|
||||
this.isDisable = false;
|
||||
if (error.code == '5001') {
|
||||
this.$messageBox(this.$t('error.mapDataError') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '5002') {
|
||||
@ -381,7 +376,6 @@ export default {
|
||||
this.$refs.demonMenu.hideScheduling(run);
|
||||
},
|
||||
end() {
|
||||
this.isDisable = false;
|
||||
exitRunPlan(this.group).then(() => {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||
@ -391,7 +385,6 @@ export default {
|
||||
});
|
||||
});
|
||||
}).catch(() => {
|
||||
this.isDisable = true;
|
||||
this.$messageBox(this.$t('display.demon.endSimulationFail'));
|
||||
});
|
||||
},
|
||||
@ -523,16 +516,16 @@ export default {
|
||||
}
|
||||
});
|
||||
if (currentPlayList.length > 0) {
|
||||
if (currentPlayList.length > 1) {
|
||||
this.currentPlayList = currentPlayList;
|
||||
this.$refs.selectRole.doShow();
|
||||
} else {
|
||||
const member = currentPlayList[0];
|
||||
const memberId = member.id;
|
||||
(this.$store.state.training.memberData[member.id] || {}).userId = this.$store.state.user.id;
|
||||
(this.$store.state.training.memberData[member.id] || {}).disabled = true;
|
||||
this.runScriptMode(memberId);
|
||||
}
|
||||
// if (currentPlayList.length > 1) {
|
||||
// this.currentPlayList = currentPlayList;
|
||||
// this.$refs.selectRole.doShow();
|
||||
// } else {
|
||||
const member = currentPlayList[0];
|
||||
const memberId = member.id;
|
||||
(this.$store.state.training.memberData[member.id] || {}).userId = this.$store.state.user.id;
|
||||
(this.$store.state.training.memberData[member.id] || {}).disabled = true;
|
||||
this.runScriptMode(memberId);
|
||||
// }
|
||||
}
|
||||
},
|
||||
runScriptMode(memberId) {
|
||||
|
@ -181,7 +181,7 @@ export default {
|
||||
setCenter(code) {
|
||||
this.$jlmap.setCenter(code);
|
||||
},
|
||||
// 设置 各个按钮的定位
|
||||
// 设置各个按钮的定位
|
||||
setPosition() {
|
||||
this.$nextTick(() => {
|
||||
this.offset = 10;
|
||||
@ -233,11 +233,8 @@ export default {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
|
||||
this.$store.dispatch('training/countTime');
|
||||
this.planRunning = resp.data.planRunning;
|
||||
|
||||
if (this.isDemon) {
|
||||
this.$refs.menuDemon.initPlannedDriving(this.planRunning); // 是否正在按计划行车
|
||||
} else if (this.isScript) {
|
||||
// this.$refs.menuScript.initPlannedDriving(resp.data.planRunning);
|
||||
if (resp.data.planRunning) {
|
||||
this.$store.commit('training/start');
|
||||
}
|
||||
} else if (resp && resp.code == 200 && resp.data && resp.data.dataError) {
|
||||
this.dataError = true;
|
||||
|
@ -98,7 +98,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isDisable: false,
|
||||
tryTime: 0, // 进入页面多少秒
|
||||
timeNow: 0, // 进入页面 相对时间
|
||||
time: null, // 定时器
|
||||
@ -140,6 +139,9 @@ export default {
|
||||
},
|
||||
projectDevice() {
|
||||
return this.$route.query.projectDevice;
|
||||
},
|
||||
isDisable() {
|
||||
return this.$store.state.training.started;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -210,9 +212,6 @@ export default {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
initPlannedDriving(isDisable) {
|
||||
this.isDisable = isDisable;
|
||||
},
|
||||
loadInitData() {
|
||||
const data = {
|
||||
mapId: this.$route.query.mapId,
|
||||
@ -239,7 +238,6 @@ export default {
|
||||
this.$refs.setTime.doShow();
|
||||
},
|
||||
start(model) { // 开始仿真
|
||||
this.isDisable = true;
|
||||
const data = {
|
||||
time: model.initTime
|
||||
};
|
||||
@ -249,7 +247,6 @@ export default {
|
||||
ranAsPlan(data, this.group).then(res => {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
|
||||
}).catch(error => {
|
||||
this.isDisable = false;
|
||||
if (error.code == '5001') {
|
||||
this.$messageBox(this.$t('error.mapDataError') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '5002') {
|
||||
@ -280,7 +277,6 @@ export default {
|
||||
this.$refs.demonMenu.hideScheduling(run);
|
||||
},
|
||||
end() {
|
||||
this.isDisable = false;
|
||||
exitRunPlan(this.group).then(() => {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||
@ -290,14 +286,12 @@ export default {
|
||||
});
|
||||
});
|
||||
}).catch(() => {
|
||||
this.isDisable = true;
|
||||
this.$messageBox(this.$t('display.demon.endSimulationFail'));
|
||||
});
|
||||
},
|
||||
handleQuitQuest() {
|
||||
quitScriptNew(this.group).then(resp => {
|
||||
getSimulationInfoNew(this.group).then((res)=>{
|
||||
this.isDisable = false;
|
||||
EventBus.$emit('clearRunSeries');
|
||||
this.quitQuest();
|
||||
this.initLoadPage();
|
||||
|
@ -51,6 +51,24 @@ export const operateEnum = {
|
||||
Section_Set_Limit_Speed:{
|
||||
code:'speedLimitValue',
|
||||
name:'限速值为'
|
||||
},
|
||||
Train_Load_Spare_Train:{
|
||||
isList:true,
|
||||
params:[
|
||||
{
|
||||
code:'groupNumber',
|
||||
name:'车组号'
|
||||
},
|
||||
{
|
||||
code:'right',
|
||||
name:'方向',
|
||||
function:judgeUpDown
|
||||
// result:[
|
||||
// {data:true, name:'右行', judge:'='},
|
||||
// {data:false, name:'左行', judge:'='}
|
||||
// ]
|
||||
}
|
||||
]
|
||||
}
|
||||
// Section_Cancel_Limit_Speed:{
|
||||
// code:'speedLimitValue',
|
||||
@ -58,7 +76,7 @@ export const operateEnum = {
|
||||
// }
|
||||
},
|
||||
ControlConvertMenu:{
|
||||
type:'控制模式',
|
||||
type:'系统/站遥控',
|
||||
CM_Apply_For_Station_Control:{
|
||||
code:'stationCodes',
|
||||
isList:true,
|
||||
@ -234,6 +252,9 @@ export function covertOperate(operationType, operationParamMap) {
|
||||
if (device == 'CM') {
|
||||
device = 'ControlConvertMenu';
|
||||
}
|
||||
if (operationType == 'Train_Load_Spare_Train') {
|
||||
device = 'Section';
|
||||
}
|
||||
const list = ['Train_Update_Type',
|
||||
'Train_Add_Train_Trace',
|
||||
'Train_Remove_Train_Trace',
|
||||
@ -363,7 +384,11 @@ function covertOperation(deviceType, operationParamMap, operationType) {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
paramName += ',值为' + data;
|
||||
if (param.function) {
|
||||
paramName += covertFunction(param.function, data);
|
||||
} else {
|
||||
paramName += ',值为' + data;
|
||||
}
|
||||
}
|
||||
|
||||
if (index != params.length - 1) {
|
||||
@ -403,3 +428,11 @@ function getStationResultById(stationResult) {
|
||||
return station.name + ' ' + param;
|
||||
}
|
||||
|
||||
function judgeUpDown(right) {
|
||||
if (store.state.map.mapConfig.upRight) {
|
||||
return right ? '上行' : '下行';
|
||||
} else {
|
||||
return right ? '下行' : '上行';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isDisable: false,
|
||||
isScriptCommand:false,
|
||||
isReplaceBg: false,
|
||||
userRole:''
|
||||
@ -123,7 +122,10 @@ export default {
|
||||
},
|
||||
isStation() {
|
||||
return this.$store.state.training.prdType == '01';
|
||||
}
|
||||
},
|
||||
isDisable() {
|
||||
return this.$store.state.training.started;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.scriptRecord.bgSet':function (val) {
|
||||
@ -161,7 +163,7 @@ export default {
|
||||
},
|
||||
'$store.state.scriptRecord.userRole':function (val) {
|
||||
this.userRole = val;
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
// this.clearAutoSave();
|
||||
@ -182,18 +184,13 @@ export default {
|
||||
selectBeginTime() {
|
||||
this.$refs.setTime.doShow();
|
||||
},
|
||||
resetBeginTime() {
|
||||
this.isDisable = false;
|
||||
},
|
||||
start(model) {
|
||||
this.isDisable = true;
|
||||
const data = {
|
||||
time: model.initTime
|
||||
};
|
||||
ranAsPlan(data, this.group).then(res => {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
|
||||
}).catch((error) => {
|
||||
this.isDisable = false;
|
||||
if (error.code == '5001') {
|
||||
this.$messageBox(this.$t('error.mapDataError') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '5002') {
|
||||
@ -218,7 +215,6 @@ export default {
|
||||
});
|
||||
},
|
||||
end() {
|
||||
this.isDisable = false;
|
||||
exitRunPlan(this.group).then(() => {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||
@ -228,7 +224,6 @@ export default {
|
||||
});
|
||||
});
|
||||
}).catch(() => {
|
||||
this.isDisable = true;
|
||||
this.$messageBox(this.$t('display.demon.endSimulationFail'));
|
||||
});
|
||||
},
|
||||
|
@ -352,12 +352,12 @@ export default {
|
||||
}
|
||||
},
|
||||
async simulationReset() {
|
||||
await this.$store.dispatch('socket/setSimulationStart');
|
||||
await this.$store.dispatch('map/clearJlmapTrainView');
|
||||
await this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
await this.$store.dispatch('training/over');
|
||||
await this.$store.dispatch('map/resetActiveTrainList');
|
||||
await this.$store.dispatch('socket/setSimulationReset'); // 清空
|
||||
await this.$store.dispatch('socket/setSimulationStart');
|
||||
await this.$store.dispatch('training/setMapDefaultState');
|
||||
},
|
||||
// 视图缩放事件
|
||||
|
@ -109,7 +109,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isDisable: false,
|
||||
backLoading: false,
|
||||
chatShow: true,
|
||||
jsStart: true,
|
||||
@ -161,6 +160,9 @@ export default {
|
||||
isDeviceLogin() {
|
||||
const typeList = ['LW', 'CW'];
|
||||
return typeList.includes(this.$route.query.type);
|
||||
},
|
||||
isDisable() {
|
||||
return this.$store.state.training.started;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -172,11 +174,6 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
'$store.state.training.started': function (val) {
|
||||
if (val) {
|
||||
this.isDisable = true;
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationOver':function(val) {
|
||||
if (val && this.project == 'refereeJsxt') {
|
||||
this.$router.go(-1);
|
||||
@ -284,7 +281,6 @@ export default {
|
||||
},
|
||||
// 开始仿真
|
||||
start(model) {
|
||||
this.isDisable = true;
|
||||
const data = {
|
||||
time: model.initTime
|
||||
};
|
||||
@ -294,7 +290,6 @@ export default {
|
||||
}
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
|
||||
}).catch((error) => {
|
||||
this.isDisable = false;
|
||||
if (error.code == '5001') {
|
||||
this.$messageBox(this.$t('error.mapDataError') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '5002') {
|
||||
@ -319,13 +314,11 @@ export default {
|
||||
});
|
||||
},
|
||||
end() {
|
||||
this.isDisable = false;
|
||||
exitRunPlan(this.group).then(()=>{
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.$store.dispatch('map/resetActiveTrainList', false);
|
||||
}).catch(() => {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.isDisable = true;
|
||||
this.$store.dispatch('map/resetActiveTrainList', false);
|
||||
this.$messageBox(this.$t('error.endSimulationFailed'));
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-if="delayShow">
|
||||
<div v-for="item in stationList">
|
||||
<div v-for="(item,i) in stationList" :key="i">
|
||||
<delay-info v-if="item.delayInfo" :delay-info-list="item.delayInfo" position="item.points" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div v-show="showDelayBox" class="info_box" :style="{left: tPosition.x+'px', top: tPosition.y+'px' }">
|
||||
<el-scrollbal>
|
||||
<div v-for="item in delayInfoList"><span>人解</span><span>信号机名</span><span>时间</span></div>
|
||||
<div v-for="(item,i) in delayInfoList" :key="i"><span>人解</span><span>信号机名</span><span>时间</span></div>
|
||||
</el-scrollbal>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<el-button v-if="isCreate" size="mini" type="primary" class="createRunPlan" @click="handleCreate">{{ $t('planMonitor.createRunningDiagram') }}</el-button>
|
||||
</div>
|
||||
<!--<QueryListPage ref="queryListPage" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />-->
|
||||
<el-card v-loading="loading" style="width: 91%;margin-left:4%;margin-top:20px;">
|
||||
<el-card v-loading="loading" style="width: 91%;margin-left:4%;margin-top:20px;padding:50px">
|
||||
<el-table
|
||||
:data="runPlanList"
|
||||
highlight-current-row
|
||||
|
@ -190,7 +190,7 @@
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||
{{ $t('planMonitor.modifying.detail') }}
|
||||
{{ '经停转换轨 / 站台轨:' }}
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="editModel.arriveConfigList" border :height="230">
|
||||
@ -406,17 +406,24 @@ export default {
|
||||
planId: this.$route.query.planId || this.loadRunPlanId,
|
||||
SDTNumber: `${this.serviceNumber}${this.tripNumber}`
|
||||
};
|
||||
this.editModel.routingList = [];
|
||||
this.routingList = [];
|
||||
getRoutingBySDTNumber(model).then(resp => { // 根据车次号查询交路
|
||||
// const routingObj = resp.data;
|
||||
const editData = this.$store.state.runPlan.editData[this.serviceNumber];
|
||||
if (editData) {
|
||||
const trainInfo = editData.trainMap[this.tripNumber];
|
||||
const lastIndex = trainInfo.stationTimeList.length - 1;
|
||||
this.routingList.push({
|
||||
code:resp.data.code,
|
||||
startStationCode:resp.data.startStationCode,
|
||||
endStationCode:resp.data.endStationCode,
|
||||
endSectionCode:resp.data.endSectionCode,
|
||||
startSectionCode:resp.data.startSectionCode
|
||||
});
|
||||
this.editModel = {
|
||||
tripNumber: this.tripNumber,
|
||||
startStationCode: resp.data.startStationCode,
|
||||
startTime: formatTime(trainInfo.stationTimeList[0].secondTime + 7200),
|
||||
startTime: formatTime(trainInfo.stationTimeList[1].secondTime + 7200),
|
||||
endStationCode: resp.data.endStationCode,
|
||||
endTime: formatTime(trainInfo.stationTimeList[lastIndex].secondTime + 7200),
|
||||
routingCode : resp.data.code,
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div v-if="dialogVisible" v-quickMenuDrag class="reminder-drag">
|
||||
<div style="width: 100%;text-align: center;font-size: 18px;padding-top: 8px;">条件管理</div>
|
||||
<i style="position: relative;top: -25px;right: -370px;" class="el-icon-close" @click="handleClose" />
|
||||
<i style="position: relative;top: -25px;right: -370px;font-size: 20px;" class="el-icon-close" @click="handleClose" />
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane label="列车触发" name="first">
|
||||
<div>
|
||||
@ -138,22 +138,27 @@ export default {
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
doShow(actionInfo) {
|
||||
this.tableData = [];
|
||||
this.delay = 0;
|
||||
this.actionId = actionInfo.id;
|
||||
getActionCondition(this.$route.query.group, this.actionId).then(resp => {
|
||||
if (resp.data) {
|
||||
this.tableData = resp.data.trainStatuses;
|
||||
this.delay = (resp.data.delay || 0) / 1000;
|
||||
}
|
||||
}).catch(()=> {
|
||||
this.$message.error('获取条件失败');
|
||||
});
|
||||
this.dialogVisible = true;
|
||||
doShow(actionId) {
|
||||
if (this.actionId === actionId && this.dialogVisible) {
|
||||
this.handleClose();
|
||||
} else {
|
||||
this.tableData = [];
|
||||
this.delay = 0;
|
||||
this.actionId = actionId;
|
||||
getActionCondition(this.$route.query.group, this.actionId).then(resp => {
|
||||
if (resp.data) {
|
||||
this.tableData = resp.data.trainStatuses;
|
||||
this.delay = (resp.data.delay || 0) / 1000;
|
||||
}
|
||||
}).catch(()=> {
|
||||
this.$message.error('获取条件失败');
|
||||
});
|
||||
this.dialogVisible = true;
|
||||
}
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
this.$emit('clearConditionActionId');
|
||||
this.initData();
|
||||
},
|
||||
getSectionName(code) {
|
||||
@ -225,7 +230,9 @@ export default {
|
||||
initData() {
|
||||
this.update = false;
|
||||
this.updateIndex = '';
|
||||
this.field = '';
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
this.formModel.stop = '';
|
||||
},
|
||||
onCommit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
@ -274,5 +281,6 @@ export default {
|
||||
background: #FFF;
|
||||
width: 400px;
|
||||
height: 600px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
|
@ -43,7 +43,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="btnGroup">
|
||||
<el-button type="primary" size="mini" @click="handleCondition(actionInfo)">触发条件</el-button>
|
||||
<el-button :type="conditionActionId === actionInfo.id? 'danger':'primary'" size="mini" @click="handleCondition(actionInfo)">触发条件</el-button>
|
||||
<el-button v-if="actionInfo.visible && !actionInfo.isModify" type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo)">{{ $t('scriptRecord.modifyConversitionButton') }}</el-button>
|
||||
<el-button v-if="actionInfo.visible && actionInfo.isModify" :loading="modifyTextLoading" type="danger" size="mini" style="margin-left:10px;" @click="confirmModify(actionInfo)">确定</el-button>
|
||||
<el-button v-if="actionInfo.visible && actionInfo.isModify" type="" size="mini" style="margin-left:10px;" @click="cancleModify(actionInfo)">取消</el-button>
|
||||
@ -86,7 +86,8 @@ export default {
|
||||
modifyTextLoading:false,
|
||||
deleteLoading:false,
|
||||
// behaviorName:"",
|
||||
memberName: ''
|
||||
memberName: '',
|
||||
conditionActionId: ''
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -114,7 +115,12 @@ export default {
|
||||
this.loadOtherData(this.$route.query);
|
||||
},
|
||||
handleCondition(actionInfo) {
|
||||
this.$emit('showConditionManage', actionInfo);
|
||||
if (this.conditionActionId === actionInfo.id) {
|
||||
this.conditionActionId = '';
|
||||
} else {
|
||||
this.conditionActionId = actionInfo.id;
|
||||
}
|
||||
this.$emit('showConditionManage', actionInfo.id);
|
||||
},
|
||||
covertData(memberList, element) {
|
||||
const member = memberList.find(elem=>{ return elem.id == element.memberId; });
|
||||
|
@ -7,7 +7,7 @@
|
||||
导入剧本
|
||||
</el-button>
|
||||
</div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
|
||||
<QueryListPage ref="queryListPage" :cardPadding="50" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
|
||||
<script-publish ref="publishScript" :title="$t('scriptRecord.publishScript')" @reloadTable="reloadTable" @create="handleConfirmPublish" />
|
||||
<create-script ref="createScript" :title="$t('scriptRecord.createScript')" @reloadTable="reloadTable" @create="handleConfirmCreate" />
|
||||
<create-script ref="modifyScript" :title="$t('scriptRecord.modifyScript')" @reloadTable="reloadTable" @create="handleConfirmModify" />
|
||||
@ -145,7 +145,7 @@ export default {
|
||||
},
|
||||
drawUp(index, row) {
|
||||
scriptRecordNotifyNew(row.id).then(resp => {
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang, lineCode:this.$route.query.lineCode};
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang, lineCode:this.$route.query.lineCode, record: true};
|
||||
this.$router.push({ path: `${UrlConfig.scriptDisplayNew}/script`, query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
|
@ -66,7 +66,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<add-script-member ref="addScriptMember" @addScriptMember="addScriptMember" />
|
||||
<condition-manage ref="conditionManage" />
|
||||
<condition-manage ref="conditionManage" @clearConditionActionId="clearConditionActionId" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -430,6 +430,8 @@ export default {
|
||||
this.quickChangeMember.list = [new_member];
|
||||
this.$emit('resetChat');
|
||||
}
|
||||
this.$refs.conditionManage && this.$refs.conditionManage.handleClose();
|
||||
this.$refs.getAction.conditionActionId = '';
|
||||
this.$store.dispatch('training/setPrdType', '02');
|
||||
this.$store.dispatch('map/resetActiveTrainList');
|
||||
this.$store.dispatch('scriptRecord/updateRole', new_member.type + ':' + this.orignalUserRoleId);
|
||||
@ -558,8 +560,11 @@ export default {
|
||||
this.$messageBox(error.message);
|
||||
});
|
||||
},
|
||||
showConditionManage(actionInfo) {
|
||||
this.$refs.conditionManage.doShow(actionInfo);
|
||||
showConditionManage(actionId) {
|
||||
this.$refs.conditionManage.doShow(actionId);
|
||||
},
|
||||
clearConditionActionId() {
|
||||
this.$refs.getAction.conditionActionId = '';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user