Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
0505d5d4d3
@ -37,46 +37,6 @@ export function getDeviceDetail(id) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 添加/修改屏蔽门设备网关映射配置 */
|
||||
export function setPsdConfig(id, data) {
|
||||
return request({
|
||||
url: `/api/device/${id}/config/psd`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/** 添加/修改信号机设备网关映射配置 */
|
||||
export function setSignalConfig(id, data) {
|
||||
return request({
|
||||
url: `/api/device/${id}/config/signal`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/** 添加/修改信号机设备网关映射配置 */
|
||||
export function setSwitchConfig(id, data) {
|
||||
return request({
|
||||
url: `/api/device/${id}/config/switch`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/** 添加/修改区段设备网关映射配置 */
|
||||
export function setSectionConfig(id, data) {
|
||||
return request({
|
||||
url: `/api/device/${id}/config/section`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/** 添加/修改端头控制盒网关映射配置 */
|
||||
export function setPslConfig(id, data) {
|
||||
return request({
|
||||
url: `/api/device/${id}/config/psl`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/** 添加/修改ibp盘网关映射配置 */
|
||||
export function setIbpConfig(id, data) {
|
||||
return request({
|
||||
@ -85,15 +45,6 @@ export function setIbpConfig(id, data) {
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/** 添加/修改psc控制柜网关映射配置 */
|
||||
export function setPscConfig(id, data) {
|
||||
return request({
|
||||
url: `/api/device/${id}/config/psc`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/** 添加/修改ibp设备配置 */
|
||||
export function setVrIbpConfig(id, data) {
|
||||
return request({
|
||||
|
@ -234,7 +234,7 @@ export function handleIbpPress(group, stationCode, buttonCode) {
|
||||
return request({
|
||||
url: `/simulation/${group}/ibp/press/${stationCode}/${buttonCode}`,
|
||||
method: 'put'
|
||||
})
|
||||
});
|
||||
}
|
||||
/** 处理ibp盘事件(松开) */
|
||||
|
||||
@ -242,7 +242,7 @@ export function handleIbpRelease(group, stationCode, buttonCode) {
|
||||
return request({
|
||||
url: `/simulation/${group}/ibp/release/${stationCode}/${buttonCode}`,
|
||||
method: 'put'
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/** 预览脚本仿真(新版)*/
|
||||
@ -497,3 +497,11 @@ export function getStandListByRunLineOrTrainCode(group, params) {
|
||||
params
|
||||
});
|
||||
}
|
||||
/** 上饶列车控制 */
|
||||
export function srTrainControl(group, params) {
|
||||
return request({
|
||||
url: `/api/sr/${group}/control`,
|
||||
method: 'put',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
BIN
src/assets/left_train.png
Normal file
BIN
src/assets/left_train.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
BIN
src/assets/right_train.png
Normal file
BIN
src/assets/right_train.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
@ -654,7 +654,7 @@ class SkinCode extends defaultStyle {
|
||||
trainHeight: 10, // 列车高度
|
||||
trainHeadDistance: 2, // 列车和车头之间的间距
|
||||
trainWidth: 76, // 列车长度
|
||||
trainTextFontSize: 10, // 列车字号
|
||||
trainTextFontSize: 16, // 列车字号
|
||||
fontFamily: 'consolas', // 默认字体 族类
|
||||
haveTextHSDA: false, // 是否需创建textHSDA对象
|
||||
haveArrowText: true, // 是否需创建arrowText对象
|
||||
|
111
src/jmapNew/theme/fuzhou_01/menus/menuDialog/trainOperation.vue
Normal file
111
src/jmapNew/theme/fuzhou_01/menus/menuDialog/trainOperation.vue
Normal file
@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
title="列车操作"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
:modal="false"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="18" :offset="1">
|
||||
<el-slider
|
||||
v-model="speed"
|
||||
:step="10"
|
||||
:max="55"
|
||||
:marks="marks"
|
||||
show-stops
|
||||
@input="inputSpeed"
|
||||
@change="changeSpeed"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="2">
|
||||
<el-button size="mini" type="danger" style="margin-top: 15px;" @click="brakeTrain">刹车</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 40px">
|
||||
<el-col :span="3" :offset="7" style="text-align: right;">
|
||||
<el-button :type="right?'':'primary'" size="mini" icon="el-icon-arrow-left" @click="adjustDirection('left')" />
|
||||
</el-col>
|
||||
<el-col :span="3" style="text-align: center;">
|
||||
<img style="width: 50px" :src="right? rightTrainPic:leftTrainPic">
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button :type="right?'primary':''" size="mini" icon="el-icon-arrow-right" @click="adjustDirection('right')" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import LeftTrain from '@/assets/left_train.png';
|
||||
import RightTrain from '@/assets/right_train.png';
|
||||
import { srTrainControl } from '@/api/simulation';
|
||||
export default {
|
||||
name: 'TrainOperation',
|
||||
data() {
|
||||
return {
|
||||
speed: 0,
|
||||
dialogVisible: false,
|
||||
leftTrainPic: LeftTrain,
|
||||
rightTrainPic: RightTrain,
|
||||
groupNumber: '',
|
||||
changeSpeedFlag: false,
|
||||
right: true,
|
||||
train: null,
|
||||
marks: {
|
||||
0: '0',
|
||||
10: '10km/h',
|
||||
20: '20km/h',
|
||||
30: '30km/h',
|
||||
40: '40km/h',
|
||||
50: {
|
||||
style: {
|
||||
whiteSpace:'nowrap'
|
||||
},
|
||||
label: '50km/h'
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleClose() {
|
||||
this.$store.dispatch('menuOperation/setSelected', {device: {}});
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
doShow(val) {
|
||||
const train = this.$store.getters['map/getDeviceByCode'](val.groupNumber);
|
||||
this.groupNumber = train.groupNumber;
|
||||
this.train = train;
|
||||
if (this.right != train.right) {
|
||||
this.right = !!train.right;
|
||||
}
|
||||
if (this.speed != train.speed && !this.changeSpeedFlag) {
|
||||
this.speed = train.speed;
|
||||
}
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
inputSpeed(val) {
|
||||
this.changeSpeedFlag = true;
|
||||
},
|
||||
changeSpeed(val) {
|
||||
srTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: this.right, speed: this.speed }).then(resp => {
|
||||
}).catch(err => { this.$message.error(err.message); this.speed = this.train.speed; }).finally(() => { this.changeSpeedFlag = false; });
|
||||
},
|
||||
adjustDirection(value) {
|
||||
srTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: value === 'right', speed: this.speed }).then(resp => {
|
||||
this.right = value === 'right';
|
||||
}).catch(err => { this.$message.error(err.message); });
|
||||
},
|
||||
brakeTrain() {
|
||||
srTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: this.right, speed: 0 }).then(resp => {
|
||||
this.speed = 0;
|
||||
}).catch(err => { this.$message.error(err.message); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -9,6 +9,7 @@
|
||||
<train-edit-number ref="trainEditNumber" />
|
||||
<speed-limit ref="speedLimit" pop-class="fuzhou-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="fuzhou-01__systerm" />
|
||||
<train-operation ref="trainOperation" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -28,6 +29,9 @@ import TrainEditNumber from './dialog/trainEditNumber';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
|
||||
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import TrainOperation from './menuDialog/trainOperation';
|
||||
import { MouseEvent } from '@/scripts/ConstDic';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
export default {
|
||||
name: 'MenuTrain',
|
||||
@ -40,7 +44,8 @@ export default {
|
||||
TrainSwitch,
|
||||
TrainEditNumber,
|
||||
SetFault,
|
||||
SpeedLimit
|
||||
SpeedLimit,
|
||||
TrainOperation
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -135,6 +140,10 @@ export default {
|
||||
label: '回库',
|
||||
handler: this.setInbound
|
||||
},
|
||||
{
|
||||
label: '转NRM模式',
|
||||
handler: this.handlerApplyNrmMode
|
||||
},
|
||||
{
|
||||
label: '修改预选模式',
|
||||
children: [
|
||||
@ -178,7 +187,10 @@ export default {
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
]),
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function () {
|
||||
@ -187,6 +199,11 @@ export default {
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.selected': function (val) {
|
||||
if (val._type === 'Train' && val._event === MouseEvent.Left && this.project === 'srsandbox') {
|
||||
this.$refs.trainOperation.doShow(val);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -409,6 +426,19 @@ export default {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handlerApplyNrmMode() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Apply_NRM',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: { }
|
||||
};
|
||||
commitTrainSend(group, param).then(({ valid, operate }) => {
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 限速行驶
|
||||
limitSpeed() {
|
||||
const step = {
|
||||
|
@ -36,7 +36,7 @@ class Model {
|
||||
};
|
||||
this['private'][deviceType.Train] = {
|
||||
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
|
||||
nameFontSize: 10 // 字体大小
|
||||
nameFontSize: 16 // 字体大小
|
||||
};
|
||||
this['private'][deviceType.TrainWindow] = {
|
||||
trainWindowShow: true
|
||||
|
@ -155,6 +155,10 @@ export default {
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '转NRM模式',
|
||||
handler: this.handlerApplyNrmMode
|
||||
},
|
||||
{
|
||||
label: '确认运行至前方站',
|
||||
handler: this.nextStation
|
||||
@ -297,6 +301,19 @@ export default {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handlerApplyNrmMode() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Apply_NRM',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: { }
|
||||
};
|
||||
commitTrainSend(group, param).then(({ valid, operate }) => {
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// // 添加列车识别号
|
||||
// addTrainId() {
|
||||
// const step = {
|
||||
|
@ -602,8 +602,8 @@ export const ProjectIcon = {
|
||||
designrichorjoint: FaviconRichor,
|
||||
nologo: TransparentIcon,
|
||||
designnologo: TransparentIcon,
|
||||
srsandbox: Favicon,
|
||||
designsrsandbox:Favicon
|
||||
srsandbox: FaviconRichor,
|
||||
designsrsandbox:FaviconRichor
|
||||
};
|
||||
|
||||
export const ProjectCode = {
|
||||
|
@ -30,7 +30,7 @@
|
||||
<el-button type="danger" size="small" @click="handleQuitQuest">退出剧本</el-button>
|
||||
</template>
|
||||
<template v-else-if="!projectDevice">
|
||||
<el-button v-if="!isDepoltSim" type="success" :disabled="isDisable" size="small" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
|
||||
<el-button v-if="!isDepoltSim && project !== 'srsandbox'" type="success" :disabled="isDisable" size="small" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
|
||||
<!-- isDisable&& -->
|
||||
<el-button v-if="isAdmin&&!isDepoltSim" v-loading="pauseLoading" :type="simulationPaused?'warning':'primary'" size="small" @click="startOrPause">{{ simulationPaused?'开始':'暂停' }}</el-button>
|
||||
<el-button type="danger" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button>
|
||||
@ -165,7 +165,7 @@ export default {
|
||||
return this.$store.state.socket.simulationPause;
|
||||
},
|
||||
isDepoltSim() {
|
||||
return this.$route.query.prdType === '09' || this.project !== 'srsandbox';
|
||||
return this.$route.query.prdType === '09';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -107,9 +107,8 @@ export default {
|
||||
if (em.deviceCode) {
|
||||
device = this.getDeviceByEm(em);
|
||||
}
|
||||
|
||||
this.selected = { ...device, _event: MouseEvent.Left };
|
||||
this.$store.dispatch('menuOperation/setSelected', {device: device, subType: em.subType});
|
||||
this.$store.dispatch('menuOperation/setSelected', {device: this.selected, subType: em.subType});
|
||||
this.$store.dispatch('menuOperation/setLeftClickCount');
|
||||
if (this.$route.query.lineCode == '07') {
|
||||
this.$store.dispatch('menuOperation/setMenuChange', {device: device, subType: em.subType});
|
||||
|
@ -84,7 +84,6 @@ export default {
|
||||
'switchNRTurnChain',
|
||||
'switchSingleLockChain',
|
||||
'switchLossChain',
|
||||
'signalForceCancelRoute',
|
||||
'initSingleLockSwitch',
|
||||
'ctcOverlapOnlyTurnBackStationLock',
|
||||
'guideNeedRouteSettingFirst',
|
||||
@ -115,7 +114,7 @@ export default {
|
||||
'setManualWhenHeadTrainArriveTarget',
|
||||
'routeDefaultCheckConflict'
|
||||
],
|
||||
selectList: ['runMode'],
|
||||
selectList: ['runMode', 'singleApproachLockCancelRoute'],
|
||||
generalConfig: [
|
||||
'lockFirst',
|
||||
'switchSingleHandle',
|
||||
@ -123,7 +122,7 @@ export default {
|
||||
'switchNRTurnChain',
|
||||
'switchSingleLockChain',
|
||||
'switchLossChain',
|
||||
'signalForceCancelRoute',
|
||||
'singleApproachLockCancelRoute',
|
||||
'runMode',
|
||||
'initSingleLockSwitch',
|
||||
'ctcOverlapOnlyTurnBackStationLock',
|
||||
@ -165,7 +164,8 @@ export default {
|
||||
speedList: ['rmAtpSpeed', 'urmAtpSpeed'],
|
||||
numberList: ['figuresOfTripNumber', 'figuresOfServiceNumber'],
|
||||
optionsMap: {
|
||||
runMode:[{label: 'CBTC级别', value: 'CBTC'}, {label: '点式通信', value: 'ITC'}, {label: '联锁级', value: 'IL'}]
|
||||
runMode:[{label: 'CBTC级别', value: 'CBTC'}, {label: '点式通信', value: 'ITC'}, {label: '联锁级', value: 'IL'}],
|
||||
singleApproachLockCancelRoute: [{label: '不能取消', value: 'NOT'}, {label: '延时取消', value: 'DELAY'}, {label: '直接取消', value: 'DIRECT'}]
|
||||
},
|
||||
remarkMap: {
|
||||
lockFirst: '是否先锁闭——办理过程直接先锁闭区段',
|
||||
@ -173,7 +173,7 @@ export default {
|
||||
switchSingleHandle: '道岔区段状态改变按单个道岔处理',
|
||||
switchNRTurnChain:'道岔正/反操是否联动',
|
||||
switchSingleLockChain:'道岔单解/锁是否联动',
|
||||
signalForceCancelRoute:'是否强制取消进路/在接近区段占用时是否依旧强制执行取消进路',
|
||||
singleApproachLockCancelRoute:'接近区段占用时取消进路方式',
|
||||
runMode:'列车控制模式/级别',
|
||||
initSingleLockSwitch: '初始加载设备时是否默认单锁正线道岔',
|
||||
ctcOverlapOnlyTurnBackStationLock: 'CTC列车进路延续保护仅折返站处锁闭',
|
||||
|
@ -100,34 +100,6 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// initForm(row) {
|
||||
// switch (row.type) {
|
||||
// case 'PSD': {
|
||||
// this.setDeviceConfigFunction = setPsdConfig;
|
||||
// break;
|
||||
// }
|
||||
// case 'SIGNAL': {
|
||||
// this.setDeviceConfigFunction = setSignalConfig;
|
||||
// break;
|
||||
// }
|
||||
// case 'SWITCH': {
|
||||
// this.setDeviceConfigFunction = setSwitchConfig;
|
||||
// break;
|
||||
// }
|
||||
// case 'PSL': {
|
||||
// this.setDeviceConfigFunction = setPslConfig;
|
||||
// break;
|
||||
// }
|
||||
// case 'PSC': {
|
||||
// this.setDeviceConfigFunction = setPscConfig;
|
||||
// break;
|
||||
// }
|
||||
// case 'SECTION': {
|
||||
// this.setDeviceConfigFunction = setSectionConfig;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
initData(row) {
|
||||
this.jsonConfig = '{}';
|
||||
getDeviceDetail(row.id).then(resp => {
|
||||
|
Loading…
Reference in New Issue
Block a user