This commit is contained in:
zyy 2020-08-20 16:02:32 +08:00
commit 33e773a940
28 changed files with 1196 additions and 485 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -76,6 +76,7 @@ export default {
temporaryLimit: 'temporary speed restriction',
lcControl: 'Lc control',
image: 'image',
floodGate: 'flood gate',
station: 'station',
controlMode: 'control mode',
platform: 'platform',

View File

@ -53,6 +53,7 @@ export default {
lcControl: 'Lc控制',
buttonControl: '按钮',
image: '图片',
floodGate: '防淹门',
station: '车站',
controlMode: '控制模式',
platform: '站台',

View File

@ -732,6 +732,7 @@ class SkinCode extends defaultStyle {
defaultServerNoColor: '#FFFFFF' // 默认服务号状态显示颜色
}
};
this[deviceType.FloodGate] = {};
}
}

View File

@ -658,6 +658,7 @@ class SkinCode extends defaultStyle {
] // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
}
};
this[deviceType.FloodGate] = {};
}
}

View File

@ -842,6 +842,7 @@ class SkinCode extends defaultStyle {
] // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
}
};
this[deviceType.FloodGate] = {};
}
}

View File

@ -686,6 +686,7 @@ class SkinCode extends defaultStyle {
serverNoType: []// 服务号状态类型 eg:{type: '01', showColor: '#FFFFFF'}
}
};
this[deviceType.FloodGate] = {};
}
}

View File

@ -690,6 +690,7 @@ class SkinCode extends defaultStyle {
serverNoType: []// 服务号状态类型 eg:{type: '01', showColor: '#FFFFFF'}
}
};
this[deviceType.FloodGate] = {};
}
}

View File

@ -748,6 +748,7 @@ class SkinCode extends defaultStyle {
serverNoType: []// 服务号状态类型 eg:{type: '01', showColor: '#FFFFFF'}
}
};
this[deviceType.FloodGate] = {};
}
}

View File

@ -756,6 +756,7 @@ class SkinCode extends defaultStyle {
] // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
}
};
this[deviceType.FloodGate] = {};
}
}

View File

@ -791,6 +791,15 @@ class SkinCode extends defaultStyle {
] // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
}
};
this[deviceType.FloodGate] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lineWidth: 2, // 防淹门描边宽度
spareStrokeColor: '#000', // 打开并锁闭-非打开并锁闭描边颜色
spareFillColor: 'rgba(0, 0, 0, 0)', // 打开并锁闭填充颜色
closeFillColor: '#C10000', // 非打开并锁闭填充颜色
allowCloseFillColor: '#FF0000', // 允许关门填充颜色
allowCLoseStrokeColor: '#FFFF00' // 允许关门描边颜色
};
}
}

View File

@ -748,6 +748,7 @@ class SkinCode extends defaultStyle {
serverNoType: []// 服务号状态类型 eg:{type: '01', showColor: '#FFFFFF'}
}
};
this[deviceType.FloodGate] = {};
}
}

View File

@ -828,6 +828,7 @@ class SkinCode extends defaultStyle {
] // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
}
};
this[deviceType.FloodGate] = {};
}
}

View File

@ -260,4 +260,8 @@ deviceRender[deviceType.OverAp] = {
_type: deviceType.OverAp,
zlevel: 1
};
deviceRender[deviceType.FloodGate] = {
_type: deviceType.FloodGate,
zlevel: 1
};
export default deviceRender;

View File

@ -136,7 +136,9 @@ deviceState[deviceType.StationStand] = {
/** 是否故障*/
fault: 0 /** 非故障*/
};
deviceState[deviceType.FloodGate] = {
/** 防淹门状态 */
};
deviceState[deviceType.Train] = {
// /** 列车类型*/
// type: {

View File

@ -45,7 +45,8 @@ const deviceType = {
Arrow: 'Arrow',
Power: 'Power',
StationTurnBack: 'StationTurnBack',
OverAp: 'OverAp'
OverAp: 'OverAp',
FloodGate: 'FloodGate'
};
export default deviceType;

View File

@ -121,6 +121,9 @@ class Status {
handleStationTurnBack(device) {
this.statusObj = { };
}
handleFloodGate(device) {
this.statusObj = { };
}
getStatus() {
return this.statusObj;
}

View File

@ -0,0 +1,84 @@
/*
* 防淹门
*/
import Group from 'zrender/src/container/Group';
import Rect from 'zrender/src/graphic/shape/Rect';
import {isShowThePrdType} from '../../utils/handlePath';
export default class FloodGate extends Group {
constructor(model, style) {
super();
this.z = 20;
this._code = model.code;
this._type = model._type;
this.zlevel = model.zlevel;
this.z = model.z;
this.model = model;
this.style = style;
this.isShowShape = true;
if (isShowThePrdType(model.prdType, style.FloodGate.displayCondition) || model.previewOrMapDraw) {
this.create();
this.createMouseEvent();
this.setState(model);
}
if (model.previewOrMapDraw) {
this.setShowMode();
}
}
create() {
this.floodGate = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: this.model.position.x,
y: this.model.position.y,
width: this.model.width,
height: this.model.height
},
style: {
lineWidth: this.style.FloodGate.lineWidth,
stroke: this.style.FloodGate.spareStrokeColor,
fill: this.style.FloodGate.spareFillColor
}
});
this.add(this.floodGate);
}
recover() {
this.floodGate.setStyle({ stroke: this.style.FloodGate.spareStrokeColor, fill: this.style.FloodGate.spareFillColor });
}
// 设置状态
setState(model) {
if (!this.isShowShape) return;
this.recover();
}
createMouseEvent() {
}
setShowMode() {
const showMode = this.model.showMode;
const showConditions = this.style.FloodGate.displayCondition;
if (!showConditions || showConditions === '01' || showMode === showConditions) {
this.showMode();
} else {
this.hideMode();
}
}
setShowStation(stationCode) {
if (!stationCode || this.model.stationCode === stationCode) {
this.isShowShape = true;
this.showMode();
} else {
this.isShowShape = false;
this.hideMode();
}
}
showMode() {
this.floodGate && this.floodGate.show();
this.setState(this.model);
}
hideMode() {
this.floodGate && this.floodGate.hide();
}
}

View File

@ -137,9 +137,11 @@ export default class ELines extends Group {
});
}
show() {
this.eachChild((child) => {
child.show();
});
// this.eachChild((child) => {
// // console.log(child);
// child.show();
// });
this.section && this.section.show();
}
animateStyle(loop, animates) {

View File

@ -395,7 +395,7 @@ class StationStand extends Group {
this.reentry && this.reentry.hideMode();
this.jump && this.jump.hideMode();
this.detainCircle && this.detainCircle.setColor(this.style.StationStand.detainCar.defaultColor);
this.detainRect.setHide();
this.detainRect && this.detainRect.setHide();
}
/** 空闲*/

View File

@ -27,6 +27,7 @@ import Arrow from './Arrow/index';
import Power from './Power/index';
import StationTurnBack from './StationTurnBack/index';
import OverAp from './OverAp/index.js';
import FloodGate from './FloodGate/index';
/** 图库*/
const mapShape = {};
@ -75,6 +76,7 @@ mapShape[deviceType.Arrow] = Arrow;
mapShape[deviceType.Power] = Power;
mapShape[deviceType.StationTurnBack] = StationTurnBack;
mapShape[deviceType.OverAp] = OverAp;
mapShape[deviceType.FloodGate] = FloodGate;
function shapefactory(device, jmap) {
const type = device._type;

File diff suppressed because it is too large Load Diff

View File

@ -226,6 +226,10 @@ export function parser(data, skinCode, showConfig) {
}
}
}, this);
zrUtil.each(data.floodGateList || [], elem=> {
mapDevice[elem.code] = createDevice(deviceType.FloodGate, elem, propConvert, showConfig);
}, this);
}
return mapDevice;
@ -296,6 +300,7 @@ export function updateMapData(state, model) {
case deviceType.Arrow: updateForList(model, state, 'arrowList'); break;
case deviceType.Power: updateForList(model, state, 'powerLineList'); break;
case deviceType.StationTurnBack : updateForList(model, state, 'tbStrategyList'); break;
case deviceType.FloodGate: updateForList(model, state, 'floodGateList'); break;
}
}
}

View File

@ -5,6 +5,7 @@ import FaviconGzb from '@/assets/icon/favicon_gzb.png';
import FaviconHeb from '@/assets/icon/favicon_hyd.png';
import FaviconXadt from '@/assets/icon/favicon_xas.png';
import FaviconJyd from '@/assets/icon/favicon_jyd.png';
import FaviconHls from '@/assets/icon/favicon_hls.png';
import Bottom_Jyd from '@/assets/icon/bottom_jyd.png';
import Link_Jyd from '@/assets/icon/link_jyd.png';
import FaviconTky from '@/assets/icon/favicon_tky.png';
@ -12,6 +13,7 @@ import FaviconBxkc from '@/assets/icon/favicon_bxkc.png';
import FaviconCrsc from '@/assets/icon/favicon_crsc.png';
import Link_Bxkc from '@/assets/icon/link_bxkc.png';
import Link_Crsc from '@/assets/icon/link_crsc.png';
import Link_Hls from '@/assets/icon/link_hls.png';
// title:页面title; loginPath:退出登录跳转路径; loginParam:登录接口参数project;loginTitle:登录页左上角titlelogoWidth登录页左上角logo宽度
// homeTitle:导航栏title(没有采用title); browserTitle:浏览器窗口titlebottomColumn底部栏描述bottomIcon底部栏Icon;linkIcon:浏览器窗口icon(没有采用ProjectIcon)
@ -211,7 +213,7 @@ export const loginInfo = {
},
crsc: {
title: '城市轨道交通实训平台',
loginPath: '/login?project=xagy',
loginPath: '/login?project=crsc',
loginTitle: '空串',
logoWidth: '600px',
bottomIcon: FaviconCrsc,
@ -225,7 +227,7 @@ export const loginInfo = {
},
designcrsc: {
title: '城市轨道交通设计平台',
loginPath: '/design/login?project=xagy',
loginPath: '/design/login?project=crsc',
loginTitle: '空串',
logoWidth: '600px',
bottomIcon: FaviconCrsc,
@ -236,6 +238,30 @@ export const loginInfo = {
navigationLogoWidth: '100px',
navigationMarginLeft: '125px',
systemType: '011'
},
hls: {
title: '城市轨道交通实训平台',
loginPath: '/login?project=hls',
loginTitle: '空串',
logoWidth: '300px',
linkIcon: Link_Hls,
bottomColumn: '北京和利时系统工程有限公司',
loginParam: 'DEFAULT',
navigationLogoWidth: '180px',
navigationMarginLeft: '195px',
systemType: '011'
},
designhls: {
title: '城市轨道交通设计平台',
loginPath: '/design/login?project=hls',
loginTitle: '空串',
logoWidth: '300px',
linkIcon: Link_Hls,
bottomColumn: '北京和利时系统工程有限公司',
loginParam: 'DEFAULT',
navigationLogoWidth: '180px',
navigationMarginLeft: '195px',
systemType: '011'
}
};
@ -259,7 +285,9 @@ export const ProjectIcon = {
bxkc: FaviconBxkc,
designbxkc: FaviconBxkc,
crsc: FaviconCrsc,
designcrsc: FaviconCrsc
designcrsc: FaviconCrsc,
hls: FaviconHls,
designhls: FaviconHls
};
export const ProjectCode = {
@ -272,13 +300,13 @@ export const ProjectCode = {
xadt: 'XADT',
designxadt: 'XADT'
};
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc']; // 底部栏仅展示公司信息不展示备案号
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls']; // 底部栏仅展示公司信息不展示备案号
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb']; // 实训设计平台通过项目code获取地图列表的项目
export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目
export const VersionBaseNoShow = ['heb', 'designheb']; // 登录页右下角版本开发基于不展示
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc']; // 登录页右下角主体不展示
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls']; // 登录页右下角主体不展示
export const GenerateRouteProjectList = ['jsxt', 'refereeJsxt'];// 需要在公共路由中生成登录页面的项目
export const ProjectLoginStyleList = ['jsxt', 'refereeJsxt', 'gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc', 'crsc', 'designcrsc']; // 登录页样式
export const ProjectLoginStyleList = ['jsxt', 'refereeJsxt', 'gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls']; // 登录页样式
export const NoQrcodeList = ['heb', 'designheb'];
export const goOtherPlatformMenu = { // 导航栏快速切换平台
login: '/design/login',
@ -298,90 +326,92 @@ export const goOtherPlatformMenu = { // 导航栏快速切换平台
bxkc: '/design/login?project=bxkc',
designbxkc: '/login?project=bxkc',
crsc: '/design/login?project=crsc',
designcrsc: '/login?project=crsc'
};
export const PermissionParam = { // 路径权限处理所需参数配置(跳转白名单,路由处理类型)
heb: {
whitePage: '/login?project=heb',
systemType: '019'
},
designheb: {
whitePage: '/design/login?project=heb',
systemType: '019'
},
login: {
whitePage: '/login',
systemType: '011'
},
design: {
whitePage: '/design/login',
systemType: '011'
},
designxty: {
whitePage: '/design/login?project=xty',
systemType: '013'
},
designgzb: {
whitePage: '/design/login?project=gzb',
systemType: '014'
},
designxadt: {
whitePage: '/design/login?project=xadt',
systemType: '012'
},
designjyd: {
whitePage: '/design/login?project=jyd',
systemType: '017'
},
designtky: {
whitePage: '/design/login?project=tky',
systemType: '018'
},
designbxkc: {
whitePage: '/design/login?project=bxkc',
systemType: '011'
},
designcrsc: {
whitePage: '/design/login?project=crsc',
systemType: '011'
},
xty: {
whitePage: '/login?project=xty',
systemType: '013'
},
gzb: {
whitePage: '/login?project=gzb',
systemType: '014'
},
xadt: {
whitePage: '/login?project=xadt',
systemType: '012'
},
jyd: {
whitePage: '/login?project=jyd',
systemType: '017'
},
tky: {
whitePage: '/login?project=tky',
systemType: '018'
},
bxkc: {
whitePage: '/login?project=bxkc',
systemType: '011'
},
crsc: {
whitePage: '/login?project=crsc',
systemType: '011'
},
jsxt: {
whitePage: '/jsxt/login',
systemType: '015'
},
refereeJsxt: {
whitePage: '/refereeJsxt/login',
systemType: '015'
}
designcrsc: '/login?project=crsc',
hls: '/design/login?project=hls',
designhls: '/login?project=hls'
};
// export const PermissionParam = { // 路径权限处理所需参数配置(跳转白名单,路由处理类型)
// heb: {
// whitePage: '/login?project=heb',
// systemType: '019'
// },
// designheb: {
// whitePage: '/design/login?project=heb',
// systemType: '019'
// },
// login: {
// whitePage: '/login',
// systemType: '011'
// },
// design: {
// whitePage: '/design/login',
// systemType: '011'
// },
// designxty: {
// whitePage: '/design/login?project=xty',
// systemType: '013'
// },
// designgzb: {
// whitePage: '/design/login?project=gzb',
// systemType: '014'
// },
// designxadt: {
// whitePage: '/design/login?project=xadt',
// systemType: '012'
// },
// designjyd: {
// whitePage: '/design/login?project=jyd',
// systemType: '017'
// },
// designtky: {
// whitePage: '/design/login?project=tky',
// systemType: '018'
// },
// designbxkc: {
// whitePage: '/design/login?project=bxkc',
// systemType: '011'
// },
// designcrsc: {
// whitePage: '/design/login?project=crsc',
// systemType: '011'
// },
// xty: {
// whitePage: '/login?project=xty',
// systemType: '013'
// },
// gzb: {
// whitePage: '/login?project=gzb',
// systemType: '014'
// },
// xadt: {
// whitePage: '/login?project=xadt',
// systemType: '012'
// },
// jyd: {
// whitePage: '/login?project=jyd',
// systemType: '017'
// },
// tky: {
// whitePage: '/login?project=tky',
// systemType: '018'
// },
// bxkc: {
// whitePage: '/login?project=bxkc',
// systemType: '011'
// },
// crsc: {
// whitePage: '/login?project=crsc',
// systemType: '011'
// },
// jsxt: {
// whitePage: '/jsxt/login',
// systemType: '015'
// },
// refereeJsxt: {
// whitePage: '/refereeJsxt/login',
// systemType: '015'
// }
// };
export const ProjectList = [
{value:'xty', label:'西铁院'},
{value: 'gzb', label: '贵州装备'},

View File

@ -335,6 +335,13 @@ const map = {
return [];
}
},
floodGateList: (state) => {
if (state.map) {
return state.map.floodGateList;
} else {
return [];
}
},
buttonList: (state) => {
if (state.map) {
return state.map.buttonList;

View File

@ -0,0 +1,211 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<operate-property
ref="dataform"
:form="dataForm"
:edit-model="editModel"
:rules="rules"
type="Resource"
@updateMapModel="updateMapModel"
/>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<create-operate
ref="createForm"
:create-form="makeForm"
:add-model="addModel"
:create-rules="rules"
@create="create"
/>
</el-tab-pane>
</el-tabs>
</template>
<script>
import { mapGetters } from 'vuex';
import { getUID } from '@/jmapNew/utils/Uid';
import OperateProperty from './components/operateProperty';
import CreateOperate from './components/createOperate';
import { deepAssign } from '@/utils/index';
export default {
name: 'FloodGate',
components: {
OperateProperty,
CreateOperate
},
props: {
selected: {
type: Object,
default: function () {
return null;
}
}
},
data() {
return {
activeName: 'first',
lazy: true,
mapData: null,
editModel: {
code: '',
width: '',
height: '',
name: '',
position: {
x: 0,
y: 0
}
},
addModel: {
width: 8,
height: 20,
name: '',
position: {
x: 0,
y: 0
}
},
rules: {
width: [
{ required: true, message: '请输入防淹门宽度', trigger: 'blur' }
],
height: [
{ required: true, message: '请输入防淹门高度', trigger: 'blur' }
],
'position.x': [
{ required: true, message: '请输入x坐标', trigger: 'blur' }
],
'position.y': [
{ required: true, message: '请输入y坐标', trigger: 'blur' }
]
}
};
},
computed: {
...mapGetters('map', [
'floodGateList'
]),
dataForm() {
const form = {
labelWidth: '130px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{ prop: 'code', label: `${this.$t('map.floodGate')}${this.$t('map.code')}`, type: 'select', optionLabel: 'code', optionValue: 'code', options: this.resourceList, deviceChange: this.deviceChange },
{ prop: 'width', label: '宽度:', type: 'number', min: 0 },
{ prop: 'height', label: '高度:', type: 'number', min: 0 },
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '120px', children: [
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
] }
]
},
map: {
name: this.$t('map.mapData'),
item: []
}
}
};
return form;
},
makeForm() {
const form = {
labelWidth: '150px',
items:{
all:{
name:'',
item: [
{ prop: 'width', label: '宽度:', type: 'number', min: 0 },
{ prop: 'height', label: '高度:', type: 'number', min: 0 },
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
] }
]
}
}
};
return form;
}
},
mounted() {
},
methods: {
deviceChange(code) {
this.$emit('setCenter', code);
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
},
deviceSelect(selected) {
this.$refs.form && this.$refs.form.resetFields();
this.$refs.make && this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() === 'FloodGate'.toUpperCase()) {
this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected);
}
},
create() {
const uid = getUID('FloodGate', this.floodGateList || []);
const model = {
_type: 'FloodGate',
code: uid,
name: uid,
width: this.addModel.width,
height: this.addModel.height,
position: {
x: this.addModel.position.x,
y: this.addModel.position.y
}
};
this.$emit('updateMapModel', model);
this.$refs.createForm.resetForm();
},
updateMapModel(data) {
this.$emit('updateMapModel', data);
},
deleteObj() {
this.$refs.dataform.deleteObj();
},
//
edit() {
this.$refs.dataform.edit();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.card {
height: 100%;
}
.coordinate {
overflow: hidden;
.title {
text-align: right;
font-size: 14px;
color: #606266;
line-height: 40px;
padding: 0 12px 0 0;
-webkit-box-sizing: border-box;
box-sizing: border-box;
line-height: 28px;
width: 160px;
font-weight: bold;
display: block;
float: left;
}
}
.map-draft-group {
color: #3E44BE;
}
</style>

View File

@ -64,6 +64,7 @@ import ControlLamp from './controlLamp';
import SplitStation from './splitStation';
import Arrow from './arrow';
import SplitScreen from './splitScreen';
import FloodGate from './floodGate';
import { EventBus } from '@/scripts/event-bus';
export default {
@ -91,7 +92,8 @@ export default {
ControlLamp,
SplitStation,
Arrow,
SplitScreen
SplitScreen,
FloodGate
},
props: {
selected: {
@ -129,7 +131,8 @@ export default {
{label:this.$t('map.image'), name:'Resource', menus:ImageControlDraft},
{label:this.$t('map.boundingBox'), name:'CheckBox', menus:CheckboxDraft},
{label:'站间分隔', name:'SplitStation', menus:SplitStation},
{label:'箭头', name:'Arrow', menus:Arrow}
{label:'箭头', name:'Arrow', menus:Arrow},
{label: '防淹门', name: 'FloodGate', menus: FloodGate}
],
selectDevice:'',
enabledTab: 'Section',