This commit is contained in:
sunzhenyu 2021-01-11 13:05:39 +08:00
commit 0dbc481e3f
91 changed files with 3065 additions and 1674 deletions

View File

@ -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
});
}

View File

@ -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
});
}

View File

@ -74,9 +74,9 @@ export function getPublishLessonListByMapId(params) {
});
}
/** 根据班级获取课程 */
export function getLessonByClassId(classId) {
export function getLessonByClassId(departId) {
return request({
url: `/api/lesson/class/${classId}`,
url: `/api/lesson/depart/${departId}`,
method: 'get'
});
}
@ -95,10 +95,10 @@ export function aKeyGeneratingLesson(data) {
data: data
});
}
/** 根据课程ID获取班级 */
/** 根据课程ID获取部门 */
export function getExamClassList(lessonId) {
return request({
url: `/api/lesson/${lessonId}/classes`,
url: `/api/lesson/${lessonId}/departs`,
method: 'get'
});
}

View File

@ -163,11 +163,11 @@ export function getProjectClassList(projectCode) {
}
// 导出学生成绩
export function exportStudentResults(projectCode, data) {
export function exportStudentResults(data) {
return request({
url: `/api/user/project/${projectCode}/export/student`,
url: `/api/user/scores`,
method: 'put',
data: data
data
});
}

View File

@ -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'}
};

View File

@ -175,7 +175,8 @@ class SkinCode extends defaultStyle {
greenColor: '#00FF00', // 信号灯绿色
yellowColor: '#FFFF00', // 信号灯黄色
whiteColor: '#FFFFFF', // 信号灯白色
blueColor: '#0070C0' // 信号灯蓝色
blueColor: '#0070C0', // 信号灯蓝色
faultType: 'light' // 信号机故障类型 light闪
},
route: {
direction: true, // 自动通过方向

View File

@ -153,7 +153,8 @@ class SkinCode extends defaultStyle {
greenColor: '#00FF00', // 信号灯绿色
yellowColor: '#FFFF00', // 信号灯黄色
whiteColor: '#FFFFFF', // 信号灯白色
blueColor: '#0070C0' // 信号灯蓝色
blueColor: '#0070C0', // 信号灯蓝色
faultType: 'flash' // 信号机故障类型 flash为福州一号线与西安一三号线特殊类型太阳
},
route: {
direction: false, // 自动进路方向

View File

@ -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, // 自动通过方向

View File

@ -162,7 +162,7 @@ class SkinCode extends defaultStyle {
yellowColor: '#FFFF00', // 信号灯黄色
whiteColor: '#FFFFFF', // 信号灯白色
blueColor: '#0070C0', // 信号灯蓝色
faultType: 'flash' // 信号机故障类型 flash为西安三号线特殊类型
faultType: 'flash' // 信号机故障类型flash太阳
},
route: {
direction: false, // 自动进路方向

View File

@ -175,6 +175,7 @@ class SkinCode extends defaultStyle {
yellowColor: 'yellow', // 信号灯黄色
whiteColor: '#FFFFFF', // 信号灯白色
blueColor: '#0070C0', // 信号灯蓝色
faultType: 'watch', // 信号机故障类型 watch表形狀
logicDisplayNone: true // 信号机上×型标识不展示
},
route: {

View File

@ -156,15 +156,20 @@ class Jlmap {
if (this.methods.optionsUpdate instanceof Function) { this.methods.optionsUpdate(this.$options); }
}
switchScreen(data, num, sum) {
const sumHalf = sum <= 2 ? sum : sum / 2;
const dx = data.width / sumHalf;
const dy = data.height / sumHalf;
const row = num <= sumHalf ? 0 : 1;
const opts = {
dx: dx * (row == 0 ? num - 1 : num - sumHalf - 1),
dy: dy * row
};
switchScreen(data, num, sum, obj) {
const opts = {};
if (obj.width == 1) {
const dy = data.height / sum;
opts['dx'] = 0;
opts['dy'] = dy * (num - 1);
} else {
const sumHalf = sum <= 2 ? sum : sum / 2;
const dx = data.width / sumHalf;
const dy = data.height / sumHalf;
const row = num <= sumHalf ? 0 : 1;
opts['dx'] = dx * (row == 0 ? num - 1 : num - sumHalf - 1);
opts['dy'] = dy * row;
}
this.$painter.updateScreenNum(opts);
}
@ -236,6 +241,7 @@ class Jlmap {
const rect = {x: 0, y: 0, width: Number(splitList[i]) + 5, height: opts.height};
rectList.push(rect);
}
console.log(screenList, rectList);
this.$painter.updateTransform1(screenList, rectList);
}

View File

@ -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});
}
}

View File

@ -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 })

View File

@ -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();

View File

@ -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';
@ -57,6 +59,7 @@ class Signal extends Group {
const posit = this.model.positionType == '01' ? -1 : 1; // 位置 上:下
// 信号机高柱矮柱 (信号机底座)
const sigPostY = model.position.y + model.positionPoint.y + posit * (style.Signal.distance + style.Section.line.width + style.Signal.lamp.radiusR);
this.sigPost = new ESigPost({
zlevel: this.zlevel,
z: this.z,
@ -64,28 +67,23 @@ class Signal extends Group {
drict: drict,
type: model.lampPostType,
x: model.position.x + model.positionPoint.x,
y: model.position.y + model.positionPoint.y + posit * (style.Signal.distance + style.Section.line.width + style.Signal.lamp.radiusR)
y: sigPostY
});
if (style.Signal.ciConfirm) {
this.ciConfirm = new Text({
this.ciConfirm = new Text({ // 信号机使能 E 西安二号线独有
zlevel: this.zlevel,
z: this.z,
_val: '3',
silent: false,
_subType: 'enabled',
_subType: 'enabled', // 标识
style: {
textBorderColor: 'red',
textBorderWidth: 0,
x: model.position.x + model.positionPoint.x,
y: model.position.y + model.positionPoint.y + posit * (style.Signal.distance + style.Section.line.width + style.Signal.lamp.radiusR + style.Signal.ciConfirm.distance),
fontWeight: style.textStyle.fontWeight,
x: model.position.x + model.positionPoint.x - drict * 25,
y: sigPostY + posit * 11,
fontSize: style.Signal.ciConfirm.fontSize,
fontFamily: style.fontFamily,
text: style.Signal.ciConfirm.defaultText,
textFill: style.Signal.ciConfirm.textColor,
textAlign: style.textStyle.textAlign,
textPosition: 'inside',
textVerticalAlign: style.textStyle.textVerticalAlign
textVerticalAlign: style.textStyle.textVerticalAlign,
textFill: style.Signal.ciConfirm.textColor
}
});
this.add(this.ciConfirm);
@ -471,7 +469,10 @@ class Signal extends Group {
if (this.style.Signal.text.nameBorderShow) {
this.sigName.setStyle({ textBorderWidth: 1 });
}
this.sigBack && this.sigBack.show();
if (this.sigBack) {
this.sigBack.show();
this.sigBack.setStyle('fill', this.style.Signal.sigBack.fillColor);
}
}
// 功能封锁
@ -492,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');
}
}
@ -607,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();
@ -621,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();
@ -642,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) {
/** 终端信号机按钮 */
@ -660,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')) {
// 联锁自动进路通过
@ -692,9 +721,9 @@ class Signal extends Group {
this.sigBack && this.sigBack.show();
this.sigBack && this.sigBack.animateStyle(true)
.when(0, { fill: this.style.backgroundColor })
.when(1000, { fill: this.style.Signal.sigBack.color })
.when(1000, { fill: this.style.Signal.sigBack.fillColor })
.when(2000, { fill: this.style.backgroundColor })
.when(3000, { fill: this.style.Signal.sigBack.color })
.when(3000, { fill: this.style.Signal.sigBack.fillColor })
.start();
}
if (model.isRequestGuide) {
@ -711,6 +740,8 @@ class Signal extends Group {
});
}
}
// 信号机故障
model.fault && this.fault();
// 设置灰显
model.noStatus && this.setAshShow();
}
@ -727,14 +758,23 @@ class Signal extends Group {
return rect;
}
getShapeTipPoint() { // 判断第一步 或 第二部步骤 获取元素包围框
var drict = this.model.right ? 1 : -1; // 朝向 右:左
var offsetY = this.model.positionType == '01' ? this.style.Signal.text.fontSize : 0; // 位置 上:下
const rect = this.sigPost.getBoundingRect().clone();
getShapeTipPoint(opts) { // 判断第一步 或 第二部步骤 获取元素包围框
let rect;
switch (opts.subDeviceType) {
case 'enabled':
rect = this.ciConfirm.getBoundingRect();
break;
default:
var drict = this.model.right ? 1 : -1; // 朝向 右:左
var offsetY = this.model.positionType == '01' ? this.style.Signal.text.fontSize : 0; // 位置 上:下
rect = this.sigPost.getBoundingRect().clone();
rect.x = rect.x + drict * this.style.Signal.post.standardVerticalWidth;
rect.y = rect.y - offsetY;
break;
}
return {
x: rect.x + drict * this.style.Signal.post.standardVerticalWidth,
y: rect.y - offsetY
x: rect.x + rect.width / 2,
y:rect.y
};
}
drawSelected(selected) {

View File

@ -558,15 +558,29 @@ export default class Switch extends Group {
return this.name.getBoundingRect();
}
getShapeTipPoint() {
const text = this.name.getNameText();
if (text) {
const rect = text.getBoundingRect();
getShapeTipPoint(opts) {
let rect;
let text;
switch (opts.subDeviceType) {
case 'enabled':
rect = this.enabledName.getBoundingRect();
break;
default:
text = this.name.getNameText();
if (text) {
rect = text.getBoundingRect();
}
break;
}
if (rect) {
return {
x: rect.x + rect.width / 2,
y: rect.y
};
}
return null;
}

View 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;
});
}

View File

@ -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();
}
});

View File

@ -219,11 +219,25 @@ export default {
mounted() {
this.resetPosition();
},
beforeDestroy() {
this.buttonDown(this.Command.cancel.clearMbm.operation);
},
methods: {
passWordCommit(data) {
const operate = {
operation: data.operateNext
};
let operate = {};
if (data.overNext) {
operate = {
over: true,
code: data.code,
operation: data.operation,
cmdType:this.cmdType,
param: data.param
};
} else {
operate = {
operation: data.operateNext
};
}
this.trainingOperation(operate);
},
checkCancel() {
@ -474,11 +488,10 @@ export default {
});
} else {
const operate = {
over: true,
code: deviceList[0].code,
operation: this.$store.state.menuOperation.buttonOperation,
cmdType: this.cmdType,
param: {routeCode: route.code}
overNext: true,
param: {routeCode: route.code, signalCode: deviceList[0].code}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -497,13 +510,13 @@ export default {
over: true,
code: deviceList[1].code,
operation: this.$store.state.menuOperation.buttonOperation,
cmdType: this.cmdType,
overNext: true,
param: ''
};
let flag = false;
this.routeList.forEach(item => {
if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) {
operate.param = {routeCode: item.code};
operate.param = {routeCode: item.code, signalCode: deviceList[0].code};
this.deviceList = [];
flag = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch((error) => {

View File

@ -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: [
{

View File

@ -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);
},

View File

@ -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;

View File

@ -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;

View File

@ -481,6 +481,11 @@ export function commitOperate(operate, paramList, over, val) {
step.over = true;
step.cmdType = operate.cmdType;
}
if (over == 4) {
const codeList = Object.values(paramList);
step.code = codeList[0];
}
return new Promise(function(resolve, reject) {
store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {

View File

@ -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>

View File

@ -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') });

View File

@ -53,36 +53,36 @@ export default {
menuNormal: {
Local: [],
Center: [
{
label: this.$t('menu.menuTrain.addTrainId'),
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: this.$t('menu.menuTrain.deleteTrainId'),
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
// {
// label: this.$t('menu.menuTrain.addTrainId'),
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
// },
// {
// label: this.$t('menu.menuTrain.deleteTrainId'),
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
// },
{
label: this.$t('menu.menuTrain.editTrainId'),
handler: this.editTrainId,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: this.$t('menu.menuTrain.editTrainNo'),
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: this.$t('menu.menuTrain.moveTrainId'),
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: this.$t('menu.menuTrain.switchTrainId'),
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
}
// {
// label: this.$t('menu.menuTrain.editTrainNo'),
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
// },
// {
// label: this.$t('menu.menuTrain.moveTrainId'),
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
// },
// {
// label: this.$t('menu.menuTrain.switchTrainId'),
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
// }
]
},
menuForce: [

View File

@ -254,32 +254,32 @@ export default {
menu: [],
menuNormal: {
Local: [
{
title: '窗口(W)',
operate: OperationEvent.Command.mBar.system,
children: [
{
title: '报警',
click: this.undeveloped
},
{
title: '时刻表信息',
click: this.undeveloped
},
{
title: '性能工具',
click: this.undeveloped
},
{
title: '用户权限',
click: this.undeveloped
},
{
title: '系统状态',
click: this.undeveloped
}
]
},
// {
// title: '(W)',
// operate: OperationEvent.Command.mBar.system,
// children: [
// {
// title: '',
// click: this.undeveloped
// },
// {
// title: '',
// click: this.undeveloped
// },
// {
// title: '',
// click: this.undeveloped
// },
// {
// title: '',
// click: this.undeveloped
// },
// {
// title: '',
// click: this.undeveloped
// }
// ]
// },
{
title: '列车(T)',
operate: OperationEvent.Command.mBar.check,
@ -348,14 +348,14 @@ export default {
title: '取消CBTC列车进路',
click: this.cancelCbtcRoute
},
{
title: 'VOBC切换',
click: this.undeveloped
},
{
title: '远程VOBC切换',
click: this.undeveloped
}
// {
// title: 'VOBC',
// click: this.undeveloped
// },
// {
// title: 'VOBC',
// click: this.undeveloped
// }
]
},
{
@ -697,64 +697,64 @@ export default {
}
]
},
{
title: '视图(V)',
operate: '',
children: [
{
title: '缩放',
operate: '',
children: [
{
title: '全部',
click: this.undeveloped
}
]
},
{
title: '修改可见性',
click: this.undeveloped
},
{
title: '允许显示',
operate: '',
children: [
{
title: '停站到计时',
click: this.undeveloped
}
]
}
]
}
// {
// title: '(V)',
// operate: '',
// children: [
// {
// title: '',
// operate: '',
// children: [
// {
// title: '',
// click: this.undeveloped
// }
// ]
// },
// {
// title: '',
// click: this.undeveloped
// },
// {
// title: '',
// operate: '',
// children: [
// {
// title: '',
// click: this.undeveloped
// }
// ]
// }
// ]
// }
],
Center: [
{
title: '窗口(W)',
operate: OperationEvent.Command.mBar.system,
children: [
{
title: '报警',
click: this.undeveloped
},
{
title: '时刻表信息',
click: this.undeveloped
},
{
title: '性能工具',
click: this.undeveloped
},
{
title: '用户权限',
click: this.undeveloped
},
{
title: '系统状态',
click: this.undeveloped
}
]
},
// {
// title: '(W)',
// operate: OperationEvent.Command.mBar.system,
// children: [
// {
// title: '',
// click: this.undeveloped
// },
// {
// title: '',
// click: this.undeveloped
// },
// {
// title: '',
// click: this.undeveloped
// },
// {
// title: '',
// click: this.undeveloped
// },
// {
// title: '',
// click: this.undeveloped
// }
// ]
// },
{
title: '列车(T)',
operate: OperationEvent.Command.mBar.check,
@ -818,19 +818,19 @@ export default {
{
title: '更新偏差',
click: this.updateDeviation
},
{
title: '取消CBTC列车进路',
click: this.cancelCbtcRoute
},
{
title: 'VOBC切换',
click: this.undeveloped
},
{
title: '远程VOBC切换',
click: this.undeveloped
}
// {
// title: 'CBTC',
// click: this.cancelCbtcRoute
// },
// {
// title: 'VOBC',
// click: this.undeveloped
// },
// {
// title: 'VOBC',
// click: this.undeveloped
// }
]
},
{
@ -1164,24 +1164,24 @@ export default {
}
]
},
{
title: '视图(V)',
operate: '',
children: [
{
title: '缩放',
click: this.undeveloped
},
{
title: '修改可见性',
click: this.undeveloped
},
{
title: '允许显示',
click: this.undeveloped
}
]
}
// {
// title: '(V)',
// operate: '',
// children: [
// {
// title: '',
// click: this.undeveloped
// },
// {
// title: '',
// click: this.undeveloped
// },
// {
// title: '',
// click: this.undeveloped
// }
// ]
// }
]
}
};

View File

@ -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: {

View File

@ -1,12 +1,15 @@
<template>
<div class="xian-02__system request_box">
<div class="title-box">
<div :id="domIdRequestBar" class="title-box">
<div class="title-name">操作请求堆栈</div>
<div class="icon" :class="{'is-active': unfold}" @click="unflodDiv">
<div v-if="!unfold" class="icon" @click="unflodDiv">
<i class="el-icon-arrow-down" />
</div>
<div v-else :id="domIdConfirm" class="icon" @click="unflodDiv">
<i class="el-icon-arrow-up" />
</div>
</div>
<div class="content-box" :class="{'is-active': unfold}">
<div v-show="!unfold" class="content-box" :class="{'is-active': unfold}">
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 100%;background: #000;border: none;outline: none;" height="120" size="mini" highlight-current-row :show-header="false" @row-click="clickEvent">
<el-table-column prop="station" style="margin-left:10px" />
<el-table-column prop="operation" style="margin-left:10px" />
@ -21,7 +24,7 @@
</el-row>
<div class="button-group" style="overflow: hidden;">
<div class="button-bottom-left">
<el-button :id="domIdConfirm" size="mini" style="float: left;" :loading="loading" @click="commit">发送请求</el-button>
<el-button v-if="!unfold" :id="domIdConfirm" size="mini" style="float: left;" :loading="loading" @click="commit">发送请求</el-button>
</div>
<div class="button-bottom-right">
<el-button :id="domIdCancel" size="mini" style="float: right;" @click="cancel">取消请求</el-button>
@ -64,6 +67,9 @@ export default {
},
domIdCancel() {
return OperationEvent.Command.commandXian.cancel.domId;
},
domIdRequestBar() {
return OperationEvent.Command.commandXian.requestBar.domId;
}
},
watch: {
@ -95,6 +101,12 @@ export default {
methods: {
unflodDiv() {
this.unfold = !this.unfold;
this.$nextTick(() => {
this.$store.dispatch('training/emitTipFresh');
// setTimeout(() => {
// this.$store.dispatch('training/emitTipFresh');
// }, 200);
});
},
clickEvent(row, event, column) {
this.row = row;
@ -119,11 +131,16 @@ export default {
const eachCmd = requestList[0];
let operate = '';
if (eachCmd.ciConfirm) {
operate = {
code: eachCmd.device.code,
operation: eachCmd.operation.code,
param: eachCmd.param //
};
operate = eachCmd.nextStepNotEnd
? {
operation: eachCmd.operation.code,
param: eachCmd.param //
}
: {
code: eachCmd.device.code,
operation: eachCmd.operation.code,
param: eachCmd.param //
};
const deviceStatus = {code: eachCmd.device.code, _type: eachCmd.device._type, isCiConfirm: 1};
if (eachCmd.device._type === deviceType.Signal) {
deviceStatus.isRequestLock = 0;
@ -197,9 +214,6 @@ export default {
padding: 0px 6px;
transition: transform .3s,-webkit-transform .3s;
font-weight: 300;
&.is-active{
transform: rotate(180deg);
}
}
}

View File

@ -415,8 +415,9 @@ export default {
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '终端信号解封'},
ciConfirm: true,
param: {signalCode: this.selected.code}
param: {signalCode: this.selected.code},
nextStepNotEnd: true,
ciConfirm: true
});
this.$store.dispatch('training/updateMapState', [{code: this.selected.code, _type: 'Signal', isRequestLock: 1}]);
} else {
@ -537,12 +538,23 @@ export default {
this.$store.dispatch('training/updateMapState', updateDeviceList);
},
enabledConfirm() {
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '终端信号解封'},
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK,
param: {
signal: this.selected.code
const step = {
code: this.selected.code,
operation: OperationEvent.Signal.unlock.menu.operation,
subType: 'enabled',
params: {signalCode:this.selected.code}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '终端信号解封'},
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK,
param: {
signal: this.selected.code
}
});
}
});
},

View File

@ -298,7 +298,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Station.humanControlALL.menu.operation, name: '所有进路自排关'},
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '所有进路自排关'},
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING,
param: step.param
});
@ -324,7 +324,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Station.atsAutoControlALL.menu.operation, name: '所有进路自排开'},
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '所有进路自排开'},
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
param: step.param
});
@ -368,7 +368,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.StationControl.requestStationControl.menu.operation, name: '请求站控'},
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '请求站控'},
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL,
param: {stationCodes:[this.selected.code]}
});
@ -382,7 +382,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.StationControl.requestCentralControl.menu.operation, name: '请求中控'},
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '请求中控'},
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL,
param: {stationCodes:[this.selected.code]}
});
@ -396,7 +396,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.StationControl.emergencyStationControl.menu.operation, name: '请求中控'},
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '紧急站控'},
cmdType: CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL,
param: {stationCodes:[this.selected.code]}
});

View File

@ -197,8 +197,6 @@ export default {
}
});
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
},
'$store.state.menuOperation.requestList': function (list) {
@ -354,21 +352,21 @@ export default {
}
},
setRuningMode(mode, direction) {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
param: {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: OperationEvent.StationStand.setJumpStop.menu.operation});
// this.$refs.standControl.doShow(step, this.selected);
}
});
// const step = {
// start: true,
// code: `${this.selected.code}`,
// operation: OperationEvent.StationStand.setJumpStop.menu.operation,
// param: {
// standCode: `${this.selected.code}`
// }
// };
// this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: OperationEvent.StationStand.setJumpStop.menu.operation});
// // this.$refs.standControl.doShow(step, this.selected);
// }
// });
},
cancel() {
const operate = {

View File

@ -294,7 +294,7 @@ export default {
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '道岔解锁'},
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK,
nextStepNotEnd: true,
ciConfirm: true,
param: operate.param
});
@ -326,12 +326,23 @@ export default {
// });
// },
enabledConfirm() {
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Switch.unlock.menu.operation, name: '道岔解锁'},
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK,
param: {
switchCode: this.selected.code
const step = {
code: this.selected.code,
operation: OperationEvent.Switch.unlock.menu.operation,
subType: 'enabled',
params: {switchCode:this.selected.code}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '道岔解锁'},
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK,
param: {
switchCode: this.selected.code
}
});
}
});
},

View File

@ -149,11 +149,11 @@ export default {
upStopProfile: {
Local: [],
Center: [
{
label: '站台停站曲线',
handler: this.setStopTime,
cmdType: ''
},
// {
// label: '线',
// handler: this.setStopTime,
// cmdType: ''
// },
{
label: '站台停站曲线',
handler: this.setUpStopProfile,
@ -169,11 +169,11 @@ export default {
downStopProfile: {
Local: [],
Center: [
{
label: '站台停站曲线',
handler: this.setDownStopProfile,
cmdType: ''
},
// {
// label: '线',
// handler: this.setDownStopProfile,
// cmdType: ''
// },
{
label: '站台停站曲线',
handler: this.setDownStopProfile,

View File

@ -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: '鼠标右键菜单选择【取消列车跳停本站】' },
@ -290,7 +290,7 @@ export default {
trainingName: '道岔单锁({7})',
trainingRemark: '道岔单锁功能',
trainingType: 'Switch',
productTypes: ['01'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
@ -304,11 +304,11 @@ export default {
trainingName: '道岔单解({7})',
trainingRemark: '道岔单解功能',
trainingType: 'Switch',
productTypes: ['01'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔单解】' },
{ deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔单解】', codeType:'SWITCH' },
{ deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '104', tip: '鼠标右键点击【E】选择使能' },
{ deviceType: '02', orderNum: 3, operateCode: '104', tip: '鼠标右键点击【E】选择使能', codeType:'SWITCH', subType:'enabled' },
{ deviceType: '02', orderNum: 4, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
@ -376,12 +376,12 @@ export default {
minDuration: 8,
operateType: 'Signal_Block',
skinCode: '09',
trainingName: '信号封锁({5})',
trainingRemark: '信号封锁',
trainingName: '终端信号封锁({5})',
trainingRemark: '终端信号封锁功能',
trainingType: 'Signal',
productTypes: ['01'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封锁】' },
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【终端信号封锁】' },
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
@ -390,15 +390,29 @@ export default {
minDuration: 8,
operateType: 'Signal_Unblock',
skinCode: '09',
trainingName: '信号解封({5})',
trainingRemark: '信号解封功能',
trainingName: '终端信号解封({5})',
trainingRemark: '终端信号解封功能',
trainingType: 'Signal',
productTypes: ['01'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' },
{ deviceType: '03', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '307', tip: '鼠标右键点击【E】选择使能' },
{ deviceType: '03', orderNum: 4, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
{ deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【终端信号解封】', codeType:'SIGNAL' },
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '307', tip: '鼠标右键点击【E】选择使能', codeType:'SIGNAL', subType:'enabled' },
{ deviceType: '04', orderNum: 4, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Signal_Set_Guide',
skinCode: '09',
trainingName: '引导信号({5})',
trainingRemark: '引导信号功能',
trainingType: 'Signal',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【引导信号】' },
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
// {
@ -415,33 +429,148 @@ export default {
// { deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
// ]
// },
{
maxDuration: 20,
minDuration: 15,
operateType: 'CM_Apply_For_Center_Control',
maxDuration: 15,
minDuration: 8,
operateType: 'Train_Hold',
skinCode: '09',
trainingName: '请求遥控({1})',
trainingRemark: '控制权限转换,站控转中控',
trainingType: 'ControlConvertMenu',
productTypes: ['02'], // 行调请求中控
trainingName: '列车扣车({5})',
trainingRemark: '列车扣车功能',
trainingType: 'Train',
productTypes: ['02'],
stepVOList: [
{ deviceType: 'button', orderNum: 1, operateCode: '204', tip: '鼠标右键菜单选择【请求遥控】'},
{ deviceType: '05', orderNum: 2, operateCode: '2043', tip: '鼠标左键点击【应用】' }
{ deviceType: '07', orderNum: 1, operateCode: '70k', tip: '鼠标右键菜单选择【列车/扣车】' },
{ deviceType: '07', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Train_Cancel_Hold',
skinCode: '09',
trainingName: '列车放行({5})',
trainingRemark: '列车放行功能',
trainingType: 'Train',
productTypes: ['02'],
stepVOList: [
{ deviceType: '07', orderNum: 1, operateCode: '70l', tip: '鼠标右键菜单选择【列车/放行】' },
{ deviceType: '07', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 20,
minDuration: 15,
operateType: 'CM_Apply_For_Station_Control',
skinCode: '09',
trainingName: '请求站控({1})',
trainingRemark: '控制权限转换,中控转站控',
trainingName: '本地控制许可/请求({2})',
trainingRemark: '本地控制许可功能/请求',
trainingType: 'ControlConvertMenu',
productTypes: ['01'], // 现地请求站控
productTypes: ['01'],
stepVOList: [
{ deviceType: 'button', orderNum: 1, operateCode: '202', tip: '鼠标右键菜单选择【请求站控】'},
{ deviceType: '05', orderNum: 2, operateCode: '2023', tip: '鼠标左键点击【应用】' }
{ deviceType: '04', orderNum: 1, operateCode: '202', tip: '鼠标右键菜单选择【本地控制许可/请求】'},
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 20,
minDuration: 15,
operateType: 'CM_Apply_For_Center_Control',
skinCode: '09',
trainingName: '本地控制许可/取消({2})',
trainingRemark: '本地控制许可/取消功能',
trainingType: 'ControlConvertMenu',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '204', tip: '鼠标右键菜单选择【本地控制许可/取消】'},
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 20,
minDuration: 15,
operateType: 'CM_Emergency_Station_Control',
skinCode: '09',
trainingName: '本地控制许可/紧急本地控制({2})',
trainingRemark: '本地控制许可/紧急本地控制功能',
trainingType: 'ControlConvertMenu',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '201', tip: '鼠标右键菜单选择【本地控制许可/紧急本地控制】'},
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 20,
minDuration: 15,
operateType: 'Station_Open_Auto_Setting',
skinCode: '09',
trainingName: '进路模式/自动({26})',
trainingRemark: '进路模式/自动功能',
trainingType: 'Station',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '606', tip: '鼠标右键菜单选择【进路模式/自动】'},
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 20,
minDuration: 15,
operateType: 'Station_Close_Auto_Setting',
skinCode: '09',
trainingName: '进路模式/人工({26})',
trainingRemark: '进路模式/人工功能',
trainingType: 'Station',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '605', tip: '鼠标右键菜单选择【进路模式/人工】'},
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 20,
minDuration: 15,
operateType: 'Station_Set_Turn_Back_Strategy',
skinCode: '09',
trainingName: '折返模式/优先折返({26})',
trainingRemark: '折返模式/优先折返功能',
trainingType: 'Station',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '610', tip: '鼠标右键菜单选择【折返模式/优先折返】'},
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 20,
minDuration: 15,
operateType: 'Station_Set_Turn_Back_Strategy',
skinCode: '09',
trainingName: '折返模式/直线折返({26})',
trainingRemark: '折返模式/直线折返功能',
trainingType: 'Station',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '610', tip: '鼠标右键菜单选择【折返模式/直线折返】'},
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 20,
minDuration: 15,
operateType: 'Station_Set_Turn_Back_Strategy',
skinCode: '09',
trainingName: '折返模式/侧线折返({26})',
trainingRemark: '折返模式/侧线折返功能',
trainingType: 'Station',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '610', tip: '鼠标右键菜单选择【折返模式/侧线折返】'},
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
}
]

View File

@ -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() {
@ -54,7 +57,7 @@ export default {
this.$refs.userInfo.doShow();
},
handleOrganization() {
this.$router.push({ path: `/trainingPlatform/organization` });
this.$router.push({ path: `/info/organization` });
}
}
};

View File

@ -11,7 +11,7 @@ import App from './App';
import VueI18n from 'vue-i18n';
import store from './store/index';
import router from './router/index_APP_TARGET';
import router from './router/index';
import CancelMouseState from '@/mixin/CancelMouseState.js';
Vue.mixin(CancelMouseState);

View File

@ -1,18 +1,12 @@
import Vue from 'vue';
import store from '@/store/index';
import router from './router/index_APP_TARGET';
import router from './router/index';
import {loginInfo} from '@/scripts/ProjectConfig';
import NProgress from 'nprogress';
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) {

View File

@ -124,7 +124,6 @@ const UserRules = () => import('@/views/orderauthor/rules/index');
const UserRulesDetail = () => import('@/views/orderauthor/rules/detail');
const DeviceManage = () => import('@/views/system/deviceManage/index');
const StudentManage = () => import('@/views/studentManage');
const BankManage = () => import('@/views/competitionManage/bankList/index');
const Scene = () => import('@/views/drts/scene/index');
@ -139,6 +138,7 @@ const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImpo
const PlanScheduleWicket = () => import('@/views/newMap/displayNew/demon/planSchedule');
const MessageBoard = () => import('@/views/messageBoard/index');
const BoardManage = () => import('@/views/messageBoard/manage');
const DraftLessonManage = () => import('@/views/teach/draftLessonManage');
const OrganizationManage = () => import('@/views/organization/index');
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
@ -428,6 +428,18 @@ export const publicAsyncRoute = [
path: '/messageBoard',
component: MessageBoard,
hidden: true
},
{
path: '/info',
component: Layout,
hidden: true,
children: [
{ // 单位组织管理
path: 'organization',
component: OrganizationManage,
hidden: true
}
]
}
];
// 城市轨道项目
@ -563,6 +575,11 @@ export const asyncRouter = [
component: TeachDetail,
hidden: true
},
{ // 草稿课程
path: 'draftTeach/:subSystem',
component: DraftLessonManage,
hidden: true
},
{ // 试卷列表
path: 'course/:subSystem',
component: ExamCourseDetail,
@ -604,11 +621,6 @@ export const asyncRouter = [
hidden: true
}
]
},
{ // 单位组织管理
path: 'organization',
component: OrganizationManage,
hidden: true
}
]
},
@ -1075,26 +1087,6 @@ export const asyncRouter = [
/* merge 是否再路由处理中与asyncRouter进行合并 mergeIndex合并进入asyncRouter【mergeIndex】 慎重调整asyncRouter顺序 */
export const projectRoute = {
designgzb: [
{
path: '/design/student',
redirect: '/design/student/home',
component: Layout,
meta: {
i18n: 'router.studentManage',
roles: [admin, lessonCreater]
},
children: [
{
path: 'home',
component: StudentManage,
meta: {
i18n: 'router.studentManage',
icon: 'design',
hidden: true
}
}
]
},
{ // 系统管理
path: '/system',
component: Layout,

View File

@ -1,742 +0,0 @@
import Vue from 'vue';
import VueRouter from 'vue-router';
// import VueRouter from 'vue-router';
Vue.use(VueRouter);
/* Layout */
const Layout = () => import('@/layout');
// const Login = () => import('@/views/login/hydLogin');
const Login = () => import('@/views/login/index');
const Jlmap3dedit = () => import('@/views/jlmap3d/edit/jlmap3dedit');
const Jlmap3d = () => import('@/views/jlmap3d/drive/jl3ddrive');
const Jlmap3dSandbox = () => import('@/views/jlmap3d/simulation/jl3dsimulation');
const Jlmap3dModel = () => import('@/views/jlmap3d/device/jl3ddevice');
const Jlmap3dPassFlow = () => import('@/views/jlmap3d/passflow/jl3dpassflow');
const DisplayNew = () => import('@/views/newMap/displayNew/index');
const JointTrainingNew = () => import('@/views/newMap/jointTrainingNew/index');
const Errpr404 = () => import('@/views/error-page/404');
const Dictionary = () => import('@/views/system/dictionary/index');
const DictionaryDetail = () => import('@/views/system/dictionaryDetail/index');
const UserControl = () => import('@/views/system/userControl/index');
const UserTraining = () => import('@/views/system/userTraining/index');
const UserExam = () => import('@/views/system/userExam/index');
const UserSimulation = () => import('@/views/system/userSimulation/index');
const ExistingSimulation = () => import('@/views/system/existingSimulation/index');
const CacheControl = () => import('@/views/system/cacheControl/index');
const SystemGenerate = () => import('@/views/system/systemGenerate/index');
const News = () => import('@/views/system/news/index');
const CommandDictionary = () => import('@/views/system/commandDictionary/index');
const CommandDictionaryDetail = () => import('@/views/system/commandDictionary/edit');
const configLine = () => import('@/views/system/configLine/index');
const IscsSystem = () => import('@/views/iscs/iscsSystem/index');
const IscsConfig = () => import('@/views/iscs/iscsSystem/config/index');
const Taskmanage = () => import('@/views/lesson/taskmanage/list');
const TrainingRuleList = () => import('@/views/lesson/trainingRule/list');
const TrainingRuleEdit = () => import('@/views/lesson/trainingRule/detail/index');
const Trainingmanage = () => import('@/views/lesson/trainingmanage/index');
const LessonEdit = () => import('@/views/lesson/lessoncategory/index');
const LessonHome = () => import('@/views/lesson/home');
const LessonDetail = () => import('@/views/lesson/details');
const BigScreen = () => import('@/views/designPlatform/bigScreen');
const BigSplitScreen = () => import('@/views/designPlatform/bigSplitScreen');
const TestRunplan = () => import('@/views/designPlatform/testRunplan');
const ScriptmanageHome = () => import('@/views/scriptManage/home');
const IbpHome = () => import('@/views/ibp/home');
const IbpDraw = () => import('@/views/ibp/ibpDraw/index');
const TeachDetail = () => import('@/views/teach/detail/index');
const TeachHome = () => import('@/views/teach/index');
const Pay = () => import('@/views/components/pay/index');
const ExamHome = () => import('@/views/exam/index');
const ExamResult = () => import('@/views/exam/result');
const ExamDetail = () => import('@/views/exam/detail/examDetail');
const ExamCourseDetail = () => import('@/views/exam/detail/courseDetail');
const DemonstrationDetail = () => import('@/views/demonstration/detail/index');
const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index');
const PlanMonitorNewEditTool = () => import('@/views/planMonitor/newEditTool/index');
const PlanMonitorDetail = () => import('@/views/planMonitor/detail');
const DesignPlatformHome = () => import('@/views/designPlatform/home');
const DesignPlatform = () => import('@/views/designPlatform/index');
const MapPreviewNew = () => import('@/views/designPlatform/mapPreviewNew');
const Package = () => import('@/views/package/index');
const PublishMap = () => import('@/views/publish/publishMap/index');
const PublishMapDetail = () => import('@/views/publish/publishMap/list'); // 发布历史
const PublishLesson = () => import('@/views/publish/publishLesson/index');
const RunPlanTemplate = () => import('@/views/publish/runPlanTemplate/index');
const RunPlanCommon = () => import('@/views/publish/runPlanCommon/index');
const RunPlanCommonDraft = () => import('@/views/publish/runPlanCommon/draft');
const RunPlanEveryDay = () => import('@/views/publish/runPlanEveryDay/index');
const RunplanView = () => import('@/views/publish/runPlanEveryDay/runPlanView');
const PublishExamRule = () => import('@/views/publish/examRule/index');
const PublishExamRuleDraft = () => import('@/views/publish/examRule/draft/index');
const TrainingPlatform = () => import('@/views/trainingPlatform/index');
const Commodity = () => import('@/views/orderauthor/commodity/index');
const OrderList = () => import('@/views/orderauthor/order/list');
const OrderDraft = () => import('@/views/orderauthor/order/draft');
const Author = () => import('@/views/orderauthor/author/index');
const Permission = () => import('@/views/orderauthor/permission/index');
const PermissionDetail = () => import('@/views/orderauthor/permission/detail');
const PermissionCreate = () => import('@/views/orderauthor/permission/create/index');
const UserRules = () => import('@/views/orderauthor/rules/index');
const UserRulesDetail = () => import('@/views/orderauthor/rules/detail');
const DeviceManage = () => import('@/views/system/deviceManage/index');
const Approval = () => import('@/views/approval/index');
// import { loginInfo } from '@/scripts/ProjectConfig';
// import { getSessionStorage } from '@/utils/auth';
/**
* Note: sub-menu only appear when route children.length >= 1
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
*
* hidden: true if set true, item will not show in the sidebar(default is false)
* alwaysShow: true if set true, will always show the root menu
* if not set alwaysShow, when item has more than one children route,
* it will becomes nested mode, otherwise not show the root menu
* redirect: noRedirect if set noRedirect will no redirect in the breadcrumb
* name:'router-name' the name is used by <keep-alive> (must set!!!)
* meta : {
roles: ['admin','editor'] control the page roles (you can set multiple roles)
title: 'title' the name show in sidebar and breadcrumb (recommend set)
icon: 'svg-name' the icon show in the sidebar
breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
}
*/
export const user = '01'; // 普通用户
export const mapCreater = '02'; // 地图创建权限
export const lessonCreater = '03'; // 课程创建权限
export const admin = '04'; // 管理员
export const superAdmin = '05'; // 超级管理员
export const projectTrain = '011'; // 城市轨道项目
export const projectXian = '012'; // 西安地铁项目
export const projectXty = '013'; // 西铁院
export const projectGzzb = '014'; // 贵州装备
export const projectJsxt = '015'; // 竞赛系统
export const projectJyd = '017'; // 竞业达
export const projectTky = '018'; // 铁科院
export const projectHeb = '019'; // 哈盈达
export const userTrainingPlatform = '016'; // 实训系统
// export const refereePlatform = '017'; // 裁判系统
/**
* constantRoutes
* a base page that does not have permission requirements
* all roles can be accessed
*/
export const constantRoutes = [
// 实训平台登录
{
path: '/login',
component: Login,
hidden: true
},
// 设计平台登录
{
path: '/design',
redirect: '/design/login',
hidden: true
},
{
path: '/design/login',
component: Login,
hidden: true
},
{
path: '/design/jlmap3d/edit',
component: Jlmap3dedit,
hidden: true
},
{
path: '/jlmap3d/sandbox',
component: Jlmap3dSandbox,
hidden: true
},
{
path: '/jlmap3d/devicemodel',
component: Jlmap3dModel,
hidden: true
},
{
path: '/jlmap3d/passengerflow',
component: Jlmap3dPassFlow,
hidden: true
},
{
path: '/404',
component: Errpr404,
hidden: true
},
{ path: '*', redirect: '/404', hidden: true }
];
// 公共路由不需要过滤 直接可以访问
export const publicAsyncRoute = [
{
path: '/displayNew/:mode',
component: DisplayNew,
hidden: true
},
{ // 剧本编辑 战场图
path: '/scriptDisplayNew/:mode',
component: DisplayNew,
hidden: true
},
{
path: '/jointTrainingNew',
component: JointTrainingNew,
hidden: true
},
{
path: '/displayBigScreen/:mapId',
component: BigScreen,
hidden: true
},
{ // 大屏切分
path: '/bigSplitScreen/:mapId',
component: BigSplitScreen,
hidden: true
},
{
path: '/jlmap3d',
component: Jlmap3d,
hidden: true
},
{ // 运行图编辑
path: '/plan/tool',
component: PlanMonitorEditTool,
hidden: true
},
{ // 哈尔滨运行图编辑
path: '/plan/newTool',
component: PlanMonitorNewEditTool,
hidden: true
},
{
path: '/displayIscs/system',
component: IscsSystem,
hidden: true,
children: [
{
path: 'config/:mode',
component: IscsConfig,
hidden: true
}
]
},
{
path: '/device/teachDetail',
component: TeachDetail,
hidden: true
},
{
path: '/device/course',
component: ExamCourseDetail,
hidden: true
},
{
path: '/device/examRule/manage',
component: PublishExamRule,
hidden: true
},
{
path: '/device/examRule/draft/:mode/:ruleId/:lessonId',
component: PublishExamRuleDraft,
hidden: true
},
{ // 试卷详情
path: '/device/exam/:examId',
component: ExamDetail,
hidden: true
},
{ // 考试结果
path: '/device/result/:userExamId',
component: ExamResult,
hidden: true
},
{
// 运行图测试(仿真,仅有按计划行车和初始化操作)
path: '/design/runPlan/testRunplan',
component: TestRunplan,
hidden: true
}
];
export const asyncRouter = [
{ // 公共地图
path: '/design',
component: Layout,
redirect: '/design/home',
meta: {
roles: [admin, user]
},
children: [
{
path: '',
redirect: '/design/home',
component: DesignPlatform,
meta: {
i18n: 'router.designhomePage',
icon: 'design'
},
children: [
{
path: 'home',
component: DesignPlatformHome,
meta: {
}
},
{ // 运行图设计
path: 'runPlan/detail/:mapId',
component: PlanMonitorDetail,
hidden: true
},
{ // 剧本
path: 'script/home/:mapId',
component: ScriptmanageHome,
meta: {
i18n: 'router.scriptManage'
},
hidden: true
},
{ // 课程列表
path: 'lesson/home/:mapId',
component: LessonHome,
hidden: true
},
{ // 操作定义
path: 'lesson/trainingRule',
component: TrainingRuleList,
hidden: true
},
{ // 操作定义步骤
path: 'lesson/trainingRule/detail',
hidden: true,
component: TrainingRuleEdit
},
{ // 任务管理
path: 'lesson/taskManage',
component: Taskmanage,
hidden: true
},
{ // 实训管理
path: 'lesson/trainingManage',
component: Trainingmanage,
hidden: true
},
{ // 创建课程
path: 'lesson/edit/:type',
component: LessonEdit,
hidden: true
},
{ // 课程详情
path: 'lesson/details',
component: LessonDetail,
hidden: true,
children: [
{
path: 'edit/:type',
component: LessonEdit,
hidden: true
}
]
},
{ // 新版地图预览
path: 'mapPreviewNew/:mapId',
component: MapPreviewNew,
hidden: true
},
{
path: 'bigScreen/:mapId',
component: BigScreen,
hidden: true
},
{ // ibp列表
path: 'ibp/home/:mapId',
component: IbpHome,
hidden: true
},
{
path: 'ibp/edit',
component: IbpDraw,
hidden: true
}
]
}
]
},
{ // 实训平台
path: '/trainingPlatform',
component: Layout,
hidden: true,
meta: {
roles: [admin, user, userTrainingPlatform]
},
children: [
{
path: '',
component: TrainingPlatform,
meta: {
},
children: [
{ // 仿真详情
path: 'detail/:subSystem',
component: DemonstrationDetail,
hidden: true
},
{ // 教学系统 课程列表
path: 'teachHome/:subSystem',
component: TeachHome,
hidden: true
},
{ // 课程详情
path: 'teach/:subSystem',
component: TeachDetail,
hidden: true
},
{ // 试卷列表
path: 'course/:subSystem',
component: ExamCourseDetail,
hidden: true
},
{ // 考试系统 课程列表
path: 'examHome/:subSystem',
component: ExamHome,
hidden: true
},
{ // 试卷详情
path: 'exam/:examId',
component: ExamDetail,
hidden: true
},
{ // 试卷列表
path: 'examRule/manage',
component: PublishExamRule,
hidden: true
},
{ // 创建试卷
path: 'examRule/draft/:mode/:ruleId/:lessonId',
component: PublishExamRuleDraft,
hidden: true
},
{ // 购买
path: 'pay/:lessonId',
component: Pay,
hidden: true
},
{ // 考试结果
path: 'result/:userExamId',
component: ExamResult,
hidden: true
},
{ // 线路权限列表
path: 'permission/:mapId',
component: Package,
hidden: true
}
]
}
]
},
{ // 发布内容管理
path: '/publish',
component: Layout,
meta: {
i18n: 'router.pulishManage',
roles: [admin]
},
children: [
{ // 发布地图
path: 'map',
component: PublishMap,
meta: {
i18n: 'router.publishMapManage'
}
},
{ // 发布历史
path: 'map/detail',
hidden: true,
component: PublishMapDetail
},
{ // 发布课程
path: 'lesson',
component: PublishLesson,
meta: {
i18n: 'router.publishLessonManage'
}
},
{ // 模板运行图
path: 'runPlan/template',
component: RunPlanTemplate,
meta: {
i18n: 'router.runPlanTemplateManage'
}
},
{ // 加载运行图管理
path: 'runPlan/common',
component: RunPlanCommon,
meta: {
i18n: 'router.runPlanCommonManage'
}
},
{ // 新增加载运行图
path: 'runPlan/common/:mode',
component: RunPlanCommonDraft,
hidden: true
},
{ // 运行图预览
path: 'runPlan/view/:mode',
component: RunplanView,
hidden: true
},
{ // 每日运行图
path: 'runPlan/everyDay',
component: RunPlanEveryDay,
meta: {
i18n: 'router.runPlanEveryDayManage'
}
},
{ // 考试规则列表
path: 'examRule/manage',
component: PublishExamRule,
meta: {
i18n: 'router.examRuleManage'
}
},
{
path: 'examRule/draft/:mode/:ruleId/:lessonId',
component: PublishExamRuleDraft,
hidden: true
}
]
},
{ // 订单权限管理
path: '/orderauthor',
component: Layout,
meta: {
i18n: 'router.orderAuthorityManage',
roles: [admin]
},
children: [
{
path: 'author/manage',
component: Author,
meta: {
i18n: 'router.authorityManage'
}
},
{
path: 'commodity/manage',
component: Commodity,
meta: {
i18n: 'router.commodityManage'
}
},
{
path: 'order/manage',
component: OrderList,
meta: {
i18n: 'router.orderManage'
}
},
{
path: 'transfer/manage',
component: Permission,
meta: {
i18n: 'router.authorityTransferManage'
}
},
{
path: 'rules/manage',
component: UserRules,
meta: {
i18n: 'router.userRulesManage'
}
},
{
path: 'rules/manage/detail/:id',
hidden: true,
component: UserRulesDetail,
meta: {
i18n: 'router.userRulesManage'
}
},
{
path: 'order/draft/:mode/:orderId',
hidden: true,
component: OrderDraft,
meta: {
i18n: 'router.addOrder'
}
},
{
path: 'transfer/detail/:permissionId',
component: PermissionDetail,
hidden: true
},
{
path: 'transfer/create',
component: PermissionCreate,
hidden: true
}
]
},
{ // 系统管理
path: '/system',
component: Layout,
meta: {
i18n: 'router.systemManage',
roles: [admin]
},
children: [
{
path: 'dictionary',
component: Dictionary,
meta: {
i18n: 'router.dataDictionary'
}
},
{
path: 'dictionary/detail',
hidden: true,
component: DictionaryDetail,
meta: {
i18n: 'router.dataDictionaryDetails'
}
},
{
// 用户管理
path: 'userManage',
component: UserControl,
meta: {
i18n: 'router.userManage'
}
},
{
// 缓存管理
path: 'cache',
component: CacheControl,
meta: {
i18n: 'router.cacheManage'
}
},
{
path: 'userTrainingManage',
component: UserTraining,
meta: {
i18n: 'router.userTrainingManage'
}
},
{
path: 'userExamManage',
component: UserExam,
meta: {
i18n: 'router.userExamManage'
}
},
{
path: 'userSimulationManage',
component: UserSimulation,
meta: {
i18n: 'router.userSimulationManage'
}
},
{
path: 'existingSimulation',
component: ExistingSimulation,
meta: {
i18n: 'router.existingSimulation'
}
},
{
// 子系统生成
path: 'systemGenerate',
component: SystemGenerate,
meta: {
i18n: 'router.subsystemGeneration'
}
},
{ // 消息公告
path: 'news',
component: News,
meta: {
i18n: 'router.newsBulletin'
}
},
{ // 命令管理
path: 'commands',
component: CommandDictionary,
meta: {
i18n: 'router.commandDictionary'
}
},
{
path: 'commands/Detail',
hidden: true,
component: CommandDictionaryDetail
},
{ // 线路管理
path: 'configLine',
component: configLine,
meta: {
i18n: 'router.configLine'
}
},
{
path: 'deviceManage',
component: DeviceManage,
meta: {
i18n: 'router.deviceManage'
}
},
{// 发布申请
path: 'approval',
component: Approval,
meta: {
i18n: 'router.releaseApplication'
}
}
]
}
];
const createRouter = () => new VueRouter({
mode: 'history', // require service support
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes
});
const router = createRouter();
// router.beforeEach((to, from, next) => {
// const project = getSessionStorage('project');
// document.title = loginInfo[project || 'login'].title;
// next();
// });
// 兼容 vue-router在3.1.0版本以上的路由跳转使用的是 promise 的方式
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err);
};
export default router;

View File

@ -166,6 +166,7 @@ export default {
Signal: {enlabel: 'Signal training', label:'信号机实训'},
Stand: {enlabel: 'Stand training', label:'站台实训'},
Station: {enlabel: 'Station training', label:'车站实训'},
Train: { enlabel: 'Train training', label: '列车实训'},
ControlConvertMenu: {enlabel: 'Control mode training', label:'控制模式实训'},
LimitControl: {enlabel: 'Control mode limit', label:'全线限速实训'},
TrainWindow: {enlabel: 'TrainWindow training', label:'车次窗实训'},

View File

@ -1,5 +1,5 @@
import { sendCommandNew } from '@/api/jmap/training';
import router from '@/router/index_APP_TARGET';
import router from '@/router/index';
import Command from './Command';
import Handler from './Handler';

View File

@ -1,5 +1,5 @@
import store from '@/store/index';
import router from '@/router/index_APP_TARGET';
import router from '@/router/index';
import CommandHandler from './CommandHandler.js';
import ValidateHandler from './ValidateHandler.js';
import { State2SimulationMap } from './Config.js';

View File

@ -243,6 +243,10 @@ export const OperationEvent = {
cancel: {
operation: '0091',
domId: '_Tips-commandXian-cancel{BOTTOM}'
},
requestBar: {
operation: '0092',
domId: '_Tips-commandXian-requestBar{TOP}'
}
}
},

View File

@ -30,6 +30,7 @@ class ValidateHandler {
judge (operate) {
const steps = Handler.getSteps();
const order = Handler.getOrder();
console.log(operate, steps);
let valid = false;
if (operate.over && steps.length == 1) { // 右键菜单直接发送校验
if (operate && steps[0] &&

View File

@ -1,4 +1,4 @@
import { publicAsyncRoute, asyncRouter, constantRoutes, user, projectTrain, projectXian, projectXty, projectGzzb, projectJsxt, projectJyd, projectTky, projectHeb, superAdmin, admin, userTrainingPlatform, JSXT, projectRoute, projectDrts, projectSdy } from '@/router/index_APP_TARGET';
import { publicAsyncRoute, asyncRouter, constantRoutes, user, projectTrain, projectXian, projectXty, projectGzzb, projectJsxt, projectJyd, projectTky, projectHeb, superAdmin, admin, userTrainingPlatform, JSXT, projectRoute, projectDrts, projectSdy } from '@/router/index';
import { loginInfo } from '@/scripts/ProjectConfig';
import { getSessionStorage } from '@/utils/auth';

View File

@ -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);

View File

@ -6,7 +6,7 @@ export function getBaseUrl() {
// 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'; // 张赛

View File

@ -8,7 +8,7 @@ import { getBaseUrl } from '@/utils/baseUrl';
import { EventBus } from '@/scripts/event-bus';
import ConstConfig from '@/scripts/ConstConfig';
import Vue from 'vue';
import router from '../router/index_APP_TARGET';
import router from '../router/index';
const BASE_API = getBaseUrl();

View File

@ -128,7 +128,11 @@ export default {
width: this.$store.state.app.width * width,
height: this.$store.state.app.height * height
};
this.$refs.jlmapVisual.setOffset(size, data, num);
const obj = {
width: width,
height: height
};
this.$refs.jlmapVisual.setOffset(size, data, num, obj);
},
handleUpdateScreen() {
this.maskOpen = false;
@ -142,6 +146,7 @@ export default {
const param = { value: index + 1, label: `${index + 1}` };
this.optionsList.push(param);
}
console.log(this.optionsList, '======');
const size = {
width: this.$store.state.app.width * width,
height: this.$store.state.app.height * height,

View File

@ -22,7 +22,7 @@
<script>
import { listPublishMap, getMapListByProjectCode } from '@/api/jmap/map';
import { UrlConfig } from '@/scripts/ConstDic';
import { superAdmin, admin, lessonCreater } from '@/router/index_APP_TARGET';
import { superAdmin, admin, lessonCreater } from '@/router/index';
import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/auth';
import FilterCity from '@/views/components/filterCity';
import localStore from 'storejs';

View File

@ -34,7 +34,7 @@ import { getSubSystemDetail } from '@/api/trainingPlatform';
import { UrlConfig } from '@/scripts/ConstDic';
import { forceDeleteLesson } from '@/api/jmap/lesson';
import { getSessionStorage } from '@/utils/auth';
import { lessonCreater } from '@/router/index_APP_TARGET';
import { lessonCreater } from '@/router/index';
import localStore from 'storejs';
export default {

View File

@ -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();
}
}
};

View File

@ -168,6 +168,7 @@ export default {
},
clearForm() {
this.chapterModel.trainingId = '';
this.chapterModel.parentId = null;
this.chapterModel.trainings = [];
this.$refs.form.resetFields();
},

View File

@ -46,6 +46,9 @@ export default {
]
};
return baseRules;
},
mapId() {
return this.$route.params.mapId || this.$route.query.mapId;
}
},
mounted() {
@ -53,22 +56,19 @@ export default {
},
methods: {
doShow(node) {
getPublishLessonListByMapId({mapId:this.$route.params.mapId}).then(response => {
getPublishLessonListByMapId({mapId:this.mapId}).then(response => {
this.lessonList = response.data.map(elem => { return { code: elem.id, name: elem.name }; });
this.dialogShow = true;
}).catch(error => {
this.$messageBox(`${this.$t('error.refreshFailed')}, ${error.message}`);
});
this.dialogShow = true;
},
doClose() {
this.dialogShow = false;
},
create() {
this.$refs.form.validate((valid) => {
if (valid) {
const model = {
id: this.courseModel.code,
mapId:this.$route.params.mapId,
mapId:this.mapId,
name: this.courseModel.name
};
createLessonFromPublish(model).then(response => {
@ -80,6 +80,9 @@ export default {
});
}
});
},
doClose() {
this.dialogShow = false;
}
}
};

View File

@ -12,13 +12,13 @@
<el-form-item :label="$t('lesson.publishCourseName')" prop="name">
<el-input v-model="editModel.name" :disabled="!hasRelease" />
</el-form-item>
<el-form-item v-if="isProject" label="课程所属班级:" prop="classIdList">
<el-form-item v-if="showClassSelect" label="课程所属班级:" prop="classIdList">
<el-select v-model="editModel.classIdList" multiple placeholder="请选择">
<el-option
v-for="item in calssList"
:key="item.id"
:label="item.name"
:value="item.id"
:key="item.departmentId"
:label="item.departmentName"
:value="item.departmentId"
/>
</el-select>
</el-form-item>
@ -33,9 +33,7 @@
<script>
import { adminPublishLesson, releaseOrCancel } from '@/api/designPlatform';
import { getSessionStorage } from '@/utils/auth';
import { getProjectClassList } from '@/api/management/user';
import { ProjectCode } from '@/scripts/ProjectConfig';
import { getCompanyDeptInfo } from '@/api/company';
export default {
name: 'LessonPublish',
data() {
@ -78,8 +76,8 @@ export default {
return this.$store.state.user.roles.includes('04') ||
this.$store.state.user.roles.includes('05') || this.$store.state.user.roles.includes('03');
},
isProject() {
return getSessionStorage('project').endsWith('gzb');
showClassSelect() {
return this.$store.state.user.companyId && this.$store.state.user.companyAdmin;
}
},
methods: {
@ -87,15 +85,14 @@ export default {
this.editModel = {
id: model.id,
name: model.name,
mapId: this.$route.params.mapId,
mapId: this.$route.query.mapId || this.$route.params.mapId,
prdType: model.prdType,
cityCode: model.cityCode,
classIdList: []
};
this.dialogShow = true;
const project = getSessionStorage('project');
if (this.isProject) {
getProjectClassList(ProjectCode[project]).then(resp => {
if (this.showClassSelect) {
getCompanyDeptInfo(this.$store.state.user.companyId).then(resp => {
this.calssList = resp.data;
}).catch(() =>{
this.$message.error('获取班级数据失败!');

View File

@ -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) {

View File

@ -94,7 +94,7 @@ import lick_icon from '@/assets/like.png';
import unlike_icon from '@/assets/unlike.png';
import reply_icon from '@/assets/reply.png';
import delete_icon from '@/assets/delete.png';
import { superAdmin } from '@/router/index_APP_TARGET';
import { superAdmin } from '@/router/index';
import { ProjectCode } from '@/scripts/ProjectConfig';
export default {
name: 'MessageBoard',

View File

@ -68,6 +68,7 @@
:message-list="messageList"
:my-member-id="myMemberId"
:simulation-users="simulationUsers"
:conversition-state-map="conversitionStateMap"
:common-conversation="commonConversation"
:user-role="userRole"
@changeMessageList="changeMessageList"
@ -125,6 +126,7 @@
:message-list="messageList"
:my-member-id="myMemberId"
:simulation-users="simulationUsers"
:conversition-state-map="conversitionStateMap"
:common-conversation="commonConversation"
:user-role="userRole"
width="360px"
@ -238,7 +240,11 @@ export default {
return (this.conversitionStateMap[this.myMemberId] || {privateMemberList: []}).privateMemberList;
},
privateMessageList() {
return (this.conversitionStateMap[this.myMemberId] || {privateMessageList: []}).privateMessageList;
if (this.conversitionStateMap[this.myMemberId] && this.conversitionStateMap[this.myMemberId].connect) {
return (this.conversitionStateMap[this.myMemberId] || {privateMessageList: []}).privateMessageList;
} else {
return [];
}
},
isRecord() {
return !!this.$route.query.record;
@ -250,7 +256,13 @@ export default {
// this.$refs.tree.filter(val);
// }
// },
conversitionId(val) {
// conversitionId(val) {
// if (val) {
// this.conversitionMemberList = this.privateMemberList;
// this.messageList = [...this.privateMessageList];
// }
// },
connect(val) {
if (val) {
this.conversitionMemberList = this.privateMemberList;
this.messageList = [...this.privateMessageList];
@ -427,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: '行调',
@ -663,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 = '请选择人员';
@ -1010,7 +1050,7 @@ export default {
}
if (this.commonConversation) {
this.messageList.push(data.message);
} else if (!this.commonConversation && this.conversitionId === data.id) {
} else if (!this.commonConversation && this.conversitionId === data.id && this.conversitionStateMap[this.myMemberId] && this.conversitionStateMap[this.myMemberId].connect) {
this.messageList.push(data.message);
}
},

View File

@ -36,6 +36,10 @@ export default {
type:Array,
required:true
},
conversitionStateMap: {
type: Object,
required: true
},
isAnswering:{
type:Boolean,
required:true
@ -89,7 +93,7 @@ export default {
const member = this.$store.state.training.memberData[val.message.memberId];
conversationInfo.message.src = `${conversationInfo.message.audioPath}`;
this.$emit('changeMessageList', conversationInfo);
if (this.conversitionId == val.id) {
if (this.conversitionId == val.id && this.conversitionStateMap[this.myMemberId] && this.conversitionStateMap[this.myMemberId].connect) {
if (member && member.userId != this.$store.state.user.id) {
this.currentAudioList.push({audioUrl:this.baseUrl + conversationInfo.message.audioPath, id:val.message.id});
if (!this.isPlay) {

View File

@ -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="触发状态">-->
<!--&lt;!&ndash; <el-input v-model="faultRule.condition.triggerDeviceStatus" size="small" class="inputModelClass" /> &ndash;&gt;-->
<!--<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="触发状态">-->
<!--&lt;!&ndash; <el-input v-model="faultRule.condition.triggerDeviceStatus" size="small" class="inputModelClass" /> &ndash;&gt;-->
<!--<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>

View File

@ -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(() => {

View File

@ -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() {

View File

@ -349,6 +349,8 @@ export default {
switch (hook) {
case 'Update': this.$store.dispatch('map/setKeyboardEnter');
break;
case 'Tab': EventBus.$emit('CheckFaultModeEvent');
break;
}
},
async simulationReset() {
@ -524,8 +526,8 @@ export default {
this.$jlmap.updateShowStation(list, stationCode);
!setCenter && this.setCenter(stationCode);
},
setOffset(data, num, sum) {
this.$jlmap.switchScreen(data, num, sum);
setOffset(data, num, sum, obj) {
this.$jlmap.switchScreen(data, num, sum, obj);
}
}
};

View File

@ -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() {

View File

@ -78,7 +78,6 @@ export default {
this.tPosition.align = this.position.align || 'bottom';
this.tPosition.x = this.position.x - (this.arrawLeft + this.offset);
this.parentWidth = 0;
this.textAlign = this.position.textAlign || 'center';
if (this.tPosition.align == 'top') {
@ -88,7 +87,6 @@ export default {
const distance = 5;
this.tPosition.y = this.position.y - (height + distance);
}
if (this.tPosition.x < 0) this.tPosition.x = 0;
if (this.tPosition.y < 0) this.tPosition.y = 0;
});

View File

@ -20,7 +20,7 @@ import MapPublish from './publish';
import MapPublish3d from './publish3d';
import { mapGetters } from 'vuex';
import { saveMap, getBuildMapExport } from '@/api/jmap/mapdraft';
import { superAdmin, admin } from '@/router/index_APP_TARGET';
import { superAdmin, admin } from '@/router/index';
export default {
name: 'MapOperateMenu',

View File

@ -8,7 +8,7 @@
</template>
<script>
import { admin } from '@/router/index_APP_TARGET';
import { admin } from '@/router/index';
import { listPackagePermission, restorePackagePermission, getPackageQrCode, setCommodityStatus } from '@/api/management/distribute';
import { UrlConfig } from '@/scripts/ConstDic';
import QrCode from '@/components/QrCode';

View File

@ -1,6 +1,6 @@
<template>
<div class="joylink-card">
<div style="margin-top: 20px;width: 90%; position: absolute; left: 5%; height: 100%;">
<div style="overflow: auto;" :style="{height:height+95 + 'px'}">
<div style="width: 90%; position: absolute; left: 5%; height: 100%;">
<el-row>
<el-col :span="20">
<el-form ref="form" :model="form" :rules="rules" label-width="120px" size="mini" style="width: 100%;margin-top: 10px;">
@ -10,9 +10,9 @@
<el-select v-model="form.classId" placeholder="请选择" @change="getLessonByClassId">
<el-option
v-for="item in classList"
:key="item.id"
:label="item.name"
:value="item.id"
:key="item.departmentId"
:label="item.departmentName"
:value="item.departmentId"
/>
</el-select>
</el-form-item>
@ -105,20 +105,9 @@
</el-col>
<el-col :span="4">
<el-button type="primary" size="mini" @click="query">查询</el-button>
<el-button :loading="loadingStudentInfo" type="primary" class="uploadDemo" size="mini" 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="primary" size="mini" style="margin-top: 10px;" @click="exportResults">成绩导出</el-button></el-col>
</el-row>
<div style="height: calc(100% - 270px);">
<div style="height: calc(100% - 160px);">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-table
:data="tableData"
@ -153,17 +142,22 @@
<script>
import { getLessonDrftList } from '@/api/jmap/lessondraft';
import XLSX from 'xlsx';
import { convertSheetToList } from '@/utils/runPlan';
import { importStudentResults, exportStudentResults } from '@/api/management/user';
import { exportStudentResults } from '@/api/management/user';
import { getSessionStorage } from '@/utils/auth';
import { ProjectCode } from '@/scripts/ProjectConfig';
import { getProjectClassList } from '@/api/management/user';
import { getLessonByClassId } from '@/api/jmap/lesson';
import { getExamList } from '@/api/management/exam';
export default {
name: 'StudentManage',
components: {
name: 'GradeExport',
props: {
classList: {
type: Array,
required: true
},
height: {
type: Number,
required: true
}
},
data() {
var validatePass = (rule, value, callback) => {
@ -191,7 +185,6 @@ export default {
return {
loading: false,
loadingStudentInfo: false,
classList: [],
localLessonList: [],
centerLessonList: [],
localExamPaperList: [],
@ -275,25 +268,11 @@ export default {
}
},
mounted() {
this.classList = [];
getProjectClassList(ProjectCode[this.project]).then(resp => {
this.classList = resp.data;
}).catch(() =>{
this.$message.error('获取班级数据失败!');
});
},
methods: {
queryFunction(params) {
return getLessonDrftList(this.$route.params.mapId, params);
},
importResults(e) {
const obj = this.$refs.files;
if (obj.files) {
const file = obj.files[0];
this.handleImportResults(file);
obj.value = '';
}
},
query() {
this.$refs.form.validate((valid) => {
if (valid) {
@ -316,7 +295,7 @@ export default {
classId: '',
localLessonId: ''
};
exportStudentResults(ProjectCode[this.project], params).then(resp => {
exportStudentResults(params).then(resp => {
this.tableData = [];
this.showLocal = false;
this.showCenter = false;
@ -413,74 +392,6 @@ export default {
this.$message.error('获取课程列表失败!');
});
}
},
handleImportResults(file) {
const studentData = { className: '', students:[] };
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 className = dataList[0][2].split(' ')[0].replace(/\s*/g, '').split('')[1];
studentData.className = className;
for ( let i = 5; i <= dataList[0].length; i++) {
if (dataList[2][i] && dataList[1][i]) {
students.push({studentID:dataList[2][i], name: dataList[1][i]});
}
}
}
studentData.students = students;
}
that.loadingStudentInfo = true;
importStudentResults(ProjectCode[that.project], studentData).then(resp => {
that.classList = [];
getProjectClassList(ProjectCode[that.project]).then(respon => {
that.classList = respon.data;
that.loadingStudentInfo = false;
}).catch(() =>{
that.$message.error('获取班级数据失败!');
that.loadingStudentInfo = false;
});
that.$message.success('学生信息导入成功!');
}).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);
}
},
handelData() {
},
exportResults() {
if (!this.tableData || !this.tableData.length) {
@ -670,10 +581,6 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.joylink-card{
height: 100%;
overflow: auto;
}
.file_box {
width: 100%;
height: 100%;

View File

@ -1,36 +1,357 @@
<template>
<div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="部门管理" name="first">部门管理</el-tab-pane>
<!--<el-tab-pane label="职位管理" name="second">职位管理</el-tab-pane>-->
<el-tab-pane label="成员管理" name="second">成员管理</el-tab-pane>
<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="exportTemplate">学生信息导入模板</el-button>
<el-button type="text" @click="goBack">返回</el-button>
</div>
<el-tabs v-model="activeName" type="card">
<el-tab-pane label="部门管理" name="first">
<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">
<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-tab-pane label="成绩导出" name="third">
<grade-export refs="gradeExport" :class-list="classList" :height="height" />
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
</span>
<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';
import GradeExport from './gradeExport';
export default {
name: 'Organization',
components:{
GradeExport
},
data() {
return {
dialogVisible: false
activeName: 'second',
defaultProps: {
children: 'childDept',
label: 'name'
},
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: {
doShow() {
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;
},
handleClose() {
this.dialogVisible = false;
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++) {
const serialNumber = dataList[0][i];
const studentId = dataList[1][i];
const name = dataList[2][i];
const reg = new RegExp('[\\u4E00-\\u9FFF]+', 'g');
const studentIdJudge = !!studentId && !reg.test(studentId);
const serialNumberJudge = serialNumber == (i - 1);
console.log(studentIdJudge, serialNumberJudge);
if (studentIdJudge && serialNumberJudge && name) {
students.push({account:dataList[1][i], name: dataList[2][i]});
} else {
if (!serialNumber && !studentId && !name) {
break;
} else if (!name) {
throw new Error(`序号为:《${serialNumber}》,学号为:《${studentId}》的数据学生姓名为空!`);
} else if (!studentIdJudge) {
throw new Error(`序号为:《${serialNumber}》,学号为:《${studentId}》的数据学号格式不正确!`);
} else if (!serialNumberJudge) {
throw new Error(`序号为:《${serialNumber}》,学号为:《${studentId}》的数据序号顺序不正确!`);
}
}
}
}
studentData.companyUsers = students;
}
that.loadingStudentInfo = true;
importCompanyMember(that.companyId, studentData).then(resp => {
that.$message.success('学生信息导入成功!');
that.loadingStudentInfo = false;
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);
},
exportTemplate() {
const wb = XLSX.utils.book_new();
const data1 = [{A: '', B: '年级一', C:'班级二'}];
const data2 = [{A: '序号', B: '学号', C:'姓名'}];
const data3 = [{A: '1', B: '00001', C:'张三'}];
const data4 = [{A: '2', B: '00002', C:'李四'}];
const data = [...data1, ...data2, ...data3, ...data4];
const ws = XLSX.utils.json_to_sheet(data, {skipHeader:true});
ws['!cols'] = [
{width: 15},
{width: 15},
{width: 15}
];
XLSX.utils.book_append_sheet(wb, ws, 'file');
XLSX.writeFile(wb, '学生信息模板' + '.xlsx');
},
handleNodeClick(e) {
}
}
};
</script>
<style scoped>
.back_box {
float: right;
padding-right: 20px;
height: 40px;
z-index: 36;
width: 320px;
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>

View File

@ -7,7 +7,7 @@
<script>
import { listUserPermision } from '@/api/management/author';
import { superAdmin, admin } from '@/router/index_APP_TARGET';
import { superAdmin, admin } from '@/router/index';
import selectRole from './selectRole/list';
import LangStorage from '@/utils/lang';

View File

@ -30,7 +30,16 @@ export default {
queryForm: {
labelWidth: '140px',
// reset: true,
offsetSpan: 20
// offsetSpan: 20,
queryObject: {
templatePlanId: {
type: 'select',
label: this.$t('publish.runPlanName'),
config: {
data: []
}
}
}
},
queryList: {
query: this.queryFunction,
@ -82,6 +91,9 @@ export default {
this.templatePlanList = [];
queryRunPlanList(this.$route.query.mapId).then(resp => {
this.templatePlanList = resp.data;
this.templatePlanList.forEach(element => {
this.queryForm.queryObject.templatePlanId.config.data.push({label:element.name, value:element.id});
});
});
},
queryFunction(params) {

View File

@ -76,7 +76,6 @@
<script>
import { getPublishLessonList, getExamClassList } from '@/api/jmap/lesson';
import { getExamLessonDetail, updateExamRules } from '@/api/management/exam';
import { getSessionStorage } from '@/utils/auth';
export default {
name: 'ExamFrom',
@ -176,7 +175,7 @@ export default {
return this.$route.params.mode == 'edit';
},
isClassShow() {
return getSessionStorage('project').startsWith('gzb');
return this.$store.state.user.companyId && this.$store.state.user.companyAdmin;
}
},
watch: {

View File

@ -35,7 +35,7 @@ import CopyMap from './copy';
import LocalMap from './localMap';
import ExportMap from './exportMap';
import MapSort from './mapSort';
import { superAdmin } from '@/router/index_APP_TARGET';
import { superAdmin } from '@/router/index';
import { ProjectList } from '@/scripts/ProjectConfig';
import { getPermissionQuickly } from '@/api/management/author';

View File

@ -6,7 +6,7 @@
</template>
<script>
import { superAdmin } from '@/router/index_APP_TARGET';
import { superAdmin } from '@/router/index';
import { getRunPlanLoadList, listAllTempLateRunPlan, deleteDailyRunPlanLoad, postDailyRunPlanLoadGenerate, postSchedulingCommonGenerate } from '@/api/runplan';
import { UrlConfig } from '@/scripts/ConstDic';
import CopyMap from './copyMap';

View File

@ -5,7 +5,7 @@
</template>
<script>
import { superAdmin } from '@/router/index_APP_TARGET';
import { superAdmin } from '@/router/index';
import { getPublishMapListOnline } from '@/api/jmap/map';
import { runPlanEveryDayList, deleteRunPlanEveryDay } from '@/api/runplan';
import { UrlConfig } from '@/scripts/ConstDic';

View File

@ -6,7 +6,7 @@
</template>
<script>
import { superAdmin } from '@/router/index_APP_TARGET';
import { superAdmin } from '@/router/index';
import { getPublishMapListOnline } from '@/api/jmap/map';
import { runPlanTemplateList, deleteRunPlanTemplate, generateCommonRunPlanEveryDay, postRunPlanTemplate } from '@/api/runplan';
import { UrlConfig } from '@/scripts/ConstDic';

View File

@ -19,7 +19,7 @@
import Cookies from 'js-cookie';
import ConstConfig from '@/scripts/ConstConfig';
import { UrlConfig } from '@/scripts/ConstDic';
import { admin, superAdmin} from '@/router/index_APP_TARGET';
import { admin, superAdmin} from '@/router/index';
import {retractScript, publishScript, updateScript, deleteScript, getScriptPageList, createScript, getScriptExport} from '@/api/script';
import { launchFullscreen } from '@/utils/screen';
import { scriptDraftRecordNotifyNew, scriptRecordNotifyNew } from '@/api/simulation';

View File

@ -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();
},

View File

@ -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>

234
src/views/teach/create.vue Normal file
View File

@ -0,0 +1,234 @@
<template>
<el-dialog
title="创建课程"
:visible.sync="dialogVisible"
width="1400px"
:before-close="handleClose"
:center="true"
>
<div class="joylink-card forms">
<div style="height: 100%; padding-top: 40px; overflow-y: auto;">
<el-form ref="form" :model="courseModel" :rules="rules" label-width="135px">
<el-form-item :label="this.$t('lesson.courseName')+this.$t('global.colon')" prop="name">
<el-input v-model="courseModel.name" />
</el-form-item>
<el-form-item :label="this.$t('lesson.mapName')+this.$t('global.colon')" prop="mapId">
<el-select v-model="courseModel.mapId" :placeholder="$t('rules.pleaseSelect')" :disabled="true">
<el-option
v-for="(item,index) in mapIdList"
:key="index"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item :label="this.$t('lesson.prdType')+this.$t('global.colon')" prop="prdType">
<el-select v-model="courseModel.prdType" :placeholder="$t('rules.pleaseSelect')">
<el-option
v-for="(item,index) in prdTypeList"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('lesson.courseDescription')+this.$t('global.colon')" prop="remarks">
<el-input
v-model="courseModel.remarks"
type="textarea"
:autosize="{ minRows: 6, maxRows: 6}"
:placeholder="this.$t('rules.pleaseEnterContent')"
/>
</el-form-item>
</el-form>
</div>
</div>
<div class="draft">
<el-button-group>
<el-button type="primary" @click="create">{{ $t('global.create') }}</el-button>
<el-button type="primary" @click="handleClose">{{ $t('global.back') }}</el-button>
</el-button-group>
</div>
</el-dialog>
</template>
<script>
import { createLesson } from '@/api/jmap/lessondraft';
import { getPublishMapListOnline } from '@/api/jmap/map';
import { DeviceMenu } from '@/scripts/ConstDic';
import Cookies from 'js-cookie';
export default {
name: 'CourseEdit',
data() {
return {
dialogVisible: false,
display: 1,
mapIdList: [],
courseModel: {
id: '',
prdType: '',
product: [],
mapId: '',
name: '',
remarks: ''
}
};
},
computed: {
prdTypeList() {
const productTypeList = [
{ enlabel: 'ATS local workstation', label: 'ATS现地工作站', value: '01'},
{ enlabel: 'ATS Traffic dispatching workstation', label: 'ATS行调工作站', value: '02'}
];
return Cookies.get('user_lang') == 'en'
? productTypeList.map(elem => { return { value: elem.value, label: elem.enlabel }; })
: productTypeList.map(elem => { return { value: elem.value, label: elem.label }; });
},
rules() {
const baseRules = {
name: [
{ required: true, message: this.$t('rules.enterCourseName'), trigger: 'change' }
],
mapId: [
{ required: true, message: this.$t('rules.selectMapName'), trigger: 'change' }
],
prdType: [
{ required: true, message: this.$t('rules.productTypeInput'), trigger: 'change' }
],
remarks: [
{ required: true, message: this.$t('rules.enterCourseDescription'), trigger: 'change' }
]
};
return baseRules;
}
},
mounted() {
},
methods: {
handleClose() {
this.dialogVisible = false;
this.courseModel.id = '';
this.$refs.form && this.$refs.form.resetFields();
},
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
showContextMenu(e, obj, node, vueElem) {
if (obj && obj.type === 'Lesson' || obj.type === 'Chapter') {
e.preventDefault();
this.point = {
x: e.clientX,
y: e.clientY
};
this.node = node;
const menu = DeviceMenu.Lesson;
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
}
},
clickEvent(obj, node, ele) {},
doShow() {
this.mapIdList = [];
getPublishMapListOnline().then(response => {
this.mapIdList = response.data;
this.dialogVisible = true;
this.courseModel.mapId = this.$route.query.mapId;
this.courseModel.prdType = this.$route.query.prdType;
});
},
create() {
this.$refs.form.validate((valid) => {
if (valid) {
const model = {
prdType: this.courseModel.prdType,
name: this.courseModel.name,
mapId: this.courseModel.mapId,
remarks: this.courseModel.remarks
};
createLesson(model).then(response => {
this.$emit('refresh');
this.$message.success(this.$t('tip.createSuccess'));
this.handleClose();
}).catch(() => {
this.$messageBox(this.$t('tip.creatingFailed'));
});
}
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.card-box {
padding-top: 20px;
height: 100%;
margin: 0 auto;
}
.forms {
width: 800px;
margin: 0 auto;
margin-top: 10px;
height: calc(100% - 150px);
/deep/ {
.el-select {
float: left;
width: calc(600px);
}
.el-textarea {
float: left;
width: calc(600px);
}
.el-form-item__content>.el-input {
float: left;
width: calc(600px);
}
.el-input-number {
float: left;
width: calc(250px);
}
}
}
.joylink-card{
height: 500px;
overflow-y: auto;
.title_box{
height: 47px;
line-height: 47px;
text-align: center;
border-bottom: 1px solid #EBEEF5;
}
.content_box{
height: calc(100% - 57px);
display: flex;
align-items: flex-start;
}
}
.tree_box{
position: relative;
left: 24px;
top: 10px;
width: 400px;
height: 100%;
.tree_content_box{
border: 2px dashed #B0C4DE;
height: 100%;
}
}
.draft {
width: 300px;
text-align: center;
margin: 20px auto;
}
</style>

View File

@ -7,7 +7,6 @@
<el-tabs v-model="activeName">
<el-tab-pane :label="$t('teach.courseDetails')" name="first">
<div>
<!--<el-scrollbar wrap-class="scrollbar-wrapper">-->
<el-tree
ref="tree"
:data="courseModel.treeList"
@ -28,7 +27,6 @@
<span v-else>&nbsp;{{ node.label }}</span>
</span>
</el-tree>
<!--</el-scrollbar>-->
</div>
</el-tab-pane>
<el-tab-pane :label="$t('teach.permissionsDetails')" name="second">

View File

@ -0,0 +1,524 @@
<template>
<el-dialog
v-loading="loading"
:title="title"
:visible.sync="dialogVisible"
width="1400px"
:before-close="handleClose"
:center="true"
>
<el-row>
<el-col :span="8">
<div class="joylink-card">
<div class="title_box">
<b>{{ $t('lesson.courseName') + ': '+ lessonName }}</b>
</div>
<div class="content_box">
<div class="tree_box">
<div class="tree_content_box">
<p>{{ this.$t('lesson.courseTree') }}</p>
<div style="height: calc(100% - 89px); overflow-y: auto;">
<el-tree
ref="tree"
style="width: 370px"
:data="treeList"
node-key="id"
:props="defaultProps"
default-expand-all
highlight-current
:span="22"
:filter-node-method="filterNode"
:default-expanded-keys="expandList"
@node-contextmenu="showContextMenu"
@node-click="clickEvent"
/>
</div>
</div>
</div>
</div>
</div>
</el-col>
<el-col :span="16">
<div style="height: 100%; overflow-y: auto;">
<el-form v-if="editType === 'editLesson'" ref="form" :model="courseModel" :rules="courseRules" label-width="135px">
<el-form-item :label="this.$t('lesson.courseName')+this.$t('global.colon')" prop="name">
<el-input v-model="courseModel.name" />
</el-form-item>
<el-form-item :label="this.$t('lesson.mapName')+this.$t('global.colon')" prop="mapId">
<el-select v-model="courseModel.mapId" :placeholder="$t('rules.pleaseSelect')" :disabled="true">
<el-option
v-for="(item,index) in mapIdList"
:key="index"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item :label="this.$t('lesson.prdType')+this.$t('global.colon')" prop="prdType">
<el-select v-model="courseModel.prdType" :placeholder="$t('rules.pleaseSelect')" :disabled="true">
<el-option
v-for="(item,index) in prdTypeList"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('lesson.courseDescription')+this.$t('global.colon')" prop="remarks">
<el-input
v-model="courseModel.remarks"
type="textarea"
:autosize="{ minRows: 6, maxRows: 6}"
:placeholder="this.$t('rules.pleaseEnterContent')"
/>
</el-form-item>
</el-form>
<el-form v-if="editType === 'updateChapter' || editType === 'createChapter'" ref="formChapter" :model="chapterModel" :rules="chapterRules" label-width="135px">
<el-form-item :label="this.$t('lesson.parentChapter')" prop="parentName">
<el-input v-model="chapterModel.parentName" :disabled="true" />
</el-form-item>
<el-form-item :label="this.$t('lesson.chapterName')" prop="name">
<el-input v-model="chapterModel.name" />
</el-form-item>
<el-form-item :label="this.$t('lesson.chapterInstructions')" prop="remarks">
<el-input
v-model="chapterModel.remarks"
type="textarea"
:autosize="{ minRows: 2, maxRows: 2}"
:placeholder="this.$t('rules.pleaseEnterContent')"
/>
</el-form-item>
<el-form-item :label="this.$t('lesson.associatedTraining')" prop="trainings">
<el-table
ref="singleTable"
:data="chapterModel.trainings"
border
highlight-current-row
:height="237"
>
<el-table-column type="index" width="50" />
<el-table-column property="trainingName" :label="this.$t('lesson.trainingName')" />
<el-table-column property="trial" :label="this.$t('global.isTry')" width="80">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.trial" />
</template>
</el-table-column>
<el-table-column fixed="right" :label="this.$t('global.operate')" width="70">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.prevent="deleteRow(scope.$index, chapterModel.trainings)"
>{{ $t('global.remove') }}</el-button>
</template>
</el-table-column>
</el-table>
<el-button type="primary" style="margin-top: 20px" @click="pushTrain">{{ $t('lesson.addTraining') }}</el-button>
</el-form-item>
</el-form>
</div>
<div class="draft">
<el-button-group>
<template v-if="editType === 'createChapter'">
<el-button type="primary" @click="create">{{ $t('global.create') }}</el-button>
<el-button type="primary" @click="handleClose"> </el-button>
</template>
<template v-else>
<el-button type="primary" @click="update">{{ $t('global.update') }}</el-button>
<el-button type="primary" @click="handleClose"> </el-button>
</template>
</el-button-group>
</div>
</el-col>
</el-row>
<operate-menu ref="menu" :point="point" :node="node" @refresh="refresh" @changeRouter="changeRouter" />
<train-list
ref="pathRoute"
:trainings="chapterModel.trainings"
:detail="detail"
:map-id-list="mapIdList"
:line-code="lineCode"
@routeSelected="routeSelected"
/>
</el-dialog>
</template>
<script>
import { createLessonChapter, updateLessonChapter, updateLesson, getLessonDetail, getLessonChapterDetail } from '@/api/jmap/lessondraft';
import { getLessonTree, deleteLessonChapter } from '@/api/jmap/lessondraft';
import { getPublishMapListOnline } from '@/api/jmap/map';
import { DeviceMenu } from '@/scripts/ConstDic';
import OperateMenu from './operateMenu';
import Cookies from 'js-cookie';
import TrainList from './trainingList';
export default {
name: 'CourseEdit',
components: {
OperateMenu,
TrainList
},
data() {
return {
dialogVisible: false,
display: 1,
mapIdList: [],
lineCode: '',
courseModel: {
id: '',
prdType: '',
product: [],
mapId: '',
name: '',
remarks: ''
},
chapterModel: {
trainingId: '',
lessonId: '',
name: '',
remarks: '',
trainings: [],
parentId: null,
parentName: ''
},
treeList: [],
defaultProps: {
children: 'children',
label: 'name'
},
detail: {
mapId: '',
prdType: ''
},
expandList: [],
lessonName: '',
lessonId: '',
node: {},
point: {},
title: '编辑课程',
editType: 'editLesson',
loading: false
};
},
computed: {
prdTypeList() {
const productTypeList = [
{ enlabel: 'ATS local workstation', label: 'ATS现地工作站', value: '01'},
{ enlabel: 'ATS Traffic dispatching workstation', label: 'ATS行调工作站', value: '02'}
];
return Cookies.get('user_lang') == 'en'
? productTypeList.map(elem => { return { value: elem.value, label: elem.enlabel }; })
: productTypeList.map(elem => { return { value: elem.value, label: elem.label }; });
},
courseRules() {
const baseRules = {
name: [
{ required: true, message: this.$t('rules.enterCourseName'), trigger: 'change' }
],
mapId: [
{ required: true, message: this.$t('rules.selectMapName'), trigger: 'change' }
],
prdType: [
{ required: true, message: this.$t('rules.productTypeInput'), trigger: 'change' }
],
remarks: [
{ required: true, message: this.$t('rules.enterCourseDescription'), trigger: 'change' }
]
};
return baseRules;
},
chapterRules() {
const baseRules = {
name: [
{ required: true, message: this.$t('rules.enterChapterName'), trigger: 'change' }
],
remarks: [
{ required: true, message: this.$t('rules.enterChapterInstructions'), trigger: 'change' }
]
};
return baseRules;
}
},
created() {
this.mapIdList = [];
getPublishMapListOnline().then(response => {
this.mapIdList = response.data;
this.mapIdList && this.mapIdList.forEach(item =>{
if (item.id === this.$route.query.mapId) {
this.lineCode = item.lineCode;
}
});
}).catch(() => {
this.$message.error('获取发布地图信息失败!');
});
},
methods: {
handleClose() {
this.dialogVisible = false;
this.courseModel.id = '';
this.$refs.form && this.$refs.form.resetFields();
this.$refs.formChapter && this.$refs.formChapter.resetFields();
this.$emit('refresh');
},
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
showContextMenu(e, obj, node) {
if (obj && obj.type === 'Lesson' || obj.type === 'Chapter') {
e.preventDefault();
this.point = {
x: e.clientX,
y: e.clientY
};
this.node = node;
const menu = DeviceMenu.Lesson;
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
}
},
clickEvent(obj, node, ele) {},
doShow(data) {
this.editType = 'editLesson';
getLessonTree(data.id).then(resp => {
if (resp.data && resp.data[0]) {
this.lessonName = resp.data[0].name;
this.lessonId = resp.data[0].id;
this.treeList = resp.data;
this.dialogVisible = true;
this.courseModel.mapId = this.$route.query.mapId;
this.courseModel.prdType = this.$route.query.prdType;
this.courseModel.id = data.id;
this.courseModel.name = data.name;
this.courseModel.remarks = data.remarks;
}
});
},
create() {
this.$refs.formChapter.validate((valid) => {
if (valid) {
this.loading = true;
createLessonChapter(this.chapterModel).then(response => {
this.refresh();
this.$message.success(this.$t('tip.createSuccess'));
this.loading = false;
}).catch(() => {
this.loading = false;
this.$messageBox(this.$t('error.refreshFailed'));
});
}
});
},
update() {
if (this.editType === 'editLesson') {
this.$refs.form.validate((valid) => {
if (valid) {
this.loading = true;
updateLesson(this.courseModel).then(response => {
this.refresh();
this.$message.success(this.$t('tip.updateSuccessfully'));
this.loading = false;
}).catch(() => {
this.$messageBox(this.$t('tip.updateFailed'));
this.loading = false;
});
}
});
} else {
this.$refs.formChapter.validate((valid) => {
if (valid) {
this.loading = true;
updateLessonChapter(this.chapterModel).then(response => {
this.refresh();
this.$message.success(this.$t('tip.updateSuccessfully'));
this.loading = false;
}).catch(() => {
this.$messageBox(this.$t('error.refreshFailed'));
this.loading = false;
});
}
});
}
},
refresh() {
this.editType = 'editLesson';
getLessonDetail({id: this.lessonId}).then(response => {
const data = response.data;
this.courseModel = {
id: data.id,
mapId: this.$route.query.mapId,
prdType: data.prdType,
name: data.name,
remarks: data.remarks
};
}).catch(() => {
this.$messageBox(this.$t('error.obtainCourseInformationFailed'));
});
getLessonTree(this.lessonId).then(resp => {
if (resp.data && resp.data[0]) {
this.lessonName = resp.data[0].name;
this.lessonId = resp.data[0].id;
this.treeList = resp.data;
}
});
},
deleteChapter(node) {
const _that = this;
this.$confirm('是否确认删除章节《' + node.data.name + '》 ' + ' ', this.$t('tip.hint'), {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteLessonChapter(node.data.id).then(response => {
_that.refresh();
_that.$message.success(this.$t('map.successfullyDelete'));
}).catch(error => {
_that.$message.error(this.$t('map.failDelete') + error.message);
});
}).catch(() => {});
},
pushTrain() {
if (this.$refs && this.$refs.pathRoute) {
this.$refs.pathRoute.doShow();
}
},
routeSelected(data) {
data.forEach((elem, index) => {
this.chapterModel.trainings.push({trainingName: elem.name, trial: false, trainingId: elem.id});
});
},
getChapter(data, isEdit) {
getLessonChapterDetail(data).then(response => {
this.setChapterModel(response.data, isEdit);
}).catch(() => {
this.$messageBox(this.$t('error.obtainChapterDataFailed'));
});
},
deleteRow(index, rows) {
rows.splice(index, 1);
},
setChapterModel(data, isEdit) {
if (!isEdit) {
this.chapterModel.lessonId = this.lessonId;
this.chapterModel.trainings = [];
this.chapterModel.lessonName = this.lessonName;
this.chapterModel.name = '';
this.chapterModel.remarks = '';
this.chapterModel.trainingId = '';
this.chapterModel.parentName = data.type === 'Lesson' ? '' : data.name;
this.chapterModel.parentId = data.type === 'Lesson' ? '' : data.id;
} else {
this.chapterModel = data;
this.chapterModel.lessonName = this.lessonName;
this.chapterModel.lessonId = this.lessonId;
}
},
changeRouter(params) {
switch (params.event) {
case '01':
this.editType = 'editLesson';
this.$nextTick(() => {
this.$refs.form.clearValidate();
});
break;
case '02':
this.editType = 'createChapter';
this.$nextTick(() => {
this.$refs.formChapter.resetFields();
this.setChapterModel(params.node.data, false);
});
break;
case '03':
this.editType = 'updateChapter';
this.$nextTick(() => {
this.$refs.formChapter.clearValidate();
this.getChapter(params.node.data, true);
});
break;
case '04':
this.editType = 'createChapter';
this.$nextTick(() => {
this.$refs.formChapter.resetFields();
this.getChapter(params.node.data, false);
});
break;
case '05':
this.deleteChapter(params.node);
break;
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.card-box {
padding-top: 20px;
height: 100%;
margin: 0 auto;
}
.forms {
width: 800px;
margin: 0 auto;
margin-top: 10px;
height: calc(100% - 150px);
/deep/ {
.el-select {
float: left;
width: calc(600px);
}
.el-textarea {
float: left;
width: calc(600px);
}
.el-form-item__content>.el-input {
float: left;
width: calc(600px);
}
.el-input-number {
float: left;
width: calc(250px);
}
}
}
.joylink-card{
height: 500px;
overflow-y: auto;
.title_box{
height: 47px;
line-height: 47px;
text-align: center;
border-bottom: 1px solid #EBEEF5;
}
.content_box{
height: calc(100% - 57px);
display: flex;
align-items: flex-start;
padding-bottom: 20px;
}
}
.tree_box{
position: relative;
left: 24px;
top: 10px;
width: 400px;
height: 100%;
.tree_content_box{
border: 2px dashed #B0C4DE;
height: 100%;
}
}
.draft {
width: 300px;
text-align: center;
margin: 20px auto;
}
</style>

View File

@ -0,0 +1,258 @@
<template>
<div class="joylink-card">
<div class="lesson-header">
<div class="lesson-list">草稿{{ $t('lesson.courseList') }}</div>
<div class="but-group">
<el-button size="mini" type="primary" @click="lessonCreateByPublish">{{ $t('lesson.createNewCoursesFromRelease') }}</el-button>
<el-button size="mini" type="primary" @click="lessonCreate">{{ $t('lesson.newConstruction') }}</el-button>
<el-button size="mini" type="primary" @click="back">返回</el-button>
</div>
</div>
<QueryListPage ref="queryListPage" :card-padding="50" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
<publish-create ref="publishCreate" @refresh="refresh" />
<publish-lesson ref="publishLesson" @refresh="refresh" />
<lesson-detail ref="lessonDetail" />
<draft-create ref="draftCreate" @refresh="refresh" />
<draft-detail ref="draftDetail" @refresh="refresh" />
<sort-tree ref="sortTree" />
</div>
</template>
<script>
import { releaseOrCancel } from '@/api/designPlatform';
import { getLessonDrftList } from '@/api/jmap/lessondraft';
import PublishCreate from '@/views/lesson/lessoncategory/edit/create/index';
import draftCreate from './create';
import sortTree from './sorttree';
import PublishLesson from '@/views/lesson/lessoncategory/edit/lesson/publish';
import { delLesson } from '@/api/jmap/lessondraft';
import LessonDetail from '@/views/approval/detail';
import ConstConfig from '@/scripts/ConstConfig';
import draftDetail from './draftDetail';
export default {
name: 'LessonHome',
components: {
PublishCreate,
PublishLesson,
LessonDetail,
draftCreate,
sortTree,
draftDetail
},
data() {
return {
loading: false,
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
show: false
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: this.$t('lesson.courseName'),
prop: 'name'
},
{
title: this.$t('lesson.courseDescription'),
prop: 'remarks'
},
{
title: this.$t('global.status'),
prop: 'status',
type: 'tag',
columnValue: (row) => {
return this.$convertField(row.status, ConstConfig.ConstSelect.releaseReview, ['value', 'label']);
},
tagType: (row) => { return 'success'; }
},
{
type: 'button',
title: this.$t('global.operate'),
width: '400',
buttons: [
{
name: this.$t('lesson.courseDetails'),
handleClick: this.goDetail,
type: 'primary',
showControl: (row) => {
return row.status !== '1';
}
},
{
name: this.$t('lesson.contentSorting'),
handleClick: this.treeSort,
type: 'primary',
showControl: (row) => {
return row.status !== '1';
}
},
{
name: this.$t('global.release'),
handleClick: this.publish,
type: 'primary',
showControl: (row) => {
return row.status === '0' && this.hasRelease;
}
},
{
name: this.$t('lesson.applicationForRelease'),
handleClick: this.publish,
type: 'primary',
showControl: (row) => {
return row.status === '0' && !this.hasRelease;
}
},
{
name: this.$t('lesson.review'),
handleClick: this.review,
type: 'primary',
showControl: (row) => {
return row.status === '1';
}
},
{
name: this.$t('global.delete'),
handleClick: this.deleteLesson,
type: 'danger',
showControl: (row) => {
return row.status !== '1';
}
},
{
name: this.$t('lesson.withdraw'),
handleClick: this.revertLesson,
type: 'danger',
showControl: (row) => {
return row.status === '1';
}
}
]
}
]
}
};
},
computed: {
mapId() {
return this.$route.query.mapId;
},
isAdmin() {
return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05');
},
hasRelease() {
return this.$store.state.user.roles.includes('04') ||
this.$store.state.user.roles.includes('05') || this.$store.state.user.roles.includes('03');
}
},
watch: {
$route() {
this.refresh();
}
},
mounted() {
},
methods: {
queryFunction(params) {
return getLessonDrftList(this.mapId, params);
},
handlerStatus(row) {
let lessonStatus = '';
switch (row.status) {
case '0':
lessonStatus = this.$t('lesson.notRelease');
break;
case '1':
lessonStatus = this.$t('lesson.pendingReview');
break;
case '2':
lessonStatus = this.$t('lesson.published');
break;
case '3':
lessonStatus = this.$t('lesson.rejected');
break;
}
return lessonStatus;
},
refresh() {
this.$refs.queryListPage.refresh(true);
},
lessonCreate() {
this.$refs.draftCreate.doShow();
},
lessonCreateByPublish() {
this.$nextTick(() => {
this.$refs.publishCreate.doShow();
});
},
publish(index, row) {
row.mapId = this.mapId;
row.cityCode = this.$route.query.cityCode;
this.$refs.publishLesson.doShow(row);
},
deleteLesson(index, row) {
delLesson(row).then(response => {
this.$message.success(this.$t('tip.successfullyDelete'));
this.loading = true;
this.refresh();
this.loading = false;
}).catch(() => {
this.$messageBox(this.$t('tip.failDelete'));
});
},
treeSort(index, row) {
this.$refs.sortTree.doShow(row);
},
revertLesson(index, row) {
this.$confirm(this.$t('tip.cancelCoursePublicationHint'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(() => {
releaseOrCancel(row.id, '0').then(response => {
this.loading = false;
this.$message.success(this.$t('tip.cancelTheSuccessfulApplicationOfTheCourseRelease'));
this.refresh();
}).catch(() => {
this.loading = false;
this.$messageBox(this.$t('tip.cancellationOfCoursePublicationApplicationFailed'));
this.refresh();
});
});
},
review(index, row) {
this.$refs.lessonDetail.show(row.id);
},
goDetail(index, row) {
this.$refs.draftDetail.doShow(row);
},
back() {
this.$router.go(-1);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.joylink-card{
height: 100%;
overflow: auto;
}
.lesson-header{
display:inline-block;margin-top:40px;width: 90%;margin-left:5%;
}
.lesson-list{
display:inline-block;padding:7px 0px
}
.but-group{
float: right;
margin-right:20px;
}
</style>

View File

@ -4,6 +4,7 @@
<div slot="header" class="lessonHeader">
{{ $t('global.lessonSystem') }}
</div>
<el-button size="mini" type="primary" style="position: absolute;right: 10px;top: 10px;" @click="draftLessonManage">草稿课程管理</el-button>
</el-card>
<el-card v-loading="loading">
<el-table :data="tableData" border style="width: 100%">
@ -16,16 +17,15 @@
<el-table-column prop="remarks" show-overflow-tooltip :label="this.$t('teach.courseDescription')" />
<el-table-column :label="this.$t('global.operate')">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="goLesson(scope.row)">
{{ $t('teach.enterTheCourse') }}
</el-button>
<el-button v-if="project.endsWith('gzb') && isTeacher && userId === scope.row.creatorId" size="mini" type="danger" @click="handleDelete(scope.row)">
删除课程
</el-button>
<el-button size="mini" type="primary" @click="goLesson(scope.row)">{{ $t('teach.enterTheCourse') }}</el-button>
<el-button v-if="(isLessonCreator && userId === scope.row.creatorId) || isAdmin" size="mini" type="primary" @click="handleEdit(scope.row)">编辑</el-button>
<el-button v-if="(isLessonCreator && userId === scope.row.creatorId) || isAdmin" size="mini" type="warning" @click="handleSoldOut(scope.row)">下架</el-button>
<el-button v-if="(isLessonCreator && userId === scope.row.creatorId) || isAdmin" size="mini" type="danger" @click="handleDelete(scope.row)">删除课程</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<update-operate ref="updateLesson" :title="$t('publish.updateLesson')" @create="handleUpdate" />
</div>
</template>
@ -34,23 +34,37 @@ import { getSubSystemDetail } from '@/api/trainingPlatform';
import { UrlConfig } from '@/scripts/ConstDic';
import { forceDeleteLesson } from '@/api/jmap/lesson';
import { getSessionStorage } from '@/utils/auth';
import { lessonCreater } from '@/router/index_APP_TARGET';
import { lessonCreater, superAdmin, admin } from '@/router/index';
import { putLessonOffLine, updatePublishLesson } from '@/api/jmap/lesson';
import UpdateOperate from '@/views/publish/publishLesson/draft.vue';
import localStore from 'storejs';
export default {
name: 'TeachHome',
components:{
UpdateOperate
},
data() {
return {
tableData: [],
loading: false,
project: '',
isTeacher: false,
userId: ''
mapId: '',
prdType: ''
};
},
computed: {
isGzbShow() {
return getSessionStorage('project').startsWith('gzb');
},
userId() {
return this.$store.state.user.id;
},
isLessonCreator() {
return this.$store.state.user.roles.includes(lessonCreater);
},
isAdmin() {
return this.$store.state.user.roles.includes(admin) || this.$store.state.user.roles.includes(superAdmin);
}
},
watch: {
@ -61,14 +75,14 @@ export default {
mounted() {
this.loadInitPage();
this.project = getSessionStorage('project');
this.isTeacher = this.$store.state.user.roles.includes(lessonCreater);
this.userId = this.$store.state.user.id;
},
methods: {
loadInitPage() {
if (this.$route.params.subSystem) {
getSubSystemDetail(this.$route.params.subSystem).then(resp =>{
if (resp.data) {
this.mapId = resp.data.mapId;
this.prdType = resp.data.prdType;
this.tableData = resp.data.lessonList;
} else {
this.tableData = [];
@ -88,6 +102,36 @@ export default {
goLesson(row) {
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}`, query: {lessonId: row.id, mapId: row.mapId, prdType: row.prdType}});
},
handleSoldOut(row) {
this.$confirm(this.$t('publish.wellSoldOutTraining'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(() => {
putLessonOffLine(row.id).then(response => {
this.$message.success(this.$t('publish.operationSuccess'));
this.reloadTable();
}).catch(() => {
this.reloadTable();
this.$messageBox(this.$t('error.operationFailure'));
});
}).catch(() => { });
},
handleEdit(row) {
this.$refs.updateLesson.doShow(row);
},
handleUpdate(data) {
updatePublishLesson(data).then(response => {
this.loadInitPage();
this.$message.success(this.$t('publish.updateSuccess'));
}).catch(() => {
this.$messageBox(this.$t('error.updateFailed'));
});
},
draftLessonManage() {
const query = {mapId: this.mapId, prdType: this.prdType, cityCode: this.$route.query.cityCode};
this.$router.push({ path: `/trainingPlatform/draftTeach/${this.$route.params.subSystem}`, query: query });
},
handleDelete(row) {
this.$confirm('此操作将删除课程及所有对应的试卷,且无法恢复,是否继续?', this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),

View File

@ -0,0 +1,130 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import { DeviceMenu } from '@/scripts/ConstDic';
import PopMenu from '@/components/PopMenu';
export default {
name: 'TrainingOperateMenu',
components: {
PopMenu
},
props: {
point: {
type: Object,
required: true
},
node: {
type: Object,
required: true
}
},
data() {
return {
menuShow: false,
menu: [],
menuChapte: [
{
label: this.$t('lesson.updateChapter'),
handler: this.updateChapter
},
{
label: this.$t('lesson.createChapter'),
handler: this.createChapterInChapter
},
{
label: '删除章节',
handler: this.deleteChapter
}
],
menuLesson: [
{
label: this.$t('lesson.editCourse'),
handler: this.editLesson
},
{
label: this.$t('lesson.createChapter'),
handler: this.createChapter
}
]
};
},
watch: {
node: function (val, old) {
if (val && val.data) {
switch (val.data.type) {
case 'Lesson':
this.menu = this.menuLesson;
break;
case 'Chapter':
this.menu = this.menuChapte;
break;
}
}
},
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Lesson)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
mounted() {
this.closeEvent();
},
methods: {
closeEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
doShow(point) {
this.closeEvent();
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.resetShowPosition(point);
}
this.menuShow = true;
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
this.menuShow = false;
},
updateChapter() {
this.$emit('changeRouter', {event: '03', node: this.node});
},
deleteChapter() {
this.$emit('changeRouter', {event: '05', node: this.node});
},
createChapter() {
this.$emit('changeRouter', {event: '02', node: this.node});
},
editLesson() {
this.$emit('changeRouter', {event: '01', node: this.node});
},
createChapterInChapter() {
this.$emit('changeRouter', {event: '04', node: this.node});
},
refresh(filterSelect) {
this.$emit('refresh', filterSelect);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ {
.menu-item{
background: #f1ecec;
.pop-menu {
background: #5F9EA0;
}
}
}
</style>

View File

@ -0,0 +1,143 @@
<template>
<el-dialog
title="实训排序"
:visible.sync="dialogVisible"
width="1000px"
:before-close="handleClose"
:center="true"
>
<el-card class="forms">
<div style="height:100%;overflow-y:auto">
<el-tree
ref="lessonTree"
:data="treeData"
:props="defaultProps"
draggable
:allow-drop="allowDrop"
default-expand-all
:allow-drag="allowDrag"
expand-on-click-node
highlight-current
style="margin:20px; min-height:300px;"
@node-drag-end="handleDragEnd"
>
<span slot-scope="{ node }">
<el-tooltip class="item" effect="dark" :content="node.label" placement="top" :open-delay="1000">
<span v-if="node.data.type === 'lesson'" class="el-icon-tickets">{{ node.label }}</span>
<span v-if="node.data.type === 'chapter'" class="el-icon-document">{{ node.label }}
</span>
<span v-else> {{ node.label }}</span>
</el-tooltip>
</span>
</el-tree>
</div>
</el-card>
</el-dialog>
</template>
<script>
import { getLessonTree, dragSortLessonChapter } from '@/api/jmap/lessondraft';
export default {
name: 'SortTree',
data() {
return {
display: 1,
dialogVisible: false,
treeData: [],
defaultProps: {
children: 'children',
label: 'name'
}
};
},
methods: {
doShow(data) {
this.dialogVisible = true;
getLessonTree(data.id).then(response => {
this.treeData = response.data;
}).catch(() => {
this.$messageBox(this.$t('error.refreshFailed'));
});
},
handleClose() {
this.dialogVisible = false;
},
allowDrop(draggingNode, dropNode, type) {
if (draggingNode && draggingNode.data.type === 'Chapter') {
return dropNode && (dropNode.data.type === 'Chapter');
} else if (draggingNode && draggingNode.data.type === 'Training') {
return dropNode && (dropNode.data.type === 'Training' && type !== 'inner' && draggingNode.parent == dropNode.parent );
} else {
return true;
}
},
allowDrag(draggingNode) {
return draggingNode && (draggingNode.data.type === 'Chapter' || draggingNode.data.type === 'Training');
},
getLeesonId(node) {
if (node.parent.data.type === 'Lesson') {
return node.parent.data.id;
} else {
return this.getLeesonId(node.parent);
}
},
handleDragEnd(draggingNode, dropNode, dropType, ev) {
if (draggingNode && dropNode && dropType !== 'none') {
const lessonId = this.getLeesonId(dropNode);
const model = {
location: dropType,
sourceId: draggingNode.data.id,
sourceType: draggingNode.data.type,
targetId: dropNode.data.id,
targetType: dropNode.data.type,
lessonId: lessonId,
chapterId: dropNode.parent.data.id
};
dragSortLessonChapter(model).then(response => {
this.$emit('refresh');
});
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.el-tree-node.is-current>.el-tree-node__content {
background-color: #e4e3e3 !important;
}
.card-box {
padding-top: 20px;
}
.steps {
width: 980px;
margin: 0 auto;
height: 100%;
/deep/ {
.el-step__icon.is-icon {
width: 95px;
}
}
}
/deep/ .el-card__body{
height:100%;
}
.forms {
width: 800px;
margin: 0 auto;
margin-top: 10px;
height: calc(100% - 150px);
}
.draft {
width: 300px;
text-align: center;
margin: 20px auto;
}
</style>

View File

@ -0,0 +1,247 @@
<template>
<el-dialog
v-dialogDrag
:title="this.$t('lesson.trainingList')"
:visible.sync="show"
top="20px"
width="90%"
:before-do-close="doClose"
:close-on-click-modal="false"
append-to-body
>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</el-dialog>
</template>
<script>
import ConstConfig from '@/scripts/ConstConfig';
import Cookies from 'js-cookie';
import { pageQueryTrainingNew } from '@/api/jmap/training';
import localStore from 'storejs';
import { getCmdList } from '@/api/management/dictionary';
import { getTrainingOperateTypeMap } from '@/scripts/ConstDic';
export default {
name: 'TrainList',
props: {
trainings: {
type: Array,
default() { return null; }
},
detail: {
type: Object,
default() { return null; }
},
mapIdList: {
type: Array,
default() { return []; }
},
lineCode: {
type: String,
default() { return ''; }
}
},
data() {
return {
show: false,
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
trainingTypeList: [],
trainingOperateTypeMap: {},
queryForm: {
labelWidth: '100px',
reset: true,
queryObject: {
type: {
type: 'select',
label: this.$t('lesson.trainingType'),
change: this.typeChoose,
config: {
data: []
}
},
operateType: {
type: 'select',
label: this.$t('lesson.operationType'),
config: {
data: []
}
},
generateType: {
type: 'select',
label: this.$t('lesson.automaticOrManual'),
config: {
data: [{ value: '02', label: this.$t('lesson.automatic') }, { value: '01', label: this.$t('lesson.manual') }]
}
}
}
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: this.$t('lesson.trainingName'),
prop: 'name'
},
{
title: this.$t('lesson.mapName'),
prop: 'mapId',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.mapId, this.mapIdList, ['id', 'name']); },
tagType: (row) => { return 'success'; }
},
{
title: this.$t('lesson.prdType'),
prop: 'prdType',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.prdType, this.prdTypeList, ['value', 'label']); },
tagType: (row) => { return 'success'; }
},
{
title: this.$t('lesson.trainingType'),
prop: 'type',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.type, this.trainingTypeList, ['value', 'label']); },
tagType: (row) => { return 'success'; }
},
{
title: this.$t('lesson.operationType'),
prop: 'operateType',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.operateType, this.trainingOperateTypeMap[row.type], ['value', 'label']); },
tagType: (row) => { return 'success'; }
},
{
type: 'button',
title: this.$t('global.operate'),
width: '200',
buttons: [
{
name: this.$t('global.append'),
handleClick: this.addObj,
showControl: (row) => { return !row.isShow; }
},
{
name: this.$t('global.remove'),
handleClick: this.delObj,
type: 'warning',
showControl: (row) => { return row.isShow; }
}
]
}
],
selectAllClick: this.selectAll
}
};
},
computed:{
prdTypeList() {
const productTypeList = ConstConfig.ConstSelect.prdType;
return Cookies.get('user_lang') == 'en'
? productTypeList.map(elem => { return { value: elem.value, label: elem.enlabel }; })
: productTypeList.map(elem => { return { value: elem.value, label: elem.label }; });
}
},
mounted() {
this.loadInitData();
},
methods: {
doShow() {
this.show = true;
this.reloadTable();
},
doClose() {
this.show = false;
},
async queryFunction(params) {
params['mapId'] = this.detail.mapId;
params['prdType'] = this.detail.prdType;
let res = '';
res = await pageQueryTrainingNew(params);
res.data.list.forEach(item => {
item.isShow = false;
this.trainings.forEach(ele => {
if (item.id == ele.trainingId) {
item.isShow = true;
}
});
});
return res;
},
async loadInitData() {
this.trainingTypeList = [];
this.trainingOperateTypeMap = getTrainingOperateTypeMap();
const res = await getCmdList(this.lineCode, {});
const trainingOperateList = [];
const trainingOperateConfigList = [];
const operateTypeMap = {
Switch: [],
Section: [],
Signal: [],
Stand: [],
Station: [],
ControlConvertMenu: [],
TrainWindow: [],
LimitControl: [],
Driver: []
};
if (res && res.code === 200) {
res.data.forEach(item => {
(this.trainingOperateTypeMap[item.operateObject] || []).forEach(ele => {
if (ele.value == item.operate && !operateTypeMap[item.operateObject].includes(ele)) {
operateTypeMap[item.operateObject].push(ele);
}
});
if (!trainingOperateList.includes(item.operateObject)) {
trainingOperateList.push(item.operateObject);
const objectLabel = ConstConfig.ConstSelect.trainingDeviceType[item.operateObject] || {};
trainingOperateConfigList.push({value: item.operateObject, label: Cookies.get('user_lang') == 'en' ? objectLabel.enlabel : objectLabel.label});
}
});
this.queryForm.queryObject.type.config.data = trainingOperateConfigList;
this.trainingTypeList = trainingOperateConfigList;
this.trainingOperateTypeMap = operateTypeMap;
} else {
this.$message.error(this.$t('error.failedToObtainTrainingType'));
}
const json = localStore.get(this.$route.path);
if (json && json.type) {
this.typeChoose(json);
}
},
typeChoose(form) {
this.queryForm.queryObject.operateType.config.data = [];
if (form && form.type) {
form.operateType = '';
this.queryForm.queryObject.operateType.config.data = this.trainingOperateTypeMap[form.type];
}
},
addObj(index, row) {
const data = [];
row.isShow = true;
data.push(row);
this.$emit('routeSelected', data);
},
delObj(index, row) {
row.isShow = false;
this.trainings.forEach((el, i) => {
if (el.trainingId == row.id) {
this.trainings.splice(i, 1);
}
});
},
selectAll(data) {
this.$emit('routeSelected', data);
},
reloadTable() {
if (this.queryList && this.queryList.reload) {
this.queryList.reload();
}
}
}
};
</script>

View File

@ -9,7 +9,7 @@
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
</template>
</div>
<div class="left-map-list">
<div id="trainingMapTree" class="left-map-list">
<el-tree
ref="tree"
:data="treeList"
@ -27,11 +27,11 @@
<span
class="el-icon-tickets"
/>
<span v-if="node.data.id ==='Simulation'">&nbsp;{{ node.data.name+ $t('global.simulationSystem') }}</span>
<span v-else-if="node.data.id ==='Lesson'">&nbsp;{{ node.data.name+ $t('global.lessonSystem') }}</span>
<span v-else-if="node.data.id ==='Exam'">&nbsp;{{ node.data.name+ $t('global.examSystem') }}</span>
<span v-else-if="node.data.id ==='Plan'">&nbsp;{{ node.data.name+ $t('global.runPlanSystem') }}</span>
<span v-else>&nbsp;{{ node.data.name }}</span>
<span v-if="node.data.id ==='Simulation'" :id="node.data.key">&nbsp;{{ node.data.name+ $t('global.simulationSystem') }}</span>
<span v-else-if="node.data.id ==='Lesson'" :id="node.data.key">&nbsp;{{ node.data.name+ $t('global.lessonSystem') }}</span>
<span v-else-if="node.data.id ==='Exam'" :id="node.data.key">&nbsp;{{ node.data.name+ $t('global.examSystem') }}</span>
<span v-else-if="node.data.id ==='Plan'" :id="node.data.key">&nbsp;{{ node.data.name+ $t('global.runPlanSystem') }}</span>
<span v-else :id="node.data.key">&nbsp;{{ node.data.name }}</span>
</span>
</el-tree>
</div>
@ -113,7 +113,7 @@ export default {
break;
case 'Lesson':
this.setLocalRoute(`${UrlConfig.trainingPlatform.teachHome}/${obj.id}`);
router = { path: `${UrlConfig.trainingPlatform.teachHome}/${obj.id}`};
router = { path: `${UrlConfig.trainingPlatform.teachHome}/${obj.id}?cityCode=${this.filterSelect}`};
this.toNextPage(isReplace, router);
break;
case 'Simulation':
@ -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);
@ -170,7 +169,15 @@ export default {
checkId && this.findTree(this.treeList, checkId);
!checkId && this.treeList && this.treeList.length && this.clickEvent(this.treeList[0], {data: this.treeList[0]});
}
this.loading = false;
setTimeout(()=> {
if (checkId) {
const checkIdDom = document.getElementById(checkId);
const mapTreeDom = document.getElementById('trainingMapTree');
mapTreeDom.scrollTop = checkIdDom.offsetTop;
}
this.loading = false;
}, 200);
});
} catch (error) {
this.loading = false;

View File

@ -35,6 +35,8 @@ module.exports = {
productionSourceMap: false, // 项目打包后是否压缩
devServer: {
port: port,
host: '0.0.0.0',
disableHostCheck: true,
hotOnly: true,
overlay: {
warnings: false,
@ -63,12 +65,12 @@ module.exports = {
// },
// parallel: require('os').cpus().length > 1, // 是否为 Babel 或 TypeScript 使用 thread-loader。该选项在系统的 CPU 有多于一个内核时自动启用,仅作用于生产构建。
configureWebpack: config => {
const appTarget = process.env.VUE_APP_PRO == 'local' ? 'HEB' : 'Common'; // 其他环境变量 区分配置
config.plugins.push(new webpack.NormalModuleReplacementPlugin(/(.*)_APP_TARGET(\.*)/,
function (resourse) {
resourse.request = resourse.request.replace(/APP_TARGET/, `${appTarget}`);
})
);
// const appTarget = process.env.VUE_APP_PRO == 'local' ? 'HEB' : 'Common'; // 其他环境变量 区分配置
// config.plugins.push(new webpack.NormalModuleReplacementPlugin(/(.*)_APP_TARGET(\.*)/,
// function (resourse) {
// resourse.request = resourse.request.replace(/APP_TARGET/, `${appTarget}`);
// })
// );
if (process.env.NODE_ENV != 'development') {
config.mode = 'production';