Merge remote-tracking branch 'origin/test'
This commit is contained in:
commit
3bdc137618
@ -6,7 +6,7 @@ NODE_ENV = 'development'
|
|||||||
# VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
|
# VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.3.4:9000'
|
# VUE_APP_BASE_API = 'http://192.168.3.4:9000'
|
||||||
VUE_APP_BASE_API = 'http://192.168.3.6:9000'
|
VUE_APP_BASE_API = 'http://192.168.3.6:9000'
|
||||||
VUE_APP_VOICE_API = 'https://test.joylink.club'
|
VUE_APP_VOICE_API = 'https://test.joylink.club/jlcloud'
|
||||||
|
|
||||||
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
|
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
|
||||||
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
|
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
|
||||||
|
@ -4,4 +4,4 @@ VUE_APP_PRO = 'local'
|
|||||||
|
|
||||||
# base api
|
# base api
|
||||||
VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
|
VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
|
||||||
VUE_APP_VOICE_API = 'https://joylink.club'
|
VUE_APP_VOICE_API = 'https://joylink.club/jlcloud'
|
||||||
|
@ -3,4 +3,4 @@ NODE_ENV = 'production'
|
|||||||
|
|
||||||
# base api
|
# base api
|
||||||
VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
|
VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
|
||||||
VUE_APP_VOICE_API = 'https://joylink.club'
|
VUE_APP_VOICE_API = 'https://joylink.club/jlcloud'
|
||||||
|
@ -3,4 +3,4 @@ NODE_ENV = 'production'
|
|||||||
|
|
||||||
# base api
|
# base api
|
||||||
VUE_APP_BASE_API = 'https://test.joylink.club/jlcloud'
|
VUE_APP_BASE_API = 'https://test.joylink.club/jlcloud'
|
||||||
VUE_APP_VOICE_API = 'https://test.joylink.club'
|
VUE_APP_VOICE_API = 'https://test.joylink.club/jlcloud'
|
||||||
|
@ -163,3 +163,24 @@ export function getTestPaperDatail(competitionId) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 提交实操结果 */
|
||||||
|
export function submitPracticalCompetition(group, competitionId) {
|
||||||
|
return request({
|
||||||
|
url: `/api/v1/competitionPractical/${group}/${competitionId}/finish`,
|
||||||
|
method: 'put'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 开始实操竞赛 */
|
||||||
|
export function startPracticalCompetition(group, competitionId) {
|
||||||
|
return request({
|
||||||
|
url: `/api/v1/competitionPractical/${group}/${competitionId}/start`,
|
||||||
|
method: 'put'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 查询实操考试结果 */
|
||||||
|
export function getPracticalCompetitionResult(competitionId) {
|
||||||
|
return request({
|
||||||
|
url: `/api/v1/competitionPractical/${competitionId}/result`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -693,3 +693,10 @@ export function getTrainDetailBytripNumber(group, params) {
|
|||||||
params: params
|
params: params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 根据memberId获取综合演练角色信息 */
|
||||||
|
export function getMemberInfo(group, memberId) {
|
||||||
|
return request({
|
||||||
|
url: `/simulation/${group}/${memberId}/memberInfo`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -260,4 +260,10 @@ deviceRender[deviceType.ElectricButterflyValve] = {
|
|||||||
zlevel: 1,
|
zlevel: 1,
|
||||||
z: 5
|
z: 5
|
||||||
};
|
};
|
||||||
|
// 水池
|
||||||
|
deviceRender[deviceType.Cistern] = {
|
||||||
|
_type: deviceType.Cistern,
|
||||||
|
zlevel: 1,
|
||||||
|
z: 5
|
||||||
|
}
|
||||||
export default deviceRender;
|
export default deviceRender;
|
||||||
|
@ -39,7 +39,8 @@ const deviceType = {
|
|||||||
StateTable: 'StateTable',
|
StateTable: 'StateTable',
|
||||||
LightingGroup: 'LightingGroup',
|
LightingGroup: 'LightingGroup',
|
||||||
BalancedElectric: 'BalancedElectric',
|
BalancedElectric: 'BalancedElectric',
|
||||||
ElectricButterflyValve: 'ElectricButterflyValve'
|
ElectricButterflyValve: 'ElectricButterflyValve',
|
||||||
|
Cistern: 'Cistern'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default deviceType;
|
export default deviceType;
|
||||||
|
File diff suppressed because one or more lines are too long
27
src/iscs/shape/bas/cistern.js
Normal file
27
src/iscs/shape/bas/cistern.js
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import createPathSvg from '../components/pathsvg';
|
||||||
|
|
||||||
|
export default class airConditioner extends Group {
|
||||||
|
constructor(device) {
|
||||||
|
super();
|
||||||
|
this.model = device.model;
|
||||||
|
this.zlevel = device.model.zlevel;
|
||||||
|
this.z = device.model.z;
|
||||||
|
this._type = device.model._type;
|
||||||
|
this.code = device.model.code;
|
||||||
|
this.create();
|
||||||
|
}
|
||||||
|
create() {
|
||||||
|
this.grouper = new Group({
|
||||||
|
id: this.model.code,
|
||||||
|
position: [this.model.point.x, this.model.point.y]
|
||||||
|
});
|
||||||
|
this.path = createPathSvg(this.model);
|
||||||
|
this.grouper.add(this.path);
|
||||||
|
this.add(this.grouper);
|
||||||
|
}
|
||||||
|
setModel(dx, dy) {
|
||||||
|
this.model.point.x += dx;
|
||||||
|
this.model.point.y += dy;
|
||||||
|
}
|
||||||
|
}
|
@ -64,9 +64,17 @@ const map = {
|
|||||||
width: 73,
|
width: 73,
|
||||||
path: 'M77,24V61L63,55V71H55V52L40.476,45.165,30,50V71H22V53L4,61V24L37,40.923V34.835C28.523,33.828,22,27.8,22,20.5,22,12.492,29.835,6,39.5,6S57,12.492,57,20.5c0,7.3-6.523,13.328-15,14.335v7.113ZM50.8,22H47l-4,3-4-3H30l3-5h5l4,2,3-1h5.534C48.973,14.409,43.6,10.881,38,11c-6.646.141-11,5.858-11,10s4.516,9.141,13,9C47.178,29.88,50.075,25.771,50.8,22Z'
|
path: 'M77,24V61L63,55V71H55V52L40.476,45.165,30,50V71H22V53L4,61V24L37,40.923V34.835C28.523,33.828,22,27.8,22,20.5,22,12.492,29.835,6,39.5,6S57,12.492,57,20.5c0,7.3-6.523,13.328-15,14.335v7.113ZM50.8,22H47l-4,3-4-3H30l3-5h5l4,2,3-1h5.534C48.973,14.409,43.6,10.881,38,11c-6.646.141-11,5.858-11,10s4.516,9.141,13,9C47.178,29.88,50.075,25.771,50.8,22Z'
|
||||||
},
|
},
|
||||||
ElectricButterflyValve: {
|
ElectricButterflyValve: {
|
||||||
width: 39,
|
width: 39,
|
||||||
path: 'M38,24V44H1V24H18.237L18,21s-6.5.6-9-8C7.705,8.542,10.288,2,20,2S31.849,8.083,31,13c-1.586,9.183-9,8-9,8v3H38Zm-3,4.077L24,34a4.361,4.361,0,0,1-3,5c-3.052,1.215-7,0-7,0L9,41H35V28.077ZM25.872,17.466A6.259,6.259,0,0,0,29,12a18.6,18.6,0,0,0-1-4L25,5H16L12.511,7.279C10.464,8.908,11.044,14.092,11,10.9a10.963,10.963,0,0,0,2.23,5.284L14,7h2l3.181,6.95L23,7h2Zm-1.924.915L23.261,10.13,19.91,17H18l-2.341-5.907L15.1,17.8A8.481,8.481,0,0,0,20,19C17.855,19.073,20.85,19.478,23.948,18.38ZM4,27V39.556L12,36a6.888,6.888,0,0,1,3-7c4.261-2.736,8,1,8,1l6-3H4Z'
|
path: 'M38,24V44H1V24H18.237L18,21s-6.5.6-9-8C7.705,8.542,10.288,2,20,2S31.849,8.083,31,13c-1.586,9.183-9,8-9,8v3H38Zm-3,4.077L24,34a4.361,4.361,0,0,1-3,5c-3.052,1.215-7,0-7,0L9,41H35V28.077ZM25.872,17.466A6.259,6.259,0,0,0,29,12a18.6,18.6,0,0,0-1-4L25,5H16L12.511,7.279C10.464,8.908,11.044,14.092,11,10.9a10.963,10.963,0,0,0,2.23,5.284L14,7h2l3.181,6.95L23,7h2Zm-1.924.915L23.261,10.13,19.91,17H18l-2.341-5.907L15.1,17.8A8.481,8.481,0,0,0,20,19C17.855,19.073,20.85,19.478,23.948,18.38ZM4,27V39.556L12,36a6.888,6.888,0,0,1,3-7c4.261-2.736,8,1,8,1l6-3H4Z'
|
||||||
|
},
|
||||||
|
Cistern: {
|
||||||
|
width: 323,
|
||||||
|
path: 'M264,27v3l-13-5.353V31s-8.068-6-16-6c-8.067,0-16,6-16,6V26H207V84H167v28H135v6s-7.614-6-16-6c-8.11,0-17,6-17,6v-6H23.467L26,119,4,109l23-9-3.13,7H76V31h72V12h59v9h12V14s8.08,5,16,5c8.079,0,16-5,16-5v7.353L264,16v7h54v4H264ZM148,37H82v70h20V99s8.89,8,17,8c8.386,0,16-8,16-8v8h26V84H148V37Zm54-20H153V55h15.5s-5.715-3.318-4.5-15c0.657-6.32,9-9,9-9l22-10h7V17Zm0,9h-6l-13,5s8.644,5.651,8,13c-0.827,9.433-4.75,11-4.75,11H202V26Zm-25,8a9,9,0,1,1-9,9A9,9,0,0,1,177,34Z'
|
||||||
|
},
|
||||||
|
StaircaseOneWay: {
|
||||||
|
width: 51,
|
||||||
|
path: 'M51,71H0V0H12V15H23V-1h4V15H39V0H51V71ZM23,19H12v4H23V19Zm0,8H12v3H23V27Zm0,7H12v3H23V34Zm0,7H12v3H23V41Zm0,7H12v3H23V48Zm0,7H12v4H23V55ZM39,19H27v4H39V19Zm0,8H27v3H39V27Zm0,7H27v3H39V34Zm0,7H27v3H39V41Zm0,7H27v3H39V48Zm0,7H27v4H39V55ZM43,4V63H8V4H4V66H47V4H43Z'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ import SmookExhaustFd from './bas/smookExhaustFd';
|
|||||||
import StateTable from './stateTable';
|
import StateTable from './stateTable';
|
||||||
import LightingGroup from './lighting';
|
import LightingGroup from './lighting';
|
||||||
import ElectricButterflyValve from './bas/electricButterflyValve';
|
import ElectricButterflyValve from './bas/electricButterflyValve';
|
||||||
|
import Cistern from './bas/cistern';
|
||||||
|
|
||||||
const iscsShape = {};
|
const iscsShape = {};
|
||||||
iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton;
|
iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton;
|
||||||
@ -84,6 +85,7 @@ iscsShape[deviceType.StateTable] = StateTable;
|
|||||||
iscsShape[deviceType.LightingGroup] = LightingGroup;
|
iscsShape[deviceType.LightingGroup] = LightingGroup;
|
||||||
iscsShape[deviceType.BalancedElectric] = BalancedElectric;
|
iscsShape[deviceType.BalancedElectric] = BalancedElectric;
|
||||||
iscsShape[deviceType.ElectricButterflyValve] = ElectricButterflyValve;
|
iscsShape[deviceType.ElectricButterflyValve] = ElectricButterflyValve;
|
||||||
|
iscsShape[deviceType.Cistern] = Cistern;
|
||||||
|
|
||||||
function shapefactory(device, iscs) {
|
function shapefactory(device, iscs) {
|
||||||
const type = device.model._type;
|
const type = device.model._type;
|
||||||
|
@ -16,13 +16,30 @@ export default class Staircase extends Group {
|
|||||||
id: this.model.code,
|
id: this.model.code,
|
||||||
position: [this.model.point.x, this.model.point.y]
|
position: [this.model.point.x, this.model.point.y]
|
||||||
});
|
});
|
||||||
this.path = createPathSvg(this.model);
|
let model = {};
|
||||||
this.add(this.grouper);
|
let rotationAngle = this.model.rotationAngle;
|
||||||
if (this.model.isRight) {
|
if (this.model.oneWay) {
|
||||||
|
model = {
|
||||||
|
_type: 'StaircaseOneWay',
|
||||||
|
z:this.z,
|
||||||
|
zlevel:this.zlevel,
|
||||||
|
width: this.model.width,
|
||||||
|
fill: '#FFF'
|
||||||
|
};
|
||||||
|
rotationAngle = rotationAngle - 90;
|
||||||
|
this.grouper.origin = [this.model.width / 2, this.model.width * 0.718 / 2];
|
||||||
|
} else {
|
||||||
|
model = this.model;
|
||||||
this.grouper.origin = [this.model.width / 2, this.model.width * 1.368 / 2];
|
this.grouper.origin = [this.model.width / 2, this.model.width * 1.368 / 2];
|
||||||
this.grouper.scale = [-1, 1];
|
|
||||||
}
|
}
|
||||||
this.grouper.rotation = Math.PI / 180 * (this.model.rotationAngle || 0);
|
this.path = createPathSvg(model);
|
||||||
|
this.add(this.grouper);
|
||||||
|
if (this.model.isRight && !this.model.oneWay) {
|
||||||
|
this.grouper.scale = [-1, 1];
|
||||||
|
} else if (this.model.isRight && this.model.oneWay) {
|
||||||
|
this.grouper.scale = [1, -1];
|
||||||
|
}
|
||||||
|
this.grouper.rotation = Math.PI / 180 * (rotationAngle || 0);
|
||||||
this.grouper.add(this.path);
|
this.grouper.add(this.path);
|
||||||
}
|
}
|
||||||
setModel(dx, dy) {
|
setModel(dx, dy) {
|
||||||
|
@ -166,6 +166,9 @@ export function parser(data) {
|
|||||||
zrUtil.each(data.electricButterflyValveList || [], elem => {
|
zrUtil.each(data.electricButterflyValveList || [], elem => {
|
||||||
iscsDevice[elem.code] = deviceFactory(deviceType.ElectricButterflyValve, elem);
|
iscsDevice[elem.code] = deviceFactory(deviceType.ElectricButterflyValve, elem);
|
||||||
});
|
});
|
||||||
|
zrUtil.each(data.cisternList || [], elem => {
|
||||||
|
iscsDevice[elem.code] = deviceFactory(deviceType.Cistern, elem);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return iscsDevice;
|
return iscsDevice;
|
||||||
@ -311,6 +314,9 @@ export function updateIscsData(state, device) {
|
|||||||
case deviceType.ElectricButterflyValve:
|
case deviceType.ElectricButterflyValve:
|
||||||
updateIscsListByDevice(state, 'electricButterflyValveList', device);
|
updateIscsListByDevice(state, 'electricButterflyValveList', device);
|
||||||
break;
|
break;
|
||||||
|
case deviceType.Cistern:
|
||||||
|
updateIscsListByDevice(state, 'cisternList', device);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
// store.dispatch('iscs/setIscsData', state.iscs);
|
// store.dispatch('iscs/setIscsData', state.iscs);
|
||||||
}
|
}
|
||||||
|
@ -76,6 +76,7 @@ export function bindSimulationTrain(group,groupNumber) {
|
|||||||
params: ''
|
params: ''
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//EB紧急制动
|
||||||
export function trainSimulationEb(group,groupNumber) {
|
export function trainSimulationEb(group,groupNumber) {
|
||||||
return request({
|
return request({
|
||||||
url: `/simulation/driving/${group}/train/${groupNumber}/eb`,
|
url: `/simulation/driving/${group}/train/${groupNumber}/eb`,
|
||||||
@ -83,6 +84,8 @@ export function trainSimulationEb(group,groupNumber) {
|
|||||||
params: ''
|
params: ''
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//改变列车牵引/制动力
|
||||||
export function trainSimulationForce(group,groupNumber,percent) {
|
export function trainSimulationForce(group,groupNumber,percent) {
|
||||||
return request({
|
return request({
|
||||||
url: `/simulation/driving/${group}/train/${groupNumber}/force/${percent}`,
|
url: `/simulation/driving/${group}/train/${groupNumber}/force/${percent}`,
|
||||||
@ -90,6 +93,8 @@ export function trainSimulationForce(group,groupNumber,percent) {
|
|||||||
params: ''
|
params: ''
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//改变列车档位
|
||||||
export function trainSimulationGear(group,groupNumber,gear) {
|
export function trainSimulationGear(group,groupNumber,gear) {
|
||||||
return request({
|
return request({
|
||||||
url: `/simulation/driving/${group}/train/${groupNumber}/gear/${gear}`,
|
url: `/simulation/driving/${group}/train/${groupNumber}/gear/${gear}`,
|
||||||
@ -97,3 +102,30 @@ export function trainSimulationGear(group,groupNumber,gear) {
|
|||||||
params: ''
|
params: ''
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//改变列车运行级别
|
||||||
|
export function trainSimulationDriveMode(group,groupNumber,driveMode) {
|
||||||
|
return request({
|
||||||
|
url: `/simulation/driving/${group}/train/${groupNumber}/driveMode/${driveMode}`,
|
||||||
|
method: 'put',
|
||||||
|
params: ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//ATP切除
|
||||||
|
//ATO
|
||||||
|
export function trainSimulationAtp(group,groupNumber) {
|
||||||
|
return request({
|
||||||
|
url: `/simulation/driving/${group}/train/${groupNumber}/atp`,
|
||||||
|
method: 'put',
|
||||||
|
params: ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//ATO
|
||||||
|
export function trainSimulationAto(group,groupNumber) {
|
||||||
|
return request({
|
||||||
|
url: `/simulation/driving/${group}/train/${groupNumber}/openAto`,
|
||||||
|
method: 'put',
|
||||||
|
params: ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -94,6 +94,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
|
|||||||
// 对象化数据
|
// 对象化数据
|
||||||
|
|
||||||
let data = JSON.parse(Response.body);
|
let data = JSON.parse(Response.body);
|
||||||
|
|
||||||
// 遍历后台数据
|
// 遍历后台数据
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
if(data.type == "Train_Position"){
|
if(data.type == "Train_Position"){
|
||||||
|
@ -3,14 +3,14 @@ import { getBaseUrl } from '@/utils/baseUrl'
|
|||||||
import { getToken } from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
|
|
||||||
// 定于仿真socket接口
|
// 定于仿真socket接口
|
||||||
export function PassflowConnect(nowstation,deviceaction,lefttrain,righttrain,routegroup) {
|
export function PassflowConnect(nowstation,deviceaction,toptrain,downtrain,routegroup) {
|
||||||
const scope = this;
|
const scope = this;
|
||||||
|
|
||||||
this.controlstation = nowstation;
|
this.controlstation = nowstation;
|
||||||
this.teststomp = new StompClient();
|
this.teststomp = new StompClient();
|
||||||
|
|
||||||
let trainleftnow = null;
|
let traintopnow = null;
|
||||||
let trainrightnow = null;
|
let traindownnow = null;
|
||||||
let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||||
let header = {'X-Token': getToken() };
|
let header = {'X-Token': getToken() };
|
||||||
|
|
||||||
@ -37,19 +37,7 @@ export function PassflowConnect(nowstation,deviceaction,lefttrain,righttrain,rou
|
|||||||
if(data.body.type == "PSD"){
|
if(data.body.type == "PSD"){
|
||||||
if(data.body.code == nowstation.toppsd){
|
if(data.body.code == nowstation.toppsd){
|
||||||
if(data.body.open == 0){
|
if(data.body.open == 0){
|
||||||
deviceaction.down.action.reset();
|
|
||||||
deviceaction.down.action.time = deviceaction.down.action._clip.duration;
|
|
||||||
deviceaction.down.action.timeScale = -1;
|
|
||||||
deviceaction.down.action.play();
|
|
||||||
}else{
|
|
||||||
deviceaction.down.action.reset();
|
|
||||||
deviceaction.down.action.time = 0;
|
|
||||||
deviceaction.down.action.timeScale = 1;
|
|
||||||
deviceaction.down.action.play();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(data.body.code == nowstation.downpsd){
|
|
||||||
if(data.body.open == 0){
|
|
||||||
deviceaction.top.action.reset();
|
deviceaction.top.action.reset();
|
||||||
deviceaction.top.action.time =deviceaction.top.action._clip.duration;
|
deviceaction.top.action.time =deviceaction.top.action._clip.duration;
|
||||||
deviceaction.top.action.timeScale = -1;
|
deviceaction.top.action.timeScale = -1;
|
||||||
@ -61,25 +49,133 @@ export function PassflowConnect(nowstation,deviceaction,lefttrain,righttrain,rou
|
|||||||
deviceaction.top.action.play();
|
deviceaction.top.action.play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(data.body.code == nowstation.downpsd){
|
||||||
|
if(data.body.open == 0){
|
||||||
|
deviceaction.down.action.reset();
|
||||||
|
deviceaction.down.action.time = deviceaction.down.action._clip.duration;
|
||||||
|
deviceaction.down.action.timeScale = -1;
|
||||||
|
deviceaction.down.action.play();
|
||||||
|
}else{
|
||||||
|
deviceaction.down.action.reset();
|
||||||
|
deviceaction.down.action.time = 0;
|
||||||
|
deviceaction.down.action.timeScale = 1;
|
||||||
|
deviceaction.down.action.play();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(data.body.type == "TRAIN_DOOR"){
|
if(data.body.type == "TRAIN_DOOR"){
|
||||||
|
if(traintopnow == data.body.code){
|
||||||
|
|
||||||
|
if(data.body.open == "0"){
|
||||||
|
closetraindoor(toptrain,data.body.doorCode,"top");
|
||||||
|
|
||||||
|
}else{
|
||||||
|
opentraindoor(toptrain,data.body.doorCode,"top");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(traindownnow == data.body.code){
|
||||||
|
// console.log(data.body);
|
||||||
|
if(data.body.open == "0"){
|
||||||
|
closetraindoor(downtrain,data.body.doorCode,"down");
|
||||||
|
|
||||||
|
}else{
|
||||||
|
opentraindoor(downtrain,data.body.doorCode,"down");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data.type == "TrainRun_3D"){
|
if(data.type == "TrainRun_3D"){
|
||||||
console.log(data.body);
|
|
||||||
console.log(nowstation);
|
|
||||||
for(let i=0,leni = data.body.length;i<leni;i++){
|
for(let i=0,leni = data.body.length;i<leni;i++){
|
||||||
if(data.body[i].section == scope.controlstation.topsection){
|
if(data.body[i].section == scope.controlstation.topsection){
|
||||||
|
console.log("top:"+data.body[i].offset);
|
||||||
|
if(traintopnow != data.body[i].code){
|
||||||
|
traintopnow = data.body[i].code;
|
||||||
|
}
|
||||||
|
toptrain.position.copy(toptrain.curve.getPointAt(data.body[i].offset));
|
||||||
|
|
||||||
|
// toptrain.position
|
||||||
|
// if(){
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
}else{
|
||||||
|
if(traindownnow == data.body[i].code){
|
||||||
|
toptrain.position.x -= 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(data.body[i].section == scope.controlstation.downsection){
|
|
||||||
|
|
||||||
|
if(data.body[i].section == scope.controlstation.downsection){
|
||||||
|
console.log("down:"+data.body[i].offset);
|
||||||
|
if(traindownnow != data.body[i].code){
|
||||||
|
traindownnow = data.body[i].code;
|
||||||
|
}
|
||||||
|
|
||||||
|
downtrain.position.copy(downtrain.curve.getPointAt(data.body[i].offset));
|
||||||
|
|
||||||
|
}else{
|
||||||
|
if(traindownnow == data.body[i].code){
|
||||||
|
downtrain.position.x += 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
}
|
}
|
||||||
|
let actions;
|
||||||
|
|
||||||
|
function opentraindoor(train,doorcode,direct){
|
||||||
|
if(direct == "top"){
|
||||||
|
if(doorcode == "1"){
|
||||||
|
actions = train.action.down;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(doorcode == "2"){
|
||||||
|
actions = train.action.top;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(doorcode == "1"){
|
||||||
|
actions = train.action.top;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(doorcode == "2"){
|
||||||
|
actions = train.action.down;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(let an=actions.length-1;an>=0;an--){
|
||||||
|
actions[an].reset();
|
||||||
|
actions[an].time = 0;
|
||||||
|
actions[an].timeScale = 1;
|
||||||
|
actions[an].play();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function closetraindoor(train,doorcode,direct){
|
||||||
|
if(direct == "top"){
|
||||||
|
if(doorcode == "1"){
|
||||||
|
actions = train.action.down;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(doorcode == "2"){
|
||||||
|
actions = train.action.top;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(doorcode == "1"){
|
||||||
|
actions = train.action.top;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(doorcode == "2"){
|
||||||
|
actions = train.action.down;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(let an=actions.length-1;an>=0;an--){
|
||||||
|
actions[an].reset();
|
||||||
|
actions[an].time = actions[an]._clip.duration;
|
||||||
|
actions[an].timeScale = -1;
|
||||||
|
actions[an].play();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,8 +41,8 @@ let originhuman1 = null;
|
|||||||
let originhuman2 = null;
|
let originhuman2 = null;
|
||||||
let originanima1 = null;
|
let originanima1 = null;
|
||||||
let originanima2 = null;
|
let originanima2 = null;
|
||||||
let lefttrain = null;
|
let toptrain = null;
|
||||||
let righttrain = null;
|
let downtrain = null;
|
||||||
let zhajiin = [];
|
let zhajiin = [];
|
||||||
let zhajiout = [];
|
let zhajiout = [];
|
||||||
|
|
||||||
@ -395,9 +395,9 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
|||||||
|
|
||||||
|
|
||||||
getPublishMapDetail(skinCode).then(netdata => {
|
getPublishMapDetail(skinCode).then(netdata => {
|
||||||
console.log(netdata);
|
// console.log(netdata);
|
||||||
initstationlist(netdata.data.stationList,netdata.data.stationStandList,netdata.data.psdList);
|
initstationlist(netdata.data.stationList,netdata.data.stationStandList,netdata.data.psdList);
|
||||||
socktest = new PassflowConnect(nowstation,deviceaction,lefttrain,righttrain,routegroup);
|
socktest = new PassflowConnect(nowstation,deviceaction,toptrain,downtrain,routegroup);
|
||||||
});
|
});
|
||||||
|
|
||||||
animate();
|
animate();
|
||||||
@ -815,7 +815,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
|||||||
// console.log(humanlist.children.length);
|
// console.log(humanlist.children.length);
|
||||||
}
|
}
|
||||||
function initstationlist(stationdata,standdata,psddata){
|
function initstationlist(stationdata,standdata,psddata){
|
||||||
|
// console.log(standdata);
|
||||||
let list = [];
|
let list = [];
|
||||||
for(let i=0,leni = standdata.length;i<leni;i++){
|
for(let i=0,leni = standdata.length;i<leni;i++){
|
||||||
for(let j=0,lenj = psddata.length;j<lenj;j++){
|
for(let j=0,lenj = psddata.length;j<lenj;j++){
|
||||||
@ -846,7 +846,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
|||||||
topsection:null,
|
topsection:null,
|
||||||
downsection:null,
|
downsection:null,
|
||||||
};
|
};
|
||||||
if(list[k][0].position.y>list[k][1].position.y){
|
if(list[k][0].position.y<list[k][1].position.y){
|
||||||
stationobject.toppsd = list[k][0].name;
|
stationobject.toppsd = list[k][0].name;
|
||||||
stationobject.downpsd = list[k][1].name;
|
stationobject.downpsd = list[k][1].name;
|
||||||
stationobject.topsection = list[k][0].standTrackCode;
|
stationobject.topsection = list[k][0].standTrackCode;
|
||||||
@ -864,7 +864,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
|||||||
|
|
||||||
nowstation = stationlist[0];
|
nowstation = stationlist[0];
|
||||||
updatestationlist(stationlist);
|
updatestationlist(stationlist);
|
||||||
console.log(nowstation);
|
// console.log(nowstation);
|
||||||
}
|
}
|
||||||
function inittrain(object){
|
function inittrain(object){
|
||||||
let ntracks1,ntracks2,tclip,fclip;
|
let ntracks1,ntracks2,tclip,fclip;
|
||||||
@ -879,23 +879,40 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
lefttrain = object.clone(true);
|
toptrain = object.clone(true);
|
||||||
lefttrain.action = {
|
toptrain.action = {
|
||||||
top:[],
|
top:[],
|
||||||
down:[]
|
down:[]
|
||||||
};
|
};
|
||||||
|
let points1 = [];
|
||||||
|
points1.push(new THREE.Vector3(-71,0.06,-6.3));
|
||||||
|
points1.push(new THREE.Vector3(60.73,0.06,-6.3));
|
||||||
|
|
||||||
righttrain = object.clone(true);
|
|
||||||
righttrain.action = {
|
toptrain.curve = new THREE.CatmullRomCurve3(points1);
|
||||||
|
|
||||||
|
downtrain = object.clone(true);
|
||||||
|
downtrain.action = {
|
||||||
top:[],
|
top:[],
|
||||||
down:[]
|
down:[]
|
||||||
};
|
};
|
||||||
inittrainanimation(lefttrain,tclip,fclip);
|
let points2 = [];
|
||||||
inittrainanimation(righttrain,tclip,fclip);
|
points2.push(new THREE.Vector3(-71,0.06,28.68));
|
||||||
lefttrain.position.z = 30;
|
points2.push(new THREE.Vector3(60.73,0.06,28.68));
|
||||||
righttrain.position.z = -10;
|
downtrain.curve = new THREE.CatmullRomCurve3(points2);
|
||||||
// scene.add(lefttrain);
|
|
||||||
// scene.add(righttrain);
|
|
||||||
|
inittrainanimation(toptrain,tclip,fclip);
|
||||||
|
inittrainanimation(downtrain,tclip,fclip);
|
||||||
|
|
||||||
|
|
||||||
|
toptrain.position.z = -20;
|
||||||
|
toptrain.position.y = -20000;
|
||||||
|
toptrain.rotation.y = Math.PI;
|
||||||
|
downtrain.position.z = 40;
|
||||||
|
downtrain.position.y = -20000;
|
||||||
|
scene.add(toptrain);
|
||||||
|
scene.add(downtrain);
|
||||||
}
|
}
|
||||||
|
|
||||||
function inittrainanimation(train,tclip,fclip){
|
function inittrainanimation(train,tclip,fclip){
|
||||||
@ -960,6 +977,11 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
|||||||
for(let j=0;j<object.children.length;j++){
|
for(let j=0;j<object.children.length;j++){
|
||||||
|
|
||||||
if(object.children[j].name == "top"){
|
if(object.children[j].name == "top"){
|
||||||
|
// var geometry = new THREE.BoxBufferGeometry( 50, 50, 50 );
|
||||||
|
// var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
|
||||||
|
// var cube = new THREE.Mesh( geometry, material );
|
||||||
|
// cube.position.copy(object.children[j].position);
|
||||||
|
// scene.add( cube );
|
||||||
object.children[j].animations = [];
|
object.children[j].animations = [];
|
||||||
object.children[j].animations.push(newclip.clone());
|
object.children[j].animations.push(newclip.clone());
|
||||||
|
|
||||||
|
@ -57,6 +57,30 @@ let standtop = {
|
|||||||
type : "stand",
|
type : "stand",
|
||||||
stage : "3",
|
stage : "3",
|
||||||
randompoint : new THREE.Vector3(-64,1.77,0.38),
|
randompoint : new THREE.Vector3(-64,1.77,0.38),
|
||||||
|
doorpoints:[
|
||||||
|
new THREE.Vector3(-62.84,1.77,-4.38),
|
||||||
|
new THREE.Vector3(-58.11,1.77,-4.38),
|
||||||
|
new THREE.Vector3(-53.47,1.77,-4.38),
|
||||||
|
new THREE.Vector3(-45.45,1.77,-4.38),
|
||||||
|
new THREE.Vector3(-41.1,1.77,-4.38),
|
||||||
|
new THREE.Vector3(-36.33,1.77,-4.38),
|
||||||
|
new THREE.Vector3(-31.5,1.77,-4.38),
|
||||||
|
new THREE.Vector3(-23.65,1.77,-4.38),
|
||||||
|
new THREE.Vector3(-18.98,1.77,-4.38),
|
||||||
|
new THREE.Vector3(-14.46,1.77,-4.38),
|
||||||
|
new THREE.Vector3(-10,1.77,-4.38),
|
||||||
|
new THREE.Vector3(-2.2,1.77,-4.38),
|
||||||
|
new THREE.Vector3(2.49,1.77,-4.38),
|
||||||
|
new THREE.Vector3(7.17,1.77,-4.38),
|
||||||
|
new THREE.Vector3(11.8,1.77,-4.38),
|
||||||
|
new THREE.Vector3(19.41,1.77,-4.38),
|
||||||
|
new THREE.Vector3(24.09,1.77,-4.38),
|
||||||
|
new THREE.Vector3(28.72,1.77,-4.38),
|
||||||
|
new THREE.Vector3(33.46,1.77,-4.38),
|
||||||
|
new THREE.Vector3(41.24,1.77,-4.38),
|
||||||
|
new THREE.Vector3(45.82,1.77,-4.38),
|
||||||
|
new THREE.Vector3(50.69,1.77,-4.38)
|
||||||
|
],
|
||||||
railpoints : [
|
railpoints : [
|
||||||
new THREE.Vector3(52.1,1.77,-1.8),
|
new THREE.Vector3(52.1,1.77,-1.8),
|
||||||
new THREE.Vector3(-63.5,1.77,-1.8)
|
new THREE.Vector3(-63.5,1.77,-1.8)
|
||||||
@ -69,6 +93,30 @@ let standdown = {
|
|||||||
type : "stand",
|
type : "stand",
|
||||||
stage : "3",
|
stage : "3",
|
||||||
randompoint : new THREE.Vector3(-64,1.77,21),
|
randompoint : new THREE.Vector3(-64,1.77,21),
|
||||||
|
doorpoints:[
|
||||||
|
new THREE.Vector3(-62.84,1.77,27),
|
||||||
|
new THREE.Vector3(-58.11,1.77,27),
|
||||||
|
new THREE.Vector3(-53.47,1.77,27),
|
||||||
|
new THREE.Vector3(-45.45,1.77,27),
|
||||||
|
new THREE.Vector3(-41.1,1.77,27),
|
||||||
|
new THREE.Vector3(-36.33,1.77,27),
|
||||||
|
new THREE.Vector3(-31.5,1.77,27),
|
||||||
|
new THREE.Vector3(-23.65,1.77,27),
|
||||||
|
new THREE.Vector3(-18.98,1.77,27),
|
||||||
|
new THREE.Vector3(-14.46,1.77,27),
|
||||||
|
new THREE.Vector3(-10,1.77,27),
|
||||||
|
new THREE.Vector3(-2.2,1.77,27),
|
||||||
|
new THREE.Vector3(2.49,1.77,27),
|
||||||
|
new THREE.Vector3(7.17,1.77,27),
|
||||||
|
new THREE.Vector3(11.8,1.77,27),
|
||||||
|
new THREE.Vector3(19.41,1.77,27),
|
||||||
|
new THREE.Vector3(24.09,1.77,27),
|
||||||
|
new THREE.Vector3(28.72,1.77,27),
|
||||||
|
new THREE.Vector3(33.46,1.77,27),
|
||||||
|
new THREE.Vector3(41.24,1.77,27),
|
||||||
|
new THREE.Vector3(45.82,1.77,27),
|
||||||
|
new THREE.Vector3(50.69,1.77,27)
|
||||||
|
],
|
||||||
railpoints : [
|
railpoints : [
|
||||||
new THREE.Vector3(52.1,1.77,24),
|
new THREE.Vector3(52.1,1.77,24),
|
||||||
new THREE.Vector3(-64,1.77,24)
|
new THREE.Vector3(-64,1.77,24)
|
||||||
|
@ -412,10 +412,13 @@ class SkinCode extends defaultStyle {
|
|||||||
spareColor: '#5b5b5b' // 区段显示颜色
|
spareColor: '#5b5b5b' // 区段显示颜色
|
||||||
},
|
},
|
||||||
core: {
|
core: {
|
||||||
length: 6 // 道岔单边长度
|
length: 6, // 道岔单边长度
|
||||||
|
graphShow: true // 图形显示
|
||||||
},
|
},
|
||||||
jointImg: { // 道岔 A B C D四元素属性配置
|
jointImg: { // 道岔 A B C D四元素属性配置
|
||||||
trapezoidLength: 8 // 直角梯形元素默认长度
|
trapezoidLength: 8, // 直角梯形元素默认长度
|
||||||
|
fork: true, // 挤岔专用(如有挤岔操作 变为true)
|
||||||
|
forKColor: 'red' // 挤岔颜色 配合挤岔专用
|
||||||
},
|
},
|
||||||
arcBlcok: { // 圆形封锁图形
|
arcBlcok: { // 圆形封锁图形
|
||||||
show: false, // 显示
|
show: false, // 显示
|
||||||
|
@ -395,7 +395,6 @@ class Signal extends Group {
|
|||||||
this.cbtcStatus = '';
|
this.cbtcStatus = '';
|
||||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
|
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
|
||||||
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor);
|
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor);
|
||||||
this.virtualSignal && this.virtualSignal.setColor(this.style.Signal.lamp.redColor);
|
|
||||||
if (this.style.Signal.lamp.guidName === 'doubleAndBase') { // 设置底座颜色
|
if (this.style.Signal.lamp.guidName === 'doubleAndBase') { // 设置底座颜色
|
||||||
this.sigPost.setColor('#00FF00');
|
this.sigPost.setColor('#00FF00');
|
||||||
if (this.model.logicLight) { // 设置哈尔滨逻辑点灯 颜色
|
if (this.model.logicLight) { // 设置哈尔滨逻辑点灯 颜色
|
||||||
@ -565,6 +564,7 @@ class Signal extends Group {
|
|||||||
this.sigBack && this.sigBack.hide();
|
this.sigBack && this.sigBack.hide();
|
||||||
this.sigBack && this.sigBack.stopAnimation(false);
|
this.sigBack && this.sigBack.stopAnimation(false);
|
||||||
this.lamps && this.lamps[0].setAnimationEnd();
|
this.lamps && this.lamps[0].setAnimationEnd();
|
||||||
|
this.virtualSignal && this.virtualSignal.setColor(this.style.Signal.lamp.redColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
setState(model) {
|
setState(model) {
|
||||||
@ -588,7 +588,7 @@ class Signal extends Group {
|
|||||||
model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(model.logicLight); // 信号关闭
|
model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(model.logicLight); // 信号关闭
|
||||||
model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(model.logicLight); // 信号正向开放
|
model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(model.logicLight); // 信号正向开放
|
||||||
model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(model.logicLight); // 信号侧向开放
|
model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(model.logicLight); // 信号侧向开放
|
||||||
|
|
||||||
// 联锁自动进路通过
|
// 联锁自动进路通过
|
||||||
model.fleetMode && this.setAutoRouteOpen();
|
model.fleetMode && this.setAutoRouteOpen();
|
||||||
// 联锁自动触发
|
// 联锁自动触发
|
||||||
|
@ -45,6 +45,10 @@ class ESwLocal extends Group {
|
|||||||
this.locShelter.stopAnimation(flag);
|
this.locShelter.stopAnimation(flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setColor(color) {
|
||||||
|
this.locShelter.setStyle({ fill: color });
|
||||||
|
}
|
||||||
|
|
||||||
animateStyle(cb) {
|
animateStyle(cb) {
|
||||||
this.eachChild((child) => {
|
this.eachChild((child) => {
|
||||||
cb(child);
|
cb(child);
|
||||||
|
@ -283,19 +283,18 @@ export default class Switch extends Group {
|
|||||||
this.lockArc.hide(); // 圆形单锁框
|
this.lockArc.hide(); // 圆形单锁框
|
||||||
this.name.getNameText().stopAnimation(false);
|
this.name.getNameText().stopAnimation(false);
|
||||||
this.sheltertriangle.hide(); // 直角梯形覆盖图形
|
this.sheltertriangle.hide(); // 直角梯形覆盖图形
|
||||||
this.rhomboid.stopAnimation(false);
|
this.rhomboid.stopAnimation(false); // 平行四边形
|
||||||
this.releaseBackground.hide();
|
this.releaseBackground.hide();
|
||||||
this.setHasTextBorder(0);
|
this.setHasTextBorder(0);
|
||||||
this.locShelter.hide(); // 定位覆盖图形
|
this.locShelter.hide(); // 定位覆盖图形
|
||||||
this.relocShelter.hide(); // 反位覆盖图形
|
this.relocShelter.hide(); // 反位覆盖图形
|
||||||
this.enabledName.hide(); // 使能隐藏
|
this.enabledName.hide(); // 使能隐藏
|
||||||
this.lossShow && this.lossShow.hide();
|
this.lossShow && this.lossShow.hide(); // 道岔失去矩形
|
||||||
this.lossShow && this.lossShow.stopAnimation(false);
|
this.lossShow && this.lossShow.stopAnimation(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 定位*/
|
/** 定位*/
|
||||||
setLocationAction() {
|
setLocationAction() {
|
||||||
// this.recover();
|
|
||||||
if (this.style.Switch.core.splice) {
|
if (this.style.Switch.core.splice) {
|
||||||
this.locShelter.hide();
|
this.locShelter.hide();
|
||||||
} else {
|
} else {
|
||||||
@ -303,12 +302,17 @@ export default class Switch extends Group {
|
|||||||
}
|
}
|
||||||
this.relocShelter.hide();
|
this.relocShelter.hide();
|
||||||
this.rhomboid.hide();
|
this.rhomboid.hide();
|
||||||
|
if (this.style.Switch.core.graphShow) { // 佛山线路显示
|
||||||
|
this.relocShelter.show();
|
||||||
|
this.rhomboid.show();
|
||||||
|
this.relocShelter.setColor('#00FF00');
|
||||||
|
this.rhomboid.setColor('#00FF00');
|
||||||
|
}
|
||||||
this.setTextColor(this.style.Switch.text.locateColor);
|
this.setTextColor(this.style.Switch.text.locateColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 反位*/
|
/** 反位*/
|
||||||
setInversionAction() {
|
setInversionAction() {
|
||||||
// this.recover();
|
|
||||||
this.setTextColor(this.style.Switch.text.inversionColor);
|
this.setTextColor(this.style.Switch.text.inversionColor);
|
||||||
if (this.style.Switch.core.splice) {
|
if (this.style.Switch.core.splice) {
|
||||||
this.relocShelter.hide();
|
this.relocShelter.hide();
|
||||||
@ -318,11 +322,15 @@ export default class Switch extends Group {
|
|||||||
this.locShelter.hide(); // 定位
|
this.locShelter.hide(); // 定位
|
||||||
this.rhomboid.show(); // 平行四边形
|
this.rhomboid.show(); // 平行四边形
|
||||||
this.setSectionState(this.rhomboid.getSection(), 'fill', this.model);
|
this.setSectionState(this.rhomboid.getSection(), 'fill', this.model);
|
||||||
|
if (this.style.Switch.core.graphShow) { // 佛山线路显示
|
||||||
|
this.locShelter.show();
|
||||||
|
this.locShelter.setColor('#FFFF00');
|
||||||
|
this.rhomboid.setColor('#FFFF00');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 失去*/
|
/** 失去*/
|
||||||
setLossAction() {
|
setLossAction() {
|
||||||
// this.recover();
|
|
||||||
this.locShelter.show();
|
this.locShelter.show();
|
||||||
this.relocShelter.show();
|
this.relocShelter.show();
|
||||||
this.rhomboid.hide();
|
this.rhomboid.hide();
|
||||||
@ -376,6 +384,7 @@ export default class Switch extends Group {
|
|||||||
.when(2000, { fill: this.style.backgroundColor })
|
.when(2000, { fill: this.style.backgroundColor })
|
||||||
.start();
|
.start();
|
||||||
});
|
});
|
||||||
|
this.setTextColor('red');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -402,7 +411,6 @@ export default class Switch extends Group {
|
|||||||
/** 封锁 */
|
/** 封锁 */
|
||||||
block() {
|
block() {
|
||||||
if (this.style.Switch.jointImg.block) {
|
if (this.style.Switch.jointImg.block) {
|
||||||
// this.recover();
|
|
||||||
this.relocShelter.show();
|
this.relocShelter.show();
|
||||||
this.relocShelter.animateStyle(item => {
|
this.relocShelter.animateStyle(item => {
|
||||||
item.animateStyle(true)
|
item.animateStyle(true)
|
||||||
@ -517,18 +525,15 @@ export default class Switch extends Group {
|
|||||||
} else if (model.reversePosition) {
|
} else if (model.reversePosition) {
|
||||||
this.setInversionAction(model); /** 反位*/
|
this.setInversionAction(model); /** 反位*/
|
||||||
} else {
|
} else {
|
||||||
this.setLossAction();
|
this.setLossAction(); // 失去
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 道岔单锁 */
|
model.singleLock && this.setMonolock(); // 道岔单锁
|
||||||
model.singleLock && this.setMonolock();
|
model.blockade && this.block(); // 道岔封锁
|
||||||
/** 道岔封锁 */
|
|
||||||
model.blockade && this.block();
|
|
||||||
model.singleLock && model.blockade && this.blockMonolock(); // 单锁&锁闭状态
|
model.singleLock && model.blockade && this.blockMonolock(); // 单锁&锁闭状态
|
||||||
/** 区段切除*/
|
|
||||||
// this.setForkAction(); // 道岔挤岔完成
|
// this.setForkAction(); // 道岔挤岔
|
||||||
// 道岔使能显示
|
model.isCiConfirm && this.setCiConfirm(); // 道岔使能显示
|
||||||
model.isCiConfirm && this.setCiConfirm();
|
|
||||||
this.setSwitchFault(model.split);
|
this.setSwitchFault(model.split);
|
||||||
model.cutOff && this.setSwitchCutOff();
|
model.cutOff && this.setSwitchCutOff();
|
||||||
if (this.style.Switch.sectionAction.flag) { // 哈尔滨线路处理道岔相关区段颜色
|
if (this.style.Switch.sectionAction.flag) { // 哈尔滨线路处理道岔相关区段颜色
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="isShowBtn" class="menu" style="height: 45px;" :style="{left: point.x+'px', top: point.y+'px' }">
|
<div v-if="isShowBtn" menuButtonclass="menu menuButton" style="height: 45px;" :style="{left: point.x+'px', bottom: point.y+'px' }">
|
||||||
<button
|
<button
|
||||||
:id="Signal.arrangementRoute.button.domId"
|
:id="Signal.arrangementRoute.button.domId"
|
||||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||||
@ -257,8 +257,8 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
point: {
|
point: {
|
||||||
x: -1000,
|
x: 0,
|
||||||
y: -1000
|
y: 15
|
||||||
},
|
},
|
||||||
operation: '0',
|
operation: '0',
|
||||||
buttonName: '',
|
buttonName: '',
|
||||||
@ -302,18 +302,13 @@ export default {
|
|||||||
'$store.state.menuOperation.selectedCount': function (val) {
|
'$store.state.menuOperation.selectedCount': function (val) {
|
||||||
this.selectedChange();
|
this.selectedChange();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.resetPosition();
|
this.resetPosition();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
resetPosition() {
|
resetPosition() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const canvasOffset = this.$store.state.config.canvasOffset;
|
|
||||||
this.point = {
|
|
||||||
x: canvasOffset.x + 20,
|
|
||||||
y: canvasOffset.y + this.$store.state.config.height - 65
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="isShowBtn" class="menu" style="height: 45px;" :style="{left: point.x+'px', top: point.y+'px' }">
|
<div v-if="isShowBtn" class="menu menuButton" style="height:45px;" :style="{left: point.x+'px', bottom: point.y+'px' }">
|
||||||
<button
|
<button
|
||||||
:id="Signal.cancelTrainRoute.button.domId"
|
:id="Signal.cancelTrainRoute.button.domId"
|
||||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||||
@ -254,8 +254,8 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
point: {
|
point: {
|
||||||
x: -1000,
|
x: 5,
|
||||||
y: -1000
|
y: 15
|
||||||
},
|
},
|
||||||
operation: '0',
|
operation: '0',
|
||||||
buttonName: '',
|
buttonName: '',
|
||||||
@ -297,11 +297,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
resetPosition() {
|
resetPosition() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const canvasOffset = this.$store.state.config.canvasOffset;
|
|
||||||
this.point = {
|
|
||||||
x: canvasOffset.x + 20,
|
|
||||||
y: canvasOffset.y + this.$store.state.config.height - 65
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="menuButton">
|
<div id="menuButton" class="menuButton">
|
||||||
<div class="haerbin-01__systerm button">
|
<div class="haerbin-01__systerm button">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
|
@ -218,7 +218,7 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
over: true,
|
over: true,
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation,
|
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
cmdType: CMD.Signal.CMD_SIGNAL_FORCE_CANCEL_ROUTE
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -96,7 +96,7 @@ export default {
|
|||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.confirm.operation
|
operation: OperationEvent.Command.close.confirm.operation
|
||||||
};
|
};
|
||||||
|
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
@ -115,7 +115,10 @@ export default {
|
|||||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
|
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
|
||||||
} else if (this.operation == OperationEvent.StationControl.emergencyStationControl.menu.operation) {
|
} else if (this.operation == OperationEvent.StationControl.emergencyStationControl.menu.operation) {
|
||||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
|
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
|
||||||
|
} else if (this.operation == OperationEvent.StationControl.forcedStationControl.menu.operation) {
|
||||||
|
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL;
|
||||||
}
|
}
|
||||||
|
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
|
@ -92,7 +92,7 @@ export default {
|
|||||||
count: 0,
|
count: 0,
|
||||||
flagListBit: [],
|
flagListBit: [],
|
||||||
backOperate: '',
|
backOperate: '',
|
||||||
timeout: 61,
|
timeout: 55,
|
||||||
counts: 0
|
counts: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -157,17 +157,22 @@ export default {
|
|||||||
'$store.state.socket.msgHead': function (elem) {
|
'$store.state.socket.msgHead': function (elem) {
|
||||||
if (elem) {
|
if (elem) {
|
||||||
this.flagListBit[this.selection.forEach(elem => { return elem.stationControlCode == elem.code; })] = false;
|
this.flagListBit[this.selection.forEach(elem => { return elem.stationControlCode == elem.code; })] = false;
|
||||||
if (elem.hasOwnProperty('timeout')) {
|
if (elem.hasOwnProperty('success')) {
|
||||||
this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.acceptConversionResponseTimeout') }, false);
|
if (elem.success) {
|
||||||
} else if (elem.hasOwnProperty('agree')) {
|
(elem.stationCodes || []).forEach(code => {
|
||||||
if (elem.agree) {
|
this.updateTableValue(code, { result: this.$t('menu.menuDialog.controlModeTransfersuccees') }, true);
|
||||||
this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.controlModeTransfersuccees') }, true);
|
this.removeSelection(code);
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.controlModeTransferFailed') }, false);
|
(elem.stationCodes || []).forEach(code => {
|
||||||
|
this.updateTableValue(code, { result: this.$t('menu.menuDialog.controlModeTransferFailed') }, false);
|
||||||
|
this.removeSelection(code);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
this.$store.dispatch('socket/shiftMsgQueue');
|
||||||
|
this.disabledClose = false;
|
||||||
|
this.disabledSure = false;
|
||||||
}
|
}
|
||||||
this.disabledClose = false;
|
|
||||||
this.disabledSure = false;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
backOperate: function (operate) {
|
backOperate: function (operate) {
|
||||||
@ -327,11 +332,20 @@ export default {
|
|||||||
this.timer = null;
|
this.timer = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
removeSelection(code) {
|
||||||
|
let selectionIndex = -1;
|
||||||
|
this.selection.forEach((item, index) => {
|
||||||
|
if (item.code === code) {
|
||||||
|
selectionIndex = index;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (selectionIndex > -1) {
|
||||||
|
this.selection.splice(selectionIndex, 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
setRequestTimeout(elem) {
|
setRequestTimeout(elem) {
|
||||||
elem['count'] = 0;
|
this.updateTableValue(elem.code, { result: this.$t('menu.menuDialog.acceptConversionResponseTimeout') }, false);
|
||||||
this.$store.dispatch('socket/pushMsgQueue',
|
this.removeSelection(elem.code);
|
||||||
{ type: 'resp', timeout: 'true', stationControlCode: elem.code }
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
handleChooseChange(selection) {
|
handleChooseChange(selection) {
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
@ -450,12 +464,13 @@ export default {
|
|||||||
this.backOperate = operate;
|
this.backOperate = operate;
|
||||||
if (operate.cancel) {
|
if (operate.cancel) {
|
||||||
this.disabledSure = this.disabledSend = false;
|
this.disabledSure = this.disabledSend = false;
|
||||||
|
this.disabledClose = false;
|
||||||
}
|
}
|
||||||
if (operate.commit || operate.timeout) {
|
if (operate.commit || operate.timeout) {
|
||||||
this.disabledSend = this.disabledSure = true;
|
this.disabledSend = this.disabledSure = true;
|
||||||
|
this.disabledClose = true;
|
||||||
}
|
}
|
||||||
this.setTimer();
|
this.setTimer();
|
||||||
this.disabledClose = true;
|
|
||||||
this.counts = 1;
|
this.counts = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ export default {
|
|||||||
{
|
{
|
||||||
label: '进路取消',
|
label: '进路取消',
|
||||||
handler: this.cancelTrainRoute,
|
handler: this.cancelTrainRoute,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
cmdType: CMD.Signal.CMD_SIGNAL_FORCE_CANCEL_ROUTE
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '信号封锁',
|
label: '信号封锁',
|
||||||
@ -131,7 +131,7 @@ export default {
|
|||||||
{
|
{
|
||||||
label: '进路取消',
|
label: '进路取消',
|
||||||
handler: this.cancelTrainRoute,
|
handler: this.cancelTrainRoute,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
cmdType: CMD.Signal.CMD_SIGNAL_FORCE_CANCEL_ROUTE
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '信号封锁',
|
label: '信号封锁',
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
import {getMemberInfo} from '@/api/simulation';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RequestControl',
|
name: 'RequestControl',
|
||||||
@ -75,24 +76,24 @@ export default {
|
|||||||
disabledRefuse: false,
|
disabledRefuse: false,
|
||||||
requestInfo: this.$t('menu.passiveDialog.dispatcherWorkstation'),
|
requestInfo: this.$t('menu.passiveDialog.dispatcherWorkstation'),
|
||||||
controlProps: {
|
controlProps: {
|
||||||
'01': this.$t('menu.passiveDialog.inTheControl'),
|
'Center': this.$t('menu.passiveDialog.inTheControl'),
|
||||||
'02': this.$t('menu.passiveDialog.stationControl')
|
'Local': this.$t('menu.passiveDialog.stationControl')
|
||||||
},
|
},
|
||||||
selection: [],
|
selection: [],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
timer: null,
|
timer: null,
|
||||||
timeout: 61,
|
timeout: 55,
|
||||||
count: 0,
|
count: 0,
|
||||||
commandId: ''
|
sourceMemberId: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
targetStatus() {
|
targetStatus() {
|
||||||
if (this.$store.state.training.prdType == '01') {
|
if (this.$store.state.training.prdType == '01') {
|
||||||
return '01';
|
return 'Center';
|
||||||
}
|
}
|
||||||
if (this.$store.state.training.prdType == '02') {
|
if (this.$store.state.training.prdType == '02') {
|
||||||
return '02';
|
return 'Local';
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
@ -117,10 +118,10 @@ export default {
|
|||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
'$store.state.socket.msgHead': function (elem) {
|
'$store.state.socket.msgHead': function (elem) {
|
||||||
if (elem && elem.type == 'req') {
|
if (elem && (elem.operateType == 'CM_Apply_For_Station_Control' || elem.operateType == 'CM_Apply_For_Center_Control' || elem.operateType == 'CM_Force_Station_Control')) {
|
||||||
if (elem.stationControlCode) {
|
if (elem.params.stationCodes && elem.params.stationCodes.length) {
|
||||||
this.doShow(elem);
|
this.doShow(elem);
|
||||||
this.commandId = elem.commandId;
|
this.sourceMemberId = elem.sourceMemberId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -164,43 +165,40 @@ export default {
|
|||||||
this.disabledAgree = this.selection.length <= 0;
|
this.disabledAgree = this.selection.length <= 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateTableData(code) {
|
updateTableData(codes) {
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
|
(codes || []).forEach(code=> {
|
||||||
|
const model = {
|
||||||
|
code: code,
|
||||||
|
operate: '',
|
||||||
|
control: { code: '', name: '' },
|
||||||
|
target: { code: '', name: '' },
|
||||||
|
agree: false,
|
||||||
|
disabled: false
|
||||||
|
};
|
||||||
|
|
||||||
const model = {
|
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
code: code,
|
if (device) {
|
||||||
operate: '',
|
const control = (device || {}).controlMode;
|
||||||
control: { code: '', name: '' },
|
if (control) {
|
||||||
target: { code: '', name: '' },
|
model.control = { status: control, name: this.controlProps[control] };
|
||||||
agree: false,
|
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
|
||||||
disabled: false
|
}
|
||||||
};
|
model.operate = device.name || '';
|
||||||
|
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
|
||||||
if (device) {
|
|
||||||
const control = (device || {}).state;
|
|
||||||
if (control) {
|
|
||||||
model.control = { status: control.status, name: this.controlProps[control.status] };
|
|
||||||
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
|
|
||||||
}
|
}
|
||||||
|
this.tableData.push(model);
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
|
});
|
||||||
if (station) {
|
|
||||||
model.operate = station.name || '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.tableData.push(model);
|
|
||||||
},
|
},
|
||||||
doShow(msgHead) {
|
doShow(msgHead) {
|
||||||
this.requestInfo = `${msgHead.fromMember.deviceName}`;
|
getMemberInfo(this.$route.query.group, msgHead.sourceMemberId).then(resp => {
|
||||||
if (msgHead.fromMember.nickName) {
|
if (resp.data && resp.data.deviceName && resp.data.name) {
|
||||||
this.requestInfo = `${msgHead.fromMember.deviceName}(${msgHead.fromMember.nickName})`;
|
this.requestInfo = `${ resp.data.deviceName}(${resp.data.name})`;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.disabledAgree = true;
|
this.disabledAgree = true;
|
||||||
this.createTimer();
|
this.createTimer();
|
||||||
this.updateTableData(msgHead.stationControlCode);
|
this.updateTableData(msgHead.params.stationCodes);
|
||||||
|
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
@ -220,7 +218,6 @@ export default {
|
|||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
this.$store.dispatch('socket/shiftMsgQueue');
|
this.$store.dispatch('socket/shiftMsgQueue');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.count = 0;
|
this.count = 0;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
@ -247,22 +244,27 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
agree() {
|
agree() {
|
||||||
|
const stationCodes = [];
|
||||||
|
this.tableData.forEach(item => {
|
||||||
|
if (item.agree) {
|
||||||
|
stationCodes.push(item.code);
|
||||||
|
}
|
||||||
|
});
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||||
code: this.tableData[0].code,
|
send: true,
|
||||||
val: this.commandId,
|
|
||||||
cmdType: this.$store.state.training.prdType == '01' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
cmdType: this.$store.state.training.prdType == '01' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
||||||
param: {
|
param: {
|
||||||
ControlMode_Code: this.tableData[0].code,
|
sourceMemberId: this.sourceMemberId,
|
||||||
Reply_Command_Id: this.commandId,
|
stationCodes: stationCodes,
|
||||||
ControlMode_Reply: true
|
agree: true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
this.disabledAgree = true;
|
this.disabledAgree = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -272,22 +274,27 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
refuse() {
|
refuse() {
|
||||||
|
const stationCodes = [];
|
||||||
|
this.tableData.forEach(item => {
|
||||||
|
if (item.agree) {
|
||||||
|
stationCodes.push(item.code);
|
||||||
|
}
|
||||||
|
});
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
||||||
code: this.tableData[0].code,
|
send: true,
|
||||||
val: this.commandId,
|
|
||||||
cmdType: this.$store.state.training.prdType == '01' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
cmdType: this.$store.state.training.prdType == '01' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
||||||
param: {
|
param: {
|
||||||
ControlMode_Code: this.tableData[0].code,
|
sourceMemberId: this.sourceMemberId,
|
||||||
Reply_Command_Id: this.commandId,
|
stationCodes: stationCodes,
|
||||||
ControlMode_Reply: false
|
agree: false
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
this.disabledAgree = true;
|
this.disabledAgree = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
|
@ -738,6 +738,8 @@ const map = {
|
|||||||
state.mousemove++;
|
state.mousemove++;
|
||||||
},
|
},
|
||||||
setRouteData: (state, routeDataList) => {
|
setRouteData: (state, routeDataList) => {
|
||||||
|
state.routeData = {};
|
||||||
|
state.routeStartSignalData = {};
|
||||||
routeDataList.forEach(data => {
|
routeDataList.forEach(data => {
|
||||||
state.routeData[data.code] = data;
|
state.routeData[data.code] = data;
|
||||||
if (state.routeStartSignalData[data.startSignalCode] && state.routeStartSignalData[data.startSignalCode].length) {
|
if (state.routeStartSignalData[data.startSignalCode] && state.routeStartSignalData[data.startSignalCode].length) {
|
||||||
@ -752,12 +754,14 @@ const map = {
|
|||||||
state.routeList = routeDataList;
|
state.routeList = routeDataList;
|
||||||
},
|
},
|
||||||
setOverlapData: (state, overlapList) => {
|
setOverlapData: (state, overlapList) => {
|
||||||
|
state.overlapData = {};
|
||||||
overlapList.forEach(data => {
|
overlapList.forEach(data => {
|
||||||
state.overlapData[data.code] = data;
|
state.overlapData[data.code] = data;
|
||||||
});
|
});
|
||||||
state.overlapList = overlapList;
|
state.overlapList = overlapList;
|
||||||
},
|
},
|
||||||
setAutoReentryData: (state, autoReentryList) => {
|
setAutoReentryData: (state, autoReentryList) => {
|
||||||
|
state.autoReentryData = {};
|
||||||
autoReentryList.forEach(data => {
|
autoReentryList.forEach(data => {
|
||||||
state.autoReentryData[data.code] = data;
|
state.autoReentryData[data.code] = data;
|
||||||
});
|
});
|
||||||
@ -767,6 +771,7 @@ const map = {
|
|||||||
state.autoReentryList = autoReentryList;
|
state.autoReentryList = autoReentryList;
|
||||||
},
|
},
|
||||||
setSignalApproachSectionData: (state, signalApproachSectionList) => {
|
setSignalApproachSectionData: (state, signalApproachSectionList) => {
|
||||||
|
state.signalApproachSectionData = {};
|
||||||
signalApproachSectionList.forEach(data => {
|
signalApproachSectionList.forEach(data => {
|
||||||
state.signalApproachSectionData[data.signalCode] = data;
|
state.signalApproachSectionData[data.signalCode] = data;
|
||||||
});
|
});
|
||||||
|
@ -174,7 +174,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
generatePaper(index, row) {
|
generatePaper(index, row) {
|
||||||
this.$router.push({ path: `/design/race/generate`, query: {raceId:row.id} });
|
this.$router.push({ path: `/design/race/generate`, query: {raceId:row.id, mapId: row.mapId} });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -56,8 +56,16 @@
|
|||||||
:summary-method="getSummaries"
|
:summary-method="getSummaries"
|
||||||
:show-summary="showSummary"
|
:show-summary="showSummary"
|
||||||
>
|
>
|
||||||
<el-table-column prop="name" label="实操名称" />
|
<el-table-column prop="question" label="实操名称">
|
||||||
<el-table-column prop="creatorName" label="创建人" />
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.question.name }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="question" label="实操描述">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.question.description }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="score" label="分值">
|
<el-table-column prop="score" label="分值">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="!scope.row.editScope" @click="editScope(scope.row)">{{ scope.row.score }}</span>
|
<span v-if="!scope.row.editScope" @click="editScope(scope.row)">{{ scope.row.score }}</span>
|
||||||
@ -127,12 +135,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
addOperateQuestionList(row) {
|
addOperateQuestionList(row) {
|
||||||
if (this.operateQuestionList.length) {
|
const length = this.operateQuestionList.length;
|
||||||
|
if (length) {
|
||||||
this.operateIndexList.push(row.id);
|
this.operateIndexList.push(row.id);
|
||||||
this.operateQuestionList.push(row);
|
this.operateQuestionList.push({id:length + 1, score:0, question: row});
|
||||||
} else {
|
} else {
|
||||||
this.operateIndexList = [row.id];
|
this.operateIndexList = [row.id];
|
||||||
this.operateQuestionList = [row];
|
this.operateQuestionList = [{id:1, score:0, question: row}];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addTheoryQuestion() {
|
addTheoryQuestion() {
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getPracticeList } from '@/api/race';
|
||||||
export default {
|
export default {
|
||||||
mixins: [
|
mixins: [
|
||||||
// WindowResizeHandler
|
// WindowResizeHandler
|
||||||
@ -31,31 +32,27 @@ export default {
|
|||||||
queryForm: {
|
queryForm: {
|
||||||
reset: true,
|
reset: true,
|
||||||
labelWidth: '80px',
|
labelWidth: '80px',
|
||||||
queryObject: {
|
queryObject: {}
|
||||||
name: {
|
|
||||||
type: 'text',
|
|
||||||
label: '实操名称'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
queryList: {
|
queryList: {
|
||||||
// query: getPracticeList,
|
query: getPracticeList,
|
||||||
data:[
|
beforeQuery: this.beforeQuery,
|
||||||
{id:1, raceId:2, name:'行调进行扣车操作', creatorName:'水墨'},
|
// data:[
|
||||||
{id:2, raceId:4, name:'行调进行扣车操作', creatorName:'zyy'},
|
// {id:1, raceId:2, name:'行调进行扣车操作', creatorName:'水墨'},
|
||||||
{id:3, raceId:3, name:'行调进行扣车操作', creatorName:'水墨'}
|
// {id:2, raceId:4, name:'行调进行扣车操作', creatorName:'zyy'},
|
||||||
],
|
// {id:3, raceId:3, name:'行调进行扣车操作', creatorName:'水墨'}
|
||||||
|
// ],
|
||||||
selectCheckShow: false,
|
selectCheckShow: false,
|
||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '实操名称',
|
title: '实操名称',
|
||||||
prop: 'name'
|
prop: 'name',
|
||||||
|
width: '400'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '创建人',
|
title: '实操描述',
|
||||||
prop: 'creatorName',
|
prop: 'description'
|
||||||
width: '100'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@ -100,9 +97,12 @@ export default {
|
|||||||
},
|
},
|
||||||
addQuestion(index, row) {
|
addQuestion(index, row) {
|
||||||
this.$set(row, 'paper', true);
|
this.$set(row, 'paper', true);
|
||||||
row.score = 0;
|
|
||||||
this.$emit('addQuestion', row);
|
this.$emit('addQuestion', row);
|
||||||
},
|
},
|
||||||
|
beforeQuery(params) {
|
||||||
|
params.mapId = this.$route.query.mapId;
|
||||||
|
return params;
|
||||||
|
},
|
||||||
afterQuery(data) {
|
afterQuery(data) {
|
||||||
if (data && data.list) {
|
if (data && data.list) {
|
||||||
const that = this;
|
const that = this;
|
||||||
|
@ -49,6 +49,8 @@ import { getPublishMapInfo } from '@/api/jmap/map';
|
|||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import { getSessionStorage } from '@/utils/auth';
|
import { getSessionStorage } from '@/utils/auth';
|
||||||
import { ProjectCode } from '@/scripts/ProjectConfig';
|
import { ProjectCode } from '@/scripts/ProjectConfig';
|
||||||
|
import { getToken } from '@/utils/auth';
|
||||||
|
import { creatSubscribe, clearSubscribe, roomTopic} from '@/utils/stomp';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DeomonList',
|
name: 'DeomonList',
|
||||||
@ -84,6 +86,18 @@ export default {
|
|||||||
if (!value) return true;
|
if (!value) return true;
|
||||||
return data.label.indexOf(value) !== -1;
|
return data.label.indexOf(value) !== -1;
|
||||||
},
|
},
|
||||||
|
async subscribe(group) {
|
||||||
|
if (!this.$store.state.socket.roomIsSubscribe) {
|
||||||
|
this.clearSubscribe(group);
|
||||||
|
const header = { group: group || '', 'X-Token': getToken() };
|
||||||
|
creatSubscribe(`${roomTopic}\/${group}`, header);
|
||||||
|
await this.$store.dispatch('socket/setRoomSubscribe', true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async clearSubscribe(group) {
|
||||||
|
clearSubscribe(`${roomTopic}\/${group}`);
|
||||||
|
await this.$store.dispatch('socket/setRoomSubscribe', false);
|
||||||
|
},
|
||||||
async doShow() {
|
async doShow() {
|
||||||
try {
|
try {
|
||||||
this.pageLoading = true;
|
this.pageLoading = true;
|
||||||
@ -120,6 +134,7 @@ export default {
|
|||||||
path = '/jointTraining';
|
path = '/jointTraining';
|
||||||
}
|
}
|
||||||
if (data.state == '02') {
|
if (data.state == '02') {
|
||||||
|
this.subscribe(data.group);
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
const query = { lineCode: rest.data.lineCode, mapId: data.mapId, group: data.group, drawWay: rest.data.drawWay };
|
const query = { lineCode: rest.data.lineCode, mapId: data.mapId, group: data.group, drawWay: rest.data.drawWay };
|
||||||
if (rest.data.drawWay) {
|
if (rest.data.drawWay) {
|
||||||
|
@ -46,6 +46,8 @@
|
|||||||
import { getjointTrainListNew, putJointTrainingSimulationEntranceNew, getjointTrainingNew } from '@/api/jointTraining';
|
import { getjointTrainListNew, putJointTrainingSimulationEntranceNew, getjointTrainingNew } from '@/api/jointTraining';
|
||||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
|
import { getToken } from '@/utils/auth';
|
||||||
|
import { creatSubscribe, clearSubscribe, roomTopic} from '@/utils/stomp';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DeomonList',
|
name: 'DeomonList',
|
||||||
@ -81,6 +83,18 @@ export default {
|
|||||||
if (!value) return true;
|
if (!value) return true;
|
||||||
return data.label.indexOf(value) !== -1;
|
return data.label.indexOf(value) !== -1;
|
||||||
},
|
},
|
||||||
|
async subscribe(group) {
|
||||||
|
if (!this.$store.state.socket.roomIsSubscribe) {
|
||||||
|
this.clearSubscribe(group);
|
||||||
|
const header = { group: group || '', 'X-Token': getToken() };
|
||||||
|
creatSubscribe(`${roomTopic}\/${group}`, header);
|
||||||
|
await this.$store.dispatch('socket/setRoomSubscribe', true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async clearSubscribe(group) {
|
||||||
|
clearSubscribe(`${roomTopic}\/${group}`);
|
||||||
|
await this.$store.dispatch('socket/setRoomSubscribe', false);
|
||||||
|
},
|
||||||
async doShow() {
|
async doShow() {
|
||||||
try {
|
try {
|
||||||
this.pageLoading = true;
|
this.pageLoading = true;
|
||||||
@ -102,6 +116,7 @@ export default {
|
|||||||
const rest = await getPublishMapInfo(data.mapId);
|
const rest = await getPublishMapInfo(data.mapId);
|
||||||
await getjointTrainingNew(data.group);
|
await getjointTrainingNew(data.group);
|
||||||
if (data.state == '02') {
|
if (data.state == '02') {
|
||||||
|
this.subscribe(data.group);
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
const query = { lineCode: rest.data.lineCode, mapId: data.mapId, group: data.group, drawWay: true };
|
const query = { lineCode: rest.data.lineCode, mapId: data.mapId, group: data.group, drawWay: true };
|
||||||
await putJointTrainingSimulationEntranceNew(data.group);
|
await putJointTrainingSimulationEntranceNew(data.group);
|
||||||
|
@ -22,6 +22,8 @@ import { getjointTraining, putJointTrainingSimulationEntrance } from '@/api/chat
|
|||||||
import { getjointTrainingNew, putJointTrainingSimulationEntranceNew} from '@/api/jointTraining';
|
import { getjointTrainingNew, putJointTrainingSimulationEntranceNew} from '@/api/jointTraining';
|
||||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
|
import { getToken } from '@/utils/auth';
|
||||||
|
import { creatSubscribe, clearSubscribe, roomTopic} from '@/utils/stomp';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DeomonList',
|
name: 'DeomonList',
|
||||||
@ -57,6 +59,18 @@ export default {
|
|||||||
doClose() {
|
doClose() {
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
},
|
},
|
||||||
|
async subscribe() {
|
||||||
|
if (!this.$store.state.socket.roomIsSubscribe) {
|
||||||
|
this.clearSubscribe();
|
||||||
|
const header = { group: this.group || '', 'X-Token': getToken() };
|
||||||
|
creatSubscribe(`${roomTopic}\/${this.group}`, header);
|
||||||
|
await this.$store.dispatch('socket/setRoomSubscribe', true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async clearSubscribe() {
|
||||||
|
clearSubscribe(`${roomTopic}\/${this.group}`);
|
||||||
|
await this.$store.dispatch('socket/setRoomSubscribe', false);
|
||||||
|
},
|
||||||
async handleJoin() {
|
async handleJoin() {
|
||||||
try {
|
try {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -68,6 +82,7 @@ export default {
|
|||||||
await getjointTraining(this.group);
|
await getjointTraining(this.group);
|
||||||
}
|
}
|
||||||
if (this.state == '02') {
|
if (this.state == '02') {
|
||||||
|
this.subscribe();
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
const query = { lineCode: rest.data.lineCode, mapId: this.mapId, group: this.group, drawWay: drawWay };
|
const query = { lineCode: rest.data.lineCode, mapId: this.mapId, group: this.group, drawWay: drawWay };
|
||||||
if (drawWay) {
|
if (drawWay) {
|
||||||
|
@ -112,7 +112,18 @@ export default {
|
|||||||
async loadInitData() {
|
async loadInitData() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
try {
|
try {
|
||||||
const res = await getPublishMapInfo(this.mapId);
|
let res;
|
||||||
|
try {
|
||||||
|
res = await getPublishMapInfo(this.mapId);
|
||||||
|
} catch (error) {
|
||||||
|
if (error.code == 30001) {
|
||||||
|
const url = localStore.get('orignalTrainingPlatformRoute' + this.$store.state.user.id);
|
||||||
|
localStore.remove();
|
||||||
|
if (url) {
|
||||||
|
this.$router.push(url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
const resp = await getSubSystemDetail(this.$route.params.subSystem);
|
const resp = await getSubSystemDetail(this.$route.params.subSystem);
|
||||||
this.tryUser = 0;
|
this.tryUser = 0;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -153,16 +164,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.code == 30001) {
|
// this.loading = false;
|
||||||
const url = localStore.get('orignalTrainingPlatformRoute' + this.$store.state.user.id);
|
// this.$message.error(this.$t('error.refreshFailed'));
|
||||||
localStore.remove();
|
|
||||||
if (url) {
|
|
||||||
this.$router.push(url);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.loading = false;
|
|
||||||
this.$message.error(this.$t('error.refreshFailed'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
refresh() {
|
refresh() {
|
||||||
|
133
src/views/iscs/iscsDraw/iscsBasOperate/cistern.vue
Normal file
133
src/views/iscs/iscsDraw/iscsBasOperate/cistern.vue
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
|
||||||
|
<el-form-item v-if="isUpdate" label="编号" prop="code">
|
||||||
|
<el-input v-model="form.code" :disabled="true" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="图形宽度" prop="width">
|
||||||
|
<el-input-number v-model="form.width" :min="10" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="颜色" prop="fill">
|
||||||
|
<el-color-picker v-model="form.fill" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="X轴坐标" prop="x">
|
||||||
|
<el-input-number v-model="form.x" controls-position="right" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Y轴坐标" prop="y">
|
||||||
|
<el-input-number v-model="form.y" controls-position="right" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" type="danger" @click="deleteDevice">{{ $t('global.delete') }}</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="initPage">{{ $t('global.cancel') }}</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import {getUID} from '@/iscs/utils/Uid';
|
||||||
|
export default {
|
||||||
|
name:'AirConditioner',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isUpdate:false,
|
||||||
|
showDeleteButton: false,
|
||||||
|
buttonText: '立即创建',
|
||||||
|
form:{
|
||||||
|
code:'',
|
||||||
|
width: 20,
|
||||||
|
fill: '#000',
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
code: [
|
||||||
|
{ required: true, message:'请生成设备图形的编码', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
width:[
|
||||||
|
{ required: true, message:'请输入设备图形宽度', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
x: [
|
||||||
|
{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
y: [
|
||||||
|
{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed:{
|
||||||
|
...mapGetters('iscs', [
|
||||||
|
'iscs'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
'$store.state.iscs.rightClickCount': function (val) {
|
||||||
|
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||||
|
if (model._type === 'Cistern' ) {
|
||||||
|
this.buttonText = '修改';
|
||||||
|
this.showDeleteButton = true;
|
||||||
|
this.isUpdate = true;
|
||||||
|
this.form.code = model.code;
|
||||||
|
this.form.width = model.width;
|
||||||
|
this.form.fill = model.fill;
|
||||||
|
this.form.x = model.point.x;
|
||||||
|
this.form.y = model.point.y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
onSubmit(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const model = {
|
||||||
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
|
_type: 'Cistern',
|
||||||
|
code: this.isUpdate ? this.form.code : getUID('Cistern', this.iscs.cisternList || []),
|
||||||
|
width: this.form.width,
|
||||||
|
fill: this.form.fill
|
||||||
|
};
|
||||||
|
this.$emit('createDataModel', model);
|
||||||
|
this.initPage();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
initPage() {
|
||||||
|
this.isUpdate = false;
|
||||||
|
this.buttonText = '立即创建';
|
||||||
|
this.showDeleteButton = false;
|
||||||
|
this.form = {
|
||||||
|
code:'',
|
||||||
|
width: 20,
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
|
};
|
||||||
|
this.$refs.form.resetFields();
|
||||||
|
},
|
||||||
|
deleteDevice() {
|
||||||
|
const airConditionerModel = {
|
||||||
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
|
_type: 'Cistern',
|
||||||
|
code: this.form.code,
|
||||||
|
width: this.form.width,
|
||||||
|
fill: '#000'
|
||||||
|
};
|
||||||
|
this.$emit('deleteDataModel', airConditionerModel );
|
||||||
|
this.initPage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -123,7 +123,14 @@
|
|||||||
@deleteDataModel="deleteDataModel"
|
@deleteDataModel="deleteDataModel"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="水池" name="Cistern">
|
||||||
|
<cistern
|
||||||
|
ref="cistern"
|
||||||
|
style="width: 90%"
|
||||||
|
@createDataModel="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
<el-tab-pane label="照明组" name="LightingGroup">
|
<el-tab-pane label="照明组" name="LightingGroup">
|
||||||
<lighting-group
|
<lighting-group
|
||||||
ref="lightingGroup"
|
ref="lightingGroup"
|
||||||
@ -190,6 +197,7 @@ import SmookExhaustFd from './smookExhaustFd';
|
|||||||
import LightingGroup from './lightingGroup';
|
import LightingGroup from './lightingGroup';
|
||||||
import BalancedElectric from './balancedElectric';
|
import BalancedElectric from './balancedElectric';
|
||||||
import ElectricButterflyValve from './electricButterflyValve';
|
import ElectricButterflyValve from './electricButterflyValve';
|
||||||
|
import Cistern from './cistern';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'IscsOperate',
|
name: 'IscsOperate',
|
||||||
@ -212,7 +220,8 @@ export default {
|
|||||||
IscsLine,
|
IscsLine,
|
||||||
LightingGroup,
|
LightingGroup,
|
||||||
BalancedElectric,
|
BalancedElectric,
|
||||||
ElectricButterflyValve
|
ElectricButterflyValve,
|
||||||
|
Cistern
|
||||||
},
|
},
|
||||||
mixins: [
|
mixins: [
|
||||||
],
|
],
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
<el-form-item label="图形宽度" prop="width">
|
<el-form-item label="图形宽度" prop="width">
|
||||||
<el-input-number v-model="addModel.width" />
|
<el-input-number v-model="addModel.width" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="扶梯朝右" prop="isRight">
|
<el-form-item label="单向" prop="oneWay">
|
||||||
<el-checkbox v-model="addModel.isRight" />
|
<el-checkbox v-model="addModel.oneWay" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="旋转角度">
|
<el-form-item label="旋转角度">
|
||||||
<el-input-number v-model="addModel.rotationAngle" />
|
<el-input-number v-model="addModel.rotationAngle" />
|
||||||
@ -41,7 +41,8 @@ export default {
|
|||||||
x: 10,
|
x: 10,
|
||||||
y: 10,
|
y: 10,
|
||||||
rotationAngle: 0,
|
rotationAngle: 0,
|
||||||
isRight:false
|
isRight:false,
|
||||||
|
oneWay: false
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
width:[{ required: true, message:'请输入设备图形宽度', trigger: 'blur' }],
|
width:[{ required: true, message:'请输入设备图形宽度', trigger: 'blur' }],
|
||||||
@ -71,6 +72,7 @@ export default {
|
|||||||
this.addModel.y = model.point.y;
|
this.addModel.y = model.point.y;
|
||||||
this.addModel.isRight = model.isRight;
|
this.addModel.isRight = model.isRight;
|
||||||
this.addModel.rotationAngle = model.rotationAngle || 0;
|
this.addModel.rotationAngle = model.rotationAngle || 0;
|
||||||
|
this.addModel.oneWay = !!model.oneWay;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -88,7 +90,8 @@ export default {
|
|||||||
rotationAngle: this.addModel.rotationAngle,
|
rotationAngle: this.addModel.rotationAngle,
|
||||||
code: this.isUpdate ? this.addModel.code : getUID('Staircase', this.iscs.staircaseList),
|
code: this.isUpdate ? this.addModel.code : getUID('Staircase', this.iscs.staircaseList),
|
||||||
_type: 'Staircase',
|
_type: 'Staircase',
|
||||||
width: this.addModel.width
|
width: this.addModel.width,
|
||||||
|
oneWay: this.addModel.oneWay
|
||||||
};
|
};
|
||||||
this.$emit('createDataModel', staircaseModel);
|
this.$emit('createDataModel', staircaseModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
@ -107,7 +110,8 @@ export default {
|
|||||||
isRight: this.addModel.isRight,
|
isRight: this.addModel.isRight,
|
||||||
rotationAngle: this.addModel.rotationAngle,
|
rotationAngle: this.addModel.rotationAngle,
|
||||||
_type: 'Staircase',
|
_type: 'Staircase',
|
||||||
width: this.addModel.width
|
width: this.addModel.width,
|
||||||
|
oneWay: this.addModel.oneWay
|
||||||
};
|
};
|
||||||
this.$emit('deleteDataModel', staircaseModel);
|
this.$emit('deleteDataModel', staircaseModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
@ -122,7 +126,8 @@ export default {
|
|||||||
x: 10,
|
x: 10,
|
||||||
y: 10,
|
y: 10,
|
||||||
isRight:false,
|
isRight:false,
|
||||||
rotationAngle: 0
|
rotationAngle: 0,
|
||||||
|
oneWay: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -214,18 +214,18 @@
|
|||||||
this.moveheight=159;
|
this.moveheight=159;
|
||||||
this.movex=153+"px";
|
this.movex=153+"px";
|
||||||
}
|
}
|
||||||
if(this.moveheight>85&&this.moveheight<76){
|
if(this.moveheight<82&&this.moveheight>73){
|
||||||
this.movex=73+"px";
|
this.movex=75+"px";
|
||||||
this.move = 0;
|
this.move = 0;
|
||||||
}else if(this.moveheight<0&&this.moveheight>159){
|
}else if(this.moveheight<0&&this.moveheight>159){
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
if(this.moveheight>=85){
|
if(this.moveheight>=82){
|
||||||
this.move = -(this.moveheight-85)/65;
|
this.move = -(this.moveheight-82)/65;
|
||||||
}
|
}
|
||||||
if(this.moveheight<=75){
|
if(this.moveheight<=73){
|
||||||
this.move = (75 - this.moveheight)/75;
|
this.move = (73 - this.moveheight)/75;
|
||||||
}
|
}
|
||||||
this.movex=this.moveheight-7+"px";
|
this.movex=this.moveheight-7+"px";
|
||||||
if(this.moveheight>=145){
|
if(this.moveheight>=145){
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<!-- <Right-Pane ref="rightcontrol" /> -->
|
<!-- <Right-Pane ref="rightcontrol" /> -->
|
||||||
|
|
||||||
<TopRight-Pane ref="topcontrol" />
|
<TopRight-Pane ref="topcontrol" :group-num="groupnum" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -118,9 +118,12 @@ import axios from 'axios';
|
|||||||
// this.groupnum = selVal;
|
// this.groupnum = selVal;
|
||||||
for(let i=0;i<this.trainlist.length;i++){
|
for(let i=0;i<this.trainlist.length;i++){
|
||||||
if(this.trainlist[i].groupNumber == this.groupnum){
|
if(this.trainlist[i].groupNumber == this.groupnum){
|
||||||
|
// console.log(this.trainlist[i].gear);
|
||||||
|
// this.groupnum
|
||||||
this.$refs.centercontrol.centerstate(this.trainlist[i].gear);
|
this.$refs.centercontrol.centerstate(this.trainlist[i].gear);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.nowdrive = this.groupnum;
|
this.nowdrive = this.groupnum;
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.groupnum = oldgroupnum;
|
this.groupnum = oldgroupnum;
|
||||||
@ -152,6 +155,7 @@ import axios from 'axios';
|
|||||||
option.disabled = false;
|
option.disabled = false;
|
||||||
if(netdata.data[i].name){
|
if(netdata.data[i].name){
|
||||||
option.label = netdata.data[i].name+"正在驾驶"+netdata.data[i].groupNumber;
|
option.label = netdata.data[i].name+"正在驾驶"+netdata.data[i].groupNumber;
|
||||||
|
this.groupNumber = netdata.data[i].groupNumber;
|
||||||
option.disabled = true;
|
option.disabled = true;
|
||||||
}
|
}
|
||||||
if(netdata.data[i].driverId){
|
if(netdata.data[i].driverId){
|
||||||
|
@ -1,42 +1,42 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="width:100%;height:48%;position:absolute;top:0px;">
|
<div style="width:100%;height:48%;position:absolute;top:0px;">
|
||||||
<!-- ATB启动 -->
|
<!-- ATB启动 -->
|
||||||
<div id="atb" class="panebutton" style="top:8%;left:3%;" @tap="atbclick">
|
<!-- <div id="atb" class="panebutton" style="top:8%;left:3%;" @click="atbclick">
|
||||||
<img class="buttonimg" :src="greenimg" />
|
<img class="buttonimg" :src="greenimg" />
|
||||||
<div class="buttontext">{{ $t('jlmap3d.ATBStart') }}</div>
|
<div class="buttontext">{{ $t('jlmap3d.ATBStart') }}</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- BM/CBTC -->
|
<!-- BM/CBTC -->
|
||||||
<div id="bmcbtc" class="panebutton" style="top:8%;left:17%;" @tap="bmcbtcclick">
|
<div id="bmcbtc" class="panebutton" style="top:8%;left:17%;" @click="bmcbtcclick">
|
||||||
<img class="buttonimg" :src="greenimg" />
|
<img class="buttonimg" :src="cbtcbuttonimg" />
|
||||||
<div class="buttontext">BM/CBTC</div>
|
<div class="buttontext">BM/CBTC</div>
|
||||||
</div>
|
</div> -->
|
||||||
<!-- RM -->
|
<!-- RM -->
|
||||||
<div id="rm" class="panebutton" style="top:8%;left:31%;" @tap="rmclick">
|
<div id="rm" class="panebutton" style="top:8%;left:31%;" @click="rmclick">
|
||||||
<img class="buttonimg" :src="greenimg" />
|
<img class="buttonimg" :src="rmbuttonimg" />
|
||||||
<div class="buttontext">RM</div>
|
<div class="buttontext">RM</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 关左门 -->
|
<!-- 关左门 -->
|
||||||
<div id="dlclose" class="panebutton" style="top:8%;left:45%;" @tap="dlcclick">
|
<div id="dlclose" class="panebutton" style="top:8%;left:45%;" @click="dlcclick">
|
||||||
<img class="buttonimg" :src="greenimg" />
|
<img class="buttonimg" :src="greenimg" />
|
||||||
<div class="buttontext">{{ $t('jlmap3d.closeLeftDoor') }}</div>
|
<div class="buttontext">{{ $t('jlmap3d.closeLeftDoor') }}</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 开左门A -->
|
<!-- 开左门A -->
|
||||||
<div id="dlopen" class="panebutton" style="top:8%;left:59%;" @tap="dloclick">
|
<div id="dlopen" class="panebutton" style="top:8%;left:59%;" @click="dloclick">
|
||||||
<img class="buttonimg" :src="redimg" />
|
<img class="buttonimg" :src="redimg" />
|
||||||
<div class="buttontext">{{ $t('jlmap3d.openLeftDoor') }}</div>
|
<div class="buttontext">{{ $t('jlmap3d.openLeftDoor') }}</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- ATO启动A -->
|
<!-- ATO启动A -->
|
||||||
<div id="atoa" class="panebutton" style="top:8%;left:73%;" @tap="atoaclick">
|
<div id="atoa" class="panebutton" style="top:8%;left:73%;" @click="atoaclick">
|
||||||
<img class="buttonimg" :src="apoimg" />
|
<img class="buttonimg" :src="atobuttonimg" />
|
||||||
<div class="buttontext">{{ $t('jlmap3d.ATOStart') }}</div>
|
<div class="buttontext">{{ $t('jlmap3d.ATOStart') }}</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- cbtc -->
|
<!-- cbtc -->
|
||||||
<div id="cbtc" class="panebutton" style="top:8%;left:87%;" @tap="cbtcclick">
|
<!-- <div id="cbtc" class="panebutton" style="top:8%;left:87%;" @click="cbtcclick">
|
||||||
<img class="buttonimg" :src="greenimg" />
|
<img class="buttonimg" :src="cbtcbuttonimg" />
|
||||||
<div class="buttontext">CBTC</div>
|
<div class="buttontext">CBTC</div>
|
||||||
</div>
|
</div> -->
|
||||||
<!-- 电笛按钮 -->
|
<!-- 电笛按钮 -->
|
||||||
<!-- <div id="elflute" class="panebutton" style="bottom:3%;left:84%;" @tap="elfluteclick">
|
<!-- <div id="elflute" class="panebutton" style="bottom:3%;left:84%;" @click="elfluteclick">
|
||||||
<img class="buttonimg" :src="grayimg" />
|
<img class="buttonimg" :src="grayimg" />
|
||||||
<div class="buttontext">{{ $t('jlmap3d.electricHornButton') }}</div>
|
<div class="buttontext">{{ $t('jlmap3d.electricHornButton') }}</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
@ -75,22 +75,22 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<!-- 受电弓升 -->
|
<!-- 受电弓升 -->
|
||||||
<!-- <div id="sg" class="panebutton" style="bottom:6%;left:3%;" @tap="sgclink">
|
<!-- <div id="sg" class="panebutton" style="bottom:6%;left:3%;" @click="sgclink">
|
||||||
<img class="buttonimg" :src="sgimg" />
|
<img class="buttonimg" :src="sgimg" />
|
||||||
<div class="buttontext">{{ $t('jlmap3d.electricGongSheng') }}</div>
|
<div class="buttontext">{{ $t('jlmap3d.electricGongSheng') }}</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<!-- 受电弓降 -->
|
<!-- 受电弓降 -->
|
||||||
<!-- <div id="jg" class="panebutton" style="bottom:6%;left:17%;" @tap="jgclick">
|
<!-- <div id="jg" class="panebutton" style="bottom:6%;left:17%;" @click="jgclick">
|
||||||
<img class="buttonimg" :src="jgimg" />
|
<img class="buttonimg" :src="jgimg" />
|
||||||
<div class="buttontext">{{ $t('jlmap3d.pantographFall') }}</div>
|
<div class="buttontext">{{ $t('jlmap3d.pantographFall') }}</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<!-- 试灯按钮 -->
|
<!-- 试灯按钮 -->
|
||||||
<!-- <div id="sl" class="panebutton" style="bottom:6%;left:40%;" @tap="slclick">
|
<!-- <div id="sl" class="panebutton" style="bottom:6%;left:40%;" @click="slclick">
|
||||||
<img class="buttonimg" :src="slimg" />
|
<img class="buttonimg" :src="slimg" />
|
||||||
<div class="buttontext">{{ $t('jlmap3d.lampButton') }}</div>
|
<div class="buttontext">{{ $t('jlmap3d.lampButton') }}</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<!-- ATP切除 -->
|
<!-- ATP切除 -->
|
||||||
<div id="atp" class="panebutton" style="bottom:6%;left:31%;" @tap="atpclick">
|
<div id="atp" class="panebutton" style="bottom:6%;left:31%;" @click="atpclick">
|
||||||
<img class="buttonimg" :src="atpimg" />
|
<img class="buttonimg" :src="atpimg" />
|
||||||
<div class="buttontext">{{ $t('jlmap3d.removalATP') }}</div>
|
<div class="buttontext">{{ $t('jlmap3d.removalATP') }}</div>
|
||||||
</div>
|
</div>
|
||||||
@ -103,11 +103,11 @@
|
|||||||
<div class="tfbutton" style="top:25px;left:50px;">{{ $t('jlmap3d.remission') }}</div>
|
<div class="tfbutton" style="top:25px;left:50px;">{{ $t('jlmap3d.remission') }}</div>
|
||||||
<div class="buttontext2">{{ $t('jlmap3d.parkingBrakeMode') }}</div>
|
<div class="buttontext2">{{ $t('jlmap3d.parkingBrakeMode') }}</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div id="dropen" class="panebutton" style="bottom:6%;left:45%;" @tap="droclick">
|
<div id="dropen" class="panebutton" style="bottom:6%;left:45%;" @click="droclick">
|
||||||
<img class="buttonimg" :src="redlimg" />
|
<img class="buttonimg" :src="redlimg" />
|
||||||
<div class="buttontext">{{ $t('jlmap3d.openRightDoor') }}</div>
|
<div class="buttontext">{{ $t('jlmap3d.openRightDoor') }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="drclose" class="panebutton" style="bottom:6%;left:59%;" @tap="drcclick">
|
<div id="drclose" class="panebutton" style="bottom:6%;left:59%;" @click="drcclick">
|
||||||
<img class="buttonimg" :src="greenimg" />
|
<img class="buttonimg" :src="greenimg" />
|
||||||
<div class="buttontext">{{ $t('jlmap3d.closeRightDoor') }}</div>
|
<div class="buttontext">{{ $t('jlmap3d.closeRightDoor') }}</div>
|
||||||
</div>
|
</div>
|
||||||
@ -132,6 +132,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
// import { sendSimulationCommand } from '@/api/simulation.js';
|
// import { sendSimulationCommand } from '@/api/simulation.js';
|
||||||
|
import { trainSimulationDriveMode, trainSimulationAto ,trainSimulationAtp } from '@/jlmap3d/jl3ddrive/drivecontrol/simulation.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TopRightPane',
|
name: 'TopRightPane',
|
||||||
@ -169,24 +170,29 @@
|
|||||||
sivtf:"rotate(0deg)",
|
sivtf:"rotate(0deg)",
|
||||||
driverlighttf:"rotate(0deg)",
|
driverlighttf:"rotate(0deg)",
|
||||||
headlighttf:"rotate(0deg)",
|
headlighttf:"rotate(0deg)",
|
||||||
|
|
||||||
|
atobuttonimg:"/static/jl3d/control/green.png",
|
||||||
|
rmbuttonimg:"/static/jl3d/control/green.png",
|
||||||
|
cbtcbuttonimg:"/static/jl3d/control/green.png",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
groupNum: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
group() {
|
group() {
|
||||||
return this.$store.state.app.group;
|
return this.$route.query.group;
|
||||||
},
|
},
|
||||||
code() {
|
|
||||||
return this.$store.state.app.code;
|
|
||||||
},
|
|
||||||
traincode() {
|
|
||||||
return this.$store.state.app.driverTrain;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
window.updatabuttonlight = this.updatabuttonlight;
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|
||||||
@ -329,16 +335,23 @@
|
|||||||
},
|
},
|
||||||
atpclick: function (e){
|
atpclick: function (e){
|
||||||
//console.log("atp");
|
//console.log("atp");
|
||||||
|
trainSimulationAtp(this.group,this.groupNum).then(netdata => {
|
||||||
|
console.log(netdata);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
atbclick: function (e){
|
atbclick: function (e){
|
||||||
|
|
||||||
},
|
},
|
||||||
bmcbtcclick: function (e){
|
bmcbtcclick: function (e){
|
||||||
|
trainSimulationDriveMode(this.group,this.groupNum,"CM").then(netdata => {
|
||||||
|
console.log(netdata);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
rmclick: function (e){
|
rmclick: function (e){
|
||||||
|
trainSimulationDriveMode(this.group,this.groupNum,"RM").then(netdata => {
|
||||||
|
console.log(netdata);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
dlcclick: function (e){
|
dlcclick: function (e){
|
||||||
|
|
||||||
@ -347,7 +360,9 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
atoaclick: function (e){
|
atoaclick: function (e){
|
||||||
|
trainSimulationAto(this.group,this.groupNum).then(netdata => {
|
||||||
|
console.log(netdata);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
cbtcclick: function (e){
|
cbtcclick: function (e){
|
||||||
|
|
||||||
@ -358,6 +373,27 @@
|
|||||||
drcclick: function (e){
|
drcclick: function (e){
|
||||||
|
|
||||||
},
|
},
|
||||||
|
updatabuttonlight: function (data){
|
||||||
|
// console.log(data);
|
||||||
|
if(data.runLevel == "CBTC"){
|
||||||
|
this.cbtcbuttonimg = this.greenlimg;
|
||||||
|
}else{
|
||||||
|
this.cbtcbuttonimg = this.greenimg;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(data.driveMode == "RM"){
|
||||||
|
this.rmbuttonimg = this.greenlimg;
|
||||||
|
}else{
|
||||||
|
this.rmbuttonimg = this.greenimg;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(data.atoOn){
|
||||||
|
this.atobuttonimg = this.greenlimg;
|
||||||
|
}else{
|
||||||
|
this.atobuttonimg = this.greenimg;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -265,6 +265,7 @@ export default {
|
|||||||
updatestatus(newdata){
|
updatestatus(newdata){
|
||||||
this.trainnum = newdata.groupNumber;
|
this.trainnum = newdata.groupNumber;
|
||||||
this.$refs.mmiui.updatetrainstatus(newdata);
|
this.$refs.mmiui.updatetrainstatus(newdata);
|
||||||
|
updatabuttonlight(newdata);
|
||||||
},
|
},
|
||||||
warningmsg(nowmsg){
|
warningmsg(nowmsg){
|
||||||
this.controlmsg = nowmsg;
|
this.controlmsg = nowmsg;
|
||||||
|
@ -202,6 +202,7 @@ export default {
|
|||||||
},
|
},
|
||||||
updatetrainstatus(newdata){
|
updatetrainstatus(newdata){
|
||||||
//更新车组号
|
//更新车组号
|
||||||
|
// console.log(newdata);
|
||||||
this.updatespeed(newdata.v);
|
this.updatespeed(newdata.v);
|
||||||
|
|
||||||
this.updateatpspeed(newdata.pv);
|
this.updateatpspeed(newdata.pv);
|
||||||
@ -215,6 +216,8 @@ export default {
|
|||||||
this.updatedrivemode(newdata.driveMode);
|
this.updatedrivemode(newdata.driveMode);
|
||||||
|
|
||||||
this.updatestation(newdata.endStation,newdata.nextStation);
|
this.updatestation(newdata.endStation,newdata.nextStation);
|
||||||
|
|
||||||
|
this.updateatoatp(newdata.atoOn,newdata.atpOn);
|
||||||
},
|
},
|
||||||
updatemmistate(aaa){
|
updatemmistate(aaa){
|
||||||
|
|
||||||
@ -239,7 +242,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
updatedrivedata(drivedata){
|
updatedrivedata(drivedata){
|
||||||
console.log(drivedata);
|
// console.log(drivedata);
|
||||||
if(drivedata == "breaker"){
|
if(drivedata == "breaker"){
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -308,34 +311,68 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
updatarunlevel(drivedata){
|
updatarunlevel(drivedata){
|
||||||
if(drivedata == "cbtc"){
|
if(drivedata == "CBTC"){
|
||||||
if(this.m2state == "start"){
|
this.m2state = 'cbtc';
|
||||||
this.m2state = 'il';
|
this.m2image = this.images.m2[this.m2state];
|
||||||
this.m2image = this.images.m2[this.m2state];
|
// if(this.m2state == "start"){
|
||||||
}else if(this.m2state == "il"){
|
// this.m2state = 'il';
|
||||||
this.m2state = 'itc';
|
// this.m2image = this.images.m2[this.m2state];
|
||||||
this.m2image = this.images.m2[this.m2state];
|
// }else if(this.m2state == "il"){
|
||||||
}else if(this.m2state == "itc"){
|
// this.m2state = 'itc';
|
||||||
this.m2state = 'cbtc';
|
// this.m2image = this.images.m2[this.m2state];
|
||||||
this.m2image = this.images.m2[this.m2state];
|
// }else if(this.m2state == "itc"){
|
||||||
}else if(this.m2state == "cbtc"){
|
|
||||||
this.m2state = 'start';
|
// }else if(this.m2state == "cbtc"){
|
||||||
this.m2image = this.images.m2[this.m2state];
|
// this.m2state = 'start';
|
||||||
}
|
// this.m2image = this.images.m2[this.m2state];
|
||||||
|
// }
|
||||||
|
}else if(drivedata == "IL"){
|
||||||
|
this.m2state = 'il';
|
||||||
|
this.m2image = this.images.m2[this.m2state];
|
||||||
|
}else{
|
||||||
|
this.m2state = 'start';
|
||||||
|
this.m2image = this.images.m2[this.m2state];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updatedrivemode(drivedata){
|
updatedrivemode(drivedata){
|
||||||
if(drivedata == "AA"){
|
if(drivedata == "CM"){
|
||||||
this.m7state = 'aoac';
|
this.m1state = 'cm';
|
||||||
this.m7image = this.images.m7[this.m7state];
|
this.m1image = this.images.m1[this.m1state];
|
||||||
|
}else if(drivedata == "RM"){
|
||||||
|
this.m1state = 'rm';
|
||||||
|
this.m1image = this.images.m1[this.m1state];
|
||||||
|
}else if(drivedata == "AM"){
|
||||||
|
this.m1state = 'am';
|
||||||
|
this.m1image = this.images.m1[this.m1state];
|
||||||
|
}else{
|
||||||
|
this.m1state = 'start';
|
||||||
|
this.m1image = this.images.m1[this.m1state];
|
||||||
}
|
}
|
||||||
if(drivedata == "AM"){
|
|
||||||
this.m7state = 'aomc';
|
// if(this.m1state == "start"){
|
||||||
this.m7image = this.images.m7[this.m7state];
|
// this.m1state = 'rm';
|
||||||
|
// this.m1image = this.images.m1[this.m1state];
|
||||||
|
// }else if(this.m1state == "rm"){
|
||||||
|
// this.m1state = 'am';
|
||||||
|
// this.m1image = this.images.m1[this.m1state];
|
||||||
|
// }else if(this.m1state == "am"){
|
||||||
|
// this.m1state = 'cm';
|
||||||
|
// this.m1image = this.images.m1[this.m1state];
|
||||||
|
// }else if(this.m1state == "cm"){
|
||||||
|
// this.m1state = 'start';
|
||||||
|
// this.m1image = this.images.m1[this.m1state];
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
updateatoatp(atoon,atpon){
|
||||||
|
if(!atoon){
|
||||||
|
this.m9state = "ato";
|
||||||
|
this.m9image = this.images.m9["ato"];
|
||||||
}
|
}
|
||||||
if(drivedata == "MM"){
|
if(!atpon){
|
||||||
this.m7state = 'momc';
|
this.m9state = "atp";
|
||||||
this.m7image = this.images.m7[this.m7state];
|
this.m9image = this.images.m9["atp"];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updatelen(len) {
|
updatelen(len) {
|
||||||
|
@ -85,7 +85,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
updatestationlist(list){
|
updatestationlist(list){
|
||||||
console.log(list);
|
// console.log(list);
|
||||||
this.value = list[0].name
|
this.value = list[0].name
|
||||||
this.stationlist = list;
|
this.stationlist = list;
|
||||||
},
|
},
|
||||||
|
@ -10,39 +10,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getExamLessonDetail } from '@/api/management/exam';
|
|
||||||
import { generateExamList } from '@/api/management/userexam';
|
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import LangStorage from '@/utils/lang';
|
|
||||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
import {getRaceUserById} from '@/api/competition';
|
import {getRaceUserById} from '@/api/competition';
|
||||||
import { participantCreatTrainingRoom, getPracticalQuestion, getTheoryQuestion } from '@/api/competition';
|
import { participantCreatTrainingRoom, getPracticalQuestion, getTheoryQuestion } from '@/api/competition';
|
||||||
// import applyImg from '@/assets/apply.png';
|
import {getRaceById } from '@/api/competition';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ExamDetailView',
|
name: 'ExamDetailView',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
// applyImg: applyImg,
|
|
||||||
examDetails: {
|
|
||||||
lessonId: '',
|
|
||||||
name: '',
|
|
||||||
remarks: '',
|
|
||||||
examDefinitionRulesVOList: [],
|
|
||||||
startTime: '',
|
|
||||||
endTime: '',
|
|
||||||
fullPoint: '',
|
|
||||||
passingPoint: '',
|
|
||||||
duration: 0,
|
|
||||||
type: ''
|
|
||||||
},
|
|
||||||
typeList: [],
|
|
||||||
examList: [],
|
|
||||||
trainingOperateTypeMap: {},
|
|
||||||
drawWay: false,
|
|
||||||
resultFlag: false,
|
resultFlag: false,
|
||||||
lineCode: '' // 线路对应的皮肤
|
lineCode: '' // 线路对应的皮肤
|
||||||
};
|
};
|
||||||
@ -56,106 +34,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$route.params.examId': function (val) {
|
|
||||||
this.loadInitPage(val);
|
|
||||||
},
|
|
||||||
$route() {
|
$route() {
|
||||||
this.getUserStatus();
|
this.getUserStatus();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
// this.loadInitPage(this.$route.params.examId);
|
|
||||||
this.getUserStatus();
|
this.getUserStatus();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getList() {
|
|
||||||
this.typeList = [];
|
|
||||||
for (const val in ConstConfig.ConstSelect.trainingDeviceType) {
|
|
||||||
this.typeList.push({name: LangStorage.getLang() == 'en' ? ConstConfig.ConstSelect.trainingDeviceType[val].enlabel : ConstConfig.ConstSelect.trainingDeviceType[val].label, code: val});
|
|
||||||
}
|
|
||||||
this.trainingOperateTypeMap = {
|
|
||||||
Switch: [],
|
|
||||||
Section: [],
|
|
||||||
Signal: [],
|
|
||||||
Stand: [],
|
|
||||||
Station: [],
|
|
||||||
ControlConvertMenu: [],
|
|
||||||
TrainWindow: []
|
|
||||||
};
|
|
||||||
let ele;
|
|
||||||
for ( ele in CMD['Switch']) {
|
|
||||||
this.trainingOperateTypeMap['Switch'].push(CMD['Switch'][ele]);
|
|
||||||
}
|
|
||||||
for ( ele in CMD['Section']) {
|
|
||||||
this.trainingOperateTypeMap['Section'].push(CMD['Section'][ele]);
|
|
||||||
}
|
|
||||||
for ( ele in CMD['Signal']) {
|
|
||||||
this.trainingOperateTypeMap['Signal'].push(CMD['Signal'][ele]);
|
|
||||||
}
|
|
||||||
for ( ele in CMD['Stand']) {
|
|
||||||
this.trainingOperateTypeMap['Stand'].push(CMD['Stand'][ele]);
|
|
||||||
}
|
|
||||||
for ( ele in CMD['Station']) {
|
|
||||||
this.trainingOperateTypeMap['Station'].push(CMD['Station'][ele]);
|
|
||||||
}
|
|
||||||
for ( ele in CMD['ControlConvertMenu']) {
|
|
||||||
this.trainingOperateTypeMap['ControlConvertMenu'].push(CMD['ControlConvertMenu'][ele]);
|
|
||||||
}
|
|
||||||
for ( ele in CMD['Train']) {
|
|
||||||
this.trainingOperateTypeMap['TrainWindow'].push(CMD['Train'][ele]);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async loadInitPage(examId) {
|
|
||||||
if (examId) {
|
|
||||||
try {
|
|
||||||
const response = await getPublishMapInfo(this.$route.query.mapId);
|
|
||||||
if (response.data) {
|
|
||||||
this.drawWay = response.data.drawWay;
|
|
||||||
this.lineCode = response.data.lineCode;
|
|
||||||
this.typeList = [];
|
|
||||||
await this.getList();
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
this.$message.error(this.$t('error.getMapDataFailed'));
|
|
||||||
}
|
|
||||||
const res = await getExamLessonDetail(examId);
|
|
||||||
this.examDetails = res.data;
|
|
||||||
this.examDetails.examDefinitionRulesVOList.forEach((res, index) => {
|
|
||||||
res.chapterIdLong = Number(res.num) * Number(res.point);
|
|
||||||
this.typeList.forEach(v => {
|
|
||||||
if (res.trainingType == v.code) {
|
|
||||||
this.examDetails.examDefinitionRulesVOList[index].name = v.name;
|
|
||||||
if (res.operateType) {
|
|
||||||
this.trainingOperateTypeMap[res.trainingType].forEach(item => {
|
|
||||||
if ((item.code || item.value) === res.operateType) {
|
|
||||||
this.examDetails.examDefinitionRulesVOList[index].name = `${this.examDetails.examDefinitionRulesVOList[index].name}-${item.name || item.label}`;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async examDetail() {
|
|
||||||
const data = this.examDetails;
|
|
||||||
try {
|
|
||||||
const response = await generateExamList(data.id);
|
|
||||||
this.examList = response.data.userExamQuestionsVOs;
|
|
||||||
this.userExam = response.data;
|
|
||||||
const list = response.data.userExamQuestionsVOs;
|
|
||||||
await this.$store.dispatch('exam/setUsedTime', this.userExam.usedTime);
|
|
||||||
await this.$store.dispatch('exam/setTotalTime', this.userExam.duration);
|
|
||||||
await this.$store.dispatch('trainingList/setTrainingList', list);
|
|
||||||
} catch (error) {
|
|
||||||
if (error.code === 500004) {
|
|
||||||
this.$messageBox(this.$t('tip.notWithinTheScopeOfTheExamination'));
|
|
||||||
} else {
|
|
||||||
this.$messageBox(`${error.message}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async getUserStatus() {
|
async getUserStatus() {
|
||||||
this.resultFlag = false;
|
this.resultFlag = false;
|
||||||
const res = await getRaceUserById(this.$route.query.raceId);
|
const res = await getRaceUserById(this.$route.query.raceId);
|
||||||
@ -163,7 +49,8 @@ export default {
|
|||||||
// this.$router.replace({ path: `/jsxt/result`, query: { type: 'theory', raceId:this.$route.query.raceId } });
|
// this.$router.replace({ path: `/jsxt/result`, query: { type: 'theory', raceId:this.$route.query.raceId } });
|
||||||
this.$router.replace({ path: `/jsxt/theory/result?raceId=${this.$route.query.raceId}` });
|
this.$router.replace({ path: `/jsxt/theory/result?raceId=${this.$route.query.raceId}` });
|
||||||
} else if (this.$route.query.type == 'operation' && (res.data.status == 4 || res.data.status == 6)) {
|
} else if (this.$route.query.type == 'operation' && (res.data.status == 4 || res.data.status == 6)) {
|
||||||
this.$router.replace({ path: `/jsxt/result`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId, type: 'operate', raceId:this.$route.query.raceId } });
|
// this.resultFlag = true;
|
||||||
|
this.$router.replace({ path: `/jsxt/result`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId, type: 'operate', raceId:this.$route.query.raceId } });
|
||||||
} else {
|
} else {
|
||||||
this.resultFlag = true;
|
this.resultFlag = true;
|
||||||
}
|
}
|
||||||
@ -181,11 +68,15 @@ export default {
|
|||||||
this.$messageBox('试卷还没被加载');
|
this.$messageBox('试卷还没被加载');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
const mapIdData = await getRaceById(this.$route.query.raceId);
|
||||||
|
const lineCodeData = await getPublishMapInfo(mapIdData.data.mapId);
|
||||||
getPracticalQuestion(this.$route.query.raceId).then((responese)=>{
|
getPracticalQuestion(this.$route.query.raceId).then((responese)=>{
|
||||||
if (responese.data) {
|
if (responese.data) {
|
||||||
participantCreatTrainingRoom(this.$route.query.raceId, {mapId: 41, prdType: '03'}).then(resp => {
|
participantCreatTrainingRoom(this.$route.query.raceId, {mapId: mapIdData.data.mapId, prdType: '03'}).then(resp => {
|
||||||
const query = { lineCode: '11', mapId: '41', group: resp.data, raceId: this.$route.query.raceId};
|
const query = { lineCode: lineCodeData.data.lineCode, mapId: mapIdData.data.mapId, group: resp.data, raceId: this.$route.query.raceId};
|
||||||
this.$router.replace({ path: `/jointTrainingNew`, query: query});
|
this.$router.replace({ path: `/jointTrainingNew`, query: query});
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message.error('进入实操竞赛房间失败!');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox('试卷还没被加载');
|
this.$messageBox('试卷还没被加载');
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<span style="font-weight:bold ">{{ $t('exam.examResultsDetails') }}</span>
|
<span style="font-weight:bold ">{{ $t('exam.examResultsDetails') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="context">
|
<div class="context">
|
||||||
|
<div>{{ `得分:${operateScore}分` }}</div>
|
||||||
<!-- <el-form ref="form" :model="resultModel" size="mini">
|
<!-- <el-form ref="form" :model="resultModel" size="mini">
|
||||||
<el-form-item :label="this.$t('exam.testScores')+':'" prop="score">
|
<el-form-item :label="this.$t('exam.testScores')+':'" prop="score">
|
||||||
<span>{{ resultModel.score + ' '+ $t('exam.points') }}</span>
|
<span>{{ resultModel.score + ' '+ $t('exam.points') }}</span>
|
||||||
@ -12,25 +13,25 @@
|
|||||||
<span>{{ Math.ceil((resultModel.usedTime || 0)/60) + ' '+ $t('global.minutes') }}</span>
|
<span>{{ Math.ceil((resultModel.usedTime || 0)/60) + ' '+ $t('global.minutes') }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form> -->
|
</el-form> -->
|
||||||
<el-table :data="tableData" border style="width: 100%; min-height: 200px;" :summary-method="getSummaries" show-summary :span-method="objectSpanMethod">
|
<!--<el-table :data="tableData" border style="width: 100%; min-height: 200px;" :summary-method="getSummaries" show-summary :span-method="objectSpanMethod">-->
|
||||||
<el-table-column prop="title" label="题目">
|
<!--<el-table-column prop="title" label="题目">-->
|
||||||
<template slot-scope="scope">
|
<!--<template slot-scope="scope">-->
|
||||||
<div v-html="scope.row.title" />
|
<!--<div v-html="scope.row.title" />-->
|
||||||
</template>
|
<!--</template>-->
|
||||||
</el-table-column>>
|
<!--</el-table-column>>-->
|
||||||
<el-table-column prop="score" label="分值" />
|
<!--<el-table-column prop="score" label="分值" />-->
|
||||||
<el-table-column prop="goal" label="得分" />
|
<!--<el-table-column prop="goal" label="得分" />-->
|
||||||
<el-table-column v-if="this.$route.query.type ==='theory'" prop="correctAnswer" label="答题结果" />
|
<!--<el-table-column v-if="this.$route.query.type ==='theory'" prop="correctAnswer" label="答题结果" />-->
|
||||||
<el-table-column v-if="this.$route.query.type ==='theory'" prop="explain" label="说明" />
|
<!--<el-table-column v-if="this.$route.query.type ==='theory'" prop="explain" label="说明" />-->
|
||||||
<el-table-column v-if="this.$route.query.type ==='operate'" prop="scoringPointIndex" label="得分点">
|
<!--<el-table-column v-if="this.$route.query.type ==='operate'" prop="scoringPointIndex" label="得分点">-->
|
||||||
<template slot-scope="scope">
|
<!--<template slot-scope="scope">-->
|
||||||
<span>{{ '得分点'+scope.row.scoringPointIndex }}</span>
|
<!--<span>{{ '得分点'+scope.row.scoringPointIndex }}</span>-->
|
||||||
</template>
|
<!--</template>-->
|
||||||
</el-table-column>
|
<!--</el-table-column>-->
|
||||||
<el-table-column v-if="this.$route.query.type ==='operate'" prop="scoringPointScore" label="得分点分值" />
|
<!--<el-table-column v-if="this.$route.query.type ==='operate'" prop="scoringPointScore" label="得分点分值" />-->
|
||||||
<el-table-column v-if="this.$route.query.type ==='operate'" prop="scoringPointGoal" label="得分点得分" />
|
<!--<el-table-column v-if="this.$route.query.type ==='operate'" prop="scoringPointGoal" label="得分点得分" />-->
|
||||||
<el-table-column v-if="this.$route.query.type ==='operate'" prop="scoringPointExplain" label="得分点说明" />
|
<!--<el-table-column v-if="this.$route.query.type ==='operate'" prop="scoringPointExplain" label="得分点说明" />-->
|
||||||
</el-table>
|
<!--</el-table>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="draf_box">
|
<div class="draf_box">
|
||||||
<el-button type="primary " @click="back">返回首页</el-button>
|
<el-button type="primary " @click="back">返回首页</el-button>
|
||||||
@ -40,7 +41,7 @@
|
|||||||
<script>
|
<script>
|
||||||
// import { submitExam } from '@/api/management/userexam';
|
// import { submitExam } from '@/api/management/userexam';
|
||||||
// import { UrlConfig } from '@/scripts/ConstDic';
|
// import { UrlConfig } from '@/scripts/ConstDic';
|
||||||
import { getCompetitionDetail } from '@/api/competition';
|
import { getCompetitionDetail, getPracticalCompetitionResult } from '@/api/competition';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ExamResult',
|
name: 'ExamResult',
|
||||||
@ -69,7 +70,8 @@ export default {
|
|||||||
{ title: '4', score: '25', goal: '0', scoringPoints: [{score: '10', goal: '0', explain: '这是说明原因1'}, {score: '10', goal: '0', explain: '这是说明原因2'}, {score: '5', goal: '0', explain: '这是说明原因3'}] }
|
{ title: '4', score: '25', goal: '0', scoringPoints: [{score: '10', goal: '0', explain: '这是说明原因1'}, {score: '10', goal: '0', explain: '这是说明原因2'}, {score: '5', goal: '0', explain: '这是说明原因3'}] }
|
||||||
],
|
],
|
||||||
loading: true,
|
loading: true,
|
||||||
tableData: []
|
tableData: [],
|
||||||
|
operateScore: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -112,7 +114,6 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (this.$route.query.type == 'theory') {
|
if (this.$route.query.type == 'theory') {
|
||||||
getCompetitionDetail(this.$route.query.raceId).then(res => {
|
getCompetitionDetail(this.$route.query.raceId).then(res => {
|
||||||
console.log(res);
|
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
res.data.forEach(item => {
|
res.data.forEach(item => {
|
||||||
this.tableData.push({
|
this.tableData.push({
|
||||||
@ -126,15 +127,18 @@ export default {
|
|||||||
});
|
});
|
||||||
} else if (this.$route.query.type == 'operate') {
|
} else if (this.$route.query.type == 'operate') {
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
this.operateData.forEach(item => {
|
getPracticalCompetitionResult(this.$route.query.raceId).then(res => {
|
||||||
if (item.scoringPoints && item.scoringPoints.length) {
|
this.operateScore = res.data;
|
||||||
item.scoringPoints.forEach((elem, index) => {
|
|
||||||
this.tableData.push({
|
|
||||||
title: item.title, score: index ? 0 : item.score, goal: index ? 0 : item.goal, scoringPointLength: item.scoringPoints.length, scoringPointIndex: index + 1, scoringPointScore: elem.score, scoringPointGoal: elem.goal, scoringPointExplain: elem.explain
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
// this.operateData.forEach(item => {
|
||||||
|
// if (item.scoringPoints && item.scoringPoints.length) {
|
||||||
|
// item.scoringPoints.forEach((elem, index) => {
|
||||||
|
// this.tableData.push({
|
||||||
|
// title: item.title, score: index ? 0 : item.score, goal: index ? 0 : item.goal, scoringPointLength: item.scoringPoints.length, scoringPointIndex: index + 1, scoringPointScore: elem.score, scoringPointGoal: elem.goal, scoringPointExplain: elem.explain
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
back() {
|
back() {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- v-quickMenuDrag -->
|
<!-- v-quickMenuDrag -->
|
||||||
<div class="chatBox">
|
<div class="chatBox" :style="{'bottom':bottom+'px'}">
|
||||||
<div v-show="!minimize" class="chat-box">
|
<div v-show="!minimize" class="chat-box">
|
||||||
<chat-member-list ref="chatMemberList" :group="group" :current-coversition="currentCoversition" @addCoversition="addCoversition" />
|
<chat-member-list ref="chatMemberList" :group="group" :current-coversition="currentCoversition" @addCoversition="addCoversition" />
|
||||||
<div class="chat-box-main">
|
<div class="chat-box-main">
|
||||||
<chat-coversition-list ref="chatCoversitionList" @setCurrentCoversition="setCurrentCoversition" @setHeadTitle="setHeadTitle" />
|
<chat-coversition-list ref="chatCoversitionList" :user-role="userRole" @hideAddCoversition="hideAddCoversition" @setCurrentCoversition="setCurrentCoversition" @setHeadTitle="setHeadTitle" />
|
||||||
<div class="chat-window">
|
<div class="chat-window">
|
||||||
<div class="chat-box-header">
|
<div class="chat-box-header">
|
||||||
<div class="chat-box-header-title">{{ headerTitle }}</div>
|
<div class="chat-box-header-title">{{ headerTitle }}</div>
|
||||||
@ -30,7 +30,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="chat-box-footer">
|
<div class="chat-box-footer">
|
||||||
<div class="chat-box-footer-tool" />
|
<div class="chat-box-footer-tool" />
|
||||||
<div class="chat-box-footer-send" @click="startRecording()">发送语音</div>
|
<el-button v-if="isButtonShow" size="mini" type="danger" class="chat-box-footer-quit" :loading="quitLoading" @click="quitCoversition()">退出群聊</el-button>
|
||||||
|
<el-button v-if="currentCoversition.all||isButtonShow" class="chat-box-footer-send" size="mini" type="primary" :disabled="recordSending" @click="startRecording()">发送语音</el-button>
|
||||||
<div v-if="scriptTip" class="scriptTip">{{ scriptTip }}</div>
|
<div v-if="scriptTip" class="scriptTip">{{ scriptTip }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -54,7 +55,7 @@ import ChatCreateGroup from './chatCreateGroup';
|
|||||||
import ChatMemberList from './chatMemberList';
|
import ChatMemberList from './chatMemberList';
|
||||||
import ChatCoversitionList from './chatCoversitionList';
|
import ChatCoversitionList from './chatCoversitionList';
|
||||||
import RecordRTC from 'recordrtc';
|
import RecordRTC from 'recordrtc';
|
||||||
import {uploadAudioFileNew} from '@/api/chat';
|
import {uploadAudioFileNew, quitCoversition} from '@/api/chat';
|
||||||
export default {
|
export default {
|
||||||
name: 'ChatBox',
|
name: 'ChatBox',
|
||||||
components:{
|
components:{
|
||||||
@ -77,10 +78,13 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
minimize:true,
|
minimize:true,
|
||||||
|
bottom:15,
|
||||||
recordSending:false,
|
recordSending:false,
|
||||||
currentCoversition:{},
|
currentCoversition:{},
|
||||||
seconds:0,
|
seconds:0,
|
||||||
inter:null,
|
inter:null,
|
||||||
|
isHasCoversition:false,
|
||||||
|
quitLoading:false,
|
||||||
recorders: null,
|
recorders: null,
|
||||||
microphone:null,
|
microphone:null,
|
||||||
scriptTip:'',
|
scriptTip:'',
|
||||||
@ -93,7 +97,10 @@ export default {
|
|||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
isShow() {
|
isShow() {
|
||||||
return this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE';
|
return this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE' && !this.isHasCoversition;
|
||||||
|
},
|
||||||
|
isButtonShow() {
|
||||||
|
return this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE' && this.isHasCoversition;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -114,6 +121,13 @@ export default {
|
|||||||
},
|
},
|
||||||
'$store.state.socket.scriptFinish':function(val, old) {
|
'$store.state.socket.scriptFinish':function(val, old) {
|
||||||
this.$message('剧本执行完成');
|
this.$message('剧本执行完成');
|
||||||
|
},
|
||||||
|
'$store.state.map.mapViewLoadedCount':function(val) {
|
||||||
|
const object = document.querySelector('.menuButton');
|
||||||
|
if (object) {
|
||||||
|
const objectBottom = parseInt(object.offsetHeight.style.bottom) || 0;
|
||||||
|
this.bottom = this.bottom + object.offsetHeight + objectBottom;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -136,21 +150,39 @@ export default {
|
|||||||
setSetting(data) {
|
setSetting(data) {
|
||||||
this.form = data;
|
this.form = data;
|
||||||
},
|
},
|
||||||
|
hideAddCoversition() {
|
||||||
|
this.isHasCoversition = true;
|
||||||
|
},
|
||||||
setCurrentCoversition(coversition) {
|
setCurrentCoversition(coversition) {
|
||||||
this.currentCoversition = coversition;
|
if (coversition && coversition.id) {
|
||||||
if (coversition.all) {
|
this.currentCoversition = coversition;
|
||||||
this.headerTitle = coversition.name;
|
this.headerTitle = coversition.name;
|
||||||
|
} else {
|
||||||
|
this.headerTitle = '';
|
||||||
}
|
}
|
||||||
if (this.recordSending) {
|
if (this.recordSending) {
|
||||||
this.cancleRecording();
|
this.cancleRecording();
|
||||||
}
|
}
|
||||||
this.$refs.chatContent.scrollTop();
|
this.$refs.chatContent.scrollTop();
|
||||||
},
|
},
|
||||||
|
quitCoversition() {
|
||||||
|
this.quitLoading = true;
|
||||||
|
quitCoversition(this.group, this.currentCoversition.id).then(res=>{
|
||||||
|
this.quitLoading = false;
|
||||||
|
this.currentCoversition = {all:undefined, id:null};
|
||||||
|
this.$refs.chatCoversitionList.initPage(true);
|
||||||
|
this.isHasCoversition = false;
|
||||||
|
}).catch(error=>{
|
||||||
|
this.$messageBox('退出会话失败: ' + error.message);
|
||||||
|
this.quitLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
setHeadTitle(headerTitle) {
|
setHeadTitle(headerTitle) {
|
||||||
this.headerTitle = headerTitle;
|
this.headerTitle = headerTitle;
|
||||||
},
|
},
|
||||||
addCoversition({data, headerTitle}) {
|
addCoversition({data, headerTitle}) {
|
||||||
this.$refs.chatCoversitionList.addCoversition(data, headerTitle);
|
this.$refs.chatCoversitionList.addCoversition(data, headerTitle);
|
||||||
|
this.isHasCoversition = true;
|
||||||
this.currentCoversition = {id:data.id, all:data.all};
|
this.currentCoversition = {id:data.id, all:data.all};
|
||||||
this.headerTitle = headerTitle;
|
this.headerTitle = headerTitle;
|
||||||
},
|
},
|
||||||
@ -273,13 +305,22 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.chat-box-footer-quit{
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 5px 15px;
|
||||||
|
color: #fff;
|
||||||
|
float: left;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
.chatBox{
|
.chatBox{
|
||||||
width: 503px;
|
width: 503px;
|
||||||
// height: 400px;
|
// height: 400px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
padding-left:5px;
|
padding-left:5px;
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom:28px;
|
bottom:15px;
|
||||||
z-index:22;
|
z-index:22;
|
||||||
}
|
}
|
||||||
.chat-box{
|
.chat-box{
|
||||||
@ -339,17 +380,13 @@ export default {
|
|||||||
height: 30px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
.chat-box-footer-send{
|
.chat-box-footer-send{
|
||||||
background: #36a2fd;
|
|
||||||
width: 65px;
|
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
padding: 5px 0px 4px 0px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-radius: 3px;
|
|
||||||
color: #fff;
|
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
padding: 5px 15px;
|
||||||
}
|
}
|
||||||
.minimality {
|
.minimality {
|
||||||
float: right;
|
float: right;
|
||||||
@ -377,6 +414,10 @@ export default {
|
|||||||
.coversition-list{
|
.coversition-list{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.chat-box-footer-send.disbled{
|
||||||
|
cursor: no-drop;
|
||||||
|
}
|
||||||
|
|
||||||
.scriptTip{
|
.scriptTip{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 260px;
|
width: 260px;
|
||||||
|
@ -70,20 +70,22 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
inintData() {
|
inintData() {
|
||||||
getSimulationContextListNew(this.$route.query.group, this.coversition.id).then(res=>{
|
if (this.coversition.id) {
|
||||||
const userId = this.$store.state.user.id;
|
getSimulationContextListNew(this.$route.query.group, this.coversition.id).then(res=>{
|
||||||
const coversitionList = res.data.map(coversition=>{
|
const userId = this.$store.state.user.id;
|
||||||
coversition.self = false;
|
const coversitionList = res.data.map(coversition=>{
|
||||||
if (coversition.member.userId == userId) {
|
coversition.self = false;
|
||||||
coversition.self = true;
|
if (coversition.member.userId == userId) {
|
||||||
}
|
coversition.self = true;
|
||||||
coversition.src = coversition.isAudio ? `/jlcloud/audio/${coversition.audioPath}` : '';
|
}
|
||||||
coversition.targetUser = coversition.targetMember ? coversition.targetMember : 'All';
|
coversition.src = coversition.isAudio ? `/audio/${coversition.audioPath}` : '';
|
||||||
return coversition;
|
coversition.targetUser = coversition.targetMember ? coversition.targetMember : 'All';
|
||||||
|
return coversition;
|
||||||
|
});
|
||||||
|
this.chatContentList = coversitionList;
|
||||||
|
this.scrollTop();
|
||||||
});
|
});
|
||||||
this.chatContentList = coversitionList;
|
}
|
||||||
this.scrollTop();
|
|
||||||
});
|
|
||||||
// const coversitionListAll = Object.assign({}, this.$store.state.socket.coversitionList);
|
// const coversitionListAll = Object.assign({}, this.$store.state.socket.coversitionList);
|
||||||
// const coversitionList = coversitionListAll[this.coversition.id] || [];
|
// const coversitionList = coversitionListAll[this.coversition.id] || [];
|
||||||
// // console.log('inintData---coversitionList' + JSON.stringify(this.$store.state.socket.coversitionList[this.coversition.id]));
|
// // console.log('inintData---coversitionList' + JSON.stringify(this.$store.state.socket.coversitionList[this.coversition.id]));
|
||||||
|
@ -7,45 +7,63 @@
|
|||||||
:key="coversition.id"
|
:key="coversition.id"
|
||||||
:class="coversition.id==currentCoversition.id?'coversition-active each-coversition':'each-coversition'"
|
:class="coversition.id==currentCoversition.id?'coversition-active each-coversition':'each-coversition'"
|
||||||
@click="changeCoversition(coversition)"
|
@click="changeCoversition(coversition)"
|
||||||
>{{ coversition.coverName }}</div>
|
>{{ coversition.name }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
|
||||||
import Cookies from 'js-cookie';
|
|
||||||
import {getSimulationConversationListNew} from '@/api/chat';
|
import {getSimulationConversationListNew} from '@/api/chat';
|
||||||
export default {
|
export default {
|
||||||
name:'ChatCoversitionList',
|
name:'ChatCoversitionList',
|
||||||
|
props: {
|
||||||
|
userRole: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
coversitionList:[],
|
coversitionList:[],
|
||||||
currentCoversition:{}
|
currentCoversition:{}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
watch:{
|
||||||
|
'userRole':function(val) {
|
||||||
|
this.initPage(true);
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initPage(true);
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
initPage(status) {
|
initPage(status) {
|
||||||
getSimulationConversationListNew(this.$route.query.group).then(resp=>{
|
getSimulationConversationListNew(this.$route.query.group).then(resp=>{
|
||||||
if (resp.data) {
|
if (resp.data) {
|
||||||
const data = resp.data;
|
const data = resp.data;
|
||||||
data.map(coversition=>{
|
if (this.userRole == 'ADMIN' || this.userRole == 'AUDIENCE') {
|
||||||
if (coversition.name) {
|
this.coversitionList = data;
|
||||||
coversition.coverName = coversition.name;
|
} else {
|
||||||
coversition.isOnline = true;
|
this.coversitionList = data.filter(coversition=>{ return coversition.all == false; });
|
||||||
} else {
|
if (this.coversitionList.length >= 1) {
|
||||||
const objectCover = this.handleMemberName(coversition);
|
this.$emit('hideAddCoversition');
|
||||||
coversition.coverName = objectCover.coversitionName;
|
|
||||||
coversition.isOnline = objectCover.isOnline;
|
|
||||||
}
|
}
|
||||||
return coversition;
|
}
|
||||||
});
|
|
||||||
this.coversitionList = data;
|
|
||||||
if (resp.data && resp.data.length && resp.data.length > 0 && status) {
|
if (resp.data && resp.data.length && resp.data.length > 0 && status) {
|
||||||
this.currentCoversition = data[0];
|
if (this.userRole == 'ADMIN' || this.userRole == 'AUDIENCE') {
|
||||||
this.$emit('setCurrentCoversition', resp.data[0]);
|
this.currentCoversition = data[0];
|
||||||
|
this.$emit('setCurrentCoversition', resp.data[0]);
|
||||||
|
} else {
|
||||||
|
if (this.coversitionList.length >= 1) {
|
||||||
|
this.currentCoversition = data[0];
|
||||||
|
this.$emit('setCurrentCoversition', resp.data[0]);
|
||||||
|
} else {
|
||||||
|
this.currentCoversition = null;
|
||||||
|
this.$emit('setCurrentCoversition', this.currentCoversition);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (resp.data && resp.data.length && resp.data.length > 0 && !status) {
|
||||||
|
const coversition = data.filter(coversition=>{ return coversition.all == false; });
|
||||||
|
this.currentCoversition = coversition[0];
|
||||||
|
this.$emit('setCurrentCoversition', coversition[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -53,82 +71,22 @@ export default {
|
|||||||
addCoversition(data, headerTitle) {
|
addCoversition(data, headerTitle) {
|
||||||
const index = this.coversitionList.findIndex(item=>{ return item.id == data.id; });
|
const index = this.coversitionList.findIndex(item=>{ return item.id == data.id; });
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
const objectCover = this.handleMemberName(data);
|
|
||||||
if (data.name) {
|
|
||||||
data.coverName = data.name;
|
|
||||||
data.isOnline = true;
|
|
||||||
} else {
|
|
||||||
data.coverName = objectCover.coversitionName;
|
|
||||||
data.isOnline = objectCover.isOnline;
|
|
||||||
}
|
|
||||||
this.coversitionList.push(data);
|
this.coversitionList.push(data);
|
||||||
if (headerTitle) {
|
this.currentCoversition = data;
|
||||||
this.currentCoversition = data;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changeCoversition(coversition) {
|
changeCoversition(coversition) {
|
||||||
this.$emit('setHeadTitle', coversition.coverName);
|
this.$emit('setHeadTitle', coversition.name);
|
||||||
this.currentCoversition = {id:coversition.id, all:coversition.all};
|
this.currentCoversition = {id:coversition.id, all:coversition.all};
|
||||||
this.$emit('setCurrentCoversition', coversition);
|
this.$emit('setCurrentCoversition', coversition);
|
||||||
// this.$refs.chatContent.reloadData(this.currentCoversition);
|
// this.$refs.chatContent.reloadData(this.currentCoversition);
|
||||||
},
|
},
|
||||||
changeCoversitionOther(coversition) {
|
changeCoversitionOther(coversition) {
|
||||||
const objectCover = this.handleMemberName(coversition);
|
|
||||||
coversition.coverName = objectCover.coversitionName;
|
|
||||||
coversition.isOnline = objectCover.isOnline;
|
|
||||||
const index = this.coversitionList.findIndex(item=>{ return item.id == coversition.id; });
|
const index = this.coversitionList.findIndex(item=>{ return item.id == coversition.id; });
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
this.coversitionList.push(coversition);
|
this.coversitionList.push(coversition);
|
||||||
}
|
}
|
||||||
this.changeCoversition(coversition);
|
this.changeCoversition(coversition);
|
||||||
},
|
|
||||||
handleMemberName(conversition) {
|
|
||||||
if (conversition.all) {
|
|
||||||
return {coversitionName:conversition.name, isOnline:true};
|
|
||||||
} else {
|
|
||||||
let coversitionName = '';
|
|
||||||
let isOnline = true;
|
|
||||||
if (conversition.memberList) {
|
|
||||||
conversition.memberList.forEach(member=>{
|
|
||||||
if (member.userId != this.$store.state.user.id) {
|
|
||||||
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
|
||||||
let data = member.role;
|
|
||||||
roleTypeList.forEach(function(element) {
|
|
||||||
const rolename = element.value;
|
|
||||||
if (Cookies.get('user_lang') == 'en') {
|
|
||||||
data = data.replace(rolename, element.enLabel);
|
|
||||||
} else {
|
|
||||||
data = data.replace(rolename, element.label);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const deviceName = member.deviceName ? '-' + member.deviceName : '';
|
|
||||||
const memberName = member.name ? '-' + member.name : '';
|
|
||||||
isOnline = member.online;
|
|
||||||
coversitionName = data + deviceName + memberName;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else if (conversition.member) {
|
|
||||||
const member = conversition.member;
|
|
||||||
let data = member.role;
|
|
||||||
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
|
||||||
roleTypeList.forEach(function(element) {
|
|
||||||
const rolename = element.value;
|
|
||||||
if (Cookies.get('user_lang') == 'en') {
|
|
||||||
data = data.replace(rolename, element.enLabel);
|
|
||||||
} else {
|
|
||||||
data = data.replace(rolename, element.label);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const deviceName = member.deviceName ? '-' + member.deviceName : '';
|
|
||||||
const memberName = member.name ? '-' + member.name : '';
|
|
||||||
isOnline = member.online;
|
|
||||||
coversitionName = data + deviceName + memberName;
|
|
||||||
} else {
|
|
||||||
coversitionName = conversition.name;
|
|
||||||
}
|
|
||||||
return {coversitionName:coversitionName, isOnline:isOnline};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -51,26 +51,29 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
getSimulationMembers() {
|
getSimulationMembers() {
|
||||||
getSimulationChatMemberNew(this.$route.query.group, this.currentCoversition.id).then(resp => {
|
this.memberList = [];
|
||||||
let lastData = JSON.stringify(resp.data);
|
if (this.currentCoversition.id) {
|
||||||
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
getSimulationChatMemberNew(this.$route.query.group, this.currentCoversition.id).then(resp => {
|
||||||
roleTypeList.forEach(function(element) {
|
let lastData = JSON.stringify(resp.data);
|
||||||
const rolename = element.value;
|
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
||||||
if (Cookies.get('user_lang') == 'en') {
|
roleTypeList.forEach(function(element) {
|
||||||
lastData = lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
|
const rolename = element.value;
|
||||||
} else {
|
if (Cookies.get('user_lang') == 'en') {
|
||||||
lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
|
lastData = lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
|
||||||
}
|
} else {
|
||||||
|
lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
lastData = JSON.parse(lastData);
|
||||||
|
lastData.map(member=>{
|
||||||
|
const deviceName = member.deviceName ? '-' + member.deviceName : '';
|
||||||
|
const memberName = member.name ? '-' + member.name : '';
|
||||||
|
member.memberName = member.role + deviceName + memberName;
|
||||||
|
return member;
|
||||||
|
});
|
||||||
|
this.memberList = lastData;
|
||||||
});
|
});
|
||||||
lastData = JSON.parse(lastData);
|
}
|
||||||
lastData.map(member=>{
|
|
||||||
const deviceName = member.deviceName ? '-' + member.deviceName : '';
|
|
||||||
const memberName = member.name ? '-' + member.name : '';
|
|
||||||
member.memberName = member.role + deviceName + memberName;
|
|
||||||
return member;
|
|
||||||
});
|
|
||||||
this.memberList = lastData;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
getMember(memberId) {
|
getMember(memberId) {
|
||||||
return this.memberList.filter(member=>{
|
return this.memberList.filter(member=>{
|
||||||
|
@ -89,25 +89,25 @@ export default {
|
|||||||
const day = date.getDay();
|
const day = date.getDay();
|
||||||
switch (day) {
|
switch (day) {
|
||||||
case 0:
|
case 0:
|
||||||
this.dayString = '星 期 一';
|
this.dayString = '星 期 日';
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
this.dayString = '星 期 二';
|
this.dayString = '星 期 一';
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
this.dayString = '星 期 三';
|
this.dayString = '星 期 二';
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
this.dayString = '星 期 四';
|
this.dayString = '星 期 三';
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
this.dayString = '星 期 五';
|
this.dayString = '星 期 四';
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
this.dayString = '星 期 六';
|
this.dayString = '星 期 五';
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
this.dayString = '星 期 日';
|
this.dayString = '星 期 六';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- v-quickMenuDrag -->
|
<!-- v-quickMenuDrag -->
|
||||||
<div class="chatBox">
|
<div class="chatBox" :style="{'bottom':bottom+'px'}">
|
||||||
<div v-show="!minimize" class="chat-box">
|
<div v-show="!minimize" class="chat-box">
|
||||||
<chat-member-list ref="chatMemberList" :group="group" :current-coversition="currentCoversition" />
|
<chat-member-list ref="chatMemberList" :group="group" :current-coversition="currentCoversition" />
|
||||||
<div class="chat-box-main">
|
<div class="chat-box-main">
|
||||||
<chat-coversition-list ref="chatCoversitionList" :group="group" :user-role="userRole" @showAddCoverition="showAddCoverition" @hideAddCoversition="hideAddCoversition" @setCurrentCoversition="setCurrentCoversition" @setHeadTitle="setHeadTitle" />
|
<chat-coversition-list ref="chatCoversitionList" :user-role="userRole" @hideAddCoversition="hideAddCoversition" @setCurrentCoversition="setCurrentCoversition" @setHeadTitle="setHeadTitle" />
|
||||||
<div class="chat-window">
|
<div class="chat-window">
|
||||||
<div class="chat-box-header">
|
<div class="chat-box-header">
|
||||||
<div class="chat-box-header-title">{{ headerTitle }}</div>
|
<div class="chat-box-header-title">{{ headerTitle }}</div>
|
||||||
@ -30,7 +30,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="chat-box-footer">
|
<div class="chat-box-footer">
|
||||||
<div class="chat-box-footer-tool" />
|
<div class="chat-box-footer-tool" />
|
||||||
<div v-if="currentCoversition.all||isButtonShow" class="chat-box-footer-send" @click="startRecording()">发送语音</div>
|
<el-button v-if="isButtonShow" size="mini" type="danger" class="chat-box-footer-quit" :loading="quitLoading" @click="quitCoversition()">退出群聊</el-button>
|
||||||
|
<el-button v-if="currentCoversition.all||isButtonShow" class="chat-box-footer-send" size="mini" type="primary" :disabled="recordSending" @click="startRecording()">发送语音</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -54,7 +55,7 @@ import ChatCoversitionList from './chatCoversitionList';
|
|||||||
import ChatCreateGroup from './chatCreateGroup';
|
import ChatCreateGroup from './chatCreateGroup';
|
||||||
import ChatTooltip from './chatTooltip';
|
import ChatTooltip from './chatTooltip';
|
||||||
import RecordRTC from 'recordrtc';
|
import RecordRTC from 'recordrtc';
|
||||||
import {uploadAudioFileNew} from '@/api/chat';
|
import {uploadAudioFileNew, quitCoversition} from '@/api/chat';
|
||||||
export default {
|
export default {
|
||||||
name: 'ChatBox',
|
name: 'ChatBox',
|
||||||
components:{
|
components:{
|
||||||
@ -78,6 +79,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
minimize:false,
|
minimize:false,
|
||||||
|
bottom:15,
|
||||||
recordSending:false,
|
recordSending:false,
|
||||||
currentCoversition:{},
|
currentCoversition:{},
|
||||||
seconds:0,
|
seconds:0,
|
||||||
@ -85,6 +87,7 @@ export default {
|
|||||||
recorders: null,
|
recorders: null,
|
||||||
microphone:null,
|
microphone:null,
|
||||||
isHasCoversition:false,
|
isHasCoversition:false,
|
||||||
|
quitLoading:false,
|
||||||
form:{
|
form:{
|
||||||
language:'zh',
|
language:'zh',
|
||||||
sex:'1'
|
sex:'1'
|
||||||
@ -100,6 +103,15 @@ export default {
|
|||||||
return this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE' && this.isHasCoversition;
|
return this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE' && this.isHasCoversition;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch:{
|
||||||
|
'$store.state.map.mapViewLoadedCount':function(val) {
|
||||||
|
const object = document.querySelector('.menuButton');
|
||||||
|
if (object) {
|
||||||
|
const objectBottom = parseInt(object.offsetHeight.style.bottom) || 0;
|
||||||
|
this.bottom = this.bottom + object.offsetHeight + objectBottom;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initPage();
|
this.initPage();
|
||||||
},
|
},
|
||||||
@ -121,7 +133,7 @@ export default {
|
|||||||
this.$refs.chatCoversitionList.initPage(false);
|
this.$refs.chatCoversitionList.initPage(false);
|
||||||
},
|
},
|
||||||
setCurrentCoversition(coversition) {
|
setCurrentCoversition(coversition) {
|
||||||
if (coversition) {
|
if (coversition.id) {
|
||||||
this.currentCoversition = coversition;
|
this.currentCoversition = coversition;
|
||||||
this.headerTitle = coversition.name;
|
this.headerTitle = coversition.name;
|
||||||
} else {
|
} else {
|
||||||
@ -138,8 +150,17 @@ export default {
|
|||||||
hideAddCoversition() {
|
hideAddCoversition() {
|
||||||
this.isHasCoversition = true;
|
this.isHasCoversition = true;
|
||||||
},
|
},
|
||||||
showAddCoverition() {
|
quitCoversition() {
|
||||||
this.isHasCoversition = false;
|
this.quitLoading = true;
|
||||||
|
quitCoversition(this.group, this.currentCoversition.id).then(res=>{
|
||||||
|
this.currentCoversition = {all:undefined, id:null};
|
||||||
|
this.$refs.chatCoversitionList.initPage(true);
|
||||||
|
this.isHasCoversition = false;
|
||||||
|
this.quitLoading = false;
|
||||||
|
}).catch(error=>{
|
||||||
|
this.$messageBox('退出会话失败: ' + error.message);
|
||||||
|
this.quitLoading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
addCoversition({data, headerTitle}) {
|
addCoversition({data, headerTitle}) {
|
||||||
this.$refs.chatCoversitionList.addCoversition(data);
|
this.$refs.chatCoversitionList.addCoversition(data);
|
||||||
@ -360,7 +381,19 @@ export default {
|
|||||||
.coversition-list{
|
.coversition-list{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.chat-box-footer-quit{
|
||||||
|
background: red;
|
||||||
|
width: 65px;
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 5px 0px 4px 0px;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 3px;
|
||||||
|
color: #fff;
|
||||||
|
float: left;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
.showMembers{
|
.showMembers{
|
||||||
float: right;
|
float: right;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
@ -432,6 +465,9 @@ export default {
|
|||||||
background: #eeeeee;
|
background: #eeeeee;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
.chat-box-footer-send.disbled{
|
||||||
|
cursor: no-drop;
|
||||||
|
}
|
||||||
|
|
||||||
.minimize-box {
|
.minimize-box {
|
||||||
width: 97.5%;
|
width: 97.5%;
|
||||||
|
@ -94,7 +94,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
inintData() {
|
inintData() {
|
||||||
if (this.coversition) {
|
if (this.coversition.id) {
|
||||||
getSimulationContextListNew(this.$route.query.group, this.coversition.id).then(res=>{
|
getSimulationContextListNew(this.$route.query.group, this.coversition.id).then(res=>{
|
||||||
const userId = this.$store.state.user.id;
|
const userId = this.$store.state.user.id;
|
||||||
const coversitionList = res.data.map(coversition=>{
|
const coversitionList = res.data.map(coversition=>{
|
||||||
|
@ -15,14 +15,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {getSimulationConversationListNew, quitCoversition} from '@/api/chat';
|
import {getSimulationConversationListNew} from '@/api/chat';
|
||||||
export default {
|
export default {
|
||||||
name:'ChatCoversitionList',
|
name:'ChatCoversitionList',
|
||||||
props: {
|
props: {
|
||||||
group: {
|
|
||||||
type: String,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
userRole: {
|
userRole: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
@ -95,14 +91,6 @@ export default {
|
|||||||
this.coversitionList.push(coversition);
|
this.coversitionList.push(coversition);
|
||||||
}
|
}
|
||||||
this.changeCoversition(coversition);
|
this.changeCoversition(coversition);
|
||||||
},
|
|
||||||
closeCoversition(coversitionId) {
|
|
||||||
quitCoversition(this.group, coversitionId).then(res=>{
|
|
||||||
this.initPage(true);
|
|
||||||
this.$emit('showAddCoverition');
|
|
||||||
}).catch(error=>{
|
|
||||||
this.$messageBox('退出会话失败: ' + error.message);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -59,7 +59,7 @@ export default {
|
|||||||
methods:{
|
methods:{
|
||||||
getSimulationMembers() {
|
getSimulationMembers() {
|
||||||
this.memberList = [];
|
this.memberList = [];
|
||||||
if (this.currentCoversition) {
|
if (this.currentCoversition.id) {
|
||||||
getSimulationChatMemberNew(this.$route.query.group, this.currentCoversition.id).then(resp => {
|
getSimulationChatMemberNew(this.$route.query.group, this.currentCoversition.id).then(resp => {
|
||||||
let lastData = JSON.stringify(resp.data);
|
let lastData = JSON.stringify(resp.data);
|
||||||
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
||||||
|
@ -34,7 +34,7 @@ import { putJointTrainingSimulationUserNew} from '@/api/jointTraining';
|
|||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
import { getSessionStorage } from '@/utils/auth';
|
import { getSessionStorage } from '@/utils/auth';
|
||||||
import RealDevice from './menuDraft/realDevice';
|
import RealDevice from './menuDraft/realDevice';
|
||||||
import { participantCompleteCompetition, refereeExitSimulation, quitCurrentRace } from '@/api/competition';
|
import { participantCompleteCompetition, refereeExitSimulation, quitCurrentRace, startPracticalCompetition, submitPracticalCompetition } from '@/api/competition';
|
||||||
import { prefixIntrger } from '@/utils/date';
|
import { prefixIntrger } from '@/utils/date';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -314,11 +314,11 @@ export default {
|
|||||||
return `${hh}:${mm}:${ss}`;
|
return `${hh}:${mm}:${ss}`;
|
||||||
},
|
},
|
||||||
startCompetition() {
|
startCompetition() {
|
||||||
const date = new Date(this.$store.state.training.initTime || null);
|
startPracticalCompetition(this.group, this.$route.query.raceId).then(resp => {
|
||||||
const model = {
|
this.jsStart = false;
|
||||||
initTime: this.formatTime(date)
|
}).catch(()=> {
|
||||||
};
|
this.$message.error('开始竞赛失败');
|
||||||
this.start(model);
|
});
|
||||||
},
|
},
|
||||||
endCompetition() {
|
endCompetition() {
|
||||||
this.$confirm('此操作将结束并提交本次竞赛,是否继续', this.$t('global.tips'), {
|
this.$confirm('此操作将结束并提交本次竞赛,是否继续', this.$t('global.tips'), {
|
||||||
@ -326,11 +326,11 @@ export default {
|
|||||||
cancelButtonText: this.$t('global.cancel'),
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
participantCompleteCompetition(this.$route.query.raceId, this.group).then(resp => {
|
submitPracticalCompetition(this.group, this.$route.query.raceId).then(resp => {
|
||||||
// this.$router.go(-1);
|
// this.$router.go(-1);
|
||||||
this.submit();
|
this.submit();
|
||||||
}).catch(()=> {
|
}).catch(()=> {
|
||||||
this.$message.success('提交试卷失败!');
|
this.$message.error('提交试卷失败!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -287,6 +287,9 @@ export default {
|
|||||||
let startOffset = 0;
|
let startOffset = 0;
|
||||||
const sectionMap = {};
|
const sectionMap = {};
|
||||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||||
|
const sectionModel = deepAssign({}, section);
|
||||||
|
sectionModel.lengthFact = Number(sectionModel.logicSectionCodeList.reduce((pre, code) => pre + Number(this.$store.getters['map/getDeviceByCode'](code).lengthFact), 0).toFixed(3));
|
||||||
|
models.push(sectionModel);
|
||||||
section.logicSectionCodeList.forEach(sectionCode => {
|
section.logicSectionCodeList.forEach(sectionCode => {
|
||||||
const logicSection = this.$store.getters['map/getDeviceByCode'](sectionCode);
|
const logicSection = this.$store.getters['map/getDeviceByCode'](sectionCode);
|
||||||
sectionMap[logicSection.points[0].x + 's' + logicSection.points[0].y] = logicSection;
|
sectionMap[logicSection.points[0].x + 's' + logicSection.points[0].y] = logicSection;
|
||||||
|
@ -193,8 +193,8 @@ export default {
|
|||||||
{ prop: 'sepTypeLeft', label: this.$t('map.sepTypeLeft'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSwitchSectionType },
|
{ prop: 'sepTypeLeft', label: this.$t('map.sepTypeLeft'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSwitchSectionType },
|
||||||
{ prop: 'sepTypeRight', label: this.$t('map.sepTypeRight'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSwitchSectionType },
|
{ prop: 'sepTypeRight', label: this.$t('map.sepTypeRight'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSwitchSectionType },
|
||||||
{ prop: 'points', label: this.$t('map.segmentCoordinates'), type: 'points', width: '100px', isHidden: !this.isPointsShow, addPoint: this.addPoint, delPoint: this.delPoint, lastDisabled: true },
|
{ prop: 'points', label: this.$t('map.segmentCoordinates'), type: 'points', width: '100px', isHidden: !this.isPointsShow, addPoint: this.addPoint, delPoint: this.delPoint, lastDisabled: true },
|
||||||
{ prop: 'logicSectionStartOffset', label: this.$t('map.logicalSectionStartOffset'), type: 'number', min: 0, width: '150px', isHidden: !this.isStationCodeDisabled, disabled: true },
|
{ prop: 'logicSectionStartOffset', label: this.$t('map.logicalSectionStartOffset'), type: 'number', min: 0, width: '150px', isHidden: !this.isStationCodeDisabled, disabled: true }, // 逻辑区段起点偏移
|
||||||
{ prop: 'logicSectionEndOffset', label: this.$t('map.logicalSectionEndOffset'), type: 'number', min: 0, width: '150px', isHidden: !this.isStationCodeDisabled, disabled: true },
|
{ prop: 'logicSectionEndOffset', label: this.$t('map.logicalSectionEndOffset'), type: 'number', min: 0, width: '150px', isHidden: !this.isStationCodeDisabled, disabled: true }, // 逻辑区段终点偏移
|
||||||
{ prop: 'standTrack', label: this.$t('map.isStandTrack'), type: 'checkbox', isHidden: !this.isLogicSectionNameSort }, // 是否站台轨
|
{ prop: 'standTrack', label: this.$t('map.isStandTrack'), type: 'checkbox', isHidden: !this.isLogicSectionNameSort }, // 是否站台轨
|
||||||
|
|
||||||
{ prop: 'standTrackName', label: this.$t('map.standTrackName'), type: 'input', isHidden: !this.isstandTrackNameShow },
|
{ prop: 'standTrackName', label: this.$t('map.standTrackName'), type: 'input', isHidden: !this.isstandTrackNameShow },
|
||||||
@ -568,7 +568,7 @@ export default {
|
|||||||
}
|
}
|
||||||
const changeSectionList = this.handleOtherSectionChange(model);
|
const changeSectionList = this.handleOtherSectionChange(model);
|
||||||
const changeStandList = this.handleRelevanceStand(model);
|
const changeStandList = this.handleRelevanceStand(model);
|
||||||
models = [model, ...changeSectionList, ...changeStandList];
|
models = [...changeSectionList, ...changeStandList];
|
||||||
|
|
||||||
this.$emit('updateMapModel', models);
|
this.$emit('updateMapModel', models);
|
||||||
this.oldPoint = JSON.parse(JSON.stringify(model.points));
|
this.oldPoint = JSON.parse(JSON.stringify(model.points));
|
||||||
@ -593,7 +593,7 @@ export default {
|
|||||||
return models;
|
return models;
|
||||||
},
|
},
|
||||||
handleOtherSectionChange(model) { // 处理该区段改变导致的相关区段的变化
|
handleOtherSectionChange(model) { // 处理该区段改变导致的相关区段的变化
|
||||||
const models = [];
|
let models = [model];
|
||||||
const pointModel = [];
|
const pointModel = [];
|
||||||
const slope1 = (this.oldPoint[this.oldPoint.length - 1].y - this.oldPoint[0].y) / (this.oldPoint[this.oldPoint.length - 1].x - this.oldPoint[0].x);
|
const slope1 = (this.oldPoint[this.oldPoint.length - 1].y - this.oldPoint[0].y) / (this.oldPoint[this.oldPoint.length - 1].x - this.oldPoint[0].x);
|
||||||
this.sectionList.forEach(section => {
|
this.sectionList.forEach(section => {
|
||||||
@ -634,7 +634,7 @@ export default {
|
|||||||
return pre + Number(length);
|
return pre + Number(length);
|
||||||
}, 0);
|
}, 0);
|
||||||
lengthFact += model.lengthFact;
|
lengthFact += model.lengthFact;
|
||||||
copySection.lengthFact = lengthFact.toFixed(3); // 自动获取 物理区段的 实际长度 是由逻辑区段相加
|
copySection.lengthFact = Number(lengthFact.toFixed(3)); // 自动获取 物理区段的 实际长度 是由逻辑区段相加
|
||||||
if (copySection.lengthFact > 5) {
|
if (copySection.lengthFact > 5) {
|
||||||
copySection.leftStopPointOffset = copySection.leftStopPointOffset || 5;
|
copySection.leftStopPointOffset = copySection.leftStopPointOffset || 5;
|
||||||
copySection.rightStopPointOffset = copySection.rightStopPointOffset || copySection.lengthFact - 5;
|
copySection.rightStopPointOffset = copySection.rightStopPointOffset || copySection.lengthFact - 5;
|
||||||
@ -669,6 +669,50 @@ export default {
|
|||||||
models.push(item);
|
models.push(item);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!model.parentCode) {
|
||||||
|
const arr = this.setLogicOffset(model, models);
|
||||||
|
models = [...models, ...arr];
|
||||||
|
} else {
|
||||||
|
const sectionModel = this.$store.getters['map/getDeviceByCode'](model.parentCode);
|
||||||
|
const arr = this.setLogicOffset(sectionModel, models);
|
||||||
|
models = [...models, ...arr];
|
||||||
|
}
|
||||||
|
|
||||||
|
return models;
|
||||||
|
},
|
||||||
|
selectSectionCode(code, list) {
|
||||||
|
let model = list.find(ele => ele.code == code);
|
||||||
|
if (!model) {
|
||||||
|
model = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
|
} else {
|
||||||
|
model.deepFlag = true;
|
||||||
|
}
|
||||||
|
return model;
|
||||||
|
},
|
||||||
|
setLogicOffset(section, list) { // 构建逻辑区段偏移量
|
||||||
|
const models = [];
|
||||||
|
// 正常情况下logicSectionCodeList下逻辑区段为从左向右
|
||||||
|
let startPoint = section.points[0].x + 's' + section.points[0].y;
|
||||||
|
let startOffset = 0;
|
||||||
|
const sectionMap = {};
|
||||||
|
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||||
|
section.logicSectionCodeList.forEach(sectionCode => {
|
||||||
|
const logicSection = this.selectSectionCode(sectionCode, list);
|
||||||
|
sectionMap[logicSection.points[0].x + 's' + logicSection.points[0].y] = logicSection;
|
||||||
|
});
|
||||||
|
while (sectionMap[startPoint]) {
|
||||||
|
const model = sectionMap[startPoint].deepFlag ? sectionMap[startPoint] : deepAssign({}, sectionMap[startPoint]);
|
||||||
|
if (!model.lengthFact) {
|
||||||
|
const length = section.lengthFact / section.logicSectionCodeList.length;
|
||||||
|
model.lengthFact = length.toFixed(3);
|
||||||
|
}
|
||||||
|
model.logicSectionStartOffset = startOffset;
|
||||||
|
model.logicSectionEndOffset = (model.lengthFact * 1000 + startOffset * 1000) / 1000;
|
||||||
|
!sectionMap[startPoint].deepFlag && models.push(model);
|
||||||
|
startOffset = (startOffset * 1000 + model.lengthFact * 1000) / 1000;
|
||||||
|
startPoint = model.points[model.points.length - 1].x + 's' + model.points[model.points.length - 1].y;
|
||||||
|
}
|
||||||
|
}
|
||||||
return models;
|
return models;
|
||||||
},
|
},
|
||||||
getSectionByCode(code) {
|
getSectionByCode(code) {
|
||||||
|
Loading…
Reference in New Issue
Block a user