Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
5d2fff66a8
@ -1,5 +1,9 @@
|
||||
<template>
|
||||
<div v-show="show" class="pop-menu pop_menu_tip" :style="{ height: height, left: tPosition.x+'px', top: tPosition.y+'px' }">
|
||||
<div v-if="tipMsg" class="tip-top">
|
||||
<div>{{ tipMsg }}</div>
|
||||
<div>{{ tipSubhead }}</div>
|
||||
</div>
|
||||
<div v-for="(item, index) in menu" :key="index" class="" :style="{ width: width }">
|
||||
<div v-if="item.children">
|
||||
<el-popover
|
||||
@ -100,6 +104,18 @@ export default {
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
tipMsg: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
tipSubhead: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -251,6 +267,15 @@ export default {
|
||||
border-right: 2px solid #284743;
|
||||
border-bottom: 2px solid #284743;
|
||||
}
|
||||
|
||||
.tip-top{
|
||||
width: 100%;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
padding: 2px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.hover-popover{
|
||||
@ -288,6 +313,7 @@ export default {
|
||||
.el-button--text {
|
||||
padding: 6px 15px;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.separator {
|
||||
|
@ -3,6 +3,7 @@
|
||||
*/
|
||||
import Line from 'zrender/src/graphic/shape/Line';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import JTriangle from '../../utils/JTriangle';
|
||||
import ESwName from './ESwName.js';
|
||||
import ESwLocal from './ESwLocal.js';
|
||||
@ -155,12 +156,28 @@ export default class Switch extends Group {
|
||||
triangle: this.triangle
|
||||
});
|
||||
|
||||
this.enabledName = new Text({ // 道岔使能 E 西安二号线独有
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 6,
|
||||
_subType: 'enabled', // 标识
|
||||
style: {
|
||||
x: arrowTextX,
|
||||
y: arrowTextY,
|
||||
fontSize: 12,
|
||||
text: 'E',
|
||||
textAlign: 'center',
|
||||
textVerticalAlign: 'middle',
|
||||
textFill: 'yellow'
|
||||
}
|
||||
});
|
||||
|
||||
this.add(this.locShelter);
|
||||
this.add(this.relocShelter);
|
||||
this.add(this.rhomboid);
|
||||
this.add(this.sheltertriangle);
|
||||
this.add(this.releaseBackground);
|
||||
this.add(this.name);
|
||||
// this.add(this.enabledName);
|
||||
style.Switch.text.show && model.nameShow ? this.name.show() : this.name.hide();
|
||||
}
|
||||
|
||||
@ -461,6 +478,8 @@ export default class Switch extends Group {
|
||||
model.singleLock && model.blockade && this.blockMonolock(); // 单锁&锁闭状态
|
||||
/** 区段切除*/
|
||||
// this.setForkAction(); // 道岔挤岔完成
|
||||
// 道岔使能显示
|
||||
// model.enabledShow ? this.enabledName.show() : this.enabledName.hide();
|
||||
model.cutOff && this.setSwitchCutOff();
|
||||
if (this.style.Switch.sectionAction.flag) { // 哈尔滨线路处理道岔相关区段颜色
|
||||
const switchModel = Vue.prototype.$jlmap.mapDevice[model.code];
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="xian-02__menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<template v-show="isShowAll">
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<!-- <menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" /> -->
|
||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
||||
<menu-station-control ref="menuStationControl" :selected="selected" />
|
||||
@ -31,7 +31,7 @@ import MenuSwitch from './menuSwitch';
|
||||
import MenuSection from './menuSection';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuStation from './menuStation';
|
||||
import MenuBar from './menuBar';
|
||||
// import MenuBar from './menuBar';
|
||||
import MenuLimit from './menuLimit';
|
||||
// import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from './passiveDialog/control';
|
||||
@ -43,7 +43,7 @@ import MenuRequest from './menuRequest';
|
||||
export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuBar,
|
||||
// MenuBar,
|
||||
MenuAxleReset,
|
||||
MenuAutoTrunRoute,
|
||||
MenuCancel,
|
||||
@ -108,10 +108,11 @@ export default {
|
||||
|
||||
<style>
|
||||
.xian-02__menus .pop-menu {
|
||||
background: #5F9EA0;
|
||||
background: #508F86;
|
||||
padding: 0;
|
||||
}
|
||||
.xian-02__menus .pop-menu .el-popover{
|
||||
background: #5F9EA0;
|
||||
background: #508F86;
|
||||
}
|
||||
.xian-02__menus .pop-menu span {
|
||||
color: #000;
|
||||
@ -127,8 +128,8 @@ export default {
|
||||
|
||||
.xian-02__pop_tip_station{
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
background: #5F9EA0;
|
||||
margin-left: 1px !important;
|
||||
background: #508F86;
|
||||
border: 1px solid #6B736A;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
@ -1,16 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<pop-menu ref="popMenu" :menu="menu" pop-class="xian-02__pop_tip_station" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import PopMenu from '@/components/PopMenu/popTip';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { runDiagramQuit } from '@/api/simulation';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'CancelMenu',
|
||||
@ -20,22 +17,58 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [],
|
||||
menuScreen: [
|
||||
menuNormal: [
|
||||
{
|
||||
label: '放大地图',
|
||||
handler: this.magnifyMap,
|
||||
disabled: false
|
||||
label: '发送',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '缩小地图',
|
||||
handler: this.shrinkMap,
|
||||
disabled: false
|
||||
label: '取消',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '返回',
|
||||
handler: this.back,
|
||||
disabled: false
|
||||
label: '全部扣车',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '全部发车',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '停止所有列车',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '车站选择',
|
||||
children: []
|
||||
},
|
||||
{
|
||||
label: '列车选择',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '缩放',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '显示控制',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '下一窗口',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '上一窗口',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '激活所有菜单',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '恢复激活菜单',
|
||||
handler: this.undeveloped
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -44,17 +77,13 @@ export default {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
isScreen() { // 大屏隐藏所有菜单
|
||||
return this.$route.params.mode === 'dp' ||
|
||||
this.$store.state.training.roles == 'BigScreen';
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
||||
if (!this.isScreen && this.menu && this.menu.length > 1) {
|
||||
if (this.menu && this.menu.length > 1) {
|
||||
this.menu[0].disabled = true;
|
||||
this.menu[1].disabled = !((this.menu[1] && val));
|
||||
}
|
||||
@ -68,6 +97,21 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initStationList() {
|
||||
const list = [];
|
||||
this.stationList.forEach(station => {
|
||||
if (station.visible) {
|
||||
const node = {
|
||||
label: station.name,
|
||||
code: station.code,
|
||||
handler: this.mapLocation
|
||||
};
|
||||
|
||||
list.push(node);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
},
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
@ -75,10 +119,8 @@ export default {
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
if (this.isScreen) {
|
||||
this.menu = [...this.menuScreen];
|
||||
}
|
||||
this.menuNormal[5].children = this.initStationList();
|
||||
this.menu = this.menuNormal;
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
@ -99,20 +141,13 @@ export default {
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
// 放大地图
|
||||
magnifyMap() {
|
||||
this.$store.dispatch('menuOperation/handleMagnifyCount');
|
||||
},
|
||||
// 缩小地图
|
||||
shrinkMap() {
|
||||
this.$store.dispatch('menuOperation/handleShrinkCount');
|
||||
},
|
||||
// 返回
|
||||
async back() {
|
||||
await runDiagramQuit(this.group);
|
||||
EventBus.$emit('trainingSubscribeStop');
|
||||
history.go(-1);
|
||||
exitFullscreen();
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="xian-02__systerm">
|
||||
<pop-menu ref="popMenu" :menu="menu" trigger="click" pop-class="xian-02__pop_tip_station" />
|
||||
<pop-menu ref="popMenu" :menu="menu" pop-class="xian-02__pop_tip_station" :tip-msg="topTip" :tip-subhead="tipSubhead" />
|
||||
<station-cmd-control ref="stationCmdControl" />
|
||||
<station-human-control-all ref="stationHumanControlAll" />
|
||||
<station-set-route-control-all ref="stationSetRouteControlAll" />
|
||||
@ -15,9 +15,11 @@ import StationHumanControlAll from './dialog/stationHumanControlAll';
|
||||
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'StationMenu',
|
||||
@ -38,6 +40,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
topTip: '车站 (CP)',
|
||||
tipSubhead: '',
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [],
|
||||
@ -47,19 +51,19 @@ export default {
|
||||
children: [
|
||||
{
|
||||
label: '请求',
|
||||
handler: this.atsAutoControlALL
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '授权',
|
||||
handler: this.atsAutoControlALL
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '取消',
|
||||
handler: this.atsAutoControlALL
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '紧急本地控制',
|
||||
handler: this.atsAutoControlALL
|
||||
handler: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -72,7 +76,7 @@ export default {
|
||||
},
|
||||
{
|
||||
label: '人工',
|
||||
handler: this.atsAutoControlALL
|
||||
handler: this.humanControlALL
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -81,11 +85,11 @@ export default {
|
||||
children: [
|
||||
{
|
||||
label: '本地',
|
||||
handler: this.atsAutoControlALL
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '重新连接',
|
||||
handler: this.atsAutoControlALL
|
||||
handler: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -94,15 +98,15 @@ export default {
|
||||
children: [
|
||||
{
|
||||
label: '优先折返',
|
||||
handler: this.atsAutoControlALL
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '直线折返',
|
||||
handler: this.atsAutoControlALL
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '侧线折返',
|
||||
handler: this.atsAutoControlALL
|
||||
handler: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -111,19 +115,19 @@ export default {
|
||||
children: [
|
||||
{
|
||||
label: '创建设备标签',
|
||||
handler: this.atsAutoControlALL
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '查看设备标签',
|
||||
handler: this.atsAutoControlALL
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '更改设备标签',
|
||||
handler: this.atsAutoControlALL
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '删除设备标签',
|
||||
handler: this.atsAutoControlALL
|
||||
handler: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -132,11 +136,11 @@ export default {
|
||||
children: [
|
||||
{
|
||||
label: '取消验证',
|
||||
handler: this.atsAutoControlALL
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '恢复验证',
|
||||
handler: this.atsAutoControlALL
|
||||
handler: this.undeveloped
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -145,13 +149,11 @@ export default {
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置ZC故障',
|
||||
handler: this.setStoppage,
|
||||
disabledCallback: MenuDisabledState.Station.setStoppage
|
||||
handler: this.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消ZC故障',
|
||||
handler: this.cancelStoppage,
|
||||
disabledCallback: MenuDisabledState.Station.cancelStoppage
|
||||
handler: this.cancelStoppage
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -182,25 +184,11 @@ export default {
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menu = [];
|
||||
if (this.selected.concentrateStationCode == this.selected.code) {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = menuFiltration(this.menuNormal);
|
||||
this.menu = [...this.menuNormal.Center];
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
this.menu = this.menuNormal.Center;
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = [...this.menuForce];
|
||||
}
|
||||
|
||||
if (this.selected.centralized) {
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = [...this.menuForce];
|
||||
}
|
||||
}
|
||||
this.menu = [...this.menuNormal.Center];
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
@ -220,13 +208,11 @@ export default {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.stoppage.menu.operation
|
||||
};
|
||||
|
||||
this.mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
@ -242,13 +228,11 @@ export default {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.cancelStoppage.menu.operation
|
||||
};
|
||||
|
||||
this.mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
@ -258,103 +242,45 @@ export default {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 全站设置联锁自动触发
|
||||
setAutoTrigger() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.setAutoTrigger.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 全站取消联锁自动触发
|
||||
cancelAutoTrigger() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 上电解锁
|
||||
powerUnLock() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.powerUnLock.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 执行关键操作测试
|
||||
execKeyOperationTest() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.execKeyOperationTest.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 所有进路自排关
|
||||
humanControlALL() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.humanControlALL.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationHumanControlAll.doShow(operate, this.selected);
|
||||
over: true,
|
||||
operation: OperationEvent.Station.humanControlALL.menu.operation,
|
||||
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING,
|
||||
param: {
|
||||
stationCode: this.selected.code
|
||||
}
|
||||
});
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => this.doClose());
|
||||
},
|
||||
// 所有进路自排开
|
||||
atsAutoControlALL() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.stationSetRouteControlAll.menu.operation
|
||||
over: true,
|
||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
|
||||
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
|
||||
param: {
|
||||
stationCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => this.doClose());
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<pop-menu ref="popMenu" :menu="menu" pop-class="xian-02__pop_tip_station" :tip-msg="topTip" :tip-subhead="tipSubhead" />
|
||||
<switch-control ref="switchControl" />
|
||||
<switch-un-lock ref="switchUnLock" />
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
@ -10,7 +10,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import PopMenu from '@/components/PopMenu/popTip';
|
||||
import SwitchControl from './dialog/switchControl';
|
||||
import SwitchUnLock from './dialog/switchUnLock';
|
||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||
@ -19,9 +19,9 @@ import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
@ -44,6 +44,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
topTip: '',
|
||||
tipSubhead: '',
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
@ -80,48 +82,49 @@ export default {
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '定操',
|
||||
label: '道岔定位',
|
||||
handler: this.locate,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
|
||||
},
|
||||
{
|
||||
label: '反操',
|
||||
label: '道岔反位',
|
||||
handler: this.reverse,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
label: '道岔单锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
{
|
||||
label: '区段激活',
|
||||
handler: this.active,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
label: '道岔单解',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '区段切除',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
label: '设备标签',
|
||||
children: [
|
||||
{
|
||||
label: '创建设备标签',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '查看设备标签',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '更改设备标签',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '删除设备标签',
|
||||
handler: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '确认计轴有效',
|
||||
handler: this.alxeEffective,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
||||
},
|
||||
{
|
||||
label: '设置临时限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '查看公里标',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
label: '帮助',
|
||||
handler: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -152,6 +155,8 @@ export default {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Enabled) && !this.buttonOperation) {
|
||||
console.log('点击道岔使能标识');
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
@ -166,13 +171,15 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Center;
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.topTip = `道岔: ${this.selected.name}`;
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
|
@ -106,6 +106,7 @@ export const DeviceMenu = {
|
||||
LimitControl: '10',
|
||||
AutoTurnBack: '11',
|
||||
AxleReset: '12',
|
||||
Enabled: '13',
|
||||
|
||||
Map: '100',
|
||||
PrdCategory: '101',
|
||||
|
@ -43,8 +43,9 @@ function handle(state, data) {
|
||||
state.simulationReset = 'reset';
|
||||
break;
|
||||
case 'Simulation_Conversation': // 仿真-用户交互消息(聊天/命令)
|
||||
handleSimulationInfo(state, msg);
|
||||
break;
|
||||
{ handleSimulationInfo(state, msg);
|
||||
state.simuConversitionCount++;
|
||||
break; }
|
||||
case 'Simulation_PlayBack_Conversation': // 回放-用户交互消息
|
||||
handleSimulationInfo(state, msg);
|
||||
break;
|
||||
@ -132,57 +133,75 @@ function handleSimulationInfo(state, data) {
|
||||
if (data.member.userId == userId) {
|
||||
isSelf = true;
|
||||
}
|
||||
let role = '';
|
||||
switch (data.member.role) {
|
||||
case '01':
|
||||
role = '管理员';
|
||||
break;
|
||||
case '02':
|
||||
role = '教员';
|
||||
break;
|
||||
case '03':
|
||||
role = `调度员`;
|
||||
break;
|
||||
case '04':
|
||||
store.state.map.map.stationList.forEach(nor => {
|
||||
if (nor.code == data.member.deviceCode) {
|
||||
role = `${nor.name}`;
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
if (!data.member.userId && data.member.deviceName) {
|
||||
data.member.nickName = data.member.deviceName;
|
||||
}
|
||||
if (!data.targetMember.userId && data.targetMember.deviceName) {
|
||||
data.targetMember.nickName = data.targetMember.deviceName;
|
||||
}
|
||||
|
||||
const myDate = new Date();
|
||||
const myDate1 = myDate.toLocaleDateString().replace(/\//g, '-');
|
||||
const chatTime = /\d{2}:\d{2}:\d{2}/.exec(data.chatTime)[0] || data.chatTime;
|
||||
const param = {
|
||||
join: false,
|
||||
value: data.message,
|
||||
const params = {
|
||||
conversationId:data.conversationId,
|
||||
self: isSelf,
|
||||
message: data.message,
|
||||
voice: data.isAudio,
|
||||
src: data.isAudio ? `${process.env.process.env.VUE_VOICE_API}/jlcloud/audio/${data.audioPath}` : '',
|
||||
other: !isSelf,
|
||||
userName: '',
|
||||
id: data.member.id,
|
||||
src: data.isAudio ? `/jlcloud/audio/${data.audioPath}` : '',
|
||||
memberName:data.member.name,
|
||||
memberRole:data.member.name,
|
||||
memberOnline:data.member.online,
|
||||
chatTime: data.chatTime,
|
||||
date: +new Date(`${myDate1} ${chatTime}`),
|
||||
conversationId: data.conversationId,
|
||||
changeVO: data.changeVO || {},
|
||||
targetMember: data.targetMember,
|
||||
member: data.member,
|
||||
group: data.group
|
||||
targetOnline:data.targetMember.online,
|
||||
targetName:data.targetMember.name,
|
||||
targetRole:data.targetMember.role,
|
||||
group: data.group,
|
||||
date: +new Date(`${myDate1} ${chatTime}`)
|
||||
};
|
||||
if (data.member.role) {
|
||||
param.userName = `${role}【${data.member.nickName}】`;
|
||||
} else {
|
||||
param.userName = `${data.member.nickName}`;
|
||||
}
|
||||
state.simulationText = param;
|
||||
state.simulationText = params;
|
||||
// switch (data.member.role) {
|
||||
// case '01':
|
||||
// role = '管理员';
|
||||
// break;
|
||||
// case '02':
|
||||
// role = '教员';
|
||||
// break;
|
||||
// case '03':
|
||||
// role = `调度员`;
|
||||
// break;
|
||||
// case '04':
|
||||
// store.state.map.map.stationList.forEach(nor => {
|
||||
// if (nor.code == data.member.deviceCode) {
|
||||
// role = `${nor.name}`;
|
||||
// }
|
||||
// });
|
||||
// break;
|
||||
// }
|
||||
// if (!data.member.userId && data.member.deviceName) {
|
||||
// data.member.nickName = data.member.deviceName;
|
||||
// }
|
||||
// if (!data.targetMember.userId && data.targetMember.deviceName) {
|
||||
// data.targetMember.nickName = data.targetMember.deviceName;
|
||||
// }
|
||||
|
||||
// const param = {
|
||||
// join: false,
|
||||
// value: data.message,
|
||||
// self: isSelf,
|
||||
// voice: data.isAudio,
|
||||
// src: data.isAudio ? `${process.env.process.env.VUE_VOICE_API}/jlcloud/audio/${data.audioPath}` : '',
|
||||
// other: !isSelf,
|
||||
// userName: '',
|
||||
// id: data.member.id,
|
||||
// chatTime: data.chatTime,
|
||||
// date: +new Date(`${myDate1} ${chatTime}`),
|
||||
// conversationId: data.conversationId,
|
||||
// changeVO: data.changeVO || {},
|
||||
// targetMember: data.targetMember,
|
||||
// member: data.member,
|
||||
// group: data.group
|
||||
// };
|
||||
// if (data.member.role) {
|
||||
// param.userName = `${role}【${data.member.nickName}】`;
|
||||
// } else {
|
||||
// param.userName = `${data.member.nickName}`;
|
||||
// }
|
||||
// state.simulationText = param;
|
||||
}
|
||||
|
||||
function handleUserinfo(state, data) {
|
||||
|
@ -40,7 +40,7 @@
|
||||
@tryTime="tryTime"
|
||||
@hidepanel="hidepanel"
|
||||
@passflow="passflow"
|
||||
@jl3dstation = "jl3dstation"
|
||||
@jl3dstation="jl3dstation"
|
||||
@devicemodel="devicemodel"
|
||||
@quitQuest="quitQuest"
|
||||
@showScheduling="showScheduling"
|
||||
@ -69,7 +69,7 @@
|
||||
|
||||
<!-- <Jl3d-Simulation v-show="simulationShow" ref="Jl3dSimulation" :panel-show="simulationShow" @showpanel="showpanel" /> -->
|
||||
<left-slider v-if="isShowLeftSlider" :offset-bottom="offsetBottom" @overallTranslation="overallTranslation" />
|
||||
<Jl3d-Device v-if="deviceShow" ref="Jl3dDevice" :panel-show="deviceShow" />
|
||||
<Jl3d-Device v-if="deviceShow" ref="Jl3dDevice" :panel-show="deviceShow" />
|
||||
<Jl3d-Drive v-show="drivingShow" ref="Jl3dDrive" :panel-show="drivingShow" @showdriving="showdriving" />
|
||||
|
||||
<scheduling v-if="isShowScheduling" ref="scheduling" :group="group" />
|
||||
@ -256,9 +256,11 @@ export default {
|
||||
});
|
||||
},
|
||||
'size.width': function(val) {
|
||||
console.log('width');
|
||||
this.setWindowSize();
|
||||
},
|
||||
'$store.state.app.windowSizeCount': function() {
|
||||
console.log('windowSizeCount');
|
||||
this.setWindowSize();
|
||||
},
|
||||
$route() {
|
||||
@ -280,6 +282,7 @@ export default {
|
||||
this.clearCheckLogin();
|
||||
});
|
||||
|
||||
console.log('mounted');
|
||||
await this.setWindowSize();
|
||||
await this.initLoadData();
|
||||
},
|
||||
@ -558,15 +561,15 @@ export default {
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
jl3dstation(){
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/jl3dstation',
|
||||
query:{
|
||||
mapid:this.mapId,
|
||||
project: this.project
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
jl3dstation() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/jl3dstation',
|
||||
query:{
|
||||
mapid:this.mapId,
|
||||
project: this.project
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
devicemodel() {
|
||||
if (this.deviceShow == false) {
|
||||
|
@ -33,7 +33,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="chat-box-content">
|
||||
<audio src="http://192.168.3.6:9000/2020/4/23/1587636830913-ReWF1got.wav" autoplay preload="preload" />
|
||||
<chat-content :current-coversition="currentCoversition" />
|
||||
<div v-if="recordSending" class="chat_record_tip">
|
||||
<div id="record_progress_bar" :style="'width:'+100/60*seconds+'%'" />
|
||||
<div class="record_icon" />
|
||||
@ -62,6 +62,7 @@
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { creatSubscribe, clearSubscribe, assistant} from '@/utils/stomp';
|
||||
import ChatSetting from './chatSetting';
|
||||
import ChatContent from './chatContent';
|
||||
import RecordRTC from 'recordrtc';
|
||||
import {getSimulationMembersNew, getSimulationConversationListNew, getSimulationConversationIdNew, uploadAudioFileNew} from '@/api/chat';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
@ -69,7 +70,8 @@ import Cookies from 'js-cookie';
|
||||
export default {
|
||||
name: 'ChatBox',
|
||||
components:{
|
||||
ChatSetting
|
||||
ChatSetting,
|
||||
ChatContent
|
||||
},
|
||||
props: {
|
||||
group: {
|
||||
@ -137,7 +139,9 @@ export default {
|
||||
that.recorders = new RecordRTC(that.microphone, {
|
||||
type: 'audio',
|
||||
recorderType: StereoAudioRecorder,
|
||||
numberOfAudioChannels: 2
|
||||
numberOfAudioChannels: 1,
|
||||
bitsPerSecond:256000,
|
||||
desiredSampRate: 16000
|
||||
});
|
||||
that.recorders.startRecording();
|
||||
that.recordSending = true;
|
||||
@ -209,7 +213,6 @@ export default {
|
||||
fd.append('file', blob);
|
||||
uploadAudioFileNew(that.group, that.form.language, that.form.sex, that.currentCoversition.id, fd)
|
||||
.then((data) => {
|
||||
debugger;
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
|
125
src/views/newMap/jointTrainingNew/chatContent.vue
Normal file
125
src/views/newMap/jointTrainingNew/chatContent.vue
Normal file
@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<div class="chatcontentIn">
|
||||
<div v-for="(chatContent,index) in chatContentList" :key="index" class="chatContentInClass">
|
||||
<div :class="chatContent.self?'rightUser':'leftUser'">
|
||||
<div class="userHeader">
|
||||
<div v-if="chatContent.group" class="userName">{{ chatContent.memberName }}</div>
|
||||
<div :class="chatContent.self?'userChatTime textRight':'userChatTime'">{{ formatTime(chatContent.chatTime) }}</div>
|
||||
</div>
|
||||
<div class="userBubble">
|
||||
<div class="userMessage">
|
||||
<div class="messageText">{{ chatContent.message }}</div>
|
||||
<audio :src="baseUrl+chatContent.src" style="display:none" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props:{
|
||||
currentCoversition:{
|
||||
type:Object,
|
||||
required:true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chatContentList:[],
|
||||
baseUrl:''
|
||||
};
|
||||
},
|
||||
watch:{
|
||||
'$store.state.socket.simulationText':function (val, old) { // 仿真聊天
|
||||
if (this.currentCoversition.id == val.conversationId) {
|
||||
this.chatContentList.push(this.$store.state.socket.simulationText);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log('VUE_VOICE_API' + process.env.VUE_VOICE_API);
|
||||
this.baseUrl = process.env.VUE_VOICE_API;
|
||||
},
|
||||
methods:{
|
||||
formatTime(time) {
|
||||
return /\d{2}:\d{2}:\d{2}/.exec(time)[0] || time;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.chatcontentIn{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
overflow: auto;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.leftUser{
|
||||
float: left;
|
||||
margin-left: 10px;
|
||||
margin-top: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
.rightUser{
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
margin-top: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
.userHeader{margin-bottom: 2px;}
|
||||
.userName{}
|
||||
.userChatTime{font-size: 12px;}
|
||||
.userBubble{
|
||||
max-width: 300px;
|
||||
font-size: 12px;
|
||||
padding: 10px;
|
||||
background: #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.textRight{text-align: right;}
|
||||
.userMessage{}
|
||||
.messageText{}
|
||||
.chatContentInClass{
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// 谷歌、safari、qq浏览器、360浏览器滚动条样式
|
||||
// 定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸
|
||||
.chatcontentIn::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
// height: 110px;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
/*定义滚动条轨道 内阴影+圆角*/
|
||||
.chatcontentIn::-webkit-scrollbar-track {
|
||||
// box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
|
||||
border-radius: 10px;
|
||||
background-color: #FFFFFF;;
|
||||
}
|
||||
/*定义滑块 内阴影+圆角*/
|
||||
.chatcontentIn::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
// box-shadow: inset 0 0 6px rgba(0,0,0,.3);
|
||||
background-color: #cacaca;
|
||||
}
|
||||
/*滑块效果*/
|
||||
.chatcontentIn::-webkit-scrollbar-thumb:hover {
|
||||
border-radius: 5px;
|
||||
// box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
||||
background: rgba(0,0,0,0.4);
|
||||
}
|
||||
/*IE滚动条颜色*/
|
||||
html {
|
||||
scrollbar-face-color:#bfbfbf;/*滚动条颜色*/
|
||||
scrollbar-highlight-color:#000;
|
||||
scrollbar-3dlight-color:#000;
|
||||
scrollbar-darkshadow-color:#000;
|
||||
scrollbar-Shadow-color:#adadad;/*滑块边色*/
|
||||
scrollbar-arrow-color:rgba(0,0,0,0.4);/*箭头颜色*/
|
||||
scrollbar-track-color:#eeeeee;/*背景颜色*/
|
||||
}
|
||||
</style>
|
@ -117,7 +117,6 @@ export default {
|
||||
contextmenu(em) {
|
||||
var menu = null;
|
||||
var device = null;
|
||||
|
||||
this.point = { x: em.clientX, y: em.clientY };
|
||||
const lineCode = this.$store.getters['map/lineCode'];
|
||||
if (em.subType === 'TrainWindow') {
|
||||
@ -129,7 +128,10 @@ export default {
|
||||
menu = getDeviceMenuByDeviceType('StationControl');
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
// console.log(equipment, em, '控制模式');
|
||||
return;
|
||||
} else if (em.subType == 'enabled' && em.deviceType == 'Switch') {
|
||||
menu = getDeviceMenuByDeviceType('Enabled');
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
|
||||
return;
|
||||
} else if (em.deviceCode && !this.isScreen) {
|
||||
device = this.getDeviceByEm(em);
|
||||
|
@ -60,7 +60,7 @@ export default {
|
||||
routingSelected: function (data) {
|
||||
this.routeData = data;
|
||||
if (this.$refs && this.$refs.routeEdit) {
|
||||
this.$refs.routeEdit.isSave = false;
|
||||
this.$refs.routeEdit.editData();
|
||||
}
|
||||
},
|
||||
previewRouteEvent: function () {
|
||||
|
@ -208,8 +208,6 @@ export default {
|
||||
routeData(val, old) {
|
||||
if (val) {
|
||||
this.addModel = val;
|
||||
this.display = true;
|
||||
this.editShow = true;
|
||||
this.runLevelId = '';
|
||||
if (val.id) {
|
||||
this.runLevelId = val.id;
|
||||
@ -249,12 +247,16 @@ export default {
|
||||
const endStation = this.$store.getters['map/getDeviceByCode'](this.addModel.endStationCode);
|
||||
this.addModel.distance = Math.abs(startStation.kmRange - endStation.kmRange);
|
||||
},
|
||||
editData() {
|
||||
this.isSave = false;
|
||||
this.editShow = true;
|
||||
this.display = true;
|
||||
},
|
||||
generateLevel() { // 生成运行等级
|
||||
this.$refs.form.validate(async (valid) => {
|
||||
if (valid) {
|
||||
postGenerateLevel(this.addModel).then(res=>{
|
||||
if (res.code == 200) {
|
||||
this.display = 2;
|
||||
this.addModel.l1 = res.data.l1;
|
||||
this.addModel.l2 = res.data.l2;
|
||||
this.addModel.l3 = res.data.l3;
|
||||
@ -323,8 +325,7 @@ export default {
|
||||
clear() {
|
||||
if (this.$refs && this.$refs.form && this.mapInfo) {
|
||||
this.$refs.form.resetFields();
|
||||
this.display = 1;
|
||||
this.editShow = false;
|
||||
this.display = false;
|
||||
this.addModel = {
|
||||
mapId: this.mapInfo.id,
|
||||
code: setUID('RunLevel'),
|
||||
@ -341,6 +342,7 @@ export default {
|
||||
l5: 0
|
||||
};
|
||||
this.loading = false;
|
||||
this.editShow = false;
|
||||
}
|
||||
},
|
||||
hover(field) {
|
||||
|
Loading…
Reference in New Issue
Block a user