Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
8941e18f69
@ -10,7 +10,7 @@ const publicPath = process.env.VUE_APP_PRO == 'local' ? '' : '/cbtc';
|
||||
const BASE_API = getBaseUrl();
|
||||
|
||||
export const JL3D_LOCAL_STATIC = publicPath+"/static";
|
||||
// console.log(JL3D_LOCAL_STATIC);
|
||||
console.log(JL3D_LOCAL_STATIC);
|
||||
let uploadurl = null;
|
||||
let asseturl = null;
|
||||
|
||||
|
@ -421,3 +421,11 @@ export function changePassengerFlowData(group, passengerFlowId) {
|
||||
});
|
||||
}
|
||||
|
||||
// 哈尔滨线路(仿真行调工作站 获取 日志信息)
|
||||
export function getLogList(group, params) {
|
||||
return request({
|
||||
url: `/simulation/${group}/log`,
|
||||
method: 'get',
|
||||
params:params
|
||||
});
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
this.nowmxlen = null;
|
||||
this.atpspeed = null;
|
||||
this.atospeed = null;
|
||||
this.trainnum = null;
|
||||
// this.trainnum = null;
|
||||
this.stime = null;
|
||||
this.drivecount = 0;
|
||||
this.drivedata = null;
|
||||
@ -257,12 +257,12 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
updatemmi.updateatospeed = function(atospeed) {
|
||||
scope.atospeed = atospeed;
|
||||
};
|
||||
updatemmi.updatetrainnum = function(trainnum) {
|
||||
scope.trainnum = trainnum;
|
||||
};
|
||||
updatemmi.updatestoptime = function(stime) {
|
||||
scope.stime = stime;
|
||||
};
|
||||
// updatemmi.updatetrainnum = function(trainnum) {
|
||||
// scope.trainnum = trainnum;
|
||||
// };
|
||||
// updatemmi.updatestoptime = function(stime) {
|
||||
// scope.stime = stime;
|
||||
// };
|
||||
updatemmi.updatedrivedata = function(drivedata) {
|
||||
scope.drivecount += 1;
|
||||
scope.drivedata = drivedata;
|
||||
|
@ -74,6 +74,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
|
||||
if(data.body.groupNumber){
|
||||
changeNowTrain(data.body);
|
||||
updateDriveValue(data.body.groupNumber);
|
||||
}
|
||||
|
||||
updatestatus(data.body);
|
||||
@ -360,7 +361,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
updateTrainModel.rotation.y = Math.PI;
|
||||
let point = updateTrainModel.curve.getPointAt(data.offset);
|
||||
updateTrainModel.position.x = point.x;
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
for (let tl=0; tl<updateTrainModel.children.length; tl++) {
|
||||
updateTrainModel.children[tl].position.z = point.z;
|
||||
}
|
||||
}else{
|
||||
@ -368,7 +369,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
updateTrainModel.rotation.y = 0;
|
||||
let point = updateTrainModel.curve.getPointAt(data.offset);
|
||||
updateTrainModel.position.x = point.x;
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
for (let tl=0; tl<updateTrainModel.children.length; tl++) {
|
||||
updateTrainModel.children[tl].position.z = point.z;
|
||||
}
|
||||
}
|
||||
@ -400,9 +401,9 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
// trainmodel.position.z = point.z;
|
||||
|
||||
}
|
||||
if(updateTrainModel.children[1].rotalist.length > 0 || updateTrainModel.children[2].rotalist.length > 0 || updateTrainModel.children[3].rotalist.length > 0 || updateTrainModel.children[4].rotalist.length > 0|| updateTrainModel.children[5].rotalist.length > 0){
|
||||
// if(updateTrainModel.children[1].rotalist.length > 0 || updateTrainModel.children[2].rotalist.length > 0 || updateTrainModel.children[3].rotalist.length > 0 || updateTrainModel.children[4].rotalist.length > 0|| updateTrainModel.children[5].rotalist.length > 0){
|
||||
|
||||
for(let rs = 1;rs<6;rs++){
|
||||
for(let rs = 1;rs<updateTrainModel.children.length;rs++){
|
||||
//console.log(rs);
|
||||
if(updateTrainModel.children[rs].rotalist[0]){
|
||||
|
||||
@ -412,7 +413,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
for(let xh=0;xh<updateTrainModel.children[rs].rotalist.length;xh++){
|
||||
if((updateTrainModel.children[rs].matrixWorld.elements[12]+10)>=updateTrainModel.children[rs].rotalist[0].posr.x){
|
||||
|
||||
if(rs != 5){
|
||||
if(rs != updateTrainModel.children.length-1){
|
||||
let asd = updateTrainModel.children[rs].rotalist[0];
|
||||
updateTrainModel.children[rs+1].rotalist.push(asd);
|
||||
|
||||
@ -433,7 +434,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
|
||||
}
|
||||
// console.log(trainmodel.rotalist);
|
||||
}
|
||||
// }
|
||||
|
||||
}else{
|
||||
//
|
||||
@ -476,8 +477,8 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
}
|
||||
|
||||
|
||||
if(updateTrainModel.children[1].rotalist.length > 0 || updateTrainModel.children[2].rotalist.length > 0 || updateTrainModel.children[3].rotalist.length > 0 || updateTrainModel.children[4].rotalist.length > 0|| updateTrainModel.children[5].rotalist.length > 0){
|
||||
for(let rs = 1;rs<6;rs++){
|
||||
// if(updateTrainModel.children[1].rotalist.length > 0 || updateTrainModel.children[2].rotalist.length > 0 || updateTrainModel.children[3].rotalist.length > 0 || updateTrainModel.children[4].rotalist.length > 0|| updateTrainModel.children[5].rotalist.length > 0){
|
||||
for(let rs = 1;rs<updateTrainModel.children.length;rs++){
|
||||
//console.log(rs);
|
||||
if(updateTrainModel.children[rs].rotalist[0]){
|
||||
let offsetz = parseFloat(updateTrainModel.children[rs].rotalist[0].posr.z) - parseFloat(updateTrainModel.children[rs].matrixWorld.elements[14]);
|
||||
@ -487,7 +488,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
for(let xh=0;xh<updateTrainModel.children[rs].rotalist.length;xh++){
|
||||
if((updateTrainModel.children[rs].matrixWorld.elements[12]-10)<=updateTrainModel.children[rs].rotalist[0].posr.x){
|
||||
|
||||
if(rs != 5){
|
||||
if(rs != updateTrainModel.children.length-1){
|
||||
let asd = updateTrainModel.children[rs].rotalist[0];
|
||||
updateTrainModel.children[rs+1].rotalist.push(asd);
|
||||
|
||||
@ -502,7 +503,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@ -536,7 +537,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
trainmodel.rotation.y = Math.PI;
|
||||
let point = trainmodel.curve.getPointAt(data.offset);
|
||||
trainmodel.position.x = point.x;
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
for (let tl=0; tl<trainmodel.children.length; tl++) {
|
||||
trainmodel.children[tl].position.z = point.z;
|
||||
}
|
||||
|
||||
@ -571,7 +572,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
trainmodel.rotation.y = 0;
|
||||
let point = trainmodel.curve.getPointAt(data.offset);
|
||||
trainmodel.position.x = point.x;
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
for (let tl=0; tl<trainmodel.children.length; tl++) {
|
||||
trainmodel.children[tl].position.z = point.z;
|
||||
}
|
||||
|
||||
@ -638,7 +639,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
}
|
||||
if(trainmodel.children[1].rotalist.length > 0 || trainmodel.children[2].rotalist.length > 0 || trainmodel.children[3].rotalist.length > 0 || trainmodel.children[4].rotalist.length > 0|| trainmodel.children[5].rotalist.length > 0){
|
||||
|
||||
for(let rs = 1;rs<6;rs++){
|
||||
for(let rs = 1;rs<trainmodel.children.length;rs++){
|
||||
//console.log(rs);
|
||||
if(trainmodel.children[rs].rotalist[0]){
|
||||
|
||||
@ -651,7 +652,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
for(let xh=0;xh<trainmodel.children[rs].rotalist.length;xh++){
|
||||
if((trainmodel.children[rs].matrixWorld.elements[12]+10)>=trainmodel.children[rs].rotalist[0].posr.x){
|
||||
|
||||
if(rs != 5){
|
||||
if(rs != trainmodel.children.length-1){
|
||||
let asd = trainmodel.children[rs].rotalist[0];
|
||||
trainmodel.children[rs+1].rotalist.push(asd);
|
||||
|
||||
@ -748,7 +749,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
|
||||
|
||||
if(trainmodel.children[1].rotalist.length > 0 || trainmodel.children[2].rotalist.length > 0 || trainmodel.children[3].rotalist.length > 0 || trainmodel.children[4].rotalist.length > 0|| trainmodel.children[5].rotalist.length > 0){
|
||||
for(let rs = 1;rs<6;rs++){
|
||||
for(let rs = 1;rs<trainmodel.children.length;rs++){
|
||||
//console.log(rs);
|
||||
if(trainmodel.children[rs].rotalist[0]){
|
||||
let offsetz = parseFloat(trainmodel.children[rs].rotalist[0].posr.z) - parseFloat(trainmodel.children[rs].matrixWorld.elements[14]);
|
||||
@ -760,7 +761,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
for(let xh=0;xh<trainmodel.children[rs].rotalist.length;xh++){
|
||||
if((trainmodel.children[rs].matrixWorld.elements[12]-10)<=trainmodel.children[rs].rotalist[0].posr.x){
|
||||
|
||||
if(rs != 5){
|
||||
if(rs != trainmodel.children.length-1){
|
||||
let asd = trainmodel.children[rs].rotalist[0];
|
||||
trainmodel.children[rs+1].rotalist.push(asd);
|
||||
|
||||
|
@ -167,7 +167,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
|
||||
|
||||
function setpsdstationmap(stationlist){
|
||||
for(let i=0,leni=stationlist.length;i<leni;i++){
|
||||
console.log(stationlist[i]);
|
||||
|
||||
psdtexturemap[stationlist[i].stands[0].code] = stationlist[i].code;
|
||||
psdtexturemap[stationlist[i].stands[1].code] = stationlist[i].code;
|
||||
}
|
||||
@ -285,7 +285,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
|
||||
} else {
|
||||
scope.nowcode = data.code;
|
||||
if (data.type == "room") {
|
||||
|
||||
console.log(scope.modelmanager.roommodel.mesh);
|
||||
scope.showmodel = scope.modelmanager.roommodel.mesh;
|
||||
scope.scene.add(scope.showmodel);
|
||||
scope.camera.position.set(5, 7, -9);
|
||||
|
@ -114,7 +114,6 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
|
||||
|
||||
if(event.data.type == "Device_Fault_Over_3D"){
|
||||
console.log(event.data);
|
||||
|
||||
deletefault(event.data.body.code);
|
||||
warningmsg("已修复故障设备:"+event.data.body.code);
|
||||
@ -127,7 +126,7 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
let fault = event.data.body.faultInfoList;
|
||||
|
||||
for(let i=0,leni= fault.length;i<leni;i++){
|
||||
console.log(fault[i]);
|
||||
|
||||
let newfault = {
|
||||
code:fault[i].code,
|
||||
name:'',
|
||||
|
@ -15,10 +15,7 @@ import {Materialload} from '@/jlmap3d/main/loaders/Materialload.js';
|
||||
// import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js';
|
||||
|
||||
export function MaintainerLoad(data,scope,netdata,mapdata,camera,controls,scene){
|
||||
//console.log(mapdata);
|
||||
|
||||
//console.log(data);
|
||||
//console.log(scope);
|
||||
let sceneload = scene;
|
||||
let backdata = scope;
|
||||
let jlmap3ddata = mapdata;
|
||||
@ -69,25 +66,20 @@ export function MaintainerLoad(data,scope,netdata,mapdata,camera,controls,scene)
|
||||
|
||||
assetloader.assetPromiseOver(sceneload)
|
||||
.then(function(data){
|
||||
//console.log(data);
|
||||
//,netdata.stands,mixers,actions,"0"
|
||||
|
||||
return stationstandlist.loadpromise(mapdata.stationList,standsdata,psddata,sceneload,assetloader,mixers,actions,"02");
|
||||
})
|
||||
.then(function(data){
|
||||
//console.log(data);
|
||||
return sectionlist.loadpromise(mapdata.sectionList,sectiondata.section,rails,scene,assetloader);
|
||||
})
|
||||
.then(function(data){
|
||||
//console.log(data);
|
||||
return signallist.loadpromise(mapdata.signalList,signaldata,sceneload,assetloader);
|
||||
})
|
||||
.then(function(data){
|
||||
return switchlist.loadpromise(mapdata.switchList,switchdata,sceneload,assetloader,mixers,actions);
|
||||
})
|
||||
.then(function(data){
|
||||
//console.log(data);
|
||||
//console.log(assetloader);
|
||||
return trainlisttest.initpromise(mapdata.trainList,sceneload,assetloader,mixers,actions,"02");
|
||||
})
|
||||
.then(function(data){
|
||||
@ -108,22 +100,27 @@ export function MaintainerLoad(data,scope,netdata,mapdata,camera,controls,scene)
|
||||
return new Promise(function(resolve, reject){
|
||||
if(scope.stationtexture["stationlist"]){
|
||||
for(let mm=0;mm< stationstandlist.group.children.length;mm++){
|
||||
let stationname = stationstandlist.group.children[mm].name;
|
||||
let stationname = stationstandlist.group.children[mm].name;
|
||||
if(stationstandlist.group.children[mm].getObjectByName("zhantailiebiao")){
|
||||
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"];
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
|
||||
// console.log(stationstandlist.group.children[mm].getObjectByName("menkuangyanse"));
|
||||
if(stationstandlist.group.children[mm].getObjectByName("menkuangyanse")){
|
||||
stationstandlist.group.children[mm].getObjectByName("menkuangyanse").material.map =scope.stationtexture["pingbimen"];
|
||||
stationstandlist.group.children[mm].getObjectByName("menkuangyanse").material.map.needsUpdate = true;
|
||||
}
|
||||
|
||||
}
|
||||
if(stationstandlist.group.children[mm].getObjectByName("menkuangyanse")){
|
||||
stationstandlist.group.children[mm].getObjectByName("menkuangyanse").material.map =scope.stationtexture["pingbimen"];
|
||||
stationstandlist.group.children[mm].getObjectByName("menkuangyanse").material.map.needsUpdate = true;
|
||||
}
|
||||
|
||||
if(stationstandlist.group.children[mm].getObjectByName("zhantaiming")){
|
||||
let newmaterial = stationstandlist.group.children[mm].getObjectByName("zhantaiming").material.clone();
|
||||
|
||||
newmaterial.map =scope.stationtexture[stationname];
|
||||
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantaiming").material = newmaterial;
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -315,10 +315,17 @@ export default class Section extends Group {
|
||||
}
|
||||
const path = window.location.href;
|
||||
if (path.includes('/map/draw')) {
|
||||
this.on('mouseout', () => {
|
||||
this.on('mouseout', () => { // 移出
|
||||
!this.selectedType && !this.selected && this.line && this.line.setStyle({ stroke: this.style.Section.line.spareColor, lineWidth: this.style.Section.line.width });
|
||||
if (this.style.Switch.sectionAction.flag && this.model.relSwitchCode) {
|
||||
const switchModel = Vue.prototype.$jlmap.mapDevice[this.model.relSwitchCode];
|
||||
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
|
||||
if (sectionC.code == this.model.code) {
|
||||
sectionC && sectionC.instance && sectionC.instance.line.setStyle({ stroke: this.style.Switch.sectionAction.spareColor });
|
||||
}
|
||||
}
|
||||
});
|
||||
this.on('mouseover', () => {
|
||||
this.on('mouseover', () => { // 移入
|
||||
!this.selectedType && this.line && this.line.setStyle({ stroke: '#fbfbfb', lineWidth: this.style.Section.line.width - 0.2 });
|
||||
});
|
||||
}
|
||||
|
@ -383,8 +383,7 @@ export default {
|
||||
});
|
||||
},
|
||||
showLogDetail() {
|
||||
// this.$refs.logDetail.doShow();
|
||||
this.undeveloped();
|
||||
this.$refs.logDetail.doShow();
|
||||
},
|
||||
login() {
|
||||
if (this.loginActive) {
|
||||
|
61
src/jmapNew/theme/haerbin_01/menus/menuDialog/commandEnum.js
Normal file
61
src/jmapNew/theme/haerbin_01/menus/menuDialog/commandEnum.js
Normal file
@ -0,0 +1,61 @@
|
||||
export default {
|
||||
Signal_Set_Route:{name:'ATP进路', code:'routeCode' },
|
||||
Signal_Cancel_Route:{name:'取消ATP', code:'signalCode' },
|
||||
// Signal_Set_Route:{name:'联锁进路',},
|
||||
// Signal_Cancel_Route:{name:'取消联锁',},
|
||||
Signal_Set_Guide:{name:'引导进路', code:'routeCode' },
|
||||
Signal_Cancel_Guide:{name:'取消引导', code:'signalCode' },
|
||||
|
||||
// 道岔操作
|
||||
Switch_Block:{name:'封锁道岔', code:'switchCode' },
|
||||
Switch_Unblock:{name:'解封道岔', code:'switchCode' },
|
||||
Switch_Single_Unlock:{name:'取消锁定', code:'switchCode' },
|
||||
Switch_Single_Lock:{name:'单锁道岔', code:'switchCode' },
|
||||
Switch_Normal_Position:{name:'转换定位', code:'switchCode' },
|
||||
Switch_Reverse_Position:{name:'转换反位', code:'switchCode' },
|
||||
Switch_Section_Block:{name:'封锁区段', code:'switchCode' },
|
||||
Switch_Section_Unblock:{name:'解封区段', code:'switchCode' },
|
||||
Switch_Cancel_Limit_Speed:{name:'轨区消限', code:'switchCode' },
|
||||
Switch_Set_Limit_Speed:{name:'轨区设限', code:'switchCode', params:[{code:'speedLimitValue', name:'限速值为:'}]},
|
||||
Switch_Fault_Unlock:{name:'强解区段', code:'switchCode' },
|
||||
|
||||
// 信号机操作
|
||||
Signal_Set_CI_Auto_Trigger:{name:'追踪单开', code:'signalCode' },
|
||||
Signal_Cancel_CI_Auto_Trigger:{name:'追踪单关', code:'signalCode' },
|
||||
Signal_Open_Auto_Setting:{name:'自排单开', code:'signalCode' },
|
||||
Signal_Close_Auto_Setting:{name:'自排单关', code:'signalCode' },
|
||||
Signal_Block:{name:'封锁信号', code:'signalCode' },
|
||||
Signal_Reopen_Signal:{name:'重复开放', code:'signalCode' },
|
||||
Signal_Unblock:{name:'解封信号', code:'signalCode' },
|
||||
Signal_Close_Signal:{name:'关单信号', code:'signalCode' },
|
||||
|
||||
// 站台操作
|
||||
Stand_Set_Hold_Train:{name:'扣车', code:'standCode' },
|
||||
Stand_Cancel_Hold_Train:{name:'取消扣车', code:'standCode' },
|
||||
Stand_Set_Jump_Stop:{name:'越站', code:'standCode' },
|
||||
Stand_Cancel_Jump_Stop:{name:'取消越站', code:'standCode' },
|
||||
|
||||
// 方向杆
|
||||
Direction_Change:{name:'切换右向', code:'code' },
|
||||
// Direction_Change:{name:'切换右向', code:'signalCode' }
|
||||
|
||||
// 区段操作
|
||||
Section_Block:{name:'封锁区段', code:'sectionCode' },
|
||||
Section_Unblock:{name:'解封区段', code:'sectionCode' },
|
||||
Section_Cancel_Limit_Speed:{name:'轨区消限', code:'sectionCode' },
|
||||
Section_Set_Limit_Speed:{name:'轨区设限', code:'sectionCode', params:[{code:'speedLimitValue', name:'限速值为:'}] },
|
||||
Section_Fault_Unlock:{name:'强解区段', code:'sectionCode' },
|
||||
|
||||
// 车站操作
|
||||
Station_Set_CI_Auto_Trigger:{name:'追踪全开', code:'stationCode' },
|
||||
Station_Cancel_CI_Auto_Trigger:{name:'追踪全关', code:'stationCode' },
|
||||
Station_CIArea_Close_AllSignal :{name:'关区信号', code:'stationCode' },
|
||||
Station_Open_Auto_Setting:{name:'自排全开', code:'stationCode' },
|
||||
Station_Close_Auto_Setting :{name:'自排全关', code:'stationCode' },
|
||||
Station_Close_AllSignal:{name:'关站信号', code:'stationCode' },
|
||||
|
||||
// 联锁区操作
|
||||
CM_Receive_Control:{name:'接收控制', code:'stationCode' },
|
||||
CM_Surrender_Control :{name:'交出控制', code:'stationCode' }
|
||||
|
||||
};
|
@ -18,26 +18,27 @@
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择日期时间"
|
||||
/>
|
||||
<el-button style="margin-left: 10px;" @click="queryData">查询</el-button>
|
||||
<el-button style="margin-left: 10px;" :loading="loading" @click="queryData">查询</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="totalData"
|
||||
border
|
||||
style="width: 100%"
|
||||
height="600"
|
||||
height="520"
|
||||
>
|
||||
<el-table-column prop="data" label="日期/时间" header-align="center" align="center" width="200px" />
|
||||
<el-table-column prop="time" label="日期/时间" header-align="center" align="center" width="200px" />
|
||||
<el-table-column prop="operateName" label="操作人" header-align="center" align="center" width="100px" />
|
||||
<el-table-column prop="terminal" label="终端" header-align="center" align="center" width="100px" />
|
||||
<el-table-column prop="terminal" label="终端" header-align="center" align="center" width="200px" />
|
||||
<el-table-column prop="operateDes" label="操作" header-align="center" align="center" />
|
||||
</el-table>
|
||||
<el-pagination
|
||||
:current-page="currentPage"
|
||||
:page-size="100"
|
||||
:current-page="pageIndex"
|
||||
:page-size="pageSize"
|
||||
layout="total, prev, pager, next, jumper"
|
||||
:total="totalNum"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
@current-change="changePage"
|
||||
/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -45,39 +46,120 @@
|
||||
|
||||
<script>
|
||||
import {deviceType} from '@/scripts/cmdPlugin/Config';
|
||||
import {getLogList} from '@/api/simulation';
|
||||
import command from './commandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
name: 'LogDetail',
|
||||
data() {
|
||||
return {
|
||||
currentPage: 1,
|
||||
pageIndex: 1,
|
||||
show: false,
|
||||
level: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
totalData: [{data: '2020-12-02 18:00:00', operateName: 'admin', terminal: '维护HMI', operateDes: '对联锁区“太平桥联锁区”执行命令“交出控制”'}],
|
||||
tableData: [{data: '2020-12-02 18:00:00', operateName: 'admin', terminal: '维护HMI', operateDes: '对联锁区“太平桥联锁区”执行命令“交出控制”'}],
|
||||
totalNum: 0
|
||||
loading:false,
|
||||
totalData: [],
|
||||
pageSize: 10,
|
||||
totalNum:0,
|
||||
beCentralizedStationMap:{}
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
this.stationList.forEach(data=>{
|
||||
if (data.centralized) {
|
||||
this.beCentralizedStationMap[data.code] = data.code;
|
||||
data.chargeStationCodeList.forEach(each=>{
|
||||
this.beCentralizedStationMap[each] = data.code;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
doShow(level) {
|
||||
doShow() {
|
||||
this.show = true;
|
||||
this.level = level;
|
||||
this.queryData();
|
||||
},
|
||||
handleClose() {
|
||||
this.level = '';
|
||||
this.startTime = '';
|
||||
this.endTime = '';
|
||||
this.show = false;
|
||||
},
|
||||
queryData() {
|
||||
// const params = { level: this.level, startTime: this.startTime, endTime:this.endTime };
|
||||
// getAlarmList(this.$route.query.group, params).then(resp => {
|
||||
// this.totalData = resp.data;
|
||||
// });
|
||||
const params = { startTime: this.startTime, endTime:this.endTime, pageSize:this.pageSize, pageNum:this.pageIndex };
|
||||
this.loading = true;
|
||||
getLogList(this.$route.query.group, params).then(resp => {
|
||||
this.loading = false;
|
||||
const totalData = [];
|
||||
this.totalData = [];
|
||||
resp.data.list.forEach(element => {
|
||||
const eachData = {
|
||||
time:element.time,
|
||||
operateName:element.member.userId,
|
||||
terminal:this.getTerminal(element.member.id),
|
||||
operateDes:this.getOperateDetail(element.event)
|
||||
};
|
||||
totalData.push(eachData);
|
||||
});
|
||||
this.totalNum = resp.data.total;
|
||||
this.pageIndex = resp.data.pageNum;
|
||||
this.pageSize = resp.data.pageSize;
|
||||
this.totalData = totalData;
|
||||
}).catch(error=>{
|
||||
this.loading = false;
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
getTerminal(id) {
|
||||
const member = this.$store.state.training.memberData[id];
|
||||
return member ? member.labelName : '';
|
||||
},
|
||||
getOperateDetail(event) {
|
||||
switch (event.type) {
|
||||
case 'LOGIN': {
|
||||
return '用户登陆成功';
|
||||
}
|
||||
case 'LOGOUT': {
|
||||
return '用户退出登陆';
|
||||
}
|
||||
case 'OPERATE': {
|
||||
let result = '';
|
||||
const deviceType = command[event.operation].code;
|
||||
const deviceCode = event.operationParamMap[deviceType];
|
||||
if (deviceType == 'routeCode') {
|
||||
const device = this.$store.getters['map/routeList'].find(route=>{ return route.code == deviceCode; });
|
||||
result += '对元素 “' + device.name + '”';
|
||||
} else {
|
||||
if (deviceCode) {
|
||||
if (event.operation == 'CM_Surrender_Control' || event.operation == 'CM_Receive_Control' || event.operation == 'Station_Close_AllSignal') {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](this.beCentralizedStationMap[deviceCode]);
|
||||
result += '对联锁区 “' + device.name + '联锁区”';
|
||||
} else {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](deviceCode);
|
||||
if (device) {
|
||||
if (event.operation == 'Station_Set_CI_Auto_Trigger' || event.operation == 'Station_Cancel_CI_Auto_Trigger') {
|
||||
result += '对联锁区 “' + device.name + '联锁区”';
|
||||
} else {
|
||||
result += '对元素 “' + device.name + '”';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
result += ' 执行命令 “' + command[event.operation].name + '”';
|
||||
const params = command[event.operation].params;
|
||||
if (params && params.length > 0) {
|
||||
params.forEach(each=>{
|
||||
result += ', ' + each.name + event.operationParamMap[each.code];
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
},
|
||||
handleDeviceType(code) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
@ -87,11 +169,16 @@ export default {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return device.name;
|
||||
},
|
||||
handleSizeChange() {
|
||||
// this.handleSizeChange
|
||||
handleSizeChange(newPageSize) {
|
||||
if (newPageSize) {
|
||||
this.pageSize = newPageSize;
|
||||
// {pageSize:this.pageSize, pageNum:this.pageIndex}
|
||||
this.changePage(this.pageIndex);
|
||||
}
|
||||
},
|
||||
handleCurrentChange() {
|
||||
// this.handleCurrentChange
|
||||
changePage(pageIndex) {
|
||||
this.pageIndex = pageIndex;
|
||||
this.queryData();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -2,10 +2,10 @@
|
||||
|
||||
<div id="drivediv" class="jalmap3ddiv" >
|
||||
|
||||
<div class="trainstatus">
|
||||
<!-- <div class="trainstatus">
|
||||
{{$t('jlmap3d.trainGroupNumber')}}{{ trainnum }}</br>
|
||||
{{ stoptimes }}
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
|
||||
@ -88,8 +88,8 @@ export default {
|
||||
mmishow: false,
|
||||
showbuttonmsg: this.$t('jlmap3d.trainInstrumentationDisplay'),
|
||||
backmsg:this.$t('global.back'),
|
||||
trainnum: '',
|
||||
stoptimes: '',
|
||||
// trainnum: '',
|
||||
// stoptimes: '',
|
||||
dcontrolshow: false,
|
||||
msgshow:false,
|
||||
controlmsg:"不能选择其它列车",
|
||||
@ -133,20 +133,20 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
'jlmap3d.trainnum': {
|
||||
handler: function (newVal, oldVal) {
|
||||
if (newVal != oldVal) {
|
||||
this.trainnum = newVal;
|
||||
}
|
||||
}
|
||||
},
|
||||
'jlmap3d.stime': {
|
||||
handler: function (newVal, oldVal) {
|
||||
if (newVal != oldVal) {
|
||||
this.stoptimes = newVal;
|
||||
}
|
||||
}
|
||||
},
|
||||
// 'jlmap3d.trainnum': {
|
||||
// handler: function (newVal, oldVal) {
|
||||
// if (newVal != oldVal) {
|
||||
// this.trainnum = newVal;
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// 'jlmap3d.stime': {
|
||||
// handler: function (newVal, oldVal) {
|
||||
// if (newVal != oldVal) {
|
||||
// this.stoptimes = newVal;
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
'jlmap3d.drivecount': {
|
||||
handler: function (newVal, oldVal) {
|
||||
if (newVal != oldVal) {
|
||||
@ -315,11 +315,11 @@ export default {
|
||||
},
|
||||
|
||||
updatestatus(newdata){
|
||||
if(newdata.groupNumber){
|
||||
this.trainnum = newdata.groupNumber;
|
||||
|
||||
updateDriveValue(this.trainnum);
|
||||
}
|
||||
// if(newdata.groupNumber){
|
||||
// this.trainnum = newdata.groupNumber;
|
||||
//
|
||||
// updateDriveValue(this.trainnum);
|
||||
// }
|
||||
updatedoorlight(newdata);
|
||||
if(this.$refs.mmiui){
|
||||
this.$refs.mmiui.updatetrainstatus(newdata);
|
||||
|
@ -219,7 +219,7 @@ export default {
|
||||
|
||||
//更新车组号
|
||||
this.updateMmiSpeedView(newdata.v,newdata.pv,newdata.tv);
|
||||
|
||||
|
||||
if(newdata.maLen){
|
||||
|
||||
this.updateMmiLen(newdata.maLen);
|
||||
@ -512,7 +512,6 @@ export default {
|
||||
if(end){
|
||||
this.endstation = end;
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
Loading…
Reference in New Issue
Block a user