From bc669b98f80ad222748f8c60070afb2eef8948b2 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 26 Oct 2020 11:28:37 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=BB=B6=E7=BB=AD=E4=BF=9D=E6=8A=A4?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/race_01.js | 2 +- src/jmapNew/map.js | 10 ---------- src/utils/baseUrl.js | 4 ++-- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/jmapNew/config/skinCode/race_01.js b/src/jmapNew/config/skinCode/race_01.js index b2f05590c..bd728b263 100644 --- a/src/jmapNew/config/skinCode/race_01.js +++ b/src/jmapNew/config/skinCode/race_01.js @@ -288,7 +288,7 @@ class SkinCode extends defaultStyle { // 延续保护计时 this[deviceType.OverAp] = { - show: false + show: true }; // 屏蔽门 diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 0ea48be33..085be1252 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -248,16 +248,6 @@ class Jlmap { (list || []).forEach(elem => { const code = elem.code; const type = elem._type; - if (type == 'OverAp') { - const overlapRoute = store.state.map.overlapData[code]; - const model = this.mapDevice[overlapRoute.pathList[0].sectionList[0]]; - if (overlapRoute.pathList[0].right) { - elem['points'] = { x: model.points[0].x, y: model.points[0].y }; - } else { - elem['points'] = { x: model.points[model.points.length - 1].x, y: model.points[model.points.length - 1].y }; - } - console.log(elem, 'overAp'); - } // const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig); const oDevice = deviceFactory(type, elem, this.showConfig); // const nDevice = deepAssign(oDevice || {}, elem); diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index ed8381fb5..5c17a46dd 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,8 +2,8 @@ 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 = 'http://192.168.3.5:9000'; // 袁琪 + BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.169:9000'; // 旭强 // BASE_API = 'http://192.168.3.175:9000'; // 张赛 // BASE_API = 'http://192.168.3.82:9000'; // 杜康 From f34092741ba6b00670b73462bee146c4ec387210 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 26 Oct 2020 13:51:53 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=20=E6=B7=BB=E5=8A=A0=20?= =?UTF-8?q?=E9=81=93=E5=B2=94=E9=92=A9=E9=94=81=E6=8C=87=E4=BB=A4=EF=BC=88?= =?UTF-8?q?=E9=9D=9E=E8=AF=AD=E9=9F=B3=E6=8C=87=E4=BB=A4=EF=BC=89=20?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=8D=E5=BF=85=E8=A6=81=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../menus/dialog/switchHookLock.vue | 51 +- .../theme/race_01/menus/menuSwitch.vue | 20 +- src/router/index_Common.js | 36 -- src/views/jsxt/apply/index.vue | 555 ------------------ src/views/jsxt/refereeList/display.vue | 232 -------- src/views/jsxt/refereeList/editScore.vue | 127 ---- src/views/jsxt/refereeList/index.vue | 276 --------- src/views/jsxt/refereeList/menuReplay.vue | 204 ------- src/views/jsxt/refereeList/theoryResult.vue | 81 --- 9 files changed, 52 insertions(+), 1530 deletions(-) delete mode 100644 src/views/jsxt/apply/index.vue delete mode 100644 src/views/jsxt/refereeList/display.vue delete mode 100644 src/views/jsxt/refereeList/editScore.vue delete mode 100644 src/views/jsxt/refereeList/index.vue delete mode 100644 src/views/jsxt/refereeList/menuReplay.vue delete mode 100644 src/views/jsxt/refereeList/theoryResult.vue diff --git a/src/jmapNew/theme/components/menus/dialog/switchHookLock.vue b/src/jmapNew/theme/components/menus/dialog/switchHookLock.vue index bb9a09244..b08e10486 100644 --- a/src/jmapNew/theme/components/menus/dialog/switchHookLock.vue +++ b/src/jmapNew/theme/components/menus/dialog/switchHookLock.vue @@ -46,6 +46,7 @@ import { mapGetters } from 'vuex'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import { commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; +import {menuOperate, commitOperate} from '../../utils/menuOperate'; export default { name: 'SwitchHookLock', components: { @@ -92,7 +93,7 @@ export default { }); }, methods: { - doShow(selected) { + doShow(selected, operate = null) { this.selected = selected; if (!this.dialogShow) { this.switchName = ''; @@ -110,6 +111,9 @@ export default { } else { this.normal = false; } + if (operate) { + this.operation = operate.operation; + } this.dialogShow = true; this.$nextTick(function () { this.$store.dispatch('training/emitTipFresh'); @@ -123,21 +127,36 @@ export default { }, commit() { this.loading = true; - const group = this.$route.query.group; - const param = { - commandType: 'Switch_Hook_Lock', - targetMemberId: this.targetMemberId, - params: { - switchCode: this.selected.code, - normal: this.normal - } - }; - commitTrainSend(group, param).then(({valid, operate})=>{ - this.doClose(); - }).catch((error) => { - this.$refs.noticeInfo.doShow(error.message); - this.doClose(); - }); + if (this.operation) { + commitOperate(menuOperate.Switch.hookLock, {normal: this.normal}, 2).then(({valid})=>{ + this.loading = false; + if (valid) { + this.doClose(); + } + }).catch((error) => { + this.loading = false; + this.doClose(); + this.$refs.noticeInfo.doShow(error.message); + }); + } else { + const group = this.$route.query.group; + const param = { + commandType: 'Switch_Hook_Lock', + // Switch_Hook_Lock + targetMemberId: this.targetMemberId, + params: { + switchCode: this.selected.code, + normal: this.normal + } + }; + commitTrainSend(group, param).then(({valid, operate})=>{ + this.doClose(); + }).catch((error) => { + this.$refs.noticeInfo.doShow(error.message); + this.doClose(); + }); + } + } } }; diff --git a/src/jmapNew/theme/race_01/menus/menuSwitch.vue b/src/jmapNew/theme/race_01/menus/menuSwitch.vue index 18fb945ae..c60c311b5 100644 --- a/src/jmapNew/theme/race_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/race_01/menus/menuSwitch.vue @@ -165,7 +165,13 @@ export default { label: '触发故障管理', handler: this.triggerFaultManagement, cmdType: CMD.Fault.CMD_TRIGGER_FAULT + }, + { + label: '道岔钩锁', + handler: this.hookLock, + cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK } + // ] }; }, @@ -200,9 +206,10 @@ export default { // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT) { // if (!this.$store.state.scriptRecord.bgSet) { + // Switch_Hook_Lock const menuHook = [{ - label: '道岔钩锁', - handler: this.hookLock + label: '语音指令-道岔钩锁', + handler: this.voiceCommandHookLock }]; this.menu = [...this.menuForce, ...menuHook]; // } else { @@ -335,9 +342,16 @@ export default { }); }, // 道岔钩锁 - hookLock() { + voiceCommandHookLock() { this.$refs.switchHookLock.doShow(this.selected); }, + hookLock() { + commitOperate(menuOperate.Switch.hookLock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => { + if (valid) { + this.$refs.switchHookLock.doShow(this.selected, operate); + } + }); + }, triggerFaultManagement() { this.$store.dispatch('training/setTriggerFaultCount', this.selected); } diff --git a/src/router/index_Common.js b/src/router/index_Common.js index 43d667009..12b874aa7 100644 --- a/src/router/index_Common.js +++ b/src/router/index_Common.js @@ -131,10 +131,7 @@ const CompetitionHome = () => import('@/views/jsxt/competition/home'); const Refereedetail = () => import('@/views/jsxt/competition/theory/quiz/index'); const RefereeResult = () => import('@/views/jsxt/competition/theory/result'); const JsxtExamResult = () => import('@/views/jsxt/competition/result'); -const JsxtApply = () => import('@/views/jsxt/apply/index'); // const theoryManage = () => import('@/views/jsxt/competition/theory/index'); -const RefereeList = () => import('@/views/jsxt/refereeList/index'); -const RefereeDisplay = () => import('@/views/jsxt/refereeList/display'); const Approval = () => import('@/views/approval/index'); const CompanyManage = () => import('@/views/system/companyManage/index'); const QuestionsRuleManage = () => import('@/views/system/questionsRuleManage/index'); @@ -265,12 +262,6 @@ export const constantRoutes = [ hidden: true }, - - { // 竞赛系统报名 - path: '/jsxtApply', - component: JsxtApply, - hidden: true - }, { path: '/404', component: Errpr404, @@ -323,11 +314,6 @@ export const publicAsyncRoute = [ component: BigSplitScreen, hidden: true }, - { - path: '/refereeJsxtDisplay', - component: RefereeDisplay, - hidden: true - }, { path: '/jointTrainingNew', component: JointTrainingNew, @@ -1149,28 +1135,6 @@ export const JSXT = [ path: '/jsxt/theory/result', // 考试结果页面 component: RefereeResult, hidden: true - }, - // 裁判系统 - { - path: '/refereeJsxt', - redirect: '/refereeJsxt/home', - component: Layout, - meta: { - i18n: 'router.homeJsxt', - roles: [user, admin] - }, - hidden: true, - children: [ - { - path: 'home', - component: RefereeList, - meta: { - i18n: 'router.refereeJManage', - icon: 'design', - hidden: true - } - } - ] } ]; const createRouter = () => new Router({ diff --git a/src/views/jsxt/apply/index.vue b/src/views/jsxt/apply/index.vue deleted file mode 100644 index f688805ad..000000000 --- a/src/views/jsxt/apply/index.vue +++ /dev/null @@ -1,555 +0,0 @@ - - - - - diff --git a/src/views/jsxt/refereeList/display.vue b/src/views/jsxt/refereeList/display.vue deleted file mode 100644 index 1cad3d742..000000000 --- a/src/views/jsxt/refereeList/display.vue +++ /dev/null @@ -1,232 +0,0 @@ - - - diff --git a/src/views/jsxt/refereeList/editScore.vue b/src/views/jsxt/refereeList/editScore.vue deleted file mode 100644 index fad2dd07f..000000000 --- a/src/views/jsxt/refereeList/editScore.vue +++ /dev/null @@ -1,127 +0,0 @@ - - - diff --git a/src/views/jsxt/refereeList/index.vue b/src/views/jsxt/refereeList/index.vue deleted file mode 100644 index 94c1b04fe..000000000 --- a/src/views/jsxt/refereeList/index.vue +++ /dev/null @@ -1,276 +0,0 @@ - - - - diff --git a/src/views/jsxt/refereeList/menuReplay.vue b/src/views/jsxt/refereeList/menuReplay.vue deleted file mode 100644 index 280dd53ac..000000000 --- a/src/views/jsxt/refereeList/menuReplay.vue +++ /dev/null @@ -1,204 +0,0 @@ - - - diff --git a/src/views/jsxt/refereeList/theoryResult.vue b/src/views/jsxt/refereeList/theoryResult.vue deleted file mode 100644 index e9f9e6630..000000000 --- a/src/views/jsxt/refereeList/theoryResult.vue +++ /dev/null @@ -1,81 +0,0 @@ - - - From da1b5f27d113fa42e584f6c60503393b29f9fc36 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 26 Oct 2020 13:59:17 +0800 Subject: [PATCH 3/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 --- src/jmapNew/theme/components/menus/dialog/switchHookLock.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jmapNew/theme/components/menus/dialog/switchHookLock.vue b/src/jmapNew/theme/components/menus/dialog/switchHookLock.vue index b08e10486..d86171936 100644 --- a/src/jmapNew/theme/components/menus/dialog/switchHookLock.vue +++ b/src/jmapNew/theme/components/menus/dialog/switchHookLock.vue @@ -39,7 +39,7 @@ 取 消 - +