Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
7536022d33
@ -310,3 +310,12 @@ export function getSimulationConversationIdNew(params, group) {
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
// 获取、微信仿真聊天接口(新版地图)
|
||||
export function uploadAudioFileNew (group, lang, per, conversationId, file) {
|
||||
return request({
|
||||
url: `/simulation/${group}/wx/chat?conversationId=${conversationId}&lang=${lang}&per=${per}`,
|
||||
method: 'post',
|
||||
data: file
|
||||
});
|
||||
}
|
||||
|
@ -1,45 +1,57 @@
|
||||
export default {
|
||||
bind(el) {
|
||||
const dragDom = el;
|
||||
dragDom.style.cursor = 'move';
|
||||
bind(el) {
|
||||
const dragDom = el;
|
||||
dragDom.style.cursor = 'move';
|
||||
|
||||
/** 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);*/
|
||||
const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
|
||||
/** 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);*/
|
||||
const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
|
||||
|
||||
dragDom.onmousedown = (e) => {
|
||||
/** 鼠标按下,计算当前元素距离可视区的距离*/
|
||||
const disX = e.clientX;
|
||||
const disY = e.clientY;
|
||||
dragDom.onmousedown = (e) => {
|
||||
/** 鼠标按下,计算当前元素距离可视区的距离*/
|
||||
const disX = e.clientX;
|
||||
const disY = e.clientY;
|
||||
|
||||
/** 获取到的值带px 正则匹配替换*/
|
||||
let styL, styT;
|
||||
/** 获取到的值带px 正则匹配替换*/
|
||||
let styL, styT;
|
||||
|
||||
/** 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px*/
|
||||
if (sty.left.includes('%')) {
|
||||
styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100);
|
||||
styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100);
|
||||
} else {
|
||||
styL = +sty.left.replace(/\px/g, '');
|
||||
styT = +sty.top.replace(/\px/g, '');
|
||||
}
|
||||
/** 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px*/
|
||||
if (sty.left.includes('%')) {
|
||||
styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100);
|
||||
styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100);
|
||||
} else {
|
||||
styL = +sty.left.replace(/\px/g, '');
|
||||
styT = +sty.top.replace(/\px/g, '');
|
||||
}
|
||||
|
||||
document.onmousemove = function (e) {
|
||||
/** 通过事件委托,计算移动的距离*/
|
||||
const l = e.clientX - disX;
|
||||
const t = e.clientY - disY;
|
||||
document.onmousemove = function (e) {
|
||||
/** 通过事件委托,计算移动的距离*/
|
||||
const l = e.clientX - disX;
|
||||
const t = e.clientY - disY;
|
||||
|
||||
/** 移动当前元素*/
|
||||
dragDom.style.left = `${l + styL}px`;
|
||||
dragDom.style.top = `${t + styT}px`;
|
||||
/** 移动当前元素*/
|
||||
if (l + styL < 0) {
|
||||
dragDom.style.left = `0px`;
|
||||
} else if (l + styL > document.body.clientWidth - dragDom.clientWidth - 10) {
|
||||
dragDom.style.left = `${document.body.clientWidth - dragDom.clientWidth - 10}px`;
|
||||
} else {
|
||||
dragDom.style.left = `${l + styL}px`;
|
||||
}
|
||||
if (t + styT < 0) {
|
||||
dragDom.style.top = `0px`;
|
||||
} else if (t + styT > document.body.clientHeight - dragDom.clientHeight - 10) {
|
||||
dragDom.style.top = `${document.body.clientHeight - dragDom.clientHeight - 10}px`;
|
||||
} else {
|
||||
dragDom.style.top = `${t + styT}px`;
|
||||
}
|
||||
|
||||
/** 将此时的位置传出去*/
|
||||
// binding.value({ x: e.pageX, y: e.pageY });
|
||||
};
|
||||
/** 将此时的位置传出去*/
|
||||
// binding.value({ x: e.pageX, y: e.pageY });
|
||||
};
|
||||
|
||||
document.onmouseup = function () {
|
||||
document.onmousemove = null;
|
||||
document.onmouseup = null;
|
||||
};
|
||||
};
|
||||
}
|
||||
document.onmouseup = function () {
|
||||
document.onmousemove = null;
|
||||
document.onmouseup = null;
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
|
@ -17,12 +17,13 @@ export default class Train extends Group {
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.z = 40;
|
||||
// this.size = 0;
|
||||
this.section = null;
|
||||
this.isShowShape = true;
|
||||
this.fontSize = style.Train.common.useSelfText ? style.Train.common.nameFontSize || style.Train.common.trainTextFontSize : model.nameFontSize || style.Train.common.nameFontSize || style.Train.common.trainTextFontSize;
|
||||
// this.fontSize = model.nameFontSize || style.Train.common.nameFontSize || style.Train.common.trainTextFontSize;
|
||||
this.newScale = this.fontSize / style.Train.common.trainTextFontSize;
|
||||
this.nameFormat = style.Train.common.useSelfFormat ? style.Train.trainBody.trainNameFormat : model.nameFormat || style.Train.trainBody.trainNameFormat;
|
||||
// this.nameFormat = model.nameFormat || style.Train.trainBody.trainNameFormat;
|
||||
if ( style.Train.trainBody.specialTrainType.length > 0) {
|
||||
style.Train.trainBody.specialTrainType.some((item) =>{
|
||||
if (model.type === item.type) {
|
||||
@ -32,6 +33,7 @@ export default class Train extends Group {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.create();
|
||||
this.setState(model, this);
|
||||
this.initShowStation(model);
|
||||
|
@ -64,7 +64,6 @@
|
||||
</div>
|
||||
<station-control-convert ref="stationControlConvert" />
|
||||
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
|
||||
<view-train-id ref="viewTrainId" />
|
||||
<view-name ref="viewName" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<train-add ref="trainAdd" />
|
||||
@ -86,7 +85,6 @@ import TrainAdd from './menuDialog/trainAdd';
|
||||
import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||
import TrainDelete from './menuDialog/trainDelete';
|
||||
import PasswordBox from './menuDialog/passwordBox';
|
||||
import ViewTrainId from './menuDialog/viewTrainId';
|
||||
import ViewName from './menuDialog/viewName';
|
||||
import ManageUser from './menuDialog/manageUser';
|
||||
import HelpAbout from './menuDialog/helpAbout';
|
||||
@ -100,7 +98,6 @@ export default {
|
||||
NoticeInfo,
|
||||
StationControlConvert,
|
||||
PasswordBox,
|
||||
ViewTrainId,
|
||||
ViewName,
|
||||
TrainAdd,
|
||||
TrainTranstalet,
|
||||
|
@ -1,193 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm view-train-id"
|
||||
title="列车识别号显示设置"
|
||||
:visible.sync="show"
|
||||
width="420px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">计划车显示模式</span>
|
||||
<el-radio-group v-model="planMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="1">表号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="2">表号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">目的地号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="4">目的地号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="5">目的地号+表号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="6">目的地号+表号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
|
||||
<span class="base-label">头码车显示模式</span>
|
||||
<el-radio-group v-model="headMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">目的地号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="8">
|
||||
<el-radio :label="4">目的地号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">字体大小</span>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="fontSize" size="small" min="16" max="99" />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="1">
|
||||
<span style="height:32px; line-height:32px;">(范围:16-99)</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ViewTrainId',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: '',
|
||||
planMode: 5,
|
||||
headMode: 5,
|
||||
fontSize: 16
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setTrainDispaly();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: [this.planMode, this.headMode, this.fontSize].join('::')
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.setTrainDispaly();
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setTrainDispaly() {
|
||||
const updatList = [];
|
||||
const trainList = this.$store.getters['training/viewTrainList']();
|
||||
if (trainList && trainList.length > 0) {
|
||||
const nameFormat = this.trainNameFormatBy(this.planMode);
|
||||
const nameFontSize = this.fontSize;
|
||||
trainList.forEach(elem => {
|
||||
updatList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize }));
|
||||
});
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', updatList);
|
||||
}
|
||||
},
|
||||
trainNameFormatBy(mode) {
|
||||
switch (mode.toString()) {
|
||||
case '1': return 'serviceNumber:tripNumber'; // 表号+车次号
|
||||
case '2': return 'serviceNumber:groupNumber'; // 表号+车组号
|
||||
case '3': return 'targetCode:tripNumber'; // 目的地号+车次号
|
||||
case '4': return 'targetCode:groupNumber'; // 目的地号+车组号
|
||||
case '5': return 'targetCode:serviceNumber:tripNumber'; // 目的地号+表号+车次号
|
||||
case '6': return 'targetCode:serviceNumber:groupNumber'; // 目的地号+表号+车组号
|
||||
}
|
||||
return ''; // 无格式类型
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -13,8 +13,8 @@
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<menu-limit ref="menuLimit" :selected="selected" />
|
||||
<passive-contorl ref="passiveControl" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" @popMenuStationStand="popMenuStationStand" />
|
||||
<pop-station-stand ref="popStationStand" :selected="selected" />
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
@ -35,6 +35,7 @@ import MenuLimit from './menuLimit';
|
||||
// import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from './passiveDialog/control';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import PopStationStand from './popStationStand';
|
||||
// import PassiveTimeout from './passiveDialog/timeout';
|
||||
|
||||
export default {
|
||||
@ -53,7 +54,8 @@ export default {
|
||||
MenuLimit,
|
||||
MenuStationStand,
|
||||
// PassiveAlarm,
|
||||
PassiveContorl
|
||||
PassiveContorl,
|
||||
PopStationStand
|
||||
// PassiveTimeout
|
||||
},
|
||||
props: {
|
||||
@ -86,6 +88,11 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('config/updateMenuBar');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
popMenuStationStand(param) {
|
||||
this.$refs.popStationStand.doShow(param.position, param.type);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -22,31 +22,70 @@
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px;">
|
||||
<el-col :span="8">
|
||||
<div class="left-table-cell"><span @click="clickEvent('platform')">站台停车</span></div>
|
||||
<div class="left-table-cell" style="height: 90px;"><span @click="clickEvent('platform')">站台停车</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="center-table-cell">
|
||||
<span @click="clickEvent('adjustDwell')">站停时间调整</span><br><span>站台屏蔽门信息确认</span><br><span>更新站台计划</span>
|
||||
<div class="center-table-cell" style="height: 90px;">
|
||||
<span @click="clickEvent('adjustDwell')">站停时间调整</span><br><span>站台屏蔽门信息确认</span><br><span @contextmenu="menuEvent('updateStandPlan')">更新站台计划</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="right-table-cell"><span @click="clickEvent('notCommunicating')">站台屏蔽门信息</span></div>
|
||||
<div class="right-table-cell" style="height: 90px;"><span @click="clickEvent('notCommunicating')">站台屏蔽门信息</span></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="left-table-cell"><span @click="clickEvent('stoppingProfile')">停站曲线</span></div>
|
||||
<div class="left-table-cell" style="height: 68px;"><span @click="clickEvent('stoppingProfile')">停站曲线</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="center-table-cell"><span @click="clickEvent('northbound')">上行方向</span><br><span @click="clickEvent('southbound')">下行方向</span></div>
|
||||
<div class="center-table-cell" style="height: 68px;"><span @click="clickEvent('northbound')">上行方向</span><br><span @click="clickEvent('southbound')">下行方向</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="right-table-cell" />
|
||||
<div class="right-table-cell" style="height: 68px;"><span> </span></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div />
|
||||
<div class="left-table-cell"><span @click="clickEvent()">跳停</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="center-table-cell"><span @click="clickEvent()">设置/取消 所有列车跳停本站</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="right-table-cell"><span @click="clickEvent()">所有列车跳停本站</span></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="left-table-cell"><span @click="clickEvent()">ATS站台扣车</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="center-table-cell"><span @click="clickEvent()">设置/取消 所有列车本站扣车</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="right-table-cell"><span @click="clickEvent()">所有列车本站扣车</span></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="left-table-cell"><span @click="clickEvent()">站台</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="center-table-cell"><span @click="clickEvent()">通信</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="right-table-cell"><span @click="clickEvent()">站台没有通信</span></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="left-table-cell" style="height: 68px;"><span @click="clickEvent()">上行方向驾驶模式禁止</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="center-table-cell" style="height: 68px;"><span @click="clickEvent()">禁止/释放 ATPM模式</span><br><span @click="clickEvent()">禁止/释放 AM模式</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="right-table-cell" style="height: 68px;"><span @click="clickEvent()">ATPM模式已禁止</span><br><span @click="clickEvent()">AM模式已禁止</span></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
@ -125,8 +164,15 @@ export default {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
menuEvent(val) {
|
||||
console.log('------------111111111', val, event, this.position);
|
||||
this.$emit('popMenuStationStand', {position:this.position, type:val});
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
},
|
||||
clickEvent(val) {
|
||||
this.dialogShow = false;
|
||||
this.dialogShow = true;
|
||||
console.log('----------------------', val);
|
||||
this.$emit('popMenuStationStand', {position:this.position, type:val});
|
||||
event.stopPropagation();
|
||||
},
|
||||
@ -192,19 +238,25 @@ export default {
|
||||
border: 1px solid #6F3700;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
margin: 0 0 -1px -1px
|
||||
margin: 0 0 -1px -1px;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.center-table-cell {
|
||||
border-bottom: 1px solid #6F3700;
|
||||
border-top: 1px solid #6F3700;
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
margin: 0 0 -1px -1px
|
||||
margin: 0 0 -1px -1px;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.right-table-cell {
|
||||
border: 1px solid #6F3700;
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
margin: 0 0 -1px -1px
|
||||
margin: 0 0 -1px -1px;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
</style>
|
||||
|
255
src/jmapNew/theme/xian_02/menus/popStationStand.vue
Normal file
255
src/jmapNew/theme/xian_02/menus/popStationStand.vue
Normal file
@ -0,0 +1,255 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<!--<platform-dwell ref="platformDwell" />-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
// import PlatformDwell from './dialog/platformDwell';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo
|
||||
// PlatformDwell
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
updateStandPlan: {
|
||||
Local: [],
|
||||
Center: [
|
||||
{
|
||||
label: '更新站台计划',
|
||||
handler: this.setStopTime,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
}
|
||||
]
|
||||
},
|
||||
StoppingProfile: {
|
||||
Local: [],
|
||||
Center: [
|
||||
{
|
||||
label: '站台停站调整', // 设置停站时间
|
||||
handler: this.setStopTime,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
},
|
||||
{
|
||||
label: '站台停站',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '帮助',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
}
|
||||
]
|
||||
},
|
||||
know: {
|
||||
Local: [],
|
||||
Center: [
|
||||
{
|
||||
label: 'Skip Next Station',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: 'Skip Next Station',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: 'Help',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu(type) {
|
||||
// 编辑模式菜单列表
|
||||
switch (type) {
|
||||
case 'stoppingProfile':
|
||||
this.menu = MenuContextHandler.covert(this.StoppingProfile);
|
||||
break;
|
||||
case 'know':
|
||||
this.menu = MenuContextHandler.covert(this.StoppingProfile);
|
||||
break;
|
||||
}
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
},
|
||||
doShow(point, type) {
|
||||
this.menu = [];
|
||||
this.clickEvent();
|
||||
this.initMenu(type);
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.stoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: OperationEvent.StationStand.setJumpStop.menu.operation});
|
||||
// this.$refs.standControl.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.StationStand.cancelJumpStop.menu.operation, name: '取消跳停'}});
|
||||
// this.$refs.standControl.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 停站时间控制
|
||||
setStopTime() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.platformDwell.doShow(step, this.selected);
|
||||
// Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
|
||||
// const tempData = resp.data;
|
||||
// this.$refs.standControl.doShow(step, this.selected, tempData);
|
||||
// });
|
||||
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -55,12 +55,10 @@ export default {
|
||||
importData(Sheet, JsonData) {
|
||||
var dataList = convertSheetToList(Sheet, true);
|
||||
var needList = Object.keys(this.ExcelConfig.columns);
|
||||
|
||||
if (dataList && dataList.length) {
|
||||
for (var colIndex = this.ExcelConfig.beginCol; colIndex < dataList.length; colIndex += this.ExcelConfig.fieldNum + 1) {
|
||||
var isContinue = true;
|
||||
var tripObj = { code: '', trainId: '', arrivalList: [] };
|
||||
|
||||
for (var rowIndex = this.ExcelConfig.beginRow; isContinue; rowIndex += 1) {
|
||||
isContinue = false;
|
||||
|
||||
|
@ -23,7 +23,7 @@ export function creatSubscribe(topic, header) {
|
||||
function callback(Response) {
|
||||
if (store) {
|
||||
var data = JSON.parse(Response.body);
|
||||
// console.log(Response.body);
|
||||
console.log(Response.body);
|
||||
store.dispatch('socket/setStomp', data);
|
||||
} else {
|
||||
callback(Response);
|
||||
|
@ -12,7 +12,7 @@
|
||||
<!-- 加载剧本 -->
|
||||
<el-button v-if="isDemon && !isDesignPlatform && !isScheduling" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
|
||||
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
|
||||
<el-button v-if="!runing && notScript" size="small" :disabled="viewDisabled" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||
<el-button v-if="!runing && notScript" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">{{ $t('display.schema.faultSetting') }}</el-button>
|
||||
</el-button-group>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="chatBox">
|
||||
<div v-quickMenuDrag class="chatBox">
|
||||
<div v-show="!minimize" class="chat-box">
|
||||
<div :class="showMembers?'memberAnimate chat-box-members':'chat-box-members'">
|
||||
<div class="chat-member-title">成员列表</div>
|
||||
@ -14,7 +14,7 @@
|
||||
<div
|
||||
v-for="coversition in coversitionList"
|
||||
:key="coversition.id"
|
||||
:class="coversition.id==currentCoversition?'coversition-active each-coversition':'each-coversition'"
|
||||
:class="coversition.id==currentCoversition.id?'coversition-active each-coversition':'each-coversition'"
|
||||
@click="changeCoversition(coversition)"
|
||||
>{{ coversition.name }}</div>
|
||||
</div>
|
||||
@ -25,7 +25,7 @@
|
||||
<div class="minimality" @click="handleMinimality('min')">
|
||||
<i class="el-icon-remove" />
|
||||
</div>
|
||||
<div class="showMembers" @click="handleMembers()">
|
||||
<div v-show="currentCoversition.group==undefined?true:currentCoversition.group" class="showMembers" @click="handleMembers()">
|
||||
<i class="el-icon-user-solid" />
|
||||
</div>
|
||||
<div class="chat-setting" @click="handleSetting()">
|
||||
@ -33,6 +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" />
|
||||
<div v-if="recordSending" class="chat_record_tip">
|
||||
<div id="record_progress_bar" :style="'width:'+100/60*seconds+'%'" />
|
||||
<div class="record_icon" />
|
||||
@ -62,7 +63,7 @@ import { getToken } from '@/utils/auth';
|
||||
import { creatSubscribe, clearSubscribe, assistant} from '@/utils/stomp';
|
||||
import ChatSetting from './chatSetting';
|
||||
import RecordRTC from 'recordrtc';
|
||||
import {getSimulationMembersNew, getSimulationConversationListNew, getSimulationConversationIdNew} from '@/api/chat';
|
||||
import {getSimulationMembersNew, getSimulationConversationListNew, getSimulationConversationIdNew, uploadAudioFileNew} from '@/api/chat';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
export default {
|
||||
@ -91,7 +92,7 @@ export default {
|
||||
language:'zh',
|
||||
sex:'1'
|
||||
},
|
||||
currentCoversition:'',
|
||||
currentCoversition:{id:'all', name:'所有人', group:true},
|
||||
headerTitle:'所有人'
|
||||
};
|
||||
},
|
||||
@ -108,6 +109,7 @@ export default {
|
||||
getSimulationConversationListNew(this.$route.query.group).then(resp=>{
|
||||
if (resp.data) {
|
||||
this.coversitionList = resp.data;
|
||||
this.coversitionList.unshift({id:'all', name:'所有人', group:true});
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -127,13 +129,15 @@ export default {
|
||||
const that = this;
|
||||
if (!this.recordSending && !this.recorders && !this.microphone) {
|
||||
this.$refs.chatSetting.doClose();
|
||||
const StereoAudioRecorder = RecordRTC.StereoAudioRecorder;
|
||||
navigator.getUserMedia(
|
||||
{ audio: true } // 只启用音频
|
||||
, function (stream) {
|
||||
that.microphone = stream;
|
||||
that.recorders = new RecordRTC(that.microphone, {
|
||||
type: 'audio',
|
||||
checkForInactiveTracks: true
|
||||
recorderType: StereoAudioRecorder,
|
||||
numberOfAudioChannels: 2
|
||||
});
|
||||
that.recorders.startRecording();
|
||||
that.recordSending = true;
|
||||
@ -203,6 +207,13 @@ export default {
|
||||
const blob = that.recorders.getBlob();
|
||||
const fd = new FormData();
|
||||
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);
|
||||
});
|
||||
// 调用接口(待添加)
|
||||
if (that.microphone) {
|
||||
that.microphone.stop();
|
||||
@ -259,18 +270,18 @@ export default {
|
||||
const data = resp.data;
|
||||
const index = this.coversitionList.findIndex(item=>{ return item.id == data.id; });
|
||||
if (index < 0) {
|
||||
this.coversitionList.push({id:data.id, name:data.name});
|
||||
this.coversitionList.push(data);
|
||||
}
|
||||
this.currentCoversition = data.id;
|
||||
this.currentCoversition = {id:data.id, group:data.group};
|
||||
this.headerTitle = data.name;
|
||||
|
||||
this.showMembers = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
changeCoversition(coversition) {
|
||||
this.currentCoversition = coversition.id;
|
||||
this.headerTitle = coversition.name;
|
||||
this.currentCoversition = {id:coversition.id, group:coversition.group};
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -283,6 +294,7 @@ export default {
|
||||
padding-left:5px;
|
||||
left: 0;
|
||||
bottom:28px;
|
||||
z-index:22;
|
||||
}
|
||||
.chat-box{
|
||||
width: 100%;
|
||||
|
@ -75,7 +75,7 @@ export default {
|
||||
width: 54%;
|
||||
height: 143px;
|
||||
border: 1px #dedede solid;
|
||||
left: 23%;
|
||||
left: 33%;
|
||||
top: 24%;
|
||||
z-index: 7;
|
||||
border-radius: 4px;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <chat-box /> -->
|
||||
<chat-box :group="group" />
|
||||
<!-- <div v-show="!minimize" class="reminder-drag">
|
||||
<div v-if="userRole != '05' && userRole != ''">
|
||||
<div class="tabs-roles">
|
||||
@ -79,7 +79,7 @@
|
||||
import QrCode from '@/components/QrCode';
|
||||
// import ChartWindow from './chatWindow';
|
||||
// import ChartView from './chartView';
|
||||
// import ChatBox from './chatBox';
|
||||
import ChatBox from './chatBox';
|
||||
import SetTime from '@/views/newMap/displayNew/demon/setTime';
|
||||
import { ranAsPlan, exitRunPlan } from '@/api/simulation';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
@ -93,7 +93,7 @@ export default {
|
||||
components: {
|
||||
// ChartView,
|
||||
// ChartWindow,
|
||||
// ChatBox,
|
||||
ChatBox,
|
||||
QrCode,
|
||||
SetTime,
|
||||
RealDevice
|
||||
|
@ -18,7 +18,7 @@
|
||||
<el-button v-if="runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
|
||||
</template>
|
||||
<template v-if="userRole == 'ADMIN'">
|
||||
<el-button v-if="!runing" size="small" type="warning" :disabled="viewDisabled" @click="loadRunPlan">
|
||||
<el-button v-if="!runing" size="small" type="warning" @click="loadRunPlan">
|
||||
{{ $t('joinTraining.runGraphLoading') }}</el-button>
|
||||
</template>
|
||||
<template v-if="userRole == 'INSTRUCTOR' || userRole == 'ADMIN'">
|
||||
|
@ -239,7 +239,7 @@ export default {
|
||||
this.$store.dispatch('map/mapClear').then(() => {
|
||||
_that.$emit('editMap', null);
|
||||
// _that.$router.push({ path: `${UrlConfig.map.draft}/0/draft` });
|
||||
_that.$router.push({ path: `${UrlConfig.designUser.prefix}` });
|
||||
_that.$router.push({ path: `${UrlConfig.newDesignuser.prefix}` });
|
||||
});
|
||||
}
|
||||
_that.refresh();
|
||||
|
@ -18,6 +18,7 @@ import SetProject from './project';
|
||||
import CopyMap from './copy';
|
||||
import LocalMap from './localMap';
|
||||
import { superAdmin } from '@/router/index_APP_TARGET';
|
||||
import { ProjectList } from '@/scripts/ProjectConfig';
|
||||
|
||||
export default {
|
||||
name: 'PublishMap',
|
||||
@ -76,6 +77,13 @@ export default {
|
||||
columnValue: (row) => { return this.$convertField(row.lineCode, this.lineCodeList, ['code', 'name']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '归属项目',
|
||||
prop: 'projectCode',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return row.project ? this.$convertField(row.projectCode.toLowerCase(), ProjectList, ['value', 'label']) : '无'; },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
|
@ -60,6 +60,8 @@ export default {
|
||||
this.formModel.id = row.id;
|
||||
this.formModel.name = row.name;
|
||||
this.formModel.cityCode = row.cityCode;
|
||||
this.formModel.project = row.project;
|
||||
this.formModel.projectCode = row.project ? row.projectCode : '';
|
||||
this.options = [];
|
||||
ProjectList.forEach(item => {
|
||||
this.options.push({label: item.label, value: item.value.toUpperCase()});
|
||||
|
@ -61,7 +61,9 @@ export default {
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
required: true
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
Loading…
Reference in New Issue
Block a user