代码哈尔滨实训数据&本地导入导出

This commit is contained in:
fan 2020-04-09 18:22:10 +08:00
parent 47e692d3a4
commit 7e0834b13a
8 changed files with 267 additions and 95 deletions

View File

@ -27,6 +27,7 @@
"nprogress": "^0.2.0",
"path-to-regexp": "2.4.0",
"qrcode.vue": "^1.6.2",
"qs": "^6.9.3",
"script-loader": "^0.7.2",
"sessionstorage": "^0.1.0",
"sockjs-client": "^1.4.0",

View File

@ -174,6 +174,24 @@ export function toSortMap(data) {
});
}
/** 导出本地需要相关地图数据 */
export function localExportMap(data) {
return request({
url: '/api/map/local/export',
method: 'post',
data: data
});
}
/** 导入本地需要相关地图数据 */
export function localImportMap(data) {
return request({
url: '/api/map/local/import',
method: 'post',
data: data
});
}
/** 根据group获取排序的车站列表包含车辆段/停车场) */
export function getByGroupStationList(group) {
return request({

View File

@ -148,8 +148,12 @@
<el-button v-if="queryForm.reset" type="primary" size="small" :disabled="!canQuery" @click="doClean">{{ $t('global.reset') }}</el-button>
<el-button v-if="exportFlag" type="primary" size="small" :disabled="!canQuery" @click="doExport">{{ $t('global.export') }}</el-button>
<template v-for="(button, index) in queryList.actions">
<el-button v-if="button.fileType==='file'" :key="index" :type="button.type ? button.type: 'primary'" size="small" class="button_style" :disabled="button.disabled" :loading="button.disabled">
<input ref="files" type="file" class="file_box" accept=".json, application/json" @change="button.handler">
{{ $t('map.importMap') }}
</el-button>
<el-button
v-if="button.hasOwnProperty('show') ? button.show: true"
v-else-if="button.hasOwnProperty('show') ? button.show: true"
:key="index"
:type="button.type ? button.type: 'primary'"
size="small"
@ -519,4 +523,13 @@ export default {
margin-left: 0;
margin-bottom: 10px;
}
.file_box {
width: 50px;
height: 30px;
position: absolute;
left: 0;
top: 0;
opacity: 0;
cursor: pointer;
}
</style>

View File

@ -32,11 +32,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0405',
operateType: 'Section_Block',
skinCode: '07',
trainingName: '区段封锁({8}{9})',
trainingRemark: '区段封锁功能',
trainingType: '04',
trainingType: 'Section',
productTypes: ['02'], // 产品类型 01 现地 02 行调
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '403', tip: '鼠标右键菜单选择【区段封锁】' },
@ -46,11 +46,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0405',
operateType: 'Section_Block',
skinCode: '07',
trainingName: '区段封锁({8}{9})',
trainingRemark: '区段封锁功能',
trainingType: '04',
trainingType: 'Section',
productTypes: ['01'], // 产品类型 01 现地 02 行调
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该区段' },
@ -61,11 +61,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0406',
operateType: 'Section_Unblock',
skinCode: '07',
trainingName: '区段解封({8}{9})',
trainingRemark: '区段解封功能',
trainingType: '04',
trainingType: 'Section',
productTypes: ['02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '404', tip: '鼠标右键菜单选择【区段解封】' },
@ -78,11 +78,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0406',
operateType: 'Section_Unblock',
skinCode: '07',
trainingName: '区段解封({8}{9})',
trainingRemark: '区段解封功能',
trainingType: '04',
trainingType: 'Section',
productTypes: ['01'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该区段' },
@ -93,11 +93,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0407',
operateType: 'Section_Set_Limit_Speed',
skinCode: '07',
trainingName: '区段设置限速({8}{9})',
trainingRemark: '区段设置限速功能限速值5',
trainingType: '04',
trainingType: 'Section',
productTypes: ['02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '407', tip: '鼠标右键菜单选择【区段设置限速】' },
@ -112,11 +112,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0408',
operateType: 'Section_Cancel_Limit_Speed',
skinCode: '07',
trainingName: '区段取消限速({8}{9})',
trainingRemark: '区段取消限速功能',
trainingType: '04',
trainingType: 'Section',
productTypes: ['02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '408', tip: '鼠标右键菜单选择【区段取消限速】' },
@ -130,11 +130,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0401',
operateType: 'Section_Fault_Unlock',
skinCode: '02',
trainingName: '区段故障解锁({8}{9})',
trainingRemark: '故障解锁功能',
trainingType: '04',
trainingType: 'Section',
productTypes: ['01'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该区段' },
@ -146,11 +146,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0312', // 0312 新增定位字典
operateType: 'Switch_Normal_Position', // 0312 新增定位字典
skinCode: '07',
trainingName: '单操到定位({7})',
trainingRemark: '单操到定位({15})',
trainingType: '03',
trainingType: 'Switch',
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '101', tip: '鼠标右键菜单选择【单操到定位】' },
@ -160,11 +160,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0312',
operateType: 'Switch_Normal_Position',
skinCode: '07',
trainingName: '单操到定位({7})',
trainingRemark: '单操到定位({15})',
trainingType: '03',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该道岔' },
@ -175,11 +175,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0313', // 0313 新增定位字典
operateType: 'Switch_Reverse_Position', // 0313 新增定位字典
skinCode: '07',
trainingName: '单操到反位({7})',
trainingRemark: '单操到反位({7})',
trainingType: '03',
trainingType: 'Switch',
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '102', tip: '鼠标右键菜单选择【单操到反位】' },
@ -189,11 +189,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0313', // 0313 新增定位字典
operateType: 'Switch_Reverse_Position', // 0313 新增定位字典
skinCode: '07',
trainingName: '单操到反位({7})',
trainingRemark: '单操到反位({7})',
trainingType: '03',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该道岔' },
@ -204,11 +204,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0301',
operateType: 'Switch_Single_Lock',
skinCode: '07',
trainingName: '道岔单锁({7})',
trainingRemark: '道岔单锁功能',
trainingType: '03',
trainingType: 'Switch',
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' },
@ -218,11 +218,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0301',
operateType: 'Switch_Single_Lock',
skinCode: '07',
trainingName: '道岔单锁({7})',
trainingRemark: '道岔单锁功能',
trainingType: '03',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该道岔' },
@ -233,11 +233,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0302',
operateType: 'Switch_Single_Unlock',
skinCode: '07',
trainingName: '道岔单解({7})',
trainingRemark: '道岔单解功能',
trainingType: '03',
trainingType: 'Switch',
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔单解】' },
@ -247,11 +247,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0302',
operateType: 'Switch_Single_Unlock',
skinCode: '07',
trainingName: '道岔单解({7})',
trainingRemark: '道岔单解功能',
trainingType: '03',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该道岔' },
@ -262,11 +262,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0303',
operateType: 'Switch_Block',
skinCode: '07',
trainingName: '道岔封锁({7})',
trainingRemark: '道岔封锁功能',
trainingType: '03',
trainingType: 'Switch',
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔封锁】' },
@ -276,11 +276,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0303',
operateType: 'Switch_Block',
skinCode: '07',
trainingName: '道岔封锁({7})',
trainingRemark: '道岔封锁功能',
trainingType: '03',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该道岔' },
@ -291,11 +291,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0304',
operateType: 'Switch_Unblock',
skinCode: '07',
trainingName: '道岔解封({7})',
trainingRemark: '道岔解封功能',
trainingType: '03',
trainingType: 'Switch',
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔解封】' },
@ -305,11 +305,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0304',
operateType: 'Switch_Unblock',
skinCode: '07',
trainingName: '道岔解封({7})',
trainingRemark: '道岔解封功能',
trainingType: '03',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该道岔' },
@ -320,11 +320,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0303',
operateType: 'Switch_Section_Block',
skinCode: '07',
trainingName: '道岔区段封锁({7})',
trainingRemark: '区段封锁功能',
trainingType: '03',
trainingType: 'Switch',
productTypes: ['01'], // 产品类型 01 现地 02 行调
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该道岔' },
@ -335,7 +335,7 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0304',
operateType: 'Switch_Section_Unblock',
skinCode: '07',
trainingName: '道岔区段解封({7})',
trainingRemark: '区段解封功能',
@ -350,11 +350,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0306',
operateType: 'Switch_Fault_Unlock',
skinCode: '02',
trainingName: '道岔区段故障解锁({7})',
trainingRemark: '故障解锁功能',
trainingType: '03',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该道岔' },
@ -362,15 +362,45 @@ export default {
{ deviceType: '03', orderNum: 3, operateCode: '008', tip: '鼠标左键点击【执行】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Set_Limit_Speed',
skinCode: '02',
trainingName: '道岔区段设置临时限速({7})',
trainingRemark: '轨区设限功能',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该道岔' },
{ deviceType: '03', orderNum: 2, operateCode: '113', tip: '鼠标左键点击【轨区设限】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '008', tip: '鼠标左键点击【执行】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Cancel_Limit_Speed',
skinCode: '02',
trainingName: '道岔区段取消临时限速({7})',
trainingRemark: '轨区消限功能',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该道岔' },
{ deviceType: '03', orderNum: 2, operateCode: '114', tip: '鼠标左键点击【轨区消限】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '008', tip: '鼠标左键点击【执行】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0201',
operateType: 'Signal_Set_Route',
skinCode: '07',
trainingName: '排列进路({3})',
trainingRemark: '选择排列进路',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【排列进路】' },
@ -381,11 +411,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0201',
operateType: 'Signal_Set_Route',
skinCode: '07',
trainingName: 'ATP进路({3})',
trainingRemark: '选择ATP进路',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该信号机' },
@ -397,25 +427,25 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0202',
operateType: 'Signal_Cancel_Route',
skinCode: '07',
trainingName: '进路取消({3})',
trainingRemark: '进路取消',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【取消进路】' },
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【进路取消】' },
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0202',
minDuration: 8,
operateType: 'Signal_Cancel_Route',
skinCode: '07',
trainingName: '取消ATP({3})',
trainingRemark: '取消ATP',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该信号机' },
@ -427,11 +457,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0203',
operateType: 'Signal_Block',
skinCode: '07',
trainingName: '封锁信号({5})',
trainingRemark: '封锁信号',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【封锁信号】' },
@ -441,11 +471,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0203',
operateType: 'Signal_Block',
skinCode: '07',
trainingName: '封锁信号({5})',
trainingRemark: '封锁信号',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该信号机' },
@ -456,11 +486,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0204',
operateType: 'Signal_Unblock',
skinCode: '07',
trainingName: '解封信号({5})',
trainingRemark: '解封信号',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【解封信号】' },
@ -474,11 +504,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0204',
operateType: 'Signal_Unblock',
skinCode: '07',
trainingName: '解封信号({5})',
trainingRemark: '解封信号',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该信号机' },
@ -489,11 +519,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0208',
operateType: 'Signal_Open_Auto_Setting',
skinCode: '07',
trainingName: '自排单开({5})',
trainingRemark: '自排单开',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【自排单开】' },
@ -504,11 +534,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0208',
operateType: 'Signal_Open_Auto_Setting',
skinCode: '07',
trainingName: '自排单开({5})',
trainingRemark: '自排单开',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该信号机' },
@ -519,11 +549,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0209',
operateType: 'Signal_Close_Auto_Setting',
skinCode: '07',
trainingName: '自排单关({5})',
trainingRemark: '自排单关',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【自排单关】' },
@ -534,11 +564,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0209',
operateType: 'Signal_Close_Auto_Setting',
skinCode: '07',
trainingName: '自排单关({5})',
trainingRemark: '自排单关',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该信号机' },
@ -549,11 +579,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0205',
operateType: 'Signal_Close_Signal',
skinCode: '07',
trainingName: '关单信号({3})',
trainingRemark: '关单信号',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '313', tip: '鼠标右键菜单选择【关单信号】' },
@ -563,11 +593,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0205',
operateType: 'Signal_Close_Signal',
skinCode: '07',
trainingName: '关单信号({3})',
trainingRemark: '关单信号',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该信号机' },
@ -578,11 +608,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0206',
operateType: 'Signal_Reopen_Signal',
skinCode: '07',
trainingName: '重复开放({3})',
trainingRemark: '重复开放',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【重复开放】' },
@ -592,11 +622,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0206',
operateType: 'Signal_Reopen_Signal',
skinCode: '07',
trainingName: '重复开放({3})',
trainingRemark: '重复开放',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该信号机' },
@ -607,11 +637,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0216',
operateType: 'Signal_Set_Guide',
skinCode: '07',
trainingName: '引导进路({3})',
trainingRemark: '引导进路办理',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该信号机' },
@ -623,11 +653,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0217',
operateType: 'Signal_Human_Release_Route',
skinCode: '07',
trainingName: '取消引导({3})',
trainingRemark: '取消引导',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该信号机' },
@ -639,11 +669,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0213',
operateType: 'Signal_Set_CI_Auto',
skinCode: '07',
trainingName: '追踪单开({5})',
trainingRemark: '追踪单开',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '309', tip: '鼠标右键菜单选择【追踪单开】' },
@ -653,11 +683,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0213',
operateType: 'Signal_Set_CI_Auto',
skinCode: '07',
trainingName: '追踪单开({5})',
trainingRemark: '追踪单开',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该信号机' },
@ -668,11 +698,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0214',
operateType: 'Signal_Cancel_CI_Auto',
skinCode: '07',
trainingName: '追踪单关({5})',
trainingRemark: '追踪单关',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '310', tip: '鼠标右键菜单选择【追踪单关】' },
@ -682,11 +712,11 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: '0214',
operateType: 'Signal_Cancel_CI_Auto',
skinCode: '07',
trainingName: '追踪单关({5})',
trainingRemark: '追踪单关',
trainingType: '02',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该信号机' },

View File

@ -2,9 +2,9 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// 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.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://192.168.3.41:9000'; // 张赛

View File

@ -1,5 +1,6 @@
import axios from 'axios';
import store from '@/store/index_APP_TARGET';
import qs from 'qs';
import { i18n } from '@/main.js';
import { MessageBox } from 'element-ui';
import { getToken } from '@/utils/auth';
@ -23,6 +24,11 @@ service.interceptors.request.use(config => {
if (config.time) {
config.timeout = config.time; // 让每个请求携带自定义token 请根据实际情况自行修改
}
if (config.method === 'get') {
config.paramsSerializer = function(params) {
return qs.stringify(params, { arrayFormat: 'repeat' });
};
}
return config;
}, error => {
// Do something with request error

View File

@ -5,23 +5,27 @@
<update-operate ref="updateCityName" :title="$t('publish.updateCityName')" type="updateCityName" @create="handleCityUpdate" />
<set-project ref="setProject" @refresh="reloadTable" />
<copy-map ref="copyMap" @refresh="reloadTable" />
<local-map ref="localMap" />
<!--<input ref="files" type="file" class="file_box" accept=".json, application/json" style="display: none" @change="importf">-->
</div>
</template>
<script>
import { getPublishMapList, delPublishMap, getPublishMapExport, putMapOnLine, putMapOffLine, updatePublishMapName, updatePublishMapCity, simulationCheck } from '@/api/jmap/map';
import { getPublishMapList, delPublishMap, getPublishMapExport, putMapOnLine, putMapOffLine, updatePublishMapName, updatePublishMapCity, simulationCheck, localImportMap } from '@/api/jmap/map';
import { getLineCodeList } from '@/api/management/mapline';
import localStore from 'storejs';
import UpdateOperate from './draft.vue';
import SetProject from './project';
import CopyMap from './copy';
import LocalMap from './localMap';
export default {
name: 'PublishMap',
components: {
UpdateOperate,
SetProject,
CopyMap
CopyMap,
LocalMap
},
data() {
return {
@ -134,7 +138,9 @@ export default {
}
],
actions: [
{ text: '地图排序', handler: this.mapSort }
{ text: '地图排序', handler: this.mapSort },
{ text: '导出', handler: this.localExport},
{ text: '导入', handler: this.localImport, fileType: 'file'}
]
},
@ -356,6 +362,38 @@ export default {
mapSort() {
this.$router.push({ path: `/publish/mapSort`});
},
localExport() {
this.$refs['localMap'].doShow();
},
localImport() {
const loading = this.$loading({
lock: true,
text: '正在导入中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => {
const obj = this.$refs.files;
if (!obj.files) return;
const f = obj.files[0];
const reader = new FileReader();
const that = this;
reader.readAsText(f, 'utf-8');
reader.onload = function(e) {
const data = e.target.result;
localImportMap(JSON.parse(data)).then(res => {
loading.close();
that.$message.success('导入成功!');
that.loadInitData();
loading.close();
}).catch(error => {
loading.close();
that.$message.error('导入失败' + error.message);
});
obj.value = '';
};
});
},
//
queryExportDataSame(data) {
const mapProps = {};

View File

@ -0,0 +1,66 @@
<template>
<el-dialog v-dialogDrag title="导出地图" :visible.sync="dialogVisible" width="30%" center>
<el-select v-model="selectMapList" multiple placeholder="请选择" style="text-align: center">
<el-option
v-for="item in publishMapList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
<span slot="footer" class="dialog-footer">
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button @click="dialogVisible = false">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { localExportMap, getPublishMapList } from '@/api/jmap/map';
export default {
name: 'LocalSelectMap',
data() {
return {
dialogVisible: false,
publishMapList: [],
selectMapList: [],
formModel: {
name: '',
copyOtherData: false
}
};
},
computed: {
},
methods: {
doShow(row) {
this.dialogVisible = true;
getPublishMapList({pageSize:999, pageNum:1}).then(res =>{
if (res.code === 200) {
this.publishMapList = res.data.list;
}
}).catch(error => { this.$message.error(error.msg); });
},
async doSave() {
const list = [];
this.selectMapList.forEach(item => {
list.push( Number(item));
});
const res = await localExportMap(list);
const resultData = res.data;
if (resultData === false) {
return;
}
const content = new Blob([JSON.stringify(resultData)]);
const urlObject = window.URL || window.webkitURL || window;
const url = urlObject.createObjectURL(content);
const el = document.createElement('a');
el.href = url;
el.download = `mapList.json`;
el.click();
urlObject.revokeObjectURL(url);
}
}
};
</script>