更换折返方式枚举

This commit is contained in:
fan 2021-06-29 13:53:39 +08:00
parent bd962d5320
commit 53041725ac
9 changed files with 25 additions and 41 deletions

View File

@ -134,13 +134,6 @@ deviceState[deviceType.StationStand] = {
parkingTime: 0, // 站台停车时间 自动为0
num:0, // 站台上等车人数
// /** 折返策略*/
// reentryStrategy: {
// Default: '01', /** 默认(缺省值)*/
// State01: '01', /** 无折返策略 */
// State02: '02', /** 无人折返 */
// State03: '03', /** 自动换端 */
// State04: '04' /** 默认 */
// },
/** 是否故障*/
fault: 0 /** 非故障*/
};

View File

@ -63,17 +63,17 @@ class EReentry extends Group {
reentryStrategy = model.defaultReentryStrategy;
}
switch (reentryStrategy) {
case '04': /** 默认*/
case '01': {
case 'DEFAULT': /** 默认*/
case 'NONE': {
this.reentry && this.reentry.hideMode(); /** 无折返策略*/
break;
}
case '02': {
case 'UNMANNED': {
this.showMode(); /** 无人折返*/
this.setColor(style.StationStand.reentry.noHumanColor);
break;
}
case '03':/** 自动换端*/ {
case 'AUTO':/** 自动换端*/ {
this.showMode();
this.setColor(style.StationStand.reentry.autoChangeEndsColor);
break;

View File

@ -68,6 +68,7 @@ import { MapDeviceType } from '@/scripts/cmdPlugin/Config';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { TurnBackTypeMap } from '@/scripts/ConstDic';
export default {
name: 'StandDetail',
@ -81,12 +82,7 @@ export default {
tempData: [],
stationName: '',
standName: '',
strategyMap: {
'01': '无折返',
'02': '无人折返',
'03': '自动换端',
'04': '默认'
},
strategyMap: TurnBackTypeMap,
treeData: [
{
children: [
@ -232,7 +228,7 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},

View File

@ -92,12 +92,6 @@ export default {
tempData: [],
stationName: '',
standName: '',
strategyMap: {
'01': '无折返',
'02': '无人折返',
'03': '自动换端',
'04': '默认'
},
runLevelList: [
'自动',
'低速',

View File

@ -62,12 +62,6 @@ export default {
dialogShow: false,
loading: false,
tempData: [],
strategyMap: {
'01': '无折返',
'02': '无人折返',
'03': '自动换端',
'04': '默认'
},
treeData: [
{
children: [

View File

@ -92,12 +92,6 @@ export default {
tempData: [],
stationName: '',
standName: '',
strategyMap: {
'01': '无折返',
'02': '无人折返',
'03': '自动换端',
'04': '默认'
},
runLevelList: [
'自动',
'低速',

View File

@ -227,6 +227,12 @@ export default {
{ label: '每日加载', value:'EVERY_DAY' },
{ label: '周内加载', value: 'WITHIN_A_WEEK' },
{ label: '周末加载', value: 'WEEKEND' }
],
turnBackTypeList: [
{ label: '无折返', value: 'NONE' },
{ label: '默认', value: 'DEFAULT' },
{ label: '自动换端', value: 'AUTO' },
{ label: '无人折返', value: 'UNMANNED' }
]
}
};

View File

@ -1,3 +1,12 @@
/**
* 折返类型
*/
export const TurnBackTypeMap = {
NONE: '无折返',
DEFAULT: '默认',
AUTO: '自动换端',
UNMANNED: '无人折返'
};
/**
* 图纸类型
*/

View File

@ -41,6 +41,7 @@
<script>
import { mapGetters } from 'vuex';
import { getUID } from '@/jmapNew/utils/Uid';
import ConstConfig from '@/scripts/ConstConfig';
import CreateOperate from './components/createOperate';
import OperateProperty from './components/operateProperty';
import { deepAssign } from '@/utils/index';
@ -74,10 +75,7 @@ export default {
{ code: false, name: '向左'},
{ code: true, name: '向右'}
],
reentryStrategyList: [
{ code: '02', name: '自动无人折返'},
{ code: '03', name: '自动换端'}
],
reentryStrategyList: ConstConfig.ConstSelect.turnBackTypeList,
editModel: getModel('StationStand'),
field: '',
addModel: {
@ -126,7 +124,7 @@ export default {
{ prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px' },
{ prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'stationStandCode', buttonShowType: this.stationStandCodeShow },
{ prop: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList },
{ prop: 'defaultReentryStrategy', label: '默认折返策略:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.reentryStrategyList },
{ prop: 'defaultReentryStrategy', label: '默认折返策略:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.reentryStrategyList },
{ prop: 'small', label: '是否小型站台:', type: 'checkbox', disabled: true },
{ prop: 'inside', label: '是否内站台:', type: 'checkbox' },
{ prop: 'stopJumpLamp', label: '跳停按钮:', type: 'checkbox'},