Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
620839876d
@ -1,40 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
/** 创建实操 */
|
||||
export function createPractical(data) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/** 加载实操及内容 */
|
||||
export function loadingPractical(data) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/distribute`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/** 查询地图下的实操列表 */
|
||||
export function getPracticalListByMapId(mapId) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/map/${mapId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 删除实操 */
|
||||
export function deletePractical(practicalId) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/${practicalId}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
/** 更新实操 */
|
||||
export function updatePractical(practicalId, data) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/{practicalId}`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
@ -26,52 +26,10 @@ export function updateRace(id, data) {
|
||||
}
|
||||
|
||||
/** 获取实操试题列表(题库)*/
|
||||
export function getPracticeList() {
|
||||
export function getPracticeList(params) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/competition`,
|
||||
method: 'get'
|
||||
url: `/api/v1/competitionPractical`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取单个实操试题详情(题库)*/
|
||||
export function getPracticeByIdBasic() {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/competition`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 创建实操试题 */
|
||||
export function createPractice(data) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/competition`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
/** 更新实操试题信息 */
|
||||
export function putPracticeInfo(id, params) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/competition/${id}`,
|
||||
method: 'put',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除实操试题 */
|
||||
export function deletePractice(id) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/competition/${id}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
/** 录制实操试题 */
|
||||
export function practiceRecordNotify(practiceId) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${practiceId}/scriptWrite`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
BIN
src/assets/iscs_icon/button.png
Normal file
BIN
src/assets/iscs_icon/button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 362 B |
BIN
src/assets/iscs_icon/button_active.png
Normal file
BIN
src/assets/iscs_icon/button_active.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 358 B |
@ -242,5 +242,10 @@ deviceRender[deviceType.StateTable] = {
|
||||
zlevel: 1,
|
||||
z: 5
|
||||
};
|
||||
|
||||
/** 照明组 */
|
||||
deviceRender[deviceType.LightingGroup] = {
|
||||
_type: deviceType.LightingGroup,
|
||||
zlevel: 1,
|
||||
z: 5
|
||||
};
|
||||
export default deviceRender;
|
||||
|
@ -36,7 +36,8 @@ const deviceType = {
|
||||
SingleStaircase: 'SingleStaircase',
|
||||
ArcStatus: 'ArcStatus',
|
||||
IscsButton: 'IscsButton',
|
||||
StateTable: 'StateTable'
|
||||
StateTable: 'StateTable',
|
||||
LightingGroup: 'LightingGroup'
|
||||
};
|
||||
|
||||
export default deviceType;
|
||||
|
File diff suppressed because one or more lines are too long
7
src/iscs/constant/keyboardEvents.js
Normal file
7
src/iscs/constant/keyboardEvents.js
Normal file
@ -0,0 +1,7 @@
|
||||
export const keyboardEvents = {
|
||||
C: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_C'}, // 绘图复制
|
||||
V: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_V'} // 绘图粘贴
|
||||
// DELETE: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Delete'}, // 快捷删除绘图元素
|
||||
// ENTER: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Update'} // 快捷修改绘图元素
|
||||
};
|
||||
|
@ -4,6 +4,7 @@ import Options from './options';
|
||||
import MouseController from './mouseController';
|
||||
import Painter from './painter';
|
||||
import deviceType from './constant/deviceType';
|
||||
import KeyboardController from './keyboardController';
|
||||
import {calculateDCenter, createBoundingRect, deviceFactory} from './utils/parser';
|
||||
import { updateIscsData } from './utils/parser';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
@ -16,7 +17,7 @@ class Iscs {
|
||||
this.methods = opts.methods;
|
||||
|
||||
// 鼠标事件
|
||||
this.events = { __Pan: 'pan', Selected: 'selected', Contextmenu: 'contextmenu'};
|
||||
this.events = { __Pan: 'pan', Selected: 'selected', Contextmenu: 'contextmenu', Keyboard: 'keyboard'};
|
||||
|
||||
// 设备数据
|
||||
this.iscsDevice = {};
|
||||
@ -41,6 +42,8 @@ class Iscs {
|
||||
this.$painter.updateTransform(this.$options, this.canvasSize);
|
||||
|
||||
this.optionsHandler = this.setOptions.bind(this);
|
||||
this.$keyboardController = new KeyboardController(this);
|
||||
this.$keyboardController.enable();
|
||||
|
||||
this.$mouseController.on(this.events.__Pan, this.optionsHandler);
|
||||
}
|
||||
@ -241,6 +244,7 @@ class Iscs {
|
||||
this.clear();
|
||||
|
||||
this.$mouseController.dispose();
|
||||
this.$keyboardController.dispose();
|
||||
this.$iscsZr && zrender.dispose(this.$iscsZr);
|
||||
this.$painter.dispose();
|
||||
}
|
||||
@ -258,6 +262,9 @@ class Iscs {
|
||||
case this.events.DataZoom:
|
||||
this.$mouseController.on(this.events.DataZoom, cb, context);
|
||||
break;
|
||||
case this.events.Keyboard:
|
||||
this.$keyboardController.on(this.events.Keyboard, cb, context);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -275,6 +282,9 @@ class Iscs {
|
||||
case this.events.DataZoom:
|
||||
this.$mouseController.off(this.events.DataZoom, cb);
|
||||
break;
|
||||
case this.events.Keyboard:
|
||||
this.$keyboardController.off(this.events.Keyboard, cb);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
51
src/iscs/keyboardController.js
Normal file
51
src/iscs/keyboardController.js
Normal file
@ -0,0 +1,51 @@
|
||||
import Eventful from 'zrender/src/mixin/Eventful';
|
||||
import { keyboardEvents } from './constant/keyboardEvents';
|
||||
|
||||
class KeyboardController extends Eventful {
|
||||
constructor(iscs) {
|
||||
super();
|
||||
this.$iscs = iscs;
|
||||
this.$zr = iscs.getZr();
|
||||
this.events = iscs.getEvents();
|
||||
this.initData();
|
||||
this.initHandler(this.$zr);
|
||||
}
|
||||
|
||||
initHandler(zr) {
|
||||
if (zr) {
|
||||
var keydownHandle = this.keydown.bind(this);
|
||||
|
||||
this.enable = function (opts) {
|
||||
opts = opts || {};
|
||||
this._keyOnDownUp = opts.keyOnDownUp || true;
|
||||
|
||||
window.addEventListener('keyup', keydownHandle, false);
|
||||
};
|
||||
|
||||
this.disable = function () {
|
||||
window.removeEventListener('keyup', keydownHandle, false);
|
||||
};
|
||||
|
||||
this.dispose = function() {
|
||||
this.disable();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
initData() {
|
||||
|
||||
}
|
||||
|
||||
keydown(e) {
|
||||
if (this._keyOnDownUp && !e.repeat) {
|
||||
const currentEvent = keyboardEvents[e.key.toUpperCase()];
|
||||
let str = '';
|
||||
if (currentEvent && currentEvent.altKey === e.altKey && currentEvent.ctrlKey === e.ctrlKey && currentEvent.shiftKey === e.shiftKey) {
|
||||
str = currentEvent.event;
|
||||
}
|
||||
this.trigger(this.events.Keyboard, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default KeyboardController;
|
@ -22,6 +22,9 @@ export default class airConditioner extends Group {
|
||||
this.grouper.origin = [this.model.width / 2, this.model.width * 0.571 / 2];
|
||||
this.grouper.scale = [-1, -1];
|
||||
}
|
||||
if (this.model.rotate) {
|
||||
this.grouper.rotation = -Math.PI / 180 * Number(this.model.rotate);
|
||||
}
|
||||
this.add(this.grouper);
|
||||
}
|
||||
setModel(dx, dy) {
|
||||
|
@ -1,6 +1,8 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Image from 'zrender/src/graphic/Image';
|
||||
import buttonImg from '@/assets/iscs_icon/button.png';
|
||||
import buttonActive from '@/assets/iscs_icon/button_active.png';
|
||||
|
||||
export default class Button extends Group {
|
||||
constructor(device) {
|
||||
@ -37,24 +39,24 @@ export default class Button extends Group {
|
||||
});
|
||||
const textRect = this.buttonText.getBoundingRect();
|
||||
this.buttonText.setStyle('textLineHeight', textRect.height);
|
||||
this.buttonRect = new Rect({
|
||||
this.imageButton = new Image({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
style: {
|
||||
x: textRect.x - model.levelPadding,
|
||||
y: textRect.y - model.verticalPadding,
|
||||
image: buttonImg,
|
||||
width: textRect.width + 2 * model.levelPadding,
|
||||
height: textRect.height + 2 * model.verticalPadding
|
||||
},
|
||||
style: {
|
||||
fill: '#879096',
|
||||
stroke: '#132E48',
|
||||
lineWidth: 1
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.buttonRect);
|
||||
this.grouper.add(this.imageButton);
|
||||
this.grouper.add(this.buttonText);
|
||||
this.add(this.grouper);
|
||||
this.on('mouseout', (e) => { this.buttonText && this.buttonText.setStyle({textFill: '#FFF'}); });
|
||||
this.on('mouseover', (e) => { this.buttonText && this.buttonText.setStyle({textFill: '#000'}); });
|
||||
this.on('mousedown', (e) => { this.imageButton && this.imageButton.setStyle({image: buttonActive}); });
|
||||
this.on('mouseup', (e) => { this.imageButton && this.imageButton.setStyle({image: buttonImg}); });
|
||||
}
|
||||
setModel(dx, dy) {
|
||||
this.model.point.x += dx;
|
||||
|
@ -37,6 +37,7 @@ import ArcStatus from './ArcStatus';
|
||||
import IscsButton from './button';
|
||||
import SmookExhaustFd from './bas/smookExhaustFd';
|
||||
import StateTable from './stateTable';
|
||||
import LightingGroup from './lighting';
|
||||
|
||||
const iscsShape = {};
|
||||
iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton;
|
||||
@ -78,6 +79,7 @@ iscsShape[deviceType.SingleStaircase] = SingleStaircase;
|
||||
iscsShape[deviceType.ArcStatus] = ArcStatus;
|
||||
iscsShape[deviceType.IscsButton] = IscsButton;
|
||||
iscsShape[deviceType.StateTable] = StateTable;
|
||||
iscsShape[deviceType.LightingGroup] = LightingGroup;
|
||||
|
||||
function shapefactory(device, iscs) {
|
||||
const type = device.model._type;
|
||||
|
@ -9,7 +9,7 @@ export default class FireHydrantAlarmButton extends Group {
|
||||
this._type = device.model._type;
|
||||
this._code = device.model.code;
|
||||
this.zlevel = device.model.zlevel;
|
||||
this.z = device.model.zlevel;
|
||||
this.z = device.model.z;
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
|
186
src/iscs/shape/lighting.js
Normal file
186
src/iscs/shape/lighting.js
Normal file
@ -0,0 +1,186 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Circle from 'zrender/src/graphic/shape/Circle';
|
||||
import Line from 'zrender/src/graphic/shape/Line';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
|
||||
export default class lighting extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
this.model = device.model;
|
||||
this._type = device.model._type;
|
||||
this._code = device.model.code;
|
||||
this.zlevel = device.model.zlevel;
|
||||
this.z = device.model.z;
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
const model = this.model;
|
||||
this.grouper = new Group({
|
||||
id: model.code,
|
||||
position: [model.point.x, model.point.y]
|
||||
});
|
||||
this.outsideRect = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: model.width,
|
||||
height: model.height
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
fill: 'rgba(0,0,0,0)',
|
||||
stroke: '#4CCDE4'
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.outsideRect);
|
||||
this.verticalLine = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
x1: model.width * 2 / 5,
|
||||
y1: 0,
|
||||
x2: model.width * 2 / 5,
|
||||
y2: model.height
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#4CCDE4'
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.verticalLine);
|
||||
this.horizontalLine = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
x1: model.width * 2 / 5,
|
||||
y1: model.height / 2,
|
||||
x2: model.width,
|
||||
y2: model.height / 2
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#4CCDE4'
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.horizontalLine);
|
||||
this.insideCircle = new Circle({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
cx: model.width / 5,
|
||||
cy: model.height / 2,
|
||||
r: model.width / 10
|
||||
},
|
||||
style: {
|
||||
lineWidth: 1,
|
||||
fill: 'rgba(0,0,0,0)',
|
||||
stroke: '#0F0'
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.insideCircle);
|
||||
this.topCircle = new Circle({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 2,
|
||||
shape: {
|
||||
cx: model.width / 5,
|
||||
cy: model.height / 2,
|
||||
r: model.width / 10
|
||||
},
|
||||
style: {
|
||||
fill: '#45607B'
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.topCircle);
|
||||
this.underlyingRect = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x: model.width * 7 / 40,
|
||||
y: model.height / 2 - model.width / 5,
|
||||
width: model.width / 20,
|
||||
height: model.width / 5
|
||||
},
|
||||
style: {
|
||||
lineWidth: 1,
|
||||
fill: 'rgba(0,0,0,0)',
|
||||
stroke: '#0F0'
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.underlyingRect);
|
||||
this.topRect = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 2,
|
||||
shape: {
|
||||
x: model.width * 7 / 40,
|
||||
y: model.height / 2 - model.width / 5,
|
||||
width: model.width / 20,
|
||||
height: model.width / 5
|
||||
},
|
||||
style: {
|
||||
fill: '#45607B'
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.topRect);
|
||||
this.lines = [];
|
||||
for (let i = 0; i < 7; i++) {
|
||||
const lightingLine = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
x1: model.width / 5 + Math.cos(Math.PI / 6 * i) * (model.width / 10 + 2),
|
||||
y1: model.height / 2 + Math.sin(Math.PI / 6 * i) * (model.width / 10 + 2),
|
||||
x2: model.width / 5 + Math.cos( Math.PI / 6 * i) * (model.width / 5),
|
||||
y2: model.height / 2 + Math.sin(Math.PI / 6 * i) * (model.width / 5)
|
||||
},
|
||||
style: {
|
||||
lineWidth: 1,
|
||||
stroke: '#0F0'
|
||||
}
|
||||
});
|
||||
this.grouper.add(lightingLine);
|
||||
this.lines.push(lightingLine);
|
||||
}
|
||||
this.topText = new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
x: model.width * 7 / 10,
|
||||
y: model.height / 4,
|
||||
fontSize: model.topFontSize,
|
||||
fontFamily: 'consolas',
|
||||
text: model.topContext,
|
||||
textFill: model.topTextFill,
|
||||
textAlign: 'center',
|
||||
textPosition: 'inside',
|
||||
textVerticalAlign: 'middle',
|
||||
textLineHeight: model.topFontSize
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.topText);
|
||||
this.bottomText = new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
x: model.width * 7 / 10,
|
||||
y: model.height * 3 / 4,
|
||||
fontSize: model.bottomFontSize,
|
||||
fontFamily: 'consolas',
|
||||
text: model.bottomContext,
|
||||
textFill: model.bottomTextFill,
|
||||
textAlign: 'center',
|
||||
textPosition: 'inside',
|
||||
textVerticalAlign: 'middle',
|
||||
textLineHeight: model.bottomFontSize
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.bottomText);
|
||||
this.add(this.grouper);
|
||||
}
|
||||
setModel(dx, dy) {
|
||||
this.model.point.x += dx;
|
||||
this.model.point.y += dy;
|
||||
}
|
||||
}
|
@ -34,7 +34,7 @@ export default class line extends Group {
|
||||
}
|
||||
});
|
||||
if (model.classify == 'dashed') {
|
||||
this.iscsLine.setStyle('lineDash', [2, 2]);
|
||||
this.iscsLine.setStyle('lineDash', [8, 6]);
|
||||
}
|
||||
this.grouper.add(this.iscsLine);
|
||||
this.add(this.grouper);
|
||||
|
@ -10,7 +10,7 @@ export default class manualAlarmButton extends Group {
|
||||
this._type = device.model._type;
|
||||
this._code = device.model.code;
|
||||
this.zlevel = device.model.zlevel;
|
||||
this.z = device.model.zlevel;
|
||||
this.z = device.model.z;
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
@ -21,7 +21,7 @@ export default class manualAlarmButton extends Group {
|
||||
this.add(this.grouper);
|
||||
this.rect = new Rect({
|
||||
zlevel: this.model.zlevel,
|
||||
z: this.model.z - 1,
|
||||
z: this.model.z,
|
||||
shape: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
@ -37,7 +37,7 @@ export default class manualAlarmButton extends Group {
|
||||
this.grouper.add(this.rect);
|
||||
this.text = new Text({
|
||||
zlevel: this.model.zlevel,
|
||||
z: this.model.z,
|
||||
z: this.model.z + 1,
|
||||
style: {
|
||||
x: 0,
|
||||
y: this.model.width * 2 / 5,
|
||||
@ -56,7 +56,7 @@ export default class manualAlarmButton extends Group {
|
||||
this.grouper.add(this.text);
|
||||
this.circleOutside = new Circle({
|
||||
zlevel: this.model.zlevel,
|
||||
z: this.model.z,
|
||||
z: this.model.z + 1,
|
||||
shape: {
|
||||
cx: this.model.width * 2 / 3,
|
||||
cy: this.model.width * 2.2 / 3,
|
||||
@ -69,7 +69,7 @@ export default class manualAlarmButton extends Group {
|
||||
this.grouper.add(this.circleOutside);
|
||||
this.circleInside = new Circle({
|
||||
zlevel: this.model.zlevel,
|
||||
z: this.model.z,
|
||||
z: this.model.z + 1,
|
||||
shape: {
|
||||
cx: this.model.width * 2 / 3,
|
||||
cy: this.model.width * 2.2 / 3,
|
||||
|
@ -2,6 +2,7 @@ import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import Line from 'zrender/src/graphic/shape/Line';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Circle from 'zrender/src/graphic/shape/Circle';
|
||||
const stateMap = {
|
||||
slidingDoorEmergencyDoorOpenMalfunction : '滑动门&应急门开门故障',
|
||||
slidingDoorEmergencyDoorCloseMalfunction: '滑动门&应急门关门故障',
|
||||
@ -20,25 +21,32 @@ const stateMap = {
|
||||
systemControlPowerFailure: '系统控制电源故障',
|
||||
monitorPowerFailure: '监视电源故障',
|
||||
fieldBusFault:'现场总线故障',
|
||||
fasSystemFailure: { default: '正常'}, // 火灾系统故障
|
||||
facpAutoMode: { default: '手动' }, // FACP自动状态
|
||||
gesControlStatus: { default: '手动'}, // 气灭控制系统状态
|
||||
hydrantStartupStatus: { default: '停止'}, // 消火栓泵启动状态
|
||||
tscFireCondition: { default: '正常'}, // 感温电缆火警状态
|
||||
aEquipmentAreaFireDetector: { default: '正常'}, // 站厅A端设备区点型火灾探测器
|
||||
bEquipmentAreaFireDetector: { default: '正常'}, // 站厅B端设备区点型火灾探测器
|
||||
pcaFireDetector: { default: '正常' }, // 站台公共区点型火灾探测器
|
||||
scaFireDetector: { default: '正常'}, // 站厅公共区点型火灾探测器
|
||||
elevatorCutFirePowerSupply: { default: '正常'}, // 站内垂直电梯切非站台B消
|
||||
otherCutFirePowerSupply: { default: '正常'}, // 其他切非回路站台B消
|
||||
inDownLeftManualAlarm: { default: '正常' }, // 站内下行左线手动报警按钮
|
||||
inUpRightManualAlarm: { default: '正常'}, // 站内上行右线手动报警按钮
|
||||
outDownLeftManualAlarm: { default: '正常'}, // 站间下行左线手动报警按钮
|
||||
outUpRightManualAlarm: { default: '正常'}, // 站间上行右线手动报警按钮
|
||||
inDownLeftHydrant: { default: '正常'}, // 站内下行左线消火栓按钮
|
||||
inUpRightHydrant: { default: '正常'}, // 站内上行右线消火栓按钮
|
||||
outDownLeftHydrant: { default: '正常'}, // 站间下行左线消火栓按钮
|
||||
outUpRightHydrant: { default: '正常'} // 站间上行右线消火栓按钮
|
||||
fasSystemFailure: { default: '正常', color: '#38984F'}, // 火灾系统故障
|
||||
facpAutoMode: { default: '手动', color: '#38984F'}, // FACP自动状态
|
||||
gesControlStatus: { default: '手动', color: '#38984F'}, // 气灭控制系统状态
|
||||
hydrantStartupStatus: { default: '停止', color: '#38984F'}, // 消火栓泵启动状态
|
||||
tscFireCondition: { default: '正常', color: '#38984F'}, // 感温电缆火警状态
|
||||
aEquipmentAreaFireDetector: { default: '正常', color: '#38984F'}, // 站厅A端设备区点型火灾探测器
|
||||
bEquipmentAreaFireDetector: { default: '正常', color: '#38984F'}, // 站厅B端设备区点型火灾探测器
|
||||
pcaFireDetector: { default: '正常', color: '#38984F' }, // 站台公共区点型火灾探测器
|
||||
scaFireDetector: { default: '正常', color: '#38984F'}, // 站厅公共区点型火灾探测器
|
||||
elevatorCutFirePowerSupply: { default: '正常', color: '#38984F'}, // 站内垂直电梯切非站台B消
|
||||
otherCutFirePowerSupply: { default: '正常', color: '#38984F'}, // 其他切非回路站台B消
|
||||
inDownLeftManualAlarm: { default: '正常', color: '#38984F' }, // 站内下行左线手动报警按钮
|
||||
inUpRightManualAlarm: { default: '正常', color: '#38984F'}, // 站内上行右线手动报警按钮
|
||||
outDownLeftManualAlarm: { default: '正常', color: '#38984F'}, // 站间下行左线手动报警按钮
|
||||
outUpRightManualAlarm: { default: '正常', color: '#38984F'}, // 站间上行右线手动报警按钮
|
||||
inDownLeftHydrant: { default: '正常', color: '#38984F'}, // 站内下行左线消火栓按钮
|
||||
inUpRightHydrant: { default: '正常', color: '#38984F'}, // 站内上行右线消火栓按钮
|
||||
outDownLeftHydrant: { default: '正常', color: '#38984F'}, // 站间下行左线消火栓按钮
|
||||
outUpRightHydrant: { default: '正常', color: '#38984F'}, // 站间上行右线消火栓按钮
|
||||
videoServerStatus: { default: true, type: 'Circle', color: '#4CCDE4'}, // 视屏服务器状态
|
||||
dataServerStatus: { default: true, type: 'Circle', color: '#4CCDE4'}, // 数据服务器状态
|
||||
mediaServerStatus: { default: true, type: 'Circle', color: '#4CCDE4'}, // 媒体交换服务器状态
|
||||
decoderState: { default: true, type: 'Circle', color: '#4CCDE4'}, // 解码器状态
|
||||
quadDecoderState: { default: true, type: 'Circle', color: '#4CCDE4'}, // 四路解码器状态
|
||||
quadDecoderModeState: { default: '监视器', color: '#4CCDE4'}, // 四路解码器模式状态
|
||||
controlKeyboardState: { default: true, type: 'Circle', color: '#4CCDE4'} // 控制键盘状态
|
||||
};
|
||||
|
||||
export default class StateTable extends Group {
|
||||
@ -168,6 +176,23 @@ export default class StateTable extends Group {
|
||||
model.tableData.forEach((item, i)=> {
|
||||
let width = 0;
|
||||
model.columnWidthList.forEach((elem, j) => {
|
||||
if (stateMap[item['column' + (j + 1)]] && stateMap[item['column' + (j + 1)]].type === 'Circle') {
|
||||
const circle = new Circle({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 1,
|
||||
_subType: stateMap[item['column' + (j + 1)]],
|
||||
shape: {
|
||||
cx: elem / 2 + width,
|
||||
cy: model.rowHeight * (i + contentIndex) - model.rowHeight / 2,
|
||||
r: model.rowHeight / 3
|
||||
},
|
||||
style: {
|
||||
fill: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].color : '#4CCDE4'
|
||||
}
|
||||
});
|
||||
this.grouper.add(circle);
|
||||
this.tabelContent.push(circle);
|
||||
} else {
|
||||
const text = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 1,
|
||||
@ -179,7 +204,7 @@ export default class StateTable extends Group {
|
||||
fontSize: model.fontSize,
|
||||
fontFamily: 'consolas',
|
||||
text: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].default : item['column' + (j + 1)],
|
||||
textFill: stateMap[item['column' + (j + 1)]] ? '#38984F' : '#4CCDE4',
|
||||
textFill: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].color : '#4CCDE4',
|
||||
textAlign: 'center',
|
||||
textPosition: 'inside',
|
||||
textVerticalAlign: 'bottom',
|
||||
@ -188,6 +213,7 @@ export default class StateTable extends Group {
|
||||
});
|
||||
this.grouper.add(text);
|
||||
this.tabelContent.push(text);
|
||||
}
|
||||
width += elem;
|
||||
});
|
||||
});
|
||||
|
@ -157,6 +157,9 @@ export function parser(data) {
|
||||
zrUtil.each(data.stateTableList || [], elem=> {
|
||||
iscsDevice[elem.code] = deviceFactory(deviceType.StateTable, elem);
|
||||
});
|
||||
zrUtil.each( data.lightingGroupList || [], elem=> {
|
||||
iscsDevice[elem.code] = deviceFactory(deviceType.LightingGroup, elem);
|
||||
});
|
||||
}
|
||||
|
||||
return iscsDevice;
|
||||
@ -293,6 +296,9 @@ export function updateIscsData(state, device) {
|
||||
case deviceType.StateTable:
|
||||
updateIscsListByDevice(state, 'stateTableList', device);
|
||||
break;
|
||||
case deviceType.LightingGroup:
|
||||
updateIscsListByDevice(state, 'lightingGroupList', device);
|
||||
break;
|
||||
}
|
||||
// store.dispatch('iscs/setIscsData', state.iscs);
|
||||
}
|
||||
|
@ -146,12 +146,16 @@ export default {
|
||||
// 取消列车进路
|
||||
cancelTrainRoute() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {}, 2).then(({valid})=>{
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {}, 1).then(({valid, operate})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['messages'] = `取消以信号机${this.selected.name}为始端的进路,该进路即将由自动信号模式转为人工模式!`;
|
||||
this.$refs.confirmControl.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
@ -198,7 +202,7 @@ export default {
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -218,7 +222,7 @@ export default {
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -238,7 +242,7 @@ export default {
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -259,7 +263,7 @@ export default {
|
||||
|
||||
this.doClose();
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
|
@ -166,7 +166,7 @@ export default {
|
||||
// 车站扣车
|
||||
this.treeData[1].children[1].value = selected.stationHoldTrain ? '已设置' : '未设置';
|
||||
// 停站时间
|
||||
this.treeData[0].children[2].value = selected.parkingTime == 0 ? '自动' : `${selected.parkingTime} 秒`;
|
||||
this.treeData[0].children[2].value = selected.parkingTime <= 0 ? '自动' : `${selected.parkingTime} 秒`;
|
||||
// 跳停
|
||||
this.treeData[0].children[3].value = selected.allSkip || selected.assignSkip ? '已设置' : '未设置';
|
||||
// if (selected.direction == '01') {
|
||||
|
@ -71,13 +71,18 @@ export default {
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: '信号关灯',
|
||||
handler: this.signalClose,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '信号重开',
|
||||
handler: this.reopenSignal,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '进路引导',
|
||||
label: '引导进路办理',
|
||||
handler: this.guide,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
@ -102,9 +107,19 @@ export default {
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
||||
},
|
||||
{
|
||||
label: '信号关灯',
|
||||
handler: this.signalClose,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
label: '进路交人工控',
|
||||
handler: this.humanControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '进路交ATS自动控',
|
||||
handler: this.atsAutoControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '查询进路状态',
|
||||
handler: this.detail,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
@ -314,6 +329,22 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置联锁自动触发
|
||||
setAutoTrigger() {
|
||||
commitOperate(menuOperate.Signal.setAutoTrigger, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消联锁自动触发
|
||||
cancelAutoTrigger() {
|
||||
commitOperate(menuOperate.Signal.cancelAutoTrigger, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
|
@ -68,7 +68,7 @@ export default {
|
||||
cmdType:CMD.Switch.CMD_SWITCH_TURN
|
||||
},
|
||||
{
|
||||
label: '故障解锁',
|
||||
label: '道岔故障解锁',
|
||||
handler: this.fault,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||
},
|
||||
@ -88,12 +88,12 @@ export default {
|
||||
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
},
|
||||
{
|
||||
label: '设置限速',
|
||||
label: '道岔设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: '取消限速',
|
||||
label: '道岔取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
|
@ -98,12 +98,12 @@ export const menuOperate = {
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
},
|
||||
setAutoInterlock:{
|
||||
// 设置通过模式
|
||||
// 设置通过模式 设置联锁自动进路
|
||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
},
|
||||
cancelAutoInterlock:{
|
||||
// 取消通过模式
|
||||
// 取消通过模式 取消联锁自动进路
|
||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
},
|
||||
@ -125,6 +125,16 @@ export const menuOperate = {
|
||||
// 取消自动折返
|
||||
operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
||||
},
|
||||
setAutoTrigger: {
|
||||
// 设置联锁自动触发
|
||||
operation: OperationEvent.Signal.setAutoTrigger.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
|
||||
},
|
||||
cancelAutoTrigger: {
|
||||
// 取消联锁自动触发
|
||||
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
||||
}
|
||||
},
|
||||
Switch:{
|
||||
|
@ -9,7 +9,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPracticeByIdBasic} from '@/api/race';
|
||||
import { getScriptByIdBasic} from '@/api/script';
|
||||
|
||||
export default {
|
||||
name: 'ScriptDraft',
|
||||
@ -20,7 +20,7 @@ export default {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
raceList:{
|
||||
mapList:{
|
||||
type: Array,
|
||||
default() {
|
||||
return '';
|
||||
@ -39,19 +39,12 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
raceInfoList() {
|
||||
const racelist = [];
|
||||
this.raceList.forEach(each=>{
|
||||
racelist.push({label:each.name, value:each.id});
|
||||
});
|
||||
return racelist;
|
||||
},
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '120px',
|
||||
items: [
|
||||
{ prop: 'name', label: '实操名称', type: 'text' },
|
||||
{ prop:'raceId', label:'竞赛名称', type:'select', options:this.raceInfoList, disabled:this.isEdit},
|
||||
{ prop:'mapId', label:'实操地图', type:'select', options:this.mapList, disabled:this.isEdit},
|
||||
{ prop: 'description', label: '实操描述', type: 'textarea' }
|
||||
]
|
||||
};
|
||||
@ -67,8 +60,8 @@ export default {
|
||||
{ validator: this.validateDescription, trigger: 'blur' },
|
||||
{ validator: this.validateDescription, trigger: 'change' }
|
||||
],
|
||||
raceId:[
|
||||
{ required: true, message: '请选择竞赛', trigger: 'change' }
|
||||
mapId:[
|
||||
{ required: true, message: '请选择地图', trigger: 'change' }
|
||||
]
|
||||
};
|
||||
return crules;
|
||||
@ -93,15 +86,15 @@ export default {
|
||||
},
|
||||
doShow(questid) {
|
||||
if (questid) {
|
||||
getPracticeByIdBasic(questid).then(resp=>{
|
||||
const data = {'name':resp.data.name, 'description':resp.data.description, 'mapId':resp.data.mapId};
|
||||
getScriptByIdBasic(questid).then(resp=>{
|
||||
const data = {'name':resp.data.name, 'description':resp.data.description, 'mapId':resp.data.mapId, isRace:resp.data.isRace};
|
||||
this.formModel = data;
|
||||
this.formModel.id = questid;
|
||||
this.dialogVisible = true;
|
||||
this.isEdit = true;
|
||||
});
|
||||
} else {
|
||||
this.formModel.mapId = this.$route.params.mapId;
|
||||
this.formModel.isRace = true;
|
||||
this.dialogVisible = true;
|
||||
this.isEdit = false;
|
||||
}
|
||||
|
@ -1,12 +1,17 @@
|
||||
<template>
|
||||
<div>
|
||||
<query-list-page ref="user" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<create-practice ref="createPractice" :race-list="raceList" title="创建实操" @reloadTable="reloadTable" @create="handleConfirmCreate" />
|
||||
<create-practice ref="modifyPractice" :race-list="raceList" title="修改实操" @reloadTable="reloadTable" @create="handleConfirmModify" />
|
||||
<create-practice ref="createPractice" :map-list="mapList" title="创建实操" @reloadTable="reloadTable" @create="handleConfirmCreate" />
|
||||
<create-practice ref="modifyPractice" :map-list="mapList" title="修改实操" @reloadTable="reloadTable" @create="handleConfirmModify" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getPracticeList, getRaceList, putPracticeInfo, deletePractice, createPractice, practiceRecordNotify } from '@/api/race';
|
||||
import Cookies from 'js-cookie';
|
||||
import { getPublishMapListOnline, getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { getPracticeList } from '@/api/race';
|
||||
import {updateScript, deleteScript, createScript} from '@/api/script';
|
||||
import { scriptRecordNotifyNew } from '@/api/simulation';
|
||||
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import CreatePractice from './create';
|
||||
@ -17,7 +22,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
raceList:[],
|
||||
mapList:[],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
@ -26,9 +31,9 @@ export default {
|
||||
reset: true,
|
||||
labelWidth: '80px',
|
||||
queryObject: {
|
||||
raceId: {
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: '竞赛名称',
|
||||
label: '实操地图',
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
@ -40,33 +45,31 @@ export default {
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
// query: getPracticeList,
|
||||
data:[
|
||||
{id:1, raceId:2, name:'行调进行扣车操作', creatorName:'水墨'},
|
||||
{id:2, raceId:4, name:'行调进行扣车操作', creatorName:'zyy'},
|
||||
{id:3, raceId:3, name:'行调进行扣车操作', creatorName:'水墨'}
|
||||
],
|
||||
query: getPracticeList,
|
||||
// data:[
|
||||
// {id:1, raceId:2, name:'行调进行扣车操作', creatorName:'水墨'},
|
||||
// {id:2, raceId:4, name:'行调进行扣车操作', creatorName:'zyy'},
|
||||
// {id:3, raceId:3, name:'行调进行扣车操作', creatorName:'水墨'}
|
||||
// ],
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '竞赛名称',
|
||||
prop: 'raceId',
|
||||
title: '实操地图',
|
||||
prop: 'mapId',
|
||||
type: 'tag',
|
||||
width: '320',
|
||||
columnValue: (row) => { return this.getRaceName(row.raceId); },
|
||||
tagType: (row) => {
|
||||
return '';
|
||||
}
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '实操名称',
|
||||
prop: 'name'
|
||||
prop: 'name',
|
||||
width: '400'
|
||||
},
|
||||
{
|
||||
title: '创建人',
|
||||
prop: 'creatorName',
|
||||
width: '100'
|
||||
title: '实操描述',
|
||||
prop: 'description'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@ -102,12 +105,9 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
getRaceList({pageSize:999, pageNum:1}).then(res=>{
|
||||
this.raceList = res.data.list;
|
||||
this.queryForm.queryObject.raceId.config.data = [];
|
||||
this.raceList.forEach(each=>{
|
||||
this.queryForm.queryObject.raceId.config.data.push({label:each.name, value:each.id});
|
||||
});
|
||||
getPublishMapListOnline().then(response=>{
|
||||
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||
this.queryForm.queryObject.mapId.config.data = this.mapList;
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
@ -123,7 +123,7 @@ export default {
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deletePractice(row.id).then(response => {
|
||||
deleteScript(row.id).then(response => {
|
||||
this.$message.success('删除实操试题成功');
|
||||
this.reloadTable();
|
||||
}).catch((error) => {
|
||||
@ -132,20 +132,30 @@ export default {
|
||||
}).catch(() => { });
|
||||
},
|
||||
doRecord(index, row) {
|
||||
// row.id
|
||||
let raceInfo;
|
||||
this.raceList.forEach(each=>{
|
||||
if (each.id == row.raceId) {
|
||||
raceInfo = each;
|
||||
}
|
||||
});
|
||||
practiceRecordNotify(83).then(resp => {
|
||||
const query = { mapId: raceInfo.mapId, group: resp.data, scriptId: row.id, lineCode:raceInfo.lineCode};
|
||||
this.$router.push({ path: `${UrlConfig.practiceDisplayNew}/practice`, query });
|
||||
getPublishMapInfo(row.mapId).then(response=>{
|
||||
const lineCode = response.data.lineCode;
|
||||
scriptRecordNotifyNew(row.id).then(resp => {
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang, drawWay:true, lineCode:lineCode};
|
||||
this.$router.push({ path: `${UrlConfig.scriptDisplayNew}/script`, query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(`创建仿真失败: ${error.message}`);
|
||||
});
|
||||
});
|
||||
// row.id
|
||||
// let raceInfo;
|
||||
// this.raceList.forEach(each=>{
|
||||
// if (each.id == row.raceId) {
|
||||
// raceInfo = each;
|
||||
// }
|
||||
// });
|
||||
// practiceRecordNotify(83).then(resp => {
|
||||
// const query = { mapId: raceInfo.mapId, group: resp.data, scriptId: row.id, lineCode:raceInfo.lineCode};
|
||||
// this.$router.push({ path: `${UrlConfig.practiceDisplayNew}/practice`, query });
|
||||
// launchFullscreen();
|
||||
// }).catch(error => {
|
||||
// this.$messageBox(`创建仿真失败: ${error.message}`);
|
||||
// });
|
||||
},
|
||||
// 修改
|
||||
doUpdate(index, row) {
|
||||
@ -166,7 +176,12 @@ export default {
|
||||
}
|
||||
},
|
||||
handleConfirmCreate(data) {
|
||||
createPractice(data).then(resp => {
|
||||
if (Cookies.get('user_lang') == 'en') {
|
||||
data.lang = 'en';
|
||||
} else {
|
||||
data.lang = 'zh';
|
||||
}
|
||||
createScript(data).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$message.success('创建实操试题成功');
|
||||
}).catch(error => {
|
||||
@ -174,7 +189,7 @@ export default {
|
||||
});
|
||||
},
|
||||
handleConfirmModify(data) {
|
||||
putPracticeInfo(data.id, data).then(resp => {
|
||||
updateScript(data.id, data).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$message.success('修改实操试题成功');
|
||||
}).catch(error => {
|
||||
|
@ -117,7 +117,7 @@ export default {
|
||||
this.tryUser = 0;
|
||||
this.loading = false;
|
||||
this.drawWay = res.data.drawWay;
|
||||
const remarksList = {'01':'ATS现地工作站原理级仿真实训课程', '02':'ATS行调工作站原理级仿真实训课程', '03':'各岗位应急综合演练', '04':'桌面版模拟驾驶系统', '05':'派班工作站主要是供车辆段/停车场派班员进行派班操作,可以自动生成派班计划,极大的简化了派班计划管理的复杂性', '06': '综合监控管理原理及仿真实训'};
|
||||
const remarksList = {'01':'ATS现地工作站原理级仿真系统,实现车站值班员培训功能。', '02':'ATS行调工作站原理级仿真系统,实现行车调度员培训功能。', '03':'各岗位应急综合演练', '04':'桌面版模拟驾驶系统,实现列车驾驶员培训功能。', '05':'派班工作站主要是供车辆段/停车场派班员进行派班操作,可以自动生成派班计划,极大的简化了派班计划管理的复杂性。', '06': '综合监控工作站原理级仿真系统,实现电调、环调及车站值班员培训功能。', '07':'大屏仿真系统,可显示全线全站场实时状况,便于教学及观摩使用。'};
|
||||
this.courseModel = {
|
||||
id: resp.data.id,
|
||||
name: resp.data.name,
|
||||
|
@ -93,6 +93,12 @@ export default {
|
||||
{
|
||||
name: '站台报警',
|
||||
mode: 'fas',
|
||||
id: '14',
|
||||
type: 'interface'
|
||||
},
|
||||
{
|
||||
name: '站台报警-公共',
|
||||
mode: 'fas',
|
||||
id: '12',
|
||||
type: 'interface'
|
||||
},
|
||||
@ -121,6 +127,18 @@ export default {
|
||||
mode: 'bas',
|
||||
id: '22',
|
||||
type: 'interface'
|
||||
},
|
||||
{
|
||||
name: '水系统',
|
||||
mode: 'bas',
|
||||
id: '23',
|
||||
type: 'interface'
|
||||
},
|
||||
{
|
||||
name: '照明',
|
||||
mode: 'bas',
|
||||
id: '24',
|
||||
type: 'interface'
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -155,6 +173,12 @@ export default {
|
||||
mode: 'cctv',
|
||||
id: '42',
|
||||
type: 'interface'
|
||||
},
|
||||
{
|
||||
name: '中心设备状态',
|
||||
mode: 'cctv',
|
||||
id: '43',
|
||||
type: 'interface'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -10,6 +10,9 @@
|
||||
<el-form-item label="空调机朝右" prop="isRight">
|
||||
<el-checkbox v-model="form.isRight" />
|
||||
</el-form-item>
|
||||
<el-form-item label="旋转角度" prop="rotate">
|
||||
<el-input-number v-model="form.rotate" />
|
||||
</el-form-item>
|
||||
<el-form-item label="X轴坐标" prop="x">
|
||||
<el-input-number v-model="form.x" controls-position="right" :min="1" />
|
||||
</el-form-item>
|
||||
@ -38,6 +41,7 @@ export default {
|
||||
code:'',
|
||||
isRight:true,
|
||||
width: 40,
|
||||
rotate: 0,
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
@ -71,6 +75,7 @@ export default {
|
||||
this.isUpdate = true;
|
||||
this.form.code = model.code;
|
||||
this.form.width = model.width;
|
||||
this.form.rotate = model.rotate || 0;
|
||||
this.form.x = model.point.x;
|
||||
this.form.y = model.point.y;
|
||||
this.form.isRight = model.isRight;
|
||||
@ -93,6 +98,7 @@ export default {
|
||||
code: this.isUpdate ? this.form.code : getUID('AirConditioner', this.iscs.airConditionerList),
|
||||
width: this.form.width,
|
||||
isRight: this.form.isRight,
|
||||
rotate: this.form.rotate,
|
||||
color:'#00ff00'
|
||||
};
|
||||
this.$emit('createAirConditioner', airConditionerModel);
|
||||
|
@ -107,6 +107,14 @@
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="照明组" name="LightingGroup">
|
||||
<lighting-group
|
||||
ref="lightingGroup"
|
||||
style="width: 100%;height: 100%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="按钮" name="IscsButton">
|
||||
<iscs-button
|
||||
ref="iscsButton"
|
||||
@ -162,6 +170,7 @@ import IscsLine from '../iscsCommonElem/line';
|
||||
import IscsText from '../iscsCommonElem/text';
|
||||
import IscsRect from '../iscsCommonElem/rect';
|
||||
import SmookExhaustFd from './smookExhaustFd';
|
||||
import LightingGroup from './lightingGroup';
|
||||
|
||||
export default {
|
||||
name: 'IscsOperate',
|
||||
@ -181,7 +190,8 @@ export default {
|
||||
IscsButton,
|
||||
IscsText,
|
||||
IscsRect,
|
||||
IscsLine
|
||||
IscsLine,
|
||||
LightingGroup
|
||||
},
|
||||
mixins: [
|
||||
],
|
||||
@ -218,5 +228,66 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.map-control {
|
||||
float: right;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.border-card{
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.mapEdit{
|
||||
height: calc(100% - 47px);
|
||||
.tab_pane_box{
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
/deep/ .el-card__body{
|
||||
height:100%;
|
||||
}
|
||||
/deep/ {
|
||||
.mapEdit .el-tabs__nav-wrap.is-scrollable {
|
||||
padding: 0 20px;
|
||||
}
|
||||
.mapEdit .el-tabs__header .el-tabs__item.is-active {
|
||||
border-bottom-color: #f5f7fa;
|
||||
background: #f5f7fa;
|
||||
}
|
||||
.mapEdit .el-tabs__active-bar{
|
||||
background: transparent;
|
||||
}
|
||||
.mapEdit .el-tabs__content {
|
||||
height: calc(100% - 56px);
|
||||
}
|
||||
.mapEdit .el-tab-pane {
|
||||
height: 100%;
|
||||
}
|
||||
.card .el-tabs__nav .el-tabs__item.is-active {
|
||||
border-bottom: 2px solid #E4E7ED;
|
||||
background: #409eff;
|
||||
color: #fff;
|
||||
}
|
||||
.card .el-tabs__nav .el-tabs__item{
|
||||
padding: 0 20px!important;
|
||||
}
|
||||
|
||||
.mapEdit .el-tabs__nav-prev {
|
||||
width: 20px;
|
||||
height: 41px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-shadow: 1px 1px 4px #ccc;
|
||||
}
|
||||
|
||||
.mapEdit .el-tabs__nav-next {
|
||||
width: 20px;
|
||||
height: 41px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-shadow: 1px 1px 4px #ccc;
|
||||
}
|
||||
}
|
||||
.heightClass{height:100%;}
|
||||
</style>
|
||||
|
200
src/views/iscs/iscsDraw/iscsBasOperate/lightingGroup.vue
Normal file
200
src/views/iscs/iscsDraw/iscsBasOperate/lightingGroup.vue
Normal file
@ -0,0 +1,200 @@
|
||||
<template>
|
||||
<div style="overflow-y: scroll;height: calc(100% - 46px);">
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
|
||||
<el-form-item v-if="isUpdate" label="编号:" prop="code">
|
||||
<el-input v-model="form.code" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="宽度:" prop="width">
|
||||
<el-input-number v-model="form.width" :min="1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="高度:" prop="height">
|
||||
<el-input-number v-model="form.height" :min="1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="顶部文字内容:" prop="topContext">
|
||||
<el-input v-model="form.topContext" type="textarea" :rows="2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="顶部字体大小:" prop="topFontSize">
|
||||
<el-input-number v-model="form.topFontSize" :min="1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="顶部字体颜色:" prop="topTextFill">
|
||||
<el-color-picker v-model="form.topTextFill" />
|
||||
</el-form-item>
|
||||
<el-form-item label="底部文字内容:" prop="bottomContext">
|
||||
<el-input v-model="form.bottomContext" type="textarea" :row="2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="底部字体大小:" prop="bottomFontSize">
|
||||
<el-input-number v-model="form.bottomFontSize" :min="1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="底部字体颜色:" prop="bottomTextFill">
|
||||
<el-color-picker v-model="form.bottomTextFill" />
|
||||
</el-form-item>
|
||||
<el-form-item label="X轴坐标:" prop="x">
|
||||
<el-input-number v-model="form.x" controls-position="right" :min="1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Y轴坐标:" prop="y">
|
||||
<el-input-number v-model="form.y" controls-position="right" :min="1" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||
<el-button v-show="showDeleteButton" type="danger" @click="deleteDevice">{{ $t('global.delete') }}</el-button>
|
||||
<el-button v-show="showDeleteButton" @click="initPage">{{ $t('global.cancel') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
export default {
|
||||
name:'AirConditioner',
|
||||
data() {
|
||||
return {
|
||||
isUpdate:false,
|
||||
showDeleteButton: false,
|
||||
buttonText: '立即创建',
|
||||
form:{
|
||||
code:'',
|
||||
width: 110,
|
||||
height: 60,
|
||||
topContext: '',
|
||||
topFontSize: 10,
|
||||
topTextFill: '#B4AF5B',
|
||||
bottomContext: '',
|
||||
bottomFontSize: 18,
|
||||
bottomTextFill: '#FFFFFF',
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
rules: {
|
||||
width:[
|
||||
{ required: true, message:'请输入设备图形宽度', trigger: 'blur' }
|
||||
],
|
||||
height: [
|
||||
{ required: true, message: '请输入设备图形高度', trigger: 'blur'}
|
||||
],
|
||||
topContext: [
|
||||
{ required: true, message: '请输入顶部文字内容', trigger: 'blur'}
|
||||
],
|
||||
topFontSize: [
|
||||
{required: true, message: '请输入顶部字体大小', trigger: 'blur'}
|
||||
],
|
||||
topTextFill: [
|
||||
{required: true, message: '请输入顶部字体颜色', trigger: 'blur'}
|
||||
],
|
||||
bottomContext: [
|
||||
{required: true, message: '请输入底部文字内容', trigger: 'blur'}
|
||||
],
|
||||
bottomFontSize: [
|
||||
{required: true, message: '请输入底部字体大小', trigger: 'blur'}
|
||||
],
|
||||
bottomTextFill: [
|
||||
{required: true, message: '请输入底部字体颜色', trigger: 'blur'}
|
||||
],
|
||||
x: [
|
||||
{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }
|
||||
],
|
||||
y: [
|
||||
{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
...mapGetters('iscs', [
|
||||
'iscs'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||
if (model._type === 'LightingGroup' ) {
|
||||
this.buttonText = '修改';
|
||||
this.showDeleteButton = true;
|
||||
this.isUpdate = true;
|
||||
this.form.code = model.code;
|
||||
this.form.width = model.width;
|
||||
this.form.x = model.point.x;
|
||||
this.form.y = model.point.y;
|
||||
this.form.height = model.height;
|
||||
this.form.topContext = model.topContext;
|
||||
this.form.topFontSize = model.topFontSize;
|
||||
this.form.topTextFill = model.topTextFill;
|
||||
this.form.bottomContext = model.bottomContext;
|
||||
this.form.bottomFontSize = model.bottomFontSize;
|
||||
this.form.bottomTextFill = model.bottomTextFill;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods:{
|
||||
onSubmit(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const airConditionerModel = {
|
||||
point: {
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'LightingGroup',
|
||||
code: this.isUpdate ? this.form.code : getUID('LightingGroup', this.iscs.lightingGroupList),
|
||||
width: this.form.width,
|
||||
height:this.form.height,
|
||||
topContext: this.form.topContext,
|
||||
topFontSize: this.form.topFontSize,
|
||||
topTextFill: this.form.topTextFill,
|
||||
bottomContext: this.form.bottomContext,
|
||||
bottomFontSize: this.form.bottomFontSize,
|
||||
bottomTextFill: this.form.bottomTextFill
|
||||
};
|
||||
this.$emit('createDataModel', airConditionerModel);
|
||||
this.initPage();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
initPage() {
|
||||
this.isUpdate = false;
|
||||
this.buttonText = '立即创建';
|
||||
this.showDeleteButton = false;
|
||||
this.form = {
|
||||
code:'',
|
||||
width: 110,
|
||||
height: 60,
|
||||
topContext: '',
|
||||
topFontSize: 10,
|
||||
topTextFill: '#B4AF5B',
|
||||
bottomContext: '',
|
||||
bottomFontSize: 18,
|
||||
bottomTextFill: '#FFFFFF',
|
||||
x: 10,
|
||||
y: 10
|
||||
};
|
||||
this.$refs.form.resetFields();
|
||||
},
|
||||
deleteDevice() {
|
||||
const lightingGroupModel = {
|
||||
point: {
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'LightingGroup',
|
||||
code: this.form.code,
|
||||
width: this.form.width,
|
||||
height:this.form.height,
|
||||
topContext: this.form.topContext,
|
||||
topFontSize: this.form.topFontSize,
|
||||
topTextFill: this.form.topTextFill,
|
||||
bottomContext: this.form.bottomContext,
|
||||
bottomFontSize: this.form.bottomFontSize,
|
||||
bottomTextFill: this.form.bottomTextFill
|
||||
};
|
||||
this.$emit('deleteDataModel', lightingGroupModel );
|
||||
this.initPage();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -55,24 +55,32 @@
|
||||
ref="iscsText"
|
||||
style="width: 90%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel">
|
||||
</iscs-text>
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="线段" name="IscsLine">
|
||||
<iscs-line
|
||||
ref="iscsLine"
|
||||
style="width: 90%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel">
|
||||
</iscs-line>
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="状态表" name="StateTable">
|
||||
<state-table
|
||||
ref="stateTable"
|
||||
style="width: 100%;height: 100%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="矩形" name="IscsRect">
|
||||
<iscs-rect
|
||||
ref="iscsRect"
|
||||
style="width: 90%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel">
|
||||
</iscs-rect>
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
@ -89,6 +97,7 @@
|
||||
import BrakeMachine from '../iscsAfcOperate/brakeMachine';
|
||||
import Staircase from '../iscsOperate/staircase';
|
||||
import SingleStaircase from './singleStaircase';
|
||||
import StateTable from '../iscsOperate/stateTable';
|
||||
export default {
|
||||
name: 'IscsOperate',
|
||||
components: {
|
||||
@ -99,7 +108,8 @@
|
||||
IscsText,
|
||||
BrakeMachine,
|
||||
Staircase,
|
||||
SingleStaircase
|
||||
SingleStaircase,
|
||||
StateTable
|
||||
},
|
||||
mixins: [
|
||||
],
|
||||
@ -151,4 +161,57 @@
|
||||
width: 100%;
|
||||
}
|
||||
.heightClass{height:100%;}
|
||||
.mapEdit{
|
||||
height: calc(100% - 47px);
|
||||
.tab_pane_box{
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
/deep/ {
|
||||
.mapEdit .el-tabs__nav-wrap.is-scrollable {
|
||||
padding: 0 20px;
|
||||
}
|
||||
.mapEdit .el-tabs__header .el-tabs__item.is-active {
|
||||
border-bottom-color: #f5f7fa;
|
||||
background: #f5f7fa;
|
||||
}
|
||||
.mapEdit .el-tabs__active-bar{
|
||||
background: transparent;
|
||||
}
|
||||
.mapEdit .el-tabs__content {
|
||||
height: calc(100% - 56px);
|
||||
}
|
||||
.mapEdit .el-tab-pane {
|
||||
height: 100%;
|
||||
}
|
||||
.card .el-tabs__nav .el-tabs__item.is-active {
|
||||
border-bottom: 2px solid #E4E7ED;
|
||||
background: #409eff;
|
||||
color: #fff;
|
||||
}
|
||||
.card .el-tabs__nav .el-tabs__item{
|
||||
padding: 0 20px!important;
|
||||
}
|
||||
|
||||
.mapEdit .el-tabs__nav-prev {
|
||||
width: 20px;
|
||||
height: 41px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-shadow: 1px 1px 4px #ccc;
|
||||
}
|
||||
|
||||
.mapEdit .el-tabs__nav-next {
|
||||
width: 20px;
|
||||
height: 41px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-shadow: 1px 1px 4px #ccc;
|
||||
}
|
||||
}
|
||||
/deep/ .el-card__body{
|
||||
height:100%;
|
||||
}
|
||||
</style>
|
||||
|
@ -56,7 +56,9 @@ export default {
|
||||
functionList: [
|
||||
{label: '图元说明', value: 'GraphicEle'},
|
||||
{label: '公共区域', value: 'PublicArea'},
|
||||
{label: '返回', value: 'GoBack'}
|
||||
{label: '操作按钮', value: 'OperatingButton'},
|
||||
{label: '返回', value: 'GoBack'},
|
||||
{label: '至EPS系统及导向照明', value: 'GoEPS'}
|
||||
],
|
||||
form: {
|
||||
code: '',
|
||||
|
@ -124,7 +124,14 @@ export default {
|
||||
{label: '站内下行左线消火栓按钮', value: 'inDownLeftHydrant'},
|
||||
{label: '站内上行右线消火栓按钮', value: 'inUpRightHydrant'},
|
||||
{label: '站间下行左线消火栓按钮', value: 'outDownLeftHydrant'},
|
||||
{label: '站间上行右线消火栓按钮', value: 'outUpRightHydrant'}
|
||||
{label: '站间上行右线消火栓按钮', value: 'outUpRightHydrant'},
|
||||
{label: '视屏服务器状态', value: 'videoServerStatus'},
|
||||
{label: '数据服务器状态', value: 'dataServerStatus'},
|
||||
{label: '媒体交换服务区状态', value: 'mediaServerStatus'},
|
||||
{label: '解码器状态', value: 'decoderState'},
|
||||
{label: '四路解码器状态', value: 'quadDecoderState'},
|
||||
{label: '四路解码器模式状态', value: 'quadDecoderModeState'},
|
||||
{label: '控制键盘状态', value: 'controlKeyboardState'}
|
||||
],
|
||||
rules: {
|
||||
width:[{ required: true, message:'请输入设备图形宽度', trigger: 'blur' }],
|
||||
|
36
src/views/iscs/iscsSystem/config/bas/waterSystem.vue
Normal file
36
src/views/iscs/iscsSystem/config/bas/waterSystem.vue
Normal file
@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<div class="bigSystemBox">
|
||||
<div class="title-name">{{ $route.query.stationName }}机电水系统</div>
|
||||
<div class="">
|
||||
<iscsSystem ref="iscsPlate" :width-canvas="1300" :canvas-height="650" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import iscsSystem from '../canvas/iscsCanvas';
|
||||
export default {
|
||||
components: {
|
||||
iscsSystem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mes: '1111'
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.iscsPlate.show('23');
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.title-name{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 26px;
|
||||
margin-top: 30px;
|
||||
color: #56E5DE;
|
||||
}
|
||||
</style>
|
@ -10,7 +10,7 @@ import Iscs from '@/iscs/iscs';
|
||||
import { parser } from '@/iscs/utils/parser';
|
||||
import iscsData from '@/iscs/constant/iscsData';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
// import { exitFullscreen } from '@/utils/screen';
|
||||
// import { handlerIscsEvent } from '@/api/simulation';
|
||||
// import { IscsOperation } from '@/scripts/ConstDic';
|
||||
|
||||
|
@ -1,10 +1,36 @@
|
||||
<template>
|
||||
<div>
|
||||
中心设备状态
|
||||
<div class="stand_title">{{ $route.query.stationName }}闭路电视中心设备状态</div>
|
||||
<div style="margin: auto">
|
||||
<iscsSystem ref="iscsPlate" :width-canvas="1000" :canvas-height="700" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import iscsSystem from '../canvas/iscsCanvas';
|
||||
export default {
|
||||
components: {
|
||||
iscsSystem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.iscsPlate.show('43');
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.stand_title{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 26px;
|
||||
margin-top: 30px;
|
||||
color: #56E5DE;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="stand_title">{{ $route.query.stationName }}火灾报警站台报警</div>
|
||||
<div class="">
|
||||
<iscsSystem ref="iscsPlate" :width-canvas="1520" :canvas-height="500" />
|
||||
<div style="margin: auto">
|
||||
<iscsSystem ref="iscsPlate" :width-canvas="width" :canvas-height="500" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -15,10 +15,23 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
width: 1100
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
watch: {
|
||||
'$store.state.iscs.selectedCount': function() {
|
||||
const device = this.$store.state.iscs.selected;
|
||||
if (device && device._type === 'IscsButton' && device.function === 'PublicArea') {
|
||||
this.width = 1520;
|
||||
this.$refs.iscsPlate.show('12');
|
||||
} else if (device && device._type === 'IscsButton' && device.function === 'GoBack') {
|
||||
this.width = 1100;
|
||||
this.$refs.iscsPlate.show('14');
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.iscsPlate.show('14');
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
<sensor v-else-if="mode==='sensor'" />
|
||||
<big-system v-else-if="mode==='bigSystem'" />
|
||||
<small-system v-else-if="mode==='smallSystem'" />
|
||||
<water-system v-else-if="mode==='waterSystem'" />
|
||||
<graphic-ele ref="graphicEle" />
|
||||
<device-control ref="deviceControl" />
|
||||
</div>
|
||||
@ -58,6 +59,7 @@ import doorFG from './fg/doorFG';
|
||||
import Sensor from './bas/sensor';
|
||||
import BigSystem from './bas/bigSystem';
|
||||
import SmallSystem from './bas/smallSystem';
|
||||
import waterSystem from './bas/waterSystem';
|
||||
import GraphicEle from './graphicEle';
|
||||
import DeviceControl from './deviceControl';
|
||||
|
||||
@ -90,7 +92,8 @@ export default {
|
||||
GraphicEle,
|
||||
DeviceControl,
|
||||
SmallSystem,
|
||||
BigSystem
|
||||
BigSystem,
|
||||
waterSystem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -8,11 +8,11 @@
|
||||
<el-table-column prop="level" label="等级" />
|
||||
</el-table>
|
||||
<div style="margin-top: 10px;width: 100%;">
|
||||
<div style="width: 75%;background: #FFF;padding: 2px;display: inline-block;vertical-align:top;margin-left: 3%">
|
||||
<div style="width: 77%;background: #FFF;padding: 2px;display: inline-block;vertical-align:top;margin-left: 3%">
|
||||
<div style="width: 100%;text-align: center;font-size: 13px;padding-top:5px;">显示内容</div>
|
||||
<div style="width:100%; height: 100px; border: 1px solid #000;" />
|
||||
</div>
|
||||
<div style="width: 15%;background: #939FAC; display: inline-block;margin-left: 2%;">
|
||||
<div style="width: 14%;background: #939FAC; display: inline-block;margin-left: 2%;">
|
||||
<div class="emergency_select_button">区域详细</div>
|
||||
<div style="width: 100%;text-align: center;color: #FFF;font-size: 13px;background: #121A86;height: 30px;line-height: 30px;">紧急信息清除</div>
|
||||
<div class="emergency_select_button">清除</div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="lcdControl_title">LCD控制屏</div>
|
||||
<div class="area_select" style="margin-top: 110px;">
|
||||
<div class="area_select_title">特定区域</div>
|
||||
<div class="area_select_button" @click="selectedAllArea">全线</div>
|
||||
<div class="area_select_button" :class="{'active': activeFlag}" @click="selectedAllArea">全线</div>
|
||||
</div>
|
||||
<div class="area_select" style="margin-top: 200px;">
|
||||
<div>
|
||||
@ -42,6 +42,7 @@ export default {
|
||||
columns: ['车站', '选择'],
|
||||
stationList: ['会展中心站', '世纪大道站', '交通大学站', '市图书馆站', '中心医院站', '未来路站', '火车站', '人民广场站', '体育中心站'],
|
||||
lcdSwitch: true,
|
||||
activeFlag: false,
|
||||
selectedAreaList:[]
|
||||
};
|
||||
},
|
||||
@ -71,7 +72,12 @@ export default {
|
||||
}
|
||||
},
|
||||
selectedAllArea() {
|
||||
this.activeFlag = !this.activeFlag;
|
||||
if (this.activeFlag) {
|
||||
this.selectedAreaList = [...this.stationList];
|
||||
} else {
|
||||
this.selectedAreaList = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -120,13 +126,14 @@ export default {
|
||||
-moz-user-select:none;
|
||||
-ms-user-select:none;
|
||||
user-select:none;
|
||||
}
|
||||
.area_select_button:active {
|
||||
&:active,
|
||||
&.active {
|
||||
border-top: 2px solid #898888;
|
||||
border-left: 2px solid #898888;
|
||||
border-right: 2px solid #FFF;
|
||||
border-bottom: 2px solid #FFF;
|
||||
}
|
||||
}
|
||||
.each_station_info{
|
||||
vertical-align:top;
|
||||
font-size: 13px;
|
||||
|
@ -170,30 +170,22 @@ export default {
|
||||
} else {
|
||||
let areaIndex;
|
||||
this.verticalHeader.map((item, index) => {
|
||||
if (item.key === data.key) {
|
||||
if (item.key == data.key) {
|
||||
areaIndex = index;
|
||||
}
|
||||
});
|
||||
const flag = data.active;
|
||||
// this.stationList.forEach(station => {
|
||||
// station.children.forEach((item, index) => {
|
||||
// const elem = station.stationName + '-' + index;
|
||||
// if (item.status === 'default' && index === areaIndex && !flag) {
|
||||
// const selectedAreaIndex = this.selectedAreaList.indexOf(elem);
|
||||
// this.selectedAreaList.splice(selectedAreaIndex, 1);
|
||||
// } else if (item.status === 'default' && index === areaIndex && !flag && !this.selectedAreaList.includes(elem)) {
|
||||
// this.selectedAreaList.push(elem);
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
for (let j = 0; j < this.stationList.length; j++) {
|
||||
if (!this.selectedAreaList.includes(areaIndex + '-' + j) && flag) {
|
||||
this.selectedAreaList.push(areaIndex + '-' + j);
|
||||
} else if (!flag) {
|
||||
const index = this.selectedAreaList.indexOf(areaIndex + '-' + j);
|
||||
this.selectedAreaList.splice(index, 1);
|
||||
}
|
||||
this.stationList.forEach(station => {
|
||||
station.children.forEach((item, index) => {
|
||||
const elem = station.stationName + '-' + index;
|
||||
if (item.status == 'default' && (index + 1) == areaIndex && !flag) {
|
||||
const selectedAreaIndex = this.selectedAreaList.indexOf(elem);
|
||||
this.selectedAreaList.splice(selectedAreaIndex, 1);
|
||||
} else if (item.status == 'default' && (index + 1) == areaIndex && flag) {
|
||||
this.selectedAreaList.push(elem);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
selectedAllLine(data) {
|
||||
|
@ -1,7 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
车站网络
|
||||
</div>
|
||||
<div />
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
@ -45,9 +45,9 @@
|
||||
<div class="time_preview_footer">
|
||||
<div class="preview_footer_top">操作</div>
|
||||
<div class="preview_footer_content">
|
||||
<div class="each_preview_btn each_preview_back">区域<br>详细</div>
|
||||
<div class="each_preview_btn each_preview_back">删除</div>
|
||||
<div class="each_preview_btn each_preview_back">停用</div>
|
||||
<div class="each_preview_btn">区域<br>详细</div>
|
||||
<div class="each_preview_btn">删除</div>
|
||||
<div class="each_preview_btn">停用</div>
|
||||
<div class="each_preview_btn each_preview_back1">激活</div>
|
||||
<div class="each_preview_btn each_preview_back2">修改</div>
|
||||
</div>
|
||||
@ -85,24 +85,45 @@ export default {
|
||||
.el-table .time_preview_column .cell{font-size:12px;}
|
||||
.el-table td.time_preview_column{padding:5px 0px;}
|
||||
.preview_footer_top{width:646px;font-weight:bold;padding:10px 0px;text-align:center;background:#000077;color:#fff;font-size:12px;}
|
||||
.each_preview_btn{width:80px;text-align:center;
|
||||
.each_preview_btn{
|
||||
width:80px;
|
||||
text-align:center;
|
||||
height:38px;
|
||||
display:flex;
|
||||
align-items: center;
|
||||
justify-content:center;
|
||||
margin-left:4px;
|
||||
font-size:12px;
|
||||
cursor: pointer;vertical-align:top;font-weight:bold;}
|
||||
.each_preview_back{border-top: 3px solid #f9f9f9;
|
||||
cursor: pointer;
|
||||
vertical-align:top;
|
||||
font-weight:bold;
|
||||
border-top: 3px solid #f9f9f9;
|
||||
border-left: 3px solid #f6f8f8;
|
||||
border-right: 3px solid #565656;
|
||||
border-bottom: 3px solid #565656;background: #cccccc;}
|
||||
border-bottom: 3px solid #565656;
|
||||
background: #cccccc;
|
||||
&:active{
|
||||
border-top: 3px solid #565656;
|
||||
border-left: 3px solid #565656;
|
||||
border-right: 3px solid #f6f8f8;
|
||||
border-bottom: 3px solid #f9f9f9;
|
||||
background: #cccccc;
|
||||
}
|
||||
}
|
||||
.each_preview_back1{
|
||||
border-top: 3px solid #63dcf8;
|
||||
border-left: 3px solid #7cdeed;
|
||||
border-right: 3px solid #2a5bab;
|
||||
border-bottom: 3px solid #1d61b4;background: #01abff;
|
||||
border-bottom: 3px solid #1d61b4;
|
||||
background: #01abff;
|
||||
color:#fff;
|
||||
&:active{
|
||||
border-top: 3px solid #1d61b4;
|
||||
border-left: 3px solid #2a5bab;
|
||||
border-right: 3px solid #7cdeed;
|
||||
border-bottom: 3px solid #63dcf8;
|
||||
background: #01abff;
|
||||
}
|
||||
}
|
||||
.each_preview_back2{
|
||||
border-top: 3px solid #638df8;
|
||||
@ -111,6 +132,13 @@ export default {
|
||||
border-bottom: 3px solid #1e3388;
|
||||
background: #0156ff;
|
||||
color:#fff;
|
||||
&:active{
|
||||
border-top: 3px solid #1e3388;
|
||||
border-left: 3px solid #1d2881;
|
||||
border-right: 3px solid #86a1e4;
|
||||
border-bottom: 3px solid #638df8;
|
||||
background: #0156ff;
|
||||
}
|
||||
}
|
||||
.el-table .time_preview_thead:not(:first-child){background:#000077;color:#fff;padding: 5px 0px;text-align:center;font-size: 12px;}
|
||||
.preview_footer_content{margin-top:15px;margin-left:20px;margin-bottom:10px;display:flex;flex-direction:row}
|
||||
|
@ -256,7 +256,8 @@ export default {
|
||||
children: [
|
||||
{
|
||||
name: '网络状态',
|
||||
type: 'standFAS'
|
||||
type: 'netState',
|
||||
showType: ['center', 'local']
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -301,17 +302,7 @@ export default {
|
||||
]
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.iscs.selectedCount': function() {
|
||||
const device = this.$store.state.iscs.selected;
|
||||
if (device._type === 'IscsButton' && device.function === 'PublicArea') {
|
||||
this.selectChildIndex = 1;
|
||||
this.$router.push({ path: `/iscs/system/config/stationHallFAS`, query: {currentSystem:this.$route.query.currentSystem, stationName: this.$route.query.stationName, stationId: this.$route.query.stationId } });
|
||||
} else if (device._type === 'IscsButton' && device.function === 'GoBack') {
|
||||
this.$router.go(-1);
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
mounted() {
|
||||
this.navList.forEach((nav, navIndex)=>{
|
||||
if (nav.children && nav.children.length > 0) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div :id="iscsId" v-loading="loading" :style="{ width: this.canvasWidth +'px', height: this.canvasHeight +'px',background:'#45607B' }" class="iscs-canvas" />
|
||||
<div :id="iscsId" v-loading="loading" :style="{ width: canvasWidth +'px', height: canvasHeight +'px',background:'#45607B' }" class="iscs-canvas" />
|
||||
<el-button v-if="showBackButton" class="iscs-button" type="primary" @click="back">{{ $t('global.back') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@ -8,7 +8,7 @@
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
import Iscs from '@/iscs/iscs';
|
||||
import { parser } from '@/iscs/utils/parser';
|
||||
import { parser, deviceFactory } from '@/iscs/utils/parser';
|
||||
import iscsData from '@/iscs/constant/iscsData';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
@ -16,6 +16,8 @@ import { putJointTrainingSimulationUser } from '@/api/chat';
|
||||
import { putJointTrainingSimulationUserNew} from '@/api/jointTraining';
|
||||
// import { handlerIscsEvent } from '@/api/simulation';
|
||||
// import { IscsOperation } from '@/scripts/ConstDic';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import { getUID } from '@/iscs/utils/Uid';
|
||||
|
||||
export default {
|
||||
name: 'Iscs',
|
||||
@ -41,6 +43,8 @@ export default {
|
||||
y: 0
|
||||
}
|
||||
},
|
||||
selected: null, // 选择复制元素
|
||||
copyModel: {}, // 复制元素内容
|
||||
showBackButton: true,
|
||||
initTime: '',
|
||||
started: false,
|
||||
@ -55,6 +59,9 @@ export default {
|
||||
'canvasWidth',
|
||||
'canvasHeight'
|
||||
]),
|
||||
...mapGetters('iscs', [
|
||||
'iscs'
|
||||
]),
|
||||
iscsId() {
|
||||
return ['iscs', (Math.random().toFixed(5)) * 100000].join('_');
|
||||
},
|
||||
@ -117,6 +124,9 @@ export default {
|
||||
}
|
||||
this.setIscs(data, iscsData[deviceCode]);
|
||||
this.$store.dispatch('iscs/setIscsData', iscsData[deviceCode]);
|
||||
if (this.$route.path.startsWith('/iscs/design')) {
|
||||
this.$iscs.on('keyboard', this.onKeyboard, this);
|
||||
}
|
||||
window.document.oncontextmenu = function () {
|
||||
return false;
|
||||
};
|
||||
@ -124,6 +134,35 @@ export default {
|
||||
setIscs(data, oldData) {
|
||||
this.$iscs.setIscs(oldData, data);
|
||||
},
|
||||
// 键盘快捷键事件
|
||||
onKeyboard(hook) {
|
||||
if (this.selected && this.selected.code) {
|
||||
switch (hook) {
|
||||
case 'Ctrl_C': {
|
||||
this.copyModel = deepAssign({}, this.selected);
|
||||
this.copyModel.point = {
|
||||
x: this.selected.point.x + 10,
|
||||
y: this.selected.point.y + 10
|
||||
};
|
||||
const type1 = this.selected._type.charAt(0).toLowerCase() + this.selected._type.slice(1); // .toLowerCase()
|
||||
this.copyModel.code = getUID(this.selected._type, this.iscs[type1 + 'List']);
|
||||
} break;
|
||||
case 'Ctrl_V':
|
||||
this.copyModel.code && this.createDataModel(this.copyModel);
|
||||
break;
|
||||
// case 'Delete': this.$store.dispatch('map/setDeleteCount');
|
||||
// break;
|
||||
// case 'Update':
|
||||
// this.$refs.offsetX.focus();
|
||||
// this.$store.dispatch('map/setUpdateCount');
|
||||
// break;
|
||||
}
|
||||
}
|
||||
},
|
||||
createDataModel(model) {
|
||||
const newModel = deviceFactory(model._type, model);
|
||||
this.$store.dispatch('iscs/updateIscsDevices', newModel.model);
|
||||
},
|
||||
// 点击选择事件
|
||||
onSelected(em) {
|
||||
if (em.deviceModel.mean) {
|
||||
@ -157,6 +196,7 @@ export default {
|
||||
// 右键点击事件
|
||||
onContextMenu(em) {
|
||||
if (em.eventTarget) {
|
||||
this.selected = em.eventTarget.model;
|
||||
this.$store.dispatch('iscs/setUpdateDeviceData', em.eventTarget.model);
|
||||
}
|
||||
},
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<!-- v-quickMenuDrag -->
|
||||
<div class="chatBox">
|
||||
<div v-if="!minimize" class="chat-box">
|
||||
<div v-show="!minimize" class="chat-box">
|
||||
<chat-member-list ref="chatMemberList" :group="group" :current-coversition="currentCoversition" @addCoversition="addCoversition" />
|
||||
<div class="chat-box-main">
|
||||
<chat-coversition-list ref="chatCoversitionList" @setCurrentCoversition="setCurrentCoversition" @setHeadTitle="setHeadTitle" />
|
||||
|
@ -127,10 +127,13 @@ export default {
|
||||
case 'Command':
|
||||
{
|
||||
const command = CommandHandler.getScriptDefinition(element.operationType);
|
||||
const operateType = command.operate.split('_')[0];
|
||||
let operateType = command.operate.split('_')[0];
|
||||
const data = command.operate.toUpperCase();
|
||||
if (operateType == 'CM') {
|
||||
operateType = 'ControlConvertMenu';
|
||||
}
|
||||
const operateName = CMD[operateType]['CMD_' + data];
|
||||
const deviceTypeList = {Section:'区段', Switch:'道岔', Signal:'信号机', Stand:'站台', Station:'车站', TrainWindow:'车次窗', CM:'控制模式'};
|
||||
const deviceTypeList = {Section:'区段', Switch:'道岔', Signal:'信号机', Stand:'站台', Station:'车站', TrainWindow:'车次窗', ControlConvertMenu:'控制模式'};
|
||||
const operateTypeName = deviceTypeList[operateType];
|
||||
this.actionInfoList.push({id: element.id, isCoversition: false, memberName: memberName, command: operateTypeName + '(' + operateName.label + ')', row: element, visible: false});
|
||||
break;
|
||||
|
@ -6,7 +6,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCommandList, delCommand } from '@/api/management/dictionary';
|
||||
import { createCommand, getCommandList, delCommand } from '@/api/management/dictionary';
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
import CommandEnum from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import ShowCondition from './showCondition';
|
||||
@ -105,6 +105,10 @@ export default {
|
||||
name: this.$t('global.edit'),
|
||||
handleClick: this.handleEdit
|
||||
},
|
||||
{
|
||||
name: '复制',
|
||||
handleClick: this.handleCopy
|
||||
},
|
||||
{
|
||||
name: this.$t('global.delete'),
|
||||
handleClick: this.handleDelete,
|
||||
@ -187,6 +191,21 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
handleCopy(index, row) { // 复制指令
|
||||
this.$confirm('您是否确认复制该指令?', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const param = row;
|
||||
createCommand(param).then(response => {
|
||||
this.$message.success('复制指令成功!');
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
this.$message.error('复制指令失败!');
|
||||
});
|
||||
});
|
||||
},
|
||||
reloadTable() {
|
||||
this.queryList.reload();
|
||||
}
|
||||
|
@ -45,7 +45,7 @@
|
||||
<span class="el-icon-microphone" />
|
||||
</div>
|
||||
</div>
|
||||
<textarea id="dope" v-model="text" class="chat__footer--text" style="width: 99%;height: 47px; border: none;outline: none;" @keyup="handleSetInputState" />
|
||||
<textarea id="dope" v-model="text" class="chat__footer--text" style="width: 99%;height: 47px; border: none;outline: none;" @keyup="handleSetInputState" @keyup.enter="handleSendText" />
|
||||
<button class="chat__footer--send" :disabled="disabled" @click="handleSendText">{{ $t('trainRoom.sendText') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -109,7 +109,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async handleSetInputState() {
|
||||
async handleSetInputState(keyCode) {
|
||||
if (!this.text.trim()) {
|
||||
this.disabled = true;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user