Merge remote-tracking branch 'origin/test_revert5.6'
This commit is contained in:
commit
1d824c135e
@ -18,6 +18,7 @@
|
||||
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
|
||||
},
|
||||
"dependencies": {
|
||||
"@stomp/stompjs": "^5.4.4",
|
||||
"axios": "^0.18.0",
|
||||
"dayjs": "^1.11.5",
|
||||
"echarts": "^4.7.0",
|
||||
@ -46,6 +47,7 @@
|
||||
"vuedraggable": "^2.24.3",
|
||||
"vuex": "^3.1.0",
|
||||
"wangeditor": "^4.6.17",
|
||||
"ws": "^8.13.0",
|
||||
"xlsx": "^0.14.2",
|
||||
"zrender": "^4.0.4"
|
||||
},
|
||||
|
55
src/App.vue
55
src/App.vue
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view />
|
||||
<router-view v-if="loadingComponent" />
|
||||
<deomon-list ref="deomonList" @enterQcode="qcodeEntry" />
|
||||
<qcode ref="qcode" />
|
||||
<div v-show="loading" class="AppAll">
|
||||
@ -8,7 +8,7 @@
|
||||
<img :src="loadingImg" style="width: 100%; height: 100%;">
|
||||
</div>
|
||||
<div
|
||||
v-if="!$store.state.user.baseUrl"
|
||||
v-if="!$store.state.user.baseUrl && needLoading"
|
||||
v-loading="!$store.state.user.baseUrl"
|
||||
element-loading-text="拼命加载中"
|
||||
element-loading-background="rgba(0, 0, 0, 0)"
|
||||
@ -22,8 +22,8 @@
|
||||
|
||||
<script>
|
||||
import { getToken, getUserIdKey } from '@/utils/auth';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { loginInfo, ProjectIcon } from '@/scripts/ProjectConfig';
|
||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||
import { loginInfo } from '@/scripts/ProjectConfig';
|
||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
import LoadingImg from '@/assets/loading.gif';
|
||||
import AppLoading from '@/assets/appLoading.png';
|
||||
@ -31,6 +31,9 @@ import { openIndexedDB } from '@/utils/indexedDb';
|
||||
import Favicon from '@/assets/icon/favicon.png';
|
||||
import DeomonList from '@/views/demonstration/deomonList/index';
|
||||
import Qcode from '@/layout/components/Qcode.vue';
|
||||
import {removeToken} from './utils/auth';
|
||||
import { getFrontProjectConfigByLogin} from '@/api/projectConfig';
|
||||
import { handlerUrl } from '@/utils/baseUrl';
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
@ -46,10 +49,16 @@ export default {
|
||||
loadingImg: LoadingImg,
|
||||
appLoading: AppLoading,
|
||||
loading: false,
|
||||
jlFavicon: Favicon,
|
||||
project: '',
|
||||
jlFavicon: Favicon
|
||||
loadingComponent: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
needLoading() {
|
||||
return this.$route.path !== '/authorization';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.beLogoutCount': async function(val) {
|
||||
if (this.$store.state.socket.loggedOutMsg.token === getToken()) {
|
||||
@ -57,8 +66,9 @@ export default {
|
||||
this.$alert(this.$t('tip.logoutTips'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
callback: action => {
|
||||
removeToken();
|
||||
this.$store.dispatch('exit').then(resp => {
|
||||
this.$router.push({path: loginInfo[getSessionStorage('project')].loginPath});
|
||||
this.$router.push({path: loginInfo[this.$store.state.projectConfig.markKey].loginPath});
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -76,17 +86,20 @@ export default {
|
||||
if (val.path == '/display/demon' && val.query.client == 'diagramEdit') { // 运行图编制
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.project = getSessionStorage('project');
|
||||
if (this.project) {
|
||||
document.querySelector("link[rel*='icon']").href = loginInfo[this.project].linkIcon || ProjectIcon[this.project];
|
||||
if (this.$route.query.project || this.$route.path === '/login' || this.$route.path === '/') {
|
||||
setSessionStorage('project', this.$route.query.project || 'login');
|
||||
}
|
||||
this.project = getSessionStorage('project');
|
||||
if (this.project !== this.$store.state.projectConfig.markKey) {
|
||||
this.initFrontProjectConfig();
|
||||
}
|
||||
},
|
||||
'$store.state.projectConfig.markKey': function(val) {
|
||||
if (val) { this.loadingComponent = true; }
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.prohibitSystemContextMenu();
|
||||
|
||||
window.addEventListener('beforeunload', async e => {
|
||||
if (!this.$route.query.noPreLogout) {
|
||||
await this.$store.dispatch('preLogout');
|
||||
@ -109,6 +122,22 @@ export default {
|
||||
this.$store.dispatch('subscribe_un', {});
|
||||
},
|
||||
methods: {
|
||||
initFrontProjectConfig() {
|
||||
getFrontProjectConfigByLogin(this.project).then(resp => {
|
||||
const urlData = handlerUrl();
|
||||
const { baseApiUrl, baseSite, ossUrl, loginProLogo, browserTitle} = resp.data.viewSetting;
|
||||
this.$store.dispatch('setBaseUrl', baseApiUrl || urlData.BASE_API);
|
||||
this.$store.dispatch('setBaseSite', baseSite || urlData.BASE_SITE);
|
||||
this.$store.dispatch('setOssUrl', ossUrl || urlData.OSS_URL);
|
||||
this.$store.dispatch('projectConfig/setMarkKey', resp.data.markKey);
|
||||
this.$store.dispatch('projectConfig/setProjectCode', resp.data.project);
|
||||
this.$store.dispatch('projectConfig/setViewSetting', resp.data.viewSetting);
|
||||
document.title = browserTitle;
|
||||
if (loginProLogo) {
|
||||
document.querySelector("link[rel*='icon']").href = (ossUrl || urlData.OSS_URL) + '/logo/' + loginProLogo;
|
||||
}
|
||||
}).catch(e => this.$message.error('获取配置数据失败!'));
|
||||
},
|
||||
quickEntry() {
|
||||
this.$refs.deomonList.doShow();
|
||||
},
|
||||
|
@ -32,6 +32,14 @@ export function updateTraining(data) {
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 更新实训标签 */
|
||||
export function updateTrainingLabel(data) {
|
||||
return request({
|
||||
url: `/api/v2/training/published/update/label`,
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 查询步骤列表 */
|
||||
export function getTrainingStepList(trainingId) {
|
||||
return request({
|
||||
|
@ -146,3 +146,50 @@ export function updateMapFunctionSubset(data) {
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 根据模板生成地图功能 */
|
||||
export function generateMapFunctionByTemplate(data) {
|
||||
return request({
|
||||
url: `/api/mapFunction/generate/from/template`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 创建模板线路功能 */
|
||||
export function createTemplateMapFunction(data) {
|
||||
return request({
|
||||
url: `/api/mapFunction/template`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 修改模板线路功能 */
|
||||
export function updateTemplateMapFunction(data) {
|
||||
return request({
|
||||
url: `/api/mapFunction/template/${data.id}`,
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 删除模板线路功能 */
|
||||
export function deleteTemplateMapFunction(id) {
|
||||
return request({
|
||||
url: `/api/mapFunction/template/${id}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
/** 查询模板线路功能列表 */
|
||||
export function queryTemplateMapFunctionList(params) {
|
||||
return request({
|
||||
url: `/api/mapFunction/template/list`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
/** 分页查询模板线路功能列表 */
|
||||
export function queryTemplateMapFunPaged(params) {
|
||||
return request({
|
||||
url: `/api/mapFunction/template/paged`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
BIN
src/assets/sim_id.jpg
Normal file
BIN
src/assets/sim_id.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
@ -18,5 +18,7 @@ export default {
|
||||
getLoginQrCode: 'Failed to get login qr code, please refresh and try again',
|
||||
language: 'Language',
|
||||
clickSwitchLanguage: 'Click switch language',
|
||||
accountName: 'Account name'
|
||||
accountName: 'Account name',
|
||||
registerAccount: 'Register account',
|
||||
forgetPassword: 'Forget password?'
|
||||
};
|
||||
|
@ -18,5 +18,7 @@ export default {
|
||||
getLoginQrCode: '获取登录二维码失败,请刷新重试',
|
||||
language: '语言',
|
||||
clickSwitchLanguage: '点击切换语言',
|
||||
accountName: '账户名'
|
||||
accountName: '账户名',
|
||||
registerAccount: '注册账号',
|
||||
forgetPassword: '忘记密码?'
|
||||
};
|
||||
|
25
src/jmapNew/constant/nccGraphRender.js
Normal file
25
src/jmapNew/constant/nccGraphRender.js
Normal file
@ -0,0 +1,25 @@
|
||||
import nccGraphType from './nccGraphType';
|
||||
|
||||
const nccGraphRender = {};
|
||||
|
||||
/** RunLine渲染配置 */
|
||||
nccGraphRender[nccGraphType.RunLine] = {
|
||||
_type: nccGraphType.RunLine,
|
||||
zlevel: 1
|
||||
};
|
||||
/** NccStation渲染配置 */
|
||||
nccGraphRender[nccGraphType.NccStation] = {
|
||||
_type: nccGraphType.NccStation,
|
||||
zlevel: 1
|
||||
};
|
||||
/** NccTrain渲染配置 */
|
||||
nccGraphRender[nccGraphType.NccTrain] = {
|
||||
_type: nccGraphType.NccTrain,
|
||||
zlevel: 1
|
||||
};
|
||||
/** StationCircle渲染配置 */
|
||||
nccGraphRender[nccGraphType.StationCircle] = {
|
||||
_type: nccGraphType.StationCircle,
|
||||
zlevel: 1
|
||||
};
|
||||
export default nccGraphRender;
|
8
src/jmapNew/constant/nccGraphType.js
Normal file
8
src/jmapNew/constant/nccGraphType.js
Normal file
@ -0,0 +1,8 @@
|
||||
const nccGraphType = {
|
||||
RunLine: 'RunLine',
|
||||
NccStation: 'NccStation',
|
||||
NccTrain: 'NccTrain',
|
||||
StationCircle: 'StationCircle'
|
||||
};
|
||||
|
||||
export default nccGraphType;
|
@ -11,15 +11,27 @@ const map = {
|
||||
ControlSwitch: {
|
||||
width: 90,
|
||||
path: 'M6.429,40.85H0V15.05H51.429L64.286,0H77.143L90,15.05V31L79,43H64.286L51.429,30.1h-30V40.85H12.857V30.1H6.429V40.85ZM60,17.2l4.286-4.3H77.143l4.286,4.3V27.95l-4.286,4.3H64.286L60,27.95V17.2Z'
|
||||
},
|
||||
TransferSign: {
|
||||
width: 1024,
|
||||
path: 'M366.592 302.592c41.984-31.744 92.16-48.128 144.384-48.128 132.608 0 240.64 109.056 247.296 245.248l-26.112-27.136c-9.728-9.728-25.088-9.728-34.304 0s-9.728 26.112 0 35.84l64 66.56c5.12 5.632 11.776 7.68 18.944 7.168 6.656 0.512 13.824-2.048 18.944-7.168l64-66.56c9.728-9.728 9.728-26.112 0-35.84s-25.088-9.728-34.304 0l-26.624 27.648c-6.656-161.792-134.656-291.84-291.328-291.84-61.44 0-119.808 19.456-169.472 56.832-28.672 21.504-53.248 48.128-73.216 78.848-2.56 4.096-3.584 8.192-3.584 12.8 0 7.168 3.584 14.336 9.728 18.944 10.24 7.168 23.552 4.096 30.208-6.144 15.872-26.112 36.864-48.64 61.44-67.072z m144.896 514.56c61.44 0 119.808-19.456 169.472-56.832 28.672-21.504 53.248-48.128 73.216-78.848 2.56-4.096 3.584-8.192 3.584-12.8 0-7.168-3.584-14.336-9.728-18.944-10.24-7.168-23.552-4.096-30.208 6.144-16.896 26.112-37.888 48.64-61.952 67.072-42.496 31.744-92.16 48.128-144.384 48.128-132.096 0-240.64-109.056-247.296-245.76l25.6 27.136c9.728 9.728 25.088 9.728 34.304 0s9.728-26.112 0-35.84l-64-66.56c-5.12-5.632-11.776-7.68-18.944-7.168-6.656-0.512-13.824 2.048-18.944 7.168l-64 66.56c-9.728 9.728-9.728 26.112 0 35.84s25.088 9.728 34.304 0l26.624-27.648c7.68 162.304 135.68 292.352 292.352 292.352z'
|
||||
},
|
||||
NccTrainBody: {
|
||||
width: 195,
|
||||
path: 'M21.7305 69.7461H181.789C184.211 69.7461 186.164 67.793 186.164 65.3711L194.289 5.11719C194.289 2.69531 192.336 0.742188 189.914 0.742188H59.6797C33.1367 0.742188 0.792966 22.2656 0.792966 48.8086C0.792966 58.8672 16.125 69.7461 21.7305 69.7461Z'
|
||||
// path: 'M24.6484 134.746H184.707C187.129 134.746 189.082 132.793 189.082 130.371L197.207 70.1172C197.207 67.6953 195.254 65.7422 192.832 65.7422H62.5977C36.0547 65.7422 3.71094 87.2656 3.71094 113.809C3.71094 123.867 19.043 134.746 24.6484 134.746Z'
|
||||
// path: 'M62.6442 298H480.377C486.697 298 491.795 293.669 491.795 288.299L513 154.701C513 149.331 507.903 145 501.582 145H161.687C92.413 145 7.99999 192.723 7.99999 251.576C7.99999 273.879 48.0146 298 62.6442 298Z'
|
||||
// path: 'M -23.77657 -22.3304 C -69.33338 -9.394520000000002 -108.70345 6.915939999999999 -97.45486 19.851829999999996 C -86.20626999999999 32.78771 -83.95655 26.600989999999996 -83.95655 26.600989999999996 L 85.89722 26.600989999999996 L 99.39553000000001 -22.33039 C 99.39553000000001 -22.33039 21.780230000000003 -35.26627 -23.776569999999992 -22.33039 z'
|
||||
// path: 'M 897.8 689.9 L 78.3 689.9 C 65.89999999999999 689.9 55.9 679.9 55.9 667.5 L 14.3 359 C 14.3 346.6 24.3 336.6 36.7 336.6 L 703.5 336.6 C 839.4 336.6 1005 446.8 1005 582.7 C 1005 634.2 926.5 689.9000000000001 897.8 689.9000000000001 z'
|
||||
// path: 'M897.8 689.9H78.3c-12.4 0-22.4-10-22.4-22.4L14.3 359c0-12.4 10-22.4 22.4-22.4h666.8c135.9 0 301.5 110.2 301.5 246.1 0 51.5-78.5 107.2-107.2 107.2z'
|
||||
}
|
||||
};
|
||||
|
||||
// M 897.8 689.9 L 78.3 689.9 C 65.89999999999999 689.9 55.9 679.9 55.9 667.5 L 14.3 359 C 14.3 346.6 24.3 336.6 36.7 336.6 L 703.5 336.6 C 839.4 336.6 1005 446.8 1005 582.7 C 1005 634.2 926.5 689.9000000000001 897.8 689.9000000000001 z
|
||||
export default function createPathSvg(model) {
|
||||
const svg = path.createFromString(map[model._subType].path, {
|
||||
shape: {
|
||||
zlevel: model.zlevel,
|
||||
z: model.z
|
||||
},
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {},
|
||||
style: {
|
||||
fill: model.fill
|
||||
}
|
||||
@ -27,5 +39,8 @@ export default function createPathSvg(model) {
|
||||
const scaleX = model.width / map[model._subType].width;
|
||||
svg.scale = [scaleX, scaleX];
|
||||
svg.position = [model.x, model.y];
|
||||
if (model.rotation) {
|
||||
svg.rotation = model.rotation;
|
||||
}
|
||||
return svg;
|
||||
}
|
||||
|
@ -1,17 +0,0 @@
|
||||
import systemGraphType from './systemGraphType';
|
||||
|
||||
const systemGraphRender = {};
|
||||
|
||||
/** Line渲染配置*/
|
||||
systemGraphRender[systemGraphType.Line] = {
|
||||
_type: systemGraphType.Line,
|
||||
zlevel: 1
|
||||
};
|
||||
|
||||
/** Text渲染配置*/
|
||||
systemGraphRender[systemGraphType.Text] = {
|
||||
_type: systemGraphType.Text,
|
||||
zlevel: 1
|
||||
};
|
||||
|
||||
export default systemGraphRender;
|
@ -1,8 +0,0 @@
|
||||
const systemGraphType = {
|
||||
Line: 'Line',
|
||||
Text: 'Text',
|
||||
Rect: 'Rect',
|
||||
Arrow: 'Arrow'
|
||||
};
|
||||
|
||||
export default systemGraphType;
|
@ -507,6 +507,32 @@ class Jlmap {
|
||||
}
|
||||
}
|
||||
}
|
||||
clearNccTrain() {
|
||||
for (const key in this.mapDevice) {
|
||||
if (this.mapDevice[key]._type === 'NccTrain') {
|
||||
this.$painter.delete(this.mapDevice[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
updateNccTrain(list) {
|
||||
list.forEach(item => {
|
||||
let oDevice = null;
|
||||
if (this.mapDevice[item.groupNum]) {
|
||||
oDevice = this.mapDevice[item.groupNum];
|
||||
Object.assign(oDevice, item);
|
||||
} else {
|
||||
oDevice = deviceFactory('NccTrain', item, this.showConfig);
|
||||
this.mapDevice[item.groupNum] = oDevice;
|
||||
}
|
||||
if (!item.showTrainDiagram) {
|
||||
this.$painter.delete(oDevice);
|
||||
delete this.mapDevice[item.groupNum];
|
||||
} else {
|
||||
this.$painter.updateNccTrain(oDevice);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
update(list = [], fetch = true) {
|
||||
this.setUpdateMapDevice(list, fetch); // 增加一个 前数据 处理 为了在区段中 获取全部的 道岔信息
|
||||
|
||||
@ -536,6 +562,7 @@ class Jlmap {
|
||||
}
|
||||
} else if (elem.deviceType == 'OVERLAP') {
|
||||
const overlapRoute = this.mapDevice[elem.code];
|
||||
if (!overlapRoute || !overlapRoute.pathList || overlapRoute.pathList[0]) { return; }
|
||||
const model = this.mapDevice[overlapRoute.pathList[0].sectionList[0]];
|
||||
if (overlapRoute.pathList[0].right) {
|
||||
overlapRoute['points'] = { x: model.points[0].x, y: model.points[0].y };
|
||||
@ -674,7 +701,7 @@ class Jlmap {
|
||||
store.commit('map/updateActiveTrainList', elem);
|
||||
} else if (elem.deviceType === 'STAND') {
|
||||
store.dispatch('map/updateStationStand', elem);
|
||||
const psdDevice = this.mapDevice[this.mapDevice[elem.code].psdCode];
|
||||
const psdDevice = this.mapDevice[(this.mapDevice[elem.code] || {}).psdCode];
|
||||
if (psdDevice) {
|
||||
psdDevice.fault = elem.fault;
|
||||
this.$painter.update(psdDevice);
|
||||
|
@ -1,4 +1,5 @@
|
||||
import deviceType from './constant/deviceType';
|
||||
import nccGraphType from './constant/nccGraphType';
|
||||
import Eventful from 'zrender/src/mixin/Eventful';
|
||||
import * as eventTool from 'zrender/src/core/event';
|
||||
import store from '@/store/index';
|
||||
@ -10,7 +11,8 @@ class EventModel {
|
||||
|
||||
let view = e.target;
|
||||
while (view) {
|
||||
if (Object.values(deviceType).includes(view._type)) {
|
||||
const types = {...deviceType, ...nccGraphType};
|
||||
if (Object.values(types).includes(view._type)) {
|
||||
this.deviceCode = view._code;
|
||||
this.deviceType = view._type;
|
||||
this.eventTarget = view;
|
||||
|
@ -2,7 +2,7 @@ import * as zrUtil from 'zrender/src/core/util';
|
||||
// import * as vector from 'zrender/src/core/vector';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import deviceType from './constant/deviceType';
|
||||
import systemGraphType from './constant/systemGraphType';
|
||||
import nccGraphType from './constant/nccGraphType';
|
||||
import transitionDeviceStatus from './constant/stateTransition';
|
||||
// import shapefactory from './shape/factory';
|
||||
import Graphic from './shape';
|
||||
@ -43,7 +43,7 @@ class Painter {
|
||||
// 添加子级图层
|
||||
zrUtil.each([
|
||||
...Object.values(deviceType),
|
||||
...Object.values(systemGraphType)], (type) => {
|
||||
...Object.values(nccGraphType)], (type) => {
|
||||
const level = new Group({ name: `__${type}__` });
|
||||
this.mapInstanceLevel[type] = level;
|
||||
this.parentLevel.add(level);
|
||||
@ -155,13 +155,17 @@ class Painter {
|
||||
trainDevice.instance && this.mapInstanceLevel[deviceType.Train].remove(trainDevice.instance);
|
||||
trainDevice.instance = null;
|
||||
trainDevice.zrOptions = this.$jmap.$options;
|
||||
this.add(trainDevice);
|
||||
curModel.sectionModel && curModel.sectionModel.instance && this.add(trainDevice);
|
||||
});
|
||||
|
||||
if (this.screenFlag) {
|
||||
this.$transformHandleScreen.transformView(device.instance);
|
||||
}
|
||||
}
|
||||
updateNccTrain(device) {
|
||||
this.delete(device);
|
||||
this.add(device);
|
||||
}
|
||||
/** 画面更新 */
|
||||
updatePicture(device) {
|
||||
if (device) {
|
||||
|
@ -1,15 +1,15 @@
|
||||
import * as parserGraph from './parser-graph.js';
|
||||
import * as parserSystemGraph from './parser-systemGraph.js';
|
||||
import * as parserNccGraph from './parser-nccGraph.js';
|
||||
|
||||
export const ParserType = {
|
||||
Graph: { name: '绘图', value: 'Graph' },
|
||||
systemGraph: { name: '系统绘图', value: 'systemGraph' }
|
||||
nccGraph: { name: '系统绘图', value: 'NccGraph' }
|
||||
};
|
||||
|
||||
export function parserFactory(type) {
|
||||
switch (type) {
|
||||
case ParserType.Graph.value : return parserGraph;
|
||||
case ParserType.systemGraph.value: return parserSystemGraph;
|
||||
case ParserType.nccGraph.value: return parserNccGraph;
|
||||
}
|
||||
|
||||
return parserGraph;
|
||||
|
86
src/jmapNew/parser/parser-nccGraph.js
Normal file
86
src/jmapNew/parser/parser-nccGraph.js
Normal file
@ -0,0 +1,86 @@
|
||||
import * as zrUtil from 'zrender/src/core/util';
|
||||
import nccGraphType from '../constant/nccGraphType';
|
||||
import nccGraphRender from '../constant/nccGraphRender';
|
||||
import Vue from 'vue';
|
||||
import { deepClone } from '@/utils/index';
|
||||
|
||||
export function deviceFactory(type, elem, showConfig) {
|
||||
return {...nccGraphRender[type], ...elem, ...showConfig};
|
||||
}
|
||||
|
||||
export function createDevice(type, elem, propConvert, showConfig) {
|
||||
const device = deviceFactory(type, Object.assign(elem, { _type: type } ), showConfig);
|
||||
return propConvert ? propConvert.initPrivateProps(device) : device;
|
||||
}
|
||||
|
||||
export function parser(nccData, skinCode, showConfig) {
|
||||
const nccDevice = {};
|
||||
const runPositionData = {};
|
||||
const propConvert = skinCode ? Vue.prototype.$theme.loadPropConvert(skinCode) : null;
|
||||
if (nccData) {
|
||||
zrUtil.each(nccData.nccStationList || [], elem => {
|
||||
nccDevice[elem.code] = createDevice(nccGraphType.NccStation, elem, propConvert, showConfig);
|
||||
if (elem.stationCode) {
|
||||
runPositionData[elem.stationCode] = handleRunPositionData(elem, nccData.runLineList);
|
||||
}
|
||||
}, this);
|
||||
|
||||
zrUtil.each(nccData.runLineList || [], elem => {
|
||||
nccDevice[elem.code] = createDevice(nccGraphType.RunLine, elem, propConvert, showConfig);
|
||||
}, this);
|
||||
|
||||
zrUtil.each(nccData.stationCircleList || [], elem => {
|
||||
nccDevice[elem.code] = createDevice(nccGraphType.StationCircle, elem, propConvert, showConfig);
|
||||
}, this);
|
||||
|
||||
}
|
||||
return { nccDevice, runPositionData };
|
||||
}
|
||||
function handleRunPositionData(nccStation, runLineList) {
|
||||
const positionData = [];
|
||||
nccStation.lineNames.forEach(lineName => {
|
||||
const runLine = runLineList.find(elem => elem.lineName === lineName);
|
||||
if (runLine) {
|
||||
const pointIndex = runLine.points.findIndex(point => point.x === nccStation.position.x && point.y === nccStation.position.y);
|
||||
positionData.push({runLineCode: runLine.code, pointIndex: pointIndex});
|
||||
}
|
||||
});
|
||||
return positionData;
|
||||
}
|
||||
|
||||
// 同步绘制数据到原始数据
|
||||
export function updateForList(model, state, lstName) {
|
||||
if (!state.nccData) { state.nccData = {nccStationList: [], runLineList:[], stationCircleList: [], displayConfig: {} }; }
|
||||
const list = state.nccData[lstName];
|
||||
if (list && list instanceof Array) {
|
||||
const i = list.findIndex(elem => elem.code == model.code );
|
||||
if (i < 0) {
|
||||
list.push(deepClone(model)); // 新增
|
||||
} else {
|
||||
if (model._dispose) {
|
||||
list.splice(i, 1);
|
||||
} else {
|
||||
list.splice(i, 1, deepClone(model));
|
||||
}
|
||||
}
|
||||
state.nccData[lstName] = [...list];
|
||||
} else {
|
||||
state.nccData[lstName] = [model];
|
||||
}
|
||||
state.map.nccData = JSON.stringify(state.nccData);
|
||||
}
|
||||
export function updateDisplayConfig(state, config) {
|
||||
if (!state.nccData) { state.nccData = {nccStationList: [], runLineList:[], stationCircleList: [], displayConfig: {} }; }
|
||||
state.nccData.displayConfig = config;
|
||||
state.map.nccData = JSON.stringify(state.nccData);
|
||||
}
|
||||
|
||||
export function updateMapData(state, model) {
|
||||
if (state.map && model) {
|
||||
switch (model._type) {
|
||||
case nccGraphType.RunLine: updateForList(model, state, 'runLineList'); break;
|
||||
case nccGraphType.NccStation: updateForList(model, state, 'nccStationList'); break;
|
||||
case nccGraphType.StationCircle: updateForList(model, state, 'stationCircleList'); break;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
import * as zrUtil from 'zrender/src/core/util';
|
||||
import systemGraphType from '../constant/systemGraphType';
|
||||
import systemGraphRender from '../constant/systemGraphRender';
|
||||
import Vue from 'vue';
|
||||
import { deepClone } from '@/utils/index';
|
||||
|
||||
export function deviceFactory(type, elem, showConfig) {
|
||||
return {...systemGraphRender[type], ...elem, ...showConfig};
|
||||
}
|
||||
|
||||
export function createDevice(type, elem, propConvert, showConfig) {
|
||||
const device = deviceFactory(type, Object.assign(elem, { _type: type } ), showConfig);
|
||||
return propConvert ? propConvert.initPrivateProps(device) : device;
|
||||
}
|
||||
|
||||
export function parser(data, skinCode, showConfig) {
|
||||
var mapDevice = {};
|
||||
var propConvert = skinCode ? Vue.prototype.$theme.loadPropConvert(skinCode) : null;
|
||||
if (data) {
|
||||
zrUtil.each(data.lineList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(systemGraphType.Line, elem, propConvert, showConfig);
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.textList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(systemGraphType.Text, elem, propConvert, showConfig);
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.rectList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(systemGraphType.Rect, elem, propConvert, showConfig);
|
||||
}, this);
|
||||
|
||||
}
|
||||
|
||||
return mapDevice;
|
||||
}
|
||||
|
||||
// 同步绘制数据到原始数据
|
||||
export function updateForList(model, state, lstName) {
|
||||
const list = state.map[lstName];
|
||||
if (list && list instanceof Array) {
|
||||
const i = list.findIndex(elem => elem.code == model.code );
|
||||
if (i < 0) {
|
||||
list.push(deepClone(model)); // 新增
|
||||
} else {
|
||||
if (model._dispose) {
|
||||
list.splice(i, 1);
|
||||
} else {
|
||||
list.splice(i, 1, deepClone(model));
|
||||
}
|
||||
}
|
||||
state.map[lstName] = [...list];
|
||||
} else {
|
||||
state.map[lstName] = [model];
|
||||
}
|
||||
}
|
||||
|
||||
export function updateMapData(state, model) {
|
||||
if (state.map && model) {
|
||||
switch (model._type) {
|
||||
case systemGraphType.Line: updateForList(model, state, 'lineList'); break;
|
||||
case systemGraphType.Text: updateForList(model, state, 'textList'); break;
|
||||
case systemGraphType.Rect: updateForList(model, state, 'rectList'); break;
|
||||
}
|
||||
}
|
||||
}
|
@ -169,7 +169,7 @@ export default class Station extends Group {
|
||||
return item.includes('lineCode=16');
|
||||
});
|
||||
const pic = store.state.map.picture;
|
||||
if ((queryCtc && model.createControlMode) || (pic == 'trafficTerminal' && queryCtcLineCode)) {
|
||||
if ((queryCtc || (pic == 'trafficTerminal' && queryCtcLineCode)) && model.createControlMode) {
|
||||
this.createCtcControlMode();
|
||||
} else if (this.style.Station.StationControl.special) {
|
||||
if (model.visible && model.createControlMode) { // model.createControlMode 控制模式
|
||||
|
@ -180,7 +180,7 @@ export default class Train extends Group {
|
||||
}
|
||||
if (style.Train.directionArrow.hasArrow) { // 列车运行上下方箭头(eg:宁波yi)
|
||||
const arrowPoint = { x: 0, y: 0 };
|
||||
if (model.trainWindowModel) {
|
||||
if (model.trainWindowModel && model.trainWindowModel.instance) {
|
||||
arrowPoint.x = model.trainWindowModel.instance.computedPoint.x;
|
||||
arrowPoint.y = model.right ? model.trainWindowModel.instance.computedPoint.y + style.Train.directionArrow.distanceBottom : model.trainWindowModel.instance.computedPoint.y - style.Train.directionArrow.distanceTop;
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
import graphMapShape from './graph';
|
||||
import systemGraphShape from './systemGraph';
|
||||
import nccGraphShape from './nccGraph';
|
||||
|
||||
export default {
|
||||
__Shape: {
|
||||
...graphMapShape,
|
||||
// ...systemGraphShape
|
||||
...nccGraphShape
|
||||
},
|
||||
getBuilder(type) {
|
||||
const ShapeClazz = this.__Shape[type];
|
||||
|
22
src/jmapNew/shape/nccGraph/NccStation/Transfer.js
Normal file
22
src/jmapNew/shape/nccGraph/NccStation/Transfer.js
Normal file
@ -0,0 +1,22 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import createPathSvg from '../../../constant/pathsvg';
|
||||
|
||||
export default class Transfer extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = model.z;
|
||||
this._subType = model._subType;
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
this.path = createPathSvg(this.model);
|
||||
this.add(this.path);
|
||||
}
|
||||
setControlColor(color) {
|
||||
this.path.setStyle({fill: color});
|
||||
}
|
||||
recover() {
|
||||
}
|
||||
}
|
89
src/jmapNew/shape/nccGraph/NccStation/index.js
Normal file
89
src/jmapNew/shape/nccGraph/NccStation/index.js
Normal file
@ -0,0 +1,89 @@
|
||||
import Circle from 'zrender/src/graphic/shape/Circle';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
import Transfer from './Transfer';
|
||||
|
||||
export default class NccStation extends Group {
|
||||
constructor(model, {style, lineCode}) {
|
||||
super();
|
||||
this._code = model.code;
|
||||
this.stationCode = model.stationCode;
|
||||
this._type = model._type;
|
||||
this.name = model.name;
|
||||
this.zlevel = model.zlevel;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.z = 6;
|
||||
this.lineCode = lineCode;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
if (!model.position) { return; }
|
||||
this.stationMain = new Circle({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
cx: model.position.x,
|
||||
cy: model.position.y,
|
||||
r: model.radius
|
||||
},
|
||||
style: {
|
||||
fill: model.fillColor,
|
||||
lineWidth: model.lineWidth,
|
||||
stroke: model.lineColor
|
||||
}
|
||||
});
|
||||
this.stationName = new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: {
|
||||
x: model.position.x + model.snOffset.x,
|
||||
y: model.position.y + model.snOffset.y,
|
||||
text: model.name,
|
||||
fontFamily: this.style.fontFamily,
|
||||
fontSize: Number(model.font),
|
||||
textFill: model.fontColor,
|
||||
textAlign: 'middle'
|
||||
}
|
||||
});
|
||||
if (model.isTransfer) {
|
||||
this.transferSign = new Transfer({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 2,
|
||||
x: model.position.x - model.radius,
|
||||
y: model.position.y - model.radius,
|
||||
_subType: 'TransferSign',
|
||||
width: model.radius * 2,
|
||||
fill: '#f00'
|
||||
});
|
||||
this.add(this.transferSign);
|
||||
this.add(this.transferSign);
|
||||
}
|
||||
this.add(this.stationMain);
|
||||
this.add(this.stationName);
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
}
|
||||
getBoundingRect() {
|
||||
if (this.stationMain) {
|
||||
return this.stationMain.getBoundingRect().clone();
|
||||
} else {
|
||||
return new BoundingRect(0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
setShowStation(stationCode) {
|
||||
|
||||
}
|
||||
screenShow() {
|
||||
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
116
src/jmapNew/shape/nccGraph/NccTrain/index.js
Normal file
116
src/jmapNew/shape/nccGraph/NccTrain/index.js
Normal file
@ -0,0 +1,116 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
import createPathSvg from '../../../constant/pathsvg';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class NccTrain extends Group {
|
||||
constructor(model, {style, lineCode}) {
|
||||
super();
|
||||
this._code = model.groupNum;
|
||||
this._type = model._type;
|
||||
this.name = model.groupNum;
|
||||
this.zlevel = model.zlevel;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.z = 6;
|
||||
this.lineCode = lineCode;
|
||||
this.point = [];
|
||||
this.create();
|
||||
this.setState(model);
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
if (!model.startStationCode || !model.targetStationCode) {
|
||||
return;
|
||||
}
|
||||
const nccRunPositionData = store.state.map.nccRunPositionData;
|
||||
const startPositions = nccRunPositionData[model.startStationCode];
|
||||
const endPositions = nccRunPositionData[model.targetStationCode];
|
||||
let runLineCode = '';
|
||||
let pointIndexs = [];
|
||||
let runLinePoints = [];
|
||||
startPositions.forEach(item =>{
|
||||
const position = endPositions.find(el => el.runLineCode === item.runLineCode);
|
||||
if (position) {
|
||||
runLineCode = position.runLineCode;
|
||||
pointIndexs = [item.pointIndex, position.pointIndex];
|
||||
}
|
||||
});
|
||||
if (runLineCode) {
|
||||
const runLine = store.getters['map/getNccDeviceByCode'](runLineCode);
|
||||
runLinePoints = runLine.points;
|
||||
}
|
||||
let px = 0;
|
||||
let py = 0;
|
||||
let angle = 0;
|
||||
if (pointIndexs.length && Math.abs(pointIndexs[0] - pointIndexs[1]) > 1) {
|
||||
let stateI = pointIndexs[0];
|
||||
const endI = pointIndexs[1];
|
||||
const step = Math.sign( endI - stateI);
|
||||
const lengthList = [];
|
||||
let totalLength = 0;
|
||||
while (stateI !== endI) {
|
||||
const p1 = runLinePoints[stateI];
|
||||
const p2 = runLinePoints[stateI + step];
|
||||
const length = Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));
|
||||
lengthList.push(length);
|
||||
totalLength += length;
|
||||
stateI += step;
|
||||
}
|
||||
const complateLength = totalLength * model.stationComplateRatio;
|
||||
let nowIndex = 0;
|
||||
let nowLength = complateLength;
|
||||
while (nowLength > lengthList[nowIndex]) {
|
||||
nowLength -= lengthList[nowIndex];
|
||||
nowIndex++;
|
||||
}
|
||||
const startP = runLinePoints[pointIndexs[0] + nowIndex * step];
|
||||
const endP = runLinePoints[pointIndexs[0] + (nowIndex + 1) * step];
|
||||
const nowRatio = nowLength / lengthList[nowIndex];
|
||||
px = startP.x + Math.round(nowRatio * (endP.x - startP.x));
|
||||
py = startP.y + Math.round(nowRatio * (endP.y - startP.y));
|
||||
angle = Math.atan2(startP.y - endP.y, startP.x - endP.x);
|
||||
angle = -angle;
|
||||
} else if (pointIndexs.length) {
|
||||
const startP = runLinePoints[pointIndexs[0]];
|
||||
const endP = runLinePoints[pointIndexs[1]];
|
||||
px = startP.x + Math.round(model.stationComplateRatio * (endP.x - startP.x));
|
||||
py = startP.y + Math.round(model.stationComplateRatio * (endP.y - startP.y));
|
||||
angle = Math.atan2( startP.y - endP.y, startP.x - endP.x);
|
||||
angle = -angle;
|
||||
}
|
||||
const trainWidth = 10;
|
||||
const offset = -6;
|
||||
const cosN = Math.cos(angle);
|
||||
const sinN = Math.sin(angle);
|
||||
this.tranBody = createPathSvg({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 5,
|
||||
x: px - (cosN * trainWidth / 2) + sinN * offset,
|
||||
y: py + (sinN * trainWidth / 2) + cosN * offset,
|
||||
_subType: 'NccTrainBody',
|
||||
width: trainWidth,
|
||||
fill: '#CF6CC9',
|
||||
rotation: angle
|
||||
});
|
||||
this.point = [px + Math.sin(angle) * offset, py + Math.cos(angle) * offset];
|
||||
this.add(this.tranBody);
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
}
|
||||
getBoundingRect() {
|
||||
return new BoundingRect(this.point[0], this.point[1], 0, 0);
|
||||
}
|
||||
|
||||
setShowStation(stationCode) {
|
||||
|
||||
}
|
||||
screenShow() {
|
||||
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
152
src/jmapNew/shape/nccGraph/RunLine/index.js
Normal file
152
src/jmapNew/shape/nccGraph/RunLine/index.js
Normal file
@ -0,0 +1,152 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Polyline from 'zrender/src/graphic/shape/Polyline';
|
||||
import Sector from 'zrender/src/graphic/shape/Sector';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
|
||||
export default class RunLine extends Group {
|
||||
constructor(model, {style}) {
|
||||
super();
|
||||
this._code = model.code;
|
||||
this._type = model._type;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 0;
|
||||
this.model = model;
|
||||
this.backgroundColor = style.backgroundColor;
|
||||
this.style = style;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
}
|
||||
isRightAngle(x1, y1, x2, y2, x3, y3) {
|
||||
const distance12 = (x2 - x1) ** 2 + (y2 - y1) ** 2;
|
||||
const distance13 = (x3 - x1) ** 2 + (y3 - y1) ** 2;
|
||||
const distance23 = (x3 - x2) ** 2 + (y3 - y2) ** 2;
|
||||
if (distance12 >= distance13 && distance12 >= distance23) {
|
||||
return distance12 === distance13 + distance23;
|
||||
} else if (distance13 >= distance12 && distance13 >= distance23) {
|
||||
return distance13 === distance12 + distance23;
|
||||
} else {
|
||||
return distance23 === distance12 + distance13;
|
||||
}
|
||||
}
|
||||
create() {
|
||||
const model = this.model;
|
||||
const roundPointIndexList = [];
|
||||
if (model && model.points && model.points.length > 1) {
|
||||
const points = [];
|
||||
const modelPoints = model.points;
|
||||
const length = modelPoints.length;
|
||||
for (let i = 0; i < length; i++) {
|
||||
points.push([modelPoints[i].x, modelPoints[i].y]);
|
||||
if (i > 0 && i < length - 1) {
|
||||
const isRight = this.isRightAngle(modelPoints[i - 1].x, modelPoints[i - 1].y, modelPoints[i].x, modelPoints[i].y, modelPoints[i + 1].x, modelPoints[i + 1].y );
|
||||
isRight && roundPointIndexList.push(i);
|
||||
}
|
||||
}
|
||||
this.segment = new Polyline({
|
||||
zlevel: this.zlevel,
|
||||
z:this.z,
|
||||
shape: {
|
||||
points:points
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.width,
|
||||
stroke: model.lineColor
|
||||
}
|
||||
});
|
||||
this.add(this.segment);
|
||||
}
|
||||
if (model && model.name) {
|
||||
const startPoint = model.points[0];
|
||||
const endPoint = model.points[model.points.length - 1];
|
||||
this.startName = new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: {
|
||||
x: startPoint.x + model.offsetStart.x,
|
||||
y: startPoint.y + model.offsetStart.y,
|
||||
text: model.name,
|
||||
fontFamily: this.style.fontFamily,
|
||||
fontSize: Number(model.nameFont),
|
||||
textFill: model.nameColor,
|
||||
textAlign: 'middle',
|
||||
textBackgroundColor: model.textBackgroundColor,
|
||||
textPadding: 5,
|
||||
textBorderRadius: 5
|
||||
}
|
||||
});
|
||||
this.endName = new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: {
|
||||
x: endPoint.x + model.offsetEnd.x,
|
||||
y: endPoint.y + model.offsetEnd.y,
|
||||
text: model.name,
|
||||
fontFamily: this.style.fontFamily,
|
||||
fontSize: Number(model.nameFont),
|
||||
textFill: model.nameColor,
|
||||
textAlign: 'middle',
|
||||
textBackgroundColor: model.textBackgroundColor,
|
||||
textPadding: 5,
|
||||
textBorderRadius: 5
|
||||
}
|
||||
});
|
||||
this.add(this.startName);
|
||||
this.add(this.endName);
|
||||
}
|
||||
if (roundPointIndexList.length) {
|
||||
roundPointIndexList.forEach(pointIndex => {
|
||||
const simpx = model.points[pointIndex - 1].x + model.points[pointIndex + 1].x - model.points[pointIndex].x;
|
||||
const simpy = model.points[pointIndex - 1].y + model.points[pointIndex + 1].y - model.points[pointIndex].y;
|
||||
const preAngle = Math.atan2(model.points[pointIndex - 1].y - simpy, model.points[pointIndex - 1].x - simpx );
|
||||
const nextAngle = Math.atan2(model.points[pointIndex + 1].y - simpy, model.points[pointIndex + 1].x - simpx);
|
||||
const startAngle = Math.min(preAngle, nextAngle);
|
||||
const endAngle = Math.max(preAngle, nextAngle);
|
||||
const embellishSector1 = new Sector({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
cx: model.points[pointIndex].x + Math.sign(simpx - model.points[pointIndex].x) * model.width,
|
||||
cy: model.points[pointIndex].y + Math.sign(simpy - model.points[pointIndex].y) * model.width,
|
||||
r: model.width / 2 * 3 * Math.sqrt(2),
|
||||
r0: model.width / 2 * 3,
|
||||
startAngle: startAngle,
|
||||
endAngle:endAngle,
|
||||
clockwise: !(endAngle - startAngle > Math.PI)
|
||||
},
|
||||
style: {
|
||||
fill: this.backgroundColor
|
||||
}
|
||||
});
|
||||
const embellishSector2 = new Sector({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
cx: model.points[pointIndex].x + Math.sign(simpx - model.points[pointIndex].x) * model.width,
|
||||
cy: model.points[pointIndex].y + Math.sign(simpy - model.points[pointIndex].y) * model.width,
|
||||
r: model.width,
|
||||
r0: model.width / 2,
|
||||
startAngle: startAngle,
|
||||
endAngle: endAngle,
|
||||
clockwise: !(endAngle - startAngle > Math.PI)
|
||||
},
|
||||
style: {
|
||||
fill: model.lineColor
|
||||
}
|
||||
});
|
||||
this.add(embellishSector1);
|
||||
this.add(embellishSector2);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
}
|
||||
getAnchorPoint() {
|
||||
if (this.segment) {
|
||||
const rect = this.segment.getBoundingRect();
|
||||
return {x:rect.x, y:rect.y};
|
||||
} else {
|
||||
return {x:0, y:0};
|
||||
}
|
||||
}
|
||||
}
|
48
src/jmapNew/shape/nccGraph/StationCircle/index.js
Normal file
48
src/jmapNew/shape/nccGraph/StationCircle/index.js
Normal file
@ -0,0 +1,48 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
|
||||
export default class StationCircle extends Group {
|
||||
constructor(model, {style}) {
|
||||
super();
|
||||
this._code = model.code;
|
||||
this._type = model._type;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 9;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
}
|
||||
create() {
|
||||
const model = this.model;
|
||||
if (!model.position) { return; }
|
||||
this.rectBody = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
r: [model.r],
|
||||
x: model.position.x,
|
||||
y: model.position.y,
|
||||
width: model.width,
|
||||
height: model.height
|
||||
},
|
||||
style: {
|
||||
fill: model.fillColor,
|
||||
stroke: model.lineColor,
|
||||
lineWidth: model.lineWidth
|
||||
}
|
||||
});
|
||||
this.add(this.rectBody);
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
}
|
||||
getAnchorPoint() {
|
||||
if (this.rectBody) {
|
||||
const rect = this.rectBody.getBoundingRect();
|
||||
return {x:rect.x, y:rect.y};
|
||||
} else {
|
||||
return {x:this.model.position.x, y:this.model.position.y};
|
||||
}
|
||||
}
|
||||
}
|
14
src/jmapNew/shape/nccGraph/index.js
Normal file
14
src/jmapNew/shape/nccGraph/index.js
Normal file
@ -0,0 +1,14 @@
|
||||
import nccGraphType from '../../constant/nccGraphType';
|
||||
|
||||
import NccStation from './NccStation';
|
||||
import RunLine from './RunLine';
|
||||
import NccTrain from './NccTrain';
|
||||
import StationCircle from './StationCircle';
|
||||
/** 图库*/
|
||||
const mapShape = {};
|
||||
mapShape[nccGraphType.NccStation] = NccStation;
|
||||
mapShape[nccGraphType.RunLine] = RunLine;
|
||||
mapShape[nccGraphType.NccTrain] = NccTrain;
|
||||
mapShape[nccGraphType.StationCircle] = StationCircle;
|
||||
|
||||
export default mapShape;
|
@ -1,61 +0,0 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
|
||||
export default class Arrow extends Group {
|
||||
constructor(model, {style}) {
|
||||
super();
|
||||
this._code = model.code;
|
||||
this._type = model._type;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 0;
|
||||
this.model = model;
|
||||
// this.style = style;
|
||||
this.isShowShape = true;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
this.arrow = new Polygon({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
origin: [model.position.x, model.position.y],
|
||||
rotation: -Math.PI / 180 * Number(model.rotate),
|
||||
shape: {
|
||||
points: [
|
||||
[model.position.x, model.position.y],
|
||||
[model.position.x + model.triangleLength, model.position.y - model.triangleHeight / 2],
|
||||
[model.position.x + model.triangleLength, model.position.y - model.lineWidth / 2],
|
||||
[model.position.x + model.length, model.position.y - model.lineWidth / 2],
|
||||
[model.position.x + model.length, model.position.y + model.lineWidth / 2],
|
||||
[model.position.x + model.triangleLength, model.position.y + model.lineWidth / 2],
|
||||
[model.position.x + model.triangleLength, model.position.y + model.triangleHeight / 2]
|
||||
]
|
||||
},
|
||||
style: {
|
||||
fill: model.color
|
||||
}
|
||||
});
|
||||
this.add(this.arrow);
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.hide();
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
const rect = this.arrow.getBoundingRect();
|
||||
return { x:rect.x, y:rect.y };
|
||||
}
|
||||
}
|
@ -1,137 +0,0 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Polyline from 'zrender/src/graphic/shape/Polyline';
|
||||
import Circle from 'zrender/src/graphic/shape/Circle';
|
||||
|
||||
export default class Line2 extends Group {
|
||||
constructor(model, {style}) {
|
||||
super();
|
||||
this._code = model.code;
|
||||
this._type = model._type;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 0;
|
||||
this.model = model;
|
||||
this.style = style.Line;
|
||||
this.isShowShape = true;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
if (model && model.points.length > 1) {
|
||||
const points = [];
|
||||
const vicePoints = [];
|
||||
const modelPoints = model.points;
|
||||
const length = modelPoints.length;
|
||||
const path = window.location.href;
|
||||
if (model.type === '03' && !path.includes('/map/draw')) {
|
||||
for (let i = 0; i < length; i++) {
|
||||
points.push([modelPoints[i].x + 10, modelPoints[i].y]);
|
||||
}
|
||||
this.segment = new Polyline({
|
||||
zlevel: this.zlevel,
|
||||
z:this.z,
|
||||
shape: {
|
||||
points:points
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.width,
|
||||
stroke: model.lineColor || this.style.lineColor
|
||||
}
|
||||
});
|
||||
this.add(this.segment);
|
||||
for (let i = 0; i < length; i++) {
|
||||
vicePoints.push([modelPoints[i].x - model.offsetX, modelPoints[i].y + model.offsetY]);
|
||||
}
|
||||
this.viceSegment = new Polyline({
|
||||
zlevel: this.zlevel,
|
||||
z:this.z,
|
||||
shape: {
|
||||
points:vicePoints
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.width,
|
||||
stroke: model.lineColor || this.style.lineColor
|
||||
}
|
||||
});
|
||||
this.add(this.viceSegment);
|
||||
} else {
|
||||
for (let i = 0; i < length; i++) {
|
||||
points.push([modelPoints[i].x, modelPoints[i].y]);
|
||||
}
|
||||
this.segment = new Polyline({
|
||||
zlevel: this.zlevel,
|
||||
z:this.z,
|
||||
shape: {
|
||||
points:points
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.width,
|
||||
stroke: model.lineColor || this.style.lineColor
|
||||
}
|
||||
});
|
||||
this.add(this.segment);
|
||||
}
|
||||
|
||||
if (model.pointShow) {
|
||||
let cx = model.points[0].x;
|
||||
let cy = model.points[0].y;
|
||||
if (model.directionPoint == 'right') {
|
||||
cx = model.points[model.points.length - 1].x;
|
||||
cy = model.points[model.points.length - 1].y;
|
||||
}
|
||||
this.mapCircle = new Circle({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
cx: cx,
|
||||
cy: cy,
|
||||
r: model.radiusWidth
|
||||
},
|
||||
style: {
|
||||
fill: model.lineColor || this.style.lineColor
|
||||
}
|
||||
});
|
||||
this.add(this.mapCircle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setLineType(type) {
|
||||
switch (type) {
|
||||
case '01': break;
|
||||
case '02':
|
||||
this.segment && this.segment.setStyle('lineDash', this.style.lineDash || [4]);
|
||||
break;
|
||||
case '03':
|
||||
this.segment && this.segment.setStyle('lineDash', this.style.lineDash || [4]);
|
||||
this.viceSegment && this.viceSegment.setStyle('lineDash', this.style.lineDash || [4]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
this.setLineType(model.type);
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.segment && this.segment.show();
|
||||
this.viceSegment && this.viceSegment.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.segment && this.segment.hide();
|
||||
this.viceSegment && this.viceSegment.hide();
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
if (this.segment) {
|
||||
const rect = this.segment.getBoundingRect();
|
||||
return {x:rect.x, y:rect.y};
|
||||
} else {
|
||||
return {x:0, y:0};
|
||||
}
|
||||
}
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
|
||||
export default class Rect2 extends Group {
|
||||
constructor(model, {style, lineCode}) {
|
||||
super();
|
||||
this._code = model.code;
|
||||
this._type = model._type;
|
||||
this.name = model.code;
|
||||
this.zlevel = model.zlevel;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.z = 6;
|
||||
this.lineCode = lineCode;
|
||||
this.isShowShape = true;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
}
|
||||
|
||||
create() {
|
||||
var model = this.model;
|
||||
|
||||
this.rectModel = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
x: model.position.x,
|
||||
y: model.position.y,
|
||||
width: model.width,
|
||||
height: model.height
|
||||
},
|
||||
style: {
|
||||
fill: model.fillColor,
|
||||
lineWidth: model.lineWidth,
|
||||
stroke: model.lineColor
|
||||
}
|
||||
});
|
||||
this.add(this.rectModel);
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
getBoundingRect() {
|
||||
if (this.rectModel) {
|
||||
return this.rectModel.getBoundingRect().clone();
|
||||
} else {
|
||||
return new BoundingRect(this.model.position.x, this.model.position.y, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
setShowStation(stationCode) {
|
||||
|
||||
}
|
||||
screenShow() {
|
||||
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
|
||||
export default class Text2 extends Group {
|
||||
constructor(model, {style, lineCode}) {
|
||||
super();
|
||||
this._code = model.code;
|
||||
this._type = model._type;
|
||||
this.name = model.code;
|
||||
this.zlevel = model.zlevel;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.z = 6;
|
||||
this.lineCode = lineCode;
|
||||
this.isBigScreen = false;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
}
|
||||
|
||||
create() {
|
||||
var model = this.model;
|
||||
var [direction, content] = model.content.split('::');
|
||||
if (direction == 'V') {
|
||||
content = content.split('').join('\n');
|
||||
} else if (direction != 'H') {
|
||||
content = model.content;
|
||||
}
|
||||
|
||||
this.text = new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
x: model.position.x,
|
||||
y: model.position.y,
|
||||
text: content,
|
||||
fontFamily: this.style.fontFamily,
|
||||
fontSize: Number(model.font),
|
||||
textFill: model.fontColor,
|
||||
textAlign: 'middle'
|
||||
}
|
||||
});
|
||||
this.add(this.text);
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
if (this.isBigScreen) { this.screenShow(); }
|
||||
}
|
||||
getBoundingRect() {
|
||||
if (this.text) {
|
||||
return this.text.getBoundingRect().clone();
|
||||
} else {
|
||||
return new BoundingRect(this.model.position.x, this.model.position.y, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
});
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
screenShow() {
|
||||
this.isBigScreen = true;
|
||||
if (this.lineCode == '06') { // 宁波线路隐藏
|
||||
this.text && this.text.hide();
|
||||
} else {
|
||||
this.text && this.text.show();
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
import systemGraphType from '../../constant/systemGraphType';
|
||||
|
||||
import Line from './Line/index.js';
|
||||
import Text2 from './Text/index.js';
|
||||
import Rect2 from './Rect/index.js';
|
||||
import Arrow from './Arrow/index.js';
|
||||
|
||||
/** 图库*/
|
||||
const mapShape = {};
|
||||
mapShape[systemGraphType.Line] = Line;
|
||||
mapShape[systemGraphType.Text] = Text2;
|
||||
mapShape[systemGraphType.Rect] = Rect2;
|
||||
mapShape[systemGraphType.Arrow] = Arrow;
|
||||
|
||||
export default mapShape;
|
@ -72,7 +72,7 @@ import { mapGetters } from 'vuex';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { State2SimulationMap } from '@/scripts/cmdPlugin/Config';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
import SystemLogin from './menuDialog/systemLogin';
|
||||
import SystemLogout from './menuDialog/systemLogout';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
@ -23,7 +23,7 @@ import { mapGetters } from 'vuex';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
|
||||
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
|
||||
|
@ -16,7 +16,6 @@ import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
|
||||
|
||||
|
@ -16,7 +16,7 @@ import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
|
||||
|
||||
|
@ -21,7 +21,7 @@ import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
|
||||
|
||||
|
@ -14,8 +14,6 @@ import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
|
||||
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
@ -58,7 +58,16 @@ export default {
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('config/updateMenuBar');
|
||||
const _that = this;
|
||||
window.onclick = function (e) {
|
||||
if (!_that.$store.state.training.trainingStart) {
|
||||
_that.$refs.menuBar && _that.$refs.menuBar.blankClickClose();
|
||||
}
|
||||
};
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.onclick = function (e) {};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -372,6 +372,9 @@ export default {
|
||||
this.$refs.helpAbout.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
blankClickClose() {
|
||||
this.$refs.menuBar.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -33,7 +33,16 @@ export default {
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('config/updateMenuBar');
|
||||
const _that = this;
|
||||
window.onclick = function (e) {
|
||||
if (!_that.$store.state.training.trainingStart) {
|
||||
_that.$refs.menuBar && _that.$refs.menuBar.blankClickClose();
|
||||
}
|
||||
};
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.onclick = function (e) {};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -328,6 +328,9 @@ export default {
|
||||
this.$refs.helpAbout.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
blankClickClose() {
|
||||
this.$refs.menuBar.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -111,7 +111,7 @@
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
|
||||
import { getAutoReentryBySignalCode } from '@/utils/mapList';
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
@ -21,7 +21,7 @@ import { mapGetters } from 'vuex';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
|
||||
import {judgeStationControl} from '../../components/utils/menuJudge';
|
||||
|
@ -25,7 +25,7 @@ import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
import PasswordBox from '@/jmapNew/theme/components/menus/childDialog/passwordInputBox';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import {judgeStationControl} from '../../components/utils/menuJudge';
|
||||
|
@ -38,18 +38,18 @@
|
||||
<span style="margin-left: 10px">{{ getStateInfo(scope.row.rcvCompanies).time || '' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发令单位">
|
||||
<el-table-column label="发令单位" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.sendCompany ? scope.row.sendCompany.name : '' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sender" label="发令人" />
|
||||
<el-table-column prop="sender" label="发令人" show-overflow-tooltip />
|
||||
<el-table-column label="签否">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ getSignedStatus(getStateInfo(scope.row.rcvCompanies)) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="签收人">
|
||||
<el-table-column label="签收人" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ getSignedBy(scope.row.rcvCompanies) || '' }}</span>
|
||||
</template>
|
||||
@ -352,7 +352,10 @@ export default {
|
||||
},
|
||||
findDisCmdObj(obj, val) {
|
||||
return Object.values(obj).find(item => {
|
||||
return item.rcvCompanies[0].id == val;
|
||||
const find = item.rcvCompanies.find(ii => {
|
||||
return ii.id == val;
|
||||
});
|
||||
return find;
|
||||
});
|
||||
},
|
||||
searchCmd() {
|
||||
|
@ -96,7 +96,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
|
||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { getTrainDetailBytripNumber, getTrainDetailByStNumber } from '@/api/simulation';
|
||||
import NoticeInfo from '../childDialog/noticeInfo';
|
||||
|
@ -17,7 +17,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { State2SimulationMap } from '@/scripts/cmdPlugin/Config';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
import EachChildMenu from './eachChildMenu';
|
||||
|
||||
export default {
|
||||
|
@ -74,6 +74,16 @@ export const menuOperate = {
|
||||
// 添加备用车 (大铁线路 车次号 非车组号)
|
||||
operation: OperationEvent.Section.addSpareTrain.menu.operation,
|
||||
cmdType: CMD.Section.CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN
|
||||
},
|
||||
defectiveShunting:{
|
||||
// 分路不良
|
||||
operation: OperationEvent.Section.defectiveShunting.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING
|
||||
},
|
||||
cancelDefectiveShunting:{
|
||||
// 取消分路不良
|
||||
operation: OperationEvent.Section.cancelDefectiveShunting.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING
|
||||
}
|
||||
},
|
||||
Signal:{
|
||||
@ -617,6 +627,10 @@ export const menuOperate = {
|
||||
parkingTrain: {
|
||||
operation: OperationEvent.Driver.parkingTrain.menu.operation,
|
||||
cmdType: CMD.Driver.CMD_PARKING_TRAIN
|
||||
},
|
||||
takeOver: {
|
||||
operation: OperationEvent.Driver.takeOver.menu.operation,
|
||||
cmdType: CMD.Driver.CMD_DRIVER_TAKEOVER
|
||||
}
|
||||
},
|
||||
CTC: {
|
||||
|
@ -108,7 +108,6 @@
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
@ -124,7 +124,6 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
if (this.selected.type != '04') {
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
} else {
|
||||
this.menu = [];
|
||||
|
@ -195,7 +195,6 @@ export default {
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
|
@ -92,7 +92,6 @@ export default {
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
|
@ -17,7 +17,6 @@ import SetFault from '@/jmapNew/theme/components/menus/dialog/setFaultNew';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
@ -116,7 +115,6 @@ export default {
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
|
@ -137,7 +137,6 @@ export default {
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
|
@ -165,7 +165,6 @@ export default {
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
// if (!this.$store.state.scriptRecord.bgSet) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<div class="menus" :style="{width: width + 'px', height: '100%'}">
|
||||
<div class="title">{{ `哈尔滨局CTC3.0(车务终端A机)--王岗:${dateString}第一班 18:00 管理员代--` }}</div>
|
||||
<menu-bar ref="menuBar" :selected="selected" />
|
||||
<div style="position: absolute; top: 64px;z-index: 10;background: #F0F0F0;padding: 2px;height: 65px;width: 100%;">
|
||||
|
@ -33,6 +33,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
export default {
|
||||
name: 'DefectivePasswordBox',
|
||||
components: {
|
||||
@ -60,13 +61,16 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Switch.defectiveShunting.twoConfirm.domId : '';
|
||||
const domId = OperationHandler.getDomIdByOperation(this.operation);
|
||||
return this.dialogShow ? domId : '';
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
doShow(operate) {
|
||||
this.operation = operate.operation;
|
||||
if (operate.operation == OperationEvent.Switch.cancelDefectiveShunting.menu.operation) {
|
||||
if (operate.operation == OperationEvent.Section.cancelDefectiveShunting.menu.operation) {
|
||||
this.name = '取消分路不良';
|
||||
} else if (operate.operation == OperationEvent.Switch.cancelDefectiveShunting.menu.operation) {
|
||||
this.name = '取消分路不良';
|
||||
} else {
|
||||
this.name = '分路不良';
|
||||
|
@ -63,7 +63,9 @@ export default {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
this.operation = operate.operation;
|
||||
if (operate.operation == OperationEvent.Switch.cancelDefectiveShunting.menu.operation) {
|
||||
if (operate.operation == OperationEvent.Section.cancelDefectiveShunting.menu.operation) {
|
||||
this.title = '取消分路不良';
|
||||
} else if (operate.operation == OperationEvent.Switch.cancelDefectiveShunting.menu.operation) {
|
||||
this.title = '取消分路不良';
|
||||
} else {
|
||||
this.title = '分路不良';
|
||||
@ -118,6 +120,10 @@ export default {
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING;
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Section.cancelDefectiveShunting.menu.operation: {
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING;
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.cancelDefectiveShunting.menu.operation: {
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_CANCEL_DEFECTIVE_SHUNTING;
|
||||
break;
|
||||
|
@ -125,7 +125,7 @@
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
import DefectiveShunting from './dialog/defectiveShunting.vue';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
@ -127,7 +127,7 @@
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
import TrainRoute from './dialog/trainRoute.vue';
|
||||
import ShuntRoute from './dialog/shuntRoute.vue';
|
||||
@ -319,6 +319,7 @@ export default {
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
this.routeDataMap = null;
|
||||
this.routeButtonCodeList = [];
|
||||
},
|
||||
|
@ -6,6 +6,7 @@
|
||||
<set-fault ref="setFault" pop-class="datie-02__systerm" />
|
||||
<add-spare-train ref="addSpareTrain" />
|
||||
<draw-select ref="drawSelect" />
|
||||
<fork-directive ref="forkDirective" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -20,6 +21,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import AddSpareTrain from './dialog/addSpareTrain';
|
||||
import DrawSelect from './dialog/drawSelect';
|
||||
import ForkDirective from './dialog/forkDirective';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
@ -29,7 +31,8 @@ export default {
|
||||
TrainAddPlan,
|
||||
SetFault,
|
||||
AddSpareTrain,
|
||||
DrawSelect
|
||||
DrawSelect,
|
||||
ForkDirective
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -50,11 +53,25 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: [
|
||||
{
|
||||
label: ' 增加车次',
|
||||
label: '增加车次',
|
||||
handler: this.addSpare,
|
||||
cmdType: CMD.Section.CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN,
|
||||
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork',
|
||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
||||
},
|
||||
{
|
||||
label: '分路不良',
|
||||
handler: this.forkDirective,
|
||||
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
|
||||
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork',
|
||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'ctcWork'
|
||||
},
|
||||
{
|
||||
label: '空闲',
|
||||
handler: this.cancleForkDirective,
|
||||
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
|
||||
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork',
|
||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'ctcWork'
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
@ -138,6 +155,22 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 分路不良
|
||||
forkDirective() {
|
||||
commitOperate(menuOperate.Section.defectiveShunting, {sectionCode:this.selected.code, shuntingTypeList: ['SECTION_SHUNTING']}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.forkDirective.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段确认空闲,取消分路不良
|
||||
cancleForkDirective() {
|
||||
commitOperate(menuOperate.Section.cancelDefectiveShunting, {sectionCode:this.selected.code, shuntingTypeList: []}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.forkDirective.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
|
@ -211,7 +211,6 @@
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'
|
||||
// import Handler from '@/scripts/cmdPlugin/Handler'
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue'
|
||||
import DefectiveShunting from './dialog/defectiveShunting.vue'
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum'
|
||||
|
@ -120,7 +120,6 @@
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
import TrainRoute from './dialog/trainRoute.vue';
|
||||
import ShuntRoute from './dialog/shuntRoute.vue';
|
||||
|
@ -19,7 +19,7 @@ import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
|
||||
export default {
|
||||
|
@ -17,7 +17,6 @@ import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
|
@ -32,7 +32,6 @@ import UpdateTrip from './dialog/updateTrip';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import TrainStop from '@/jmapNew/theme/components/menus/dialog/trainStop';
|
||||
|
||||
|
@ -139,7 +139,6 @@
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
import DefectiveShunting from './dialog/defectiveShunting.vue';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
@ -120,7 +120,7 @@
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
import TrainRoute from './dialog/trainRoute.vue';
|
||||
import ShuntRoute from './dialog/shuntRoute.vue';
|
||||
|
@ -138,7 +138,6 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
if (this.selected.type != '04') {
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
|
||||
if (station && station.controlMode === 'Interlock' && this.$route.query.ctc) {
|
||||
|
@ -208,7 +208,6 @@ export default {
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
|
||||
if (station && station.controlMode === 'Interlock' && this.$route.query.ctc) {
|
||||
|
@ -19,7 +19,7 @@ import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
|
||||
export default {
|
||||
@ -104,7 +104,6 @@ export default {
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
|
@ -17,7 +17,6 @@ import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
@ -116,7 +115,6 @@ export default {
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
|
@ -197,7 +197,6 @@ export default {
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
|
||||
if (station && station.controlMode === 'Interlock' && this.$route.query.ctc) {
|
||||
|
@ -33,7 +33,6 @@ import UpdateTrip from './dialog/updateTrip';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
|
||||
import TrainStop from '@/jmapNew/theme/components/menus/dialog/trainStop';
|
||||
@ -248,7 +247,6 @@ export default {
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
|
||||
if (station && station.controlMode === 'Interlock' && this.$route.query.ctc) {
|
||||
this.menu.forEach(item => { item.disabled = true; });
|
||||
|
@ -71,7 +71,6 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
if (this.selected.type != '04') {
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
} else {
|
||||
this.menu = [];
|
||||
|
@ -98,7 +98,6 @@ export default {
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
// // 故障模式菜单列表
|
||||
// if (this.operatemode === OperateMode.FAULT) {
|
||||
|
@ -197,7 +197,6 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
|
@ -33,7 +33,6 @@ import UpdateTrip from './dialog/updateTrip';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
|
||||
import TrainStop from '@/jmapNew/theme/components/menus/dialog/trainStop';
|
||||
@ -248,7 +247,6 @@ export default {
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
|
||||
if (station && station.controlMode === 'Interlock' && this.$route.query.ctc) {
|
||||
this.menu.forEach(item => { item.disabled = true; });
|
||||
|
@ -13,7 +13,6 @@ import { mapGetters } from 'vuex';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'MenuLimit',
|
||||
|
@ -244,7 +244,7 @@
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { SimulationUserType, OperateMode } from '@/scripts/ConstDic';
|
||||
// import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
|
||||
|
||||
export default {
|
||||
name: 'MapButtonMenu',
|
||||
|
@ -149,7 +149,7 @@ import PasswordBox from '@/jmapNew/theme/components/menus/childDialog/passwordIn
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
|
||||
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
export default {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<div class="menus" :style="{width: width + 'px', height: '100%'}">
|
||||
<menu-bar ref="menuBar" :selected="selected" work="dispatchWork" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" work="dispatchWork" />
|
||||
<menu-train ref="menuTrain" :selected="selected" work="dispatchWork" />
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<div class="menus" :style="{width: width + 'px', height: '100%'}">
|
||||
<menu-bar ref="menuBar" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" work="localWork" />
|
||||
<menu-train ref="menuTrain" :selected="selected" work="localWork" />
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<div class="menus" :style="{width: width + 'px', height: '100%'}">
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<div class="menus" :style="{width: width + 'px', height: '100%'}">
|
||||
<menu-bar ref="menuBar" :selected="selected" :login-active="loginActive" :is-ignore-login="isIgnoreLogin" @login="login" />
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
|
@ -12,7 +12,7 @@ import { mapGetters } from 'vuex';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { DeviceMenu, OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
|
||||
|
||||
export default {
|
||||
|
@ -13,7 +13,6 @@ import { mapGetters } from 'vuex';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'MenuLimit',
|
||||
@ -70,7 +69,6 @@ export default {
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = [];
|
||||
this.menuNormal.forEach(menuItem => {
|
||||
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||
|
@ -30,9 +30,9 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="车站名" align="center" width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="control" label="控制状态" align="center" width="70">
|
||||
<el-table-column prop="controller" label="控制状态" align="center" width="70">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ getControlStatus(scope.row.code) }}</div>
|
||||
<div>{{ getControlStatus(scope.row.controller) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="stationCode" label="" align="center">
|
||||
@ -93,9 +93,12 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.mapStateLoadedCount': function () {
|
||||
'$store.state.map.mapStationStateUpdateCount': function() {
|
||||
if (this.show) {
|
||||
this.tableData = [...this.tableData];
|
||||
this.tableData.forEach(item => {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](item.code);
|
||||
item.controller = station.controller;
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -122,24 +125,18 @@ export default {
|
||||
this.memberId = this.$store.state.training.myMemberId;
|
||||
const centralizedStationCode = this.stationCentralizedMap[this.$store.state.training.roleDeviceCode];
|
||||
const centralizedStation = this.$store.getters['map/getDeviceByCode'](centralizedStationCode);
|
||||
this.$set(centralizedStation, 'apply', false);
|
||||
this.$set(centralizedStation, 'release', false);
|
||||
this.$set(centralizedStation, 'distribution', false);
|
||||
this.tableData.push(centralizedStation);
|
||||
const data = { code: centralizedStation.code, name: centralizedStation.name, apply: false, release: false, distribution: false, controller: null };
|
||||
this.tableData.push(data);
|
||||
centralizedStation.chargeStationCodeList.forEach(elem => {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](elem);
|
||||
this.$set(station, 'apply', false);
|
||||
this.$set(station, 'release', false);
|
||||
this.$set(station, 'distribution', false);
|
||||
this.tableData.push(station);
|
||||
const data1 = { code: station.code, name: station.name, apply: false, release: false, distribution: false, controller: null };
|
||||
this.tableData.push(data1);
|
||||
});
|
||||
} else if (this.$store.state.training.roles === 'DISPATCHER') {
|
||||
this.memberId = this.$store.state.training.myMemberId;
|
||||
this.stationList.forEach(item => {
|
||||
this.$set(item, 'apply', false);
|
||||
this.$set(item, 'release', false);
|
||||
this.$set(item, 'distribution', false);
|
||||
this.tableData.push(item);
|
||||
const data = { code: item.code, name: item.name, apply: false, release: false, distribution: false, controller: null };
|
||||
this.tableData.push(data);
|
||||
});
|
||||
}
|
||||
this.show = true;
|
||||
@ -154,9 +151,8 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
getControlStatus(code) {
|
||||
const newStation = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return newStation.controller === this.memberId ? '自控' : '未控';
|
||||
getControlStatus(controller) {
|
||||
return controller === this.memberId ? '自控' : '未控';
|
||||
},
|
||||
getDisabled(code, type) {
|
||||
const newStation = this.$store.getters['map/getDeviceByCode'](code);
|
||||
@ -172,9 +168,8 @@ export default {
|
||||
}
|
||||
},
|
||||
getController(station) {
|
||||
const newStation = this.$store.getters['map/getDeviceByCode'](station.code);
|
||||
if (newStation.controller) {
|
||||
const controller = this.$store.state.training.memberData[newStation.controller];
|
||||
if (station.controller) {
|
||||
const controller = this.$store.state.training.memberData[station.controller];
|
||||
return controller.label;
|
||||
} else {
|
||||
return '';
|
||||
|
@ -27,7 +27,6 @@ import ConfirmControl from '@/jmapNew/theme/components/menus/childDialog/confirm
|
||||
import OperateConfirm from './dialog/childDialog/operateConfirm';
|
||||
import SectionUnLock from '@/jmapNew/theme/components/menus/dialog/sectionUnLock';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
@ -182,7 +181,6 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
if (this.selected.type != '04') {
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = [];
|
||||
this.menuNormal.forEach(menuItem => {
|
||||
let status = judgeStationControl(this.selected.belongStation, this.selected.stationCode, this.work);
|
||||
|
@ -27,7 +27,6 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
|
||||
import OperateConfirm from './dialog/childDialog/operateConfirm';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import PasswordInput from './dialog/passwordInput';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
@ -195,7 +194,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = [];
|
||||
this.menuNormal.forEach(menuItem => {
|
||||
let status = judgeStationControl(this.selected.belongStationCode, this.selected.stationCode, this.work);
|
||||
|
@ -18,8 +18,6 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode, DeviceMenu, TrainingMode } from '@/scripts/ConstDic';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
// import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
|
||||
|
@ -12,7 +12,7 @@ import { mapGetters } from 'vuex';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
|
||||
export default {
|
||||
name: 'StationControlMenu',
|
||||
|
@ -14,7 +14,7 @@ import { mapGetters } from 'vuex';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { DeviceMenu, OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperateConfirm from './dialog/childDialog/operateConfirm';
|
||||
import ButtonConfirm from './dialog/childDialog/buttonConfirm';
|
||||
|
@ -11,7 +11,6 @@ import { mapGetters } from 'vuex';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { DeviceMenu, OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import ButtonDown from './dialog/buttonDown';
|
||||
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
|
||||
@ -78,7 +77,6 @@ export default {
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = [];
|
||||
this.menuNormal.forEach(menuItem => {
|
||||
let status = judgeStationControl(this.selected.code, this.selected.stationCode, this.work);
|
||||
|
@ -26,7 +26,7 @@ import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuO
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
|
||||
|
||||
export default {
|
||||
|
@ -12,7 +12,7 @@ import { mapGetters } from 'vuex';
|
||||
|
||||
import { DeviceMenu, OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
import {menuOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
|
||||
|
||||
|
@ -27,7 +27,6 @@ import { mapGetters } from 'vuex';
|
||||
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { DeviceMenu, OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
|
||||
|
||||
|
@ -30,7 +30,6 @@ import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit'
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
@ -231,7 +230,6 @@ export default {
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = [];
|
||||
this.menuNormal.forEach(menuItem => {
|
||||
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||
|
@ -324,6 +324,7 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.restoreBeforeDevices();
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$refs.endTable.setCurrentRow();
|
||||
this.$refs.singleTable.setCurrentRow();
|
||||
@ -444,7 +445,8 @@ export default {
|
||||
operation: OperationEvent.Command.commandNingBo3.Signal_command_path.operation,
|
||||
param: {
|
||||
pathCode: `${row.code}`
|
||||
}
|
||||
},
|
||||
val: `${row.code}`
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user