Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
db230c2622
@ -99,6 +99,22 @@ export function getDevicesByType(type) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 添加/修改车站综合监控配置 */
|
||||
export function setIscsLwConfig(id, data) {
|
||||
return request({
|
||||
url: `/api/device/${id}/config/iscslw`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/** 添加/修改中心综合监控配置 */
|
||||
export function setIscsCwConfig(id, data) {
|
||||
return request({
|
||||
url: `/api/device/${id}/config/iscscw`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/** 添加/修改大屏工作站配置 */
|
||||
export function setLswConfig(id, data) {
|
||||
@ -117,3 +133,13 @@ export function setCctvConfig(id, data) {
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/** 添加/修改CCTV工作站配置 */
|
||||
export function setVrPsdConfig(id, data) {
|
||||
return request({
|
||||
url: `/api/device/${id}/config/vrpsd`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -50,8 +50,8 @@ function getRouteInfo(to) {
|
||||
} else {
|
||||
const whitePage = PermissionParam[current_session] ? PermissionParam[current_session].whitePage : '';
|
||||
loginPath = whitePage || loginPage;
|
||||
if (to.query.projectDevice && to.query.ibpDevice) {
|
||||
loginPath = `${loginPath}&projectDevice=${to.query.projectDevice}&ibpDevice=${to.query.ibpDevice}`;
|
||||
if (to.query.projectDevice && to.query.type) {
|
||||
loginPath = `${loginPath}&projectDevice=${to.query.projectDevice}&type=${to.query.type}`;
|
||||
} else if (to.query.projectDevice) {
|
||||
loginPath = `${loginPath}&projectDevice=${to.query.projectDevice}`;
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb',
|
||||
export const CaseHideProjectList = ['hyd', 'designhyd']; // 案例展示隐藏的项目
|
||||
export const VersionBaseNoShow = ['hyd', 'designhyd']; // 登录页右下角版本开发基于不展示
|
||||
export const MainBodyNoShow = ['hyd', 'designhyd', 'jyd', 'designjyd', 'tky', 'designtky']; // 登录页右下角主体不展示
|
||||
export const GenerateRouteProjectList = ['jsxt', 'refereeJsxt'];// 需要在公共路由中生成登录页面的项目&登录页样式
|
||||
export const GenerateRouteProjectList = ['jsxt', 'refereeJsxt', 'gzb', 'designgzb', 'xty', 'designxty'];// 需要在公共路由中生成登录页面的项目&登录页样式
|
||||
export const goOtherPlatformMenu = { // 导航栏快速切换平台
|
||||
login: '/design/login',
|
||||
design: '/login',
|
||||
|
@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="select-box">
|
||||
<el-select v-model="currentSystem" placeholder="请选择" size="mini" @change="changeCurrentSystem">
|
||||
<el-select v-if="!projectDevice" v-model="currentSystem" placeholder="请选择" size="mini" @change="changeCurrentSystem">
|
||||
<el-option
|
||||
v-for="item in systemList"
|
||||
:key="item.value"
|
||||
@ -25,13 +25,14 @@
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="back-box" @click="back">返回主页面</div>
|
||||
<div class="back-box" @click="back">{{ projectDevice? '退出': '返回主页面' }}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import merge from 'webpack-merge';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -271,6 +272,9 @@ export default {
|
||||
computed: {
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
projectDevice() {
|
||||
return getSessionStorage('projectDevice');
|
||||
}
|
||||
},
|
||||
async created () {
|
||||
@ -300,6 +304,11 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
if (this.projectDevice && this.projectDevice.type === 'ISCS_LW') {
|
||||
this.currentSystem = 'local';
|
||||
} else if (this.projectDevice && this.projectDevice.type === 'ISCS_CW') {
|
||||
this.currentSystem = 'center';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show(item) {
|
||||
@ -315,24 +324,42 @@ export default {
|
||||
this.selectChildIndex = 0;
|
||||
if (item.children.length) {
|
||||
this.type = item.children[0].type;
|
||||
this.$router.push({ path: `/displayIscs/system/config/${item.children[0].type}`, query: {currentSystem:this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id, group: this.group } });
|
||||
const query = {currentSystem:this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id, group: this.group };
|
||||
if (this.projectDevice) {
|
||||
query.projectDevice = this.$route.query.projectDevice;
|
||||
}
|
||||
this.$router.push({ path: `/displayIscs/system/config/${item.children[0].type}`, query: query });
|
||||
}
|
||||
}
|
||||
},
|
||||
selectChildren(item, index) { // 选择子菜单
|
||||
this.selectChildIndex = index;
|
||||
this.type = item.type;
|
||||
this.$router.push({ path: `/displayIscs/system/config/${item.type}`, query: {currentSystem: this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id, group: this.group } });
|
||||
const query = {currentSystem: this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id, group: this.group };
|
||||
if (this.projectDevice) {
|
||||
query.projectDevice = this.$route.query.projectDevice;
|
||||
}
|
||||
this.$router.push({ path: `/displayIscs/system/config/${item.type}`, query: query });
|
||||
},
|
||||
selectStation(item, index) { // 选择子菜单
|
||||
this.selectStationIndex = index;
|
||||
if (!this.type) {
|
||||
this.type = this.$route.params.mode;
|
||||
}
|
||||
this.$router.push({ path: `/displayIscs/system/config/${this.type}`, query: {currentSystem: this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id, group: this.group } });
|
||||
const query = {currentSystem: this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id, group: this.group };
|
||||
if (this.projectDevice) {
|
||||
query.projectDevice = this.$route.query.projectDevice;
|
||||
}
|
||||
this.$router.push({ path: `/displayIscs/system/config/${this.type}`, query: query });
|
||||
},
|
||||
back() {
|
||||
this.$router.push({ path: `/trainingPlatform` });
|
||||
if (this.projectDevice) {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
});
|
||||
} else {
|
||||
this.$router.push({ path: `/trainingPlatform` });
|
||||
}
|
||||
},
|
||||
changeCurrentSystem() {
|
||||
this.$router.push({
|
||||
|
@ -1,27 +1,27 @@
|
||||
<template>
|
||||
<div
|
||||
v-loading="ibpDevice && !loadingCode"
|
||||
v-loading="syncLogin && !loadingCode"
|
||||
class="login-container"
|
||||
:style="{'background-image': 'url('+bgImg+')'}"
|
||||
element-loading-spinner="el-icon-loading"
|
||||
element-loading-text="检测主工作站登录中"
|
||||
element-loading-background="rgba(0, 0, 0, 0)"
|
||||
>
|
||||
<el-button v-if="ibpDevice && loadingCode" type="text" style="font-size: 24px;font-weight: bold;" @click="loginRefresh">主工作站未登录,点击重新检测</el-button>
|
||||
<div v-if="loginTitle && !ibpDevice" :class="$route.query.project=='hyd'?'text-box':'left-logo-box'">
|
||||
<el-button v-if="syncLogin && loadingCode" type="text" style="font-size: 24px;font-weight: bold;" @click="loginRefresh">主工作站未登录,点击重新检测</el-button>
|
||||
<div v-if="loginTitle && !syncLogin" :class="$route.query.project=='hyd'?'text-box':'left-logo-box'">
|
||||
<img class="logo" :src="logoImg" :style="{width: logoWidth}">
|
||||
<span>{{ loginTitle==='空串'?'':loginTitle }}</span>
|
||||
</div>
|
||||
<div v-if="isProject && !ibpDevice" class="text-box">
|
||||
<div v-if="isProject && !syncLogin" class="text-box">
|
||||
<img v-if="!loginTitle" class="logo" :src="logoImg" style="width: 80px">
|
||||
<span>{{ title }}</span>
|
||||
</div>
|
||||
<div v-if="!ibpDevice" class="language_box">
|
||||
<div v-if="!syncLogin" class="language_box">
|
||||
<el-tooltip effect="dark" :content="this.$t('login.clickSwitchLanguage')" placement="bottom-end">
|
||||
<el-button class="language_btn" type="text" @click="handleLanguage">{{ language }}</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div v-if="!ibpDevice" class="content-box" :style="$route.query.project=='hyd'?'width: 450px;':''">
|
||||
<div v-if="!syncLogin" class="content-box" :style="$route.query.project=='hyd'?'width: 450px;':''">
|
||||
<div v-if="$route.query.project!='hyd'" class="qrcode-main">
|
||||
<div class="login-code-box" @click="loginRefresh">
|
||||
<qrcode-vue
|
||||
@ -176,6 +176,7 @@ export default {
|
||||
language: '中文',
|
||||
versionBaseNoShow: VersionBaseNoShow,
|
||||
mainBodyNoShow: MainBodyNoShow
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -210,10 +211,16 @@ export default {
|
||||
},
|
||||
bgImg() {
|
||||
const bgImgAll = this.$route.query.project == 'hyd' ? '' : bgImg;
|
||||
return this.$route.query.ibpDevice ? bgIbpImg : bgImgAll;
|
||||
const synchronousLogin = ['IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW'];
|
||||
return synchronousLogin.includes(this.$route.query.type) ? bgIbpImg : bgImgAll;
|
||||
},
|
||||
ibpDevice() {
|
||||
return this.$route.query.ibpDevice;
|
||||
syncLogin() {
|
||||
const synchronousLogin = ['IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW'];
|
||||
if (this.$route.query.type) {
|
||||
return synchronousLogin.includes(this.$route.query.type);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -240,7 +247,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
document.title = loginInfo[this.project].browserTitle || loginInfo[this.project].title;
|
||||
if (this.ibpDevice || this.$route.query.project != 'hyd') {
|
||||
if (this.syncLogin || this.$route.query.project != 'hyd') {
|
||||
this.loginRefresh();
|
||||
}
|
||||
},
|
||||
@ -395,14 +402,18 @@ export default {
|
||||
getLoginInfo(getToken()).then(res => {
|
||||
getSimulationInfoNew(res.data.group).then(resp => {
|
||||
const query = { group: res.data.group, drawWay: true, mapId: resp.data.map.id, lineCode:resp.data.map.lineCode, projectDevice: this.$route.query.projectDevice };
|
||||
if (this.$route.query.ibpDevice) {
|
||||
query.ibpDevice = true;
|
||||
if (this.syncLogin) {
|
||||
query.type = this.$route.query.type;
|
||||
}
|
||||
console.log(res.data);
|
||||
setSessionStorage('projectDevice', JSON.stringify(res.data.deviceVO));
|
||||
if (this.$route.query.type == 'LSW') {
|
||||
console.log('进入', `/bigSplitScreen/${resp.data.map.id}`);
|
||||
this.$router.push({ path: `/bigSplitScreen/${resp.data.map.id}`, query: query });
|
||||
} else if (this.$route.query.type == 'CCTV') {
|
||||
// this.$router.push({ path: `/bigSplitScreen/${resp.data.map.id}`, query: query });
|
||||
} else if (this.$route.query.type == 'VR_PSD') {
|
||||
// this.$router.push({ path: `/bigSplitScreen/${resp.data.map.id}`, query: query });
|
||||
} else {
|
||||
this.$router.push({ path: `/jointTrainingNew`, query: query });
|
||||
}
|
||||
|
@ -44,9 +44,18 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form v-show="data.type === 'LSW'" ref="formLw" :model="formLw" label-width="100px" :rules="rulesLw">
|
||||
<el-form v-show="data.type === 'ISCS_LW' || data.type === 'ISCS_CW'" ref="formIscs" :model="formIscs" label-width="100px" :rules="rulesIscs">
|
||||
<el-form-item :label="data.type === 'ISCS_LW'?'现地工作站:': '行调工作站'" prop="deviceCode">
|
||||
<el-select v-model="formIscs.deviceCode" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in lwList"
|
||||
:key="item.code"
|
||||
:label="item.code"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<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>
|
||||
@ -55,7 +64,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDeviceDetail, setIbpConfig, setLwConfig, getDevicesByType } from '@/api/project';
|
||||
import { getDeviceDetail, setIbpConfig, setLwConfig, getDevicesByType, setIscsLwConfig, setIscsCwConfig } from '@/api/project';
|
||||
import { getAllMapOnline, getStationListNeedAttendant } from '@/api/jmap/map';
|
||||
|
||||
export default {
|
||||
@ -80,6 +89,9 @@ export default {
|
||||
mapId: '',
|
||||
stationCode: ''
|
||||
},
|
||||
formIscs: {
|
||||
deviceCode: ''
|
||||
},
|
||||
rulesIbp: {
|
||||
part: [
|
||||
{ required: true, message: '请选择显示位置', trigger: 'change' }
|
||||
@ -93,6 +105,11 @@ export default {
|
||||
{ required: true, message: '请选择关联车站', trigger: 'change'}
|
||||
]
|
||||
},
|
||||
rulesIscs: {
|
||||
deviceCode: [
|
||||
{ required: true, message: '请选择关联设备', trigger: 'change'}
|
||||
]
|
||||
},
|
||||
partList: [{label: '左', value: 'LEFT'}, {label: '右', value: 'RIGHT'}, {label: '全部', value: 'WHOLE'}],
|
||||
stationList: []
|
||||
};
|
||||
@ -109,6 +126,8 @@ export default {
|
||||
this.formIbp = JSON.parse(resp.data.config);
|
||||
} else if (resp.data.config && resp.data.type === 'LW') {
|
||||
this.formLw = JSON.parse(resp.data.config);
|
||||
} else if (resp.data.config && (resp.data.type === 'ISCS_LW' || resp.data.type === 'ISCS_CW')) {
|
||||
this.formIscs = JSON.parse(resp.data.config);
|
||||
}
|
||||
}).catch(()=> {
|
||||
this.$message.error('获取项目设备详情失败!');
|
||||
@ -120,7 +139,7 @@ export default {
|
||||
this.data = row;
|
||||
this.mapList = [];
|
||||
this.stationList = [];
|
||||
if (this.data.type === 'IBP') {
|
||||
if (this.data.type === 'IBP' || this.data.type === 'ISCS_LW') {
|
||||
getDevicesByType('LW').then(res => {
|
||||
if (res.data && res.data.length) {
|
||||
this.lwList = res.data;
|
||||
@ -128,6 +147,14 @@ export default {
|
||||
}).catch(() => {
|
||||
this.$message.error('获取设备列表失败!');
|
||||
});
|
||||
} else if (this.data.type === 'ISCS_CW') {
|
||||
getDevicesByType('CW').then(res => {
|
||||
if (res.data && res.data.length) {
|
||||
this.lwList = res.data;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取设备列表失败!');
|
||||
});
|
||||
} else {
|
||||
getAllMapOnline().then(res => {
|
||||
if (res.data && res.data.length) {
|
||||
@ -164,13 +191,35 @@ export default {
|
||||
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
|
||||
});
|
||||
});
|
||||
} else if (this.data.type === 'ISCS_LW') {
|
||||
this.$refs.formIscs.validate(() => {
|
||||
setIscsLwConfig(this.data.id, this.formIscs).then(response => {
|
||||
self.$message.success('设置现地综合监控配置成功');
|
||||
self.handleClose();
|
||||
self.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
|
||||
});
|
||||
});
|
||||
} else if (this.data.type === 'ISCS_CW') {
|
||||
this.$refs.formIscs.validate(() => {
|
||||
setIscsCwConfig(this.data.id, this.formIscs).then(response => {
|
||||
self.$message.success('设置中心综合监控配置成功');
|
||||
self.handleClose();
|
||||
self.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
this.data = {};
|
||||
this.lwList = [];
|
||||
this.$refs.formIbp.resetFields();
|
||||
this.$refs.formLw.resetFields();
|
||||
this.$refs.formIscs.resetFields();
|
||||
},
|
||||
mapIdChange(mapId) {
|
||||
if (mapId) {
|
||||
|
@ -31,7 +31,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDevicesByType, getDeviceDetail, setLswConfig, setCctvConfig } from '@/api/project';
|
||||
import { getDevicesByType, getDeviceDetail, setLswConfig, setCctvConfig, setVrPsdConfig } from '@/api/project';
|
||||
|
||||
export default {
|
||||
name: 'EditConfig',
|
||||
@ -120,6 +120,19 @@ export default {
|
||||
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
|
||||
});
|
||||
});
|
||||
} else if (this.data.type == 'VR_PSD') {
|
||||
this.$refs.form.validate(() => {
|
||||
const param = {
|
||||
deviceCode: this.formData.deviceCode
|
||||
};
|
||||
setVrPsdConfig(this.data.id, param).then(response => {
|
||||
self.$message.success('设置虚拟屏蔽门工作站配置成功');
|
||||
self.handleClose();
|
||||
self.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
handleClose() {
|
||||
|
@ -175,11 +175,11 @@ export default {
|
||||
});
|
||||
},
|
||||
editConfig(index, row) {
|
||||
if (row.type === 'LW' || row.type === 'IBP') {
|
||||
if (row.type === 'LW' || row.type === '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') {
|
||||
this.$refs.editConfigGateway.doShow(row);
|
||||
} else if (row.type == 'LSW' || row.type == 'CCTV') {
|
||||
} else if (row.type == 'LSW' || row.type == 'CCTV' || row.type == 'VR_PSD') {
|
||||
this.$refs.editConfigScreen.doShow(row);
|
||||
} else {
|
||||
this.$messageBox('暂无配置内容');
|
||||
@ -190,13 +190,7 @@ export default {
|
||||
},
|
||||
getPath(index, row) {
|
||||
let url = '';
|
||||
if (row.type === 'IBP') {
|
||||
url = `${window.location.protocol}//${window.location.host}/login?project=${this.projectCode.toLowerCase()}&projectDevice=${row.code}&ibpDevice=true`;
|
||||
} else if (row.type == 'LSW') {
|
||||
url = `${window.location.protocol}//${window.location.host}/login?project=${this.projectCode.toLowerCase()}&projectDevice=${row.code}&type=${row.type}&ibpDevice=true`;
|
||||
} else {
|
||||
url = `${window.location.protocol}//${window.location.host}/login?project=${this.projectCode.toLowerCase()}&projectDevice=${row.code}`;
|
||||
}
|
||||
url = `${window.location.protocol}//${window.location.host}/login?project=${this.projectCode.toLowerCase()}&projectDevice=${row.code}&type=${row.type}`;
|
||||
this.url = url;
|
||||
this.$messageBox();
|
||||
this.$confirm(`登录路径:${url}`, '登录路径', {
|
||||
|
Loading…
Reference in New Issue
Block a user