Merge remote-tracking branch 'remotes/origin/dev' into test
# Conflicts: # src/utils/baseUrl.js
This commit is contained in:
commit
4e7db47748
@ -72,9 +72,24 @@ export function queryRunPlan(planId) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// 根据skinCode查询发布运行图列表
|
||||||
* 删除运行图
|
export function queryRunPlanList(skinCode) {
|
||||||
*/
|
return request({
|
||||||
|
url: `/api/runPlan/template/skin/${skinCode}`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 从发布运行图创建新运行图
|
||||||
|
export function postCreatePlan(data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/runPlan/draft/createFrom/${data.templateId}`,
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除运行图
|
||||||
export function deleteRunPlan(planId) {
|
export function deleteRunPlan(planId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/runPlan/draft/${planId}`,
|
url: `/api/runPlan/draft/${planId}`,
|
||||||
@ -82,6 +97,15 @@ export function deleteRunPlan(planId) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 修改运行图内容
|
||||||
|
export function putRunPlanDetail(data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/runPlan/draft/${data.planId}`,
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发布运行图
|
* 发布运行图
|
||||||
*/
|
*/
|
||||||
@ -204,15 +228,6 @@ export function duplicateService(data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改计划*/
|
|
||||||
// export function updatePlanService(data) {
|
|
||||||
// return request({
|
|
||||||
// url: `/api/runPlan/draft/${data.planId}/service/${data.serviceNumber}`,
|
|
||||||
// method: 'put',
|
|
||||||
// data: data
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|
||||||
/** 增加任务*/
|
/** 增加任务*/
|
||||||
export function addPlanTrip(data) {
|
export function addPlanTrip(data) {
|
||||||
return request({
|
return request({
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 13 MiB After Width: | Height: | Size: 7.6 KiB |
@ -56,5 +56,6 @@ export default {
|
|||||||
userTrainingManage: 'User training management',
|
userTrainingManage: 'User training management',
|
||||||
userExamManage: 'User examination management',
|
userExamManage: 'User examination management',
|
||||||
userSimulationManage: 'User simulation management',
|
userSimulationManage: 'User simulation management',
|
||||||
existingSimulation: 'Existence simulation management'
|
existingSimulation: 'Existence simulation management',
|
||||||
|
ibpDraw: 'ibp Draw'
|
||||||
};
|
};
|
||||||
|
@ -1,22 +1,26 @@
|
|||||||
export default {
|
export default {
|
||||||
scriptTitle: '任务录制',
|
scriptTitle: '剧本录制',
|
||||||
saveMaplocation: '更新定位',
|
// saveMaplocation: '更新定位',
|
||||||
saveBackground: '保存背景',
|
saveBackground: '保存背景',
|
||||||
saveData: '保存数据',
|
saveData: '保存数据',
|
||||||
roleManage: '角色管理',
|
mapList: '地图列表',
|
||||||
targetCondition: '任务目标',
|
createScript: '创建剧本',
|
||||||
taskScript: '任务剧本',
|
scriptName: '剧本名称',
|
||||||
roleName: '角色名称',
|
|
||||||
roleType: '角色类型',
|
// roleManage: '角色管理',
|
||||||
deviceCode: '设备编码',
|
// targetCondition: '任务目标',
|
||||||
roleList: '角色列表',
|
// taskScript: '任务剧本',
|
||||||
operation: '操作',
|
// roleName: '角色名称',
|
||||||
roleAdd: '添加',
|
// roleType: '角色类型',
|
||||||
delete: '删除',
|
// deviceCode: '设备编码',
|
||||||
behaviorOperate: '行为操作',
|
// roleList: '角色列表',
|
||||||
conditionTitle: '目标条件',
|
// operation: '操作',
|
||||||
deviceType: '设备类型',
|
// roleAdd: '添加',
|
||||||
deviceCondition: '设备条件',
|
// delete: '删除',
|
||||||
paramDeviceType: '参数设备类型',
|
// behaviorOperate: '行为操作',
|
||||||
paramDeviceCode: '参数设备编号'
|
// conditionTitle: '目标条件',
|
||||||
|
// deviceType: '设备类型',
|
||||||
|
// deviceCondition: '设备条件',
|
||||||
|
// paramDeviceType: '参数设备类型',
|
||||||
|
// paramDeviceCode: '参数设备编号'
|
||||||
};
|
};
|
||||||
|
@ -68,7 +68,8 @@ deviceRender[deviceType.AppendageBox] = {
|
|||||||
/** IbpLine渲染配置 */
|
/** IbpLine渲染配置 */
|
||||||
deviceRender[deviceType.IbpLine] = {
|
deviceRender[deviceType.IbpLine] = {
|
||||||
_type: deviceType.IbpLine,
|
_type: deviceType.IbpLine,
|
||||||
zlevel: 3
|
zlevel: 1,
|
||||||
|
z: 3
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Elevator 渲染配置 */
|
/** Elevator 渲染配置 */
|
||||||
|
@ -36,9 +36,11 @@ class IbpPan {
|
|||||||
initIbpPage(opts) {
|
initIbpPage(opts) {
|
||||||
const width = opts.config.width;
|
const width = opts.config.width;
|
||||||
const height = opts.config.height;
|
const height = opts.config.height;
|
||||||
|
this.isAllowDragging=false;
|
||||||
this.$ibpZr = zrender.init(opts.dom, Object.assign({ renderer, devicePixelRatio, width, height }, opts.config));
|
this.$ibpZr = zrender.init(opts.dom, Object.assign({ renderer, devicePixelRatio, width, height }, opts.config));
|
||||||
this.$options = new Options(Object.assign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {}), (dataZoom) => { this.$mouseController.trigger(this.events.DataZoom, dataZoom); }); // 缩放
|
this.$options = new Options(Object.assign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {}), (dataZoom) => { this.$mouseController.trigger(this.events.DataZoom, dataZoom); }); // 缩放
|
||||||
this.$mouseController = new MouseController(this);
|
this.$mouseController = new MouseController(this);
|
||||||
|
|
||||||
this.$mouseController.enable();
|
this.$mouseController.enable();
|
||||||
|
|
||||||
this.$painter = new Painter(this);
|
this.$painter = new Painter(this);
|
||||||
@ -195,6 +197,7 @@ class IbpPan {
|
|||||||
(Object.keys(this.ibpDevice) || []).forEach(elem => {
|
(Object.keys(this.ibpDevice) || []).forEach(elem => {
|
||||||
this.$painter.drawIbp(this.ibpDevice[elem]);
|
this.$painter.drawIbp(this.ibpDevice[elem]);
|
||||||
});
|
});
|
||||||
|
this.$mouseController.setAllowDragging(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
pullBack(payload) {
|
pullBack(payload) {
|
||||||
|
@ -2,6 +2,7 @@ import deviceType from './constant/deviceType';
|
|||||||
import Eventful from 'zrender/src/mixin/Eventful';
|
import Eventful from 'zrender/src/mixin/Eventful';
|
||||||
import * as eventTool from 'zrender/src/core/event';
|
import * as eventTool from 'zrender/src/core/event';
|
||||||
import store from '@/store';
|
import store from '@/store';
|
||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
|
||||||
class EventModel {
|
class EventModel {
|
||||||
constructor(e) {
|
constructor(e) {
|
||||||
@ -33,7 +34,10 @@ class MouseController extends Eventful {
|
|||||||
super();
|
super();
|
||||||
this.$ibp = ibp;
|
this.$ibp = ibp;
|
||||||
this.$zr = ibp.getZr();
|
this.$zr = ibp.getZr();
|
||||||
|
this.isAllowDragging=ibp.isAllowDragging||false;
|
||||||
this.events = ibp.getEvents();
|
this.events = ibp.getEvents();
|
||||||
|
this._draggingTarget=null;
|
||||||
|
this._dragging = false;
|
||||||
this.initHandler(this.$zr);
|
this.initHandler(this.$zr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,6 +58,9 @@ class MouseController extends Eventful {
|
|||||||
zr.on('mousedown', this.mousedown, this);
|
zr.on('mousedown', this.mousedown, this);
|
||||||
zr.on('mousemove', this.mousemove, this);
|
zr.on('mousemove', this.mousemove, this);
|
||||||
zr.on('mouseup', this.mouseup, this);
|
zr.on('mouseup', this.mouseup, this);
|
||||||
|
zr.on('touchstart', this.mousedown, this);
|
||||||
|
zr.on('touchmove', this.mousemove, this);
|
||||||
|
zr.on('touchend', this.mouseup, this);
|
||||||
zr.on('mousewheel', this.mousewheel, this);
|
zr.on('mousewheel', this.mousewheel, this);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -61,6 +68,11 @@ class MouseController extends Eventful {
|
|||||||
zr.off('mousedown', this.mousedown);
|
zr.off('mousedown', this.mousedown);
|
||||||
zr.off('mousemove', this.mousemove);
|
zr.off('mousemove', this.mousemove);
|
||||||
zr.off('mouseup', this.mouseup);
|
zr.off('mouseup', this.mouseup);
|
||||||
|
|
||||||
|
zr.off('touchstart', this.mousedown);
|
||||||
|
zr.off('touchmove', this.mousemove);
|
||||||
|
zr.off('touchend', this.mouseup);
|
||||||
|
|
||||||
zr.off('mousewheel', this.mousewheel);
|
zr.off('mousewheel', this.mousewheel);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -68,6 +80,11 @@ class MouseController extends Eventful {
|
|||||||
zr.off('click', this.click);
|
zr.off('click', this.click);
|
||||||
zr.off('contextmenu', this.contextmenu);
|
zr.off('contextmenu', this.contextmenu);
|
||||||
zr.off('mousemove', this.moveEvent);
|
zr.off('mousemove', this.moveEvent);
|
||||||
|
|
||||||
|
zr.off('touchstart', this.mousedown);
|
||||||
|
zr.off('touchmove', this.mousemove);
|
||||||
|
zr.off('touchend', this.mouseup);
|
||||||
|
|
||||||
this.disable();
|
this.disable();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -75,17 +92,41 @@ class MouseController extends Eventful {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setAllowDragging(data) {
|
||||||
|
this.isAllowDragging=data;
|
||||||
|
}
|
||||||
|
|
||||||
mousedown(e) {
|
mousedown(e) {
|
||||||
if (eventTool.notLeftMouse(e)) {
|
if (eventTool.notLeftMouse(e)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
const draggingTarget = e.target;
|
||||||
|
// draggingTarget.draggable
|
||||||
|
if (draggingTarget) {
|
||||||
|
if (e.target.parent.getName()=='background') {
|
||||||
|
this._draggingName='background';
|
||||||
|
} else if (this.isAllowDragging&&e.target.parent.getName()=='simple') {
|
||||||
|
this._draggingName='simple';
|
||||||
|
} else if (this.isAllowDragging&&e.target.parent.getName()=='group') {
|
||||||
|
this._draggingName='group';
|
||||||
|
} else if (this.isAllowDragging&&e.target.parent.getName()=='group_child') {
|
||||||
|
this._draggingName='group_child';
|
||||||
|
}
|
||||||
|
this._draggingTarget = draggingTarget;
|
||||||
|
// draggingTarget.dragging = true;
|
||||||
|
this._x = e.offsetX;
|
||||||
|
this._y = e.offsetY;
|
||||||
|
this._dragging = true;
|
||||||
|
// this.dispatchToElement(param(draggingTarget, e), 'dragstart', e.event);
|
||||||
|
}
|
||||||
|
|
||||||
var x = e.offsetX;
|
// var x = e.offsetX;
|
||||||
var y = e.offsetY;
|
// var y = e.offsetY;
|
||||||
|
|
||||||
this._x = x;
|
// this._x = x;
|
||||||
this._y = y;
|
// this._y = y;
|
||||||
this._dragging = true;
|
// this._dragging = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
mousemove(e) {
|
mousemove(e) {
|
||||||
@ -105,14 +146,38 @@ class MouseController extends Eventful {
|
|||||||
this._x = e.offsetX;
|
this._x = e.offsetX;
|
||||||
this._y = e.offsetY;
|
this._y = e.offsetY;
|
||||||
|
|
||||||
this._preventDefaultMouseMove && eventTool.stop(e.event);
|
if (this._dragging) {
|
||||||
|
if (this._draggingTarget&&this._draggingName=='background') {
|
||||||
|
this._preventDefaultMouseMove && eventTool.stop(e.event);
|
||||||
|
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
|
||||||
|
return true;
|
||||||
|
} else if (this.isAllowDragging&&this._draggingTarget&&this._draggingName=='simple') {
|
||||||
|
this._draggingTarget.drift(dx, dy, e);
|
||||||
|
return true;
|
||||||
|
} else if (this.isAllowDragging&&this._draggingTarget&&(this._draggingName=='group'||this._draggingName=='group_child')) {
|
||||||
|
// debugger;
|
||||||
|
if (this._draggingName=='group') {
|
||||||
|
this._draggingTarget.parent.drift(dx, dy, e);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
this._draggingTarget.parent.parent.drift(dx, dy, e);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// debugger;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mouseup(e) {
|
mouseup(e) {
|
||||||
if (!eventTool.notLeftMouse(e)) {
|
// debugger;
|
||||||
|
const draggingTarget = this._draggingTarget;
|
||||||
|
if (!eventTool.notLeftMouse(e)&&draggingTarget) {
|
||||||
this._dragging = false;
|
this._dragging = false;
|
||||||
|
this._draggingTarget = null;
|
||||||
|
this._draggingName=='';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,9 +10,11 @@ export default class alarm extends Group {
|
|||||||
this.model = device.model;
|
this.model = device.model;
|
||||||
this.event = device.event;
|
this.event = device.event;
|
||||||
this.zlevel = device.model.zlevel;
|
this.zlevel = device.model.zlevel;
|
||||||
|
this.z = device.model.zlevel;
|
||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
|
this.name='simple';
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,6 +22,7 @@ export default class alarm extends Group {
|
|||||||
const model = this.model;
|
const model = this.model;
|
||||||
this.imageBg = new Image({
|
this.imageBg = new Image({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
style: {
|
style: {
|
||||||
image: alarmpic,
|
image: alarmpic,
|
||||||
@ -72,4 +75,7 @@ export default class alarm extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ export default class AppendageBox extends Group {
|
|||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
|
this.name='simple';
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,4 +63,7 @@ export default class AppendageBox extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ class Arrow extends Group {
|
|||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
|
this.name='simple';
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +79,7 @@ class Arrow extends Group {
|
|||||||
this.event.disable();
|
this.event.disable();
|
||||||
if (e.which == 3) {
|
if (e.which == 3) {
|
||||||
store.dispatch('ibp/setUpdateDeviceData', this.model);
|
store.dispatch('ibp/setUpdateDeviceData', this.model);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.offsetX = e.offsetX;
|
this.offsetX = e.offsetX;
|
||||||
this.offsetY = e.offsetY;
|
this.offsetY = e.offsetY;
|
||||||
@ -91,9 +92,12 @@ class Arrow extends Group {
|
|||||||
if (this.dragging) {
|
if (this.dragging) {
|
||||||
this.model.point.x = this.model.point.x + (e.offsetX - this.offsetX);
|
this.model.point.x = this.model.point.x + (e.offsetX - this.offsetX);
|
||||||
this.model.point.y = this.model.point.y + (e.offsetY - this.offsetY);
|
this.model.point.y = this.model.point.y + (e.offsetY - this.offsetY);
|
||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Arrow;
|
export default Arrow;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import Group from 'zrender/src/container/Group';
|
import Group from 'zrender/src/container/Group';
|
||||||
import Image from 'zrender/src/graphic/Image';
|
|
||||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||||
import ibpBg from '@/assets/ibp_images/ibp_bg.png';
|
import ibpBg from '@/assets/ibp_images/ibp_bg.png';
|
||||||
|
import Pattern from 'zrender/src/graphic/Pattern';
|
||||||
|
|
||||||
export default class background extends Group {
|
export default class background extends Group {
|
||||||
constructor(device) {
|
constructor(device) {
|
||||||
@ -9,49 +9,49 @@ export default class background extends Group {
|
|||||||
this.model = device.model;
|
this.model = device.model;
|
||||||
this.zlevel = device.model.zlevel;
|
this.zlevel = device.model.zlevel;
|
||||||
this.z = 1;
|
this.z = 1;
|
||||||
this.imageBgArray = [];
|
this.name='background';
|
||||||
// this.model.width = 4100;
|
|
||||||
// this.model.height = 900;
|
|
||||||
this.create();
|
this.create();
|
||||||
|
this.createMouseEvent();
|
||||||
}
|
}
|
||||||
create() {
|
create() {
|
||||||
const widthNum = Math.ceil(parseInt(this.model.width)/2048);
|
const image = new Image(25, 25);
|
||||||
const heightNum = Math.ceil(parseInt(this.model.height)/1024);
|
image.src = ibpBg;
|
||||||
for (let i = 0; i<widthNum; i++) {
|
image.onload = (e) => {
|
||||||
for (let j = 0; j<heightNum; j++) {
|
const pattern = new Pattern(image, 'repeat');
|
||||||
const imageBg = new Image({
|
this.imageBg = new Rect({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
style: {
|
cursor: 'default',
|
||||||
x: i*2048,
|
shape: {
|
||||||
y: j*1024,
|
x: 0,
|
||||||
image: ibpBg,
|
y: 0,
|
||||||
width: 2048,
|
width: this.model.width,
|
||||||
height: 1024
|
height: this.model.height
|
||||||
}
|
},
|
||||||
});
|
style: {
|
||||||
this.imageBgArray.push(imageBg);
|
fill: pattern
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
this.tailorRect = new Rect({
|
this.add(this.imageBg);
|
||||||
zlevel: this.zlevel,
|
};
|
||||||
z: this.z,
|
|
||||||
shape: {
|
|
||||||
x: 0,
|
|
||||||
y: 0,
|
|
||||||
width: this.model.width,
|
|
||||||
height: this.model.height
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.tailorBgImage();
|
|
||||||
}
|
}
|
||||||
tailorBgImage() {
|
createMouseEvent() {
|
||||||
const _this = this;
|
this.on('mousedown', this.mousedown, this);
|
||||||
this.imageBgArray.forEach( function(elem) {
|
this.on('mouseup', this.mouseup, this);
|
||||||
elem.setClipPath(_this.tailorRect);
|
}
|
||||||
_this.add(elem);
|
mousedown(e) {
|
||||||
});
|
if (e.which == 3) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.imageBg.attr('cursor', 'pointer');
|
||||||
|
}
|
||||||
|
mouseup() {
|
||||||
|
this.imageBg.attr('cursor', 'default');
|
||||||
}
|
}
|
||||||
setDraggable() {
|
setDraggable() {
|
||||||
}
|
}
|
||||||
|
getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,16 +30,19 @@ export default class button extends Group {
|
|||||||
this.event = device.event;
|
this.event = device.event;
|
||||||
this.model = device.model;
|
this.model = device.model;
|
||||||
this.zlevel = device.model.zlevel;
|
this.zlevel = device.model.zlevel;
|
||||||
|
this.z = device.model.z;
|
||||||
this.event = device.event;
|
this.event = device.event;
|
||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
|
this.name='simple';
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
create() {
|
create() {
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
this.imageBg = new Image({
|
this.imageBg = new Image({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
style: {
|
style: {
|
||||||
image: this.getImagePic(),
|
image: this.getImagePic(),
|
||||||
@ -141,5 +144,7 @@ export default class button extends Group {
|
|||||||
const color = button.colors.get(`${this.model.color}_on`);
|
const color = button.colors.get(`${this.model.color}_on`);
|
||||||
this.imageBg.setStyle({image: color[0]});
|
this.imageBg.setStyle({image: color[0]});
|
||||||
}
|
}
|
||||||
|
getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ export default class CircularLamp extends Group {
|
|||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
|
this.name='simple';
|
||||||
this.create();
|
this.create();
|
||||||
this.setStatus(this.model);
|
this.setStatus(this.model);
|
||||||
}
|
}
|
||||||
@ -72,4 +73,7 @@ export default class CircularLamp extends Group {
|
|||||||
this.lamp.setStyle('fill', '#332C22');
|
this.lamp.setStyle('fill', '#332C22');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ import clock8 from '@/assets/ibp_images/clock/clock_8.png';
|
|||||||
import clock9 from '@/assets/ibp_images/clock/clock_9.png';
|
import clock9 from '@/assets/ibp_images/clock/clock_9.png';
|
||||||
import clockBg from '@/assets/ibp_images/clock/clock_bg.png';
|
import clockBg from '@/assets/ibp_images/clock/clock_bg.png';
|
||||||
import clockColon from '@/assets/ibp_images/clock/clock_colon.png';
|
import clockColon from '@/assets/ibp_images/clock/clock_colon.png';
|
||||||
|
import store from '@/store';
|
||||||
|
|
||||||
export default class clock extends Group {
|
export default class clock extends Group {
|
||||||
constructor(device) {
|
constructor(device) {
|
||||||
@ -25,6 +26,7 @@ export default class clock extends Group {
|
|||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
this.initTime = 0;
|
this.initTime = 0;
|
||||||
|
this.name='group';
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
create() {
|
create() {
|
||||||
@ -247,5 +249,18 @@ export default class clock extends Group {
|
|||||||
this.setNumPic(1, hours.charAt(0));
|
this.setNumPic(1, hours.charAt(0));
|
||||||
}
|
}
|
||||||
setDraggable() {
|
setDraggable() {
|
||||||
|
this.createMouseEvent();
|
||||||
|
}
|
||||||
|
createMouseEvent() {
|
||||||
|
this.on('mousedown', this.mousedown, this);
|
||||||
|
}
|
||||||
|
mousedown(e) {
|
||||||
|
if (e.which == 3) {
|
||||||
|
store.dispatch('ibp/setUpdateDeviceData', this.model);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getName() {
|
||||||
|
return this.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ export default class elevator extends Group {
|
|||||||
super();
|
super();
|
||||||
this.event = device.event;
|
this.event = device.event;
|
||||||
this.model = device.model;
|
this.model = device.model;
|
||||||
|
this.name='group';
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -16,11 +17,11 @@ export default class elevator extends Group {
|
|||||||
const model = this.model;
|
const model = this.model;
|
||||||
|
|
||||||
this.grouper=new Group({
|
this.grouper=new Group({
|
||||||
id: '111',
|
id: model.code,
|
||||||
// width: model.width,
|
// width: model.width,
|
||||||
// height: model.height,
|
// height: model.height,
|
||||||
position: [model.point.x, model.point.y],
|
position: [model.point.x, model.point.y]
|
||||||
draggable: false
|
// draggable: model.draggable || false
|
||||||
});
|
});
|
||||||
|
|
||||||
this.elevatorBack = new ElevatorBack({model: {
|
this.elevatorBack = new ElevatorBack({model: {
|
||||||
@ -80,6 +81,10 @@ export default class elevator extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
setStatus(model) {
|
setStatus(model) {
|
||||||
if (model.direction=='none') {
|
if (model.direction=='none') {
|
||||||
this.elevatorArrowBottom.setStatus('off');
|
this.elevatorArrowBottom.setStatus('off');
|
||||||
@ -94,36 +99,7 @@ export default class elevator extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setDraggable() {
|
setDraggable() {
|
||||||
this.grouper.attr('draggable', true);
|
// this.grouper.attr('draggable', true);
|
||||||
this.createMouseEvent();
|
// this.createMouseEvent();
|
||||||
}
|
|
||||||
|
|
||||||
createMouseEvent() {
|
|
||||||
this.on('mousedown', this.mousedown, this);
|
|
||||||
this.on('mousemove', this.mousemove, this);
|
|
||||||
this.on('mouseup', this.mouseup, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
mousedown(e) {
|
|
||||||
this.event.disable();
|
|
||||||
if (e.which == 3) {
|
|
||||||
store.dispatch('ibp/setUpdateDeviceData', this.model);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.draggroup =this.grouper;
|
|
||||||
this.deltPostion =[e.event.zrX-this.draggroup.position[0], e.event.zrY-this.draggroup.position[1]];
|
|
||||||
}
|
|
||||||
|
|
||||||
mousemove(e) {
|
|
||||||
if (this.draggroup !=null) {
|
|
||||||
var new_pos =[e.event.zrX, e.event.zrY];
|
|
||||||
this.draggroup.position=[new_pos[0]-this.deltPostion[0], new_pos[1]-this.deltPostion[1]];
|
|
||||||
this.draggroup.dirty();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mouseup(e) {
|
|
||||||
this.event.enable();
|
|
||||||
this.draggroup=null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ export default class elevatorArrow extends Group {
|
|||||||
super();
|
super();
|
||||||
this.model = device.model;
|
this.model = device.model;
|
||||||
this.zlevel = device.model.zlevel;
|
this.zlevel = device.model.zlevel;
|
||||||
|
this.name='group_child';
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,7 +27,6 @@ export default class elevatorArrow extends Group {
|
|||||||
height: 60
|
height: 60
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// debugger;
|
|
||||||
this.add(this.imageBg);
|
this.add(this.imageBg);
|
||||||
this.getOrientate();
|
this.getOrientate();
|
||||||
this.transformScale();
|
this.transformScale();
|
||||||
@ -89,26 +89,7 @@ export default class elevatorArrow extends Group {
|
|||||||
this.imageBg.setStyle({image: imageBack});
|
this.imageBg.setStyle({image: imageBack});
|
||||||
}
|
}
|
||||||
|
|
||||||
// setDraggable() {
|
getName() {
|
||||||
// this.arrow.attr('draggable', true);
|
return this.name;
|
||||||
// this.createMouseEvent();
|
}
|
||||||
// }
|
|
||||||
// createMouseEvent() {
|
|
||||||
// this.on('mousedown', this.mousedown, this);
|
|
||||||
// this.on('mousemove', this.mousemove, this);
|
|
||||||
// this.on('mouseup', this.mouseup, this);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// mousedown(e) {
|
|
||||||
// this.event.disable();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// mousemove(e) {
|
|
||||||
// }
|
|
||||||
|
|
||||||
// mouseup(e) {
|
|
||||||
// this.event.enable();
|
|
||||||
// this.model.point.x = this.model.point.x + e.offsetX;
|
|
||||||
// this.model.point.y = this.model.point.y + e.offsetY;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
@ -7,11 +7,11 @@ export default class elevatorBack extends Group {
|
|||||||
super();
|
super();
|
||||||
this.event = device.event;
|
this.event = device.event;
|
||||||
this.model = device.model;
|
this.model = device.model;
|
||||||
|
this.name='group_child';
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
// debugger;
|
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
const tempString='M'+model.width/6+' '+model.height/8*6+' L'+model.width/6*4+
|
const tempString='M'+model.width/6+' '+model.height/8*6+' L'+model.width/6*4+
|
||||||
' 0 L'+model.width/6*5+' 0 A '+model.width/6+' '+model.width/6+' 0 0 1 '+
|
' 0 L'+model.width/6*5+' 0 A '+model.width/6+' '+model.width/6+' 0 0 1 '+
|
||||||
@ -31,4 +31,8 @@ export default class elevatorBack extends Group {
|
|||||||
});
|
});
|
||||||
this.add(this.elevatorBack);
|
this.add(this.elevatorBack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ export default class ibpLine extends Group {
|
|||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
|
this.name='simple';
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
create() {
|
create() {
|
||||||
@ -46,7 +47,7 @@ export default class ibpLine extends Group {
|
|||||||
this.event.disable();
|
this.event.disable();
|
||||||
if (e.which == 3) {
|
if (e.which == 3) {
|
||||||
store.dispatch('ibp/setUpdateDeviceData', this.model);
|
store.dispatch('ibp/setUpdateDeviceData', this.model);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.offsetX = e.offsetX;
|
this.offsetX = e.offsetX;
|
||||||
this.offsetY = e.offsetY;
|
this.offsetY = e.offsetY;
|
||||||
@ -64,4 +65,7 @@ export default class ibpLine extends Group {
|
|||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ export default class ibpText extends Group {
|
|||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
|
this.name='simple';
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
create() {
|
create() {
|
||||||
@ -67,4 +68,7 @@ export default class ibpText extends Group {
|
|||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ export default class ibpTipBox extends Group {
|
|||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
|
this.name='simple';
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
create() {
|
create() {
|
||||||
@ -61,4 +62,7 @@ export default class ibpTipBox extends Group {
|
|||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ export default class key extends Group {
|
|||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
|
this.name='simple';
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,4 +122,7 @@ export default class key extends Group {
|
|||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,10 +10,12 @@ export default class rotateTip extends Group {
|
|||||||
super();
|
super();
|
||||||
this.model = device.model;
|
this.model = device.model;
|
||||||
this.zlevel = device.model.zlevel;
|
this.zlevel = device.model.zlevel;
|
||||||
|
this.z = device.model.z;
|
||||||
this.event = device.event;
|
this.event = device.event;
|
||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
|
this.name='simple';
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -21,6 +23,7 @@ export default class rotateTip extends Group {
|
|||||||
const model = this.model;
|
const model = this.model;
|
||||||
this.imageBg = new Image({
|
this.imageBg = new Image({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
style: {
|
style: {
|
||||||
image: this.getRotateColor(),
|
image: this.getRotateColor(),
|
||||||
@ -88,4 +91,7 @@ export default class rotateTip extends Group {
|
|||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ export default class RotatingButton extends Group {
|
|||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
|
this.name='simple';
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,4 +62,7 @@ export default class RotatingButton extends Group {
|
|||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,9 +10,11 @@ export default class alarm extends Group {
|
|||||||
this.event = device.event;
|
this.event = device.event;
|
||||||
this.model = device.model;
|
this.model = device.model;
|
||||||
this.zlevel = device.model.zlevel;
|
this.zlevel = device.model.zlevel;
|
||||||
|
this.z = device.model.z;
|
||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
|
this.name='simple';
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,6 +22,7 @@ export default class alarm extends Group {
|
|||||||
const model = this.model;
|
const model = this.model;
|
||||||
this.imageBg = new Image({
|
this.imageBg = new Image({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
style: {
|
style: {
|
||||||
image: teleTerminalPic,
|
image: teleTerminalPic,
|
||||||
@ -72,4 +75,7 @@ export default class alarm extends Group {
|
|||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ export function calculateDCenter(viewRect, zrbound) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function deviceFactory(type, elem) {
|
export function deviceFactory(type, elem) {
|
||||||
return Object.assign({instance: null, event: null, model: Object(elem, deviceRender[type])});
|
return Object.assign({instance: null, event: null, model: Object.assign(elem, deviceRender[type])});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function parser(data) {
|
export function parser(data) {
|
||||||
@ -38,6 +38,7 @@ export function parser(data) {
|
|||||||
if (data) {
|
if (data) {
|
||||||
Object.assign(data.background);
|
Object.assign(data.background);
|
||||||
ibpDevice[data.background.code] = deviceFactory(deviceType.Background, data.background);
|
ibpDevice[data.background.code] = deviceFactory(deviceType.Background, data.background);
|
||||||
|
store.dispatch('ibp/setIbpBgDevice', ibpDevice[data.background.code]);
|
||||||
zrUtil.each(data.textList || [], elem => {
|
zrUtil.each(data.textList || [], elem => {
|
||||||
ibpDevice[elem.code] = deviceFactory(deviceType.IbpText, elem);
|
ibpDevice[elem.code] = deviceFactory(deviceType.IbpText, elem);
|
||||||
}, this);
|
}, this);
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
export const requestAnimationFrame = window.requestAnimationFrame ||
|
|
||||||
window.webkitRequestAnimationFrame ||
|
|
||||||
window.mozRequestAnimationFrame ||
|
|
||||||
window.oRequestAnimationFrame ||
|
|
||||||
window.msRequestAnimationFrame ||
|
|
||||||
function (callback) { callback.timter = window.setTimeout(callback, 1000 / 60); };
|
|
||||||
|
|
||||||
export const cancelRequestAnimFrame = window.cancelAnimationFrame ||
|
|
||||||
window.webkitCancelRequestAnimationFrame ||
|
|
||||||
window.mozCancelRequestAnimationFrame ||
|
|
||||||
window.oCancelRequestAnimationFrame ||
|
|
||||||
window.msCancelRequestAnimationFrame ||
|
|
||||||
function (callback) { window.clearTimeout(callback); };
|
|
@ -12,7 +12,8 @@ const ibp = {
|
|||||||
ibpList: {}, // 数据列表
|
ibpList: {}, // 数据列表
|
||||||
ibpIdList: {}, // 数据列表(以id为标识)
|
ibpIdList: {}, // 数据列表(以id为标识)
|
||||||
updateDeviceData: {}, // 修改的数据
|
updateDeviceData: {}, // 修改的数据
|
||||||
rightClickCount: 0 // 右键点击设备
|
rightClickCount: 0, // 右键点击设备
|
||||||
|
ibpBgDevice: {} // ibp背景设备
|
||||||
},
|
},
|
||||||
|
|
||||||
getters: {
|
getters: {
|
||||||
@ -31,6 +32,9 @@ const ibp = {
|
|||||||
},
|
},
|
||||||
updateDeviceData: (state) => {
|
updateDeviceData: (state) => {
|
||||||
return state.updateDeviceData;
|
return state.updateDeviceData;
|
||||||
|
},
|
||||||
|
ibpBgDevice: (state) => {
|
||||||
|
return state.ibpBgDevice;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -47,6 +51,9 @@ const ibp = {
|
|||||||
},
|
},
|
||||||
deleteIbpDevices: (state, devices) => {
|
deleteIbpDevices: (state, devices) => {
|
||||||
Vue.prototype.$ibp && Vue.prototype.$ibp.render(devices);
|
Vue.prototype.$ibp && Vue.prototype.$ibp.render(devices);
|
||||||
|
},
|
||||||
|
setIbpBgDevice: (state, ibpBgDevice) => {
|
||||||
|
state.ibpBgDevice = ibpBgDevice;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -72,6 +79,9 @@ const ibp = {
|
|||||||
models = [models];
|
models = [models];
|
||||||
}
|
}
|
||||||
commit('deleteIbpDevices', models);
|
commit('deleteIbpDevices', models);
|
||||||
|
},
|
||||||
|
setIbpBgDevice: ( { commit }, device) => {
|
||||||
|
commit('setIbpBgDevice', device);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { requestAnimationFrame, cancelRequestAnimFrame } from '@/jmap/utils/animation';
|
import { requestAnimationFrame, cancelRequestAnimFrame } from '@/utils/animation';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ProgressBar',
|
name: 'ProgressBar',
|
||||||
|
@ -122,6 +122,10 @@ export default {
|
|||||||
min: 0,
|
min: 0,
|
||||||
max: 0
|
max: 0
|
||||||
},
|
},
|
||||||
|
// graphic: {
|
||||||
|
// type: 'line',
|
||||||
|
// progressive: true
|
||||||
|
// },
|
||||||
series: [],
|
series: [],
|
||||||
dataZoom: [
|
dataZoom: [
|
||||||
{
|
{
|
||||||
|
@ -51,7 +51,6 @@
|
|||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
_type: 'Background',
|
_type: 'Background',
|
||||||
code: this.generateCode(),
|
|
||||||
width: this.form .bgWidth,
|
width: this.form .bgWidth,
|
||||||
height: this.form.bgHeight
|
height: this.form.bgHeight
|
||||||
};
|
};
|
||||||
@ -59,10 +58,6 @@
|
|||||||
},
|
},
|
||||||
initPage(){
|
initPage(){
|
||||||
}
|
}
|
||||||
},
|
|
||||||
generateCode() {
|
|
||||||
const mydate = new Date();
|
|
||||||
this.form.code = "bg"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -13,16 +13,16 @@
|
|||||||
<el-input v-model="form.fillColor"></el-input>
|
<el-input v-model="form.fillColor"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="起始X轴坐标">
|
<el-form-item label="起始X轴坐标">
|
||||||
<el-input-number v-model="form.x1" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.x1" controls-position="right" :min="0"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="起始Y轴坐标">
|
<el-form-item label="起始Y轴坐标">
|
||||||
<el-input-number v-model="form.y1" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.y1" controls-position="right" :min="0"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="终止X轴坐标">
|
<el-form-item label="终止X轴坐标">
|
||||||
<el-input-number v-model="form.x2" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.x2" controls-position="right" :min="0"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="终止Y轴坐标">
|
<el-form-item label="终止Y轴坐标">
|
||||||
<el-input-number v-model="form.y2" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.y2" controls-position="right" :min="0"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<el-input v-model="form.textFill"></el-input>
|
<el-input v-model="form.textFill"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文字大小" prop="fontSize">
|
<el-form-item label="文字大小" prop="fontSize">
|
||||||
<el-input-number v-model="form.fontSize" controls-position="right" :min="1" :max="50"></el-input-number>
|
<el-input-number v-model="form.fontSize" controls-position="right" :min="1" :max="100"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文字粗细" prop="fontWeight">
|
<el-form-item label="文字粗细" prop="fontWeight">
|
||||||
<el-input-number v-model="form.fontWeight" controls-position="right" :min="1" ></el-input-number>
|
<el-input-number v-model="form.fontWeight" controls-position="right" :min="1" ></el-input-number>
|
||||||
|
@ -110,7 +110,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import { checkLoginLine } from '@/api/login';
|
import { checkLoginLine } from '@/api/login';
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
import {modelFactory} from '@/ibp/utils/parser'
|
import {deviceFactory} from '@/ibp/utils/parser';
|
||||||
|
import deviceType from '@/ibp/constant/deviceType';
|
||||||
import IbpText from './ibpText';
|
import IbpText from './ibpText';
|
||||||
import IbpTipBox from './ibpTipBox';
|
import IbpTipBox from './ibpTipBox';
|
||||||
import IbpButton from './ibpButton';
|
import IbpButton from './ibpButton';
|
||||||
@ -169,8 +170,13 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
createDataModel(model) {
|
createDataModel(model) {
|
||||||
const newModel = modelFactory(model._type, model);
|
if(model._type === deviceType.Background) {
|
||||||
this.$store.dispatch('ibp/updateIbpDevices', newModel);
|
const bgDevice = this.$store.getters['ibp/ibpBgDevice'];
|
||||||
|
model.code = bgDevice.model.code;
|
||||||
|
}
|
||||||
|
const newModel = deviceFactory(model._type, model);
|
||||||
|
|
||||||
|
this.$store.dispatch('ibp/updateIbpDevices', newModel.model);
|
||||||
},
|
},
|
||||||
deleteDataModel(model) {
|
deleteDataModel(model) {
|
||||||
this.$store.dispatch('ibp/deleteIbpDevices', model);
|
this.$store.dispatch('ibp/deleteIbpDevices', model);
|
||||||
|
@ -164,4 +164,6 @@ export default {
|
|||||||
right: 20px;
|
right: 20px;
|
||||||
bottom: 15px;
|
bottom: 15px;
|
||||||
}
|
}
|
||||||
|
.ibp-canvas{
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="display-draft">
|
<div class="display-draft">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button v-if="isAdmin || isIBP" type="warning" @click="jumpIbp">IBP盘</el-button>
|
<el-button v-if="isIBP" type="warning" @click="jumpIbp">IBP盘</el-button>
|
||||||
<el-button v-if="isDriver" type="jumpjlmap3d" @click="jumpjlmap3d">司机视角</el-button>
|
<el-button v-if="isDriver" type="jumpjlmap3d" @click="jumpjlmap3d">司机视角</el-button>
|
||||||
<template v-if="isAdmin">
|
<template v-if="isAdmin">
|
||||||
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">按计划行车</el-button>
|
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">按计划行车</el-button>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="'订阅地图'" :visible.sync="dialogVisible" width="30%" :before-close="doClose" center>
|
<el-dialog :title="'订阅地图'" :visible.sync="dialogVisible" width="30%" :before-close="doClose" center :close-on-click-modal="false">
|
||||||
<el-form ref="form" v-model="formModel" label-width="120px">
|
<el-form ref="form" v-model="formModel" label-width="120px">
|
||||||
<el-form-item label="订阅地图列表:" prop="mapIdList">
|
<el-form-item label="订阅地图列表:" prop="mapIdList">
|
||||||
<el-select v-model="formModel.mapIdList" clearable multiple placeholder="请输入关键词" style="width: 80%">
|
<el-select v-model="formModel.mapIdList" clearable multiple placeholder="请输入关键词" style="width: 80%">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="$t('system.editUserPermission')" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="$t('system.editUserPermission')" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
<el-button type="primary" @click="doSave">确 定</el-button>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisibles" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisibles" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: '280px', width:'100%' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: '280px', width:'100%' }">
|
||||||
<el-tree
|
<el-tree
|
||||||
ref="tree"
|
ref="tree"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
|
@ -158,16 +158,8 @@ export default {
|
|||||||
this.$messageBox(this.$t('map.failedLoadListPublishedMaps'));
|
this.$messageBox(this.$t('map.failedLoadListPublishedMaps'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
isNormal() {
|
|
||||||
return this.activeTab === 'first';
|
|
||||||
},
|
|
||||||
isThird() {
|
|
||||||
return this.activeTab === 'third';
|
|
||||||
},
|
|
||||||
create() {
|
create() {
|
||||||
if (this.isThird()) {
|
if (this.activeTab === 'first') {
|
||||||
this.close();
|
|
||||||
} else if (this.isNormal()) {
|
|
||||||
this.$refs['newForm'].validate((valid) => {
|
this.$refs['newForm'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="this.$t('map.operationGraphPublished')" :visible.sync="dialogShow" width="30%" :before-close="handleClose">
|
<el-dialog :title="this.$t('map.operationGraphPublished')" :visible.sync="dialogShow" width="30%" :before-close="handleClose">
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" label-position="right" :model="editModel" label-width="120px" size="mini">
|
<el-form ref="form" label-position="right" :model="editModel" label-width="120px" size="mini" :rules="rules">
|
||||||
<el-form-item :label="this.$t('map.operationGraphName')" prop="name">
|
<el-form-item :label="this.$t('map.operationGraphName')" prop="name">
|
||||||
<el-input v-model="editModel.name" :disabled="true" />
|
<el-input v-model="editModel.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@ -34,6 +34,11 @@ export default {
|
|||||||
editModel: {
|
editModel: {
|
||||||
planId: '',
|
planId: '',
|
||||||
name: ''
|
name: ''
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
name: [
|
||||||
|
{ required: true, message: '请输入运行图名称', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -64,7 +64,7 @@ export default {
|
|||||||
prop: 'permissionName'
|
prop: 'permissionName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.price'),
|
title: `${this.$t('orderAuthor.price')}(元)`,
|
||||||
prop: 'price'
|
prop: 'price'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="this.$t('orderAuthor.trainingList')"
|
title="订单选择商品"
|
||||||
:visible.sync="show"
|
:visible.sync="show"
|
||||||
top="20px"
|
top="20px"
|
||||||
width="90%"
|
width="90%"
|
||||||
|
@ -48,7 +48,7 @@ export default {
|
|||||||
// },
|
// },
|
||||||
'status': {
|
'status': {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: this.$t('orderAuthor.authorityStatus'),
|
label: '状态',
|
||||||
value: '1',
|
value: '1',
|
||||||
config: {
|
config: {
|
||||||
data: []
|
data: []
|
||||||
@ -142,7 +142,7 @@ export default {
|
|||||||
formatter: this.formatterDate
|
formatter: this.formatterDate
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.authorityStatus'),
|
title: '状态',
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
||||||
|
@ -72,7 +72,7 @@ export default {
|
|||||||
{ prop: 'lessonId', label: this.$t('permission.lessonName'), type: 'select', required: false, disabled: !this.isAdd, show: this.isShowLesson, options: this.filterPublisLessonList },
|
{ prop: 'lessonId', label: this.$t('permission.lessonName'), type: 'select', required: false, disabled: !this.isAdd, show: this.isShowLesson, options: this.filterPublisLessonList },
|
||||||
{ prop: 'roleName', label: this.$t('permission.belonger'), type: 'complete', required: false, disabled: !this.isAdd && this.isAdministrator, show: this.isShowRole, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: '请输入昵称/名字/手机号' },
|
{ prop: 'roleName', label: this.$t('permission.belonger'), type: 'complete', required: false, disabled: !this.isAdd && this.isAdministrator, show: this.isShowRole, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: '请输入昵称/名字/手机号' },
|
||||||
{ prop: 'date', label: this.$t('permission.selectDate'), type: 'daterange', required: false, viewFormat: 'yyyy-MM-dd HH:mm:ss', valueFormat: 'yyyy-MM-dd HH:mm:ss' },
|
{ prop: 'date', label: this.$t('permission.selectDate'), type: 'daterange', required: false, viewFormat: 'yyyy-MM-dd HH:mm:ss', valueFormat: 'yyyy-MM-dd HH:mm:ss' },
|
||||||
{ prop: 'amount', label: this.$t('permission.permissionTotal'), type: 'number', required: false, min: 0, max: this.maxTotal, message: this.numberMessage }
|
{ prop: 'amount', label: '权限个数', type: 'number', required: false, min: 0, max: this.maxTotal, message: this.numberMessage }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return form;
|
return form;
|
||||||
|
@ -26,9 +26,9 @@
|
|||||||
{{ computedName(PublishMapList, scope.row.mapId) }}
|
{{ computedName(PublishMapList, scope.row.mapId) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="mapProductCode" :label="$t('permission.mapProductName')" width="80">
|
<el-table-column prop="mapProductCode" :label="$t('permission.mapProductName')" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.mapProductCode }}
|
{{ computedName(mapProductList, scope.row.mapProductCode) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="lessonId" :label="$t('permission.lessonName')">
|
<el-table-column prop="lessonId" :label="$t('permission.lessonName')">
|
||||||
@ -38,8 +38,8 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="startTime" :label="$t('permission.startTime')" width="80" />
|
<el-table-column prop="startTime" :label="$t('permission.startTime')" width="80" />
|
||||||
<el-table-column prop="endTime" :label="$t('permission.endTime')" width="80" />
|
<el-table-column prop="endTime" :label="$t('permission.endTime')" width="80" />
|
||||||
<el-table-column prop="amount" :label="$t('permission.permissionTotal')" width="110" />
|
<el-table-column prop="amount" label="权限个数" width="90" />
|
||||||
<el-table-column l:abel="$t('global.operate')" width="90">
|
<el-table-column label="操作" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="dialogEdit(scope.row)">{{ $t('global.edit') }}</el-button>
|
<el-button type="text" size="small" @click="dialogEdit(scope.row)">{{ $t('global.edit') }}</el-button>
|
||||||
<el-button type="text" size="small" @click="deleteForm(scope.row)">{{ $t('global.delete') }}</el-button>
|
<el-button type="text" size="small" @click="deleteForm(scope.row)">{{ $t('global.delete') }}</el-button>
|
||||||
@ -92,6 +92,7 @@ export default {
|
|||||||
PermissionTypeList: [],
|
PermissionTypeList: [],
|
||||||
PublisLessonList: [],
|
PublisLessonList: [],
|
||||||
PublishMapList: [],
|
PublishMapList: [],
|
||||||
|
mapProductList: [],
|
||||||
ruleList: []
|
ruleList: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -205,7 +206,14 @@ export default {
|
|||||||
item.mapProductCode == elem.mapProductCode &&
|
item.mapProductCode == elem.mapProductCode &&
|
||||||
item.permissionType == elem.permissionType;
|
item.permissionType == elem.permissionType;
|
||||||
});
|
});
|
||||||
|
getPublishMapInfo(item.mapId).then(resp => {
|
||||||
|
getCommodityMapProduct(resp.data.skinCode).then(rest => {
|
||||||
|
const list = rest.data || [];
|
||||||
|
this.mapProductList = list.map(elem => {
|
||||||
|
return { value: elem.code, label: elem.name };
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
this.ruleList.push(item);
|
this.ruleList.push(item);
|
||||||
} else {
|
} else {
|
||||||
@ -271,7 +279,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.forms {
|
.forms {
|
||||||
width: 800px;
|
width: 900px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
padding: 40px;
|
padding: 40px;
|
||||||
|
@ -119,7 +119,7 @@ export default {
|
|||||||
{
|
{
|
||||||
title: this.$t('permission.belonger'),
|
title: this.$t('permission.belonger'),
|
||||||
prop: 'ownerName',
|
prop: 'ownerName',
|
||||||
isShow: () => { return this.$store.state.user.roles.indexOf(superAdmin) != -1 || this.$store.state.user.roles.indexOf(admin) < 0; }
|
isShow: () => { return this.$store.state.user.roles.indexOf(superAdmin) > 0 || this.$store.state.user.roles.indexOf(admin) > 0; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="plan-tool" style="width: 100%; height: 100%;">
|
<div class="plan-tool" style="width: 100%; height: 100%;">
|
||||||
<menu-bar ref="menuBar" :skin-style="skinCode" :plan-convert="PlanConvert" @dispatchDialog="dispatchDialog" />
|
<menu-bar ref="menuBar" :plan-convert="PlanConvert" @dispatchDialog="dispatchDialog" />
|
||||||
<schedule
|
<schedule
|
||||||
ref="schedule"
|
ref="schedule"
|
||||||
:skin-code="skinCode"
|
:skin-code="skinCode"
|
||||||
|
@ -123,10 +123,10 @@ import { EventBus } from '@/scripts/event-bus';
|
|||||||
export default {
|
export default {
|
||||||
name: 'PlanMenuBar',
|
name: 'PlanMenuBar',
|
||||||
props: {
|
props: {
|
||||||
skinCode: {
|
// skinCode: {
|
||||||
type: String,
|
// type: String,
|
||||||
default: ''
|
// default: ''
|
||||||
},
|
// },
|
||||||
planConvert: {
|
planConvert: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: function() {
|
default: function() {
|
||||||
@ -141,6 +141,7 @@ export default {
|
|||||||
tempClassA: -1,
|
tempClassA: -1,
|
||||||
tempClassB: -1,
|
tempClassB: -1,
|
||||||
menus: [],
|
menus: [],
|
||||||
|
loading: null,
|
||||||
menuBase: [
|
menuBase: [
|
||||||
{
|
{
|
||||||
title: '文件',
|
title: '文件',
|
||||||
@ -149,19 +150,27 @@ export default {
|
|||||||
title: '打开运行图',
|
title: '打开运行图',
|
||||||
click: this.handleOpenRunPlan
|
click: this.handleOpenRunPlan
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
type: 'file',
|
// type: 'file',
|
||||||
title: '导入运行图',
|
// title: '导入运行图',
|
||||||
click: this.handleImportRunPlan
|
// click: this.handleImportRunPlan
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: '新建运行图',
|
title: '新建运行图',
|
||||||
click: this.handleCreateEmptyPlan
|
click: this.handleCreateEmptyPlan
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '修改运行图名称',
|
||||||
|
click: this.handleEditPlan
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '修改站间运行时间',
|
title: '修改站间运行时间',
|
||||||
click: this.handleModifyingStationIntervalTime
|
click: this.handleModifyingStationIntervalTime
|
||||||
// disabledCallback: () => { return !this.$route.query.planId },
|
// disabledCallback: () => { return !this.$route.query.planId },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '删除运行图',
|
||||||
|
click: this.handledeleteRunPlan
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -388,65 +397,74 @@ export default {
|
|||||||
},
|
},
|
||||||
// 打开运行图列表
|
// 打开运行图列表
|
||||||
handleOpenRunPlan() {
|
handleOpenRunPlan() {
|
||||||
this.$emit('dispatchDialog', { name: 'openRunPlan', params: {} });
|
this.$emit('dispatchDialog', { name: 'openRunPlan', params: {type: 'add'} });
|
||||||
|
},
|
||||||
|
handledeleteRunPlan() {
|
||||||
|
this.$emit('dispatchDialog', { name: 'openRunPlan', params: {type: 'delete'} });
|
||||||
|
},
|
||||||
|
// 修改运行图名称
|
||||||
|
handleEditPlan() {
|
||||||
|
this.$emit('dispatchDialog', { name: 'openRunPlan', params: {type: 'edit'} });
|
||||||
|
},
|
||||||
|
loadingScreen() {
|
||||||
|
this.loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: '正在导入中...',
|
||||||
|
spinner: 'el-icon-loading',
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 导入运行图
|
// 导入运行图
|
||||||
handleImportRunPlan(file) {
|
handleImportRunPlan(file) {
|
||||||
if (file) {
|
if (file) {
|
||||||
const loading = this.$loading({
|
this.loadingScreen();
|
||||||
lock: true,
|
setTimeout(() => {
|
||||||
text: '正在导入中...',
|
const that = this;
|
||||||
spinner: 'el-icon-loading',
|
const reader = new FileReader();
|
||||||
background: 'rgba(0, 0, 0, 0.7)'
|
if (reader) {
|
||||||
});
|
reader.onload = function (e) {
|
||||||
|
let wb;
|
||||||
const that = this;
|
const data = e.target.result;
|
||||||
const reader = new FileReader();
|
if (that.rABS) {
|
||||||
if (reader) {
|
wb = XLSX.read(btoa(that.fixdata(data)), { // 手动转化
|
||||||
reader.onload = function (e) {
|
type: 'base64'
|
||||||
let wb;
|
});
|
||||||
const data = e.target.result;
|
} else {
|
||||||
if (that.rABS) {
|
wb = XLSX.read(data, {
|
||||||
wb = XLSX.read(btoa(that.fixdata(data)), { // 手动转化
|
type: 'binary'
|
||||||
type: 'base64'
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
wb = XLSX.read(data, {
|
|
||||||
type: 'binary'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wb) {
|
|
||||||
try {
|
|
||||||
let jsonData = [];
|
|
||||||
for (const index in wb.Sheets) {
|
|
||||||
jsonData = that.PlanConvert.importData(wb.Sheets[index], jsonData);
|
|
||||||
}
|
|
||||||
|
|
||||||
importRunPlan({ skinCode: that.skinCode, runPlanList: jsonData }).then(response => {
|
|
||||||
loading.close();
|
|
||||||
that.refresh();
|
|
||||||
that.$message.success('导入运行图成功!');
|
|
||||||
}).catch(() => {
|
|
||||||
loading.close();
|
|
||||||
that.refresh();
|
|
||||||
that.$message.warning('导入运行图失败!');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
} catch (error) {
|
|
||||||
loading.close();
|
|
||||||
that.refresh();
|
|
||||||
that.$message.warning('解析运行图失败!');
|
|
||||||
}
|
}
|
||||||
}
|
if (wb) {
|
||||||
};
|
try {
|
||||||
|
let jsonData = [];
|
||||||
|
for (const index in wb.Sheets) {
|
||||||
|
jsonData = that.planConvert.importData(wb.Sheets[index], jsonData);
|
||||||
|
}
|
||||||
|
|
||||||
if (that.rABS) {
|
importRunPlan({ skinCode: that.$route.query.skinCode || '02', runPlanList: jsonData }).then(response => {
|
||||||
reader.readAsArrayBuffer(file);
|
that.loading.close();
|
||||||
} else {
|
that.refresh();
|
||||||
reader.readAsBinaryString(file);
|
that.handleOpenRunPlan();
|
||||||
|
}).catch(error => {
|
||||||
|
that.loading.close();
|
||||||
|
that.refresh();
|
||||||
|
that.$message.warning(`导入运行图失败: ${error.message}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
that.loading.close();
|
||||||
|
that.refresh();
|
||||||
|
that.$message.warning(`解析运行图失败: ${error.message}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if (that.rABS) {
|
||||||
|
reader.readAsArrayBuffer(file);
|
||||||
|
} else {
|
||||||
|
reader.readAsBinaryString(file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}, 50);
|
||||||
}
|
}
|
||||||
this.closeMenu();
|
this.closeMenu();
|
||||||
},
|
},
|
||||||
|
@ -4,28 +4,54 @@
|
|||||||
class="planEdit__tool create-empty-plan"
|
class="planEdit__tool create-empty-plan"
|
||||||
:title="title"
|
:title="title"
|
||||||
:visible.sync="dialogShow"
|
:visible.sync="dialogShow"
|
||||||
width="420px"
|
width="30%"
|
||||||
:before-close="doClose"
|
:before-close="doClose"
|
||||||
:z-index="2000"
|
:z-index="2000"
|
||||||
:modal="false"
|
:modal="false"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
>
|
>
|
||||||
<el-row>
|
<div>
|
||||||
<el-form ref="form" :model="addModel" label-width="140px" size="mini" :rules="rules" @submit.native.prevent>
|
<el-tabs v-model="activeTab" type="card">
|
||||||
<el-form-item label="运行图名称:" prop="name">
|
<el-tab-pane label="正常新建" name="first">
|
||||||
<el-input v-model="addModel.name" autofocus />
|
<el-row>
|
||||||
</el-form-item>
|
<el-form ref="form" :model="newModel" label-width="140px" size="mini" :rules="rules" @submit.native.prevent>
|
||||||
</el-form>
|
<el-form-item label="运行图名称:" prop="name">
|
||||||
</el-row>
|
<el-input v-model="newModel.name" autofocus />
|
||||||
<el-row type="flex" justify="center" class="button-group">
|
</el-form-item>
|
||||||
<el-button @click="handleCommit">确 定</el-button>
|
</el-form>
|
||||||
<el-button @click="doClose">取 消</el-button>
|
</el-row>
|
||||||
</el-row>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="从发布运行图创建" name="second">
|
||||||
|
<el-row>
|
||||||
|
<el-form ref="pullForm" :model="pullModel" label-width="140px" size="mini" :rules="pullRules" @submit.native.prevent>
|
||||||
|
<el-form-item label="发布运行图" prop="templateId">
|
||||||
|
<el-select v-model="pullModel.templateId" :placeholder="$t('map.pleaseSelect')">
|
||||||
|
<el-option
|
||||||
|
v-for="item in publishMapList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="运行图名称:" prop="name">
|
||||||
|
<el-input v-model="pullModel.name" autofocus />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" :loading="loading" @click="handleCommit">{{ $t('map.confirm') }}</el-button>
|
||||||
|
<el-button @click="doClose">{{ $t('map.cancel') }}</el-button>
|
||||||
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { createEmptyPlan } from '@/api/runplan';
|
import { createEmptyPlan, queryRunPlanList, postCreatePlan } from '@/api/runplan';
|
||||||
|
import { UrlConfig } from '@/router/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CreateEmptyPlan',
|
name: 'CreateEmptyPlan',
|
||||||
@ -33,9 +59,16 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
activeTab: 'first',
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
addModel: {
|
publishMapList: [],
|
||||||
|
newModel: {
|
||||||
|
name: '',
|
||||||
|
skinCode: this.$route.query.skinCode
|
||||||
|
},
|
||||||
|
pullModel: {
|
||||||
|
templateId: '',
|
||||||
name: '',
|
name: '',
|
||||||
skinCode: this.$route.query.skinCode
|
skinCode: this.$route.query.skinCode
|
||||||
}
|
}
|
||||||
@ -43,7 +76,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '创建空运行图数据';
|
return '新建运行图';
|
||||||
},
|
},
|
||||||
rules() {
|
rules() {
|
||||||
return {
|
return {
|
||||||
@ -51,36 +84,88 @@ export default {
|
|||||||
{ required: true, message: '请输入运行图名称', trigger: 'blur' }
|
{ required: true, message: '请输入运行图名称', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
pullRules() {
|
||||||
|
return {
|
||||||
|
templateId: [
|
||||||
|
{ required: true, message: '请选择发布运行图', trigger: 'change' }
|
||||||
|
],
|
||||||
|
name: [
|
||||||
|
{ required: true, message: '请输入运行图名称', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async initLoad() {
|
||||||
|
const res = await queryRunPlanList(this.$route.query.skinCode);
|
||||||
|
if (res.code == 200 && res.data.length) {
|
||||||
|
this.publishMapList = res.data;
|
||||||
|
}
|
||||||
|
},
|
||||||
doShow() {
|
doShow() {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
|
this.initLoad();
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
|
this.newModel.name = '';
|
||||||
|
this.pullModel.templateId = '';
|
||||||
|
this.pullModel.name = '';
|
||||||
|
if (this.$refs.form) {
|
||||||
|
this.$refs.form.resetFields();
|
||||||
|
}
|
||||||
|
if (this.$refs.pullForm) {
|
||||||
|
this.$refs.pullForm.resetFields();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleCommit() {
|
handleCommit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
if (this.activeTab === 'first') {
|
||||||
if (valid) {
|
this.$refs['form'].validate((valid) => {
|
||||||
createEmptyPlan(this.addModel).then(resp => {
|
if (valid) {
|
||||||
const params = {
|
this.loading = true;
|
||||||
dialogName: 'openRunPlan',
|
createEmptyPlan(this.newModel).then(resp => {
|
||||||
operate: 'loadRunPlanData',
|
const params = {
|
||||||
params: { planId: resp.data, skinCode: this.$route.query.skinCode, planName: this.addModel.name, refresh: true }
|
dialogName: 'openRunPlan',
|
||||||
};
|
operate: 'loadRunPlanData',
|
||||||
|
params: { planId: resp.data, skinCode: this.$route.query.skinCode, planName: this.newModel.name, refresh: true }
|
||||||
|
};
|
||||||
|
|
||||||
this.$emit('dispatchOperate', params);
|
this.$emit('dispatchOperate', params);
|
||||||
this.$emit('dispatchDialog', { name: 'openRunPlan', params: {} });
|
// this.$emit('dispatchDialog', { name: 'openRunPlan', params: {type: 'add'} });
|
||||||
this.$message.success('创建空运行图成功!');
|
this.$message.success('创建空运行图成功!');
|
||||||
this.doClose();
|
this.jump(resp.data, this.newModel.name);
|
||||||
}).catch(() => {
|
this.doClose();
|
||||||
this.$messageBox('创建空运行图失败');
|
}).catch(() => {
|
||||||
this.doClose();
|
this.$messageBox('创建空运行图失败');
|
||||||
});
|
this.doClose();
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$refs['pullForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.loading = true;
|
||||||
|
postCreatePlan(this.pullModel).then(resp => {
|
||||||
|
// this.$emit('dispatchDialog', { name: 'openRunPlan', params: {type: 'add'} });
|
||||||
|
this.$message.success('创建运行图成功!');
|
||||||
|
this.jump(resp.data, this.pullModel.name);
|
||||||
|
this.doClose();
|
||||||
|
}).catch(() => {
|
||||||
|
this.$messageBox('创建运行图失败');
|
||||||
|
this.doClose();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
jump(planId, planName) {
|
||||||
|
const query = { skinCode: this.$route.query.skinCode, mapId: this.$route.query.mapId, planId: planId, planName: planName };
|
||||||
|
this.$router.push({ path: `${UrlConfig.plan.tool}`, query: query });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
116
src/views/planMonitor/editTool/menus/editPlanName.vue
Normal file
116
src/views/planMonitor/editTool/menus/editPlanName.vue
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
|
class="planEdit__tool create-empty-plan"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="30%"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="3000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<el-row>
|
||||||
|
<el-form ref="form" :model="editModel" label-width="140px" size="mini" :rules="rules" @submit.native.prevent>
|
||||||
|
<el-form-item label="运行图名称:" prop="name">
|
||||||
|
<el-input v-model="editModel.name" autofocus />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" :loading="loading" @click="handleEdit">修改</el-button>
|
||||||
|
<el-button @click="doClose">{{ $t('map.cancel') }}</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { putRunPlanDetail } from '@/api/runplan';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CreateEmptyPlan',
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeTab: 'first',
|
||||||
|
dialogShow: false,
|
||||||
|
loading: false,
|
||||||
|
publishMapList: [],
|
||||||
|
editModel: {
|
||||||
|
planId: '',
|
||||||
|
name: ''
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
title() {
|
||||||
|
return '新建运行图';
|
||||||
|
},
|
||||||
|
rules() {
|
||||||
|
return {
|
||||||
|
name: [
|
||||||
|
{ required: true, message: '请输入运行图名称', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(data) {
|
||||||
|
this.dialogShow = true;
|
||||||
|
if (data && data.name) {
|
||||||
|
this.editModel.name = data.name;
|
||||||
|
this.editModel.planId = data.id;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.loading = false;
|
||||||
|
this.dialogShow = false;
|
||||||
|
this.editModel.name = '';
|
||||||
|
if (this.$refs.form) {
|
||||||
|
this.$refs.form.resetFields();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleEdit() {
|
||||||
|
this.$refs['form'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.loading = true;
|
||||||
|
putRunPlanDetail(this.editModel).then(resp => {
|
||||||
|
const params = {
|
||||||
|
dialogName: 'openRunPlan',
|
||||||
|
operate: 'loadRunPlanData',
|
||||||
|
params: { planId: resp.data, skinCode: this.$route.query.skinCode, planName: this.editModel.name, refresh: true }
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$emit('dispatchOperate', params);
|
||||||
|
this.$message.success('修改运行图名称成功!');
|
||||||
|
this.$emit('renewal');
|
||||||
|
this.doClose();
|
||||||
|
}).catch(() => {
|
||||||
|
this.$messageBox('修改运行图名称失败');
|
||||||
|
this.doClose();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
|
/deep/ {
|
||||||
|
.el-input {
|
||||||
|
width: 160px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-input-number {
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,42 +1,49 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<div>
|
||||||
v-dialogDrag
|
<el-dialog
|
||||||
class="planEdit__tool open-runplan"
|
v-dialogDrag
|
||||||
:title="title"
|
class="planEdit__tool open-runplan"
|
||||||
:visible.sync="show"
|
:title="title"
|
||||||
width="640px"
|
:visible.sync="show"
|
||||||
:before-close="doClose"
|
width="640px"
|
||||||
:z-index="2000"
|
:before-close="doClose"
|
||||||
:modal="false"
|
:z-index="2000"
|
||||||
:close-on-click-modal="false"
|
:modal="true"
|
||||||
>
|
:close-on-click-modal="false"
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height: height+'px'}">
|
>
|
||||||
<el-tree
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height: height+'px'}">
|
||||||
ref="tree"
|
<el-tree
|
||||||
class="filter-tree"
|
ref="tree"
|
||||||
:data="runPlanList"
|
class="filter-tree"
|
||||||
:props="defaultProps"
|
:data="runPlanList"
|
||||||
default-expand-all
|
:props="defaultProps"
|
||||||
:style="{height: height-20+'px'}"
|
highlight-current
|
||||||
>
|
default-expand-all
|
||||||
<span slot-scope="{ node, data }">
|
:style="{height: height-20+'px'}"
|
||||||
<el-radio v-model="planId" :label="data.id"><span>{{ data.name }}</span></el-radio>
|
@node-click="handleNodeClick"
|
||||||
</span>
|
/>
|
||||||
</el-tree>
|
</el-scrollbar>
|
||||||
</el-scrollbar>
|
<el-row type="flex" justify="center" class="button-group">
|
||||||
<el-row type="flex" justify="center" class="button-group">
|
<el-button v-if="type == 'add'" type="primary" @click="handleConfirm">选择运行图</el-button>
|
||||||
<el-button type="primary" @click="handleConfirm">选择运行图</el-button>
|
<el-button v-if="type == 'delete'" type="primary" @click="handleDelete">删除</el-button>
|
||||||
<el-button @click="dialogShow = false">取 消</el-button>
|
<el-button v-if="type == 'edit'" type="primary" @click="handleEdit">修改</el-button>
|
||||||
</el-row>
|
<el-button @click="dialogShow = false">取 消</el-button>
|
||||||
</el-dialog>
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
|
<edit-plan-name ref="editPlan" @renewal="getRunPlanList" />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getRpListByMapId } from '@/api/runplan';
|
import { getRpListByMapId, deleteRunPlan } from '@/api/runplan';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
|
import EditPlanName from './editPlanName';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'OpenRunPlan',
|
name: 'OpenRunPlan',
|
||||||
|
components: {
|
||||||
|
EditPlanName
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
skinCode: {
|
skinCode: {
|
||||||
type: String,
|
type: String,
|
||||||
@ -49,6 +56,9 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
height: 260,
|
height: 260,
|
||||||
planId: '',
|
planId: '',
|
||||||
|
planName: '',
|
||||||
|
type: 'add',
|
||||||
|
// defaultShowKeys: [],
|
||||||
runPlanList: [],
|
runPlanList: [],
|
||||||
runPlanDict: {},
|
runPlanDict: {},
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
@ -72,35 +82,68 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleNodeClick(data) {
|
||||||
|
this.planId = data.id;
|
||||||
|
this.planName = data.name;
|
||||||
|
},
|
||||||
loadRunPlanData({ refresh, planId, skinCode, planName }) {
|
loadRunPlanData({ refresh, planId, skinCode, planName }) {
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
this.$store.dispatch('runPlan/refresh');
|
this.$store.dispatch('runPlan/refresh');
|
||||||
} else {
|
} else {
|
||||||
const query = { skinCode: skinCode, mapId: this.$route.query.mapId, planId: planId, planName, try: this.$route.query.try, goodsId: this.$route.query.goodsId };
|
const query = { skinCode: skinCode, mapId: this.$route.query.mapId, planId: planId, planName: planName };
|
||||||
this.$router.push({ path: `${UrlConfig.plan.tool}`, query: query });
|
this.$router.push({ path: `${UrlConfig.plan.tool}`, query: query });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doShow() {
|
getRunPlanList() {
|
||||||
getRpListByMapId(this.$route.query.mapId).then((resp) => {
|
getRpListByMapId(this.$route.query.mapId).then((resp) => {
|
||||||
this.runPlanList = resp.data;
|
this.runPlanList = resp.data;
|
||||||
this.runPlanList.forEach(elem => {
|
this.runPlanList.forEach(elem => {
|
||||||
this.runPlanDict[elem.id] = elem.name;
|
this.runPlanDict[elem.id] = elem.name;
|
||||||
});
|
});
|
||||||
|
// this.defaultShowKeys = [this.planId];
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox('获取运行图列表失败');
|
this.$messageBox('获取运行图列表失败');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
doShow(data) {
|
||||||
|
this.type = data.type || 'add';
|
||||||
|
this.getRunPlanList();
|
||||||
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
|
this.planId = '';
|
||||||
|
this.planName = '';
|
||||||
},
|
},
|
||||||
|
// 跳转到对应运行图
|
||||||
handleConfirm() {
|
handleConfirm() {
|
||||||
this.loadRunPlanData({
|
this.loadRunPlanData({
|
||||||
planId: this.planId,
|
planId: this.planId,
|
||||||
skinCode: this.$route.query.skinCode,
|
skinCode: this.$route.query.skinCode,
|
||||||
planName: this.runPlanDict[this.planId]
|
planName: this.planName
|
||||||
});
|
});
|
||||||
this.doClose();
|
this.doClose();
|
||||||
|
},
|
||||||
|
// 删除运行图
|
||||||
|
handleDelete() {
|
||||||
|
deleteRunPlan(this.planId).then(Response => {
|
||||||
|
this.$message.success(`删除成功!`);
|
||||||
|
if (this.planId === this.$route.query.planId) {
|
||||||
|
const query = { skinCode: this.$route.query.skinCode, mapId: this.$route.query.mapId };
|
||||||
|
this.$router.push({ path: `${UrlConfig.plan.tool}`, query: query });
|
||||||
|
}
|
||||||
|
this.doClose();
|
||||||
|
}).catch(() => {
|
||||||
|
this.$messageBox(this.$t('tip.deleteOperationGraphFailed'));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 修改运行图名称
|
||||||
|
handleEdit() {
|
||||||
|
if (this.planId && this.planName) {
|
||||||
|
this.$refs.editPlan.doShow({id: this.planId, name: this.planName});
|
||||||
|
} else {
|
||||||
|
this.$message.info('请选择运行图');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -40,10 +40,10 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
planConvert: {
|
// planConvert: {
|
||||||
type: Object,
|
// type: Object,
|
||||||
required: true
|
// required: true
|
||||||
},
|
// },
|
||||||
maxWidth: {
|
maxWidth: {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: true
|
required: true
|
||||||
@ -55,6 +55,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
planConvert: null,
|
||||||
top: 0,
|
top: 0,
|
||||||
height: 0,
|
height: 0,
|
||||||
mapName: '',
|
mapName: '',
|
||||||
@ -350,29 +351,33 @@ export default {
|
|||||||
getPublishMapInfo(this.$route.query.mapId).then(resp => {
|
getPublishMapInfo(this.$route.query.mapId).then(resp => {
|
||||||
this.mapName = `${resp.data.name} (${this.$route.query.planName || ''})`;
|
this.mapName = `${resp.data.name} (${this.$route.query.planName || ''})`;
|
||||||
});
|
});
|
||||||
this.PlanConvert = this.$theme.loadPlanConvert(this.skinCode);
|
this.planConvert = this.$theme.loadPlanConvert(this.skinCode);
|
||||||
this.$store.dispatch('runPlan/clear').then(resp => {
|
this.$store.dispatch('runPlan/clear').then(() => {
|
||||||
this.loadInitChart().then(() => {
|
this.loadInitChart().then(() => {
|
||||||
if (this.skinCode && this.planId) {
|
if (this.skinCode) {
|
||||||
this.myChart && this.myChart.showLoading();
|
|
||||||
loadMapData(this.skinCode);
|
loadMapData(this.skinCode);
|
||||||
getStationListBySkinCode(this.skinCode).then(resp => {
|
getStationListBySkinCode(this.$route.query.skinCode).then(resp => {
|
||||||
this.$store.dispatch('runPlan/setStations', resp.data).then(() => {
|
this.$store.dispatch('runPlan/setStations', resp.data).then(() => {
|
||||||
queryRunPlan(this.planId).then(rest => {
|
this.loadInitData();
|
||||||
this.$store.dispatch('runPlan/setPlanData', rest.data).then(() => {
|
if (this.planId) {
|
||||||
this.analyticalServiceNumber(this.$store.state.runPlan.editData);
|
this.myChart && this.myChart.showLoading();
|
||||||
this.loadChartData();
|
queryRunPlan(this.planId).then(rest => {
|
||||||
|
this.$store.dispatch('runPlan/setPlanData', rest.data).then(() => {
|
||||||
|
this.analyticalServiceNumber(this.$store.state.runPlan.editData);
|
||||||
|
this.loadChartData();
|
||||||
|
this.myChart && this.myChart.hideLoading();
|
||||||
|
});
|
||||||
|
}).catch(() => {
|
||||||
this.myChart && this.myChart.hideLoading();
|
this.myChart && this.myChart.hideLoading();
|
||||||
|
this.$messageBox('获取运行图数据失败');
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
} else {
|
||||||
this.myChart && this.myChart.hideLoading();
|
this.clearCanvas();
|
||||||
this.$messageBox('获取运行图数据失败');
|
}
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox('请求车站数据失败');
|
this.$messageBox('请求车站数据失败');
|
||||||
this.$store.dispatch('runPlan/setStations', []);
|
this.$store.dispatch('runPlan/setStations', []);
|
||||||
this.myChart && this.myChart.hideLoading();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -389,10 +394,10 @@ export default {
|
|||||||
this.viewDisabled = true;
|
this.viewDisabled = true;
|
||||||
|
|
||||||
this.option.series = [];
|
this.option.series = [];
|
||||||
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
|
this.kmRangeCoordMap = this.planConvert.convertStationsToMap(stations);
|
||||||
this.pushModels(this.option.series, [this.PlanConvert.initializeYaxis(stations)]);
|
this.pushModels(this.option.series, [this.planConvert.initializeYaxis(this.stations)]);
|
||||||
this.pushModels(this.option.series, this.PlanConvert.convertDataToModels(planData, stations, this.kmRangeCoordMap, { width: 0.5 }));
|
this.pushModels(this.option.series, this.planConvert.convertDataToModels(planData, stations, this.kmRangeCoordMap, { width: 0.5, color: '#000' }));
|
||||||
await this.loadInitData();
|
await this.loadInitChart();
|
||||||
|
|
||||||
this.viewDisabled = false;
|
this.viewDisabled = false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -465,11 +470,19 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
clearCanvas() {
|
||||||
|
this.option.series = [];
|
||||||
|
this.option.title.text = '';
|
||||||
|
if (this.myChart) {
|
||||||
|
this.myChart.clear();
|
||||||
|
}
|
||||||
|
this.myChart.setOption(this.option);
|
||||||
|
},
|
||||||
xAxisPointFormat(params) {
|
xAxisPointFormat(params) {
|
||||||
return timeFormat(params.value);
|
return timeFormat(params.value);
|
||||||
},
|
},
|
||||||
yAxisPointFormat(params) {
|
yAxisPointFormat(params) {
|
||||||
return this.PlanConvert.computedFormatYAxis(this.stations, params);
|
return this.planConvert.computedFormatYAxis(this.stations, params);
|
||||||
},
|
},
|
||||||
xAxisLableFormat(value, index) {
|
xAxisLableFormat(value, index) {
|
||||||
if (value % 60 === 0) {
|
if (value % 60 === 0) {
|
||||||
@ -481,7 +494,7 @@ export default {
|
|||||||
},
|
},
|
||||||
xAxisInit() {
|
xAxisInit() {
|
||||||
const list = [];
|
const list = [];
|
||||||
for (var time = 0 + this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) {
|
for (var time = 0 + this.planConvert.TranslationTime; time < 3600 * 24 + this.planConvert.TranslationTime; time++) {
|
||||||
list.push(time);
|
list.push(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -498,18 +511,19 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
yAxisInit() {
|
yAxisInit() {
|
||||||
if (Object.keys(this.PlanConvert).length) {
|
if (Object.keys(this.planConvert).length) {
|
||||||
this.option.yAxis.min = this.PlanConvert.computedYaxisMinValue(this.stations);
|
this.pushModels(this.option.series, [this.planConvert.initializeYaxis(this.stations)]);
|
||||||
this.option.yAxis.max = this.PlanConvert.computedYaxisMaxValue(this.stations);
|
this.option.yAxis.min = this.planConvert.computedYaxisMinValue(this.stations);
|
||||||
|
this.option.yAxis.max = this.planConvert.computedYaxisMaxValue(this.stations);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
axisTooltip(param) {
|
axisTooltip(param) {
|
||||||
const station = this.stations[Math.floor((param.data[1] - this.PlanConvert.EdgeHeight) / this.PlanConvert.CoordMultiple)] || { name: '', kmRange: '' };
|
const station = this.stations[Math.floor((param.data[1] - this.planConvert.EdgeHeight) / this.planConvert.CoordMultiple)] || { name: '', kmRange: '' };
|
||||||
return [
|
return [
|
||||||
`Point Data <hr size=1 style="margin: 3px 0">`,
|
`Point Data <hr size=1 style="margin: 3px 0">`,
|
||||||
`车站名称: ${station.name}<br>`,
|
`车站名称: ${station.name}<br>`,
|
||||||
`车站公里标: ${station.kmRange} km <br>`,
|
`车站公里标: ${station.kmRange} km <br>`,
|
||||||
`到站时间: ${timeFormat(param.data[0] + this.PlanConvert.TranslationTime)} (${param.data[0]})<br>`
|
`到站时间: ${timeFormat(param.data[0] + this.planConvert.TranslationTime)} (${param.data[0]})<br>`
|
||||||
].join('');
|
].join('');
|
||||||
},
|
},
|
||||||
mouseClick(params) {
|
mouseClick(params) {
|
||||||
@ -559,7 +573,7 @@ export default {
|
|||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
#PlanSchedule {
|
#PlanSchedule {
|
||||||
z-index: 5;
|
z-index: 0;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ export default {
|
|||||||
type: 'warning',
|
type: 'warning',
|
||||||
handleClick: this.handleEfficacy,
|
handleClick: this.handleEfficacy,
|
||||||
showControl: (row) => {
|
showControl: (row) => {
|
||||||
return (this.$route.query.lessonId ? row.creatorId == this.userId : true) && row.status == 1;
|
return !this.$route.query.lessonId && row.status == 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -155,7 +155,7 @@ export default {
|
|||||||
type: 'warning',
|
type: 'warning',
|
||||||
handleClick: this.handleDelete,
|
handleClick: this.handleDelete,
|
||||||
showControl: (row) => {
|
showControl: (row) => {
|
||||||
return this.$route.query.lessonId && row.status == 1;
|
return this.$route.query.lessonId && row.status == 1 && row.creatorId == this.userId;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -221,6 +221,7 @@ export default {
|
|||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
if (this.$route.query.lessonId) {
|
if (this.$route.query.lessonId) {
|
||||||
params.lessonId = this.$route.query.lessonId;
|
params.lessonId = this.$route.query.lessonId;
|
||||||
|
params.status = '1';
|
||||||
}
|
}
|
||||||
return getExamList(params);
|
return getExamList(params);
|
||||||
},
|
},
|
||||||
|
@ -6,8 +6,7 @@
|
|||||||
<p style="margin-top: 2px;font-size: 15px;">综合实训管理者: {{ roomInfo.creator }}</p>
|
<p style="margin-top: 2px;font-size: 15px;">综合实训管理者: {{ roomInfo.creator }}</p>
|
||||||
<p class="roomName">综合演练室</p>
|
<p class="roomName">综合演练室</p>
|
||||||
<div style="padding-right: 30px;">
|
<div style="padding-right: 30px;">
|
||||||
<p class="num">可分配角色数量: {{ roomInfo.permissionNum - 1 }}</p>
|
<p class="num">可分配角色数量: {{ permissionRest }} / {{ roomInfo.permissionNum - 1 }}</p>
|
||||||
<!-- <p class="num">剩余可分配角色数量: {{roomInfo.permissionNum - num}}</p> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 聊天窗口 -->
|
<!-- 聊天窗口 -->
|
||||||
@ -16,7 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 参与人员 -->
|
<!-- 参与人员 -->
|
||||||
<div class="personnel">
|
<div class="personnel">
|
||||||
<div style="height: calc(100% - 20px); overflow-y: scroll;">
|
<div style="height: calc(100% - 20px); overflow-y: scroll; padding: 0px 30px;">
|
||||||
<div style="display: flex; justify-content: space-between;">
|
<div style="display: flex; justify-content: space-between;">
|
||||||
<div class="Scheduling">
|
<div class="Scheduling">
|
||||||
<p class="title">调度员</p>
|
<p class="title">调度员</p>
|
||||||
@ -34,7 +33,7 @@
|
|||||||
<el-button icon="el-icon-plus" circle plain @click="addingRoles('dispatch', '增加调度人员')" />
|
<el-button icon="el-icon-plus" circle plain @click="addingRoles('dispatch', '增加调度人员')" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="Scheduling bottomNone">
|
<div class="Scheduling">
|
||||||
<p class="title">车站值班员</p>
|
<p class="title">车站值班员</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="(nor, index) in equipmentList" :key="index" class="selectPerson">
|
<li v-for="(nor, index) in equipmentList" :key="index" class="selectPerson">
|
||||||
@ -42,7 +41,7 @@
|
|||||||
<i
|
<i
|
||||||
v-if="userId == roomInfo.creatorId"
|
v-if="userId == roomInfo.creatorId"
|
||||||
class="el-icon-close delPerson"
|
class="el-icon-close delPerson"
|
||||||
@click="handleDelEquipment(nor, index)"
|
@click="handleDelUserForStation(nor, index, stationListForEquipment, equipmentList)"
|
||||||
/>
|
/>
|
||||||
<div style="float: right; margin-right: 15px;">
|
<div style="float: right; margin-right: 15px;">
|
||||||
<el-select
|
<el-select
|
||||||
@ -50,10 +49,10 @@
|
|||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
size="mini"
|
size="mini"
|
||||||
:disabled="userId != roomInfo.creatorId"
|
:disabled="userId != roomInfo.creatorId"
|
||||||
@change="changeEquipment(nor)"
|
@change="handleChangeUser(nor, 'Attendant', stationListForEquipment, equipmentList)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stationList"
|
v-for="item in stationListForEquipment"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
@ -108,7 +107,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex; justify-content: space-between;">
|
<div style="display: flex; justify-content: space-between;">
|
||||||
<div class="Scheduling bottomNone">
|
<div class="Scheduling">
|
||||||
<p class="title">司机</p>
|
<p class="title">司机</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="(nor, index) in driverList" :key="index" class="selectPerson">
|
<li v-for="(nor, index) in driverList" :key="index" class="selectPerson">
|
||||||
@ -124,7 +123,7 @@
|
|||||||
<el-button icon="el-icon-plus" circle plain @click="addingRoles('driver', '增加司机')" />
|
<el-button icon="el-icon-plus" circle plain @click="addingRoles('driver', '增加司机')" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="Scheduling bottomNone">
|
<div class="Scheduling">
|
||||||
<p class="title">IBP</p>
|
<p class="title">IBP</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="(nor, index) in ibpList" :key="index" class="selectPerson">
|
<li v-for="(nor, index) in ibpList" :key="index" class="selectPerson">
|
||||||
@ -132,62 +131,102 @@
|
|||||||
<i
|
<i
|
||||||
v-if="userId == roomInfo.creatorId"
|
v-if="userId == roomInfo.creatorId"
|
||||||
class="el-icon-close delPerson"
|
class="el-icon-close delPerson"
|
||||||
@click="handleDelUser(ibpList, nor, index)"
|
@click="handleDelUserForStation(nor, index, stationListForIBP, ibpList)"
|
||||||
|
/>
|
||||||
|
<div style="float: right; margin-right: 15px;">
|
||||||
|
<el-select
|
||||||
|
v-model="nor.deviceCode"
|
||||||
|
placeholder="请选择"
|
||||||
|
size="mini"
|
||||||
|
:disabled="userId != roomInfo.creatorId"
|
||||||
|
@change="handleChangeUser(nor, 'IBP', stationListForIBP, ibpList)"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in stationListForIBP"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code"
|
||||||
|
:disabled="item.disabled"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div v-if="userId == roomInfo.creatorId" class="add-box">
|
||||||
|
<el-button
|
||||||
|
icon="el-icon-plus"
|
||||||
|
circle
|
||||||
|
plain
|
||||||
|
@click="addingRoles('ibp', '增加IBP')"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; justify-content: space-between;">
|
||||||
|
<div class="Scheduling">
|
||||||
|
<p class="title">大屏</p>
|
||||||
|
<ul>
|
||||||
|
<li v-for="(nor, index) in bigScreenList" :key="index" class="selectPerson">
|
||||||
|
<span>{{ nor.nickName }}</span>
|
||||||
|
<i
|
||||||
|
v-if="userId == roomInfo.creatorId"
|
||||||
|
class="el-icon-close delPerson"
|
||||||
|
@click="handleDelUser(bigScreenList, nor, index)"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div v-if="userId == roomInfo.creatorId" class="add-box">
|
<div v-if="userId == roomInfo.creatorId" class="add-box">
|
||||||
<el-button icon="el-icon-plus" circle plain @click="addingRoles('ibp', '增加IBP')" />
|
<el-button icon="el-icon-plus" circle plain @click="addingRoles('bigScreen', '增加大屏')" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="start-box">
|
</div>
|
||||||
<div v-if="!starting" style="float: right; margin-left: 10px;">
|
<div class="start-box">
|
||||||
<el-button
|
<template v-if="!starting">
|
||||||
v-if="userId == roomInfo.creatorId"
|
|
||||||
type="primary"
|
|
||||||
style="float: right;"
|
|
||||||
:loading="loading"
|
|
||||||
@click="start"
|
|
||||||
>
|
|
||||||
开始仿真</el-button>
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
style="float: right; margin-right: 10px;"
|
|
||||||
:loading="loading"
|
|
||||||
@click="joinJointTrain"
|
|
||||||
>
|
|
||||||
进入仿真</el-button>
|
|
||||||
<el-button
|
|
||||||
v-if="userId == roomInfo.creatorId"
|
|
||||||
type=""
|
|
||||||
style="float: right; margin-right: 10px;"
|
|
||||||
:loading="loading"
|
|
||||||
@click="stop"
|
|
||||||
>
|
|
||||||
结束仿真</el-button>
|
|
||||||
</div>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="userId == roomInfo.creatorId"
|
v-if="userId == roomInfo.creatorId"
|
||||||
type=""
|
style="margin-left: 10px"
|
||||||
style="float: right; margin-right: 0px;"
|
type="primary"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@click="postCode"
|
@click="start"
|
||||||
>生成二维码
|
>
|
||||||
</el-button>
|
开始仿真</el-button>
|
||||||
<el-button type="" style="float: right; margin-right: 10px;" @click="backRoom">返回
|
</template>
|
||||||
</el-button>
|
<template v-else>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
style="margin-left: 10px"
|
||||||
|
:loading="loading"
|
||||||
|
@click="joinJointTrain"
|
||||||
|
>
|
||||||
|
进入仿真</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="userId == roomInfo.creatorId"
|
v-if="userId == roomInfo.creatorId"
|
||||||
type="danger"
|
style="margin-left: 10px"
|
||||||
style="float: right; margin-right: 0px;"
|
type="warning"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@click="exit"
|
@click="stop"
|
||||||
>销毁房间
|
>
|
||||||
</el-button>
|
结束仿真</el-button>
|
||||||
</div>
|
</template>
|
||||||
|
<el-button
|
||||||
|
v-if="userId == roomInfo.creatorId"
|
||||||
|
style="margin-left: 10px"
|
||||||
|
type="success"
|
||||||
|
:loading="loading"
|
||||||
|
@click="postCode"
|
||||||
|
>生成二维码
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="userId == roomInfo.creatorId"
|
||||||
|
style="margin-left: 10px"
|
||||||
|
type="danger"
|
||||||
|
:loading="loading"
|
||||||
|
@click="exit"
|
||||||
|
>销毁房间
|
||||||
|
</el-button>
|
||||||
|
<el-button type="" @click="backRoom">返回
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -244,13 +283,14 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
userId: '',
|
userId: '',
|
||||||
|
permissionRest: 0,
|
||||||
roomInfo: {
|
roomInfo: {
|
||||||
creator: '',
|
creator: '',
|
||||||
totalNum: '',
|
totalNum: '',
|
||||||
creatorId: '',
|
creatorId: '',
|
||||||
group: '',
|
group: '',
|
||||||
audienceNum: '',
|
audienceNum: 0,
|
||||||
permissionNum: ''
|
permissionNum: 0
|
||||||
},
|
},
|
||||||
filterText: '',
|
filterText: '',
|
||||||
isShow: false,
|
isShow: false,
|
||||||
@ -264,7 +304,8 @@ export default {
|
|||||||
adminList: [],
|
adminList: [],
|
||||||
driverList: [],
|
driverList: [],
|
||||||
signalList: [],
|
signalList: [],
|
||||||
stationList: [], // 车站列表
|
bigScreenList: [],
|
||||||
|
stationList: [],
|
||||||
ibpList: [],
|
ibpList: [],
|
||||||
point: {
|
point: {
|
||||||
x: 0,
|
x: 0,
|
||||||
@ -274,51 +315,72 @@ export default {
|
|||||||
timeDemon: null,
|
timeDemon: null,
|
||||||
starting: false,
|
starting: false,
|
||||||
mapId: '',
|
mapId: '',
|
||||||
num: 0,
|
|
||||||
loading: false
|
loading: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
height() {
|
height() {
|
||||||
return this.$store.state.app.height - 95;
|
return this.$store.state.app.height - 95;
|
||||||
|
},
|
||||||
|
stationListForEquipment() {
|
||||||
|
return this.stationList.filter(elem => { return elem.centralized; }).map(item => {
|
||||||
|
const elem = { code: item.code, name: item.name, disabled: false };
|
||||||
|
this.equipmentList.forEach(nor => {
|
||||||
|
if (elem.code == nor.deviceCode) {
|
||||||
|
elem.disabled = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return elem;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
stationListForIBP() {
|
||||||
|
return this.stationList.map(item => {
|
||||||
|
const elem = { code: item.code, name: item.name, disabled: false };
|
||||||
|
this.ibpList.forEach(nor => {
|
||||||
|
if (elem.code == nor.deviceCode) {
|
||||||
|
elem.disabled = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return elem;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
filterText(val) {
|
filterText(val) {
|
||||||
this.$refs.trainingTree.filter(val);
|
this.$refs.trainingTree.filter(val);
|
||||||
},
|
},
|
||||||
'$store.state.socket.roleInfo': function (val) {
|
'$store.state.socket.roleInfo': async function (val) {
|
||||||
if (val.length) { // 分配角色信息
|
if (val.length) { // 分配角色信息
|
||||||
this.addrolesList(val);
|
await this.addrolesList(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.socket.jointRoomInfo': function (val) {
|
'$store.state.socket.jointRoomInfo': async function (val) {
|
||||||
if (val.creatorId) { // 房间消息
|
if (val.creatorId) { // 房间消息
|
||||||
this.handleRoomInfo(val);
|
await this.handleRoomInfo(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.socket.userRoomKickOut': function (val) {
|
'$store.state.socket.userPermit': async function (val) {
|
||||||
if (val.id) { // 用户被踢出信息
|
if (val.id) { // 用户扫码信息
|
||||||
val.state = '03';
|
|
||||||
this.addPeopleList(val);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'$store.state.socket.userPermit': function (val) {
|
|
||||||
if (val.id) { // 用户扫码信息
|
|
||||||
val.state = '01';
|
val.state = '01';
|
||||||
this.addPeopleList(val);
|
await this.addPeopleList(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.socket.userInRoom': function (val) {
|
'$store.state.socket.userRoomKickOut': async function (val) {
|
||||||
if (val.id) { // 用户从外部进入房间消息
|
if (val.id) { // 用户被踢出信息
|
||||||
val.state = '02';
|
val.state = '03';
|
||||||
this.addPeopleList(val);
|
await this.addPeopleList(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.socket.userOutRoom': function (val) {
|
'$store.state.socket.userInRoom': async function (val) {
|
||||||
if (val.id) { // 用户退出房间消息
|
if (val.id) { // 用户从外部进入房间消息
|
||||||
val.state = '02';
|
val.state = '02';
|
||||||
this.addPeopleList(val);
|
await this.addPeopleList(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'$store.state.socket.userOutRoom': async function (val) {
|
||||||
|
if (val.id) { // 用户退出房间消息
|
||||||
|
val.state = '02';
|
||||||
|
await this.addPeopleList(val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -336,6 +398,18 @@ export default {
|
|||||||
}, 5000 * 60);
|
}, 5000 * 60);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
computePermissionRest() {
|
||||||
|
this.permissionRest = this.roomInfo.permissionNum > 0
|
||||||
|
?this.roomInfo.permissionNum - [
|
||||||
|
...this.adminList,
|
||||||
|
...this.dispatchList,
|
||||||
|
...this.equipmentList,
|
||||||
|
...this.driverList,
|
||||||
|
...this.signalList,
|
||||||
|
...this.ibpList,
|
||||||
|
...this.bigScreenList
|
||||||
|
].length - 1: 0;
|
||||||
|
},
|
||||||
filterNode(value, data) {
|
filterNode(value, data) {
|
||||||
if (!value) return true;
|
if (!value) return true;
|
||||||
return data.name.indexOf(value) !== -1;
|
return data.name.indexOf(value) !== -1;
|
||||||
@ -349,6 +423,7 @@ export default {
|
|||||||
roomName: data.roomName,
|
roomName: data.roomName,
|
||||||
state: data.state
|
state: data.state
|
||||||
};
|
};
|
||||||
|
|
||||||
if (data.state == '03') { // 房间销毁
|
if (data.state == '03') { // 房间销毁
|
||||||
this.$router.push({ path: `/demonstration/detail/${param.mapId}` });
|
this.$router.push({ path: `/demonstration/detail/${param.mapId}` });
|
||||||
} else if (data.state == '01') { // 进入准备中
|
} else if (data.state == '01') { // 进入准备中
|
||||||
@ -414,6 +489,7 @@ export default {
|
|||||||
this.addrolesList(arr); // 删除角色信息
|
this.addrolesList(arr); // 删除角色信息
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.computePermissionRest();
|
||||||
},
|
},
|
||||||
// 分配角色
|
// 分配角色
|
||||||
addrolesList(list) {
|
addrolesList(list) {
|
||||||
@ -421,74 +497,75 @@ export default {
|
|||||||
switch (item.userRole) {
|
switch (item.userRole) {
|
||||||
case 'Instructor':
|
case 'Instructor':
|
||||||
this.adminList.push(item);
|
this.adminList.push(item);
|
||||||
this.num++;
|
|
||||||
break;
|
break;
|
||||||
case 'Dispatcher':
|
case 'Dispatcher':
|
||||||
this.dispatchList.push(item);
|
this.dispatchList.push(item);
|
||||||
this.num++;
|
|
||||||
break;
|
break;
|
||||||
case 'Attendant':
|
case 'Attendant':
|
||||||
this.equipmentList.forEach((nor, index) => {
|
this.equipmentList.forEach((nor, index) => {
|
||||||
if (nor.id == item.id) { // 修改状态
|
if (nor.id == item.id) {
|
||||||
this.equipmentList.splice(index, 1);
|
this.equipmentList.splice(index, 1);
|
||||||
this.num--;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.equipmentList.push(item); // 新增
|
this.equipmentList.push(item);
|
||||||
this.num++;
|
|
||||||
break;
|
break;
|
||||||
case 'Driver':
|
case 'Driver':
|
||||||
this.driverList.push(item);
|
this.driverList.push(item);
|
||||||
this.num++;
|
|
||||||
break;
|
break;
|
||||||
case 'Repair':
|
case 'Repair':
|
||||||
this.signalList.push(item);
|
this.signalList.push(item);
|
||||||
this.num++;
|
|
||||||
break;
|
break;
|
||||||
case 'IBP':
|
case 'IBP':
|
||||||
|
this.ibpList.forEach((nor, index) => {
|
||||||
|
if (nor.id == item.id) {
|
||||||
|
this.ibpList.splice(index, 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
this.ibpList.push(item);
|
this.ibpList.push(item);
|
||||||
this.num++;
|
break;
|
||||||
|
case 'BigScreen':
|
||||||
|
this.bigScreenList.push(item);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this.dispatchList.forEach((nor, index) => {
|
this.dispatchList.forEach((nor, index) => {
|
||||||
if (item.id == nor.id) {
|
if (item.id == nor.id) {
|
||||||
this.dispatchList.splice(index, 1);
|
this.dispatchList.splice(index, 1);
|
||||||
this.num--;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.equipmentList.forEach((nor, index) => {
|
this.equipmentList.forEach((nor, index) => {
|
||||||
if (item.id == nor.id) {
|
if (item.id == nor.id) {
|
||||||
this.equipmentList.splice(index, 1);
|
this.equipmentList.splice(index, 1);
|
||||||
this.num--;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.adminList.forEach((nor, index) => {
|
this.adminList.forEach((nor, index) => {
|
||||||
if (item.id == nor.id) {
|
if (item.id == nor.id) {
|
||||||
this.adminList.splice(index, 1);
|
this.adminList.splice(index, 1);
|
||||||
this.num--;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.driverList.forEach((nor, index) => {
|
this.driverList.forEach((nor, index) => {
|
||||||
if (item.id == nor.id) {
|
if (item.id == nor.id) {
|
||||||
this.driverList.splice(index, 1);
|
this.driverList.splice(index, 1);
|
||||||
this.num--;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.signalList.forEach((nor, index) => {
|
this.signalList.forEach((nor, index) => {
|
||||||
if (item.id == nor.id) {
|
if (item.id == nor.id) {
|
||||||
this.signalList.splice(index, 1);
|
this.signalList.splice(index, 1);
|
||||||
this.num--;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.ibpList.forEach((nor, index) => {
|
this.ibpList.forEach((nor, index) => {
|
||||||
if (item.id == nor.id) {
|
if (item.id == nor.id) {
|
||||||
this.ibpList.splice(index, 1);
|
this.ibpList.splice(index, 1);
|
||||||
this.num--;
|
}
|
||||||
|
});
|
||||||
|
this.bigScreenList.forEach((nor, index) => {
|
||||||
|
if (item.id == nor.id) {
|
||||||
|
this.bigScreenList.splice(index, 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.computePermissionRest();
|
||||||
},
|
},
|
||||||
async getRoomInfo() {
|
async getRoomInfo() {
|
||||||
// 获取房间信息 创建人和权限总数
|
// 获取房间信息 创建人和权限总数
|
||||||
@ -507,23 +584,11 @@ export default {
|
|||||||
|
|
||||||
// 获取设备集中站
|
// 获取设备集中站
|
||||||
const resp = await getStationList(res.data.mapId);
|
const resp = await getStationList(res.data.mapId);
|
||||||
resp.data.forEach(item => {
|
this.stationList = resp.data;
|
||||||
if (item.centralized) {
|
this.computePermissionRest();
|
||||||
this.stationList.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.stationList.forEach(item => {
|
|
||||||
item.disabled = false;
|
|
||||||
this.equipmentList.forEach(nor => {
|
|
||||||
if (item.code == nor.deviceCode) {
|
|
||||||
item.disabled = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 获取观众席list 分配角色 Admin 管理员 Instructor 教员 Dispatcher 行调 Attendant 车站 Audience 观众 Driver 司机 Repair 通号 IBP IBP盘
|
// 获取观众席list 分配角色 Admin 管理员 Instructor 教员 Dispatcher 行调 Attendant 车站 Audience 观众 Driver 司机 Repair 通号 IBP IBP盘
|
||||||
async getUserList() {
|
async getUserList() {
|
||||||
this.num = 0;
|
|
||||||
this.dispatchList = [];
|
this.dispatchList = [];
|
||||||
this.equipmentList = [];
|
this.equipmentList = [];
|
||||||
this.adminList = [];
|
this.adminList = [];
|
||||||
@ -535,7 +600,6 @@ export default {
|
|||||||
if (item.id == this.userId) {
|
if (item.id == this.userId) {
|
||||||
item.disabled = true;
|
item.disabled = true;
|
||||||
}
|
}
|
||||||
if (item.userRole != 'Audience' && item.userRole != '') this.num++;
|
|
||||||
switch (item.userRole) {
|
switch (item.userRole) {
|
||||||
case 'Instructor':
|
case 'Instructor':
|
||||||
item.select = true;
|
item.select = true;
|
||||||
@ -561,9 +625,14 @@ export default {
|
|||||||
item.select = true;
|
item.select = true;
|
||||||
this.ibpList.push(item);
|
this.ibpList.push(item);
|
||||||
break;
|
break;
|
||||||
|
case 'BigScreen':
|
||||||
|
item.select = true;
|
||||||
|
this.bigScreenList.push(item);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
this.treeData.push(item);
|
this.treeData.push(item);
|
||||||
});
|
});
|
||||||
|
this.computePermissionRest();
|
||||||
},
|
},
|
||||||
async postCode() {
|
async postCode() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -636,24 +705,6 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置所属集中站信息
|
|
||||||
changeEquipment(val) {
|
|
||||||
const params = [{
|
|
||||||
id: val.id,
|
|
||||||
nickName: val.nickName,
|
|
||||||
userRole: 'Attendant',
|
|
||||||
deviceCode: val.deviceCode
|
|
||||||
}];
|
|
||||||
putUserRoles(params, this.$route.query.group);
|
|
||||||
this.stationList.forEach(item => {
|
|
||||||
item.disabled = false;
|
|
||||||
this.equipmentList.forEach(nor => {
|
|
||||||
if (item.code == nor.deviceCode) {
|
|
||||||
item.disabled = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 打开弹窗
|
// 打开弹窗
|
||||||
addingRoles(name, title) {
|
addingRoles(name, title) {
|
||||||
this.listName = name;
|
this.listName = name;
|
||||||
@ -676,24 +727,27 @@ export default {
|
|||||||
userRole: ''
|
userRole: ''
|
||||||
};
|
};
|
||||||
switch (this.listName) {
|
switch (this.listName) {
|
||||||
case 'admin': // 教员
|
case 'admin': // 教员
|
||||||
params.userRole = 'Instructor';
|
params.userRole = 'Instructor';
|
||||||
break;
|
break;
|
||||||
case 'dispatch': // 调度员
|
case 'dispatch': // 调度员
|
||||||
params.userRole = 'Dispatcher';
|
params.userRole = 'Dispatcher';
|
||||||
break;
|
break;
|
||||||
case 'equipment': // 车站值班员
|
case 'equipment': // 车站值班员
|
||||||
params.userRole = 'Attendant';
|
params.userRole = 'Attendant';
|
||||||
break;
|
break;
|
||||||
case 'driver': // 司机
|
case 'driver': // 司机
|
||||||
params.userRole = 'Driver';
|
params.userRole = 'Driver';
|
||||||
break;
|
break;
|
||||||
case 'signal': // 通号
|
case 'signal': // 通号
|
||||||
params.userRole = 'Repair';
|
params.userRole = 'Repair';
|
||||||
break;
|
break;
|
||||||
case 'ibp': // IBP
|
case 'ibp': // IBP
|
||||||
params.userRole = 'IBP';
|
params.userRole = 'IBP';
|
||||||
break;
|
break;
|
||||||
|
case 'bigScreen': // 大屏
|
||||||
|
params.userRole = 'BigScreen';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
arr.push(params);
|
arr.push(params);
|
||||||
});
|
});
|
||||||
@ -712,7 +766,7 @@ export default {
|
|||||||
this.messageInfo('分配角色数量已超过可分配角色总数!', 'error');
|
this.messageInfo('分配角色数量已超过可分配角色总数!', 'error');
|
||||||
}
|
}
|
||||||
this.treeData.forEach(item => {
|
this.treeData.forEach(item => {
|
||||||
if (item.userRole == '' || item.userRole == 'Audience') {
|
if (item.userRole == '' || item.userRole == 'Audience' || item.userRole == 'IBP') {
|
||||||
item.select = false;
|
item.select = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -728,15 +782,32 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleChangeUser(val, role, stationList, list) {
|
||||||
|
const params = [{
|
||||||
|
id: val.id,
|
||||||
|
nickName: val.nickName,
|
||||||
|
userRole: role,
|
||||||
|
deviceCode: val.deviceCode
|
||||||
|
}];
|
||||||
|
putUserRoles(params, this.$route.query.group);
|
||||||
|
stationList.forEach(item => {
|
||||||
|
item.disabled = false;
|
||||||
|
list.forEach(nor => {
|
||||||
|
if (item.code == nor.deviceCode) {
|
||||||
|
item.disabled = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
handleDelUser(list, item, index) {
|
handleDelUser(list, item, index) {
|
||||||
list.splice(index, 1);
|
list.splice(index, 1);
|
||||||
this.handleProperty(item);
|
this.handleProperty(item);
|
||||||
},
|
},
|
||||||
handleDelEquipment(item, index) {
|
handleDelUserForStation(item, index, stationList, list) {
|
||||||
this.equipmentList.splice(index, 1);
|
list.splice(index, 1);
|
||||||
this.stationList.forEach(item => {
|
stationList.forEach(item => {
|
||||||
item.disabled = false;
|
item.disabled = false;
|
||||||
this.equipmentList.forEach(nor => {
|
list.forEach(nor => {
|
||||||
if (item.code == nor.deviceCode) {
|
if (item.code == nor.deviceCode) {
|
||||||
item.disabled = true;
|
item.disabled = true;
|
||||||
}
|
}
|
||||||
@ -744,10 +815,9 @@ export default {
|
|||||||
});
|
});
|
||||||
this.handleProperty(item);
|
this.handleProperty(item);
|
||||||
},
|
},
|
||||||
handleProperty(item) {
|
handleProperty(item, role) {
|
||||||
const treeIndex = this.treeData.findIndex(nor => nor.id == item.id);
|
const treeIndex = this.treeData.findIndex(nor => nor.id == item.id);
|
||||||
if (treeIndex > -1) {
|
if (treeIndex > -1) {
|
||||||
this.num--;
|
|
||||||
this.treeData[treeIndex]['select'] = false;
|
this.treeData[treeIndex]['select'] = false;
|
||||||
this.treeData[treeIndex].userRole = 'Audience';
|
this.treeData[treeIndex].userRole = 'Audience';
|
||||||
}
|
}
|
||||||
@ -851,15 +921,14 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.personnel {
|
.personnel {
|
||||||
padding: 0px 20px;
|
|
||||||
width: calc(100% - 500px);
|
width: calc(100% - 500px);
|
||||||
height: calc(100% - 60px);
|
height: calc(100% - 120px);
|
||||||
float: left;
|
float: left;
|
||||||
|
|
||||||
.Scheduling {
|
.Scheduling {
|
||||||
width: calc(50% - 10px);
|
width: calc(50% - 10px);
|
||||||
float: left;
|
float: left;
|
||||||
height: 250px;
|
height: 240px;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
@ -880,10 +949,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottomNone {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.selectPerson {
|
.selectPerson {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
@ -905,9 +970,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.start-box {
|
.start-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 40px;
|
display: flex;
|
||||||
margin-top: 20px;
|
justify-content: center;
|
||||||
|
background: #f1f1f1;
|
||||||
|
padding: 20px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 1325px) {
|
@media screen and (max-width: 1325px) {
|
||||||
|
Loading…
Reference in New Issue
Block a user