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>
|
<template>
|
||||||
<div v-show="show" class="pop-menu pop_menu_tip" :style="{ height: height, left: tPosition.x+'px', top: tPosition.y+'px' }">
|
<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-for="(item, index) in menu" :key="index" class="" :style="{ width: width }">
|
||||||
<div v-if="item.children">
|
<div v-if="item.children">
|
||||||
<el-popover
|
<el-popover
|
||||||
@ -100,6 +104,18 @@ export default {
|
|||||||
default() {
|
default() {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
tipMsg: {
|
||||||
|
type: String,
|
||||||
|
default() {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tipSubhead: {
|
||||||
|
type: String,
|
||||||
|
default() {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -251,6 +267,15 @@ export default {
|
|||||||
border-right: 2px solid #284743;
|
border-right: 2px solid #284743;
|
||||||
border-bottom: 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{
|
.hover-popover{
|
||||||
@ -288,6 +313,7 @@ export default {
|
|||||||
.el-button--text {
|
.el-button--text {
|
||||||
padding: 6px 15px;
|
padding: 6px 15px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.separator {
|
.separator {
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
import Line from 'zrender/src/graphic/shape/Line';
|
import Line from 'zrender/src/graphic/shape/Line';
|
||||||
import Group from 'zrender/src/container/Group';
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import Text from 'zrender/src/graphic/Text';
|
||||||
import JTriangle from '../../utils/JTriangle';
|
import JTriangle from '../../utils/JTriangle';
|
||||||
import ESwName from './ESwName.js';
|
import ESwName from './ESwName.js';
|
||||||
import ESwLocal from './ESwLocal.js';
|
import ESwLocal from './ESwLocal.js';
|
||||||
@ -155,12 +156,28 @@ export default class Switch extends Group {
|
|||||||
triangle: this.triangle
|
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.locShelter);
|
||||||
this.add(this.relocShelter);
|
this.add(this.relocShelter);
|
||||||
this.add(this.rhomboid);
|
this.add(this.rhomboid);
|
||||||
this.add(this.sheltertriangle);
|
this.add(this.sheltertriangle);
|
||||||
this.add(this.releaseBackground);
|
this.add(this.releaseBackground);
|
||||||
this.add(this.name);
|
this.add(this.name);
|
||||||
|
// this.add(this.enabledName);
|
||||||
style.Switch.text.show && model.nameShow ? this.name.show() : this.name.hide();
|
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(); // 单锁&锁闭状态
|
model.singleLock && model.blockade && this.blockMonolock(); // 单锁&锁闭状态
|
||||||
/** 区段切除*/
|
/** 区段切除*/
|
||||||
// this.setForkAction(); // 道岔挤岔完成
|
// this.setForkAction(); // 道岔挤岔完成
|
||||||
|
// 道岔使能显示
|
||||||
|
// model.enabledShow ? this.enabledName.show() : this.enabledName.hide();
|
||||||
model.cutOff && this.setSwitchCutOff();
|
model.cutOff && this.setSwitchCutOff();
|
||||||
if (this.style.Switch.sectionAction.flag) { // 哈尔滨线路处理道岔相关区段颜色
|
if (this.style.Switch.sectionAction.flag) { // 哈尔滨线路处理道岔相关区段颜色
|
||||||
const switchModel = Vue.prototype.$jlmap.mapDevice[model.code];
|
const switchModel = Vue.prototype.$jlmap.mapDevice[model.code];
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="xian-02__menus" :style="{width: width + 'px'}">
|
<div class="xian-02__menus" :style="{width: width + 'px'}">
|
||||||
<menu-cancel ref="menuCancel" />
|
<menu-cancel ref="menuCancel" />
|
||||||
<template v-show="isShowAll">
|
<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-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||||
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
||||||
<menu-station-control ref="menuStationControl" :selected="selected" />
|
<menu-station-control ref="menuStationControl" :selected="selected" />
|
||||||
@ -31,7 +31,7 @@ import MenuSwitch from './menuSwitch';
|
|||||||
import MenuSection from './menuSection';
|
import MenuSection from './menuSection';
|
||||||
import MenuTrain from './menuTrain';
|
import MenuTrain from './menuTrain';
|
||||||
import MenuStation from './menuStation';
|
import MenuStation from './menuStation';
|
||||||
import MenuBar from './menuBar';
|
// import MenuBar from './menuBar';
|
||||||
import MenuLimit from './menuLimit';
|
import MenuLimit from './menuLimit';
|
||||||
// import PassiveAlarm from './passiveDialog/alarm';
|
// import PassiveAlarm from './passiveDialog/alarm';
|
||||||
import PassiveContorl from './passiveDialog/control';
|
import PassiveContorl from './passiveDialog/control';
|
||||||
@ -43,7 +43,7 @@ import MenuRequest from './menuRequest';
|
|||||||
export default {
|
export default {
|
||||||
name: 'Menus',
|
name: 'Menus',
|
||||||
components: {
|
components: {
|
||||||
MenuBar,
|
// MenuBar,
|
||||||
MenuAxleReset,
|
MenuAxleReset,
|
||||||
MenuAutoTrunRoute,
|
MenuAutoTrunRoute,
|
||||||
MenuCancel,
|
MenuCancel,
|
||||||
@ -108,10 +108,11 @@ export default {
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.xian-02__menus .pop-menu {
|
.xian-02__menus .pop-menu {
|
||||||
background: #5F9EA0;
|
background: #508F86;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
.xian-02__menus .pop-menu .el-popover{
|
.xian-02__menus .pop-menu .el-popover{
|
||||||
background: #5F9EA0;
|
background: #508F86;
|
||||||
}
|
}
|
||||||
.xian-02__menus .pop-menu span {
|
.xian-02__menus .pop-menu span {
|
||||||
color: #000;
|
color: #000;
|
||||||
@ -127,8 +128,8 @@ export default {
|
|||||||
|
|
||||||
.xian-02__pop_tip_station{
|
.xian-02__pop_tip_station{
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
margin: 0 !important;
|
margin-left: 1px !important;
|
||||||
background: #5F9EA0;
|
background: #508F86;
|
||||||
border: 1px solid #6B736A;
|
border: 1px solid #6B736A;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" pop-class="xian-02__pop_tip_station" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu/popTip';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { exitFullscreen } from '@/utils/screen';
|
|
||||||
import { runDiagramQuit } from '@/api/simulation';
|
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CancelMenu',
|
name: 'CancelMenu',
|
||||||
@ -20,22 +17,58 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: [],
|
menuNormal: [
|
||||||
menuScreen: [
|
|
||||||
{
|
{
|
||||||
label: '放大地图',
|
label: '发送',
|
||||||
handler: this.magnifyMap,
|
handler: this.undeveloped
|
||||||
disabled: false
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '缩小地图',
|
label: '取消',
|
||||||
handler: this.shrinkMap,
|
handler: this.undeveloped
|
||||||
disabled: false
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '返回',
|
label: '全部扣车',
|
||||||
handler: this.back,
|
handler: this.undeveloped
|
||||||
disabled: false
|
},
|
||||||
|
{
|
||||||
|
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', [
|
...mapGetters('map', [
|
||||||
'stationList'
|
'stationList'
|
||||||
]),
|
]),
|
||||||
isScreen() { // 大屏隐藏所有菜单
|
|
||||||
return this.$route.params.mode === 'dp' ||
|
|
||||||
this.$store.state.training.roles == 'BigScreen';
|
|
||||||
},
|
|
||||||
group() {
|
group() {
|
||||||
return this.$route.query.group;
|
return this.$route.query.group;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
'$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[0].disabled = true;
|
||||||
this.menu[1].disabled = !((this.menu[1] && val));
|
this.menu[1].disabled = !((this.menu[1] && val));
|
||||||
}
|
}
|
||||||
@ -68,6 +97,21 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
clickEvent() {
|
||||||
const self = this;
|
const self = this;
|
||||||
window.onclick = function (e) {
|
window.onclick = function (e) {
|
||||||
@ -75,10 +119,8 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
this.menuNormal = [];
|
this.menuNormal[5].children = this.initStationList();
|
||||||
if (this.isScreen) {
|
this.menu = this.menuNormal;
|
||||||
this.menu = [...this.menuScreen];
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
@ -99,20 +141,13 @@ export default {
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 放大地图
|
undeveloped() {
|
||||||
magnifyMap() {
|
this.doClose();
|
||||||
this.$store.dispatch('menuOperation/handleMagnifyCount');
|
this.$alert('实现中......', '提示', {
|
||||||
},
|
confirmButtonText: '确定',
|
||||||
// 缩小地图
|
callback: action => {
|
||||||
shrinkMap() {
|
}
|
||||||
this.$store.dispatch('menuOperation/handleShrinkCount');
|
});
|
||||||
},
|
|
||||||
// 返回
|
|
||||||
async back() {
|
|
||||||
await runDiagramQuit(this.group);
|
|
||||||
EventBus.$emit('trainingSubscribeStop');
|
|
||||||
history.go(-1);
|
|
||||||
exitFullscreen();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="xian-02__systerm">
|
<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-cmd-control ref="stationCmdControl" />
|
||||||
<station-human-control-all ref="stationHumanControlAll" />
|
<station-human-control-all ref="stationHumanControlAll" />
|
||||||
<station-set-route-control-all ref="stationSetRouteControlAll" />
|
<station-set-route-control-all ref="stationSetRouteControlAll" />
|
||||||
@ -15,9 +15,11 @@ import StationHumanControlAll from './dialog/stationHumanControlAll';
|
|||||||
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
|
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationMenu',
|
name: 'StationMenu',
|
||||||
@ -38,6 +40,8 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
topTip: '车站 (CP)',
|
||||||
|
tipSubhead: '',
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
Local: [],
|
Local: [],
|
||||||
@ -47,19 +51,19 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
label: '请求',
|
label: '请求',
|
||||||
handler: this.atsAutoControlALL
|
handler: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '授权',
|
label: '授权',
|
||||||
handler: this.atsAutoControlALL
|
handler: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消',
|
label: '取消',
|
||||||
handler: this.atsAutoControlALL
|
handler: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '紧急本地控制',
|
label: '紧急本地控制',
|
||||||
handler: this.atsAutoControlALL
|
handler: this.undeveloped
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -72,7 +76,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '人工',
|
label: '人工',
|
||||||
handler: this.atsAutoControlALL
|
handler: this.humanControlALL
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -81,11 +85,11 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
label: '本地',
|
label: '本地',
|
||||||
handler: this.atsAutoControlALL
|
handler: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '重新连接',
|
label: '重新连接',
|
||||||
handler: this.atsAutoControlALL
|
handler: this.undeveloped
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -94,15 +98,15 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
label: '优先折返',
|
label: '优先折返',
|
||||||
handler: this.atsAutoControlALL
|
handler: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '直线折返',
|
label: '直线折返',
|
||||||
handler: this.atsAutoControlALL
|
handler: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '侧线折返',
|
label: '侧线折返',
|
||||||
handler: this.atsAutoControlALL
|
handler: this.undeveloped
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -111,19 +115,19 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
label: '创建设备标签',
|
label: '创建设备标签',
|
||||||
handler: this.atsAutoControlALL
|
handler: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '查看设备标签',
|
label: '查看设备标签',
|
||||||
handler: this.atsAutoControlALL
|
handler: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '更改设备标签',
|
label: '更改设备标签',
|
||||||
handler: this.atsAutoControlALL
|
handler: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '删除设备标签',
|
label: '删除设备标签',
|
||||||
handler: this.atsAutoControlALL
|
handler: this.undeveloped
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -132,11 +136,11 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
label: '取消验证',
|
label: '取消验证',
|
||||||
handler: this.atsAutoControlALL
|
handler: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '恢复验证',
|
label: '恢复验证',
|
||||||
handler: this.atsAutoControlALL
|
handler: this.undeveloped
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -145,13 +149,11 @@ export default {
|
|||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: '设置ZC故障',
|
label: '设置ZC故障',
|
||||||
handler: this.setStoppage,
|
handler: this.setStoppage
|
||||||
disabledCallback: MenuDisabledState.Station.setStoppage
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消ZC故障',
|
label: '取消ZC故障',
|
||||||
handler: this.cancelStoppage,
|
handler: this.cancelStoppage
|
||||||
disabledCallback: MenuDisabledState.Station.cancelStoppage
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -182,25 +184,11 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
this.menu = [];
|
this.menu = this.menuNormal.Center;
|
||||||
if (this.selected.concentrateStationCode == this.selected.code) {
|
// 故障模式菜单列表
|
||||||
// 编辑模式菜单列表
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
// this.menu = menuFiltration(this.menuNormal);
|
this.menu = [...this.menuForce];
|
||||||
this.menu = [...this.menuNormal.Center];
|
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
|
||||||
this.menu = [...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) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
@ -220,13 +208,11 @@ export default {
|
|||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Station.type,
|
|
||||||
label: MapDeviceType.Station.label,
|
|
||||||
operation: OperationEvent.Station.stoppage.menu.operation
|
operation: OperationEvent.Station.stoppage.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.mouseCancelState(this.selected);
|
this.mouseCancelState(this.selected);
|
||||||
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 });
|
||||||
} else {
|
} else {
|
||||||
@ -242,13 +228,11 @@ export default {
|
|||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Station.type,
|
|
||||||
label: MapDeviceType.Station.label,
|
|
||||||
operation: OperationEvent.Station.cancelStoppage.menu.operation
|
operation: OperationEvent.Station.cancelStoppage.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.mouseCancelState(this.selected);
|
this.mouseCancelState(this.selected);
|
||||||
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 });
|
||||||
} else {
|
} else {
|
||||||
@ -258,103 +242,45 @@ export default {
|
|||||||
this.$refs.noticeInfo.doShow(operate);
|
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() {
|
humanControlALL() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
over: true,
|
||||||
type: MapDeviceType.Station.type,
|
operation: OperationEvent.Station.humanControlALL.menu.operation,
|
||||||
label: MapDeviceType.Station.label,
|
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING,
|
||||||
operation: OperationEvent.Station.humanControlALL.menu.operation
|
param: {
|
||||||
};
|
stationCode: this.selected.code
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.stationHumanControlAll.doShow(operate, this.selected);
|
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => this.doClose());
|
||||||
},
|
},
|
||||||
// 所有进路自排开
|
// 所有进路自排开
|
||||||
atsAutoControlALL() {
|
atsAutoControlALL() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
over: true,
|
||||||
type: MapDeviceType.Station.type,
|
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
|
||||||
label: MapDeviceType.Station.label,
|
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
|
||||||
operation: OperationEvent.Station.stationSetRouteControlAll.menu.operation
|
param: {
|
||||||
|
stationCode: 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.doClose();
|
||||||
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
|
}
|
||||||
|
}).catch(() => this.doClose());
|
||||||
|
},
|
||||||
|
undeveloped() {
|
||||||
|
this.doClose();
|
||||||
|
this.$alert('实现中......', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
callback: action => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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-control ref="switchControl" />
|
||||||
<switch-un-lock ref="switchUnLock" />
|
<switch-un-lock ref="switchUnLock" />
|
||||||
<speed-limit-control ref="speedLimitControl" />
|
<speed-limit-control ref="speedLimitControl" />
|
||||||
@ -10,7 +10,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu/popTip';
|
||||||
import SwitchControl from './dialog/switchControl';
|
import SwitchControl from './dialog/switchControl';
|
||||||
import SwitchUnLock from './dialog/switchUnLock';
|
import SwitchUnLock from './dialog/switchUnLock';
|
||||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||||
@ -19,9 +19,9 @@ import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -44,6 +44,8 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
topTip: '',
|
||||||
|
tipSubhead: '',
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
Local: [
|
Local: [
|
||||||
@ -80,48 +82,49 @@ export default {
|
|||||||
],
|
],
|
||||||
Center: [
|
Center: [
|
||||||
{
|
{
|
||||||
label: '定操',
|
label: '道岔定位',
|
||||||
handler: this.locate,
|
handler: this.locate,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
|
cmdType: CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '反操',
|
label: '道岔反位',
|
||||||
handler: this.reverse,
|
handler: this.reverse,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
|
cmdType: CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'separator'
|
label: '道岔单锁',
|
||||||
|
handler: this.lock,
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '区段激活',
|
label: '道岔单解',
|
||||||
handler: this.active,
|
handler: this.unlock,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '区段切除',
|
label: '设备标签',
|
||||||
handler: this.split,
|
children: [
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
{
|
||||||
|
label: '创建设备标签',
|
||||||
|
handler: this.undeveloped
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '查看设备标签',
|
||||||
|
handler: this.undeveloped
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '更改设备标签',
|
||||||
|
handler: this.undeveloped
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '删除设备标签',
|
||||||
|
handler: this.undeveloped
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'separator'
|
label: '帮助',
|
||||||
},
|
handler: this.undeveloped
|
||||||
{
|
|
||||||
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
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -152,6 +155,8 @@ export default {
|
|||||||
'$store.state.menuOperation.menuCount': function (val) {
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
|
} else if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Enabled) && !this.buttonOperation) {
|
||||||
|
console.log('点击道岔使能标识');
|
||||||
} else {
|
} else {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
@ -166,13 +171,15 @@ export default {
|
|||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
|
this.menu = this.menuNormal.Center;
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = this.menuForce;
|
this.menu = this.menuForce;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
|
this.topTip = `道岔: ${this.selected.name}`;
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
|
@ -106,6 +106,7 @@ export const DeviceMenu = {
|
|||||||
LimitControl: '10',
|
LimitControl: '10',
|
||||||
AutoTurnBack: '11',
|
AutoTurnBack: '11',
|
||||||
AxleReset: '12',
|
AxleReset: '12',
|
||||||
|
Enabled: '13',
|
||||||
|
|
||||||
Map: '100',
|
Map: '100',
|
||||||
PrdCategory: '101',
|
PrdCategory: '101',
|
||||||
|
@ -43,8 +43,9 @@ function handle(state, data) {
|
|||||||
state.simulationReset = 'reset';
|
state.simulationReset = 'reset';
|
||||||
break;
|
break;
|
||||||
case 'Simulation_Conversation': // 仿真-用户交互消息(聊天/命令)
|
case 'Simulation_Conversation': // 仿真-用户交互消息(聊天/命令)
|
||||||
handleSimulationInfo(state, msg);
|
{ handleSimulationInfo(state, msg);
|
||||||
break;
|
state.simuConversitionCount++;
|
||||||
|
break; }
|
||||||
case 'Simulation_PlayBack_Conversation': // 回放-用户交互消息
|
case 'Simulation_PlayBack_Conversation': // 回放-用户交互消息
|
||||||
handleSimulationInfo(state, msg);
|
handleSimulationInfo(state, msg);
|
||||||
break;
|
break;
|
||||||
@ -132,57 +133,75 @@ function handleSimulationInfo(state, data) {
|
|||||||
if (data.member.userId == userId) {
|
if (data.member.userId == userId) {
|
||||||
isSelf = true;
|
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 myDate = new Date();
|
||||||
const myDate1 = myDate.toLocaleDateString().replace(/\//g, '-');
|
const myDate1 = myDate.toLocaleDateString().replace(/\//g, '-');
|
||||||
const chatTime = /\d{2}:\d{2}:\d{2}/.exec(data.chatTime)[0] || data.chatTime;
|
const chatTime = /\d{2}:\d{2}:\d{2}/.exec(data.chatTime)[0] || data.chatTime;
|
||||||
const param = {
|
const params = {
|
||||||
join: false,
|
conversationId:data.conversationId,
|
||||||
value: data.message,
|
|
||||||
self: isSelf,
|
self: isSelf,
|
||||||
|
message: data.message,
|
||||||
voice: data.isAudio,
|
voice: data.isAudio,
|
||||||
src: data.isAudio ? `${process.env.process.env.VUE_VOICE_API}/jlcloud/audio/${data.audioPath}` : '',
|
src: data.isAudio ? `/jlcloud/audio/${data.audioPath}` : '',
|
||||||
other: !isSelf,
|
memberName:data.member.name,
|
||||||
userName: '',
|
memberRole:data.member.name,
|
||||||
id: data.member.id,
|
memberOnline:data.member.online,
|
||||||
chatTime: data.chatTime,
|
chatTime: data.chatTime,
|
||||||
date: +new Date(`${myDate1} ${chatTime}`),
|
targetOnline:data.targetMember.online,
|
||||||
conversationId: data.conversationId,
|
targetName:data.targetMember.name,
|
||||||
changeVO: data.changeVO || {},
|
targetRole:data.targetMember.role,
|
||||||
targetMember: data.targetMember,
|
group: data.group,
|
||||||
member: data.member,
|
date: +new Date(`${myDate1} ${chatTime}`)
|
||||||
group: data.group
|
|
||||||
};
|
};
|
||||||
if (data.member.role) {
|
state.simulationText = params;
|
||||||
param.userName = `${role}【${data.member.nickName}】`;
|
// switch (data.member.role) {
|
||||||
} else {
|
// case '01':
|
||||||
param.userName = `${data.member.nickName}`;
|
// role = '管理员';
|
||||||
}
|
// break;
|
||||||
state.simulationText = param;
|
// 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) {
|
function handleUserinfo(state, data) {
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
@tryTime="tryTime"
|
@tryTime="tryTime"
|
||||||
@hidepanel="hidepanel"
|
@hidepanel="hidepanel"
|
||||||
@passflow="passflow"
|
@passflow="passflow"
|
||||||
@jl3dstation = "jl3dstation"
|
@jl3dstation="jl3dstation"
|
||||||
@devicemodel="devicemodel"
|
@devicemodel="devicemodel"
|
||||||
@quitQuest="quitQuest"
|
@quitQuest="quitQuest"
|
||||||
@showScheduling="showScheduling"
|
@showScheduling="showScheduling"
|
||||||
@ -69,7 +69,7 @@
|
|||||||
|
|
||||||
<!-- <Jl3d-Simulation v-show="simulationShow" ref="Jl3dSimulation" :panel-show="simulationShow" @showpanel="showpanel" /> -->
|
<!-- <Jl3d-Simulation v-show="simulationShow" ref="Jl3dSimulation" :panel-show="simulationShow" @showpanel="showpanel" /> -->
|
||||||
<left-slider v-if="isShowLeftSlider" :offset-bottom="offsetBottom" @overallTranslation="overallTranslation" />
|
<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" />
|
<Jl3d-Drive v-show="drivingShow" ref="Jl3dDrive" :panel-show="drivingShow" @showdriving="showdriving" />
|
||||||
|
|
||||||
<scheduling v-if="isShowScheduling" ref="scheduling" :group="group" />
|
<scheduling v-if="isShowScheduling" ref="scheduling" :group="group" />
|
||||||
@ -256,9 +256,11 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
'size.width': function(val) {
|
'size.width': function(val) {
|
||||||
|
console.log('width');
|
||||||
this.setWindowSize();
|
this.setWindowSize();
|
||||||
},
|
},
|
||||||
'$store.state.app.windowSizeCount': function() {
|
'$store.state.app.windowSizeCount': function() {
|
||||||
|
console.log('windowSizeCount');
|
||||||
this.setWindowSize();
|
this.setWindowSize();
|
||||||
},
|
},
|
||||||
$route() {
|
$route() {
|
||||||
@ -280,6 +282,7 @@ export default {
|
|||||||
this.clearCheckLogin();
|
this.clearCheckLogin();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log('mounted');
|
||||||
await this.setWindowSize();
|
await this.setWindowSize();
|
||||||
await this.initLoadData();
|
await this.initLoadData();
|
||||||
},
|
},
|
||||||
@ -558,15 +561,15 @@ export default {
|
|||||||
});
|
});
|
||||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||||
},
|
},
|
||||||
jl3dstation(){
|
jl3dstation() {
|
||||||
const routeData = this.$router.resolve({
|
const routeData = this.$router.resolve({
|
||||||
path:'/jlmap3d/jl3dstation',
|
path:'/jlmap3d/jl3dstation',
|
||||||
query:{
|
query:{
|
||||||
mapid:this.mapId,
|
mapid:this.mapId,
|
||||||
project: this.project
|
project: this.project
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||||
},
|
},
|
||||||
devicemodel() {
|
devicemodel() {
|
||||||
if (this.deviceShow == false) {
|
if (this.deviceShow == false) {
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="chat-box-content">
|
<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 v-if="recordSending" class="chat_record_tip">
|
||||||
<div id="record_progress_bar" :style="'width:'+100/60*seconds+'%'" />
|
<div id="record_progress_bar" :style="'width:'+100/60*seconds+'%'" />
|
||||||
<div class="record_icon" />
|
<div class="record_icon" />
|
||||||
@ -62,6 +62,7 @@
|
|||||||
import { getToken } from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
import { creatSubscribe, clearSubscribe, assistant} from '@/utils/stomp';
|
import { creatSubscribe, clearSubscribe, assistant} from '@/utils/stomp';
|
||||||
import ChatSetting from './chatSetting';
|
import ChatSetting from './chatSetting';
|
||||||
|
import ChatContent from './chatContent';
|
||||||
import RecordRTC from 'recordrtc';
|
import RecordRTC from 'recordrtc';
|
||||||
import {getSimulationMembersNew, getSimulationConversationListNew, getSimulationConversationIdNew, uploadAudioFileNew} from '@/api/chat';
|
import {getSimulationMembersNew, getSimulationConversationListNew, getSimulationConversationIdNew, uploadAudioFileNew} from '@/api/chat';
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
@ -69,7 +70,8 @@ import Cookies from 'js-cookie';
|
|||||||
export default {
|
export default {
|
||||||
name: 'ChatBox',
|
name: 'ChatBox',
|
||||||
components:{
|
components:{
|
||||||
ChatSetting
|
ChatSetting,
|
||||||
|
ChatContent
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
group: {
|
group: {
|
||||||
@ -137,7 +139,9 @@ export default {
|
|||||||
that.recorders = new RecordRTC(that.microphone, {
|
that.recorders = new RecordRTC(that.microphone, {
|
||||||
type: 'audio',
|
type: 'audio',
|
||||||
recorderType: StereoAudioRecorder,
|
recorderType: StereoAudioRecorder,
|
||||||
numberOfAudioChannels: 2
|
numberOfAudioChannels: 1,
|
||||||
|
bitsPerSecond:256000,
|
||||||
|
desiredSampRate: 16000
|
||||||
});
|
});
|
||||||
that.recorders.startRecording();
|
that.recorders.startRecording();
|
||||||
that.recordSending = true;
|
that.recordSending = true;
|
||||||
@ -209,7 +213,6 @@ export default {
|
|||||||
fd.append('file', blob);
|
fd.append('file', blob);
|
||||||
uploadAudioFileNew(that.group, that.form.language, that.form.sex, that.currentCoversition.id, fd)
|
uploadAudioFileNew(that.group, that.form.language, that.form.sex, that.currentCoversition.id, fd)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
debugger;
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.log(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) {
|
contextmenu(em) {
|
||||||
var menu = null;
|
var menu = null;
|
||||||
var device = null;
|
var device = null;
|
||||||
|
|
||||||
this.point = { x: em.clientX, y: em.clientY };
|
this.point = { x: em.clientX, y: em.clientY };
|
||||||
const lineCode = this.$store.getters['map/lineCode'];
|
const lineCode = this.$store.getters['map/lineCode'];
|
||||||
if (em.subType === 'TrainWindow') {
|
if (em.subType === 'TrainWindow') {
|
||||||
@ -129,7 +128,10 @@ export default {
|
|||||||
menu = getDeviceMenuByDeviceType('StationControl');
|
menu = getDeviceMenuByDeviceType('StationControl');
|
||||||
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
|
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
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;
|
return;
|
||||||
} else if (em.deviceCode && !this.isScreen) {
|
} else if (em.deviceCode && !this.isScreen) {
|
||||||
device = this.getDeviceByEm(em);
|
device = this.getDeviceByEm(em);
|
||||||
|
@ -60,7 +60,7 @@ export default {
|
|||||||
routingSelected: function (data) {
|
routingSelected: function (data) {
|
||||||
this.routeData = data;
|
this.routeData = data;
|
||||||
if (this.$refs && this.$refs.routeEdit) {
|
if (this.$refs && this.$refs.routeEdit) {
|
||||||
this.$refs.routeEdit.isSave = false;
|
this.$refs.routeEdit.editData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
previewRouteEvent: function () {
|
previewRouteEvent: function () {
|
||||||
|
@ -208,8 +208,6 @@ export default {
|
|||||||
routeData(val, old) {
|
routeData(val, old) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.addModel = val;
|
this.addModel = val;
|
||||||
this.display = true;
|
|
||||||
this.editShow = true;
|
|
||||||
this.runLevelId = '';
|
this.runLevelId = '';
|
||||||
if (val.id) {
|
if (val.id) {
|
||||||
this.runLevelId = val.id;
|
this.runLevelId = val.id;
|
||||||
@ -249,12 +247,16 @@ export default {
|
|||||||
const endStation = this.$store.getters['map/getDeviceByCode'](this.addModel.endStationCode);
|
const endStation = this.$store.getters['map/getDeviceByCode'](this.addModel.endStationCode);
|
||||||
this.addModel.distance = Math.abs(startStation.kmRange - endStation.kmRange);
|
this.addModel.distance = Math.abs(startStation.kmRange - endStation.kmRange);
|
||||||
},
|
},
|
||||||
|
editData() {
|
||||||
|
this.isSave = false;
|
||||||
|
this.editShow = true;
|
||||||
|
this.display = true;
|
||||||
|
},
|
||||||
generateLevel() { // 生成运行等级
|
generateLevel() { // 生成运行等级
|
||||||
this.$refs.form.validate(async (valid) => {
|
this.$refs.form.validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
postGenerateLevel(this.addModel).then(res=>{
|
postGenerateLevel(this.addModel).then(res=>{
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.display = 2;
|
|
||||||
this.addModel.l1 = res.data.l1;
|
this.addModel.l1 = res.data.l1;
|
||||||
this.addModel.l2 = res.data.l2;
|
this.addModel.l2 = res.data.l2;
|
||||||
this.addModel.l3 = res.data.l3;
|
this.addModel.l3 = res.data.l3;
|
||||||
@ -323,8 +325,7 @@ export default {
|
|||||||
clear() {
|
clear() {
|
||||||
if (this.$refs && this.$refs.form && this.mapInfo) {
|
if (this.$refs && this.$refs.form && this.mapInfo) {
|
||||||
this.$refs.form.resetFields();
|
this.$refs.form.resetFields();
|
||||||
this.display = 1;
|
this.display = false;
|
||||||
this.editShow = false;
|
|
||||||
this.addModel = {
|
this.addModel = {
|
||||||
mapId: this.mapInfo.id,
|
mapId: this.mapInfo.id,
|
||||||
code: setUID('RunLevel'),
|
code: setUID('RunLevel'),
|
||||||
@ -341,6 +342,7 @@ export default {
|
|||||||
l5: 0
|
l5: 0
|
||||||
};
|
};
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
this.editShow = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
hover(field) {
|
hover(field) {
|
||||||
|
Loading…
Reference in New Issue
Block a user