Merge remote-tracking branch 'remotes/origin/dev' into test
# Conflicts: # src/utils/baseUrl.js
@ -27,18 +27,10 @@ export function getPermissonDetail(id) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取权限list*/
|
|
||||||
export function getPermissonList() {
|
|
||||||
return request({
|
|
||||||
url: `/api/permission/list`,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 获取用户某课程某段时间内可用的权限数量*/
|
/** 获取用户某课程某段时间内可用的权限数量*/
|
||||||
export function getTotalRemains(params) {
|
export function getTotalRemains(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/permission/totalRemains',
|
url: '/api/userPermission/totalRemains',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: params
|
params: params
|
||||||
});
|
});
|
||||||
@ -46,7 +38,7 @@ export function getTotalRemains(params) {
|
|||||||
/** 设置权限失效或有效*/
|
/** 设置权限失效或有效*/
|
||||||
export function setLessonPermisson(data) {
|
export function setLessonPermisson(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/permission/${data.id}/status`,
|
url: `/api/userPermission/${data.id}/status`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -57,7 +49,7 @@ export function setLessonPermisson(data) {
|
|||||||
*/
|
*/
|
||||||
export function queryPermissionSimulation(data) {
|
export function queryPermissionSimulation(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/permission/${data.mapId}/${data.prdCode}/simulation`,
|
url: `/api/userPermission/${data.mapId}/${data.prdCode}/simulation`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -65,38 +57,28 @@ export function queryPermissionSimulation(data) {
|
|||||||
/** 获取大屏权限列表*/
|
/** 获取大屏权限列表*/
|
||||||
export function queryPermissionScreen() {
|
export function queryPermissionScreen() {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/permission/bigScreen`,
|
url: `/api/userPermission/bigScreen`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 更新课程权限*/
|
|
||||||
/*
|
|
||||||
export function updateLessonPermisson(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/permission',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** 删除课程权限*/
|
|
||||||
/*
|
|
||||||
export function deleteLessonPermisson(id) {
|
|
||||||
return request({
|
|
||||||
url: '/api/permission/' + id,
|
|
||||||
method: 'delete'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户权限列表
|
* 用户权限列表
|
||||||
*/
|
*/
|
||||||
|
export function listPermision(params) {
|
||||||
|
return request({
|
||||||
|
url: `/api/userPermission`,
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个人权限列表
|
||||||
|
*/
|
||||||
export function listUserPermision(params) {
|
export function listUserPermision(params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/permission/my`,
|
url: `/api/userPermission/my`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: params
|
params: params
|
||||||
});
|
});
|
||||||
@ -110,10 +92,10 @@ export function getDistribute(id) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 用户权限列表 */
|
/** 设置权限所有者 */
|
||||||
export function putPermissionOwner(data) {
|
export function putPermissionOwner(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/permission/${data.id}/owner`,
|
url: `/api/userPermission/${data.id}/owner`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data.owner
|
data: data.owner
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
|
||||||
/** 上课权限获取*/
|
/** 权限转增*/
|
||||||
export function getLessons(data) {
|
export function getLessons(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/distribute/getLessons',
|
url: '/api/distribute/getLessons',
|
||||||
@ -9,15 +9,41 @@ export function getLessons(data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 上课权限分发*/
|
/** 权限分发*/
|
||||||
export function giveLessons(data) {
|
export function giveLessons(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/distribute/givePermission',
|
url: '/api/distribute/distribute',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 权限转增*/
|
||||||
|
export function permissionTurnAdd(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/distribute/transfer',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 从订单分发权限(获取二维码)*/
|
||||||
|
export function postDistribute(data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/distribute/${data.code}/distribute`,
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 权限获取*/
|
||||||
|
export function getPermission(state) {
|
||||||
|
return request({
|
||||||
|
url: `/api/distribute/getPermission?state=${state}`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 接收课程权限*/
|
/** 接收课程权限*/
|
||||||
export function receiveLessons(data) {
|
export function receiveLessons(data) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -15,3 +15,32 @@ export function generateScheduling(group, params) {
|
|||||||
params
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getSchedulingAllTrains(group) {
|
||||||
|
return request({
|
||||||
|
url: `/api/scheduling/${group}/train/all`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function checkScheduling(group) {
|
||||||
|
return request({
|
||||||
|
url: `/api/scheduling/${group}/check`,
|
||||||
|
method: 'post'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveScheduling(group, data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/scheduling/${group}/save`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function generateSchedulingAgain(group) {
|
||||||
|
return request({
|
||||||
|
url: `/api/scheduling/${group}/rebuild`,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 14 MiB After Width: | Height: | Size: 13 MiB |
BIN
src/assets/ibp_images/key.png
Normal file
After Width: | Height: | Size: 133 KiB |
BIN
src/assets/ibp_images/key_on.png
Normal file
After Width: | Height: | Size: 138 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 13 KiB |
@ -63,8 +63,7 @@
|
|||||||
:sortable="column.sortable"
|
:sortable="column.sortable"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag :type="column.tagType(scope.row, scope.$index)">{{ column.columnValue(scope.row,
|
<el-tag v-if="column.columnValue(scope.row, scope.$index)" :type="column.tagType(scope.row, scope.$index)">{{ column.columnValue(scope.row, scope.$index) }}</el-tag>
|
||||||
scope.$index) }}</el-tag>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -10,7 +10,7 @@ export default {
|
|||||||
permissionStatus: '权限状态',
|
permissionStatus: '权限状态',
|
||||||
permissionUseType: '公用/专用',
|
permissionUseType: '公用/专用',
|
||||||
permissionTotal: '权限总数',
|
permissionTotal: '权限总数',
|
||||||
permissionRemains: '生于权限',
|
permissionRemains: '剩余权限',
|
||||||
isForever: '是否永久',
|
isForever: '是否永久',
|
||||||
startTime: '开始时间',
|
startTime: '开始时间',
|
||||||
endTime: '结束时间',
|
endTime: '结束时间',
|
||||||
|
@ -28,6 +28,7 @@ export default {
|
|||||||
replayManage: '回放管理',
|
replayManage: '回放管理',
|
||||||
|
|
||||||
permissionManage: '权限管理',
|
permissionManage: '权限管理',
|
||||||
|
selfPermission: '我的权限',
|
||||||
|
|
||||||
pulishManage: '发布内容管理',
|
pulishManage: '发布内容管理',
|
||||||
publishMapManage: '发布地图管理',
|
publishMapManage: '发布地图管理',
|
||||||
|
@ -29,7 +29,7 @@ deviceRender[deviceType.RotatingButton] = {
|
|||||||
|
|
||||||
/** TipBox渲染配置*/
|
/** TipBox渲染配置*/
|
||||||
deviceRender[deviceType.TipBox] = {
|
deviceRender[deviceType.TipBox] = {
|
||||||
zlevel: 2
|
zlevel: 1
|
||||||
};
|
};
|
||||||
|
|
||||||
/** BackGround渲染配置*/
|
/** BackGround渲染配置*/
|
||||||
@ -57,4 +57,14 @@ deviceRender[deviceType.Elevator] = {
|
|||||||
zlevel: 2
|
zlevel: 2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** Key 渲染配置 */
|
||||||
|
deviceRender[deviceType.Key] = {
|
||||||
|
zlevel: 3
|
||||||
|
};
|
||||||
|
|
||||||
|
/** TeleTerminal 渲染配置 */
|
||||||
|
deviceRender[deviceType.TeleTerminal] = {
|
||||||
|
zlevel: 2
|
||||||
|
};
|
||||||
|
|
||||||
export default deviceRender;
|
export default deviceRender;
|
||||||
|
@ -9,7 +9,9 @@ const deviceType = {
|
|||||||
IbpLine: 'IbpLine',
|
IbpLine: 'IbpLine',
|
||||||
AppendageBox: 'AppendageBox',
|
AppendageBox: 'AppendageBox',
|
||||||
Alarm: 'Alarm',
|
Alarm: 'Alarm',
|
||||||
Elevator: 'Elevator'
|
Elevator: 'Elevator',
|
||||||
|
Key: 'Key',
|
||||||
|
TeleTerminal: 'TeleTerminal'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default deviceType;
|
export default deviceType;
|
||||||
|
@ -223,6 +223,7 @@ class IbpPan {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resize(opt) {
|
resize(opt) {
|
||||||
|
console.log('----------',this.$ibpZr);
|
||||||
this.$ibpZr.resize(opt);
|
this.$ibpZr.resize(opt);
|
||||||
this.$painter.updateZrSize(opt);
|
this.$painter.updateZrSize(opt);
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ export default class alarm extends Group {
|
|||||||
this.zlevel = device.model.zlevel;
|
this.zlevel = device.model.zlevel;
|
||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
|
this.dragging = false;
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,7 +26,7 @@ export default class alarm extends Group {
|
|||||||
x: model.point.x,
|
x: model.point.x,
|
||||||
y: model.point.y,
|
y: model.point.y,
|
||||||
width: model.width,
|
width: model.width,
|
||||||
height: model.height
|
height: model.width/71*74
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.add(this.imageBg);
|
this.add(this.imageBg);
|
||||||
@ -55,6 +56,7 @@ export default class alarm extends Group {
|
|||||||
}
|
}
|
||||||
this.offsetX = e.offsetX;
|
this.offsetX = e.offsetX;
|
||||||
this.offsetY = e.offsetY;
|
this.offsetY = e.offsetY;
|
||||||
|
this.dragging = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
mousemove(e) {
|
mousemove(e) {
|
||||||
@ -62,7 +64,11 @@ export default class alarm extends Group {
|
|||||||
|
|
||||||
mouseup(e) {
|
mouseup(e) {
|
||||||
this.event.enable();
|
this.event.enable();
|
||||||
|
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.draggable = false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ export default class AppendageBox extends Group {
|
|||||||
this.z = device.model.z;
|
this.z = device.model.z;
|
||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
|
this.dragging = false;
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,12 +48,16 @@ export default class AppendageBox extends Group {
|
|||||||
}
|
}
|
||||||
this.offsetX = e.offsetX;
|
this.offsetX = e.offsetX;
|
||||||
this.offsetY = e.offsetY;
|
this.offsetY = e.offsetY;
|
||||||
|
this.dragging = true;
|
||||||
}
|
}
|
||||||
mousemove() {
|
mousemove() {
|
||||||
}
|
}
|
||||||
mouseup(e) {
|
mouseup(e) {
|
||||||
this.event.enable();
|
this.event.enable();
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ class Arrow extends Group {
|
|||||||
this.model = device.model;
|
this.model = device.model;
|
||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
|
this.dragging = false;
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,7 +26,6 @@ class Arrow extends Group {
|
|||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
stroke: model.stroke,
|
stroke: model.stroke,
|
||||||
lineWidth: model.lineWidth,
|
|
||||||
fill: model.fill
|
fill: model.fill
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -81,14 +81,17 @@ class Arrow extends Group {
|
|||||||
}
|
}
|
||||||
this.offsetX = e.offsetX;
|
this.offsetX = e.offsetX;
|
||||||
this.offsetY = e.offsetY;
|
this.offsetY = e.offsetY;
|
||||||
|
this.dragging = true;
|
||||||
}
|
}
|
||||||
mousemove() {
|
mousemove() {
|
||||||
}
|
}
|
||||||
mouseup(e) {
|
mouseup(e) {
|
||||||
this.event.enable();
|
this.event.enable();
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export default Arrow;
|
export default Arrow;
|
||||||
|
@ -12,7 +12,7 @@ export default class background extends Group {
|
|||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
create() {
|
create() {
|
||||||
this.imageBg = new Image({
|
this.imageBg1 = new Image({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
style: {
|
style: {
|
||||||
@ -23,6 +23,17 @@ export default class background extends Group {
|
|||||||
height: 1024
|
height: 1024
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.imageBg2 = new Image({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
style: {
|
||||||
|
x: 2048,
|
||||||
|
y: 0,
|
||||||
|
image: ibpBg,
|
||||||
|
width: 2048,
|
||||||
|
height: 1024
|
||||||
|
}
|
||||||
|
});
|
||||||
this.tailorRect = new Rect({
|
this.tailorRect = new Rect({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
@ -37,7 +48,8 @@ export default class background extends Group {
|
|||||||
}
|
}
|
||||||
tailorBgImage() {
|
tailorBgImage() {
|
||||||
// this.imageBg.setClipPath(this.tailorRect);
|
// this.imageBg.setClipPath(this.tailorRect);
|
||||||
this.add(this.imageBg);
|
this.add(this.imageBg1);
|
||||||
|
this.add(this.imageBg2);
|
||||||
}
|
}
|
||||||
setDraggable() {
|
setDraggable() {
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ export default class button extends Group {
|
|||||||
this.event = device.event;
|
this.event = device.event;
|
||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
|
this.dragging = false;
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
create() {
|
create() {
|
||||||
@ -78,36 +79,36 @@ export default class button extends Group {
|
|||||||
setState(model) {
|
setState(model) {
|
||||||
switch (model.status) {
|
switch (model.status) {
|
||||||
case 'on': {
|
case 'on': {
|
||||||
// 关闭
|
// 开放
|
||||||
this.close();
|
this.open();
|
||||||
this.model.status='on';
|
this.model.status='on';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'off': {
|
case 'off': {
|
||||||
// 开放
|
// 关闭
|
||||||
this.open();
|
this.close();
|
||||||
this.model.status='off';
|
this.model.status='off';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// onclick() {
|
onclick() {
|
||||||
// if (!this.model.draggable) {
|
if (!this.model.draggable) {
|
||||||
// switch (this.model.status) {
|
switch (this.model.status) {
|
||||||
// case 'off': {
|
case 'off': {
|
||||||
// this.open();
|
this.open();
|
||||||
// this.model.status='on';
|
this.model.status='on';
|
||||||
// break;
|
break;
|
||||||
// }
|
}
|
||||||
// case 'on': {
|
case 'on': {
|
||||||
// this.close();
|
this.close();
|
||||||
// this.model.status='off';
|
this.model.status='off';
|
||||||
// break;
|
break;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
mousedown(e) {
|
mousedown(e) {
|
||||||
this.event.disable();
|
this.event.disable();
|
||||||
@ -116,16 +117,18 @@ export default class button extends Group {
|
|||||||
}
|
}
|
||||||
this.offsetX = e.offsetX;
|
this.offsetX = e.offsetX;
|
||||||
this.offsetY = e.offsetY;
|
this.offsetY = e.offsetY;
|
||||||
|
this.dragging = true;
|
||||||
}
|
}
|
||||||
mousemove() {
|
mousemove() {
|
||||||
}
|
}
|
||||||
mouseup(e) {
|
mouseup(e) {
|
||||||
this.event.enable();
|
this.event.enable();
|
||||||
// debugger;
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
// 关闭
|
// 关闭
|
||||||
close() {
|
close() {
|
||||||
const color = button.colors.get(`${this.model.color}_off`);
|
const color = button.colors.get(`${this.model.color}_off`);
|
||||||
|
@ -11,6 +11,7 @@ export default class CircularLamp extends Group {
|
|||||||
this.z = device.model.z;
|
this.z = device.model.z;
|
||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
|
this.dragging = false;
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -18,7 +19,7 @@ export default class CircularLamp extends Group {
|
|||||||
this.lamp = new Circle({
|
this.lamp = new Circle({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
draggable: this.model.draggable||false,
|
draggable: false,
|
||||||
shape: {
|
shape: {
|
||||||
cx: this.model.point.x,
|
cx: this.model.point.x,
|
||||||
cy: this.model.point.y,
|
cy: this.model.point.y,
|
||||||
@ -50,12 +51,15 @@ export default class CircularLamp extends Group {
|
|||||||
}
|
}
|
||||||
this.offsetX = e.offsetX;
|
this.offsetX = e.offsetX;
|
||||||
this.offsetY = e.offsetY;
|
this.offsetY = e.offsetY;
|
||||||
|
this.dragging = true;
|
||||||
}
|
}
|
||||||
mousemove() {
|
mousemove() {
|
||||||
}
|
}
|
||||||
mouseup(e) {
|
mouseup(e) {
|
||||||
this.event.enable();
|
this.event.enable();
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import Group from 'zrender/src/container/Group';
|
import Group from 'zrender/src/container/Group';
|
||||||
import ElevatorBack from './elevatorBack';
|
import ElevatorBack from './elevatorBack';
|
||||||
import ElevatorArrow from './elevatorArrow';
|
import ElevatorArrow from './elevatorArrow';
|
||||||
|
import store from '@/store';
|
||||||
|
|
||||||
export default class elevator extends Group {
|
export default class elevator extends Group {
|
||||||
|
|
||||||
@ -33,8 +34,8 @@ export default class elevator extends Group {
|
|||||||
},
|
},
|
||||||
width: model.width,
|
width: model.width,
|
||||||
height: model.height,
|
height: model.height,
|
||||||
fillColor: model.fillColor ||'#adadad',
|
fillColor: model.fillColor ||'#313131',
|
||||||
stroke: model.fillColor ||'#adadad',
|
stroke: model.fillColor ||'#313131',
|
||||||
lineWidth: 0
|
lineWidth: 0
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -105,6 +106,9 @@ export default class elevator extends Group {
|
|||||||
|
|
||||||
mousedown(e) {
|
mousedown(e) {
|
||||||
this.event.disable();
|
this.event.disable();
|
||||||
|
if (e.which == 3) {
|
||||||
|
store.dispatch('ibp/setUpdateDeviceData', this.model);
|
||||||
|
}
|
||||||
this.draggroup =this.grouper;
|
this.draggroup =this.grouper;
|
||||||
this.deltPostion =[e.event.zrX-this.draggroup.position[0], e.event.zrY-this.draggroup.position[1]];
|
this.deltPostion =[e.event.zrX-this.draggroup.position[0], e.event.zrY-this.draggroup.position[1]];
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ export default class elevatorArrow 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: 3,
|
z: model.z,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
style: {
|
style: {
|
||||||
image: this.getStatus(),
|
image: this.getStatus(),
|
||||||
|
@ -21,12 +21,14 @@ export default class elevatorBack extends Group {
|
|||||||
draggable: false,
|
draggable: false,
|
||||||
// model.draggable ||
|
// model.draggable ||
|
||||||
shape: {
|
shape: {
|
||||||
cx: model.point.x + model.width/6*5,
|
cx: (model.point.x + model.width/6*5).toFixed(2),
|
||||||
cy: model.point.y + model.height/8,
|
cy: (model.point.y + model.height/8).toFixed(2),
|
||||||
r: model.width/6
|
r: (model.width/6).toFixed(2)
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
fill: this.model.fillColor || '#adadad'
|
brushType: 'fill',
|
||||||
|
fill: this.model.fillColor || '#313131',
|
||||||
|
lineWidth: 0
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -35,17 +37,18 @@ export default class elevatorBack extends Group {
|
|||||||
z: model.z,
|
z: model.z,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
shape: {
|
shape: {
|
||||||
points: [[model.point.x+model.width/6, model.point.y + model.height], [model.point.x+model.width/6*2, model.point.y + model.height],
|
points: [[(model.point.x+model.width/6).toFixed(2), (model.point.y + model.height).toFixed(2)], [(model.point.x+model.width/6*2).toFixed(2), model.point.y + model.height],
|
||||||
[model.point.x+model.width/6*5, model.point.y + model.height/8*2],
|
[(model.point.x+model.width/6*5).toFixed(2), (model.point.y + model.height/8*2).toFixed(2)],
|
||||||
[model.point.x+model.width/6*5, model.point.y],
|
[(model.point.x+model.width/6*5).toFixed(2), model.point.y],
|
||||||
[model.point.x+model.width/6*4, model.point.y],
|
[(model.point.x+model.width/6*4).toFixed(2), model.point.y],
|
||||||
[model.point.x+model.width/6, model.point.y + model.height/8*6]
|
[(model.point.x+model.width/6).toFixed(2), (model.point.y + model.height/8*6).toFixed(2)]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
stroke: model.stroke || '#adadad',
|
brushType: 'fill',
|
||||||
lineWidth: model.lineWidth,
|
stroke: model.stroke || '#313131',
|
||||||
fill: model.fillColor || '#adadad'
|
lineWidth: 0,
|
||||||
|
fill: model.fillColor || '#313131'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -55,12 +58,14 @@ export default class elevatorBack extends Group {
|
|||||||
// path: 'M 0 0 Q -70 -50 0 -100 0 -100 L 150 -400 L 200 -400 Q 270 -350 200 -300 200 -300 L 50 0',
|
// path: 'M 0 0 Q -70 -50 0 -100 0 -100 L 150 -400 L 200 -400 Q 270 -350 200 -300 200 -300 L 50 0',
|
||||||
draggable: false,
|
draggable: false,
|
||||||
shape: {
|
shape: {
|
||||||
cx: model.point.x + model.width/6,
|
cx: (model.point.x + model.width/6).toFixed(2),
|
||||||
cy: model.point.y + model.height/8*7,
|
cy: (model.point.y + model.height/8*7).toFixed(2),
|
||||||
r: model.width/6
|
r: (model.width/6).toFixed(2)
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
fill: this.model.fillColor || '#adadad'
|
fill: this.model.fillColor || '#313131',
|
||||||
|
lineWidth: 0,
|
||||||
|
brushType: 'fill'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -10,6 +10,8 @@ import TipBox from './ibpTipBox';
|
|||||||
import AppendageBox from './appendageBox';
|
import AppendageBox from './appendageBox';
|
||||||
import RotatingButton from './rotatingButton';
|
import RotatingButton from './rotatingButton';
|
||||||
import Elevator from './elevator';
|
import Elevator from './elevator';
|
||||||
|
import Key from './key';
|
||||||
|
import TeleTerminal from './teleTerminal';
|
||||||
|
|
||||||
const ibpShape = {};
|
const ibpShape = {};
|
||||||
ibpShape[deviceType.Arrow] = Arrow;
|
ibpShape[deviceType.Arrow] = Arrow;
|
||||||
@ -23,6 +25,8 @@ ibpShape[deviceType.TipBox] = TipBox;
|
|||||||
ibpShape[deviceType.AppendageBox] = AppendageBox;
|
ibpShape[deviceType.AppendageBox] = AppendageBox;
|
||||||
ibpShape[deviceType.RotatingButton] = RotatingButton;
|
ibpShape[deviceType.RotatingButton] = RotatingButton;
|
||||||
ibpShape[deviceType.Elevator] = Elevator;
|
ibpShape[deviceType.Elevator] = Elevator;
|
||||||
|
ibpShape[deviceType.Key] = Key;
|
||||||
|
ibpShape[deviceType.TeleTerminal] = TeleTerminal;
|
||||||
|
|
||||||
function shapefactory(device, ibp) {
|
function shapefactory(device, ibp) {
|
||||||
const type = device.model._type;
|
const type = device.model._type;
|
||||||
|
@ -11,6 +11,7 @@ export default class ibpLine extends Group {
|
|||||||
this.z = device.model.z;
|
this.z = device.model.z;
|
||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
|
this.dragging = false;
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
create() {
|
create() {
|
||||||
@ -48,14 +49,17 @@ export default class ibpLine extends Group {
|
|||||||
}
|
}
|
||||||
this.offsetX = e.offsetX;
|
this.offsetX = e.offsetX;
|
||||||
this.offsetY = e.offsetY;
|
this.offsetY = e.offsetY;
|
||||||
|
this.dragging = true;
|
||||||
}
|
}
|
||||||
mousemove() {
|
mousemove() {
|
||||||
}
|
}
|
||||||
mouseup(e) {
|
mouseup(e) {
|
||||||
this.event.enable();
|
this.event.enable();
|
||||||
|
if (this.dragging) {
|
||||||
this.model.point1.x = this.model.point1.x - this.offsetX + e.offsetX;
|
this.model.point1.x = this.model.point1.x - this.offsetX + e.offsetX;
|
||||||
this.model.point1.y = this.model.point1.y - this.offsetY + e.offsetY;
|
this.model.point1.y = this.model.point1.y - this.offsetY + e.offsetY;
|
||||||
this.model.point2.x = this.model.point2.x - this.offsetX + e.offsetX;
|
this.model.point2.x = this.model.point2.x - this.offsetX + e.offsetX;
|
||||||
this.model.point2.y = this.model.point2.y - this.offsetY + e.offsetY;
|
this.model.point2.y = this.model.point2.y - this.offsetY + e.offsetY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -11,6 +11,7 @@ export default class ibpText extends Group {
|
|||||||
this.z = device.model.z;
|
this.z = device.model.z;
|
||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
|
this.dragging = false;
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
create() {
|
create() {
|
||||||
@ -31,7 +32,8 @@ export default class ibpText extends Group {
|
|||||||
textFill: model.textFill,
|
textFill: model.textFill,
|
||||||
textAlign: model.textAlign,
|
textAlign: model.textAlign,
|
||||||
textPosition: model.textPosition || 'inside',
|
textPosition: model.textPosition || 'inside',
|
||||||
textVerticalAlign: model.textVerticalAlign || null
|
textVerticalAlign: model.textVerticalAlign || null,
|
||||||
|
textLineHeight: model.fontSize
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.add(this.textName);
|
this.add(this.textName);
|
||||||
@ -52,13 +54,15 @@ export default class ibpText extends Group {
|
|||||||
}
|
}
|
||||||
this.offsetX = e.offsetX;
|
this.offsetX = e.offsetX;
|
||||||
this.offsetY = e.offsetY;
|
this.offsetY = e.offsetY;
|
||||||
|
this.dragging = true;
|
||||||
}
|
}
|
||||||
mousemove() {
|
mousemove() {
|
||||||
}
|
}
|
||||||
mouseup(e) {
|
mouseup(e) {
|
||||||
this.event.enable();
|
this.event.enable();
|
||||||
console.log('test', e);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -11,6 +11,7 @@ export default class ibpTipBox extends Group {
|
|||||||
this.z = device.model.z;
|
this.z = device.model.z;
|
||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
|
this.dragging = false;
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
create() {
|
create() {
|
||||||
@ -47,12 +48,15 @@ export default class ibpTipBox extends Group {
|
|||||||
}
|
}
|
||||||
this.offsetX = e.offsetX;
|
this.offsetX = e.offsetX;
|
||||||
this.offsetY = e.offsetY;
|
this.offsetY = e.offsetY;
|
||||||
|
this.dragging = true;
|
||||||
}
|
}
|
||||||
mousemove() {
|
mousemove() {
|
||||||
}
|
}
|
||||||
mouseup(e) {
|
mouseup(e) {
|
||||||
this.event.enable();
|
this.event.enable();
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
103
src/ibp/shape/key.js
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import Image from 'zrender/src/graphic/Image';
|
||||||
|
import keyPic from '@/assets/ibp_images/key.png';
|
||||||
|
import keyPicOn from '@/assets/ibp_images/key_on.png';
|
||||||
|
import store from '@/store';
|
||||||
|
|
||||||
|
export default class key extends Group {
|
||||||
|
|
||||||
|
constructor(device) {
|
||||||
|
super();
|
||||||
|
this.model = device.model;
|
||||||
|
this.zlevel = device.model.zlevel;
|
||||||
|
this.event = device.event;
|
||||||
|
this.offsetX = 0;
|
||||||
|
this.offsetY = 0;
|
||||||
|
this.create();
|
||||||
|
}
|
||||||
|
|
||||||
|
create() {
|
||||||
|
const model = this.model;
|
||||||
|
this.imageBg = new Image({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: model.z,
|
||||||
|
draggable: model.draggable || false,
|
||||||
|
style: {
|
||||||
|
image: this.getRotateColor(),
|
||||||
|
x: model.point.x,
|
||||||
|
y: model.point.y,
|
||||||
|
width: 314,
|
||||||
|
height: 932
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.imageBg);
|
||||||
|
this.transformScale();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 缩放按钮 */
|
||||||
|
transformScale() {
|
||||||
|
this.imageBg.origin = [this.model.point.x, this.model.point.y];
|
||||||
|
this.imageBg.scale =[this.model.width/314, this.model.width/314];
|
||||||
|
this.imageBg.dirty();
|
||||||
|
}
|
||||||
|
|
||||||
|
getRotateColor() {
|
||||||
|
if (this.model.status) {
|
||||||
|
switch (this.model.status) {
|
||||||
|
case 'on': {
|
||||||
|
return keyPicOn;
|
||||||
|
}
|
||||||
|
case 'off': {
|
||||||
|
return keyPic;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return keyPic;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setStatus(model) {
|
||||||
|
switch (model.status) {
|
||||||
|
case 'on': {
|
||||||
|
// 开放
|
||||||
|
this.imageBg.setStyle({image: keyPicOn});
|
||||||
|
this.model.status='on';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'off': {
|
||||||
|
// 关闭
|
||||||
|
this.imageBg.setStyle({image: keyPic});
|
||||||
|
this.model.status='off';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setDraggable() {
|
||||||
|
this.imageBg.attr('draggable', true);
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
this.offsetX = e.offsetX;
|
||||||
|
this.offsetY = e.offsetY;
|
||||||
|
}
|
||||||
|
|
||||||
|
mousemove(e) {
|
||||||
|
}
|
||||||
|
|
||||||
|
mouseup(e) {
|
||||||
|
this.event.enable();
|
||||||
|
this.model.point.x = this.model.point.x + (e.offsetX - this.offsetX);
|
||||||
|
this.model.point.y = this.model.point.y + (e.offsetY - this.offsetY);
|
||||||
|
}
|
||||||
|
}
|
@ -13,6 +13,7 @@ export default class rotateTip extends Group {
|
|||||||
this.event = device.event;
|
this.event = device.event;
|
||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
|
this.dragging = false;
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,6 +73,7 @@ export default class rotateTip extends Group {
|
|||||||
}
|
}
|
||||||
this.offsetX = e.offsetX;
|
this.offsetX = e.offsetX;
|
||||||
this.offsetY = e.offsetY;
|
this.offsetY = e.offsetY;
|
||||||
|
this.dragging = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
mousemove(e) {
|
mousemove(e) {
|
||||||
@ -79,7 +81,9 @@ export default class rotateTip extends Group {
|
|||||||
|
|
||||||
mouseup(e) {
|
mouseup(e) {
|
||||||
this.event.enable();
|
this.event.enable();
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -12,6 +12,7 @@ export default class RotatingButton extends Group {
|
|||||||
this.z = device.model.z;
|
this.z = device.model.z;
|
||||||
this.offsetX = 0;
|
this.offsetX = 0;
|
||||||
this.offsetY = 0;
|
this.offsetY = 0;
|
||||||
|
this.dragging = false;
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,7 +26,7 @@ export default class RotatingButton extends Group {
|
|||||||
x: this.model.point.x,
|
x: this.model.point.x,
|
||||||
y: this.model.point.y,
|
y: this.model.point.y,
|
||||||
width: this.model.width,
|
width: this.model.width,
|
||||||
height: this.model.height
|
height: this.model.width/434*381
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.add(this.rotatingButton);
|
this.add(this.rotatingButton);
|
||||||
@ -47,12 +48,15 @@ export default class RotatingButton extends Group {
|
|||||||
}
|
}
|
||||||
this.offsetX = e.offsetX;
|
this.offsetX = e.offsetX;
|
||||||
this.offsetY = e.offsetY;
|
this.offsetY = e.offsetY;
|
||||||
|
this.dragging = true;
|
||||||
}
|
}
|
||||||
mousemove() {
|
mousemove() {
|
||||||
}
|
}
|
||||||
mouseup(e) {
|
mouseup(e) {
|
||||||
this.event.enable();
|
this.event.enable();
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
import Group from 'zrender/src/container/Group';
|
import Group from 'zrender/src/container/Group';
|
||||||
import Image from 'zrender/src/graphic/Image';
|
import Image from 'zrender/src/graphic/Image';
|
||||||
import teleTerminalPic from '@/assets/ibp_images/telephone_terminal.png';
|
import teleTerminalPic from '@/assets/ibp_images/telephone_terminal.png';
|
||||||
|
import store from '@/store';
|
||||||
|
|
||||||
export default class alarm extends Group {
|
export default class alarm extends Group {
|
||||||
|
|
||||||
constructor(device) {
|
constructor(device) {
|
||||||
super();
|
super();
|
||||||
|
this.event = device.event;
|
||||||
this.model = device.model;
|
this.model = device.model;
|
||||||
this.zlevel = device.model.zlevel;
|
this.zlevel = device.model.zlevel;
|
||||||
|
this.offsetX = 0;
|
||||||
|
this.offsetY = 0;
|
||||||
|
this.dragging = false;
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,8 +25,8 @@ export default class alarm extends Group {
|
|||||||
image: teleTerminalPic,
|
image: teleTerminalPic,
|
||||||
x: model.point.x,
|
x: model.point.x,
|
||||||
y: model.point.y,
|
y: model.point.y,
|
||||||
width: 64,
|
width: 150,
|
||||||
height: 56
|
height: 150
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.add(this.imageBg);
|
this.add(this.imageBg);
|
||||||
@ -31,12 +36,12 @@ export default class alarm extends Group {
|
|||||||
/** 缩放按钮 */
|
/** 缩放按钮 */
|
||||||
transformScale() {
|
transformScale() {
|
||||||
this.imageBg.origin = [this.model.point.x, this.model.point.y];
|
this.imageBg.origin = [this.model.point.x, this.model.point.y];
|
||||||
this.imageBg.scale =[this.model.width/64, this.model.width/64];
|
this.imageBg.scale =[this.model.width/150, this.model.width/150];
|
||||||
this.imageBg.dirty();
|
this.imageBg.dirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
setDraggable() {
|
setDraggable() {
|
||||||
this.arrow.attr('draggable', true);
|
this.imageBg.attr('draggable', true);
|
||||||
this.createMouseEvent();
|
this.createMouseEvent();
|
||||||
}
|
}
|
||||||
createMouseEvent() {
|
createMouseEvent() {
|
||||||
@ -47,6 +52,12 @@ export default class alarm extends Group {
|
|||||||
|
|
||||||
mousedown(e) {
|
mousedown(e) {
|
||||||
this.event.disable();
|
this.event.disable();
|
||||||
|
if (e.which == 3) {
|
||||||
|
store.dispatch('ibp/setUpdateDeviceData', this.model);
|
||||||
|
}
|
||||||
|
this.offsetX = e.offsetX;
|
||||||
|
this.offsetY = e.offsetY;
|
||||||
|
this.dragging = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
mousemove(e) {
|
mousemove(e) {
|
||||||
@ -54,7 +65,9 @@ export default class alarm extends Group {
|
|||||||
|
|
||||||
mouseup(e) {
|
mouseup(e) {
|
||||||
this.event.enable();
|
this.event.enable();
|
||||||
this.model.point.x = this.model.point.x + e.offsetX;
|
if (this.dragging) {
|
||||||
this.model.point.y = this.model.point.y + e.offsetY;
|
this.model.point.x = this.model.point.x + (e.offsetX - this.offsetX);
|
||||||
|
this.model.point.y = this.model.point.y + (e.offsetY - this.offsetY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,8 +58,8 @@ export function parser(data, config) {
|
|||||||
ibpDevice[elem.code] = createModel(deviceType.CircularLamp, elem, propConvert);
|
ibpDevice[elem.code] = createModel(deviceType.CircularLamp, elem, propConvert);
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
zrUtil.each(data.warnButtonList || [], elem => {
|
zrUtil.each(data.alarmList || [], elem => {
|
||||||
ibpDevice[elem.code] = createModel(deviceType.WarnButton, elem, propConvert);
|
ibpDevice[elem.code] = createModel(deviceType.Alarm, elem, propConvert);
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
zrUtil.each(data.arrowList || [], elem => {
|
zrUtil.each(data.arrowList || [], elem => {
|
||||||
@ -70,14 +70,30 @@ export function parser(data, config) {
|
|||||||
ibpDevice[elem.code] = createModel(deviceType.RotatingButton, elem, propConvert);
|
ibpDevice[elem.code] = createModel(deviceType.RotatingButton, elem, propConvert);
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
zrUtil.each(data.tipList || [], elem => {
|
zrUtil.each(data.tipBoxList || [], elem => {
|
||||||
ibpDevice[elem.code] = createModel(deviceType.Tip, elem, propConvert);
|
ibpDevice[elem.code] = createModel(deviceType.TipBox, elem, propConvert);
|
||||||
|
}, this);
|
||||||
|
|
||||||
|
zrUtil.each(data.ibpLineList || [], elem => {
|
||||||
|
ibpDevice[elem.code] = createModel(deviceType.IbpLine, elem, propConvert);
|
||||||
|
}, this);
|
||||||
|
|
||||||
|
zrUtil.each(data.appendageBoxList || [], elem => {
|
||||||
|
ibpDevice[elem.code] = createModel(deviceType.AppendageBox, elem, propConvert);
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
zrUtil.each(data.elevatorList || [], elem => {
|
zrUtil.each(data.elevatorList || [], elem => {
|
||||||
ibpDevice[elem.code] = createModel(deviceType.Elevator, elem, propConvert);
|
ibpDevice[elem.code] = createModel(deviceType.Elevator, elem, propConvert);
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
zrUtil.each(data.keyList || [], elem => {
|
||||||
|
ibpDevice[elem.code] = createModel(deviceType.Key, elem, propConvert);
|
||||||
|
}, this);
|
||||||
|
|
||||||
|
zrUtil.each(data.teleTerminalList || [], elem => {
|
||||||
|
ibpDevice[elem.code] = createModel(deviceType.TeleTerminal, elem, propConvert);
|
||||||
|
}, this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ibpDevice;
|
return ibpDevice;
|
||||||
@ -259,6 +275,40 @@ export function updateIbpData(device) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case deviceType.Key : {
|
||||||
|
if (ibpData.keyList && ibpData.keyList.length > 0) {
|
||||||
|
let newDevice = true;
|
||||||
|
for (let i=0; i<ibpData.keyList.length; i++) {
|
||||||
|
if (device.code === ibpData.keyList[i].code) {
|
||||||
|
device.dispose ? ibpData.keyList.splice(i, 1):ibpData.keyList[i] = device;
|
||||||
|
newDevice = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (newDevice) {
|
||||||
|
ibpData.keyList.push(device);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ibpData.keyList = [device];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case deviceType.TeleTerminal : {
|
||||||
|
if (ibpData.teleTerminalList && ibpData.teleTerminalList.length > 0) {
|
||||||
|
let newDevice = true;
|
||||||
|
for (let i=0; i<ibpData.teleTerminalList.length; i++) {
|
||||||
|
if (device.code === ibpData.teleTerminalList[i].code) {
|
||||||
|
device.dispose ? ibpData.teleTerminalList.splice(i, 1):ibpData.teleTerminalList[i] = device;
|
||||||
|
newDevice = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (newDevice) {
|
||||||
|
ibpData.teleTerminalList.push(device);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ibpData.teleTerminalList = [device];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
store.dispatch('ibp/setIbpData', ibpData);
|
store.dispatch('ibp/setIbpData', ibpData);
|
||||||
|
@ -304,9 +304,9 @@ class SkinCode extends defaultStyle {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this[deviceType.Station] = {
|
this[deviceType.Station] = {
|
||||||
text: {
|
// text: {
|
||||||
show: true // 公里标名称显示
|
// show: true // 公里标名称显示
|
||||||
},
|
// },
|
||||||
kmPostShow: true, // 公里标显示
|
kmPostShow: true, // 公里标显示
|
||||||
kilometerPosition: 'down', // 公里标位置
|
kilometerPosition: 'down', // 公里标位置
|
||||||
fontWeight: 'bold' // 文字错细
|
fontWeight: 'bold' // 文字错细
|
||||||
|
@ -300,9 +300,9 @@ class SkinCode extends defaultStyle {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this[deviceType.Station] = {
|
this[deviceType.Station] = {
|
||||||
text: {
|
// text: {
|
||||||
show: true // 公里标名称显示
|
// show: true // 公里标名称显示
|
||||||
},
|
// },
|
||||||
kmPostShow: false, // 公里标显示
|
kmPostShow: false, // 公里标显示
|
||||||
kilometerPosition: 'up' // 公里标朝向
|
kilometerPosition: 'up' // 公里标朝向
|
||||||
};
|
};
|
||||||
|
@ -297,9 +297,9 @@ class SkinCode extends defaultStyle {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this[deviceType.Station] = {
|
this[deviceType.Station] = {
|
||||||
text: {
|
// text: {
|
||||||
show: true // 公里标名称显示
|
// show: true // 公里标名称显示
|
||||||
},
|
// },
|
||||||
kmPostShow: false, // 公里标显示
|
kmPostShow: false, // 公里标显示
|
||||||
kilometerPosition: 'up' // 公里标朝向
|
kilometerPosition: 'up' // 公里标朝向
|
||||||
};
|
};
|
||||||
|
@ -279,9 +279,9 @@ class SkinCode extends defaultStyle {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this[deviceType.Station] = {
|
this[deviceType.Station] = {
|
||||||
text: {
|
// text: {
|
||||||
show: true // 公里标名称显示
|
// show: true // 公里标名称显示
|
||||||
},
|
// },
|
||||||
kmPostShow: true, // 公里标显示
|
kmPostShow: true, // 公里标显示
|
||||||
kilometerPosition: 'up' // 公里标朝向
|
kilometerPosition: 'up' // 公里标朝向
|
||||||
};
|
};
|
||||||
|
@ -21,7 +21,7 @@ export default class Station extends Group {
|
|||||||
const model = this.model;
|
const model = this.model;
|
||||||
const style = this.style;
|
const style = this.style;
|
||||||
|
|
||||||
if (style.Station.text.show) {
|
if (model.visible) {
|
||||||
// 公里标名称是否显示
|
// 公里标名称是否显示
|
||||||
this.stationText = new ETextName({
|
this.stationText = new ETextName({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__schedule add-task" :title="title" :visible.sync="dialogShow" width="800px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="beijing-01__schedule add-task"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="800px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="margin: 10px">
|
<div style="margin: 10px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
@ -11,9 +20,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" :offset="1">
|
<el-col :span="3" :offset="1">
|
||||||
@ -21,9 +33,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="model.startTime" placeholder="请选择">
|
<el-select v-model="model.startTime" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -36,9 +51,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" :offset="1">
|
<el-col :span="3" :offset="1">
|
||||||
@ -46,9 +64,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="model.startTime" placeholder="请选择">
|
<el-select v-model="model.startTime" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@ -58,14 +79,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-table :data="model.route" border :height="180">
|
<el-table :data="model.route" border :height="180">
|
||||||
<el-table-column prop="date" label="日期" width="180">
|
<el-table-column prop="date" label="日期" width="180" />
|
||||||
</el-table-column>
|
<el-table-column prop="name" label="姓名" width="180" />
|
||||||
<el-table-column prop="name" label="姓名" width="180">
|
<el-table-column prop="address" label="地址" />
|
||||||
</el-table-column>
|
<el-table-column width="20" />
|
||||||
<el-table-column prop="address" label="地址">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column width="20">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||||
@ -73,14 +90,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-table :data="model.detail" border :height="180">
|
<el-table :data="model.detail" border :height="180">
|
||||||
<el-table-column prop="date" label="日期" width="180">
|
<el-table-column prop="date" label="日期" width="180" />
|
||||||
</el-table-column>
|
<el-table-column prop="name" label="姓名" width="180" />
|
||||||
<el-table-column prop="name" label="姓名" width="180">
|
<el-table-column prop="address" label="地址" />
|
||||||
</el-table-column>
|
<el-table-column width="20" />
|
||||||
<el-table-column prop="address" label="地址">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column width="20">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -115,12 +128,12 @@
|
|||||||
route: [],
|
route: [],
|
||||||
detail: []
|
detail: []
|
||||||
},
|
},
|
||||||
tripNumberList: [],
|
tripNumberList: []
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '添加任务'
|
return '添加任务';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -139,12 +152,11 @@
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
|
|
||||||
/deep/ {
|
/deep/ {
|
||||||
.el-button {
|
.el-button {
|
||||||
margin-left: 40px !important;
|
margin-left: 40px !important;
|
||||||
|
@ -111,7 +111,6 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
createRunPlanLoad(this.buildModel()).then(response => {
|
createRunPlanLoad(this.buildModel()).then(response => {
|
||||||
this.$message.success('创建运行图计划成功');
|
this.$message.success('创建运行图计划成功');
|
||||||
this.$emit('reloadTable', { name: 'managePlanList' });
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__schedule delete-task" :title="title" :visible.sync="dialogShow" width="400px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="beijing-01__schedule delete-task"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="400px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-radio v-model="type" :label="1">删除以前所有任务(包含本任务)</el-radio>
|
<el-radio v-model="type" :label="1">删除以前所有任务(包含本任务)</el-radio>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -26,12 +35,12 @@
|
|||||||
loading: false,
|
loading: false,
|
||||||
tripNumber: '',
|
tripNumber: '',
|
||||||
serviceNumber: '',
|
serviceNumber: '',
|
||||||
type: '1',
|
type: '1'
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '删除任务'
|
return '删除任务';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -51,7 +60,7 @@
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__schedule create-week-plan" :title="title" :visible.sync="dialogShow" width="400px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="beijing-01__schedule create-week-plan"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="400px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row type="flex" justify="center" class="button-group">
|
<el-row type="flex" justify="center" class="button-group">
|
||||||
<el-button @click="handleCommit">确 定</el-button>
|
<el-button @click="handleCommit">确 定</el-button>
|
||||||
<el-button @click="doClose">取 消</el-button>
|
<el-button @click="doClose">取 消</el-button>
|
||||||
@ -18,11 +27,11 @@
|
|||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '删除当天计划'
|
return '删除当天计划';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -40,7 +49,7 @@
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getRunPlanLoadList, deleteRunPlanLoad } from '@/api/runplan';
|
import { getRunPlanLoadList, deleteRunPlanLoad, listAllTempLateRunPlan } from '@/api/runplan';
|
||||||
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ManagePlanList',
|
name: 'ManagePlanList',
|
||||||
@ -29,13 +30,7 @@ export default {
|
|||||||
},
|
},
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '140px',
|
labelWidth: '140px',
|
||||||
reset: true,
|
reset: true
|
||||||
queryObject: {
|
|
||||||
runPlanName: {
|
|
||||||
type: 'text',
|
|
||||||
label: '运行图名称'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
queryList: {
|
queryList: {
|
||||||
query: this.queryFunction,
|
query: this.queryFunction,
|
||||||
@ -43,12 +38,18 @@ export default {
|
|||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '地图名称',
|
title: this.$t('publish.mapName'),
|
||||||
prop: 'mapName'
|
prop: 'mapId',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['id', 'name']); },
|
||||||
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '运行图名称',
|
title: this.$t('publish.runPlanName'),
|
||||||
prop: 'runPlanName'
|
prop: 'templatePlanId',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.$convertField(row.templatePlanId, this.templatePlanList, ['id', 'name']); },
|
||||||
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '加载日期',
|
title: '加载日期',
|
||||||
@ -80,9 +81,20 @@ export default {
|
|||||||
return '运行图计划表';
|
return '运行图计划表';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
mounted() {
|
||||||
|
this.loadPageData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
loadPageData() {
|
||||||
|
this.mapList = [];
|
||||||
|
listPublishMap().then(resp => {
|
||||||
|
this.mapList = resp.data;
|
||||||
|
});
|
||||||
|
this.templatePlanList = [];
|
||||||
|
listAllTempLateRunPlan().then(resp => {
|
||||||
|
this.templatePlanList = resp.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
if (this.$route.query.mapId) {
|
if (this.$route.query.mapId) {
|
||||||
params['mapId'] = this.$route.query.mapId;
|
params['mapId'] = this.$route.query.mapId;
|
||||||
@ -114,6 +126,7 @@ export default {
|
|||||||
},
|
},
|
||||||
doShow() {
|
doShow() {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(()=> { this.reloadTable(); });
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__schedule add-task" :title="title" :visible.sync="dialogShow" width="800px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="beijing-01__schedule add-task"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="800px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="margin: 10px">
|
<div style="margin: 10px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
@ -11,9 +20,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" :offset="1">
|
<el-col :span="3" :offset="1">
|
||||||
@ -21,9 +33,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="model.startTime" placeholder="请选择">
|
<el-select v-model="model.startTime" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -36,9 +51,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" :offset="1">
|
<el-col :span="3" :offset="1">
|
||||||
@ -46,9 +64,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="model.startTime" placeholder="请选择">
|
<el-select v-model="model.startTime" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@ -58,14 +79,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-table :data="model.route" border :height="180">
|
<el-table :data="model.route" border :height="180">
|
||||||
<el-table-column prop="date" label="日期" width="180">
|
<el-table-column prop="date" label="日期" width="180" />
|
||||||
</el-table-column>
|
<el-table-column prop="name" label="姓名" width="180" />
|
||||||
<el-table-column prop="name" label="姓名" width="180">
|
<el-table-column prop="address" label="地址" />
|
||||||
</el-table-column>
|
<el-table-column width="20" />
|
||||||
<el-table-column prop="address" label="地址">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column width="20">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||||
@ -73,14 +90,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-table :data="model.detail" border :height="180">
|
<el-table :data="model.detail" border :height="180">
|
||||||
<el-table-column prop="date" label="日期" width="180">
|
<el-table-column prop="date" label="日期" width="180" />
|
||||||
</el-table-column>
|
<el-table-column prop="name" label="姓名" width="180" />
|
||||||
<el-table-column prop="name" label="姓名" width="180">
|
<el-table-column prop="address" label="地址" />
|
||||||
</el-table-column>
|
<el-table-column width="20" />
|
||||||
<el-table-column prop="address" label="地址">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column width="20">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -115,12 +128,12 @@
|
|||||||
route: [],
|
route: [],
|
||||||
detail: []
|
detail: []
|
||||||
},
|
},
|
||||||
tripNumberList: [],
|
tripNumberList: []
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '添加任务'
|
return '添加任务';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -139,12 +152,11 @@
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
|
|
||||||
/deep/ {
|
/deep/ {
|
||||||
.el-button {
|
.el-button {
|
||||||
margin-left: 40px !important;
|
margin-left: 40px !important;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="title"
|
|
||||||
v-dialogDrag
|
v-dialogDrag
|
||||||
|
:title="title"
|
||||||
class="beijing-01__schedule choose-plan-template"
|
class="beijing-01__schedule choose-plan-template"
|
||||||
:visible.sync="dialogShow"
|
:visible.sync="dialogShow"
|
||||||
width="80%"
|
width="70%"
|
||||||
:before-close="doClose"
|
:before-close="doClose"
|
||||||
:modal="false"
|
:modal="false"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
|
@ -111,7 +111,6 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
createRunPlanLoad(this.buildModel()).then(response => {
|
createRunPlanLoad(this.buildModel()).then(response => {
|
||||||
this.$message.success('创建运行图计划成功');
|
this.$message.success('创建运行图计划成功');
|
||||||
this.$emit('reloadTable', { name: 'managePlanList' });
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__schedule delete-task" :title="title" :visible.sync="dialogShow" width="400px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="beijing-01__schedule delete-task"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="400px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-radio v-model="type" :label="1">删除以前所有任务(包含本任务)</el-radio>
|
<el-radio v-model="type" :label="1">删除以前所有任务(包含本任务)</el-radio>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -26,12 +35,12 @@
|
|||||||
loading: false,
|
loading: false,
|
||||||
tripNumber: '',
|
tripNumber: '',
|
||||||
serviceNumber: '',
|
serviceNumber: '',
|
||||||
type: '1',
|
type: '1'
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '删除任务'
|
return '删除任务';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -51,7 +60,7 @@
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__schedule create-week-plan" :title="title" :visible.sync="dialogShow" width="400px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="beijing-01__schedule create-week-plan"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="400px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row type="flex" justify="center" class="button-group">
|
<el-row type="flex" justify="center" class="button-group">
|
||||||
<el-button @click="handleCommit">确 定</el-button>
|
<el-button @click="handleCommit">确 定</el-button>
|
||||||
<el-button @click="doClose">取 消</el-button>
|
<el-button @click="doClose">取 消</el-button>
|
||||||
@ -18,11 +27,11 @@
|
|||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '删除当天计划'
|
return '删除当天计划';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -40,7 +49,7 @@
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getRunPlanLoadList, deleteRunPlanLoad } from '@/api/runplan';
|
import { getRunPlanLoadList, deleteRunPlanLoad, listAllTempLateRunPlan } from '@/api/runplan';
|
||||||
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ManagePlanList',
|
name: 'ManagePlanList',
|
||||||
@ -29,13 +30,7 @@ export default {
|
|||||||
},
|
},
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '140px',
|
labelWidth: '140px',
|
||||||
reset: true,
|
reset: true
|
||||||
queryObject: {
|
|
||||||
runPlanName: {
|
|
||||||
type: 'text',
|
|
||||||
label: '运行图名称'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
queryList: {
|
queryList: {
|
||||||
query: this.queryFunction,
|
query: this.queryFunction,
|
||||||
@ -43,12 +38,18 @@ export default {
|
|||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '地图名称',
|
title: this.$t('publish.mapName'),
|
||||||
prop: 'mapName'
|
prop: 'mapId',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['id', 'name']); },
|
||||||
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '运行图名称',
|
title: this.$t('publish.runPlanName'),
|
||||||
prop: 'runPlanName'
|
prop: 'templatePlanId',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.$convertField(row.templatePlanId, this.templatePlanList, ['id', 'name']); },
|
||||||
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '加载日期',
|
title: '加载日期',
|
||||||
@ -80,9 +81,20 @@ export default {
|
|||||||
return '运行图计划表';
|
return '运行图计划表';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
mounted() {
|
||||||
|
this.loadPageData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
loadPageData() {
|
||||||
|
this.mapList = [];
|
||||||
|
listPublishMap().then(resp => {
|
||||||
|
this.mapList = resp.data;
|
||||||
|
});
|
||||||
|
this.templatePlanList = [];
|
||||||
|
listAllTempLateRunPlan().then(resp => {
|
||||||
|
this.templatePlanList = resp.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
if (this.$route.query.mapId) {
|
if (this.$route.query.mapId) {
|
||||||
params['mapId'] = this.$route.query.mapId;
|
params['mapId'] = this.$route.query.mapId;
|
||||||
@ -114,6 +126,7 @@ export default {
|
|||||||
},
|
},
|
||||||
doShow() {
|
doShow() {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(()=> { this.reloadTable(); });
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -1,20 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__schedule edit-planning-train" :title="title" :visible.sync="dialogShow" width="800px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="beijing-01__schedule edit-planning-train"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="800px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :offset="10">列车线路</el-col>
|
<el-col :offset="10">列车线路</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="17">
|
<el-col :span="17">
|
||||||
<el-table :data="serviceData" border style="width: 100%" height="160">
|
<el-table :data="serviceData" border style="width: 100%" height="160">
|
||||||
<el-table-column prop="startStationCode" label="起点站">
|
<el-table-column prop="startStationCode" label="起点站" />
|
||||||
</el-table-column>
|
<el-table-column prop="startStationStandCode" label="起点站台" />
|
||||||
<el-table-column prop="startStationStandCode" label="起点站台">
|
<el-table-column prop="endStationCode" label="终点站" />
|
||||||
</el-table-column>
|
<el-table-column prop="endStationStandCode" label="终点站台" />
|
||||||
<el-table-column prop="endStationCode" label="终点站">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="endStationStandCode" label="终点站台">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" :offset="1">
|
<el-col :span="6" :offset="1">
|
||||||
@ -39,23 +44,23 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="view-box">
|
<el-row class="view-box">
|
||||||
<el-col :span="9" style="padding-left: 10px">
|
<el-col :span="9" style="padding-left: 10px">
|
||||||
<el-input v-model="oldServiceNumber" size="small" :disabled="true"></el-input>
|
<el-input v-model="oldServiceNumber" size="small" :disabled="true" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="9" style="padding-left: 20px">
|
<el-col :span="9" style="padding-left: 20px">
|
||||||
<el-input v-model="newServiceNumber" size="small"></el-input>
|
<el-input v-model="newServiceNumber" size="small" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" style="padding-left: 20px">
|
<el-col :span="5" style="padding-left: 20px">
|
||||||
<el-button @click="handleModifyingTripNumber" style="width: 150px;">改车次号</el-button>
|
<el-button style="width: 150px;" @click="handleModifyingTripNumber">改车次号</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-top: 10px">
|
<el-row style="margin-top: 10px">
|
||||||
<el-col :span="4"><span class="view-label">线路开始时间</span></el-col>
|
<el-col :span="4"><span class="view-label">线路开始时间</span></el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-time-select v-model="serviceStartTime" size="small"></el-time-select>
|
<el-time-select v-model="serviceStartTime" size="small" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4"><span class="view-label">线路结束时间</span></el-col>
|
<el-col :span="4"><span class="view-label">线路结束时间</span></el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-time-select v-model="serviceEndTime" size="small"></el-time-select>
|
<el-time-select v-model="serviceEndTime" size="small" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-top: 20px">
|
<el-row style="margin-top: 20px">
|
||||||
@ -63,16 +68,11 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-table :data="tripData" border style="width: 100%" height="200">
|
<el-table :data="tripData" border style="width: 100%" height="200">
|
||||||
<el-table-column prop="arriveTime" label="到站时间">
|
<el-table-column prop="arriveTime" label="到站时间" />
|
||||||
</el-table-column>
|
<el-table-column prop="stationCode" label="车站" />
|
||||||
<el-table-column prop="stationCode" label="车站">
|
<el-table-column prop="stationStandCode" label="站台" />
|
||||||
</el-table-column>
|
<el-table-column prop="stopTime" label="停站时间" />
|
||||||
<el-table-column prop="stationStandCode" label="站台">
|
<el-table-column prop="level" label="运行等级" />
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="stopTime" label="停站时间">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="level" label="运行等级">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-top: 20px">
|
<el-row style="margin-top: 20px">
|
||||||
@ -89,7 +89,7 @@
|
|||||||
import { formatTime, formatName } from '@/utils/runPlan';
|
import { formatTime, formatName } from '@/utils/runPlan';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'modifyingPlan',
|
name: 'ModifyingPlan',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
@ -101,12 +101,12 @@
|
|||||||
serviceStartTime: '',
|
serviceStartTime: '',
|
||||||
serviceEndTime: '',
|
serviceEndTime: '',
|
||||||
serviceData: [],
|
serviceData: [],
|
||||||
tripData: [],
|
tripData: []
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '修改'
|
return '修改';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -127,26 +127,26 @@
|
|||||||
},
|
},
|
||||||
// 加任务
|
// 加任务
|
||||||
handleAddTask() {
|
handleAddTask() {
|
||||||
this.$emit('dispatchDialog', { name: 'addTask', params: {} })
|
this.$emit('dispatchDialog', { name: 'addTask', params: {} });
|
||||||
},
|
},
|
||||||
// 替换
|
// 替换
|
||||||
handleReplace() {
|
handleReplace() {
|
||||||
this.$emit('dispatchDialog', { name: 'modifyingTask', params: {} })
|
this.$emit('dispatchDialog', { name: 'modifyingTask', params: {} });
|
||||||
},
|
},
|
||||||
// 删任务
|
// 删任务
|
||||||
handleDeleteTask() {
|
handleDeleteTask() {
|
||||||
this.$emit('dispatchDialog', { name: 'deleteTask', params: {} })
|
this.$emit('dispatchDialog', { name: 'deleteTask', params: {} });
|
||||||
},
|
},
|
||||||
// 改车次号
|
// 改车次号
|
||||||
handleModifyingTripNumber() {
|
handleModifyingTripNumber() {
|
||||||
this.$emit('dispatchDialog', { name: 'modifyingTripNumber', params: {} })
|
this.$emit('dispatchDialog', { name: 'modifyingTripNumber', params: {} });
|
||||||
},
|
},
|
||||||
// 确定修改
|
// 确定修改
|
||||||
handleCommit() {
|
handleCommit() {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
@ -157,13 +157,11 @@
|
|||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.view-label {
|
.view-label {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.view-box {
|
.view-box {
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
border: 1px inset gray;
|
border: 1px inset gray;
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__schedule add-task" :title="title" :visible.sync="dialogShow" width="1000px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="beijing-01__schedule add-task"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="1000px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="margin: 10px">
|
<div style="margin: 10px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
@ -9,10 +18,13 @@
|
|||||||
<span>车次号:</span>
|
<span>车次号:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="15">
|
<el-col :span="15">
|
||||||
<el-select style="display: inline-black" v-model="model.tripNumber" placeholder="请选择">
|
<el-select v-model="model.tripNumber" style="display: inline-black" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -30,10 +42,13 @@
|
|||||||
<span>缺省停站时间:</span>
|
<span>缺省停站时间:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-select style="display: inline-black" v-model="model.time" placeholder="请选择">
|
<el-select v-model="model.time" style="display: inline-black" placeholder="请选择">
|
||||||
<el-option v-for="item in timeList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in timeList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -44,7 +59,7 @@
|
|||||||
<span>表号:</span>
|
<span>表号:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="13">
|
<el-col :span="13">
|
||||||
<el-input v-model="model.serviceNumber"></el-input>
|
<el-input v-model="model.serviceNumber" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -73,10 +88,13 @@
|
|||||||
<span>序列号:</span>
|
<span>序列号:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="15">
|
<el-col :span="15">
|
||||||
<el-select style="display: inline-black" v-model="model.serialNumber" placeholder="请选择">
|
<el-select v-model="model.serialNumber" style="display: inline-black" placeholder="请选择">
|
||||||
<el-option v-for="item in serialNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="model.value">
|
v-for="item in serialNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="model.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -94,10 +112,13 @@
|
|||||||
<span>缺省运行等级:</span>
|
<span>缺省运行等级:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-select style="display: inline-black" v-model="model.level" placeholder="请选择">
|
<el-select v-model="model.level" style="display: inline-black" placeholder="请选择">
|
||||||
<el-option v-for="item in levelList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in levelList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -108,8 +129,7 @@
|
|||||||
<span>开始时间:</span>
|
<span>开始时间:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="13">
|
<el-col :span="13">
|
||||||
<el-time-select v-model="model.startTime" placeholder="选择时间" :clearable="false">
|
<el-time-select v-model="model.startTime" placeholder="选择时间" :clearable="false" />
|
||||||
</el-time-select>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -141,19 +161,15 @@
|
|||||||
{{ formatName(scope.row.beginStationCode) }}
|
{{ formatName(scope.row.beginStationCode) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="beginStationStandCode" label="起始站台">
|
<el-table-column prop="beginStationStandCode" label="起始站台" />
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="endStationCode" label="终到站">
|
<el-table-column prop="endStationCode" label="终到站">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ formatName(scope.row.endStationCode) }}
|
{{ formatName(scope.row.endStationCode) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="endStationStandCode" label="终到站台">
|
<el-table-column prop="endStationStandCode" label="终到站台" />
|
||||||
</el-table-column>
|
<el-table-column prop="describe" label="描述" :width="280" />
|
||||||
<el-table-column prop="describe" label="描述" :width="280">
|
<el-table-column :width="40" />
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :width="40">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||||
@ -181,10 +197,8 @@
|
|||||||
{{ formatTime(scope.row.endTime) }}
|
{{ formatTime(scope.row.endTime) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="level" label="运行等级">
|
<el-table-column prop="level" label="运行等级" />
|
||||||
</el-table-column>
|
<el-table-column width="280" />
|
||||||
<el-table-column width="280">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -229,12 +243,12 @@
|
|||||||
timeList: [],
|
timeList: [],
|
||||||
levelList: [],
|
levelList: [],
|
||||||
tripNumberList: [],
|
tripNumberList: [],
|
||||||
serialNumberList: [],
|
serialNumberList: []
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '修改任务'
|
return '修改任务';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -249,30 +263,29 @@
|
|||||||
loadInitData(params) {
|
loadInitData(params) {
|
||||||
this.model.tripNumber = params.tripNumber;
|
this.model.tripNumber = params.tripNumber;
|
||||||
this.model.serviceNumber = params.serviceNumber;
|
this.model.serviceNumber = params.serviceNumber;
|
||||||
let editData = this.$store.state.runPlan.editData[params.serviceNumber]
|
const editData = this.$store.state.runPlan.editData[params.serviceNumber];
|
||||||
if (editData) {
|
if (editData) {
|
||||||
let tripNumberList = Object.keys(editData.trainMap).sort((a, b) => { return editData.trainMap[a].oldIndex - editData.trainMap[b].oldIndex });
|
const trainInfo = editData.trainMap[params.tripNumber];
|
||||||
let trainInfo = editData.trainMap[params.tripNumber];
|
const lastIndex = trainInfo.stationTimeList.length - 1;
|
||||||
let lastIndex = trainInfo.stationTimeList.length - 1;
|
const taskObj = {
|
||||||
let taskObj = {
|
|
||||||
tripNumber: params.tripNumber,
|
tripNumber: params.tripNumber,
|
||||||
beginStationCode: trainInfo.stationTimeList[0].stationCode,
|
beginStationCode: trainInfo.stationTimeList[0].stationCode,
|
||||||
beginStationStandCode: '',
|
beginStationStandCode: '',
|
||||||
endStationCode: trainInfo.stationTimeList[lastIndex].stationCode,
|
endStationCode: trainInfo.stationTimeList[lastIndex].stationCode,
|
||||||
endStationStandCode: ''
|
endStationStandCode: ''
|
||||||
}
|
};
|
||||||
this.model.route.push(taskObj);
|
this.model.route.push(taskObj);
|
||||||
|
|
||||||
trainInfo.stationTimeList.forEach((elem, index) => {
|
trainInfo.stationTimeList.forEach((elem, index) => {
|
||||||
let stationObj = {
|
const stationObj = {
|
||||||
stationCode: elem.stationCode,
|
stationCode: elem.stationCode,
|
||||||
startTime: index == 0 ? null : trainInfo.stationTimeList[index - 1].secondTime,
|
startTime: index == 0 ? null : trainInfo.stationTimeList[index - 1].secondTime,
|
||||||
stopTime: index == 0 ? null : elem.secondTime - trainInfo.stationTimeList[index - 1].secondTime,
|
stopTime: index == 0 ? null : elem.secondTime - trainInfo.stationTimeList[index - 1].secondTime,
|
||||||
endTime: elem.secondTime,
|
endTime: elem.secondTime,
|
||||||
level: '',
|
level: ''
|
||||||
}
|
};
|
||||||
this.model.detail.push(stationObj);
|
this.model.detail.push(stationObj);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doShow(params) {
|
doShow(params) {
|
||||||
@ -286,13 +299,11 @@
|
|||||||
handleCommit() {
|
handleCommit() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/deep/ {
|
/deep/ {
|
||||||
.el-button {
|
.el-button {
|
||||||
margin-left: 40px !important;
|
margin-left: 40px !important;
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__schedule add-task" :title="title" :visible.sync="dialogShow" width="800px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="beijing-01__schedule add-task"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="800px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="margin: 10px">
|
<div style="margin: 10px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
@ -11,9 +20,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" :offset="1">
|
<el-col :span="3" :offset="1">
|
||||||
@ -21,9 +33,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="model.startTime" placeholder="请选择">
|
<el-select v-model="model.startTime" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -36,9 +51,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" :offset="1">
|
<el-col :span="3" :offset="1">
|
||||||
@ -46,9 +64,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="model.startTime" placeholder="请选择">
|
<el-select v-model="model.startTime" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@ -58,14 +79,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-table :data="model.route" border :height="180">
|
<el-table :data="model.route" border :height="180">
|
||||||
<el-table-column prop="date" label="日期" width="180">
|
<el-table-column prop="date" label="日期" width="180" />
|
||||||
</el-table-column>
|
<el-table-column prop="name" label="姓名" width="180" />
|
||||||
<el-table-column prop="name" label="姓名" width="180">
|
<el-table-column prop="address" label="地址" />
|
||||||
</el-table-column>
|
<el-table-column width="20" />
|
||||||
<el-table-column prop="address" label="地址">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column width="20">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||||
@ -73,14 +90,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-table :data="model.detail" border :height="180">
|
<el-table :data="model.detail" border :height="180">
|
||||||
<el-table-column prop="date" label="日期" width="180">
|
<el-table-column prop="date" label="日期" width="180" />
|
||||||
</el-table-column>
|
<el-table-column prop="name" label="姓名" width="180" />
|
||||||
<el-table-column prop="name" label="姓名" width="180">
|
<el-table-column prop="address" label="地址" />
|
||||||
</el-table-column>
|
<el-table-column width="20" />
|
||||||
<el-table-column prop="address" label="地址">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column width="20">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -115,12 +128,12 @@
|
|||||||
route: [],
|
route: [],
|
||||||
detail: []
|
detail: []
|
||||||
},
|
},
|
||||||
tripNumberList: [],
|
tripNumberList: []
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '添加任务'
|
return '添加任务';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -139,12 +152,11 @@
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
|
|
||||||
/deep/ {
|
/deep/ {
|
||||||
.el-button {
|
.el-button {
|
||||||
margin-left: 40px !important;
|
margin-left: 40px !important;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
:title="title"
|
:title="title"
|
||||||
class="beijing-01__schedule choose-plan-template"
|
class="beijing-01__schedule choose-plan-template"
|
||||||
:visible.sync="dialogShow"
|
:visible.sync="dialogShow"
|
||||||
v-dialogDrag
|
width="70%"
|
||||||
width="80%"
|
|
||||||
:before-close="doClose"
|
:before-close="doClose"
|
||||||
:modal="false"
|
:modal="false"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
|
@ -111,7 +111,6 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
createRunPlanLoad(this.buildModel()).then(response => {
|
createRunPlanLoad(this.buildModel()).then(response => {
|
||||||
this.$message.success('创建运行图计划成功');
|
this.$message.success('创建运行图计划成功');
|
||||||
this.$emit('reloadTable', { name: 'managePlanList' });
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__schedule delete-task" :title="title" :visible.sync="dialogShow" width="400px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="beijing-01__schedule delete-task"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="400px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-radio v-model="type" :label="1">删除以前所有任务(包含本任务)</el-radio>
|
<el-radio v-model="type" :label="1">删除以前所有任务(包含本任务)</el-radio>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -26,12 +35,12 @@
|
|||||||
loading: false,
|
loading: false,
|
||||||
tripNumber: '',
|
tripNumber: '',
|
||||||
serviceNumber: '',
|
serviceNumber: '',
|
||||||
type: '1',
|
type: '1'
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '删除任务'
|
return '删除任务';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -51,7 +60,7 @@
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__schedule create-week-plan" :title="title" :visible.sync="dialogShow" width="400px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="beijing-01__schedule create-week-plan"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="400px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row type="flex" justify="center" class="button-group">
|
<el-row type="flex" justify="center" class="button-group">
|
||||||
<el-button @click="handleCommit">确 定</el-button>
|
<el-button @click="handleCommit">确 定</el-button>
|
||||||
<el-button @click="doClose">取 消</el-button>
|
<el-button @click="doClose">取 消</el-button>
|
||||||
@ -18,11 +27,11 @@
|
|||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '删除当天计划'
|
return '删除当天计划';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -40,7 +49,7 @@
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -1,13 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__schedule manage-plan-list" :title="title" :visible.sync="dialogShow" width="80%"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
class="beijing-01__schedule manage-plan-list"
|
||||||
</QueryListPage>
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="80%"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getRunPlanLoadList, deleteRunPlanLoad } from '@/api/runplan';
|
import { getRunPlanLoadList, deleteRunPlanLoad, listAllTempLateRunPlan } from '@/api/runplan';
|
||||||
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ManagePlanList',
|
name: 'ManagePlanList',
|
||||||
@ -21,13 +30,7 @@
|
|||||||
},
|
},
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '140px',
|
labelWidth: '140px',
|
||||||
reset: true,
|
reset: true
|
||||||
queryObject: {
|
|
||||||
runPlanName: {
|
|
||||||
type: 'text',
|
|
||||||
label: '运行图名称'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
queryList: {
|
queryList: {
|
||||||
query: this.queryFunction,
|
query: this.queryFunction,
|
||||||
@ -35,12 +38,18 @@
|
|||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '地图名称',
|
title: this.$t('publish.mapName'),
|
||||||
prop: 'mapName'
|
prop: 'mapId',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['id', 'name']); },
|
||||||
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '运行图名称',
|
title: this.$t('publish.runPlanName'),
|
||||||
prop: 'runPlanName',
|
prop: 'templatePlanId',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.$convertField(row.templatePlanId, this.templatePlanList, ['id', 'name']); },
|
||||||
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '加载日期',
|
title: '加载日期',
|
||||||
@ -60,21 +69,32 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
{ text: '创建', btnCode: 'employee_insert', handler: this.handleCreateRunPlan },
|
{ text: '创建', btnCode: 'employee_insert', handler: this.handleCreateRunPlan }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
currentModel: {}
|
currentModel: {}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '运行图计划表'
|
return '运行图计划表';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
mounted() {
|
||||||
|
this.loadPageData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
loadPageData() {
|
||||||
|
this.mapList = [];
|
||||||
|
listPublishMap().then(resp => {
|
||||||
|
this.mapList = resp.data;
|
||||||
|
});
|
||||||
|
this.templatePlanList = [];
|
||||||
|
listAllTempLateRunPlan().then(resp => {
|
||||||
|
this.templatePlanList = resp.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
if (this.$route.query.mapId) {
|
if (this.$route.query.mapId) {
|
||||||
params['mapId'] = this.$route.query.mapId;
|
params['mapId'] = this.$route.query.mapId;
|
||||||
@ -93,29 +113,30 @@
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteRunPlanLoad(row.id).then(response => {
|
deleteRunPlanLoad(row.id).then(response => {
|
||||||
this.$message.success('删除成功')
|
this.$message.success('删除成功');
|
||||||
this.reloadTable()
|
this.reloadTable();
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.reloadTable()
|
this.reloadTable();
|
||||||
this.$messageBox('删除失败')
|
this.$messageBox('删除失败');
|
||||||
})
|
});
|
||||||
}).catch(() => { })
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
handleCreateRunPlan() {
|
handleCreateRunPlan() {
|
||||||
this.$emit('dispatchDialog', { name: 'createWeekPlan' });
|
this.$emit('dispatchDialog', { name: 'createWeekPlan' });
|
||||||
},
|
},
|
||||||
doShow() {
|
doShow() {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(()=> { this.reloadTable(); });
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
},
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload()
|
this.queryList.reload();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -1,20 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__schedule edit-planning-train" :title="title" :visible.sync="dialogShow" width="800px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="beijing-01__schedule edit-planning-train"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="800px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :offset="10">列车线路</el-col>
|
<el-col :offset="10">列车线路</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="17">
|
<el-col :span="17">
|
||||||
<el-table :data="serviceData" border style="width: 100%" height="160">
|
<el-table :data="serviceData" border style="width: 100%" height="160">
|
||||||
<el-table-column prop="startStationCode" label="起点站">
|
<el-table-column prop="startStationCode" label="起点站" />
|
||||||
</el-table-column>
|
<el-table-column prop="startStationStandCode" label="起点站台" />
|
||||||
<el-table-column prop="startStationStandCode" label="起点站台">
|
<el-table-column prop="endStationCode" label="终点站" />
|
||||||
</el-table-column>
|
<el-table-column prop="endStationStandCode" label="终点站台" />
|
||||||
<el-table-column prop="endStationCode" label="终点站">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="endStationStandCode" label="终点站台">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" :offset="1">
|
<el-col :span="6" :offset="1">
|
||||||
@ -39,23 +44,23 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="view-box">
|
<el-row class="view-box">
|
||||||
<el-col :span="9" style="padding-left: 10px">
|
<el-col :span="9" style="padding-left: 10px">
|
||||||
<el-input v-model="oldServiceNumber" size="small" :disabled="true"></el-input>
|
<el-input v-model="oldServiceNumber" size="small" :disabled="true" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="9" style="padding-left: 20px">
|
<el-col :span="9" style="padding-left: 20px">
|
||||||
<el-input v-model="newServiceNumber" size="small"></el-input>
|
<el-input v-model="newServiceNumber" size="small" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" style="padding-left: 20px">
|
<el-col :span="5" style="padding-left: 20px">
|
||||||
<el-button @click="handleModifyingTripNumber" style="width: 150px;">改车次号</el-button>
|
<el-button style="width: 150px;" @click="handleModifyingTripNumber">改车次号</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-top: 10px">
|
<el-row style="margin-top: 10px">
|
||||||
<el-col :span="4"><span class="view-label">线路开始时间</span></el-col>
|
<el-col :span="4"><span class="view-label">线路开始时间</span></el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-time-select v-model="serviceStartTime" size="small"></el-time-select>
|
<el-time-select v-model="serviceStartTime" size="small" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4"><span class="view-label">线路结束时间</span></el-col>
|
<el-col :span="4"><span class="view-label">线路结束时间</span></el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-time-select v-model="serviceEndTime" size="small"></el-time-select>
|
<el-time-select v-model="serviceEndTime" size="small" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-top: 20px">
|
<el-row style="margin-top: 20px">
|
||||||
@ -63,16 +68,11 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-table :data="tripData" border style="width: 100%" height="200">
|
<el-table :data="tripData" border style="width: 100%" height="200">
|
||||||
<el-table-column prop="arriveTime" label="到站时间">
|
<el-table-column prop="arriveTime" label="到站时间" />
|
||||||
</el-table-column>
|
<el-table-column prop="stationCode" label="车站" />
|
||||||
<el-table-column prop="stationCode" label="车站">
|
<el-table-column prop="stationStandCode" label="站台" />
|
||||||
</el-table-column>
|
<el-table-column prop="stopTime" label="停站时间" />
|
||||||
<el-table-column prop="stationStandCode" label="站台">
|
<el-table-column prop="level" label="运行等级" />
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="stopTime" label="停站时间">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="level" label="运行等级">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-top: 20px">
|
<el-row style="margin-top: 20px">
|
||||||
@ -89,7 +89,7 @@
|
|||||||
import { formatTime, formatName } from '@/utils/runPlan';
|
import { formatTime, formatName } from '@/utils/runPlan';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'modifyingPlan',
|
name: 'ModifyingPlan',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
@ -101,12 +101,12 @@
|
|||||||
serviceStartTime: '',
|
serviceStartTime: '',
|
||||||
serviceEndTime: '',
|
serviceEndTime: '',
|
||||||
serviceData: [],
|
serviceData: [],
|
||||||
tripData: [],
|
tripData: []
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '修改'
|
return '修改';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -127,26 +127,26 @@
|
|||||||
},
|
},
|
||||||
// 加任务
|
// 加任务
|
||||||
handleAddTask() {
|
handleAddTask() {
|
||||||
this.$emit('dispatchDialog', { name: 'addTask', params: {} })
|
this.$emit('dispatchDialog', { name: 'addTask', params: {} });
|
||||||
},
|
},
|
||||||
// 替换
|
// 替换
|
||||||
handleReplace() {
|
handleReplace() {
|
||||||
this.$emit('dispatchDialog', { name: 'modifyingTask', params: {} })
|
this.$emit('dispatchDialog', { name: 'modifyingTask', params: {} });
|
||||||
},
|
},
|
||||||
// 删任务
|
// 删任务
|
||||||
handleDeleteTask() {
|
handleDeleteTask() {
|
||||||
this.$emit('dispatchDialog', { name: 'deleteTask', params: {} })
|
this.$emit('dispatchDialog', { name: 'deleteTask', params: {} });
|
||||||
},
|
},
|
||||||
// 改车次号
|
// 改车次号
|
||||||
handleModifyingTripNumber() {
|
handleModifyingTripNumber() {
|
||||||
this.$emit('dispatchDialog', { name: 'modifyingTripNumber', params: {} })
|
this.$emit('dispatchDialog', { name: 'modifyingTripNumber', params: {} });
|
||||||
},
|
},
|
||||||
// 确定修改
|
// 确定修改
|
||||||
handleCommit() {
|
handleCommit() {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
@ -157,13 +157,11 @@
|
|||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.view-label {
|
.view-label {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.view-box {
|
.view-box {
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
border: 1px inset gray;
|
border: 1px inset gray;
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__schedule add-task" :title="title" :visible.sync="dialogShow" width="1000px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="beijing-01__schedule add-task"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="1000px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="margin: 10px">
|
<div style="margin: 10px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
@ -9,10 +18,13 @@
|
|||||||
<span>车次号:</span>
|
<span>车次号:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="15">
|
<el-col :span="15">
|
||||||
<el-select style="display: inline-black" v-model="model.tripNumber" placeholder="请选择">
|
<el-select v-model="model.tripNumber" style="display: inline-black" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -30,10 +42,13 @@
|
|||||||
<span>缺省停站时间:</span>
|
<span>缺省停站时间:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-select style="display: inline-black" v-model="model.time" placeholder="请选择">
|
<el-select v-model="model.time" style="display: inline-black" placeholder="请选择">
|
||||||
<el-option v-for="item in timeList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in timeList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -44,7 +59,7 @@
|
|||||||
<span>表号:</span>
|
<span>表号:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="13">
|
<el-col :span="13">
|
||||||
<el-input v-model="model.serviceNumber"></el-input>
|
<el-input v-model="model.serviceNumber" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -73,10 +88,13 @@
|
|||||||
<span>序列号:</span>
|
<span>序列号:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="15">
|
<el-col :span="15">
|
||||||
<el-select style="display: inline-black" v-model="model.serialNumber" placeholder="请选择">
|
<el-select v-model="model.serialNumber" style="display: inline-black" placeholder="请选择">
|
||||||
<el-option v-for="item in serialNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="model.value">
|
v-for="item in serialNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="model.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -94,10 +112,13 @@
|
|||||||
<span>缺省运行等级:</span>
|
<span>缺省运行等级:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-select style="display: inline-black" v-model="model.level" placeholder="请选择">
|
<el-select v-model="model.level" style="display: inline-black" placeholder="请选择">
|
||||||
<el-option v-for="item in levelList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in levelList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -108,8 +129,7 @@
|
|||||||
<span>开始时间:</span>
|
<span>开始时间:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="13">
|
<el-col :span="13">
|
||||||
<el-time-select v-model="model.startTime" placeholder="选择时间" :clearable="false">
|
<el-time-select v-model="model.startTime" placeholder="选择时间" :clearable="false" />
|
||||||
</el-time-select>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -141,19 +161,15 @@
|
|||||||
{{ formatName(scope.row.beginStationCode) }}
|
{{ formatName(scope.row.beginStationCode) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="beginStationStandCode" label="起始站台">
|
<el-table-column prop="beginStationStandCode" label="起始站台" />
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="endStationCode" label="终到站">
|
<el-table-column prop="endStationCode" label="终到站">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ formatName(scope.row.endStationCode) }}
|
{{ formatName(scope.row.endStationCode) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="endStationStandCode" label="终到站台">
|
<el-table-column prop="endStationStandCode" label="终到站台" />
|
||||||
</el-table-column>
|
<el-table-column prop="describe" label="描述" :width="280" />
|
||||||
<el-table-column prop="describe" label="描述" :width="280">
|
<el-table-column :width="40" />
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :width="40">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||||
@ -181,10 +197,8 @@
|
|||||||
{{ formatTime(scope.row.endTime) }}
|
{{ formatTime(scope.row.endTime) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="level" label="运行等级">
|
<el-table-column prop="level" label="运行等级" />
|
||||||
</el-table-column>
|
<el-table-column width="280" />
|
||||||
<el-table-column width="280">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -229,12 +243,12 @@
|
|||||||
timeList: [],
|
timeList: [],
|
||||||
levelList: [],
|
levelList: [],
|
||||||
tripNumberList: [],
|
tripNumberList: [],
|
||||||
serialNumberList: [],
|
serialNumberList: []
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '修改任务'
|
return '修改任务';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -249,30 +263,29 @@
|
|||||||
loadInitData(params) {
|
loadInitData(params) {
|
||||||
this.model.tripNumber = params.tripNumber;
|
this.model.tripNumber = params.tripNumber;
|
||||||
this.model.serviceNumber = params.serviceNumber;
|
this.model.serviceNumber = params.serviceNumber;
|
||||||
let editData = this.$store.state.runPlan.editData[params.serviceNumber]
|
const editData = this.$store.state.runPlan.editData[params.serviceNumber];
|
||||||
if (editData) {
|
if (editData) {
|
||||||
let tripNumberList = Object.keys(editData.trainMap).sort((a, b) => { return editData.trainMap[a].oldIndex - editData.trainMap[b].oldIndex });
|
const trainInfo = editData.trainMap[params.tripNumber];
|
||||||
let trainInfo = editData.trainMap[params.tripNumber];
|
const lastIndex = trainInfo.stationTimeList.length - 1;
|
||||||
let lastIndex = trainInfo.stationTimeList.length - 1;
|
const taskObj = {
|
||||||
let taskObj = {
|
|
||||||
tripNumber: params.tripNumber,
|
tripNumber: params.tripNumber,
|
||||||
beginStationCode: trainInfo.stationTimeList[0].stationCode,
|
beginStationCode: trainInfo.stationTimeList[0].stationCode,
|
||||||
beginStationStandCode: '',
|
beginStationStandCode: '',
|
||||||
endStationCode: trainInfo.stationTimeList[lastIndex].stationCode,
|
endStationCode: trainInfo.stationTimeList[lastIndex].stationCode,
|
||||||
endStationStandCode: ''
|
endStationStandCode: ''
|
||||||
}
|
};
|
||||||
this.model.route.push(taskObj);
|
this.model.route.push(taskObj);
|
||||||
|
|
||||||
trainInfo.stationTimeList.forEach((elem, index) => {
|
trainInfo.stationTimeList.forEach((elem, index) => {
|
||||||
let stationObj = {
|
const stationObj = {
|
||||||
stationCode: elem.stationCode,
|
stationCode: elem.stationCode,
|
||||||
startTime: index == 0 ? null : trainInfo.stationTimeList[index - 1].secondTime,
|
startTime: index == 0 ? null : trainInfo.stationTimeList[index - 1].secondTime,
|
||||||
stopTime: index == 0 ? null : elem.secondTime - trainInfo.stationTimeList[index - 1].secondTime,
|
stopTime: index == 0 ? null : elem.secondTime - trainInfo.stationTimeList[index - 1].secondTime,
|
||||||
endTime: elem.secondTime,
|
endTime: elem.secondTime,
|
||||||
level: '',
|
level: ''
|
||||||
}
|
};
|
||||||
this.model.detail.push(stationObj);
|
this.model.detail.push(stationObj);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doShow(params) {
|
doShow(params) {
|
||||||
@ -286,13 +299,11 @@
|
|||||||
handleCommit() {
|
handleCommit() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/deep/ {
|
/deep/ {
|
||||||
.el-button {
|
.el-button {
|
||||||
margin-left: 40px !important;
|
margin-left: 40px !important;
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__schedule add-task" :title="title" :visible.sync="dialogShow" width="800px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__schedule add-task"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="800px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="margin: 10px">
|
<div style="margin: 10px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
@ -11,9 +20,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" :offset="1">
|
<el-col :span="3" :offset="1">
|
||||||
@ -21,9 +33,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="model.startTime" placeholder="请选择">
|
<el-select v-model="model.startTime" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -36,9 +51,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" :offset="1">
|
<el-col :span="3" :offset="1">
|
||||||
@ -46,9 +64,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-select v-model="model.startTime" placeholder="请选择">
|
<el-select v-model="model.startTime" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@ -58,14 +79,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-table :data="model.route" border :height="180">
|
<el-table :data="model.route" border :height="180">
|
||||||
<el-table-column prop="date" label="日期" width="180">
|
<el-table-column prop="date" label="日期" width="180" />
|
||||||
</el-table-column>
|
<el-table-column prop="name" label="姓名" width="180" />
|
||||||
<el-table-column prop="name" label="姓名" width="180">
|
<el-table-column prop="address" label="地址" />
|
||||||
</el-table-column>
|
<el-table-column width="20" />
|
||||||
<el-table-column prop="address" label="地址">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column width="20">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||||
@ -73,14 +90,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-table :data="model.detail" border :height="180">
|
<el-table :data="model.detail" border :height="180">
|
||||||
<el-table-column prop="date" label="日期" width="180">
|
<el-table-column prop="date" label="日期" width="180" />
|
||||||
</el-table-column>
|
<el-table-column prop="name" label="姓名" width="180" />
|
||||||
<el-table-column prop="name" label="姓名" width="180">
|
<el-table-column prop="address" label="地址" />
|
||||||
</el-table-column>
|
<el-table-column width="20" />
|
||||||
<el-table-column prop="address" label="地址">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column width="20">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -115,12 +128,12 @@
|
|||||||
route: [],
|
route: [],
|
||||||
detail: []
|
detail: []
|
||||||
},
|
},
|
||||||
tripNumberList: [],
|
tripNumberList: []
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '添加任务'
|
return '添加任务';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -139,12 +152,11 @@
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
|
|
||||||
/deep/ {
|
/deep/ {
|
||||||
.el-button {
|
.el-button {
|
||||||
margin-left: 40px !important;
|
margin-left: 40px !important;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
:title="title"
|
:title="title"
|
||||||
class="fuzhou-01__schedule choose-plan-template"
|
class="fuzhou-01__schedule choose-plan-template"
|
||||||
:visible.sync="dialogShow"
|
:visible.sync="dialogShow"
|
||||||
width="80%"
|
width="70%"
|
||||||
:before-close="doClose"
|
:before-close="doClose"
|
||||||
:modal="false"
|
:modal="false"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
@ -93,11 +93,11 @@ export default {
|
|||||||
return runPlanTemplateList(params);
|
return runPlanTemplateList(params);
|
||||||
},
|
},
|
||||||
handleConfirm() {
|
handleConfirm() {
|
||||||
this.doClose();
|
|
||||||
if (this.$refs && this.$refs.pageRules) {
|
if (this.$refs && this.$refs.pageRules) {
|
||||||
const choose = this.$refs.pageRules.currentChoose();
|
const choose = this.$refs.pageRules.currentChoose();
|
||||||
if (choose) {
|
if (choose) {
|
||||||
this.$emit('chooseConfirm', choose);
|
this.$emit('chooseConfirm', choose);
|
||||||
|
this.doClose();
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox(`请选择模板运行图`);
|
this.$messageBox(`请选择模板运行图`);
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,6 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
createRunPlanLoad(this.buildModel()).then(response => {
|
createRunPlanLoad(this.buildModel()).then(response => {
|
||||||
this.$message.success('创建运行图计划成功');
|
this.$message.success('创建运行图计划成功');
|
||||||
this.$emit('reloadTable', { name: 'managePlanList' });
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__schedule delete-task" :title="title" :visible.sync="dialogShow" width="400px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__schedule delete-task"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="400px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-radio v-model="type" :label="1">删除以前所有任务(包含本任务)</el-radio>
|
<el-radio v-model="type" :label="1">删除以前所有任务(包含本任务)</el-radio>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -26,12 +35,12 @@
|
|||||||
loading: false,
|
loading: false,
|
||||||
tripNumber: '',
|
tripNumber: '',
|
||||||
serviceNumber: '',
|
serviceNumber: '',
|
||||||
type: '1',
|
type: '1'
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '删除任务'
|
return '删除任务';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -51,7 +60,7 @@
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__schedule create-week-plan" :title="title" :visible.sync="dialogShow" width="400px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__schedule create-week-plan"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="400px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row type="flex" justify="center" class="button-group">
|
<el-row type="flex" justify="center" class="button-group">
|
||||||
<el-button @click="commit">确 定</el-button>
|
<el-button @click="commit">确 定</el-button>
|
||||||
<el-button @click="doClose">取 消</el-button>
|
<el-button @click="doClose">取 消</el-button>
|
||||||
@ -18,11 +27,11 @@
|
|||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '删除当天计划'
|
return '删除当天计划';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -40,7 +49,7 @@
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getRunPlanLoadList, deleteRunPlanLoad } from '@/api/runplan';
|
import { getRunPlanLoadList, deleteRunPlanLoad, listAllTempLateRunPlan } from '@/api/runplan';
|
||||||
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ManagePlanList',
|
name: 'ManagePlanList',
|
||||||
@ -29,13 +30,7 @@ export default {
|
|||||||
},
|
},
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '140px',
|
labelWidth: '140px',
|
||||||
reset: true,
|
reset: true
|
||||||
queryObject: {
|
|
||||||
runPlanName: {
|
|
||||||
type: 'text',
|
|
||||||
label: '运行图名称'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
queryList: {
|
queryList: {
|
||||||
query: this.queryFunction,
|
query: this.queryFunction,
|
||||||
@ -43,12 +38,18 @@ export default {
|
|||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '地图名称',
|
title: this.$t('publish.mapName'),
|
||||||
prop: 'mapName'
|
prop: 'mapId',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['id', 'name']); },
|
||||||
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '运行图名称',
|
title: this.$t('publish.runPlanName'),
|
||||||
prop: 'runPlanName'
|
prop: 'templatePlanId',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.$convertField(row.templatePlanId, this.templatePlanList, ['id', 'name']); },
|
||||||
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '加载日期',
|
title: '加载日期',
|
||||||
@ -80,9 +81,20 @@ export default {
|
|||||||
return '运行图计划表';
|
return '运行图计划表';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
mounted() {
|
||||||
|
this.loadPageData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
loadPageData() {
|
||||||
|
this.mapList = [];
|
||||||
|
listPublishMap().then(resp => {
|
||||||
|
this.mapList = resp.data;
|
||||||
|
});
|
||||||
|
this.templatePlanList = [];
|
||||||
|
listAllTempLateRunPlan().then(resp => {
|
||||||
|
this.templatePlanList = resp.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
if (this.$route.query.mapId) {
|
if (this.$route.query.mapId) {
|
||||||
params['mapId'] = this.$route.query.mapId;
|
params['mapId'] = this.$route.query.mapId;
|
||||||
@ -114,6 +126,7 @@ export default {
|
|||||||
},
|
},
|
||||||
doShow() {
|
doShow() {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(()=> { this.reloadTable(); });
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -1,20 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__schedule edit-planning-train" :title="title" :visible.sync="dialogShow" width="800px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__schedule edit-planning-train"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="800px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :offset="10">列车线路</el-col>
|
<el-col :offset="10">列车线路</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="17">
|
<el-col :span="17">
|
||||||
<el-table :data="serviceData" border style="width: 100%" height="160">
|
<el-table :data="serviceData" border style="width: 100%" height="160">
|
||||||
<el-table-column prop="startStationCode" label="起点站">
|
<el-table-column prop="startStationCode" label="起点站" />
|
||||||
</el-table-column>
|
<el-table-column prop="startStationStandCode" label="起点站台" />
|
||||||
<el-table-column prop="startStationStandCode" label="起点站台">
|
<el-table-column prop="endStationCode" label="终点站" />
|
||||||
</el-table-column>
|
<el-table-column prop="endStationStandCode" label="终点站台" />
|
||||||
<el-table-column prop="endStationCode" label="终点站">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="endStationStandCode" label="终点站台">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" :offset="1">
|
<el-col :span="6" :offset="1">
|
||||||
@ -39,23 +44,23 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="view-box">
|
<el-row class="view-box">
|
||||||
<el-col :span="9" style="padding-left: 10px">
|
<el-col :span="9" style="padding-left: 10px">
|
||||||
<el-input v-model="oldServiceNumber" size="small" :disabled="true"></el-input>
|
<el-input v-model="oldServiceNumber" size="small" :disabled="true" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="9" style="padding-left: 20px">
|
<el-col :span="9" style="padding-left: 20px">
|
||||||
<el-input v-model="newServiceNumber" size="small"></el-input>
|
<el-input v-model="newServiceNumber" size="small" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" style="padding-left: 20px">
|
<el-col :span="5" style="padding-left: 20px">
|
||||||
<el-button @click="handleModifyingTripNumber" style="width: 150px;">改车次号</el-button>
|
<el-button style="width: 150px;" @click="handleModifyingTripNumber">改车次号</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-top: 10px">
|
<el-row style="margin-top: 10px">
|
||||||
<el-col :span="4"><span class="view-label">线路开始时间</span></el-col>
|
<el-col :span="4"><span class="view-label">线路开始时间</span></el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-time-select v-model="serviceStartTime" size="small"></el-time-select>
|
<el-time-select v-model="serviceStartTime" size="small" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4"><span class="view-label">线路结束时间</span></el-col>
|
<el-col :span="4"><span class="view-label">线路结束时间</span></el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-time-select v-model="serviceEndTime" size="small"></el-time-select>
|
<el-time-select v-model="serviceEndTime" size="small" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-top: 20px">
|
<el-row style="margin-top: 20px">
|
||||||
@ -63,16 +68,11 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-table :data="tripData" border style="width: 100%" height="200">
|
<el-table :data="tripData" border style="width: 100%" height="200">
|
||||||
<el-table-column prop="arriveTime" label="到站时间">
|
<el-table-column prop="arriveTime" label="到站时间" />
|
||||||
</el-table-column>
|
<el-table-column prop="stationCode" label="车站" />
|
||||||
<el-table-column prop="stationCode" label="车站">
|
<el-table-column prop="stationStandCode" label="站台" />
|
||||||
</el-table-column>
|
<el-table-column prop="stopTime" label="停站时间" />
|
||||||
<el-table-column prop="stationStandCode" label="站台">
|
<el-table-column prop="level" label="运行等级" />
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="stopTime" label="停站时间">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="level" label="运行等级">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-top: 20px">
|
<el-row style="margin-top: 20px">
|
||||||
@ -89,7 +89,7 @@
|
|||||||
import { formatTime, formatName } from '@/utils/runPlan';
|
import { formatTime, formatName } from '@/utils/runPlan';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'modifyingPlan',
|
name: 'ModifyingPlan',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
@ -101,12 +101,12 @@
|
|||||||
serviceStartTime: '',
|
serviceStartTime: '',
|
||||||
serviceEndTime: '',
|
serviceEndTime: '',
|
||||||
serviceData: [],
|
serviceData: [],
|
||||||
tripData: [],
|
tripData: []
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '修改'
|
return '修改';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -127,26 +127,26 @@
|
|||||||
},
|
},
|
||||||
// 加任务
|
// 加任务
|
||||||
handleAddTask() {
|
handleAddTask() {
|
||||||
this.$emit('dispatchDialog', { name: 'addTask', params: {} })
|
this.$emit('dispatchDialog', { name: 'addTask', params: {} });
|
||||||
},
|
},
|
||||||
// 替换
|
// 替换
|
||||||
handleReplace() {
|
handleReplace() {
|
||||||
this.$emit('dispatchDialog', { name: 'modifyingTask', params: {} })
|
this.$emit('dispatchDialog', { name: 'modifyingTask', params: {} });
|
||||||
},
|
},
|
||||||
// 删任务
|
// 删任务
|
||||||
handleDeleteTask() {
|
handleDeleteTask() {
|
||||||
this.$emit('dispatchDialog', { name: 'deleteTask', params: {} })
|
this.$emit('dispatchDialog', { name: 'deleteTask', params: {} });
|
||||||
},
|
},
|
||||||
// 改车次号
|
// 改车次号
|
||||||
handleModifyingTripNumber() {
|
handleModifyingTripNumber() {
|
||||||
this.$emit('dispatchDialog', { name: 'modifyingTripNumber', params: {} })
|
this.$emit('dispatchDialog', { name: 'modifyingTripNumber', params: {} });
|
||||||
},
|
},
|
||||||
// 确定修改
|
// 确定修改
|
||||||
commit() {
|
commit() {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
@ -157,13 +157,11 @@
|
|||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.view-label {
|
.view-label {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.view-box {
|
.view-box {
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
border: 1px inset gray;
|
border: 1px inset gray;
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__schedule add-task" :title="title" :visible.sync="dialogShow" width="1000px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__schedule add-task"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="1000px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="margin: 10px">
|
<div style="margin: 10px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
@ -9,10 +18,13 @@
|
|||||||
<span>车次号:</span>
|
<span>车次号:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="15">
|
<el-col :span="15">
|
||||||
<el-select style="display: inline-black" v-model="model.tripNumber" placeholder="请选择">
|
<el-select v-model="model.tripNumber" style="display: inline-black" placeholder="请选择">
|
||||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in tripNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -30,10 +42,13 @@
|
|||||||
<span>缺省停站时间:</span>
|
<span>缺省停站时间:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-select style="display: inline-black" v-model="model.time" placeholder="请选择">
|
<el-select v-model="model.time" style="display: inline-black" placeholder="请选择">
|
||||||
<el-option v-for="item in timeList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in timeList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -44,7 +59,7 @@
|
|||||||
<span>表号:</span>
|
<span>表号:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="13">
|
<el-col :span="13">
|
||||||
<el-input v-model="model.serviceNumber"></el-input>
|
<el-input v-model="model.serviceNumber" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -73,10 +88,13 @@
|
|||||||
<span>序列号:</span>
|
<span>序列号:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="15">
|
<el-col :span="15">
|
||||||
<el-select style="display: inline-black" v-model="model.serialNumber" placeholder="请选择">
|
<el-select v-model="model.serialNumber" style="display: inline-black" placeholder="请选择">
|
||||||
<el-option v-for="item in serialNumberList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="model.value">
|
v-for="item in serialNumberList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="model.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -94,10 +112,13 @@
|
|||||||
<span>缺省运行等级:</span>
|
<span>缺省运行等级:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-select style="display: inline-black" v-model="model.level" placeholder="请选择">
|
<el-select v-model="model.level" style="display: inline-black" placeholder="请选择">
|
||||||
<el-option v-for="item in levelList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in levelList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -108,8 +129,7 @@
|
|||||||
<span>开始时间:</span>
|
<span>开始时间:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="13">
|
<el-col :span="13">
|
||||||
<el-time-select v-model="model.startTime" placeholder="选择时间" :clearable="false">
|
<el-time-select v-model="model.startTime" placeholder="选择时间" :clearable="false" />
|
||||||
</el-time-select>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -141,19 +161,15 @@
|
|||||||
{{ formatName(scope.row.beginStationCode) }}
|
{{ formatName(scope.row.beginStationCode) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="beginStationStandCode" label="起始站台">
|
<el-table-column prop="beginStationStandCode" label="起始站台" />
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="endStationCode" label="终到站">
|
<el-table-column prop="endStationCode" label="终到站">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ formatName(scope.row.endStationCode) }}
|
{{ formatName(scope.row.endStationCode) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="endStationStandCode" label="终到站台">
|
<el-table-column prop="endStationStandCode" label="终到站台" />
|
||||||
</el-table-column>
|
<el-table-column prop="describe" label="描述" :width="280" />
|
||||||
<el-table-column prop="describe" label="描述" :width="280">
|
<el-table-column :width="40" />
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :width="40">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||||
@ -181,10 +197,8 @@
|
|||||||
{{ formatTime(scope.row.endTime) }}
|
{{ formatTime(scope.row.endTime) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="level" label="运行等级">
|
<el-table-column prop="level" label="运行等级" />
|
||||||
</el-table-column>
|
<el-table-column width="280" />
|
||||||
<el-table-column width="280">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -229,12 +243,12 @@
|
|||||||
timeList: [],
|
timeList: [],
|
||||||
levelList: [],
|
levelList: [],
|
||||||
tripNumberList: [],
|
tripNumberList: [],
|
||||||
serialNumberList: [],
|
serialNumberList: []
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '修改任务'
|
return '修改任务';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -249,30 +263,29 @@
|
|||||||
loadInitData(params) {
|
loadInitData(params) {
|
||||||
this.model.tripNumber = params.tripNumber;
|
this.model.tripNumber = params.tripNumber;
|
||||||
this.model.serviceNumber = params.serviceNumber;
|
this.model.serviceNumber = params.serviceNumber;
|
||||||
let editData = this.$store.state.runPlan.editData[params.serviceNumber]
|
const editData = this.$store.state.runPlan.editData[params.serviceNumber];
|
||||||
if (editData) {
|
if (editData) {
|
||||||
let tripNumberList = Object.keys(editData.trainMap).sort((a, b) => { return editData.trainMap[a].oldIndex - editData.trainMap[b].oldIndex });
|
const trainInfo = editData.trainMap[params.tripNumber];
|
||||||
let trainInfo = editData.trainMap[params.tripNumber];
|
const lastIndex = trainInfo.stationTimeList.length - 1;
|
||||||
let lastIndex = trainInfo.stationTimeList.length - 1;
|
const taskObj = {
|
||||||
let taskObj = {
|
|
||||||
tripNumber: params.tripNumber,
|
tripNumber: params.tripNumber,
|
||||||
beginStationCode: trainInfo.stationTimeList[0].stationCode,
|
beginStationCode: trainInfo.stationTimeList[0].stationCode,
|
||||||
beginStationStandCode: '',
|
beginStationStandCode: '',
|
||||||
endStationCode: trainInfo.stationTimeList[lastIndex].stationCode,
|
endStationCode: trainInfo.stationTimeList[lastIndex].stationCode,
|
||||||
endStationStandCode: ''
|
endStationStandCode: ''
|
||||||
}
|
};
|
||||||
this.model.route.push(taskObj);
|
this.model.route.push(taskObj);
|
||||||
|
|
||||||
trainInfo.stationTimeList.forEach((elem, index) => {
|
trainInfo.stationTimeList.forEach((elem, index) => {
|
||||||
let stationObj = {
|
const stationObj = {
|
||||||
stationCode: elem.stationCode,
|
stationCode: elem.stationCode,
|
||||||
startTime: index == 0 ? null : trainInfo.stationTimeList[index - 1].secondTime,
|
startTime: index == 0 ? null : trainInfo.stationTimeList[index - 1].secondTime,
|
||||||
stopTime: index == 0 ? null : elem.secondTime - trainInfo.stationTimeList[index - 1].secondTime,
|
stopTime: index == 0 ? null : elem.secondTime - trainInfo.stationTimeList[index - 1].secondTime,
|
||||||
endTime: elem.secondTime,
|
endTime: elem.secondTime,
|
||||||
level: '',
|
level: ''
|
||||||
}
|
};
|
||||||
this.model.detail.push(stationObj);
|
this.model.detail.push(stationObj);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doShow(params) {
|
doShow(params) {
|
||||||
@ -286,13 +299,11 @@
|
|||||||
commit() {
|
commit() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/deep/ {
|
/deep/ {
|
||||||
.el-button {
|
.el-button {
|
||||||
margin-left: 40px !important;
|
margin-left: 40px !important;
|
||||||
|
@ -388,13 +388,13 @@ export const asyncRouter = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
path: 'ibp/edit',
|
// path: 'ibp/edit',
|
||||||
component: IbpEdit,
|
// component: IbpEdit,
|
||||||
meta: {
|
// meta: {
|
||||||
i18n: 'router.ibpDraw'
|
// i18n: 'router.ibpDraw'
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
path: 'runPlan',
|
path: 'runPlan',
|
||||||
redirect: '/map/runPlan/view/draft',
|
redirect: '/map/runPlan/view/draft',
|
||||||
@ -742,7 +742,7 @@ export const asyncRouter = [
|
|||||||
path: 'manage',
|
path: 'manage',
|
||||||
component: Package,
|
component: Package,
|
||||||
meta: {
|
meta: {
|
||||||
i18n: 'router.permissionManage'
|
i18n: 'router.selfPermission'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
173
src/views/components/editTable/index.vue
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-table
|
||||||
|
:size="size"
|
||||||
|
:stripe="stripe"
|
||||||
|
:border="border"
|
||||||
|
:data="tableData"
|
||||||
|
:max-height="maxHeight"
|
||||||
|
:height="height"
|
||||||
|
>
|
||||||
|
<el-table-column v-if="tableForm.index" fixed type="index" />
|
||||||
|
<template v-for="(column, index) in tableForm.columns">
|
||||||
|
<el-table-column
|
||||||
|
v-if="checkFieldType(column.type, 'text')"
|
||||||
|
:key="index"
|
||||||
|
:prop="column.prop"
|
||||||
|
:label="column.title"
|
||||||
|
:width="column.width || labelWidth"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
>
|
||||||
|
<template slot-scope="scopeT" @focus="handleFocus" @blur="handleBlur">
|
||||||
|
<template v-if="column.editable && (scopeT.row.editing || column.editing)">
|
||||||
|
<el-input v-model="scopeT.row[column.prop]" :size="size" />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
{{ formatText(column, scopeT.row) }}
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
v-if="checkFieldType(column.type, 'select')"
|
||||||
|
:key="index"
|
||||||
|
:prop="column.prop"
|
||||||
|
:label="column.title"
|
||||||
|
:width="column.width || labelWidth"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
>
|
||||||
|
<template slot-scope="scopeS">
|
||||||
|
<template v-if="column.editable && (scopeS.row.editing || column.editing)">
|
||||||
|
<el-select v-model="scopeS.row[column.prop]" :size="size">
|
||||||
|
<el-option
|
||||||
|
v-for="item in obtainOptions(column)"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
{{ formatText(column, scopeS.row) }}
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
v-if="checkFieldType(column.type, 'tag')"
|
||||||
|
:key="index"
|
||||||
|
:prop="column.prop"
|
||||||
|
:label="column.title"
|
||||||
|
:width="column.width || labelWidth"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
>
|
||||||
|
<template slot-scope="scopeG">
|
||||||
|
<template v-for="tag in column.columnValue(scopeG.row)">
|
||||||
|
<el-tag
|
||||||
|
:key="tag"
|
||||||
|
:type="column.tagType(scopeG.row, scopeG.$index)"
|
||||||
|
style="margin-right: 10px; margin-bottom: 5px;"
|
||||||
|
>{{ tag }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
v-if="checkFieldType(column.type, 'button')"
|
||||||
|
:key="index"
|
||||||
|
fixed="right"
|
||||||
|
:prop="column.prop"
|
||||||
|
:label="column.title"
|
||||||
|
:width="column.width || labelWidth"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
>
|
||||||
|
<template slot-scope="scopeB">
|
||||||
|
<el-button :size="size" type="warning" @click.native.prevent="handleFocus(scopeB)">编辑</el-button>
|
||||||
|
<template v-for="(action,idx) in column.buttons">
|
||||||
|
<el-button :key="idx" :size="size" :type="action.type" @click.native.prevent="handleClick(action, scopeB)">{{ action.name }}</el-button>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</template>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
maxHeight: {
|
||||||
|
type: Number,
|
||||||
|
default() {
|
||||||
|
return 400;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: Number,
|
||||||
|
default() {
|
||||||
|
return 400;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
size: {
|
||||||
|
type: String,
|
||||||
|
default() {
|
||||||
|
return 'mini';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
border: {
|
||||||
|
type: Boolean
|
||||||
|
},
|
||||||
|
stripe: {
|
||||||
|
type: Boolean
|
||||||
|
},
|
||||||
|
tableData: {
|
||||||
|
type: Array,
|
||||||
|
default() {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tableForm: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
scope: null,
|
||||||
|
labelWidth: '120'
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
obtainOptions(column) {
|
||||||
|
return column.options();
|
||||||
|
},
|
||||||
|
checkFieldType(field, type) {
|
||||||
|
return field == type;
|
||||||
|
},
|
||||||
|
formatText(column, row) {
|
||||||
|
return column.format ? column.format(row) : row[column.prop];
|
||||||
|
},
|
||||||
|
handleClick(action, scope) {
|
||||||
|
this.handleBlur(this.scope);
|
||||||
|
action.handleClick(scope.$index, scope.row);
|
||||||
|
},
|
||||||
|
handleFocus(scope) {
|
||||||
|
this.handleBlur(this.scope);
|
||||||
|
this.$set(this.tableData[scope.$index], 'editing', true);
|
||||||
|
this.scope = scope;
|
||||||
|
},
|
||||||
|
handleBlur(scope) {
|
||||||
|
if (scope) {
|
||||||
|
this.$set(this.tableData[scope.$index], 'editing', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
/deep/ .el-table {
|
||||||
|
td,th {
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
td:nth-child(1), th:nth-child(1) {
|
||||||
|
background: #fefefe;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getTotalRemains } from '@/api/management/author';
|
import { getTotalRemains } from '@/api/management/author';
|
||||||
import { PermissionType, OperatorModel } from '@/scripts/ConstDic';
|
import { PermissionType } from '@/scripts/ConstDic';
|
||||||
import { giveLessons } from '@/api/management/distribute';
|
import { giveLessons } from '@/api/management/distribute';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -47,6 +47,7 @@ export default {
|
|||||||
return form;
|
return form;
|
||||||
},
|
},
|
||||||
rules() {
|
rules() {
|
||||||
|
const that = this;
|
||||||
const crules = {
|
const crules = {
|
||||||
total: [
|
total: [
|
||||||
{ required: true, message: this.$t('global.pleaseInputPermissionNumber'), trigger: 'change' },
|
{ required: true, message: this.$t('global.pleaseInputPermissionNumber'), trigger: 'change' },
|
||||||
@ -55,7 +56,7 @@ export default {
|
|||||||
if (Number.isInteger(Number(value)) && Number(value) > 0) {
|
if (Number.isInteger(Number(value)) && Number(value) > 0) {
|
||||||
callback();
|
callback();
|
||||||
} else {
|
} else {
|
||||||
callback(new Error(this.$t('global.permissionGreaterThen0')));
|
callback(new Error(that.$t('global.permissionGreaterThen0')));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
@ -102,21 +103,19 @@ export default {
|
|||||||
this.maxTotal = 0;
|
this.maxTotal = 0;
|
||||||
if (endTime && startTime) {
|
if (endTime && startTime) {
|
||||||
const model = {
|
const model = {
|
||||||
// lessonId: this.formModel.lessonId,
|
|
||||||
startTime: startTime,
|
startTime: startTime,
|
||||||
endTime: endTime,
|
endTime: endTime,
|
||||||
type: this.PermissionType
|
permissionType: this.PermissionType
|
||||||
// mapId: this.mapId,
|
|
||||||
// mapProductCode: this.prdCode,
|
|
||||||
};
|
};
|
||||||
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
||||||
model['lessonId'] = this.formModel.lessonId;
|
model['lessonId'] = this.formModel.lessonId;
|
||||||
model['mapId'] = this.mapId;
|
model['mapId'] = this.mapId;
|
||||||
model['mapProductCode'] = this.prdCode;
|
model['prdCode'] = this.prdCode;
|
||||||
} else if (this.PermissionType == PermissionType.SIMULATION) {
|
} else if (this.PermissionType == PermissionType.SIMULATION) {
|
||||||
model['mapId'] = this.mapId;
|
model['mapId'] = this.mapId;
|
||||||
model['mapProductCode'] = this.prdCode;
|
model['prdCode'] = this.prdCode;
|
||||||
}
|
}
|
||||||
|
// 获取用户某课程某段时间内可用的权限数量
|
||||||
getTotalRemains(model).then(response => {
|
getTotalRemains(model).then(response => {
|
||||||
this.maxTotal = response.data;
|
this.maxTotal = response.data;
|
||||||
if (this.maxTotal == 0) {
|
if (this.maxTotal == 0) {
|
||||||
@ -146,23 +145,20 @@ export default {
|
|||||||
handleSure() {
|
handleSure() {
|
||||||
this.$refs.dataform.validateForm(() => {
|
this.$refs.dataform.validateForm(() => {
|
||||||
const model = {
|
const model = {
|
||||||
// lessonId: this.formModel.lessonId,
|
|
||||||
startTime: this.formModel.date[0],
|
startTime: this.formModel.date[0],
|
||||||
endTime: this.formModel.date[1],
|
endTime: this.formModel.date[1],
|
||||||
permissionType: this.PermissionType,
|
permissionType: this.PermissionType,
|
||||||
operator: OperatorModel.DISTRIBUTE,
|
|
||||||
amount: this.formModel.total
|
amount: this.formModel.total
|
||||||
// mapId: this.mapId,
|
|
||||||
// mapProductCode: this.prdCode,
|
|
||||||
};
|
};
|
||||||
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
||||||
model['lessonId'] = this.formModel.lessonId;
|
model['lessonId'] = this.formModel.lessonId;
|
||||||
model['mapId'] = this.mapId;
|
model['mapId'] = this.mapId;
|
||||||
model['mapProductCode'] = this.prdCode;
|
model['prdCode'] = this.prdCode;
|
||||||
} else if (this.PermissionType == PermissionType.SIMULATION) {
|
} else if (this.PermissionType == PermissionType.SIMULATION) {
|
||||||
model['mapId'] = this.mapId;
|
model['mapId'] = this.mapId;
|
||||||
model['mapProductCode'] = this.prdCode;
|
model['prdCode'] = this.prdCode;
|
||||||
}
|
}
|
||||||
|
// 权限分发请求
|
||||||
giveLessons(model).then(response => {
|
giveLessons(model).then(response => {
|
||||||
const url = response.data;
|
const url = response.data;
|
||||||
this.$emit('QrCodeShow', {
|
this.$emit('QrCodeShow', {
|
||||||
|
@ -12,8 +12,7 @@
|
|||||||
<el-table-column prop="endTime" :label="`${$t('global.endTime')}`" />
|
<el-table-column prop="endTime" :label="`${$t('global.endTime')}`" />
|
||||||
<el-table-column prop="forever" :label="`${$t('global.isForever')}`">
|
<el-table-column prop="forever" :label="`${$t('global.isForever')}`">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag :type="scope.row.forever? 'success': 'primary'" disable-transitions>{{ $ConstSelect.translate(scope.row.forever,
|
<el-tag :type="scope.row.forever? 'success': 'primary'" disable-transitions>{{ $ConstSelect.translate(scope.row.forever, 'Whether') }}</el-tag>
|
||||||
'Whether') }}</el-tag>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="amount" :label="$t('global.total')" />
|
<el-table-column prop="amount" :label="$t('global.total')" />
|
||||||
@ -102,12 +101,12 @@ export default {
|
|||||||
});
|
});
|
||||||
return sums;
|
return sums;
|
||||||
},
|
},
|
||||||
transfer(courseModel) {
|
transfer(courseModel) { // 转增
|
||||||
if (this.$refs) {
|
if (this.$refs) {
|
||||||
this.$refs.transfer.doShow(courseModel);
|
this.$refs.transfer.doShow(courseModel);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
distribute(courseModel) {
|
distribute(courseModel) { // 分发
|
||||||
if (this.$refs) {
|
if (this.$refs) {
|
||||||
this.$refs.distribute.doShow(courseModel);
|
this.$refs.distribute.doShow(courseModel);
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getTotalRemains } from '@/api/management/author';
|
import { getTotalRemains } from '@/api/management/author';
|
||||||
import { giveLessons } from '@/api/management/distribute';
|
import { permissionTurnAdd } from '@/api/management/distribute';
|
||||||
import { PermissionType, OperatorModel } from '@/scripts/ConstDic';
|
import { PermissionType } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'GoLsesson',
|
name: 'GoLsesson',
|
||||||
@ -54,6 +54,7 @@ export default {
|
|||||||
return form;
|
return form;
|
||||||
},
|
},
|
||||||
rules() {
|
rules() {
|
||||||
|
const that = this;
|
||||||
const crules = {
|
const crules = {
|
||||||
total: [
|
total: [
|
||||||
{ required: true, message: this.$t('global.pleaseInputPermissionNumber'), trigger: 'change' },
|
{ required: true, message: this.$t('global.pleaseInputPermissionNumber'), trigger: 'change' },
|
||||||
@ -62,7 +63,7 @@ export default {
|
|||||||
if (Number.isInteger(Number(value)) && Number(value) > 0) {
|
if (Number.isInteger(Number(value)) && Number(value) > 0) {
|
||||||
callback();
|
callback();
|
||||||
} else {
|
} else {
|
||||||
callback(new Error(this.$t('global.permissionGreaterThen0')));
|
callback(new Error(that.$t('global.permissionGreaterThen0')));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
@ -109,20 +110,17 @@ export default {
|
|||||||
this.maxTotal = 0;
|
this.maxTotal = 0;
|
||||||
if (endTime && startTime) {
|
if (endTime && startTime) {
|
||||||
const model = {
|
const model = {
|
||||||
// lessonId: this.formModel.lessonId,
|
|
||||||
startTime: `${startTime} 00:00:00`,
|
startTime: `${startTime} 00:00:00`,
|
||||||
endTime: `${endTime} 23:59:59`,
|
endTime: `${endTime} 23:59:59`,
|
||||||
type: this.PermissionType
|
permissionType: this.PermissionType
|
||||||
// mapId: this.mapId,
|
|
||||||
// mapProductCode: this.prdCode,
|
|
||||||
};
|
};
|
||||||
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
||||||
model['lessonId'] = this.formModel.lessonId;
|
model['lessonId'] = this.formModel.lessonId;
|
||||||
model['mapId'] = this.mapId;
|
model['mapId'] = this.mapId;
|
||||||
model['mapProductCode'] = this.prdCode;
|
model['prdCode'] = this.prdCode;
|
||||||
} else if (this.PermissionType == PermissionType.SIMULATION) {
|
} else if (this.PermissionType == PermissionType.SIMULATION) {
|
||||||
model['mapId'] = this.mapId;
|
model['mapId'] = this.mapId;
|
||||||
model['mapProductCode'] = this.prdCode;
|
model['prdCode'] = this.prdCode;
|
||||||
}
|
}
|
||||||
getTotalRemains(model).then(response => {
|
getTotalRemains(model).then(response => {
|
||||||
this.maxTotal = response.data;
|
this.maxTotal = response.data;
|
||||||
@ -153,24 +151,21 @@ export default {
|
|||||||
handleSure() {
|
handleSure() {
|
||||||
this.$refs.dataform.validateForm(() => {
|
this.$refs.dataform.validateForm(() => {
|
||||||
const model = {
|
const model = {
|
||||||
// lessonId: this.formModel.lessonId,
|
|
||||||
startTime: `${this.formModel.date[0]} 00:00:00`,
|
startTime: `${this.formModel.date[0]} 00:00:00`,
|
||||||
endTime: `${this.formModel.date[1]} 23:59:59`,
|
endTime: `${this.formModel.date[1]} 23:59:59`,
|
||||||
amount: this.formModel.total,
|
amount: this.formModel.total,
|
||||||
permissionType: this.PermissionType,
|
permissionType: this.PermissionType
|
||||||
operator: OperatorModel.TRANSFER
|
|
||||||
// mapId: this.mapId,
|
|
||||||
// mapProductCode: this.prdCode,
|
|
||||||
};
|
};
|
||||||
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
||||||
model['lessonId'] = this.formModel.lessonId;
|
model['lessonId'] = this.formModel.lessonId;
|
||||||
model['mapId'] = this.mapId;
|
model['mapId'] = this.mapId;
|
||||||
model['mapProductCode'] = this.prdCode;
|
model['prdCode'] = this.prdCode;
|
||||||
} else if (this.PermissionType == PermissionType.SIMULATION) {
|
} else if (this.PermissionType == PermissionType.SIMULATION) {
|
||||||
model['mapId'] = this.mapId;
|
model['mapId'] = this.mapId;
|
||||||
model['mapProductCode'] = this.prdCode;
|
model['prdCode'] = this.prdCode;
|
||||||
}
|
}
|
||||||
giveLessons(model).then(response => {
|
// 转增
|
||||||
|
permissionTurnAdd(model).then(response => {
|
||||||
const url = response.data;
|
const url = response.data;
|
||||||
this.$emit('QrCodeShow', {
|
this.$emit('QrCodeShow', {
|
||||||
url: url,
|
url: url,
|
||||||
|
@ -95,11 +95,13 @@ export default {
|
|||||||
// 加载课程信息
|
// 加载课程信息
|
||||||
initLoadPage() {
|
initLoadPage() {
|
||||||
const data = {
|
const data = {
|
||||||
mapId: this.$route.query.mapId,
|
permissionType: this.$route.query.permissionType
|
||||||
lessonId: this.$route.params.lessonId,
|
|
||||||
productType: this.$route.query.permissionType,
|
|
||||||
mapProductCode: this.$route.query.prdCode
|
|
||||||
};
|
};
|
||||||
|
if (this.$route.query.permissionType != '04') {
|
||||||
|
data['mapId'] = this.$route.query.mapId;
|
||||||
|
data['prdCode'] = this.$route.query.prdCode;
|
||||||
|
data['lessonId'] = this.$route.query.lessonId;
|
||||||
|
}
|
||||||
|
|
||||||
getCommodityDetailByParams(data).then(response => {
|
getCommodityDetailByParams(data).then(response => {
|
||||||
this.active = 0;
|
this.active = 0;
|
||||||
|
@ -159,10 +159,10 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
(this.permissionList.filter(elem => { return elem.mapName == mapName; })|| []).forEach(elem => {
|
(this.permissionList.filter(elem => { return elem.mapName == mapName; })|| []).forEach(elem => {
|
||||||
if (elem.mapProductName == Object.keys(permissionMap)[Object.keys(permissionMap).length -1]) {
|
if (elem.prdName == Object.keys(permissionMap)[Object.keys(permissionMap).length -1]) {
|
||||||
permissionMap[`${elem.mapProductName}`] = elem.remains;
|
permissionMap[`${elem.prdName}`] = elem.remains;
|
||||||
} else {
|
} else {
|
||||||
permissionMap[`${elem.mapProductName}-${permissionDict[elem.type]}`] = elem.remains;
|
permissionMap[`${elem.prdName}-${permissionDict[elem.permissionType]}`] = elem.remains;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ export default {
|
|||||||
},
|
},
|
||||||
hasPermssion() {
|
hasPermssion() {
|
||||||
let isShow = false;
|
let isShow = false;
|
||||||
if (this.courseModel.pmsList.length) {
|
if (this.courseModel.pmsList && this.courseModel.pmsList.length) {
|
||||||
isShow = true;
|
isShow = true;
|
||||||
}
|
}
|
||||||
return isShow;
|
return isShow;
|
||||||
@ -190,15 +190,14 @@ export default {
|
|||||||
pmsList: resp.data.pmsList || [],
|
pmsList: resp.data.pmsList || [],
|
||||||
PermissionType: PermissionType.SIMULATION
|
PermissionType: PermissionType.SIMULATION
|
||||||
};
|
};
|
||||||
|
|
||||||
const rest = await queryPermissionSimulation({ mapId: this.courseModel.mapId, prdCode: this.courseModel.prdCode });
|
const rest = await queryPermissionSimulation({ mapId: this.courseModel.mapId, prdCode: this.courseModel.prdCode });
|
||||||
this.courseModel.pmsList = rest.data;
|
this.courseModel.pmsList = rest.data;
|
||||||
if (!this.courseModel.pmsList.length) {
|
if (!this.courseModel.pmsList) {
|
||||||
this.tryUser = 1;
|
this.tryUser = 1;
|
||||||
const paras = {
|
const paras = {
|
||||||
mapId: data.id,
|
mapId: data.id,
|
||||||
mapProductCode: data.code,
|
prdCode: data.code,
|
||||||
productType: PermissionType.SIMULATION
|
permissionType: PermissionType.SIMULATION
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -258,7 +257,7 @@ export default {
|
|||||||
} else if (this.courseModel.prdType == '03') {
|
} else if (this.courseModel.prdType == '03') {
|
||||||
this.createRoom();
|
this.createRoom();
|
||||||
} else {
|
} else {
|
||||||
if (this.courseModel.pmsList.length) {
|
if (this.courseModel.pmsList && this.courseModel.pmsList.length) {
|
||||||
this.jump();
|
this.jump();
|
||||||
} else {
|
} else {
|
||||||
if (this.tryTime <= 1) {
|
if (this.tryTime <= 1) {
|
||||||
|
@ -16,7 +16,9 @@
|
|||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="派班选择:">
|
<el-form-item label="派班选择:">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="formModel.date"
|
v-model="formModel.planDate"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
type="date"
|
type="date"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
@change="handleQuery"
|
@change="handleQuery"
|
||||||
@ -25,7 +27,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="运行图名称:">
|
<el-form-item label="运行图名称:">
|
||||||
<el-select v-model="formModel.runPlanId" style="display: inline-block">
|
<el-select v-model="formModel.runPlanName" size="small" style="display: inline-block">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in runPlanList"
|
v-for="item in runPlanList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@ -40,24 +42,20 @@
|
|||||||
<div>{{ formModel.mode }}</div>
|
<div>{{ formModel.mode }}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item style="text-align: right">
|
||||||
|
<el-button-group>
|
||||||
|
<el-button size="small" type="warning" @click="handleCheck">检查</el-button>
|
||||||
|
<el-button size="small" type="primary" @click="handleSave">保存</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
<div class="scheduling_body">
|
<div class="scheduling_body">
|
||||||
<div class="scheduling_body-label">{{ title }}</div>
|
|
||||||
<div class="scheduling_body-table">
|
<div class="scheduling_body-table">
|
||||||
<el-table
|
<edit-table ref="table" border stripe :table-data="tableData" :table-form="tableForm" />
|
||||||
border
|
|
||||||
height="500"
|
|
||||||
:data="tableData"
|
|
||||||
>
|
|
||||||
<el-table-column prop="id" label="" width="80" />
|
|
||||||
<el-table-column prop="code" label="ID" width="180" />
|
|
||||||
<el-table-column prop="name" label="姓名" />
|
|
||||||
<el-table-column prop="amount1" label="数值 1(元)" />
|
|
||||||
<el-table-column prop="amount2" label="数值 2(元)" />
|
|
||||||
<el-table-column prop="amount3" label="数值 3(元)" />
|
|
||||||
</el-table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -66,11 +64,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listPublishMap } from '@/api/jmap/map';
|
import { querySecheduling, generateScheduling, getSchedulingAllTrains, checkScheduling, saveScheduling, generateSchedulingAgain } from '@/api/scheduling';
|
||||||
import { querySecheduling, generateScheduling } from '@/api/scheduling';
|
import EditTable from '@/views/components/editTable/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddQuest',
|
name: 'AddQuest',
|
||||||
|
components: {
|
||||||
|
EditTable
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
group: {
|
group: {
|
||||||
type: String,
|
type: String,
|
||||||
@ -81,42 +82,119 @@ export default {
|
|||||||
return {
|
return {
|
||||||
show: false,
|
show: false,
|
||||||
runPlanList: [],
|
runPlanList: [],
|
||||||
|
groupNumberList: [],
|
||||||
formModel: {
|
formModel: {
|
||||||
date: '',
|
id: '',
|
||||||
mode: '',
|
mode: '',
|
||||||
runPlanId: ''
|
planDate: '',
|
||||||
|
runPlanName: ''
|
||||||
},
|
},
|
||||||
tableData: [{
|
tableForm: {
|
||||||
code: '12987122',
|
index: true,
|
||||||
name: '王小虎',
|
columns: [
|
||||||
amount1: '234',
|
{
|
||||||
amount2: '3.2',
|
title: '司机号',
|
||||||
amount3: 10
|
prop: 'driverCode',
|
||||||
}, {
|
type: 'text'
|
||||||
code: '12987123',
|
},
|
||||||
name: '王小虎',
|
{
|
||||||
amount1: '165',
|
title: '车组号',
|
||||||
amount2: '4.43',
|
prop: 'trainCode',
|
||||||
amount3: 12
|
type: 'select',
|
||||||
}, {
|
width: '150',
|
||||||
code: '12987124',
|
options: () => { return this.groupNumberList; },
|
||||||
name: '王小虎',
|
editable: true,
|
||||||
amount1: '324',
|
editing: true
|
||||||
amount2: '1.9',
|
},
|
||||||
amount3: 9
|
{
|
||||||
}, {
|
title: '上线轨',
|
||||||
code: '12987125',
|
prop: 'onlineSection',
|
||||||
name: '王小虎',
|
type: 'text'
|
||||||
amount1: '621',
|
},
|
||||||
amount2: '2.2',
|
{
|
||||||
amount3: 17
|
title: '上线服务号',
|
||||||
}, {
|
prop: 'onlineServerNumber',
|
||||||
code: '12987126',
|
type: 'text'
|
||||||
name: '王小虎',
|
},
|
||||||
amount1: '539',
|
{
|
||||||
amount2: '4.1',
|
title: '上线目的地',
|
||||||
amount3: 15
|
prop: 'onlineTargetNumber',
|
||||||
}]
|
type: 'text'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '上线时间',
|
||||||
|
prop: 'onlineTime',
|
||||||
|
type: 'text'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '上线车次号',
|
||||||
|
prop: 'onlineTripNumber',
|
||||||
|
type: 'text',
|
||||||
|
format: (row) => { return `${row.onlineDirectionCode}${row.onlineTripNumber}`; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '出库段',
|
||||||
|
prop: 'outDepot',
|
||||||
|
type: 'text'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '出库状态',
|
||||||
|
prop: 'outStatus',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.$ConstSelect.translate(row.outStatus, 'Whether'); },
|
||||||
|
tagType: (row) => {
|
||||||
|
switch (row.outStatus) {
|
||||||
|
case true: return 'success';
|
||||||
|
case false: return 'danger';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '下线轨',
|
||||||
|
prop: 'offlineSection',
|
||||||
|
type: 'text'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '下线服务号',
|
||||||
|
prop: 'offlineServerNumber',
|
||||||
|
type: 'text'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '下线目的地',
|
||||||
|
prop: 'offlineTargetNumber',
|
||||||
|
type: 'text'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '下线时间',
|
||||||
|
prop: 'offlineTime',
|
||||||
|
type: 'text'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '下线车次号',
|
||||||
|
prop: 'offlineTripNumber',
|
||||||
|
type: 'text',
|
||||||
|
format: (row) => { return `${row.offlineDirectionCode}${row.offlineTripNumber}`; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '回库段',
|
||||||
|
prop: 'inDepot',
|
||||||
|
type: 'text'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '回库状态',
|
||||||
|
prop: 'inStatus',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.$ConstSelect.translate(row.inStatus, 'Whether'); },
|
||||||
|
tagType: (row) => {
|
||||||
|
switch (row.inStatus) {
|
||||||
|
case true: return 'success';
|
||||||
|
case false: return 'danger';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
tableData: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -136,9 +214,9 @@ export default {
|
|||||||
this.show = false;
|
this.show = false;
|
||||||
},
|
},
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
this.mapList = [];
|
this.groupNumberList = [];
|
||||||
listPublishMap().then(response => {
|
getSchedulingAllTrains(this.group).then(resp => {
|
||||||
this.mapList = response.data;
|
this.groupNumberList = resp.data.map(elem => { return {value: elem.code, label: elem.groupNumber}; });
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleQuery(day) {
|
handleQuery(day) {
|
||||||
@ -151,17 +229,76 @@ export default {
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.handleGenerate(day);
|
this.handleGenerate(day);
|
||||||
}).catch(() => { });
|
}).catch(() => {
|
||||||
|
this.clearData();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.tableData = resp.data.planList || [];
|
||||||
|
this.formModel.id = resp.data.id;
|
||||||
|
this.formModel.planDate = resp.data.planDate;
|
||||||
|
this.formModel.runPlanName = resp.data.runPlanName;
|
||||||
|
this.$message.success(`加载数据 ${day} 派班计划成功!`);
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
this.clearData();
|
||||||
|
if (error.code == 30002) {
|
||||||
|
this.handleReGenerate(day);
|
||||||
|
} else {
|
||||||
|
this.$messageBox(`${error.message}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleGenerate(day) {
|
handleGenerate(day) {
|
||||||
generateScheduling(this.group, {day}).then(respt => {
|
generateScheduling(this.group, {day}).then(resp => {
|
||||||
|
this.tableData = resp.data.planList || [];
|
||||||
|
this.formModel.id = resp.data.id;
|
||||||
|
this.formModel.planDate = resp.data.planDate;
|
||||||
|
this.formModel.runPlanName = resp.data.runPlanName;
|
||||||
this.$message.success('创建派班计划成功');
|
this.$message.success('创建派班计划成功');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
this.clearData();
|
||||||
this.$messageBox(`${error.message}`);
|
this.$messageBox(`${error.message}`);
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
handleReGenerate(day) {
|
||||||
|
generateSchedulingAgain(this.group).then(resp => {
|
||||||
|
this.tableData = resp.data.planList || [];
|
||||||
|
this.formModel.id = resp.data.id;
|
||||||
|
this.formModel.planDate = resp.data.planDate;
|
||||||
|
this.formModel.runPlanName = resp.data.runPlanName;
|
||||||
|
this.$message.success('重新生成派班计划成功');
|
||||||
|
}).catch(error => {
|
||||||
|
this.clearData();
|
||||||
|
this.$messageBox(`${error.message}`);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleCheck() {
|
||||||
|
if (this.formModel.planDate) {
|
||||||
|
checkScheduling(this.group).then(resp => {
|
||||||
|
this.$message.success('检查成功');
|
||||||
|
}).catch(() => {
|
||||||
|
this.$messageBox('检查派班计划失败');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$messageBox('清先选择派班计划');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSave() {
|
||||||
|
if (this.formModel.planDate) {
|
||||||
|
saveScheduling(this.group, this.tableData).then(resp => {
|
||||||
|
this.$message.success('保存派班计划成功');
|
||||||
|
}).catch(() => {
|
||||||
|
this.$messageBox('保存派班失败');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$messageBox('清先选择派班计划');
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
clearData() {
|
||||||
|
this.formModel.planDate = '';
|
||||||
|
this.tableData = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -170,7 +307,7 @@ export default {
|
|||||||
.scheduling {
|
.scheduling {
|
||||||
&_header {
|
&_header {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 10px;
|
padding: 30px 30px 0;
|
||||||
}
|
}
|
||||||
&_body {
|
&_body {
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
@ -178,23 +315,9 @@ export default {
|
|||||||
border: 1px solid #F1F1F1;
|
border: 1px solid #F1F1F1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
&-label {
|
|
||||||
padding-left: 10px;
|
|
||||||
}
|
|
||||||
&-table {
|
|
||||||
width: 150%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .el-table {
|
|
||||||
td,th {
|
|
||||||
padding: 0px;
|
|
||||||
}
|
|
||||||
td:nth-child(1), th:nth-child(1) {
|
|
||||||
background: #fefefe;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/deep/ .el-dialog__body {
|
/deep/ .el-dialog__body {
|
||||||
background: #fafafa;
|
background: #fafafa;
|
||||||
}
|
}
|
||||||
|
@ -2,13 +2,15 @@
|
|||||||
<el-dialog :title="title" :visible.sync="show" width="550px" :before-close="doClose">
|
<el-dialog :title="title" :visible.sync="show" width="550px" :before-close="doClose">
|
||||||
<el-form ref="form" label-width="120px" :model="formModel" :rules="rules">
|
<el-form ref="form" label-width="120px" :model="formModel" :rules="rules">
|
||||||
<el-form-item label="系统时间" prop="initTime">
|
<el-form-item label="系统时间" prop="initTime">
|
||||||
<el-time-picker v-model="formModel.initTime" :picker-options="pickerOptions" placeholder="任意时间点"
|
<el-time-picker
|
||||||
@change="handleChange">
|
v-model="formModel.initTime"
|
||||||
</el-time-picker>
|
:picker-options="pickerOptions"
|
||||||
|
placeholder="任意时间点"
|
||||||
|
@change="handleChange"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="加载列车数" prop="loadNum" v-if="hasNumber">
|
<el-form-item v-if="hasNumber" label="加载列车数" prop="loadNum">
|
||||||
<el-input-number v-model="formModel.loadNum" :min="1" :max="maxNumber" label="请选择可加载列车个数">
|
<el-input-number v-model="formModel.loadNum" :min="1" :max="maxNumber" label="请选择可加载列车个数" />
|
||||||
</el-input-number>
|
|
||||||
<span> {{ `(可加载的最大车辆个数:${maxNumber})` }} </span>
|
<span> {{ `(可加载的最大车辆个数:${maxNumber})` }} </span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -21,7 +23,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { prefixIntrger } from '@/utils/date';
|
import { prefixIntrger } from '@/utils/date';
|
||||||
import { timeFormat } from '@/utils/date';
|
|
||||||
import { getDesignatedTimeTrainNum } from '@/api/simulation';
|
import { getDesignatedTimeTrainNum } from '@/api/simulation';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -30,7 +31,7 @@
|
|||||||
show: false,
|
show: false,
|
||||||
formModel: {
|
formModel: {
|
||||||
initTime: new Date(),
|
initTime: new Date(),
|
||||||
loadNum: 1,
|
loadNum: 1
|
||||||
},
|
},
|
||||||
maxNumber: 1,
|
maxNumber: 1,
|
||||||
pickerOptions: { selectableRange: '00:00:00 - 23:59:59' }
|
pickerOptions: { selectableRange: '00:00:00 - 23:59:59' }
|
||||||
@ -41,7 +42,7 @@
|
|||||||
return '设置仿真系统时间';
|
return '设置仿真系统时间';
|
||||||
},
|
},
|
||||||
hasNumber() {
|
hasNumber() {
|
||||||
return this.$route.params.mode == 'demon' && this.$route.query.prdType == "04";
|
return this.$route.params.mode == 'demon' && this.$route.query.prdType == '04';
|
||||||
},
|
},
|
||||||
group() {
|
group() {
|
||||||
return this.$route.query.group;
|
return this.$route.query.group;
|
||||||
@ -53,20 +54,20 @@
|
|||||||
{
|
{
|
||||||
validator(rule, value, callback) {
|
validator(rule, value, callback) {
|
||||||
if (this.maxNumber == 0) {
|
if (this.maxNumber == 0) {
|
||||||
callback(new Error("请选择有效的开始时间"));
|
callback(new Error('请选择有效的开始时间'));
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
trigger: 'change',
|
trigger: 'change',
|
||||||
maxNumber: this.maxNumber,
|
maxNumber: this.maxNumber
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
loadNum: [
|
loadNum: [
|
||||||
{ required: true, message: '请选择车辆个数', trigger: 'change' },
|
{ required: true, message: '请选择车辆个数', trigger: 'change' }
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -83,21 +84,21 @@
|
|||||||
if (this.hasNumber) {
|
if (this.hasNumber) {
|
||||||
getDesignatedTimeTrainNum({ initTime: this.formatTime(initTime) }, this.group).then(resp => {
|
getDesignatedTimeTrainNum({ initTime: this.formatTime(initTime) }, this.group).then(resp => {
|
||||||
this.maxNumber = parseInt(resp.data);
|
this.maxNumber = parseInt(resp.data);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
formatTime(initTime) {
|
formatTime(initTime) {
|
||||||
let hh = prefixIntrger(initTime.getHours(), 2);
|
const hh = prefixIntrger(initTime.getHours(), 2);
|
||||||
let mm = prefixIntrger(initTime.getMinutes(), 2);
|
const mm = prefixIntrger(initTime.getMinutes(), 2);
|
||||||
let ss = prefixIntrger(initTime.getSeconds(), 2);
|
const ss = prefixIntrger(initTime.getSeconds(), 2);
|
||||||
return `${hh}:${mm}:${ss}`;
|
return `${hh}:${mm}:${ss}`;
|
||||||
},
|
},
|
||||||
handleSure() {
|
handleSure() {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let model = {
|
const model = {
|
||||||
initTime: this.formatTime(this.formModel.initTime)
|
initTime: this.formatTime(this.formModel.initTime)
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.hasNumber) {
|
if (this.hasNumber) {
|
||||||
model['loadNum'] = this.formModel.loadNum;
|
model['loadNum'] = this.formModel.loadNum;
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
@tryTime="tryTime"
|
@tryTime="tryTime"
|
||||||
@hidepanel="hidepanel"
|
@hidepanel="hidepanel"
|
||||||
@quitQuest="quitQuest"
|
@quitQuest="quitQuest"
|
||||||
|
@showIbp="showIbp"
|
||||||
|
@showScheduling="showScheduling"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<menu-screen v-if="isScreen" ref="menuScreen" :offset="offset" :group="group" @tryTime="tryTime" />
|
<menu-screen v-if="isScreen" ref="menuScreen" :offset="offset" :group="group" @tryTime="tryTime" />
|
||||||
@ -38,7 +40,6 @@
|
|||||||
@faultChooseShow="faultChooseShow"
|
@faultChooseShow="faultChooseShow"
|
||||||
@runQuestLoadShow="runQuestLoadShow"
|
@runQuestLoadShow="runQuestLoadShow"
|
||||||
@switchMode="switchMode"
|
@switchMode="switchMode"
|
||||||
@schedulingShow="schedulingShow"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<menu-system-time ref="menuSystemTime" :offset="offset" :right="right" :group="group" />
|
<menu-system-time ref="menuSystemTime" :offset="offset" :right="right" :group="group" />
|
||||||
@ -565,6 +566,9 @@ export default {
|
|||||||
this.ibpShow = true;
|
this.ibpShow = true;
|
||||||
this.$refs.ibpPlate.show();
|
this.$refs.ibpPlate.show();
|
||||||
},
|
},
|
||||||
|
showScheduling() {
|
||||||
|
this.$refs.scheduling.doShow();
|
||||||
|
},
|
||||||
showpanel() {
|
showpanel() {
|
||||||
this.panelShow = true;
|
this.panelShow = true;
|
||||||
this.simulationShow = false;
|
this.simulationShow = false;
|
||||||
@ -585,9 +589,6 @@ export default {
|
|||||||
},
|
},
|
||||||
faultChooseShow() {
|
faultChooseShow() {
|
||||||
this.$refs.faultChoose.doShow();
|
this.$refs.faultChoose.doShow();
|
||||||
},
|
|
||||||
schedulingShow() {
|
|
||||||
this.$refs.scheduling.doShow();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
<div class="display-draft">
|
<div class="display-draft">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button v-if="isShowIbp" type="success" @click="jumpIbp">IBP盘</el-button>
|
<el-button v-if="isShowIbp" type="success" @click="jumpIbp">IBP盘</el-button>
|
||||||
|
<el-button v-if="isShowScheduling" type="primary" @click="jumpScheduling">排班计划</el-button>
|
||||||
<el-button type="jumpjlmap3d" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
|
<el-button type="jumpjlmap3d" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
|
||||||
<template v-if="isShowQuest">
|
<template v-if="isShowQuest">
|
||||||
<el-button type="danger" @click="handleQuitQuest">退出剧本</el-button>
|
<el-button type="danger" @click="handleQuitQuest">退出剧本</el-button>
|
||||||
@ -81,6 +82,9 @@ export default {
|
|||||||
},
|
},
|
||||||
isShowQuest() {
|
isShowQuest() {
|
||||||
return this.questId;
|
return this.questId;
|
||||||
|
},
|
||||||
|
isShowScheduling() {
|
||||||
|
return this.$route.query.prdType == '05';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -195,6 +199,9 @@ export default {
|
|||||||
jumpIbp() {
|
jumpIbp() {
|
||||||
this.$emit('showIbp');
|
this.$emit('showIbp');
|
||||||
},
|
},
|
||||||
|
jumpScheduling() {
|
||||||
|
this.$emit('showScheduling');
|
||||||
|
},
|
||||||
setTryTime() {
|
setTryTime() {
|
||||||
if (this.try) {
|
if (this.try) {
|
||||||
this.$emit('tryTime', { time: this.tryTime, goodsId: this.goodsId });
|
this.$emit('tryTime', { time: this.tryTime, goodsId: this.goodsId });
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button v-if="isShowScheduling" size="small" type="primary" @click="handleScheduling">排班计划
|
<el-button v-if="isDemon" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">加载剧本</el-button>
|
||||||
</el-button>
|
|
||||||
<el-button v-if="isDemon" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">加载剧本
|
|
||||||
</el-button>
|
|
||||||
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">运行图预览</el-button>
|
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">运行图预览</el-button>
|
||||||
<el-button
|
<el-button v-if="!runing && !isPlan && notScript" size="small" :disabled="viewDisabled" type="warning" @click="loadRunPlan">运行图加载</el-button>
|
||||||
v-if="!runing && !isPlan && notScript"
|
|
||||||
size="small"
|
|
||||||
:disabled="viewDisabled"
|
|
||||||
type="warning"
|
|
||||||
@click="loadRunPlan"
|
|
||||||
>运行图加载</el-button>
|
|
||||||
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">故障设置</el-button>
|
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">故障设置</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
|
||||||
@ -73,9 +64,6 @@ export default {
|
|||||||
},
|
},
|
||||||
isDemon() {
|
isDemon() {
|
||||||
return this.$route.params.mode === 'demon';
|
return this.$route.params.mode === 'demon';
|
||||||
},
|
|
||||||
isShowScheduling() {
|
|
||||||
return this.$route.query.prdType == '05';
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -136,9 +124,6 @@ export default {
|
|||||||
setRuning(run) {
|
setRuning(run) {
|
||||||
this.runing = run;
|
this.runing = run;
|
||||||
},
|
},
|
||||||
handleScheduling() {
|
|
||||||
this.$emit('schedulingShow');
|
|
||||||
},
|
|
||||||
setFault() {
|
setFault() {
|
||||||
this.$emit('faultChooseShow');
|
this.$emit('faultChooseShow');
|
||||||
},
|
},
|
||||||
|
@ -109,7 +109,7 @@ export default {
|
|||||||
price: res.data.price,
|
price: res.data.price,
|
||||||
remarks: res.data.remarks,
|
remarks: res.data.remarks,
|
||||||
detail: res.data.examDefinitionVOList || [],
|
detail: res.data.examDefinitionVOList || [],
|
||||||
pmsList: res.data.permissionVOList,
|
pmsList: res.data.permissionVOList || [],
|
||||||
prdCode: res.data.prdCode,
|
prdCode: res.data.prdCode,
|
||||||
mapId: res.data.mapId,
|
mapId: res.data.mapId,
|
||||||
PermissionType: PermissionType.EXAM
|
PermissionType: PermissionType.EXAM
|
||||||
@ -131,14 +131,14 @@ export default {
|
|||||||
query: { lessonId: this.courseModel.id }
|
query: { lessonId: this.courseModel.id }
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
transfer() {
|
transfer() { // 转增
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (this.$refs) {
|
if (this.$refs) {
|
||||||
this.activeName = 'second';
|
this.activeName = 'second';
|
||||||
this.$refs.limitList.transfer(this.courseModel);
|
this.$refs.limitList.transfer(this.courseModel);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
distribute() {
|
distribute() { // 分发
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (this.$refs) {
|
if (this.$refs) {
|
||||||
this.activeName = 'second';
|
this.activeName = 'second';
|
||||||
|
@ -1,18 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
|
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
|
||||||
<el-form-item label="报警器编号">
|
<el-form-item label="报警器编号" prop="code">
|
||||||
<el-input :disabled="isUpdate" v-model="form.code"></el-input>
|
<el-input :disabled="true" v-model="form.code">
|
||||||
|
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="报警器宽度">
|
<el-form-item label="报警器宽度" prop="alarmWidth">
|
||||||
<el-input-number v-model="form.alarmWidth" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.alarmWidth" controls-position="right" :min="1"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="报警器长度">
|
<el-form-item label="X轴坐标">
|
||||||
<el-input-number v-model="form.alarmHeight" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Y轴坐标">
|
||||||
|
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit">{{ buttonText }}</el-button>
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@ -28,14 +34,11 @@
|
|||||||
isUpdate: false,
|
isUpdate: false,
|
||||||
buttonText: '立即创建',
|
buttonText: '立即创建',
|
||||||
showDeleteButton: false,
|
showDeleteButton: false,
|
||||||
point: {
|
|
||||||
x: 10,
|
|
||||||
y: 10
|
|
||||||
},
|
|
||||||
form: {
|
form: {
|
||||||
code: '',
|
code: '',
|
||||||
alarmWidth: '',
|
alarmWidth: '',
|
||||||
alarmHeight: ''
|
x: 10,
|
||||||
|
y: 10
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
@ -43,9 +46,6 @@
|
|||||||
],
|
],
|
||||||
alarmWidth: [
|
alarmWidth: [
|
||||||
{ required: true, message: '请输入报警器宽度', trigger: 'blur' },
|
{ required: true, message: '请输入报警器宽度', trigger: 'blur' },
|
||||||
],
|
|
||||||
alarmHeight: [
|
|
||||||
{ required: true, message: '请输入报警器高度', trigger: 'blur' },
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -62,36 +62,46 @@
|
|||||||
this.isUpdate = true;
|
this.isUpdate = true;
|
||||||
this.form.code = model.code;
|
this.form.code = model.code;
|
||||||
this.form.alarmWidth = model.width;
|
this.form.alarmWidth = model.width;
|
||||||
this.form.alarmHeight = model.height;
|
this.form.x = model.point.x;
|
||||||
this.point = model.point;
|
this.form.y = model.point.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit() {
|
onSubmit(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if (valid){
|
||||||
const alarmModel = {
|
const alarmModel = {
|
||||||
zlevel: 2,
|
zlevel: 2,
|
||||||
z: 1,
|
z: 1,
|
||||||
point: this.point,
|
point:{
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
_type: 'Alarm',
|
_type: 'Alarm',
|
||||||
width: this.form .alarmWidth,
|
width: this.form .alarmWidth,
|
||||||
height: this.form.alarmHeight
|
|
||||||
};
|
};
|
||||||
this.$emit('createAlarm', alarmModel);
|
this.$emit('createAlarm', alarmModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
deleteDevice() {
|
deleteDevice() {
|
||||||
const alarmModel = {
|
const alarmModel = {
|
||||||
zlevel: 2,
|
zlevel: 2,
|
||||||
z: 1,
|
z: 1,
|
||||||
point: this.point,
|
point:{
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
_type: 'Alarm',
|
_type: 'Alarm',
|
||||||
width: this.form .alarmWidth,
|
width: this.form .alarmWidth,
|
||||||
height: this.form.alarmHeight
|
|
||||||
};
|
};
|
||||||
this.$emit('deleteDataModel',alarmModel );
|
this.$emit('deleteDataModel',alarmModel );
|
||||||
this.initPage();
|
this.initPage();
|
||||||
@ -103,12 +113,13 @@
|
|||||||
this.form = {
|
this.form = {
|
||||||
code: '',
|
code: '',
|
||||||
alarmWidth: '',
|
alarmWidth: '',
|
||||||
alarmHeight: ''
|
|
||||||
};
|
|
||||||
this.point = {
|
|
||||||
x: 10,
|
x: 10,
|
||||||
y: 10
|
y: 10
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
generateCode() {
|
||||||
|
const mydate = new Date();
|
||||||
|
this.form.code = "alarm_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,18 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
|
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
|
||||||
<el-form-item label="扶梯框编号">
|
<el-form-item label="扶梯框编号" prop="code">
|
||||||
<el-input :disabled="isUpdate" v-model="form.code"></el-input>
|
<el-input :disabled="true" v-model="form.code" >
|
||||||
|
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="扶梯框宽度">
|
<el-form-item label="扶梯框宽度" prop="appendageBoxWidth">
|
||||||
<el-input-number v-model="form.appendageBoxWidth" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.appendageBoxWidth" controls-position="right" :min="1"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="扶梯框高度">
|
<el-form-item label="扶梯框高度" prop="appendageBoxHeight">
|
||||||
<el-input-number v-model="form.appendageBoxHeight" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.appendageBoxHeight" controls-position="right" :min="1"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="X轴坐标">
|
||||||
|
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Y轴坐标">
|
||||||
|
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit">{{ buttonText }}</el-button>
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@ -28,14 +37,13 @@
|
|||||||
isUpdate: false,
|
isUpdate: false,
|
||||||
buttonText: '立即创建',
|
buttonText: '立即创建',
|
||||||
showDeleteButton: false,
|
showDeleteButton: false,
|
||||||
point: {
|
form: {
|
||||||
|
code: '',
|
||||||
|
appendageBoxWidth: '',
|
||||||
|
appendageBoxHeight: '',
|
||||||
x: 10,
|
x: 10,
|
||||||
y: 10
|
y: 10
|
||||||
},
|
},
|
||||||
form: {
|
|
||||||
appendageBoxWidth: '',
|
|
||||||
appendageBoxHeight: ''
|
|
||||||
},
|
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '请输入扶梯框编号', trigger: 'blur' },
|
{ required: true, message: '请输入扶梯框编号', trigger: 'blur' },
|
||||||
@ -62,18 +70,24 @@
|
|||||||
this.form.code = model.code;
|
this.form.code = model.code;
|
||||||
this.form.appendageBoxWidth = model.width;
|
this.form.appendageBoxWidth = model.width;
|
||||||
this.form.appendageBoxHeight = model.height;
|
this.form.appendageBoxHeight = model.height;
|
||||||
this.point = model.point;
|
this.form.x = model.point.x;
|
||||||
|
this.form.y = model.point.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit() {
|
onSubmit(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if (valid){
|
||||||
const appendageBoxModel = {
|
const appendageBoxModel = {
|
||||||
zlevel: 2,
|
zlevel: 2,
|
||||||
z: 1,
|
z: 1,
|
||||||
point: this.point,
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
_type: 'AppendageBox',
|
_type: 'AppendageBox',
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
width: this.form .appendageBoxWidth,
|
width: this.form .appendageBoxWidth,
|
||||||
@ -81,12 +95,19 @@
|
|||||||
};
|
};
|
||||||
this.$emit('createAppendageBox', appendageBoxModel);
|
this.$emit('createAppendageBox', appendageBoxModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
deleteDevice() {
|
deleteDevice() {
|
||||||
const appendageBoxModel = {
|
const appendageBoxModel = {
|
||||||
zlevel: 2,
|
zlevel: 2,
|
||||||
z: 1,
|
z: 1,
|
||||||
point: this.point,
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
_type: 'AppendageBox',
|
_type: 'AppendageBox',
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
width: this.form .appendageBoxWidth,
|
width: this.form .appendageBoxWidth,
|
||||||
@ -102,12 +123,14 @@
|
|||||||
this.form = {
|
this.form = {
|
||||||
code: '',
|
code: '',
|
||||||
appendageBoxWidth: '',
|
appendageBoxWidth: '',
|
||||||
appendageBoxHeight: ''
|
appendageBoxHeight: '',
|
||||||
};
|
|
||||||
this.point = {
|
|
||||||
x: 10,
|
x: 10,
|
||||||
y: 10
|
y: 10
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
generateCode() {
|
||||||
|
const mydate = new Date();
|
||||||
|
this.form.code = "aBox"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
||||||
<el-form-item label="箭头编号">
|
<el-form-item label="箭头编号" prop="code">
|
||||||
<el-input :disabled="isUpdate" v-model="form.code"></el-input>
|
<el-input :disabled="true" v-model="form.code" >
|
||||||
|
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="箭头方向">
|
<el-form-item label="箭头方向" prop="orientation">
|
||||||
<el-select v-model="form.orientation" placeholder="请选择箭头方向">
|
<el-select v-model="form.orientation" placeholder="请选择箭头方向">
|
||||||
<el-option label="向上" value="top"></el-option>
|
<el-option label="向上" value="top"></el-option>
|
||||||
<el-option label="向下" value="bottom"></el-option>
|
<el-option label="向下" value="bottom"></el-option>
|
||||||
@ -12,18 +14,19 @@
|
|||||||
<el-option label="向右" value="right"></el-option>
|
<el-option label="向右" value="right"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="箭头长度">
|
<el-form-item label="箭头长度" prop="arrowLength">
|
||||||
<el-input-number v-model="form.arrowLength" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.arrowLength" controls-position="right" :min="1"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="箭头宽度">
|
<el-form-item label="箭头宽度" prop="arrowLength">
|
||||||
<el-input-number v-model="form.arrowWidth" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.arrowWidth" controls-position="right" :min="1"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="箭头颜色">
|
<el-form-item label="箭头颜色" prop="fillColor">
|
||||||
<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>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit">{{ buttonText }}</el-button>
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@ -31,7 +34,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'ButtonDraft',
|
name: 'ArrowDraft',
|
||||||
components: {
|
components: {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -91,7 +94,9 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit() {
|
onSubmit(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if (valid){
|
||||||
const arrowModel = {
|
const arrowModel = {
|
||||||
zlevel: 2,
|
zlevel: 2,
|
||||||
z: 1,
|
z: 1,
|
||||||
@ -102,10 +107,14 @@
|
|||||||
fill: this.form.fillColor,
|
fill: this.form.fillColor,
|
||||||
width: this.form .arrowWidth,
|
width: this.form .arrowWidth,
|
||||||
length: this.form.arrowLength,
|
length: this.form.arrowLength,
|
||||||
lineWidth: 1
|
|
||||||
};
|
};
|
||||||
this.$emit('createArrow', arrowModel);
|
this.$emit('createArrow', arrowModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
deleteDevice() {
|
deleteDevice() {
|
||||||
const arrowModel = {
|
const arrowModel = {
|
||||||
@ -118,7 +127,6 @@
|
|||||||
fill: this.form.fillColor,
|
fill: this.form.fillColor,
|
||||||
width: this.form .arrowWidth,
|
width: this.form .arrowWidth,
|
||||||
length: this.form.arrowLength,
|
length: this.form.arrowLength,
|
||||||
lineWidth: 1
|
|
||||||
};
|
};
|
||||||
this.$emit('deleteDataModel',arrowModel);
|
this.$emit('deleteDataModel',arrowModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
@ -138,6 +146,10 @@
|
|||||||
x: 10,
|
x: 10,
|
||||||
y: 10
|
y: 10
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
generateCode() {
|
||||||
|
const mydate = new Date();
|
||||||
|
this.form.code = "arrow_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
|
||||||
<el-form-item label="背景板宽度">
|
<el-form-item label="背景板宽度">
|
||||||
<el-input-number v-model="form.bgWidth" controls-position="right" :min="1" ></el-input-number>
|
<el-input-number v-model="form.bgWidth" controls-position="right" :min="1" ></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -1,26 +1,33 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
||||||
<el-form-item label="按钮编号">
|
<el-form-item label="按钮编号" prop="code">
|
||||||
<el-input :disabled="isUpdate" v-model="form.code"></el-input>
|
<el-input :disabled="true" v-model="form.code" >
|
||||||
|
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="按钮颜色">
|
<el-form-item label="按钮颜色" prop="buttonColor">
|
||||||
<el-select v-model="form.buttonColor" placeholder="请选择按钮颜色">
|
<el-select v-model="form.buttonColor" placeholder="请选择按钮颜色">
|
||||||
<el-option label="红色按钮" value="red"></el-option>
|
<el-option label="红色按钮" value="red"></el-option>
|
||||||
<el-option label="黄色按钮" value="yellow"></el-option>
|
<el-option label="黄色按钮" value="yellow"></el-option>
|
||||||
<el-option label="绿色按钮" value="green"></el-option>
|
<el-option label="绿色按钮" value="green"></el-option>
|
||||||
|
<el-option label="蓝色按钮" value="blue"></el-option>
|
||||||
<el-option label="灰色按钮" value="gray"></el-option>
|
<el-option label="灰色按钮" value="gray"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="按钮宽度">
|
<el-form-item label="按钮宽度" prop="buttonWidth">
|
||||||
<el-input-number v-model="form.buttonWidth" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.buttonWidth" controls-position="right" :min="1"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="按钮高度">
|
<el-form-item label="X轴坐标">
|
||||||
<el-input-number v-model="form.buttonHeight" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Y轴坐标">
|
||||||
|
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit">{{ buttonText }}</el-button>
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@ -36,15 +43,12 @@
|
|||||||
isUpdate: false,
|
isUpdate: false,
|
||||||
buttonText: '立即创建',
|
buttonText: '立即创建',
|
||||||
showDeleteButton: false,
|
showDeleteButton: false,
|
||||||
point: {
|
|
||||||
x: 10,
|
|
||||||
y: 10
|
|
||||||
},
|
|
||||||
form: {
|
form: {
|
||||||
code: '',
|
code: '',
|
||||||
buttonColor: '',
|
buttonColor: '',
|
||||||
buttonWidth: '',
|
buttonWidth: '',
|
||||||
buttonHeight: ''
|
x: 10,
|
||||||
|
y: 10
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
@ -55,9 +59,6 @@
|
|||||||
],
|
],
|
||||||
buttonWidth: [
|
buttonWidth: [
|
||||||
{ required: true, message: '请输入按钮宽度', trigger: 'blur' },
|
{ required: true, message: '请输入按钮宽度', trigger: 'blur' },
|
||||||
],
|
|
||||||
buttonHeight: [
|
|
||||||
{ required: true, message: '请输入按钮高度', trigger: 'blur' },
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -75,40 +76,50 @@
|
|||||||
this.form.code = model.code;
|
this.form.code = model.code;
|
||||||
this.form.buttonColor = model.color;
|
this.form.buttonColor = model.color;
|
||||||
this.form.buttonWidth = model.width;
|
this.form.buttonWidth = model.width;
|
||||||
this.form.buttonHeight = model.height;
|
this.form.x = model.point.x;
|
||||||
this.point = model.point;
|
this.form.y = model.point.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit() {
|
onSubmit(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
const buttonModel = {
|
const buttonModel = {
|
||||||
zlevel: 2,
|
zlevel: 2,
|
||||||
z: 1,
|
z: 1,
|
||||||
point: this.point,
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
_type: 'SquareButton',
|
_type: 'SquareButton',
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
color: this.form.buttonColor,
|
color: this.form.buttonColor,
|
||||||
status: 'off',
|
status: 'off',
|
||||||
width: this.form.buttonWidth,
|
width: this.form.buttonWidth,
|
||||||
height: this.form.buttonHeight
|
|
||||||
};
|
};
|
||||||
this.$emit('createButton', buttonModel);
|
this.$emit('createButton', buttonModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
deleteDevice() {
|
deleteDevice() {
|
||||||
const buttonModel = {
|
const buttonModel = {
|
||||||
zlevel: 2,
|
zlevel: 2,
|
||||||
z: 1,
|
z: 1,
|
||||||
point: this.point,
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
_type: 'SquareButton',
|
_type: 'SquareButton',
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
color: this.form.buttonColor,
|
color: this.form.buttonColor,
|
||||||
status: 'off',
|
status: 'off',
|
||||||
width: this.form.buttonWidth,
|
width: this.form.buttonWidth,
|
||||||
height: this.form.buttonHeight
|
|
||||||
};
|
};
|
||||||
this.$emit('deleteDataModel',buttonModel );
|
this.$emit('deleteDataModel',buttonModel );
|
||||||
this.initPage();
|
this.initPage();
|
||||||
@ -121,21 +132,17 @@
|
|||||||
code: '',
|
code: '',
|
||||||
buttonColor: '',
|
buttonColor: '',
|
||||||
buttonWidth: '',
|
buttonWidth: '',
|
||||||
buttonHeight: ''
|
|
||||||
};
|
|
||||||
this.point = {
|
|
||||||
x: 10,
|
x: 10,
|
||||||
y: 10
|
y: 10
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
generateCode() {
|
||||||
|
const mydate = new Date();
|
||||||
|
this.form.code = "sButton_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
|
||||||
.button_box{
|
|
||||||
width: 100%;
|
|
||||||
background: #f0f0f0;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,28 +1,37 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
|
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
|
||||||
<el-form-item label="电梯编号">
|
<el-form-item label="电梯编号" prop="code">
|
||||||
<el-input :disabled="isUpdate" v-model="form.code" style="width:300px"></el-input>
|
<el-input :disabled="true" v-model="form.code">
|
||||||
|
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="电梯宽度">
|
<el-form-item label="电梯宽度" prop="elevatorWidth">
|
||||||
<el-input-number v-model="form.elevatorWidth" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.elevatorWidth" controls-position="right" :min="1"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="电梯高度">
|
<el-form-item label="电梯高度" prop="elevatorHeight">
|
||||||
<el-input-number v-model="form.elevatorHeight" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.elevatorHeight" controls-position="right" :min="1"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="电梯颜色">
|
<el-form-item label="电梯颜色" prop="elevatorColor">
|
||||||
<el-color-picker v-model="form.elevatorColor"></el-color-picker>
|
<el-color-picker v-model="form.elevatorColor"></el-color-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="启动方向">
|
<el-form-item label="启动方向" prop="direction">
|
||||||
<el-select v-model="form.direction" placeholder="请选择启动方向">
|
<el-select v-model="form.direction" placeholder="请选择启动方向">
|
||||||
<el-option label="不启动" value="none"></el-option>
|
<el-option label="不启动" value="none"></el-option>
|
||||||
<el-option label="向上启动" value="top"></el-option>
|
<el-option label="向上启动" value="top"></el-option>
|
||||||
<el-option label="向下启动" value="bottom"></el-option>
|
<el-option label="向下启动" value="bottom"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="X轴坐标">
|
||||||
|
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Y轴坐标">
|
||||||
|
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit">{{ buttonText }}</el-button>
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@ -37,16 +46,14 @@
|
|||||||
isUpdate: false,
|
isUpdate: false,
|
||||||
buttonText: '立即创建',
|
buttonText: '立即创建',
|
||||||
showDeleteButton: false,
|
showDeleteButton: false,
|
||||||
point: {
|
|
||||||
x: 70,
|
|
||||||
y: 70
|
|
||||||
},
|
|
||||||
form: {
|
form: {
|
||||||
code: '',
|
code: '',
|
||||||
elevatorWidth: '',
|
elevatorWidth: '',
|
||||||
elevatorHeight: '',
|
elevatorHeight: '',
|
||||||
elevatorColor:'',
|
elevatorColor:'',
|
||||||
direction:'',
|
direction:'none',
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
@ -72,7 +79,6 @@
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.ibp.rightClickCount': function (val) {
|
'$store.state.ibp.rightClickCount': function (val) {
|
||||||
// 待修改
|
|
||||||
const model = this.$store.getters['ibp/updateDeviceData'];
|
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||||
if (model._type === 'Elevator' ){
|
if (model._type === 'Elevator' ){
|
||||||
this.buttonText = '修改';
|
this.buttonText = '修改';
|
||||||
@ -83,19 +89,24 @@
|
|||||||
this.form.elevatorHeight = model.height;
|
this.form.elevatorHeight = model.height;
|
||||||
this.form.elevatorColor = model.fillColor;
|
this.form.elevatorColor = model.fillColor;
|
||||||
this.form.direction = model.direction;
|
this.form.direction = model.direction;
|
||||||
this.point = model.point;
|
this.form.x = model.point.x;
|
||||||
|
this.form.y = model.point.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit() {
|
onSubmit(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if (valid){
|
||||||
const elevatorModel = {
|
const elevatorModel = {
|
||||||
zlevel: 2,
|
zlevel: 2,
|
||||||
z: 2,
|
z: 2,
|
||||||
point: this.point,
|
point: {
|
||||||
draggable: true,
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
_type: 'Elevator',
|
_type: 'Elevator',
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
width: this.form.elevatorWidth,
|
width: this.form.elevatorWidth,
|
||||||
@ -105,14 +116,20 @@
|
|||||||
};
|
};
|
||||||
this.$emit('createElevator', elevatorModel);
|
this.$emit('createElevator', elevatorModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
deleteDevice() {
|
deleteDevice() {
|
||||||
// 待修改
|
|
||||||
const elevatorModel = {
|
const elevatorModel = {
|
||||||
zlevel: 2,
|
zlevel: 2,
|
||||||
z: 1,
|
z: 2,
|
||||||
point: this.point,
|
point: {
|
||||||
draggable: true,
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
_type: 'Elevator',
|
_type: 'Elevator',
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
width: this.form.elevatorWidth,
|
width: this.form.elevatorWidth,
|
||||||
@ -133,11 +150,13 @@
|
|||||||
elevatorHeight: '',
|
elevatorHeight: '',
|
||||||
elevatorColor:'',
|
elevatorColor:'',
|
||||||
direction:'none',
|
direction:'none',
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
};
|
};
|
||||||
this.point = {
|
},
|
||||||
x: 80,
|
generateCode() {
|
||||||
y: 80
|
const mydate = new Date();
|
||||||
};
|
this.form.code = "elevator_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
157
src/views/ibp/ibpDraft/ibpEdit/ibpOperate/ibpKey.vue
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
|
||||||
|
<el-form-item label="钥匙编号" prop="code">
|
||||||
|
<el-input :disabled="true" v-model="form.code">
|
||||||
|
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="钥匙宽度" prop="keyWidth">
|
||||||
|
<el-input-number v-model="form.keyWidth" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="钥匙高度" prop="keyHeight">
|
||||||
|
<el-input-number v-model="form.keyHeight" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="钥匙朝向" prop="status">
|
||||||
|
<el-select v-model="form.status" placeholder="请选择钥匙朝向">
|
||||||
|
<el-option label="水平" value="on"></el-option>
|
||||||
|
<el-option label="竖直" value="off"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="X轴坐标">
|
||||||
|
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Y轴坐标">
|
||||||
|
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'KeyDraft',
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isUpdate: false,
|
||||||
|
buttonText: '立即创建',
|
||||||
|
showDeleteButton: false,
|
||||||
|
form: {
|
||||||
|
code: '',
|
||||||
|
keyWidth: '',
|
||||||
|
keyHeight: '',
|
||||||
|
status:'',
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
code: [
|
||||||
|
{ required: true, message: '请输入钥匙孔编号', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
keyWidth: [
|
||||||
|
{ required: true, message: '请输入钥匙孔宽度', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
keyHeight: [
|
||||||
|
{ required: true, message: '请输入钥匙孔高度', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
status: [
|
||||||
|
{ required: true, message: '请选择钥匙朝向', trigger: 'change' },
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.ibp.rightClickCount': function (val) {
|
||||||
|
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||||
|
if (model._type === 'Key' ){
|
||||||
|
this.buttonText = '修改';
|
||||||
|
this.showDeleteButton = true;
|
||||||
|
this.isUpdate = true;
|
||||||
|
this.form.code = model.code;
|
||||||
|
this.form.keyWidth = model.width;
|
||||||
|
this.form.keyHeight = model.height;
|
||||||
|
this.form.status = model.status;
|
||||||
|
this.form.x = model.point.x;
|
||||||
|
this.form.y = model.point.y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onSubmit(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if(valid) {
|
||||||
|
const keyModel = {
|
||||||
|
zlevel: 3,
|
||||||
|
z: 1,
|
||||||
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
|
draggable: true,
|
||||||
|
_type: 'Key',
|
||||||
|
code: this.form.code,
|
||||||
|
width: this.form.keyWidth,
|
||||||
|
height: this.form.keyHeight,
|
||||||
|
status:this.form.status
|
||||||
|
};
|
||||||
|
this.$emit('createKey', keyModel);
|
||||||
|
this.initPage();
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
deleteDevice() {
|
||||||
|
const keyModel = {
|
||||||
|
zlevel: 3,
|
||||||
|
z: 1,
|
||||||
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
|
draggable: true,
|
||||||
|
_type: 'Key',
|
||||||
|
code: this.form.code,
|
||||||
|
width: this.form .keyWidth,
|
||||||
|
height: this.form.keyHeight,
|
||||||
|
status:this.form.status
|
||||||
|
};
|
||||||
|
this.$emit('deleteDataModel',keyModel);
|
||||||
|
this.initPage();
|
||||||
|
},
|
||||||
|
initPage() {
|
||||||
|
this.isUpdate = false;
|
||||||
|
this.buttonText = '立即创建';
|
||||||
|
this.showDeleteButton = false;
|
||||||
|
this.form = {
|
||||||
|
code: '',
|
||||||
|
keyWidth: '',
|
||||||
|
keyHeight: '',
|
||||||
|
status:'',
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
|
};
|
||||||
|
},
|
||||||
|
generateCode() {
|
||||||
|
const mydate = new Date();
|
||||||
|
this.form.code = "key_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -1,15 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
|
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
|
||||||
<el-form-item label="圆形指示灯编号">
|
<el-form-item label="圆形指示灯编号" prop="code">
|
||||||
<el-input :disabled="isUpdate" v-model="form.code"></el-input>
|
<el-input :disabled="true" v-model="form.code" >
|
||||||
|
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="圆形指示灯半径">
|
<el-form-item label="圆形指示灯半径" prop="r">
|
||||||
<el-input-number v-model="form.r" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.r" controls-position="right" :min="1"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="X轴坐标">
|
||||||
|
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Y轴坐标">
|
||||||
|
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit">{{ buttonText }}</el-button>
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@ -17,7 +26,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'ButtonDraft',
|
name: 'LampDraft',
|
||||||
components: {
|
components: {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -25,20 +34,18 @@
|
|||||||
isUpdate: false,
|
isUpdate: false,
|
||||||
buttonText: '立即创建',
|
buttonText: '立即创建',
|
||||||
showDeleteButton: false,
|
showDeleteButton: false,
|
||||||
point: {
|
|
||||||
x: 10,
|
|
||||||
y: 10
|
|
||||||
},
|
|
||||||
form: {
|
form: {
|
||||||
code: '',
|
code: '',
|
||||||
r: ''
|
r: '',
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '请输入按钮编号', trigger: 'blur' },
|
{ required: true, message: '请输入按钮编号', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
r: [
|
r: [
|
||||||
{ required: true, message: '请输入圆形指示灯半径', trigger: 'change'}
|
{ required: true, message: '请输入圆形指示灯半径', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -55,18 +62,24 @@
|
|||||||
this.isUpdate = true;
|
this.isUpdate = true;
|
||||||
this.form.code = model.code;
|
this.form.code = model.code;
|
||||||
this.form.r = model.r;
|
this.form.r = model.r;
|
||||||
this.point = model.point;
|
this.form.x = model.point.x;
|
||||||
|
this.form.y = model.point.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit() {
|
onSubmit(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if(valid){
|
||||||
const lampModel = {
|
const lampModel = {
|
||||||
zlevel: 2,
|
zlevel: 2,
|
||||||
z: 1,
|
z: 1,
|
||||||
point: this.point,
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
_type: 'CircularLamp',
|
_type: 'CircularLamp',
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
r: this.form.r,
|
r: this.form.r,
|
||||||
@ -74,12 +87,20 @@
|
|||||||
};
|
};
|
||||||
this.$emit('createLamp', lampModel);
|
this.$emit('createLamp', lampModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
deleteDevice() {
|
deleteDevice() {
|
||||||
const lampModel = {
|
const lampModel = {
|
||||||
zlevel: 2,
|
zlevel: 2,
|
||||||
z: 1,
|
z: 1,
|
||||||
point: this.point,
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
_type: 'CircularLamp',
|
_type: 'CircularLamp',
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
r: this.form.r,
|
r: this.form.r,
|
||||||
@ -94,21 +115,17 @@
|
|||||||
this.showDeleteButton = false;
|
this.showDeleteButton = false;
|
||||||
this.form = {
|
this.form = {
|
||||||
code: '',
|
code: '',
|
||||||
r: ''
|
r: '',
|
||||||
};
|
|
||||||
this.point = {
|
|
||||||
x: 10,
|
x: 10,
|
||||||
y: 10
|
y: 10
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
generateCode() {
|
||||||
|
const mydate = new Date();
|
||||||
|
this.form.code = "lamp_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
|
||||||
.button_box{
|
|
||||||
width: 100%;
|
|
||||||
background: #f0f0f0;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,27 +1,33 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
|
||||||
<el-form-item label="线段编号">
|
<el-form-item label="线段编号" prop="code">
|
||||||
<el-input :disabled="isUpdate" v-model="form.code"></el-input>
|
<el-input :disabled="true" v-model="form.code" >
|
||||||
|
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="线段方向">
|
<el-form-item label="线段宽度" prop="lineWidth">
|
||||||
<el-select v-model="form.direction" placeholder="请选择线段方向">
|
|
||||||
<el-option label="横向" value="transverse"></el-option>
|
|
||||||
<el-option label="竖向" value="vertical"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="线段长度">
|
|
||||||
<el-input-number controls-position="right" :min="1" v-model="form.length"></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="线段宽度">
|
|
||||||
<el-input-number v-model="form.lineWidth" controls-position="right" :min="1" :max="50"></el-input-number>
|
<el-input-number v-model="form.lineWidth" controls-position="right" :min="1" :max="50"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="线段颜色">
|
<el-form-item label="线段颜色" prop="fillColor">
|
||||||
<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-input-number v-model="form.x1" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="起始Y轴坐标">
|
||||||
|
<el-input-number v-model="form.y1" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="终止X轴坐标">
|
||||||
|
<el-input-number v-model="form.x2" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="终止Y轴坐标">
|
||||||
|
<el-input-number v-model="form.y2" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit">{{ buttonText }}</el-button>
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@ -37,27 +43,19 @@
|
|||||||
isUpdate: false,
|
isUpdate: false,
|
||||||
buttonText: '立即创建',
|
buttonText: '立即创建',
|
||||||
showDeleteButton: false,
|
showDeleteButton: false,
|
||||||
point1: {
|
|
||||||
x: 10,
|
|
||||||
y: 10
|
|
||||||
},
|
|
||||||
form: {
|
form: {
|
||||||
code: '',
|
code: '',
|
||||||
direction: '',
|
|
||||||
length: '',
|
|
||||||
lineWidth: '',
|
lineWidth: '',
|
||||||
fillColor: ''
|
fillColor: '',
|
||||||
|
x1: 10,
|
||||||
|
y1: 10,
|
||||||
|
x2: 20,
|
||||||
|
y2: 10
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '请输入线段编号', trigger: 'blur' },
|
{ required: true, message: '请输入线段编号', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
direction: [
|
|
||||||
{ required: true, message: '请选择线段方向', trigger: 'change'}
|
|
||||||
],
|
|
||||||
length: [
|
|
||||||
{ required: true, message: '请输入线段长度', trigger: 'blur' },
|
|
||||||
],
|
|
||||||
lineWidth: [
|
lineWidth: [
|
||||||
{ required: true, message: '请输入线段宽度', trigger: 'blur' },
|
{ required: true, message: '请输入线段宽度', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
@ -78,27 +76,32 @@
|
|||||||
this.showDeleteButton = true;
|
this.showDeleteButton = true;
|
||||||
this.isUpdate = true;
|
this.isUpdate = true;
|
||||||
this.form.code = model.code;
|
this.form.code = model.code;
|
||||||
this.form.direction = model.direction;
|
|
||||||
this.form.length = (model.direction == 'transverse'? model.point1.x -model.point2.x : model.point1.y - model.point2.y);
|
|
||||||
this.form.lineWidth = model.lineWidth;
|
this.form.lineWidth = model.lineWidth;
|
||||||
this.form.fillColor = model.fill;
|
this.form.fillColor = model.fillColor;
|
||||||
this.point1 = model.point;
|
this.form.x1 = model.point1.x;
|
||||||
|
this.form.y1 = model.point1.y;
|
||||||
|
this.form.x2 = model.point2.x;
|
||||||
|
this.form.y2 = model.point2.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit() {
|
onSubmit(form) {
|
||||||
|
this.$refs[form].validate((valid) =>{
|
||||||
|
if (valid){
|
||||||
const lineModel = {
|
const lineModel = {
|
||||||
zlevel: 1,
|
zlevel: 2,
|
||||||
z: 1,
|
z: 1,
|
||||||
point1: this.point1,
|
point1: {
|
||||||
point2: {
|
x: this.form.x1,
|
||||||
x: this.form.direction == 'transverse'? this.point1.x + parseInt(this.form.length):10,
|
y: this.form.y1
|
||||||
y: this.form.direction == 'vertical'? this.point1.y + parseInt(this.form.length):10
|
},
|
||||||
|
point2: {
|
||||||
|
x: this.form.x2,
|
||||||
|
y: this.form.y2
|
||||||
},
|
},
|
||||||
direction: this.form.direction,
|
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
_type: 'IbpLine',
|
_type: 'IbpLine',
|
||||||
lineWidth: this.form.lineWidth,
|
lineWidth: this.form.lineWidth,
|
||||||
@ -106,17 +109,24 @@
|
|||||||
};
|
};
|
||||||
this.$emit('createLine', lineModel);
|
this.$emit('createLine', lineModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
deleteDevice() {
|
deleteDevice() {
|
||||||
const lineModel = {
|
const lineModel = {
|
||||||
zlevel: 1,
|
zlevel: 2,
|
||||||
z: 1,
|
z: 1,
|
||||||
point1: this.point1,
|
point1: {
|
||||||
point2: {
|
x: this.form.x1,
|
||||||
x: this.form.direction == 'transverse'? this.point1.x + parseInt(this.form.length):10,
|
y: this.form.y1
|
||||||
y: this.form.direction == 'vertical'? this.point1.y + parseInt(this.form.length):10
|
},
|
||||||
|
point2: {
|
||||||
|
x: this.form.x2,
|
||||||
|
y: this.form.y2
|
||||||
},
|
},
|
||||||
direction: this.form.direction,
|
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
_type: 'IbpLine',
|
_type: 'IbpLine',
|
||||||
lineWidth: this.form.lineWidth,
|
lineWidth: this.form.lineWidth,
|
||||||
@ -131,24 +141,21 @@
|
|||||||
this.showDeleteButton = false;
|
this.showDeleteButton = false;
|
||||||
this.form = {
|
this.form = {
|
||||||
code: '',
|
code: '',
|
||||||
direction: '',
|
|
||||||
length: '',
|
|
||||||
lineWidth: '',
|
lineWidth: '',
|
||||||
fillColor: ''
|
fillColor: '',
|
||||||
};
|
x1: 10,
|
||||||
this.point = {
|
y1: 10,
|
||||||
x: 10,
|
x2: 20,
|
||||||
y: 10
|
y2: 10
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
generateCode() {
|
||||||
|
const mydate = new Date();
|
||||||
|
this.form.code = "line_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
|
||||||
.button_box{
|
|
||||||
width: 100%;
|
|
||||||
background: #f0f0f0;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,18 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
|
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
|
||||||
<el-form-item label="钥匙孔编号">
|
<el-form-item label="钥匙孔编号" prop="code">
|
||||||
<el-input :disabled="isUpdate" v-model="form.code"></el-input>
|
<el-input :disabled="true" v-model="form.code" >
|
||||||
|
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="钥匙孔宽度">
|
<el-form-item label="钥匙孔宽度" prop="rotatingButtonWidth">
|
||||||
<el-input-number v-model="form.rotatingButtonWidth" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.rotatingButtonWidth" controls-position="right" :min="1"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="钥匙孔高度">
|
<el-form-item label="X轴坐标">
|
||||||
<el-input-number v-model="form.rotatingButtonHeight" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Y轴坐标">
|
||||||
|
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit">{{ buttonText }}</el-button>
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@ -28,14 +34,11 @@
|
|||||||
isUpdate: false,
|
isUpdate: false,
|
||||||
buttonText: '立即创建',
|
buttonText: '立即创建',
|
||||||
showDeleteButton: false,
|
showDeleteButton: false,
|
||||||
point: {
|
|
||||||
x: 10,
|
|
||||||
y: 10
|
|
||||||
},
|
|
||||||
form: {
|
form: {
|
||||||
code: '',
|
code: '',
|
||||||
rotatingButtonWidth: '',
|
rotatingButtonWidth: '',
|
||||||
rotatingButtonHeight: ''
|
x: 10,
|
||||||
|
y: 10
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
@ -43,9 +46,6 @@
|
|||||||
],
|
],
|
||||||
rotatingButtonWidth: [
|
rotatingButtonWidth: [
|
||||||
{ required: true, message: '请输入钥匙孔宽度', trigger: 'blur' },
|
{ required: true, message: '请输入钥匙孔宽度', trigger: 'blur' },
|
||||||
],
|
|
||||||
rotatingButtonHeight: [
|
|
||||||
{ required: true, message: '请输入钥匙孔高度', trigger: 'blur' },
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -62,38 +62,49 @@
|
|||||||
this.isUpdate = true;
|
this.isUpdate = true;
|
||||||
this.form.code = model.code;
|
this.form.code = model.code;
|
||||||
this.form.rotatingButtonWidth = model.width;
|
this.form.rotatingButtonWidth = model.width;
|
||||||
this.form.rotatingButtonHeight = model.height;
|
this.form.x = model.point.x;
|
||||||
this.point = model.point;
|
this.form.y = model.point.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit() {
|
onSubmit(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
const rotatingButtonModel = {
|
const rotatingButtonModel = {
|
||||||
zlevel: 2,
|
zlevel: 2,
|
||||||
z: 1,
|
z: 1,
|
||||||
point: this.point,
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
draggable: true,
|
draggable: true,
|
||||||
_type: 'RotatingButton',
|
_type: 'RotatingButton',
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
width: this.form .rotatingButtonWidth,
|
width: this.form .rotatingButtonWidth,
|
||||||
height: this.form.rotatingButtonHeight
|
|
||||||
};
|
};
|
||||||
this.$emit('createRotatingButton', rotatingButtonModel);
|
this.$emit('createRotatingButton', rotatingButtonModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
deleteDevice() {
|
deleteDevice() {
|
||||||
const rotatingButtonModel = {
|
const rotatingButtonModel = {
|
||||||
zlevel: 2,
|
zlevel: 2,
|
||||||
z: 1,
|
z: 1,
|
||||||
point: this.point,
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
draggable: true,
|
draggable: true,
|
||||||
_type: 'RotatingButton',
|
_type: 'RotatingButton',
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
width: this.form .rotatingButtonWidth,
|
width: this.form .rotatingButtonWidth,
|
||||||
height: this.form.rotatingButtonHeight
|
|
||||||
};
|
};
|
||||||
this.$emit('deleteDataModel',rotatingButtonModel );
|
this.$emit('deleteDataModel',rotatingButtonModel );
|
||||||
this.initPage();
|
this.initPage();
|
||||||
@ -105,12 +116,13 @@
|
|||||||
this.form = {
|
this.form = {
|
||||||
code: '',
|
code: '',
|
||||||
rotatingButtonWidth: '',
|
rotatingButtonWidth: '',
|
||||||
rotatingButtonHeight: ''
|
|
||||||
};
|
|
||||||
this.point = {
|
|
||||||
x: 10,
|
x: 10,
|
||||||
y: 10
|
y: 10
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
generateCode() {
|
||||||
|
const mydate = new Date();
|
||||||
|
this.form.code = "rButton_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -0,0 +1,133 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
|
||||||
|
<el-form-item label="端子编号" prop="code">
|
||||||
|
<el-input :disabled="true" v-model="form.code" style="width:300px">
|
||||||
|
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="端子宽度" prop="terminalWidth">
|
||||||
|
<el-input-number v-model="form.terminalWidth" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="X轴坐标">
|
||||||
|
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Y轴坐标">
|
||||||
|
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'KeyDraft',
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isUpdate: false,
|
||||||
|
buttonText: '立即创建',
|
||||||
|
showDeleteButton: false,
|
||||||
|
form: {
|
||||||
|
code: '',
|
||||||
|
terminalWidth: '',
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
code: [
|
||||||
|
{ required: true, message: '请输入端子编号', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
terminalWidth: [
|
||||||
|
{ required: true, message: '请输入端子宽度', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.ibp.rightClickCount': function (val) {
|
||||||
|
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||||
|
if (model._type === 'TeleTerminal' ){
|
||||||
|
this.buttonText = '修改';
|
||||||
|
this.showDeleteButton = true;
|
||||||
|
this.isUpdate = true;
|
||||||
|
this.form.code = model.code;
|
||||||
|
this.form.terminalWidth = model.width;
|
||||||
|
this.form.terminalHeight = model.height;
|
||||||
|
this.form.x = model.point.x;
|
||||||
|
this.form.y = model.point.y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onSubmit(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if (valid){
|
||||||
|
const TerminalModel = {
|
||||||
|
zlevel: 2,
|
||||||
|
z: 1,
|
||||||
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
|
draggable: true,
|
||||||
|
_type: 'TeleTerminal',
|
||||||
|
code: this.form.code,
|
||||||
|
width: this.form.terminalWidth,
|
||||||
|
};
|
||||||
|
this.$emit('createTeleTerminal', TerminalModel);
|
||||||
|
this.initPage();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
deleteDevice() {
|
||||||
|
const TerminalModel = {
|
||||||
|
zlevel: 2,
|
||||||
|
z: 1,
|
||||||
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
|
draggable: true,
|
||||||
|
_type: 'TeleTerminal',
|
||||||
|
code: this.form.code,
|
||||||
|
width: this.form .terminalWidth,
|
||||||
|
};
|
||||||
|
this.$emit('deleteDataModel',TerminalModel);
|
||||||
|
this.initPage();
|
||||||
|
},
|
||||||
|
initPage() {
|
||||||
|
this.isUpdate = false;
|
||||||
|
this.buttonText = '立即创建';
|
||||||
|
this.showDeleteButton = false;
|
||||||
|
this.form = {
|
||||||
|
code: '',
|
||||||
|
terminalWidth: '',
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
|
};
|
||||||
|
},
|
||||||
|
generateCode() {
|
||||||
|
const mydate = new Date();
|
||||||
|
this.form.code = "terminal"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -1,24 +1,33 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
||||||
<el-form-item label="文字编号">
|
<el-form-item label="文字编号" prop="code">
|
||||||
<el-input :disabled="isUpdate" v-model="form.code"></el-input>
|
<el-input :disabled="true" v-model="form.code" >
|
||||||
|
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文字内容">
|
<el-form-item label="文字内容" prop="context">
|
||||||
<el-input type="textarea" v-model="form.context"></el-input>
|
<el-input type="textarea" v-model="form.context"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文字颜色">
|
<el-form-item label="文字颜色" prop="textFill">
|
||||||
<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="文字大小">
|
<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="50"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文字粗细">
|
<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>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="X轴坐标">
|
||||||
|
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Y轴坐标">
|
||||||
|
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit">{{ buttonText }}</el-button>
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@ -34,16 +43,14 @@
|
|||||||
isUpdate: false,
|
isUpdate: false,
|
||||||
buttonText: '立即创建',
|
buttonText: '立即创建',
|
||||||
showDeleteButton: false,
|
showDeleteButton: false,
|
||||||
point: {
|
|
||||||
x: 10,
|
|
||||||
y: 10
|
|
||||||
},
|
|
||||||
form: {
|
form: {
|
||||||
code: '',
|
code: '',
|
||||||
context: '',
|
context: '',
|
||||||
textFill: '',
|
textFill: '',
|
||||||
fontSize: '',
|
fontSize: '',
|
||||||
fontWeight: ''
|
fontWeight: '',
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
@ -79,18 +86,45 @@
|
|||||||
this.form.textFill = model.textFill;
|
this.form.textFill = model.textFill;
|
||||||
this.form.fontSize = model.fontSize;
|
this.form.fontSize = model.fontSize;
|
||||||
this.form.fontWeight = model.fontWeight;
|
this.form.fontWeight = model.fontWeight;
|
||||||
this.point = model.point;
|
this.form.x = model.point.x;
|
||||||
|
this.form.y = model.point.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit() {
|
onSubmit(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
const textModel = {
|
const textModel = {
|
||||||
zlevel: 2,
|
zlevel: 2,
|
||||||
z: 1,
|
z: 1,
|
||||||
point: this.point,
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
|
code: this.form.code,
|
||||||
|
_type: 'IbpText',
|
||||||
|
context: this.form.context,
|
||||||
|
textFill: this.form.textFill,
|
||||||
|
fontSize: this.form.fontSize ,
|
||||||
|
fontWeight: this.form.fontWeight,
|
||||||
|
fontFamily: 'consolas'
|
||||||
|
};
|
||||||
|
this.$emit('createText', textModel);
|
||||||
|
this.initPage();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const textModel = {
|
||||||
|
zlevel: 2,
|
||||||
|
z: 1,
|
||||||
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
_type: 'IbpText',
|
_type: 'IbpText',
|
||||||
context: this.form.context,
|
context: this.form.context,
|
||||||
@ -106,7 +140,10 @@
|
|||||||
const textModel = {
|
const textModel = {
|
||||||
zlevel: 2,
|
zlevel: 2,
|
||||||
z: 1,
|
z: 1,
|
||||||
point: this.point,
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
_type: 'IbpText',
|
_type: 'IbpText',
|
||||||
context: this.form.context,
|
context: this.form.context,
|
||||||
@ -127,12 +164,14 @@
|
|||||||
context: '',
|
context: '',
|
||||||
textFill: '',
|
textFill: '',
|
||||||
fontSize: '',
|
fontSize: '',
|
||||||
fontWeight: ''
|
fontWeight: '',
|
||||||
};
|
|
||||||
this.point = {
|
|
||||||
x: 10,
|
x: 10,
|
||||||
y: 10
|
y: 10
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
generateCode() {
|
||||||
|
const mydate = new Date();
|
||||||
|
this.form.code = "text_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,21 +1,30 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
|
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
|
||||||
<el-form-item label="提示框编号">
|
<el-form-item label="提示框编号" prop="code">
|
||||||
<el-input :disabled="isUpdate" v-model="form.code"></el-input>
|
<el-input :disabled="true" v-model="form.code" >
|
||||||
|
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="提示框宽度">
|
<el-form-item label="提示框宽度" prop="tipBoxWidth">
|
||||||
<el-input-number v-model="form.tipBoxWidth" controls-position="right" :min="1" ></el-input-number>
|
<el-input-number v-model="form.tipBoxWidth" controls-position="right" :min="1" ></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="提示框高度">
|
<el-form-item label="提示框高度" prop="tipBoxHeight">
|
||||||
<el-input-number v-model="form.tipBoxHeight" controls-position="right" :min="1" ></el-input-number>
|
<el-input-number v-model="form.tipBoxHeight" controls-position="right" :min="1" ></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="提示框颜色">
|
<el-form-item label="提示框颜色" prop="fillColor">
|
||||||
<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-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Y轴坐标">
|
||||||
|
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit">{{ buttonText }}</el-button>
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@ -32,15 +41,13 @@
|
|||||||
isUpdate: false,
|
isUpdate: false,
|
||||||
buttonText: '立即创建',
|
buttonText: '立即创建',
|
||||||
showDeleteButton: false,
|
showDeleteButton: false,
|
||||||
point: {
|
|
||||||
x: 10,
|
|
||||||
y: 10
|
|
||||||
},
|
|
||||||
form: {
|
form: {
|
||||||
code: '',
|
code: '',
|
||||||
tipBoxWidth: '',
|
tipBoxWidth: '',
|
||||||
tipBoxHeight: '',
|
tipBoxHeight: '',
|
||||||
fillColor: ''
|
fillColor: '',
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
@ -72,18 +79,24 @@
|
|||||||
this.form.tipBoxWidth = model.width;
|
this.form.tipBoxWidth = model.width;
|
||||||
this.form.tipBoxHeight = model.height;
|
this.form.tipBoxHeight = model.height;
|
||||||
this.form.fillColor = model.fillColor;
|
this.form.fillColor = model.fillColor;
|
||||||
this.point = model.point;
|
this.form.x = model.point.x;
|
||||||
|
this.form.y = model.point.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit() {
|
onSubmit(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
const tipBoxModel = {
|
const tipBoxModel = {
|
||||||
zlevel: 2,
|
zlevel: 1,
|
||||||
z: 1,
|
z: 1,
|
||||||
point: this.point,
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
_type: 'TipBox',
|
_type: 'TipBox',
|
||||||
width: this.form.tipBoxWidth,
|
width: this.form.tipBoxWidth,
|
||||||
@ -92,12 +105,20 @@
|
|||||||
};
|
};
|
||||||
this.$emit('createTipBox', tipBoxModel);
|
this.$emit('createTipBox', tipBoxModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
deleteDevice() {
|
deleteDevice() {
|
||||||
const tipBoxModel = {
|
const tipBoxModel = {
|
||||||
zlevel: 2,
|
zlevel: 1,
|
||||||
z: 1,
|
z: 1,
|
||||||
point: this.point,
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
_type: 'TipBox',
|
_type: 'TipBox',
|
||||||
width: this.form.tipBoxWidth,
|
width: this.form.tipBoxWidth,
|
||||||
@ -115,12 +136,14 @@
|
|||||||
code: '',
|
code: '',
|
||||||
tipBoxWidth: '',
|
tipBoxWidth: '',
|
||||||
tipBoxHeight: '',
|
tipBoxHeight: '',
|
||||||
fillColor: ''
|
fillColor: '',
|
||||||
};
|
|
||||||
this.point = {
|
|
||||||
x: 10,
|
x: 10,
|
||||||
y: 10
|
y: 10
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
generateCode() {
|
||||||
|
const mydate = new Date();
|
||||||
|
this.form.code = "tipBox_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -72,18 +72,24 @@
|
|||||||
>
|
>
|
||||||
</ibp-rotating-button>
|
</ibp-rotating-button>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- <el-tab-pane label="电话端子" name="teleTerminal">
|
<el-tab-pane label="电话端子" name="TeleTerminal">
|
||||||
<ibp-telephone-terminal ref="teleTerminal"
|
<ibp-telephone-terminal ref="teleTerminal"
|
||||||
@createTeleTerminal="createDataModel" @deleteDataModel="deleteDataModel"
|
@createTeleTerminal="createDataModel" @deleteDataModel="deleteDataModel"
|
||||||
>
|
>
|
||||||
</ibp-telephone-terminal>
|
</ibp-telephone-terminal>
|
||||||
</el-tab-pane> -->
|
</el-tab-pane>
|
||||||
<el-tab-pane label="电梯" name="elevator">
|
<el-tab-pane label="电梯" name="elevator">
|
||||||
<ibp-elevator ref="elevator"
|
<ibp-elevator ref="elevator"
|
||||||
@createElevator="createDataModel" @deleteDataModel="deleteDataModel"
|
@createElevator="createDataModel" @deleteDataModel="deleteDataModel"
|
||||||
>
|
>
|
||||||
</ibp-elevator>
|
</ibp-elevator>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="钥匙" name="key">
|
||||||
|
<ibp-key ref="key"
|
||||||
|
@createKey="createDataModel" @deleteDataModel="deleteDataModel"
|
||||||
|
>
|
||||||
|
</ibp-key>
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
@ -104,6 +110,8 @@
|
|||||||
import IbpLine from './ibpLine';
|
import IbpLine from './ibpLine';
|
||||||
import IbpTelephoneTerminal from './ibpTelephoneTerminal';
|
import IbpTelephoneTerminal from './ibpTelephoneTerminal';
|
||||||
import IbpElevator from './ibpElevator';
|
import IbpElevator from './ibpElevator';
|
||||||
|
import IbpKey from './ibpKey';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -119,8 +127,9 @@
|
|||||||
IbpLamp,
|
IbpLamp,
|
||||||
IbpRotatingButton,
|
IbpRotatingButton,
|
||||||
IbpLine,
|
IbpLine,
|
||||||
// IbpTelephoneTerminal,
|
IbpTelephoneTerminal,
|
||||||
IbpElevator
|
IbpElevator,
|
||||||
|
IbpKey
|
||||||
},
|
},
|
||||||
mixins: [
|
mixins: [
|
||||||
|
|
||||||
@ -166,6 +175,8 @@
|
|||||||
this.$refs.alarm.initPage();
|
this.$refs.alarm.initPage();
|
||||||
this.$refs.rotatingbutton.initPage();
|
this.$refs.rotatingbutton.initPage();
|
||||||
this.$refs.elevator.initPage();
|
this.$refs.elevator.initPage();
|
||||||
|
this.$refs.key.initPage();
|
||||||
|
this.$refs.teleTerminal.initPage()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -316,6 +316,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mapPaint{
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.map-view {
|
.map-view {
|
||||||
float: left;
|
float: left;
|
||||||
width: auto;
|
width: auto;
|
||||||
|
@ -585,6 +585,10 @@ export default {
|
|||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
|
.view-control{
|
||||||
|
height: calc(100% - 100px);
|
||||||
|
}
|
||||||
|
|
||||||
.button_box{
|
.button_box{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #f0f0f0;
|
background: #f0f0f0;
|
||||||
|
@ -182,7 +182,6 @@ export default {
|
|||||||
destinationCode: '', // 目的地码
|
destinationCode: '', // 目的地码
|
||||||
destinationCodePoint: { x: 0, y: 0 }, // 目的地码坐标
|
destinationCodePoint: { x: 0, y: 0 }, // 目的地码坐标
|
||||||
destinationCodeShow: false, // 是否显示目的地码
|
destinationCodeShow: false, // 是否显示目的地码
|
||||||
// nameShow: false,
|
|
||||||
axleShow: false,
|
axleShow: false,
|
||||||
namePoint: { x: 0, y: 0 },
|
namePoint: { x: 0, y: 0 },
|
||||||
kmRangeRight: 0,
|
kmRangeRight: 0,
|
||||||
@ -190,7 +189,6 @@ export default {
|
|||||||
region: '',
|
region: '',
|
||||||
logicSectionNum: [],
|
logicSectionNum: [],
|
||||||
logicSectionShow: false,
|
logicSectionShow: false,
|
||||||
// logicSectionNameShow: false,
|
|
||||||
isStandTrack: false,
|
isStandTrack: false,
|
||||||
standTrackName: '',
|
standTrackName: '',
|
||||||
standTrackNamePosition: { x: 0, y: 0 },
|
standTrackNamePosition: { x: 0, y: 0 },
|
||||||
@ -212,7 +210,6 @@ export default {
|
|||||||
sepTypeRight: '',
|
sepTypeRight: '',
|
||||||
offsetRight: 0,
|
offsetRight: 0,
|
||||||
trainPosType: '01',
|
trainPosType: '01',
|
||||||
// pointY: '',
|
|
||||||
parentCode: '',
|
parentCode: '',
|
||||||
points: [],
|
points: [],
|
||||||
isCurve: false
|
isCurve: false
|
||||||
@ -326,7 +323,6 @@ export default {
|
|||||||
{ prop: 'relSwitchCode', label: this.$t('map.relSwitchCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.switchList, change: true, deviceChange: this.deviceChange, isHidden: !this.isRelSwitchCode, disabled: true },
|
{ prop: 'relSwitchCode', label: this.$t('map.relSwitchCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.switchList, change: true, deviceChange: this.deviceChange, isHidden: !this.isRelSwitchCode, disabled: true },
|
||||||
|
|
||||||
{ prop: 'logicSectionShow', label: this.$t('map.displayLogicalExtents'), type: 'checkbox', isHidden: !this.isSwitchSectionShow }, // 1
|
{ prop: 'logicSectionShow', label: this.$t('map.displayLogicalExtents'), type: 'checkbox', isHidden: !this.isSwitchSectionShow }, // 1
|
||||||
// { prop: 'logicSectionNameShow', label: this.$t('map.displayLogicalWxtentNames'), type: 'checkbox', disabled: this.islogicSectionNameShow, isHidden: !this.isSwitchSectionShow }, // 1
|
|
||||||
{ prop: 'logicSectionNameSort', label: this.$t('map.logicSectionNameSort'), type: 'radio', isHidden: !this.isLogicSectionNameSort, radioList: [
|
{ prop: 'logicSectionNameSort', label: this.$t('map.logicSectionNameSort'), type: 'radio', isHidden: !this.isLogicSectionNameSort, radioList: [
|
||||||
{value: true, label: this.$t('map.fromSmallToLarge')},
|
{value: true, label: this.$t('map.fromSmallToLarge')},
|
||||||
{value: false, label: this.$t('map.fromLargeToSmall')}
|
{value: false, label: this.$t('map.fromLargeToSmall')}
|
||||||
@ -457,9 +453,6 @@ export default {
|
|||||||
isStationAxleShow() {
|
isStationAxleShow() {
|
||||||
return this.editModel.section == '02';
|
return this.editModel.section == '02';
|
||||||
},
|
},
|
||||||
// islogicSectionNameShow() {
|
|
||||||
// return !this.editModel.logicSectionShow;
|
|
||||||
// },
|
|
||||||
isstandTrackNameShow() {
|
isstandTrackNameShow() {
|
||||||
return this.editModel.type !== '03' && this.editModel.isStandTrack;
|
return this.editModel.type !== '03' && this.editModel.isStandTrack;
|
||||||
},
|
},
|
||||||
@ -561,7 +554,6 @@ export default {
|
|||||||
x: selected.namePosition.x,
|
x: selected.namePosition.x,
|
||||||
y: selected.namePosition.y
|
y: selected.namePosition.y
|
||||||
};
|
};
|
||||||
// this.editModel.nameShow = selected.nameShow;
|
|
||||||
this.editModel.axleShow = selected.axleShow;
|
this.editModel.axleShow = selected.axleShow;
|
||||||
this.editModel.relStandCode = selected.relStandCode;
|
this.editModel.relStandCode = selected.relStandCode;
|
||||||
this.editModel.leftStopPointOffset = selected.leftStopPointOffset;
|
this.editModel.leftStopPointOffset = selected.leftStopPointOffset;
|
||||||
@ -581,7 +573,6 @@ export default {
|
|||||||
|
|
||||||
this.editModel.logicSectionNum = selected.type === '01' ? selected.logicSectionNum : [0];
|
this.editModel.logicSectionNum = selected.type === '01' ? selected.logicSectionNum : [0];
|
||||||
this.editModel.logicSectionShow = selected.logicSectionShow;
|
this.editModel.logicSectionShow = selected.logicSectionShow;
|
||||||
// this.editModel.logicSectionNameShow = selected.logicSectionNameShow;
|
|
||||||
this.editModel.isStandTrack = selected.isStandTrack;
|
this.editModel.isStandTrack = selected.isStandTrack;
|
||||||
this.editModel.standTrackName = selected.standTrackName;
|
this.editModel.standTrackName = selected.standTrackName;
|
||||||
this.editModel.standTrackNamePosition = {
|
this.editModel.standTrackNamePosition = {
|
||||||
@ -666,7 +657,6 @@ export default {
|
|||||||
axleShow: false,
|
axleShow: false,
|
||||||
type: '02',
|
type: '02',
|
||||||
namePosition: { x: 0, y: 0 },
|
namePosition: { x: 0, y: 0 },
|
||||||
// nameShow: model.logicSectionNameShow,
|
|
||||||
isStandTrack: false,
|
isStandTrack: false,
|
||||||
standTrackName: model.standTrackName,
|
standTrackName: model.standTrackName,
|
||||||
standTrackNamePosition: {
|
standTrackNamePosition: {
|
||||||
@ -695,7 +685,6 @@ export default {
|
|||||||
relSwitchCode: model.relSwitchCode,
|
relSwitchCode: model.relSwitchCode,
|
||||||
logicSectionNum: [],
|
logicSectionNum: [],
|
||||||
logicSectionShow: model.logicSectionShow,
|
logicSectionShow: model.logicSectionShow,
|
||||||
// logicSectionNameShow: model.logicSectionNameShow,
|
|
||||||
stationCode: model.stationCode,
|
stationCode: model.stationCode,
|
||||||
linkCode: model.linkCode,
|
linkCode: model.linkCode,
|
||||||
offsetLeft: middleOffset * (index) + model.offsetLeft,
|
offsetLeft: middleOffset * (index) + model.offsetLeft,
|
||||||
@ -776,7 +765,6 @@ export default {
|
|||||||
code: uid,
|
code: uid,
|
||||||
name: uname,
|
name: uname,
|
||||||
type: '01',
|
type: '01',
|
||||||
// nameShow: true,
|
|
||||||
axleShow: false,
|
axleShow: false,
|
||||||
isStandTrack: false,
|
isStandTrack: false,
|
||||||
standTrackName: '',
|
standTrackName: '',
|
||||||
@ -797,7 +785,6 @@ export default {
|
|||||||
namePosition: { x: 0, y: 0 },
|
namePosition: { x: 0, y: 0 },
|
||||||
logicSectionNum: [0],
|
logicSectionNum: [0],
|
||||||
logicSectionShow: true,
|
logicSectionShow: true,
|
||||||
// logicSectionNameShow: true,
|
|
||||||
logicSectionNameSort: true,
|
logicSectionNameSort: true,
|
||||||
linkCode: link.code,
|
linkCode: link.code,
|
||||||
sepTypeLeft: '01',
|
sepTypeLeft: '01',
|
||||||
@ -880,8 +867,6 @@ export default {
|
|||||||
relStandCode: this.editModel.relStandCode,
|
relStandCode: this.editModel.relStandCode,
|
||||||
leftStopPointOffset: Number(this.editModel.leftStopPointOffset),
|
leftStopPointOffset: Number(this.editModel.leftStopPointOffset),
|
||||||
rightStopPointOffset: Number(this.editModel.rightStopPointOffset),
|
rightStopPointOffset: Number(this.editModel.rightStopPointOffset),
|
||||||
|
|
||||||
// nameShow: this.editModel.nameShow,
|
|
||||||
axleShow: this.editModel.axleShow,
|
axleShow: this.editModel.axleShow,
|
||||||
namePosition: {
|
namePosition: {
|
||||||
x: this.editModel.namePoint.x,
|
x: this.editModel.namePoint.x,
|
||||||
@ -919,7 +904,6 @@ export default {
|
|||||||
points: JSON.parse(pointArr),
|
points: JSON.parse(pointArr),
|
||||||
logicSectionNum: this.editModel.logicSectionNum,
|
logicSectionNum: this.editModel.logicSectionNum,
|
||||||
logicSectionShow: this.editModel.logicSectionShow,
|
logicSectionShow: this.editModel.logicSectionShow,
|
||||||
// logicSectionNameShow: this.editModel.logicSectionNameShow,
|
|
||||||
sepTypeLeft: this.editModel.sepTypeLeft,
|
sepTypeLeft: this.editModel.sepTypeLeft,
|
||||||
offsetLeft: this.editModel.offsetLeft,
|
offsetLeft: this.editModel.offsetLeft,
|
||||||
sepTypeRight: this.editModel.sepTypeRight,
|
sepTypeRight: this.editModel.sepTypeRight,
|
||||||
@ -947,15 +931,10 @@ export default {
|
|||||||
const model = this.buildEditModel();
|
const model = this.buildEditModel();
|
||||||
this.sectionList.forEach(section => {
|
this.sectionList.forEach(section => {
|
||||||
if (section.parentCode == model.code) {
|
if (section.parentCode == model.code) {
|
||||||
// section.nameShow = section.logicSectionNameShow = model.logicSectionNameShow;
|
|
||||||
section.logicSectionShow = model.logicSectionShow;
|
section.logicSectionShow = model.logicSectionShow;
|
||||||
section.trainPosType = model.trainPosType;
|
section.trainPosType = model.trainPosType;
|
||||||
edits.push(section);
|
edits.push(section);
|
||||||
}
|
}
|
||||||
// if (section.points[0].y == this.editModel.pointY && section.points[section.points.length - 1].y == this.editModel.pointY) {
|
|
||||||
// section.trainPosType = this.editModel.trainPosType;
|
|
||||||
// edits.push(section);
|
|
||||||
// }
|
|
||||||
});
|
});
|
||||||
edits.push(model);
|
edits.push(model);
|
||||||
this.fieldS = '';
|
this.fieldS = '';
|
||||||
@ -1005,7 +984,6 @@ export default {
|
|||||||
name: uidL,
|
name: uidL,
|
||||||
type: '01',
|
type: '01',
|
||||||
parentCode: '',
|
parentCode: '',
|
||||||
// nameShow: selected.nameShow,
|
|
||||||
axleShow: selected.axleShow,
|
axleShow: selected.axleShow,
|
||||||
isStandTrack: false,
|
isStandTrack: false,
|
||||||
kmRangeRight: '',
|
kmRangeRight: '',
|
||||||
@ -1026,7 +1004,6 @@ export default {
|
|||||||
logicSectionNameSort: selected.logicSectionNameSort,
|
logicSectionNameSort: selected.logicSectionNameSort,
|
||||||
logicSectionNum: selected.logicSectionNum,
|
logicSectionNum: selected.logicSectionNum,
|
||||||
logicSectionShow: selected.logicSectionShow,
|
logicSectionShow: selected.logicSectionShow,
|
||||||
// logicSectionNameShow: selected.logicSectionNameShow,
|
|
||||||
sepTypeLeft: selected.sepTypeLeft,
|
sepTypeLeft: selected.sepTypeLeft,
|
||||||
offsetLeft: selected.offsetLeft,
|
offsetLeft: selected.offsetLeft,
|
||||||
sepTypeRight: '01',
|
sepTypeRight: '01',
|
||||||
@ -1052,7 +1029,6 @@ export default {
|
|||||||
name: uidR,
|
name: uidR,
|
||||||
type: '01',
|
type: '01',
|
||||||
parentCode: '',
|
parentCode: '',
|
||||||
// nameShow: selected.nameShow,
|
|
||||||
axleShow: selected.axleShow,
|
axleShow: selected.axleShow,
|
||||||
isStandTrack: false,
|
isStandTrack: false,
|
||||||
kmRangeRight: '',
|
kmRangeRight: '',
|
||||||
@ -1073,7 +1049,6 @@ export default {
|
|||||||
logicSectionNameSort: selected.logicSectionNameSort,
|
logicSectionNameSort: selected.logicSectionNameSort,
|
||||||
logicSectionNum: selected.logicSectionNum,
|
logicSectionNum: selected.logicSectionNum,
|
||||||
logicSectionShow: selected.logicSectionShow,
|
logicSectionShow: selected.logicSectionShow,
|
||||||
// logicSectionNameShow: selected.logicSectionNameShow,
|
|
||||||
sepTypeLeft: '01',
|
sepTypeLeft: '01',
|
||||||
offsetLeft: selected.offsetLeft,
|
offsetLeft: selected.offsetLeft,
|
||||||
sepTypeRight: selected.sepTypeRight,
|
sepTypeRight: selected.sepTypeRight,
|
||||||
@ -1165,7 +1140,6 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (lsection.points[lsection.points.length - 1].x == rsection.points[0].x && lsection.points[lsection.points.length - 1].y == rsection.points[0].y) {
|
if (lsection.points[lsection.points.length - 1].x == rsection.points[0].x && lsection.points[lsection.points.length - 1].y == rsection.points[0].y) {
|
||||||
// model.nameShow = lsection.nameShow;
|
|
||||||
model.axleShow = lsection.axleShow;
|
model.axleShow = lsection.axleShow;
|
||||||
model.logicSectionNum = lsection.logicSectionNum;
|
model.logicSectionNum = lsection.logicSectionNum;
|
||||||
model.logicSectionShow = lsection.logicSectionShow;
|
model.logicSectionShow = lsection.logicSectionShow;
|
||||||
@ -1174,7 +1148,6 @@ export default {
|
|||||||
model.offsetLeft = lsection.offsetLeft;
|
model.offsetLeft = lsection.offsetLeft;
|
||||||
model.sepTypeRight = rsection.sepTypeRight;
|
model.sepTypeRight = rsection.sepTypeRight;
|
||||||
model.offsetRight = lsection.offsetRight + rsection.offsetRight;
|
model.offsetRight = lsection.offsetRight + rsection.offsetRight;
|
||||||
// model.logicSectionNameShow = lsection.logicSectionNameShow;
|
|
||||||
model.isCurve = lsection.isCurve;
|
model.isCurve = lsection.isCurve;
|
||||||
model.points = [
|
model.points = [
|
||||||
{ x: lsection.points[0].x, y: lsection.points[0].y },
|
{ x: lsection.points[0].x, y: lsection.points[0].y },
|
||||||
@ -1186,7 +1159,6 @@ export default {
|
|||||||
this.$emit('addOrUpdateMapModel', model);
|
this.$emit('addOrUpdateMapModel', model);
|
||||||
}
|
}
|
||||||
if (lsection.points[0].x == rsection.points[rsection.points.length - 1].x && lsection.points[0].y == rsection.points[rsection.points.length - 1].y) {
|
if (lsection.points[0].x == rsection.points[rsection.points.length - 1].x && lsection.points[0].y == rsection.points[rsection.points.length - 1].y) {
|
||||||
// model.nameShow = rsection.nameShow;
|
|
||||||
model.axleShow = rsection.axleShow;
|
model.axleShow = rsection.axleShow;
|
||||||
model.logicSectionNum = rsection.logicSectionNum;
|
model.logicSectionNum = rsection.logicSectionNum;
|
||||||
model.logicSectionShow = rsection.logicSectionShow;
|
model.logicSectionShow = rsection.logicSectionShow;
|
||||||
@ -1195,7 +1167,6 @@ export default {
|
|||||||
model.offsetLeft = rsection.offsetLeft;
|
model.offsetLeft = rsection.offsetLeft;
|
||||||
model.sepTypeRight = lsection.sepTypeRight;
|
model.sepTypeRight = lsection.sepTypeRight;
|
||||||
model.offsetRight = lsection.offsetRight + rsection.offsetRight;
|
model.offsetRight = lsection.offsetRight + rsection.offsetRight;
|
||||||
// model.logicSectionNameShow = rsection.logicSectionNameShow;
|
|
||||||
model.isCurve = rsection.isCurve;
|
model.isCurve = rsection.isCurve;
|
||||||
model.points = [
|
model.points = [
|
||||||
{ x: rsection.points[0].x, y: rsection.points[0].y },
|
{ x: rsection.points[0].x, y: rsection.points[0].y },
|
||||||
@ -1269,7 +1240,6 @@ export default {
|
|||||||
code: uid,
|
code: uid,
|
||||||
name: sectiona.name || sectionb.name || sectionc.name,
|
name: sectiona.name || sectionb.name || sectionc.name,
|
||||||
type: '03',
|
type: '03',
|
||||||
// nameShow: true,
|
|
||||||
axleShow: false,
|
axleShow: false,
|
||||||
namePosition: point,
|
namePosition: point,
|
||||||
isStandTrack: false,
|
isStandTrack: false,
|
||||||
@ -1291,7 +1261,6 @@ export default {
|
|||||||
points: [{ x: 0, y: 0 }, { x: 0, y: 0 }],
|
points: [{ x: 0, y: 0 }, { x: 0, y: 0 }],
|
||||||
logicSectionNum: [0],
|
logicSectionNum: [0],
|
||||||
logicSectionShow: false,
|
logicSectionShow: false,
|
||||||
// logicSectionNameShow: false,
|
|
||||||
sepTypeLeft: '00',
|
sepTypeLeft: '00',
|
||||||
offsetLeft: 0,
|
offsetLeft: 0,
|
||||||
sepTypeRight: '00',
|
sepTypeRight: '00',
|
||||||
|
@ -223,7 +223,6 @@ export default {
|
|||||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||||
] },
|
] },
|
||||||
// { prop: 'nameShow', label: this.$t('map.signalDisplayName'), type: 'checkbox' },
|
|
||||||
{ prop: 'lampPostType', label: this.$t('map.lampPostType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPostTypeList },
|
{ prop: 'lampPostType', label: this.$t('map.lampPostType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPostTypeList },
|
||||||
{ prop: 'lampPositionType', label: this.$t('map.lampPositionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPositionTypeList },
|
{ prop: 'lampPositionType', label: this.$t('map.lampPositionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPositionTypeList },
|
||||||
{ prop: 'directionType', label: this.$t('map.signalDirectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalDirectionTypeList },
|
{ prop: 'directionType', label: this.$t('map.signalDirectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalDirectionTypeList },
|
||||||
|