Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
a45374acc3
7
.env.ntyl
Normal file
7
.env.ntyl
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# just a flag
|
||||||
|
NODE_ENV = 'production'
|
||||||
|
VUE_APP_PRO = 'ntyl'
|
||||||
|
|
||||||
|
# base api
|
||||||
|
VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
|
||||||
|
VUE_APP_VOICE_API = 'https://joylink.club/oss/joylink'
|
@ -9,7 +9,7 @@
|
|||||||
"dev": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve",
|
"dev": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve",
|
||||||
"build": "vue-cli-service build --mode production",
|
"build": "vue-cli-service build --mode production",
|
||||||
"test": "vue-cli-service build --mode staging",
|
"test": "vue-cli-service build --mode staging",
|
||||||
"local": "vue-cli-service build --mode native",
|
"local": "vue-cli-service build --mode",
|
||||||
"preview": "node build/index.js --preview",
|
"preview": "node build/index.js --preview",
|
||||||
"lint": "eslint --ext .js,.vue src",
|
"lint": "eslint --ext .js,.vue src",
|
||||||
"test:unit": "jest --clearCache && vue-cli-service test:unit",
|
"test:unit": "jest --clearCache && vue-cli-service test:unit",
|
||||||
|
@ -93,9 +93,10 @@ export function StationStandList() {
|
|||||||
let jlmapstationdata = jlmapdata.stationList;
|
let jlmapstationdata = jlmapdata.stationList;
|
||||||
let jlmapstanddata = jlmapdata.stationStandList;
|
let jlmapstanddata = jlmapdata.stationStandList;
|
||||||
// jlmapstationdata.splice(0,1);
|
// jlmapstationdata.splice(0,1);
|
||||||
|
console.log(jlmapstationdata);
|
||||||
for(let i=0;i<jlmapstationdata.length;i++){
|
for(let i=0;i<jlmapstationdata.length;i++){
|
||||||
//|| jlmapstationdata[i].subheadDisplay == false
|
//|| jlmapstationdata[i].subheadDisplay == false
|
||||||
if(jlmapstationdata[i].visible == false ){
|
if(jlmapstationdata[i].visible == false || jlmapstationdata[i].depot == true){
|
||||||
jlmapstationdata.splice(i,1);
|
jlmapstationdata.splice(i,1);
|
||||||
i--;
|
i--;
|
||||||
}else{
|
}else{
|
||||||
@ -105,7 +106,7 @@ export function StationStandList() {
|
|||||||
// console.log(jlmapstationdata[i].subheadDisplay);
|
// console.log(jlmapstationdata[i].subheadDisplay);
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log(jlmapstationdata);
|
console.log(standsdata);
|
||||||
let stations = jlmap3ddata.stationstandlist.list;
|
let stations = jlmap3ddata.stationstandlist.list;
|
||||||
let num;
|
let num;
|
||||||
let num2;
|
let num2;
|
||||||
|
@ -83,11 +83,17 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
|
|||||||
console.log(data);
|
console.log(data);
|
||||||
//根据上下车人数创建人
|
//根据上下车人数创建人
|
||||||
jl3d.updateNowLeaveData("top",data.body.out);
|
jl3d.updateNowLeaveData("top",data.body.out);
|
||||||
|
setTimeout(function(){
|
||||||
|
passerAi.passerout("top","start")
|
||||||
|
}, 5000);
|
||||||
|
|
||||||
}
|
}
|
||||||
if(downtrain.nowcode == data.body.code && downswitch == true){
|
if(downtrain.nowcode == data.body.code && downswitch == true){
|
||||||
console.log(data);
|
|
||||||
//根据上下车人数创建人
|
//根据上下车人数创建人
|
||||||
jl3d.updateNowLeaveData("down",data.body.out);
|
jl3d.updateNowLeaveData("down",data.body.out);
|
||||||
|
setTimeout(function(){
|
||||||
|
passerAi.passerout("down","start");
|
||||||
|
}, 5000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,6 +103,7 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
|
|||||||
|
|
||||||
if(data.body.code == passerStation.nowStation.toppsd){
|
if(data.body.code == passerStation.nowStation.toppsd){
|
||||||
if(data.body.open == 0){
|
if(data.body.open == 0){
|
||||||
|
|
||||||
passerAi.passerout("top","end");
|
passerAi.passerout("top","end");
|
||||||
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;
|
||||||
@ -104,7 +111,7 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
|
|||||||
deviceaction.top.action.play();
|
deviceaction.top.action.play();
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
passerAi.passerout("top","start")
|
|
||||||
deviceaction.top.action.reset();
|
deviceaction.top.action.reset();
|
||||||
deviceaction.top.action.time = 0;
|
deviceaction.top.action.time = 0;
|
||||||
deviceaction.top.action.timeScale = 1;
|
deviceaction.top.action.timeScale = 1;
|
||||||
@ -125,7 +132,6 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
|
|||||||
deviceaction.down.action.time = 0;
|
deviceaction.down.action.time = 0;
|
||||||
deviceaction.down.action.timeScale = 1;
|
deviceaction.down.action.timeScale = 1;
|
||||||
deviceaction.down.action.play();
|
deviceaction.down.action.play();
|
||||||
passerAi.passerout("down","start");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -232,6 +232,7 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap,initCode) {
|
|||||||
for(let i=0;i<waitForCreatOutTop.length;i++){
|
for(let i=0;i<waitForCreatOutTop.length;i++){
|
||||||
for(let j=0;j<waitForCreatOutTop[i];j++){
|
for(let j=0;j<waitForCreatOutTop[i];j++){
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
|
console.log(passerZone.list["standtop"].doorpoints[i]);
|
||||||
passerHuman.newHumanCreate(outStationPassers,passerZone.list["standtop"].doorpoints[i],5,"top",i);
|
passerHuman.newHumanCreate(outStationPassers,passerZone.list["standtop"].doorpoints[i],5,"top",i);
|
||||||
}, Math.random()*1000*j);
|
}, Math.random()*1000*j);
|
||||||
}
|
}
|
||||||
@ -241,8 +242,9 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap,initCode) {
|
|||||||
for(let i=0;i<waitForCreatOutDown.length;i++){
|
for(let i=0;i<waitForCreatOutDown.length;i++){
|
||||||
for(let j=0;j<waitForCreatOutDown[i];j++){
|
for(let j=0;j<waitForCreatOutDown[i];j++){
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
passerHuman.newHumanCreate(outStationPassers,passerZone.list["standdown"].doorpoints[j],5,"down",j);
|
console.log(passerZone.list["standdown"].doorpoints[i]);
|
||||||
}, Math.random()*1000*i);
|
passerHuman.newHumanCreate(outStationPassers,passerZone.list["standdown"].doorpoints[i],5,"down",i);
|
||||||
|
}, Math.random()*1000*j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,7 @@ export function PasserHuman() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//创建新的乘客
|
//创建新的乘客
|
||||||
this.newHumanCreate = function(humanlist,position,stage,direct,door,overGoal){
|
this.newHumanCreate = function(humanlist,position,stage,direct,door,overGoal){
|
||||||
let newhuman;
|
let newhuman;
|
||||||
|
@ -183,14 +183,22 @@ export function parser(data, skinCode, showConfig) {
|
|||||||
if (sectionParent) {
|
if (sectionParent) {
|
||||||
sectionParent['switch'] = mapDevice[elem.code];
|
sectionParent['switch'] = mapDevice[elem.code];
|
||||||
}
|
}
|
||||||
|
let sectionCStar, sectionCEnd;
|
||||||
|
if (handleResetPoint(rnodeSection.points)) {
|
||||||
|
sectionCStar = rnodeSection.points[0];
|
||||||
|
sectionCEnd = rnodeSection.points[1];
|
||||||
|
} else {
|
||||||
|
sectionCStar = rnodeSection.points[1];
|
||||||
|
sectionCEnd = rnodeSection.points[0];
|
||||||
|
}
|
||||||
if (cnodeSection.points[0].x == lnodeSection.points[lnodeSection.points.length - 1].x && cnodeSection.points[0].y == lnodeSection.points[lnodeSection.points.length - 1].y) {
|
if (cnodeSection.points[0].x == lnodeSection.points[lnodeSection.points.length - 1].x && cnodeSection.points[0].y == lnodeSection.points[lnodeSection.points.length - 1].y) {
|
||||||
mapDevice[elem.code].intersection = {
|
mapDevice[elem.code].intersection = {
|
||||||
x: cnodeSection.points[0].x,
|
x: cnodeSection.points[0].x,
|
||||||
y: cnodeSection.points[0].y
|
y: cnodeSection.points[0].y
|
||||||
};
|
};
|
||||||
mapDevice[elem.code].skew = {
|
mapDevice[elem.code].skew = {
|
||||||
x: rnodeSection.points[rnodeSection.points.length - 2].x,
|
x: sectionCStar.x,
|
||||||
y: rnodeSection.points[rnodeSection.points.length - 2].y
|
y: sectionCStar.y
|
||||||
};
|
};
|
||||||
} else if (cnodeSection.points[cnodeSection.points.length - 1].x == lnodeSection.points[0].x && cnodeSection.points[cnodeSection.points.length - 1].y == lnodeSection.points[0].y) {
|
} else if (cnodeSection.points[cnodeSection.points.length - 1].x == lnodeSection.points[0].x && cnodeSection.points[cnodeSection.points.length - 1].y == lnodeSection.points[0].y) {
|
||||||
mapDevice[elem.code].intersection = {
|
mapDevice[elem.code].intersection = {
|
||||||
@ -198,8 +206,8 @@ export function parser(data, skinCode, showConfig) {
|
|||||||
y: cnodeSection.points[cnodeSection.points.length - 1].y
|
y: cnodeSection.points[cnodeSection.points.length - 1].y
|
||||||
};
|
};
|
||||||
mapDevice[elem.code].skew = {
|
mapDevice[elem.code].skew = {
|
||||||
x: rnodeSection.points[1].x,
|
x: sectionCEnd.x,
|
||||||
y: rnodeSection.points[1].y
|
y: sectionCEnd.y
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,6 +262,11 @@ export function parser(data, skinCode, showConfig) {
|
|||||||
return mapDevice;
|
return mapDevice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 重置坐标点
|
||||||
|
function handleResetPoint(points) {
|
||||||
|
return (points[points.length - 1].x >= points[0].x) && (points[points.length - 1].y >= points[0].y);
|
||||||
|
}
|
||||||
|
|
||||||
// 同步绘制数据到原始数据
|
// 同步绘制数据到原始数据
|
||||||
export function updateForList(model, state, lstName) {
|
export function updateForList(model, state, lstName) {
|
||||||
const list = state.map[lstName];
|
const list = state.map[lstName];
|
||||||
|
@ -55,7 +55,7 @@ export const loginInfo = {
|
|||||||
systemType: '011'
|
systemType: '011'
|
||||||
},
|
},
|
||||||
ntyc: {
|
ntyc: {
|
||||||
title: '南京铁道职业技术学院城市轨道交通实训平台(专用版)',
|
title: '城轨高级信号系统(云平台专用版)',
|
||||||
loginPath: '/login?project=ntyc',
|
loginPath: '/login?project=ntyc',
|
||||||
loginParam: 'NTYC',
|
loginParam: 'NTYC',
|
||||||
titleDistance: '-150px',
|
titleDistance: '-150px',
|
||||||
@ -64,7 +64,7 @@ export const loginInfo = {
|
|||||||
systemType: '011'
|
systemType: '011'
|
||||||
},
|
},
|
||||||
ntyl: {
|
ntyl: {
|
||||||
title: '南京铁道职业技术学院城市轨道交通实训平台',
|
title: '城轨高级信号系统(本地专用版)',
|
||||||
loginPath: '/login?project=ntyl',
|
loginPath: '/login?project=ntyl',
|
||||||
loginParam: 'NTYL',
|
loginParam: 'NTYL',
|
||||||
titleDistance: '-150px',
|
titleDistance: '-150px',
|
||||||
@ -73,7 +73,7 @@ export const loginInfo = {
|
|||||||
systemType: '011'
|
systemType: '011'
|
||||||
},
|
},
|
||||||
nty: {
|
nty: {
|
||||||
title: '南京铁道职业技术学院城市轨道交通实训平台(通用版)',
|
title: '城轨高级信号系统(云平台通用版)',
|
||||||
loginPath:'/login?project=nty',
|
loginPath:'/login?project=nty',
|
||||||
loginParam: 'NTY',
|
loginParam: 'NTY',
|
||||||
titleDistance: '-150px',
|
titleDistance: '-150px',
|
||||||
@ -137,7 +137,7 @@ export const loginInfo = {
|
|||||||
systemType: '013'
|
systemType: '013'
|
||||||
},
|
},
|
||||||
designntyl: {
|
designntyl: {
|
||||||
title: '南京铁道职业技术学院城市轨道交通设计平台',
|
title: '城轨高级信号设计系统(本地专用版)',
|
||||||
loginPath:'/design/login?project=ntyl',
|
loginPath:'/design/login?project=ntyl',
|
||||||
loginParam: 'NTYL',
|
loginParam: 'NTYL',
|
||||||
titleDistance: '-150px',
|
titleDistance: '-150px',
|
||||||
@ -146,7 +146,7 @@ export const loginInfo = {
|
|||||||
systemType: '011'
|
systemType: '011'
|
||||||
},
|
},
|
||||||
designntyc: {
|
designntyc: {
|
||||||
title: '南京铁道职业技术学院城市轨道交通设计平台(专用版)',
|
title: '城轨高级信号设计系统(云平台专用版)',
|
||||||
loginPath:'/design/login?project=ntyc',
|
loginPath:'/design/login?project=ntyc',
|
||||||
loginParam: 'NTYC',
|
loginParam: 'NTYC',
|
||||||
titleDistance: '-150px',
|
titleDistance: '-150px',
|
||||||
@ -155,7 +155,7 @@ export const loginInfo = {
|
|||||||
systemType: '011'
|
systemType: '011'
|
||||||
},
|
},
|
||||||
designnty: {
|
designnty: {
|
||||||
title: '南京铁道职业技术学院城市轨道交通设计平台(通用版)',
|
title: '城轨高级信号设计系统(云平台通用版)',
|
||||||
loginPath:'/design/login?project=nty',
|
loginPath:'/design/login?project=nty',
|
||||||
loginParam: 'NTY',
|
loginParam: 'NTY',
|
||||||
titleDistance: '-150px',
|
titleDistance: '-150px',
|
||||||
@ -417,7 +417,7 @@ export const ProjectIcon = {
|
|||||||
designnty: FaviconNty,
|
designnty: FaviconNty,
|
||||||
ntyc: FaviconNty,
|
ntyc: FaviconNty,
|
||||||
designntyc: FaviconNty,
|
designntyc: FaviconNty,
|
||||||
nty1: FaviconNty,
|
ntyl: FaviconNty,
|
||||||
designntyl: FaviconNty,
|
designntyl: FaviconNty,
|
||||||
bjd: FaviconBjd,
|
bjd: FaviconBjd,
|
||||||
designbjd: FaviconBjd,
|
designbjd: FaviconBjd,
|
||||||
@ -439,7 +439,7 @@ export const ProjectCode = {
|
|||||||
nty: 'NTY',
|
nty: 'NTY',
|
||||||
designnty: 'NTY',
|
designnty: 'NTY',
|
||||||
ntyl: 'NTYL',
|
ntyl: 'NTYL',
|
||||||
designnty1: 'NTYL',
|
designntyl: 'NTYL',
|
||||||
ntyc: 'NTYC',
|
ntyc: 'NTYC',
|
||||||
designntyc: 'NTYC',
|
designntyc: 'NTYC',
|
||||||
bjd: 'BJD',
|
bjd: 'BJD',
|
||||||
@ -448,7 +448,7 @@ export const ProjectCode = {
|
|||||||
designsdy: 'SDY'
|
designsdy: 'SDY'
|
||||||
};
|
};
|
||||||
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 底部栏仅展示公司信息不展示备案号
|
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 底部栏仅展示公司信息不展示备案号
|
||||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designnty1']; // 实训设计平台通过项目code获取地图列表的项目
|
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl']; // 实训设计平台通过项目code获取地图列表的项目
|
||||||
export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目
|
export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目
|
||||||
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd']; // 登录页右下角版本开发基于不展示
|
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd']; // 登录页右下角版本开发基于不展示
|
||||||
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 登录页右下角主体不展示
|
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 登录页右下角主体不展示
|
||||||
@ -484,7 +484,11 @@ export const goOtherPlatformMenu = { // 导航栏快速切换平台
|
|||||||
bjd: '/design/login?project=bjd',
|
bjd: '/design/login?project=bjd',
|
||||||
designbjd: '/login?project=bjd',
|
designbjd: '/login?project=bjd',
|
||||||
sdy: '/design/login?project=sdy',
|
sdy: '/design/login?project=sdy',
|
||||||
designsdy: '/login?project=sdy'
|
designsdy: '/login?project=sdy',
|
||||||
|
ntyl: '/design/login?project=ntyl',
|
||||||
|
designntyl: '/login?project=ntyl',
|
||||||
|
ntyc: '/design/login?project=ntyl',
|
||||||
|
designntyc: '/login?project=ntyc'
|
||||||
};
|
};
|
||||||
export const ProjectList = [
|
export const ProjectList = [
|
||||||
{value:'xty', label:'西铁院'},
|
{value:'xty', label:'西铁院'},
|
||||||
|
@ -51,9 +51,9 @@ export default {
|
|||||||
// const cityList = resp.sort((a, b) => {
|
// const cityList = resp.sort((a, b) => {
|
||||||
// return a.code.localeCompare(b.code);
|
// return a.code.localeCompare(b.code);
|
||||||
// });
|
// });
|
||||||
const cityList = resp;
|
const cityList = resp || [];
|
||||||
this.filterOptions = resp;
|
this.filterOptions = resp;
|
||||||
this.filterSelect = localStore.get(this.localParamName) || cityList[0].code;
|
this.filterSelect = localStore.get(this.localParamName) || (cityList[0] || {}).code;
|
||||||
this.$emit('filterSelectChange', this.filterSelect);
|
this.$emit('filterSelectChange', this.filterSelect);
|
||||||
},
|
},
|
||||||
filterSelectChange(filterSelect) {
|
filterSelectChange(filterSelect) {
|
||||||
|
@ -58,6 +58,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getMapByCode() {
|
getMapByCode() {
|
||||||
const project = getSessionStorage('project');
|
const project = getSessionStorage('project');
|
||||||
|
console.log(project, GetMapListByProjectList.includes(project));
|
||||||
return GetMapListByProjectList.includes(project);
|
return GetMapListByProjectList.includes(project);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -163,12 +163,12 @@ export default {
|
|||||||
this.jlmap3d.endsocket();
|
this.jlmap3d.endsocket();
|
||||||
this.jlmap3d.dispose();
|
this.jlmap3d.dispose();
|
||||||
this.jlmap3d = null;
|
this.jlmap3d = null;
|
||||||
// window.removeEventListener('popstate', this.goBack, false);
|
|
||||||
// this.$destroy();
|
// this.$destroy();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
destroyed(){
|
destroyed(){
|
||||||
|
// window.removeEventListener('popstate', this.goBack, false);
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
userId() {
|
userId() {
|
||||||
@ -192,17 +192,20 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// goBack(){
|
// goBack(){
|
||||||
|
// console.log(this.$route);
|
||||||
// if(this.$route.query.type == "DRIVE"){
|
// if(this.$route.query.type == "DRIVE"){
|
||||||
// store.dispatch('LogOut').then(() => {
|
// store.dispatch('LogOut').then(() => {
|
||||||
// location.reload();
|
// location.reload();
|
||||||
// });
|
// });
|
||||||
// }else{
|
// }else{
|
||||||
// this.$emit('showdriving');
|
// this.$emit('showdriving');
|
||||||
|
// if(this.jlmap3d){
|
||||||
// this.jlmap3d.eventoff();
|
// this.jlmap3d.eventoff();
|
||||||
// this.jlmap3d.animateoff();
|
// this.jlmap3d.animateoff();
|
||||||
|
// }
|
||||||
|
//
|
||||||
// // this.jlmap3d = null;
|
// // this.jlmap3d = null;
|
||||||
// }
|
// }
|
||||||
// // this.jlmap3d = null;
|
|
||||||
// },
|
// },
|
||||||
show: function (skinCode,group,zindex) {
|
show: function (skinCode,group,zindex) {
|
||||||
// console.log("show");
|
// console.log("show");
|
||||||
@ -270,6 +273,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
back() {
|
back() {
|
||||||
|
|
||||||
if(this.$route.query.type == "DRIVE"){
|
if(this.$route.query.type == "DRIVE"){
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
location.reload();
|
location.reload();
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
:element-loading-text="loadingText"
|
:element-loading-text="loadingText"
|
||||||
element-loading-background="rgba(0, 0, 0, 0)"
|
element-loading-background="rgba(0, 0, 0, 0)"
|
||||||
>
|
>
|
||||||
<div v-if="loginTitle && !syncLogin" :class="project.endsWith('heb')?'text-box':'left-logo-box'">
|
<div v-if="loginTitle && !syncLogin" :class="project.endsWith('heb')||project.endsWith('ntyl')?'text-box':'left-logo-box'">
|
||||||
<img class="logo" :src="logoImg" :style="{width: logoWidth}">
|
<img class="logo" :src="logoImg" :style="{width: logoWidth}">
|
||||||
<span>{{ loginTitle==='空串'?'':loginTitle }}</span>
|
<span>{{ loginTitle==='空串'?'':loginTitle }}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -16,12 +16,12 @@
|
|||||||
<el-button class="language_btn" type="text" @click="handleLanguage">{{ language }}</el-button>
|
<el-button class="language_btn" type="text" @click="handleLanguage">{{ language }}</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!syncLogin" class="content-box" :style="project.endsWith('heb')?'width: 450px;':''">
|
<div v-if="!syncLogin" class="content-box" :style="project.endsWith('heb')||project.endsWith('ntyl')?'width: 450px;':''">
|
||||||
<div v-if="isProject && !syncLogin" class="text-box" :style="{top: titleDistance}">
|
<div v-if="isProject && !syncLogin" class="text-box" :style="{top: titleDistance}">
|
||||||
<img v-if="!loginTitle" class="logo" :src="logoImg" style="width: 80px">
|
<img v-if="!loginTitle" class="logo" :src="logoImg" style="width: 80px">
|
||||||
<span>{{ title }}</span>
|
<span>{{ title }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!project.endsWith('heb')" class="qrcode-main">
|
<div v-if="!project.endsWith('heb') && !project.endsWith('ntyl')" class="qrcode-main">
|
||||||
<div class="login-code-box" @click="loginRefresh">
|
<div class="login-code-box" @click="loginRefresh">
|
||||||
<qrcode-vue
|
<qrcode-vue
|
||||||
v-loading="loadingCode"
|
v-loading="loadingCode"
|
||||||
@ -208,8 +208,12 @@ export default {
|
|||||||
const split = this.$route.path.split('/')[1];
|
const split = this.$route.path.split('/')[1];
|
||||||
if (process.env.VUE_APP_PRO === 'local' && split == 'design') {
|
if (process.env.VUE_APP_PRO === 'local' && split == 'design') {
|
||||||
return split + 'heb';
|
return split + 'heb';
|
||||||
|
} else if (process.env.VUE_APP_PRO === 'ntyl' && split == 'design') {
|
||||||
|
return split + 'ntyl';
|
||||||
} else if (process.env.VUE_APP_PRO === 'local' && split == 'login') {
|
} else if (process.env.VUE_APP_PRO === 'local' && split == 'login') {
|
||||||
return 'heb';
|
return 'heb';
|
||||||
|
} else if (process.env.VUE_APP_PRO === 'ntyl' && split == 'login') {
|
||||||
|
return 'ntyl';
|
||||||
} else if (split == 'design') {
|
} else if (split == 'design') {
|
||||||
return project ? split + project : split;
|
return project ? split + project : split;
|
||||||
} else if (split == 'login') {
|
} else if (split == 'login') {
|
||||||
@ -297,7 +301,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
document.title = loginInfo[this.project].browserTitle || loginInfo[this.project].title;
|
document.title = loginInfo[this.project].browserTitle || loginInfo[this.project].title;
|
||||||
if (this.syncLogin || !this.project.endsWith('heb')) {
|
if (!this.syncLogin && !this.project.endsWith('heb') && !this.project.endsWith('ntyl')) {
|
||||||
this.loginRefresh();
|
this.loginRefresh();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -260,7 +260,7 @@ export default {
|
|||||||
const end_x = endModel.points[0].x;
|
const end_x = endModel.points[0].x;
|
||||||
const start_y = startModel.points[startModel.points.length - 1].y;
|
const start_y = startModel.points[startModel.points.length - 1].y;
|
||||||
const end_y = endModel.points[0].y;
|
const end_y = endModel.points[0].y;
|
||||||
if (end_x > start_x) {
|
// if (end_x > start_x) {
|
||||||
if (this.createModel.leftSectionCode === this.createModel.rightSectionCode) {
|
if (this.createModel.leftSectionCode === this.createModel.rightSectionCode) {
|
||||||
this.$messageBox('左关联区段不能和右关联区段相同');
|
this.$messageBox('左关联区段不能和右关联区段相同');
|
||||||
return;
|
return;
|
||||||
@ -282,11 +282,11 @@ export default {
|
|||||||
models.push(startModel);
|
models.push(startModel);
|
||||||
models.push(endModel);
|
models.push(endModel);
|
||||||
this.$emit('updateMapModel', models);
|
this.$emit('updateMapModel', models);
|
||||||
} else {
|
// } else {
|
||||||
this.$messageBox('画图顺序应左往右绘制, 请求重新定义左右关联区段');
|
// this.$messageBox('画图顺序应左往右绘制, 请求重新定义左右关联区段');
|
||||||
this.createModel.rightSectionCode = '';
|
// this.createModel.rightSectionCode = '';
|
||||||
this.createModel.leftSectionCode = '';
|
// this.createModel.leftSectionCode = '';
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
// 创建区段
|
// 创建区段
|
||||||
create() {
|
create() {
|
||||||
|
@ -23,15 +23,21 @@ export default {
|
|||||||
methods:{
|
methods:{
|
||||||
create() { // 一键生成道岔
|
create() { // 一键生成道岔
|
||||||
const createArr = []; // 创建model列表
|
const createArr = []; // 创建model列表
|
||||||
const changeSectionList = this.changeSectionAttr();
|
const changeSectionList = this.changeSectionAttr(); // 找道岔中心点
|
||||||
changeSectionList.forEach(section => {
|
changeSectionList.forEach(section => {
|
||||||
if (!section.rightSectionCode) { // 右侧关联关系为空 且 道岔区段
|
if (section['typeModel'] && section['typeModel'] == 'start') { // 右侧关联关系为空 且 道岔区段
|
||||||
const list = this.findSectionA(section.points[section.points.length - 1].x, section.points[section.points.length - 1].y);
|
const list = this.findSectionA(section.points[section.points.length - 1].x, section.points[section.points.length - 1].y, changeSectionList, section.code);
|
||||||
let sectionB = {};
|
let sectionB = {};
|
||||||
let sectionC = {};
|
let sectionC = {};
|
||||||
if (list.length >= 2) {
|
if (list.length >= 2) {
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
if ((item.points[1].y == section.points[section.points.length - 1].y) || (item.points[1].x == section.points[section.points.length - 1].x)) { // 是否水平拿第二个点判断
|
let sectionEnd;
|
||||||
|
if (this.handleResetPoint(item.points)) {
|
||||||
|
sectionEnd = item.points[item.points.length - 1];
|
||||||
|
} else {
|
||||||
|
sectionEnd = item.points[0];
|
||||||
|
}
|
||||||
|
if ((sectionEnd.y == section.points[section.points.length - 1].y) || (sectionEnd.x == section.points[section.points.length - 1].x)) { // 是否水平拿第二个点判断
|
||||||
sectionB = item;
|
sectionB = item;
|
||||||
} else {
|
} else {
|
||||||
sectionC = item;
|
sectionC = item;
|
||||||
@ -40,6 +46,18 @@ export default {
|
|||||||
if (section.code && sectionB.code && sectionC.code) {
|
if (section.code && sectionB.code && sectionC.code) {
|
||||||
const uname = 'W' + section.name.replace('T', '');
|
const uname = 'W' + section.name.replace('T', '');
|
||||||
const switchModel = getModel('Switch');
|
const switchModel = getModel('Switch');
|
||||||
|
let intersection;
|
||||||
|
if (this.handleResetPoint(section.points)) {
|
||||||
|
intersection = section.points[section.points.length - 1];
|
||||||
|
} else {
|
||||||
|
intersection = section.points[0];
|
||||||
|
}
|
||||||
|
let skew;
|
||||||
|
if (this.handleResetPoint(sectionC.points)) {
|
||||||
|
skew = sectionC.points[sectionC.points.length - 1];
|
||||||
|
} else {
|
||||||
|
skew = sectionC.points[0];
|
||||||
|
}
|
||||||
const data = {
|
const data = {
|
||||||
code: getUID('W', [...this.switchList, ...createArr]),
|
code: getUID('W', [...this.switchList, ...createArr]),
|
||||||
name: uname,
|
name: uname,
|
||||||
@ -50,12 +68,12 @@ export default {
|
|||||||
sectionCCode: sectionC.code,
|
sectionCCode: sectionC.code,
|
||||||
turnTime: 3,
|
turnTime: 3,
|
||||||
intersection: {
|
intersection: {
|
||||||
x: section.points[section.points.length - 1].x,
|
x: intersection.x,
|
||||||
y: section.points[section.points.length - 1].y
|
y: intersection.y
|
||||||
},
|
},
|
||||||
skew: {
|
skew: {
|
||||||
x: sectionC.points[1].x,
|
x: skew.x,
|
||||||
y: sectionC.points[1].y
|
y: skew.y
|
||||||
},
|
},
|
||||||
normalPosition: 1 // 默认状态定位
|
normalPosition: 1 // 默认状态定位
|
||||||
};
|
};
|
||||||
@ -65,13 +83,19 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!section.leftSectionCode) { // 左侧关联关系为空 且 道岔区段
|
if (section['typeModel'] && section['typeModel'] == 'end') { // 左侧关联关系为空 且 道岔区段
|
||||||
const list = this.findSectionB(section.points[0].x, section.points[0].y);
|
const list = this.findSectionB(section.points[0].x, section.points[0].y, changeSectionList, section.code);
|
||||||
let sectionB = {};
|
let sectionB = {};
|
||||||
let sectionC = {};
|
let sectionC = {};
|
||||||
if (list.length >= 2) {
|
if (list.length >= 2) {
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
if ((item.points[item.points.length - 2].y == section.points[0].y) || (item.points[item.points.length - 2].x == section.points[0].x)) { // 是否水平拿倒数第二个点判断
|
let sectionStart;
|
||||||
|
if (this.handleResetPoint(item.points)) {
|
||||||
|
sectionStart = item.points[0];
|
||||||
|
} else {
|
||||||
|
sectionStart = item.points[item.points.length - 1];
|
||||||
|
}
|
||||||
|
if ((sectionStart.y == section.points[0].y) || (sectionStart.x == section.points[0].x)) { // 是否水平拿倒数第二个点判断
|
||||||
sectionB = item;
|
sectionB = item;
|
||||||
} else {
|
} else {
|
||||||
sectionC = item;
|
sectionC = item;
|
||||||
@ -80,6 +104,18 @@ export default {
|
|||||||
if (section.code && sectionB.code && sectionC.code) {
|
if (section.code && sectionB.code && sectionC.code) {
|
||||||
const uname = 'W' + section.name.replace('T', '');
|
const uname = 'W' + section.name.replace('T', '');
|
||||||
const switchModel = getModel('Switch');
|
const switchModel = getModel('Switch');
|
||||||
|
let intersection;
|
||||||
|
if (this.handleResetPoint(section.points)) {
|
||||||
|
intersection = section.points[0];
|
||||||
|
} else {
|
||||||
|
intersection = section.points[section.points.length - 1];
|
||||||
|
}
|
||||||
|
let skew;
|
||||||
|
if (this.handleResetPoint(sectionC.points)) {
|
||||||
|
skew = sectionC.points[0];
|
||||||
|
} else {
|
||||||
|
skew = sectionC.points[sectionC.points.length - 1];
|
||||||
|
}
|
||||||
const data = {
|
const data = {
|
||||||
code: getUID('W', [...this.switchList, ...createArr]),
|
code: getUID('W', [...this.switchList, ...createArr]),
|
||||||
name: uname,
|
name: uname,
|
||||||
@ -90,12 +126,12 @@ export default {
|
|||||||
sectionCCode: sectionC.code,
|
sectionCCode: sectionC.code,
|
||||||
turnTime: 3,
|
turnTime: 3,
|
||||||
intersection: {
|
intersection: {
|
||||||
x: section.points[0].x,
|
x: intersection.x,
|
||||||
y: section.points[0].y
|
y: intersection.y
|
||||||
},
|
},
|
||||||
skew: {
|
skew: {
|
||||||
x: sectionC.points[sectionC.points.length - 2].x,
|
x: skew.x,
|
||||||
y: sectionC.points[sectionC.points.length - 2].y
|
y: skew.y
|
||||||
},
|
},
|
||||||
normalPosition: 1 // 默认状态定位
|
normalPosition: 1 // 默认状态定位
|
||||||
};
|
};
|
||||||
@ -121,21 +157,37 @@ export default {
|
|||||||
this.$message( this.$t('tip.cancelGeneration'));
|
this.$message( this.$t('tip.cancelGeneration'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
findSectionA(pointX, pointY) {
|
findSectionA(pointX, pointY, lists, code) {
|
||||||
const list = [];
|
const list = [];
|
||||||
this.sectionList.forEach(item => {
|
lists.forEach(item => {
|
||||||
|
if (item.code != code) {
|
||||||
|
if (this.handleResetPoint(item.points)) {
|
||||||
if (item.points[0].x == pointX && item.points[0].y == pointY) {
|
if (item.points[0].x == pointX && item.points[0].y == pointY) {
|
||||||
list.push(item);
|
list.push(item);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (item.points[item.points.length - 1].x == pointX && item.points[item.points.length - 1].y == pointY) {
|
||||||
|
list.push(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
findSectionB(pointX, pointY) {
|
findSectionB(pointX, pointY, lists, code) {
|
||||||
const list = [];
|
const list = [];
|
||||||
this.sectionList.forEach(item => {
|
lists.forEach(item => {
|
||||||
|
if (item.code != code) {
|
||||||
|
if (this.handleResetPoint(item.points)) {
|
||||||
if (item.points[item.points.length - 1].x == pointX && item.points[item.points.length - 1].y == pointY) {
|
if (item.points[item.points.length - 1].x == pointX && item.points[item.points.length - 1].y == pointY) {
|
||||||
list.push(item);
|
list.push(item);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (item.points[0].x == pointX && item.points[0].y == pointY) {
|
||||||
|
list.push(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
@ -154,6 +206,10 @@ export default {
|
|||||||
}
|
}
|
||||||
return rtn;
|
return rtn;
|
||||||
},
|
},
|
||||||
|
// 重置坐标点
|
||||||
|
handleResetPoint(points) {
|
||||||
|
return (points[points.length - 1].x >= points[0].x) && (points[points.length - 1].y >= points[0].y);
|
||||||
|
},
|
||||||
// 修改区段属性
|
// 修改区段属性
|
||||||
changeSectionAttr() {
|
changeSectionAttr() {
|
||||||
const changeSectionList = []; // 改变的区段列表
|
const changeSectionList = []; // 改变的区段列表
|
||||||
@ -163,20 +219,25 @@ export default {
|
|||||||
const oneSectionStar = section.points[0];
|
const oneSectionStar = section.points[0];
|
||||||
let countA = 0;
|
let countA = 0;
|
||||||
let countB = 0;
|
let countB = 0;
|
||||||
console.log(changeSectionList);
|
|
||||||
this.sectionList.forEach(elem => {
|
this.sectionList.forEach(elem => {
|
||||||
if (elem.type == '01') {
|
if (elem.type == '01' && section.code != elem.code) {
|
||||||
const twoSection = elem.points[0];
|
let twoSection, twoSectionEnd;
|
||||||
const twoSectionEnd = elem.points[elem.points.length - 1];
|
if (this.handleResetPoint(elem.points)) {
|
||||||
|
twoSection = elem.points[0];
|
||||||
|
twoSectionEnd = elem.points[elem.points.length - 1];
|
||||||
|
} else {
|
||||||
|
twoSection = elem.points[elem.points.length - 1];
|
||||||
|
twoSectionEnd = elem.points[0];
|
||||||
|
}
|
||||||
if (oneSection.x == twoSection.x && oneSection.y == twoSection.y) {
|
if (oneSection.x == twoSection.x && oneSection.y == twoSection.y) {
|
||||||
countA++;
|
countA++;
|
||||||
if (countA >= 2) {
|
if (countA >= 2) {
|
||||||
if (!this.checkAddListA(oneSection, section.code)) { // 右侧关系清空
|
// if (!this.checkAddListA(oneSection, section.code)) { // 右侧关系清空
|
||||||
const sectionModel = deepAssign({}, section);
|
const sectionModel = deepAssign({}, section);
|
||||||
sectionModel.rightSectionCode = '';
|
sectionModel.rightSectionCode = '';
|
||||||
sectionModel.sepTypeRight = '00'; // 分隔符
|
sectionModel.sepTypeRight = '00'; // 分隔符
|
||||||
sectionModel.type = '03';
|
sectionModel.type = '03';
|
||||||
const list = this.findSectionA(sectionModel.points[sectionModel.points.length - 1].x, sectionModel.points[sectionModel.points.length - 1].y);
|
const list = this.findSectionA(sectionModel.points[sectionModel.points.length - 1].x, sectionModel.points[sectionModel.points.length - 1].y, this.sectionList, sectionModel.code);
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
const sectionModelElem = deepAssign({}, elem);
|
const sectionModelElem = deepAssign({}, elem);
|
||||||
sectionModelElem.leftSectionCode = '';
|
sectionModelElem.leftSectionCode = '';
|
||||||
@ -184,18 +245,19 @@ export default {
|
|||||||
sectionModelElem.type = '03';
|
sectionModelElem.type = '03';
|
||||||
changeSectionList.push(sectionModelElem);
|
changeSectionList.push(sectionModelElem);
|
||||||
});
|
});
|
||||||
|
sectionModel['typeModel'] = 'start';
|
||||||
changeSectionList.push(sectionModel);
|
changeSectionList.push(sectionModel);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
} else if (oneSectionStar.x == twoSectionEnd.x && oneSectionStar.y == twoSectionEnd.y) {
|
} else if (oneSectionStar.x == twoSectionEnd.x && oneSectionStar.y == twoSectionEnd.y) {
|
||||||
countB++;
|
countB++;
|
||||||
if (countB >= 2) {
|
if (countB >= 2) {
|
||||||
if (!this.checkAddListB(oneSectionStar, section.code)) { // 左侧关系清空
|
// if (!this.checkAddListB(oneSectionStar, section.code)) { // 左侧关系清空
|
||||||
const sectionModel = deepAssign({}, section);
|
const sectionModel = deepAssign({}, section);
|
||||||
sectionModel.leftSectionCode = '';
|
sectionModel.leftSectionCode = '';
|
||||||
sectionModel.sepTypeLeft = '00';
|
sectionModel.sepTypeLeft = '00';
|
||||||
sectionModel.type = '03';
|
sectionModel.type = '03';
|
||||||
const list = this.findSectionB(sectionModel.points[0].x, sectionModel.points[0].y);
|
const list = this.findSectionB(sectionModel.points[0].x, sectionModel.points[0].y, this.sectionList, sectionModel.code);
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
const sectionModelElem = deepAssign({}, elem);
|
const sectionModelElem = deepAssign({}, elem);
|
||||||
sectionModelElem.rightSectionCode = '';
|
sectionModelElem.rightSectionCode = '';
|
||||||
@ -203,8 +265,9 @@ export default {
|
|||||||
sectionModelElem.type = '03';
|
sectionModelElem.type = '03';
|
||||||
changeSectionList.push(sectionModelElem);
|
changeSectionList.push(sectionModelElem);
|
||||||
});
|
});
|
||||||
|
sectionModel['typeModel'] = 'end';
|
||||||
changeSectionList.push(sectionModel);
|
changeSectionList.push(sectionModel);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -213,7 +276,7 @@ export default {
|
|||||||
});
|
});
|
||||||
return changeSectionList;
|
return changeSectionList;
|
||||||
},
|
},
|
||||||
checkAddListA(points, code) { // 判断是否添加list
|
checkAddListA(points, code) { // 判断是否添加list (暂时不用)
|
||||||
let flag = false;
|
let flag = false;
|
||||||
this.sectionList.forEach(section => {
|
this.sectionList.forEach(section => {
|
||||||
section.points.forEach((point, index) => {
|
section.points.forEach((point, index) => {
|
||||||
@ -227,7 +290,7 @@ export default {
|
|||||||
});
|
});
|
||||||
return flag;
|
return flag;
|
||||||
},
|
},
|
||||||
checkAddListB(points, code) { // 判断是否添加list
|
checkAddListB(points, code) { // 判断是否添加list (暂时不用)
|
||||||
let flag = false;
|
let flag = false;
|
||||||
this.sectionList.forEach(section => {
|
this.sectionList.forEach(section => {
|
||||||
section.points.forEach((point, index) => {
|
section.points.forEach((point, index) => {
|
||||||
|
@ -15,8 +15,8 @@ const port = 9527; // dev port
|
|||||||
let publicPath = '';
|
let publicPath = '';
|
||||||
let outputDir = '';
|
let outputDir = '';
|
||||||
(function () {
|
(function () {
|
||||||
publicPath = process.env.VUE_APP_PRO == 'local' ? '/' : '/cbtc';
|
publicPath = process.env.VUE_APP_PRO == 'local' || process.env.VUE_APP_PRO == 'ntyl' ? '/' : '/cbtc';
|
||||||
outputDir = process.env.VUE_APP_PRO == 'local' ? 'dist' : 'dist/cbtc';
|
outputDir = process.env.VUE_APP_PRO == 'local' || process.env.VUE_APP_PRO == 'ntyl' ? 'dist' : 'dist/cbtc';
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// All configuration item explanations can be find in https://cli.vuejs.org/config/
|
// All configuration item explanations can be find in https://cli.vuejs.org/config/
|
||||||
|
Loading…
Reference in New Issue
Block a user