Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
a65390f7d6
@ -185,6 +185,14 @@ export function saveScriptScenes(group) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 保存剧本背景(新版)*/
|
||||
export function saveScriptScenesNew(group) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${group}/saveScenes`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
|
||||
/** 保存录制任务数据*/
|
||||
export function saveScriptData(group) {
|
||||
return request({
|
||||
@ -210,6 +218,15 @@ export function updateMapLocation(group, data) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 更新任务地图定位信息(新版)*/
|
||||
export function updateMapLocationNew(group, data) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${group}/mapLocation`,
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取剧本编制的所有成员角色*/
|
||||
export function getScriptMemberData(group) {
|
||||
return request({
|
||||
@ -459,6 +476,14 @@ export function scriptPause(group) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 暂停仿真 */
|
||||
export function simulationPause(group) {
|
||||
return request({
|
||||
url: `/simulation/${group}/pause`,
|
||||
method: 'PUT'
|
||||
});
|
||||
}
|
||||
|
||||
/** 恢复仿真运行并执行刚编辑的剧本动作 */
|
||||
export function executeScript(group) {
|
||||
return request({
|
||||
@ -467,6 +492,14 @@ export function executeScript(group) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 恢复仿真运行并执行刚编辑的剧本动作(新版) */
|
||||
export function executeScriptNew(group) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${group}/recoverAndExecute`,
|
||||
method: 'PUT'
|
||||
});
|
||||
}
|
||||
|
||||
/** 生成用户自己的当日运行图*/
|
||||
export function generateDayRunPlan(planId, group) {
|
||||
return request({
|
||||
@ -509,6 +542,14 @@ export function scriptDraftRecordNotify(scriptId) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 预览脚本仿真(新版)*/
|
||||
export function scriptDraftRecordNotifyNew(scriptId) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${scriptId}/preview`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 新版地图创建仿真 */
|
||||
export function createSimulationNew(params) {
|
||||
return request({
|
||||
|
@ -90,9 +90,9 @@ class Jlmap {
|
||||
// 保存皮肤类型
|
||||
if (map.skinVO) {
|
||||
this.lineCode = map.skinVO.code;
|
||||
this.$options.scaleRate = map.skinVO.scaling || 1;
|
||||
this.$options.offsetX = map.skinVO.origin ? map.skinVO.origin.x : 0;
|
||||
this.$options.offsetY = map.skinVO.origin ? map.skinVO.origin.y : 0;
|
||||
this.$options.scaleRate = map.scaling || 1;
|
||||
this.$options.offsetX = map.origin ? map.origin.x : 0;
|
||||
this.$options.offsetY = map.origin ? map.origin.y : 0;
|
||||
}
|
||||
|
||||
// 更新视图大小
|
||||
|
@ -58,12 +58,6 @@ export default class ELines extends Group {
|
||||
zlevel: this.zlevel,
|
||||
progressive: model.progressive,
|
||||
z: this.z,
|
||||
// shape: {
|
||||
// x1: model.points[i].x,
|
||||
// y1: model.points[i].y,
|
||||
// x2: model.points[i + 1].x,
|
||||
// y2: model.points[i + 1].y
|
||||
// },
|
||||
shape: {
|
||||
points: points
|
||||
},
|
||||
|
@ -18,6 +18,7 @@ const Jlmap3dTrain = () => import('@/views/jlmap3d/devicetrain/jl3ddevicetrain')
|
||||
const Display = () => import('@/views/display/index');
|
||||
const DisplayNew = () => import('@/views/newMap/displayNew/index');
|
||||
const DesignDisplay = () => import('@/views/display/designIndex');
|
||||
const DesignDisplayNew = () => import('@/views/newMap/displayNew/designIndex');
|
||||
|
||||
const TrainRoom = () => import('@/views/trainRoom/index');
|
||||
const JointTraining = () => import('@/views/jointTraining/index');
|
||||
@ -402,6 +403,13 @@ export const asyncRouter = [
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/design/displayNew/:mode',
|
||||
component: DesignDisplayNew,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{ // 剧本编辑 战场图
|
||||
path: '/scriptDisplay/:mode',
|
||||
component: ScriptDisplay,
|
||||
|
@ -2240,6 +2240,7 @@ export const UrlConfig = {
|
||||
runPlan: '/design/runPlan/detail',
|
||||
scriptHome: '/design/script/home',
|
||||
display: '/design/display',
|
||||
displayNew: '/design/displayNew',
|
||||
mapPreview: '/design/mapPreview',
|
||||
mapPreviewNew: '/design/mapPreviewNew',
|
||||
ibpHome: '/design/ibp/home'
|
||||
|
@ -8,6 +8,7 @@ class CommandHandle {
|
||||
this.data = [];
|
||||
this.definitionMap = {
|
||||
};
|
||||
this.scriptDefinitionMap = {};
|
||||
}
|
||||
|
||||
load(list) {
|
||||
@ -17,6 +18,7 @@ class CommandHandle {
|
||||
};
|
||||
(list || []).forEach(definition => {
|
||||
this.definitionMap[definition.simulationRole][definition.operate] = definition;
|
||||
this.scriptDefinitionMap[definition.id] = definition;
|
||||
});
|
||||
}
|
||||
|
||||
@ -29,6 +31,14 @@ class CommandHandle {
|
||||
}
|
||||
}
|
||||
|
||||
getScriptDefinition(operationId) {
|
||||
if (operationId) {
|
||||
return this.scriptDefinitionMap[operationId] || null;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
getCommand(cmdType, wholeParam) {
|
||||
if (cmdType) {
|
||||
const command = new Command();
|
||||
|
@ -103,7 +103,7 @@ class Handler {
|
||||
if (command) {
|
||||
// 判断当前是否是剧本 添加动作指令操作
|
||||
if (store.state.scriptRecord.isScriptCommand) {
|
||||
store.dispatch('scriptRecord/updateScriptCommand', {cmdType:operation.cmdType, param:command.get()});
|
||||
store.dispatch('scriptRecord/updateScriptCommand', {operationId:command.id, cmdType:operation.cmdType, param:command.get()});
|
||||
resolve(rtn);
|
||||
} else {
|
||||
CommandHandler.execute(command.id, command.get()).then(response => {
|
||||
|
@ -2,9 +2,9 @@ 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.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
|
@ -1,10 +1,37 @@
|
||||
<template>
|
||||
<div>
|
||||
LCD屏控制
|
||||
<div class="lcdControl_title">LCD控制屏</div>
|
||||
<div>
|
||||
<div>特定区域</div>
|
||||
<div>全线</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<el-radio v-model="radio1" label="1" border>备选项1</el-radio>
|
||||
<el-radio v-model="radio1" label="2" border>备选项2</el-radio>
|
||||
</div>
|
||||
<div>确定</div>
|
||||
</div>
|
||||
<div />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
columns: ['车站', '选择'],
|
||||
stationList: ['会展中心站', '世纪大道站', '交通大学站', '市图书馆站', '中心医院站', '未来路站', '火车站', '人民广场站', '体育中心站']
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.lcdControl_title{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 26px;
|
||||
margin-top: 30px;
|
||||
color: #56E5DE;
|
||||
}
|
||||
</style>
|
||||
|
@ -48,12 +48,11 @@
|
||||
import RunPlanLoad from './demon/runPlanLoad';
|
||||
import RunPlanView from './demon/runPlanView';
|
||||
import FaultChoose from './demon/faultChoose';
|
||||
import MapSystemDraft from '@/views/mapsystem/index';
|
||||
import MenuLesson from '@/views/display/menuLesson';
|
||||
import MenuDemon from '@/views/display/menuDemon';
|
||||
import MenuSchema from '@/views/display/menuSchema';
|
||||
import MenuSystemTime from '@/views/display/menuSystemTime';
|
||||
import MenuScript from '@/views/display/menuScript';
|
||||
import MapSystemDraft from '@/views/newMap/mapsystemNew/index';
|
||||
import MenuDemon from '@/views/newMap/displayNew/menuDemon';
|
||||
import MenuSchema from '@/views/newMap/displayNew/menuSchema';
|
||||
import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
|
||||
import MenuScript from '@/views/newMap/displayNew/menuScript';
|
||||
import AddQuest from './demon/addQuest';
|
||||
import Scheduling from './demon/scheduling';
|
||||
import { mapGetters } from 'vuex';
|
||||
@ -77,7 +76,6 @@ export default {
|
||||
RunPlanView,
|
||||
FaultChoose,
|
||||
AddQuest,
|
||||
MenuLesson,
|
||||
MapSystemDraft,
|
||||
MenuDemon,
|
||||
MenuScript,
|
||||
|
230
src/views/newMap/newMapdraft/ciConfig.vue
Normal file
230
src/views/newMap/newMapdraft/ciConfig.vue
Normal file
@ -0,0 +1,230 @@
|
||||
<template>
|
||||
<div v-show="dialogVisible">
|
||||
<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 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-radio v-model="scope.row.configValue" :label="trueValue">是</el-radio>
|
||||
<el-radio v-model="scope.row.configValue" :label="falseValue">否</el-radio>
|
||||
</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" :loading="loading" @click="save">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button :loading="loading" @click="dialogVisible = false">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { saveMap, generateCI } from '@/api/jmap/mapdraft';
|
||||
export default {
|
||||
name: 'Config',
|
||||
components: {
|
||||
// EditConfig
|
||||
},
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
dialogVisible: false,
|
||||
index: 0,
|
||||
trueValue: true,
|
||||
falseValue: false,
|
||||
id: '',
|
||||
height: 800,
|
||||
initData: {
|
||||
signalApproachOnlyOne: false,
|
||||
signalApproachOnlyNpSwitch: false,
|
||||
routeNameUseEndOppositeSignalName: false,
|
||||
generateTbRoute: false,
|
||||
tbRouteNameUseEndOppositeSignalName: false,
|
||||
routeSignalAlwaysGreen: false,
|
||||
routeApartByOverlap: false,
|
||||
overlapOnlySwitch: false,
|
||||
overlapSwitchNpOnly: false,
|
||||
overlapSignalOppositeSwitchNpOnly: false,
|
||||
overlapOnlyOneSwitch: false,
|
||||
generateCycle: false,
|
||||
overlapSettingByTrigger: false,
|
||||
overlapReleaseTime: 45,
|
||||
routeReleaseTime: 60
|
||||
},
|
||||
roadData: [],
|
||||
focus: false,
|
||||
booleanList: ['lockFirst', 'switchSingleHandle', 'signalApproachOnlyOne', 'signalApproachOnlyNpSwitch',
|
||||
'routeNameUseEndOppositeSignalName', 'generateTbRoute', 'tbRouteNameUseEndOppositeSignalName', 'routeSignalAlwaysGreen',
|
||||
'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch', 'generateCycle', 'overlapSettingByTrigger'],
|
||||
selectList: ['upDirection'],
|
||||
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: '默认进路解锁时间',
|
||||
generateCycle: '是否生成自动折返',
|
||||
overlapSettingByTrigger: '延续保护的建立方式:是-通过触发建立,否-随进路建立'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
methods: {
|
||||
async show() {
|
||||
this.dialogVisible = true;
|
||||
this.height = document.documentElement.clientHeight - 180;
|
||||
const map = this.$store.state.map.map;
|
||||
this.getList(map.generateConfig);
|
||||
},
|
||||
changeFocus(row, flag) {
|
||||
if (flag === '0') {
|
||||
this.$set(row, 'focus', false);
|
||||
} else {
|
||||
this.$set(row, 'focus', true);
|
||||
}
|
||||
},
|
||||
async getList(data) {
|
||||
try {
|
||||
if (data) {
|
||||
const keys = Object.keys(data);
|
||||
this.roadData = [];
|
||||
keys.forEach(key => {
|
||||
let type = 'input';
|
||||
let options = [];
|
||||
if (this.booleanList.indexOf(key) >= 0) {
|
||||
type = 'boolean';
|
||||
} else if (this.selectList.indexOf(key) >= 0) {
|
||||
type = 'select';
|
||||
options = this.optionsMap[key];
|
||||
} else if (this.numberList.indexOf(key) >= 0) {
|
||||
type = 'number';
|
||||
} else {
|
||||
type = 'input';
|
||||
}
|
||||
const param = {
|
||||
configKey: key,
|
||||
configValue: data[key],
|
||||
type: type,
|
||||
options: options,
|
||||
remark: this.remarkMap[key]
|
||||
};
|
||||
this.roadData.push(param);
|
||||
});
|
||||
} else {
|
||||
this.roadData = [];
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
handleClose(done) {
|
||||
if (done) {
|
||||
done();
|
||||
} else {
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
},
|
||||
addModel() {
|
||||
this.$refs.addConfig.show();
|
||||
},
|
||||
editModel(item, index) {
|
||||
this.$refs.editConfig.show(item);
|
||||
this.index = index;
|
||||
},
|
||||
save() {
|
||||
this.loading = true;
|
||||
const map = this.$store.state.map.map;
|
||||
this.$store.dispatch('map/saveMapDeviceDefaultRelations').then(() => {
|
||||
const param = {};
|
||||
this.roadData.forEach(item => {
|
||||
param[item.configKey] = item.configValue;
|
||||
});
|
||||
saveMap(Object.assign(map, {generateConfig: param, mapId: this.$route.params.mapId})).then(response => {
|
||||
this.dialogVisible = false;
|
||||
this.loading = false;
|
||||
this.$confirm('生成联锁关系会删除旧的联锁关系,是否继续生成', {
|
||||
confirmButtonText: '继续',
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
generateCI(this.$route.params.mapId).then(resp => {
|
||||
this.$message.success('生成并保存联锁关系成功!');
|
||||
}).catch(()=> {
|
||||
this.$message.error('生成并保存联锁关系失败!');
|
||||
});
|
||||
});
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('map.updateFailed'));
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.icon_font{
|
||||
font-size: 18px;
|
||||
margin-left: 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.flex_box{
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -45,6 +45,8 @@
|
||||
ref="configMap"
|
||||
@handleSelectPhysicalView="handleSelectPhysicalView"
|
||||
/>
|
||||
<ci-config ref="ciConfig" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
@ -57,7 +59,7 @@ import JlmapVisual from '@/views/newMap/jlmapNew/index';
|
||||
import MapOperate from './mapoperate/index';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { } from '@/api/jmap/mapdraft';
|
||||
import CiConfig from './ciConfig';
|
||||
|
||||
import ConfigMap from './configMap';
|
||||
|
||||
@ -69,7 +71,8 @@ export default {
|
||||
JlmapVisual,
|
||||
MapOperate,
|
||||
DataRelation,
|
||||
ConfigMap
|
||||
ConfigMap,
|
||||
CiConfig
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -154,19 +157,18 @@ export default {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const map = this.$store.state.map.map;
|
||||
console.log(map, '======');
|
||||
this.$store.dispatch('map/saveMapDeviceDefaultRelations').then(() => {
|
||||
const param = {
|
||||
mapId: this.$route.params.mapId,
|
||||
skinVO: {
|
||||
code: this.$store.state.map.map.skinVO.code,
|
||||
name: this.$store.state.map.map.skinVO.name,
|
||||
origin: {
|
||||
x: this.updtModel.origin.x,
|
||||
y: this.updtModel.origin.y
|
||||
},
|
||||
scaling: this.updtModel.scaling
|
||||
}
|
||||
name: this.$store.state.map.map.skinVO.name
|
||||
},
|
||||
origin: {
|
||||
x: this.updtModel.origin.x || map.origin.x,
|
||||
y: this.updtModel.origin.y || map.origin.y
|
||||
},
|
||||
scaling: this.updtModel.scaling
|
||||
};
|
||||
saveMap(Object.assign(map, param)).then(response => {
|
||||
this.$message.success(this.$t('map.updateSuccessfully'));
|
||||
@ -235,18 +237,7 @@ export default {
|
||||
}
|
||||
},
|
||||
generateCIEvent() {
|
||||
this.$confirm('生成联锁关系会删除旧的联锁关系,是否继续生成', {
|
||||
confirmButtonText: '继续',
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
generateCI(this.$route.params.mapId).then(resp => {
|
||||
this.$message.success('生成并保存联锁关系成功!');
|
||||
}).catch(()=> {
|
||||
this.$message.error('生成并保存联锁关系失败!');
|
||||
});
|
||||
});
|
||||
|
||||
this.$refs.ciConfig.show();
|
||||
},
|
||||
handleSelectControlPage (model) {
|
||||
if (this.$refs.mapOperate) {
|
||||
|
@ -1,95 +1,106 @@
|
||||
<template>
|
||||
<div style="height: 100%;">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-form ref="oprt" :model="form" label-width="200px" size="mini">
|
||||
<el-form-item :label="$t('map.leftStopPointOffsetFromStart')" prop="leftDistance">
|
||||
<el-input-number v-model="form.leftDistance" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.rightStopPointOffsetFromTerminal')" prop="rightDistance">
|
||||
<el-input-number v-model="form.rightDistance" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-collapse v-model="activeName" accordion style="margin-left: 20px">
|
||||
<el-collapse-item title="左右停车点偏移" name="1">
|
||||
<el-form ref="oprt" :model="form" label-width="200px" size="mini">
|
||||
<el-form-item :label="$t('map.leftStopPointOffsetFromStart')" prop="leftDistance">
|
||||
<el-input-number v-model="form.leftDistance" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.rightStopPointOffsetFromTerminal')" prop="rightDistance">
|
||||
<el-input-number v-model="form.rightDistance" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
<el-button type="primary" size="small" @click="batchSettings">{{ $t('global.set') }}</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="区段名称位置" name="2">
|
||||
<el-form ref="formModel" :model="formModel" label-width="200px" size="mini" :rules="formRules">
|
||||
<el-form-item label="区段编码:" prop="modelList">
|
||||
<el-select v-model="formModel.modelList" filterable multiple>
|
||||
<el-option
|
||||
v-for="item in sectionList"
|
||||
:key="item.code"
|
||||
:label="item.name + '(' + item.code + ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type="field === 'sectionTypeCode' ? 'danger' : 'primary'"
|
||||
size="small"
|
||||
@click="hover('sectionTypeCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="区段名称位置:" prop="trainPosType">
|
||||
<el-select
|
||||
v-model="formModel.trainPosType"
|
||||
placeholder="请选择"
|
||||
:clearable="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in positionTypes"
|
||||
:key="option.type"
|
||||
:label="option.name"
|
||||
:value="option.type"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
<el-button type="primary" size="small" @click="setPositionType">{{ $t('global.set') }}</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="线路类型" name="3">
|
||||
<el-form ref="roadModel" :model="roadModel" label-width="200px" size="mini" :rules="roadRules">
|
||||
<el-form-item label="起止区段:" prop="sectionCode">
|
||||
<el-select v-model="roadModel.sectionCode" filterable>
|
||||
<el-option
|
||||
v-for="item in sectionList"
|
||||
:key="item.code"
|
||||
:label="item.name + '(' + item.code + ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type="field === 'sectionRoadCode' ? 'danger' : 'primary'"
|
||||
size="small"
|
||||
@click="hover('sectionRoadCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="线路类型">
|
||||
<el-select v-model="roadModel.roadType">
|
||||
<el-option
|
||||
v-for="item in sectionRoadTypeList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
<el-button type="primary" size="small" @click="setRoadType">{{ $t('global.set') }}</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="关联站台区段所属车站" name="4">
|
||||
<el-button-group>
|
||||
<el-button type="primary" size="big" @click="batchSettings">{{ $t('global.set') }}</el-button>
|
||||
<el-button style="margin-left: 150px" type="primary" size="small" @click="setBelongStation">设置</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<hr style="width: 100%">
|
||||
<el-form ref="formModel" :model="formModel" label-width="200px" size="mini" :rules="formRules">
|
||||
<el-form-item label="区段编码:" prop="modelList">
|
||||
<el-select v-model="formModel.modelList" filterable multiple>
|
||||
<el-option
|
||||
v-for="item in sectionList"
|
||||
:key="item.code"
|
||||
:label="item.name + '(' + item.code + ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type="field === 'sectionTypeCode' ? 'danger' : 'primary'"
|
||||
size="small"
|
||||
@click="hover('sectionTypeCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="区段名称位置:" prop="trainPosType">
|
||||
<el-select
|
||||
v-model="formModel.trainPosType"
|
||||
placeholder="请选择"
|
||||
:clearable="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in positionTypes"
|
||||
:key="option.type"
|
||||
:label="option.name"
|
||||
:value="option.type"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="逻辑区段始终点偏移" name="5">
|
||||
<el-button-group>
|
||||
<el-button type="primary" size="big" @click="setPositionType">{{ $t('global.set') }}</el-button>
|
||||
<el-button style="margin-left: 150px" type="primary" size="small" @click="setLogicOffset">设置</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<hr style="width: 100%">
|
||||
<el-form ref="roadModel" :model="roadModel" label-width="200px" size="mini" :rules="roadRules">
|
||||
<el-form-item label="起止区段:" prop="sectionCode">
|
||||
<el-select v-model="roadModel.sectionCode" filterable>
|
||||
<el-option
|
||||
v-for="item in sectionList"
|
||||
:key="item.code"
|
||||
:label="item.name + '(' + item.code + ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type="field === 'sectionRoadCode' ? 'danger' : 'primary'"
|
||||
size="small"
|
||||
@click="hover('sectionRoadCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="线路类型">
|
||||
<el-select v-model="roadModel.roadType">
|
||||
<el-option
|
||||
v-for="item in sectionRoadTypeList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
<el-button type="primary" size="big" @click="setRoadType">{{ $t('global.set') }}</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<hr style="width: 100%">
|
||||
<el-button-group>
|
||||
<el-button style="margin-left: 150px" type="primary" size="big" @click="setBelongStation">批量设置关联站台区段所属车站</el-button>
|
||||
</el-button-group>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-scrollbar></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -108,6 +119,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: '',
|
||||
form: {
|
||||
leftDistance: 0,
|
||||
rightDistance: 0
|
||||
@ -192,7 +204,7 @@ export default {
|
||||
models.push(model);
|
||||
});
|
||||
this.$emit('updateMapModel', models, 'five');
|
||||
this.$refs.formModel && this.$refs.formModel.resetFields(); // 对该表单项进行重置并移除校验结果
|
||||
this.$refs.formModel && this.$refs.formModel.resetFields(); // 对该表单项进行重置并移除校验结果
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -252,8 +264,8 @@ export default {
|
||||
}
|
||||
}
|
||||
this.$emit('updateMapModel', models, 'five');
|
||||
this.$message.success('数据构建成功!');
|
||||
this.$refs.roadModel && this.$refs.roadModel.resetFields(); // 对该表单项进行重置并移除校验结果
|
||||
this.$message.success('数据构建成功!');
|
||||
this.$refs.roadModel && this.$refs.roadModel.resetFields(); // 对该表单项进行重置并移除校验结果
|
||||
});
|
||||
},
|
||||
setBelongStation() {
|
||||
@ -265,7 +277,31 @@ export default {
|
||||
models.push(model);
|
||||
});
|
||||
this.$emit('updateMapModel', models, 'five');
|
||||
this.$message.success('数据构建成功!');
|
||||
this.$message.success('数据构建成功!');
|
||||
},
|
||||
setLogicOffset() {
|
||||
const models = [];
|
||||
this.sectionList.forEach(section => {
|
||||
let startPoint = section.points[0];
|
||||
let startOffset = 0;
|
||||
if (section.logicSectionCodeList) {
|
||||
section.logicSectionCodeList.forEach(sectionCode => {
|
||||
const logicSection = this.$store.getters['map/getDeviceByCode'](sectionCode);
|
||||
if (logicSection.points[0].x === startPoint.x && logicSection.points[0].y === startPoint.y) {
|
||||
const model = deepAssign({}, logicSection);
|
||||
model.logicSectionStartOffset = startOffset;
|
||||
model.logicSectionEndOffset = section.lengthFact - startOffset;
|
||||
models.push(model);
|
||||
startOffset += logicSection.lengthFact;
|
||||
startPoint = logicSection.points[logicSection.points.length - 1];
|
||||
} else {
|
||||
console.log('error', logicSection, section );
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
this.$emit('updateMapModel', models, 'five');
|
||||
this.$message.success('数据构建成功!');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -31,7 +31,7 @@ import Vue from 'vue';
|
||||
import AddAction from '../scriptRecord/addAction';
|
||||
import GetAction from '../scriptRecord/getAction';
|
||||
import AddRole from '../scriptRecord/addRole';
|
||||
import {saveScriptScenes, saveScriptData, saveScriptDataNew, dumpScriptData, dumpScriptDataNew, updateMapLocation, scriptPause, executeScript} from '@/api/simulation';
|
||||
import {saveScriptScenes, saveScriptScenesNew, saveScriptData, saveScriptDataNew, dumpScriptData, dumpScriptDataNew, updateMapLocation, updateMapLocationNew, scriptPause, simulationPause, executeScript, executeScriptNew} from '@/api/simulation';
|
||||
|
||||
export default {
|
||||
name: 'TipScriptRecord',
|
||||
@ -103,33 +103,64 @@ export default {
|
||||
}
|
||||
},
|
||||
pauseScript() {
|
||||
scriptPause(this.group).then(resp => {
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', true);
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('scriptRecord.pauseFail'));
|
||||
});
|
||||
if (this.$route.query.drawWay == 'true') {
|
||||
simulationPause(this.group).then(resp => {
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', true);
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('scriptRecord.pauseFail'));
|
||||
});
|
||||
} else {
|
||||
scriptPause(this.group).then(resp => {
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', true);
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('scriptRecord.pauseFail'));
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
executePlayScript() {
|
||||
executeScript(this.group).then(resp => {
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', false);
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('scriptRecord.recoverFail'));
|
||||
});
|
||||
if (this.$route.query.drawWay == 'true') {
|
||||
executeScriptNew(this.group).then(resp => {
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', false);
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('scriptRecord.recoverFail'));
|
||||
});
|
||||
} else {
|
||||
executeScript(this.group).then(resp => {
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', false);
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('scriptRecord.recoverFail'));
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
saveScenesStage() {
|
||||
const data = Vue.prototype.$jlmap.$options;
|
||||
const group = this.$route.query.group;
|
||||
const dataZoom = {scale: data.scaleRate, x: data.offsetX, y: data.offsetY};
|
||||
saveScriptScenes(this.group).then(resp => {
|
||||
updateMapLocation(group, dataZoom).then(response=>{
|
||||
this.$store.dispatch('scriptRecord/updateBgSet', true);
|
||||
this.$message.success(this.$t('scriptRecord.saveBackgroundSuceess'));
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.updateLocationFail')}: ${error.message}`);
|
||||
if (this.$route.query.drawWay == 'true') {
|
||||
saveScriptScenesNew(this.group).then(resp => {
|
||||
updateMapLocationNew(group, dataZoom).then(response=>{
|
||||
this.$store.dispatch('scriptRecord/updateBgSet', true);
|
||||
this.$message.success(this.$t('scriptRecord.saveBackgroundSuceess'));
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.updateLocationFail')}: ${error.message}`);
|
||||
});
|
||||
}).catch((error) => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.saveBackgroundFail')}: ${error.message}`);
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('scriptRecord.saveBackgroundFail'));
|
||||
});
|
||||
} else {
|
||||
saveScriptScenes(this.group).then(resp => {
|
||||
updateMapLocation(group, dataZoom).then(response=>{
|
||||
this.$store.dispatch('scriptRecord/updateBgSet', true);
|
||||
this.$message.success(this.$t('scriptRecord.saveBackgroundSuceess'));
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.updateLocationFail')}: ${error.message}`);
|
||||
});
|
||||
}).catch((error) => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.saveBackgroundFail')}: ${error.message}`);
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
saveScenesData() {
|
||||
|
@ -18,7 +18,7 @@ import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { admin, superAdmin} from '@/router/index_APP_TARGET';
|
||||
import {retractScript, publishScript, updateScript, deleteScript, getScriptPageList, createScript} from '@/api/script';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { scriptDraftRecordNotify, scriptRecordNotify, scriptRecordNotifyNew } from '@/api/simulation';
|
||||
import { scriptDraftRecordNotify, scriptDraftRecordNotifyNew, scriptRecordNotify, scriptRecordNotifyNew } from '@/api/simulation';
|
||||
import CreateScript from './create';
|
||||
import ScriptPublish from './publish';
|
||||
|
||||
@ -264,13 +264,24 @@ export default {
|
||||
}).catch(() => { });
|
||||
},
|
||||
previewScript(index, row) {
|
||||
scriptDraftRecordNotify(row.id).then(resp => {
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:this.$route.query.lineCode};
|
||||
this.$router.push({ path: `${UrlConfig.design.display}/demon`, query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
||||
});
|
||||
if (this.$route.query.drawWay == 'true') {
|
||||
scriptDraftRecordNotifyNew(row.id).then(resp => {
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:this.$route.query.lineCode};
|
||||
this.$router.push({ path: `${UrlConfig.design.displayNew}/demon`, query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
||||
});
|
||||
} else {
|
||||
scriptDraftRecordNotify(row.id).then(resp => {
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:this.$route.query.lineCode};
|
||||
this.$router.push({ path: `${UrlConfig.design.display}/demon`, query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -30,7 +30,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card v-if="this.$route.query.drawWay == 'false'" class="commandCard">
|
||||
<el-card v-if="this.$route.query.drawWay != 'true'" class="commandCard">
|
||||
<div class="addCommand">{{ $t('scriptRecord.addCommand') }}</div>
|
||||
<el-form ref="commandData" size="mini" :model="commandData" :rules="commandRules" label-width="120px" class="actionInfo" label-position="right">
|
||||
<el-form-item :label="$t('scriptRecord.executor')" class="conditionVO" prop="action.memberId">
|
||||
@ -112,7 +112,7 @@ export default {
|
||||
action:{
|
||||
memberId:'',
|
||||
operationType:'',
|
||||
commandParamList:{},
|
||||
operationParamMap:{},
|
||||
type:'Command'
|
||||
}
|
||||
},
|
||||
@ -191,10 +191,18 @@ export default {
|
||||
this.isPause = !(this.$store.state.scriptRecord.simulationPause);
|
||||
this.$parent.$parent.$parent.setIsParse(this.isPause);
|
||||
this.$refs['modalData'].clearValidate();
|
||||
this.$refs['commandData'].clearValidate();
|
||||
if (!val) {
|
||||
this.initActionData();
|
||||
this.initCommandActionData();
|
||||
if (this.$route.query.drawWay == 'true') {
|
||||
this.$refs['commandDataNew'].clearValidate();
|
||||
if (!val) {
|
||||
this.initActionData();
|
||||
this.initCommandActionData();
|
||||
}
|
||||
} else {
|
||||
this.$refs['commandData'].clearValidate();
|
||||
if (!val) {
|
||||
this.initActionData();
|
||||
this.initCommandActionData();
|
||||
}
|
||||
}
|
||||
},
|
||||
'$store.state.scriptRecord.scriptCommand':function (val) {
|
||||
@ -204,7 +212,8 @@ export default {
|
||||
const operateTypeName = deviceTypeList[operateType];
|
||||
this.executeCommandName = operateTypeName + '(' + val.cmdType.label + ')';
|
||||
this.commandDataNew.action.operationType = val.cmdType.value;
|
||||
this.commandDataNew.action.commandParamList = val.param;
|
||||
this.commandDataNew.action.operationId = val.operationId;
|
||||
this.commandDataNew.action.operationParamMap = val.param;
|
||||
this.messageTips2 = '';
|
||||
}
|
||||
},
|
||||
@ -351,7 +360,7 @@ export default {
|
||||
} else if (this.commandDataNew.action.operationType == '') {
|
||||
this.messageTips2 = '请在右侧的地图中选择操作';
|
||||
return false;
|
||||
} else if (Object.keys(this.commandDataNew.action.commandParamList).length === 0) {
|
||||
} else if (Object.keys(this.commandDataNew.action.operationParamMap).length === 0) {
|
||||
this.messageTips2 = '请在右侧的地图中选择操作';
|
||||
return false;
|
||||
} else {
|
||||
@ -503,7 +512,9 @@ export default {
|
||||
}
|
||||
},
|
||||
resetData() {
|
||||
this.$refs.command.resetData();
|
||||
if (this.$route.query.drawWay != 'true') {
|
||||
this.$refs.command.resetData();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -31,6 +31,7 @@
|
||||
<script>
|
||||
import {deleteScriptAction, getAvailableDeviceCommand, getScriptRecord, getScriptAllAction, getScriptPlayMemberNew } from '@/api/simulation';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import CommandHandler from '@/scripts/cmdPlugin/CommandHandler';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
export default {
|
||||
name: 'GetAction',
|
||||
@ -99,8 +100,9 @@ export default {
|
||||
}
|
||||
case 'Command':
|
||||
{
|
||||
const operateType = element.operationType.split('_')[0];
|
||||
const data = element.operationType.toUpperCase();
|
||||
const command = CommandHandler.getScriptDefinition(element.operationId);
|
||||
const operateType = command.operate.split('_')[0];
|
||||
const data = command.operate.toUpperCase();
|
||||
const operateName = CMD[operateType]['CMD_' + data];
|
||||
const deviceTypeList = {Section:'区段', Switch:'道岔', Signal:'信号机', Stand:'站台', Station:'车站', TrainWindow:'车次窗'};
|
||||
const operateTypeName = deviceTypeList[operateType];
|
||||
|
@ -19,41 +19,8 @@
|
||||
<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>
|
||||
<el-radio v-model="scope.row.configValue" :label="true">是</el-radio>
|
||||
<el-radio v-model="scope.row.configValue" :label="false">否</el-radio>
|
||||
</div>
|
||||
<div v-else-if="scope.row.type === 'select'">
|
||||
<el-select v-model="scope.row.configValue" size="mini" style="width: 80px;">
|
||||
@ -81,7 +48,6 @@
|
||||
|
||||
<script>
|
||||
import { getRealLineConfigList, putRealLineConfig } from '@/api/management/mapline';
|
||||
// import EditConfig from './editConfig';
|
||||
export default {
|
||||
name: 'Config',
|
||||
components: {
|
||||
@ -104,34 +70,17 @@ export default {
|
||||
height: 800,
|
||||
roadData: [],
|
||||
focus: false,
|
||||
booleanList: ['lockFirst', 'switchSingleHandle', 'signalApproachOnlyOne', 'signalApproachOnlyNpSwitch',
|
||||
'routeNameUseEndOppositeSignalName', 'generateTbRoute', 'tbRouteNameUseEndOppositeSignalName', 'routeSignalAlwaysGreen',
|
||||
'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch', 'generateCycle', 'overlapSettingByTrigger'],
|
||||
booleanList: ['lockFirst', 'switchSingleHandle'],
|
||||
selectList: ['upDirection'],
|
||||
generalConfig: ['lockFirst', 'switchSingleHandle', 'upDirection'],
|
||||
numberList: ['overlapReleaseTime', 'routeReleaseTime'],
|
||||
numberList: [],
|
||||
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: '默认进路解锁时间',
|
||||
generateCycle: '是否生成自动折返',
|
||||
overlapSettingByTrigger: '延续保护的建立方式:true-通过触发建立,false-随进路建立'
|
||||
switchSingleHandle: '道岔区段状态改变按单个道岔处理'
|
||||
}
|
||||
};
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user