Merge remote-tracking branch 'origin/test'

This commit is contained in:
fan 2021-08-05 18:26:56 +08:00
commit da2ed7c5f1
39 changed files with 1422 additions and 178 deletions

View File

@ -674,3 +674,57 @@ export function noOverlap(mapId) {
method: 'put'
});
}
// 创建进路
export function createRoute(mapId, data) {
return request({
url: `/api/draftMap/${mapId}/route`,
method: 'post',
data
});
}
// 创建延续保护
export function createOverlap(mapId, data) {
return request({
url: `/api/draftMap/${mapId}/overlap`,
method: 'post',
data
});
}
// 创建超限区段
export function createOverrunSection(mapId, data) {
return request({
url: `/api/draftMap/${mapId}/overrun`,
method: 'post',
data
});
}
// 分页查询超限区段
export function queryOverrunSectionPaging(mapId, params) {
return request({
url: `/api/draftMap/${mapId}/overrun/paging`,
method: 'get',
params
});
}
// 更新超限区段
export function updateOverrunSection(mapId, data) {
return request({
url: `/api/draftMap/${mapId}/overrun/${data.code}`,
method: 'put',
data
});
}
// 删除超限区段
export function deleteOverrunSection(mapId, code) {
return request({
url: `/api/draftMap/${mapId}/overrun/${code}`,
method: 'delete'
});
}
// 查询超限区段list
export function queryOverunSectionList(mapId) {
return request({
url: `/api/draftMap/${mapId}/overrun/all`,
method: 'get'
});
}

View File

@ -210,13 +210,13 @@ export function SignalList() {
posx = posx - 7;
}
signaldata.position.set(posx,0,section.railpoint[0].z-3);
signaldata.position.set(posx,0,section.railpoint[0].z-2);
signaldata.rotation.z = ( Math.PI / 2 );
}else if(signaldata.right == true){
if(section.standTrack == true){
posx = posx + 7;
}
signaldata.position.set(posx,0,section.railpoint[0].z+3);
signaldata.position.set(posx,0,section.railpoint[0].z+2);
signaldata.rotation.z = ( - Math.PI / 2 );
}
j = sectiondata.length;

View File

@ -35,7 +35,9 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
//定义当前课程角色
let nowRole = "";
//考试课程
let examList = [];
let examData = {};
//定义场景(渲染容器)
scene = new THREE.Scene();
scene.background = new THREE.Color(0xa0a0a0);
@ -117,6 +119,29 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
controlManager.initRoleMode(roleMode);
console.log(assetModelManager);
for(let i=0;i<lessonData.lessonProgress.length;i++){
if(nowRole == lessonData.lessonProgress[i].roleName){
examList.push(
{
index:i,
score:10,
isTrue:false,
}
);
}
}
examData = {
allScore:examList.length*10,
lastScore:0,
allStep:examList.length,
trueStep:[],
falseStep:[],
nowStep:0,
time:0,
};
updataExamStatus(examData);
// if(lessonData.lessonProgress[lessonIndex].action.length>0){
controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,roleMode,assetModelManager.lessonTriggerList[scope.nowSceneType]);

View File

@ -145,6 +145,7 @@ class SkinCode extends defaultStyle {
defaultColor: '#FFFFFF', // 信号灯字体默认色
blockColor: '#FFFFFF', // 信号灯字体锁定颜色
checkColor: '#00FF00', // 信号字体
conflictColor:'#FF0000', // 冲突进路始端信号机颜色
nameBorderShow: true // 信号机名字边框显示
},
lamp: {

View File

@ -77,6 +77,7 @@ deviceState[deviceType.Signal] = {
redOpen: 1, // 红灯开放(默认状态)
delayTime: 0, // 信号机延迟解锁倒计时
atsControl: 1, // 0是人工1是自动
checkConflict:0, // 0是不检查冲突1是检测冲突检测冲突进路
fault: 0, // 是否故障
isStartSignal: 0, // 是否进路排列选中始端信号机
isTerminalSignal: 0, // 是否进路排列待选终端信号机
@ -254,5 +255,5 @@ deviceState[deviceType.Train] = {
deviceState[deviceType.Responder] = {
};
deviceState[deviceType.IndicatorLight] = {
}
};
export default deviceState;

View File

@ -568,11 +568,13 @@ class Jlmap {
routeStartSignalData[item.code].forEach((elem, index)=> {
if (index) {
status.atsControl = status.atsControl && elem.atsControl;
status.checkConflict = status.checkConflict || elem.checkConflict;
status.fleetMode = status.fleetMode || elem.fleetMode;
status.ciControl = status.ciControl || elem.ciControl;
status.lock = status.lock || elem.lock;
} else {
status.atsControl = elem.atsControl;
status.checkConflict = elem.checkConflict;
status.fleetMode = elem.fleetMode;
status.ciControl = elem.ciControl;
status.lock = elem.lock;

View File

@ -994,6 +994,7 @@ class Signal extends Group {
!model.atsControl && this.setArtificialRouteClose(); /** 进路交人工控或自动控 */
}
}
// 设置点灯类型 必须在最后设置不能放前面 logicLight 0 物理点灯 1 逻辑点灯
if (model.logicLight) {
this.logicalLight(); // 设置逻辑点灯
@ -1061,6 +1062,11 @@ class Signal extends Group {
if (model.noStatus || model.level === 0) {
this.setAshShow();
}
// 冲突检查状态
if (this.style.Signal.text.conflictColor && model.checkConflict) {
this.sigName.setColor(this.style.Signal.text.conflictColor);
}
}
}

View File

@ -39,9 +39,14 @@
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="控制状态" width="100">
<el-table-column prop="status" label="控制状态" width="150">
<template slot-scope="scope">
<div v-if="systemName=='xian-01__systerm'">
{{ scope.row.atsControl == '0' ? '人工' : scope.row.checkConflict?'自动 (进行冲突检查)':'自动 (不进行冲突检查)' }}
</div>
<div v-else>
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
</div>
</template>
</el-table-column>
</el-table>

View File

@ -48,6 +48,21 @@
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column v-if="systemName == 'xian-01__systerm'" prop="atsControl" label="控制状态" style="margin-left:30px">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.atsControl==0?'人工':'自动' }}</span>
</template>
</el-table-column>
<el-table-column v-if="systemName == 'xian-01__systerm'" prop="conflict" label="冲突检测" style="margin-left:30px">
<template v-if="title == '进路交ATS自动控'&& scope.row.atsControl==0" slot-scope="scope">
<el-checkbox
v-model="checkConflictList[scope.$index].value"
style="text-align: center; display: block;"
/>
<!-- @change="changeCheckConflit(checkConflictMap[scope.row.code],scope.row.code)" -->
<!-- :disabled="scope.row.disabled" -->
</template>
</el-table-column>
<el-table-column v-if="systemName === 'xian-01__systerm'" width="200">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ getProtectedSectionName(scope.row) }}</span>
@ -113,6 +128,8 @@ export default {
signalName: '',
allSelect: false,
changeList:[],
checkConflictList:[],
selectedCheckConflict:[],
commitDisabled: true,
disabledLength: 0
};
@ -152,7 +169,12 @@ export default {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return '进路交人工控';
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
if (this.systemName == 'xian-01__systerm') {
return '进路交ATS自动控';
} else {
return '进路交自动控';
}
} else {
return '';
}
@ -171,6 +193,8 @@ export default {
this.selected = selected;
this.allSelect = false;
this.changeList = [];
this.checkConflictList = [];
// .splice(0, this.checkConflictList.length - 1);
this.commitDisabled = true;
this.selection = [];
this.disabledLength = 0;
@ -187,18 +211,28 @@ export default {
}
if (tempData && tempData.length > 0) {
const that = this;
tempData.forEach(elem => {
this.changeList.push(false);
that.changeList.push(false);
elem.disabled = false;
//
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
(elem.atsControl == '0')) {
elem.disabled = true;
this.disabledLength++;
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
(elem.atsControl == '1')) {
that.disabledLength++;
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
if (elem.atsControl == '1') {
elem.disabled = true;
this.disabledLength++;
that.disabledLength++;
that.checkConflictList.push({code:elem.code, value:null});
} else {
if (that.systemName == 'xian-01__systerm') {
that.checkConflictList.push({code:elem.code, value:false});
// that.$set('checkConflictMap', elem.code, );
// that.checkConflictMap[elem.code] = false;
}
}
}
});
}
@ -224,6 +258,16 @@ export default {
this.$store.dispatch('training/emitTipFresh');
// mouseCancelState(this.selected);
},
changeCheckConflit(check, code) {
// debugger;
// this.checkConflictMap;
// this.$set('checkConflictMap', code, check);
// if (check) {
// this.checkConflictMap[code] = false;
// } else {
// this.checkConflictMap[code] = true;
// }
},
changeCheck(check, code) {
if (check) {
this.selection.push(code);
@ -261,9 +305,10 @@ export default {
if (row && row.overlapCode && this.overlapData[row.overlapCode] &&
this.overlapData[row.overlapCode].pathList.length &&
this.overlapData[row.overlapCode].pathList[0].switchPositionList.length) {
const switchDevice = this.$store.getters['map/getDeviceByCode'](this.overlapData[row.overlapCode].pathList[0].switchPositionList[0].switchCode);
const switchLength = this.overlapData[row.overlapCode].pathList[0].switchPositionList.length;
const switchDevice = this.$store.getters['map/getDeviceByCode'](this.overlapData[row.overlapCode].pathList[0].switchPositionList[switchLength - 1].switchCode);
if (switchDevice) {
name = switchDevice.name + (this.overlapData[row.overlapCode].pathList[0].switchPositionList[0].normal ? '定位保护' : '反位保护');
name = switchDevice.name + (this.overlapData[row.overlapCode].pathList[0].switchPositionList[switchLength - 1].normal ? '定位保护' : '反位保护');
}
}
return name;
@ -345,7 +390,7 @@ export default {
operate.message = `命令:进路交人工控<br/>始端信号机:${this.stationName} ${this.signalName}` + msg;
this.$refs.ningBoConfirmTip.doShow(operate);
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
@ -356,7 +401,7 @@ export default {
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
@ -380,13 +425,22 @@ export default {
operate.message = `命令:进路交自动控<br/>始端信号机:${this.stationName} ${this.signalName}` + msg;
this.$refs.ningBoConfirmTip.doShow(operate);
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
} else {
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2, {val}).then(({valid})=>{
const params = {routeCodeList:this.selection};
if (this.systemName === 'xian-01__systerm') {
const checkConflictList = [];
this.selection.forEach(each=>{
const checkConflict = this.checkConflictList.find(check=>{ return check.code == each; });
if (checkConflict) { checkConflictList.push(checkConflict.value); }
});
params.checkConflictList = checkConflictList;
}
commitOperate(menuOperate.Signal.atsAutoControl, params, 2, {val}).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();

View File

@ -149,7 +149,12 @@ export const menuOperate = {
signalTotalCancle:{ // 信号机总取消
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_TOTAL_CANCLE
},
signalConflictRoute:{ // 冲突进路办理
operation: OperationEvent.Signal.signalConflictRoute.menu.operation,
cmdType:CMD.Signal.CMD_SIGNAL_CONFLICT_ROUTE_SET_CONFIRM
}
// Signal_Conflict_Route_Set_Confirm
},
Switch:{
lock:{

View File

@ -0,0 +1,186 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="conflictRoute"
:class="systemName+' route-hand-control'"
title="冲突进路办理确认"
:visible.sync="show"
width="435px"
:before-close="closeDialog"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div>
<div>
<div class="conflictRoute">
<span class="conflictRouteTitle">冲突进路</span>
<span class="conflictRouteName">{{ routeName }}</span>
</div>
</div>
<div class="conflictDescription">冲突描述</div>
<div class="context">
{{ message }}
</div>
<!-- <div class="conflictTips">距离对话框关闭还有{{ minutes }}{{ seconds }}请确认是否办理冲突进路</div> -->
<el-row justify="center" class="button-group">
<el-col :span="7" :offset="3">
<el-button
style="width: 115px;"
:loading="loading"
@click="selectConflict"
>选排冲突进路</el-button>
</el-col>
<!-- :id="domIdConfirm" -->
<!-- :disabled="commitDisabled" -->
<!-- :id="domIdCancel" -->
<el-col :span="7" :offset="3">
<el-button style="width: 115px;" :loading="loading" @click="routeRunplan">按计划执行</el-button>
</el-col>
</el-row>
</div>
</el-dialog>
<notice-info ref="noticeInfo" pop-class="xian-01__systerm" />
</div>
</template>
<script>
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name:'ConflictRoute',
components: {
NoticeInfo
},
props:{
systemName:{
type:String,
required:true
}
},
data() {
return {
dialogShow: false,
message:'',
routeCode:'',
routeName:'',
// allMinutes:10 * 60,
// minutes:10,
// seconds:0,
// inter:null,
loading:false
};
},
computed:{
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}
},
methods:{
doShow({route, description}) {
if (route) {
this.routeCode = route.code;
const station = this.$store.getters['map/getDeviceByCode'](route.stationCode);
if (station) {
this.routeName = station.name + ' ' + route.name;
} else {
this.routeName = route.name;
}
}
this.message = description;
this.dialogShow = true;
this.$nextTick(function () {
// this.inter = setInterval(()=>{
// if (this.allMinutes <= 0) {
// clearInterval(this.inter);
// this.routeRunplan();
// }
// this.allMinutes--;
// this.minutes = (this.allMinutes - this.allMinutes % 60) / 60;
// this.seconds = this.allMinutes % 60;
// }, 1000);
this.$store.dispatch('training/emitTipFresh');
});
},
closeDialog() {
const that = this;
// clearInterval(this.inter);
commitOperate(menuOperate.Signal.signalConflictRoute, {routeCode:this.routeCode, way:1}, 3).then(({valid, operate})=>{
if (valid) {
that.doClose();
}
}).catch(error=>{
this.dialogShow = false;
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
selectConflict() {
this.commit(2);
},
routeRunplan() {
this.commit(1);
},
commit(way) {
this.loading = true;
// int way, 1-2-
commitOperate(menuOperate.Signal.signalConflictRoute, {routeCode:this.routeCode, way:way}, 3).then(({valid, operate})=>{
this.loading = false;
if (valid) {
this.doClose();
// this.$refs.routeControl.doShow(operate, this.selected);
}
}).catch(error=>{
this.loading = false;
console.error(error);
this.$refs.noticeInfo.doShow();
});
}
}
};
</script>
<style>
.conflictRoute .context {
margin:5px 13px 13px 13px;
padding-bottom: 10px !important;
border: 1px solid lightgray;
line-height: 138%;
font-size: 15px;
height:115px;
}
.conflictDescription{
margin-left:13px;
font-size: 15px;
margin-top: 5px;
}
.conflictRoute{
padding-left: 13px;
font-size: 15px;
width: 100%;
padding-right: 13px;
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
align-content: center;
justify-content: flex-start;
align-items: flex-start;
}
.conflictRouteName{
font-size: 15px;
height: 23px;
border: 2px inset #E2E2E2;
padding-left: 5px;
flex-grow: 1;
}
.conflictRouteTitle{
}
.conflictTips{
margin-left: 13px;
}
</style>

View File

@ -105,9 +105,10 @@ export default {
if (row && row.overlapCode && this.overlapData[row.overlapCode] &&
this.overlapData[row.overlapCode].pathList.length &&
this.overlapData[row.overlapCode].pathList[0].switchPositionList.length) {
const switchDevice = this.$store.getters['map/getDeviceByCode'](this.overlapData[row.overlapCode].pathList[0].switchPositionList[0].switchCode);
const switchLength = this.overlapData[row.overlapCode].pathList[0].switchPositionList.length;
const switchDevice = this.$store.getters['map/getDeviceByCode'](this.overlapData[row.overlapCode].pathList[0].switchPositionList[switchLength - 1].switchCode);
if (switchDevice) {
name = switchDevice.name + (this.overlapData[row.overlapCode].pathList[0].switchPositionList[0].normal ? '定位保护' : '反位保护');
name = switchDevice.name + (this.overlapData[row.overlapCode].pathList[0].switchPositionList[switchLength - 1].normal ? '定位保护' : '反位保护');
}
}
return name;

View File

@ -9,6 +9,7 @@
<route-hand-control ref="routeHandControl" system-name="xian-01__systerm" />
<route-detail ref="routeDetail" system-name="xian-01__systerm" />
<set-fault ref="setFault" pop-class="xian-01__systerm" />
<conflict-route ref="conflictRoute" system-name="xian-01__systerm" />
</div>
</template>
@ -27,6 +28,7 @@ import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import ConflictRoute from './dialog/conflictRoute';
export default {
name: 'SignalMenu',
@ -39,6 +41,7 @@ export default {
RouteHandControl,
RouteDetail,
NoticeInfo,
ConflictRoute,
SetFault
},
props: {
@ -239,18 +242,39 @@ export default {
} else {
this.doClose();
}
},
'$store.state.socket.simulationAlarmInfo': function(val) {
(val || []).forEach(item => {
if (!item.confirmed && !item.recovered) {
if (item.level === '0') {
if (item.type == 'Conflict_Route_Set') {
const route = this.routeList.find(each=>{ return each.code == item.deviceCode; });
this.$refs.conflictRoute.doShow({route:route, description:item.description});
// doShow();
// "":"Route205",
// "description":"(111046(322)[X2112-X2102](311045)(22_G2202)(21_G2102)"
}
}
}
});
}
},
methods: {
initMenu() {
this.menu = MenuContextHandler.covert(this.menuNormal);
//
const menuItem = this.menu.find( item => item.cmdType === CMD.Signal.CMD_SIGNAL_SET_CI_AUTO);
const menuItemDisabled = menuItem.disabled;
menuItem.disabled = true;
const ciAutoMenuItem = this.menu.find( item => item.cmdType === CMD.Signal.CMD_SIGNAL_SET_CI_AUTO);
const ciAutoTriggerMenuItem = this.menu.find( item => item.cmdType === CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER);
const ciAutoMenuItemDisabled = ciAutoMenuItem.disabled;
const ciAutoTriggerMenuItemDisabled = ciAutoTriggerMenuItem.disabled;
ciAutoMenuItem.disabled = true;
ciAutoTriggerMenuItem.disabled = true;
this.routeList.forEach(route => {
if (route.startSignalCode === this.selected.code && route.flt) {
menuItem.disabled = menuItemDisabled;
ciAutoMenuItem.disabled = ciAutoMenuItemDisabled;
}
if (route.startSignalCode === this.selected.code && route.arc ) {
ciAutoTriggerMenuItem.disabled = ciAutoTriggerMenuItemDisabled;
}
});
if (this.operatemode === OperateMode.FAULT) {
@ -299,6 +323,9 @@ export default {
commitOperate(menuOperate.Signal.arrangementRoute, { signalCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.routeSelection.doShow(operate, this.selected, this.getRouteList(this.selected));
// const route = this.routeList.find(each=>{ return each.code == 'Route205'; });
// this.$refs.conflictRoute.doShow({route:route, description:'(111046(322)[X2112-X2102](311045)(22_G2202)(21_G2102)'});
// this.$refs.conflictRoute.doShow({deviceCode:'Route205', });
}
});
},

View File

@ -126,7 +126,9 @@ export default {
/** 信号机总取消 */
CMD_SIGNAL_TOTAL_CANCLE:{value:'Signal_Total_Cancel', label: '信号机总取消'},
/** 设置保护 */
CMD_SIGNAL_SET_OVERLAP : {value: 'Signal_Set_Overlap', label: '设置保护'}
CMD_SIGNAL_SET_OVERLAP : {value: 'Signal_Set_Overlap', label: '设置保护'},
/** 冲突进路办理 */
CMD_SIGNAL_CONFLICT_ROUTE_SET_CONFIRM:{value: 'Signal_Conflict_Route_Set_Confirm', label: '冲突进路办理'}
},
// 物理区段操作

View File

@ -1703,6 +1703,13 @@ export const OperationEvent = {
operation: '3211',
domId: '_Tips-Signal-setOverlap-Menu{BOTTOM}'
}
},
// 冲突进路办理
signalConflictRoute:{
menu: {
operation: '322',
domId: '_Tips-Signal-conflictRoute-Menu{TOP}'
}
}
},

View File

@ -723,6 +723,7 @@ const map = {
map.stationList.forEach(station => {
if (station.ciStation) {
const centrailzedList = [station.code];
state.stationControlMap[station.code] = centrailzedList;
station.relStationCodeList.forEach(relStationCode => {
state.stationControlMap[relStationCode] = centrailzedList;
if (state.mapDevice[relStationCode].centralized) {

View File

@ -2,11 +2,11 @@ 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.8.107:9000'; // 袁琪
// BASE_API = 'http://192.168.2.175:9000'; // 旭强 有线
// BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线
// BASE_API = 'http://192.168.2.183:9000'; // 张赛
BASE_API = 'http://192.168.2.183:9010'; // 张赛
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康

View File

@ -1,18 +1,17 @@
<template>
<div id="lessonprogressdiv" class="lessonprogressdiv">
<div class="progressnum">当前课程页数:{{listLength}}</div>
<el-tabs v-model="activeName" class="activediv" type="card" @tab-click="handleClick">
<el-tab-pane label="课程场景" name="progresslist" >
<draggable v-model="lessonData.lessonData.lessonProgress" group="people" @start="drag=true" @end="drag=false" >
<div class="progressdiv"
:style="{'background-image': 'url('+localstatic+'/lesson3d/sc.png)'}"
v-for="(element,index) in lessonData.lessonData.lessonProgress">
<div class="progressdiv" v-for="(element,index) in lessonData.lessonData.lessonProgress">
<div class="changeprogressdiv" @click="changeProgressView(index)">{{element.progressName}}</div>
<div class="delprogressdiv" @click="removeProgress(index)" >X</div>
<div class="progressdivimg"
:style="{'background-image': 'url('+localstatic+'/lesson3d/sc.png)'}"/>
<div class="delprogressdiv" @click="removeProgress(index)" >删除</div>
</div>
</draggable>
<div class="progressdiv "
<div class="progressdivadd "
:style="{'background-image': 'url('+localstatic+'/lesson3d/addbutton.png)'}"
icon="el-icon-folder-add" @click="addProgress"></div>
</el-tab-pane>
@ -21,10 +20,9 @@
<div class="progressdiv"
v-for="(elementtrigger,indextrigger) in triggerList" :key="elementtrigger.label">
<div class="progressdivimg"
:style="{'background-image': 'url('+localstatic+'/lesson3d/box.png)'}"/>
<div class="progressdivtext" @click="selectModel(elementtrigger)">{{elementtrigger.label}}</div>
<div class="progressassetimg"
:style="{'background-image': 'url('+localstatic+'/lesson3d/box.png)'}"/>
<div class="delprogressdiv" v-if="(elementtrigger.showType == 'loadModel')" @click="deleteModel(elementtrigger)" >删除</div>
</div>
@ -57,7 +55,6 @@
progressList:[
],
listLength:0,
progressIndex:0,
}
},
@ -121,11 +118,7 @@
border:solid 2px #000;
overflow-y: auto;
}
.progressnum{
position: absolute;
right:10px;
top:5px;
}
.progressdiv{
width:80px;
height:100px;
@ -134,8 +127,26 @@
float:left;
border:solid 1px #409EFF;
}
.progressdivadd{
width:80px;
height:80px;
// display:inline;
margin: 20px;
float:left;
border:solid 1px #409EFF;
background-size: 100%;
}
.progressdivimg{
width:80px;
height:60px;
// margin-left: 5px;
// left:5px;
background-size: 100%;
// display:inline;
float:left;
background-repeat: no-repeat;
}
.progressassetimg{
width:70px;
height:70px;
margin-left: 5px;
@ -149,7 +160,7 @@
height:30px;
margin: 0;
// display:inline;
float:left;
float:right;
bottom: 0;
border:solid 1px #409EFF;
font-size: 15px;
@ -157,19 +168,22 @@
.changeprogressdiv{
// position: relative;
width: 100%;
height: 80%;
width:80px;
height:20px;
text-align: center;
float: right;
right: 0;
bottom: 0;
border:solid 2px #000;
border:solid 2px #409EFF;
}
.delprogressdiv{
// position: relative;
width: 20px;
text-align: center;
width: 80px;
height: 20px;
right: 0;
top: 0;
top: bottom;
float: right;
// position:absolute;
border:solid 2px #409EFF;

View File

@ -10,13 +10,6 @@
<div id="" class="lessonsetupdiv" v-show="showSetup">
<div style="text-align:center;top:10%;font-size:30px">课程内容设置</div>
<el-form ref="form" label-width="80px">
<el-form-item label="考试模式">
<el-switch
v-model="examMode"
active-text="开启考试模式"
inactive-text="关闭考试模式">
</el-switch>
</el-form-item>
<el-form-item label="可用角色">
<el-checkbox-group v-model="checkedRole">
@ -82,18 +75,29 @@
当前课程信息
</el-row>
<div class="editmsgdiv">
<el-row>
<el-button @click="saveLesson3dData">保存当前课程</el-button>
正在编辑课程页数:{{lessonEditIndex+1}}
</el-row>
<el-row>
<el-button @click="setupclick">课程设置</el-button>
课程总页数:{{lessonData.lessonData.lessonProgress.length}}
</el-row>
<el-row>
<el-button @click="jumpPlayer">预览课程</el-button>
</el-row>
<el-row>
<el-button @click="back">退出编辑器</el-button>
考试模式:
<el-switch
v-model="examMode"
active-text="开启考试模式"
inactive-text="关闭考试模式">
</el-switch>
</el-row>
</div>
<div class="editmenudiv">
<el-button class="editbutton" @click="saveLesson3dData">保存课程</el-button>
<el-button class="editbutton" @click="setupclick">课程设置</el-button>
<el-button class="editbutton" @click="jumpPlayer">预览课程</el-button>
<el-button class="editbutton" @click="back">退出编辑</el-button>
</div>
</div>
@ -357,16 +361,7 @@
border:solid 2px #000;
}
.lessonsetup {
position: absolute;
width: 15%;
height: 20%;
right:0;
top:0;
border-radius:10px;
border:solid 2px #000;
text-align:center;
}
.el-tabs__content{
position: absolute;
@ -392,4 +387,36 @@
right:0;
bottom:0;
}
.lessonsetup {
position: absolute;
width: 15%;
height: 20%;
right:0;
top:0;
border-radius:10px;
border:solid 2px #000;
text-align:center;
}
.editmsgdiv{
width:100%;
height:40%;
float:left;
border:solid 2px #000;
text-align: left;
}
.editmenudiv{
width:100%;
height:40%;
float:left;
position: relative;
}
.editbutton{
width:44%;
height:42%;
margin:3%;
text-align: center;
float: left;
// position: relative;
}
</style>

View File

@ -1,5 +1,8 @@
<template>
<div class="explainpanediv" v-if="lessonData.lessonData.lessonProgress[lessonEditIndex]" @click="selectTool">
<div class="explainpanediv"
v-if="lessonData.lessonData.lessonProgress[lessonEditIndex]"
:style="{'background-image': 'url('+lessonbg+')'}"
@click="selectTool">
<!-- <div class="explainpanetittle" >
{{lessonData.lessonData.lessonProgress[lessonEditIndex].explainPane.tittle}}
</div> -->
@ -32,6 +35,7 @@
return {
localStatic:BASE_ASSET_API,
staticImg:JL3D_LOCAL_STATIC,
lessonbg:JL3D_LOCAL_STATIC+"/lesson3d/lessonbg.png",
}
},
computed: {
@ -66,14 +70,13 @@
top:0;
border-radius:10px;
border:solid 2px #000;
background-color: #fff;
color:#000;
color:#fff;
z-index:1;
}
.explainpanetittle{
// height:15%;
text-align: center;
font-size: 20px;
font-size: 25px;
}
.explainpanepic{
@ -89,7 +92,7 @@
position:relative;
left:5%;
width:90%;
font-size: 14px;
font-size: 20px;
// height:20%;
}

View File

@ -1,13 +1,22 @@
<template>
<div class="jobpanediv">
<div class="jobshowbutton" @click="openList">岗位联络</div>
<div class="joblistdiv" v-show="showJobList">
<div class="jobdiv" v-for="(jobitem,index) in jobList" @click="selectJob(jobitem)" >{{jobitem.name}}</div>
<div class="jobshowbutton" @click="openList"
:style="{'background-image': 'url('+lessonbg+')'}"
>岗位联络</div>
<div class="joblistdiv" v-show="showJobList"
:style="{'background-image': 'url('+lessonbg+')'}">
<div class="jobdiv" v-for="(jobitem,index) in jobList" @click="selectJob(jobitem)" >
<img :src="jobpic" />
<div class="jobdivtext" >{{jobitem.name}}</div></div>
</div>
<div class="jobtab" v-if="selectedJob">
<div class="jobtab" v-if="selectedJob"
:style="{'background-image': 'url('+lessonbg+')'}">
<div class="jobtabmsg" >
<div class="jobtabmsgdiv" >{{selectedJob.name}}</div>
<div class="jobtabmsgdiv" >
<img :src="jobpic" />
<div class="jobdivtext" >{{selectedJob.name}}</div>
</div>
<div class="jobtabmsgtext" >{{selectedJob.text}}</div>
</div>
<div class="eltabpaneover" >
@ -48,6 +57,9 @@
showJobList:false,
showJob:false,
selectedJob:null,
lessonbg:JL3D_LOCAL_STATIC+"/lesson3d/lessonbg.png",
lkgwbg:JL3D_LOCAL_STATIC+"/lesson3d/lkgw.png",
jobpic:JL3D_LOCAL_STATIC+"/lesson3d/jobpic.png",
}
},
computed: {
@ -130,7 +142,6 @@
left:0;
bottom:0;
border:solid 2px #000;
background-color: #fff;
}
.joblistdiv{
@ -147,11 +158,11 @@
.jobdiv{
width:75px;
height:75px;
height:90px;
margin-top: 5px;
margin-left: 2px;
border:solid 2px #000;
background-color: #fff;
color:#fff;
}
@ -162,7 +173,6 @@
bottom:50px;
width: 300px;
height:450px;
background-color: #fff;
}
.eltabpaneover{
@ -171,7 +181,12 @@
overflow-y:auto;
overflow-x:hidden;
}
.jobdivtext{
// position: absolute;
bottom: 0;
font-size: 13px;
text-align: center;
}
.jobtabmsg{
width:300px;
height:100px;
@ -181,21 +196,21 @@
.jobtabmsgdiv{
width:80px;
height:80px;
height:90px;
position:absolute;
top:10px;
left:5px;
border:solid 2px #000;
background-color: #fff;
color:#fff;
}
.jobtabmsgtext{
width:200px;
height:80px;
height:90px;
// margin-top: 5px;
// margin-left: 2px;
border:solid 2px #000;
background-color: #fff;
color:#fff;
position: absolute;
font-size: 12px;
right:10px;

View File

@ -1,8 +1,9 @@
<template>
<div class="processlogdiv" >
<el-tabs type="border-card">
<el-tab-pane label="进程">
<el-tabs type="border-card"
:style="{'background-image': 'url('+lessonbg+')'}">
<el-tab-pane label="进程" style="overflow-y:auto;">
<div class="processtext" >
{{processText}}
</div>
@ -32,6 +33,7 @@
},
data() {
return {
lessonbg:JL3D_LOCAL_STATIC+"/lesson3d/lessonbg.png",
processText:"",
logText:"",
}
@ -78,5 +80,4 @@
font-size: 16px;
}
</style>

View File

@ -1,5 +1,8 @@
<template>
<div class="stepstipsdiv" v-if="lessonData.lessonData.lessonProgress[lessonEditIndex]" @click="selectTool">
<div class="stepstipsdiv"
v-if="lessonData.lessonData.lessonProgress[lessonEditIndex]"
@click="selectTool"
:style="{'background-image': 'url('+lessonbg+')'}">
<div class="stepstipstittle" >
{{lessonData.lessonData.lessonProgress[lessonEditIndex].stepTipsData.tittle}}
</div>
@ -21,7 +24,7 @@
},
data() {
return {
lessonbg:JL3D_LOCAL_STATIC+"/lesson3d/lessonbg.png",
}
},
computed: {
@ -60,7 +63,6 @@
top:0;
border-radius:10px;
border:solid 2px #000;
background-color: #fff;
z-index:1;
}
.stepstipstittle{

View File

@ -1,17 +1,29 @@
<template>
<div class="toolbardiv" >
<div class="toolbarbutton" @click="openGuide"></div>
<div class="toolbarbutton" @click="openBag"></div>
<div class="toolbarbutton" ></div>
<div class="toolbardiv" :style="{'background-image': 'url('+lessonbg+')'}">
<div class="toolbarbutton"
:style="{'background-image': 'url('+localstatic+'/lesson3d/guide.png)'}"
@click="openGuide"></div>
<div class="toolbarguides" v-show="showGuide">
<div class="toolbarbutton"
:style="{'background-image': 'url('+localstatic+'/lesson3d/bag.png)'}"
@click="openBag"></div>
<div class="toolbarbutton"
:style="{'background-image': 'url('+localstatic+'/lesson3d/back.png)'}">
</div>
<div class="toolbarguides"
:style="{'background-image': 'url('+lessonbg+')'}"
v-show="showGuide">
<div class="toolbarguide" v-for="(guide,index) in guideList">
{{guide.name}}
</div>
</div>
<div class="toolbarbag" v-show="showBag">
<div class="toolbarbag"
:style="{'background-image': 'url('+lessonbg+')'}"
v-show="showBag">
<div class="toolbarplaid" v-for="(tool,index) in toolsList"></div>
</div>
</div>
@ -28,6 +40,8 @@
},
data() {
return {
localstatic:JL3D_LOCAL_STATIC,
lessonbg:JL3D_LOCAL_STATIC+"/lesson3d/lessonbg.png",
tipsTittle:"步骤一",
tipsText:"步骤一",
guideList:[],
@ -146,6 +160,7 @@
border-radius:10px;
border:solid 2px #000;
margin: 2px;
background-repeat: no-repeat;
}
.toolbarguides{
@ -157,21 +172,25 @@
overflow-y: auto;
overflow-x: hidden;
border-radius:10px;
color: #fff;
border:solid 2px #000;
text-align: center;
}
.toolbarguide{
margin-top: 5px;
width: 90px;
height: 30px;
border-radius:10px;
border:solid 2px #000;
font-size: 20px;
margin: 5px;
}
.toolbarbag{
position: absolute;
bottom: 80px;
left:0;
top: 80px;
right:0;
width:240px;
height:320px;
overflow-y: auto;

View File

@ -17,6 +17,23 @@
</div>
</div>
<div class="lessontopdiv"
:style="{'background-image': 'url('+lessonbg+')'}">
<div class="lessontopdivtittle"
:style="{'background-image': 'url('+lessonbg+')'}">
课程:{{lessonMsg.lessonTittle}}
</div>
<div class="lessontopdivmsg"
:style="{'background-image': 'url('+lessonbg+')'}">
用户ID:{{lessonMsg.userId}}
</div>
<div class="lessontopdivmsg"
:style="{'background-image': 'url('+lessonbg+')'}"
v-if="lessonMsg.userJob">
当前岗位:{{lessonMsg.userJob}}
</div>
</div>
<div class="lesson3dplayer">
<Step-Tips
:lessonData='lessonData'
@ -57,6 +74,26 @@
</div>
</div>
<div class="lessondowndiv"
:style="{'background-image': 'url('+lessonbg+')'}">
<div class="lessondowndivroommsg"
:style="{'background-image': 'url('+lessonbg+')'}">
房间编号:1
</div>
<div class="lessondowndivmsg"
:style="{'background-image': 'url('+lessonbg+')'}">
考试计时:{{this.playTime.h}}:{{this.playTime.m}}:{{this.playTime.s}}
</div>
<div class="lessondowndivmsg"
:style="{'background-image': 'url('+lessonbg+')'}">
考核步骤:{{examStatus.nowStep}}/{{examStatus.allStep}}
</div>
<div class="lessondowndivmsg"
:style="{'background-image': 'url('+lessonbg+')'}">
考试得分:{{examStatus.lastScore}}/{{examStatus.allScore}}
</div>
</div>
<canvas id="canvastexture" width="128px" height="64px"></canvas>
</div>
@ -97,8 +134,25 @@
},
data() {
return {
lessonbg:JL3D_LOCAL_STATIC+"/lesson3d/lessonbg.png",
staticImg:JL3D_LOCAL_STATIC,
examStatus:{
allScore:0,
nowStep:0,
lastScore:0,
allStep:0,
trueStep:[],
falseStep:[],
time:0,
},
playTime:{
h:0,
m:0,
s:0,
},
time:'',
showSelectJob:true,
lessonMsg:{},
selectJobList:[],
nowRole:"",
jl3d: null,
@ -152,6 +206,7 @@
window.jumpEvent = this.jumpEvent;
window.actionEvent = this.actionEvent;
window.startLesson = this.startLesson;
window.updataExamStatus = this.updataExamStatus;
this.init(this.$route.query.lessonId);
},
beforeDestroy() {
@ -170,7 +225,13 @@
this.jobPaneData = new JobPaneData();
let loadData;
if(data.data.data){
this.lessonMsg = {
lessonTittle:data.data.name,
userId:data.data.userId,
userJob:"",
};
loadData = JSON.parse(data.data.data);
if(loadData.setup.checkedRole.length == 0){
@ -190,20 +251,63 @@
}
console.log("loaddata----------------");
console.log(loadData);
console.log(this.lessonMsg);
this.jl3d = new Lesson3dPlayer(dom,loadData,this.lessonPlayIndex);
}).catch(() => {
});
},
updataExamStatus(newExamStatus){
this.examStatus = newExamStatus;
},
selectJob(job){
this.showSelectJob = false;
for(let i=0;i<this.jobPaneData.dataList.length;i++){
if(job == this.jobPaneData.dataList[i].name){
this.nowRole = this.jobPaneData.dataList[i].value;
console.log(this.nowRole);
this.lessonMsg.userJob = job;
this.jl3d.initNowRole(this.nowRole);
}
}
},
timeStart(){
this.time =setInterval(this.timer,50)
},
timer () {//
// this.ms =this.ms +50 //
// if (this.ms >=1000) {
// this.ms =0
// this.second =this.second +1 //
// }
//
// if (this.second >=60) {
// this.second =0
// this.minute =this.minute +1 //
// }
//
// if (this.minute >=60) {
// this.minute =0
// this.hour =this.hour +1 //
// }
// this.str =this.toDub(this.hour) +':' +this.toDub(this.minute) +':' +this.toDub(this.second)/*+""+this.toDubms(this.ms)+""*/
//
// this.playTime.s = parseInt(count % 60);
// this.playTime.m = parseInt(count / 60) % 60;
// this.playTime.h = parseInt(count / 60 / 60);
},
toDub (n) {//0
if (n <10) {
return '0' + n
}else {
return '' + n
}
},
stopTime () {
clearInterval(this.time);
},
startLesson(){
this.$refs.processlog.startLog();
},
@ -293,6 +397,74 @@
}
.lessontopdiv{
width:100%;
height: 50px;
position: absolute;
top:0;
border-radius:10px;
border:solid 2px #000;
z-index: 10;
color:#fff;
}
.lessontopdivtittle{
width: 33%;
height:50px;
position: absolute;
left:0;
text-align: center;
font-size: 30px;
line-height: 40px;
border-radius:10px;
border:solid 2px #000;
}
.lessontopdivmsg{
width: 20%;
height:49px;
position: relative;
float:right;
text-align: center;
font-size: 18px;
line-height: 40px;
border-radius:10px;
border:solid 2px #000;
}
.lessondowndiv{
width:100%;
height: 40px;
position: absolute;
bottom:0;
border-radius:10px;
border:solid 2px #000;
z-index: 10;
color:#fff;
font-size: 18px;
line-height: 25px;
}
.lessondowndivroommsg{
width: 20%;
height:38px;
position: absolute;
left:0;
text-align: center;
border-radius:10px;
border:solid 2px #000;
}
.lessondowndivmsg{
width: 20%;
height:38px;
position: relative;
float:right;
text-align: center;
border-radius:10px;
border:solid 2px #000;
}
.lesson3ddiv {

View File

@ -69,10 +69,10 @@
@import "src/styles/mixin.scss";
.explainpanediv {
position: absolute;
width: 25%;
height: 25%;
width: 20%;
height: 20%;
left:20%;
top:0;
top:50px;
border-radius:10px;
border:solid 2px #000;
color:#fff;

View File

@ -117,7 +117,7 @@
// height: 500px;
min-width: 100px;
left:0;
bottom:0;
bottom:40px;
// border:solid 2px #000;
z-index:1;
}

View File

@ -91,7 +91,7 @@
width: 550px;
height: 350px;
right:0;
bottom:0;
bottom:40px;
border-radius:10px;
z-index:1;
}

View File

@ -60,7 +60,7 @@
width: 20%;
height: 20%;
left:0;
top:0;
top:50px;
border-radius:10px;
border:solid 2px #000;
// background-color: #223458;

View File

@ -184,7 +184,7 @@
width: 240px;
height: 80px;
right:0;
top:0;
top:50px;
border-radius:10px;
border:solid 2px #000;
z-index:1;

View File

@ -16,8 +16,18 @@
<el-radio :label="false">向左</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="延续保护信号机:" prop="signalCode">
<el-select v-model="addModel.signalCode" filterable>
<el-option
v-for="item in signalList"
:key="item.code"
:label="item.name + '(' + item.code + ')'"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="延续保护解锁区段:" prop="unlockSectionCode">
<el-select v-model="addModel.unlockSectionCode" clearable>
<el-select v-model="addModel.unlockSectionCode" filterable>
<el-option
v-for="item in sectionList"
:key="item.code"
@ -196,7 +206,8 @@ export default {
computed: {
...mapGetters('map', [
'switchList',
'sectionList'
'sectionList',
'signalList'
]),
cardTitle() {
if (this.cardMode === 'generate') {
@ -214,6 +225,12 @@ export default {
const baseRules = {
name: [
{ required: true, message: this.$t('rules.pleaseEnterPathName'), trigger: 'blur' }
],
signalCode: [
{ required: true, message: '请选择延续保护信号机', trigger: 'change' }
],
unlockSectionCode: [
{ required: true, message: '请选择延续保护解锁区段', trigger: 'change' }
]
};
return baseRules;

View File

@ -10,9 +10,8 @@
</div>
</template>
<script>
import { putContinueProtect } from '@/api/jmap/mapdraft';
import { putContinueProtect, createOverlap } from '@/api/jmap/mapdraft';
import ProtectOperate from './protect';
import { EventBus } from '@/scripts/event-bus';
export default {
name:'BigRouteInfo',
@ -67,15 +66,19 @@ export default {
},
save() {
const that = this;
that.$refs.form.validate((valid) => {
if (valid) {
console.log('保存');
}
that.$refs.protect.validate((data) => {
data.mapId = this.$route.params.mapId;
createOverlap(this.$route.params.mapId, data).then(res => {
this.$message.success('保存成功!');
this.$refs.protect.clear();
}).catch(() => {
this.$message.error('保存失败!');
});
});
},
clear() {
if (this.$refs && this.$refs.form && this.mapInfo) {
this.$refs.form.resetFields();
if (this.$refs && this.$refs.protect && this.mapInfo) {
this.$refs.protect.resetFields();
}
},
update() {
@ -84,7 +87,7 @@ export default {
this.$message.success('更新成功!');
this.$refs.protect.clear();
this.isModify = false;
EventBus.$emit('successCI');
// EventBus.$emit('successCI');
}).catch(() => {
this.$message.error('更新失败!');
});

View File

@ -41,6 +41,7 @@ import FlankProtectOperate from './flankProtectOperate/index';
import DwellTimeOperate from './dwellTimeOperate/index';
import DestinationOperate from './destinationOperate/index';
import ContinueProtectOperate from './continueProtectOperate/index';
import OverrunSectionOperate from './overrunSectionOperate/index';
export default {
name: 'DataRelation',
@ -110,7 +111,8 @@ export default {
{label: this.$t('map.automaticSignal'), name:'automatic', menus:AutomaticOperate},
{label: this.$t('map.routing'), name:'routing', menus:RoutingOperate},
{label: '停站时间', name:'dwellTime', menus:DwellTimeOperate},
{label: '设置运行等级', name:'runLevel', menus:RunLevelOperate}
{label: '设置运行等级', name:'runLevel', menus:RunLevelOperate},
{label: '超限区段', name: 'overrun', menus: OverrunSectionOperate }
// ]
];
this.enabledTab = 'route';

View File

@ -0,0 +1,223 @@
<template>
<div v-show="show">
<el-dialog v-dialogDrag v-loading="loading" title="超限区段预览" :visible.sync="show" width="95%" top="1vh" class="dialog_content_box" :before-do-close="doClose" append-to-body>
<div>
<QueryListPage
ref="queryListPage"
:pager-config="pagerConfig"
:query-form="queryForm"
:query-list="queryList"
/>
</div>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { queryOverrunSectionPaging, deleteOverrunSection} from '@/api/jmap/mapdraft';
// import ProtectDetail from './protectDetail';
export default {
name: 'RouteDetail',
props: {
mapInfo: {
type: Object,
default() {
return null;
}
},
overlapList: {
type: Array,
default() {
return [];
}
}
},
data() {
return {
show: false,
loading: false,
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '120px',
queryObject: {
sectionCode: {
type: 'select',
label: '区段',
config: {
data: []
}
},
ciSwitchCode: {
type: 'select',
label: '道岔',
config: {
data: []
}
},
switchCode: {
type: 'select',
label: '防护道岔',
config: {
data: []
}
}
}
}
};
},
computed: {
...mapGetters('map', [
'switchList',
'sectionList'
]),
queryList() {
return {
query: this.queryFunction,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: this.$t('map.code'),
prop: 'code',
width: 150
},
{
title: '区段',
prop: 'sectionCode',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.sectionCode, this.sectionList, ['code', 'name']); },
tagType: (row) => { return ''; }
},
{
title: '道岔',
prop: 'ciSwitch',
type: 'tag',
columnValue: (row) => { return row.ciSwitch ? this.$convertField(row.ciSwitch.switchCode, this.switchList, ['code', 'name']) : ''; },
tagType: (row) => { return ''; }
},
{
title: '道岔位置',
type: 'tag',
prop: 'ciSwitch',
columnValue: (row) => { return row.ciSwitch ? (row.ciSwitch.normal ? '定位' : '反位') : ''; },
tagType: (row) => { return ''; }
},
{
title: '防护的道岔',
type: 'tag',
prop: 'switchCode',
columnValue: (row) => { return this.$convertField(row.switchCode, this.switchList, ['code', 'name']); },
tagType: (row) => { return ''; }
},
{
type: 'button',
title: this.$t('map.operation'),
width: '250',
buttons: [
{
name: this.$t('map.compile'),
handleClick: this.edit
},
{
name: this.$t('map.deleteObj'),
handleClick: this.deleteObj,
type: 'danger'
}
]
}
]
};
}
},
watch: {
sectionList: function (val, old) {
this.initQueryObjectSectionList(val);
},
switchList: function (val, old) {
this.initQueryObjectSwitchList(val);
}
},
mounted() { //
},
methods: {
initQueryObjectSectionList(val) {
const list = [];
if (val && val.length) {
for (let i = 0; i < val.length; i++) {
list.push({ label: `${val[i].name}(${val[i].code})`, value: val[i].code });
}
}
this.queryForm.queryObject.sectionCode.config.data = list;
},
initQueryObjectSwitchList(val) {
const list = [];
if (val && val.length) {
for (let i = 0; i < val.length; i++) {
list.push({ label: `${val[i].name}(${val[i].code})`, value: val[i].code });
}
}
this.queryForm.queryObject.switchCode.config.data = list;
this.queryForm.queryObject.ciSwitchCode.config.data = list;
},
doShow() {
this.show = true;
this.$nextTick(() => {
this.initQueryObjectSectionList(this.sectionList);
this.initQueryObjectSwitchList(this.switchList);
this.$refs.queryListPage && this.$refs.queryListPage.commitQuery();
});
},
doClose() {
this.show = false;
},
queryFunction(params) {
if (this.mapInfo && this.mapInfo.id) {
return queryOverrunSectionPaging(this.mapInfo.id, params);
}
},
edit(index, row) {
this.$emit('routeSelected', row);
this.doClose();
},
deleteObj(index, row) {
if (row) {
this.$confirm('是否确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteOverrunSection(this.$route.params.mapId, row.code).then(response => {
this.reloadTable();
}).catch(() => {
this.$messageBox('删除失败');
});
}).catch(() => {
this.$message.info('已取消删除');
});
}
},
reloadTable() {
if (this.queryList && this.queryList.reload) {
this.queryList.reload();
}
},
selectedObj(index, row) {
this.$emit('setRouteCode', row);
this.show = false;
}
}
};
</script>
<style lang="scss">
.dialog_content_box{
.el-dialog__body{
padding-top: 3px;
}
}
</style>

View File

@ -0,0 +1,66 @@
<template>
<div>
<overrun-detail ref="overrunDetail" :map-info="mapInfo" @routeSelected="routeSelected" />
<overrun-form
ref="overrunForm"
:map-info="mapInfo"
:selected="selected"
:overrun-data="overrunData"
@setCenter="setCenter"
/>
</div>
</template>
<script>
import OverrunDetail from './detail';
import OverrunForm from './overrun';
export default {
name: 'Index',
components: {
OverrunDetail,
OverrunForm
},
props: {
mapInfo: {
type: Object,
default() {
return null;
}
},
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
overrunData: null
};
},
methods: {
setCenter(code) {
this.$emit('setCenter', code);
},
routeSelected(data) {
this.overrunData = data;
if (this.$refs && this.$refs.overrunForm) {
this.$refs.overrunForm.isSave = !data.id;
}
},
previewRouteEvent: function () {
if (this.$refs && this.$refs.overrunDetail) {
this.$refs.overrunDetail.doShow();
}
},
setSelected(selected) {
this.$refs.overrunForm.setSelected(selected);
}
}
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,262 @@
<template>
<div style="height: 100%;" class="route_box_list">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="form" :model="addModel" :rules="rules" label-width="190px" size="mini">
<el-form-item label="区段" prop="sectionCode">
<el-select v-model="addModel.sectionCode" clearable 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 === 'overrunSection' ? 'danger' : 'primary'"
@click="hover('overrunSection')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="道岔" prop="ciSwitch.switchCode">
<el-select v-model="addModel.ciSwitch.switchCode" clearable filterable>
<el-option
v-for="item in switchList"
:key="item.code"
:label="item.name + ' (' + item.code+ ')'"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'overrunSwitch' ? 'danger' : 'primary'"
@click="hover('overrunSwitch')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="道岔位置" prop="ciSwitch.normal">
<el-select v-model="addModel.ciSwitch.normal">
<el-option
v-for="item in SwitchLocateTypeList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="防护道岔" prop="switchCode">
<el-select v-model="addModel.switchCode" clearable filterable>
<el-option
v-for="item in switchList"
:key="item.code"
:label="item.name + '(' + item.code + ')'"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'protectiveSwitch' ? 'danger' : 'primary'"
@click="hover('protectiveSwitch')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
</el-form>
<br>
<div class="draft">
<el-button-group>
<el-button v-if="isSave" type="primary" size="small" :loading="loading" @click="save">保存超限区段</el-button>
<el-button v-else type="warning" size="small" :loading="loading" @click="update">修改超限区段</el-button>
</el-button-group>
</div>
</el-scrollbar>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { updateOverrunSection, createOverrunSection } from '@/api/jmap/mapdraft';
export default {
name: 'RouteOperation',
props: {
selected: {
type: Object,
default() {
return null;
}
},
mapInfo: {
type: Object,
default() {
return null;
}
},
overrunData: {
type: Object,
default() {
return null;
}
}
},
data() {
var validateSection = (rule, value, callback) => {
if (!value && !this.addModel.ciSwitch.switchCode) {
callback(new Error('区段和道岔必须选填其一'));
} else {
if (!this.addModel.ciSwitch.switchCode) {
this.$refs.form.validateField('ciSwitch.switchCode');
}
callback();
}
};
var validateSwitch = (rule, value, callback) => {
if (!value && !this.addModel.sectionCode) {
callback(new Error('区段和道岔必须选填其一'));
} else {
if (!this.addModel.sectionCode) {
this.$refs.form.validateField('sectionCode');
}
callback();
}
};
return {
isSave: true,
field: '',
loading: false,
SwitchLocateTypeList: [
{ name: '定位', code: true },
{ name: '反位', code: false }
],
addModel: {
mapId: '',
code: '',
sectionCode: '',
ciSwitch: {
switchCode: '',
normal: true
},
switchCode: ''
},
rules: {
sectionCode: [
{ validator: validateSection, trigger: 'change' }
],
'ciSwitch.switchCode': [
{ validator: validateSwitch, trigger: 'change' }
]
}
};
},
computed: {
...mapGetters('map', [
'switchList',
'sectionList'
])
},
watch: {
mapInfo(val) {
if (val) {
this.addModel.mapId = val.id;
}
},
overrunData(val, old) {
if (val) {
this.addModel = {
mapId: val.mapId,
code: val.code,
sectionCode: val.sectionCode,
ciSwitch: val.ciSwitch ? val.ciSwitch : { switchCode: '', normal: true },
switchCode: val.switchCode
};
}
}
},
mounted() {
},
methods: {
deviceChange(code) {
this.$emit('setCenter', code);
},
hover(field) {
this.field = field === this.field ? '' : field;
},
save() {
// console.log('');createRoute
this.$refs.form.validate((valid) => {
if (valid) {
const modle = {
mapId: this.mapInfo.id,
code: '',
sectionCode: this.addModel.sectionCode,
ciSwitch: this.addModel.ciSwitch.switchCode ? this.addModel.ciSwitch : null,
switchCode: this.addModel.switchCode
};
createOverrunSection(this.mapInfo.id, modle).then(res => {
this.$message.success('保存超限区段成功!');
this.clear();
}).catch(() => {
this.$message.error('保存超限区段失败!');
});
}
});
},
update() {
this.$refs.form.validate((valid) => {
if (valid) {
const modle = {
mapId: this.mapInfo.id,
code: this.addModel.code,
sectionCode: this.addModel.sectionCode,
ciSwitch: this.addModel.ciSwitch.switchCode ? this.addModel.ciSwitch : null,
switchCode: this.addModel.switchCode
};
updateOverrunSection(this.mapInfo.id, modle).then(res => {
this.$message.success('更新超限区段成功!');
this.clear();
}).catch(() => {
this.$message.error('更新超限区段失败!');
});
}
});
},
clear() {
if (this.$refs && this.$refs.form && this.mapInfo) {
delete this.addModel.id;
this.$refs.form.resetFields();
this.addModel.mapId = this.mapInfo.id;
this.addModel.sectionCode = '';
this.addModel.ciSwitch = { switchCode: '', normal: true };
this.addModel.switchCode = '';
}
},
setSelected(selected) {
if (selected) {
if (selected._type.toUpperCase() === 'Section'.toUpperCase() && selected._type !== '02' && this.field.toUpperCase() === 'overrunSection'.toUpperCase()) {
this.addModel.sectionCode = selected.code;
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase() && this.field.toUpperCase() === 'overrunSwitch'.toUpperCase()) {
this.addModel.ciSwitch.switchCode = selected.code;
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase() && this.field.toUpperCase() === 'protectiveSwitch'.toUpperCase()) {
this.addModel.switchCode = selected.code;
}
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-radio {
margin-right: 10px;
}
/deep/ {
.el-select .el-tag {
height: auto;
display: flex;
align-items: center;
justify-content: center;
padding-right: 15px;
box-sizing: border-box;
white-space: normal;
}
.el-input__suffix{
right: 2px;
}
.draft {
width: 400px;
text-align: center;
margin: 20px auto;
}
}
</style>

View File

@ -149,6 +149,16 @@
@click="hover('routeStationStandList')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="关联超限区段" prop="overrunList">
<el-select v-model="addModel.overrunList" multiple clearable filterable style="width: 220px;">
<el-option
v-for="item in overrunSectionList"
:key="item.code"
:label="getOverrunName(item)"
:value="item.code"
/>
</el-select>
</el-form-item>
</el-form>
<hostile-data ref="hostile" :conflicting-signal-list="addModel.conflictingSignalList" @hover="hover" />
<br>
@ -164,7 +174,7 @@
</template>
<script>
import { mapGetters } from 'vuex';
import { getRouteNewList, getFlankProtectionList, putSetDraftMapRouteById } from '@/api/jmap/mapdraft';
import { getRouteNewList, getFlankProtectionList, putSetDraftMapRouteById, createRoute, queryOverunSectionList } from '@/api/jmap/mapdraft';
import HostileData from './hostileData';
// import { EventBus } from '@/scripts/event-bus';
@ -232,9 +242,11 @@ export default {
flankProtectionList: [],
stationStandList: [], //
overlapCode:'',
overrunList: [], //
conflictingSignalList: [] //
},
// overlapList: [], //
overrunSectionList: [], //
routeList: [] //
};
},
@ -343,6 +355,7 @@ export default {
mounted() {
this.getRouteList();
this.getFlankProtectList();
this.getOverrunSectionList();
// this.initProtectData();
// EventBus.$on('successCI', () => {
// this.initProtectData();
@ -354,6 +367,17 @@ export default {
return station.ciStation;
});
},
getOverrunName(overrun) {
if (overrun.ciSwitch && overrun.ciSwitch.switchCode) {
const switchDevice = this.$store.getters['map/getDeviceByCode'](overrun.ciSwitch.switchCode);
return switchDevice ? overrun.code + '(' + switchDevice.name + '-' + (overrun.ciSwitch.normal ? '定位' : '反位') + ')' : overrun.code;
} else if (overrun.sectionCode) {
const section = this.$store.getters['map/getDeviceByCode'](overrun.sectionCode);
return section ? overrun.code + '(' + section.name + ')' : overrun.code;
} else {
return overrun.code;
}
},
async getRouteList() {
const response = await getRouteNewList(this.$route.params.mapId, { pageSize: 9999, pageNum: 1 });
this.routeList = response.data.list;
@ -364,6 +388,11 @@ export default {
this.$store.dispatch('map/setFlankProtectList', item);
});
},
getOverrunSectionList() {
queryOverunSectionList(this.$route.params.mapId).then(resp => {
this.overrunSectionList = resp.data;
});
},
swictchName(code) {
let name = '';
if (code) {
@ -400,7 +429,18 @@ export default {
return model;
},
save() {
console.log('暂无接口');
// console.log('');createRoute
this.$refs.form.validate((valid) => {
if (valid) {
this.addModel.mapId = this.mapInfo.id;
createRoute(this.mapInfo.id, this.addModel).then(res => {
this.$message.success('保存进路成功!');
this.clear();
}).catch(() => {
this.$message.error('保存进路失败!');
});
}
});
},
update() {
this.$refs.form.validate((valid) => {
@ -425,6 +465,7 @@ export default {
this.addModel.overlapCode = '';
this.addModel.code = '';
this.addModel.conflictingSignalList = [];
this.addModel.overrunList = [];
this.isSave = true;
this.routeCode = '';
this.routeType = '';

View File

@ -85,7 +85,7 @@ export default {
{ prop: 'name', label: '应答器名称', type: 'input' },
{ prop: 'type', label: `应答器类型`, type: 'select', optionLabel: 'name&&value', optionValue: 'value', options: this.responderTypeList },
{ prop: 'sectionCode', label: '关联区段', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.sectionList, buttonType: 'RelSectionCode', hover: this.hover, buttonShowType: this.isSectionButtonType },
{ prop: 'signalCode', label: '关联信号机', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.signalList, buttonType: 'RelSignalCode', hover: this.hover, buttonShowType: this.isSignalButtonType },
{ prop: 'signalCode', label: '关联信号机', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.signalList, buttonType: 'RelSignalCode', hover: this.hover, buttonShowType: this.isSignalButtonType }
]
}
}

View File

@ -145,7 +145,7 @@ export default {
] },
{ prop:'textRotate', label: '文字旋转', type: 'number' },
{ prop: 'sectionCode', label: '关联区段', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.sectionList, buttonType: 'RelModelSectionCode', hover: this.hover, buttonShowType: this.isSectionButtonType },
this.editModel.type === 'VB'? { prop: 'signalCode', label: '关联信号机', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.signalList, buttonType: 'RelModelSignalCode', hover: this.hover, buttonShowType: this.isSignalButtonType } :'',
this.editModel.type === 'VB' || this.editModel.type === 'IB' ? { prop: 'signalCode', label: '关联信号机', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.signalList, buttonType: 'RelModelSignalCode', hover: this.hover, buttonShowType: this.isSignalButtonType } : '',
{ prop: 'stationCode', label: '关联集中站' + ':', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList }
]
},