Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test_lesson
This commit is contained in:
commit
4d3991f3e9
@ -89,29 +89,6 @@ export function getCompanyMemberPaging(companyId) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 更新单位成员信息 */
|
||||
export function putCompanyMember(companyId, data) {
|
||||
return request({
|
||||
url: `/api/company/${companyId}/refUserInfo`,
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 导入单位成员信息 */
|
||||
export function importCompanyMember(companyId, data) {
|
||||
return request({
|
||||
url: `/api/company/${companyId}/refUserInfo/import`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 删除单位成员信息 */
|
||||
export function deleteCompanyMember(companyId, memberId) {
|
||||
return request({
|
||||
url: `/api/company/${companyId}/refUserInfo/${memberId}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
/** 查询职位信息 */
|
||||
export function getPositionInfo(positionId) {
|
||||
return request({
|
||||
@ -172,3 +149,34 @@ export function deleteDeptInfo(deptId) {
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
/** 获取用户单位的部门信息 */
|
||||
export function getCompanyDeptInfo(companyId) {
|
||||
return request({
|
||||
url: `/api/company/${companyId}/userDeparts`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 导入单位成员信息 */
|
||||
export function importCompanyMember(companyId, data) {
|
||||
return request({
|
||||
url: `/api/company/${companyId}/departUserInfo/import`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 分页查询单位部门成员信息 */
|
||||
export function queryDeptInfoPaging(params) {
|
||||
return request({
|
||||
url: `/api/company/dept/${params.deptId}/departUserInfo`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
/** 取消单位的部门成员关系 */
|
||||
export function deleteDepartUserRelation(data) {
|
||||
return request({
|
||||
url: `/api/company/departUserInfo`,
|
||||
method: 'delete',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
@ -41,3 +41,11 @@ export function deleteIscs(id) {
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
// 查询地图下是否有ISCS数据
|
||||
export function queryHasIscs(params) {
|
||||
return request({
|
||||
url: `/api/v1/iscs/hasData`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ export const keyboardEvents = {
|
||||
ALT_O: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_O'},
|
||||
ALT_E: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_E'},
|
||||
ALT_S: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_S'},
|
||||
ALT_D: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_D'}
|
||||
ALT_D: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_D'},
|
||||
TAB: {altKey: false, ctrlKey: false, shiftKey: false, event: 'Tab'}
|
||||
};
|
||||
|
||||
|
@ -175,7 +175,8 @@ class SkinCode extends defaultStyle {
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
yellowColor: '#FFFF00', // 信号灯黄色
|
||||
whiteColor: '#FFFFFF', // 信号灯白色
|
||||
blueColor: '#0070C0' // 信号灯蓝色
|
||||
blueColor: '#0070C0', // 信号灯蓝色
|
||||
faultType: 'light' // 信号机故障类型 (light闪)
|
||||
},
|
||||
route: {
|
||||
direction: true, // 自动通过方向
|
||||
|
@ -153,7 +153,8 @@ class SkinCode extends defaultStyle {
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
yellowColor: '#FFFF00', // 信号灯黄色
|
||||
whiteColor: '#FFFFFF', // 信号灯白色
|
||||
blueColor: '#0070C0' // 信号灯蓝色
|
||||
blueColor: '#0070C0', // 信号灯蓝色
|
||||
faultType: 'flash' // 信号机故障类型 (flash为福州一号线与西安一三号线特殊类型,太阳)
|
||||
},
|
||||
route: {
|
||||
direction: false, // 自动进路方向
|
||||
|
@ -186,7 +186,7 @@ class SkinCode extends defaultStyle {
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 2, // 信号灯边框线宽度
|
||||
borderColor: '#000000', // 信号灯边框线颜色
|
||||
physicColor:'#ffffff', // 物理点灯信号灯边框线颜色
|
||||
physicColor:'#ffffff', // 物理点灯信号灯边框线颜色
|
||||
radiusR: 5, // 信号灯半径
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#C0C0C0', // 信号灯灰色
|
||||
@ -195,7 +195,7 @@ class SkinCode extends defaultStyle {
|
||||
yellowColor: 'yellow', // 信号灯黄色
|
||||
whiteColor: '#FFFFFF', // 信号灯白色
|
||||
blueColor: '#0070C0', // 信号灯蓝色
|
||||
logicDisplayNone: true // 信号机上×型标识不展示
|
||||
faultType: 'cross' // 信号机故障类型 (cross叉形狀)
|
||||
},
|
||||
route: {
|
||||
direction: false, // 自动通过方向
|
||||
|
@ -162,7 +162,7 @@ class SkinCode extends defaultStyle {
|
||||
yellowColor: '#FFFF00', // 信号灯黄色
|
||||
whiteColor: '#FFFFFF', // 信号灯白色
|
||||
blueColor: '#0070C0', // 信号灯蓝色
|
||||
faultType: 'flash' // 信号机故障类型 (flash为西安三号线特殊类型)
|
||||
faultType: 'flash' // 信号机故障类型(flash太阳)
|
||||
},
|
||||
route: {
|
||||
direction: false, // 自动进路方向
|
||||
|
@ -175,6 +175,7 @@ class SkinCode extends defaultStyle {
|
||||
yellowColor: 'yellow', // 信号灯黄色
|
||||
whiteColor: '#FFFFFF', // 信号灯白色
|
||||
blueColor: '#0070C0', // 信号灯蓝色
|
||||
faultType: 'watch', // 信号机故障类型 (watch表形狀)
|
||||
logicDisplayNone: true // 信号机上×型标识不展示
|
||||
},
|
||||
route: {
|
||||
|
@ -14,4 +14,7 @@ export default class ELampFilament extends Group {
|
||||
this.path = createPathSvg(this.model);
|
||||
this.add(this.path);
|
||||
}
|
||||
setControlColor(color) {
|
||||
this.path.setStyle({fill: color});
|
||||
}
|
||||
}
|
||||
|
@ -224,11 +224,11 @@ export default class SaidLamp extends Group {
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
setControlColor(color, flag) {
|
||||
this.control && this.control.getControl().stopAnimation(false);
|
||||
this.control && this.control.setControlColor(color);
|
||||
setControlColor(color, flag = false) {
|
||||
this.control && this.control.getControl && this.control.getControl().stopAnimation(false);
|
||||
this.control && this.control.setControlColor && this.control.setControlColor(color);
|
||||
if (flag) {
|
||||
this.control && this.control.getControl().animateStyle(true)
|
||||
this.control && this.control.getControl && this.control.getControl().animateStyle(true)
|
||||
.when(0, { fill: this.style.backgroundColor })
|
||||
.when(1000, { fill: color })
|
||||
.when(2000, { fill: this.style.backgroundColor })
|
||||
|
@ -58,11 +58,7 @@ class ESigLamp extends Group {
|
||||
_subType: 'SignalLamp',
|
||||
_val: '3',
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
origin: {
|
||||
x: model.originX,
|
||||
y: model.originY
|
||||
},
|
||||
z: model.z + 1,
|
||||
shape: {
|
||||
x1: model.x + (style.Signal.lamp.radiusR + 0.5) * Math.cos(Math.PI / 4),
|
||||
y1: model.y + (style.Signal.lamp.radiusR + 0.5) * Math.sin(Math.PI / 4),
|
||||
@ -78,11 +74,7 @@ class ESigLamp extends Group {
|
||||
_subType: 'SignalLamp',
|
||||
_val: '3',
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
origin: {
|
||||
x: model.originX,
|
||||
y: model.originY
|
||||
},
|
||||
z: model.z + 1,
|
||||
shape: {
|
||||
x1: model.x + (style.Signal.lamp.radiusR + 0.5) * Math.cos(Math.PI / 4),
|
||||
y1: model.y + (style.Signal.lamp.radiusR + 0.5) * (Math.sin(Math.PI / 4) - Math.sqrt(2)),
|
||||
@ -94,8 +86,51 @@ class ESigLamp extends Group {
|
||||
stroke: style.Signal.xColor || style.backgroundColor
|
||||
}
|
||||
});
|
||||
|
||||
const edge = 2;
|
||||
this.lcross = new Line({
|
||||
_subType: 'SignalLamp',
|
||||
_val: '3',
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 1,
|
||||
shape: {
|
||||
x1: model.x + (style.Signal.lamp.radiusR + edge + 0.5) * Math.cos(Math.PI / 4),
|
||||
y1: model.y + (style.Signal.lamp.radiusR + edge + 0.5) * Math.sin(Math.PI / 4),
|
||||
x2: model.x - (style.Signal.lamp.radiusR + edge + 0.5) * Math.cos(Math.PI / 4),
|
||||
y2: model.y - (style.Signal.lamp.radiusR + edge + 0.5) * Math.sin(Math.PI / 4)
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Signal.lamp.stopWidth,
|
||||
stroke: '#000000',
|
||||
lineCap: 'round'
|
||||
}
|
||||
});
|
||||
this.rcross = new Line({
|
||||
_subType: 'SignalLamp',
|
||||
_val: '3',
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 1,
|
||||
shape: {
|
||||
x1: model.x + (style.Signal.lamp.radiusR + edge + 0.5) * Math.cos(Math.PI / 4),
|
||||
y1: model.y + (style.Signal.lamp.radiusR + edge + 0.5) * (Math.sin(Math.PI / 4) - Math.sqrt(2)),
|
||||
x2: model.x - (style.Signal.lamp.radiusR + edge + 0.5) * Math.cos(Math.PI / 4),
|
||||
y2: model.y - (style.Signal.lamp.radiusR + edge + 0.5) * (Math.sin(Math.PI / 4) - Math.sqrt(2))
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Signal.lamp.stopWidth,
|
||||
stroke: '#000000',
|
||||
lineCap: 'round'
|
||||
}
|
||||
});
|
||||
}
|
||||
this.add(this.lamp);
|
||||
|
||||
if (style.Signal.lamp.faultType == 'cross') {
|
||||
this.add(this.lcross);
|
||||
this.add(this.rcross);
|
||||
this.setFault2Corss(false);
|
||||
}
|
||||
|
||||
if (!style.Signal.lamp.logicDisplayNone) {
|
||||
this.add(this.lstop);
|
||||
this.add(this.rstop);
|
||||
@ -126,6 +161,16 @@ class ESigLamp extends Group {
|
||||
this.lamp.setStyle(data);
|
||||
}
|
||||
|
||||
setFault2Corss(has) {
|
||||
if (has) {
|
||||
this.lcross && this.lcross.show();
|
||||
this.rcross && this.rcross.show();
|
||||
} else {
|
||||
this.lcross && this.lcross.hide();
|
||||
this.rcross && this.rcross.hide();
|
||||
}
|
||||
}
|
||||
|
||||
setStop(has) {
|
||||
if (has) {
|
||||
this.lstop && this.lstop.show();
|
||||
|
@ -17,6 +17,8 @@ import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Isogon from 'zrender/src/graphic/shape/Isogon';
|
||||
import deviceType from '../../constant/deviceType';
|
||||
import { findDeviceByModelDepType } from '../utils/ShapeDepFind';
|
||||
// import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
// import background from './../../../ibp/shape/background';
|
||||
|
||||
@ -491,8 +493,24 @@ class Signal extends Group {
|
||||
// }
|
||||
|
||||
fault() {
|
||||
if (this.style.Signal.lamp.faultType && this.style.Signal.lamp.faultType == 'flash') {
|
||||
if (this.style.Signal.lamp.faultType == 'flash') {
|
||||
this.lamps[0].faultShow();
|
||||
} else if (this.style.Signal.lamp.faultType == 'cross') {
|
||||
this.lamps[0].setFault2Corss(true);
|
||||
} else if (this.style.Signal.lamp.faultType == 'watch') {
|
||||
const deivce = findDeviceByModelDepType(this.model, deviceType.LampFilament, 'stationCode');
|
||||
if (deivce && deivce.instance) {
|
||||
deivce.instance.setControlColor('red');
|
||||
// if (model.redOpen) {
|
||||
// deivce.instance.setControlColor('red');
|
||||
// } else if (model.greenOpen || model.yellowOpen) {
|
||||
// deivce.instance.setControlColor('green');
|
||||
// } else {
|
||||
// deivce.instance.setControlColor('#9F9C9C');
|
||||
// }
|
||||
}
|
||||
} else if (this.style.Signal.lamp.faultType == 'light') {
|
||||
this.lamps[0].setAnimationStart('red');
|
||||
}
|
||||
}
|
||||
|
||||
@ -606,9 +624,6 @@ class Signal extends Group {
|
||||
// 恢复状态
|
||||
recover() {
|
||||
this.lamps.forEach(item=> { item.show(); });
|
||||
if (this.style.Signal.lamp.faultType && this.style.Signal.lamp.faultType == 'flash') {
|
||||
this.lamps[0].faultHide();
|
||||
}
|
||||
this.sigName.setStyle({ textBorderWidth: 0 });
|
||||
this.sigName.setColor(this.style.Signal.text.defaultColor);
|
||||
this.remainTImeName.hide();
|
||||
@ -620,12 +635,27 @@ class Signal extends Group {
|
||||
this.sigRoute.hide();
|
||||
this.sigBack && this.sigBack.hide();
|
||||
this.sigPost.setColor(this.style.Signal.post.standardColor); // 设置底座默认颜色
|
||||
|
||||
if (this.style.Signal.lamp.guidName === 'singleRY') {
|
||||
this.lamps[0].setStyle({ lineWidth: this.style.Signal.lamp.borderWidth });
|
||||
}
|
||||
if (this.style.Signal.lamp.guidName === 'double' || this.style.Signal.lamp.guidName === 'doubleAndBase') {
|
||||
this.lamps[1].hide();
|
||||
}
|
||||
|
||||
if (this.style.Signal.lamp.faultType == 'flash') {
|
||||
this.lamps[0].faultHide();
|
||||
} else if (this.style.Signal.lamp.faultType == 'cross') {
|
||||
this.lamps[0].setFault2Corss(false);
|
||||
} else if (this.style.Signal.lamp.faultType == 'watch') {
|
||||
const device = findDeviceByModelDepType(this.model, deviceType.LampFilament, 'stationCode');
|
||||
if (device && device.instance) {
|
||||
device.instance.setControlColor('#9F9C9C');
|
||||
}
|
||||
} else if (this.style.Signal.lamp.faultType == 'light') {
|
||||
this.lamps[0].setAnimationEnd();
|
||||
}
|
||||
|
||||
this.insideTriangle && this.insideTriangle.setStyle({fill: this.style.Signal.insideTriangle.startSignalColor, stroke: this.style.Signal.insideTriangle.strokeColor});
|
||||
this.insideTriangle && this.insideTriangle.hide();
|
||||
this.sigPost && this.sigPost.removeTerminalOptional();
|
||||
@ -641,6 +671,7 @@ class Signal extends Group {
|
||||
if (!this.isShowShape) return;
|
||||
const path = window.location.href;
|
||||
this.recover();
|
||||
|
||||
/** 信号机进路按钮显示 */
|
||||
if (isShowThePrdType(model.prdType, '03') && this.style.Signal.lowButton.display) {
|
||||
/** 终端信号机按钮 */
|
||||
@ -659,7 +690,6 @@ class Signal extends Group {
|
||||
model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(model.logicLight); // 信号关闭
|
||||
model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(model.logicLight); // 信号正向开放
|
||||
model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(model.logicLight); // 信号侧向开放
|
||||
model.fault && this.fault();// 信号机故障
|
||||
model.remainTime && this.showRemainTime(model.remainTime);
|
||||
if (!path.includes('/map/draw')) {
|
||||
// 联锁自动进路通过
|
||||
@ -710,6 +740,8 @@ class Signal extends Group {
|
||||
});
|
||||
}
|
||||
}
|
||||
// 信号机故障
|
||||
model.fault && this.fault();
|
||||
// 设置灰显
|
||||
model.noStatus && this.setAshShow();
|
||||
}
|
||||
|
13
src/jmapNew/shape/utils/ShapeDepFind.js
Normal file
13
src/jmapNew/shape/utils/ShapeDepFind.js
Normal file
@ -0,0 +1,13 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
// 查询有相同归属集中站的指定类型的图形
|
||||
export function findDeviceByModelDepType(model, type, compare) {
|
||||
return Object.values(Vue.prototype.$jlmap.mapDevice).find(el => {
|
||||
if (el._type == type) {
|
||||
return (compare instanceof Function)
|
||||
? compare(el, model)
|
||||
: el[compare] == model[compare];
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
@ -2,101 +2,101 @@ import Path from 'zrender/src/graphic/Path';
|
||||
|
||||
/** 指向箭头坐标*/
|
||||
export function arrow(modelX, modelY, length, radius) {
|
||||
return [
|
||||
[modelX - length, modelY],
|
||||
[modelX - length + radius / 1.5, modelY - radius / 1.2],
|
||||
[modelX - length + radius / 1.5, modelY - radius / 3],
|
||||
[modelX + length, modelY - radius / 3],
|
||||
[modelX + length, modelY + radius / 3],
|
||||
[modelX - length + radius / 1.5, modelY + radius / 3],
|
||||
[modelX - length + radius / 1.5, modelY + radius / 1.2]
|
||||
];
|
||||
return [
|
||||
[modelX - length, modelY],
|
||||
[modelX - length + radius / 1.5, modelY - radius / 1.2],
|
||||
[modelX - length + radius / 1.5, modelY - radius / 3],
|
||||
[modelX + length, modelY - radius / 3],
|
||||
[modelX + length, modelY + radius / 3],
|
||||
[modelX - length + radius / 1.5, modelY + radius / 3],
|
||||
[modelX - length + radius / 1.5, modelY + radius / 1.2]
|
||||
];
|
||||
}
|
||||
|
||||
/** 指向三角形坐标*/
|
||||
export function triangular(modelX, modelY, drict, radius) {
|
||||
return [
|
||||
[modelX, modelY],
|
||||
[modelX - drict * (radius + 2), modelY - radius],
|
||||
[modelX - drict * (radius + 2), modelY + radius]
|
||||
];
|
||||
return [
|
||||
[modelX, modelY],
|
||||
[modelX - drict * (radius + 2), modelY - radius],
|
||||
[modelX - drict * (radius + 2), modelY + radius]
|
||||
];
|
||||
}
|
||||
|
||||
/** 屏蔽门手电筒*/
|
||||
export function flashlight(modelX, modelY, drict, width, height, offsetx, offsety, beyond) {
|
||||
return [
|
||||
[modelX + drict * (offsetx), modelY + drict * offsety - (height + beyond) / 2],
|
||||
[modelX + drict * (offsetx + beyond), modelY + drict * offsety - height / 2],
|
||||
[modelX + drict * (offsetx + beyond + width), modelY + drict * offsety - height / 2],
|
||||
[modelX + drict * (offsetx + beyond + width), modelY + drict * offsety + height / 2],
|
||||
[modelX + drict * (offsetx + beyond), modelY + drict * offsety + height / 2],
|
||||
[modelX + drict * (offsetx), modelY + drict * offsety + (height + beyond) / 2]
|
||||
];
|
||||
return [
|
||||
[modelX + drict * (offsetx), modelY + drict * offsety - (height + beyond) / 2],
|
||||
[modelX + drict * (offsetx + beyond), modelY + drict * offsety - height / 2],
|
||||
[modelX + drict * (offsetx + beyond + width), modelY + drict * offsety - height / 2],
|
||||
[modelX + drict * (offsetx + beyond + width), modelY + drict * offsety + height / 2],
|
||||
[modelX + drict * (offsetx + beyond), modelY + drict * offsety + height / 2],
|
||||
[modelX + drict * (offsetx), modelY + drict * offsety + (height + beyond) / 2]
|
||||
];
|
||||
}
|
||||
|
||||
/** 区段限速体带方向*/
|
||||
export function limitArrows(modelX, modelY, drict, radius) {
|
||||
return [
|
||||
[modelX + drict * radius, modelY - radius],
|
||||
[modelX + drict * radius, modelY + radius],
|
||||
[modelX - drict * radius, modelY + radius],
|
||||
[modelX - drict * radius * 1.8, modelY],
|
||||
[modelX - drict * radius, modelY - radius]
|
||||
];
|
||||
return [
|
||||
[modelX + drict * radius, modelY - radius],
|
||||
[modelX + drict * radius, modelY + radius],
|
||||
[modelX - drict * radius, modelY + radius],
|
||||
[modelX - drict * radius * 1.8, modelY],
|
||||
[modelX - drict * radius, modelY - radius]
|
||||
];
|
||||
}
|
||||
|
||||
/** 区段折返标记*/
|
||||
export function turnbackArrows(modelX, modelY, drict, width, height) {
|
||||
return [
|
||||
[modelX - drict * (width - 1), modelY + height],
|
||||
[modelX + drict * width / 2, modelY + height],
|
||||
[modelX + drict * width / 2, modelY - height],
|
||||
[modelX - drict * (width - 3), modelY - height]
|
||||
];
|
||||
return [
|
||||
[modelX - drict * (width - 1), modelY + height],
|
||||
[modelX + drict * width / 2, modelY + height],
|
||||
[modelX + drict * width / 2, modelY - height],
|
||||
[modelX - drict * (width - 3), modelY - height]
|
||||
];
|
||||
}
|
||||
|
||||
export const Ugraph = Path.extend({
|
||||
type: 'ugraph',
|
||||
type: 'ugraph',
|
||||
|
||||
shape: {
|
||||
points: null,
|
||||
counterclockwise: true
|
||||
},
|
||||
shape: {
|
||||
points: null,
|
||||
counterclockwise: true
|
||||
},
|
||||
|
||||
style: {
|
||||
stroke: '#000',
|
||||
fill: null
|
||||
},
|
||||
style: {
|
||||
stroke: '#000',
|
||||
fill: null
|
||||
},
|
||||
|
||||
buildPath: function (ctx, shape) {
|
||||
var points = shape.points;
|
||||
var r = Math.abs(points[1][1] - points[2][1]) / 2;
|
||||
var x = Math.abs(points[1][0] + points[2][0]) / 2;
|
||||
var y = Math.abs(points[1][1] + points[2][1]) / 2;
|
||||
ctx.moveTo(points[0][0], points[0][1]);
|
||||
ctx.lineTo(points[1][0], points[1][1]);
|
||||
buildPath: function (ctx, shape) {
|
||||
var points = shape.points;
|
||||
var r = Math.abs(points[1][1] - points[2][1]) / 2;
|
||||
var x = Math.abs(points[1][0] + points[2][0]) / 2;
|
||||
var y = Math.abs(points[1][1] + points[2][1]) / 2;
|
||||
ctx.moveTo(points[0][0], points[0][1]);
|
||||
ctx.lineTo(points[1][0], points[1][1]);
|
||||
|
||||
shape.counterclockwise && ctx.arc(x, y, r, Math.PI / 2, Math.PI * 3 / 2, false);
|
||||
shape.counterclockwise || ctx.arc(x, y, r, Math.PI / 2, -Math.PI / 2, true);
|
||||
shape.counterclockwise && ctx.arc(x, y, r, Math.PI / 2, Math.PI * 3 / 2, false);
|
||||
shape.counterclockwise || ctx.arc(x, y, r, Math.PI / 2, -Math.PI / 2, true);
|
||||
|
||||
ctx.moveTo(points[2][0], points[2][1]);
|
||||
ctx.lineTo(points[3][0], points[3][1]);
|
||||
ctx.moveTo(points[2][0], points[2][1]);
|
||||
ctx.lineTo(points[3][0], points[3][1]);
|
||||
|
||||
ctx.closePath();
|
||||
ctx.closePath();
|
||||
|
||||
points = shape.points;
|
||||
r = Math.abs(points[1][1] - points[2][1]) / 2;
|
||||
x = Math.abs(points[1][0] + points[2][0]) / 2;
|
||||
y = Math.abs(points[1][1] + points[2][1]) / 2;
|
||||
ctx.moveTo(points[0][0], points[0][1]);
|
||||
ctx.lineTo(points[1][0], points[1][1]);
|
||||
points = shape.points;
|
||||
r = Math.abs(points[1][1] - points[2][1]) / 2;
|
||||
x = Math.abs(points[1][0] + points[2][0]) / 2;
|
||||
y = Math.abs(points[1][1] + points[2][1]) / 2;
|
||||
ctx.moveTo(points[0][0], points[0][1]);
|
||||
ctx.lineTo(points[1][0], points[1][1]);
|
||||
|
||||
shape.counterclockwise && ctx.arc(x, y, r, Math.PI / 2, Math.PI * 3 / 2, false);
|
||||
shape.counterclockwise || ctx.arc(x, y, r, Math.PI / 2, -Math.PI / 2, true);
|
||||
shape.counterclockwise && ctx.arc(x, y, r, Math.PI / 2, Math.PI * 3 / 2, false);
|
||||
shape.counterclockwise || ctx.arc(x, y, r, Math.PI / 2, -Math.PI / 2, true);
|
||||
|
||||
ctx.moveTo(points[2][0], points[2][1]);
|
||||
ctx.lineTo(points[3][0], points[3][1]);
|
||||
ctx.moveTo(points[2][0], points[2][1]);
|
||||
ctx.lineTo(points[3][0], points[3][1]);
|
||||
|
||||
ctx.closePath();
|
||||
}
|
||||
ctx.closePath();
|
||||
}
|
||||
});
|
||||
|
@ -219,6 +219,9 @@ export default {
|
||||
mounted() {
|
||||
this.resetPosition();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.buttonDown(this.Command.cancel.clearMbm.operation);
|
||||
},
|
||||
methods: {
|
||||
passWordCommit(data) {
|
||||
const operate = {
|
||||
|
@ -42,16 +42,6 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '设置跳停',
|
||||
handler: this.setJumpStop,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
},
|
||||
{
|
||||
label: '取消跳停',
|
||||
handler: this.cancelJumpStop,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
|
@ -43,6 +43,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import ConfirmControl from '../childDialog/confirmControl';
|
||||
@ -290,7 +291,8 @@ export default {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: data.operation,
|
||||
cmdType: data.cmdType
|
||||
// cmdType: data.cmdType
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
|
@ -127,7 +127,8 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
'stationList',
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
@ -157,20 +158,22 @@ export default {
|
||||
methods: {
|
||||
loadInitData(selected) {
|
||||
this.tempData = [];
|
||||
|
||||
this.stationList.sort((a, b) => {
|
||||
return parseInt(a.kmRange) - parseInt(b.kmRange);
|
||||
});
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
let stationStand, station;
|
||||
if (selected.direction == '01') { // 下行
|
||||
if (!selected.right) { // 下行
|
||||
// 下行时,此站不是最后一站
|
||||
if (index != 0) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
station = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
stationStand = this.stationStandList.find(stand => stand.stationCode === station.code && !stand.right);
|
||||
}
|
||||
} else {
|
||||
// 上行时,此站不是最后一站
|
||||
if (index != this.stationList.length - 1) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
station = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
stationStand = this.stationStandList.find(stand => stand.stationCode === station.code && stand.right);
|
||||
}
|
||||
}
|
||||
|
||||
@ -186,7 +189,7 @@ export default {
|
||||
if (!stationStand || !station) {
|
||||
this.treeData[2].children[0].value = `自动`;
|
||||
} else {
|
||||
this.treeData[2].children[0].value = selected.runLevelTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动`;
|
||||
this.treeData[2].children[0].value = selected.runLevelTime > 0 ? `至${station.name}${stationStand.name}:人工(${selected.runLevelTime})` : `至${station.name}${stationStand.name}:自动`;
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
@ -247,7 +250,7 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content-left{
|
||||
width: 46%;
|
||||
width: 34%;
|
||||
float: left;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
@ -255,7 +258,7 @@ export default {
|
||||
border-right: 1px solid #f0f0f0;
|
||||
}
|
||||
.content-right{
|
||||
width: 54%;
|
||||
width: 66%;
|
||||
float: left;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
|
@ -198,22 +198,25 @@ export default {
|
||||
},
|
||||
loadInitData(selected) {
|
||||
this.tempData = [];
|
||||
this.stationList.sort((a, b) => {
|
||||
return parseInt(a.kmRange) - parseInt(b.kmRange);
|
||||
});
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
if (selected.direction == '01') { // 下行
|
||||
let stationStand, station;
|
||||
if (!selected.right) { // 下行
|
||||
// 下行时,此站不是最后一站
|
||||
if (index != 0) {
|
||||
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: selected.runLevelTime ? this.getLevelByTime(selected.runLevelTime) : '0', time: selected.runLevelTime ? selected.runLevelTime : 0, check: selected.runLevelTimeForever });
|
||||
station = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
stationStand = this.stationStandList.find(stand => stand.stationCode === station.code && !stand.right);
|
||||
}
|
||||
} else {
|
||||
// 上行时,此站不是最后一站
|
||||
if (index != this.stationList.length) {
|
||||
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: selected.runLevelTime ? this.getLevelByTime(selected.runLevelTime) : '0', time: selected.runLevelTime ? selected.runLevelTime : 0, check: selected.runLevelTimeForever });
|
||||
if (index != this.stationList.length - 1) {
|
||||
station = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
stationStand = this.stationStandList.find(stand => stand.stationCode === station.code && stand.right);
|
||||
}
|
||||
}
|
||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: selected.runLevelTime ? this.getLevelByTime(selected.runLevelTime) : '0', time: selected.runLevelTime ? selected.runLevelTime : 0, check: selected.runLevelTimeForever });
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
|
@ -41,7 +41,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" :label="this.$t('menu.controlState')" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.controlType == '01'">{{ $t('menu.automatic') }}</span>
|
||||
<span v-if="scope.row.atsControl == '01'">{{ $t('menu.automatic') }}</span>
|
||||
<span v-else>{{ $t('menu.artificial') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -69,7 +69,8 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
'stationList',
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
@ -92,22 +93,24 @@ export default {
|
||||
methods: {
|
||||
loadInitData(selected) {
|
||||
this.tempData = [];
|
||||
this.stationList.sort((a, b) => {
|
||||
return parseInt(a.kmRange) - parseInt(b.kmRange);
|
||||
});
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
let stationStand, station;
|
||||
if (!selected.right) { // 下行
|
||||
// 下行时,此站不是最后一站
|
||||
if (index != 0) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
station = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
stationStand = this.stationStandList.find(stand => stand.stationCode === station.code && !stand.right);
|
||||
}
|
||||
} else {
|
||||
// 上行时,此站不是最后一站
|
||||
if (index != this.stationList.length - 1) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
station = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
stationStand = this.stationStandList.find(stand => stand.stationCode === station.code && stand.right);
|
||||
}
|
||||
}
|
||||
|
||||
/** 01: 未设置扣车 02: 车站扣车 03: 中心扣车 04: 中心+车站扣车*/
|
||||
this.tempData.push({ item: this.$t('menu.stationDetainTrain'), status: selected.stationHoldTrain ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') });
|
||||
this.tempData.push({ item: this.$t('menu.centerDetainTrain'), status: selected.centerHoldTrain ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') });
|
||||
@ -115,7 +118,7 @@ export default {
|
||||
if (!stationStand || !station) {
|
||||
this.tempData.push({ item: this.$t('menu.runLevel'), status: this.$t('menu.automatic2') });
|
||||
} else {
|
||||
this.tempData.push({ item: this.$t('menu.runLevel'), status: selected.runLevelTime > 0 ? this.$t('menu.to') + station.name + stationStand.name + this.$t('global.colon') + this.$t('menu.artificial') : this.$t('menu.to') + station.name + stationStand.name + this.$t('menu.automatic2') });
|
||||
this.tempData.push({ item: this.$t('menu.runLevel'), status: selected.runLevelTime > 0 ? this.$t('menu.to') + station.name + stationStand.name + this.$t('global.colon') + this.$t('menu.artificial') + '(' + selected.runLevelTime + ')' : this.$t('menu.to') + station.name + stationStand.name + this.$t('menu.automatic2') });
|
||||
}
|
||||
this.tempData.push({ item: this.$t('menu.jumpStop'), status: selected.assignSkip || selected.allSkip ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') });
|
||||
this.tempData.push({ item: this.$t('menu.downSwitchbackStrategy'), status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : this.$t('menu.default') });
|
||||
|
@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<div class="xian-02__menus" :style="{width: width + 'px'}">
|
||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||
<!-- <menu-axle-reset ref="menuAxleReset" :selected="selected" /> -->
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
||||
<!-- <menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" /> -->
|
||||
<!-- <menu-station-control ref="menuStationControl" :selected="selected" /> -->
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
<menu-section ref="menuSection" :selected="selected" />
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<menu-limit ref="menuLimit" :selected="selected" />
|
||||
<!-- <menu-limit ref="menuLimit" :selected="selected" /> -->
|
||||
<passive-contorl ref="passiveControl" />
|
||||
<menu-request ref="menuRequest" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" @popMenuStationStand="popMenuStationStand" @totalMenuEvent="totalMenuEvent" />
|
||||
@ -20,41 +20,37 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuAxleReset from './menuAxleReset';
|
||||
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
||||
// import MenuAxleReset from './menuAxleReset';
|
||||
// import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
||||
// import MenuStationControl from './menuStationControl';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
import MenuSection from './menuSection';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuStation from './menuStation';
|
||||
import MenuLimit from './menuLimit';
|
||||
// import MenuLimit from './menuLimit';
|
||||
import MenuCancel from './menuCancel';
|
||||
// import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from './passiveDialog/control';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import PopStationStand from './popStationStand';
|
||||
import MenuRequest from './menuRequest';
|
||||
// import PassiveTimeout from './passiveDialog/timeout';
|
||||
|
||||
export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuAxleReset,
|
||||
MenuAutoTrunRoute,
|
||||
// MenuAxleReset,
|
||||
// MenuAutoTrunRoute,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
// MenuStationControl,
|
||||
MenuStation,
|
||||
MenuTrain,
|
||||
MenuLimit,
|
||||
// MenuLimit,
|
||||
MenuStationStand,
|
||||
MenuCancel,
|
||||
// PassiveAlarm,
|
||||
PassiveContorl,
|
||||
PopStationStand,
|
||||
MenuRequest
|
||||
// PassiveTimeout
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
|
@ -54,7 +54,7 @@ export default {
|
||||
trainingName: '设置跳停({10}-{12}站台)',
|
||||
trainingRemark: '设置跳停功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '00a', tip: '鼠标右键点击打开站台概要表' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5027', tip: '鼠标右键菜单选择【列车跳停本站】' },
|
||||
@ -70,7 +70,7 @@ export default {
|
||||
trainingName: '取消跳停({10}-{12}站台)',
|
||||
trainingRemark: '设置取消跳停功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '00a', tip: '鼠标右键点击打开站台概要表' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5037', tip: '鼠标右键菜单选择【取消列车跳停本站】' },
|
||||
|
@ -10,9 +10,9 @@
|
||||
<el-dropdown-item>
|
||||
<span style="display:block;" @click="handleDetail">{{ $t('global.personalDetails') }}</span>
|
||||
</el-dropdown-item>
|
||||
<!--<el-dropdown-item>-->
|
||||
<!--<span style="display:block;" @click="handleOrganization">{{ $t('global.organization') }}</span>-->
|
||||
<!--</el-dropdown-item>-->
|
||||
<el-dropdown-item v-if="companyAdmin">
|
||||
<span style="display:block;" @click="handleOrganization">{{ $t('global.organization') }}</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<span style="display:block;" @click="logout">{{ $t('global.exit') }}</span>
|
||||
</el-dropdown-item>
|
||||
@ -37,6 +37,9 @@ export default {
|
||||
computed: {
|
||||
username() {
|
||||
return this.$store.state.user.nickname;
|
||||
},
|
||||
companyAdmin() {
|
||||
return this.$store.state.user.companyAdmin;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -7,12 +7,6 @@ import 'nprogress/nprogress.css';
|
||||
import { getToken, removeToken, getSessionStorage } from '@/utils/auth';
|
||||
import localStore from 'storejs';
|
||||
|
||||
// function hasPermission(roles, permissionRoles) {
|
||||
// if (roles.indexOf(admin) >= 0) return true;
|
||||
// if (!permissionRoles) return true;
|
||||
// return roles.some(role => permissionRoles.indexOf(role) >= 0);
|
||||
// }
|
||||
|
||||
const whiteList = ['/login', '/design/login', '/gzzbxy/relay', '/authorization', '/AUSline', '/AUStool']; // 不重定向白名单
|
||||
|
||||
for (const val in loginInfo) {
|
||||
|
@ -18,7 +18,10 @@ const user = {
|
||||
wxId: '',
|
||||
wxUnionId: '',
|
||||
account: '',
|
||||
projectDevice: ''
|
||||
projectDevice: '',
|
||||
companyId: '',
|
||||
companyAdmin: false,
|
||||
companyName: ''
|
||||
},
|
||||
|
||||
mutations: {
|
||||
@ -49,6 +52,15 @@ const user = {
|
||||
SET_ACCOUNT: (state, account) => {
|
||||
state.account = account;
|
||||
},
|
||||
SET_COMPANYID: (state, companyId) => {
|
||||
state.companyId = companyId;
|
||||
},
|
||||
SET_COMPANYADMIN: (state, companyAdmin) => {
|
||||
state.companyAdmin = companyAdmin;
|
||||
},
|
||||
SET_COMPANYNAME: (state, companyName) => {
|
||||
state.companyName = companyName;
|
||||
},
|
||||
CLEAR_AUTO_PARAMS: () => {
|
||||
Cookies.remove('UserDesignName');
|
||||
Cookies.remove('UserDesignToken');
|
||||
@ -123,6 +135,9 @@ const user = {
|
||||
commit('SET_NATIONCODE', user.nationcode);
|
||||
commit('SET_WXID', user.wxId);
|
||||
commit('SET_WXUNIONID', user.wxUnionId);
|
||||
commit('SET_COMPANYID', user.companyId);
|
||||
commit('SET_COMPANYADMIN', user.companyAdmin);
|
||||
commit('SET_COMPANYNAME', user.companyName);
|
||||
resolve(user);
|
||||
}).catch(error => {
|
||||
reject(error);
|
||||
|
@ -2,11 +2,11 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://api.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.129:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.8.119:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.110:9000'; // 杜康
|
||||
BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
|
@ -56,7 +56,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-back" @click="back">返回</div>
|
||||
<div v-if="!noPreLogout" class="bottom-back" @click="back">返回</div>
|
||||
<div v-if="noPreLogout" class="bottom-back" @click="quit">退出</div>
|
||||
<!-- :class="{'disable_box': alarmInfo}" -->
|
||||
<div class="bottom-back" @click="handleAlarmInfo">
|
||||
报警
|
||||
@ -308,6 +309,11 @@ export default {
|
||||
manage:{name:'管理', type:'totalSystem', id: 'manage', active:false, icon:iscs_icon9 }
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
noPreLogout() {
|
||||
return this.$route.query.noPreLogout;
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
$route() {
|
||||
const data = Object.values(this.buttonList);
|
||||
@ -453,6 +459,9 @@ export default {
|
||||
this.$message.error('清除仿真失败!');
|
||||
});
|
||||
}
|
||||
},
|
||||
quit() {
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -168,6 +168,7 @@ export default {
|
||||
},
|
||||
clearForm() {
|
||||
this.chapterModel.trainingId = '';
|
||||
this.chapterModel.parentId = null;
|
||||
this.chapterModel.trainings = [];
|
||||
this.$refs.form.resetFields();
|
||||
},
|
||||
|
@ -27,6 +27,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isInGennerate: true,
|
||||
mapIdList: [],
|
||||
trainingTypeList: [],
|
||||
trainingOperateTypeMap: {
|
||||
@ -183,21 +184,28 @@ export default {
|
||||
if (data.data) {
|
||||
this.queryList.actions.pop();
|
||||
this.queryList.actions.push({ text: this.$t('lesson.trainingGenerating'), btnCode: 'employee_auto', handler: this.autoMaticTrainging, disabled:true });
|
||||
this.isInGennerate = true;
|
||||
this.queryList.data = [];
|
||||
this.queryList.total = 0;
|
||||
} else {
|
||||
this.queryList.actions.pop();
|
||||
this.queryList.actions.push({ text: this.$t('lesson.generateTraining'), btnCode: 'employee_auto', handler: this.autoMaticTrainging, disabled:false });
|
||||
if (this.isInGennerate) {
|
||||
this.isInGennerate = false;
|
||||
this.reloadTable();
|
||||
}
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (!this.isLeaving) {
|
||||
this.interCheckGenerateStatus(this.$route.query.mapId, false);
|
||||
this.interCheckGenerateStatus();
|
||||
}
|
||||
}, 15000);
|
||||
}, 3000);
|
||||
}).catch(()=>{
|
||||
setTimeout(() => {
|
||||
if (!this.isLeaving) {
|
||||
this.interCheckGenerateStatus(this.$route.query.mapId, false);
|
||||
this.interCheckGenerateStatus();
|
||||
}
|
||||
}, 15000);
|
||||
}, 3000);
|
||||
});
|
||||
},
|
||||
async prdChoose(queryData) {
|
||||
@ -270,6 +278,9 @@ export default {
|
||||
this.queryList.actions.push({ text: this.$t('lesson.trainingGenerating'), btnCode: 'employee_auto', handler: this.autoMaticTrainging, disabled:true });
|
||||
try {
|
||||
const data = await createAllTrainingList(this.$route.query.mapId, true);
|
||||
this.isInGennerate = true;
|
||||
this.queryList.data = [];
|
||||
this.queryList.total = 0;
|
||||
this.$message.success('实训生成中...');
|
||||
instance.confirmButtonLoading = false;
|
||||
if (!data.data) {
|
||||
|
@ -439,7 +439,9 @@ export default {
|
||||
}
|
||||
});
|
||||
// { label: '全部集中站', value: 'allConcentrateStation', active: false, sign: 'DEVICE_STATION' },
|
||||
stationSupervisorList['ALL_STATION'] = { label: '所有车站', value: 'allStation', active: false, sign: 'ALL_STATION' };
|
||||
if (this.$store.state.training.prdType == '02') {
|
||||
stationSupervisorList['ALL_STATION'] = { label: '所有车站', value: 'allStation', active: false, sign: 'ALL_STATION' };
|
||||
}
|
||||
driverList['ALL_TRAIN'] = { label: '所有司机', value: 'allTrain', show: false, active: false, sign: 'ALL_TRAIN' };
|
||||
this.treeData = [{
|
||||
label: '行调',
|
||||
@ -675,8 +677,34 @@ export default {
|
||||
// this.$message.success('创建会话成功!');
|
||||
this.createLoading = false;
|
||||
}).catch((error) => {
|
||||
this.$message.error(error.code == '3005' ? '创建会话失败:仿真会话成员忙线中!' : '创建会话失败:' + error.message);
|
||||
this.$message.error(error.code == '5000' ? '创建会话失败:仿真会话成员忙线中!' : '创建会话失败:' + error.message);
|
||||
this.createLoading = false;
|
||||
// 待后端处理
|
||||
this.memberIdList.forEach(each=>{
|
||||
this.treeData.forEach(data => {
|
||||
if (data.children) {
|
||||
const member = data.children[each];
|
||||
if (member) {
|
||||
member.isConnect = false;
|
||||
member.loading = false;
|
||||
member.active = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
if (this.memberObject == 'ALL_STATION') {
|
||||
const stationList = this.treeData[1].children;
|
||||
const member = stationList['ALL_STATION'];
|
||||
member.active = false;
|
||||
member.loading = false;
|
||||
member.isConnect = false;
|
||||
} else if (this.memberObject == 'ALL_TRAIN') {
|
||||
const trainList = this.treeData[2].children;
|
||||
const train = trainList['ALL_TRAIN'];
|
||||
train.active = false;
|
||||
train.loading = false;
|
||||
train.isConnect = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.userString = '请选择人员';
|
||||
|
@ -4,9 +4,13 @@
|
||||
<div class="closeFalutChoose" @click="closeFaultChoose">
|
||||
<span class="el-icon-close closeFalutChooseIn" />
|
||||
</div>
|
||||
<!-- <div class="minimizeFalutChoose">
|
||||
<span class="el-icon-close closeFalutChooseIn" />
|
||||
</div> -->
|
||||
<el-card class="triggerFaultInfo">
|
||||
<el-table :data="faultList" height="300" border style="width: 100%">
|
||||
<el-table-column prop="targetDeviceCode" label="目标设备" width="180">
|
||||
<el-button type="primary" size="small" style="margin-bottom:10px;" @click="isTableShow=!isTableShow">{{ isTableShow?'隐藏列表':'显示列表' }}</el-button>
|
||||
<el-table v-if="isTableShow" :data="faultList" height="300" border style="width: 100%;font-size:13px;">
|
||||
<el-table-column prop="targetDeviceCode" label="目标设备" width="220">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ `${deviceMap[scope.row.targetDeviceType]}${formatNameByCode(scope.row.targetDeviceCode)}` }}</span>
|
||||
</template>
|
||||
@ -21,7 +25,7 @@
|
||||
<!--<span>{{ scope.row.condition.type === 'DEVICE'?'设备':'时间' }}</span>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column prop="condition" label="列车" width="150">
|
||||
<el-table-column prop="condition" label="列车" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ `${deviceMap[scope.row.condition.triggerDeviceType] || ''}${formatNameByCode(scope.row.condition.triggerDeviceCode)}` }}</span>
|
||||
</template>
|
||||
@ -31,12 +35,12 @@
|
||||
<!--<span>{{ formatTriggerStatus(scope.row.condition) }}</span>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column prop="condition" label="到达区段" width="150">
|
||||
<el-table-column prop="condition" label="到达区段" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ `${formatNameByCode(scope.row.condition.triggerAssociatedDeviceCode)}` }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="condition.condition.triggerTime" label="触发时间" width="180" />
|
||||
<el-table-column prop="condition.condition.triggerTime" label="触发时间" width="150" />
|
||||
<el-table-column prop="triggeringTime" label="故障状态">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.triggeringTime? '已触发': '未触发' }}</span>
|
||||
@ -49,71 +53,71 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<div class="card">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-button style="float: right; padding: 3px 0" type="text" @click="addRulesCreate">新增</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-form ref="form" :model="faultRule" :inline="true" label-width="100px" style="margin-left:15px;">
|
||||
<el-form-item label="目标设备">
|
||||
<!-- faultRule.targetDeviceCode -->
|
||||
<el-input v-model="targetDeviceName" disabled size="small" class="inputModelClass" style="width: 300px;" />
|
||||
<!--<el-button :type="field === 'targetActive' ? 'danger' : 'primary'" size="small" @click="hover('targetActive')">{{ $t('map.activate') }}</el-button>-->
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="触发方式">-->
|
||||
<!--<el-select v-model="triggerMode" size="small" style="width: 200px;" @change="changeTriggerMode">-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in triggerModeList"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value"-->
|
||||
<!--/>-->
|
||||
<!--</el-select>-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item label="故障类型">
|
||||
<el-select v-model="faultRule.faultType" placeholder="请选择" class="inputModelClass" size="small" style="width: 300px;">
|
||||
<el-option
|
||||
v-for="item in faultTypeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="triggerMode === 'DEVICE'" label="列车">
|
||||
<!-- faultRule.condition.triggerDeviceCode -->
|
||||
<el-input v-model="triggerDevice" size="small" disabled class="inputModelClass" style="width: 240px;" />
|
||||
<el-button :type="field === 'triggerActive' ? 'danger' : 'primary'" size="small" @click="hover('triggerActive')">{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<!--<el-form-item v-if="triggerMode === 'DEVICE'" label="触发状态">-->
|
||||
<!--<!– <el-input v-model="faultRule.condition.triggerDeviceStatus" size="small" class="inputModelClass" /> –>-->
|
||||
<!--<el-select v-model="faultRule.condition.triggerDeviceStatus" placeholder="请选择" class="inputModelClass" size="small" style="width: 200px;">-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in triggerStatusList"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value"-->
|
||||
<!--/>-->
|
||||
<!--</el-select>-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item v-if="triggerMode === 'DEVICE'" label="到达区段">
|
||||
<el-input v-model="triggerAssociatedDevice" size="small" disabled class="inputModelClass" style="width: 240px;" />
|
||||
<el-button :type="field === 'triggerAssociated'? 'danger': 'primary'" size="small" @click="hover('triggerAssociated')">{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="triggerMode === 'TIME'" label="触发时间">
|
||||
<el-date-picker
|
||||
v-model="faultRule.condition.triggerTime"
|
||||
size="small"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
<div class="targetCard">
|
||||
<!-- <el-card class="box-card"> -->
|
||||
<div class="targetCardHead">
|
||||
<el-button style="padding:3px 0" type="text" @click="addRulesCreate">新增</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-form ref="form" :model="faultRule" :inline="true" label-width="100px" style="margin-left:15px;">
|
||||
<el-form-item label="目标设备" class="targetFormItem">
|
||||
<!-- faultRule.targetDeviceCode -->
|
||||
<el-input v-model="targetDeviceName" disabled size="small" class="inputModelClass" style="width: 300px;" />
|
||||
<!--<el-button :type="field === 'targetActive' ? 'danger' : 'primary'" size="small" @click="hover('targetActive')">{{ $t('map.activate') }}</el-button>-->
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="触发方式">-->
|
||||
<!--<el-select v-model="triggerMode" size="small" style="width: 200px;" @change="changeTriggerMode">-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in triggerModeList"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value"-->
|
||||
<!--/>-->
|
||||
<!--</el-select>-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item label="故障类型" class="targetFormItem">
|
||||
<el-select v-model="faultRule.faultType" placeholder="请选择" class="inputModelClass" size="small" style="width: 300px;">
|
||||
<el-option
|
||||
v-for="item in faultTypeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="triggerMode === 'DEVICE'" label="列车" class="targetFormItem">
|
||||
<!-- faultRule.condition.triggerDeviceCode -->
|
||||
<el-input v-model="triggerDevice" size="small" disabled class="inputModelClass" style="width: 240px;" />
|
||||
<el-button :type="field === 'triggerActive' ? 'danger' : 'primary'" size="small" @click="hover('triggerActive')">{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<!--<el-form-item v-if="triggerMode === 'DEVICE'" label="触发状态">-->
|
||||
<!--<!– <el-input v-model="faultRule.condition.triggerDeviceStatus" size="small" class="inputModelClass" /> –>-->
|
||||
<!--<el-select v-model="faultRule.condition.triggerDeviceStatus" placeholder="请选择" class="inputModelClass" size="small" style="width: 200px;">-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in triggerStatusList"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value"-->
|
||||
<!--/>-->
|
||||
<!--</el-select>-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item v-if="triggerMode === 'DEVICE'" label="到达区段" class="targetFormItem">
|
||||
<el-input v-model="triggerAssociatedDevice" size="small" disabled class="inputModelClass" style="width: 240px;" />
|
||||
<el-button :type="field === 'triggerAssociated'? 'danger': 'primary'" size="small" @click="hover('triggerAssociated')">{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="triggerMode === 'TIME'" label="触发时间" class="targetFormItem">
|
||||
<el-date-picker
|
||||
v-model="faultRule.condition.triggerTime"
|
||||
size="small"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- </el-card> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -143,6 +147,7 @@ export default {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
isAdd:false,
|
||||
isTableShow:true,
|
||||
deviceMap: {},
|
||||
simulationFault:{},
|
||||
faultList: [],
|
||||
@ -582,7 +587,7 @@ export default {
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
.triggerFaultInfo{
|
||||
margin-bottom:10px;
|
||||
padding: 10px 0px 10px 15px;
|
||||
padding: 10px 10px 10px 15px;
|
||||
}
|
||||
.triggerFaultList{
|
||||
font-size: 14px;
|
||||
@ -627,4 +632,20 @@ export default {
|
||||
margin-left: 5px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.targetCard{
|
||||
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
|
||||
border-top: 1px #ebeef5 solid;
|
||||
}
|
||||
.targetFormItem{
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.targetCardHead{
|
||||
padding: 5px;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px #f4f4f4 solid;
|
||||
text-align: right;
|
||||
padding-right: 15px;
|
||||
}
|
||||
</style>
|
||||
|
@ -14,7 +14,7 @@
|
||||
<!-- notScript && -->
|
||||
<el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||
</el-button-group>
|
||||
<el-button v-if="!isScheduling" size="small" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式':'切换到故障模式' }}</el-button>
|
||||
<el-button v-if="!isScheduling" size="small" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式[Tab]':'切换到故障模式[Tab]' }}</el-button>
|
||||
<!-- <el-button v-if="!isLocalStation" size="small" :type="faultMode ? 'danger' : ''" @click="changeDirectiveMode()">指令模式</el-button> -->
|
||||
</template>
|
||||
</div>
|
||||
@ -38,6 +38,7 @@ import { getSessionStorage } from '@/utils/auth';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getIbpInfoByStation } from '@/api/ibp';
|
||||
import { loadRunPlanData } from '@/utils/loaddata';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
// 右上角操作
|
||||
export default {
|
||||
@ -128,6 +129,13 @@ export default {
|
||||
this.viewDisabled = false;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
EventBus.$on('CheckFaultModeEvent', () => {
|
||||
if (!this.isScheduling) {
|
||||
this.changeOperateMode();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadRunData() {
|
||||
this.$store.dispatch('runPlan/clear').then(() => {
|
||||
|
@ -24,7 +24,7 @@
|
||||
<el-button v-if="running" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
|
||||
<el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||
</el-button-group>
|
||||
<el-button v-if="!isScheduling" size="small" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式':'切换到故障模式' }}</el-button>
|
||||
<el-button v-if="!isScheduling" size="small" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式[Tab]':'切换到故障模式[Tab]' }}</el-button>
|
||||
</template>
|
||||
</div>
|
||||
<!-- 菜单按钮列表 -->
|
||||
@ -133,6 +133,11 @@ export default {
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
EventBus.$on('CheckFaultModeEvent', () => {
|
||||
if (!this.isScheduling) {
|
||||
this.changeOperateMode();
|
||||
}
|
||||
});
|
||||
await this.initLoadData();
|
||||
},
|
||||
async beforeDestroy() {
|
||||
|
@ -349,6 +349,8 @@ export default {
|
||||
switch (hook) {
|
||||
case 'Update': this.$store.dispatch('map/setKeyboardEnter');
|
||||
break;
|
||||
case 'Tab': EventBus.$emit('CheckFaultModeEvent');
|
||||
break;
|
||||
}
|
||||
},
|
||||
async simulationReset() {
|
||||
|
@ -6,7 +6,7 @@
|
||||
<!--</el-select>-->
|
||||
<el-button-group>
|
||||
<el-button v-if="userRole=== 'STATION_SUPERVISOR' && !$route.query.projectDevice" size="small" @click="goIbp">IBP盘</el-button>
|
||||
<el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice" size="small" @click="goBigScreen">大屏</el-button>
|
||||
<el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice" size="small" :disabled="!hasBigScreen" @click="goBigScreen">大屏</el-button>
|
||||
<el-button v-if="userRole==='DISPATCHER' && !$route.query.projectDevice" size="small" @click="goIscs">ISCS</el-button>
|
||||
<el-button v-if="running && !dataError && $route.query.type !== 'ILW'" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
|
||||
<template v-if="isAdmin">
|
||||
@ -14,9 +14,9 @@
|
||||
{{ $t('joinTraining.runGraphLoading') }}</el-button><!-- 运行图加载 -->
|
||||
</template>
|
||||
</el-button-group>
|
||||
<el-button v-if="(isAdmin || $route.query.type === 'ILW') && !dataError && !isScreen" size="small" :type="faultMode ? '' : 'primary' " @click="changeOperateMode()">{{ faultMode?' 切换到普通模式':'切换到故障模式' }}</el-button>
|
||||
<el-button v-if="(isAdmin || $route.query.type === 'ILW') && !dataError && !isScreen" size="small" :type="faultMode ? '' : 'primary' " @click="changeOperateMode()">{{ faultMode?' 切换到普通模式[Tab]':'切换到故障模式[Tab]' }}</el-button>
|
||||
<!-- isCenter && !dataError && !isAdmin 此判断用于以后(目前 暂时不用) -->
|
||||
<el-button v-if="isShowDirective" size="small" :type="directiveMode ? 'primary' : ''" @click="changeDirectiveMode()">{{ directiveMode? '切换到普通模式':'切换到指令模式' }}</el-button>
|
||||
<el-button v-if="isShowDirective" size="small" :type="directiveMode ? 'primary' : ''" @click="changeDirectiveMode()">{{ directiveMode? '切换到普通模式[Tab]':'切换到指令模式[Tab]' }}</el-button>
|
||||
</div>
|
||||
<join-run-plan-view v-if="running && !dataError" ref="runPlanView" :group="group" />
|
||||
<select-ibp ref="selectIbp" />
|
||||
@ -32,6 +32,8 @@ import JoinRunPlanView from '@/views/newMap/displayNew/demon/runPlanView';
|
||||
import SelectIbp from '@/views/newMap/displayNew/demon/selectIbp';
|
||||
import { getIbpInfoByStation } from '@/api/ibp';
|
||||
import { loadRunPlanData } from '@/utils/loaddata';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { queryHasIscs } from '@/api/iscs';
|
||||
export default {
|
||||
name: 'MenuDemonSchema',
|
||||
components:{
|
||||
@ -102,6 +104,9 @@ export default {
|
||||
...mapGetters('runPlan', [
|
||||
'stations'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'bigScreenConfig'
|
||||
]),
|
||||
running() {
|
||||
return this.$store.state.training.started;
|
||||
},
|
||||
@ -113,6 +118,9 @@ export default {
|
||||
},
|
||||
isShowDirective() { // 哈尔滨项目 行调设备显示
|
||||
return this.$route.query.type == 'CW' && this.project == 'heb';
|
||||
},
|
||||
hasBigScreen() {
|
||||
return this.bigScreenConfig.bigScreenSplitConfig && this.bigScreenConfig.bigScreenSplitConfig.length;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -139,6 +147,14 @@ export default {
|
||||
},
|
||||
async mounted() {
|
||||
this.userId = this.$store.state.user.id;
|
||||
EventBus.$on('CheckFaultModeEvent', () => {
|
||||
if ((this.isAdmin || this.$route.query.type === 'ILW') && !this.dataError && !this.isScreen) {
|
||||
this.changeOperateMode();
|
||||
}
|
||||
if (this.isShowDirective) {
|
||||
this.changeDirectiveMode();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadRunData(opt) {
|
||||
@ -204,16 +220,24 @@ export default {
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
goIscs() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:`/displayIscs/system`,
|
||||
query:{
|
||||
lineCode: this.$route.query.lineCode,
|
||||
mapId: this.$route.query.mapId,
|
||||
group: this.$route.query.group,
|
||||
noPreLogout: true
|
||||
queryHasIscs({mapId: this.$route.query.mapId}).then(resp => {
|
||||
if (resp.data) {
|
||||
const routeData = this.$router.resolve({
|
||||
path:`/displayIscs/system`,
|
||||
query:{
|
||||
lineCode: this.$route.query.lineCode,
|
||||
mapId: this.$route.query.mapId,
|
||||
group: this.$route.query.group,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
} else {
|
||||
this.$messageBox('该地图线路暂无ISCS数据!');
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('查询ISCS数据异常');
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
// 点击ibp预览
|
||||
goIbp() {
|
||||
|
@ -1,68 +1,279 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="back_box">
|
||||
<el-button v-if="companyAdmin" :loading="loadingStudentInfo" type="text" class="uploadDemo" style="margin-top: 10px;">
|
||||
<input
|
||||
id="importResults"
|
||||
ref="files"
|
||||
type="file"
|
||||
class="file_box"
|
||||
accept=".json, application/json, .csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
|
||||
@change="importResults"
|
||||
>
|
||||
导入学生信息
|
||||
</el-button>
|
||||
<el-button type="text" @click="goBack">返回</el-button>
|
||||
</div>
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tabs v-model="activeName" type="card">
|
||||
<el-tab-pane label="部门管理" name="first">
|
||||
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick" />
|
||||
<div style="font-size: 22px;text-align: center;">{{ $store.state.user.companyName }}</div>
|
||||
<div style="position: relative;transform: translateX(-50%);left: 50%;padding: 20px;width: 500px;">
|
||||
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick">
|
||||
<div slot-scope="{ node, data }" style="display: flex;justify-content: space-between;align-items: center;width: 100%;">
|
||||
<div>{{ data.name }}</div>
|
||||
<div>
|
||||
<el-button type="text" @click="() => editDept(data)">编辑</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-tree>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="成员管理" name="second">
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<el-row>
|
||||
<el-col :span="21" :offset="1">
|
||||
<span>班级</span>
|
||||
<el-select v-model="classId" size="small" placeholder="班级">
|
||||
<el-option
|
||||
v-for="item in classList"
|
||||
:key="item.departmentId"
|
||||
:label="item.departmentName"
|
||||
:value="item.departmentId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-button type="primary" size="small" @click="onSubmit">查询</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="tableData" border style="width: 100%;margin-top: 10px;" :max-height="height">
|
||||
<el-table-column prop="account" label="学号" />
|
||||
<el-table-column prop="name" label="姓名" />
|
||||
<el-table-column prop="companyName" label="组织" />
|
||||
<el-table-column prop="departmentName" label="班级" />
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: center;padding: 10px;">
|
||||
<el-pagination
|
||||
:current-page="currentPage"
|
||||
:page-sizes="[10, 20, 30, 50, 100]"
|
||||
:page-size="pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="totalNum"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-dialog
|
||||
title="修改部门名称"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
>
|
||||
<el-input v-model="newDeptName" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="updateDeptName">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCompanyDeptInfo, importCompanyMember, queryDeptInfoPaging, getAllDeptTree, deleteDepartUserRelation, updateDeptInfo } from '@/api/company';
|
||||
import { convertSheetToList } from '@/utils/runPlan';
|
||||
import XLSX from 'xlsx';
|
||||
|
||||
export default {
|
||||
name: 'Organization',
|
||||
data() {
|
||||
return {
|
||||
activeName: 'first',
|
||||
defaultProps: '',
|
||||
data: '',
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
activeName: 'second',
|
||||
defaultProps: {
|
||||
children: 'childDept',
|
||||
label: 'name'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '140px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
classId: {
|
||||
type: 'select',
|
||||
label: '班级',
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '学号',
|
||||
prop: 'studentID'
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '班级',
|
||||
prop: 'classId'
|
||||
}
|
||||
]
|
||||
}
|
||||
currentPage: 1,
|
||||
totalNum: 0,
|
||||
pageSize: 10,
|
||||
data: [],
|
||||
tableData: [],
|
||||
loadingStudentInfo: false,
|
||||
classId: '',
|
||||
classList: [],
|
||||
dialogVisible:false,
|
||||
editDeptInfo: '',
|
||||
newDeptName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
companyId() {
|
||||
return this.$store.state.user.companyId;
|
||||
},
|
||||
companyAdmin() {
|
||||
return this.$store.state.user.companyAdmin;
|
||||
},
|
||||
height() {
|
||||
return this.$store.state.app.height - 240;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.classList = [];
|
||||
this.data = [];
|
||||
this.getCompanyDept();
|
||||
this.getDeptTree();
|
||||
},
|
||||
methods: {
|
||||
handleClick() {
|
||||
this.dialogVisible = false;
|
||||
onSubmit() {
|
||||
if (this.classId) {
|
||||
const params = { deptId: this.classId, pageSize: this.pageSize, pageNum: this.currentPage };
|
||||
queryDeptInfoPaging(params).then(resp => {
|
||||
this.pageSize = resp.data.pageSize;
|
||||
this.currentPage = resp.data.pageNum;
|
||||
this.totalNum = resp.data.total;
|
||||
this.tableData = resp.data.list;
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
this.$message.error('查询学生信息失败!');
|
||||
});
|
||||
} else {
|
||||
this.$message.error('请选择班级!');
|
||||
}
|
||||
},
|
||||
getCompanyDept() {
|
||||
getCompanyDeptInfo(this.companyId).then(resp => {
|
||||
this.classList = resp.data;
|
||||
if (!this.classId && this.classList && this.classList.length) {
|
||||
this.classId = this.classList[0].departmentId;
|
||||
this.onSubmit();
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
this.$message.error('查询部门信息失败!');
|
||||
});
|
||||
},
|
||||
getDeptTree() {
|
||||
if (this.companyAdmin) {
|
||||
getAllDeptTree(this.companyId).then(resp => {
|
||||
this.data = resp.data;
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
this.$message.error('获取部门树信息失败!');
|
||||
});
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
console.log(val);
|
||||
this.pageSize = val;
|
||||
this.onSubmit();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
console.log(val);
|
||||
this.currentPage = val;
|
||||
this.onSubmit();
|
||||
},
|
||||
importResults(e) {
|
||||
const obj = this.$refs.files;
|
||||
if (obj.files) {
|
||||
const file = obj.files[0];
|
||||
this.handleImportResults(file);
|
||||
obj.value = '';
|
||||
}
|
||||
},
|
||||
editDept(data) {
|
||||
this.editDeptInfo = data;
|
||||
this.newDeptName = data.name;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
updateDeptName() {
|
||||
updateDeptInfo(this.editDeptInfo.id, {name: this.newDeptName}).then(resp => {
|
||||
this.dialogVisible = false;
|
||||
this.getDeptTree();
|
||||
this.getCompanyDept();
|
||||
}).catch(() => {
|
||||
this.$message.error('更新部门信息失败!');
|
||||
});
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
const _that = this;
|
||||
const data = { userId:row.userId, departmentId:row.departmentId };
|
||||
this.$confirm('是否确认删除成员部门关系?', this.$t('tip.hint'), {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteDepartUserRelation(data).then(response => {
|
||||
_that.onSubmit();
|
||||
}).catch(() => {
|
||||
_that.$message.error('删除成员部门关系失败!');
|
||||
});
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
handleImportResults(file) {
|
||||
const studentData = { depart: '', parentDepart: '', companyUsers:[] };
|
||||
if (file) {
|
||||
setTimeout(() => {
|
||||
const that = this;
|
||||
const reader = new FileReader();
|
||||
if (reader) {
|
||||
reader.onload = function (e) {
|
||||
let wb;
|
||||
const data = e.target.result;
|
||||
if (that.rABS) {
|
||||
wb = XLSX.read(btoa(that.fixdata(data)), { // 手动转化
|
||||
type: 'base64'
|
||||
});
|
||||
} else {
|
||||
wb = XLSX.read(data, {
|
||||
type: 'binary'
|
||||
});
|
||||
}
|
||||
if (wb) {
|
||||
try {
|
||||
const students = [];
|
||||
for (const index in wb.Sheets) {
|
||||
const dataList = convertSheetToList(wb.Sheets[index], true);
|
||||
if (dataList.length) {
|
||||
const depart = dataList[2][0].trim();
|
||||
const parentDepart = dataList[1][0].trim();
|
||||
studentData.depart = depart;
|
||||
studentData.parentDepart = parentDepart;
|
||||
for ( let i = 2; i <= dataList[0].length; i++) {
|
||||
if (dataList[2][i] && dataList[1][i]) {
|
||||
students.push({account:dataList[1][i], name: dataList[2][i]});
|
||||
}
|
||||
}
|
||||
}
|
||||
studentData.companyUsers = students;
|
||||
}
|
||||
that.loadingStudentInfo = true;
|
||||
console.log(that.companyId);
|
||||
importCompanyMember(that.companyId, studentData).then(resp => {
|
||||
that.$message.success('学生信息导入成功!');
|
||||
that.getCompanyDept();
|
||||
that.getDeptTree();
|
||||
}).catch((error) => {
|
||||
that.$message.error('学生信息导入失败:' + error.message);
|
||||
that.loadingStudentInfo = false;
|
||||
});
|
||||
} catch (error) {
|
||||
that.$message.warning(`解析学生信息表失败:${error}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
if (that.rABS) {
|
||||
reader.readAsArrayBuffer(file);
|
||||
} else {
|
||||
reader.readAsBinaryString(file);
|
||||
}
|
||||
}
|
||||
}, 200);
|
||||
}
|
||||
},
|
||||
goBack() {
|
||||
this.$router.go(-1);
|
||||
@ -82,9 +293,27 @@ export default {
|
||||
padding-right: 20px;
|
||||
height: 40px;
|
||||
z-index: 36;
|
||||
width: 60px;
|
||||
width: 200px;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
.file_box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
z-index: 100;
|
||||
}
|
||||
.uploadDemo {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
margin-right: 3px;
|
||||
cursor: pointer;
|
||||
padding: 0 15px;
|
||||
height: 28px;
|
||||
}
|
||||
</style>
|
||||
|
@ -2,7 +2,6 @@
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<edit-company ref="editCompany" @reloadTable="reloadTable" />
|
||||
<company-manager ref="companyManager" @reloadTable="reloadTable" />
|
||||
<qr-code ref="qrCode" />
|
||||
</div>
|
||||
</template>
|
||||
@ -11,13 +10,11 @@
|
||||
import { getCompanyListPaging, deleteCompany } from '@/api/company';
|
||||
import EditCompany from './add';
|
||||
import QrCode from '@/components/QrCode';
|
||||
import CompanyManager from './manager';
|
||||
export default {
|
||||
name: 'CompanyManage',
|
||||
components: {
|
||||
EditCompany,
|
||||
QrCode,
|
||||
CompanyManager
|
||||
QrCode
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -64,10 +61,6 @@ export default {
|
||||
name: this.$t('global.edit'),
|
||||
handleClick: this.handleUpdate
|
||||
},
|
||||
{
|
||||
name: '绑定管理人员',
|
||||
handleClick: this.setManager
|
||||
},
|
||||
{
|
||||
name: '生成二维码',
|
||||
handleClick: this.handleGenerateQrCode
|
||||
@ -103,9 +96,6 @@ export default {
|
||||
handleUpdate(index, row) {
|
||||
this.$refs.editCompany.doShow(row);
|
||||
},
|
||||
setManager(index, row) {
|
||||
this.$refs.companyManager.doShow(row.id);
|
||||
},
|
||||
reloadTable() {
|
||||
this.queryList.reload();
|
||||
},
|
||||
|
@ -1,141 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="绑定单位管理人员"
|
||||
:visible.sync="dialogVisible"
|
||||
width="80%"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getUserList } from '@/api/management/user';
|
||||
import { getCompanyList, setCompanyManager } from '@/api/company';
|
||||
export default {
|
||||
name: 'Manager',
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
companyId: '',
|
||||
companyMap: {},
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
beforeQuery: this.addParams,
|
||||
reset: true,
|
||||
queryObject: {
|
||||
name: {
|
||||
type: 'text',
|
||||
label: this.$t('system.name')
|
||||
},
|
||||
roles: {
|
||||
type: 'select',
|
||||
label: this.$t('system.roles'),
|
||||
config: {
|
||||
data: this.$ConstSelect.roleList
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
queryList: {
|
||||
query: getUserList,
|
||||
onSelectionChange: this.handleSelectionChange,
|
||||
selectAllClick: this.selectAllClick,
|
||||
selectCheckShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('system.name'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('system.nickname'),
|
||||
prop: 'nickname'
|
||||
},
|
||||
{
|
||||
title: this.$t('global.mobile'),
|
||||
prop: 'mobile'
|
||||
},
|
||||
{
|
||||
title: this.$t('global.email'),
|
||||
prop: 'email'
|
||||
},
|
||||
{
|
||||
title: '单位',
|
||||
prop: 'companyId',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.getCompanyName(row.companyId); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: this.$t('system.roles'),
|
||||
prop: 'roles',
|
||||
type: 'tagMore',
|
||||
columnValue: (row) => { return this.$convertField(row.roles, this.$ConstSelect.roleList, ['value', 'label'], true); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.companyMap = {};
|
||||
getCompanyList().then(resp => {
|
||||
if (resp && resp.data && resp.data.length) {
|
||||
resp.data.forEach(item => {
|
||||
this.companyMap[item.id] = item.name;
|
||||
});
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(companyId) {
|
||||
this.dialogVisible = true;
|
||||
this.companyId = companyId;
|
||||
this.$nextTick(() => {
|
||||
this.reloadTable();
|
||||
});
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
this.companyId = '';
|
||||
},
|
||||
getCompanyName(companyId) {
|
||||
return this.companyMap[companyId];
|
||||
},
|
||||
reloadTable() {
|
||||
this.queryList.queryReload();
|
||||
},
|
||||
addParams(params) {
|
||||
params.companyId = this.companyId;
|
||||
return params;
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
},
|
||||
selectAllClick(val) {
|
||||
const userIds = [];
|
||||
val && val.forEach(item => {
|
||||
userIds.push(item.id);
|
||||
});
|
||||
setCompanyManager(this.companyId, userIds).then(resp => {
|
||||
this.$message.success('绑定单位管理员成功!');
|
||||
this.dialogVisible = false;
|
||||
this.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
this.$message.error('绑定单位管理员失败!');
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -137,7 +137,6 @@ export default {
|
||||
},
|
||||
forTree(item) {
|
||||
item.children && item.children.forEach(childrenItem => {
|
||||
// childrenItem.key = item.id + childrenItem.id + childrenItem.type;
|
||||
childrenItem.key = item.key + '-' + childrenItem.id;
|
||||
if (childrenItem.children && childrenItem.children.length) {
|
||||
this.forTree(childrenItem);
|
||||
@ -175,8 +174,9 @@ export default {
|
||||
const checkIdDom = document.getElementById(checkId);
|
||||
const mapTreeDom = document.getElementById('trainingMapTree');
|
||||
mapTreeDom.scrollTop = checkIdDom.offsetTop;
|
||||
this.loading = false;
|
||||
|
||||
}
|
||||
this.loading = false;
|
||||
}, 200);
|
||||
});
|
||||
} catch (error) {
|
||||
|
@ -35,6 +35,8 @@ module.exports = {
|
||||
productionSourceMap: false, // 项目打包后是否压缩
|
||||
devServer: {
|
||||
port: port,
|
||||
host: '0.0.0.0',
|
||||
disableHostCheck: true,
|
||||
hotOnly: true,
|
||||
overlay: {
|
||||
warnings: false,
|
||||
|
Loading…
Reference in New Issue
Block a user