This commit is contained in:
joylink_cuiweidong 2020-10-13 14:42:13 +08:00
commit 6038352d88
20 changed files with 196 additions and 118 deletions

View File

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -42,6 +42,10 @@ import iscsRAFEAFGray from '@/assets/iscs_picture/iscs-RAF-EAF_gray.png';
import iscsSEF from '@/assets/iscs_picture/iscs-SEF.png';
import iscsValue from '@/assets/iscs_picture/iscs-value.png';
import fanCoil from '@/assets/iscs_picture/fanCoil.png';
import iscsSensor from '@/assets/iscs_picture/iscs-sensor.png';
import iscsDangwei from '@/assets/iscs_picture/iscs-dangwei.png';
import iscsDibian from '@/assets/iscs_picture/iscs-dibian.png';
import iscsPt1 from '@/assets/iscs_picture/iscs-pt1.png';
const pictureObj = {
'psdLeft': psdLeft,
@ -83,8 +87,12 @@ const pictureObj = {
iscsRAFEAFGreen,
iscsRAFEAFGray,
iscsSEF,
iscsValue,
fanCoil
iscsValue,
fanCoil,
iscsSensor,
iscsDangwei,
iscsDibian,
iscsPt1
};
export default class Picture extends Group {
constructor(device) {

View File

@ -20,8 +20,8 @@ export default class rect extends Group {
const lineDash = model.type == 'dashed' ? [8, 5] : [0, 0];
this.iscsRect = new Rect({
zlevel: model.zlevel,
z: model.z,
z2: model.z2||0,
z: model.z,
z2: model.z2 || 0,
shape: {
x: 0,
y: 0,
@ -38,6 +38,10 @@ export default class rect extends Group {
this.grouper.add(this.iscsRect);
this.add(this.grouper);
}
setState(model) {
this.iscsRect.setStyle('fill', model.fillColor);
this.iscsRect.setStyle('stroke', model.strokeColor);
}
setModel(dx, dy) {
this.model.point.x += dx;
this.model.point.y += dy;

View File

@ -49,6 +49,10 @@ export default class text extends Group {
this.model.point.x += dx;
this.model.point.y += dy;
}
setState(model) {
this.textName.setStyle('text', model.context);
this.textName.setStyle('textBackgroundColor', model.gbColor);
}
setSize(width, height) {
this.model.width = width;
this.model.height = height;

View File

@ -0,0 +1,6 @@
export default {
Fixed: { lab: 'Fixed', describe: '状态值不做处理,请选择该类型'}, // 固定值
A: { lab: 'a', describe: '文字 远/近 状态转换类型'}, // 远
B: { lab: 'b', describe: '开关阀门矩形 状态转换类型'}, // 红框 阀门
C: { lab: 'c', describe: '电流电压文字转换类型'} // 数组
};

View File

@ -0,0 +1,3 @@
export default {
A: { lab: 'a', describe: '自定义模板类型'} // 远 红框 阀门
};

View File

@ -0,0 +1,41 @@
import elType from './elType';
export default {
[elType.A.lab]: {
defval: 'stateA',
stateMap: {
stateA: {
gbColor: 'rgba(157, 171, 0, 1)',
context: '远'
},
stateB: {
gbColor: 'rgba(157, 171, 0, 1)',
context: '近'
}
}
}, // 远
[elType.B.lab]: {
defval: 'stateA',
stateMap: {
stateA: {
fillColor: 'red',
strokeColor: 'red'
},
stateB: {
fillColor: 'rgba(0, 255, 13, 1)',
strokeColor: 'rgba(0, 255, 13, 1)'
}
}
}, // 红框 阀门
[elType.C.lab]: {
defval: 'stateA',
stateMap: {
stateA: {
context: '8.3'
},
stateB: {
context: '7.6'
}
}
} // 数组
};

View File

@ -0,0 +1,12 @@
import elType from './elType';
import grType from './grType';
export default {
[grType.A.lab]: {
elemList: [
{type: elType.A},
{type: elType.B},
{type: elType.C}
]
}
};

View File

@ -963,7 +963,8 @@ export const asyncRouter = [
},
children: [
{
path:'design',
path:'design',
redirect: '/iscs/design/edit',
component: IscsDesign,
meta: {
i18n: 'router.iscsDraw',
@ -976,26 +977,6 @@ export const asyncRouter = [
hidden: true
}
]
},
{
path: 'system',
component: IscsSystem,
meta: {
i18n: 'router.iscsSystem',
roles: [admin, user]
},
children: [
{
path: 'config/:mode',
component: IscsConfig,
hidden: true
},
{
path: 'stationConfig/:mode',
component: IscsStationConfig,
hidden: true
}
]
}
]
},

View File

@ -924,7 +924,6 @@ export default {
.uploadDemo {
position: relative;
overflow: hidden;
// float: right;
padding: 9px 15px;
margin-right: 3px;
cursor: pointer;

View File

@ -1,22 +1,22 @@
<template>
<div class="app-wrapper">
<map-create ref="mapCreate" :line-code="lineCode" @refresh="refresh1" />
<div class="examList" :style="{width: widthLeft+'px'}">
<demon-list ref="demonList" @createMap="createMap" />
</div>
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
<div class="left-card" :class="{'hide': viewShow}">
<div class="btn_right_box" @click="clickLeftBtn"><i :class="viewShow?'el-icon-arrow-right':'el-icon-arrow-left'" /></div>
<div class="examList" style="width:100%">
<demon-list ref="demonList" @createMap="createMap" />
</div>
</div>
<transition>
<router-view />
</transition>
<context-menu />
<map-create ref="mapCreate" :line-code="lineCode" @refresh="refresh" />
</div>
</template>
<script>
import demonList from './demonList';
import drapLeft from '@/views/components/drapLeft/index';
import { launchFullscreen } from '@/utils/screen';
import localStore from 'storejs';
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
import MapCreate from './mapmanage/create';
import ContextMenu from './contextMenu';
@ -25,14 +25,14 @@ export default {
name: 'DesignPlatform',
components: {
demonList,
drapLeft,
MapCreate,
ContextMenu
},
data() {
return {
widthLeft: Number(localStore.get('LeftWidth')) || 450,
lineCode: ''
lineCode: '',
viewShow: false,
widthLeft: 450
};
},
computed: {
@ -41,9 +41,6 @@ export default {
}
},
watch: {
widthLeft(val) {
this.setMapResize(val);
},
'$store.state.app.windowSizeCount': function() {
this.resize();
}
@ -57,32 +54,27 @@ export default {
launchFullscreen();
setSessionStorage('againEnter', true);
}
this.widthLeft = Number(localStore.get('LeftWidth'));
},
methods: {
refresh() {
this.$refs && this.$refs.demonList && this.$refs.demonList.loadInitData();
},
refresh1() {
this.$refs.demonList.loadInitData();
},
createMap() {
this.$refs.mapCreate.show();
},
drapWidth(width) {
this.widthLeft = Number(width);
},
resize() {
this.widthLeft = Number(localStore.get('LeftWidth')) || this.widthLeft;
const width = this.$store.state.app.width - this.widthLeft;
const width = this.$store.state.app.width;
const height = this.$store.state.app.height - 90;
this.$store.dispatch('config/resize', { width: width, height: height });
},
setMapResize(LeftWidth) {
const width = this.$store.state.app.width - LeftWidth;
const width = this.$store.state.app.width;
const height = this.$store.state.app.height - 90;
this.$store.dispatch('config/resize', { width: width, height: height });
}
},
clickLeftBtn() {
this.viewShow = !this.viewShow;
}
}
};
</script>
@ -97,8 +89,40 @@ export default {
overflow: hidden;
}
.examList {
float: left;
height: 100%;
.left-card{
width: 470px;
height: 100%;
position: absolute;
left: 0;
transform: translateX(-470px);
transition: all 0.5s;
background: #fff;
z-index: 9;
/deep/{
.v-modal{
opacity: 0;
}
}
&.hide{
transform: translateX(0);
}
.examList {
float: left;
height: 100%;
}
.btn_right_box{
position: absolute;
right: 0;
top: 50%;
padding: 8px 3px;
background: #fff;
z-index: 10;
transform: translateX(22px);
cursor: pointer;
border-radius: 0 5px 05px 0;
}
}
</style>

View File

@ -95,8 +95,12 @@ export default {
{ name: '排烟风机(箭头)-灰色', value: 'iscsRAFEAFGray' },
{ name: '排烟风机(箭头)-绿色', value: 'iscsRAFEAFGreen' },
{ name: '排烟风机', value: 'iscsSEF' },
{ name: '阀门', value: 'iscsValue' },
{ name: '风扇机', value: 'fanCoil'}
{ name: '阀门', value: 'iscsValue' },
{ name: '风扇机', value: 'fanCoil'},
{ name: '烟杆传感器', value: 'iscsSensor' },
{ name: '抵挡图', value: 'iscsDangwei' },
{ name: '地变图', value: 'iscsDibian' },
{ name: 'PT1', value: 'iscsPt1' }
],
rules: {

View File

@ -1,7 +1,7 @@
<template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rules="rules" :model="form" label-width="80px" style="width: 100%;padding: 10px 50px;">
<el-form-item label="图层:" prop="z2">
<el-form-item label="图层:" prop="z2">
<el-input-number v-model="form.z2" controls-position="right" :min="0" size="small" />
</el-form-item>
<el-form-item label="宽度:" prop="width">
@ -53,8 +53,8 @@ export default {
buttonText: '立即创建',
showDeleteButton: false,
form: {
code: '',
z2: 1,
code: '',
z2: 1,
fillColor: '',
borderWidth: '',
strokeColor: '',
@ -86,8 +86,8 @@ export default {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.z2 = model.z2||0;
this.form.code = model.code;
this.form.z2 = model.z2 || 0;
this.form.fillColor = model.fillColor;
this.form.borderWidth = model.borderWidth;
this.form.strokeColor = model.strokeColor;
@ -110,8 +110,8 @@ export default {
y: this.form.y
},
code: this.isUpdate ? this.form.code : getUID('IscsRect', this.iscs.iscsRectList),
_type: 'IscsRect',
z2: this.form.z2,
_type: 'IscsRect',
z2: this.form.z2,
fillColor: this.form.fillColor,
borderWidth: this.form.borderWidth,
strokeColor: this.form.strokeColor,

View File

@ -4,8 +4,8 @@
<div class="map-view">
<iscs-plate ref="iscsPlate" @iscsChange="iscsChange" />
</div>
<div class="map-draft" :class="{'hide': draftShow}">
<div class="btn_left_box" @click="clickRightBtn"><i :class="draftShow?'el-icon-arrow-right':'el-icon-arrow-left'" /></div>
<div class="right-card" :class="{'hide': draftShow}">
<div class="btn_draft_box" @click="clickDraftBtn"><i :class="draftShow?'el-icon-arrow-right':'el-icon-arrow-left'" /></div>
<iscs-operate v-if="iscsMode==='fas'" ref="iscsOperate" @iscsChange="iscsChange" @handleSave="handleSave" />
<iscs-bas-operate v-else-if="iscsMode==='bas'" ref="iscsBasOperate" @iscsChange="iscsChange" @handleSave="handleSave" />
<iscs-psd-operate v-else-if="iscsMode==='psd'" ref="iscsPsdOperate" @iscsChange="iscsChange" @handleSave="handleSave" />
@ -21,6 +21,10 @@
<iscs-environment v-else-if="iscsMode=='environment02'" ref="" @iscsChange="iscsChange" @handleSave="handleSave" /> <!-- 环境与设备监控系统 -->
<iscs-psd v-else-if="iscsMode=='psdSystem02'" ref="" @iscsChange="iscsChange" @handleSave="handleSave" /> <!-- 屏蔽门系统 -->
</div>
<div class="right-card" :class="{'hide': tableShow}">
<div class="btn_table_box" @click="clickTableBtn"><i :class="tableShow?'el-icon-arrow-right':'el-icon-arrow-left'" /></div>
///
</div>
</div>
</transition>
</template>
@ -34,7 +38,6 @@ import IscsCctvOperate from './iscsCctvOperate/index';
import IscsAfcOperate from './iscsAfcOperate/index';
import IscsAcsOperate from './iscsAcsOperate/index';
import IscsNetOperate from './IscsNetOperate/index';
import IscsAutomatic from './iscsAutomatic/index';
import IscsCommunication from './iscsCommunication/index';
import IscsFireAlarm from './iscsFireAlarm/index';
@ -42,7 +45,6 @@ import IscsPowerMonitoring from './iscsPowerMonitoring/index';
import IscsSignalSystem from './iscsSignalSystem/index';
import IscsPsd from './iscsPsd/index';
import IscsEnvironment from './iscsEnvironment/index';
import { saveIscsElement } from '@/api/iscs';
export default {
@ -72,7 +74,8 @@ export default {
height: this.$store.state.app.height - 60
},
widthLeft: Number(localStore.get('LeftWidth')) || 450,
draftShow: false
draftShow: false,
tableShow: false
};
},
computed:{
@ -97,9 +100,12 @@ export default {
this.$refs.iscsPlate.show(mode, system, part);
this.$refs.iscsPlate.drawIscsInit();
},
clickRightBtn() {
clickDraftBtn() {
this.draftShow = !this.draftShow;
},
},
clickTableBtn() {
this.tableShow = !this.tableShow;
},
handleSave(data) {
const param = {
graphData: data,
@ -121,7 +127,17 @@ export default {
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.map-draft{
.map-view {
float: left;
width: 100%;
}
.mapPaint{
height: 100%;
overflow: hidden;
}
.right-card{
width: 470px;
height: 100%;
position: absolute;
@ -138,25 +154,29 @@ export default {
&.hide{
transform: translateX(0);
}
}
.map-view {
float: left;
width: 60%;
.btn_draft_box{
position: absolute;
left: 0;
top: 50%;
padding: 8px 3px;
background: #fff;
z-index: 10;
transform: translateX(-22px);
cursor: pointer;
border-radius: 5px 0 0 5px;
}
.btn_table_box {
position: absolute;
left: 0;
top: calc(50% + 50px);
padding: 8px 3px;
background: #fff;
z-index: 10;
transform: translateX(-22px);
cursor: pointer;
border-radius: 5px 0 0 5px;
}
}
.mapPaint{
height: 100%;
overflow: hidden;
}
.btn_left_box{
position: absolute;
left: 0;
top: 50%;
padding: 8px 3px;
background: #fff;
z-index: 10;
transform: translateX(-22px);
cursor: pointer;
border-radius: 5px 0 0 5px;
}
</style>

View File

@ -1,26 +0,0 @@
<template>
<div class="bottom-box">
111
</div>
</template>
<script>
export default {
data() {
return {
mes: '1111'
};
}
};
</script>
<style lang="scss" scoped>
.bottom-box{
width: 100%;
height: 95px;
background-color: #ACACAC;
position: absolute;
bottom: 0;
left: 0;
}
</style>

View File

@ -14,7 +14,6 @@
<router-view />
</div>
</div>
<!-- <bottom /> -->
</div>
</template>
@ -23,7 +22,6 @@ import TopNav from './nav.vue';
import GroupNav from './groupNav.vue';
import StationNav from './stationNav.vue';
import MenuBar from './menuBar.vue';
// import bottom from './bottom.vue';
export default {
components: {
@ -31,7 +29,6 @@ export default {
GroupNav,
MenuBar,
StationNav
// bottom
},
data() {
return {

View File

@ -212,6 +212,7 @@ export default {
startStationCode: this.addModel.startStationCode,
endStationCode: this.addModel.endStationCode,
deviceStationCode: section.stationCode,
right: this.addModel.right,
position: {
x: section.points[0].x,
y: section.points[0].y - this.addModel.height