This commit is contained in:
joylink_cuiweidong 2020-12-15 13:36:05 +08:00
commit a45374acc3
16 changed files with 237 additions and 131 deletions

7
.env.ntyl Normal file
View 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'

View File

@ -9,7 +9,7 @@
"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",
"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",
"lint": "eslint --ext .js,.vue src",
"test:unit": "jest --clearCache && vue-cli-service test:unit",

View File

@ -93,9 +93,10 @@ export function StationStandList() {
let jlmapstationdata = jlmapdata.stationList;
let jlmapstanddata = jlmapdata.stationStandList;
// jlmapstationdata.splice(0,1);
console.log(jlmapstationdata);
for(let i=0;i<jlmapstationdata.length;i++){
//|| jlmapstationdata[i].subheadDisplay == false
if(jlmapstationdata[i].visible == false ){
if(jlmapstationdata[i].visible == false || jlmapstationdata[i].depot == true){
jlmapstationdata.splice(i,1);
i--;
}else{
@ -105,7 +106,7 @@ export function StationStandList() {
// console.log(jlmapstationdata[i].subheadDisplay);
}
// console.log(jlmapstationdata);
console.log(standsdata);
let stations = jlmap3ddata.stationstandlist.list;
let num;
let num2;

View File

@ -83,11 +83,17 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
console.log(data);
//根据上下车人数创建人
jl3d.updateNowLeaveData("top",data.body.out);
setTimeout(function(){
passerAi.passerout("top","start")
}, 5000);
}
if(downtrain.nowcode == data.body.code && downswitch == true){
console.log(data);
//根据上下车人数创建人
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.open == 0){
passerAi.passerout("top","end");
deviceaction.top.action.reset();
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();
}else{
passerAi.passerout("top","start")
deviceaction.top.action.reset();
deviceaction.top.action.time = 0;
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.timeScale = 1;
deviceaction.down.action.play();
passerAi.passerout("down","start");
}
}

View File

@ -232,6 +232,7 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap,initCode) {
for(let i=0;i<waitForCreatOutTop.length;i++){
for(let j=0;j<waitForCreatOutTop[i];j++){
setTimeout(function(){
console.log(passerZone.list["standtop"].doorpoints[i]);
passerHuman.newHumanCreate(outStationPassers,passerZone.list["standtop"].doorpoints[i],5,"top",i);
}, 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 j=0;j<waitForCreatOutDown[i];j++){
setTimeout(function(){
passerHuman.newHumanCreate(outStationPassers,passerZone.list["standdown"].doorpoints[j],5,"down",j);
}, Math.random()*1000*i);
console.log(passerZone.list["standdown"].doorpoints[i]);
passerHuman.newHumanCreate(outStationPassers,passerZone.list["standdown"].doorpoints[i],5,"down",i);
}, Math.random()*1000*j);
}
}
}

View File

@ -39,6 +39,7 @@ export function PasserHuman() {
}
}
//创建新的乘客
this.newHumanCreate = function(humanlist,position,stage,direct,door,overGoal){
let newhuman;
@ -60,7 +61,7 @@ export function PasserHuman() {
let mixer = new THREE.AnimationMixer( newhuman );
newhuman.position.copy(position);
if(overGoal){
newhuman.overGoal = overGoal;
}

View File

@ -183,14 +183,22 @@ export function parser(data, skinCode, showConfig) {
if (sectionParent) {
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) {
mapDevice[elem.code].intersection = {
x: cnodeSection.points[0].x,
y: cnodeSection.points[0].y
};
mapDevice[elem.code].skew = {
x: rnodeSection.points[rnodeSection.points.length - 2].x,
y: rnodeSection.points[rnodeSection.points.length - 2].y
x: sectionCStar.x,
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) {
mapDevice[elem.code].intersection = {
@ -198,8 +206,8 @@ export function parser(data, skinCode, showConfig) {
y: cnodeSection.points[cnodeSection.points.length - 1].y
};
mapDevice[elem.code].skew = {
x: rnodeSection.points[1].x,
y: rnodeSection.points[1].y
x: sectionCEnd.x,
y: sectionCEnd.y
};
}
@ -254,6 +262,11 @@ export function parser(data, skinCode, showConfig) {
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) {
const list = state.map[lstName];

View File

@ -55,7 +55,7 @@ export const loginInfo = {
systemType: '011'
},
ntyc: {
title: '南京铁道职业技术学院城市轨道交通实训平台(专用版)',
title: '城轨高级信号系统(云平台专用版)',
loginPath: '/login?project=ntyc',
loginParam: 'NTYC',
titleDistance: '-150px',
@ -64,7 +64,7 @@ export const loginInfo = {
systemType: '011'
},
ntyl: {
title: '南京铁道职业技术学院城市轨道交通实训平台',
title: '城轨高级信号系统(本地专用版)',
loginPath: '/login?project=ntyl',
loginParam: 'NTYL',
titleDistance: '-150px',
@ -73,7 +73,7 @@ export const loginInfo = {
systemType: '011'
},
nty: {
title: '南京铁道职业技术学院城市轨道交通实训平台(通用版)',
title: '城轨高级信号系统(云平台通用版)',
loginPath:'/login?project=nty',
loginParam: 'NTY',
titleDistance: '-150px',
@ -137,7 +137,7 @@ export const loginInfo = {
systemType: '013'
},
designntyl: {
title: '南京铁道职业技术学院城市轨道交通设计平台',
title: '城轨高级信号设计系统(本地专用版)',
loginPath:'/design/login?project=ntyl',
loginParam: 'NTYL',
titleDistance: '-150px',
@ -146,7 +146,7 @@ export const loginInfo = {
systemType: '011'
},
designntyc: {
title: '南京铁道职业技术学院城市轨道交通设计平台(专用版)',
title: '城轨高级信号设计系统(云平台专用版)',
loginPath:'/design/login?project=ntyc',
loginParam: 'NTYC',
titleDistance: '-150px',
@ -155,7 +155,7 @@ export const loginInfo = {
systemType: '011'
},
designnty: {
title: '南京铁道职业技术学院城市轨道交通设计平台(通用版)',
title: '城轨高级信号设计系统(云平台通用版)',
loginPath:'/design/login?project=nty',
loginParam: 'NTY',
titleDistance: '-150px',
@ -417,7 +417,7 @@ export const ProjectIcon = {
designnty: FaviconNty,
ntyc: FaviconNty,
designntyc: FaviconNty,
nty1: FaviconNty,
ntyl: FaviconNty,
designntyl: FaviconNty,
bjd: FaviconBjd,
designbjd: FaviconBjd,
@ -439,7 +439,7 @@ export const ProjectCode = {
nty: 'NTY',
designnty: 'NTY',
ntyl: 'NTYL',
designnty1: 'NTYL',
designntyl: 'NTYL',
ntyc: 'NTYC',
designntyc: 'NTYC',
bjd: 'BJD',
@ -448,7 +448,7 @@ export const ProjectCode = {
designsdy: 'SDY'
};
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 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']; // 登录页右下角主体不展示
@ -484,7 +484,11 @@ export const goOtherPlatformMenu = { // 导航栏快速切换平台
bjd: '/design/login?project=bjd',
designbjd: '/login?project=bjd',
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 = [
{value:'xty', label:'西铁院'},

View File

@ -51,9 +51,9 @@ export default {
// const cityList = resp.sort((a, b) => {
// return a.code.localeCompare(b.code);
// });
const cityList = resp;
const cityList = 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);
},
filterSelectChange(filterSelect) {

View File

@ -58,6 +58,7 @@ export default {
},
getMapByCode() {
const project = getSessionStorage('project');
console.log(project, GetMapListByProjectList.includes(project));
return GetMapListByProjectList.includes(project);
}
},

View File

@ -163,12 +163,12 @@ export default {
this.jlmap3d.endsocket();
this.jlmap3d.dispose();
this.jlmap3d = null;
// window.removeEventListener('popstate', this.goBack, false);
// this.$destroy();
}
},
destroyed(){
// window.removeEventListener('popstate', this.goBack, false);
},
computed: {
userId() {
@ -191,19 +191,22 @@ export default {
// this.$refs.mmiui.init();
},
methods: {
// goBack(){
// if(this.$route.query.type == "DRIVE"){
// store.dispatch('LogOut').then(() => {
// location.reload();
// });
// }else{
// this.$emit('showdriving');
// this.jlmap3d.eventoff();
// this.jlmap3d.animateoff();
// // this.jlmap3d = null;
// }
// // this.jlmap3d = null;
// },
// goBack(){
// console.log(this.$route);
// if(this.$route.query.type == "DRIVE"){
// store.dispatch('LogOut').then(() => {
// location.reload();
// });
// }else{
// this.$emit('showdriving');
// if(this.jlmap3d){
// this.jlmap3d.eventoff();
// this.jlmap3d.animateoff();
// }
//
// // this.jlmap3d = null;
// }
// },
show: function (skinCode,group,zindex) {
// console.log("show");
// console.log(skinCode);
@ -270,6 +273,7 @@ export default {
},
back() {
if(this.$route.query.type == "DRIVE"){
store.dispatch('LogOut').then(() => {
location.reload();

View File

@ -7,7 +7,7 @@
:element-loading-text="loadingText"
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}">
<span>{{ loginTitle==='空串'?'':loginTitle }}</span>
</div>
@ -16,12 +16,12 @@
<el-button class="language_btn" type="text" @click="handleLanguage">{{ language }}</el-button>
</el-tooltip>
</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}">
<img v-if="!loginTitle" class="logo" :src="logoImg" style="width: 80px">
<span>{{ title }}</span>
</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">
<qrcode-vue
v-loading="loadingCode"
@ -208,8 +208,12 @@ export default {
const split = this.$route.path.split('/')[1];
if (process.env.VUE_APP_PRO === 'local' && split == 'design') {
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') {
return 'heb';
} else if (process.env.VUE_APP_PRO === 'ntyl' && split == 'login') {
return 'ntyl';
} else if (split == 'design') {
return project ? split + project : split;
} else if (split == 'login') {
@ -297,7 +301,7 @@ export default {
},
mounted() {
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();
}
},

View File

@ -260,33 +260,33 @@ export default {
const end_x = endModel.points[0].x;
const start_y = startModel.points[startModel.points.length - 1].y;
const end_y = endModel.points[0].y;
if (end_x > start_x) {
if (this.createModel.leftSectionCode === this.createModel.rightSectionCode) {
this.$messageBox('左关联区段不能和右关联区段相同');
return;
}
if (start_x === end_x && start_y === end_y) {
this.$messageBox('左关联区段终点不能和右关联区段起点相同');
return;
}
model.points = [
{ x: start_x, y: start_y },
{ x: end_x, y: end_y }
];
const models = [];
model.leftSectionCode = this.createModel.leftSectionCode;
startModel.rightSectionCode = model.code;
endModel.leftSectionCode = model.code;
model.rightSectionCode = this.createModel.rightSectionCode;
models.push(model);
models.push(startModel);
models.push(endModel);
this.$emit('updateMapModel', models);
} else {
this.$messageBox('画图顺序应左往右绘制, 请求重新定义左右关联区段');
this.createModel.rightSectionCode = '';
this.createModel.leftSectionCode = '';
// if (end_x > start_x) {
if (this.createModel.leftSectionCode === this.createModel.rightSectionCode) {
this.$messageBox('左关联区段不能和右关联区段相同');
return;
}
if (start_x === end_x && start_y === end_y) {
this.$messageBox('左关联区段终点不能和右关联区段起点相同');
return;
}
model.points = [
{ x: start_x, y: start_y },
{ x: end_x, y: end_y }
];
const models = [];
model.leftSectionCode = this.createModel.leftSectionCode;
startModel.rightSectionCode = model.code;
endModel.leftSectionCode = model.code;
model.rightSectionCode = this.createModel.rightSectionCode;
models.push(model);
models.push(startModel);
models.push(endModel);
this.$emit('updateMapModel', models);
// } else {
// this.$messageBox(', ');
// this.createModel.rightSectionCode = '';
// this.createModel.leftSectionCode = '';
// }
},
//
create() {

View File

@ -23,15 +23,21 @@ export default {
methods:{
create() { //
const createArr = []; // model
const changeSectionList = this.changeSectionAttr();
const changeSectionList = this.changeSectionAttr(); //
changeSectionList.forEach(section => {
if (!section.rightSectionCode) { //
const list = this.findSectionA(section.points[section.points.length - 1].x, section.points[section.points.length - 1].y);
if (section['typeModel'] && section['typeModel'] == 'start') { //
const list = this.findSectionA(section.points[section.points.length - 1].x, section.points[section.points.length - 1].y, changeSectionList, section.code);
let sectionB = {};
let sectionC = {};
if (list.length >= 2) {
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;
} else {
sectionC = item;
@ -40,6 +46,18 @@ export default {
if (section.code && sectionB.code && sectionC.code) {
const uname = 'W' + section.name.replace('T', '');
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 = {
code: getUID('W', [...this.switchList, ...createArr]),
name: uname,
@ -50,12 +68,12 @@ export default {
sectionCCode: sectionC.code,
turnTime: 3,
intersection: {
x: section.points[section.points.length - 1].x,
y: section.points[section.points.length - 1].y
x: intersection.x,
y: intersection.y
},
skew: {
x: sectionC.points[1].x,
y: sectionC.points[1].y
x: skew.x,
y: skew.y
},
normalPosition: 1 //
};
@ -65,13 +83,19 @@ export default {
}
}
}
if (!section.leftSectionCode) { //
const list = this.findSectionB(section.points[0].x, section.points[0].y);
if (section['typeModel'] && section['typeModel'] == 'end') { //
const list = this.findSectionB(section.points[0].x, section.points[0].y, changeSectionList, section.code);
let sectionB = {};
let sectionC = {};
if (list.length >= 2) {
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;
} else {
sectionC = item;
@ -80,6 +104,18 @@ export default {
if (section.code && sectionB.code && sectionC.code) {
const uname = 'W' + section.name.replace('T', '');
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 = {
code: getUID('W', [...this.switchList, ...createArr]),
name: uname,
@ -90,12 +126,12 @@ export default {
sectionCCode: sectionC.code,
turnTime: 3,
intersection: {
x: section.points[0].x,
y: section.points[0].y
x: intersection.x,
y: intersection.y
},
skew: {
x: sectionC.points[sectionC.points.length - 2].x,
y: sectionC.points[sectionC.points.length - 2].y
x: skew.x,
y: skew.y
},
normalPosition: 1 //
};
@ -121,20 +157,36 @@ export default {
this.$message( this.$t('tip.cancelGeneration'));
});
},
findSectionA(pointX, pointY) {
findSectionA(pointX, pointY, lists, code) {
const list = [];
this.sectionList.forEach(item => {
if (item.points[0].x == pointX && item.points[0].y == pointY) {
list.push(item);
lists.forEach(item => {
if (item.code != code) {
if (this.handleResetPoint(item.points)) {
if (item.points[0].x == pointX && item.points[0].y == pointY) {
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;
},
findSectionB(pointX, pointY) {
findSectionB(pointX, pointY, lists, code) {
const list = [];
this.sectionList.forEach(item => {
if (item.points[item.points.length - 1].x == pointX && item.points[item.points.length - 1].y == pointY) {
list.push(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) {
list.push(item);
}
} else {
if (item.points[0].x == pointX && item.points[0].y == pointY) {
list.push(item);
}
}
}
});
return list;
@ -154,6 +206,10 @@ export default {
}
return rtn;
},
//
handleResetPoint(points) {
return (points[points.length - 1].x >= points[0].x) && (points[points.length - 1].y >= points[0].y);
},
//
changeSectionAttr() {
const changeSectionList = []; //
@ -163,48 +219,55 @@ export default {
const oneSectionStar = section.points[0];
let countA = 0;
let countB = 0;
console.log(changeSectionList);
this.sectionList.forEach(elem => {
if (elem.type == '01') {
const twoSection = elem.points[0];
const twoSectionEnd = elem.points[elem.points.length - 1];
if (elem.type == '01' && section.code != elem.code) {
let twoSection, twoSectionEnd;
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) {
countA++;
if (countA >= 2) {
if (!this.checkAddListA(oneSection, section.code)) { //
const sectionModel = deepAssign({}, section);
sectionModel.rightSectionCode = '';
sectionModel.sepTypeRight = '00'; //
sectionModel.type = '03';
const list = this.findSectionA(sectionModel.points[sectionModel.points.length - 1].x, sectionModel.points[sectionModel.points.length - 1].y);
list.forEach(elem => {
const sectionModelElem = deepAssign({}, elem);
sectionModelElem.leftSectionCode = '';
sectionModelElem.sepTypeLeft = '00';
sectionModelElem.type = '03';
changeSectionList.push(sectionModelElem);
});
changeSectionList.push(sectionModel);
}
// if (!this.checkAddListA(oneSection, section.code)) { //
const sectionModel = deepAssign({}, section);
sectionModel.rightSectionCode = '';
sectionModel.sepTypeRight = '00'; //
sectionModel.type = '03';
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 => {
const sectionModelElem = deepAssign({}, elem);
sectionModelElem.leftSectionCode = '';
sectionModelElem.sepTypeLeft = '00';
sectionModelElem.type = '03';
changeSectionList.push(sectionModelElem);
});
sectionModel['typeModel'] = 'start';
changeSectionList.push(sectionModel);
// }
}
} else if (oneSectionStar.x == twoSectionEnd.x && oneSectionStar.y == twoSectionEnd.y) {
countB++;
if (countB >= 2) {
if (!this.checkAddListB(oneSectionStar, section.code)) { //
const sectionModel = deepAssign({}, section);
sectionModel.leftSectionCode = '';
sectionModel.sepTypeLeft = '00';
sectionModel.type = '03';
const list = this.findSectionB(sectionModel.points[0].x, sectionModel.points[0].y);
list.forEach(elem => {
const sectionModelElem = deepAssign({}, elem);
sectionModelElem.rightSectionCode = '';
sectionModelElem.sepTypeRight = '00'; //
sectionModelElem.type = '03';
changeSectionList.push(sectionModelElem);
});
changeSectionList.push(sectionModel);
}
// if (!this.checkAddListB(oneSectionStar, section.code)) { //
const sectionModel = deepAssign({}, section);
sectionModel.leftSectionCode = '';
sectionModel.sepTypeLeft = '00';
sectionModel.type = '03';
const list = this.findSectionB(sectionModel.points[0].x, sectionModel.points[0].y, this.sectionList, sectionModel.code);
list.forEach(elem => {
const sectionModelElem = deepAssign({}, elem);
sectionModelElem.rightSectionCode = '';
sectionModelElem.sepTypeRight = '00'; //
sectionModelElem.type = '03';
changeSectionList.push(sectionModelElem);
});
sectionModel['typeModel'] = 'end';
changeSectionList.push(sectionModel);
// }
}
}
}
@ -213,7 +276,7 @@ export default {
});
return changeSectionList;
},
checkAddListA(points, code) { // list
checkAddListA(points, code) { // list ()
let flag = false;
this.sectionList.forEach(section => {
section.points.forEach((point, index) => {
@ -227,7 +290,7 @@ export default {
});
return flag;
},
checkAddListB(points, code) { // list
checkAddListB(points, code) { // list ()
let flag = false;
this.sectionList.forEach(section => {
section.points.forEach((point, index) => {

View File

@ -15,8 +15,8 @@ const port = 9527; // dev port
let publicPath = '';
let outputDir = '';
(function () {
publicPath = process.env.VUE_APP_PRO == 'local' ? '/' : '/cbtc';
outputDir = process.env.VUE_APP_PRO == 'local' ? 'dist' : 'dist/cbtc';
publicPath = process.env.VUE_APP_PRO == 'local' || process.env.VUE_APP_PRO == 'ntyl' ? '/' : '/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/