调整代码
This commit is contained in:
parent
12f283cbae
commit
11b2ee8130
@ -282,7 +282,6 @@ class Jlmap {
|
|||||||
} else if (oDevice._type === deviceType.Section) {
|
} else if (oDevice._type === deviceType.Section) {
|
||||||
this.$painter.updateShowStation(oDevice, stationCode);
|
this.$painter.updateShowStation(oDevice, stationCode);
|
||||||
this.showStationHandleSection(oDevice, stationCode);
|
this.showStationHandleSection(oDevice, stationCode);
|
||||||
} else if (oDevice._type === deviceType.TrainWindow) {
|
|
||||||
} else if (oDevice._type === deviceType.Psd) {
|
} else if (oDevice._type === deviceType.Psd) {
|
||||||
this.showStationHandlePsd(oDevice, stationCode);
|
this.showStationHandlePsd(oDevice, stationCode);
|
||||||
} else {
|
} else {
|
||||||
|
@ -6,6 +6,7 @@ import Arc from 'zrender/src/graphic/shape/Arc';
|
|||||||
import Text from 'zrender/src/graphic/Text';
|
import Text from 'zrender/src/graphic/Text';
|
||||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||||
import EMouse from './EMouse';
|
import EMouse from './EMouse';
|
||||||
|
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||||
import {isShowThePrdType} from '../../utils/handlePath';
|
import {isShowThePrdType} from '../../utils/handlePath';
|
||||||
|
|
||||||
export default class Automactic extends Group {
|
export default class Automactic extends Group {
|
||||||
@ -105,7 +106,7 @@ export default class Automactic extends Group {
|
|||||||
|
|
||||||
// 设置状态
|
// 设置状态
|
||||||
setState(model) {
|
setState(model) {
|
||||||
if (!this.isShowShape) return;
|
// model.show && this.handleSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
createMouseEvent() {
|
createMouseEvent() {
|
||||||
@ -131,7 +132,7 @@ export default class Automactic extends Group {
|
|||||||
getShapeTipPoint() {
|
getShapeTipPoint() {
|
||||||
if (this.control) {
|
if (this.control) {
|
||||||
var distance = 2;
|
var distance = 2;
|
||||||
var rect = this.control.getBoundingRect();
|
var rect = this.getArcBoundingRect();
|
||||||
return {
|
return {
|
||||||
x: rect.x + rect.width / 2,
|
x: rect.x + rect.width / 2,
|
||||||
y: rect.y - distance
|
y: rect.y - distance
|
||||||
@ -139,6 +140,22 @@ export default class Automactic extends Group {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getBoundingRect() { // 计算自动折返包围框
|
||||||
|
if (this.control) {
|
||||||
|
const rect = this.control.getBoundingRect().clone();
|
||||||
|
if (this.text) {
|
||||||
|
const text = this.text.getBoundingRect().clone();
|
||||||
|
rect.union(text);
|
||||||
|
return rect;
|
||||||
|
} else {
|
||||||
|
return rect;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return new BoundingRect(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setShowMode() {
|
setShowMode() {
|
||||||
const showMode = this.model.showMode;
|
const showMode = this.model.showMode;
|
||||||
const showConditions = this.style.AutoTurnBack.visibleConditions;
|
const showConditions = this.style.AutoTurnBack.visibleConditions;
|
||||||
|
@ -5,6 +5,7 @@ import Group from 'zrender/src/container/Group';
|
|||||||
import Arc from 'zrender/src/graphic/shape/Arc';
|
import Arc from 'zrender/src/graphic/shape/Arc';
|
||||||
import Text from 'zrender/src/graphic/Text';
|
import Text from 'zrender/src/graphic/Text';
|
||||||
import EMouse from './EMouse';
|
import EMouse from './EMouse';
|
||||||
|
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||||
import {isShowThePrdType} from '../../utils/handlePath';
|
import {isShowThePrdType} from '../../utils/handlePath';
|
||||||
|
|
||||||
export default class AutomacticRoute extends Group {
|
export default class AutomacticRoute extends Group {
|
||||||
@ -110,6 +111,22 @@ export default class AutomacticRoute extends Group {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getBoundingRect() { // 计算自动折返包围框
|
||||||
|
if (this.control) {
|
||||||
|
const rect = this.control.getBoundingRect().clone();
|
||||||
|
if (this.text) {
|
||||||
|
const text = this.text.getBoundingRect().clone();
|
||||||
|
rect.union(text);
|
||||||
|
return rect;
|
||||||
|
} else {
|
||||||
|
return rect;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return new BoundingRect(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setShowMode() {
|
setShowMode() {
|
||||||
const showMode = this.model.showMode;
|
const showMode = this.model.showMode;
|
||||||
const showConditions = this.style.AutomaticRoute.displayCondition;
|
const showConditions = this.style.AutomaticRoute.displayCondition;
|
||||||
|
@ -5,6 +5,7 @@ import Group from 'zrender/src/container/Group';
|
|||||||
import Arc from 'zrender/src/graphic/shape/Arc';
|
import Arc from 'zrender/src/graphic/shape/Arc';
|
||||||
import Text from 'zrender/src/graphic/Text';
|
import Text from 'zrender/src/graphic/Text';
|
||||||
import EMouse from './EMouse';
|
import EMouse from './EMouse';
|
||||||
|
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||||
import {isShowThePrdType} from '../../utils/handlePath';
|
import {isShowThePrdType} from '../../utils/handlePath';
|
||||||
|
|
||||||
export default class AxleReset extends Group {
|
export default class AxleReset extends Group {
|
||||||
@ -110,6 +111,21 @@ export default class AxleReset extends Group {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getBoundingRect() { // 计算自动折返包围框
|
||||||
|
if (this.control) {
|
||||||
|
const rect = this.control.getBoundingRect().clone();
|
||||||
|
if (this.text) {
|
||||||
|
const text = this.text.getBoundingRect().clone();
|
||||||
|
rect.union(text);
|
||||||
|
return rect;
|
||||||
|
} else {
|
||||||
|
return rect;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return new BoundingRect(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
setShowMode() {
|
setShowMode() {
|
||||||
const showMode = this.model.showMode;
|
const showMode = this.model.showMode;
|
||||||
const showConditions = this.style.AxleReset.displayCondition;
|
const showConditions = this.style.AxleReset.displayCondition;
|
||||||
|
@ -5,6 +5,7 @@ import Group from 'zrender/src/container/Group';
|
|||||||
import Arc from 'zrender/src/graphic/shape/Arc';
|
import Arc from 'zrender/src/graphic/shape/Arc';
|
||||||
import Text from 'zrender/src/graphic/Text';
|
import Text from 'zrender/src/graphic/Text';
|
||||||
import EMouse from './EMouse';
|
import EMouse from './EMouse';
|
||||||
|
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||||
import {isShowThePrdType} from '../../utils/handlePath';
|
import {isShowThePrdType} from '../../utils/handlePath';
|
||||||
|
|
||||||
export default class GuideLock extends Group {
|
export default class GuideLock extends Group {
|
||||||
@ -110,6 +111,20 @@ export default class GuideLock extends Group {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
getBoundingRect() { // 计算自动折返包围框
|
||||||
|
if (this.control) {
|
||||||
|
const rect = this.control.getBoundingRect().clone();
|
||||||
|
if (this.text) {
|
||||||
|
const text = this.text.getBoundingRect().clone();
|
||||||
|
rect.union(text);
|
||||||
|
return rect;
|
||||||
|
} else {
|
||||||
|
return rect;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return new BoundingRect(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
setShowMode() {
|
setShowMode() {
|
||||||
const showMode = this.model.showMode;
|
const showMode = this.model.showMode;
|
||||||
const showConditions = this.style.GuideLock.displayCondition;
|
const showConditions = this.style.GuideLock.displayCondition;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
>
|
>
|
||||||
<el-row class="header">
|
<el-row class="header">
|
||||||
<el-col :span="11"><span>集中站</span></el-col>
|
<el-col :span="11"><span>集中站</span></el-col>
|
||||||
<el-col :span="11" :offset="2"><span>信号机</span></el-col>
|
<el-col :span="11" :offset="2"><span>折返</span></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
@ -22,10 +22,14 @@
|
|||||||
<el-input v-model="signalName" size="small" disabled />
|
<el-input v-model="signalName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div style="margin: 12px 0;">
|
<el-row style="margin: 12px 0;">
|
||||||
<el-radio :id="upRadioId" v-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" :disabled="passRadio == '2'">设置</el-radio>
|
<el-col :span="11">
|
||||||
<el-radio :id="upRadioId" v-model="passRadio" label="2" style="display: block; padding-left: 10px;" :disabled="passRadio == '1'">取消</el-radio>
|
<el-radio :id="upRadioId" v-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" :disabled="passRadio == '2'">设置</el-radio>
|
||||||
</div>
|
</el-col>
|
||||||
|
<el-col :span="11" :offset="2">
|
||||||
|
<el-radio :id="upRadioId" v-model="passRadio" label="2" style="display: block; padding-left: 10px;" :disabled="passRadio == '1'">取消</el-radio>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
<el-col :span="10" :offset="2">
|
<el-col :span="10" :offset="2">
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||||
@ -88,8 +92,9 @@ export default {
|
|||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.signalName = '';
|
this.signalName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'AutoTurnBack'.toUpperCase()) {
|
||||||
this.signalName = selected.name;
|
const autoReentryData = this.$store.getters['map/autoReentryData'];
|
||||||
|
this.signalName = autoReentryData[selected.cycleCode].name;
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
|
@ -88,7 +88,6 @@ export default {
|
|||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
console.log(this.menu);
|
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = this.menuForce;
|
this.menu = this.menuForce;
|
||||||
@ -116,7 +115,7 @@ export default {
|
|||||||
autoTurnBackCode: this.selected.code
|
autoTurnBackCode: this.selected.code
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.turnBackControl.doShow(operate, this.selected);
|
this.$refs.turnBackControl.doShow(operate, this.selected);
|
||||||
@ -133,7 +132,7 @@ export default {
|
|||||||
autoTurnBackCode: this.selected.code
|
autoTurnBackCode: this.selected.code
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.turnBackControl.doShow(operate, this.selected);
|
this.$refs.turnBackControl.doShow(operate, this.selected);
|
||||||
|
@ -94,8 +94,8 @@ class MenuContextHandler {
|
|||||||
if (control) {
|
if (control) {
|
||||||
if (this.getPrdType() != '') {
|
if (this.getPrdType() != '') {
|
||||||
const type = State2SimulationMap[this.getPrdType()];
|
const type = State2SimulationMap[this.getPrdType()];
|
||||||
const status = State2ControlMap[control.controlMode]; // 判断当前模式
|
// const status = State2ControlMap[control.controlMode]; // 判断当前模式
|
||||||
// const status = 'LocalStationControl';
|
const status = 'LocalStationControl';
|
||||||
menu = [...menuList[type]];
|
menu = [...menuList[type]];
|
||||||
// 特殊处理站台的右键操作( 因为小站台不允许有操作 )
|
// 特殊处理站台的右键操作( 因为小站台不允许有操作 )
|
||||||
if (selected._type == 'StationStand') {
|
if (selected._type == 'StationStand') {
|
||||||
|
@ -183,7 +183,7 @@ export default {
|
|||||||
return this.editModel.type == 'AutoTurnBack' || this.editModel.type == 'AutomaticRoute';
|
return this.editModel.type == 'AutoTurnBack' || this.editModel.type == 'AutomaticRoute';
|
||||||
},
|
},
|
||||||
isHiddenStation() {
|
isHiddenStation() {
|
||||||
return this.editModel.type == 'AutoTurnBack' || this.editModel.type == 'AutomaticRoute' || this.editModel.type == 'AxleReset';
|
return this.editModel.type == 'AutoTurnBack' || this.editModel.type == 'GuideLock' || this.editModel.type == 'AxleReset';
|
||||||
},
|
},
|
||||||
|
|
||||||
isHiddenCreateAutomaticRoute() {
|
isHiddenCreateAutomaticRoute() {
|
||||||
@ -196,7 +196,7 @@ export default {
|
|||||||
return this.addModel.type == 'AutoTurnBack' || this.addModel.type == 'AutomaticRoute';
|
return this.addModel.type == 'AutoTurnBack' || this.addModel.type == 'AutomaticRoute';
|
||||||
},
|
},
|
||||||
isHiddenCreateStation() {
|
isHiddenCreateStation() {
|
||||||
return this.addModel.type == 'AutoTurnBack' || this.addModel.type == 'AutomaticRoute' || this.addModel.type == 'AxleReset';
|
return this.addModel.type == 'AutoTurnBack' || this.addModel.type == 'GuideLock' || this.addModel.type == 'AxleReset';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -261,10 +261,9 @@ export default {
|
|||||||
this.getAutoMaticList();
|
this.getAutoMaticList();
|
||||||
},
|
},
|
||||||
deviceSelect(selected) {
|
deviceSelect(selected) {
|
||||||
debugger;
|
|
||||||
this.$refs.dataform.resetFields();
|
this.$refs.dataform.resetFields();
|
||||||
this.$refs.make.resetFields();
|
this.$refs.make.resetFields();
|
||||||
if (selected && selected._type.toUpperCase() == 'AutomaticRoute'.toUpperCase() || selected._type.toUpperCase() == 'MapCycleButtonVO'.toUpperCase() || selected._type.toUpperCase() == 'AxleReset'.toUpperCase() || selected._type.toUpperCase() == 'LimitControl'.toUpperCase() || selected._type.toUpperCase() == 'GuideLock'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() == 'AutomaticRoute'.toUpperCase() || selected._type.toUpperCase() == 'AutoTurnBack'.toUpperCase() || selected._type.toUpperCase() == 'AxleReset'.toUpperCase() || selected._type.toUpperCase() == 'LimitControl'.toUpperCase() || selected._type.toUpperCase() == 'GuideLock'.toUpperCase()) {
|
||||||
this.activeName = 'first';
|
this.activeName = 'first';
|
||||||
this.editModel = deepAssign(this.editModel, selected);
|
this.editModel = deepAssign(this.editModel, selected);
|
||||||
this.editModel.type = selected._type;
|
this.editModel.type = selected._type;
|
||||||
|
@ -301,7 +301,7 @@ export default {
|
|||||||
this.enabledTab = 'Esp';
|
this.enabledTab = 'Esp';
|
||||||
} else if (this.feild) {
|
} else if (this.feild) {
|
||||||
this.enabledTab = 'Section';
|
this.enabledTab = 'Section';
|
||||||
} else if (type == 'AutomaticRoute' || type == 'MapCycleButtonVO' || type == 'AxleReset' || type == 'LimitControl' || type == 'GuideLock') {
|
} else if (type == 'AutomaticRoute' || type == 'AutoTurnBack' || type == 'AxleReset' || type == 'LimitControl' || type == 'GuideLock') {
|
||||||
this.enabledTab = 'ControlDraft';
|
this.enabledTab = 'ControlDraft';
|
||||||
} else {
|
} else {
|
||||||
this.enabledTab = type;
|
this.enabledTab = type;
|
||||||
|
Loading…
Reference in New Issue
Block a user