From fb9fcc30a3e8fbc76ef1652d6ba686f2c97bcc0b Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 13 Mar 2020 20:02:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/Train/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/jmapNew/shape/Train/index.js b/src/jmapNew/shape/Train/index.js index 0f518405e..4b6da6300 100644 --- a/src/jmapNew/shape/Train/index.js +++ b/src/jmapNew/shape/Train/index.js @@ -18,8 +18,6 @@ export default class Train extends Group { this.z = 40; this.size = 0; this.section = null; - this.nextPointIndex = 1; - this.currentAdd = 0; this.isShowShape = true; this.fontSize = style.Train.common.useSelfText ? style.Train.common.nameFontSize || style.Train.common.trainTextFontSize : model.nameFontSize || style.Train.common.nameFontSize || style.Train.common.trainTextFontSize; this.newScale = this.fontSize / style.Train.common.trainTextFontSize; @@ -183,19 +181,21 @@ export default class Train extends Group { // } // debugger; // 目标距离 + console.log('2222222222///////////////////////', this.currentAdd); let targetDistance = Math.sqrt( Math.pow(points[this.nextPointIndex - 1].x - points[this.nextPointIndex].x, 2) + Math.pow(points[this.nextPointIndex - 1].y - points[this.nextPointIndex].y, 2), ); const right = train.right == 1 ? 0 : 1; let currentDistance = this.lineLength * Math.abs(right - train.offsetp) - this.currentAdd; + console.log('33333333333/////////////////', currentDistance); // 利用运动距离与目标距离, 判断运动的点是否超过下一个目标点, 超过了就重置下一个点 if (currentDistance >= targetDistance) { this.nextPointIndex++; this.currentAdd += targetDistance; if (this.nextPointIndex <= points.length - 1) { currentDistance = this.lineLength * Math.abs(right - train.offsetp) - this.currentAdd; - console.log('///////////////////////////////////', this.currentAdd); + console.log('44444444444///////////////', this.currentAdd); console.log('///////////////////////////////////', currentDistance); targetDistance = Math.sqrt( Math.pow(points[this.nextPointIndex - 1].x - points[this.nextPointIndex].x, 2) + @@ -527,6 +527,8 @@ export default class Train extends Group { item.show(); }); this.isShowShape = true; + this.nextPointIndex = 1; + this.currentAdd = 0; this.setState(this.model, this); } else { this.eachChild(item => { From 0e570584bcab834762af3d18243297092ce43cf9 Mon Sep 17 00:00:00 2001 From: joylink_zyy <> Date: Fri, 13 Mar 2020 21:17:20 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4ibp=E7=BB=98=E5=88=B6?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/baseUrl.js | 4 +- src/views/ibpsystem/index.vue | 21 +- src/views/system/ibpDraw/ibpOperate/index.vue | 199 ++++++++++++------ src/views/system/ibpDraw/index.vue | 9 +- 4 files changed, 153 insertions(+), 80 deletions(-) diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index d8b10d887..ae880e5e3 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,10 +3,10 @@ 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.41:9000'; // 张赛 + // BASE_API = 'http://192.168.3.41:9000'; // 张赛 // BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 diff --git a/src/views/ibpsystem/index.vue b/src/views/ibpsystem/index.vue index 061f54c73..c310b0bf3 100644 --- a/src/views/ibpsystem/index.vue +++ b/src/views/ibpsystem/index.vue @@ -1,6 +1,6 @@ @@ -58,6 +58,9 @@ export default { ]), ibpId() { return ['ibp', (Math.random().toFixed(5)) * 100000].join('_'); + }, + width() { + return this.canvasWidth - 200; } }, watch: { @@ -198,18 +201,14 @@ export default { this.$ibp.setClockStart(started); }, reSize() { - this.$nextTick(() => { - this.width = this.$store.state.config.width; - this.height = this.$store.state.config.height; - this.$ibp && this.$ibp.resize({ width: this.width, height: this.height }); - }); + this.width = this.$store.state.config.width; + this.height = this.$store.state.config.height; + this.$ibp && this.$ibp.resize({ width: this.width, height: this.height }); }, setWindowSize() { - this.$nextTick(() => { - const width = this.size ? this.size.width : this.$store.state.app.width; - const height = this.size ? this.size.height : this.$store.state.app.height; - this.$store.dispatch('config/resize', { width: width, height: height }); - }); + const width = this.size ? this.size.width : this.$store.state.app.width; + const height = this.size ? this.size.height : this.$store.state.app.height; + this.$store.dispatch('config/resize', { width: width, height: height }); }, back() { this.group = this.$route.query.group; diff --git a/src/views/system/ibpDraw/ibpOperate/index.vue b/src/views/system/ibpDraw/ibpOperate/index.vue index a4a2e835c..8db098306 100644 --- a/src/views/system/ibpDraw/ibpOperate/index.vue +++ b/src/views/system/ibpDraw/ibpOperate/index.vue @@ -1,141 +1,159 @@ @@ -254,5 +272,58 @@ export default { .map-control { float: right; width: 100%; + height: 100%; + } + .clearfix{ + height: 50px; + padding: 0 22px; + } + .ibpEdit{ + height: calc(100% - 50px); + } + + /deep/ { + .ibpEdit .el-tabs__nav-wrap.is-scrollable { + padding: 0 20px; + } + .ibpEdit .el-tabs__header{ + margin: 0; + } + .ibpEdit .el-tabs__header .el-tabs__item.is-active { + border-bottom-color: #f5f7fa; + background: #f5f7fa; + } + .ibpEdit .el-tabs__active-bar{ + background: transparent; + } + .ibpEdit .el-tabs__content { + height: calc(100% - 56px); + padding-top: 15px; + // overflow-y: scroll; + } + + .card .el-tabs__nav .el-tabs__item.is-active { + border-bottom: 2px solid #E4E7ED; + background: #409eff; + color: #fff; + } + + .ibpEdit .el-tabs__nav-prev { + width: 20px; + height: 41px; + display: flex; + justify-content: center; + align-items: center; + box-shadow: 1px 1px 4px #ccc; + } + + .ibpEdit .el-tabs__nav-next { + width: 20px; + height: 41px; + display: flex; + justify-content: center; + align-items: center; + box-shadow: 1px 1px 4px #ccc; + } } diff --git a/src/views/system/ibpDraw/index.vue b/src/views/system/ibpDraw/index.vue index d74d62bdd..02a31261d 100644 --- a/src/views/system/ibpDraw/index.vue +++ b/src/views/system/ibpDraw/index.vue @@ -13,6 +13,7 @@