merge
This commit is contained in:
commit
ec0f59682b
@ -3,7 +3,7 @@ root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
@ -1,5 +1,6 @@
|
||||
# just a flag
|
||||
NODE_ENV = 'development'
|
||||
#VUE_APP_PRO = 'local'
|
||||
|
||||
# base api
|
||||
# VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
|
||||
|
7
.env.native
Normal file
7
.env.native
Normal file
@ -0,0 +1,7 @@
|
||||
# just a flag
|
||||
NODE_ENV = 'Local'
|
||||
VUE_APP_PRO = 'local'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
|
||||
VUE_VOICE_API = 'https://joylink.club'
|
@ -8,6 +8,7 @@
|
||||
"dev": "vue-cli-service serve --open",
|
||||
"build": "vue-cli-service build",
|
||||
"test": "vue-cli-service build --mode staging",
|
||||
"local": "vue-cli-service build --mode native",
|
||||
"preview": "node build/index.js --preview",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
"test:unit": "jest --clearCache && vue-cli-service test:unit",
|
||||
@ -53,6 +54,7 @@
|
||||
"compression-webpack-plugin": "^3.0.0",
|
||||
"connect": "3.6.6",
|
||||
"copy-webpack-plugin": "^4.5.2",
|
||||
|
||||
"eslint": "5.15.3",
|
||||
"eslint-plugin-vue": "5.2.2",
|
||||
"file-loader": "^3.0.1",
|
||||
|
@ -8,7 +8,7 @@
|
||||
<script>
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { ProjectIcon, loginInfo } from '@/scripts/ConstDic';
|
||||
import { loginInfo } from '@/scripts/ConstDic';
|
||||
import DeomonTopic from '@/views/demonstration/deomonTopic';
|
||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
|
||||
@ -46,8 +46,6 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.prohibitSystemContextMenu();
|
||||
const project = window.sessionStorage.getItem('project');
|
||||
document.querySelector("link[rel*='icon']").href = ProjectIcon[project];
|
||||
|
||||
var beforeUnload_time = 0;
|
||||
var gap_time = 0;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
/** 开始实训*/
|
||||
/** 开始实训 0*/
|
||||
export function startTraining(args, group) {
|
||||
return request({
|
||||
url: `/api/training/${args.id}/start`,
|
||||
@ -35,8 +35,7 @@ export function sendTrainingNextStep(data, group) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取章节基本信息*/
|
||||
/** 获取章节基本信息 0*/
|
||||
export function getTrainingDetail(trainingId) {
|
||||
return request({
|
||||
url: `/api/training/${trainingId}`,
|
||||
@ -44,7 +43,7 @@ export function getTrainingDetail(trainingId) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 添加实训*/
|
||||
/** 添加实训 0*/
|
||||
export function addTraining(data) {
|
||||
return request({
|
||||
url: '/api/training',
|
||||
@ -53,7 +52,7 @@ export function addTraining(data) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取实训步骤数据*/
|
||||
/** 获取实训步骤数据 0*/
|
||||
export function getTrainingStepsDetail(trainingId, params) {
|
||||
return request({
|
||||
url: `/api/training/${trainingId}/detail`,
|
||||
@ -62,7 +61,7 @@ export function getTrainingStepsDetail(trainingId, params) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询实训列表*/
|
||||
/** 查询实训列表 0*/
|
||||
export function pageQueryTraining(params) {
|
||||
return request({
|
||||
url: `/api/training/pagedQuery`,
|
||||
@ -70,8 +69,7 @@ export function pageQueryTraining(params) {
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
/** 自动生成实训操作*/
|
||||
/** 自动生成实训操作 0*/
|
||||
export function addAutoTraining(data) {
|
||||
return request({
|
||||
url: `/api/training/generate`,
|
||||
@ -80,7 +78,7 @@ export function addAutoTraining(data) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 修改自动删除实训操作*/
|
||||
/** 修改自动删除实训操作 0*/
|
||||
export function updateAutoTraining(data) {
|
||||
return request({
|
||||
url: `/api/training/batchUpdateGenerate`,
|
||||
@ -88,8 +86,7 @@ export function updateAutoTraining(data) {
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除自动生成实训*/
|
||||
/** 删除自动生成实训 0*/
|
||||
export function deleteAutoTraining(params) {
|
||||
return request({
|
||||
url: `/api/training/generate`,
|
||||
@ -98,7 +95,7 @@ export function deleteAutoTraining(params) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取用户实训列表*/
|
||||
/** 获取用户实训列表 0*/
|
||||
export function getTrainingList(data) {
|
||||
return request({
|
||||
url: `/api/training/list`,
|
||||
@ -128,15 +125,7 @@ export function sendCommandNew(group, commandDefinitionId, command) {
|
||||
data: command
|
||||
});
|
||||
}
|
||||
|
||||
export function updateLesson(data) {
|
||||
return request({
|
||||
url: `/api/training/userTraining/${data.id}`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
// 添加用户实训数据
|
||||
// 添加用户实训数据 0
|
||||
export function addUserTraining(data) {
|
||||
return request({
|
||||
url: `/api/training/userTraining`,
|
||||
@ -144,7 +133,7 @@ export function addUserTraining(data) {
|
||||
data: data
|
||||
});
|
||||
}
|
||||
// 更新用户实训数据
|
||||
// 更新用户实训数据 0
|
||||
export function putUserTraining(data) {
|
||||
return request({
|
||||
url: `/api/training/userTraining/${data.id}`,
|
||||
@ -152,10 +141,125 @@ export function putUserTraining(data) {
|
||||
data: data
|
||||
});
|
||||
}
|
||||
// 清除实训数据
|
||||
// 清除实训数据 0
|
||||
export function deleteUserTraining(statsId) {
|
||||
return request({
|
||||
url: `/api/training/userTraining/${statsId}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
/** 开始实训 (新版地图) */
|
||||
export function startTrainingNew (args, group) {
|
||||
return request({
|
||||
url: `/api/v1/training/${args.id}/start`,
|
||||
method: 'get',
|
||||
params: {group}
|
||||
});
|
||||
}
|
||||
/** 实训结束(新版地图) */
|
||||
export function endTrainingNew(args, group) {
|
||||
return request({
|
||||
url: `/api/v1/training/${args.lessonId}/${args.id}/end`,
|
||||
method: 'get',
|
||||
params: {
|
||||
mode: args.mode,
|
||||
usedTime: args.usedTime,
|
||||
group
|
||||
}
|
||||
});
|
||||
}
|
||||
/** 发送步骤数据 (新版地图) */
|
||||
export function sendTrainingNextStepNew(data, group) {
|
||||
return request({
|
||||
url: `/api/v1/training/${data.trainingId}/nextStep`,
|
||||
method: 'post',
|
||||
data: data.operation,
|
||||
params: {group}
|
||||
});
|
||||
}
|
||||
/** 获取章节基本信息(新版地图) */
|
||||
export function getTrainingDetailNew(trainingId) {
|
||||
return request({
|
||||
url: `/api/v1/training/${trainingId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}/** 添加实训(新版地图) */
|
||||
export function addTrainingNew(data) {
|
||||
return request({
|
||||
url: '/api/v1/training',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/** 获取实训步骤数据(新版地图) */
|
||||
export function getTrainingStepsDetailNew(trainingId, params) {
|
||||
return request({
|
||||
url: `/api/v1/training/${trainingId}/detail`,
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
/** 查询实训列表(新版地图)*/
|
||||
export function pageQueryTrainingNew(params) {
|
||||
return request({
|
||||
url: `/api/v1/training/pagedQuery`,
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
/** 自动生成实训操作(新版地图) */
|
||||
export function addAutoTrainingNew(data) {
|
||||
return request({
|
||||
url: '/api/v1/training/generate',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/** 修改自动删除实训操作(新版地图) */
|
||||
export function updateAutoTrainingNew(data) {
|
||||
return request({
|
||||
url: `/api/v1/training/batchUpdateGenerate`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/** 删除自动生成实训(新版地图) */
|
||||
export function deleteAutoTrainingNew(params) {
|
||||
return request({
|
||||
url: `/api/v1/training/generate`,
|
||||
method: 'delete',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
/** 获取用户实训列表(新版) */
|
||||
export function getTrainingListNew(data) {
|
||||
return request({
|
||||
url: `/api/v1/training/list`,
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
}
|
||||
/** 添加用户实训数据 */
|
||||
export function addUserTrainingNew(data) {
|
||||
return request({
|
||||
url: `/api/v1/training/userTraining`,
|
||||
method: 'post',
|
||||
data:data
|
||||
});
|
||||
}
|
||||
/** 更新用户实训数据 */
|
||||
export function putUserTrainingNew(data) {
|
||||
return request({
|
||||
url: `/api/v1/training/userTraining/${data.id}`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/** 清除实训数据 */
|
||||
export function deleteUserTrainingNew(statsId) {
|
||||
return request({
|
||||
url: `/api/v1/training/userTraining/${statsId}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
@ -178,3 +178,11 @@ export function getOnlineNmuber() {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
// 生成线下环境用户
|
||||
export function generateOfflineUser(data) {
|
||||
return request({
|
||||
url: `/api/user/generate/offline`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
@ -378,3 +378,55 @@ export function postRunPlanTemplate(data) {
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
|
||||
// 根据地图起始-终点车站站台区段生成站间运行等级
|
||||
export function postGenerateLevel(data) {
|
||||
return request({
|
||||
url: `/api/draftMap/runLevel/generate`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 新建站间运行等级
|
||||
export function postSaveLevel(data) {
|
||||
return request({
|
||||
url: `/api/draftMap/runLevel`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 更新站间运行等级数据
|
||||
export function putUploadLevel(id, data) {
|
||||
return request({
|
||||
url: `/api/draftMap/runLevel/${id}`,
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除站间运行等级
|
||||
export function deleteRunLevel(id) {
|
||||
return request({
|
||||
url: `/api/draftMap/runLevel/${id}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询站间运行等级列表
|
||||
export function getRunLevelList(mapId, params) {
|
||||
return request({
|
||||
url: `/api/draftMap/runLevel/${mapId}/listAll`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
// 查询站间运行等级明细
|
||||
export function getRunLevelDetail(id) {
|
||||
return request({
|
||||
url: `/api/draftMap/runLevel/${id}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -86,7 +86,13 @@ export function trainingNotify({ trainingId }) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 实训系统(新版地图) */
|
||||
export function trainingNotifyNew({ trainingId }) {
|
||||
return request({
|
||||
url: `/simulation/training/${trainingId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 考试系统CBTC
|
||||
* @param {*} data
|
||||
@ -97,7 +103,13 @@ export function examNotify({ examId }) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 考试系统(新版地图)*/
|
||||
export function examNotifyNew({ examId }) {
|
||||
return request({
|
||||
url: `/simulation/exam/${examId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 获取用户实训列表*/
|
||||
export function getSimulationList(data) {
|
||||
return request({
|
||||
@ -157,6 +169,14 @@ export function scriptRecordNotify(scriptId) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 录制脚本仿真(新版)*/
|
||||
export function scriptRecordNotifyNew(scriptId) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${scriptId}/scriptWrite`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 保存剧本背景*/
|
||||
export function saveScriptScenes(group) {
|
||||
return request({
|
||||
@ -173,6 +193,14 @@ export function saveScriptData(group) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 保存录制任务数据(新版)*/
|
||||
export function saveScriptDataNew(group) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${group}/saveData`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
|
||||
/** 更新任务地图定位信息*/
|
||||
export function updateMapLocation(group, data) {
|
||||
return request({
|
||||
@ -189,6 +217,13 @@ export function getScriptMemberData(group) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 获取剧本编制的所有成员角色(新版地图)*/
|
||||
export function getScriptMemberDataNew(group) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${group}/allMember`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取剧本出演成员角色 */
|
||||
export function getScriptPlayMember(group) {
|
||||
@ -198,6 +233,14 @@ export function getScriptPlayMember(group) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取剧本出演成员角色(新版地图) */
|
||||
export function getScriptPlayMemberNew(group) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${group}/allPlayer`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 取消剧本演出成员角色 */
|
||||
export function cancleScriptMembers(group, data) {
|
||||
return request({
|
||||
@ -207,6 +250,15 @@ export function cancleScriptMembers(group, data) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 取消剧本演出成员角色 */
|
||||
export function cancleScriptMembersNew(group, data) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${group}/removePlayers`,
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
/** 选择剧本演出成员角色 */
|
||||
export function selectScriptMembers(group, data) {
|
||||
return request({
|
||||
@ -216,6 +268,15 @@ export function selectScriptMembers(group, data) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 选择剧本演出成员角色 (新版地图)*/
|
||||
export function selectScriptMembersNew(group, data) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${group}/choosePlayers`,
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
/** 修改剧本演出成员性别 */
|
||||
export function modifyScriptMemberSex(group, playerId, data) {
|
||||
return request({
|
||||
@ -232,6 +293,14 @@ export function dumpScriptData(group) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 清除仿真剧本数据(新版)*/
|
||||
export function dumpScriptDataNew(group) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${group}/reset`,
|
||||
method: 'PUT'
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询录制剧本步骤*/
|
||||
export function queryScriptStep(group) {
|
||||
return request({
|
||||
@ -257,6 +326,15 @@ export function addScriptAction(group, data) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 添加剧本动作(新版) */
|
||||
export function addScriptActionNew(group, data) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${group}/addAction`,
|
||||
method: 'PUT',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除剧本动作 */
|
||||
export function deleteScriptAction(group, actionId) {
|
||||
return request({
|
||||
@ -307,6 +385,14 @@ export function getScriptRecord(group) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取任务录制的所有动作(新版)*/
|
||||
export function getScriptAllAction(group) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${group}/allAction`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 加载任务*/
|
||||
export function loadQuest(questId, memberId, group) {
|
||||
return request({
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 49 KiB |
@ -19,7 +19,7 @@ export default {
|
||||
permissionsDetails: 'Permission details',
|
||||
buy: 'buy',
|
||||
distributePermission: 'Permission distribution',
|
||||
viewCoursePapers: 'View course papers',
|
||||
viewCoursePapers: 'Examination paper management',
|
||||
examStartTime: 'Start time',
|
||||
theExamIsReadyAnyTime: 'Anytime you are available',
|
||||
minutes: 'min',
|
||||
|
@ -17,5 +17,6 @@ export default {
|
||||
accountOrPasswordIsIncorrect: 'The account number or password is incorrect!',
|
||||
getLoginQrCode: 'Failed to get login qr code, please refresh and try again',
|
||||
language: 'Language',
|
||||
clickSwitchLanguage: 'Click switch language'
|
||||
clickSwitchLanguage: 'Click switch language',
|
||||
accountName: 'Account name'
|
||||
};
|
||||
|
@ -611,5 +611,20 @@ export default {
|
||||
routePhysicalSectionData: 'Route physical section data',
|
||||
routeSideDefenseSwitch: 'Route side defense switch',
|
||||
switchID: 'Switch ID',
|
||||
lineColor: 'Line Color'
|
||||
lineColor: 'Line Color',
|
||||
psd: 'Psd',
|
||||
platformEmergencyStop: 'Platform emergency stop',
|
||||
functionButton: 'Function button',
|
||||
saidLamp: 'Said lamp',
|
||||
rectangularBox: 'Rectangular box',
|
||||
boundingBox: 'Bounding box',
|
||||
ownedCiStation: 'Owned CI station:',
|
||||
saidLampType: 'Said lamp type:',
|
||||
saidLampName: 'Said lamp name:',
|
||||
functionButtonType: 'Function type:',
|
||||
buttonMainName: 'Button main name:',
|
||||
buttonViceName: 'Button vice name:',
|
||||
automaticRouteCode: 'Automatic route code:',
|
||||
cycleCode: 'Automatic reentry code:'
|
||||
|
||||
};
|
||||
|
@ -321,5 +321,8 @@ export default {
|
||||
selectConcentrateStation:'Please select Concentrate Station',
|
||||
enterDeviceCode: 'Please enter device code',
|
||||
selectDeviceType: 'Please select device type',
|
||||
selectBelongProject: 'Please select belongs to project'
|
||||
selectBelongProject: 'Please select belongs to project',
|
||||
selectSaidLampType: 'Please select type of said lamp',
|
||||
enterSaidLampName: 'Please enter said lamp name',
|
||||
selectFunctionType: 'Please select type of function'
|
||||
};
|
||||
|
@ -19,7 +19,7 @@ export default {
|
||||
permissionsDetails: '权限详情',
|
||||
buy: '购买',
|
||||
distributePermission: '权限分发',
|
||||
viewCoursePapers: '查看课程试卷',
|
||||
viewCoursePapers: '试卷管理',
|
||||
nameOfTestPaper: '试卷名称',
|
||||
examStartTime: '考试时间',
|
||||
minutes: '分钟',
|
||||
|
@ -17,5 +17,6 @@ export default {
|
||||
accountOrPasswordIsIncorrect: '账号或密码不正确!',
|
||||
getLoginQrCode: '获取登录二维码失败,请刷新重试',
|
||||
language: '语言',
|
||||
clickSwitchLanguage: '点击切换语言'
|
||||
clickSwitchLanguage: '点击切换语言',
|
||||
accountName: '账户名'
|
||||
};
|
||||
|
@ -606,5 +606,20 @@ export default {
|
||||
switchID: '道岔ID',
|
||||
normalPosition: '定位',
|
||||
reversePosition: '反位',
|
||||
lineColor: '线条颜色'
|
||||
lineColor: '线条颜色',
|
||||
psd: '屏蔽门',
|
||||
platformEmergencyStop: '站台紧急停车',
|
||||
functionButton: '功能按钮',
|
||||
saidLamp: '表示灯',
|
||||
rectangularBox: '矩形框',
|
||||
boundingBox: '包围框',
|
||||
ownedCiStation: '所属集中站:',
|
||||
saidLampType: '表示灯类型:',
|
||||
saidLampName: '表示灯名称:',
|
||||
functionButtonType: '功能类型:',
|
||||
buttonMainName: '按钮主名称:',
|
||||
buttonViceName: '按钮副名称:',
|
||||
automaticRouteCode: '自动进路code:',
|
||||
cycleCode: '自动折返code'
|
||||
|
||||
};
|
||||
|
@ -287,7 +287,7 @@ export default {
|
||||
standTrackName: '站台轨名称',
|
||||
buttonName: '按钮名称',
|
||||
reentryTrackName: '折返轨名称',
|
||||
trackName: '股道名称',
|
||||
trackName: '轨道名称',
|
||||
transferTrackName: '转换轨名称',
|
||||
turnoutName: '道岔名称',
|
||||
indicatorName: '标识灯名称',
|
||||
|
@ -323,5 +323,8 @@ export default {
|
||||
selectConcentrateStation:'请选择设备集中站',
|
||||
enterDeviceCode: '请输入设备编码',
|
||||
selectDeviceType: '请选择设备类型',
|
||||
selectBelongProject: '请选择所属项目'
|
||||
selectBelongProject: '请选择所属项目',
|
||||
selectSaidLampType: '请选择表示灯类型',
|
||||
enterSaidLampName: '请输入表示灯名称',
|
||||
selectFunctionType: '请选择功能类型'
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
import StompClient from '@/utils/sock';
|
||||
import { displayTopic } from '@/utils/stomp';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import router from '@/router';
|
||||
import router from '@/router/index_APP_TARGET';
|
||||
|
||||
// 定于仿真socket接口
|
||||
export function Jlmap3dSubscribe(worker,routegroup) {
|
||||
|
@ -2,55 +2,55 @@ import Group from 'zrender/src/container/Group';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
|
||||
class ESigName extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.create();
|
||||
}
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
this.name = new Text({
|
||||
_subType: 'SignalLamp',
|
||||
_val: '3',
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
silent: model.silent,
|
||||
style: {
|
||||
textBorderColor: 'red',
|
||||
textBorderWidth: 0,
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
fontWeight: model.fontWeight,
|
||||
fontSize: model.fontSize,
|
||||
fontFamily: model.fontFamily,
|
||||
text: model.text,
|
||||
textFill: model.textFill,
|
||||
textAlign: model.textAlign,
|
||||
textPosition: model.textPosition || 'inside',
|
||||
textVerticalAlign: model.textVerticalAlign || null
|
||||
}
|
||||
});
|
||||
this.add(this.name);
|
||||
}
|
||||
create() {
|
||||
const model = this.model;
|
||||
this.name = new Text({
|
||||
_subType: 'SignalLamp',
|
||||
_val: '3',
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
silent: model.silent,
|
||||
style: {
|
||||
textBorderColor: 'red',
|
||||
textBorderWidth: 0,
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
fontWeight: model.fontWeight,
|
||||
fontSize: model.fontSize,
|
||||
fontFamily: model.fontFamily,
|
||||
text: model.text,
|
||||
textFill: model.textFill,
|
||||
textAlign: model.textAlign,
|
||||
textPosition: model.textPosition || 'inside',
|
||||
textVerticalAlign: model.textVerticalAlign || null
|
||||
}
|
||||
});
|
||||
this.add(this.name);
|
||||
}
|
||||
|
||||
setStyle(model) {
|
||||
this.name.setStyle(model);
|
||||
}
|
||||
setStyle(model) {
|
||||
this.name.setStyle(model);
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
this.name.setStyle('textFill', color);
|
||||
}
|
||||
setColor(color) {
|
||||
this.name.setStyle('textFill', color);
|
||||
}
|
||||
|
||||
// 隐藏
|
||||
hide() {
|
||||
this.name.hide();
|
||||
}
|
||||
// 隐藏
|
||||
hide() {
|
||||
this.name.hide();
|
||||
}
|
||||
|
||||
// 显示
|
||||
show() {
|
||||
this.name.show();
|
||||
}
|
||||
// 显示
|
||||
show() {
|
||||
this.name.show();
|
||||
}
|
||||
}
|
||||
|
||||
export default ESigName;
|
||||
|
@ -14,503 +14,505 @@ import Group from 'zrender/src/container/Group';
|
||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
|
||||
class Signal extends Group {
|
||||
constructor(model, style) {
|
||||
super();
|
||||
this._code = model.code;
|
||||
this._type = model._type;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.count = parseInt(model.lampPositionType);
|
||||
this.lamps = new Array(this.count);
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 7;
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
this.transformRotation(this);
|
||||
this.setState(model);
|
||||
}
|
||||
constructor(model, style) {
|
||||
super();
|
||||
this._code = model.code;
|
||||
this._type = model._type;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.count = parseInt(model.lampPositionType);
|
||||
this.lamps = new Array(this.count);
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 7;
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
this.transformRotation(this);
|
||||
this.setState(model);
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
const drict = this.model.directionShowType == '01' ? -1 : 1; // 朝向 左:右
|
||||
const posit = this.model.positionType == '01' ? -1 : 1; // 位置 上:下
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
const drict = this.model.directionShowType == '01' ? -1 : 1; // 朝向 左:右
|
||||
const posit = this.model.positionType == '01' ? -1 : 1; // 位置 上:下
|
||||
|
||||
// 信号机高柱矮柱
|
||||
this.sigPost = new ESigPost({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
drict: drict,
|
||||
type: model.lampPostType,
|
||||
x: model.position.x,
|
||||
y: model.position.y + posit * (style.Signal.distance + style.Section.line.width + style.Signal.lamp.radiusR)
|
||||
});
|
||||
// 信号机高柱矮柱
|
||||
this.sigPost = new ESigPost({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
drict: drict,
|
||||
type: model.lampPostType,
|
||||
x: model.position.x,
|
||||
y: model.position.y + posit * (style.Signal.distance + style.Section.line.width + style.Signal.lamp.radiusR)
|
||||
});
|
||||
|
||||
// 信号灯
|
||||
const endPoint = this.sigPost.getLampPosition(model.lampPostType);
|
||||
this.lamps = [];
|
||||
for (let i = 0; i < this.count; i++) {
|
||||
const lamp = new ESigLamp({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
drict: drict,
|
||||
x: endPoint.x + i * drict * style.Signal.lamp.radiusR * 2,
|
||||
y: endPoint.y,
|
||||
originX: model.position.x,
|
||||
originY: model.position.y
|
||||
});
|
||||
// 信号灯
|
||||
const endPoint = this.sigPost.getLampPosition(model.lampPostType);
|
||||
this.lamps = [];
|
||||
for (let i = 0; i < this.count; i++) {
|
||||
const lamp = new ESigLamp({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
drict: drict,
|
||||
x: endPoint.x + i * drict * style.Signal.lamp.radiusR * 2,
|
||||
y: endPoint.y,
|
||||
originX: model.position.x,
|
||||
originY: model.position.y
|
||||
});
|
||||
|
||||
this.lamps.push(lamp);
|
||||
}
|
||||
this.lamps.push(lamp);
|
||||
}
|
||||
|
||||
// 信号机名称
|
||||
const sigNameX = model.position.x - drict * (style.Signal.post.standardWidth) + model.namePosition.x;
|
||||
const sigNameY = model.position.y + posit * (style.Signal.distance + style.Section.line.width + style.Signal.lamp.radiusR * 2 + model.namePosition.y + style.Signal.text.distance);
|
||||
const textAlign = style.Signal.text.isAlignCenter ? 'middle': this.model.directionShowType == '01'? 'right': 'left';
|
||||
const textVerticalAlign = posit == 1 ? 'top' : 'bottom';
|
||||
this.sigName = new ESigName({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
silent: false,
|
||||
isNoRotation: style.Signal.text.isNoRotation,
|
||||
style: style,
|
||||
x: sigNameX,
|
||||
y: sigNameY,
|
||||
text: model.name,
|
||||
fontWeight: style.Signal.text.fontWeight,
|
||||
fontSize: style.Signal.text.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
textFill: style.Signal.text.defaultColor,
|
||||
textAlign: textAlign,
|
||||
textVerticalAlign: textVerticalAlign
|
||||
});
|
||||
// 信号机名称
|
||||
const sigNameX = model.position.x - drict * (style.Signal.post.standardWidth) + model.namePosition.x;
|
||||
const sigNameY = model.position.y + posit * (style.Signal.distance + style.Section.line.width + style.Signal.lamp.radiusR * 2 + model.namePosition.y + style.Signal.text.distance);
|
||||
const textAlign = style.Signal.text.isAlignCenter ? 'middle' : this.model.directionShowType == '01' ? 'right' : 'left';
|
||||
const textVerticalAlign = posit == 1 ? 'top' : 'bottom';
|
||||
this.sigName = new ESigName({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
silent: false,
|
||||
isNoRotation: style.Signal.text.isNoRotation,
|
||||
style: style,
|
||||
x: sigNameX,
|
||||
y: sigNameY,
|
||||
text: model.name,
|
||||
fontWeight: style.Signal.text.fontWeight,
|
||||
fontSize: style.Signal.text.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
textFill: style.Signal.text.defaultColor,
|
||||
textAlign: textAlign,
|
||||
textVerticalAlign: textVerticalAlign
|
||||
});
|
||||
|
||||
// 自动进路
|
||||
const sigRouteH = style.Signal.route.direction ? this.count * style.Signal.lamp.radiusR * 2 : -style.Signal.lamp.radiusR * 2;
|
||||
const sigRouteX = endPoint.x + (style.Signal.route.offset.x + sigRouteH) * drict;
|
||||
const sigRouteY = endPoint.y + (style.Signal.route.offset.y);
|
||||
this.sigRoute = new ESigRoute({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
x: sigRouteX,
|
||||
y: sigRouteY,
|
||||
drict: drict
|
||||
});
|
||||
// 自动进路
|
||||
const sigRouteH = style.Signal.route.direction ? this.count * style.Signal.lamp.radiusR * 2 : -style.Signal.lamp.radiusR * 2;
|
||||
const sigRouteX = endPoint.x + (style.Signal.route.offset.x + sigRouteH) * drict;
|
||||
const sigRouteY = endPoint.y + (style.Signal.route.offset.y);
|
||||
this.sigRoute = new ESigRoute({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
x: sigRouteX,
|
||||
y: sigRouteY,
|
||||
drict: drict
|
||||
});
|
||||
|
||||
// 自动通过
|
||||
const sigAutoH = style.Signal.auto.direction ? this.count * style.Signal.lamp.radiusR * 2 : -style.Signal.lamp.radiusR * 2;
|
||||
const sigAutoX = endPoint.x + (style.Signal.auto.offset.x + sigAutoH) * drict;
|
||||
const sigAutoY = endPoint.y + (style.Signal.auto.offset.y);
|
||||
this.sigAuto = new ESigAuto({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
count: this.count,
|
||||
drict: drict,
|
||||
x: sigAutoX,
|
||||
y: sigAutoY,
|
||||
width: style.Signal.auto.width,
|
||||
fill: style.Signal.auto.autoRoute,
|
||||
lineWidth: 0.6,
|
||||
stroke: style.sidelineColor
|
||||
});
|
||||
// 自动通过
|
||||
const sigAutoH = style.Signal.auto.direction ? this.count * style.Signal.lamp.radiusR * 2 : -style.Signal.lamp.radiusR * 2;
|
||||
const sigAutoX = endPoint.x + (style.Signal.auto.offset.x + sigAutoH) * drict;
|
||||
const sigAutoY = endPoint.y + (style.Signal.auto.offset.y);
|
||||
this.sigAuto = new ESigAuto({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
count: this.count,
|
||||
drict: drict,
|
||||
x: sigAutoX,
|
||||
y: sigAutoY,
|
||||
width: style.Signal.auto.width,
|
||||
fill: style.Signal.auto.autoRoute,
|
||||
lineWidth: 0.6,
|
||||
stroke: style.sidelineColor
|
||||
});
|
||||
|
||||
// 延迟解锁
|
||||
const sigDelayH = style.Signal.delay.direction ? this.count * style.Signal.lamp.radiusR * 2 : -style.Signal.lamp.radiusR * 2;
|
||||
const sigDelayX = endPoint.x + (style.Signal.delay.offset.x + sigDelayH) * drict;
|
||||
const sigDelayY = endPoint.y - (style.Signal.delay.offset.y) * posit;
|
||||
this.sigDelay = new ESigDelay({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
x: sigDelayX,
|
||||
y: sigDelayY,
|
||||
fontWeight: style.Signal.delay.fontWeight,
|
||||
fontSize: style.Signal.delay.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: this.model.delayCount || '0',
|
||||
textFill: style.Signal.delay.fontColor,
|
||||
textAlign: drict > 0 ? 'right' : 'left',
|
||||
textVerticalAlign: 'middle'
|
||||
});
|
||||
// 延迟解锁
|
||||
const sigDelayH = style.Signal.delay.direction ? this.count * style.Signal.lamp.radiusR * 2 : -style.Signal.lamp.radiusR * 2;
|
||||
const sigDelayX = endPoint.x + (style.Signal.delay.offset.x + sigDelayH) * drict;
|
||||
const sigDelayY = endPoint.y - (style.Signal.delay.offset.y) * posit;
|
||||
this.sigDelay = new ESigDelay({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
x: sigDelayX,
|
||||
y: sigDelayY,
|
||||
fontWeight: style.Signal.delay.fontWeight,
|
||||
fontSize: style.Signal.delay.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: this.model.delayCount || '0',
|
||||
textFill: style.Signal.delay.fontColor,
|
||||
textAlign: drict > 0 ? 'right' : 'left',
|
||||
textVerticalAlign: 'middle'
|
||||
});
|
||||
|
||||
// 信号灯按钮
|
||||
this.sigButton = new ESigButton({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
posit: posit,
|
||||
show: model.buttonShow,
|
||||
x: model.buttonPosition.x,
|
||||
y: model.buttonPosition.y - posit * (style.Signal.button.distance + style.Signal.lamp.radiusR * 2)
|
||||
});
|
||||
// 信号灯按钮
|
||||
this.sigButton = new ESigButton({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
posit: posit,
|
||||
show: model.buttonShow,
|
||||
x: model.buttonPosition.x,
|
||||
y: model.buttonPosition.y - posit * (style.Signal.button.distance + style.Signal.lamp.radiusR * 2)
|
||||
});
|
||||
|
||||
this.add(this.sigPost);
|
||||
this.lamps.forEach(lamp => { this.add(lamp); });
|
||||
this.style.Signal.text.show ? this.add(this.sigName) : null;
|
||||
this.add(this.sigAuto);
|
||||
this.add(this.sigRoute);
|
||||
this.add(this.sigDelay);
|
||||
// this.add(this.sigButton);
|
||||
}
|
||||
this.add(this.sigPost);
|
||||
this.lamps.forEach(lamp => { this.add(lamp); });
|
||||
this.add(this.sigName);
|
||||
|
||||
createMouseEvent() {
|
||||
if (this.style.Signal.mouseOverStyle) {
|
||||
this.mouseEvent = new EMouse(this);
|
||||
this.add(this.mouseEvent);
|
||||
this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); });
|
||||
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
|
||||
}
|
||||
}
|
||||
this.style.Signal.text.show && model.nameShow ? this.sigName.show() : this.sigName.hide();
|
||||
this.add(this.sigAuto);
|
||||
this.add(this.sigRoute);
|
||||
this.add(this.sigDelay);
|
||||
// this.add(this.sigButton);
|
||||
}
|
||||
|
||||
// 整体旋转信号灯
|
||||
transformRotation(device) {
|
||||
if (this.model.rotate) {
|
||||
device.eachChild(item => {
|
||||
if (item instanceof Group) {
|
||||
this.transformRotation(item);
|
||||
} else if (item && item.model && item.model.isNoRotation) {
|
||||
item.origin = [this.model.position.x, this.model.position.y];
|
||||
item.rotation = -Math.PI / 180 * Number(this.model.rotate);
|
||||
item.dirty();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
createMouseEvent() {
|
||||
if (this.style.Signal.mouseOverStyle) {
|
||||
this.mouseEvent = new EMouse(this);
|
||||
this.add(this.mouseEvent);
|
||||
this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); });
|
||||
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
|
||||
}
|
||||
}
|
||||
|
||||
// 关闭
|
||||
close() {
|
||||
if (this.count == 2 && this.model.lightType == '01') { // 双灯 物理点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.backgroundColor);
|
||||
}
|
||||
} else if (this.count == 2 && this.model.lightType == '02') { // 双灯 逻辑点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(true);
|
||||
this.lamps[1].setColor(this.style.backgroundColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '01') { // 单灯 物理点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
if (this.model.useType == '05') {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
} else {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '02') { // 单灯 逻辑点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
if (this.model.useType == '05') {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
} else {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
}
|
||||
} else if (this.count == 1) {
|
||||
if (this.lamps[0]) {
|
||||
if (this.model.useType == '05') {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
} else {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 整体旋转信号灯
|
||||
transformRotation(device) {
|
||||
if (this.model.rotate) {
|
||||
device.eachChild(item => {
|
||||
if (item instanceof Group) {
|
||||
this.transformRotation(item);
|
||||
} else if (item && item.model && item.model.isNoRotation) {
|
||||
item.origin = [this.model.position.x, this.model.position.y];
|
||||
item.rotation = -Math.PI / 180 * Number(this.model.rotate);
|
||||
item.dirty();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* count 1单灯 2双灯 lightType 01物理点灯 02逻辑点灯*/
|
||||
openPositive() {
|
||||
if (this.count == 2 && this.model.lightType == '01') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.backgroundColor);
|
||||
}
|
||||
} else if (this.count == 2 && this.model.lightType == '02') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(true);
|
||||
this.lamps[1].setColor(this.style.backgroundColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '01') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '02') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* count 1单灯 2双灯 lightType 01物理点灯 02逻辑点灯*/
|
||||
openLateral() {
|
||||
if (this.count == 2 && this.model.lightType == '01') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.backgroundColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
} else if (this.count == 2 && this.model.lightType == '02') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.backgroundColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(true);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '01') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
// 出站信号机/阻隔信号机
|
||||
if (['02', '06'].includes(this.model.useType)) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
} else {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.whiteColor);
|
||||
}
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '02') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 列车进路
|
||||
trainRoute() {
|
||||
if (this.count == 1) {
|
||||
/** 单灯 列兼调信号*/
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
}
|
||||
// 关闭
|
||||
close() {
|
||||
if (this.count == 2 && this.model.lightType == '01') { // 双灯 物理点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.backgroundColor);
|
||||
}
|
||||
} else if (this.count == 2 && this.model.lightType == '02') { // 双灯 逻辑点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(true);
|
||||
this.lamps[1].setColor(this.style.backgroundColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '01') { // 单灯 物理点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
if (this.model.useType == '05') {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
} else {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '02') { // 单灯 逻辑点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
if (this.model.useType == '05') {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
} else {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
}
|
||||
} else if (this.count == 1) {
|
||||
if (this.lamps[0]) {
|
||||
if (this.model.useType == '05') {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
} else {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 调车进路
|
||||
shuntRoute() {
|
||||
if (this.count == 1) {
|
||||
/** 单灯 列兼调信号*/
|
||||
/** 单灯 阻挡兼调车信号*/
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.whiteColor);
|
||||
}
|
||||
}
|
||||
/* count 1单灯 2双灯 lightType 01物理点灯 02逻辑点灯*/
|
||||
openPositive() {
|
||||
if (this.count == 2 && this.model.lightType == '01') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.backgroundColor);
|
||||
}
|
||||
} else if (this.count == 2 && this.model.lightType == '02') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(true);
|
||||
this.lamps[1].setColor(this.style.backgroundColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '01') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '02') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* count 1单灯 2双灯 lightType 01物理点灯 02逻辑点灯*/
|
||||
openLateral() {
|
||||
if (this.count == 2 && this.model.lightType == '01') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.backgroundColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
} else if (this.count == 2 && this.model.lightType == '02') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.backgroundColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(true);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '01') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
// 出站信号机/阻隔信号机
|
||||
if (['02', '06'].includes(this.model.useType)) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
} else {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.whiteColor);
|
||||
}
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '02') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 列车进路
|
||||
trainRoute() {
|
||||
if (this.count == 1) {
|
||||
/** 单灯 列兼调信号*/
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
}
|
||||
|
||||
// 引导
|
||||
guid() {
|
||||
if (this.count == 2 && this.model.lightType == '01' && this.style.Signal.lamp.guidName != 'chengdu_03') { // 双灯 物理点灯 允许引导信号
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '01' && this.style.Signal.lamp.guidName == 'chengdu_03') {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setStyle({ fill: this.style.Signal.lamp.yellowColor, stroke: this.style.Signal.lamp.redColor, lineWidth: 2.5 });
|
||||
}
|
||||
}
|
||||
// 调车进路
|
||||
shuntRoute() {
|
||||
if (this.count == 1) {
|
||||
/** 单灯 列兼调信号*/
|
||||
/** 单灯 阻挡兼调车信号*/
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.whiteColor);
|
||||
}
|
||||
}
|
||||
|
||||
// 封锁
|
||||
block() {
|
||||
if (this.count == 1) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
// this.siglamp.setNameBorder(1)
|
||||
}
|
||||
this.sigName.setColor(this.style.Signal.text.blockColor);
|
||||
if (this.style.Signal.text.nameBorderShow) {
|
||||
this.sigName.setStyle({textBorderWidth: 1});
|
||||
this.sigName.setColor('#fff');
|
||||
}
|
||||
}
|
||||
// 引导
|
||||
guid() {
|
||||
if (this.count == 2 && this.model.lightType == '01' && this.style.Signal.lamp.guidName != 'chengdu_03') { // 双灯 物理点灯 允许引导信号
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '01' && this.style.Signal.lamp.guidName == 'chengdu_03') {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setStyle({ fill: this.style.Signal.lamp.yellowColor, stroke: this.style.Signal.lamp.redColor, lineWidth: 2.5 });
|
||||
}
|
||||
}
|
||||
|
||||
// 功能封锁
|
||||
functionBlock() {
|
||||
if (this.count == 1) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
// this.siglamp.setRectBlockByIndex(1, true);
|
||||
}
|
||||
}
|
||||
// 封锁
|
||||
block() {
|
||||
if (this.count == 1) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
// this.siglamp.setNameBorder(1)
|
||||
}
|
||||
this.sigName.setColor(this.style.Signal.text.blockColor);
|
||||
if (this.style.Signal.text.nameBorderShow) {
|
||||
this.sigName.setStyle({textBorderWidth: 1});
|
||||
this.sigName.setColor('#fff');
|
||||
}
|
||||
}
|
||||
|
||||
// 信号保护区段监视状态显示
|
||||
signalCheck() {
|
||||
if (this.count == 1) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
this.sigName.setColor(this.style.Signal.text.checkColor);
|
||||
}
|
||||
}
|
||||
// 功能封锁
|
||||
functionBlock() {
|
||||
if (this.count == 1) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
// this.siglamp.setRectBlockByIndex(1, true);
|
||||
}
|
||||
}
|
||||
|
||||
// 故障
|
||||
fault() {
|
||||
if (this.count == 2 && this.model.lightType == '01') { // 双灯 物理点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.blueColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 信号保护区段监视状态显示
|
||||
signalCheck() {
|
||||
if (this.count == 1) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
this.sigName.setColor(this.style.Signal.text.checkColor);
|
||||
}
|
||||
}
|
||||
|
||||
// 物理点灯
|
||||
logicalLight() {
|
||||
this.lamps.forEach(lamp => { lamp.setStop(false); });
|
||||
}
|
||||
// 故障
|
||||
fault() {
|
||||
if (this.count == 2 && this.model.lightType == '01') { // 双灯 物理点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.blueColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 逻辑点灯
|
||||
physicsLight() {
|
||||
this.lamps.forEach(lamp => { lamp.setStop(true); });
|
||||
}
|
||||
// 物理点灯
|
||||
logicalLight() {
|
||||
this.lamps.forEach(lamp => { lamp.setStop(false); });
|
||||
}
|
||||
|
||||
// 设置自动进路模式状态类型
|
||||
setAutoRouteOpen() {
|
||||
this.sigAuto.setColor(this.style.Signal.auto.autoRoute);
|
||||
if (this.model.linkageAutoRouteShow) {
|
||||
this.sigAuto.show();
|
||||
} else {
|
||||
this.sigAuto.hide();
|
||||
}
|
||||
}
|
||||
// 逻辑点灯
|
||||
physicsLight() {
|
||||
this.lamps.forEach(lamp => { lamp.setStop(true); });
|
||||
}
|
||||
|
||||
// 信号机进路自动触发模式状态类型
|
||||
setAutoTriggerOpen() {
|
||||
this.sigAuto.setColor(this.style.Signal.auto.autoTrigger);
|
||||
if (this.model.atsAutoTriggerShow) {
|
||||
this.sigAuto.show();
|
||||
} else {
|
||||
this.sigAuto.hide();
|
||||
}
|
||||
}
|
||||
// 设置自动进路模式状态类型
|
||||
setAutoRouteOpen() {
|
||||
this.sigAuto.setColor(this.style.Signal.auto.autoRoute);
|
||||
if (this.model.linkageAutoRouteShow) {
|
||||
this.sigAuto.show();
|
||||
} else {
|
||||
this.sigAuto.hide();
|
||||
}
|
||||
}
|
||||
|
||||
// 设置自动信号模式状态类型
|
||||
setAutoSignalOpen() {
|
||||
this.sigRoute.show();
|
||||
}
|
||||
// 信号机进路自动触发模式状态类型
|
||||
setAutoTriggerOpen() {
|
||||
this.sigAuto.setColor(this.style.Signal.auto.autoTrigger);
|
||||
if (this.model.atsAutoTriggerShow) {
|
||||
this.sigAuto.show();
|
||||
} else {
|
||||
this.sigAuto.hide();
|
||||
}
|
||||
}
|
||||
|
||||
// 隐藏自动信号和自动进路
|
||||
setAutoClose() {
|
||||
this.sigAuto.hide();
|
||||
this.sigAuto.setColor(this.style.backgroundColor);
|
||||
this.sigRoute.hide();
|
||||
}
|
||||
// 设置自动信号模式状态类型
|
||||
setAutoSignalOpen() {
|
||||
this.sigRoute.show();
|
||||
}
|
||||
|
||||
// 自动信号和自动进路开始动画
|
||||
setAutoFlicker() {
|
||||
this.sigAuto.arrowsAnimation();
|
||||
}
|
||||
// 隐藏自动信号和自动进路
|
||||
setAutoClose() {
|
||||
this.sigAuto.hide();
|
||||
this.sigAuto.setColor(this.style.backgroundColor);
|
||||
this.sigRoute.hide();
|
||||
}
|
||||
|
||||
// 设置延时解锁
|
||||
setDelayUnlock() {
|
||||
this.sigDelay.show();
|
||||
}
|
||||
// 自动信号和自动进路开始动画
|
||||
setAutoFlicker() {
|
||||
this.sigAuto.arrowsAnimation();
|
||||
}
|
||||
|
||||
// 恢复状态
|
||||
recover() {
|
||||
this.sigName.setStyle({textBorderWidth: 0});
|
||||
this.sigAuto.hide();
|
||||
this.sigRoute.hide();
|
||||
this.sigDelay.hide();
|
||||
this.sigAuto.animationRecover();
|
||||
this.sigName.setColor(this.style.Signal.text.defaultColor);
|
||||
if (this.style.Signal.lamp.guidName == 'chengdu_03') {
|
||||
this.lamps[0].setStyle({ lineWidth: this.style.Signal.lamp.borderWidth });
|
||||
}
|
||||
}
|
||||
// 设置延时解锁
|
||||
setDelayUnlock() {
|
||||
this.sigDelay.show();
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
this.recover();
|
||||
/** 设置状态 (点灯类型)*/
|
||||
switch (model.status) {
|
||||
case '01': this.close(); break; // 关闭
|
||||
case '02': this.openPositive(); break; // 开放正向
|
||||
case '03': this.openLateral(); break; // 开放侧向
|
||||
case '04': this.guid(); break; // 引导
|
||||
case '05': this.block(); break; // 封锁
|
||||
case '06': this.fault(); break; // 故障
|
||||
case '07': this.block(); break; // 功能封锁
|
||||
case '08': this.signalCheck(); break; // 信号保护区段检测
|
||||
}
|
||||
// 恢复状态
|
||||
recover() {
|
||||
this.sigName.setStyle({textBorderWidth: 0});
|
||||
this.sigAuto.hide();
|
||||
this.sigRoute.hide();
|
||||
this.sigDelay.hide();
|
||||
this.sigAuto.animationRecover();
|
||||
this.sigName.setColor(this.style.Signal.text.defaultColor);
|
||||
if (this.style.Signal.lamp.guidName == 'chengdu_03') {
|
||||
this.lamps[0].setStyle({ lineWidth: this.style.Signal.lamp.borderWidth });
|
||||
}
|
||||
}
|
||||
|
||||
/** 进路性质类型*/
|
||||
switch (model.natureType) {
|
||||
case '01': this.trainRoute(); break; // 列车进路
|
||||
case '02': this.shuntRoute(); break; // 调车进路
|
||||
}
|
||||
setState(model) {
|
||||
this.recover();
|
||||
/** 设置状态 (点灯类型)*/
|
||||
switch (model.status) {
|
||||
case '01': this.close(); break; // 关闭
|
||||
case '02': this.openPositive(); break; // 开放正向
|
||||
case '03': this.openLateral(); break; // 开放侧向
|
||||
case '04': this.guid(); break; // 引导
|
||||
case '05': this.block(); break; // 封锁
|
||||
case '06': this.fault(); break; // 故障
|
||||
case '07': this.block(); break; // 功能封锁
|
||||
case '08': this.signalCheck(); break; // 信号保护区段检测
|
||||
}
|
||||
|
||||
/** 设置点灯类型*/
|
||||
switch (model.lightType) {
|
||||
case '01': this.logicalLight(); break; // 设置逻辑点灯
|
||||
case '02': this.physicsLight(); break; // 设置物理点灯
|
||||
}
|
||||
/** 进路性质类型*/
|
||||
switch (model.natureType) {
|
||||
case '01': this.trainRoute(); break; // 列车进路
|
||||
case '02': this.shuntRoute(); break; // 调车进路
|
||||
}
|
||||
|
||||
/** 设置自动类型*/
|
||||
switch (model.autoType) {
|
||||
case '01': this.setAutoClose(); break; // 隐藏 隐藏自动信号和自动进路
|
||||
case '02': this.setAutoSignalOpen(); break; // 显示 设置自动信号模式状态类型
|
||||
case '03': this.setAutoRouteOpen(); break; // 显示 设置自动进路模式状态类型
|
||||
case '04': this.setAutoTriggerOpen(); break; // 显示 信号机进路自动触发模式状态类型
|
||||
}
|
||||
/** 设置点灯类型*/
|
||||
switch (model.lightType) {
|
||||
case '01': this.logicalLight(); break; // 设置逻辑点灯
|
||||
case '02': this.physicsLight(); break; // 设置物理点灯
|
||||
}
|
||||
|
||||
/** 延时解锁*/
|
||||
switch (model.delayType) {
|
||||
case '01': break; // 未延时解锁
|
||||
case '02': this.setDelayUnlock(); break; // 人工闭塞延时解锁
|
||||
case '03': this.setDelayUnlock(); break; // 自动闭塞延时解锁
|
||||
}
|
||||
/** 设置自动类型*/
|
||||
switch (model.autoType) {
|
||||
case '01': this.setAutoClose(); break; // 隐藏 隐藏自动信号和自动进路
|
||||
case '02': this.setAutoSignalOpen(); break; // 显示 设置自动信号模式状态类型
|
||||
case '03': this.setAutoRouteOpen(); break; // 显示 设置自动进路模式状态类型
|
||||
case '04': this.setAutoTriggerOpen(); break; // 显示 信号机进路自动触发模式状态类型
|
||||
}
|
||||
|
||||
/** 信号机进路办理,先停止动画,再判断当前颜色是否闪烁*/
|
||||
if (model.routeSetting && (model.autoType == '03' || model.autoType == '04')) {
|
||||
this.setAutoFlicker();
|
||||
}
|
||||
}
|
||||
/** 延时解锁*/
|
||||
switch (model.delayType) {
|
||||
case '01': break; // 未延时解锁
|
||||
case '02': this.setDelayUnlock(); break; // 人工闭塞延时解锁
|
||||
case '03': this.setDelayUnlock(); break; // 自动闭塞延时解锁
|
||||
}
|
||||
|
||||
getBoundingRect() {
|
||||
const rect = this.sigPost.getBoundingRect();
|
||||
this.lamps.forEach(elem => {
|
||||
rect.union(elem.getBoundingRect());
|
||||
});
|
||||
return rect;
|
||||
}
|
||||
/** 信号机进路办理,先停止动画,再判断当前颜色是否闪烁*/
|
||||
if (model.routeSetting && (model.autoType == '03' || model.autoType == '04')) {
|
||||
this.setAutoFlicker();
|
||||
}
|
||||
}
|
||||
|
||||
getShapeTipPoint(opts) {
|
||||
var rect = new BoundingRect(0, 0, 0, 0);
|
||||
var drict = this.model.directionShowType == '01' ? -1 : 1; // 朝向 左:右
|
||||
var offsetY = this.model.positionType == '01' ? this.style.Signal.text.fontSize : 0; // 位置 上:下
|
||||
if (opts.val == '1' || opts.val == '2') {
|
||||
rect = this.sigButton.getBoundingRect();
|
||||
} else {
|
||||
rect = this.sigPost.getBoundingRect();
|
||||
}
|
||||
getBoundingRect() {
|
||||
const rect = this.sigPost.getBoundingRect();
|
||||
this.lamps.forEach(elem => {
|
||||
rect.union(elem.getBoundingRect());
|
||||
});
|
||||
return rect;
|
||||
}
|
||||
|
||||
return {
|
||||
x: rect.x + drict * this.style.Signal.post.standardWidth,
|
||||
y: rect.y - offsetY
|
||||
};
|
||||
}
|
||||
getShapeTipPoint(opts) {
|
||||
var rect = new BoundingRect(0, 0, 0, 0);
|
||||
var drict = this.model.directionShowType == '01' ? -1 : 1; // 朝向 左:右
|
||||
var offsetY = this.model.positionType == '01' ? this.style.Signal.text.fontSize : 0; // 位置 上:下
|
||||
if (opts.val == '1' || opts.val == '2') {
|
||||
rect = this.sigButton.getBoundingRect();
|
||||
} else {
|
||||
rect = this.sigPost.getBoundingRect();
|
||||
}
|
||||
|
||||
return {
|
||||
x: rect.x + drict * this.style.Signal.post.standardWidth,
|
||||
y: rect.y - offsetY
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export default Signal;
|
||||
|
@ -311,7 +311,7 @@ import { OperationEvent } from '@/scripts/ConstDic';
|
||||
// import { now } from '@/utils/date';
|
||||
import ConfirmTip from './childDialog/confirmTip';
|
||||
import { sendCommand } from '@/api/jmap/training';
|
||||
import router from '@/router';
|
||||
import router from '@/router/index_APP_TARGET';
|
||||
|
||||
export default {
|
||||
name: 'SectionCmdSpeed',
|
||||
|
@ -1,248 +1,256 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm view-name" title="名称显示设置" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-checkbox-group v-model="nameLevels">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="1">信号机名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="2">站台轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="3" disabled>按钮名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="4">折返轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="5">股道名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="6">转换轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="7">道岔名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="8">标识灯名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="9">道岔区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="10">目的地名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="11">计轴区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="12">公里标</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm view-name"
|
||||
title="名称显示设置"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-checkbox-group v-model="nameLevels">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="1">信号机名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="2">站台轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="3" disabled>按钮名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="4">折返轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="5">轨道名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="6">转换轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="7">道岔名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="8">标识灯名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="9">道岔区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="10">目的地名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="11">计轴区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="12">公里标</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'viewName',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
||||
export default {
|
||||
name: 'ViewName',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setNameDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活显示,而是第一次显示时,需要初始化参数
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setNameDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
//如果不是断点激活显示,而是第一次显示时,需要初始化参数
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.nameLevels.sort().join('::')
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.nameLevels.sort().join('::')
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setNameDisplay();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setNameDisplay() {
|
||||
const deviceList = [];
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setNameDisplay();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
setNameDisplay() {
|
||||
let deviceList = [];
|
||||
|
||||
//信号机
|
||||
let nameShow = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//按钮名称
|
||||
nameShow = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
||||
|
||||
|
||||
//道岔
|
||||
nameShow = this.nameLevels.indexOf(7) !== -1 ? true : false; //道岔名称
|
||||
let switchSectionNameShow = this.nameLevels.indexOf(9) !== -1 ? true : false; //道岔轨名称
|
||||
let switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//控制模式
|
||||
let indicatorShow = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
||||
let control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); //标识灯名称
|
||||
})
|
||||
}
|
||||
|
||||
//区段
|
||||
nameShow = false;
|
||||
let standTrackNameShow = false;
|
||||
let reentryTrackNameShow = false;
|
||||
let transferTrackNameShow = false;
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
if (elem.isSwitchSection && elem.parentCode) {
|
||||
//道岔轨的区段名称默认不显示
|
||||
nameShow = false;
|
||||
} else {
|
||||
if (elem.type === '01') {
|
||||
nameShow = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
||||
} else if (elem.type === '02') {
|
||||
//股道轨名称
|
||||
nameShow = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
||||
} else if (elem.type === '03') {
|
||||
//道岔区段名称
|
||||
nameShow = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
//站台轨名称
|
||||
if (elem.isStandTrack) {
|
||||
standTrackNameShow = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
//折返轨名称
|
||||
if (elem.isReentryTrack) {
|
||||
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
//转换轨名称
|
||||
if (elem.isTransferTrack) {
|
||||
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//停车点
|
||||
let destCodeShow = this.nameLevels.indexOf(10) !== -1 ? true : false;
|
||||
let stopPointList = this.$store.getters['map/stopPointList'];
|
||||
if (stopPointList && stopPointList.length > 0) {
|
||||
stopPointList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//车站
|
||||
let kmPostShow = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
||||
let stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); //公里标
|
||||
})
|
||||
}
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
// 信号机
|
||||
let nameShow = this.nameLevels.indexOf(1) !== -1;
|
||||
const signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 按钮名称
|
||||
nameShow = this.nameLevels.indexOf(3) !== -1;
|
||||
|
||||
// 道岔
|
||||
nameShow = this.nameLevels.indexOf(7) !== -1; // 道岔名称
|
||||
const switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; // 道岔轨名称
|
||||
const switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 控制模式
|
||||
const indicatorShow = this.nameLevels.indexOf(8) !== -1;
|
||||
const control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); // 标识灯名称
|
||||
});
|
||||
}
|
||||
|
||||
// 区段
|
||||
nameShow = false;
|
||||
let standTrackNameShow = false;
|
||||
let reentryTrackNameShow = false;
|
||||
let transferTrackNameShow = false;
|
||||
const sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
if (elem.isSwitchSection && elem.parentCode) {
|
||||
// 道岔轨的区段名称默认不显示
|
||||
nameShow = false;
|
||||
} else {
|
||||
if (elem.type === '01') {
|
||||
nameShow = this.nameLevels.indexOf(11) !== -1;
|
||||
} else if (elem.type === '02') {
|
||||
// 轨道轨名称
|
||||
nameShow = this.nameLevels.indexOf(5) !== -1;
|
||||
} else if (elem.type === '03') {
|
||||
// 道岔区段名称
|
||||
nameShow = this.nameLevels.indexOf(9) !== -1;
|
||||
}
|
||||
}
|
||||
|
||||
// 站台轨名称
|
||||
if (elem.isStandTrack) {
|
||||
standTrackNameShow = this.nameLevels.indexOf(2) !== -1;
|
||||
}
|
||||
|
||||
// 折返轨名称
|
||||
if (elem.isReentryTrack) {
|
||||
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1;
|
||||
}
|
||||
|
||||
// 转换轨名称
|
||||
if (elem.isTransferTrack) {
|
||||
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1;
|
||||
}
|
||||
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 停车点
|
||||
const destCodeShow = this.nameLevels.indexOf(10) !== -1;
|
||||
const stopPointList = this.$store.getters['map/stopPointList'];
|
||||
if (stopPointList && stopPointList.length > 0) {
|
||||
stopPointList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 车站
|
||||
const kmPostShow = this.nameLevels.indexOf(12) !== -1;
|
||||
const stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); // 公里标
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
};
|
||||
</script>
|
||||
|
@ -29,7 +29,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="5">股道名称</el-checkbox>
|
||||
<el-checkbox :label="5">轨道名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="6">转换轨名称</el-checkbox>
|
||||
@ -77,180 +77,180 @@ import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ViewName',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setNameDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活显示,而是第一次显示时,需要初始化参数
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
name: 'ViewName',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setNameDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活显示,而是第一次显示时,需要初始化参数
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.nameLevels.sort().join('::')
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.nameLevels.sort().join('::')
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setNameDisplay();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setNameDisplay() {
|
||||
const deviceList = [];
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setNameDisplay();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setNameDisplay() {
|
||||
const deviceList = [];
|
||||
|
||||
// 信号机
|
||||
let nameShow = this.nameLevels.indexOf(1) !== -1;
|
||||
const signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
||||
});
|
||||
}
|
||||
// 信号机
|
||||
let nameShow = this.nameLevels.indexOf(1) !== -1;
|
||||
const signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 按钮名称
|
||||
nameShow = this.nameLevels.indexOf(3) !== -1;
|
||||
// 按钮名称
|
||||
nameShow = this.nameLevels.indexOf(3) !== -1;
|
||||
|
||||
// 道岔
|
||||
nameShow = this.nameLevels.indexOf(7) !== -1; // 道岔名称
|
||||
const switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; // 道岔轨名称
|
||||
const switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
|
||||
});
|
||||
}
|
||||
// 道岔
|
||||
nameShow = this.nameLevels.indexOf(7) !== -1; // 道岔名称
|
||||
const switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; // 道岔轨名称
|
||||
const switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 控制模式
|
||||
const indicatorShow = this.nameLevels.indexOf(8) !== -1;
|
||||
const control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); // 标识灯名称
|
||||
});
|
||||
}
|
||||
// 控制模式
|
||||
const indicatorShow = this.nameLevels.indexOf(8) !== -1;
|
||||
const control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); // 标识灯名称
|
||||
});
|
||||
}
|
||||
|
||||
// 区段
|
||||
nameShow = false;
|
||||
let standTrackNameShow = false;
|
||||
let reentryTrackNameShow = false;
|
||||
let transferTrackNameShow = false;
|
||||
const sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
if (elem.isSwitchSection && elem.parentCode) {
|
||||
// 道岔轨的区段名称默认不显示
|
||||
nameShow = false;
|
||||
} else {
|
||||
if (elem.type === '01') {
|
||||
nameShow = this.nameLevels.indexOf(11) !== -1;
|
||||
} else if (elem.type === '02') {
|
||||
// 股道轨名称
|
||||
nameShow = this.nameLevels.indexOf(5) !== -1;
|
||||
} else if (elem.type === '03') {
|
||||
// 道岔区段名称
|
||||
nameShow = this.nameLevels.indexOf(9) !== -1;
|
||||
}
|
||||
}
|
||||
// 区段
|
||||
nameShow = false;
|
||||
let standTrackNameShow = false;
|
||||
let reentryTrackNameShow = false;
|
||||
let transferTrackNameShow = false;
|
||||
const sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
if (elem.isSwitchSection && elem.parentCode) {
|
||||
// 道岔轨的区段名称默认不显示
|
||||
nameShow = false;
|
||||
} else {
|
||||
if (elem.type === '01') {
|
||||
nameShow = this.nameLevels.indexOf(11) !== -1;
|
||||
} else if (elem.type === '02') {
|
||||
// 轨道轨名称
|
||||
nameShow = this.nameLevels.indexOf(5) !== -1;
|
||||
} else if (elem.type === '03') {
|
||||
// 道岔区段名称
|
||||
nameShow = this.nameLevels.indexOf(9) !== -1;
|
||||
}
|
||||
}
|
||||
|
||||
// 站台轨名称
|
||||
if (elem.isStandTrack) {
|
||||
standTrackNameShow = this.nameLevels.indexOf(2) !== -1;
|
||||
}
|
||||
// 站台轨名称
|
||||
if (elem.isStandTrack) {
|
||||
standTrackNameShow = this.nameLevels.indexOf(2) !== -1;
|
||||
}
|
||||
|
||||
// 折返轨名称
|
||||
if (elem.isReentryTrack) {
|
||||
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1;
|
||||
}
|
||||
// 折返轨名称
|
||||
if (elem.isReentryTrack) {
|
||||
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1;
|
||||
}
|
||||
|
||||
// 转换轨名称
|
||||
if (elem.isTransferTrack) {
|
||||
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1;
|
||||
}
|
||||
// 转换轨名称
|
||||
if (elem.isTransferTrack) {
|
||||
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1;
|
||||
}
|
||||
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
|
||||
});
|
||||
}
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 停车点
|
||||
const destCodeShow = this.nameLevels.indexOf(10) !== -1;
|
||||
const stopPointList = this.$store.getters['map/stopPointList'];
|
||||
if (stopPointList && stopPointList.length > 0) {
|
||||
stopPointList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
|
||||
});
|
||||
}
|
||||
// 停车点
|
||||
const destCodeShow = this.nameLevels.indexOf(10) !== -1;
|
||||
const stopPointList = this.$store.getters['map/stopPointList'];
|
||||
if (stopPointList && stopPointList.length > 0) {
|
||||
stopPointList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 车站
|
||||
const kmPostShow = this.nameLevels.indexOf(12) !== -1;
|
||||
const stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); // 公里标
|
||||
});
|
||||
}
|
||||
// 车站
|
||||
const kmPostShow = this.nameLevels.indexOf(12) !== -1;
|
||||
const stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); // 公里标
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -311,7 +311,7 @@ import { OperationEvent } from '@/scripts/ConstDic';
|
||||
// import { now } from '@/utils/date';
|
||||
import ConfirmTip from './childDialog/confirmTip';
|
||||
import { sendCommand } from '@/api/jmap/training';
|
||||
import router from '@/router';
|
||||
import router from '@/router/index_APP_TARGET';
|
||||
|
||||
export default {
|
||||
name: 'SectionCmdSpeed',
|
||||
|
@ -1,248 +1,256 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm view-name" title="名称显示设置" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-checkbox-group v-model="nameLevels">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="1">信号机名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="2">站台轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="3" disabled>按钮名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="4">折返轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="5">股道名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="6">转换轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="7">道岔名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="8">标识灯名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="9">道岔区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="10">目的地名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="11">计轴区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="12">公里标</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm view-name"
|
||||
title="名称显示设置"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-checkbox-group v-model="nameLevels">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="1">信号机名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="2">站台轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="3" disabled>按钮名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="4">折返轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="5">轨道名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="6">转换轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="7">道岔名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="8">标识灯名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="9">道岔区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="10">目的地名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="11">计轴区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="12">公里标</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'viewName',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
||||
export default {
|
||||
name: 'ViewName',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setNameDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活显示,而是第一次显示时,需要初始化参数
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setNameDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
//如果不是断点激活显示,而是第一次显示时,需要初始化参数
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.nameLevels.sort().join('::')
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.nameLevels.sort().join('::')
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setNameDisplay();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setNameDisplay() {
|
||||
const deviceList = [];
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setNameDisplay();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
setNameDisplay() {
|
||||
let deviceList = [];
|
||||
|
||||
//信号机
|
||||
let nameShow = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//按钮名称
|
||||
nameShow = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
||||
|
||||
|
||||
//道岔
|
||||
nameShow = this.nameLevels.indexOf(7) !== -1 ? true : false; //道岔名称
|
||||
let switchSectionNameShow = this.nameLevels.indexOf(9) !== -1 ? true : false; //道岔轨名称
|
||||
let switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//控制模式
|
||||
let indicatorShow = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
||||
let control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); //标识灯名称
|
||||
})
|
||||
}
|
||||
|
||||
//区段
|
||||
nameShow = false;
|
||||
let standTrackNameShow = false;
|
||||
let reentryTrackNameShow = false;
|
||||
let transferTrackNameShow = false;
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
if (elem.isSwitchSection && elem.parentCode) {
|
||||
//道岔轨的区段名称默认不显示
|
||||
nameShow = false;
|
||||
} else {
|
||||
if (elem.type === '01') {
|
||||
nameShow = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
||||
} else if (elem.type === '02') {
|
||||
//股道轨名称
|
||||
nameShow = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
||||
} else if (elem.type === '03') {
|
||||
//道岔区段名称
|
||||
nameShow = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
//站台轨名称
|
||||
if (elem.isStandTrack) {
|
||||
standTrackNameShow = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
//折返轨名称
|
||||
if (elem.isReentryTrack) {
|
||||
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
//转换轨名称
|
||||
if (elem.isTransferTrack) {
|
||||
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//停车点
|
||||
let destCodeShow = this.nameLevels.indexOf(10) !== -1 ? true : false;
|
||||
let stopPointList = this.$store.getters['map/stopPointList'];
|
||||
if (stopPointList && stopPointList.length > 0) {
|
||||
stopPointList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//车站
|
||||
let kmPostShow = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
||||
let stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); //公里标
|
||||
})
|
||||
}
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
// 信号机
|
||||
let nameShow = this.nameLevels.indexOf(1) !== -1;
|
||||
const signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 按钮名称
|
||||
nameShow = this.nameLevels.indexOf(3) !== -1;
|
||||
|
||||
// 道岔
|
||||
nameShow = this.nameLevels.indexOf(7) !== -1; // 道岔名称
|
||||
const switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; // 道岔轨名称
|
||||
const switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 控制模式
|
||||
const indicatorShow = this.nameLevels.indexOf(8) !== -1;
|
||||
const control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); // 标识灯名称
|
||||
});
|
||||
}
|
||||
|
||||
// 区段
|
||||
nameShow = false;
|
||||
let standTrackNameShow = false;
|
||||
let reentryTrackNameShow = false;
|
||||
let transferTrackNameShow = false;
|
||||
const sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
if (elem.isSwitchSection && elem.parentCode) {
|
||||
// 道岔轨的区段名称默认不显示
|
||||
nameShow = false;
|
||||
} else {
|
||||
if (elem.type === '01') {
|
||||
nameShow = this.nameLevels.indexOf(11) !== -1;
|
||||
} else if (elem.type === '02') {
|
||||
// 轨道轨名称
|
||||
nameShow = this.nameLevels.indexOf(5) !== -1;
|
||||
} else if (elem.type === '03') {
|
||||
// 道岔区段名称
|
||||
nameShow = this.nameLevels.indexOf(9) !== -1;
|
||||
}
|
||||
}
|
||||
|
||||
// 站台轨名称
|
||||
if (elem.isStandTrack) {
|
||||
standTrackNameShow = this.nameLevels.indexOf(2) !== -1;
|
||||
}
|
||||
|
||||
// 折返轨名称
|
||||
if (elem.isReentryTrack) {
|
||||
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1;
|
||||
}
|
||||
|
||||
// 转换轨名称
|
||||
if (elem.isTransferTrack) {
|
||||
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1;
|
||||
}
|
||||
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 停车点
|
||||
const destCodeShow = this.nameLevels.indexOf(10) !== -1;
|
||||
const stopPointList = this.$store.getters['map/stopPointList'];
|
||||
if (stopPointList && stopPointList.length > 0) {
|
||||
stopPointList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 车站
|
||||
const kmPostShow = this.nameLevels.indexOf(12) !== -1;
|
||||
const stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); // 公里标
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
};
|
||||
</script>
|
||||
|
@ -120,6 +120,13 @@ export default class defaultStyle {
|
||||
stroke: '#FFFFFF',
|
||||
fill: '#00FFFF'
|
||||
};
|
||||
/** 常规字体样式 */
|
||||
this.textStyle = {
|
||||
textAlign: 'center', // 文字居中
|
||||
textVerticalAlign: 'middle', // 文字垂直对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
fontWeight: 'normal' // 字体粗细
|
||||
};
|
||||
}
|
||||
}
|
||||
export const drawSectionStyle = {
|
||||
|
@ -270,29 +270,27 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
standEmergent: { // 紧急关闭
|
||||
mergentR: 4, // 站台紧急关闭半径
|
||||
offset: { x: 0, y: 0 }, // 站台紧急关闭偏移量
|
||||
insideOffset: { x: 0, y: -40 }, // 内站台紧急关闭偏移量
|
||||
outsideOffset: { x: 0, y: 20 }, // 外站台紧急关闭偏移量
|
||||
closeColor: '#F61107' // 站台紧急关闭颜色
|
||||
},
|
||||
reentry: { // 站台折返策略
|
||||
position: 0, // 折返方向
|
||||
offset: { x: -16, y: 18 }, // 折返偏移量
|
||||
noHumanColor: '#0F16DA', // 站台无人折返
|
||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
||||
},
|
||||
reentry: {}, // 站台折返策略
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
position: 1, // 扣车方向
|
||||
offset: { x: -8, y: 13 }, // 扣车偏移量
|
||||
trainColor: '#E4EF50', // 车站扣车颜色
|
||||
centerTrainColor: '#FFFFFF', // 中心扣车颜色
|
||||
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
headFontSize: 8,
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: { x: -8, y: 3 }, // 运行时间偏移量
|
||||
textColor: '#FFFFFF' // 停站时间字体颜色
|
||||
offset: { x: -8, y: 3 }, // 运行时间偏移量
|
||||
textColor: '#FFFFFF', // 停站时间字体颜色
|
||||
textFontSize: 8
|
||||
},
|
||||
trainStop: {}, // 停车标志
|
||||
trainDepart: {}, // 停车计时
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
offset: { x: -8, y: 10 }, // 运行等级偏移量
|
||||
@ -396,39 +394,46 @@ class SkinCode extends defaultStyle {
|
||||
|
||||
this[deviceType.Switch] = {
|
||||
text: {
|
||||
show: true, // 道岔名称显示
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
offset: { x: -15, y: -10 }, // 道岔名称与区段距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontColor: '#C0C0C0', // 道岔名称颜色
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
borderColor: '#FE0000', // 道岔边框颜色
|
||||
lossColor: '#FFFFFF', // 道岔失去颜色
|
||||
locateColor: '#00FF00', // 道岔定位颜色
|
||||
inversionColor: '#9C9D09', // 道岔反位颜色
|
||||
monolockColor: '#870E10' // 道岔单锁颜色
|
||||
show: true, // 道岔名称显示
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
offset: { x: -15, y: -10 }, // 道岔名称与区段距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontColor: '#C0C0C0', // 道岔名称颜色
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
borderColor: '#FE0000', // 道岔边框颜色
|
||||
lossColor: '#FFFFFF', // 道岔失去颜色
|
||||
locateColor: '#00FF00', // 道岔定位颜色
|
||||
inversionColor: '#9C9D09', // 道岔反位颜色
|
||||
monolockLocationColor: '#870E10', // 道岔单锁'定位'颜色
|
||||
monolockInversionColor: '#870E10', // 道岔单锁'反位'颜色
|
||||
block: true // 封锁名称
|
||||
},
|
||||
sectionAction: {
|
||||
flag: false, // 道岔 关联区段显示
|
||||
spareColor: '#5b5b5b' // 区段显示颜色
|
||||
flag: false, // 道岔 关联区段显示
|
||||
spareColor: '#5b5b5b' // 区段显示颜色
|
||||
},
|
||||
core: {
|
||||
length: 6 // 道岔单边长度
|
||||
length: 6 // 道岔单边长度
|
||||
},
|
||||
monolock: { // 道岔单锁配置
|
||||
locationColor: '#870E10', // 道岔单锁定位颜色 (红色)
|
||||
inversionColor: '#870E10', // 道岔单锁反位颜色 (红色)
|
||||
rectShow: false // 道岔单锁 矩形框是否显示
|
||||
jointImg: { // 道岔 A B C D四元素属性配置
|
||||
trapezoidLength: 8 // 直角梯形元素默认长度
|
||||
},
|
||||
block: { // 道岔封锁配置
|
||||
blockName: 'default', // 默认道岔封锁类型
|
||||
nameBorderShow: true, // 道岔名称是否有包围框 显示
|
||||
contentRectShow: false // 道岔封锁显示
|
||||
arcBlcok: { // 圆形封锁图形
|
||||
show: false, // 显示
|
||||
arcBorderColor: 'green', // 默认边框颜色
|
||||
locationColor: 'green', // 定位封锁颜色
|
||||
inversionColor: '#FFFF00' // 反位封锁颜色
|
||||
},
|
||||
rectLock: { // 矩形封锁框图形
|
||||
rectWidth: 18, // 矩形框 宽高
|
||||
rectBorderColor: '#fff', // 矩形边框颜色
|
||||
monolock: false, // 单锁显示
|
||||
block: false // 封锁显示
|
||||
},
|
||||
mouseOverStyle: {
|
||||
borderBackgroundColor: '#22DFDF', // 边框背景色
|
||||
borderColor: '#fff', // 边框颜色
|
||||
textShadowColor: '#22DFDF' // 字体阴影颜色
|
||||
borderBackgroundColor: '#22DFDF', // 边框背景色
|
||||
borderColor: '#fff', // 边框颜色
|
||||
textShadowColor: '#22DFDF' // 字体阴影颜色
|
||||
}
|
||||
};
|
||||
|
||||
@ -543,6 +548,8 @@ class SkinCode extends defaultStyle {
|
||||
trainBodyFillColor: '#725A64', // 列车车身填充颜色
|
||||
trainNameFormat: 'serviceNumber:tripNumber'// 列车显示格式
|
||||
},
|
||||
directionArrow: {
|
||||
},
|
||||
hsda: {
|
||||
lrPaddingHSDA: 3, // HSDA两边间隔
|
||||
upPaddingHSDA: 4, // HSDA上边距离
|
||||
@ -553,6 +560,7 @@ class SkinCode extends defaultStyle {
|
||||
textAContent: 'A'// textA文本
|
||||
},
|
||||
trainNumber: {
|
||||
targetCodePrefix: '000', // 目的地码前缀
|
||||
trainNumberOffset: { x: 0, y: 1 }// 目的地码偏移量
|
||||
},
|
||||
trainServer: {
|
||||
@ -591,7 +599,8 @@ class SkinCode extends defaultStyle {
|
||||
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
|
||||
useSelfFormat: true, // 使用配置项的nameFormat
|
||||
useSelfText: true, // 使用配置项的字体大小
|
||||
displayPosition: 'margin' // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
|
||||
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
|
||||
trainTip:true // 鼠标悬停列车状态信息框是否显示
|
||||
},
|
||||
trainStatusStyle: {
|
||||
destinationStatus: [
|
||||
|
@ -219,38 +219,37 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
standEmergent: { // 紧急关闭
|
||||
mergentR: 4, // 站台紧急关闭半径
|
||||
offset: {x: 0, y: 40}, // 站台紧急关闭偏移量
|
||||
insideOffset: { x: 0, y: 25 }, // 内站台紧急关闭偏移量
|
||||
outsideOffset: { x: 0, y: -25}, // 外站台紧急关闭偏移量
|
||||
closeColor: 'red' // 站台紧急关闭颜色
|
||||
},
|
||||
reentry: { // 站台折返策略
|
||||
position: 0, // 折返方向
|
||||
offset: {x: -16, y: 20}, // 折返偏移量
|
||||
noHumanColor: '#0F16DA', // 站台无人折返
|
||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
||||
},
|
||||
reentry: {}, // 站台折返策略
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
position: -1, // 扣车方向
|
||||
text: 'H', // 扣车显示内容
|
||||
offset: {x: -8, y: 13}, // 扣车偏移量
|
||||
trainColor: 'yellow', // 车站扣车颜色
|
||||
centerTrainColor: 'white', // 中心扣车颜色
|
||||
andCenterTrainColor: 'red', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
fontSize: 10,
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: {x: -8, y: -4}, // 运行时间偏移量
|
||||
textColor: 'white' // 停站时间字体颜色
|
||||
textColor: 'white', // 停站时间字体颜色
|
||||
textFontSize: 12
|
||||
},
|
||||
jump: {
|
||||
text: '跳', // 停跳显示内容
|
||||
position: -1, // 停跳方向
|
||||
offset: {x: -8, y: 0},
|
||||
textColor: '#0000FF', // 停跳文字颜色
|
||||
arcColor: '#0000FF', // 停跳圆圈颜色
|
||||
offset: {x: -8, y: 10},
|
||||
textColor: '#00ffcc', // 停跳文字颜色
|
||||
arcColor: '#00ffcc', // 停跳圆圈颜色
|
||||
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
|
||||
r: 8 // 圆半径大小
|
||||
r: 8, // 圆半径大小
|
||||
fontWeight: 'normal', // 文字居中
|
||||
textFontSize: 11 // 圆半径大小
|
||||
},
|
||||
trainStop: {}, // 停车标志
|
||||
trainDepart: {}, // 停车计时
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
offset: {x: -8, y: 30}, // 运行等级偏移量
|
||||
@ -376,7 +375,8 @@ class SkinCode extends defaultStyle {
|
||||
lossColor: 'lightgreen', // 道岔失去颜色
|
||||
locateColor: 'lightgreen', // 道岔定位颜色
|
||||
inversionColor: 'lightgreen', // 道岔反位颜色
|
||||
monolockColor: '#FFFFFF' // 道岔单锁颜色
|
||||
monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
|
||||
monolockInversionColor: '#FFFF00' // 道岔单锁'反位'颜色 (黄色)
|
||||
},
|
||||
sectionAction: {
|
||||
flag: false, // 道岔 关联区段显示
|
||||
@ -385,18 +385,21 @@ class SkinCode extends defaultStyle {
|
||||
core: {
|
||||
length: 10 // 道岔单边长度
|
||||
},
|
||||
monolock: { // 道岔单锁配置
|
||||
locationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
|
||||
inversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色)
|
||||
rectShow: true, // 道岔单锁 矩形框是否显示
|
||||
rectWidth: 18, // 矩形框 宽高
|
||||
rectBorderColor: '#fff' // 矩形边框颜色
|
||||
jointImg: { // 道岔 A B C D四元素属性配置
|
||||
trapezoidLength: 8 // 直角梯形元素默认长度
|
||||
},
|
||||
block: { // 道岔封锁配置
|
||||
blockName: 'default', // 默认道岔封锁类型
|
||||
nameBorderShow: false, // 道岔名称是否有包围框 显示
|
||||
contentRectShow: true, // 道岔封锁显示
|
||||
contentRectColor: 'red' // 道岔封锁边框颜色
|
||||
arcBlcok: { // 圆形封锁图形
|
||||
show: false, // 显示
|
||||
arcBorderColor: 'green', // 默认边框颜色
|
||||
locationColor: 'green', // 定位封锁颜色
|
||||
inversionColor: '#FFFF00' // 反位封锁颜色
|
||||
},
|
||||
rectLock: { // 矩形封锁框图形
|
||||
rectWidth: 18, // 矩形框 宽高
|
||||
rectBorderColor: '#fff', // 矩形边框颜色
|
||||
monolock: true, // 单锁显示
|
||||
block: true, // 封锁显示
|
||||
blockColor: 'red' // 封锁颜色
|
||||
}
|
||||
};
|
||||
|
||||
@ -488,6 +491,8 @@ class SkinCode extends defaultStyle {
|
||||
trainBodyFillColor: '#000099', // 列车车身填充颜色
|
||||
trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
|
||||
},
|
||||
directionArrow: {
|
||||
},
|
||||
hsda: {
|
||||
lrPaddingHSDA: 3, // HSDA两边间隔
|
||||
upPaddingHSDA: 4, // HSDA上边距离
|
||||
@ -541,7 +546,8 @@ class SkinCode extends defaultStyle {
|
||||
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
|
||||
useSelfFormat: true, // 使用配置项的nameFormat
|
||||
useSelfText: true, // 使用配置项的字体大小
|
||||
displayPosition: 'margin' // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
|
||||
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
|
||||
trainTip:true // 鼠标悬停列车状态信息框是否显示
|
||||
},
|
||||
trainStatusStyle: {
|
||||
defaultDestinationColor: '#FFFFFF', // 默认目的地状态显示颜色
|
||||
|
@ -225,39 +225,37 @@ class SkinCode extends defaultStyle {
|
||||
standEmergent: { // 紧急关闭
|
||||
flicker: true, // 闪烁
|
||||
mergentR: 5, // 站台紧急关闭半径
|
||||
offset: {x: 0, y: 15}, // 站台紧急关闭偏移量
|
||||
insideOffset: { x: 0, y: 30 }, // 内站台紧急关闭偏移量
|
||||
outsideOffset: { x: 0, y: -30}, // 外站台紧急关闭偏移量
|
||||
closeColor: '#F61107' // 站台紧急关闭颜色
|
||||
},
|
||||
reentry: { // 站台折返策略
|
||||
position: 0, // 折返方向
|
||||
offset: {x: -16, y: 20}, // 折返偏移量
|
||||
noHumanColor: '#0F16DA', // 站台无人折返
|
||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
||||
},
|
||||
reentry: {}, // 站台折返策略
|
||||
detainCar: { // 扣车
|
||||
text: '扣', // 扣车显示内容
|
||||
position: -1, // 扣车方向
|
||||
offset: {x: -8, y: 13}, // 扣车偏移量
|
||||
trainColor: '#FFFF00', // 车站扣车颜色
|
||||
centerTrainColor: '#C0C0C0', // 中心扣车颜色
|
||||
andCenterTrainColor: '#C0C0C0', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
fontSize: 10,
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: {x: -8, y: -4}, // 运行时间偏移量
|
||||
textColor: '#C0C0C0', // 停站时间字体颜色
|
||||
textFontSize: 12
|
||||
textFontSize: 10
|
||||
},
|
||||
jump: {
|
||||
text: '跳', // 停跳显示内容
|
||||
position: -1, // 停跳方向
|
||||
offset: {x: -8, y: 10},
|
||||
textColor: '#00ffcc', // 停跳文字颜色
|
||||
arcColor: '#00ffcc', // 停跳圆圈颜色
|
||||
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
|
||||
r: 8 // 圆半径大小
|
||||
r: 8, // 圆半径大小
|
||||
fontWeight: 'normal',
|
||||
textFontSize: 11
|
||||
},
|
||||
trainStop: {}, // 停车标志
|
||||
trainDepart: {}, // 停车计时
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
offset: {x: -8, y: 15}, // 运行等级偏移量
|
||||
@ -359,7 +357,8 @@ class SkinCode extends defaultStyle {
|
||||
lossColor: '#C00808', // 道岔失去颜色
|
||||
locateColor: '#00FF00', // 道岔定位颜色
|
||||
inversionColor: '#FFFF00', // 道岔反位颜色
|
||||
monolockColor: '#FFFFFF' // 道岔单锁颜色
|
||||
monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
|
||||
monolockInversionColor: '#FFFF00' // 道岔单锁'反位'颜色 (黄色)
|
||||
},
|
||||
sectionAction: {
|
||||
flag: false, // 道岔 关联区段显示
|
||||
@ -368,18 +367,21 @@ class SkinCode extends defaultStyle {
|
||||
core: {
|
||||
length: 6 // 道岔单边长度
|
||||
},
|
||||
monolock: { // 道岔单锁配置
|
||||
locationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
|
||||
inversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色)
|
||||
rectShow: true, // 道岔单锁 矩形框是否显示
|
||||
rectWidth: 18, // 矩形框 宽高
|
||||
rectBorderColor: '#fff' // 矩形边框颜色
|
||||
jointImg: { // 道岔 A B C D四元素属性配置
|
||||
trapezoidLength: 8 // 直角梯形元素默认长度
|
||||
},
|
||||
block: { // 道岔封锁配置
|
||||
blockName: 'default', // 默认道岔封锁类型
|
||||
nameBorderShow: false, // 道岔名称是否有包围框 显示
|
||||
contentRectShow: true, // 道岔封锁显示
|
||||
contentRectColor: 'red' // 道岔封锁边框颜色
|
||||
arcBlcok: { // 圆形封锁图形
|
||||
show: false, // 显示
|
||||
arcBorderColor: 'green', // 默认边框颜色
|
||||
locationColor: 'green', // 定位封锁颜色
|
||||
inversionColor: '#FFFF00' // 反位封锁颜色
|
||||
},
|
||||
rectLock: { // 矩形封锁框图形
|
||||
rectWidth: 18, // 矩形框 宽高
|
||||
rectBorderColor: '#fff', // 矩形边框颜色
|
||||
monolock: true, // 单锁显示
|
||||
block: true, // 封锁显示
|
||||
blockColor: 'red' // 封锁颜色
|
||||
}
|
||||
};
|
||||
|
||||
@ -403,7 +405,9 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
controlColor: '#00FF00', // 控制灯颜色
|
||||
offColor: '#000',
|
||||
strokeColor: '#fff'
|
||||
}
|
||||
};
|
||||
this[deviceType.Maintain] = {
|
||||
@ -431,6 +435,31 @@ class SkinCode extends defaultStyle {
|
||||
}
|
||||
};
|
||||
this[deviceType.AtsControl] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00', // 控制灯颜色
|
||||
offColor: '#FF0000'
|
||||
}
|
||||
};
|
||||
this[deviceType.MaintenanceLamps] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.ZcCommunication] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
@ -451,7 +480,8 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
controlColor: '#00FF00', // 控制灯颜色
|
||||
offColor: '#ff0000'
|
||||
}
|
||||
};
|
||||
this[deviceType.IntersiteControl] = {
|
||||
@ -499,7 +529,8 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
controlColor: '#00FF00', // 控制灯颜色
|
||||
offColor: '#ff0000'
|
||||
}
|
||||
};
|
||||
this[deviceType.ZcControl] = {
|
||||
@ -637,6 +668,8 @@ class SkinCode extends defaultStyle {
|
||||
trainBodyFillColor: '#000099', // 列车车身填充颜色
|
||||
trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
|
||||
},
|
||||
directionArrow: {
|
||||
},
|
||||
hsda: {
|
||||
lrPaddingHSDA: 3, // HSDA两边间隔
|
||||
upPaddingHSDA: 4, // HSDA上边距离
|
||||
@ -689,7 +722,8 @@ class SkinCode extends defaultStyle {
|
||||
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
|
||||
useSelfFormat: true, // 使用配置项的nameFormat
|
||||
useSelfText: true, // 使用配置项的字体大小
|
||||
displayPosition: 'margin' // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
|
||||
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
|
||||
trainTip:true // 鼠标悬停列车状态信息框是否显示
|
||||
},
|
||||
trainStatusStyle: {
|
||||
trainTypeStatus: [
|
||||
|
@ -77,7 +77,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
line: {
|
||||
width: 5, // 区段宽度
|
||||
beyondWidth: 1, // 区段宽超出宽度
|
||||
beyondWidth: 0, // 区段宽超出宽度
|
||||
invadeColor: '#EF0C08', // 区段侵入颜色
|
||||
spareColor: '#3F3F3F', // 区段空闲颜色
|
||||
communicationOccupiedColor: '#FF329A', // 区段通信车占用颜色
|
||||
@ -144,7 +144,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
lamp: {
|
||||
bgShow: false, // 是否被选中
|
||||
guidName: 'defult', // 默认引导类型
|
||||
guidName: 'ningbo_01', // 默认引导类型
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 1, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
@ -158,19 +158,21 @@ class SkinCode extends defaultStyle {
|
||||
blueColor: '#0070C0' // 信号灯蓝色
|
||||
},
|
||||
route: {
|
||||
direction: false, // 自动进路方向
|
||||
offset: { x: -4, y: 0 }, // 自动进路偏移量
|
||||
routeColor: '#00FF00' // 自动进路
|
||||
direction: false, // 自动通过方向
|
||||
radiusR: 8, // 自动通过三角半径
|
||||
offset: { x: 2, y: 0 }, // 自动通过偏移量
|
||||
routeColor: '#00FF00' // 自动进路
|
||||
},
|
||||
auto: {
|
||||
signalFrontTriangle: false, // 信号灯前三角展示
|
||||
direction: false, // 自动通过方向
|
||||
offset: { x: -4, y: 0}, // 自动通过偏移量
|
||||
width: 5, // 自动宽度
|
||||
autoRoute: '#00FF00', // 自动进路
|
||||
autoTrigger: '#FFFF00', // 自动触发
|
||||
manualControl: '#FFFF00', // 人工控制
|
||||
outConflict: '#C00808' // 出车冲突
|
||||
auto: { // 人工进路显示状态
|
||||
signalFrontTriangle: true, // 信号灯前三角展示
|
||||
fleetModeTriangle: false, // 自动进路显示三角形非箭头
|
||||
direction: false, // 自动通过方向
|
||||
offset: { x: -4, y: 0 }, // 自动通过偏移量
|
||||
width: 5, // 自动宽度
|
||||
manualControl: '#FFFF00', // 人工控制
|
||||
autoRoute: '#00FF00', // 自动进路 (绿色)
|
||||
autoTrigger: '#FFFF00', // 自动触发
|
||||
outConflict: '#C00808' // 出车冲突
|
||||
},
|
||||
delay: {
|
||||
direction: true, // 延时解锁方向
|
||||
@ -193,6 +195,7 @@ class SkinCode extends defaultStyle {
|
||||
this[deviceType.StationStand] = {
|
||||
common: { // 通用属性
|
||||
textFontSize: 11, // 站台默认字体大小
|
||||
haveJumpShow: true, // 站台是否有列车停跳显示
|
||||
functionButtonShow: '03' // 功能灯按钮显示条件(01所有模式下显示 02 行调显示 03现地显示)
|
||||
},
|
||||
safetyDoor: { // 屏蔽门
|
||||
@ -207,36 +210,44 @@ class SkinCode extends defaultStyle {
|
||||
spareColor: '#606060', // 站台空闲颜色
|
||||
stopColor: '#FEFE00', // 站台列车停站颜色
|
||||
jumpStopColor: '#9A99FF', // 站台跳停颜色
|
||||
designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色
|
||||
designatedJumpStopColor: '#606060' // 站台指定列车跳停颜色
|
||||
},
|
||||
standEmergent: { // 紧急关闭
|
||||
mergentR: 4, // 站台紧急关闭半径
|
||||
offset: {x: 0, y: 40}, // 站台紧急关闭偏移量
|
||||
insideOffset: { x: 0, y: 25}, // 内站台紧急关闭偏移量
|
||||
outsideOffset: { x: 0, y: 15}, // 外站台紧急关闭偏移量
|
||||
closeColor: '#F61107' // 站台紧急关闭颜色
|
||||
},
|
||||
reentry: { // 站台折返策略
|
||||
position: 0, // 折返方向
|
||||
offset: {x: -16, y: 20}, // 折返偏移量
|
||||
noHumanColor: '#0F16DA', // 站台无人折返
|
||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
||||
},
|
||||
reentry: {}, // 站台折返策略
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
position: -1, // 扣车方向
|
||||
offset: {x: -8, y: -6}, // 扣车偏移量
|
||||
trainColor: '#E4EF50', // 车站扣车颜色
|
||||
offset: {x: -8, y: 13}, // 扣车偏移量
|
||||
centerTrainColor: '#FFFFFF', // 中心扣车颜色
|
||||
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
fontSize: 11,
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: {x: -8, y: 26}, // 运行时间偏移量
|
||||
textColor: '#FFFFFF' // 停站时间字体颜色
|
||||
stopTime: { // 停站时间
|
||||
offset: {x: 37, y: 5}, // 停站时间偏移量
|
||||
textColor: '#C0C0C0', // 停站时间字体颜色
|
||||
textFontSize: 11
|
||||
},
|
||||
jump: {
|
||||
text: 'S', // 停跳显示内容
|
||||
offset: {x: -8, y: -5},
|
||||
textColor: '#5376B3', // 停跳文字颜色
|
||||
arcColor: '#000000', // 停跳圆圈颜色
|
||||
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
|
||||
r: 8, // 圆半径大小
|
||||
fontWeight: 'normal', // 文字居中
|
||||
textFontSize: 11
|
||||
},
|
||||
trainStop: {}, // 停车标志
|
||||
trainDepart: {}, // 停车计时
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
offset: {x: -8, y: 6}, // 运行等级偏移量
|
||||
offset: {x: -8, y: -6}, // 运行等级偏移量
|
||||
textColor: '#FFFFFF' // 停站等级字体颜色
|
||||
},
|
||||
text: {
|
||||
@ -375,15 +386,17 @@ class SkinCode extends defaultStyle {
|
||||
text: {
|
||||
show: true, // 道岔名称显示
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
offset: {x: 0, y: 8}, // 道岔名称与区段距离
|
||||
offset: { x: 5, y: -10 }, // 道岔名称与区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontColor: '#C0C0C0', // 道岔名称颜色
|
||||
fontWeight: 'bold', // 字体粗细
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
borderColor: '#FE0000', // 道岔边框颜色
|
||||
lossColor: '#FFFFFF', // 道岔失去颜色
|
||||
locateColor: '#00FF00', // 道岔定位颜色
|
||||
inversionColor: '#9C9D09', // 道岔反位颜色
|
||||
monolockColor: '#870E10' // 道岔单锁颜色
|
||||
inversionColor: '#FFFF00', // 道岔反位颜色
|
||||
monolockLocationColor: '#c00000', // 道岔单锁'定位'颜色 (红色)
|
||||
monolockInversionColor: '#c00000', // 道岔单锁'反位'颜色 (红色)
|
||||
block: true // 封锁名称
|
||||
},
|
||||
sectionAction: {
|
||||
flag: false, // 道岔 关联区段显示
|
||||
@ -392,15 +405,20 @@ class SkinCode extends defaultStyle {
|
||||
core: {
|
||||
length: 6 // 道岔单边长度
|
||||
},
|
||||
block: { // 道岔封锁配置
|
||||
blockName: 'default', // 默认道岔封锁类型
|
||||
nameBorderShow: true, // 道岔名称是否有包围框 显示
|
||||
contentRectShow: false // 道岔封锁显示
|
||||
jointImg: { // 道岔 A B C D四元素属性配置
|
||||
trapezoidLength: 8 // 直角梯形元素默认长度
|
||||
},
|
||||
monolock: { // 道岔单锁配置
|
||||
locationColor: '#ea282c', // 道岔单锁定位颜色 (红色)
|
||||
inversionColor: '#ea282c', // 道岔单锁反位颜色 (红色)
|
||||
rectShow: false // 道岔单锁 矩形框是否显示
|
||||
arcBlcok: { // 圆形封锁图形
|
||||
show: false, // 显示
|
||||
arcBorderColor: 'green', // 默认边框颜色
|
||||
locationColor: 'green', // 定位封锁颜色
|
||||
inversionColor: '#FFFF00' // 反位封锁颜色
|
||||
},
|
||||
rectLock: { // 矩形封锁框图形
|
||||
rectWidth: 22, // 矩形框 宽高
|
||||
rectBorderColor: '#fff', // 矩形边框颜色
|
||||
monolock: false, // 单锁显示
|
||||
block: false // 封锁显示
|
||||
}
|
||||
};
|
||||
|
||||
@ -514,6 +532,8 @@ class SkinCode extends defaultStyle {
|
||||
trainBodyFillColor: '#000000', // 列车车身填充颜色
|
||||
trainNameFormat: 'targetCode:serviceNumber:tripNumber'// 列车显示格式
|
||||
},
|
||||
directionArrow: {
|
||||
},
|
||||
hsda: {
|
||||
trainHSDATextFontSize: 8// 列车HDSA字号
|
||||
},
|
||||
@ -561,7 +581,8 @@ class SkinCode extends defaultStyle {
|
||||
aspectRatio: 8 / 15, // 字体宽高比例(用以拼接text是计算位置)
|
||||
textOffset: 1, // 字体偏移(用以控制字体据车头的距离)
|
||||
trainWidthMoreText: 2, // 计算列车长度时--列车长比text多出尺寸
|
||||
displayPosition: 'margin' // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
|
||||
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
|
||||
trainTip:true // 鼠标悬停列车状态信息框是否显示
|
||||
},
|
||||
trainStatusStyle: {
|
||||
destinationStatus: [
|
||||
|
@ -373,34 +373,41 @@ class SkinCode extends defaultStyle {
|
||||
|
||||
this[deviceType.Switch] = {
|
||||
text: {
|
||||
show: true, // 道岔名称显示
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
offset: {x: 0, y: 8}, // 道岔名称与区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontColor: '#C0C0C0', // 道岔名称颜色
|
||||
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', // 道岔反位颜色
|
||||
monolockColor: '#870E10' // 道岔单锁颜色
|
||||
borderColor: '#FE0000', // 道岔边框颜色
|
||||
lossColor: '#FFFFFF', // 道岔失去颜色
|
||||
locateColor: '#00FF00', // 道岔定位颜色
|
||||
inversionColor: '#9C9D09', // 道岔反位颜色
|
||||
monolockLocationColor: '#ea282c', // 道岔单锁'定位'颜色
|
||||
monolockInversionColor: '#ea282c', // 道岔单锁'反位'颜色
|
||||
block: true // 封锁名称
|
||||
},
|
||||
sectionAction: {
|
||||
flag: false, // 道岔 关联区段显示
|
||||
spareColor: '#5b5b5b' // 区段显示颜色
|
||||
flag: false, // 道岔 关联区段显示
|
||||
spareColor: '#5b5b5b' // 区段显示颜色
|
||||
},
|
||||
core: {
|
||||
length: 6 // 道岔单边长度
|
||||
length: 6 // 道岔单边长度
|
||||
},
|
||||
block: { // 道岔封锁配置
|
||||
blockName: 'default', // 默认道岔封锁类型
|
||||
nameBorderShow: true, // 道岔名称是否有包围框 显示
|
||||
contentRectShow: false // 道岔封锁显示
|
||||
block: { // 道岔封锁配置
|
||||
blockName: 'default' // 默认道岔封锁类型
|
||||
},
|
||||
monolock: { // 道岔单锁配置
|
||||
locationColor: '#ea282c', // 道岔单锁定位颜色 (红色)
|
||||
inversionColor: '#ea282c', // 道岔单锁反位颜色 (红色)
|
||||
rectShow: false // 道岔单锁 矩形框是否显示
|
||||
arcBlcok: { // 圆形封锁图形
|
||||
show: false, // 显示
|
||||
arcBorderColor: 'green', // 默认边框颜色
|
||||
locationColor: 'green', // 定位封锁颜色
|
||||
inversionColor: '#FFFF00' // 反位封锁颜色
|
||||
},
|
||||
rectLock: { // 矩形封锁框图形
|
||||
rectWidth: 18, // 矩形框 宽高
|
||||
rectBorderColor: '#fff', // 矩形边框颜色
|
||||
monolock: false, // 单锁显示
|
||||
block: false // 封锁显示
|
||||
}
|
||||
};
|
||||
|
||||
@ -514,6 +521,8 @@ class SkinCode extends defaultStyle {
|
||||
trainBodyFillColor: '#000000', // 列车车身填充颜色
|
||||
trainNameFormat: 'targetCode:serviceNumber:tripNumber'// 列车显示格式
|
||||
},
|
||||
directionArrow: {
|
||||
},
|
||||
hsda: {
|
||||
trainHSDATextFontSize: 8// 列车HDSA字号
|
||||
},
|
||||
@ -561,7 +570,8 @@ class SkinCode extends defaultStyle {
|
||||
aspectRatio: 8 / 15, // 字体宽高比例(用以拼接text是计算位置)
|
||||
textOffset: 1, // 字体偏移(用以控制字体据车头的距离)
|
||||
trainWidthMoreText: 2, // 计算列车长度时--列车长比text多出尺寸
|
||||
displayPosition: 'margin' // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
|
||||
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
|
||||
trainTip:true // 鼠标悬停列车状态信息框是否显示
|
||||
},
|
||||
trainStatusStyle: {
|
||||
destinationStatus: [
|
||||
|
@ -64,7 +64,7 @@ class SkinCode extends defaultStyle {
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
destinationText: {
|
||||
show: true, // 目的码名称显示
|
||||
show: false, // 目的码名称显示
|
||||
opposite: true, // 对称相反
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 10, // 文字离区段距离
|
||||
@ -219,38 +219,42 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
standEmergent: { // 紧急关闭
|
||||
mergentR: 4, // 站台紧急关闭半径
|
||||
offset: { x: 0, y: 40 }, // 站台紧急关闭偏移量
|
||||
closeColor: '#F61107' // 站台紧急关闭颜色
|
||||
},
|
||||
reentry: { // 站台折返策略
|
||||
position: 0, // 折返方向
|
||||
offset: { x: -16, y: 20 }, // 折返偏移量
|
||||
noHumanColor: '#0F16DA', // 站台无人折返
|
||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
||||
insideOffset: { x: -10, y: -20 }, // 内站台紧急关闭偏移量
|
||||
outsideOffset: { x: -10, y: -10}, // 外站台紧急关闭偏移量
|
||||
closeColor: '#F61107', // 站台紧急关闭颜色
|
||||
width: 4,
|
||||
radiusR: 6
|
||||
},
|
||||
reentry: {}, // 站台折返策略
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
fontSize: 18, // 扣车字体大小
|
||||
position: -1, // 扣车方向
|
||||
offset: { x: -8, y: -6 }, // 扣车偏移量
|
||||
trainColor: '#E4EF50', // 车站扣车颜色
|
||||
centerTrainColor: 'red', // 中心扣车颜色
|
||||
fontSize: 18, // 扣车字体大小
|
||||
offset: { x: 60, y: -20 }, // 扣车偏移量
|
||||
centerTrainColor: '#F61107', // 中心扣车颜色
|
||||
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
fontWeight: 'bold'
|
||||
},
|
||||
jump: {
|
||||
text: '跳', // 停跳显示内容
|
||||
position: -1, // 停跳方向
|
||||
offset: { x: -8, y: 0 },
|
||||
textColor: '#0000FF', // 停跳文字颜色
|
||||
arcColor: '#0000FF', // 停跳圆圈颜色
|
||||
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
|
||||
r: 8 // 圆半径大小
|
||||
text: 'S', // 停跳显示内容
|
||||
offset: { x: 10, y: 20 },
|
||||
textColor: '#00FF00', // 停跳文字颜色
|
||||
fontWeight: 'bold',
|
||||
fontSize: 18
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: { x: -8, y: 26 }, // 运行时间偏移量
|
||||
textColor: '#FFFFFF' // 停站时间字体颜色
|
||||
stopTime: {}, // 停站时间
|
||||
trainStop: { // 停车标志
|
||||
fillColor: '#FF0000',
|
||||
insideOffset:{ x: 6, y: -22}, // 内站台停车标志偏移量
|
||||
outsideOffset: { x: -6, y: 22}, // 外站台停车标志偏移量
|
||||
radiusR: 4 // 标志半径
|
||||
},
|
||||
trainDepart:{ // 停车计时
|
||||
insideOffset:{ x: 25, y: -21}, // 内站台停车计时偏移量
|
||||
outsideOffset: { x: -25, y: 21}, // 外站台停车计时偏移量
|
||||
textFill: '#00FF00', // 文字颜色
|
||||
textBorderColor: '#00FF00', // 文字边框颜色
|
||||
fontSize: 10 // 字体大小
|
||||
},
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
@ -392,40 +396,49 @@ class SkinCode extends defaultStyle {
|
||||
|
||||
this[deviceType.Switch] = {
|
||||
text: {
|
||||
show: true, // 道岔名称显示
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
offset: { x: 0, y: 8 }, // 道岔名称与区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
show: true, // 道岔名称显示
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
offset: { x: 0, y: 8 }, // 道岔名称与区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontColor: '#fff', // 道岔名称颜色
|
||||
fontWeight: 'bold', // 字体粗细
|
||||
borderColor: 'red', // 道岔边框颜色
|
||||
lossColor: '#FFFFFF', // 道岔失去颜色
|
||||
locateColor: '#fff', // 道岔定位颜色
|
||||
lossColor: '#FFFFFF', // 道岔失去颜色
|
||||
locateColor: '#fff', // 道岔定位颜色
|
||||
inversionColor: '#fff', // 道岔反位颜色
|
||||
monolockColor: '#fff' // 道岔单锁颜色
|
||||
monolock: true, // 名称单锁显示包围框
|
||||
monolockLocationColor: '#fff', // 道岔单锁'定位'颜色
|
||||
monolockInversionColor: '#fff' // 道岔单锁'反位'颜色
|
||||
},
|
||||
sectionAction: {
|
||||
flag: true, // 道岔 关联区段显示
|
||||
spareColor: '#5b5b5b' // 区段显示颜色 (灰色)
|
||||
flag: true, // 道岔 关联区段显示
|
||||
spareColor: '#5b5b5b' // 区段显示颜色 (灰色)
|
||||
},
|
||||
core: {
|
||||
splice: true, // 哈尔滨特殊显示
|
||||
length: 6 // 道岔单边长度
|
||||
splice: true, // 哈尔滨特殊显示
|
||||
length: 6 // 道岔单边长度
|
||||
},
|
||||
block: { // 道岔封锁配置
|
||||
blockName: 'default', // 默认道岔封锁类型
|
||||
nameBorderShow: false, // 道岔名称是否有包围框 显示
|
||||
contentRectShow: false, // 道岔封锁显示
|
||||
contentRectColor: '#fff', // 道岔封锁名称颜色
|
||||
rhomboidShow: true // 道岔单独显示
|
||||
trapezoid: { // 直角梯形元素
|
||||
length: 16, // 默认长度
|
||||
block: true // 封锁显示
|
||||
},
|
||||
monolock: { // 道岔单锁配置
|
||||
locationColor: '#fff', // 道岔单锁定位颜色 (红色)
|
||||
inversionColor: '#fff', // 道岔单锁反位颜色 (红色)
|
||||
nameBorderShow: true, // 道岔名称是否有包围框 显示
|
||||
rectShow: false, // 道岔单锁 矩形框是否显示
|
||||
jointImg: { // 道岔 A B C D四元素属性配置
|
||||
trapezoidLength: 8, // 直角梯形元素默认长度
|
||||
trapezoidBlock: true, // 梯形封锁显示
|
||||
fork: true, // 挤岔专用(如有挤岔操作 变为true)
|
||||
forKColor: 'red' // 挤岔颜色 配合挤岔专用
|
||||
},
|
||||
arcBlcok: { // 圆形封锁图形
|
||||
show: false, // 显示
|
||||
arcBorderColor: 'green', // 默认边框颜色
|
||||
locationColor: 'green', // 定位封锁颜色
|
||||
inversionColor: '#FFFF00' // 反位封锁颜色
|
||||
},
|
||||
rectLock: { // 矩形封锁框图形
|
||||
rectWidth: 18, // 矩形框 宽高
|
||||
rectBorderColor: 'red' // 矩形边框颜色
|
||||
rectBorderColor: 'red', // 矩形边框颜色
|
||||
monolock: false, // 单锁显示
|
||||
block: false // 封锁显示
|
||||
}
|
||||
};
|
||||
|
||||
@ -540,6 +553,8 @@ class SkinCode extends defaultStyle {
|
||||
trainSidelineColor: '#FFFF00',
|
||||
trainNameFormat: 'tripNumber:serviceNumber:groupNumber'// 列车显示格式
|
||||
},
|
||||
directionArrow: {
|
||||
},
|
||||
hsda: {
|
||||
lrPaddingHSDA: 3, // HSDA两边间隔
|
||||
upPaddingHSDA: 20, // HSDA上边距离
|
||||
@ -620,7 +635,8 @@ class SkinCode extends defaultStyle {
|
||||
aspectRatio: 8 / 15, // 字体宽高比例(用以拼接text是计算位置)
|
||||
textOffset: 1, // 字体偏移(用以控制字体据车头的距离)
|
||||
trainWidthMoreText: 2, // 计算列车长度时--列车长比text多出尺寸
|
||||
displayPosition: 'margin' // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
|
||||
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗,
|
||||
trainTip:true // 鼠标悬停列车状态信息框是否显示
|
||||
},
|
||||
trainStatusStyle: {
|
||||
defaultDestinationColor: '#FFFF00', // 默认目的地状态显示颜色
|
||||
|
@ -200,133 +200,6 @@ class SkinCode extends defaultStyle {
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.AutoTurnBack] = {
|
||||
// 是否显示
|
||||
visibleConditions: '01',
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
subtitleText: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 17 // 等于副标题距离
|
||||
},
|
||||
lamp: {
|
||||
borderShow: true, // 是否显示边框
|
||||
lineDash: null, // 灯的包围框
|
||||
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.StationStand] = {
|
||||
common: { // 通用属性
|
||||
textFontSize: 10, // 站台默认字体大小
|
||||
haveJumpShow: false, // 站台是否有列车停跳显示
|
||||
functionButtonShow: '03' // 功能灯按钮显示条件(01所有模式下显示 02 行调显示 03现地显示)
|
||||
},
|
||||
safetyDoor: { // 屏蔽门
|
||||
height: 3, // 站台屏蔽门高度
|
||||
distance: 4, // 站台和屏蔽门之间的距离
|
||||
defaultColor: 'green', // 屏蔽门默认颜色
|
||||
splitDoorColor: 'green' // 屏蔽门切除颜色
|
||||
},
|
||||
stand: { // 站台
|
||||
headFontSize: 10, // 站台首端字体大小
|
||||
spareColor: 'white', // 站台空闲颜色
|
||||
stopColor: 'yellow', // 站台列车停站颜色
|
||||
jumpStopColor: '#6260f3', // 站台跳停颜色
|
||||
designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色
|
||||
},
|
||||
standEmergent: { // 紧急关闭
|
||||
mergentR: 4, // 站台紧急关闭半径
|
||||
offset: { x: 0, y: 3 }, // 站台紧急关闭偏移量
|
||||
closeColor: 'red' // 站台紧急关闭颜色
|
||||
},
|
||||
reentry: { // 站台折返策略
|
||||
position: 0, // 折返方向
|
||||
offset: { x: -16, y: 20 }, // 折返偏移量
|
||||
noHumanColor: '#0F16DA', // 站台无人折返
|
||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
||||
},
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
position: 1, // 扣车方向
|
||||
offset: { x: -8, y: 0 }, // 扣车偏移量
|
||||
trainColor: 'yellow', // 车站扣车颜色
|
||||
centerTrainColor: 'white', // 中心扣车颜色
|
||||
andCenterTrainColor: 'red', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: { x: -8, y: -4 }, // 运行时间偏移量
|
||||
textColor: 'white' // 停站时间字体颜色
|
||||
},
|
||||
jump: {
|
||||
text: '跳', // 停跳显示内容
|
||||
position: -1, // 停跳方向
|
||||
offset: { x: -8, y: 0 },
|
||||
textColor: '#0000FF', // 停跳文字颜色
|
||||
arcColor: '#0000FF', // 停跳圆圈颜色
|
||||
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
|
||||
r: 8 // 圆半径大小
|
||||
},
|
||||
level: { // 运行等级
|
||||
position: -1, // 运行等级方向
|
||||
offset: { x: -8, y: 4 }, // 运行等级偏移量
|
||||
textColor: '#FFF000' // 停站等级字体颜色
|
||||
},
|
||||
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.Station] = {
|
||||
// text: {
|
||||
// show: true // 公里标名称显示
|
||||
@ -390,37 +263,161 @@ class SkinCode extends defaultStyle {
|
||||
text: {
|
||||
show: true, // 道岔名称显示
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
offset: { x: 5, y: -10 }, // 道岔名称与区段距离
|
||||
offset: { x: 5, y: -10 }, // 道岔名称与区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontColor: '#C0C0C0', // 道岔名称颜色
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
borderColor: '#FE0000', // 道岔边框颜色
|
||||
lossColor: 'lightgreen', // 道岔失去颜色
|
||||
borderColor: '#FE0000', // 道岔名称边框颜色
|
||||
lossColor: 'lightgreen', // 道岔名称失去颜色
|
||||
locateColor: 'lightgreen', // 道岔定位颜色
|
||||
inversionColor: '#FFFF00', // 道岔反位颜色
|
||||
monolockColor: '#FFFFFF' // 道岔单锁颜色
|
||||
inversionColor: '#FFFF00', // 道岔反位颜色
|
||||
monolockLocationColor: 'lightgreen', // 道岔单锁'定位'颜色 (浅绿色)
|
||||
monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色)
|
||||
block: true // 封锁名称
|
||||
},
|
||||
sectionAction: {
|
||||
flag: false, // 道岔 关联区段显示
|
||||
spareColor: '#5b5b5b' // 区段显示颜色
|
||||
flag: false, // 道岔 关联区段显示
|
||||
spareColor: '#5b5b5b' // 区段显示颜色
|
||||
},
|
||||
core: {
|
||||
length: 10 // 道岔单边长度
|
||||
length: 6 // 道岔单边长度
|
||||
},
|
||||
monolock: { // 道岔单锁配置
|
||||
locationColor: '#FF0000', // 道岔单锁'定位'颜色 (红色)
|
||||
inversionColor: '#FF0000', // 道岔单锁'反位'颜色 (红色)
|
||||
rectShow: false, // 道岔单锁 矩形框是否显示
|
||||
arcShow: true, // 道岔单锁 圆形显示
|
||||
arcBorderColor: 'green', // 圆形单锁框边框颜色
|
||||
jointImg: { // 道岔 A B C D四元素属性配置
|
||||
trapezoidLength: 8, // 直角梯形元素默认长度
|
||||
block: true, // 联合图形封锁状态
|
||||
flashingColors: '#D600D5', // 联合图形封锁闪烁显示颜色
|
||||
fork: true, // 挤岔专用(如有挤岔操作 变为true)
|
||||
forKColor: 'red' // 挤岔颜色 配合挤岔专用
|
||||
},
|
||||
arcBlcok: { // 圆形封锁图形
|
||||
show: true, // 显示
|
||||
arcBorderColor: 'green', // 默认边框颜色
|
||||
locationColor: 'green', // 定位封锁颜色
|
||||
inversionColor: '#FFFF00' // 反位封锁颜色
|
||||
},
|
||||
rectLock: { // 矩形封锁框图形
|
||||
rectWidth: 22, // 矩形框 宽高
|
||||
rectBorderColor: '#fff' // 矩形边框颜色
|
||||
rectBorderColor: '#fff', // 矩形边框颜色
|
||||
monolock: false, // 单锁显示
|
||||
block: false // 封锁显示
|
||||
}
|
||||
};
|
||||
this[deviceType.StationStand] = {
|
||||
common: { // 通用属性
|
||||
textFontSize: 10, // 站台默认字体大小
|
||||
haveJumpShow: false, // 站台是否有列车停跳显示
|
||||
functionButtonShow: '03' // 功能灯按钮显示条件(01所有模式下显示 02 行调显示 03现地显示)
|
||||
},
|
||||
block: { // 道岔封锁配置
|
||||
blockName: 'ningbo_01', // 默认道岔封锁类型
|
||||
nameBorderShow: true, // 道岔名称是否有包围框 显示
|
||||
contentRectShow: false, // 道岔封锁显示
|
||||
contentRectColor: 'red' // 道岔封锁边框颜色
|
||||
safetyDoor: { // 屏蔽门
|
||||
height: 3, // 站台屏蔽门高度
|
||||
distance: 4, // 站台和屏蔽门之间的距离
|
||||
defaultColor: 'green', // 屏蔽门默认颜色
|
||||
splitDoorColor: 'green' // 屏蔽门切除颜色
|
||||
},
|
||||
stand: { // 站台
|
||||
headFontSize: 10, // 站台首端字体大小
|
||||
spareColor: 'white', // 站台空闲颜色
|
||||
stopColor: 'yellow', // 站台列车停站颜色
|
||||
jumpStopColor: '#6260f3', // 站台跳停颜色
|
||||
designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色
|
||||
},
|
||||
standEmergent: { // 紧急关闭
|
||||
mergentR: 4, // 站台紧急关闭半径
|
||||
insideOffset: { x: 0, y: 25 }, // 内站台紧急关闭偏移量
|
||||
outsideOffset: { x: 0, y: -25 }, // 外站台紧急关闭偏移量
|
||||
closeColor: 'red' // 站台紧急关闭颜色
|
||||
},
|
||||
reentry: {}, // 站台折返策略
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
offset: { x: -8, y: 0 }, // 扣车偏移量
|
||||
centerTrainColor: 'white', // 中心扣车颜色
|
||||
andCenterTrainColor: 'red', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
fontSize: 10,
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
offset: { x: -8, y: -4 }, // 运行时间偏移量
|
||||
textColor: 'white', // 停站时间字体颜色
|
||||
textFontSize: 10 // 停站时间字体大小
|
||||
},
|
||||
jump: {},
|
||||
trainStop: {}, // 停车标志
|
||||
trainDepart: {}, // 停车计时
|
||||
level: { // 运行等级
|
||||
position: -1, // 运行等级方向
|
||||
offset: { x: -8, y: 4 }, // 运行等级偏移量
|
||||
textColor: '#FFF000' // 停站等级字体颜色
|
||||
},
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
lampColor: '#5A5D5A' // 功能按钮颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.AutoTurnBack] = {
|
||||
// 是否显示
|
||||
visibleConditions: '01',
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
subtitleText: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 17 // 等于副标题距离
|
||||
},
|
||||
lamp: {
|
||||
borderShow: true, // 是否显示边框
|
||||
lineDash: null, // 灯的包围框
|
||||
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.StationCounter] = {
|
||||
text: {
|
||||
distance: 2, // 计数器名称和文字的距离
|
||||
fontColor: '#FFFFFF', // 计数器字体颜色
|
||||
borderColor: '#E4EF50' // 计数器边框颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.StationDelayUnlock] = {
|
||||
text: {
|
||||
distance: 3, // 延迟解锁和设备之间的距离
|
||||
fontColor: '#FFFFFF', // 延时解锁字体颜色
|
||||
borderColor: '#FFFFFF' // 延迟解锁边框颜色
|
||||
}
|
||||
};
|
||||
|
||||
@ -525,22 +522,30 @@ class SkinCode extends defaultStyle {
|
||||
upPadding: 4, // 上边距离
|
||||
trainSidelineColor: '#ABFE9B',
|
||||
trainBodyFillColor: '#A388B1', // 列车车身填充颜色
|
||||
trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
|
||||
trainNameFormat: 'serviceNumber:tripNumber:targetCode'// 列车显示格式
|
||||
},
|
||||
directionArrow: {
|
||||
hasArrow: true,
|
||||
width: 6,
|
||||
radiusR: 4,
|
||||
fillColor: '#00FF00',
|
||||
distanceTop: 15,
|
||||
distanceBottom: 35
|
||||
},
|
||||
hsda: {
|
||||
lrPaddingHSDA: 3, // HSDA两边间隔
|
||||
upPaddingHSDA: 4, // HSDA上边距离
|
||||
trainHSDATextFontSize: 8, // 列车HDSA字号
|
||||
trainHSDATextFontSize: 12, // 列车HDSA字号
|
||||
textHContent: 'H', // textH文本
|
||||
textSContent: 'S', // textS文本
|
||||
textDContent: 'D', // textD文本
|
||||
textAContent: 'A' // textA文本
|
||||
},
|
||||
trainNumber: {
|
||||
targetCodePrefix: '000', // 目的地码前缀
|
||||
defaultTargetCode: 'DDD', // 默认目的地码
|
||||
targetCodePrefix: '00', // 目的地码前缀
|
||||
defaultTargetCode: 'DD', // 默认目的地码
|
||||
trainTargetTextAlign: 'left', // 目的地码文字显示位置
|
||||
trainNumberOffset: { x: 24, y: 4 }// 目的地码偏移量
|
||||
trainNumberOffset: { x: 36, y: 4 }// 目的地码偏移量
|
||||
},
|
||||
trainServer: {
|
||||
serviceNumberPrefix: '000', // 服务号(表号)前缀
|
||||
@ -551,7 +556,7 @@ class SkinCode extends defaultStyle {
|
||||
trainTarget: {
|
||||
tripNumberPrefix: '00', // 车次号前缀
|
||||
defaultTripNumber: 'DD', // 默认车次号2
|
||||
trainTargetOffset: { x: 36, y: 4 }, // 列车车次号偏移
|
||||
trainTargetOffset: { x: 24, y: 4 }, // 列车车次号偏移
|
||||
trainTargetTextAlign: 'right' // 车次号文字显示位置
|
||||
},
|
||||
trainTargetNumber: {
|
||||
@ -569,7 +574,7 @@ class SkinCode extends defaultStyle {
|
||||
common: {
|
||||
trainHeight: 20, // 列车高度
|
||||
trainHeadDistance: 2, // 列车和车头之间的间距
|
||||
trainWidth: 60, // 列车长度
|
||||
trainWidth: 70, // 列车长度
|
||||
trainTextFontSize: 16, // 列车字号
|
||||
fontFamily: 'consolas', // 默认字体 族类
|
||||
haveTextHSDA: true, // 是否需创建textHSDA对象
|
||||
@ -581,7 +586,14 @@ class SkinCode extends defaultStyle {
|
||||
useSelfFormat: true, // 使用配置项的nameFormat
|
||||
trainHeadColorChangeMode: 1, // 1:driveMode + runlevel
|
||||
useSelfText: true, // 使用配置项的字体大小
|
||||
displayPosition: 'margin' // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
|
||||
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
|
||||
trainTip:false // 鼠标悬停列车状态信息框是否显示
|
||||
},
|
||||
mouseOverStyle:{
|
||||
borderLineColor: '#FFFFFF',
|
||||
borderLineDash: [3, 3],
|
||||
leftOffset:30,
|
||||
rightOffset:30
|
||||
},
|
||||
trainStatusStyle: {
|
||||
defaultDestinationColor: '#FFFFFF', // 默认目的地状态显示颜色
|
||||
|
@ -190,5 +190,15 @@ deviceRender[deviceType.NoOneReturn] = {
|
||||
_type: deviceType.NoOneReturn,
|
||||
zlevel: 1
|
||||
};
|
||||
/** MaintenanceLamps 全站维修点灯 */
|
||||
deviceRender[deviceType.MaintenanceLamps] = {
|
||||
_type: deviceType.MaintenanceLamps,
|
||||
zlevel: 1
|
||||
};
|
||||
/** ZcCommunication Zc通信表示灯 */
|
||||
deviceRender[deviceType.ZcCommunication] = {
|
||||
_type: deviceType.ZcCommunication,
|
||||
zlevel: 1
|
||||
};
|
||||
|
||||
export default deviceRender;
|
||||
|
@ -24,6 +24,7 @@ deviceState[deviceType.Section] = {
|
||||
// boolean lock;进路是否锁闭
|
||||
// boolean canceling;进路是否人解中
|
||||
// boolean normalUnlock;是否正常解锁中
|
||||
// boolean settable; 进路是否可排列
|
||||
deviceState[deviceType.Switch] = {
|
||||
singleLock: 0, // 是否单锁
|
||||
blockade: 0, // 是否封锁
|
||||
|
@ -31,7 +31,9 @@ const deviceType = {
|
||||
LocalControl: 'LocalControl',
|
||||
Maintain: 'Maintain',
|
||||
PowerSupply: 'PowerSupply',
|
||||
NoOneReturn: 'NoOneReturn'
|
||||
NoOneReturn: 'NoOneReturn',
|
||||
MaintenanceLamps: 'MaintenanceLamps',
|
||||
ZcCommunication: 'ZcCommunication'
|
||||
};
|
||||
|
||||
export default deviceType;
|
||||
|
@ -162,6 +162,12 @@ class Status {
|
||||
handleNoOneReturn(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handleMaintenanceLamps(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handleZcCommunication(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
getStatus() {
|
||||
return this.statusObj;
|
||||
}
|
||||
|
@ -19,11 +19,11 @@ class KeyboardController extends Eventful {
|
||||
opts = opts || {};
|
||||
this._keyOnDownUp = opts.keyOnDownUp || true;
|
||||
|
||||
window.addEventListener('keydown', keydownHandle, false);
|
||||
window.addEventListener('keyup', keydownHandle, false);
|
||||
};
|
||||
|
||||
this.disable = function () {
|
||||
window.removeEventListener('keydown', keydownHandle, false);
|
||||
window.removeEventListener('keyup', keydownHandle, false);
|
||||
};
|
||||
|
||||
this.dispose = function() {
|
||||
|
@ -131,27 +131,27 @@ export default class AxleReset extends Group {
|
||||
const showMode = this.model.showMode;
|
||||
const showConditions = this.style.AxleReset.displayCondition;
|
||||
if (!showConditions || showConditions === '01' || showMode === showConditions) {
|
||||
this.show();
|
||||
this.showMode();
|
||||
} else {
|
||||
this.hide();
|
||||
this.hideMode();
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.isShowShape = true;
|
||||
this.show();
|
||||
this.showMode();
|
||||
} else {
|
||||
this.isShowShape = false;
|
||||
this.hide();
|
||||
this.hideMode();
|
||||
}
|
||||
}
|
||||
show() {
|
||||
showMode() {
|
||||
this.control && this.control.show();
|
||||
this.text && this.text.show();
|
||||
this.subtitleText && this.subtitleText.show();
|
||||
this.setState(this.model);
|
||||
}
|
||||
hide() {
|
||||
hideMode() {
|
||||
this.control && this.control.hide();
|
||||
this.text && this.text.hide();
|
||||
this.subtitleText && this.subtitleText.hide();
|
||||
|
@ -2,8 +2,9 @@ import Group from 'zrender/src/container/Group';
|
||||
import EControl from '../element/EControl';
|
||||
import EMouse from './EMouse';
|
||||
import {isShowThePrdType} from '../../utils/handlePath';
|
||||
import deviceType from '../../constant/deviceType';
|
||||
|
||||
export default class AtsControl extends Group {
|
||||
export default class SaidLamp extends Group {
|
||||
constructor(model, style) {
|
||||
super();
|
||||
this.z = 20;
|
||||
@ -60,6 +61,12 @@ export default class AtsControl extends Group {
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
if (model._type === deviceType.PowerSupply && model.name.includes('2')) {
|
||||
this.control && this.control.setControlColor(this.deviceStyle.lamp.offColor);
|
||||
this.control && this.control.setControlStroke(this.deviceStyle.lamp.strokeColor, 1);
|
||||
} else if ((model._type === deviceType.AtsControl || model._type === deviceType.LocalControl || model._type === deviceType.ChainControl) && model.name.includes('B')) {
|
||||
this.control && this.control.setControlColor(this.deviceStyle.lamp.offColor);
|
||||
}
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
|
@ -9,6 +9,7 @@ export default class ELines extends Group {
|
||||
this.model = model;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = model.z;
|
||||
this.sections = [];
|
||||
this.create(model);
|
||||
}
|
||||
|
||||
@ -48,7 +49,7 @@ export default class ELines extends Group {
|
||||
this.add(this.section);
|
||||
} else {
|
||||
for (let i = 0; i < (model.points.length - 1); i++) {
|
||||
this.add(new Line({
|
||||
this.section = new Line({
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
progressive: model.progressive,
|
||||
@ -63,7 +64,9 @@ export default class ELines extends Group {
|
||||
lineWidth: model.style.Section.line.width,
|
||||
stroke: stroke
|
||||
}
|
||||
}));
|
||||
});
|
||||
this.sections.push(this.section);
|
||||
this.add(this.section);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -125,4 +128,16 @@ export default class ELines extends Group {
|
||||
this.lineBorder && this.lineBorder.show();
|
||||
}
|
||||
}
|
||||
|
||||
getBoundingRect() {
|
||||
if (this.model.isCurve) {
|
||||
return this.section.getBoundingRect().clone();
|
||||
} else {
|
||||
const rect = this.sections[0].getBoundingRect();
|
||||
this.sections.forEach(section => {
|
||||
rect.union(section.getBoundingRect().clone());
|
||||
});
|
||||
return rect;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -728,8 +728,8 @@ export default class Section extends Group {
|
||||
}
|
||||
const path = window.location.href;
|
||||
if (path.includes('/map/draw')) {
|
||||
this.on('mouseout', () => { !this.selectedType && !this.selected && this.section && this.section.setStyle({ stroke: this.style.Section.line.spareColor }); });
|
||||
this.on('mouseover', () => { !this.selectedType && this.section && this.section.setStyle({ stroke: '#fbfbfb' }); });
|
||||
this.on('mouseout', () => { !this.selectedType && !this.selected && this.section && this.section.setStyle({ stroke: this.style.Section.line.spareColor, lineWidth: this.style.Section.line.width }); });
|
||||
this.on('mouseover', () => { !this.selectedType && this.section && this.section.setStyle({ stroke: '#fbfbfb', lineWidth: this.style.Section.line.width - 0.2 }); });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,9 @@ class Signal extends Group {
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
this.transformRotation(this);
|
||||
if (model.previewOrMapDraw) {
|
||||
this.setShowMode();
|
||||
}
|
||||
this.setState(model);
|
||||
this.checkIsDrawMap();
|
||||
}
|
||||
@ -160,7 +163,8 @@ class Signal extends Group {
|
||||
}
|
||||
|
||||
this.add(this.sigPost);
|
||||
this.style.Signal.text.show ? this.add(this.sigName) : null;
|
||||
this.add(this.sigName);
|
||||
this.style.Signal.text.show && model.nameShow ? this.sigName.show() : this.sigName.hide();
|
||||
this.add(this.sigAuto);
|
||||
this.add(this.sigRoute);
|
||||
this.add(this.sigDelay);
|
||||
@ -382,20 +386,22 @@ class Signal extends Group {
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
this.recover();
|
||||
/** 终端信号机按钮 */
|
||||
if (model.isRouteActive) {
|
||||
this.setLowButtonActive();
|
||||
} else if (!model.isRouteActive && isShowThePrdType(model.prdType, '03') && this.style.Signal.lowButton.display) {
|
||||
this.setLowButtonRecover();
|
||||
/** 信号机进路按钮显示 */
|
||||
if (isShowThePrdType(model.prdType, '03') && this.style.Signal.lowButton.display) {
|
||||
/** 终端信号机按钮 */
|
||||
if (model.isRouteActive) {
|
||||
this.setLowButtonActive();
|
||||
} else if (!model.isRouteActive && isShowThePrdType(model.prdType, '03') && this.style.Signal.lowButton.display) {
|
||||
this.setLowButtonRecover();
|
||||
}
|
||||
model.isRouteSignal && this.setLowButtonShow();
|
||||
}
|
||||
|
||||
/** 信号机进路按钮显示 */
|
||||
model.isRouteSignal && this.setLowButtonShow();
|
||||
/** 信号机封锁 */
|
||||
/** 信号机封锁 */ // 缺一个功能封锁
|
||||
model.blockade && this.block();
|
||||
/** 设置灯的颜色 */
|
||||
// model.redOpen = 1;
|
||||
// model.yellowOpen = 0;
|
||||
// model.yellowOpen = 1;
|
||||
// model.greenOpen = 0;
|
||||
model.redOpen && model.yellowOpen && !model.greenOpen && this.guid(); // 引导信号显示
|
||||
model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(); // 信号关闭
|
||||
@ -461,7 +467,16 @@ class Signal extends Group {
|
||||
});
|
||||
}
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowMode() {
|
||||
const showMode = this.model.showMode;
|
||||
if (showMode == '03') {
|
||||
this.lowButton && this.lowButton.show();
|
||||
this.model.prdType = '01';
|
||||
} else if (showMode == '02') {
|
||||
this.lowButton && this.lowButton.hide();
|
||||
this.model.prdType = '02';
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.eachChild(item => {
|
||||
|
@ -5,78 +5,31 @@ class EDetain extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.isNew = false;
|
||||
this.detain = null;
|
||||
// if (this.model.style.StationStand.common.special) {
|
||||
this.create();
|
||||
// }
|
||||
this.isNew = false;
|
||||
}
|
||||
|
||||
create(textName) {
|
||||
create() {
|
||||
if (!this.isNew) {
|
||||
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
|
||||
this.isNew = true;
|
||||
if (style.StationStand.common.special) {
|
||||
// inside true 内侧
|
||||
const gag = 22;
|
||||
const gagX = 6; // 左右间隔
|
||||
let height = '';
|
||||
let position = '';
|
||||
if (model.right) {
|
||||
if (model.inside) {
|
||||
height = -gag;
|
||||
position = -model.width / 4 - gagX;
|
||||
} else {
|
||||
height = gag;
|
||||
position = model.width / 4 + gagX;
|
||||
}
|
||||
} else {
|
||||
if (model.inside) {
|
||||
height = gag;
|
||||
position = model.width / 4 + gagX;
|
||||
} else {
|
||||
height = -gag;
|
||||
position = -model.width / 4 - gagX;
|
||||
}
|
||||
this.detain = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
text: style.StationStand.detainCar.text,
|
||||
fontSize: `${style.StationStand.detainCar.fontSize} px ${style.fontFamily}`,
|
||||
textFill: style.StationStand.detainCar.centerTrainColor,
|
||||
textStroke: style.backgroundColor,
|
||||
textAlign: style.textStyle.textAlign,
|
||||
textVerticalAlign: style.textStyle.textVerticalAlign
|
||||
}
|
||||
this.detain = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: model.x + position,
|
||||
y: model.y + height,
|
||||
text: textName,
|
||||
// textAlign: model.inside ? 'left' : 'right',
|
||||
textAlign: 'center',
|
||||
fontWeight: 'blod',
|
||||
fontSize: `${style.StationStand.detainCar.fontSize} px ${style.fontFamily}`,
|
||||
textFill: textName == 'E' ? '#fff' : 'red',
|
||||
textVerticalAlign: 'middle'
|
||||
}
|
||||
});
|
||||
this.add(this.detain);
|
||||
} else {
|
||||
this.detain = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
text: style.StationStand.detainCar.text,
|
||||
textAlign: model.textAlign,
|
||||
textVerticalAlign: model.textVerticalAlign,
|
||||
fontSize: `${style.StationStand.stand.headFontSize} px ${style.fontFamily}`,
|
||||
textFill: style.StationStand.detainCar.centerTrainColor,
|
||||
textStroke: style.backgroundColor
|
||||
}
|
||||
});
|
||||
this.add(this.detain);
|
||||
}
|
||||
});
|
||||
this.add(this.detain);
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,19 +38,13 @@ class EDetain extends Group {
|
||||
this.detain.setStyle('textFill', color);
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.create();
|
||||
this.detain.hide();
|
||||
hideMode() {
|
||||
this.detain && this.detain.hide();
|
||||
}
|
||||
|
||||
show(nameText) {
|
||||
if (this.model.style.StationStand.common.special && nameText) {
|
||||
this.create();
|
||||
this.detain.setStyle('text', nameText);
|
||||
} else {
|
||||
this.create();
|
||||
}
|
||||
this.detain.show();
|
||||
showMode() {
|
||||
this.create();
|
||||
this.detain && this.detain.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,71 +7,29 @@ class EJump extends Group {
|
||||
super();
|
||||
this.model = model;
|
||||
this.isNew = false;
|
||||
this.create();
|
||||
this.setStatus(model.allSkip, model.assignSkip);
|
||||
}
|
||||
|
||||
create(textName) {
|
||||
create() {
|
||||
if (!this.isNew) {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
|
||||
this.isNew = true;
|
||||
if (style.StationStand.common.special) {
|
||||
// inside true 内侧
|
||||
const gag = 22;
|
||||
const gagX = 6; // 左右间隔
|
||||
let height = '';
|
||||
let position = '';
|
||||
if (model.right) {
|
||||
if (model.inside) {
|
||||
height = -gag;
|
||||
position = -model.width / 4 - gagX;
|
||||
} else {
|
||||
height = gag;
|
||||
position = model.width / 4 + gagX;
|
||||
}
|
||||
} else {
|
||||
if (model.inside) {
|
||||
height = gag;
|
||||
position = model.width / 4 + gagX;
|
||||
} else {
|
||||
height = -gag;
|
||||
position = -model.width / 4 - gagX;
|
||||
}
|
||||
this.jump = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
style: {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
fontWeight: style.StationStand.jump.fontWeight,
|
||||
fontSize: style.StationStand.jump.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: style.StationStand.jump.text,
|
||||
textFill: style.StationStand.jump.textColor,
|
||||
textAlign: style.textStyle.textAlign,
|
||||
textVerticalAlign: style.textStyle.textVerticalAlign
|
||||
}
|
||||
this.jump = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: model.x + position,
|
||||
y: model.y + height,
|
||||
text: textName,
|
||||
textAlign: 'center',
|
||||
fontWeight: 'blod',
|
||||
fontSize: `${style.StationStand.detainCar.fontSize} px ${style.fontFamily}`,
|
||||
textFill: textName == 'S' ? 'green' : '#fff',
|
||||
textVerticalAlign: 'middle'
|
||||
}
|
||||
});
|
||||
this.add(this.jump);
|
||||
} else {
|
||||
this.jump = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
style: {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: style.StationStand.common.textFontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: style.StationStand.jump.text,
|
||||
textFill: style.StationStand.jump.textColor,
|
||||
textAlign: model.textAlign,
|
||||
textVerticalAlign: model.textVerticalAlign
|
||||
}
|
||||
});
|
||||
});
|
||||
this.add(this.jump);
|
||||
if (style.StationStand.jump.r) {
|
||||
this.jumpArc = new Arc({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
@ -86,44 +44,29 @@ class EJump extends Group {
|
||||
}
|
||||
});
|
||||
this.add(this.jumpArc);
|
||||
this.add(this.jump);
|
||||
this.jumpArc.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setName(val) {
|
||||
this.create();
|
||||
this.jump.setStyle('text', val);
|
||||
}
|
||||
setStatus(allSkip, assignSkip) {
|
||||
if (this.jumpArc) {
|
||||
this.jumpArc.hide();
|
||||
if (assignSkip) {
|
||||
this.jumpArc.hide(); // 指定站台跳停
|
||||
} else if (allSkip) {
|
||||
this.jumpArc.show(); // 站台全部跳停
|
||||
}
|
||||
}
|
||||
}
|
||||
setColor(color) {
|
||||
this.create();
|
||||
this.jump.setStyle('textFill', color);
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.create();
|
||||
this.jump.hide();
|
||||
hideMode() {
|
||||
this.jump && this.jump.hide();
|
||||
this.jumpArc && this.jumpArc.hide();
|
||||
}
|
||||
|
||||
show(nameText) {
|
||||
if (this.model.style.StationStand.common.special && nameText) {
|
||||
this.create();
|
||||
this.jump.setStyle('text', nameText);
|
||||
} else {
|
||||
this.create();
|
||||
showMode(isAllJump) {
|
||||
this.create();
|
||||
if (isAllJump) { // 站台跳停
|
||||
this.jump.show();
|
||||
this.jumpArc && this.jumpArc.show();
|
||||
} else { // 指定列车跳停
|
||||
this.jump.show();
|
||||
}
|
||||
this.jump.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ class ELevel extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.level = null;
|
||||
this.isNew = false;
|
||||
}
|
||||
|
||||
@ -20,16 +21,15 @@ class ELevel extends Group {
|
||||
style: {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: style.StationStand.stopTime.textFontSize || style.StationStand.common.textFontSize,
|
||||
fontWeight: style.textStyle.fontWeight,
|
||||
fontSize: style.StationStand.stopTime.textFontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.StationStand.level.textColor,
|
||||
textAlign: 'center',
|
||||
textVerticalAlign: 'middle'
|
||||
textAlign: style.textStyle.textAlign,
|
||||
textVerticalAlign: style.textStyle.textVerticalAlign
|
||||
}
|
||||
});
|
||||
|
||||
this.add(this.level);
|
||||
}
|
||||
}
|
||||
@ -44,12 +44,11 @@ class ELevel extends Group {
|
||||
this.level.setStyle('textFill', color);
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.create();
|
||||
this.level.hide();
|
||||
hideMode() {
|
||||
this.level && this.level.hide();
|
||||
}
|
||||
|
||||
show() {
|
||||
showMode() {
|
||||
this.create();
|
||||
this.level.show();
|
||||
}
|
||||
|
@ -3,47 +3,45 @@ import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
import { flashlight } from '../utils/ShapePoints.js';
|
||||
|
||||
class EReentry extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.isNew = false;
|
||||
}
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.isNew = false;
|
||||
}
|
||||
|
||||
create() {
|
||||
if (!this.isNew) {
|
||||
const model = this.model;
|
||||
create() {
|
||||
if (!this.isNew) {
|
||||
const model = this.model;
|
||||
this.isNew = true;
|
||||
this.reentry = new Polygon({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
points: flashlight(model.x, model.y, model.drict, 10, 5, 0, 0, 4)
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.lineWidth,
|
||||
fill: model.fill
|
||||
}
|
||||
});
|
||||
|
||||
this.isNew = true;
|
||||
this.reentry = new Polygon({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
points: flashlight(model.x, model.y, model.drict, 10, 5, 0, 0, 4)
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.lineWidth,
|
||||
fill: model.fill
|
||||
}
|
||||
});
|
||||
this.add(this.reentry);
|
||||
}
|
||||
}
|
||||
|
||||
this.add(this.reentry);
|
||||
}
|
||||
}
|
||||
setColor(color) {
|
||||
this.create();
|
||||
this.reentry.setStyle('textFill', color);
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
this.create();
|
||||
this.reentry.setStyle('textFill', color);
|
||||
}
|
||||
hideMode() {
|
||||
this.reentry && this.reentry.hide();
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.create();
|
||||
this.reentry.hide();
|
||||
}
|
||||
|
||||
show() {
|
||||
this.create();
|
||||
this.reentry.show();
|
||||
}
|
||||
showMode() {
|
||||
this.create();
|
||||
this.reentry.show();
|
||||
}
|
||||
}
|
||||
|
||||
export default EReentry;
|
||||
|
@ -1,15 +1,13 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Isogon from 'zrender/src/graphic/shape/Isogon';
|
||||
import Polyline from 'zrender/src/graphic/shape/Polyline';
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
import {arrow} from '../utils/ShapePoints';
|
||||
|
||||
class ESafeEmergent extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.isNew = false;
|
||||
if (this.model.style.StationStand.common.special) {
|
||||
this.create();
|
||||
}
|
||||
}
|
||||
|
||||
create() {
|
||||
@ -18,48 +16,19 @@ class ESafeEmergent extends Group {
|
||||
const style = this.model.style;
|
||||
|
||||
this.isNew = true;
|
||||
if (style.StationStand.common.special) {
|
||||
const gagT = 19;
|
||||
const gagB = 26;
|
||||
let cy = model.inside ? model.y + 22 : model.y - 22;
|
||||
let cx = model.inside ? model.x + model.width / 8 : model.x - model.width / 8;
|
||||
if (model.right) {
|
||||
if (model.inside) {
|
||||
cy = model.y - gagB;
|
||||
cx = model.x - model.width / 8;
|
||||
} else {
|
||||
cy = model.y + gagT;
|
||||
cx = model.x + model.width / 8;
|
||||
}
|
||||
} else {
|
||||
if (model.inside) {
|
||||
cy = model.y + gagT;
|
||||
cx = model.x + model.width / 8;
|
||||
} else {
|
||||
cy = model.y - gagB;
|
||||
cx = model.x - model.width / 8;
|
||||
}
|
||||
}
|
||||
this.emergent = new Polyline({
|
||||
if (style.StationStand.standEmergent.radiusR) {
|
||||
const rotation = model.right == 1 ? Math.PI / 2 : Math.PI * 3 / 2;
|
||||
this.emergent = new Polygon({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
origin: [model.x, model.y],
|
||||
rotation: rotation,
|
||||
shape: {
|
||||
points: [
|
||||
[cx, cy - 2],
|
||||
[cx + 5, cy],
|
||||
[cx + 5, cy + 2],
|
||||
[cx + 2, cy + 2],
|
||||
[cx + 2, cy + 6],
|
||||
[cx - 2, cy + 6],
|
||||
[cx - 2, cy + 2],
|
||||
[cx - 5, cy + 2],
|
||||
[cx - 5, cy],
|
||||
[cx, cy - 2]
|
||||
]
|
||||
points: arrow(model.x, model.y, style.StationStand.standEmergent.width, style.StationStand.standEmergent.radiusR * 0.8)
|
||||
},
|
||||
style: {
|
||||
stroke: 'red',
|
||||
fill: 'red'
|
||||
stroke: style.StationStand.standEmergent.closeColor,
|
||||
fill: style.StationStand.standEmergent.closeColor
|
||||
}
|
||||
});
|
||||
this.add(this.emergent);
|
||||
@ -84,12 +53,11 @@ class ESafeEmergent extends Group {
|
||||
}
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.create();
|
||||
this.emergent.hide();
|
||||
hideMode() {
|
||||
this.emergent && this.emergent.hide();
|
||||
}
|
||||
|
||||
show() {
|
||||
showMode() {
|
||||
this.create();
|
||||
this.emergent.show();
|
||||
}
|
||||
|
@ -2,57 +2,57 @@ import Group from 'zrender/src/container/Group';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
|
||||
class ETime extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.isNew = false;
|
||||
}
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.isNew = false;
|
||||
}
|
||||
|
||||
create() {
|
||||
if (!this.isNew) {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
create() {
|
||||
if (!this.isNew) {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
|
||||
this.isNew = true;
|
||||
this.time = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
style: {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: style.StationStand.common.textFontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.StationStand.stopTime.textColor,
|
||||
textAlign: 'center',
|
||||
textVerticalAlign: 'middle'
|
||||
}
|
||||
});
|
||||
this.isNew = true;
|
||||
this.time = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
style: {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
fontWeight: style.textStyle.fontWeight,
|
||||
fontSize: style.StationStand.common.textFontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.StationStand.stopTime.textColor,
|
||||
textAlign: style.textStyle.textAlign,
|
||||
textVerticalAlign: style.textStyle.textVerticalAlign
|
||||
}
|
||||
});
|
||||
|
||||
this.add(this.time);
|
||||
}
|
||||
}
|
||||
this.add(this.time);
|
||||
}
|
||||
}
|
||||
|
||||
setName(val) {
|
||||
this.create();
|
||||
this.time.setStyle('text', val);
|
||||
}
|
||||
setName(val) {
|
||||
this.create();
|
||||
this.time.setStyle('text', val);
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
this.create();
|
||||
this.time.setStyle('textFill', color);
|
||||
}
|
||||
setColor(color) {
|
||||
this.create();
|
||||
this.time.setStyle('textFill', color);
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.create();
|
||||
this.time.hide();
|
||||
}
|
||||
hideMode() {
|
||||
this.create();
|
||||
this.time.hide();
|
||||
}
|
||||
|
||||
show() {
|
||||
this.create();
|
||||
this.time.show();
|
||||
}
|
||||
showMode() {
|
||||
this.create();
|
||||
this.time.show();
|
||||
}
|
||||
}
|
||||
|
||||
export default ETime;
|
||||
|
@ -14,40 +14,21 @@ class ETrainDepart extends Group {
|
||||
if (!this.isNew) {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
const gag = 22;
|
||||
this.isNew = true;
|
||||
let cy = model.inside ? model.y + gag : model.y - gag;
|
||||
let cx = model.inside ? model.x - model.width / 4 - model.width / 8 : model.x + model.width / 4 + model.width / 8;
|
||||
if (model.right) {
|
||||
if (model.inside) {
|
||||
cy = model.y - gag;
|
||||
cx = model.x + model.width / 4 + model.width / 8;
|
||||
} else {
|
||||
cy = model.y + gag;
|
||||
cx = model.x - model.width / 4 - model.width / 8;
|
||||
}
|
||||
} else {
|
||||
if (model.inside) {
|
||||
cy = model.y + gag;
|
||||
cx = model.x - model.width / 4 - model.width / 8;
|
||||
} else {
|
||||
cy = model.y - gag;
|
||||
cx = model.x + model.width / 4 + model.width / 8;
|
||||
}
|
||||
}
|
||||
this.trainDepart = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: cx,
|
||||
y: cy,
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
text: text,
|
||||
textAlign: 'middle',
|
||||
fontSize: `${style.StationStand.detainCar.fontSize} px ${style.fontFamily}`,
|
||||
textFill: 'green',
|
||||
textVerticalAlign: 'middle',
|
||||
textBorderColor: 'green',
|
||||
textAlign: style.textStyle.textAlign,
|
||||
fontSize: style.StationStand.trainDepart.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
textFill: style.StationStand.trainDepart.textFill,
|
||||
textVerticalAlign: style.textStyle.textVerticalAlign,
|
||||
textBorderColor: style.StationStand.trainDepart.textBorderColor,
|
||||
textPadding: 2,
|
||||
textBorderWidth: 1
|
||||
}
|
||||
@ -61,13 +42,12 @@ class ETrainDepart extends Group {
|
||||
this.trainDepart.setStyle('textFill', color);
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.create();
|
||||
this.trainDepart.hide();
|
||||
hideMode() {
|
||||
this.trainDepart && this.trainDepart.hide();
|
||||
this.time && clearInterval(this.time);
|
||||
}
|
||||
|
||||
show() {
|
||||
showMode() {
|
||||
this.timeStart = 30;
|
||||
this.create(`0${this.timeStart}`);
|
||||
this.trainDepart.show();
|
||||
|
@ -2,67 +2,47 @@ import Group from 'zrender/src/container/Group';
|
||||
import Arc from 'zrender/src/graphic/shape/Arc';
|
||||
|
||||
class ETrainStop extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.isNew = false;
|
||||
}
|
||||
}
|
||||
|
||||
create() {
|
||||
if (!this.isNew) {
|
||||
const model = this.model;
|
||||
const gag = 22;
|
||||
create() {
|
||||
if (!this.isNew) {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
this.isNew = true;
|
||||
let cy = model.inside ? model.y + gag : model.y - gag;
|
||||
let cx = model.inside ? model.x - model.width / 8 : model.x + model.width / 8;
|
||||
if (model.right) {
|
||||
if (model.inside) {
|
||||
cy = model.y - gag;
|
||||
cx = model.x + model.width / 8;
|
||||
} else {
|
||||
cy = model.y + gag;
|
||||
cx = model.x - model.width / 8;
|
||||
}
|
||||
} else {
|
||||
if (model.inside) {
|
||||
cy = model.y + gag;
|
||||
cx = model.x - model.width / 8;
|
||||
} else {
|
||||
cy = model.y - gag;
|
||||
cx = model.x + model.width / 8;
|
||||
}
|
||||
}
|
||||
this.trainStop = new Arc({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
cx: cx,
|
||||
cy: cy,
|
||||
r: model.r
|
||||
this.trainStop = new Arc({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
cx: model.x,
|
||||
cy: model.y,
|
||||
r: style.StationStand.trainStop.radiusR
|
||||
},
|
||||
style: {
|
||||
fill: 'red',
|
||||
stroke: 'red'
|
||||
fill: style.StationStand.trainStop.fillColor,
|
||||
stroke: style.StationStand.trainStop.fillColor
|
||||
}
|
||||
});
|
||||
this.add(this.trainStop);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.add(this.trainStop);
|
||||
}
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
this.create();
|
||||
this.trainStop.setStyle('textFill', color);
|
||||
}
|
||||
setColor(color) {
|
||||
this.create();
|
||||
this.trainStop.setStyle('textFill', color);
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.create();
|
||||
this.trainStop.hide();
|
||||
}
|
||||
hideMode() {
|
||||
this.trainStop && this.trainStop.hide();
|
||||
}
|
||||
|
||||
show() {
|
||||
this.create();
|
||||
this.trainStop.show();
|
||||
}
|
||||
showMode() {
|
||||
this.create();
|
||||
this.trainStop.show();
|
||||
}
|
||||
}
|
||||
|
||||
export default ETrainStop;
|
||||
|
@ -60,13 +60,10 @@ class StationStand extends Group {
|
||||
this.add(this.safeStand);
|
||||
|
||||
/** 站台紧急关闭*/
|
||||
const emergentH = model.inside ? model.right ? 1 : -1 : model.right ? -1 : 1;
|
||||
let emergentX = model.position.x + style.StationStand.standEmergent.offset.x;
|
||||
let emergentY = model.position.y + emergentH * (model.height / 2 + style.StationStand.standEmergent.offset.y);
|
||||
if (style.StationStand.common.special) {
|
||||
emergentX = model.position.x;
|
||||
emergentY = model.position.y;
|
||||
}
|
||||
const emergentOffset = model.inside ? style.StationStand.standEmergent.insideOffset : style.StationStand.standEmergent.outsideOffset;
|
||||
const emergentH = model.right ? 1 : -1;
|
||||
const emergentX = model.position.x + emergentH * emergentOffset.x;
|
||||
const emergentY = model.position.y + emergentH * emergentOffset.y;
|
||||
this.emergent = new ESafeEmergent({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
@ -82,61 +79,62 @@ class StationStand extends Group {
|
||||
this.add(this.emergent);
|
||||
|
||||
// 列车停站
|
||||
const stopX = model.position.x;
|
||||
const stopY = model.position.y;
|
||||
this.trainStop = new ETrainStop({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
inside: model.inside,
|
||||
right: model.right,
|
||||
width: model.width,
|
||||
x: stopX,
|
||||
y: stopY,
|
||||
r: style.StationStand.standEmergent.mergentR,
|
||||
n: 4
|
||||
});
|
||||
this.add(this.trainStop);
|
||||
if (style.StationStand.trainStop.insideOffset) {
|
||||
const stopTrainOffset = model.inside ? style.StationStand.trainStop.insideOffset : style.StationStand.trainStop.outsideOffset;
|
||||
const stopTrainH = model.right ? 1 : -1;
|
||||
const stopX = model.position.x + stopTrainH * stopTrainOffset.x;
|
||||
const stopY = model.position.y + stopTrainH * stopTrainOffset.y;
|
||||
if (style.StationStand.trainStop.insideOffset) {
|
||||
this.trainStop = new ETrainStop({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
x: stopX,
|
||||
y: stopY
|
||||
});
|
||||
this.add(this.trainStop);
|
||||
}
|
||||
}
|
||||
|
||||
// 列车出发
|
||||
const departX = model.position.x;
|
||||
const departY = model.position.y;
|
||||
this.trainDepart = new ETrainDepart({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
inside: model.inside,
|
||||
right: model.right,
|
||||
width: model.width,
|
||||
x: departX,
|
||||
y: departY
|
||||
});
|
||||
this.add(this.trainDepart);
|
||||
if (style.StationStand.trainDepart.insideOffset) {
|
||||
const trainDepartOffset = model.inside ? style.StationStand.trainDepart.insideOffset : style.StationStand.trainDepart.outsideOffset;
|
||||
const trainDepartH = model.right ? 1 : -1;
|
||||
const departX = model.position.x + trainDepartH * trainDepartOffset.x;
|
||||
const departY = model.position.y + trainDepartH * trainDepartOffset.y;
|
||||
this.trainDepart = new ETrainDepart({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
width: model.width,
|
||||
x: departX,
|
||||
y: departY
|
||||
});
|
||||
this.add(this.trainDepart);
|
||||
}
|
||||
|
||||
/** 站台折返策略*/
|
||||
const reentryH = style.StationStand.standEmergent.mergentR;
|
||||
const reentryX = model.position.x - (style.StationStand.reentry.position || drict) * (style.StationStand.reentry.offset.x - model.width / 2);
|
||||
const reentryY = model.position.y + (style.StationStand.reentry.position || drict) * (style.StationStand.reentry.offset.y) + drict * reentryH;
|
||||
this.reentry = new EReentry({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
drict: drict,
|
||||
x: reentryX,
|
||||
y: reentryY,
|
||||
lineWidth: 0,
|
||||
fill: style.StationStand.reentry.noHumanColor
|
||||
});
|
||||
this.add(this.reentry);
|
||||
if (style.StationStand.reentry.offset) {
|
||||
const reentryH = style.StationStand.standEmergent.mergentR;
|
||||
const reentryX = model.position.x - (style.StationStand.reentry.position || drict) * (style.StationStand.reentry.offset.x - model.width / 2);
|
||||
const reentryY = model.position.y + (style.StationStand.reentry.position || drict) * (style.StationStand.reentry.offset.y) + drict * reentryH;
|
||||
this.reentry = new EReentry({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
drict: drict,
|
||||
x: reentryX,
|
||||
y: reentryY,
|
||||
lineWidth: 0,
|
||||
fill: style.StationStand.reentry.noHumanColor
|
||||
});
|
||||
this.add(this.reentry);
|
||||
}
|
||||
|
||||
/** 站台扣车*/
|
||||
const detainD = model.right ? 1 : -1;
|
||||
let detainX = model.position.x - (style.StationStand.stopTime.position || detainD) * (style.StationStand.detainCar.offset.x - model.width / 2);
|
||||
let detainY = model.position.y + (style.StationStand.stopTime.position || detainD) * (style.StationStand.detainCar.offset.y - model.height / 2);
|
||||
if (style.StationStand.common.special) {
|
||||
detainX = model.position.x;
|
||||
detainY = model.position.y;
|
||||
}
|
||||
const detainX = model.position.x - (detainD) * (style.StationStand.detainCar.offset.x - model.width / 2);
|
||||
const detainY = model.position.y + (detainD) * (style.StationStand.detainCar.offset.y - model.height / 2);
|
||||
this.detain = new EDetain({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
@ -145,25 +143,25 @@ class StationStand extends Group {
|
||||
y: detainY,
|
||||
width: model.width,
|
||||
inside: model.inside,
|
||||
right: model.right,
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top'
|
||||
right: model.right
|
||||
});
|
||||
this.add(this.detain);
|
||||
|
||||
/** 停站时间*/
|
||||
const timeDrict = model.right ? 1 : -1;
|
||||
const timeX = model.position.x - timeDrict * (style.StationStand.stopTime.offset.x - model.width / 2);
|
||||
const timeY = model.position.y + timeDrict * style.StationStand.stopTime.offset.y;
|
||||
this.time = new ETime({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
x: timeX,
|
||||
y: timeY,
|
||||
name: model.parkingTime || '30'
|
||||
});
|
||||
this.add(this.time);
|
||||
if (style.StationStand.stopTime.offset) {
|
||||
const timeDrict = model.right ? 1 : -1;
|
||||
const timeX = model.position.x + timeDrict * style.StationStand.stopTime.offset.x;
|
||||
const timeY = model.position.y + timeDrict * style.StationStand.stopTime.offset.y;
|
||||
this.time = new ETime({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
x: timeX,
|
||||
y: timeY,
|
||||
name: model.parkingTime || '30'
|
||||
});
|
||||
this.add(this.time);
|
||||
}
|
||||
|
||||
/** 运行等级*/
|
||||
const levelDrict = model.right ? 1 : -1;
|
||||
@ -182,14 +180,10 @@ class StationStand extends Group {
|
||||
/** 列车停跳 */
|
||||
if (style.StationStand.common.haveJumpShow) {
|
||||
const jumpDirct = model.right ? -1 : 1;
|
||||
let jumpX = model.position.x - jumpDirct * (style.StationStand.jump.offset.x - model.width / 2);
|
||||
let jumpY = model.position.y + jumpDirct * style.StationStand.jump.offset.y;
|
||||
const jumpX = model.position.x - jumpDirct * (style.StationStand.jump.offset.x - model.width / 2);
|
||||
const jumpY = model.position.y + jumpDirct * style.StationStand.jump.offset.y;
|
||||
const jumpCX = model.position.x - jumpDirct * (style.StationStand.jump.offset.x - model.width / 2);
|
||||
const jumpCY = model.position.y + jumpDirct * style.StationStand.jump.offset.y;
|
||||
if (style.StationStand.common.special) {
|
||||
jumpX = model.position.x;
|
||||
jumpY = model.position.y;
|
||||
}
|
||||
this.jump = new EJump({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
@ -200,11 +194,7 @@ class StationStand extends Group {
|
||||
cy: jumpCY,
|
||||
width: model.width,
|
||||
inside: model.inside,
|
||||
right: model.right,
|
||||
textAlign: 'center',
|
||||
textVerticalAlign: 'middle',
|
||||
allSkip: model.allSkip,
|
||||
assignSkip: model.assignSkip
|
||||
right: model.right
|
||||
});
|
||||
this.add(this.jump);
|
||||
}
|
||||
@ -218,7 +208,7 @@ class StationStand extends Group {
|
||||
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
|
||||
}
|
||||
}
|
||||
createFunctionButton() { //
|
||||
createFunctionButton() {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
if (model.stopJumpLamp) {
|
||||
@ -352,15 +342,14 @@ class StationStand extends Group {
|
||||
|
||||
/** 恢复初始状态*/
|
||||
recover() {
|
||||
this.time && this.time.hide();
|
||||
this.level && this.level.hide();
|
||||
this.detain && this.detain.hide();
|
||||
this.emergent && this.emergent.hide();
|
||||
this.trainStop && this.trainStop.hide(); // 列车停站
|
||||
this.trainDepart && this.trainDepart.hide();
|
||||
this.reentry && this.reentry.hide();
|
||||
this.jump && this.jump.hide();
|
||||
this.jump && this.jump.setStatus(0, 0);
|
||||
this.time && this.time.hideMode();
|
||||
this.level && this.level.hideMode();
|
||||
this.detain && this.detain.hideMode();
|
||||
this.emergent && this.emergent.hideMode();
|
||||
this.trainStop && this.trainStop.hideMode(); // 列车停站
|
||||
this.trainDepart && this.trainDepart.hideMode();
|
||||
this.reentry && this.reentry.hideMode();
|
||||
this.jump && this.jump.hideMode();
|
||||
}
|
||||
|
||||
/** 空闲*/
|
||||
@ -375,8 +364,8 @@ class StationStand extends Group {
|
||||
if (!this.style.StationStand.common.special) {
|
||||
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.stopColor);
|
||||
} else {
|
||||
this.trainStop && this.trainStop.show();
|
||||
this.trainDepart && this.trainDepart.show();
|
||||
this.trainStop && this.trainStop.showMode();
|
||||
this.trainDepart && this.trainDepart.showMode();
|
||||
}
|
||||
}
|
||||
|
||||
@ -385,11 +374,7 @@ class StationStand extends Group {
|
||||
if (!this.style.StationStand.common.special) {
|
||||
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.spareColor);
|
||||
}
|
||||
if (this.style.StationStand.common.special) {
|
||||
this.detain && this.detain.show('E');
|
||||
this.detain && this.detain.setColor('#fff');
|
||||
}
|
||||
this.emergent && this.emergent.show();
|
||||
this.emergent && this.emergent.showMode();
|
||||
if (this.style.StationStand.standEmergent.flicker) {
|
||||
this.emergent.getElement().animateStyle(true)
|
||||
.when(0, { fill: this.style.backgroundColor })
|
||||
@ -402,88 +387,58 @@ class StationStand extends Group {
|
||||
/** 指定列车跳站*/
|
||||
designatedJumpStop() {
|
||||
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.designatedJumpStopColor);
|
||||
if (this.style.StationStand.common.special) {
|
||||
this.jump && this.jump.show('S');
|
||||
this.jump && this.jump.setColor('green');
|
||||
} else {
|
||||
this.jump && this.jump.show();
|
||||
}
|
||||
this.jump && this.jump.setStatus(0, 1);
|
||||
}
|
||||
|
||||
/** 未设置跳停*/
|
||||
unJumpStop() {
|
||||
this.jump && this.jump.hide();
|
||||
this.jump && this.jump.setStatus(0, 0);
|
||||
this.jump && this.jump.showMode(0);
|
||||
}
|
||||
|
||||
/** 站台跳停*/
|
||||
jumpStop() {
|
||||
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.jumpStopColor);
|
||||
if (this.style.StationStand.common.special) {
|
||||
this.jump && this.jump.show('S');
|
||||
this.jump && this.jump.setColor('green');
|
||||
} else {
|
||||
this.jump && this.jump.show();
|
||||
}
|
||||
this.jump && this.jump.setStatus(1, 0);
|
||||
this.jump && this.jump.showMode(1);
|
||||
}
|
||||
|
||||
/** 车站扣车*/
|
||||
standDetainTrain() {
|
||||
if (this.style.StationStand.common.special) {
|
||||
this.detain && this.detain.show('H');
|
||||
} else {
|
||||
this.detain && this.detain.show();
|
||||
}
|
||||
this.detain && this.detain.showMode();
|
||||
this.detain && this.detain.setColor(this.style.StationStand.detainCar.detainTrainTextColor);
|
||||
}
|
||||
|
||||
/** 中心扣车*/
|
||||
centerDetainTrain() {
|
||||
if (this.style.StationStand.common.special) {
|
||||
this.detain && this.detain.show('H');
|
||||
} else {
|
||||
this.detain && this.detain.show();
|
||||
}
|
||||
this.detain && this.detain.showMode();
|
||||
this.detain && this.detain.setColor(this.style.StationStand.detainCar.centerTrainColor);
|
||||
}
|
||||
|
||||
/** 中心+车站扣车*/
|
||||
standAndCenterDetainTrain() {
|
||||
if (this.style.StationStand.common.special) {
|
||||
this.detain && this.detain.show('H');
|
||||
} else {
|
||||
this.detain && this.detain.show();
|
||||
}
|
||||
this.detain && this.detain.showMode();
|
||||
this.detain && this.detain.setColor(this.style.StationStand.detainCar.andCenterTrainColor);
|
||||
}
|
||||
|
||||
/** 人工设置停战时间*/
|
||||
setManuallyArmisticeTime(val) {
|
||||
this.time && this.time.show();
|
||||
this.time && this.time.showMode();
|
||||
this.time && this.time.setName(val);
|
||||
}
|
||||
|
||||
/** 人工设置运行等级*/
|
||||
setManuallyOperationLevel(val) {
|
||||
this.level && this.level.show();
|
||||
this.level && this.level.showMode();
|
||||
this.level && this.level.setName(val);
|
||||
}
|
||||
|
||||
/** 无折返(默认)*/
|
||||
noReentry() {
|
||||
this.reentry && this.reentry.hide();
|
||||
this.reentry && this.reentry.hideMode();
|
||||
}
|
||||
|
||||
/** 无人折返*/
|
||||
noHumanReentry() {
|
||||
this.reentry && this.reentry.show();
|
||||
this.reentry && this.reentry.showMode();
|
||||
this.reentry && this.reentry.setColor(this.style.StationStand.reentry.noHumanColor);
|
||||
}
|
||||
/** 自动换端*/
|
||||
autoChangeEnds() {
|
||||
this.reentry && this.reentry.show();
|
||||
this.reentry && this.reentry.showMode();
|
||||
this.reentry && this.reentry.setColor(this.style.StationStand.reentry.autoChangeEndsColor);
|
||||
}
|
||||
|
||||
@ -567,11 +522,15 @@ class StationStand extends Group {
|
||||
if (!showConditions || showConditions === '01' || showMode === showConditions) {
|
||||
this.stopJumpLampButton && this.stopJumpLampButton.show();
|
||||
this.cancelStopJumpLampButton && this.cancelStopJumpLampButton.show();
|
||||
this.upDetainLampButton && this.upDetainLampButton.show();
|
||||
this.downDetainLampButton && this.downDetainLampButton.show();
|
||||
this.upDetainLamp && this.upDetainLamp.show();
|
||||
this.downDetainLamp && this.downDetainLamp.show();
|
||||
} else {
|
||||
this.stopJumpLampButton && this.stopJumpLampButton.hide();
|
||||
this.cancelStopJumpLampButton && this.cancelStopJumpLampButton.hide();
|
||||
this.upDetainLampButton && this.upDetainLampButton.hide();
|
||||
this.downDetainLampButton && this.downDetainLampButton.hide();
|
||||
this.upDetainLamp && this.upDetainLamp.hide();
|
||||
this.downDetainLamp && this.downDetainLamp.hide();
|
||||
}
|
||||
|
@ -2,19 +2,19 @@ import Circle from 'zrender/src/graphic/shape/Circle';
|
||||
|
||||
/** 名称元素*/
|
||||
export default function ELockRect(model) {
|
||||
const TextName = new Circle({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 2,
|
||||
shape: {
|
||||
cx: model.x,
|
||||
cy: model.y,
|
||||
r: 5
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.lineWidth,
|
||||
stroke: model.stroke,
|
||||
fill: model.fill
|
||||
}
|
||||
});
|
||||
return TextName;
|
||||
const TextName = new Circle({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 2,
|
||||
shape: {
|
||||
cx: model.x,
|
||||
cy: model.y,
|
||||
r: 5
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.lineWidth,
|
||||
stroke: model.stroke,
|
||||
fill: model.fill
|
||||
}
|
||||
});
|
||||
return TextName;
|
||||
}
|
||||
|
@ -2,127 +2,127 @@ import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import store from '@/store';
|
||||
class EMouse extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
this.device = device;
|
||||
this.create();
|
||||
this.craeteSwitchBorder();
|
||||
}
|
||||
create() {
|
||||
if (this.device.name) {
|
||||
// 创建锁闭框
|
||||
const rect = this.device.name.getNameText().getBoundingRect();
|
||||
let textWidth = rect.width * 0.8;
|
||||
if (this.device.triangle.drictx !== 1) {
|
||||
// rect.x += rect.width;
|
||||
textWidth = -textWidth;
|
||||
}
|
||||
constructor(device) {
|
||||
super();
|
||||
this.device = device;
|
||||
this.create();
|
||||
this.craeteSwitchBorder();
|
||||
}
|
||||
create() {
|
||||
if (this.device.name) {
|
||||
// 创建锁闭框
|
||||
const rect = this.device.name.getNameText().getBoundingRect();
|
||||
let textWidth = rect.width * 0.8;
|
||||
if (this.device.triangle.drictx !== 1) {
|
||||
// rect.x += rect.width;
|
||||
textWidth = -textWidth;
|
||||
}
|
||||
|
||||
this.textRect = new Rect({
|
||||
zlevel: this.device.zlevel,
|
||||
z: this.device.z,
|
||||
silent: true,
|
||||
shape: {
|
||||
x: rect.x,
|
||||
y: rect.y,
|
||||
width: textWidth,
|
||||
height: rect.height
|
||||
},
|
||||
style: {
|
||||
lineWidth: 1,
|
||||
lineDash: [3, 3],
|
||||
stroke: this.device.style.Switch.mouseOverStyle.borderColor,
|
||||
fill: this.device.style.Switch.mouseOverStyle.borderBackgroundColor
|
||||
}
|
||||
});
|
||||
this.add(this.textRect);
|
||||
this.textRect.hide();
|
||||
}
|
||||
}
|
||||
this.textRect = new Rect({
|
||||
zlevel: this.device.zlevel,
|
||||
z: this.device.z,
|
||||
silent: true,
|
||||
shape: {
|
||||
x: rect.x,
|
||||
y: rect.y,
|
||||
width: textWidth,
|
||||
height: rect.height
|
||||
},
|
||||
style: {
|
||||
lineWidth: 1,
|
||||
lineDash: [3, 3],
|
||||
stroke: this.device.style.Switch.mouseOverStyle.borderColor,
|
||||
fill: this.device.style.Switch.mouseOverStyle.borderBackgroundColor
|
||||
}
|
||||
});
|
||||
this.add(this.textRect);
|
||||
this.textRect.hide();
|
||||
}
|
||||
}
|
||||
|
||||
// 创建道岔边框
|
||||
craeteSwitchBorder() {
|
||||
const sectionA = this.getInstanceByCode(this.device.model.sectionACode);
|
||||
const sectionB = this.getInstanceByCode(this.device.model.sectionBCode);
|
||||
const sectionC = this.getInstanceByCode(this.device.model.sectionCCode);
|
||||
const rect = this.device.getBoundingRect();
|
||||
// 创建道岔边框
|
||||
craeteSwitchBorder() {
|
||||
const sectionA = this.getInstanceByCode(this.device.model.sectionACode);
|
||||
const sectionB = this.getInstanceByCode(this.device.model.sectionBCode);
|
||||
const sectionC = this.getInstanceByCode(this.device.model.sectionCCode);
|
||||
const rect = this.device.getBoundingRect();
|
||||
|
||||
sectionA && rect.union(sectionA.getBoundingRect());
|
||||
sectionB && rect.union(sectionB.getBoundingRect());
|
||||
sectionC && rect.union(sectionC.getBoundingRect());
|
||||
sectionA && rect.union(sectionA.getBoundingRect());
|
||||
sectionB && rect.union(sectionB.getBoundingRect());
|
||||
sectionC && rect.union(sectionC.getBoundingRect());
|
||||
|
||||
this.switchBorder = new Rect({
|
||||
zlevel: this.device.model.zlevel,
|
||||
z: this.device.z,
|
||||
silent: true,
|
||||
shape: Object.assign({ r: 4 }, rect),
|
||||
style: {
|
||||
lineDash: [3, 3],
|
||||
stroke: this.device.style.Switch.mouseOverStyle.borderColor,
|
||||
fill: this.device.style.transparentColor
|
||||
}
|
||||
});
|
||||
this.switchBorder = new Rect({
|
||||
zlevel: this.device.model.zlevel,
|
||||
z: this.device.z,
|
||||
silent: true,
|
||||
shape: Object.assign({ r: 4 }, rect),
|
||||
style: {
|
||||
lineDash: [3, 3],
|
||||
stroke: this.device.style.Switch.mouseOverStyle.borderColor,
|
||||
fill: this.device.style.transparentColor
|
||||
}
|
||||
});
|
||||
|
||||
this.add(this.switchBorder);
|
||||
this.switchBorder.hide();
|
||||
}
|
||||
this.add(this.switchBorder);
|
||||
this.switchBorder.hide();
|
||||
}
|
||||
|
||||
getInstanceByCode(code) {
|
||||
return (store.getters['map/getDeviceByCode'](code) || {}).instance;
|
||||
}
|
||||
getInstanceByCode(code) {
|
||||
return (store.getters['map/getDeviceByCode'](code) || {}).instance;
|
||||
}
|
||||
|
||||
mouseout(e) {
|
||||
if (!this.device.model.down) {
|
||||
this.switchBorder && this.switchBorder.hide();
|
||||
this.device.setTextStyle({
|
||||
textFill: this.device.style.backgroundColor
|
||||
});
|
||||
this.textRect && this.textRect.hide();
|
||||
this.device.setState(this.device.model);
|
||||
mouseout(e) {
|
||||
if (!this.device.model.down) {
|
||||
this.switchBorder && this.switchBorder.hide();
|
||||
this.device.setTextStyle({
|
||||
textFill: this.device.style.backgroundColor
|
||||
});
|
||||
this.textRect && this.textRect.hide();
|
||||
this.device.setState(this.device.model);
|
||||
|
||||
const section = store.getters['map/getDeviceByCode'](this.device.model.sectionACode) || {};
|
||||
const parentSection = store.getters['map/getDeviceByCode'](section.parentCode) || {};
|
||||
const instance = this.getInstanceByCode(parentSection.trainWindowCode);
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseLeave) {
|
||||
instance.mouseEvent.mouseLeave(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
const section = store.getters['map/getDeviceByCode'](this.device.model.sectionACode) || {};
|
||||
const parentSection = store.getters['map/getDeviceByCode'](section.parentCode) || {};
|
||||
const instance = this.getInstanceByCode(parentSection.trainWindowCode);
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseLeave) {
|
||||
instance.mouseEvent.mouseLeave(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mouseover(e) {
|
||||
this.switchBorder && this.switchBorder.show();
|
||||
this.device.setLossAction(false);
|
||||
this.device.setSwitchCoreColor(this.device.style.Switch.mouseOverStyle.borderBackgroundColor);
|
||||
this.device.setTextStyle({
|
||||
textFill: '#000'
|
||||
});
|
||||
this.textRect && this.textRect.show();
|
||||
mouseover(e) {
|
||||
this.switchBorder && this.switchBorder.show();
|
||||
// this.device.setLossAction(false);
|
||||
// this.device.setSwitchCoreColor(this.device.style.Switch.mouseOverStyle.borderBackgroundColor);
|
||||
this.device.setTextStyle({
|
||||
textFill: '#000'
|
||||
});
|
||||
this.textRect && this.textRect.show();
|
||||
|
||||
const section = store.getters['map/getDeviceByCode'](this.device.model.sectionACode) || {};
|
||||
const parentSection = store.getters['map/getDeviceByCode'](section.parentCode) || {};
|
||||
const instance = this.getInstanceByCode(parentSection.trainWindowCode);
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseEnter) {
|
||||
instance.mouseEvent.mouseEnter(e);
|
||||
}
|
||||
}
|
||||
const section = store.getters['map/getDeviceByCode'](this.device.model.sectionACode) || {};
|
||||
const parentSection = store.getters['map/getDeviceByCode'](section.parentCode) || {};
|
||||
const instance = this.getInstanceByCode(parentSection.trainWindowCode);
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseEnter) {
|
||||
instance.mouseEvent.mouseEnter(e);
|
||||
}
|
||||
}
|
||||
|
||||
mouseEnter(e) {
|
||||
this.switchBorder && this.switchBorder.show();
|
||||
this.device.setLossAction(false);
|
||||
this.device.setSwitchCoreColor(this.device.style.Switch.mouseOverStyle.borderBackgroundColor);
|
||||
this.device.setTextStyle({
|
||||
textFill: '#000'
|
||||
});
|
||||
this.textRect && this.textRect.show();
|
||||
}
|
||||
mouseEnter(e) {
|
||||
this.switchBorder && this.switchBorder.show();
|
||||
// this.device.setLossAction(false);
|
||||
// this.device.setSwitchCoreColor(this.device.style.Switch.mouseOverStyle.borderBackgroundColor);
|
||||
this.device.setTextStyle({
|
||||
textFill: '#000'
|
||||
});
|
||||
this.textRect && this.textRect.show();
|
||||
}
|
||||
|
||||
mouseLeave(e) {
|
||||
this.switchBorder && this.switchBorder.hide();
|
||||
this.device.setTextStyle({
|
||||
textFill: this.device.style.backgroundColor
|
||||
});
|
||||
this.textRect && this.textRect.hide();
|
||||
this.device.setState(this.device.model);
|
||||
}
|
||||
mouseLeave(e) {
|
||||
this.switchBorder && this.switchBorder.hide();
|
||||
this.device.setTextStyle({
|
||||
textFill: this.device.style.backgroundColor
|
||||
});
|
||||
this.textRect && this.textRect.hide();
|
||||
this.device.setState(this.device.model);
|
||||
}
|
||||
}
|
||||
export default EMouse;
|
||||
|
@ -38,6 +38,10 @@ class ERhomboid extends Group {
|
||||
this.section.show();
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
this.section.setStyle({ fill: color });
|
||||
}
|
||||
|
||||
stopAnimation(flag) {
|
||||
this.section.stopAnimation(flag);
|
||||
}
|
||||
|
@ -1,77 +0,0 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Line from 'zrender/src/graphic/shape/Line';
|
||||
|
||||
class ESwCore extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
this.skewLine = new Line({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
silent: true,
|
||||
shape: {
|
||||
x1: model.intersectionX,
|
||||
y1: model.intersectionY,
|
||||
x2: model.intersectionX + model.triangle.drictx * model.triangle.getCotRate() * model.coverLength,
|
||||
y2: model.intersectionY + model.triangle.dricty * model.coverLength
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.lineWidth,
|
||||
stroke: style.backgroundColor
|
||||
}
|
||||
});
|
||||
|
||||
this.line = new Line({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
silent: true,
|
||||
shape: {
|
||||
x1: model.intersectionX - model.triangle.getCotRate() * model.coverLength,
|
||||
y1: model.intersectionY,
|
||||
x2: model.intersectionX + model.triangle.getCotRate() * model.coverLength,
|
||||
y2: model.intersectionY
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.lineWidth,
|
||||
stroke: style.backgroundColor
|
||||
}
|
||||
});
|
||||
|
||||
this.add(this.line);
|
||||
this.add(this.skewLine);
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.line.hide();
|
||||
this.skewLine.hide();
|
||||
}
|
||||
|
||||
show() {
|
||||
this.line.show();
|
||||
this.skewLine.show();
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
this.line.setStyle('stroke', color);
|
||||
this.skewLine.setStyle('stroke', color);
|
||||
}
|
||||
|
||||
stopAnimation(flag) {
|
||||
this.line.stopAnimation(flag);
|
||||
this.skewLine.stopAnimation(flag);
|
||||
}
|
||||
|
||||
animateStyle(cb) {
|
||||
this.eachChild((child) => {
|
||||
cb(child);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default ESwCore;
|
@ -2,69 +2,58 @@ import Group from 'zrender/src/container/Group';
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
|
||||
class ESwLnversion extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.create();
|
||||
}
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
this.relocShelter = new Polygon({ // 遮盖B区段范围
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
points: model.shelterPoints
|
||||
},
|
||||
style: {
|
||||
fill: style.backgroundColor
|
||||
// fill: 'blue'
|
||||
},
|
||||
cursor: model.cursor,
|
||||
onmouseover: model.onmouseover,
|
||||
onmouseout: model.onmouseout
|
||||
});
|
||||
const rpx = Math.abs(model.triangle.getCos(model.halfWidth)) + 0.2;
|
||||
this.relocShelter.position = [-model.triangle.drictx * rpx, -model.triangle.dricty * 0.2];
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
this.relocShelter = new Polygon({ // 遮盖B区段范围
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
points: model.shelterPoints
|
||||
},
|
||||
style: {
|
||||
fill: style.backgroundColor
|
||||
// fill: 'yellow'
|
||||
},
|
||||
cursor: model.cursor,
|
||||
onmouseover: model.onmouseover,
|
||||
onmouseout: model.onmouseout
|
||||
});
|
||||
this.hide();
|
||||
this.add(this.relocShelter);
|
||||
}
|
||||
|
||||
// this.section = new Polygon({ // 平行四边形
|
||||
// zlevel: model.zlevel,
|
||||
// z: model.z + 1,
|
||||
// shape: {
|
||||
// points: model.sectionPoints
|
||||
// },
|
||||
// style: {
|
||||
// // fill: style.Section.line.spareColor
|
||||
// fill: 'blue'
|
||||
// },
|
||||
// cursor: model.cursor,
|
||||
// onmouseover: model.onmouseover,
|
||||
// onmouseout: model.onmouseout
|
||||
// });
|
||||
hide() {
|
||||
this.relocShelter.hide();
|
||||
}
|
||||
|
||||
this.hide();
|
||||
this.add(this.relocShelter);
|
||||
// this.add(this.section);
|
||||
}
|
||||
show() {
|
||||
this.relocShelter.show();
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.relocShelter.hide();
|
||||
// this.section.hide();
|
||||
}
|
||||
setColor(color) {
|
||||
this.relocShelter.setStyle({ fill: color });
|
||||
}
|
||||
|
||||
show() {
|
||||
this.relocShelter.show();
|
||||
// this.section.show();
|
||||
}
|
||||
getSection() {
|
||||
return this.section;
|
||||
}
|
||||
|
||||
stopAnimation(flag) {
|
||||
// this.section.stopAnimation(flag);
|
||||
}
|
||||
stopAnimation(flag) {
|
||||
this.relocShelter.stopAnimation(flag);
|
||||
}
|
||||
|
||||
getSection() {
|
||||
return this.section;
|
||||
}
|
||||
animateStyle(cb) {
|
||||
this.eachChild((child) => {
|
||||
cb(child);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2,44 +2,52 @@ import Group from 'zrender/src/container/Group';
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
|
||||
class ESwLocal extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.create();
|
||||
}
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
|
||||
this.locShelter = new Polygon({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
points: model.shelterPoints
|
||||
},
|
||||
style: {
|
||||
fill: style.backgroundColor
|
||||
// fill: 'red'
|
||||
},
|
||||
cursor: model.cursor,
|
||||
onmouseover: model.onmouseover,
|
||||
onmouseout: model.onmouseout
|
||||
});
|
||||
this.locShelter = new Polygon({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
points: model.shelterPoints
|
||||
},
|
||||
style: {
|
||||
fill: style.backgroundColor
|
||||
// fill: 'red'
|
||||
},
|
||||
cursor: model.cursor,
|
||||
onmouseover: model.onmouseover,
|
||||
onmouseout: model.onmouseout
|
||||
});
|
||||
|
||||
const lpx = Math.abs(model.triangle.getCos(1));
|
||||
this.locShelter.position = [model.triangle.drictx * lpx, -model.triangle.dricty * 0.2];
|
||||
this.locShelter.show();
|
||||
this.add(this.locShelter);
|
||||
}
|
||||
this.add(this.locShelter);
|
||||
this.locShelter.show();
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.locShelter.hide();
|
||||
}
|
||||
hide() {
|
||||
this.locShelter.hide();
|
||||
}
|
||||
|
||||
show() {
|
||||
this.locShelter.show();
|
||||
}
|
||||
show() {
|
||||
this.locShelter.show();
|
||||
}
|
||||
|
||||
stopAnimation(flag) {
|
||||
this.locShelter.stopAnimation(flag);
|
||||
}
|
||||
|
||||
animateStyle(cb) {
|
||||
this.eachChild((child) => {
|
||||
cb(child);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default ESwLocal;
|
||||
|
@ -24,7 +24,6 @@ class ESwName extends Group {
|
||||
fontSize: style.Switch.text.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
// textAlign: model.triangle.drictx === 1 ? 'left' : 'right',
|
||||
textAlign: 'center',
|
||||
textVerticalAlign: 'middle',
|
||||
textFill: style.Switch.text.fontColor
|
||||
@ -33,9 +32,6 @@ class ESwName extends Group {
|
||||
|
||||
const rect = this.nameText.getBoundingRect();
|
||||
let textWidth = rect.width;
|
||||
if (style.Switch.monolock.nameBorderShow) {
|
||||
textWidth = rect.width;
|
||||
}
|
||||
if (model.triangle.drictx !== 1) {
|
||||
rect.x += rect.width;
|
||||
textWidth = -textWidth;
|
||||
@ -60,7 +56,7 @@ class ESwName extends Group {
|
||||
|
||||
const data = LangStorage.getLang() == 'en' ? 'Turnout section' : '道岔区段名称';
|
||||
|
||||
this.arrowText = new Text({
|
||||
this.arrowText = new Text({ // 移入道岔显示名称
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 20,
|
||||
style: {
|
||||
|
@ -40,6 +40,10 @@ class ETriangle extends Group {
|
||||
this.section.show();
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
this.section.setStyle({ fill: color });
|
||||
}
|
||||
|
||||
stopAnimation(flag) {
|
||||
this.section.stopAnimation(flag);
|
||||
}
|
||||
@ -56,6 +60,12 @@ class ETriangle extends Group {
|
||||
});
|
||||
}
|
||||
|
||||
animateStyle(cb) {
|
||||
this.eachChild((child) => {
|
||||
cb(child);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default ETriangle;
|
||||
|
@ -5,7 +5,6 @@ import Line from 'zrender/src/graphic/shape/Line';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import JTriangle from '../../utils/JTriangle';
|
||||
import ESwName from './ESwName.js';
|
||||
import ESwCore from './ESwCore.js';
|
||||
import ESwLocal from './ESwLocal.js';
|
||||
import ESwLnversion from './ESwLnversion';
|
||||
import ELockRect from './ELockRect';
|
||||
@ -49,31 +48,25 @@ export default class Switch extends Group {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
|
||||
let halfWidth = style.Section.line.width / 2;
|
||||
const switchWidth = style.Section.line.width + style.Section.line.beyondWidth * 2 + 0.6;
|
||||
const switchWidth = style.Section.line.width + style.Section.line.beyondWidth * 2; // 超出宽度多少
|
||||
const swPadding = style.Switch.core.length;
|
||||
const directx = this.triangle.drictx;
|
||||
const directy = this.triangle.dricty;
|
||||
const direct = -this.triangle.drictx * this.triangle.dricty;
|
||||
const coverLength = switchWidth * 1.5;
|
||||
|
||||
this.swCore = new ESwCore({ // 道岔两个斜线 盖住所有
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
intersectionX: model.intersection.x,
|
||||
intersectionY: model.intersection.y,
|
||||
coverLength: coverLength,
|
||||
lineWidth: switchWidth,
|
||||
triangle: this.triangle
|
||||
});
|
||||
const switchWidth1 = style.Section.line.width / 2;
|
||||
const width1 = switchWidth1 * this.triangle.getSinRate();
|
||||
const height1 = switchWidth1 * this.triangle.getCosRate();
|
||||
const width2 = (height1 + switchWidth1) / this.triangle.getTanRate();
|
||||
const width3 = (style.Section.line.width / this.triangle.getSinRate()) - width2 - width1;
|
||||
const detailWidth = 0.2; // 调整定位模糊宽度
|
||||
|
||||
halfWidth += 0.1;
|
||||
const point1 = [model.intersection.x - directx * halfWidth, model.intersection.y + directy * halfWidth];
|
||||
const point2 = [point1[0] + directx * switchWidth / this.triangle.getSinRate(), point1[1]];
|
||||
const point1 = [model.intersection.x - directx * width3 - directx * detailWidth, model.intersection.y + directy * switchWidth1];
|
||||
const point2 = [model.intersection.x + directx * (width2 + width1) + directx * detailWidth, point1[1]];
|
||||
const point3 = [point2[0] + directx * this.triangle.getCotRate() * swPadding, point2[1] + directy * swPadding];
|
||||
const point4 = [point3[0] + direct * this.triangle.getSin(switchWidth), point3[1] - direct * this.triangle.getCos(switchWidth)];
|
||||
this.locShelter = new ESwLocal({ // 定位
|
||||
const point4 = [point3[0] + direct * this.triangle.getSin(switchWidth) - directx * 2 * detailWidth, point3[1] - direct * this.triangle.getCos(switchWidth)];
|
||||
this.locShelter = new ESwLocal({ // 定位 覆盖形状 A
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
@ -84,70 +77,51 @@ export default class Switch extends Group {
|
||||
onmouseout: () => { this.name.getArrowText().hide(); }
|
||||
});
|
||||
|
||||
const slen = switchWidth / this.triangle.getSinRate();
|
||||
const rpoint1 = [model.intersection.x + directx * halfWidth, model.intersection.y - directy * halfWidth];
|
||||
const rpoint2 = [rpoint1[0] + directx * (swPadding + switchWidth * this.triangle.getCotRate()), rpoint1[1]];
|
||||
const rpoint3 = [rpoint2[0], rpoint2[1] + directy * switchWidth];
|
||||
const rpoint4 = [rpoint1[0] + this.triangle.getCos(slen), rpoint1[1] + this.triangle.getSin(slen)];
|
||||
this.relocShelter = new ESwLnversion({ // 反位覆盖形状
|
||||
const rpoint1 = [model.intersection.x + directx * width3, model.intersection.y - directy * switchWidth1];
|
||||
const rpoint2 = [rpoint1[0] + directx * (width2 + width1) - directx * width3, model.intersection.y + directy * switchWidth1];
|
||||
const rpoint3 = [rpoint2[0] + directx * 10, rpoint2[1]];
|
||||
const rpoint4 = [rpoint2[0] + directx * 10, rpoint1[1]];
|
||||
this.relocShelter = new ESwLnversion({ // 反位覆盖形状 B
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
shelterPoints: [rpoint1, rpoint2, rpoint3, rpoint4],
|
||||
cursor: 'pointer',
|
||||
halfWidth: halfWidth,
|
||||
triangle: this.triangle,
|
||||
onmouseover: () => { this.name.getArrowText().show(); },
|
||||
onmouseout: () => { this.name.getArrowText().hide(); }
|
||||
});
|
||||
|
||||
const switchWidth1 = style.Section.line.width / 2 + 0.1;
|
||||
const width1 = switchWidth1 * this.triangle.getSinRate();
|
||||
const height1 = switchWidth1 * this.triangle.getCosRate();
|
||||
const width2 = (height1 + switchWidth1) / this.triangle.getTanRate();
|
||||
const width3 = (style.Section.line.width / this.triangle.getSinRate()) - width2 - width1;
|
||||
const spoint1 = [model.intersection.x + directx * width3, model.intersection.y - directy * switchWidth1];
|
||||
const spoint2 = [spoint1[0] - directx * (width2 + width1) - directx * width3, spoint1[1]];
|
||||
const spoint3 = [model.intersection.x - directx * width3, model.intersection.y + directy * switchWidth1];
|
||||
// if (this.style.Switch.block.blockName == 'ningbo_01') {
|
||||
// spoint2 = [model.intersection.x - directx * 13, spoint1[1]];
|
||||
// spoint3 = [model.intersection.x - directx * 13, model.intersection.y + directy * switchWidth1];
|
||||
// }
|
||||
const spoint4 = [spoint1[0] + directx * (width2 + width1) - directx * width3, spoint3[1]];
|
||||
this.rhomboid = new ERhomboid({ // 平行四边形覆盖范围 (尝试使用本图形做宁波特有的挤岔图形动作 放弃使用下一个的图形)
|
||||
this.rhomboid = new ERhomboid({ // 岔芯 平行四边形 C
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
sectionPoints: [spoint1, spoint2, spoint3, spoint4],
|
||||
cursor: 'pointer',
|
||||
halfWidth: halfWidth,
|
||||
triangle: this.triangle,
|
||||
onmouseover: () => { this.name.getArrowText().show(); },
|
||||
onmouseout: () => { this.name.getArrowText().hide(); }
|
||||
});
|
||||
|
||||
let spointLength1 = 8;
|
||||
const trapezoidWidth = this.style.Switch.jointImg.trapezoidLength;
|
||||
const Tspoint1 = [model.intersection.x + directx * width3 + directx * (width2 + width1) - directx * width3, model.intersection.y + directy * switchWidth1];
|
||||
if (this.style.Switch.block.rhomboidShow) {
|
||||
spointLength1 = 16;
|
||||
}
|
||||
const Tspoint2 = [Tspoint1[0] - directx * spointLength1, Tspoint1[1]];
|
||||
const Tspoint3 = [Tspoint1[0] - directx * spointLength1, model.intersection.y - directy * switchWidth1];
|
||||
const Tspoint2 = [Tspoint1[0] - directx * trapezoidWidth, Tspoint1[1]];
|
||||
const Tspoint3 = [Tspoint1[0] - directx * trapezoidWidth, model.intersection.y - directy * switchWidth1];
|
||||
const Tspoint4 = [model.intersection.x + directx * width3, Tspoint3[1]];
|
||||
const Tspoint5 = [Tspoint1[0], Tspoint1[1]];
|
||||
this.sheltertriangle = new ETriangle({ // 平行四边形覆盖范围 内侧三角形覆盖物 (用于宁波线路'挤岔' 专用)其他线路不能使用
|
||||
this.sheltertriangle = new ETriangle({ // 岔芯 直角梯形 (用于'挤岔') D
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
sectionPoints: [Tspoint1, Tspoint2, Tspoint3, Tspoint4, Tspoint5],
|
||||
cursor: 'pointer',
|
||||
halfWidth: halfWidth,
|
||||
triangle: this.triangle,
|
||||
onmouseover: () => { this.name.getArrowText().show(); },
|
||||
onmouseout: () => { this.name.getArrowText().hide(); }
|
||||
});
|
||||
|
||||
this.releaseBackground = new Line({ // 区段上遮盖段
|
||||
this.releaseBackground = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
@ -181,7 +155,6 @@ export default class Switch extends Group {
|
||||
triangle: this.triangle
|
||||
});
|
||||
|
||||
this.add(this.swCore); // 岔芯link
|
||||
this.add(this.locShelter);
|
||||
this.add(this.relocShelter);
|
||||
this.add(this.rhomboid);
|
||||
@ -195,27 +168,28 @@ export default class Switch extends Group {
|
||||
this.lockRect = new ELockRect({ // 锁定矩形
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 6,
|
||||
x: this.model.intersection.x - this.style.Switch.monolock.rectWidth / 2 + offsetX,
|
||||
y: this.model.intersection.y - this.style.Switch.monolock.rectWidth / 2,
|
||||
width: this.style.Switch.monolock.rectWidth,
|
||||
x: this.model.intersection.x - this.style.Switch.rectLock.rectWidth / 2 + offsetX,
|
||||
y: this.model.intersection.y - this.style.Switch.rectLock.rectWidth / 2,
|
||||
width: this.style.Switch.rectLock.rectWidth,
|
||||
lineWidth: 1.8,
|
||||
stroke: this.style.Switch.monolock.rectBorderColor,
|
||||
stroke: this.style.Switch.rectLock.rectBorderColor,
|
||||
fill: this.style.transparentColor
|
||||
});
|
||||
|
||||
this.lockArc = new ELockArc({ // 锁定矩形
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 6,
|
||||
x: this.model.intersection.x,
|
||||
y: this.model.intersection.y,
|
||||
lineWidth: 1.2,
|
||||
stroke: this.style.Switch.monolock.arcBorderColor,
|
||||
fill: this.style.transparentColor
|
||||
});
|
||||
this.add(this.lockArc);
|
||||
this.add(this.lockRect);
|
||||
this.lockRect.hide();
|
||||
this.lockArc.hide();
|
||||
if (this.style.Switch.arcBlcok) {
|
||||
this.lockArc = new ELockArc({ // 锁定矩形
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 6,
|
||||
x: this.model.intersection.x,
|
||||
y: this.model.intersection.y,
|
||||
lineWidth: 1.2,
|
||||
stroke: this.style.Switch.arcBlcok.arcBorderColor,
|
||||
fill: this.style.transparentColor
|
||||
});
|
||||
this.add(this.lockArc);
|
||||
this.lockArc.hide();
|
||||
}
|
||||
}
|
||||
|
||||
/** 名称动画*/
|
||||
@ -233,20 +207,6 @@ export default class Switch extends Group {
|
||||
.start();
|
||||
}
|
||||
|
||||
/** 设置岔芯是否隐藏*/
|
||||
setSwitchCoreInvisible(invisible) {
|
||||
if (invisible) {
|
||||
this.swCore.hide();
|
||||
} else {
|
||||
this.swCore.show();
|
||||
}
|
||||
}
|
||||
|
||||
/** 设置岔芯颜色*/
|
||||
setSwitchCoreColor(color) {
|
||||
this.swCore && this.swCore.setColor(color);
|
||||
}
|
||||
|
||||
/** 设置道岔文字颜色*/
|
||||
setTextColor(color) {
|
||||
this.name.getNameText().setStyle({ textFill: color });
|
||||
@ -266,9 +226,7 @@ export default class Switch extends Group {
|
||||
recover() {
|
||||
this.lockRect.hide(); // 矩形包围框
|
||||
this.lockArc.hide(); // 圆形单锁框
|
||||
this.setSwitchCoreColor(this.style.backgroundColor);
|
||||
this.name.getNameText().stopAnimation(false);
|
||||
this.swCore.stopAnimation(false);
|
||||
this.sheltertriangle.hide();
|
||||
this.rhomboid.stopAnimation(false);
|
||||
this.releaseBackground.hide();
|
||||
@ -278,7 +236,6 @@ export default class Switch extends Group {
|
||||
/** 定位*/
|
||||
setLocationAction() {
|
||||
this.recover();
|
||||
this.setSwitchCoreInvisible(true);
|
||||
if (this.style.Switch.core.splice) {
|
||||
this.locShelter.hide();
|
||||
} else {
|
||||
@ -292,7 +249,6 @@ export default class Switch extends Group {
|
||||
/** 反位*/
|
||||
setInversionAction() {
|
||||
this.recover();
|
||||
this.setSwitchCoreInvisible(true);
|
||||
this.setTextColor(this.style.Switch.text.inversionColor);
|
||||
if (this.style.Switch.core.splice) {
|
||||
this.relocShelter.hide();
|
||||
@ -300,77 +256,120 @@ export default class Switch extends Group {
|
||||
this.relocShelter.show(); // 反位
|
||||
}
|
||||
this.locShelter.hide(); // 定位
|
||||
this.rhomboid.show();
|
||||
this.setSectionState(this.relocShelter.getSection(), 'fill', this.model);
|
||||
this.rhomboid.show(); // 平行四边形
|
||||
this.setSectionState(this.rhomboid.getSection(), 'fill', this.model);
|
||||
}
|
||||
|
||||
/** 失去*/
|
||||
setLossAction(nameFlicker) {
|
||||
this.recover();
|
||||
this.locShelter.hide();
|
||||
this.relocShelter.hide();
|
||||
this.locShelter.show();
|
||||
this.relocShelter.show();
|
||||
this.rhomboid.hide();
|
||||
this.setSwitchCoreInvisible(false);
|
||||
this.sheltertriangle.show();
|
||||
this.sheltertriangle.setColor(this.style.backgroundColor);
|
||||
this.setTextColor(this.style.Switch.text.lossColor);
|
||||
nameFlicker && this.nameTextAnimation();
|
||||
}
|
||||
|
||||
/** 挤叉*/
|
||||
setForkAction() {
|
||||
this.setLossAction(true);
|
||||
if (this.style.Switch.block.blockName == 'ningbo_01') {
|
||||
this.rhomboid.hide(); // 平行四边形
|
||||
if (this.style.Switch.jointImg.fork) {
|
||||
this.recover();
|
||||
this.relocShelter.show();
|
||||
this.relocShelter.animateStyle(item => {
|
||||
item.animateStyle(true)
|
||||
.when(0, { fill: this.style.backgroundColor })
|
||||
.when(1000, { fill: 'red' })
|
||||
.when(2000, { fill: this.style.backgroundColor })
|
||||
.start();
|
||||
});
|
||||
this.sheltertriangle.show(); // 宁波线路挤叉特殊显示
|
||||
this.sheltertriangle.animateStyle(item => {
|
||||
item.animateStyle(true)
|
||||
.when(0, { fill: this.style.backgroundColor })
|
||||
.when(1000, { fill: 'red' })
|
||||
.when(2000, { fill: this.style.backgroundColor })
|
||||
.start();
|
||||
});
|
||||
this.locShelter.show();
|
||||
this.locShelter.animateStyle(item => {
|
||||
item.animateStyle(true)
|
||||
.when(0, { fill: this.style.backgroundColor })
|
||||
.when(1000, { fill: 'red' })
|
||||
.when(2000, { fill: this.style.backgroundColor })
|
||||
.start();
|
||||
});
|
||||
}
|
||||
this.swCore.animateStyle(item => {
|
||||
item.animateStyle(true)
|
||||
.when(0, { stroke: this.style.backgroundColor })
|
||||
.when(1000, { stroke: 'red' })
|
||||
.when(2000, { stroke: this.style.backgroundColor })
|
||||
.start();
|
||||
});
|
||||
}
|
||||
|
||||
/** 单锁*/
|
||||
setMonolock() {
|
||||
if (this.style.Switch.monolock.rectShow) { // 判断单锁矩形是否显示
|
||||
if (this.style.Switch.rectLock.monolock) { // 判断单锁矩形是否显示
|
||||
this.lockRect.show();
|
||||
}
|
||||
if (this.style.Switch.monolock.nameBorderShow) { // 单锁显示名称包围框
|
||||
if (this.style.Switch.text.monolock) { // 单锁显示名称包围框
|
||||
this.setHasTextBorder(1);
|
||||
}
|
||||
if (this.style.Switch.monolock.arcShow) { // 圆形单锁是否显示
|
||||
if (this.style.Switch.arcBlcok.show) { // 圆形单锁是否显示
|
||||
this.lockArc.show();
|
||||
this.model.normalPosition && this.lockArc.setStyle({ stroke: this.style.Switch.arcBlcok.locationColor });
|
||||
!this.model.normalPosition && this.lockArc.setStyle({ stroke: this.style.Switch.aBrclcok.inversionColor });
|
||||
}
|
||||
if (this.model.normalPosition) {
|
||||
this.setTextColor(this.style.Switch.monolock.locationColor); // 定位 设置道岔名称颜色
|
||||
} else if (this.model.reversePosition) {
|
||||
this.setTextColor(this.style.Switch.monolock.inversionColor); // 反位 设置道岔名称颜色
|
||||
}
|
||||
this.model.normalPosition && this.setTextColor(this.style.Switch.text.monolockLocationColor); // 定位 设置道岔名称颜色
|
||||
this.model.reversePosition && this.setTextColor(this.style.Switch.text.monolockInversionColor); // 反位 设置道岔名称颜色
|
||||
}
|
||||
|
||||
/** 封锁 */
|
||||
block() {
|
||||
if (this.style.Switch.block.nameBorderShow) {
|
||||
if (this.style.Switch.jointImg.block) {
|
||||
this.recover();
|
||||
this.relocShelter.show();
|
||||
this.relocShelter.animateStyle(item => {
|
||||
item.animateStyle(true)
|
||||
.when(0, { fill: this.style.backgroundColor })
|
||||
.when(1000, { fill: this.style.Switch.jointImg.flashingColors })
|
||||
.when(2000, { fill: this.style.backgroundColor })
|
||||
.start();
|
||||
});
|
||||
this.sheltertriangle.show();
|
||||
this.sheltertriangle.animateStyle(item => {
|
||||
item.animateStyle(true)
|
||||
.when(0, { fill: this.style.backgroundColor })
|
||||
.when(1000, { fill: this.style.Switch.jointImg.flashingColors })
|
||||
.when(2000, { fill: this.style.backgroundColor })
|
||||
.start();
|
||||
});
|
||||
this.locShelter.show();
|
||||
this.locShelter.animateStyle(item => {
|
||||
item.animateStyle(true)
|
||||
.when(0, { fill: this.style.backgroundColor })
|
||||
.when(1000, { fill: this.style.Switch.jointImg.flashingColors })
|
||||
.when(2000, { fill: this.style.backgroundColor })
|
||||
.start();
|
||||
});
|
||||
}
|
||||
if (this.style.Switch.text.block) {
|
||||
this.setHasTextBorder(1);
|
||||
} else if (this.style.Switch.block.contentRectShow) {
|
||||
this.lockRect.show();
|
||||
this.lockRect.setStyle({ stroke: this.style.Switch.block.contentRectColor });
|
||||
} else if (this.style.Switch.block.rhomboidShow && this.model.reversePosition) { // 范围且封锁时显示
|
||||
}
|
||||
if (this.style.Switch.jointImg.trapezoidBlock && this.model.reversePosition) { // 范围且封锁时显示
|
||||
this.sheltertriangle.show();
|
||||
this.sheltertriangle.getSection().setStyle('fill', '#000080');
|
||||
}
|
||||
if (this.style.Switch.rectLock.block) {
|
||||
this.lockRect.show();
|
||||
this.lockRect.setStyle({ stroke: this.style.Switch.rectLock.blockColor });
|
||||
}
|
||||
}
|
||||
|
||||
/** 延时释放*/
|
||||
timeRelease() {
|
||||
this.setSwitchCoreInvisible(true);
|
||||
this.releaseBackground.show();
|
||||
}
|
||||
|
||||
/** 设置道岔切除*/
|
||||
setSwitchCutOff() {
|
||||
this.setSwitchCoreInvisible(true);
|
||||
if (this.model.normalPosition) {
|
||||
this.releaseBackground.hide(); /** 定位*/
|
||||
} else if (this.model.reversePosition) {
|
||||
@ -435,6 +434,7 @@ export default class Switch extends Group {
|
||||
/** 道岔封锁 */
|
||||
model.blockade && this.block();
|
||||
/** 区段切除*/
|
||||
// this.setForkAction(); // 道岔挤岔完成
|
||||
model.cutOff && this.setSwitchCutOff();
|
||||
if (this.style.Switch.sectionAction.flag) { // 哈尔滨线路处理道岔相关区段颜色
|
||||
const switchModel = Vue.prototype.$jlmap.mapDevice[model.code];
|
||||
|
53
src/jmapNew/shape/Train/EDirection.js
Normal file
53
src/jmapNew/shape/Train/EDirection.js
Normal file
@ -0,0 +1,53 @@
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import { arrow } from '../utils/ShapePoints';
|
||||
|
||||
class EDirection extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
const rotation = model.right != 1 ? 0 : Math.PI;
|
||||
|
||||
this.arrow = new Polygon({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
origin: [model.x, model.y],
|
||||
rotation: rotation,
|
||||
shape: {
|
||||
points: arrow(model.x, model.y, style.Train.directionArrow.width, style.Train.directionArrow.radiusR * 0.8)
|
||||
},
|
||||
style: {
|
||||
stroke: style.Train.directionArrow.fillColor,
|
||||
lineWidth: 2,
|
||||
fill: style.Train.directionArrow.fillColor
|
||||
}
|
||||
});
|
||||
this.add(this.arrow);
|
||||
}
|
||||
|
||||
// 箭头颜色
|
||||
setColor(color) {
|
||||
this.create();
|
||||
this.arrow.setStyle('fill', color);
|
||||
}
|
||||
|
||||
// 隐藏
|
||||
hide() {
|
||||
this.create();
|
||||
this.arrow.hide();
|
||||
}
|
||||
|
||||
// 显示
|
||||
show() {
|
||||
this.create();
|
||||
this.arrow.show();
|
||||
}
|
||||
}
|
||||
|
||||
export default EDirection;
|
@ -1,6 +1,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';
|
||||
|
||||
class EMouse extends Group {
|
||||
constructor(device) {
|
||||
@ -31,35 +32,69 @@ class EMouse extends Group {
|
||||
} 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`;
|
||||
}
|
||||
// 文字描述
|
||||
this.arrowText = new Text({
|
||||
zlevel: this.device.model.zlevel,
|
||||
z: this.device.model.z + 10,
|
||||
style: {
|
||||
x: this.device.model.point.x + 50,
|
||||
y: this.device.model.point.y + 25,
|
||||
text: text,
|
||||
textFill: '#000',
|
||||
textAlign: 'letf',
|
||||
textFont: 10 + 'px consolas',
|
||||
textPadding: 3,
|
||||
textBackgroundColor: this.device.model.style.tipBackgroundColor
|
||||
}
|
||||
});
|
||||
this.add(this.arrowText);
|
||||
this.arrowText.hide();
|
||||
const trainTip = this.device.style.Train.common.trainTip;
|
||||
if (trainTip) {
|
||||
// 文字描述
|
||||
this.arrowText = new Text({
|
||||
zlevel: this.device.model.zlevel,
|
||||
z: this.device.model.z + 10,
|
||||
style: {
|
||||
x: this.device.model.point.x + 50,
|
||||
y: this.device.model.point.y + 25,
|
||||
text: text,
|
||||
textFill: '#000',
|
||||
textAlign: 'letf',
|
||||
textFont: 10 + 'px consolas',
|
||||
textPadding: 3,
|
||||
textBackgroundColor: this.device.style.tipBackgroundColor
|
||||
}
|
||||
});
|
||||
this.add(this.arrowText);
|
||||
this.arrowText.hide();
|
||||
}
|
||||
if (this.device.style.Train.mouseOverStyle) {
|
||||
const rect = this.device.trainBodyBox.getBoundingRect();
|
||||
this.trainBorder = new Rect({
|
||||
zlevel: this.device.model.zlevel,
|
||||
z: this.device.model.z + 10,
|
||||
silent: true,
|
||||
shape: {
|
||||
x:rect.x - 30,
|
||||
y:rect.y,
|
||||
width:rect.width + 60,
|
||||
height:rect.height
|
||||
},
|
||||
style: {
|
||||
lineDash: [3, 3],
|
||||
stroke: this.device.style.Train.mouseOverStyle.borderLineColor,
|
||||
fill: this.device.style.transparentColor
|
||||
}
|
||||
});
|
||||
this.add(this.trainBorder);
|
||||
this.trainBorder.hide();
|
||||
}
|
||||
}
|
||||
|
||||
mouseover() {
|
||||
this.device.deviceModel.down = true;
|
||||
this.arrowText.show();
|
||||
if (this.device.model.style.Train.common.trainTip) {
|
||||
this.device.deviceModel.down = true;
|
||||
this.arrowText.show();
|
||||
}
|
||||
if (this.device.style.Train.mouseOverStyle) {
|
||||
this.device.deviceModel.down = true;
|
||||
this.trainBorder.show();
|
||||
}
|
||||
}
|
||||
|
||||
mouseout() {
|
||||
if (this.device.deviceModel.down) {
|
||||
if (this.device.model.style.Train.common.trainTip && this.device.deviceModel.down) {
|
||||
this.arrowText.hide();
|
||||
this.device.deviceModel.down = false;
|
||||
}
|
||||
if (this.device.style.Train.mouseOverStyle && this.device.deviceModel.down) {
|
||||
this.trainBorder.hide();
|
||||
this.device.deviceModel.down = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ export default class TrainBody extends Group {
|
||||
super();
|
||||
this.model = model;
|
||||
this.deviceModel = model.model;
|
||||
this.style = model.style;
|
||||
this.nameFormat = model.nameFormat;
|
||||
this.create();
|
||||
this.createMouse(); // 鼠标事件
|
||||
@ -125,7 +126,7 @@ export default class TrainBody extends Group {
|
||||
textFill: model.style.Train.trainTarget.fontColor || style.trainTextColor,
|
||||
fontSize: model.fontSize,
|
||||
fontFamily: style.Train.common.fontFamily,
|
||||
textAlign: style.Train.trainTarget.trainTargetTextAlign,
|
||||
textAlign: 'left',
|
||||
textVerticalAlign: 'top'
|
||||
});
|
||||
this.textTrainNumber = new ETextName({
|
||||
@ -133,7 +134,7 @@ export default class TrainBody extends Group {
|
||||
z: model.z + 1,
|
||||
x: parseInt(model.point.x + style.Train.trainNumber.trainNumberOffset.x),
|
||||
y: parseInt(model.point.y + style.Train.trainNumber.trainNumberOffset.y),
|
||||
text: targetCode.substring(targetCode.length - 3),
|
||||
text: targetCode.substring(targetCode.length - style.Train.trainNumber.targetCodePrefix.length),
|
||||
textFill: style.trainTextColor,
|
||||
textStroke: style.trainTextColor,
|
||||
fontWeight: 400,
|
||||
|
@ -5,6 +5,7 @@ import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import ETriangle from '../Train/ETriangle';
|
||||
import store from '@/store';
|
||||
import EDirection from './EDirection';
|
||||
|
||||
/** 列车 */
|
||||
export default class Train extends Group {
|
||||
@ -153,6 +154,22 @@ export default class Train extends Group {
|
||||
if (style.Train.common.haveTrainBorder) {
|
||||
this.createTrainBorder();
|
||||
}
|
||||
if (style.Train.directionArrow.hasArrow) {
|
||||
const arrowPoint = {x: 0, y: 0};
|
||||
if (model.trainWindowModel) {
|
||||
arrowPoint.x = model.trainWindowModel.point.x;
|
||||
arrowPoint.y = model.right ? model.trainWindowModel.point.y + style.Train.directionArrow.distanceBottom : model.trainWindowModel.point.y - style.Train.directionArrow.distanceTop;
|
||||
}
|
||||
this.directionArrow = new EDirection({
|
||||
zlevel: this.zlevel,
|
||||
z:10,
|
||||
right: model.right,
|
||||
x: arrowPoint.x,
|
||||
y: arrowPoint.y,
|
||||
style: style
|
||||
});
|
||||
this.add(this.directionArrow);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取设备提示坐标
|
||||
|
@ -97,6 +97,10 @@ export default class EControl extends Group {
|
||||
this.control.setStyle('fill', color);
|
||||
}
|
||||
}
|
||||
setControlStroke(color, lineWidth) {
|
||||
this.control.setStyle('lineWidth', lineWidth);
|
||||
this.control.setStyle('stroke', color);
|
||||
}
|
||||
setTextColor(color) {
|
||||
if (color) {
|
||||
this.text.setStyle('textFill', color);
|
||||
|
@ -21,7 +21,7 @@ import AutoTurnBack from './Automactic/index.js';
|
||||
import OutFrame from './OutFrame/index.js';
|
||||
import CheckBox from './checkBox/checkBox.js';
|
||||
import AutomaticRoute from './AutomacticRoute/index.js';
|
||||
import AtsControl from './SaidLamp/index.js';
|
||||
import SaidLamp from './SaidLamp/index.js';
|
||||
|
||||
/** 图库*/
|
||||
const mapShape = {};
|
||||
@ -47,15 +47,17 @@ mapShape[deviceType.AxleReset] = AxleReset;
|
||||
mapShape[deviceType.GuideLock] = GuideLock;
|
||||
mapShape[deviceType.CheckBox] = CheckBox;
|
||||
mapShape[deviceType.AutomaticRoute] = AutomaticRoute;
|
||||
mapShape[deviceType.AtsControl] = AtsControl;
|
||||
mapShape[deviceType.CenterCommunication] = AtsControl;
|
||||
mapShape[deviceType.ChainControl] = AtsControl;
|
||||
mapShape[deviceType.IntersiteControl] = AtsControl;
|
||||
mapShape[deviceType.LeuControl] = AtsControl;
|
||||
mapShape[deviceType.LocalControl] = AtsControl;
|
||||
mapShape[deviceType.Maintain] = AtsControl;
|
||||
mapShape[deviceType.PowerSupply] = AtsControl;
|
||||
mapShape[deviceType.NoOneReturn] = AtsControl;
|
||||
mapShape[deviceType.AtsControl] = SaidLamp;
|
||||
mapShape[deviceType.CenterCommunication] = SaidLamp;
|
||||
mapShape[deviceType.ChainControl] = SaidLamp;
|
||||
mapShape[deviceType.IntersiteControl] = SaidLamp;
|
||||
mapShape[deviceType.LeuControl] = SaidLamp;
|
||||
mapShape[deviceType.LocalControl] = SaidLamp;
|
||||
mapShape[deviceType.Maintain] = SaidLamp;
|
||||
mapShape[deviceType.PowerSupply] = SaidLamp;
|
||||
mapShape[deviceType.NoOneReturn] = SaidLamp;
|
||||
mapShape[deviceType.MaintenanceLamps] = SaidLamp;
|
||||
mapShape[deviceType.ZcCommunication] = SaidLamp;
|
||||
|
||||
function shapefactory(device, jmap) {
|
||||
const type = device._type;
|
||||
|
@ -42,7 +42,6 @@ import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteControl',
|
||||
@ -128,8 +127,11 @@ export default {
|
||||
// 取消列车进路
|
||||
cancelTrainRoute() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
@ -139,9 +141,12 @@ export default {
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.signalClose, {}, 1).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.confirmControl.doShow(data.operate);
|
||||
commitOperate(menuOperate.Signal.signalClose, {}, 1).then(({valid, operate})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.confirmControl.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
@ -150,8 +155,11 @@ export default {
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -279,8 +279,11 @@ export default {
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.humanControl, {routeCodeList:this.selection}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.Signal.humanControl, {routeCodeList:this.selection}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
@ -290,8 +293,11 @@ export default {
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -225,8 +225,11 @@ export default {
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -188,8 +188,11 @@ export default {
|
||||
},
|
||||
sendCommand(operate) { // 发送指令
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -189,8 +189,11 @@ export default {
|
||||
commit() {
|
||||
if (this.isConfirm) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.StationStand.setBackStrategy, {standReentryStrategy: this.strategy}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.StationStand.setBackStrategy, {standReentryStrategy: this.strategy}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -266,8 +266,11 @@ export default {
|
||||
},
|
||||
sendCommand(operate) { // 发送指令
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
@ -278,7 +281,6 @@ export default {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
|
@ -245,8 +245,11 @@ export default {
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
@ -257,8 +260,11 @@ export default {
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -134,15 +134,6 @@ export default {
|
||||
time: ''
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 深度数据状态
|
||||
tempData: {
|
||||
handler(val, oldVal) {
|
||||
this.checkTableDataSelction(val);
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList',
|
||||
@ -177,21 +168,30 @@ export default {
|
||||
'3': [], // 80 - 70
|
||||
'4': [] // 60 - 50
|
||||
};
|
||||
for (var i = 110; i <= 120; i++) {
|
||||
for (let i = 110; i <= 120; i++) {
|
||||
list['1'].push({ value: i, label: `${i}` });
|
||||
}
|
||||
for (var i = 90; i <= 100; i++) {
|
||||
for (let i = 90; i <= 100; i++) {
|
||||
list['2'].push({ value: i, label: `${i}` });
|
||||
}
|
||||
for (var i = 70; i <= 80; i++) {
|
||||
for (let i = 70; i <= 80; i++) {
|
||||
list['3'].push({ value: i, label: `${i}` });
|
||||
}
|
||||
for (var i = 50; i <= 60; i++) {
|
||||
for (let i = 50; i <= 60; i++) {
|
||||
list['4'].push({ value: i, label: `${i}` });
|
||||
}
|
||||
return list;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 深度数据状态
|
||||
tempData: {
|
||||
handler(val, oldVal) {
|
||||
this.checkTableDataSelction(val);
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
@ -207,21 +207,21 @@ export default {
|
||||
},
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
const stationList = this.stationList.slice();
|
||||
// const stationList = this.stationList.slice();
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
if (selected.direction == '01') { // 下行
|
||||
// 下行时,此站不是最后一站
|
||||
if (index != 0) {
|
||||
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: opts.intervalRunTime ? this.getLevelByTime(opts.intervalRunTime) : '0', time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus ? opts.intervalRunTimeValidStatus : true });
|
||||
}
|
||||
} else {
|
||||
// 上行时,此站不是最后一站
|
||||
if (index != this.stationList.length) {
|
||||
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: opts.intervalRunTime ? this.getLevelByTime(opts.intervalRunTime) : '0', time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus ? opts.intervalRunTimeValidStatus : true });
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -312,8 +312,11 @@ export default {
|
||||
commit() {
|
||||
if (this.isConfirm) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, {runLevelTime: this.time, runLevelTimeForever: !!this.tempData[0].check}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, {runLevelTime: Number(this.time), runLevelTimeForever: !!this.tempData[0].check}, 2).then(({ valid })=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -211,8 +211,11 @@ export default {
|
||||
// },
|
||||
commit() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.StationStand.setStopTime, {parkingTime: this.control == '01' ? -1 : 1, parkingAlwaysValid: this.effective == '1'}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.StationStand.setStopTime, {parkingTime: this.control == '01' ? -1 : 1, parkingAlwaysValid: this.effective == '1'}, 2).then(({ valid })=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -186,8 +186,11 @@ export default {
|
||||
|
||||
sendCommand(operate) { // 发送指令
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -418,7 +418,6 @@ export default {
|
||||
break;
|
||||
}
|
||||
case OperationEvent.MixinCommand.totalCancel.button.operation: {
|
||||
debugger;
|
||||
if (model && model._type == 'AutoTurnBack' && model.setUp) {
|
||||
const operate = {
|
||||
start: true,
|
||||
|
@ -22,7 +22,7 @@
|
||||
style="width: 100%;"
|
||||
@change="handleChooseChangeStation"
|
||||
>
|
||||
<el-option v-for="item in stationList" :key="item.code" :label="item.name" :value="item" />
|
||||
<el-option v-for="item in concertrateStationList" :key="item.code" :label="item.name" :value="item" />
|
||||
</el-select>
|
||||
</el-row>
|
||||
<el-radio-group :id="domIdChooseControl" v-model="stationType">
|
||||
@ -31,6 +31,7 @@
|
||||
{{ controlProps[item] }}</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
<div class="message" style="color:#ff0000;font-size:14px;margin-left:10px">{{ message }}</div>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button :id="domIdCommit" :disabled="disabledCommit" @click="handleCommit">设置</el-button>
|
||||
<el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
|
||||
@ -61,6 +62,7 @@ export default {
|
||||
station:{},
|
||||
stationCode: '',
|
||||
stationName: '',
|
||||
message:'',
|
||||
controlProps: {
|
||||
'03': '紧急站控',
|
||||
'02': '站控',
|
||||
@ -98,6 +100,11 @@ export default {
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
concertrateStationList() {
|
||||
return this.stationList.filter(station=>{
|
||||
return station.centralized;
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -107,6 +114,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.message = '';
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
@ -131,6 +139,7 @@ export default {
|
||||
});
|
||||
},
|
||||
handleChooseChangeStation(data) {
|
||||
this.message = '';
|
||||
this.stationCode = data.code;
|
||||
this.stationName = data.name;
|
||||
const operate = {
|
||||
@ -171,36 +180,48 @@ export default {
|
||||
},
|
||||
// 路由指令
|
||||
handleCommit() {
|
||||
if (this.stationType == '01') {
|
||||
if (this.stationCode == '' || this.stationCode == null) {
|
||||
this.message = '请选择车站';
|
||||
return false;
|
||||
} else {
|
||||
this.message = '';
|
||||
if (this.stationType == '01') {
|
||||
// 请求遥控
|
||||
this.conterCommit();
|
||||
} else if (this.stationType == '02') {
|
||||
this.conterCommit();
|
||||
} else if (this.stationType == '02') {
|
||||
// 请求站控
|
||||
this.requestCommit();
|
||||
} else if (this.stationType == '03') {
|
||||
this.requestCommit();
|
||||
} else if (this.stationType == '03') {
|
||||
// 紧急站控
|
||||
this.emergencyCommit();
|
||||
this.emergencyCommit();
|
||||
}
|
||||
}
|
||||
},
|
||||
// 请求遥控
|
||||
conterCommit() {
|
||||
commitOperate(menuOperate.StationControl.requestCentralControl, {stationCodes:[this.stationCode]}, 0).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(data.operate, '确认将如下操作区域的控制模式由站控转为中控:\n' + this.stationName);
|
||||
commitOperate(menuOperate.StationControl.requestCentralControl, {stationCodes:[this.stationCode]}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(operate, '确认将如下操作区域的控制模式由站控转为中控:\n' + this.stationName);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 请求站控
|
||||
requestCommit() {
|
||||
commitOperate(menuOperate.StationControl.requestStationControl, {stationCodes:[this.stationCode]}, 0).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(data.operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName);
|
||||
commitOperate(menuOperate.StationControl.requestStationControl, {stationCodes:[this.stationCode]}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 紧急站控
|
||||
emergencyCommit() {
|
||||
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCodes:[this.stationCode]}, 0).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(data.operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName);
|
||||
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCodes:[this.stationCode]}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -173,8 +173,10 @@ export default {
|
||||
// },
|
||||
// 故障解锁
|
||||
faultUnlock(selectType) {
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:selectType.code}, 0).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, data.selected);
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, selectType);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
@ -187,25 +189,33 @@ export default {
|
||||
},
|
||||
// 切除
|
||||
split() {
|
||||
commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
alxeEffective() {
|
||||
commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.alxeEffective.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.alxeEffective.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 激活
|
||||
active() {
|
||||
commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段计轴预复位
|
||||
axlePreReset(selectType) {
|
||||
commitOperate(menuOperate.Section.axlePreReset, {sectionCode:selectType.code}, 0).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, selectType);
|
||||
commitOperate(menuOperate.Section.axlePreReset, {sectionCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, selectType);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段计轴预复位
|
||||
@ -216,8 +226,10 @@ export default {
|
||||
// },
|
||||
// 设置速度
|
||||
setSpeed() {
|
||||
commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.speedLimitControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -332,94 +332,109 @@ export default {
|
||||
},
|
||||
// 设置进路
|
||||
arrangementRoute() {
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeSelection.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeSelection.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 现地设置进路
|
||||
setRoute(route) {
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:route.code}, [], 3).then((data)=>{
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:route.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 取消进路
|
||||
cancelTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 现地取消进路
|
||||
cancelTrainRouteByLow(selectType) {
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 现地总人解
|
||||
humanTrainRoute(selectType) {
|
||||
commitOperate(menuOperate.Signal.humanTrainRoute, {signalCode:selectType.code}, 0).then((data)=>{
|
||||
data.operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
this.$refs.password.doShow(data.operate);
|
||||
commitOperate(menuOperate.Signal.humanTrainRoute, {signalCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 现地信号重开操作
|
||||
reopenSignalByRoute(selectType) {
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 现地信号关灯
|
||||
signalCloseByLow(selectType) {
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置通过模式
|
||||
singalPassModel(selectType) {
|
||||
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 取消通过模式
|
||||
singalCancelPassModel(selectType) {
|
||||
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 查询进路状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeDetail.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取进路列表
|
||||
|
@ -243,28 +243,32 @@ export default {
|
||||
},
|
||||
// 现地设置扣车
|
||||
setDetainTrainByLow(selectType) {
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
/** 取消扣车 */
|
||||
cancleDetainTrainByLow(selectType) {
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 强制取消扣车
|
||||
@ -285,44 +289,58 @@ export default {
|
||||
// },
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standJumpStopControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then(({ valid, operate })=>{
|
||||
if (valid) {
|
||||
this.$refs.standJumpStopControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standJumpStopControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standJumpStopControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 停站时间控制
|
||||
setStopTime() {
|
||||
commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standStopTime.doShow(data.operate, this.selected, []);
|
||||
commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standStopTime.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 运行时间控制
|
||||
setRunLevel() {
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standRunLevel.doShow(data.operate, this.selected, []);
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then(({ valid, operate })=>{
|
||||
if (valid) {
|
||||
this.$refs.standRunLevel.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置提前发车
|
||||
earlyDeparture() {
|
||||
commitOperate(menuOperate.StationStand.earlyDeparture, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.earlyDeparture, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置折返策略
|
||||
setBackStrategy() {
|
||||
commitOperate(menuOperate.StationStand.setBackStrategy, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standBackStrategy.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.setBackStrategy, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standBackStrategy.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询站台状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standDetail.doShow(data.operate, this.selected, []);
|
||||
commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standDetail.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -238,63 +238,76 @@ export default {
|
||||
},
|
||||
// 道岔单锁
|
||||
lock(selectType) {
|
||||
commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 道岔解锁
|
||||
unlock(selectType) {
|
||||
commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, selectType);
|
||||
commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, selectType);
|
||||
}
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 现地道岔强扳
|
||||
switchTurnoutForce(selectType) {
|
||||
commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, selectType);
|
||||
commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, selectType);
|
||||
}
|
||||
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 单操到定位
|
||||
locate(selectType) {
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 单操到反位
|
||||
reverse(selectType) {
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 区段切除
|
||||
split() {
|
||||
commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置临时限速
|
||||
setSpeed() {
|
||||
commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.speedLimitControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 确认计轴有效
|
||||
alxeEffective() {
|
||||
commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.alxeEffective.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.alxeEffective.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
|
@ -208,6 +208,10 @@ export function commitOperate(operate, paramList, over) {
|
||||
};
|
||||
step.param = paramList;
|
||||
// over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
|
||||
if (over == 0 || over == 3) {
|
||||
const codeList = Object.values(paramList);
|
||||
step.code = codeList[0];
|
||||
}
|
||||
if (over != 0 && over != 3) {
|
||||
delete step.start;
|
||||
}
|
||||
@ -219,8 +223,8 @@ export function commitOperate(operate, paramList, over) {
|
||||
store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
resolve({operate:step});
|
||||
}
|
||||
resolve({ valid: valid, operate: step });
|
||||
}).catch(error=>{
|
||||
reject(error);
|
||||
});
|
||||
|
@ -29,7 +29,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="5">股道名称</el-checkbox>
|
||||
<el-checkbox :label="5">轨道名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="6">转换轨名称</el-checkbox>
|
||||
@ -77,180 +77,180 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ViewName',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setNameDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活显示,而是第一次显示时,需要初始化参数
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
name: 'ViewName',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setNameDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活显示,而是第一次显示时,需要初始化参数
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.nameLevels.sort().join('::')
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.nameLevels.sort().join('::')
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setNameDisplay();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setNameDisplay() {
|
||||
const deviceList = [];
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setNameDisplay();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setNameDisplay() {
|
||||
const deviceList = [];
|
||||
|
||||
// 信号机
|
||||
let nameShow = this.nameLevels.indexOf(1) !== -1;
|
||||
const signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
||||
});
|
||||
}
|
||||
// 信号机
|
||||
let nameShow = this.nameLevels.indexOf(1) !== -1;
|
||||
const signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 按钮名称
|
||||
nameShow = this.nameLevels.indexOf(3) !== -1;
|
||||
// 按钮名称
|
||||
nameShow = this.nameLevels.indexOf(3) !== -1;
|
||||
|
||||
// 道岔
|
||||
nameShow = this.nameLevels.indexOf(7) !== -1; // 道岔名称
|
||||
const switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; // 道岔轨名称
|
||||
const switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
|
||||
});
|
||||
}
|
||||
// 道岔
|
||||
nameShow = this.nameLevels.indexOf(7) !== -1; // 道岔名称
|
||||
const switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; // 道岔轨名称
|
||||
const switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 控制模式
|
||||
const indicatorShow = this.nameLevels.indexOf(8) !== -1;
|
||||
const control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); // 标识灯名称
|
||||
});
|
||||
}
|
||||
// 控制模式
|
||||
const indicatorShow = this.nameLevels.indexOf(8) !== -1;
|
||||
const control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); // 标识灯名称
|
||||
});
|
||||
}
|
||||
|
||||
// 区段
|
||||
nameShow = false;
|
||||
let standTrackNameShow = false;
|
||||
let reentryTrackNameShow = false;
|
||||
let transferTrackNameShow = false;
|
||||
const sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
if (elem.isSwitchSection && elem.parentCode) {
|
||||
// 道岔轨的区段名称默认不显示
|
||||
nameShow = false;
|
||||
} else {
|
||||
if (elem.type === '01') {
|
||||
nameShow = this.nameLevels.indexOf(11) !== -1;
|
||||
} else if (elem.type === '02') {
|
||||
// 股道轨名称
|
||||
nameShow = this.nameLevels.indexOf(5) !== -1;
|
||||
} else if (elem.type === '03') {
|
||||
// 道岔区段名称
|
||||
nameShow = this.nameLevels.indexOf(9) !== -1;
|
||||
}
|
||||
}
|
||||
// 区段
|
||||
nameShow = false;
|
||||
let standTrackNameShow = false;
|
||||
let reentryTrackNameShow = false;
|
||||
let transferTrackNameShow = false;
|
||||
const sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
if (elem.isSwitchSection && elem.parentCode) {
|
||||
// 道岔轨的区段名称默认不显示
|
||||
nameShow = false;
|
||||
} else {
|
||||
if (elem.type === '01') {
|
||||
nameShow = this.nameLevels.indexOf(11) !== -1;
|
||||
} else if (elem.type === '02') {
|
||||
// 轨道轨名称
|
||||
nameShow = this.nameLevels.indexOf(5) !== -1;
|
||||
} else if (elem.type === '03') {
|
||||
// 道岔区段名称
|
||||
nameShow = this.nameLevels.indexOf(9) !== -1;
|
||||
}
|
||||
}
|
||||
|
||||
// 站台轨名称
|
||||
if (elem.isStandTrack) {
|
||||
standTrackNameShow = this.nameLevels.indexOf(2) !== -1;
|
||||
}
|
||||
// 站台轨名称
|
||||
if (elem.isStandTrack) {
|
||||
standTrackNameShow = this.nameLevels.indexOf(2) !== -1;
|
||||
}
|
||||
|
||||
// 折返轨名称
|
||||
if (elem.isReentryTrack) {
|
||||
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1;
|
||||
}
|
||||
// 折返轨名称
|
||||
if (elem.isReentryTrack) {
|
||||
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1;
|
||||
}
|
||||
|
||||
// 转换轨名称
|
||||
if (elem.isTransferTrack) {
|
||||
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1;
|
||||
}
|
||||
// 转换轨名称
|
||||
if (elem.isTransferTrack) {
|
||||
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1;
|
||||
}
|
||||
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
|
||||
});
|
||||
}
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 停车点
|
||||
const destCodeShow = this.nameLevels.indexOf(10) !== -1;
|
||||
const stopPointList = this.$store.getters['map/stopPointList'];
|
||||
if (stopPointList && stopPointList.length > 0) {
|
||||
stopPointList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
|
||||
});
|
||||
}
|
||||
// 停车点
|
||||
const destCodeShow = this.nameLevels.indexOf(10) !== -1;
|
||||
const stopPointList = this.$store.getters['map/stopPointList'];
|
||||
if (stopPointList && stopPointList.length > 0) {
|
||||
stopPointList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 车站
|
||||
const kmPostShow = this.nameLevels.indexOf(12) !== -1;
|
||||
const stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); // 公里标
|
||||
});
|
||||
}
|
||||
// 车站
|
||||
const kmPostShow = this.nameLevels.indexOf(12) !== -1;
|
||||
const stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); // 公里标
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<route-guide ref="routeGuide" />
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<password-box ref="passwordBox" @checkOver="passWordCommit"/>
|
||||
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -17,7 +17,7 @@ class Theme {
|
||||
'03': 'all', // 北京一 全显
|
||||
'04': 'all', // 成都三 全显
|
||||
'05': 'all', // 国际版运行图皮肤 指向05 福州线路 全显
|
||||
'06': 'all', // 宁波一 全显
|
||||
'06': 'ecStation', // 宁波一 集中站显示
|
||||
'07': 'ecStation', // 哈尔滨培训线路 集中站显示
|
||||
'08': 'all' // 佛山有轨线路 全显
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm stand-detain-train"
|
||||
class="foshan-01__systerm stand-detain-train"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="380px"
|
||||
|
@ -1,72 +1,82 @@
|
||||
<template>
|
||||
<el-dialog class="ningbo-01__systerm notice-info" :title="title" :visible.sync="show" width="360px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<div :key="index">{{message}}</div>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="foshan-01__systerm notice-info"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<div :key="index">{{ message }}</div>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'NoticeInfo',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: ['命令下达失败'],
|
||||
operate: null
|
||||
}
|
||||
export default {
|
||||
name: 'NoticeInfo',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: ['命令下达失败'],
|
||||
operate: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '提示';
|
||||
},
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
}
|
||||
title() {
|
||||
return '提示';
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.messages = ['命令下达失败'];
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.messages = ['命令下达失败'];
|
||||
|
||||
if (messages && messages != 'null' && messages != 'undefined') {
|
||||
this.messages.push(messages);
|
||||
}
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
if (messages && messages != 'null' && messages != 'undefined') {
|
||||
this.messages.push(messages);
|
||||
}
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.doClose();
|
||||
},
|
||||
cancel() {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.doClose();
|
||||
},
|
||||
cancel() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
@ -74,4 +84,4 @@
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,21 +1,31 @@
|
||||
<template>
|
||||
<el-dialog class="ningbo-01__systerm confirm-control" :title="title" :visible.sync="show" width="360px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{message}}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="foshan-01__systerm confirm-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -1,148 +1,158 @@
|
||||
<template>
|
||||
<el-dialog class="ningbo-01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="540px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{message}}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="foshan-01__systerm confirm-control-speed"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="540px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{ message }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmControlSpeed',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
type: '',
|
||||
operation: '',
|
||||
message: '',
|
||||
}
|
||||
export default {
|
||||
name: 'ConfirmControlSpeed',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
type: '',
|
||||
operation: '',
|
||||
message: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
return "区段设置限速";
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
return "区段取消限速";
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
return "道岔设置限速";
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
return "道岔取消限速";
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
return OperationEvent.Section.setSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
return OperationEvent.Section.cancelSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
return OperationEvent.Switch.setSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
return OperationEvent.Switch.cancelSpeed.confirm.domId;
|
||||
}
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
return '区段设置限速';
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
return '区段取消限速';
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
return '道岔设置限速';
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
return '道岔取消限速';
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.type = operate.type;
|
||||
this.operation = operate.operation;
|
||||
this.message = operate.message;
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
type: this.type
|
||||
}
|
||||
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.confirm.operation;
|
||||
return OperationEvent.Section.setSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm.operation;
|
||||
return OperationEvent.Section.cancelSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.confirm.operation;
|
||||
return OperationEvent.Switch.setSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm.operation;
|
||||
return OperationEvent.Switch.cancelSpeed.confirm.domId;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.type = operate.type;
|
||||
this.operation = operate.operation;
|
||||
this.message = operate.message;
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: this.type
|
||||
};
|
||||
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm.operation;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
@ -150,4 +160,4 @@
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,113 +1,123 @@
|
||||
<template>
|
||||
<el-dialog class="ningbo-01__systerm route-unlock-confirm" :title="title" :visible.sync="show" width="500px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span>在{{stationName}}【{{signalName}}】信号机,信号解锁,确认下达吗?</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="foshan-01__systerm route-unlock-confirm"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span>在{{ stationName }}【{{ signalName }}】信号机,信号解锁,确认下达吗?</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'RouteUnlockConfirm',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
signalName: '',
|
||||
stationName: ''
|
||||
}
|
||||
export default {
|
||||
name: 'RouteUnlockConfirm',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
signalName: '',
|
||||
stationName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '信号解封'
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.unlock.confirm.domId : '';
|
||||
}
|
||||
title() {
|
||||
return '信号解封';
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.stationName = ''
|
||||
this.signalName = '';
|
||||
if (selected) {
|
||||
this.signalName = selected.name;
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.unlock.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.stationName = '';
|
||||
this.signalName = '';
|
||||
if (selected) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.unlock.confirm.operation
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.unlock.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
@ -115,4 +125,4 @@
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,59 +1,67 @@
|
||||
<template>
|
||||
<el-dialog class="ningbo-01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="340px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{message}}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="11">
|
||||
<el-button type="primary" :id="confirmId" @click="confirm">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="foshan-01__systerm confirm-control-speed"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="340px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{ message }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="11">
|
||||
<el-button :id="confirmId" type="primary" @click="confirm">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmTip',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
message: '',
|
||||
confirmId: '',
|
||||
}
|
||||
export default {
|
||||
name: 'ConfirmTip',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
message: '',
|
||||
confirmId: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
return "提示";
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.message = operate.message;
|
||||
this.dialogShow = true;
|
||||
this.confirmId = operate.confirmId;
|
||||
},
|
||||
confirm() {
|
||||
this.$emit('close');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
return '提示';
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.message = operate.message;
|
||||
this.dialogShow = true;
|
||||
this.confirmId = operate.confirmId;
|
||||
},
|
||||
confirm() {
|
||||
this.$emit('close');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
@ -61,8 +69,8 @@
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
.ningbo-01__systerm .el-dialog .el-button{
|
||||
.foshan-01__systerm .el-dialog .el-button{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm signal-control"
|
||||
class="foshan-01__systerm signal-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm route-detail"
|
||||
class="foshan-01__systerm route-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="340px"
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm route-hand-control"
|
||||
class="foshan-01__systerm route-hand-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm route-lock"
|
||||
class="foshan-01__systerm route-lock"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="340px"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user