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) {
|
||||
return request({
|
||||
url: '/api/permission/totalRemains',
|
||||
url: '/api/userPermission/totalRemains',
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
@ -46,7 +38,7 @@ export function getTotalRemains(params) {
|
||||
/** 设置权限失效或有效*/
|
||||
export function setLessonPermisson(data) {
|
||||
return request({
|
||||
url: `/api/permission/${data.id}/status`,
|
||||
url: `/api/userPermission/${data.id}/status`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
@ -57,7 +49,7 @@ export function setLessonPermisson(data) {
|
||||
*/
|
||||
export function queryPermissionSimulation(data) {
|
||||
return request({
|
||||
url: `/api/permission/${data.mapId}/${data.prdCode}/simulation`,
|
||||
url: `/api/userPermission/${data.mapId}/${data.prdCode}/simulation`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
@ -65,38 +57,28 @@ export function queryPermissionSimulation(data) {
|
||||
/** 获取大屏权限列表*/
|
||||
export function queryPermissionScreen() {
|
||||
return request({
|
||||
url: `/api/permission/bigScreen`,
|
||||
url: `/api/userPermission/bigScreen`,
|
||||
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) {
|
||||
return request({
|
||||
url: `/api/permission/my`,
|
||||
url: `/api/userPermission/my`,
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
@ -110,10 +92,10 @@ export function getDistribute(id) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 用户权限列表 */
|
||||
/** 设置权限所有者 */
|
||||
export function putPermissionOwner(data) {
|
||||
return request({
|
||||
url: `/api/permission/${data.id}/owner`,
|
||||
url: `/api/userPermission/${data.id}/owner`,
|
||||
method: 'put',
|
||||
data: data.owner
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
/** 上课权限获取*/
|
||||
/** 权限转增*/
|
||||
export function getLessons(data) {
|
||||
return request({
|
||||
url: '/api/distribute/getLessons',
|
||||
@ -9,15 +9,41 @@ export function getLessons(data) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 上课权限分发*/
|
||||
/** 权限分发*/
|
||||
export function giveLessons(data) {
|
||||
return request({
|
||||
url: '/api/distribute/givePermission',
|
||||
url: '/api/distribute/distribute',
|
||||
method: 'post',
|
||||
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) {
|
||||
return request({
|
||||
|
@ -15,3 +15,32 @@ export function generateScheduling(group, 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"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="column.tagType(scope.row, scope.$index)">{{ column.columnValue(scope.row,
|
||||
scope.$index) }}</el-tag>
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -10,7 +10,7 @@ export default {
|
||||
permissionStatus: '权限状态',
|
||||
permissionUseType: '公用/专用',
|
||||
permissionTotal: '权限总数',
|
||||
permissionRemains: '生于权限',
|
||||
permissionRemains: '剩余权限',
|
||||
isForever: '是否永久',
|
||||
startTime: '开始时间',
|
||||
endTime: '结束时间',
|
||||
|
@ -28,6 +28,7 @@ export default {
|
||||
replayManage: '回放管理',
|
||||
|
||||
permissionManage: '权限管理',
|
||||
selfPermission: '我的权限',
|
||||
|
||||
pulishManage: '发布内容管理',
|
||||
publishMapManage: '发布地图管理',
|
||||
|
@ -29,7 +29,7 @@ deviceRender[deviceType.RotatingButton] = {
|
||||
|
||||
/** TipBox渲染配置*/
|
||||
deviceRender[deviceType.TipBox] = {
|
||||
zlevel: 2
|
||||
zlevel: 1
|
||||
};
|
||||
|
||||
/** BackGround渲染配置*/
|
||||
@ -57,4 +57,14 @@ deviceRender[deviceType.Elevator] = {
|
||||
zlevel: 2
|
||||
};
|
||||
|
||||
/** Key 渲染配置 */
|
||||
deviceRender[deviceType.Key] = {
|
||||
zlevel: 3
|
||||
};
|
||||
|
||||
/** TeleTerminal 渲染配置 */
|
||||
deviceRender[deviceType.TeleTerminal] = {
|
||||
zlevel: 2
|
||||
};
|
||||
|
||||
export default deviceRender;
|
||||
|
@ -9,7 +9,9 @@ const deviceType = {
|
||||
IbpLine: 'IbpLine',
|
||||
AppendageBox: 'AppendageBox',
|
||||
Alarm: 'Alarm',
|
||||
Elevator: 'Elevator'
|
||||
Elevator: 'Elevator',
|
||||
Key: 'Key',
|
||||
TeleTerminal: 'TeleTerminal'
|
||||
};
|
||||
|
||||
export default deviceType;
|
||||
|
@ -223,6 +223,7 @@ class IbpPan {
|
||||
}
|
||||
|
||||
resize(opt) {
|
||||
console.log('----------',this.$ibpZr);
|
||||
this.$ibpZr.resize(opt);
|
||||
this.$painter.updateZrSize(opt);
|
||||
}
|
||||
|
@ -10,8 +10,9 @@ export default class alarm extends Group {
|
||||
this.model = device.model;
|
||||
this.event = device.event;
|
||||
this.zlevel = device.model.zlevel;
|
||||
this.offsetX = 0;
|
||||
this.offsetY = 0;
|
||||
this.offsetX = 0;
|
||||
this.offsetY = 0;
|
||||
this.dragging = false;
|
||||
this.create();
|
||||
}
|
||||
|
||||
@ -25,7 +26,7 @@ export default class alarm extends Group {
|
||||
x: model.point.x,
|
||||
y: model.point.y,
|
||||
width: model.width,
|
||||
height: model.height
|
||||
height: model.width/71*74
|
||||
}
|
||||
});
|
||||
this.add(this.imageBg);
|
||||
@ -53,8 +54,9 @@ export default class alarm extends Group {
|
||||
if (e.which == 3) {
|
||||
store.dispatch('ibp/setUpdateDeviceData', this.model);
|
||||
}
|
||||
this.offsetX = e.offsetX;
|
||||
this.offsetY = e.offsetY;
|
||||
this.offsetX = e.offsetX;
|
||||
this.offsetY = e.offsetY;
|
||||
this.dragging = true;
|
||||
}
|
||||
|
||||
mousemove(e) {
|
||||
@ -62,7 +64,11 @@ export default class alarm extends Group {
|
||||
|
||||
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);
|
||||
if (this.dragging) {
|
||||
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.draggable = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ export default class AppendageBox extends Group {
|
||||
this.z = device.model.z;
|
||||
this.offsetX = 0;
|
||||
this.offsetY = 0;
|
||||
this.dragging = false;
|
||||
this.create();
|
||||
}
|
||||
|
||||
@ -47,12 +48,16 @@ export default class AppendageBox extends Group {
|
||||
}
|
||||
this.offsetX = e.offsetX;
|
||||
this.offsetY = e.offsetY;
|
||||
this.dragging = true;
|
||||
}
|
||||
mousemove() {
|
||||
}
|
||||
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);
|
||||
if (this.dragging) {
|
||||
this.model.point.x = this.model.point.x + (e.offsetX - this.offsetX);
|
||||
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.offsetX = 0;
|
||||
this.offsetY = 0;
|
||||
this.dragging = false;
|
||||
this.create();
|
||||
}
|
||||
|
||||
@ -25,7 +26,6 @@ class Arrow extends Group {
|
||||
},
|
||||
style: {
|
||||
stroke: model.stroke,
|
||||
lineWidth: model.lineWidth,
|
||||
fill: model.fill
|
||||
}
|
||||
});
|
||||
@ -81,13 +81,16 @@ class Arrow extends Group {
|
||||
}
|
||||
this.offsetX = e.offsetX;
|
||||
this.offsetY = e.offsetY;
|
||||
this.dragging = true;
|
||||
}
|
||||
mousemove() {
|
||||
}
|
||||
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);
|
||||
if (this.dragging) {
|
||||
this.model.point.x = this.model.point.x + (e.offsetX - this.offsetX);
|
||||
this.model.point.y = this.model.point.y + (e.offsetY - this.offsetY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ export default class background extends Group {
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
this.imageBg = new Image({
|
||||
this.imageBg1 = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
@ -23,6 +23,17 @@ export default class background extends Group {
|
||||
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({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
@ -37,7 +48,8 @@ export default class background extends Group {
|
||||
}
|
||||
tailorBgImage() {
|
||||
// this.imageBg.setClipPath(this.tailorRect);
|
||||
this.add(this.imageBg);
|
||||
this.add(this.imageBg1);
|
||||
this.add(this.imageBg2);
|
||||
}
|
||||
setDraggable() {
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ export default class button extends Group {
|
||||
this.event = device.event;
|
||||
this.offsetX = 0;
|
||||
this.offsetY = 0;
|
||||
this.dragging = false;
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
@ -78,36 +79,36 @@ export default class button extends Group {
|
||||
setState(model) {
|
||||
switch (model.status) {
|
||||
case 'on': {
|
||||
// 关闭
|
||||
this.close();
|
||||
// 开放
|
||||
this.open();
|
||||
this.model.status='on';
|
||||
break;
|
||||
}
|
||||
case 'off': {
|
||||
// 开放
|
||||
this.open();
|
||||
// 关闭
|
||||
this.close();
|
||||
this.model.status='off';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// onclick() {
|
||||
// if (!this.model.draggable) {
|
||||
// switch (this.model.status) {
|
||||
// case 'off': {
|
||||
// this.open();
|
||||
// this.model.status='on';
|
||||
// break;
|
||||
// }
|
||||
// case 'on': {
|
||||
// this.close();
|
||||
// this.model.status='off';
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
onclick() {
|
||||
if (!this.model.draggable) {
|
||||
switch (this.model.status) {
|
||||
case 'off': {
|
||||
this.open();
|
||||
this.model.status='on';
|
||||
break;
|
||||
}
|
||||
case 'on': {
|
||||
this.close();
|
||||
this.model.status='off';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mousedown(e) {
|
||||
this.event.disable();
|
||||
@ -116,16 +117,18 @@ export default class button extends Group {
|
||||
}
|
||||
this.offsetX = e.offsetX;
|
||||
this.offsetY = e.offsetY;
|
||||
this.dragging = true;
|
||||
}
|
||||
mousemove() {
|
||||
}
|
||||
mouseup(e) {
|
||||
this.event.enable();
|
||||
// debugger;
|
||||
this.model.point.x = this.model.point.x + (e.offsetX - this.offsetX);
|
||||
this.model.point.y = this.model.point.y + (e.offsetY - this.offsetY);
|
||||
}
|
||||
if (this.dragging) {
|
||||
this.model.point.x = this.model.point.x + (e.offsetX - this.offsetX);
|
||||
this.model.point.y = this.model.point.y + (e.offsetY - this.offsetY);
|
||||
}
|
||||
|
||||
}
|
||||
// 关闭
|
||||
close() {
|
||||
const color = button.colors.get(`${this.model.color}_off`);
|
||||
|
@ -9,8 +9,9 @@ export default class CircularLamp extends Group {
|
||||
this.event = device.event;
|
||||
this.zlevel = device.model.zlevel;
|
||||
this.z = device.model.z;
|
||||
this.offsetX = 0;
|
||||
this.offsetY = 0;
|
||||
this.offsetX = 0;
|
||||
this.offsetY = 0;
|
||||
this.dragging = false;
|
||||
this.create();
|
||||
}
|
||||
|
||||
@ -18,7 +19,7 @@ export default class CircularLamp extends Group {
|
||||
this.lamp = new Circle({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
draggable: this.model.draggable||false,
|
||||
draggable: false,
|
||||
shape: {
|
||||
cx: this.model.point.x,
|
||||
cy: this.model.point.y,
|
||||
@ -50,12 +51,15 @@ export default class CircularLamp extends Group {
|
||||
}
|
||||
this.offsetX = e.offsetX;
|
||||
this.offsetY = e.offsetY;
|
||||
this.dragging = true;
|
||||
}
|
||||
mousemove() {
|
||||
}
|
||||
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);
|
||||
if (this.dragging) {
|
||||
this.model.point.x = this.model.point.x + (e.offsetX - this.offsetX);
|
||||
this.model.point.y = this.model.point.y + (e.offsetY - this.offsetY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import ElevatorBack from './elevatorBack';
|
||||
import ElevatorArrow from './elevatorArrow';
|
||||
import store from '@/store';
|
||||
|
||||
export default class elevator extends Group {
|
||||
|
||||
@ -33,8 +34,8 @@ export default class elevator extends Group {
|
||||
},
|
||||
width: model.width,
|
||||
height: model.height,
|
||||
fillColor: model.fillColor ||'#adadad',
|
||||
stroke: model.fillColor ||'#adadad',
|
||||
fillColor: model.fillColor ||'#313131',
|
||||
stroke: model.fillColor ||'#313131',
|
||||
lineWidth: 0
|
||||
}
|
||||
});
|
||||
@ -105,6 +106,9 @@ export default class elevator extends Group {
|
||||
|
||||
mousedown(e) {
|
||||
this.event.disable();
|
||||
if (e.which == 3) {
|
||||
store.dispatch('ibp/setUpdateDeviceData', this.model);
|
||||
}
|
||||
this.draggroup =this.grouper;
|
||||
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;
|
||||
this.imageBg = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: 3,
|
||||
z: model.z,
|
||||
draggable: false,
|
||||
style: {
|
||||
image: this.getStatus(),
|
||||
|
@ -21,12 +21,14 @@ export default class elevatorBack extends Group {
|
||||
draggable: false,
|
||||
// model.draggable ||
|
||||
shape: {
|
||||
cx: model.point.x + model.width/6*5,
|
||||
cy: model.point.y + model.height/8,
|
||||
r: model.width/6
|
||||
cx: (model.point.x + model.width/6*5).toFixed(2),
|
||||
cy: (model.point.y + model.height/8).toFixed(2),
|
||||
r: (model.width/6).toFixed(2)
|
||||
},
|
||||
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,
|
||||
draggable: false,
|
||||
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],
|
||||
[model.point.x+model.width/6*5, model.point.y + model.height/8*2],
|
||||
[model.point.x+model.width/6*5, model.point.y],
|
||||
[model.point.x+model.width/6*4, model.point.y],
|
||||
[model.point.x+model.width/6, model.point.y + model.height/8*6]
|
||||
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).toFixed(2), (model.point.y + model.height/8*2).toFixed(2)],
|
||||
[(model.point.x+model.width/6*5).toFixed(2), model.point.y],
|
||||
[(model.point.x+model.width/6*4).toFixed(2), model.point.y],
|
||||
[(model.point.x+model.width/6).toFixed(2), (model.point.y + model.height/8*6).toFixed(2)]
|
||||
]
|
||||
},
|
||||
style: {
|
||||
stroke: model.stroke || '#adadad',
|
||||
lineWidth: model.lineWidth,
|
||||
fill: model.fillColor || '#adadad'
|
||||
brushType: 'fill',
|
||||
stroke: model.stroke || '#313131',
|
||||
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',
|
||||
draggable: false,
|
||||
shape: {
|
||||
cx: model.point.x + model.width/6,
|
||||
cy: model.point.y + model.height/8*7,
|
||||
r: model.width/6
|
||||
cx: (model.point.x + model.width/6).toFixed(2),
|
||||
cy: (model.point.y + model.height/8*7).toFixed(2),
|
||||
r: (model.width/6).toFixed(2)
|
||||
},
|
||||
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 RotatingButton from './rotatingButton';
|
||||
import Elevator from './elevator';
|
||||
import Key from './key';
|
||||
import TeleTerminal from './teleTerminal';
|
||||
|
||||
const ibpShape = {};
|
||||
ibpShape[deviceType.Arrow] = Arrow;
|
||||
@ -23,6 +25,8 @@ ibpShape[deviceType.TipBox] = TipBox;
|
||||
ibpShape[deviceType.AppendageBox] = AppendageBox;
|
||||
ibpShape[deviceType.RotatingButton] = RotatingButton;
|
||||
ibpShape[deviceType.Elevator] = Elevator;
|
||||
ibpShape[deviceType.Key] = Key;
|
||||
ibpShape[deviceType.TeleTerminal] = TeleTerminal;
|
||||
|
||||
function shapefactory(device, ibp) {
|
||||
const type = device.model._type;
|
||||
|
@ -9,8 +9,9 @@ export default class ibpLine extends Group {
|
||||
this.event = device.event;
|
||||
this.zlevel = device.model.zlevel;
|
||||
this.z = device.model.z;
|
||||
this.offsetX = 0;
|
||||
this.offsetY = 0;
|
||||
this.offsetX = 0;
|
||||
this.offsetY = 0;
|
||||
this.dragging = false;
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
@ -48,14 +49,17 @@ export default class ibpLine extends Group {
|
||||
}
|
||||
this.offsetX = e.offsetX;
|
||||
this.offsetY = e.offsetY;
|
||||
this.dragging = true;
|
||||
}
|
||||
mousemove() {
|
||||
}
|
||||
mouseup(e) {
|
||||
this.event.enable();
|
||||
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.point2.x = this.model.point2.x - this.offsetX + e.offsetX;
|
||||
this.model.point2.y = this.model.point2.y - this.offsetY + e.offsetY;
|
||||
if (this.dragging) {
|
||||
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.point2.x = this.model.point2.x - this.offsetX + e.offsetX;
|
||||
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.offsetX = 0;
|
||||
this.offsetY = 0;
|
||||
this.dragging = false;
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
@ -31,7 +32,8 @@ export default class ibpText extends Group {
|
||||
textFill: model.textFill,
|
||||
textAlign: model.textAlign,
|
||||
textPosition: model.textPosition || 'inside',
|
||||
textVerticalAlign: model.textVerticalAlign || null
|
||||
textVerticalAlign: model.textVerticalAlign || null,
|
||||
textLineHeight: model.fontSize
|
||||
}
|
||||
});
|
||||
this.add(this.textName);
|
||||
@ -52,13 +54,15 @@ export default class ibpText extends Group {
|
||||
}
|
||||
this.offsetX = e.offsetX;
|
||||
this.offsetY = e.offsetY;
|
||||
this.dragging = true;
|
||||
}
|
||||
mousemove() {
|
||||
}
|
||||
mouseup(e) {
|
||||
this.event.enable();
|
||||
console.log('test', e);
|
||||
this.model.point.x = this.model.point.x + (e.offsetX - this.offsetX);
|
||||
this.model.point.y = this.model.point.y + (e.offsetY - this.offsetY);
|
||||
if (this.dragging) {
|
||||
this.model.point.x = this.model.point.x + (e.offsetX - this.offsetX);
|
||||
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.offsetX = 0;
|
||||
this.offsetY = 0;
|
||||
this.dragging = false;
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
@ -47,12 +48,15 @@ export default class ibpTipBox extends Group {
|
||||
}
|
||||
this.offsetX = e.offsetX;
|
||||
this.offsetY = e.offsetY;
|
||||
this.dragging = true;
|
||||
}
|
||||
mousemove() {
|
||||
}
|
||||
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);
|
||||
if (this.dragging) {
|
||||
this.model.point.x = this.model.point.x + (e.offsetX - this.offsetX);
|
||||
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.offsetX = 0;
|
||||
this.offsetY = 0;
|
||||
this.dragging = false;
|
||||
this.create();
|
||||
}
|
||||
|
||||
@ -72,6 +73,7 @@ export default class rotateTip extends Group {
|
||||
}
|
||||
this.offsetX = e.offsetX;
|
||||
this.offsetY = e.offsetY;
|
||||
this.dragging = true;
|
||||
}
|
||||
|
||||
mousemove(e) {
|
||||
@ -79,7 +81,9 @@ export default class rotateTip extends Group {
|
||||
|
||||
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);
|
||||
if (this.dragging) {
|
||||
this.model.point.x = this.model.point.x + (e.offsetX - this.offsetX);
|
||||
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.offsetX = 0;
|
||||
this.offsetY = 0;
|
||||
this.dragging = false;
|
||||
this.create();
|
||||
}
|
||||
|
||||
@ -25,7 +26,7 @@ export default class RotatingButton extends Group {
|
||||
x: this.model.point.x,
|
||||
y: this.model.point.y,
|
||||
width: this.model.width,
|
||||
height: this.model.height
|
||||
height: this.model.width/434*381
|
||||
}
|
||||
});
|
||||
this.add(this.rotatingButton);
|
||||
@ -47,12 +48,15 @@ export default class RotatingButton extends Group {
|
||||
}
|
||||
this.offsetX = e.offsetX;
|
||||
this.offsetY = e.offsetY;
|
||||
this.dragging = true;
|
||||
}
|
||||
mousemove() {
|
||||
}
|
||||
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);
|
||||
if (this.dragging) {
|
||||
this.model.point.x = this.model.point.x + (e.offsetX - this.offsetX);
|
||||
this.model.point.y = this.model.point.y + (e.offsetY - this.offsetY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,18 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Image from 'zrender/src/graphic/Image';
|
||||
import teleTerminalPic from '@/assets/ibp_images/telephone_terminal.png';
|
||||
import store from '@/store';
|
||||
|
||||
export default class alarm extends Group {
|
||||
|
||||
constructor(device) {
|
||||
super();
|
||||
this.event = device.event;
|
||||
this.model = device.model;
|
||||
this.zlevel = device.model.zlevel;
|
||||
this.offsetX = 0;
|
||||
this.offsetY = 0;
|
||||
this.dragging = false;
|
||||
this.create();
|
||||
}
|
||||
|
||||
@ -20,8 +25,8 @@ export default class alarm extends Group {
|
||||
image: teleTerminalPic,
|
||||
x: model.point.x,
|
||||
y: model.point.y,
|
||||
width: 64,
|
||||
height: 56
|
||||
width: 150,
|
||||
height: 150
|
||||
}
|
||||
});
|
||||
this.add(this.imageBg);
|
||||
@ -31,12 +36,12 @@ export default class alarm extends Group {
|
||||
/** 缩放按钮 */
|
||||
transformScale() {
|
||||
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();
|
||||
}
|
||||
|
||||
setDraggable() {
|
||||
this.arrow.attr('draggable', true);
|
||||
this.imageBg.attr('draggable', true);
|
||||
this.createMouseEvent();
|
||||
}
|
||||
createMouseEvent() {
|
||||
@ -47,6 +52,12 @@ export default class alarm extends Group {
|
||||
|
||||
mousedown(e) {
|
||||
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) {
|
||||
@ -54,7 +65,9 @@ export default class alarm extends Group {
|
||||
|
||||
mouseup(e) {
|
||||
this.event.enable();
|
||||
this.model.point.x = this.model.point.x + e.offsetX;
|
||||
this.model.point.y = this.model.point.y + e.offsetY;
|
||||
if (this.dragging) {
|
||||
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);
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.warnButtonList || [], elem => {
|
||||
ibpDevice[elem.code] = createModel(deviceType.WarnButton, elem, propConvert);
|
||||
zrUtil.each(data.alarmList || [], elem => {
|
||||
ibpDevice[elem.code] = createModel(deviceType.Alarm, elem, propConvert);
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.arrowList || [], elem => {
|
||||
@ -70,14 +70,30 @@ export function parser(data, config) {
|
||||
ibpDevice[elem.code] = createModel(deviceType.RotatingButton, elem, propConvert);
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.tipList || [], elem => {
|
||||
ibpDevice[elem.code] = createModel(deviceType.Tip, elem, propConvert);
|
||||
zrUtil.each(data.tipBoxList || [], elem => {
|
||||
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);
|
||||
|
||||
zrUtil.each(data.elevatorList || [], elem => {
|
||||
ibpDevice[elem.code] = createModel(deviceType.Elevator, elem, propConvert);
|
||||
}, 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;
|
||||
@ -259,6 +275,40 @@ export function updateIbpData(device) {
|
||||
}
|
||||
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);
|
||||
|
@ -304,9 +304,9 @@ class SkinCode extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.Station] = {
|
||||
text: {
|
||||
show: true // 公里标名称显示
|
||||
},
|
||||
// text: {
|
||||
// show: true // 公里标名称显示
|
||||
// },
|
||||
kmPostShow: true, // 公里标显示
|
||||
kilometerPosition: 'down', // 公里标位置
|
||||
fontWeight: 'bold' // 文字错细
|
||||
|
@ -300,9 +300,9 @@ class SkinCode extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.Station] = {
|
||||
text: {
|
||||
show: true // 公里标名称显示
|
||||
},
|
||||
// text: {
|
||||
// show: true // 公里标名称显示
|
||||
// },
|
||||
kmPostShow: false, // 公里标显示
|
||||
kilometerPosition: 'up' // 公里标朝向
|
||||
};
|
||||
|
@ -297,9 +297,9 @@ class SkinCode extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.Station] = {
|
||||
text: {
|
||||
show: true // 公里标名称显示
|
||||
},
|
||||
// text: {
|
||||
// show: true // 公里标名称显示
|
||||
// },
|
||||
kmPostShow: false, // 公里标显示
|
||||
kilometerPosition: 'up' // 公里标朝向
|
||||
};
|
||||
|
@ -279,9 +279,9 @@ class SkinCode extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.Station] = {
|
||||
text: {
|
||||
show: true // 公里标名称显示
|
||||
},
|
||||
// text: {
|
||||
// show: true // 公里标名称显示
|
||||
// },
|
||||
kmPostShow: true, // 公里标显示
|
||||
kilometerPosition: 'up' // 公里标朝向
|
||||
};
|
||||
|
@ -21,7 +21,7 @@ export default class Station extends Group {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
|
||||
if (style.Station.text.show) {
|
||||
if (model.visible) {
|
||||
// 公里标名称是否显示
|
||||
this.stationText = new ETextName({
|
||||
zlevel: this.zlevel,
|
||||
|
@ -1,150 +1,162 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__schedule add-task" :title="title" :visible.sync="dialogShow" width="800px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="margin: 10px">
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-radio v-model="model.type" label="1">加在最前</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.startTime" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-radio v-model="model.type" label="2">加在最后</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.startTime" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-dialog
|
||||
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">
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-radio v-model="model.type" label="1">加在最前</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.startTime" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-radio v-model="model.type" label="2">加在最后</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.startTime" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 5px;">
|
||||
交路:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.route" border :height="180">
|
||||
<el-table-column prop="date" label="日期" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" label="地址">
|
||||
</el-table-column>
|
||||
<el-table-column width="20">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||
详情:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.detail" border :height="180">
|
||||
<el-table-column prop="date" label="日期" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" label="地址">
|
||||
</el-table-column>
|
||||
<el-table-column width="20">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="16">
|
||||
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 5px;">
|
||||
交路:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.route" border :height="180">
|
||||
<el-table-column prop="date" label="日期" width="180" />
|
||||
<el-table-column prop="name" label="姓名" width="180" />
|
||||
<el-table-column prop="address" label="地址" />
|
||||
<el-table-column width="20" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||
详情:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.detail" border :height="180">
|
||||
<el-table-column prop="date" label="日期" width="180" />
|
||||
<el-table-column prop="name" label="姓名" width="180" />
|
||||
<el-table-column prop="address" label="地址" />
|
||||
<el-table-column width="20" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="16">
|
||||
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'AddTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
type: '1',
|
||||
serviceNumber: '',
|
||||
tripNumber: '',
|
||||
startTime: '',
|
||||
default: false,
|
||||
route: [],
|
||||
detail: []
|
||||
},
|
||||
tripNumberList: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '添加任务'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.model.serviceNumber = params.serviceNumber;
|
||||
this.model.tripNumber = params.tripNumber;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'AddTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
type: '1',
|
||||
serviceNumber: '',
|
||||
tripNumber: '',
|
||||
startTime: '',
|
||||
default: false,
|
||||
route: [],
|
||||
detail: []
|
||||
},
|
||||
tripNumberList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '添加任务';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.model.serviceNumber = params.serviceNumber;
|
||||
this.model.tripNumber = params.tripNumber;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
|
||||
/deep/ {
|
||||
.el-button {
|
||||
margin-left: 40px !important;
|
||||
|
@ -111,7 +111,6 @@ export default {
|
||||
if (valid) {
|
||||
createRunPlanLoad(this.buildModel()).then(response => {
|
||||
this.$message.success('创建运行图计划成功');
|
||||
this.$emit('reloadTable', { name: 'managePlanList' });
|
||||
this.doClose();
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
|
@ -1,57 +1,66 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__schedule delete-task" :title="title" :visible.sync="dialogShow" width="400px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-radio v-model="type" :label="1">删除以前所有任务(包含本任务)</el-radio>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-radio v-model="type" :label="2">删除以后所有任务(包含本任务)</el-radio>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
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-radio v-model="type" :label="1">删除以前所有任务(包含本任务)</el-radio>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-radio v-model="type" :label="2">删除以后所有任务(包含本任务)</el-radio>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'DeleteTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tripNumber: '',
|
||||
serviceNumber: '',
|
||||
type: '1',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '删除任务'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.tripNumber = params.tripNumber;
|
||||
this.serviceNumber = params.serviceNumber;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
// this.tripNumber
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'DeleteTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tripNumber: '',
|
||||
serviceNumber: '',
|
||||
type: '1'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '删除任务';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.tripNumber = params.tripNumber;
|
||||
this.serviceNumber = params.serviceNumber;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
// this.tripNumber
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -1,46 +1,55 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__schedule create-week-plan" :title="title" :visible.sync="dialogShow" width="400px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
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-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'DeleteTodayPlan',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '删除当天计划'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
// this.tripNumber
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'DeleteTodayPlan',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '删除当天计划';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
// this.tripNumber
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -15,7 +15,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRunPlanLoadList, deleteRunPlanLoad } from '@/api/runplan';
|
||||
import { getRunPlanLoadList, deleteRunPlanLoad, listAllTempLateRunPlan } from '@/api/runplan';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
|
||||
export default {
|
||||
name: 'ManagePlanList',
|
||||
@ -29,13 +30,7 @@ export default {
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '140px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
runPlanName: {
|
||||
type: 'text',
|
||||
label: '运行图名称'
|
||||
}
|
||||
}
|
||||
reset: true
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
@ -43,12 +38,18 @@ export default {
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '地图名称',
|
||||
prop: 'mapName'
|
||||
title: this.$t('publish.mapName'),
|
||||
prop: 'mapId',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['id', 'name']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '运行图名称',
|
||||
prop: 'runPlanName'
|
||||
title: this.$t('publish.runPlanName'),
|
||||
prop: 'templatePlanId',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.templatePlanId, this.templatePlanList, ['id', 'name']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '加载日期',
|
||||
@ -80,9 +81,20 @@ export default {
|
||||
return '运行图计划表';
|
||||
}
|
||||
},
|
||||
created() {
|
||||
mounted() {
|
||||
this.loadPageData();
|
||||
},
|
||||
methods: {
|
||||
loadPageData() {
|
||||
this.mapList = [];
|
||||
listPublishMap().then(resp => {
|
||||
this.mapList = resp.data;
|
||||
});
|
||||
this.templatePlanList = [];
|
||||
listAllTempLateRunPlan().then(resp => {
|
||||
this.templatePlanList = resp.data;
|
||||
});
|
||||
},
|
||||
queryFunction(params) {
|
||||
if (this.$route.query.mapId) {
|
||||
params['mapId'] = this.$route.query.mapId;
|
||||
@ -114,6 +126,7 @@ export default {
|
||||
},
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(()=> { this.reloadTable(); });
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
|
@ -1,150 +1,162 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__schedule add-task" :title="title" :visible.sync="dialogShow" width="800px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="margin: 10px">
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-radio v-model="model.type" label="1">加在最前</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.startTime" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-radio v-model="model.type" label="2">加在最后</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.startTime" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-dialog
|
||||
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">
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-radio v-model="model.type" label="1">加在最前</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.startTime" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-radio v-model="model.type" label="2">加在最后</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.startTime" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 5px;">
|
||||
交路:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.route" border :height="180">
|
||||
<el-table-column prop="date" label="日期" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" label="地址">
|
||||
</el-table-column>
|
||||
<el-table-column width="20">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||
详情:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.detail" border :height="180">
|
||||
<el-table-column prop="date" label="日期" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" label="地址">
|
||||
</el-table-column>
|
||||
<el-table-column width="20">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="16">
|
||||
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 5px;">
|
||||
交路:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.route" border :height="180">
|
||||
<el-table-column prop="date" label="日期" width="180" />
|
||||
<el-table-column prop="name" label="姓名" width="180" />
|
||||
<el-table-column prop="address" label="地址" />
|
||||
<el-table-column width="20" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||
详情:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.detail" border :height="180">
|
||||
<el-table-column prop="date" label="日期" width="180" />
|
||||
<el-table-column prop="name" label="姓名" width="180" />
|
||||
<el-table-column prop="address" label="地址" />
|
||||
<el-table-column width="20" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="16">
|
||||
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'AddTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
type: '1',
|
||||
serviceNumber: '',
|
||||
tripNumber: '',
|
||||
startTime: '',
|
||||
default: false,
|
||||
route: [],
|
||||
detail: []
|
||||
},
|
||||
tripNumberList: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '添加任务'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.model.serviceNumber = params.serviceNumber;
|
||||
this.model.tripNumber = params.tripNumber;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'AddTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
type: '1',
|
||||
serviceNumber: '',
|
||||
tripNumber: '',
|
||||
startTime: '',
|
||||
default: false,
|
||||
route: [],
|
||||
detail: []
|
||||
},
|
||||
tripNumberList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '添加任务';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.model.serviceNumber = params.serviceNumber;
|
||||
this.model.tripNumber = params.tripNumber;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
|
||||
/deep/ {
|
||||
.el-button {
|
||||
margin-left: 40px !important;
|
||||
|
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
v-dialogDrag
|
||||
:title="title"
|
||||
class="beijing-01__schedule choose-plan-template"
|
||||
:visible.sync="dialogShow"
|
||||
width="80%"
|
||||
width="70%"
|
||||
:before-close="doClose"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
|
@ -111,7 +111,6 @@ export default {
|
||||
if (valid) {
|
||||
createRunPlanLoad(this.buildModel()).then(response => {
|
||||
this.$message.success('创建运行图计划成功');
|
||||
this.$emit('reloadTable', { name: 'managePlanList' });
|
||||
this.doClose();
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
|
@ -1,57 +1,66 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__schedule delete-task" :title="title" :visible.sync="dialogShow" width="400px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-radio v-model="type" :label="1">删除以前所有任务(包含本任务)</el-radio>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-radio v-model="type" :label="2">删除以后所有任务(包含本任务)</el-radio>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
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-radio v-model="type" :label="1">删除以前所有任务(包含本任务)</el-radio>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-radio v-model="type" :label="2">删除以后所有任务(包含本任务)</el-radio>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'DeleteTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tripNumber: '',
|
||||
serviceNumber: '',
|
||||
type: '1',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '删除任务'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.tripNumber = params.tripNumber;
|
||||
this.serviceNumber = params.serviceNumber;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
// this.tripNumber
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'DeleteTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tripNumber: '',
|
||||
serviceNumber: '',
|
||||
type: '1'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '删除任务';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.tripNumber = params.tripNumber;
|
||||
this.serviceNumber = params.serviceNumber;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
// this.tripNumber
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -1,46 +1,55 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__schedule create-week-plan" :title="title" :visible.sync="dialogShow" width="400px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
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-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'DeleteTodayPlan',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '删除当天计划'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
// this.tripNumber
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'DeleteTodayPlan',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '删除当天计划';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
// this.tripNumber
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -15,7 +15,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRunPlanLoadList, deleteRunPlanLoad } from '@/api/runplan';
|
||||
import { getRunPlanLoadList, deleteRunPlanLoad, listAllTempLateRunPlan } from '@/api/runplan';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
|
||||
export default {
|
||||
name: 'ManagePlanList',
|
||||
@ -29,13 +30,7 @@ export default {
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '140px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
runPlanName: {
|
||||
type: 'text',
|
||||
label: '运行图名称'
|
||||
}
|
||||
}
|
||||
reset: true
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
@ -43,12 +38,18 @@ export default {
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '地图名称',
|
||||
prop: 'mapName'
|
||||
title: this.$t('publish.mapName'),
|
||||
prop: 'mapId',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['id', 'name']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '运行图名称',
|
||||
prop: 'runPlanName'
|
||||
title: this.$t('publish.runPlanName'),
|
||||
prop: 'templatePlanId',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.templatePlanId, this.templatePlanList, ['id', 'name']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '加载日期',
|
||||
@ -80,9 +81,20 @@ export default {
|
||||
return '运行图计划表';
|
||||
}
|
||||
},
|
||||
created() {
|
||||
mounted() {
|
||||
this.loadPageData();
|
||||
},
|
||||
methods: {
|
||||
loadPageData() {
|
||||
this.mapList = [];
|
||||
listPublishMap().then(resp => {
|
||||
this.mapList = resp.data;
|
||||
});
|
||||
this.templatePlanList = [];
|
||||
listAllTempLateRunPlan().then(resp => {
|
||||
this.templatePlanList = resp.data;
|
||||
});
|
||||
},
|
||||
queryFunction(params) {
|
||||
if (this.$route.query.mapId) {
|
||||
params['mapId'] = this.$route.query.mapId;
|
||||
@ -114,6 +126,7 @@ export default {
|
||||
},
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(()=> { this.reloadTable(); });
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
|
@ -1,152 +1,152 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__schedule edit-planning-train" :title="title" :visible.sync="dialogShow" width="800px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-col :offset="10">列车线路</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="17">
|
||||
<el-table :data="serviceData" border style="width: 100%" height="160">
|
||||
<el-table-column prop="startStationCode" label="起点站">
|
||||
</el-table-column>
|
||||
<el-table-column prop="startStationStandCode" label="起点站台">
|
||||
</el-table-column>
|
||||
<el-table-column prop="endStationCode" label="终点站">
|
||||
</el-table-column>
|
||||
<el-table-column prop="endStationStandCode" label="终点站台">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="1">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button class="view-button" @click="handleAddTask">加任务</el-button>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button class="view-button" @click="handleReplace">替  换</el-button>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button class="view-button" @click="handleDeleteTask">删任务</el-button>
|
||||
</el-row>
|
||||
<div class="view-box">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-radio-group v-model="storeInOut">
|
||||
<el-radio :label="1">进库</el-radio>
|
||||
<el-radio :label="2">出库</el-radio>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="view-box">
|
||||
<el-col :span="9" style="padding-left: 10px">
|
||||
<el-input v-model="oldServiceNumber" size="small" :disabled="true"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="9" style="padding-left: 20px">
|
||||
<el-input v-model="newServiceNumber" size="small"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="5" style="padding-left: 20px">
|
||||
<el-button @click="handleModifyingTripNumber" style="width: 150px;">改车次号</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<el-col :span="4"><span class="view-label">线路开始时间</span></el-col>
|
||||
<el-col :span="8">
|
||||
<el-time-select v-model="serviceStartTime" size="small"></el-time-select>
|
||||
</el-col>
|
||||
<el-col :span="4"><span class="view-label">线路结束时间</span></el-col>
|
||||
<el-col :span="8">
|
||||
<el-time-select v-model="serviceEndTime" size="small"></el-time-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-col :offset="10">线路详细信息</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="tripData" border style="width: 100%" height="200">
|
||||
<el-table-column prop="arriveTime" label="到站时间">
|
||||
</el-table-column>
|
||||
<el-table-column prop="stationCode" label="车站">
|
||||
</el-table-column>
|
||||
<el-table-column prop="stationStandCode" 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-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-checkbox v-model="effect">影响后续任务</el-checkbox>
|
||||
<el-dialog
|
||||
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-col :offset="10">列车线路</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="17">
|
||||
<el-table :data="serviceData" border style="width: 100%" height="160">
|
||||
<el-table-column prop="startStationCode" label="起点站" />
|
||||
<el-table-column prop="startStationStandCode" label="起点站台" />
|
||||
<el-table-column prop="endStationCode" label="终点站" />
|
||||
<el-table-column prop="endStationStandCode" label="终点站台" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="1">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button class="view-button" @click="handleAddTask">加任务</el-button>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
<el-button class="view-button" @click="handleReplace">替  换</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button class="view-button" @click="handleDeleteTask">删任务</el-button>
|
||||
</el-row>
|
||||
<div class="view-box">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-radio-group v-model="storeInOut">
|
||||
<el-radio :label="1">进库</el-radio>
|
||||
<el-radio :label="2">出库</el-radio>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="view-box">
|
||||
<el-col :span="9" style="padding-left: 10px">
|
||||
<el-input v-model="oldServiceNumber" size="small" :disabled="true" />
|
||||
</el-col>
|
||||
<el-col :span="9" style="padding-left: 20px">
|
||||
<el-input v-model="newServiceNumber" size="small" />
|
||||
</el-col>
|
||||
<el-col :span="5" style="padding-left: 20px">
|
||||
<el-button style="width: 150px;" @click="handleModifyingTripNumber">改车次号</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<el-col :span="4"><span class="view-label">线路开始时间</span></el-col>
|
||||
<el-col :span="8">
|
||||
<el-time-select v-model="serviceStartTime" size="small" />
|
||||
</el-col>
|
||||
<el-col :span="4"><span class="view-label">线路结束时间</span></el-col>
|
||||
<el-col :span="8">
|
||||
<el-time-select v-model="serviceEndTime" size="small" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-col :offset="10">线路详细信息</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="tripData" border style="width: 100%" height="200">
|
||||
<el-table-column prop="arriveTime" label="到站时间" />
|
||||
<el-table-column prop="stationCode" label="车站" />
|
||||
<el-table-column prop="stationStandCode" label="站台" />
|
||||
<el-table-column prop="stopTime" label="停站时间" />
|
||||
<el-table-column prop="level" label="运行等级" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-checkbox v-model="effect">影响后续任务</el-checkbox>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { formatTime, formatName } from '@/utils/runPlan';
|
||||
import { formatTime, formatName } from '@/utils/runPlan';
|
||||
|
||||
export default {
|
||||
name: 'modifyingPlan',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
effect: false,
|
||||
storeInOut: '1',
|
||||
oldServiceNumber: '',
|
||||
newServiceNumber: '',
|
||||
serviceStartTime: '',
|
||||
serviceEndTime: '',
|
||||
serviceData: [],
|
||||
tripData: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '修改'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
formatTime(time) {
|
||||
return formatTime(time);
|
||||
},
|
||||
formatName(code) {
|
||||
return formatName(code);
|
||||
},
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
// 加任务
|
||||
handleAddTask() {
|
||||
this.$emit('dispatchDialog', { name: 'addTask', params: {} })
|
||||
},
|
||||
// 替换
|
||||
handleReplace() {
|
||||
this.$emit('dispatchDialog', { name: 'modifyingTask', params: {} })
|
||||
},
|
||||
// 删任务
|
||||
handleDeleteTask() {
|
||||
this.$emit('dispatchDialog', { name: 'deleteTask', params: {} })
|
||||
},
|
||||
// 改车次号
|
||||
handleModifyingTripNumber() {
|
||||
this.$emit('dispatchDialog', { name: 'modifyingTripNumber', params: {} })
|
||||
},
|
||||
// 确定修改
|
||||
handleCommit() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'ModifyingPlan',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
effect: false,
|
||||
storeInOut: '1',
|
||||
oldServiceNumber: '',
|
||||
newServiceNumber: '',
|
||||
serviceStartTime: '',
|
||||
serviceEndTime: '',
|
||||
serviceData: [],
|
||||
tripData: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '修改';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
formatTime(time) {
|
||||
return formatTime(time);
|
||||
},
|
||||
formatName(code) {
|
||||
return formatName(code);
|
||||
},
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
// 加任务
|
||||
handleAddTask() {
|
||||
this.$emit('dispatchDialog', { name: 'addTask', params: {} });
|
||||
},
|
||||
// 替换
|
||||
handleReplace() {
|
||||
this.$emit('dispatchDialog', { name: 'modifyingTask', params: {} });
|
||||
},
|
||||
// 删任务
|
||||
handleDeleteTask() {
|
||||
this.$emit('dispatchDialog', { name: 'deleteTask', params: {} });
|
||||
},
|
||||
// 改车次号
|
||||
handleModifyingTripNumber() {
|
||||
this.$emit('dispatchDialog', { name: 'modifyingTripNumber', params: {} });
|
||||
},
|
||||
// 确定修改
|
||||
handleCommit() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
@ -157,13 +157,11 @@
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
|
||||
.view-label {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
|
||||
.view-box {
|
||||
padding: 10px 0px;
|
||||
border: 1px inset gray;
|
||||
|
@ -1,298 +1,309 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__schedule add-task" :title="title" :visible.sync="dialogShow" width="1000px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="margin: 10px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-select style="display: inline-black" v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-row>
|
||||
<el-col :offset="4">
|
||||
<el-checkbox v-model="model.trainManual">手工</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>缺省停站时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select style="display: inline-black" v-model="model.time" placeholder="请选择">
|
||||
<el-option v-for="item in timeList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="9" :offset="2">
|
||||
<span>表号:</span>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-input v-model="model.serviceNumber"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-dialog
|
||||
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">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-select v-model="model.tripNumber" style="display: inline-black" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-row>
|
||||
<el-col :offset="4">
|
||||
<el-checkbox v-model="model.trainManual">手工</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>缺省停站时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select v-model="model.time" style="display: inline-black" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in timeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="9" :offset="2">
|
||||
<span>表号:</span>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-input v-model="model.serviceNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="2">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.clearGuest">清客</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="2">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.clearGuest">清客</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-checkbox v-model="model.continuationPlan">延续计划</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.firstTrain">首班车</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-checkbox v-model="model.continuationPlan">延续计划</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<span>序列号:</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-select style="display: inline-black" v-model="model.serialNumber" placeholder="请选择">
|
||||
<el-option v-for="item in serialNumberList" :key="item.value" :label="item.label"
|
||||
:value="model.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.firstTrain">首班车</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-row>
|
||||
<el-col :offset="4">
|
||||
<el-checkbox v-model="model.serialManual">手工</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>缺省运行等级:</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select style="display: inline-black" v-model="model.level" placeholder="请选择">
|
||||
<el-option v-for="item in levelList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="9" :offset="2">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-time-select v-model="model.startTime" placeholder="选择时间" :clearable="false">
|
||||
</el-time-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<span>序列号:</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-select v-model="model.serialNumber" style="display: inline-black" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in serialNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="model.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-row>
|
||||
<el-col :offset="4">
|
||||
<el-checkbox v-model="model.serialManual">手工</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>缺省运行等级:</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select v-model="model.level" style="display: inline-black" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in levelList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="9" :offset="2">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-time-select v-model="model.startTime" placeholder="选择时间" :clearable="false" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="2">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.inStock">入库</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="2">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.inStock">入库</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-checkbox v-model="model.outStock">出库</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.lastTrain">末班车</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-checkbox v-model="model.outStock">出库</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 5px;">
|
||||
交路:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.route" border :height="140">
|
||||
<el-table-column prop="beginStationCode" label="起始站">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.beginStationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="beginStationStandCode" label="起始站台">
|
||||
</el-table-column>
|
||||
<el-table-column prop="endStationCode" label="终到站">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.endStationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endStationStandCode" label="终到站台">
|
||||
</el-table-column>
|
||||
<el-table-column prop="describe" label="描述" :width="280">
|
||||
</el-table-column>
|
||||
<el-table-column :width="40">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||
详情:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.detail" border :height="140">
|
||||
<el-table-column prop="stationCode" label="站台" :width="160">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.stationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="startTime" label="到点">
|
||||
<template slot-scope="scope">
|
||||
{{ formatTime(scope.row.startTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="stopTime" label="停站时间">
|
||||
<template slot-scope="scope">
|
||||
{{ formatTime(scope.row.stopTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endTime" label="发点">
|
||||
<template slot-scope="scope">
|
||||
{{ formatTime(scope.row.endTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="level" label="运行等级">
|
||||
</el-table-column>
|
||||
<el-table-column width="280">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="16">
|
||||
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.lastTrain">末班车</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 5px;">
|
||||
交路:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.route" border :height="140">
|
||||
<el-table-column prop="beginStationCode" label="起始站">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.beginStationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="beginStationStandCode" label="起始站台" />
|
||||
<el-table-column prop="endStationCode" label="终到站">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.endStationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endStationStandCode" label="终到站台" />
|
||||
<el-table-column prop="describe" label="描述" :width="280" />
|
||||
<el-table-column :width="40" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||
详情:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.detail" border :height="140">
|
||||
<el-table-column prop="stationCode" label="站台" :width="160">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.stationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="startTime" label="到点">
|
||||
<template slot-scope="scope">
|
||||
{{ formatTime(scope.row.startTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="stopTime" label="停站时间">
|
||||
<template slot-scope="scope">
|
||||
{{ formatTime(scope.row.stopTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endTime" label="发点">
|
||||
<template slot-scope="scope">
|
||||
{{ formatTime(scope.row.endTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="level" label="运行等级" />
|
||||
<el-table-column width="280" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="16">
|
||||
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { formatTime, formatName } from '@/utils/runPlan';
|
||||
import { formatTime, formatName } from '@/utils/runPlan';
|
||||
|
||||
export default {
|
||||
name: 'ModifyingTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
tripNumber: '',
|
||||
serialNumber: '',
|
||||
trainManual: false,
|
||||
serialManual: false,
|
||||
clearGuest: false,
|
||||
continuationPlan: false,
|
||||
firstTrain: false,
|
||||
lastTrain: false,
|
||||
inStock: false,
|
||||
outStock: false,
|
||||
startTime: '',
|
||||
route: [],
|
||||
detail: []
|
||||
},
|
||||
timeList: [],
|
||||
levelList: [],
|
||||
tripNumberList: [],
|
||||
serialNumberList: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '修改任务'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
formatTime(time) {
|
||||
return formatTime(time);
|
||||
},
|
||||
formatName(code) {
|
||||
return formatName(code);
|
||||
},
|
||||
loadInitData(params) {
|
||||
this.model.tripNumber = params.tripNumber;
|
||||
this.model.serviceNumber = params.serviceNumber;
|
||||
let editData = this.$store.state.runPlan.editData[params.serviceNumber]
|
||||
if (editData) {
|
||||
let tripNumberList = Object.keys(editData.trainMap).sort((a, b) => { return editData.trainMap[a].oldIndex - editData.trainMap[b].oldIndex });
|
||||
let trainInfo = editData.trainMap[params.tripNumber];
|
||||
let lastIndex = trainInfo.stationTimeList.length - 1;
|
||||
let taskObj = {
|
||||
tripNumber: params.tripNumber,
|
||||
beginStationCode: trainInfo.stationTimeList[0].stationCode,
|
||||
beginStationStandCode: '',
|
||||
endStationCode: trainInfo.stationTimeList[lastIndex].stationCode,
|
||||
endStationStandCode: ''
|
||||
}
|
||||
this.model.route.push(taskObj);
|
||||
export default {
|
||||
name: 'ModifyingTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
tripNumber: '',
|
||||
serialNumber: '',
|
||||
trainManual: false,
|
||||
serialManual: false,
|
||||
clearGuest: false,
|
||||
continuationPlan: false,
|
||||
firstTrain: false,
|
||||
lastTrain: false,
|
||||
inStock: false,
|
||||
outStock: false,
|
||||
startTime: '',
|
||||
route: [],
|
||||
detail: []
|
||||
},
|
||||
timeList: [],
|
||||
levelList: [],
|
||||
tripNumberList: [],
|
||||
serialNumberList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '修改任务';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
formatTime(time) {
|
||||
return formatTime(time);
|
||||
},
|
||||
formatName(code) {
|
||||
return formatName(code);
|
||||
},
|
||||
loadInitData(params) {
|
||||
this.model.tripNumber = params.tripNumber;
|
||||
this.model.serviceNumber = params.serviceNumber;
|
||||
const editData = this.$store.state.runPlan.editData[params.serviceNumber];
|
||||
if (editData) {
|
||||
const trainInfo = editData.trainMap[params.tripNumber];
|
||||
const lastIndex = trainInfo.stationTimeList.length - 1;
|
||||
const taskObj = {
|
||||
tripNumber: params.tripNumber,
|
||||
beginStationCode: trainInfo.stationTimeList[0].stationCode,
|
||||
beginStationStandCode: '',
|
||||
endStationCode: trainInfo.stationTimeList[lastIndex].stationCode,
|
||||
endStationStandCode: ''
|
||||
};
|
||||
this.model.route.push(taskObj);
|
||||
|
||||
trainInfo.stationTimeList.forEach((elem, index) => {
|
||||
let stationObj = {
|
||||
stationCode: elem.stationCode,
|
||||
startTime: index == 0 ? null : trainInfo.stationTimeList[index - 1].secondTime,
|
||||
stopTime: index == 0 ? null : elem.secondTime - trainInfo.stationTimeList[index - 1].secondTime,
|
||||
endTime: elem.secondTime,
|
||||
level: '',
|
||||
}
|
||||
this.model.detail.push(stationObj);
|
||||
})
|
||||
}
|
||||
},
|
||||
doShow(params) {
|
||||
this.loadInitData(params);
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
}
|
||||
}
|
||||
}
|
||||
trainInfo.stationTimeList.forEach((elem, index) => {
|
||||
const stationObj = {
|
||||
stationCode: elem.stationCode,
|
||||
startTime: index == 0 ? null : trainInfo.stationTimeList[index - 1].secondTime,
|
||||
stopTime: index == 0 ? null : elem.secondTime - trainInfo.stationTimeList[index - 1].secondTime,
|
||||
endTime: elem.secondTime,
|
||||
level: ''
|
||||
};
|
||||
this.model.detail.push(stationObj);
|
||||
});
|
||||
}
|
||||
},
|
||||
doShow(params) {
|
||||
this.loadInitData(params);
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
|
||||
|
||||
/deep/ {
|
||||
.el-button {
|
||||
margin-left: 40px !important;
|
||||
|
@ -1,150 +1,162 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__schedule add-task" :title="title" :visible.sync="dialogShow" width="800px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="margin: 10px">
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-radio v-model="model.type" label="1">加在最前</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.startTime" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-radio v-model="model.type" label="2">加在最后</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.startTime" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-dialog
|
||||
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">
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-radio v-model="model.type" label="1">加在最前</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.startTime" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-radio v-model="model.type" label="2">加在最后</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.startTime" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 5px;">
|
||||
交路:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.route" border :height="180">
|
||||
<el-table-column prop="date" label="日期" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" label="地址">
|
||||
</el-table-column>
|
||||
<el-table-column width="20">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||
详情:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.detail" border :height="180">
|
||||
<el-table-column prop="date" label="日期" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" label="地址">
|
||||
</el-table-column>
|
||||
<el-table-column width="20">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="16">
|
||||
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 5px;">
|
||||
交路:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.route" border :height="180">
|
||||
<el-table-column prop="date" label="日期" width="180" />
|
||||
<el-table-column prop="name" label="姓名" width="180" />
|
||||
<el-table-column prop="address" label="地址" />
|
||||
<el-table-column width="20" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||
详情:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.detail" border :height="180">
|
||||
<el-table-column prop="date" label="日期" width="180" />
|
||||
<el-table-column prop="name" label="姓名" width="180" />
|
||||
<el-table-column prop="address" label="地址" />
|
||||
<el-table-column width="20" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="16">
|
||||
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'AddTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
type: '1',
|
||||
serviceNumber: '',
|
||||
tripNumber: '',
|
||||
startTime: '',
|
||||
default: false,
|
||||
route: [],
|
||||
detail: []
|
||||
},
|
||||
tripNumberList: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '添加任务'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.model.serviceNumber = params.serviceNumber;
|
||||
this.model.tripNumber = params.tripNumber;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'AddTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
type: '1',
|
||||
serviceNumber: '',
|
||||
tripNumber: '',
|
||||
startTime: '',
|
||||
default: false,
|
||||
route: [],
|
||||
detail: []
|
||||
},
|
||||
tripNumberList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '添加任务';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.model.serviceNumber = params.serviceNumber;
|
||||
this.model.tripNumber = params.tripNumber;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
|
||||
/deep/ {
|
||||
.el-button {
|
||||
margin-left: 40px !important;
|
||||
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
:title="title"
|
||||
class="beijing-01__schedule choose-plan-template"
|
||||
:visible.sync="dialogShow"
|
||||
v-dialogDrag
|
||||
width="80%"
|
||||
width="70%"
|
||||
:before-close="doClose"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
|
@ -111,7 +111,6 @@ export default {
|
||||
if (valid) {
|
||||
createRunPlanLoad(this.buildModel()).then(response => {
|
||||
this.$message.success('创建运行图计划成功');
|
||||
this.$emit('reloadTable', { name: 'managePlanList' });
|
||||
this.doClose();
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
|
@ -1,57 +1,66 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__schedule delete-task" :title="title" :visible.sync="dialogShow" width="400px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-radio v-model="type" :label="1">删除以前所有任务(包含本任务)</el-radio>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-radio v-model="type" :label="2">删除以后所有任务(包含本任务)</el-radio>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
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-radio v-model="type" :label="1">删除以前所有任务(包含本任务)</el-radio>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-radio v-model="type" :label="2">删除以后所有任务(包含本任务)</el-radio>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'DeleteTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tripNumber: '',
|
||||
serviceNumber: '',
|
||||
type: '1',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '删除任务'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.tripNumber = params.tripNumber;
|
||||
this.serviceNumber = params.serviceNumber;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
// this.tripNumber
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'DeleteTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tripNumber: '',
|
||||
serviceNumber: '',
|
||||
type: '1'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '删除任务';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.tripNumber = params.tripNumber;
|
||||
this.serviceNumber = params.serviceNumber;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
// this.tripNumber
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -1,46 +1,55 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__schedule create-week-plan" :title="title" :visible.sync="dialogShow" width="400px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
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-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'DeleteTodayPlan',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '删除当天计划'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
// this.tripNumber
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'DeleteTodayPlan',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '删除当天计划';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
// this.tripNumber
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -1,121 +1,142 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__schedule manage-plan-list" :title="title" :visible.sync="dialogShow" width="80%"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
||||
</QueryListPage>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__schedule manage-plan-list"
|
||||
: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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRunPlanLoadList, deleteRunPlanLoad } from '@/api/runplan';
|
||||
import { getRunPlanLoadList, deleteRunPlanLoad, listAllTempLateRunPlan } from '@/api/runplan';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
|
||||
export default {
|
||||
name: 'ManagePlanList',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '140px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
runPlanName: {
|
||||
type: 'text',
|
||||
label: '运行图名称'
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '地图名称',
|
||||
prop: 'mapName'
|
||||
},
|
||||
{
|
||||
title: '运行图名称',
|
||||
prop: 'runPlanName',
|
||||
},
|
||||
{
|
||||
title: '加载日期',
|
||||
prop: 'loadTime'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '操作',
|
||||
width: '100',
|
||||
buttons: [
|
||||
{
|
||||
name: '删除',
|
||||
handleClick: this.handleDelete,
|
||||
type: 'danger'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: '创建', btnCode: 'employee_insert', handler: this.handleCreateRunPlan },
|
||||
]
|
||||
},
|
||||
export default {
|
||||
name: 'ManagePlanList',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '140px',
|
||||
reset: true
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('publish.mapName'),
|
||||
prop: 'mapId',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['id', 'name']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('publish.runPlanName'),
|
||||
prop: 'templatePlanId',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.templatePlanId, this.templatePlanList, ['id', 'name']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '加载日期',
|
||||
prop: 'loadTime'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '操作',
|
||||
width: '100',
|
||||
buttons: [
|
||||
{
|
||||
name: '删除',
|
||||
handleClick: this.handleDelete,
|
||||
type: 'danger'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: '创建', btnCode: 'employee_insert', handler: this.handleCreateRunPlan }
|
||||
]
|
||||
},
|
||||
|
||||
currentModel: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '运行图计划表'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
queryFunction(params) {
|
||||
if (this.$route.query.mapId) {
|
||||
params['mapId'] = this.$route.query.mapId;
|
||||
}
|
||||
currentModel: {}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '运行图计划表';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadPageData();
|
||||
},
|
||||
methods: {
|
||||
loadPageData() {
|
||||
this.mapList = [];
|
||||
listPublishMap().then(resp => {
|
||||
this.mapList = resp.data;
|
||||
});
|
||||
this.templatePlanList = [];
|
||||
listAllTempLateRunPlan().then(resp => {
|
||||
this.templatePlanList = resp.data;
|
||||
});
|
||||
},
|
||||
queryFunction(params) {
|
||||
if (this.$route.query.mapId) {
|
||||
params['mapId'] = this.$route.query.mapId;
|
||||
}
|
||||
|
||||
if (this.$store.state.user.id) {
|
||||
params['userId'] = this.$store.state.user.id;
|
||||
}
|
||||
if (this.$store.state.user.id) {
|
||||
params['userId'] = this.$store.state.user.id;
|
||||
}
|
||||
|
||||
return getRunPlanLoadList(params);
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('此操作将删除次日加载的运行图, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteRunPlanLoad(row.id).then(response => {
|
||||
this.$message.success('删除成功')
|
||||
this.reloadTable()
|
||||
}).catch(error => {
|
||||
this.reloadTable()
|
||||
this.$messageBox('删除失败')
|
||||
})
|
||||
}).catch(() => { })
|
||||
},
|
||||
handleCreateRunPlan() {
|
||||
this.$emit('dispatchDialog', { name: 'createWeekPlan' });
|
||||
},
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
reloadTable() {
|
||||
this.queryList.reload()
|
||||
}
|
||||
}
|
||||
}
|
||||
return getRunPlanLoadList(params);
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('此操作将删除次日加载的运行图, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteRunPlanLoad(row.id).then(response => {
|
||||
this.$message.success('删除成功');
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.reloadTable();
|
||||
this.$messageBox('删除失败');
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
handleCreateRunPlan() {
|
||||
this.$emit('dispatchDialog', { name: 'createWeekPlan' });
|
||||
},
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(()=> { this.reloadTable(); });
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
reloadTable() {
|
||||
this.queryList.reload();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -1,152 +1,152 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__schedule edit-planning-train" :title="title" :visible.sync="dialogShow" width="800px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-col :offset="10">列车线路</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="17">
|
||||
<el-table :data="serviceData" border style="width: 100%" height="160">
|
||||
<el-table-column prop="startStationCode" label="起点站">
|
||||
</el-table-column>
|
||||
<el-table-column prop="startStationStandCode" label="起点站台">
|
||||
</el-table-column>
|
||||
<el-table-column prop="endStationCode" label="终点站">
|
||||
</el-table-column>
|
||||
<el-table-column prop="endStationStandCode" label="终点站台">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="1">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button class="view-button" @click="handleAddTask">加任务</el-button>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button class="view-button" @click="handleReplace">替  换</el-button>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button class="view-button" @click="handleDeleteTask">删任务</el-button>
|
||||
</el-row>
|
||||
<div class="view-box">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-radio-group v-model="storeInOut">
|
||||
<el-radio :label="1">进库</el-radio>
|
||||
<el-radio :label="2">出库</el-radio>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="view-box">
|
||||
<el-col :span="9" style="padding-left: 10px">
|
||||
<el-input v-model="oldServiceNumber" size="small" :disabled="true"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="9" style="padding-left: 20px">
|
||||
<el-input v-model="newServiceNumber" size="small"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="5" style="padding-left: 20px">
|
||||
<el-button @click="handleModifyingTripNumber" style="width: 150px;">改车次号</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<el-col :span="4"><span class="view-label">线路开始时间</span></el-col>
|
||||
<el-col :span="8">
|
||||
<el-time-select v-model="serviceStartTime" size="small"></el-time-select>
|
||||
</el-col>
|
||||
<el-col :span="4"><span class="view-label">线路结束时间</span></el-col>
|
||||
<el-col :span="8">
|
||||
<el-time-select v-model="serviceEndTime" size="small"></el-time-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-col :offset="10">线路详细信息</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="tripData" border style="width: 100%" height="200">
|
||||
<el-table-column prop="arriveTime" label="到站时间">
|
||||
</el-table-column>
|
||||
<el-table-column prop="stationCode" label="车站">
|
||||
</el-table-column>
|
||||
<el-table-column prop="stationStandCode" 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-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-checkbox v-model="effect">影响后续任务</el-checkbox>
|
||||
<el-dialog
|
||||
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-col :offset="10">列车线路</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="17">
|
||||
<el-table :data="serviceData" border style="width: 100%" height="160">
|
||||
<el-table-column prop="startStationCode" label="起点站" />
|
||||
<el-table-column prop="startStationStandCode" label="起点站台" />
|
||||
<el-table-column prop="endStationCode" label="终点站" />
|
||||
<el-table-column prop="endStationStandCode" label="终点站台" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="1">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button class="view-button" @click="handleAddTask">加任务</el-button>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
<el-button class="view-button" @click="handleReplace">替  换</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button class="view-button" @click="handleDeleteTask">删任务</el-button>
|
||||
</el-row>
|
||||
<div class="view-box">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-radio-group v-model="storeInOut">
|
||||
<el-radio :label="1">进库</el-radio>
|
||||
<el-radio :label="2">出库</el-radio>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="view-box">
|
||||
<el-col :span="9" style="padding-left: 10px">
|
||||
<el-input v-model="oldServiceNumber" size="small" :disabled="true" />
|
||||
</el-col>
|
||||
<el-col :span="9" style="padding-left: 20px">
|
||||
<el-input v-model="newServiceNumber" size="small" />
|
||||
</el-col>
|
||||
<el-col :span="5" style="padding-left: 20px">
|
||||
<el-button style="width: 150px;" @click="handleModifyingTripNumber">改车次号</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<el-col :span="4"><span class="view-label">线路开始时间</span></el-col>
|
||||
<el-col :span="8">
|
||||
<el-time-select v-model="serviceStartTime" size="small" />
|
||||
</el-col>
|
||||
<el-col :span="4"><span class="view-label">线路结束时间</span></el-col>
|
||||
<el-col :span="8">
|
||||
<el-time-select v-model="serviceEndTime" size="small" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-col :offset="10">线路详细信息</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="tripData" border style="width: 100%" height="200">
|
||||
<el-table-column prop="arriveTime" label="到站时间" />
|
||||
<el-table-column prop="stationCode" label="车站" />
|
||||
<el-table-column prop="stationStandCode" label="站台" />
|
||||
<el-table-column prop="stopTime" label="停站时间" />
|
||||
<el-table-column prop="level" label="运行等级" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-checkbox v-model="effect">影响后续任务</el-checkbox>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { formatTime, formatName } from '@/utils/runPlan';
|
||||
import { formatTime, formatName } from '@/utils/runPlan';
|
||||
|
||||
export default {
|
||||
name: 'modifyingPlan',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
effect: false,
|
||||
storeInOut: '1',
|
||||
oldServiceNumber: '',
|
||||
newServiceNumber: '',
|
||||
serviceStartTime: '',
|
||||
serviceEndTime: '',
|
||||
serviceData: [],
|
||||
tripData: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '修改'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
formatTime(time) {
|
||||
return formatTime(time);
|
||||
},
|
||||
formatName(code) {
|
||||
return formatName(code);
|
||||
},
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
// 加任务
|
||||
handleAddTask() {
|
||||
this.$emit('dispatchDialog', { name: 'addTask', params: {} })
|
||||
},
|
||||
// 替换
|
||||
handleReplace() {
|
||||
this.$emit('dispatchDialog', { name: 'modifyingTask', params: {} })
|
||||
},
|
||||
// 删任务
|
||||
handleDeleteTask() {
|
||||
this.$emit('dispatchDialog', { name: 'deleteTask', params: {} })
|
||||
},
|
||||
// 改车次号
|
||||
handleModifyingTripNumber() {
|
||||
this.$emit('dispatchDialog', { name: 'modifyingTripNumber', params: {} })
|
||||
},
|
||||
// 确定修改
|
||||
handleCommit() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'ModifyingPlan',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
effect: false,
|
||||
storeInOut: '1',
|
||||
oldServiceNumber: '',
|
||||
newServiceNumber: '',
|
||||
serviceStartTime: '',
|
||||
serviceEndTime: '',
|
||||
serviceData: [],
|
||||
tripData: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '修改';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
formatTime(time) {
|
||||
return formatTime(time);
|
||||
},
|
||||
formatName(code) {
|
||||
return formatName(code);
|
||||
},
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
// 加任务
|
||||
handleAddTask() {
|
||||
this.$emit('dispatchDialog', { name: 'addTask', params: {} });
|
||||
},
|
||||
// 替换
|
||||
handleReplace() {
|
||||
this.$emit('dispatchDialog', { name: 'modifyingTask', params: {} });
|
||||
},
|
||||
// 删任务
|
||||
handleDeleteTask() {
|
||||
this.$emit('dispatchDialog', { name: 'deleteTask', params: {} });
|
||||
},
|
||||
// 改车次号
|
||||
handleModifyingTripNumber() {
|
||||
this.$emit('dispatchDialog', { name: 'modifyingTripNumber', params: {} });
|
||||
},
|
||||
// 确定修改
|
||||
handleCommit() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
@ -157,13 +157,11 @@
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
|
||||
.view-label {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
|
||||
.view-box {
|
||||
padding: 10px 0px;
|
||||
border: 1px inset gray;
|
||||
|
@ -1,298 +1,309 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__schedule add-task" :title="title" :visible.sync="dialogShow" width="1000px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="margin: 10px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-select style="display: inline-black" v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-row>
|
||||
<el-col :offset="4">
|
||||
<el-checkbox v-model="model.trainManual">手工</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>缺省停站时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select style="display: inline-black" v-model="model.time" placeholder="请选择">
|
||||
<el-option v-for="item in timeList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="9" :offset="2">
|
||||
<span>表号:</span>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-input v-model="model.serviceNumber"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-dialog
|
||||
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">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-select v-model="model.tripNumber" style="display: inline-black" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-row>
|
||||
<el-col :offset="4">
|
||||
<el-checkbox v-model="model.trainManual">手工</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>缺省停站时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select v-model="model.time" style="display: inline-black" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in timeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="9" :offset="2">
|
||||
<span>表号:</span>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-input v-model="model.serviceNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="2">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.clearGuest">清客</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="2">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.clearGuest">清客</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-checkbox v-model="model.continuationPlan">延续计划</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.firstTrain">首班车</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-checkbox v-model="model.continuationPlan">延续计划</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<span>序列号:</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-select style="display: inline-black" v-model="model.serialNumber" placeholder="请选择">
|
||||
<el-option v-for="item in serialNumberList" :key="item.value" :label="item.label"
|
||||
:value="model.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.firstTrain">首班车</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-row>
|
||||
<el-col :offset="4">
|
||||
<el-checkbox v-model="model.serialManual">手工</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>缺省运行等级:</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select style="display: inline-black" v-model="model.level" placeholder="请选择">
|
||||
<el-option v-for="item in levelList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="9" :offset="2">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-time-select v-model="model.startTime" placeholder="选择时间" :clearable="false">
|
||||
</el-time-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<span>序列号:</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-select v-model="model.serialNumber" style="display: inline-black" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in serialNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="model.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-row>
|
||||
<el-col :offset="4">
|
||||
<el-checkbox v-model="model.serialManual">手工</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>缺省运行等级:</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select v-model="model.level" style="display: inline-black" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in levelList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="9" :offset="2">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-time-select v-model="model.startTime" placeholder="选择时间" :clearable="false" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="2">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.inStock">入库</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="2">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.inStock">入库</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-checkbox v-model="model.outStock">出库</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.lastTrain">末班车</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-checkbox v-model="model.outStock">出库</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 5px;">
|
||||
交路:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.route" border :height="140">
|
||||
<el-table-column prop="beginStationCode" label="起始站">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.beginStationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="beginStationStandCode" label="起始站台">
|
||||
</el-table-column>
|
||||
<el-table-column prop="endStationCode" label="终到站">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.endStationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endStationStandCode" label="终到站台">
|
||||
</el-table-column>
|
||||
<el-table-column prop="describe" label="描述" :width="280">
|
||||
</el-table-column>
|
||||
<el-table-column :width="40">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||
详情:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.detail" border :height="140">
|
||||
<el-table-column prop="stationCode" label="站台" :width="160">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.stationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="startTime" label="到点">
|
||||
<template slot-scope="scope">
|
||||
{{ formatTime(scope.row.startTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="stopTime" label="停站时间">
|
||||
<template slot-scope="scope">
|
||||
{{ formatTime(scope.row.stopTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endTime" label="发点">
|
||||
<template slot-scope="scope">
|
||||
{{ formatTime(scope.row.endTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="level" label="运行等级">
|
||||
</el-table-column>
|
||||
<el-table-column width="280">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="16">
|
||||
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.lastTrain">末班车</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 5px;">
|
||||
交路:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.route" border :height="140">
|
||||
<el-table-column prop="beginStationCode" label="起始站">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.beginStationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="beginStationStandCode" label="起始站台" />
|
||||
<el-table-column prop="endStationCode" label="终到站">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.endStationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endStationStandCode" label="终到站台" />
|
||||
<el-table-column prop="describe" label="描述" :width="280" />
|
||||
<el-table-column :width="40" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||
详情:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.detail" border :height="140">
|
||||
<el-table-column prop="stationCode" label="站台" :width="160">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.stationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="startTime" label="到点">
|
||||
<template slot-scope="scope">
|
||||
{{ formatTime(scope.row.startTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="stopTime" label="停站时间">
|
||||
<template slot-scope="scope">
|
||||
{{ formatTime(scope.row.stopTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endTime" label="发点">
|
||||
<template slot-scope="scope">
|
||||
{{ formatTime(scope.row.endTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="level" label="运行等级" />
|
||||
<el-table-column width="280" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="16">
|
||||
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { formatTime, formatName } from '@/utils/runPlan';
|
||||
import { formatTime, formatName } from '@/utils/runPlan';
|
||||
|
||||
export default {
|
||||
name: 'ModifyingTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
tripNumber: '',
|
||||
serialNumber: '',
|
||||
trainManual: false,
|
||||
serialManual: false,
|
||||
clearGuest: false,
|
||||
continuationPlan: false,
|
||||
firstTrain: false,
|
||||
lastTrain: false,
|
||||
inStock: false,
|
||||
outStock: false,
|
||||
startTime: '',
|
||||
route: [],
|
||||
detail: []
|
||||
},
|
||||
timeList: [],
|
||||
levelList: [],
|
||||
tripNumberList: [],
|
||||
serialNumberList: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '修改任务'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
formatTime(time) {
|
||||
return formatTime(time);
|
||||
},
|
||||
formatName(code) {
|
||||
return formatName(code);
|
||||
},
|
||||
loadInitData(params) {
|
||||
this.model.tripNumber = params.tripNumber;
|
||||
this.model.serviceNumber = params.serviceNumber;
|
||||
let editData = this.$store.state.runPlan.editData[params.serviceNumber]
|
||||
if (editData) {
|
||||
let tripNumberList = Object.keys(editData.trainMap).sort((a, b) => { return editData.trainMap[a].oldIndex - editData.trainMap[b].oldIndex });
|
||||
let trainInfo = editData.trainMap[params.tripNumber];
|
||||
let lastIndex = trainInfo.stationTimeList.length - 1;
|
||||
let taskObj = {
|
||||
tripNumber: params.tripNumber,
|
||||
beginStationCode: trainInfo.stationTimeList[0].stationCode,
|
||||
beginStationStandCode: '',
|
||||
endStationCode: trainInfo.stationTimeList[lastIndex].stationCode,
|
||||
endStationStandCode: ''
|
||||
}
|
||||
this.model.route.push(taskObj);
|
||||
export default {
|
||||
name: 'ModifyingTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
tripNumber: '',
|
||||
serialNumber: '',
|
||||
trainManual: false,
|
||||
serialManual: false,
|
||||
clearGuest: false,
|
||||
continuationPlan: false,
|
||||
firstTrain: false,
|
||||
lastTrain: false,
|
||||
inStock: false,
|
||||
outStock: false,
|
||||
startTime: '',
|
||||
route: [],
|
||||
detail: []
|
||||
},
|
||||
timeList: [],
|
||||
levelList: [],
|
||||
tripNumberList: [],
|
||||
serialNumberList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '修改任务';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
formatTime(time) {
|
||||
return formatTime(time);
|
||||
},
|
||||
formatName(code) {
|
||||
return formatName(code);
|
||||
},
|
||||
loadInitData(params) {
|
||||
this.model.tripNumber = params.tripNumber;
|
||||
this.model.serviceNumber = params.serviceNumber;
|
||||
const editData = this.$store.state.runPlan.editData[params.serviceNumber];
|
||||
if (editData) {
|
||||
const trainInfo = editData.trainMap[params.tripNumber];
|
||||
const lastIndex = trainInfo.stationTimeList.length - 1;
|
||||
const taskObj = {
|
||||
tripNumber: params.tripNumber,
|
||||
beginStationCode: trainInfo.stationTimeList[0].stationCode,
|
||||
beginStationStandCode: '',
|
||||
endStationCode: trainInfo.stationTimeList[lastIndex].stationCode,
|
||||
endStationStandCode: ''
|
||||
};
|
||||
this.model.route.push(taskObj);
|
||||
|
||||
trainInfo.stationTimeList.forEach((elem, index) => {
|
||||
let stationObj = {
|
||||
stationCode: elem.stationCode,
|
||||
startTime: index == 0 ? null : trainInfo.stationTimeList[index - 1].secondTime,
|
||||
stopTime: index == 0 ? null : elem.secondTime - trainInfo.stationTimeList[index - 1].secondTime,
|
||||
endTime: elem.secondTime,
|
||||
level: '',
|
||||
}
|
||||
this.model.detail.push(stationObj);
|
||||
})
|
||||
}
|
||||
},
|
||||
doShow(params) {
|
||||
this.loadInitData(params);
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
}
|
||||
}
|
||||
}
|
||||
trainInfo.stationTimeList.forEach((elem, index) => {
|
||||
const stationObj = {
|
||||
stationCode: elem.stationCode,
|
||||
startTime: index == 0 ? null : trainInfo.stationTimeList[index - 1].secondTime,
|
||||
stopTime: index == 0 ? null : elem.secondTime - trainInfo.stationTimeList[index - 1].secondTime,
|
||||
endTime: elem.secondTime,
|
||||
level: ''
|
||||
};
|
||||
this.model.detail.push(stationObj);
|
||||
});
|
||||
}
|
||||
},
|
||||
doShow(params) {
|
||||
this.loadInitData(params);
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
|
||||
|
||||
/deep/ {
|
||||
.el-button {
|
||||
margin-left: 40px !important;
|
||||
|
@ -1,150 +1,162 @@
|
||||
<template>
|
||||
<el-dialog class="fuzhou-01__schedule add-task" :title="title" :visible.sync="dialogShow" width="800px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="margin: 10px">
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-radio v-model="model.type" label="1">加在最前</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.startTime" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-radio v-model="model.type" label="2">加在最后</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.startTime" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-dialog
|
||||
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">
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-radio v-model="model.type" label="1">加在最前</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.startTime" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-radio v-model="model.type" label="2">加在最后</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="model.startTime" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 5px;">
|
||||
交路:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.route" border :height="180">
|
||||
<el-table-column prop="date" label="日期" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" label="地址">
|
||||
</el-table-column>
|
||||
<el-table-column width="20">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||
详情:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.detail" border :height="180">
|
||||
<el-table-column prop="date" label="日期" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" label="地址">
|
||||
</el-table-column>
|
||||
<el-table-column width="20">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="16">
|
||||
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="commit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 5px;">
|
||||
交路:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.route" border :height="180">
|
||||
<el-table-column prop="date" label="日期" width="180" />
|
||||
<el-table-column prop="name" label="姓名" width="180" />
|
||||
<el-table-column prop="address" label="地址" />
|
||||
<el-table-column width="20" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||
详情:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.detail" border :height="180">
|
||||
<el-table-column prop="date" label="日期" width="180" />
|
||||
<el-table-column prop="name" label="姓名" width="180" />
|
||||
<el-table-column prop="address" label="地址" />
|
||||
<el-table-column width="20" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="16">
|
||||
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="commit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'AddTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
type: '1',
|
||||
serviceNumber: '',
|
||||
tripNumber: '',
|
||||
startTime: '',
|
||||
default: false,
|
||||
route: [],
|
||||
detail: []
|
||||
},
|
||||
tripNumberList: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '添加任务'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.model.serviceNumber = params.serviceNumber;
|
||||
this.model.tripNumber = params.tripNumber;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
commit() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'AddTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
type: '1',
|
||||
serviceNumber: '',
|
||||
tripNumber: '',
|
||||
startTime: '',
|
||||
default: false,
|
||||
route: [],
|
||||
detail: []
|
||||
},
|
||||
tripNumberList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '添加任务';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.model.serviceNumber = params.serviceNumber;
|
||||
this.model.tripNumber = params.tripNumber;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
commit() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
|
||||
/deep/ {
|
||||
.el-button {
|
||||
margin-left: 40px !important;
|
||||
|
@ -4,7 +4,7 @@
|
||||
:title="title"
|
||||
class="fuzhou-01__schedule choose-plan-template"
|
||||
:visible.sync="dialogShow"
|
||||
width="80%"
|
||||
width="70%"
|
||||
:before-close="doClose"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
@ -93,11 +93,11 @@ export default {
|
||||
return runPlanTemplateList(params);
|
||||
},
|
||||
handleConfirm() {
|
||||
this.doClose();
|
||||
if (this.$refs && this.$refs.pageRules) {
|
||||
const choose = this.$refs.pageRules.currentChoose();
|
||||
if (choose) {
|
||||
this.$emit('chooseConfirm', choose);
|
||||
this.doClose();
|
||||
} else {
|
||||
this.$messageBox(`请选择模板运行图`);
|
||||
}
|
||||
|
@ -111,7 +111,6 @@ export default {
|
||||
if (valid) {
|
||||
createRunPlanLoad(this.buildModel()).then(response => {
|
||||
this.$message.success('创建运行图计划成功');
|
||||
this.$emit('reloadTable', { name: 'managePlanList' });
|
||||
this.doClose();
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
|
@ -1,57 +1,66 @@
|
||||
<template>
|
||||
<el-dialog class="fuzhou-01__schedule delete-task" :title="title" :visible.sync="dialogShow" width="400px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-radio v-model="type" :label="1">删除以前所有任务(包含本任务)</el-radio>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-radio v-model="type" :label="2">删除以后所有任务(包含本任务)</el-radio>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="commit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
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-radio v-model="type" :label="1">删除以前所有任务(包含本任务)</el-radio>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-radio v-model="type" :label="2">删除以后所有任务(包含本任务)</el-radio>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="commit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'DeleteTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tripNumber: '',
|
||||
serviceNumber: '',
|
||||
type: '1',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '删除任务'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.tripNumber = params.tripNumber;
|
||||
this.serviceNumber = params.serviceNumber;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
commit() {
|
||||
// this.tripNumber
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'DeleteTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tripNumber: '',
|
||||
serviceNumber: '',
|
||||
type: '1'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '删除任务';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.tripNumber = params.tripNumber;
|
||||
this.serviceNumber = params.serviceNumber;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
commit() {
|
||||
// this.tripNumber
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -1,46 +1,55 @@
|
||||
<template>
|
||||
<el-dialog class="fuzhou-01__schedule create-week-plan" :title="title" :visible.sync="dialogShow" width="400px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="commit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
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-button @click="commit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'DeleteTodayPlan',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '删除当天计划'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
commit() {
|
||||
// this.tripNumber
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'DeleteTodayPlan',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '删除当天计划';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
commit() {
|
||||
// this.tripNumber
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -15,7 +15,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRunPlanLoadList, deleteRunPlanLoad } from '@/api/runplan';
|
||||
import { getRunPlanLoadList, deleteRunPlanLoad, listAllTempLateRunPlan } from '@/api/runplan';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
|
||||
export default {
|
||||
name: 'ManagePlanList',
|
||||
@ -29,13 +30,7 @@ export default {
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '140px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
runPlanName: {
|
||||
type: 'text',
|
||||
label: '运行图名称'
|
||||
}
|
||||
}
|
||||
reset: true
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
@ -43,12 +38,18 @@ export default {
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '地图名称',
|
||||
prop: 'mapName'
|
||||
title: this.$t('publish.mapName'),
|
||||
prop: 'mapId',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['id', 'name']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '运行图名称',
|
||||
prop: 'runPlanName'
|
||||
title: this.$t('publish.runPlanName'),
|
||||
prop: 'templatePlanId',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.templatePlanId, this.templatePlanList, ['id', 'name']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '加载日期',
|
||||
@ -80,9 +81,20 @@ export default {
|
||||
return '运行图计划表';
|
||||
}
|
||||
},
|
||||
created() {
|
||||
mounted() {
|
||||
this.loadPageData();
|
||||
},
|
||||
methods: {
|
||||
loadPageData() {
|
||||
this.mapList = [];
|
||||
listPublishMap().then(resp => {
|
||||
this.mapList = resp.data;
|
||||
});
|
||||
this.templatePlanList = [];
|
||||
listAllTempLateRunPlan().then(resp => {
|
||||
this.templatePlanList = resp.data;
|
||||
});
|
||||
},
|
||||
queryFunction(params) {
|
||||
if (this.$route.query.mapId) {
|
||||
params['mapId'] = this.$route.query.mapId;
|
||||
@ -114,6 +126,7 @@ export default {
|
||||
},
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(()=> { this.reloadTable(); });
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
|
@ -1,152 +1,152 @@
|
||||
<template>
|
||||
<el-dialog class="fuzhou-01__schedule edit-planning-train" :title="title" :visible.sync="dialogShow" width="800px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-col :offset="10">列车线路</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="17">
|
||||
<el-table :data="serviceData" border style="width: 100%" height="160">
|
||||
<el-table-column prop="startStationCode" label="起点站">
|
||||
</el-table-column>
|
||||
<el-table-column prop="startStationStandCode" label="起点站台">
|
||||
</el-table-column>
|
||||
<el-table-column prop="endStationCode" label="终点站">
|
||||
</el-table-column>
|
||||
<el-table-column prop="endStationStandCode" label="终点站台">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="1">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button class="view-button" @click="handleAddTask">加任务</el-button>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button class="view-button" @click="handleReplace">替  换</el-button>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button class="view-button" @click="handleDeleteTask">删任务</el-button>
|
||||
</el-row>
|
||||
<div class="view-box">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-radio-group v-model="storeInOut">
|
||||
<el-radio :label="1">进库</el-radio>
|
||||
<el-radio :label="2">出库</el-radio>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="view-box">
|
||||
<el-col :span="9" style="padding-left: 10px">
|
||||
<el-input v-model="oldServiceNumber" size="small" :disabled="true"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="9" style="padding-left: 20px">
|
||||
<el-input v-model="newServiceNumber" size="small"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="5" style="padding-left: 20px">
|
||||
<el-button @click="handleModifyingTripNumber" style="width: 150px;">改车次号</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<el-col :span="4"><span class="view-label">线路开始时间</span></el-col>
|
||||
<el-col :span="8">
|
||||
<el-time-select v-model="serviceStartTime" size="small"></el-time-select>
|
||||
</el-col>
|
||||
<el-col :span="4"><span class="view-label">线路结束时间</span></el-col>
|
||||
<el-col :span="8">
|
||||
<el-time-select v-model="serviceEndTime" size="small"></el-time-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-col :offset="10">线路详细信息</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="tripData" border style="width: 100%" height="200">
|
||||
<el-table-column prop="arriveTime" label="到站时间">
|
||||
</el-table-column>
|
||||
<el-table-column prop="stationCode" label="车站">
|
||||
</el-table-column>
|
||||
<el-table-column prop="stationStandCode" 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-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-checkbox v-model="effect">影响后续任务</el-checkbox>
|
||||
<el-dialog
|
||||
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-col :offset="10">列车线路</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="17">
|
||||
<el-table :data="serviceData" border style="width: 100%" height="160">
|
||||
<el-table-column prop="startStationCode" label="起点站" />
|
||||
<el-table-column prop="startStationStandCode" label="起点站台" />
|
||||
<el-table-column prop="endStationCode" label="终点站" />
|
||||
<el-table-column prop="endStationStandCode" label="终点站台" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="1">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button class="view-button" @click="handleAddTask">加任务</el-button>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button @click="commit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
<el-button class="view-button" @click="handleReplace">替  换</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button class="view-button" @click="handleDeleteTask">删任务</el-button>
|
||||
</el-row>
|
||||
<div class="view-box">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-radio-group v-model="storeInOut">
|
||||
<el-radio :label="1">进库</el-radio>
|
||||
<el-radio :label="2">出库</el-radio>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="view-box">
|
||||
<el-col :span="9" style="padding-left: 10px">
|
||||
<el-input v-model="oldServiceNumber" size="small" :disabled="true" />
|
||||
</el-col>
|
||||
<el-col :span="9" style="padding-left: 20px">
|
||||
<el-input v-model="newServiceNumber" size="small" />
|
||||
</el-col>
|
||||
<el-col :span="5" style="padding-left: 20px">
|
||||
<el-button style="width: 150px;" @click="handleModifyingTripNumber">改车次号</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<el-col :span="4"><span class="view-label">线路开始时间</span></el-col>
|
||||
<el-col :span="8">
|
||||
<el-time-select v-model="serviceStartTime" size="small" />
|
||||
</el-col>
|
||||
<el-col :span="4"><span class="view-label">线路结束时间</span></el-col>
|
||||
<el-col :span="8">
|
||||
<el-time-select v-model="serviceEndTime" size="small" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-col :offset="10">线路详细信息</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="tripData" border style="width: 100%" height="200">
|
||||
<el-table-column prop="arriveTime" label="到站时间" />
|
||||
<el-table-column prop="stationCode" label="车站" />
|
||||
<el-table-column prop="stationStandCode" label="站台" />
|
||||
<el-table-column prop="stopTime" label="停站时间" />
|
||||
<el-table-column prop="level" label="运行等级" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-checkbox v-model="effect">影响后续任务</el-checkbox>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button @click="commit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { formatTime, formatName } from '@/utils/runPlan';
|
||||
import { formatTime, formatName } from '@/utils/runPlan';
|
||||
|
||||
export default {
|
||||
name: 'modifyingPlan',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
effect: false,
|
||||
storeInOut: '1',
|
||||
oldServiceNumber: '',
|
||||
newServiceNumber: '',
|
||||
serviceStartTime: '',
|
||||
serviceEndTime: '',
|
||||
serviceData: [],
|
||||
tripData: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '修改'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
formatTime(time) {
|
||||
return formatTime(time);
|
||||
},
|
||||
formatName(code) {
|
||||
return formatName(code);
|
||||
},
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
// 加任务
|
||||
handleAddTask() {
|
||||
this.$emit('dispatchDialog', { name: 'addTask', params: {} })
|
||||
},
|
||||
// 替换
|
||||
handleReplace() {
|
||||
this.$emit('dispatchDialog', { name: 'modifyingTask', params: {} })
|
||||
},
|
||||
// 删任务
|
||||
handleDeleteTask() {
|
||||
this.$emit('dispatchDialog', { name: 'deleteTask', params: {} })
|
||||
},
|
||||
// 改车次号
|
||||
handleModifyingTripNumber() {
|
||||
this.$emit('dispatchDialog', { name: 'modifyingTripNumber', params: {} })
|
||||
},
|
||||
// 确定修改
|
||||
commit() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'ModifyingPlan',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
effect: false,
|
||||
storeInOut: '1',
|
||||
oldServiceNumber: '',
|
||||
newServiceNumber: '',
|
||||
serviceStartTime: '',
|
||||
serviceEndTime: '',
|
||||
serviceData: [],
|
||||
tripData: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '修改';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
formatTime(time) {
|
||||
return formatTime(time);
|
||||
},
|
||||
formatName(code) {
|
||||
return formatName(code);
|
||||
},
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
// 加任务
|
||||
handleAddTask() {
|
||||
this.$emit('dispatchDialog', { name: 'addTask', params: {} });
|
||||
},
|
||||
// 替换
|
||||
handleReplace() {
|
||||
this.$emit('dispatchDialog', { name: 'modifyingTask', params: {} });
|
||||
},
|
||||
// 删任务
|
||||
handleDeleteTask() {
|
||||
this.$emit('dispatchDialog', { name: 'deleteTask', params: {} });
|
||||
},
|
||||
// 改车次号
|
||||
handleModifyingTripNumber() {
|
||||
this.$emit('dispatchDialog', { name: 'modifyingTripNumber', params: {} });
|
||||
},
|
||||
// 确定修改
|
||||
commit() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
@ -157,13 +157,11 @@
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
|
||||
.view-label {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
|
||||
.view-box {
|
||||
padding: 10px 0px;
|
||||
border: 1px inset gray;
|
||||
|
@ -1,298 +1,309 @@
|
||||
<template>
|
||||
<el-dialog class="fuzhou-01__schedule add-task" :title="title" :visible.sync="dialogShow" width="1000px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="margin: 10px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-select style="display: inline-black" v-model="model.tripNumber" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-row>
|
||||
<el-col :offset="4">
|
||||
<el-checkbox v-model="model.trainManual">手工</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>缺省停站时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select style="display: inline-black" v-model="model.time" placeholder="请选择">
|
||||
<el-option v-for="item in timeList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="9" :offset="2">
|
||||
<span>表号:</span>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-input v-model="model.serviceNumber"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-dialog
|
||||
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">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-select v-model="model.tripNumber" style="display: inline-black" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-row>
|
||||
<el-col :offset="4">
|
||||
<el-checkbox v-model="model.trainManual">手工</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>缺省停站时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select v-model="model.time" style="display: inline-black" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in timeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="9" :offset="2">
|
||||
<span>表号:</span>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-input v-model="model.serviceNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="2">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.clearGuest">清客</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="2">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.clearGuest">清客</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-checkbox v-model="model.continuationPlan">延续计划</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.firstTrain">首班车</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-checkbox v-model="model.continuationPlan">延续计划</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<span>序列号:</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-select style="display: inline-black" v-model="model.serialNumber" placeholder="请选择">
|
||||
<el-option v-for="item in serialNumberList" :key="item.value" :label="item.label"
|
||||
:value="model.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.firstTrain">首班车</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-row>
|
||||
<el-col :offset="4">
|
||||
<el-checkbox v-model="model.serialManual">手工</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>缺省运行等级:</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select style="display: inline-black" v-model="model.level" placeholder="请选择">
|
||||
<el-option v-for="item in levelList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="9" :offset="2">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-time-select v-model="model.startTime" placeholder="选择时间" :clearable="false">
|
||||
</el-time-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<span>序列号:</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-select v-model="model.serialNumber" style="display: inline-black" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in serialNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="model.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-row>
|
||||
<el-col :offset="4">
|
||||
<el-checkbox v-model="model.serialManual">手工</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>缺省运行等级:</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select v-model="model.level" style="display: inline-black" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in levelList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="9" :offset="2">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-time-select v-model="model.startTime" placeholder="选择时间" :clearable="false" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="2">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.inStock">入库</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="2">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.inStock">入库</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-checkbox v-model="model.outStock">出库</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.lastTrain">末班车</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-checkbox v-model="model.outStock">出库</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 5px;">
|
||||
交路:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.route" border :height="140">
|
||||
<el-table-column prop="beginStationCode" label="起始站">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.beginStationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="beginStationStandCode" label="起始站台">
|
||||
</el-table-column>
|
||||
<el-table-column prop="endStationCode" label="终到站">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.endStationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endStationStandCode" label="终到站台">
|
||||
</el-table-column>
|
||||
<el-table-column prop="describe" label="描述" :width="280">
|
||||
</el-table-column>
|
||||
<el-table-column :width="40">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||
详情:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.detail" border :height="140">
|
||||
<el-table-column prop="stationCode" label="站台" :width="160">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.stationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="startTime" label="到点">
|
||||
<template slot-scope="scope">
|
||||
{{ formatTime(scope.row.startTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="stopTime" label="停站时间">
|
||||
<template slot-scope="scope">
|
||||
{{ formatTime(scope.row.stopTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endTime" label="发点">
|
||||
<template slot-scope="scope">
|
||||
{{ formatTime(scope.row.endTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="level" label="运行等级">
|
||||
</el-table-column>
|
||||
<el-table-column width="280">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="16">
|
||||
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="model.lastTrain">末班车</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="commit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 5px;">
|
||||
交路:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.route" border :height="140">
|
||||
<el-table-column prop="beginStationCode" label="起始站">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.beginStationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="beginStationStandCode" label="起始站台" />
|
||||
<el-table-column prop="endStationCode" label="终到站">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.endStationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endStationStandCode" label="终到站台" />
|
||||
<el-table-column prop="describe" label="描述" :width="280" />
|
||||
<el-table-column :width="40" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||
详情:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="model.detail" border :height="140">
|
||||
<el-table-column prop="stationCode" label="站台" :width="160">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.stationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="startTime" label="到点">
|
||||
<template slot-scope="scope">
|
||||
{{ formatTime(scope.row.startTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="stopTime" label="停站时间">
|
||||
<template slot-scope="scope">
|
||||
{{ formatTime(scope.row.stopTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endTime" label="发点">
|
||||
<template slot-scope="scope">
|
||||
{{ formatTime(scope.row.endTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="level" label="运行等级" />
|
||||
<el-table-column width="280" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="16">
|
||||
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="commit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { formatTime, formatName } from '@/utils/runPlan';
|
||||
import { formatTime, formatName } from '@/utils/runPlan';
|
||||
|
||||
export default {
|
||||
name: 'ModifyingTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
tripNumber: '',
|
||||
serialNumber: '',
|
||||
trainManual: false,
|
||||
serialManual: false,
|
||||
clearGuest: false,
|
||||
continuationPlan: false,
|
||||
firstTrain: false,
|
||||
lastTrain: false,
|
||||
inStock: false,
|
||||
outStock: false,
|
||||
startTime: '',
|
||||
route: [],
|
||||
detail: []
|
||||
},
|
||||
timeList: [],
|
||||
levelList: [],
|
||||
tripNumberList: [],
|
||||
serialNumberList: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '修改任务'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
formatTime(time) {
|
||||
return formatTime(time);
|
||||
},
|
||||
formatName(code) {
|
||||
return formatName(code);
|
||||
},
|
||||
loadInitData(params) {
|
||||
this.model.tripNumber = params.tripNumber;
|
||||
this.model.serviceNumber = params.serviceNumber;
|
||||
let editData = this.$store.state.runPlan.editData[params.serviceNumber]
|
||||
if (editData) {
|
||||
let tripNumberList = Object.keys(editData.trainMap).sort((a, b) => { return editData.trainMap[a].oldIndex - editData.trainMap[b].oldIndex });
|
||||
let trainInfo = editData.trainMap[params.tripNumber];
|
||||
let lastIndex = trainInfo.stationTimeList.length - 1;
|
||||
let taskObj = {
|
||||
tripNumber: params.tripNumber,
|
||||
beginStationCode: trainInfo.stationTimeList[0].stationCode,
|
||||
beginStationStandCode: '',
|
||||
endStationCode: trainInfo.stationTimeList[lastIndex].stationCode,
|
||||
endStationStandCode: ''
|
||||
}
|
||||
this.model.route.push(taskObj);
|
||||
export default {
|
||||
name: 'ModifyingTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
tripNumber: '',
|
||||
serialNumber: '',
|
||||
trainManual: false,
|
||||
serialManual: false,
|
||||
clearGuest: false,
|
||||
continuationPlan: false,
|
||||
firstTrain: false,
|
||||
lastTrain: false,
|
||||
inStock: false,
|
||||
outStock: false,
|
||||
startTime: '',
|
||||
route: [],
|
||||
detail: []
|
||||
},
|
||||
timeList: [],
|
||||
levelList: [],
|
||||
tripNumberList: [],
|
||||
serialNumberList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '修改任务';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
formatTime(time) {
|
||||
return formatTime(time);
|
||||
},
|
||||
formatName(code) {
|
||||
return formatName(code);
|
||||
},
|
||||
loadInitData(params) {
|
||||
this.model.tripNumber = params.tripNumber;
|
||||
this.model.serviceNumber = params.serviceNumber;
|
||||
const editData = this.$store.state.runPlan.editData[params.serviceNumber];
|
||||
if (editData) {
|
||||
const trainInfo = editData.trainMap[params.tripNumber];
|
||||
const lastIndex = trainInfo.stationTimeList.length - 1;
|
||||
const taskObj = {
|
||||
tripNumber: params.tripNumber,
|
||||
beginStationCode: trainInfo.stationTimeList[0].stationCode,
|
||||
beginStationStandCode: '',
|
||||
endStationCode: trainInfo.stationTimeList[lastIndex].stationCode,
|
||||
endStationStandCode: ''
|
||||
};
|
||||
this.model.route.push(taskObj);
|
||||
|
||||
trainInfo.stationTimeList.forEach((elem, index) => {
|
||||
let stationObj = {
|
||||
stationCode: elem.stationCode,
|
||||
startTime: index == 0 ? null : trainInfo.stationTimeList[index - 1].secondTime,
|
||||
stopTime: index == 0 ? null : elem.secondTime - trainInfo.stationTimeList[index - 1].secondTime,
|
||||
endTime: elem.secondTime,
|
||||
level: '',
|
||||
}
|
||||
this.model.detail.push(stationObj);
|
||||
})
|
||||
}
|
||||
},
|
||||
doShow(params) {
|
||||
this.loadInitData(params);
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
commit() {
|
||||
}
|
||||
}
|
||||
}
|
||||
trainInfo.stationTimeList.forEach((elem, index) => {
|
||||
const stationObj = {
|
||||
stationCode: elem.stationCode,
|
||||
startTime: index == 0 ? null : trainInfo.stationTimeList[index - 1].secondTime,
|
||||
stopTime: index == 0 ? null : elem.secondTime - trainInfo.stationTimeList[index - 1].secondTime,
|
||||
endTime: elem.secondTime,
|
||||
level: ''
|
||||
};
|
||||
this.model.detail.push(stationObj);
|
||||
});
|
||||
}
|
||||
},
|
||||
doShow(params) {
|
||||
this.loadInitData(params);
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
commit() {
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
|
||||
|
||||
/deep/ {
|
||||
.el-button {
|
||||
margin-left: 40px !important;
|
||||
|
@ -388,13 +388,13 @@ export const asyncRouter = [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'ibp/edit',
|
||||
component: IbpEdit,
|
||||
meta: {
|
||||
i18n: 'router.ibpDraw'
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: 'ibp/edit',
|
||||
// component: IbpEdit,
|
||||
// meta: {
|
||||
// i18n: 'router.ibpDraw'
|
||||
// }
|
||||
// },
|
||||
{
|
||||
path: 'runPlan',
|
||||
redirect: '/map/runPlan/view/draft',
|
||||
@ -742,7 +742,7 @@ export const asyncRouter = [
|
||||
path: 'manage',
|
||||
component: Package,
|
||||
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>
|
||||
import { getTotalRemains } from '@/api/management/author';
|
||||
import { PermissionType, OperatorModel } from '@/scripts/ConstDic';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { giveLessons } from '@/api/management/distribute';
|
||||
|
||||
export default {
|
||||
@ -47,6 +47,7 @@ export default {
|
||||
return form;
|
||||
},
|
||||
rules() {
|
||||
const that = this;
|
||||
const crules = {
|
||||
total: [
|
||||
{ required: true, message: this.$t('global.pleaseInputPermissionNumber'), trigger: 'change' },
|
||||
@ -55,7 +56,7 @@ export default {
|
||||
if (Number.isInteger(Number(value)) && Number(value) > 0) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error(this.$t('global.permissionGreaterThen0')));
|
||||
callback(new Error(that.$t('global.permissionGreaterThen0')));
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
@ -102,21 +103,19 @@ export default {
|
||||
this.maxTotal = 0;
|
||||
if (endTime && startTime) {
|
||||
const model = {
|
||||
// lessonId: this.formModel.lessonId,
|
||||
startTime: startTime,
|
||||
endTime: endTime,
|
||||
type: this.PermissionType
|
||||
// mapId: this.mapId,
|
||||
// mapProductCode: this.prdCode,
|
||||
permissionType: this.PermissionType
|
||||
};
|
||||
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
||||
model['lessonId'] = this.formModel.lessonId;
|
||||
model['mapId'] = this.mapId;
|
||||
model['mapProductCode'] = this.prdCode;
|
||||
model['prdCode'] = this.prdCode;
|
||||
} else if (this.PermissionType == PermissionType.SIMULATION) {
|
||||
model['mapId'] = this.mapId;
|
||||
model['mapProductCode'] = this.prdCode;
|
||||
model['prdCode'] = this.prdCode;
|
||||
}
|
||||
// 获取用户某课程某段时间内可用的权限数量
|
||||
getTotalRemains(model).then(response => {
|
||||
this.maxTotal = response.data;
|
||||
if (this.maxTotal == 0) {
|
||||
@ -146,23 +145,20 @@ export default {
|
||||
handleSure() {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
const model = {
|
||||
// lessonId: this.formModel.lessonId,
|
||||
startTime: this.formModel.date[0],
|
||||
endTime: this.formModel.date[1],
|
||||
permissionType: this.PermissionType,
|
||||
operator: OperatorModel.DISTRIBUTE,
|
||||
amount: this.formModel.total
|
||||
// mapId: this.mapId,
|
||||
// mapProductCode: this.prdCode,
|
||||
};
|
||||
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
||||
model['lessonId'] = this.formModel.lessonId;
|
||||
model['mapId'] = this.mapId;
|
||||
model['mapProductCode'] = this.prdCode;
|
||||
model['prdCode'] = this.prdCode;
|
||||
} else if (this.PermissionType == PermissionType.SIMULATION) {
|
||||
model['mapId'] = this.mapId;
|
||||
model['mapProductCode'] = this.prdCode;
|
||||
model['prdCode'] = this.prdCode;
|
||||
}
|
||||
// 权限分发请求
|
||||
giveLessons(model).then(response => {
|
||||
const url = response.data;
|
||||
this.$emit('QrCodeShow', {
|
||||
|
@ -12,8 +12,7 @@
|
||||
<el-table-column prop="endTime" :label="`${$t('global.endTime')}`" />
|
||||
<el-table-column prop="forever" :label="`${$t('global.isForever')}`">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.forever? 'success': 'primary'" disable-transitions>{{ $ConstSelect.translate(scope.row.forever,
|
||||
'Whether') }}</el-tag>
|
||||
<el-tag :type="scope.row.forever? 'success': 'primary'" disable-transitions>{{ $ConstSelect.translate(scope.row.forever, 'Whether') }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amount" :label="$t('global.total')" />
|
||||
@ -102,12 +101,12 @@ export default {
|
||||
});
|
||||
return sums;
|
||||
},
|
||||
transfer(courseModel) {
|
||||
transfer(courseModel) { // 转增
|
||||
if (this.$refs) {
|
||||
this.$refs.transfer.doShow(courseModel);
|
||||
}
|
||||
},
|
||||
distribute(courseModel) {
|
||||
distribute(courseModel) { // 分发
|
||||
if (this.$refs) {
|
||||
this.$refs.distribute.doShow(courseModel);
|
||||
}
|
||||
|
@ -10,8 +10,8 @@
|
||||
|
||||
<script>
|
||||
import { getTotalRemains } from '@/api/management/author';
|
||||
import { giveLessons } from '@/api/management/distribute';
|
||||
import { PermissionType, OperatorModel } from '@/scripts/ConstDic';
|
||||
import { permissionTurnAdd } from '@/api/management/distribute';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'GoLsesson',
|
||||
@ -54,6 +54,7 @@ export default {
|
||||
return form;
|
||||
},
|
||||
rules() {
|
||||
const that = this;
|
||||
const crules = {
|
||||
total: [
|
||||
{ required: true, message: this.$t('global.pleaseInputPermissionNumber'), trigger: 'change' },
|
||||
@ -62,7 +63,7 @@ export default {
|
||||
if (Number.isInteger(Number(value)) && Number(value) > 0) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error(this.$t('global.permissionGreaterThen0')));
|
||||
callback(new Error(that.$t('global.permissionGreaterThen0')));
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
@ -109,20 +110,17 @@ export default {
|
||||
this.maxTotal = 0;
|
||||
if (endTime && startTime) {
|
||||
const model = {
|
||||
// lessonId: this.formModel.lessonId,
|
||||
startTime: `${startTime} 00:00:00`,
|
||||
endTime: `${endTime} 23:59:59`,
|
||||
type: this.PermissionType
|
||||
// mapId: this.mapId,
|
||||
// mapProductCode: this.prdCode,
|
||||
permissionType: this.PermissionType
|
||||
};
|
||||
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
||||
model['lessonId'] = this.formModel.lessonId;
|
||||
model['mapId'] = this.mapId;
|
||||
model['mapProductCode'] = this.prdCode;
|
||||
model['prdCode'] = this.prdCode;
|
||||
} else if (this.PermissionType == PermissionType.SIMULATION) {
|
||||
model['mapId'] = this.mapId;
|
||||
model['mapProductCode'] = this.prdCode;
|
||||
model['prdCode'] = this.prdCode;
|
||||
}
|
||||
getTotalRemains(model).then(response => {
|
||||
this.maxTotal = response.data;
|
||||
@ -153,24 +151,21 @@ export default {
|
||||
handleSure() {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
const model = {
|
||||
// lessonId: this.formModel.lessonId,
|
||||
startTime: `${this.formModel.date[0]} 00:00:00`,
|
||||
endTime: `${this.formModel.date[1]} 23:59:59`,
|
||||
amount: this.formModel.total,
|
||||
permissionType: this.PermissionType,
|
||||
operator: OperatorModel.TRANSFER
|
||||
// mapId: this.mapId,
|
||||
// mapProductCode: this.prdCode,
|
||||
permissionType: this.PermissionType
|
||||
};
|
||||
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
||||
model['lessonId'] = this.formModel.lessonId;
|
||||
model['mapId'] = this.mapId;
|
||||
model['mapProductCode'] = this.prdCode;
|
||||
model['prdCode'] = this.prdCode;
|
||||
} else if (this.PermissionType == PermissionType.SIMULATION) {
|
||||
model['mapId'] = this.mapId;
|
||||
model['mapProductCode'] = this.prdCode;
|
||||
model['prdCode'] = this.prdCode;
|
||||
}
|
||||
giveLessons(model).then(response => {
|
||||
// 转增
|
||||
permissionTurnAdd(model).then(response => {
|
||||
const url = response.data;
|
||||
this.$emit('QrCodeShow', {
|
||||
url: url,
|
||||
|
@ -95,11 +95,13 @@ export default {
|
||||
// 加载课程信息
|
||||
initLoadPage() {
|
||||
const data = {
|
||||
mapId: this.$route.query.mapId,
|
||||
lessonId: this.$route.params.lessonId,
|
||||
productType: this.$route.query.permissionType,
|
||||
mapProductCode: this.$route.query.prdCode
|
||||
permissionType: this.$route.query.permissionType
|
||||
};
|
||||
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 => {
|
||||
this.active = 0;
|
||||
|
@ -159,10 +159,10 @@ export default {
|
||||
};
|
||||
|
||||
(this.permissionList.filter(elem => { return elem.mapName == mapName; })|| []).forEach(elem => {
|
||||
if (elem.mapProductName == Object.keys(permissionMap)[Object.keys(permissionMap).length -1]) {
|
||||
permissionMap[`${elem.mapProductName}`] = elem.remains;
|
||||
if (elem.prdName == Object.keys(permissionMap)[Object.keys(permissionMap).length -1]) {
|
||||
permissionMap[`${elem.prdName}`] = elem.remains;
|
||||
} else {
|
||||
permissionMap[`${elem.mapProductName}-${permissionDict[elem.type]}`] = elem.remains;
|
||||
permissionMap[`${elem.prdName}-${permissionDict[elem.permissionType]}`] = elem.remains;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -94,7 +94,7 @@ export default {
|
||||
},
|
||||
hasPermssion() {
|
||||
let isShow = false;
|
||||
if (this.courseModel.pmsList.length) {
|
||||
if (this.courseModel.pmsList && this.courseModel.pmsList.length) {
|
||||
isShow = true;
|
||||
}
|
||||
return isShow;
|
||||
@ -190,15 +190,14 @@ export default {
|
||||
pmsList: resp.data.pmsList || [],
|
||||
PermissionType: PermissionType.SIMULATION
|
||||
};
|
||||
|
||||
const rest = await queryPermissionSimulation({ mapId: this.courseModel.mapId, prdCode: this.courseModel.prdCode });
|
||||
this.courseModel.pmsList = rest.data;
|
||||
if (!this.courseModel.pmsList.length) {
|
||||
if (!this.courseModel.pmsList) {
|
||||
this.tryUser = 1;
|
||||
const paras = {
|
||||
mapId: data.id,
|
||||
mapProductCode: data.code,
|
||||
productType: PermissionType.SIMULATION
|
||||
prdCode: data.code,
|
||||
permissionType: PermissionType.SIMULATION
|
||||
};
|
||||
|
||||
try {
|
||||
@ -258,7 +257,7 @@ export default {
|
||||
} else if (this.courseModel.prdType == '03') {
|
||||
this.createRoom();
|
||||
} else {
|
||||
if (this.courseModel.pmsList.length) {
|
||||
if (this.courseModel.pmsList && this.courseModel.pmsList.length) {
|
||||
this.jump();
|
||||
} else {
|
||||
if (this.tryTime <= 1) {
|
||||
|
@ -16,7 +16,9 @@
|
||||
<el-col :span="6">
|
||||
<el-form-item label="派班选择:">
|
||||
<el-date-picker
|
||||
v-model="formModel.date"
|
||||
v-model="formModel.planDate"
|
||||
clearable
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
@change="handleQuery"
|
||||
@ -25,7 +27,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<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
|
||||
v-for="item in runPlanList"
|
||||
:key="item.value"
|
||||
@ -40,24 +42,20 @@
|
||||
<div>{{ formModel.mode }}</div>
|
||||
</el-form-item>
|
||||
</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-form>
|
||||
</el-card>
|
||||
<div class="scheduling_body">
|
||||
<div class="scheduling_body-label">{{ title }}</div>
|
||||
<div class="scheduling_body-table">
|
||||
<el-table
|
||||
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>
|
||||
<edit-table ref="table" border stripe :table-data="tableData" :table-form="tableForm" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -66,11 +64,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
import { querySecheduling, generateScheduling } from '@/api/scheduling';
|
||||
import { querySecheduling, generateScheduling, getSchedulingAllTrains, checkScheduling, saveScheduling, generateSchedulingAgain } from '@/api/scheduling';
|
||||
import EditTable from '@/views/components/editTable/index';
|
||||
|
||||
export default {
|
||||
name: 'AddQuest',
|
||||
components: {
|
||||
EditTable
|
||||
},
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
@ -81,42 +82,119 @@ export default {
|
||||
return {
|
||||
show: false,
|
||||
runPlanList: [],
|
||||
groupNumberList: [],
|
||||
formModel: {
|
||||
date: '',
|
||||
id: '',
|
||||
mode: '',
|
||||
runPlanId: ''
|
||||
planDate: '',
|
||||
runPlanName: ''
|
||||
},
|
||||
tableData: [{
|
||||
code: '12987122',
|
||||
name: '王小虎',
|
||||
amount1: '234',
|
||||
amount2: '3.2',
|
||||
amount3: 10
|
||||
}, {
|
||||
code: '12987123',
|
||||
name: '王小虎',
|
||||
amount1: '165',
|
||||
amount2: '4.43',
|
||||
amount3: 12
|
||||
}, {
|
||||
code: '12987124',
|
||||
name: '王小虎',
|
||||
amount1: '324',
|
||||
amount2: '1.9',
|
||||
amount3: 9
|
||||
}, {
|
||||
code: '12987125',
|
||||
name: '王小虎',
|
||||
amount1: '621',
|
||||
amount2: '2.2',
|
||||
amount3: 17
|
||||
}, {
|
||||
code: '12987126',
|
||||
name: '王小虎',
|
||||
amount1: '539',
|
||||
amount2: '4.1',
|
||||
amount3: 15
|
||||
}]
|
||||
tableForm: {
|
||||
index: true,
|
||||
columns: [
|
||||
{
|
||||
title: '司机号',
|
||||
prop: 'driverCode',
|
||||
type: 'text'
|
||||
},
|
||||
{
|
||||
title: '车组号',
|
||||
prop: 'trainCode',
|
||||
type: 'select',
|
||||
width: '150',
|
||||
options: () => { return this.groupNumberList; },
|
||||
editable: true,
|
||||
editing: true
|
||||
},
|
||||
{
|
||||
title: '上线轨',
|
||||
prop: 'onlineSection',
|
||||
type: 'text'
|
||||
},
|
||||
{
|
||||
title: '上线服务号',
|
||||
prop: 'onlineServerNumber',
|
||||
type: 'text'
|
||||
},
|
||||
{
|
||||
title: '上线目的地',
|
||||
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: {
|
||||
@ -136,9 +214,9 @@ export default {
|
||||
this.show = false;
|
||||
},
|
||||
loadInitData() {
|
||||
this.mapList = [];
|
||||
listPublishMap().then(response => {
|
||||
this.mapList = response.data;
|
||||
this.groupNumberList = [];
|
||||
getSchedulingAllTrains(this.group).then(resp => {
|
||||
this.groupNumberList = resp.data.map(elem => { return {value: elem.code, label: elem.groupNumber}; });
|
||||
});
|
||||
},
|
||||
handleQuery(day) {
|
||||
@ -151,17 +229,76 @@ export default {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
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) {
|
||||
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('创建派班计划成功');
|
||||
}).catch(error => {
|
||||
this.clearData();
|
||||
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 {
|
||||
&_header {
|
||||
background: #fff;
|
||||
padding: 10px;
|
||||
padding: 30px 30px 0;
|
||||
}
|
||||
&_body {
|
||||
margin-top: 30px;
|
||||
@ -178,23 +315,9 @@ export default {
|
||||
border: 1px solid #F1F1F1;
|
||||
width: 100%;
|
||||
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 {
|
||||
background: #fafafa;
|
||||
}
|
||||
|
@ -1,113 +1,114 @@
|
||||
<template>
|
||||
<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-item label="系统时间" prop="initTime">
|
||||
<el-time-picker v-model="formModel.initTime" :picker-options="pickerOptions" placeholder="任意时间点"
|
||||
@change="handleChange">
|
||||
</el-time-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="加载列车数" prop="loadNum" v-if="hasNumber">
|
||||
<el-input-number v-model="formModel.loadNum" :min="1" :max="maxNumber" label="请选择可加载列车个数">
|
||||
</el-input-number>
|
||||
<span> {{`(可加载的最大车辆个数:${maxNumber})`}} </span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="show = false">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSure">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<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-item label="系统时间" prop="initTime">
|
||||
<el-time-picker
|
||||
v-model="formModel.initTime"
|
||||
:picker-options="pickerOptions"
|
||||
placeholder="任意时间点"
|
||||
@change="handleChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="hasNumber" label="加载列车数" prop="loadNum">
|
||||
<el-input-number v-model="formModel.loadNum" :min="1" :max="maxNumber" label="请选择可加载列车个数" />
|
||||
<span> {{ `(可加载的最大车辆个数:${maxNumber})` }} </span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="show = false">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSure">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { getDesignatedTimeTrainNum } from '@/api/simulation';
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import { getDesignatedTimeTrainNum } from '@/api/simulation';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
formModel: {
|
||||
initTime: new Date(),
|
||||
loadNum: 1,
|
||||
},
|
||||
maxNumber: 1,
|
||||
pickerOptions: { selectableRange: '00:00:00 - 23:59:59' }
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '设置仿真系统时间';
|
||||
},
|
||||
hasNumber() {
|
||||
return this.$route.params.mode == 'demon' && this.$route.query.prdType == "04";
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
rules() {
|
||||
return {
|
||||
initTime: [
|
||||
{ required: true, message: '请选择系统时间', trigger: 'change' },
|
||||
{
|
||||
validator(rule, value, callback) {
|
||||
if (this.maxNumber == 0) {
|
||||
callback(new Error("请选择有效的开始时间"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
trigger: 'change',
|
||||
maxNumber: this.maxNumber,
|
||||
}
|
||||
],
|
||||
loadNum: [
|
||||
{ required: true, message: '请选择车辆个数', trigger: 'change' },
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
formModel: {
|
||||
initTime: new Date(),
|
||||
loadNum: 1
|
||||
},
|
||||
maxNumber: 1,
|
||||
pickerOptions: { selectableRange: '00:00:00 - 23:59:59' }
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '设置仿真系统时间';
|
||||
},
|
||||
hasNumber() {
|
||||
return this.$route.params.mode == 'demon' && this.$route.query.prdType == '04';
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
rules() {
|
||||
return {
|
||||
initTime: [
|
||||
{ required: true, message: '请选择系统时间', trigger: 'change' },
|
||||
{
|
||||
validator(rule, value, callback) {
|
||||
if (this.maxNumber == 0) {
|
||||
callback(new Error('请选择有效的开始时间'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
trigger: 'change',
|
||||
maxNumber: this.maxNumber
|
||||
}
|
||||
],
|
||||
loadNum: [
|
||||
{ required: true, message: '请选择车辆个数', trigger: 'change' }
|
||||
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.formModel.initTime = new Date(this.$store.state.training.initTime || null);
|
||||
this.handleChange(this.formModel.initTime);
|
||||
this.show = true;
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
handleChange(initTime) {
|
||||
this.formModel.loadNum = 0;
|
||||
if (this.hasNumber) {
|
||||
getDesignatedTimeTrainNum({ initTime: this.formatTime(initTime) }, this.group).then(resp => {
|
||||
this.maxNumber = parseInt(resp.data);
|
||||
})
|
||||
}
|
||||
},
|
||||
formatTime(initTime) {
|
||||
let hh = prefixIntrger(initTime.getHours(), 2);
|
||||
let mm = prefixIntrger(initTime.getMinutes(), 2);
|
||||
let ss = prefixIntrger(initTime.getSeconds(), 2);
|
||||
return `${hh}:${mm}:${ss}`;
|
||||
},
|
||||
handleSure() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
let model = {
|
||||
initTime: this.formatTime(this.formModel.initTime)
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.formModel.initTime = new Date(this.$store.state.training.initTime || null);
|
||||
this.handleChange(this.formModel.initTime);
|
||||
this.show = true;
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
handleChange(initTime) {
|
||||
this.formModel.loadNum = 0;
|
||||
if (this.hasNumber) {
|
||||
getDesignatedTimeTrainNum({ initTime: this.formatTime(initTime) }, this.group).then(resp => {
|
||||
this.maxNumber = parseInt(resp.data);
|
||||
});
|
||||
}
|
||||
},
|
||||
formatTime(initTime) {
|
||||
const hh = prefixIntrger(initTime.getHours(), 2);
|
||||
const mm = prefixIntrger(initTime.getMinutes(), 2);
|
||||
const ss = prefixIntrger(initTime.getSeconds(), 2);
|
||||
return `${hh}:${mm}:${ss}`;
|
||||
},
|
||||
handleSure() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const model = {
|
||||
initTime: this.formatTime(this.formModel.initTime)
|
||||
};
|
||||
|
||||
if (this.hasNumber) {
|
||||
model['loadNum'] = this.formModel.loadNum;
|
||||
}
|
||||
if (this.hasNumber) {
|
||||
model['loadNum'] = this.formModel.loadNum;
|
||||
}
|
||||
|
||||
this.$emit('ConfirmSelectBeginTime', model);
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
this.$emit('ConfirmSelectBeginTime', model);
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -18,6 +18,8 @@
|
||||
@tryTime="tryTime"
|
||||
@hidepanel="hidepanel"
|
||||
@quitQuest="quitQuest"
|
||||
@showIbp="showIbp"
|
||||
@showScheduling="showScheduling"
|
||||
/>
|
||||
|
||||
<menu-screen v-if="isScreen" ref="menuScreen" :offset="offset" :group="group" @tryTime="tryTime" />
|
||||
@ -38,7 +40,6 @@
|
||||
@faultChooseShow="faultChooseShow"
|
||||
@runQuestLoadShow="runQuestLoadShow"
|
||||
@switchMode="switchMode"
|
||||
@schedulingShow="schedulingShow"
|
||||
/>
|
||||
|
||||
<menu-system-time ref="menuSystemTime" :offset="offset" :right="right" :group="group" />
|
||||
@ -565,6 +566,9 @@ export default {
|
||||
this.ibpShow = true;
|
||||
this.$refs.ibpPlate.show();
|
||||
},
|
||||
showScheduling() {
|
||||
this.$refs.scheduling.doShow();
|
||||
},
|
||||
showpanel() {
|
||||
this.panelShow = true;
|
||||
this.simulationShow = false;
|
||||
@ -585,9 +589,6 @@ export default {
|
||||
},
|
||||
faultChooseShow() {
|
||||
this.$refs.faultChoose.doShow();
|
||||
},
|
||||
schedulingShow() {
|
||||
this.$refs.scheduling.doShow();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -8,6 +8,7 @@
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
<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>
|
||||
<template v-if="isShowQuest">
|
||||
<el-button type="danger" @click="handleQuitQuest">退出剧本</el-button>
|
||||
@ -81,6 +82,9 @@ export default {
|
||||
},
|
||||
isShowQuest() {
|
||||
return this.questId;
|
||||
},
|
||||
isShowScheduling() {
|
||||
return this.$route.query.prdType == '05';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -195,6 +199,9 @@ export default {
|
||||
jumpIbp() {
|
||||
this.$emit('showIbp');
|
||||
},
|
||||
jumpScheduling() {
|
||||
this.$emit('showScheduling');
|
||||
},
|
||||
setTryTime() {
|
||||
if (this.try) {
|
||||
this.$emit('tryTime', { time: this.tryTime, goodsId: this.goodsId });
|
||||
|
@ -5,18 +5,9 @@
|
||||
</el-select>
|
||||
|
||||
<el-button-group>
|
||||
<el-button v-if="isShowScheduling" size="small" type="primary" @click="handleScheduling">排班计划
|
||||
</el-button>
|
||||
<el-button v-if="isDemon" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">加载剧本
|
||||
</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="!runing && !isPlan && notScript"
|
||||
size="small"
|
||||
:disabled="viewDisabled"
|
||||
type="warning"
|
||||
@click="loadRunPlan"
|
||||
>运行图加载</el-button>
|
||||
<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-group>
|
||||
|
||||
@ -73,9 +64,6 @@ export default {
|
||||
},
|
||||
isDemon() {
|
||||
return this.$route.params.mode === 'demon';
|
||||
},
|
||||
isShowScheduling() {
|
||||
return this.$route.query.prdType == '05';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -136,9 +124,6 @@ export default {
|
||||
setRuning(run) {
|
||||
this.runing = run;
|
||||
},
|
||||
handleScheduling() {
|
||||
this.$emit('schedulingShow');
|
||||
},
|
||||
setFault() {
|
||||
this.$emit('faultChooseShow');
|
||||
},
|
||||
|
@ -109,7 +109,7 @@ export default {
|
||||
price: res.data.price,
|
||||
remarks: res.data.remarks,
|
||||
detail: res.data.examDefinitionVOList || [],
|
||||
pmsList: res.data.permissionVOList,
|
||||
pmsList: res.data.permissionVOList || [],
|
||||
prdCode: res.data.prdCode,
|
||||
mapId: res.data.mapId,
|
||||
PermissionType: PermissionType.EXAM
|
||||
@ -131,14 +131,14 @@ export default {
|
||||
query: { lessonId: this.courseModel.id }
|
||||
});
|
||||
},
|
||||
transfer() {
|
||||
transfer() { // 转增
|
||||
this.loading = false;
|
||||
if (this.$refs) {
|
||||
this.activeName = 'second';
|
||||
this.$refs.limitList.transfer(this.courseModel);
|
||||
}
|
||||
},
|
||||
distribute() {
|
||||
distribute() { // 分发
|
||||
this.loading = false;
|
||||
if (this.$refs) {
|
||||
this.activeName = 'second';
|
||||
|
@ -1,18 +1,24 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
|
||||
<el-form-item label="报警器编号">
|
||||
<el-input :disabled="isUpdate" v-model="form.code"></el-input>
|
||||
<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="报警器宽度">
|
||||
<el-form-item label="报警器宽度" prop="alarmWidth">
|
||||
<el-input-number v-model="form.alarmWidth" controls-position="right" :min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警器长度">
|
||||
<el-input-number v-model="form.alarmHeight" controls-position="right" :min="1"></el-input-number>
|
||||
<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">{{ buttonText }}</el-button>
|
||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
||||
<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>
|
||||
@ -28,14 +34,11 @@
|
||||
isUpdate: false,
|
||||
buttonText: '立即创建',
|
||||
showDeleteButton: false,
|
||||
point: {
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
form: {
|
||||
code: '',
|
||||
alarmWidth: '',
|
||||
alarmHeight: ''
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
@ -43,9 +46,6 @@
|
||||
],
|
||||
alarmWidth: [
|
||||
{ required: true, message: '请输入报警器宽度', trigger: 'blur' },
|
||||
],
|
||||
alarmHeight: [
|
||||
{ required: true, message: '请输入报警器高度', trigger: 'blur' },
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -62,36 +62,46 @@
|
||||
this.isUpdate = true;
|
||||
this.form.code = model.code;
|
||||
this.form.alarmWidth = model.width;
|
||||
this.form.alarmHeight = model.height;
|
||||
this.point = model.point;
|
||||
this.form.x = model.point.x;
|
||||
this.form.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
const alarmModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: this.point,
|
||||
code: this.form.code,
|
||||
_type: 'Alarm',
|
||||
width: this.form .alarmWidth,
|
||||
height: this.form.alarmHeight
|
||||
};
|
||||
this.$emit('createAlarm', alarmModel);
|
||||
this.initPage();
|
||||
onSubmit(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid){
|
||||
const alarmModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point:{
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
code: this.form.code,
|
||||
_type: 'Alarm',
|
||||
width: this.form .alarmWidth,
|
||||
};
|
||||
this.$emit('createAlarm', alarmModel);
|
||||
this.initPage();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
deleteDevice() {
|
||||
const alarmModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: this.point,
|
||||
point:{
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
code: this.form.code,
|
||||
_type: 'Alarm',
|
||||
width: this.form .alarmWidth,
|
||||
height: this.form.alarmHeight
|
||||
};
|
||||
this.$emit('deleteDataModel',alarmModel );
|
||||
this.initPage();
|
||||
@ -103,12 +113,13 @@
|
||||
this.form = {
|
||||
code: '',
|
||||
alarmWidth: '',
|
||||
alarmHeight: ''
|
||||
};
|
||||
this.point = {
|
||||
x: 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>
|
||||
<div>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
|
||||
<el-form-item label="扶梯框编号">
|
||||
<el-input :disabled="isUpdate" v-model="form.code"></el-input>
|
||||
<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="扶梯框宽度">
|
||||
<el-form-item label="扶梯框宽度" prop="appendageBoxWidth">
|
||||
<el-input-number v-model="form.appendageBoxWidth" controls-position="right" :min="1"></el-input-number>
|
||||
</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-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">{{ buttonText }}</el-button>
|
||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
||||
<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>
|
||||
@ -28,14 +37,13 @@
|
||||
isUpdate: false,
|
||||
buttonText: '立即创建',
|
||||
showDeleteButton: false,
|
||||
point: {
|
||||
form: {
|
||||
code: '',
|
||||
appendageBoxWidth: '',
|
||||
appendageBoxHeight: '',
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
form: {
|
||||
appendageBoxWidth: '',
|
||||
appendageBoxHeight: ''
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: '请输入扶梯框编号', trigger: 'blur' },
|
||||
@ -62,31 +70,44 @@
|
||||
this.form.code = model.code;
|
||||
this.form.appendageBoxWidth = model.width;
|
||||
this.form.appendageBoxHeight = model.height;
|
||||
this.point = model.point;
|
||||
this.form.x = model.point.x;
|
||||
this.form.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
const appendageBoxModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: this.point,
|
||||
_type: 'AppendageBox',
|
||||
code: this.form.code,
|
||||
width: this.form .appendageBoxWidth,
|
||||
height: this.form.appendageBoxHeight
|
||||
};
|
||||
this.$emit('createAppendageBox', appendageBoxModel);
|
||||
this.initPage();
|
||||
onSubmit(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid){
|
||||
const appendageBoxModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: {
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'AppendageBox',
|
||||
code: this.form.code,
|
||||
width: this.form .appendageBoxWidth,
|
||||
height: this.form.appendageBoxHeight
|
||||
};
|
||||
this.$emit('createAppendageBox', appendageBoxModel);
|
||||
this.initPage();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
deleteDevice() {
|
||||
const appendageBoxModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: this.point,
|
||||
point: {
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'AppendageBox',
|
||||
code: this.form.code,
|
||||
width: this.form .appendageBoxWidth,
|
||||
@ -102,12 +123,14 @@
|
||||
this.form = {
|
||||
code: '',
|
||||
appendageBoxWidth: '',
|
||||
appendageBoxHeight: ''
|
||||
};
|
||||
this.point = {
|
||||
appendageBoxHeight: '',
|
||||
x: 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>
|
||||
<div>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
||||
<el-form-item label="箭头编号">
|
||||
<el-input :disabled="isUpdate" v-model="form.code"></el-input>
|
||||
<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="箭头方向">
|
||||
<el-form-item label="箭头方向" prop="orientation">
|
||||
<el-select v-model="form.orientation" placeholder="请选择箭头方向">
|
||||
<el-option label="向上" value="top"></el-option>
|
||||
<el-option label="向下" value="bottom"></el-option>
|
||||
@ -12,18 +14,19 @@
|
||||
<el-option label="向右" value="right"></el-option>
|
||||
</el-select>
|
||||
</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-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-form-item>
|
||||
<el-form-item label="箭头颜色">
|
||||
<el-form-item label="箭头颜色" prop="fillColor">
|
||||
<el-input v-model="form.fillColor"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit">{{ buttonText }}</el-button>
|
||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
||||
<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>
|
||||
@ -31,7 +34,7 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ButtonDraft',
|
||||
name: 'ArrowDraft',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
@ -91,21 +94,27 @@
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
const arrowModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: this.point,
|
||||
_type: 'Arrow',
|
||||
code: this.form.code,
|
||||
orientation: this.form.orientation,
|
||||
fill: this.form.fillColor,
|
||||
width: this.form .arrowWidth,
|
||||
length: this.form.arrowLength,
|
||||
lineWidth: 1
|
||||
};
|
||||
this.$emit('createArrow', arrowModel);
|
||||
this.initPage();
|
||||
onSubmit(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid){
|
||||
const arrowModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: this.point,
|
||||
_type: 'Arrow',
|
||||
code: this.form.code,
|
||||
orientation: this.form.orientation,
|
||||
fill: this.form.fillColor,
|
||||
width: this.form .arrowWidth,
|
||||
length: this.form.arrowLength,
|
||||
};
|
||||
this.$emit('createArrow', arrowModel);
|
||||
this.initPage();
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
deleteDevice() {
|
||||
const arrowModel = {
|
||||
@ -118,7 +127,6 @@
|
||||
fill: this.form.fillColor,
|
||||
width: this.form .arrowWidth,
|
||||
length: this.form.arrowLength,
|
||||
lineWidth: 1
|
||||
};
|
||||
this.$emit('deleteDataModel',arrowModel);
|
||||
this.initPage();
|
||||
@ -138,6 +146,10 @@
|
||||
x: 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>
|
||||
<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-input-number v-model="form.bgWidth" controls-position="right" :min="1" ></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -1,26 +1,33 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
||||
<el-form-item label="按钮编号">
|
||||
<el-input :disabled="isUpdate" v-model="form.code"></el-input>
|
||||
<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="按钮颜色">
|
||||
<el-form-item label="按钮颜色" prop="buttonColor">
|
||||
<el-select v-model="form.buttonColor" placeholder="请选择按钮颜色">
|
||||
<el-option label="红色按钮" value="red"></el-option>
|
||||
<el-option label="黄色按钮" value="yellow"></el-option>
|
||||
<el-option label="绿色按钮" value="green"></el-option>
|
||||
<el-option label="蓝色按钮" value="blue"></el-option>
|
||||
<el-option label="灰色按钮" value="gray"></el-option>
|
||||
</el-select>
|
||||
</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-form-item>
|
||||
<el-form-item label="按钮高度">
|
||||
<el-input-number v-model="form.buttonHeight" controls-position="right" :min="1"></el-input-number>
|
||||
<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">{{ buttonText }}</el-button>
|
||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
||||
<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>
|
||||
@ -36,15 +43,12 @@
|
||||
isUpdate: false,
|
||||
buttonText: '立即创建',
|
||||
showDeleteButton: false,
|
||||
point: {
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
form: {
|
||||
code: '',
|
||||
buttonColor: '',
|
||||
buttonWidth: '',
|
||||
buttonHeight: ''
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
@ -55,9 +59,6 @@
|
||||
],
|
||||
buttonWidth: [
|
||||
{ required: true, message: '请输入按钮宽度', trigger: 'blur' },
|
||||
],
|
||||
buttonHeight: [
|
||||
{ required: true, message: '请输入按钮高度', trigger: 'blur' },
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -75,40 +76,50 @@
|
||||
this.form.code = model.code;
|
||||
this.form.buttonColor = model.color;
|
||||
this.form.buttonWidth = model.width;
|
||||
this.form.buttonHeight = model.height;
|
||||
this.point = model.point;
|
||||
this.form.x = model.point.x;
|
||||
this.form.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
const buttonModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: this.point,
|
||||
_type: 'SquareButton',
|
||||
code: this.form.code,
|
||||
color: this.form.buttonColor,
|
||||
status: 'off',
|
||||
width: this.form.buttonWidth,
|
||||
height: this.form.buttonHeight
|
||||
};
|
||||
this.$emit('createButton', buttonModel);
|
||||
this.initPage();
|
||||
onSubmit(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const buttonModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: {
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'SquareButton',
|
||||
code: this.form.code,
|
||||
color: this.form.buttonColor,
|
||||
status: 'off',
|
||||
width: this.form.buttonWidth,
|
||||
};
|
||||
this.$emit('createButton', buttonModel);
|
||||
this.initPage();
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
deleteDevice() {
|
||||
const buttonModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: this.point,
|
||||
point: {
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'SquareButton',
|
||||
code: this.form.code,
|
||||
color: this.form.buttonColor,
|
||||
status: 'off',
|
||||
width: this.form.buttonWidth,
|
||||
height: this.form.buttonHeight
|
||||
};
|
||||
this.$emit('deleteDataModel',buttonModel );
|
||||
this.initPage();
|
||||
@ -121,21 +132,17 @@
|
||||
code: '',
|
||||
buttonColor: '',
|
||||
buttonWidth: '',
|
||||
buttonHeight: ''
|
||||
};
|
||||
this.point = {
|
||||
x: 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>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
.button_box{
|
||||
width: 100%;
|
||||
background: #f0f0f0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -1,28 +1,37 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
|
||||
<el-form-item label="电梯编号">
|
||||
<el-input :disabled="isUpdate" v-model="form.code" style="width:300px"></el-input>
|
||||
<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="电梯宽度">
|
||||
<el-form-item label="电梯宽度" prop="elevatorWidth">
|
||||
<el-input-number v-model="form.elevatorWidth" controls-position="right" :min="1"></el-input-number>
|
||||
</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-form-item>
|
||||
<el-form-item label="电梯颜色">
|
||||
<el-form-item label="电梯颜色" prop="elevatorColor">
|
||||
<el-color-picker v-model="form.elevatorColor"></el-color-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="启动方向">
|
||||
<el-form-item label="启动方向" prop="direction">
|
||||
<el-select v-model="form.direction" placeholder="请选择启动方向">
|
||||
<el-option label="不启动" value="none"></el-option>
|
||||
<el-option label="向上启动" value="top"></el-option>
|
||||
<el-option label="向下启动" value="bottom"></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">{{ buttonText }}</el-button>
|
||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
||||
<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>
|
||||
@ -37,16 +46,14 @@
|
||||
isUpdate: false,
|
||||
buttonText: '立即创建',
|
||||
showDeleteButton: false,
|
||||
point: {
|
||||
x: 70,
|
||||
y: 70
|
||||
},
|
||||
form: {
|
||||
code: '',
|
||||
elevatorWidth: '',
|
||||
elevatorHeight: '',
|
||||
elevatorColor:'',
|
||||
direction:'',
|
||||
direction:'none',
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
@ -72,7 +79,6 @@
|
||||
},
|
||||
watch: {
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
// 待修改
|
||||
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||
if (model._type === 'Elevator' ){
|
||||
this.buttonText = '修改';
|
||||
@ -83,36 +89,47 @@
|
||||
this.form.elevatorHeight = model.height;
|
||||
this.form.elevatorColor = model.fillColor;
|
||||
this.form.direction = model.direction;
|
||||
this.point = model.point;
|
||||
this.form.x = model.point.x;
|
||||
this.form.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
onSubmit(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid){
|
||||
const elevatorModel = {
|
||||
zlevel: 2,
|
||||
z: 2,
|
||||
point: {
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'Elevator',
|
||||
code: this.form.code,
|
||||
width: this.form.elevatorWidth,
|
||||
height: this.form.elevatorHeight,
|
||||
fillColor: this.form.elevatorColor,
|
||||
direction: this.form.direction,
|
||||
};
|
||||
this.$emit('createElevator', elevatorModel);
|
||||
this.initPage();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
deleteDevice() {
|
||||
const elevatorModel = {
|
||||
zlevel: 2,
|
||||
z: 2,
|
||||
point: this.point,
|
||||
draggable: true,
|
||||
_type: 'Elevator',
|
||||
code: this.form.code,
|
||||
width: this.form.elevatorWidth,
|
||||
height: this.form.elevatorHeight,
|
||||
fillColor: this.form.elevatorColor,
|
||||
direction: this.form.direction,
|
||||
};
|
||||
this.$emit('createElevator', elevatorModel);
|
||||
this.initPage();
|
||||
},
|
||||
deleteDevice() {
|
||||
// 待修改
|
||||
const elevatorModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: this.point,
|
||||
draggable: true,
|
||||
point: {
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'Elevator',
|
||||
code: this.form.code,
|
||||
width: this.form.elevatorWidth,
|
||||
@ -133,11 +150,13 @@
|
||||
elevatorHeight: '',
|
||||
elevatorColor:'',
|
||||
direction:'none',
|
||||
x: 10,
|
||||
y: 10
|
||||
};
|
||||
this.point = {
|
||||
x: 80,
|
||||
y: 80
|
||||
};
|
||||
},
|
||||
generateCode() {
|
||||
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>
|
||||
<div>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
|
||||
<el-form-item label="圆形指示灯编号">
|
||||
<el-input :disabled="isUpdate" v-model="form.code"></el-input>
|
||||
<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="圆形指示灯半径">
|
||||
<el-form-item label="圆形指示灯半径" prop="r">
|
||||
<el-input-number v-model="form.r" 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">{{ buttonText }}</el-button>
|
||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
||||
<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>
|
||||
@ -17,7 +26,7 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ButtonDraft',
|
||||
name: 'LampDraft',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
@ -25,20 +34,18 @@
|
||||
isUpdate: false,
|
||||
buttonText: '立即创建',
|
||||
showDeleteButton: false,
|
||||
point: {
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
form: {
|
||||
code: '',
|
||||
r: ''
|
||||
r: '',
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: '请输入按钮编号', trigger: 'blur' },
|
||||
],
|
||||
r: [
|
||||
{ required: true, message: '请输入圆形指示灯半径', trigger: 'change'}
|
||||
{ required: true, message: '请输入圆形指示灯半径', trigger: 'blur'}
|
||||
],
|
||||
}
|
||||
};
|
||||
@ -55,31 +62,45 @@
|
||||
this.isUpdate = true;
|
||||
this.form.code = model.code;
|
||||
this.form.r = model.r;
|
||||
this.point = model.point;
|
||||
this.form.x = model.point.x;
|
||||
this.form.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
const lampModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: this.point,
|
||||
_type: 'CircularLamp',
|
||||
code: this.form.code,
|
||||
r: this.form.r,
|
||||
fillColor: '#332C22'
|
||||
};
|
||||
this.$emit('createLamp', lampModel);
|
||||
this.initPage();
|
||||
onSubmit(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if(valid){
|
||||
const lampModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: {
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'CircularLamp',
|
||||
code: this.form.code,
|
||||
r: this.form.r,
|
||||
fillColor: '#332C22'
|
||||
};
|
||||
this.$emit('createLamp', lampModel);
|
||||
this.initPage();
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
deleteDevice() {
|
||||
const lampModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: this.point,
|
||||
point: {
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'CircularLamp',
|
||||
code: this.form.code,
|
||||
r: this.form.r,
|
||||
@ -94,21 +115,17 @@
|
||||
this.showDeleteButton = false;
|
||||
this.form = {
|
||||
code: '',
|
||||
r: ''
|
||||
r: '',
|
||||
x: 10,
|
||||
y: 10
|
||||
};
|
||||
this.point = {
|
||||
x: 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>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
.button_box{
|
||||
width: 100%;
|
||||
background: #f0f0f0;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,27 +1,33 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
||||
<el-form-item label="线段编号">
|
||||
<el-input :disabled="isUpdate" v-model="form.code"></el-input>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
|
||||
<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="线段方向">
|
||||
<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-form-item label="线段宽度" prop="lineWidth">
|
||||
<el-input-number v-model="form.lineWidth" controls-position="right" :min="1" :max="50"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="线段颜色">
|
||||
<el-form-item label="线段颜色" prop="fillColor">
|
||||
<el-input v-model="form.fillColor"></el-input>
|
||||
</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-button type="primary" @click="onSubmit">{{ buttonText }}</el-button>
|
||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
||||
<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>
|
||||
@ -37,27 +43,19 @@
|
||||
isUpdate: false,
|
||||
buttonText: '立即创建',
|
||||
showDeleteButton: false,
|
||||
point1: {
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
form: {
|
||||
code: '',
|
||||
direction: '',
|
||||
length: '',
|
||||
lineWidth: '',
|
||||
fillColor: ''
|
||||
fillColor: '',
|
||||
x1: 10,
|
||||
y1: 10,
|
||||
x2: 20,
|
||||
y2: 10
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: '请输入线段编号', trigger: 'blur' },
|
||||
],
|
||||
direction: [
|
||||
{ required: true, message: '请选择线段方向', trigger: 'change'}
|
||||
],
|
||||
length: [
|
||||
{ required: true, message: '请输入线段长度', trigger: 'blur' },
|
||||
],
|
||||
lineWidth: [
|
||||
{ required: true, message: '请输入线段宽度', trigger: 'blur' },
|
||||
],
|
||||
@ -78,45 +76,57 @@
|
||||
this.showDeleteButton = true;
|
||||
this.isUpdate = true;
|
||||
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.fillColor = model.fill;
|
||||
this.point1 = model.point;
|
||||
this.form.fillColor = model.fillColor;
|
||||
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() {
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
const lineModel = {
|
||||
zlevel: 1,
|
||||
z: 1,
|
||||
point1: this.point1,
|
||||
point2: {
|
||||
x: this.form.direction == 'transverse'? this.point1.x + parseInt(this.form.length):10,
|
||||
y: this.form.direction == 'vertical'? this.point1.y + parseInt(this.form.length):10
|
||||
},
|
||||
direction: this.form.direction,
|
||||
code: this.form.code,
|
||||
_type: 'IbpLine',
|
||||
lineWidth: this.form.lineWidth,
|
||||
fillColor: this.form.fillColor
|
||||
};
|
||||
this.$emit('createLine', lineModel);
|
||||
this.initPage();
|
||||
onSubmit(form) {
|
||||
this.$refs[form].validate((valid) =>{
|
||||
if (valid){
|
||||
const lineModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point1: {
|
||||
x: this.form.x1,
|
||||
y: this.form.y1
|
||||
},
|
||||
point2: {
|
||||
x: this.form.x2,
|
||||
y: this.form.y2
|
||||
},
|
||||
code: this.form.code,
|
||||
_type: 'IbpLine',
|
||||
lineWidth: this.form.lineWidth,
|
||||
fillColor: this.form.fillColor
|
||||
};
|
||||
this.$emit('createLine', lineModel);
|
||||
this.initPage();
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
deleteDevice() {
|
||||
const lineModel = {
|
||||
zlevel: 1,
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point1: this.point1,
|
||||
point2: {
|
||||
x: this.form.direction == 'transverse'? this.point1.x + parseInt(this.form.length):10,
|
||||
y: this.form.direction == 'vertical'? this.point1.y + parseInt(this.form.length):10
|
||||
point1: {
|
||||
x: this.form.x1,
|
||||
y: this.form.y1
|
||||
},
|
||||
point2: {
|
||||
x: this.form.x2,
|
||||
y: this.form.y2
|
||||
},
|
||||
direction: this.form.direction,
|
||||
code: this.form.code,
|
||||
_type: 'IbpLine',
|
||||
lineWidth: this.form.lineWidth,
|
||||
@ -131,24 +141,21 @@
|
||||
this.showDeleteButton = false;
|
||||
this.form = {
|
||||
code: '',
|
||||
direction: '',
|
||||
length: '',
|
||||
lineWidth: '',
|
||||
fillColor: ''
|
||||
};
|
||||
this.point = {
|
||||
x: 10,
|
||||
y: 10
|
||||
fillColor: '',
|
||||
x1: 10,
|
||||
y1: 10,
|
||||
x2: 20,
|
||||
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>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
.button_box{
|
||||
width: 100%;
|
||||
background: #f0f0f0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -1,18 +1,24 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
|
||||
<el-form-item label="钥匙孔编号">
|
||||
<el-input :disabled="isUpdate" v-model="form.code"></el-input>
|
||||
<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="钥匙孔宽度">
|
||||
<el-form-item label="钥匙孔宽度" prop="rotatingButtonWidth">
|
||||
<el-input-number v-model="form.rotatingButtonWidth" controls-position="right" :min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="钥匙孔高度">
|
||||
<el-input-number v-model="form.rotatingButtonHeight" controls-position="right" :min="1"></el-input-number>
|
||||
<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">{{ buttonText }}</el-button>
|
||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
||||
<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>
|
||||
@ -28,14 +34,11 @@
|
||||
isUpdate: false,
|
||||
buttonText: '立即创建',
|
||||
showDeleteButton: false,
|
||||
point: {
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
form: {
|
||||
code: '',
|
||||
rotatingButtonWidth: '',
|
||||
rotatingButtonHeight: ''
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
@ -43,9 +46,6 @@
|
||||
],
|
||||
rotatingButtonWidth: [
|
||||
{ required: true, message: '请输入钥匙孔宽度', trigger: 'blur' },
|
||||
],
|
||||
rotatingButtonHeight: [
|
||||
{ required: true, message: '请输入钥匙孔高度', trigger: 'blur' },
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -62,38 +62,49 @@
|
||||
this.isUpdate = true;
|
||||
this.form.code = model.code;
|
||||
this.form.rotatingButtonWidth = model.width;
|
||||
this.form.rotatingButtonHeight = model.height;
|
||||
this.point = model.point;
|
||||
this.form.x = model.point.x;
|
||||
this.form.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
const rotatingButtonModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: this.point,
|
||||
draggable: true,
|
||||
_type: 'RotatingButton',
|
||||
code: this.form.code,
|
||||
width: this.form .rotatingButtonWidth,
|
||||
height: this.form.rotatingButtonHeight
|
||||
};
|
||||
this.$emit('createRotatingButton', rotatingButtonModel);
|
||||
this.initPage();
|
||||
onSubmit(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const rotatingButtonModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: {
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
draggable: true,
|
||||
_type: 'RotatingButton',
|
||||
code: this.form.code,
|
||||
width: this.form .rotatingButtonWidth,
|
||||
};
|
||||
this.$emit('createRotatingButton', rotatingButtonModel);
|
||||
this.initPage();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
deleteDevice() {
|
||||
const rotatingButtonModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: this.point,
|
||||
point: {
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
draggable: true,
|
||||
_type: 'RotatingButton',
|
||||
code: this.form.code,
|
||||
width: this.form .rotatingButtonWidth,
|
||||
height: this.form.rotatingButtonHeight
|
||||
};
|
||||
this.$emit('deleteDataModel',rotatingButtonModel );
|
||||
this.initPage();
|
||||
@ -105,12 +116,13 @@
|
||||
this.form = {
|
||||
code: '',
|
||||
rotatingButtonWidth: '',
|
||||
rotatingButtonHeight: ''
|
||||
};
|
||||
this.point = {
|
||||
x: 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>
|
||||
<div>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
||||
<el-form-item label="文字编号">
|
||||
<el-input :disabled="isUpdate" v-model="form.code"></el-input>
|
||||
<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="文字内容">
|
||||
<el-form-item label="文字内容" prop="context">
|
||||
<el-input type="textarea" v-model="form.context"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="文字颜色">
|
||||
<el-form-item label="文字颜色" prop="textFill">
|
||||
<el-input v-model="form.textFill"></el-input>
|
||||
</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-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-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">{{ buttonText }}</el-button>
|
||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
||||
<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>
|
||||
@ -34,16 +43,14 @@
|
||||
isUpdate: false,
|
||||
buttonText: '立即创建',
|
||||
showDeleteButton: false,
|
||||
point: {
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
form: {
|
||||
code: '',
|
||||
context: '',
|
||||
textFill: '',
|
||||
fontSize: '',
|
||||
fontWeight: ''
|
||||
fontWeight: '',
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
@ -79,18 +86,45 @@
|
||||
this.form.textFill = model.textFill;
|
||||
this.form.fontSize = model.fontSize;
|
||||
this.form.fontWeight = model.fontWeight;
|
||||
this.point = model.point;
|
||||
this.form.x = model.point.x;
|
||||
this.form.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
onSubmit(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const textModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
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: this.point,
|
||||
point: {
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
code: this.form.code,
|
||||
_type: 'IbpText',
|
||||
context: this.form.context,
|
||||
@ -106,7 +140,10 @@
|
||||
const textModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: this.point,
|
||||
point: {
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
code: this.form.code,
|
||||
_type: 'IbpText',
|
||||
context: this.form.context,
|
||||
@ -127,12 +164,14 @@
|
||||
context: '',
|
||||
textFill: '',
|
||||
fontSize: '',
|
||||
fontWeight: ''
|
||||
};
|
||||
this.point = {
|
||||
fontWeight: '',
|
||||
x: 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>
|
||||
<div>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
|
||||
<el-form-item label="提示框编号">
|
||||
<el-input :disabled="isUpdate" v-model="form.code"></el-input>
|
||||
<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="提示框宽度">
|
||||
<el-form-item label="提示框宽度" prop="tipBoxWidth">
|
||||
<el-input-number v-model="form.tipBoxWidth" controls-position="right" :min="1" ></el-input-number>
|
||||
</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-form-item>
|
||||
<el-form-item label="提示框颜色">
|
||||
<el-form-item label="提示框颜色" prop="fillColor">
|
||||
<el-input v-model="form.fillColor"></el-input>
|
||||
</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">{{ buttonText }}</el-button>
|
||||
<el-button v-show="showDeleteButton" @click="deleteDevice">删除</el-button>
|
||||
<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>
|
||||
@ -32,15 +41,13 @@
|
||||
isUpdate: false,
|
||||
buttonText: '立即创建',
|
||||
showDeleteButton: false,
|
||||
point: {
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
form: {
|
||||
code: '',
|
||||
tipBoxWidth: '',
|
||||
tipBoxHeight: '',
|
||||
fillColor: ''
|
||||
fillColor: '',
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
@ -72,32 +79,46 @@
|
||||
this.form.tipBoxWidth = model.width;
|
||||
this.form.tipBoxHeight = model.height;
|
||||
this.form.fillColor = model.fillColor;
|
||||
this.point = model.point;
|
||||
this.form.x = model.point.x;
|
||||
this.form.y = model.point.y;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
const tipBoxModel = {
|
||||
zlevel: 2,
|
||||
z: 1,
|
||||
point: this.point,
|
||||
code: this.form.code,
|
||||
_type: 'TipBox',
|
||||
width: this.form.tipBoxWidth,
|
||||
height: this.form.tipBoxHeight,
|
||||
fillColor: this.form.fillColor
|
||||
};
|
||||
this.$emit('createTipBox', tipBoxModel);
|
||||
this.initPage();
|
||||
onSubmit(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const tipBoxModel = {
|
||||
zlevel: 1,
|
||||
z: 1,
|
||||
point: {
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
code: this.form.code,
|
||||
_type: 'TipBox',
|
||||
width: this.form.tipBoxWidth,
|
||||
height: this.form.tipBoxHeight,
|
||||
fillColor: this.form.fillColor
|
||||
};
|
||||
this.$emit('createTipBox', tipBoxModel);
|
||||
this.initPage();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
deleteDevice() {
|
||||
const tipBoxModel = {
|
||||
zlevel: 2,
|
||||
zlevel: 1,
|
||||
z: 1,
|
||||
point: this.point,
|
||||
point: {
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
code: this.form.code,
|
||||
_type: 'TipBox',
|
||||
width: this.form.tipBoxWidth,
|
||||
@ -115,12 +136,14 @@
|
||||
code: '',
|
||||
tipBoxWidth: '',
|
||||
tipBoxHeight: '',
|
||||
fillColor: ''
|
||||
};
|
||||
this.point = {
|
||||
fillColor: '',
|
||||
x: 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>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="电话端子" name="teleTerminal">
|
||||
<el-tab-pane label="电话端子" name="TeleTerminal">
|
||||
<ibp-telephone-terminal ref="teleTerminal"
|
||||
@createTeleTerminal="createDataModel" @deleteDataModel="deleteDataModel"
|
||||
>
|
||||
</ibp-telephone-terminal>
|
||||
</el-tab-pane> -->
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="电梯" name="elevator">
|
||||
<ibp-elevator ref="elevator"
|
||||
@createElevator="createDataModel" @deleteDataModel="deleteDataModel"
|
||||
>
|
||||
</ibp-elevator>
|
||||
</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-card>
|
||||
</div>
|
||||
@ -104,6 +110,8 @@
|
||||
import IbpLine from './ibpLine';
|
||||
import IbpTelephoneTerminal from './ibpTelephoneTerminal';
|
||||
import IbpElevator from './ibpElevator';
|
||||
import IbpKey from './ibpKey';
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
@ -119,8 +127,9 @@
|
||||
IbpLamp,
|
||||
IbpRotatingButton,
|
||||
IbpLine,
|
||||
// IbpTelephoneTerminal,
|
||||
IbpElevator
|
||||
IbpTelephoneTerminal,
|
||||
IbpElevator,
|
||||
IbpKey
|
||||
},
|
||||
mixins: [
|
||||
|
||||
@ -166,6 +175,8 @@
|
||||
this.$refs.alarm.initPage();
|
||||
this.$refs.rotatingbutton.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 {
|
||||
float: left;
|
||||
width: auto;
|
||||
|
@ -585,6 +585,10 @@ export default {
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.view-control{
|
||||
height: calc(100% - 100px);
|
||||
}
|
||||
|
||||
.button_box{
|
||||
width: 100%;
|
||||
background: #f0f0f0;
|
||||
|
@ -182,7 +182,6 @@ export default {
|
||||
destinationCode: '', // 目的地码
|
||||
destinationCodePoint: { x: 0, y: 0 }, // 目的地码坐标
|
||||
destinationCodeShow: false, // 是否显示目的地码
|
||||
// nameShow: false,
|
||||
axleShow: false,
|
||||
namePoint: { x: 0, y: 0 },
|
||||
kmRangeRight: 0,
|
||||
@ -190,7 +189,6 @@ export default {
|
||||
region: '',
|
||||
logicSectionNum: [],
|
||||
logicSectionShow: false,
|
||||
// logicSectionNameShow: false,
|
||||
isStandTrack: false,
|
||||
standTrackName: '',
|
||||
standTrackNamePosition: { x: 0, y: 0 },
|
||||
@ -212,7 +210,6 @@ export default {
|
||||
sepTypeRight: '',
|
||||
offsetRight: 0,
|
||||
trainPosType: '01',
|
||||
// pointY: '',
|
||||
parentCode: '',
|
||||
points: [],
|
||||
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: '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: [
|
||||
{value: true, label: this.$t('map.fromSmallToLarge')},
|
||||
{value: false, label: this.$t('map.fromLargeToSmall')}
|
||||
@ -457,9 +453,6 @@ export default {
|
||||
isStationAxleShow() {
|
||||
return this.editModel.section == '02';
|
||||
},
|
||||
// islogicSectionNameShow() {
|
||||
// return !this.editModel.logicSectionShow;
|
||||
// },
|
||||
isstandTrackNameShow() {
|
||||
return this.editModel.type !== '03' && this.editModel.isStandTrack;
|
||||
},
|
||||
@ -561,7 +554,6 @@ export default {
|
||||
x: selected.namePosition.x,
|
||||
y: selected.namePosition.y
|
||||
};
|
||||
// this.editModel.nameShow = selected.nameShow;
|
||||
this.editModel.axleShow = selected.axleShow;
|
||||
this.editModel.relStandCode = selected.relStandCode;
|
||||
this.editModel.leftStopPointOffset = selected.leftStopPointOffset;
|
||||
@ -581,7 +573,6 @@ export default {
|
||||
|
||||
this.editModel.logicSectionNum = selected.type === '01' ? selected.logicSectionNum : [0];
|
||||
this.editModel.logicSectionShow = selected.logicSectionShow;
|
||||
// this.editModel.logicSectionNameShow = selected.logicSectionNameShow;
|
||||
this.editModel.isStandTrack = selected.isStandTrack;
|
||||
this.editModel.standTrackName = selected.standTrackName;
|
||||
this.editModel.standTrackNamePosition = {
|
||||
@ -666,7 +657,6 @@ export default {
|
||||
axleShow: false,
|
||||
type: '02',
|
||||
namePosition: { x: 0, y: 0 },
|
||||
// nameShow: model.logicSectionNameShow,
|
||||
isStandTrack: false,
|
||||
standTrackName: model.standTrackName,
|
||||
standTrackNamePosition: {
|
||||
@ -695,7 +685,6 @@ export default {
|
||||
relSwitchCode: model.relSwitchCode,
|
||||
logicSectionNum: [],
|
||||
logicSectionShow: model.logicSectionShow,
|
||||
// logicSectionNameShow: model.logicSectionNameShow,
|
||||
stationCode: model.stationCode,
|
||||
linkCode: model.linkCode,
|
||||
offsetLeft: middleOffset * (index) + model.offsetLeft,
|
||||
@ -776,7 +765,6 @@ export default {
|
||||
code: uid,
|
||||
name: uname,
|
||||
type: '01',
|
||||
// nameShow: true,
|
||||
axleShow: false,
|
||||
isStandTrack: false,
|
||||
standTrackName: '',
|
||||
@ -797,7 +785,6 @@ export default {
|
||||
namePosition: { x: 0, y: 0 },
|
||||
logicSectionNum: [0],
|
||||
logicSectionShow: true,
|
||||
// logicSectionNameShow: true,
|
||||
logicSectionNameSort: true,
|
||||
linkCode: link.code,
|
||||
sepTypeLeft: '01',
|
||||
@ -880,8 +867,6 @@ export default {
|
||||
relStandCode: this.editModel.relStandCode,
|
||||
leftStopPointOffset: Number(this.editModel.leftStopPointOffset),
|
||||
rightStopPointOffset: Number(this.editModel.rightStopPointOffset),
|
||||
|
||||
// nameShow: this.editModel.nameShow,
|
||||
axleShow: this.editModel.axleShow,
|
||||
namePosition: {
|
||||
x: this.editModel.namePoint.x,
|
||||
@ -919,7 +904,6 @@ export default {
|
||||
points: JSON.parse(pointArr),
|
||||
logicSectionNum: this.editModel.logicSectionNum,
|
||||
logicSectionShow: this.editModel.logicSectionShow,
|
||||
// logicSectionNameShow: this.editModel.logicSectionNameShow,
|
||||
sepTypeLeft: this.editModel.sepTypeLeft,
|
||||
offsetLeft: this.editModel.offsetLeft,
|
||||
sepTypeRight: this.editModel.sepTypeRight,
|
||||
@ -947,15 +931,10 @@ export default {
|
||||
const model = this.buildEditModel();
|
||||
this.sectionList.forEach(section => {
|
||||
if (section.parentCode == model.code) {
|
||||
// section.nameShow = section.logicSectionNameShow = model.logicSectionNameShow;
|
||||
section.logicSectionShow = model.logicSectionShow;
|
||||
section.trainPosType = model.trainPosType;
|
||||
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);
|
||||
this.fieldS = '';
|
||||
@ -1005,7 +984,6 @@ export default {
|
||||
name: uidL,
|
||||
type: '01',
|
||||
parentCode: '',
|
||||
// nameShow: selected.nameShow,
|
||||
axleShow: selected.axleShow,
|
||||
isStandTrack: false,
|
||||
kmRangeRight: '',
|
||||
@ -1026,7 +1004,6 @@ export default {
|
||||
logicSectionNameSort: selected.logicSectionNameSort,
|
||||
logicSectionNum: selected.logicSectionNum,
|
||||
logicSectionShow: selected.logicSectionShow,
|
||||
// logicSectionNameShow: selected.logicSectionNameShow,
|
||||
sepTypeLeft: selected.sepTypeLeft,
|
||||
offsetLeft: selected.offsetLeft,
|
||||
sepTypeRight: '01',
|
||||
@ -1052,7 +1029,6 @@ export default {
|
||||
name: uidR,
|
||||
type: '01',
|
||||
parentCode: '',
|
||||
// nameShow: selected.nameShow,
|
||||
axleShow: selected.axleShow,
|
||||
isStandTrack: false,
|
||||
kmRangeRight: '',
|
||||
@ -1073,7 +1049,6 @@ export default {
|
||||
logicSectionNameSort: selected.logicSectionNameSort,
|
||||
logicSectionNum: selected.logicSectionNum,
|
||||
logicSectionShow: selected.logicSectionShow,
|
||||
// logicSectionNameShow: selected.logicSectionNameShow,
|
||||
sepTypeLeft: '01',
|
||||
offsetLeft: selected.offsetLeft,
|
||||
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) {
|
||||
// model.nameShow = lsection.nameShow;
|
||||
model.axleShow = lsection.axleShow;
|
||||
model.logicSectionNum = lsection.logicSectionNum;
|
||||
model.logicSectionShow = lsection.logicSectionShow;
|
||||
@ -1174,7 +1148,6 @@ export default {
|
||||
model.offsetLeft = lsection.offsetLeft;
|
||||
model.sepTypeRight = rsection.sepTypeRight;
|
||||
model.offsetRight = lsection.offsetRight + rsection.offsetRight;
|
||||
// model.logicSectionNameShow = lsection.logicSectionNameShow;
|
||||
model.isCurve = lsection.isCurve;
|
||||
model.points = [
|
||||
{ x: lsection.points[0].x, y: lsection.points[0].y },
|
||||
@ -1186,7 +1159,6 @@ export default {
|
||||
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) {
|
||||
// model.nameShow = rsection.nameShow;
|
||||
model.axleShow = rsection.axleShow;
|
||||
model.logicSectionNum = rsection.logicSectionNum;
|
||||
model.logicSectionShow = rsection.logicSectionShow;
|
||||
@ -1195,7 +1167,6 @@ export default {
|
||||
model.offsetLeft = rsection.offsetLeft;
|
||||
model.sepTypeRight = lsection.sepTypeRight;
|
||||
model.offsetRight = lsection.offsetRight + rsection.offsetRight;
|
||||
// model.logicSectionNameShow = rsection.logicSectionNameShow;
|
||||
model.isCurve = rsection.isCurve;
|
||||
model.points = [
|
||||
{ x: rsection.points[0].x, y: rsection.points[0].y },
|
||||
@ -1269,7 +1240,6 @@ export default {
|
||||
code: uid,
|
||||
name: sectiona.name || sectionb.name || sectionc.name,
|
||||
type: '03',
|
||||
// nameShow: true,
|
||||
axleShow: false,
|
||||
namePosition: point,
|
||||
isStandTrack: false,
|
||||
@ -1291,7 +1261,6 @@ export default {
|
||||
points: [{ x: 0, y: 0 }, { x: 0, y: 0 }],
|
||||
logicSectionNum: [0],
|
||||
logicSectionShow: false,
|
||||
// logicSectionNameShow: false,
|
||||
sepTypeLeft: '00',
|
||||
offsetLeft: 0,
|
||||
sepTypeRight: '00',
|
||||
|
@ -223,7 +223,6 @@ export default {
|
||||
{ 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: '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: '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 },
|
||||
|