This commit is contained in:
sunzhenyu 2020-10-16 11:35:03 +08:00
commit 4a9b4e859e
67 changed files with 1564 additions and 300 deletions

47
src/api/company.js Normal file
View File

@ -0,0 +1,47 @@
import request from '@/utils/request';
/** 获取公司列表 */
export function getCompanyList() {
return request({
url: '/api/company',
method: 'get'
});
}
/** 添加公司信息 */
export function addCompany(data) {
return request({
url: '/api/company',
method: 'post',
data: data
});
}
/** 删除公司信息 */
export function deleteCompany(id) {
return request({
url: `/api/company/${id}`,
method: 'delete'
});
}
/** 根据id查询公司信心 */
export function getCompanyById(id) {
return request({
url: `/api/company/${id}`,
method: 'get'
});
}
/** 更新公司信息 */
export function updateCompany(id, data) {
return request({
url: `/api/company/${id}`,
method: 'put',
data
});
}
/** 分页查询公司列表 */
export function getCompanyListPaging(params) {
return request({
url: `/api/company/paging`,
method: 'get',
params
});
}

47
src/api/questionsRule.js Normal file
View File

@ -0,0 +1,47 @@
import request from '@/utils/request';
/** 获取出题规则列表 */
export function getQuestionRuleList() {
return request({
url: `/api/questionsRule`,
method: 'get'
});
}
/** 添加出题规则 */
export function addQuestionRule(data) {
return request({
url: `/api/questionsRule`,
method: 'post',
data
});
}
/** 分页获取规则列表 */
export function getQustionRuleListPage(params) {
return request({
url: `/api/questionsRule/paging`,
method: 'get',
params
});
}
/** 删除出题规则 */
export function deleteQuestionRule(id) {
return request({
url: `/api/questionsRule/${id}`,
method: 'delete'
});
}
/** 查询单个出题规则 */
export function selectedQuestionRule(id) {
return request({
url: `/api/questionsRule/${id}`,
method: 'get'
});
}
/** 更改出题规则内容 */
export function updateQuestionRule(id, data) {
return request({
url: `/api/questionsRule/${id}`,
method: 'put',
data: data
});
}

View File

@ -44,6 +44,7 @@ export default {
createTrain: 'Create Train',
setFault: 'Set Fault',
cancelFault: 'Cancel Fault',
triggerFaultManagement: 'Trigger fault management',
orbitalSectionActive: 'Orbital section active',
orbitalSectionResection: 'Orbital section resection'
},

View File

@ -81,5 +81,6 @@ export default {
raceManage: 'Race manage',
practiceManage:'Practice manage',
bankManage: 'Bank manage',
sceneManage:'Scene manage'
sceneManage:'Scene manage',
companyManage: 'Company manage'
};

View File

@ -44,6 +44,7 @@ export default {
createTrain: '新建列车',
setFault: '设置故障',
cancelFault: '取消故障',
triggerFaultManagement: '触发故障管理',
orbitalSectionActive: '轨道区段激活',
orbitalSectionResection: '轨道区段切除'
},

View File

@ -86,5 +86,6 @@ export default {
recaList: '报名列表',
bankManage: '题库列表',
practiceManage:'实操列表',
sceneManage:'场景列表'
sceneManage:'场景列表',
companyManage: '单位管理'
};

View File

@ -21,10 +21,12 @@ export default class rect extends Group {
create() {
let rect = null;
for (const key in this.model.elemMap) {
if (!rect) {
rect = Vue.prototype.$iscs.iscsDevice[key].instance.getBoundingRect();
} else {
rect.union(Vue.prototype.$iscs.iscsDevice[key].instance.getBoundingRect());
if (Vue.prototype.$iscs.iscsDevice[key].instance) {
if (!rect) {
rect = Vue.prototype.$iscs.iscsDevice[key].instance.getBoundingRect();
} else {
rect.union(Vue.prototype.$iscs.iscsDevice[key].instance.getBoundingRect());
}
}
}
const model = this.model;

View File

@ -1,5 +1,6 @@
import Group from 'zrender/src/container/Group';
import Image from 'zrender/src/graphic/Image';
import Vue from 'vue';
import psdLeft from '@/assets/iscs_picture/iscs-psd-left.png';
import psdSystem from '@/assets/iscs_picture/iscs-psd.png';
@ -104,6 +105,17 @@ export default class Picture extends Group {
this._function = device.model.function;
this.z = device.model.z;
this.create();
if (this.model.groupId) {
this.createMouseEvent();
}
}
createMouseEvent() {
// this.on('mouseout', (e) => {
// Vue.prototype.$iscs.iscsDevice[this.model.groupId].instance.hide();
// });
this.on('mouseover', (e) => {
Vue.prototype.$iscs.iscsDevice[this.model.groupId].instance.show();
});
}
create() {
const model = this.model;
@ -132,4 +144,10 @@ export default class Picture extends Group {
this.model.point.x += dx;
this.model.point.y += dy;
}
getBoundingRect() {
const rect = this.imageButton.getBoundingRect().clone();
rect.x = rect.x + this.model.point.x;
rect.y = rect.y + this.model.point.y;
return rect;
}
}

View File

@ -0,0 +1,139 @@
import { createMartPointReverse, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList, prefixTime } from '@/utils/runPlan';
export default {
/** 边缘高度*/
EdgeHeight: 600,
/** 间隔高度*/
CoordMultiple: 1,
/** 偏移时间*/
TranslationTime: 0,
/** 将后台数据解析成图表*/
convertDataToModels(tripList, stations, kmRangeCoordMap, lineStyle) {
var models = [];
/** 按车次遍历数据*/
if (tripList && tripList.length) {
tripList.forEach(trip => {
const opt = {
name: `run-${trip.tripNo}`,
type: 'line',
legendHoverLink: false,
symbolSize: 6,
lineStyle: {
color: '#000',
width: 1,
},
markPoint: { data: [] },
data: []
};
// const length = trip.stationTimeList.length;
// if (trip.tripNo &&
// trip.stationTimeList.length) {
// opt.markPoint.data.push(createMartPointReverse({
// name: `${trip.tripNo}`,
// color: '#000' || lineStyle.color,
// coord: [
// trip.stationTimeList[0].arrivalTime,
// this.getCoordYByElem(stations, kmRangeCoordMap, trip.stationTimeList[0])
// ]
// }));
// }
/** 计算停站点坐标集合*/
trip.stationTimeList.forEach((elem,idx) => {
if (elem.arrivalTime) {
opt.data.push([elem.arrivalTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem), elem.stationCode, trip.tripNo]);
}
if (elem.departureTime) {
opt.data.push([elem.departureTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem), elem.stationCode, trip.tripNo]);
}
});
models.push(opt);
});
}
return models;
},
/** 更新数据并解析成图表*/
updateDataToModels(tripList, stations, kmRangeCoordMap, runPlanData, series, lineStyle) {
if (tripList && tripList.length) {
}
return series;
},
/** 初始化Y轴*/
initializeYaxis(stations) {
return createMarkLineModels(stations, (elem) => {
return this.EdgeHeight + elem.kmRange * this.CoordMultiple;
});
},
/** 将后台数据转换为试图序列模型*/
convertStationsToMap(stations) {
var map = {};
if (stations && stations.length) {
stations.forEach((elem) => {
map[`${elem.kmRange}`] = this.EdgeHeight + elem.kmRange * this.CoordMultiple;
});
}
return map;
},
/** 计算y轴最小值*/
computedYaxisMinValue(stations) {
return stations[0].kmRange * this.CoordMultiple;
},
/** 计算y轴最大值*/
computedYaxisMaxValue(stations) {
return stations[stations.length - 1].kmRange * this.CoordMultiple + this.EdgeHeight * 2;
},
/** 格式化y轴数据*/
computedFormatYAxis(stations, params) {
var yText = '0m';
stations.forEach(elem => {
if (elem.kmRange < parseInt(params.value) / this.CoordMultiple - this.EdgeHeight) {
yText = Math.floor(elem.kmRange) + 'm';
}
});
return yText;
},
/** 根据是否和上一个车次是否相交,计算下一个车次的折返的高度*/
computedReentryNumber(code) {
// return parseInt(code || 1) % 2 ? 1 : 2;
return 1;
},
/** 根据方向计算y折返偏移量*/
getYvalueByDirectionCode(defaultVlue, directionCode, num) {
if (directionCode === '1') {
defaultVlue += this.EdgeHeight / 2 * num;
} else if (directionCode === '2') {
defaultVlue -= this.EdgeHeight / 2 * num;
}
return defaultVlue;
},
/** 根据elem计算y值*/
getCoordYByElem(stations, kmRangeCoordMap, elem) {
var defaultVlue = 0;
var station = stations.find(it => { return it.code == elem.stationCode; });
if (station) {
defaultVlue = kmRangeCoordMap[`${station.kmRange}`];
}
return defaultVlue;
}
};

View File

@ -1,14 +1,14 @@
import { createMartPointReverse, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList, prefixTime } from '@/utils/runPlan';
import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, prefixTime, convertSheetToList } from '@/utils/runPlan';
export default {
/** 边缘高度*/
EdgeHeight: 600,
EdgeHeight: 3,
/** 间隔高度*/
CoordMultiple: 1,
CoordMultiple: 3,
/** 偏移时间*/
TranslationTime: 0,
TranslationTime: 0,
/** 将后台数据解析成图表*/
convertDataToModels(tripList, stations, kmRangeCoordMap, lineStyle) {
@ -16,20 +16,18 @@ export default {
/** 按车次遍历数据*/
if (tripList && tripList.length) {
tripList.forEach(trip => {
const opt = { name: `run-${trip.tripNo}`, type: 'line', showAllSymbol:true, symbolKeepAspect: false, symbolSize: 6, markPoint: { data: [] }, data: []};
// const length = trip.stationTimeList.length;
// if (trip.tripNo &&
// trip.stationTimeList.length) {
// opt.markPoint.data.push(createMartPointReverse({
// name: `${trip.tripNo}`,
// color: '#000' || lineStyle.color,
// coord: [
// trip.stationTimeList[0].arrivalTime,
// this.getCoordYByElem(stations, kmRangeCoordMap, trip.stationTimeList[0])
// ]
// }));
// }
const opt = {
name: `run-${trip.tripNo}`,
type: 'line',
legendHoverLink: false,
symbolSize: 6,
lineStyle: {
color: '#000',
width: 1,
},
markPoint: { data: [] },
data: []
};
/** 计算停站点坐标集合*/
trip.stationTimeList.forEach((elem,idx) => {
@ -47,7 +45,7 @@ export default {
}
return models;
},
},
/** 更新数据并解析成图表*/
updateDataToModels(tripList, stations, kmRangeCoordMap, runPlanData, series, lineStyle) {
@ -56,71 +54,64 @@ export default {
return series;
},
/** 初始化Y轴*/
initializeYaxis(stations) {
return createMarkLineModels(stations, (elem) => {
return this.EdgeHeight + elem.kmRange * this.CoordMultiple;
});
},
/** 将后台数据转换为试图序列模型*/
convertStationsToMap(stations) {
var map = {};
if (stations && stations.length) {
stations.forEach((elem) => {
map[`${elem.kmRange}`] = this.EdgeHeight + elem.kmRange * this.CoordMultiple;
stations.forEach((elem, index) => {
map[`${elem.kmRange}`] = this.EdgeHeight + index * this.CoordMultiple;
});
}
return map;
},
/** 初始化Y轴*/
initializeYaxis(stations) {
return createMarkLineModels(stations, (elem, index) => {
return this.EdgeHeight + index * this.CoordMultiple;
});
},
/** 计算y轴最小值*/
computedYaxisMinValue(stations) {
return stations[0].kmRange * this.CoordMultiple;
computedYaxisMinValue() {
return 0;
},
/** 计算y轴最大值*/
computedYaxisMaxValue(stations) {
return stations[stations.length - 1].kmRange * this.CoordMultiple + this.EdgeHeight * 2;
return this.EdgeHeight * 2 + (stations.length - 1) * this.CoordMultiple;
},
/** 格式化y轴数据*/
computedFormatYAxis(stations, params) {
var yText = '0m';
stations.forEach(elem => {
if (elem.kmRange < parseInt(params.value) / this.CoordMultiple - this.EdgeHeight) {
yText = Math.floor(elem.kmRange) + 'm';
}
});
var index = Math.floor((parseInt(params.value) - this.EdgeHeight) / this.CoordMultiple);
if (index >= 0 && index < stations.length) {
yText = Math.floor(stations[index].kmRange) + 'm';
}
return yText;
},
/** 根据是否和上一个车次是否相交,计算下一个车次的折返的高度*/
computedReentryNumber(code) {
// return parseInt(code || 1) % 2 ? 1 : 2;
return 1;
},
/** 根据方向计算y折返偏移量*/
getYvalueByDirectionCode(defaultVlue, directionCode, num) {
getYvalueByDirectionCode(defaultVlue, directionCode) {
if (directionCode === '1') {
defaultVlue += this.EdgeHeight / 2 * num;
defaultVlue -= this.EdgeHeight / 2;
} else if (directionCode === '2') {
defaultVlue -= this.EdgeHeight / 2 * num;
defaultVlue += this.EdgeHeight / 2;
}
return defaultVlue;
},
/** 根据elem计算y值*/
getCoordYByElem(stations, kmRangeCoordMap, elem) {
getCoordYByElem(stations, kmRangeCoordMap, elem, directionCode, isSpecial) {
var defaultVlue = 0;
var station = stations.find(it => { return it.code == elem.stationCode; });
if (station) {
defaultVlue = kmRangeCoordMap[`${station.kmRange}`];
if (isSpecial) {
defaultVlue = this.getYvalueByDirectionCode(defaultVlue, directionCode);
}
}
return defaultVlue;

View File

@ -87,6 +87,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -282,6 +287,9 @@ export default {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -103,6 +103,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -426,6 +431,9 @@ export default {
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -106,6 +106,11 @@ export default {
label: '取消ZC故障',
handler: this.cancelStoppage,
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -267,6 +272,9 @@ export default {
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -122,6 +122,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -315,6 +320,9 @@ export default {
this.$refs.standDetail.doShow(operate, this.selected, []);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -98,6 +98,11 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -302,6 +307,9 @@ export default {
callback: action => {
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -78,6 +78,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -250,6 +255,9 @@ export default {
callback: action => {
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -179,6 +179,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -431,6 +436,9 @@ export default {
createDeviceLabel() {
this.doClose();
this.$refs.createDeviceLabel.doShow();
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -15,6 +15,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StationMenu',
@ -51,6 +52,11 @@ export default {
{
label: '取消ZC故障',
handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -115,6 +121,9 @@ export default {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -88,6 +88,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -214,6 +219,9 @@ export default {
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -129,6 +129,11 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -286,6 +291,9 @@ export default {
},
createDeviceLabel() {
this.$refs.createDeviceLabel.doShow();
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -76,6 +76,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -203,6 +208,9 @@ export default {
this.$refs.trainAddPlan.doShow(operate);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -154,6 +154,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -338,7 +343,9 @@ export default {
}
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -15,6 +15,7 @@ import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StationMenu',
@ -51,6 +52,11 @@ export default {
{
label: '取消ZC故障',
handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -116,6 +122,9 @@ export default {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -101,6 +101,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -223,6 +228,9 @@ export default {
this.$refs.standDetail.doShow(operate, this.selected, []);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -101,6 +101,11 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -251,6 +256,9 @@ export default {
callback: action => {
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -110,6 +110,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -231,6 +236,9 @@ export default {
this.$refs.allLineCancelLimit.doShow(operate, this.selected);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -24,7 +24,6 @@ import RouteHandControl from '@/jmapNew/theme/components/menus/dialog/routeHandC
import RouterCommand from './dialog/routerCommand';
import RouteDetail from '@/jmapNew/theme/components/menus/dialog/routeDetail';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { mapGetters } from 'vuex';
@ -176,6 +175,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -443,6 +447,9 @@ export default {
}
});
return routes;
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -20,6 +20,7 @@ import { OperateMode } from '@/scripts/ConstDic';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StationMenu',
@ -84,6 +85,11 @@ export default {
{
label: '取消ZC故障',
handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -250,6 +256,9 @@ export default {
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -149,6 +149,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -294,6 +299,9 @@ export default {
this.$refs.standDetail.doShow(operate, this.selected);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -126,6 +126,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -389,6 +394,9 @@ export default {
this.$refs.allLineCancelLimit.doShow(operate, this.selected);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -145,6 +145,11 @@ export default {
label: this.$t('menu.menuSection.cancelFault'),
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: this.$t('menu.menuSection.triggerFaultManagement'),
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -302,6 +307,9 @@ export default {
this.$refs.speedCmdControl.doShow(operate, this.selected);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -198,6 +198,11 @@ export default {
label: this.$t('menu.menuSignal.cancelFault'),
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: this.$t('menu.menuSection.triggerFaultManagement'),
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -389,6 +394,9 @@ export default {
this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected));
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -103,6 +103,11 @@ export default {
label: this.$t('menu.menuStation.cancelStoppage'),
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: this.$t('menu.menuSection.triggerFaultManagement'),
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -217,6 +222,9 @@ export default {
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -148,6 +148,11 @@ export default {
label: this.$t('menu.menuStationStand.cancelFault'),
handler: this.cancelStoppage,
cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT
},
{
label: this.$t('menu.menuSection.triggerFaultManagement'),
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -307,6 +312,9 @@ export default {
this.$refs.standDetail.doShow(operate, this.selected);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -167,6 +167,11 @@ export default {
{
label: this.$t('menu.menuSwitch.cancelFault'),
handler: this.cancelStoppage
},
{
label: this.$t('menu.menuSection.triggerFaultManagement'),
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -343,6 +348,9 @@ export default {
//
hookLock() {
this.$refs.switchHookLock.doShow(this.selected);
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -115,6 +115,11 @@ export default {
label: this.$t('menu.menuSection.cancelFault'),
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -280,6 +285,9 @@ export default {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -173,6 +173,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -357,6 +362,9 @@ export default {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -95,6 +95,11 @@ export default {
label: '取消ZC故障',
handler: this.cancelStoppage,
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -212,6 +217,9 @@ export default {
callback: action => {
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -148,6 +148,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -309,6 +314,9 @@ export default {
this.$refs.standDetail.doShow(operate, this.selected);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -145,6 +145,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -309,6 +314,9 @@ export default {
//
hookLock() {
this.$refs.switchHookLock.doShow(this.selected);
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -123,6 +123,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -263,6 +268,9 @@ export default {
this.$refs.speedCmdControl.doShow(operate, this.selected);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -188,6 +188,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -379,6 +384,9 @@ export default {
this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected));
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -105,6 +105,11 @@ export default {
label: '取消ZC故障',
handler: this.cancelStoppage,
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -226,6 +231,9 @@ export default {
callback: action => {
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -136,6 +136,11 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -292,6 +297,9 @@ export default {
this.$refs.standDetail.doShow(operate, this.selected);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -165,6 +165,11 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
],
menuDirective: [
@ -334,6 +339,9 @@ export default {
//
hookLock() {
this.$refs.switchHookLock.doShow(this.selected);
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -127,6 +127,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -282,6 +287,9 @@ export default {
callback: action => {
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -192,6 +192,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -286,7 +291,7 @@ export default {
//
arrangementRoute() {
let step = '';
let routeCode = '';
let routeCode = '';
if (this.selected.isTerminalSignal) {
const endSignalRouteList = this.$store.state.menuOperation.endSignalRouteList;
endSignalRouteList.forEach(item => {
@ -313,14 +318,14 @@ export default {
this.resetRouteSignal();
const updateDeviceList = [];
updateDeviceList.push({code: this.selected.code, _type: 'Signal', isStartSignal: 1});
const endSignalRouteList = [];
const endSignalRouteList = [];
this.routeList.forEach(item => {
if (item.startSignalCode === this.selected.code) {
endSignalRouteList.push({endButtonSignalCode: item.endButtonSignalCode, routeCode: item.code});
updateDeviceList.push({code: item.endButtonSignalCode, _type: 'Signal', isTerminalSignal: 1});
}
});
this.$store.dispatch('menuOperation/setRouteSelectStartSignal', {startSignalCode: this.selected.code, endSignalRouteList: endSignalRouteList});
this.$store.dispatch('menuOperation/setRouteSelectStartSignal', {startSignalCode: this.selected.code, endSignalRouteList: endSignalRouteList});
this.$store.dispatch('training/updateMapState', updateDeviceList);
}
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -527,7 +532,7 @@ export default {
endSignalRouteList.forEach(item => {
updateDeviceList.push({code: item.endButtonSignalCode, _type: 'Signal', isTerminalSignal: 0});
});
this.$store.dispatch('menuOperation/setRouteSelectStartSignal', { startSignalCode: '', endSignalRouteList: [] });
this.$store.dispatch('menuOperation/setRouteSelectStartSignal', { startSignalCode: '', endSignalRouteList: [] });
this.$store.dispatch('training/updateMapState', updateDeviceList);
},
enabledConfirm() {
@ -558,6 +563,9 @@ export default {
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -151,6 +151,11 @@ export default {
{
label: '取消ZC故障',
handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -323,6 +328,9 @@ export default {
callback: action => {
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -154,6 +154,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -341,6 +346,9 @@ export default {
callback: action => {
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -196,6 +196,11 @@ export default {
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
}
]
};
@ -450,6 +455,9 @@ export default {
this.$refs.stopProfile.doShow(step, this.selected, 'down');
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
}
};

View File

@ -14,7 +14,7 @@ import localStore from 'storejs';
// return roles.some(role => permissionRoles.indexOf(role) >= 0);
// }
const whiteList = ['/login', '/design/login', '/gzzbxy/relay']; // 不重定向白名单
const whiteList = ['/login', '/design/login', '/gzzbxy/relay', '/AUStool']; // 不重定向白名单
// const designPageRegex = [/^\/design/, /^\/scriptDisplay/, /^\/publish/, /^\/orderauthor/, /^\/system/, /^\/iscs/, /^\/display\/record/, /^\/display\/manage/, /^\/apply/, /^\/plan/, /^\/display\/plan/, /^\/displayNew\/record/, /^\/displayNew\/manage/, /^\/displayNew\/plan/, /^\/practiceDisplayNew/, /^\/bigSplitScreen/];

View File

@ -147,6 +147,7 @@ const JsxtApply = () => import('@/views/jsxt/apply/index');
const RefereeList = () => import('@/views/jsxt/refereeList/index');
const RefereeDisplay = () => import('@/views/jsxt/refereeList/display');
const Approval = () => import('@/views/approval/index');
const CompanyManage = () => import('@/views/system/companyManage/index');
import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
// import { getSessionStorage } from '@/utils/auth';
@ -217,6 +218,11 @@ export const constantRoutes = [
path: '/design/jlmap3d/assetmanager',
component: Jlmap3dAssetManager,
hidden: true
},
{ // 运行图编辑
path: '/AUStool',
component: PlanMonitorEditAUSTool,
hidden: true
},
{
path: '/jlmap3d/sandbox',
@ -371,16 +377,11 @@ export const publicAsyncRoute = [
component: PlanMonitorEditUserTool,
hidden: true
},
{ // 运行图编辑
path: '/plan/AUStool',
component: PlanMonitorEditAUSTool,
hidden: true
},
{ // 运行图编辑
path: '/plan/tool',
component: PlanMonitorEditTool,
hidden: true
},
},
{
path: '/displayIscs/system',
component: IscsSystem,
@ -796,6 +797,15 @@ export const asyncRouter = [
i18n: 'router.userManage'
}
},
{
// 单位管理
path: 'companyManage',
hidden: true,
component: CompanyManage,
meta: {
i18n: 'router.companyManage'
}
},
{
// 缓存管理
path: 'cache',
@ -948,8 +958,8 @@ export const asyncRouter = [
},
children: [
{
path:'design',
redirect: '/iscs/design/edit',
path:'design',
redirect: '/iscs/design/edit',
component: IscsDesign,
meta: {
i18n: 'router.iscsDraw',
@ -962,8 +972,8 @@ export const asyncRouter = [
hidden: true
}
]
},
{
},
{
path: 'system',
component: IscsSystem,
meta: {

View File

@ -40,6 +40,7 @@ import { mapGetters } from 'vuex';
export default {
data() {
return {
oldCode: '',
formModel: {
code: '',
name: '',
@ -56,7 +57,11 @@ export default {
},
methods: {
deviceChange(code) {
this.groupAllHide();
if (this.oldCode) {
const device = this.$iscs.iscsDevice[this.oldCode];
device.instance.hide();
}
this.oldCode = code;
if (code) {
this.deviceSelect(this.$iscs.iscsDevice[code]);
const device = this.$iscs.iscsDevice[code];

View File

@ -1,6 +1,11 @@
<template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rules="rules" :model="form" label-width="120px" style="width: 100%;padding: 10px 50px;">
<!-- <el-form-item label="code:" prop="code">
<el-select v-model="form.code">
<el-option v-for="(item, index) in iscs.iscsTextList" :key="index" :label="item.code" :value="item.code" />
</el-select>
</el-form-item> -->
<el-form-item label="文字内容:" prop="context">
<el-input v-model="form.context" type="textarea" size="small" />
</el-form-item>

View File

@ -2,6 +2,19 @@
<div v-loading="loading" element-loading-background="rgba(0, 0, 0, 0.6)" style="width:100%;height:100%;">
<div class="Substation" :style="{'background':bacground}">
<div class="Substation_header">{{ title }}</div>
<div v-if="mode.includes('environmentFive')" class="environmentFive-box">
<div class="button_box" :class="{'active': mode == 'environmentFive01'}" @click="handleButton('01', mode == 'environmentFive01')">小系统1模式</div>
<div class="button_box" :class="{'active': mode == 'environmentFive02'}" @click="handleButton('02', mode == 'environmentFive02')">小系统2模式</div>
<div class="button_box" :class="{'active': mode == 'environmentFive03'}" @click="handleButton('03', mode == 'environmentFive03')">小系统3模式</div>
</div>
<div v-if="mode.includes('environmentNine')" class="environmentFive-box">
<div class="button_box" :class="{'active': mode == 'environmentNine01'}" @click="handleIllumination('01', mode == 'environmentNine01')">照明系统</div>
<div class="button_box" :class="{'active': mode == 'environmentNine02'}" @click="handleIllumination('02', mode == 'environmentNine02')">照明系统监测</div>
</div>
<div v-if="mode.includes('environmentEleven') || mode.includes('environmentTwelve')" class="environmentFive-box">
<div class="button_box" :class="{'active': mode == 'environmentEleven'}" @click="handleEnvironment('environmentEleven', mode == 'environmentEleven', '人防门')">人防门</div>
<div class="button_box" :class="{'active': mode == 'environmentTwelve'}" @click="handleEnvironment('environmentTwelve', mode == 'environmentTwelve', '防淹门系统')">防淹门</div>
</div>
<div>
<iscsSystem ref="iscsPlate" />
</div>
@ -22,12 +35,14 @@ export default {
},
data() {
return {
title:'',
bacground:'rgba(0,0,0,0)',
loading:false,
width:window.innerWidth,
scaleRate:window.innerWidth / 1920,
height:1000
title: '',
bacground: 'rgba(0,0,0,0)',
loading: false,
width: window.innerWidth,
scaleRate: window.innerWidth / 1920,
height: 1000,
mode: '',
system: ''
};
},
computed:{
@ -36,30 +51,60 @@ export default {
},
stationId() {
return this.$route.query.stationId;
},
mode() {
return this.$route.params.mode;
}
},
watch:{
$route() {
this.mode = this.$route.params.mode;
this.getInitData();
}
},
created() {
this.mode = this.$route.params.mode;
},
mounted() {
this.getInitData();
},
methods:{
handleButton(type, judge) {
if (!judge) {
this.mode = `environmentFive${type}`;
this.system = 'environmentFive';
this.title = `${this.stationName} 小系统${Number(type)}原理图`;
this.getDetail();
}
},
handleIllumination(type, judge) {
if (!judge) {
this.mode = `environmentNine${type}`;
this.system = 'environmentNine';
this.title = `${this.stationName} 照明系统`;
this.getDetail();
}
},
handleEnvironment(type, judge, name) {
if (!judge) {
this.mode = type;
this.title = `${this.stationName} ${name}`;
this.getDetail();
}
},
getInitData() {
this.system = 'environment';
if (this.mode == 'environmentThree') {
this.title = this.stationName + ' 隧道通风系统';
this.scaleRate = window.innerWidth / 2000;
this.height = 1000;
}
if (this.mode == 'environmentFour') {
} else if (this.mode == 'environmentFour') {
this.title = this.stationName + ' 大系统';
this.scaleRate = window.innerWidth / 2000;
this.height = 900;
} else if (this.mode == 'environmentFive') {
this.mode = 'environmentFive01';
this.system = 'environmentFive';
this.title = this.stationName + ' 小系统1原理图';
this.scaleRate = window.innerWidth / 2000;
this.height = 800;
} else if (this.mode == 'environmentSix') {
this.title = this.stationName + ' 冷水系统 原理图';
this.scaleRate = window.innerWidth / 2000;
@ -73,9 +118,11 @@ export default {
this.scaleRate = window.innerWidth / 1920;
this.height = 900;
} else if (this.mode == 'environmentNine') {
this.system = 'environmentNine';
this.mode = 'environmentNine01';
this.title = this.stationName + ' 照明系统';
this.scaleRate = window.innerWidth / 1920;
this.height = 900;
this.height = 800;
} else if (this.mode == 'environmentTen') {
this.title = this.stationName + ' 自动扶梯系统';
this.scaleRate = window.innerWidth / 1920;
@ -84,10 +131,21 @@ export default {
this.title = this.stationName + ' 传感器';
this.scaleRate = window.innerWidth / 1920;
this.height = 1000;
} else if (this.mode == 'environmentEleven') {
this.title = this.stationName + ' 人防门';
this.scaleRate = window.innerWidth / 1920;
this.height = 900;
} else if (this.mode == 'environmentTwelve') {
this.title = this.stationName + ' 防淹门系统';
this.scaleRate = window.innerWidth / 1920;
this.height = 900;
}
this.getDetail();
},
getDetail() {
const params = {
lineCode: this.$route.query.lineCode,
system: 'environment',
system: this.system,
totalSystem :'environment02',
userInterface : this.mode
};
@ -122,4 +180,21 @@ export default {
.SubstationIn{
display: inline-block;
}
.environmentFive-box{
position: absolute;
right: 60px;
top: 68px;
z-index: 100;
.button_box{
background: #D1C1C4;
border: 1px solid #fff;
float: left;
padding: 8px 10px;
cursor: pointer;
font-size: 14px;
&.active{
color: #939393;
}
}
}
</style>

View File

@ -5,12 +5,15 @@
<normal v-else-if="mode=='environmentThree'" />
<normal v-else-if="mode=='environmentFour'" />
<normal v-else-if="mode=='environmentFive'" />
<normal v-else-if="mode=='environmentSix'" />
<normal v-else-if="mode=='environmentSeven'" />
<normal v-else-if="mode=='environmentEight'" />
<normal v-else-if="mode=='environmentNine'" />
<normal v-else-if="mode=='environmentTen'" />
<normal v-else-if="mode=='environmentThirteen'" />
<normal v-else-if="mode=='environmentEleven'" />
<normal v-else-if="mode=='environmentTwelve'" />
<!-- -->
</div>

View File

@ -90,7 +90,7 @@ export default {
this.title = this.stationName + ' 降压变电所主接线图';
params.userInterface = 'stepDown';
}
this.scaleRate = window.innerWidth / 2200;
this.scaleRate = window.innerWidth / 2000;
this.bacground = 'rgba(0,0,0,0)';
}

View File

@ -10,7 +10,7 @@
<div class="userBubble" @click="playAudio(baseUrl+chatContent.src)">
<div class="userMessage">
<!-- <span class="el-icon-video-play playicon" /> -->
<img :src="yuyin" alt="playicon1">
<img :src="yuyin" class="playicon1">
<!-- <span class="messageText">{{ chatContent.content }}</span> -->
</div>
</div>

View File

@ -75,6 +75,8 @@
<operational-statistic ref="operationalStatistic" @finishTraining="finishTraining" />
<test-result ref="testResult" />
</div>
</template>
@ -106,6 +108,7 @@ import { launchFullscreen } from '@/utils/screen';
import { EventBus } from '@/scripts/event-bus';
import { createSimulationNew } from '@/api/simulation';
import OperationalStatistic from './operationalStatistic.vue';
import TestResult from './testResult.vue';
import Vue from 'vue';
export default {
@ -119,6 +122,7 @@ export default {
TheoryExamSelect,
TheoryExam,
OperationalStatistic,
TestResult,
// TheoryQuiz,
// ThroryResult,
SelectRole
@ -166,6 +170,7 @@ export default {
scriptMode: ScriptMode.TEACH,
mapLocation:{},
playerList:[],
actionList:[],
currentPlayList:[],
// formatUsedTime:'',
formatScore:0,
@ -449,11 +454,12 @@ export default {
// this.$refs.menuScript.initLoadPage();
// }
},
selectScript({playerList, mapLocation}) {
selectScript({playerList, mapLocation, actionList}) {
this.changeScriptMode(this.scriptMode);
this.isScriptLoad = true;
this.playerList = playerList;
this.mapLocation = mapLocation;
this.actionList = actionList;
this.userRole = 'AUDIENCE';
this.$store.dispatch('training/setRoles', 'AUDIENCE');
},
@ -463,15 +469,21 @@ export default {
(this.$store.state.training.memberData[role.id] || {}).disabled = true;
this.runScriptMode(memberId);
},
finishTraining() {
finishTraining(data) {
this.isScriptRun = false;
this.showResultData(data);
},
showResultData(data) {
this.$refs.testResult.doShow({data:data, actionList:this.actionList});
},
endTraining() {
competitionPracticalSceneFinish(this.group, {operationStatisticVO:{}}).then(res=>{
this.isScriptRun = false;
// if (this.scriptMode == ScriptMode.TEST) {
this.formatScore = res.data;
this.$messageBox('得分:' + this.formatScore);
// this.formatScore = res.data;
// this.
this.showResultData(res.data);
// this.$messageBox('' + this.formatScore);
// }
// this.userRole = 'AUDIENCE';
// this.$store.dispatch('training/setRoles', 'AUDIENCE');

View File

@ -78,9 +78,9 @@ export default {
} else {
competitionPracticalSceneFinish(this.$route.query.group, this.resultData).then(res=>{
this.$message.success('运营统计数据提交成功');
this.formatScore = res.data;
this.$messageBox('得分:' + this.formatScore);
this.$emit('finishTraining');
// this.formatScore = res.data;
// this.$messageBox('' + this.formatScore);
this.$emit('finishTraining', res.data);
this.$store.dispatch('scriptRecord/updateOperationalItemVOs', this.resultData.itemVOS);
this.dialogShow = false;
}).catch(error=>{

View File

@ -120,6 +120,7 @@ export default {
const playerList = [];
EventBus.$emit('clearRunSeries');
EventBus.$emit('loadScene');
const actionList = {};
if (res.data.memberList && res.data.memberList.length > 0) {
this.form.type = '';
res.data.memberList.sort((a, b) => {
@ -128,6 +129,7 @@ export default {
this.$store.dispatch('training/setMemberList', {memberList:res.data.memberList, userId:this.$store.state.user.id});
const activeMemberList = [];
res.data.actionList.forEach((activeMember)=>{
actionList[activeMember.id] = activeMember;
if (!(activeMemberList.length > 0 && activeMemberList.includes(activeMember.memberId))) {
activeMemberList.push(activeMember.memberId);
}
@ -177,14 +179,14 @@ export default {
if (res.data.mapLocation) {
this.mapLocation = res.data.mapLocation;
}
this.confirm(playerList);
this.confirm(playerList, actionList);
}
}
},
confirm(playerList) {
confirm(playerList, actionList) {
// this.$store.dispatch('training/setScriptOperationType', this.operationType);
// operationType:ScriptMode[this.operationType]
this.$emit('selectScript', {playerList:playerList, mapLocation:this.mapLocation});
this.$emit('selectScript', {playerList:playerList, mapLocation:this.mapLocation, actionList:actionList});
this.doClose();
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {

View File

@ -0,0 +1,268 @@
<template>
<el-dialog
title="竞赛结果详情"
:visible.sync="dialogShow"
top="50px"
width="900px"
:before-do-close="doClose"
class="OSResult"
:close-on-click-modal="false"
>
<div class="operationStatisticResult">
<div class="OSTcompleted">
<span v-if="completed" style="font-size:16px;color:green">完成</span>
<span v-else style="font-size:16px;color:red">未完成</span>
<span style="margin-left:20px;font-size:16px;">满分{{ fullScore }} </span>
<span style="margin-left:20px;font-size:16px;">得分{{ userScore }} </span>
</div>
<div class="OSTitle"><span>关键步骤信息</span><span style="margin-left:10px;">{{ '(得分: '+userScoreOfCommand+' / 满分: '+ fullScoreOfCommand+')' }}</span></div>
<el-table :data="commandPublishStatisticVO" border class="OSTTable3">
<!-- height="400" -->
<el-table-column prop="actionId" label="步骤描述" width="230">
<template slot-scope="scope">
{{ covert(scope.row.actionId) }}
</template>
</el-table-column>
<el-table-column prop="keyWords" label="关键字" width="200">
<template slot-scope="scope">
<el-tag v-for="(tag,index) in scope.row.keyWords" :key="index" class="eachTag">{{ tag }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="timeConsumed" label="用时" width="100" />
<el-table-column prop="timeOut" label="超时时间" width="100">
<template slot-scope="scope">
{{ scope.row.timeOut?scope.row.timeOut+'s':'' }}
</template>
</el-table-column>
<el-table-column prop="score" label="步骤总分" width="100" />
<el-table-column prop="finalPointsDeducted" label="用户扣分" width="100" />
</el-table>
<div class="OSTitle">
<span>运营统计信息</span>
<span style="margin-left:10px;">{{ '(得分: '+userScoreOfOperationStatistic+' / 满分: '+ fullScoreOfOperationStatistic+')' }}</span>
</div>
<el-table :data="operationStaticItemVOs" border class="OSTTable">
<el-table-column prop="description" label="数据名称" width="300" />
<el-table-column label="正确答案" width="150">
<template slot-scope="scope">
<div v-if="scope.row.type=='Time'">{{ covertTime(scope.row.time) }}</div>
<div v-else-if="scope.row.type=='Non_Time'">{{ scope.row.standardAnswer }}</div>
</template>
</el-table-column>
<el-table-column label="用户填写" width="150">
<template slot-scope="scope">
<div v-if="scope.row.type=='Time'">{{ covertTime(scope.row.timeFilledInByUser) }}</div>
<div v-else-if="scope.row.type=='Non_Time'">{{ scope.row.userAnswer }}</div>
</template>
</el-table-column>
<el-table-column prop="finalPointsDeducted" label="扣分" />
</el-table>
<div class="OSTSignInfo">
<span>运营指标信息</span>
<span style="margin-left:10px;">{{ '(得分: '+fullScoreOfOperationIndex+' / 满分: '+ userScoreOfOperationIndex+')' }}</span>
</div>
<div class="OSTSignInfoTips">
<span class="el-icon-info" style="font-size: 16px;" /> 若竞赛未完成运营指标不得分
</div>
<div class="OSTSignInfoTips">晚点列车信息</div>
<el-table :data="finalLateStatistics" border class="OSTTable1">
<el-table-column prop="groupNumber" label="车组号" width="300" />
<el-table-column prop="dt" label="晚点时间" width="300">
<template slot-scope="scope">
{{ scope.row.dt }} s
</template>
</el-table-column>
<el-table-column prop="finalPointsDeducted" label="扣分" width="230" />
</el-table>
<div class="OSTSignInfoTips">区间停车信息</div>
<el-table :data="finalStopInSectionStatistics" border class="OSTTable2">
<el-table-column prop="groupNumber" label="车组号" width="300" />
<el-table-column prop="duration" label="停车时长" width="300">
<template slot-scope="scope">
{{ scope.row.duration }} s
</template>
</el-table-column>
<el-table-column prop="finalPointsDeducted" label="扣分" width="230" />
</el-table>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doClose">{{ $t('global.confirm') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import {covertOperate} from '@/views/newMap/displayNew/scriptDisplay/component/covertOperation';
export default {
name:'TestResult',
data() {
return {
dialogShow:false,
operationStaticItemVOs:[],
finalLateStatistics:[],
finalStopInSectionStatistics:[],
commandPublishStatisticVO:[],
completed:false,
fullScore:'',
userScore:'',
actionList:[],
fullScoreOfCommand:0, //
userScoreOfCommand:0, //
fullScoreOfOperationStatistic:0, //
userScoreOfOperationStatistic:0, //
fullScoreOfOperationIndex:0, //
userScoreOfOperationIndex:0 //
};
},
methods:{
doShow({data, actionList}) {
this.dialogShow = true;
this.completed = data.completed;
this.operationStaticItemVOs = data.operationStatisticVO.itemVOS;
this.finalLateStatistics = data.operationIndexStatisticVO.finalLateStatistics;
this.finalStopInSectionStatistics = data.operationIndexStatisticVO.finalStopInSectionStatistics;
this.commandPublishStatisticVO = data.commandPublishStatisticVO;
this.actionList = actionList;
this.fullScore = data.fullScore;
this.userScore = data.userScore;
this.fullScoreOfCommand = data.fullScoreOfCommand;
this.userScoreOfCommand = data.userScoreOfCommand;
this.fullScoreOfOperationStatistic = data.fullScoreOfOperationStatistic;
this.userScoreOfOperationStatistic = data.userScoreOfOperationStatistic;
this.fullScoreOfOperationIndex = data.fullScoreOfOperationIndex;
this.userScoreOfOperationIndex = data.userScoreOfOperationIndex;
},
doClose() {
this.dialogShow = false;
},
covertTime(time) {
return time.slice(0, time.length - 3);
},
covert(actionId) {
// return actionId;
const element = this.actionList[actionId];
// this.$store.state.training.memberData[memberId]
const member = this.$store.state.training.memberData[element.memberId];
let resultData = '';
if (element.type == 'Accept_Conversation_Invitation') {
resultData = member.label + '请接受会话邀请';
} else if (element.type == 'Conversation') {
resultData = member.label + '说:' + element.content;
} else if (element.type == 'Operation') {
resultData = covertOperate(element.operationType, element.operationParamMap);
resultData = resultData.replace('请', member.label);
// this.scriptTipMessage = '' + deviceName + '' + operateName.label + '';
} else if (element.type == 'Exit_Conversation') {
resultData = member.label + '结束当前会话';
} else if (element.type == 'Start_Conversation' ) {
const inviteMember = [];
// this.$emit('allowCreatCoversition');
if (element.communicationObject) {
if (element.communicationObject == 'ALL_STATION') {
inviteMember.push('所有车站');
} else if (element.communicationObject == 'ALL_TRAIN') {
inviteMember.push('所有司机');
}
} else {
element.conversationMemberIds.forEach(id=>{
if (element.memberId != id) {
inviteMember.push((this.memberList[id] || {label: ''}).label);
}
});
}
resultData = member.label + '创建会话,选择' + inviteMember.toString();
} else if (element.type == 'Command') {
const targetName = this.memberList[element.commandInitiateVO.targetMemberId];
const CommandList = {
Drive_Ahead:'确认运行至前方站',
Route_Block_Drive:'进路闭塞法行车',
Drive_Through_The_Guide_Signal:'越引导信号行驶',
Drive_Through_The_Red_Light:'越红灯行驶',
Drive_In_Urm_Mode:'URM模式驾驶',
Set_Speed_Limit:'设置限速',
Open_Or_Close_Door:'开关门',
Switch_Hook_Lock: '道岔钩锁'
};
resultData = member.label + '对【' + targetName.label + '】下达【' + CommandList[element.commandInitiateVO.commandType] + '】指令';
} else if (element.type == 'Drive') {
if (element.targetSectionCode) {
const section = this.$store.getters['map/getDeviceByCode'](element.targetSectionCode);
if (section && section.name) {
resultData = member.label + '把车开到区段' + section.name;
}
}
}
return resultData;
}
}
};
</script>
<style lang="scss" scoped>
.operationStatisticResult{
height: 500px;
overflow: auto;
&::-webkit-scrollbar {
width: 4px;
}
&::-webkit-scrollbar-thumb {
border-radius: 10px;
background: #c3c3c3;
}
&::-webkit-scrollbar-track {
border-radius: 0;
background: #f0f0f0;
}
}
.OSTitle{
padding: 10px 5px;
font-size: 15px;
font-weight: bold;
}
.OSTTable{
width:832px;
}
.OSTTable1,.OSTTable2{
width:832px;
}
.OSTTable3{
width:832px;
}
.OSTcompleted{
padding: 5px 5px;
font-size: 15px;
}
.OSTSignInfo{
padding: 15px 5px 10px 5px;
font-size: 15px;
font-weight: bold;
}
.OSTSignInfoTips{
padding: 10px 5px;
font-size: 15px;
}
.eachTag{
margin-left:10px;
}
</style>
<style lang="scss">
.OSResult .el-dialog__body{
padding: 10px 20px;
}
// .OSTTable3 .el-table__body-wrapper.is-scrolling-none {
// &::-webkit-scrollbar{
// width: 4px !important;
// }
// &::-webkit-scrollbar-thumb {
// border-radius: 10px;
// background: #c3c3c3;
// }
// &::-webkit-scrollbar-track {
// border-radius: 0;
// background: #f0f0f0;
// }
// }
</style>

View File

@ -23,29 +23,51 @@ export default {
this.listenersOff();
},
methods: {
getStationByCoord1(stations, y) {
for(var i = stations.length-1; i >= 0; i--) {
const station = stations[i];
const edge = this.planConvert.EdgeHeight
const preKm = i == 0? edge*2: Math.abs(station.kmRange-stations[i-1].kmRange)/2;
const nxtKm = i == stations.length-1? edge: Math.abs(station.kmRange-stations[i+1].kmRange)/2;
const min = edge + station.kmRange - preKm;
const max = edge + station.kmRange + nxtKm;
if (y >= min && y <= max) {
return station;
}
}
return null;
},
getStationByCoord(stations, y) {
for(var i = stations.length-1; i >= 0; i--) {
const station = stations[i];
if (station.kmRange <= y) {
const edge = this.planConvert.EdgeHeight;
const rate = this.planConvert.CoordMultiple;
const preKm = i == 0? edge*2: rate/2;
const nxtKm = i == stations.length-1? edge: rate/2;
const min = edge + i*rate - preKm;
const max = edge + i*rate + nxtKm;
if (y >= min && y <= max) {
return station;
}
}
return null;
},
pixelExecCb(e, cb) {
let myChart = this.myChart;
let pointInPixel= [e.offsetX, e.offsetY];
const event = e.componentType ? e.event: e;
const myChart = this.myChart;
const pointInPixel = [event.offsetX, event.offsetY]
if (myChart.containPixel('grid', pointInPixel) && this.planConvert) {
let pointInGrid = myChart.convertFromPixel({seriesIndex:0},pointInPixel);
let xIndex = pointInGrid[0];
let yIndex = pointInGrid[1];
let op = myChart.getOption();
let minY = op.yAxis[0].min;
let xVal = op.xAxis[0].data[xIndex];
let edgeOffset = this.planConvert.EdgeHeight/6;
let yObj = this.getStationByCoord(this.stations, yIndex-minY-edgeOffset);
const pointInGrid = myChart.convertFromPixel({seriesIndex:0},pointInPixel);
const xIndex = pointInGrid[0];
const yIndex = pointInGrid[1];
const option = myChart.getOption();
const minY = option.yAxis[0].min;
const xVal = option.xAxis[0].data[xIndex];
const yObj = this.getStationByCoord(this.stations, yIndex-minY);
if (yObj && cb) {
cb(yObj, xVal, pointInPixel);
cb({yObj, xVal, pointInPixel, e});
}
}
},
@ -54,9 +76,10 @@ export default {
const zr = this.myChart.getZr();
zr.on('click', this.onClick, this)
this.myChart.on('contextmenu', this.onContextMenu);
this.myChart.on('mousedown', this.onMouseDown);
this.myChart.on('datazoom', this.onUpdateZoom);
this.myChart.on('mouseover', this.onMouseOver);
this.myChart.on('mouseup', this.onMouseUP);
this.myChart.on('datazoom', this.onUpdatePosition);
window.addEventListener('resize', this.onUpdatePosition);
}
},
@ -65,100 +88,160 @@ export default {
const zr = this.myChart.getZr();
zr.off('click', this.onClick);
this.myChart.off('contextmenu', this.onContextMenu)
this.myChart.off('mousedown', this.onMouseDown);
this.myChart.off('datazoom', this.onUpdateZoom);
this.myChart.off('mouseover', this.onMouseOver);
this.myChart.off('mouseup', this.onMouseUP);
this.myChart.off('datazoom', this.onUpdatePosition);
window.removeEventListener('resize', this.onUpdatePosition);
}
},
loadInitGraphic() {
const option = this.myChart.getOption();
const graphic = option.series.map((el,i) => {
return {
id: el.name,
elements: echarts.util.map(el.data||[], (el, dataIndex) => {
return {
type: 'circle',
position: this.myChart.convertToPixel('grid', el),
shape: {
cx: 0,
cy: 0,
r: 10
},
invisible: true,
draggable: true,
ondrag: echarts.util.curry(this.onPointDragging, dataIndex),
onmousemove: echarts.util.curry(this.onShowTooltip, dataIndex),
onmouseout: echarts.util.curry(this.onHideTooltip, dataIndex),
z: 100
};
})
}
})
graphic.push({ id: 'operate', elements: [] })
this.myChart.setOption({ graphic });
},
onPointDragging(dataIndex, dx, dy) {
//
},
onShowTooltip(dataIndex) {
this.myChart.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: dataIndex
});
},
onHideTooltip(dataIndex) {
this.myChart.dispatchAction({type: 'hideTip'});
},
onUpdatePosition(e) {
const option = this.myChart.getOption();
const shapes = option.graphic;
// const graphic = shapes.map(el => {
// return echarts.util.map(el.elements||[], function (item, dataIndex) {
// console.log(item, this.myChart.convertToPixel('grid', item.point))
// return {
// position: this.myChart.convertToPixel('grid', item.point)
// };
// })
// })
// this.myChart.setOption({graphic});
},
onUpdateZoom(e) {;
const option = this.myChart.getOption();
const shapes = option.graphic;
// const graphic = shapes.map(el => {
// console.log(el)
// const points = (el.elements||[]).map(el => { return el.point; });
// return echarts.util.map(points, function (point, dataIndex) {
// console.log(point, this.myChart.convertToPixel('grid', point))
// return {
// position: this.myChart.convertToPixel('grid', point)
// };
// })
// })
// this.myChart.setOption({graphic});
const elements = option.graphic[0].elements
const graphic = echarts.util.map(elements, (item) => {
return { position: this.myChart.convertToPixel('grid', item.data) };
})
this.myChart.setOption({graphic});
},
onClick(e) {
switch(this.action) {
case 'Plan':
this.pixelExecCb(e, this.handleMarkPoint);
case 'Add':
this.pixelExecCb(e, this.handleCreateMark);
break;
}
},
onMouseDown(e) {
switch(this.action) {
case 'Edit':
this.pixelExecCb(e, this.handlePopDialog);
break;
}
},
onMouseOver(e) {
this.pixelExecCb(e, this.handleSelectLine);
},
onMouseUP(e) {
switch(this.action) {
case 'Translate':
if (this.dragging) {
this.dragging = false;
this.handleTranslate(this.createModel)
}
break;
}
},
onContextMenu(e) {
const event = e.event;
const point = {
x: event.clientX,
y: event.clientY
}
onShapePointDragging(e) {
if (this.selected) {
this.dragging = true;
this.myChart.dispatchAction({
type: 'showTip',
seriesIndex: this.selected.seriesIndex,
dataIndex: this.selected.dataIndex
});
this.pixelExecCb(e, this.handleDragging);
}
},
setLineLight() {
if (this.selected) {
this.myChart.setOption({
series: {
name: this.selected.seriesName,
symbolSize: 10,
showAllSymbol: true,
lineStyle: {
width: 2,
color: 'red'
}
}
});
}
},
setLineReset() {
if (this.selected) {
this.myChart.setOption({
series: {
name: this.selected.seriesName,
symbolSize: 6,
showAllSymbol: 'auto',
lineStyle: {
width: 1,
color: '#000'
}
}
});
}
},
clearGraphic(labels) {
const option = this.myChart.getOption();
const elements = option.graphic[0].elements;
option.graphic[0].elements = elements.filter(el => { return !labels.includes(el.subType)});
this.myChart.setOption(option, {notMerge: true});
},
createDragGraphicObj(point) {
return {
type: 'circle',
subType: 'drag',
position: this.myChart.convertToPixel('grid', point),
data: [...point],
shape: {
cx: 0,
cy: 0,
r: 10
},
style: {
fill: 'rgba(0,0,0,0.0)'
},
draggable: 'horizontal',
ondrag: echarts.util.curry(this.onShapePointDragging),
z: 100
}
},
createMarkPointObj(point) {
return {
type: 'group',
subType: 'mark',
z: 100,
position: point,
point,
children: [
{
type: 'circle',
z: 100,
shape: {
cx: 0,
cy: 0,
r: 5
},
style: {
fill: 'rgba(0,0,0,0.3)'
}
},
{
type: 'circle',
z: 100,
shape: {
cx: 0,
cy: 0,
r: 10
},
style: {
fill: 'rgba(0,0,0,0.3)'
}
}
]
}
},
handlePopDialog({e, pointInPixel}) {
if (e.componentType == "series" &&
e.componentSubType == "line" &&
e.seriesName.includes('run-')) {
const value = e.value;
const point = {
x: pointInPixel[0],
y: pointInPixel[1]
}
const option = this.myChart.getOption();
const dataList = option.series[e.seriesIndex].data;
const length = dataList.length;
@ -166,10 +249,16 @@ export default {
const pre = dataList[e.dataIndex-1];
this.selected = {
dataIndex: e.dataIndex,
seriesIndex: e.seriesIndex,
seriesName: e.seriesName,
seriesId: e.seriesName.replace('run-', ''),
depTime: e.dataIndex < length - 1? nxt[0] - value[0]: 0,
runTime: e.dataIndex < length - 1? nxt[0] - value[0]: 0,
stationCode: value[2]
stationCode: value[2],
_x: value[0],
dx: 0,
time: 0
}
if (e.dataIndex == length - 1 ||
@ -181,11 +270,10 @@ export default {
}
}
},
onMouseDown(e) {
handleSelectLine({e}) {
if (e.componentType == "series" &&
e.componentSubType == "line" &&
e.seriesName.includes('run-')) {
const value = e.value;
const option = this.myChart.getOption();
const dataList = option.series[e.seriesIndex].data;
@ -193,91 +281,80 @@ export default {
const nxt = dataList[e.dataIndex+1];
const pre = dataList[e.dataIndex-1];
if (this.selected &&
this.selected.seriesName != e.seriesName) {
this.setLineReset();
}
this.selected = {
dataIndex: e.dataIndex,
seriesIndex: e.seriesIndex,
seriesName: e.seriesName,
seriesId: e.seriesName.replace('run-', ''),
depTime: e.dataIndex < length - 1? nxt[0] - value[0]: 0,
runTime: e.dataIndex < length - 1? nxt[0] - value[0]: 0,
stationCode: value[2]
stationCode: value[2],
_x: value[0],
dx: 0,
time: 0
}
this.dragging = true;
this.setLineLight();
switch(this.action) {
case 'Translate':
this.handleCreateDrag({e})
break;
}
}
},
clearMarks() {
handleCreateDrag({e}) {
const option = this.myChart.getOption();
const graphic = option.graphic;
const index = graphic.findIndex(el => { return el.id == 'operate'});
if (index >= 0) {
graphic[index].elements = [];
}
const filters = option.graphic[0].elements.filter(el => { return el.subType != 'drag'});
filters.push(this.createDragGraphicObj(e.value))
option.graphic[0].elements = filters;
this.myChart.setOption(option, {notMerge: true});
},
createMarkPoint(point, text) {
return {
type: 'circle',
z: 100,
position: point,
point,
shape: {
cx: 0,
cy: 0,
r: 10
},
style: {
fill: 'rgba(0,0,0,0.3)'
}
handleCreateMark({pointInPixel, yObj, xVal}) {
const myChart = this.myChart;
const option = this.myChart.getOption();
const graphic = option.graphic;
const elements = graphic[0].elements;
elements.push(this.createMarkPointObj(pointInPixel))
myChart.setOption(option, {notMerge: true});
const filters = elements.filter(el => { return el.subType == 'mark'});
if (filters.length == 1) {
this.createModel.startStationCode = yObj.code;
this.createModel.startTime = timeFormat(xVal);
} else if (filters.length >= 2) {
this.createModel.endStationCode = yObj.code;
this.handleCreate(this.createModel);
}
},
handleDragging({e, xVal}) {
this.selected.dx = xVal - this.selected._x;
this.selected.time += this.selected.dx;
this.selected._x = xVal;
const option = this.myChart.getOption();
const model = option.series[this.selected.seriesIndex]
if (model) {
model.data.forEach(el => {
el[0] += this.selected.dx;
});
}
// return {
// type: 'group',
// z: 100,
// position: point,
// point,
// children: [
// {
// type: 'circle',
// z: 100,
// shape: {
// cx: 0,
// cy: 0,
// r: 5
// },
// style: {
// fill: 'rgba(0,0,0,0.3)'
// }
// },
// {
// type: 'circle',
// z: 100,
// shape: {
// cx: 0,
// cy: 0,
// r: 10
// },
// style: {
// fill: 'rgba(0,0,0,0.3)'
// }
// }
// ]
// }
},
handleMarkPoint(yObj, xVal, pointInPixel) {
let myChart = this.myChart;
if (myChart) {
let op = myChart.getOption();
let graphic = op.graphic[0];
if (graphic) {
graphic.elements.push(this.createMarkPoint(pointInPixel, 'hello world'))
myChart.setOption(op);
if (graphic.elements.length == 1) {
this.createModel.startStationCode = yObj.code;
this.createModel.startTime = timeFormat(xVal);
} else if (graphic.elements.length >= 2) {
this.createModel.endStationCode = yObj.code;
this.handleCreate(this.createModel);
}
}
if (e.target && e.target.position) {
e.target.data.x += this.selected.dx;
}
this.myChart.setOption(option, {notMerge: true});
}
}
}

View File

@ -3,12 +3,12 @@
<el-card class="box-card">
<div slot="header" class="clearfix">
<div class="menus">
<span style="font-size:22px;padding:0 17px;">Plan</span>
<el-button-group v-model="active">
<el-button v-for="(el,i) in buttonList"
:type="active == i? 'primary':''"
:key="i" @click="handleBtnSelect(el,i)">{{el.name}}</el-button>
</el-button-group>
<el-button @click="handleCancle">Reset</el-button>
<el-button-group style="margin-left: 20px">
<el-button :type="selected?'danger':'info'" icon="el-icon-delete" @click="handleRemove" />
</el-button-group>
@ -29,8 +29,7 @@ import Monitor from './monitor.js';
import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date';
import { getStationList } from '@/api/runplan';
import { getRpTools, addRpTrip, delRpTrip, justTripNoRunning, justTripNoStop} from '@/api/rpTools';
import { loadMapDataById } from '@/utils/loaddata';
import { getRpTools, addRpTrip, delRpTrip, justTripNoRunning, justTripNoStop, translateTripNo} from '@/api/rpTools';
import { getPublishMapInfo } from '@/api/jmap/map';
export default {
@ -77,9 +76,18 @@ export default {
action: '',
buttonList: [
{
name: 'Plan',
type: 'Plan'
} ]
name: 'Add',
type: 'Add'
},
{
name: 'Translate',
type: 'Translate'
},
{
name: 'Edit',
type: 'Edit'
}
]
};
},
computed: {
@ -110,7 +118,7 @@ export default {
toolbox: {
},
tooltip: {
trigger: 'axis',
trigger: 'item',
axisPointer: {
type: 'cross',
snap: true,
@ -180,7 +188,7 @@ export default {
max: 0
},
graphic: [{
id: 'operate',
id: 'shape',
elements: []
}],
series: [],
@ -260,7 +268,6 @@ export default {
this.$store.dispatch('rpTools/clear').then(() => {
this.loadInitChart().then(() => {
if (this.mapId) {
loadMapDataById(this.mapId);
getStationList(this.mapId).then(resp => {
const stations = resp.data.filter(el => {
return ['车辆段', '停车场'].findIndex(it => {
@ -309,12 +316,13 @@ export default {
const option = this.myChart.getOption();
option.series = [];
option.graphic = [{ id: 'operate', elements: [] }];
option.graphic[0].elements = [];
this.kmRangeCoordMap = this.planConvert.convertStationsToMap(stations);
this.pushModels(option.series, [this.planConvert.initializeYaxis(this.stations)]);
this.pushModels(option.series, this.planConvert.convertDataToModels(planData, stations, this.kmRangeCoordMap, { width: 0.5, color: '#000' }));
this.myChart.setOption(option, {notMerge: true});
this.loadInitGraphic();
} catch (error) {
this.$messageBox(this.$t('error.loadingOperationGraphFailed') + this.$t('global.colon') + error.message);
}
@ -390,20 +398,18 @@ export default {
axisTooltip(param) {
let data = '';
const arr = [];
param.forEach(item => {
const station = this.stationsObj[Math.floor((item.data[1] - this.planConvert.EdgeHeight) / this.planConvert.CoordMultiple)] || { name: '', kmRange: '' };
if (!arr.includes(`${item.data[0]}${item.data[1]}`)) {
arr.push(`${item.data[0]}${item.data[1]}`);
const list = [
`${this.$t('planMonitor.stationName')}${station.name}<br>`,
`${this.$t('planMonitor.stationKilometerMark')}${station.kmRange} m <br>`,
`${this.$t('planMonitor.arriveTime')}${timeFormat(item.data[0] + this.planConvert.TranslationTime)}<br>`,
`${this.$t('planMonitor.serverTrainNum')}: ${item.seriesName}${item.data[3]}(${item.data[3][0] == '2' ? 'Up' : 'Down'})`,
`<hr size=1 style="margin: 3px 0">`
];
data += list.join('');
}
});
const station = this.stations.find(el => { return el.code == param.value[2] })||{ name: '', kmRange: ''};
if (!arr.includes(`${param.data[0]}${param.data[1]}`)) {
arr.push(`${param.data[0]}${param.data[1]}`);
const list = [
`Station name: ${station.name}<br>`,
`Kilometer post: ${station.kmRange} m <br>`,
`Arrival Time: ${timeFormat(param.data[0] + this.planConvert.TranslationTime)}<br>`,
`Train number: ${param.seriesName}${param.data[3]}`,
`<hr size=1 style="margin: 3px 0">`
];
data += list.join('');
}
return data;
},
reSize(opt) {
@ -416,14 +422,20 @@ export default {
}
},
handleBtnSelect(el, i) {
this.active = i;
this.action = el.type;
if (this.active != i) {
this.handleCancle();
this.active = i;
this.action = el.type;
} else {
this.handleCancle();
}
},
handleCancle() {
this.clearGraphic(['drag', 'mark']);
this.setLineReset();
this.active = -1;
this.action = '';
this.selected = null;
this.clearMarks();
},
handleCreate(data) {
if (this.myChart) {
@ -437,26 +449,29 @@ export default {
});
}).catch(error => {
this.$message(error.message);
this.clearMarks();
this.clearGraphic(['mark']);
})
}
},
handleRemove() {
if (this.myChart && this.selected) {
delRpTrip(this.selected.seriesId).then(resp => {
},
handleTranslate(data) {
if (this.selected) {
const model = {
seconds : this.selected.time
}
translateTripNo(this.selected.seriesId, model).then(resp => {
getRpTools().then(rest => {
this.$store.dispatch('rpTools/setPlanData', rest.data).then(() => {
this.loadChartData();
this.handleCancle();
});
}).catch(() => {
this.$messageBox(this.$t('error.obtainOperationGraphFailed'));
});
}).catch(error => {
this.$message(error.message);
})
}
},
});
}
},
handleJustRunning(time) {
if (this.selected) {
const model = {
@ -496,6 +511,22 @@ export default {
this.$message(error.message);
})
}
},
handleRemove() {
if (this.myChart && this.selected) {
delRpTrip(this.selected.seriesId).then(resp => {
getRpTools().then(rest => {
this.$store.dispatch('rpTools/setPlanData', rest.data).then(() => {
this.loadChartData();
this.handleCancle();
});
}).catch(() => {
this.$messageBox(this.$t('error.obtainOperationGraphFailed'));
});
}).catch(error => {
this.$message(error.message);
})
}
}
}
};

View File

@ -0,0 +1,106 @@
<template>
<el-dialog v-dialogDrag title="添加单位" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ update? '修改' : $t('global.confirm') }}</el-button>
<el-button @click="dialogVisible = false">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { addCompany, updateCompany } from '@/api/company';
export default {
name: 'Add',
data() {
return {
dialogVisible: false,
formModel: {
address: '',
name: '',
phone: '',
id: ''
},
update: false
};
},
computed:{
form() {
const form = {
labelWidth: '100px',
items: [
{ prop: 'name', label: '昵称', type: 'text' },
{ prop: 'phone', label: '电话', type: 'text' },
{ prop: 'address', label: '地址', type: 'text' }
]
};
return form;
},
rules() {
const crules = {
name: [
{ required: true, message: '请输入单位名称', trigger: 'blur' },
{ min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }
],
phone: [
{ required: true, message: '请输入公司电话', trigger: 'blur' }
],
address:[
{ required: true, message: '请输入公司地址', trigger: 'blur'}
]
};
return crules;
}
},
methods: {
doShow(data) {
this.dialogVisible = true;
this.update = false;
if (data) {
this.update = true;
this.formModel = {
id: data.id,
name: data.name,
phone: data.phone,
address: data.address
};
} else {
this.formModel = {
address: '',
name: '',
phone: '',
id: ''
};
}
},
handleClose() {
this.dialogVisible = false;
},
doSave() {
this.$refs.dataform.validateForm(() => {
if (this.update) {
updateCompany(this.formModel.id, this.formModel).then(resp => {
this.$message.success('更新单位信息成功!');
this.dialogVisible = false;
this.$emit('reloadTable');
}).catch(e => {
this.$message.error('更新单位信息失败!');
});
} else {
addCompany(this.formModel).then(resp => {
this.$message.success('添加单位信息成功!');
this.dialogVisible = false;
this.$emit('reloadTable');
}).catch(e => {
this.$message.error('添加单位信息失败!');
});
}
});
}
}
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,97 @@
<template>
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<edit-company ref="editCompany" @reloadTable="reloadTable" />
</div>
</template>
<script>
import { getCompanyListPaging, deleteCompany } from '@/api/company';
import EditCompany from './add';
export default {
name: 'CompanyManage',
components: {
EditCompany
},
data() {
return {
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '80px',
reset: true,
queryObject: {
}
},
queryList: {
query: getCompanyListPaging,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: '公司名称',
prop: 'name'
},
{
title: '公司电话',
prop: 'phone'
},
{
title: '公司地址',
prop: 'address'
},
{
type: 'button',
title: this.$t('global.operate'),
width: '250',
buttons: [
{
name: this.$t('global.edit'),
handleClick: this.handleUpdate
},
{
name: '删除',
handleClick: this.handleDeleteCompany,
type: 'danger'
}
]
}
],
actions: [
{ text: '添加', btnCode: 'employee_auto', handler: this.handlerAddCompany },
{ text: '返回', btnCode: 'employee_auto', handler: this.handlerBack}
]
},
currentModel: {}
};
},
methods: {
handlerAddCompany() {
this.$refs.editCompany.doShow();
},
handleDeleteCompany(index, row) {
deleteCompany(row.id).then(resp => {
this.$message.success('删除单位信息成功!');
this.reloadTable();
}).catch(() => {
this.$message.error('删除单位信息失败!');
});
},
handleUpdate(index, row) {
this.$refs.editCompany.doShow(row);
},
reloadTable() {
this.queryList.reload();
},
handlerBack() {
this.$router.go(-1);
}
}
};
</script>
<style scoped>
</style>

View File

@ -90,7 +90,8 @@ export default {
}
],
actions: [
{ text: '创建本地用户', btnCode: 'employee_auto', handler: this.createLocalUsers }
{ text: '创建本地用户', btnCode: 'employee_auto', handler: this.createLocalUsers },
{ text: '单位管理', btnCode: 'company_manage', handler: this.companyManage }
]
},
currentModel: {}
@ -132,6 +133,9 @@ export default {
},
createLocalUsers() {
this.$refs.createUser.doShow();
},
companyManage() {
this.$router.push({ path: `/system/companyManage`});
}
}
};