Merge branch 'test'

This commit is contained in:
Yuan 2022-07-15 18:17:16 +08:00
commit fa8f5dca6c
29 changed files with 1744 additions and 1336 deletions

View File

@ -1,5 +1,6 @@
# just a flag
NODE_ENV = 'local-test'
NODE_ENV = 'test'
VUE_APP_PRO = 'local-test'
# base api
# VUE_APP_BASE_API = 'https://test.joylink.club/jlcloud'

View File

@ -255,6 +255,10 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.SignalButton] = {
shape: 'roundWithDock'
}
// 供电线路
this[deviceType.Power] = {
noElectricStrokeColor:'#808080', // 无电颜色

View File

@ -83,7 +83,10 @@ class Jlmap {
loadStyle(lineCode) {
return selectLineCode(lineCode);
}
reloadStyle(lineCode) {
this.style = selectLineCode(lineCode);
this.$zr.dom.style.backgroundColor = this.style.backgroundColor || '#000';
}
loadDefaultState() { // 加载默认状态
const defaultStateDict = {};

View File

@ -34,7 +34,7 @@ export default class Line2 extends Group {
create() {
const model = this.model;
const style = this.style;
if (this.computPoints > 1) {
if (this.computPoints.length > 1) {
const points = [];
for (let i = 0; i < this.computPoints.length; i++) {
points.push([this.computPoints[i].x, this.computPoints[i].y]);

View File

@ -465,9 +465,7 @@ class Signal extends Group {
}
this.add(this.sigPost);
this.add(this.sigName);
this.style.Signal.text.show && model.nameShow ? this.sigName.show() : this.sigName.hide();
this.style.Signal.text.show && model.nameShow && this.add(this.sigName);
this.add(this.sigRoute);
this.add(this.sigDelay);
this.add(this.remainTimeName);

View File

@ -3,6 +3,7 @@ import Rect from 'zrender/src/graphic/shape/Rect';
import Line from 'zrender/src/graphic/shape/Line';
import Text from 'zrender/src/graphic/Text';
import Arc from 'zrender/src/graphic/shape/Arc';
import Circle from 'zrender/src/graphic/shape/Circle';
import store from '@/store/index';
export default class SignalButton extends Group {
@ -34,41 +35,85 @@ export default class SignalButton extends Group {
return item.includes('ctc');
});
const ctcArcList = ['OCCLUSION', 'RECOVERY', 'CHANGE_DIRECTION', 'ACCIDENT', 'DEPART_ASSIST', 'PICK_ASSIST', 'ASSIST'];
if (queryCtc && ctcArcList.includes(model.type)) {
this.arcShape = new Arc({
const typeList = []
if (queryCtc && ctcArcList.includes(model.type)){
this.arcShape = new Arc({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 7,
r: 7
},
style: {
stroke: '#69666E',
lineWidth: 1,
fill: fillColor
}
});
this.add(this.arcShape);
} else if (this.style.SignalButton
&& this.style.SignalButton.shape === 'roundWithDock'
&& typeList.includes(model.type)) {
const circle1 = new Circle({
zlevel: this.zlevel,
z: this.z + 2,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 7,
r: 7
},
style: {
stroke: '#69666E',
lineWidth: 1,
fill: fillColor
}
})
const circle2 = new Circle({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 9,
r: 8
},
style: {
fill: '#000'
}
})
const circle3 = new Circle({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 7,
r: 7
cx: computedPosition.x + 7,
cy: computedPosition.y + 9,
r: 9
},
style: {
stroke: '#69666E',
lineWidth: 1,
fill: fillColor
fill: '#eee'
}
});
this.add(this.arcShape);
})
this.arcShape = circle1
this.add(circle1).add(circle2).add(circle3)
} else {
this.rectButton = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: computedPosition.x,
y: computedPosition.y,
width: 14,
height: 14
},
style: {
lineDash: null,
stroke: '#69666E',
lineWidth:1,
fill: fillColor
}
});
this.add(this.rectButton);
}
this.rectButton = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: model.position.x,
y: model.position.y,
width: 14,
height: 14
},
style: {
lineDash: null,
stroke: '#69666E',
lineWidth:1,
fill: fillColor
}
});
this.add(this.rectButton);
}
this.leftLine = new Line({
zlevel: this.zlevel,
z: this.z + 1,

View File

@ -225,10 +225,9 @@ export default class Switch extends Group {
this.add(this.shapeModelB);
this.add(this.shapeModelC);
this.add(this.shapeBlockCover);
this.add(this.name);
style.Switch.text.show && model.nameShow && this.add(this.name);
this.add(this.enabledName);
style.Switch.text.show && model.nameShow ? this.name.show() : this.name.hide();
}
createLockRect() {

View File

@ -41,7 +41,7 @@
width="105"
>
<template slot-scope="scope">
<div v-if="scope.row.arriveRunPlan" :title="scope.row.arriveRunPlan.accessName">{{ scope.row.arriveRunPlan.accessName }}</div>
<div v-if="scope.row.arriveRunPlan" :title="mapStationDirectionData[scope.row.arriveRunPlan.accessName].name">{{ mapStationDirectionData[scope.row.arriveRunPlan.accessName].name }}</div>
</template>
</el-table-column>
<el-table-column
@ -60,7 +60,7 @@
width="105"
>
<template slot-scope="scope">
<div v-if="scope.row.departRunPlan" :title="scope.row.departRunPlan.accessName">{{ scope.row.departRunPlan.accessName }}</div>
<div v-if="scope.row.departRunPlan" :title="mapStationDirectionData[scope.row.departRunPlan.accessName].name">{{ mapStationDirectionData[scope.row.departRunPlan.accessName].name }}</div>
</template>
</el-table-column>
<el-table-column
@ -152,6 +152,9 @@ export default {
},
title() {
return '发送计划';
},
mapStationDirectionData() {
return this.$store.state.map.mapStationDirectionData;
}
},
methods:{

View File

@ -158,6 +158,7 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
import { transfiniteList, trainTypeList } from '@/scripts/ConstDic';
export default {
name: 'TrainRunplan',
data() {
@ -184,34 +185,11 @@ export default {
title:'',
mapStationDirectionList:[],
filterSectionList:[],
trainTypeList:[
//
{name:'管内特快旅客列车', code:'LOCAL_EXPRESS_PASSENGER_TRAIN' },
{name:'管内快速旅客列车', code:'LOCAL_FAST_PASSENGER_TRAIN' },
{name:'管内普通旅客快车', code:'LOCAL_PASSENGER_TRAIN' },
{name:'管内普通旅客慢车', code:'LOCAL_SLOW_PASSENGER_TRAIN' },
{name:'管内临时旅客列车', code:'LOCAL_TEMPORARY_PASSENGER_TRAIN' },
{name:'管内临时旅游列车', code:'LOCAL_TEMPORARY_TOURIST_TRAIN' },
//
{name:'跨局快速旅客列车', code:'FAST_PASSENGER_TRAIN' },
{name:'跨局临时旅游列车', code:'TEMPORARY_TOURIST_TRAIN' },
{name:'跨两局普通旅客快车', code:'TWO_PASSENGER_TRAIN' },
{name:'跨两局普通旅客慢车', code:'TWO_SLOW_PASSENGER_TRAIN' },
{name:'跨两局临时旅客列车', code:'TWO_TEMPORARY_PASSENGER_TRAIN' },
{name:'跨三局及其以上普通旅客快车', code:'MORE_PASSENGER_TRAIN' },
//
{name:'回送出入厂客车底列车', code:'BACK_FACTORY_PASSENGER_TRAIN' },
{name:'因故折返旅客列车', code:'FAULT_TRUE_BACK_PASSENGER_TRAIN' }
],
trainTypeList:trainTypeList,
runTypeList:[
{name:'快速旅客列车', code:'FAST_PASSENGER_TRAIN' }
],
transfiniteList:[
{name:'不超限', code:'NO' },
{name:'超级超限', code:'TRANSFINITE_SUPER' },
{name:'一级超限', code:'TRANSFINITE_ONE_LEVEL' },
{name:'二级超限', code:'TRANSFINITE_TWO_LEVEL' }
],
transfiniteList:transfiniteList,
model:{
runPlanCode:'', //
stationCode:'', //
@ -271,23 +249,20 @@ export default {
this.dialogShow = true;
if (row.code) {
this.title = '修改列车信息';
this.model = {
runPlanCode:row.code, //
stationCode:row.stationCode, //
trainType:row.trainType, //
runType:row.runType, //
startRunPlan:row.startRunPlan, // true,false
endRunPlan:row.endRunPlan, // true,false
passenger:row.passenger == 'PASSENGER', // true,false
keyTrains:row.keyTrains, // true,false
military:row.military, // true,false
trackDiscordant:row.trackDiscordant, //
entryOutDiscordant:row.entryOutDiscordant//
};
this.model.runPlanCode = row.code; //
this.model.stationCode = row.stationCode; //
this.model.trainType = row.trainType; //
this.model.runType = row.runType; //
this.model.startRunPlan = row.startRunPlan; // true,false
this.model.endRunPlan = row.endRunPlan; // true,false
this.model.passenger = row.passenger == 'PASSENGER'; // true,false
this.model.keyTrains = row.keyTrains; // true,false
this.model.military = row.military; // true,false
this.model.trackDiscordant = row.trackDiscordant; //
this.model.entryOutDiscordant = row.entryOutDiscordant; //
//
if (row.arriveRunPlan) {
this.model.arriveSectionCode = row.arriveRunPlan.sectionCode;
// debugger;
this.model.arrivePlanTime = row.arriveRunPlan.planTime;
this.model.arriveTripNumber = row.arriveRunPlan.tripNumber;
this.model.arriveDirectionCode = row.arriveRunPlan.accessName; //
@ -296,7 +271,7 @@ export default {
}
//
if (row.departRunPlan) {
this.model.departSectionCode = row.departRunPlan.planTime;
this.model.departSectionCode = row.departRunPlan.sectionCode;
this.model.departPlanTime = row.departRunPlan.planTime;
this.model.departTripNumber = row.departRunPlan.tripNumber;
this.model.departDirectionCode = row.departRunPlan.accessName;

View File

@ -396,6 +396,8 @@ export default {
});
},
buttonDown(operation, commandTypeList) {
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
if (station.controlMode === 'Interlock') { return; }
this.clearOperate();
if (operation != this.Command.cancel.clearMbm.operation) {
const operate = {

View File

@ -145,6 +145,10 @@ export default {
if (this.selected.type != '04') {
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Local;
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
if (station.controlMode === 'Interlock' && this.$route.query.ctc) {
this.menu.forEach(item => { item.disabled = true; });
} else { this.menu.forEach(item => { item.disabled = false; }); }
} else {
this.menu = [];
}

View File

@ -9,7 +9,7 @@
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<password-box ref="passwordBox" pop-class="chengdou-03__systerm" @checkOver="passWordCommit" />
<draw-select ref="drawSelect" />
<route-cancel ref="routeCancel" />
<route-cancel ref="routeCancel" />
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
</div>
</template>
@ -46,7 +46,7 @@ export default {
PasswordBox,
SetFault,
DrawSelect,
RouteCancel
RouteCancel
},
props: {
selected: {
@ -61,52 +61,52 @@ export default {
menu: [],
menuNormal: {
Local: [
{
label: '办理 通过进路',
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
type: 'separator'
},
{
label: '列车 办理进路',
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
label: '取消进路',
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
{
label: '信号重开',
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
{
label: '封锁/解封',
handler: '',
cmdType: ''
},
{
label: '总人解',
handler: this.humanTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
},
{
type: 'separator'
},
{
label: '引导',
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
},
{
label: '坡道解锁',
handler: '',
cmdType: ''
}
{
label: '办理 通过进路',
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
type: 'separator'
},
{
label: '列车 办理进路',
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
label: '取消进路',
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
{
label: '信号重开',
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
{
label: '封锁/解封',
handler: '',
cmdType: ''
},
{
label: '总人解',
handler: this.humanTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
},
{
type: 'separator'
},
{
label: '引导',
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
},
{
label: '坡道解锁',
handler: '',
cmdType: ''
}
],
Center: [
// {
@ -197,7 +197,6 @@ export default {
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
console.log(DeviceMenu.Signal, val, this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal), this.buttonOperation);
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && (!this.buttonOperation || this.$route.query.ctc)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
@ -210,6 +209,10 @@ export default {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Local;
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
if (station.controlMode === 'Interlock' && this.$route.query.ctc) {
this.menu.forEach(item => { item.disabled = true; });
} else { this.menu.forEach(item => { item.disabled = false; }); }
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
@ -271,7 +274,7 @@ 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));
EventBus.$emit('arrangementRouteMenu', this.selected);
EventBus.$emit('arrangementRouteMenu', this.selected);
}
});
},
@ -280,7 +283,7 @@ export default {
commitOperate(menuOperate.Signal.guide, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
// this.$refs.passwordBox.doShow({...operate, ...{selected: this.selected}, ...{routesList: this.getRouteList(this.selected)}});
this.$refs.routeCancel.doShow(operate, this.selected)
this.$refs.routeCancel.doShow(operate, this.selected);
}
});
},
@ -308,21 +311,21 @@ export default {
}
});
},
lockOrUnlock() {
lockOrUnlock() {
if (this.selected.lock) {
commitOperate(menuOperate.Signal.lock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$refs.routeControl.doShow(operate, this.selected);
}
})
} else {
}
});
} else {
commitOperate(menuOperate.Signal.unlock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$refs.routeControl.doShow(operate, this.selected);
}
})
}
},
this.$refs.routeControl.doShow(operate, this.selected);
}
});
}
},
//
lock() {
commitOperate(menuOperate.Signal.lock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {

View File

@ -7,7 +7,7 @@
<switch-hook-lock ref="switchHookLock" pop-class="chengdou-03__systerm" />
<set-fault ref="setFault" pop-class="datie-02__systerm" />
<draw-select ref="drawSelect" />
<route-cancel ref="routeCancel" />
<route-cancel ref="routeCancel" />
</div>
</template>
@ -36,7 +36,7 @@ export default {
SetFault,
SwitchHookLock,
DrawSelect,
RouteCancel
RouteCancel
},
mixins: [
CancelMouseState
@ -54,66 +54,66 @@ export default {
menu: [],
menuNormal: {
Local: [
{
label: '定操',
handler: this.locate,
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
},
{
label: '反操',
handler: this.reverse,
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
},
{
label: '单锁',
handler: this.lock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
{
label: '单解',
handler: this.unlock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
{
label: '封锁/解封',
handle: ''
},
{
label: '区故解',
handle: ''
},
{
label: '岔前 分路不良',
handle: ''
},
{
label: '定位 分路不良',
handle: ''
},
{
label: '反位 分路不良',
handle: ''
},
{
label: '接触网定位无电',
handle: ''
},
{
label: '接触网反位无电',
handle: ''
},
{
label: '添加调机号',
handle: ''
},
{
label: '删除调机号',
handle: ''
},
{
label: '修改调机号',
handle: ''
}
{
label: '定操',
handler: this.locate,
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
},
{
label: '反操',
handler: this.reverse,
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
},
{
label: '单锁',
handler: this.lock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
{
label: '单解',
handler: this.unlock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
{
label: '封锁/解封',
handle: ''
},
{
label: '区故解',
handle: ''
},
{
label: '岔前 分路不良',
handle: ''
},
{
label: '定位 分路不良',
handle: ''
},
{
label: '反位 分路不良',
handle: ''
},
{
label: '接触网定位无电',
handle: ''
},
{
label: '接触网反位无电',
handle: ''
},
{
label: '添加调机号',
handle: ''
},
{
label: '删除调机号',
handle: ''
},
{
label: '修改调机号',
handle: ''
}
],
Center: [
// {
@ -187,7 +187,7 @@ export default {
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && (!this.buttonOperation || this.$route.query.ctc)) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && (!this.buttonOperation || this.$route.query.ctc)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
@ -199,6 +199,10 @@ export default {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Local;
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
if (station.controlMode === 'Interlock' && this.$route.query.ctc) {
this.menu.forEach(item => { item.disabled = true; });
} else { this.menu.forEach(item => { item.disabled = false; }); }
//
if (this.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet) {
@ -299,7 +303,7 @@ export default {
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
// this.$refs.switchControl.doShow(operate, this.selected);
this.$refs.routeCancel.doShow(operate, this.selected);
this.$refs.routeCancel.doShow(operate, this.selected);
}
});
},
@ -308,7 +312,7 @@ export default {
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
// this.$refs.switchControl.doShow(operate, this.selected);
this.$refs.routeCancel.doShow(operate, this.selected);
this.$refs.routeCancel.doShow(operate, this.selected);
}
});
},

View File

@ -238,7 +238,10 @@ export default {
initMenu() {
//
this.menu = MenuContextHandler.covert(this.menuNormal);
console.log(this.menu, '================');
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
if (station.controlMode === 'Interlock' && this.$route.query.ctc) {
this.menu.forEach(item => { item.disabled = true; });
} else { this.menu.forEach(item => { item.disabled = false; }); }
//
if (this.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet) {

View File

@ -454,9 +454,9 @@
<!-- :class="judgeColor({scope.row,scope.$index})" -->
<el-option
v-for="item in transfiniteList"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</template>
@ -591,6 +591,7 @@ import TrainRunplan from './dialog/trainRunplan';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { copyAssign } from '@/utils/index';
import { mapGetters } from 'vuex';
import { transfiniteList } from '@/scripts/ConstDic';
export default {
name:'RunplanPane',
components: {
@ -634,12 +635,7 @@ export default {
currentRailwaySimulationRunplan:{},
// radioSelected:''
currentRow:null,
transfiniteList:[
{label:'不超限', value:'NO'},
{label:'一级超限', value:'TRANSFINITE_ONE_LEVEL'},
{label:'二级超限', value:'TRANSFINITE_TWO_LEVEL'},
{label:'超级超限', value:'TRANSFINITE_SUPER'}
]
transfiniteList:transfiniteList
};
},
computed: {

File diff suppressed because it is too large Load Diff

View File

@ -46,7 +46,7 @@ export default {
{
name: 'global.designPlatformEntrance', //
handle: this.goToDesign,
hidden: getSessionStorage('project').startsWith('design') || !goOtherPlatformMenu[getSessionStorage('project')]
hidden: getSessionStorage('project').startsWith('design') || !goOtherPlatformMenu[getSessionStorage('project')] || getSessionStorage('project').startsWith('teaching')
},
{
name: 'global.trainingPlatformEntrance', //

View File

@ -77,7 +77,7 @@ router.beforeEach( async (to, from, next) => {
if (to.path.includes('login')) {
project = to.query.project;
const split = to.path.split('/')[1];
if (process.env.VUE_APP_PRO) {
if (process.env.VUE_APP_PRO && process.env.VUE_APP_PRO !== 'local-test') {
project = localPackageProject[process.env.VUE_APP_PRO + split];
} else if (split == 'design') {
project = project ? split + project : split;

View File

@ -282,3 +282,30 @@ export function getTrainingOperateTypeMap() {
}
return trainingOperateTypeMap;
}
export const transfiniteList = [
{name:'不超限', code:'NO'},
{name:'一级超限', code:'TRANSFINITE_ONE_LEVEL'},
{name:'二级超限', code:'TRANSFINITE_TWO_LEVEL'},
{name:'超级超限', code:'TRANSFINITE_SUPER'}
];
export const trainTypeList = [
// 管内列车
{name:'管内特快旅客列车', code:'LOCAL_EXPRESS_PASSENGER_TRAIN' },
{name:'管内快速旅客列车', code:'LOCAL_FAST_PASSENGER_TRAIN' },
{name:'管内普通旅客快车', code:'LOCAL_PASSENGER_TRAIN' },
{name:'管内普通旅客慢车', code:'LOCAL_SLOW_PASSENGER_TRAIN' },
{name:'管内临时旅客列车', code:'LOCAL_TEMPORARY_PASSENGER_TRAIN' },
{name:'管内临时旅游列车', code:'LOCAL_TEMPORARY_TOURIST_TRAIN' },
// 跨局列车
{name:'跨局快速旅客列车', code:'FAST_PASSENGER_TRAIN' },
{name:'跨局临时旅游列车', code:'TEMPORARY_TOURIST_TRAIN' },
{name:'跨两局普通旅客快车', code:'TWO_PASSENGER_TRAIN' },
{name:'跨两局普通旅客慢车', code:'TWO_SLOW_PASSENGER_TRAIN' },
{name:'跨两局临时旅客列车', code:'TWO_TEMPORARY_PASSENGER_TRAIN' },
{name:'跨三局及其以上普通旅客快车', code:'MORE_PASSENGER_TRAIN' },
// 其他列车
{name:'回送出入厂客车底列车', code:'BACK_FACTORY_PASSENGER_TRAIN' },
{name:'因故折返旅客列车', code:'FAULT_TRUE_BACK_PASSENGER_TRAIN' }
];

View File

@ -595,6 +595,30 @@ export const loginInfo = {
navigationMarginLeft: '60px',
systemType: '027'
},
designrichorcxjs: {
title: '长兴技术学院城市轨道交通设计平台',
loginPath: '/design/login?project=richorcxjs',
bottomColumn: '中航锐创(北京)科技发展有限公司 联系电话:4000500081',
loginParam: 'RICHOR_CXJS',
linkIcon: FaviconRichor,
titleIcon: FaviconRichor,
titleDistance: '-150px',
navigationLogoWidth: '40px',
navigationMarginLeft: '60px',
systemType: '011'
},
richorcxjs: {
title: '长兴技术学院城市轨道交通实训平台',
loginPath: '/login?project=richorcxjs',
bottomColumn: '中航锐创(北京)科技发展有限公司 联系电话:4000500081',
loginParam: 'RICHOR_CXJS',
linkIcon: FaviconRichor,
titleIcon: FaviconRichor,
titleDistance: '-150px',
navigationLogoWidth: '40px',
navigationMarginLeft: '60px',
systemType: '027'
},
designjxgm: {
title: '江西工业贸易职业技术学院城市轨道交通设计平台',
loginPath: '/design/login?project=jxgm',
@ -748,6 +772,8 @@ export const ProjectIcon = {
designrichorygy: FaviconRichor,
richorhhcj: FaviconRichor,
designrichorhhcj: FaviconRichor,
richorcxjs: FaviconRichor,
designrichorcxjs: FaviconRichor,
say: FaviconSay,
designsay: FaviconSay,
unittecsty: FaviconUnittec,
@ -800,6 +826,8 @@ export const ProjectCode = {
designrichorygy: 'RICHOR_YGY',
richorhhcj: 'RICHOR_HHCJ',
designrichorhhcj: 'RICHOR_HHCJ',
richorcxjs: 'RICHOR_CXJS',
designrichorcxjs: 'RICHOR_CXJS',
hls: 'DEFAULT',
designhls: 'DEFAULT',
say: 'SAY',
@ -811,41 +839,42 @@ export const ProjectCode = {
designteaching: 'TEACHING'
};
/** 嵌入第三方平台 导航栏右上角 清空 */
export const ThirdLoginList = ['richor', 'designrichor', 'richorygy', 'designrichorygy'];
export const ThirdLoginList = ['richor', 'designrichor', 'richorygy', 'designrichorygy', 'richorcxjs', 'designrichorcxjs'];
/** 底部栏仅展示公司信息不展示备案号 */
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls',
'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy', 'richor', 'richorlesson3d', 'richorjoint', 'designrichorjoint', 'nologo', 'designnologo', 'richorygy',
'designrichorygy', 'unittecsty', 'designunittecsty', 'richorhhcj', 'designrichorhhcj'];
'designrichorygy', 'unittecsty', 'designunittecsty', 'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs'];
/** 实训设计平台通过项目code获取地图列表的项目 */
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'wjls',
'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy', 'zzww', 'zzwwtest', 'richor',
'richorlesson3d', 'richorjoint', 'designrichorjoint', 'nologo', 'designnologo', 'srsandbox', 'designsrsandbox', 'designhlsdrts', 'hlsdrts', 'jxgm', 'designjxgm',
'richorygy', 'designrichorygy', 'say', 'designsay', 'unittecsty', 'designunittecsty', 'richorhhcj', 'designrichorhhcj', 'teaching', 'designteaching'];
'richorygy', 'designrichorygy', 'say', 'designsay', 'unittecsty', 'designunittecsty', 'richorhhcj', 'designrichorhhcj', 'teaching', 'designteaching', 'richorcxjs',
'designrichorcxjs'];
/** 案例展示隐藏的项目 */
export const CaseHideProjectList = ['heb', 'designheb', 'cgy', 'designcgy'];
/** 登录页右下角版本开发基于不展示 */
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'wjls', 'hyd', 'designhyd', 'cgy', 'designcgy', 'xadt',
'designxadt', 'nologo', 'designnologo', 'srsandbox', 'designsrsandbox', 'designhlsdrts', 'hlsdrts', 'jxgm', 'designjxgm', 'xzexam', 'richorygy', 'designrichorygy',
'richorhhcj', 'designrichorhhcj'];
'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs'];
/** 登录页右下角主体不展示 */
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls',
'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy', 'xadt', 'designxadt', 'richor', 'richorlesson3d', 'richorjoint', 'nologo', 'designnologo',
'srsandbox', 'designsrsandbox', 'designhlsdrts', 'hlsdrts', 'jxgm', 'designjxgm', 'xzexam', 'richorygy', 'designrichorygy', 'unittecsty', 'designunittecsty',
'richorhhcj', 'designrichorhhcj'];
'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs'];
/** 登录页项目 title 登录输入框上方 大字体 加粗居中 */
export const ProjectLoginStyleList = ['gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc',
'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'wjls', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc',
'ntyl', 'designntyl', 'cgy', 'designcgy', 'zzww', 'zzwwtest', 'srsandbox', 'designsrsandbox', 'designhlsdrts', 'hlsdrts', 'jxgm', 'designjxgm', 'xzexam',
'richorygy', 'designrichorygy', 'say', 'designsay', 'unittecsty', 'designunittecsty', 'richorhhcj', 'designrichorhhcj'];
'richorygy', 'designrichorygy', 'say', 'designsay', 'unittecsty', 'designunittecsty', 'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs'];
/** 登录页 登录输入框无二维码 */
export const NoQrcodeList = ['heb', 'designheb', 'cgy', 'designcgy', 'ntyl', 'designntyl'];
/** 综合演练 无二维码 */
export const NoSimulationQrCodeList = ['heb', 'bjd'];
export const RegisterCodeList = ['cgy', 'designcgy'];
/** 展示中航锐创联系我们 */
export const RichorContectUsList = ['richor', 'richorygy', 'richorhhcj', 'designrichorhhcj'];
export const RichorContectUsList = ['richor', 'richorygy', 'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs'];
/** 帮助中不展示版权(福州 佛山) */
export const NoCopyrightList = ['richor', 'richorygy', 'richorhhcj', 'designrichorhhcj'];
export const NoCopyrightList = ['richor', 'richorygy', 'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs'];
/** 导航栏快速切换平台 */
export const goOtherPlatformMenu = {
login: '/design/login',
@ -896,6 +925,8 @@ export const goOtherPlatformMenu = {
designunittecsty: '/login?project=unittecsty',
richorhhcj: '/design/login?project=richorhhcj',
designrichorhhcj: '/login?project=richorhhcj',
// richorcxjs: '/design/login?project=richorcxjs',
// designrichorcxjs: '/login?project=richorcxjs',
teaching: '/design/login?project=teaching',
designteaching: '/login?project=teaching'
};
@ -925,7 +956,8 @@ export const ProjectList = [
{value: 'say', label: '苏安院'},
{value: 'unittec_sty', label: '众合-陕铁院'},
{value: 'richor_hhcj', label: '红河财经'},
{value: 'teaching', label: '教学通用'}
{value: 'teaching', label: '教学通用'},
{value: 'richor_cxjs', label: '长兴技校'}
];
/** 本地项目打包 */
export const localPackageProject = {

View File

@ -40,16 +40,16 @@ export function handlerUrl(data) {
VOICE_API = data && data.resourcesDomainName ? 'https://' + data.resourcesDomainName : 'https://joylink.club/oss/joylink';
UPLOAD_API = 'http://joylink.club/jlfile';
BASE_SITE = 'https://test.joylink.club/cbtc';
} else if (process.env.NODE_ENV === 'test' && process.env.VUE_APP_PRO === 'local-test') {
BASE_API = 'https://192.168.3.233/rtss-server';
VOICE_API = 'https://192.168.3.233/oss/joylink';
UPLOAD_API = 'https://192.168.3.233';
BASE_SITE = '/cbtc';
} else if (process.env.NODE_ENV === 'test') {
BASE_API = data && data.domainName ? 'https://' + data.domainName : 'https://test.joylink.club/jlcloud';
VOICE_API = data && data.resourcesDomainName ? 'https://' + data.resourcesDomainName : 'https://joylink.club/oss/joylink';
UPLOAD_API = 'http://joylink.club/jlfile';
BASE_SITE = 'https://test.joylink.club/cbtc';
} else if (process.env.NODE_ENV === 'local-test') {
BASE_API = 'https://192.168.3.233/rtss-server';
VOICE_API = 'https://192.168.3.233/oss/joylink';
UPLOAD_API = 'https://192.168.3.233';
BASE_SITE = '/cbtc';
} else if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_PRO === 'local') {
BASE_API = 'http://160.20.60.15:9000';
VOICE_API = 'http://160.20.60.15/oss/joylink';

View File

@ -142,6 +142,7 @@
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { transfiniteList, trainTypeList } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
export default {
name: 'AddDispatcherLogerRunplan',
@ -172,34 +173,11 @@ export default {
filterArrSectionList:[],
filterDepSectionList:[],
filterSectionList:[],
trainTypeList:[
//
{name:'管内特快旅客列车', code:'LOCAL_EXPRESS_PASSENGER_TRAIN' },
{name:'管内快速旅客列车', code:'LOCAL_FAST_PASSENGER_TRAIN' },
{name:'管内普通旅客快车', code:'LOCAL_PASSENGER_TRAIN' },
{name:'管内普通旅客慢车', code:'LOCAL_SLOW_PASSENGER_TRAIN' },
{name:'管内临时旅客列车', code:'LOCAL_TEMPORARY_PASSENGER_TRAIN' },
{name:'管内临时旅游列车', code:'LOCAL_TEMPORARY_TOURIST_TRAIN' },
//
{name:'跨局快速旅客列车', code:'FAST_PASSENGER_TRAIN' },
{name:'跨局临时旅游列车', code:'TEMPORARY_TOURIST_TRAIN' },
{name:'跨两局普通旅客快车', code:'TWO_PASSENGER_TRAIN' },
{name:'跨两局普通旅客慢车', code:'TWO_SLOW_PASSENGER_TRAIN' },
{name:'跨两局临时旅客列车', code:'TWO_TEMPORARY_PASSENGER_TRAIN' },
{name:'跨三局及其以上普通旅客快车', code:'MORE_PASSENGER_TRAIN' },
//
{name:'回送出入厂客车底列车', code:'BACK_FACTORY_PASSENGER_TRAIN' },
{name:'因故折返旅客列车', code:'FAULT_TRUE_BACK_PASSENGER_TRAIN' }
],
trainTypeList:trainTypeList,
runTypeList:[
{name:'快速旅客列车', code:'FAST_PASSENGER_TRAIN' }
],
transfiniteList:[
{name:'不超限', code:'NO' },
{name:'超级超限', code:'TRANSFINITE_SUPER' },
{name:'一级超限', code:'TRANSFINITE_ONE_LEVEL' },
{name:'二级超限', code:'TRANSFINITE_TWO_LEVEL' }
],
transfiniteList:transfiniteList,
model:{
// runPlanCode:'', //
trainType:'LOCAL_EXPRESS_PASSENGER_TRAIN', //

View File

@ -219,7 +219,7 @@ export default {
project() {
const project = this.$route.query.project;
const split = this.$route.path.split('/')[1];
if (process.env.VUE_APP_PRO) {
if (process.env.VUE_APP_PRO && process.env.VUE_APP_PRO !== 'local-test') {
return localPackageProject[process.env.VUE_APP_PRO + split];
} else if (split == 'design') {
return project ? split + project : split;

View File

@ -24,6 +24,11 @@
/>
</el-select>
</el-form-item>
<el-form-item label="显示风格:" prop="lineCode">
<el-select v-model="ruleForm.lineCode" placeholder="请选择">
<el-option v-for="item in skinCodeList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('ruleForm')">创建</el-button>
</el-form-item>
@ -34,16 +39,19 @@
<script>
import {mapGetters} from 'vuex';
import { saveMap } from '@/api/jmap/mapdraft';
import { getLineCodeList } from '@/api/management/mapline';
export default {
name: 'CreatePicture',
data() {
return {
centerDialogVisible: false,
ruleForm: { name: '', type: '', stationCode: '', deviceMap: {} },
skinCodeList: [],
ruleForm: { name: '', type: '', stationCode: '', lineCode: '', deviceMap: {} },
rules: {
name: [{ required: true, message: '请输入画面名称', trigger: 'blur' }],
type: [{ required: true, message: '请选择画面类型', trigger: 'change' }],
stationCode: [{ required: true, message: '请选择车站', trigger: 'change' }]
stationCode: [{ required: true, message: '请选择车站', trigger: 'change' }],
lineCode: [{ required: true, message: '请选择线路', trigger: 'change' }]
}
};
},
@ -52,6 +60,17 @@ export default {
'stationList'
])
},
mounted() {
this.skinCodeList = [];
getLineCodeList().then(response => {
this.skinCodeList = response.data.map(item => {
const params = {};
params.label = item.name;
params.value = item.code;
return params;
});
});
},
methods: {
submitForm() {
this.$refs.ruleForm.validate((valid) => {

View File

@ -447,10 +447,12 @@ export default {
const deviceMap = pictureModel ? pictureModel.deviceMap : {};
this.$store.dispatch('map/setPictureDeviceMap', deviceMap);
const deviceList = [];
const map = this.$store.state.map.map;
const mapDevice = this.$store.state.map.mapDevice;
for (const deviceCode in mapDevice) {
deviceList.push(deviceCode);
}
this.$jlmap.reloadStyle(pictureModel.lineCode || map.skinVO.code);
this.$jlmap.updatePicture(deviceList);
this.$jlmap.updateTransform(pictureModel.scaling || '1', pictureModel.origin);
},
@ -480,6 +482,7 @@ export default {
for (const deviceCode in mapDevice) {
deviceList.push(deviceCode);
}
this.$jlmap.reloadStyle(map.skinVO.code);
this.$jlmap.updatePicture(deviceList);
this.$jlmap.updateTransform(map.scaling || '1', map.origin);
this.$message.success('删除画面成功!');

View File

@ -10,10 +10,22 @@
</div>
<div>{{ pictureName }}</div>
<div>
<el-button type="text" style="padding: 3px 0;" @click="createPicture">新建</el-button>
<el-dropdown>
<span class="el-dropdown-link">
操作<i class="el-icon-arrow-down el-icon--right" />
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item> <el-button type="text" @click="createPicture">新建</el-button></el-dropdown-item>
<el-dropdown-item><el-button type="text" @click="changePicture">切换</el-button></el-dropdown-item>
<el-dropdown-item><el-button type="text" @click="editPicture">编辑</el-button></el-dropdown-item>
<el-dropdown-item> <el-button type="text" @click="deletePicture">删除</el-button></el-dropdown-item>
<el-dropdown-item><el-button v-if="isSave" type="text" :disabled="!pictureName" @click="saveMapEvent">{{ $t('map.save') }}</el-button></el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<!-- <el-button type="text" style="padding: 3px 0;" @click="createPicture">新建</el-button>
<el-button type="text" style="padding: 3px 0;" @click="changePicture">切换</el-button>
<el-button type="text" style="padding: 3px 0;" @click="deletePicture">删除</el-button>
<el-button v-if="isSave" type="text" style="padding: 3px 0;" :disabled="!pictureName" @click="saveMapEvent">{{ $t('map.save') }}</el-button>
<el-button v-if="isSave" type="text" style="padding: 3px 0;" :disabled="!pictureName" @click="saveMapEvent">{{ $t('map.save') }}</el-button>-->
</div>
</div>
<el-tabs v-model="enabledTab" class="mapEdit" type="card">
@ -101,6 +113,9 @@ export default {
changePicture() {
this.$emit('changePicture');
},
editPicture() {
this.$emit('editPicture');
},
pictureChanged(pictureName) {
this.pictureName = pictureName;
},

View File

@ -12,328 +12,437 @@
/>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<create-operate
ref="createForm"
:create-form="createForm"
:add-model="addModel"
:create-rules="rules"
@create="create"
/>
<create-operate ref="createForm" :create-form="createForm" :add-model="addModel" :create-rules="rules" @create="create" />
</el-tab-pane>
</el-tabs>
</template>
<script>
import { mapGetters } from 'vuex';
import { getUID } from '@/jmapNew/utils/Uid';
import OperateProperty from './components/operateProperty';
import CreateOperate from './components/createOperate';
import { deepAssign } from '@/utils/index';
import { mapGetters } from 'vuex'
import { getUID } from '@/jmapNew/utils/Uid'
import OperateProperty from './components/operateProperty'
import CreateOperate from './components/createOperate'
import { deepAssign } from '@/utils/index'
export default {
name: 'SignalButton',
components: {
OperateProperty,
CreateOperate
},
props: {
selected: {
type: Object,
default: function () {
return null;
}
}
},
data() {
return {
activeName: 'first',
lazy: true,
field: '',
editModel: {
code: '',
name: '',
type: '',
signalCode: '',
sectionCode: '',
switchCode: '',
labelEnum: '',
position: {
x: 0,
y: 0
},
nameOffset: {
x: 0,
y: -10
},
stationCode: ''
},
addModel: {
name: '',
type: '',
position: {
x: 0,
y: 0
},
nameOffset: {
x: 0,
y: -10
}
},
typeList: [
{ value: 'PICK', label: '接车按钮' },
{ value: 'PASS', label: '通过按钮' },
{ value: 'GUIDE', label: '引导按钮' },
{ value: 'FLEXIBLE', label: '变通按钮' },
{ value: 'RAMP_TERMINAL', label: '坡道终端按钮'},
{ value: 'TRAIN_TERMINAL', label: '列车终端按钮'},
{ value: 'SHUNT_TERMINAL', label: '调车终端按钮'},
{ value: 'ASSIST', label: '总辅助按钮' },
{ value: 'PICK_ASSIST', label: '接辅助按钮' },
{ value: 'DEPART_ASSIST', label: '发辅助按钮' },
{ value: 'ACCIDENT', label: '事故按钮' },
{ value: 'CHANGE_DIRECTION', label: '改方按钮' },
{ value: 'RECOVERY', label: '复原按钮' },
{ value: 'OCCLUSION', label: '闭塞按钮' }
],
centralizedStationList: [], //
directionList: [{label:'X',value:'X'},{label:'XF',value:'XF'},{label:'XD',value:'XD'},{label:'S',value:'S'},{label:'SF',value:'SF'},{label:'SD',value:'SD'}],
rules: {
code: [
{ required: true, message: this.$t('rules.selectText'), trigger: 'blur' }
],
// name: [
// { required: true, message: '', trigger: 'blur' }
// ],
type: [
{ required: true, message: '请选择按钮类型', trigger: 'change' }
],
signalCode: [
{ required: true, message: '请选择关联的信号机设备', trigger: 'change' }
],
sectionCode: [
{ required: true, message: '请选择关联的区段设备', trigger: 'change' }
],
switchCode: [
{ required: true, message: '请选择关联的道岔设备', trigger: 'change' }
],
'position.x': [
{ required: true, message: this.$t('rules.pleaseEnterXCoordinate'), trigger: 'blur' }
],
'position.y': [
{ required: true, message: this.$t('rules.pleaseEnterYCoordinate'), trigger: 'blur' }
],
labelEnum: [
{ required: true, message: '请选择方向', trigger: 'change' }
]
}
};
},
computed: {
...mapGetters('map', [
'signalButtonList',
'stationList',
'lineCode',
'signalList',
'sectionList',
'switchList'
]),
form() {
const form = {
labelWidth: '130px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{ prop: 'code', label: '按钮编码:', type: 'select', optionLabel: 'code', optionValue: 'code', options: this.signalButtonList, deviceChange: this.deviceChange },
{ prop: 'name', label: '按钮名称:', type: 'input' },
{ prop: 'nameOffset', label: '名称偏移:', type: 'coordinate', width: '120px', children: [
{ prop: 'nameOffset.x', firstLevel: 'nameOffset', secondLevel: 'x', label: 'x', type: 'number', labelWidth: '25px', disabled: false },
{ prop: 'nameOffset.y', firstLevel: 'nameOffset', secondLevel: 'y', label: 'y', type: 'number', labelWidth: '25px', disabled: false }
] },
{ prop: 'type', label: '按钮类型:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.typeList},
{ prop: 'signalCode', label: '关联信号机:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.signalList, hover: this.hover, buttonType: 'linkSignal', buttonShowType: this.isLinkSignalShow, isHidden: !this.isLinkSignal },
{ prop: 'sectionCode', label: '关联区段:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.sectionList, hover: this.hover, buttonType: 'linkSection', buttonShowType: this.isLinkSectionShow, isHidden: !this.isLinkSection },
{ prop: 'switchCode', label: '关联道岔:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.switchList, hover: this.hover, buttonType: 'linkSwitch', buttonShowType: this.isLinkSwitchShow, isHidden: !this.isLinkSwitch },
{ prop: 'labelEnum', label: '方向:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.directionList, isHidden: !this.isLinkDirection },
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '120px', children: [
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px', disabled: false },
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px', disabled: false }
] },
{ prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList }
]
},
map: {
name: this.$t('map.mapData'),
item: [
]
}
}
};
return form;
},
createForm() {
const form = {
labelWidth: '110px',
items:{
all:{
name:'',
item: [
{ prop: 'name', label: '按钮名称:', type: 'input' },
{ prop: 'type', label: '按钮类型:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.typeList},
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '120px', children: [
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px', disabled: false },
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px', disabled: false }
] }
]
}
}
};
return form;
},
isLinkSignalShow() {
return this.field === 'linkSignal';
},
isLinkSignal() {
const list = ['PICK', 'PASS', 'GUIDE'];
return list.includes(this.editModel.type);
},
isLinkSectionShow() {
return this.field === 'linkSection';
},
isLinkSwitchShow() {
return this.field === 'linkSwitch';
},
isLinkSection() {
const list = ['RAMP_TERMINAL', 'TRAIN_TERMINAL', 'SHUNT_TERMINAL'];
return list.includes(this.editModel.type);
},
isLinkSwitch() {
return this.editModel.type === 'FLEXIBLE';
},
isLinkDirection() {
return ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION'].includes(this.editModel.type);
}
},
methods: {
handleInit() {
if (this.stationList && this.stationList.length) {
this.centralizedStationList = this.stationList.filter(station=> station.centralized);
}
},
hover(field) {
this.field = field == this.field ? '' : field;
if (this.field) {
this.$emit('deviceSelect', 'SignalButton');
} else {
this.$emit('deviceSelect', '');
}
},
deviceChange(code) {
this.$emit('setCenter', code);
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
},
deviceSelect(selected) {
if (selected && selected._type.toUpperCase() === 'SignalButton'.toUpperCase()) {
this.handleInit();
this.$refs.form && this.$refs.form.resetFields();
this.$refs.dataform && this.$refs.dataform.resetFields();
this.editModel.signalCode = '';
this.editModel.switchCode = '';
this.editModel.sectionCode = '';
this.editModel.labelEnum = '';
this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected);
} else if (this.field === 'linkSignal' && selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.activeName = 'first';
this.editModel.signalCode = selected.code;
} else if (this.field === 'linkSection' && selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
this.activeName = 'first';
this.editModel.sectionCode = selected.code;
} else if (this.field === 'linkSwitch' && selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.activeName = 'first';
this.editModel.switchCode = selected.code;
}
this.field = '';
this.$emit('deviceSelect', '');
},
clearDeviceSelect() {
this.$emit('deviceSelect', '');
},
create() {
const model = {
_type: 'SignalButton',
code: getUID('BTN', this.signalButtonList),
type: this.addModel.type,
name: this.addModel.name,
position: {
x: this.addModel.position.x,
y: this.addModel.position.y
},
nameOffset: {
x: this.addModel.nameOffset.x,
y: this.addModel.nameOffset.y
}
};
this.$refs.createForm.resetForm();
this.$emit('updateMapModel', model);
},
deleteObj() {
this.$refs.dataform.deleteObj();
},
//
edit() {
this.$refs.dataform.edit();
},
updateMapModel(data) {
if (this.isLinkSignal) {
data.sectionCode = ''; data.switchCode = ''; data.labelEnum = '';
} else if (this.isLinkSection) {
data.signalCode = ''; data.switchCode = ''; data.labelEnum = '';
} else if (this.isLinkSwitch) {
data.signalCode = ''; data.sectionCode = ''; data.labelEnum = '';
} else if (this.isLinkDirection) {
data.sectionCode = ''; data.signalCode = ''; data.switchCode = '';
}
this.$emit('updateMapModel', data);
}
name: 'SignalButton',
components: {
OperateProperty,
CreateOperate
},
props: {
selected: {
type: Object,
default: function() {
return null
}
}
};
},
data() {
return {
activeName: 'first',
lazy: true,
field: '',
editModel: {
code: '',
name: '',
type: '',
signalCode: '',
sectionCode: '',
switchCode: '',
labelEnum: '',
position: {
x: 0,
y: 0
},
nameOffset: {
x: 0,
y: -10
},
stationCode: ''
},
addModel: {
name: '',
type: '',
position: {
x: 0,
y: 0
},
nameOffset: {
x: 0,
y: -10
}
},
typeList: [
{ value: 'PICK', label: '接车按钮' },
{ value: 'PASS', label: '通过按钮' },
{ value: 'GUIDE', label: '引导按钮' },
{ value: 'FLEXIBLE', label: '变通按钮' },
{ value: 'RAMP_TERMINAL', label: '坡道终端按钮' },
{ value: 'TRAIN_TERMINAL', label: '列车终端按钮' },
{ value: 'SHUNT_TERMINAL', label: '调车终端按钮' },
{ value: 'ASSIST', label: '总辅助按钮' },
{ value: 'PICK_ASSIST', label: '接辅助按钮' },
{ value: 'DEPART_ASSIST', label: '发辅助按钮' },
{ value: 'ACCIDENT', label: '事故按钮' },
{ value: 'CHANGE_DIRECTION', label: '改方按钮' },
{ value: 'RECOVERY', label: '复原按钮' },
{ value: 'OCCLUSION', label: '闭塞按钮' }
],
centralizedStationList: [], //
directionList: [
{ label: 'X', value: 'X' },
{ label: 'XF', value: 'XF' },
{ label: 'XD', value: 'XD' },
{ label: 'S', value: 'S' },
{ label: 'SF', value: 'SF' },
{ label: 'SD', value: 'SD' }
],
rules: {
code: [{ required: true, message: this.$t('rules.selectText'), trigger: 'blur' }],
type: [{ required: true, message: '请选择按钮类型', trigger: 'change' }],
signalCode: [{ required: true, message: '请选择关联的信号机设备', trigger: 'change' }],
sectionCode: [{ required: true, message: '请选择关联的区段设备', trigger: 'change' }],
switchCode: [{ required: true, message: '请选择关联的道岔设备', trigger: 'change' }],
'position.x': [{ required: true, message: this.$t('rules.pleaseEnterXCoordinate'), trigger: 'blur' }],
'position.y': [{ required: true, message: this.$t('rules.pleaseEnterYCoordinate'), trigger: 'blur' }],
labelEnum: [{ required: true, message: '请选择方向', trigger: 'change' }]
}
}
},
computed: {
...mapGetters('map', ['signalButtonList', 'stationList', 'lineCode', 'signalList', 'sectionList', 'switchList']),
form() {
const form = {
labelWidth: '130px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{
prop: 'code',
label: '按钮编码:',
type: 'select',
optionLabel: 'code',
optionValue: 'code',
options: this.signalButtonList,
deviceChange: this.deviceChange
},
{ prop: 'name', label: '按钮名称:', type: 'input' },
{
prop: 'nameOffset',
label: '名称偏移:',
type: 'coordinate',
width: '120px',
children: [
{
prop: 'nameOffset.x',
firstLevel: 'nameOffset',
secondLevel: 'x',
label: 'x',
type: 'number',
labelWidth: '25px',
disabled: false
},
{
prop: 'nameOffset.y',
firstLevel: 'nameOffset',
secondLevel: 'y',
label: 'y',
type: 'number',
labelWidth: '25px',
disabled: false
}
]
},
{ prop: 'type', label: '按钮类型:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.typeList },
{
prop: 'signalCode',
label: '关联信号机:',
type: 'selectHover',
optionLabel: 'name&&code',
optionValue: 'code',
clearable: true,
options: this.signalList,
hover: this.hover,
buttonType: 'linkSignal',
buttonShowType: this.isLinkSignalShow,
isHidden: !this.isLinkSignal
},
{
prop: 'sectionCode',
label: '关联区段:',
type: 'selectHover',
optionLabel: 'name&&code',
optionValue: 'code',
clearable: true,
options: this.sectionList,
hover: this.hover,
buttonType: 'linkSection',
buttonShowType: this.isLinkSectionShow,
isHidden: !this.isLinkSection
},
{
prop: 'switchCode',
label: '关联道岔:',
type: 'selectHover',
optionLabel: 'name&&code',
optionValue: 'code',
clearable: true,
options: this.switchList,
hover: this.hover,
buttonType: 'linkSwitch',
buttonShowType: this.isLinkSwitchShow,
isHidden: !this.isLinkSwitch
},
{
prop: 'labelEnum',
label: '方向:',
type: 'select',
optionLabel: 'label',
optionValue: 'value',
options: this.directionList,
isHidden: !this.isLinkDirection
},
{
prop: 'position',
label: this.$t('map.textPoints'),
type: 'coordinate',
width: '120px',
children: [
{
prop: 'position.x',
firstLevel: 'position',
secondLevel: 'x',
label: 'x:',
type: 'number',
labelWidth: '25px',
disabled: false
},
{
prop: 'position.y',
firstLevel: 'position',
secondLevel: 'y',
label: 'y:',
type: 'number',
labelWidth: '25px',
disabled: false
}
]
},
{
prop: 'stationCode',
label: this.$t('map.equipmentStation') + ':',
type: 'select',
optionLabel: 'name&&code',
optionValue: 'code',
options: this.centralizedStationList
}
]
},
map: {
name: this.$t('map.mapData'),
item: []
}
}
}
return form
},
createForm() {
const form = {
labelWidth: '110px',
items: {
all: {
name: '',
item: [
{ prop: 'name', label: '按钮名称:', type: 'input' },
{ prop: 'type', label: '按钮类型:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.typeList },
{
prop: 'position',
label: this.$t('map.textPoints'),
type: 'coordinate',
width: '120px',
children: [
{
prop: 'position.x',
firstLevel: 'position',
secondLevel: 'x',
label: 'x:',
type: 'number',
labelWidth: '25px',
disabled: false
},
{
prop: 'position.y',
firstLevel: 'position',
secondLevel: 'y',
label: 'y:',
type: 'number',
labelWidth: '25px',
disabled: false
}
]
}
]
}
}
}
return form
},
isLinkSignalShow() {
return this.field === 'linkSignal'
},
isLinkSignal() {
const list = ['PICK', 'PASS', 'GUIDE']
return list.includes(this.editModel.type)
},
isLinkSectionShow() {
return this.field === 'linkSection'
},
isLinkSwitchShow() {
return this.field === 'linkSwitch'
},
isLinkSection() {
const list = ['RAMP_TERMINAL', 'TRAIN_TERMINAL', 'SHUNT_TERMINAL']
return list.includes(this.editModel.type)
},
isLinkSwitch() {
return this.editModel.type === 'FLEXIBLE'
},
isLinkDirection() {
return ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION'].includes(
this.editModel.type
)
}
},
methods: {
handleInit() {
if (this.stationList && this.stationList.length) {
this.centralizedStationList = this.stationList.filter(station => station.centralized)
}
},
hover(field) {
this.field = field == this.field ? '' : field
if (this.field) {
this.$emit('deviceSelect', 'SignalButton')
} else {
this.$emit('deviceSelect', '')
}
},
deviceChange(code) {
this.$emit('setCenter', code)
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code))
},
deviceSelect(selected) {
if (selected && selected._type.toUpperCase() === 'SignalButton'.toUpperCase()) {
this.handleInit()
this.$refs.form && this.$refs.form.resetFields()
this.$refs.dataform && this.$refs.dataform.resetFields()
this.editModel.signalCode = ''
this.editModel.switchCode = ''
this.editModel.sectionCode = ''
this.editModel.labelEnum = ''
this.activeName = 'first'
this.editModel = deepAssign(this.editModel, selected)
} else if (this.field === 'linkSignal' && selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.activeName = 'first'
this.editModel.signalCode = selected.code
} else if (this.field === 'linkSection' && selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
this.activeName = 'first'
this.editModel.sectionCode = selected.code
} else if (this.field === 'linkSwitch' && selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.activeName = 'first'
this.editModel.switchCode = selected.code
}
this.field = ''
this.$emit('deviceSelect', '')
},
clearDeviceSelect() {
this.$emit('deviceSelect', '')
},
create() {
const model = {
_type: 'SignalButton',
code: getUID('BTN', this.signalButtonList),
type: this.addModel.type,
name: this.addModel.name,
position: {
x: this.addModel.position.x,
y: this.addModel.position.y
},
nameOffset: {
x: this.addModel.nameOffset.x,
y: this.addModel.nameOffset.y
}
}
this.$refs.createForm.resetForm()
this.$emit('updateMapModel', model)
},
deleteObj() {
this.$refs.dataform.deleteObj()
},
//
edit() {
this.$refs.dataform.edit()
},
updateMapModel(data) {
if (this.isLinkSignal) {
data.sectionCode = ''
data.switchCode = ''
data.labelEnum = ''
} else if (this.isLinkSection) {
data.signalCode = ''
data.switchCode = ''
data.labelEnum = ''
} else if (this.isLinkSwitch) {
data.signalCode = ''
data.sectionCode = ''
data.labelEnum = ''
} else if (this.isLinkDirection) {
data.sectionCode = ''
data.signalCode = ''
data.switchCode = ''
}
this.$emit('updateMapModel', data)
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.card {
height: 100%;
}
.coordinate {
overflow: hidden;
@import 'src/styles/mixin.scss';
.card {
height: 100%;
}
.coordinate {
overflow: hidden;
.title {
text-align: right;
font-size: 14px;
color: #606266;
line-height: 40px;
padding: 0 12px 0 0;
-webkit-box-sizing: border-box;
box-sizing: border-box;
line-height: 28px;
width: 120px;
font-weight: bold;
display: block;
float: left;
margin-right: 7px;
}
}
/deep/ {
.el-select .el-input {
width: 130px;
}
.title {
text-align: right;
font-size: 14px;
color: #606266;
line-height: 40px;
padding: 0 12px 0 0;
-webkit-box-sizing: border-box;
box-sizing: border-box;
line-height: 28px;
width: 120px;
font-weight: bold;
display: block;
float: left;
margin-right: 7px;
}
}
/deep/ {
.el-select .el-input {
width: 130px;
}
.input-with-select .el-input-group__prepend {
background-color: #fff;
}
}
.input-with-select .el-input-group__prepend {
background-color: #fff;
}
}
</style>

View File

@ -50,7 +50,8 @@ export default {
{label: '红河财经', value: 'RICHOR_HHCJ'},
{label: '苏安院', value: 'SAY'},
{label: '众合-陕铁院', value: 'UNITTEC_STY'},
{label: '教学通用', value: 'TEACHING'}
{label: '教学通用', value: 'TEACHING'},
{label: '长兴技校', value: 'RICHOR_CXJS'}
],
projectMap: {
designxty: 'XTY',
@ -64,7 +65,8 @@ export default {
designsay: 'SAY',
designunittecsty: 'UNITTEC_STY',
designrichorhhcj: 'RICHOR_HHCJ',
designteaching: 'TEACHING'
designteaching: 'TEACHING',
designrichorcxjs: 'RICHOR_CXJS'
},
queryForm: {
labelWidth: '120px',

View File

@ -19,7 +19,6 @@ let outputDir = '';
outputDir = process.env.VUE_APP_PRO == 'local' || process.env.VUE_APP_PRO == 'ntyl' ? 'dist' : 'dist/cbtc';
})();
// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {
/**
@ -33,7 +32,7 @@ module.exports = {
outputDir: outputDir,
assetsDir: 'static', // 相对于outputDir的静态资源(js、css、img、fonts)目录
lintOnSave: false,
productionSourceMap: false,
productionSourceMap: false,
devServer: {
port: port,
host: '0.0.0.0',
@ -73,7 +72,7 @@ module.exports = {
// })
// );
if (process.env.NODE_ENV != 'development') {
config.mode = 'production';
config.mode = 'production';
Object.assign(config, {
output:{
@ -84,8 +83,8 @@ module.exports = {
});
} else {
// 为开发环境修改配置...
config.mode = 'development';
config.name = name;
config.mode = 'development';
config.name = name;
}
config.resolve = {