Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
e5f78fd3e3
@ -485,3 +485,22 @@ export function querySignalStatus(group, params) {
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取仿真运行图车次号列表 */
|
||||
export function getTripNumberList(group) {
|
||||
return request({
|
||||
url: `/simulation/${group}/tripNumbers`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 根据车次号获取服务号 */
|
||||
export function getServiceNumbersByTripNum(group, tripNumber) {
|
||||
return request({
|
||||
url: `/simulation/${group}/serviceNumber`,
|
||||
method: 'get',
|
||||
params: {
|
||||
tripNumber: tripNumber
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -208,6 +208,10 @@ deviceState[deviceType.Train] = {
|
||||
// State01: '01', /** 无报警 */
|
||||
// State02: '02' /** 有报警 */
|
||||
// },
|
||||
/** 是否停车 */
|
||||
stop: true,
|
||||
/** 所在区段code */
|
||||
sectionCode: '',
|
||||
/** 是否故障*/
|
||||
fault: false /** 非故障*/
|
||||
};
|
||||
|
@ -106,13 +106,13 @@ class Painter {
|
||||
var oldTrainWindowModel = null;
|
||||
var instance = device.instance;
|
||||
var curModel = device;
|
||||
|
||||
if (instance) {
|
||||
oldTrainWindowModel = device.trainWindowModel;
|
||||
}
|
||||
|
||||
if (curModel.sectionCode) {
|
||||
curModel.sectionModel = this.$jmap.getDeviceByCode(curModel.sectionCode);
|
||||
curModel.trainWindowCode = curModel.sectionModel.trainWindowCode;
|
||||
}
|
||||
|
||||
if (curModel.trainWindowCode) {
|
||||
|
@ -1,16 +1,19 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="340px" :before-close="doClose"
|
||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form">
|
||||
<div style="width: 96%;display:flex;flex-dorection:row">
|
||||
<!-- <el-form-item label="车 组 号:" label-width="95px" prop="tripNumber">
|
||||
<el-input v-model="addModel.tripNumber" disabled></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="车 次 号:" label-width="95px" prop="trainSource">
|
||||
<el-input v-model="addModel.trainSource" :id="domIdTrainSource" @change="handerTrainSource"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<div style="width: 96%;">
|
||||
<el-form-item label="车 组 号:" label-width="95px" prop="trainCode">
|
||||
<el-input v-model="addModel.trainCode" />
|
||||
</el-form-item>
|
||||
<el-form-item label="服 务 号:" label-width="95px" prop="serverNumber">
|
||||
<el-input v-model="addModel.serverNumber" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
|
||||
<el-input v-model="addModel.tripNumber" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
@ -24,8 +27,8 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
// name: 'TrainMove',
|
||||
@ -35,34 +38,26 @@
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
tripNumber: '',
|
||||
trainSource: '',
|
||||
stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: '',
|
||||
},
|
||||
selected: null,
|
||||
addModel: {
|
||||
trainCode: '', // 车组号
|
||||
serverNumber: '', // 服务号
|
||||
tripNumber: '' // 车次号
|
||||
},
|
||||
|
||||
rules: {
|
||||
// tripNumber: [
|
||||
// { required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
// ],
|
||||
trainSource: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
// stationStandSource: [
|
||||
// { required: true, message: '请选择车站', trigger: 'change' }
|
||||
// ],
|
||||
// trainGoal: [
|
||||
// { required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
// ],
|
||||
// stationStandGoal: [
|
||||
// { required: true, message: '请选择车站', trigger: 'change' }
|
||||
// ],
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
rules: {
|
||||
trainCode: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
],
|
||||
serverNumber: [
|
||||
{ required: true, message: '请输入服务号', trigger: 'change' }
|
||||
],
|
||||
tripNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -78,12 +73,8 @@
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
domIdTrainSource() {
|
||||
// return this.dialogShow ? OperationEvent.Train.trainSource.menu.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Train.setPlanTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '添加计划车'
|
||||
return '创建计划车'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -114,14 +105,18 @@
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
// operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
operation: OperationEvent.Train.addPlanTrainId.menu.operation,
|
||||
over: true,
|
||||
operation: OperationEvent.Train.createPlanTrain.menu.operation,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan,
|
||||
param: {
|
||||
trainCode: this.addModel.trainCode, // 车组号
|
||||
serverNumber: this.addModel.serverNumber, // 服务号
|
||||
tripNumber: this.addModel.tripNumber // 车次号
|
||||
}
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
|
@ -21,7 +21,7 @@ import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus';
|
||||
import TrainDelete from './dialog/trainDelete';
|
||||
import TrainDefine from './dialog/trainDefine';
|
||||
@ -35,6 +35,9 @@ import TrainSetHead from './dialog/trainSetHead';
|
||||
import TrainSetWork from './dialog/trainSetWork';
|
||||
import TrainFlag from './dialog/trainFlag';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'MenuTrain',
|
||||
@ -65,197 +68,207 @@ export default {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
local: [
|
||||
Local: [
|
||||
// {
|
||||
// label: '定义车组号',
|
||||
// handler: this.addTrainId,
|
||||
// disabledCallback: MenuDisabledState.Train.addTrainId,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '删除车组号',
|
||||
// handler: this.delTrainId,
|
||||
// disabledCallback: MenuDisabledState.Train.delTrainId,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '修改车组号',
|
||||
// handler: this.editTrainId,
|
||||
// disabledCallback: MenuDisabledState.Train.editTrainId,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '移动车组号',
|
||||
// handler: this.moveTrainId,
|
||||
// disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '设置计划车',
|
||||
// handler: this.setPlanTrain,
|
||||
// disabledCallback: MenuDisabledState.Train.setPlanTrain,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '设置头码车',
|
||||
// handler: this.setHeadTrain,
|
||||
// disabledCallback: MenuDisabledState.Train.setHeadTrain,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '设置人工车',
|
||||
// handler: this.setWorkTrain,
|
||||
// disabledCallback: MenuDisabledState.Train.setWorkTrain,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '添加计划车',
|
||||
// // handler: this.undeveloped,
|
||||
// handler: this.addPlanTrain,
|
||||
// // disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
// disabledCallback: MenuDisabledState.Train.addPlanTrain,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '删除计划车',
|
||||
// // handler: this.undeveloped,
|
||||
// handler: this.deletePlanTrain,
|
||||
// disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '平移计划车',
|
||||
// // handler: this.undeveloped,
|
||||
// handler: this.moveEventlyTrain,
|
||||
// disabledCallback: MenuDisabledState.Train.moveEventlyTrain,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '标记重点列车',
|
||||
// handler: this.trainToFlag,
|
||||
// disabledCallback: MenuDisabledState.Train.trainToFlag,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '取消标记重点列车',
|
||||
// handler: this.trainUnFlag,
|
||||
// disabledCallback: MenuDisabledState.Train.trainUnFlag,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '列车信息',
|
||||
// handler: this.undeveloped,
|
||||
// disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
// auth: { station: true, center: true }
|
||||
// }
|
||||
{
|
||||
label: '定义车组号',
|
||||
handler: this.addTrainId,
|
||||
disabledCallback: MenuDisabledState.Train.addTrainId,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '删除车组号',
|
||||
handler: this.delTrainId,
|
||||
disabledCallback: MenuDisabledState.Train.delTrainId,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '修改车组号',
|
||||
handler: this.editTrainId,
|
||||
disabledCallback: MenuDisabledState.Train.editTrainId,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '移动车组号',
|
||||
handler: this.moveTrainId,
|
||||
disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '设置计划车',
|
||||
handler: this.setPlanTrain,
|
||||
disabledCallback: MenuDisabledState.Train.setPlanTrain,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '设置头码车',
|
||||
handler: this.setHeadTrain,
|
||||
disabledCallback: MenuDisabledState.Train.setHeadTrain,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '设置人工车',
|
||||
handler: this.setWorkTrain,
|
||||
disabledCallback: MenuDisabledState.Train.setWorkTrain,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '添加计划车',
|
||||
// handler: this.undeveloped,
|
||||
handler: this.addPlanTrain,
|
||||
// disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
disabledCallback: MenuDisabledState.Train.addPlanTrain,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '删除计划车',
|
||||
// handler: this.undeveloped,
|
||||
handler: this.deletePlanTrain,
|
||||
disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '平移计划车',
|
||||
// handler: this.undeveloped,
|
||||
handler: this.moveEventlyTrain,
|
||||
disabledCallback: MenuDisabledState.Train.moveEventlyTrain,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '标记重点列车',
|
||||
handler: this.trainToFlag,
|
||||
disabledCallback: MenuDisabledState.Train.trainToFlag,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '取消标记重点列车',
|
||||
handler: this.trainUnFlag,
|
||||
disabledCallback: MenuDisabledState.Train.trainUnFlag,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '列车信息',
|
||||
handler: this.undeveloped,
|
||||
disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
auth: { station: true, center: true }
|
||||
}
|
||||
label: '新建计划车',
|
||||
handler: this.addPlanTrain,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
},
|
||||
],
|
||||
central: [
|
||||
Center: [
|
||||
// {
|
||||
// label: '定义车组号',
|
||||
// handler: this.addTrainId,
|
||||
// disabledCallback: MenuDisabledState.Train.addTrainId,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '删除车组号',
|
||||
// handler: this.delTrainId,
|
||||
// disabledCallback: MenuDisabledState.Train.delTrainId,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '修改车组号',
|
||||
// handler: this.editTrainId,
|
||||
// disabledCallback: MenuDisabledState.Train.editTrainId,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '移动车组号',
|
||||
// handler: this.moveTrainId,
|
||||
// disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '设置计划车',
|
||||
// handler: this.setPlanTrain,
|
||||
// disabledCallback: MenuDisabledState.Train.setPlanTrain,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '设置头码车',
|
||||
// handler: this.setHeadTrain,
|
||||
// disabledCallback: MenuDisabledState.Train.setHeadTrain,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '设置人工车',
|
||||
// handler: this.setWorkTrain,
|
||||
// disabledCallback: MenuDisabledState.Train.setWorkTrain,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '添加计划车',
|
||||
// // handler: this.undeveloped,
|
||||
// handler: this.addPlanTrain,
|
||||
// // disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
// disabledCallback: MenuDisabledState.Train.addPlanTrain,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '删除计划车',
|
||||
// // handler: this.undeveloped,
|
||||
// handler: this.deletePlanTrain,
|
||||
// disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '平移计划车',
|
||||
// // handler: this.undeveloped,
|
||||
// handler: this.moveEventlyTrain,
|
||||
// disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '标记重点列车',
|
||||
// handler: this.trainToFlag,
|
||||
// disabledCallback: MenuDisabledState.Train.trainToFlag,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '取消标记重点列车',
|
||||
// handler: this.trainUnFlag,
|
||||
// disabledCallback: MenuDisabledState.Train.trainUnFlag,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '列车信息',
|
||||
// handler: this.undeveloped,
|
||||
// disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
{
|
||||
label: '定义车组号',
|
||||
handler: this.addTrainId,
|
||||
disabledCallback: MenuDisabledState.Train.addTrainId,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '删除车组号',
|
||||
handler: this.delTrainId,
|
||||
disabledCallback: MenuDisabledState.Train.delTrainId,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '修改车组号',
|
||||
handler: this.editTrainId,
|
||||
disabledCallback: MenuDisabledState.Train.editTrainId,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '移动车组号',
|
||||
handler: this.moveTrainId,
|
||||
disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '设置计划车',
|
||||
handler: this.setPlanTrain,
|
||||
disabledCallback: MenuDisabledState.Train.setPlanTrain,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '设置头码车',
|
||||
handler: this.setHeadTrain,
|
||||
disabledCallback: MenuDisabledState.Train.setHeadTrain,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '设置人工车',
|
||||
handler: this.setWorkTrain,
|
||||
disabledCallback: MenuDisabledState.Train.setWorkTrain,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '添加计划车',
|
||||
// handler: this.undeveloped,
|
||||
handler: this.addPlanTrain,
|
||||
// disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
disabledCallback: MenuDisabledState.Train.addPlanTrain,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '删除计划车',
|
||||
// handler: this.undeveloped,
|
||||
handler: this.deletePlanTrain,
|
||||
disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '平移计划车',
|
||||
// handler: this.undeveloped,
|
||||
handler: this.moveEventlyTrain,
|
||||
disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '标记重点列车',
|
||||
handler: this.trainToFlag,
|
||||
disabledCallback: MenuDisabledState.Train.trainToFlag,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '取消标记重点列车',
|
||||
handler: this.trainUnFlag,
|
||||
disabledCallback: MenuDisabledState.Train.trainUnFlag,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '列车信息',
|
||||
handler: this.undeveloped,
|
||||
disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
auth: { station: true, center: true }
|
||||
}
|
||||
label: '新建计划车',
|
||||
handler: this.addPlanTrain,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
},
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
@ -306,17 +319,18 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = trainMenuFiltration(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
|
||||
}
|
||||
// this.menu = trainMenuFiltration(this.menuNormal);
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// if (this.operatemode === OperateMode.ADMIN) {
|
||||
// this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
|
||||
// }
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = [...this.menuForce, ...this.menuSpeed];
|
||||
}
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
// this.menu = menuConvert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
@ -487,13 +501,14 @@ export default {
|
||||
// 添加计划车
|
||||
addPlanTrain() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Train.type,
|
||||
label: MapDeviceType.Train.label,
|
||||
operation: OperationEvent.Train.addPlanTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.createPlanTrain.menu.operation,
|
||||
param: {
|
||||
sectionCode: this.$store.state.map.trainWindowSectionCode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainAddPlan.doShow(operate, this.selected);
|
||||
|
209
src/jmapNew/theme/chengdu_03/menus/dialog/trainInitPlan.vue
Normal file
209
src/jmapNew/theme/chengdu_03/menus/dialog/trainInitPlan.vue
Normal file
@ -0,0 +1,209 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules" label-position="left">
|
||||
<el-form-item prop="trainCode" label="车组号:">
|
||||
<!--<el-input v-model="addModel.trainCode"/>-->
|
||||
<el-select v-model="addModel.trainCode" filterable>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车次号:" prop="tripNumber">
|
||||
<!--<el-input v-model="addModel.tripNumber"/>-->
|
||||
<el-select v-model="addModel.tripNumber" @change="tripNumberChange">
|
||||
<el-option
|
||||
v-for="tripNum in tripNumberList"
|
||||
:key="tripNum"
|
||||
:label="tripNum"
|
||||
:value="tripNum"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务号:" prop="serviceNumber">
|
||||
<el-input v-model="serviceNumber" disabled="true"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
|
||||
|
||||
export default {
|
||||
name: 'TrainCreateNumber',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
sectionName: '',
|
||||
tripNumberList: [],
|
||||
serviceNumber: '',
|
||||
addModel: {
|
||||
trainCode:'',
|
||||
tripNumber:''
|
||||
},
|
||||
rules: {
|
||||
trainCode: [
|
||||
{ required: true, message: '请输入列车编码', trigger: 'blur'}
|
||||
],
|
||||
serverNumber: [
|
||||
{ required: true, message: '请输入服务号', trigger: 'blur'}
|
||||
],
|
||||
tripNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'trainList',
|
||||
'stationStandList',
|
||||
'trainWindowSectionCode'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.createPlanTrain.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '新建计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
tripNumberChange(tripNumber) {
|
||||
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
|
||||
this.serviceNumber = resp.data;
|
||||
});
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
this.serviceNumber = '';
|
||||
this.addModel = {
|
||||
trainCode:'',
|
||||
tripNumber:''
|
||||
};
|
||||
getTripNumberList(this.$route.query.group).then(resp => {
|
||||
this.tripNumberList = [];
|
||||
resp.data.forEach(item => {
|
||||
if (!this.tripNumberList.includes(item)) {
|
||||
this.tripNumberList.push(item);
|
||||
}
|
||||
});
|
||||
});
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Train.createPlanTrain.menu.operation,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan,
|
||||
param: {
|
||||
sectionCode: this.trainWindowSectionCode,
|
||||
trainCode: this.addModel.trainCode, // 车组号
|
||||
serviceNumber: this.serviceNumber, // 服务号
|
||||
tripNumber: this.addModel.tripNumber // 车次号
|
||||
}
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 300px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
@ -8,6 +8,7 @@
|
||||
<train-move-number ref="trainMoveNumber" />
|
||||
<train-delete-number ref="trainDeleteNumber" />
|
||||
<train-detail-info ref="trainDetailInfo" />
|
||||
<train-init-plan ref="trainInitPlan"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -15,16 +16,19 @@
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus';
|
||||
import { MenuDisabledState } from './utils/menuItemStatus';
|
||||
import TrainControl from './dialog/trainControl';
|
||||
import TrainEditNumber from './dialog/trainEditNumber';
|
||||
import TrainMoveNumber from './dialog/trainMoveNumber';
|
||||
import TrainCreateNumber from './dialog/trainCreateNumber';
|
||||
import TrainDeleteNumber from './dialog/trainDeleteNumber';
|
||||
import TrainInitPlan from './dialog/trainInitPlan';
|
||||
import TrainDetailInfo from './dialog/trainDetailInfo';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'MenuTrain',
|
||||
@ -36,7 +40,8 @@ export default {
|
||||
TrainMoveNumber,
|
||||
TrainCreateNumber,
|
||||
TrainDeleteNumber,
|
||||
TrainDetailInfo
|
||||
TrainDetailInfo,
|
||||
TrainInitPlan
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
@ -53,8 +58,14 @@ export default {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
local: [],
|
||||
central: [
|
||||
Local: [
|
||||
{
|
||||
label: '新建计划列车',
|
||||
handler: this.createPlanTrain,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '新建车组号',
|
||||
handler: this.createTrainNo,
|
||||
@ -114,8 +125,12 @@ export default {
|
||||
handler: this.undeveloped,
|
||||
disabledCallback: MenuDisabledState.Train.moveTrainId,
|
||||
auth: { station: true, center: true}
|
||||
},
|
||||
{
|
||||
label: '新建计划列车',
|
||||
handler: this.createPlanTrain,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
}
|
||||
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
@ -166,14 +181,11 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = trainMenuFiltration(this.menuNormal);
|
||||
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = [...this.menuForce, ...this.menuSpeed];
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
@ -377,6 +389,23 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
createPlanTrain() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.createPlanTrain.menu.operation,
|
||||
param: {
|
||||
trainWindowCode: this.selected.code
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainInitPlan.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
|
@ -203,6 +203,9 @@ const map = {
|
||||
mapList: (state) => {
|
||||
return state.mapList;
|
||||
},
|
||||
trainWindowSectionCode: (state) => {
|
||||
return state.trainWindowSectionCode;
|
||||
},
|
||||
mapConfig: (state) => {
|
||||
return state.mapConfig;
|
||||
},
|
||||
@ -467,8 +470,8 @@ const map = {
|
||||
state.map &&
|
||||
state.map.sectionList && state.map.sectionList.length) {
|
||||
state.map.sectionList.forEach(elem => {
|
||||
state.trainWindowSectionCode = elem.code;
|
||||
if (elem.trainWindowCode == code) {
|
||||
state.trainWindowSectionCode = elem.code;
|
||||
if (state.map.stationList && state.map.stationList.length) {
|
||||
state.map.stationList.forEach(elems => {
|
||||
if (elems.code == elem.stationCode) {
|
||||
|
@ -3,12 +3,12 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// 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.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
BASE_API = 'http://b29z135112.zicp.vip';
|
||||
} else {
|
||||
BASE_API = process.env.VUE_APP_BASE_API;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user