This commit is contained in:
lVAL 2020-09-30 17:18:15 +08:00
commit 3e623fe0a2
10 changed files with 325 additions and 36 deletions

View File

@ -37,7 +37,7 @@ function getRouteInfo(to) {
if (whiteList.includes(toRoutePath)) { // 登陆页面清空 token
removeToken();
}
loginPath = loginInfo[current_session] ? loginInfo[current_session].loginPath : whiteList[0];
loginPath = loginInfo[current_session] ? loginInfo[current_session].loginPath : (to.path.includes('design') ? whiteList[1] : whiteList[0] );
if (to.query.projectDevice && to.query.type) {
loginPath = `${loginPath}&projectDevice=${to.query.projectDevice}&type=${to.query.type}`;
}

View File

@ -197,11 +197,6 @@ export const constantRoutes = [
hidden: true
},
// 设计平台登录
{
path: '/design',
redirect: '/design/login',
hidden: true
},
{
path: '/design/login',
component: Login,

View File

@ -111,12 +111,15 @@
<div style="margin-top:15px;">
<el-button v-if="!isModify" type="primary" @click="doModifyDes">编辑步骤描述</el-button>
<el-button v-if="isModify" type="success" @click="cancleModifyDes">取消编辑步骤描述</el-button>
<el-button v-if="idOperateStatistic" type="success" @click="doOperateStatistic">编辑运营统计</el-button>
</div>
<step-description
ref="addStepDescription"
@cancleDescription="cancleDescription"
@submitDescription="submitDescription"
/>
<operate-statistic ref="operateStatistic" @submitOperateStatistic="submitOperateStatistic" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doUpdate">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
@ -129,13 +132,15 @@ import ConstConfig from '@/scripts/ConstConfig';
import Cookies from 'js-cookie';
import {getScriptByIdNew} from '@/api/script';
import StepDescription from './stepDescription';
import OperateStatistic from './operateStatistic';
import {covertOperate} from '@/views/newMap/displayNew/scriptDisplay/component/covertOperation';
import {updateCompetitionPracticalStep, getCompetitionPracticalSceneById} from '@/api/competition';
import {getPublishMapDetailById} from '@/api/jmap/map';
export default {
name:'ModifyStep',
components:{
StepDescription
StepDescription,
OperateStatistic
},
props: {
title:{
@ -167,11 +172,15 @@ export default {
scriptId:'',
commandEvaluationRuleVOs:[],
stepVOs:[],
operationStatisticVOs:[]
operationStatisticVO:{}
}
};
},
computed: {
idOperateStatistic() {
return Object.values(this.stepVOs).length > 2;
}
},
methods:{
doShow(row) {
//
@ -186,18 +195,25 @@ export default {
this.actionList = res.data.actionList;
getCompetitionPracticalSceneById(row.id).then(response=>{
const commandEvaluationRuleVOs = {};
response.data.commandEvaluationRuleVOs.forEach(data=>{
commandEvaluationRuleVOs[data.actionId] = data;
});
if (response.data.commandEvaluationRuleVOs) {
response.data.commandEvaluationRuleVOs.forEach(data=>{
commandEvaluationRuleVOs[data.actionId] = data;
});
}
const stepVOs = {};
response.data.stepVOs.forEach(data=>{
stepVOs[data.startActionId] = data;
const dataIndex = this.actionList.findIndex((value, index, arr)=>{ return value.id == data.startActionId; });
const dataIndex1 = this.actionList.findIndex((value, index, arr)=>{ return value.id == data.endActionId; });
this.startArray.push(dataIndex);
this.endArray.push(dataIndex1);
});
if (response.data.stepVOs) {
response.data.stepVOs.forEach(data=>{
stepVOs[data.startActionId] = data;
const dataIndex = this.actionList.findIndex((value, index, arr)=>{ return value.id == data.startActionId; });
const dataIndex1 = this.actionList.findIndex((value, index, arr)=>{ return value.id == data.endActionId; });
this.startArray.push(dataIndex);
this.endArray.push(dataIndex1);
});
}
this.commandEvaluationRuleVOs = commandEvaluationRuleVOs;
if (response.data.operationStatisticVO) {
this.formModel.operationStatisticVO = response.data.operationStatisticVO;
}
this.stepVOs = stepVOs;
});
//
@ -375,7 +391,7 @@ export default {
this.$refs['saveDeductScoreInput' + actionId].$refs.input.focus();
});
},
doUpdate() {
doUpdate(operationStatisticVO = null) {
let commandEvaluationRuleVOs = Object.values(this.commandEvaluationRuleVOs);
const stepVOs = Object.values(this.stepVOs);
commandEvaluationRuleVOs = commandEvaluationRuleVOs.filter(eachData=>{
@ -384,7 +400,7 @@ export default {
if (stepVOs.length > 0) {
stepVOs.sort(this.objectSort('startActionId'));
stepVOs.map((step, index)=>{
step.id = index;
step.id = (index + 1);
});
}
if (commandEvaluationRuleVOs.length > 0) {
@ -396,6 +412,9 @@ export default {
delete data.deductScoreVisible;
});
}
if (operationStatisticVO) {
this.formModel.operationStatisticVO = operationStatisticVO;
}
this.formModel.commandEvaluationRuleVOs = commandEvaluationRuleVOs;
this.formModel.stepVOs = stepVOs;
updateCompetitionPracticalStep(this.formModel).then(res=>{
@ -453,6 +472,9 @@ export default {
this.$set(this.stepVOs, this.currentstepAction[0].actionId, {description:stepDescription, startActionId:parseInt(this.currentstepAction[0].actionId), endActionId:parseInt(this.currentstepAction[1].actionId)});
this.cancleDescription();
},
submitOperateStatistic(formModel) {
this.doUpdate(formModel);
},
objectSort(keyName) {
return function (objectN, objectM) {
var valueN = objectN[keyName];
@ -482,6 +504,9 @@ export default {
};
}
}
},
doOperateStatistic() {
this.$refs.operateStatistic.doShow(this.stepVOs, this.formModel.operationStatisticVO);
}
}

View File

@ -0,0 +1,162 @@
<template>
<div v-if="dialogShow" class="OperateStatistic">
<div class="OperateStatisticIn">
<div class="OperateStatisticInName">编辑运营统计</div>
<div class="OperateStatisticContent">
<el-form ref="form" :rules="rules" :model="formModel" label-width="140px" class="statisticForm">
<el-form-item label="每一项分值" :required="true" prop="score">
<el-input-number
v-model="formModel.score"
:style="{width: '130px'}"
:min="0"
size="medium"
:max="100"
:step="1"
/>
</el-form-item>
<el-form-item label="运营统计项列表" :required="true" prop="itemVOS">
<el-button type="primary" size="small" style="margin-bottom:10px" @click="addItemVO">添加</el-button>
<el-table :data="formModel.itemVOS" border style="width:351px;" height="200">
<el-table-column prop="description" label="简介" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.description" type="text" :style="{width: '125px'}" size="small" :maxlength="100" />
</template>
</el-table-column>
<el-table-column prop="stepId" label="关联步骤" width="150">
<template slot-scope="scope">
<el-select v-model="scope.row.stepId" :style="{width: '125px'}" size="small">
<el-option
v-for="option in stepVOs"
:key="option.id"
:label="option.description"
:value="option.id"
/>
</el-select>
</template>
</el-table-column>
<el-table-column label="操作" width="50">
<template slot-scope="scope">
<span class="el-icon-error deleteScene" @click="handleDelete(scope.$index)" />
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-form>
</div>
<div class="OperateStatistic-footer">
<el-button @click="roleDoClose">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" @click="confirm">{{ $t('global.confirm') }}</el-button>
</div>
</div>
</div>
</template>
<script>
export default {
name:'OperateStatistic',
data() {
return {
dialogShow:false,
stepVOs:[],
formModel:{
score:0,
itemVOS:[]
// private String description;
// private Long stepId;
}
};
},
computed:{
rules() {
const crules = {
score: [
{ required: true, message: '请输入每一项分值', trigger: 'blur' },
{ required: true, message: '请输入每一项分值', trigger: 'change' }
]};
return crules;
// itemVOS
}
},
methods:{
roleDoClose() {
this.dialogShow = false;
},
confirm() {
const self = this;
this.$refs.dataform.validateForm(() => {
const itemVOS = self.formModel.itemVOS;
if (itemVOS.length > 0) {
let result = true;
itemVOS.forEach(item=>{
if (item.description && item.stepId) {
result = result && true;
} else {
result = result && false;
}
});
if (!result) {
this.$messageBox('请填写运营统计项列表');
}
}
this.dialogShow = false;
this.$emit('submitOperateStatistic', this.formModel);
});
},
doShow(stepVOs, operationStatisticVO) {
if (JSON.stringify(operationStatisticVO) != '{}') {
this.formModel = operationStatisticVO;
}
this.stepVOs = Object.values(stepVOs);
this.stepDescription = '';
this.dialogShow = true;
},
addItemVO() {
this.formModel.itemVOS.push({'description':'', stepId:''});
},
handleDelete(index) {
this.formModel.itemVOS.splice(index, 1);
}
}
};
</script>
<style lang="scss">
.OperateStatistic{
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: rgba(0,0,0,0.7);
z-index: 2;
}
.OperateStatisticIn{
width: 600px;
background: #fff;
left: 50%;
position: absolute;
transform: translate(-50%,-50%);
top: 40%;
height: 450px;
border-radius:4px;
}
.OperateStatistic-footer{
text-align: center;
}
.OperateStatisticInName{
font-size: 17px;
margin-top: 16px;
text-align: center;
}
.OperateStatisticContent{
padding: 20px 0px 0px 0px;
}
.statisticForm{
display: table;
margin-left: auto;
margin-right: auto;
}
.deleteScene{
font-size: 24px;
color: #f00;
cursor: pointer;
}
</style>

View File

@ -73,6 +73,7 @@ export default {
transform: translate(-50%,-50%);
top: 40%;
height: 240px;
border-radius:4px;
}
.StepDescription-footer{
text-align: center;

View File

@ -1,13 +1,16 @@
<template>
<div style="height: 100%; width: 100%;overflow-y: auto;">
<psd-system v-if="mode=='psdSystem'" />
<substation v-else-if="mode=='substation'" />
</div>
</template>
<script>
import PsdSystem from './psdSystem/index.vue';
import Substation from './powerMonitor/substation.vue';
export default {
components:{
PsdSystem
PsdSystem,
Substation
},
data() {
return {

View File

@ -0,0 +1,57 @@
<template>
<div class="Substation">
<div class="Substation_header">{{ stationName+' 屏蔽门系统' }}</div>
<div>
<iscsSystem ref="iscsPlate" :width-canvas="width" :canvas-height="height" />
</div>
<!-- <div class="psdSystem_footer">
<div class="prevButton">{{}}</div>
<div class="nextButton">{{}}</div>
</div> -->
</div>
</template>
<script>
import iscsSystem from '../canvas/iscsCanvas';
import {getIscsData} from '@/api/iscs';
export default {
name:'Substation',
components:{
iscsSystem
},
computed:{
stationName() {
return this.$route.query.stationName;
},
width() {
return window.innerWidth;
},
height() {
return 800;
}
},
mounted() {
const params = {
lineCode: this.$route.query.lineCode,
totalSystem: 'powerMonitoring02',
system: 'powerMonitoring',
userInterface: 'substation'
};
getIscsData(params).then(resp=>{
if (resp.data) {
const data = JSON.parse(resp.data.graphData);
this.$refs.iscsPlate.show(data);
}
});
}
};
</script>
<style lang="scss" scoped>
.Substation_header{
text-align: center;
margin-top: 15px;
color: #d8e9a5;
}
.Substation{
}
</style>

View File

@ -53,10 +53,24 @@ export default {
stationList:[],
group:'',
lineCode:'',
buttonId:'electric',
buttonId:'substation',
buttonList:{
stationDescription:{name:'车站概要', type:'totalSystem', id: 'stationDescription', active:false, icon:iscs_icon1 },
electric: {name:'电力监控系统', type:'totalSystem', id: 'electric', active:false, icon:iscs_icon2 },
electric: {name:'电力监控系统', type:'totalSystem', id: 'powerMonitoring', active:false, icon:iscs_icon2,
children:[
{
name: '牵引降压所主接线图',
mode: 'substation',
id: 'substation',
type: 'interface'
},
{
name: '能耗检测管理系统',
mode: 'energyDetected',
id: 'energyDetected',
type: 'interface'
}
] },
environment:{name:'环境与设备监控系统', type:'totalSystem', id: 'environment', active:false, icon:iscs_icon3 },
ffas: {name:'火灾报警系统', type:'totalSystem', id: 'ffas', mode: 'ffas', active:false, icon:iscs_icon4,
children:[
@ -385,6 +399,7 @@ export default {
bottom: 0;
left: 0;
padding-left: 5px;
z-index:3;
}
.bottom-box-in{
display: inline-block;

View File

@ -42,17 +42,20 @@
</div> -->
</div>
<div class="chat-box-content">
<div v-for="(item, index) in treeData" :key="index" class="proper_box">
<div class="proper_title">{{ item.label }}</div>
<div v-for="(data, i) in item.children" :key="i" style="position: relative; width: 73px; heigth: 73px; margin-left: 5px; float: left;">
<div v-if="data.show && item.id == 'driver'" class="proper_content_box" :class="{'active': data.active}" @click="handleCheckChange(data)">{{ data.label + (data.userId? '(' + (simulationUsers[data.userId]||{}).nickName + ')': '') }}</div>
<div v-if="item.id != 'driver'" class="proper_content_box" :class="{'active':data.active}" @click="handleCheckChange(data)">{{ data.label + (data.userId? '(' + (simulationUsers[data.userId]||{}).nickName + ')': '') }}</div>
<div v-if="data.loading" class="mask_loading">
<i class="el-icon-loading" style="margin-bottom: 4px;" />
<span>呼叫中</span>
<div style="position:relative">
<div v-for="(item, index) in treeData" :key="index" class="proper_box">
<div class="proper_title">{{ item.label }}</div>
<div v-for="(data, i) in item.children" :key="i" style="position: relative; width: 73px; heigth: 73px; margin-left: 5px; float: left;">
<div v-if="data.show && item.id == 'driver'" class="proper_content_box" :class="{'active': data.active}" @click="handleCheckChange(data)">{{ data.label + (data.userId? '(' + (simulationUsers[data.userId]||{}).nickName + ')': '') }}</div>
<div v-if="item.id != 'driver'" class="proper_content_box" :class="{'active':data.active}" @click="handleCheckChange(data)">{{ data.label + (data.userId? '(' + (simulationUsers[data.userId]||{}).nickName + ')': '') }}</div>
<div v-if="data.loading" class="mask_loading">
<i class="el-icon-loading" style="margin-bottom: 4px;" />
<span>呼叫中</span>
</div>
<div v-if="data.isConnect||data.disabled" class="content_connect" />
</div>
<div v-if="data.isConnect||data.disabled" class="content_connect" />
</div>
<div v-if="connectSuccess" class="connectSuccess" />
</div>
</div>
<div class="chat-box-content1">
@ -168,6 +171,7 @@ export default {
commonConversation: false,
seconds:0,
inter:null,
connectSuccess:false,
recorders: null,
microphone:null,
createLoading:false,
@ -283,6 +287,20 @@ export default {
});
}
this.filterNode();
if (activeTrainList.length <= 0) {
this.resetCoversition();
this.treeData.forEach(item => {
if (item.children) {
const memberList = Object.values(item.children);
memberList.forEach(data =>{
data.active = false;
data.isConnect = false;
data.loading = false;
data.disabled = false;
});
}
});
}
// if (this.$refs.tree) {
// this.$refs.tree.filter(this.queryMember);
// }
@ -455,6 +473,7 @@ export default {
}
},
acceptUser(memberId) {
this.connectSuccess = true;
this.treeData.forEach(data => {
if (data.children) {
const member = data.children[memberId];
@ -509,6 +528,7 @@ export default {
}
}
startConversition(this.group, this.memberIdList, this.memberObject).then(resp => {
this.connectSuccess = true;
if (this.memberObject == 'ALL_STATION') {
const stationList = this.treeData[1].children;
const member = stationList['ALL_STATION'];
@ -748,6 +768,7 @@ export default {
quitConversition() {
this.quitLoading = true;
overSimulationConversition(this.group, this.conversitionId).then(resp => {
this.connectSuccess = false;
this.conversitionMemberList = [];
this.messageList = [];
this.quitLoading = false;
@ -887,6 +908,7 @@ export default {
resetCoversition() {
this.commonMessageList = [];
this.conversitionStateMap = {};
this.messageList = this.commonMessageList;
}
}
};
@ -1141,5 +1163,13 @@ export default {
.chat-box-footer-send.disbled{
cursor: no-drop;
}
.connectSuccess{
position:absolute;
width:100%;
height:100%;
left:0;
top:0;
z-index:2;
}
</style>

View File

@ -80,9 +80,9 @@ export default {
height: 800,
roadData: [],
focus: false,
booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'guideNeedRouteSettingFirst'],
booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking'],
selectList: ['runMode'],
generalConfig: ['lockFirst', 'switchSingleHandle', 'upRight', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'runMode', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'noParkingSM', 'parkingSM', 'rmAtpSpeed', 'urmAtpSpeed', 'guideNeedRouteSettingFirst'],
generalConfig: ['lockFirst', 'switchSingleHandle', 'upRight', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'runMode', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'noParkingSM', 'parkingSM', 'rmAtpSpeed', 'urmAtpSpeed', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking'],
rangeList: ['noParkingSM', 'parkingSM'],
speedList: ['rmAtpSpeed', 'urmAtpSpeed'],
numberList: [],
@ -104,7 +104,8 @@ export default {
switchLossChain: '道岔故障失表是否联动',
rmAtpSpeed: 'RM模式下ATP防护速度',
urmAtpSpeed: 'URM下ATP防护速度',
guideNeedRouteSettingFirst: '引导办理是否需要先排列进路'
guideNeedRouteSettingFirst: '引导办理是否需要先排列进路',
signalOpenAfterParking: '是否列车停站开门后,才办理出站进路开放出站信号机'
}
};
},