From 2d4b0708bd56e929b5b5d5413473f724a656756d Mon Sep 17 00:00:00 2001 From: fan Date: Tue, 5 Jul 2022 18:03:14 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=B7=AF=E7=A5=A8=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=9A=82=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/components/utils/menuOperate.js | 4 ++ src/scripts/cmdPlugin/CommandEnum.js | 3 +- src/scripts/cmdPlugin/OperationHandler.js | 6 +++ src/store/modules/socket.js | 4 ++ src/store/modules/training.js | 1 - src/utils/baseUrl.js | 4 +- src/views/newMap/chatView/chatBox.vue | 2 +- .../memberManage/membersManage.vue | 4 +- src/views/newMap/trainTicket/greenLicence.vue | 26 ++++++++++++- src/views/newMap/trainTicket/index.vue | 20 ++++++++-- src/views/newMap/trainTicket/redLicence.vue | 36 ++++++++++++++--- src/views/newMap/trainTicket/ticketInfo.vue | 39 +++++++++++++++++++ src/views/newMap/trainTicket/trainTicket.vue | 27 +++++++++++-- 13 files changed, 157 insertions(+), 19 deletions(-) create mode 100644 src/views/newMap/trainTicket/ticketInfo.vue diff --git a/src/jmapNew/theme/components/utils/menuOperate.js b/src/jmapNew/theme/components/utils/menuOperate.js index 0755d7f2a..14f4c4312 100644 --- a/src/jmapNew/theme/components/utils/menuOperate.js +++ b/src/jmapNew/theme/components/utils/menuOperate.js @@ -653,6 +653,10 @@ export const menuOperate = { operation: OperationEvent.RailCommand.railQueryTicket.menu.operation, cmdType: CMD.RAIL.CMD_RAIL_QUERY_TICKET }, + railGiveTicketTo: { + operation: OperationEvent.RailCommand.railGiveTicketTo.menu.operation, + cmdType: CMD.RAIL.CMD_RAIL_GIVE_TICKET_TO + }, railFillInRegister: { operation: OperationEvent.RailCommand.railFillInRegister.menu.operation, cmdType: CMD.RAIL.CMD_RAIL_FILL_IN_REGISTER diff --git a/src/scripts/cmdPlugin/CommandEnum.js b/src/scripts/cmdPlugin/CommandEnum.js index f88a38649..b4d013dff 100644 --- a/src/scripts/cmdPlugin/CommandEnum.js +++ b/src/scripts/cmdPlugin/CommandEnum.js @@ -423,6 +423,7 @@ export default { CMD_RAIL_FILL_IN_TICKET: {value: 'RAIL_FILL_IN_TICKET', label: '填写票据'}, CMD_RAIL_QUERY_TICKET: {value: 'RAIL_QUERY_TICKET', label: '查询票据'}, CMD_RAIL_FILL_IN_REGISTER: {value: 'RAIL_FILL_IN_REGISTER', label: '填写行车簿册'}, - CMD_RAIL_QUERY_REGISTER: {value: 'RAIL_QUERY_REGISTER', label: '查询行车簿册'} + CMD_RAIL_QUERY_REGISTER: {value: 'RAIL_QUERY_REGISTER', label: '查询行车簿册'}, + CMD_RAIL_GIVE_TICKET_TO: {value: 'RAIL_GIVE_TICKET_TO', label: '给出票据'} } }; diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js index 6a3636d19..0c1adaa2a 100644 --- a/src/scripts/cmdPlugin/OperationHandler.js +++ b/src/scripts/cmdPlugin/OperationHandler.js @@ -3846,6 +3846,12 @@ export const OperationEvent = { operation: '1204', domId: '_Tips-Rail-railQueryTicket' } + }, + railGiveTicketTo: { + menu: { + operation: '1205', + domId: '_Tips-Rail-railGiveTicketTo' + } } } }; diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 125128086..c1ffcba7e 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -269,6 +269,9 @@ function handle(state, data) { case 'SIMULATION_RAIL_CTC_DISPATCH_COMMAND': state.dispatchCommandMsg = msg; break; + case 'SIMULATION_RAIL_TICKET': + state.ticketInfo = msg; + break; // // 大铁项目 调度台 运行图信息 初始化消息 // case 'SIMULATION_RAILWAY_RUN_PLAN_INIT': // state.railwaySimulationRpMsg = {}; @@ -400,6 +403,7 @@ const socket = { overConversition: {}, // 仿真会话结束 exitConversition: {}, // 仿真成员退出会话 conversationInfo: {}, // 仿真会话消息 + ticketInfo: {}, // 路票消息 message: {}, // 仿真聊天 msgQueue: [], // 命令请求列表(旧版控制权转移可能在用,新版不用这个) diff --git a/src/store/modules/training.js b/src/store/modules/training.js index 52966a432..746f36542 100644 --- a/src/store/modules/training.js +++ b/src/store/modules/training.js @@ -450,7 +450,6 @@ const training = { rtn && rtn.valid && commit('next'); } } - console.log(rtn, '*********'); resolve(rtn); }).catch(error => { // console.error(error); diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 30bf92c6f..beaf4f9ea 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -24,7 +24,7 @@ export function handlerUrl(data) { if (process.env.NODE_ENV === 'development') { // const data = null; // 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.233/rtss-server'; // BASE_API = 'http://114.116.51.125/jlcloud'; // BASE_API = 'http://192.168.8.152:9000'; // 袁琪 @@ -34,7 +34,7 @@ export function handlerUrl(data) { // BASE_API = 'http://192.168.3.37:9000'; // 卫志宏 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 - // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 + BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 // BASE_API = data && data.domainName ? 'https://' + data.domainName : BASE_API; BASE_API = data && data.domainName ? 'http://' + data.domainName : BASE_API; VOICE_API = data && data.resourcesDomainName ? 'https://' + data.resourcesDomainName : 'https://joylink.club/oss/joylink'; diff --git a/src/views/newMap/chatView/chatBox.vue b/src/views/newMap/chatView/chatBox.vue index 0117a13f1..e29d9a675 100644 --- a/src/views/newMap/chatView/chatBox.vue +++ b/src/views/newMap/chatView/chatBox.vue @@ -40,7 +40,7 @@
{{ item.label }}
-
+
{{ data.label + (data.userId? '(' + (simulationUsers[data.userId]||{}).nickName + ')': '') }}
diff --git a/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue b/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue index 82cbb13c9..73ad6d93d 100644 --- a/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue +++ b/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue @@ -56,6 +56,7 @@ diff --git a/src/views/newMap/trainTicket/index.vue b/src/views/newMap/trainTicket/index.vue index 114fe6ae0..855c0ce69 100644 --- a/src/views/newMap/trainTicket/index.vue +++ b/src/views/newMap/trainTicket/index.vue @@ -34,17 +34,17 @@
@@ -132,6 +132,7 @@ import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuO import RailTicket from './trainTicket'; import GreenLicence from './greenLicence'; import RedLicence from './redLicence'; +import { EventBus } from '@/scripts/event-bus'; export default { name: 'Index', components: { @@ -146,6 +147,7 @@ export default { railTicketList: [], greenLicenseList: [], redLicenseList: [], + giveMemberList: [], activeName: 'first', ticketForm: { number: '', @@ -213,6 +215,11 @@ export default { } else { return ''; } } }, + mounted() { + EventBus.$on('trainTicketMember', (memberList) => { + this.giveMemberList = memberList; + }); + }, methods: { doClose() { this.trainTicketShow = false; @@ -269,6 +276,13 @@ export default { }).catch(()=>{ this.$message.error('提交路票失败!'); }); + }, + giveTicket(params) { + commitOperate(menuOperate.Rail.railGiveTicketTo, params, 3).then(({valid, operate}) => { + this.query(); + }).catch(()=> { + this.$message.error('给予路票失败!'); + }); } } }; diff --git a/src/views/newMap/trainTicket/redLicence.vue b/src/views/newMap/trainTicket/redLicence.vue index 79cbc8d72..c29a5b87a 100644 --- a/src/views/newMap/trainTicket/redLicence.vue +++ b/src/views/newMap/trainTicket/redLicence.vue @@ -20,11 +20,11 @@ 分发出的第 次列车,邻站到达通知 - - - - - 收到 + + + + + 收到
通     知     书
@@ -59,6 +59,17 @@
日填发
+
+ + + + 给予 +
@@ -77,12 +88,25 @@ export default { showCentralizedStationName: { type: String, required: true + }, + giveMemberList: { + type: Array, + default() { + return []; + } } }, data() { return { - + memberId: '' }; + }, + methods: { + giveTicket() { + if (this.memberId) { + this.$emit('giveTicket', { ticketId: this.redLicenseForm.id, memberId: this.memberId }); + } + } } }; diff --git a/src/views/newMap/trainTicket/ticketInfo.vue b/src/views/newMap/trainTicket/ticketInfo.vue new file mode 100644 index 000000000..d11f00372 --- /dev/null +++ b/src/views/newMap/trainTicket/ticketInfo.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/src/views/newMap/trainTicket/trainTicket.vue b/src/views/newMap/trainTicket/trainTicket.vue index 5f96d4e07..c3778b3a6 100644 --- a/src/views/newMap/trainTicket/trainTicket.vue +++ b/src/views/newMap/trainTicket/trainTicket.vue @@ -31,8 +31,16 @@
-
- +
+ + + + 给予
@@ -52,12 +60,25 @@ export default { stationList: { type: Array, required: true + }, + giveMemberList: { + type: Array, + default() { + return []; + } } }, data() { return { - + memberId: '' }; + }, + methods: { + giveTicket() { + if (this.memberId) { + this.$emit('giveTicket', { ticketId: this.ticketForm.id, memberId: this.memberId }); + } + } } }; From 1093b8982b68f111bdcb3006ed7067d241fd8e29 Mon Sep 17 00:00:00 2001 From: fan Date: Wed, 6 Jul 2022 11:19:22 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=B7=AF=E7=A5=A8=E6=B5=81=E7=A8=8B?= =?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/views/newMap/jointTrainingNew/index.vue | 10 +++- src/views/newMap/trainTicket/greenLicence.vue | 7 +-- src/views/newMap/trainTicket/index.vue | 47 ++++++++++++------- src/views/newMap/trainTicket/redLicence.vue | 7 +-- src/views/newMap/trainTicket/ticketInfo.vue | 38 +++++++++++++-- src/views/newMap/trainTicket/trainTicket.vue | 3 +- 6 files changed, 79 insertions(+), 33 deletions(-) diff --git a/src/views/newMap/jointTrainingNew/index.vue b/src/views/newMap/jointTrainingNew/index.vue index 2d4221f3f..97def49f9 100644 --- a/src/views/newMap/jointTrainingNew/index.vue +++ b/src/views/newMap/jointTrainingNew/index.vue @@ -64,6 +64,7 @@ + 线上发车。
-
{{ showCentralizedStationName }}(站名印)车站值班员(签名)
+
{{ greenLicenseForm.stationSeal }}(站名印)车站值班员(签名)
@@ -57,10 +57,6 @@ export default { type: Boolean, required: true }, - showCentralizedStationName: { - type: String, - required: true - }, giveMemberList: { type: Array, default() { @@ -77,6 +73,7 @@ export default { giveTicket() { if (this.memberId) { this.$emit('giveTicket', { ticketId: this.greenLicenseForm.id, memberId: this.memberId }); + this.memberId = ''; } } } diff --git a/src/views/newMap/trainTicket/index.vue b/src/views/newMap/trainTicket/index.vue index 855c0ce69..3ce5f572b 100644 --- a/src/views/newMap/trainTicket/index.vue +++ b/src/views/newMap/trainTicket/index.vue @@ -25,8 +25,8 @@ - - + +
提交
@@ -39,12 +39,12 @@
@@ -154,7 +154,7 @@ export default { tripNumber: '', station: '', nextStation: '', - stationSeal: true, + stationSeal: '', no: '', deputy: false }, @@ -163,7 +163,7 @@ export default { reason: '', tripNumber: '', line: '', - stationSeal: true, + stationSeal: '', signature: '', year: '', moon: '', @@ -185,7 +185,7 @@ export default { noticeHour2: '', noticeMinute2: '', noticeTripNumber2: '', - stationSeal: true, + stationSeal: '', signature: '', year: '', moon: '', @@ -207,12 +207,17 @@ export default { computed: { ...mapGetters('map', [ 'stationList' - ]), - showCentralizedStationName() { - if (this.$store.state.map.showCentralizedStationCode) { - const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode); - if (station) { return station.name; } else { return ''; } - } else { return ''; } + ]) + }, + watch: { + '$store.state.map.showCentralizedStationCode': function (val) { + const station = this.$store.getters['map/getDeviceByCode'](val); + if (station) { + this.ticketForm.station = station.name; + this.ticketForm.stationSeal = station.name; + this.greenLicenseForm.stationSeal = station.name; + this.redLicenseForm.stationSeal = station.name; + } } }, mounted() { @@ -226,7 +231,13 @@ export default { }, doShow() { this.trainTicketShow = true; - this.ticketForm.station = this.showCentralizedStationName; + const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode); + if (station) { + this.ticketForm.station = station.name; + this.ticketForm.stationSeal = station.name; + this.greenLicenseForm.stationSeal = station.name; + this.redLicenseForm.stationSeal = station.name; + } }, handleClick() { if (this.activeName === 'second') { @@ -239,11 +250,12 @@ export default { } }, clearData() { - this.ticketForm = {number: '', tripNumber: '', station: '', nextStation: '', stationSeal: true, no: '', deputy: false}; - this.greenLicenseForm = {number: '', reason: '', tripNumber: '', line: '', stationSeal: true, signature: '', year: '', moon: '', day: '' }; + const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode) || {}; + this.ticketForm = {number: '', tripNumber: '', station: station.name, nextStation: '', stationSeal: station.name, no: '', deputy: false}; + this.greenLicenseForm = {number: '', reason: '', tripNumber: '', line: '', stationSeal: station.name, signature: '', year: '', moon: '', day: '' }; this.redLicenseForm = {number: '', licenseReceived: true, licenseTripNumber: '', licenseStation: '', licenseNextStation: '', licenseHour: '', licenseMinute: '', licenseTripNumber2: '', noticeTripNumber: '', noticeHour1: '', noticeMinute1: '', noticeTripNumber1: '', noticeHour2: '', - noticeMinute2: '', noticeTripNumber2: '', stationSeal: true, signature: '', year: '', moon: '', day: ''}; + noticeMinute2: '', noticeTripNumber2: '', stationSeal: station.name, signature: '', year: '', moon: '', day: ''}; }, query() { const params = { type: this.attachmentType }; @@ -272,7 +284,6 @@ export default { } commitOperate(menuOperate.Rail.railFillInTicket, params, 3).then(({valid, operate})=>{ this.clearData(); - this.ticketForm.station = this.showCentralizedStationName; }).catch(()=>{ this.$message.error('提交路票失败!'); }); diff --git a/src/views/newMap/trainTicket/redLicence.vue b/src/views/newMap/trainTicket/redLicence.vue index c29a5b87a..dd0ae29be 100644 --- a/src/views/newMap/trainTicket/redLicence.vue +++ b/src/views/newMap/trainTicket/redLicence.vue @@ -48,7 +48,7 @@ 次列车。
-
{{ showCentralizedStationName }}(站名印)车站值班员(签名)
+
{{ redLicenseForm.stationSeal }}(站名印)车站值班员(签名)
@@ -85,10 +85,6 @@ export default { type: Boolean, required: true }, - showCentralizedStationName: { - type: String, - required: true - }, giveMemberList: { type: Array, default() { @@ -105,6 +101,7 @@ export default { giveTicket() { if (this.memberId) { this.$emit('giveTicket', { ticketId: this.redLicenseForm.id, memberId: this.memberId }); + this.memberId = ''; } } } diff --git a/src/views/newMap/trainTicket/ticketInfo.vue b/src/views/newMap/trainTicket/ticketInfo.vue index d11f00372..8b6ba5f7c 100644 --- a/src/views/newMap/trainTicket/ticketInfo.vue +++ b/src/views/newMap/trainTicket/ticketInfo.vue @@ -9,26 +9,58 @@ :close-on-click-modal="false" center > -
+ + +