Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
5854fa5a60
@ -678,6 +678,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
|
||||
|
@ -429,6 +429,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: '给出票据'}
|
||||
}
|
||||
};
|
||||
|
@ -3883,6 +3883,12 @@ export const OperationEvent = {
|
||||
operation: '1204',
|
||||
domId: '_Tips-Rail-railQueryTicket'
|
||||
}
|
||||
},
|
||||
railGiveTicketTo: {
|
||||
menu: {
|
||||
operation: '1205',
|
||||
domId: '_Tips-Rail-railGiveTicketTo'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -273,6 +273,9 @@ function handle(state, data) {
|
||||
case 'SIMULATION_CTC_RUN_PLAN_CONFIRM_SEND':
|
||||
state.changedCtcRunplanMap = msg;
|
||||
break;
|
||||
case 'SIMULATION_RAIL_TICKET':
|
||||
state.ticketInfo = msg;
|
||||
break;
|
||||
//
|
||||
// // 大铁项目 调度台 运行图信息 初始化消息
|
||||
// case 'SIMULATION_RAILWAY_RUN_PLAN_INIT':
|
||||
@ -405,6 +408,7 @@ const socket = {
|
||||
overConversition: {}, // 仿真会话结束
|
||||
exitConversition: {}, // 仿真成员退出会话
|
||||
conversationInfo: {}, // 仿真会话消息
|
||||
ticketInfo: {}, // 路票消息
|
||||
|
||||
message: {}, // 仿真聊天
|
||||
msgQueue: [], // 命令请求列表(旧版控制权转移可能在用,新版不用这个)
|
||||
|
@ -450,7 +450,6 @@ const training = {
|
||||
rtn && rtn.valid && commit('next');
|
||||
}
|
||||
}
|
||||
console.log(rtn, '*********');
|
||||
resolve(rtn);
|
||||
}).catch(error => {
|
||||
// console.error(error);
|
||||
|
@ -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';
|
||||
|
@ -40,7 +40,7 @@
|
||||
<div style="position:relative">
|
||||
<div v-for="(item, index) in treeData" :key="index" class="proper_box">
|
||||
<div class="proper_title">{{ item.label }}</div>
|
||||
<div v-for="(data, i) in item.children" :key="i" style="position: relative; width: 73px; heigth: 73px; margin-left: 5px; float: left;">
|
||||
<div v-for="(data, i) in item.children" :key="i" style="position: relative; width: 73px; height: 73px; margin-left: 5px; float: left;">
|
||||
<div v-if="data.show && item.id == 'driver'" :id="'proper_content_box'+data.id" class="proper_content_box" :class="{'active': data.active,'isInviting':data.isInviting}" @click="handleCheckChange(data)">
|
||||
<span class="proper_content_box_text">{{ data.label + (data.userId? '(' + (simulationUsers[data.userId]||{}).nickName + ')': '') }}</span>
|
||||
</div>
|
||||
|
@ -64,6 +64,7 @@
|
||||
<menu-train-list v-if="prdType=='02'" @setCenter="setCenter" />
|
||||
<members-manage ref="membersManage" :is-admin="isAdmin" @addSimulationMember="addSimulationMember" /> <!-- 成员管理 -->
|
||||
<add-member ref="addMember" :station-list="stationList" />
|
||||
<ticket-info v-if="lineCode === '16'" ref="ticketInfo" />
|
||||
<Jl3d-Device
|
||||
v-if="deviceif"
|
||||
v-show="deviceShow"
|
||||
@ -110,6 +111,7 @@ import TmtDialog from '@/views/newMap/displayBaSiDi/tmt';
|
||||
import AtrDialog from '@/views/newMap/displayBaSiDi/atr';
|
||||
import TrainTrunkDetail from '@/views/newMap/displayBaSiDi/trainTrunkDetail';
|
||||
import DispatcherStation from './dispatcherStation';
|
||||
import TicketInfo from '../trainTicket/ticketInfo';
|
||||
import Vue from 'vue';
|
||||
|
||||
export default {
|
||||
@ -138,7 +140,8 @@ export default {
|
||||
TmtDialog,
|
||||
AtrDialog,
|
||||
TrainTrunkDetail,
|
||||
DispatcherStation
|
||||
DispatcherStation,
|
||||
TicketInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -274,6 +277,11 @@ export default {
|
||||
if (list && list.length) { // 人员变化监控
|
||||
this.checkRoleChange(list);
|
||||
}
|
||||
},
|
||||
'$store.state.socket.ticketInfo': function(val) {
|
||||
if (val) {
|
||||
this.$refs.ticketInfo.doShow(val);
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
|
@ -56,6 +56,7 @@
|
||||
|
||||
<script>
|
||||
import eMembers from './e-members';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { assignUsersPlayRoles } from '@/api/jointSimulation';
|
||||
export default {
|
||||
name: 'MembersManage',
|
||||
@ -186,7 +187,7 @@ export default {
|
||||
ctcOperatorList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'STATION_ASSISTANT':
|
||||
this.memberData[item.id].labelName = '车站助理' + +device.name + (item.name ? `-${item.name }` : '');
|
||||
this.memberData[item.id].labelName = '车站助理-' + device.name + (item.name ? `-${item.name }` : '');
|
||||
stationAssistantList.push(this.memberData[item.id]);
|
||||
break;
|
||||
}
|
||||
@ -225,6 +226,7 @@ export default {
|
||||
children: stationAssistantList
|
||||
}
|
||||
];
|
||||
EventBus.$emit('trainTicketMember', [...stationSupervisorList, ...stationAssistantList]);
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.tree) {
|
||||
this.$refs.tree.filter(this.queryMember);
|
||||
|
@ -1,11 +1,62 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<div v-for="item in modelList" :key="item.type" class="content-box-list" style="margin-top: 10px">
|
||||
<div class="title-box">{{ item.name }}</div>
|
||||
<div class="list-box">
|
||||
<div
|
||||
v-for="nor in item.list"
|
||||
:key="nor.code"
|
||||
class="list-content"
|
||||
@mouseenter="mouseenter(nor)"
|
||||
@mouseleave="mouseleave(nor)"
|
||||
>
|
||||
<div class="name">{{ nor.name || nor.code }}</div>
|
||||
<div class="close" @click="delList(nor, item.list)"><i class="el-icon-close" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from 'vuex';
|
||||
|
||||
export default {
|
||||
name: "multiSelect"
|
||||
}
|
||||
name: 'MultiSelect',
|
||||
data() {
|
||||
return {
|
||||
modelList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', ['seclectDeviceList'])
|
||||
},
|
||||
methods: {
|
||||
mouseenter(model) {
|
||||
if (model._type == 'Section') {
|
||||
model.instance.mouseover();
|
||||
}
|
||||
},
|
||||
mouseleave(model) {
|
||||
if (model._type == 'Section') {
|
||||
model.instance.mouseout();
|
||||
}
|
||||
},
|
||||
// 删除当前选中
|
||||
delList(model, list) {
|
||||
list.forEach((nor, index) => {
|
||||
if (nor.code == model.code) {
|
||||
list.splice(index, 1);
|
||||
}
|
||||
});
|
||||
this.seclectDeviceList.forEach((item, index) => {
|
||||
if (item.code == model.code) {
|
||||
this.seclectDeviceList.splice(index, 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
@ -20,7 +20,7 @@
|
||||
<span>线上发车。</span>
|
||||
</div>
|
||||
<div style="font-size: 16px;margin-top: 60px;display: flex;align-items: center;justify-content: end;">
|
||||
<div><span style="color: #f00;">{{ showCentralizedStationName }}</span>(站名印)车站值班员(签名)</div>
|
||||
<div><span style="color: #f00;">{{ greenLicenseForm.stationSeal }}</span>(站名印)车站值班员(签名)</div>
|
||||
<el-input v-model="greenLicenseForm.signature" :disabled="switchFlag" size="small" style="width: 80px;" />
|
||||
</div>
|
||||
<div style="font-size: 16px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 10px;justify-content: end;">
|
||||
@ -31,6 +31,17 @@
|
||||
<el-input v-model="greenLicenseForm.day" :disabled="switchFlag" size="small" style="width: 80px;" />
|
||||
<div>日填发</div>
|
||||
</div>
|
||||
<div v-if="switchFlag" style="text-align: center;">
|
||||
<el-select v-model="memberId" size="small" style="width: 200px" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in giveMemberList"
|
||||
:key="item.id"
|
||||
:label="item.labelName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button size="small" style="margin-left: 10px;" type="primary" @click="giveTicket">给予</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -46,15 +57,25 @@ export default {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
showCentralizedStationName: {
|
||||
type: String,
|
||||
required: true
|
||||
giveMemberList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
memberId: ''
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
giveTicket() {
|
||||
if (this.memberId) {
|
||||
this.$emit('giveTicket', { ticketId: this.greenLicenseForm.id, memberId: this.memberId });
|
||||
this.memberId = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -25,8 +25,8 @@
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane label="路票填写" name="first">
|
||||
<rail-ticket v-if="attachmentType === 'RAIL_TICKET'" :switch-flag="false" :ticket-form="ticketForm" :station-list="stationList" />
|
||||
<green-licence v-else-if="attachmentType === 'GREEN_LICENCE'" :switch-flag="false" :green-license-form="greenLicenseForm" :show-centralized-station-name="showCentralizedStationName" />
|
||||
<red-licence v-else-if="attachmentType === 'RED_LICENCE'" :show-centralized-station-name="showCentralizedStationName" :switch-flag="false" :red-license-form="redLicenseForm" />
|
||||
<green-licence v-else-if="attachmentType === 'GREEN_LICENCE'" :switch-flag="false" :green-license-form="greenLicenseForm" />
|
||||
<red-licence v-else-if="attachmentType === 'RED_LICENCE'" :switch-flag="false" :red-license-form="redLicenseForm" />
|
||||
<div style="text-align: center;">
|
||||
<el-button size="small" style="margin-top: 10px;" type="primary" @click="submit">提交</el-button>
|
||||
</div>
|
||||
@ -34,17 +34,17 @@
|
||||
<el-tab-pane label="路票查询" name="second">
|
||||
<div v-if="attachmentType === 'RAIL_TICKET'" style="height: 450px;overflow-y: auto;">
|
||||
<template v-for="(item, index) in railTicketList">
|
||||
<rail-ticket :key="index" :switch-flag="true" :ticket-form="item" :station-list="stationList" />
|
||||
<rail-ticket :key="index" :switch-flag="true" :ticket-form="item" :station-list="stationList" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
|
||||
</template>
|
||||
</div>
|
||||
<div v-else-if="attachmentType === 'GREEN_LICENCE'" style="height: 450px;overflow-y: auto;">
|
||||
<template v-for="(item, index) in greenLicenseList">
|
||||
<green-licence :key="index" :show-centralized-station-name="showCentralizedStationName" :switch-flag="true" :green-license-form="item" />
|
||||
<green-licence :key="index" :switch-flag="true" :green-license-form="item" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
|
||||
</template>
|
||||
</div>
|
||||
<div v-else-if="attachmentType === 'RED_LICENCE'" style="height: 450px;overflow-y: auto;">
|
||||
<template v-for="(item, index) in redLicenseList">
|
||||
<red-licence :key="index" :show-centralized-station-name="showCentralizedStationName" :switch-flag="true" :red-license-form="item" />
|
||||
<red-licence :key="index" :switch-flag="true" :red-license-form="item" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
|
||||
</template>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
@ -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,13 +147,14 @@ export default {
|
||||
railTicketList: [],
|
||||
greenLicenseList: [],
|
||||
redLicenseList: [],
|
||||
giveMemberList: [],
|
||||
activeName: 'first',
|
||||
ticketForm: {
|
||||
number: '',
|
||||
tripNumber: '',
|
||||
station: '',
|
||||
nextStation: '',
|
||||
stationSeal: true,
|
||||
stationSeal: '',
|
||||
no: '',
|
||||
deputy: false
|
||||
},
|
||||
@ -161,7 +163,7 @@ export default {
|
||||
reason: '',
|
||||
tripNumber: '',
|
||||
line: '',
|
||||
stationSeal: true,
|
||||
stationSeal: '',
|
||||
signature: '',
|
||||
year: '',
|
||||
moon: '',
|
||||
@ -183,7 +185,7 @@ export default {
|
||||
noticeHour2: '',
|
||||
noticeMinute2: '',
|
||||
noticeTripNumber2: '',
|
||||
stationSeal: true,
|
||||
stationSeal: '',
|
||||
signature: '',
|
||||
year: '',
|
||||
moon: '',
|
||||
@ -205,21 +207,37 @@ 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() {
|
||||
EventBus.$on('trainTicketMember', (memberList) => {
|
||||
this.giveMemberList = memberList;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doClose() {
|
||||
this.trainTicketShow = false;
|
||||
},
|
||||
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') {
|
||||
@ -232,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 };
|
||||
@ -265,10 +284,16 @@ export default {
|
||||
}
|
||||
commitOperate(menuOperate.Rail.railFillInTicket, params, 3).then(({valid, operate})=>{
|
||||
this.clearData();
|
||||
this.ticketForm.station = this.showCentralizedStationName;
|
||||
}).catch(()=>{
|
||||
this.$message.error('提交路票失败!');
|
||||
});
|
||||
},
|
||||
giveTicket(params) {
|
||||
commitOperate(menuOperate.Rail.railGiveTicketTo, params, 3).then(({valid, operate}) => {
|
||||
this.query();
|
||||
}).catch(()=> {
|
||||
this.$message.error('给予路票失败!');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -20,11 +20,11 @@
|
||||
<span>分发出的第</span>
|
||||
<el-input v-model="redLicenseForm.licenseTripNumber2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
|
||||
<span>次列车,邻站到达通知</span>
|
||||
<el-radio-group v-model="redLicenseForm.licenseReceived" :disabled="switchFlag" style="display: inline;">
|
||||
<el-radio label="已">已</el-radio>
|
||||
<el-radio label="未" style="margin-left: 5px;">未</el-radio>
|
||||
</el-radio-group>
|
||||
<span>收到</span>
|
||||
<el-radio-group v-model="redLicenseForm.licenseReceived" :disabled="switchFlag" style="display: inline;">
|
||||
<el-radio label="已">已</el-radio>
|
||||
<el-radio label="未" style="margin-left: 5px;">未</el-radio>
|
||||
</el-radio-group>
|
||||
<span>收到</span>
|
||||
</div>
|
||||
<div style="text-align: center;font-size: 28px;margin-top: 10px;">通 知 书</div>
|
||||
<div style="font-size: 16px;margin-top: 10px;text-indent: 36px;">
|
||||
@ -48,7 +48,7 @@
|
||||
<span>次列车。</span>
|
||||
</div>
|
||||
<div style="font-size: 16px;margin-top: 60px;display: flex;align-items: center;justify-content: end;">
|
||||
<div><span style="color: #f00;">{{ showCentralizedStationName }}</span>(站名印)车站值班员(签名)</div>
|
||||
<div><span style="color: #f00;">{{ redLicenseForm.stationSeal }}</span>(站名印)车站值班员(签名)</div>
|
||||
<el-input v-model="redLicenseForm.signature" :disabled="switchFlag" size="small" style="width: 80px;" />
|
||||
</div>
|
||||
<div style="font-size: 16px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 10px;justify-content: end;">
|
||||
@ -59,6 +59,17 @@
|
||||
<el-input v-model="redLicenseForm.day" :disabled="switchFlag" size="small" style="width: 80px;" />
|
||||
<div>日填发</div>
|
||||
</div>
|
||||
<div v-if="switchFlag" style="text-align: center;">
|
||||
<el-select v-model="memberId" size="small" style="width: 200px" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in giveMemberList"
|
||||
:key="item.id"
|
||||
:label="item.labelName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button size="small" style="margin-left: 10px;" type="primary" @click="giveTicket">给予</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -74,15 +85,25 @@ export default {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
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 });
|
||||
this.memberId = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
71
src/views/newMap/trainTicket/ticketInfo.vue
Normal file
71
src/views/newMap/trainTicket/ticketInfo.vue
Normal file
@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="路票"
|
||||
:visible="trainTicketShow"
|
||||
width="640px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
center
|
||||
>
|
||||
<train-ticket v-if="trainTicket.type === 'RAIL_TICKET'" :station-list="stationList" :switch-flag="true" :ticket-form="trainTicket" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
|
||||
<green-licence v-else-if="trainTicket.type === 'GREEN_LICENCE'" :switch-flag="true" :green-license-form="trainTicket" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
|
||||
<red-licence v-else-if="trainTicket.type === 'RED_LICENCE'" :switch-flag="true" :red-license-form="trainTicket" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TrainTicket from './trainTicket';
|
||||
import RedLicence from './redLicence';
|
||||
import GreenLicence from './greenLicence';
|
||||
import {mapGetters} from 'vuex';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
export default {
|
||||
name: 'TicketInfo',
|
||||
components: {
|
||||
TrainTicket,
|
||||
RedLicence,
|
||||
GreenLicence
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainTicketShow: false,
|
||||
trainTicket: {},
|
||||
giveMemberList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
EventBus.$on('trainTicketMember', (memberList) => {
|
||||
this.giveMemberList = memberList;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doClose() {
|
||||
this.trainTicketShow = false;
|
||||
},
|
||||
doShow(info) {
|
||||
this.trainTicketShow = true;
|
||||
this.trainTicket = info;
|
||||
},
|
||||
giveTicket(params) {
|
||||
commitOperate(menuOperate.Rail.railGiveTicketTo, params, 3).then(({valid, operate}) => {
|
||||
this.$message.success('给予路票成功!');
|
||||
this.doClose();
|
||||
}).catch(()=> {
|
||||
this.$message.error('给予路票失败!');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -25,14 +25,22 @@
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between;font-size: 18px;margin-top: 25px;margin-bottom: 25px;align-items: center;">
|
||||
<div style="margin-left: 50px;"><span style="color: #f00">{{ ticketForm.station }}</span>(站名印)</div>
|
||||
<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;" />
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: center;">
|
||||
<!-- <el-select v-model=""></el-select>-->
|
||||
<div v-if="switchFlag" style="text-align: center;">
|
||||
<el-select v-model="memberId" size="small" style="width: 200px" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in giveMemberList"
|
||||
:key="item.id"
|
||||
:label="item.labelName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button size="small" style="margin-left: 10px;" type="primary" @click="giveTicket">给予</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -52,12 +60,26 @@ 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 });
|
||||
this.memberId = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user