Merge branch 'test'

This commit is contained in:
zyy 2020-04-22 17:14:54 +08:00
commit 0fdf4c225c
341 changed files with 22995 additions and 24017 deletions

View File

@ -5,7 +5,8 @@
"author": "Pan <panfree23@gmail.com>",
"license": "MIT",
"scripts": {
"dev": "vue-cli-service serve --open",
"start": "vue-cli-service serve --open",
"dev": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve",
"build": "vue-cli-service build",
"test": "vue-cli-service build --mode staging",
"local": "vue-cli-service build --mode native",
@ -28,6 +29,7 @@
"path-to-regexp": "2.4.0",
"qrcode.vue": "^1.6.2",
"qs": "^6.9.3",
"recordrtc": "^5.5.9",
"script-loader": "^0.7.2",
"sessionstorage": "^0.1.0",
"sockjs-client": "^1.4.0",

View File

@ -49,6 +49,15 @@ export function chatWithText(data, group) {
});
}
// 文字聊天 发送文字
export function chatWithAudio(file, group) {
return request({
url: `/api/jointTraining/chatWithAudio?group=${group}`,
method: 'post',
data: file
});
}
// 生成分发二维码
export function getJoinTrainCode(data, group) {
return request({
@ -165,14 +174,6 @@ export function getUserRoles(group) {
});
}
// 返回房间
export function putJointTrainingState() {
return request({
url: `/api/jointTraining/room/back`,
method: 'put'
});
}
// 踢出用户
export function putJointTrainingUserkicked(userId, group) {
return request({
@ -284,3 +285,28 @@ export function realDeviceIsUsed(group, projectCode) {
}
});
}
// 获取仿真成员列表(新版地图)
export function getSimulationMembersNew(group) {
return request({
url: `/simulation/${group}/members`,
method: 'get'
});
}
// 获取仿真会话列表(新版地图)
export function getSimulationConversationListNew(group) {
return request({
url: `/simulation/${group}/conversations`,
method: 'get'
});
}
// 获取/创建仿真会话(新版地图)
export function getSimulationConversationIdNew(params, group) {
return request({
url: `/simulation/${group}/wx/conversation`,
method: 'get',
params: params
});
}

View File

@ -7,13 +7,6 @@ export function getRpListByUserMapId(mapId) {
method: 'get'
});
}
export function getMapList(cityCode) {
/** 根据cityCode获取地图列表 */
return request({
url: `/api/mapSystem/queryMapByCityCode/${cityCode}`,
method: 'get'
});
}
/** 获取用户自己的运行图详情*/
export function getRpDetailByUserMapId(planId) {
@ -31,14 +24,6 @@ export function getUserMapDetailByMapId(mapId) {
});
}
/** 用户自己的运行图仿真测试*/
export function runUserPlanNotify({ planId }) {
return request({
url: `/api/draftMap/runPlan/simulationCheck/${planId}`,
method: 'get'
});
}
/** 管理员获取需审核的课程列表 */
export function reviewLessonList(params) {
return request({

View File

@ -536,4 +536,42 @@ export function getFlankProtectionList(mapId, params) {
params
});
}
/** 创建车站区段停站时间 */
export function createStationParkTime(data) {
return request({
url: `/api/mapBuild/stationParkTime`,
method: 'post',
data
});
}
/** 删除车站区段停站时间 */
export function deleteStationParkTime(stationParkTimeId) {
return request({
url: `/api/mapBuild/stationParkTime/${stationParkTimeId}`,
method: 'delete'
});
}
/** 获取车站区段停站时间 */
export function getStationParkTime(stationParkTimeId, params) {
return request({
url: `/api/mapBuild/stationParkTime/${stationParkTimeId}`,
method: 'get',
params
});
}
/** 更新车站区段停站时间 */
export function updateStationParkTime(data) {
return request({
url: `/api/mapBuild/stationParkTime/${data.id}`,
method: 'get',
data
});
}
/** 分页获取车站区段停站时间 */
export function getStationParkTimeList(mapId, params) {
return request({
url: `/api/mapBuild/${mapId}/stationParkTime`,
method: 'get',
params
});
}

View File

@ -127,14 +127,6 @@ export function getUserRolesNew(group) {
});
}
// 返回房间
export function putJointTrainingStateNew() {
return request({
url: `/api/v1/jointTraining/room/back`,
method: 'put'
});
}
// 踢出用户
export function putJointTrainingUserkickedNew(userId, group) {
return request({

View File

@ -1,74 +0,0 @@
import request from '@/utils/request';
/** 分页查找个人录制的仿真任务*/
export function getQuestPageList(mapId, params) {
return request({
url: `/api/script/draft/${mapId}/list`,
method: 'get',
params: params
});
}
/** 创建任务 */
export function createQuest(data) {
return request({
url: `/api/script/draft`,
method: 'post',
data
});
}
/** 根据任务id删除任务 */
export function deleteQuest(id) {
return request({
url: `/api/script/draft/${id}`,
method: 'delete'
});
}
/** 根据id查询任务基础信息 */
export function getQuestById(id) {
return request({
url: `/api/script/draft/${id}`,
method: 'get'
});
}
/** 根据id查询任务详情信息 */
export function getQuestByIdList(id) {
return request({
url: `/api/script/draft/${id}/detail`,
method: 'get'
});
}
/** 更新任务基本信息 */
export function updateQuest(id, data) {
return request({
url: `/api/script/draft/${id}`,
method: 'put',
data
});
}
/** 分页查找上线的仿真任务*/
export function getQuestPageListOnline(params) {
return request({
url: `/api/quest/paging/online`,
method: 'get',
params: params
});
}
/** 剧本发布 */
export function publishQuest(id, data) {
return request({
url: `/api/script/draft/${id}/publish`,
method: 'put',
data
});
}
/** 剧本撤销发布 */
export function retractQuest(id, data) {
return request({
url: `/api/script/draft/${id}/retract`,
method: 'put'
});
}

View File

@ -45,3 +45,35 @@ export function generateSchedulingAgain(group) {
method: 'delete'
});
}
/** 生成地图通用派班计划 */
export function generateCommonScheduling (data) {
return request({
url: `/api/v1/scheduling/generate/common`,
method: 'post',
data
});
}
/** 查询某天的派班计划 */
export function querySechedulingNew (group, params) {
return request({
url: `/api/v1/scheduling/${group}/day`,
method: 'get',
params
});
}
/** 生成某天的基础派班计划 */
export function generateSchedulingNew (group, params) {
return request({
url: `/api/v1/scheduling/${group}/generate`,
method: 'post',
params
});
}
/** 保存派班计划数据 */
export function saveSchedulingNew(group, data) {
return request({
url: `/api/v1/scheduling/${group}/save`,
method: 'post',
data
});
}

View File

@ -24,3 +24,63 @@ export function getDraftScriptByGroup(group) {
method: 'get'
});
}
/** 剧本撤销发布 */
export function retractScript(id, data) {
return request({
url: `/api/script/draft/${id}/retract`,
method: 'put'
});
}
/** 剧本发布 */
export function publishScript(id, data) {
return request({
url: `/api/script/draft/${id}/publish`,
method: 'put',
data
});
}
/** 更新剧本基本信息 */
export function updateScript(id, data) {
return request({
url: `/api/script/draft/${id}`,
method: 'put',
data
});
}
/** 根据剧本id删除剧本 */
export function deleteScript(id) {
return request({
url: `/api/script/draft/${id}`,
method: 'delete'
});
}
/** 分页查找个人录制的仿真剧本*/
export function getScriptPageList(mapId, params) {
return request({
url: `/api/script/draft/${mapId}/list`,
method: 'get',
params: params
});
}
/** 创建剧本 */
export function createScript(data) {
return request({
url: `/api/script/draft`,
method: 'post',
data
});
}
/** 根据id查询任务基础信息 */
export function getScriptByIdBasic(id) {
return request({
url: `/api/script/draft/${id}`,
method: 'get'
});
}

View File

@ -605,3 +605,10 @@ export function exitRunPlan (group) {
method: 'post'
});
}
/** 加载指定运行计划 */
export function simulationLoadRunPlan(group, templateId) {
return request({
url: `/simulation/${group}/load/runPlan/${templateId}`,
method: 'put'
});
}

View File

@ -9,14 +9,6 @@ export function getTrainingSystemList(cityCode, params) {
});
}
export function getTrainingSystemListByMapId(mapId) {
/** 根据mapId去获取其子系统 */
return request({
url: `/api/mapSystem/${mapId}`,
method: 'get'
});
}
export function generateMapSystem(mapId) {
/** 根据mapId生成地图子系统 */
return request({

View File

@ -143,7 +143,7 @@
</el-row>
</template>
</el-col>
<el-col :span="24-leftSpan-1" :offset="1">
<el-col :span="24-leftSpan-1" :offset="offsetSpan">
<el-button style="margin-right: 10px" type="primary" size="small" :disabled="!canQuery" @click="query">{{ $t('global.query') }}</el-button>
<el-button v-if="queryForm.reset" type="primary" size="small" :disabled="!canQuery" @click="doClean">{{ $t('global.reset') }}</el-button>
<el-button v-if="exportFlag" type="primary" size="small" :disabled="!canQuery" @click="doExport">{{ $t('global.export') }}</el-button>
@ -201,6 +201,12 @@ export default {
default() {
return 18;
}
},
offsetSpan: {
type: Number,
default() {
return 1;
}
}
},
data() {

View File

@ -6,6 +6,7 @@
ref="queryForm"
:query-form="queryForm"
:left-span="queryForm.leftSpan"
:offset-span="queryForm.offsetSpan"
:query-list="queryList"
:before-query="queryForm.beforeQuery"
:can-query="canQuery"
@ -32,7 +33,7 @@
>
<el-table-column v-if="queryList.selectCheckShow" type="selection" width="55" />
<el-table-column v-if="queryList.indexShow" type="index" width="50" :label="this.$t('global.index')" />
<el-table-column v-if="queryList.radioShow" :label="`#${$t('global.select')}`" width="60">
<el-table-column v-if="queryList.radioShow" :label="`#${$t('global.select')}`" width="80">
<template slot-scope="scope">
<el-radio v-model="choose" :label="scope.row">{{ `` }}</el-radio>
</template>

View File

@ -162,7 +162,7 @@ export default {
createSchedulePlanSuccess: 'Create schedule plan success',
regenerateSchedulePlanSuccess: 'Regenerate schedule plan success',
checkPassed: 'Check passed',
checkFailed: 'Check failed',
checkFailed: 'Data check failed',
checkSchedulePlanFailed: 'Check schedule plan failed',
saveSchedulePlanSuccess: 'Save schedule plan success',
saveSchedulePlanFail: 'Save schedule plan fail',

View File

@ -234,5 +234,9 @@ export default {
mapSortSuccessfully: 'Map sort successfully',
mapSortFailed: 'Map sort failed',
enterTrainingRoomFailed: 'Failed to enter the comprehensive drill, please consult the administrator is still in the room!',
failedToAddNewRoom: 'Failed to add new room'
failedToAddNewRoom: 'Failed to add new room',
dwellTimeSuccessful: 'Create dwell time successful!',
dwellTimeFailed: 'Failed to create dwell time!',
updateDwellTimeSuccessful: 'Update dwell time successful!',
updateDwellTimeFailed: 'Failed to update dwell time!'
};

View File

@ -161,8 +161,8 @@ export default {
schedulePlanSuccess: '派班计划成功!',
createSchedulePlanSuccess: '创建派班计划成功',
regenerateSchedulePlanSuccess: '重新生成派班计划成功',
checkPassed: '检查通过',
checkFailed: '检查不通过',
checkPassed: '数据检查校验通过',
checkFailed: '数据检查校验不通过',
checkSchedulePlanFailed: '检查派班计划失败',
saveSchedulePlanSuccess: '保存派班计划成功',
saveSchedulePlanFail: '保存派班失败',

View File

@ -234,5 +234,9 @@ export default {
mapSortSuccessfully: '地图排序成功!',
mapSortFailed: '地图排序失败!',
enterTrainingRoomFailed: '进入综合演练失败,请咨询管理员是否还在房间内!',
failedToAddNewRoom: '加入新房间失败'
failedToAddNewRoom: '加入新房间失败',
dwellTimeSuccessful: '创建停站时间成功!',
dwellTimeFailed: '创建停站时间失败!',
updateDwellTimeSuccessful: '更新停站时间成功!',
updateDwellTimeFailed: '更新停站时间失败!'
};

View File

@ -24,6 +24,7 @@ export function Jlmap3ddata(mapid,scope){
console.log(data);
if(data.data ){
if(data.data.assets){
// initobj(editmapid,data.data.id);
init3d(editmapid,data.data);
}else{
initobj(editmapid,data.data.id);

View File

@ -37,7 +37,6 @@ export function Sectionaction(){
}
//点击事件
this.raycaster = function(data,type){
console.log(type);
let modellist;
if(type == "test"){
modellist = data.scene.getObjectByName("section").children;
@ -80,13 +79,13 @@ export function Sectionaction(){
raycaster.setFromCamera( mouse, data.camera );
let intersects1;
console.log(modellist);
// console.log(modellist);
for(let i=0;i<modellist.length;i++){
intersects1 = raycaster.intersectObject(modellist[i],true);
console.log(intersects1);
// console.log(intersects1);
if(intersects1[0]){
console.log(intersects1[0].object.code);
console.log(modellist[i].code);
// console.log(intersects1[0].object.code);
// console.log(modellist[i].code);
if(intersects1[0].object.code == modellist[i].code){
return modellist[i];

View File

@ -59,37 +59,32 @@ export function getmodels(data) {
let sections = [];
// console.log(data.mapdata.sectionlist.sections.datalist);
for(let i in data.mapdata.sectionlist.sections.datalist){
console.log(data.mapdata.sectionlist.sections.datalist[i].code);
console.log(data.mapdata.sectionlist.sections.datalist[i]);
console.log(data.mapdata.sectionlist.sections.datalist[i].mesh.lengthFact);
let section = {
// uuid:data.mapdata.sectionlist.sections.modellist[i].uuid,
code:data.mapdata.sectionlist.sections.datalist[i].code,
name:data.mapdata.sectionlist.sections.datalist[i].name,
lengthFact:data.mapdata.sectionlist.sections.datalist[i].mesh.lengthFact,
standTrack:data.mapdata.sectionlist.sections.datalist[i].standTrack,
rightlist:data.mapdata.sectionlist.sections.datalist[i].rightlist,
leftlist:data.mapdata.sectionlist.sections.datalist[i].leftlist,
rp:data.mapdata.sectionlist.sections.datalist[i].rp,
lp:data.mapdata.sectionlist.sections.datalist[i].lp,
railpoint:data.mapdata.sectionlist.sections.datalist[i].mesh.railpoint,
rail:data.mapdata.sectionlist.sections.datalist[i].rail,
position:data.mapdata.sectionlist.sections.datalist[i].mesh.position,
rotation:data.mapdata.sectionlist.sections.datalist[i].mesh.rotation,
scale:data.mapdata.sectionlist.sections.datalist[i].mesh.scale,
rsection:null,
lsection:null,
csection:null
}
if(data.mapdata.sectionlist.sections.datalist[i].rsection){
section.rsection = data.mapdata.sectionlist.sections.datalist[i].rsection;
}
if(data.mapdata.sectionlist.sections.datalist[i].lsection){
section.lsection = data.mapdata.sectionlist.sections.datalist[i].lsection;
}
if(data.mapdata.sectionlist.sections.datalist[i].csection){
section.csection = data.mapdata.sectionlist.sections.datalist[i].csection;
}
let nowmesh = data.mapdata.sectionlist.sectiongroup.getObjectByProperty("code",section.code);
section.railpoint = nowmesh.railpoint
// console.log(nowmesh.railpoint);
// if(data.mapdata.sectionlist.sections.datalist[i].rsection){
// section.rsection = data.mapdata.sectionlist.sections.datalist[i].rsection;
// }
// if(data.mapdata.sectionlist.sections.datalist[i].lsection){
// section.lsection = data.mapdata.sectionlist.sections.datalist[i].lsection;
// }
// if(data.mapdata.sectionlist.sections.datalist[i].csection){
// section.csection = data.mapdata.sectionlist.sections.datalist[i].csection;
// }
// testmesh1.position.z = link.position.z;

View File

@ -53,7 +53,7 @@ export function JLmap3dEdit(dom, data, mapid) {
dom.appendChild(this.renderer.domElement);
//定义相机
this.camera = new THREE.PerspectiveCamera(70, dom.clientWidth/dom.clientHeight, 1, 1000);
this.camera = new THREE.PerspectiveCamera(70, dom.clientWidth/dom.clientHeight, 1, 100000);
this.camera.aspect = window.innerWidth / window.innerHeight;
this.camera.updateProjectionMatrix();
this.camera.position.set(0,0,1800);
@ -68,7 +68,6 @@ export function JLmap3dEdit(dom, data, mapid) {
this.transcontrol.addEventListener( 'change', render );
this.transcontrol.addEventListener( 'dragging-changed', function ( event ) {
scope.controls.enabled = ! event.value;
scope.selectswitch = ! event.value;
} );
@ -163,8 +162,8 @@ export function JLmap3dEdit(dom, data, mapid) {
this.export = function(){
let exporter = new THREE.OBJExporter();
console.log(scope.mapdata);
let exportmodels = scope.mapdata.stationstandlist.group;
// let exportmodels = scope.mapdata.sectionlist.switchgroup;
// let exportmodels = scope.mapdata.stationstandlist.group;
let exportmodels = scope.mapdata.sectionlist.sectiongroup;
// let exportmodels = scope.mapdata.stationstandlist.group;
let result = exporter.parse( exportmodels );
@ -234,10 +233,14 @@ export function JLmap3dEdit(dom, data, mapid) {
this.vexscal = function(){
this.scalswitch = true;
scalControls.attach(scope.selectmodel);
scope.transcontrol.detach()
this.scalswitch = true;
if(scope.selectmodel.railpoint){
scalControls.attach(scope.selectmodel,scope.selectmodel.railpoint);
}else{
scalControls.attach(scope.selectmodel);
}
};
@ -257,6 +260,7 @@ export function JLmap3dEdit(dom, data, mapid) {
console.log("autoss");
console.log(scope.mapdata);
scope.mapdata.signallist.resetsignal(scope.mapdata);
scope.mapdata.switchlist.resetswitch(scope.mapdata);
//old
// scope.mapdata.signallist.resetsignal(scope.mapdata.linklist);
};
@ -313,7 +317,12 @@ export function JLmap3dEdit(dom, data, mapid) {
if(scope.selectmodel != null){
//console.log(scope.selectmodel.rotation);
scope.transcontrol.attach( scope.selectmodel );
if(scalControls.scalon){
}else{
scope.transcontrol.attach( scope.selectmodel,scope.editmode );
}
}

View File

@ -443,18 +443,32 @@ export function SectionList() {
testmesh2.rotation.z = 0.2193;
data.rp.x = data.lp.x+(data.lengthFact)*Math.cos(testmesh2.rotation.z);
data.rp.z = data.lp.z-(data.lengthFact)*Math.sin(testmesh2.rotation.z);
}else if(data.points[0].y<data.points[data.pointslength].y){
testmesh2.rotation.z = -0.2193;
data.rp.x = data.lp.x+(data.lengthFact)*Math.cos(testmesh2.rotation.z);
data.rp.z = data.lp.z-(data.lengthFact)*Math.sin(testmesh2.rotation.z);
}else{
data.rp.z = data.lp.z;
// testmesh2.rotation.z = rotenum;
}
testmesh2.position.x = (data.lp.x + data.rp.x)/2;
testmesh2.position.z = (data.lp.z + data.rp.z)/2;
if(data.rp.z != data.lp.z){
testmesh2.railpoint = [
{x:data.lp.x,y:0,z:data.lp.z},
{x:testmesh2.position.x,y:0,z:testmesh2.position.z},
{x:data.rp.x,y:0,z:data.rp.z}
];
}else{
testmesh2.railpoint = [
{x:data.lp.x,y:0,z:data.lp.z},
{x:data.rp.x,y:0,z:data.rp.z}
];
}
// if(data.iscur == "3"){
// testmesh2.position.z = origin.mesh.position.z;
// }
@ -500,6 +514,18 @@ export function SectionList() {
}
testmesh2.position.x = (data.rp.x + data.lp.x)/2;
testmesh2.position.z = (data.rp.z + data.lp.z)/2;
if(data.rp.z != data.lp.z){
testmesh2.railpoint = [
{x:data.lp.x,y:0,z:data.lp.z},
{x:testmesh2.position.x,y:0,z:testmesh2.position.z},
{x:data.rp.x,y:0,z:data.rp.z}
];
}else{
testmesh2.railpoint = [
{x:data.lp.x,y:0,z:data.lp.z},
{x:data.rp.x,y:0,z:data.rp.z}
];
}
// if(data.iscur == "3"){
// testmesh2.position.z = origin.mesh.position.z;
// }
@ -514,6 +540,7 @@ export function SectionList() {
// testmesh2.rotation.z = -0.2193;
// }
}
// console.log(data.ctype);
if(type == "cross"){
// console.log(data.ctype);
@ -582,194 +609,18 @@ export function SectionList() {
// testmesh2.rotation.z = ;
}
// if(data.ctype == "1"){
// buildrailcurve(testmesh2,"right",data.ctype);
// }
// if(data.ctype == "2"){
// buildrailcurve(testmesh2,"right",data.ctype);
// }
// if(data.ctype == "3"){
// buildrailcurve(testmesh2,"left",data.ctype);
// }
// if(data.ctype == "4"){
// buildrailcurve(testmesh2,"left",data.ctype);
// }
testmesh2.railpoint = [
{x:data.lp.x,y:0,z:data.lp.z},
{x:testmesh2.position.x,y:0,z:testmesh2.position.z},
{x:data.rp.x,y:0,z:data.rp.z}
];
}
// var box = new THREE.BoxHelper( testmesh2, 0xffffff );
// scope.sectiongroup.add( box );
}
function buildrailcurve(origin,direct,type){
console.log(origin.position);
if(direct == "right"){
let testmesh1 = autorail.clone(true);
for(let i=0;i<autorail.rightlist.length;i++){
testmesh1.geometry.attributes.position.array[autorail.rightlist[i]*3] = 1;
testmesh1.geometry.attributes.uv.array[autorail.rightlist[i]*2] = testmesh1.geometry.attributes.position.array[0]-testmesh1.geometry.attributes.position.array[3];
}
let newrail1 = new THREE.BufferGeometry();
newrail1.copy(testmesh1.geometry);
testmesh1.geometry = newrail1;
testmesh1.geometry.attributes.position.needsUpdate = true;
testmesh1.geometry.attributes.uv.needsUpdate = true;
testmesh1.geometry.computeBoundingSphere();
testmesh1.geometry.center();
//
let testmesh2 = autorail.clone(true);
for(let i=0;i<autorail.rightlist.length;i++){
testmesh2.geometry.attributes.position.array[autorail.rightlist[i]*3] = 1;
testmesh2.geometry.attributes.uv.array[autorail.rightlist[i]*2] = testmesh2.geometry.attributes.position.array[0]-testmesh2.geometry.attributes.position.array[3];
}
let newrail2 = new THREE.BufferGeometry();
newrail2.copy(testmesh2.geometry);
testmesh2.geometry = newrail2;
testmesh2.geometry.attributes.position.needsUpdate = true;
testmesh2.geometry.attributes.uv.needsUpdate = true;
testmesh2.geometry.computeBoundingSphere();
testmesh2.geometry.center();
let testmesh3 = autorail.clone(true);
for(let i=0;i<autorail.rightlist.length;i++){
testmesh3.geometry.attributes.position.array[autorail.rightlist[i]*3] = 1;
testmesh3.geometry.attributes.uv.array[autorail.rightlist[i]*2] = testmesh3.geometry.attributes.position.array[0]-testmesh3.geometry.attributes.position.array[3];
}
let newrail3 = new THREE.BufferGeometry();
newrail3.copy(testmesh3.geometry);
testmesh3.geometry = newrail3;
testmesh3.geometry.attributes.position.needsUpdate = true;
testmesh3.geometry.attributes.uv.needsUpdate = true;
testmesh3.geometry.computeBoundingSphere();
testmesh3.geometry.center();
if(type == "1"){
testmesh1.rotation.x = 0;
testmesh2.rotation.x = 0;
testmesh3.rotation.x = 0;
testmesh1.position.x =(origin.lengthFact)/2 +0.9;
testmesh1.position.z = 0.03;
testmesh1.rotation.z = 0.05;
testmesh2.position.x = (origin.lengthFact)/2 +2.3;
testmesh2.position.z = 0.14;
testmesh2.rotation.z = 0.1;
testmesh3.position.x = (origin.lengthFact)/2 +3.7;
testmesh3.position.z = 0.32;
testmesh3.rotation.z = 0.15;
}
if(type == "2"){
testmesh1.rotation.y = 0;
testmesh2.rotation.y = 0;
testmesh3.rotation.y = 0;
testmesh1.position.x = (origin.lengthFact)/2 +0.9;
testmesh1.position.z = 0.03;
testmesh1.rotation.z = 0.05;
testmesh2.position.x = (origin.lengthFact)/2 +2.3;
testmesh2.position.z = 0.14;
testmesh2.rotation.z = 0.1;
testmesh3.position.x = (origin.lengthFact)/2 +3.7;
testmesh3.position.z = 0.32;
testmesh3.rotation.z = 0.15;
}
origin.add( testmesh1 );
origin.add( testmesh2 );
origin.add( testmesh3 );
}
if(direct == "left"){
let testmesh1 = autorail.clone(true);
// console.log(testmesh2.geometry.attributes.position.array);
for(let i=0;i<autorail.rightlist.length;i++){
testmesh1.geometry.attributes.position.array[autorail.rightlist[i]*3] = 1;
testmesh1.geometry.attributes.uv.array[autorail.rightlist[i]*2] = testmesh1.geometry.attributes.position.array[0]-testmesh1.geometry.attributes.position.array[3];
}
let newrail1 = new THREE.BufferGeometry();
newrail1.copy(testmesh1.geometry);
testmesh1.geometry = newrail1;
testmesh1.geometry.attributes.position.needsUpdate = true;
testmesh1.geometry.attributes.uv.needsUpdate = true;
testmesh1.geometry.computeBoundingSphere();
testmesh1.geometry.center();
origin.add( testmesh1 );
let testmesh2 = autorail.clone(true);
for(let i=0;i<autorail.rightlist.length;i++){
testmesh2.geometry.attributes.position.array[autorail.rightlist[i]*3] = 1;
testmesh2.geometry.attributes.uv.array[autorail.rightlist[i]*2] = testmesh2.geometry.attributes.position.array[0]-testmesh2.geometry.attributes.position.array[3];
}
let newrail2 = new THREE.BufferGeometry();
newrail2.copy(testmesh2.geometry);
testmesh2.geometry = newrail2;
testmesh2.geometry.attributes.position.needsUpdate = true;
testmesh2.geometry.attributes.uv.needsUpdate = true;
testmesh2.geometry.computeBoundingSphere();
testmesh2.geometry.center();
let testmesh3 = autorail.clone(true);
for(let i=0;i<autorail.rightlist.length;i++){
testmesh3.geometry.attributes.position.array[autorail.rightlist[i]*3] = 1;
testmesh3.geometry.attributes.uv.array[autorail.rightlist[i]*2] = testmesh3.geometry.attributes.position.array[0]-testmesh3.geometry.attributes.position.array[3];
}
let newrail3 = new THREE.BufferGeometry();
newrail3.copy(testmesh3.geometry);
testmesh3.geometry = newrail3;
testmesh3.geometry.attributes.position.needsUpdate = true;
testmesh3.geometry.attributes.uv.needsUpdate = true;
testmesh3.geometry.computeBoundingSphere();
testmesh3.geometry.center();
if(type == "3"){
testmesh1.rotation.x = 0;
testmesh2.rotation.x = 0;
testmesh3.rotation.x = 0;
testmesh1.position.x = - (origin.lengthFact)/2-0.9;
testmesh1.position.z = 0.03;
testmesh1.rotation.z = 0.05;
testmesh2.position.x = - (origin.lengthFact)/2 -2.3;
testmesh2.position.z = 0.14;
testmesh2.rotation.z = 0.1;
testmesh3.position.x = - (origin.lengthFact)/2 -3.7;
testmesh3.position.z = 0.32;
testmesh3.rotation.z = 0.15;
}
if(type == "4"){
testmesh1.rotation.z = 0;
testmesh2.rotation.z = 0;
testmesh3.rotation.z = 0;
testmesh1.position.x = - (origin.lengthFact)/2 -0.9;
testmesh1.position.z = 0.03;
testmesh1.rotation.z = 0.05;
testmesh2.position.x = - (origin.lengthFact)/2 -2.3;
testmesh2.position.z = 0.14;
testmesh2.rotation.z = 0.1;
testmesh3.position.x = - (origin.lengthFact)/2 -3.7;
testmesh3.position.z = 0.32;
testmesh3.rotation.z = 0.15;
}
origin.add( testmesh1 );
origin.add( testmesh2 );
origin.add( testmesh3 );
}
}
function createsection(autorail,position,start,end,py){
position.z = py;
if(scope.sections.datalist[start].code == end){
@ -796,6 +647,7 @@ export function SectionList() {
// var testmesh2 = new THREE.Mesh( geometry, material );
testmesh2.position.set(position.x+(scope.sections.datalist[start].lengthFact/2),position.y,position.z);
scope.sections.datalist[start].lp = {
x:testmesh2.position.x-scope.sections.datalist[start].lengthFact/2,
y:0,
@ -806,6 +658,11 @@ export function SectionList() {
y:0,
z:testmesh2.position.z
};
testmesh2.railpoint = [
{x:scope.sections.datalist[start].lp.x,y:0,z:scope.sections.datalist[start].lp.z},
{x:scope.sections.datalist[start].rp.x,y:0,z:scope.sections.datalist[start].rp.z}
];
scope.sectiongroup.add( testmesh2 );
scope.sections.datalist[start].mesh = testmesh2;
scope.sections.datalist[start].mesh.lengthFact = scope.sections.datalist[start].lengthFact;
@ -853,24 +710,13 @@ export function SectionList() {
this.loadpromise = function(jlmap3ddata,assetloader,sectiondata,scene){
for(let i=0;i<assetloader.modellist.length;i++){
if(assetloader.modellist[i].deviceType == "autorail"){
autorail = assetloader.modellist[i].mesh.children[0];
}
}
let count = autorail.geometry.attributes.position.count;
let rightlist = [];
let leftlist = [];
for(let i=0;i<count;i++){
if(autorail.geometry.attributes.position.array[i*3] >0.49){
rightlist.push(i);
}
if(autorail.geometry.attributes.position.array[i*3] <-0.49){
leftlist.push(i);
}
}
autorail.rightlist = rightlist;
autorail.leftlist = leftlist;
var texture = new THREE.TextureLoader().load( '../../static/test/z0251.png' );
texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set( 1,1);
var selectmaterial = new THREE.MeshPhongMaterial( { map: texture,transparent:true,alphaTest:0.1 } );
scene.add(scope.sectiongroup);
return new Promise(function(resolve, reject){
for(let i=0,leni = sectiondata.length;i<leni;i++){
@ -879,40 +725,126 @@ export function SectionList() {
name:sectiondata[i].name,
standTrack:sectiondata[i].standTrack,
rail:sectiondata[i].rail,
rightlist:rightlist,
leftlist:leftlist,
rsection:sectiondata[i].rsection,
lsection:sectiondata[i].lsection,
csection:sectiondata[i].csection,
lengthFact:sectiondata[i].lengthFact,
rp:sectiondata[i].rp,
lp:sectiondata[i].lp,
railpoint:sectiondata[i].railpoint,
mesh:null
};
let len = newsection.lengthFact;
let testmesh2 = autorail.clone(true);
for(let i=0;i<autorail.rightlist.length;i++){
testmesh2.geometry.attributes.position.array[autorail.rightlist[i]*3] = len;
testmesh2.geometry.attributes.uv.array[autorail.rightlist[i]*2] = testmesh2.geometry.attributes.position.array[0]-testmesh2.geometry.attributes.position.array[3];
}
let newrail = new THREE.BufferGeometry();
newrail.copy(testmesh2.geometry);
// console.log(sectiondata[i]);
// console.log(testmesh2);
let testmesh2 = null;
if(newsection.railpoint.length>2){
// console.log(newsection);
testmesh2.geometry = newrail;
testmesh2.geometry.attributes.position.needsUpdate = true;
testmesh2.geometry.attributes.uv.needsUpdate = true;
testmesh2.geometry.computeBoundingSphere();
testmesh2.geometry.center();
let height = Math.random()/1000;
var closedSpline = new THREE.CatmullRomCurve3( [
new THREE.Vector3(newsection.railpoint[0].x,height,newsection.railpoint[0].z),
new THREE.Vector3(newsection.railpoint[1].x,height,newsection.railpoint[1].z),
new THREE.Vector3(newsection.railpoint[2].x,height,newsection.railpoint[2].z)
] );
closedSpline.type = 'catmullrom';
closedSpline.closed = false;
var extrudeSettings = {
steps : 5,
curveSegments : 1,
bevelSegments : 1,
bevelEnabled : false,
extrudePath : closedSpline,
};
var shape = new THREE.Shape();
shape.moveTo( 0,-2 );
shape.lineTo( 0, 2 );
var geometry = new THREE.ExtrudeBufferGeometry( shape, extrudeSettings );
testmesh2 = new THREE.Mesh( geometry, selectmaterial );
testmesh2.railpoint = [
{x:newsection.railpoint[0].x,y:height,z:newsection.railpoint[0].z},
{x:newsection.railpoint[1].x,y:height,z:newsection.railpoint[1].z},
{x:newsection.railpoint[2].x,y:height,z:newsection.railpoint[2].z},
];
testmesh2.lengthFact = newsection.railpoint[2].x - newsection.railpoint[0].x;
// closedSpline.arcLengthDivisions;
let count = testmesh2.geometry.attributes.position.count/3;
for(let i=0;i<count;i++){
let ui=i*6;
if(i%2 != 0){
testmesh2.geometry.attributes.uv.array[ui] = 0;
testmesh2.geometry.attributes.uv.array[ui+1] = 1;
testmesh2.geometry.attributes.uv.array[ui+2] = len/5;
testmesh2.geometry.attributes.uv.array[ui+3] = 1;
testmesh2.geometry.attributes.uv.array[ui+4] = len/5;
testmesh2.geometry.attributes.uv.array[ui+5] = 0;
}else{
testmesh2.geometry.attributes.uv.array[ui] = 0;
testmesh2.geometry.attributes.uv.array[ui+1] = 0;
testmesh2.geometry.attributes.uv.array[ui+2] = 0;
testmesh2.geometry.attributes.uv.array[ui+3] = 1;
testmesh2.geometry.attributes.uv.array[ui+4] = len/5;
testmesh2.geometry.attributes.uv.array[ui+5] = 0;
}
}
}else{
let height = Math.random()/1000;
var closedSpline = new THREE.CatmullRomCurve3( [
new THREE.Vector3(newsection.railpoint[0].x,height,newsection.railpoint[0].z),
new THREE.Vector3(newsection.railpoint[1].x,height,newsection.railpoint[0].z),
] );
closedSpline.type = 'catmullrom';
closedSpline.closed = false;
// Set up settings for later extrusion
var extrudeSettings = {
steps : 1,
curveSegments : 1,
bevelSegments : 1,
bevelEnabled : false,
extrudePath : closedSpline,
};
var shape = new THREE.Shape();
shape.moveTo( -2,0 );
shape.lineTo( 2,0 );
// Extrude the triangle along the CatmullRom curve
var geometry = new THREE.ExtrudeBufferGeometry( shape, extrudeSettings );
testmesh2 = new THREE.Mesh( geometry, selectmaterial );
testmesh2.railpoint = [
{x:newsection.railpoint[0].x,y:height,z:newsection.railpoint[0].z},
{x:newsection.railpoint[1].x,y:height,z:newsection.railpoint[0].z},
];
testmesh2.lengthFact = newsection.railpoint[1].x - newsection.railpoint[0].x;
// closedSpline.arcLengthDivisions;
let count = testmesh2.geometry.attributes.position.count/3;
for(let i=0;i<count;i++){
let ui=i*6;
if(i%2 != 0){
testmesh2.geometry.attributes.uv.array[ui] = 0;
testmesh2.geometry.attributes.uv.array[ui+1] = 1;
testmesh2.geometry.attributes.uv.array[ui+2] = len;
testmesh2.geometry.attributes.uv.array[ui+3] = 1;
testmesh2.geometry.attributes.uv.array[ui+4] = len;
testmesh2.geometry.attributes.uv.array[ui+5] = 0;
}else{
testmesh2.geometry.attributes.uv.array[ui] = 0;
testmesh2.geometry.attributes.uv.array[ui+1] = 0;
testmesh2.geometry.attributes.uv.array[ui+2] = 0;
testmesh2.geometry.attributes.uv.array[ui+3] = 1;
testmesh2.geometry.attributes.uv.array[ui+4] = len;
testmesh2.geometry.attributes.uv.array[ui+5] = 0;
}
}
}
testmesh2.code = newsection.code;
testmesh2.rightlist = sectiondata[i].rightlist;
testmesh2.leftlist = sectiondata[i].leftlist;
testmesh2.lengthFact = newsection.lengthFact;
testmesh2.position.set(sectiondata[i].position.x,sectiondata[i].position.y,sectiondata[i].position.z);
testmesh2.rotation.set(sectiondata[i].rotation._x,sectiondata[i].rotation._y,sectiondata[i].rotation._z);
testmesh2.standTrack = newsection.standTrack;
testmesh2.meshtype = "section";
// testmesh2.geometry.computeBoundingBox();
// testmesh2.geometry.center()
// testmesh2.position.set(sectiondata[i].position.x,sectiondata[i].position.y,sectiondata[i].position.z);
scope.sectiongroup.add(testmesh2);
newsection.mesh = testmesh2;
scope.sections.datalist[newsection.code] = newsection;

View File

@ -145,6 +145,8 @@ export function SignalList() {
// console.log(signaldata[i]);
let newmesh = assetloader.modellist[num].mesh.clone(true);
newmesh.sectionCode = data[n].sectionCode;
newmesh.sectionOffset = data[n].sectionOffset;
// newmesh.uuid = signaldata[i].id;
for(let j=0;j<newmesh.children.length;j++){
newmesh.children[j].code = signaldata[i].code;
@ -152,8 +154,8 @@ export function SignalList() {
newmesh.name = signaldata[i].name;
newmesh.modelid = assetloader.modellist[num].id;
newmesh.code = signaldata[i].code;
newmesh.right = data[i].right;
newmesh.virtual = data[i].virtual;
newmesh.right = data[n].right;
newmesh.virtual = data[n].virtual;
newmesh.position.x = signaldata[i].position.x;
newmesh.position.y = signaldata[i].position.y;
newmesh.position.z = signaldata[i].position.z;
@ -179,38 +181,34 @@ export function SignalList() {
};
this.resetsignal = function(jlmap3ddata){
// console.log(jlmap3ddata.linksgroup);
console.log(jlmap3ddata.sectionlist.sections.datalist);
let sectiondata = jlmap3ddata.sectionlist.sections.datalist;
let sectiondata = jlmap3ddata.sectionlist.sectiongroup.children;
for(let i=0;i<scope.group.children.length;i++){
let signaldata = scope.group.children[i];
for(let j in sectiondata){
for(let j=0;j<sectiondata.length;j++){
if(sectiondata[j].code == signaldata.sectionCode){
let section = sectiondata[signaldata.sectionCode];
let section = sectiondata[j];
let posx = null;
console.log(section);
// console.log(section);
posx = section.railpoint[0].x + signaldata.sectionOffset;
if(signaldata.sectionOffset > section.lengthFact/2){
posx = section.mesh.position.x + signaldata.sectionOffset - section.lengthFact/2;
}else{
posx = section.mesh.position.x - (section.lengthFact/2 - signaldata.sectionOffset);
}
//根据线路方向修改信号灯位置
if(signaldata.right == false){
if(section.standTrack == true){
posx = posx - 7;
}
signaldata.position.set(posx,0,section.mesh.position.z-3);
signaldata.position.set(posx,0,section.railpoint[0].z-3);
signaldata.rotation.z = ( Math.PI / 2 );
}else if(signaldata.right == true){
if(section.standTrack == true){
posx = posx + 7;
}
signaldata.position.set(posx,0,section.mesh.position.z+3);
signaldata.position.set(posx,0,section.railpoint[0].z+3);
signaldata.rotation.z = ( - Math.PI / 2 );
}
j = sectiondata.length;
}
}

View File

@ -157,10 +157,7 @@ export function StationStandList() {
}
this.loadpromise = function(jlmap3ddata,standsdata,jlmapstanddata,scene,assetloader){
return new Promise(function(resolve, reject){
console.log("............");
console.log(jlmap3ddata);
console.log(standsdata);
console.log(jlmapstanddata);
let stations = jlmap3ddata.stationstandlist.list;
let num;
let num2;

View File

@ -75,6 +75,7 @@ export function SwitchList() {
pc:switchdata[i].pc
};
// console.log(newswitch.pa);
let autoswitch = assetloader.modellist[num].mesh.clone(true);
autoswitch.code = switchdata[i].code;
for(let j=0;j<autoswitch.children.length;j++){
@ -94,6 +95,23 @@ export function SwitchList() {
});
}
this.resetswitch = function(data){
// console.log("reset");
let sectiondata = data.sectionlist.sectiongroup;
for(let i=0;i<scope.switchs.datalist.length;i++){
let sectionA = sectiondata.getObjectByProperty("code",scope.switchs.datalist[i].pa);
let sectionB = sectiondata.getObjectByProperty("code",scope.switchs.datalist[i].pb);
if(sectionA.railpoint[0].x > sectionB.railpoint[0].x){
scope.switchs.modellist[i].position.set(sectionA.railpoint[0].x,0,sectionA.railpoint[0].z);
}else{
scope.switchs.modellist[i].position.set(sectionA.railpoint[1].x,0,sectionA.railpoint[1].z);
}
}
}
this.update = function(){
}

View File

@ -140,10 +140,10 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
// controls3.getObject().rotation.x = Math.PI/2;
scene.add(controls3.getObject());
let cameracctv = new THREE.PerspectiveCamera(60, dom.clientWidth/dom.clientHeight, 1, 40);
cameracctv.position.set( 2, -1,27 );
let cameracctv = new THREE.PerspectiveCamera(50, dom.clientWidth/dom.clientHeight, 1, 10);
cameracctv.position.set( 0, -1,30 );
cameracctv.rotation.y = Math.PI/2;
// cameracctv.rotation.y = Math.PI/2;
camera.add(cameracctv);

View File

@ -147,6 +147,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
function trainrun(data){
let code = data.code;
if(trainlisttest.list[code].dispose == "0"){
if(trainlisttest.list[code].curve == null){
if (data.right == '1') { // 向右
@ -204,6 +205,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
}else{
//后端数据驱动车的位置更新与代码驱动车的移动相结合
if(data.code != trainlisttest.list[code].code){
if (data.right == '1') { // 向右
trainlisttest.list[code].right = '1';

View File

@ -53,6 +53,8 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
let camera = SetCamera(dom);
//定义场景(渲染容器)
let scene = SetScene(project);
let scenesimulation = new THREE.Group();
scene.add(scenesimulation);
//定义镜头操作
let controls = new THREE.OrbitControls(camera);
controls.maxPolarAngle = Math.PI/2;
@ -110,14 +112,14 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
scope.jsonwebwork = new Worker("../../static/workertest/jsonworker.js");
scope.Subscribe = new Jlmap3dSubscribe(scope,routegroup,scope.jsonwebwork);
scope.Subscribe.socketon(scope.Subscribe.topic);
SimulationLoad(mapnetdata,scope,netdata.data,mapdata,camera,controls,scene,storemod);
SimulationLoad(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod);
}else{
scope.datatype = "new";
scope.jsonwebworknew = new Worker("../../static/workertest/jsonworkernew.js");
scope.Subscribe = new Jlmap3dSubscribeNew(scope,routegroup,scope.jsonwebworknew);
scope.Subscribe.socketon(scope.Subscribe.topic);
SimulationLoadNew(mapnetdata,scope,netdata.data,mapdata,camera,controls,scene,storemod);
SimulationLoadNew(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod);
}
});

View File

@ -7,23 +7,54 @@
THREE.ScalControls = function ( scene,_camera, _domElement ) {
var _scene = scene;
var originposition;
var _objects = [];
var helpmove = null;
var objectparent = null;
var selectmaterial = null;
var oldobject = null;
var geometry = new THREE.BoxBufferGeometry( 1, 1, 1 );
var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
var newcurvehelp = new THREE.Group();
var cube = new THREE.Mesh( geometry, material );
cube.name = "left";
newcurvehelp.add( cube );
_objects.push(cube);
var cube = new THREE.Mesh( geometry, material );
cube.name = "mid";
newcurvehelp.add( cube );
_objects.push(cube);
var cube = new THREE.Mesh( geometry, material );
cube.name = "right";
newcurvehelp.add( cube );
_objects.push(cube);
var newlinehelp = new THREE.Group();
var cube = new THREE.Mesh( geometry, material );
cube.name = "left";
newlinehelp.add( cube );
_objects.push(cube);
var cube = new THREE.Mesh( geometry, material );
cube.name = "right";
newlinehelp.add( cube );
_objects.push(cube);
var cubegroup = new THREE.Group();
var geometry = new THREE.BoxBufferGeometry( 5, 5, 5 );
var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
var cube = new THREE.Mesh( geometry, material );
cube.position.x = 1;
cube.position.z = 0;
cube.name = "right";
cubegroup.add( cube );
_objects.push(cube);
var geometry = new THREE.BoxBufferGeometry( 5, 5, 5 );
var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
var cube = new THREE.Mesh( geometry, material );
cube.position.x = -1;
cube.position.z = 0;
cube.name = "left";
cubegroup.add( cube );
_objects.push(cube);
@ -53,6 +84,7 @@ THREE.ScalControls = function ( scene,_camera, _domElement ) {
var scope = this;
this.scalon = false;
function activate() {
_domElement.addEventListener( 'mousemove', onDocumentMouseMove, false );
@ -99,11 +131,15 @@ THREE.ScalControls = function ( scene,_camera, _domElement ) {
if ( _raycaster.ray.intersectPlane( _plane, _intersection ) ) {
_selected.position.copy( _intersection.sub( _offset ).applyMatrix4( _inverseMatrix ) );
_selected.position.y = 0;
console.log(_movemesh);
if(_movemesh.meshtype = "section"){
newsectioncreate();
}else{
if(_movemesh.meshtype == "link"){
if(_selected.name == "left"){
for(let i=0;i<_movemesh.leftlist.length;i++){
_movemesh.geometry.attributes.position.array[_movemesh.leftlist[i]*3] = _selected.position.x - originposition;
_movemesh.geometry.attributes.position.array[_movemesh.leftlist[i]*3] = _selected.position.x - originposition.x;
_movemesh.geometry.attributes.uv.array[_movemesh.leftlist[i]*2] = _movemesh.geometry.attributes.position.array[0]-_movemesh.geometry.attributes.position.array[3];
}
@ -111,14 +147,14 @@ THREE.ScalControls = function ( scene,_camera, _domElement ) {
if(_selected.name == "right"){
for(let i=0;i<_movemesh.rightlist.length;i++){
_movemesh.geometry.attributes.position.array[_movemesh.rightlist[i]*3] = _selected.position.x - originposition;
_movemesh.geometry.attributes.position.array[_movemesh.rightlist[i]*3] = _selected.position.x - originposition.x;
_movemesh.geometry.attributes.uv.array[_movemesh.leftlist[i]*2] = _movemesh.geometry.attributes.position.array[0]-_movemesh.geometry.attributes.position.array[3];
}
}
}else{
if(_selected.name == "left"){
for(let i=0;i<_movemesh.leftlist.length;i++){
_movemesh.geometry.attributes.position.array[_movemesh.leftlist[i]*3] = _selected.position.x - originposition;
_movemesh.geometry.attributes.position.array[_movemesh.leftlist[i]*3] = _selected.position.x - originposition.x;
_movemesh.geometry.attributes.uv.array[_movemesh.leftlist[i]*2] = (_movemesh.geometry.attributes.position.array[3]-_movemesh.geometry.attributes.position.array[0])/15.3;
}
}
@ -126,7 +162,7 @@ THREE.ScalControls = function ( scene,_camera, _domElement ) {
if(_selected.name == "right"){
for(let i=0;i<_movemesh.rightlist.length;i++){
_movemesh.geometry.attributes.position.array[_movemesh.rightlist[i]*3] = _selected.position.x - originposition;
_movemesh.geometry.attributes.position.array[_movemesh.rightlist[i]*3] = _selected.position.x - originposition.x;
_movemesh.geometry.attributes.uv.array[_movemesh.leftlist[i]*2] = (_movemesh.geometry.attributes.position.array[3]-_movemesh.geometry.attributes.position.array[0])/15.3;
}
}
@ -145,10 +181,7 @@ THREE.ScalControls = function ( scene,_camera, _domElement ) {
// _movemesh.lengthfact = (_movemesh.geometry.attributes.position.array[_movemesh.rightlist[0]] - _movemesh.geometry.attributes.position.array[_movemesh.leftlist[0]])*2+28;
_movemesh.lengthFact = (_movemesh.geometry.attributes.position.array[_movemesh.rightlist[0]*3] - _movemesh.geometry.attributes.position.array[_movemesh.leftlist[0]*3]);
// testmesh2.position.z = 50;
// testmesh2.geometry.center();
// console.log(testmesh2.geometry.attributes);
}
}
@ -230,6 +263,7 @@ THREE.ScalControls = function ( scene,_camera, _domElement ) {
_selected = null;
console.log("mouseup");
}
_domElement.style.cursor = _hovered ? 'pointer' : 'auto';
@ -316,6 +350,104 @@ THREE.ScalControls = function ( scene,_camera, _domElement ) {
}
//区段重新构建
function newsectioncreate(){
oldobject = _movemesh;
objectparent.remove(oldobject);
let newpointlist = [];
let curvestep = 1;
var closedSpline;
var extrudeSettings;
for(let i=0;i<_movemesh.railpoint.length;i++){
newpointlist.push(new THREE.Vector3(_movemesh.railpoint[i].x,_movemesh.railpoint[i].y,_movemesh.railpoint[i].z));
}
if(_movemesh.railpoint.length>2){
if(_selected.name == "left"){
newpointlist[0] = new THREE.Vector3(_selected.position.x,_movemesh.railpoint[0].y,_selected.position.z);
}
if(_selected.name == "mid"){
newpointlist[1] = new THREE.Vector3(_selected.position.x,_movemesh.railpoint[0].y,_selected.position.z);
}
if(_selected.name == "right"){
newpointlist[2] = new THREE.Vector3(_selected.position.x,_movemesh.railpoint[0].y,_selected.position.z);
}
curvestep = 10;
}else{
if(_selected.name == "left"){
newpointlist[0] = new THREE.Vector3(_selected.position.x,_movemesh.railpoint[0].y,_selected.position.z);
}
if(_selected.name == "right"){
newpointlist[1] = new THREE.Vector3(_selected.position.x,_movemesh.railpoint[0].y,_selected.position.z);
}
curvestep =1;
}
closedSpline = new THREE.CatmullRomCurve3(newpointlist);
closedSpline.type = 'catmullrom';
closedSpline.closed = false;
extrudeSettings = {
steps : curvestep,
curveSegments : 1,
bevelSegments : 1,
bevelEnabled : false,
extrudePath : closedSpline,
};
var shape = new THREE.Shape();
shape.moveTo( 0,-2 );
shape.lineTo( 0, 2 );
selectmaterial = _movemesh.material;
var geometry = new THREE.ExtrudeBufferGeometry( shape, extrudeSettings );
_movemesh = new THREE.Mesh( geometry, selectmaterial );
_movemesh.code = oldobject.code;
_movemesh.railpoint = [];
for(let i=0;i<newpointlist.length;i++){
_movemesh.railpoint[i] = {
x:newpointlist[i].x,
y:newpointlist[i].y,
z:newpointlist[i].z
}
}
_movemesh.lengthFact = closedSpline.arcLengthDivisions/4;
if(newpointlist.length>2){
_movemesh.lengthFact = _movemesh.lengthFact/curvestep;
}
let len = _movemesh.lengthFact;
// closedSpline.arcLengthDivisions;
let count = _movemesh.geometry.attributes.position.count/3;
for(let i=0;i<count;i++){
let ui=i*6;
if(i%2 != 0){
_movemesh.geometry.attributes.uv.array[ui] = 0;
_movemesh.geometry.attributes.uv.array[ui+1] = 1;
_movemesh.geometry.attributes.uv.array[ui+2] = len;
_movemesh.geometry.attributes.uv.array[ui+3] = 1;
_movemesh.geometry.attributes.uv.array[ui+4] = len;
_movemesh.geometry.attributes.uv.array[ui+5] = 0;
}else{
_movemesh.geometry.attributes.uv.array[ui] = 0;
_movemesh.geometry.attributes.uv.array[ui+1] = 0;
_movemesh.geometry.attributes.uv.array[ui+2] = 0;
_movemesh.geometry.attributes.uv.array[ui+3] = 1;
_movemesh.geometry.attributes.uv.array[ui+4] = len;
_movemesh.geometry.attributes.uv.array[ui+5] = 0;
}
}
_movemesh.meshtype = "section";
// _movemesh.geometry.computeBoundingBox();
// _movemesh.geometry.center()
// _movemesh.position.set(oldobject.position.x,oldobject.position.y,oldobject.position.z);
// console.log(_movemesh.railpoint[2].x);
objectparent.add(_movemesh);
}
activate();
// API
@ -327,10 +459,27 @@ THREE.ScalControls = function ( scene,_camera, _domElement ) {
this.dispose = dispose;
// Backward compatibility
this.attach = function(movemesh){
console.log(movemesh);
this.attach = function(movemesh,points){
if(!helpmove){
if(points){
_movemesh = movemesh;
originposition = movemesh.position.x;
originposition = movemesh.position;
if(points.length>2){
helpmove = newcurvehelp;
}else{
helpmove = newlinehelp;
}
helpmove.position.y = 0;
for(let i=0;i<points.length;i++){
helpmove.children[i].position.x = points[i].x;
helpmove.children[i].position.y = points[i].y;
helpmove.children[i].position.z = points[i].z;
}
}else{
_movemesh = movemesh;
originposition = movemesh.position;
let offset = (_movemesh.geometry.attributes.position.array[movemesh.rightlist[0]*3] - _movemesh.geometry.attributes.position.array[movemesh.leftlist[0]*3])/2;
cubegroup.children[0].position.x = movemesh.position.x + offset;
cubegroup.children[0].position.y = movemesh.position.y;
@ -338,13 +487,40 @@ THREE.ScalControls = function ( scene,_camera, _domElement ) {
cubegroup.children[1].position.x = movemesh.position.x - offset;
cubegroup.children[1].position.y = movemesh.position.y;
cubegroup.children[1].position.z = movemesh.position.z;
helpmove = cubegroup;
helpmove.position.y = 0;
}
objectparent = _movemesh.parent;
scope.scalon = true;
_scene.add(helpmove);
}
_scene.add(cubegroup);
}
this.detach = function(){
// _movemesh = "";
_scene.remove(cubegroup);
if(helpmove){
if(_selected){
}else{
console.log("detach");
helpmove.position.y = 90000;
// _scene.remove(helpmove);
// objectparent = null;
scope.scalon = false;
helpmove = null;
}
// for(let i=0;i<helpmove.children.length;i++){
// helpmove.children[i].position.x = -9999;
// helpmove.children[i].position.y = -9999;
// helpmove.children[i].position.z = -9999;
// }
}
}
this.setObjects = function () {

View File

@ -18,6 +18,24 @@ THREE.TransformControls = function ( camera, domElement ) {
var scope = this;
var geometry = new THREE.BoxBufferGeometry( 1, 1, 1 );
var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
var virtualmovebox = new THREE.Mesh( geometry, material );
var atobject = undefined;
var sectionswitch = undefined;
var cube1 = new THREE.Mesh( geometry, material );
cube1.name = "left";
var cube2 = new THREE.Mesh( geometry, material );
cube2.name = "mis";
var cube3 = new THREE.Mesh( geometry, material );
cube3.name = "right";
// Define properties with getters/setter
// Setting the defined property will automatically trigger change event
// Defined properties are passed down to gizmo and plane
@ -131,16 +149,48 @@ THREE.TransformControls = function ( camera, domElement ) {
};
// Set current object
this.attach = function ( object ) {
this.attach = function ( object,editmode ) {
console.log(editmode);
atobject = object;
if(editmode == "trackedit"){
if(atobject){
sectionswitch = true;
atobject.add(virtualmovebox);
this.object = virtualmovebox;
this.visible = true;
let len = object.railpoint.length-1;
cube1.position.set(object.railpoint[0].x-object.position.x,0,object.railpoint[0].z-object.position.z);
cube3.position.set(object.railpoint[len].x-object.position.x,0,object.railpoint[len].z-object.position.z);
atobject.add(cube1);
atobject.add(cube3);
if(object.railpoint.length>2){
cube2.position.set(object.railpoint[1].x-object.position.x,0,object.railpoint[1].z-object.position.z);
atobject.add(cube2);
virtualmovebox.position.set(cube2.position.x,cube2.position.y,cube2.position.z);
}else{
virtualmovebox.position.set((cube1.position.x+cube3.position.x)/2,0,(cube1.position.z+cube3.position.z)/2);
}
}
}else{
sectionswitch = false;
this.object = object;
this.visible = true;
}
};
// Detatch from object
this.detach = function () {
if(atobject){
atobject.remove(virtualmovebox);
atobject.remove(cube1);
atobject.remove(cube2);
atobject.remove(cube3);
}
sectionswitch = false;
this.object = undefined;
this.visible = false;
this.axis = null;
@ -335,13 +385,47 @@ THREE.TransformControls = function ( camera, domElement ) {
} else {
offset.applyQuaternion( parentQuaternionInv ).divide( parentScale );
}
console.log(sectionswitch);
if(sectionswitch){
let oldpositionx = object.position.x;
let oldpositionz = object.position.z;
object.position.copy( offset ).add( positionStart );
atobject.position.x += object.position.x - oldpositionx;
atobject.position.z += object.position.z - oldpositionz;
console.log(object.position.x - oldpositionx);
atobject.railpoint[0] = {
x:cube1.matrixWorld.elements[12],
y:cube1.matrixWorld.elements[13],
z:cube1.matrixWorld.elements[14],
};
if(atobject.railpoint.length>2){
atobject.railpoint[1] = {
x:cube2.matrixWorld.elements[12],
y:cube2.matrixWorld.elements[13],
z:cube2.matrixWorld.elements[14],
};
atobject.railpoint[2] = {
x:cube3.matrixWorld.elements[12],
y:cube3.matrixWorld.elements[13],
z:cube3.matrixWorld.elements[14],
};
}else{
atobject.railpoint[1] = {
x:cube3.matrixWorld.elements[12],
y:cube3.matrixWorld.elements[13],
z:cube3.matrixWorld.elements[14],
};
}
}else{
object.position.copy( offset ).add( positionStart );
}
// Apply translation snap
if ( this.translationSnap ) {
if ( space === 'local' ) {
object.position.applyQuaternion(_tempQuaternion.copy( quaternionStart ).inverse() );

View File

@ -85,7 +85,7 @@ export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,
})
.then(function(data){
//console.log(data);
return sectionlist.loadpromise(mapdata.sectionList,sectiondata.section,scene,assetloader);
return sectionlist.loadpromise(mapdata.sectionList,sectiondata.section,rails,scene,assetloader);
})
.then(function(data){
//console.log(data);
@ -99,14 +99,14 @@ export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,
//console.log(assetloader);
return trainlisttest.drivertrain(mapdata.trainList,sceneload,assetloader,mixers,actions,"01");
})
.then(function(data){
return new Promise(function(resolve, reject){
let stopoffset = 64;
rails.init(sectiondata.section,sectiondata,switchdata,sceneload);
resolve("loadrail");
});
})
// .then(function(data){
// return new Promise(function(resolve, reject){
// let stopoffset = 64;
// rails.init(sectiondata.section,sectiondata,switchdata,sceneload);
// resolve("loadrail");
//
// });
// })
.then(function(data){
return new Promise(function(resolve, reject){

View File

@ -83,7 +83,7 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
})
.then(function(data){
//console.log(data);
return sectionlist.loadpromise(mapdata.sectionList,sectiondata.section,scene,assetloader);
return sectionlist.loadpromise(mapdata.sectionList,sectiondata.section,rails,scene,assetloader);
})
.then(function(data){
//console.log(data);
@ -97,14 +97,13 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
//console.log(assetloader);
return trainlisttest.initpromise(mapdata.trainList,sceneload,assetloader,mixers,actions,"02");
})
.then(function(data){
return new Promise(function(resolve, reject){
let stopoffset = 64;
rails.init(sectiondata.section,sectiondata,switchdata,sceneload);
resolve("loadrail");
});
})
// .then(function(data){
// return new Promise(function(resolve, reject){
// rails.init(sectiondata.section,sectiondata,switchdata,sceneload);
// resolve("loadrail");
//
// });
// })
.then(function(data){
return new Promise(function(resolve, reject){

View File

@ -216,5 +216,60 @@ export function RailListN(){
}
}
this.setrails = function(sectioncode,points,standtrack,lengthfact,scene){
scope.sectionrail[sectioncode] = {
lengthfact:lengthfact,
lineleft:null,
lineright:null,
standTrack:standtrack,
};
let leftpoints = [];
let rightpoints = [];
for(let i=0;i<points.length;i++){
leftpoints.push(points[i]);
rightpoints.push(points[points.length-i-1]);
}
scope.sectionrail[sectioncode].lineleft = new THREE.CatmullRomCurve3(leftpoints);
scope.sectionrail[sectioncode].lineleft.curveType = "centripetal";
scope.sectionrail[sectioncode].lineleft.name = sectioncode;
scope.sectionrail[sectioncode].lineright = new THREE.CatmullRomCurve3(rightpoints);
scope.sectionrail[sectioncode].lineright.curveType = "centripetal";
scope.sectionrail[sectioncode].lineright.name = sectioncode;
// //
// for(let n=0,nm=scope.sectionrail[sectioncode].lineleft.points.length;n<nm;n++){
// var geometry = new THREE.CircleGeometry( 0.05, 16 );
// var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
// var circle = new THREE.Mesh( geometry, material );
// // console.log(n);
// // console.log(scope.sectionrail[section[i].code].lineleft.points[n]);
// circle.position.x = scope.sectionrail[sectioncode].lineleft.points[n].x;
// circle.position.y = scope.sectionrail[sectioncode].lineleft.points[n].y;
// circle.position.z = scope.sectionrail[sectioncode].lineleft.points[n].z;
// circle.rotation.x = -Math.PI/2;
// scene.add( circle );
// }
// // scope.sectionrail[section[i].code].lineright.tension = 0.11;
// var points = scope.sectionrail[sectioncode].lineleft.getPoints( 50 );
// var geometry = new THREE.BufferGeometry().setFromPoints( points );
// var material;
// if(scope.sectionrail[sectioncode].type == "a"){
// material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
// }
// if(scope.sectionrail[sectioncode].type == "b"){
// material = new THREE.LineBasicMaterial( { color : 0x00ff00 } );
// }
// if(scope.sectionrail[sectioncode].type == "c"){
// material = new THREE.LineBasicMaterial( { color : 0x0000ff } );
// }
//
//
// // Create the final object to add to the scene
// var curveObject = new THREE.Line( geometry, material );
//
// curveObject.position.y = Math.random();
// scene.add(curveObject);
}
}

View File

@ -17,32 +17,32 @@ export function SectionListN() {
this.stopsection = [];
this.standtrack = [];
var autorail;
this.loadpromise = function(sectionList,sectiondata,scene,assetloader){
this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
// console.log(sectiondata);
var texture = new THREE.TextureLoader().load( '../../static/test/z0251.png' );
texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set( 1,1);
var selectmaterial = new THREE.MeshPhongMaterial( { map: texture,transparent:true } );
var selectmaterial = new THREE.MeshPhongMaterial( { map: texture,transparent:true,alphaTest:0.1 } );
for(let i=0;i<assetloader.modellist.length;i++){
if(assetloader.modellist[i].deviceType == "autorail"){
autorail = assetloader.modellist[i].mesh.children[0];
}
}
let count = autorail.geometry.attributes.position.count;
let rightlist = [];
let leftlist = [];
for(let i=0;i<count;i++){
if(autorail.geometry.attributes.position.array[i*3] >0.49){
rightlist.push(i);
}
if(autorail.geometry.attributes.position.array[i*3] <-0.49){
leftlist.push(i);
}
}
autorail.rightlist = rightlist;
autorail.leftlist = leftlist;
// for(let i=0;i<assetloader.modellist.length;i++){
// if(assetloader.modellist[i].deviceType == "autorail"){
// autorail = assetloader.modellist[i].mesh.children[0];
// }
// }
// let count = autorail.geometry.attributes.position.count;
// let rightlist = [];
// let leftlist = [];
// for(let i=0;i<count;i++){
// if(autorail.geometry.attributes.position.array[i*3] >0.49){
// rightlist.push(i);
// }
// if(autorail.geometry.attributes.position.array[i*3] <-0.49){
// leftlist.push(i);
// }
// }
// autorail.rightlist = rightlist;
// autorail.leftlist = leftlist;
scene.add(scope.sectiongroup);
return new Promise(function(resolve, reject){
// console.log(sectiondata);
@ -53,11 +53,7 @@ this.loadpromise = function(sectionList,sectiondata,scene,assetloader){
name:sectiondata[i].name,
standTrack:sectiondata[i].standTrack,
rail:sectiondata[i].rail,
rightlist:sectiondata[i].rightlist,
leftlist:sectiondata[i].leftlist,
rsection:sectiondata[i].rsection,
lsection:sectiondata[i].lsection,
csection:sectiondata[i].csection,
railpoint:sectiondata[i].railpoint,
lengthFact:sectiondata[i].lengthFact,
lconnect:null,
@ -72,149 +68,136 @@ this.loadpromise = function(sectionList,sectiondata,scene,assetloader){
mesh:null
};
// newsection.railpoint.length>2
let len = newsection.lengthFact;
let testmesh2 = autorail.clone(true);
for(let i=0;i<autorail.rightlist.length;i++){
testmesh2.geometry.attributes.position.array[autorail.rightlist[i]*3] = len;
testmesh2.geometry.attributes.uv.array[autorail.rightlist[i]*2] = testmesh2.geometry.attributes.position.array[0]-testmesh2.geometry.attributes.position.array[3];
}
let newrail = new THREE.BufferGeometry();
newrail.copy(testmesh2.geometry);
testmesh2.geometry = newrail;
testmesh2.geometry.attributes.position.needsUpdate = true;
testmesh2.geometry.attributes.uv.needsUpdate = true;
testmesh2.geometry.computeBoundingSphere();
testmesh2.geometry.center();
testmesh2.position.set(sectiondata[i].position.x,sectiondata[i].position.y,sectiondata[i].position.z);
testmesh2.rotation.set(sectiondata[i].rotation._x,sectiondata[i].rotation._y,sectiondata[i].rotation._z);
testmesh2.matrixAutoUpdate = false;
scope.sections.datalist[newsection.code] = newsection;
testmesh2.updateMatrix();
mergegeometry.merge(new THREE.Geometry().fromBufferGeometry(testmesh2.geometry),testmesh2.matrix);
testmesh2.geometry.dispose();
for(let j in testmesh2.material){
testmesh2.material[j].map.dispose();
testmesh2.material[j].dispose();
}
testmesh2 = null;
// if(newsection.rp.z != newsection.lp.z){
// // console.log(newsection);
// let height = Math.random()/1000;
// var closedSpline = new THREE.CatmullRomCurve3( [
// new THREE.Vector3(newsection.lp.x, height, newsection.lp.z),
// new THREE.Vector3(newsection.lp.x+2, height,newsection.lp.z),
// new THREE.Vector3((newsection.lp.x+newsection.rp.x)/2, height,(newsection.lp.z+newsection.rp.z)/2),
// new THREE.Vector3(newsection.rp.x-2, height,newsection.rp.z),
// new THREE.Vector3(newsection.rp.x, height, newsection.rp.z)
// ] );
//
// closedSpline.type = 'catmullrom';
// closedSpline.closed = false;
// // Set up settings for later extrusion
// var extrudeSettings = {
// steps : 12,
// curveSegments : 1,
// bevelSegments : 1,
// bevelEnabled : false,
// extrudePath : closedSpline,
// };
// var shape = new THREE.Shape();
// shape.moveTo( 0,-2 );
// shape.lineTo( 0, 2 );
// // Extrude the triangle along the CatmullRom curve
// var geometry = new THREE.ExtrudeBufferGeometry( shape, extrudeSettings );
// var material = new THREE.MeshLambertMaterial( { color: 0xb00000, wireframe: true } );
// // newnormal = new Float32Array(newnormal);
// // console.log(newnormal);
// // geometry.attributes.normal = new THREE.BufferAttribute(newnormal, 3);
// // geometry.attributes.needsUpdate = true;
// // Create mesh with the resulting geometry
// var mesh = new THREE.Mesh( geometry, selectmaterial );
// let count = mesh.geometry.attributes.position.count/3;
//
// for(let i=0;i<count;i++){
// let ui=i*6;
// if(i%2 != 0){
// mesh.geometry.attributes.uv.array[ui] = 0;
// mesh.geometry.attributes.uv.array[ui+1] = 1;
// mesh.geometry.attributes.uv.array[ui+2] = len/10;
// mesh.geometry.attributes.uv.array[ui+3] = 1;
// mesh.geometry.attributes.uv.array[ui+4] = len/10;
// mesh.geometry.attributes.uv.array[ui+5] = 0;
// }else{
// mesh.geometry.attributes.uv.array[ui] = 0;
// mesh.geometry.attributes.uv.array[ui+1] = 0;
// mesh.geometry.attributes.uv.array[ui+2] = 0;
// mesh.geometry.attributes.uv.array[ui+3] = 1;
// mesh.geometry.attributes.uv.array[ui+4] = len/10;
// mesh.geometry.attributes.uv.array[ui+5] = 0;
// let testmesh2 = autorail.clone(true);
// for(let i=0;i<autorail.rightlist.length;i++){
// testmesh2.geometry.attributes.position.array[autorail.rightlist[i]*3] = len;
// testmesh2.geometry.attributes.uv.array[autorail.rightlist[i]*2] = testmesh2.geometry.attributes.position.array[0]-testmesh2.geometry.attributes.position.array[3];
// }
// let newrail = new THREE.BufferGeometry();
// newrail.copy(testmesh2.geometry);
// testmesh2.geometry = newrail;
// testmesh2.geometry.attributes.position.needsUpdate = true;
// testmesh2.geometry.attributes.uv.needsUpdate = true;
// testmesh2.geometry.computeBoundingSphere();
// testmesh2.geometry.center();
// testmesh2.position.set(sectiondata[i].position.x,sectiondata[i].position.y,sectiondata[i].position.z);
// testmesh2.rotation.set(sectiondata[i].rotation._x,sectiondata[i].rotation._y,sectiondata[i].rotation._z);
// testmesh2.matrixAutoUpdate = false;
// scope.sections.datalist[newsection.code] = newsection;
// testmesh2.updateMatrix();
// mergegeometry.merge(new THREE.Geometry().fromBufferGeometry(testmesh2.geometry),testmesh2.matrix);
// testmesh2.geometry.dispose();
// for(let j in testmesh2.material){
// testmesh2.material[j].map.dispose();
// testmesh2.material[j].dispose();
// }
// mergegeometry.merge(new THREE.Geometry().fromBufferGeometry(mesh.geometry),mesh.matrix);
// // mergegeometry.merge(new THREE.Geometry().fromBufferGeometry(mesh.geometry),mesh.matrix);
// console.log(mesh);
// // scene.add(mesh);
// }else{
// let height = Math.random()/1000;
// var closedSpline = new THREE.CatmullRomCurve3( [
// new THREE.Vector3(newsection.lp.x, height, newsection.lp.z),
// new THREE.Vector3(newsection.rp.x, height, newsection.rp.z)
// ] );
//
// closedSpline.type = 'catmullrom';
// closedSpline.closed = false;
// // Set up settings for later extrusion
// var extrudeSettings = {
// steps : 1,
// curveSegments : 1,
// bevelSegments : 1,
// bevelEnabled : false,
// extrudePath : closedSpline,
// };
// var shape = new THREE.Shape();
// shape.moveTo( -2,0 );
// shape.lineTo( 2,0 );
// // Extrude the triangle along the CatmullRom curve
// var geometry = new THREE.ExtrudeBufferGeometry( shape, extrudeSettings );
// var material = new THREE.MeshLambertMaterial( { color: 0xb00000, wireframe: true } );
// // newnormal = new Float32Array(newnormal);
// // console.log(newnormal);
// // geometry.attributes.normal = new THREE.BufferAttribute(newnormal, 3);
// // geometry.attributes.needsUpdate = true;
// // Create mesh with the resulting geometry
// var mesh = new THREE.Mesh( geometry, selectmaterial );
// let count = mesh.geometry.attributes.position.count/3;
//
// for(let i=0;i<count;i++){
// let ui=i*6;
// if(i%2 != 0){
// mesh.geometry.attributes.uv.array[ui] = 0;
// mesh.geometry.attributes.uv.array[ui+1] = 1;
// mesh.geometry.attributes.uv.array[ui+2] = len;
// mesh.geometry.attributes.uv.array[ui+3] = 1;
// mesh.geometry.attributes.uv.array[ui+4] = len;
// mesh.geometry.attributes.uv.array[ui+5] = 0;
// }else{
// mesh.geometry.attributes.uv.array[ui] = 0;
// mesh.geometry.attributes.uv.array[ui+1] = 0;
// mesh.geometry.attributes.uv.array[ui+2] = 0;
// mesh.geometry.attributes.uv.array[ui+3] = 1;
// mesh.geometry.attributes.uv.array[ui+4] = len;
// mesh.geometry.attributes.uv.array[ui+5] = 0;
// }
// }
//
// mergegeometry.merge(new THREE.Geometry().fromBufferGeometry(mesh.geometry),mesh.matrix);
// // console.log(mesh);
// // scene.add(mesh);
//
// }
}
let mergemesh = new THREE.Mesh( mergegeometry, autorail.material );
// let mergemesh = new THREE.Mesh( mergegeometry, selectmaterial );
// testmesh2 = null;
if(newsection.railpoint.length>2){
// console.log(newsection);
let height = Math.random()/1000;
var closedSpline = new THREE.CatmullRomCurve3( [
new THREE.Vector3(newsection.railpoint[0].x,height,newsection.railpoint[0].z),
new THREE.Vector3(newsection.railpoint[1].x,height,newsection.railpoint[1].z),
new THREE.Vector3(newsection.railpoint[2].x,height,newsection.railpoint[2].z)
] );
closedSpline.type = 'catmullrom';
closedSpline.closed = false;
var extrudeSettings = {
steps : 5,
curveSegments : 1,
bevelSegments : 1,
bevelEnabled : false,
extrudePath : closedSpline,
};
var shape = new THREE.Shape();
shape.moveTo( 0,-2 );
shape.lineTo( 0, 2 );
var geometry = new THREE.ExtrudeBufferGeometry( shape, extrudeSettings );
var mesh = new THREE.Mesh( geometry, selectmaterial );
let count = mesh.geometry.attributes.position.count/3;
for(let i=0;i<count;i++){
let ui=i*6;
if(i%2 != 0){
mesh.geometry.attributes.uv.array[ui] = 0;
mesh.geometry.attributes.uv.array[ui+1] = 1;
mesh.geometry.attributes.uv.array[ui+2] = len/5;
mesh.geometry.attributes.uv.array[ui+3] = 1;
mesh.geometry.attributes.uv.array[ui+4] = len/5;
mesh.geometry.attributes.uv.array[ui+5] = 0;
}else{
mesh.geometry.attributes.uv.array[ui] = 0;
mesh.geometry.attributes.uv.array[ui+1] = 0;
mesh.geometry.attributes.uv.array[ui+2] = 0;
mesh.geometry.attributes.uv.array[ui+3] = 1;
mesh.geometry.attributes.uv.array[ui+4] = len/5;
mesh.geometry.attributes.uv.array[ui+5] = 0;
}
}
mergegeometry.merge(new THREE.Geometry().fromBufferGeometry(mesh.geometry),mesh.matrix);
mesh.geometry.dispose();
mesh.material.map.dispose();
mesh.material.dispose();
rails.setrails(sectiondata[i].code,closedSpline.points,sectiondata[i].standTrack,len,scene);
}else{
let height = Math.random()/1000;
var closedSpline = new THREE.CatmullRomCurve3( [
new THREE.Vector3(newsection.railpoint[0].x,height,newsection.railpoint[0].z),
new THREE.Vector3(newsection.railpoint[1].x,height,newsection.railpoint[1].z),
] );
closedSpline.type = 'catmullrom';
closedSpline.closed = false;
// Set up settings for later extrusion
var extrudeSettings = {
steps : 1,
curveSegments : 1,
bevelSegments : 1,
bevelEnabled : false,
extrudePath : closedSpline,
};
var shape = new THREE.Shape();
shape.moveTo( -2,0 );
shape.lineTo( 2,0 );
// Extrude the triangle along the CatmullRom curve
var geometry = new THREE.ExtrudeBufferGeometry( shape, extrudeSettings );
var mesh = new THREE.Mesh( geometry, selectmaterial );
let count = mesh.geometry.attributes.position.count/3;
for(let i=0;i<count;i++){
let ui=i*6;
if(i%2 != 0){
mesh.geometry.attributes.uv.array[ui] = 0;
mesh.geometry.attributes.uv.array[ui+1] = 1;
mesh.geometry.attributes.uv.array[ui+2] = len;
mesh.geometry.attributes.uv.array[ui+3] = 1;
mesh.geometry.attributes.uv.array[ui+4] = len;
mesh.geometry.attributes.uv.array[ui+5] = 0;
}else{
mesh.geometry.attributes.uv.array[ui] = 0;
mesh.geometry.attributes.uv.array[ui+1] = 0;
mesh.geometry.attributes.uv.array[ui+2] = 0;
mesh.geometry.attributes.uv.array[ui+3] = 1;
mesh.geometry.attributes.uv.array[ui+4] = len;
mesh.geometry.attributes.uv.array[ui+5] = 0;
}
}
mergegeometry.merge(new THREE.Geometry().fromBufferGeometry(mesh.geometry),mesh.matrix);
mesh.geometry.dispose();
mesh.material.map.dispose();
mesh.material.dispose();
rails.setrails(sectiondata[i].code,closedSpline.points,sectiondata[i].standTrack,len,scene);
}
}
// let mergemesh = new THREE.Mesh( mergegeometry, autorail.material );
let mergemesh = new THREE.Mesh( mergegeometry, selectmaterial );
mergemesh.matrixAutoUpdate = false;
scope.sectiongroup.add(mergemesh);
resolve("loadersection");
});

View File

@ -35,7 +35,6 @@ export function SwitchListN() {
directtype:null,
locateType:0
};
let autoswitch = assetloader.modellist[num].mesh.clone(true);
autoswitch.code = switchdata[i].code;
for(let j=0;j<autoswitch.children.length;j++){

View File

@ -134,5 +134,6 @@ export const drawSectionStyle = {
continueProtectSection: 'rgba(255,0,255,0.5)',
signalNearSectionCBTC: 'rgba(255, 0, 0, 0.5)',
signalNearSectionReserve: 'rgba(160, 32, 240, 0.5)',
signalNearSection: 'rgba(124, 252, 0, 0.5)'
signalNearSection: 'rgba(124, 252, 0, 0.5)',
routingSection: 'rgba(255, 20, 147, 0.9)'
};

View File

@ -6,7 +6,8 @@ const mapDeviceStyle = {
'06': 'ningbo_01',
'07': 'haerbin_01',
'08': 'foshan_01',
'09': 'xian_02'
'09': 'xian_02',
'10': 'xian_01'
};
export function selectLineCode(code) {

View File

@ -266,6 +266,7 @@ class SkinCode extends defaultStyle {
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
mergentN: 4, // 站台紧急关闭边数
insideOffset: { x: 0, y: -40 }, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: 20 }, // 外站台紧急关闭偏移量
closeColor: '#F61107' // 站台紧急关闭颜色

View File

@ -214,6 +214,7 @@ class SkinCode extends defaultStyle {
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
mergentN: 4, // 站台紧急关闭边数
insideOffset: { x: 0, y: 25 }, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: -25}, // 外站台紧急关闭偏移量
closeColor: 'red' // 站台紧急关闭颜色

View File

@ -220,6 +220,7 @@ class SkinCode extends defaultStyle {
standEmergent: { // 紧急关闭
flicker: true, // 闪烁
mergentR: 5, // 站台紧急关闭半径
mergentN: 4, // 站台紧急关闭边数
insideOffset: { x: 0, y: 30 }, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: -30}, // 外站台紧急关闭偏移量
closeColor: '#F61107' // 站台紧急关闭颜色

View File

@ -80,7 +80,7 @@ class SkinCode extends defaultStyle {
beyondWidth: 0, // 区段宽超出宽度
invadeColor: '#EF0C08', // 区段侵入颜色
spareColor: '#3F3F3F', // 区段空闲颜色
communicationOccupiedColor: '#FF329A', // 区段通信车占用颜色
communicationOccupiedColor: '#FE0000', // 区段通信车占用颜色
unCommunicationOccupiedColor: '#FE0000', // 区段非通讯车占用颜色
routeLockColor: '#FFFFFF', // 区段路由锁定颜色
faultLockColor: '#00FF00', // 区段故障锁闭颜色
@ -128,8 +128,8 @@ class SkinCode extends defaultStyle {
},
text: {
show: true, // 信号机名称显示
distance: 0, // 文字和灯杆的距离
isAlignCenter: true, // 信号字体对其方式
distance: 3, // 文字和灯杆的距离
isAlignCenter: false, // 信号字体对其方式
fontSize: 11, // 信号机名称字体大小
fontWeight: 'bold', // 信号机名称字体粗细
defaultColor: '#FFFFFF', // 信号灯字体默认色
@ -209,6 +209,7 @@ class SkinCode extends defaultStyle {
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
mergentN: 4, // 站台紧急关闭边数
insideOffset: { x: 0, y: 25}, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: 15}, // 外站台紧急关闭偏移量
closeColor: '#F61107' // 站台紧急关闭颜色

View File

@ -128,8 +128,8 @@ class SkinCode extends defaultStyle {
},
text: {
show: true, // 信号机名称显示
distance: 0, // 文字和灯杆的距离
isAlignCenter: true, // 信号字体对其方式
distance: 3, // 文字和灯杆的距离
isAlignCenter: false, // 信号字体对其方式
fontSize: 11, // 信号机名称字体大小
fontWeight: 'bold', // 信号机名称字体粗细
defaultColor: '#FFFFFF', // 信号灯字体默认色
@ -206,6 +206,7 @@ class SkinCode extends defaultStyle {
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
mergentN: 4, // 站台紧急关闭边数
insideOffset: { x: 0, y: 25 }, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: -25 }, // 外站台紧急关闭偏移量
closeColor: '#F61107' // 站台紧急关闭颜色

View File

@ -214,6 +214,7 @@ class SkinCode extends defaultStyle {
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
mergentN: 4, // 站台紧急关闭边数
insideOffset: { x: -10, y: -20 }, // 内站台紧急关闭偏移量
outsideOffset: { x: -10, y: -10}, // 外站台紧急关闭偏移量
closeColor: '#F61107', // 站台紧急关闭颜色

View File

@ -318,6 +318,7 @@ class SkinCode extends defaultStyle {
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
mergentN: 4, // 站台紧急关闭边数
insideOffset: { x: 0, y: 25 }, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: -25 }, // 外站台紧急关闭偏移量
closeColor: 'red' // 站台紧急关闭颜色

View File

@ -0,0 +1,666 @@
import defaultStyle from '../defaultStyle';
import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle {
constructor() {
super();
this[deviceType.Section] = {
active: {
routeColor: false // 进路触发颜色
},
text: {
show: true, // 物理区段名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 18, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
logicText: {
show: true, // 逻辑区段名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 6, // 文字离区段距离
fontSize: 8, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
standText: {
show: true, // 站台轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 30, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
reentryText: {
show: true, // 折返轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 30, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
transferText: {
show: true, // 转换轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 28, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
destinationText: {
show: true, // 目的码名称显示
opposite: true, // 对称相反
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 10, // 文字离区段距离
fontSize: 10, // 字体大小
fontWeight: 'bold', // 字体粗细
fontColor: 'yellow', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
line: {
width: 5, // 区段宽度
beyondWidth: 1, // 区段宽超出宽度
invadeColor: '#EF0C08', // 区段侵入颜色
spareColor: '#3F3F3F', // 区段空闲颜色
communicationOccupiedColor: '#FF329A', // 区段通信车占用颜色
unCommunicationOccupiedColor: '#FE0000', // 区段非通讯车占用颜色
routeLockColor: '#FFFFFF', // 区段路由锁定颜色
faultLockColor: '#9B4A0A', // 区段故障锁定颜色
undefinedColor: '#0071C1', // 区段未定义颜色
protectionLockedColor: '#FEFF00', // 保护区段锁闭(未用)
blockColor: '#800080', // 区段封锁颜色
atcExcisionColor: '#A0522D', // 区段atc切除颜色
atsExcisionColor: '#A0522D', // 区段ats切除颜色
timeReleaseColor: '#3F3F3F', // 区段延时释放颜色
protectiveLockColor: '#FFFF00', // 区段保护锁闭
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
logicalTextColor: '#FFFFFF' // 逻辑区段名称颜色 (未用)
},
axle: {}, // 计轴
speedLimit: { // 限速元素
width: 1, // 限速线的宽短
distance: 5, // 限速线距离区段距离
lineColor: '#FFFF00', // 限速线颜色
nameShow: false // 名称显示
},
separator: {
z: 6, // 分割符层级
width: 1.2, // 分隔符宽度
endWidth: 3.5, // 尽头分隔符宽度
endColor: '#3F3F3F', // 尽头分隔符颜色
color: '#3149C3', // 区段边界符颜色
halfHeight: 5 // 区段分隔符高度的一半
},
block: {
special: false // 区段特殊显示
},
trainPosition:{
display: false // 列车实时位置显示
}
};
this[deviceType.Signal] = {
distance: 10, // 设备距离区段的距离
post: {
standardLength: 6, // 高柱长度
standardHeight: 6, // 灯柱高度
standardColor: '#3149C3', // 灯珠颜色
standardWidth: 2 // 灯珠宽度
},
text: {
show: true, // 信号机名称显示
distance: 3, // 文字和灯杆的距离
isAlignCenter: false, // 信号字体对其方式
fontSize: 11, // 信号机名称字体大小
fontWeight: 'bold', // 信号机名称字体粗细
defaultColor: '#FFFFFF', // 信号灯字体默认色
blockColor: '#EF0C08', // 信号灯字体锁定颜色
checkColor: '#00FF00', // 信号字体
nameBorderShow: true // 信号机名字边框显示
},
lamp: {
bgShow: false, // 是否被选中
guidName: 'defult', // 默认引导类型
stopWidth: 2, // 禁止线宽度
borderWidth: 1, // 信号灯边框线宽度
borderColor: '#3149C3', // 信号灯边框线颜色
radiusR: 6, // 信号灯半径
blockColor: '#EF0C08', // 信号灯锁闭
grayColor: '#7F7F7F', // 信号灯灰色
redColor: '#FF0000', // 信号灯红色
greenColor: '#00FF00', // 信号灯绿色
yellowColor: '#FFFF00', // 信号灯黄色
whiteColor: '#FFFFFF', // 信号灯白色
blueColor: '#0070C0' // 信号灯蓝色
},
route: {
direction: false, // 自动进路方向
offset: { x: -4, y: 0 }, // 自动进路偏移量
routeColor: '#00FF00' // 自动进路
},
auto: {
signalFrontTriangle: false, // 信号灯前三角展示
direction: false, // 自动通过方向
offset: { x: -4, y: 0}, // 自动通过偏移量
width: 5, // 自动宽度
autoRoute: '#00FF00', // 自动进路
autoTrigger: '#FFFF00', // 自动触发
manualControl: '#FFFF00', // 人工控制
outConflict: '#C00808' // 出车冲突
},
delay: {
direction: true, // 延时解锁方向
offset: { x: 15, y: -10}, // 延时解锁偏移量
fontSize: 11, // 延迟解锁字体大小
fontColor: '#FF0000', // 延迟解锁颜色
fontWeight: 'bold' // 字体粗细
},
button: {
distance: 5, // 信号灯按钮距离区段的距离
borderDashColor: '#FFFFFF', // 信号灯按钮边线
buttonColor: 'darkgreen', // 信号灯按钮颜色
buttonLightenColor: '#E4EF50' // 信号灯按钮闪烁颜色
},
lowButton:{
display: false // 现地 信号机按钮
}
};
this[deviceType.StationStand] = {
common: { // 通用属性
textFontSize: 11, // 站台默认字体大小
functionButtonShow: '03' // 功能灯按钮显示条件01所有模式下显示 02 行调显示 03现地显示
},
safetyDoor: { // 屏蔽门
height: 3, // 站台屏蔽门高度
width: 60,
distance: 8, // 站台和屏蔽门之间的距离
defaultColor: '#00FF00', // 屏蔽门默认颜色
splitDoorColor: '#F61107' // 屏蔽门切除颜色
},
stand: { // 站台
headFontSize: 11, // 站台首端字体大小
spareColor: '#606060', // 站台空闲颜色
stopColor: '#FEFE00', // 站台列车停站颜色
jumpStopColor: '#9A99FF', // 站台跳停颜色
designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
mergentN: 4, // 站台紧急关闭边数
insideOffset: { x: 0, y: 25 }, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: -25 }, // 外站台紧急关闭偏移量
closeColor: '#F61107' // 站台紧急关闭颜色
},
reentry: { // 站台折返策略
position: 0, // 折返方向
offset: {x: -16, y: 20}, // 折返偏移量
noHumanColor: '#0F16DA', // 站台无人折返
autoChangeEndsColor: '#0BF400' // 站台自动换端
},
detainCar: { // 扣车
text: 'H', // 扣车显示内容
position: 1, // 扣车方向
offset: {x: -8, y: -6}, // 扣车偏移量
trainColor: '#E4EF50', // 车站扣车颜色
centerTrainColor: '#FFFFFF', // 中心扣车颜色
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
},
stopTime: { // 停站时间
position: 1, // 运行时间方向
offset: {x: -8, y: 26}, // 运行时间偏移量
textColor: '#FFFFFF' // 停站时间字体颜色
},
level: { // 运行等级
position: 1, // 运行等级方向
offset: {x: -8, y: 6}, // 运行等级偏移量
textColor: '#FFFFFF' // 停站等级字体颜色
},
trainStop: {}, // 停车标志
trainDepart: {}, // 停车计时
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
lampColor: '#5A5D5A' // 功能按钮颜色
}
};
this[deviceType.StationCounter] = {
text: {
distance: 2, // 计数器名称和文字的距离
fontColor: '#FFFFFF', // 计数器字体颜色
borderColor: '#E4EF50' // 计数器边框颜色
}
};
this[deviceType.StationDelayUnlock] = {
text: {
distance: 3, // 延迟解锁和设备之间的距离
fontColor: '#FFFFFF', // 延时解锁字体颜色
borderColor: '#FFFFFF' // 延迟解锁边框颜色
}
};
this[deviceType.AutoTurnBack] = {
// 是否显示
visibleConditions: '03',
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
subtitleText: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 17 // 等于副标题距离
},
lamp: {
lineDash: null, // 灯的包围框
borderShow: false, // 是否显示边框
stroke: '#FFFFFF', // 框的颜色
fill: 'rgba(0,0,0,0)', // 填充色
radiusR: 6, // 控制灯大小
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
lightUpColor: '#ffff00' // 点亮灯颜色
},
OutFrame: {
}
};
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
fill: 'rgba(0,0,0,0)', // 填充色
radiusR: 6, // 控制灯大小
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
lightUpColor: '#FF0000' // 点亮灯颜色
}
};
this[deviceType.Station] = {
// text: {
// show: true // 公里标名称显示
// },
kmPostShow: true, // 公里标显示
kilometerPosition: 'up', // 公里标朝向
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
controlColor: '#FFFF00' // 控制灯颜色
},
turnBack: { // 按图折返
lamp: 1, // 灯数量
lampSpace: 60 // 灯间距
},
StationControl:{
text: {
distance: 2, // 灯和文字之间的距离
fontSize: 11, // 字体大小
fontFormat: 'consolas', // 字体格式
fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText:'紧急站控', // 紧急站控文字内容
interconnectedControlText:'连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
},
lamp: {
count: 2, // 控制模式灯个数
offset: {x: 0, y: 0}, // 控制模式灯偏移量
radiusR: 4, // 控制模式灯的半径
distance: 36, // 控制模式之间灯之间的距离
grayColor: '#7F7F7F', // 控制模式灰色
greenColor: '#00FF00', // 控制模式绿色
redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色
emergencyControlShow: false, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false, // 联锁控显示
centerControlButtonShow: false // 中控显示
},
arrow: {
show: true // 控制模式箭头显隐
},
mouseOverStyle: { // 鼠标悬浮样式
fontSize: null,
fontFormat: 'consolas',
fontColor: '#000',
fontWeight: 'normal',
textAlign: 'middle',
textVerticalAlign: 'top'
}
}
};
this[deviceType.Switch] = {
text: {
show: true, // 道岔名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
offset: {x: 0, y: 8}, // 道岔名称与区段距离
fontSize: 11, // 字体大小
fontColor: '#C0C0C0', // 道岔名称颜色
fontWeight: 'bold', // 字体粗细
borderColor: '#FE0000', // 道岔边框颜色
lossColor: '#FFFFFF', // 道岔失去颜色
locateColor: '#00FF00', // 道岔定位颜色
inversionColor: '#9C9D09', // 道岔反位颜色
monolockLocationColor: '#ea282c', // 道岔单锁'定位'颜色
monolockInversionColor: '#ea282c', // 道岔单锁'反位'颜色
block: true // 封锁名称
},
sectionAction: {
flag: false, // 道岔 关联区段显示
spareColor: '#5b5b5b' // 区段显示颜色
},
core: {
length: 6 // 道岔单边长度
},
jointImg: { // 道岔 A B C D四元素属性配置
trapezoidLength: 8, // 直角梯形元素默认长度
block: false, // 联合图形封锁状态
flashingColors: '#D600D5', // 联合图形封锁闪烁显示颜色
fork: false, // 挤岔专用(如有挤岔操作 变为true
forKColor: 'red' // 挤岔颜色 配合挤岔专用
},
arcBlcok: { // 圆形封锁图形
show: false, // 显示
arcBorderColor: 'green', // 默认边框颜色
locationColor: 'green', // 定位封锁颜色
inversionColor: '#FFFF00' // 反位封锁颜色
},
rectLock: { // 矩形封锁框图形
rectWidth: 18, // 矩形框 宽高
rectBorderColor: '#fff', // 矩形边框颜色
monolock: false, // 单锁显示
block: false // 封锁显示
}
};
this[deviceType.Line] = {
lineColor: '#FFFFFF' // 线条颜色
};
this[deviceType.LcControl] = {
text: {
fontSize: 10, // 灯字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 灯大小
controlColor: '#FFFF00' // 灯颜色
},
mouseOverStyle: {
fontSize: 10,
fontFormat: 'consolas',
fontColor: '#FFF000',
fontWeight: 'normal',
textAlign: 'middle',
textVerticalAlign: 'top',
arcColor: '#00FFFF',
textColor: '#000000'
}
};
this[deviceType.SwitchFault] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
controlColor: '#000000', // 控制灯颜色
offColor: '#ff0000',
lineWidth: 2,
strokeColor: '#FFFFFF' // 控制灯描边样式
}
};
this[deviceType.ZcControl] = {
text: {
fontSize: 10, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 灯大小
controlColor: '#00FF00' // 灯颜色
},
mouseOverStyle: {
fontSize: 10,
fontFormat: 'consolas',
fontColor: '#FFF000',
fontWeight: 'normal',
textAlign: 'middle',
textVerticalAlign: 'top',
arcColor: '#00FFFF',
textColor: '#000000'
}
};
this[deviceType.LimitControl] = {
text: {
fontSize: 10, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 灯大小
controlColor: '#ECE9D8' // 灯颜色
},
mouseOverStyle: {
fontSize: 10,
fontFormat: 'consolas',
fontColor: '#FFF000',
fontWeight: 'normal',
textAlign: 'middle',
textVerticalAlign: 'top',
textColor: '#000000',
arcColor: '#00FFFF'
}
};
this[deviceType.AutomaticRoute] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
fill: 'rgba(0,0,0,0)', // 填充色
radiusR: 6, // 控制灯大小
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
}
};
this[deviceType.TrainWindow] = {
lineColor: '#4DD43F', // 车次窗颜色
lineDash: null, // 车次窗虚线间隔
lineWidth: 1, // 车次窗线宽
trainWindowSmooth: 0 // 车次窗矩形圆滑程度
};
this[deviceType.SplitStation] = {
lineLength: 15, // 箭头线长度
lineWidth: 2, // 线宽
height: 35, // 分隔整体高度
strokeColor: '#00FF00', // 线颜色
triangleFillColor: '#00FF00', // 三角填充颜色
textFill: '#FFFFFF', // 文字颜色
verticalDistance: 10, // 箭头三角垂直高度
horizontalDistance: 7// 箭头三角水平高度
};
this[deviceType.Train] = {
trainBody: {
trainBodyLineWidth: 0, // 车身line宽
changeTrainWidth: true, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [
{
type: '03',
serviceNumber: 'MM',
nameFormat: 'serviceNumber:groupNumber'
},
{
type: '02',
nameFormat: 'targetCode:groupNumber'
}
], // 特殊列车类型需设置显示格式
lrPadding: 1, // 两边间隔
upPadding: 1, // 上边距离
trainBodyFillColor: '#000000', // 列车车身填充颜色
trainNameFormat: 'targetCode:serviceNumber:tripNumber'// 列车显示格式
},
directionArrow: {
},
hsda: {
trainHSDATextFontSize: 8// 列车HDSA字号
},
trainNumber: {
targetCodePrefix: '000', // 目的地码前缀
defaultTargetCode: 'AAA', // 默认目的地码
trainTargetTextAlign: 'left', // 车次号文字显示位置
trainNumberOffset: { x: 1, y: 1}// 目的地码偏移量
},
trainServer: {
serviceNumberPrefix: '00', // 服务号(表号)前缀
defaultServiceNumber: 'BB', // 默认服务号(表号)
trainServerOffset: { x: 26, y: 1}// 列车服务号偏移
},
trainTarget: {
tripNumberPrefix: '0000', // 车次号前缀
defaultDirectionCode: 'D', // 默认车次号1
defaultTripNumber: 'CCC', // 默认车次号2
trainTargetOffset: { x: 42, y: 1}// 列车车次号偏移
},
trainTargetNumber: {
groupNumberPrefix: '000', // 车组号前缀
defaultGroupNumber: 'EEE', // 默认车组号
trainTargetNumberOffset: {x: -1, y: 1}// 车组号偏移量
},
trainHead: {
trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
trainHeadTriangleFirst: { x: 0, y: 0}, // 列车车头三角坐标1偏移量
trainHeadTriangleSecond: { x: 4, y: 7.5}, // 列车车头三角坐标2偏移量
trainHeadTriangleThird: { x: 0, y: 15}, // 列车车头三角坐标3偏移量
trainHeadRectHeight: 15, // 列车车头矩形高度
trainConntWidth: 4, // 列车竖杠的宽度
trainHeadFillColor: '#EF0C08'// 列车车头矩形填充颜色
},
common: {
trainHeight: 17, // 列车高度
trainHeadDistance: 2, // 列车和车头之间的间距
trainWidth: 76, // 列车长度
trainTextFontSize: 15, // 列车字号
fontFamily: 'consolas', // 默认字体 族类
nameFontSize: 15, // 字体大小
haveTextHSDA: false, // 是否需创建textHSDA对象
haveArrowText: true, // 是否需创建arrowText对象
haveTrainBorder: false, // 是否需创建trainBorder对象
aspectRatio: 8 / 15, // 字体宽高比例用以拼接text是计算位置
textOffset: 1, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 2, // 计算列车长度时--列车长比text多出尺寸
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
trainTip:true // 鼠标悬停列车状态信息框是否显示
},
trainStatusStyle: {
destinationStatus: [
{status: '01', showColor: '#FFFFFF'},
{status: '02', showColor: '#00FF00'},
{status: '03', showColor: '#3265FF'},
{status: '04', showColor: '#9B4A09'},
{status: '05', showColor: '#EF0C08'},
{status: '06', showColor: '#FFFFFF'},
{status: '07', showColor: '#FFFF00'}
], // 目的地状态 01准点 02早点 03严重早点 04晚点 05严重晚点 06头码车 07ATP切除
destinationStatusSetText: 'trainServer', // 目的地状态设置的对应哪个text的颜色
directionType: [
{
type: 1,
lineLShow: false,
lineRShow: false,
arrowLShow: false,
arrowRShow: true
},
{
type: 0,
lineLShow: false,
lineRShow: false,
arrowLShow: true,
arrowRShow: false
}
], // 运行方向状态类型对应车头显示状态 1从左往右 0从右往左
directionStopType: [
{type: '01', lineLShow: false, lineRShow: false},
{type: '02', lineLShow: false, lineRShow: true},
{type: '03', lineLShow: true, lineRShow: false}
], // 列车停止方向类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行
driveModeStatus: [
{
status: 'AM',
trainLColor: '#00FF00',
trainRColor: '#00FF00'
},
{
status: 'CM',
trainLColor: '#FFFF00',
trainRColor: '#FFFF00'
},
{
status: 'RM',
trainLColor: '#EA700D',
trainRColor: '#EA700D'
},
{
status: 'NRM',
trainLColor: '#A0522D',
trainRColor: '#A0522D'
}
], // 列车运行模式对应车头颜色 ATO自动驾驶模式AM ATP监控下的人工驾驶模式CM 限制人工驾驶模式RM 非限制人工驾驶模式NRM
runControlStatus: [], // 设置运行控制状态类型 eg:{status: '01', hShow: false, sShow: false}
doorStatus: [], // 设置车门状态类型
communicationStatus: [], // 设置通信状态 eg:{status: '01', trainColor:'#725A64'}
alarmStatus: [], // 设置报警状态 eg:{status: '01', aShow: false}
serverNoType: []// 服务号状态类型 eg:{type: '01', showColor: '#FFFFFF'}
}
};
}
}
export default new SkinCode();

View File

@ -11,8 +11,8 @@ class SkinCode extends defaultStyle {
text: {
show: true, // 物理区段名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 10, // 文字离区段距离
fontSize: 12, // 字体大小
distance: 18, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: 'lightgreen', // 字体颜色
textAlign: 'center', // 水平对齐方式
@ -22,8 +22,8 @@ class SkinCode extends defaultStyle {
logicText: { // 逻辑区段名称
show: false, // 逻辑区段名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 12, // 文字离区段距离
fontSize: 11, // 字体大小
distance: 6, // 文字离区段距离
fontSize: 8, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
@ -33,7 +33,7 @@ class SkinCode extends defaultStyle {
standText: { // 站台
show: true, // 站台轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 24, // 文字离区段距离
distance: 30, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
@ -44,7 +44,7 @@ class SkinCode extends defaultStyle {
reentryText: { // 折返
show: true, // 折返轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 36, // 文字离区段距离
distance: 30, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
@ -55,7 +55,7 @@ class SkinCode extends defaultStyle {
transferText: { // 转换轨
show: true, // 转换轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 36, // 文字离区段距离
distance: 30, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
@ -67,7 +67,7 @@ class SkinCode extends defaultStyle {
show: true, // 目的码名称显示
opposite: true, // 对称相反
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 12, // 文字离区段距离
distance: 28, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'bold', // 字体粗细
fontColor: 'yellow', // 字体颜色
@ -134,12 +134,12 @@ class SkinCode extends defaultStyle {
};
this[deviceType.Signal] = {
distance: 3, // 设备距离区段的距离
distance: 10, // 设备距离区段的距离
post: {
standardLength: 7, // 高柱长度
standardHeight: 6, // 灯柱高度
standardColor: '#fff', // 灯柱颜色
standardWidth: 3, // 灯柱宽度
standardWidth: 2, // 灯柱宽度
autoRouteColor: '#008000', // 自动进路开启灯柱颜色
shapeChange: true, // 灯柱形状改变
terminalOptional: '#CC3399' // 终端可选信号机灯柱颜色
@ -245,21 +245,27 @@ class SkinCode extends defaultStyle {
doorOpenColor:'#007f00' // 车门开启状态颜色(西安二号线线路样式)
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
insideOffset: { x: 0, y: 25 }, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: -25}, // 外站台紧急关闭偏移量
closeColor: 'red' // 站台紧急关闭颜色
mergentR: 9, // 站台紧急关闭半径
mergentN: 8, // 站台紧急关闭边数(西安二号线特殊样式)
insideOffset: { x: 0, y: 40 }, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: -40}, // 外站台紧急关闭偏移量
closeColor: 'red', // 站台紧急关闭颜色
defaultColor:'#808080', // 西安二号线特殊样式(默认颜色)
special:true // 西安二号线特殊样式
},
reentry: {}, // 站台折返策略
detainCar: { // 扣车
position: -1, // 扣车标识在站台上显示方向
text: 'H', // 扣车显示内容
offset: {x: -8, y: 13}, // 扣车偏移量
offset: {x: 8, y: 0}, // 扣车偏移量
centerTrainColor: 'white', // 中心扣车颜色
andCenterTrainColor: 'red', // 车站+中心扣车颜色
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
fontSize: 10,
fontWeight: 'normal'
fontWeight: 'normal',
circleWidth:14, // 西安二号线特殊样式 圆圈的宽度
defaultColor:'#808080', // 默认颜色
special:true // 西安二号线特殊样式
},
stopTime: { // 停站时间
position: 1, // 停站时间方向
@ -397,7 +403,7 @@ class SkinCode extends defaultStyle {
text: {
show: true, // 道岔名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
offset: {x: 5, y: -10}, // 道岔名称与区段距离
offset: { x: -15, y: 9 }, // 道岔名称与区段距离
fontSize: 11, // 字体大小
fontColor: '#C0C0C0', // 道岔名称颜色
fontWeight: 'normal', // 字体粗细
@ -451,7 +457,7 @@ class SkinCode extends defaultStyle {
this[deviceType.ZcControl] = {
// 是否显示
visible:true,
visible:false,
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -554,20 +560,12 @@ class SkinCode extends defaultStyle {
text: 'PSD',
defaultColor: '#FFF'
},
mfa: {
text: 'MFA',
mf: {
text: 'MF',
defaultColor: '#FFF'
},
mfb: {
text: 'MFB',
defaultColor: '#FFF'
},
pfa: {
text: 'PFA',
defaultColor: '#FFF'
},
pfb: {
text: 'PFB',
pf: {
text: 'PF',
defaultColor: '#FFF'
}
};

View File

@ -235,4 +235,9 @@ deviceRender[deviceType.SplitStation] = {
_type: deviceType.SplitStation,
zlevel: 1
};
/** SwitchFault 道岔故障 */
deviceRender[deviceType.SwitchFault] = {
_type: deviceType.SwitchFault,
zlevel: 1
};
export default deviceRender;

View File

@ -40,7 +40,8 @@ const deviceType = {
ReturnModeGroup: 'ReturnModeGroup',
ControlSwitch: 'ControlSwitch',
Axle: 'Axle',
SplitStation:'SplitStation'
SplitStation:'SplitStation',
SwitchFault: 'SwitchFault'
};
export default deviceType;

View File

@ -294,7 +294,7 @@ class Jlmap {
}
showStationHandlePsd(oDevice, stationCode) {
const standDevice = this.mapDevice[oDevice.standCode];
if (standDevice.deviceStationCode === stationCode || !stationCode) {
if (standDevice && standDevice.deviceStationCode === stationCode || !stationCode) {
this.$painter.updateSpecialShowStation(oDevice, true);
} else {
this.$painter.updateSpecialShowStation(oDevice, false);

View File

@ -56,12 +56,12 @@ class ESafeDoor extends Group {
z: model.z,
shape: {
x1:model.x - model.width / 2,
y1:model.y + (1 + offesetY ) / 2 * (2 + (model.height - 2) / 2),
y1:model.y + (1 + offesetY ) / 2 * (2 + (model.height)),
x2:model.x + model.width / 2,
y2:model.y + (1 + offesetY ) / 2 * (2 + (model.height - 2) / 2)
y2:model.y + (1 + offesetY ) / 2 * (2 + (model.height))
},
style: {
lineWidth: (model.height - 2) / 2,
lineWidth: (model.height),
lineDash:[(model.width) * 0.6 / 4, (model.width) * 0.4 / 3],
lineDashOffset:0,
stroke: style.StationStand.safetyDoor.defaultColor
@ -72,12 +72,12 @@ class ESafeDoor extends Group {
z: model.z,
shape: {
x1:model.x - model.width / 2,
y1:model.y + (1 - offesetY) / 2 * ((model.height - 2) / 2 + 2),
y1:model.y + (1 - offesetY) / 2 * ((model.height) + 2),
x2:model.x + model.width / 2,
y2:model.y + (1 - offesetY) / 2 * ((model.height - 2) / 2 + 2)
y2:model.y + (1 - offesetY) / 2 * ((model.height) + 2)
},
style: {
lineWidth: (model.height - 2) / 2,
lineWidth: (model.height),
lineDash:[(model.width) * 0.45 / 3, (model.width) * 0.55 / 4],
lineDashOffset:(model.width) * 0.45 / 3,
stroke: style.StationStand.safetyDoor.defaultColor

View File

@ -26,66 +26,110 @@ export default class EDeviceStatus extends Group {
textVerticalAlign: model.style.textStyle.textVerticalAlign
}
});
this.mfa = new Text({
this.mfList = [];
for (let i = 0; i < model.mfNum; i++) {
const mf = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.x + model.style.FaultStatusGroup.distance,
x: model.x + model.style.FaultStatusGroup.distance * (i + 1),
y: model.y,
fontWeight: model.style.textStyle.fontWeight,
fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily,
text: model.style.FaultStatusGroup.mfa.text,
textFill: model.style.FaultStatusGroup.mfa.defaultColor,
text: model.style.FaultStatusGroup.mf.text + String.fromCharCode((65 + i)),
textFill: model.style.FaultStatusGroup.mf.defaultColor,
textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign
}
});
this.mfb = new Text({
this.mfList.push(mf);
}
this.pfList = [];
for (let i = 0; i < model.pfNum; i++) {
const pf = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.x + model.style.FaultStatusGroup.distance * 2,
x: model.x + model.style.FaultStatusGroup.distance * (this.mfList.length + i + 1),
y: model.y,
fontWeight: model.style.textStyle.fontWeight,
fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily,
text: model.style.FaultStatusGroup.mfb.text,
textFill: model.style.FaultStatusGroup.mfb.defaultColor,
text: model.style.FaultStatusGroup.pf.text + String.fromCharCode((65 + i)),
textFill: model.style.FaultStatusGroup.pf.defaultColor,
textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign
}
});
this.pfa = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.x + model.style.FaultStatusGroup.distance * 3,
y: model.y,
fontWeight: model.style.textStyle.fontWeight,
fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily,
text: model.style.FaultStatusGroup.pfa.text,
textFill: model.style.FaultStatusGroup.pfa.defaultColor,
textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign
this.pfList.push(pf);
}
this.mfList.forEach(item => {
this.add(item);
});
this.pfb = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.x + model.style.FaultStatusGroup.distance * 4,
y: model.y,
fontWeight: model.style.textStyle.fontWeight,
fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily,
text: model.style.FaultStatusGroup.pfb.text,
textFill: model.style.FaultStatusGroup.pfb.defaultColor,
textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign
}
this.pfList.forEach(item => {
this.add(item);
});
// this.mfa = new Text({
// zlevel: this.zlevel,
// z: this.z,
// style: {
// x: model.x + model.style.FaultStatusGroup.distance,
// y: model.y,
// fontWeight: model.style.textStyle.fontWeight,
// fontSize: model.style.FaultStatusGroup.fontSize,
// fontFamily: model.style.fontFamily,
// text: model.style.FaultStatusGroup.mfa.text,
// textFill: model.style.FaultStatusGroup.mfa.defaultColor,
// textAlign: model.style.textStyle.textAlign,
// textVerticalAlign: model.style.textStyle.textVerticalAlign
// }
// });
// this.mfb = new Text({
// zlevel: this.zlevel,
// z: this.z,
// style: {
// x: model.x + model.style.FaultStatusGroup.distance * 2,
// y: model.y,
// fontWeight: model.style.textStyle.fontWeight,
// fontSize: model.style.FaultStatusGroup.fontSize,
// fontFamily: model.style.fontFamily,
// text: model.style.FaultStatusGroup.mfb.text,
// textFill: model.style.FaultStatusGroup.mfb.defaultColor,
// textAlign: model.style.textStyle.textAlign,
// textVerticalAlign: model.style.textStyle.textVerticalAlign
// }
// });
// this.pfa = new Text({
// zlevel: this.zlevel,
// z: this.z,
// style: {
// x: model.x + model.style.FaultStatusGroup.distance * 3,
// y: model.y,
// fontWeight: model.style.textStyle.fontWeight,
// fontSize: model.style.FaultStatusGroup.fontSize,
// fontFamily: model.style.fontFamily,
// text: model.style.FaultStatusGroup.pfa.text,
// textFill: model.style.FaultStatusGroup.pfa.defaultColor,
// textAlign: model.style.textStyle.textAlign,
// textVerticalAlign: model.style.textStyle.textVerticalAlign
// }
// });
// this.pfb = new Text({
// zlevel: this.zlevel,
// z: this.z,
// style: {
// x: model.x + model.style.FaultStatusGroup.distance * 4,
// y: model.y,
// fontWeight: model.style.textStyle.fontWeight,
// fontSize: model.style.FaultStatusGroup.fontSize,
// fontFamily: model.style.fontFamily,
// text: model.style.FaultStatusGroup.pfb.text,
// textFill: model.style.FaultStatusGroup.pfb.defaultColor,
// textAlign: model.style.textStyle.textAlign,
// textVerticalAlign: model.style.textStyle.textVerticalAlign
// }
// });
this.add(this.psd);
this.add(this.mfa);
this.add(this.mfb);

View File

@ -21,7 +21,7 @@ export default class SaidLamp extends Group {
this.model = model;
this.style = style;
this.deviceStyle = style[model._type];
if (!this.deviceStyle) { return; }
if (this.deviceStyle) {
this.isShowShape = true;
if (isShowThePrdType(model.prdType, this.deviceStyle.displayCondition) || model.previewOrMapDraw) {
this.create();
@ -32,10 +32,11 @@ export default class SaidLamp extends Group {
this.setShowMode();
}
}
}
create() {
const model = this.model;
const lampDevice = ['LeuControl', 'IntersiteControl', 'CenterCommunication', 'AtsControl', 'LocalControl', 'ChainControl', 'Maintain', 'PowerSupply', 'MaintenanceLamps', 'ZcCommunication'];
const lampDevice = ['LeuControl', 'IntersiteControl', 'CenterCommunication', 'AtsControl', 'LocalControl', 'ChainControl', 'Maintain', 'PowerSupply', 'MaintenanceLamps', 'ZcCommunication', 'SwitchFault'];
if (lampDevice.includes(this._type)) {
this.control = new EControl({
zlevel: this.zlevel,
@ -47,8 +48,9 @@ export default class SaidLamp extends Group {
r: this.deviceStyle.lamp.radiusR
},
subType: 'Control',
lineWidth: 0,
fill: this.deviceStyle.lamp.controlColor
lineWidth: this.deviceStyle.lamp.lineWidth || 0,
fill: this.deviceStyle.lamp.controlColor,
stroke: this.deviceStyle.lamp.strokeColor
},
text: {
position: [0, 0],
@ -93,6 +95,8 @@ export default class SaidLamp extends Group {
z: this.z,
x: model.position.x,
y: model.position.y,
mfNum: model.mfNum,
pfNum: model.pfNum,
style: this.style
});
this.add(this.control);
@ -129,8 +133,8 @@ export default class SaidLamp extends Group {
this.control = new EUnmanned({
zlevel: this.zlevel,
z: this.z,
x: model.unmannedPosition.x,
y: model.unmannedPosition.y,
x: model.position.x,
y: model.position.y,
_subType: 'Unmanned',
width: this.style.NoOneReturn.width,
fill: this.style.NoOneReturn.defaultColor
@ -201,6 +205,7 @@ export default class SaidLamp extends Group {
}
setShowMode() {
const showMode = this.model.showMode;
if (this.deviceStyle) {
const showConditions = this.deviceStyle.displayCondition;
if (showConditions === '01' || showMode === showConditions) {
this.control && this.control.show();
@ -208,6 +213,7 @@ export default class SaidLamp extends Group {
this.control && this.control.hide();
}
}
}
setShowStation(stationCode) {
if (!stationCode || this.model.stationCode === stationCode) {
this.control && this.control.show();

View File

@ -4,35 +4,30 @@
import Path from 'zrender/src/graphic/Path';
// 计轴
export const EAxle = Path.extend({
export default Path.extend({
type: 'EAxle',
_subType: '',
shape: {
// style: this.style,
// traingle: traingle11,
// drictx: 1,
// dricty: 1,
// point: this.model.points[0]
},
buildPath: function (ctx, model) {
if (model && model.style && model.traingle) {
const axleLength = 2 * model.style.Section.axle.radius;
const positionx = model.point.x + model.drictx * (model.traingle.getCos(axleLength) * 1.2);
const positiony = model.point.y + model.dricty * (model.traingle.getCos(axleLength) * 1.2);
buildPath: function (path, shape) {
if (shape && shape.style && shape.traingle) {
const axleLength = 2 * shape.style.Section.axle.radius;
// const positionx = shape.point.x + shape.drictx * (shape.traingle.getCos(axleLength) * 1.2);
// const positiony = shape.point.y + shape.dricty * (shape.traingle.getCos(axleLength) * 1.2);
const positionx = shape.point.x + shape.drictx * (shape.traingle.getCos(axleLength) * 1.05);
const positiony = shape.point.y + shape.dricty * (shape.traingle.getCos(axleLength) * 1.05);
// 圆弧
const arcX = positionx - model.dricty * model.traingle.getSin(axleLength);
const arcY = positiony + model.drictx * model.traingle.getSin(axleLength);
const arcR = model.style.Section.axle.radius;
ctx.arc(arcX, arcY, arcR, 0, 2 * Math.PI, false);
ctx.closePath();
const arcX = positionx - shape.dricty * shape.traingle.getSin(axleLength);
const arcY = positiony + shape.drictx * shape.traingle.getSin(axleLength);
const arcR = shape.style.Section.axle.radius;
path.arc(arcX, arcY, arcR, 0, 2 * Math.PI, false);
path.closePath();
const x1 = positionx - model.traingle.getCos(axleLength * model.multiple1) - model.dricty * model.traingle.getSin(axleLength);
const y1 = positiony + model.drictx * model.traingle.getSin(axleLength * model.multiple1) - model.traingle.getSin(axleLength);
const x2 = positionx + model.traingle.getCos(axleLength * model.multiple2) - model.dricty * model.traingle.getSin(axleLength);
const y2 = positiony + model.drictx * model.traingle.getSin(axleLength * model.multiple2) + model.traingle.getSin(axleLength);
ctx.moveTo(x1, y1);
ctx.lineTo(x2, y2);
ctx.closePath();
const x1 = positionx - shape.traingle.getCos(axleLength * shape.multiple1) - shape.dricty * shape.traingle.getSin(axleLength);
const y1 = positiony + shape.drictx * shape.traingle.getSin(axleLength * shape.multiple1) - shape.traingle.getSin(axleLength);
const x2 = positionx + shape.traingle.getCos(axleLength * shape.multiple2) - shape.dricty * shape.traingle.getSin(axleLength);
const y2 = positiony + shape.drictx * shape.traingle.getSin(axleLength * shape.multiple2) + shape.traingle.getSin(axleLength);
path.moveTo(x1, y1);
path.lineTo(x2, y2);
path.closePath();
}
}
});
@ -49,9 +44,8 @@ export const EAxle = Path.extend({
// create(model) {
// if (model && model.style && model.traingle) {
// const axleLength = 2 * model.style.Section.axle.radius;
// const positionx = model.point.x + model.drictx * (model.traingle.getCos(axleLength));
// const positiony = model.point.y + model.dricty * (model.traingle.getCos(axleLength));
// const positionx = model.point.x + model.drictx * (model.traingle.getCos(axleLength) * 1.2);
// const positiony = model.point.y + model.dricty * (model.traingle.getCos(axleLength) * 1.2);
// this.line = new Line({
// zlevel: this.zlevel,
// z: this.z,
@ -63,7 +57,7 @@ export const EAxle = Path.extend({
// y2: positiony + model.drictx * model.traingle.getSin(axleLength) + model.traingle.getSin(axleLength)
// },
// style: {
// GBaseLineWidth: 1,
// GBaseLineWidth: 2,
// stroke: model.style.Section.axle.color
// }
// });

View File

@ -6,7 +6,7 @@ import ELines from './ELines'; // 创建多线条 曲线 (私有)
import EblockLines from './EblockLines'; // 区段封锁特有
import ESeparator from './ESeparator'; // 分隔符 (私有)
import EMouse from './EMouse';
import { EAxle } from './EAxle'; // 创建计轴
import EAxle from './EAxle'; // 创建计轴
import { EBackArrow, EBackArrowTriangle } from './EBackArrow'; // 折返进路箭头
import ELimitName from './ELimitName'; // 成都三号线 限速名称
import JTriangle from '../../utils/JTriangle';
@ -60,6 +60,7 @@ export default class Section extends Group {
multiple2: 1.5
},
style: {
lineWidth: 2,
fill: this.style.Section.axle.color,
stroke: this.style.Section.axle.color
}
@ -79,6 +80,7 @@ export default class Section extends Group {
multiple2: 1
},
style: {
lineWidth: 2,
fill: this.style.Section.axle.color,
stroke: this.style.Section.axle.color
}

View File

@ -117,8 +117,8 @@ class Signal extends Group {
fill: style.Signal.insideTriangle.fillColor
}
});
this.add(this.insideTriangle);
this.insideTriangle.hide();
// this.add(this.insideTriangle);
// this.insideTriangle.hide();
}
if (style.Signal.sigBack) {
const signalRect = this.getBoundingRect();

View File

@ -0,0 +1,67 @@
import Group from 'zrender/src/container/Group';
import Circle from 'zrender/src/graphic/shape/Circle';
import Line from 'zrender/src/graphic/shape/Line';
class EDetainCircle extends Group {
constructor(model) {
super();
this.model = model;
this.create();
}
create() {
const model = this.model;
const style = this.model.style;
this.detainCircle = new Circle({
zlevel: model.zlevel,
z: model.z,
shape: {
cx: model.x,
cy: model.y,
r: model.radius
},
style:{
lineWidth:2,
stroke:style.StationStand.detainCar.defaultColor
}
});
this.line1 = new Line({
zlevel: model.zlevel,
z: model.z,
shape:{
x1:model.x - model.radius * 0.7,
y1:model.y - model.radius * 0.7,
x2:model.x + model.radius * 0.7,
y2:model.y + model.radius * 0.7
},
style:{
lineWidth:2,
stroke:style.StationStand.detainCar.defaultColor
}
});
this.line2 = new Line({
zlevel: model.zlevel,
z: model.z,
shape:{
x1:model.x - model.radius * 0.7,
y1:model.y + model.radius * 0.7,
x2:model.x + model.radius * 0.7,
y2:model.y - model.radius * 0.7
},
style:{
lineWidth:2,
stroke:style.StationStand.detainCar.defaultColor
}
});
this.add(this.detainCircle);
this.add(this.line1);
this.add(this.line2);
}
setColor(color) {
this.detainCircle.setStyle('stroke', color);
this.line1.setStyle('stroke', color);
}
}
export default EDetainCircle;

View File

@ -1,6 +1,7 @@
import Group from 'zrender/src/container/Group';
import Isogon from 'zrender/src/graphic/shape/Isogon';
import Polygon from 'zrender/src/graphic/shape/Polygon';
import Line from 'zrender/src/graphic/shape/Line';
import {arrow} from '../utils/ShapePoints';
class ESafeEmergent extends Group {
@ -8,6 +9,9 @@ class ESafeEmergent extends Group {
super();
this.model = model;
this.isNew = false;
if (this.model.style.StationStand.standEmergent.special) {
this.create();
}
}
create() {
@ -43,19 +47,64 @@ class ESafeEmergent extends Group {
n: model.n
},
style: {
lineWidth: 0,
stroke: style.StationStand.standEmergent.closeColor,
fill: style.StationStand.standEmergent.closeColor
lineWidth: 0
}
});
if (style.StationStand.standEmergent.special) {
this.emergent.setStyle('lineWidth', 2);
this.emergent.setStyle('stroke', style.StationStand.standEmergent.defaultColor);
} else {
this.emergent.setStyle('stroke', style.StationStand.standEmergent.closeColor);
this.emergent.setStyle('fill', style.StationStand.standEmergent.closeColor);
}
this.add(this.emergent);
if (style.StationStand.standEmergent.special) {
// r*Math.r*cos(Math.PI/180*22.5)
// Math.sin(Math.PI/180*50)
// Math.cos(Math.PI/180*50)
this.emergent.rotation = Math.PI / 8;
this.emergent.origin = [model.x, model.y];
this.emergent.dirty();
this.emergentLine1 = new Line({
zlevel: model.zlevel,
z: model.z,
shape:{
x1:model.x - model.r * 0.5939,
y1:model.y - model.r * 0.7077,
x2:model.x + model.r * 0.5939,
y2:model.y + model.r * 0.7077
},
style:{
lineWidth:2,
stroke:style.StationStand.standEmergent.defaultColor
}
});
this.emergentLine2 = new Line({
zlevel: model.zlevel,
z: model.z,
shape:{
x1:model.x + model.r * 0.5939,
y1:model.y - model.r * 0.7077,
x2:model.x - model.r * 0.5939,
y2:model.y + model.r * 0.7077
},
style:{
lineWidth:2,
stroke:style.StationStand.standEmergent.defaultColor
}
});
this.add(this.emergentLine1);
this.add(this.emergentLine2);
}
}
}
}
hideMode() {
if (!this.model.style.StationStand.standEmergent.special) {
this.emergent && this.emergent.hide();
}
}
showMode() {
this.create();

View File

@ -12,6 +12,7 @@ import EHighlight from '../element/EHighlight';
import ETrainStop from './ETrainStop';
import ETrainDepart from './ETrainDepart';
import EControl from '../element/EControl';
import EDetainCircle from './EDetainCircle';
import {isShowThePrdType} from '../../utils/handlePath';
class StationStand extends Group {
@ -74,7 +75,7 @@ class StationStand extends Group {
x: emergentX,
y: emergentY,
r: style.StationStand.standEmergent.mergentR,
n: 4
n: style.StationStand.standEmergent.mergentN
});
this.add(this.emergent);
@ -131,6 +132,18 @@ class StationStand extends Group {
this.add(this.reentry);
}
if (style.StationStand.detainCar.special) {
const detainD = model.right ? 1 : -1;
this.detainCircle = new EDetainCircle({
zlevel: this.zlevel,
z: this.z,
style: style,
x: model.position.x + (model.width / 2) * detainD + detainD * style.StationStand.detainCar.offset.x + detainD * style.StationStand.detainCar.circleWidth / 2,
y: model.position.y,
radius:style.StationStand.detainCar.circleWidth / 2
});
this.add(this.detainCircle);
} else {
/** 站台扣车*/
const detainD = model.right ? 1 : -1;
const detainX = model.position.x - style.StationStand.detainCar.position * detainD * (style.StationStand.detainCar.offset.x - model.width / 2);
@ -146,6 +159,7 @@ class StationStand extends Group {
right: model.right
});
this.add(this.detain);
}
/** 停站时间*/
if (style.StationStand.stopTime.offset) {

View File

@ -2,6 +2,7 @@ import Group from 'zrender/src/container/Group';
import Text from 'zrender/src/graphic/Text';
import LangStorage from '@/utils/lang';
import Rect from 'zrender/src/graphic/shape/Rect';
import store from '@/store/index_APP_TARGET';
class EMouse extends Group {
constructor(device) {
@ -27,10 +28,14 @@ class EMouse extends Group {
default: trainType = LangStorage.getLang() == 'en' ? 'unknown' : '未知'; break;
}
let text = '';
let direction = this.device.model.right == 1;
if (store.state.map.mapConfig.upDirection == 'left') {
direction = this.device.model.right != 1;
}
if (LangStorage.getLang() == 'en') {
text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${this.device.model.directionType == '02' ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${this.device.model.hold ? 'Detained' : 'Normal'}\n \n 跳停状态: ${this.device.model.jump ? 'Skip to continue moving' : 'Normal'}Stationary: ${!this.device.model.stop ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`;
text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${direction ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${this.device.model.hold ? 'Detained' : 'Normal'}\n \n 跳停状态: ${this.device.model.jump ? 'Skip to continue moving' : 'Normal'}Stationary: ${!this.device.model.stop ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`;
} else {
text = `列车类型: ${trainType} \n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n\0\0号: ${this.device.model.groupNumber}\n\0\0点: ${destinationText}\n运行方向: ${this.device.model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
text = `列车类型: ${trainType} \n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n\0\0号: ${this.device.model.groupNumber}\n\0\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
}
const trainTip = this.device.style.Train.common.trainTip;
if (trainTip) {

View File

@ -73,7 +73,7 @@ export default class Train extends Group {
tripNumber: model.tripNumber,
destinationCode: model.destinationCode,
groupNumber: model.groupNumber,
directionType: model.directionType,
right: model.right,
directionCode: model.directionCode,
sectionModel: model.sectionModel,
runStatus: model.runStatus,

View File

@ -25,7 +25,8 @@ export default class EControl extends Group {
shape: this.arcStyle.shape,
style: {
lineWidth: this.arcStyle.lineWidth,
fill: this.arcStyle.fill
fill: this.arcStyle.fill,
stroke: this.arcStyle.stroke
},
onmouseover: this.arcStyle.mouseover,
onmouseout: this.arcStyle.mouseout

View File

@ -65,6 +65,7 @@ mapShape[deviceType.ModeStatusGroup] = SaidLamp;
mapShape[deviceType.FaultStatusGroup] = SaidLamp;
mapShape[deviceType.ReturnModeGroup] = SaidLamp;
mapShape[deviceType.Axle] = SaidLamp;
mapShape[deviceType.SwitchFault] = SaidLamp;
mapShape[deviceType.SplitStation] = SplitStation;
function shapefactory(device, jmap) {

View File

@ -1,175 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule add-task"
:title="title"
:visible.sync="dialogShow"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="margin: 10px">
<el-row>
<el-col :span="3">
<el-radio v-model="model.type" label="1">加在最前</el-radio>
</el-col>
<el-col :span="2" :offset="1">
<span>车次号</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.tripNumber" placeholder="请选择">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
<el-col :span="3" :offset="1">
<span>开始时间</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.startTime" placeholder="请选择">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<el-radio v-model="model.type" label="2">加在最后</el-radio>
</el-col>
<el-col :span="2" :offset="1">
<span>车次号</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.tripNumber" placeholder="请选择">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
<el-col :span="3" :offset="1">
<span>开始时间</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.startTime" placeholder="请选择">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
<el-row style="margin-bottom: 5px;">
交路
</el-row>
<el-row>
<el-table :data="model.route" border :height="180">
<el-table-column prop="date" label="日期" width="180" />
<el-table-column prop="name" label="姓名" width="180" />
<el-table-column prop="address" label="地址" />
<el-table-column width="20" />
</el-table>
</el-row>
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
详情
</el-row>
<el-row>
<el-table :data="model.detail" border :height="180">
<el-table-column prop="date" label="日期" width="180" />
<el-table-column prop="name" label="姓名" width="180" />
<el-table-column prop="address" label="地址" />
<el-table-column width="20" />
</el-table>
</el-row>
<el-row>
<el-col :offset="16">
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
</el-col>
</el-row>
</div>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
export default {
name: 'AddTask',
components: {
},
data() {
return {
dialogShow: false,
loading: false,
model: {
type: '1',
serviceNumber: '',
tripNumber: '',
startTime: '',
default: false,
route: [],
detail: []
},
tripNumberList: []
};
},
computed: {
title() {
return '添加任务';
}
},
mounted() {
},
methods: {
doShow(params) {
this.model.serviceNumber = params.serviceNumber;
this.model.tripNumber = params.tripNumber;
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleCommit() {
this.doClose();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ {
.el-button {
margin-left: 40px !important;
margin-right: 40px !important;
}
.el-row {
margin-bottom: 5px !important;
}
.el-input__inner {
height: 20px !important;
line-height: 20px !important;
}
}
</style>

View File

@ -1,115 +0,0 @@
<template>
<el-dialog
v-dialogDrag
:title="title"
class="beijing-01__schedule choose-plan-template"
:visible.sync="dialogShow"
width="80%"
:before-close="doClose"
:modal="false"
:close-on-click-modal="false"
>
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<el-row type="flex" justify="center" class="button-group">
<el-button type="primary" :loading="loading" @click="handleConfirm"> </el-button>
<el-button @click="dialogShow = false"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
import { runPlanTemplateList } from '@/api/runplan';
import { listPublishMap } from '@/api/jmap/map';
export default {
name: 'ChooseTemplatePlan',
data() {
return {
dialogShow: false,
loading: false,
mapList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
reset: true,
labelWidth: '100px',
queryObject: {
name: {
type: 'text',
label: '运行图名称'
}
}
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
radioShow: true,
columns: [
{
title: '运行图名称',
prop: 'name'
},
{
title: '地图名称',
prop: 'mapId',
type: 'tag',
columnValue: (row) => {
return this.$convertField(row.mapId, this.mapList, ['id', 'name']);
},
tagType: (row) => { return 'success'; }
}
]
},
currentModel: {}
};
},
computed: {
title() {
return '选择模板运行图';
}
},
methods: {
loadInitData() {
this.mapList = [];
listPublishMap().then(response => {
this.mapList = response.data;
});
},
doShow() {
this.loading = false;
this.dialogShow = true;
this.loadInitData();
},
doClose() {
this.dialogShow = false;
},
queryFunction(params) {
if (this.$store.state.map && this.$store.state.map.map) {
params['mapId'] = this.$route.query.mapId;
// params['lineCode'] = this.$store.getters['map/lineCode'];
}
return runPlanTemplateList(params);
},
handleConfirm() {
this.doClose();
if (this.$refs && this.$refs.pageRules) {
const choose = this.$refs.pageRules.currentChoose();
if (choose) {
this.$emit('chooseConfirm', choose);
} else {
this.$messageBox(`请选择模板运行图`);
}
}
},
reloadTable() {
this.queryList.reload();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -1,206 +0,0 @@
<template>
<div v-if="show">
<template v-if="maxmini">
<div class="nav">
<div v-show="config.showClose" class="cls-status" @click="touch('Close')"><span /></div>
<div class="min-status" @click="touch('Minim')"><span /></div>
</div>
<el-table
ref="table"
:data="config.data"
:highlight-current-row="config.highlightCurrentRow"
:height="height"
border
@current-change="handleChange"
>
<template v-for="(item,index) in config.columns">
<el-table-column :key="index" :prop="item.prop" :label="item.label" :width="item.width" />
</template>
</el-table>
</template>
<template v-else>
<div class="nav">
<div class=" max-status" @click="touch('Maxim')"><span /></div>
</div>
</template>
</div>
</template>
<script>
export default {
name: 'DataTable',
props: {
height: {
type: Number,
required: true
},
config: {
type: Object,
required: true
}
},
data() {
return {
show: true,
maxmini: true,
touchStrategy: {
'Close': [false, true],
'Minim': [true, false],
'Maxim': [true, true]
}
};
},
methods: {
handleChange(row) {
if (this.config.handleChange) {
this.config.handleChange(row);
}
},
setCurrentRow(row) {
this.$refs.table.setCurrentRow(row);
},
touch(operate) {
this.$nextTick(() => {
[this.show, this.maxmini] = this.touchStrategy[operate];
this.$emit('touch', this.maxmini);
});
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss" >
@import "src/styles/mixin.scss";
$height: 20px;
$width: 20px;
.nav {
display: table;
float: right;
width: 100%;
color: #0000;
background: -webkit-linear-gradient(#FDFDFE, #B1CBF3);
background: -o-linear-gradient(#FDFDFE, #B1CBF3);
background: -moz-linear-gradient(#FDFDFE, #B1CBF3);
background: linear-gradient(#FDFDFE, #B1CBF3);
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
height: $height;
line-height: $height;
}
/deep/ {
.el-table--border th.gutter {
background: #EBEADB !important;
}
.el-table {
overflow-y: hidden;
width: 100%;
th.is-leaf {
padding: 0px 0;
background: #EBEADB;
border-right: none !important;
border-left: 1px solid #D1CDBD !important;
border-top: 1px solid #D1CDBD !important;
border-bottom: 1px inset #D1CDBD !important;
color: #000;
.cell {
height: $height;
line-height: $height;
}
}
td {
padding: 0px 0;
.cell {
height: $height;
line-height: $height;
font-size: smaller !important;
}
}
.current-row>td {
background: #316AC5 !important;
color: #fff !important;
}
}
.cls-status {
float: right;
width: 12px;
height: 100%;
line-height: 100%;
margin-left: 5px;
cursor: pointer;
span {
display: inline-block;
content: '/';
background: black;
width: 2px;
height: 12px;
vertical-align: middle;
transform: rotate(45deg);
}
span::after {
display: block;
content: '/';
background: black;
width: 2px;
height: 12px;
transform: rotate(-90deg);
}
}
.min-status {
float: right;
width: 20px;
height: 100%;
line-height: 100%;
cursor: pointer;
span {
display: inline-block;
content: '-';
background: black;
width: 2px;
height: 12px;
vertical-align: middle;
transform: rotate(-90deg);
}
}
.max-status {
float: right;
width: 20px;
height: 100%;
line-height: 100%;
cursor: pointer;
span {
display: inline-block;
content: '';
background: black;
width: 2px;
height: 12px;
transform: rotate(0deg);
}
span::after {
display: block;
content: '';
background: black;
width: 2px;
height: 12px;
transform: rotate(90deg);
}
}
}
</style>

View File

@ -1,134 +0,0 @@
<template>
<el-dialog
v-dialogDrag
:title="title"
class="beijing-01__schedule reload-today-plan"
:visible.sync="dialogShow"
width="80%"
:before-close="doClose"
:modal="false"
:close-on-click-modal="false"
>
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<el-row type="flex" justify="center" class="button-group">
<el-button type="primary" :loading="loading" @click="handleConfirm"> </el-button>
<el-button @click="dialogShow = false"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
import { runPlanTemplateList } from '@/api/runplan';
import { getStationList } from '@/api/runplan';
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
import { getPublishMapInfo } from '@/api/jmap/map';
export default {
name: 'ReloadTodayPlan',
data() {
return {
dialogShow: false,
loading: false,
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
reset: true,
labelWidth: '100px',
queryObject: {
name: {
type: 'text',
label: '运行图名称'
}
}
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
radioShow: true,
columns: [
{
title: '运行图名称',
prop: 'name'
}
]
},
currentModel: {}
};
},
computed: {
title() {
return '加载当天计划';
}
},
methods: {
doShow() {
this.loading = false;
this.dialogShow = true;
},
doClose() {
this.dialogShow = false;
},
queryFunction(params) {
if (this.$store.state.map && this.$store.state.map.map) {
// params['lineCode'] = this.$store.getters['map/lineCode'];
params['mapId'] = this.$route.query.mapId;
}
return runPlanTemplateList(params);
},
//
handleConfirm() {
if (this.$refs && this.$refs.pageRules) {
const choose = this.$refs.pageRules.currentChoose();
if (choose && choose.id) {
this.loading = true;
generateDayRunPlan(choose.id, this.$route.query.group).then(response => {
this.loading = false;
this.reloadTable();
this.loadRunData();
this.doClose();
this.$message.success(`生成用户每日运行图成功`);
}).catch(() => {
this.loading = false;
this.reloadTable();
this.$messageBox(`生成用户每日运行图失败`);
});
} else {
this.$messageBox(`请选择需要加载的运行图`);
}
}
},
loadRunData() {
// const skinCode = this.$route.query.skinCode;
const mapId = this.$route.query.mapId;
this.$store.dispatch('runPlan/clear');
if (mapId) {
getStationList(mapId).then(response => {
const stations = response.data;
getPublishMapInfo(this.$route.query.mapId).then(res=>{
this.PlanConvert = this.$theme.loadPlanConvert(res.data.lineCode);
this.$store.dispatch('runPlan/setStations', stations).then(() => {
getEveryDayRunPlanData(this.$route.query.group).then(resp => {
this.$store.dispatch('runPlan/setPlanData', resp.data);
}).catch(() => {
this.$store.dispatch('runPlan/setPlanData', []);
this.$messageBox(`获取运行图数据失败`);
});
});
});
}).catch(() => {
this.$messageBox(`获取车站列表失败`);
});
}
},
reloadTable() {
this.queryList.reload();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -1,137 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule create-week-plan"
:title="title"
:visible.sync="dialogShow"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-form ref="form" :model="model" :rules="rules" label-width="140px" size="small">
<el-form-item label="运行图名称:" prop="planId">
<el-row>
<el-col :span="19">
<el-input v-model="model.planName" :readonly="true" />
</el-col>
<el-col :span="4" :offset="1">
<el-button @click="handleChoose">选择 </el-button>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="计划日期范围:" prop="dateList">
<el-row>
<el-date-picker
v-model="model.dateList"
type="dates"
:clearable="false"
placeholder="选择一个或多个日期"
value-format="yyyy-MM-dd"
/>
</el-row>
</el-form-item>
</el-form>
</el-row>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="create"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
<choose-template-plan ref="choose" @chooseConfirm="chooseConfirm" />
</el-dialog>
</template>
<script>
import { createRunPlanLoad } from '@/api/runplan';
import ChooseTemplatePlan from './chooseTemplatePlan';
export default {
name: 'CreateWeekPlan',
components: {
ChooseTemplatePlan
},
data() {
return {
dialogShow: false,
loading: false,
model: {
planId: '',
planName: '',
dateList: []
}
};
},
computed: {
title() {
return '创建一周计划';
},
rules() {
const rules = {
planId: [
{ required: true, message: '请选择模板运行图', trigger: 'blur' }
],
dateList: [
{ required: true, message: '请选择计划日期范围', trigger: 'change' }
]
};
return rules;
}
},
mounted() {
},
methods: {
doShow(params) {
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleChoose() {
this.$refs.choose.doShow();
},
chooseConfirm(choose) {
if (choose) {
this.model.planId = choose.id;
this.model.planName = choose.name;
}
},
buildModel() {
return {
planDateList: this.model.dateList,
mapId: this.$route.query.mapId,
templatePlanId: this.model.planId
};
},
create() {
this.$refs['form'].validate((valid) => {
if (valid) {
createRunPlanLoad(this.buildModel()).then(response => {
this.$message.success('创建运行图计划成功');
this.doClose();
}).catch(() => {
this.doClose();
this.$messageBox('创建运行图计划失败');
});
}
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.card-box {
padding-top: 10px;
}
/deep/ {
.el-row {
margin: 10px;
}
}
</style>

View File

@ -1,73 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule delete-task"
:title="title"
:visible.sync="dialogShow"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-radio v-model="type" :label="1">删除以前所有任务包含本任务</el-radio>
</el-row>
<el-row>
<el-radio v-model="type" :label="2">删除以后所有任务包含本任务</el-radio>
</el-row>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
export default {
name: 'DeleteTask',
components: {
},
data() {
return {
dialogShow: false,
loading: false,
tripNumber: '',
serviceNumber: '',
type: '1'
};
},
computed: {
title() {
return '删除任务';
}
},
mounted() {
},
methods: {
doShow(params) {
this.tripNumber = params.tripNumber;
this.serviceNumber = params.serviceNumber;
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleCommit() {
// this.tripNumber
this.doClose();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ {
.el-row {
margin: 10px;
}
}
</style>

View File

@ -1,62 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule create-week-plan"
:title="title"
:visible.sync="dialogShow"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
export default {
name: 'DeleteTodayPlan',
components: {
},
data() {
return {
dialogShow: false,
loading: false
};
},
computed: {
title() {
return '删除当天计划';
}
},
mounted() {
},
methods: {
doShow(params) {
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleCommit() {
// this.tripNumber
this.doClose();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ {
.el-row {
margin: 10px;
}
}
</style>

View File

@ -1,143 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule manage-plan-list"
:title="title"
:visible.sync="dialogShow"
width="80%"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</el-dialog>
</template>
<script>
import { getRunPlanLoadList, deleteRunPlanLoad, listAllTempLateRunPlan } from '@/api/runplan';
import { getPublishMapListOnline } from '@/api/jmap/map';
export default {
name: 'ManagePlanList',
data() {
return {
dialogShow: false,
loading: false,
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '140px',
reset: true
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: this.$t('publish.mapName'),
prop: 'mapId',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['id', 'name']); },
tagType: (row) => { return ''; }
},
{
title: this.$t('publish.runPlanName'),
prop: 'templatePlanId',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.templatePlanId, this.templatePlanList, ['id', 'name']); },
tagType: (row) => { return 'success'; }
},
{
title: '加载日期',
prop: 'loadTime'
},
{
type: 'button',
title: '操作',
width: '100',
buttons: [
{
name: '删除',
handleClick: this.handleDelete,
type: 'danger'
}
]
}
],
actions: [
{ text: '创建', btnCode: 'employee_insert', handler: this.handleCreateRunPlan }
]
},
currentModel: {}
};
},
computed: {
title() {
return '运行图计划表';
}
},
mounted() {
this.loadPageData();
},
methods: {
loadPageData() {
this.mapList = [];
getPublishMapListOnline().then(resp => {
this.mapList = resp.data;
});
this.templatePlanList = [];
listAllTempLateRunPlan().then(resp => {
this.templatePlanList = resp.data;
});
},
queryFunction(params) {
if (this.$route.query.mapId) {
params['mapId'] = this.$route.query.mapId;
}
if (this.$store.state.user.id) {
params['userId'] = this.$store.state.user.id;
}
return getRunPlanLoadList(params);
},
handleDelete(index, row) {
this.$confirm('此操作将删除次日加载的运行图, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteRunPlanLoad(row.id).then(response => {
this.$message.success('删除成功');
this.reloadTable();
}).catch(() => {
this.reloadTable();
this.$messageBox('删除失败');
});
}).catch(() => { });
},
handleCreateRunPlan() {
this.$emit('dispatchDialog', { name: 'createWeekPlan' });
},
doShow() {
this.dialogShow = true;
this.$nextTick(()=> { this.reloadTable(); });
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
reloadTable() {
this.queryList.reload();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -1,177 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule edit-planning-train"
:title="title"
:visible.sync="dialogShow"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :offset="10">列车线路</el-col>
</el-row>
<el-row>
<el-col :span="17">
<el-table :data="serviceData" border style="width: 100%" height="160">
<el-table-column prop="startStationCode" label="起点站" />
<el-table-column prop="startStationStandCode" label="起点站台" />
<el-table-column prop="endStationCode" label="终点站" />
<el-table-column prop="endStationStandCode" label="终点站台" />
</el-table>
</el-col>
<el-col :span="6" :offset="1">
<el-row type="flex" justify="center">
<el-button class="view-button" @click="handleAddTask">加任务</el-button>
</el-row>
<el-row type="flex" justify="center">
<el-button class="view-button" @click="handleReplace">&ensp;&ensp;</el-button>
</el-row>
<el-row type="flex" justify="center">
<el-button class="view-button" @click="handleDeleteTask">删任务</el-button>
</el-row>
<div class="view-box">
<el-row type="flex" justify="center">
<el-radio-group v-model="storeInOut">
<el-radio :label="1">进库</el-radio>
<el-radio :label="2">出库</el-radio>
</el-radio-group>
</el-row>
</div>
</el-col>
</el-row>
<el-row class="view-box">
<el-col :span="9" style="padding-left: 10px">
<el-input v-model="oldServiceNumber" size="small" :disabled="true" />
</el-col>
<el-col :span="9" style="padding-left: 20px">
<el-input v-model="newServiceNumber" size="small" />
</el-col>
<el-col :span="5" style="padding-left: 20px">
<el-button style="width: 150px;" @click="handleModifyingTripNumber">改车次号</el-button>
</el-col>
</el-row>
<el-row style="margin-top: 10px">
<el-col :span="4"><span class="view-label">线路开始时间</span></el-col>
<el-col :span="8">
<el-time-select v-model="serviceStartTime" size="small" />
</el-col>
<el-col :span="4"><span class="view-label">线路结束时间</span></el-col>
<el-col :span="8">
<el-time-select v-model="serviceEndTime" size="small" />
</el-col>
</el-row>
<el-row style="margin-top: 20px">
<el-col :offset="10">线路详细信息</el-col>
</el-row>
<el-row>
<el-table :data="tripData" border style="width: 100%" height="200">
<el-table-column prop="arriveTime" label="到站时间" />
<el-table-column prop="stationCode" label="车站" />
<el-table-column prop="stationStandCode" label="站台" />
<el-table-column prop="stopTime" label="停站时间" />
<el-table-column prop="level" label="运行等级" />
</el-table>
</el-row>
<el-row style="margin-top: 20px">
<el-checkbox v-model="effect">影响后续任务</el-checkbox>
</el-row>
<el-row type="flex" justify="center">
<el-button @click="handleCommit"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
import { formatTime, formatName } from '@/utils/runPlan';
export default {
name: 'ModifyingPlan',
data() {
return {
dialogShow: false,
loading: false,
effect: false,
storeInOut: '1',
oldServiceNumber: '',
newServiceNumber: '',
serviceStartTime: '',
serviceEndTime: '',
serviceData: [],
tripData: []
};
},
computed: {
title() {
return '修改';
}
},
mounted() {
},
methods: {
formatTime(time) {
return formatTime(time);
},
formatName(code) {
return formatName(code);
},
doShow() {
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
//
handleAddTask() {
this.$emit('dispatchDialog', { name: 'addTask', params: {} });
},
//
handleReplace() {
this.$emit('dispatchDialog', { name: 'modifyingTask', params: {} });
},
//
handleDeleteTask() {
this.$emit('dispatchDialog', { name: 'deleteTask', params: {} });
},
//
handleModifyingTripNumber() {
this.$emit('dispatchDialog', { name: 'modifyingTripNumber', params: {} });
},
//
handleCommit() {
this.doClose();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.view-button {
display: list-item;
width: 150px !important;
margin-left: 0px;
}
.view-label {
height: 32px;
line-height: 32px;
}
.view-box {
padding: 10px 0px;
border: 1px inset gray;
border-top: 1px outset gray;
border-left: 1px outset gray;
}
/deep/ {
.el-row {
margin: 5px 20px;
}
}
</style>

View File

@ -1,327 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule add-task"
:title="title"
:visible.sync="dialogShow"
width="1000px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="margin: 10px">
<el-row>
<el-col :span="4">
<el-row>
<el-col :span="9">
<span>车次号</span>
</el-col>
<el-col :span="15">
<el-select v-model="model.tripNumber" style="display: inline-black" placeholder="请选择">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
</el-col>
<el-col :span="2">
<el-row>
<el-col :offset="4">
<el-checkbox v-model="model.trainManual">手工</el-checkbox>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<el-row>
<el-col :span="12">
<span>缺省停站时间</span>
</el-col>
<el-col :span="12">
<el-select v-model="model.time" style="display: inline-black" placeholder="请选择">
<el-option
v-for="item in timeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<el-row>
<el-col :span="9" :offset="2">
<span>表号</span>
</el-col>
<el-col :span="13">
<el-input v-model="model.serviceNumber" />
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<el-row>
<el-col :span="22" :offset="2">
<el-row>
<el-col :span="6">
<el-checkbox v-model="model.clearGuest">清客</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox v-model="model.continuationPlan">延续计划</el-checkbox>
</el-col>
<el-col :span="6">
<el-checkbox v-model="model.firstTrain">首班车</el-checkbox>
</el-col>
</el-row>
</el-col>
</el-row>
</el-col>
</el-row>
<el-row>
<el-col :span="4">
<el-row>
<el-col :span="9">
<span>序列号</span>
</el-col>
<el-col :span="15">
<el-select v-model="model.serialNumber" style="display: inline-black" placeholder="请选择">
<el-option
v-for="item in serialNumberList"
:key="item.value"
:label="item.label"
:value="model.value"
/>
</el-select>
</el-col>
</el-row>
</el-col>
<el-col :span="2">
<el-row>
<el-col :offset="4">
<el-checkbox v-model="model.serialManual">手工</el-checkbox>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<el-row>
<el-col :span="12">
<span>缺省运行等级</span>
</el-col>
<el-col :span="12">
<el-select v-model="model.level" style="display: inline-black" placeholder="请选择">
<el-option
v-for="item in levelList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<el-row>
<el-col :span="9" :offset="2">
<span>开始时间</span>
</el-col>
<el-col :span="13">
<el-time-select v-model="model.startTime" placeholder="选择时间" :clearable="false" />
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<el-row>
<el-col :span="22" :offset="2">
<el-row>
<el-col :span="6">
<el-checkbox v-model="model.inStock">入库</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox v-model="model.outStock">出库</el-checkbox>
</el-col>
<el-col :span="6">
<el-checkbox v-model="model.lastTrain">末班车</el-checkbox>
</el-col>
</el-row>
</el-col>
</el-row>
</el-col>
</el-row>
<el-row style="margin-bottom: 5px;">
交路
</el-row>
<el-row>
<el-table :data="model.route" border :height="140">
<el-table-column prop="beginStationCode" label="起始站">
<template slot-scope="scope">
{{ formatName(scope.row.beginStationCode) }}
</template>
</el-table-column>
<el-table-column prop="beginStationStandCode" label="起始站台" />
<el-table-column prop="endStationCode" label="终到站">
<template slot-scope="scope">
{{ formatName(scope.row.endStationCode) }}
</template>
</el-table-column>
<el-table-column prop="endStationStandCode" label="终到站台" />
<el-table-column prop="describe" label="描述" :width="280" />
<el-table-column :width="40" />
</el-table>
</el-row>
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
详情
</el-row>
<el-row>
<el-table :data="model.detail" border :height="140">
<el-table-column prop="stationCode" label="站台" :width="160">
<template slot-scope="scope">
{{ formatName(scope.row.stationCode) }}
</template>
</el-table-column>
<el-table-column prop="startTime" label="到点">
<template slot-scope="scope">
{{ formatTime(scope.row.startTime) }}
</template>
</el-table-column>
<el-table-column prop="stopTime" label="停站时间">
<template slot-scope="scope">
{{ formatTime(scope.row.stopTime) }}
</template>
</el-table-column>
<el-table-column prop="endTime" label="发点">
<template slot-scope="scope">
{{ formatTime(scope.row.endTime) }}
</template>
</el-table-column>
<el-table-column prop="level" label="运行等级" />
<el-table-column width="280" />
</el-table>
</el-row>
<el-row>
<el-col :offset="16">
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
</el-col>
</el-row>
</div>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
import { formatTime, formatName } from '@/utils/runPlan';
export default {
name: 'ModifyingTask',
components: {
},
data() {
return {
dialogShow: false,
loading: false,
model: {
tripNumber: '',
serialNumber: '',
trainManual: false,
serialManual: false,
clearGuest: false,
continuationPlan: false,
firstTrain: false,
lastTrain: false,
inStock: false,
outStock: false,
startTime: '',
route: [],
detail: []
},
timeList: [],
levelList: [],
tripNumberList: [],
serialNumberList: []
};
},
computed: {
title() {
return '修改任务';
}
},
mounted() {
},
methods: {
formatTime(time) {
return formatTime(time);
},
formatName(code) {
return formatName(code);
},
loadInitData(params) {
this.model.tripNumber = params.tripNumber;
this.model.serviceNumber = params.serviceNumber;
const editData = this.$store.state.runPlan.editData[params.serviceNumber];
if (editData) {
// const tripNumberList = Object.keys(editData.trainMap).sort((a, b) => { return editData.trainMap[a].oldIndex - editData.trainMap[b].oldIndex; });
const trainInfo = editData.trainMap[params.tripNumber];
const lastIndex = trainInfo.stationTimeList.length - 1;
const taskObj = {
tripNumber: params.tripNumber,
beginStationCode: trainInfo.stationTimeList[0].stationCode,
beginStationStandCode: '',
endStationCode: trainInfo.stationTimeList[lastIndex].stationCode,
endStationStandCode: ''
};
this.model.route.push(taskObj);
trainInfo.stationTimeList.forEach((elem, index) => {
const stationObj = {
stationCode: elem.stationCode,
startTime: index == 0 ? null : trainInfo.stationTimeList[index - 1].secondTime,
stopTime: index == 0 ? null : elem.secondTime - trainInfo.stationTimeList[index - 1].secondTime,
endTime: elem.secondTime,
level: ''
};
this.model.detail.push(stationObj);
});
}
},
doShow(params) {
this.loadInitData(params);
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleCommit() {
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ {
.el-button {
margin-left: 40px !important;
margin-right: 40px !important;
}
.el-row {
margin-bottom: 5px !important;
}
.el-input__inner {
height: 20px !important;
line-height: 20px !important;
}
.el-input {
width: 110px !important;
}
}
</style>

View File

@ -14,6 +14,9 @@ class Model {
this['private'][deviceType.StationControl] = {
indicatorShow: true // 标识灯名称显示
};
this['private'][deviceType.Station] = {
kmPostShow: true // 公里标显示
};
this['private'][deviceType.Switch] = {
nameShow: true
};

View File

@ -1,403 +0,0 @@
<template>
<div class="plan-schedule" style="width: 100%">
<title-bar ref="titleBar" @back="back" />
<menu-bar ref="menuBar" :line-code="lineCode" @dispatchDialog="dispatchDialog" />
<schedule ref="schedule" :group="group" :line-code="lineCode" :max-height="height" :max-width="width" />
<status-bar ref="statusBar" :max-top="height" @setPosition="setPosition" />
<manage-plan-list ref="managePlanList" @dispatchDialog="dispatchDialog" />
<create-week-plan ref="createWeekPlan" @reloadTable="reloadTable" />
<create-today-plan ref="createTodayPlan" />
<modifying-plan ref="modifyingPlan" @dispatchDialog="dispatchDialog" />
<add-task ref="addTask" />
<delete-task ref="deleteTask" />
<modifying-task ref="modifyingTask" />
</div>
</template>
<script>
import TitleBar from './titleBar';
import MenuBar from './menuBar';
import StatusBar from './statusBar';
import Schedule from './schedule';
import ManagePlanList from '../menusPlan/managePlanList';
import CreateWeekPlan from '../menusPlan/createWeekPlan';
import CreateTodayPlan from '../menusPlan/createTodayPlan';
import ModifyingPlan from '../menusPlan/modifyingPlan';
import AddTask from '../menusPlan/addTask';
import DeleteTask from '../menusPlan/deleteTask';
import ModifyingTask from '../menusPlan/modifyingTask';
export default {
name: 'Menus',
components: {
TitleBar,
MenuBar,
StatusBar,
Schedule,
ManagePlanList,
CreateWeekPlan,
CreateTodayPlan,
ModifyingPlan,
AddTask,
DeleteTask,
ModifyingTask
},
props: {
group: {
type: String,
required: true
}
},
data() {
return {
};
},
computed: {
lineCode() {
return this.$route.query.lineCode || '02';
},
width() {
return this.$store.state.app.width;
},
height() {
return this.$store.state.app.height;
}
},
methods: {
setPosition() {
this.$nextTick(() => {
this.$refs.schedule.setPosition();
});
},
dispatchDialog(dialogObj) {
this.$nextTick(() => {
if (this.$refs[dialogObj.name]) {
this.$refs[dialogObj.name].doShow(dialogObj.params);
}
});
},
reloadTable(dialogObj) {
if (this.$refs[dialogObj.name]) {
this.$refs[dialogObj.name].reloadTable();
}
},
confirm(params) {
},
back() {
this.$emit('back');
}
}
};
</script>
<style>
.plan-schedule {
position: absolute;
background: gray;
}
.plan-schedule .pop-menu {
background: #F0F0F0;
}
.plan-schedule .pop-menu span {
color: #000;
}
.plan-schedule .system-close {
cursor: pointer;
position: absolute;
right: 0px;
background: -webkit-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -o-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -moz-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid white;
border-radius: 4px;
}
.plan-schedule .system-close::before {
position: absolute;
height: 22px;
line-height: 22px;
top: 0px;
left: 0px;
font-size: x-large;
}
.plan-schedule .pop-menu .is-disabled span {
color: #B4B3B8;
}
.beijing-01__schedule {
overflow: hidden !important;
}
.beijing-01__schedule .el-dialog {
background: rgba(0, 85, 231, 1);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
border: 2px solid #727375;
border-radius: 4px;
color: #000;
font-size: 14px;
}
.beijing-01__schedule .el-dialog .el-dialog__header {
height: 30px;
padding: 5px;
}
.beijing-01__schedule .el-dialog .el-dialog__footer {
background: #ECE9D8;
opacity: 1;
}
.beijing-01__schedule .el-dialog .el-dialog__body {
padding-top: 10px;
padding-bottom: 10px;
padding-left: 5px;
padding-right: 5px;
margin: 0px 3px 3px 3px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
color: #000;
background: #ECE9D8;
opacity: 1;
}
.beijing-01__schedule .el-dialog .el-dialog__title {
font-size: 16px;
}
.beijing-01__schedule .el-dialog .el-dialog__headerbtn {
background: -webkit-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -o-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -moz-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid white;
border-radius: 4px;
top: 0px;
right: 3px;
line-height: 26px;
width: 26px;
}
.beijing-01__schedule .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.beijing-01__schedule .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.beijing-01__schedule .el-dialog .el-form {
background: #ECE9D8 !important;
}
.beijing-01__schedule .el-dialog .el-card {
background: #ECE9D8 !important;
}
.beijing-01__schedule .el-dialog .el-button {
height: 32px;
line-height: 32px;
padding: 0px;
width: 80px;
border: 2px outset #E2E2E2;
border-radius: 0px !important;
color: #000;
background: #ECE9D8;
}
.beijing-01__schedule .el-dialog .expand {
width: 120px;
}
.beijing-01__schedule .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.beijing-01__schedule .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.beijing-01__schedule .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.beijing-01__schedule .el-dialog .el-button:disabled span {
border: 0px;
}
.beijing-01__schedule .el-dialog .button-group {
margin: 0px 5px;
text-align: center !important;
}
.beijing-01__schedule .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.beijing-01__schedule .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.beijing-01__schedule .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.beijing-01__schedule .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.beijing-01__schedule .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.beijing-01__schedule .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.beijing-01__schedule .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.beijing-01__schedule .el-dialog .el-table .cell {
line-height: unset !important;
}
.beijing-01__schedule .el-dialog .el-table th.is-leaf {
background: #ECE9D8 !important;
border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.beijing-01__schedule .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.beijing-01__schedule .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.beijing-01__schedule .el-dialog .current-row>td {
background: #316AC5 !important;
color: #fff !important;
}
.beijing-01__schedule .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.beijing-01__schedule .el-dialog .el-checkbox__label {
color: #000 !important;
}
.beijing-01__schedule .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.beijing-01__schedule .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.beijing-01__schedule .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.beijing-01__schedule .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
position: absolute;
-webkit-box-sizing: content-box;
box-sizing: content-box;
content: "";
border: 1px solid #000;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
top: 1px;
}
.beijing-01__schedule .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.beijing-01__schedule .el-dialog .el-radio__label {
color: #000 !important;
}
.beijing-01__schedule .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.beijing-01__schedule .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
width: 4px;
height: 4px;
border-radius: 100%;
background-color: #000 !important;
position: absolute;
left: 50%;
top: 50%;
}
.beijing-01__schedule .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.beijing-01__schedule .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.beijing-01__schedule .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -15px;
top: -18px;
}
.beijing-01__schedule .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.beijing-01__schedule .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.beijing-01__schedule .el-dialog .table {
margin-top: 10px;
}
.beijing-01__schedule .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.beijing-01__schedule .el-dialog .button-group {
margin-top: 10px;
}
.beijing-01__schedule .el-dialog .el-tree__empty-block {
background: #E9E9E9 !important;
color: #000 !important;
}
</style>

View File

@ -1,514 +0,0 @@
<template>
<div id="PlanMenuBar">
<div class="nav">
<template v-for="(item,i) in menu">
<template v-if="noShowingChildren(item.children)">
<li class="nav-li" @click="hookClick(item)">
<span class="nav-li-text">{{ item.title }}</span>
</li>
</template>
<template v-else>
<li class="nav-li" @click.stop="popupMenuA(item, i)">
<span class="nav-li-text">{{ item.title }}</span>
<ul class="nav-ul" :class="{'active' :i==classA}">
<template v-for="(child,j) in item.children">
<template
v-if="child.children&&child.children.length>0&&hasShowingChildren(child.children)"
>
<li v-if="child.type === 'separator'" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li v-else-if="child.type === 'file'" class="menu-li">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<el-button type="text" class="button" :disabled="child.disabled">
<input
:ref="child.label"
type="file"
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
@change="openLoadFile(child)"
>
{{ child.title }}
</el-button>
</span>
</div>
</li>
<li v-else class="menu-li" @click.stop="popupMenuB(child, j)">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
<ul class="menu-ul" :class="{'active' :j==classB}">
<template v-for="(grandchild,k) in child.children">
<li v-if="grandchild.type === 'separator'" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li v-else-if="grandchild.type === 'file'" class="menu-li">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<el-button
type="text"
class="button"
:disabled="grandchild.disabled"
>
<input
:ref="grandchild.label"
type="file"
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
@change="openLoadFile(grandchild)"
>
{{ grandchild.title }}
</el-button>
</span>
</div>
</li>
<li v-else class="menu-li" @click.stop="hookClick(grandchild)">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ grandchild.title }}</span>
</span>
</div>
</li>
</template>
</ul>
</li>
</template>
<template v-else>
<li v-if="child.type === 'separator'" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li v-else-if="child.type === 'file'" class="menu-li">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<el-button type="text" class="button" :disabled="child.disabled">
<input
:ref="child.title"
type="file"
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
@change="openLoadFile(child)"
>
{{ child.title }}
</el-button>
</span>
</div>
</li>
<li v-else class="menu-li" @click.stop="hookClick(child)">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
</li>
</template>
</template>
</ul>
</li>
</template>
</template>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'PlanMenuBar',
props: {
lineCode: {
type: String,
required: true
}
},
data() {
return {
classA: -1,
classB: -1,
tempClassA: -1,
tempClassB: -1,
menu: [
{
title: '文件F',
children: [
]
},
{
title: '显示V',
children: [
// {
// title: '',
// },
// {
// title: '',
// },
// {
// title: ''
// }
]
},
{
title: '编辑E',
children: [
// {
// title: '',
// click: this.handleEditPlanningTrain
// },
// {
// title: '',
// click: this.handleAddTask
// },
// {
// title: '',
// click: this.handleDeleteTask
// },
// {
// title: '',
// click: this.handleModifyingPlanId
// },
// {
// title: '',
// click: this.handleTranslationalMulTrain
// }
]
},
{
title: '工具T',
children: [
{
title: '查看计划列表',
click: this.handleViewPlanSchedule
},
{
title: '创建一周计划',
click: this.handleCreateWeekPlan
},
{
title: '加载当天计划',
click: this.handleReloadTodayPlan
}
// {
// title: '',
// click: this.handleValidityCheck
// }
]
},
{
title: '帮助H',
children: [
]
}
]
};
},
computed: {
...mapGetters('training', [
'mode'
]),
...mapGetters('map', [
'stationList'
])
},
watch: {
tempClassA() {
this.classA = this.$store.state.menuOperation.break ? -1 : this.tempClassA;
},
tempClassB() {
this.classB = this.$store.state.menuOperation.break ? -1 : this.tempClassB;
},
'$store.state.menuOperation.break': function (val) {
if (val) {
this.classA = this.classB = -1;
} else {
this.classA = this.tempClassA;
this.classB = this.tempClassB;
}
}
},
mounted() {
this.initMenu();
},
methods: {
initMenu() {
this.clickEvent();
this.closeMenu();
},
clickEvent() {
const self = this;
window.onclick = function (e) {
self.closeMenu(false);
};
},
noShowingChildren(children) {
if (!children || children.length <= 0) {
return true;
}
return false;
},
hasShowingChildren(children) {
if (children && children.length > 0) {
return true;
}
return false;
},
closeMenu() {
this.classA = this.tempClassA = -1;
this.classB = this.tempClassB = -1;
},
hookClick(item, event) {
this.closeMenu();
setTimeout(() => {
if (item && typeof item.click == 'function') {
item.click();
}
}, 500);
},
popupMenuA(item, index) {
this.clickEvent();
this.tempClassA = index;
this.tempClassB = -1;
},
popupMenuB(item, index) {
this.tempClassB = index;
},
openLoadFile(item) {
const obj = this.$refs[item.title][0];
if (obj.files) {
const file = obj.files[0];
item.click(file);
obj.value = '';
}
},
doClose() {
this.$nextTick(() => {
EventBus.$emit('closeMenu');
});
},
//
refresh() {
this.closeMenu(true);
EventBus.$emit('refresh');
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
//
handleEditPlanningTrain() {
this.$emit('dispatchDialog', { name: 'modifyingPlan' });
},
//
handleAddTask() {
const params = this.$store.state.runPlan.selected;
this.$emit('dispatchDialog', { name: 'addTask', params });
},
//
handleDeleteTask() {
const params = this.$store.state.runPlan.selected;
this.$emit('dispatchDialog', { name: 'deleteTask', params });
},
//
handleModifyingTask() {
const params = this.$store.state.runPlan.selected;
this.$emit('dispatchDialog', { name: 'modifyingTask', params });
},
//
handleModifyingPlanId() {
this.$emit('dispatchDialog', { name: 'modifyingPlanId' });
},
//
handleTranslationalMulTrain() {
this.$emit('dispatchDialog', { name: 'translationalMulTrain' });
},
//
handleViewPlanSchedule() {
this.$emit('dispatchDialog', { name: 'managePlanList' });
},
//
handleCreateWeekPlan() {
this.$emit('dispatchDialog', { name: 'createWeekPlan' });
},
//
handleReloadTodayPlan() {
this.$emit('dispatchDialog', { name: 'createTodayPlan' });
},
//
handleValidityCheck() {
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$top: 25px;
$width: 30px;
$height: 20px;
$menuPadding: 10px;
$menuItemHeight: 30px;
$menuItemWidth: 160px;
$menuItemPadding: 5px;
#PlanMenuBar {
z-index: 10;
position: absolute;
top: $top;
width: 100%;
height: $height;
line-height: $height;
}
.nav {
display: block;
cursor: pointer;
color: #0000;
background: #EBEADB;
list-style: none;
border: 1px solid #B6BCCC !important;
}
.nav-li {
position: relative;
display: inline-block;
padding-left: $menuPadding;
padding-right: $menuPadding;
}
.nav-li:active {
background: #C9D0E1;
border-radius: 4px;
}
.nav-li-text {
font-size: 13px;
color: #000;
text-align: center;
text-decoration: none;
}
.nav-ul {
display: none;
position: absolute;
list-style: none;
border: 1px solid gray;
width: $menuItemWidth;
padding: 0px;
margin: 0px;
}
.menu-ul {
display: none;
list-style: none;
background: #F0F0F0;
line-height: $menuItemHeight;
width: $menuItemWidth;
bottom: $menuItemHeight;
}
.active {
position: absolute;
display: block !important;
}
.menu-ul-text {
font-size: 14px;
color: #000;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
border-left: 1px solid #000;
border-right: 1px solid #000;
}
.menu-separator {
text-align: left;
background: #F0F0F0;
height: 2px;
line-height: 2px;
}
.menu-separator .status {
display: inline-block;
border-right: 1px inset #CACACA;
width: $width;
height: 100%;
background: #EFECDE;
}
.menu-separator .separator {
display: inline-block;
background: #CACACA;
margin-left: 5px;
height: 2px;
width: $menuItemWidth - $width - 30px;
}
.menu-li {
text-align: left;
background: #F0F0F0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-block {
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-text {
font-size: 14px;
color: #000;
}
.menu-li-text .status {
display: inline-block;
border-right: 1px inset #CACACA;
width: $width;
background: #EFECDE;
}
.menu-li-text .label {
display: inline-block;
margin-left: 5px;
}
.menu-li-text .button {
position: relative;
overflow: hidden;
margin-left: 10px;
line-height: 0px;
width: $menuItemWidth - $width;
top: -$menuItemHeight;
color: #000;
cursor: pointer;
input {
opacity: 0;
cursor: pointer;
position: absolute;
top: 0px;
width: $menuItemWidth - $width - 10px;
}
}
.menu-li-block:hover {
background: #C9DEF7;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
</style>

View File

@ -1,172 +0,0 @@
<template>
<div id="PlanMenuTool">
<div class="nav">
<div class="tool" v-for="(item,index) in tools" :key="index">
<img :src="item.src" :alt="item.title" />
</div>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { prefixIntrger } from '@/utils/date';
import logo_ from '@/assets/logo_.png';
export default {
name: 'PlanMenuTool',
data() {
return {
tools: [
{
title: '服务器1',
operate: '',
src: logo_,
click: this.undeveloped,
},
{
title: '服务器2',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '前置机1',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '前置机2',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '主调',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '调度台1',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '调度台2',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '调度台3',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '大屏',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '维护工作站',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '运行图显示人工站',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '跳停',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '扣车',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '列车报警',
operate: '',
src: logo_,
click: this.undeveloped,
}
]
}
},
watch: {
'$store.state.training.initTime': function (initTime) {
let date = new Date(initTime);
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`
}
},
computed: {
isShowSystemTime() {
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
}
},
mounted() {
this.initTools();
},
methods: {
initTools() {
this.tools = [];
}
}
}
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
$top: 48px;
$width: 25px;
$height: 25px;
#PlanMenuTool {
z-index: 5;
position: absolute;
width: 100%;
top: $top;
}
.nav {
display: block;
color: #0000;
background: #EBEADB;
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
height: $height;
line-height: $height;
}
.tool {
padding-left: 10px;
display: flex;
justify-content: center;
cursor: pointer;
position: relative;
float: left;
margin: 1px;
width: $width;
img {
display: block;
text-align: center;
padding-top: 2px;
height: $height - 5;
width: $width - 5;
}
}
</style>

View File

@ -1,468 +0,0 @@
<template>
<div id="PlanSchedule" :style="{top: top+'px', height: height+'px'}">
<div class="left">
<div :id="runPlanId" />
</div>
<div class="right">
<data-table
ref="serviceTable"
:height="height/2"
:config="serviceNumberConfig"
:style="{top: top-height/2+'px'}"
@touch="scheduleTouch"
/>
<data-table
ref="tripTable"
:height="height/2"
:config="tripNumberConfig"
:style="{top: top-height/2+'px'}"
@touch="trainNumTouch"
/>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date';
import {toTimeStamp, formatDuring} from '@/utils/date';
import DataTable from '../menusPlan/components/dataTable';
import echarts from 'echarts';
export default {
name: 'PlanSchedule',
components: {
DataTable
},
props: {
group: {
type: String,
required: true
},
lineCode: {
type: String,
required: true
},
maxWidth: {
type: Number,
require: true
},
maxHeight: {
type: Number,
required: true
}
},
data() {
return {
top: 0,
height: 0,
heights: [100, 100],
runPlanId: 'plan-schedule-id',
myChart: null,
PlanConvert: {},
serviceNumberConfig: {
data: [],
highlightCurrentRow: true,
handleChange: this.serviceNumberChange,
showClose: false,
columns: [
{
prop: 'serviceNumber',
label: '表号'
},
{
width: 40
}
]
},
tripNumberConfig: {
data: [],
highlightCurrentRow: true,
handleChange: this.tripNumberChange,
showClose: false,
columns: [
{
prop: 'tripNumber',
label: '车次号'
},
{
width: 40
}
]
},
realData: {},
kmRangeCoordMap: {},
option: {
title: {
text: '',
left: 'center'
},
grid: {
top: '30px',
left: '120px',
right: '40px',
bottom: '65px',
containLabel: true,
backgroundColor: 'floralwhite'
},
toolbox: {
// right: '30px',
// feature: {
// dataZoom: {
// yAxisIndex: 'none'
// },
// restore: {},
// saveAsImage: {}
// }
},
tooltip: {
axisPointer: {
trigger: 'item',
type: 'cross'
},
formatter: this.axisTooltip,
borderWidth: 1
},
xAxis: [
{
type: 'category',
boundaryGap: false,
data: [],
axisLine: {
onZero: false,
lineStyle: {
width: 2,
color: '#d14a61'
}
},
axisLabel: {
formatter: this.xAxisLableFormat,
textStyle: {
color: '#333'
}
},
axisPointer: {
snap: true,
label: {
formatter: this.xAxisPointFormat,
backgroundColor: 'rgb(255,0,0,0.5)',
color: 'white'
}
}
}
],
yAxis: {
type: 'value',
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
onZero: false,
lineStyle: {
width: 2,
color: '#d14a61'
}
},
axisLabel: {
interval: 'auto',
formatter: this.yAxisLableFormat
},
axisPointer: {
xAxisIndex: 'all',
label: {
formatter: this.yAxisPointFormat,
backgroundColor: 'rgb(0,100,0,0.5)',
color: 'white'
}
},
min: 0,
max: 0
},
series: [],
dataZoom: [
{
type: 'inside'
},
{
fiterMode: 'filter',
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
handleSize: '80%',
handleStyle: {
color: '#fff',
shadowBlur: 3,
shadowColor: 'rgba(0, 0, 0, 0.6)',
shadowOffsetX: 2,
shadowOffsetY: 2
},
bottom: '20px'
}
]
},
absoluteTime: 2 * 3600,
indexKmRangeMap: {}
};
},
computed: {
...mapGetters('runPlan', [
'stations'
])
},
watch: {
maxWidth() {
this.setPosition();
},
maxHeight() {
this.setPosition();
},
'$store.state.runPlan.planLoadedCount': async function () {
await this.loadChartPage();
},
'$store.state.runPlan.planSizeCount': function () {
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
},
'$store.state.runPlan.selected.serviceNumber': function (val) {
const index = this.serviceNumberConfig.data.findIndex(elem => {
return elem.serviceNumber == val;
});
this.$refs.serviceTable.setCurrentRow(this.serviceNumberConfig.data[index]);
},
'$store.state.runPlan.selected.tripNumber': function (val) {
const index = this.tripNumberConfig.data.findIndex(elem => {
return elem.tripNumber == val;
});
this.$refs.tripTable.setCurrentRow(this.tripNumberConfig.data[index]);
}
},
mounted() {
this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
},
beforeDestroy() {
this.destroy();
},
methods: {
serviceNumberChange(row) {
if (row) {
this.$store.dispatch('runPlan/setSelected', { serviceNumber: row.serviceNumber, tripNumber: null });
const serviceObj = this.$store.state.runPlan.editData[row.serviceNumber];
if (serviceObj) {
this.analyticalTripNumber(serviceObj.trainMap);
}
}
},
tripNumberChange(row) {
if (row) {
this.$store.dispatch('runPlan/setSelected', { serviceNumber: this.$store.state.runPlan.selected.serviceNumber, tripNumber: row.tripNumber });
}
},
async analyticalServiceNumber(data) {
this.serviceNumberConfig.data = Object.keys(data || {})
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
.map(serviceNumber => { return { serviceNumber }; });
},
async analyticalTripNumber(data) {
this.tripNumberConfig.data = Object.keys(data || {})
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
.map(tripNumber => { return { tripNumber }; });
},
async setPosition() {
this.$nextTick(() => {
let top = 3;
const width = this.maxWidth * 0.85;
let height = this.maxHeight;
const titleBar = document.getElementById('PlanTitleBar');
const menuBar = document.getElementById('PlanMenuBar');
const menuTool = document.getElementById('PlanMenuTool');
const statusBar = document.getElementById('PlanStatusBar');
if (titleBar) {
top += (titleBar.offsetHeight || 0);
}
if (menuBar) {
top += (menuBar.offsetHeight || 0);
}
if (menuTool) {
top += (menuTool.offsetHeight || 0);
}
if (statusBar) {
height -= (statusBar.offsetHeight || 0);
}
height = height - top;
this.$store.dispatch('runPlan/resize', { width, height });
if (this.top != top) {
this.top = top;
}
if (this.height != height) {
this.height = height - 20 * 2;
}
});
},
async loadChartPage() {
try {
let series = [];
const stations = this.$store.state.runPlan.stations;
const planData = this.$store.state.runPlan.planData;
this.viewDisabled = true;
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
series = this.pushModels(series, [this.PlanConvert.initializeYaxis(stations)]);
series = this.pushModels(series, this.PlanConvert.convertDataToModels(planData, stations, this.kmRangeCoordMap, { color: '#000', width: 0.5 }));
await this.loadInitData(series);
await this.analyticalServiceNumber(this.$store.state.runPlan.editData);
this.viewDisabled = false;
} catch (error) {
this.viewDisabled = false;
this.$messageBox(`加载运行图数据失败`);
}
},
async loadInitData(series) {
this.myChart && this.myChart.showLoading();
await this.xAxisInit();
await this.yAxisInit();
await this.loadInitChart(series);
this.myChart && this.myChart.hideLoading();
},
pushModels(series, models) {
if (models && models.length) {
models.forEach(elem => {
if (elem) {
series.push(elem);
}
});
}
return series;
},
loadInitChart(series) {
return new Promise((resolve, reject) => {
try {
this.destroy();
let startValue = 3600 + this.PlanConvert.TranslationTime;
const offsetTime = 3600;
const initTime = toTimeStamp(formatDuring(this.$store.state.training.initTime));
startValue = initTime - this.PlanConvert.TranslationTime;
this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = startValue - offsetTime;
this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = startValue + offsetTime;
this.option.series = series;
this.myChart = echarts.init(document.getElementById(this.runPlanId));
if (this.myChart) {
this.myChart.setOption(this.option);
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
this.myChart.on('click', this.mouseClick);
}
resolve(true);
} catch (error) {
reject(error);
}
});
},
xAxisPointFormat(params) {
return timeFormat(params.value);
},
yAxisPointFormat(params) {
return this.PlanConvert.computedFormatYAxis(this.stations, params);
},
xAxisLableFormat(value, index) {
if (value % 60 === 0) {
return timeFormat(value);
}
},
yAxisLableFormat(value, index) {
return '';
},
xAxisInit() {
const list = [];
for (var time = 0 + this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) {
list.push(time);
}
const startValue = 3600 * 6;
const offsetTime = 3600 * 1;
this.option.xAxis[0].data = list;
if (!this.option.dataZoom[0].startValue) {
this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = startValue - offsetTime;
}
if (!this.option.dataZoom[0].endValue) {
this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = startValue + offsetTime;
}
},
yAxisInit() {
if (Object.keys(this.PlanConvert).length) {
this.option.yAxis.min = this.PlanConvert.computedYaxisMinValue(this.stations);
this.option.yAxis.max = this.PlanConvert.computedYaxisMaxValue(this.stations);
}
},
axisTooltip(param) {
const station = this.stations[Math.floor((param.data[1] - this.PlanConvert.EdgeHeight) / this.PlanConvert.CoordMultiple)] || { name: '', kmRange: '' };
return [
`Point Data <hr size=1 style=" margin: 3px 0">`,
`车站名称: ${station.name}<br>`,
`车站公里标: ${station.kmRange} km <br>`,
`到站时间: ${timeFormat(param.data[0] + this.PlanConvert.TranslationTime)} (${param.data[0]})<br>`
].join('');
},
mouseClick(params) {
const model = {
serviceNumber: params.seriesName
};
this.$store.dispatch('runPlan/setSelected', model);
},
reSize(opt) {
if (this.myChart) {
this.myChart.resize({
width: opt.width,
height: opt.height,
silent: false
});
}
},
destroy() {
if (this.myChart && this.myChart.isDisposed) {
this.myChart.dispose();
this.myChart = null;
}
},
scheduleTouch() {
},
trainNumTouch() {
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
#PlanSchedule {
z-index: 5;
position: absolute;
width: 100%;
.left {
height: 100%;
width: 85%;
float: left;
}
.right {
height: 100%;
width: 15%;
float: right;
}
}
</style>

View File

@ -1,107 +0,0 @@
<template>
<data-table
id="PlanStatusBar"
ref="dataTable"
:height="height-11"
:config="stationListConfig"
:close="false"
:style="{top: maxmini? maxTop-110+'px':maxTop-21+'px'}"
@touch="touch"
/>
</template>
<script>
import DataTable from '../menusPlan/components/dataTable';
import { formatTime, formatName } from '@/utils/runPlan';
export default {
name: 'PlanStatusBar',
components: {
DataTable
},
props: {
maxTop: {
type: Number,
required: true
}
},
data() {
return {
maxmini: true,
height: 100,
stationListConfig: {
data: [],
showClose: true,
highlightCurrentRow: true,
columns: [
{
prop: 'stationName',
label: '站台',
width: 400
},
{
prop: 'startTime',
label: '到点'
},
{
prop: 'stopTime',
label: '停站时间'
},
{
prop: 'endTime',
label: '发点'
},
{
prop: 'level',
label: '运行等级'
}
]
}
};
},
watch: {
'$store.state.runPlan.selected': function (select) {
this.stationListConfig.data = [];
const serviceObj = this.$store.state.runPlan.editData[select.serviceNumber];
if (serviceObj) {
const trainMap = serviceObj.trainMap;
if (trainMap) {
const trainObj = trainMap[select.tripNumber];
if (trainObj) {
const stationTimeList = trainObj.stationTimeList;
if (stationTimeList && stationTimeList.length) {
stationTimeList.forEach((elem, index) => {
const stationObj = {
stationName: formatName(elem.stationCode),
startTime: formatTime(index == 0 ? null : stationTimeList[index - 1].secondTime),
stopTime: formatTime(index == 0 ? null : elem.secondTime - stationTimeList[index - 1].secondTime),
endTime: formatTime(elem.secondTime),
level: ''
};
this.stationListConfig.data.push(stationObj);
});
}
}
}
}
}
},
methods: {
touch(maxmini) {
this.maxmini = maxmini;
this.$emit('setPosition');
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
#PlanStatusBar {
z-index: 5;
position: absolute;
width: 100%;
}
</style>

View File

@ -1,75 +0,0 @@
<template>
<div id="PlanTitleBar">
<img class="logo" :src="logoImg" />
<span> {{mapName}} &ensp;</span>
<span v-if="runPlanName">({{runPlanName}})</span>
<span class="system-close el-icon-close" @click="back"></span>
</div>
</template>
<script>
import logo_ from '@/assets/logo_.png';
import { getPublishMapInfo } from '@/api/jmap/map';
export default {
name: 'PlanTitleBar',
data() {
return {
mapName: '',
logoImg: logo_
}
},
computed: {
runPlanName() {
return this.$route.query.planName || '';
}
},
mounted() {
if (this.$route.query.mapId) {
getPublishMapInfo(this.$route.query.mapId).then(resp => {
this.mapName = resp.data.name;
})
}
},
methods: {
back() {
this.$emit('back');
}
}
}
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
$width: 25px;
$height: 25px;
#PlanTitleBar {
z-index: 10;
display: flex;
position: absolute;
width: 100%;
height: $height;
line-height: $height;
background: -webkit-linear-gradient(#0055E8, #0099F8);
background: -o-linear-gradient(#0055E8, #0099F8);
background: -moz-linear-gradient(#0055E8, #0099F8);
background: linear-gradient(#0055E8, #0099F8);
color: white;
font: bold;
font-size: 16px;
.logo {
display: inline-block;
width: $width;
height: $height;
padding-right: 5px;
}
.system-close {
width: 25px;
height: 25px;
position: absolute;
right: 1px;
}
}
</style>

View File

@ -14,6 +14,9 @@ class Model {
this['private'][deviceType.StationControl] = {
indicatorShow: true // 标识灯名称显示
};
this['private'][deviceType.Station] = {
kmPostShow: true // 公里标显示
};
this['private'][deviceType.Switch] = {
nameShow: true
};

View File

@ -1,403 +0,0 @@
<template>
<div class="plan-schedule" style="width: 100%">
<title-bar ref="titleBar" @back="back" />
<menu-bar ref="menuBar" :line-code="lineCode" @dispatchDialog="dispatchDialog" />
<schedule ref="schedule" :group="group" :line-code="lineCode" :max-height="height" :max-width="width" />
<status-bar ref="statusBar" :max-top="height" @setPosition="setPosition" />
<manage-plan-list ref="managePlanList" @dispatchDialog="dispatchDialog" />
<create-week-plan ref="createWeekPlan" @reloadTable="reloadTable" />
<create-today-plan ref="createTodayPlan" />
<modifying-plan ref="modifyingPlan" @dispatchDialog="dispatchDialog" />
<add-task ref="addTask" />
<delete-task ref="deleteTask" />
<modifying-task ref="modifyingTask" />
</div>
</template>
<script>
import TitleBar from './titleBar';
import MenuBar from './menuBar';
import StatusBar from './statusBar';
import Schedule from './schedule';
import ManagePlanList from '../menusPlan/managePlanList';
import CreateWeekPlan from '../menusPlan/createWeekPlan';
import CreateTodayPlan from '../menusPlan/createTodayPlan';
import ModifyingPlan from '../menusPlan/modifyingPlan';
import AddTask from '../menusPlan/addTask';
import DeleteTask from '../menusPlan/deleteTask';
import ModifyingTask from '../menusPlan/modifyingTask';
export default {
name: 'Menus',
components: {
TitleBar,
MenuBar,
StatusBar,
Schedule,
ManagePlanList,
CreateWeekPlan,
CreateTodayPlan,
ModifyingPlan,
AddTask,
DeleteTask,
ModifyingTask
},
props: {
group: {
type: String,
required: true
}
},
data() {
return {
};
},
computed: {
skinCode() {
return this.$route.query.skinCode || '02';
},
width() {
return this.$store.state.app.width;
},
height() {
return this.$store.state.app.height;
}
},
methods: {
setPosition() {
this.$nextTick(() => {
this.$refs.schedule.setPosition();
});
},
dispatchDialog(dialogObj) {
this.$nextTick(() => {
if (this.$refs[dialogObj.name]) {
this.$refs[dialogObj.name].doShow(dialogObj.params);
}
});
},
reloadTable(dialogObj) {
if (this.$refs[dialogObj.name]) {
this.$refs[dialogObj.name].reloadTable();
}
},
confirm(params) {
},
back() {
this.$emit('back');
}
}
};
</script>
<style>
.plan-schedule {
position: absolute;
background: gray;
}
.plan-schedule .pop-menu {
background: #F0F0F0;
}
.plan-schedule .pop-menu span {
color: #000;
}
.plan-schedule .system-close {
cursor: pointer;
position: absolute;
right: 0px;
background: -webkit-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -o-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -moz-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid white;
border-radius: 4px;
}
.plan-schedule .system-close::before {
position: absolute;
height: 22px;
line-height: 22px;
top: 0px;
left: 0px;
font-size: x-large;
}
.plan-schedule .pop-menu .is-disabled span {
color: #B4B3B8;
}
.beijing-01__schedule {
overflow: hidden !important;
}
.beijing-01__schedule .el-dialog {
background: rgba(0, 85, 231, 1);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
border: 2px solid #727375;
border-radius: 4px;
color: #000;
font-size: 14px;
}
.beijing-01__schedule .el-dialog .el-dialog__header {
height: 30px;
padding: 5px;
}
.beijing-01__schedule .el-dialog .el-dialog__footer {
background: #ECE9D8;
opacity: 1;
}
.beijing-01__schedule .el-dialog .el-dialog__body {
padding-top: 10px;
padding-bottom: 10px;
padding-left: 5px;
padding-right: 5px;
margin: 0px 3px 3px 3px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
color: #000;
background: #ECE9D8;
opacity: 1;
}
.beijing-01__schedule .el-dialog .el-dialog__title {
font-size: 16px;
}
.beijing-01__schedule .el-dialog .el-dialog__headerbtn {
background: -webkit-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -o-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -moz-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid white;
border-radius: 4px;
top: 0px;
right: 3px;
line-height: 26px;
width: 26px;
}
.beijing-01__schedule .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.beijing-01__schedule .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.beijing-01__schedule .el-dialog .el-form {
background: #ECE9D8 !important;
}
.beijing-01__schedule .el-dialog .el-card {
background: #ECE9D8 !important;
}
.beijing-01__schedule .el-dialog .el-button {
height: 32px;
line-height: 32px;
padding: 0px;
width: 80px;
border: 2px outset #E2E2E2;
border-radius: 0px !important;
color: #000;
background: #ECE9D8;
}
.beijing-01__schedule .el-dialog .expand {
width: 120px;
}
.beijing-01__schedule .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.beijing-01__schedule .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.beijing-01__schedule .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.beijing-01__schedule .el-dialog .el-button:disabled span {
border: 0px;
}
.beijing-01__schedule .el-dialog .button-group {
margin: 0px 5px;
text-align: center !important;
}
.beijing-01__schedule .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.beijing-01__schedule .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.beijing-01__schedule .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.beijing-01__schedule .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.beijing-01__schedule .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.beijing-01__schedule .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.beijing-01__schedule .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.beijing-01__schedule .el-dialog .el-table .cell {
line-height: unset !important;
}
.beijing-01__schedule .el-dialog .el-table th.is-leaf {
background: #ECE9D8 !important;
border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.beijing-01__schedule .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.beijing-01__schedule .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.beijing-01__schedule .el-dialog .current-row>td {
background: #316AC5 !important;
color: #fff !important;
}
.beijing-01__schedule .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.beijing-01__schedule .el-dialog .el-checkbox__label {
color: #000 !important;
}
.beijing-01__schedule .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.beijing-01__schedule .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.beijing-01__schedule .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.beijing-01__schedule .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
position: absolute;
-webkit-box-sizing: content-box;
box-sizing: content-box;
content: "";
border: 1px solid #000;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
top: 1px;
}
.beijing-01__schedule .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.beijing-01__schedule .el-dialog .el-radio__label {
color: #000 !important;
}
.beijing-01__schedule .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.beijing-01__schedule .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
width: 4px;
height: 4px;
border-radius: 100%;
background-color: #000 !important;
position: absolute;
left: 50%;
top: 50%;
}
.beijing-01__schedule .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.beijing-01__schedule .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.beijing-01__schedule .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -15px;
top: -18px;
}
.beijing-01__schedule .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.beijing-01__schedule .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.beijing-01__schedule .el-dialog .table {
margin-top: 10px;
}
.beijing-01__schedule .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.beijing-01__schedule .el-dialog .button-group {
margin-top: 10px;
}
.beijing-01__schedule .el-dialog .el-tree__empty-block {
background: #E9E9E9 !important;
color: #000 !important;
}
</style>

View File

@ -1,514 +0,0 @@
<template>
<div id="PlanMenuBar">
<div class="nav">
<template v-for="(item,i) in menu">
<template v-if="noShowingChildren(item.children)">
<li class="nav-li" @click="hookClick(item)">
<span class="nav-li-text">{{ item.title }}</span>
</li>
</template>
<template v-else>
<li class="nav-li" @click.stop="popupMenuA(item, i)">
<span class="nav-li-text">{{ item.title }}</span>
<ul class="nav-ul" :class="{'active' :i==classA}">
<template v-for="(child,j) in item.children">
<template
v-if="child.children&&child.children.length>0&&hasShowingChildren(child.children)"
>
<li v-if="child.type === 'separator'" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li v-else-if="child.type === 'file'" class="menu-li">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<el-button type="text" class="button" :disabled="child.disabled">
<input
:ref="child.label"
type="file"
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
@change="openLoadFile(child)"
>
{{ child.title }}
</el-button>
</span>
</div>
</li>
<li v-else class="menu-li" @click.stop="popupMenuB(child, j)">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
<ul class="menu-ul" :class="{'active' :j==classB}">
<template v-for="(grandchild,k) in child.children">
<li v-if="grandchild.type === 'separator'" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li v-else-if="grandchild.type === 'file'" class="menu-li">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<el-button
type="text"
class="button"
:disabled="grandchild.disabled"
>
<input
:ref="grandchild.label"
type="file"
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
@change="openLoadFile(grandchild)"
>
{{ grandchild.title }}
</el-button>
</span>
</div>
</li>
<li v-else class="menu-li" @click.stop="hookClick(grandchild)">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ grandchild.title }}</span>
</span>
</div>
</li>
</template>
</ul>
</li>
</template>
<template v-else>
<li v-if="child.type === 'separator'" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li v-else-if="child.type === 'file'" class="menu-li">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<el-button type="text" class="button" :disabled="child.disabled">
<input
:ref="child.title"
type="file"
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
@change="openLoadFile(child)"
>
{{ child.title }}
</el-button>
</span>
</div>
</li>
<li v-else class="menu-li" @click.stop="hookClick(child)">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
</li>
</template>
</template>
</ul>
</li>
</template>
</template>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'PlanMenuBar',
props: {
lineCode: {
type: String,
required: true
}
},
data() {
return {
classA: -1,
classB: -1,
tempClassA: -1,
tempClassB: -1,
menu: [
{
title: '文件F',
children: [
]
},
{
title: '显示V',
children: [
// {
// title: '',
// },
// {
// title: '',
// },
// {
// title: ''
// }
]
},
{
title: '编辑E',
children: [
// {
// title: '',
// click: this.handleEditPlanningTrain
// },
// {
// title: '',
// click: this.handleAddTask
// },
// {
// title: '',
// click: this.handleDeleteTask
// },
// {
// title: '',
// click: this.handleModifyingPlanId
// },
// {
// title: '',
// click: this.handleTranslationalMulTrain
// }
]
},
{
title: '工具T',
children: [
{
title: '查看计划列表',
click: this.handleViewPlanSchedule
},
{
title: '创建一周计划',
click: this.handleCreateWeekPlan
},
{
title: '加载当天计划',
click: this.handleReloadTodayPlan
}
// {
// title: '',
// click: this.handleValidityCheck
// }
]
},
{
title: '帮助H',
children: [
]
}
]
};
},
computed: {
...mapGetters('training', [
'mode'
]),
...mapGetters('map', [
'stationList'
])
},
watch: {
tempClassA() {
this.classA = this.$store.state.menuOperation.break ? -1 : this.tempClassA;
},
tempClassB() {
this.classB = this.$store.state.menuOperation.break ? -1 : this.tempClassB;
},
'$store.state.menuOperation.break': function (val) {
if (val) {
this.classA = this.classB = -1;
} else {
this.classA = this.tempClassA;
this.classB = this.tempClassB;
}
}
},
mounted() {
this.initMenu();
},
methods: {
initMenu() {
this.clickEvent();
this.closeMenu();
},
clickEvent() {
const self = this;
window.onclick = function (e) {
self.closeMenu(false);
};
},
noShowingChildren(children) {
if (!children || children.length <= 0) {
return true;
}
return false;
},
hasShowingChildren(children) {
if (children && children.length > 0) {
return true;
}
return false;
},
closeMenu() {
this.classA = this.tempClassA = -1;
this.classB = this.tempClassB = -1;
},
hookClick(item, event) {
this.closeMenu();
setTimeout(() => {
if (item && typeof item.click == 'function') {
item.click();
}
}, 500);
},
popupMenuA(item, index) {
this.clickEvent();
this.tempClassA = index;
this.tempClassB = -1;
},
popupMenuB(item, index) {
this.tempClassB = index;
},
openLoadFile(item) {
const obj = this.$refs[item.title][0];
if (obj.files) {
const file = obj.files[0];
item.click(file);
obj.value = '';
}
},
doClose() {
this.$nextTick(() => {
EventBus.$emit('closeMenu');
});
},
//
refresh() {
this.closeMenu(true);
EventBus.$emit('refresh');
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
//
handleEditPlanningTrain() {
this.$emit('dispatchDialog', { name: 'modifyingPlan' });
},
//
handleAddTask() {
const params = this.$store.state.runPlan.selected;
this.$emit('dispatchDialog', { name: 'addTask', params });
},
//
handleDeleteTask() {
const params = this.$store.state.runPlan.selected;
this.$emit('dispatchDialog', { name: 'deleteTask', params });
},
//
handleModifyingTask() {
const params = this.$store.state.runPlan.selected;
this.$emit('dispatchDialog', { name: 'modifyingTask', params });
},
//
handleModifyingPlanId() {
this.$emit('dispatchDialog', { name: 'modifyingPlanId' });
},
//
handleTranslationalMulTrain() {
this.$emit('dispatchDialog', { name: 'translationalMulTrain' });
},
//
handleViewPlanSchedule() {
this.$emit('dispatchDialog', { name: 'managePlanList' });
},
//
handleCreateWeekPlan() {
this.$emit('dispatchDialog', { name: 'createWeekPlan' });
},
//
handleReloadTodayPlan() {
this.$emit('dispatchDialog', { name: 'createTodayPlan' });
},
//
handleValidityCheck() {
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$top: 25px;
$width: 30px;
$height: 20px;
$menuPadding: 10px;
$menuItemHeight: 30px;
$menuItemWidth: 160px;
$menuItemPadding: 5px;
#PlanMenuBar {
z-index: 10;
position: absolute;
top: $top;
width: 100%;
height: $height;
line-height: $height;
}
.nav {
display: block;
cursor: pointer;
color: #0000;
background: #EBEADB;
list-style: none;
border: 1px solid #B6BCCC !important;
}
.nav-li {
position: relative;
display: inline-block;
padding-left: $menuPadding;
padding-right: $menuPadding;
}
.nav-li:active {
background: #C9D0E1;
border-radius: 4px;
}
.nav-li-text {
font-size: 13px;
color: #000;
text-align: center;
text-decoration: none;
}
.nav-ul {
display: none;
position: absolute;
list-style: none;
border: 1px solid gray;
width: $menuItemWidth;
padding: 0px;
margin: 0px;
}
.menu-ul {
display: none;
list-style: none;
background: #F0F0F0;
line-height: $menuItemHeight;
width: $menuItemWidth;
bottom: $menuItemHeight;
}
.active {
position: absolute;
display: block !important;
}
.menu-ul-text {
font-size: 14px;
color: #000;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
border-left: 1px solid #000;
border-right: 1px solid #000;
}
.menu-separator {
text-align: left;
background: #F0F0F0;
height: 2px;
line-height: 2px;
}
.menu-separator .status {
display: inline-block;
border-right: 1px inset #CACACA;
width: $width;
height: 100%;
background: #EFECDE;
}
.menu-separator .separator {
display: inline-block;
background: #CACACA;
margin-left: 5px;
height: 2px;
width: $menuItemWidth - $width - 30px;
}
.menu-li {
text-align: left;
background: #F0F0F0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-block {
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-text {
font-size: 14px;
color: #000;
}
.menu-li-text .status {
display: inline-block;
border-right: 1px inset #CACACA;
width: $width;
background: #EFECDE;
}
.menu-li-text .label {
display: inline-block;
margin-left: 5px;
}
.menu-li-text .button {
position: relative;
overflow: hidden;
margin-left: 10px;
line-height: 0px;
width: $menuItemWidth - $width;
top: -$menuItemHeight;
color: #000;
cursor: pointer;
input {
opacity: 0;
cursor: pointer;
position: absolute;
top: 0px;
width: $menuItemWidth - $width - 10px;
}
}
.menu-li-block:hover {
background: #C9DEF7;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
</style>

View File

@ -1,477 +0,0 @@
<template>
<div id="PlanSchedule" :style="{top: top+'px', height: height+'px'}">
<div class="left">
<div :id="runPlanId" />
</div>
<div class="right">
<data-table
ref="serviceTable"
:height="height/2"
:config="serviceNumberConfig"
:style="{top: top-height/2+'px'}"
@touch="scheduleTouch"
/>
<data-table
ref="tripTable"
:height="height/2"
:config="tripNumberConfig"
:style="{top: top-height/2+'px'}"
@touch="trainNumTouch"
/>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date';
import DataTable from '../menusPlan/components/dataTable';
import echarts from 'echarts';
export default {
name: 'PlanSchedule',
components: {
DataTable
},
props: {
group: {
type: String,
required: true
},
lineCode: {
type: String,
required: true
},
maxWidth: {
type: Number,
require: true
},
maxHeight: {
type: Number,
required: true
}
},
data() {
return {
top: 0,
height: 0,
heights: [100, 100],
runPlanId: 'plan-schedule-id',
myChart: null,
PlanConvert: {},
serviceNumberConfig: {
data: [],
highlightCurrentRow: true,
handleChange: this.serviceNumberChange,
showClose: false,
columns: [
{
prop: 'serviceNumber',
label: '表号'
},
{
width: 40
}
]
},
tripNumberConfig: {
data: [],
highlightCurrentRow: true,
handleChange: this.tripNumberChange,
showClose: false,
columns: [
{
prop: 'tripNumber',
label: '车次号'
},
{
width: 40
}
]
},
realData: {},
kmRangeCoordMap: {},
option: {
title: {
text: '',
left: 'center'
},
grid: {
top: '30px',
left: '120px',
right: '40px',
bottom: '65px',
containLabel: true,
backgroundColor: 'floralwhite'
},
toolbox: {
// right: '30px',
// feature: {
// dataZoom: {
// yAxisIndex: 'none'
// },
// restore: {},
// saveAsImage: {}
// }
},
tooltip: {
axisPointer: {
trigger: 'item',
type: 'cross'
},
formatter: this.axisTooltip,
borderWidth: 1
},
xAxis: [
{
type: 'category',
boundaryGap: false,
data: [],
axisLine: {
onZero: false,
lineStyle: {
width: 2,
color: '#d14a61'
}
},
axisLabel: {
formatter: this.xAxisLableFormat,
textStyle: {
color: '#333'
}
},
axisPointer: {
snap: true,
label: {
formatter: this.xAxisPointFormat,
backgroundColor: 'rgb(255,0,0,0.5)',
color: 'white'
}
}
}
],
yAxis: {
type: 'value',
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
onZero: false,
lineStyle: {
width: 2,
color: '#d14a61'
}
},
axisLabel: {
interval: 'auto',
formatter: this.yAxisLableFormat
},
axisPointer: {
xAxisIndex: 'all',
label: {
formatter: this.yAxisPointFormat,
backgroundColor: 'rgb(0,100,0,0.5)',
color: 'white'
}
},
min: 0,
max: 0
},
series: [],
dataZoom: [
{
type: 'inside'
},
{
fiterMode: 'filter',
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
handleSize: '80%',
handleStyle: {
color: '#fff',
shadowBlur: 3,
shadowColor: 'rgba(0, 0, 0, 0.6)',
shadowOffsetX: 2,
shadowOffsetY: 2
},
bottom: '20px'
}
]
},
absoluteTime: 2 * 3600,
indexKmRangeMap: {}
};
},
watch: {
maxWidth() {
this.setPosition();
},
maxHeight() {
this.setPosition();
},
'$store.state.runPlan.planLoadedCount': async function () {
await this.loadChartPage();
},
'$store.state.runPlan.planSizeCount': function () {
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
},
'$store.state.runPlan.selected.serviceNumber': function (val) {
const index = this.serviceNumberConfig.data.findIndex(elem => {
return elem.serviceNumber == val;
});
this.$refs.serviceTable.setCurrentRow(this.serviceNumberConfig.data[index]);
},
'$store.state.runPlan.selected.tripNumber': function (val) {
const index = this.tripNumberConfig.data.findIndex(elem => {
return elem.tripNumber == val;
});
this.$refs.tripTable.setCurrentRow(this.tripNumberConfig.data[index]);
}
},
computed: {
...mapGetters('runPlan', [
'stations'
])
},
mounted() {
this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
},
beforeDestroy() {
this.destroy();
},
methods: {
serviceNumberChange(row) {
if (row) {
this.$store.dispatch('runPlan/setSelected', { serviceNumber: row.serviceNumber, tripNumber: null });
const serviceObj = this.$store.state.runPlan.editData[row.serviceNumber];
if (serviceObj) {
this.analyticalTripNumber(serviceObj.trainMap);
}
}
},
tripNumberChange(row) {
if (row) {
this.$store.dispatch('runPlan/setSelected', { serviceNumber: this.$store.state.runPlan.selected.serviceNumber, tripNumber: row.tripNumber });
}
},
async analyticalServiceNumber(data) {
this.serviceNumberConfig.data = Object.keys(data || {})
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
.map(serviceNumber => { return { serviceNumber }; });
},
async analyticalTripNumber(data) {
this.tripNumberConfig.data = Object.keys(data || {})
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
.map(tripNumber => { return { tripNumber }; });
},
async setPosition() {
this.$nextTick(() => {
let top = 3;
const width = this.maxWidth * 0.85;
let height = this.maxHeight;
const titleBar = document.getElementById('PlanTitleBar');
const menuBar = document.getElementById('PlanMenuBar');
const menuTool = document.getElementById('PlanMenuTool');
const statusBar = document.getElementById('PlanStatusBar');
if (titleBar) {
top += (titleBar.offsetHeight || 0);
}
if (menuBar) {
top += (menuBar.offsetHeight || 0);
}
if (menuTool) {
top += (menuTool.offsetHeight || 0);
}
if (statusBar) {
height -= (statusBar.offsetHeight || 0);
}
height = height - top;
this.$store.dispatch('runPlan/resize', { width, height });
if (this.top != top) {
this.top = top;
}
if (this.height != height) {
this.height = height - 20 * 2;
}
});
},
async loadChartPage() {
try {
let series = [];
const stations = this.$store.state.runPlan.stations;
const planData = this.$store.state.runPlan.planData;
this.viewDisabled = true;
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
series = this.pushModels(series, [this.PlanConvert.initializeYaxis(stations)]);
series = this.pushModels(series, this.PlanConvert.convertDataToModels(planData, stations, this.kmRangeCoordMap, { color: '#000', width: 0.5 }));
await this.loadInitData(series);
await this.analyticalServiceNumber(this.$store.state.runPlan.editData);
this.viewDisabled = false;
} catch (error) {
this.viewDisabled = false;
this.$messageBox(`加载运行图数据失败`);
}
},
async loadInitData(series) {
this.myChart && this.myChart.showLoading();
await this.xAxisInit();
await this.yAxisInit();
await this.loadInitChart(series);
this.myChart && this.myChart.hideLoading();
},
pushModels(series, models) {
if (models && models.length) {
models.forEach(elem => {
if (elem) {
series.push(elem);
}
});
}
return series;
},
popModels(series, models) {
if (models && models.length) {
models.forEach(elem => {
const index = series.indexOf(elem);
if (index >= 0) {
series.split(index, 1);
}
});
}
return series;
},
loadInitChart(series) {
return new Promise((resolve, reject) => {
try {
this.destroy();
let startValue = 3600 + this.PlanConvert.TranslationTime;
const offsetTime = 3600;
startValue = this.$store.state.training.initTime - this.PlanConvert.TranslationTime;
this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = startValue - offsetTime;
this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = startValue + offsetTime;
this.option.series = series;
this.myChart = echarts.init(document.getElementById(this.runPlanId));
if (this.myChart) {
this.myChart.setOption(this.option);
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
this.myChart.on('click', this.mouseClick);
}
resolve(true);
} catch (error) {
reject(error);
}
});
},
xAxisPointFormat(params) {
return timeFormat(params.value);
},
yAxisPointFormat(params) {
return this.PlanConvert.computedFormatYAxis(this.stations, params);
},
xAxisLableFormat(value, index) {
if (value % 60 === 0) {
return timeFormat(value);
}
},
yAxisLableFormat(value, index) {
return '';
},
xAxisInit() {
const list = [];
for (var time = 0 + this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) {
list.push(time);
}
const startValue = 3600 * 6;
const offsetTime = 3600 * 1;
this.option.xAxis[0].data = list;
if (!this.option.dataZoom[0].startValue) {
this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = startValue - offsetTime;
}
if (!this.option.dataZoom[0].endValue) {
this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = startValue + offsetTime;
}
},
yAxisInit() {
if (Object.keys(this.PlanConvert).length) {
this.option.yAxis.min = this.PlanConvert.computedYaxisMinValue(this.stations);
this.option.yAxis.max = this.PlanConvert.computedYaxisMaxValue(this.stations);
}
},
axisTooltip(param) {
const station = this.stations[Math.floor((param.data[1] - this.PlanConvert.EdgeHeight) / this.PlanConvert.CoordMultiple)] || { name: '', kmRange: '' };
return [
`Point Data <hr size=1 style=" margin: 3px 0">`,
`车站名称: ${station.name}<br>`,
`车站公里标: ${station.kmRange} km <br>`,
`到站时间: ${timeFormat(param.data[0] + this.PlanConvert.TranslationTime)} (${param.data[0]})<br>`
].join('');
},
mouseClick(params) {
const model = {
serviceNumber: params.seriesName
};
this.$store.dispatch('runPlan/setSelected', model);
},
reSize(opt) {
if (this.myChart) {
this.myChart.resize({
width: opt.width,
height: opt.height,
silent: false
});
}
},
destroy() {
if (this.myChart && this.myChart.isDisposed) {
this.myChart.dispose();
this.myChart = null;
}
},
scheduleTouch() {
},
trainNumTouch() {
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
#PlanSchedule {
z-index: 5;
position: absolute;
width: 100%;
.left {
height: 100%;
width: 85%;
float: left;
}
.right {
height: 100%;
width: 15%;
float: right;
}
}
</style>

View File

@ -1,100 +0,0 @@
<template>
<data-table id="PlanStatusBar" ref="dataTable" :height="height-11" :config="stationListConfig" :close="false"
:style="{top: maxmini? maxTop-110+'px':maxTop-21+'px'}" @touch="touch"></data-table>
</template>
<script>
import DataTable from '../menusPlan/components/dataTable';
import { formatTime, formatName } from '@/utils/runPlan';
export default {
name: 'PlanStatusBar',
props: {
maxTop: {
type: Number,
required: true
}
},
components: {
DataTable
},
data() {
return {
maxmini: true,
height: 100,
stationListConfig: {
data: [],
showClose: true,
highlightCurrentRow: true,
columns: [
{
prop: 'stationName',
label: '站台',
width: 400
},
{
prop: 'startTime',
label: '到点',
},
{
prop: 'stopTime',
label: '停站时间',
},
{
prop: 'endTime',
label: '发点',
},
{
prop: 'level',
label: '运行等级'
}
]
}
}
},
watch: {
'$store.state.runPlan.selected': function (select) {
this.stationListConfig.data = [];
let serviceObj = this.$store.state.runPlan.editData[select.serviceNumber];
if (serviceObj) {
let trainMap = serviceObj.trainMap;
if (trainMap) {
let trainObj = trainMap[select.tripNumber];
if (trainObj) {
let stationTimeList = trainObj.stationTimeList;
if (stationTimeList && stationTimeList.length) {
stationTimeList.forEach((elem, index) => {
let stationObj = {
stationName: formatName(elem.stationCode),
startTime: formatTime(index == 0 ? null : stationTimeList[index - 1].secondTime),
stopTime: formatTime(index == 0 ? null : elem.secondTime - stationTimeList[index - 1].secondTime),
endTime: formatTime(elem.secondTime),
level: ''
}
this.stationListConfig.data.push(stationObj);
});
}
}
}
}
}
},
methods: {
touch(maxmini) {
this.maxmini = maxmini;
this.$emit('setPosition');
}
}
}
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
#PlanStatusBar {
z-index: 5;
position: absolute;
width: 100%;
}
</style>

View File

@ -1,75 +0,0 @@
<template>
<div id="PlanTitleBar">
<img class="logo" :src="logoImg" />
<span> {{mapName}} &ensp;</span>
<span v-if="runPlanName">({{runPlanName}})</span>
<span class="system-close el-icon-close" @click="back"></span>
</div>
</template>
<script>
import logo_ from '@/assets/logo_.png';
import { getPublishMapInfo } from '@/api/jmap/map';
export default {
name: 'PlanTitleBar',
data() {
return {
mapName: '',
logoImg: logo_
}
},
computed: {
runPlanName() {
return this.$route.query.planName || '';
}
},
mounted() {
if (this.$route.query.mapId) {
getPublishMapInfo(this.$route.query.mapId).then(resp => {
this.mapName = resp.data.name;
})
}
},
methods: {
back() {
this.$emit('back');
}
}
}
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
$width: 25px;
$height: 25px;
#PlanTitleBar {
z-index: 10;
display: flex;
position: absolute;
width: 100%;
height: $height;
line-height: $height;
background: -webkit-linear-gradient(#0055E8, #0099F8);
background: -o-linear-gradient(#0055E8, #0099F8);
background: -moz-linear-gradient(#0055E8, #0099F8);
background: linear-gradient(#0055E8, #0099F8);
color: white;
font: bold;
font-size: 16px;
.logo {
display: inline-block;
width: $width;
height: $height;
padding-right: 5px;
}
.system-close {
width: 25px;
height: 25px;
position: absolute;
right: 1px;
}
}
</style>

View File

@ -1,175 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule add-task"
:title="title"
:visible.sync="dialogShow"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="margin: 10px">
<el-row>
<el-col :span="3">
<el-radio v-model="model.type" label="1">加在最前</el-radio>
</el-col>
<el-col :span="2" :offset="1">
<span>车次号</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.tripNumber" placeholder="请选择">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
<el-col :span="3" :offset="1">
<span>开始时间</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.startTime" placeholder="请选择">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<el-radio v-model="model.type" label="2">加在最后</el-radio>
</el-col>
<el-col :span="2" :offset="1">
<span>车次号</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.tripNumber" placeholder="请选择">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
<el-col :span="3" :offset="1">
<span>开始时间</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.startTime" placeholder="请选择">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
<el-row style="margin-bottom: 5px;">
交路
</el-row>
<el-row>
<el-table :data="model.route" border :height="180">
<el-table-column prop="date" label="日期" width="180" />
<el-table-column prop="name" label="姓名" width="180" />
<el-table-column prop="address" label="地址" />
<el-table-column width="20" />
</el-table>
</el-row>
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
详情
</el-row>
<el-row>
<el-table :data="model.detail" border :height="180">
<el-table-column prop="date" label="日期" width="180" />
<el-table-column prop="name" label="姓名" width="180" />
<el-table-column prop="address" label="地址" />
<el-table-column width="20" />
</el-table>
</el-row>
<el-row>
<el-col :offset="16">
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
</el-col>
</el-row>
</div>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
export default {
name: 'AddTask',
components: {
},
data() {
return {
dialogShow: false,
loading: false,
model: {
type: '1',
serviceNumber: '',
tripNumber: '',
startTime: '',
default: false,
route: [],
detail: []
},
tripNumberList: []
};
},
computed: {
title() {
return '添加任务';
}
},
mounted() {
},
methods: {
doShow(params) {
this.model.serviceNumber = params.serviceNumber;
this.model.tripNumber = params.tripNumber;
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleCommit() {
this.doClose();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ {
.el-button {
margin-left: 40px !important;
margin-right: 40px !important;
}
.el-row {
margin-bottom: 5px !important;
}
.el-input__inner {
height: 20px !important;
line-height: 20px !important;
}
}
</style>

View File

@ -1,115 +0,0 @@
<template>
<el-dialog
v-dialogDrag
:title="title"
class="beijing-01__schedule choose-plan-template"
:visible.sync="dialogShow"
width="70%"
:before-close="doClose"
:modal="false"
:close-on-click-modal="false"
>
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<el-row type="flex" justify="center" class="button-group">
<el-button type="primary" :loading="loading" @click="handleConfirm"> </el-button>
<el-button @click="dialogShow = false"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
import { runPlanTemplateList } from '@/api/runplan';
import { listPublishMap } from '@/api/jmap/map';
export default {
name: 'ChooseTemplatePlan',
data() {
return {
dialogShow: false,
loading: false,
mapList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
reset: true,
labelWidth: '100px',
queryObject: {
name: {
type: 'text',
label: '运行图名称'
}
}
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
radioShow: true,
columns: [
{
title: '运行图名称',
prop: 'name'
},
{
title: '地图名称',
prop: 'mapId',
type: 'tag',
columnValue: (row) => {
return this.$convertField(row.mapId, this.mapList, ['id', 'name']);
},
tagType: (row) => { return 'success'; }
}
]
},
currentModel: {}
};
},
computed: {
title() {
return '选择模板运行图';
}
},
methods: {
loadInitData() {
this.mapList = [];
listPublishMap().then(response => {
this.mapList = response.data;
});
},
doShow() {
this.loading = false;
this.dialogShow = true;
this.loadInitData();
},
doClose() {
this.dialogShow = false;
},
queryFunction(params) {
if (this.$store.state.map && this.$store.state.map.map) {
// params['lineCode'] = this.$store.getters['map/lineCode'];
params['mapId'] = this.$route.query.mapId;
}
return runPlanTemplateList(params);
},
handleConfirm() {
this.doClose();
if (this.$refs && this.$refs.pageRules) {
const choose = this.$refs.pageRules.currentChoose();
if (choose) {
this.$emit('chooseConfirm', choose);
} else {
this.$messageBox(`请选择模板运行图`);
}
}
},
reloadTable() {
this.queryList.reload();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -1,128 +0,0 @@
<template>
<el-dialog
v-dialogDrag
:title="title"
class="beijing-01__schedule reload-today-plan"
:visible.sync="dialogShow"
width="80%"
:before-close="doClose"
:modal="false"
:close-on-click-modal="false"
>
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<el-row type="flex" justify="center" class="button-group">
<el-button type="primary" :loading="loading" @click="handleConfirm"> </el-button>
<el-button @click="dialogShow = false"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
import { runPlanTemplateList } from '@/api/runplan';
import { getStationList } from '@/api/runplan';
import { generateDayRunPlan } from '@/api/simulation';
import { getPublishMapInfo } from '@/api/jmap/map';
export default {
name: 'ReloadTodayPlan',
data() {
return {
dialogShow: false,
loading: false,
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
reset: true,
labelWidth: '100px',
queryObject: {
name: {
type: 'text',
label: '运行图名称'
}
}
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
radioShow: true,
columns: [
{
title: '运行图名称',
prop: 'name'
}
]
},
currentModel: {}
};
},
computed: {
title() {
return '加载当天计划';
}
},
methods: {
doShow() {
this.loading = false;
this.dialogShow = true;
},
doClose() {
this.dialogShow = false;
},
queryFunction(params) {
if (this.$store.state.map && this.$store.state.map.map) {
params['mapId'] = this.$route.query.mapId;
}
return runPlanTemplateList(params);
},
//
handleConfirm() {
if (this.$refs && this.$refs.pageRules) {
const choose = this.$refs.pageRules.currentChoose();
if (choose && choose.id) {
this.loading = true;
generateDayRunPlan(choose.id, this.$route.query.group).then(response => {
this.loading = false;
this.reloadTable();
this.loadRunData();
this.doClose();
this.$message.success(`生成用户每日运行图成功`);
}).catch((error) => {
console.error(error);
this.loading = false;
this.reloadTable();
this.$messageBox(`生成用户每日运行图失败`);
});
} else {
this.$messageBox(`请选择需要加载的运行图`);
}
}
},
loadRunData() {
// const skinCode = this.$route.query.skinCode;
const mapId = this.$route.query.mapId;
this.$store.dispatch('runPlan/clear');
if (mapId) {
getStationList(mapId).then(response => {
const stations = response.data;
getPublishMapInfo(this.$route.query.mapId).then(res=>{
this.PlanConvert = this.$theme.loadPlanConvert(res.data.lineCode);
this.$store.dispatch('runPlan/setStations', stations).then(() => {
});
});
}).catch(() => {
this.$messageBox(`获取车站列表失败`);
});
}
},
reloadTable() {
this.queryList.reload();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -1,137 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule create-week-plan"
:title="title"
:visible.sync="dialogShow"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-form ref="form" :model="model" :rules="rules" label-width="140px" size="small">
<el-form-item label="运行图名称:" prop="planId">
<el-row>
<el-col :span="19">
<el-input v-model="model.planName" :readonly="true" />
</el-col>
<el-col :span="4" :offset="1">
<el-button @click="handleChoose">选择 </el-button>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="计划日期范围:" prop="dateList">
<el-row>
<el-date-picker
v-model="model.dateList"
type="dates"
:clearable="false"
placeholder="选择一个或多个日期"
value-format="yyyy-MM-dd"
/>
</el-row>
</el-form-item>
</el-form>
</el-row>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="create"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
<choose-template-plan ref="choose" @chooseConfirm="chooseConfirm" />
</el-dialog>
</template>
<script>
import { createRunPlanLoad } from '@/api/runplan';
import ChooseTemplatePlan from './chooseTemplatePlan';
export default {
name: 'CreateWeekPlan',
components: {
ChooseTemplatePlan
},
data() {
return {
dialogShow: false,
loading: false,
model: {
planId: '',
planName: '',
dateList: []
}
};
},
computed: {
title() {
return '创建一周计划';
},
rules() {
const rules = {
planId: [
{ required: true, message: '请选择模板运行图', trigger: 'blur' }
],
dateList: [
{ required: true, message: '请选择计划日期范围', trigger: 'change' }
]
};
return rules;
}
},
mounted() {
},
methods: {
doShow(params) {
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleChoose() {
this.$refs.choose.doShow();
},
chooseConfirm(choose) {
if (choose) {
this.model.planId = choose.id;
this.model.planName = choose.name;
}
},
buildModel() {
return {
planDateList: this.model.dateList,
mapId: this.$route.query.mapId,
templatePlanId: this.model.planId
};
},
create() {
this.$refs['form'].validate((valid) => {
if (valid) {
createRunPlanLoad(this.buildModel()).then(response => {
this.$message.success('创建运行图计划成功');
this.doClose();
}).catch(() => {
this.doClose();
this.$messageBox('创建运行图计划失败');
});
}
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.card-box {
padding-top: 10px;
}
/deep/ {
.el-row {
margin: 10px;
}
}
</style>

View File

@ -1,73 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule delete-task"
:title="title"
:visible.sync="dialogShow"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-radio v-model="type" :label="1">删除以前所有任务包含本任务</el-radio>
</el-row>
<el-row>
<el-radio v-model="type" :label="2">删除以后所有任务包含本任务</el-radio>
</el-row>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
export default {
name: 'DeleteTask',
components: {
},
data() {
return {
dialogShow: false,
loading: false,
tripNumber: '',
serviceNumber: '',
type: '1'
};
},
computed: {
title() {
return '删除任务';
}
},
mounted() {
},
methods: {
doShow(params) {
this.tripNumber = params.tripNumber;
this.serviceNumber = params.serviceNumber;
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleCommit() {
// this.tripNumber
this.doClose();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ {
.el-row {
margin: 10px;
}
}
</style>

View File

@ -1,62 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule create-week-plan"
:title="title"
:visible.sync="dialogShow"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
export default {
name: 'DeleteTodayPlan',
components: {
},
data() {
return {
dialogShow: false,
loading: false
};
},
computed: {
title() {
return '删除当天计划';
}
},
mounted() {
},
methods: {
doShow(params) {
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleCommit() {
// this.tripNumber
this.doClose();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ {
.el-row {
margin: 10px;
}
}
</style>

View File

@ -1,143 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule manage-plan-list"
:title="title"
:visible.sync="dialogShow"
width="80%"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</el-dialog>
</template>
<script>
import { getRunPlanLoadList, deleteRunPlanLoad, listAllTempLateRunPlan } from '@/api/runplan';
import { getPublishMapListOnline } from '@/api/jmap/map';
export default {
name: 'ManagePlanList',
data() {
return {
dialogShow: false,
loading: false,
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '140px',
reset: true
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: this.$t('publish.mapName'),
prop: 'mapId',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['id', 'name']); },
tagType: (row) => { return ''; }
},
{
title: this.$t('publish.runPlanName'),
prop: 'templatePlanId',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.templatePlanId, this.templatePlanList, ['id', 'name']); },
tagType: (row) => { return 'success'; }
},
{
title: '加载日期',
prop: 'loadTime'
},
{
type: 'button',
title: '操作',
width: '100',
buttons: [
{
name: '删除',
handleClick: this.handleDelete,
type: 'danger'
}
]
}
],
actions: [
{ text: '创建', btnCode: 'employee_insert', handler: this.handleCreateRunPlan }
]
},
currentModel: {}
};
},
computed: {
title() {
return '运行图计划表';
}
},
mounted() {
this.loadPageData();
},
methods: {
loadPageData() {
this.mapList = [];
getPublishMapListOnline().then(resp => {
this.mapList = resp.data;
});
this.templatePlanList = [];
listAllTempLateRunPlan().then(resp => {
this.templatePlanList = resp.data;
});
},
queryFunction(params) {
if (this.$route.query.mapId) {
params['mapId'] = this.$route.query.mapId;
}
if (this.$store.state.user.id) {
params['userId'] = this.$store.state.user.id;
}
return getRunPlanLoadList(params);
},
handleDelete(index, row) {
this.$confirm('此操作将删除次日加载的运行图, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteRunPlanLoad(row.id).then(response => {
this.$message.success('删除成功');
this.reloadTable();
}).catch(() => {
this.reloadTable();
this.$messageBox('删除失败');
});
}).catch(() => { });
},
handleCreateRunPlan() {
this.$emit('dispatchDialog', { name: 'createWeekPlan' });
},
doShow() {
this.dialogShow = true;
this.$nextTick(()=> { this.reloadTable(); });
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
reloadTable() {
this.queryList.reload();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -1,177 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule edit-planning-train"
:title="title"
:visible.sync="dialogShow"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :offset="10">列车线路</el-col>
</el-row>
<el-row>
<el-col :span="17">
<el-table :data="serviceData" border style="width: 100%" height="160">
<el-table-column prop="startStationCode" label="起点站" />
<el-table-column prop="startStationStandCode" label="起点站台" />
<el-table-column prop="endStationCode" label="终点站" />
<el-table-column prop="endStationStandCode" label="终点站台" />
</el-table>
</el-col>
<el-col :span="6" :offset="1">
<el-row type="flex" justify="center">
<el-button class="view-button" @click="handleAddTask">加任务</el-button>
</el-row>
<el-row type="flex" justify="center">
<el-button class="view-button" @click="handleReplace">&ensp;&ensp;</el-button>
</el-row>
<el-row type="flex" justify="center">
<el-button class="view-button" @click="handleDeleteTask">删任务</el-button>
</el-row>
<div class="view-box">
<el-row type="flex" justify="center">
<el-radio-group v-model="storeInOut">
<el-radio :label="1">进库</el-radio>
<el-radio :label="2">出库</el-radio>
</el-radio-group>
</el-row>
</div>
</el-col>
</el-row>
<el-row class="view-box">
<el-col :span="9" style="padding-left: 10px">
<el-input v-model="oldServiceNumber" size="small" :disabled="true" />
</el-col>
<el-col :span="9" style="padding-left: 20px">
<el-input v-model="newServiceNumber" size="small" />
</el-col>
<el-col :span="5" style="padding-left: 20px">
<el-button style="width: 150px;" @click="handleModifyingTripNumber">改车次号</el-button>
</el-col>
</el-row>
<el-row style="margin-top: 10px">
<el-col :span="4"><span class="view-label">线路开始时间</span></el-col>
<el-col :span="8">
<el-time-select v-model="serviceStartTime" size="small" />
</el-col>
<el-col :span="4"><span class="view-label">线路结束时间</span></el-col>
<el-col :span="8">
<el-time-select v-model="serviceEndTime" size="small" />
</el-col>
</el-row>
<el-row style="margin-top: 20px">
<el-col :offset="10">线路详细信息</el-col>
</el-row>
<el-row>
<el-table :data="tripData" border style="width: 100%" height="200">
<el-table-column prop="arriveTime" label="到站时间" />
<el-table-column prop="stationCode" label="车站" />
<el-table-column prop="stationStandCode" label="站台" />
<el-table-column prop="stopTime" label="停站时间" />
<el-table-column prop="level" label="运行等级" />
</el-table>
</el-row>
<el-row style="margin-top: 20px">
<el-checkbox v-model="effect">影响后续任务</el-checkbox>
</el-row>
<el-row type="flex" justify="center">
<el-button @click="handleCommit"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
import { formatTime, formatName } from '@/utils/runPlan';
export default {
name: 'ModifyingPlan',
data() {
return {
dialogShow: false,
loading: false,
effect: false,
storeInOut: '1',
oldServiceNumber: '',
newServiceNumber: '',
serviceStartTime: '',
serviceEndTime: '',
serviceData: [],
tripData: []
};
},
computed: {
title() {
return '修改';
}
},
mounted() {
},
methods: {
formatTime(time) {
return formatTime(time);
},
formatName(code) {
return formatName(code);
},
doShow() {
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
//
handleAddTask() {
this.$emit('dispatchDialog', { name: 'addTask', params: {} });
},
//
handleReplace() {
this.$emit('dispatchDialog', { name: 'modifyingTask', params: {} });
},
//
handleDeleteTask() {
this.$emit('dispatchDialog', { name: 'deleteTask', params: {} });
},
//
handleModifyingTripNumber() {
this.$emit('dispatchDialog', { name: 'modifyingTripNumber', params: {} });
},
//
handleCommit() {
this.doClose();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.view-button {
display: list-item;
width: 150px !important;
margin-left: 0px;
}
.view-label {
height: 32px;
line-height: 32px;
}
.view-box {
padding: 10px 0px;
border: 1px inset gray;
border-top: 1px outset gray;
border-left: 1px outset gray;
}
/deep/ {
.el-row {
margin: 5px 20px;
}
}
</style>

View File

@ -1,326 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule add-task"
:title="title"
:visible.sync="dialogShow"
width="1000px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="margin: 10px">
<el-row>
<el-col :span="4">
<el-row>
<el-col :span="9">
<span>车次号</span>
</el-col>
<el-col :span="15">
<el-select v-model="model.tripNumber" style="display: inline-black" placeholder="请选择">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
</el-col>
<el-col :span="2">
<el-row>
<el-col :offset="4">
<el-checkbox v-model="model.trainManual">手工</el-checkbox>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<el-row>
<el-col :span="12">
<span>缺省停站时间</span>
</el-col>
<el-col :span="12">
<el-select v-model="model.time" style="display: inline-black" placeholder="请选择">
<el-option
v-for="item in timeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<el-row>
<el-col :span="9" :offset="2">
<span>表号</span>
</el-col>
<el-col :span="13">
<el-input v-model="model.serviceNumber" />
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<el-row>
<el-col :span="22" :offset="2">
<el-row>
<el-col :span="6">
<el-checkbox v-model="model.clearGuest">清客</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox v-model="model.continuationPlan">延续计划</el-checkbox>
</el-col>
<el-col :span="6">
<el-checkbox v-model="model.firstTrain">首班车</el-checkbox>
</el-col>
</el-row>
</el-col>
</el-row>
</el-col>
</el-row>
<el-row>
<el-col :span="4">
<el-row>
<el-col :span="9">
<span>序列号</span>
</el-col>
<el-col :span="15">
<el-select v-model="model.serialNumber" style="display: inline-black" placeholder="请选择">
<el-option
v-for="item in serialNumberList"
:key="item.value"
:label="item.label"
:value="model.value"
/>
</el-select>
</el-col>
</el-row>
</el-col>
<el-col :span="2">
<el-row>
<el-col :offset="4">
<el-checkbox v-model="model.serialManual">手工</el-checkbox>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<el-row>
<el-col :span="12">
<span>缺省运行等级</span>
</el-col>
<el-col :span="12">
<el-select v-model="model.level" style="display: inline-black" placeholder="请选择">
<el-option
v-for="item in levelList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<el-row>
<el-col :span="9" :offset="2">
<span>开始时间</span>
</el-col>
<el-col :span="13">
<el-time-select v-model="model.startTime" placeholder="选择时间" :clearable="false" />
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<el-row>
<el-col :span="22" :offset="2">
<el-row>
<el-col :span="6">
<el-checkbox v-model="model.inStock">入库</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox v-model="model.outStock">出库</el-checkbox>
</el-col>
<el-col :span="6">
<el-checkbox v-model="model.lastTrain">末班车</el-checkbox>
</el-col>
</el-row>
</el-col>
</el-row>
</el-col>
</el-row>
<el-row style="margin-bottom: 5px;">
交路
</el-row>
<el-row>
<el-table :data="model.route" border :height="140">
<el-table-column prop="beginStationCode" label="起始站">
<template slot-scope="scope">
{{ formatName(scope.row.beginStationCode) }}
</template>
</el-table-column>
<el-table-column prop="beginStationStandCode" label="起始站台" />
<el-table-column prop="endStationCode" label="终到站">
<template slot-scope="scope">
{{ formatName(scope.row.endStationCode) }}
</template>
</el-table-column>
<el-table-column prop="endStationStandCode" label="终到站台" />
<el-table-column prop="describe" label="描述" :width="280" />
<el-table-column :width="40" />
</el-table>
</el-row>
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
详情
</el-row>
<el-row>
<el-table :data="model.detail" border :height="140">
<el-table-column prop="stationCode" label="站台" :width="160">
<template slot-scope="scope">
{{ formatName(scope.row.stationCode) }}
</template>
</el-table-column>
<el-table-column prop="startTime" label="到点">
<template slot-scope="scope">
{{ formatTime(scope.row.startTime) }}
</template>
</el-table-column>
<el-table-column prop="stopTime" label="停站时间">
<template slot-scope="scope">
{{ formatTime(scope.row.stopTime) }}
</template>
</el-table-column>
<el-table-column prop="endTime" label="发点">
<template slot-scope="scope">
{{ formatTime(scope.row.endTime) }}
</template>
</el-table-column>
<el-table-column prop="level" label="运行等级" />
<el-table-column width="280" />
</el-table>
</el-row>
<el-row>
<el-col :offset="16">
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
</el-col>
</el-row>
</div>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
import { formatTime, formatName } from '@/utils/runPlan';
export default {
name: 'ModifyingTask',
components: {
},
data() {
return {
dialogShow: false,
loading: false,
model: {
tripNumber: '',
serialNumber: '',
trainManual: false,
serialManual: false,
clearGuest: false,
continuationPlan: false,
firstTrain: false,
lastTrain: false,
inStock: false,
outStock: false,
startTime: '',
route: [],
detail: []
},
timeList: [],
levelList: [],
tripNumberList: [],
serialNumberList: []
};
},
computed: {
title() {
return '修改任务';
}
},
mounted() {
},
methods: {
formatTime(time) {
return formatTime(time);
},
formatName(code) {
return formatName(code);
},
loadInitData(params) {
this.model.tripNumber = params.tripNumber;
this.model.serviceNumber = params.serviceNumber;
const editData = this.$store.state.runPlan.editData[params.serviceNumber];
if (editData) {
const trainInfo = editData.trainMap[params.tripNumber];
const lastIndex = trainInfo.stationTimeList.length - 1;
const taskObj = {
tripNumber: params.tripNumber,
beginStationCode: trainInfo.stationTimeList[0].stationCode,
beginStationStandCode: '',
endStationCode: trainInfo.stationTimeList[lastIndex].stationCode,
endStationStandCode: ''
};
this.model.route.push(taskObj);
trainInfo.stationTimeList.forEach((elem, index) => {
const stationObj = {
stationCode: elem.stationCode,
startTime: index == 0 ? null : trainInfo.stationTimeList[index - 1].secondTime,
stopTime: index == 0 ? null : elem.secondTime - trainInfo.stationTimeList[index - 1].secondTime,
endTime: elem.secondTime,
level: ''
};
this.model.detail.push(stationObj);
});
}
},
doShow(params) {
this.loadInitData(params);
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleCommit() {
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ {
.el-button {
margin-left: 40px !important;
margin-right: 40px !important;
}
.el-row {
margin-bottom: 5px !important;
}
.el-input__inner {
height: 20px !important;
line-height: 20px !important;
}
.el-input {
width: 110px !important;
}
}
</style>

View File

@ -14,6 +14,9 @@ class Model {
this['private'][deviceType.StationControl] = {
indicatorShow: true // 标识灯名称显示
};
this['private'][deviceType.Station] = {
kmPostShow: true // 公里标显示
};
this['private'][deviceType.Switch] = {
nameShow: true
};

View File

@ -1,170 +0,0 @@
<template>
<div id="PlanMenuTool">
<div class="nav">
<div v-for="(item,index) in tools" :key="index" class="tool">
<img :src="item.src" :alt="item.title">
</div>
</div>
</div>
</template>
<script>
import { prefixIntrger } from '@/utils/date';
import logo_ from '@/assets/logo_.png';
export default {
name: 'PlanMenuTool',
data() {
return {
tools: [
{
title: '服务器1',
operate: '',
src: logo_,
click: this.undeveloped
},
{
title: '服务器2',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '前置机1',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '前置机2',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '主调',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '调度台1',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '调度台2',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '调度台3',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '大屏',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '维护工作站',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '运行图显示人工站',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '跳停',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '扣车',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '列车报警',
operate: '',
src: logo_,
click: this.undeveloped
}
]
};
},
computed: {
isShowSystemTime() {
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
}
},
watch: {
'$store.state.training.initTime': function (initTime) {
const date = new Date(initTime);
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
}
},
mounted() {
this.initTools();
},
methods: {
initTools() {
this.tools = [];
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
$top: 48px;
$width: 25px;
$height: 25px;
#PlanMenuTool {
z-index: 5;
position: absolute;
width: 100%;
top: $top;
}
.nav {
display: block;
color: #0000;
background: #EBEADB;
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
height: $height;
line-height: $height;
}
.tool {
padding-left: 10px;
display: flex;
justify-content: center;
cursor: pointer;
position: relative;
float: left;
margin: 1px;
width: $width;
img {
display: block;
text-align: center;
padding-top: 2px;
height: $height - 5;
width: $width - 5;
}
}
</style>

View File

@ -1,100 +0,0 @@
<template>
<data-table id="PlanStatusBar" ref="dataTable" :height="height-11" :config="stationListConfig" :close="false"
:style="{top: maxmini? maxTop-110+'px':maxTop-21+'px'}" @touch="touch"></data-table>
</template>
<script>
import DataTable from '../menusPlan/components/dataTable';
import { formatTime, formatName } from '@/utils/runPlan';
export default {
name: 'PlanStatusBar',
props: {
maxTop: {
type: Number,
required: true
}
},
components: {
DataTable
},
data() {
return {
maxmini: true,
height: 100,
stationListConfig: {
data: [],
showClose: true,
highlightCurrentRow: true,
columns: [
{
prop: 'stationName',
label: '站台',
width: 400
},
{
prop: 'startTime',
label: '到点',
},
{
prop: 'stopTime',
label: '停站时间',
},
{
prop: 'endTime',
label: '发点',
},
{
prop: 'level',
label: '运行等级'
}
]
}
}
},
watch: {
'$store.state.runPlan.selected': function (select) {
this.stationListConfig.data = [];
let serviceObj = this.$store.state.runPlan.editData[select.serviceNumber];
if (serviceObj) {
let trainMap = serviceObj.trainMap;
if (trainMap) {
let trainObj = trainMap[select.tripNumber];
if (trainObj) {
let stationTimeList = trainObj.stationTimeList;
if (stationTimeList && stationTimeList.length) {
stationTimeList.forEach((elem, index) => {
let stationObj = {
stationName: formatName(elem.stationCode),
startTime: formatTime(index == 0 ? null : stationTimeList[index - 1].secondTime),
stopTime: formatTime(index == 0 ? null : elem.secondTime - stationTimeList[index - 1].secondTime),
endTime: formatTime(elem.secondTime),
level: ''
}
this.stationListConfig.data.push(stationObj);
});
}
}
}
}
}
},
methods: {
touch(maxmini) {
this.maxmini = maxmini;
this.$emit('setPosition');
}
}
}
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
#PlanStatusBar {
z-index: 5;
position: absolute;
width: 100%;
}
</style>

View File

@ -1,75 +0,0 @@
<template>
<div id="PlanTitleBar">
<img class="logo" :src="logoImg" />
<span> {{mapName}} &ensp;</span>
<span v-if="runPlanName">({{runPlanName}})</span>
<span class="system-close el-icon-close" @click="back"></span>
</div>
</template>
<script>
import logo_ from '@/assets/logo_.png';
import { getPublishMapInfo } from '@/api/jmap/map';
export default {
name: 'PlanTitleBar',
data() {
return {
mapName: '',
logoImg: logo_
}
},
computed: {
runPlanName() {
return this.$route.query.planName || '';
}
},
mounted() {
if (this.$route.query.mapId) {
getPublishMapInfo(this.$route.query.mapId).then(resp => {
this.mapName = resp.data.name;
})
}
},
methods: {
back() {
this.$emit('back');
}
}
}
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
$width: 25px;
$height: 25px;
#PlanTitleBar {
z-index: 10;
display: flex;
position: absolute;
width: 100%;
height: $height;
line-height: $height;
background: -webkit-linear-gradient(#0055E8, #0099F8);
background: -o-linear-gradient(#0055E8, #0099F8);
background: -moz-linear-gradient(#0055E8, #0099F8);
background: linear-gradient(#0055E8, #0099F8);
color: white;
font: bold;
font-size: 16px;
.logo {
display: inline-block;
width: $width;
height: $height;
padding-right: 5px;
}
.system-close {
width: 25px;
height: 25px;
position: absolute;
right: 1px;
}
}
</style>

View File

@ -11,7 +11,8 @@ class Theme {
'06': 'ningbo_01',
'07': 'haerbin_01', // 哈尔滨培训线路
'08': 'foshan_01',
'09': 'xian_02'
'09': 'xian_02',
'10': 'xian_01'
};
this._localShowMode = { // 现地显示模式
'01': 'all', // 成都一 全显
@ -22,7 +23,8 @@ class Theme {
'06': 'ecStation', // 宁波一 集中站显示
'07': 'ecStation', // 哈尔滨培训线路 集中站显示
'08': 'all', // 佛山有轨线路 全显
'09': 'all'
'09': 'all',
'10': 'all'
};
}
@ -32,9 +34,9 @@ class Theme {
}
// 加载运行图计划表组件
loadPlanComponent(code) {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/planSchedule/index`).default);
}
// loadPlanComponent(code) {
// return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/planSchedule/index`).default);
// }
// 加载运行图解析和转化函数
loadPlanConvert(code) {

View File

@ -23,8 +23,8 @@
</el-col>
</el-row>
<div v-if="passModel" style="margin: 12px 0;">
<el-radio :id="upRadioId" v-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" :disabled="passRadio == '2'" @change="changeRadio">设置自动通过</el-radio>
<el-radio :id="upRadioId" v-model="passRadio" label="2" style="display: block; padding-left: 10px;" :disabled="passRadio == '1'" @change="changeRadio">取消自动通过</el-radio>
<el-radio v-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" :disabled="passRadio == '2'" @change="changeRadio">设置自动通过</el-radio>
<el-radio v-model="passRadio" label="2" style="display: block; padding-left: 10px;" :disabled="passRadio == '1'" @change="changeRadio">取消自动通过</el-radio>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">

View File

@ -64,7 +64,8 @@ export default {
row: null,
operation: '',
stationLists: [],
disabledAll: false
disabledAll: false,
checked2: false
};
},
computed: {

Some files were not shown because too many files have changed in this diff Show More