Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly

This commit is contained in:
joylink_cuiweidong 2023-01-18 11:06:15 +08:00
commit 83505d9a73
16 changed files with 623 additions and 86 deletions

View File

@ -210,7 +210,7 @@ export default {
}
},
dispatchCommandState(obj) {
Object.values(obj.cpStateMap).forEach(item => {
obj && Object.values(obj.cpStateMap).forEach(item => {
if (item.cpId) {
if (!this.queryResData.companyStateMap) {
this.queryResData.companyStateMap = {};
@ -218,6 +218,9 @@ export default {
this.$set(this.queryResData.companyStateMap, item.cpId, item);
}
});
},
'$store.state.socket.simulationReset':function(val) {
this.cmdTableData = [];
}
},
beforeDestroy() {},

View File

@ -177,6 +177,9 @@ export default {
'stationList'
])
},
beforeDestroy() {
EventBus.$emit('bottomTableShowOrHidden', false);
},
methods: {
initStationList() {
const list = [];
@ -228,7 +231,7 @@ export default {
this.$refs.trainFixedPathPane.doShow(stationCode);
},
bottomTableShowOrHidden() {
EventBus.$emit('bottomTableShowOrHidden');
EventBus.$emit('bottomTableShowOrHidden', true);
},
undeveloped() {
this.$refs.menuBar.doClose();

View File

@ -4194,6 +4194,170 @@ export const OperationEvent = {
// CTC_ZONE_SAVE_TRIP_NUMBER
// CTC_ZONE_SAVE_STATION
},
TicketOrRegister: {
attachmentType: {
typeChange: {
operation: 'b000',
domId: '_Tips-TicketOrRegister-AttachmentType-TypeChange'
}
},
ticketInput: {
nextStation: {
operation: 'b001',
domId: '_Tips-TicketOrRegister-TicketInput-NextStation'
},
number: {
operation: 'b002',
domId: '_Tips-TicketOrRegister-TicketInput-Number'
},
tripNumber: {
operation: 'b003',
domId: '_Tips-TicketOrRegister-TicketInput-TripNumber'
},
no: {
operation: 'b004',
domId: '_Tips-TicketOrRegister-TicketInput-No'
},
memberId: {
operation: 'b005',
domId: '_Tips-TicketOrRegister-TicketInput-memberId'
},
licenseTripNumber: {
operation: 'b006',
domId: '_Tips-TicketOrRegister-TicketInput-LicenseTripNumber'
},
licenseStation: {
operation: 'b007',
domId: '_Tips-TicketOrRegister-TicketInput-LicenseStation'
},
licenseNextStation: {
operation: 'b008',
domId: '_Tips-TicketOrRegister-TicketInput-LicenseNextStation'
},
licenseHour: {
operation: 'b009',
domId: '_Tips-TicketOrRegister-TicketInput-LicenseHour'
},
licenseMinute: {
operation: 'b010',
domId: '_Tips-TicketOrRegister-TicketInput-LicenseMinute'
},
licenseTripNumber2: {
operation: 'b011',
domId: '_Tips-TicketOrRegister-TicketInput-LicenseTripNumber2'
},
licenseReceived: {
operation: 'b012',
domId: '_Tips-TicketOrRegister-TicketInput-LicenseReceived'
},
noticeTripNumber: {
operation: 'b013',
domId: '_Tips-TicketOrRegister-TicketInput-NoticeTripNumber'
},
noticeHour1: {
operation: 'b014',
domId: '_Tips-TicketOrRegister-TicketInput-NoticeHour1'
},
noticeMinute1: {
operation: 'b015',
domId: '_Tips-TicketOrRegister-TicketInput-NoticeMinute1'
},
noticeTripNumber1: {
operation: 'b016',
domId: '_Tips-TicketOrRegister-TicketInput-NoticeTripNumber1'
},
noticeHour2: {
operation: 'b017',
domId: '_Tips-TicketOrRegister-TicketInput-NoticeHour2'
},
noticeMinute2: {
operation: 'b018',
domId: '_Tips-TicketOrRegister-TicketInput-NoticeMinute2'
},
noticeTripNumber2: {
operation: 'b019',
domId: '_Tips-TicketOrRegister-TicketInput-NoticeTripNumber2'
},
signature: {
operation: 'b020',
domId: '_Tips-TicketOrRegister-TicketInput-Signature'
},
year: {
operation: 'b021',
domId: '_Tips-TicketOrRegister-TicketInput-Year'
},
moon: {
operation: 'b022',
domId: '_Tips-TicketOrRegister-TicketInput-Moon'
},
day: {
operation: 'b023',
domId: '_Tips-TicketOrRegister-TicketInput-Day'
},
reason: {
operation: 'b024',
domId: '_Tips-TicketOrRegister-TicketInput-Reason'
},
line: {
operation: 'b025',
domId: '_Tips-TicketOrRegister-TicketInput-Line'
}
},
registerInput: {
addData: {
operation: 'b100',
domId: '_Tips_TicketOrRegister-RegisterInput-AddData'
},
moonDay: {
operation: 'b101',
domId: '_Tips-TicketOrRegister-RegisterInput-MoonDay'
},
hourMinute: {
operation: 'b102',
domId: '_Tips-TicketOrRegister-RegisterInput-HourMinute'
},
result: {
operation: 'b103',
domId: '_Tips-TicketOrRegister-RegisterInput-Result'
},
noticeTimeMoonDay: {
operation: 'b104',
domId: '_Tips-TicketOrRegister-RegisterInput-NoticeTimeMoonDay'
},
noticeTimeHourMinute: {
operation: 'b105',
domId: '_Tips-TicketOrRegister-RegisterInput-NoticeTimeHourMinute'
},
noticeTimeInfo: {
operation: 'b106',
domId: '_Tips-TicketOrRegister-RegisterInput-NoticeTimeInfo'
},
arriveTimeMoonDay: {
operation: 'b107',
domId: '_Tips-TicketOrRegister-RegisterInput-ArriveTimeMoonDay'
},
arriveTimeHourMinute: {
operation: 'b108',
domId: '_Tips-TicketOrRegister-RegisterInput-ArriveTimeHourMinute'
},
arriveTimeInfo: {
operation: 'b109',
domId: '_Tips-TicketOrRegister-RegisterInput-ArriveTimeInfo'
},
endTimeMoonDay: {
operation: 'b110',
domId: '_Tips-TicketOrRegister-RegisterInput-EndTimeMoonDay'
},
endTimeHourMinute: {
operation: 'b111',
domId: '_Tips-TicketOrRegister-RegisterInput-EndTimeHourMinute'
},
endTimeInfo: {
operation: 'b112',
domId: '_Tips-TicketOrRegister-RegisterInput-EndTimeInfo'
}
}
},
RailCommand: {
railFillInTicket: {
menu: {

View File

@ -604,6 +604,9 @@ const socket = {
setDispatchCommandMsg: ({ commit }, data) => {
commit('setDispatchCommandMsg', data);
},
clearDispatchCommandMsg: ({ commit }, data) => {
commit('clearDispatchCommandMsg');
},
setDispatchCommandState: ({ commit }, data) => {
commit('setDispatchCommandState', data);
},

View File

@ -79,10 +79,12 @@ export function creatSubscribe(topic, header, callbackFun) {
if (!Vue.prototype.$stomp) {
Vue.prototype.$stomp = new StompClient();
}
if (!Vue.prototype.$stomp.subscribeMap[topic]) {
if (!Vue.prototype.$stomp.subscribeMap.has(topic)) {
Vue.prototype.$stomp.subscribe(topic, callbackFun || callback, header);
} else {
Vue.prototype.$stomp.subscribeMap[topic].count++;
// Vue.prototype.$stomp.subscribeMap[topic].count++;
const obj = Vue.prototype.$stomp.subscribeMap.get(topic);
obj.count++;
}
} catch (error) {
console.error('websocket订阅失败', error, topic, header);

View File

@ -636,7 +636,7 @@ export default {
this.DisStationId = obj.deviceCode ? obj.deviceCode : 'DisStation1986';
},
dispatchCommandState(obj) {
Object.values(obj.cpStateMap).forEach(item => {
obj && Object.values(obj.cpStateMap).forEach(item => {
if (item.cpId) {
if (!this.queryResData.companyStateMap) {
this.queryResData.companyStateMap = {};

View File

@ -170,8 +170,8 @@ export default {
}
},
mounted() {
EventBus.$on('bottomTableShowOrHidden', () => {
this.showTable = !this.showTable;
EventBus.$on('bottomTableShowOrHidden', (val) => {
this.showTable = typeof val == 'boolean' ? val : !this.showTable;
});
},
beforeDestroy() {

View File

@ -111,6 +111,7 @@ export default {
exitSimulation(this.group);
}
this.$store.dispatch('socket/resetRailCtcRunplanInitMsg'); //
this.$store.dispatch('socket/clearDispatchCommandMsg'); //
},
methods:{
overallTranslation(flag) {

View File

@ -179,11 +179,11 @@
:default-sort="{prop: 'startTime', order: 'ascending'}"
border
>
<el-table-column width="50" label="序号" align="center">
<template slot-scope="scope">
<!--:style="{ background: scope.$index? '#f00':'#ff0' }" -->
<div>{{ scope.$index }}</div>
</template>
<el-table-column width="50" label="序号" align="center" type="index">
<!-- <template slot-scope="scope"> -->
<!--:style="{ background: scope.$index? '#f00':'#ff0' }" -->
<!-- <div>{{ scope.$index }}</div> -->
<!-- </template> -->
</el-table-column>
<el-table-column property="date" label="注意确认" />
<el-table-column property="tripNumber" label="车次" />

View File

@ -224,6 +224,7 @@ export default {
this.$store.dispatch('map/resetActiveTrainList', false);
this.$store.dispatch('map/setTrainWindowShow', false);
this.$store.dispatch('map/initSimulationButton');
this.$store.dispatch('socket/clearDispatchCommandMsg'); //
});
}).catch(() => {
this.loading = false;

View File

@ -620,7 +620,7 @@ export default {
this.allographRow = null;
},
dispatchCommandState(obj) {
Object.values(obj.cpStateMap).forEach(item => {
obj && Object.values(obj.cpStateMap).forEach(item => {
if (item.cpId) {
if (!this.queryResData.companyStateMap) {
this.queryResData.companyStateMap = {};
@ -636,6 +636,7 @@ export default {
},
'$store.state.socket.simulationReset': function (val) {
this.queryResData = {};
this.$store.dispatch('socket/setDispatchCommandState', null);
}
},
beforeDestroy() {},

View File

@ -2,7 +2,7 @@
<div>
<div style="padding: 20px;font-size: 20px;text-align: center;">簿册</div>
<div style="text-align: right;">
<el-button size="small" style="margin-right: 20px;margin-bottom: 10px;" type="primary" @click="add">新增</el-button>
<el-button :id="registerInput.addData.domId" size="small" style="margin-right: 20px;margin-bottom: 10px;" type="primary" @click="add">新增</el-button>
</div>
<el-table
:data="tableData"
@ -10,38 +10,38 @@
>
<el-table-column prop="date" label="月 日" width="95">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.moonDay" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.moonDay.domId" v-model="scope.row.moonDay" @blur="moonDayChange" />
<span v-else>{{ scope.row.moonDay }}</span>
</template>
</el-table-column>
<el-table-column prop="time" label="时 分" width="95">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.hourMinute" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.hourMinute.domId" v-model="scope.row.hourMinute" @blur="hourMinuteChange" />
<span v-else>{{ scope.row.hourMinute }}</span>
</template>
</el-table-column>
<el-table-column prop="checkResult" label="检查试验结果,所发现的不良及破损程度" width="280">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.result" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.result.domId" v-model="scope.row.result" @blur="resultChange" />
<span v-else>{{ scope.row.result }}</span>
</template>
</el-table-column>
<el-table-column label="通 知 时 间">
<el-table-column prop="noticeDate" label="月 日" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.noticeTime.moonDay" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.noticeTimeMoonDay.domId" v-model="scope.row.noticeTime.moonDay" @blur="noticeTimeMoonDayChange" />
<span v-else>{{ scope.row.noticeTime.moonDay }}</span>
</template>
</el-table-column>
<el-table-column prop="noticeTime" label="时 分" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.noticeTime.hourMinute" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.noticeTimeHourMinute.domId" v-model="scope.row.noticeTime.hourMinute" @blur="noticeTimeHourMinuteChange" />
<span v-else>{{ scope.row.noticeTime.hourMinute }}</span>
</template>
</el-table-column>
<el-table-column prop="noticeWay" label="通知到达的方式" width="130">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.noticeTime.info" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.noticeTimeInfo.domId" v-model="scope.row.noticeTime.info" @blur="noticeTimeInfoChange" />
<span v-else>{{ scope.row.noticeTime.info }}</span>
</template>
</el-table-column>
@ -49,19 +49,19 @@
<el-table-column label="到 达 时 间">
<el-table-column prop="arriveDate" label="月 日" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.arriveTime.moonDay" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.arriveTimeMoonDay.domId" v-model="scope.row.arriveTime.moonDay" @blur="arriveTimeMoonDayChange" />
<span v-else>{{ scope.row.arriveTime.moonDay }}</span>
</template>
</el-table-column>
<el-table-column prop="arriveTime" label="时 分" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.arriveTime.hourMinute" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.arriveTimeHourMinute.domId" v-model="scope.row.arriveTime.hourMinute" @blur="arriveTimeHourMinuteChange" />
<span v-else>{{ scope.row.arriveTime.hourMinute }}</span>
</template>
</el-table-column>
<el-table-column prop="arriveSeal" label="该段的工作人员到达后盖章" width="200">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.arriveTime.info" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.arriveTimeInfo.domId" v-model="scope.row.arriveTime.info" @blur="arriveTimeInfoChange" />
<span v-else>{{ scope.row.arriveTime.info }}</span>
</template>
</el-table-column>
@ -69,26 +69,26 @@
<el-table-column label="销除不良及破损的时分及盖章">
<el-table-column prop="repairDate" label="月 日" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.endTime.moonDay" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.endTimeMoonDay.domId" v-model="scope.row.endTime.moonDay" @blur="endTimeMoonDayChange" />
<span v-else>{{ scope.row.endTime.moonDay }}</span>
</template>
</el-table-column>
<el-table-column prop="repairTime" label="时 分" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.endTime.hourMinute" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.endTimeHourMinute.domId" v-model="scope.row.endTime.hourMinute" @blur="endTimeHourMinuteChange" />
<span v-else>{{ scope.row.endTime.hourMinute }}</span>
</template>
</el-table-column>
<el-table-column prop="repairReason" label="破损及不良的原因,采用何种办法进行修理的。工作人员及车站值班员盖章。">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.endTime.info" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.endTimeInfo.domId" v-model="scope.row.endTime.info" @blur="endTimeInfoChange" />
<span v-else>{{ scope.row.endTime.info }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="" width="60">
<template slot-scope="scope">
<el-button v-if="dataIndex === scope.$index" type="text" size="small" @click="saveData(scope.row, scope.$index)">保存</el-button>
<el-button v-if="dataIndex === scope.$index" :id="railFillInRegister.domId" type="text" size="small" @click="saveData(scope.row, scope.$index)">保存</el-button>
</template>
</el-table-column>
</el-table>
@ -97,6 +97,7 @@
<script>
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'Index',
data() {
@ -106,6 +107,14 @@ export default {
value: ''
};
},
computed: {
registerInput() {
return OperationEvent.TicketOrRegister.registerInput;
},
railFillInRegister() {
return OperationEvent.RailCommand.railFillInRegister.menu;
}
},
mounted() {
this.queryData();
},
@ -134,28 +143,118 @@ export default {
});
},
add() {
const data = {
moonDay: '',
hourMinute: '',
result: '',
noticeTime: {
moonDay: '',
hourMinute: '',
info: ''
},
arriveTime: {
moonDay: '',
hourMinute: '',
info: ''
},
endTime: {
moonDay: '',
hourMinute: '',
info: ''
}
const operate = {
start: true,
operation: this.registerInput.addData.operation
};
this.dataIndex = this.tableData.length || 0;
this.tableData.push(data);
this.$store.dispatch('trainingNew/next', operate).then(resp => {
const data = {
moonDay: '',
hourMinute: '',
result: '',
noticeTime: {
moonDay: '',
hourMinute: '',
info: ''
},
arriveTime: {
moonDay: '',
hourMinute: '',
info: ''
},
endTime: {
moonDay: '',
hourMinute: '',
info: ''
}
};
this.dataIndex = this.tableData.length || 0;
this.tableData.push(data);
});
},
moonDayChange(val) {
const operate = {
operation: this.registerInput.moonDay.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
hourMinuteChange(val) {
const operate = {
operation: this.registerInput.hourMinute.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
resultChange(val) {
const operate = {
operation: this.registerInput.result.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeTimeMoonDayChange(val) {
const operate = {
operation: this.registerInput.noticeTimeMoonDay.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeTimeHourMinuteChange(val) {
const operate = {
operation: this.registerInput.noticeTimeHourMinute.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeTimeInfoChange(val) {
const operate = {
operation: this.registerInput.noticeTimeInfo.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
arriveTimeMoonDayChange(val) {
const operate = {
operation: this.registerInput.arriveTimeMoonDay.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
arriveTimeHourMinuteChange(val) {
const operate = {
operation: this.registerInput.arriveTimeHourMinute.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
arriveTimeInfoChange(val) {
const operate = {
operation: this.registerInput.arriveTimeInfo.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
endTimeMoonDayChange(val) {
const operate = {
operation: this.registerInput.endTimeMoonDay.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
endTimeHourMinuteChange(val) {
const operate = {
operation: this.registerInput.endTimeHourMinute.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
endTimeInfoChange(val) {
const operate = {
operation: this.registerInput.endTimeInfo.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
}
}
};

View File

@ -3,36 +3,36 @@
<div style="text-align: center;font-size: 28px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<div style="font-size: 14px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 20px;justify-content: end;">
<div></div>
<el-input v-model="greenLicenseForm.number" size="small" :disabled="switchFlag" style="width: 80px;" />
<el-input :id="ticketInput.number.domId" v-model="greenLicenseForm.number" size="small" :disabled="switchFlag" style="width: 80px;" @blur="numberChange" />
<div style="margin-right: 20px;"></div>
</div>
<div style="font-size: 16px;margin-top: 20px;">
<span style="margin-left: 36px;"></span>
<el-radio-group v-model="greenLicenseForm.reason" :disabled="switchFlag" style="display: inline;">
<el-radio-group :id="ticketInput.reason.domId" v-model="greenLicenseForm.reason" :disabled="switchFlag" style="display: inline;" @change="reasonChange">
<el-radio label="出站(进路)信号机故障">出站进路信号机故障</el-radio>
<el-radio label="未设出站信号机" style="margin-left: 5px;">未设出站信号机</el-radio>
<el-radio label="列车头部越过出站(进路)信号机" style="margin-left: 5px;">列车头部越过出站进路信号机</el-radio>
</el-radio-group>
<span>的情况下准许第</span>
<el-input v-model="greenLicenseForm.tripNumber" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.tripNumber.domId" v-model="greenLicenseForm.tripNumber" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="tripNumberChange" />
<span>次列车由</span>
<el-input v-model="greenLicenseForm.line" style="display: inline;" :disabled="switchFlag" size="small" class="inline-input" />
<el-input :id="ticketInput.line.domId" v-model="greenLicenseForm.line" style="display: inline;" :disabled="switchFlag" size="small" class="inline-input" @blur="lineChange" />
<span>线上发车</span>
</div>
<div style="font-size: 16px;margin-top: 60px;display: flex;align-items: center;justify-content: end;">
<div><span style="color: #f00;">{{ greenLicenseForm.stationSeal }}</span>站名印车站值班员签名</div>
<el-input v-model="greenLicenseForm.signature" :disabled="switchFlag" size="small" style="width: 80px;" />
<el-input :id="ticketInput.signature.domId" v-model="greenLicenseForm.signature" :disabled="switchFlag" size="small" style="width: 80px;" @blur="signatureChange" />
</div>
<div style="font-size: 16px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 10px;justify-content: end;">
<el-input v-model="greenLicenseForm.year" :disabled="switchFlag" size="small" style="width: 80px;" />
<el-input :id="ticketInput.year.domId" v-model="greenLicenseForm.year" :disabled="switchFlag" size="small" style="width: 80px;" @blur="yearChange" />
<div></div>
<el-input v-model="greenLicenseForm.moon" :disabled="switchFlag" size="small" style="width: 80px;" />
<el-input :id="ticketInput.moon.domId" v-model="greenLicenseForm.moon" :disabled="switchFlag" size="small" style="width: 80px;" @blur="moonChange" />
<div></div>
<el-input v-model="greenLicenseForm.day" :disabled="switchFlag" size="small" style="width: 80px;" />
<el-input :id="ticketInput.day.domId" v-model="greenLicenseForm.day" :disabled="switchFlag" size="small" style="width: 80px;" @blur="dayChange" />
<div>日填发</div>
</div>
<div v-if="switchFlag" style="text-align: center;">
<el-select v-model="memberId" size="small" style="width: 200px" placeholder="请选择">
<el-select :id="ticketInput.memberId.domId" v-model="memberId" size="small" style="width: 200px" placeholder="请选择" @change="memberIdChange">
<el-option
v-for="item in giveMemberList"
:key="item.id"
@ -47,6 +47,7 @@
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'GreenLicence',
props: {
@ -73,6 +74,9 @@ export default {
computed: {
userId() {
return this.$store.state.user ? this.$store.state.user.id : '';
},
ticketInput() {
return OperationEvent.TicketOrRegister.ticketInput;
}
},
methods: {
@ -81,6 +85,69 @@ export default {
this.$emit('giveTicket', { ticketId: this.greenLicenseForm.id, memberId: this.memberId });
this.memberId = '';
}
},
numberChange(val) {
const operate = {
operation: this.ticketInput.number.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
reasonChange(val) {
const operate = {
operation: this.ticketInput.reason.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
tripNumberChange(val) {
const operate = {
operation: this.ticketInput.tripNumber.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
lineChange(val) {
const operate = {
operation: this.ticketInput.line.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
signatureChange(val) {
const operate = {
operation: this.ticketInput.signature.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
yearChange(val) {
const operate = {
operation: this.ticketInput.year.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
moonChange(val) {
const operate = {
operation: this.ticketInput.moon.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
dayChange(val) {
const operate = {
operation: this.ticketInput.day.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
memberIdChange(val) {
const operate = {
operation: this.ticketInput.memberId.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
}
}
};

View File

@ -3,7 +3,7 @@
<div style="padding: 20px;font-size: 20px;text-align: center;">路票</div>
<div style="display: flex;align-items: center;margin-bottom: 10px;">
<div>附件类型</div>
<el-select v-model="attachmentType" size="small" placeholder="请选择" @change="attachmentTypeChange">
<el-select :id="typeChange.domId" v-model="attachmentType" size="small" placeholder="请选择" @change="attachmentTypeChange">
<el-option
v-for="item in typeList"
:key="item.value"
@ -45,6 +45,7 @@
<script>
import { mapGetters } from 'vuex';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import RailTicket from './trainTicket';
import GreenLicence from './greenLicence';
import RedLicence from './redLicence';
@ -121,6 +122,9 @@ export default {
},
roleDeviceCode() {
return this.$store.state.training.roleDeviceCode;
},
typeChange() {
return OperationEvent.TicketOrRegister.attachmentType.typeChange;
}
},
watch: {
@ -167,9 +171,15 @@ export default {
}
},
attachmentTypeChange() {
if (this.activeName === 'second') {
this.query();
}
const operate = {
operation: this.typeChange.operation,
val: this.attachmentType
};
this.$store.dispatch('trainingNew/next', operate).then(resp => {
if (this.activeName === 'second') {
this.query();
}
});
},
clearData() {
const station = this.$store.getters['map/getDeviceByCode'](this.roleDeviceCode) || {};

View File

@ -3,24 +3,24 @@
<div style="text-align: center;font-size: 28px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<div style="font-size: 14px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 20px;justify-content: end;">
<div></div>
<el-input v-model="redLicenseForm.number" :disabled="switchFlag" size="small" style="width: 80px;" />
<el-input :id="ticketInput.number.domId" v-model="redLicenseForm.number" :disabled="switchFlag" size="small" style="width: 80px;" @blur="numberChange" />
<div style="margin-right: 20px;"></div>
</div>
<div style="font-size: 16px;margin-top: 10px;text-indent:36px;">
<span>现在一切电话中断准许第</span>
<el-input v-model="redLicenseForm.licenseTripNumber" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.licenseTripNumber.domId" v-model="redLicenseForm.licenseTripNumber" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="licenseTripNumberChange" />
<span>次列车自</span>
<el-input v-model="redLicenseForm.licenseStation" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.licenseStation.domId" v-model="redLicenseForm.licenseStation" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="licenseStationChange" />
<span>站至</span>
<el-input v-model="redLicenseForm.licenseNextStation" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.licenseNextStation.domId" v-model="redLicenseForm.licenseNextStation" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="licenseNextStationChange" />
<span>本列车前于</span>
<el-input v-model="redLicenseForm.licenseHour" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.licenseHour.domId" v-model="redLicenseForm.licenseHour" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="licenseHourChange" />
<span></span>
<el-input v-model="redLicenseForm.licenseMinute" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.licenseMinute.domId" v-model="redLicenseForm.licenseMinute" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="licenseMinuteChange" />
<span>分发出的第</span>
<el-input v-model="redLicenseForm.licenseTripNumber2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.licenseTripNumber2.domId" v-model="redLicenseForm.licenseTripNumber2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="licenseTripNumber2Change" />
<span>次列车邻站到达通知</span>
<el-radio-group v-model="redLicenseForm.licenseReceived" :disabled="switchFlag" style="display: inline;">
<el-radio-group :id="ticketInput.licenseReceived.domId" v-model="redLicenseForm.licenseReceived" :disabled="switchFlag" style="display: inline;" @change="licenseReceivedChange">
<el-radio :label="true"></el-radio>
<el-radio :label="false" style="margin-left: 5px;"></el-radio>
</el-radio-group>
@ -29,38 +29,38 @@
<div style="text-align: center;font-size: 28px;margin-top: 10px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<div style="font-size: 16px;margin-top: 10px;text-indent: 36px;">
<span>1.</span>
<el-input v-model="redLicenseForm.noticeTripNumber" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.noticeTripNumber.domId" v-model="redLicenseForm.noticeTripNumber" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="noticeTripNumberChange" />
<span>次列车到达你站后准接你站发出的列车</span>
</div>
<div style="font-size: 16px;margin-top: 10px;text-indent: 36px;">
<span>2.</span>
<el-input v-model="redLicenseForm.noticeHour1" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.noticeHour1.domId" v-model="redLicenseForm.noticeHour1" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="noticeHour1Change" />
<span></span>
<el-input v-model="redLicenseForm.noticeMinute1" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.noticeMinute1.domId" v-model="redLicenseForm.noticeMinute1" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="noticeMinute1Change" />
<span>分发出第</span>
<el-input v-model="redLicenseForm.noticeTripNumber1" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.noticeTripNumber1.domId" v-model="redLicenseForm.noticeTripNumber1" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="noticeTripNumber1Change" />
<span>次列车并于</span>
<el-input v-model="redLicenseForm.noticeHour2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.noticeHour2.domId" v-model="redLicenseForm.noticeHour2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="noticeHour2Change" />
<span></span>
<el-input v-model="redLicenseForm.noticeMinute2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.noticeMinute2.domId" v-model="redLicenseForm.noticeMinute2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="noticeMinute2Change" />
<span>分再发出第</span>
<el-input v-model="redLicenseForm.noticeTripNumber2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.noticeTripNumber2.domId" v-model="redLicenseForm.noticeTripNumber2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="noticeTripNumber2Change" />
<span>次列车</span>
</div>
<div style="font-size: 16px;margin-top: 60px;display: flex;align-items: center;justify-content: end;">
<div><span style="color: #f00;">{{ redLicenseForm.stationSeal }}</span>站名印车站值班员签名</div>
<el-input v-model="redLicenseForm.signature" :disabled="switchFlag" size="small" style="width: 80px;" />
<el-input :id="ticketInput.signature.domId" v-model="redLicenseForm.signature" :disabled="switchFlag" size="small" style="width: 80px;" @blur="signatureChange" />
</div>
<div style="font-size: 16px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 10px;justify-content: end;">
<el-input v-model="redLicenseForm.year" :disabled="switchFlag" size="small" style="width: 80px;" />
<el-input :id="ticketInput.year.domId" v-model="redLicenseForm.year" :disabled="switchFlag" size="small" style="width: 80px;" @blur="yearChange" />
<div></div>
<el-input v-model="redLicenseForm.moon" :disabled="switchFlag" size="small" style="width: 80px;" />
<el-input :id="ticketInput.moon.domId" v-model="redLicenseForm.moon" :disabled="switchFlag" size="small" style="width: 80px;" @blur="moonChange" />
<div></div>
<el-input v-model="redLicenseForm.day" :disabled="switchFlag" size="small" style="width: 80px;" />
<el-input :id="ticketInput.day.domId" v-model="redLicenseForm.day" :disabled="switchFlag" size="small" style="width: 80px;" @blur="dayChange" />
<div>日填发</div>
</div>
<div v-if="switchFlag" style="text-align: center;">
<el-select v-model="memberId" size="small" style="width: 200px" placeholder="请选择">
<el-select :id="ticketInput.memberId.domId" v-model="memberId" size="small" style="width: 200px" placeholder="请选择" @change="memberIdChange">
<el-option
v-for="item in giveMemberList"
:key="item.id"
@ -75,6 +75,7 @@
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'RedLicence',
props: {
@ -101,6 +102,9 @@ export default {
computed: {
userId() {
return this.$store.state.user ? this.$store.state.user.id : '';
},
ticketInput() {
return OperationEvent.TicketOrRegister.ticketInput;
}
},
methods: {
@ -109,6 +113,146 @@ export default {
this.$emit('giveTicket', { ticketId: this.redLicenseForm.id, memberId: this.memberId });
this.memberId = '';
}
},
numberChange(val) {
const operate = {
operation: this.ticketInput.number.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
licenseTripNumberChange(val) {
const operate = {
operation: this.ticketInput.licenseTripNumber.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
licenseStationChange(val) {
const operate = {
operation: this.ticketInput.licenseStation.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
licenseNextStationChange(val) {
const operate = {
operation: this.ticketInput.licenseNextStation.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
licenseHourChange(val) {
const operate = {
operation: this.ticketInput.licenseHour.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
licenseMinuteChange(val) {
const operate = {
operation: this.ticketInput.licenseMinute.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
licenseTripNumber2Change(val) {
const operate = {
operation: this.ticketInput.licenseTripNumber2.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
licenseReceivedChange(val) {
const operate = {
operation: this.ticketInput.licenseReceived.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeTripNumberChange(val) {
const operate = {
operation: this.ticketInput.noticeTripNumber.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeHour1Change(val) {
const operate = {
operation: this.ticketInput.noticeHour1.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeMinute1Change(val) {
const operate = {
operation: this.ticketInput.noticeMinute1.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeTripNumber1Change(val) {
const operate = {
operation: this.ticketInput.noticeTripNumber1.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeHour2Change(val) {
const operate = {
operation: this.ticketInput.noticeHour2.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeMinute2Change(val) {
const operate = {
operation: this.ticketInput.noticeMinute2.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeTripNumber2Change(val) {
const operate = {
operation: this.ticketInput.noticeTripNumber2.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
signatureChange(val) {
const operate = {
operation: this.ticketInput.signature.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
yearChange(val) {
const operate = {
operation: this.ticketInput.year.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
moonChange(val) {
const operate = {
operation: this.ticketInput.moon.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
dayChange(val) {
const operate = {
operation: this.ticketInput.day.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
memberIdChange(val) {
const operate = {
operation: this.ticketInput.memberId.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
}
}
};

View File

@ -3,18 +3,18 @@
<div style="text-align: center;font-size: 28px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<div style="display: flex;justify-content: center;align-items: center;font-size: 18px;margin-top: 10px;">
<div>电话记录&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<el-input v-model="ticketForm.number" :disabled="switchFlag" size="mini" style="width: 80px;" />
<el-input :id="ticketInput.number.domId" v-model="ticketForm.number" :disabled="switchFlag" size="mini" style="width: 80px;" @blur="numberChange" />
<div></div>
</div>
<div style="display: flex;justify-content: center;align-items: center;font-size: 18px;margin-top: 10px;">
<div style="margin-left: 80px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<el-input v-model="ticketForm.tripNumber" :disabled="switchFlag" size="mini" style="width: 80px;" />
<el-input :id="ticketInput.tripNumber.domId" v-model="ticketForm.tripNumber" :disabled="switchFlag" size="mini" style="width: 80px;" @blur="tripNumberChange" />
</div>
<div style="display: flex; justify-content: center;font-size: 40px;font-weight: bolder;margin-top: 25px;align-items: center;">
<div>{{ ticketForm.station }}</div>
<svg-icon icon-class="arrow" style="width: 100px" />
<div>
<el-select v-model="ticketForm.nextStation" size="small" :disabled="switchFlag" class="station-input" placeholder="请选择">
<el-select :id="ticketInput.nextStation.domId" v-model="ticketForm.nextStation" size="small" :disabled="switchFlag" class="station-input" placeholder="请选择" @change="nextStationChange">
<el-option
v-for="item in stationList"
:key="item.code"
@ -28,11 +28,11 @@
<div style="margin-left: 50px;"><span style="color: #f00">{{ ticketForm.stationSeal }}</span>站名印</div>
<div>
<span>编号</span>
<el-input v-model="ticketForm.no" size="small" :disabled="switchFlag" style="width: 80px;" />
<el-input :id="ticketInput.no.domId" v-model="ticketForm.no" size="small" :disabled="switchFlag" style="width: 80px;" @blur="noChange" />
</div>
</div>
<div v-if="switchFlag" style="text-align: center;">
<el-select v-model="memberId" size="small" style="width: 200px" placeholder="请选择">
<el-select :id="ticketInput.memberId.domId" v-model="memberId" size="small" style="width: 200px" placeholder="请选择" @change="memberIdChange">
<el-option
v-for="item in giveMemberList"
:key="item.id"
@ -47,6 +47,7 @@
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainTicket',
props: {
@ -77,6 +78,9 @@ export default {
computed: {
userId() {
return this.$store.state.user ? this.$store.state.user.id : '';
},
ticketInput() {
return OperationEvent.TicketOrRegister.ticketInput;
}
},
methods: {
@ -85,6 +89,41 @@ export default {
this.$emit('giveTicket', { ticketId: this.ticketForm.id, memberId: this.memberId });
this.memberId = '';
}
},
nextStationChange(val) {
const operate = {
operation: this.ticketInput.nextStation.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
numberChange(val) {
const operate = {
operation: this.ticketInput.number.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
tripNumberChange(val) {
const operate = {
operation: this.ticketInput.tripNumber.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
noChange(val) {
const operate = {
operation: this.ticketForm.no.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
memberIdChange(val) {
const operate = {
operation: this.ticketForm.memberId.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
}
}
};