diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index 1b993fcaa..ef8770859 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -84,7 +84,7 @@ class SkinCode extends defaultStyle { textShadowColor: '#22DFDF', nameShow: true, lineDash: [3, 3], - lineWidthMore: 0 + lineWidthMore: 2.5 }, line: { width: 5, // 区段宽度 diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/alxeEffective.vue b/src/jmapNew/theme/beijing_01/menus/dialog/alxeEffective.vue index 8bc03bb6a..28a76263d 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/alxeEffective.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/alxeEffective.vue @@ -379,10 +379,7 @@ export default { /** 确认计轴恢复工作*/ commit() { const operate = { - send: true, over:true, - type: this.operate.type, - operation: '', val: this.selected.code, cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE }; diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/routeSelection.vue b/src/jmapNew/theme/beijing_01/menus/dialog/routeSelection.vue index 6091ea617..9eabd7d2c 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/routeSelection.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/routeSelection.vue @@ -11,7 +11,7 @@ :close-on-click-modal="false" > - 车站名称 + 集中站 始端信号机 @@ -25,7 +25,7 @@ 进路列表 - 展开进路预览 + { + }).catch(() => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow({}, error.message); + this.$refs.noticeInfo.doShow(); }); } }, diff --git a/src/jmapNew/theme/components/menus/dialog/routeControl.vue b/src/jmapNew/theme/components/menus/dialog/routeControl.vue index ee8ee6f59..eb750548f 100644 --- a/src/jmapNew/theme/components/menus/dialog/routeControl.vue +++ b/src/jmapNew/theme/components/menus/dialog/routeControl.vue @@ -12,7 +12,7 @@ :close-on-click-modal="false" > - {{ $t('menu.stationName') }} + 集中站 {{ $t('menu.signal') }} diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/alxeEffective.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/alxeEffective.vue index 70959eca7..c8fe65d30 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/alxeEffective.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/alxeEffective.vue @@ -84,14 +84,12 @@ - - diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue index e09600777..52b022d73 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue @@ -21,7 +21,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; -import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; +// import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; export default { name: 'SectionMenu', diff --git a/src/jmapNew/theme/xian_02/menus/dialog/alxeEffective.vue b/src/jmapNew/theme/xian_02/menus/dialog/alxeEffective.vue deleted file mode 100644 index 091261ac9..000000000 --- a/src/jmapNew/theme/xian_02/menus/dialog/alxeEffective.vue +++ /dev/null @@ -1,401 +0,0 @@ - - - - 准备 - - - 车站 - 轨道/计轴 - - - - - - - - - - 确认 - - - - - - 确认 - - - 车站 - 轨道/计轴 - - - - - - - - - - - - - - 确认 - - - - - - 操作倒计时 - - - - - - 状态 - - - - - - - - - 关闭 - - - - - - - - - diff --git a/src/jmapNew/theme/xian_02/menus/dialog/childDialog/popupAlarm.vue b/src/jmapNew/theme/xian_02/menus/dialog/childDialog/popupAlarm.vue deleted file mode 100644 index c62af4396..000000000 --- a/src/jmapNew/theme/xian_02/menus/dialog/childDialog/popupAlarm.vue +++ /dev/null @@ -1,98 +0,0 @@ - - - - - {{ message }} - - - - - 确定 - - - - - - - diff --git a/src/jmapNew/theme/xian_02/menus/menuSection.vue b/src/jmapNew/theme/xian_02/menus/menuSection.vue index 7b3a63bd8..9a6cd12a3 100644 --- a/src/jmapNew/theme/xian_02/menus/menuSection.vue +++ b/src/jmapNew/theme/xian_02/menus/menuSection.vue @@ -4,7 +4,6 @@ - @@ -14,7 +13,6 @@ import PopMenu from '@/components/PopMenu/index'; import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl'; import SectionUnLock from './dialog/sectionUnLock'; import SpeedLimitControl from './dialog/speedLimitControl'; -import AlxeEffective from './dialog/alxeEffective'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import { mapGetters } from 'vuex'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; @@ -30,7 +28,6 @@ export default { SectionControl, SectionUnLock, SpeedLimitControl, - AlxeEffective, NoticeInfo }, props: { @@ -236,14 +233,6 @@ export default { } }); }, - // 确认计轴有效 - alxeEffective() { - commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.alxeEffective.doShow(operate, this.selected); - } - }); - }, // 区段激活 active() { commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ diff --git a/src/jmapNew/theme/xian_02/menus/menuSwitch.vue b/src/jmapNew/theme/xian_02/menus/menuSwitch.vue index 5be14c7c5..b98f3617e 100644 --- a/src/jmapNew/theme/xian_02/menus/menuSwitch.vue +++ b/src/jmapNew/theme/xian_02/menus/menuSwitch.vue @@ -4,7 +4,6 @@ - @@ -14,7 +13,6 @@ import PopMenu from '@/components/PopMenu/index'; import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl'; import SwitchUnLock from './dialog/switchUnLock'; import SpeedLimitControl from './dialog/speedLimitControl'; -import AlxeEffective from './dialog/alxeEffective'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import { mapGetters } from 'vuex'; @@ -30,7 +28,6 @@ export default { SwitchControl, SwitchUnLock, SpeedLimitControl, - AlxeEffective, NoticeInfo }, props: { @@ -324,14 +321,6 @@ export default { } }); }, - // 确认计轴有效 - alxeEffective() { - commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.alxeEffective.doShow(operate, this.selected); - } - }); - }, enabledConfirm() { this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, diff --git a/src/utils/index.js b/src/utils/index.js index 74f5b079d..ea5999a7e 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -153,7 +153,31 @@ export function deepAssign(obj, item) { const targetObj = item[keys].constructor == Array ? [] : {}; target[keys] = deepAssign(targetObj, item[keys]); } else { - target[keys] = item[keys]; + target[keys] = item[keys] || ''; + } + } + } + return Object.assign(obj, target); +} + +// 对象深拷贝并赋值 +export function deepAssigns(obj, item) { + const target = item.constructor === Array ? [] : {}; // 判断复制的目标是数组还是对象 + for (const keys in obj) { + if (item.hasOwnProperty(keys) && keys != 'instance') { // instance 对面不拷贝 + if (item[keys] && typeof item[keys] == 'object') { // 如果值是对象,就递归一下 + const targetObj = item[keys].constructor == Array ? [] : {}; + target[keys] = deepAssign(targetObj, item[keys]); + } else { + target[keys] = item[keys] || ''; + } + } else { + if (typeof obj[keys] == 'boolean') { + target[keys] = false; + } else if (typeof obj[keys] == 'number') { + target[keys] = 0; + } else if (typeof obj[keys] == 'string') { + target[keys] = ''; } } } diff --git a/src/views/newMap/newMapdraft/index.vue b/src/views/newMap/newMapdraft/index.vue index a9bd5d151..10f5e7854 100644 --- a/src/views/newMap/newMapdraft/index.vue +++ b/src/views/newMap/newMapdraft/index.vue @@ -498,9 +498,8 @@ export default { }, saveMapEvent() { // 保存地图 const map = this.$store.state.map.map; - // map.signalList.forEach(item => { - // item.namePosition = { x: 0, y: 0 }; - // item.lampPositionType = '02'; + // map.sectionList.forEach(item => { + // item.belongStation = ''; // }); if (this.$refs.jlmapVisual && map && parseInt(this.$route.params.mapId)) { if (this.verifySectionPoint(map)) { diff --git a/src/views/newMap/newMapdraft/mapoperate/section/index.vue b/src/views/newMap/newMapdraft/mapoperate/section/index.vue index 9040ccb6c..fbef3012f 100644 --- a/src/views/newMap/newMapdraft/mapoperate/section/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/section/index.vue @@ -56,7 +56,7 @@ import { mapGetters } from 'vuex'; import JTriangle from '@/jmapNew/utils/JTriangle'; import ConfigList from '../config/list'; -import { deepAssign } from '@/utils/index'; +import { deepAssign, deepAssigns } from '@/utils/index'; import LogicBlock from './logicBlock'; import TipInfo from './tipInfo'; import CreateSection from './create'; @@ -501,7 +501,7 @@ export default { } this.clear(); this.activeName = 'first'; - this.editModel = deepAssign(this.editModel, selected); + this.editModel = deepAssigns(this.editModel, selected); this.oldPoint = selected.points; this.oldLeftSectionCode = selected.leftSectionCode; this.oldRightSectionCode = selected.rightSectionCode;