Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
ef8cedb389
@ -83,6 +83,7 @@ const ExamCourseDetail = () => import('@/views/exam/detail/courseDetail');
|
||||
const DemonstrationDetail = () => import('@/views/demonstration/detail/index');
|
||||
|
||||
const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index');
|
||||
const PlanMonitorNewEditTool = () => import('@/views/planMonitor/newEditTool/index');
|
||||
const PlanMonitorEditAUSTool = () => import('@/views/planMonitor/editToolAUS/tool/index');
|
||||
const PlanMonitorEditAUSLine = () => import('@/views/planMonitor/editToolAUS/line/index');
|
||||
const PlanMonitorDetail = () => import('@/views/planMonitor/detail');
|
||||
@ -342,6 +343,11 @@ export const publicAsyncRoute = [
|
||||
component: PlanMonitorEditTool,
|
||||
hidden: true
|
||||
},
|
||||
{ // 哈尔滨运行图编辑
|
||||
path: '/plan/newTool',
|
||||
component: PlanMonitorNewEditTool,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/displayIscs/system',
|
||||
component: IscsSystem,
|
||||
|
@ -65,6 +65,7 @@ const ExamCourseDetail = () => import('@/views/exam/detail/courseDetail');
|
||||
const DemonstrationDetail = () => import('@/views/demonstration/detail/index');
|
||||
|
||||
const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index');
|
||||
const PlanMonitorNewEditTool = () => import('@/views/planMonitor/newEditTool/index');
|
||||
const PlanMonitorDetail = () => import('@/views/planMonitor/detail');
|
||||
|
||||
const DesignPlatformHome = () => import('@/views/designPlatform/home');
|
||||
@ -226,6 +227,11 @@ export const publicAsyncRoute = [
|
||||
component: PlanMonitorEditTool,
|
||||
hidden: true
|
||||
},
|
||||
{ // 哈尔滨运行图编辑
|
||||
path: '/plan/newTool',
|
||||
component: PlanMonitorNewEditTool,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/displayIscs/system',
|
||||
component: IscsSystem,
|
||||
|
@ -22,7 +22,7 @@
|
||||
<run-plan-view v-if="project!== 'bjd'" ref="runPlanView" :group="group" />
|
||||
<!-- 加载剧本列表弹窗 -->
|
||||
<add-quest ref="addQuest" @selectQuest="selectQuest" />
|
||||
<run-plan-edit v-if="isScheduling && isDepot" ref="runPlanEdit" />
|
||||
<!-- <run-plan-edit v-if="isScheduling && isDepot" ref="runPlanEdit" /> -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -33,9 +33,10 @@ import FaultChoose from './demon/faultChoose';
|
||||
import AddQuest from './demon/addQuest';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import RunPlanEdit from './demon/runPlanEdit';
|
||||
// import RunPlanEdit from './demon/runPlanEdit';
|
||||
import { getEveryDayRunPlanNew } from '@/api/simulation';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { getToken } from '@/utils/auth';
|
||||
|
||||
// 右上角操作
|
||||
export default {
|
||||
@ -45,7 +46,7 @@ export default {
|
||||
RunPlanView,
|
||||
FaultChoose,
|
||||
AddQuest,
|
||||
RunPlanEdit,
|
||||
// RunPlanEdit,
|
||||
SelectStation
|
||||
},
|
||||
props: {
|
||||
@ -216,7 +217,20 @@ export default {
|
||||
this.$jlmap.updateShowMode(list, showMode); // 二次过滤
|
||||
},
|
||||
runPlanEditShow() {
|
||||
this.$refs.runPlanEdit.doShow();
|
||||
// this.$refs.runPlanEdit.doShow();
|
||||
// const query = { lineCode: lineCode, mapId: this.$route.params.mapId, planId: planId, planName: planName };
|
||||
// this.$router.push({ path: `/plan/tool`, query: query });
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/plan/newTool',
|
||||
query:{
|
||||
mapId:this.$route.query.mapId,
|
||||
lineCode:this.$route.query.lineCode,
|
||||
token:getToken(),
|
||||
project: this.project,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -151,6 +151,7 @@ export default {
|
||||
this.$store.dispatch('runPlan/refresh');
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
this.$messageBox('生成通用数据失败: ' + error.message);
|
||||
this.doClose();
|
||||
});
|
||||
} else {
|
||||
|
@ -48,6 +48,8 @@
|
||||
<populating-generic-data ref="populatingGenericData" :load-run-plan-id="loadRunPlanId" />
|
||||
<create-empty-plan ref="createEmptyPlan" @refresh="refreshRunPlanList" />
|
||||
<edit-plan-name ref="editPlan" @renewal="refreshRunPlanName" />
|
||||
<gernarate-plan ref="gernaratePlanTrain" />
|
||||
<modifying-station-stop-time ref="modifyingStationStopTime" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -70,12 +72,17 @@ import ModifyingBeginTime from './menus/modifyingBeginTime';
|
||||
import EditStationBetweenTime from './menus/editStationBetweenTime';
|
||||
import AddSmoothRunTime from './menus/addSmoothRunTime';
|
||||
import EditSmoothRunTime from './menus/editSmoothRunTime';
|
||||
import ModifyingStationIntervalTime from './menus/modifyingStationIntervalTime';
|
||||
import PopulatingGenericData from './menus/populatingGenericData';
|
||||
// import ModifyingStationIntervalTime from './menus/modifyingStationIntervalTime';
|
||||
// import PopulatingGenericData from './menus/populatingGenericData';
|
||||
import PopulatingGenericData from '../editTool/menus/populatingGenericData';
|
||||
import CreateEmptyPlan from './menus/createEmptyPlan';
|
||||
import GernaratePlan from '../editTool/menus/gernaratePlanTrain';
|
||||
import ModifyingStationStopTime from '../editTool/menus/modifyingStationStopTime';
|
||||
import ModifyingStationIntervalTime from '../editTool/menus/modifyingStationIntervalTime';
|
||||
import { deletePlanService } from '@/api/runplan';
|
||||
import { checkLoginLine } from '@/api/login';
|
||||
import { getRpListByMapId } from '@/api/runplan';
|
||||
import { getPublishMapDetailById } from '@/api/jmap/map';
|
||||
|
||||
export default {
|
||||
name: 'Menus',
|
||||
@ -100,7 +107,9 @@ export default {
|
||||
EditSmoothRunTime,
|
||||
ModifyingStationIntervalTime,
|
||||
CreateEmptyPlan,
|
||||
EditPlanName
|
||||
EditPlanName,
|
||||
GernaratePlan,
|
||||
ModifyingStationStopTime
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -125,12 +134,13 @@ export default {
|
||||
created() {
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
|
||||
},
|
||||
mounted() {
|
||||
async mounted() {
|
||||
this.timeDemon = setInterval(() => {
|
||||
checkLoginLine();
|
||||
}, 5000 * 60);
|
||||
if (this.$route.query.mapId) {
|
||||
this.refreshRunPlanList(true);
|
||||
await this.loadMap();
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
@ -180,6 +190,12 @@ export default {
|
||||
refresh() {
|
||||
this.$store.dispatch('runPlan/refresh');
|
||||
},
|
||||
async loadMap() {
|
||||
const res = await getPublishMapDetailById(this.$route.query.mapId);
|
||||
if (res && res.code == 200) {
|
||||
this.$store.dispatch('map/setMapData', res.data.graphDataNew);
|
||||
}
|
||||
},
|
||||
refreshRunPlanList(planId) {
|
||||
getRpListByMapId(this.$route.query.mapId).then(resp => {
|
||||
this.runPlanList = resp.data || [];
|
||||
@ -199,7 +215,8 @@ export default {
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.$emit('doClose');
|
||||
// this.$emit('doClose');
|
||||
window.close();
|
||||
},
|
||||
loadingRunPlan(param) {
|
||||
this.loadRunPlanId = param.planId;
|
||||
|
@ -126,6 +126,7 @@
|
||||
<el-button type="primary" @click="confirmPublish">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<route-map ref="routeMap" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -133,10 +134,12 @@ import { mapGetters } from 'vuex';
|
||||
import { planEffectiveCheck } from '@/api/runplan';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { publishRunPlanAllUser } from '@/api/designPlatform';
|
||||
import routeMap from '../editTool/routingoperate/routeMap';
|
||||
import { deleteRunPlan } from '@/api/runplan';
|
||||
|
||||
export default {
|
||||
name: 'PlanMenuBar',
|
||||
components: { routeMap },
|
||||
props: {
|
||||
planConvert: {
|
||||
type: Object,
|
||||
@ -221,6 +224,10 @@ export default {
|
||||
{
|
||||
title: this.$t('planMonitor.modify'),
|
||||
children: [
|
||||
{
|
||||
title: '生成计划',
|
||||
click: this.handleGernaratePlanningTrain
|
||||
},
|
||||
{
|
||||
title: this.$t('planMonitor.addPlan'),
|
||||
click: this.handleAddPlanningTrain
|
||||
@ -253,6 +260,27 @@ export default {
|
||||
click: this.modifyRunPlanName
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '配置',
|
||||
children: [
|
||||
{
|
||||
title: '交路设置',
|
||||
click: this.handleRoutingSettings
|
||||
},
|
||||
{
|
||||
title: '参数配置',
|
||||
click: this.handleRunplanParams
|
||||
},
|
||||
{
|
||||
title: '停站时间',
|
||||
click: this.handleDwellTime
|
||||
},
|
||||
{
|
||||
title: '运行等级',
|
||||
click: this.handleRoutingLevel
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -300,11 +328,12 @@ export default {
|
||||
methods: {
|
||||
back() {
|
||||
// this.$router.push({ path: `${UrlConfig.plan.detail}/${this.$route.query.mapId}` });
|
||||
if (this.dispaly) {
|
||||
this.$emit('doClose');
|
||||
} else {
|
||||
this.$router.go(-1);
|
||||
}
|
||||
// if (this.dispaly) {
|
||||
// this.$emit('doClose');
|
||||
// } else {
|
||||
// this.$router.go(-1);
|
||||
// }
|
||||
this.$emit('doClose');
|
||||
},
|
||||
menuConvert(menuBase) {
|
||||
const menus = [];
|
||||
@ -417,13 +446,17 @@ export default {
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
},
|
||||
// 修改站间运行时间
|
||||
handleModifyingStationIntervalTime() {
|
||||
this.$emit('dispatchDialog', { name: 'modifyingStationIntervalTime', params: {} });
|
||||
},
|
||||
// // 修改站间运行时间
|
||||
// handleModifyingStationIntervalTime() {
|
||||
// this.$emit('dispatchDialog', { name: 'modifyingStationIntervalTime', params: {} });
|
||||
// },
|
||||
// 填充计划运行图
|
||||
populatingGenericData() {
|
||||
this.$emit('dispatchDialog', { name: 'populatingGenericData', params: {} });
|
||||
if (this.loadRunPlanId) {
|
||||
this.$emit('dispatchDialog', { name: 'populatingGenericData', params: {} });
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
|
||||
}
|
||||
},
|
||||
newRunPlan() {
|
||||
this.$emit('dispatchDialog', { name: 'createEmptyPlan', params: {}});
|
||||
@ -432,6 +465,38 @@ export default {
|
||||
handleAutoGenerate() {
|
||||
this.$emit('dispatchDialog', { name: 'editSmoothRunTime', params: {} });
|
||||
},
|
||||
// 停站时间
|
||||
handleDwellTime() {
|
||||
if (this.loadRunPlanId) {
|
||||
this.$emit('dispatchDialog', { name: 'modifyingStationStopTime', params: {} });
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
|
||||
}
|
||||
},
|
||||
// 运行等级
|
||||
handleRoutingLevel() {
|
||||
if (this.loadRunPlanId) {
|
||||
this.$emit('dispatchDialog', { name: 'modifyingStationIntervalTime', params: {} });
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
|
||||
}
|
||||
},
|
||||
// 交路设置
|
||||
handleRoutingSettings() {
|
||||
this.$refs.routeMap.doShow('routeMap');
|
||||
},
|
||||
// 运行图配置文件
|
||||
handleRunplanParams() {
|
||||
this.$refs.routeMap.doShow('runplanParams');
|
||||
},
|
||||
// 生成计划
|
||||
handleGernaratePlanningTrain() {
|
||||
if (this.loadRunPlanId) {
|
||||
this.$emit('dispatchDialog', { name: 'gernaratePlanTrain', params: {} });
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
|
||||
}
|
||||
},
|
||||
// 校验运行图
|
||||
handlePlanEffectiveCheck() {
|
||||
if (this.loadRunPlanId) {
|
||||
|
@ -12,14 +12,14 @@
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="3" style="height: 28px;line-height: 28px;">
|
||||
<!-- <el-col :span="3" style="height: 28px;line-height: 28px;">
|
||||
<el-radio v-model="addModel.forward" :label="true">{{ $t('planMonitor.addToTheFront') }}</el-radio>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="3" style="margin-left: 10px;height: 28px;line-height: 28px;">
|
||||
<span>{{ $t('planMonitor.tripNumber')+$t('global.colon') }}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="addModel.tripNumber" size="mini" :placeholder="this.$t('global.choose')">
|
||||
<el-select v-model="addModel.tripNumber" size="mini" :placeholder="this.$t('global.choose')" disabled>
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
@ -36,15 +36,15 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 5px;height: 28px;line-height: 28px;">
|
||||
<el-col :span="3">
|
||||
<!-- <el-col :span="3">
|
||||
<el-radio v-model="addModel.forward" :label="false">{{ $t('planMonitor.addToTheEnd') }}</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="3" style="margin-left: 10px;height: 28px;line-height: 28px;">
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="3" style="margin-left: 10px;height: 28px;line-height: 28px;">
|
||||
<span>{{ $t('planMonitor.defaultStopTime') }}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-input-number v-model="defaultStopTime" placeholder="请输入时间" size="mini" :controls="false" :min="0" />
|
||||
<!-- <el-select v-model="defaultStopTime" size="mini" :placeholder="this.$t('global.choose')">
|
||||
<el-input-number v-model="defaultStopTime" placeholder="请输入时间" size="mini" :controls="false" :min="0" /> -->
|
||||
<!-- <el-select v-model="defaultStopTime" size="mini" :placeholder="this.$t('global.choose')">
|
||||
<el-option
|
||||
v-for="item in defaultStopTimeList"
|
||||
:key="item.value"
|
||||
@ -52,8 +52,8 @@
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select> -->
|
||||
</el-col>
|
||||
<el-col :span="3" style="margin-left: 20px;height: 28px;line-height: 28px;">
|
||||
<!-- </el-col> -->
|
||||
<el-col :span="3" style="margin-left:10px;height: 28px;line-height: 28px;">
|
||||
<span>{{ $t('planMonitor.defaultRunLevel') }}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
@ -129,27 +129,38 @@
|
||||
{{ formatName(scope.row.sectionCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="arriveTime" :label="this.$t('planMonitor.arriveTime')" width="100px" />
|
||||
<!-- prop="stopTime" -->
|
||||
<el-table-column :label="this.$t('planMonitor.stopTime')" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.stopTime" placeholder="请输入时间" size="mini" @input="changeStopTime(scope.$index, scope.row.stopTime)" />
|
||||
<!-- prop="arriveTime" -->
|
||||
<el-table-column :label="this.$t('planMonitor.arriveTime')" width="100px">
|
||||
<template v-if="scope.$index!=0" slot-scope="scope">
|
||||
{{ scope.row.arriveTime }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- prop="stopTime" -->
|
||||
<el-table-column :label="this.$t('planMonitor.stopTime')" width="100px">
|
||||
<template v-if="scope.$index!=0&&scope.$index!=addModel.arriveConfigList.length-1" slot-scope="scope">
|
||||
{{ scope.row.stopTime+'s' }}
|
||||
<!-- <el-input v-model="scope.row.stopTime" placeholder="请输入时间" size="mini" @input="changeStopTime(scope.$index, scope.row.stopTime)" /> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="this.$t('planMonitor.departureTime')" width="100px">
|
||||
<template v-if="scope.$index!=addModel.arriveConfigList.length-1" slot-scope="scope">
|
||||
{{ scope.row.departureTime }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="departureTime" :label="this.$t('planMonitor.departureTime')" width="100px" />
|
||||
<el-table-column :label="this.$t('planMonitor.runLevel')">
|
||||
<template slot-scope="scope">
|
||||
<span style="font-size:13px;">{{ scope.row.speedLevel }}</span>
|
||||
<el-input v-model="scope.row.speedLevelTime" style="width:70px" placeholder="请输入运行等级" size="mini" @input="changeSpeedLevelTime(scope.$index, scope.row.speedLevelTime)" />
|
||||
<span>{{ '('+scope.row.speedLevelTime+'s)' }}</span>
|
||||
<!-- <el-input v-model="scope.row.speedLevelTime" style="width:70px" placeholder="请输入运行等级" size="mini" @input="changeSpeedLevelTime(scope.$index, scope.row.speedLevelTime)" /> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<!-- <el-row>
|
||||
<el-col :offset="16">
|
||||
<el-checkbox v-model="showDefault">{{ $t('planMonitor.showDefaultStopTimeAndRunLevel') }}</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
||||
@ -158,7 +169,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRoutingList, addPlanTrip, getMapStationRun } from '@/api/runplan';
|
||||
import { listUserRoutingData, addPlanTrip, getMapStationRunUser, getStationStopTime } from '@/api/runplan';
|
||||
import { formatTime, formatName } from '@/utils/runPlan';
|
||||
|
||||
export default {
|
||||
@ -178,16 +189,17 @@ export default {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
isPlan: false,
|
||||
showDefault: true,
|
||||
// showDefault: true,
|
||||
stopStationMap: {},
|
||||
stopTimeMap:{},
|
||||
params: {},
|
||||
routingList: [],
|
||||
startStationFilters:[],
|
||||
endStationFilters:[],
|
||||
defaultStopTime: '30',
|
||||
defaultSpeedLevel: 'l3',
|
||||
// defaultStopTime: '30',
|
||||
defaultSpeedLevel: 'l1',
|
||||
addModel: {
|
||||
forward: false,
|
||||
// forward: false,
|
||||
routingCode: '',
|
||||
endStationCode: '',
|
||||
startStationCode: '',
|
||||
@ -223,9 +235,9 @@ export default {
|
||||
'addModel.startTime': function () {
|
||||
this.computedDetailList();
|
||||
},
|
||||
'defaultStopTime': function () {
|
||||
this.computedDetailList('defaultStopTime');
|
||||
},
|
||||
// 'defaultStopTime': function () {
|
||||
// this.computedDetailList('defaultStopTime');
|
||||
// },
|
||||
'defaultSpeedLevel': function () {
|
||||
this.computedDetailList('defaultSpeedLevel');
|
||||
}
|
||||
@ -233,13 +245,13 @@ export default {
|
||||
methods: {
|
||||
loadInitData(params) {
|
||||
this.isPlan = params.isPlan;
|
||||
// this.addModel.taskIndex = getUID('task_');
|
||||
this.addModel.serviceNumber = params.serviceNumber;
|
||||
this.addModel.planId = this.loadRunPlanId;
|
||||
this.addModel.arriveConfigList = [];
|
||||
const planId = this.loadRunPlanId;
|
||||
if (planId) {
|
||||
getRoutingList(planId).then(resp => {
|
||||
const mapId = this.$route.query.mapId;
|
||||
listUserRoutingData(mapId).then(resp => {
|
||||
this.routingList = resp.data;
|
||||
const startStationFilterMap = {};
|
||||
const endStationFilterMap = {};
|
||||
@ -270,11 +282,17 @@ export default {
|
||||
|
||||
const mapId = this.$route.query.mapId;
|
||||
if (mapId) {
|
||||
getMapStationRun(mapId).then(resp =>{
|
||||
const list = resp.data;
|
||||
getMapStationRunUser(mapId).then(resp =>{
|
||||
const list = resp.data.list;
|
||||
list.forEach(elem => {
|
||||
this.stopStationMap[[elem.startSectionCode, elem.endSectionCode].toString()] = elem;
|
||||
});
|
||||
getStationStopTime(mapId).then(response=>{
|
||||
const stopTimeList = response.data.list;
|
||||
stopTimeList.forEach(element=>{
|
||||
this.stopTimeMap[element.stationCode] = {parkingTime:element.parkingTime};
|
||||
});
|
||||
});
|
||||
// if (list && list.length) {
|
||||
// list.forEach(elem => {
|
||||
// if (!elem.runPlanLevelVO) {
|
||||
@ -328,73 +346,92 @@ export default {
|
||||
}
|
||||
return runTime;
|
||||
},
|
||||
changeSpeedLevelTime(indexs, speedLevelTime) {
|
||||
const arriveConfigList = Object.assign([], this.addModel.arriveConfigList);
|
||||
let tempTime = this.computedTimeByString(this.addModel.startTime) / 1000;
|
||||
arriveConfigList.forEach((elem, index) => {
|
||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
if (index == indexs) { elem.speedLevelTime = speedLevelTime ? Number(speedLevelTime) : 0; }
|
||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
if (index > 0) {
|
||||
elem.departureTime = index == arriveConfigList.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
||||
} else {
|
||||
elem.departureTime = formatTime(tempTime);
|
||||
}
|
||||
const realRunlevel = elem.speedLevelTime;
|
||||
if (index > 0) {
|
||||
tempTime = tempTime + elem.stopTime + realRunlevel;
|
||||
} else {
|
||||
tempTime = tempTime + realRunlevel;
|
||||
}
|
||||
});
|
||||
this.addModel.arriveConfigList = arriveConfigList;
|
||||
this.addModel.endTime = formatTime(tempTime - this.addModel.arriveConfigList[this.addModel.arriveConfigList.length - 1].stopTime);
|
||||
},
|
||||
changeStopTime(indexs, time) {
|
||||
let tempTime = this.computedTimeByString(this.addModel.startTime) / 1000;
|
||||
// const runLevel = this.defaultSpeedLevel || 'l3'; // 默认等级三
|
||||
const arriveConfigList = Object.assign([], this.addModel.arriveConfigList);
|
||||
arriveConfigList.forEach((elem, index) => {
|
||||
if (index == indexs) { elem.stopTime = time ? Number(time) : 0; }
|
||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
// const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.value == runLevel; });
|
||||
// elem.speedLevel = this.defaultSpeedLevel == 'l3' ? `${this.$t('planMonitor.default')}(${runLevelObj.label})` : runLevelObj.label;
|
||||
if (index > 0) {
|
||||
elem.departureTime = index == arriveConfigList.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
||||
} else {
|
||||
elem.departureTime = formatTime(tempTime);
|
||||
}
|
||||
const realRunlevel = elem.speedLevelTime;
|
||||
if (index > 0) {
|
||||
tempTime = tempTime + elem.stopTime + realRunlevel;
|
||||
} else {
|
||||
tempTime = tempTime + realRunlevel;
|
||||
}
|
||||
});
|
||||
this.addModel.arriveConfigList = arriveConfigList;
|
||||
this.addModel.endTime = formatTime(tempTime - this.addModel.arriveConfigList[this.addModel.arriveConfigList.length - 1].stopTime);
|
||||
},
|
||||
// changeSpeedLevelTime(indexs, speedLevelTime) {
|
||||
// const arriveConfigList = Object.assign([], this.addModel.arriveConfigList);
|
||||
// let tempTime = this.computedTimeByString(this.addModel.startTime) / 1000;
|
||||
// arriveConfigList.forEach((elem, index) => {
|
||||
// elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
// if (index == indexs) { elem.speedLevelTime = speedLevelTime ? Number(speedLevelTime) : 0; }
|
||||
// elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
// if (index > 0) {
|
||||
// elem.departureTime = index == arriveConfigList.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
||||
// } else {
|
||||
// elem.departureTime = formatTime(tempTime);
|
||||
// }
|
||||
// const realRunlevel = elem.speedLevelTime;
|
||||
// if (index > 0) {
|
||||
// tempTime = tempTime + elem.stopTime + realRunlevel;
|
||||
// } else {
|
||||
// tempTime = tempTime + realRunlevel;
|
||||
// }
|
||||
// });
|
||||
// this.addModel.arriveConfigList = arriveConfigList;
|
||||
// this.addModel.endTime = formatTime(tempTime - this.addModel.arriveConfigList[this.addModel.arriveConfigList.length - 1].stopTime);
|
||||
// },
|
||||
// changeStopTime(indexs, time) {
|
||||
// let tempTime = this.computedTimeByString(this.addModel.startTime) / 1000;
|
||||
// // const runLevel = this.defaultSpeedLevel || 'l3'; // 默认等级三
|
||||
// const arriveConfigList = Object.assign([], this.addModel.arriveConfigList);
|
||||
// arriveConfigList.forEach((elem, index) => {
|
||||
// if (index == indexs) { elem.stopTime = time ? Number(time) : 0; }
|
||||
// elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
// // const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.value == runLevel; });
|
||||
// // elem.speedLevel = this.defaultSpeedLevel == 'l3' ? `${this.$t('planMonitor.default')}(${runLevelObj.label})` : runLevelObj.label;
|
||||
// if (index > 0) {
|
||||
// elem.departureTime = index == arriveConfigList.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
||||
// } else {
|
||||
// elem.departureTime = formatTime(tempTime);
|
||||
// }
|
||||
// const realRunlevel = elem.speedLevelTime;
|
||||
// if (index > 0) {
|
||||
// tempTime = tempTime + elem.stopTime + realRunlevel;
|
||||
// } else {
|
||||
// tempTime = tempTime + realRunlevel;
|
||||
// }
|
||||
// });
|
||||
// this.addModel.arriveConfigList = arriveConfigList;
|
||||
// this.addModel.endTime = formatTime(tempTime - this.addModel.arriveConfigList[this.addModel.arriveConfigList.length - 1].stopTime);
|
||||
// },
|
||||
computedDetailList(type = null) {
|
||||
if (this.addModel.routingCode) {
|
||||
const list = Object.assign([], this.addModel.arriveConfigList);
|
||||
let tempTime = this.computedTimeByString(this.addModel.startTime) / 1000;
|
||||
const runLevel = this.defaultSpeedLevel || 'l3'; // 默认等级三
|
||||
const runLevel = this.defaultSpeedLevel || 'l1'; // 默认等级三
|
||||
list.forEach((elem, index) => {
|
||||
if (type == 'defaultStopTime' || type == 'routingCode') {
|
||||
elem.stopTime = parseInt(this.defaultStopTime);
|
||||
// type == 'defaultStopTime' ||
|
||||
if (type == 'routingCode') {
|
||||
// elem.stopTime = parseInt(this.defaultStopTime);
|
||||
if (this.stopTimeMap[elem.stationCode]) {
|
||||
// if (index == 0 || index == list.length - 1) {
|
||||
// elem.stopTime = 0;
|
||||
// } else {
|
||||
elem.stopTime = this.stopTimeMap[elem.stationCode].parkingTime;
|
||||
// }
|
||||
} else {
|
||||
elem.stopTime = 0;
|
||||
}
|
||||
}
|
||||
// elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
if (index) {
|
||||
elem.arriveTime = formatTime(tempTime);
|
||||
} else {
|
||||
const time = tempTime || this.computedTimeByString('23:59:59') / 1000 + 1;
|
||||
elem.arriveTime = formatTime(time - elem.stopTime);
|
||||
}
|
||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
if (index > 0) {
|
||||
elem.departureTime = index == list.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
||||
elem.departureTime = formatTime(tempTime + elem.stopTime);
|
||||
// elem.departureTime = index == list.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
||||
} else {
|
||||
elem.departureTime = formatTime(tempTime);
|
||||
}
|
||||
const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.value == runLevel; });
|
||||
if (!elem.speedLevelTime || type == 'defaultSpeedLevel') {
|
||||
const realRunlevel = this.compuntedRunTime(list, index, runLevel);
|
||||
elem.speedLevelTime = realRunlevel;
|
||||
}
|
||||
elem.speedLevel = this.defaultSpeedLevel == 'l3' ? `${this.$t('planMonitor.default')}(${runLevelObj.label})` : runLevelObj.label;
|
||||
// if (!elem.speedLevelTime || type == 'defaultSpeedLevel') {
|
||||
const realRunlevel = this.compuntedRunTime(list, index, runLevel);
|
||||
elem.speedLevelTime = realRunlevel;
|
||||
// }
|
||||
// this.defaultSpeedLevel == 'l1' ? `(${runLevelObj.label})` : runLevelObj.label
|
||||
elem.speedLevel = runLevelObj.label;
|
||||
// elem.speedLevelTime = realRunlevel;
|
||||
if (index > 0) {
|
||||
tempTime = tempTime + elem.stopTime + elem.speedLevelTime;
|
||||
} else {
|
||||
@ -413,8 +450,8 @@ export default {
|
||||
this.$set(this.addModel, 'arriveConfigList', arriveConfigList);
|
||||
this.addModel.startStationCode = row.startStationCode;
|
||||
this.addModel.endStationCode = row.endStationCode;
|
||||
// this.addModel.endSectionCode = row.endSectionCode;
|
||||
// this.addModel.startSectionCode = row.startSectionCode;
|
||||
this.addModel.endSectionCode = row.endSectionCode;
|
||||
this.addModel.startSectionCode = row.startSectionCode;
|
||||
this.addModel.routingCode = row.code;
|
||||
this.computedDetailList('routingCode');
|
||||
},
|
||||
|
@ -15,9 +15,9 @@
|
||||
<el-col :span="4">
|
||||
<el-input v-model="model.serviceNumber" disabled size="mini" />
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1">
|
||||
<!-- <el-col :span="4" :offset="1">
|
||||
<el-checkbox v-model="model.debugTrain">{{ $t('planMonitor.commissioningTrain') }}</el-checkbox>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row style="margin-top: 5px">
|
||||
{{ $t('planMonitor.task') }}
|
||||
@ -82,7 +82,7 @@ export default {
|
||||
isNew:true,
|
||||
model: {
|
||||
serviceNumber: '',
|
||||
debugTrain: false,
|
||||
// debugTrain: false,
|
||||
tripConfigList: []
|
||||
}
|
||||
};
|
||||
@ -111,13 +111,14 @@ export default {
|
||||
SDTNumber: `${this.model.serviceNumber}${tripNumber}`
|
||||
};
|
||||
getRoutingBySDTNumber(model).then(resp => {
|
||||
debugger;
|
||||
const taskObj = {
|
||||
id:index + 1,
|
||||
tripNumber: tripNumber,
|
||||
startStationCode: resp.data.startStationCode,
|
||||
startTime: formatTime(trainInfo.stationTimeList[0].secondTime + 7200),
|
||||
startTime: formatTime(trainInfo.stationTimeList[1].secondTime + 7200),
|
||||
endStationCode: resp.data.endStationCode,
|
||||
endTime: formatTime(trainInfo.stationTimeList[lastIndex].secondTime + 7200),
|
||||
endTime: formatTime(trainInfo.stationTimeList[lastIndex - 1].secondTime + 7200),
|
||||
routingCode : resp.data.code,
|
||||
endSectionCode:resp.data.endSectionCode,
|
||||
startSectionCode:resp.data.startSectionCode,
|
||||
@ -150,13 +151,14 @@ export default {
|
||||
const newModel = {
|
||||
sectionCode:resp.data.parkSectionCodeList[index].sectionCode,
|
||||
stationCode:newstationTime.stationCode,
|
||||
speedLevel:'默认',
|
||||
// speedLevel:'默认',
|
||||
arriveTime: formatTime(newstationTime.arriveTime + 7200),
|
||||
departureTime: formatTime(newstationTime.departureTime + 7200),
|
||||
stopTime:newstationTime.departureTime - newstationTime.arriveTime
|
||||
};
|
||||
if (index < newstationTimeList.length - 1) {
|
||||
newModel.speedLevelTime = newstationTimeList[index + 1].arriveTime - newstationTime.departureTime;
|
||||
// newModel.speedLevel=
|
||||
}
|
||||
taskObj.arriveConfigList.push(newModel);
|
||||
});
|
||||
@ -207,7 +209,7 @@ export default {
|
||||
});
|
||||
},
|
||||
handleEditTask() {
|
||||
// if (this.currentRow.routingCode || this.currentRow.tripNumber) {
|
||||
// routingCode || this.currentRow.tripNumber
|
||||
if (this.currentRow.id) {
|
||||
this.$emit('dispatchDialog', {
|
||||
name: 'modifyingTask', params: {
|
||||
@ -287,14 +289,18 @@ export default {
|
||||
if (this.isNew) {
|
||||
if (this.model.tripConfigList.length > 0) {
|
||||
this.doClose();
|
||||
this.model.tripConfigList.map(each=>{
|
||||
each.startTime = each.arriveConfigList[0].arriveTime;
|
||||
each.endTime = each.arriveConfigList[each.arriveConfigList.length - 1].departureTime;
|
||||
});
|
||||
addPlanService(this.model).then(() => {
|
||||
this.$emit('refresh');
|
||||
// this.$emit('dispatchOperate', {
|
||||
// dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query)
|
||||
// });
|
||||
this.$message.success(this.$t('tip.planCreationSuccessful'));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.createPlanFailed'));
|
||||
}).catch((error) => {
|
||||
this.$messageBox(this.$t('tip.createPlanFailed') + error.message);
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('请增加任务');
|
||||
@ -302,6 +308,10 @@ export default {
|
||||
} else {
|
||||
if (this.model.tripConfigList.length > 0) {
|
||||
this.doClose();
|
||||
this.model.tripConfigList.map(each=>{
|
||||
each.startTime = each.arriveConfigList[0].arriveTime;
|
||||
each.endTime = each.arriveConfigList[each.arriveConfigList.length - 1].departureTime;
|
||||
});
|
||||
updatePlanService(this.loadRunPlanId, this.model.serviceNumber, this.model).then(() => {
|
||||
this.$emit('refresh');
|
||||
// this.$emit('dispatchOperate', {
|
||||
|
@ -12,7 +12,88 @@
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<!-- <el-col :span="2">
|
||||
<el-row>
|
||||
<el-col :offset="8" class="lineHeight">
|
||||
<el-checkbox v-model="editModel.trainManual">{{ $t('planMonitor.modifying.manual') }}</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="6">
|
||||
<el-row>
|
||||
<el-col :span="11" :offset="1" class="lineHeight">
|
||||
<span>{{ $t('planMonitor.modifying.defaultStopTime') }}</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-input-number v-model="defaultStopTime" placeholder="请输入时间" size="mini" :controls="false" :min="0" /> -->
|
||||
<!-- <el-select
|
||||
v-model="editModel.defaultStopTime"
|
||||
style="display: inline-black"
|
||||
size="mini"
|
||||
:placeholder="$t('planMonitor.modifying.pleaseSelect')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in defaultStopTimeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select> -->
|
||||
<!-- </el-col>
|
||||
</el-row>
|
||||
</el-col> -->
|
||||
<el-col :span="6">
|
||||
<el-row>
|
||||
<el-col :span="9" class="lineHeight">
|
||||
<span>{{ $t('planMonitor.modifying.serviceNumber') }}</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-input v-model="serviceNumber" size="mini" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<!-- <el-col :span="7" class="lineHeight">
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="2">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="editModel.clearGuest">{{ $t('planMonitor.modifying.clearGuest') }}</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-checkbox v-model="editModel.continuationPlan">{{ $t('planMonitor.modifying.continuationPlan') }}</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="editModel.firstTrain">{{ $t('planMonitor.modifying.firstTrain') }}</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col> -->
|
||||
<el-col :span="6" class="lineHeight">
|
||||
<el-row>
|
||||
<el-col :span="10" :offset="1">
|
||||
<span>{{ $t('planMonitor.modifying.defaultRunLevel') }}</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select
|
||||
v-model="defaultSpeedLevel"
|
||||
style="display: inline-black"
|
||||
size="mini"
|
||||
:placeholder="$t('planMonitor.modifying.pleaseSelect')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in defaultSpeedLevelList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-row>
|
||||
<el-col :span="9" class="lineHeight">
|
||||
<span>{{ $t('planMonitor.modifying.tripNumber') }}</span>
|
||||
@ -29,72 +110,13 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-row>
|
||||
<el-col :offset="8" class="lineHeight">
|
||||
<el-checkbox v-model="editModel.trainManual">{{ $t('planMonitor.modifying.manual') }}</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-row>
|
||||
<el-col :span="11" :offset="1" class="lineHeight">
|
||||
<span>{{ $t('planMonitor.modifying.defaultStopTime') }}</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-input-number v-model="defaultStopTime" placeholder="请输入时间" size="mini" :controls="false" :min="0" />
|
||||
<!-- <el-select
|
||||
v-model="editModel.defaultStopTime"
|
||||
style="display: inline-black"
|
||||
size="mini"
|
||||
:placeholder="$t('planMonitor.modifying.pleaseSelect')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in defaultStopTimeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-row>
|
||||
<el-col :span="9" :offset="2" class="lineHeight">
|
||||
<span>{{ $t('planMonitor.modifying.serviceNumber') }}</span>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-input v-model="serviceNumber" size="mini" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="7" class="lineHeight">
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="2">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="editModel.clearGuest">{{ $t('planMonitor.modifying.clearGuest') }}</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-checkbox v-model="editModel.continuationPlan">{{ $t('planMonitor.modifying.continuationPlan') }}</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-checkbox v-model="editModel.firstTrain">{{ $t('planMonitor.modifying.firstTrain') }}</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<!-- <el-col :span="6">
|
||||
<el-row>
|
||||
<el-col :span="9" class="lineHeight">
|
||||
<span>{{ $t('planMonitor.modifying.serialNumber') }}</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-select v-model="editModel.serialNumber" size="mini" style="display: inline-black" :placeholder="$t('planMonitor.modifying.pleaseSelect')">
|
||||
<el-select v-model="editModel.serialNumber" size="mini" style="display: inline-black" disabled :placeholder="$t('planMonitor.modifying.pleaseSelect')">
|
||||
<el-option
|
||||
v-for="item in serialNumberList"
|
||||
:key="item.value"
|
||||
@ -104,42 +126,20 @@
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="2">
|
||||
<el-row>
|
||||
<el-col :offset="8" class="lineHeight">
|
||||
<el-checkbox v-model="editModel.serialManual" size="mini">{{ $t('planMonitor.modifying.manual') }}</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="6" class="lineHeight">
|
||||
<el-row>
|
||||
<el-col :span="11" :offset="1">
|
||||
<span>{{ $t('planMonitor.modifying.defaultRunLevel') }}</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select
|
||||
v-model="editModel.defaultSpeedLevel"
|
||||
style="display: inline-black"
|
||||
size="mini"
|
||||
:placeholder="$t('planMonitor.modifying.pleaseSelect')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in defaultSpeedLevelList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5" class="lineHeight">
|
||||
<el-row>
|
||||
<el-col :span="9" :offset="2">
|
||||
<el-col :span="10" :offset="1">
|
||||
<span>{{ $t('planMonitor.modifying.startTime') }}:</span>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-col :span="12">
|
||||
<el-time-picker
|
||||
v-model="editModel.startTime"
|
||||
:placeholder="$t('planMonitor.modifying.selectTime')"
|
||||
@ -150,7 +150,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="7" class="lineHeight">
|
||||
<!-- <el-col :span="7" class="lineHeight">
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="2">
|
||||
<el-row>
|
||||
@ -166,7 +166,7 @@
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 5px;">
|
||||
{{ $t('planMonitor.modifying.route') }}
|
||||
@ -212,27 +212,37 @@
|
||||
{{ formatName(scope.row.sectionCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="arriveTime" :label="this.$t('planMonitor.arriveTime')" />
|
||||
<!-- prop="stopTime" -->
|
||||
<el-table-column :label="this.$t('planMonitor.stopTime')">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.stopTime" placeholder="请输入时间" size="mini" @input="changeStopTime(scope.$index, scope.row.stopTime)" />
|
||||
<el-table-column :label="this.$t('planMonitor.arriveTime')">
|
||||
<template v-if="scope.$index!=0" slot-scope="scope">
|
||||
{{ scope.row.arriveTime }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- prop="stopTime" -->
|
||||
<el-table-column :label="this.$t('planMonitor.stopTime')">
|
||||
<template v-if="scope.$index!=0&&scope.$index!=editModel.arriveConfigList.length-1" slot-scope="scope">
|
||||
{{ scope.row.stopTime+'s' }}
|
||||
<!-- <el-input v-model="scope.row.stopTime" placeholder="请输入时间" size="mini" @input="changeStopTime(scope.$index, scope.row.stopTime)" /> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="this.$t('planMonitor.departureTime')">
|
||||
<template v-if="scope.$index!=editModel.arriveConfigList.length-1" slot-scope="scope">
|
||||
{{ scope.row.departureTime }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="departureTime" :label="this.$t('planMonitor.departureTime')" />
|
||||
<el-table-column :label="this.$t('planMonitor.runLevel')">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.speedLevel }}
|
||||
<el-input v-model="scope.row.speedLevelTime" placeholder="请输入运行等级" size="mini" @input="changeSpeedLevelTime(scope.$index, scope.row.speedLevelTime)" />
|
||||
<span style="font-size:13px;"> {{ scope.row.speedLevel }}</span>
|
||||
<span>{{ '('+scope.row.speedLevelTime+'s)' }}</span>
|
||||
<!-- <el-input v-model="scope.row.speedLevelTime" placeholder="请输入运行等级" size="mini" @input="changeSpeedLevelTime(scope.$index, scope.row.speedLevelTime)" /> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<!-- <el-row>
|
||||
<el-col :offset="16">
|
||||
<el-checkbox v-model="editModel.default">{{ $t('planMonitor.modifying.showDefaultTime') }}</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
||||
@ -240,7 +250,7 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { getRoutingBySDTNumber, updatePlanTrip, getMapStationRun } from '@/api/runplan';
|
||||
import { getRoutingBySDTNumber, updatePlanTrip, getMapStationRunUser, getStationStopTime } from '@/api/runplan';
|
||||
import { formatTime, formatName } from '@/utils/runPlan';
|
||||
|
||||
export default {
|
||||
@ -263,8 +273,9 @@ export default {
|
||||
PlanConvert: {},
|
||||
parkSectionCodeList:[],
|
||||
stopStationMap: {},
|
||||
defaultStopTime: 0,
|
||||
defaultSpeedLevel: 'l3',
|
||||
stopTimeMap:{},
|
||||
// defaultStopTime: 0,
|
||||
defaultSpeedLevel: 'l1',
|
||||
routingList: [],
|
||||
tripNumber: '',
|
||||
serviceNumber: '',
|
||||
@ -289,7 +300,7 @@ export default {
|
||||
tripNumberList: [{ value: '', label: this.$t('planMonitor.modifying.automatic') }],
|
||||
// defaultStopTimeList: [{ value: '', label: this.$t('planMonitor.modifying.default') }],
|
||||
// defaultSpeedLevelList: [{ value: '', label: this.$t('planMonitor.modifying.default') }],
|
||||
serialNumberList: [],
|
||||
// serialNumberList: [],
|
||||
defaultSpeedLevelList: [
|
||||
{ value: 'l1', label: '等级一' },
|
||||
{ value: 'l2', label: '等级二' },
|
||||
@ -308,9 +319,9 @@ export default {
|
||||
'editModel.startTime': function () {
|
||||
this.computedDetailList();
|
||||
},
|
||||
'defaultStopTime': function () {
|
||||
this.computedDetailList('defaultStopTime');
|
||||
},
|
||||
// 'defaultStopTime': function () {
|
||||
// this.computedDetailList('defaultStopTime');
|
||||
// },
|
||||
'defaultSpeedLevel': function () {
|
||||
this.computedDetailList('defaultSpeedLevel');
|
||||
}
|
||||
@ -334,35 +345,50 @@ export default {
|
||||
if (stopStationObj) {
|
||||
if (stopStationObj.runPlanLevelVO) {
|
||||
runTime = parseInt(stopStationObj.runPlanLevelVO[runLevel]);
|
||||
} else if (stopStationObj['l3']) {
|
||||
runTime = parseInt(stopStationObj['l3']);
|
||||
} else if (stopStationObj[runLevel]) {
|
||||
runTime = parseInt(stopStationObj[runLevel]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return runTime;
|
||||
},
|
||||
computedDetailList(type = null) {
|
||||
if (this.editModel.routingCode) {
|
||||
const list = Object.assign([], this.editModel.arriveConfigList);
|
||||
let tempTime = this.computedTimeByString(this.editModel.startTime) / 1000;
|
||||
const runLevel = this.defaultSpeedLevel || 'l3'; // 默认等级三
|
||||
const runLevel = this.defaultSpeedLevel || 'l1'; // 默认等级三
|
||||
list.forEach((elem, index) => {
|
||||
if (type == 'defaultStopTime' || type == 'routingCode') {
|
||||
elem.stopTime = parseInt(this.defaultStopTime);
|
||||
// type == 'defaultStopTime' ||
|
||||
if (type == 'routingCode') {
|
||||
// elem.stopTime = parseInt(this.defaultStopTime);
|
||||
if (this.stopTimeMap[elem.stationCode]) {
|
||||
elem.stopTime = this.stopTimeMap[elem.stationCode].parkingTime;
|
||||
} else {
|
||||
elem.stopTime = 0;
|
||||
}
|
||||
}
|
||||
// elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
if (index) {
|
||||
elem.arriveTime = formatTime(tempTime);
|
||||
} else {
|
||||
const time = tempTime || this.computedTimeByString('23:59:59') / 1000 + 1;
|
||||
elem.arriveTime = formatTime(time - elem.stopTime);
|
||||
}
|
||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
if (index > 0) {
|
||||
elem.departureTime = index == list.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
||||
// elem.departureTime = index == list.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
||||
elem.departureTime = formatTime(tempTime + elem.stopTime);
|
||||
} else {
|
||||
elem.departureTime = formatTime(tempTime);
|
||||
}
|
||||
const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.value == runLevel; });
|
||||
if (!elem.speedLevelTime || type == 'defaultSpeedLevel') {
|
||||
const realRunlevel = this.compuntedRunTime(list, index, runLevel);
|
||||
elem.speedLevelTime = realRunlevel;
|
||||
}
|
||||
elem.speedLevel = this.defaultSpeedLevel == 'l3' ? `${this.$t('planMonitor.default')}(${runLevelObj.label})` : runLevelObj.label;
|
||||
// if (!elem.speedLevelTime || type == 'defaultSpeedLevel') {
|
||||
const realRunlevel = this.compuntedRunTime(list, index, runLevel);
|
||||
elem.speedLevelTime = realRunlevel;
|
||||
// }
|
||||
// this.defaultSpeedLevel == 'l1' ? `(${runLevelObj.label})` : runLevelObj.label
|
||||
elem.speedLevel = runLevelObj.label;
|
||||
// elem.speedLevelTime = realRunlevel;
|
||||
|
||||
if (index > 0) {
|
||||
tempTime = tempTime + elem.stopTime + elem.speedLevelTime;
|
||||
} else {
|
||||
@ -382,34 +408,46 @@ export default {
|
||||
this.planId = this.loadRunPlanId;
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(lineCode);
|
||||
if (mapId) {
|
||||
getMapStationRun(mapId).then(resp => {
|
||||
const list = resp.data;
|
||||
getMapStationRunUser(mapId).then(resp => {
|
||||
const list = resp.data.list;
|
||||
list.forEach(elem => {
|
||||
this.stopStationMap[[elem.startSectionCode, elem.endSectionCode].toString()] = elem;
|
||||
});
|
||||
getStationStopTime(mapId).then(response=>{
|
||||
const stopTimeList = response.data.list;
|
||||
stopTimeList.forEach(element=>{
|
||||
this.stopTimeMap[element.stationCode] = {parkingTime:element.parkingTime};
|
||||
});
|
||||
this.initTaskData(params);
|
||||
|
||||
this.dialogShow = true;
|
||||
});
|
||||
});
|
||||
}
|
||||
// this.routingList
|
||||
},
|
||||
initTaskData(params) {
|
||||
if (params.rowData && params.rowData.arriveConfigList.length > 0) {
|
||||
this.editModel.arriveConfigList = params.rowData.arriveConfigList;
|
||||
this.editModel.routingCode = params.rowData.routingCode;
|
||||
this.editModel.startStationCode = params.rowData.startStationCode;
|
||||
this.editModel.endStationCode = params.rowData.endStationCode;
|
||||
this.editModel.startTime = params.rowData.startTime;
|
||||
this.editModel.endTime = params.rowData.endTime;
|
||||
this.editModel.endSectionCode = params.rowData.endSectionCode;
|
||||
this.editModel.startSectionCode = params.rowData.startSectionCode;
|
||||
this.editModel.id = params.rowData.id;
|
||||
const paramData = params.rowData;
|
||||
this.initRunlevel(paramData);
|
||||
// const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.label == ; });
|
||||
this.editModel.arriveConfigList = paramData.arriveConfigList;
|
||||
this.editModel.routingCode = paramData.routingCode;
|
||||
this.editModel.startStationCode = paramData.startStationCode;
|
||||
this.editModel.endStationCode = paramData.endStationCode;
|
||||
this.editModel.startTime = paramData.startTime;
|
||||
this.editModel.endTime = paramData.endTime;
|
||||
this.editModel.endSectionCode = paramData.endSectionCode;
|
||||
this.editModel.startSectionCode = paramData.startSectionCode;
|
||||
this.editModel.id = paramData.id;
|
||||
this.routingList = [];
|
||||
this.routingList.push({
|
||||
code:params.rowData.routingCode,
|
||||
startStationCode:params.rowData.startStationCode,
|
||||
endStationCode:params.rowData.endStationCode,
|
||||
endSectionCode:params.rowData.endSectionCode,
|
||||
startSectionCode:params.rowData.startSectionCode
|
||||
code:paramData.routingCode,
|
||||
startStationCode:paramData.startStationCode,
|
||||
endStationCode:paramData.endStationCode,
|
||||
endSectionCode:paramData.endSectionCode,
|
||||
startSectionCode:paramData.startSectionCode
|
||||
});
|
||||
this.computedDetailList();
|
||||
this.dialogShow = true;
|
||||
} else {
|
||||
const model = {
|
||||
planId: this.loadRunPlanId,
|
||||
@ -467,7 +505,7 @@ export default {
|
||||
const newModel = {
|
||||
sectionCode:resp.data.parkSectionCodeList[index].sectionCode,
|
||||
stationCode:newstationTime.stationCode,
|
||||
speedLevel:'默认',
|
||||
// speedLevel:'默认',
|
||||
arriveTime: formatTime(newstationTime.arriveTime + 7200),
|
||||
departureTime: formatTime(newstationTime.departureTime + 7200),
|
||||
stopTime:newstationTime.departureTime - newstationTime.arriveTime
|
||||
@ -477,58 +515,88 @@ export default {
|
||||
}
|
||||
this.editModel.arriveConfigList.push(newModel);
|
||||
});
|
||||
this.initRunlevel(this.editModel);
|
||||
this.dialogShow = true;
|
||||
this.computedDetailList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
changeStopTime(indexs, time) {
|
||||
let tempTime = this.computedTimeByString(this.editModel.startTime) / 1000;
|
||||
// const runLevel = this.defaultSpeedLevel || 'l3'; // 默认等级三
|
||||
const arriveConfigList = Object.assign([], this.editModel.arriveConfigList);
|
||||
arriveConfigList.forEach((elem, index) => {
|
||||
if (index == indexs) { elem.stopTime = time ? Number(time) : 0; }
|
||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
// const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.value == runLevel; });
|
||||
// elem.speedLevel = this.defaultSpeedLevel == 'l3' ? `${this.$t('planMonitor.default')}(${runLevelObj.label})` : runLevelObj.label;
|
||||
if (index > 0) {
|
||||
elem.departureTime = index == arriveConfigList.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
||||
} else {
|
||||
elem.departureTime = formatTime(tempTime);
|
||||
}
|
||||
const realRunlevel = elem.speedLevelTime;
|
||||
if (index > 0) {
|
||||
tempTime = tempTime + elem.stopTime + realRunlevel;
|
||||
} else {
|
||||
tempTime = tempTime + realRunlevel;
|
||||
}
|
||||
});
|
||||
this.editModel.arriveConfigList = arriveConfigList;
|
||||
this.editModel.endTime = formatTime(tempTime - this.editModel.arriveConfigList[this.editModel.arriveConfigList.length - 1].stopTime);
|
||||
},
|
||||
changeSpeedLevelTime(indexs, speedLevelTime) {
|
||||
const arriveConfigList = Object.assign([], this.editModel.arriveConfigList);
|
||||
let tempTime = this.computedTimeByString(this.editModel.startTime) / 1000;
|
||||
arriveConfigList.forEach((elem, index) => {
|
||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
if (index == indexs) { elem.speedLevelTime = speedLevelTime ? Number(speedLevelTime) : 0; }
|
||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
if (index > 0) {
|
||||
elem.departureTime = index == arriveConfigList.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
||||
} else {
|
||||
elem.departureTime = formatTime(tempTime);
|
||||
}
|
||||
const realRunlevel = elem.speedLevelTime;
|
||||
if (index > 0) {
|
||||
tempTime = tempTime + elem.stopTime + realRunlevel;
|
||||
} else {
|
||||
tempTime = tempTime + realRunlevel;
|
||||
}
|
||||
});
|
||||
this.editModel.arriveConfigList = arriveConfigList;
|
||||
this.editModel.endTime = formatTime(tempTime - this.editModel.arriveConfigList[this.editModel.arriveConfigList.length - 1].stopTime);
|
||||
initRunlevel(paramData) {
|
||||
const speedLevelData = this.stopStationMap[[paramData.arriveConfigList[0].sectionCode, paramData.arriveConfigList[1].sectionCode].toString()];
|
||||
switch (paramData.arriveConfigList[0].speedLevelTime) {
|
||||
case speedLevelData.l1: {
|
||||
this.defaultSpeedLevel = 'l1';
|
||||
break;
|
||||
}
|
||||
case speedLevelData.l2: {
|
||||
this.defaultSpeedLevel = 'l2';
|
||||
break;
|
||||
}
|
||||
case speedLevelData.l3: {
|
||||
this.defaultSpeedLevel = 'l3';
|
||||
break;
|
||||
}
|
||||
case speedLevelData.l4: {
|
||||
this.defaultSpeedLevel = 'l4';
|
||||
break;
|
||||
}
|
||||
case speedLevelData.l5: {
|
||||
this.defaultSpeedLevel = 'l5';
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
this.defaultSpeedLevel = 'l1';
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
// changeStopTime(indexs, time) {
|
||||
// let tempTime = this.computedTimeByString(this.editModel.startTime) / 1000;
|
||||
// // const runLevel = this.defaultSpeedLevel || 'l3'; // 默认等级三
|
||||
// const arriveConfigList = Object.assign([], this.editModel.arriveConfigList);
|
||||
// arriveConfigList.forEach((elem, index) => {
|
||||
// if (index == indexs) { elem.stopTime = time ? Number(time) : 0; }
|
||||
// elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
// // const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.value == runLevel; });
|
||||
// // elem.speedLevel = this.defaultSpeedLevel == 'l3' ? `${this.$t('planMonitor.default')}(${runLevelObj.label})` : runLevelObj.label;
|
||||
// if (index > 0) {
|
||||
// elem.departureTime = index == arriveConfigList.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
||||
// } else {
|
||||
// elem.departureTime = formatTime(tempTime);
|
||||
// }
|
||||
// const realRunlevel = elem.speedLevelTime;
|
||||
// if (index > 0) {
|
||||
// tempTime = tempTime + elem.stopTime + realRunlevel;
|
||||
// } else {
|
||||
// tempTime = tempTime + realRunlevel;
|
||||
// }
|
||||
// });
|
||||
// this.editModel.arriveConfigList = arriveConfigList;
|
||||
// this.editModel.endTime = formatTime(tempTime - this.editModel.arriveConfigList[this.editModel.arriveConfigList.length - 1].stopTime);
|
||||
// },
|
||||
// changeSpeedLevelTime(indexs, speedLevelTime) {
|
||||
// const arriveConfigList = Object.assign([], this.editModel.arriveConfigList);
|
||||
// let tempTime = this.computedTimeByString(this.editModel.startTime) / 1000;
|
||||
// arriveConfigList.forEach((elem, index) => {
|
||||
// elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
// if (index == indexs) { elem.speedLevelTime = speedLevelTime ? Number(speedLevelTime) : 0; }
|
||||
// elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
// if (index > 0) {
|
||||
// elem.departureTime = index == arriveConfigList.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
||||
// } else {
|
||||
// elem.departureTime = formatTime(tempTime);
|
||||
// }
|
||||
// const realRunlevel = elem.speedLevelTime;
|
||||
// if (index > 0) {
|
||||
// tempTime = tempTime + elem.stopTime + realRunlevel;
|
||||
// } else {
|
||||
// tempTime = tempTime + realRunlevel;
|
||||
// }
|
||||
// });
|
||||
// this.editModel.arriveConfigList = arriveConfigList;
|
||||
// this.editModel.endTime = formatTime(tempTime - this.editModel.arriveConfigList[this.editModel.arriveConfigList.length - 1].stopTime);
|
||||
// },
|
||||
doShow(params) {
|
||||
this.loadInitData(params);
|
||||
},
|
||||
@ -541,8 +609,10 @@ export default {
|
||||
planId: this.loadRunPlanId,
|
||||
routingCode: this.editModel.routingCode,
|
||||
tripNumber: this.tripNumber,
|
||||
startTime: this.editModel.startTime,
|
||||
endTime: this.editModel.endTime,
|
||||
// startTime: this.editModel.startTime,
|
||||
startTime:this.editModel.arriveConfigList[0].arriveTime,
|
||||
// endTime: this.editModel.endTime,
|
||||
endTime: this.editModel.arriveConfigList[this.editModel.arriveConfigList.length - 1].departureTime,
|
||||
arriveConfigList: this.editModel.arriveConfigList,
|
||||
SDTNumber: `${this.serviceNumber}${this.tripNumber}`
|
||||
};
|
||||
|
@ -1,15 +1,18 @@
|
||||
<template>
|
||||
<div class="PlanStatusBar">
|
||||
<ul class="ul-box">
|
||||
<div v-if="isNotUser" class="li_plan" @click="showTrain">{{ $t('planMonitor.serviceAndTripNumber') }}</div>
|
||||
</ul>
|
||||
<ul class="ul-box">
|
||||
<div v-if="isNotUser" class="li_plan" @click="handleAddPlanningTrain">{{ $t('planMonitor.addPlan') }}</div>
|
||||
<div v-if="isNotUser" class="li_plan" @click="handleDeletePlanningTrain">{{ $t('planMonitor.deletePlan') }}</div>
|
||||
<div v-if="isNotUser" class="li_plan" @click="handleDuplicateTrain">{{ $t('planMonitor.duplicatePlan') }}</div>
|
||||
<div v-if="isNotUser" class="li_plan" @click="handleAddTask">{{ $t('planMonitor.addTask') }}</div>
|
||||
<div v-if="isNotUser" class="li_plan" @click="handleDeleteTask">{{ $t('planMonitor.deleteTask') }}</div>
|
||||
<div v-if="isNotUser" class="li_plan" @click="handleModifyingTask">{{ $t('planMonitor.modifyTask') }}</div>
|
||||
<!-- v-if="isNotUser" -->
|
||||
<div class="li_plan" @click="showTrain">{{ $t('planMonitor.serviceAndTripNumber') }}</div>
|
||||
<div class="li_plan" @click="handleGernaratePlanningTrain">{{ $t('planMonitor.gerneratePlan') }}</div>
|
||||
|
||||
<!-- <ul class="ul-box"> -->
|
||||
<div class="li_plan" @click="handleAddPlanningTrain">{{ $t('planMonitor.addPlan') }}</div>
|
||||
<div class="li_plan" @click="handleDeletePlanningTrain">{{ $t('planMonitor.deletePlan') }}</div>
|
||||
<div class="li_plan" @click="handleDuplicateTrain">{{ $t('planMonitor.duplicatePlan') }}</div>
|
||||
<div class="li_plan" @click="handleAddTask">{{ $t('planMonitor.addTask') }}</div>
|
||||
<div class="li_plan" @click="handleDeleteTask">{{ $t('planMonitor.deleteTask') }}</div>
|
||||
<div class="li_plan" @click="handleModifyingTask">{{ $t('planMonitor.modifyTask') }}</div>
|
||||
<!-- </ul> -->
|
||||
</ul>
|
||||
<ul class="ul-box tool">
|
||||
<div class="li_plan" @click="handlePlanEffectiveCheck">{{ $t('planMonitor.validityCheck') }}</div>
|
||||
@ -20,8 +23,8 @@
|
||||
|
||||
<script>
|
||||
import { planEffectiveCheck, runPlanNotify } from '@/api/runplan';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
// import { launchFullscreen } from '@/utils/screen';
|
||||
// import { UrlConfig } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'PlanStatusBar',
|
||||
@ -35,19 +38,19 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isNotUser: true
|
||||
// isNotUser: true
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
created() {
|
||||
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
|
||||
this.isNotUser = false;
|
||||
} else {
|
||||
this.isNotUser = true;
|
||||
}
|
||||
},
|
||||
// created() {
|
||||
// if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
|
||||
// this.isNotUser = false;
|
||||
// } else {
|
||||
// this.isNotUser = true;
|
||||
// }
|
||||
// },
|
||||
methods: {
|
||||
showTrain() {
|
||||
this.$emit('showTrain');
|
||||
@ -136,6 +139,14 @@ export default {
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
|
||||
}
|
||||
},
|
||||
handleGernaratePlanningTrain() {
|
||||
const planId = this.$route.query.planId || this.loadRunPlanId;
|
||||
if (planId) {
|
||||
this.$emit('dispatchDialog', { name: 'gernaratePlanTrain', params: {} });
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
|
||||
}
|
||||
}
|
||||
// 测试运行图
|
||||
// async handleTestRunPlan() {
|
||||
|
@ -113,7 +113,7 @@ export default {
|
||||
title: '归属项目',
|
||||
prop: 'projectCode',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return row.project ? this.$convertField(row.projectCode.toLowerCase(), ProjectList, ['value', 'label']) : '无'; },
|
||||
columnValue: (row) => { return row.project ? this.$convertField((row.projectCode || '').toLowerCase(), ProjectList, ['value', 'label']) : '无'; },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user