This commit is contained in:
joylink_cuiweidong 2020-06-11 13:29:31 +08:00
commit 285749f3eb
16 changed files with 241 additions and 64 deletions

View File

@ -1,14 +1,14 @@
<template> <template>
<div class="container"> <div class="container">
<li v-if="option.children && option.children.length" class="menu-item" :class="popClass" @mouseenter="enter($vnode.key)" @mouseleave="leave"> <li v-if="option.children && option.children.length" class="menu-item" :class="popClass" @mouseenter="enter($vnode.key)" @mouseleave="leave">
<div class="flex-box"> <div ref="flexBox" class="flex-box">
<el-button type="text" class="item" :disabled="checkDisabled(option)"> <el-button type="text" class="item" :disabled="checkDisabled(option)">
<el-link v-if="option.tipsType" :type="option.tipsType" :underline="false">{{ option.label }}</el-link> <el-link v-if="option.tipsType" :type="option.tipsType" :underline="false">{{ option.label }}</el-link>
<span v-else :style="{color: textColor(option) }">{{ option.label }}</span> <span v-else :style="{color: textColor(option) }">{{ option.label }}</span>
</el-button> </el-button>
<i class="el-icon-caret-right" /> <i class="el-icon-arrow-right" />
</div> </div>
<ul v-if="isPopup" ref="popup" class="menu" :style="{display: isShow? 'block': 'table'}"> <ul v-if="isPopup" ref="popup" class="menu" :style="{display: isShow? 'block': 'table', marginLeft: marginLeft+'px'}">
<div class="menu-pop"> <div class="menu-pop">
<div v-show="isShow" class="arrow el-icon-arrow-down" /> <div v-show="isShow" class="arrow el-icon-arrow-down" />
<pop-menu-item v-for="(el, i) in option.children" :key="i" :option="el" :pop-class="popClass" @close="close" /> <pop-menu-item v-for="(el, i) in option.children" :key="i" :option="el" :pop-class="popClass" @close="close" />
@ -66,6 +66,9 @@ export default {
}, },
isShow() { isShow() {
return this.option.children.length > 12; return this.option.children.length > 12;
},
marginLeft() {
return this.$refs.flexBox.offsetWidth;
} }
}, },
methods: { methods: {
@ -123,7 +126,6 @@ export default {
$item-border: #909399; $item-border: #909399;
$item-disabled: #cccccc; $item-disabled: #cccccc;
$item-height: 30px; $item-height: 30px;
$item-width: 180px;
/deep/ { /deep/ {
.el-button--text { .el-button--text {
@ -137,10 +139,8 @@ export default {
.menu { .menu {
padding: 0; padding: 0;
position: absolute; position: absolute;
margin-left: $item-width - 2;
margin-top: -$item-height - 1; margin-top: -$item-height - 1;
max-height: 360px; max-height: 360px;
min-width: 800px;
overflow: auto; overflow: auto;
&-pop { &-pop {
@ -162,15 +162,12 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding-right: 3px;
} }
.menu-item { .menu-item {
background: $bg; background: $bg;
list-style: none; list-style: none;
width: $item-width;
// display: flex;
// justify-content: space-between;
// align-items: center;
} }
.menu-item:hover { .menu-item:hover {

View File

@ -202,6 +202,33 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
for (let tl=0; tl<6; tl++) { for (let tl=0; tl<6; tl++) {
trainmodel.children[tl].position.z = point.z; trainmodel.children[tl].position.z = point.z;
} }
if(trainmodel.openleft == "1"){
trainmodel.openleft = "0";
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
actions["traindoor"].top[an].stop();
}
trainmodel.openright = "1";
for(let an=actions["traindoor"].down.length-1;an>=0;an--){
actions["traindoor"].down[an].reset();
actions["traindoor"].down[an].time = actions["traindoor"].down[an]._clip.duration;
actions["traindoor"].down[an].timeScale = 1;
actions["traindoor"].down[an].play();
}
}else if(trainmodel.openright == "1"){
trainmodel.openright = "0";
for(let an=actions["traindoor"].down.length-1;an>=0;an--){
actions["traindoor"].down[an].stop();
}
trainmodel.openleft = "1";
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
actions["traindoor"].top[an].reset();
actions["traindoor"].top[an].time = actions["traindoor"].top[an]._clip.duration;
actions["traindoor"].top[an].timeScale = 1;
actions["traindoor"].top[an].play();
}
}
}else{ }else{
trainmodel.right = "1"; trainmodel.right = "1";
trainmodel.rotation.y = 0; trainmodel.rotation.y = 0;
@ -210,7 +237,35 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
for (let tl=0; tl<6; tl++) { for (let tl=0; tl<6; tl++) {
trainmodel.children[tl].position.z = point.z; trainmodel.children[tl].position.z = point.z;
} }
if(trainmodel.openleft == "1"){
trainmodel.openleft = "0";
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
actions["traindoor"].top[an].stop();
}
trainmodel.openright = "1";
for(let an=actions["traindoor"].down.length-1;an>=0;an--){
actions["traindoor"].down[an].reset();
actions["traindoor"].down[an].time = actions["traindoor"].down[an]._clip.duration;
actions["traindoor"].down[an].timeScale = 1;
actions["traindoor"].down[an].play();
}
}else if(trainmodel.openright == "1"){
trainmodel.openright = "0";
for(let an=actions["traindoor"].down.length-1;an>=0;an--){
actions["traindoor"].down[an].stop();
}
trainmodel.openleft = "1";
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
actions["traindoor"].top[an].reset();
actions["traindoor"].top[an].time = actions["traindoor"].top[an]._clip.duration;
actions["traindoor"].top[an].timeScale = 1;
actions["traindoor"].top[an].play();
}
}
} }
} }
if(trainmodel.curve && trainmodel.offset != data.offset){ if(trainmodel.curve && trainmodel.offset != data.offset){
@ -356,6 +411,9 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
function traindoorupdate(data){ function traindoorupdate(data){
// console.log(data); // console.log(data);
// console.log("direct:"+trainmodel.right);
// console.log(trainmodel.openleft);
// console.log(trainmodel.openright);
if(trainmodel.code == data.code){ if(trainmodel.code == data.code){
if(trainmodel.right == "0"){ if(trainmodel.right == "0"){
@ -403,16 +461,16 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
}else{ }else{
if(data.doorCode == "1"){ if(data.doorCode == "1"){
if(trainmodel.openright != data.open && data.open == "0"){ if(trainmodel.openleft != data.open && data.open == "0"){
trainmodel.openright = "0"; trainmodel.openleft = "0";
for(let an=actions["traindoor"].top.length-1;an>=0;an--){ for(let an=actions["traindoor"].top.length-1;an>=0;an--){
actions["traindoor"].top[an].reset(); actions["traindoor"].top[an].reset();
actions["traindoor"].top[an].time = actions["traindoor"].top[an]._clip.duration; actions["traindoor"].top[an].time = actions["traindoor"].top[an]._clip.duration;
actions["traindoor"].top[an].timeScale = -1; actions["traindoor"].top[an].timeScale = -1;
actions["traindoor"].top[an].play(); actions["traindoor"].top[an].play();
} }
}else if(trainmodel.openright != data.open && data.open == "1"){ }else if(trainmodel.openleft != data.open && data.open == "1"){
trainmodel.openright = "1"; trainmodel.openleft = "1";
for(let an=actions["traindoor"].top.length-1;an>=0;an--){ for(let an=actions["traindoor"].top.length-1;an>=0;an--){
actions["traindoor"].top[an].reset(); actions["traindoor"].top[an].reset();
actions["traindoor"].top[an].time = 0; actions["traindoor"].top[an].time = 0;
@ -423,16 +481,16 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
}else{ }else{
if (trainmodel.openleft != data.open && data.open == '0') { if (trainmodel.openright != data.open && data.open == '0') {
trainmodel.openleft = '0'; trainmodel.openright = '0';
for (let an=actions["traindoor"].down.length-1; an>=0; an--) { for (let an=actions["traindoor"].down.length-1; an>=0; an--) {
actions["traindoor"].down[an].reset(); actions["traindoor"].down[an].reset();
actions["traindoor"].down[an].time = actions["traindoor"].down[an]._clip.duration; actions["traindoor"].down[an].time = actions["traindoor"].down[an]._clip.duration;
actions["traindoor"].down[an].timeScale = -1; actions["traindoor"].down[an].timeScale = -1;
actions["traindoor"].down[an].play(); actions["traindoor"].down[an].play();
} }
} else if (trainmodel.openleft != data.open && data.open == '1') { } else if (trainmodel.openright != data.open && data.open == '1') {
trainmodel.openleft = "1"; trainmodel.openright = "1";
for(let an=actions["traindoor"].down.length-1;an>=0;an--){ for(let an=actions["traindoor"].down.length-1;an>=0;an--){
actions["traindoor"].down[an].reset(); actions["traindoor"].down[an].reset();
actions["traindoor"].down[an].time = 0; actions["traindoor"].down[an].time = 0;

View File

@ -138,8 +138,8 @@ export function TrainListN() {
newmesh.speed = 0; newmesh.speed = 0;
newmesh.speeds = 0; newmesh.speeds = 0;
newmesh.offset = null; newmesh.offset = null;
newmesh.openleft = '3'; newmesh.openleft = '0';
newmesh.openright = '3'; newmesh.openright = '0';
scope.group.add(newmesh); scope.group.add(newmesh);

View File

@ -253,7 +253,7 @@ class SkinCode extends defaultStyle {
// 供电线路 // 供电线路
this[deviceType.Power] = { this[deviceType.Power] = {
lineColor: '#FFFFFF', // 线条颜色 lineColor: '#FFFFFF', // 线条颜色
strokeColor: '#ccc', // 线条颜色 strokeColor: 'red', // 线条颜色
extendLength: 10 // 延伸长度 extendLength: 10 // 延伸长度
}; };

View File

@ -366,7 +366,7 @@ class SkinCode extends defaultStyle {
// 供电线路 // 供电线路
this[deviceType.Power] = { this[deviceType.Power] = {
lineColor: '#FFFFFF', // 线条颜色 lineColor: '#FFFFFF', // 线条颜色
strokeColor: '#ccc', // 线条颜色 strokeColor: 'red', // 线条颜色
extendLength: 10 // 延伸长度 extendLength: 10 // 延伸长度
}; };

View File

@ -203,7 +203,7 @@ class SkinCode extends defaultStyle {
// 供电线路 // 供电线路
this[deviceType.Power] = { this[deviceType.Power] = {
lineColor: '#FFFFFF', // 线条颜色 lineColor: '#FFFFFF', // 线条颜色
strokeColor: '#ccc', // 线条颜色 strokeColor: 'red', // 线条颜色
extendLength: 10 // 延伸长度 extendLength: 10 // 延伸长度
}; };

View File

@ -386,7 +386,7 @@ class SkinCode extends defaultStyle {
// 供电线路 // 供电线路
this[deviceType.Power] = { this[deviceType.Power] = {
lineColor: '#FFFFFF', // 线条颜色 lineColor: '#FFFFFF', // 线条颜色
strokeColor: '#ccc', // 线条颜色 strokeColor: 'red', // 线条颜色
extendLength: 10 // 延伸长度 extendLength: 10 // 延伸长度
}; };

View File

@ -421,8 +421,7 @@ class SkinCode extends defaultStyle {
}; };
// 供电线路 // 供电线路
this[deviceType.Power] = { this[deviceType.Power] = {
lineColor: '#FFFFFF', // 线条颜色 strokeColor: 'red', // 线条颜色
strokeColor: '#ccc', // 线条颜色
extendLength: 8 // 延伸长度 extendLength: 8 // 延伸长度
}; };

View File

@ -395,7 +395,7 @@ class SkinCode extends defaultStyle {
// 供电线路 // 供电线路
this[deviceType.Power] = { this[deviceType.Power] = {
lineColor: '#FFFFFF', // 线条颜色 lineColor: '#FFFFFF', // 线条颜色
strokeColor: '#ccc', // 线条颜色 strokeColor: 'red', // 线条颜色
extendLength: 10 // 延伸长度 extendLength: 10 // 延伸长度
}; };

View File

@ -415,7 +415,7 @@ class SkinCode extends defaultStyle {
// 供电线路 // 供电线路
this[deviceType.Power] = { this[deviceType.Power] = {
lineColor: '#FFFFFF', // 线条颜色 lineColor: '#FFFFFF', // 线条颜色
strokeColor: '#ccc', // 线条颜色 strokeColor: 'red', // 线条颜色
extendLength: 10 // 延伸长度 extendLength: 10 // 延伸长度
}; };

View File

@ -390,7 +390,7 @@ class SkinCode extends defaultStyle {
// 供电线路 // 供电线路
this[deviceType.Power] = { this[deviceType.Power] = {
lineColor: '#FFFFFF', // 线条颜色 lineColor: '#FFFFFF', // 线条颜色
strokeColor: '#ccc', // 线条颜色 strokeColor: 'red', // 线条颜色
extendLength: 10 // 延伸长度 extendLength: 10 // 延伸长度
}; };

View File

@ -514,7 +514,7 @@ class SkinCode extends defaultStyle {
// 供电线路 // 供电线路
this[deviceType.Power] = { this[deviceType.Power] = {
lineColor: '#FFFFFF', // 线条颜色 lineColor: '#FFFFFF', // 线条颜色
strokeColor: '#ccc', // 线条颜色 strokeColor: 'red', // 线条颜色
extendLength: 10 // 延伸长度 extendLength: 10 // 延伸长度
}; };

View File

@ -167,9 +167,10 @@ class Jlmap {
const arr = []; const arr = [];
const rectList = []; const rectList = [];
let rect = ''; let rect = '';
// console.log(this.mapDevice);
for (const i in this.mapDevice) { for (const i in this.mapDevice) {
const element = this.mapDevice[i]; const element = this.mapDevice[i];
if (element.instance) { if (element.instance && element._type == 'Section') {
if (!rect) { if (!rect) {
rect = element.instance.getBoundingRect().clone(); rect = element.instance.getBoundingRect().clone();
} else { } else {
@ -187,8 +188,8 @@ class Jlmap {
const scaleHeight = Math.floor(((opts.height - 100) / (rect.height * num)) * 100) / 100; const scaleHeight = Math.floor(((opts.height - 100) / (rect.height * num)) * 100) / 100;
const scale = Math.min(scaleWidth, scaleHeight); const scale = Math.min(scaleWidth, scaleHeight);
// const offsetHeight = (offsetY - (rect.height * scale)) / 2 + Math.abs(rect.x); // 高度差 // const offsetHeight = (offsetY - (rect.height * scale)) + Math.abs(rect.x * scale); // 高度差
// console.log(offsetHeight, opts.height, screenSplit, offsetY, rect); // console.log(offsetHeight, opts.height, screenSplit, offsetY, rect, '缩放对比>', scaleWidth, scaleHeight);
for (let i = 0; i < splitList.length; i++) { for (let i = 0; i < splitList.length; i++) {
let offsetX = ''; let offsetX = '';
@ -198,11 +199,11 @@ class Jlmap {
const dx = (opts.width - (splitList[i] - splitList[i - 1]) * scale) / 2; // 居中计算偏移值 const dx = (opts.width - (splitList[i] - splitList[i - 1]) * scale) / 2; // 居中计算偏移值
offsetX = splitList[i - 1] * scale - dx; offsetX = splitList[i - 1] * scale - dx;
} }
// const param = { scaleRate: scale, offsetX: offsetX, offsetY: -offsetHeight - (offsetY * i) }; // const param = { scaleRate: scale, offsetX: offsetX, offsetY: -(offsetY * i) - offsetHeight};
const param = { scaleRate: scale, offsetX: offsetX, offsetY: -120 - (offsetY * i) }; const param = { scaleRate: scale, offsetX: offsetX, offsetY: -160 - (offsetY * i) };
if (i == 0) { // if (i == 0) {
param.offsetY = -160 - (opts.offsetY || 0); // param.offsetY -= -100;
} // }
arr.push(param); arr.push(param);
const rect = {x: 0, y: 0, width: Number(splitList[i]) + 5, height: opts.height}; const rect = {x: 0, y: 0, width: Number(splitList[i]) + 5, height: opts.height};
rectList.push(rect); rectList.push(rect);

View File

@ -1,33 +1,119 @@
<template> <template>
<div style="width: 100%;display: flex;justify-content: center;"> <div style="width: 100%;display: flex;justify-content: center;">
<div> <div>
<div class="top-content-box"> <div class="content-box">
<div style="width: 950px;font-size: 18px;color: #56E5DE;margin: 10px;">全线车站时间表</div> <div style="width: 950px;font-size: 18px;color: #56E5DE;margin: 10px;">全线车站时间表</div>
<div style="width: 100%;display: flex;justify-content: center;"> <div style="width: 100%;display: flex;justify-content: center;">
<div style="width: 240px;height: 300px;background: #FFF;"> <div style="width: 240px;height: 280px;background: #FFF;">
<el-row> <el-row>
<div style="background: #43388A;font-size: 14px;height: 30px;line-height: 30px;color: #FFF;text-align: center;">公用时间列表</div> <div style="background: #43388A;font-size: 14px;height: 30px;line-height: 30px;color: #FFF;text-align: center;">公用时间列表</div>
</el-row> </el-row>
</div> </div>
<div style="width: 120px;margin-left: 10px;"> <div style="width: 120px;margin-left: 10px;">
<div style="font-size: 18px;color: #56E5DE;width: 100%;text-align: center;margin: 85px 0;">增加时间表名</div> <div style="font-size: 18px;color: #56E5DE;width: 100%;text-align: center;margin: 75px 0;">增加时间表名</div>
<el-input v-model="tableName" size="mini" /> <el-input v-model="tableName" size="mini" />
<div class="button-box" style="text-align: center;padding: 5px 0;margin: 10px 0;">增加</div> <div class="button-box" style="text-align: center;padding: 5px 0;margin: 10px 0;">增加</div>
<div class="button-box" style="text-align: center;padding: 5px 0">删除</div> <div class="button-box" style="text-align: center;padding: 5px 0">删除</div>
</div> </div>
<div style="width: 110px;height: 300px;padding: 0 15px;border-right: 2px solid #2B5932;margin-left: 40px;"> <div style="width: 110px;height: 280px;padding: 0 15px;border-right: 2px solid #2B5932;margin-left: 40px;">
<div style="font-size: 18px;color: #56E5DE;width: 100%;text-align: center;">下载选择</div> <div style="font-size: 18px;color: #56E5DE;width: 100%;text-align: center;">下载选择</div>
<div class="button-box" style="background: #3F8B66;text-align: center;margin-top: 256px;">立即下发</div> <div class="button-box" style="background: #3F8B66;text-align: center;margin-top: 236px;">立即下发</div>
</div> </div>
<div style="width: 110px;height: 300px;margin-left: 15px;"> <div style="width: 70px;height: 280px;margin-left: 15px;">
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期一</div> <div style="display: flex;align-items: center;cursor: pointer;" @click="selectedAllStationDate('Mon')">
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期二</div> <div class="check-box" :style="{background: allStationDate.includes('Mon')?'#0F0':'#BFC1C1'}" />
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期三</div> <div class="check-text">星期一</div>
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期四</div> </div>
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期五</div> <div style="display: flex;align-items: center;cursor: pointer;" @click="selectedAllStationDate('Tues')">
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期六</div> <div class="check-box" :style="{background: allStationDate.includes('Tues')?'#0F0':'#BFC1C1'}" />
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期日</div> <div class="check-text">星期二</div>
<div class="button-box" style="background: #3F8B66;text-align: center;margin-top: 100px;">排定下发</div> </div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedAllStationDate('Wed')">
<div class="check-box" :style="{background: allStationDate.includes('Wed')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期三</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedAllStationDate('Thurs')">
<div class="check-box" :style="{background: allStationDate.includes('Thurs')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期四</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedAllStationDate('Fri')">
<div class="check-box" :style="{background: allStationDate.includes('Fri')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期五</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedAllStationDate('Sta')">
<div class="check-box" :style="{background: allStationDate.includes('Sta')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期六</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedAllStationDate('Sun')">
<div class="check-box" :style="{background: allStationDate.includes('Sun')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期日</div>
</div>
<div class="button-box" style="background: #3F8B66;text-align: center;margin-top: 80px;">排定下发</div>
</div>
</div>
</div>
<div class="content-box">
<div style="width: 950px;font-size: 18px;color: #56E5DE;margin: 10px;">车站时间表</div>
<div style="width: 100%;display: flex;justify-content: center;">
<div style="width: 180px;height: 280px;background: #FFF;">
<el-row>
<div style="background: #43388A;font-size: 14px;height: 30px;line-height: 30px;color: #FFF;text-align: center;">车站选择</div>
</el-row>
</div>
<div class="border-box" style="width: 380px;height: 280px;display: flex;justify-content: center;padding: 10px;margin-left: 20px;">
<div style="width: 240px;height: 260px;background: #FFF;">
<el-row>
<div style="background: #43388A;font-size: 14px;height: 30px;line-height: 30px;color: #FFF;text-align: center;">车站时间列表</div>
</el-row>
</div>
<div style="width: 110px;height: 260px;margin-left: 10px;">
<div style="width: 100%;font-size: 18px;color: #56E5DE;">新时间表名</div>
<el-input v-model="newTableName" size="mini" style="margin: 10px 0;" />
<div class="button-box" style="padding: 5px 10px;width: 50px;text-align: center;font-size: 12px;">改名</div>
<div style="padding: 10px 0; border-top: 2px solid #2B5932;margin-top: 10px;display: flex;justify-content: center;">
<div class="button-box" style="width: 45px;font-size: 12px;height: 65px;text-align: center;line-height: 65px;margin-right: 10px;">删除</div>
<div class="button-box" style="width: 55px;font-size: 12px;height: 65px;text-align: center;padding-top: 18px;">增到共用时间表列</div>
</div>
<div style="display: flex;justify-content: center;">
<div class="button-box" style="width: 45px;font-size: 12px;height: 65px;text-align: center;margin-right: 10px;padding-top: 18px;">编辑时间表</div>
<div class="button-box" style="width: 55px;font-size: 12px;height: 65px;line-height: 65px;text-align: center;">查看</div>
</div>
</div>
</div>
<div style="width: 110px;height: 280px;padding: 0 15px;border-right: 2px solid #2B5932;margin-left: 40px;">
<div style="font-size: 18px;color: #56E5DE;width: 100%;text-align: center;">下载选择</div>
<div class="button-box" style="background: #3F8B66;text-align: center;margin-top: 236px;">立即下发</div>
</div>
<div style="width: 70px;height: 280px;margin-left: 15px;">
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedStationDate('Mon')">
<div class="check-box" :style="{background: stationDate.includes('Mon')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期一</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedStationDate('Tues')">
<div class="check-box" :style="{background: stationDate.includes('Tues')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期二</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedStationDate('Wed')">
<div class="check-box" :style="{background: stationDate.includes('Wed')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期三</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedStationDate('Thurs')">
<div class="check-box" :style="{background: stationDate.includes('Thurs')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期四</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedStationDate('Fri')">
<div class="check-box" :style="{background: stationDate.includes('Fri')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期五</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedStationDate('Sta')">
<div class="check-box" :style="{background: stationDate.includes('Sta')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期六</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedStationDate('Sun')">
<div class="check-box" :style="{background: stationDate.includes('Sun')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期日</div>
</div>
<div class="button-box" style="background: #3F8B66;text-align: center;margin-top: 80px;">排定下发</div>
</div> </div>
</div> </div>
</div> </div>
@ -40,14 +126,35 @@ export default {
name: 'SchedulesManage', name: 'SchedulesManage',
data() { data() {
return { return {
tableName: '' tableName: '',
newTableName: '',
stationDate: [],
allStationDate: []
}; };
},
methods: {
selectedStationDate(day) {
const index = this.stationDate.indexOf(day);
if (index < 0) {
this.stationDate.push(day);
} else {
this.stationDate.splice(index, 1);
}
},
selectedAllStationDate(day) {
const index = this.allStationDate.indexOf(day);
if (index < 0) {
this.allStationDate.push(day);
} else {
this.allStationDate.splice(index, 1);
}
}
} }
}; };
</script> </script>
<style scoped> <style scoped>
.top-content-box { .content-box {
width: 950px; width: 950px;
margin-top: 10px; margin-top: 10px;
border-top: 2px solid #A4A3A0; border-top: 2px solid #A4A3A0;
@ -56,10 +163,24 @@ export default {
border-right: 2px solid #E5F1FE; border-right: 2px solid #E5F1FE;
padding-bottom: 10px; padding-bottom: 10px;
} }
.border-box{
border-top: 2px solid #FFFFFE;
border-right: 2px solid #797977;
border-bottom: 2px solid #797977;
border-left: 2px solid #FFFFFE;
}
.check-text {
display: inline-block;
color: #56E5DE;
font-size: 13px;
height: 25px;
line-height: 25px;
margin-left: 5px;
}
.check-box { .check-box {
display: inline-block; display: inline-block;
height: 10px; height: 14px;
width: 10px; width: 14px;
background: #BFC1C1; background: #BFC1C1;
border-top: 2px solid #FFFFFE; border-top: 2px solid #FFFFFE;
border-right: 2px solid #797977; border-right: 2px solid #797977;

View File

@ -350,7 +350,7 @@
atpclick: function (e){ atpclick: function (e){
//console.log("atp"); //console.log("atp");
trainSimulationAtp(this.group,this.groupNum).then(netdata => { trainSimulationAtp(this.group,this.groupNum).then(netdata => {
console.log(netdata); // console.log(netdata);
}); });
}, },
@ -359,17 +359,17 @@
}, },
changehead: function(e){ changehead: function(e){
trainSimulationChangeHead(this.group,this.groupNum).then(netdata => { trainSimulationChangeHead(this.group,this.groupNum).then(netdata => {
console.log(netdata); // console.log(netdata);
}); });
}, },
bmcbtcclick: function (e){ bmcbtcclick: function (e){
trainSimulationDriveMode(this.group,this.groupNum,"CM").then(netdata => { trainSimulationDriveMode(this.group,this.groupNum,"CM").then(netdata => {
console.log(netdata); // console.log(netdata);
}); });
}, },
rmclick: function (e){ rmclick: function (e){
trainSimulationDriveMode(this.group,this.groupNum,"RM").then(netdata => { trainSimulationDriveMode(this.group,this.groupNum,"RM").then(netdata => {
console.log(netdata); // console.log(netdata);
}); });
}, },
dloclick: function (e){ dloclick: function (e){
@ -395,7 +395,7 @@
}, },
atoaclick: function (e){ atoaclick: function (e){
trainSimulationAto(this.group,this.groupNum).then(netdata => { trainSimulationAto(this.group,this.groupNum).then(netdata => {
console.log(netdata); // console.log(netdata);
}); });
}, },
cbtcclick: function (e){ cbtcclick: function (e){

View File

@ -71,9 +71,9 @@ export default {
height: 800, height: 800,
roadData: [], roadData: [],
focus: false, focus: false,
booleanList: ['lockFirst', 'switchSingleHandle', 'switchNRTurnChain', 'switchSingleLockChain', 'signalForceCancelRoute'], booleanList: ['lockFirst', 'switchSingleHandle', 'switchNRTurnChain', 'switchSingleLockChain', 'signalForceCancelRoute', 'initSingleLockSwitch'],
selectList: ['upDirection', 'runMode'], selectList: ['upDirection', 'runMode'],
generalConfig: ['lockFirst', 'switchSingleHandle', 'upDirection', 'switchNRTurnChain', 'switchSingleLockChain', 'signalForceCancelRoute', 'runMode'], generalConfig: ['lockFirst', 'switchSingleHandle', 'upDirection', 'switchNRTurnChain', 'switchSingleLockChain', 'signalForceCancelRoute', 'runMode', 'initSingleLockSwitch'],
numberList: [], numberList: [],
optionsMap: { optionsMap: {
upDirection: [{label: 'right', value: 'right'}, {label: 'left', value: 'left'}], upDirection: [{label: 'right', value: 'right'}, {label: 'left', value: 'left'}],
@ -86,7 +86,8 @@ export default {
switchNRTurnChain:'道岔正/反操是否联动', switchNRTurnChain:'道岔正/反操是否联动',
switchSingleLockChain:'道岔单解/锁是否联动', switchSingleLockChain:'道岔单解/锁是否联动',
signalForceCancelRoute:'是否强制取消进路/在接近区段占用时是否依旧强制执行取消进路', signalForceCancelRoute:'是否强制取消进路/在接近区段占用时是否依旧强制执行取消进路',
runMode:'列车控制模式/级别' runMode:'列车控制模式/级别',
initSingleLockSwitch: '初始加载设备时是否默认单锁正线道岔'
} }
}; };
}, },