This commit is contained in:
zyy 2020-07-16 13:36:14 +08:00
commit af1115edff
36 changed files with 347 additions and 157 deletions

View File

@ -68,6 +68,22 @@ export function setSwitchConfig(id, data) {
data: data
});
}
/** 添加/修改端头控制盒网关映射配置 */
export function setPslConfig(id, data) {
return request({
url: `/api/device/${id}/config/psl`,
method: 'put',
data: data
});
}
/** 添加/修改ibp盘网关映射配置 */
export function setIbpConfig(id, data) {
return request({
url: `/api/device/${id}/config/ibp`,
method: 'put',
data: data
});
}
/** 查询项目下的所有设备 */
export function getAllDeviceInProject(params) {
return request({

View File

@ -1,5 +1,5 @@
<template>
<el-form ref="form" :rules="rules" :model="formModel" :label-width="form.labelWidth">
<el-form ref="form" :rules="rules" :model="formModel" :inline="inline" :label-width="form.labelWidth">
<template v-for="item in form.items">
<template v-if="checkFieldType(item, 'text')">
<el-form-item :key="item.prop" :prop="item.prop" :label="item.label" :required="item.required">
@ -346,6 +346,12 @@ export default {
default() {
return {};
}
},
inline: {
type: Boolean,
default() {
return false;
}
}
},
data() {

View File

@ -13,9 +13,7 @@ import { getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
import StompClient from '@/utils/sock';
import { getToken } from '@/utils/auth';
import { logout } from '@/api/login';
import store from '@/store/index_APP_TARGET';
var clock = new THREE.Clock();
export function Jl3ddeviceNew(dom,group,token,skinCode) {
@ -129,12 +127,8 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
}
if(data.type == 'Simulation_Over'){
logout(getToken()).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.reload();
});
}).catch(error => {
store.dispatch('LogOut').then(() => {
location.reload();
});
}

View File

@ -1,7 +1,7 @@
import StompClient from '@/utils/sock';
import { getBaseUrl } from '@/utils/baseUrl'
import { getToken } from '@/utils/auth';
import { logout } from '@/api/login';
import store from '@/store/index_APP_TARGET';
// 定于仿真socket接口
export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegroup) {
@ -122,13 +122,9 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr
}
}
}
if(data.type == 'Simulation_Over'){
logout(getToken()).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.reload();
});
}).catch(error => {
if(data.type == 'Simulation_Over') {
store.dispatch('LogOut').then(() => {
location.reload();
});
}
}

View File

@ -230,7 +230,8 @@ export default {
{label: '中心综合监控', value: 'ISCS_CW'},
{label: '车辆段终端', value: 'DEPOT'},
{label: '虚拟CCTV', value: 'CCTV'},
{label: 'PLC网关', value: 'PLC_GATEWAY'}
{label: 'PLC网关', value: 'PLC_GATEWAY'},
{label: '端头控制盒', value: 'PSL'}
]
}
};

View File

@ -161,11 +161,13 @@ const user = {
commit('CLEAR_AUTO_PARAMS');
const token = getToken();
return new Promise((resolve, reject) => {
dispatch('FedLogOut').then(resp => {
logout(token).then(() => {
resolve();
}).catch(error => {
reject(error);
dispatch('disconnect').then(()=>{
dispatch('FedLogOut').then(resp => {
logout(token).then(() => {
resolve();
}).catch(error => {
reject(error);
});
});
});
});

View File

@ -43,6 +43,7 @@
import Vue from 'vue';
import localStore from 'storejs';
import axios from 'axios';
import store from '@/store/index_APP_TARGET';
import { mapGetters } from 'vuex';
@ -60,8 +61,6 @@ import DriveMmi from '@/views/jlmap3d/drive/sceneview/mmiview';
import DriveTms from '@/views/jlmap3d/drive/sceneview/tmsview';
import DriveControl from '@/views/jlmap3d/drive/drivecontrol/drivecontrol';
import { getToken } from '@/utils/auth';
import { logout } from '@/api/login';
var train;
export default {
name: 'Jl3dDrive',
@ -246,12 +245,8 @@ export default {
back() {
if(this.$route.query.type == "DRIVE"){
logout(getToken()).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.reload();
});
}).catch(error => {
store.dispatch('LogOut').then(() => {
location.reload();
});
}else{
this.$emit('showdriving');

View File

@ -37,6 +37,7 @@
</div>
<div class="chat-box-footer">
<div style="width: 400px;font-size: 14px;">{{ userString }}</div>
<!--<el-button size="mini" type="primary" class="chat-box-footer-create">公共会话</el-button>-->
<el-button size="mini" type="primary" class="chat-box-footer-create" :loading="createLoading" @click="createCoversition()">创建群聊</el-button>
</div>
</div>
@ -73,6 +74,9 @@
<div class="chat-box-footer">
<div class="chat-box-footer-tool" />
<el-button v-if="isConversitionCreator && isButtonShow" size="mini" type="danger" class="chat-box-footer-quit" :loading="quitLoading" @click="quitConversition()">退出群聊</el-button>
<!--<el-button class="chat-box-footer-send" size="mini" type="primary">公共会话</el-button>-->
<!--<el-button class="chat-box-footer-send" size="mini" type="primary">成员列表</el-button>-->
<!--<el-button class="chat-box-footer-send" size="mini" type="primary">私有会话</el-button>-->
<el-button v-if="isButtonShow" class="chat-box-footer-send" size="mini" type="primary" :disabled="recordSending" @click="startRecording()">发送语音</el-button>
</div>
</div>

View File

@ -1,7 +1,7 @@
<template>
<el-tabs v-model="activeName" class="card" @tab-click="handleClick">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules">
<div v-if="editModel.type == 'StationTurnBack'" class="card-box">
@ -58,7 +58,7 @@
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" />
</el-scrollbar>

View File

@ -1,7 +1,7 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="form" :form="dataForm" :form-model="editModel" :rules="rules" />
</el-scrollbar>
@ -14,7 +14,7 @@
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-data ref="make" :form="makeForm" :form-model="addModel" :rules="createRules" />
</el-scrollbar>

View File

@ -1,25 +1,29 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
</div>
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-data ref="createForm" :form="createForm" :form-model="addModel" :rules="makeRules" />
</el-scrollbar>
</div>
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</template>

View File

@ -1,7 +1,7 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" label="表示状态" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="editRules" />
</el-scrollbar>
@ -14,7 +14,7 @@
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" />
<div style="color: #99a9bf;font-size: 12px;text-align: center;">

View File

@ -1,7 +1,7 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
@ -14,7 +14,7 @@
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="make" label-width="120px" :model="addModel" :rules="createRules" size="mini">
<el-form-item :label="$t('map.stationName')" prop="stationCode">

View File

@ -1,7 +1,7 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="form" :form="form" :form-model="editModel" :rules="editRules" />
</el-scrollbar>
@ -14,7 +14,7 @@
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="make" label-width="120px" :rules="createRules" :model="addModel" size="mini">
<el-form-item :label="$t('map.stationName')" prop="stationCode">

View File

@ -1,7 +1,7 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
@ -14,7 +14,7 @@
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-button type="primary" style="margin: 0 auto;display: block;" @click="create">批量创建</el-button>
</el-scrollbar>

View File

@ -263,13 +263,19 @@ export default {
/deep/ .button_box{
width: 100%;
background: #ffffff;
overflow: hidden;
border-top: 1px #f3f1f1 solid;
box-shadow: 4px 7px 10px #565656;
border-radius: 0;
border-bottom: 1px transparent solid;
position:absolute;
bottom:0;
}
/deep/ .view-control-content{
height:100%;
padding-bottom:46px;
}
/deep/ .map-draft-group {
float: right;
margin: 6px 5px;

View File

@ -1,7 +1,7 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
@ -14,7 +14,7 @@
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="make" label-width="150px" :rules="createRules" :model="addModel" size="mini">
<el-form-item :label="$t('map.statusSignalName')" prop="name">

View File

@ -1,18 +1,20 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
</div>
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="make" label-width="120px" :model="addModel" size="mini" :rules="makeRules">
<el-form-item :label="$t('map.lineType')" prop="type">
@ -79,9 +81,11 @@
</el-form>
</el-scrollbar>
</div>
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</template>

View File

@ -1,18 +1,20 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
</div>
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="make" :form="makeForm" :form-model="addModel" :rules="rules" />
<!-- <el-form ref="make" label-width="120px" :model="addModel" size="mini" :rules="makeRules">
@ -72,9 +74,11 @@
</el-form> -->
</el-scrollbar>
</div>
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</template>

View File

@ -1,18 +1,20 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
</div>
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="make" label-width="120px" :model="addModel" size="mini" :rules="makeRules">
<el-form-item :label="$t('map.lineWidth')" prop="width">
@ -66,9 +68,11 @@
</el-form>
</el-scrollbar>
</div>
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</template>

View File

@ -1,7 +1,7 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
@ -14,7 +14,7 @@
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="make" label-width="140px" :model="addModel" :rules="createRules" size="mini">
<el-form-item label="关联站台:" prop="standCode">

View File

@ -1,6 +1,6 @@
<template>
<div style="height: 100%">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar>
<el-form ref="oprt" :model="createModel" label-width="130px" size="mini" :rules="createRules" style="position: relative;">
<el-form-item :label="$t('map.createModel')">

View File

@ -1,7 +1,7 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>

View File

@ -1,7 +1,7 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
@ -28,6 +28,13 @@
<el-button type="primary" style="margin-right: 10px;" size="small" @click="editAll">设置</el-button>
<el-button type="" style="margin: 0;" size="small" @click="questionList = []">{{ $t('map.clearHint') }}</el-button>
</div>
<div class="questionTip">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-card v-if="questionList.length" class="box-card">
<div v-for="(item, index) in questionList" :key="index" class="text item">{{ item }}</div>
</el-card>
</el-scrollbar>
</div>
</el-collapse-item>
<el-collapse-item title="设置信号机类型" name="2">
<el-form ref="signalType" label-width="130px" :model="typeModel" size="mini" style="margin-top: 40px">
@ -47,7 +54,7 @@
</div>
</el-collapse-item>
<el-collapse-item title="设置信号机归属联锁站" name="3">
<el-form ref="signalCiStation" label-width="130px" :model="ciModel" size="mini" style="margin-top: 40px;">
<el-form ref="signalCiStation" label-width="130px" :model="ciModel" size="mini">
<el-form-item label="信号机范围:">
<el-select v-model="ciModel.stationList" multiple placeholder="请选择">
<el-option v-for="item in centralizedStationList" :key="item.code" :label="item.name+'下信号机'" :value="item.code" />
@ -64,7 +71,7 @@
</div>
</el-collapse-item>
<el-collapse-item title="设置引导信号" name="4">
<el-form ref="setGuideSignal" label-width="130px" :model="guideModel" size="mini" style="margin-top: 40px;">
<el-form ref="setGuideSignal" label-width="130px" :model="guideModel" size="mini">
<el-form-item label="设置信号机范围:" prop="scope">
<el-select v-model="guideModel.scope" placeholder="请选择">
<el-option v-for="item in signalScopeList" :key="item.code" :label="item.name" :value="item.code" />
@ -111,13 +118,6 @@
</div>
</el-collapse-item>
</el-collapse>
<div style="height: calc(100% - 90px);">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-card v-if="questionList.length" class="box-card">
<div v-for="(item, index) in questionList" :key="index" class="text item">{{ item }}</div>
</el-card>
</el-scrollbar>
</div>
</el-tab-pane>
</el-tabs>
</template>
@ -540,6 +540,13 @@ export default {
display: flex;
justify-content: center;
}
.questionTip{
height: 90px;
margin-top: 10px;
border-radius: 4px;
width: 98%;
padding: 10px;
}
.box-card {
width: calc(100% - 80px);

View File

@ -1,5 +1,5 @@
<template>
<div style="height: calc(100% - 50px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-table :data="tableData" style="width: 80%; margin: 0 auto;">
<el-table-column label="区段名称">

View File

@ -1,7 +1,7 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="createRules" />
</el-scrollbar>
@ -14,7 +14,7 @@
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" />
</el-scrollbar>

View File

@ -1,7 +1,7 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
@ -14,7 +14,7 @@
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-button
icon="el-icon-plus"

View File

@ -1,7 +1,7 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
@ -14,7 +14,7 @@
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="make" :form="addForm" :form-model="addModel" :rules="createRules" />
</el-scrollbar>
@ -462,7 +462,6 @@ export default {
.view-control{
height: 100%;
}
.card {
height: 100%;
}

View File

@ -1,6 +1,6 @@
<template>
<div style="height:100%">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>

View File

@ -1,7 +1,7 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
@ -14,7 +14,7 @@
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="make" label-width="110px" :model="addModel" size="mini" :rules="makeRules">
<el-form-item :label="$t('map.textContent')" prop="content">

View File

@ -1,7 +1,7 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-table :data="trainList.filter(data => !search || data.groupNumber.toLowerCase().includes(search.toLowerCase()))" style="width: 100%">
<el-table-column :label="$t('map.trainNumber')" prop="groupNumber" />

View File

@ -1,7 +1,7 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>

View File

@ -1,7 +1,7 @@
<template>
<el-tabs v-model="activeName" class="card" @tab-click="handleClick">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
@ -14,7 +14,7 @@
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<div style="height: calc(100% - 46px);">
<div class="view-control-content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" />
</el-scrollbar>

View File

@ -1,6 +1,6 @@
<template>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="60%" :before-close="handleClose" center :close-on-click-modal="false">
<data-form ref="datatop" :form="formTop" :form-model="formModel" :rules="topRules" />
<data-form ref="datatop" :form="formTop" :inline="inline" :form-model="formModel" :rules="topRules" />
<el-row :gutter="20">
<el-col :span="12">
<el-card class="box-card">
@ -31,21 +31,23 @@
</template>
<script>
import { getDeviceDetail, setPsdConfig, setSignalConfig, setSwitchConfig } from '@/api/project';
import { getDeviceDetail, setPsdConfig, setSignalConfig, setSwitchConfig, setPslConfig } from '@/api/project';
export default {
name: 'EditConfigGateway',
data() {
return {
dialogVisible: false,
inline: true,
formModel: {},
formLeft: {},
formRight: {},
leftRules: {},
rightRules: {},
gatewayList: [],
setDeviceConfigFunction: null,
data: null,
addrName: '',
data: {},
titleMap: { SWITCH: '道岔', PSD:'屏蔽门', SIGNAL: '信号机', PSL:'端头控制盒' },
psdLeftValue: [
{label: '输入-是否关门位', value: 'i_c'},
{label: '输入-PSL关门按钮位', value: 'i_dc_b'},
@ -86,6 +88,22 @@ export default {
{label: '输出-红灯控制位', value: 'o_r'},
{label: '输出-黄灯控制位', value: 'o_y'},
{label: '输出-黄红灯控制位', value: 'o_yr'}
],
pslLeftValue: [
{label: '读PSL操作旋钮位', value: 'rpslcz'},
{label: '读关门按钮位', value: 'rgman'},
{label: '读开门按钮位', value: 'rkman'},
{label: '读互锁解除开关位', value: 'rjc'},
{label: '读试灯按钮位', value: 'rsdan'},
{label: '读紧急停车按钮位', value: 'rjtan'}
],
pslRightValue: [
{label: '写全部关门指示灯位', value: 'wqbgbd'},
{label: '写开门到位指示灯位', value: 'wkmdwd'},
{label: '写PSL允许指示灯位', value: 'wpslyxd'},
{label: '写互锁解除指示灯位', value: 'wjcd'},
{label: '写IBP盘操作指示灯位', value: 'wibpczd'},
{label: '写PST操作指示灯位', value: 'wpstczd'}
]
};
},
@ -94,23 +112,23 @@ export default {
return {
labelWidth: '220px',
items: [
{ prop: 'gatewayCode', label: '网关编码:', type: 'select', required: true, options: this.gatewayList, placeholder: '请选择网关编码' },
{ prop:'addr', label:'网关地址:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0}
{ prop:'addr', label: this.addrName, type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'quantity', label: '位数量:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0 }
]
};
},
topRules() {
return {
gatewayCode: [
{ required: true, message: '请选择网关编码', trigger: 'change' }
],
addr: [
{ required: true, message: '请填写网关地址', trigger: 'blur' }
],
quantity: [
{ required: true, message: '请填写位数量', trigger: 'blur'}
]
};
},
title() {
return '编辑设备配置';
return `编辑${this.titleMap[this.data.type]}配置`;
}
},
methods: {
@ -118,27 +136,16 @@ export default {
var validateDevice = (rule, value, callback) => {
const list = [];
rule.list.forEach(item=> {
if (item.value !== rule.field && this.formModel[item.value] === value) {
if (item.value !== rule.field && this.formModel[item.value] && this.formModel[item.value] === value) {
list.push(item.label);
} else if (item.value === rule.field) {
list.push(item.label);
}
});
let flag = false;
if (value && value.length) {
for (var i = 0; i < value.length; i++) {
const ascallCode = value.charCodeAt(i);
if (ascallCode > 70 || ascallCode < 48 || (ascallCode > 57 && ascallCode < 65)) {
flag = true;
}
}
if (!this.formModel.quantity) {
this.$refs.datatop.validateForm();
}
if (!value) {
callback(new Error(rule.messageEmpty));
} else if (flag) {
callback(new Error('输入的每一位应为十六进制0-F,请修改'));
} else if (list.length > 1) {
if (list.length > 1) {
let repeatedValue = '';
list.forEach((item, index) => {
repeatedValue += item;
@ -147,6 +154,8 @@ export default {
}
});
callback(new Error(repeatedValue + '位置重复,请调整!'));
} else if (this.formModel.quantity && value >= this.formModel.quantity) {
callback(new Error('网关位应小于位数量!'));
} else {
callback();
}
@ -313,39 +322,124 @@ export default {
}
case 'SWITCH': {
this.setDeviceConfigFunction = setSwitchConfig;
this.addrName = '网关地址:';
this.formTop.labelWidth = '160px';
this.formLeft = {
labelWidth: '160px',
items: [
{ prop: 'rnp', label: '输入-定位表示位:', type: 'text', rightWidth: '100px', maxlength: 4},
{ prop: 'rrp', label: '输入-反位表示位:', type: 'text', rightWidth: '100px', maxlength: 4},
{ prop: 'rl', label: '输入-锁闭表示位:', type: 'text', rightWidth: '100px', maxlength: 4}
{ prop: 'rnp', label: '输入-定位表示位:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'rrp', label: '输入-反位表示位:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'rl', label: '输入-锁闭表示位:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0}
]
};
this.leftRules = {
rnp: [
{ validator: validateDevice, messageEmpty: '请填写输入-定位表示位', list: this.switchLeftValue, trigger: 'blur' }
{ required: true, message: '请填写\'输入-定位表示位\'', trigger: 'blur' },
{ validator: validateDevice, list: this.switchLeftValue, trigger: ['blur', 'change'] }
],
rrp: [
{ validator: validateDevice, messageEmpty: '请填写输入-反位表示位', list: this.switchLeftValue, trigger: 'blur' }
{ required: true, message: '请填写\'输入-反位表示位\'', trigger: 'blur' },
{ validator: validateDevice, list: this.switchLeftValue, trigger: ['blur', 'change'] }
],
rl: [
{ validator: validateDevice, messageEmpty: '请填写输入-锁闭表示位', list: this.switchLeftValue, trigger: 'blur' }
{ required: true, message: '请填写\'输入-锁闭表示位\'', trigger: 'blur' },
{ validator: validateDevice, list: this.switchLeftValue, trigger: ['blur', 'change'] }
]
};
this.formRight = {
labelWidth: '160px',
items: [
{ prop: 'wnp', label: '输出-定操控制位:', type: 'text', rightWidth: '100px', maxlength: 4},
{ prop: 'wrp', label: '输出-反操控制位:', type: 'text', rightWidth: '100px', maxlength: 4}
{ prop: 'wnp', label: '输出-定操控制位:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'wrp', label: '输出-反操控制位:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0}
]
};
this.rightRules = {
wnp: [
{ validator: validateDevice, messageEmpty: '请填写输出-定操(normal)控制位', list: this.switchRightValue, trigger: 'blur' }
{ required: true, message: '请填写\'输出-定操(normal)控制位\'', trigger: 'blur' },
{ validator: validateDevice, list: this.switchRightValue, trigger: ['blur', 'change'] }
],
wrp: [
{ validator: validateDevice, messageEmpty: '请填写输出-反操(reverse)控制位', list: this.switchRightValue, trigger: 'blur' }
{ required: true, message: '请填写\'输出-反操(reverse)控制位\'', trigger: 'blur' },
{ validator: validateDevice, list: this.switchRightValue, trigger: ['blur', 'change'] }
]
};
break;
}
case 'PSL': {
this.setDeviceConfigFunction = setPslConfig;
this.addrName = '网关地址:';
this.formLeft = {
labelWidth: '170px',
items: [
{ prop: 'rpslcz', label: '读PSL操作旋钮位:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'rgman', label: '读关门按钮位:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'rkman', label: '读开门按钮位:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'rjc', label: '读互锁解除开关位:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'rsdan', label: '读试灯按钮位:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'rjtan', label: '读紧急停车按钮位', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0}
]
};
this.leftRules = {
rpslcz: [
{ required: true, message: '请填写\'读PSL操作旋钮位\'', trigger: 'blur' },
{ validator: validateDevice, list: this.pslLeftValue, trigger: ['blur', 'change'] }
],
rgman: [
{ required: true, message: '请填写\'读关门按钮位\'', trigger: 'blur' },
{ validator: validateDevice, list: this.pslLeftValue, trigger: ['blur', 'change'] }
],
rkman: [
{ required: true, message: '请填写\'读开门按钮位\'', trigger: 'blur' },
{ validator: validateDevice, list: this.pslLeftValue, trigger: ['blur', 'change'] }
],
rjc: [
{ required: true, message: '请填写\'读互锁解除开关位\'', trigger: 'blur' },
{ validator: validateDevice, list: this.pslLeftValue, trigger: ['blur', 'change'] }
],
rsdan: [
{ required: true, message: '请填写\'读试灯按钮位\'', trigger: 'blur' },
{ validator: validateDevice, list: this.pslLeftValue, trigger: ['blur', 'change'] }
],
rjtan: [
{ required: true, message: '请填写\'读紧急停车按钮位\'', trigger: 'blur' },
{ validator: validateDevice, list: this.pslLeftValue, trigger: ['blur', 'change'] }
]
};
this.formRight = {
labelWidth: '170px',
items: [
{ prop: 'wqbgbd', label: '写全部关门指示灯位:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'wkmdwd', label: '写开门到位指示灯位:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'wpslyxd', label: '写PSL允许指示灯位:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'wjcd', label: '写互锁解除指示灯位:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'wibpczd', label: '写IBP盘操作指示灯位:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'wpstczd', label: '写PST操作指示灯位:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0}
]
};
this.rightRules = {
wqbgbd: [
{ required: true, message: '请填写\'写全部关门指示灯位\'', trigger: 'blur' },
{ validator: validateDevice, list: this.pslRightValue, trigger: ['blur', 'change'] }
],
wkmdwd: [
{ required: true, message: '请填写\'写开门到位指示灯位\'', trigger: 'blur' },
{ validator: validateDevice, list: this.pslRightValue, trigger: ['blur', 'change'] }
],
wpslyxd: [
{ required: true, message: '请填写\'写PSL允许指示灯位\'', trigger: 'blur' },
{ validator: validateDevice, list: this.pslRightValue, trigger: ['blur', 'change'] }
],
wjcd: [
{ required: true, message: '请填写\'写互锁解除指示灯位\'', trigger: 'blur' },
{ validator: validateDevice, list: this.pslRightValue, trigger: ['blur', 'change'] }
],
wibpczd: [
{ required: true, message: '请填写\'写IBP盘操作指示灯位\'', trigger: 'blur' },
{ validator: validateDevice, list: this.pslRightValue, trigger: ['blur', 'change'] }
],
wpstczd: [
{ required: true, message: '请填写\'写PST操作指示灯位\'', trigger: 'blur' },
{ validator: validateDevice, list: this.pslRightValue, trigger: ['blur', 'change'] }
]
};
break;
@ -360,11 +454,6 @@ export default {
}).catch(()=> {
this.$message.error('获取项目设备详情失败!');
});
if (row.project === 'XTY') {
this.gatewayList = [{lable:'XTY', value: 'XTY'}];
} else if (row.project === 'GZB') {
this.gatewayList = [{label: 'GZB_1', value: 'GZB_1'}];
}
},
doShow(row) {
this.initData(row);
@ -388,13 +477,13 @@ export default {
});
});
},
handleClose(done) {
handleClose() {
this.formModel = {};
this.formLeft = {};
this.formRight = {};
this.leftRules = {};
this.rightRules = {};
this.gatewayList = [];
this.data = {};
this.dialogVisible = false;
this.$refs.datatop.resetForm();
this.$refs.dataleft.resetForm();

View File

@ -0,0 +1,53 @@
<template>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="60%" :before-close="handleClose" center :close-on-click-modal="false">
<data-form ref="datatop" :form="formTop" :inline="inline" :form-model="formModel" :rules="topRules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { getDeviceDetail, setIbpConfig} from '@/api/project';
export default {
name: 'EditConfigIbp',
data() {
return {
title: '编辑IBP盘配置',
formTop: {},
formModel: {},
topRules: {},
dialogVisible: false,
inline: true
};
},
computed: {
},
methods: {
doShow() {
this.dialogVisible = true;
},
initData(row) {
getDeviceDetail(row.id).then(resp => {
if (resp.data.config) {
this.formModel = JSON.parse(resp.data.config);
}
}).catch(()=> {
this.$message.error('获取项目设备详情失败!');
});
},
doSave() {
},
handleClose() {
this.formModel = {};
this.dialogVisible = false;
}
}
};
</script>
<style scoped>
</style>

View File

@ -5,6 +5,7 @@
<edit-config-gateway ref="editConfigGateway" @reloadTable="reloadTable" />
<edit-config ref="editConfig" @reloadTable="reloadTable" />
<edit-config-screen ref="editConfigScreen" @reloadTable="reloadTable" />
<edit-config-ibp ref="editConfigIbp" @reloadTable="reloadTable" />
<input id="device-manage-url" v-model="url" style="opacity: 0;">
</div>
</template>
@ -15,6 +16,7 @@ import DeviceAdd from './add';
import EditConfigGateway from './editConfigGateway';
import EditConfig from './editConfig';
import EditConfigScreen from './editConfigScreen';
import EditConfigIbp from './editConfigIbp';
import { getSessionStorage } from '@/utils/auth';
import ConstConfig from '@/scripts/ConstConfig';
export default {
@ -23,9 +25,11 @@ export default {
DeviceAdd,
EditConfigGateway,
EditConfig,
EditConfigScreen
EditConfigScreen,
EditConfigIbp
},
data() {
const noShowPathType = ['SWITCH', 'SIGNAL', 'PSD', 'PSL', 'IBP'];
return {
examResultList: [],
url: '',
@ -106,7 +110,7 @@ export default {
{
name: '登录路径',
handleClick: this.getPath,
showControl: (row) => { return row.type !== 'SWITCH' && row.type !== 'SIGNAL' && row.type !== 'PSD'; }
showControl: (row) => { return !noShowPathType.includes(row.type); }
}
]
}
@ -177,10 +181,12 @@ export default {
editConfig(index, row) {
if (row.type === 'LW' || row.type === 'VR_IBP' || row.type === 'ISCS_LW' || row.type === 'ISCS_CW') {
this.$refs.editConfig.doShow(row);
} else if (row.type === 'SWITCH' || row.type === 'SIGNAL' || row.type === 'PSD') {
} else if (row.type === 'SWITCH' || row.type === 'SIGNAL' || row.type === 'PSD' || row.type === 'PSL') {
this.$refs.editConfigGateway.doShow(row);
} else if (row.type == 'LSW' || row.type == 'CCTV' || row.type == 'VR_PSD') {
this.$refs.editConfigScreen.doShow(row);
} else if (row.type === 'IBP') {
this.$refs.editConfigIbp.doShow(row);
} else {
this.$messageBox('暂无配置内容');
}