This commit is contained in:
zyy 2020-04-29 11:23:08 +08:00
commit c9e3920461
5 changed files with 104 additions and 73 deletions

View File

@ -241,7 +241,12 @@ export default {
},
{
label: '列车报警确认',
handler: this.undeveloped
children: [
{
label: '完整性报警确认',
handler: this.undeveloped
}
]
},
{
label: '更新列车计划',

View File

@ -410,7 +410,7 @@ export default {
setShowMode(showMode) {
if (this.showMode !== showMode) {
this.setShowStation('');
this.$refs.switchStation.inintShowStation();
this.localStationShow && this.$refs.switchStation.inintShowStation();
}
this.showMode = showMode;
const nameList = Object.keys(this.$store.state.map.map || {});

View File

@ -118,8 +118,8 @@
<el-form-item label="侧防列表:">
<el-select v-model="addModel.flankProtectionList" clearable multiple filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in flankProtectList"
:key="item.code"
v-for="(item,index) in flankProtectList"
:key="index"
:label="`${item.number}-${item.name}`"
:value="item.code"
/>

View File

@ -502,6 +502,8 @@ export default {
}
.back_box{
left: 150px;
display: inline-block;
width: 57px;
}
.map-draft{

View File

@ -1,72 +1,76 @@
<template>
<div v-show="dialogVisible">
<el-dialog v-dialogDrag title="配置项" :visible.sync="dialogVisible" width="550px" :before-close="handleClose" center :close-on-click-modal="false" :z-index="2000">
<el-card>
<div slot="header" style="font-weight: bold;text-align: center;">
<span>通用配置项</span>
</div>
<el-table :data="generalData" style="width: 100%;" height="200">
<el-table-column prop="configKey" label="key" width="300px" />
<el-table-column prop="configValue" label="value">
<template slot-scope="scope">
<div v-if="scope.row.type === 'input'">
<div v-if="!scope.row.focus" style="width: 100%;cursor: pointer;" @click="changeFocus(scope.row, '1')">{{ scope.row.configValue }}</div>
<el-input v-if="scope.row.focus" v-model="scope.row.configValue" size="mini" style="width: 100%" @blur="changeFocus(scope.row, '0')" />
</div>
<div v-else-if="scope.row.type === 'number'">
<div v-if="!scope.row.focus" style="width: 100%;cursor: pointer" @click="changeFocus(scope.row, '1')">{{ scope.row.configValue }}</div>
<el-input-number v-if="scope.row.focus" v-model="scope.row.configValue" size="mini" style="width: 100px;" :min="0" controls-position="right" @blur="changeFocus(scope.row, '0')" />
</div>
<div v-else-if="scope.row.type === 'boolean'">
<el-checkbox v-model="scope.row.configValue">{{ scope.row.configValue }}</el-checkbox>
</div>
<div v-else-if="scope.row.type === 'select'">
<el-select v-model="scope.row.configValue" size="mini" style="width: 80px;">
<el-option
v-for="item in scope.row.options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card style="margin-top: 10px">
<div slot="header" style="font-weight: bold;text-align: center;">
<span>联锁配置项</span>
</div>
<el-table :data="roadData" style="width: 100%;" height="200">
<el-table-column prop="configKey" label="key" width="300px" />
<el-table-column prop="configValue" label="value">
<template slot-scope="scope">
<div v-if="scope.row.type === 'input'">
<div v-if="!scope.row.focus" style="width: 100%;cursor: pointer;" @click="changeFocus(scope.row, '1')">{{ scope.row.configValue }}</div>
<el-input v-if="scope.row.focus" v-model="scope.row.configValue" size="mini" style="width: 100%" @blur="changeFocus(scope.row, '0')" />
</div>
<div v-else-if="scope.row.type === 'number'">
<div v-if="!scope.row.focus" style="width: 100%;cursor: pointer" @click="changeFocus(scope.row, '1')">{{ scope.row.configValue }}</div>
<el-input-number v-if="scope.row.focus" v-model="scope.row.configValue" size="mini" style="width: 100px;" :min="0" controls-position="right" @blur="changeFocus(scope.row, '0')" />
</div>
<div v-else-if="scope.row.type === 'boolean'">
<el-checkbox v-model="scope.row.configValue">{{ scope.row.configValue }}</el-checkbox>
</div>
<div v-else-if="scope.row.type === 'select'">
<el-select v-model="scope.row.configValue" size="mini" style="width: 80px;">
<el-option
v-for="item in scope.row.options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog v-dialogDrag title="配置项" :visible.sync="dialogVisible" fullscreen :before-close="handleClose" center :close-on-click-modal="false" :z-index="2000">
<div style="overflow-y: scroll;" :style="{height: height+ 'px'}">
<el-card>
<div slot="header" style="font-weight: bold;text-align: center;">
<span>通用配置项</span>
</div>
<el-table :data="generalData" style="width: 100%;">
<el-table-column prop="configKey" label="key" />
<el-table-column prop="configValue" label="value">
<template slot-scope="scope">
<div v-if="scope.row.type === 'input'">
<div v-if="!scope.row.focus" style="width: 100%;cursor: pointer;" @click="changeFocus(scope.row, '1')">{{ scope.row.configValue }}</div>
<el-input v-if="scope.row.focus" v-model="scope.row.configValue" size="mini" style="width: 100%" @blur="changeFocus(scope.row, '0')" />
</div>
<div v-else-if="scope.row.type === 'number'">
<div v-if="!scope.row.focus" style="width: 100%;cursor: pointer" @click="changeFocus(scope.row, '1')">{{ scope.row.configValue }}</div>
<el-input-number v-if="scope.row.focus" v-model="scope.row.configValue" size="mini" style="width: 100px;" :min="0" controls-position="right" @blur="changeFocus(scope.row, '0')" />
</div>
<div v-else-if="scope.row.type === 'boolean'">
<el-checkbox v-model="scope.row.configValue">{{ scope.row.configValue }}</el-checkbox>
</div>
<div v-else-if="scope.row.type === 'select'">
<el-select v-model="scope.row.configValue" size="mini" style="width: 80px;">
<el-option
v-for="item in scope.row.options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</template>
</el-table-column>
<el-table-column prop="remark" label="描述" />
</el-table>
</el-card>
<el-card style="margin-top: 10px">
<div slot="header" style="font-weight: bold;text-align: center;">
<span>联锁配置项</span>
</div>
<el-table :data="roadData" style="width: 100%;">
<el-table-column prop="configKey" label="key" />
<el-table-column prop="configValue" label="value">
<template slot-scope="scope">
<div v-if="scope.row.type === 'input'">
<div v-if="!scope.row.focus" style="width: 100%;cursor: pointer;" @click="changeFocus(scope.row, '1')">{{ scope.row.configValue }}</div>
<el-input v-if="scope.row.focus" v-model="scope.row.configValue" size="mini" style="width: 100%" @blur="changeFocus(scope.row, '0')" />
</div>
<div v-else-if="scope.row.type === 'number'">
<div v-if="!scope.row.focus" style="width: 100%;cursor: pointer" @click="changeFocus(scope.row, '1')">{{ scope.row.configValue }}</div>
<el-input-number v-if="scope.row.focus" v-model="scope.row.configValue" size="mini" style="width: 100px;" :min="0" controls-position="right" @blur="changeFocus(scope.row, '0')" />
</div>
<div v-else-if="scope.row.type === 'boolean'">
<el-checkbox v-model="scope.row.configValue">{{ scope.row.configValue }}</el-checkbox>
</div>
<div v-else-if="scope.row.type === 'select'">
<el-select v-model="scope.row.configValue" size="mini" style="width: 80px;">
<el-option
v-for="item in scope.row.options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</template>
</el-table-column>
<el-table-column prop="remark" label="描述" />
</el-table>
</el-card>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="save">{{ $t('global.confirm') }}</el-button>
<el-button @click="dialogVisible = false">{{ $t('global.cancel') }}</el-button>
@ -97,6 +101,7 @@ export default {
index: 0,
id: '',
generalData: [],
height: 800,
roadData: [],
focus: false,
booleanList: ['lockFirst', 'switchSingleHandle', 'signalApproachOnlyOne', 'signalApproachOnlyNpSwitch',
@ -107,15 +112,33 @@ export default {
numberList: ['overlapReleaseTime', 'routeReleaseTime'],
optionsMap: {
upDirection: [{label: 'right', value: 'right'}, {label: 'left', value: 'left'}]
},
remarkMap: {
lockFirst: '是否先锁闭——办理过程直接先锁闭区段',
upDirection: '上行方向',
switchSingleHandle: '道岔区段状态改变按单个道岔处理',
signalApproachOnlyOne: '信号机接近区段是否只取最近的一个',
signalApproachOnlyNpSwitch: ' 信号机接近区段是否仅考虑定位道岔',
routeNameUseEndOppositeSignalName: '进路名称是否使用终端信号机同区段反向信号机名称命名,否则使用终端信号机命名',
generateTbRoute: '是否生成折返进路',
tbRouteNameUseEndOppositeSignalName: '折返进路名称是否使用终端信号机反向信号机名称',
routeSignalAlwaysGreen: '进路始端防护信号机是否总是绿灯,否则根据进路中有无反位道岔生成绿灯或黄灯',
routeApartByOverlap: '多个延续保护路径生成多条进路,否则生成一条进路',
overlapOnlySwitch:'延续保护是否只构建道岔',
overlapOnlyOneSwitch: '延续保护构建是否只考虑一个道岔计轴',
overlapSwitchNpOnly: '延续保护道岔是否只构建定位道岔',
overlapSignalOppositeSwitchNpOnly: '延续保护道岔在防护信号机与所属区段方向相反时,是否只构建定位道岔',
overlapReleaseTime: '默认延续保护解锁时间',
routeReleaseTime: '默认进路解锁时间'
}
};
},
computed: {
},
methods: {
async show(row) {
this.dialogVisible = true;
this.height = document.documentElement.clientHeight - 180;
if (row && row.id) {
this.id = row.id;
this.getList();
@ -153,7 +176,8 @@ export default {
configKey: key,
configValue: res.data[key],
type: type,
options: options
options: options,
remark: this.remarkMap[key]
};
if (this.generalConfig.includes(key)) {
this.generalData.push(param);