新增路票簿册客户端
This commit is contained in:
parent
7a66fd7416
commit
15dafc301d
@ -1,6 +1,48 @@
|
|||||||
export default {
|
export default function getErrorTip(code) {
|
||||||
10002: '您权限已领取权限!',
|
let message = '';
|
||||||
10003: '您的权限数量不足!',
|
switch (code) {
|
||||||
10013: '很抱歉,未查找到您的权限!',
|
case '10002':
|
||||||
10014: '很抱歉,您的权限暂不可用!'
|
message = '您权限已领取!';
|
||||||
};
|
break;
|
||||||
|
case '10003':
|
||||||
|
message = '你的权限数据不足!';
|
||||||
|
break;
|
||||||
|
case '10013':
|
||||||
|
message = '很抱歉,未查找到您的权限!';
|
||||||
|
break;
|
||||||
|
case '10014':
|
||||||
|
message = '很抱歉,您的权限暂不可用!';
|
||||||
|
break;
|
||||||
|
case '5001':
|
||||||
|
message = this.$t('error.mapDataError');
|
||||||
|
break;
|
||||||
|
case '5002':
|
||||||
|
message = this.$t('error.runningChartDataError');
|
||||||
|
break;
|
||||||
|
case '5003':
|
||||||
|
message = this.$t('error.runningChartIsNotLoaded');
|
||||||
|
break;
|
||||||
|
case '5004':
|
||||||
|
message = this.$t('error.runningDataError');
|
||||||
|
break;
|
||||||
|
case '5000':
|
||||||
|
message = this.$t('error.systemError');
|
||||||
|
break;
|
||||||
|
case '4000':
|
||||||
|
message = this.$t('error.simulationDoesNotExist');
|
||||||
|
break;
|
||||||
|
case '4001':
|
||||||
|
message = this.$t('error.simulationOperationIsNotDefined');
|
||||||
|
break;
|
||||||
|
case '4002':
|
||||||
|
message = this.$t('error.simulationOperationProcessingMethodNotFound');
|
||||||
|
break;
|
||||||
|
case '4003':
|
||||||
|
message = this.$t('error.simulationOperationFailed');
|
||||||
|
break;
|
||||||
|
case '4004':
|
||||||
|
message = this.$t('error.operationConflict');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
300
src/views/newMap/display/newSimulationMenu.vue
Normal file
300
src/views/newMap/display/newSimulationMenu.vue
Normal file
@ -0,0 +1,300 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="allSimulationMenu">
|
||||||
|
<div class="simulationMenu" @click="showMenuList">菜单</div>
|
||||||
|
<div v-show="isShowMenuList" class="simulationMenuList">
|
||||||
|
<div v-for="(each, index) in allMenuList" :key="index">
|
||||||
|
<div v-if="each.show" class="eachSimulationMenu" @click="each.click">{{ each.label }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<contect-us ref="contectUs" />
|
||||||
|
<jl3d-device v-if="deviceif" v-show="deviceShow" ref="Jl3dDevice" :panel-show="deviceShow" @closedevice3dview="jlmap3dmodel" />
|
||||||
|
<modify-time v-if="simType === 'RAILWAY'" ref="modifySysTime" />
|
||||||
|
<set-time ref="setTime" @ConfirmSelectBeginTime="startSim" />
|
||||||
|
<flow-data ref="flowData" />
|
||||||
|
<member-manage ref="memberManage" />
|
||||||
|
<register-book ref="registerBook" />
|
||||||
|
<train-ticket ref="trainTicket" />
|
||||||
|
<draw-select ref="drawSelect" />
|
||||||
|
<line-board ref="lineBoard" />
|
||||||
|
<theory-exam-select ref="theoryExamSelect" @startTheoryExam="startTheoryExam" />
|
||||||
|
<theory-exam ref="theoryExam" />
|
||||||
|
<scheduling ref="scheduling" :group="group" />
|
||||||
|
<scheduling-view ref="schedulingView" :group="group" />
|
||||||
|
<run-plan-view ref="runPlanView" :group="group" />
|
||||||
|
<select-exam ref="selectExam" @examStart="examStart" />
|
||||||
|
<exam-panel ref="examPanel" />
|
||||||
|
<training-tip ref="trainingTip" />
|
||||||
|
<training-position-tip ref="trainingPositionTip" />
|
||||||
|
<training-menu v-if="hasTraining" ref="trainingMenu" :offset-bottom="offsetBottom" />
|
||||||
|
<training-design v-if="trainingDesignShow" ref="trainingDesign" />
|
||||||
|
<voice-chat-box v-if="hasVoice" :group="group" />
|
||||||
|
<design-training-menu v-if="trainingDesign && trainingDetail" ref="trainingMenu" :offset-bottom="offsetBottom" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { getPostByProjectCode } from '@/api/learn';
|
||||||
|
import { getSessionStorage } from '@/utils/auth';
|
||||||
|
import { ProjectCode } from '@/scripts/ProjectConfig';
|
||||||
|
import ContectUs from './contectUs';
|
||||||
|
import ModifyTime from './modifyTime';
|
||||||
|
import FlowData from './flowData';
|
||||||
|
import SetTime from './setTime';
|
||||||
|
import Jl3dDevice from '@/views/jlmap3d/device/jl3ddevice';
|
||||||
|
import { clearSimulation, ranAsPlan } from '@/api/simulation';
|
||||||
|
import { Notification } from 'element-ui';
|
||||||
|
import MemberManage from './memberManage/membersManage';
|
||||||
|
import RegisterBook from '../registerBook/index';
|
||||||
|
import TrainTicket from '../trainTicket/index';
|
||||||
|
import DrawSelect from '@/jmapNew/theme/datie_01/menus/dialog/drawSelect';
|
||||||
|
import LineBoard from '../displayCity/lineBoard';
|
||||||
|
import TheoryExamSelect from './theoryExamSelect';
|
||||||
|
import TheoryExam from './theoryExam';
|
||||||
|
import { initSimulation } from '@/api/rtSimulation';
|
||||||
|
import Scheduling from './scheduling';
|
||||||
|
import SchedulingView from './schedulingView';
|
||||||
|
import RunPlanView from './runPlanView';
|
||||||
|
import SelectExam from './exam/selectExam';
|
||||||
|
import ExamPanel from './exam/examPanel';
|
||||||
|
import TrainingTip from './trainingList/trainingTip.vue';
|
||||||
|
import TrainingPositionTip from './trainingList/trainingPositionTip.vue';
|
||||||
|
import TrainingMenu from './trainingList/trainingMenu';
|
||||||
|
import TrainingDesign from './trainingDesign/designPane.vue';
|
||||||
|
import VoiceChatBox from './voiceChatBox/index';
|
||||||
|
import DesignTrainingMenu from './trainingList/designTrainingMenu';
|
||||||
|
import getErrorTip from '@/scripts/errorTip';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'SimulationMenu',
|
||||||
|
components: {
|
||||||
|
SetTime,
|
||||||
|
ModifyTime,
|
||||||
|
FlowData,
|
||||||
|
RegisterBook,
|
||||||
|
TrainTicket,
|
||||||
|
DrawSelect,
|
||||||
|
LineBoard,
|
||||||
|
TheoryExam,
|
||||||
|
TheoryExamSelect,
|
||||||
|
Scheduling,
|
||||||
|
SchedulingView,
|
||||||
|
RunPlanView,
|
||||||
|
SelectExam,
|
||||||
|
ExamPanel,
|
||||||
|
ContectUs,
|
||||||
|
Jl3dDevice,
|
||||||
|
MemberManage,
|
||||||
|
TrainingTip,
|
||||||
|
TrainingPositionTip,
|
||||||
|
TrainingMenu,
|
||||||
|
TrainingDesign,
|
||||||
|
VoiceChatBox,
|
||||||
|
DesignTrainingMenu
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isShowMenuList: false,
|
||||||
|
menuList: [],
|
||||||
|
active: -1,
|
||||||
|
offsetBottom: 15,
|
||||||
|
deviceif: false,
|
||||||
|
deviceShow: true,
|
||||||
|
hasVoice: false,
|
||||||
|
hasTraining: false,
|
||||||
|
trainingDesign: false,
|
||||||
|
allMenuList: [
|
||||||
|
{ label: '设备视图', name: 'jlmap3dmodel', click: this.jlmap3dmodel, isShow: () => { return true; } },
|
||||||
|
{ label: '修改系统时间', name: 'drivingPlan', click: this.drivingPlan, isShow: () => { return this.$route.query.simType === 'RAILWAY'; } },
|
||||||
|
{ label: '按计划行车', name: 'modifySysTime', click: this.modifySysTime, isShow: () => { return this.$route.query.simType === 'METRO'; } },
|
||||||
|
{ label: '初始化', name: 'initialize', click: this.initializeSim, isShow: () => { return !this.$store.state.trainingNew.trainingSwitch; } },
|
||||||
|
{ label: '考试', name: 'exam', click: this.goExam, isShow: () => { return this.$store.state.training.domConfig.hasExam; } },
|
||||||
|
{ label: '联系方式', name: 'contectUs', click: this.contectUs, isShow: () => { return true; } },
|
||||||
|
{ label: '成员管理', name: 'memberManage', click: this.memberManage, isShow: () => { return true; } },
|
||||||
|
{ label: '切换客流数据', name: 'changeFlowData', click: this.changeFlowData, isShow: () => { return this.$store.state.training.domConfig.hasLpf; } },
|
||||||
|
{ label: '留言板', name: 'messageBoard', click: this.messageBoard, isShow: async () => { const resp = await getPostByProjectCode(ProjectCode[this.project]); return resp.data; } },
|
||||||
|
{ label: '退出', name: 'quit', click: this.exitSim, isShow: () => { return this.$route.query.projectDevice; } },
|
||||||
|
{ label: '返回', name: 'back', click: this.backSim, isShow: () => { return !this.$route.query.projectDevice; } }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
// 当前的所属项目
|
||||||
|
project() {
|
||||||
|
return getSessionStorage('project');
|
||||||
|
},
|
||||||
|
isLocal() {
|
||||||
|
// 是否为本地项目
|
||||||
|
return process.env.VUE_APP_PRO === 'local';
|
||||||
|
},
|
||||||
|
// 线路类型
|
||||||
|
lineCode() {
|
||||||
|
return this.$route.query.lineCode;
|
||||||
|
},
|
||||||
|
// 仿真group
|
||||||
|
group() {
|
||||||
|
return this.$route.query.group;
|
||||||
|
},
|
||||||
|
// 设备数据
|
||||||
|
projectDevice() {
|
||||||
|
return this.$route.query.projectDevice;
|
||||||
|
},
|
||||||
|
simType() {
|
||||||
|
return this.$route.query.simType;
|
||||||
|
},
|
||||||
|
mapId() {
|
||||||
|
return this.$route.query.mapId;
|
||||||
|
},
|
||||||
|
trainingDetail() {
|
||||||
|
return this.$store.state.trainingNew.trainingDetail;
|
||||||
|
},
|
||||||
|
trainingDesignShow() {
|
||||||
|
return this.$store.state.training.domConfig.trainingDesign || false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showMenuList(event) {
|
||||||
|
event.stopPropagation();
|
||||||
|
this.isShowMenuList = !this.isShowMenuList;
|
||||||
|
this.active = -1;
|
||||||
|
},
|
||||||
|
initMenuList() {
|
||||||
|
this.allMenuList.forEach(item => {
|
||||||
|
item.show = item.isShow();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
hideMenuList() {
|
||||||
|
this.isShowMenuList = false;
|
||||||
|
this.active = -1;
|
||||||
|
},
|
||||||
|
// 开始理论考试
|
||||||
|
startTheoryExam(mode) {
|
||||||
|
this.$refs.theoryExam.doShow(mode);
|
||||||
|
},
|
||||||
|
startSim(model) {
|
||||||
|
// 开始仿真
|
||||||
|
this.hideMenuList();
|
||||||
|
const data = {time: model.initTime};
|
||||||
|
ranAsPlan(data, this.group).then(() => {
|
||||||
|
this.$store.dispatch('training/setInitTime', new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
|
||||||
|
}).catch(error => {
|
||||||
|
const message = getErrorTip(error.code) || '按计划行车异常,请退出重试';
|
||||||
|
this.$messageBox(message + ',' + this.$t('error.startSimulationFailed'));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
examStart(data) {
|
||||||
|
this.$refs.examPanel.init(data);
|
||||||
|
},
|
||||||
|
jlmap3dmodel() {
|
||||||
|
if (this.deviceif == false) {
|
||||||
|
this.hideMenuList();
|
||||||
|
this.deviceif = true;
|
||||||
|
} else {
|
||||||
|
if (this.deviceShow == false) {
|
||||||
|
this.hideMenuList();
|
||||||
|
this.deviceShow = true;
|
||||||
|
} else {
|
||||||
|
this.deviceShow = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 登出
|
||||||
|
logout() {
|
||||||
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 返回或者退出
|
||||||
|
exitSim() {
|
||||||
|
this.hideMenuList();
|
||||||
|
this.$confirm('是否退出仿真?', '提 示', {
|
||||||
|
confirmButtonText: '确 定',
|
||||||
|
cancelButtonText: '取 消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
if (this.$route.query.type === 'IM') {
|
||||||
|
clearSimulation(this.group).then(() => {
|
||||||
|
this.logout();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.logout();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
backSim() {
|
||||||
|
this.hideMenuList();
|
||||||
|
this.$confirm('是否退出仿真?', '提 示', {
|
||||||
|
confirmButtonText: '确 定',
|
||||||
|
cancelButtonText: '取 消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
if (this.projectDevice && this.$route.query.type === 'IM') {
|
||||||
|
clearSimulation(this.group).then(res => {
|
||||||
|
this.logout();
|
||||||
|
});
|
||||||
|
} else if (this.projectDevice) {
|
||||||
|
this.logout();
|
||||||
|
} else {
|
||||||
|
history.go(-1);
|
||||||
|
Notification.closeAll();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
initializeSim() {
|
||||||
|
initSimulation(this.group).then(() => {
|
||||||
|
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||||
|
this.$store.dispatch('map/clearJlmapTrainView');
|
||||||
|
this.$store.dispatch('map/resetActiveTrainList', false);
|
||||||
|
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||||
|
this.$store.dispatch('map/initSimulationButton');
|
||||||
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.$messageBox(this.$t('display.demon.endSimulationFail'));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 修改系统时间
|
||||||
|
modifySysTime() {
|
||||||
|
this.hideMenuList();
|
||||||
|
this.$refs.modifySysTime.doShow();
|
||||||
|
},
|
||||||
|
// 按计划行车
|
||||||
|
drivingPlan() {
|
||||||
|
this.hideMenuList();
|
||||||
|
this.$refs.setTime.doShow();
|
||||||
|
},
|
||||||
|
// 联系我们弹窗
|
||||||
|
contectUs() {
|
||||||
|
this.hideMenuList();
|
||||||
|
this.$refs.contectUs.doShow();
|
||||||
|
},
|
||||||
|
goExam() {
|
||||||
|
this.$refs.selectExam.doShow();
|
||||||
|
},
|
||||||
|
// 成员管理
|
||||||
|
memberManage() {
|
||||||
|
this.$refs.memberManage.doShow();
|
||||||
|
},
|
||||||
|
changeFlowData() {
|
||||||
|
this.hideMenuList();
|
||||||
|
this.$refs.flowData.doShow();
|
||||||
|
},
|
||||||
|
messageBoard() {
|
||||||
|
this.hideMenuList();
|
||||||
|
const routeData = this.$router.resolve({
|
||||||
|
path: '/messageBoard',
|
||||||
|
query: {
|
||||||
|
project: this.project,
|
||||||
|
noPreLogout: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
window.open(routeData.href, '_blank');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -1,18 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-dialogDrag :title="title" :visible.sync="show" width="550px" :before-close="doClose">
|
<el-dialog v-dialogDrag :title="title" :visible.sync="show" width="550px" center :before-close="doClose">
|
||||||
<el-form ref="form" label-width="120px" :model="formModel" :rules="rules">
|
<el-form ref="form" label-width="120px" :model="formModel" :rules="rules">
|
||||||
<el-form-item :label="$t('display.setTime.systemTime')" prop="initTime">
|
<el-form-item :label="$t('display.setTime.systemTime')" prop="initTime">
|
||||||
<el-time-picker
|
<el-time-picker
|
||||||
v-model="formModel.initTime"
|
v-model="formModel.initTime"
|
||||||
:picker-options="pickerOptions"
|
:picker-options="pickerOptions"
|
||||||
:placeholder="$t('display.setTime.anyTime')"
|
:placeholder="$t('display.setTime.anyTime')"
|
||||||
@change="handleChange"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="hasNumber" :label="$t('display.setTime.loadTrainNum')" prop="loadNum">
|
|
||||||
<el-input-number v-model="formModel.loadNum" :min="1" :max="maxNumber" :label="$t('display.setTime.selectLoadTrainNum')" />
|
|
||||||
<span> {{ ` (${$t('display.setTime.maxTrainNum')} :${maxNumber}) ` }} </span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="show = false">{{ $t('global.cancel') }}</el-button>
|
<el-button @click="show = false">{{ $t('global.cancel') }}</el-button>
|
||||||
@ -23,18 +18,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { timestampFormat } from '@/utils/date';
|
import { timestampFormat } from '@/utils/date';
|
||||||
import { getLoadTrainNumber } from '@/api/simulation';
|
|
||||||
|
|
||||||
// 计划行车时间选择
|
// 计划行车时间选择
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show: false,
|
show: false,
|
||||||
formModel: {
|
formModel: {
|
||||||
initTime: new Date(),
|
initTime: new Date()
|
||||||
loadNum: 1
|
|
||||||
},
|
},
|
||||||
maxNumber: 1,
|
|
||||||
pickerOptions: { selectableRange: '00:00:00 - 23:59:59' },
|
pickerOptions: { selectableRange: '00:00:00 - 23:59:59' },
|
||||||
status: false
|
status: false
|
||||||
};
|
};
|
||||||
@ -43,31 +34,13 @@ export default {
|
|||||||
title() {
|
title() {
|
||||||
return this.$t('display.setTime.setSimulationSystemTime');
|
return this.$t('display.setTime.setSimulationSystemTime');
|
||||||
},
|
},
|
||||||
hasNumber() {
|
|
||||||
return this.$route.params.mode == 'demon' && this.$route.query.prdType == '04';
|
|
||||||
},
|
|
||||||
group() {
|
group() {
|
||||||
return this.$route.query.group;
|
return this.$route.query.group;
|
||||||
},
|
},
|
||||||
rules() {
|
rules() {
|
||||||
return {
|
return {
|
||||||
initTime: [
|
initTime: [
|
||||||
{ required: true, message: this.$t('display.setTime.selectSystemTime'), trigger: 'change' },
|
{ required: true, message: this.$t('display.setTime.selectSystemTime'), trigger: 'change' }
|
||||||
{
|
|
||||||
validator(rule, value, callback) {
|
|
||||||
if (this.maxNumber == 0) {
|
|
||||||
callback(new Error(this.$t('display.setTime.selectValidStartTime')));
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trigger: 'change',
|
|
||||||
maxNumber: this.maxNumber
|
|
||||||
}
|
|
||||||
],
|
|
||||||
loadNum: [
|
|
||||||
{ required: true, message: this.$t('display.setTime.selectTrainNum'), trigger: 'change' }
|
|
||||||
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -76,35 +49,20 @@ export default {
|
|||||||
doShow() {
|
doShow() {
|
||||||
console.log(this.$store.state.training.initTime);
|
console.log(this.$store.state.training.initTime);
|
||||||
this.formModel.initTime = new Date(this.$store.state.training.initTime || null);
|
this.formModel.initTime = new Date(this.$store.state.training.initTime || null);
|
||||||
this.handleChange(this.formModel.initTime);
|
|
||||||
this.show = true;
|
this.show = true;
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.status = false;
|
this.status = false;
|
||||||
this.show = false;
|
this.show = false;
|
||||||
},
|
},
|
||||||
handleChange(initTime) {
|
|
||||||
this.formModel.loadNum = 0;
|
|
||||||
if (this.hasNumber) {
|
|
||||||
getLoadTrainNumber({ time: timestampFormat('HH:mm:ss', initTime) }, this.group).then(resp => {
|
|
||||||
this.maxNumber = parseInt(resp.data);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleSure() {
|
handleSure() {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
// debugger;
|
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.status = true;
|
this.status = true;
|
||||||
const model = {
|
const model = {
|
||||||
initTime: timestampFormat('HH:mm:ss', this.formModel.initTime),
|
initTime: timestampFormat('HH:mm:ss', this.formModel.initTime),
|
||||||
timestamp:this.formModel.initTime
|
timestamp:this.formModel.initTime
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.hasNumber) {
|
|
||||||
model['loadNum'] = this.formModel.loadNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$emit('ConfirmSelectBeginTime', model);
|
this.$emit('ConfirmSelectBeginTime', model);
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
<big-screen v-else-if="picture === 'bigScreen'" ref="bigScreen" />
|
<big-screen v-else-if="picture === 'bigScreen'" ref="bigScreen" />
|
||||||
<schedule-work v-else-if="picture === 'scheduleWork'" ref="scheduleWork" />
|
<schedule-work v-else-if="picture === 'scheduleWork'" ref="scheduleWork" />
|
||||||
<emergency-dispatch-work v-else-if="picture === 'emergency'" ref="emergencyDispatchWork" />
|
<emergency-dispatch-work v-else-if="picture === 'emergency'" ref="emergencyDispatchWork" />
|
||||||
|
<register-book v-else-if="picture === 'registerBook'" ref="registerBook" />
|
||||||
|
<train-ticket v-else-if="picture === 'trainTicket'" ref="trainTicket" />
|
||||||
<terminal-menu
|
<terminal-menu
|
||||||
v-if="menuShow"
|
v-if="menuShow"
|
||||||
ref="terminalMenu"
|
ref="terminalMenu"
|
||||||
@ -55,6 +57,8 @@ import LargePassengerView from './largePassengerView';
|
|||||||
import BigScreen from './bigScreen';
|
import BigScreen from './bigScreen';
|
||||||
import ScheduleWork from './schedulWork';
|
import ScheduleWork from './schedulWork';
|
||||||
import EmergencyDispatchWork from './emergencyDispatchWork';
|
import EmergencyDispatchWork from './emergencyDispatchWork';
|
||||||
|
import RegisterBook from './registerBook';
|
||||||
|
import TrainTicket from './trainTicket/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
@ -78,7 +82,9 @@ export default {
|
|||||||
DispatcherManage,
|
DispatcherManage,
|
||||||
BigScreen,
|
BigScreen,
|
||||||
ScheduleWork,
|
ScheduleWork,
|
||||||
EmergencyDispatchWork
|
EmergencyDispatchWork,
|
||||||
|
RegisterBook,
|
||||||
|
TrainTicket
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
166
src/views/newMap/display/terminals/registerBook.vue
Normal file
166
src/views/newMap/display/terminals/registerBook.vue
Normal file
@ -0,0 +1,166 @@
|
|||||||
|
<template>
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
:data="tableData"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-table-column prop="date" label="月 日" width="95">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.moonDay" />
|
||||||
|
<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" />
|
||||||
|
<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" />
|
||||||
|
<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" />
|
||||||
|
<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" />
|
||||||
|
<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" />
|
||||||
|
<span v-else>{{ scope.row.noticeTime.info }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<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" />
|
||||||
|
<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" />
|
||||||
|
<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" />
|
||||||
|
<span v-else>{{ scope.row.arriveTime.info }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<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" />
|
||||||
|
<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" />
|
||||||
|
<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" />
|
||||||
|
<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>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
export default {
|
||||||
|
name: 'Index',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableData: [],
|
||||||
|
dataIndex: null,
|
||||||
|
value: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.queryData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doClose() {
|
||||||
|
this.dataIndex = null;
|
||||||
|
},
|
||||||
|
doShow() {
|
||||||
|
this.queryData();
|
||||||
|
},
|
||||||
|
queryData() {
|
||||||
|
const params = { stationCode: this.$store.state.training.roleDeviceCode};
|
||||||
|
commitOperate(menuOperate.Rail.railQueryRegister, params, 3).then(({valid, operate, response})=>{
|
||||||
|
this.tableData = response.data ? response.data.lines : [];
|
||||||
|
this.dataIndex = null;
|
||||||
|
}).catch(()=>{
|
||||||
|
this.$message.error('查询簿册失败!');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
saveData(data) {
|
||||||
|
const params = { stationCode: this.$store.state.training.roleDeviceCode, line: data };
|
||||||
|
commitOperate(menuOperate.Rail.railFillInRegister, params, 3).then(({valid, operate})=>{
|
||||||
|
this.queryData();
|
||||||
|
}).catch(()=>{
|
||||||
|
this.$message.error('保存簿册失败!');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
add() {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -38,7 +38,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
terminalMap:{
|
terminalMap:{
|
||||||
'datie': [
|
'RAILWAY': [
|
||||||
{
|
{
|
||||||
name: '行调台',
|
name: '行调台',
|
||||||
code: 'dispatcherManage',
|
code: 'dispatcherManage',
|
||||||
@ -68,9 +68,23 @@ export default {
|
|||||||
code: 'dispatchingCommand',
|
code: 'dispatchingCommand',
|
||||||
roleList: ['DISPATCHER'],
|
roleList: ['DISPATCHER'],
|
||||||
click: this.changePictureShow
|
click: this.changePictureShow
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '路票',
|
||||||
|
code: 'trainTicket',
|
||||||
|
roleList: ['DISPATCHER', 'STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER',
|
||||||
|
'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER', 'TRAIN_MASTER', 'DEPOT_DISPATCHER', 'SIGNAL_BUILDING', 'DRIVER'],
|
||||||
|
click: this.changePictureShow
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '簿册',
|
||||||
|
code: 'registerBook',
|
||||||
|
roleList: ['DISPATCHER', 'STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER',
|
||||||
|
'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER', 'TRAIN_MASTER', 'DEPOT_DISPATCHER', 'SIGNAL_BUILDING', 'DRIVER'],
|
||||||
|
click: this.changePictureShow
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
'subway': [
|
'METRO': [
|
||||||
{
|
{
|
||||||
name: '派班工作站',
|
name: '派班工作站',
|
||||||
code: 'scheduleWork',
|
code: 'scheduleWork',
|
||||||
@ -139,7 +153,8 @@ export default {
|
|||||||
roleList: ['STATION_SUPERVISOR'],
|
roleList: ['STATION_SUPERVISOR'],
|
||||||
click: this.changePictureShow
|
click: this.changePictureShow
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
'EMERGENCY': []
|
||||||
},
|
},
|
||||||
itemMap: {}
|
itemMap: {}
|
||||||
};
|
};
|
||||||
@ -153,9 +168,8 @@ export default {
|
|||||||
lineCode() {
|
lineCode() {
|
||||||
return this.$route.query.lineCode;
|
return this.$route.query.lineCode;
|
||||||
},
|
},
|
||||||
// 大铁线路
|
simType() {
|
||||||
datie() {
|
return this.$route.query.simType;
|
||||||
return ['16', '19'].includes(this.$route.query.lineCode);
|
|
||||||
},
|
},
|
||||||
roles() {
|
roles() {
|
||||||
return this.$store.state.training.roles;
|
return this.$store.state.training.roles;
|
||||||
@ -188,14 +202,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
initTerminalList() {
|
initTerminalList() {
|
||||||
let currentType = '';
|
|
||||||
if (this.datie) {
|
|
||||||
currentType = 'datie';
|
|
||||||
} else {
|
|
||||||
currentType = 'subway';
|
|
||||||
}
|
|
||||||
this.terminalList = [];
|
this.terminalList = [];
|
||||||
[...this.commonTerminal, ...this.terminalMap[currentType]].forEach(item => {
|
[...this.commonTerminal, ...(this.terminalMap[this.simType] || [])].forEach(item => {
|
||||||
if (item.roleList.includes(this.roles) && (!item.functionItem || this.itemMap[item.functionItem])) {
|
if (item.roleList.includes(this.roles) && (!item.functionItem || this.itemMap[item.functionItem])) {
|
||||||
this.terminalList.push(item);
|
this.terminalList.push(item);
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,91 @@
|
|||||||
|
<template>
|
||||||
|
<div style="border: 1px solid #000000;margin: 0 auto;padding: 20px;background: #9df59b;width: 580px;">
|
||||||
|
<div style="text-align: center;font-size: 28px;">许 可 证</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;" />
|
||||||
|
<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 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" />
|
||||||
|
<span>次列车由</span>
|
||||||
|
<el-input v-model="greenLicenseForm.line" style="display: inline;" :disabled="switchFlag" size="small" class="inline-input" />
|
||||||
|
<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;" />
|
||||||
|
</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;" />
|
||||||
|
<div>年</div>
|
||||||
|
<el-input v-model="greenLicenseForm.moon" :disabled="switchFlag" size="small" style="width: 80px;" />
|
||||||
|
<div>月</div>
|
||||||
|
<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"
|
||||||
|
:disabled="item.userId == userId"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<el-button size="small" style="margin-left: 10px;" type="primary" @click="giveTicket">给予</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'GreenLicence',
|
||||||
|
props: {
|
||||||
|
greenLicenseForm:{
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
switchFlag:{
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
giveMemberList: {
|
||||||
|
type: Array,
|
||||||
|
default() {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
memberId: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
userId() {
|
||||||
|
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
giveTicket() {
|
||||||
|
if (this.memberId) {
|
||||||
|
this.$emit('giveTicket', { ticketId: this.greenLicenseForm.id, memberId: this.memberId });
|
||||||
|
this.memberId = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
256
src/views/newMap/display/terminals/trainTicket/index.vue
Normal file
256
src/views/newMap/display/terminals/trainTicket/index.vue
Normal file
@ -0,0 +1,256 @@
|
|||||||
|
<template>
|
||||||
|
<div style="padding: 20px;">
|
||||||
|
<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-option
|
||||||
|
v-for="item in typeList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||||
|
<el-tab-pane v-if="userRole === 'STATION_SUPERVISOR'" 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" />
|
||||||
|
<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>
|
||||||
|
</el-tab-pane>
|
||||||
|
<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" :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" :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" :switch-flag="true" :red-license-form="item" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
import RailTicket from './trainTicket';
|
||||||
|
import GreenLicence from './greenLicence';
|
||||||
|
import RedLicence from './redLicence';
|
||||||
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
|
export default {
|
||||||
|
name: 'Index',
|
||||||
|
components: {
|
||||||
|
RailTicket,
|
||||||
|
GreenLicence,
|
||||||
|
RedLicence
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
attachmentType: 'RAIL_TICKET',
|
||||||
|
railTicketList: [],
|
||||||
|
greenLicenseList: [],
|
||||||
|
redLicenseList: [],
|
||||||
|
giveMemberList: [],
|
||||||
|
activeName: 'first',
|
||||||
|
ticketForm: {
|
||||||
|
number: '',
|
||||||
|
tripNumber: '',
|
||||||
|
station: '',
|
||||||
|
nextStation: '',
|
||||||
|
stationSeal: '',
|
||||||
|
no: '',
|
||||||
|
deputy: false
|
||||||
|
},
|
||||||
|
greenLicenseForm: {
|
||||||
|
number: '',
|
||||||
|
reason: '',
|
||||||
|
tripNumber: '',
|
||||||
|
line: '',
|
||||||
|
stationSeal: '',
|
||||||
|
signature: '',
|
||||||
|
year: '',
|
||||||
|
moon: '',
|
||||||
|
day: ''
|
||||||
|
},
|
||||||
|
redLicenseForm: {
|
||||||
|
number: '',
|
||||||
|
licenseReceived: true,
|
||||||
|
licenseTripNumber: '',
|
||||||
|
licenseStation: '',
|
||||||
|
licenseNextStation: '',
|
||||||
|
licenseHour: '',
|
||||||
|
licenseMinute: '',
|
||||||
|
licenseTripNumber2: '',
|
||||||
|
noticeTripNumber: '',
|
||||||
|
noticeHour1: '',
|
||||||
|
noticeMinute1: '',
|
||||||
|
noticeTripNumber1: '',
|
||||||
|
noticeHour2: '',
|
||||||
|
noticeMinute2: '',
|
||||||
|
noticeTripNumber2: '',
|
||||||
|
stationSeal: '',
|
||||||
|
signature: '',
|
||||||
|
year: '',
|
||||||
|
moon: '',
|
||||||
|
day: ''
|
||||||
|
},
|
||||||
|
typeList: [
|
||||||
|
{label: '路票', value: 'RAIL_TICKET'},
|
||||||
|
{label: '绿色许可证', value: 'GREEN_LICENCE'},
|
||||||
|
{label: '红色许可证', value: 'RED_LICENCE'}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('map', [
|
||||||
|
'stationList'
|
||||||
|
]),
|
||||||
|
userRole() {
|
||||||
|
return this.$store.state.training.userRole;
|
||||||
|
},
|
||||||
|
roleDeviceCode() {
|
||||||
|
return this.$store.state.training.roleDeviceCode;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.training.roleDeviceCode': 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;
|
||||||
|
});
|
||||||
|
const station = this.$store.getters['map/getDeviceByCode'](this.roleDeviceCode);
|
||||||
|
|
||||||
|
if (station) {
|
||||||
|
this.ticketForm.station = station.name;
|
||||||
|
this.ticketForm.stationSeal = station.name;
|
||||||
|
this.greenLicenseForm.stationSeal = station.name;
|
||||||
|
this.redLicenseForm.stationSeal = station.name;
|
||||||
|
}
|
||||||
|
if (this.userRole !== 'STATION_SUPERVISOR') {
|
||||||
|
this.activeName = 'second';
|
||||||
|
this.query();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClick() {
|
||||||
|
if (this.activeName === 'second') {
|
||||||
|
this.query();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
attachmentTypeChange() {
|
||||||
|
if (this.activeName === 'second') {
|
||||||
|
this.query();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
clearData() {
|
||||||
|
const station = this.$store.getters['map/getDeviceByCode'](this.roleDeviceCode) || {};
|
||||||
|
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: station.name, signature: '', year: '', moon: '', day: ''};
|
||||||
|
},
|
||||||
|
query() {
|
||||||
|
const params = { type: this.attachmentType };
|
||||||
|
commitOperate(menuOperate.Rail.railQueryTicket, params, 3).then(({valid, response, operate}) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.attachmentType === 'RAIL_TICKET') {
|
||||||
|
this.railTicketList = response.data || [];
|
||||||
|
} else if (this.attachmentType === 'GREEN_LICENCE') {
|
||||||
|
this.greenLicenseList = response.data || [];
|
||||||
|
} else if (this.attachmentType === 'RED_LICENCE') {
|
||||||
|
this.redLicenseList = response.data || [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).catch(()=> {
|
||||||
|
this.$message.error('查询路票失败!');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
let commitFlag = true;
|
||||||
|
const params = { ticket: { type: this.attachmentType }, stationCode: this.roleDeviceCode };
|
||||||
|
if (this.attachmentType === 'RAIL_TICKET') {
|
||||||
|
if (!this.ticketForm.number || !this.ticketForm.tripNumber || !this.ticketForm.nextStation || !this.ticketForm.no) {
|
||||||
|
commitFlag = false;
|
||||||
|
} else {
|
||||||
|
params.ticket = Object.assign(params.ticket, this.ticketForm);
|
||||||
|
}
|
||||||
|
} else if (this.attachmentType === 'GREEN_LICENCE') {
|
||||||
|
if (!this.greenLicenseForm.number || !this.greenLicenseForm.reason || !this.greenLicenseForm.tripNumber || !this.greenLicenseForm.line ||
|
||||||
|
!this.greenLicenseForm.signature || !this.greenLicenseForm.year || !this.greenLicenseForm.moon || !this.greenLicenseForm) {
|
||||||
|
commitFlag = false;
|
||||||
|
} else {
|
||||||
|
params.ticket = Object.assign(params.ticket, this.greenLicenseForm);
|
||||||
|
}
|
||||||
|
} else if (this.attachmentType === 'RED_LICENCE') {
|
||||||
|
if (!this.redLicenseForm.number || !this.redLicenseForm.licenseTripNumber || !this.redLicenseForm.licenseStation || !this.redLicenseForm.licenseNextStation ||
|
||||||
|
!this.redLicenseForm.licenseHour || !this.redLicenseForm.licenseMinute || !this.redLicenseForm.licenseTripNumber2 || !this.redLicenseForm.noticeTripNumber ||
|
||||||
|
!this.redLicenseForm.noticeHour1 || !this.redLicenseForm.noticeMinute1 || !this.redLicenseForm.noticeTripNumber2 || !this.redLicenseForm.signature ||
|
||||||
|
!this.redLicenseForm.year || !this.redLicenseForm.moon || !this.redLicenseForm.day) {
|
||||||
|
commitFlag = false;
|
||||||
|
} else {
|
||||||
|
params.ticket = Object.assign(params.ticket, this.redLicenseForm);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (commitFlag) {
|
||||||
|
commitOperate(menuOperate.Rail.railFillInTicket, params, 3).then(({valid, operate})=>{
|
||||||
|
this.clearData();
|
||||||
|
this.$message.success('提交路票成功!');
|
||||||
|
}).catch(()=>{
|
||||||
|
this.$message.error('提交路票失败!');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message.error('信息填写不完整,请检查!');
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
giveTicket(params) {
|
||||||
|
commitOperate(menuOperate.Rail.railGiveTicketTo, params, 3).then(({valid, operate}) => {
|
||||||
|
this.$message.success('给予路票成功!');
|
||||||
|
this.query();
|
||||||
|
}).catch(()=> {
|
||||||
|
this.$message.error('给予路票失败!');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
/deep/.inline-input .el-input__inner{
|
||||||
|
width: 80px;
|
||||||
|
}
|
||||||
|
/deep/.station-input .el-input__inner{
|
||||||
|
width: 200px;
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
font-size: 40px;
|
||||||
|
}
|
||||||
|
/deep/.el-radio__label{
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
/deep/.el-radio{
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
</style>
|
119
src/views/newMap/display/terminals/trainTicket/redLicence.vue
Normal file
119
src/views/newMap/display/terminals/trainTicket/redLicence.vue
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
<template>
|
||||||
|
<div style="border: 1px solid #000000;margin: 0 auto;padding: 20px;background: #e799d8;width: 580px;">
|
||||||
|
<div style="text-align: center;font-size: 28px;">许 可 证</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;" />
|
||||||
|
<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" />
|
||||||
|
<span>次列车自</span>
|
||||||
|
<el-input v-model="redLicenseForm.licenseStation" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
|
||||||
|
<span>站至</span>
|
||||||
|
<el-input v-model="redLicenseForm.licenseNextStation" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
|
||||||
|
<span>站,本列车前于</span>
|
||||||
|
<el-input v-model="redLicenseForm.licenseHour" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
|
||||||
|
<span>时</span>
|
||||||
|
<el-input v-model="redLicenseForm.licenseMinute" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
|
||||||
|
<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="true">已</el-radio>
|
||||||
|
<el-radio :label="false" 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;">
|
||||||
|
<span>1.第</span>
|
||||||
|
<el-input v-model="redLicenseForm.noticeTripNumber" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
|
||||||
|
<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" />
|
||||||
|
<span>时</span>
|
||||||
|
<el-input v-model="redLicenseForm.noticeMinute1" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
|
||||||
|
<span>分发出第</span>
|
||||||
|
<el-input v-model="redLicenseForm.noticeTripNumber1" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
|
||||||
|
<span>次列车,并于</span>
|
||||||
|
<el-input v-model="redLicenseForm.noticeHour2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
|
||||||
|
<span>时</span>
|
||||||
|
<el-input v-model="redLicenseForm.noticeMinute2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
|
||||||
|
<span>分再发出第</span>
|
||||||
|
<el-input v-model="redLicenseForm.noticeTripNumber2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
|
||||||
|
<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;" />
|
||||||
|
</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;" />
|
||||||
|
<div>年</div>
|
||||||
|
<el-input v-model="redLicenseForm.moon" :disabled="switchFlag" size="small" style="width: 80px;" />
|
||||||
|
<div>月</div>
|
||||||
|
<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"
|
||||||
|
:disabled="item.userId == userId"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<el-button size="small" style="margin-left: 10px;" type="primary" @click="giveTicket">给予</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'RedLicence',
|
||||||
|
props: {
|
||||||
|
redLicenseForm:{
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
switchFlag:{
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
giveMemberList: {
|
||||||
|
type: Array,
|
||||||
|
default() {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
memberId: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
userId() {
|
||||||
|
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
giveTicket() {
|
||||||
|
if (this.memberId) {
|
||||||
|
this.$emit('giveTicket', { ticketId: this.redLicenseForm.id, memberId: this.memberId });
|
||||||
|
this.memberId = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -0,0 +1,95 @@
|
|||||||
|
<template>
|
||||||
|
<div style="border: 1px solid #000000;margin: 0 auto;padding: 20px;width: 580px;">
|
||||||
|
<div style="text-align: center;font-size: 28px;">路 票</div>
|
||||||
|
<div style="display: flex;justify-content: center;align-items: center;font-size: 18px;margin-top: 10px;">
|
||||||
|
<div>电话记录 第</div>
|
||||||
|
<el-input v-model="ticketForm.number" :disabled="switchFlag" size="mini" style="width: 80px;" />
|
||||||
|
<div>号</div>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex;justify-content: center;align-items: center;font-size: 18px;margin-top: 10px;">
|
||||||
|
<div style="margin-left: 80px;">车 次</div>
|
||||||
|
<el-input v-model="ticketForm.tripNumber" :disabled="switchFlag" size="mini" style="width: 80px;" />
|
||||||
|
</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-option
|
||||||
|
v-for="item in stationList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.name"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</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.stationSeal }}</span>(站名印)</div>
|
||||||
|
<div>
|
||||||
|
<span>编号</span>
|
||||||
|
<el-input v-model="ticketForm.no" size="small" :disabled="switchFlag" style="width: 80px;" />
|
||||||
|
</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"
|
||||||
|
:disabled="item.userId == userId"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<el-button size="small" style="margin-left: 10px;" type="primary" @click="giveTicket">给予</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'TrainTicket',
|
||||||
|
props: {
|
||||||
|
ticketForm:{
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
switchFlag:{
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
stationList: {
|
||||||
|
type: Array,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
giveMemberList: {
|
||||||
|
type: Array,
|
||||||
|
default() {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
memberId: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
userId() {
|
||||||
|
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
giveTicket() {
|
||||||
|
if (this.memberId) {
|
||||||
|
this.$emit('giveTicket', { ticketId: this.ticketForm.id, memberId: this.memberId });
|
||||||
|
this.memberId = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -240,6 +240,7 @@ export default {
|
|||||||
lineCode: this.$route.query.lineCode,
|
lineCode: this.$route.query.lineCode,
|
||||||
group: resp.data,
|
group: resp.data,
|
||||||
mapId: system.mapId,
|
mapId: system.mapId,
|
||||||
|
simType: system.simType,
|
||||||
project: this.project
|
project: this.project
|
||||||
};
|
};
|
||||||
if (system.paramVO && system.paramVO.domConfig && system.paramVO.domConfig.client) {
|
if (system.paramVO && system.paramVO.domConfig && system.paramVO.domConfig.client) {
|
||||||
@ -248,6 +249,7 @@ export default {
|
|||||||
if (system.paramVO && system.paramVO.domConfig && system.paramVO.domConfig.singleClient) {
|
if (system.paramVO && system.paramVO.domConfig && system.paramVO.domConfig.singleClient) {
|
||||||
query.singleClient = system.paramVO.domConfig.singleClient;
|
query.singleClient = system.paramVO.domConfig.singleClient;
|
||||||
}
|
}
|
||||||
|
console.log(query, '**********');
|
||||||
if (this.loadingProjectList.includes(this.project)) {
|
if (this.loadingProjectList.includes(this.project)) {
|
||||||
this.$store.dispatch('app/transitionAnimations');
|
this.$store.dispatch('app/transitionAnimations');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user