From e5af672515304909b84a6fffb10e86024da5cf87 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 28 Jul 2020 13:03:03 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E7=BB=98=E5=9B=BE?= =?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 --- .../newMapdraft/mapoperate/ImageControl.vue | 18 +------- .../newMap/newMapdraft/mapoperate/arrow.vue | 10 +++-- .../newMapdraft/mapoperate/controlLamp.vue | 45 ++++--------------- .../newMap/newMapdraft/mapoperate/counter.vue | 12 +---- .../newMapdraft/mapoperate/delayunlock.vue | 13 ++---- .../newMapdraft/mapoperate/lcControl.vue | 15 +------ .../newMap/newMapdraft/mapoperate/line.vue | 13 +----- .../newMap/newMapdraft/mapoperate/power.vue | 10 +---- .../newMap/newMapdraft/mapoperate/text.vue | 10 +---- .../newMapdraft/mapoperate/zcControl.vue | 18 +------- 10 files changed, 26 insertions(+), 138 deletions(-) diff --git a/src/views/newMap/newMapdraft/mapoperate/ImageControl.vue b/src/views/newMap/newMapdraft/mapoperate/ImageControl.vue index ffc2f5a08..52628ea4d 100644 --- a/src/views/newMap/newMapdraft/mapoperate/ImageControl.vue +++ b/src/views/newMap/newMapdraft/mapoperate/ImageControl.vue @@ -15,7 +15,7 @@ ref="createForm" :create-form="makeForm" :add-model="addModel" - :create-rules="createRules" + :create-rules="rules" @create="create" /> @@ -153,22 +153,6 @@ export default { }; return form; - }, - createRules: function () { - return { - width: [ - { required: true, message: this.$t('map.pleaseEnterImageWidth'), trigger: 'blur' } - ], - height: [ - { required: true, message: this.$t('map.pleaseEnterImageHeight'), trigger: 'blur' } - ], - 'position.x': [ - { required: true, message: this.$t('map.pleaseEnterXCoordinate'), trigger: 'blur' } - ], - 'position.y': [ - { required: true, message: this.$t('map.pleaseEnterYCoordinate'), trigger: 'blur' } - ] - }; } }, mounted() { diff --git a/src/views/newMap/newMapdraft/mapoperate/arrow.vue b/src/views/newMap/newMapdraft/mapoperate/arrow.vue index 569673333..03bbdb66b 100644 --- a/src/views/newMap/newMapdraft/mapoperate/arrow.vue +++ b/src/views/newMap/newMapdraft/mapoperate/arrow.vue @@ -15,7 +15,7 @@ ref="createForm" :create-form="createForm" :add-model="addModel" - :create-rules="makeRules" + :create-rules="rules" @create="create" /> @@ -77,9 +77,13 @@ export default { rules: { code: [ { required: true, message: this.$t('rules.pleaseSelectLine'), trigger: 'blur' } + ], + 'position.x': [ + { required: true, message: this.$t('rules.trainPositionX'), trigger: 'blur' } + ], + 'position.y': [ + { required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' } ] - }, - makeRules: { } }; }, diff --git a/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue b/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue index ef258b642..6aaed7dbb 100644 --- a/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue +++ b/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue @@ -5,14 +5,14 @@ ref="dataform" :form="form" :edit-model="editModel" - :rules="editRules" + :rules="rules" :type="editModel.type" @updateMapModel="updateMapModel" />
- +
提示:设置归属车站时,坐标会默认设置为车站下方50px
@@ -130,23 +130,6 @@ export default { pfNum: 0, switchCode: '' }, - rules: { - code: [ - { required: true, message: this.$t('rules.selectSaidLampType'), trigger: 'change' } - ], - name: [ - { required: true, message: this.$t('rules.enterSaidLampName'), trigger: 'blur' } - ], - 'position.x': [ - { required: true, message: this.$t('rules.trainPositionX'), trigger: 'blur' } - ], - 'position.y': [ - { required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' } - ], - stationCode: [ - { required: true, message: this.$t('rules.pleaseSelectStationCode'), trigger: 'change'} - ] - }, field: '' }; }, @@ -207,11 +190,17 @@ export default { }; return form; }, - editRules: function () { + rules: function () { return { type: [ { required: true, message: this.$t('rules.selectSaidLampType'), trigger: 'change' } ], + code: [ + { required: true, message: this.$t('rules.pleaseSelectEncoding'), trigger: 'change' } + ], + name: [ + { required: true, message: this.$t('rules.enterSaidLampName'), trigger: 'blur' } + ], 'position.x': [ { required: true, message: this.$t('rules.trainPositionX'), trigger: 'blur' } ], @@ -226,22 +215,6 @@ export default { ] }; }, - createRules: function () { - return { - type: [ - { required: true, message: this.$t('rules.selectSaidLampType'), trigger: 'change' } - ], - name: [ - { required: true, message: this.$t('rules.enterSaidLampName'), trigger: 'blur' } - ], - stationCode: [ - { required: true, message: this.$t('rules.pleaseSelectStationCode'), trigger: 'change'} - ], - switchCode: [ - { required: true, message: '请选择所属道岔!', trigger: 'change'} - ] - }; - }, isButtonType() { return this.field == 'switchSelectCode'; } diff --git a/src/views/newMap/newMapdraft/mapoperate/counter.vue b/src/views/newMap/newMapdraft/mapoperate/counter.vue index 3b49ff3c8..c9ad95e0b 100644 --- a/src/views/newMap/newMapdraft/mapoperate/counter.vue +++ b/src/views/newMap/newMapdraft/mapoperate/counter.vue @@ -15,7 +15,7 @@ ref="createForm" :create-form="formMake" :add-model="addModel" - :create-rules="createRules" + :create-rules="rules" @create="create" /> @@ -75,16 +75,6 @@ export default { 'stationList', 'lineCode' ]), - createRules: function () { - return { - type: [ - { required: true, message: this.$t('map.selectCounterType'), trigger: 'change' } - ], - stationCode: [ - { required: true, message: this.$t('map.selectStation'), trigger: 'change' } - ] - }; - }, rules: function () { return { code: [ diff --git a/src/views/newMap/newMapdraft/mapoperate/delayunlock.vue b/src/views/newMap/newMapdraft/mapoperate/delayunlock.vue index 0122a5308..ac94a72d7 100644 --- a/src/views/newMap/newMapdraft/mapoperate/delayunlock.vue +++ b/src/views/newMap/newMapdraft/mapoperate/delayunlock.vue @@ -5,7 +5,7 @@ ref="dataform" :form="form" :edit-model="editModel" - :rules="editRules" + :rules="rules" type="DelayUnlock" @updateMapModel="updateMapModel" /> @@ -15,7 +15,7 @@ ref="createForm" :create-form="formMake" :add-model="addModel" - :create-rules="createRules" + :create-rules="rules" @create="create" /> @@ -71,14 +71,7 @@ export default { 'stationList', 'lineCode' ]), - createRules: function () { - return { - stationCode: [ - { required: true, message: this.$t('map.selectStation'), trigger: 'change' } - ] - }; - }, - editRules: function () { + rules: function () { return { code: [ { required: true, message: this.$t('map.pleaseSelectDevice'), trigger: 'change' } diff --git a/src/views/newMap/newMapdraft/mapoperate/lcControl.vue b/src/views/newMap/newMapdraft/mapoperate/lcControl.vue index 0d5902afb..89aa89c59 100644 --- a/src/views/newMap/newMapdraft/mapoperate/lcControl.vue +++ b/src/views/newMap/newMapdraft/mapoperate/lcControl.vue @@ -15,7 +15,7 @@ ref="createForm" :create-form="createForm" :add-model="addModel" - :create-rules="createRules" + :create-rules="rules" @create="create" /> @@ -87,19 +87,6 @@ export default { 'lcList', 'lineCode' ]), - createRules: function () { - return { - name: [ - { required: true, message: this.$t('rules.pleaseEnterStatusSignal'), trigger: 'blur' } - ], - 'position.x': [ - { required: true, message: this.$t('map.pleaseEnterXCoordinate'), trigger: 'blur' } - ], - 'position.y': [ - { required: true, message: this.$t('map.pleaseEnterYCoordinate'), trigger: 'blur' } - ] - }; - }, form() { const form = { labelWidth: '150px', diff --git a/src/views/newMap/newMapdraft/mapoperate/line.vue b/src/views/newMap/newMapdraft/mapoperate/line.vue index 0feab76fd..321241f77 100644 --- a/src/views/newMap/newMapdraft/mapoperate/line.vue +++ b/src/views/newMap/newMapdraft/mapoperate/line.vue @@ -15,7 +15,7 @@ ref="createForm" :create-form="createForm" :add-model="addModel" - :create-rules="makeRules" + :create-rules="rules" @create="create" /> @@ -78,17 +78,6 @@ export default { width: [ { required: true, message: this.$t('rules.pleaseSelectLineWidth'), trigger: 'blur' } ] - }, - makeRules: { - code: [ - { required: true, message: this.$t('rules.pleaseSelectLine'), trigger: 'blur' } - ], - type: [ - { required: true, message: this.$t('rules.pleaseSelectLineType'), trigger: 'change' } - ], - width: [ - { required: true, message: this.$t('rules.pleaseSelectLineWidth'), trigger: 'blur' } - ] } }; }, diff --git a/src/views/newMap/newMapdraft/mapoperate/power.vue b/src/views/newMap/newMapdraft/mapoperate/power.vue index f7ab714a1..c04be1929 100644 --- a/src/views/newMap/newMapdraft/mapoperate/power.vue +++ b/src/views/newMap/newMapdraft/mapoperate/power.vue @@ -15,7 +15,7 @@ ref="createForm" :create-form="createForm" :add-model="addModel" - :create-rules="makeRules" + :create-rules="rules" @create="create" /> @@ -76,14 +76,6 @@ export default { width: [ { required: true, message: this.$t('rules.pleaseSelectLineWidth'), trigger: 'blur' } ] - }, - makeRules: { - code: [ - { required: true, message: this.$t('rules.pleaseSelectLine'), trigger: 'blur' } - ], - width: [ - { required: true, message: this.$t('rules.pleaseSelectLineWidth'), trigger: 'blur' } - ] } }; }, diff --git a/src/views/newMap/newMapdraft/mapoperate/text.vue b/src/views/newMap/newMapdraft/mapoperate/text.vue index 07413ec65..f81cbf524 100644 --- a/src/views/newMap/newMapdraft/mapoperate/text.vue +++ b/src/views/newMap/newMapdraft/mapoperate/text.vue @@ -16,7 +16,7 @@ ref="createForm" :create-form="createForm" :add-model="addModel" - :create-rules="makeRules" + :create-rules="rules" @create="create" /> @@ -84,14 +84,6 @@ export default { ], fontColor: [ { required: true, message: this.$t('rules.textFontColor'), trigger: 'blur' } - ] - }, - makeRules: { - code: [ - { required: true, message: this.$t('rules.selectText'), trigger: 'blur' } - ], - content: [ - { required: true, message: this.$t('rules.pleaseEnterContent'), trigger: 'blur' } ], 'position.x': [ { required: true, message: this.$t('rules.pleaseEnterXCoordinate'), trigger: 'blur' } diff --git a/src/views/newMap/newMapdraft/mapoperate/zcControl.vue b/src/views/newMap/newMapdraft/mapoperate/zcControl.vue index fbfdad9c5..38c52b405 100644 --- a/src/views/newMap/newMapdraft/mapoperate/zcControl.vue +++ b/src/views/newMap/newMapdraft/mapoperate/zcControl.vue @@ -16,7 +16,7 @@ ref="createForm" :create-form="formMake" :add-model="addModel" - :create-rules="createRules" + :create-rules="rules" @create="create" /> @@ -140,22 +140,6 @@ export default { } }; return form; - }, - createRules: function () { - return { - name: [ - { required: true, message: this.$t('rules.pleaseEnterStatusSignal'), trigger: 'blur' } - ], - 'position.x': [ - { required: true, message: this.$t('rules.trainPositionX'), trigger: 'blur' } - ], - 'position.y': [ - { required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' } - ], - concentrateStationList:[ - { required: true, message: this.$t('rules.selectConcentrateStation'), trigger: 'change' } - ] - }; } }, watch: { From 66b9d7f85afb45e3f8c386eb7271698413c189cf Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 28 Jul 2020 13:56:36 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=89=A7=E6=9C=AC=E5=BD=95=E5=88=B6?= =?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/router/index_Common.js | 3 +- src/router/index_HEB.js | 3 +- src/views/newMap/displayNew/menuSchema.vue | 15 +++--- .../mapoperate/components/operateProperty.vue | 3 ++ src/views/scriptManage/display/indexNew.vue | 47 ------------------- .../display/tipScriptRecordNew.vue | 3 +- 6 files changed, 15 insertions(+), 59 deletions(-) delete mode 100644 src/views/scriptManage/display/indexNew.vue diff --git a/src/router/index_Common.js b/src/router/index_Common.js index e656c028d..d2d2f5a5d 100644 --- a/src/router/index_Common.js +++ b/src/router/index_Common.js @@ -62,7 +62,6 @@ const LessonDetail = () => import('@/views/lesson/details'); const ScriptmanageHome = () => import('@/views/scriptManage/home'); const ScriptDisplay = () => import('@/views/scriptManage/display/index'); -const ScriptDisplayNew = () => import('@/views/scriptManage/display/indexNew'); const PracticeDisplayNew = () => import('@/views/competitionManage/practiceList/display/index'); const IbpHome = () => import('@/views/ibp/home'); @@ -285,7 +284,7 @@ export const publicAsyncRoute = [ }, { // 剧本编辑 战场图 path: '/scriptDisplayNew/:mode', - component: ScriptDisplayNew, + component: DisplayNew, hidden: true }, { // 实操试题编辑 战场图 diff --git a/src/router/index_HEB.js b/src/router/index_HEB.js index e3f6cd26f..d5b47e6cc 100644 --- a/src/router/index_HEB.js +++ b/src/router/index_HEB.js @@ -54,7 +54,6 @@ const BigSplitScreen = () => import('@/views/designPlatform/bigSplitScreen'); const ScriptmanageHome = () => import('@/views/scriptManage/home'); const ScriptDisplay = () => import('@/views/scriptManage/display/index'); -const ScriptDisplayNew = () => import('@/views/scriptManage/display/indexNew'); const IbpHome = () => import('@/views/ibp/home'); const IbpDraw = () => import('@/views/ibp/ibpDraw/index'); @@ -224,7 +223,7 @@ export const publicAsyncRoute = [ }, { // 剧本编辑 战场图 path: '/scriptDisplayNew/:mode', - component: ScriptDisplayNew, + component: DisplayNew, hidden: true }, diff --git a/src/views/newMap/displayNew/menuSchema.vue b/src/views/newMap/displayNew/menuSchema.vue index 52ed62795..84be4da13 100644 --- a/src/views/newMap/displayNew/menuSchema.vue +++ b/src/views/newMap/displayNew/menuSchema.vue @@ -1,10 +1,11 @@