diff --git a/src/api/designPlatform.js b/src/api/designPlatform.js index 985d6a6e8..b1501d034 100644 --- a/src/api/designPlatform.js +++ b/src/api/designPlatform.js @@ -139,9 +139,9 @@ export function previewRunPlan(planId) { } /** 剧本预览选择角色 */ -export function loadDraftScriptNew(memberId, group) { +export function loadDraftScriptNew(memberId, group, mode) { return request({ - url: `/api/scriptSimulation/${group}/chooseMemberAndStart?memberId=${memberId}`, + url: `/api/scriptSimulation/${group}/chooseMemberAndStart?memberId=${memberId}&mode=${mode}`, method: 'put' }); } diff --git a/src/api/script.js b/src/api/script.js index 6ff230a70..326131774 100644 --- a/src/api/script.js +++ b/src/api/script.js @@ -134,10 +134,3 @@ export function updateActionCondition(group, actionId, data) { data }); } -/** 查询剧本活动条件 */ -export function getActionCondition(group, actionId) { - return request({ - url: `/api/scriptSimulation/${group}/${actionId}/condition`, - method: 'get' - }); -} diff --git a/src/components/QueryListPage/QueryListPage.vue b/src/components/QueryListPage/QueryListPage.vue index c33a4af53..29d22845f 100644 --- a/src/components/QueryListPage/QueryListPage.vue +++ b/src/components/QueryListPage/QueryListPage.vue @@ -15,7 +15,7 @@ @disableQuery="disableQuery" @enableQuery="enableQuery" /> - + ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); if (!result) { + let directionCode = elem.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + directionCode = elem.right ? '1' : '2'; + } serie.markPoint.data.push(createMartPoint({ - directionCode: elem.directionCode, + directionCode: directionCode, coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, color: lineStyle.color || '#000' diff --git a/src/jmapNew/theme/chengdu_01/planConvert.js b/src/jmapNew/theme/chengdu_01/planConvert.js index 9f9441ee4..5601b44c9 100644 --- a/src/jmapNew/theme/chengdu_01/planConvert.js +++ b/src/jmapNew/theme/chengdu_01/planConvert.js @@ -1,5 +1,5 @@ import { createMartPointReverse, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; - +import store from '@/store/index_APP_TARGET'; export default { /** 边缘高度*/ EdgeHeight: 600, @@ -113,7 +113,11 @@ export default { // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.color = '#000' || lineStyle.color; - pointdata.directionCode = train.directionCode; + pointdata.directionCode = train.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + pointdata.directionCode = train.right ? '1' : '2'; + } + // pointdata.directionCode = train.directionCode; pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; /** 给服务对象添加服务名称和标记点*/ @@ -211,8 +215,12 @@ export default { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); if (!result) { + let directionCode = elem.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + directionCode = elem.right ? '1' : '2'; + } serie.markPoint.data.push(createMartPointReverse({ - directionCode: elem.directionCode, + directionCode: directionCode, coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, color: lineStyle.color || '#000' diff --git a/src/jmapNew/theme/chengdu_03/planConvert.js b/src/jmapNew/theme/chengdu_03/planConvert.js index 921c6f4da..8780b2871 100644 --- a/src/jmapNew/theme/chengdu_03/planConvert.js +++ b/src/jmapNew/theme/chengdu_03/planConvert.js @@ -1,5 +1,5 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; - +import store from '@/store/index_APP_TARGET'; export default { /** 边缘高度*/ EdgeHeight: 600, @@ -91,7 +91,11 @@ export default { // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.color = '#000' || lineStyle.color; - pointdata.directionCode = train.directionCode; + // pointdata.directionCode = train.directionCode; + pointdata.directionCode = train.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + pointdata.directionCode = train.right ? '1' : '2'; + } pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; /** 给服务对象添加服务名称和标记点*/ @@ -186,8 +190,12 @@ export default { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); if (!result) { + let directionCode = elem.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + directionCode = elem.right ? '1' : '2'; + } serie.markPoint.data.push(createMartPoint({ - directionCode: elem.directionCode, + directionCode: directionCode, coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, color: lineStyle.color || '#000' diff --git a/src/jmapNew/theme/haerbin_01/planConvert.js b/src/jmapNew/theme/haerbin_01/planConvert.js index 40ea90ee9..3e2521f51 100644 --- a/src/jmapNew/theme/haerbin_01/planConvert.js +++ b/src/jmapNew/theme/haerbin_01/planConvert.js @@ -168,7 +168,6 @@ export default { var isBackup = true; var opt = { name: '', markPointData: [], data: [] }; if (service.tripNumberDataList && service.tripNumberDataList.length) { - debugger; service.tripNumberDataList.forEach((train, j) => { var pointdata = {}; var idx = 0; diff --git a/src/jmapNew/theme/race_01/menus/dialog/trainSetHead.vue b/src/jmapNew/theme/race_01/menus/dialog/trainSetHead.vue index fe8f7c0ca..9b0e9f237 100644 --- a/src/jmapNew/theme/race_01/menus/dialog/trainSetHead.vue +++ b/src/jmapNew/theme/race_01/menus/dialog/trainSetHead.vue @@ -118,6 +118,11 @@ export default { }); }, doClose() { + this.addModel = { + groupNumber: '', + destinationCode: '', + tripNumber: '' + }; this.loading = false; this.dialogShow = false; this.$store.dispatch('training/emitTipFresh'); diff --git a/src/jmapNew/theme/race_01/menus/dialog/trainSetPlan.vue b/src/jmapNew/theme/race_01/menus/dialog/trainSetPlan.vue index d3cb78679..92fad2177 100644 --- a/src/jmapNew/theme/race_01/menus/dialog/trainSetPlan.vue +++ b/src/jmapNew/theme/race_01/menus/dialog/trainSetPlan.vue @@ -129,6 +129,11 @@ export default { }); }, doClose() { + this.addModel = { + groupNumber: '', + tripNumber: '', + serviceNumber: '' + }; this.loading = false; this.dialogShow = false; this.$store.dispatch('training/emitTipFresh'); diff --git a/src/jmapNew/theme/race_01/menus/menuDialog/stationControl.vue b/src/jmapNew/theme/race_01/menus/menuDialog/stationControl.vue index 219792dfc..c033ec11d 100644 --- a/src/jmapNew/theme/race_01/menus/menuDialog/stationControl.vue +++ b/src/jmapNew/theme/race_01/menus/menuDialog/stationControl.vue @@ -67,9 +67,9 @@ export default { stationName:'', message:'', controlProps: { - '03': '紧急站控', - '02': '站控', - '01': '遥控' + '03': '请求紧急站控', + '02': '请求站控', + '01': '请求中控' } }; }, @@ -262,7 +262,7 @@ export default { } }; - diff --git a/src/views/newMap/displayNew/index.vue b/src/views/newMap/displayNew/index.vue index 08283ca47..9c15c91eb 100644 --- a/src/views/newMap/displayNew/index.vue +++ b/src/views/newMap/displayNew/index.vue @@ -26,7 +26,7 @@ /> - + diff --git a/src/views/newMap/displayNew/menuTrainList.vue b/src/views/newMap/displayNew/menuTrainList.vue index ee6390153..b88f2e440 100644 --- a/src/views/newMap/displayNew/menuTrainList.vue +++ b/src/views/newMap/displayNew/menuTrainList.vue @@ -136,8 +136,8 @@ export default { .menuTrainListOut{ position: absolute; right: 0; - top: 15%; - height: 70%; + top: 20%; + height: 60%; transform: translateX(400px); transition: all 0.4s; &.active{ diff --git a/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js b/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js index 58ce5f82a..dd7f550bd 100644 --- a/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js +++ b/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js @@ -76,7 +76,7 @@ export const operateEnum = { // } }, ControlConvertMenu:{ - type:'控制模式', + type:'系统/站遥控', CM_Apply_For_Station_Control:{ code:'stationCodes', isList:true, diff --git a/src/views/newMap/displayNew/scriptDisplay/component/scriptTip.vue b/src/views/newMap/displayNew/scriptDisplay/component/scriptTip.vue index ace5b1c54..bc03d1ff1 100644 --- a/src/views/newMap/displayNew/scriptDisplay/component/scriptTip.vue +++ b/src/views/newMap/displayNew/scriptDisplay/component/scriptTip.vue @@ -99,6 +99,7 @@ export default { this.$notify({ title: this.$t('global.tips'), duration: 3000, + offset: 100, message: h('i', { style: 'color:' + opt.color }, opt.message) }); } diff --git a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue index baf2f1a64..bfa4e4d67 100644 --- a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue +++ b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue @@ -17,6 +17,8 @@ @setMemberList="setMemberList" @clearAllData="clearAllData" @setTreeData="setTreeData" + @changeScriptMode="changeScriptMode" + @setMapLocation="setMapLocation" /> @@ -45,6 +47,7 @@ import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime'; import { mapGetters } from 'vuex'; import { loadDraftScriptNew } from '@/api/designPlatform'; import Vue from 'vue'; +import { ScriptMode } from '@/scripts/ConstDic'; import ConstConfig from '@/scripts/ConstConfig'; export default { @@ -79,7 +82,8 @@ export default { userRole:'', isDrive: this.prdType == '04', treeData:[], - memberList:[] + memberList:[], + scriptMode: ScriptMode.TEACH }; }, computed: { @@ -118,6 +122,11 @@ export default { // this.setMode(); } }, + beforeDestroy() { + this.$store.dispatch('training/setRoles', ''); + this.$store.dispatch('training/setPrdType', ''); + this.clearAllData(); + }, created() { this.group = this.$route.query.group || ''; }, @@ -125,15 +134,19 @@ export default { back() { this.$refs.scriptButtonGroup.back(); }, + changeScriptMode(scriptMode) { + this.scriptMode = scriptMode; + }, async selectRole(role) { try { - const res = await loadDraftScriptNew(role.id, this.group); + const res = await loadDraftScriptNew(role.id, this.group, this.scriptMode); if (res && res.code == 200) { - if (this.querymapLocation) { - const newMapLocation = {'offsetX': this.mapLocation.x, 'offsetY': this.mapLocation.y, 'scaleRate': this.mapLocation.scale}; - Vue.prototype.$jlmap.setOptions(newMapLocation); - } + // if (this.querymapLocation) { + const newMapLocation = {'offsetX': this.mapLocation.x, 'offsetY': this.mapLocation.y, 'scaleRate': this.mapLocation.scale}; + Vue.prototype.$jlmap.setOptions(newMapLocation); + // } } + this.$store.dispatch('scriptRecord/updateAudioPlay', false); this.$store.dispatch('scriptRecord/updateBgSet', true); this.$refs.scriptButtonGroup.setIsscriptRun(true); if (role.type) { @@ -223,6 +236,9 @@ export default { } }); }, + setMapLocation(mapLocation) { + this.mapLocation = mapLocation; + }, switchMode(prdType) { this.$store.dispatch('training/setPrdType', prdType); }, diff --git a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue index 90068e9ad..0d3331b5c 100644 --- a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue +++ b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue @@ -1,10 +1,20 @@