From ed4b5047bdebe90bfce4c72c7275b98a07fe31d4 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 28 Jul 2020 18:47:05 +0800 Subject: [PATCH 1/4] =?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 --- .../menus/dialog/trainSpeedLimit.vue | 92 ++++++++----------- 1 file changed, 37 insertions(+), 55 deletions(-) diff --git a/src/jmapNew/theme/components/menus/dialog/trainSpeedLimit.vue b/src/jmapNew/theme/components/menus/dialog/trainSpeedLimit.vue index cdb5ced6d..13ccf033e 100644 --- a/src/jmapNew/theme/components/menus/dialog/trainSpeedLimit.vue +++ b/src/jmapNew/theme/components/menus/dialog/trainSpeedLimit.vue @@ -11,12 +11,10 @@ :modal="false" :close-on-click-modal="false" > - - +
-
{{ messageTip }}
@@ -56,9 +54,14 @@ export default { addModel: { speedLimit: '' // 限速值 }, + rules: { + speedLimit: [ + { required: true, message: '请输入限速值', trigger: 'blur' }, + { validator: this.validateLimit, trigger: 'blur' } + ] + }, dialogShow: false, - loading: false, - messageTip:'' + loading: false }; }, computed: { @@ -82,22 +85,18 @@ export default { mounted() { }, methods: { - // validateLimit(rule, value, callback) { - // if (value) { - // callback(new Error('请输入限速值')); - // } else { - // const num = Number(value); - // if (num) { - // if (num >= 25 && num <= 65) { - // callback(); - // } else { - // callback(new Error('限速值应该在25-65之间')); - // } - // } else { - // callback(new Error('请输入数值类型')); - // } - // } - // }, + validateLimit(rule, value, callback) { + const num = Number(value); + if (num) { + if (num >= 25 && num <= 65) { + callback(); + } else { + callback(new Error('限速值应该在25-65之间')); + } + } else { + callback(new Error('请输入数值类型')); + } + }, doShow(selected) { this.selected = selected; this.addModel = { @@ -116,43 +115,26 @@ export default { this.$store.dispatch('map/setTrainWindowShow', false); }, commit() { - // this.$refs['form'].validate((valid) => { - // if (valid) { - const value = this.addModel.speedLimit; - if (!value) { - this.messageTip = '请输入限速值'; - return; - } else { - const num = Number(value); - if (num) { - if (num < 25 || num > 65) { - this.messageTip = '限速值应该在25-65之间'; - return; - } + this.$refs['form'].validate((valid) => { + if (valid) { + const group = this.$route.query.group; + const param = { + commandType: 'Set_Speed_Limit', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: { + speedLimit: this.addModel.speedLimit + } + }; + commitTrainSend(group, param).then(({valid, operate})=>{ + this.doClose(); + }).catch((error) => { + this.$refs.noticeInfo.doShow(); + this.doClose(); + }); } else { - this.messageTip = '请输入数值类型'; - return; + return false; } - } - this.messageTip = ''; - const group = this.$route.query.group; - const param = { - commandType: 'Set_Speed_Limit', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { - speedLimit: this.addModel.speedLimit - } - }; - commitTrainSend(group, param).then(({valid, operate})=>{ - this.doClose(); - }).catch((error) => { - this.$refs.noticeInfo.doShow(); - this.doClose(); }); - // } else { - // return false; - // } - // }); } } }; From 1ce9303bcbed8870091ce454db6b661c13bc93ed Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Wed, 29 Jul 2020 09:31:08 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=93=88=E5=B0=94?= =?UTF-8?q?=E6=BB=A8=E6=98=BE=E7=A4=BA=E5=B7=A6=E4=B8=8B=E8=A7=92=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/displayNew/menuDemon.vue | 6 +- .../newMap/jointTrainingNew/menuDemon.vue | 67 ++++++++++++++++--- 2 files changed, 62 insertions(+), 11 deletions(-) diff --git a/src/views/newMap/displayNew/menuDemon.vue b/src/views/newMap/displayNew/menuDemon.vue index 66318d945..54e8dd6ca 100644 --- a/src/views/newMap/displayNew/menuDemon.vue +++ b/src/views/newMap/displayNew/menuDemon.vue @@ -6,7 +6,7 @@ {{ $t('display.demon.trialTime') }} {{ countTime }} -
+
{{ $t('display.demon.dispatchingPlan') }} @@ -352,6 +352,10 @@ export default { font-size: 18px !important; color: #fff; } + .haerbin_btn_box{ + width: 420px; + bottom: 15px!important; + } @@ -361,7 +361,7 @@ export default { .display-draft { position: absolute; float: right; - right: 20px; + right: 5px; bottom: 15px; } diff --git a/src/views/newMap/displayNew/menuSchema.vue b/src/views/newMap/displayNew/menuSchema.vue index 84be4da13..6357e195b 100644 --- a/src/views/newMap/displayNew/menuSchema.vue +++ b/src/views/newMap/displayNew/menuSchema.vue @@ -265,7 +265,7 @@ export default { z-index: 9; display: inline; position: absolute; - right: 15px; + right: 5px; } /deep/ .el-button+.el-button { diff --git a/src/views/newMap/jlmapNew/pendant/zoom.vue b/src/views/newMap/jlmapNew/pendant/zoom.vue index 50bc7db13..0b2349242 100644 --- a/src/views/newMap/jlmapNew/pendant/zoom.vue +++ b/src/views/newMap/jlmapNew/pendant/zoom.vue @@ -21,7 +21,7 @@ export default { }, data() { return { - offset: 15 + offset: 10 }; }, watch: { @@ -67,7 +67,7 @@ export default { .zoom-box { z-index: 7; position: absolute; - left: 20px; + left: 5px; width: 120px; height: 32px; background: rgb(224, 223, 223); diff --git a/src/views/newMap/jointTrainingNew/index.vue b/src/views/newMap/jointTrainingNew/index.vue index 05f878886..037abb0bd 100644 --- a/src/views/newMap/jointTrainingNew/index.vue +++ b/src/views/newMap/jointTrainingNew/index.vue @@ -516,10 +516,6 @@ export default { window.open(routeData.href, '_blank', 'noopener noreferrer'); }, hidepanel() { // 司机视角 - // this.panelShow = false; - // this.drivingShow = true; - // this.ibpShow = false; - // this.$refs.Jl3dDrive.show(this.mapId, this.group); if (this.$store.state.training.prdType == '04') { this.panelShow = false; this.drivingShow = true; diff --git a/src/views/newMap/jointTrainingNew/menuDemon.vue b/src/views/newMap/jointTrainingNew/menuDemon.vue index 670059ae6..c53ff75db 100644 --- a/src/views/newMap/jointTrainingNew/menuDemon.vue +++ b/src/views/newMap/jointTrainingNew/menuDemon.vue @@ -5,28 +5,28 @@
- 设备管理 - 成员管理 - 生成二维码 + 设备管理 + 成员管理 + 生成二维码 - {{ $t('display.demon.passengerflow') }} + {{ $t('display.demon.passengerflow') }} - {{ jl3dname }} + {{ jl3dname }} - {{ $t('display.demon.deviceView') }} + {{ $t('display.demon.deviceView') }} - 退出 - 退出 + 退出 + 退出
@@ -500,7 +500,7 @@ export default { .display-draft { position: absolute; // float: right; - right: 40px; + right: 5px; bottom: 28px; // transform: translateX(calc(100% + 40px)); // transition: all 0.5s; @@ -509,7 +509,7 @@ export default { // } } .haerbin_btn_box{ - width: 420px; + width: 450px; bottom: 15px!important; } .display-type-hb{ diff --git a/src/views/newMap/jointTrainingNew/menuSchema.vue b/src/views/newMap/jointTrainingNew/menuSchema.vue index 8ff737b88..c3413a2ac 100644 --- a/src/views/newMap/jointTrainingNew/menuSchema.vue +++ b/src/views/newMap/jointTrainingNew/menuSchema.vue @@ -182,7 +182,7 @@ export default { z-index: 9; display: inline; position: absolute; - right: 20px; + right: 5px; } .schema .el-radio-group .el-radio-button__inner { From a13b21613ff6a218bbf9f59ce7995bcabf8e3997 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 29 Jul 2020 10:39:58 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=AE=81=E6=B3=A2=E4=B8=80=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF=20=E9=94=AE=E7=9B=98=E6=93=8D=E4=BD=9C=E8=B0=83?= =?UTF-8?q?=E6=95=B4=EF=BC=88=E5=9B=9E=E8=BD=A6=E4=BA=8B=E4=BB=B6=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/menus/dialog/switchControl.vue | 7 ++++ .../menus/dialog/switchHookLock.vue | 35 +++++++++++-------- .../ningbo_01/menus/dialog/switchUnLock.vue | 15 ++++++-- .../theme/ningbo_01/menus/menuSwitch.vue | 10 +++--- 4 files changed, 46 insertions(+), 21 deletions(-) diff --git a/src/jmapNew/theme/components/menus/dialog/switchControl.vue b/src/jmapNew/theme/components/menus/dialog/switchControl.vue index baa4bc3f0..ee44aab57 100644 --- a/src/jmapNew/theme/components/menus/dialog/switchControl.vue +++ b/src/jmapNew/theme/components/menus/dialog/switchControl.vue @@ -137,6 +137,13 @@ export default { return ''; } }, + watch:{ + '$store.state.map.keyboardEnterCount': function (val) { + if (this.dialogShow && this.popClass === 'ningbo-01__systerm') { + this.commit(); + } + } + }, mounted() { this.$nextTick(() => { this.$store.dispatch('training/tipReload'); diff --git a/src/jmapNew/theme/components/menus/dialog/switchHookLock.vue b/src/jmapNew/theme/components/menus/dialog/switchHookLock.vue index d2d185c24..bb9a09244 100644 --- a/src/jmapNew/theme/components/menus/dialog/switchHookLock.vue +++ b/src/jmapNew/theme/components/menus/dialog/switchHookLock.vue @@ -50,8 +50,8 @@ export default { name: 'SwitchHookLock', components: { NoticeInfo - }, - props: { + }, + props: { popClass: { type: String, default() { @@ -67,18 +67,25 @@ export default { operation: '', stationName: '', switchName: '', - normal:false, - targetMemberId: '' + normal:false, + targetMemberId: '' }; }, computed: { - ...mapGetters('training', [ + ...mapGetters('training', [ 'memberList' ]), show() { return this.dialogShow && !this.$store.state.menuOperation.break; } }, + watch:{ + '$store.state.map.keyboardEnterCount': function (val) { + if (this.dialogShow && this.popClass === 'ningbo-01__systerm') { + this.commit(); + } + } + }, mounted() { this.$nextTick(() => { this.$store.dispatch('training/tipReload'); @@ -91,10 +98,10 @@ export default { this.switchName = ''; this.stationName = ''; if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) { - this.switchName = selected.name; + this.switchName = selected.name; const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); if (station) { - this.targetMemberId = this.memberList.find(ele => ele.deviceCode == station.code).id; + this.targetMemberId = this.memberList.find(ele => ele.deviceCode == station.code).id; this.stationName = station.name; } } @@ -116,20 +123,20 @@ export default { }, commit() { this.loading = true; - const group = this.$route.query.group; + const group = this.$route.query.group; const param = { commandType: 'Switch_Hook_Lock', targetMemberId: this.targetMemberId, params: { - switchCode: this.selected.code, - normal: this.normal - } + switchCode: this.selected.code, + normal: this.normal + } }; commitTrainSend(group, param).then(({valid, operate})=>{ - this.doClose(); + this.doClose(); }).catch((error) => { - this.$refs.noticeInfo.doShow(error.message); - this.doClose(); + this.$refs.noticeInfo.doShow(error.message); + this.doClose(); }); } } diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue index e2342dec2..cab53a35f 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue @@ -28,7 +28,7 @@
道岔
- + @@ -140,6 +140,17 @@ export default { return ''; } }, + watch:{ + '$store.state.map.keyboardEnterCount': function (val) { + if (this.dialogShow) { + if (this.disabledConfirm2 && !this.disabledConfirm1) { + this.confirm1(); + } else if (this.disabledConfirm1 && !this.disabledConfirm2 ) { + this.confirm2(); + } + } + } + }, mounted() { this.$nextTick(() => { this.$store.dispatch('training/tipReload'); @@ -180,7 +191,6 @@ export default { this.$store.dispatch('training/emitTipFresh'); mouseCancelState(this.selected); }, - SelectChange() { const operate = { operation: '', @@ -197,6 +207,7 @@ export default { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.selectSwitch.blur(); } }).catch(() => { this.$refs.noticeInfo.doShow(); diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue index 163670045..2d99e6b72 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue @@ -94,11 +94,11 @@ export default { handler: this.reverse, cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION }, - { - label: '道岔单锁', - handler: this.lock, - cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK - }, + // { + // label: '道岔单锁', + // handler: this.lock, + // cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK + // }, { type: 'separator' },