From 00359591b5ef23a1d7b06afef6ba6edbbcf65734 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 19 Apr 2021 11:00:34 +0800 Subject: [PATCH] =?UTF-8?q?iscs=20=E6=96=B0=E7=89=88=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/Section/index.js | 4 +- src/router/index.js | 11 ++ src/views/iscs_new/iscsDraw/index.vue | 15 +- src/views/iscs_new/iscsPreview/index.vue | 102 ++++++++++ src/views/iscs_new/iscsPreview/iscsCanvas.vue | 185 ++++++++++++++++++ 5 files changed, 311 insertions(+), 6 deletions(-) create mode 100644 src/views/iscs_new/iscsPreview/index.vue create mode 100644 src/views/iscs_new/iscsPreview/iscsCanvas.vue diff --git a/src/jmapNew/shape/Section/index.js b/src/jmapNew/shape/Section/index.js index 652087db2..b9b079ad7 100644 --- a/src/jmapNew/shape/Section/index.js +++ b/src/jmapNew/shape/Section/index.js @@ -4,7 +4,6 @@ import ELimitLines from './ELimitLines'; // 区段限速 (私有) import ELines from './ELines'; // 创建多线条 曲线 (私有) import EblockLines from './EblockLines'; // 区段封锁特有 import ESeparator from './ESeparator'; // 分隔符 (私有) -import EDerailer from './EDerailer'; // 脱轨器 import EMouse from './EMouse'; import EAxle from './EAxle'; // 创建计轴 // import { EBackArrow, EBackArrowTriangle } from './EBackArrow'; // 折返进路箭头 @@ -62,8 +61,7 @@ export default class Section extends Group { 'separator': ESeparator, // 分隔符 'speedLimit': ELimitLines, // 限速线 'speedLimitName': ELimitName, // 限速线名称 - 'shuttleBack': EBackArrowGroup, // 折返箭头 (成都三号线显示) - 'derailer': EDerailer, //脱轨器 + 'shuttleBack': EBackArrowGroup // 折返箭头 (成都三号线显示) }; // 遍历当前线路下的绘图元素 const model = this.model; diff --git a/src/router/index.js b/src/router/index.js index 46929e7c6..8c9216eaa 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -62,6 +62,8 @@ const IscsStationConfig = () => import('@/views/iscs/iscsSystem/stationConfig/in const IscsNewDesign = () => import('@/views/iscs_new/iscsDesign/index'); const IscsNewDraw = () => import('@/views/iscs_new/iscsDraw/index'); +const IscsNewPreview = () => import('@/views/iscs_new/iscsPreview/index'); + const NewMapDraft = () => import('@/views/newMap/newMapdraft/index'); const NewDesignPlatformUser = () => import('@/views/newMap/newDesignUser/index'); @@ -225,6 +227,15 @@ export const constantRoutes = [ i18n: 'router.iscsDraw', roles: [admin] } + }, + { + path:'/iscs_new/design/compose/preview', + hidden: true, + component: IscsNewPreview, + meta: { + i18n: 'router.iscsDraw', + roles: [admin] + } }, { path:'/iscs_new/design/map/edit', diff --git a/src/views/iscs_new/iscsDraw/index.vue b/src/views/iscs_new/iscsDraw/index.vue index 33e1cc80f..da2014261 100644 --- a/src/views/iscs_new/iscsDraw/index.vue +++ b/src/views/iscs_new/iscsDraw/index.vue @@ -13,6 +13,12 @@ style="float: right; padding: 3px 0; margin-right: 5px;" @click="onSave" >保存 + 预览 @@ -200,18 +206,21 @@ export default { this.composeElemList = source.elementList; this.statusTab = this.composeElemList[0].code; } else { - this.composeElemList = []; - } + this.composeElemList = []; + } }, onSaveStatus() { this.$refs['tableform' + this.statusTab][0].$refs['form'].validate((valid) => { if (valid) { - const model = utils.deepClone(this.$refs['tableform' + this.statusTab][0].formModel); + const model = utils.deepClone(this.$refs['tableform' + this.statusTab][0].formModel); model.stateList.map(state=>{ delete state.defaultStyleSelect; delete state.defaultShapeSelect; }); this.$refs.iscsCanvas.doAction([{model, action: {shapeType: shapeType.Element, order: orders.Update}}]); this.onSave(); } }); + }, + onPreview() { + this.$router.push({ path: `/iscs_new/design/compose/preview`, query:{id:this.$route.query.id} }); } } }; diff --git a/src/views/iscs_new/iscsPreview/index.vue b/src/views/iscs_new/iscsPreview/index.vue new file mode 100644 index 000000000..188f632ba --- /dev/null +++ b/src/views/iscs_new/iscsPreview/index.vue @@ -0,0 +1,102 @@ + + + diff --git a/src/views/iscs_new/iscsPreview/iscsCanvas.vue b/src/views/iscs_new/iscsPreview/iscsCanvas.vue new file mode 100644 index 000000000..107658edc --- /dev/null +++ b/src/views/iscs_new/iscsPreview/iscsCanvas.vue @@ -0,0 +1,185 @@ + + + +