Merge remote-tracking branch 'remotes/origin/dev' into test
# Conflicts: # src/i18n/langs/en/map.js # src/utils/baseUrl.js
This commit is contained in:
commit
2f1cc475a1
@ -10,6 +10,7 @@ import { handleToken } from '@/utils/auth';
|
||||
import { creatSubscribe, perpetualTopic, commonTopic } from '@/utils/stomp';
|
||||
import DeomonTopic from '@/views/demonstration/deomonTopic';
|
||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
import { ProjectIcon } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
@ -29,6 +30,8 @@ export default {
|
||||
mounted() {
|
||||
this.prohibitSystemContextMenu();
|
||||
this.subscribe();
|
||||
const project = window.sessionStorage.getItem('project');
|
||||
document.querySelector("link[rel*='icon']").href = ProjectIcon[project];
|
||||
},
|
||||
methods: {
|
||||
resizeHandler() {
|
||||
|
@ -59,9 +59,9 @@ export function putLessonOffLine(id) {
|
||||
/**
|
||||
* 获取地图产品下的课程列表
|
||||
*/
|
||||
export function getCommodityProductLesson(prdCode) {
|
||||
export function getCommodityProductLesson(prdId) {
|
||||
return request({
|
||||
url: `/api/lesson/${prdCode}/list`,
|
||||
url: `/api/lesson/${prdId}/list`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -69,16 +69,6 @@ export function getPermissionList(id) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询仿真权限列表
|
||||
*/
|
||||
export function queryPermissionSimulation(data) {
|
||||
return request({
|
||||
url: `/api/userPermission/${data.mapId}/${data.prdCode}/simulation`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取大屏权限列表*/
|
||||
export function queryPermissionScreen() {
|
||||
return request({
|
||||
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
/** 分页查询皮肤*/
|
||||
/** 分页查询真实线路*/
|
||||
export function getSkinCodePageList(params) {
|
||||
return request({
|
||||
url: `/api/realLine`,
|
||||
@ -9,7 +9,7 @@ export function getSkinCodePageList(params) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 添加皮肤*/
|
||||
/** 添加真实线路*/
|
||||
export function addSkinCode(data) {
|
||||
return request({
|
||||
url: `/api/realLine`,
|
||||
@ -18,7 +18,7 @@ export function addSkinCode(data) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除皮肤*/
|
||||
/** 删除真实线路*/
|
||||
export function delSkinCode(id) {
|
||||
return request({
|
||||
url: `/api/realLine/${id}`,
|
||||
@ -26,7 +26,7 @@ export function delSkinCode(id) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询地图皮肤 */
|
||||
/** 根据id查询真实线路 */
|
||||
export function querySkinCode(id) {
|
||||
return request({
|
||||
url: `/api/realLine/${id}`,
|
||||
@ -34,7 +34,7 @@ export function querySkinCode(id) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 修改地图皮肤*/
|
||||
/** 修改真实线路*/
|
||||
export function updateSkinCode(data) {
|
||||
return request({
|
||||
url: `/api/realLine/${data.id}`,
|
||||
@ -52,7 +52,7 @@ export function updateSkinCodeByCode(data) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询皮肤是否存在*/
|
||||
/** 检查code是否存在*/
|
||||
export function querySkinCodeExistByCode(code) {
|
||||
return request({
|
||||
url: `/api/realLine/${code}/exist`,
|
||||
@ -60,8 +60,8 @@ export function querySkinCodeExistByCode(code) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取皮肤列表*/
|
||||
export function getSkinCodeList() {
|
||||
/** 获取真实线路列表*/
|
||||
export function getLineCodeList() {
|
||||
return request({
|
||||
url: `/api/realLine/list`,
|
||||
method: 'get'
|
@ -9,9 +9,9 @@ export function getPublishMapTree(cityCode) {
|
||||
}
|
||||
|
||||
/** 获取产品详细内容*/
|
||||
export function getProductDetail(prdCode) {
|
||||
export function getProductDetail(prdId) {
|
||||
return request({
|
||||
url: `/api/mapPrd/${prdCode}`,
|
||||
url: `/api/mapPrd/${prdId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
@ -72,9 +72,9 @@ export function getCommodityMapProduct(mapId) {
|
||||
/**
|
||||
* 获取地图下的产品详情
|
||||
*/
|
||||
export function getMapProductDetail(prdCode) {
|
||||
export function getMapProductDetail(prdId) {
|
||||
return request({
|
||||
url: `/api/mapPrd/${prdCode}`,
|
||||
url: `/api/mapPrd/${prdId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -69,9 +69,9 @@ export function runDiagramIsStart(group) {
|
||||
* 仿真系统CBTC
|
||||
* @param {*} mapId
|
||||
*/
|
||||
export function simulationNotify({ mapId, code }) {
|
||||
export function simulationNotify({ mapId, mapPrdId }) {
|
||||
return request({
|
||||
url: `/api/simulation/${mapId}/${code}`,
|
||||
url: `/api/simulation/${mapId}/${mapPrdId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -9,15 +9,6 @@ export function getTrainingSystemList(cityCode, params) {
|
||||
});
|
||||
}
|
||||
|
||||
export function querySystemByTypeAndPrdCode(params, prodCode) {
|
||||
/** 根据系统类型和地图产品code查询系统的内容(课程、章节、考试)*/
|
||||
return request({
|
||||
url: `/api/mapSystem/queryByTypeAndPrdCode/${prodCode}`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
export function getTrainingSystemListByMapId(mapId) {
|
||||
/** 根据mapId去获取其子系统 */
|
||||
return request({
|
||||
|
BIN
src/assets/icon/favicon.png
Normal file
BIN
src/assets/icon/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/icon/favicon_xty.png
Normal file
BIN
src/assets/icon/favicon_xty.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 97 KiB |
@ -103,5 +103,6 @@ export default {
|
||||
connectToRealDeviceFailed: 'Connect to real device failed!',
|
||||
getRealDeviceListFailed: 'Get real device list failed!',
|
||||
deleteRealDeviceFailed: 'Delete real device failed!',
|
||||
checkTheValidityFirst: 'Please check the validity first!'
|
||||
checkTheValidityFirst: 'Please check the validity first!',
|
||||
permissionAtLeast:'At least one of the number of permissions is more than 0'
|
||||
};
|
||||
|
@ -88,6 +88,7 @@ export default {
|
||||
button: 'button',
|
||||
|
||||
mapName: 'Name of the map:',
|
||||
skinName: 'Skin style:',
|
||||
selectCity: 'city:',
|
||||
offsetXColon: 'X Offset:',
|
||||
offsetYColon: 'Y Offset:',
|
||||
@ -543,5 +544,6 @@ export default {
|
||||
|
||||
horizontal: 'Horizontal',
|
||||
vertical: 'Vertical',
|
||||
piece: 'piece'
|
||||
piece: 'piece',
|
||||
setStationCode: 'Batch set up centralized station'
|
||||
};
|
||||
|
@ -31,5 +31,10 @@ export default {
|
||||
private: 'Private',
|
||||
public: 'Public',
|
||||
userName: 'User Name',
|
||||
statusType: 'Status Type'
|
||||
statusType: 'Status Type',
|
||||
isPackage:'Package',
|
||||
numOfDistribute:'Num of distribute',
|
||||
numOfTransfer:'Num of transfer',
|
||||
transferTips:'You can receive multiple permissions at a time, and the permissions you receive can continue to be transferred.',
|
||||
distributeTips:'Only one permission can be obtained at a time. The permission received is a dedicated permission and cannot be redistributed.'
|
||||
};
|
||||
|
@ -120,5 +120,6 @@ export default {
|
||||
pleaseSelectTheBelongsProject: 'Please select the belongs project',
|
||||
copyMapAs: 'Copy map as',
|
||||
whetherToCopyData: 'Whether to copy data',
|
||||
copy:'Copy'
|
||||
copy:'Copy',
|
||||
lineType:'Line Type'
|
||||
};
|
||||
|
@ -36,6 +36,8 @@ export default {
|
||||
sectionRelSwitchCode: 'sectionRelSwitchCode',
|
||||
|
||||
pleaseSelectSectionName: 'Select the section name',
|
||||
pleaseSelectSection: 'Select the section',
|
||||
pleaseSelectStationCode: 'Select the section station code',
|
||||
pleaseFillOffset: 'Please fill in the offset',
|
||||
pleaseFillValue: 'Please fill in the value',
|
||||
pleaseSelectLeftSectionName: 'Please select the left section name',
|
||||
|
@ -67,6 +67,12 @@ export default {
|
||||
startStationRules: 'Please select start station ',
|
||||
endStation: 'End Station',
|
||||
endStationRules: 'Please select end station',
|
||||
drivingMode:'Driving Mode',
|
||||
drivingModeRules:'Please select driving mode',
|
||||
speed:'Speed',
|
||||
signal:'Signal',
|
||||
speedRules:'Please input speed',
|
||||
signalRules:'Please select signal',
|
||||
|
||||
addCommandButton: 'Add Command',
|
||||
addConversitionButton: 'Add Dialogue',
|
||||
|
@ -219,5 +219,7 @@ export default {
|
||||
setProjectSuccess: 'Set belongs project success!',
|
||||
setProjectFail: 'Set belongs project fail!',
|
||||
copyMapSuccess: 'Copy map success!',
|
||||
copyMapFail: 'Copy map fail!'
|
||||
copyMapFail: 'Copy map fail!',
|
||||
pushNewsSuccess: 'Push news success!',
|
||||
pushNewsFailed: 'Push news failed!'
|
||||
};
|
||||
|
@ -32,5 +32,6 @@ export default {
|
||||
plcGatewayOnline: '[PLC gateway online]',
|
||||
plcGatewayOffline: '[PLC gateway offline]',
|
||||
uplinkPlatform: 'Uplink platform',
|
||||
downlinkPlatform: 'Downlink platform'
|
||||
downlinkPlatform: 'Downlink platform',
|
||||
ibp:'IBP'
|
||||
};
|
||||
|
@ -103,5 +103,6 @@ export default {
|
||||
connectToRealDeviceFailed: '关联真实设备失败!',
|
||||
getRealDeviceListFailed: '获取真实设备列表失败!',
|
||||
deleteRealDeviceFailed: '删除真实设备失败!',
|
||||
checkTheValidityFirst: '请先进行有效性检查!'
|
||||
checkTheValidityFirst: '请先进行有效性检查!',
|
||||
permissionAtLeast:'至少有一种权限的数量大于0'
|
||||
};
|
||||
|
@ -539,6 +539,7 @@ export default {
|
||||
|
||||
horizontal: '水平',
|
||||
vertical: '垂直',
|
||||
piece: 'piece'
|
||||
piece: 'piece',
|
||||
setStationCode: '批量设置集中站'
|
||||
|
||||
};
|
||||
|
@ -38,5 +38,11 @@ export default {
|
||||
permissionList: '查看权限列表',
|
||||
lastShep: '上一步',
|
||||
userName: '用户名称',
|
||||
statusType: '状态类型'
|
||||
statusType: '状态类型',
|
||||
isPackage:'是否万能',
|
||||
numOfDistribute:'分发权限数量',
|
||||
numOfTransfer:'转赠权限数量',
|
||||
transferTips:'一次可以领取多个权限,领到的权限可以继续转赠',
|
||||
distributeTips:'一次只能领取一个权限,领到的权限是专用权限,不可再次分发'
|
||||
|
||||
};
|
||||
|
@ -124,5 +124,6 @@ export default {
|
||||
pleaseSelectTheBelongsProject: '请选择归属项目',
|
||||
copyMapAs: '复制地图为',
|
||||
whetherToCopyData: '是否复制数据',
|
||||
copy:'复制'
|
||||
copy:'复制',
|
||||
lineType:'线路类型'
|
||||
};
|
||||
|
@ -34,6 +34,8 @@ export default {
|
||||
basisLink: '基础Link:',
|
||||
|
||||
pleaseSelectSectionName: '请选择区段名称',
|
||||
pleaseSelectSection: '请选择区段',
|
||||
pleaseSelectStationCode: '请选择设备集中站',
|
||||
pleaseFillOffset: '请填写偏移量',
|
||||
pleaseFillValue: '请填写数值',
|
||||
pleaseSelectLeftSectionName: '请选择左侧区段名称',
|
||||
|
@ -67,6 +67,12 @@ export default {
|
||||
startStationRules: '请选择起始站台',
|
||||
endStation: '终点站台',
|
||||
endStationRules: '请选择终点站台',
|
||||
drivingMode:'列车驾驶模式',
|
||||
drivingModeRules:'请选择列车驾驶模式',
|
||||
speed:'速度',
|
||||
signal:'信号机',
|
||||
speedRules:'请输入速度',
|
||||
signalRules:'请选择信号机',
|
||||
|
||||
addCommandButton: '添加指令',
|
||||
addConversitionButton: '添加对话',
|
||||
|
@ -219,5 +219,7 @@ export default {
|
||||
setProjectSuccess: '设置归属项目成功!',
|
||||
setProjectFail: '设置归属项目失败!',
|
||||
copyMapSuccess: '复制地图成功!',
|
||||
copyMapFail: '复制地图失败!'
|
||||
copyMapFail: '复制地图失败!',
|
||||
pushNewsSuccess: '推送消息成功!',
|
||||
pushNewsFailed: '推送消息失败!'
|
||||
};
|
||||
|
@ -32,5 +32,6 @@ export default {
|
||||
plcGatewayOnline: '[PLC网关在线]',
|
||||
plcGatewayOffline: '[PLC网关离线]',
|
||||
uplinkPlatform: '上行站台',
|
||||
downlinkPlatform: '下行站台'
|
||||
downlinkPlatform: '下行站台',
|
||||
ibp:'IBP'
|
||||
};
|
||||
|
@ -107,4 +107,10 @@ deviceRender[deviceType.Alarm] = {
|
||||
z: 4
|
||||
};
|
||||
|
||||
deviceRender[deviceType.CheckBox] = {
|
||||
_type: deviceType.CheckBox,
|
||||
zlevel: 10,
|
||||
z: 0
|
||||
};
|
||||
|
||||
export default deviceRender;
|
||||
|
@ -12,7 +12,8 @@ const deviceType = {
|
||||
Key: 'Key',
|
||||
TeleTerminal: 'TeleTerminal',
|
||||
Clock: 'Clock',
|
||||
RotateTip: 'RotateTip'
|
||||
RotateTip: 'RotateTip',
|
||||
CheckBox: 'CheckBox'
|
||||
};
|
||||
|
||||
export default deviceType;
|
||||
|
@ -303,5 +303,25 @@ class IbpPan {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
renderCheckBox(model) {
|
||||
const type = model._type;
|
||||
const code = model.code;
|
||||
const oDevice = this.ibpDevice[code] || deviceFactory(type, model);
|
||||
const nDevice = deviceFactory(type, Object.assign(oDevice.model || {}, model));
|
||||
delete this.ibpDevice[code];
|
||||
this.$painter.delete(oDevice);
|
||||
if (!model._dispose) {
|
||||
this.ibpDevice[code] = nDevice;
|
||||
this.$painter.add(nDevice);
|
||||
}
|
||||
}
|
||||
deleteCheckBox(code) {
|
||||
const oDevice = this.ibpDevice[code];
|
||||
if (oDevice) {
|
||||
delete this.ibpDevice[code];
|
||||
this.$painter.delete(oDevice);
|
||||
}
|
||||
}
|
||||
}
|
||||
export default IbpPan;
|
||||
|
@ -27,9 +27,14 @@ class MouseController extends Eventful {
|
||||
super();
|
||||
this.$ibp = ibp;
|
||||
this.$zr = ibp.getZr();
|
||||
this.isAllowDragging=ibp.isAllowDragging||false;
|
||||
this.isAllowDragging = ibp.isAllowDragging || false; // 是否在绘图中,仅绘图状态下可拖拽
|
||||
this.events = ibp.getEvents();
|
||||
this._dragging = false;
|
||||
this._dragging = false; // 是否在拖拽状态
|
||||
this.deviceList = [];
|
||||
this.rightClickPoint = {
|
||||
x: 0,
|
||||
y: 0
|
||||
}; // 右键点击坐标
|
||||
this.initHandler(this.$zr);
|
||||
}
|
||||
|
||||
@ -75,35 +80,29 @@ class MouseController extends Eventful {
|
||||
}
|
||||
|
||||
setAllowDragging(data) {
|
||||
this.isAllowDragging=data;
|
||||
this.isAllowDragging = data;
|
||||
}
|
||||
|
||||
mousedown(e) {
|
||||
if (eventTool.notLeftMouse(e)) {
|
||||
return;
|
||||
}
|
||||
e.event.preventDefault();
|
||||
e.event.stopPropagation();
|
||||
const em = new EventModel(e);
|
||||
this.eventTarget = em.eventTarget;
|
||||
if (this.eventTarget && this.eventTarget._type === deviceType.Background) {
|
||||
this.eventTarget.setCursor('pointer');
|
||||
}
|
||||
this._offsetX=e.offsetX;
|
||||
this._offsetY=e.offsetY;
|
||||
this._offsetX = e.offsetX;
|
||||
this._offsetY = e.offsetY;
|
||||
this._x = e.offsetX;
|
||||
this._y = e.offsetY;
|
||||
this._dragging = true;
|
||||
if (e.which === 3) {
|
||||
this.handleMouseDownRight(e);
|
||||
} else if (e.which === 1) {
|
||||
this.handleMouseDownLeft(e);
|
||||
} else if (e.which === 2) {
|
||||
this.handleMouseDownWheel(e);
|
||||
}
|
||||
}
|
||||
|
||||
mousemove(e) {
|
||||
if (eventTool.notLeftMouse(e) ||
|
||||
!this._moveOnMouseMove ||
|
||||
!this._dragging || !this.isAllowDragging
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
const oldX = this._x;
|
||||
const oldY = this._y;
|
||||
|
||||
@ -112,32 +111,38 @@ class MouseController extends Eventful {
|
||||
|
||||
this._x = e.offsetX;
|
||||
this._y = e.offsetY;
|
||||
if (this._dragging) {
|
||||
if ((this.eventTarget && this.eventTarget._type === deviceType.Background) || !this.isAllowDragging) {
|
||||
this._preventDefaultMouseMove && eventTool.stop(e.event);
|
||||
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
|
||||
return true;
|
||||
} else if (this.isAllowDragging && this.eventTarget) {
|
||||
this.eventTarget.grouper.drift(dx, dy, e);
|
||||
if (e.which === 3) {
|
||||
this.handleMouseMoveRight({x: e.offsetX, y: e.offsetY});
|
||||
} else if (e.which === 1) {
|
||||
this.handleMouseMoveLeft(e, dx, dy, oldX, oldY);
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
mouseup(e) {
|
||||
if (!eventTool.notLeftMouse(e)&&this.isAllowDragging && this.eventTarget) {
|
||||
if (eventTool.notLeftMouse(e) || !this.eventTarget ) {
|
||||
return;
|
||||
}
|
||||
if (this.deviceList.length) {
|
||||
this.deviceList.forEach(item => {
|
||||
item.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
|
||||
});
|
||||
this.deviceList = [];
|
||||
this.$ibp.deleteCheckBox('check_box');
|
||||
this.eventTarget = '';
|
||||
this._dragging = false;
|
||||
this.deviceList = [];
|
||||
return;
|
||||
}
|
||||
if (this.isAllowDragging) {
|
||||
this.eventTarget.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
|
||||
this.eventTarget.dirty();
|
||||
}
|
||||
// debugger;
|
||||
if (this.eventTarget && this.eventTarget._type === deviceType.Background) {
|
||||
// console.log('111-------');
|
||||
if (this.eventTarget._type === deviceType.Background) {
|
||||
this.eventTarget.setCursor('default');
|
||||
}
|
||||
this.eventTarget = '';
|
||||
this._dragging = false;
|
||||
this.deviceList = [];
|
||||
}
|
||||
|
||||
contextmenu(e) {
|
||||
@ -191,6 +196,90 @@ class MouseController extends Eventful {
|
||||
|
||||
return newEm;
|
||||
}
|
||||
/** 处理鼠标右键按下事件 */
|
||||
handleMouseDownRight(e) {
|
||||
this.rightClickPoint.x = e.offsetX;
|
||||
this.rightClickPoint.y = e.offsetY;
|
||||
}
|
||||
/** 处理鼠标左键按下事件 */
|
||||
handleMouseDownLeft(e) {
|
||||
if (this.eventTarget && this.eventTarget._type === deviceType.Background) {
|
||||
this.eventTarget.setCursor('pointer');
|
||||
this.$ibp.deleteCheckBox('check_box');
|
||||
} else if (this.eventTarget && this.eventTarget._type === deviceType.CheckBox) {
|
||||
this.handleBoundingRect(this.eventTarget);
|
||||
} else {
|
||||
this.$ibp.deleteCheckBox('check_box');
|
||||
}
|
||||
}
|
||||
/** 处理滚轮按下事件 */
|
||||
handleMouseDownWheel(e) {
|
||||
this.deviceList = [];
|
||||
Object.values(this.$ibp.ibpDevice).forEach(item => {
|
||||
if (item.instance._type !== deviceType.Background) {
|
||||
this.deviceList.push(item.instance);
|
||||
}
|
||||
});
|
||||
}
|
||||
/** 处理右键拖动事件--- 改变选中区域大小 */
|
||||
handleMouseMoveRight(point2) {
|
||||
const point1 = this.rightClickPoint;
|
||||
const x = Math.min(point1.x, point2.x) + this.$ibp.$options.offsetX;
|
||||
const y = Math.min(point1.y, point2.y) + this.$ibp.$options.offsetY;
|
||||
const width = Math.abs(point1.x - point2.x);
|
||||
const height = Math.abs(point1.y - point2.y);
|
||||
this.$ibp.renderCheckBox({code: 'check_box', _type: 'CheckBox', point: {x: x, y: y}, width: width, height: height });
|
||||
}
|
||||
/** 处理左键拖动事件--- 图形移动 */
|
||||
handleMouseMoveLeft(e, dx, dy, oldX, oldY) {
|
||||
if (!this._moveOnMouseMove || !this._dragging || !this.isAllowDragging) {
|
||||
return;
|
||||
}
|
||||
// 选中区域图形移动
|
||||
if (this.deviceList.length) {
|
||||
this.deviceList.forEach(item => {
|
||||
item.grouper.drift(dx, dy, e);
|
||||
});
|
||||
} else if (this._dragging && this.eventTarget) { // 选中元素图形移动
|
||||
if (( this.eventTarget._type === deviceType.Background) || !this.isAllowDragging) {
|
||||
this._preventDefaultMouseMove && eventTool.stop(e.event);
|
||||
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
|
||||
} else if (this.isAllowDragging) {
|
||||
this.eventTarget.grouper.drift(dx, dy, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
/** 通过包围盒筛选选中区域的元素 */
|
||||
handleBoundingRect(eventTarget) {
|
||||
this.deviceList = [];
|
||||
let boundingRect = eventTarget.grouper.getBoundingRect();
|
||||
boundingRect = this.createFakeBoundingRect(eventTarget, boundingRect);
|
||||
const deviceList = Object.values(this.$ibp.ibpDevice);
|
||||
const includeDeviceList = [];
|
||||
deviceList.forEach( item =>{
|
||||
if (item.instance._type !== deviceType.Background) {
|
||||
let deviceBoundingRect = item.instance.grouper.getBoundingRect();
|
||||
deviceBoundingRect = this.createFakeBoundingRect(item.instance, deviceBoundingRect);
|
||||
if (this.whetherInclude(boundingRect, deviceBoundingRect )) {
|
||||
includeDeviceList.push(item.instance);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.deviceList = includeDeviceList;
|
||||
}
|
||||
/** 创建假包围盒对象 */
|
||||
createFakeBoundingRect(instance, boundingRect) {
|
||||
return {
|
||||
x1: instance.model.point.x + boundingRect.x,
|
||||
y1: instance.model.point.y + boundingRect.y,
|
||||
x2: instance.model.point.x + boundingRect.width,
|
||||
y2: instance.model.point.y + boundingRect.height
|
||||
};
|
||||
}
|
||||
/** 判断元素包围盒是否在选中区域 */
|
||||
whetherInclude(boundingRect1, boundingRect2) {
|
||||
return boundingRect1.x1 <= boundingRect2.x1 && boundingRect1.y1 <= boundingRect2.y1 && boundingRect1.x2 >= boundingRect2.x2 && boundingRect1.y2 >= boundingRect2.y2;
|
||||
}
|
||||
}
|
||||
|
||||
export default MouseController;
|
||||
|
46
src/ibp/shape/checkBox.js
Normal file
46
src/ibp/shape/checkBox.js
Normal file
@ -0,0 +1,46 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
|
||||
export default class checkBox extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
this.model = device.model;
|
||||
this._type = device.model._type;
|
||||
this._code = device.model.code;
|
||||
this.zlevel = device.model.zlevel;
|
||||
this.z = device.model.z;
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
this.grouper = new Group({
|
||||
id: model.code,
|
||||
position: [model.point.x, model.point.y]
|
||||
});
|
||||
this.box = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
draggable: false,
|
||||
shape: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: this.model.width,
|
||||
height: this.model.height
|
||||
},
|
||||
style: {
|
||||
fill: 'rgb(135,206,250,0.2)'
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.box);
|
||||
this.add(this.grouper);
|
||||
}
|
||||
setModel(dx, dy) {
|
||||
this.model.point.x += dx;
|
||||
this.model.point.y += dy;
|
||||
}
|
||||
setSize(width, height) {
|
||||
this.model.width = width;
|
||||
this.model.height = height;
|
||||
}
|
||||
}
|
@ -13,6 +13,7 @@ import Key from './key';
|
||||
import TeleTerminal from './teleTerminal';
|
||||
import Clock from './clock';
|
||||
import RotateTip from './rotateTip';
|
||||
import CheckBox from './checkBox';
|
||||
|
||||
const ibpShape = {};
|
||||
ibpShape[deviceType.Arrow] = Arrow;
|
||||
@ -29,6 +30,7 @@ ibpShape[deviceType.Key] = Key;
|
||||
ibpShape[deviceType.TeleTerminal] = TeleTerminal;
|
||||
ibpShape[deviceType.Clock] = Clock;
|
||||
ibpShape[deviceType.RotateTip] = RotateTip;
|
||||
ibpShape[deviceType.CheckBox] = CheckBox;
|
||||
|
||||
function shapefactory(device, ibp) {
|
||||
const type = device.model._type;
|
||||
|
@ -8,12 +8,13 @@ export default class ibpLine extends Group {
|
||||
this._type = device.model._type;
|
||||
this._code = device.model.code;
|
||||
this.zlevel = device.model.zlevel;
|
||||
this.model.point = this.model.point1;
|
||||
this.z = device.model.z;
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
const model = this.model;
|
||||
this.grouper=new Group({
|
||||
this.grouper = new Group({
|
||||
id: model.code,
|
||||
position: [model.point1.x, model.point1.y]
|
||||
});
|
||||
@ -24,8 +25,8 @@ export default class ibpLine extends Group {
|
||||
shape: {
|
||||
x1: 0,
|
||||
y1: 0,
|
||||
x2: model.point2.x-model.point1.x,
|
||||
y2: model.point2.y-model.point1.y
|
||||
x2: model.point2.x - model.point1.x,
|
||||
y2: model.point2.y - model.point1.y
|
||||
},
|
||||
style: {
|
||||
lineWidth: this.model.lineWidth,
|
||||
|
@ -17,7 +17,7 @@ class TransformHandle {
|
||||
}
|
||||
|
||||
revisibleView(view) {
|
||||
if (this.checkVisible(view)||view._type === deviceType.Background) {
|
||||
if (this.checkVisible(view) || view._type === deviceType.Background) {
|
||||
view.show();
|
||||
} else {
|
||||
view.hide();
|
||||
|
@ -260,6 +260,14 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
arrow: {
|
||||
show: true // 控制模式箭头显隐
|
||||
},
|
||||
mouseOverStyle: { // 鼠标悬浮样式
|
||||
fontSize: 10,
|
||||
fontFormat: 'consolas',
|
||||
fontColor: '#FFF000',
|
||||
fontWeight: 'normal',
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top'
|
||||
}
|
||||
};
|
||||
|
||||
@ -309,8 +317,8 @@ class SkinCode extends defaultStyle {
|
||||
contentRectShow: false // 道岔封锁显示
|
||||
},
|
||||
monolock: { // 道岔单锁配置
|
||||
locationColor: '#870E10', // 道岔单锁定位颜色 (红色)
|
||||
inversionColor: '#870E10', // 道岔单锁反位颜色 (红色)
|
||||
locationColor: '#ea282c', // 道岔单锁定位颜色 (红色)
|
||||
inversionColor: '#ea282c', // 道岔单锁反位颜色 (红色)
|
||||
rectShow: false // 道岔单锁 矩形框是否显示
|
||||
}
|
||||
};
|
||||
@ -319,11 +327,71 @@ class SkinCode extends defaultStyle {
|
||||
lineColor: '#FFFFFF' // 线条颜色
|
||||
};
|
||||
|
||||
this[deviceType.LcControl] = {};
|
||||
this[deviceType.LcControl] = {
|
||||
text: {
|
||||
fontSize: 10, // 灯字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 灯大小
|
||||
controlColor: '#FFFF00' // 灯颜色
|
||||
},
|
||||
mouseOverStyle: {
|
||||
fontSize: 10,
|
||||
fontFormat: 'consolas',
|
||||
fontColor: '#FFF000',
|
||||
fontWeight: 'normal',
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top',
|
||||
arcColor: '#00FFFF',
|
||||
textColor: '#000000'
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.ZcControl] = {};
|
||||
this[deviceType.ZcControl] = {
|
||||
text: {
|
||||
fontSize: 10, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 灯大小
|
||||
controlColor: '#00FF00' // 灯颜色
|
||||
},
|
||||
mouseOverStyle: {
|
||||
fontSize: 10,
|
||||
fontFormat: 'consolas',
|
||||
fontColor: '#FFF000',
|
||||
fontWeight: 'normal',
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top',
|
||||
arcColor: '#00FFFF',
|
||||
textColor: '#000000'
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.LimitControl] = {};
|
||||
this[deviceType.LimitControl] = {
|
||||
text: {
|
||||
fontSize: 10, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 灯大小
|
||||
controlColor: '#ECE9D8' // 灯颜色
|
||||
},
|
||||
mouseOverStyle: {
|
||||
fontSize: 10,
|
||||
fontFormat: 'consolas',
|
||||
fontColor: '#FFF000',
|
||||
fontWeight: 'normal',
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top',
|
||||
textColor: '#000000',
|
||||
arcColor: '#00FFFF'
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.TrainWindow] = {
|
||||
lineColor: '#4DD43F', // 车次窗颜色
|
||||
|
@ -27,6 +27,10 @@ class KeyboardController extends Eventful {
|
||||
window.removeEventListener('keydown', keydownHandle, false);
|
||||
window.removeEventListener('keyup', keyupHandle, false);
|
||||
};
|
||||
|
||||
this.dispose = function() {
|
||||
this.disable();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ class Jlmap {
|
||||
this.methods = opts.methods;
|
||||
|
||||
// 鼠标事件
|
||||
this.events = { __Pan: 'pan', __Zoom: 'zoom', Selected: 'selected', Contextmenu: 'contextmenu', DataZoom: 'dataZoom', Keyboard: 'Keyboard'};
|
||||
this.events = { __Pan: 'pan', __Zoom: 'zoom', Selected: 'selected', Contextmenu: 'contextmenu', DataZoom: 'dataZoom', Keyboard: 'keyboard'};
|
||||
|
||||
// 皮肤参数
|
||||
this.skinCode = '';
|
||||
@ -328,6 +328,7 @@ class Jlmap {
|
||||
this.clear();
|
||||
|
||||
this.$mouseController.dispose();
|
||||
this.$keyboardController.dispose();
|
||||
this.$zr && zrender.dispose(this.$zr);
|
||||
this.$painter.dispose();
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ class Options {
|
||||
constructor(opts, trigger) {
|
||||
this.scaleIndex = 0;
|
||||
this.scaleList = [
|
||||
0.5, 0.6, 0.7, 0.8, 0.9,
|
||||
0.8, 0.9,
|
||||
1, 1.2, 1.4, 1.6, 1.8,
|
||||
2, 2.2, 2.4, 2.6, 2.8,
|
||||
3, 3.2, 3.4, 3.6, 3.8,
|
||||
@ -10,7 +10,7 @@ class Options {
|
||||
5, 5.2, 5.4, 5.6, 5.8,
|
||||
6, 6.2, 6.4, 6.6, 6.8,
|
||||
7, 7.2, 7.4, 7.6, 7.8,
|
||||
8, 8.2, 8.4, 8.6, 8.8
|
||||
8
|
||||
];
|
||||
|
||||
if (Number.isFinite(opts.scaleRate)) {
|
||||
|
@ -55,7 +55,7 @@ class ESwName extends Group {
|
||||
}
|
||||
});
|
||||
|
||||
const data=LangStorage.getLang() == 'en'?'Turnout section':'道岔区段名称';
|
||||
const data = LangStorage.getLang() == 'en' ? 'Turnout section' : '道岔区段名称';
|
||||
|
||||
this.arrowText = new Text({
|
||||
zlevel: model.zlevel,
|
||||
|
@ -42,7 +42,7 @@ export default class Switch extends Group {
|
||||
const style = this.style;
|
||||
|
||||
let halfWidth = style.Section.line.width / 2;
|
||||
const switchWidth = style.Section.line.width + style.Section.line.beyondWidth*2 + 0.8;
|
||||
const switchWidth = style.Section.line.width + style.Section.line.beyondWidth * 2 + 0.8;
|
||||
const swPadding = style.Switch.core.length;
|
||||
const directx = this.triangle.drictx;
|
||||
const directy = this.triangle.dricty;
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
<script>
|
||||
import { runPlanTemplateList } from '@/api/runplan';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
|
||||
export default {
|
||||
name: 'ChooseTemplatePlan',
|
||||
@ -74,7 +74,7 @@ export default {
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.skinCodeList = [];
|
||||
getSkinCodeList().then(response => {
|
||||
getLineCodeList().then(response => {
|
||||
this.skinCodeList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -21,7 +21,7 @@
|
||||
import { runPlanTemplateList } from '@/api/runplan';
|
||||
import { getStationList } from '@/api/runplan';
|
||||
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
|
||||
export default {
|
||||
name: 'ReloadTodayPlan',
|
||||
@ -76,7 +76,7 @@ export default {
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.skinCodeList = [];
|
||||
getSkinCodeList().then(response => {
|
||||
getLineCodeList().then(response => {
|
||||
this.skinCodeList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
<script>
|
||||
import { runPlanTemplateList } from '@/api/runplan';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
|
||||
export default {
|
||||
name: 'ChooseTemplatePlan',
|
||||
@ -74,7 +74,7 @@ export default {
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.skinCodeList = [];
|
||||
getSkinCodeList().then(response => {
|
||||
getLineCodeList().then(response => {
|
||||
this.skinCodeList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -21,7 +21,7 @@
|
||||
import { runPlanTemplateList } from '@/api/runplan';
|
||||
import { getStationList } from '@/api/runplan';
|
||||
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
|
||||
export default {
|
||||
name: 'ReloadTodayPlan',
|
||||
@ -76,7 +76,7 @@ export default {
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.skinCodeList = [];
|
||||
getSkinCodeList().then(response => {
|
||||
getLineCodeList().then(response => {
|
||||
this.skinCodeList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
<script>
|
||||
import { runPlanTemplateList } from '@/api/runplan';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
|
||||
export default {
|
||||
name: 'ChooseTemplatePlan',
|
||||
@ -74,7 +74,7 @@ export default {
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.skinCodeList = [];
|
||||
getSkinCodeList().then(response => {
|
||||
getLineCodeList().then(response => {
|
||||
this.skinCodeList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -21,7 +21,7 @@
|
||||
import { runPlanTemplateList } from '@/api/runplan';
|
||||
import { getStationList } from '@/api/runplan';
|
||||
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
|
||||
export default {
|
||||
name: 'ReloadTodayPlan',
|
||||
@ -76,7 +76,7 @@ export default {
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.skinCodeList = [];
|
||||
getSkinCodeList().then(response => {
|
||||
getLineCodeList().then(response => {
|
||||
this.skinCodeList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
<script>
|
||||
import { runPlanTemplateList } from '@/api/runplan';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
|
||||
export default {
|
||||
name: 'ChooseTemplatePlan',
|
||||
@ -74,7 +74,7 @@ export default {
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.skinCodeList = [];
|
||||
getSkinCodeList().then(response => {
|
||||
getLineCodeList().then(response => {
|
||||
this.skinCodeList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -21,7 +21,7 @@
|
||||
import { runPlanTemplateList } from '@/api/runplan';
|
||||
import { getStationList } from '@/api/runplan';
|
||||
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
|
||||
export default {
|
||||
name: 'ReloadTodayPlan',
|
||||
@ -76,7 +76,7 @@ export default {
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.skinCodeList = [];
|
||||
getSkinCodeList().then(response => {
|
||||
getLineCodeList().then(response => {
|
||||
this.skinCodeList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -34,14 +34,14 @@ export function deviceFactory(type, elem) {
|
||||
return {...deviceRender[type], ...elem};
|
||||
}
|
||||
|
||||
export function createDevice(type, model, propConvert) {
|
||||
const device = deviceFactory(type, model);
|
||||
export function createDevice(type, elem, propConvert) {
|
||||
const device = deviceFactory(type, Object.assign(elem, { _type: type } ));
|
||||
return propConvert ? propConvert.initPrivateProps(device) : device;
|
||||
}
|
||||
|
||||
export function parser(data, skinCode) {
|
||||
var mapDevice = {};
|
||||
var propConvert = skinCode ? Vue.prototype.$theme.loadPropConvert(skinCode): null;
|
||||
var propConvert = skinCode ? Vue.prototype.$theme.loadPropConvert(skinCode) : null;
|
||||
if (data) {
|
||||
zrUtil.each(data.linkList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.Link, elem, propConvert);
|
||||
@ -169,50 +169,47 @@ export function parser(data, skinCode) {
|
||||
}
|
||||
|
||||
// 同步绘制数据到原始数据
|
||||
export function updateForList(model, map, liststr) {
|
||||
const list = map[liststr];
|
||||
export function updateForList(model, state, liststr) {
|
||||
const list = state.map[liststr];
|
||||
if (list && list instanceof Array) {
|
||||
const i = list.findIndex(elem => { return elem.code == model.code; });
|
||||
if (model._dispose) {
|
||||
i >= 0 && list.splice(i, 1);
|
||||
i >= 0 && list.splice(i, 1); // 删除
|
||||
} else if (!list[i]) {
|
||||
list.push(deepClone(model));
|
||||
list.push(deepClone(model)); // 新增
|
||||
} else if (i >= 0) {
|
||||
// const item = list[i];
|
||||
list[i] = deepClone(model); // item map 数据 model 页面表单数据
|
||||
// Object.keys(model).forEach(key => {
|
||||
// if (key != 'instance') {
|
||||
// item[key] = model[key];
|
||||
// }
|
||||
// });
|
||||
// state.mapDevice[model.code] = deepClone(model);
|
||||
// console.log(list[i], '更新');
|
||||
}
|
||||
} else {
|
||||
map[liststr] = [model];
|
||||
state.map[liststr] = [model];
|
||||
}
|
||||
}
|
||||
|
||||
export function updateMapData(state, model) {
|
||||
const map = state.map;
|
||||
if (map && model) {
|
||||
// const map = state.map;
|
||||
// const mapDevice = state.mapDevice;
|
||||
if (state.map && model) {
|
||||
switch (model._type) {
|
||||
case deviceType.Link: updateForList(model, map, 'linkList'); break;
|
||||
case deviceType.Section: updateForList(model, map, 'sectionList'); break;
|
||||
case deviceType.Switch: updateForList(model, map, 'switchList'); break;
|
||||
case deviceType.Signal: updateForList(model, map, 'signalList'); break;
|
||||
case deviceType.Station: updateForList(model, map, 'stationList'); break;
|
||||
case deviceType.StationStand: updateForList(model, map, 'stationStandList'); break;
|
||||
case deviceType.StationControl: updateForList(model, map, 'stationControlList'); break;
|
||||
case deviceType.StationCounter: updateForList(model, map, 'stationCounterList'); break;
|
||||
case deviceType.ZcControl: updateForList(model, map, 'zcControlList'); break;
|
||||
case deviceType.StationDelayUnlock:updateForList(model, map, 'stationDelayUnlockList'); break;
|
||||
case deviceType.LcControl: updateForList(model, map, 'lcControlList'); break;
|
||||
case deviceType.ButtonControl: updateForList(model, map, 'buttonList'); break;
|
||||
case deviceType.LimitControl: updateForList(model, map, 'tempSpeedLimitList'); break;
|
||||
case deviceType.ImageControl: updateForList(model, map, 'imageControl'); break;
|
||||
case deviceType.Train: updateForList(model, map, 'trainList'); break;
|
||||
case deviceType.TrainWindow: updateForList(model, map, 'trainWindowList'); break;
|
||||
case deviceType.Line: updateForList(model, map, 'lineList'); break;
|
||||
case deviceType.Text: updateForList(model, map, 'textList'); break;
|
||||
case deviceType.Link: updateForList(model, state, 'linkList'); break;
|
||||
case deviceType.Section: updateForList(model, state, 'sectionList'); break;
|
||||
case deviceType.Switch: updateForList(model, state, 'switchList'); break;
|
||||
case deviceType.Signal: updateForList(model, state, 'signalList'); break;
|
||||
case deviceType.Station: updateForList(model, state, 'stationList'); break;
|
||||
case deviceType.StationStand: updateForList(model, state, 'stationStandList'); break;
|
||||
case deviceType.StationControl: updateForList(model, state, 'stationControlList'); break;
|
||||
case deviceType.StationCounter: updateForList(model, state, 'stationCounterList'); break;
|
||||
case deviceType.ZcControl: updateForList(model, state, 'zcControlList'); break;
|
||||
case deviceType.StationDelayUnlock:updateForList(model, state, 'stationDelayUnlockList'); break;
|
||||
case deviceType.LcControl: updateForList(model, state, 'lcControlList'); break;
|
||||
case deviceType.ButtonControl: updateForList(model, state, 'buttonList'); break;
|
||||
case deviceType.LimitControl: updateForList(model, state, 'tempSpeedLimitList'); break;
|
||||
case deviceType.ImageControl: updateForList(model, state, 'imageControl'); break;
|
||||
case deviceType.Train: updateForList(model, state, 'trainList'); break;
|
||||
case deviceType.TrainWindow: updateForList(model, state, 'trainWindowList'); break;
|
||||
case deviceType.Line: updateForList(model, state, 'lineList'); break;
|
||||
case deviceType.Text: updateForList(model, state, 'textList'); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -189,6 +189,7 @@ export default {
|
||||
this.visible = true;
|
||||
const token = getToken() || getDesignToken();
|
||||
getInfo(token).then(response => {
|
||||
debugger;
|
||||
const user = response.data;
|
||||
this.userInfo = {
|
||||
name: user.name,
|
||||
@ -264,7 +265,7 @@ export default {
|
||||
}
|
||||
},
|
||||
async sendMobileCode() {
|
||||
const random = Math.floor((Math.random()*10000)+1);
|
||||
const random = Math.floor((Math.random() * 10000) + 1);
|
||||
const timeCount = Date.parse(new Date()) / 1000;
|
||||
const pass = `${timeCount}${this.nationCode}${this.editInfo.mobile}${random}`;
|
||||
const param = {
|
||||
@ -358,7 +359,7 @@ export default {
|
||||
},
|
||||
async sendPassWordCode() {
|
||||
if (this.userInfo.mobile) {
|
||||
const random = Math.floor((Math.random()*10000)+1);
|
||||
const random = Math.floor((Math.random() * 10000) + 1);
|
||||
const timeCount = Date.parse(new Date()) / 1000;
|
||||
const pass = `${timeCount}${this.nationCodeInit}${this.userInfo.mobile}${random}`;
|
||||
const param = {
|
||||
|
@ -66,7 +66,6 @@ import MapPreview from '@/views/designPlatform/mapPreview';
|
||||
|
||||
import DesignPlatformUser from '@/views/designUser/index';
|
||||
|
||||
// import Replay from '@/views/replay/index';
|
||||
import Package from '@/views/package/index';
|
||||
import PackageDraft from '@/views/package/draft/ruleForm';
|
||||
import PackageDetail from '@/views/package/detail';
|
||||
|
@ -2198,12 +2198,20 @@ export const IbpOperation = {
|
||||
};
|
||||
|
||||
import LangStorage from '@/utils/lang';
|
||||
import Favicon from '@/assets/icon/favicon.png';
|
||||
import FaviconXty from '@/assets/icon/favicon_xty.png';
|
||||
export const loginTitle = {
|
||||
xty: '西安铁路职业技术学院城市轨道交通实训平台',
|
||||
login: LangStorage.getLang() == 'en' ? ' Urban Rail Transit Practical Training Platform' : '城市轨道交通实训平台',
|
||||
design: LangStorage.getLang() == 'en' ? ' Urban Rail Transit Design Platform' : '城市轨道交通设计平台',
|
||||
designxty: '西安铁路职业技术学院城市轨道交通设计平台'
|
||||
};
|
||||
export const ProjectIcon = {
|
||||
xty: FaviconXty,
|
||||
login: Favicon,
|
||||
design: Favicon,
|
||||
designxty: FaviconXty
|
||||
};
|
||||
|
||||
export const ProjectCode = {
|
||||
xty: 'XTY',
|
||||
|
@ -48,8 +48,7 @@ OperateHandler.prototype = {
|
||||
*/
|
||||
validate: function (operate) {
|
||||
// 按钮操作之后,第二步错误操作菜单的情况,需要直接返回
|
||||
if ((this.operates.length && operate.start === true) &&
|
||||
(this.operates[0].type === 'mbm')) {
|
||||
if ((this.operates.length && operate.start === true) && (this.operates[0].type === 'mbm')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
import deviceType from '@/jmap/constant/deviceType';
|
||||
import { parser, updateMapData } from '@/jmap/utils/parser';
|
||||
import Vue from 'vue';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
|
||||
/**
|
||||
* 查询向上受影响的Devices
|
||||
* @param {Object} map
|
||||
@ -199,6 +201,84 @@ function saveMapDeviceDefaultRelations(state) {
|
||||
}
|
||||
}
|
||||
|
||||
function handleOperation(state, models) {
|
||||
const list = [];
|
||||
models.forEach(item => {
|
||||
if (item._dispose) {
|
||||
list.push({ operation: 'del', data: deepAssign({}, state.mapDevice[item.code]) });
|
||||
} else if (state.mapDevice[item.code]) {
|
||||
list.push({ operation: 'edit', data: deepAssign({}, state.mapDevice[item.code]) });
|
||||
} else {
|
||||
list.push({ operation: 'add', data: deepAssign({}, item) });
|
||||
}
|
||||
});
|
||||
// console.log(list, '步骤数据');
|
||||
if (list.length) {
|
||||
if (state.stepData.length >= 15) { // 步骤数据最多储存15步
|
||||
state.stepData.pop();
|
||||
}
|
||||
state.stepData.unshift(list);
|
||||
state.recoverStepData = [];
|
||||
}
|
||||
}
|
||||
|
||||
// 撤销
|
||||
function revocation(state, models) {
|
||||
if (models && models.length) {
|
||||
const list = [];
|
||||
const stepList = [];
|
||||
models.forEach(item => {
|
||||
switch (item.operation) {
|
||||
case 'add': {
|
||||
list.push({ operation: 'del', data: deepAssign({}, state.mapDevice[item.data.code])});
|
||||
stepList.push({...item.data, _dispose: true});
|
||||
break;
|
||||
}
|
||||
case 'del': {
|
||||
list.push({ operation: 'add', data: deepAssign({}, item.data)});
|
||||
stepList.push({...item.data, _dispose: false});
|
||||
break;
|
||||
}
|
||||
case 'edit': {
|
||||
list.push({ operation: 'edit', data: deepAssign({}, state.mapDevice[item.data.code] || item.data)});
|
||||
stepList.push({...item.data, _dispose: false});
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
state.recoverStepData.unshift(list);
|
||||
return stepList;
|
||||
}
|
||||
}
|
||||
// 恢复
|
||||
function recover(state, models) {
|
||||
if (models && models.length) {
|
||||
const list = [];
|
||||
const stepList = [];
|
||||
models.forEach(item => {
|
||||
switch (item.operation) {
|
||||
case 'add': {
|
||||
list.push({ operation: 'del', data: deepAssign({}, state.mapDevice[item.data.code])});
|
||||
stepList.push({...item.data, _dispose: true});
|
||||
break;
|
||||
}
|
||||
case 'del': {
|
||||
list.push({ operation: 'add', data: deepAssign({}, item.data)});
|
||||
stepList.push({...item.data, _dispose: false});
|
||||
break;
|
||||
}
|
||||
case 'edit': {
|
||||
list.push({ operation: 'edit', data: deepAssign({}, state.mapDevice[item.data.code] || item.data)});
|
||||
stepList.push({...item.data, _dispose: false});
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
state.stepData.unshift(list);
|
||||
return stepList;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 实训状态数据
|
||||
*/
|
||||
@ -206,6 +286,8 @@ const map = {
|
||||
namespaced: true,
|
||||
|
||||
state: {
|
||||
stepData: [], // 缓存数据
|
||||
recoverStepData: [], // 缓存恢复数据
|
||||
map: null, // 地图数据
|
||||
dataZoom: {}, // 缩放位置
|
||||
mapDevice: {}, // 解析后的地图数据
|
||||
@ -220,6 +302,12 @@ const map = {
|
||||
mapList: (state) => {
|
||||
return state.mapList;
|
||||
},
|
||||
stepData: (state) => {
|
||||
return state.stepData;
|
||||
},
|
||||
recoverStepData: (state) => {
|
||||
return state.recoverStepData;
|
||||
},
|
||||
map: (state) => {
|
||||
return state.map;
|
||||
},
|
||||
@ -378,6 +466,9 @@ const map = {
|
||||
trainDetails: (state) => {
|
||||
return state.trainDetails;
|
||||
},
|
||||
mapDevice: (state) => {
|
||||
return state.mapDevice;
|
||||
},
|
||||
getDeviceByCode: (state) => (code) => {
|
||||
return state.mapDevice[code];
|
||||
},
|
||||
@ -443,12 +534,14 @@ const map = {
|
||||
state.dataZoom = dataZoom;
|
||||
},
|
||||
mapRender: (state, devices) => {
|
||||
if (devices && devices.length) {
|
||||
if (state.map) {
|
||||
devices.forEach(elem => { updateMapData(state, elem); });
|
||||
}
|
||||
if (Vue.prototype.$jlmap) {
|
||||
Vue.prototype.$jlmap.render(devices);
|
||||
}
|
||||
}
|
||||
},
|
||||
setTrainDetails: (state, details) => {
|
||||
state.trainDetails = details;
|
||||
@ -530,19 +623,7 @@ const map = {
|
||||
setMapDataIdList: ({ state }, data) => {
|
||||
state.mapIdList[`mapDate_${data.mapId}`] = data.mapData;
|
||||
},
|
||||
|
||||
updateMapDevices: ({ commit }, models) => {
|
||||
return new Promise((resolve) => {
|
||||
if (!(models instanceof Array)) {
|
||||
models = [models];
|
||||
}
|
||||
|
||||
commit('mapRender', models);
|
||||
resolve(models);
|
||||
});
|
||||
},
|
||||
|
||||
deleteMapDevices: ({ commit, state }, models) => {
|
||||
updateMapDevices: ({ commit, state }, models) => {
|
||||
return new Promise((resolve) => {
|
||||
if (!(models instanceof Array)) {
|
||||
models = [models];
|
||||
@ -550,16 +631,29 @@ const map = {
|
||||
|
||||
// 查找向上关联需要一起删除的设备
|
||||
const effectedModelList = [];
|
||||
models.forEach((device) => {
|
||||
queryEffectedModels(state.map, device, effectedModelList);
|
||||
models.forEach((model) => {
|
||||
if (model['_dispose']) {
|
||||
queryEffectedModels(state.map, model, effectedModelList);
|
||||
} else {
|
||||
effectedModelList.push(model);
|
||||
}
|
||||
});
|
||||
|
||||
effectedModelList.forEach(elem => { elem['_dispose'] = true; });
|
||||
handleOperation(state, effectedModelList);
|
||||
|
||||
commit('mapRender', effectedModelList);
|
||||
resolve(effectedModelList);
|
||||
});
|
||||
},
|
||||
|
||||
setRevocation({ state, commit }) {
|
||||
commit('mapRender', revocation(state, state.stepData.shift() || [])); // 撤销
|
||||
},
|
||||
|
||||
setRecover({ state, commit }) {
|
||||
commit('mapRender', recover(state, state.recoverStepData.shift() || [])); // 恢复
|
||||
},
|
||||
|
||||
saveMapDeviceDefaultRelations({ state }) {
|
||||
saveMapDeviceDefaultRelations(state);
|
||||
},
|
||||
|
@ -6,7 +6,7 @@ export function getBaseUrl() {
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 杜闪
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
} else {
|
||||
BASE_API = process.env.VUE_APP_BASE_API;
|
||||
|
@ -66,17 +66,6 @@ export default {
|
||||
height() {
|
||||
return this.$store.state.app.height - 260;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
// this.loadInitData();
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
show(lessonId) {
|
||||
|
@ -40,7 +40,7 @@ export default {
|
||||
queryObject: {
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: this.$t('approval.map')+this.$t('global.colon'),
|
||||
label: this.$t('approval.map') + this.$t('global.colon'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
@ -51,7 +51,7 @@ export default {
|
||||
},
|
||||
userName: {
|
||||
type: 'text',
|
||||
label: this.$t('approval.applicant')+this.$t('global.colon')
|
||||
label: this.$t('approval.applicant') + this.$t('global.colon')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -83,7 +83,7 @@ export default {
|
||||
title: this.$t('approval.applyTime'),
|
||||
prop: 'uploadTime',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.handleTime(row.uploadTime); },
|
||||
columnValue: (row) => { return row.uploadTime.replace('T', ' '); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
@ -122,21 +122,12 @@ export default {
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
created() {
|
||||
listPublishMap().then(response=>{
|
||||
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name } });
|
||||
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||
this.queryForm.queryObject.mapId.config.data = this.mapList;
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
goDetail(index, row) {
|
||||
@ -152,7 +143,7 @@ export default {
|
||||
cityCode: row.cityCode,
|
||||
mapId: row.mapId,
|
||||
name: row.name,
|
||||
prdCode: row.prdCode
|
||||
prdId: row.prdId
|
||||
};
|
||||
adminPublishLesson(params, row.id).then(response => {
|
||||
this.loading = false;
|
||||
@ -168,10 +159,6 @@ export default {
|
||||
this.dialogFormVisible = true;
|
||||
this.rejectId = row.id;
|
||||
},
|
||||
handleTime(time) {
|
||||
const timeList = time.split('T');
|
||||
return timeList[0] + ' ' +timeList[1];
|
||||
},
|
||||
doClose() {
|
||||
this.$refs.queryListPage.refresh(true);
|
||||
},
|
||||
@ -194,7 +181,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
rejectCancel() {
|
||||
this.dialogFormVisible = false;
|
||||
this.rejectId = '';
|
||||
|
@ -1,20 +1,19 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<run-plan-operate ref="applyPassed" :title="$t('approval.passedRunPlan')" @reloadTable="reloadTable" type="applyPassed" @create="handleConfirmPass" />
|
||||
<run-plan-operate ref="applyReject" :title="$t('approval.rejectRunPlan')" @reloadTable="reloadTable" type="applyReject" @create="handleConfirmReject" />
|
||||
<run-plan-operate ref="applyPassed" :title="$t('approval.passedRunPlan')" type="applyPassed" @reloadTable="reloadTable" @create="handleConfirmPass" />
|
||||
<run-plan-operate ref="applyReject" :title="$t('approval.rejectRunPlan')" type="applyReject" @reloadTable="reloadTable" @create="handleConfirmReject" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import RunPlanOperate from './operate';
|
||||
import { reviewRunPlanList, publishRunPlan, rejectRunPlan, previewRunPlan } from '@/api/designPlatform';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
// import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
export default {
|
||||
name: 'ScriptApproval',
|
||||
name: 'RunPlanApproval',
|
||||
components: {
|
||||
RunPlanOperate
|
||||
},
|
||||
@ -102,16 +101,8 @@ export default {
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
reloadTable() {
|
||||
|
@ -1,95 +1,93 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
|
||||
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doCreate">{{$t('global.confirm')}}</el-button>
|
||||
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
|
||||
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
export default {
|
||||
name: 'ScriptOperate',
|
||||
props: {
|
||||
title: {type:String, required:true},
|
||||
type: {type:String, required:true}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
formModel:{
|
||||
runPlanName:'',
|
||||
id:'',
|
||||
explanation:'',
|
||||
explanation:''
|
||||
},
|
||||
isShow: false,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
title: String,
|
||||
type:String,
|
||||
isShow: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
form() {
|
||||
let form={};
|
||||
if(this.type=="applyPassed"){
|
||||
let form = {};
|
||||
if (this.type == 'applyPassed') {
|
||||
form = {
|
||||
labelWidth: '150px',
|
||||
items: [
|
||||
{ prop: 'runPlanName', label: this.$t('approval.runPlanName'), type: 'text', required: true},
|
||||
{ prop: 'runPlanName', label: this.$t('approval.runPlanName'), type: 'text', required: true}
|
||||
]
|
||||
}
|
||||
}
|
||||
else{
|
||||
};
|
||||
} else {
|
||||
form = {
|
||||
labelWidth: '150px',
|
||||
items: [
|
||||
|
||||
{ prop: 'explanation', label: this.$t('approval.explanation'), type: 'textarea', required: true},
|
||||
{ prop: 'explanation', label: this.$t('approval.explanation'), type: 'textarea', required: true}
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
return form
|
||||
return form;
|
||||
},
|
||||
rules() {
|
||||
let crules ={};
|
||||
if(this.type=="applyPassed"){
|
||||
crules={
|
||||
let crules = {};
|
||||
if (this.type == 'applyPassed') {
|
||||
crules = {
|
||||
runPlanName: [
|
||||
{ required: true, message: this.$t('approval.inputRunPlanName'), trigger: 'blur' },
|
||||
{ required: true, message: this.$t('approval.inputRunPlanName'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
else{
|
||||
crules={
|
||||
};
|
||||
} else {
|
||||
crules = {
|
||||
explanation:[
|
||||
{ required: true, message: this.$t('approval.inputRejectExplanation'), trigger: 'blur',max:200 },
|
||||
{ required: true, message: this.$t('approval.inputRejectExplanation'), trigger: 'blur', max:200 }
|
||||
]
|
||||
};
|
||||
}
|
||||
return crules;
|
||||
}
|
||||
return crules
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
doShow(row) {
|
||||
if(this.type=="applyPassed"){
|
||||
this.formModel.runPlanName=row.name;
|
||||
if (this.type == 'applyPassed') {
|
||||
this.formModel.runPlanName = row.name;
|
||||
}
|
||||
this.formModel.id=row.id;
|
||||
this.dialogVisible = true
|
||||
this.formModel.id = row.id;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
doCreate() {
|
||||
let self = this
|
||||
const self = this;
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
self.$emit('create', Object.assign({}, this.formModel));
|
||||
self.doClose()
|
||||
})
|
||||
self.doClose();
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.$refs.dataform.resetForm();
|
||||
this.isShow = false;
|
||||
this.dialogVisible = false
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .el-dialog--center .el-dialog__body{
|
||||
|
@ -1,24 +1,23 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<script-operate ref='applyReject' @reloadTable="reloadTable" @create="handleConfirmReject" :title="$t('approval.rejectScript')">
|
||||
</script-operate>
|
||||
<script-operate ref="applyReject" :title="$t('approval.rejectScript')" @reloadTable="reloadTable" @create="handleConfirmReject" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { scriptDraftRecordNotify } from '@/api/simulation';
|
||||
import ScriptOperate from './operate';
|
||||
import { reviewScriptList,publishScript,rejectScript } from '@/api/designPlatform';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
export default {
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { scriptDraftRecordNotify } from '@/api/simulation';
|
||||
import ScriptOperate from './operate';
|
||||
import { reviewScriptList, publishScript, rejectScript } from '@/api/designPlatform';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
export default {
|
||||
name: 'ScriptApproval',
|
||||
components: {
|
||||
ScriptOperate
|
||||
},
|
||||
data() {
|
||||
return{
|
||||
return {
|
||||
allMapList:[],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
@ -61,7 +60,7 @@
|
||||
prop: 'mapId ',
|
||||
width:250,
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.mapId , this.mapList, ['value', 'label']); },
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
@ -76,7 +75,7 @@
|
||||
title: this.$t('approval.applyTime'),
|
||||
prop: 'uploadTime',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return row.uploadTime.replace("T"," ")},
|
||||
columnValue: (row) => { return row.uploadTime.replace('T', ' '); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
@ -103,18 +102,10 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
created(){
|
||||
},
|
||||
mounted(){
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
beforeDestroy(){
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
reloadTable() {
|
||||
@ -122,17 +113,14 @@
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
goDetail() {
|
||||
this.$router.push({path:``});
|
||||
},
|
||||
async loadInitData() {
|
||||
try {
|
||||
// 获取地图
|
||||
this.mapList = [];
|
||||
const res = await listPublishMap();
|
||||
this.allMapList=res.data;
|
||||
this.mapList = res.data.map(elem => { return { value: elem.id, label: elem.name } });
|
||||
this.queryForm.queryObject.mapId.config.data=this.mapList;
|
||||
this.allMapList = res.data;
|
||||
this.mapList = res.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||
this.queryForm.queryObject.mapId.config.data = this.mapList;
|
||||
} catch (error) {
|
||||
console.error(error, '获取发布地图');
|
||||
}
|
||||
@ -140,40 +128,40 @@
|
||||
queryFunction(params) {
|
||||
return reviewScriptList(params);
|
||||
},
|
||||
applyPassed(index,row){
|
||||
applyPassed(index, row) {
|
||||
this.handleConfirmPass(row);
|
||||
},
|
||||
applyReject(index,row){
|
||||
applyReject(index, row) {
|
||||
this.$refs.applyReject.doShow(row);
|
||||
},
|
||||
scriptPreview(index,row){
|
||||
let mapInfo=this.allMapList.find(elem=>{return elem.id==row.mapId});
|
||||
scriptPreview(index, row) {
|
||||
const mapInfo = this.allMapList.find(elem=>{ return elem.id == row.mapId; });
|
||||
scriptDraftRecordNotify(row.id).then(resp => {
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id,skinCode:mapInfo.skinCode,try:0};
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, skinCode:mapInfo.skinCode, try:0};
|
||||
this.$router.push({ path: `${UrlConfig.design.display}/demon`, query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
||||
});
|
||||
},
|
||||
handleConfirmReject(data){
|
||||
rejectScript(data.id,data).then(resp => {
|
||||
handleConfirmReject(data) {
|
||||
rejectScript(data.id, data).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$message.success(this.$t('approval.rejectScriptSuccess'));
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('approval.rejectScriptFailed')}: ${error.message}`);
|
||||
})
|
||||
});
|
||||
},
|
||||
handleConfirmPass(data){
|
||||
handleConfirmPass(data) {
|
||||
publishScript(data.id).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$message.success(this.$t('approval.passedScriptSuccess'));
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('approval.passedScriptFailed')}: ${error.message}`);
|
||||
})
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/
|
||||
|
@ -1,68 +1,67 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
|
||||
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doCreate">{{$t('global.confirm')}}</el-button>
|
||||
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
|
||||
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
export default {
|
||||
name: 'ScriptOperate',
|
||||
props: {
|
||||
title:{type:String, required:true}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
formModel:{
|
||||
id:'',
|
||||
explanation:'',
|
||||
explanation:''
|
||||
}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
title: String,
|
||||
type:String,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
form() {
|
||||
let form={
|
||||
const form = {
|
||||
labelWidth: '150px',
|
||||
items: [
|
||||
|
||||
{ prop: 'explanation', label: this.$t('approval.explanation'), type: 'textarea', required: true},
|
||||
{ prop: 'explanation', label: this.$t('approval.explanation'), type: 'textarea', required: true}
|
||||
]
|
||||
}
|
||||
return form
|
||||
};
|
||||
return form;
|
||||
},
|
||||
rules() {
|
||||
let crules ={
|
||||
const crules = {
|
||||
explanation:[
|
||||
{ required: true, message: this.$t('approval.inputRejectExplanation'), trigger: 'blur',max:200 },
|
||||
{ required: true, message: this.$t('approval.inputRejectExplanation'), trigger: 'blur', max:200 }
|
||||
]
|
||||
};
|
||||
return crules;
|
||||
}
|
||||
return crules
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
doShow(row) {
|
||||
this.formModel.id=row.id;
|
||||
this.dialogVisible = true
|
||||
this.formModel.id = row.id;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
doCreate() {
|
||||
let self = this
|
||||
const self = this;
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
self.$emit('create', Object.assign({}, this.formModel));
|
||||
self.doClose()
|
||||
})
|
||||
self.doClose();
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.$refs.dataform.resetForm();
|
||||
this.dialogVisible = false
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .el-dialog--center .el-dialog__body{
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="600px" :before-close="handleClose" center>
|
||||
<div>
|
||||
<el-alert title="一次只能领取一个权限,领到的权限是专用权限,不可再次分发" type="warning" show-icon :closable="closable" style="margin-bottom:10px" />
|
||||
<el-alert :title="$t('permission.distributeTips')" type="warning" show-icon :closable="closable" style="margin-bottom:10px" />
|
||||
<el-form ref="distributeForm" :rules="rules" :model="formModel">
|
||||
<el-form-item key="date" prop="date" :label="this.$t('global.selectionTime')" :required="false" label-width="100px">
|
||||
<el-form-item key="date" prop="date" :label="this.$t('global.selectionTime')" :required="false" label-width="140px">
|
||||
<el-date-picker
|
||||
v-model="formModel.date"
|
||||
align="right"
|
||||
@ -22,33 +22,33 @@
|
||||
>
|
||||
<el-table-column
|
||||
prop="permissionName"
|
||||
label="权限名称"
|
||||
:label="$t('permission.permissionName')"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="amount"
|
||||
label="权限总数"
|
||||
:label="$t('permission.permissionTotal')"
|
||||
align="center"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="remains"
|
||||
label="剩余权限"
|
||||
:label="$t('permission.permissionRemains')"
|
||||
align="center"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="isPackage"
|
||||
label="是否万能"
|
||||
:label="$t('permission.isPackage')"
|
||||
align="center"
|
||||
width="80"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.isPackage?'是':'否' }}
|
||||
{{ scope.row.isPackage? $t('global.yes'):$t('global.no') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="分发权限数量"
|
||||
:label="$t('permission.numOfDistribute') "
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
@ -87,7 +87,7 @@ export default {
|
||||
endTime: '',
|
||||
date: ''
|
||||
},
|
||||
prdCode: '',
|
||||
prdId: '',
|
||||
mapId: '',
|
||||
numberMessage: '',
|
||||
PermissionType: '',
|
||||
@ -149,10 +149,9 @@ export default {
|
||||
changeSelectDate() {
|
||||
if (this.formModel.date) {
|
||||
this.isLoading = true;
|
||||
const data = {mapId:this.mapId, proCode:this.prdCode, startTime:this.formModel.date[0], endTime:this.formModel.date[1]};
|
||||
const data = {mapId:this.mapId, prdId:this.prdId, startTime:this.formModel.date[0], endTime:this.formModel.date[1], type:this.PermissionType};
|
||||
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
||||
data.lessonId = this.formModel.lessonId;
|
||||
data.type = this.PermissionType;
|
||||
}
|
||||
getAvailableUserPermission(data).then(res=>{
|
||||
this.isLoading = false;
|
||||
@ -176,7 +175,7 @@ export default {
|
||||
if (data) {
|
||||
this.formModel.lessonId = data.id;
|
||||
this.formModel.lessonName = data.name;
|
||||
this.prdCode = data.prdCode;
|
||||
this.prdId = data.prdId;
|
||||
this.mapId = data.mapId;
|
||||
this.PermissionType = data.PermissionType;
|
||||
this.setTotalMax();
|
||||
@ -185,16 +184,24 @@ export default {
|
||||
handleSure() {
|
||||
this.$refs['distributeForm'].validate((info) => {
|
||||
if (info) {
|
||||
this.isLoading = true;
|
||||
const model = {
|
||||
startTime: this.formModel.date[0],
|
||||
endTime: this.formModel.date[1],
|
||||
userPermissionAndAmountVOList:[],
|
||||
distribute: false
|
||||
};
|
||||
let count = 0;
|
||||
this.formModel.permissionList.forEach(data=>{
|
||||
if (data.chooseNumber > 0) {
|
||||
count++;
|
||||
}
|
||||
model.userPermissionAndAmountVOList.push({'userPermissionId':data.id, 'amount':data.chooseNumber});
|
||||
});
|
||||
if (count <= 0) {
|
||||
this.$messageBox( this.$t('error.permissionAtLeast'));
|
||||
return false;
|
||||
}
|
||||
this.isLoading = true;
|
||||
// 权限分发请求
|
||||
givePermission(model).then(response => {
|
||||
this.isLoading = false;
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="600px" :before-close="handleClose" center>
|
||||
<div>
|
||||
<el-alert title="一次可以领取多个权限,领到的权限可以继续转赠" type="warning" show-icon :closable="closable" style="margin-bottom:10px" />
|
||||
<el-alert :title="$t('permission.transferTips')" type="warning" show-icon :closable="closable" style="margin-bottom:10px" />
|
||||
<el-form ref="transferForm" :rules="rules" :model="formModel">
|
||||
<el-form-item key="date" prop="date" :label="this.$t('global.selectionTime')" :required="false" label-width="100px">
|
||||
<el-form-item key="date" prop="date" :label="this.$t('global.selectionTime')" :required="false" label-width="140px">
|
||||
<el-date-picker
|
||||
v-model="formModel.date"
|
||||
align="right"
|
||||
@ -22,33 +22,33 @@
|
||||
>
|
||||
<el-table-column
|
||||
prop="permissionName"
|
||||
label="权限名称"
|
||||
:label="$t('permission.permissionName')"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="amount"
|
||||
label="权限总数"
|
||||
:label="$t('permission.permissionTotal')"
|
||||
align="center"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="remains"
|
||||
label="剩余权限"
|
||||
:label="$t('permission.permissionRemains')"
|
||||
align="center"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="isPackage"
|
||||
label="是否万能"
|
||||
:label="$t('permission.isPackage')"
|
||||
align="center"
|
||||
width="80"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.isPackage?'是':'否' }}
|
||||
{{ scope.row.isPackage? $t('global.yes'):$t('global.no') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="转赠权限数量"
|
||||
:label="$t('permission.numOfTransfer')"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
@ -87,7 +87,7 @@ export default {
|
||||
endTime: '',
|
||||
date: ''
|
||||
},
|
||||
prdCode: '',
|
||||
prdId: '',
|
||||
mapId: '',
|
||||
numberMessage: '',
|
||||
PermissionType: '',
|
||||
@ -149,10 +149,9 @@ export default {
|
||||
changeSelectDate() {
|
||||
if (this.formModel.date) {
|
||||
this.isLoading = true;
|
||||
const data = {mapId:this.mapId, proCode:this.prdCode, startTime:`${this.formModel.date[0]} 00:00:00`, endTime:`${this.formModel.date[1]} 23:59:59`};
|
||||
const data = {mapId:this.mapId, prdId:this.prdId, startTime:`${this.formModel.date[0]} 00:00:00`, endTime:`${this.formModel.date[1]} 23:59:59`, type:this.PermissionType};
|
||||
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
||||
data.lessonId = this.formModel.lessonId;
|
||||
data.type = this.PermissionType;
|
||||
}
|
||||
getAvailableUserPermission(data).then(res=>{
|
||||
this.isLoading = false;
|
||||
@ -176,7 +175,7 @@ export default {
|
||||
if (data) {
|
||||
this.formModel.lessonId = data.id;
|
||||
this.formModel.lessonName = data.name;
|
||||
this.prdCode = data.prdCode;
|
||||
this.prdId = data.prdId;
|
||||
this.mapId = data.mapId;
|
||||
this.PermissionType = data.PermissionType;
|
||||
this.setTotalMax();
|
||||
@ -185,16 +184,24 @@ export default {
|
||||
handleSure() {
|
||||
this.$refs['transferForm'].validate((info) => {
|
||||
if (info) {
|
||||
this.isLoading = true;
|
||||
const model = {
|
||||
startTime:`${this.formModel.date[0]} 00:00:00`,
|
||||
endTime:`${this.formModel.date[1]} 23:59:59`,
|
||||
userPermissionAndAmountVOList:[],
|
||||
distribute: true
|
||||
};
|
||||
let count = 0;
|
||||
this.formModel.permissionList.forEach(data=>{
|
||||
if (data.chooseNumber > 0) {
|
||||
count++;
|
||||
}
|
||||
model.userPermissionAndAmountVOList.push({'userPermissionId':data.id, 'amount':data.chooseNumber});
|
||||
});
|
||||
if (count <= 0) {
|
||||
this.$messageBox( this.$t('error.permissionAtLeast'));
|
||||
return false;
|
||||
}
|
||||
this.isLoading = true;
|
||||
// 转增请求
|
||||
givePermission(model).then(response => {
|
||||
this.isLoading = false;
|
||||
@ -212,35 +219,6 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
// this.$refs.dataform.validateForm(() => {
|
||||
// const model = {
|
||||
// startTime: `${this.formModel.date[0]} 00:00:00`,
|
||||
// endTime: `${this.formModel.date[1]} 23:59:59`,
|
||||
// amount: this.formModel.total,
|
||||
// permissionType: this.PermissionType
|
||||
// };
|
||||
// if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
||||
// model['lessonId'] = this.formModel.lessonId;
|
||||
// model['mapId'] = this.mapId;
|
||||
// model['prdCode'] = this.prdCode;
|
||||
// } else if (this.PermissionType == PermissionType.SIMULATION) {
|
||||
// model['mapId'] = this.mapId;
|
||||
// model['prdCode'] = this.prdCode;
|
||||
// }
|
||||
// // 转增
|
||||
// permissionTurnAdd(model).then(response => {
|
||||
// const url = response.data;
|
||||
// this.$emit('QrCodeShow', {
|
||||
// url: url,
|
||||
// title: this.$t('global.transferQrcode')
|
||||
// });
|
||||
// this.dialogVisible = false;
|
||||
// this.$emit('initLoadPage');
|
||||
// this.handleClose();
|
||||
// }).catch(() => {
|
||||
// this.$messageBox(this.$t('error.getTransferQrcodeFailed'));
|
||||
// });
|
||||
// });
|
||||
},
|
||||
close() {
|
||||
this.dialogVisible = false;
|
||||
|
@ -101,7 +101,7 @@ export default {
|
||||
};
|
||||
if (this.$route.query.permissionType != '04') {
|
||||
data['mapId'] = this.$route.query.mapId;
|
||||
data['prdCode'] = this.$route.query.prdCode;
|
||||
data['prdId'] = this.$route.query.prdId;
|
||||
data['lessonId'] = this.$route.query.lessonId;
|
||||
}
|
||||
getCommodityDetailByParams(data).then(response => {
|
||||
@ -127,7 +127,7 @@ export default {
|
||||
this.active = 0;
|
||||
const type = this.$route.query.permissionType;
|
||||
if (type === PermissionType.LESSON) {
|
||||
this.$router.replace({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.query.subSystem}`, query: {lessonId: this.$route.query.lessonId, mapId: this.$route.query.mapId, prdCode: this.$route.query.prdCode}});
|
||||
this.$router.replace({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.query.subSystem}`, query: {lessonId: this.$route.query.lessonId, mapId: this.$route.query.mapId, prdId: this.$route.query.prdId}});
|
||||
} else if (type === PermissionType.EXAM) {
|
||||
this.$router.replace({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.query.subSystem}`});
|
||||
} else if (type === PermissionType.SCREEN) {
|
||||
|
@ -48,7 +48,7 @@ export default {
|
||||
loading: true,
|
||||
buttonLoading: false,
|
||||
currentLessonId: '',
|
||||
currentPrdCode: '',
|
||||
currentPrdId: '',
|
||||
productList: [],
|
||||
courseModel: {
|
||||
id: '',
|
||||
@ -57,7 +57,7 @@ export default {
|
||||
skinCode: '',
|
||||
remarks: '',
|
||||
prdType: '',
|
||||
prdCode: '',
|
||||
prdId: '',
|
||||
pmsList: []
|
||||
},
|
||||
jointShow: false,
|
||||
@ -108,11 +108,11 @@ export default {
|
||||
skinCode: resp.data.mapPrd.skinCode,
|
||||
remarks: resp.data.mapPrd.remarks,
|
||||
prdType: resp.data.mapPrd.prdType,
|
||||
prdCode: resp.data.mapPrd.code,
|
||||
prdId: resp.data.mapPrd.id,
|
||||
pmsList: resp.data.permissionList || [],
|
||||
PermissionType: PermissionType.SIMULATION
|
||||
};
|
||||
this.currentPrdCode = resp.data.mapPrd.code;
|
||||
this.currentPrdId = resp.data.mapPrd.id;
|
||||
if (resp.data.mapPrd.prdType === '03') {
|
||||
this.getJointTrainingList();
|
||||
}
|
||||
@ -121,7 +121,7 @@ export default {
|
||||
this.tryUser = 1;
|
||||
const paras = {
|
||||
mapId: this.mapId,
|
||||
prdCode: this.courseModel.prdCode,
|
||||
prdId: this.courseModel.prdId,
|
||||
permissionType: PermissionType.SIMULATION
|
||||
};
|
||||
|
||||
@ -166,7 +166,7 @@ export default {
|
||||
this.buttonLoading = true;
|
||||
const param = {
|
||||
mapId: Number(this.mapId),
|
||||
prdCode: this.courseModel.prdCode
|
||||
prdId: this.courseModel.prdId
|
||||
};
|
||||
const res = await postCreateRoom(param);
|
||||
if (res && res.code == 200) {
|
||||
@ -212,9 +212,9 @@ export default {
|
||||
},
|
||||
jumpScheduling() {
|
||||
this.buttonLoading = true;
|
||||
const data = { mapId: this.courseModel.mapId, code: this.currentPrdCode };
|
||||
const data = { mapId: this.courseModel.mapId, prdId: this.currentPrdId };
|
||||
schedulingNotify(data).then(resp => {
|
||||
const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdCode, goodsId: this.goodsId, try: this.tryUser };
|
||||
const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdId, goodsId: this.goodsId, try: this.tryUser };
|
||||
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
@ -223,10 +223,10 @@ export default {
|
||||
});
|
||||
},
|
||||
jump() {
|
||||
const data = { mapId: this.courseModel.mapId, code: this.currentPrdCode };
|
||||
const data = { mapId: this.courseModel.mapId, mapPrdId: this.currentPrdId };
|
||||
this.buttonLoading = true;
|
||||
simulationNotify(data).then(resp => {
|
||||
const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdCode, goodsId: this.goodsId, try: this.tryUser };
|
||||
const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdId, goodsId: this.goodsId, try: this.tryUser };
|
||||
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
@ -238,7 +238,7 @@ export default {
|
||||
this.buttonLoading = true;
|
||||
this.$router.push({
|
||||
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`,
|
||||
query: { permissionType: PermissionType.SIMULATION, prdCode: this.courseModel.prdCode, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
|
||||
query: { permissionType: PermissionType.SIMULATION, prdId: this.courseModel.prdId, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
|
||||
});
|
||||
},
|
||||
transfer() {
|
||||
|
@ -3,10 +3,10 @@
|
||||
<div class="clearfix">
|
||||
<span>{{ $t('map.publishedMapList') }}</span>
|
||||
</div>
|
||||
<div class="text_item" style="height: calc(100% - 47px);">
|
||||
<div class="text_item">
|
||||
<filter-city v-if="project==='design'" ref="filerCity" filter-empty :query-function="queryFunction" :local-param-name="localParamName" @filterSelectChange="refresh" />
|
||||
<el-input v-if="project==='design'" v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
<div style="height: calc(100% - 76px);">
|
||||
<div class="tree_mian_box">
|
||||
<el-tree ref="tree" class="tree_box" :data="treeList" node-key="id" :props="defaultProps" highlight-current :span="22" :filter-node-method="filterNode" @node-click="clickEvent">
|
||||
<span slot-scope="{ node:tnode, data }">
|
||||
<span class="el-icon-tickets" :style="{color: data.valid ? 'green':''}" />
|
||||
@ -52,11 +52,6 @@ export default {
|
||||
},
|
||||
node: {
|
||||
},
|
||||
point: {
|
||||
x: 0,
|
||||
y: 0
|
||||
},
|
||||
editModel: {},
|
||||
localParamName: 'publish_cityCode'
|
||||
};
|
||||
},
|
||||
@ -140,14 +135,13 @@ export default {
|
||||
cityCode: elem.cityCode
|
||||
}
|
||||
];
|
||||
this.isAdministrator() ? elem.children.push({id: '2', name: this.$t('designPlatform.lessonDesign'), type: 'lessonDesign', mapId: elem.id, skinCode: elem.skinCode, cityCode: elem.cityCode}) : '';
|
||||
this.isAdministrator() ? elem.children.push({id: '2', name: this.$t('designPlatform.lessonDesign'), type: 'lessonDesign', mapId: elem.id, cityCode: elem.cityCode}) : '';
|
||||
elem.children.push(
|
||||
{
|
||||
id: '3',
|
||||
name: this.$t('designPlatform.scriptDesign'),
|
||||
type: 'scriptDesign',
|
||||
mapId: elem.id,
|
||||
skinCode: elem.skinCode,
|
||||
cityCode: elem.cityCode
|
||||
// code:elem.children.find(n => { return n.name.includes("行调")})
|
||||
});
|
||||
@ -197,6 +191,12 @@ export default {
|
||||
color: #3ea726;
|
||||
}
|
||||
}
|
||||
.text_item{
|
||||
height: calc(100% - 47px);
|
||||
.tree_mian_box{
|
||||
height: calc(100% - 76px);
|
||||
}
|
||||
}
|
||||
|
||||
.map-list-main{
|
||||
text-align:left;
|
||||
|
@ -1,11 +1,8 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div class="home-box" :style="{height: height+'px'}">
|
||||
<div class="joylink-card">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<div class="content_box">
|
||||
<h1 class="title">
|
||||
城市轨道交通设计平台
|
||||
</h1>
|
||||
<h1 class="title">城市轨道交通设计平台</h1>
|
||||
<div class="card-box">
|
||||
<el-carousel :interval="4000" type="card" height="380px">
|
||||
<el-carousel-item v-for="(item, index) in listImg" :key="index">
|
||||
@ -17,7 +14,6 @@
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -41,11 +37,6 @@ export default {
|
||||
{ src: home6 }
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
height() {
|
||||
return this.$store.state.app.height - 93;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -55,12 +46,10 @@ export default {
|
||||
/deep/ .el-carousel {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.home-box {
|
||||
float: left;
|
||||
width: 100%;
|
||||
.joylink-card{
|
||||
height: 100%;
|
||||
font-family: 'Microsoft YaHei';
|
||||
|
||||
overflow: hidden;
|
||||
.content_box{
|
||||
padding: 0 100px 15px;
|
||||
}
|
||||
|
@ -72,13 +72,11 @@ export default {
|
||||
resize() {
|
||||
this.widthLeft = Number(localStore.get('LeftWidth')) || this.widthLeft;
|
||||
const width = this.$store.state.app.width - 521 - this.widthLeft;
|
||||
// const height = this.$store.state.app.height - 90;
|
||||
this.$store.dispatch('config/resize', { width: width });
|
||||
},
|
||||
setMapResize(LeftWidth) {
|
||||
this.currentWidth = this.$store.state.app.width - this.widthLeft;
|
||||
const widths = this.$store.state.app.width - 521 - LeftWidth;
|
||||
// const heights = this.$store.state.app.height - 90;
|
||||
this.$store.dispatch('config/resize', { width: widths });
|
||||
}
|
||||
|
||||
|
@ -44,23 +44,12 @@ export default {
|
||||
this.initLoadData();
|
||||
});
|
||||
},
|
||||
// '$store.state.map.mapViewLoadedCount': function (val) {
|
||||
// // this.subscribe();
|
||||
// debugger;
|
||||
// this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
// },
|
||||
'$store.state.app.windowSizeCount': function() {
|
||||
this.setWindowSize();
|
||||
}
|
||||
},
|
||||
async beforeDestroy() {
|
||||
// await this.clearAllTimer();
|
||||
// if (!this.isReplay) {
|
||||
// await this.quit();
|
||||
// }
|
||||
// await this.$store.dispatch('training/reset');
|
||||
await this.$store.dispatch('map/mapClear');
|
||||
// EventBus.$off('clearCheckLogin');
|
||||
},
|
||||
async mounted() {
|
||||
await this.setWindowSize();
|
||||
@ -103,7 +92,6 @@ export default {
|
||||
const width = this.$store.state.app.width - (this.widthLeft || 450);
|
||||
const height = this.height;
|
||||
this.$store.dispatch('config/resize', { width, height });
|
||||
// this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -3,9 +3,9 @@
|
||||
<div class="clearfix">
|
||||
<span>{{ $t('map.myMapList') }}</span>
|
||||
</div>
|
||||
<div class="text_item" style="height: calc(100% - 47px);">
|
||||
<div class="text_item">
|
||||
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
<div style="height: calc(100% - 89px); overflow-y: auto;">
|
||||
<div class="tree_box">
|
||||
<el-tree ref="tree" :data="treeList" node-key="id" :props="defaultProps" highlight-current :span="22" :filter-node-method="filterNode" @node-click="clickEvent" @node-contextmenu="showContextMenu">
|
||||
<span slot-scope="{ node:tnode, data }">
|
||||
<span class="el-icon-tickets" :style="{color: data.valid ? 'green':''}" />
|
||||
@ -36,7 +36,6 @@ import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { postBuildMapImport, listMap } from '@/api/jmap/mapdraft';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { removeSessionStorage } from '@/utils/auth';
|
||||
import localStore from 'storejs';
|
||||
import MapOperateMenu from './mapmanage/operateMenu';
|
||||
|
||||
export default {
|
||||
@ -62,9 +61,6 @@ export default {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
},
|
||||
node: {
|
||||
},
|
||||
heightUp: 450,
|
||||
point: {
|
||||
x: 0,
|
||||
y: 0
|
||||
@ -74,11 +70,11 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
role() {
|
||||
return this.$store.state.user.roles.includes('04') ||
|
||||
this.$store.state.user.roles.includes('05') ||
|
||||
this.$store.state.user.roles.includes('01');
|
||||
}
|
||||
// role() {
|
||||
// return this.$store.state.user.roles.includes('04') ||
|
||||
// this.$store.state.user.roles.includes('05') ||
|
||||
// this.$store.state.user.roles.includes('01');
|
||||
// }
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
@ -89,7 +85,6 @@ export default {
|
||||
removeSessionStorage('demonList');
|
||||
},
|
||||
mounted() {
|
||||
this.heightUp = Number(localStore.get('upHeight') ? localStore.get('upHeight') : (this.height) / 2);
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
@ -106,8 +101,6 @@ export default {
|
||||
try {
|
||||
const res = await listMap();
|
||||
res.data && res.data.forEach(elem=>{
|
||||
// if(elem.children)
|
||||
// {
|
||||
elem.type = 'map';
|
||||
elem.children = [
|
||||
{
|
||||
@ -127,7 +120,6 @@ export default {
|
||||
skinCode: elem.skinCode
|
||||
}
|
||||
];
|
||||
// }
|
||||
});
|
||||
|
||||
this.treeData = res.data;
|
||||
@ -165,8 +157,6 @@ export default {
|
||||
this.editModel = obj;
|
||||
this.editModel.skinCode = obj.skinCode;
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
|
||||
} else {
|
||||
// 关掉右键操作
|
||||
}
|
||||
},
|
||||
jlmap3d() {
|
||||
@ -212,8 +202,12 @@ export default {
|
||||
height: 47px;
|
||||
line-height: 47px;
|
||||
}
|
||||
.text_item{
|
||||
height: calc(100% - 47px);
|
||||
.tree_box{
|
||||
height: 100%;
|
||||
height: calc(100% - 89px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
.buttonList{
|
||||
padding: 8px 0px 8px 0px;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="app-wrapper" style="height: 100%;">
|
||||
<map-create ref="mapCreate" :skin-code="skinCode" @refresh="refresh1" @editmap="handleNodeClick" />
|
||||
<div class="app-wrapper">
|
||||
<map-create ref="mapCreate" :skin-code="skinCode" @refresh="refresh1" />
|
||||
<div v-show="listShow" class="examList" :style="{width: widthLeft+'px'}">
|
||||
<demon-list ref="demonList" :width="widthLeft" @createMap="createMap" />
|
||||
</div>
|
||||
@ -19,7 +19,6 @@ import { launchFullscreen } from '@/utils/screen';
|
||||
import localStore from 'storejs';
|
||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||
import MapCreate from './mapmanage/create';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
|
||||
export default {
|
||||
name: 'DesignPlatform',
|
||||
@ -71,38 +70,12 @@ export default {
|
||||
drapWidth(width) {
|
||||
this.widthLeft = Number(width);
|
||||
},
|
||||
|
||||
createMap() {
|
||||
this.$refs.mapCreate.show();
|
||||
},
|
||||
|
||||
refresh1() {
|
||||
this.$refs.demonList.loadInitData();
|
||||
},
|
||||
|
||||
getSkinCode(node) {
|
||||
let next = node;
|
||||
while (next) {
|
||||
if (next.data && next.data.type == 'skin') {
|
||||
this.skinCode = next.data.id;
|
||||
break;
|
||||
}
|
||||
next = next.parent;
|
||||
}
|
||||
},
|
||||
handleNodeClick(obj, node) {
|
||||
this.getSkinCode(node);
|
||||
if (obj && obj.type == 'map') {
|
||||
this.editModel = obj;
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
||||
this.mapSelected({ view: 'draft' });
|
||||
}
|
||||
},
|
||||
mapSelected(data) {
|
||||
if (data && this.editModel) {
|
||||
this.$router.push({ path: `${UrlConfig.map.draft}/${this.editModel.id}/${data.view}`, query: { name: this.editModel.name } });
|
||||
}
|
||||
},
|
||||
resize() {
|
||||
this.widthLeft = Number(localStore.get('LeftWidth')) || this.widthLeft;
|
||||
const width = this.$store.state.app.width - 521 - this.widthLeft;
|
||||
@ -114,7 +87,6 @@ export default {
|
||||
const heights = this.$store.state.app.height - 90;
|
||||
this.$store.dispatch('config/resize', { width: widths, height: heights });
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -43,16 +43,15 @@
|
||||
<el-button type="primary" :loading="loading" @click="create">{{ $t('map.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { newMap, postBuildMapImport, newUsePublishMap } from '@/api/jmap/mapdraft';
|
||||
import { newMap, newUsePublishMap } from '@/api/jmap/mapdraft';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
import XLSX from 'xlsx';
|
||||
import { translate, translateSheetTitle } from '@/scripts/translate';
|
||||
import { sheet_to_json } from '@/utils/Export2Excel';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
// import XLSX from 'xlsx';
|
||||
// import { translate, translateSheetTitle } from '@/scripts/translate';
|
||||
// import { sheet_to_json } from '@/utils/Export2Excel';
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
|
||||
export default {
|
||||
name: 'MapCreate',
|
||||
@ -127,7 +126,7 @@ export default {
|
||||
},
|
||||
initLoadData() {
|
||||
this.skinCodeList = [];
|
||||
getSkinCodeList().then(response => {
|
||||
getLineCodeList().then(response => {
|
||||
this.skinCodeList = response.data;
|
||||
});
|
||||
this.$Dictionary.cityType().then(list => {
|
||||
@ -173,109 +172,109 @@ export default {
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
importf() { // 导入
|
||||
const obj = this.$refs.files;
|
||||
let wb;
|
||||
if (!obj.files) return;
|
||||
const f = obj.files[0];
|
||||
this.loadingUpload = true;
|
||||
const reader = new FileReader();
|
||||
const that = this;
|
||||
reader.onload = function (e) {
|
||||
const data = e.target.result;
|
||||
if (that.rABS) {
|
||||
wb = XLSX.read(btoa(that.fixdata(data)), {// 手动转化
|
||||
type: 'base64'
|
||||
});
|
||||
} else {
|
||||
wb = XLSX.read(data, {
|
||||
type: 'binary'
|
||||
});
|
||||
}
|
||||
const resultJSONData = {};
|
||||
for (const index in wb.Sheets) {
|
||||
// importf() { // 导入
|
||||
// const obj = this.$refs.files;
|
||||
// let wb;
|
||||
// if (!obj.files) return;
|
||||
// const f = obj.files[0];
|
||||
// this.loadingUpload = true;
|
||||
// const reader = new FileReader();
|
||||
// const that = this;
|
||||
// reader.onload = function (e) {
|
||||
// const data = e.target.result;
|
||||
// if (that.rABS) {
|
||||
// wb = XLSX.read(btoa(that.fixdata(data)), {// 手动转化
|
||||
// type: 'base64'
|
||||
// });
|
||||
// } else {
|
||||
// wb = XLSX.read(data, {
|
||||
// type: 'binary'
|
||||
// });
|
||||
// }
|
||||
// const resultJSONData = {};
|
||||
// for (const index in wb.Sheets) {
|
||||
|
||||
const titleNum = that.formatSheetTitle(index);
|
||||
const key = translateSheetTitle.sheetName[titleNum];
|
||||
// const titleNum = that.formatSheetTitle(index);
|
||||
// const key = translateSheetTitle.sheetName[titleNum];
|
||||
|
||||
const filterVal = that.handelData(key);
|
||||
const jsonData = sheet_to_json(wb.Sheets[index]);
|
||||
const data = that.formatJson(filterVal, jsonData, key);
|
||||
if (key === 'base') {
|
||||
for (const i in data[0]) {
|
||||
resultJSONData[i] = data[0][i];
|
||||
}
|
||||
} else {
|
||||
resultJSONData[key] = data;
|
||||
}
|
||||
}
|
||||
that.resultJSON = resultJSONData;
|
||||
if (that.resultJSON) {
|
||||
postBuildMapImport(that.resultJSON).then(res => {
|
||||
that.loadingUpload = false;
|
||||
that.$message.success(this.$t('map.importSuccessful'));
|
||||
that.$emit('refresh');
|
||||
that.close();
|
||||
}).catch(error => {
|
||||
that.loadingUpload = false;
|
||||
that.$message.error(this.$t('map.importFailure') + error.message);
|
||||
});
|
||||
}
|
||||
obj.value = ''; // 清空上次导入文件
|
||||
};
|
||||
if (that.rABS) {
|
||||
reader.readAsArrayBuffer(f);
|
||||
} else {
|
||||
reader.readAsBinaryString(f);
|
||||
}
|
||||
},
|
||||
// 转换数据格式
|
||||
handelData(key) {
|
||||
const tHeader = [];
|
||||
const tHeaderF = [];
|
||||
if (translate[key]) {
|
||||
translate[key].columns.forEach(item => {
|
||||
tHeader.push(item.tHeader);
|
||||
tHeaderF.push(item.key);
|
||||
});
|
||||
}
|
||||
const filterVal = {
|
||||
tHeader: tHeader,
|
||||
tHeaderF: tHeaderF
|
||||
};
|
||||
return filterVal;
|
||||
},
|
||||
// 文件流转BinaryString
|
||||
fixdata(data) {
|
||||
var o = '';
|
||||
var l = 0;
|
||||
var w = 10240;
|
||||
for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)));
|
||||
o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)));
|
||||
return o;
|
||||
},
|
||||
// 转换属性名称 格式
|
||||
formatJson(filterVal, jsonData, key) {
|
||||
jsonData.map((item, index) => {
|
||||
const json = {};
|
||||
filterVal.tHeader.map((j, o) => {
|
||||
if (item[j] != undefined) {
|
||||
json[filterVal.tHeaderF[o]] = translate[key].columns[o].formatter(item[j]);
|
||||
}
|
||||
});
|
||||
jsonData.splice(index, 1, json);
|
||||
});
|
||||
return jsonData;
|
||||
},
|
||||
// 转换sheet名字
|
||||
formatSheetTitle(title) {
|
||||
let index;
|
||||
translateSheetTitle.sheetTitle.forEach((v, i) => {
|
||||
if (title == v) index = i;
|
||||
});
|
||||
return index;
|
||||
}
|
||||
// const filterVal = that.handelData(key);
|
||||
// const jsonData = sheet_to_json(wb.Sheets[index]);
|
||||
// const data = that.formatJson(filterVal, jsonData, key);
|
||||
// if (key === 'base') {
|
||||
// for (const i in data[0]) {
|
||||
// resultJSONData[i] = data[0][i];
|
||||
// }
|
||||
// } else {
|
||||
// resultJSONData[key] = data;
|
||||
// }
|
||||
// }
|
||||
// that.resultJSON = resultJSONData;
|
||||
// if (that.resultJSON) {
|
||||
// postBuildMapImport(that.resultJSON).then(res => {
|
||||
// that.loadingUpload = false;
|
||||
// that.$message.success(this.$t('map.importSuccessful'));
|
||||
// that.$emit('refresh');
|
||||
// that.close();
|
||||
// }).catch(error => {
|
||||
// that.loadingUpload = false;
|
||||
// that.$message.error(this.$t('map.importFailure') + error.message);
|
||||
// });
|
||||
// }
|
||||
// obj.value = ''; // 清空上次导入文件
|
||||
// };
|
||||
// if (that.rABS) {
|
||||
// reader.readAsArrayBuffer(f);
|
||||
// } else {
|
||||
// reader.readAsBinaryString(f);
|
||||
// }
|
||||
// },
|
||||
// // 转换数据格式
|
||||
// handelData(key) {
|
||||
// const tHeader = [];
|
||||
// const tHeaderF = [];
|
||||
// if (translate[key]) {
|
||||
// translate[key].columns.forEach(item => {
|
||||
// tHeader.push(item.tHeader);
|
||||
// tHeaderF.push(item.key);
|
||||
// });
|
||||
// }
|
||||
// const filterVal = {
|
||||
// tHeader: tHeader,
|
||||
// tHeaderF: tHeaderF
|
||||
// };
|
||||
// return filterVal;
|
||||
// },
|
||||
// // 文件流转BinaryString
|
||||
// fixdata(data) {
|
||||
// var o = '';
|
||||
// var l = 0;
|
||||
// var w = 10240;
|
||||
// for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)));
|
||||
// o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)));
|
||||
// return o;
|
||||
// },
|
||||
// // 转换属性名称 格式
|
||||
// formatJson(filterVal, jsonData, key) {
|
||||
// jsonData.map((item, index) => {
|
||||
// const json = {};
|
||||
// filterVal.tHeader.map((j, o) => {
|
||||
// if (item[j] != undefined) {
|
||||
// json[filterVal.tHeaderF[o]] = translate[key].columns[o].formatter(item[j]);
|
||||
// }
|
||||
// });
|
||||
// jsonData.splice(index, 1, json);
|
||||
// });
|
||||
// return jsonData;
|
||||
// },
|
||||
// // 转换sheet名字
|
||||
// formatSheetTitle(title) {
|
||||
// let index;
|
||||
// translateSheetTitle.sheetTitle.forEach((v, i) => {
|
||||
// if (title == v) index = i;
|
||||
// });
|
||||
// return index;
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
<script>
|
||||
import { updateMap, getMapDetail } from '@/api/jmap/mapdraft';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
import { saveMap } from '@/api/jmap/mapdraft';
|
||||
|
||||
export default {
|
||||
@ -158,7 +158,6 @@ export default {
|
||||
save() {
|
||||
this.loading = true;
|
||||
if (this.basicInfo) {
|
||||
// this.editModel.id = this.$route.params.mapId;
|
||||
this.$refs['edit'].validate((valid) => {
|
||||
if (valid) {
|
||||
updateMap(this.editModel).then(response => {
|
||||
@ -221,7 +220,7 @@ export default {
|
||||
});
|
||||
|
||||
this.skinCodeList = [];
|
||||
getSkinCodeList().then(response => {
|
||||
getLineCodeList().then(response => {
|
||||
this.skinCodeList = response.data;
|
||||
});
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ import MapEdit from './edit';
|
||||
import MapSaveAs from './saveAs';
|
||||
import MapPublish from './publish';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { saveMap } from '@/api/jmap/mapdraft';
|
||||
|
||||
export default {
|
||||
name: 'MapOperateMenu',
|
||||
@ -47,10 +48,10 @@ export default {
|
||||
label: this.$t('map.updateObj'),
|
||||
handler: this.updateObj
|
||||
},
|
||||
// {
|
||||
// label: this.$t('map.updateObjAxis'),
|
||||
// handler: this.updateObjAxis
|
||||
// },
|
||||
{
|
||||
label: this.$t('map.updateObjAxis'),
|
||||
handler: this.updateObjAxis
|
||||
},
|
||||
{
|
||||
label: this.$t('map.saveAs'),
|
||||
handler: this.saveAs
|
||||
@ -69,7 +70,15 @@ export default {
|
||||
handler: this.publish
|
||||
},
|
||||
menuNormal: [],
|
||||
menu: []
|
||||
menu: [],
|
||||
updtModel: {
|
||||
code: '',
|
||||
scaling: '',
|
||||
origin: {
|
||||
x: '',
|
||||
y: ''
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -124,12 +133,45 @@ export default {
|
||||
this.$refs.edit.show('editCode');
|
||||
}
|
||||
},
|
||||
// updateObjAxis() {
|
||||
// this.doClose();
|
||||
// if (this.$refs && this.$refs.axisEdit) {
|
||||
// this.$refs.axisEdit.show('editPoint');
|
||||
// }
|
||||
// },
|
||||
updateObjAxis() {
|
||||
this.doClose();
|
||||
this.getMapOrigin();
|
||||
this.$confirm('您确认按当前绘图位置更新坐标及缩放比例?', this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const map = this.$store.state.map.map;
|
||||
this.$store.dispatch('map/saveMapDeviceDefaultRelations').then(() => {
|
||||
const param = {
|
||||
mapId: this.$route.params.mapId,
|
||||
skinVO: {
|
||||
code: this.$store.state.map.map.skinVO.code,
|
||||
name: this.$store.state.map.map.skinVO.name,
|
||||
origin: {
|
||||
x: this.updtModel.origin.x,
|
||||
y: this.updtModel.origin.y
|
||||
},
|
||||
scaling: this.updtModel.scaling
|
||||
}
|
||||
};
|
||||
saveMap(Object.assign(map, param)).then(response => {
|
||||
this.$message.success(this.$t('map.updateSuccessfully'));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('map.updateFailed'));
|
||||
});
|
||||
});
|
||||
}).catch(() => { });
|
||||
|
||||
},
|
||||
getMapOrigin() {
|
||||
const dataZoom = this.$store.state.map.dataZoom;
|
||||
if (dataZoom && dataZoom.offsetX) {
|
||||
this.updtModel.origin.x = Number.parseInt(dataZoom.offsetX);
|
||||
this.updtModel.origin.y = Number.parseInt(dataZoom.offsetY);
|
||||
this.updtModel.scaling = dataZoom.scaleRate;
|
||||
}
|
||||
},
|
||||
saveAs() {
|
||||
this.doClose();
|
||||
if (this.$refs && this.$refs.saveAs) {
|
||||
|
@ -399,7 +399,7 @@ export default {
|
||||
const resp = await getTrainingDetail(this.trainingId);
|
||||
if (resp && resp.code == 200) {
|
||||
const detail = resp.data;
|
||||
const rest = await getProductDetail(detail.prdCode);
|
||||
const rest = await getProductDetail(detail.prdId);
|
||||
if (rest && rest.code == 200) {
|
||||
const data = rest.data;
|
||||
await this.$store.dispatch('training/setPrdType', data.prdType);
|
||||
|
@ -143,8 +143,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'canvasWidth',
|
||||
'canvasHeight'
|
||||
'canvasWidth'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
@ -188,10 +187,10 @@ export default {
|
||||
isDemon() {
|
||||
return this.mode === 'demon';
|
||||
},
|
||||
isScreen() {
|
||||
isScreen() { // 暂时不用
|
||||
return this.mode === 'dp';
|
||||
},
|
||||
isReplay() {
|
||||
isReplay() { // 回放 暂时不用
|
||||
return this.mode === 'replay';
|
||||
},
|
||||
isScript() {
|
||||
@ -392,7 +391,7 @@ export default {
|
||||
const resp = await getTrainingDetail(this.trainingId);
|
||||
if (resp && resp.code == 200) {
|
||||
const detail = resp.data;
|
||||
const rest = await getProductDetail(detail.prdCode);
|
||||
const rest = await getProductDetail(detail.prdId);
|
||||
if (rest && rest.code == 200) {
|
||||
const data = rest.data;
|
||||
await this.$store.dispatch('training/setPrdType', data.prdType);
|
||||
|
@ -130,7 +130,7 @@ export default {
|
||||
loadInitData() {
|
||||
const data = {
|
||||
mapId: this.$route.query.mapId,
|
||||
prdCode: this.$route.query.code,
|
||||
prdId: this.$route.query.code,
|
||||
permissionType: PermissionType.SIMULATION
|
||||
};
|
||||
getGoodsTryUse(data).then(res => {
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div slot="header" style="text-align: center;">
|
||||
<b>{{ $t('exam.courseName') + ': '+ courseModel.name }}</b>
|
||||
</div>
|
||||
<div style=" margin:50px" :style="{ height: height - 190 +'px' }">
|
||||
<div style="margin:50px" :style="{ height: height - 190 +'px' }">
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane :label="this.$t('exam.itemList')" name="first">
|
||||
<div v-if="courseModel.treeList.length != 0" :style="{ height: height - 230 +'px' }">
|
||||
@ -122,7 +122,7 @@ export default {
|
||||
id: resp.data.id,
|
||||
name: resp.data.name,
|
||||
pmsList: resp.data.permissionList || [],
|
||||
prdCode: resp.data.prdCode,
|
||||
prdId: resp.data.prdId,
|
||||
mapId: resp.data.mapId,
|
||||
PermissionType: PermissionType.EXAM,
|
||||
treeList: resp.data.examDefinitionList
|
||||
@ -140,7 +140,7 @@ export default {
|
||||
this.loading = true;
|
||||
this.$router.push({
|
||||
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`,
|
||||
query: { permissionType: PermissionType.EXAM, lessonId: this.courseModel.id, prdCode: this.courseModel.prdCode, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
|
||||
query: { permissionType: PermissionType.EXAM, lessonId: this.courseModel.id, prdId: this.courseModel.prdId, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
|
||||
});
|
||||
},
|
||||
checkCourse() {
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="card-title">
|
||||
<b>{{ $t('exam.nameOfTestPaper') +': ' + examDetails.name }}</b>
|
||||
</div>
|
||||
<div style="padding:50px; padding-right: 0; height: 100%;">
|
||||
<div class="card_content">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<p class="list-item">
|
||||
<span class="list-label">{{ $t('exam.examStartTime') +':' }}</span>
|
||||
@ -183,7 +183,7 @@ export default {
|
||||
getPublishLessonDetail({ id: this.examDetails.lessonId }).then((res) => {
|
||||
this.$router.push({
|
||||
path: `${UrlConfig.trainingPlatform.pay}/${this.examDetails.lessonId}`,
|
||||
query: { permissionType: PermissionType.EXAM, lessonId: this.examDetails.lessonId, prdCode: res.data.prdCode, mapId: res.data.mapId }
|
||||
query: { permissionType: PermissionType.EXAM, lessonId: this.examDetails.lessonId, prdId: res.data.prdId, mapId: res.data.mapId }
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('error.obtainCourseDetailsFailed'));
|
||||
@ -260,6 +260,11 @@ export default {
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #e6e6e6;
|
||||
}
|
||||
.card_content{
|
||||
padding:50px;
|
||||
padding-right: 0;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.menu li {
|
||||
|
@ -133,9 +133,9 @@ export default {
|
||||
};
|
||||
// 默认个人地图绘制可以滚轮放大缩小 其他地图显示不允许此操作
|
||||
const path = window.location.href;
|
||||
let flag = false;
|
||||
let mouseWheelFlag = false;
|
||||
if (path.includes('design/userlist/map/draw')) {
|
||||
flag = true;
|
||||
mouseWheelFlag = true;
|
||||
}
|
||||
|
||||
Vue.prototype.$jlmap = new Jlmap({
|
||||
@ -149,7 +149,7 @@ export default {
|
||||
scaleRate: 1,
|
||||
offsetX: 0,
|
||||
offsetY: 0,
|
||||
zoomOnMouseWheel: flag
|
||||
zoomOnMouseWheel: mouseWheelFlag
|
||||
},
|
||||
methods: {
|
||||
dataLoaded: this.handleDataLoaded,
|
||||
@ -161,6 +161,7 @@ export default {
|
||||
this.$jlmap.on('dataZoom', this.onDataZoom, this);
|
||||
this.$jlmap.on('selected', this.onSelected, this);
|
||||
this.$jlmap.on('contextmenu', this.onContextMenu, this);
|
||||
this.$jlmap.on('keyboard', this.onKeyboard, this);
|
||||
|
||||
window.document.oncontextmenu = function () {
|
||||
return false;
|
||||
@ -215,6 +216,15 @@ export default {
|
||||
// 视图参数改变
|
||||
handleOptionsUpdate(options) {
|
||||
},
|
||||
// 键盘快捷键事件
|
||||
onKeyboard(hook) {
|
||||
switch (hook) {
|
||||
case 'Control_Z': this.$store.dispatch('map/setRevocation');
|
||||
break;
|
||||
case 'Control_Y': this.$store.dispatch('map/setRecover');
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 视图缩放事件
|
||||
onDataZoom(dataZoom) {
|
||||
this.dataZoom.offsetX = dataZoom.offsetX.toFixed(1) + '';
|
||||
|
@ -98,7 +98,7 @@ export default {
|
||||
},
|
||||
detail: {
|
||||
mapId: '',
|
||||
prdCode: ''
|
||||
prdId: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -175,7 +175,7 @@ export default {
|
||||
loadTrainingList(data) {
|
||||
getLessonDetail({ id: data.lessonId }).then(resp => {
|
||||
this.detail.mapId = resp.data.mapId;
|
||||
this.detail.prdCode = resp.data.prdCode;
|
||||
this.detail.prdId = resp.data.prdId;
|
||||
this.chapterModel.lessonId = resp.data.id;
|
||||
this.chapterModel.lessonName = resp.data.name;
|
||||
if (data.type === 'Chapter') {
|
||||
|
@ -92,9 +92,9 @@ export default {
|
||||
},
|
||||
{
|
||||
title: this.$t('lesson.product'),
|
||||
prop: 'prdCode',
|
||||
prop: 'prdId',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.prdCode, this.prdTypeList, ['code', 'name']); },
|
||||
columnValue: (row) => { return this.$convertField(row.prdId, this.prdTypeList, ['code', 'name']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
@ -147,7 +147,7 @@ export default {
|
||||
},
|
||||
async queryFunction(params) {
|
||||
params['mapId'] = this.detail.mapId;
|
||||
params['prdCode'] = this.detail.prdCode;
|
||||
params['prdId'] = this.detail.prdId;
|
||||
const res = await pageQueryTraining(params);
|
||||
this.trainings.forEach(ele => {
|
||||
res.data.list.forEach(item => {
|
||||
|
@ -20,13 +20,13 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('lesson.associatedProducts')" prop="prdCode">
|
||||
<el-select v-model="courseModel.prdCode" :placeholder="$t('rules.pleaseSelect')" :disabled="isEdit">
|
||||
<el-form-item :label="this.$t('lesson.associatedProducts')" prop="prdId">
|
||||
<el-select v-model="courseModel.prdId" :placeholder="$t('rules.pleaseSelect')" :disabled="isEdit">
|
||||
<el-option
|
||||
v-for="(item,index) in productList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -74,7 +74,7 @@ export default {
|
||||
mapIdList: [],
|
||||
courseModel: {
|
||||
id: '',
|
||||
prdCode: '',
|
||||
prdId: '',
|
||||
product: [],
|
||||
mapId: '',
|
||||
name: '',
|
||||
@ -94,7 +94,7 @@ export default {
|
||||
mapId: [
|
||||
{ required: true, message: this.$t('rules.selectMapName'), trigger: 'change' }
|
||||
],
|
||||
prdCode: [
|
||||
prdId: [
|
||||
{ required: true, message: this.$t('rules.selectAssociatedProduct'), trigger: 'change' }
|
||||
],
|
||||
remarks: [
|
||||
@ -133,7 +133,7 @@ export default {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const model = {
|
||||
prdCode: this.courseModel.prdCode,
|
||||
prdId: this.courseModel.prdId,
|
||||
name: this.courseModel.name,
|
||||
mapId: this.courseModel.mapId,
|
||||
remarks: this.courseModel.remarks
|
||||
@ -153,7 +153,7 @@ export default {
|
||||
if (valid) {
|
||||
const model = {
|
||||
id: this.courseModel.id,
|
||||
prdCode: this.courseModel.prdCode,
|
||||
prdId: this.courseModel.prdId,
|
||||
name: this.courseModel.name,
|
||||
mapId: this.courseModel.mapId,
|
||||
remarks: this.courseModel.remarks
|
||||
@ -174,7 +174,7 @@ export default {
|
||||
this.courseModel = {
|
||||
id: data.id,
|
||||
mapId: this.$route.query.mapId,
|
||||
prdCode: data.prdCode,
|
||||
prdId: data.prdId,
|
||||
name: data.name,
|
||||
remarks: data.remarks
|
||||
};
|
||||
|
@ -35,7 +35,7 @@ export default {
|
||||
id: '',
|
||||
name: '',
|
||||
mapId: '',
|
||||
prdCode: '',
|
||||
prdId: '',
|
||||
cityCode: ''
|
||||
}
|
||||
};
|
||||
@ -68,7 +68,7 @@ export default {
|
||||
id: model.id,
|
||||
name: model.name,
|
||||
mapId: this.$route.params.mapId,
|
||||
prdCode: model.prdCode,
|
||||
prdId: model.prdId,
|
||||
cityCode: model.cityCode
|
||||
};
|
||||
this.dialogShow = true;
|
||||
|
@ -18,7 +18,7 @@
|
||||
<script>
|
||||
import { addTrainingRulesList } from '@/api/management/operation';
|
||||
import { OperationList } from '@/scripts/OperationConfig';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
|
||||
export default {
|
||||
name: 'AddBatch',
|
||||
@ -74,7 +74,7 @@ export default {
|
||||
init() {
|
||||
// 获取皮肤列表
|
||||
this.skinCodeList = [];
|
||||
getSkinCodeList().then(response => {
|
||||
getLineCodeList().then(response => {
|
||||
this.skinCodeList = response.data.map(item => {
|
||||
const params = {};
|
||||
params.label = item.name;
|
||||
|
@ -15,13 +15,13 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="this.$t('lesson.productType')" prop="prdCode">
|
||||
<el-select v-model="operateModel.prdCode" style="width: 300px" @change="prdChange">
|
||||
<el-form-item :label="this.$t('lesson.productType')" prop="prdId">
|
||||
<el-select v-model="operateModel.prdId" style="width: 300px" @change="prdChange">
|
||||
<el-option
|
||||
v-for="option in productList"
|
||||
:key="option.code"
|
||||
:key="option.id"
|
||||
:label="option.name"
|
||||
:value="option.code"
|
||||
:value="option.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -147,7 +147,7 @@ export default {
|
||||
name: '',
|
||||
type: '',
|
||||
mapId: this.$route.query.mapId,
|
||||
prdCode: '',
|
||||
prdId: '',
|
||||
operateType: [],
|
||||
maxDuration: 0,
|
||||
minDuration: 0,
|
||||
@ -167,7 +167,7 @@ export default {
|
||||
mapId: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
|
||||
],
|
||||
prdCode: [
|
||||
prdId: [
|
||||
{ required: true, message: this.$t('rules.enterProductType'), trigger: 'change' }
|
||||
],
|
||||
type: [
|
||||
@ -212,7 +212,7 @@ export default {
|
||||
this.loading = false;
|
||||
},
|
||||
mapIdChoose(mapId) {
|
||||
this.operateModel.prdCode = '';
|
||||
this.operateModel.prdId = '';
|
||||
this.productList = [];
|
||||
if (mapId) {
|
||||
getCommodityMapProduct(mapId).then((response) => {
|
||||
@ -221,12 +221,12 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
async prdChange(prdCode) {
|
||||
async prdChange(prdId) {
|
||||
this.trainingTypeMap = {};
|
||||
this.operateModel.operateType = [];
|
||||
|
||||
const mapIdObj = this.mapIdList.find(elem => { return elem.id === this.operateModel.mapId; }) || {};
|
||||
const prdTypeObj = this.productList.find(elem => { return elem.code === prdCode; }) || {};
|
||||
const prdTypeObj = this.productList.find(elem => { return elem.id === prdId; }) || {};
|
||||
const res = await getOperateTrainingList({ mapId: mapIdObj.id, productType: prdTypeObj.prdType });
|
||||
if (res && res.code == 200) {
|
||||
this.trainingTypeLists = res.data;
|
||||
@ -280,7 +280,7 @@ export default {
|
||||
const data = {
|
||||
mapId: this.operateModel.mapId,
|
||||
name: this.operateModel.name,
|
||||
prdCode: this.operateModel.prdCode,
|
||||
prdId: this.operateModel.prdId,
|
||||
trainingType: this.operateModel.type,
|
||||
operateType: this.operateModel.operateType
|
||||
};
|
||||
@ -298,7 +298,7 @@ export default {
|
||||
const data = {
|
||||
mapId: this.operateModel.mapId,
|
||||
name: this.operateModel.name,
|
||||
prdCode: this.operateModel.prdCode,
|
||||
prdId: this.operateModel.prdId,
|
||||
trainingType: this.operateModel.type,
|
||||
operateType: this.operateModel.operateType,
|
||||
remarks: this.operateModel.remarks,
|
||||
@ -319,7 +319,7 @@ export default {
|
||||
const data = {
|
||||
mapId: this.operateModel.mapId,
|
||||
name: this.operateModel.name,
|
||||
prdCode: this.operateModel.prdCode,
|
||||
prdId: this.operateModel.prdId,
|
||||
trainingType: `${this.operateModel.type}`,
|
||||
operateType: `${this.operateModel.operateType.join(',')}`
|
||||
};
|
||||
@ -336,7 +336,7 @@ export default {
|
||||
const data = {
|
||||
name: this.operateModel.name,
|
||||
type: this.operateModel.type,
|
||||
prdCode: this.operateModel.prdCode,
|
||||
prdId: this.operateModel.prdId,
|
||||
mapId: this.operateModel.mapId,
|
||||
operateType: this.operateModel.operateType[0],
|
||||
minDuration: this.operateModel.minDuration,
|
||||
|
@ -44,7 +44,7 @@ export default {
|
||||
queryForm: {
|
||||
labelWidth: '120px',
|
||||
queryObject: {
|
||||
prdCode: {
|
||||
prdId: {
|
||||
type: 'select',
|
||||
label: this.$t('lesson.product'),
|
||||
change: this.prdChoose,
|
||||
@ -91,9 +91,9 @@ export default {
|
||||
},
|
||||
{
|
||||
title: this.$t('lesson.product'),
|
||||
prop: 'prdCode',
|
||||
prop: 'prdId',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.prdCode, this.prdTypeList, ['code', 'name']); },
|
||||
columnValue: (row) => { return this.$convertField(row.prdId, this.prdTypeList, ['code', 'name']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
@ -155,13 +155,13 @@ export default {
|
||||
await this.loadInitData();
|
||||
const json = localStore.get(this.$route.path);
|
||||
json.type = '';
|
||||
json.prdCode = '';
|
||||
json.prdId = '';
|
||||
json.operateType = '';
|
||||
},
|
||||
methods: {
|
||||
async loadInitData() {
|
||||
this.mapIdList = [];
|
||||
this.queryForm.queryObject.prdCode.config.data = [];
|
||||
this.queryForm.queryObject.prdId.config.data = [];
|
||||
listPublishMap().then(response => {
|
||||
this.mapIdList = response.data;
|
||||
});
|
||||
@ -171,7 +171,7 @@ export default {
|
||||
productList.forEach(elem => {
|
||||
// 过滤综合演练产品
|
||||
if (elem.prdType != '03') {
|
||||
this.queryForm.queryObject.prdCode.config.data.push({ value: elem.code, label: elem.name });
|
||||
this.queryForm.queryObject.prdId.config.data.push({ value: elem.code, label: elem.name });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -2,6 +2,12 @@
|
||||
<transition name="el-zoom-in-center">
|
||||
<div class="mapPaint">
|
||||
<div class="map-view">
|
||||
<div class="operation_box">
|
||||
<el-button-group>
|
||||
<el-button size="small" :disabled="!stepData.length" @click="revocation">撤销</el-button>
|
||||
<el-button size="small" :disabled="!recoverStepData.length" @click="recover">恢复</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<jlmap-visual ref="jlmapVisual" @onSelect="clickEvent" @onMenu="onContextmenu" />
|
||||
</div>
|
||||
<div class="map-draft">
|
||||
@ -15,8 +21,7 @@
|
||||
@handleSelectPhysicalView="handleSelectPhysicalView"
|
||||
@saveMapEvent="saveMapEvent"
|
||||
@verifyMapEvent="verifyMapEvent"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
@selectView="selectViewDraft"
|
||||
@showMap="showMap"
|
||||
@ -49,10 +54,12 @@ import { checkLoginLine } from '@/api/login';
|
||||
import JlmapVisual from '@/views/jlmap/index';
|
||||
import MapOperate from './mapoperate/index';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
import ConfigMap from './configMap';
|
||||
|
||||
import DataRelation from './dataRelation/index';
|
||||
// import { deepAssign } from '@/utils/index';
|
||||
|
||||
export default {
|
||||
name: 'MapView',
|
||||
@ -74,6 +81,12 @@ export default {
|
||||
timeDemon: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stepData',
|
||||
'recoverStepData'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.mapDataLoadedCount': function (val) {
|
||||
this.initAutoSaveTask();
|
||||
@ -126,7 +139,7 @@ export default {
|
||||
this.initAutoSaveTask();
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
this.$messageBox(this.$t('tip.failedLoadMap'));
|
||||
this.$message.error(this.$t('tip.failedLoadMap'));
|
||||
this.endViewLoading();
|
||||
});
|
||||
} else {
|
||||
@ -238,7 +251,7 @@ export default {
|
||||
}).catch(error => {
|
||||
console.log(error, '错误提示');
|
||||
this.mapSaveing = false;
|
||||
this.$messageBox(this.$t('tip.saveFailed'));
|
||||
this.$message(this.$t('tip.saveFailed'));
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -255,7 +268,7 @@ export default {
|
||||
this.$message.success(this.$t('tip.dataValidationSuccess'));
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.requestFailed'));
|
||||
this.$message.error(this.$t('tip.requestFailed'));
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -283,15 +296,20 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
// 增加数据数据 给vuex map对象中
|
||||
// // 增加数据数据 给vuex map对象中
|
||||
addOrUpdateMapModel(obj) {
|
||||
this.$store.dispatch('map/updateMapDevices', obj);
|
||||
},
|
||||
// 删除数据 同时del map
|
||||
delMapModel(obj) {
|
||||
this.$store.dispatch('map/deleteMapDevices', obj).then(() => {
|
||||
this.selected = null;
|
||||
});
|
||||
updateMapModel(models) {
|
||||
this.$store.dispatch('map/updateMapDevices', models);
|
||||
},
|
||||
// 撤销
|
||||
revocation() {
|
||||
this.$store.dispatch('map/setRevocation');
|
||||
},
|
||||
// 恢复
|
||||
recover() {
|
||||
this.$store.dispatch('map/setRecover');
|
||||
},
|
||||
// 设置显示中心
|
||||
setCenter(code) {
|
||||
@ -334,6 +352,12 @@ export default {
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
.operation_box{
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 20px;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.map-draft{
|
||||
/deep/{
|
||||
@ -355,6 +379,7 @@ export default {
|
||||
.map-view {
|
||||
float: left;
|
||||
width: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.map-draft {
|
||||
|
@ -208,7 +208,7 @@ export default {
|
||||
y: this.addModel.position.y
|
||||
}
|
||||
};
|
||||
this.$emit('addOrUpdateMapModel', model);
|
||||
this.$emit('updateMapModel', model);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -217,7 +217,7 @@ export default {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'ImageControl'}, this.editModel);
|
||||
this.$emit('addOrUpdateMapModel', data);
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -231,7 +231,8 @@ export default {
|
||||
cancelButtonText: this.$t('map.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('delMapModel', selected);
|
||||
// _that.$emit('delMapModel', selected);
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
|
@ -218,7 +218,7 @@ export default {
|
||||
y: this.addModel.position.y
|
||||
}
|
||||
};
|
||||
this.$emit('addOrUpdateMapModel', model);
|
||||
this.$emit('updateMapModel', model);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -227,7 +227,7 @@ export default {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'ButtonControl'}, this.editModel);
|
||||
this.$emit('addOrUpdateMapModel', data);
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -241,7 +241,8 @@ export default {
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('delMapModel', selected);
|
||||
// _that.$emit('delMapModel', selected);
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
|
@ -210,7 +210,7 @@ export default {
|
||||
}
|
||||
});
|
||||
|
||||
this.$emit('addOrUpdateMapModel', model);
|
||||
this.$emit('updateMapModel', model);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -219,7 +219,7 @@ export default {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'Counter'}, this.editModel);
|
||||
this.$emit('addOrUpdateMapModel', data);
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -233,7 +233,8 @@ export default {
|
||||
cancelButtonText: this.$t('map.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('delMapModel', selected);
|
||||
// _that.$emit('delMapModel', selected);
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
|
@ -192,7 +192,7 @@ export default {
|
||||
model.stationCode = elem.code;
|
||||
}
|
||||
});
|
||||
this.$emit('addOrUpdateMapModel', model);
|
||||
this.$emit('updateMapModel', model);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -201,7 +201,7 @@ export default {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'DelayUnlock', status: '00'}, this.editModel);
|
||||
this.$emit('addOrUpdateMapModel', data);
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -215,7 +215,8 @@ export default {
|
||||
cancelButtonText: this.$t('map.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('delMapModel', selected);
|
||||
// _that.$emit('delMapModel', selected);
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
|
@ -17,8 +17,7 @@
|
||||
<link-draft
|
||||
ref="Link"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
@ -26,8 +25,7 @@
|
||||
<section-draft
|
||||
ref="Section"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
@fieldSelect="fieldSelect"
|
||||
/>
|
||||
@ -36,8 +34,7 @@
|
||||
<switch-draft
|
||||
ref="Switch"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
@ -45,8 +42,7 @@
|
||||
<signal-draft
|
||||
ref="Signal"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
@signalSectionCode="selectEnabledTab"
|
||||
/>
|
||||
@ -55,8 +51,7 @@
|
||||
<station-draft
|
||||
ref="Station"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
@stationSectionCode="stationEnabledTab"
|
||||
/>
|
||||
@ -65,8 +60,7 @@
|
||||
<station-control-draft
|
||||
ref="StationControl"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
@ -74,8 +68,7 @@
|
||||
<station-stand-draft
|
||||
ref="StationStand"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
@ -83,8 +76,7 @@
|
||||
<zc-control-draft
|
||||
ref="ZcControl"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
@ -92,8 +84,7 @@
|
||||
<limit-control-draft
|
||||
ref="LimitControl"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
@ -101,8 +92,7 @@
|
||||
<lc-control-draft
|
||||
ref="LcControl"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
@ -110,8 +100,7 @@
|
||||
<counter-draft
|
||||
ref="Counter"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
@ -119,8 +108,7 @@
|
||||
<delay-unlock-draft
|
||||
ref="DelayUnlock"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
@ -128,8 +116,7 @@
|
||||
<train-draft
|
||||
ref="Train"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
@ -137,8 +124,7 @@
|
||||
<train-window-draft
|
||||
ref="TrainWindow"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
@ -146,8 +132,7 @@
|
||||
<line-draft
|
||||
ref="Line"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
@ -155,8 +140,7 @@
|
||||
<text-draft
|
||||
ref="Text"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
@ -164,8 +148,7 @@
|
||||
<Image-control-draft
|
||||
ref="ImageControl"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
@ -173,8 +156,7 @@
|
||||
<button-draft
|
||||
ref="ImageControl"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
@ -327,12 +309,12 @@ export default {
|
||||
verifyMapEvent() {
|
||||
this.$emit('verifyMapEvent');
|
||||
},
|
||||
addOrUpdateMapModel(obj) {
|
||||
this.$emit('addOrUpdateMapModel', obj);
|
||||
},
|
||||
delMapModel(obj) {
|
||||
this.$emit('delMapModel', obj);
|
||||
updateMapModel(obj) {
|
||||
this.$emit('updateMapModel', obj);
|
||||
},
|
||||
// delMapModel(obj) {
|
||||
// this.$emit('delMapModel', obj);
|
||||
// },
|
||||
setCenter(code) {
|
||||
this.$emit('setCenter', code);
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ export default {
|
||||
y: this.addModel.position.y
|
||||
}
|
||||
};
|
||||
this.$emit('addOrUpdateMapModel', model);
|
||||
this.$emit('updateMapModel', model);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -197,7 +197,7 @@ export default {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'LcControl'}, this.editModel);
|
||||
this.$emit('addOrUpdateMapModel', data);
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -211,7 +211,8 @@ export default {
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('delMapModel', selected);
|
||||
// _that.$emit('delMapModel', selected);
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
|
@ -179,7 +179,7 @@ export default {
|
||||
y: this.addModel.position.y
|
||||
}
|
||||
};
|
||||
this.$emit('addOrUpdateMapModel', model);
|
||||
this.$emit('updateMapModel', model);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -188,7 +188,7 @@ export default {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'LimitControl'}, this.editModel);
|
||||
this.$emit('addOrUpdateMapModel', data);
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -202,7 +202,8 @@ export default {
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('delMapModel', selected);
|
||||
// _that.$emit('delMapModel', selected);
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
|
@ -217,7 +217,7 @@ export default {
|
||||
width: this.addModel.width,
|
||||
points: JSON.parse(pointArr)
|
||||
};
|
||||
this.$emit('addOrUpdateMapModel', model);
|
||||
this.$emit('updateMapModel', model);
|
||||
} else {
|
||||
this.$message.console.error(this.$t('tip.cannotCoincide'));
|
||||
|
||||
@ -230,7 +230,7 @@ export default {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'Line'}, this.editModel);
|
||||
this.$emit('addOrUpdateMapModel', data);
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -244,7 +244,8 @@ export default {
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('delMapModel', selected);
|
||||
// _that.$emit('delMapModel', selected);
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
|
@ -284,9 +284,9 @@ export default {
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
this.$nextTick(() => {
|
||||
if (selected && selected._type.toUpperCase() === 'Link'.toUpperCase()) {
|
||||
this.$refs.dataform.resetFields();
|
||||
this.$refs.make.resetFields();
|
||||
if (selected && selected._type.toUpperCase() === 'Link'.toUpperCase()) {
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected); // 深拷贝
|
||||
this.addModel.code = selected.code;
|
||||
@ -322,7 +322,7 @@ export default {
|
||||
};
|
||||
edits.push(model);
|
||||
}
|
||||
this.$emit('addOrUpdateMapModel', edits);
|
||||
this.$emit('updateMapModel', edits);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -334,7 +334,7 @@ export default {
|
||||
const edits = [];
|
||||
var baseLink = null;
|
||||
if (this.addModel) {
|
||||
baseLink = this.$store.getters['map/getDeviceByCode'](this.addModel.code);
|
||||
baseLink = deepAssign({}, this.$store.getters['map/getDeviceByCode'](this.addModel.code));
|
||||
}
|
||||
|
||||
var leftFdCode = '';
|
||||
@ -382,7 +382,7 @@ export default {
|
||||
edits.push(model);
|
||||
}
|
||||
}
|
||||
this.$emit('addOrUpdateMapModel', edits);
|
||||
this.$emit('updateMapModel', edits);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -430,7 +430,7 @@ export default {
|
||||
edits.push(model);
|
||||
}
|
||||
}
|
||||
this.$emit('addOrUpdateMapModel', edits);
|
||||
this.$emit('updateMapModel', edits);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -439,7 +439,7 @@ export default {
|
||||
this.$refs['dataform'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'Link'}, this.editModel);
|
||||
this.$emit('addOrUpdateMapModel', data);
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -468,9 +468,9 @@ export default {
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'Link'.toUpperCase()) {
|
||||
var node = null;
|
||||
let node = null;
|
||||
var _that = this;
|
||||
var updates = [];
|
||||
const updates = [];
|
||||
// 清除link 关联关系
|
||||
if (selected.leftFdCode) {
|
||||
node = this.findLinkData(selected.leftFdCode);
|
||||
@ -494,8 +494,8 @@ export default {
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('addOrUpdateMapModel', updates);
|
||||
_that.$emit('delMapModel', selected);
|
||||
updates.push(deepAssign(selected, {_dispose: true}));
|
||||
_that.$emit('updateMapModel', updates);
|
||||
_that.deviceSelect();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
@ -503,15 +503,17 @@ export default {
|
||||
}
|
||||
},
|
||||
findLinkData(code) {
|
||||
let link = null;
|
||||
const linkList = this.linkList;
|
||||
if (linkList && linkList.length) {
|
||||
for (var i = 0; i < linkList.length; i++) {
|
||||
if (code === linkList[i].code) {
|
||||
return linkList[i];
|
||||
link = JSON.parse(JSON.stringify(linkList[i]));
|
||||
return link;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return link;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -20,9 +20,7 @@
|
||||
<div style="height: calc(100% - 46px);">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-card v-if="questionList.length" class="box-card">
|
||||
<div v-for="(item, index) in questionList" :key="index" class="text item">
|
||||
{{ item }}
|
||||
</div>
|
||||
<div v-for="(item, index) in questionList" :key="index" class="text item">{{ item }}</div>
|
||||
</el-card>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
@ -134,9 +132,9 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" label="批量删除" name="five">
|
||||
<div class="link_box_select">
|
||||
<span style="margin-right: 12px;">选择link:</span>
|
||||
<el-tab-pane class="view-control" label="批量操作" name="five">
|
||||
<el-form ref="oprt" label-width="130px" size="mini">
|
||||
<el-form-item label="选择link:">
|
||||
<el-select v-model="linkCode" filterable multiple size="mini">
|
||||
<el-option
|
||||
v-for="item in linkList"
|
||||
@ -145,10 +143,45 @@
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="flex_box">
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="delRelevanceSection">删除link相关元素</el-button>
|
||||
</div>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form ref="operationModel" :model="operationModel" label-width="130px" size="mini" :rules="operationRules">
|
||||
<el-form-item :label="$t('map.sectionData') + ':'" prop="sectionList">
|
||||
<el-select v-model="operationModel.sectionList" filterable multiple>
|
||||
<el-option
|
||||
v-for="item in PhysicalSectionList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type="field === 'handleSection' ? 'danger' : 'primary'"
|
||||
size="small"
|
||||
@click="hover('handleSection')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.equipmentStation')" prop="stationCode">
|
||||
<el-select v-model="operationModel.stationCode" filterable>
|
||||
<el-option
|
||||
v-for="item in stationList"
|
||||
:key="item.code"
|
||||
:label="item.name + item.code"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="handleScetionStationCode">{{ $t('map.setStationCode') }}</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
@ -231,7 +264,11 @@ export default {
|
||||
code: '',
|
||||
splitNumber: 2,
|
||||
trainPosType: '', // 列车所在方向
|
||||
splitOffsetMax: 0
|
||||
splitOffsetMax: 15
|
||||
},
|
||||
operationModel: { // 区段集中站列表
|
||||
sectionList: [],
|
||||
stationCode: ''
|
||||
},
|
||||
mergeModel: {
|
||||
lsectioncode: '',
|
||||
@ -264,6 +301,14 @@ export default {
|
||||
pointY: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterYValue'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
operationRules: {
|
||||
sectionList: [
|
||||
{ required: true, message: this.$t('rules.pleaseSelectSection'), trigger: 'change' }
|
||||
],
|
||||
stationCode: [
|
||||
{ required: true, message: this.$t('rules.pleaseSelectStationCode'), trigger: 'change' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -558,8 +603,8 @@ export default {
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
if (!this.fieldS) { // 判断是否激活选择站台
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
this.$refs.dataform.resetFields();
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
this.editModel.points = [];
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
@ -586,6 +631,11 @@ export default {
|
||||
this.activeName = 'three';
|
||||
this.field = '';
|
||||
this.$emit('fieldSelect', '');
|
||||
} else if (this.field.toUpperCase() === 'handleSection'.toUpperCase()) {
|
||||
this.operationModel.sectionList.push(selected.code);
|
||||
this.activeName = 'five';
|
||||
// this.field = '';
|
||||
// this.$emit('fieldSelect', '');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -607,7 +657,7 @@ export default {
|
||||
handleDelete(index, row) {
|
||||
row.num = 0;
|
||||
},
|
||||
// 模型
|
||||
// 逻辑区段模型
|
||||
addLogicalSection(model, points, index, middleOffset) {
|
||||
const data = {
|
||||
_type: 'Section',
|
||||
@ -660,7 +710,7 @@ export default {
|
||||
};
|
||||
return data;
|
||||
},
|
||||
// 创建物理区段
|
||||
// 创建逻辑区段
|
||||
createLogicalSections(num, beg, end, model, counts) {
|
||||
const models = [];
|
||||
const triangle = new JTriangle(beg, end);
|
||||
@ -675,9 +725,9 @@ export default {
|
||||
}
|
||||
return models;
|
||||
},
|
||||
// 生成逻辑区段
|
||||
editSectionNum() {
|
||||
let models = [];
|
||||
const remove = [];
|
||||
let counts = 0;
|
||||
const logicSectionNumList = [];
|
||||
const sectionPoints = [...this.editModel.points]; // 获取区段点
|
||||
@ -686,17 +736,16 @@ export default {
|
||||
logicSectionNumList.push(Number(ele.num));
|
||||
counts += parseInt(ele.num);
|
||||
});
|
||||
this.sectionList.forEach(section => {
|
||||
this.sectionList.forEach(section => { // 删除之前的逻辑区段
|
||||
if (section.type === '02' && section.parentCode == this.editModel.code) {
|
||||
remove.push(section);
|
||||
models.push(deepAssign(section, {_dispose: true}));
|
||||
}
|
||||
});
|
||||
|
||||
this.editModel.logicSectionNum = [...logicSectionNumList];
|
||||
models.push(this.editModel);
|
||||
this.activeName = 'first';
|
||||
this.$emit('addOrUpdateMapModel', models);
|
||||
this.$emit('delMapModel', remove);
|
||||
this.$emit('updateMapModel', models);
|
||||
},
|
||||
addPoint(index) {
|
||||
const data = { x: 0, y: 0 };
|
||||
@ -707,9 +756,6 @@ export default {
|
||||
this.editModel.points.splice(index, 1);
|
||||
this.logicSectionNums.splice(index, 1);
|
||||
},
|
||||
filterLinks(query, item) {
|
||||
return item.pinyin.indexOf(query) > -1;
|
||||
},
|
||||
// 一键创建区段 检测link是否规范
|
||||
checkLinkList() {
|
||||
this.questionList = [];
|
||||
@ -717,7 +763,7 @@ export default {
|
||||
if (item.leftFdCode) {
|
||||
if (item.leftSdCode) {
|
||||
item.create = true;
|
||||
} else if (!item.leftSdCode) {
|
||||
} else {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](item.leftFdCode);
|
||||
if (selected.rightFdCode && selected.rightSdCode) {
|
||||
item.create = true;
|
||||
@ -729,7 +775,7 @@ export default {
|
||||
} else if (item.rightFdCode) {
|
||||
if (item.rightSdCode) {
|
||||
item.create = true;
|
||||
} else if (!item.rightSdCode) {
|
||||
} else {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](item.rightFdCode);
|
||||
if (selected.leftFdCode && selected.leftSdCode) {
|
||||
item.create = true;
|
||||
@ -745,7 +791,6 @@ export default {
|
||||
// 一键生成区段
|
||||
create() {
|
||||
const models = [];
|
||||
const remove = [];
|
||||
if (this.checkLinkList()) {
|
||||
this.linkList.forEach(link => {
|
||||
let count = 0;
|
||||
@ -829,9 +874,9 @@ export default {
|
||||
const sectionList = this.findSectionListDataByLinkCode(link.code);
|
||||
if (sectionList) {
|
||||
sectionList.forEach(section => {
|
||||
remove.push({ _type: 'Section', code: section.code });
|
||||
models.push(deepAssign({ _type: 'Section', code: section.code }, { _dispose: true }));
|
||||
if (section.type === '02' && section.parentCode) {
|
||||
remove.push(section);
|
||||
models.push(deepAssign(section, { _dispose: true }));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -844,9 +889,8 @@ export default {
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('delMapModel', remove);
|
||||
if (models.length) {
|
||||
_that.$emit('addOrUpdateMapModel', models);
|
||||
_that.$emit('updateMapModel', models);
|
||||
} else {
|
||||
_that.$message.info(this.$t('tip.allLinkCreate'));
|
||||
}
|
||||
@ -864,41 +908,49 @@ export default {
|
||||
edit() {
|
||||
this.$refs['dataform'].validate((valid) => {
|
||||
if (valid) {
|
||||
const edits = [];
|
||||
const model = Object.assign({_type: 'Section'}, this.editModel); // 修改元素model
|
||||
const models = [];
|
||||
const model = deepAssign(this.editModel, {_type: 'Section'}); // 修改元素model
|
||||
model.leftStopPointOffset = Number(model.leftStopPointOffset);
|
||||
model.rightStopPointOffset = Number(model.rightStopPointOffset);
|
||||
models.push(model);
|
||||
this.sectionList.forEach(section => {
|
||||
if (section.parentCode == model.code) {
|
||||
section.logicSectionShow = model.logicSectionShow;
|
||||
section.trainPosType = model.trainPosType;
|
||||
edits.push(section);
|
||||
const copySection = deepAssign({}, section);
|
||||
copySection.logicSectionShow = model.logicSectionShow;
|
||||
copySection.trainPosType = model.trainPosType;
|
||||
models.push(copySection);
|
||||
}
|
||||
if (section.linkCode == model.linkCode && model.code != section.code && section.type == '01') {
|
||||
const lastIndex = this.oldPoint.length - 1;
|
||||
const copySection = deepAssign({}, section);
|
||||
if (this.oldPoint[0].x == section.points[section.points.length - 1].x && this.oldPoint[0].y == section.points[section.points.length - 1].y) {
|
||||
section.points[section.points.length - 1].x = model.points[0].x;
|
||||
section.points[section.points.length - 1].y = model.points[0].y;
|
||||
section.offsetRight = model.offsetLeft;
|
||||
copySection.points[copySection.points.length - 1].x = model.points[0].x;
|
||||
copySection.points[copySection.points.length - 1].y = model.points[0].y;
|
||||
copySection.offsetRight = model.offsetLeft;
|
||||
}
|
||||
if (this.oldPoint[lastIndex].x == section.points[0].x && this.oldPoint[lastIndex].y == section.points[0].y) {
|
||||
section.points[0].x = model.points[model.points.length - 1].x;
|
||||
section.points[0].y = model.points[model.points.length - 1].y;
|
||||
section.offsetLeft = model.offsetRight;
|
||||
copySection.points[0].x = model.points[model.points.length - 1].x;
|
||||
copySection.points[0].y = model.points[model.points.length - 1].y;
|
||||
copySection.offsetLeft = model.offsetRight;
|
||||
}
|
||||
edits.push(section);
|
||||
models.push(copySection);
|
||||
}
|
||||
});
|
||||
edits.push(model);
|
||||
this.fieldS = '';
|
||||
this.$emit('addOrUpdateMapModel', edits);
|
||||
this.$emit('updateMapModel', models);
|
||||
this.oldPoint = JSON.parse(JSON.stringify(model.points));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除对象
|
||||
deleteObj() {
|
||||
const models = [];
|
||||
const switchList = [];
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
this.switchList.forEach(switchEle => {
|
||||
selected.relSwitchCode == switchEle.code && switchList.push(this.$store.getters['map/getDeviceByCode'](switchEle.code));
|
||||
});
|
||||
this.delSectionSwitch(switchList, models);
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
@ -906,7 +958,15 @@ export default {
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('delMapModel', selected);
|
||||
if (selected.type == '01') {
|
||||
this.sectionList.forEach(section => {
|
||||
if (section.parentCode == selected.code) { // 删除所属逻辑区段
|
||||
models.push(deepAssign(section, { _dispose: true }));
|
||||
}
|
||||
});
|
||||
}
|
||||
models.push(deepAssign(selected, { _dispose: true }));
|
||||
_that.$emit('updateMapModel', models);
|
||||
_that.deviceSelect();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
@ -919,7 +979,6 @@ export default {
|
||||
if (valid) {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.addModel.code);
|
||||
if (selected && selected._type === 'Section' && selected.type === '01') {
|
||||
const remove = [];
|
||||
const models = [];
|
||||
const modelX = (selected.points[selected.points.length - 1].x - selected.points[0].x) / this.addModel.splitNumber; // x 平均值
|
||||
const modelY = (selected.points[selected.points.length - 1].y - selected.points[0].y) / this.addModel.splitNumber; // y 平均值
|
||||
@ -971,9 +1030,8 @@ export default {
|
||||
};
|
||||
models.push(model);
|
||||
}
|
||||
remove.push(selected);
|
||||
this.$emit('delMapModel', remove); // 删除原区段
|
||||
this.$emit('addOrUpdateMapModel', models); // 添加新增拆分区段
|
||||
models.push(deepAssign(selected, { _dispose: true }));
|
||||
this.$emit('updateMapModel', models); // 添加新增拆分区段
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -983,7 +1041,7 @@ export default {
|
||||
this.$refs['oprt1'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.mergeModel.lsectioncode != this.mergeModel.rsectioncode) {
|
||||
const remove = [];
|
||||
const models = [];
|
||||
let rsection = null;
|
||||
let lsection = null;
|
||||
this.PhysicalSectionList.forEach(section => {
|
||||
@ -1031,14 +1089,8 @@ export default {
|
||||
kmRangeLeft: '',
|
||||
region: ''
|
||||
};
|
||||
remove.push({
|
||||
_type: 'Section',
|
||||
code: lsection.code
|
||||
});
|
||||
remove.push({
|
||||
_type: 'Section',
|
||||
code: rsection.code
|
||||
});
|
||||
models.push(deepAssign(this.$store.getters['map/getDeviceByCode'](lsection.code), { _dispose: true }));
|
||||
models.push(deepAssign(this.$store.getters['map/getDeviceByCode'](rsection.code), { _dispose: true }));
|
||||
|
||||
if (lsection.points[lsection.points.length - 1].x == rsection.points[0].x && lsection.points[lsection.points.length - 1].y == rsection.points[0].y) {
|
||||
model.axleShow = lsection.axleShow;
|
||||
@ -1056,8 +1108,8 @@ export default {
|
||||
];
|
||||
model.logicSectionNameSort = lsection.logicSectionNameSort;
|
||||
model.namePosition = { x: 0, y: 0 };
|
||||
this.$emit('delMapModel', remove);
|
||||
this.$emit('addOrUpdateMapModel', model);
|
||||
models.push(model);
|
||||
this.$emit('updateMapModel', models);
|
||||
}
|
||||
if (lsection.points[0].x == rsection.points[rsection.points.length - 1].x && lsection.points[0].y == rsection.points[rsection.points.length - 1].y) {
|
||||
model.axleShow = rsection.axleShow;
|
||||
@ -1075,8 +1127,8 @@ export default {
|
||||
];
|
||||
model.logicSectionNameSort = rsection.logicSectionNameSort;
|
||||
model.namePosition = { x: 0, y: 0 };
|
||||
this.$emit('delMapModel', remove);
|
||||
this.$emit('addOrUpdateMapModel', model);
|
||||
models.push(model);
|
||||
this.$emit('updateMapModel', models);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1107,25 +1159,24 @@ export default {
|
||||
if (sectionList && sectionList.length) {
|
||||
for (var i = 0; i < sectionList.length; i++) {
|
||||
if (sectionList[i].linkCode === linkCode) {
|
||||
remove.push(sectionList[i]);
|
||||
const section = JSON.parse(JSON.stringify(sectionList[i]));
|
||||
remove.push(section);
|
||||
}
|
||||
}
|
||||
}
|
||||
return remove;
|
||||
},
|
||||
// 按link批量删除区段
|
||||
delRelevanceSection() {
|
||||
const selected = [];
|
||||
const models = [];
|
||||
const switchList = [];
|
||||
this.linkCode.forEach(linkCode => {
|
||||
this.sectionList.forEach(section => {
|
||||
if (section.linkCode == linkCode) {
|
||||
const selectedSection = this.$store.getters['map/getDeviceByCode'](section.code);
|
||||
selected.push(selectedSection);
|
||||
models.push(deepAssign(selectedSection, { _dispose: true }));
|
||||
this.switchList.forEach(switchEle => {
|
||||
if (section.relSwitchCode == switchEle.code) {
|
||||
const selectedSwitch = this.$store.getters['map/getDeviceByCode'](switchEle.code);
|
||||
switchList.push(selectedSwitch);
|
||||
}
|
||||
section.relSwitchCode == switchEle.code && switchList.push(this.$store.getters['map/getDeviceByCode'](switchEle.code));
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -1135,10 +1186,8 @@ export default {
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
switchList.forEach((switchs) => {
|
||||
this.handleDeleteSection(switchs);
|
||||
});
|
||||
await this.$emit('delMapModel', selected);
|
||||
this.delSectionSwitch(switchList, models);
|
||||
this.$emit('updateMapModel', models);
|
||||
this.deviceSelect();
|
||||
this.linkCode = '';
|
||||
}).catch(() => {
|
||||
@ -1146,25 +1195,36 @@ export default {
|
||||
});
|
||||
},
|
||||
// 删除道岔/ 关联的道岔区段以及 道岔绑定关系
|
||||
handleDeleteSection(selected) {
|
||||
const models = [];
|
||||
const remove = [];
|
||||
delSectionSwitch(switchList, models) {
|
||||
switchList.forEach((switchs) => {
|
||||
this.sectionList.forEach(elem => {
|
||||
if (elem.type == '03' && elem.relSwitchCode == selected.code) {
|
||||
remove.push({
|
||||
_type: 'Section',
|
||||
code: elem.code
|
||||
});
|
||||
if (elem.type == '03' && elem.relSwitchCode == switchs.code) {
|
||||
models.push(deepAssign(this.$store.getters['map/getDeviceByCode'](elem.code), { _dispose: true }));
|
||||
}
|
||||
if (elem.relSwitchCode == selected.code && elem.type != '03') {
|
||||
elem.relSwitchCode = '';
|
||||
elem.isSwitchSection = false;
|
||||
models.push(elem);
|
||||
if (elem.relSwitchCode == switchs.code && elem.type != '03') {
|
||||
const copyModel = deepAssign({}, elem);
|
||||
copyModel.relSwitchCode = '';
|
||||
copyModel.isSwitchSection = false;
|
||||
models.push(copyModel);
|
||||
}
|
||||
});
|
||||
models.push(deepAssign(switchs, { _dispose: true }));
|
||||
});
|
||||
},
|
||||
// 多选区段设置集中站
|
||||
handleScetionStationCode() {
|
||||
this.$refs['operationModel'].validate((valid) => {
|
||||
if (valid) {
|
||||
const models = [];
|
||||
this.operationModel.sectionList.forEach(sectionCode => {
|
||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](sectionCode));
|
||||
section.stationCode = this.operationModel.stationCode;
|
||||
models.push(section);
|
||||
});
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$refs['operationModel'].resetFields();
|
||||
}
|
||||
});
|
||||
this.$emit('delMapModel', selected);
|
||||
this.$emit('delMapModel', remove);
|
||||
this.$emit('addOrUpdateMapModel', models);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -1198,6 +1258,16 @@ export default {
|
||||
}
|
||||
.link_box_select{
|
||||
padding: 10px 20px;
|
||||
.title{
|
||||
width: 100px;
|
||||
display: block;
|
||||
float: left;
|
||||
text-align: right;
|
||||
line-height: 28px;
|
||||
font-weight: 700;
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -382,7 +382,7 @@ export default {
|
||||
}
|
||||
});
|
||||
|
||||
this.$emit('addOrUpdateMapModel', model);
|
||||
this.$emit('updateMapModel', model);
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.selectedSectionEmpty'));
|
||||
}
|
||||
@ -394,7 +394,7 @@ export default {
|
||||
this.$refs['dataform'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'Signal'}, this.editModel);
|
||||
this.$emit('addOrUpdateMapModel', data);
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -408,7 +408,8 @@ export default {
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('delMapModel', selected);
|
||||
// _that.$emit('delMapModel', selected);
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
|
@ -238,7 +238,7 @@ export default {
|
||||
}
|
||||
});
|
||||
|
||||
this.$emit('addOrUpdateMapModel', model);
|
||||
this.$emit('updateMapModel', model);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -248,7 +248,7 @@ export default {
|
||||
this.$refs['dataform'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'Station'}, this.editModel);
|
||||
this.$emit('addOrUpdateMapModel', data);
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -262,7 +262,7 @@ export default {
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('delMapModel', selected);
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
|
@ -206,7 +206,7 @@ export default {
|
||||
}
|
||||
});
|
||||
|
||||
this.$emit('addOrUpdateMapModel', model);
|
||||
this.$emit('updateMapModel', model);
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.selectedStationEmpty'));
|
||||
}
|
||||
@ -218,7 +218,7 @@ export default {
|
||||
this.$refs['dataform'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'StationControl'}, this.editModel);
|
||||
this.$emit('addOrUpdateMapModel', data);
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -232,7 +232,8 @@ export default {
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('delMapModel', _that.selected);
|
||||
// _that.$emit('delMapModel', _that.selected);
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user