Merge branch 'test' into test-runPlan
This commit is contained in:
commit
d5230997cc
@ -23,9 +23,9 @@ export function listStations(lineId) {
|
|||||||
/**
|
/**
|
||||||
* 更新线路车站
|
* 更新线路车站
|
||||||
*/
|
*/
|
||||||
export function updateStation(lineId, data) {
|
export function updateStation(stationId, data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/rpTools/station/${lineId}`,
|
url: `/api/rpTools/station/${stationId}`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
|
@ -380,3 +380,19 @@ export function getIbpInitialState (group, stationCode) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 获取报警列表
|
||||||
|
export function getAlarmList(group, params) {
|
||||||
|
return request({
|
||||||
|
url: `/simulation/${group}/alarm`,
|
||||||
|
method: 'get',
|
||||||
|
params:params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 报警确认
|
||||||
|
export function confirmAlarm(group, data) {
|
||||||
|
return request({
|
||||||
|
url: `/simulation/${group}/alarm/confirm`,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -2,6 +2,12 @@ import { createSeriesModel, createMarkLineModels, createRectArea, createMartPoin
|
|||||||
import { toTimeStamp } from '@/utils/date';
|
import { toTimeStamp } from '@/utils/date';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
/** 最小时间*/
|
||||||
|
MinTime: 0,
|
||||||
|
|
||||||
|
/** 最大时间*/
|
||||||
|
MaxTime: 3600*24-1,
|
||||||
|
|
||||||
/** 边缘高度*/
|
/** 边缘高度*/
|
||||||
EdgeHeight: 600,
|
EdgeHeight: 600,
|
||||||
|
|
||||||
@ -13,11 +19,10 @@ export default {
|
|||||||
|
|
||||||
/** 转换model为Rect数据*/
|
/** 转换model为Rect数据*/
|
||||||
calcAreaArgsByModel(chart, model) {
|
calcAreaArgsByModel(chart, model) {
|
||||||
const startTime = model.startTime;
|
|
||||||
const endTime = model.endTime;
|
|
||||||
const fartherKmRange = model.fartherKmRange;
|
const fartherKmRange = model.fartherKmRange;
|
||||||
const closerKmRange = model.closerKmRange;
|
const closerKmRange = model.closerKmRange;
|
||||||
|
const startTime = model.startTime;
|
||||||
|
const endTime = model.endTime;
|
||||||
const point1 = [ startTime, this.getCoordinateYByKmRange(fartherKmRange)];
|
const point1 = [ startTime, this.getCoordinateYByKmRange(fartherKmRange)];
|
||||||
const point2 = [ endTime, this.getCoordinateYByKmRange(closerKmRange)]
|
const point2 = [ endTime, this.getCoordinateYByKmRange(closerKmRange)]
|
||||||
const position1 = chart.convertToPixel('grid', point1);
|
const position1 = chart.convertToPixel('grid', point1);
|
||||||
@ -43,8 +48,8 @@ export default {
|
|||||||
planData.areaList &&
|
planData.areaList &&
|
||||||
planData.areaList.length) {
|
planData.areaList.length) {
|
||||||
planData.areaList.forEach(model => {
|
planData.areaList.forEach(model => {
|
||||||
model.startTime = typeof model.startTime == 'string'? toTimeStamp(model.startTime): model.startTime;
|
if (typeof model.startTime == 'string') model.startTime = toTimeStamp(model.startTime);
|
||||||
model.endTime = typeof model.endTime == 'string'? toTimeStamp(model.endTime): model.endTime;
|
if (typeof model.endTime == 'string') model.endTime = toTimeStamp(model.endTime);
|
||||||
graphs.push(createRectArea(this.calcAreaArgsByModel(chart, model)));
|
graphs.push(createRectArea(this.calcAreaArgsByModel(chart, model)));
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -235,13 +240,32 @@ export default {
|
|||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**限制区域范围 */
|
||||||
|
limitAreaTime(model) {
|
||||||
|
if (model) {
|
||||||
|
model.startTime = model.startTime < this.MinTime
|
||||||
|
? this.MinTime
|
||||||
|
: model.startTime > this.MaxTime
|
||||||
|
? this.MaxTime
|
||||||
|
: model.startTime;
|
||||||
|
|
||||||
|
model.endTime = model.endTime < this.MinTime
|
||||||
|
? this.MinTime
|
||||||
|
: model.endTime > this.MaxTime
|
||||||
|
? this.MaxTime
|
||||||
|
: model.endTime;
|
||||||
|
}
|
||||||
|
return model;
|
||||||
|
},
|
||||||
|
|
||||||
/** 检查公里表是否超出范围*/
|
/** 检查公里表是否超出范围*/
|
||||||
limitAreaKmRange(stations, model) {
|
limitAreaKmRange(stations, model) {
|
||||||
const closerKmRange = model.closerKmRange;
|
const closerKmRange = model.closerKmRange;
|
||||||
const fartherKmRange = model.fartherKmRange;
|
const fartherKmRange = model.fartherKmRange;
|
||||||
const length = stations.length;
|
const length = stations.length;
|
||||||
|
const first = stations[0]||{};
|
||||||
const last = stations[length-1]||{};
|
const last = stations[length-1]||{};
|
||||||
const minRange = -this.EdgeHeight/2;
|
const minRange = first.kmRange-this.EdgeHeight;
|
||||||
const maxRange = last.kmRange;
|
const maxRange = last.kmRange;
|
||||||
const tolerant = 0;
|
const tolerant = 0;
|
||||||
|
|
||||||
|
@ -52,6 +52,8 @@ export function createRectArea(opt, style={}) {
|
|||||||
point1: opt.point1,
|
point1: opt.point1,
|
||||||
point2: opt.point2,
|
point2: opt.point2,
|
||||||
model: opt.model,
|
model: opt.model,
|
||||||
|
culling: true,
|
||||||
|
progressive: true,
|
||||||
shape: {
|
shape: {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
@ -96,10 +98,13 @@ export function createMarkLineModels(stations, computedYaxis) {
|
|||||||
show: true,
|
show: true,
|
||||||
position: 'start',
|
position: 'start',
|
||||||
formatter: elem.name,
|
formatter: elem.name,
|
||||||
color: 'black'
|
color: elem.transferable ? '#000': '#000',
|
||||||
|
backgroundColor: elem.transferable ? '#008800': '',
|
||||||
|
padding: [5,3,3,3],
|
||||||
},
|
},
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
type: 'solid',
|
type: 'solid',
|
||||||
|
color: elem.transferable? '#008800': '#000',
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
opacity: 0.5
|
opacity: 0.5
|
||||||
},
|
},
|
||||||
|
@ -14,121 +14,233 @@ export default {
|
|||||||
ExcelConfig: {
|
ExcelConfig: {
|
||||||
beginRow: 1,
|
beginRow: 1,
|
||||||
beginCol: 0,
|
beginCol: 0,
|
||||||
|
fieldNum: 10,
|
||||||
|
trainId: '车次号',
|
||||||
|
columns: ['备注', '车次号']
|
||||||
|
// beginRow: 1,
|
||||||
|
// beginCol: 0,
|
||||||
// fieldNum: 10,
|
// fieldNum: 10,
|
||||||
columns: {
|
// columns: {
|
||||||
'默认上行折返轨': { key: 'upTrack', formatter: (val) => { return val; } },
|
// '默认上行折返轨': { key: 'upTrack', formatter: (val) => { return val; } },
|
||||||
'默认下行折返轨': { key: 'downTrack', formatter: (val) => { return val; } }
|
// '默认下行折返轨': { key: 'downTrack', formatter: (val) => { return val; } }
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// /** 解析exal数据转换为Json后台数据*/
|
||||||
|
// importData(Sheet, JsonData) {
|
||||||
|
// const dataList = convertSheetToList(Sheet, true);
|
||||||
|
// const needList = Object.keys(this.ExcelConfig.columns);
|
||||||
|
// const tripObj = { upTrack: '', downTrack: '' };
|
||||||
|
// if (dataList && dataList.length && dataList[1] && dataList[0]) {
|
||||||
|
// const tIndex = dataList.findIndex(it => { return it[0]; });
|
||||||
|
// if (dataList[0][0] == needList[0] && dataList[1][0] == needList[1]) {
|
||||||
|
// for (var colIndex = this.ExcelConfig.beginCol; colIndex < dataList.length; colIndex += 1) {
|
||||||
|
// var isContinue = true;
|
||||||
|
|
||||||
|
// for (var rowIndex = this.ExcelConfig.beginRow; isContinue; rowIndex += 1) {
|
||||||
|
// isContinue = false;
|
||||||
|
|
||||||
|
// var title = dataList[colIndex][0];
|
||||||
|
// var value = dataList[colIndex][rowIndex];
|
||||||
|
|
||||||
|
// if (title && value) {
|
||||||
|
// // 数据列解析
|
||||||
|
// isContinue = true;
|
||||||
|
// var titleStr = `${title}`.replace(/\s*/g, '');
|
||||||
|
// var valueStr = `${value}`.replace(/\s*/g, '');
|
||||||
|
|
||||||
|
// // 取需要的字段
|
||||||
|
// if (needList.findIndex(elem => { return elem == titleStr; }) >= 0) {
|
||||||
|
// tripObj[this.ExcelConfig.columns[titleStr].key] = this.ExcelConfig.columns[titleStr].formatter(valueStr);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// /** 解析二维数组为json对象*/
|
||||||
|
// const reg0 = /^[↑|↓|¡|ü|ý|]+(.*)/; // ↑|↓
|
||||||
|
// const reg1 = /^([▼|▲|¡ø|¨]+)\s*(\d+:\d+:\d+)/; // ▲ 06:10:00
|
||||||
|
// const reg2 = /^(\d+:\d+:\d+)\s*([▼|▲|¡ø|¨]+)/; // 06:10:00 ▲
|
||||||
|
// const reg3 = /^(\d+:\d+:\d+)\s*(\d+:\d+:\d+|)/; // 06:10:00 06:12:00
|
||||||
|
// const reg4 = /[▼|▲|¡|ø|¨|]+/; // ▲
|
||||||
|
|
||||||
|
// dataList.forEach((elem, i) => {
|
||||||
|
// var begin = -1;
|
||||||
|
// /** 跳过名称所在的行*/
|
||||||
|
// if (i != tIndex && elem && elem.length > 0) {
|
||||||
|
// elem.forEach((item, j) => {
|
||||||
|
// /** 过滤空值*/
|
||||||
|
// if (item) {
|
||||||
|
// var value = `${item}`.trim();
|
||||||
|
// var title = `${dataList[tIndex][j]}`.replace(/\s*/g, '');
|
||||||
|
// /** 匹配到开始位置或者结束位置*/
|
||||||
|
// if (reg0.test(value)) {
|
||||||
|
// if (begin == -1) {
|
||||||
|
// begin = value; // 设置初始索引
|
||||||
|
// JsonData.push({
|
||||||
|
// code: reg0.exec(value)[1],
|
||||||
|
// arrivalList: []
|
||||||
|
// });
|
||||||
|
// } else if (begin === value) {
|
||||||
|
// begin = -1; // 清空初始索引
|
||||||
|
// }
|
||||||
|
// } else if (begin !== -1) {
|
||||||
|
// /** 匹配到中间位置*/
|
||||||
|
// var begTime, endTime;
|
||||||
|
// var runFlag = JsonData[JsonData.length - 1].code[2];
|
||||||
|
// var stationName = title.replace(/\s/, '');
|
||||||
|
// var need = false;
|
||||||
|
// var flag = false;
|
||||||
|
// if (reg1.test(value)) {
|
||||||
|
// /** 含有特殊字符的时间格式*/
|
||||||
|
// [, begTime, endTime] = reg1.exec(value);
|
||||||
|
|
||||||
|
// begTime = reg4.test(begTime) ? '' : begTime;
|
||||||
|
// endTime = reg4.test(endTime) ? '' : endTime;
|
||||||
|
|
||||||
|
// /** 下行方向时间互换*/
|
||||||
|
// if (runFlag === '2') {
|
||||||
|
// [begTime, endTime] = [endTime, begTime];
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /** 设置标志*/
|
||||||
|
// [need, flag] = [true, true];
|
||||||
|
// } else if (reg2.test(value)) {
|
||||||
|
// /** 含有特殊字符的时间格式*/
|
||||||
|
// [, begTime, endTime] = reg2.exec(value);
|
||||||
|
|
||||||
|
// begTime = reg4.test(begTime) ? '' : begTime;
|
||||||
|
// endTime = reg4.test(endTime) ? '' : endTime;
|
||||||
|
|
||||||
|
// /** 下行方向时间互换*/
|
||||||
|
// if (runFlag === '2') {
|
||||||
|
// [begTime, endTime] = [endTime, begTime];
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /** 设置标志*/
|
||||||
|
// [need, flag] = [true, true];
|
||||||
|
// } else if (reg3.test(value)) {
|
||||||
|
// /** 正常时间格式*/
|
||||||
|
// [, begTime, endTime] = reg3.exec(value);
|
||||||
|
|
||||||
|
// /** 如果只存在一个数据时,则开始和结束设置一样*/
|
||||||
|
// endTime = endTime || begTime;
|
||||||
|
|
||||||
|
// /** 下行方向时间互换*/
|
||||||
|
// if (runFlag === '2') {
|
||||||
|
// [begTime, endTime] = [endTime, begTime];
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /** 设置标志*/
|
||||||
|
// [need, flag] = [true, false];
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /** 添加json数据*/
|
||||||
|
// if (need) { // 储存非空 数据
|
||||||
|
// var stationObj = {
|
||||||
|
// stationName: stationName
|
||||||
|
// };
|
||||||
|
|
||||||
|
// if (begTime) { stationObj['arriveTime'] = prefixTime(begTime); }
|
||||||
|
// if (endTime) { stationObj['departureTime'] = prefixTime(endTime); }
|
||||||
|
// if (flag) { stationObj['flag'] = flag; } // 是否转换轨
|
||||||
|
// JsonData[JsonData.length - 1].arrivalList.push(stationObj);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// JsonData.forEach(item => {
|
||||||
|
// item['upTrack'] = tripObj.upTrack;
|
||||||
|
// item['downTrack'] = tripObj.downTrack;
|
||||||
|
// });
|
||||||
|
|
||||||
|
// return JsonData;
|
||||||
|
// },
|
||||||
/** 解析exal数据转换为Json后台数据*/
|
/** 解析exal数据转换为Json后台数据*/
|
||||||
importData(Sheet, JsonData) {
|
importData(Sheet, JsonData) {
|
||||||
const dataList = convertSheetToList(Sheet, true);
|
const dataList = convertSheetToList(Sheet, true);
|
||||||
const needList = Object.keys(this.ExcelConfig.columns);
|
|
||||||
const tripObj = { upTrack: '', downTrack: '' };
|
|
||||||
if (dataList && dataList.length && dataList[1] && dataList[0]) {
|
if (dataList && dataList.length && dataList[1] && dataList[0]) {
|
||||||
const tIndex = dataList.findIndex(it => { return it[0]; });
|
const tIndex = 8; // 设置不用过滤行数
|
||||||
if (dataList[0][0] == needList[0] && dataList[1][0] == needList[1]) {
|
|
||||||
for (var colIndex = this.ExcelConfig.beginCol; colIndex < dataList.length; colIndex += 1) {
|
|
||||||
var isContinue = true;
|
|
||||||
|
|
||||||
for (var rowIndex = this.ExcelConfig.beginRow; isContinue; rowIndex += 1) {
|
|
||||||
isContinue = false;
|
|
||||||
|
|
||||||
var title = dataList[colIndex][0];
|
|
||||||
var value = dataList[colIndex][rowIndex];
|
|
||||||
|
|
||||||
if (title && value) {
|
|
||||||
// 数据列解析
|
|
||||||
isContinue = true;
|
|
||||||
var titleStr = `${title}`.replace(/\s*/g, '');
|
|
||||||
var valueStr = `${value}`.replace(/\s*/g, '');
|
|
||||||
|
|
||||||
// 取需要的字段
|
|
||||||
if (needList.findIndex(elem => { return elem == titleStr; }) >= 0) {
|
|
||||||
tripObj[this.ExcelConfig.columns[titleStr].key] = this.ExcelConfig.columns[titleStr].formatter(valueStr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
/** 解析二维数组为json对象*/
|
/** 解析二维数组为json对象*/
|
||||||
const reg0 = /^[↑|↓|¡|ü|ý|]+(.*)/; // ↑|↓
|
const reg3 = /^(\d+:\d+:\d+|)/; // 06:12:00
|
||||||
const reg1 = /^([▼|▲|¡ø|¨]+)\s*(\d+:\d+:\d+)/; // ▲ 06:10:00
|
|
||||||
const reg2 = /^(\d+:\d+:\d+)\s*([▼|▲|¡ø|¨]+)/; // 06:10:00 ▲
|
|
||||||
const reg3 = /^(\d+:\d+:\d+)\s*(\d+:\d+:\d+|)/; // 06:10:00 06:12:00
|
|
||||||
const reg4 = /[▼|▲|¡|ø|¨|]+/; // ▲
|
const reg4 = /[▼|▲|¡|ø|¨|]+/; // ▲
|
||||||
|
|
||||||
dataList.forEach((elem, i) => {
|
dataList.forEach((elem, i) => {
|
||||||
var begin = -1;
|
var begin = -1;
|
||||||
/** 跳过名称所在的行*/
|
/** 跳过名称所在的行*/
|
||||||
if (i != tIndex && elem && elem.length > 0) {
|
if (i != tIndex && elem && elem.length > 0) {
|
||||||
elem.forEach((item, j) => {
|
let flag = false;
|
||||||
/** 过滤空值*/
|
let param = { begTime: '', endTime: '' };
|
||||||
if (item) {
|
if (i > tIndex) { elem.reverse(); }
|
||||||
|
let interval = 1;
|
||||||
|
for (let j = 0; j < elem.length;) {
|
||||||
|
const item = elem[j];
|
||||||
|
let title = '';
|
||||||
var value = `${item}`.trim();
|
var value = `${item}`.trim();
|
||||||
var title = `${dataList[tIndex][j]}`.replace(/\s*/g, '');
|
if (i > tIndex) { // 上行线
|
||||||
|
title = `${dataList[tIndex][dataList[tIndex].length - j - 1]}`.replace(/\s*/g, '');
|
||||||
|
if (title == 'undefined') {
|
||||||
|
title = `${dataList[tIndex][dataList[tIndex].length - j - 2]}`.replace(/\s*/g, '');
|
||||||
|
}
|
||||||
|
} else { // 下行线
|
||||||
|
title = `${dataList[tIndex][j]}`.replace(/\s*/g, '');
|
||||||
|
if (title == 'undefined') {
|
||||||
|
title = `${dataList[tIndex][j - 1]}`.replace(/\s*/g, '');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** 匹配到开始位置或者结束位置*/
|
/** 匹配到开始位置或者结束位置*/
|
||||||
if (reg0.test(value)) {
|
if (title == this.ExcelConfig.trainId && value != 'undefined') {
|
||||||
if (begin == -1) {
|
if (begin == -1) {
|
||||||
|
interval = 2;
|
||||||
|
flag = true;
|
||||||
begin = value; // 设置初始索引
|
begin = value; // 设置初始索引
|
||||||
JsonData.push({
|
JsonData.push({
|
||||||
code: reg0.exec(value)[1],
|
code: value,
|
||||||
|
destinationCode: '',
|
||||||
arrivalList: []
|
arrivalList: []
|
||||||
});
|
});
|
||||||
} else if (begin === value) {
|
} else if (flag) {
|
||||||
|
interval = 1;
|
||||||
begin = -1; // 清空初始索引
|
begin = -1; // 清空初始索引
|
||||||
|
JsonData[JsonData.length - 1].destinationCode = value;
|
||||||
|
flag = false;
|
||||||
}
|
}
|
||||||
|
} else if (title == this.ExcelConfig.columns[0]) {
|
||||||
|
interval = 1;
|
||||||
} else if (begin !== -1) {
|
} else if (begin !== -1) {
|
||||||
|
const item1 = `${elem[j]}`.trim();
|
||||||
|
const item2 = `${elem[j + 1]}`.trim();
|
||||||
|
if (item1 != 'undefined' || item2 != 'undefined') {
|
||||||
/** 匹配到中间位置*/
|
/** 匹配到中间位置*/
|
||||||
var begTime, endTime;
|
|
||||||
var runFlag = JsonData[JsonData.length - 1].code[2];
|
|
||||||
var stationName = title.replace(/\s/, '');
|
var stationName = title.replace(/\s/, '');
|
||||||
var need = false;
|
const flag = reg3.test(item1) || reg3.test(item2);
|
||||||
var flag = false;
|
if (this.ExcelConfig.columns.indexOf(stationName) == -1 && flag) {
|
||||||
if (reg1.test(value)) {
|
let need = false;
|
||||||
/** 含有特殊字符的时间格式*/
|
if (value.split(':')[0] == '24') { // 24:XX:XX 类似这种数据 变24为00
|
||||||
[, begTime, endTime] = reg1.exec(value);
|
const arr = value.split(':');
|
||||||
|
arr[0] = '00';
|
||||||
begTime = reg4.test(begTime) ? '' : begTime;
|
value = arr.join(':');
|
||||||
endTime = reg4.test(endTime) ? '' : endTime;
|
}
|
||||||
|
const item1 = elem[j] ? `${elem[j]}`.trim() : '';
|
||||||
/** 下行方向时间互换*/
|
const item2 = elem[j + 1] ? `${elem[j + 1]}`.trim() : '';
|
||||||
if (runFlag === '2') {
|
if (item1 && item2) {
|
||||||
[begTime, endTime] = [endTime, begTime];
|
param.begTime = item1;
|
||||||
|
param.endTime = item2;
|
||||||
|
} else if (item1 && !item2) {
|
||||||
|
param.begTime = item1;
|
||||||
|
param.endTime = item1;
|
||||||
|
} else if (!item1 && item2) {
|
||||||
|
param.begTime = item2;
|
||||||
|
param.endTime = item2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 设置标志*/
|
if (param.begTime && param.endTime) {
|
||||||
[need, flag] = [true, true];
|
need = true;
|
||||||
} else if (reg2.test(value)) {
|
|
||||||
/** 含有特殊字符的时间格式*/
|
|
||||||
[, begTime, endTime] = reg2.exec(value);
|
|
||||||
|
|
||||||
begTime = reg4.test(begTime) ? '' : begTime;
|
|
||||||
endTime = reg4.test(endTime) ? '' : endTime;
|
|
||||||
|
|
||||||
/** 下行方向时间互换*/
|
|
||||||
if (runFlag === '2') {
|
|
||||||
[begTime, endTime] = [endTime, begTime];
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 设置标志*/
|
|
||||||
[need, flag] = [true, true];
|
|
||||||
} else if (reg3.test(value)) {
|
|
||||||
/** 正常时间格式*/
|
|
||||||
[, begTime, endTime] = reg3.exec(value);
|
|
||||||
|
|
||||||
/** 如果只存在一个数据时,则开始和结束设置一样*/
|
|
||||||
endTime = endTime || begTime;
|
|
||||||
|
|
||||||
/** 下行方向时间互换*/
|
|
||||||
if (runFlag === '2') {
|
|
||||||
[begTime, endTime] = [endTime, begTime];
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 设置标志*/
|
|
||||||
[need, flag] = [true, false];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 添加json数据*/
|
/** 添加json数据*/
|
||||||
@ -136,24 +248,25 @@ export default {
|
|||||||
var stationObj = {
|
var stationObj = {
|
||||||
stationName: stationName
|
stationName: stationName
|
||||||
};
|
};
|
||||||
|
if (reg4.test(param.begTime)) {
|
||||||
if (begTime) { stationObj['arriveTime'] = prefixTime(begTime); }
|
param.begTime = '';
|
||||||
if (endTime) { stationObj['departureTime'] = prefixTime(endTime); }
|
}
|
||||||
if (flag) { stationObj['flag'] = flag; } // 是否转换轨
|
if (reg4.test(param.endTime)) {
|
||||||
|
param.endTime = '';
|
||||||
|
}
|
||||||
|
stationObj['arriveTime'] = prefixTime(param.begTime);
|
||||||
|
stationObj['departureTime'] = prefixTime(param.endTime);
|
||||||
JsonData[JsonData.length - 1].arrivalList.push(stationObj);
|
JsonData[JsonData.length - 1].arrivalList.push(stationObj);
|
||||||
|
param = { begTime: '', endTime: '' };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
j = j + interval;
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
JsonData.forEach(item => {
|
|
||||||
item['upTrack'] = tripObj.upTrack;
|
|
||||||
item['downTrack'] = tripObj.downTrack;
|
|
||||||
});
|
|
||||||
|
|
||||||
return JsonData;
|
return JsonData;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -36,9 +36,9 @@
|
|||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<div class="nav-border">
|
<div class="nav-border">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6"><el-button style="width: 80px;" plain :style="{background: level === 'A'? '#F00': '#FFF' }" @click="clearLevel">A级警报</el-button></el-col>
|
<el-col :span="6"><el-button style="width: 80px;" :style="{background:levelList.includes('A')?'#F00':'#FFF' }" plain :class="{'headerBox' :levelList.includes('A')}" @click="showLowAlarm('A')">A级警报</el-button></el-col>
|
||||||
<el-col :span="6"><el-button style="width: 80px;" plain :style="{background: level === 'B'? '#F00': '#FFF' }" @click="clearLevel">B级警报</el-button></el-col>
|
<el-col :span="6"><el-button style="width: 80px;" :style="{background:levelList.includes('B')?'#F00':'#FFF' }" plain :class="{'headerBox' :levelList.includes('B')}" @click="showLowAlarm('B')">B级警报</el-button></el-col>
|
||||||
<el-col :span="6"><el-button style="width: 80px;" plain :style="{background: level === 'C'? '#F00': '#FFF' }" @click="clearLevel">C级警报</el-button></el-col>
|
<el-col :span="6"><el-button style="width: 80px;" :style="{background:levelList.includes('C')?'#F00':'#FFF' }" plain :class="{'headerBox' :levelList.includes('C')}" @click="showLowAlarm('C')">C级警报</el-button></el-col>
|
||||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">记录</el-button></el-col>
|
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">记录</el-button></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -107,13 +107,13 @@
|
|||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<div style="width: calc(100% - 10px);border: 2px solid #DDD9CA;border-radius: 5px;">
|
<div style="width: calc(100% - 10px);border: 2px solid #DDD9CA;border-radius: 5px;">
|
||||||
<el-row style="height: 68px;display: flex; justify-content: space-between;align-items: center;">
|
<el-row style="height: 68px;display: flex; justify-content: space-between;align-items: center;">
|
||||||
<div style="width: 40px;" class="div-simulate-button" :style="{background: level === 'A'? '#F00': '#FFF' }" @click="clearLevel">A</div>
|
<div style="width: 40px;" class="div-simulate-button" :class="{'headerBox' :levelList.includes('A')}" @click="showHimAlarm('A')">A</div>
|
||||||
<div style="width: 40px;" class="div-simulate-button" :style="{background: level === 'B'? '#F00': '#FFF' }" @click="clearLevel">B</div>
|
<div style="width: 40px;" class="div-simulate-button" :class="{'headerBox' :levelList.includes('B')}" @click="showHimAlarm('B')">B</div>
|
||||||
<div style="width: 40px;" class="div-simulate-button" :style="{background: level === 'C'? '#F00': '#FFF' }" @click="clearLevel">C</div>
|
<div style="width: 40px;" class="div-simulate-button" :class="{'headerBox' :levelList.includes('C')}" @click="showHimAlarm('C')">C</div>
|
||||||
<img :src="voiceIcon" style="width: 40px;height: 40px;" @click="controlAudio(false)">
|
<img :src="voiceIcon" style="width: 40px;height: 40px;" @click="controlAudio(false)">
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="button-row">
|
<el-row class="button-row">
|
||||||
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">报警</div>
|
<div style="width: 80px;" class="div-simulate-button" @click="showHimAlarm">报警</div>
|
||||||
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">运图</div>
|
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">运图</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="button-row" style="margin-top: 10px;">
|
<el-row class="button-row" style="margin-top: 10px;">
|
||||||
@ -136,6 +136,8 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||||
|
<alarm-table-low ref="alarmTableLow" />
|
||||||
|
<alarm-table-hmi ref="alarmTableHmi" />
|
||||||
<audio id="buzzer" controls loop="loop" style="width: 0;height: 0">
|
<audio id="buzzer" controls loop="loop" style="width: 0;height: 0">
|
||||||
<source :src="buzzerAudio" type="audio/mpeg">
|
<source :src="buzzerAudio" type="audio/mpeg">
|
||||||
</audio>
|
</audio>
|
||||||
@ -148,11 +150,15 @@ import { EventBus } from '@/scripts/event-bus';
|
|||||||
import voiceOpen from '@/assets/voiceOpen.png';
|
import voiceOpen from '@/assets/voiceOpen.png';
|
||||||
import voiceClose from '@/assets/voiceClose.png';
|
import voiceClose from '@/assets/voiceClose.png';
|
||||||
import BuzzerAudio from '@/assets/buzzer.mp3';
|
import BuzzerAudio from '@/assets/buzzer.mp3';
|
||||||
|
import AlarmTableHmi from './menuDialog/alarmTableHmi';
|
||||||
|
import AlarmTableLow from './menuDialog/alarmTableLow';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MenuBar',
|
name: 'MenuBar',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo,
|
||||||
|
AlarmTableLow,
|
||||||
|
AlarmTableHmi
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -181,7 +187,7 @@ export default {
|
|||||||
version: '',
|
version: '',
|
||||||
centralizedMap: {},
|
centralizedMap: {},
|
||||||
tipContent: [],
|
tipContent: [],
|
||||||
level: '',
|
levelList: [],
|
||||||
sound: false,
|
sound: false,
|
||||||
buzzerAudio: BuzzerAudio
|
buzzerAudio: BuzzerAudio
|
||||||
};
|
};
|
||||||
@ -256,7 +262,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleAlarm(val) {
|
handleAlarm(val) {
|
||||||
this.level = val.level;
|
if (!this.levelList.includes(val.level)) {
|
||||||
|
this.levelList.push(val.level);
|
||||||
|
}
|
||||||
this.controlAudio(true);
|
this.controlAudio(true);
|
||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
@ -342,8 +350,19 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
clearLevel() {
|
showHimAlarm(level) {
|
||||||
this.level = '';
|
const index = this.levelList.indexOf(level);
|
||||||
|
if (index > -1) {
|
||||||
|
this.levelList.splice(index, 1);
|
||||||
|
}
|
||||||
|
this.$refs.alarmTableHmi.doShow(level);
|
||||||
|
},
|
||||||
|
showLowAlarm(level) {
|
||||||
|
const index = this.levelList.indexOf(level);
|
||||||
|
if (index > -1) {
|
||||||
|
this.levelList.splice(index, 1);
|
||||||
|
}
|
||||||
|
this.$refs.alarmTableLow.doShow(level);
|
||||||
},
|
},
|
||||||
controlAudio(val) {
|
controlAudio(val) {
|
||||||
const audio = document.getElementById('buzzer');
|
const audio = document.getElementById('buzzer');
|
||||||
@ -561,4 +580,32 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content:space-between;
|
justify-content:space-between;
|
||||||
}
|
}
|
||||||
|
@keyframes fade {
|
||||||
|
from {
|
||||||
|
opacity: 1.0;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes fade {
|
||||||
|
from {
|
||||||
|
opacity: 1.0;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.headerBox {
|
||||||
|
background: #f00;
|
||||||
|
animation: fade 600ms infinite;
|
||||||
|
-webkit-animation: fade 600ms infinite;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -58,11 +58,9 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
|
|||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { TrainingMode } from '@/scripts/ConstDic';
|
import { TrainingMode } from '@/scripts/ConstDic';
|
||||||
import AlarmTable from './menuDialog/alarmTable';
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
AlarmTable
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
|
@ -1,61 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog v-dialogDrag class="haerbin-01__systerm manage-user" :title="title" :visible.sync="show" width="420px" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
|
||||||
<div>
|
|
||||||
<el-table
|
|
||||||
:data="tableData"
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-table-column prop="time" label="日期/时间" />
|
|
||||||
<el-table-column prop="level" label="等级" />
|
|
||||||
<el-table-column prop="address" label="设备类型" />
|
|
||||||
<el-table-column prop="address" label="设备编号" />
|
|
||||||
<el-table-column prop="address" label="故障号" />
|
|
||||||
<el-table-column prop="address" label="故障描述" />
|
|
||||||
<el-table-column prop="address" label="已恢复" />
|
|
||||||
<el-table-column prop="address" label="恢复时间" />
|
|
||||||
<el-table-column prop="address" label="已确认" />
|
|
||||||
<el-table-column prop="address" label="确认人" />
|
|
||||||
<el-table-column prop="address" label="确认时间" />
|
|
||||||
<el-table-column prop="address" label="备注信息" />
|
|
||||||
<el-table-column />
|
|
||||||
</el-table>
|
|
||||||
<el-pagination
|
|
||||||
:current-page="currentPage"
|
|
||||||
:page-sizes="20"
|
|
||||||
layout="total, prev, pager, next, jumper"
|
|
||||||
:total="totalNum"
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'Alarm',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
tableData: [],
|
|
||||||
currentPage: 0,
|
|
||||||
totalNum: 0,
|
|
||||||
show: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods:{
|
|
||||||
doShow() {
|
|
||||||
this.show = true;
|
|
||||||
},
|
|
||||||
handleSizeChange() {
|
|
||||||
|
|
||||||
},
|
|
||||||
handleCurrentChange() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
156
src/jmapNew/theme/haerbin_01/menus/menuDialog/alarmTableHmi.vue
Normal file
156
src/jmapNew/theme/haerbin_01/menus/menuDialog/alarmTableHmi.vue
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-dialogDrag class="haerbin-01__systerm manage-user" title="报警列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<div style="text-align: left;width: 90%;margin-left: 5%;border: 1px solid #808080;border-radius: 5px;padding: 10px;">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="10" style="text-align: center;">
|
||||||
|
<div style="display: inline-block;margin-right: 5px;">开始时间:</div>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="startTime"
|
||||||
|
size="small"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="选择日期时间"
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10" style="text-align: center;">
|
||||||
|
<div style="display: inline-block;margin-right: 5px;margin-left: 10px;">结束时间:</div>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="endTime"
|
||||||
|
size="small"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="选择日期时间"
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4" style="text-align: center;">
|
||||||
|
<el-button style="margin-left: 10px;" @click="queryData(true)">查询</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="10" style="text-align: center;">
|
||||||
|
<div style="display: inline-block;margin-right: 5px;">设备编号:</div>
|
||||||
|
<el-input v-model="deviceCode" placeholder="请输入内容" style="width:220px;" size="small" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10" style="text-align: center;">
|
||||||
|
<div style="display: inline-block;margin-right: 5px;margin-left: 10px;">元素编号:</div>
|
||||||
|
<el-input v-model="elementCode" placeholder="请输入内容" style="width:220px;" size="small" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4" style="text-align: center;">
|
||||||
|
<el-button style="margin-left: 10px;" @click="queryData(false)">撤销查询</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div style="position: relative;height: 20px;line-height: 20px;top: -120px;text-align: left;right: -80px;background: #F0F0F0;width: 88px;">筛选条件查询</div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-button @click="infoConfirm">消息确认</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-button :disabled="true">消息打印</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-button :disabled="true">删除备注</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-table
|
||||||
|
:data="totalData"
|
||||||
|
style="width: 100%"
|
||||||
|
height="450"
|
||||||
|
>
|
||||||
|
<el-table-column prop="operate" label="操作">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-checkbox v-model="checkList[scope.$index]" @change="operateChange(scope)" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="level" label="报警级别" />
|
||||||
|
<el-table-column prop="time" label="日期/时间" width="150px" />
|
||||||
|
<el-table-column prop="code" label="报警序号" />
|
||||||
|
<el-table-column prop="deviceCode" label="设备编号" />
|
||||||
|
<el-table-column prop="address" label="信号编号" />
|
||||||
|
<el-table-column prop="address" label="元素编号" />
|
||||||
|
<el-table-column prop="confirmed" label="确认">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.confirmed? 'Y':'N' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="confirmedUserName" label="确认人编号" width="120px" />
|
||||||
|
<el-table-column prop="confirmTime" label="确认时间" width="150px" />
|
||||||
|
<el-table-column prop="recover" label="恢复">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.recover? 'Y':'N' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="address" label="恢复时间" />
|
||||||
|
<el-table-column prop="address" label="备注信息" width="200px" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getAlarmList, confirmAlarm} from '@/api/simulation';
|
||||||
|
export default {
|
||||||
|
name: 'AlarmHmi',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
currentPage: 1,
|
||||||
|
show: false,
|
||||||
|
level: '',
|
||||||
|
startTime: '',
|
||||||
|
endTime: '',
|
||||||
|
deviceCode: '',
|
||||||
|
elementCode: '',
|
||||||
|
totalData: [],
|
||||||
|
checkList: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed:{
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
doShow(level) {
|
||||||
|
this.show = true;
|
||||||
|
this.level = level;
|
||||||
|
this.queryData(false);
|
||||||
|
},
|
||||||
|
handleClose() {
|
||||||
|
this.level = '';
|
||||||
|
this.startTime = '';
|
||||||
|
this.endTime = '';
|
||||||
|
this.show = false;
|
||||||
|
},
|
||||||
|
operateChange(row) {
|
||||||
|
},
|
||||||
|
queryData(flag) {
|
||||||
|
if (!flag) {
|
||||||
|
this.endTime = '';
|
||||||
|
this.startTime = '';
|
||||||
|
this.deviceCode = '';
|
||||||
|
this.elementCode = '';
|
||||||
|
}
|
||||||
|
const params = { level: this.level, startTime: this.startTime, endTime:this.endTime };
|
||||||
|
getAlarmList(this.$route.query.group, params).then(resp => {
|
||||||
|
this.totalData = resp.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
infoConfirm() {
|
||||||
|
const codes = [];
|
||||||
|
this.checkList.forEach((check, index) => {
|
||||||
|
if (check) {
|
||||||
|
codes.push(this.totalData[index].code);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
confirmAlarm(this.$route.query.group, codes).then(resp => {
|
||||||
|
this.queryData(true);
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message.error('确认消息失败!');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
/deep/ .el-dialog .el-input {
|
||||||
|
border: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
112
src/jmapNew/theme/haerbin_01/menus/menuDialog/alarmTableLow.vue
Normal file
112
src/jmapNew/theme/haerbin_01/menus/menuDialog/alarmTableLow.vue
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-dialogDrag class="haerbin-01__systerm manage-user" title="报警列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<div style="text-align: left;">
|
||||||
|
<div style="display: inline-block;margin-right: 5px;">开始时间:</div>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="startTime"
|
||||||
|
size="small"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="选择日期时间"
|
||||||
|
/>
|
||||||
|
<div style="display: inline-block;margin-right: 5px;margin-left: 10px;">结束时间:</div>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="endTime"
|
||||||
|
size="small"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="选择日期时间"
|
||||||
|
/>
|
||||||
|
<el-button style="margin-left: 10px;" @click="queryData">查询</el-button>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
:data="totalData"
|
||||||
|
style="width: 100%"
|
||||||
|
height="600"
|
||||||
|
>
|
||||||
|
<el-table-column prop="time" label="日期/时间" width="150px" />
|
||||||
|
<el-table-column prop="level" label="等级" />
|
||||||
|
<el-table-column prop="deviceCode" label="设备类型">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ handleDeviceType(scope.row.deviceCode) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="deviceCode" label="设备编号" />
|
||||||
|
<el-table-column prop="code" label="故障号" />
|
||||||
|
<el-table-column prop="description" label="故障描述" />
|
||||||
|
<el-table-column prop="recover" label="已恢复">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-checkbox v-model="scope.row.recover" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="address" label="恢复时间" />
|
||||||
|
<el-table-column prop="confirm" label="已确认">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-checkbox v-model="scope.row.confirmed" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="confirmedUserName" label="确认人" />
|
||||||
|
<el-table-column prop="confirmTime" label="确认时间" width="150px" />
|
||||||
|
<el-table-column prop="address" label="备注信息" width="200px" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getAlarmList} from '@/api/simulation';
|
||||||
|
import {deviceType} from '@/scripts/cmdPlugin/Config';
|
||||||
|
export default {
|
||||||
|
name: 'AlarmLow',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
currentPage: 1,
|
||||||
|
show: false,
|
||||||
|
level: '',
|
||||||
|
startTime: '',
|
||||||
|
endTime: '',
|
||||||
|
totalData: [],
|
||||||
|
tableData: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed:{
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
startTime() {
|
||||||
|
this.queryData();
|
||||||
|
},
|
||||||
|
endTime() {
|
||||||
|
this.queryData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
doShow(level) {
|
||||||
|
this.show = true;
|
||||||
|
this.level = level;
|
||||||
|
this.queryData();
|
||||||
|
},
|
||||||
|
handleClose() {
|
||||||
|
this.level = '';
|
||||||
|
this.startTime = '';
|
||||||
|
this.endTime = '';
|
||||||
|
this.show = false;
|
||||||
|
},
|
||||||
|
queryData() {
|
||||||
|
const params = { level: this.level, startTime: this.startTime, endTime:this.endTime };
|
||||||
|
getAlarmList(this.$route.query.group, params).then(resp => {
|
||||||
|
this.totalData = resp.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDeviceType(code) {
|
||||||
|
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
|
return deviceType[device.type];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
/deep/ .el-dialog .el-input {
|
||||||
|
border: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
@ -19,18 +19,18 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">服务号</el-col>
|
<el-col :span="11">车次号</el-col>
|
||||||
<el-col :span="11" :offset="2">序列号</el-col>
|
<el-col :span="11" :offset="2">服务号</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-input :id="domIdServerNoChange" v-model="addModel.serviceNumber" size="mini" />
|
|
||||||
<div style="color:red;font-size:13px;margin-top:5px;">{{ messageTip1 }}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input :id="domIdTrainNoChange" v-model="addModel.tripNumber" size="mini" />
|
<el-input :id="domIdTrainNoChange" v-model="addModel.tripNumber" size="mini" />
|
||||||
<div style="color:red;font-size:13px;margin-top:5px;">{{ messageTip2 }}</div>
|
<div style="color:red;font-size:13px;margin-top:5px;">{{ messageTip2 }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="11" :offset="2">
|
||||||
|
<el-input :id="domIdServerNoChange" v-model="addModel.serviceNumber" size="mini" />
|
||||||
|
<div style="color:red;font-size:13px;margin-top:5px;">{{ messageTip1 }}</div>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
@ -50,6 +50,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||||
|
import {getTrainDetailBytripNumber} from '@/api/simulation';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainSetPlan',
|
name: 'TrainSetPlan',
|
||||||
@ -99,6 +100,13 @@ export default {
|
|||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
this.commit();
|
this.commit();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'addModel.tripNumber': function(val) {
|
||||||
|
if (val.length == 4) {
|
||||||
|
this.trainNoChange(val);
|
||||||
|
} else {
|
||||||
|
this.addModel.serviceNumber = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -127,6 +135,15 @@ export default {
|
|||||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
|
trainNoChange(tripNumber) {
|
||||||
|
getTrainDetailBytripNumber(this.$route.query.group, {tripNumber:tripNumber}).then(resp => {
|
||||||
|
if (resp.data) {
|
||||||
|
this.addModel.serviceNumber = resp.data.serviceNumber;
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message.error('获取列车信息失败!');
|
||||||
|
});
|
||||||
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (!this.addModel.serviceNumber) {
|
if (!this.addModel.serviceNumber) {
|
||||||
this.messageTip1 = '请输入服务号';
|
this.messageTip1 = '请输入服务号';
|
||||||
|
@ -222,13 +222,13 @@ export default {
|
|||||||
|
|
||||||
/** 计算折返点*/
|
/** 计算折返点*/
|
||||||
elem.right = elem.tripNumber[0] == '2';
|
elem.right = elem.tripNumber[0] == '2';
|
||||||
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.right];
|
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.tripNumber, elem.right];
|
||||||
if (serie.data.length > 0) {
|
if (serie.data.length > 0) {
|
||||||
var lastPoint = serie.data[serie.data.length - 1];
|
var lastPoint = serie.data[serie.data.length - 1];
|
||||||
if (lastPoint[2] !== nextPoint[2]) {
|
if (lastPoint[2] !== nextPoint[2]) {
|
||||||
var num = this.computedReentryNumber(elem.tripNumber);
|
var num = this.computedReentryNumber(elem.tripNumber);
|
||||||
serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[2], num), lastPoint[2]]);
|
serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[3], num), lastPoint[3]]);
|
||||||
serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[2], num), lastPoint[2]]);
|
serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[3], num), lastPoint[3]]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,6 @@ function handle(state, data) {
|
|||||||
break;
|
break;
|
||||||
case 'Simulation_Reset': // 仿真-仿真重置消息 退出计划行车
|
case 'Simulation_Reset': // 仿真-仿真重置消息 退出计划行车
|
||||||
state.simulationReset += 1;
|
state.simulationReset += 1;
|
||||||
state.simulationAlarmInfoList = [];
|
|
||||||
break;
|
break;
|
||||||
case 'Simulation_Conversation': // 仿真-用户交互消息(聊天/命令)
|
case 'Simulation_Conversation': // 仿真-用户交互消息(聊天/命令)
|
||||||
handleSimulationInfo(state, msg);
|
handleSimulationInfo(state, msg);
|
||||||
@ -277,8 +276,7 @@ const socket = {
|
|||||||
simulationTimeSync: '', // 仿真时间
|
simulationTimeSync: '', // 仿真时间
|
||||||
simulationIbpStatus: null,
|
simulationIbpStatus: null,
|
||||||
competitionPracticeFinish:0, // 竞赛场景结束标识
|
competitionPracticeFinish:0, // 竞赛场景结束标识
|
||||||
simulationAlarmInfo: {}, // 仿真报警信息
|
simulationAlarmInfo: {} // 仿真报警信息
|
||||||
simulationAlarmInfoList: []
|
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
},
|
},
|
||||||
|
@ -2,11 +2,11 @@ export function getBaseUrl() {
|
|||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// BASE_API = 'https://joylink.club/jlcloud';
|
||||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||||
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.8.144:9000'; // 旭强
|
// BASE_API = 'http://192.168.8.144:9000'; // 旭强
|
||||||
// BASE_API = 'http://192.168.3.175:9000'; // 张赛
|
// BASE_API = 'http://192.168.3.175:9000'; // 张赛
|
||||||
// BASE_API = 'http://192.168.8.110:9000'; // 杜康
|
BASE_API = 'http://192.168.8.110:9000'; // 杜康
|
||||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||||
|
@ -159,8 +159,9 @@ export default {
|
|||||||
if (this.option.optionList[index]) {
|
if (this.option.optionList[index]) {
|
||||||
this.option.optionList[index].content = item;
|
this.option.optionList[index].content = item;
|
||||||
this.option.optionList[index].correct = true;
|
this.option.optionList[index].correct = true;
|
||||||
|
this.option.optionList[index].order = index + 1;
|
||||||
} else {
|
} else {
|
||||||
this.option.optionList[index] = { content: item, correct: true };
|
this.option.optionList[index] = { content: item, correct: true, order: index + 1 };
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (this.option.type === 'answer') {
|
} else if (this.option.type === 'answer') {
|
||||||
|
@ -271,7 +271,9 @@ export default {
|
|||||||
this.formModel.operationScore = row.operationScore;
|
this.formModel.operationScore = row.operationScore;
|
||||||
this.formModel.scriptId = row.scriptId;
|
this.formModel.scriptId = row.scriptId;
|
||||||
getScriptByIdNew(row.scriptId).then(res=>{
|
getScriptByIdNew(row.scriptId).then(res=>{
|
||||||
this.actionList = res.data.actionList;
|
this.actionList = res.data.actionList.filter(action=>{
|
||||||
|
return action.type != 'Exit_Conversation' && action.type != 'Accept_Conversation_Invitation';
|
||||||
|
});
|
||||||
getCompetitionPracticalSceneById(row.id).then(response=>{
|
getCompetitionPracticalSceneById(row.id).then(response=>{
|
||||||
const commandEvaluationRuleVOs = {};
|
const commandEvaluationRuleVOs = {};
|
||||||
if (response.data.commandEvaluationRuleVOs) {
|
if (response.data.commandEvaluationRuleVOs) {
|
||||||
|
@ -58,12 +58,34 @@ export const operateEnum = {
|
|||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
ControlConvertMenu:{
|
ControlConvertMenu:{
|
||||||
|
type:'控制模式',
|
||||||
CM_Apply_For_Station_Control:{
|
CM_Apply_For_Station_Control:{
|
||||||
code:'stationCodes',
|
code:'stationCodes',
|
||||||
isList:true,
|
isList:true,
|
||||||
isDevice:true,
|
isDevice:true,
|
||||||
name:'车站列表',
|
name:'车站列表',
|
||||||
function:getStationNameById
|
function:getStationNameById
|
||||||
|
},
|
||||||
|
CM_Reply_Station_Control:{
|
||||||
|
code:'replyVOList',
|
||||||
|
name:'车站列表',
|
||||||
|
isList:true,
|
||||||
|
isDevice:true,
|
||||||
|
function:getStationResultById
|
||||||
|
},
|
||||||
|
CM_Reply_Center_Control:{
|
||||||
|
code:'replyVOList',
|
||||||
|
name:'车站列表',
|
||||||
|
isList:true,
|
||||||
|
isDevice:true,
|
||||||
|
function:getStationResultById
|
||||||
|
},
|
||||||
|
CM_Apply_For_Center_Control:{
|
||||||
|
code:'stationCodes',
|
||||||
|
isList:true,
|
||||||
|
isDevice:true,
|
||||||
|
name:'车站列表',
|
||||||
|
function:getStationNameById
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Stand:{
|
Stand:{
|
||||||
@ -233,21 +255,19 @@ export function covertOperate(operationType, operationParamMap) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function covertOperation(deviceType, operationParamMap, operationType) {
|
function covertDeviceName(deviceInfo, deviceType) {
|
||||||
let deviceName = '';
|
let deviceName = '';
|
||||||
let paramName = '';
|
const device = store.getters['map/getDeviceByCode'](deviceInfo);
|
||||||
if (operateEnum[deviceType].code) {
|
|
||||||
const device = store.getters['map/getDeviceByCode'](operationParamMap[operateEnum[deviceType].code]);
|
|
||||||
if (device._type == 'StationStand') {
|
if (device._type == 'StationStand') {
|
||||||
const station = store.getters['map/getDeviceByCode'](device.stationCode);
|
const station = store.getters['map/getDeviceByCode'](device.stationCode);
|
||||||
deviceName += '【车站-' + station.name + '】/';
|
deviceName += '车站-' + station.name + '/';
|
||||||
}
|
}
|
||||||
if (device._type == 'Section') {
|
if (device._type == 'Section') {
|
||||||
if (device.parentCode && device.type == '02') {
|
if (device.parentCode && device.type == '02') {
|
||||||
const parentSection = store.getters['map/getDeviceByCode'](device.parentCode);
|
const parentSection = store.getters['map/getDeviceByCode'](device.parentCode);
|
||||||
deviceName += '【' + operateEnum[deviceType].type + ' ' + parentSection.name + '-' + device.name + '】';
|
deviceName += operateEnum[deviceType].type + ' ' + parentSection.name + '-' + device.name;
|
||||||
} else {
|
} else {
|
||||||
deviceName += '【' + operateEnum[deviceType].type + device.name + '】';
|
deviceName += operateEnum[deviceType].type + device.name;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let deviceNameIn = '';
|
let deviceNameIn = '';
|
||||||
@ -256,8 +276,37 @@ function covertOperation(deviceType, operationParamMap, operationType) {
|
|||||||
} else {
|
} else {
|
||||||
deviceNameIn = '(车组号:' + device.groupNumber + ')';
|
deviceNameIn = '(车组号:' + device.groupNumber + ')';
|
||||||
}
|
}
|
||||||
deviceName += '【' + operateEnum[deviceType].type + ' ' + deviceNameIn + '】';
|
deviceName += operateEnum[deviceType].type + ' ' + deviceNameIn;
|
||||||
}
|
}
|
||||||
|
return deviceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
function covertOperation(deviceType, operationParamMap, operationType) {
|
||||||
|
let deviceName = '【';
|
||||||
|
let paramName = '';
|
||||||
|
// debugger;
|
||||||
|
if (operateEnum[deviceType].code) {
|
||||||
|
const deviceInfo = operationParamMap[operateEnum[deviceType].code];
|
||||||
|
if (deviceInfo) {
|
||||||
|
deviceName += covertDeviceName(deviceInfo, deviceType);
|
||||||
|
} else {
|
||||||
|
const deviceCode = operationParamMap[operateEnum[deviceType][operationType].code];
|
||||||
|
const device = store.getters['map/routeList'].find(route=>{ return route.code == deviceCode; });
|
||||||
|
deviceName += covertDeviceName(device.startSignalCode, deviceType);
|
||||||
|
}
|
||||||
|
// if (deviceInfo instanceof Array) {
|
||||||
|
// deviceInfo.forEach((each, index)=>{
|
||||||
|
// deviceName = +covertDeviceName(each, deviceType);
|
||||||
|
// if (index != deviceInfo.length - 1) {
|
||||||
|
// deviceName += ',';
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
|
||||||
|
// }
|
||||||
|
deviceName += '】';
|
||||||
|
} else if (operateEnum[deviceType].type) {
|
||||||
|
deviceName += operateEnum[deviceType].type + '】';
|
||||||
}
|
}
|
||||||
const paramInfo = operateEnum[deviceType][operationType];
|
const paramInfo = operateEnum[deviceType][operationType];
|
||||||
if (paramInfo) {
|
if (paramInfo) {
|
||||||
@ -340,4 +389,10 @@ function getStationNameById(stationId) {
|
|||||||
const station = store.getters['map/getDeviceByCode'](stationId);
|
const station = store.getters['map/getDeviceByCode'](stationId);
|
||||||
return station.name;
|
return station.name;
|
||||||
}
|
}
|
||||||
|
function getStationResultById(stationResult) {
|
||||||
|
const station = store.getters['map/getDeviceByCode'](stationResult.stationCode);
|
||||||
|
let param = '不同意';
|
||||||
|
if (stationResult.agree) { param = '同意'; }
|
||||||
|
return station.name + ' ' + param;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ export default {
|
|||||||
this.$refs.modfiy.doShow(el);
|
this.$refs.modfiy.doShow(el);
|
||||||
},
|
},
|
||||||
onUpdateStation(el) {
|
onUpdateStation(el) {
|
||||||
updateStation(this.lineId, el).then(resp => {
|
updateStation(el.id, el).then(resp => {
|
||||||
this.refreshStationList();
|
this.refreshStationList();
|
||||||
this.$message.success('修改成功。')
|
this.$message.success('修改成功。')
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
@ -39,6 +39,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
drawer: false,
|
drawer: false,
|
||||||
model: {
|
model: {
|
||||||
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
kmRange: 0,
|
kmRange: 0,
|
||||||
transferable: false,
|
transferable: false,
|
||||||
@ -71,6 +72,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
doShow(model) {
|
doShow(model) {
|
||||||
this.model = {
|
this.model = {
|
||||||
|
id: model.id,
|
||||||
name: model.name,
|
name: model.name,
|
||||||
kmRange: model.kmRange,
|
kmRange: model.kmRange,
|
||||||
transferable: model.transferable,
|
transferable: model.transferable,
|
||||||
|
@ -136,7 +136,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.myChart = echarts.init(document.getElementById(this.canvasId));
|
this.myChart = echarts.init(document.getElementById(this.canvasId));
|
||||||
this.myChart.setOption(this.option, {notMerge: true});
|
this.myChart.setOption(this.option, true);
|
||||||
this.reSize({ width: this.width, height: this.height });
|
this.reSize({ width: this.width, height: this.height });
|
||||||
resolve(true);
|
resolve(true);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -151,7 +151,7 @@ export default {
|
|||||||
this.xAxisInit(stations);
|
this.xAxisInit(stations);
|
||||||
this.yAxisInit(stations);
|
this.yAxisInit(stations);
|
||||||
|
|
||||||
this.myChart.setOption(this.option, {notMerge: true});
|
this.myChart.setOption(this.option, true);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$message.info(error.message);
|
this.$message.info(error.message);
|
||||||
@ -171,22 +171,24 @@ export default {
|
|||||||
this.pushModels(option.series, this.planUtil.parseDataToSeries(this.myChart, planData, this.stations));
|
this.pushModels(option.series, this.planUtil.parseDataToSeries(this.myChart, planData, this.stations));
|
||||||
this.pushModels(option.graphic[0].elements, this.planUtil.parseDataToGraph(this.myChart, planData, this.stations));
|
this.pushModels(option.graphic[0].elements, this.planUtil.parseDataToGraph(this.myChart, planData, this.stations));
|
||||||
|
|
||||||
this.myChart.setOption(option, {notMerge: true});
|
this.myChart.setOption(option, true);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$messageBox(error.message);
|
this.$messageBox(error.message);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
xAxisInit(stations) {
|
xAxisInit(stations) {
|
||||||
const option = this.option;
|
const option = this.option;
|
||||||
|
const startValue = this.planUtil.MinTime + this.planUtil.TranslationTime;
|
||||||
|
const endValue = this.planUtil.MaxTime + this.planUtil.TranslationTime;
|
||||||
const list = [];
|
const list = [];
|
||||||
|
|
||||||
for (var time = 0 + this.planUtil.TranslationTime; time <= 3600 * 24 + this.planUtil.TranslationTime; time++) {
|
for (var time = startValue; time <= endValue; time++) {
|
||||||
list.push(time);
|
list.push(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
option.xAxis[0].data = list;
|
option.xAxis[0].data = list;
|
||||||
option.dataZoom[0].startValue = 0 + this.planUtil.TranslationTime;
|
option.dataZoom[0].startValue = this.planUtil.MinTime + this.planUtil.TranslationTime;
|
||||||
option.dataZoom[0].endValue = 3600 * 24 + this.planUtil.TranslationTime;
|
option.dataZoom[0].endValue = this.planUtil.MaxTime + this.planUtil.TranslationTime;
|
||||||
},
|
},
|
||||||
yAxisInit(stations) {
|
yAxisInit(stations) {
|
||||||
const option = this.option;
|
const option = this.option;
|
||||||
@ -254,6 +256,7 @@ export default {
|
|||||||
save_link.href = urlObject.createObjectURL(export_blob);
|
save_link.href = urlObject.createObjectURL(export_blob);
|
||||||
save_link.download = 'plan.png';
|
save_link.download = 'plan.png';
|
||||||
save_link.click();
|
save_link.click();
|
||||||
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="fixed" v-show="show">
|
<div class="fixed" v-show="show">
|
||||||
<textarea :auto-focus="true" v-if="textareaModel.show" v-focus v-model="textareaModel.text" class="fixed-textarea"
|
<textarea :auto-focus="true" v-if="textareaModel.show" v-model="textareaModel.text" class="fixed-textarea"
|
||||||
:style="{ left: rect.x+'px', top: rect.y+'px', width: rect.width+'px', height: rect.height+'px', }"/>
|
:style="{ left: rect.x+'px', top: rect.y+'px', width: rect.width+'px', height: rect.height+'px', }"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -345,6 +345,7 @@ export default {
|
|||||||
this.$refs.schedule.setLineReset();
|
this.$refs.schedule.setLineReset();
|
||||||
this.$refs.schedule.setTargetReset();
|
this.$refs.schedule.setTargetReset();
|
||||||
this.$refs.schedule.clearTrip();
|
this.$refs.schedule.clearTrip();
|
||||||
|
|
||||||
if (this.model.action != 'Translate') {
|
if (this.model.action != 'Translate') {
|
||||||
this.$refs.schedule.clearDraggable();
|
this.$refs.schedule.clearDraggable();
|
||||||
}
|
}
|
||||||
@ -392,6 +393,7 @@ export default {
|
|||||||
},
|
},
|
||||||
doCreatePlan(model) {
|
doCreatePlan(model) {
|
||||||
createRp(model).then(resp => {
|
createRp(model).then(resp => {
|
||||||
|
this.$router.replace({ path: 'AUStool'});
|
||||||
this.$message.success('Run plan group created successfully.')
|
this.$message.success('Run plan group created successfully.')
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$message.info(error.message);
|
this.$message.info(error.message);
|
||||||
|
@ -61,6 +61,8 @@ export default {
|
|||||||
this.myChart.on('mouseover', this.onMouseOver);
|
this.myChart.on('mouseover', this.onMouseOver);
|
||||||
this.myChart.on('mouseout', this.onMouseOut);
|
this.myChart.on('mouseout', this.onMouseOut);
|
||||||
this.myChart.on('datazoom', this.onUpdateZoom);
|
this.myChart.on('datazoom', this.onUpdateZoom);
|
||||||
|
this.myChart.on('rendered', this.onRendered);
|
||||||
|
|
||||||
window.addEventListener('resize', this.onUpdateZoom);
|
window.addEventListener('resize', this.onUpdateZoom);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -72,10 +74,13 @@ export default {
|
|||||||
zr.off('mousedown', this.onZrMouseDown, this);
|
zr.off('mousedown', this.onZrMouseDown, this);
|
||||||
zr.off('mouseup', this.onZrMouseUp, this);
|
zr.off('mouseup', this.onZrMouseUp, this);
|
||||||
zr.off('mouseout', this.onZrMouseOut, this);
|
zr.off('mouseout', this.onZrMouseOut, this);
|
||||||
|
|
||||||
this.myChart.off('click', this.onMouseClick);
|
this.myChart.off('click', this.onMouseClick);
|
||||||
this.myChart.off('mouseover', this.onMouseOver);
|
this.myChart.off('mouseover', this.onMouseOver);
|
||||||
this.myChart.off('mouseout', this.onMouseOut);
|
this.myChart.off('mouseout', this.onMouseOut);
|
||||||
this.myChart.off('datazoom', this.onUpdateZoom);
|
this.myChart.off('datazoom', this.onUpdateZoom);
|
||||||
|
this.myChart.off('rendered', this.onRendered);
|
||||||
|
|
||||||
window.removeEventListener('resize', this.onUpdateZoom);
|
window.removeEventListener('resize', this.onUpdateZoom);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -194,6 +199,44 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
onRendered(e) {
|
||||||
|
const mw = this.myChart.getWidth()-100;
|
||||||
|
|
||||||
|
const view = this.myChart.getViewOfComponentModel({__viewId: "_ec_shape_graphic"});
|
||||||
|
if (view.group) {
|
||||||
|
view.group.eachChild(el => {
|
||||||
|
if (['area'].includes(el.subType)) {
|
||||||
|
const position1 = this.myChart.convertToPixel('grid', el.point1);
|
||||||
|
const position2 = this.myChart.convertToPixel('grid', el.point2);
|
||||||
|
const oldWidth = Math.abs(position2[0]-position1[0]);
|
||||||
|
const x = el.position[0] < 160
|
||||||
|
? 160 - el.position[0]
|
||||||
|
: 0;
|
||||||
|
const dw = el.position[0] + oldWidth > mw
|
||||||
|
? el.position[0] + oldWidth - mw
|
||||||
|
: x;
|
||||||
|
|
||||||
|
const width = oldWidth-dw;
|
||||||
|
|
||||||
|
if (width < 0 || x > mw) {
|
||||||
|
el.hide();
|
||||||
|
} else {
|
||||||
|
el.setShape({x,width})
|
||||||
|
el.show();
|
||||||
|
}
|
||||||
|
el.dirty();
|
||||||
|
} else if (['drag'].includes(el.subType)) {
|
||||||
|
if (el.position[0]-el.shape.r < 160 ||
|
||||||
|
el.position[0]+el.shape.r > mw) {
|
||||||
|
el.hide();
|
||||||
|
} else {
|
||||||
|
el.show();
|
||||||
|
}
|
||||||
|
el.dirty();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
onShapeMouseOver(e) {
|
onShapeMouseOver(e) {
|
||||||
if (this.selected) {
|
if (this.selected) {
|
||||||
this.myChart.dispatchAction({
|
this.myChart.dispatchAction({
|
||||||
@ -241,7 +284,7 @@ export default {
|
|||||||
filters.push(utils.buildDragDataObj(pointInPixel, pointInGrid, this, 'drag'))
|
filters.push(utils.buildDragDataObj(pointInPixel, pointInGrid, this, 'drag'))
|
||||||
option.graphic[0].elements = filters;
|
option.graphic[0].elements = filters;
|
||||||
|
|
||||||
this.myChart.setOption(option, {notMerge: true});
|
this.myChart.setOption(option, true);
|
||||||
this.myChart.dispatchAction({
|
this.myChart.dispatchAction({
|
||||||
type: 'showTip',
|
type: 'showTip',
|
||||||
seriesIndex: this.selected.seriesIndex,
|
seriesIndex: this.selected.seriesIndex,
|
||||||
@ -257,7 +300,7 @@ export default {
|
|||||||
const option = this.myChart.getOption();
|
const option = this.myChart.getOption();
|
||||||
const filters = option.graphic[0].elements.filter(el => { return el.subType != 'drag'});
|
const filters = option.graphic[0].elements.filter(el => { return el.subType != 'drag'});
|
||||||
option.graphic[0].elements = filters;
|
option.graphic[0].elements = filters;
|
||||||
this.myChart.setOption(option, {notMerge: true});
|
this.myChart.setOption(option, true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doCreateMark({e, pointInGrid, pointInPixel, yObj}) {
|
doCreateMark({e, pointInGrid, pointInPixel, yObj}) {
|
||||||
@ -267,7 +310,7 @@ export default {
|
|||||||
|
|
||||||
elements.push(utils.buildMarkPointObj(pointInPixel, pointInGrid, this, 'mark'))
|
elements.push(utils.buildMarkPointObj(pointInPixel, pointInGrid, this, 'mark'))
|
||||||
|
|
||||||
this.myChart.setOption(option, {notMerge: true});
|
this.myChart.setOption(option, true);
|
||||||
|
|
||||||
const markList = this.markList = elements.filter(el => { return el.subType == 'mark'});
|
const markList = this.markList = elements.filter(el => { return el.subType == 'mark'});
|
||||||
const elemList = elements.filter(el => { return el.subType != 'mark'});
|
const elemList = elements.filter(el => { return el.subType != 'mark'});
|
||||||
@ -290,7 +333,7 @@ export default {
|
|||||||
|
|
||||||
elements.push(utils.buildMarkPointObj(pointInPixel, pointInGrid, this, 'mark'))
|
elements.push(utils.buildMarkPointObj(pointInPixel, pointInGrid, this, 'mark'))
|
||||||
|
|
||||||
this.myChart.setOption(option, {notMerge: true});
|
this.myChart.setOption(option, true);
|
||||||
|
|
||||||
const markList = this.markList = elements.filter(el => { return el.subType == 'mark'});
|
const markList = this.markList = elements.filter(el => { return el.subType == 'mark'});
|
||||||
const elemList = elements.filter(el => { return el.subType != 'mark'});
|
const elemList = elements.filter(el => { return el.subType != 'mark'});
|
||||||
@ -365,7 +408,7 @@ export default {
|
|||||||
|
|
||||||
series.data = service.data.filter(el => { return el instanceof Array && el[2].tripNo == value[2].tripNo })
|
series.data = service.data.filter(el => { return el instanceof Array && el[2].tripNo == value[2].tripNo })
|
||||||
|
|
||||||
this.myChart.setOption(option, {notMerge: true});
|
this.myChart.setOption(option, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
const obj =dataList[e.dataIndex][2];
|
const obj =dataList[e.dataIndex][2];
|
||||||
@ -400,7 +443,7 @@ export default {
|
|||||||
elem.draggable = true;
|
elem.draggable = true;
|
||||||
elem.ondrag = echarts.util.curry(this.onShapeDragging);
|
elem.ondrag = echarts.util.curry(this.onShapeDragging);
|
||||||
|
|
||||||
this.myChart.setOption(option, {notMerge: true});
|
this.myChart.setOption(option, true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doSetAreaHorns({e}) {
|
doSetAreaHorns({e}) {
|
||||||
@ -410,7 +453,7 @@ export default {
|
|||||||
const elem = option.graphic[0].elements.find(el => { return ['area'].includes(el.subType) && el.model.areaNo == e.target.model.areaNo; });
|
const elem = option.graphic[0].elements.find(el => { return ['area'].includes(el.subType) && el.model.areaNo == e.target.model.areaNo; });
|
||||||
|
|
||||||
option.graphic[0].elements = this.calcHornList(elemList, elem);
|
option.graphic[0].elements = this.calcHornList(elemList, elem);
|
||||||
this.myChart.setOption(option, {notMerge: true});
|
this.myChart.setOption(option, true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doPopDialog({e, pointInGrid, pointInPixel}) {
|
doPopDialog({e, pointInGrid, pointInPixel}) {
|
||||||
@ -518,7 +561,7 @@ export default {
|
|||||||
e.target.point[0] += dx;
|
e.target.point[0] += dx;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.myChart.setOption(option, {notMerge: true});
|
this.myChart.setOption(option, true);
|
||||||
},
|
},
|
||||||
calcAreaDragging({e, pointInGrid}) {
|
calcAreaDragging({e, pointInGrid}) {
|
||||||
const model = this.target.model;
|
const model = this.target.model;
|
||||||
@ -535,6 +578,7 @@ export default {
|
|||||||
model.fartherKmRange += dy;
|
model.fartherKmRange += dy;
|
||||||
model.closerKmRange += dy;
|
model.closerKmRange += dy;
|
||||||
|
|
||||||
|
this.planUtil.limitAreaTime(model);
|
||||||
if (this.planUtil.limitAreaKmRange(this.stations, model)) {
|
if (this.planUtil.limitAreaKmRange(this.stations, model)) {
|
||||||
this.onZrMouseUp(e);
|
this.onZrMouseUp(e);
|
||||||
}
|
}
|
||||||
@ -589,6 +633,7 @@ export default {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.planUtil.limitAreaTime(model);
|
||||||
if (this.planUtil.limitAreaKmRange(this.stations, model)) {
|
if (this.planUtil.limitAreaKmRange(this.stations, model)) {
|
||||||
this.onZrMouseUp(e);
|
this.onZrMouseUp(e);
|
||||||
}
|
}
|
||||||
@ -605,7 +650,7 @@ export default {
|
|||||||
elem.style.textOffset = [ -args.width/2, -args.height/2 ];
|
elem.style.textOffset = [ -args.width/2, -args.height/2 ];
|
||||||
|
|
||||||
option.graphic[0].elements = this.calcHornList(elemList, elem);
|
option.graphic[0].elements = this.calcHornList(elemList, elem);
|
||||||
this.myChart.setOption(option, {notMerge: true});
|
this.myChart.setOption(option, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
snap: true,
|
|
||||||
label: {
|
label: {
|
||||||
formatter: this.xAxisPointFormat,
|
formatter: this.xAxisPointFormat,
|
||||||
backgroundColor: 'rgb(255,0,0,0.5)',
|
backgroundColor: 'rgb(255,0,0,0.5)',
|
||||||
@ -131,7 +130,6 @@ export default {
|
|||||||
formatter: this.yAxisLabelFormat
|
formatter: this.yAxisLabelFormat
|
||||||
},
|
},
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
xAxisIndex: 'all',
|
|
||||||
label: {
|
label: {
|
||||||
formatter: this.yAxisPointFormat,
|
formatter: this.yAxisPointFormat,
|
||||||
backgroundColor: 'rgb(0,100,0,0.5)',
|
backgroundColor: 'rgb(0,100,0,0.5)',
|
||||||
@ -211,12 +209,12 @@ export default {
|
|||||||
const yObj = param.data[2];
|
const yObj = param.data[2];
|
||||||
const station = this.stations.find(el => { return el.id == yObj.stationId })||{ name: '', kmRange: ''};
|
const station = this.stations.find(el => { return el.id == yObj.stationId })||{ name: '', kmRange: ''};
|
||||||
const list = [
|
const list = [
|
||||||
`Service No: ${yObj.serviceNo}<br>`,
|
`ServiceNo: ${yObj.serviceNo}<br>`,
|
||||||
`Trip No: ${yObj.tripNo}<br>`,
|
`TripNo: ${yObj.tripNo}<br>`,
|
||||||
`direction: ${yObj.direction == 2? 'Up': 'Down'}<br>`,
|
`Direction: ${yObj.direction == 2? 'Up': 'Down'}<br>`,
|
||||||
`Station name: ${station.name}<br>`,
|
`Station name: ${station.name}<br>`,
|
||||||
`Kilometer post: ${station.kmRange} m <br>`,
|
`Kilometer post: ${station.kmRange} m <br>`,
|
||||||
`Arrival Time: ${timeFormat(xVal + this.planUtil.TranslationTime)}<br>`,
|
`Arrival time: ${timeFormat(xVal + this.planUtil.TranslationTime)}<br>`,
|
||||||
`<hr size=1 style="margin: 3px 0">`
|
`<hr size=1 style="margin: 3px 0">`
|
||||||
];
|
];
|
||||||
data += list.join('');
|
data += list.join('');
|
||||||
@ -231,7 +229,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.myChart = echarts.init(document.getElementById(this.canvasId));
|
this.myChart = echarts.init(document.getElementById(this.canvasId));
|
||||||
this.myChart.setOption(this.option, {notMerge: true});
|
this.myChart.setOption(this.option, true);
|
||||||
this.reSize({ width: this.width, height: this.height });
|
this.reSize({ width: this.width, height: this.height });
|
||||||
resolve(true);
|
resolve(true);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -248,7 +246,7 @@ export default {
|
|||||||
this.xAxisInit(stations);
|
this.xAxisInit(stations);
|
||||||
this.yAxisInit(stations);
|
this.yAxisInit(stations);
|
||||||
|
|
||||||
this.myChart.setOption(this.option, {notMerge: true});
|
this.myChart.setOption(this.option, true);
|
||||||
this.myChart.hideLoading();
|
this.myChart.hideLoading();
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -292,7 +290,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.myChart.setOption(option, {notMerge: true});
|
this.myChart.setOption(option, true);
|
||||||
|
|
||||||
if (this.model.choice == 'Plan') {
|
if (this.model.choice == 'Plan') {
|
||||||
this.setLineLight();
|
this.setLineLight();
|
||||||
@ -307,21 +305,21 @@ export default {
|
|||||||
},
|
},
|
||||||
xAxisInit(stations) {
|
xAxisInit(stations) {
|
||||||
const option = this.option;
|
const option = this.option;
|
||||||
const startValue = 3600 * 6;
|
const startValue = this.planUtil.MinTime + this.planUtil.TranslationTime;
|
||||||
const offsetTime = 3600 / 2;
|
const endValue = this.planUtil.MaxTime + this.planUtil.TranslationTime;
|
||||||
const list = [];
|
const list = [];
|
||||||
|
|
||||||
for (var time = 0 + this.planUtil.TranslationTime; time <= 3600 * 24 + this.planUtil.TranslationTime; time++) {
|
for (var time = startValue; time <= endValue; time++) {
|
||||||
list.push(time);
|
list.push(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
option.xAxis[0].data = list;
|
option.xAxis[0].data = list;
|
||||||
if (!option.dataZoom[0].startValue) {
|
if (!option.dataZoom[0].startValue) {
|
||||||
option.dataZoom[0].startValue = option.dataZoom[1].startValue = startValue - offsetTime;
|
option.dataZoom[0].startValue = option.dataZoom[1].startValue = startValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!option.dataZoom[0].endValue) {
|
if (!option.dataZoom[0].endValue) {
|
||||||
option.dataZoom[0].endValue = option.dataZoom[1].endValue = startValue + offsetTime;
|
option.dataZoom[0].endValue = option.dataZoom[1].endValue = endValue;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
yAxisInit(stations) {
|
yAxisInit(stations) {
|
||||||
@ -433,30 +431,32 @@ export default {
|
|||||||
el.draggable = false;
|
el.draggable = false;
|
||||||
})
|
})
|
||||||
|
|
||||||
this.myChart.setOption(option, {notMerge: true});
|
this.myChart.setOption(option, true);
|
||||||
},
|
},
|
||||||
clearTrip() {
|
clearTrip() {
|
||||||
const option = this.myChart.getOption();
|
const option = this.myChart.getOption();
|
||||||
const index = option.series.findIndex(el => { return el.name.includes('service-trip') });
|
const index = option.series.findIndex(el => { return el.name.includes('service-trip') });
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
option.series[index].data = [];
|
option.series[index].data = [];
|
||||||
this.myChart.setOption(option, {notMerge: true});
|
this.myChart.setOption(option, true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clearGraphic(labels=['drag', 'mark']) {
|
clearGraphic(labels=['drag', 'mark']) {
|
||||||
const option = this.myChart.getOption();
|
const option = this.myChart.getOption();
|
||||||
const elements = option.graphic[0].elements;
|
const elements = option.graphic[0].elements;
|
||||||
option.graphic[0].elements = elements.filter(el => { return !labels.includes(el.subType)});
|
option.graphic[0].elements = elements.filter(el => { return !labels.includes(el.subType)});
|
||||||
this.myChart.setOption(option, {notMerge: true});
|
this.myChart.setOption(option, true);
|
||||||
},
|
},
|
||||||
calcHornList(elemList, elem) {
|
calcHornList(elemList, elem) {
|
||||||
const p = elem.position;
|
const p = elem.position;
|
||||||
|
const x = elem.shape.x;
|
||||||
|
const y = elem.shape.y;
|
||||||
const w = elem.shape.width;
|
const w = elem.shape.width;
|
||||||
const h = elem.shape.height;
|
const h = elem.shape.height;
|
||||||
const point1 = [p[0], p[1]];
|
const point1 = [p[0]+x, p[1]+y];
|
||||||
const point2 = [p[0]+w, p[1]];
|
const point2 = [p[0]+x+w, p[1]+y];
|
||||||
const point3 = [p[0]+w, p[1]+h];
|
const point3 = [p[0]+x+w, p[1]+y+h];
|
||||||
const point4 = [p[0], p[1]+h];
|
const point4 = [p[0]+x, p[1]+y+h];
|
||||||
|
|
||||||
elemList.push(utils.buildHornDataObj(point1, this.myChart.convertFromPixel('grid', point1), this, 'horn-1'));
|
elemList.push(utils.buildHornDataObj(point1, this.myChart.convertFromPixel('grid', point1), this, 'horn-1'));
|
||||||
elemList.push(utils.buildHornDataObj(point2, this.myChart.convertFromPixel('grid', point2), this, 'horn-2'));
|
elemList.push(utils.buildHornDataObj(point2, this.myChart.convertFromPixel('grid', point2), this, 'horn-2'));
|
||||||
@ -464,6 +464,37 @@ export default {
|
|||||||
elemList.push(utils.buildHornDataObj(point4, this.myChart.convertFromPixel('grid', point4), this, 'horn-4'));
|
elemList.push(utils.buildHornDataObj(point4, this.myChart.convertFromPixel('grid', point4), this, 'horn-4'));
|
||||||
|
|
||||||
return elemList;
|
return elemList;
|
||||||
|
},
|
||||||
|
setAreaClipPath() {
|
||||||
|
// const option = this.myChart.getOption();
|
||||||
|
// const mw = this.myChart.getWidth()-100;
|
||||||
|
// const mh = this.myChart.getHeight()-80;
|
||||||
|
|
||||||
|
// const view = this.myChart.getViewOfComponentModel({__viewId: "_ec_shape_graphic"});
|
||||||
|
// if (view.group) {
|
||||||
|
// view.group.eachChild(el => {
|
||||||
|
// if (['area'].includes(el.subType)) {
|
||||||
|
// const w = Math.abs(el.point2[0]-el.point1[0]);
|
||||||
|
// const h = Math.abs(el.point2[1]-el.point1[1]);
|
||||||
|
// const x = el.position[0] < 160
|
||||||
|
// ? 160 - el.position[0]
|
||||||
|
// : 0;
|
||||||
|
// const y = el.position[1] < 60
|
||||||
|
// ? 60 - el.position[1]
|
||||||
|
// : 0;
|
||||||
|
// const dw = el.position[0]+w > mw
|
||||||
|
// ? el.position[0]+w-mw
|
||||||
|
// : x;
|
||||||
|
// const dh = el.position[1]+h > mh
|
||||||
|
// ? el.position[1]+h-mh
|
||||||
|
// : y;
|
||||||
|
|
||||||
|
// const clipPath = new echarts.graphic.Rect({shape: {x, y, width: Math.abs(w-dw), height: Math.abs(h-dh)}});
|
||||||
|
// el.setClipPath(clipPath);
|
||||||
|
// el.dirty();
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -27,6 +27,7 @@ export default {
|
|||||||
{ label: '3d数据', value: 'MAP_3D_DATA' },
|
{ label: '3d数据', value: 'MAP_3D_DATA' },
|
||||||
{ label: 'ibp数据', value: 'ibp' },
|
{ label: 'ibp数据', value: 'ibp' },
|
||||||
{ label: '指令定义', value: 'COMMAND_DEFINITION' },
|
{ label: '指令定义', value: 'COMMAND_DEFINITION' },
|
||||||
|
{ label: '剧本数据', value: 'script' },
|
||||||
{ label: '线路配置', value: 'REAL_LINE_CONFIG', selected: true }
|
{ label: '线路配置', value: 'REAL_LINE_CONFIG', selected: true }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -50,6 +51,7 @@ export default {
|
|||||||
runPlan: this.checkList.includes('RUN_PLAN'),
|
runPlan: this.checkList.includes('RUN_PLAN'),
|
||||||
map3dData: this.checkList.includes('MAP_3D_DATA'),
|
map3dData: this.checkList.includes('MAP_3D_DATA'),
|
||||||
ibp: this.checkList.includes('ibp'),
|
ibp: this.checkList.includes('ibp'),
|
||||||
|
script:this.checkList.includes('script'),
|
||||||
commandDefinition: this.checkList.includes('COMMAND_DEFINITION'),
|
commandDefinition: this.checkList.includes('COMMAND_DEFINITION'),
|
||||||
realLineConfig: this.checkList.includes('REAL_LINE_CONFIG')
|
realLineConfig: this.checkList.includes('REAL_LINE_CONFIG')
|
||||||
};
|
};
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
>
|
>
|
||||||
<span :id="data.id" slot-scope="{ node, data }" style="width:100%">
|
<span :id="data.id" slot-scope="{ node, data }" style="width:100%">
|
||||||
<span v-if="data.children">
|
<span v-if="data.children">
|
||||||
<span style="font-size: 14px">{{ data.label }}</span>
|
<span style="font-size: 14px">{{ node.label }}</span>
|
||||||
</span>
|
</span>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
<span style="font-size: 14px">{{ data.normalName }}</span>
|
<span style="font-size: 14px">{{ data.normalName }}</span>
|
||||||
@ -138,9 +138,9 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
prdType = '';
|
prdType = '';
|
||||||
}
|
}
|
||||||
this.$store.dispatch('training/setPrdType', prdType),
|
this.$store.dispatch('training/setPrdType', prdType);
|
||||||
this.$store.dispatch('scriptRecord/updateRole', role.type + ':' + role.id),
|
this.$store.dispatch('scriptRecord/updateRole', role.type + ':' + role.id);
|
||||||
this.$emit('setMemberId', {newRole:role, oldRole:this.oldMember}),
|
this.$emit('setMemberId', {newRole:role, oldRole:this.oldMember});
|
||||||
this.$store.dispatch('training/updateMemberListInScript',
|
this.$store.dispatch('training/updateMemberListInScript',
|
||||||
{
|
{
|
||||||
oldMemberId:Object.assign({}, this.oldMember).id,
|
oldMemberId:Object.assign({}, this.oldMember).id,
|
||||||
@ -176,3 +176,11 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<style>
|
||||||
|
.eachScriptPanel .el-tree-node:focus>.el-tree-node__content {
|
||||||
|
background-color: #b7b7b7;
|
||||||
|
}
|
||||||
|
.eachScriptPanel .el-tree-node__content:hover {
|
||||||
|
background-color: #b7b7b7;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -80,9 +80,9 @@ export default {
|
|||||||
height: 800,
|
height: 800,
|
||||||
roadData: [],
|
roadData: [],
|
||||||
focus: false,
|
focus: false,
|
||||||
booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking', 'standHoldCloseLogicLight'],
|
booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking', 'standHoldCloseLogicLight', 'atsAutoHandleManualFrontTurnBack'],
|
||||||
selectList: ['runMode'],
|
selectList: ['runMode'],
|
||||||
generalConfig: ['lockFirst', 'switchSingleHandle', 'upRight', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'runMode', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'noParkingSM', 'parkingSM', 'rmAtpSpeed', 'urmAtpSpeed', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking', 'standHoldCloseLogicLight'],
|
generalConfig: ['lockFirst', 'switchSingleHandle', 'upRight', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'runMode', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'noParkingSM', 'parkingSM', 'rmAtpSpeed', 'urmAtpSpeed', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking', 'standHoldCloseLogicLight', 'atsAutoHandleManualFrontTurnBack'],
|
||||||
rangeList: ['noParkingSM', 'parkingSM'],
|
rangeList: ['noParkingSM', 'parkingSM'],
|
||||||
speedList: ['rmAtpSpeed', 'urmAtpSpeed'],
|
speedList: ['rmAtpSpeed', 'urmAtpSpeed'],
|
||||||
numberList: [],
|
numberList: [],
|
||||||
@ -106,7 +106,8 @@ export default {
|
|||||||
urmAtpSpeed: 'URM下ATP防护速度',
|
urmAtpSpeed: 'URM下ATP防护速度',
|
||||||
guideNeedRouteSettingFirst: '引导办理是否需要先排列进路',
|
guideNeedRouteSettingFirst: '引导办理是否需要先排列进路',
|
||||||
signalOpenAfterParking: '是否列车停站开门后,才办理出站进路开放出站信号机',
|
signalOpenAfterParking: '是否列车停站开门后,才办理出站进路开放出站信号机',
|
||||||
standHoldCloseLogicLight: '站台扣车是否关闭逻辑点灯的信号机'
|
standHoldCloseLogicLight: '站台扣车是否关闭逻辑点灯的信号机',
|
||||||
|
atsAutoHandleManualFrontTurnBack:'ATS是否自动处理人工设置的站前折返自动更新车次'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -112,6 +112,13 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
selectQuestion() {
|
selectQuestion() {
|
||||||
|
this.questionNum = {
|
||||||
|
select: 0,
|
||||||
|
judge: 0,
|
||||||
|
multi: 0,
|
||||||
|
fill:0,
|
||||||
|
answer: 0
|
||||||
|
};
|
||||||
selectQuestionTypeNum(this.formModel.companyId || '').then(resp => {
|
selectQuestionTypeNum(this.formModel.companyId || '').then(resp => {
|
||||||
resp.data.forEach(item => {
|
resp.data.forEach(item => {
|
||||||
this.questionNum[item.type] = item.num;
|
this.questionNum[item.type] = item.num;
|
||||||
@ -120,6 +127,7 @@ export default {
|
|||||||
},
|
},
|
||||||
doShow(data) {
|
doShow(data) {
|
||||||
// console.log(this.companyList);
|
// console.log(this.companyList);
|
||||||
|
this.selectQuestion();
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.update = false;
|
this.update = false;
|
||||||
this.questionNum = {
|
this.questionNum = {
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
>添加</el-button>
|
>添加</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="danger"
|
type="success"
|
||||||
@click="handlerBack"
|
@click="handlerBack"
|
||||||
>返回</el-button>
|
>返回</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -87,6 +87,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
type="primary"
|
||||||
@click="handleUpdate(scope.$index, scope.row)"
|
@click="handleUpdate(scope.$index, scope.row)"
|
||||||
>编辑</el-button>
|
>编辑</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
Loading…
Reference in New Issue
Block a user