Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly
This commit is contained in:
commit
efc2c1447b
@ -19,6 +19,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.18.0",
|
||||
"dayjs": "^1.11.5",
|
||||
"echarts": "^4.7.0",
|
||||
"element-ui": "^2.12.0",
|
||||
"file-saver": "^1.3.3",
|
||||
|
17
src/App.vue
17
src/App.vue
@ -17,7 +17,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getToken, getUserIdKey } from '@/utils/auth';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { loginInfo, ProjectIcon } from '@/scripts/ProjectConfig';
|
||||
import DeomonTopic from '@/views/demonstration/deomonTopic';
|
||||
@ -47,11 +47,6 @@ export default {
|
||||
this.subscribeMessage(val);
|
||||
}
|
||||
},
|
||||
'$store.state.socket.roomInvite': function (val) {
|
||||
if (val.creator) {
|
||||
this.subscribeMessage(val);
|
||||
}
|
||||
},
|
||||
'$store.state.socket.beLogoutCount': async function(val) {
|
||||
if (this.$store.state.socket.loggedOutMsg.token === getToken()) {
|
||||
this.$store.dispatch('disconnect').then(()=>{
|
||||
@ -88,6 +83,15 @@ export default {
|
||||
await this.$store.dispatch('preLogout');
|
||||
}
|
||||
});
|
||||
window.addEventListener('storage', e => {
|
||||
if (this.$route.path.includes('trainingDesign') || this.$route.path.includes('trainingPreview')) {
|
||||
if (e.key == getUserIdKey('nextNew')) {
|
||||
const operate = JSON.parse(e.newValue);
|
||||
this.$store.dispatch('training/nextNew', operate);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
openIndexedDB();
|
||||
});
|
||||
@ -110,7 +114,6 @@ export default {
|
||||
this.$refs.deomonTopic.doShow(res);
|
||||
}
|
||||
this.$store.dispatch('socket/setSimulationInvite');
|
||||
this.$store.dispatch('socket/setRoomInvite');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -47,3 +47,11 @@ export function uploadAudio(file) {
|
||||
upload: true
|
||||
});
|
||||
}
|
||||
// 生成音频文件
|
||||
export function generateAudio(data) {
|
||||
return request({
|
||||
url: `/api/audioResources/generate`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
33
src/api/disStation.js
Normal file
33
src/api/disStation.js
Normal file
@ -0,0 +1,33 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 创建调度台逻辑数据
|
||||
export function createDisStation(mapId, data) {
|
||||
return request({
|
||||
url: `/api/draftMap/${mapId}/disStation`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 更新调度台逻辑数据
|
||||
export function updateDisStation(mapId, data) {
|
||||
return request({
|
||||
url: `/api/draftMap/${mapId}/disStation`,
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 删除调度台逻辑数据
|
||||
export function deleteDisStation(mapId, code) {
|
||||
return request({
|
||||
url: `/api/draftMap/${mapId}/disStation/${code}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
// 获取调度台逻辑数据
|
||||
export function getDisStationList(mapId, data) {
|
||||
return request({
|
||||
url: `/api/draftMap/${mapId}/disStation/page`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
@ -93,3 +93,23 @@ export function getLoginInfo(token) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户所属组织列表
|
||||
*/
|
||||
export function getOrgList() {
|
||||
return request({
|
||||
url: '/api/org/list',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 登入组织
|
||||
*/
|
||||
export function selectOrgnization(orgId) {
|
||||
return request({
|
||||
url: `/api/org/signIn/${orgId}`,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
@ -238,3 +238,34 @@ export function registerUser(data) {
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 超管重置用户密码 */
|
||||
export function adminResetUserPassword(userId) {
|
||||
return request({
|
||||
url: `/api/userinfo/${userId}/reset/pwd`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
/** 找回密码 */
|
||||
export function findPassword(data) {
|
||||
return request({
|
||||
url: `/api/userinfo/retrieve/pwd`,
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 发送手机验证码 */
|
||||
export function sendPhoneVfcode(data) {
|
||||
return request({
|
||||
url: '/api/userinfo/mobile/code',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 发送邮箱验证码 */
|
||||
export function sendEmailVfcode(params) {
|
||||
return request({
|
||||
url: '/api/userinfo/email/code',
|
||||
method: 'post',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
@ -529,3 +529,11 @@ export function getRobotDrivingParam(simulationId, groupNumber) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 查询所有pa系统的定时播放任务 */
|
||||
export function queryPaTimedList(group, params) {
|
||||
return request({
|
||||
url: `/simulation/${group}/iscs/paTimedPlay`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
@ -64,6 +64,22 @@ export function publishTraining(data) {
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 查询实现草稿发布轨迹 */
|
||||
export function draftPubTrace(data) {
|
||||
return request({
|
||||
url: `/api/v2/training/draft/pub/trace/find/page`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 删除草稿发布轨迹 */
|
||||
export function deleteTrace(data) {
|
||||
return request({
|
||||
url: `/api/v2/training/draft/pub/trace`,
|
||||
method: 'delete',
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 更新当前用户的某个实训草稿的大字段信息 */
|
||||
export function updateTrainingContent(data) {
|
||||
return request({
|
||||
@ -112,6 +128,14 @@ export function getTrainingMmembers(trainingId) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取实训所有参与者 */
|
||||
export function getTrainingPlayers(trainingId) {
|
||||
return request({
|
||||
url: `/api/v2/draft/training/${trainingId}/player/list`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 更新所有评分规则*/
|
||||
export function updateTrainingGradeRules(trainingId, data) {
|
||||
return request({
|
||||
|
BIN
src/assets/icon/favicon_hhzy.png
Normal file
BIN
src/assets/icon/favicon_hhzy.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 68 KiB |
BIN
src/assets/pis/train.png
Normal file
BIN
src/assets/pis/train.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
@ -10,6 +10,7 @@ export default {
|
||||
modify: 'modify',
|
||||
delete: 'delete',
|
||||
publish: 'publish',
|
||||
publishTrack: 'track',
|
||||
preview: 'preview',
|
||||
mapLocation: 'Save map positioning',
|
||||
saveBackground: 'Save Background',
|
||||
|
@ -10,6 +10,7 @@ export default {
|
||||
modify: '修改',
|
||||
delete: '删除',
|
||||
publish: '发布',
|
||||
publishTrack: '发布轨迹',
|
||||
preview: '预览',
|
||||
mapLocation: '保存地图定位',
|
||||
saveBackground: '保存背景',
|
||||
|
@ -1,258 +1,159 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Image from 'zrender/src/graphic/Image';
|
||||
import clock0 from '@/assets/ibp_images/clock/clock_0.png';
|
||||
import clock1 from '@/assets/ibp_images/clock/clock_1.png';
|
||||
import clock2 from '@/assets/ibp_images/clock/clock_2.png';
|
||||
import clock3 from '@/assets/ibp_images/clock/clock_3.png';
|
||||
import clock4 from '@/assets/ibp_images/clock/clock_4.png';
|
||||
import clock5 from '@/assets/ibp_images/clock/clock_5.png';
|
||||
import clock6 from '@/assets/ibp_images/clock/clock_6.png';
|
||||
import clock7 from '@/assets/ibp_images/clock/clock_7.png';
|
||||
import clock8 from '@/assets/ibp_images/clock/clock_8.png';
|
||||
import clock9 from '@/assets/ibp_images/clock/clock_9.png';
|
||||
import clockBg from '@/assets/ibp_images/clock/clock_bg.png';
|
||||
import clockColon from '@/assets/ibp_images/clock/clock_colon.png';
|
||||
import Group from 'zrender/src/container/Group'
|
||||
import Image from 'zrender/src/graphic/Image'
|
||||
import clock0 from '@/assets/ibp_images/clock/clock_0.png'
|
||||
import clock1 from '@/assets/ibp_images/clock/clock_1.png'
|
||||
import clock2 from '@/assets/ibp_images/clock/clock_2.png'
|
||||
import clock3 from '@/assets/ibp_images/clock/clock_3.png'
|
||||
import clock4 from '@/assets/ibp_images/clock/clock_4.png'
|
||||
import clock5 from '@/assets/ibp_images/clock/clock_5.png'
|
||||
import clock6 from '@/assets/ibp_images/clock/clock_6.png'
|
||||
import clock7 from '@/assets/ibp_images/clock/clock_7.png'
|
||||
import clock8 from '@/assets/ibp_images/clock/clock_8.png'
|
||||
import clock9 from '@/assets/ibp_images/clock/clock_9.png'
|
||||
import clockBg from '@/assets/ibp_images/clock/clock_bg.png'
|
||||
import clockColon from '@/assets/ibp_images/clock/clock_colon.png'
|
||||
import { timestampFormat } from '@/utils/date'
|
||||
|
||||
const pics = [clock0, clock1, clock2, clock3, clock4, clock5, clock6, clock7, clock8, clock9]
|
||||
|
||||
export default class clock extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
this._type = device.model._type;
|
||||
this._code = device.model.code;
|
||||
this.model = device.model;
|
||||
this.zlevel = device.model.zlevel;
|
||||
this.z = device.model.z;
|
||||
this.initTime = 0;
|
||||
this.create();
|
||||
|
||||
}
|
||||
create() {
|
||||
this.grouper = new Group({
|
||||
id: this.model.code,
|
||||
position: [this.model.point.x, this.model.point.y]
|
||||
});
|
||||
this.clockBg = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
image: clockBg,
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: this.model.width,
|
||||
height: this.model.width / 493 * 156
|
||||
}
|
||||
});
|
||||
this.num1 = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
image: this.getImagePic('0'),
|
||||
x: this.model.width * 0.098,
|
||||
y: this.model.width * 0.062,
|
||||
width: this.model.width * 0.095,
|
||||
height: this.model.width * 0.095 / 37 * 74
|
||||
}
|
||||
});
|
||||
this.num2 = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
image: this.getImagePic('0'),
|
||||
x: this.model.width * 0.22,
|
||||
y: this.model.width * 0.062,
|
||||
width: this.model.width * 0.095,
|
||||
height: this.model.width * 0.095 / 37 * 74
|
||||
}
|
||||
});
|
||||
this.num3 = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
image: this.getImagePic('0'),
|
||||
x: this.model.width * 0.395,
|
||||
y: this.model.width * 0.062,
|
||||
width: this.model.width * 0.095,
|
||||
height: this.model.width * 0.095 / 37 * 74
|
||||
}
|
||||
});
|
||||
this.num4 = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
image: this.getImagePic('0'),
|
||||
x: this.model.width * 0.52,
|
||||
y: this.model.width * 0.062,
|
||||
width: this.model.width * 0.095,
|
||||
height: this.model.width * 0.095 / 37 * 74
|
||||
}
|
||||
});
|
||||
this.num5 = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
image: this.getImagePic('0'),
|
||||
x: this.model.width * 0.69,
|
||||
y: this.model.width * 0.062,
|
||||
width: this.model.width * 0.095,
|
||||
height: this.model.width * 0.095 / 37 * 74
|
||||
}
|
||||
});
|
||||
this.num6 = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
image: this.getImagePic('0'),
|
||||
x: this.model.width * 0.816,
|
||||
y: this.model.width * 0.062,
|
||||
width: this.model.width * 0.095,
|
||||
height: this.model.width * 0.095 / 37 * 74
|
||||
}
|
||||
});
|
||||
this.clockColon1 = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
image: clockColon,
|
||||
x: +this.model.width * 0.183,
|
||||
y: -this.model.width * 0.017,
|
||||
width: this.model.width * 0.34,
|
||||
height: this.model.width / 1 * 0.34
|
||||
}
|
||||
});
|
||||
this.clockColon2 = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
image: clockColon,
|
||||
x: +this.model.width * 0.48,
|
||||
y: -this.model.width * 0.017,
|
||||
width: this.model.width * 0.34,
|
||||
height: this.model.width / 1 * 0.34
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.clockBg);
|
||||
this.grouper.add(this.num1);
|
||||
this.grouper.add(this.num2);
|
||||
this.grouper.add(this.num3);
|
||||
this.grouper.add(this.num4);
|
||||
this.grouper.add(this.num5);
|
||||
this.grouper.add(this.num6);
|
||||
this.grouper.add(this.clockColon1);
|
||||
this.grouper.add(this.clockColon2);
|
||||
this.add(this.grouper);
|
||||
}
|
||||
getImagePic(context) {
|
||||
let pic = clock0;
|
||||
switch (context) {
|
||||
case '0':
|
||||
pic = clock0;
|
||||
break;
|
||||
case '1':
|
||||
pic = clock1;
|
||||
break;
|
||||
case '2':
|
||||
pic = clock2;
|
||||
break;
|
||||
case '3':
|
||||
pic = clock3;
|
||||
break;
|
||||
case '4':
|
||||
pic = clock4;
|
||||
break;
|
||||
case '5':
|
||||
pic = clock5;
|
||||
break;
|
||||
case '6':
|
||||
pic = clock6;
|
||||
break;
|
||||
case '7':
|
||||
pic = clock7;
|
||||
break;
|
||||
case '8':
|
||||
pic = clock8;
|
||||
break;
|
||||
case '9':
|
||||
pic = clock9;
|
||||
break;
|
||||
}
|
||||
return pic;
|
||||
}
|
||||
setClockStart(started) {
|
||||
const _this = this;
|
||||
if (started) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.timer = setInterval(() => {
|
||||
_this.handleClock(_this);
|
||||
}, 1000);
|
||||
} else {
|
||||
this.timer && clearInterval(this.timer);
|
||||
}
|
||||
}
|
||||
handleClock(_this) {
|
||||
_this.initTime += 1;
|
||||
let seconds = this.initTime % 60 + '';
|
||||
let minutes = Math.floor(this.initTime / 60) % 60 + '';
|
||||
let hours = Math.floor(this.initTime / 3600) + '';
|
||||
if (seconds.length < 2) {
|
||||
seconds = '0' + seconds;
|
||||
}
|
||||
if (minutes.length < 2) {
|
||||
minutes = '0' + minutes;
|
||||
}
|
||||
if (hours.length < 2) {
|
||||
hours = '0' + hours;
|
||||
}
|
||||
_this.setNumPic(6, seconds.charAt(1));
|
||||
_this.setNumPic(5, seconds.charAt(0));
|
||||
_this.setNumPic(4, minutes.charAt(1));
|
||||
_this.setNumPic(3, minutes.charAt(0));
|
||||
_this.setNumPic(2, hours.charAt(1));
|
||||
_this.setNumPic(1, hours.charAt(0));
|
||||
}
|
||||
setNumPic(num, context) {
|
||||
switch (num) {
|
||||
case 1:
|
||||
this.num1.setStyle('image', this.getImagePic(context));
|
||||
break;
|
||||
case 2:
|
||||
this.num2.setStyle('image', this.getImagePic(context));
|
||||
break;
|
||||
case 3:
|
||||
this.num3.setStyle('image', this.getImagePic(context));
|
||||
break;
|
||||
case 4:
|
||||
this.num4.setStyle('image', this.getImagePic(context));
|
||||
break;
|
||||
case 5:
|
||||
this.num5.setStyle('image', this.getImagePic(context));
|
||||
break;
|
||||
case 6:
|
||||
this.num6.setStyle('image', this.getImagePic(context));
|
||||
}
|
||||
}
|
||||
setClockTime(initTime) {
|
||||
this.initTime = initTime;
|
||||
let seconds = this.initTime % 60 + '';
|
||||
let minutes = Math.floor(this.initTime / 60) % 60 + '';
|
||||
let hours = Math.floor(this.initTime / 3600) + '';
|
||||
if (seconds.length < 2) {
|
||||
seconds = '0' + seconds;
|
||||
}
|
||||
if (minutes.length < 2) {
|
||||
minutes = '0' + minutes;
|
||||
}
|
||||
if (hours.length < 2) {
|
||||
hours = '0' + hours;
|
||||
}
|
||||
this.setNumPic(6, seconds.charAt(1));
|
||||
this.setNumPic(5, seconds.charAt(0));
|
||||
this.setNumPic(4, minutes.charAt(1));
|
||||
this.setNumPic(3, minutes.charAt(0));
|
||||
this.setNumPic(2, hours.charAt(1));
|
||||
this.setNumPic(1, hours.charAt(0));
|
||||
this.setClockStart(true);
|
||||
}
|
||||
setModel(dx, dy) {
|
||||
this.model.point.x += dx;
|
||||
this.model.point.y += dy;
|
||||
}
|
||||
constructor(device) {
|
||||
super()
|
||||
this._type = device.model._type
|
||||
this._code = device.model.code
|
||||
this.model = device.model
|
||||
this.zlevel = device.model.zlevel
|
||||
this.z = device.model.z
|
||||
this.initTime = 0
|
||||
this.create()
|
||||
}
|
||||
create() {
|
||||
this.grouper = new Group({
|
||||
id: this.model.code,
|
||||
position: [this.model.point.x, this.model.point.y],
|
||||
})
|
||||
this.clockBg = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
image: clockBg,
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: this.model.width,
|
||||
height: (this.model.width / 493) * 156,
|
||||
},
|
||||
})
|
||||
this.num1 = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
image: pics[0],
|
||||
x: this.model.width * 0.098,
|
||||
y: this.model.width * 0.062,
|
||||
width: this.model.width * 0.095,
|
||||
height: ((this.model.width * 0.095) / 37) * 74,
|
||||
},
|
||||
})
|
||||
this.num2 = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
image: pics[0],
|
||||
x: this.model.width * 0.22,
|
||||
y: this.model.width * 0.062,
|
||||
width: this.model.width * 0.095,
|
||||
height: ((this.model.width * 0.095) / 37) * 74,
|
||||
},
|
||||
})
|
||||
this.num3 = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
image: pics[0],
|
||||
x: this.model.width * 0.395,
|
||||
y: this.model.width * 0.062,
|
||||
width: this.model.width * 0.095,
|
||||
height: ((this.model.width * 0.095) / 37) * 74,
|
||||
},
|
||||
})
|
||||
this.num4 = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
image: pics[0],
|
||||
x: this.model.width * 0.52,
|
||||
y: this.model.width * 0.062,
|
||||
width: this.model.width * 0.095,
|
||||
height: ((this.model.width * 0.095) / 37) * 74,
|
||||
},
|
||||
})
|
||||
this.num5 = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
image: pics[0],
|
||||
x: this.model.width * 0.69,
|
||||
y: this.model.width * 0.062,
|
||||
width: this.model.width * 0.095,
|
||||
height: ((this.model.width * 0.095) / 37) * 74,
|
||||
},
|
||||
})
|
||||
this.num6 = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
image: pics[0],
|
||||
x: this.model.width * 0.816,
|
||||
y: this.model.width * 0.062,
|
||||
width: this.model.width * 0.095,
|
||||
height: ((this.model.width * 0.095) / 37) * 74,
|
||||
},
|
||||
})
|
||||
this.clockColon1 = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
image: clockColon,
|
||||
x: +this.model.width * 0.183,
|
||||
y: -this.model.width * 0.017,
|
||||
width: this.model.width * 0.34,
|
||||
height: (this.model.width / 1) * 0.34,
|
||||
},
|
||||
})
|
||||
this.clockColon2 = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
image: clockColon,
|
||||
x: +this.model.width * 0.48,
|
||||
y: -this.model.width * 0.017,
|
||||
width: this.model.width * 0.34,
|
||||
height: (this.model.width / 1) * 0.34,
|
||||
},
|
||||
})
|
||||
this.grouper.add(this.clockBg)
|
||||
this.grouper.add(this.num1)
|
||||
this.grouper.add(this.num2)
|
||||
this.grouper.add(this.num3)
|
||||
this.grouper.add(this.num4)
|
||||
this.grouper.add(this.num5)
|
||||
this.grouper.add(this.num6)
|
||||
this.grouper.add(this.clockColon1)
|
||||
this.grouper.add(this.clockColon2)
|
||||
this.add(this.grouper)
|
||||
}
|
||||
setNumPic(position, num) {
|
||||
this[`num${position}`].setStyle(`image`, pics[num])
|
||||
}
|
||||
setClockTime(initTime) {
|
||||
this.initTime = initTime
|
||||
let timeStr = timestampFormat('HHmmss', this.initTime)
|
||||
timeStr.split('').forEach((digit, index) => {
|
||||
this.setNumPic(index + 1, Number(digit))
|
||||
})
|
||||
}
|
||||
setModel(dx, dy) {
|
||||
this.model.point.x += dx
|
||||
this.model.point.y += dy
|
||||
}
|
||||
}
|
||||
|
@ -299,6 +299,44 @@ class Iscs {
|
||||
this.$painter.update(this.iscsDevice[psdCode]);
|
||||
}
|
||||
});
|
||||
} else if (elem.deviceType === 'GATE') {
|
||||
const checkArrowDoubleCodeList = ['IscsPicture_2', 'IscsPicture_8', 'IscsPicture_27', 'IscsPicture_33'];
|
||||
const checkArrowLeftCodeList = ['IscsPicture_3', 'IscsPicture_4', 'IscsPicture_5', 'IscsPicture_6', 'IscsPicture_7', 'IscsPicture_28', 'IscsPicture_29',
|
||||
'IscsPicture_30', 'IscsPicture_31', 'IscsPicture_34', 'IscsPicture_35', 'IscsPicture_36', 'IscsPicture_37'];
|
||||
const checkArrowRightCodeList = ['IscsPicture_10', 'IscsPicture_11', 'IscsPicture_12', 'IscsPicture_13', 'IscsPicture_14'];
|
||||
|
||||
[...checkArrowDoubleCodeList, ...checkArrowLeftCodeList, ...checkArrowRightCodeList].forEach(checkCode => {
|
||||
let picture = '';
|
||||
if (elem.status === 1) {
|
||||
if (checkArrowDoubleCodeList.includes(checkCode)) {
|
||||
picture = 'checkArrowDoubleLv';
|
||||
} else if (checkArrowLeftCodeList.includes(checkCode)) {
|
||||
picture = 'checkArrowLeftLv';
|
||||
} else if (checkArrowRightCodeList.includes(checkCode)) {
|
||||
picture = 'checkArrowRightLv';
|
||||
}
|
||||
} else if (elem.status === 0) {
|
||||
if (checkArrowDoubleCodeList.includes(checkCode)) {
|
||||
picture = 'checkArrowDoubleHong';
|
||||
} else if (checkArrowLeftCodeList.includes(checkCode)) {
|
||||
picture = 'checkArrowLeftHong';
|
||||
} else if (checkArrowRightCodeList.includes(checkCode)) {
|
||||
picture = 'checkArrowRightHong';
|
||||
}
|
||||
} else if (elem.status === -1) {
|
||||
if (checkArrowDoubleCodeList.includes(checkCode)) {
|
||||
picture = 'checkArrowDouble';
|
||||
} else if (checkArrowLeftCodeList.includes(checkCode)) {
|
||||
picture = 'checkArrowLeft';
|
||||
} else if (checkArrowRightCodeList.includes(checkCode)) {
|
||||
picture = 'checkArrowRight';
|
||||
}
|
||||
}
|
||||
if (picture) {
|
||||
this.iscsDevice[checkCode].model.picture = picture;
|
||||
this.$painter.update(this.iscsDevice[checkCode]);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
const oDevice = this.iscsDevice[code];
|
||||
if (oDevice && elem.dispose) {
|
||||
|
@ -62,7 +62,7 @@ import checkSell from '@/assets/iscs_picture/check_sell.png';
|
||||
import checkSell2 from '@/assets/iscs_picture/check_sell2.png';
|
||||
import checkSell2Lv from '@/assets/iscs_picture/check_sell2_lv.png';
|
||||
import checkSell2Hong from '@/assets/iscs_picture/check_sell2_hong.png';
|
||||
import checkSell3 from '@/assets/iscs_picture/check_sell3.png';
|
||||
// import checkSell3 from '@/assets/iscs_picture/check_sell3.png';
|
||||
import bgShowRoom from '@/assets/iscs_picture/bg-showroom.jpg';
|
||||
import bgStand from '@/assets/iscs_picture/bg-stand.jpg';
|
||||
import bgFasPlatformA from '@/assets/iscs_picture/fas_platform_a_bg.png';
|
||||
@ -146,6 +146,8 @@ const pictureObj = {
|
||||
checkArrowRightLv,
|
||||
checkArrowRightHong,
|
||||
checkArrowDouble,
|
||||
checkArrowDoubleLv,
|
||||
checkArrowDoubleHong,
|
||||
checkFlowCumulative,
|
||||
checkSell,
|
||||
checkSell2,
|
||||
@ -190,6 +192,7 @@ export default class Picture extends Group {
|
||||
this._function = device.model.function;
|
||||
this.z = device.model.z;
|
||||
this.create();
|
||||
this.setState(this.model);
|
||||
if (this.model.groupId) {
|
||||
this.createMouseEvent();
|
||||
}
|
||||
@ -232,6 +235,11 @@ export default class Picture extends Group {
|
||||
this.model.point.x += dx;
|
||||
this.model.point.y += dy;
|
||||
}
|
||||
setState(model) {
|
||||
if (model.picture) {
|
||||
this.imageButton && this.imageButton.setStyle({image: pictureObj[model.picture]});
|
||||
}
|
||||
}
|
||||
getBoundingRect() {
|
||||
const rect = this.imageButton.getBoundingRect().clone();
|
||||
rect.x = rect.x + this.model.point.x;
|
||||
|
@ -166,7 +166,8 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
||||
|
||||
let teststomp = new StompClient();
|
||||
// let topic = '/user/topic/simulation/assistant/'+group;
|
||||
let topic = '/user/queue/simulation/jl3d/'+group;
|
||||
// let topic = '/user/queue/simulation/jl3d/'+group;
|
||||
let topic = '/user/queue/simulation/'+group+'/jl3d';
|
||||
let header = {'X-Token': token};
|
||||
try {
|
||||
teststomp.subscribe(topic, callback, header);
|
||||
|
@ -102,7 +102,8 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
|
||||
|
||||
let teststomp = new StompClient();
|
||||
// let topic = '/user/topic/simulation/assistant/'+group;
|
||||
let topic = '/user/queue/simulation/jl3d/'+group;
|
||||
// let topic = '/user/queue/simulation/jl3d/'+group;
|
||||
let topic = '/user/queue/simulation/'+ group +'/jl3d';
|
||||
let header = {'X-Token': token};
|
||||
try {
|
||||
// console.log("teststomp");
|
||||
|
@ -177,7 +177,8 @@ export function jl3dFaultDeviceVr(dom,group,skinCode) {
|
||||
let connectmsg = {
|
||||
type:'init',
|
||||
baseurl:store.state.user.baseUrl,
|
||||
topic:'/user/queue/simulation/jl3d/'+group,
|
||||
// topic:'/user/queue/simulation/jl3d/'+group,
|
||||
topic : '/user/queue/simulation/'+ group +'/jl3d',
|
||||
token:getToken(),
|
||||
};
|
||||
vrwebworker.postMessage(connectmsg);
|
||||
|
@ -175,7 +175,8 @@ export function Jl3dOtherVR(dom,group,skinCode) {
|
||||
let connectmsg = {
|
||||
type:'init',
|
||||
baseurl:store.state.user.baseUrl,
|
||||
topic:'/user/queue/simulation/jl3d/'+group,
|
||||
// topic:'/user/queue/simulation/jl3d/'+group,
|
||||
topic : '/user/queue/simulation/'+ group +'/jl3d',
|
||||
token:getToken(),
|
||||
};
|
||||
otherVrViewWorker.postMessage(connectmsg);
|
||||
|
@ -171,7 +171,8 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
|
||||
let connectmsg = {
|
||||
type:'init',
|
||||
baseurl:store.state.user.baseUrl,
|
||||
topic:'/user/queue/simulation/jl3d/'+group,
|
||||
// topic:'/user/queue/simulation/jl3d/'+group,
|
||||
topic : '/user/queue/simulation/'+ group +'/jl3d',
|
||||
token:getToken(),
|
||||
};
|
||||
vrwebworker.postMessage(connectmsg);
|
||||
|
@ -41,7 +41,8 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
|
||||
var datatype = '00';
|
||||
this.teststomp = new StompClient();
|
||||
this.topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
// this.topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
this.topic = '/user/queue/simulation/'+routegroup+'/jl3d';
|
||||
let header = {'X-Token': getToken() };
|
||||
let connectmsg = {
|
||||
type:'init',
|
||||
|
@ -7,7 +7,8 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
|
||||
const scope = this;
|
||||
this.teststomp = new StompClient();
|
||||
|
||||
let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
// let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
let topic = '/user/queue/simulation/'+ routegroup +'/jl3d';
|
||||
let header = {'X-Token': getToken() };
|
||||
|
||||
socketon(topic);
|
||||
|
@ -42,7 +42,8 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
|
||||
var datatype = '00';
|
||||
this.teststomp = new StompClient();
|
||||
this.topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
// this.topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
this.topic = '/user/queue/simulation/'+ routegroup +'/jl3d';
|
||||
let header = {'X-Token': getToken() };
|
||||
let connectmsg = {
|
||||
type:'init',
|
||||
|
@ -7,7 +7,8 @@ export function silumationConnect(deviceaction,toptrain,downtrain,routegroup,pas
|
||||
const scope = this;
|
||||
this.teststomp = new StompClient();
|
||||
let start = true;
|
||||
let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
// let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
let topic = '/user/queue/simulation/'+ routegroup +'/jl3d';
|
||||
let header = {'X-Token': getToken() };
|
||||
// scope.socketon(topic);
|
||||
|
||||
|
@ -7,7 +7,8 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
|
||||
const scope = this;
|
||||
this.teststomp = new StompClient();
|
||||
let start = true;
|
||||
let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
// let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
let topic = '/user/queue/simulation/'+ routegroup +'/jl3d';
|
||||
let header = {'X-Token': getToken() };
|
||||
socketon(topic);
|
||||
|
||||
|
@ -7,7 +7,8 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
|
||||
const scope = this;
|
||||
this.teststomp = new StompClient();
|
||||
|
||||
let topic = '/user/queue/simulation/jl3d/'+routegroup;//
|
||||
// let topic = '/user/queue/simulation/jl3d/'+routegroup;//
|
||||
let topic = '/user/queue/simulation/'+ routegroup +'/jl3d';
|
||||
let header = {'X-Token': getToken() };
|
||||
let restart = false;
|
||||
socketon(topic);
|
||||
|
@ -8,7 +8,8 @@ export function sandBoxConnect(manager,routegroup,section,signal,station,train )
|
||||
let scope = this;
|
||||
this.teststomp = new StompClient();
|
||||
let start = true;
|
||||
let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
// let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
let topic = '/user/queue/simulation/'+ routegroup +'/jl3d';
|
||||
let header = {'X-Token': getToken() };
|
||||
let topswitch = false;
|
||||
let downswitch = false;
|
||||
|
@ -85,7 +85,7 @@ class SkinCode extends defaultStyle {
|
||||
invadeColor: '#FFFFFF', // 区段侵入颜色
|
||||
spareColor: '#C0C0C0', // 区段空闲颜色
|
||||
communicationOccupiedColor: '#FE0000', // 区段通信车占用颜色 // 调整 未确定
|
||||
unCommunicationOccupiedColor: '#EF72A7', // 区段非通讯车占用颜色
|
||||
unCommunicationOccupiedColor: '#FE0000', // 区段非通讯车占用颜色
|
||||
routeLockColor: '#C0C0C0', // 区段进路锁定颜色
|
||||
faultLockColor: '#81007F', // 区段故障锁定颜色
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
@ -158,7 +158,7 @@ class SkinCode extends defaultStyle {
|
||||
display: true, // 列车实时位置显示
|
||||
specialShow: true, // 列车特殊显示
|
||||
specialBackground: 'rgba(36, 219, 219, 0.8)',
|
||||
specialRectWidth: 14,
|
||||
specialRectWidth: 25,
|
||||
stopTrainRectWidth: 7
|
||||
}
|
||||
};
|
||||
@ -740,12 +740,12 @@ class SkinCode extends defaultStyle {
|
||||
trainTargetTextAlign: 'right' // 车次号文字显示位置
|
||||
},
|
||||
trainTargetNumber: {
|
||||
groupNumberPrefix: '00000', // 车组号前缀
|
||||
defaultGroupNumber: 'EEEEE', // 默认车组号
|
||||
groupNumberPrefix: '000', // 车组号前缀
|
||||
defaultGroupNumber: 'EEE', // 默认车组号
|
||||
trainTargetNumberOffset: {x: -4, y: 4}, // 车组号偏移量
|
||||
lineNumber: '01', // 线路号在人工车时车组号拼接线路号
|
||||
manualTypeColor: '#FA7FD7', // 人工车车组号显示颜色
|
||||
maskText: '0' // 车组号遮罩
|
||||
lineNumber: '', // 线路号在人工车时车组号拼接线路号
|
||||
manualTypeColor: '#FA7FD7' // 人工车车组号显示颜色
|
||||
// maskText: '0' // 车组号遮罩
|
||||
},
|
||||
trainHead: {
|
||||
trainConntWidth: 0, // 列车竖杠的宽度
|
||||
|
@ -17,13 +17,13 @@ export default class ETriangle extends Group {
|
||||
if (model && model.point) {
|
||||
const right = model.right == 1 ? 1 : -1;
|
||||
if (this.style.Section.trainPosition.specialShow) {
|
||||
this.stopRect = new Rect({ // 停车标识
|
||||
this.openDoorRect = new Rect({ // 停车标识
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
x: model.point.x - this.style.Section.trainPosition.stopTrainRectWidth,
|
||||
y: model.point.y - this.style.Section.line.width / 4,
|
||||
width: this.style.Section.trainPosition.stopTrainRectWidth,
|
||||
width: this.style.Section.line.width - 2,
|
||||
height: this.style.Section.line.width - 2
|
||||
},
|
||||
style: {
|
||||
@ -31,6 +31,20 @@ export default class ETriangle extends Group {
|
||||
fill: 'rgba(26, 54, 88, 0.7)'
|
||||
}
|
||||
});
|
||||
this.stopRect = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
x: model.point.x - this.style.Section.trainPosition.stopTrainRectWidth,
|
||||
y: model.point.y - this.style.Section.line.width / 4,
|
||||
width: 4,
|
||||
height: this.style.Section.line.width + 2
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0,
|
||||
fill: 'rgba(255,0,0,0.7)'
|
||||
}
|
||||
});
|
||||
this.angle1 = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
@ -64,8 +78,9 @@ export default class ETriangle extends Group {
|
||||
});
|
||||
this.add(this.angle1);
|
||||
this.add(this.angle);
|
||||
this.add(this.openDoorRect);
|
||||
this.add(this.stopRect);
|
||||
this.stopRect.hide();
|
||||
this.openDoorRect.hide();
|
||||
} else {
|
||||
this.angle = new Polygon({
|
||||
zlevel: model.zlevel,
|
||||
@ -136,18 +151,38 @@ export default class ETriangle extends Group {
|
||||
});
|
||||
this.angle1.dirty();
|
||||
}
|
||||
if (this.stopRect) {
|
||||
const offset = (this.style.Section.trainPosition.specialRectWidth - this.style.Section.trainPosition.stopTrainRectWidth) / 2;
|
||||
if (this.openDoorRect) {
|
||||
const offset = (this.style.Section.trainPosition.specialRectWidth - this.style.Section.line.width) / 2;
|
||||
let trainRight = model.x + offset;
|
||||
if (right == 1) {
|
||||
trainRight = model.x - offset - this.style.Section.trainPosition.stopTrainRectWidth;
|
||||
trainRight = model.x - offset - this.style.Section.line.width + 2;
|
||||
}
|
||||
const pointsData = {
|
||||
x: trainRight,
|
||||
y: model.y - this.style.Section.line.width / 4,
|
||||
width: this.style.Section.trainPosition.stopTrainRectWidth,
|
||||
y: model.y - this.style.Section.line.width / 4 - 1,
|
||||
width: this.style.Section.line.width - 2,
|
||||
height: this.style.Section.line.width - 2
|
||||
};
|
||||
this.openDoorRect.attr({
|
||||
shape: pointsData
|
||||
});
|
||||
this.openDoorRect.animateTo({
|
||||
shape: pointsData
|
||||
}, 10, 0, 'elasticOut', function () {
|
||||
});
|
||||
this.openDoorRect.dirty();
|
||||
}
|
||||
if (this.stopRect) {
|
||||
let trainRight = model.x + this.style.Section.trainPosition.specialRectWidth;
|
||||
if (right == 1) {
|
||||
trainRight = model.x - this.style.Section.trainPosition.specialRectWidth - 4;
|
||||
}
|
||||
const pointsData = {
|
||||
x: trainRight,
|
||||
y: model.y - this.style.Section.line.width / 2,
|
||||
width: 4,
|
||||
height: this.style.Section.line.width + 2
|
||||
};
|
||||
this.stopRect.attr({
|
||||
shape: pointsData
|
||||
});
|
||||
@ -161,7 +196,6 @@ export default class ETriangle extends Group {
|
||||
trainB.setPositionText(model, right);
|
||||
}
|
||||
}
|
||||
|
||||
setStopShow(flag) {
|
||||
if (flag) {
|
||||
this.stopRect && this.stopRect.show();
|
||||
@ -169,4 +203,11 @@ export default class ETriangle extends Group {
|
||||
this.stopRect && this.stopRect.hide();
|
||||
}
|
||||
}
|
||||
setOpenDoorShow(flag) {
|
||||
if (flag) {
|
||||
this.openDoorRect && this.openDoorRect.show();
|
||||
} else {
|
||||
this.openDoorRect && this.openDoorRect.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import EMouse from './EMouse';
|
||||
import store from '@/store/index';
|
||||
import Circle from 'zrender/src/graphic/shape/Circle';
|
||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
import Vue from 'vue';
|
||||
// import Vue from 'vue';
|
||||
|
||||
/** 车身*/
|
||||
export default class TrainBody extends Group {
|
||||
@ -301,8 +301,8 @@ export default class TrainBody extends Group {
|
||||
// Style('fill', color);
|
||||
}
|
||||
setTrainBorderColor(color) {
|
||||
this.trainBodyBox && this.trainBodyBox.setColor('stroke', color);
|
||||
}
|
||||
this.trainBodyBox && this.trainBodyBox.setColor('stroke', color);
|
||||
}
|
||||
setHShow(isShow) {
|
||||
if (this.textH) {
|
||||
isShow ? this.textH.show() : this.textH.hide();
|
||||
@ -527,6 +527,9 @@ export default class TrainBody extends Group {
|
||||
this.textTrainTrip.dirty();
|
||||
}
|
||||
if (this.textTrainGroup) {
|
||||
if (store.state.training.prdType === '10') {
|
||||
widthText = 0;
|
||||
}
|
||||
this.textTrainGroup.attr({
|
||||
style: {
|
||||
x: parseInt(point.x + widthText),
|
||||
|
@ -21,7 +21,9 @@ export default class Train extends Group {
|
||||
this.fontSize = model.nameFontSize || style.Train.common.trainTextFontSize;
|
||||
this.newScale = this.fontSize / style.Train.common.trainTextFontSize;
|
||||
this.nameFormat = model.nameFormat || style.Train.trainBody.trainNameFormat;
|
||||
if (style.Train.trainBody.specialTrainType.length > 0) {
|
||||
if (store.state.training.prdType === '10') {
|
||||
this.nameFormat = 'groupNumber';
|
||||
} else if (style.Train.trainBody.specialTrainType.length > 0) {
|
||||
style.Train.trainBody.specialTrainType.some((item) => {
|
||||
if (model.type === item.type) {
|
||||
this.nameFormat = item.nameFormat;
|
||||
@ -345,11 +347,14 @@ export default class Train extends Group {
|
||||
if (status != undefined) {
|
||||
if (status) {
|
||||
this.trainB && this.trainB.setDShow(false);
|
||||
this.triangle && this.triangle.setOpenDoorShow(false);
|
||||
} else {
|
||||
this.trainB && this.trainB.setDShow(true);
|
||||
this.triangle && this.triangle.setOpenDoorShow(true);
|
||||
}
|
||||
} else {
|
||||
this.trainB && this.trainB.setDShow(false);
|
||||
this.triangle && this.triangle.setOpenDoorShow(false);
|
||||
}
|
||||
}
|
||||
// 设置通信状态类型
|
||||
|
@ -10,7 +10,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import { timestampFormat } from '@/utils/date';
|
||||
import SystemTime from '@/views/components/systemTime/index';
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
|
||||
@ -126,8 +126,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
const date = new Date(initTime);
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
this.time = timestampFormat('HH:mmss', initTime)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -66,7 +66,7 @@
|
||||
<el-input v-model="model.recommendedOperation" disabled />
|
||||
</el-form-item>
|
||||
<div class="alarm-detail-description">
|
||||
<span> 报警详细描述</span><br>
|
||||
<span>报警详细描述</span><br>
|
||||
<el-input v-model="model.alarmDetail" type="textarea" :rows="5" placeholder="请输入内容" disabled />
|
||||
</div>
|
||||
</el-form>
|
||||
@ -134,7 +134,6 @@ export default {
|
||||
type: operate.type,
|
||||
name: station.name
|
||||
};
|
||||
|
||||
this.doShow(newOperate);
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import { timestampFormat } from '@/utils/date';
|
||||
import SystemTime from '@/views/components/systemTime/index';
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
|
||||
@ -135,8 +135,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
const date = new Date(initTime);
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
this.time = timestampFormat('HH:mmss', initTime)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -25,34 +25,38 @@
|
||||
<div class="box-top">
|
||||
<div class="top-title">收令箱</div>
|
||||
<div class="top-table">
|
||||
<el-table :data="cmdTableData" style="width: 100%" height="160" highlight-current-row :row-class-name="tableRowClassName" @current-change="handleCurrentChange">
|
||||
<el-table :data="cmdTableData" border style="width: 100%" height="160" highlight-current-row :row-class-name="tableRowClassName" @current-change="handleCurrentChange">
|
||||
<el-table-column prop="title" label="标题" show-overflow-tooltip />
|
||||
<el-table-column prop="number" label="号码" width="80" />
|
||||
<el-table-column prop="cmdCode" label="号码" width="80" />
|
||||
<el-table-column label="命令类型" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ typeObj[scope.row.type] || '' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sendTime" label="收令日期" width="160">
|
||||
<el-table-column label="收令日期" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ getSignInfo(scope.row.receiverInfos).receivedTime || '' }}</span>
|
||||
<span style="margin-left: 10px">{{ getStateInfo(scope.row.rcvCompanies).time || '' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="companyOfSender" label="发令单位" />
|
||||
<el-table-column prop="senderName" label="发令人" />
|
||||
<el-table-column label="发令单位">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.sendCompany ? scope.row.sendCompany.name : '' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sender" label="发令人" />
|
||||
<el-table-column label="签否">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ signedStatusObj[getSignInfo(scope.row.receiverInfos).signedStatus] || '' }}</span>
|
||||
<span style="margin-left: 10px">{{ getSignedStatus(getStateInfo(scope.row.rcvCompanies)) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="签收人">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ getSignedBy(getSignInfo(scope.row.receiverInfos)) || '' }}</span>
|
||||
<span style="margin-left: 10px">{{ getSignedBy(scope.row.rcvCompanies) || '' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="签收时间" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ getSignInfo(scope.row.receiverInfos).time || '' }}</span>
|
||||
<span style="margin-left: 10px">{{ getStateInfo(scope.row.rcvCompanies).time || '' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -64,9 +68,9 @@
|
||||
</div>
|
||||
<div class="middle-right">
|
||||
<div class="middle-right-top">
|
||||
<el-table :data="getTableData" style="width: 100%" height="190">
|
||||
<el-table :data="getTableData" border style="width: 100%" height="190">
|
||||
<el-table-column type="index" label="序" width="50" />
|
||||
<el-table-column prop="deviceName" label="受令单位" />
|
||||
<el-table-column prop="name" label="受令单位" />
|
||||
<el-table-column prop="copyers" label="抄知处所" />
|
||||
</el-table>
|
||||
</div>
|
||||
@ -76,7 +80,7 @@
|
||||
<el-checkbox v-model="stopRead">停止阅读</el-checkbox>
|
||||
</div>
|
||||
<div class="middle-right-bottom">
|
||||
<el-table :data="tableData2" style="width: 100%" height="200">
|
||||
<el-table :data="readList" border style="width: 100%" height="200">
|
||||
<el-table-column type="index" label="序" width="50" />
|
||||
<el-table-column prop="reader" label="阅读人" />
|
||||
<el-table-column prop="readTime" label="阅读时间" />
|
||||
@ -87,8 +91,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-btn">
|
||||
<el-button :disabled="!commandId || currentHasSigned" @click="signCmd('REFUSE')">拒签</el-button>
|
||||
<el-button :disabled="!commandId || currentHasSigned" @click="signCmd('SIGNED')">签收</el-button>
|
||||
<el-button :disabled="!commandId || currentHasSigned" @click="signCmd(false)">拒签</el-button>
|
||||
<el-button :disabled="!commandId || currentHasSigned" @click="signCmd(true)">签收</el-button>
|
||||
<el-button @click="doClose">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -97,34 +101,42 @@
|
||||
import { sendCommandNew } from '@/api/jmap/training';
|
||||
import shouxinxiang from '@/assets/dispatcherStation/shouxinxiang.png';
|
||||
import { mapState } from 'vuex';
|
||||
import { parseTime } from '@/utils/index';
|
||||
export default {
|
||||
name:'CmdManage',
|
||||
data() {
|
||||
return {
|
||||
shouxinImg: shouxinxiang,
|
||||
cmdTableData: [],
|
||||
tableData2: [],
|
||||
needRead: false,
|
||||
stopRead: false,
|
||||
dialogShow: false,
|
||||
currentInfo: {},
|
||||
queryResData: {},
|
||||
typeObj: {
|
||||
NORMAL: '正常调度命令'
|
||||
Normal: '普通调度命令',
|
||||
Construct: '施工调度命令',
|
||||
Forward: '转发调度命令',
|
||||
Request: '请求调度命令',
|
||||
LongTerm: '长效调度命令',
|
||||
ShiftScheduling: '班计划调度命令',
|
||||
Other: '其他调度命令'
|
||||
},
|
||||
signedStatusObj: {
|
||||
UNSIGNED: '未签收',
|
||||
SIGNED: '签收',
|
||||
REFUSE: '拒签'
|
||||
Cache: '缓存',
|
||||
Sent: '已发送',
|
||||
SrmReceived: '自律机接收',
|
||||
Received: '已接收',
|
||||
Signed: '已签收',
|
||||
Reject: '已拒签'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState('training', [
|
||||
'memberList', 'simulationUserList', 'initTime'
|
||||
'memberList', 'memberData', 'simulationUserList', 'initTime'
|
||||
]),
|
||||
...mapState('socket', [
|
||||
'dispatchCommandMsg'
|
||||
'dispatchCommandMsg', 'dispatchCommandState'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow;
|
||||
@ -136,17 +148,31 @@ export default {
|
||||
return '调度命令管理';
|
||||
},
|
||||
commandId() {
|
||||
return this.currentInfo.id || '';
|
||||
return this.currentInfo.cmdId || '';
|
||||
},
|
||||
rcId() {
|
||||
const rcArr = this.currentInfo.rcvCompanies || [];
|
||||
const obj = rcArr.find(item => {
|
||||
return item.code == this.getActiveUser.deviceCode;
|
||||
});
|
||||
const id = obj ? obj.id : '';
|
||||
return id;
|
||||
},
|
||||
currentStatus() {
|
||||
let s = '编辑';
|
||||
const state = this.getStateInfo(this.currentInfo.rcvCompanies).state;
|
||||
if (state) {
|
||||
s = this.signedStatusObj[state] ? this.signedStatusObj[state] : '编辑';
|
||||
}
|
||||
return s;
|
||||
},
|
||||
currentHasSigned() {
|
||||
let hasSigned = false;
|
||||
if (this.currentInfo.receiverInfos) {
|
||||
const obj = this.getSignInfo(this.currentInfo.receiverInfos);
|
||||
if (obj && obj.signedStatus != 'UNSIGNED') {
|
||||
hasSigned = true;
|
||||
}
|
||||
let s = false;
|
||||
const sentArr = ['已签收', '已拒签'];
|
||||
if (sentArr.includes(this.currentStatus)) {
|
||||
s = true;
|
||||
}
|
||||
return hasSigned;
|
||||
return s;
|
||||
},
|
||||
getActiveUser() {
|
||||
const userInfo = this.simulationUserList.find(item => {
|
||||
@ -156,27 +182,40 @@ export default {
|
||||
return activeUser;
|
||||
},
|
||||
getTableData() {
|
||||
const receiverList = Object.values(this.currentInfo.receiverInfos || {});
|
||||
const list = this.currentInfo.rcvCompanies || [];
|
||||
return list;
|
||||
},
|
||||
readList() {
|
||||
const list = [];
|
||||
receiverList.forEach(item => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](item.receiverId);
|
||||
const obj = {
|
||||
...this.currentInfo,
|
||||
...item,
|
||||
deviceName: device ? device.name : ''
|
||||
};
|
||||
list.push(obj);
|
||||
this.receiptList && this.receiptList.forEach(item => {
|
||||
if (item.state == 'Received' && item.rcvCode == this.getActiveUser.deviceCode) {
|
||||
list.push({
|
||||
reader: this.getActiveUser.labelName,
|
||||
time: item.time
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
return list;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dispatchCommandMsg(Obj) {
|
||||
if (Obj.type == 'ADD') {
|
||||
const list = Obj.body;
|
||||
this.cmdTableData.push(list);
|
||||
dispatchCommandMsg(obj) {
|
||||
if (obj) {
|
||||
const list = obj;
|
||||
this.cmdTableData.unshift(list);
|
||||
this.show && this.$store.commit('socket/clearDispatchCommandMsg');
|
||||
}
|
||||
},
|
||||
dispatchCommandState(obj) {
|
||||
Object.values(obj.cpStateMap).forEach(item => {
|
||||
if (item.cpId) {
|
||||
if (!this.queryResData.companyStateMap) {
|
||||
this.queryResData.companyStateMap = {};
|
||||
}
|
||||
this.$set(this.queryResData.companyStateMap, item.cpId, item);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
beforeDestroy() {},
|
||||
@ -185,8 +224,8 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
tableRowClassName({row, rowIndex}) {
|
||||
const status = this.getSignInfo(row.receiverInfos).signedStatus;
|
||||
if (status === 'SIGNED') {
|
||||
const status = this.getStateInfo(row.rcvCompanies).state;
|
||||
if (status === 'Signed') {
|
||||
return 'signed-row';
|
||||
}
|
||||
return 'unsigned-row';
|
||||
@ -203,98 +242,107 @@ export default {
|
||||
handleCurrentChange(obj) {
|
||||
if (!obj) { return; }
|
||||
this.currentInfo = obj;
|
||||
if (!this.getSignInfo(obj.receiverInfos).receivedTime) {
|
||||
const sArr = [undefined, 'Sent'];
|
||||
if (sArr.includes(this.getStateInfo(obj.rcvCompanies).state)) {
|
||||
const data = {
|
||||
commandId: obj.id,
|
||||
title: obj.title
|
||||
cmdId: this.commandId,
|
||||
rcId: this.rcId
|
||||
};
|
||||
sendCommandNew(this.group, 'CTC_READ_DISPATCH_COMMAND', data).then((res) => {
|
||||
sendCommandNew(this.group, 'CTC_READ_DIS_COMMAND', data).then((res) => {
|
||||
console.log(res, '---res');
|
||||
const index = this.cmdTableData.findIndex(item => {
|
||||
return item.id == obj.id;
|
||||
});
|
||||
if (index >= 0) {
|
||||
const obj = this.cmdTableData[index];
|
||||
const devCode = this.getActiveUser.deviceCode || '';
|
||||
if (obj.receiverInfos[devCode]) {
|
||||
obj.receiverInfos[devCode].receivedTime = parseTime(this.initTime);
|
||||
this.cmdTableData.splice(index, 1, obj);
|
||||
}
|
||||
}
|
||||
// this.getReceiptData();
|
||||
}).catch(error => {
|
||||
console.log(error, '---已读命令error');
|
||||
});
|
||||
} else {
|
||||
// this.getReceiptData();
|
||||
}
|
||||
},
|
||||
getSignInfo(info) {
|
||||
const obj = info[this.getActiveUser.deviceCode] || {};
|
||||
getReceiptData() {
|
||||
sendCommandNew(this.group, 'CTC_QUERY_RECEIPT_DIS_COMMAND', {cmdId: this.currentInfo.cmdId}).then((res) => {
|
||||
console.log(res, '---回执--');
|
||||
this.receiptList = res.data.receiptList;
|
||||
}).catch(error => {
|
||||
this.receiptList = [];
|
||||
this.$messageBox('---回执失败--' + error.message);
|
||||
});
|
||||
},
|
||||
getActiveDeviceCodeInfo(list) {
|
||||
const findObj = list.find(item => {
|
||||
return item.code == this.getActiveUser.deviceCode;
|
||||
});
|
||||
return findObj;
|
||||
},
|
||||
getStateInfo(list) {
|
||||
const findObj = this.getActiveDeviceCodeInfo(list);
|
||||
let obj = {};
|
||||
if (findObj) {
|
||||
obj = this.queryResData.companyStateMap[findObj.id] || {};
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
getSignedBy(info) {
|
||||
const signedInfo = this.simulationUserList.find(item => {
|
||||
return item.memberId == info.signedBy;
|
||||
});
|
||||
getSignedStatus(row) {
|
||||
let s = '';
|
||||
if (row.signedByProxy) {
|
||||
s = '代签';
|
||||
} else {
|
||||
s = this.signedStatusObj[row.state] || '';
|
||||
}
|
||||
return s;
|
||||
},
|
||||
getSignedBy(list) {
|
||||
const findObj = this.getStateInfo(list);
|
||||
const signedInfo = this.memberData[findObj.operatorId];
|
||||
let name = '';
|
||||
if (signedInfo) {
|
||||
name = signedInfo.nickName;
|
||||
if (findObj.operatorId && signedInfo) {
|
||||
name = signedInfo.labelName;
|
||||
}
|
||||
return name;
|
||||
},
|
||||
signCmd(status) {
|
||||
if (!this.commandId) { return; }
|
||||
const signInfo = { commandId: this.commandId, signedBy: this.getActiveUser.memberId, signedStatus: status, title: this.currentInfo.title };
|
||||
const data = {
|
||||
signInfo: signInfo
|
||||
};
|
||||
sendCommandNew(this.group, 'CTC_SIGN_DISPATCH_COMMAND', data).then((res) => {
|
||||
const data = { cmdId: this.commandId, rcId: this.rcId, proxySign: false };
|
||||
let command = 'CTC_SIGN_DIS_COMMAND';
|
||||
if (!status) {
|
||||
command = 'CTC_SIGN_REJECT_DIS_COMMAND';
|
||||
delete data.proxySign;
|
||||
}
|
||||
sendCommandNew(this.group, command, data).then((res) => {
|
||||
console.log(res, '---res');
|
||||
if (res.code == 200) {
|
||||
this.changeSignedStatus(signInfo);
|
||||
// this.searchCmd();
|
||||
} else {
|
||||
this.$messageBox(`${this.signedStatusObj[status]}调度命令失败:${res.message}`);
|
||||
this.$messageBox(`${status ? '签收' : '拒签'}调度命令失败:${res.message}`);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.signedStatusObj[status]}调度命令失败:${error.message}`);
|
||||
this.$messageBox(`${status ? '签收' : '拒签'}调度命令失败:${error.message}`);
|
||||
});
|
||||
},
|
||||
changeReadStatus(signInfo) {
|
||||
const index = this.cmdTableData.findIndex(item => {
|
||||
return item.id == signInfo.commandId;
|
||||
});
|
||||
if (index >= 0) {
|
||||
const obj = this.cmdTableData[index];
|
||||
const devCode = this.getActiveUser.deviceCode || '';
|
||||
if (obj.receiverInfos[devCode]) {
|
||||
const mId = signInfo.signedBy;
|
||||
obj.receiverInfos[devCode].signedBy = mId;
|
||||
obj.receiverInfos[devCode].signedStatus = signInfo.signedStatus;
|
||||
obj.receiverInfos[devCode].time = parseTime(this.initTime);
|
||||
this.cmdTableData.splice(index, 1, obj);
|
||||
filterTableData() {
|
||||
const { companyStateMap = {}, disCmdMap = {} } = this.queryResData;
|
||||
const list = [];
|
||||
const fArr = ['Editing', 'Cache'];
|
||||
Object.values(companyStateMap).forEach(item => {
|
||||
if (!fArr.includes(item.state)) {
|
||||
const findObj = this.findDisCmdObj(disCmdMap, item.cpId);
|
||||
if (findObj) {
|
||||
list.push(findObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return list.reverse();
|
||||
},
|
||||
changeSignedStatus(signInfo) {
|
||||
const index = this.cmdTableData.findIndex(item => {
|
||||
return item.id == signInfo.commandId;
|
||||
findDisCmdObj(obj, val) {
|
||||
return Object.values(obj).find(item => {
|
||||
return item.rcvCompanies[0].id == val;
|
||||
});
|
||||
if (index >= 0) {
|
||||
const obj = this.cmdTableData[index];
|
||||
const devCode = this.getActiveUser.deviceCode || '';
|
||||
if (obj.receiverInfos[devCode]) {
|
||||
const mId = signInfo.signedBy;
|
||||
obj.receiverInfos[devCode].signedBy = mId;
|
||||
obj.receiverInfos[devCode].signedStatus = signInfo.signedStatus;
|
||||
obj.receiverInfos[devCode].time = parseTime(this.initTime);
|
||||
this.cmdTableData.splice(index, 1, obj);
|
||||
}
|
||||
}
|
||||
},
|
||||
searchCmd() {
|
||||
this.cmdTableData = [];
|
||||
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND', {}).then((res) => {
|
||||
console.log(res, '---res');
|
||||
sendCommandNew(this.group, 'CTC_QUERY_DIS_COMMAND', {holderType: 'Station', holderCode: this.getActiveUser.deviceCode}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.cmdTableData = res.data;
|
||||
this.queryResData = res.data;
|
||||
this.cmdTableData = this.filterTableData();
|
||||
} else {
|
||||
this.$messageBox('查询调度命令失败:' + res.message);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
<el-col :span="8">
|
||||
<div>
|
||||
<span>命令号码:</span>
|
||||
<span>{{ signedData.number }}</span>
|
||||
<span>{{ signedData.cmdCode }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -45,13 +45,13 @@
|
||||
<el-col :span="9">
|
||||
<div>
|
||||
<span>发令单位:</span>
|
||||
<span>{{ signedData.companyOfSender }}</span>
|
||||
<span>{{ signedData.sendCompany ? signedData.sendCompany.name : '' }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<div>
|
||||
<span>调度员姓名:</span>
|
||||
<span>{{ signedData.senderName }}</span>
|
||||
<span>{{ signedData.sender }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -64,11 +64,7 @@
|
||||
<div class="box-table">
|
||||
<el-table :data="getTableData" style="width: 100%" height="200">
|
||||
<el-table-column type="index" label="序" width="50" />
|
||||
<el-table-column prop="deviceName" label="受令单位">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ getDeviceName(scope.row.receiverId) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="受令单位" />
|
||||
<el-table-column prop="copyers" label="抄知处所" />
|
||||
</el-table>
|
||||
</div>
|
||||
@ -85,8 +81,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-btn">
|
||||
<el-button :disabled="!commandId || currentHasSigned" @click="signCmd('REFUSE')">拒签</el-button>
|
||||
<el-button :disabled="!commandId || currentHasSigned" @click="signCmd('SIGNED')">签收</el-button>
|
||||
<el-button :disabled="!commandId || currentHasSigned" @click="signCmd(false)">拒签</el-button>
|
||||
<el-button :disabled="!commandId || currentHasSigned" @click="signCmd(true)">签收</el-button>
|
||||
<el-button @click="doClose">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -100,24 +96,34 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
signedData: {},
|
||||
queryResData: {},
|
||||
needRead: false,
|
||||
needprint: false,
|
||||
dialogShow: false,
|
||||
signedId: '',
|
||||
// signedId: '',
|
||||
signedBy: '',
|
||||
typeObj: {
|
||||
NORMAL: '正常调度命令'
|
||||
Normal: '普通调度命令',
|
||||
Construct: '施工调度命令',
|
||||
Forward: '转发调度命令',
|
||||
Request: '请求调度命令',
|
||||
LongTerm: '长效调度命令',
|
||||
ShiftScheduling: '班计划调度命令',
|
||||
Other: '其他调度命令'
|
||||
},
|
||||
signedStatusObj: {
|
||||
UNSIGNED: '未签收',
|
||||
SIGNED: '签收',
|
||||
REFUSE: '拒签'
|
||||
Cache: '缓存',
|
||||
Sent: '已发送',
|
||||
SrmReceived: '自律机接收',
|
||||
Received: '已接收',
|
||||
Signed: '已签收',
|
||||
Reject: '已拒签'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState('training', [
|
||||
'memberList', 'simulationUserList', 'initTime'
|
||||
'memberList', 'memberData', 'simulationUserList', 'initTime'
|
||||
]),
|
||||
...mapState('socket', [
|
||||
'dispatchCommandMsg'
|
||||
@ -132,17 +138,32 @@ export default {
|
||||
return '调度命令管理';
|
||||
},
|
||||
commandId() {
|
||||
return this.signedData.id || '';
|
||||
return this.signedData.cmdId || '';
|
||||
},
|
||||
rcId() {
|
||||
const rcArr = this.signedData.rcvCompanies || [];
|
||||
const obj = rcArr.find(item => {
|
||||
return item.code == this.getActiveUser.deviceCode;
|
||||
});
|
||||
const id = obj ? obj.id : '';
|
||||
return id;
|
||||
},
|
||||
currentStatus() {
|
||||
let s = '编辑';
|
||||
const cpId = this.signedData.sendCompany.id;
|
||||
if (this.queryResData.companyStateMap && this.queryResData.companyStateMap[cpId]) {
|
||||
const state = this.queryResData.companyStateMap[cpId].state;
|
||||
s = this.signedStatusObj[state] ? this.signedStatusObj[state] : '编辑';
|
||||
}
|
||||
return s;
|
||||
},
|
||||
currentHasSigned() {
|
||||
let hasSigned = false;
|
||||
if (this.signedData.receiverInfos) {
|
||||
const obj = this.getSignInfo(this.signedData.receiverInfos);
|
||||
if (obj && obj.signedStatus != 'UNSIGNED') {
|
||||
hasSigned = true;
|
||||
}
|
||||
let s = false;
|
||||
const sentArr = ['编辑', '缓存', '已发送'];
|
||||
if (!sentArr.includes(this.currentStatus)) {
|
||||
s = true;
|
||||
}
|
||||
return hasSigned;
|
||||
return s;
|
||||
},
|
||||
getActiveUser() {
|
||||
const userInfo = this.simulationUserList.find(item => {
|
||||
@ -152,15 +173,7 @@ export default {
|
||||
return activeUser;
|
||||
},
|
||||
getTableData() {
|
||||
const receiverList = Object.values(this.signedData.receiverInfos || {});
|
||||
const list = [];
|
||||
receiverList.forEach(item => {
|
||||
const obj = {
|
||||
...this.signedData,
|
||||
...item
|
||||
};
|
||||
list.push(obj);
|
||||
});
|
||||
const list = this.signedData.rcvCompanies || [];
|
||||
return list;
|
||||
}
|
||||
},
|
||||
@ -179,20 +192,19 @@ export default {
|
||||
getParseTime(val, f) {
|
||||
return val ? parseTime(val, f) : '';
|
||||
},
|
||||
getSenderName() {
|
||||
this.signedBy = '';
|
||||
this.signedId = '';
|
||||
const activeUser = this.simulationUserList.find(item => {
|
||||
getSignedBy() {
|
||||
const activeUser = Object.values(this.memberData).find(item => {
|
||||
return item.userId == this.$store.state.user.id;
|
||||
});
|
||||
let name = '';
|
||||
if (activeUser) {
|
||||
this.signedBy = activeUser.nickName;
|
||||
this.signedId = activeUser.memberId;
|
||||
name = activeUser.labelName;
|
||||
}
|
||||
this.signedBy = name;
|
||||
},
|
||||
async doShow() {
|
||||
await this.searchCmd(); // 补齐剧本指令,同cmdManage
|
||||
this.getSenderName();
|
||||
this.getSignedBy();
|
||||
this.getSignedData();
|
||||
this.dialogShow = true;
|
||||
this.hasReadCmd();
|
||||
@ -203,31 +215,17 @@ export default {
|
||||
},
|
||||
getSignedData() {
|
||||
this.signedData = {};
|
||||
if (this.dispatchCommandMsg.type == 'ADD') {
|
||||
this.signedData = this.dispatchCommandMsg.body;
|
||||
if (this.dispatchCommandMsg) {
|
||||
this.signedData = this.dispatchCommandMsg;
|
||||
}
|
||||
},
|
||||
getSignInfo(info) {
|
||||
const obj = info[this.getActiveUser.deviceCode] || {};
|
||||
return obj;
|
||||
},
|
||||
getSignedBy(info) {
|
||||
const signedInfo = this.simulationUserList.find(item => {
|
||||
return item.memberId == info.signedBy;
|
||||
});
|
||||
let name = '';
|
||||
if (signedInfo) {
|
||||
name = signedInfo.nickName;
|
||||
}
|
||||
return name;
|
||||
},
|
||||
hasReadCmd() {
|
||||
if (!this.commandId) { return; }
|
||||
const data = {
|
||||
commandId: this.commandId,
|
||||
title: this.signedData.title
|
||||
cmdId: this.commandId,
|
||||
rcId: this.rcId
|
||||
};
|
||||
sendCommandNew(this.group, 'CTC_READ_DISPATCH_COMMAND', data).then((res) => {
|
||||
sendCommandNew(this.group, 'CTC_READ_DIS_COMMAND', data).then((res) => {
|
||||
console.log(res, '---res');
|
||||
}).catch(error => {
|
||||
console.log(error, '---已读命令error');
|
||||
@ -235,11 +233,13 @@ export default {
|
||||
},
|
||||
signCmd(status) {
|
||||
if (!this.commandId) { return; }
|
||||
const signInfo = { commandId: this.commandId, signedBy: this.signedId, signedStatus: status, title: this.signedData.title };
|
||||
const data = {
|
||||
signInfo: signInfo
|
||||
};
|
||||
sendCommandNew(this.group, 'CTC_SIGN_DISPATCH_COMMAND', data).then((res) => {
|
||||
const data = { cmdId: this.commandId, rcId: this.rcId, proxySign: false };
|
||||
let command = 'CTC_SIGN_DIS_COMMAND';
|
||||
if (!status) {
|
||||
command = 'CTC_SIGN_REJECT_DIS_COMMAND';
|
||||
delete data.proxySign;
|
||||
}
|
||||
sendCommandNew(this.group, command, data).then((res) => {
|
||||
console.log(res, '---res');
|
||||
// this.$emit('changeSignedStatus', signInfo);
|
||||
this.doClose();
|
||||
@ -249,8 +249,9 @@ export default {
|
||||
},
|
||||
searchCmd() {
|
||||
return new Promise((resolve, reject) => {
|
||||
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND', {}).then((res) => {
|
||||
sendCommandNew(this.group, 'CTC_QUERY_DIS_COMMAND', {holderType: 'Station', holderCode: this.getActiveUser.deviceCode}).then((res) => {
|
||||
console.log(res, '---res----');
|
||||
this.queryResData = res.data;
|
||||
resolve();
|
||||
}).catch(error => {
|
||||
reject(error.message);
|
||||
|
@ -811,6 +811,11 @@ export const menuOperate = {
|
||||
operation: OperationEvent.CTCCommand.modifyStationTrack.menu.operation,
|
||||
cmdType: CMD.CTC.CTC_STATION_DETAIL_EDIT
|
||||
},
|
||||
// 编辑股道信息
|
||||
editStationTrack:{
|
||||
operation: OperationEvent.CTCCommand.modifyStationTrack.edit.operation,
|
||||
cmdType: CMD.CTC.CTC_STATION_DETAIL_EDIT
|
||||
},
|
||||
// 股道发布生效区
|
||||
releaseStationTrack:{
|
||||
operation: OperationEvent.CTCCommand.releaseStationTrack.menu.operation,
|
||||
@ -897,6 +902,12 @@ export const menuOperate = {
|
||||
operation: OperationEvent.RailCommand.railQueryRegister.menu.operation,
|
||||
cmdType: CMD.RAIL.CMD_RAIL_QUERY_REGISTER
|
||||
}
|
||||
},
|
||||
Conversation: {
|
||||
Chat: {
|
||||
operation: OperationEvent.Conversation.Chat.menu.operation,
|
||||
cmdType: CMD.Conversation.CMD_Conversation_Chat_Text
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@ -911,6 +922,7 @@ export const menuOperate = {
|
||||
export function commitOperate(operate, paramList, over, fillStep = {}) {
|
||||
const step = {
|
||||
start: true,
|
||||
userOperationType: operate.userOperationType || 'leftClick',
|
||||
operation: operate.operation,
|
||||
param:{}
|
||||
};
|
||||
|
@ -232,10 +232,10 @@ export default {
|
||||
this.guideLockLeftFlag = false;
|
||||
},
|
||||
'$store.state.socket.simulationTimeSync': function (val) {
|
||||
if (this.timeNode && val - this.timeNode >= 15) {
|
||||
if (this.timeNode && val - this.timeNode >= 15000) {
|
||||
this.clearOperate();
|
||||
}
|
||||
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15) {
|
||||
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15000) {
|
||||
if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'SignalButton') {
|
||||
this.$store.dispatch('training/updateMapState', [{code: this.deviceList[0].code, _type: 'SignalButton', hasSelected: 0}]);
|
||||
} else if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'Signal' && this.deviceList[0].type === 'SHUNTING') {
|
||||
|
@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import { timestampFormat } from '@/utils/date';
|
||||
import SystemTime from '@/views/components/systemTime/index';
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
|
||||
@ -135,8 +135,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
const date = new Date(initTime);
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
this.time = timestampFormat('HH:mmss', initTime)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -99,7 +99,6 @@ export default {
|
||||
userOperationType: 'leftClick',
|
||||
shuntingTypeList: shuntingTypeList
|
||||
};
|
||||
console.log(shuntingTypeList, 'test----------');
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
// if (valid) {}
|
||||
}).catch((error) => { console.error(error); });
|
||||
@ -115,6 +114,7 @@ export default {
|
||||
over: true,
|
||||
cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
|
||||
operation: OperationEvent.Section.defectiveShunting.confirm.operation,
|
||||
userOperationType: 'leftClick',
|
||||
param:{
|
||||
sectionCode:this.sectionCode,
|
||||
shuntingTypeList:shuntingTypeList
|
||||
|
@ -33,7 +33,7 @@
|
||||
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">与中心通信正常</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="$store.state.training.prdType == '01'&& !isCtc" style="width: 1560px;position: fixed;height: 30px;background: #808080;z-index: 9;bottom: 0;left: 0;display: flex;">
|
||||
<div v-if="$store.state.training.prdType == '01'&& !isCtc" id="tipInfoBox" style="width: 1560px;position: fixed;height: 30px;background: #808080;z-index: 9;bottom: 0;left: 0;display: flex;">
|
||||
<div style="width: 60%;height: 30px;line-height: 30px;text-align: center;">提示信息窗</div>
|
||||
<div style="width: 40%;height: 30px;line-height: 30px;text-align: center;border-left: 2px #ccc solid;">{{ '操控A:主机' + ' ' + dateString + ' ' + time }}</div>
|
||||
</div>
|
||||
@ -96,8 +96,7 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
||||
import PassiveTimeout from './passiveDialog/timeout';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import { timestampFormat } from '@/utils/date';
|
||||
import BottomTable from './bottomTable';
|
||||
import MenuPanel from './menuPanel';
|
||||
import CtcBarIcon1 from '@/assets/ctc_icon/pic1.png';
|
||||
@ -212,7 +211,7 @@ export default {
|
||||
]),
|
||||
hasCommandMsg() {
|
||||
let status = false;
|
||||
if (this.dispatchCommandMsg.body) {
|
||||
if (this.dispatchCommandMsg) {
|
||||
status = true;
|
||||
}
|
||||
return status;
|
||||
@ -232,9 +231,8 @@ export default {
|
||||
val && this.$store.dispatch('config/updateMenuBar');
|
||||
},
|
||||
'$store.state.socket.simulationTimeSync': function (time) { // 仿真时间更新
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
|
||||
const date = new Date(+new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
|
||||
this.initDate(date);
|
||||
this.$store.dispatch('training/setInitTime', time);
|
||||
this.initDate(time);
|
||||
},
|
||||
'$store.state.socket.railwaySimulationRunplanSendChange': function (val) {
|
||||
if (this.isCtc) {
|
||||
@ -308,12 +306,12 @@ export default {
|
||||
this.$store.dispatch('map/setPictureDeviceMap', {});
|
||||
},
|
||||
methods: {
|
||||
changeSignedStatus(info) {
|
||||
this.$refs.cmdManage.changeSignedStatus(info);
|
||||
},
|
||||
signedCmdClose() {
|
||||
this.$refs.cmdManage.doShow();
|
||||
},
|
||||
// changeSignedStatus(info) {
|
||||
// this.$refs.cmdManage.changeSignedStatus(info);
|
||||
// },
|
||||
// signedCmdClose() {
|
||||
// this.$refs.cmdManage.doShow();
|
||||
// },
|
||||
getRunplanInStationData() {
|
||||
getRunplanInStation(this.group).then(response => {
|
||||
// debugger;
|
||||
@ -427,14 +425,9 @@ export default {
|
||||
}
|
||||
},
|
||||
initDate(date) {
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}:${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
const years = date.getFullYear() + '';
|
||||
let months = date.getMonth() + 1 + '';
|
||||
let dates = date.getDate() + '';
|
||||
if (months.length < 2) { months = '0' + months; }
|
||||
if (dates.length < 2) { dates = '0' + dates; }
|
||||
this.dateString = years + months + dates;
|
||||
this.dateString1 = years + '年' + months + '月' + dates + '日';
|
||||
this.time = timestampFormat('HH:mm:ss', date);
|
||||
this.dateString = timestampFormat('YYYYMMDD', date);
|
||||
this.dateString1 = timestampFormat('YYYY年MM月DD日', date);
|
||||
},
|
||||
handleRunplan() {
|
||||
this.$refs.runplanPane.doShow();
|
||||
|
@ -263,10 +263,10 @@ export default {
|
||||
this.guideLockLeftFlag = false;
|
||||
},
|
||||
'$store.state.socket.simulationTimeSync': function (val) {
|
||||
if (this.timeNode && val - this.timeNode >= 15) {
|
||||
if (this.timeNode && val - this.timeNode >= 15000) {
|
||||
this.clearOperate();
|
||||
}
|
||||
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15) {
|
||||
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15000) {
|
||||
if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'SignalButton') {
|
||||
this.$store.dispatch('training/updateMapState', [{code: this.deviceList[0].code, _type: 'SignalButton', hasSelected: 0}]);
|
||||
} else if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'Signal' && this.deviceList[0].type === 'SHUNTING') {
|
||||
@ -312,12 +312,14 @@ export default {
|
||||
operation: data.operateNext,
|
||||
operationPre: data.operation,
|
||||
cmdType: data.nextCmdType,
|
||||
userOperationType: 'leftClick',
|
||||
param: data.param
|
||||
};
|
||||
} else {
|
||||
operate = {
|
||||
operationPre: data.operation,
|
||||
operation: data.operateNext
|
||||
operation: data.operateNext,
|
||||
userOperationType: 'leftClick'
|
||||
};
|
||||
}
|
||||
this.trainingOperation(operate);
|
||||
@ -492,6 +494,7 @@ export default {
|
||||
// 清除按钮
|
||||
const operate = {
|
||||
start: true,
|
||||
userOperationType: 'leftClick',
|
||||
operation: operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
@ -578,7 +581,7 @@ export default {
|
||||
}
|
||||
},
|
||||
// 总取消
|
||||
handelTotalCancel(model) {
|
||||
handleTotalCancel(model) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
@ -590,7 +593,9 @@ export default {
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.clearOperate();
|
||||
if (valid) {
|
||||
this.clearOperate();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.clearOperate();
|
||||
console.error(error);
|
||||
@ -650,10 +655,15 @@ export default {
|
||||
},
|
||||
// 发送指令
|
||||
sendCommand(operate) {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {
|
||||
if (valid) {
|
||||
this.clearOperate();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.clearOperate();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}).finally(() =>{ this.clearOperate(); });
|
||||
});
|
||||
},
|
||||
// 校验是否有列车(接车)按钮
|
||||
checkHasTrainButton(model) {
|
||||
@ -775,7 +785,7 @@ export default {
|
||||
this.handleGuideLock(model);
|
||||
} else if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
||||
if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
|
||||
this.handelTotalCancel(model);
|
||||
this.handleTotalCancel(model);
|
||||
} else if (buttonOperation === this.Signal.humanTrainRoute.button.operation) {
|
||||
this.handleTotalHumanSolution(model);
|
||||
} else if (switchOperation.includes(buttonOperation)) {
|
||||
|
@ -265,16 +265,21 @@ export default {
|
||||
},
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
const operate = {
|
||||
userOperationType: 'rightClick',
|
||||
operation: this.Command.commandRight.right.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate);
|
||||
this.$refs && this.$refs.popMenu && this.$refs.popMenu.resetShowPosition(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.$refs && this.$refs.popMenu && this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationTimeSync': function (val) {
|
||||
if (this.timeNode && val - this.timeNode >= 15) {
|
||||
if (this.timeNode && val - this.timeNode >= 15000) {
|
||||
this.clearOperate();
|
||||
}
|
||||
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15) {
|
||||
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15000) {
|
||||
if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'SignalButton') {
|
||||
this.$store.dispatch('training/updateMapState', [{code: this.deviceList[0].code, _type: 'SignalButton', hasSelected: 0}]);
|
||||
} else if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'Signal' && this.deviceList[0].type === 'SHUNTING') {
|
||||
@ -322,12 +327,14 @@ export default {
|
||||
if (data.nextCmdType) {
|
||||
operate = {
|
||||
over: true,
|
||||
userOperationType: 'leftClick',
|
||||
operation: data.operation,
|
||||
cmdType: data.nextCmdType,
|
||||
param: data.param
|
||||
};
|
||||
} else {
|
||||
operate = {
|
||||
userOperationType: 'leftClick',
|
||||
operationPre: data.operation,
|
||||
operation: data.operateNext
|
||||
};
|
||||
@ -368,6 +375,7 @@ export default {
|
||||
// S引导总锁按钮点击
|
||||
guideLockLeftButtonDown() {
|
||||
const operate = {
|
||||
userOperationType: 'leftClick',
|
||||
operation: this.Switch.guideLock.leftButton.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
@ -384,6 +392,7 @@ export default {
|
||||
// X引导总锁按钮点击
|
||||
guideLockRightButtonDown() {
|
||||
const operate = {
|
||||
userOperationType: 'leftClick',
|
||||
operation: this.Switch.guideLock.rightButton.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
@ -403,6 +412,7 @@ export default {
|
||||
this.clearOperate();
|
||||
if (operation != this.Command.cancel.clearMbm.operation) {
|
||||
const operate = {
|
||||
userOperationType: 'leftClick',
|
||||
operation: operation
|
||||
};
|
||||
// 以下 会弹出密码框 (总人解,区故解) 铅封按钮 684
|
||||
@ -430,6 +440,7 @@ export default {
|
||||
// 清除按钮
|
||||
const operate = {
|
||||
start: true,
|
||||
userOperationType: 'leftClick',
|
||||
operation: operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
@ -467,6 +478,7 @@ export default {
|
||||
handelReopenSignal(device) {
|
||||
const operate = {
|
||||
operation: this.Signal.reopenSignal.button.operation,
|
||||
userOperationType: 'leftClick',
|
||||
code: device.code,
|
||||
param: { signalCode: device.code }
|
||||
};
|
||||
@ -475,7 +487,7 @@ export default {
|
||||
},
|
||||
// 排列进路
|
||||
arrangementRouteOperation(deviceList) {
|
||||
const operate = { operation: this.Signal.arrangementRoute.button.operation };
|
||||
const operate = { userOperationType: 'leftClick', operation: this.Signal.arrangementRoute.button.operation };
|
||||
if (!this.routeDataMap) { this.handleRouteDataMap(); }
|
||||
if (!this.checkHaveRoute(deviceList)) { // 无效的进路按钮选择 清除deviceList
|
||||
// this.$message.error('无效的进路按钮');
|
||||
@ -543,6 +555,7 @@ export default {
|
||||
const operate = {
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
userOperationType: 'leftClick',
|
||||
param: {
|
||||
signalCode: model._type === 'Signal' ? model.code : model.signalCode
|
||||
}
|
||||
@ -557,6 +570,7 @@ export default {
|
||||
const operate = {
|
||||
code: model.code,
|
||||
operation: this.Signal.guide.button.operation,
|
||||
userOperationType: 'leftClick',
|
||||
param: {signalCode: model.signalCode}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
@ -570,6 +584,7 @@ export default {
|
||||
const operate = {
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
userOperationType: 'leftClick',
|
||||
val: model.code,
|
||||
param: { signalCode: model.code }
|
||||
};
|
||||
@ -582,6 +597,7 @@ export default {
|
||||
const operate = {
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
userOperationType: 'leftClick',
|
||||
param: { switchCode: model.code}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
@ -641,6 +657,7 @@ export default {
|
||||
const operate = {
|
||||
code: model.code,
|
||||
operation: this.Signal.guide.button.operation,
|
||||
userOperationType: 'leftClick',
|
||||
param: {signalCode: model.signalCode}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
@ -747,7 +764,7 @@ export default {
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', this.operation);
|
||||
},
|
||||
routeCommit(trainCode, duration) {
|
||||
const operate = {over: true, cmdType: CMD.CTC.CTC_SET_ROUTE, param:{ tripNumber: trainCode || '', duration: duration >= 0 ? duration : null, force: false }};
|
||||
const operate = {userOperationType: 'leftClick', over: true, cmdType: CMD.CTC.CTC_SET_ROUTE, param:{ tripNumber: trainCode || '', duration: duration >= 0 ? duration : null, force: false }};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.clearOperate();
|
||||
}).catch((e) => {
|
||||
@ -766,7 +783,7 @@ export default {
|
||||
this.routeCommit();
|
||||
}
|
||||
} else if (this.operation === OperationEvent.MixinCommand.totalCancel.button.operation) {
|
||||
const operate = {over: true, cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE};
|
||||
const operate = {userOperationType: 'leftClick', over: true, cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.clearOperate();
|
||||
}).catch((e) => {
|
||||
@ -774,7 +791,7 @@ export default {
|
||||
this.clearOperate();
|
||||
});
|
||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.button.operation) {
|
||||
const operate = {over: true, cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL};
|
||||
const operate = {userOperationType: 'leftClick', over: true, cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.clearOperate();
|
||||
}).catch(() => {
|
||||
@ -782,7 +799,7 @@ export default {
|
||||
this.clearOperate();
|
||||
});
|
||||
} else if (this.operation === OperationEvent.Signal.guide.button.operation) {
|
||||
const operate = {over: true, cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE};
|
||||
const operate = {userOperationType: 'leftClick', over: true, cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.$store.dispatch('training/updateMapState', [{code: this.selected.code, _type: this.selected._type, hasSelected: 0}]);
|
||||
this.clearOperate();
|
||||
@ -792,13 +809,13 @@ export default {
|
||||
this.clearOperate();
|
||||
});
|
||||
} else if (this.operation === OperationEvent.Signal.humanTrainRoute.button.operation) {
|
||||
const operate = {over: true, cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE};
|
||||
const operate = {userOperationType: 'leftClick', over: true, cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
}).catch((e) => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}).finally(() => { this.clearOperate(); });
|
||||
} else if (this.switchOperation.includes(this.operation)) {
|
||||
const operate = {over:true, cmdType: this.cmdType};
|
||||
const operate = {userOperationType: 'leftClick', over:true, cmdType: this.cmdType};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
@ -885,6 +902,7 @@ export default {
|
||||
const operate = {
|
||||
over:true,
|
||||
operation: noPasswordModelTypeMap[model.type].operation,
|
||||
userOperationType: 'leftClick',
|
||||
code: model.code,
|
||||
param: noPasswordModelTypeMap[model.type].param,
|
||||
cmdType : noPasswordModelTypeMap[model.type].nextCmdType
|
||||
@ -903,6 +921,7 @@ export default {
|
||||
} else {
|
||||
const operate = {
|
||||
operation: modelTypeMap[model.type].operation,
|
||||
userOperationType: 'leftClick',
|
||||
code: model.code,
|
||||
param: modelTypeMap[model.type].param
|
||||
};
|
||||
|
@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import { timestampFormat } from '@/utils/date';
|
||||
import SystemTime from '@/views/components/systemTime/index';
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
|
||||
@ -135,8 +135,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
const date = new Date(initTime);
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
this.time = timestampFormat('HH:mmss', initTime)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -581,8 +581,7 @@ import Rpb from '@/assets/ctc_icon/rpb.png';
|
||||
import Rpwp from '@/assets/ctc_icon/rpwp.png';
|
||||
import Rph from '@/assets/ctc_icon/rph.png';
|
||||
import RpAdd from '@/assets/ctc_icon/rpadd.png';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import { timestampFormat } from '@/utils/date';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SendRunplan from './dialog/sendRunplan';
|
||||
import StageRunplan from './dialog/stageRunplan';
|
||||
@ -653,7 +652,7 @@ export default {
|
||||
]),
|
||||
hasCommandMsg() {
|
||||
let status = false;
|
||||
if (this.dispatchCommandMsg.body) {
|
||||
if (this.dispatchCommandMsg) {
|
||||
status = true;
|
||||
}
|
||||
return status;
|
||||
@ -664,9 +663,8 @@ export default {
|
||||
},
|
||||
watch:{
|
||||
'$store.state.socket.simulationTimeSync': function (time) { // 仿真时间更新
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
|
||||
const date = new Date(+new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
|
||||
this.initDate(date);
|
||||
this.$store.dispatch('training/setInitTime', time);
|
||||
this.initDate(time);
|
||||
},
|
||||
'$store.state.training.roleDeviceCode':function(newVal, oldVal) {
|
||||
if (oldVal) {
|
||||
@ -706,14 +704,9 @@ export default {
|
||||
}
|
||||
},
|
||||
initDate(date) {
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}:${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
const years = date.getFullYear() + '';
|
||||
let months = date.getMonth() + 1 + '';
|
||||
let dates = date.getDate() + '';
|
||||
if (months.length < 2) { months = '0' + months; }
|
||||
if (dates.length < 2) { dates = '0' + dates; }
|
||||
this.dateString = years + months + dates;
|
||||
this.dateString1 = years + '年' + months + '月' + dates + '日';
|
||||
this.time = timestampFormat('HH:mm:ss', date);
|
||||
this.dateString = timestampFormat('YYYYMMDD', date);
|
||||
this.dateString1 = timestampFormat('YYYY年MM月DD日', date);
|
||||
},
|
||||
judgeColor({row, rowIndex}) {
|
||||
if (row.effect) {
|
||||
|
@ -1,14 +1,3 @@
|
||||
// SECTION 区段
|
||||
// SWITCH 道岔
|
||||
// SIGNAL 信号机
|
||||
// START_SIGNAL 进路起始信号机
|
||||
// END_SIGNAL 进路终端信号机
|
||||
|
||||
// STATION 车站
|
||||
// STAND 站台
|
||||
// ROUTE 进路
|
||||
// CYCLE 自动折返
|
||||
|
||||
// {id: "1", trainingType: "ControlConvertMenu", name: "车站名称"}
|
||||
// {id: "2", trainingType: "ControlConvertMenu", name: "车站控制模式编号"}
|
||||
// {id: "3", trainingType: "Signal", name: "进路名称"}
|
||||
@ -46,83 +35,6 @@
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
export default {
|
||||
list: [
|
||||
// 控制模式
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '请求站控({2})',
|
||||
trainingRemark: '请求站控功能',
|
||||
trainingType: 'ControlConvertMenu',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【站控】', codeType:'STATION', subType:'substation' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '请求紧急站控({2})',
|
||||
trainingRemark: '请求紧急站控功能',
|
||||
trainingType: 'ControlConvertMenu',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【紧急站控】', codeType:'STATION', subType:'emergency' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '请求中控({2})',
|
||||
trainingRemark: '请求中控功能',
|
||||
trainingType: 'ControlConvertMenu',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【中控】', codeType:'STATION', subType:'center' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.ControlConvertMenu.CMD_CM_INTERLOCK_CONTROL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '请求联锁控({2})',
|
||||
trainingRemark: '请求联锁控功能',
|
||||
trainingType: 'ControlConvertMenu',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【联锁控】', codeType:'STATION', subType:'interconnected' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
// 信号机列表
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_SET_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '办理进路({3} 进路)',
|
||||
trainingRemark: '办理进路功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【办理进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3012', tip: '鼠标左键点击【执行】按钮' },
|
||||
{ deviceType: '04', orderNum: 4, operateCode: '301', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -133,54 +45,8 @@ export default {
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3010', tip: '鼠标左键点击【排列进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'START_SIGNAL' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'END_SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '办理引导进路({3})',
|
||||
trainingRemark: '进路办理信号引导',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【办理引导进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '308', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3086', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
|
||||
{ deviceType: '04', orderNum: 4, operateCode: '3082', tip: '鼠标左键点击【执行】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '引导进路({3})[进路已锁闭]',
|
||||
trainingRemark: '进路办理信号引导',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3080', tip: '鼠标左键点击【引导进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3080', tip: '鼠标左键点击【{5}】', codeType:'START_SIGNAL'}, // 进路编号值不正确
|
||||
{ deviceType: 'mbm', orderNum: 3, operateCode: '0011', tip: '输入密码123,点击【确定】按钮', codeType: 'START_SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消进路({3} 进路)',
|
||||
trainingRemark: '取消进路功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【取消进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' }
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'START_SIGNAL' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'END_SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -196,226 +62,6 @@ export default {
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消引导({3})',
|
||||
trainingRemark: '取消引导进路功能(总取消)',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '总人解({3})',
|
||||
trainingRemark: '总人解',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '305', tip: '鼠标右键菜单选择【总人解】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3050', tip: '输入密码123,点击【执行】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '305', tip: '鼠标左键点击【确定】按钮' },
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '总人解({3})',
|
||||
trainingRemark: '总人解',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3050', tip: '鼠标左键点击【总人解】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3050', tip: '鼠标左键点击【{5}】', val: '{6}', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 8,
|
||||
minDuration: 5,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号重开({5})',
|
||||
trainingRemark: '信号重开功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 8,
|
||||
minDuration: 5,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号重开({5})',
|
||||
trainingRemark: '信号重开功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3010', tip: '鼠标左键点击【排列进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_BLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号封锁({5})',
|
||||
trainingRemark: '信号封锁',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封锁】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_BLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号封锁({5})',
|
||||
trainingRemark: '信号封锁功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【封锁】' },
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_UNBLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号解封({5})',
|
||||
trainingRemark: '信号解封',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3072', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '307', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_UNBLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号解封({5})',
|
||||
trainingRemark: '信号解封功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2992', tip: '鼠标左键点击【解封】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING.value,
|
||||
skinCode: '04',
|
||||
trainingName: '进路收人工控({3})',
|
||||
trainingRemark: '进路收人工控',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【进路收人工控】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING.value,
|
||||
skinCode: '04',
|
||||
trainingName: '人工控({5})',
|
||||
trainingRemark: '人工控',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3140', tip: '鼠标左键点击【人工控】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3140', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
],
|
||||
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
|
||||
config:{onlySignalOP:true}
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING.value,
|
||||
skinCode: '04',
|
||||
trainingName: '进路交自动控({3})',
|
||||
trainingRemark: '进路交自动控',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【进路交自动控】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING.value,
|
||||
skinCode: '04',
|
||||
trainingName: '自动控({5})',
|
||||
trainingRemark: '自动控',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3150', tip: '鼠标左键点击【自动控】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3150', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
],
|
||||
config:{onlySignalOP:true}
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType:CMD.Signal.CMD_SIGNAL_DETAIL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '查询进路信息({5} 信号机)',
|
||||
trainingRemark: '查询进路信息',
|
||||
trainingType:'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '316', tip: '鼠标右键菜单选择【进路信息】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '316', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
// 道岔列表
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION.value, // 0312 新增定位字典
|
||||
skinCode: '04',
|
||||
trainingName: '单操到定位({7})',
|
||||
trainingRemark: '单操到定位({15})',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '101', tip: '鼠标右键菜单选择【单操到定位】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '101', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
@ -427,24 +73,10 @@ export default {
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1010', tip: '鼠标左键点击【道岔定操】' },
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1010', tip: '鼠标左键点击【总定位】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1010', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION.value, // 0313 新增定位字典
|
||||
skinCode: '04',
|
||||
trainingName: '单操到反位({7})',
|
||||
trainingRemark: '单操到反位({7})',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '102', tip: '鼠标右键菜单选择【单操到反位】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '102', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -455,491 +87,9 @@ export default {
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1020', tip: '鼠标左键点击【道岔反操】' },
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1020', tip: '鼠标左键点击【总反位】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1020', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔单锁({7})',
|
||||
trainingRemark: '道岔单锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '103', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔单锁({7})',
|
||||
trainingRemark: '道岔单锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'], // 现地操作
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1030', tip: '鼠标左键点击【道岔单锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1030', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔解锁({7})',
|
||||
trainingRemark: '道岔解锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔解锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '104', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔解锁({7})',
|
||||
trainingRemark: '道岔解锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1040', tip: '鼠标左键点击【道岔解锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '1040', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_BLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔封锁({7})',
|
||||
trainingRemark: '道岔封锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔封锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1051', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '105', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_BLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔封锁({7})',
|
||||
trainingRemark: '道岔封锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【封锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '2991', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_UNBLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔解封({7})',
|
||||
trainingRemark: '道岔解封功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔解封】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1062', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '106', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_UNBLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔解封({7})',
|
||||
trainingRemark: '道岔解封功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '2992', tip: '鼠标左键点击【解封】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 20,
|
||||
minDuration: 10,
|
||||
operateType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '区故解({7})',
|
||||
trainingRemark: '道岔区段故障解锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【区故解】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1092', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '109', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
// 区段列表
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Section.CMD_SECTION_FAULT_UNLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '区故解({8}{9})',
|
||||
trainingRemark: '故障解锁功能',
|
||||
trainingType: 'Section',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '402', tip: '鼠标右键菜单选择【区故解】' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '4023', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '402', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Section.CMD_SECTION_FAULT_UNLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '区故解({8}{9})',
|
||||
trainingRemark: '故障解锁功能',
|
||||
trainingType: 'Section',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '4020', tip: '鼠标左键点击【区故解】'},
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '4020', tip: '鼠标左键点击【{8}{9}】', codeType:'SECTION' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Section.CMD_SECTION_DETAILS.value,
|
||||
skinCode: '04',
|
||||
trainingName: '属性({8}{9})',
|
||||
trainingRemark: '区段详情({8}{9})',
|
||||
trainingType: 'Section',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '410', tip: '鼠标右键菜单选择【属性】' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '410', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
// 站台列表
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置扣车({10}-{12}站台)',
|
||||
trainingRemark: '设置扣车功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【设置扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消扣车({10}-{12}站台)',
|
||||
trainingRemark: '设置取消扣车功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN.value,
|
||||
skinCode: '04',
|
||||
trainingName: '全线取消扣车',
|
||||
trainingRemark: '设置取消扣车功能({12}全线)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: 'com01', tip: '鼠标左键点击【{12}全线】按钮', val: 'true' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '505', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_JUMP_STOP.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置跳停({10}-{12}站台)',
|
||||
trainingRemark: '设置跳停功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】'},
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【跳停】', codeType:'STAND', subType:'StopJumpLamp' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_JUMP_STOP.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置跳停({10}-{12}站台)',
|
||||
trainingRemark: '设置跳停功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消跳停({10}-{12}站台)',
|
||||
trainingRemark: '设置取消跳停功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】'},
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【取消跳停】', codeType:'STAND', subType:'CancelStopJumpLamp' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消跳停({10}-{12}站台)',
|
||||
trainingRemark: '设置取消跳停功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_PARK_TIME.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置停站时间({10}-{12}站台)',
|
||||
trainingRemark: '设置停站时间(自动, 一直有效)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_PARK_TIME.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置停站时间({10}-{12}站台)',
|
||||
trainingRemark: '设置停站时间(人工, 20秒, 一直有效)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '5093', tip: '标左键点击,选择【一直有效】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_PARK_TIME.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置停站时间({10}-{12}站台)',
|
||||
trainingRemark: '设置停站时间(人工, 20秒, 一次有效)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_RUN_TIME.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置站间运行等级({10}-{12}站台)',
|
||||
trainingRemark: '设置站间运行等级(自动, 一直有效)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_RUN_TIME.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置站间运行等级({10}-{12}站台)',
|
||||
trainingRemark: '设置站间运行等级(人工, 常速, 一直有效)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5106', tip: '鼠标左键点击,选择【人工】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '5107', tip: '鼠标左键点击,取消选择【一直有效】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_RUN_TIME.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置站间运行等级({10}-{12}站台)',
|
||||
trainingRemark: '设置站间运行等级(人工, 常速, 一次有效)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5106', tip: '鼠标左键点击,选择【人工】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 8, // 自动生成实训失败
|
||||
minDuration: 5,
|
||||
operateType: CMD.Stand.CMD_STAND_VIEW_STATUS.value,
|
||||
skinCode: '04',
|
||||
trainingName: '显示站台信息({10}-{12}站台)',
|
||||
trainingRemark: '查询站台状态功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【显示站台信息】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【退出】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置自动进路({3})',
|
||||
trainingRemark: '设置自动进路功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【{3}】', codeType:'BUTTON' }
|
||||
],
|
||||
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
|
||||
config:{autoRouteBT:true}
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消自动进路({3})',
|
||||
trainingRemark: '取消自动进路功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{3}】', codeType:'BUTTON' }
|
||||
],
|
||||
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
|
||||
config:{autoRouteBT:true}
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置自动折返({3})',
|
||||
trainingRemark: '设置自动折返功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【{3}】', codeType:'BUTTON' }
|
||||
],
|
||||
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
|
||||
config:{autoCycleBT:true}
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消自动折返({3})',
|
||||
trainingRemark: '取消自动折返功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{3}】', codeType:'BUTTON' }
|
||||
],
|
||||
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
|
||||
config:{autoCycleBT:true}
|
||||
},
|
||||
/** 引导总锁 */
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Station.CMD_STATION_SET_MASTER_GUIDE_LOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '引导总锁({26})',
|
||||
trainingRemark: '设置引导总锁',
|
||||
trainingType: 'Station',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '609', tip: '鼠标左键点击【引导总锁】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '609', tip: '鼠标左键点击【{26}】', codeType:'BUTTON' }
|
||||
],
|
||||
config:{guideTotalLockBT:true}
|
||||
},
|
||||
/** 取消引导总锁 */
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Station.CMD_STATION_CANCEL_MASTER_GUIDE_LOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消引导总锁({26})',
|
||||
trainingRemark: '取消引导总锁',
|
||||
trainingType: 'Station',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '609', tip: '鼠标左键点击【引导总锁】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '609', tip: '鼠标左键点击【{26}】', codeType:'BUTTON' }
|
||||
],
|
||||
config:{guideTotalLockBT:true}
|
||||
}
|
||||
// totalGuideLock
|
||||
//
|
||||
]
|
||||
};
|
||||
|
@ -33,7 +33,7 @@
|
||||
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">与中心通信正常</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="$store.state.training.prdType == '01'&& !isCtc" style="width: 1405px;position: fixed;height: 30px;background: #808080;z-index: 9;bottom: 0;left: 0;display: flex;">
|
||||
<div v-if="$store.state.training.prdType == '01'&& !isCtc" id="tipInfoBox" style="width: 1405px;position: fixed;height: 30px;background: #808080;z-index: 9;bottom: 0;left: 0;display: flex;">
|
||||
<div style="width: 60%;height: 30px;line-height: 30px;text-align: center;">提示信息窗</div>
|
||||
<div style="width: 40%;height: 30px;line-height: 30px;text-align: center;border-left: 2px #ccc solid;">{{ '操控A:主机' + ' ' + dateString + ' ' + time }}</div>
|
||||
</div>
|
||||
@ -80,8 +80,7 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
||||
import PassiveTimeout from './passiveDialog/timeout';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import { timestampFormat } from '@/utils/date';
|
||||
import BottomTable from './bottomTable';
|
||||
import MenuPanel from './menuPanel';
|
||||
import CtcBarIcon1 from '@/assets/ctc_icon/pic1.png';
|
||||
@ -190,7 +189,7 @@ export default {
|
||||
]),
|
||||
hasCommandMsg() {
|
||||
let status = false;
|
||||
if (this.dispatchCommandMsg.body) {
|
||||
if (this.dispatchCommandMsg) {
|
||||
status = true;
|
||||
}
|
||||
return status;
|
||||
@ -210,9 +209,8 @@ export default {
|
||||
val && this.$store.dispatch('config/updateMenuBar');
|
||||
},
|
||||
'$store.state.socket.simulationTimeSync': function (time) { // 仿真时间更新
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
|
||||
const date = new Date(+new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
|
||||
this.initDate(date);
|
||||
this.$store.dispatch('training/setInitTime', time);
|
||||
this.initDate(time);
|
||||
},
|
||||
'$store.state.socket.railwaySimulationRunplanSendChange': function (val) {
|
||||
if (this.isCtc) {
|
||||
@ -273,14 +271,9 @@ export default {
|
||||
}
|
||||
},
|
||||
initDate(date) {
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}:${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
const years = date.getFullYear() + '';
|
||||
let months = date.getMonth() + 1 + '';
|
||||
let dates = date.getDate() + '';
|
||||
if (months.length < 2) { months = '0' + months; }
|
||||
if (dates.length < 2) { dates = '0' + dates; }
|
||||
this.dateString = years + months + dates;
|
||||
this.dateString1 = years + '年' + months + '月' + dates + '日';
|
||||
this.time = timestampFormat('HH:mm:ss', date);
|
||||
this.dateString = timestampFormat('YYYYMMDD', date);
|
||||
this.dateString1 = timestampFormat('YYYY年MM月DD日', date);
|
||||
},
|
||||
handleRunplan() {
|
||||
this.$refs.runplanPane.doShow();
|
||||
|
@ -349,10 +349,10 @@ export default {
|
||||
this.guideLockLeftFlag = false
|
||||
},
|
||||
'$store.state.socket.simulationTimeSync': function(val) {
|
||||
if (this.timeNode && val - this.timeNode >= 15) {
|
||||
if (this.timeNode && val - this.timeNode >= 15000) {
|
||||
this.clearOperate()
|
||||
}
|
||||
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15) {
|
||||
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15000) {
|
||||
if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'SignalButton') {
|
||||
this.$store.dispatch('training/updateMapState', [{ code: this.deviceList[0].code, _type: 'SignalButton', hasSelected: 0 }])
|
||||
} else if (
|
||||
|
@ -269,10 +269,10 @@ export default {
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationTimeSync': function (val) {
|
||||
if (this.timeNode && val - this.timeNode >= 15) {
|
||||
if (this.timeNode && val - this.timeNode >= 15000) {
|
||||
this.clearOperate();
|
||||
}
|
||||
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15) {
|
||||
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15000) {
|
||||
if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'SignalButton') {
|
||||
this.$store.dispatch('training/updateMapState', [{code: this.deviceList[0].code, _type: 'SignalButton', hasSelected: 0}]);
|
||||
} else if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'Signal' && this.deviceList[0].type === 'SHUNTING') {
|
||||
|
@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import { timestampFormat } from '@/utils/date';
|
||||
import SystemTime from '@/views/components/systemTime/index';
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
|
||||
@ -135,8 +135,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
const date = new Date(initTime);
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
this.time = timestampFormat('HH:mmss', initTime)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -564,7 +564,7 @@ export default {
|
||||
]),
|
||||
hasCommandMsg() {
|
||||
let status = false;
|
||||
if (this.dispatchCommandMsg.body) {
|
||||
if (this.dispatchCommandMsg) {
|
||||
status = true;
|
||||
}
|
||||
return status;
|
||||
|
@ -33,7 +33,7 @@
|
||||
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">与中心通信正常</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="$store.state.training.prdType == '01'&& !isCtc" style="width: 1405px;position: fixed;height: 30px;background: #808080;z-index: 9;bottom: 0;left: 0;display: flex;">
|
||||
<div v-if="$store.state.training.prdType == '01'&& !isCtc" id="tipInfoBox" style="width: 1405px;position: fixed;height: 30px;background: #808080;z-index: 9;bottom: 0;left: 0;display: flex;">
|
||||
<div style="width: 60%;height: 30px;line-height: 30px;text-align: center;">提示信息窗</div>
|
||||
<div style="width: 40%;height: 30px;line-height: 30px;text-align: center;border-left: 2px #ccc solid;">{{ '操控A:主机' + ' ' + dateString + ' ' + time }}</div>
|
||||
</div>
|
||||
@ -80,8 +80,7 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
||||
import PassiveTimeout from './passiveDialog/timeout';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import { timestampFormat } from '@/utils/date';
|
||||
import BottomTable from './bottomTable';
|
||||
import MenuPanel from './menuPanel';
|
||||
import CtcBarIcon1 from '@/assets/ctc_icon/pic1.png';
|
||||
@ -190,7 +189,7 @@ export default {
|
||||
]),
|
||||
hasCommandMsg() {
|
||||
let status = false;
|
||||
if (this.dispatchCommandMsg.body) {
|
||||
if (this.dispatchCommandMsg) {
|
||||
status = true;
|
||||
}
|
||||
return status;
|
||||
@ -210,9 +209,8 @@ export default {
|
||||
val && this.$store.dispatch('config/updateMenuBar');
|
||||
},
|
||||
'$store.state.socket.simulationTimeSync': function (time) { // 仿真时间更新
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
|
||||
const date = new Date(+new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
|
||||
this.initDate(date);
|
||||
this.$store.dispatch('training/setInitTime', time);
|
||||
this.initDate(time);
|
||||
},
|
||||
'$store.state.socket.railwaySimulationRunplanSendChange': function (val) {
|
||||
if (this.isCtc) {
|
||||
@ -273,14 +271,9 @@ export default {
|
||||
}
|
||||
},
|
||||
initDate(date) {
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}:${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
const years = date.getFullYear() + '';
|
||||
let months = date.getMonth() + 1 + '';
|
||||
let dates = date.getDate() + '';
|
||||
if (months.length < 2) { months = '0' + months; }
|
||||
if (dates.length < 2) { dates = '0' + dates; }
|
||||
this.dateString = years + months + dates;
|
||||
this.dateString1 = years + '年' + months + '月' + dates + '日';
|
||||
this.time = timestampFormat('HH:mm:ss', date);
|
||||
this.dateString = timestampFormat('YYYYMMDD', date);
|
||||
this.dateString1 = timestampFormat('YYYY年MM月DD日', date);
|
||||
},
|
||||
handleRunplan() {
|
||||
this.$refs.runplanPane.doShow();
|
||||
|
@ -273,7 +273,7 @@ export default {
|
||||
this.clearOperate();
|
||||
},
|
||||
'$store.state.socket.simulationTimeSync': function(val) {
|
||||
if (this.timeNode && val - this.timeNode >= 15) {
|
||||
if (this.timeNode && val - this.timeNode >= 15000) {
|
||||
this.clearOperate();
|
||||
}
|
||||
const routeDeviceList = [];
|
||||
@ -289,7 +289,7 @@ export default {
|
||||
routeDeviceList.forEach(item => {
|
||||
updateList.push({ code: item.code, _type: item._type, toSelected: 0 });
|
||||
});
|
||||
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15) {
|
||||
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15000) {
|
||||
if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'SignalButton') {
|
||||
this.$store.dispatch('training/updateMapState', updateList);
|
||||
} else if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'Signal' && this.deviceList[0].type === 'SHUNTING') {
|
||||
|
@ -269,10 +269,10 @@ export default {
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationTimeSync': function (val) {
|
||||
if (this.timeNode && val - this.timeNode >= 15) {
|
||||
if (this.timeNode && val - this.timeNode >= 15000) {
|
||||
this.clearOperate();
|
||||
}
|
||||
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15) {
|
||||
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15000) {
|
||||
if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'SignalButton') {
|
||||
this.$store.dispatch('training/updateMapState', [{code: this.deviceList[0].code, _type: 'SignalButton', hasSelected: 0}]);
|
||||
} else if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'Signal' && this.deviceList[0].type === 'SHUNTING') {
|
||||
|
@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import { timestampFormat } from '@/utils/date';
|
||||
import SystemTime from '@/views/components/systemTime/index';
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
|
||||
@ -135,8 +135,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
const date = new Date(initTime);
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
this.time = timestampFormat('HH:mmss', initTime)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -10,7 +10,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import { timestampFormat } from '@/utils/date';
|
||||
import SystemTime from '@/views/components/systemTime/index';
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
|
||||
@ -126,8 +126,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
const date = new Date(initTime);
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
this.time = timestampFormat('HH:mmss', initTime)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -214,6 +214,8 @@ const FrontProjectConfigManage = () => import('@/views/system/frontProjectConfig
|
||||
const IscsDeviceManage = () => import('@/views/system/iscsDeviceManage');
|
||||
const IscsResourcesManage = () => import('@/views/system/iscsResourcesManage');
|
||||
|
||||
const PisScreen = () => import('@/views/pis/index')
|
||||
|
||||
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
|
||||
// import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
@ -720,6 +722,11 @@ export const publicAsyncRoute = [
|
||||
path: '/bigTrainRunplanManage',
|
||||
component: BigTrainRunplanManage,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/pis',
|
||||
component: PisScreen,
|
||||
hidden: true
|
||||
}
|
||||
|
||||
];
|
||||
|
@ -1,296 +1,277 @@
|
||||
export default {
|
||||
ConstSelect: {
|
||||
Status: [
|
||||
{ label: '无效', value: '0' },
|
||||
{ label: '有效', value: '1' }
|
||||
],
|
||||
ConstSelect: {
|
||||
Status: [{ label: '无效', value: '0' }, { label: '有效', value: '1' }],
|
||||
|
||||
Whether: [
|
||||
{ label: '否', value: false },
|
||||
{ label: '是', value: true }
|
||||
],
|
||||
Whether: [{ label: '否', value: false }, { label: '是', value: true }],
|
||||
|
||||
DirectionCodeList: [
|
||||
{ value: '2', label: '上行' },
|
||||
{ value: '1', label: '下行' }
|
||||
],
|
||||
DirectionCodeList: [{ value: '2', label: '上行' }, { value: '1', label: '下行' }],
|
||||
|
||||
SignalLeftOrRightList: [
|
||||
{ label: '左侧', value: 'L' },
|
||||
{ label: '右侧', value: 'R' }
|
||||
],
|
||||
SignalLeftOrRightList: [{ label: '左侧', value: 'L' }, { label: '右侧', value: 'R' }],
|
||||
|
||||
roleList: [
|
||||
{ label: '实训用户', value: '01' },
|
||||
{ label: '地图生产者', value: '02' },
|
||||
{ label: '课程生成者', value: '03' },
|
||||
{ label: '系统管理员', value: '04' },
|
||||
{ label: '超级管理员', value: '05' },
|
||||
{ label: '销售用户', value: '06' }
|
||||
],
|
||||
roleList: [
|
||||
{ label: '实训用户', value: '01' },
|
||||
{ label: '地图生产者', value: '02' },
|
||||
{ label: '课程生成者', value: '03' },
|
||||
{ label: '系统管理员', value: '04' },
|
||||
{ label: '超级管理员', value: '05' },
|
||||
{ label: '销售用户', value: '06' },
|
||||
],
|
||||
|
||||
examResultList: [
|
||||
{ label: '未计算', value: '01' },
|
||||
{ label: '通过', value: '02' },
|
||||
{ label: '未通过', value: '03' },
|
||||
{ label: '已放弃', value: '04' }
|
||||
],
|
||||
examResultList: [
|
||||
{ label: '未计算', value: '01' },
|
||||
{ label: '通过', value: '02' },
|
||||
{ label: '未通过', value: '03' },
|
||||
{ label: '已放弃', value: '04' },
|
||||
],
|
||||
|
||||
PermissionUseList: [
|
||||
{ label: '公用', value: true },
|
||||
{ label: '专用', value: false }
|
||||
],
|
||||
PermissionUseList: [{ label: '公用', value: true }, { label: '专用', value: false }],
|
||||
|
||||
RegionTypeList: [
|
||||
{ label: '零点西上行', value: '01' },
|
||||
{ label: '零点西下行', value: '02' },
|
||||
{ label: '零西渡线/', value: '03' },
|
||||
{ label: '零西渡线\\', value: '04' },
|
||||
{ label: 'PGY一联段线', value: '05' },
|
||||
{ label: '零点东上行', value: '06' },
|
||||
{ label: '零点东下行', value: '07' },
|
||||
{ label: '零东渡线/', value: '08' },
|
||||
{ label: '零东渡线\\', value: '09' },
|
||||
{ label: '库线1', value: '10' },
|
||||
{ label: '库线2', value: '11' },
|
||||
{ label: '库线渡线/', value: '12' },
|
||||
{ label: '库线渡线\\', value: '13' },
|
||||
{ label: '联络线1', value: '14' },
|
||||
{ label: '联络线2', value: '15' },
|
||||
{ label: 'SHZ一联段线', value: '16' },
|
||||
{ label: 'SHZ二联段线', value: '17' },
|
||||
{ label: 'SHD三联段线', value: '18' },
|
||||
{ label: 'SHD四联段线', value: '19' }
|
||||
],
|
||||
roleTypeNew:[
|
||||
{label: '管理员', value: 'ADMIN', enLabel: 'Admin '},
|
||||
{label: '教员', value: 'Instructor', enLabel: 'Instructor '},
|
||||
{label: '行值', value: 'STATION_SUPERVISOR', enLabel: 'Attendant '},
|
||||
{label: '观众', value: 'AUDIENCE', enLabel: 'Audience '},
|
||||
{label: '司机', value: 'DRIVER', enLabel: 'Driver '},
|
||||
{label: '通号', value: 'MAINTAINER', enLabel: 'Repairman '},
|
||||
{label: '车辆段信号楼', value: 'DEPOT_DISPATCHER', enLabel: 'Depot dispatcher '},
|
||||
{label: '电力调度', value: 'ELECTRIC_DISPATCHER', enLabel: 'Electric dispatcher'},
|
||||
{label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '},
|
||||
{label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent department'},
|
||||
{label: '停车场信号楼', value: 'PARKING_LOT_SIGNAL_BUILDING', enLabel: 'Parking Signal Building'},
|
||||
{label: '车站助理', value: 'STATION_ASSISTANT', enLabel: 'StationAssistant'},
|
||||
{label: '车站站长', value: 'STATION_MASTER', enLabel: 'StationMaster'},
|
||||
{label: '车站信号员', value: 'STATION_SIGNALER', enLabel: 'StationSignaler'},
|
||||
{label: '车站客运员', value: 'STATION_PASSENGER', enLabel: 'StationPassenger'},
|
||||
{label: '车站扳道员', value: 'STATION_SWITCH_MAN', enLabel: 'StationSwitchMan'},
|
||||
{label: '车站引导员', value: 'STATION_FACILITATOR', enLabel: 'StationFacilitator'},
|
||||
{label: '车站工务工', value: 'STATION_WORKER', enLabel: 'StationWorker'},
|
||||
{label: '设备管理员', value: 'DEVICE_MANAGER', enLabel: 'DeviceManager'},
|
||||
{label: '车务段段长', value: 'TRAIN_MASTER', enLabel: 'Train_Master'}
|
||||
RegionTypeList: [
|
||||
{ label: '零点西上行', value: '01' },
|
||||
{ label: '零点西下行', value: '02' },
|
||||
{ label: '零西渡线/', value: '03' },
|
||||
{ label: '零西渡线\\', value: '04' },
|
||||
{ label: 'PGY一联段线', value: '05' },
|
||||
{ label: '零点东上行', value: '06' },
|
||||
{ label: '零点东下行', value: '07' },
|
||||
{ label: '零东渡线/', value: '08' },
|
||||
{ label: '零东渡线\\', value: '09' },
|
||||
{ label: '库线1', value: '10' },
|
||||
{ label: '库线2', value: '11' },
|
||||
{ label: '库线渡线/', value: '12' },
|
||||
{ label: '库线渡线\\', value: '13' },
|
||||
{ label: '联络线1', value: '14' },
|
||||
{ label: '联络线2', value: '15' },
|
||||
{ label: 'SHZ一联段线', value: '16' },
|
||||
{ label: 'SHZ二联段线', value: '17' },
|
||||
{ label: 'SHD三联段线', value: '18' },
|
||||
{ label: 'SHD四联段线', value: '19' },
|
||||
],
|
||||
roleTypeNew: [
|
||||
{ label: '管理员', value: 'ADMIN', enLabel: 'Admin ' },
|
||||
{ label: '教员', value: 'Instructor', enLabel: 'Instructor ' },
|
||||
{ label: '行值', value: 'STATION_SUPERVISOR', enLabel: 'Attendant ' },
|
||||
{ label: '观众', value: 'AUDIENCE', enLabel: 'Audience ' },
|
||||
{ label: '司机', value: 'DRIVER', enLabel: 'Driver ' },
|
||||
{ label: '通号', value: 'MAINTAINER', enLabel: 'Repairman ' },
|
||||
{ label: '车辆段信号楼', value: 'DEPOT_DISPATCHER', enLabel: 'Depot dispatcher ' },
|
||||
{ label: '电力调度', value: 'ELECTRIC_DISPATCHER', enLabel: 'Electric dispatcher' },
|
||||
{ label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher ' },
|
||||
{ label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent department' },
|
||||
{ label: '停车场信号楼', value: 'PARKING_LOT_SIGNAL_BUILDING', enLabel: 'Parking Signal Building' },
|
||||
{ label: '车站助理', value: 'STATION_ASSISTANT', enLabel: 'StationAssistant' },
|
||||
{ label: '车站站长', value: 'STATION_MASTER', enLabel: 'StationMaster' },
|
||||
{ label: '车站信号员', value: 'STATION_SIGNALER', enLabel: 'StationSignaler' },
|
||||
{ label: '车站客运员', value: 'STATION_PASSENGER', enLabel: 'StationPassenger' },
|
||||
{ label: '车站扳道员', value: 'STATION_SWITCH_MAN', enLabel: 'StationSwitchMan' },
|
||||
{ label: '车站引导员', value: 'STATION_FACILITATOR', enLabel: 'StationFacilitator' },
|
||||
{ label: '车站工务工', value: 'STATION_WORKER', enLabel: 'StationWorker' },
|
||||
{ label: '设备管理员', value: 'DEVICE_MANAGER', enLabel: 'DeviceManager' },
|
||||
{ label: '车务段段长', value: 'TRAIN_MASTER', enLabel: 'Train_Master' },
|
||||
],
|
||||
|
||||
],
|
||||
releaseReview: [
|
||||
{ enlabel: 'Unpublished', label: '未发布', value: '0' },
|
||||
{ enlabel: 'Pending review', label: '待审核', value: '1' },
|
||||
{ enlabel: 'Successfully released', label: '发布成功', value: '2' },
|
||||
{ enlabel: 'Overrule', label: '被驳回', value: '3' },
|
||||
],
|
||||
productType: [
|
||||
{ enlabel: 'Lesson System', label: '教学系统', value: 'Lesson' },
|
||||
{ enlabel: 'Exam System', label: '考试系统', value: 'Exam' },
|
||||
{ enlabel: 'Simulation System', label: '仿真系统', value: 'Simulation' },
|
||||
{ enlabel: 'Plan Draw', label: '运行图编制', value: 'Plan' },
|
||||
],
|
||||
customeredProductType: [{ enlabel: 'Plan Draw', label: '运行图编制', value: 'Plan' }],
|
||||
|
||||
releaseReview: [
|
||||
{ enlabel: 'Unpublished', label: '未发布', value: '0'},
|
||||
{ enlabel: 'Pending review', label: '待审核', value: '1'},
|
||||
{ enlabel: 'Successfully released', label: '发布成功', value: '2'},
|
||||
{ enlabel: 'Overrule', label: '被驳回', value: '3'}
|
||||
],
|
||||
productType: [
|
||||
{ enlabel: 'Lesson System', label: '教学系统', value: 'Lesson'},
|
||||
{ enlabel: 'Exam System', label: '考试系统', value: 'Exam'},
|
||||
{ enlabel: 'Simulation System', label: '仿真系统', value: 'Simulation'},
|
||||
{ enlabel: 'Plan Draw', label: '运行图编制', value: 'Plan'}
|
||||
],
|
||||
customeredProductType: [
|
||||
{ enlabel: 'Plan Draw', label: '运行图编制', value: 'Plan'}
|
||||
],
|
||||
controlMode: [
|
||||
{ label: '中控', value: 'OperateCenterControl' },
|
||||
{ label: '站控', value: 'LocalStationControl' },
|
||||
{ label: '紧急站控', value: 'EmergencyStationControl' },
|
||||
{ label: '联锁控', value: 'InterlockStationControl' },
|
||||
],
|
||||
|
||||
controlMode: [
|
||||
{ label: '中控', value: 'OperateCenterControl' },
|
||||
{ label: '站控', value: 'LocalStationControl' },
|
||||
{ label: '紧急站控', value: 'EmergencyStationControl' },
|
||||
{ label: '联锁控', value: 'InterlockStationControl' }
|
||||
],
|
||||
simulationRole: [
|
||||
{ label: '行调操作', value: 'Center' },
|
||||
{ label: '现地操作', value: 'Local' },
|
||||
{ label: '车辆段操作', value: 'Depot_IL' },
|
||||
],
|
||||
|
||||
simulationRole: [
|
||||
{ label: '行调操作', value: 'Center' },
|
||||
{ label: '现地操作', value: 'Local' },
|
||||
{ label: '车辆段操作', value: 'Depot_IL'}
|
||||
],
|
||||
deviceTypeList: [
|
||||
{ label: '区段', value: 'Section' },
|
||||
{ label: '道岔', value: 'Switch' },
|
||||
{ label: '信号机', value: 'Signal' },
|
||||
{ label: '站台', value: 'Stand' },
|
||||
{ label: '车站', value: 'Station' },
|
||||
{ label: '控制模式', value: 'ControlConvertMenu' },
|
||||
{ label: '车次窗', value: 'TrainWindow' },
|
||||
{ label: '全线限速', value: 'LimitControl' },
|
||||
{ label: '司机', value: 'Driver' },
|
||||
{ label: '列车', value: 'Train' },
|
||||
{ label: '方向杆', value: 'DirectionRod' },
|
||||
{ label: 'CTC', value: 'CTC' },
|
||||
{ label: '路票', value: 'RAIL' },
|
||||
{ label: '会话', value: 'Conversation' },
|
||||
],
|
||||
|
||||
deviceTypeList: [
|
||||
{ label: '区段', value: 'Section' },
|
||||
{ label: '道岔', value: 'Switch' },
|
||||
{ label: '信号机', value: 'Signal' },
|
||||
{ label: '站台', value: 'Stand' },
|
||||
{ label: '车站', value: 'Station' },
|
||||
{ label: '控制模式', value: 'ControlConvertMenu' },
|
||||
{ label: '车次窗', value: 'TrainWindow' },
|
||||
{ label: '全线限速', value: 'LimitControl' },
|
||||
{ label: '司机', value: 'Driver' },
|
||||
{ label: '列车', value: 'Train' },
|
||||
{ label: '方向杆', value: 'DirectionRod'},
|
||||
{ label: 'CTC', value: 'CTC' },
|
||||
{ label: '路票', value: 'RAIL' }
|
||||
],
|
||||
|
||||
simulationDeviceList:[
|
||||
{label:'区段', value:'SECTION'},
|
||||
{label:'计轴器', value:'AXLE_COUNTER'},
|
||||
{label:'道岔', value:'SWITCH'},
|
||||
{label:'信号机', value:'SIGNAL'},
|
||||
{label:'车站', value:'STATION'},
|
||||
{label:'站台', value:'STAND'},
|
||||
{label:'屏蔽门', value:'PSD'},
|
||||
{label:'紧急停车按钮', value:'ESP'},
|
||||
{label:'区域控制器', value:'ZC'},
|
||||
{label:'线路控制器', value:'LC'},
|
||||
{label:'进路', value:'ROUTE'},
|
||||
{label:'进路延续保护', value:'OVERLAP'},
|
||||
{label:'自动信号', value:'AUTO_SIGNAL'},
|
||||
{label:'自动折返', value:'CYCLE'},
|
||||
{label:'列车', value:'TRAIN'},
|
||||
{label:'列车门', value:'TRAIN_DOOR'},
|
||||
{label:'交路', value:'ROUTING'},
|
||||
{label:'站间运行等级', value:'RUN_LEVEL'}
|
||||
],
|
||||
QuestionTypeList: [
|
||||
{ label: '选择题', value: 'select' },
|
||||
{ label: '判断题', value: 'judge' },
|
||||
{ label: '多选题', value: 'multi'},
|
||||
{ label: '填空题', value: 'fill'},
|
||||
{ label: '问答题', value: 'answer'}
|
||||
],
|
||||
// 新版的产品类型枚举
|
||||
prdType:[
|
||||
{ enlabel: 'ATS local workstation', label: 'ATS现地工作站', value: '01'},
|
||||
{ enlabel: 'ATS Traffic dispatching workstation', label: 'ATS行调工作站', value: '02'},
|
||||
{ enlabel: 'Comprehensive exercise cloud platform', label: '综合演练云平台', value: '03'},
|
||||
{ enlabel: 'Driver simulation driving system', label: '司机模拟驾驶系统', value: '04'},
|
||||
{ enlabel: 'Dispatch workstation', label: '派班工作站', value: '05'},
|
||||
{ enlabel: 'ISCS workstation', label: 'ISCS工作站', value: '06'},
|
||||
{ enlabel: 'Interlocking station at depot', label: '车辆段联锁工作站', value: '09' },
|
||||
{ enlabel: 'Large screen vehicle real workstation', label: '大屏车辆真实工作站', value: '10' }
|
||||
],
|
||||
trainingDeviceType: {
|
||||
Switch: {enlabel: 'Switch training', label:'道岔实训'},
|
||||
Section: {enlabel: 'Section training', label:'区段实训'},
|
||||
Signal: {enlabel: 'Signal training', label:'信号机实训'},
|
||||
Stand: {enlabel: 'Stand training', label:'站台实训'},
|
||||
Station: {enlabel: 'Station training', label:'车站实训'},
|
||||
Train: { enlabel: 'Train training', label: '列车实训'},
|
||||
ControlConvertMenu: {enlabel: 'Control mode training', label:'控制模式实训'},
|
||||
LimitControl: {enlabel: 'Control mode limit', label:'全线限速实训'},
|
||||
TrainWindow: {enlabel: 'TrainWindow training', label:'车次窗实训'},
|
||||
Driver: {enlabel: 'Driver training', label:'司机实训'},
|
||||
DirectionRod: {enlabel: 'Direction rod training', label:'方向杆实训'}
|
||||
},
|
||||
interfaceErrorConfig: {
|
||||
'500000': { type: '权限错误:', message: '您尚未有该操作权限!'},
|
||||
'500004': { type: '权限错误:', message: '您剩余的权限数量不足!'},
|
||||
'500005': { type: '权限错误:', message: '您的权限时间已过!'},
|
||||
'500006': { type: '权限错误:', message: '您已经领取,不能重复领取!'},
|
||||
'500007': { type: '权限错误:', message: '剩余分发权限数量不足!'},
|
||||
'500010': { type: '支付错误:', message: '微信统一支付调用失败!'}
|
||||
},
|
||||
projectDeviceTypeList:[
|
||||
{label: '道岔', value: 'SWITCH'},
|
||||
{label: '信号机', value:'SIGNAL'},
|
||||
{label: '屏蔽门', value: 'PSD'},
|
||||
{label: 'IBP盘', value: 'IBP'},
|
||||
{label: '虚拟IBP盘', value: 'VR_IBP'},
|
||||
{label: '教员机', value: 'IM'},
|
||||
{label: '行调工作站', value: 'CW'},
|
||||
{label: '现地工作站', value: 'LW'},
|
||||
{label: '大屏工作站', value: 'LSW'},
|
||||
{label: '列车驾驶终端', value: 'DRIVE'},
|
||||
{label: '虚拟站台屏蔽门终端', value: 'VR_PSD'},
|
||||
{label: '现地综合监控', value: 'ISCS_LW'},
|
||||
{label: '中心综合监控', value: 'ISCS_CW'},
|
||||
{label: '车辆段终端', value: 'DEPOT'},
|
||||
{label: '派班工作站', value: 'SCHEDULING'},
|
||||
{label: '虚拟CCTV', value: 'CCTV'},
|
||||
{label: 'PLC网关', value: 'PLC_GATEWAY'},
|
||||
{label: '端头控制盒', value: 'PSL'},
|
||||
{label: 'PSC控制柜', value: 'PSC'},
|
||||
{label: '虚拟电子沙盘', value: 'SANDBOX'},
|
||||
{label: '联锁工作站', value: 'ILW'},
|
||||
{label: 'UDP下位机', value: 'UDP_LOW'},
|
||||
{label: '区段', value: 'SECTION'},
|
||||
{label: '列车', value: 'TRAIN'},
|
||||
{label: 'UDP客户端', value: 'UDP_CLIENT'}
|
||||
],
|
||||
ossList: [
|
||||
{ name: '场景1', url: '场景1—桂花园道岔故障(配分版60分).pdf' },
|
||||
{ name: '场景2', url: '场景2—体育馆道岔故障(配分版60分).pdf' },
|
||||
{ name: '场景3', url: '场景3—火车站道岔故障(配分版60分).pdf' },
|
||||
{ name: '场景4', url: '场景4—列车救援(配分版60分).pdf' },
|
||||
{ name: '场景5', url: '场景5—接触网无电(配分版60分).pdf' },
|
||||
{ name: '场景6', url: '场景6—计轴故障试题(配分版60分).pdf' },
|
||||
{ name: '场景7', url: '场景7—大学城道岔故障(配分版40分).pdf' },
|
||||
{ name: '场景8', url: '场景8—车站照明故障(配分版40分).pdf' },
|
||||
{ name: '场景9', url: '场景9—车站站台门故障(配分版40分).pdf' },
|
||||
{ name: '场景10', url: '场景10—列车限速(配分版40分).pdf' },
|
||||
{ name: '场景11', url: '场景11—区间疏导乘客(配分版40分).pdf' },
|
||||
{ name: '场景12', url: '场景12—区域控制器故障(配分版40分).pdf' }
|
||||
],
|
||||
responderTypeList: [
|
||||
{ name: '固定应答器', value: 'FB'},
|
||||
{ name: '可变应答器', value: 'VB'},
|
||||
{ name: '填充应答器', value: 'IB'}
|
||||
],
|
||||
loadRuleList: [
|
||||
{ label: '每日加载', value:'EVERY_DAY' },
|
||||
{ label: '周内加载', value: 'WITHIN_A_WEEK' },
|
||||
{ label: '周末加载', value: 'WEEKEND' }
|
||||
],
|
||||
turnBackTypeList: [
|
||||
{ label: '无折返', value: 'NONE' },
|
||||
{ label: '默认', value: 'DEFAULT' },
|
||||
{ label: '自动换端', value: 'AUTO' },
|
||||
{ label: '无人折返', value: 'UNMANNED' }
|
||||
],
|
||||
directionLabelList: [
|
||||
{ label: 'X', value: 'X' },
|
||||
{ label: 'XF', value: 'XF' },
|
||||
{ label: 'XD', value: 'XD' },
|
||||
{ label: 'S', value: 'S' },
|
||||
{ label: 'SF', value: 'SF' },
|
||||
{ label: 'SD', value: 'SD' }
|
||||
],
|
||||
trainingType: [ // 实训类型
|
||||
{ enlabel: 'single operation', label: '单操', value: 'SINGLE'},
|
||||
{ enlabel: 'scene operation', label: '场景', value: 'SCENE'}
|
||||
],
|
||||
ioDirectionList:[ // 出入口类型
|
||||
{value:'DOWN_IN_STATION', label:'下行进站'},
|
||||
{value:'UP_IN_STATION', label :'上行进站'},
|
||||
{value:'DOWN_OUT_STATION', label:'下行出站'},
|
||||
{value:'UP_OUT_STATION', label:'上行出站'},
|
||||
{value:'BOTH_WAY_STATION', label:'双向'}
|
||||
],
|
||||
conditionList: [
|
||||
{ label: '标识状态', value: 'S' },
|
||||
{ label: '表达式', value: 'E' },
|
||||
{ label: '代表值', value: 'V' }
|
||||
],
|
||||
operationList: [
|
||||
{ label: '且', value: 'AND' },
|
||||
{ label: '或', value: 'OR' },
|
||||
{ label: '非', value: 'NOT' },
|
||||
{ label: '是', value: 'IS' },
|
||||
{ label: '等于', value: 'EQ' },
|
||||
{ label: '不等于', value: 'NEQ' },
|
||||
{ label: '大于', value: 'GT' },
|
||||
{ label: '大于等于', value: 'GTOE' },
|
||||
{ label: '小于', value: 'LT' },
|
||||
{ label: '小于等于', value: 'LTOE' }
|
||||
],
|
||||
operationDeviceList: [
|
||||
{ label: '区段', value: 'Section' },
|
||||
{ label: '道岔', value: 'Switch' },
|
||||
{ label: '信号机', value: 'Signal' },
|
||||
{ label: '站台', value: 'Stand' },
|
||||
{ label: '车站', value: 'Station' },
|
||||
{label:'进路', value:'Route'},
|
||||
{ label: '列车', value: 'Train' }
|
||||
]
|
||||
}
|
||||
};
|
||||
simulationDeviceList: [
|
||||
{ label: '区段', value: 'SECTION' },
|
||||
{ label: '计轴器', value: 'AXLE_COUNTER' },
|
||||
{ label: '道岔', value: 'SWITCH' },
|
||||
{ label: '信号机', value: 'SIGNAL' },
|
||||
{ label: '车站', value: 'STATION' },
|
||||
{ label: '站台', value: 'STAND' },
|
||||
{ label: '屏蔽门', value: 'PSD' },
|
||||
{ label: '紧急停车按钮', value: 'ESP' },
|
||||
{ label: '区域控制器', value: 'ZC' },
|
||||
{ label: '线路控制器', value: 'LC' },
|
||||
{ label: '进路', value: 'ROUTE' },
|
||||
{ label: '进路延续保护', value: 'OVERLAP' },
|
||||
{ label: '自动信号', value: 'AUTO_SIGNAL' },
|
||||
{ label: '自动折返', value: 'CYCLE' },
|
||||
{ label: '列车', value: 'TRAIN' },
|
||||
{ label: '列车门', value: 'TRAIN_DOOR' },
|
||||
{ label: '交路', value: 'ROUTING' },
|
||||
{ label: '站间运行等级', value: 'RUN_LEVEL' },
|
||||
],
|
||||
QuestionTypeList: [
|
||||
{ label: '选择题', value: 'select' },
|
||||
{ label: '判断题', value: 'judge' },
|
||||
{ label: '多选题', value: 'multi' },
|
||||
{ label: '填空题', value: 'fill' },
|
||||
{ label: '问答题', value: 'answer' },
|
||||
],
|
||||
// 新版的产品类型枚举
|
||||
prdType: [
|
||||
{ enlabel: 'ATS local workstation', label: 'ATS现地工作站', value: '01' },
|
||||
{ enlabel: 'ATS Traffic dispatching workstation', label: 'ATS行调工作站', value: '02' },
|
||||
{ enlabel: 'Comprehensive exercise cloud platform', label: '综合演练云平台', value: '03' },
|
||||
{ enlabel: 'Driver simulation driving system', label: '司机模拟驾驶系统', value: '04' },
|
||||
{ enlabel: 'Dispatch workstation', label: '派班工作站', value: '05' },
|
||||
{ enlabel: 'ISCS workstation', label: 'ISCS工作站', value: '06' },
|
||||
{ enlabel: 'Interlocking station at depot', label: '车辆段联锁工作站', value: '09' },
|
||||
{ enlabel: 'Large screen vehicle real workstation', label: '应急调度指挥系统', value: '10' },
|
||||
],
|
||||
trainingDeviceType: {
|
||||
Switch: { enlabel: 'Switch training', label: '道岔实训' },
|
||||
Section: { enlabel: 'Section training', label: '区段实训' },
|
||||
Signal: { enlabel: 'Signal training', label: '信号机实训' },
|
||||
Stand: { enlabel: 'Stand training', label: '站台实训' },
|
||||
Station: { enlabel: 'Station training', label: '车站实训' },
|
||||
Train: { enlabel: 'Train training', label: '列车实训' },
|
||||
ControlConvertMenu: { enlabel: 'Control mode training', label: '控制模式实训' },
|
||||
LimitControl: { enlabel: 'Control mode limit', label: '全线限速实训' },
|
||||
TrainWindow: { enlabel: 'TrainWindow training', label: '车次窗实训' },
|
||||
Driver: { enlabel: 'Driver training', label: '司机实训' },
|
||||
DirectionRod: { enlabel: 'Direction rod training', label: '方向杆实训' },
|
||||
},
|
||||
interfaceErrorConfig: {
|
||||
'500000': { type: '权限错误:', message: '您尚未有该操作权限!' },
|
||||
'500004': { type: '权限错误:', message: '您剩余的权限数量不足!' },
|
||||
'500005': { type: '权限错误:', message: '您的权限时间已过!' },
|
||||
'500006': { type: '权限错误:', message: '您已经领取,不能重复领取!' },
|
||||
'500007': { type: '权限错误:', message: '剩余分发权限数量不足!' },
|
||||
'500010': { type: '支付错误:', message: '微信统一支付调用失败!' },
|
||||
},
|
||||
projectDeviceTypeList: [
|
||||
{ label: '道岔', value: 'SWITCH' },
|
||||
{ label: '信号机', value: 'SIGNAL' },
|
||||
{ label: '屏蔽门', value: 'PSD' },
|
||||
{ label: 'IBP盘', value: 'IBP' },
|
||||
{ label: '虚拟IBP盘', value: 'VR_IBP' },
|
||||
{ label: '教员机', value: 'IM' },
|
||||
{ label: '行调工作站', value: 'CW' },
|
||||
{ label: '现地工作站', value: 'LW' },
|
||||
{ label: '大屏工作站', value: 'LSW' },
|
||||
{ label: '列车驾驶终端', value: 'DRIVE' },
|
||||
{ label: '虚拟站台屏蔽门终端', value: 'VR_PSD' },
|
||||
{ label: '现地综合监控', value: 'ISCS_LW' },
|
||||
{ label: '中心综合监控', value: 'ISCS_CW' },
|
||||
{ label: '车辆段终端', value: 'DEPOT' },
|
||||
{ label: '派班工作站', value: 'SCHEDULING' },
|
||||
{ label: '虚拟CCTV', value: 'CCTV' },
|
||||
{ label: 'PLC网关', value: 'PLC_GATEWAY' },
|
||||
{ label: '端头控制盒', value: 'PSL' },
|
||||
{ label: 'PSC控制柜', value: 'PSC' },
|
||||
{ label: '虚拟电子沙盘', value: 'SANDBOX' },
|
||||
{ label: '联锁工作站', value: 'ILW' },
|
||||
{ label: 'UDP下位机', value: 'UDP_LOW' },
|
||||
{ label: '区段', value: 'SECTION' },
|
||||
{ label: '列车', value: 'TRAIN' },
|
||||
{ label: 'UDP客户端', value: 'UDP_CLIENT' },
|
||||
{ label: '站台PIS', value: 'PIS_STAND' },
|
||||
{ label: '列车PIS', value: 'PIS_TRAIN' },
|
||||
],
|
||||
ossList: [
|
||||
{ name: '场景1', url: '场景1—桂花园道岔故障(配分版60分).pdf' },
|
||||
{ name: '场景2', url: '场景2—体育馆道岔故障(配分版60分).pdf' },
|
||||
{ name: '场景3', url: '场景3—火车站道岔故障(配分版60分).pdf' },
|
||||
{ name: '场景4', url: '场景4—列车救援(配分版60分).pdf' },
|
||||
{ name: '场景5', url: '场景5—接触网无电(配分版60分).pdf' },
|
||||
{ name: '场景6', url: '场景6—计轴故障试题(配分版60分).pdf' },
|
||||
{ name: '场景7', url: '场景7—大学城道岔故障(配分版40分).pdf' },
|
||||
{ name: '场景8', url: '场景8—车站照明故障(配分版40分).pdf' },
|
||||
{ name: '场景9', url: '场景9—车站站台门故障(配分版40分).pdf' },
|
||||
{ name: '场景10', url: '场景10—列车限速(配分版40分).pdf' },
|
||||
{ name: '场景11', url: '场景11—区间疏导乘客(配分版40分).pdf' },
|
||||
{ name: '场景12', url: '场景12—区域控制器故障(配分版40分).pdf' },
|
||||
],
|
||||
responderTypeList: [{ name: '固定应答器', value: 'FB' }, { name: '可变应答器', value: 'VB' }, { name: '填充应答器', value: 'IB' }],
|
||||
loadRuleList: [
|
||||
{ label: '每日加载', value: 'EVERY_DAY' },
|
||||
{ label: '周内加载', value: 'WITHIN_A_WEEK' },
|
||||
{ label: '周末加载', value: 'WEEKEND' },
|
||||
],
|
||||
turnBackTypeList: [
|
||||
{ label: '无折返', value: 'NONE' },
|
||||
{ label: '默认', value: 'DEFAULT' },
|
||||
{ label: '自动换端', value: 'AUTO' },
|
||||
{ label: '无人折返', value: 'UNMANNED' },
|
||||
],
|
||||
directionLabelList: [
|
||||
{ label: 'X', value: 'X' },
|
||||
{ label: 'XF', value: 'XF' },
|
||||
{ label: 'XD', value: 'XD' },
|
||||
{ label: 'S', value: 'S' },
|
||||
{ label: 'SF', value: 'SF' },
|
||||
{ label: 'SD', value: 'SD' },
|
||||
],
|
||||
trainingType: [
|
||||
// 实训类型
|
||||
{ enlabel: 'single operation', label: '单操', value: 'SINGLE' },
|
||||
{ enlabel: 'scene operation', label: '场景', value: 'SCENE' },
|
||||
],
|
||||
ioDirectionList: [
|
||||
// 出入口类型
|
||||
{ value: 'DOWN_IN_STATION', label: '下行进站' },
|
||||
{ value: 'UP_IN_STATION', label: '上行进站' },
|
||||
{ value: 'DOWN_OUT_STATION', label: '下行出站' },
|
||||
{ value: 'UP_OUT_STATION', label: '上行出站' },
|
||||
{ value: 'BOTH_WAY_STATION', label: '双向' },
|
||||
],
|
||||
conditionList: [{ label: '标识状态', value: 'S' }, { label: '表达式', value: 'E' }, { label: '代表值', value: 'V' }],
|
||||
operationList: [
|
||||
{ label: '且', value: 'AND' },
|
||||
{ label: '或', value: 'OR' },
|
||||
{ label: '非', value: 'NOT' },
|
||||
{ label: '是', value: 'IS' },
|
||||
{ label: '等于', value: 'EQ' },
|
||||
{ label: '不等于', value: 'NEQ' },
|
||||
{ label: '大于', value: 'GT' },
|
||||
{ label: '大于等于', value: 'GTOE' },
|
||||
{ label: '小于', value: 'LT' },
|
||||
{ label: '小于等于', value: 'LTOE' },
|
||||
],
|
||||
operationDeviceList: [
|
||||
{ label: '区段', value: 'Section' },
|
||||
{ label: '道岔', value: 'Switch' },
|
||||
{ label: '信号机', value: 'Signal' },
|
||||
{ label: '站台', value: 'StationStand' }, // Stand
|
||||
{ label: '车站', value: 'Station' },
|
||||
{ label: '进路', value: 'Route' },
|
||||
{ label: '列车', value: 'Train' },
|
||||
{ label: '自动闭塞', value: 'StationDirectionAuto' },
|
||||
{ label: '半自动闭塞', value: 'StationDirectionSemi' },
|
||||
],
|
||||
},
|
||||
}
|
||||
|
@ -144,10 +144,10 @@ export const loginInfo = {
|
||||
logoWidth: '0',
|
||||
systemType: '011'
|
||||
},
|
||||
wh: {
|
||||
title: '城市轨道交通实训平台',
|
||||
loginPath: '/login?project=wh',
|
||||
loginParam: 'WH',
|
||||
yjddzh: {
|
||||
title: '应急调度指挥系统',
|
||||
loginPath: '/login?project=yjddzh',
|
||||
loginParam: 'YJDDZH',
|
||||
loginTitle: '空串',
|
||||
navigationLogoWidth: '40px',
|
||||
navigationMarginLeft: '60px',
|
||||
@ -617,7 +617,7 @@ export const loginInfo = {
|
||||
systemType: '027'
|
||||
},
|
||||
richorhhcj: {
|
||||
title: '红河财经学校城市轨道交通实训平台',
|
||||
title: '红河州职业技术学院红河财经学校城市轨道交通实训平台',
|
||||
loginPath: '/login?project=richorhhcj',
|
||||
bottomColumn: '中航锐创(北京)科技发展有限公司 联系电话:4000500081',
|
||||
loginParam: 'RICHOR_HHCJ',
|
||||
@ -777,7 +777,7 @@ export const ProjectIcon = {
|
||||
hls: FaviconHls,
|
||||
designhls: FaviconHls,
|
||||
wjls: Favicon,
|
||||
wh: Favicon,
|
||||
yjddzh: Favicon,
|
||||
drts: Favicon,
|
||||
designdrts: Favicon,
|
||||
hlsdrts: FaviconHls,
|
||||
@ -832,7 +832,7 @@ export const ProjectCode = {
|
||||
xadt: 'XADT',
|
||||
designxadt: 'XADT',
|
||||
wjls: 'WJLS',
|
||||
wh: 'WH',
|
||||
yjddzh: 'YJDDZH',
|
||||
drts: 'DRTS',
|
||||
designdrts: 'DRTS',
|
||||
hlsdrts: 'DRTS',
|
||||
@ -888,9 +888,9 @@ export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb',
|
||||
'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy', 'zzww', 'zzwwtest', 'richor',
|
||||
'richorlesson3d', 'richorjoint', 'designrichorjoint', 'nologo', 'designnologo', 'srsandbox', 'designsrsandbox', 'designhlsdrts', 'hlsdrts', 'jxgm', 'designjxgm',
|
||||
'richorygy', 'designrichorygy', 'say', 'designsay', 'unittecsty', 'designunittecsty', 'richorhhcj', 'designrichorhhcj', 'teaching', 'designteaching', 'richorcxjs',
|
||||
'designrichorcxjs', 'hydrailway', 'designhydrailway', 'wh'];
|
||||
'designrichorcxjs', 'hydrailway', 'designhydrailway', 'yjddzh'];
|
||||
/** 案例展示隐藏的项目 */
|
||||
export const CaseHideProjectList = ['heb', 'designheb', 'cgy', 'designcgy'];
|
||||
export const CaseHideProjectList = ['heb', 'designheb', 'cgy', 'designcgy', 'richorhhcj', 'designrichorhhcj'];
|
||||
/** 登录页右下角版本开发基于不展示 */
|
||||
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'wjls', 'hyd', 'designhyd', 'hydrailway', 'designhydrailway', 'cgy', 'designcgy', 'xadt',
|
||||
'designxadt', 'nologo', 'designnologo', 'srsandbox', 'designsrsandbox', 'designhlsdrts', 'hlsdrts', 'jxgm', 'designjxgm', 'xzexam', 'richorygy', 'designrichorygy',
|
||||
@ -1006,7 +1006,7 @@ export const ProjectList = [
|
||||
{value: 'teaching', label: '教学通用'},
|
||||
{value: 'richor_cxjs', label: '长兴技校'},
|
||||
{value: 'hyd_railway', label: '哈盈达大铁'},
|
||||
{value: 'wh', label: '武汉8号线'}
|
||||
{value: 'yjddzh', label: '武汉8号线'}
|
||||
];
|
||||
/** 本地项目打包 */
|
||||
export const localPackageProject = {
|
||||
|
@ -4,6 +4,8 @@ import router from '@/router/index';
|
||||
import store from '@/store/index';
|
||||
import Command from './Command';
|
||||
import Handler from './Handler';
|
||||
import { ScriptMode } from '@/scripts/ConstDic';
|
||||
import { objectIsEqual } from '@/utils/date';
|
||||
|
||||
class CommandHandle {
|
||||
constructor() {
|
||||
@ -113,6 +115,10 @@ class CommandHandle {
|
||||
RAIL_FILL_IN_REGISTER: {
|
||||
operate: 'RAIL_FILL_IN_REGISTER',
|
||||
paramList: [{name: 'stationCode'}, {name: 'line'}]
|
||||
},
|
||||
Conversation_Chat_Text: {
|
||||
operate: 'Conversation_Chat_Text',
|
||||
paramList: [{name: 'content'}]
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -164,21 +170,55 @@ class CommandHandle {
|
||||
return new Promise((resolve, reject) => {
|
||||
const group = router.currentRoute.query.group;
|
||||
const newApi = router.currentRoute.query.newApi + '';
|
||||
if (newApi === 'true') {
|
||||
const userInfo = store.state.training.simulationUserList.find(el => el.id == store.state.user.id);
|
||||
sendSimulationCommand(group, userInfo.memberId, id, command).then((response) => {
|
||||
resolve(response);
|
||||
}).catch(error => {
|
||||
reject(error);
|
||||
});
|
||||
// if (router.currentRoute.path.includes('trainingDesign')) {
|
||||
store.dispatch('trainingNew/setSceneOperate', {id, command});
|
||||
// }
|
||||
if (store.state.trainingNew.trainingSwitch && store.state.trainingNew.trainingDetail.type === 'SCENE') {
|
||||
const stepList = JSON.parse(store.state.trainingNew.trainingDetail.stepJson);
|
||||
const step = stepList[store.state.trainingNew.stepOrder - 1];
|
||||
const stepOperation = step.operations[store.state.trainingNew.operateOrder];
|
||||
let flag = true;
|
||||
if (stepOperation.operationType !== id) {
|
||||
flag = false;
|
||||
}
|
||||
if (!objectIsEqual(stepOperation.params, command)) {
|
||||
flag = false;
|
||||
}
|
||||
store.dispatch('trainingNew/handleCheckNewTrainingResult', flag);
|
||||
if (flag) {
|
||||
if (newApi === 'true') {
|
||||
const userInfo = store.state.training.simulationUserList.find(el => el.id == store.state.user.id);
|
||||
sendSimulationCommand(group, userInfo.memberId, id, command).then((response) => {
|
||||
resolve(response);
|
||||
}).catch(error => {
|
||||
reject(error);
|
||||
});
|
||||
} else {
|
||||
sendCommandNew(group, id, command).then((response) => {
|
||||
resolve(response);
|
||||
}).catch(error => {
|
||||
reject(error);
|
||||
});
|
||||
}
|
||||
} else if (store.state.trainingNew.teachMode === ScriptMode.TEACH || store.state.trainingNew.teachMode === ScriptMode.PRACTICE) {
|
||||
store.dispatch('training/setOperateErrMsg');
|
||||
}
|
||||
} else {
|
||||
sendCommandNew(group, id, command).then((response) => {
|
||||
resolve(response);
|
||||
}).catch(error => {
|
||||
reject(error);
|
||||
});
|
||||
if (newApi === 'true') {
|
||||
const userInfo = store.state.training.simulationUserList.find(el => el.id == store.state.user.id);
|
||||
sendSimulationCommand(group, userInfo.memberId, id, command).then((response) => {
|
||||
resolve(response);
|
||||
}).catch(error => {
|
||||
reject(error);
|
||||
});
|
||||
} else {
|
||||
sendCommandNew(group, id, command).then((response) => {
|
||||
resolve(response);
|
||||
}).catch(error => {
|
||||
reject(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@ import { State2SimulationMap } from './Config.js';
|
||||
import { sendTrainingNextStepNew } from '@/api/jmap/training';
|
||||
import { getCmdList } from '@/api/management/dictionary';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { getLocalStorage } from '@/utils/auth';
|
||||
|
||||
class Handler {
|
||||
constructor() {
|
||||
@ -35,6 +36,7 @@ class Handler {
|
||||
afterValid(operation, valid) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const basicInfo = store.getters['training/basicInfo'];
|
||||
const trainingDetail = store.getters['trainingNew/trainingDetail'];
|
||||
if (basicInfo.id && valid) {
|
||||
const group = router.currentRoute.query.group;
|
||||
sendTrainingNextStepNew(basicInfo.id, operation, group).then(res=>{
|
||||
@ -52,6 +54,16 @@ class Handler {
|
||||
}
|
||||
reject(error);
|
||||
});
|
||||
} else if (trainingDetail && trainingDetail.id) {
|
||||
if (!valid) {
|
||||
this.pop();
|
||||
reject();
|
||||
} else {
|
||||
if (operation.cancel === true) {
|
||||
this.clear();
|
||||
}
|
||||
resolve();
|
||||
}
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
@ -154,7 +166,11 @@ class Handler {
|
||||
}
|
||||
|
||||
getTrainingMode () {
|
||||
return store.state.training.mode;
|
||||
if (store.state.trainingNew.trainingSwitch && store.state.trainingNew.trainingDetail.type === 'SINGLE') {
|
||||
return store.state.trainingNew.teachMode;
|
||||
} else {
|
||||
return store.state.training.mode;
|
||||
}
|
||||
}
|
||||
|
||||
getTrainingStart() {
|
||||
@ -164,6 +180,35 @@ class Handler {
|
||||
getOperateBreakStatus () {
|
||||
return store.state.menuOperation.break;
|
||||
}
|
||||
|
||||
getNewTrainingStart() {
|
||||
return store.state.trainingNew.trainingSwitch;
|
||||
}
|
||||
getNewTrainingOperation() {
|
||||
try {
|
||||
let trainingDetail = getLocalStorage('trainingDetail') || `{}`;
|
||||
trainingDetail = JSON.parse(trainingDetail);
|
||||
const stepList = JSON.parse(trainingDetail.stepJson || `[]`);
|
||||
let stepOrder = getLocalStorage('stepOrder') || `1`;
|
||||
stepOrder = JSON.parse(stepOrder);
|
||||
let operateOrder = getLocalStorage('operateOrder') || `1`;
|
||||
operateOrder = JSON.parse(operateOrder);
|
||||
const step = stepList[stepOrder - 1];
|
||||
// const index = stepOrder - 1 >= 0 ? stepOrder - 1 : 0;
|
||||
// const step = stepList[index];
|
||||
const stepOperation = step.operations[operateOrder];
|
||||
return stepOperation;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
return {};
|
||||
}
|
||||
}
|
||||
getNewTrainingType() {
|
||||
return store.state.trainingNew.trainingDetail.type;
|
||||
}
|
||||
handleCheckNewTrainingResult(valid) {
|
||||
store.dispatch('trainingNew/handleCheckNewTrainingResult', valid);
|
||||
}
|
||||
}
|
||||
|
||||
export default new Handler();
|
||||
|
@ -668,6 +668,12 @@ export const OperationEvent = {
|
||||
operation: '00c03s',
|
||||
domId: '_Tips-ningBo-line_remoteResetFunc-sure{TOP}'
|
||||
}
|
||||
},
|
||||
commandRight: {
|
||||
right: {
|
||||
operation: '00b',
|
||||
domId: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
// 站台概要表
|
||||
@ -3996,6 +4002,10 @@ export const OperationEvent = {
|
||||
menu: {
|
||||
operation: '1154',
|
||||
domId: '_Tips-CTC-modifyStationTrack-Menu{TOP}'
|
||||
},
|
||||
edit: {
|
||||
operation: '11541',
|
||||
domId: '_Tips-CTC-modifyStationTrack-edit{TOP}'
|
||||
}
|
||||
},
|
||||
// 出入口发布生效区
|
||||
@ -4168,6 +4178,44 @@ export const OperationEvent = {
|
||||
domId: '_Tips-Driver-parkingTrain'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 语音会话
|
||||
Conversation: {
|
||||
Chat: {
|
||||
menu: {
|
||||
operation: '1401',
|
||||
domId: '_Tips-Conversation-Chat'
|
||||
},
|
||||
sideButton: {
|
||||
operation: '1402',
|
||||
domId: '_Tips-Conversation-Chat-sideButton'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 实训设计
|
||||
TrainingDesign: {
|
||||
menuButton: {
|
||||
goCtc: {
|
||||
operation: '1501',
|
||||
domId: '_Tips-TrainingDesign-menuButton-goCtc'
|
||||
},
|
||||
goRpManage: {
|
||||
operation: '1502',
|
||||
domId: '_Tips-TrainingDesign-menuButton-goRpManage'
|
||||
},
|
||||
trainTicket: {
|
||||
operation: '1503',
|
||||
domId: '_Tips-TrainingDesign-menuButton-trainTicket'
|
||||
},
|
||||
registerBook: {
|
||||
operation: '1504',
|
||||
domId: '_Tips-TrainingDesign-menuButton-registerBook'
|
||||
},
|
||||
faultMode: {
|
||||
operation: '1505',
|
||||
domId: '_Tips-TrainingDesign-menuButton-faultMode'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
import { objectIsEqual } from '@/utils/date';
|
||||
import Handler from './Handler.js';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { TrainingMode, ScriptMode } from '@/scripts/ConstDic';
|
||||
|
||||
class ValidateHandler {
|
||||
vaildate(mode, operate) {
|
||||
@ -9,11 +9,36 @@ class ValidateHandler {
|
||||
return this.vaildate_tips(operate);
|
||||
case TrainingMode.TEACH: // 教学模式
|
||||
return this.vaildate_tips(operate);
|
||||
case ScriptMode.PRACTICE:
|
||||
return this.vaildate_newTraining(operate);
|
||||
case ScriptMode.TEACH:
|
||||
return this.vaildate_newTraining(operate);
|
||||
case ScriptMode.TEST:
|
||||
return this.vaildate_newTrainingTest(operate);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
vaildate_newTraining(operate) {
|
||||
let valid = true;
|
||||
if (Handler.getNewTrainingStart()) {
|
||||
valid = this.judgeNewTraining(operate);
|
||||
} else {
|
||||
Handler.clear();
|
||||
valid = false;
|
||||
}
|
||||
return valid;
|
||||
}
|
||||
vaildate_newTrainingTest(operate) {
|
||||
let valid = true;
|
||||
if (Handler.getNewTrainingStart()) {
|
||||
this.judgeNewTraining(operate);
|
||||
} else {
|
||||
Handler.clear();
|
||||
valid = false;
|
||||
}
|
||||
return valid;
|
||||
}
|
||||
vaildate_tips(operate) {
|
||||
let valid = true;
|
||||
if (Handler.getTrainingStart()) {
|
||||
@ -25,7 +50,29 @@ class ValidateHandler {
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
||||
judgeNewTraining(operate) {
|
||||
const stepOperation = Handler.getNewTrainingOperation();
|
||||
let valid = true;
|
||||
if (operate.cmdType || stepOperation.operationType) {
|
||||
const cmd = operate.cmdType ? operate.cmdType.value : '';
|
||||
valid = (cmd === stepOperation.operationType) && valid;
|
||||
}
|
||||
if (operate.code || stepOperation.deviceCode) {
|
||||
valid = (operate.code === stepOperation.deviceCode) && valid;
|
||||
}
|
||||
if (operate.operation || stepOperation.domId) {
|
||||
valid = (operate.operation === stepOperation.domId) && valid;
|
||||
}
|
||||
if (operate.userOperationType || stepOperation.userOperationType) {
|
||||
valid = (operate.userOperationType === stepOperation.userOperationType) && valid;
|
||||
}
|
||||
const opParam = operate.param == undefined ? {} : operate.param;
|
||||
if (opParam || stepOperation.params) {
|
||||
valid = objectIsEqual(opParam, stepOperation.params) && valid;
|
||||
}
|
||||
Handler.handleCheckNewTrainingResult(valid);
|
||||
return valid;
|
||||
}
|
||||
/** 判断操作步骤是否正确 */
|
||||
judge (operate) {
|
||||
const steps = Handler.getSteps();
|
||||
|
@ -14,7 +14,9 @@ const iscs = {
|
||||
closeMusicNum: 0, // 关闭音乐标识
|
||||
faultList: [], // 故障 元素状态
|
||||
incidentList: [], // 事件列表
|
||||
alarmList: [] // 报警列表
|
||||
alarmList: [], // 报警列表
|
||||
gateFaultList: [], // 闸机故障
|
||||
gateFaultCount: 0
|
||||
},
|
||||
|
||||
getters: {
|
||||
@ -184,6 +186,15 @@ const iscs = {
|
||||
},
|
||||
updateIscsState: (state, deviceStatus) => {
|
||||
Vue.prototype.$iscs && Vue.prototype.$iscs.update(deviceStatus);
|
||||
},
|
||||
handlerGateFaultList: (state, data) => {
|
||||
if (data.type === 'SET') {
|
||||
state.gateFaultList.push(data.stationCode);
|
||||
} else if (data.type === 'CANCEL') {
|
||||
const index = state.gateFaultList.findIndex(item => item === data.stationCode);
|
||||
state.gateFaultList.splice(index, 1);
|
||||
}
|
||||
state.gateFaultCount++;
|
||||
}
|
||||
},
|
||||
|
||||
@ -224,6 +235,9 @@ const iscs = {
|
||||
},
|
||||
setDelIncidentList: ( { commit }) => {
|
||||
commit('setDelIncidentList');
|
||||
},
|
||||
handlerGateFaultList: ({ commit }, data) => {
|
||||
commit('handlerGateFaultList', data);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -204,6 +204,7 @@ const map = {
|
||||
namespaced: true,
|
||||
|
||||
state: {
|
||||
disStationList: [], // 调度台list
|
||||
routeData: {}, // 进路数据
|
||||
routeList: [], // 进路list
|
||||
mapStationDirectionData:{}, // 大铁项目 车站方向数据
|
||||
@ -259,6 +260,13 @@ const map = {
|
||||
},
|
||||
|
||||
getters: {
|
||||
disStationList: state => {
|
||||
if (state.map) {
|
||||
return state.disStationList;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
trainWindowSectionCode: state => {
|
||||
return state.trainWindowSectionCode;
|
||||
},
|
||||
@ -746,7 +754,11 @@ const map = {
|
||||
},
|
||||
|
||||
mutations: {
|
||||
// 改变地图数据索引
|
||||
// 设置调度台列表
|
||||
setDisStationList: (state, list) => {
|
||||
state.disStationList = list;
|
||||
},
|
||||
// 改变地图数据索引
|
||||
flushMapRef: state => {
|
||||
if (state.map) {
|
||||
state.map.sectionList = [...(state.map.sectionList || [])];
|
||||
@ -1128,6 +1140,7 @@ const map = {
|
||||
});
|
||||
mapData.graphDataNew.overlapList = overlapData;
|
||||
|
||||
commit('setDisStationList', mapData.logicDataNew.disStationList || []);
|
||||
commit('setMapName', mapData.name);
|
||||
commit('setMapData', mapData.graphDataNew);
|
||||
commit('setRouteData', mapData.logicDataNew.routeList);
|
||||
|
@ -37,17 +37,6 @@ function handle(state, data) {
|
||||
case 'Order_Pay_Result': // 订单支付结果消息
|
||||
state.payOrder = msg;
|
||||
break;
|
||||
case 'JointTraining_Room': // 综合演练室-房间消息
|
||||
if (!path.includes('/plan') || !path.includes('/dp/')) {
|
||||
state.jointRoomInfo = msg; // 房间信息
|
||||
}
|
||||
break;
|
||||
case 'JointTraining_User': // 综合演练室-用户消息
|
||||
handleUserinfo(state, msg); // 分配角色权限消息
|
||||
break;
|
||||
case 'JointTraining_Chat': // 综合演练室-群聊消息
|
||||
handleRecordList(state, msg);
|
||||
break;
|
||||
case 'Simulation_DeviceStatus': // 仿真-设备状态消息
|
||||
state.equipmentStatus = msg;
|
||||
break;
|
||||
@ -63,15 +52,9 @@ function handle(state, data) {
|
||||
case 'Simulation_Script_Action_Error':
|
||||
state.simulationScriptTipError++; // 剧本某一部操作执行错误
|
||||
break;
|
||||
case 'Simulation_PlayBack_Finish': // 竞赛裁判系统裁判员回放结束推送
|
||||
state.playBackFinish++; // 竞赛裁判系统裁判员回放结束推送
|
||||
break;
|
||||
case 'Simulation_Over': // 用户退出仿真推送消息
|
||||
state.simulationOver++; // 用户退出仿真推送消息
|
||||
break;
|
||||
case 'Simulation_Script_Finish': // 剧本执行完成推送消息
|
||||
state.scriptFinish++; // 剧本执行完成推送消息
|
||||
break;
|
||||
case 'Simulation_Script_Action':// 剧本编制添加指令的推送消息
|
||||
state.scriptAction = msg;
|
||||
break;
|
||||
@ -100,44 +83,12 @@ function handle(state, data) {
|
||||
case 'Simulation_Conversation_Operation': // 仿真-用户交互消息(聊天/命令)-新
|
||||
handleSimulationInfo(state, {id: msg.id, message: msg, messageType: 'MESSAGE'});
|
||||
break;
|
||||
case 'Simulation_PlayBack_Conversation': // 回放-用户交互消息
|
||||
handleSimulationInfo(state, msg);
|
||||
break;
|
||||
|
||||
case 'Simulation_ApplyHandle': // 请求处理消息(旧版可能在用,新版地图不用这个)
|
||||
handlePushMsgQueue(state, msg);
|
||||
break;
|
||||
|
||||
case 'JointTraining_User_Permit': // 综合演练室-用户获取权限消息
|
||||
state.userPermit = msg;
|
||||
break;
|
||||
case 'Simulation_Invite': // 综合演练-仿真邀请消息
|
||||
state.simulationInvite = msg;
|
||||
break;
|
||||
case 'JointTraining_Room_Invite': // 综合演练室-房间邀请消息
|
||||
state.roomInvite = msg;
|
||||
break;
|
||||
case 'Big_Screen_Simulation_DeviceStatus': // 大屏仿真状态数据
|
||||
state.equipmentStatus = msg;
|
||||
break;
|
||||
case 'Big_Screen_Simulation_RunFact': // 大屏仿真运行图状态
|
||||
state.trainStationList = msg;
|
||||
break;
|
||||
case 'Plan_Simulation_DeviceStatus': // 大屏仿真状态数据
|
||||
state.equipmentStatus = msg;
|
||||
break;
|
||||
case 'Plan_Simulation_RunFact': // 大屏仿真运行图状态
|
||||
state.trainStationList = msg;
|
||||
break;
|
||||
case 'Simulation_Permission_Over': // 权限结束
|
||||
state.permissionOver = msg;
|
||||
break;
|
||||
case 'Simulation_Quest_Finish': // 任务结束标志
|
||||
state.tipOperateCount++;
|
||||
break;
|
||||
case 'JointTraining_Device':
|
||||
state.realDeviceInfo++;
|
||||
break;
|
||||
case 'Be_Logged_Out': // 重复登录被登出
|
||||
state.beLogoutCount++;
|
||||
state.loggedOutMsg = msg;
|
||||
@ -278,9 +229,14 @@ function handle(state, data) {
|
||||
state.railCtcStationManageRpChange++;
|
||||
break;
|
||||
// 调度命令信息
|
||||
case 'SIMULATION_RAIL_CTC_DISPATCH_COMMAND':
|
||||
case 'SIMULATION_RAIL_CTC_DIS_COMMAND_ADD':
|
||||
state.dispatchCommandMsg = msg;
|
||||
break;
|
||||
// 调度命令状态
|
||||
case 'SIMULATION_RAIL_CTC_DIS_COMMAND_SYNC':
|
||||
state.dispatchCommandState = msg;
|
||||
console.log('调度命令状态', msg);
|
||||
break;
|
||||
// 车站发送计划信息
|
||||
case 'SIMULATION_CTC_RUN_PLAN_CONFIRM_SEND':
|
||||
state.changedCtcRunplanMap = msg;
|
||||
@ -295,6 +251,12 @@ function handle(state, data) {
|
||||
case 'Simulation_Training_Finish':
|
||||
state.trainingOverCount++;
|
||||
break;
|
||||
case 'YJDDZH_TRAIN_POSITION':
|
||||
state.whTrainInfo = msg;
|
||||
break;
|
||||
case 'Simulation_Training_Step_Finish':
|
||||
state.trainingStepFinishCount++;
|
||||
break;
|
||||
//
|
||||
// // 大铁项目 调度台 运行图信息 初始化消息
|
||||
// case 'SIMULATION_RAILWAY_RUN_PLAN_INIT':
|
||||
@ -322,52 +284,26 @@ function handle(state, data) {
|
||||
// break;
|
||||
}
|
||||
}
|
||||
|
||||
// 操作聊天信息
|
||||
function handleRecordList(state, data) {
|
||||
const userId = store.state.user.id;
|
||||
let isSelf = false;
|
||||
if (data.member.id == userId) {
|
||||
isSelf = true;
|
||||
}
|
||||
const myDate = new Date();
|
||||
const myDate1 = myDate.toLocaleDateString().replace(/\//g, '-');
|
||||
const param = {
|
||||
join: false,
|
||||
value: data.message,
|
||||
self: isSelf,
|
||||
voice: data.isAudio,
|
||||
src: data.isAudio ? `${data.audioPath}` : '',
|
||||
other: !isSelf,
|
||||
userName: data.member.nickName,
|
||||
chatTime: data.chatTime,
|
||||
chatInfo: true,
|
||||
inSimulation: false,
|
||||
inRoom: true,
|
||||
date: +new Date(`${myDate1} ${data.chatTime}`)
|
||||
};
|
||||
state.chatContent = param;
|
||||
}
|
||||
// 仿真内部聊天
|
||||
function handleSimulationInfo(state, data) {
|
||||
switch (data.messageType) {
|
||||
case 'INVITE':
|
||||
state.inviteSimulationConversition = data;
|
||||
state.inviteSimulationConversation = data;
|
||||
break;
|
||||
case 'CONNECT':
|
||||
state.acceptConversionInvite = data;
|
||||
break;
|
||||
case 'OVER':
|
||||
state.overConversition = data;
|
||||
state.overConversation = data;
|
||||
break;
|
||||
case 'MESSAGE':
|
||||
state.conversationInfo = data;
|
||||
break;
|
||||
case 'CREATE':
|
||||
state.createConversition = data;
|
||||
state.createConversation = data;
|
||||
break;
|
||||
case 'EXIT':
|
||||
state.exitConversition = data;
|
||||
state.exitConversation = data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -377,10 +313,6 @@ function handleSimulationScriptTipInfo(state, data) {
|
||||
state.simulationScriptTip = data;
|
||||
}
|
||||
|
||||
function handleUserinfo(state, data) {
|
||||
state.roleList = (data instanceof Array) ? data : [data];
|
||||
}
|
||||
|
||||
function handleSimulationUserinfo(state, data) {
|
||||
state.simulationRoleList = (data instanceof Array) ? data : [data];
|
||||
}
|
||||
@ -403,17 +335,12 @@ const socket = {
|
||||
|
||||
state: {
|
||||
payOrder: '', // 支付订单
|
||||
jointRoomInfo: {}, // 受邀请房间信息
|
||||
chatContent: {}, // 聊天室聊天内容
|
||||
roleList: [], // 设置角色信息
|
||||
simulationRoleList:[], // 设置仿真的聊天角色信息
|
||||
simulationScriptTip:{}, // 剧本推送提示信息
|
||||
simulationScriptTipFinish:0, // 剧本某一步完成的消息
|
||||
simulationScriptTipError: 0, // 剧本某一步执行错误
|
||||
scriptFinish:0, // 剧本执行完成提示信息
|
||||
autoFaultTrigger:0, // 自动故障触发操作推送消息
|
||||
scriptAction:{}, // 剧本编制添加指令的推送消息
|
||||
playBackFinish:0, // 竞赛裁判系统裁判回放结束推送
|
||||
jointRoomPrepare: false, // 演练房间准备状态
|
||||
equipmentStatus: [], // 仿真-设备状态消息
|
||||
trainStationList: [], // 仿真-列车实际到发车站消息
|
||||
@ -421,11 +348,11 @@ const socket = {
|
||||
simulationStart: '', // 仿真-开始消息
|
||||
simulationOver:0, // 退出仿真推送消息
|
||||
simulationReset: 0, // 仿真-异常消息
|
||||
inviteSimulationConversition: {}, // 仿真会话邀请消息
|
||||
inviteSimulationConversation: {}, // 仿真会话邀请消息
|
||||
acceptConversionInvite:{}, // 仿真会话成员接收邀请
|
||||
createConversition:{}, // 仿真创建会话
|
||||
overConversition: {}, // 仿真会话结束
|
||||
exitConversition: {}, // 仿真成员退出会话
|
||||
createConversation:{}, // 仿真创建会话
|
||||
overConversation: {}, // 仿真会话结束
|
||||
exitConversation: {}, // 仿真成员退出会话
|
||||
conversationInfo: {}, // 仿真会话消息
|
||||
ticketInfo: {}, // 路票消息
|
||||
|
||||
@ -433,7 +360,6 @@ const socket = {
|
||||
msgQueue: [], // 命令请求列表(旧版控制权转移可能在用,新版不用这个)
|
||||
msgHead: null, // 消息头(旧版控制权转移可能在用,新版不用这个)
|
||||
|
||||
userPermit: {}, // 用户获取权限消息
|
||||
userRoomKickOut: {}, // 用户被踢出房间消息
|
||||
userInRoom: {}, // 用户从外部进入房间消息
|
||||
userOutRoom: {}, // 用户退出房间消息
|
||||
@ -441,17 +367,12 @@ const socket = {
|
||||
userBackRoom: {}, // 用户从仿真返回房间消息
|
||||
simulationInvite: {}, // 用户扫码信息
|
||||
|
||||
permissionOver: {}, // 权限结束
|
||||
|
||||
roomIsSubscribe:false, // 房间是否订阅
|
||||
assistantIsSubscribe:false, // 综合演练仿真聊天是否订阅
|
||||
|
||||
tipOperateCount: 0, // 任务结束提示消息
|
||||
realDeviceInfo: 0, // 真实设备信息
|
||||
beLogoutCount: 0, // 被登出
|
||||
runPlanReloadCount: 0, // 仿真运行图变更
|
||||
memberChangeCount: 0, // 仿真成员变更
|
||||
roomInvite: {},
|
||||
simulationTimeSync: '', // 仿真时间
|
||||
simulationIbpStatus: null,
|
||||
stationPfiNum: null, // 客流消息列表
|
||||
@ -472,7 +393,8 @@ const socket = {
|
||||
simulationPlanChange:{}, // 运行图加线/抽线/变化推送消息
|
||||
loggedOutMsg: '',
|
||||
railCtcStatusMsg: {}, // 占线板信息
|
||||
dispatchCommandMsg: {}, // 调度命令信息
|
||||
dispatchCommandMsg: null, // 调度命令信息
|
||||
dispatchCommandState: null, // 调度命令状态
|
||||
changedCtcRunplanMap:{}, // 大铁项目 ctc 被修改运行计划的车站信息
|
||||
railCtcRunplanInitMsg:{}, // 大铁项目 ctc 运行图初始化信息
|
||||
railCtcRunplanChange:0, // 大铁项目 ctc 运行图信息变化
|
||||
@ -484,25 +406,30 @@ const socket = {
|
||||
voiceBroadcastChange: 0, // 语音播报信息变化
|
||||
trainingStepTip: '', // 新实训推送消息
|
||||
trainingOverCount: 0, // 新实训结束计数器
|
||||
trainingReloadCount: 0
|
||||
trainingReloadCount: 0,
|
||||
whTrainInfo: null,
|
||||
trainingStepFinishCount: 0,
|
||||
// railwaySimulationRpMsg:{}, // 大铁项目 调度台 调度台
|
||||
// railwaySimulationRpChange:0 // 大铁项目 调度台 运行图信息变化
|
||||
// railwaySimulationRpChange:0, // 大铁项目 调度台 运行图信息变化
|
||||
standPisState: {
|
||||
stationName: '',
|
||||
firstTrainRemain: '',
|
||||
firstEndStationName: '',
|
||||
secondTrainRemain: '',
|
||||
secondEndStationName: ''
|
||||
},
|
||||
onboardPisState: {
|
||||
nextStationName: '',
|
||||
endStationName: ''
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
},
|
||||
mutations: {
|
||||
setJointRoomInfo: (state, jointRoomInfo) => {
|
||||
state.jointRoomInfo = jointRoomInfo;
|
||||
},
|
||||
|
||||
setStationPfiNum: (state, stationPfiNum) => {
|
||||
state.stationPfiNum = stationPfiNum;
|
||||
},
|
||||
|
||||
setChatContent: (state, chatContent) => {
|
||||
state.chatContent = chatContent;
|
||||
},
|
||||
|
||||
setEquipmentStatus: (state, equipmentStatus) => {
|
||||
state.equipmentStatus = equipmentStatus;
|
||||
},
|
||||
@ -529,18 +456,20 @@ const socket = {
|
||||
state.msgQueue.shift();
|
||||
state.msgHead = state.msgQueue[0];
|
||||
},
|
||||
handlePushMsgQueue: (state, msg) => {
|
||||
if (msg instanceof Array) {
|
||||
state.msgQueue.concat(msg);
|
||||
} else {
|
||||
state.msgQueue.push(msg);
|
||||
}
|
||||
|
||||
// (旧版可能在用,新版地图不用这个)
|
||||
pushMsgQueue: (state, msg) => {
|
||||
handlePushMsgQueue(state, msg);
|
||||
if (!state.msgHead) {
|
||||
state.msgHead = state.msgQueue[0];
|
||||
}
|
||||
},
|
||||
|
||||
setSimulationInvite: (state, simulationInvite) => {
|
||||
state.simulationInvite = simulationInvite;
|
||||
},
|
||||
setRoomInvite: (state, roomInvite) => {
|
||||
state.roomInvite = roomInvite;
|
||||
},
|
||||
setRoomSubscribe:(state, roomIsSubscribe)=>{
|
||||
state.roomIsSubscribe = roomIsSubscribe;
|
||||
},
|
||||
@ -555,6 +484,9 @@ const socket = {
|
||||
setIsFirst:(state, isFirst)=>{
|
||||
state.isFirst = isFirst;
|
||||
},
|
||||
setSimulationRoleList: (state, data) => {
|
||||
state.simulationRoleList = data;
|
||||
},
|
||||
clearSimulationRoleList: (state)=>{
|
||||
state.simulationRoleList = [];
|
||||
},
|
||||
@ -573,12 +505,18 @@ const socket = {
|
||||
setIscsStatePisMessages: (state, speed) => {
|
||||
state.iscsStatePisMessages = speed;
|
||||
},
|
||||
setStandPisMessages: (state, payload) => {
|
||||
state.standPisState = payload;
|
||||
},
|
||||
setOnboardPisMessages: (state, payload) => {
|
||||
state.onboardPisState = payload;
|
||||
},
|
||||
deleteRailwaySimulationRunplan: (state, stationCode) => {
|
||||
delete state.railwaySimulationRunplanSendMap[stationCode];
|
||||
state.railwaySimulationRunplanSendChange++;
|
||||
},
|
||||
clearDispatchCommandMsg: (state, data) => {
|
||||
state.dispatchCommandMsg = {};
|
||||
state.dispatchCommandMsg = null;
|
||||
},
|
||||
resetRailCtcRunplanInitMsg: (state) => {
|
||||
state.railCtcRunplanInitMsg = {};
|
||||
@ -598,6 +536,162 @@ const socket = {
|
||||
},
|
||||
clearTrainingOverCount: (state) => {
|
||||
state.trainingOverCount = 0;
|
||||
},
|
||||
setPayOrder: (state, payOrder) => {
|
||||
state.payOrder = payOrder;
|
||||
},
|
||||
setSimulationScriptTip: (state, data) => {
|
||||
state.simulationScriptTip = data;
|
||||
},
|
||||
simulationScriptTipFinishIncrease: (state) => {
|
||||
state.simulationScriptTipFinish++;
|
||||
},
|
||||
clearSimulationScriptTipFinish: (state) => {
|
||||
state.simulationScriptTipFinish = 0;
|
||||
},
|
||||
simulationScriptTipErrorIncrease: (state) => {
|
||||
state.simulationScriptTipError++;
|
||||
},
|
||||
simulationOverIncrease: (state) => {
|
||||
state.simulationOver++;
|
||||
},
|
||||
setScriptAction: (state, data) => {
|
||||
state.setScriptAction = data;
|
||||
},
|
||||
autoFaultTriggerIncrease: (state) => {
|
||||
state.autoFaultTrigger++;
|
||||
},
|
||||
simulationErrorIncrease: (state) => {
|
||||
state.simulationError++;
|
||||
},
|
||||
simulationResetIncrease: (state) => {
|
||||
state.simulationReset++;
|
||||
},
|
||||
setInviteSimulationConversation: (state, data) => {
|
||||
state.inviteSimulationConversation = data;
|
||||
},
|
||||
setAcceptConversionInvite: (state, data) => {
|
||||
state.acceptConversionInvite = data;
|
||||
},
|
||||
setOverConversation: (state, data) => {
|
||||
state.overConversation = data;
|
||||
},
|
||||
setConversationInfo: (state, data) => {
|
||||
state.conversationInfo = data;
|
||||
},
|
||||
setCreateConversation: (state, data) => {
|
||||
state.createConversation = data;
|
||||
},
|
||||
setExitConversation: (state, data) => {
|
||||
state.exitConversation = data;
|
||||
},
|
||||
memberChangeCountIncrease: (state) => {
|
||||
state.memberChangeCount++;
|
||||
},
|
||||
setLoggedOutMsg: (state, msg) => {
|
||||
state.loggedOutMsg = msg;
|
||||
state.beLogoutCount++;
|
||||
},
|
||||
runPlanReloadCountIncrease: (state) => {
|
||||
state.runPlanReloadCount++;
|
||||
},
|
||||
setSimulationIbpStatus: (state, data) => {
|
||||
state.simulationIbpStatus = data;
|
||||
},
|
||||
competitionPracticeFinishIncrease: (state) => {
|
||||
state.competitionPracticeFinish++;
|
||||
},
|
||||
setSimulationAlarmInfo: (state, data) => {
|
||||
state.simulationAlarmInfo = data;
|
||||
},
|
||||
setStandPfiNum: (state, data) => {
|
||||
state.standPfiNum = data;
|
||||
},
|
||||
setTrainPfiNum: (state, data) => {
|
||||
state.trainPfiNum = data;
|
||||
},
|
||||
setTrainPfiBL: (state, data) => {
|
||||
state.trainPfiBL = data;
|
||||
},
|
||||
trainingReloadCountIncrease: (state) => {
|
||||
state.trainingReloadCount++;
|
||||
},
|
||||
setSimulationPslStatus: (state, data) => {
|
||||
state.simulationPslStatus = data;
|
||||
},
|
||||
setSimulationPlanChange: (state, data) => {
|
||||
state.simulationPlanChange = data;
|
||||
},
|
||||
setRailCtcStatusMsg: (state, data) => {
|
||||
state.railCtcStatusMsg = data;
|
||||
},
|
||||
handleCtcRunPlanChange: (state, data) => {
|
||||
state.voiceBroadcastMsgs = [];
|
||||
data.forEach(element => {
|
||||
const tripNumberDe = element.departRunPlan && element.departRunPlan.tripNumber;
|
||||
const tripNumberAr = element.arriveRunPlan && element.arriveRunPlan.tripNumber;
|
||||
if (tripNumberDe) {
|
||||
element.departRunPlan.up = '';
|
||||
element.departRunPlan.down = '';
|
||||
parseInt(tripNumberDe[tripNumberDe.length - 1]) % 2 == 0 ? element.departRunPlan.up = tripNumberDe : element.departRunPlan.down = tripNumberDe;
|
||||
}
|
||||
if (tripNumberAr) {
|
||||
element.arriveRunPlan.up = '';
|
||||
element.arriveRunPlan.down = '';
|
||||
parseInt(tripNumberAr[tripNumberAr.length - 1]) % 2 == 0 ? element.arriveRunPlan.up = tripNumberAr : element.arriveRunPlan.down = tripNumberAr;
|
||||
}
|
||||
const code = element.stationCode + '' + element.code;
|
||||
if (store.state.training.roleDeviceCode === element.stationCode && element.arriveRunPlan && element.arriveRunPlan.adjacentMessage === '1') {
|
||||
state.voiceBroadcastMsgs.push(element.stationCode + '' + element.code);
|
||||
}
|
||||
state.railCtcRunplanInitMsg[code] = copyAssign(state.railCtcRunplanInitMsg[code] || {}, element);
|
||||
});
|
||||
if (state.voiceBroadcastMsgs.length) {
|
||||
state.voiceBroadcastChange++;
|
||||
}
|
||||
state.railCtcRunplanChange++;
|
||||
},
|
||||
sendRailwayRunPlan: (state, data) => {
|
||||
data.forEach(each => {
|
||||
state.railwaySimulationRunplanSendMap[each.stationCode] = each;
|
||||
});
|
||||
state.railwaySimulationRunplanSendChange++;
|
||||
},
|
||||
initCtcManagerRunPlan: (state, data) => {
|
||||
state.railCtcStationManageRpMsg = {};
|
||||
data.forEach(element => {
|
||||
const code = element.stationCode + '' + element.tripNumber;
|
||||
state.railCtcStationManageRpMsg[code] = element;
|
||||
});
|
||||
},
|
||||
changeCtcManagerRunPlanEdit: (state, data) => {
|
||||
data.forEach(element => {
|
||||
const code = element.stationCode + '' + element.tripNumber;
|
||||
state.railCtcStationManageRpMsg[code] = copyAssign(state.railCtcStationManageRpMsg[code] || {}, element);
|
||||
});
|
||||
state.railCtcStationManageRpChange++;
|
||||
},
|
||||
removeCtcManagerRunPlanEdit: (state, data) => {
|
||||
data.forEach(element => {
|
||||
const code = element.stationCode + '' + element.tripNumber;
|
||||
delete state.railCtcStationManageRpMsg[code];
|
||||
});
|
||||
state.railCtcStationManageRpChange++;
|
||||
},
|
||||
setDispatchCommandMsg: (state, data) => {
|
||||
state.dispatchCommandMsg = data;
|
||||
},
|
||||
setChangedCtcRunplanMap: (state, data) => {
|
||||
state.changedCtcRunplanMap = data;
|
||||
},
|
||||
setTicketInfo: (state, data) => {
|
||||
state.ticketInfo = data;
|
||||
},
|
||||
setTrainingStepTip: (state, data) => {
|
||||
state.trainingStepTip = data;
|
||||
},
|
||||
trainingOverCountIncrease: (state) => {
|
||||
state.trainingOverCount++;
|
||||
}
|
||||
},
|
||||
|
||||
@ -614,43 +708,32 @@ const socket = {
|
||||
setSimulationSpeed: ({ commit }, speed) => {
|
||||
commit('setSimulationSpeed', speed);
|
||||
},
|
||||
setChatContent: ({ commit }, chatContent) => {
|
||||
commit('setChatContent', chatContent);
|
||||
setStationPfiNum: ({ commit }, data) => {
|
||||
commit('setStationPfiNum', data);
|
||||
},
|
||||
|
||||
setJointRoomInfo: ({ commit }) => {
|
||||
commit('setJointRoomInfo', {});
|
||||
},
|
||||
|
||||
setStationPfiNum: ({ commit }) => {
|
||||
commit('setStationPfiNum', null);
|
||||
},
|
||||
|
||||
setEquipmentStatus: ({ commit }) => {
|
||||
commit('setEquipmentStatus', []);
|
||||
setEquipmentStatus: ({ commit }, data = []) => {
|
||||
commit('setEquipmentStatus', data);
|
||||
},
|
||||
|
||||
setDeviceStateMessages: ({ commit }) => {
|
||||
commit('setDeviceStateMessages', null);
|
||||
},
|
||||
|
||||
setTrainStationList: ({ commit }) => {
|
||||
commit('setTrainStationList', []);
|
||||
setTrainStationList: ({ commit }, data) => {
|
||||
commit('setTrainStationList', data || []);
|
||||
},
|
||||
|
||||
setSimulationStart: ({ commit }) => {
|
||||
commit('setSimulationStart', '');
|
||||
setSimulationStart: ({ commit }, data) => {
|
||||
commit('setSimulationStart', data || '');
|
||||
},
|
||||
|
||||
setSimulationReset: ({ commit }) => {
|
||||
commit('setSimulationReset', 0);
|
||||
},
|
||||
|
||||
setSimulationInvite: ({ commit }) => {
|
||||
commit('setSimulationInvite', {});
|
||||
},
|
||||
setRoomInvite: ({ commit }) => {
|
||||
commit('setRoomInvite', {});
|
||||
setSimulationInvite: ({ commit }, data) => {
|
||||
commit('setSimulationInvite', data || {});
|
||||
},
|
||||
setMessage: ({ state }, data) => {
|
||||
if (!state.message[data.key]) {
|
||||
@ -678,6 +761,9 @@ const socket = {
|
||||
setIsFirst:({ commit }, isFirst) => {
|
||||
commit('setIsFirst', isFirst);
|
||||
},
|
||||
setSimulationRoleList: ({ commit }, data) => {
|
||||
commit('setSimulationRoleList', data);
|
||||
},
|
||||
clearSimulationRoleList:({ commit }) => {
|
||||
commit('clearSimulationRoleList');
|
||||
},
|
||||
@ -693,6 +779,12 @@ const socket = {
|
||||
handleIscsPisState:({ commit }, state) => {
|
||||
commit('setIscsStatePisMessages', state);
|
||||
},
|
||||
handleStandPisState: ({ commit }, payload) => {
|
||||
commit('setStandPisMessages', payload);
|
||||
},
|
||||
handleOnboardPisState: ({ commit }, payload) => {
|
||||
commit('setOnboardPisMessages', payload);
|
||||
},
|
||||
deleteRailwaySimulationRunplan:({ commit }, stationCode) => {
|
||||
commit('deleteRailwaySimulationRunplan', stationCode);
|
||||
},
|
||||
@ -707,6 +799,129 @@ const socket = {
|
||||
},
|
||||
clearTrainingOverCount: ({ commit }) => {
|
||||
commit('clearTrainingOverCount');
|
||||
},
|
||||
setPayOrder: ({ commit }, payOrder) => {
|
||||
commit('setPayOrder', payOrder);
|
||||
},
|
||||
setSimulationScriptTip: ({ commit }, data) => {
|
||||
commit('setSimulationScriptTip', data);
|
||||
},
|
||||
simulationScriptTipFinishIncrease: ({ commit }) => {
|
||||
commit('simulationScriptTipFinishIncrease');
|
||||
},
|
||||
clearSimulationScriptTipFinish: ({ commit }) => {
|
||||
commit('clearSimulationScriptTipFinish');
|
||||
},
|
||||
simulationScriptTipErrorIncrease: ({ commit }) => {
|
||||
commit('simulationScriptTipErrorIncrease');
|
||||
},
|
||||
simulationOverIncrease: ({ commit }) => {
|
||||
commit('simulationOverIncrease');
|
||||
},
|
||||
setScriptAction: ({ commit }, data) => {
|
||||
commit('setScriptAction', data);
|
||||
},
|
||||
autoFaultTriggerIncrease: ({ commit }) => {
|
||||
commit('autoFaultTriggerIncrease');
|
||||
},
|
||||
simulationErrorIncrease: ({ commit }) => {
|
||||
commit('simulationErrorIncrease');
|
||||
},
|
||||
simulationResetIncrease: ({ commit }) => {
|
||||
commit('simulationResetIncrease');
|
||||
},
|
||||
setInviteSimulationConversation: ({ commit }, data) => {
|
||||
commit('setInviteSimulationConversation', data);
|
||||
},
|
||||
setAcceptConversionInvite: ({ commit }, data) => {
|
||||
commit('setAcceptConversionInvite', data);
|
||||
},
|
||||
setOverConversation: ({ commit }, data) => {
|
||||
commit('setOverConversation', data);
|
||||
},
|
||||
setConversationInfo: ({ commit }, data) => {
|
||||
commit('setConversationInfo', data);
|
||||
},
|
||||
setCreateConversation: ({ commit }, data) => {
|
||||
commit('setCreateConversation', data);
|
||||
},
|
||||
setExitConversation: ({ commit }, data) => {
|
||||
commit('setExitConversation', data);
|
||||
},
|
||||
handlePushMsgQueue: ({ commit }, data) => {
|
||||
commit('handlePushMsgQueue', data);
|
||||
},
|
||||
memberChangeCountIncrease: ({ commit }) => {
|
||||
commit('memberChangeCountIncrease');
|
||||
},
|
||||
setLoggedOutMsg: ({ commit }, data) => {
|
||||
commit('setLoggedOutMsg', data);
|
||||
},
|
||||
runPlanReloadCountIncrease: ({ commit }) => {
|
||||
commit('runPlanReloadCountIncrease');
|
||||
},
|
||||
setSimulationIbpStatus: ({ commit }, data) => {
|
||||
commit('setSimulationIbpStatus', data);
|
||||
},
|
||||
competitionPracticeFinishIncrease: ({ commit }) => {
|
||||
commit('competitionPracticeFinishIncrease');
|
||||
},
|
||||
setSimulationAlarmInfo: ({ commit }, data) => {
|
||||
commit('setSimulationAlarmInfo', data);
|
||||
},
|
||||
setStandPfiNum: ({ commit }, data) => {
|
||||
commit('setStandPfiNum', data);
|
||||
},
|
||||
setTrainPfiNum: ({ commit }, data) => {
|
||||
commit('setTrainPfiNum', data);
|
||||
},
|
||||
setTrainPfiBL: ({ commit }, data) => {
|
||||
commit('setTrainPfiBL', data);
|
||||
},
|
||||
setLPFstrategy: ({ commit }, data) => {
|
||||
commit('setLPFstrategy', data);
|
||||
},
|
||||
trainingReloadCountIncrease: ({ commit }) => {
|
||||
commit('trainingReloadCountIncrease');
|
||||
},
|
||||
setSimulationPslStatus: ({ commit }, data) => {
|
||||
commit('setSimulationPslStatus', data);
|
||||
},
|
||||
setSimulationPlanChange: ({ commit }, data) => {
|
||||
commit('setSimulationPlanChange', data);
|
||||
},
|
||||
setRailCtcStatusMsg: ({ commit }, data) => {
|
||||
commit('setRailCtcStatusMsg', data);
|
||||
},
|
||||
handleCtcRunPlanChange: ({ commit }, data) => {
|
||||
commit('handleCtcRunPlanChange', data);
|
||||
},
|
||||
sendRailwayRunPlan: ({ commit }, data) => {
|
||||
commit('sendRailwayRunPlan', data);
|
||||
},
|
||||
initCtcManagerRunPlan: ({ commit }, data) => {
|
||||
commit('initCtcManagerRunPlan', data);
|
||||
},
|
||||
changeCtcManagerRunPlanEdit: ({ commit }, data) => {
|
||||
commit('changeCtcManagerRunPlanEdit', data);
|
||||
},
|
||||
removeCtcManagerRunPlanEdit: ({ commit }, data) => {
|
||||
commit('removeCtcManagerRunPlanEdit', data);
|
||||
},
|
||||
setDispatchCommandMsg: ({ commit }, data) => {
|
||||
commit('setDispatchCommandMsg', data);
|
||||
},
|
||||
setChangedCtcRunplanMap: ({ commit }, data) => {
|
||||
commit('setChangedCtcRunplanMap', data);
|
||||
},
|
||||
setTicketInfo: ({ commit }, data) => {
|
||||
commit('setTicketInfo', data);
|
||||
},
|
||||
setTrainingStepTip: ({ commit }, data) => {
|
||||
commit('setTrainingStepTip', data);
|
||||
},
|
||||
trainingOverCountIncrease: ({ commit }) => {
|
||||
commit('trainingOverCountIncrease');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -5,6 +5,8 @@ import LangStorage from '@/utils/lang';
|
||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import store from '@/store/index';
|
||||
import { ScriptMode } from '@/scripts/ConstDic';
|
||||
import { setLocalStorage } from '@/utils/auth';
|
||||
|
||||
/**
|
||||
* 实训状态数据
|
||||
@ -435,6 +437,7 @@ const training = {
|
||||
|
||||
// 下一步
|
||||
nextNew: ({ commit, state }, operate) => {
|
||||
setLocalStorage('nextNew', JSON.stringify(operate));
|
||||
return new Promise((resolve, reject) => {
|
||||
commit('setOperate', operate);
|
||||
if (!state.started && !state.mode) {
|
||||
@ -445,37 +448,36 @@ const training = {
|
||||
commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? 'Please click start, start training!' : '请点击开始,开始实训!', color: 'red' });
|
||||
return;
|
||||
}
|
||||
|
||||
// 处理operation
|
||||
Handler.handle(operate).then(rtn => {
|
||||
if (store.state.trainingNew.trainingSwitch) {
|
||||
store.dispatch('trainingNew/checkTrainingOperate', operate).then(res => {
|
||||
commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? "Correct operation! That's great!" : '操作正确!真棒!', color: 'green' });
|
||||
resolve(rtn);
|
||||
}).catch(() => {
|
||||
commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? 'operation mistake!' : '操作错误!', color: 'red' });
|
||||
});
|
||||
} else {
|
||||
if (state.trainingStart) {
|
||||
// 教学和联系模式需要给出过程步骤提示
|
||||
if (TrainingMode.TEACH == state.mode || TrainingMode.PRACTICE == state.mode) {
|
||||
if (rtn && rtn.valid) {
|
||||
commit('next');
|
||||
commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? "Correct operation! That's great!" : '操作正确!真棒!', color: 'green' });
|
||||
commit('tipEventIncrement');
|
||||
} else {
|
||||
if (!operate.repeat) {
|
||||
commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? 'operation mistake!' : '操作错误!', color: 'red' });
|
||||
}
|
||||
if (state.trainingStart) {
|
||||
// 教学和联系模式需要给出过程步骤提示
|
||||
if (TrainingMode.TEACH == state.mode || TrainingMode.PRACTICE == state.mode) {
|
||||
if (rtn && rtn.valid) {
|
||||
commit('next');
|
||||
commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? "Correct operation! That's great!" : '操作正确!真棒!', color: 'green' });
|
||||
commit('tipEventIncrement');
|
||||
} else {
|
||||
if (!operate.repeat) {
|
||||
commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? 'operation mistake!' : '操作错误!', color: 'red' });
|
||||
}
|
||||
} else if (TrainingMode.EXAM == state.mode || TrainingMode.TEST == state.mode) {
|
||||
// 测试和考试不给提示
|
||||
rtn && rtn.valid && commit('next');
|
||||
}
|
||||
} else if (TrainingMode.EXAM == state.mode || TrainingMode.TEST == state.mode) {
|
||||
// 测试和考试不给提示
|
||||
rtn && rtn.valid && commit('next');
|
||||
}
|
||||
} else if (store.state.trainingNew.trainingSwitch && store.state.trainingNew.trainingDetail.type === 'SINGLE') {
|
||||
if (store.state.trainingNew.teachMode === ScriptMode.TEACH || store.state.trainingNew.teachMode === ScriptMode.PRACTICE) {
|
||||
if (rtn && rtn.valid) {
|
||||
commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? "Correct operation! That's great!" : '操作正确!真棒!', color: 'green' });
|
||||
} else {
|
||||
commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? 'operation mistake!' : '操作错误!', color: 'red' });
|
||||
}
|
||||
}
|
||||
} else {
|
||||
store.dispatch('trainingNew/setTrainingOperate', operate);
|
||||
resolve(rtn);
|
||||
}
|
||||
resolve(rtn);
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
reject(error);
|
||||
@ -683,6 +685,9 @@ const training = {
|
||||
},
|
||||
setUserRole: ({ commit }, userRole) => {
|
||||
commit('setUserRole', userRole);
|
||||
},
|
||||
setOperateErrMsg: ({ commit }) => {
|
||||
commit('setOperateErrMsg', { errMsg: '操作错误!', color: 'red' });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { setLocalStorage } from '@/utils/auth';
|
||||
const training = {
|
||||
namespaced: true,
|
||||
state: {
|
||||
@ -6,6 +7,7 @@ const training = {
|
||||
trainingSwitch: false, // 实训开始结束标志
|
||||
trainingOperate: null,
|
||||
simulationPause: false, // 实训 暂停判断
|
||||
sceneOperate: null,
|
||||
stepOrder: 0,
|
||||
operateOrder: 0,
|
||||
stepOverCount: 0,
|
||||
@ -32,6 +34,9 @@ const training = {
|
||||
},
|
||||
trainingScore: (state) => {
|
||||
return state.trainingScore;
|
||||
},
|
||||
sceneOperate: (state) => {
|
||||
return state.sceneOperate;
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
@ -40,6 +45,7 @@ const training = {
|
||||
},
|
||||
setTrainingDetail: (state, detail) => {
|
||||
state.trainingDetail = detail;
|
||||
setLocalStorage('trainingDetail', JSON.stringify(detail));
|
||||
},
|
||||
setTrainingSwitch: (state, flag) => {
|
||||
state.trainingSwitch = flag;
|
||||
@ -49,18 +55,22 @@ const training = {
|
||||
},
|
||||
stepOrderIncrease: (state) => {
|
||||
state.stepOrder++;
|
||||
setLocalStorage('stepOrder', JSON.stringify(state.stepOrder));
|
||||
},
|
||||
clearStepOrder: (state) => {
|
||||
state.stepOrder = 0;
|
||||
setLocalStorage('stepOrder', JSON.stringify(state.stepOrder));
|
||||
},
|
||||
operateOrderIncrease: (state) => {
|
||||
state.operateOrder++;
|
||||
setLocalStorage('operateOrder', JSON.stringify(state.operateOrder));
|
||||
},
|
||||
setSimulationPause: (state, value) => {
|
||||
state.simulationPause = value;
|
||||
},
|
||||
clearOperateOrder: (state) => {
|
||||
state.operateOrder = 0;
|
||||
setLocalStorage('operateOrder', JSON.stringify(state.operateOrder));
|
||||
},
|
||||
stepOverCountChange: (state) => {
|
||||
state.stepOverCount++;
|
||||
@ -70,6 +80,9 @@ const training = {
|
||||
},
|
||||
setTrainingScore: (state, score) => {
|
||||
state.trainingScore = score;
|
||||
},
|
||||
setSceneOperate: (state, sceneOperate) => {
|
||||
state.sceneOperate = sceneOperate;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
@ -81,9 +94,11 @@ const training = {
|
||||
},
|
||||
trainingStart: ({commit}) => {
|
||||
commit('setTrainingSwitch', true);
|
||||
setLocalStorage('nextNew', null);
|
||||
},
|
||||
trainingEnd: ({commit}) => {
|
||||
commit('setTrainingSwitch', false);
|
||||
setLocalStorage('nextNew', null);
|
||||
},
|
||||
setTrainingOperate: ({commit, state}, trainingOperate) => {
|
||||
commit('setTrainingOperate', trainingOperate);
|
||||
@ -109,44 +124,19 @@ const training = {
|
||||
setTrainingScore: ({commit}, score) => {
|
||||
commit('setTrainingScore', score);
|
||||
},
|
||||
checkTrainingOperate:({commit, state}, trainingOperate) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const stepList = JSON.parse(state.trainingDetail.stepJson);
|
||||
const step = stepList.find(item => item.id == state.stepOrder );
|
||||
const operateIndex = step.operations.findIndex(item => item.id == state.operateOrder);
|
||||
const stepOperation = step.operations[operateIndex];
|
||||
let flag = true;
|
||||
if (trainingOperate.cmdType || stepOperation.operationType) {
|
||||
const cmd = trainingOperate.cmdType ? trainingOperate.cmdType.value : '';
|
||||
flag = (cmd === stepOperation.operationType) && flag;
|
||||
}
|
||||
if (trainingOperate.code || stepOperation.deviceCode) {
|
||||
flag = (trainingOperate.code === stepOperation.deviceCode) && flag;
|
||||
}
|
||||
if (trainingOperate.operation || stepOperation.domId) {
|
||||
flag = (trainingOperate.operation === stepOperation.domId) && flag;
|
||||
}
|
||||
if (trainingOperate.userOperationType || stepOperation.userOperationType) {
|
||||
flag = (trainingOperate.userOperationType === stepOperation.userOperationType) && flag;
|
||||
}
|
||||
for (const param in stepOperation.params) {
|
||||
flag = (trainingOperate.param[param] === stepOperation.params[param]) && flag;
|
||||
}
|
||||
if (flag && step.operations.length === (operateIndex + 1 )) {
|
||||
commit('stepOverCountChange');
|
||||
resolve();
|
||||
} else if (flag) {
|
||||
commit('operateOrderIncrease');
|
||||
resolve();
|
||||
} else {
|
||||
const stepList = JSON.parse(state.trainingDetail.stepJson);
|
||||
const step = stepList.find(item => item.id == state.stepOrder );
|
||||
const operateIndex = step.operations.findIndex(item => item.id == state.operateOrder);
|
||||
const stepOperation = step.operations[operateIndex];
|
||||
console.error('校验失败;', trainingOperate, stepOperation);
|
||||
reject('校验失败');
|
||||
}
|
||||
});
|
||||
setSceneOperate: ({commit}, sceneOperate) => {
|
||||
commit('setSceneOperate', sceneOperate);
|
||||
},
|
||||
handleCheckNewTrainingResult:({commit, state}, valid) => {
|
||||
const stepList = JSON.parse(state.trainingDetail.stepJson);
|
||||
const step = stepList[state.stepOrder - 1];
|
||||
if (valid && step.operations.length === (state.operateOrder + 1 )) {
|
||||
commit('stepOverCountChange');
|
||||
} else if (valid) {
|
||||
commit('operateOrderIncrease');
|
||||
} else {
|
||||
console.error('校验失败;');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -2,6 +2,7 @@ import { login, logout, getInfo, preLogout } from '@/api/login';
|
||||
import { getToken, setToken, removeToken } from '@/utils/auth';
|
||||
import { LoginParams } from '@/utils/login';
|
||||
import { creatSubscribe, clearSubscribe, perpetualTopic, disconnect} from '@/utils/stomp';
|
||||
import { defaultCallback } from '@/utils/subscribeCallback';
|
||||
import Cookies from 'js-cookie';
|
||||
|
||||
const user = {
|
||||
@ -74,7 +75,7 @@ const user = {
|
||||
Cookies.remove('UserToken');
|
||||
},
|
||||
SUBSCRIBE: (state, {header, type}) => {
|
||||
creatSubscribe(perpetualTopic, header);
|
||||
creatSubscribe(perpetualTopic, header, defaultCallback);
|
||||
},
|
||||
SUBSCRIBE_UN: () => {
|
||||
clearSubscribe(perpetualTopic);
|
||||
|
@ -1,4 +1,5 @@
|
||||
import SessionStorage from 'sessionstorage';
|
||||
import store from '@/store/index';
|
||||
|
||||
const TokenKey = 'Admin-Token';
|
||||
|
||||
@ -23,3 +24,22 @@ export function setSessionStorage(key, value) {
|
||||
export function removeSessionStorage(key) {
|
||||
return SessionStorage.removeItem(key);
|
||||
}
|
||||
|
||||
// 操作LocalStorage
|
||||
export function getLocalStorage(key) {
|
||||
const idKey = getUserIdKey(key);
|
||||
return localStorage.getItem(idKey);
|
||||
}
|
||||
export function setLocalStorage(key, value) {
|
||||
const idKey = getUserIdKey(key);
|
||||
return localStorage.setItem(idKey, value);
|
||||
}
|
||||
export function removeLocalStorage(key) {
|
||||
const idKey = getUserIdKey(key);
|
||||
return localStorage.removeItem(idKey);
|
||||
}
|
||||
export function getUserIdKey(key) {
|
||||
const id = store.state.user.id;
|
||||
const idKey = `${id}_${key}`;
|
||||
return idKey;
|
||||
}
|
||||
|
@ -24,10 +24,10 @@ export function handlerUrl(data) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// const data = null;
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.233/rtss-server';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
BASE_API = 'http://192.168.3.233/rtss-server';
|
||||
// BASE_API = 'http://114.116.51.125/jlcloud';
|
||||
// BASE_API = 'http://192.168.8.152:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.90:9100'; // 周寅
|
||||
// BASE_API = 'http://192.168.3.94:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.15:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 夏增彬
|
||||
|
@ -1,3 +1,17 @@
|
||||
import dayjs from 'dayjs';
|
||||
// import utc from 'dayjs/plugin/utc'
|
||||
import 'dayjs/locale/zh-cn';
|
||||
import duration from 'dayjs/plugin/duration';
|
||||
import localizedFormat from 'dayjs/plugin/localizedFormat';
|
||||
dayjs.locale('zh-cn');
|
||||
dayjs
|
||||
// .extend(utc)
|
||||
.extend(localizedFormat)
|
||||
.extend(duration);
|
||||
|
||||
/**
|
||||
* @returns 当前时间, 格式: 'YYYY-MM-DD HH:mm:ss'
|
||||
*/
|
||||
export function now() {
|
||||
var d = new Date();
|
||||
var year = d.getFullYear();
|
||||
@ -16,12 +30,19 @@ export function now() {
|
||||
return year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Number} usedTime 秒数
|
||||
* @returns `HH:mm:ss`
|
||||
*/
|
||||
export function timeFormat(usedTime = 0) {
|
||||
let hour = 0; let minute = 0; let second = 0; let sumTime = usedTime;
|
||||
let hour = 0;
|
||||
let minute = 0;
|
||||
let second = 0;
|
||||
let sumTime = usedTime;
|
||||
if (sumTime) {
|
||||
if (sumTime >= 3600) {
|
||||
hour = Math.floor(sumTime / 3600) % 24;
|
||||
sumTime = (sumTime % 3600);
|
||||
sumTime = sumTime % 3600;
|
||||
}
|
||||
if (sumTime >= 60) {
|
||||
minute = Math.floor(sumTime / 60);
|
||||
@ -35,8 +56,11 @@ export function timeFormat(usedTime = 0) {
|
||||
return getTimeStr(hour) + ':' + getTimeStr(minute) + ':' + getTimeStr(second);
|
||||
}
|
||||
|
||||
// 时分秒转为时间戳
|
||||
|
||||
/**
|
||||
* 时分秒转为时间戳
|
||||
* @param {String} time 'HH:mm:ss'
|
||||
* @returns 秒数
|
||||
*/
|
||||
export function toTimeStamp(time = '') {
|
||||
let s = 0;
|
||||
const hour = time.split(':')[0];
|
||||
@ -46,8 +70,11 @@ export function toTimeStamp(time = '') {
|
||||
return s;
|
||||
}
|
||||
|
||||
// 时间戳的只转为时分秒
|
||||
|
||||
/**
|
||||
* 时间戳的转换为时分秒
|
||||
* @param {Number} mss Unix时间戳
|
||||
* @returns 'HH:mm:ss'
|
||||
*/
|
||||
export function formatDuring(mss) {
|
||||
const now = new Date(mss);
|
||||
const hour = now.getHours(); // 返回日期中的小时数(0到23)
|
||||
@ -56,41 +83,43 @@ export function formatDuring(mss) {
|
||||
return hour + ':' + minute + ':' + second;
|
||||
}
|
||||
|
||||
export function prefixIntrger(num, length) {
|
||||
return (Array(length).join('0') + num).slice(-length);
|
||||
}
|
||||
/** 根据秒计算时间hh:mm:ss */
|
||||
export function computationTime(time) {
|
||||
let hours = Math.floor(time / 3600);
|
||||
const newTime = time % 3600;
|
||||
let minutes = Math.floor(newTime / 60) + '';
|
||||
let seconds = newTime % 60;
|
||||
if (hours < 0) {
|
||||
hours = '00';
|
||||
} else if (hours < 10) {
|
||||
hours = '0' + hours;
|
||||
}
|
||||
if (minutes < 0) {
|
||||
minutes = '00';
|
||||
} else if (minutes < 10) {
|
||||
minutes = '0' + minutes;
|
||||
}
|
||||
if (seconds < 0) {
|
||||
seconds = '00';
|
||||
} else if (seconds < 10) {
|
||||
seconds = '0' + seconds;
|
||||
}
|
||||
return hours + ':' + minutes + ':' + seconds;
|
||||
}
|
||||
|
||||
export function computationSeconds(seconds, hourUnit, minuteUnit, secondUnit) {
|
||||
if (seconds) {
|
||||
const h = parseInt(seconds / 3600);
|
||||
const m = parseInt((seconds - h * 3600) / 60);
|
||||
const s = (seconds - h * 3600) % 60;
|
||||
return h ? `${h} ${hourUnit} ${m} ${minuteUnit} ${s} ${secondUnit}`
|
||||
: m ? `${m} ${minuteUnit} ${s} ${secondUnit}`
|
||||
: `${s} ${secondUnit}`;
|
||||
return h ? `${h} ${hourUnit} ${m} ${minuteUnit} ${s} ${secondUnit}` : m ? `${m} ${minuteUnit} ${s} ${secondUnit}` : `${s} ${secondUnit}`;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export function timestampFormat(format, ms = new Date()) {
|
||||
return dayjs/* .utc */(ms).format(format);
|
||||
}
|
||||
|
||||
/* 对象是否相等 */
|
||||
export function objectIsEqual(obj1, obj2) {
|
||||
if (!(obj1 instanceof Object)) {
|
||||
return false;
|
||||
} else if (!(obj2 instanceof Object)) {
|
||||
return false;
|
||||
}
|
||||
// 仅过滤值为null的项
|
||||
const arr1 = Object.keys(obj1).filter(key => { return obj1[key] != null; });
|
||||
const arr2 = Object.keys(obj2).filter(key => { return obj1[key] != null; });
|
||||
if (arr1.length !== arr2.length) {
|
||||
return false;
|
||||
}
|
||||
for (const key of arr1) {
|
||||
if (obj1[key] instanceof Object && obj2[key] instanceof Object) {
|
||||
if (!objectIsEqual(obj1[key], obj2[key])) {
|
||||
console.log(obj1[key], obj2[key]);
|
||||
return false;
|
||||
}
|
||||
} else if (obj1[key] !== obj2[key]) {
|
||||
console.log(obj1[key], obj2[key]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ StompClient.prototype = {
|
||||
that.status = true;
|
||||
// 恢复订阅
|
||||
that.subscribeMap.forEach((subscribe) => {
|
||||
that.subscribe(subscribe.dest, subscribe.handler);
|
||||
that.subscribe(subscribe.dest, subscribe.handler, subscribe.headers);
|
||||
});
|
||||
}, (e)=> {
|
||||
console.log('socket连接错误:' + e);
|
||||
@ -114,20 +114,21 @@ StompClient.prototype = {
|
||||
this.onmessage = onmessage;
|
||||
this.headers = headers;
|
||||
if (!this.status) {
|
||||
this.subscribeMap.set(topic, {dest: topic, handler: onmessage, sub: null});
|
||||
this.subscribeMap.set(topic, {dest: topic, handler: onmessage, sub: null, headers, count: 1});
|
||||
} else {
|
||||
const sub = this.clientIns.subscribe(topic, onmessage);
|
||||
this.subscribeMap.set(topic, {dest: topic, handler: onmessage, sub: sub});
|
||||
this.subscribeMap.set(topic, {dest: topic, handler: onmessage, sub: sub, headers, count: 1});
|
||||
}
|
||||
},
|
||||
|
||||
unsubscribe(topic) {
|
||||
const subscription = this.subscribeMap.get(topic);
|
||||
if (subscription && subscription.sub) {
|
||||
subscription.count--;
|
||||
if (subscription && subscription.sub && subscription.count < 0) {
|
||||
subscription.sub.unsubscribe();
|
||||
this.subscribeMap.delete(topic);
|
||||
console.log('取消订阅:' + topic);
|
||||
} else if (subscription) {
|
||||
} else if (subscription && subscription.count < 0) {
|
||||
this.subscribeMap.delete(topic);
|
||||
}
|
||||
},
|
||||
|
@ -10,7 +10,7 @@ export const jl3dTopic = '/user/queue/simulation/jl3d'; // 三维topic
|
||||
export const LPFTopic = '/user/queue/simulation/passenger'; // 客流topic
|
||||
// export const iscsTopic = '/topic/simulation/iscs'; // iscs topic
|
||||
|
||||
export function getTopic(type, group, stationCode) {
|
||||
export function getTopic(type, group, param) {
|
||||
let topic = '';
|
||||
switch (type) {
|
||||
case 'SYSTIME':
|
||||
@ -23,7 +23,7 @@ export function getTopic(type, group, stationCode) {
|
||||
topic = `/queue/simulation/${group}/state`;
|
||||
break;
|
||||
case 'ISCSPSD':
|
||||
topic = `/queue/simulation/${group}/iscs/psd/${stationCode}`;
|
||||
topic = `/queue/simulation/${group}/iscs/psd/${param.stationCode}`;
|
||||
break;
|
||||
case 'ISCSPA':
|
||||
topic = `/queue/simulation/${group}/iscs/pa`;
|
||||
@ -31,6 +31,15 @@ export function getTopic(type, group, stationCode) {
|
||||
case 'ISCSPIS':
|
||||
topic = `/queue/simulation/${group}/iscs/pis`;
|
||||
break;
|
||||
case 'ISCSGATE':
|
||||
topic = `/queue/simulation/${group}/iscs/gate/${param.stationCode}`;
|
||||
break;
|
||||
case 'PIS_STAND':
|
||||
topic = `/queue/simulation/${group}/standPis/${param.standCode}`;
|
||||
break;
|
||||
case 'PIS_TRAIN':
|
||||
topic = `/queue/simulation/${group}/onboardPis/${param.groupNumber}`;
|
||||
break;
|
||||
case 'CTC':
|
||||
topic = `/user/queue/simulation/${group}/ctc`;
|
||||
break;
|
||||
@ -47,13 +56,15 @@ export function getTopic(type, group, stationCode) {
|
||||
}
|
||||
|
||||
// 建立连接并订阅地址
|
||||
export function creatSubscribe(topic, header) {
|
||||
export function creatSubscribe(topic, header, callbackFun) {
|
||||
try {
|
||||
if (!Vue.prototype.$stomp) {
|
||||
Vue.prototype.$stomp = new StompClient();
|
||||
}
|
||||
if (!Vue.prototype.$stomp.subscribeMap[topic]) {
|
||||
Vue.prototype.$stomp.subscribe(topic, callback, header);
|
||||
Vue.prototype.$stomp.subscribe(topic, callbackFun || callback, header);
|
||||
} else {
|
||||
Vue.prototype.$stomp.subscribeMap[topic].count++;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('websocket订阅失败', error, topic, header);
|
||||
@ -69,12 +80,16 @@ function callback(Response) {
|
||||
store.dispatch('socket/setSimulationTimeSync', Number.parseInt(Response.body));
|
||||
} else if (Response.headers.destination.includes('state')) {
|
||||
store.dispatch('socket/handleSimulationState', Number.parseInt(Response.body));
|
||||
} else if (Response.headers.destination.includes('iscs/psd')) {
|
||||
} else if (Response.headers.destination.includes('iscs/psd') || Response.headers.destination.includes('iscs/gate')) {
|
||||
store.dispatch('socket/handleIscsState', JSON.parse(Response.body));
|
||||
} else if (Response.headers.destination.includes('iscs/pa')) {
|
||||
store.dispatch('socket/handleIscsPaState', JSON.parse(Response.body));
|
||||
} else if (Response.headers.destination.includes('iscs/pis')) {
|
||||
store.dispatch('socket/handleIscsPisState', JSON.parse(Response.body));
|
||||
} else if (Response.headers.destination.includes('standPis')) {
|
||||
store.dispatch('socket/handleStandPisState', JSON.parse(Response.body));
|
||||
} else if (Response.headers.destination.includes('onboardPis')) {
|
||||
store.dispatch('socket/handleOnboardPisState', JSON.parse(Response.body));
|
||||
} else {
|
||||
const data = JSON.parse(Response.body);
|
||||
store.dispatch('socket/setStomp', data);
|
||||
|
208
src/utils/subscribeCallback.js
Normal file
208
src/utils/subscribeCallback.js
Normal file
@ -0,0 +1,208 @@
|
||||
import store from '@/store/index';
|
||||
import {Notification} from 'element-ui';
|
||||
export function atsCallback(Response) {
|
||||
const data = {res:JSON.parse(Response.body), type:'ats' };
|
||||
store.dispatch('socket/handleSock', data);
|
||||
}
|
||||
export function sysTimeCallback(Response) {
|
||||
store.dispatch('socket/setSimulationTimeSync', Number.parseInt(Response.body));
|
||||
}
|
||||
export function stateCallback(Response) {
|
||||
store.dispatch('socket/handleSimulationState', Number.parseInt(Response.body));
|
||||
}
|
||||
export function iscsPsdCallback(Response) {
|
||||
store.dispatch('socket/handleIscsState', JSON.parse(Response.body));
|
||||
}
|
||||
export function iscsPaCallback(Response) {
|
||||
store.dispatch('socket/handleIscsPaState', JSON.parse(Response.body));
|
||||
}
|
||||
export function iscsPisCallback(Response) {
|
||||
store.dispatch('socket/handleIscsPisState', JSON.parse(Response.body));
|
||||
}
|
||||
export function defaultCallback(Response) {
|
||||
handle(JSON.parse(Response.body));
|
||||
}
|
||||
function handle(data) {
|
||||
const msg = data.body;
|
||||
switch (data.type) {
|
||||
case 'Order_Pay_Result': // 订单支付结果消息
|
||||
store.dispatch('socket/setPayOrder', msg);
|
||||
break;
|
||||
case 'Simulation_DeviceStatus': // 仿真-设备状态消息
|
||||
store.dispatch('socket/setEquipmentStatus', msg);
|
||||
break;
|
||||
case 'Simulation_User': // 仿真-进出仿真消息
|
||||
store.dispatch('socket/setSimulationRoleList', (data instanceof Array) ? data : [data]);
|
||||
break;
|
||||
case 'Simulation_Script_Action_Tip': // 剧本提示消息
|
||||
store.dispatch('socket/setSimulationScriptTip', data);
|
||||
break;
|
||||
case 'Simulation_Script_Action_Finish': // 剧本某一部操作完成提示
|
||||
store.dispatch('socket/simulationScriptTipFinishIncrease');
|
||||
break;
|
||||
case 'Simulation_Script_Action_Error': // 剧本某一部操作执行错误
|
||||
store.dispatch('socket/simulationScriptTipErrorIncrease');
|
||||
break;
|
||||
case 'Simulation_Over': // 用户退出仿真推送消息
|
||||
store.dispatch('socket/simulationOverIncrease');
|
||||
break;
|
||||
case 'Simulation_Script_Action':// 剧本编制添加指令的推送消息
|
||||
store.dispatch('socket/setScriptAction', msg);
|
||||
break;
|
||||
case 'Simulation_AutoFault_Trigger': // 自动故障触发操作推送消息
|
||||
store.dispatch('socket/autoFaultTriggerIncrease');
|
||||
break;
|
||||
case 'Simulation_RunFact': // 仿真-列车实际到发车站消息
|
||||
store.dispatch('socket/setTrainStationList', Array.isArray(msg) ? msg : [msg]);
|
||||
break;
|
||||
case 'Simulation_Error': // 仿真-异常消息
|
||||
store.dispatch('socket/simulationErrorIncrease');
|
||||
break;
|
||||
case 'Simulation_RunAsPlan_Start': // 仿真-仿真开始按计划行车消息
|
||||
store.dispatch('socket/setSimulationStart', msg);
|
||||
break;
|
||||
case 'Simulation_Reset': // 仿真-仿真重置消息 退出计划行车
|
||||
store.dispatch('socket/simulationResetIncrease');
|
||||
break;
|
||||
case 'Simulation_Conversation': // 仿真-用户交互消息(聊天/命令)
|
||||
handleSimulationInfo(msg);
|
||||
break;
|
||||
case 'Simulation_Conversation_Operation': // 仿真-用户交互消息(聊天/命令)-新
|
||||
handleSimulationInfo({id: msg.id, message: msg, messageType: 'MESSAGE'});
|
||||
break;
|
||||
case 'Simulation_ApplyHandle': // 请求处理消息(旧版可能在用,新版地图不用这个)
|
||||
store.dispatch('socket/handlePushMsgQueue', msg);
|
||||
break;
|
||||
case 'Simulation_Invite': // 综合演练-仿真邀请消息
|
||||
store.dispatch('socket/setSimulationInvite', msg);
|
||||
break;
|
||||
case 'Be_Logged_Out': // 重复登录被登出
|
||||
store.dispatch('socket/setLoggedOutMsg', msg);
|
||||
break;
|
||||
case 'Simulation_Run_Plan_Reload': // 运行图变更
|
||||
store.dispatch('socket/runPlanReloadCountIncrease');
|
||||
break;
|
||||
case 'Simulation_Control_Pause': // 暂停中
|
||||
store.dispatch('scriptRecord/updateSimulationPause', msg);
|
||||
break;
|
||||
case 'BROADCAST': // 升级通知消息
|
||||
Notification.warning({
|
||||
title: msg.title,
|
||||
center: true,
|
||||
message: msg.message,
|
||||
position: 'bottom-right',
|
||||
showClose: msg.showClose,
|
||||
duration: 0
|
||||
});
|
||||
break;
|
||||
case 'Simulation_Member':
|
||||
store.dispatch('socket/memberChangeCountIncrease');
|
||||
break;
|
||||
case 'Simulation_Time_Sync':
|
||||
store.dispatch('socket/setSimulationTimeSync', msg);
|
||||
break;
|
||||
case 'Simulation_IbpStatus':
|
||||
store.dispatch('socket/setSimulationIbpStatus', msg);
|
||||
break;
|
||||
case 'Simulation_Competition_Practice_Finish':
|
||||
store.dispatch('socket/competitionPracticeFinishIncrease');
|
||||
break;
|
||||
case 'Simulation_Alarm':
|
||||
store.dispatch('socket/setSimulationAlarmInfo', msg);
|
||||
break;
|
||||
case 'STATION_PFI_NUM':
|
||||
store.dispatch('socket/setStationPfiNum', msg);
|
||||
break;
|
||||
case 'STAND_PFI':
|
||||
store.dispatch('socket/setStandPfiNum', msg);
|
||||
break;
|
||||
case 'TRAIN_PFI_NUM':
|
||||
store.dispatch('socket/setTrainPfiNum', msg);
|
||||
break;
|
||||
case 'TRAIN_PFI_BL':
|
||||
store.dispatch('socket/setTrainPfiBL', msg);
|
||||
break;
|
||||
case 'LPF_STRATEGY_RECOMMEND':
|
||||
store.dispatch('socket/setLPFstrategy', msg);
|
||||
break;
|
||||
case 'Simulation_Scenes_Reload':
|
||||
if (msg) {
|
||||
store.dispatch('training/start');
|
||||
} else {
|
||||
store.dispatch('training/over');
|
||||
}
|
||||
store.dispatch('socket/trainingReloadCountIncrease');
|
||||
break;
|
||||
case 'Simulation_PslStatus':
|
||||
store.dispatch('socket/setSimulationPslStatus', msg);
|
||||
break;
|
||||
// 运行图加线/抽线/变化推送消息
|
||||
case 'Simulation_Trip_Plan_Change':
|
||||
store.dispatch('socket/setSimulationPlanChange', msg);
|
||||
break;
|
||||
// 占线板信息
|
||||
case 'Simulation_RailCtcStatus':
|
||||
store.dispatch('socket/setRailCtcStatusMsg', msg);
|
||||
break;
|
||||
case 'SIMULATION_CTC_RUN_PLAN_CHANGE':
|
||||
store.dispatch('socket/handleCtcRunPlanChange', msg);
|
||||
break;
|
||||
// 大铁项目 ctc 调度发布行车计划 给车站下发消息
|
||||
case 'SIMULATION_RAILWAY_RUN_PLAN_SEND':
|
||||
store.dispatch('socket/sendRailwayRunPlan', msg);
|
||||
break;
|
||||
// 大铁项目 ctc 车务管理端 初始化消息
|
||||
case 'SIMULATION_CTC_MANAGER_RUN_PLAN_EDIT_INIT':
|
||||
store.dispatch('socket/initCtcManagerRunPlan', msg);
|
||||
break;
|
||||
// 大铁项目 ctc 车务管理端 修改/增加消息
|
||||
case 'SIMULATION_CTC_MANAGER_RUN_PLAN_EDIT_CHANGE':
|
||||
store.dispatch('socket/changeCtcManagerRunPlanEdit', msg);
|
||||
break;
|
||||
// 大铁项目 ctc 车务管理端 移除消息
|
||||
case 'SIMULATION_CTC_MANAGER_RUN_PLAN_EDIT_REMOVE':
|
||||
store.dispatch('socket/removeCtcManagerRunPlanEdit', msg);
|
||||
break;
|
||||
// 调度命令信息
|
||||
case 'SIMULATION_RAIL_CTC_DISPATCH_COMMAND':
|
||||
store.dispatch('socket/setDispatchCommandMsg', msg);
|
||||
break;
|
||||
// 车站发送计划信息
|
||||
case 'SIMULATION_CTC_RUN_PLAN_CONFIRM_SEND':
|
||||
store.dispatch('socket/setChangedCtcRunplanMap', msg);
|
||||
break;
|
||||
case 'SIMULATION_RAIL_TICKET':
|
||||
store.dispatch('socket/setTicketInfo', msg);
|
||||
break;
|
||||
// 实训提示消息
|
||||
case 'Simulation_Training_Step_Tip':
|
||||
store.dispatch('socket/setTrainingStepTip', msg);
|
||||
break;
|
||||
case 'Simulation_Training_Finish':
|
||||
store.dispatch('socket/trainingOverCountIncrease');
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 仿真内部聊天
|
||||
function handleSimulationInfo(data) {
|
||||
switch (data.messageType) {
|
||||
case 'INVITE':
|
||||
store.dispatch('socket/setInviteSimulationConversation', data);
|
||||
break;
|
||||
case 'CONNECT':
|
||||
store.dispatch('socket/setAcceptConversionInvite', data);
|
||||
break;
|
||||
case 'OVER':
|
||||
store.dispatch('socket/setOverConversation', data);
|
||||
break;
|
||||
case 'MESSAGE':
|
||||
store.dispatch('socket/setConversationInfo', data);
|
||||
break;
|
||||
case 'CREATE':
|
||||
store.dispatch('socket/setCreateConversation', data);
|
||||
break;
|
||||
case 'EXIT':
|
||||
store.dispatch('socket/setExitConversation', data);
|
||||
break;
|
||||
}
|
||||
}
|
@ -8,12 +8,12 @@
|
||||
<div class="stationTrackRMenu">
|
||||
<div class="stationTrackRMenuL">
|
||||
<!-- :id="domIdConfirm" :loading="loading" @click="commit"-->
|
||||
<el-button class="stationTrackButton" size="small" @click="modifySection">修改</el-button>
|
||||
<el-button :id="OperationEvent.CTCCommand.modifyStationTrack.edit.domId" class="stationTrackButton" size="small" @click="modifySection">修改</el-button>
|
||||
</div>
|
||||
<div class="stationTrackRMenuR">
|
||||
<span class="stationTrackRVer">版本号</span>
|
||||
<el-button class="stationTrackButton" size="small">备份</el-button>
|
||||
<el-button class="stationTrackButton" size="small" @click="releaseStationTrack">更新至生效区</el-button>
|
||||
<el-button :id="OperationEvent.CTCCommand.releaseStationTrack.menu.operation" class="stationTrackButton" size="small" @click="releaseStationTrack">更新至生效区</el-button>
|
||||
<el-button class="stationTrackButton" size="small">导入</el-button>
|
||||
<el-button class="stationTrackButton" size="small">比较</el-button>
|
||||
</div>
|
||||
@ -153,6 +153,7 @@ import { mapGetters } from 'vuex';
|
||||
import TerminalStationList from './terminalStationList';
|
||||
import TrackInformation from './trackInformation';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
export default {
|
||||
name:'StationTrack',
|
||||
components: {
|
||||
@ -213,7 +214,10 @@ export default {
|
||||
computed:{
|
||||
...mapGetters('map', [
|
||||
'sectionList'
|
||||
])
|
||||
]),
|
||||
OperationEvent() {
|
||||
return OperationEvent;
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
loadStation() {
|
||||
@ -252,10 +256,14 @@ export default {
|
||||
},
|
||||
modifySection() {
|
||||
if (this.currentRow) {
|
||||
this.$refs.trackInformation.doShow({
|
||||
row:this.currentRow,
|
||||
filterSectionMap:this.filterSectionMap,
|
||||
stationCode:this.currentStationCode
|
||||
commitOperate(menuOperate.CTC.editStationTrack, {}, 0).then(({valid})=>{
|
||||
if (valid) {
|
||||
this.$refs.trackInformation.doShow({
|
||||
row:this.currentRow,
|
||||
filterSectionMap:this.filterSectionMap,
|
||||
stationCode:this.currentStationCode
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -19,7 +19,7 @@ import Digit from './digit';
|
||||
import Separator from './separator';
|
||||
|
||||
export default {
|
||||
name: 'SystenTime',
|
||||
name: 'SystemTime',
|
||||
components: {
|
||||
Digit,
|
||||
Separator
|
||||
|
@ -2,6 +2,7 @@
|
||||
<div class="bigScreen">
|
||||
<div v-show="maskOpen" class="bigScreenMask" />
|
||||
<jlmap-visual ref="jlmapVisual" />
|
||||
<wh-train-list v-if="prdType=== '10'" ref="whTrainList" />
|
||||
<div v-show="disPlay" class="bigScreenBack">
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="back">返回</el-button>
|
||||
@ -17,11 +18,13 @@ import { mapGetters } from 'vuex';
|
||||
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import WhTrainList from './whTrainList';
|
||||
|
||||
export default {
|
||||
name: 'BigScreen',
|
||||
components: {
|
||||
JlmapVisual
|
||||
JlmapVisual,
|
||||
WhTrainList
|
||||
},
|
||||
props: {
|
||||
widthLeft: {
|
||||
@ -47,7 +50,10 @@ export default {
|
||||
]),
|
||||
...mapGetters('config', [
|
||||
'canvasId'
|
||||
])
|
||||
]),
|
||||
prdType() {
|
||||
return this.$route.query.prdType;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
widthLeft(val) {
|
||||
@ -76,6 +82,9 @@ export default {
|
||||
},
|
||||
'$store.state.socket.simulationOver':function(val) {
|
||||
this.backOut();
|
||||
},
|
||||
'$store.state.socket.whTrainInfo': function(val) {
|
||||
|
||||
}
|
||||
},
|
||||
async beforeDestroy() {
|
||||
@ -83,7 +92,7 @@ export default {
|
||||
this.$store.dispatch('training/setPrdType', '');
|
||||
},
|
||||
async mounted() {
|
||||
this.$store.dispatch('training/setPrdType', '07');
|
||||
this.$store.dispatch('training/setPrdType', this.$route.query.prdType || '07');
|
||||
await this.setWindowSize();
|
||||
await this.initLoadData();
|
||||
this.disPlay = true;
|
||||
@ -180,10 +189,16 @@ export default {
|
||||
this.clearSubscribe();
|
||||
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
|
||||
creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header);
|
||||
if (this.prdType === '10') {
|
||||
creatSubscribe(`/topic/yjddzh/trainPosition`, header);
|
||||
}
|
||||
// await this.$store.dispatch('training/setHasSubscribed');
|
||||
},
|
||||
clearSubscribe() {
|
||||
clearSubscribe(`${displayTopic}\/${this.$route.query.group}`);
|
||||
if (this.prdType === '10') {
|
||||
clearSubscribe(`/topic/yjddzh/trainPosition`);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -5,12 +5,12 @@
|
||||
<el-button-group ref="button_group_box" class="button_group_box">
|
||||
<el-button size="small" @click="showList">实训列表</el-button>
|
||||
</el-button-group>
|
||||
<el-radio-group v-model="demoMode" :disabled="trainingSwitch" class="mode" size="small" style="margin-left: 20px;" @change="changeMode">
|
||||
<el-radio-button :label="TrainingMode.TEACH">{{ $t('display.lesson.teachingMode') }}</el-radio-button>
|
||||
<el-radio-button :label="TrainingMode.PRACTICE">{{ $t('display.lesson.practiceMode') }}</el-radio-button>
|
||||
<el-radio-button :label="TrainingMode.TEST">{{ $t('display.lesson.testMode') }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
<span v-if="demoMode === TrainingMode.TEST" class="display-score">{{ $t('display.lesson.score') }}{{ trainingScore }}</span>
|
||||
<!-- <el-radio-group v-model="demoMode" :disabled="trainingSwitch" class="mode" size="small" style="margin-left: 20px;" @change="changeMode">-->
|
||||
<!-- <el-radio-button :label="TrainingMode.TEACH">{{ $t('display.lesson.teachingMode') }}</el-radio-button>-->
|
||||
<!-- <el-radio-button :label="TrainingMode.PRACTICE">{{ $t('display.lesson.practiceMode') }}</el-radio-button>-->
|
||||
<!-- <el-radio-button :label="TrainingMode.TEST">{{ $t('display.lesson.testMode') }}</el-radio-button>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- <span v-if="demoMode === TrainingMode.TEST" class="display-score">{{ $t('display.lesson.score') }}{{ trainingScore }}</span>-->
|
||||
</div>
|
||||
<TrainingList ref="trainingList" @editBlob="editBlob" />
|
||||
</div>
|
||||
|
101
src/views/designPlatform/scenePlayRole.vue
Normal file
101
src/views/designPlatform/scenePlayRole.vue
Normal file
@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="角色扮演"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
append-to-body
|
||||
:before-close="doClose"
|
||||
center
|
||||
>
|
||||
<template v-for="user in userList">
|
||||
<div :key="user.id" style="display: flex;justify-content: space-between;">
|
||||
<div>{{ user.nickName }}</div>
|
||||
<el-select v-model="user.memberId" size="mini" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in roleList"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="commit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {covertMemberData} from '@/views/newMap/displayNew/utils';
|
||||
import { assignUsersPlayRoles } from '@/api/jointSimulation';
|
||||
export default {
|
||||
name: 'ScenePlayRole',
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
userList: [],
|
||||
roleList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
trainingDetail() {
|
||||
return this.$store.state.trainingNew.trainingDetail;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.simulationUserList': function(val) {
|
||||
this.userList = [];
|
||||
this.$store.state.training.simulationUserList.forEach(user => {
|
||||
this.userList.push({id: user.userId, nickName: user.nickName, memberId: ''});
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.$store.state.training.simulationUserList && this.$store.state.training.simulationUserList.length) {
|
||||
this.userList = [];
|
||||
this.$store.state.training.simulationUserList.forEach(user => {
|
||||
this.userList.push({id: user.userId, nickName: user.nickName, memberId: ''});
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doClose() {
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
doShow() {
|
||||
const playerList = JSON.parse(this.trainingDetail.playerIdJson);
|
||||
const memberData = this.$store.state.training.memberData;
|
||||
const activeTrainList = this.$store.state.map.activeTrainList || [];
|
||||
const newMemberData = {};
|
||||
playerList.forEach(playerId => {
|
||||
newMemberData[playerId] = memberData[playerId];
|
||||
});
|
||||
const result = covertMemberData(activeTrainList, Object.values(newMemberData));
|
||||
let list = [];
|
||||
result.deviceListData.forEach(item => {
|
||||
list = list.concat(item);
|
||||
});
|
||||
this.roleList = list;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
commit() {
|
||||
const list = [];
|
||||
this.userList.forEach(user => {
|
||||
list.push({userId: user.id, memberId: user.memberId});
|
||||
});
|
||||
assignUsersPlayRoles(list, this.$route.query.group).then(resp => {
|
||||
this.$emit('startTraining');
|
||||
this.doClose();
|
||||
}).catch(() => {
|
||||
this.$message.error('扮演角色失败!');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -23,7 +23,6 @@ import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
|
||||
import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
export default {
|
||||
name:'TestRunplan',
|
||||
components: {
|
||||
@ -142,8 +141,7 @@ export default {
|
||||
if (resp && resp.code == 200 && resp.data) {
|
||||
if (!resp.data.dataError) {
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); // 是否暂停判断
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
|
||||
// this.$store.dispatch('training/countTime');
|
||||
this.$store.dispatch('training/setInitTime', resp.data.systemTime);
|
||||
this.planRunning = resp.data.planRunning;
|
||||
if (resp.data.planRunning) {
|
||||
this.$store.commit('training/start');
|
||||
@ -159,7 +157,8 @@ export default {
|
||||
time: model.initTime
|
||||
};
|
||||
ranAsPlan(data, this.group).then(res => {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
|
||||
// this.$store.dispatch('training/setInitTime', model.initTime);
|
||||
this.$store.dispatch('training/setInitTime', model.timestamp);
|
||||
}).catch(error => {
|
||||
if (error.code == '5001') {
|
||||
this.$messageBox(this.$t('error.mapDataError') + ',' + this.$t('error.startSimulationFailed'));
|
||||
|
@ -4,14 +4,12 @@
|
||||
<training-jlmap refs="trainingJlmap" />
|
||||
<training-tip ref="trainingTip" />
|
||||
<training-position-tip ref="trainingPositionTip" />
|
||||
<el-button size="small" class="fault-button" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式':'切换到故障模式' }}</el-button>
|
||||
<training-menu v-if="trainingDetail" ref="trainingMenu" :offset-bottom="offsetBottom" />
|
||||
<div class="trainBack">
|
||||
<el-button-group>
|
||||
<el-button v-if="record" v-loading="loading" type="danger" :disabled="loading" size="small" @click="init">初始化</el-button>
|
||||
<el-button v-if="!isPause && record" size="small" type="primary" @click="pauseScript">暂停</el-button>
|
||||
<el-button v-if="isPause && record" size="small" type="primary" @click="executePlayScript">恢复</el-button>
|
||||
<el-button v-if="!trainingSwitch && trainingDetail" type="success" size="small" @click="handlerStart">开始</el-button>
|
||||
<el-button v-if="trainingSwitch" type="danger" size="small" @click="handlerEnd">结束</el-button>
|
||||
<el-button type="primary" size="small" @click="back">返回</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
@ -19,12 +17,12 @@
|
||||
</template>
|
||||
<script>
|
||||
import { clearSimulation, executeScriptNew, simulationPause, exitRunPlan } from '@/api/simulation';
|
||||
import { startTraining, endTraining, endTrainingStep } from '@/api/jmap/training';
|
||||
import { endTrainingStep } from '@/api/jmap/training';
|
||||
import TrainingJlmap from './trainingJlmap';
|
||||
import MenuDemon from '@/views/trainingManage/demonMenu.vue';
|
||||
import TrainingTip from './trainingTip';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import TrainingPositionTip from './trainingPositionTip';
|
||||
import TrainingMenu from './trainingMenu';
|
||||
|
||||
export default {
|
||||
name: 'TrainingDesign',
|
||||
@ -32,11 +30,13 @@ export default {
|
||||
MenuDemon,
|
||||
TrainingTip,
|
||||
TrainingJlmap,
|
||||
TrainingPositionTip
|
||||
TrainingPositionTip,
|
||||
TrainingMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false
|
||||
loading: false,
|
||||
offsetBottom: 50
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -55,9 +55,6 @@ export default {
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
faultMode() {
|
||||
return this.$store.state.training.operatemode === OperateMode.FAULT;
|
||||
},
|
||||
teachMode() {
|
||||
return 'TEACHING_MODE';
|
||||
},
|
||||
@ -87,14 +84,21 @@ export default {
|
||||
this.$store.dispatch('trainingNew/setSimulationPause', false);
|
||||
},
|
||||
mounted() {
|
||||
this.handleOffsetBottom();
|
||||
},
|
||||
methods: {
|
||||
changeOperateMode() {
|
||||
let mode = OperateMode.FAULT;
|
||||
if (this.faultMode) {
|
||||
mode = OperateMode.NORMAL;
|
||||
}
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: mode });
|
||||
handleOffsetBottom() {
|
||||
setTimeout(() => {
|
||||
const menuBottom = document.getElementById('menuButtons_box');
|
||||
const buttonWidth = this.width - 1200;
|
||||
const tipInfoBox = document.getElementById('tipInfoBox');
|
||||
if (menuBottom && buttonWidth < 780) {
|
||||
this.offsetBottom = (menuBottom.offsetHeight || 0) + 15;
|
||||
}
|
||||
if (tipInfoBox) {
|
||||
this.offsetBottom += tipInfoBox.offsetHeight;
|
||||
}
|
||||
}, 500);
|
||||
},
|
||||
init() {
|
||||
this.loading = true;
|
||||
@ -134,29 +138,14 @@ export default {
|
||||
await clearSimulation(this.$route.query.group);
|
||||
}
|
||||
},
|
||||
handlerStart() {
|
||||
startTraining(this.group, {mode: this.teachMode}).then(() => {
|
||||
this.$store.dispatch('trainingNew/changeTeachMode', this.teachMode);
|
||||
this.$store.dispatch('trainingNew/trainingStart');
|
||||
}).catch(() => {
|
||||
this.$message.error('开始实训失败!');
|
||||
});
|
||||
},
|
||||
nextStep() {
|
||||
endTrainingStep(this.group, this.$store.state.trainingNew.stepOrder).then(resp => {
|
||||
const stepList = JSON.parse(this.$store.state.trainingNew.trainingDetail.stepJson);
|
||||
const index = this.$store.state.trainingNew.stepOrder - 1 >= 0 ? this.$store.state.trainingNew.stepOrder - 1 : 0;
|
||||
const step = stepList[index];
|
||||
endTrainingStep(this.group, step.id).then(resp => {
|
||||
}).catch(() => {
|
||||
this.$message.error('进入下一步实训失败!');
|
||||
});
|
||||
},
|
||||
handlerEnd() {
|
||||
endTraining(this.group).then(() => {
|
||||
this.$store.dispatch('trainingNew/trainingEnd');
|
||||
this.$store.dispatch('socket/clearTrainingStepTip');
|
||||
this.$store.dispatch('trainingNew/clearStepOrder');
|
||||
this.$store.dispatch('trainingNew/changeTeachMode', '');
|
||||
}).catch(() => {
|
||||
this.$message.error('结束实训失败!');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -184,9 +173,5 @@ export default {
|
||||
bottom: 15px;
|
||||
z-index: 19;
|
||||
}
|
||||
.fault-button{
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -1,10 +1,24 @@
|
||||
<template>
|
||||
<div class="train">
|
||||
<div v-show="maskOpen" class="trainMask" />
|
||||
<component :is="menus" :selected="selected" />
|
||||
<div v-show="maskOpen || prdType == '02'" class="trainMask" />
|
||||
<component :is="menus" v-show="prdType !== '02'" :selected="selected" />
|
||||
<jlmap-visual ref="jlmapVisual" @onSelect="clickEvent" @onMenu="onContextmenu" />
|
||||
<voice-chat-box v-if="$route.query.lineCode == '16'" ref="chatbox" :group="group" :user-role="userRole" />
|
||||
<voice-chat-box v-if="lineCode == '16'" ref="chatbox" :group="group" :user-role="userRole" />
|
||||
<chat-box v-else ref="chatbox" :group="group" :user-role="userRole" />
|
||||
<div v-if="lineCode === '16'" v-show="prdType === '02'" style="position:absolute;width: 100%;top:0;left:0;z-index:10">
|
||||
<dispatcher-station ref="dispatcherStation" />
|
||||
</div>
|
||||
<div class="fault-button">
|
||||
<el-button-group>
|
||||
<el-button v-if="lineCode === '16' && project !== 'teaching' && prdType === '01' " :id="goCTCDom.domId" size="small" @click="goCtc">车务终端</el-button>
|
||||
<el-button v-if="lineCode === '16' && project !== 'teaching' && prdType === '01'" :id="goRpManageDom.domId" size="small" @click="goRpManage">车务管理终端</el-button>
|
||||
<el-button v-if="lineCode ==='16' && prdType === '01'" :id="trainTicketDom.domId" size="small" @click="showTrainTicket">路票</el-button>
|
||||
<el-button v-if="showRegisterBookBtn" :id="registerBookDom.domId" size="small" @click="showRegisterBook">簿册</el-button>
|
||||
</el-button-group>
|
||||
<el-button :id="faultModeDom.domId" size="small" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式':'切换到故障模式' }}</el-button>
|
||||
</div>
|
||||
<train-ticket ref="trainTicket" />
|
||||
<register-book ref="registerBook" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -12,7 +26,7 @@ import JlmapVisual from '@/views/newMap/jlmapNew/index';
|
||||
import {loadMapDataById } from '@/utils/loaddata';
|
||||
import { clearSimulation } from '@/api/simulation';
|
||||
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getToken, getSessionStorage } from '@/utils/auth';
|
||||
import chatBox from '@/views/newMap/chatView/chatBox.vue';
|
||||
import VoiceChatBox from '@/views/newMap/chatView/voiceChatBox.vue';
|
||||
import { getDeviceMenuByDeviceType, MouseEvent } from '@/scripts/ConstDic';
|
||||
@ -22,13 +36,21 @@ import { getSimulationMemberList, getAllSimulationUser } from '@/api/simulation'
|
||||
import { getMemberListCommon, getUserListCommon } from '@/api/rtSimulation';
|
||||
import Vue from 'vue';
|
||||
import {mapGetters} from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import TrainTicket from '@/views/newMap/trainTicket/index.vue';
|
||||
import RegisterBook from '@/views/newMap/registerBook/index';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import DispatcherStation from '@/views/newMap/jointTrainingNew/dispatcherStation.vue';
|
||||
|
||||
export default {
|
||||
name: 'TrainingDesign',
|
||||
components: {
|
||||
JlmapVisual,
|
||||
chatBox,
|
||||
VoiceChatBox
|
||||
VoiceChatBox,
|
||||
TrainTicket,
|
||||
RegisterBook,
|
||||
DispatcherStation
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -51,6 +73,37 @@ export default {
|
||||
'trainList',
|
||||
'trainWindowList'
|
||||
]),
|
||||
goCTCDom() {
|
||||
return OperationEvent.TrainingDesign.menuButton.goCtc;
|
||||
},
|
||||
goRpManageDom() {
|
||||
return OperationEvent.TrainingDesign.menuButton.goRpManage;
|
||||
},
|
||||
trainTicketDom() {
|
||||
return OperationEvent.TrainingDesign.menuButton.trainTicket;
|
||||
},
|
||||
registerBookDom() {
|
||||
return OperationEvent.TrainingDesign.menuButton.registerBook;
|
||||
},
|
||||
faultModeDom() {
|
||||
return OperationEvent.TrainingDesign.menuButton.faultMode;
|
||||
},
|
||||
prdType() {
|
||||
return this.$store.state.training.prdType;
|
||||
},
|
||||
lineCode() {
|
||||
return this.$route.query.lineCode;
|
||||
},
|
||||
showRegisterBookBtn() {
|
||||
const roleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_SIGNALER', 'STATION_SWITCH_MAN', 'STATION_MASTER', 'STATION_WORKER', 'DEVICE_MANAGER'];
|
||||
return this.$route.query.lineCode === '16' && roleList.includes(this.$store.state.training.userRole);
|
||||
},
|
||||
faultMode() {
|
||||
return this.$store.state.training.operatemode === OperateMode.FAULT;
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
},
|
||||
mapId() {
|
||||
return this.$route.query.mapId;
|
||||
},
|
||||
@ -73,6 +126,11 @@ export default {
|
||||
this.initLoadData();
|
||||
});
|
||||
},
|
||||
'$store.state.socket.trainingReloadCount': function () {
|
||||
if (this.$store.state.trainingNew.trainingDetail && this.$store.state.trainingNew.trainingDetail.type === 'SCENE') {
|
||||
this.initMemberUserInfo();
|
||||
}
|
||||
},
|
||||
'$store.state.app.windowSizeCount': function() { // 窗口缩放
|
||||
this.setWindowSize();
|
||||
},
|
||||
@ -96,7 +154,7 @@ export default {
|
||||
this.menus = this.$theme.loadMenuComponent(lineCode);
|
||||
this.$store.commit('training/notifyGetCommandDefinition', lineCode);
|
||||
}
|
||||
this.initMemberUserInfo(true);
|
||||
this.initMemberUserInfo();
|
||||
},
|
||||
'$store.state.map.map': function (map) {
|
||||
if (map) {
|
||||
@ -123,6 +181,101 @@ export default {
|
||||
this.initLoadData();
|
||||
},
|
||||
methods: {
|
||||
changeOperateMode() {
|
||||
let mode = OperateMode.FAULT;
|
||||
if (this.faultMode) {
|
||||
mode = OperateMode.NORMAL;
|
||||
}
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: mode });
|
||||
const operate = {
|
||||
operation: this.faultModeDom.operation,
|
||||
param: { mode: mode },
|
||||
userOperationType: 'leftClick'
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate);
|
||||
},
|
||||
goCtc() {
|
||||
const operate = {
|
||||
operation: this.goCTCDom.operation,
|
||||
userOperationType: 'leftClick'
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/displayNew/demon',
|
||||
query:{
|
||||
lineCode:this.$route.query.lineCode,
|
||||
group: this.$route.query.group,
|
||||
prdType: '01',
|
||||
mapId:this.$route.query.mapId,
|
||||
project: this.project,
|
||||
newApi: false,
|
||||
ctc: true,
|
||||
try: this.$route.query.try || 0,
|
||||
token: getToken(),
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank');
|
||||
}
|
||||
});
|
||||
},
|
||||
goRpManage() {
|
||||
const operate = {
|
||||
operation: this.goRpManageDom.operation,
|
||||
userOperationType: 'leftClick'
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/bigTrainRunplanManage',
|
||||
query:{
|
||||
group: this.$route.query.group,
|
||||
mapId:this.$route.query.mapId,
|
||||
project: this.project,
|
||||
prdType: this.prdType,
|
||||
lineCode:this.$route.query.lineCode,
|
||||
// stationCode:this.$store.state.training.roleDeviceCode,
|
||||
// token:getToken(),
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank');
|
||||
}
|
||||
});
|
||||
},
|
||||
showTrainTicket() {
|
||||
const operate = {
|
||||
operation: this.trainTicketDom.operation,
|
||||
userOperationType: 'leftClick'
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
const stationSupervisorList = [];
|
||||
for (const memberId in this.$store.state.training.memberData) {
|
||||
const item = this.$store.state.training.memberData[memberId];
|
||||
if (item.type === 'STATION_SUPERVISOR') {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
||||
const memberData = { labelName: '值班员-' + device.name + (item.name ? `-${item.name }` : ''), id:item.id, userId:item.userId };
|
||||
stationSupervisorList.push(memberData);
|
||||
}
|
||||
}
|
||||
EventBus.$emit('trainTicketMember', stationSupervisorList);
|
||||
this.$refs.trainTicket.doShow();
|
||||
}
|
||||
});
|
||||
},
|
||||
showRegisterBook() {
|
||||
const operate = {
|
||||
operation: this.registerBookDom.operation,
|
||||
userOperationType: 'leftClick'
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$refs.registerBook.doShow();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取设备数据
|
||||
getDeviceByEm(em) {
|
||||
var device = this.$store.getters['map/getDeviceByCode'](em.deviceCode) || null;
|
||||
@ -307,10 +460,15 @@ export default {
|
||||
history.go(-1);
|
||||
});
|
||||
},
|
||||
async subscribe() {
|
||||
this.clearSubscribe();
|
||||
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
|
||||
creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header);
|
||||
subscribe() {
|
||||
// this.clearSubscribe();
|
||||
const topic = `${displayTopic}\/${this.$route.query.group}`;
|
||||
const subscription = this.$stomp.subscribeMap.get(topic);
|
||||
if (!subscription || !subscription.sub) {
|
||||
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
|
||||
creatSubscribe(topic, header);
|
||||
}
|
||||
|
||||
},
|
||||
clearSubscribe() {
|
||||
clearSubscribe(`${displayTopic}\/${this.$route.query.group}`);
|
||||
@ -361,6 +519,18 @@ export default {
|
||||
this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT');
|
||||
this.stationRoleShow(deviceCode);
|
||||
break;
|
||||
case 'STATION_SIGNALER': // 车站信号员
|
||||
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
this.$store.dispatch('training/setRoles', 'STATION_SIGNALER');
|
||||
this.stationRoleShow(deviceCode);
|
||||
break;
|
||||
case 'STATION_SWITCH_MAN': // 车站扳道员
|
||||
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
this.$store.dispatch('training/setRoles', 'STATION_SWITCH_MAN');
|
||||
this.stationRoleShow(deviceCode);
|
||||
break;
|
||||
case 'DEPOT_DISPATCHER':
|
||||
this.$store.dispatch('training/setPrdType', '09');
|
||||
this.$store.dispatch('training/setRoles', 'DEPOT_DISPATCHER');
|
||||
@ -458,7 +628,7 @@ export default {
|
||||
this.endViewLoading();
|
||||
}
|
||||
},
|
||||
initMemberUserInfo(isFirst = false) {
|
||||
initMemberUserInfo() {
|
||||
if (this.$route.query.newApi + '' === 'true') {
|
||||
getMemberListCommon(this.group).then(resp => {
|
||||
this.$store.dispatch('training/setMemberList', { memberList: resp.data, userId: this.userId });
|
||||
@ -526,4 +696,9 @@ export default {
|
||||
bottom: 15px;
|
||||
z-index: 19;
|
||||
}
|
||||
.fault-button{
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 10px;
|
||||
}
|
||||
</style>
|
||||
|
@ -5,17 +5,20 @@
|
||||
<div style="margin-bottom: 10px;font-size: 16px;">{{ `当前实训名称:${training.name || ''}` }}</div>
|
||||
<div style="font-size: 16px;">{{ `当前实训描述:${training.description || ''}` }}</div>
|
||||
</el-card>
|
||||
<div class="trainingHeader">
|
||||
<div class="trainingList">实训列表</div>
|
||||
<div class="flexNull" />
|
||||
</div>
|
||||
<QueryListPage ref="queryListPage" :card-padding="10" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane label="单操实训" name="first">
|
||||
<QueryListPage ref="queryListPage" :card-padding="10" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="场景实训" name="second">
|
||||
<QueryListPage ref="queryListPage" :card-padding="10" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryListScene" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPublishSingleList, getPublishTrainingDetail, loadPublishTraining } from '@/api/jmap/training';
|
||||
import { getPublishSingleList, getPublishTrainingDetail, loadPublishTraining, getPublishScenesList } from '@/api/jmap/training';
|
||||
import Cookies from 'js-cookie';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
|
||||
@ -27,6 +30,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
activeName: 'first',
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
@ -85,6 +89,47 @@ export default {
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
queryListScene: {
|
||||
query: this.queryFunctionScene,
|
||||
selectCheckShow: false,
|
||||
paginationHiden: true,
|
||||
indexShow: true,
|
||||
height: 500,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('trainingManage.name'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
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'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('trainingManage.operate'),
|
||||
width: '150',
|
||||
buttons: [
|
||||
{
|
||||
name: '加载',
|
||||
handleClick: this.loadScript,
|
||||
type: 'primary',
|
||||
showControl:(row) => { return row.id; }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -106,6 +151,9 @@ export default {
|
||||
queryFunction() {
|
||||
return getPublishSingleList(this.mapId);
|
||||
},
|
||||
queryFunctionScene() {
|
||||
return getPublishScenesList(this.mapId);
|
||||
},
|
||||
doShow() {
|
||||
this.getListData();
|
||||
this.dialogVisible = true;
|
||||
@ -134,6 +182,7 @@ export default {
|
||||
}
|
||||
}
|
||||
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) {
|
||||
|
308
src/views/designPlatform/trainingMenu.vue
Normal file
308
src/views/designPlatform/trainingMenu.vue
Normal file
@ -0,0 +1,308 @@
|
||||
<template>
|
||||
<!-- v-drag 拖拽 调整宽高 -->
|
||||
<div v-quickMenuDrag class="reminder-drag" :style="{bottom: offsetBottom + 'px'}">
|
||||
<div ref="drapBox" class="reminder-box">
|
||||
<div class="tip-title">
|
||||
<div>
|
||||
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
|
||||
<i v-show="!isShrink" class="icon el-icon-plus" @click="shrink" />
|
||||
<i v-show="!isShrink && !trainingSwitch && trainingDetail" class="icon el-icon-video-play" @click="handlerStart" />
|
||||
<i v-show="!isShrink && trainingSwitch" class="icon el-icon-switch-button" @click="handlerEnd" />
|
||||
</div>
|
||||
<p style="color: #fff;">
|
||||
<span>{{ trainingDetail.name }}</span>
|
||||
</p>
|
||||
</div>
|
||||
<div v-if="isShrink" class="reminder-box-content">
|
||||
<div class="zhezhao" />
|
||||
<div ref="dragBody" class="tip-body-box">
|
||||
<div class="tip-body">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<p class="list-item">
|
||||
<span class="list-label">{{ $t('display.training.trainingName') }}</span>
|
||||
<span class="list-elem">{{ trainingDetail.name }}</span>
|
||||
</p>
|
||||
<p v-if="demoMode === TrainingMode.TEST" class="list-item">
|
||||
<span class="list-label">{{ $t('display.lesson.score') }}</span>
|
||||
<span class="list-elem">{{ trainingScore }}</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">实训模式:</span>
|
||||
<span class="list-elem">
|
||||
<el-radio-group v-model="demoMode" :disabled="trainingSwitch" class="mode" size="small" @change="changeMode">
|
||||
<el-radio :label="TrainingMode.TEACH" border>{{ $t('display.lesson.teachingMode') }}</el-radio>
|
||||
<el-radio :label="TrainingMode.PRACTICE" border>{{ $t('display.lesson.practiceMode') }}</el-radio>
|
||||
<el-radio :label="TrainingMode.TEST" border>{{ $t('display.lesson.testMode') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label" style="vertical-align: top;"> {{ $t('display.training.trainingInstructions') }}</span>
|
||||
<span class="list-elem elem-span">{{ trainingDetail.description }}</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">操作按钮:</span>
|
||||
<span class="list-elem">
|
||||
<el-button v-if="!trainingSwitch && trainingDetail" size="small" type="success" @click="handlerStart">开始</el-button>
|
||||
<el-button v-if="trainingSwitch" size="small" type="danger" @click="handlerEnd">结束</el-button>
|
||||
</span>
|
||||
</p>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="drag-right" />
|
||||
<div class="drag-left" />
|
||||
<div class="drag-bottom" />
|
||||
<div class="drag-top" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<scene-play-role ref="scenePlayRole" @startTraining="startTraining" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ScriptMode } from '@/scripts/ConstDic';
|
||||
import { clearSimulation } from '@/api/simulation';
|
||||
import { startTraining, endTraining } from '@/api/jmap/training';
|
||||
import ScenePlayRole from './scenePlayRole';
|
||||
|
||||
export default {
|
||||
name: 'TipTrainingDetail',
|
||||
components: {
|
||||
ScenePlayRole
|
||||
},
|
||||
props: {
|
||||
offsetBottom: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isShrink: true,
|
||||
showSumbit: false,
|
||||
demoMode: ScriptMode.TEACH,
|
||||
TrainingMode: ScriptMode
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
trainingSwitch() {
|
||||
return this.$store.state.trainingNew.trainingSwitch;
|
||||
},
|
||||
trainingScore() {
|
||||
return this.$store.state.trainingNew.trainingScore;
|
||||
},
|
||||
trainingDetail() {
|
||||
return this.$store.state.trainingNew.trainingDetail;
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
teachMode() {
|
||||
return this.$store.state.trainingNew.teachMode;
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.showSumbit = false;
|
||||
},
|
||||
shrink() {
|
||||
if (this.isShrink) {
|
||||
this.isShrink = false;
|
||||
} else {
|
||||
this.isShrink = true;
|
||||
this.$nextTick(()=>{
|
||||
const dragDom = document.querySelector('.reminder-drag').style.bottom;
|
||||
if (document.body.clientHeight - 300 - parseInt(dragDom.replace('px', '')) < 0) {
|
||||
document.querySelector('.reminder-drag').style.bottom = `${document.body.clientHeight - 300}px`;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
changeMode(val) {
|
||||
this.demoMode = val;
|
||||
this.$store.dispatch('trainingNew/changeTeachMode', this.demoMode);
|
||||
},
|
||||
handlerStart() {
|
||||
if (this.trainingDetail.type === 'SCENE') {
|
||||
this.$refs.scenePlayRole.doShow();
|
||||
} else {
|
||||
this.startTraining();
|
||||
}
|
||||
},
|
||||
startTraining() {
|
||||
this.$store.dispatch('trainingNew/changeTeachMode', this.demoMode);
|
||||
startTraining(this.group, {mode: this.demoMode}).then(() => {
|
||||
this.$store.dispatch('trainingNew/trainingStart');
|
||||
this.$store.dispatch('trainingNew/setTrainingScore', '');
|
||||
}).catch(() => {
|
||||
this.$message.error('开始实训失败!');
|
||||
});
|
||||
},
|
||||
handlerEnd() {
|
||||
endTraining(this.group).then((resp) => {
|
||||
this.$store.dispatch('trainingNew/trainingEnd');
|
||||
this.$store.dispatch('socket/clearTrainingStepTip');
|
||||
this.$store.dispatch('trainingNew/clearStepOrder');
|
||||
this.$store.dispatch('trainingNew/clearOperateOrder');
|
||||
this.$store.dispatch('trainingNew/setTrainingScore', resp.data);
|
||||
}).catch(() => {
|
||||
this.$message.error('结束实训失败!');
|
||||
});
|
||||
},
|
||||
back() {
|
||||
if (this.group) {
|
||||
clearSimulation(this.group);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.tip-body-box {
|
||||
height: 260px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.reminder-drag{
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
left: 15px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.elem-span{
|
||||
display:inline-block;width:77%;line-height:26px;margin-top:-4px;
|
||||
}
|
||||
|
||||
.zhezhao{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
filter: blur(8px);
|
||||
background: rgba(255,255,255,0.9);
|
||||
position:absolute;
|
||||
}
|
||||
.reminder-box-content{
|
||||
width: 500px;
|
||||
height: 260px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
background: rgba(255,255,255,0.8);
|
||||
position: relative;
|
||||
}
|
||||
.reminder-box {
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
z-index: 10;
|
||||
font-size: 18px;
|
||||
|
||||
.tip-title {
|
||||
width: 500px;
|
||||
overflow: hidden;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row-reverse;
|
||||
background-color: rgba(64, 158, 255,1);
|
||||
border-radius: 5px 5px 0 0;
|
||||
justify-content: space-between;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.drag-right,
|
||||
.drag-left {
|
||||
width: 10px;
|
||||
cursor: e-resize;
|
||||
background-color: yellow;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.drag-left {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.drag-bottom {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 10px;
|
||||
cursor: s-resize;
|
||||
background-color: yellow;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.drag-top {
|
||||
position: absolute;
|
||||
top: -45px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 10px;
|
||||
cursor: s-resize;
|
||||
background-color: yellow;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.tip-body {
|
||||
height: 260px;
|
||||
padding: 10px;
|
||||
|
||||
.list-label {
|
||||
width: 105px;
|
||||
}
|
||||
}
|
||||
|
||||
.tip-foot {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
background-color: #fff;
|
||||
padding: 10px 0 10px 10px;
|
||||
|
||||
.foot-detail {
|
||||
height: 100%;
|
||||
float: right;
|
||||
margin-top: 9px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.foot-submit {
|
||||
float: right;
|
||||
margin-top: 9px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
background-color: #f3f3f3;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/deep/ {
|
||||
.el-tree-node__content {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
|
||||
background-color: #d6e5f7;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -29,15 +29,24 @@ export default {
|
||||
...mapGetters([
|
||||
'canvasWidth',
|
||||
'canvasHeight'
|
||||
])
|
||||
]),
|
||||
trainingDetail() {
|
||||
return this.$store.state.trainingNew.trainingDetail;
|
||||
},
|
||||
teachMode() {
|
||||
return this.$store.state.trainingNew.teachMode;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.trainingStepTip': function(val) {
|
||||
if (val) {
|
||||
if (val && this.trainingDetail.type === 'SINGLE') {
|
||||
const member = this.$store.state.training.memberData[val.memberId];
|
||||
this.$nextTick(function() {
|
||||
this.$store.dispatch('trainingNew/clearOperateOrder');
|
||||
this.$store.dispatch('trainingNew/stepOrderIncrease');
|
||||
this.tipInit();
|
||||
if (member.userId == this.$store.state.user.id) {
|
||||
this.tipInit();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -56,7 +65,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
tipInit() {
|
||||
if (this.$store.state.trainingNew.teachMode === ScriptMode.TEACH) {
|
||||
if (this.teachMode === ScriptMode.TEACH) {
|
||||
this.tipShow = true;
|
||||
const offset = this.$store.state.config.canvasOffset;
|
||||
const trainingDetail = this.$store.state.trainingNew.trainingDetail;
|
||||
@ -65,7 +74,7 @@ export default {
|
||||
if (steps && steps.length) {
|
||||
const step = steps[stepOrder - 1];
|
||||
const distance = 5;
|
||||
this.tip = this.$store.state.socket.trainingStepTip;
|
||||
this.tip = this.$store.state.socket.trainingStepTip.content;
|
||||
if (step && step.tipPosition && step.tipPosition.deviceCode) {
|
||||
const position = this.getShapeTipPoint(step.tipPosition);
|
||||
if (position) {
|
||||
@ -77,7 +86,6 @@ export default {
|
||||
}
|
||||
} else if (step && step.tipPosition && step.tipPosition.domId) {
|
||||
const position = this.getOtherTipPoint(step.tipPosition);
|
||||
console.log(position, '**********', step);
|
||||
if (position) {
|
||||
this.position = position;
|
||||
this.position.y -= distance;
|
||||
|
@ -4,10 +4,12 @@
|
||||
<training-jlmap refs="trainingJlmap" />
|
||||
<training-tip ref="trainingTip" />
|
||||
<training-position-tip ref="trainingPositionTip" />
|
||||
<!-- <scene-play-role ref="scenePlayRole" @startTraining="startTraining" />-->
|
||||
<training-menu v-if="trainingDetail" ref="trainingMenu" :offset-bottom="offsetBottom" />
|
||||
<div class="trainBack">
|
||||
<el-button-group>
|
||||
<el-button v-if="!trainingSwitch && trainingDetail" type="success" @click="handlerStart">开始</el-button>
|
||||
<el-button v-if="trainingSwitch" type="danger" @click="handlerEnd">结束</el-button>
|
||||
<!-- <el-button v-if="!trainingSwitch && trainingDetail" type="success" @click="handlerStart">开始</el-button>-->
|
||||
<!-- <el-button v-if="trainingSwitch" type="danger" @click="handlerEnd">结束</el-button>-->
|
||||
<el-button type="primary" @click="back">返回</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
@ -20,13 +22,17 @@ import MenuDemon from './demonMenu.vue';
|
||||
import TrainingTip from './trainingTip';
|
||||
import TrainingPositionTip from './trainingPositionTip';
|
||||
import TrainingJlmap from './trainingJlmap';
|
||||
// import ScenePlayRole from './scenePlayRole';
|
||||
import TrainingMenu from './trainingMenu';
|
||||
export default {
|
||||
name: 'TrainingDesign',
|
||||
components: {
|
||||
MenuDemon,
|
||||
TrainingTip,
|
||||
TrainingJlmap,
|
||||
TrainingPositionTip
|
||||
TrainingPositionTip,
|
||||
// ScenePlayRole,
|
||||
TrainingMenu
|
||||
},
|
||||
props: {
|
||||
widthLeft: {
|
||||
@ -40,7 +46,8 @@ export default {
|
||||
trainingObj: null,
|
||||
starting: false,
|
||||
selected: null,
|
||||
menus: null
|
||||
menus: null,
|
||||
offsetBottom: 15
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -82,8 +89,22 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch('trainingNew/setTrainingScore', '');
|
||||
this.handleOffsetBottom();
|
||||
},
|
||||
methods: {
|
||||
handleOffsetBottom() {
|
||||
setTimeout(() => {
|
||||
const menuBottom = document.getElementById('menuButtons_box');
|
||||
const tipInfoBox = document.getElementById('tipInfoBox');
|
||||
const buttonWidth = this.width - 1200;
|
||||
if (menuBottom && buttonWidth < 780) {
|
||||
this.offsetBottom = (menuBottom.offsetHeight || 0) + 15;
|
||||
}
|
||||
if (tipInfoBox) {
|
||||
this.offsetBottom += tipInfoBox.offsetHeight;
|
||||
}
|
||||
}, 500);
|
||||
},
|
||||
overallTranslation(flag) {
|
||||
const panel = document.getElementById('leftSlider');
|
||||
if (flag) {
|
||||
@ -98,6 +119,13 @@ export default {
|
||||
}
|
||||
},
|
||||
handlerStart() {
|
||||
if (this.trainingDetail.type === 'SCENE') {
|
||||
this.$refs.scenePlayRole.doShow();
|
||||
} else {
|
||||
this.startTraining();
|
||||
}
|
||||
},
|
||||
startTraining() {
|
||||
startTraining(this.group, {mode: this.teachMode}).then(() => {
|
||||
this.$store.dispatch('trainingNew/trainingStart');
|
||||
this.$store.dispatch('trainingNew/setTrainingScore', '');
|
||||
@ -106,7 +134,9 @@ export default {
|
||||
});
|
||||
},
|
||||
nextStep() {
|
||||
endTrainingStep(this.group, this.$store.state.trainingNew.stepOrder).then(resp => {
|
||||
const stepList = JSON.parse(this.$store.state.trainingNew.trainingDetail.stepJson);
|
||||
const step = stepList[this.$store.state.trainingNew.stepOrder - 1];
|
||||
endTrainingStep(this.group, step.id).then(resp => {
|
||||
}).catch(() => {
|
||||
this.$message.error('进入下一步实训失败!');
|
||||
});
|
||||
|
@ -15,21 +15,32 @@ export default {
|
||||
computed: {
|
||||
teachMode() {
|
||||
return this.$store.state.trainingNew.teachMode;
|
||||
},
|
||||
trainingDetail() {
|
||||
return this.$store.state.trainingNew.trainingDetail;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// '$store.state.socket.trainingStepTip': function(val) {
|
||||
// if (val && this.teachMode === ScriptMode.TEACH) {
|
||||
// this.trainingTipMessage = val;
|
||||
// } else {
|
||||
// this.trainingTipMessage = '';
|
||||
// }
|
||||
// },
|
||||
'$store.state.socket.trainingStepTip': function(val) {
|
||||
if (val && this.trainingDetail.type === 'SCENE') {
|
||||
const member = this.$store.state.training.memberData[val.memberId];
|
||||
this.$nextTick(function() {
|
||||
this.$store.dispatch('trainingNew/clearOperateOrder');
|
||||
this.$store.dispatch('trainingNew/stepOrderIncrease');
|
||||
if (member.userId == this.$store.state.user.id && (this.teachMode === ScriptMode.TEACH || this.teachMode === ScriptMode.PRACTICE)) {
|
||||
this.trainingTipMessage = val.content;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||
if (!val) {
|
||||
this.trainingTipMessage = '';
|
||||
}
|
||||
},
|
||||
'$store.state.socket.trainingStepFinishCount': function(val) {
|
||||
this.trainingTipMessage = '';
|
||||
},
|
||||
'$store.state.socket.trainingOverCount': function(val) {
|
||||
if (this.teachMode === ScriptMode.TEACH) {
|
||||
this.trainingTipMessage = '实训完成,请点击结束按钮。';
|
||||
|
103
src/views/designPlatform/whTrainList.vue
Normal file
103
src/views/designPlatform/whTrainList.vue
Normal file
@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<div class="menuTrainListOut" :class="{'active': drawer}">
|
||||
<div class="menuTrainListBtn" @click="clickBtn">列车</div>
|
||||
<div :show-close="false" class="menuTrainList_box" style="height: 100%;">
|
||||
<div class="menuTrainList">
|
||||
<el-table :data="trainList" height="100%" :highlight-current-row="true" style="border-radius:5px 0px 0px 5px;" @row-click="selectTrain">
|
||||
<el-table-column property="groupNum" label="车组号" width="130" />
|
||||
<el-table-column property="direction" label="方向" width="130" />
|
||||
<el-table-column property="location" label="公里标" width="130" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
name: 'WhTrainList',
|
||||
data() {
|
||||
return {
|
||||
drawer: false,
|
||||
trainList:[],
|
||||
trainMap: new Map()
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map',
|
||||
'mapConfig'
|
||||
]),
|
||||
lineCode() {
|
||||
return this.$route.query.lineCode;
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'$store.state.socket.whTrainInfo': function (val) {
|
||||
if (val) {
|
||||
this.trainMap.set(val.groupNum, {groupNum: val.groupNum, direction: val.roadType === 'RIGHT' ? '右' : '左', location: val.location});
|
||||
const trainList = [];
|
||||
for (const [key, value] of this.trainMap) {
|
||||
trainList.push(value);
|
||||
}
|
||||
this.trainList = trainList;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.trainList = [];
|
||||
},
|
||||
methods:{
|
||||
clickBtn() {
|
||||
if (this.drawer) {
|
||||
this.drawer = false;
|
||||
} else {
|
||||
this.drawer = true;
|
||||
}
|
||||
},
|
||||
selectTrain(row, column, event) {
|
||||
// 设置显示中心
|
||||
this.$jlmap.setCenter(row.code);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.menuTrainListOut{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 20%;
|
||||
height: 60%;
|
||||
transform: translateX(400px);
|
||||
transition: all 0.4s;
|
||||
&.active{
|
||||
transform: translateX(0px);
|
||||
}
|
||||
}
|
||||
.menuTrainListBtn{
|
||||
background: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px 0px 0px 6px;
|
||||
position: absolute;
|
||||
top: 45%;
|
||||
z-index: 2;
|
||||
transform: translateX(-23px);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
padding: 7px 4px;
|
||||
width: 23px;
|
||||
}
|
||||
.menuTrainList_box{
|
||||
height: 100%;
|
||||
.menuTrainList{
|
||||
width: 400px;
|
||||
height: 100%;
|
||||
border-radius: 10px 0px 0px 10px;
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
148
src/views/fileManage/voiceManage/generate.vue
Normal file
148
src/views/fileManage/voiceManage/generate.vue
Normal file
@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="580px" :before-close="handleClose" center :close-on-click-modal="false">
|
||||
<el-form ref="ruleForm" :model="formModel" :rules="rules" label-width="60px">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="formModel.name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="desc">
|
||||
<el-input v-model="formModel.desc" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { generateAudio } from '@/api/audioResources';
|
||||
export default {
|
||||
name: 'Generate',
|
||||
data() {
|
||||
return {
|
||||
replaceList: [],
|
||||
dialogVisible: false,
|
||||
formModel: {
|
||||
id: '',
|
||||
name: '',
|
||||
desc: ''
|
||||
},
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
rules() {
|
||||
const crules = {
|
||||
name: [
|
||||
{ required: true, message: '请输入音频资源名称', trigger: 'blur' }
|
||||
],
|
||||
desc: [
|
||||
{ required: true, message: '请输入音频资源描述', trigger: 'blur' }
|
||||
]
|
||||
};
|
||||
return crules;
|
||||
},
|
||||
title() {
|
||||
return '生成音频资源';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
handleRemove() {
|
||||
this.formModel.url = '';
|
||||
},
|
||||
|
||||
show() {
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleForm.resetFields();
|
||||
});
|
||||
},
|
||||
doSave() {
|
||||
this.$refs.ruleForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
const data = {
|
||||
id: this.formModel.id,
|
||||
name: this.formModel.name,
|
||||
desc: this.formModel.desc
|
||||
};
|
||||
generateAudio(data).then(resp => {
|
||||
this.$message.success('生成音频资源数据成功!');
|
||||
this.handleClose();
|
||||
this.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
this.$message.error(error.message);
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
handleClose() {
|
||||
this.formModel = {
|
||||
id: '',
|
||||
name: '',
|
||||
desc: ''
|
||||
};
|
||||
this.$refs.ruleForm.resetFields();
|
||||
this.dialogVisible = false;
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.chat-box-footer-create{
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
position: relative;
|
||||
left: 5px;
|
||||
top: 6px;
|
||||
line-height: 30px;
|
||||
cursor: pointer;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
background: green;
|
||||
border: none;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.chat-box-footer-send{
|
||||
background: #F2F2F2;
|
||||
right: 55px;
|
||||
cursor: pointer;
|
||||
.icon-yuyin{
|
||||
color: #333;
|
||||
font-size: 24px;
|
||||
margin: 0;
|
||||
}
|
||||
&.active{
|
||||
.icon-yuyin{
|
||||
color: green;
|
||||
}
|
||||
}
|
||||
.close_icon{
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 45px;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
padding: 3px;
|
||||
}
|
||||
}
|
||||
#record_progress_bar{
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
border-radius: 50%;
|
||||
}
|
||||
</style>
|
@ -2,15 +2,18 @@
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<add-voice ref="addVoice" @reloadTable="reloadTable" />
|
||||
<generate-voice ref="generateVoice" @reloadTable="reloadTable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { pagedAudioResources, deleteAudioResources } from '@/api/audioResources';
|
||||
import AddVoice from './add';
|
||||
import GenerateVoice from './generate';
|
||||
export default {
|
||||
name: 'DeviceManage',
|
||||
components: {
|
||||
GenerateVoice,
|
||||
AddVoice
|
||||
},
|
||||
data() {
|
||||
@ -77,7 +80,8 @@ export default {
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: this.$t('global.add'), handler: this.createAudioResources}
|
||||
{ text: this.$t('global.add'), handler: this.createAudioResources},
|
||||
{ text: '生成', handler: this.generateAudioResources }
|
||||
]
|
||||
},
|
||||
currentModel: {}
|
||||
@ -120,6 +124,9 @@ export default {
|
||||
createAudioResources() {
|
||||
this.$refs.addVoice.show();
|
||||
},
|
||||
generateAudioResources() {
|
||||
this.$refs.generateVoice.show();
|
||||
},
|
||||
editConfig(index, row) {
|
||||
this.$refs.addVoice.show(row);
|
||||
},
|
||||
|
119
src/views/iscs/iscsSystem/config/broadcast/realTimeBroadcast.vue
Normal file
119
src/views/iscs/iscsSystem/config/broadcast/realTimeBroadcast.vue
Normal file
@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
:visible.sync="visible"
|
||||
width="600px"
|
||||
:before-close="doClose"
|
||||
class="iscs-voice-broadcast-dialog"
|
||||
>
|
||||
<div>
|
||||
<div class="dialog-header">实时广播</div>
|
||||
<div class="secondary-title">信息内容</div>
|
||||
<el-input
|
||||
v-model="messageContent"
|
||||
type="textarea"
|
||||
:row="4"
|
||||
placeholder="请输入内容"
|
||||
/>
|
||||
<div class="release-button" @click="releaseRealTime">发布</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'RealTimeBroadcast',
|
||||
props: {
|
||||
resourcesList: {
|
||||
type: Array,
|
||||
default: function () {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
messageContent: ''
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
doClose() {
|
||||
this.visible = false;
|
||||
},
|
||||
doShow() {
|
||||
this.visible = true;
|
||||
},
|
||||
releaseRealTime() {
|
||||
this.visible = false;
|
||||
this.$emit('releaseRealTime', this.messageContent);
|
||||
this.messageContent = '';
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dialog-header{
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.information-description-box{
|
||||
height: 100px;
|
||||
width: 100%;
|
||||
background: #DCDCDC;
|
||||
border-left: 2px solid #898888;
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.information-box{
|
||||
white-space: nowrap;
|
||||
background: #DCDCDC;
|
||||
margin-top: 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.secondary-title{
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
font-size: 18px;
|
||||
background: #A9A9A9;
|
||||
border-top: 2px solid #898888;
|
||||
border-left: 2px solid #898888;
|
||||
border-right: 2px solid #fff;
|
||||
border-bottom: 2px solid #fff;
|
||||
}
|
||||
.information-context-box{
|
||||
background: #DCDCDC;
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.release-button{
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
background: #CCCCCC;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
margin-top: 10px;
|
||||
padding: 7px 15px;
|
||||
border-top: 2px solid #fff;
|
||||
border-left: 2px solid #fff;
|
||||
border-right: 2px solid #454541;
|
||||
border-bottom: 2px solid #454541;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.iscs-voice-broadcast-dialog .el-dialog__body{
|
||||
background: #A9A9A9;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
.iscs-voice-broadcast-dialog .el-dialog__headerbtn{
|
||||
top: 10px;
|
||||
}
|
||||
.iscs-voice-broadcast-dialog .el-dialog__header{
|
||||
background-image: linear-gradient(#FFE4C4, #F4A460, #FFE4C4);
|
||||
}
|
||||
</style>
|
@ -22,46 +22,82 @@
|
||||
<div class="pa-check-box" style="right: 10px;" :style="{background: enableAreaList.includes('LCD')? '#2EFF74':'#CDCDCD'}" />
|
||||
<div id="LCD" class="pa-state-box">{{ deviceMap['LCD'].state }}</div>
|
||||
</div>
|
||||
<div v-else style="width: 10px;height: 10px;" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div v-if="checkHasDevice('UP_STAND')" class="broadcast-mode-button" @click="selectedArea('UP_STAND')">
|
||||
<div class="pa-check-box" style="right: 10px;" :style="{background: enableAreaList.includes('UP_STAND')? '#2EFF74':'#CDCDCD'}" />
|
||||
<div id="UP_STAND" class="pa-state-box">{{ deviceMap['UP_STAND'].state }}</div>
|
||||
</div>
|
||||
<div v-else style="width: 10px;height: 10px;" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div v-if="checkHasDevice('DOWN_STAND')" class="broadcast-mode-button" @click="selectedArea('DOWN_STAND')">
|
||||
<div class="pa-check-box" style="right: 10px;" :style="{background: enableAreaList.includes('DOWN_STAND')? '#2EFF74':'#CDCDCD'}" />
|
||||
<div id="DOWN_STAND" class="pa-state-box">{{ deviceMap['DOWN_STAND'].state }}</div>
|
||||
</div>
|
||||
<div v-else style="width: 10px;height: 10px;" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div v-if="checkHasDevice('ADMINISTRATIVE_AREA')" class="broadcast-mode-button" @click="selectedArea('ADMINISTRATIVE_AREA')">
|
||||
<div class="pa-check-box" style="right: 10px;" :style="{background: enableAreaList.includes('ADMINISTRATIVE_AREA')? '#2EFF74':'#CDCDCD'}" />
|
||||
<div id="ADMINISTRATIVE_AREA" class="pa-state-box">{{ deviceMap['ADMINISTRATIVE_AREA'].state }}</div>
|
||||
</div>
|
||||
<div v-else style="width: 10px;height: 10px;" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div v-if="checkHasDevice('GATE')" class="broadcast-mode-button" @click="selectedArea('GATE')">
|
||||
<div class="pa-check-box" style="right: 10px;" :style="{background: enableAreaList.includes('GATE')? '#2EFF74':'#CDCDCD'}" />
|
||||
<div id="GATE" class="pa-state-box">{{ deviceMap['GATE'].state }}</div>
|
||||
</div>
|
||||
<div v-else style="width: 10px;height: 10px;" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div v-if="checkHasDevice('TRANSFER_CHANNEL')" class="broadcast-mode-button" @click="selectedArea('TRANSFER_CHANNEL')">
|
||||
<div class="pa-check-box" style="right: 10px;" :style="{background: enableAreaList.includes('TRANSFER_CHANNEL')? '#2EFF74':'#CDCDCD'}" />
|
||||
<div id="TRANSFER_CHANNEL" class="pa-state-box">{{ deviceMap['TRANSFER_CHANNEL'].state }}</div>
|
||||
</div>
|
||||
<div v-else style="width: 10px;height: 10px;" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="5"><div class="broadcast-atc-button">ATC广播</div></el-col>
|
||||
<el-col :span="3"><div v-if="checkHasDevice('LCD')" class="broadcast-use-button" :style="{color: enableAreaList.includes('LCD')? '#2EFF74':'#CDCDCD'}">{{ this.enableAreaList.includes('LCD')? '启用':'未启用' }}</div></el-col>
|
||||
<el-col :span="3"><div v-if="checkHasDevice('UP_STAND')" class="broadcast-use-button" :style="{color: enableAreaList.includes('UP_STAND')? '#2EFF74':'#CDCDCD'}">{{ this.enableAreaList.includes('UP_STAND')? '启用':'未启用' }}</div></el-col>
|
||||
<el-col :span="3"><div v-if="checkHasDevice('DOWN_STAND')" class="broadcast-use-button" :style="{color: enableAreaList.includes('DOWN_STAND')? '#2EFF74':'#CDCDCD'}">{{ this.enableAreaList.includes('DOWN_STAND')? '启用':'未启用' }}</div></el-col>
|
||||
<el-col :span="3"><div v-if="checkHasDevice('ADMINISTRATIVE_AREA')" class="broadcast-use-button" :style="{color: enableAreaList.includes('ADMINISTRATIVE_AREA')? '#2EFF74':'#CDCDCD'}">{{ this.enableAreaList.includes('ADMINISTRATIVE_AREA')? '启用':'未启用' }}</div></el-col>
|
||||
<el-col :span="3"><div v-if="checkHasDevice('GATE')" class="broadcast-use-button" :style="{color: enableAreaList.includes('GATE')? '#2EFF74':'#CDCDCD'}">{{ this.enableAreaList.includes('GATE')? '启用':'未启用' }}</div></el-col>
|
||||
<el-col :span="3"><div v-if="checkHasDevice('TRANSFER_CHANNEL')" class="broadcast-use-button" :style="{color: enableAreaList.includes('TRANSFER_CHANNEL')? '#2EFF74':'#CDCDCD'}">{{ this.enableAreaList.includes('TRANSFER_CHANNEL')? '启用':'未启用' }}</div></el-col>
|
||||
<el-col :span="3">
|
||||
<div v-if="checkHasDevice('LCD')" class="broadcast-use-button" :style="{color: atcBroadcast.includes('LCD')? '#2EFF74':'#CDCDCD'}">
|
||||
{{ this.atcBroadcast.includes('LCD')? '启用':'未启用' }}
|
||||
</div>
|
||||
<div v-else style="width: 10px;height: 10px;" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div v-if="checkHasDevice('UP_STAND')" class="broadcast-use-button" :style="{color: atcBroadcast.includes('UP_STAND')? '#2EFF74':'#CDCDCD'}">
|
||||
{{ this.atcBroadcast.includes('UP_STAND')? '启用':'未启用' }}
|
||||
</div>
|
||||
<div v-else style="width: 10px;height: 10px;" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div v-if="checkHasDevice('DOWN_STAND')" class="broadcast-use-button" :style="{color: atcBroadcast.includes('DOWN_STAND')? '#2EFF74':'#CDCDCD'}">
|
||||
{{ this.atcBroadcast.includes('DOWN_STAND')? '启用':'未启用' }}
|
||||
</div>
|
||||
<div v-else style="width: 10px;height: 10px;" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div v-if="checkHasDevice('ADMINISTRATIVE_AREA')" class="broadcast-use-button" :style="{color: atcBroadcast.includes('ADMINISTRATIVE_AREA')? '#2EFF74':'#CDCDCD'}">
|
||||
{{ this.atcBroadcast.includes('ADMINISTRATIVE_AREA')? '启用':'未启用' }}
|
||||
</div>
|
||||
<div v-else style="width: 10px;height: 10px;" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div v-if="checkHasDevice('GATE')" class="broadcast-use-button" :style="{color: atcBroadcast.includes('GATE')? '#2EFF74':'#CDCDCD'}">
|
||||
{{ this.atcBroadcast.includes('GATE')? '启用':'未启用' }}
|
||||
</div>
|
||||
<div v-else style="width: 10px;height: 10px;" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div v-if="checkHasDevice('TRANSFER_CHANNEL')" class="broadcast-use-button" :style="{color: atcBroadcast.includes('TRANSFER_CHANNEL')? '#2EFF74':'#CDCDCD'}">
|
||||
{{ this.atcBroadcast.includes('TRANSFER_CHANNEL')? '启用':'未启用' }}
|
||||
</div>
|
||||
<div v-else style="width: 10px;height: 10px;" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="pre-taped-broadcast">
|
||||
@ -108,74 +144,87 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<!--<div class="time-control-pa-home">-->
|
||||
<!--<el-row :gutter="50">-->
|
||||
<!--<el-col :span="2">-->
|
||||
<!--<div class="time-control-button">时间控制</div>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="20">-->
|
||||
<!--<el-row :gutter="20" style="margin-top: 5px; font-size: 13px">-->
|
||||
<!--<el-col :span="2">-->
|
||||
<!--<div style="width: 65px;color: #FFF;text-align: center;height: 28px;line-height: 28px">排定描述</div>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="22">-->
|
||||
<!--<el-input v-model="addModel.scheduledDescribe" size="mini" style="width: 100%" /></el-col>-->
|
||||
<!--</el-row>-->
|
||||
<!--<el-row style="margin-top: 5px; font-size: 13px">-->
|
||||
<!--<el-col :span="2">-->
|
||||
<!--<div style="width: 65px;color: #FFF;text-align: center;height: 28px;line-height: 28px">开始时间</div>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="5">-->
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="addModel.startTime"-->
|
||||
<!--type="datetime"-->
|
||||
<!--placeholder="选择日期时间"-->
|
||||
<!--size="mini"-->
|
||||
<!--/>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="2">-->
|
||||
<!--<div style="width: 65px;color: #FFF;text-align: center;height: 28px;line-height: 28px">结束时间</div>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="5">-->
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="addModel.endTime"-->
|
||||
<!--type="datetime"-->
|
||||
<!--placeholder="选择日期时间"-->
|
||||
<!--size="mini"-->
|
||||
<!--/>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="2">-->
|
||||
<!--<div style="width: 65px;color: #FFF;text-align: center;height: 28px;line-height: 28px">延时时间</div>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="5">-->
|
||||
<!--<el-time-picker-->
|
||||
<!--v-model="addModel.delayTime"-->
|
||||
<!--placeholder="选择时间"-->
|
||||
<!--size="mini"-->
|
||||
<!--/>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="1">-->
|
||||
<!--<div class="time-control-button-small">今日</div>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="1">-->
|
||||
<!--<div class="time-control-button-small">一次</div>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="1">-->
|
||||
<!--<div class="time-control-button-small" style="width: 43px;">无截至</div>-->
|
||||
<!--</el-col>-->
|
||||
<!--</el-row>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="2">-->
|
||||
<!--<div class="time-control-button-small" style="height: 50px;width: 50px; position: relative;top: 10px;right: 30px;line-height: 14px;padding-top: 10px;padding-left: 10px">设定<br>确认</div>-->
|
||||
<!--</el-col>-->
|
||||
<!--</el-row>-->
|
||||
<!--</div>-->
|
||||
<div class="pa-grey-box" />
|
||||
<div class="time-control-pa-home">
|
||||
<el-row :gutter="50">
|
||||
<el-col :span="2">
|
||||
<div class="time-control-button">时间控制</div>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-row :gutter="20" style="margin-top: 5px; font-size: 13px">
|
||||
<el-col :span="2">
|
||||
<div style="width: 65px;color: #FFF;text-align: center;height: 28px;line-height: 28px">排定描述</div>
|
||||
</el-col>
|
||||
<el-col :span="22">
|
||||
<el-input v-model="addModel.desc" size="mini" style="width: 100%" /></el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 5px; font-size: 13px">
|
||||
<el-col :span="2">
|
||||
<div style="width: 65px;color: #FFF;text-align: center;height: 28px;line-height: 28px">开始时间</div>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-date-picker
|
||||
v-model="addModel.startTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择日期时间"
|
||||
size="mini"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<div style="width: 65px;color: #FFF;text-align: center;height: 28px;line-height: 28px">结束时间</div>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-date-picker
|
||||
v-model="addModel.endTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择日期时间"
|
||||
size="mini"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<div style="width: 65px;color: #FFF;text-align: center;height: 28px;line-height: 28px">延时时间</div>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-time-picker
|
||||
v-model="addModel.delayTime"
|
||||
value-format="HH:mm:ss"
|
||||
placeholder="选择时间"
|
||||
size="mini"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="1">
|
||||
<div class="time-control-button-small" @click="setToday">今日</div>
|
||||
</el-col>
|
||||
<el-col :span="1">
|
||||
<div class="time-control-button-small" @click="setOnce">一次</div>
|
||||
</el-col>
|
||||
<el-col :span="1">
|
||||
<div class="time-control-button-small" style="width: 43px;" @click="setNoEnd">无截至</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<div class="time-control-button-small" style="height: 50px;width: 50px; position: relative;top: 10px;right: 30px;line-height: 14px;padding-top: 10px;padding-left: 10px" @click="setTimerBroadcast">设定<br>确认</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="pa-grey-box">
|
||||
<template v-for="(item, index) in timedList">
|
||||
<el-row :key="index" style="display: flex; align-items: center;">
|
||||
<el-col :span="5">{{ item.desc|| '--' }}</el-col>
|
||||
<el-col :span="5">{{ item.startTime|| '--' }}</el-col>
|
||||
<el-col :span="5">{{ item.endTime|| '--' }}</el-col>
|
||||
<el-col :span="5">{{ item.delayTime|| '--' }}</el-col>
|
||||
<el-col :span="4"><el-button type="text" @click="removeTimed(item)">删除</el-button></el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</div>
|
||||
<div style="position: absolute; left: 73%; top: 67%;width: 13%;height: 30%;font-size: 12px;color: #fff;"><state-table /></div>
|
||||
<div class="broadcast-mode">
|
||||
<el-row>
|
||||
<el-col :span="12"><div style="height: 40px;text-align: center; background: #000088;color: #fff;line-height: 40px">实时广播</div></el-col>
|
||||
<el-col :span="12"><div class="broadcast-mode-button" style="top: 5px; left: 10%;width: 80%;">广播</div></el-col>
|
||||
<el-col :span="12"><div class="broadcast-mode-button" style="top: 5px; left: 10%;width: 80%;" @click="realTimeBroadCast">广播</div></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="broadcast-mode" style="top: 25%;">
|
||||
@ -194,8 +243,8 @@
|
||||
<el-row>
|
||||
<el-col :span="12"><div style="height: 80px;text-align: center; background: #000088;color: #fff;line-height: 80px">ATC广播</div></el-col>
|
||||
<el-col :span="12">
|
||||
<div class="broadcast-mode-button" style="top: 5px; left: 10%;width: 80%;">启用</div>
|
||||
<div class="broadcast-mode-button" style="top: 5px; left: 10%;width: 80%; margin-top: 5px">停用</div>
|
||||
<div class="broadcast-mode-button" style="top: 5px; left: 10%;width: 80%;" @click="enableAtcBroadcast">启用</div>
|
||||
<div class="broadcast-mode-button" style="top: 5px; left: 10%;width: 80%; margin-top: 5px" @click="stopAtcBroadcast">停用</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@ -208,31 +257,41 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<audio id="lcd_voice" controls style="width: 0;height: 0;" />
|
||||
<audio id="up_stand_voice" controls style="width: 0;height: 0;" />
|
||||
<audio id="down_stand_voice" controls style="width: 0;height: 0;" />
|
||||
<audio id="administrative_area_voice" controls style="width: 0;height: 0;" />
|
||||
<audio id="gate_area_voice" controls style="width: 0;height: 0;" />
|
||||
<audio id="transfer_channel_voice" controls style="width: 0;height: 0;" />
|
||||
<audio id="voice" controls style="width: 0;height: 0;" />
|
||||
<real-time-broadcast ref="realTimeBroadcast" @releaseRealTime="releaseRealTime" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import StateTable from './stateTable';
|
||||
import { queryIscsDeviceCod } from '@/api/iscs';
|
||||
import { queryIscsResourcesByGroup } from '@/api/simulation';
|
||||
import { queryIscsResourcesByGroup, queryPaTimedList } from '@/api/simulation';
|
||||
import { sendCommandNew } from '@/api/jmap/training';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { creatSubscribe, clearSubscribe, getTopic } from '@/utils/stomp';
|
||||
import RealTimeBroadcast from './realTimeBroadcast';
|
||||
export default {
|
||||
name: 'StationHome',
|
||||
components: {
|
||||
StateTable
|
||||
StateTable,
|
||||
RealTimeBroadcast
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
addModel: {
|
||||
scheduledDescribe: '',
|
||||
desc: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
delayTime: ''
|
||||
},
|
||||
enableAreaList: [],
|
||||
atcBroadcast: [],
|
||||
bgmResources: '',
|
||||
videoMode: 'RECORDING',
|
||||
messageIndex: 0,
|
||||
@ -240,10 +299,14 @@ export default {
|
||||
iscsDeviceMap: {},
|
||||
iscsDeviceList: [],
|
||||
iscsDeviceState: {},
|
||||
deviceMap: {}
|
||||
deviceMap: {},
|
||||
timedList: []
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.simulationReset': function(val) {
|
||||
this.initTimedPlayList();
|
||||
},
|
||||
'$route.query.stationId': function () {
|
||||
const params2 = { mapId: this.$route.query.mapId, system: 'PA', station: this.$route.query.stationId };
|
||||
queryIscsDeviceCod(params2).then(resp => {
|
||||
@ -252,56 +315,9 @@ export default {
|
||||
this.$set(device, 'state', this.iscsDeviceState[device.code] ? this.iscsDeviceState[device.code].state : '0');
|
||||
this.iscsDeviceMap[device.code] = device;
|
||||
const div = document.getElementById(device.position);
|
||||
if (div) {
|
||||
switch (device.state) {
|
||||
case '0':
|
||||
div.style.background = '#CCCCCC';
|
||||
break;
|
||||
case '1':
|
||||
div.style.background = '#FF0000';
|
||||
break;
|
||||
case '2':
|
||||
div.style.background = '#880000';
|
||||
break;
|
||||
case '3':
|
||||
div.style.background = '#0000FF';
|
||||
break;
|
||||
case '4':
|
||||
div.style.background = '#554488';
|
||||
break;
|
||||
case '5':
|
||||
div.style.background = '#44CC55';
|
||||
break;
|
||||
case '6':
|
||||
div.style.background = '#FF00FF';
|
||||
break;
|
||||
case '7':
|
||||
div.style.background = '#887711';
|
||||
break;
|
||||
case '8':
|
||||
div.style.background = '#006600';
|
||||
break;
|
||||
case '9':
|
||||
div.style.background = '#778877';
|
||||
break;
|
||||
case '10':
|
||||
div.style.background = '#555454';
|
||||
break;
|
||||
case '11':
|
||||
div.style.background = '#556688';
|
||||
break;
|
||||
case '12':
|
||||
div.style.background = '#887711';
|
||||
break;
|
||||
case '13':
|
||||
div.style.background = '#115577';
|
||||
break;
|
||||
case '♬':
|
||||
div.style.background = '';
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.setElementColor(div, device.state);
|
||||
});
|
||||
this.initTimedPlayList();
|
||||
});
|
||||
},
|
||||
'$store.state.socket.iscsStatePaMessages': function (list) {
|
||||
@ -314,56 +330,17 @@ export default {
|
||||
}
|
||||
const device = this.iscsDeviceMap[item.code];
|
||||
if (device) {
|
||||
this.$set(this.deviceMap[device.position], 'state', item.state);
|
||||
const oldState = parseInt(this.deviceMap[device.position].state);
|
||||
const newState = parseInt(item.state);
|
||||
const div = document.getElementById(device.position);
|
||||
if (div) {
|
||||
switch (item.state) {
|
||||
case '0':
|
||||
div.style.background = '#CCCCCC';
|
||||
break;
|
||||
case '1':
|
||||
div.style.background = '#FF0000';
|
||||
break;
|
||||
case '2':
|
||||
div.style.background = '#880000';
|
||||
break;
|
||||
case '3':
|
||||
div.style.background = '#0000FF';
|
||||
break;
|
||||
case '4':
|
||||
div.style.background = '#554488';
|
||||
break;
|
||||
case '5':
|
||||
div.style.background = '#44CC55';
|
||||
break;
|
||||
case '6':
|
||||
div.style.background = '#FF00FF';
|
||||
break;
|
||||
case '7':
|
||||
div.style.background = '#887711';
|
||||
break;
|
||||
case '8':
|
||||
div.style.background = '#006600';
|
||||
break;
|
||||
case '9':
|
||||
div.style.background = '#778877';
|
||||
break;
|
||||
case '10':
|
||||
div.style.background = '#555454';
|
||||
break;
|
||||
case '11':
|
||||
div.style.background = '#556688';
|
||||
break;
|
||||
case '12':
|
||||
div.style.background = '#887711';
|
||||
break;
|
||||
case '13':
|
||||
div.style.background = '#115577';
|
||||
break;
|
||||
case '♬':
|
||||
div.style.background = '';
|
||||
break;
|
||||
}
|
||||
if (!oldState || oldState > newState) {
|
||||
this.$set(this.deviceMap[device.position], 'state', item.state);
|
||||
this.setElementColor(div, item.state);
|
||||
this.playBroadcast(item, device.position);
|
||||
}
|
||||
if (!this.atcBroadcast.includes(device.position) && !oldState) {
|
||||
this.$set(this.deviceMap[device.position], 'state', item.state);
|
||||
this.setElementColor(div, item.state);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -387,11 +364,183 @@ export default {
|
||||
this.subscribe();
|
||||
});
|
||||
this.getResourcesList();
|
||||
this.initTimedPlayList();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.clearSubscribe();
|
||||
},
|
||||
methods: {
|
||||
setElementColor(div, state) {
|
||||
if (div) {
|
||||
switch (state) {
|
||||
case '0':
|
||||
div.style.background = '#CCCCCC';
|
||||
break;
|
||||
case '1':
|
||||
div.style.background = '#FF0000';
|
||||
break;
|
||||
case '2':
|
||||
div.style.background = '#880000';
|
||||
break;
|
||||
case '3':
|
||||
div.style.background = '#0000FF';
|
||||
break;
|
||||
case '4':
|
||||
div.style.background = '#554488';
|
||||
break;
|
||||
case '5':
|
||||
div.style.background = '#44CC55';
|
||||
break;
|
||||
case '6':
|
||||
div.style.background = '#FF00FF';
|
||||
break;
|
||||
case '7':
|
||||
div.style.background = '#887711';
|
||||
break;
|
||||
case '8':
|
||||
div.style.background = '#006600';
|
||||
break;
|
||||
case '9':
|
||||
div.style.background = '#778877';
|
||||
break;
|
||||
case '10':
|
||||
div.style.background = '#555454';
|
||||
break;
|
||||
case '11':
|
||||
div.style.background = '#556688';
|
||||
break;
|
||||
case '12':
|
||||
div.style.background = '#887711';
|
||||
break;
|
||||
case '13':
|
||||
div.style.background = '#115577';
|
||||
break;
|
||||
case '♬':
|
||||
div.style.background = '';
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
getTimeString (full) {
|
||||
const simulationDate = new Date(this.$store.state.socket.simulationTimeSync);
|
||||
console.log(simulationDate, this.$store.state.socket.simulationTimeSync);
|
||||
const year = simulationDate.getFullYear();
|
||||
let month = simulationDate.getMonth() + 1;
|
||||
if (month < 10) {
|
||||
month = '0' + month;
|
||||
}
|
||||
let day = simulationDate.getDate();
|
||||
if (day < 10) {
|
||||
day = '0' + day;
|
||||
}
|
||||
let hour = simulationDate.getHours();
|
||||
if (hour < 10) {
|
||||
hour = '0' + hour;
|
||||
}
|
||||
let minute = simulationDate.getMinutes();
|
||||
if (minute < 10) {
|
||||
minute = '0' + minute;
|
||||
}
|
||||
let second = simulationDate.getSeconds();
|
||||
if (second < 10) {
|
||||
second = '0' + second;
|
||||
}
|
||||
if (full) {
|
||||
return year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second;
|
||||
} else {
|
||||
return year + '-' + month + '-' + day;
|
||||
}
|
||||
},
|
||||
setToday() {
|
||||
const dateString = this.getTimeString(false);
|
||||
console.log(dateString, 'today---');
|
||||
this.addModel.startTime = dateString + ' 00:00:00';
|
||||
this.addModel.endTime = dateString + ' 23:59:59';
|
||||
this.addModel.delayTime = '00:01:00';
|
||||
},
|
||||
setOnce() {
|
||||
this.addModel.startTime = this.getTimeString(true);
|
||||
this.addModel.endTime = '';
|
||||
this.addModel.delayTime = '';
|
||||
},
|
||||
setNoEnd() {
|
||||
this.addModel.startTime = this.getTimeString(true);
|
||||
this.addModel.endTime = '';
|
||||
this.addModel.delayTime = '00:01:00';
|
||||
},
|
||||
playBroadcast(info, position) {
|
||||
if (this.$route.query.stationId === info.stationCode && !['0', '12', '13'].includes(info.state) && this.atcBroadcast.includes(position)) {
|
||||
const audio = document.getElementById(position.toLowerCase() + '_voice');
|
||||
if (!audio) { return; }
|
||||
audio.pause();
|
||||
audio.src = this.$store.state.user.resourcesUrl + info.url;
|
||||
audio.play();
|
||||
const _that = this;
|
||||
audio.addEventListener('ended', function() {
|
||||
const device = _that.iscsDeviceMap[info.code];
|
||||
const div = document.getElementById(device.position);
|
||||
_that.$set(_that.deviceMap[device.position], 'state', '0');
|
||||
div.style.background = '#CCCCCC';
|
||||
}, false);
|
||||
}
|
||||
},
|
||||
setTimerBroadcast() {
|
||||
const iscsDeviceCodes = [];
|
||||
this.enableAreaList.forEach(item => {
|
||||
if (this.deviceMap[item]) {
|
||||
iscsDeviceCodes.push(this.deviceMap[item].code);
|
||||
}
|
||||
});
|
||||
if (!iscsDeviceCodes.length) {
|
||||
this.$message.error('请选择广播设备');
|
||||
return;
|
||||
}
|
||||
if (!this.addModel.desc) {
|
||||
this.$message.error('请填写排定描述!');
|
||||
return;
|
||||
}
|
||||
if (!this.addModel.startTime) {
|
||||
this.$message.error('请选择开始时间!');
|
||||
return;
|
||||
}
|
||||
if (this.resourcesList[this.messageIndex]) {
|
||||
const params = {
|
||||
resourceId: this.resourcesList[this.messageIndex].id,
|
||||
iscsDeviceCodes: iscsDeviceCodes,
|
||||
type: this.videoMode,
|
||||
desc: this.addModel.desc,
|
||||
startTime: this.addModel.startTime,
|
||||
endTime: this.addModel.endTime,
|
||||
delayTime: this.addModel.delayTime,
|
||||
stationCode: this.$route.query.stationId
|
||||
};
|
||||
sendCommandNew(this.$route.query.group, 'ISCS_PA_Timed_Play', params).then(() => {
|
||||
this.addModel = { desc: '', startTime: '', endTime: '', delayTime: '' };
|
||||
this.initTimedPlayList();
|
||||
}).catch(() => {
|
||||
this.$message.error('设定定时广播失败!');
|
||||
});
|
||||
}
|
||||
},
|
||||
removeTimed(data) {
|
||||
if (data) {
|
||||
const params = {
|
||||
stationCode: this.$route.query.stationId,
|
||||
desc: data.desc
|
||||
};
|
||||
sendCommandNew(this.$route.query.group, 'ISCS_PA_Remove_Timed_Play', params).then(() => {
|
||||
this.addModel = { desc: '', startTime: '', endTime: '', delayTime: '' };
|
||||
this.initTimedPlayList();
|
||||
}).catch(() => {
|
||||
this.$message.error('设定定时广播失败!');
|
||||
});
|
||||
}
|
||||
},
|
||||
initTimedPlayList() {
|
||||
queryPaTimedList(this.$route.query.group, { stationCode: this.$route.query.stationId }).then(resp => {
|
||||
this.timedList = resp.data;
|
||||
}).catch(() => { this.$message.error('获取定时广播信息失败!'); });
|
||||
},
|
||||
chooseMessage(index) {
|
||||
this.messageIndex = index;
|
||||
},
|
||||
@ -416,6 +565,21 @@ export default {
|
||||
this.enableAreaList = ['LCD', 'UP_STAND', 'DOWN_STAND', 'ADMINISTRATIVE_AREA', 'GATE', 'TRANSFER_CHANNEL'];
|
||||
}
|
||||
},
|
||||
enableAtcBroadcast() {
|
||||
this.enableAreaList.forEach(item => {
|
||||
if (!this.atcBroadcast.includes(item)) {
|
||||
this.atcBroadcast.push(item);
|
||||
}
|
||||
});
|
||||
},
|
||||
stopAtcBroadcast() {
|
||||
this.enableAreaList.forEach(item => {
|
||||
const index = this.atcBroadcast.findIndex(elem => item === elem);
|
||||
if (index > -1) {
|
||||
this.atcBroadcast.splice(index, 1);
|
||||
}
|
||||
});
|
||||
},
|
||||
playBgm() {
|
||||
const iscsDeviceCodes = [];
|
||||
this.enableAreaList.forEach(item => {
|
||||
@ -434,10 +598,10 @@ export default {
|
||||
type: 'BGM'
|
||||
};
|
||||
sendCommandNew(this.$route.query.group, 'ISCS_PA_Play', params).then(resp => {
|
||||
const bgmUrl = this.$store.state.user.resourcesUrl + this.bgmResources[0].url;
|
||||
const audio = document.getElementById('voice');
|
||||
audio.src = bgmUrl;
|
||||
audio.play();
|
||||
// const bgmUrl = this.$store.state.user.resourcesUrl + this.bgmResources[0].url;
|
||||
// const audio = document.getElementById('voice');
|
||||
// audio.src = bgmUrl;
|
||||
// audio.play();
|
||||
}).catch(() => {
|
||||
this.$message.error('背景音乐播放失败!');
|
||||
});
|
||||
@ -445,9 +609,11 @@ export default {
|
||||
},
|
||||
stopBgm() {
|
||||
const iscsDeviceCodes = [];
|
||||
const positionList = [];
|
||||
this.enableAreaList.forEach(item => {
|
||||
if (this.deviceMap[item]) {
|
||||
iscsDeviceCodes.push(this.deviceMap[item].code);
|
||||
positionList.push(this.deviceMap[item].position);
|
||||
}
|
||||
});
|
||||
if (!iscsDeviceCodes.length) {
|
||||
@ -455,13 +621,44 @@ export default {
|
||||
return;
|
||||
}
|
||||
sendCommandNew(this.$route.query.group, 'ISCS_PA_Stop_Playing', { iscsDeviceCodes: iscsDeviceCodes }).then(resp => {
|
||||
const audio = document.getElementById('voice');
|
||||
audio.pause();
|
||||
positionList.forEach(elem => {
|
||||
const audio = document.getElementById(elem.toLowerCase()+'_voice');
|
||||
audio.pause();
|
||||
});
|
||||
const audio = document.getElementById('voice');
|
||||
audio.pause();
|
||||
}).catch(() => {
|
||||
this.$message.error('背景音乐终止播放失败!');
|
||||
});
|
||||
},
|
||||
stopBroadcast() {
|
||||
const iscsDeviceCodes = [];
|
||||
const positionList = [];
|
||||
this.enableAreaList.forEach(item => {
|
||||
if (this.deviceMap[item]) {
|
||||
iscsDeviceCodes.push(this.deviceMap[item].code);
|
||||
positionList.push(this.deviceMap[item].position);
|
||||
}
|
||||
});
|
||||
if (!iscsDeviceCodes.length) {
|
||||
this.$message.error('请选择广播设备');
|
||||
return;
|
||||
}
|
||||
sendCommandNew(this.$route.query.group, 'ISCS_PA_Stop_Playing', { iscsDeviceCodes: iscsDeviceCodes }).then(resp => {
|
||||
positionList.forEach(elem => {
|
||||
const audio = document.getElementById(elem.toLowerCase()+'_voice');
|
||||
audio.pause();
|
||||
});
|
||||
const audio = document.getElementById('voice');
|
||||
audio.pause();
|
||||
}).catch(() => {
|
||||
this.$message.error('广播终止播放失败!');
|
||||
});
|
||||
},
|
||||
realTimeBroadCast() {
|
||||
this.$refs.realTimeBroadcast.doShow();
|
||||
},
|
||||
releaseRealTime(content) {
|
||||
const iscsDeviceCodes = [];
|
||||
this.enableAreaList.forEach(item => {
|
||||
if (this.deviceMap[item]) {
|
||||
@ -472,11 +669,14 @@ export default {
|
||||
this.$message.error('请选择广播设备');
|
||||
return;
|
||||
}
|
||||
sendCommandNew(this.$route.query.group, 'ISCS_PA_Stop_Playing', { iscsDeviceCodes: iscsDeviceCodes }).then(resp => {
|
||||
const audio = document.getElementById('voice');
|
||||
audio.pause();
|
||||
const params = {
|
||||
iscsDeviceCodes: iscsDeviceCodes,
|
||||
content: content,
|
||||
type: 'REAL_TIME'
|
||||
};
|
||||
sendCommandNew(this.$route.query.group, 'ISCS_PA_Play', params).then(() => {
|
||||
}).catch(() => {
|
||||
this.$message.error('广播终止播放失败!');
|
||||
this.$message.error('发布广播失败!');
|
||||
});
|
||||
},
|
||||
releaseBroadcast() {
|
||||
@ -497,10 +697,10 @@ export default {
|
||||
type: this.videoMode
|
||||
};
|
||||
sendCommandNew(this.$route.query.group, 'ISCS_PA_Play', params).then(resp => {
|
||||
this.voiceUrl = this.$store.state.user.resourcesUrl + this.resourcesList[this.messageIndex].url;
|
||||
const audio = document.getElementById('voice');
|
||||
audio.src = this.voiceUrl;
|
||||
audio.play();
|
||||
// this.voiceUrl = this.$store.state.user.resourcesUrl + this.resourcesList[this.messageIndex].url;
|
||||
// const audio = document.getElementById('voice');
|
||||
// audio.src = this.voiceUrl;
|
||||
// audio.play();
|
||||
}).catch(() => {
|
||||
this.$message.error('发布广播失败!');
|
||||
});
|
||||
@ -703,7 +903,7 @@ export default {
|
||||
.pa-grey-box{
|
||||
position: absolute;
|
||||
left: 12%;
|
||||
top: 70%;
|
||||
top: 74%;
|
||||
width: 60%;
|
||||
height: 18%;
|
||||
background: #DDDDDD;
|
||||
|
@ -7,7 +7,7 @@
|
||||
class="iscs-voice-broadcast-dialog"
|
||||
>
|
||||
<div>
|
||||
<div class="dialog-header">信息广播</div>
|
||||
<div class="dialog-header">滚动信息发布</div>
|
||||
<div class="iscs-pis-dialog-info">
|
||||
<el-radio-group v-model="addModel.infoType" @change="getResourcesList">
|
||||
<el-radio label="REAL_TIME">实时信息</el-radio>
|
||||
@ -59,7 +59,7 @@
|
||||
</div>
|
||||
<div v-show="addModel.infoType !== 'REAL_TIME'" style="margin-top: 10px">
|
||||
<div style="display: inline;">名称:</div>
|
||||
<input v-model="resource.name" class="pis-dialog-input" style="width: 550px;">
|
||||
<input disabled v-model="resource.name" class="pis-dialog-input" style="width: 550px;">
|
||||
<!--<input v-model="addModel.infoTime" class="pis-dialog-input" style="width: 140px;">-->
|
||||
<!--<div style="display: inline;">次</div>-->
|
||||
</div>
|
||||
@ -90,7 +90,7 @@
|
||||
<div class="button-group-content" :style="{left: addModel.infoType ==='REAL_TIME'?'300px':'550px'}">
|
||||
<div class="pis-button">设定中</div>
|
||||
<div class="pis-button" @click="releaseBroadcast">发布</div>
|
||||
<div class="pis-button">取消</div>
|
||||
<div class="pis-button" @click="doClose">取消</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="pis-dialog-form-box">-->
|
||||
|
@ -4,12 +4,21 @@
|
||||
<div class="screen_header_text">乘客信息</div>
|
||||
</div>
|
||||
<div class="main_screen_content">
|
||||
<div class="screen_left">
|
||||
<div v-show="!isSingleStation" class="screen_left">
|
||||
<div class="screen_left_tab">特定区域</div>
|
||||
<el-row><el-button v-for="(item, index) in verticalHeader" :key="index" class="screen_operate_name" :class="{'active': item.active}" @click="selectedBatch(item)">{{ item.title }}</el-button></el-row>
|
||||
<el-row
|
||||
><el-button
|
||||
v-for="(item, index) in verticalHeader"
|
||||
:key="index"
|
||||
class="screen_operate_name"
|
||||
:class="{ active: item.active }"
|
||||
@click="selectedBatch(item)"
|
||||
>{{ item.title }}</el-button
|
||||
></el-row
|
||||
>
|
||||
</div>
|
||||
<div class="screen_main_content">
|
||||
<div class="screen_main_content_inner">
|
||||
<div v-show="!isSingleStation" class="screen_main_content_inner">
|
||||
<div class="screen_left_text_group">
|
||||
<div v-for="(item, index) in verticalHeader" :key="index" class="each_data_info">{{ item.name }}</div>
|
||||
</div>
|
||||
@ -19,27 +28,74 @@
|
||||
<div class="each_data_info" @click="selectedStation(station)">
|
||||
<div class="screen_station_name">{{ station.stationName }}</div>
|
||||
</div>
|
||||
<div v-if="station.children&&station.children.length>0">
|
||||
<div v-for="(child,index) in station.children" :key="station.code+index" class="each_data_info" style="display: flex;align-items: center;justify-content: center;" @click="selectArea(station.code,index)">
|
||||
<div v-if="child.status==='default'" class="button_default_content">
|
||||
<div class="button_default" :style="{background:selectedAreaList.includes(station.code + '-' + index)?'#2EFF74':'#CDCDCD'}" />
|
||||
<div v-if="station.children && station.children.length > 0">
|
||||
<div
|
||||
v-for="(child, index) in station.children"
|
||||
:key="station.code + index"
|
||||
class="each_data_info"
|
||||
style="display: flex;align-items: center;justify-content: center;"
|
||||
@click="selectArea(station.code, index)"
|
||||
>
|
||||
<div v-if="child.status === 'default'" class="button_default_content">
|
||||
<div
|
||||
class="button_default"
|
||||
:style="{ background: selectedAreaList.includes(station.code + '-' + index) ? '#2EFF74' : '#CDCDCD' }"
|
||||
/>
|
||||
</div>
|
||||
<div :id="station.code + '-' + index" style="width: 14px;height: 14px;margin-left: 5px;" />
|
||||
<div
|
||||
v-if="child.status === 'default'"
|
||||
:class="station.code + '-' + index"
|
||||
style="width: 14px;height: 14px;margin-left: 5px;"
|
||||
:style="{ backgroundColor: statusColor['normal'] }"
|
||||
/>
|
||||
<div>{{ `${station.code}-${index}` }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="isSingleStation" class="screen_main_content_inner_single_station">
|
||||
<div class="header">
|
||||
<div v-for="(item, index) in verticalHeader" :key="index" class="each_data_info">{{ item.name }}</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="list" v-if="currentStation && currentStation.children && currentStation.children.length > 0">
|
||||
<div class="stationButton" @click="selectedStation(currentStation)">
|
||||
<div class="screen_station_name">全车站</div>
|
||||
</div>
|
||||
<div
|
||||
v-for="(child, index) in currentStation.children"
|
||||
:key="currentStation.code + index"
|
||||
class="each_data_info"
|
||||
style="display: flex;align-items: center;justify-content: center;"
|
||||
@click="selectArea(currentStation.code, index)"
|
||||
>
|
||||
<div v-if="child.status === 'default'" class="button_default_content">
|
||||
<div
|
||||
class="button_default"
|
||||
:style="{ background: selectedAreaList.includes(currentStation.code + '-' + index) ? '#2EFF74' : '#CDCDCD' }"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-if="child.status === 'default'"
|
||||
:class="currentStation.code + '-' + index"
|
||||
style="width: 14px;height: 14px;margin-left: 5px;"
|
||||
:style="{ backgroundColor: statusColor['normal'] }"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="screen_right">
|
||||
<div class="each_operate">
|
||||
<div class="each_operate_text">操作</div>
|
||||
<div class="each_operate_button" @click="showInfoBrroadcast">信息发布<br>窗口</div>
|
||||
<div class="each_operate_button" @click="showInfoBrroadcast">滚动信息<br />发布</div>
|
||||
</div>
|
||||
<div class="each_operate">
|
||||
<div class="each_operate_text">信息清除</div>
|
||||
<div class="each_operate_button" @click="stopBroadcast">清除<br>普通信息</div>
|
||||
<div class="each_operate_button" @click="stopBroadcast">清除<br />普通信息</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -69,354 +125,552 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import { queryIscsDeviceCod } from '@/api/iscs';
|
||||
import InfoBroadcast from './infoBroadcast';
|
||||
import { sendCommandNew } from '@/api/jmap/training';
|
||||
import { creatSubscribe, clearSubscribe, getTopic } from '@/utils/stomp';
|
||||
import { getToken } from '@/utils/auth';
|
||||
export default {
|
||||
name:'MainScreen',
|
||||
components: {
|
||||
InfoBroadcast
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
verticalHeader: [
|
||||
{name: '车站', title: '全线', key: 'station', type: 'header', active: false},
|
||||
{name: '站厅(LCD)', title: '全站厅(LCD)', key: 'stationHall', type: 'checkBox', active: false},
|
||||
{name: '上行站台', title: '全上行站台', key: 'uplinkStation', type: 'checkBox', active: false},
|
||||
{name: '下行站台', title: '全下行站台', key: 'downlinkStation', type: 'checkBox', active: false},
|
||||
{name: '出入口', title: '全出入口', key: 'passageway', type: 'checkBox', active: false},
|
||||
{name: '物业', title: '全物业', key: 'property', type: 'checkBox', active: false},
|
||||
{name: '天桥1', title: '天桥1', key: 'overbridge1', type: 'checkBox', active: false},
|
||||
{name: '天桥2', title: '天桥2', key: 'overbridge2', type: 'checkBox', active: false},
|
||||
{name: 'LED', title: '出入口(LED)', key: 'LED', type: 'checkBox', active: false}
|
||||
],
|
||||
stationList:[],
|
||||
selectedAreaList: [],
|
||||
iscsDeviceMap: {},
|
||||
deviceMap: {}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.iscsStatePisMessages': function (list) {
|
||||
if (list && list.length) {
|
||||
list.forEach(item => {
|
||||
const index = this.iscsDeviceMap[item.code];
|
||||
if (index) {
|
||||
this.$set(this.deviceMap[index], 'state', item.state);
|
||||
const div = document.getElementById(index);
|
||||
div.style.background = item.state === 'normal' ? '#2EFF74' : '#D4D4D4';
|
||||
}
|
||||
});
|
||||
}
|
||||
import { getByGroupStationList } from '@/api/jmap/map'
|
||||
import { queryIscsDeviceCod } from '@/api/iscs'
|
||||
import InfoBroadcast from './infoBroadcast'
|
||||
import { sendCommandNew } from '@/api/jmap/training'
|
||||
import { creatSubscribe, clearSubscribe, getTopic } from '@/utils/stomp'
|
||||
import { getToken } from '@/utils/auth'
|
||||
|
||||
}
|
||||
export default {
|
||||
name: 'MainScreen',
|
||||
components: {
|
||||
InfoBroadcast,
|
||||
},
|
||||
computed: {
|
||||
currentStation() {
|
||||
return this.stationList.find(station => station.code === this.$route.query.stationId)
|
||||
},
|
||||
async created () {
|
||||
// 请求当前线路车站列表
|
||||
try {
|
||||
const positionMap = {
|
||||
LCD: 0,
|
||||
UP_STAND: 1,
|
||||
DOWN_STAND: 2,
|
||||
GATE: 3,
|
||||
PROPERTY: 4,
|
||||
OVERPASS1: 5,
|
||||
OVERPASS2: 6,
|
||||
LED:7
|
||||
};
|
||||
const res = await getByGroupStationList(this.$route.query.group);
|
||||
const resp = await queryIscsDeviceCod({ mapId: this.$route.query.mapId, system: 'PIS' });
|
||||
if (res.code == 200) {
|
||||
this.stationList = [];
|
||||
res.data.forEach(station => {
|
||||
if (!station.depot) {
|
||||
const children = [{status:'none'}, {status:'none'}, {status:'none'}, {status:'none'}, {status:'none'}, {status:'none'}, {status:'none'}, {status:'none'}];
|
||||
if (resp.code == 200) {
|
||||
resp.data && resp.data.forEach(item => {
|
||||
if (station.code == item.station) {
|
||||
const index = positionMap[item.position];
|
||||
if ( children[index]) {
|
||||
children[index].status = 'default';
|
||||
this.iscsDeviceMap[item.code] = station.code + '-' + index;
|
||||
this.deviceMap[station.code + '-' + index] = item;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
const param = {
|
||||
stationName: station.name,
|
||||
code: station.code,
|
||||
children:children
|
||||
};
|
||||
this.stationList.push(param);
|
||||
}
|
||||
});
|
||||
}
|
||||
this.subscribe();
|
||||
} catch (e) {
|
||||
this.$message.error('获取车站列表失败!');
|
||||
}
|
||||
isSingleStation() {
|
||||
return this.$route.query.stationId.startsWith('Station')
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.clearSubscribe();
|
||||
},
|
||||
methods:{
|
||||
showInfoBrroadcast() {
|
||||
this.$refs.infoBroadcast.doShow();
|
||||
},
|
||||
stopBroadcast() {
|
||||
const iscsDeviceCodes = [];
|
||||
this.selectedAreaList.forEach(item => {
|
||||
if (this.deviceMap[item]) {
|
||||
iscsDeviceCodes.push(this.deviceMap[item].code);
|
||||
}
|
||||
});
|
||||
if (!iscsDeviceCodes.length) {
|
||||
this.$message.error('请选择广播设备');
|
||||
return;
|
||||
}
|
||||
sendCommandNew(this.$route.query.group, 'ISCS_PIS_Stop_Playing', {iscsDeviceCodes: iscsDeviceCodes}).then(resp => {
|
||||
const audio = document.getElementById('voice');
|
||||
audio.pause();
|
||||
}).catch(() => {
|
||||
this.$message.error('广播终止播放失败!');
|
||||
});
|
||||
},
|
||||
releaseBroadcast(voice, type) {
|
||||
const iscsDeviceCodes = [];
|
||||
this.selectedAreaList.forEach(item => {
|
||||
if (this.deviceMap[item]) {
|
||||
iscsDeviceCodes.push(this.deviceMap[item].code);
|
||||
}
|
||||
});
|
||||
if (!iscsDeviceCodes.length) {
|
||||
this.$message.error('请选择广播设备');
|
||||
return;
|
||||
}
|
||||
const params = {
|
||||
resourceId: voice.id,
|
||||
iscsDeviceCodes: iscsDeviceCodes,
|
||||
name: voice.name,
|
||||
content: voice.content,
|
||||
type
|
||||
};
|
||||
sendCommandNew(this.$route.query.group, 'ISCS_PIS_Play', params).then(resp => {
|
||||
const voiceUrl = this.$store.state.user.resourcesUrl + (voice.url || resp.data);
|
||||
const audio = document.getElementById('voice');
|
||||
audio.src = voiceUrl;
|
||||
audio.play();
|
||||
}).catch(() => {
|
||||
this.$message.error('发布广播失败!');
|
||||
});
|
||||
},
|
||||
selectArea(stationName, index) {
|
||||
const elem = stationName + '-' + index;
|
||||
if (this.selectedAreaList.includes(elem)) {
|
||||
const areaIndex = this.selectedAreaList.indexOf(elem);
|
||||
this.selectedAreaList.splice(areaIndex, 1);
|
||||
} else {
|
||||
this.selectedAreaList.push(elem);
|
||||
}
|
||||
},
|
||||
selectedStation(station) {
|
||||
const flag = this.checkStationSelected(station);
|
||||
station.children.forEach((item, index) => {
|
||||
const elem = station.code + '-' + index;
|
||||
if (item.status === 'default' && flag) {
|
||||
const areaIndex = this.selectedAreaList.indexOf(elem);
|
||||
this.selectedAreaList.splice(areaIndex, 1);
|
||||
} else if (item.status === 'default' && !flag && !this.selectedAreaList.includes(elem)) {
|
||||
this.selectedAreaList.push(elem);
|
||||
}
|
||||
});
|
||||
},
|
||||
checkStationSelected(station) {
|
||||
let stationSelectedFlag = true;
|
||||
station.children.some((item, index) => {
|
||||
if (item.status === 'default') {
|
||||
stationSelectedFlag = this.selectedAreaList.includes(station.code + '-' + index);
|
||||
return !stationSelectedFlag;
|
||||
}
|
||||
});
|
||||
return stationSelectedFlag;
|
||||
},
|
||||
selectedBatch(data) {
|
||||
data.active = !data.active;
|
||||
if (data.key == 'station') {
|
||||
this.selectedAllLine(data);
|
||||
} else {
|
||||
let areaIndex;
|
||||
this.verticalHeader.map((item, index) => {
|
||||
if (item.key == data.key) {
|
||||
areaIndex = index;
|
||||
}
|
||||
});
|
||||
const flag = data.active;
|
||||
this.stationList.forEach(station => {
|
||||
station.children.forEach((item, index) => {
|
||||
const elem = station.code + '-' + index;
|
||||
if (item.status == 'default' && (index + 1) == areaIndex && !flag) {
|
||||
const selectedAreaIndex = this.selectedAreaList.indexOf(elem);
|
||||
this.selectedAreaList.splice(selectedAreaIndex, 1);
|
||||
} else if (item.status == 'default' && (index + 1) == areaIndex && flag) {
|
||||
this.selectedAreaList.push(elem);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
selectedAllLine(data) {
|
||||
const flag = data.active;
|
||||
this.selectedAreaList = [];
|
||||
this.stationList.forEach(station => {
|
||||
station.children.forEach((item, index) => {
|
||||
if (item.status === 'default' && flag) {
|
||||
this.selectedAreaList.push(station.code + '-' + index);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
subscribe() {
|
||||
this.clearSubscribe();
|
||||
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
|
||||
creatSubscribe(getTopic('ISCSPIS', this.$route.query.group ), header);
|
||||
this.$store.dispatch('app/animationsClose');
|
||||
},
|
||||
clearSubscribe() {
|
||||
clearSubscribe(getTopic('ISCSPIS', this.$route.query.group));
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
verticalHeader: [
|
||||
{ name: '车站', title: '全线', key: 'station', type: 'header', active: false },
|
||||
{ name: '站厅(LCD)', title: '全站厅(LCD)', key: 'stationHall', type: 'checkBox', active: false },
|
||||
{ name: '上行站台', title: '全上行站台', key: 'uplinkStation', type: 'checkBox', active: false },
|
||||
{ name: '下行站台', title: '全下行站台', key: 'downlinkStation', type: 'checkBox', active: false },
|
||||
{ name: '出入口', title: '全出入口', key: 'passageway', type: 'checkBox', active: false },
|
||||
{ name: '物业', title: '全物业', key: 'property', type: 'checkBox', active: false },
|
||||
{ name: '天桥1', title: '天桥1', key: 'overbridge1', type: 'checkBox', active: false },
|
||||
{ name: '天桥2', title: '天桥2', key: 'overbridge2', type: 'checkBox', active: false },
|
||||
{ name: 'LED', title: '出入口(LED)', key: 'LED', type: 'checkBox', active: false },
|
||||
],
|
||||
statusColor: {
|
||||
normal: '#00ff00',
|
||||
},
|
||||
stationList: [],
|
||||
selectedAreaList: [],
|
||||
iscsDeviceMap: {},
|
||||
deviceMap: {},
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// '$store.state.socket.iscsStatePisMessages': function(list) {
|
||||
// if (list && list.length) {
|
||||
// list.forEach(item => {
|
||||
// const index = this.iscsDeviceMap[item.code]
|
||||
// if (index) {
|
||||
// this.$set(this.deviceMap[index], 'state', item.state)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
},
|
||||
async created() {
|
||||
// 请求当前线路车站列表
|
||||
try {
|
||||
const positionMap = {
|
||||
LCD: 0,
|
||||
UP_STAND: 1,
|
||||
DOWN_STAND: 2,
|
||||
GATE: 3,
|
||||
PROPERTY: 4,
|
||||
OVERPASS1: 5,
|
||||
OVERPASS2: 6,
|
||||
LED: 7,
|
||||
}
|
||||
const res = await getByGroupStationList(this.$route.query.group)
|
||||
const resp = await queryIscsDeviceCod({ mapId: this.$route.query.mapId, system: 'PIS' })
|
||||
if (res.code == 200) {
|
||||
this.stationList = []
|
||||
res.data.forEach(station => {
|
||||
if (!station.depot) {
|
||||
const children = [
|
||||
{ status: 'none' },
|
||||
{ status: 'none' },
|
||||
{ status: 'none' },
|
||||
{ status: 'none' },
|
||||
{ status: 'none' },
|
||||
{ status: 'none' },
|
||||
{ status: 'none' },
|
||||
{ status: 'none' },
|
||||
]
|
||||
if (resp.code == 200) {
|
||||
resp.data &&
|
||||
resp.data.forEach(item => {
|
||||
if (station.code == item.station) {
|
||||
const index = positionMap[item.position]
|
||||
if (children[index]) {
|
||||
children[index].status = 'default'
|
||||
this.iscsDeviceMap[item.code] = station.code + '-' + index
|
||||
this.deviceMap[station.code + '-' + index] = item
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
const param = {
|
||||
stationName: station.name,
|
||||
code: station.code,
|
||||
children: children,
|
||||
}
|
||||
this.stationList.push(param)
|
||||
}
|
||||
})
|
||||
}
|
||||
this.subscribe()
|
||||
} catch (e) {
|
||||
this.$message.error('获取车站列表失败!')
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.clearSubscribe()
|
||||
},
|
||||
methods: {
|
||||
showInfoBrroadcast() {
|
||||
this.$refs.infoBroadcast.doShow()
|
||||
},
|
||||
stopBroadcast() {
|
||||
const iscsDeviceCodes = []
|
||||
this.selectedAreaList.forEach(item => {
|
||||
if (this.deviceMap[item]) {
|
||||
iscsDeviceCodes.push(this.deviceMap[item].code)
|
||||
}
|
||||
})
|
||||
if (!iscsDeviceCodes.length) {
|
||||
this.$message.error('请选择广播设备')
|
||||
return
|
||||
}
|
||||
sendCommandNew(this.$route.query.group, 'ISCS_PIS_Stop_Playing', { iscsDeviceCodes: iscsDeviceCodes })
|
||||
.then(resp => {
|
||||
// const audio = document.getElementById('voice')
|
||||
// audio.pause()
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message.error('广播终止播放失败!')
|
||||
})
|
||||
},
|
||||
releaseBroadcast(voice, type) {
|
||||
const iscsDeviceCodes = []
|
||||
this.selectedAreaList.forEach(item => {
|
||||
if (this.isSingleStation && !item.startsWith(this.$route.query.stationId)) return
|
||||
if (this.deviceMap[item]) {
|
||||
iscsDeviceCodes.push(this.deviceMap[item].code)
|
||||
}
|
||||
})
|
||||
if (!iscsDeviceCodes.length) {
|
||||
this.$message.error('请选择广播设备')
|
||||
return
|
||||
}
|
||||
const params = {
|
||||
resourceId: voice.id,
|
||||
iscsDeviceCodes: iscsDeviceCodes,
|
||||
name: voice.name,
|
||||
content: voice.content,
|
||||
type,
|
||||
}
|
||||
sendCommandNew(this.$route.query.group, 'ISCS_PIS_Play', params)
|
||||
.then(resp => {
|
||||
// const voiceUrl = this.$store.state.user.resourcesUrl + (voice.url || resp.data)
|
||||
// const audio = document.getElementById('voice')
|
||||
// audio.src = voiceUrl
|
||||
// audio.play()
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message.error('发布广播失败!')
|
||||
})
|
||||
},
|
||||
selectArea(stationName, index) {
|
||||
const elem = stationName + '-' + index
|
||||
if (this.selectedAreaList.includes(elem)) {
|
||||
const areaIndex = this.selectedAreaList.indexOf(elem)
|
||||
this.selectedAreaList.splice(areaIndex, 1)
|
||||
} else {
|
||||
this.selectedAreaList.push(elem)
|
||||
}
|
||||
},
|
||||
selectedStation(station) {
|
||||
const flag = this.checkStationSelected(station)
|
||||
station.children.forEach((item, index) => {
|
||||
const elem = station.code + '-' + index
|
||||
if (item.status === 'default' && flag) {
|
||||
const areaIndex = this.selectedAreaList.indexOf(elem)
|
||||
this.selectedAreaList.splice(areaIndex, 1)
|
||||
} else if (item.status === 'default' && !flag && !this.selectedAreaList.includes(elem)) {
|
||||
this.selectedAreaList.push(elem)
|
||||
}
|
||||
})
|
||||
},
|
||||
checkStationSelected(station) {
|
||||
let stationSelectedFlag = true
|
||||
station.children.some((item, index) => {
|
||||
if (item.status === 'default') {
|
||||
stationSelectedFlag = this.selectedAreaList.includes(station.code + '-' + index)
|
||||
return !stationSelectedFlag
|
||||
}
|
||||
})
|
||||
return stationSelectedFlag
|
||||
},
|
||||
selectedBatch(data) {
|
||||
data.active = !data.active
|
||||
if (data.key == 'station') {
|
||||
this.selectedAllLine(data)
|
||||
} else {
|
||||
let areaIndex
|
||||
this.verticalHeader.map((item, index) => {
|
||||
if (item.key == data.key) {
|
||||
areaIndex = index
|
||||
}
|
||||
})
|
||||
const flag = data.active
|
||||
this.stationList.forEach(station => {
|
||||
station.children.forEach((item, index) => {
|
||||
const elem = station.code + '-' + index
|
||||
if (item.status == 'default' && index + 1 == areaIndex && !flag) {
|
||||
const selectedAreaIndex = this.selectedAreaList.indexOf(elem)
|
||||
this.selectedAreaList.splice(selectedAreaIndex, 1)
|
||||
} else if (item.status == 'default' && index + 1 == areaIndex && flag) {
|
||||
this.selectedAreaList.push(elem)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
selectedAllLine(data) {
|
||||
const flag = data.active
|
||||
this.selectedAreaList = []
|
||||
this.stationList.forEach(station => {
|
||||
station.children.forEach((item, index) => {
|
||||
if (item.status === 'default' && flag) {
|
||||
this.selectedAreaList.push(station.code + '-' + index)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
subscribe() {
|
||||
this.clearSubscribe()
|
||||
const header = { group: this.$route.query.group || '', 'X-Token': getToken() }
|
||||
creatSubscribe(getTopic('ISCSPIS', this.$route.query.group), header)
|
||||
this.$store.dispatch('app/animationsClose')
|
||||
},
|
||||
clearSubscribe() {
|
||||
clearSubscribe(getTopic('ISCSPIS', this.$route.query.group))
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/{
|
||||
.el-button{
|
||||
border-radius: 0 !important;
|
||||
color: #333 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
/deep/ {
|
||||
.el-button {
|
||||
border-radius: 0 !important;
|
||||
color: #333 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
.screen_header_text{margin-top: 20px;text-align: center;color: #9af1ec;font-size: 18px;padding-right: 100px;padding-bottom: 10px;}
|
||||
.main_screen{padding-left: 50px;width: 100%;}
|
||||
.main_screen_header{}
|
||||
.screen_main_content_inner{width: 100%;height: 500px;border-top: 2px solid #8c8a89;overflow-y: auto;display:flex;border-left: 2px solid #8c8a89;border-right: 2px solid #fff;border-bottom: 2px solid #fff;}
|
||||
.main_screen_content{display:inline-block;width: 100%;padding-left:100px;padding-right:200px;position: relative;height:500px;}
|
||||
.screen_left{display: inline-block;padding-bottom: 10px;padding-top: 10px;width: 100px;border: 2px #ccc solid;
|
||||
border-top: 2px solid #8c8a89;border-left: 2px solid #8c8a89;border-right: 2px solid #fff;border-bottom: 2px solid #fff;position:absolute;left:0;}
|
||||
.screen_left_tab{
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
color: #86e4d6;
|
||||
.screen_header_text {
|
||||
margin-top: 20px;
|
||||
text-align: center;
|
||||
color: #9af1ec;
|
||||
font-size: 18px;
|
||||
padding-right: 100px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.sceen_left_content{}
|
||||
.screen_right{display: inline-block;position:absolute;right:0;top:0;width: 200px;}
|
||||
.each_operate{width: 92px;padding: 10px;border-top: 2px solid #8c8a89;border-left: 2px solid #8c8a89;border-right: 2px solid #fff;border-bottom: 2px solid #fff;margin-top: 30px;margin-left: 30px;}
|
||||
.each_operate_text{text-align: center;font-size: 12px;color: #a9f4f6;}
|
||||
.each_operate_button{text-align: center;font-size: 12px;margin-top: 5px;cursor:pointer;background: #CCCCCC;display: inline-block;border-top: 2px solid #fff;border-left: 2px solid #fff;border-right: 2px solid #565656;border-bottom: 2px solid #565656;padding: 2px 8px;line-height: 140%;}
|
||||
.footer_button_group{position: absolute;right: 0;top: 0;width: 160px;}
|
||||
.main_screen_footer{margin-left: 120px;padding-right:160px;position: relative;margin-top:10px;}
|
||||
#screen_footer_text{
|
||||
width:100%;
|
||||
resize:none;
|
||||
height: 190px;
|
||||
border-top: 2px solid #8c8a89;
|
||||
border-left: 2px solid #8c8a89;
|
||||
border-right: 2px solid #fff;
|
||||
border-bottom: 2px solid #fff;
|
||||
.main_screen {
|
||||
padding-left: 50px;
|
||||
width: 100%;
|
||||
}
|
||||
.each_footer_button{margin-left:20px;margin-top: 10px;}
|
||||
.each_footer_button_icon{width: 14px;height: 14px;display: inline-block;}
|
||||
.each_footer_button_text{font-size: 13px;color: #fff;margin-left: 5px;display: inline-block;vertical-align: top;margin-top: 1px;}
|
||||
.screen_main_content{padding-left: 20px;padding-right: 20px;}
|
||||
.screen_status_red{background:#ff0000;}
|
||||
.screen_status_green{background:#00ff00;}
|
||||
.screen_status_blue{background:#00aaff}
|
||||
.screen_status_active{border-top: 2px solid #f1f1f1;border-left: 2px solid #d0d8dd;border-right: 2px solid #959da0;border-bottom: 2px solid #90999d;}
|
||||
.screen_status_active:after{
|
||||
content:'';
|
||||
border-top: 2px solid #a6a2a6;
|
||||
border-left: 2px solid #a5aca5;
|
||||
border-right: 2px solid #ececec;
|
||||
border-bottom: 2px solid #e4e4e4;
|
||||
background: #00ff00;
|
||||
min-width: 10px;
|
||||
height: 10px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
.main_screen_header {
|
||||
}
|
||||
.screen_status_active::after{content:'';border-top: 2px solid #a6a2a6;border-left: 2px solid #a5aca5;border-right: 2px solid #ececec;border-bottom: 2px solid #e4e4e4;background: #00ff00;min-width: 10px;height: 10px;display: inline-block;vertical-align: top;}
|
||||
.screen_left_text_group{width:260px;padding: 0px 10px 10px 10px;font-size: 14px;color: #9de4e8;display: inline-block;}
|
||||
.each_data_info{margin-top:10px;height:20px;}
|
||||
.screen_right_group{display: inline-block;vertical-align: top;font-size:0;overflow-x: auto;min-height:100%;}
|
||||
.each_station_info{width:130px;display: inline-block;vertical-align:top;padding-right: 10px;}
|
||||
.screen_station_name,.screen_operate_name{
|
||||
padding: 2px 0px;
|
||||
font-size: 12px;
|
||||
.screen_main_content_inner {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
border-top: 2px solid #8c8a89;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
border-left: 2px solid #8c8a89;
|
||||
border-right: 2px solid #fff;
|
||||
border-bottom: 2px solid #fff;
|
||||
}
|
||||
.screen_main_content_inner_single_station {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
border-top: 2px solid #8c8a89;
|
||||
border-left: 2px solid #8c8a89;
|
||||
border-right: 2px solid #fff;
|
||||
border-bottom: 2px solid #fff;
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
color: #9af1ec;
|
||||
& > div {
|
||||
width: 11%;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.content {
|
||||
.list {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
& > div {
|
||||
width: 11%;
|
||||
text-align: center;
|
||||
}
|
||||
.stationButton {
|
||||
margin: 0;
|
||||
.screen_station_name {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.main_screen_content {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
padding-left: 100px;
|
||||
padding-right: 200px;
|
||||
position: relative;
|
||||
height: 500px;
|
||||
}
|
||||
.screen_left {
|
||||
display: inline-block;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 10px;
|
||||
width: 100px;
|
||||
border: 2px #ccc solid;
|
||||
border-top: 2px solid #8c8a89;
|
||||
border-left: 2px solid #8c8a89;
|
||||
border-right: 2px solid #fff;
|
||||
border-bottom: 2px solid #fff;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
.screen_left_tab {
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
color: #86e4d6;
|
||||
}
|
||||
.sceen_left_content {
|
||||
}
|
||||
.screen_right {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 200px;
|
||||
}
|
||||
.each_operate {
|
||||
width: 92px;
|
||||
padding: 10px;
|
||||
border-top: 2px solid #8c8a89;
|
||||
border-left: 2px solid #8c8a89;
|
||||
border-right: 2px solid #fff;
|
||||
border-bottom: 2px solid #fff;
|
||||
margin-top: 30px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.each_operate_text {
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
color: #a9f4f6;
|
||||
}
|
||||
.each_operate_button {
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
margin-top: 5px;
|
||||
cursor: pointer;
|
||||
background: #cccccc;
|
||||
display: inline-block;
|
||||
border-top: 2px solid #fff;
|
||||
border-left: 2px solid #fff;
|
||||
border-right: 2px solid #565656;
|
||||
border-bottom: 2px solid #565656;
|
||||
padding: 2px 8px;
|
||||
line-height: 140%;
|
||||
}
|
||||
.footer_button_group {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 160px;
|
||||
}
|
||||
.main_screen_footer {
|
||||
margin-left: 120px;
|
||||
padding-right: 160px;
|
||||
position: relative;
|
||||
margin-top: 10px;
|
||||
}
|
||||
#screen_footer_text {
|
||||
width: 100%;
|
||||
resize: none;
|
||||
height: 190px;
|
||||
border-top: 2px solid #8c8a89;
|
||||
border-left: 2px solid #8c8a89;
|
||||
border-right: 2px solid #fff;
|
||||
border-bottom: 2px solid #fff;
|
||||
}
|
||||
.each_footer_button {
|
||||
margin-left: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.each_footer_button_icon {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
display: inline-block;
|
||||
}
|
||||
.each_footer_button_text {
|
||||
font-size: 13px;
|
||||
color: #fff;
|
||||
margin-left: 5px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-top: 1px;
|
||||
}
|
||||
.screen_main_content {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
.screen_status_red {
|
||||
background: #ff0000;
|
||||
}
|
||||
.screen_status_green {
|
||||
background: #00ff00;
|
||||
}
|
||||
.screen_status_blue {
|
||||
background: #00aaff;
|
||||
}
|
||||
.screen_status_active {
|
||||
border-top: 2px solid #f1f1f1;
|
||||
border-left: 2px solid #d0d8dd;
|
||||
border-right: 2px solid #959da0;
|
||||
border-bottom: 2px solid #90999d;
|
||||
}
|
||||
.screen_status_active:after {
|
||||
content: '';
|
||||
border-top: 2px solid #a6a2a6;
|
||||
border-left: 2px solid #a5aca5;
|
||||
border-right: 2px solid #ececec;
|
||||
border-bottom: 2px solid #e4e4e4;
|
||||
background: #00ff00;
|
||||
min-width: 10px;
|
||||
height: 10px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
.screen_status_active::after {
|
||||
content: '';
|
||||
border-top: 2px solid #a6a2a6;
|
||||
border-left: 2px solid #a5aca5;
|
||||
border-right: 2px solid #ececec;
|
||||
border-bottom: 2px solid #e4e4e4;
|
||||
background: #00ff00;
|
||||
min-width: 10px;
|
||||
height: 10px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
.screen_left_text_group {
|
||||
width: 260px;
|
||||
padding: 0px 10px 10px 10px;
|
||||
font-size: 14px;
|
||||
color: #9de4e8;
|
||||
display: inline-block;
|
||||
}
|
||||
.each_data_info {
|
||||
margin-top: 10px;
|
||||
height: 20px;
|
||||
}
|
||||
.screen_right_group {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
font-size: 0;
|
||||
overflow-x: auto;
|
||||
min-height: 100%;
|
||||
}
|
||||
.each_station_info {
|
||||
width: 130px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.screen_station_name,
|
||||
.screen_operate_name {
|
||||
padding: 2px 0px;
|
||||
font-size: 12px;
|
||||
background: #cccccc;
|
||||
text-align: center;
|
||||
border-top: 2px solid #f9f9f9;
|
||||
border-left: 2px solid #f6f8f8;
|
||||
border-right: 2px solid #9e9e9e;
|
||||
border-bottom: 2px solid #636667;
|
||||
cursor: pointer;
|
||||
margin-left: 0;
|
||||
margin-top: 10px;
|
||||
&:active,
|
||||
&.active {
|
||||
background: #cccccc;
|
||||
text-align: center;
|
||||
border-top: 2px solid #f9f9f9;
|
||||
border-left: 2px solid #f6f8f8;
|
||||
border-right: 2px solid #9e9e9e;
|
||||
border-bottom: 2px solid #636667;
|
||||
cursor: pointer;
|
||||
margin-left: 0;
|
||||
margin-top: 10px;
|
||||
&:active,
|
||||
&.active{
|
||||
background: #cccccc;
|
||||
border-top: 2px solid #9c9c9c;
|
||||
border-left: 2px solid #9c9c9c;
|
||||
border-right: 2px solid #fff;
|
||||
border-bottom: 2px solid #fff;
|
||||
}
|
||||
}
|
||||
.screen_station_name{
|
||||
width: 120px;
|
||||
}
|
||||
.screen_station_name.active{
|
||||
background: #EBB570;
|
||||
border-top: 2px solid #795B31;
|
||||
border-left: 2px solid #795B31;
|
||||
border-top: 2px solid #9c9c9c;
|
||||
border-left: 2px solid #9c9c9c;
|
||||
border-right: 2px solid #fff;
|
||||
border-bottom: 2px solid #fff;
|
||||
}
|
||||
}
|
||||
.screen_station_name {
|
||||
width: 120px;
|
||||
}
|
||||
.screen_station_name.active {
|
||||
background: #ebb570;
|
||||
border-top: 2px solid #795b31;
|
||||
border-left: 2px solid #795b31;
|
||||
border-right: 2px solid #fff;
|
||||
border-bottom: 2px solid #fff;
|
||||
}
|
||||
|
||||
.data_button_info{
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
display: inline-block;
|
||||
margin-left: 52px;
|
||||
position: relative;
|
||||
.data_button_info {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
display: inline-block;
|
||||
margin-left: 52px;
|
||||
position: relative;
|
||||
}
|
||||
.button_default{
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
margin: auto;
|
||||
background:#CCCCCC;
|
||||
position: relative;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
border-top: 2px solid #fff;
|
||||
border-left: 2px solid #fff;
|
||||
border-right: 2px solid #898888;
|
||||
border-bottom: 2px solid #898888;
|
||||
.button_default {
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
margin: auto;
|
||||
background: #cccccc;
|
||||
position: relative;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
border-top: 2px solid #fff;
|
||||
border-left: 2px solid #fff;
|
||||
border-right: 2px solid #898888;
|
||||
border-bottom: 2px solid #898888;
|
||||
}
|
||||
.button_default_content{
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
background: #D4D4D4;
|
||||
display: inline-block;
|
||||
border-top: 2px solid #fff;
|
||||
border-left: 2px solid #fff;
|
||||
border-right: 2px solid #898888;
|
||||
border-bottom: 2px solid #898888;
|
||||
.button_default_content {
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
background: #d4d4d4;
|
||||
display: inline-block;
|
||||
border-top: 2px solid #fff;
|
||||
border-left: 2px solid #fff;
|
||||
border-right: 2px solid #898888;
|
||||
border-bottom: 2px solid #898888;
|
||||
}
|
||||
.screen_right_group_in{
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-flex-flow: row nowrap;
|
||||
.screen_right_group_in {
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-flex-flow: row nowrap;
|
||||
}
|
||||
</style>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="iscs_fuzhou-01__systerm route-detail"
|
||||
title="故障设置"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
@ -60,12 +60,14 @@ export default {
|
||||
options: [
|
||||
{ label: '104A断路器故障', value: 'group_2' },
|
||||
{ label: '104B断路器故障', value: 'group_52' },
|
||||
{ label: '框架电流保护故障', value: 'frame_group' }
|
||||
{ label: '框架电流保护故障', value: 'frame_group' },
|
||||
{ label: '闸机故障', value: 'gate_fault' }
|
||||
],
|
||||
list: {
|
||||
valve: ['控分', '控合']
|
||||
},
|
||||
farmed: ''
|
||||
farmed: '',
|
||||
type: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -74,10 +76,17 @@ export default {
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow;
|
||||
},
|
||||
title() {
|
||||
return this.type === 'CANCEL' ? '故障取消' : '故障设置';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
doShow(type) {
|
||||
this.type = type;
|
||||
if (type === 'CANCEL') {
|
||||
this.options = [{ label: '闸机故障', value: 'gate_fault' }];
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.elemList = [];
|
||||
},
|
||||
@ -91,6 +100,12 @@ export default {
|
||||
this.farmed = '';
|
||||
if (this.formModel.value == 'frame_group') {
|
||||
this.setMalfunction();
|
||||
} else if (this.formModel.value === 'gate_fault') {
|
||||
if (this.$route.query.stationId && this.$route.params.mode === 'autoTicket') {
|
||||
this.$store.dispatch('iscs/handlerGateFaultList', { type: this.type, stationCode: this.$route.query.stationId });
|
||||
} else {
|
||||
this.$message.error('请在车站自动售检票系统中设置或取消故障!');
|
||||
}
|
||||
} else {
|
||||
this.setModelMalfunction(this.$iscs.iscsDevice[this.formModel.value].model);
|
||||
}
|
||||
|
@ -75,11 +75,11 @@ export default {
|
||||
subscribe(stationCode) {
|
||||
this.clearSubscribe();
|
||||
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
|
||||
creatSubscribe(getTopic('ISCSPSD', this.$route.query.group, stationCode ), header);
|
||||
creatSubscribe(getTopic('ISCSPSD', this.$route.query.group, {stationCode} ), header);
|
||||
this.$store.dispatch('app/animationsClose');
|
||||
},
|
||||
clearSubscribe(stationCode) {
|
||||
clearSubscribe(getTopic('ISCSPSD', this.$route.query.group, stationCode));
|
||||
clearSubscribe(getTopic('ISCSPSD', this.$route.query.group, {stationCode}));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -41,6 +41,9 @@ export default {
|
||||
$route() {
|
||||
this.mode = this.$route.params.mode;
|
||||
this.getInitData();
|
||||
},
|
||||
'$store.state.iscs.gateFaultCount': function(val) {
|
||||
this.$store.dispatch('iscs/updateIscsState', [{deviceType: 'GATE', status: this.$store.state.iscs.gateFaultList.includes(this.stationId) ? 0 : 1}]);
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -84,6 +87,9 @@ export default {
|
||||
const data = JSON.parse(resp.data.graphData);
|
||||
this.$refs.iscsPlate.show(data, this.width, this.height, this.scaleRate);
|
||||
document.querySelector('.fasIndex').scrollTop = 0;
|
||||
if (this.mode === 'autoTicket') {
|
||||
this.$store.dispatch('iscs/updateIscsState', [{deviceType: 'GATE', status: this.$store.state.iscs.gateFaultList.includes(this.stationId) ? 0 : 1}]);
|
||||
}
|
||||
} else {
|
||||
this.loading = false;
|
||||
}
|
||||
|
@ -2,8 +2,8 @@
|
||||
<div>
|
||||
<div class="station-nav-out">
|
||||
<div class="station-nav">
|
||||
<div class="station-line" />
|
||||
<div class="stationList">
|
||||
<div class="station-line" />
|
||||
<div v-for="(item, index) in stationList" :key="index" class="station-box-out">
|
||||
<div class="station-box">
|
||||
<div class="leftRect" />
|
||||
@ -64,6 +64,7 @@
|
||||
<!-- <span v-show="!alarmInfo" class="point_box" /> -->
|
||||
</div>
|
||||
<div class="bottom-back" @click="getIncidentList">事件</div>
|
||||
<div class="bottom-back" @click="cancelMalfunction">故障取消</div>
|
||||
<div class="bottom-back" @click="handleMalfunction">故障设置</div>
|
||||
</div>
|
||||
<alarm-config ref="alarmConfig" />
|
||||
@ -460,7 +461,10 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
handleMalfunction() {
|
||||
this.$refs.malfunction.doShow();
|
||||
this.$refs.malfunction.doShow('SET');
|
||||
},
|
||||
cancelMalfunction() {
|
||||
this.$refs.malfunction.doShow('CANCEL');
|
||||
},
|
||||
selectChildren(type, isReplace = false) { // 选择菜单
|
||||
let stationName = '';
|
||||
@ -512,10 +516,9 @@ export default {
|
||||
}
|
||||
.station-line{
|
||||
height: 12px;
|
||||
width: 80%;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
background-image: linear-gradient(to bottom , #9c9c9c, #F0F0F0,#9c9c9c);
|
||||
left: 10px;
|
||||
top: 25px;
|
||||
border: 1px #505050 solid;
|
||||
}
|
||||
@ -574,7 +577,7 @@ export default {
|
||||
.station-box{
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
margin-right: 1.8vw;
|
||||
// margin-right: 1.8vw;
|
||||
width: 1.5vw;
|
||||
margin-top: 20px;
|
||||
cursor: pointer;
|
||||
@ -704,8 +707,13 @@ background:rgba(231,237,253,0.9);
|
||||
padding:0px 1vw;
|
||||
}
|
||||
.stationList{
|
||||
display: inline-block;
|
||||
// display: inline-block;
|
||||
display: flex;
|
||||
position: relative;
|
||||
justify-content: space-between;
|
||||
float: left;
|
||||
height: 100%;
|
||||
width: 82%;
|
||||
}
|
||||
.station-nav-out{
|
||||
position: absolute;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user