iscs调整

This commit is contained in:
fan 2020-06-04 11:17:43 +08:00
parent bf07ea8e0a
commit 5ad0464fcd
9 changed files with 76 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -46,7 +46,17 @@ const stateMap = {
decoderState: { default: true, type: 'Circle', color: '#4CCDE4'}, // 解码器状态 decoderState: { default: true, type: 'Circle', color: '#4CCDE4'}, // 解码器状态
quadDecoderState: { default: true, type: 'Circle', color: '#4CCDE4'}, // 四路解码器状态 quadDecoderState: { default: true, type: 'Circle', color: '#4CCDE4'}, // 四路解码器状态
quadDecoderModeState: { default: '监视器', color: '#4CCDE4'}, // 四路解码器模式状态 quadDecoderModeState: { default: '监视器', color: '#4CCDE4'}, // 四路解码器模式状态
controlKeyboardState: { default: true, type: 'Circle', color: '#4CCDE4'} // 控制键盘状态 controlKeyboardState: { default: true, type: 'Circle', color: '#4CCDE4'}, // 控制键盘状态
coilInPower: { default: '正常', color: '#FF0000'}, // 进线电源
bypassSwitchStatus: { default: '旁路关', color: '#FFF'}, // 旁路开关状态
powerUnderVoltageAlarm: { default: '正常', color: '#FF0000'}, // 电源欠压报警
fanRunningState: { default: '运行', color: '#FFF'}, // 风扇运行状态
generalAlarmSignal: { default: '正常', color: '#FF0000'}, // 总报警信号
batteryCapacity: { default: '100', color: '#FFF', unit: '%', unitColor: '#4CCDE4'}, // 电池容量
chargingTime: { default: '0', color: '#FFF', unit: 'h', unitColor: '#4CCDE4'}, // 充电时间
dischargeTime: { default: '0', color: '#FFF', unit: 'h', unitColor: '#4CCDE4'}, // 放电时间
acOutputVoltage: { default: '220.0', color: '#FFF', unit: 'V', unitColor: '#4CCDE4'}, // 交流输出电压
dcVoltageSignal: { default: '545.0', color: '#FFF', unit: 'V', unitColor: '#4CCDE4'} // 直流电压信号
}; };
export default class StateTable extends Group { export default class StateTable extends Group {
@ -211,6 +221,28 @@ export default class StateTable extends Group {
textLineHeight: model.rowHeight textLineHeight: model.rowHeight
} }
}); });
if (stateMap[item['column' + (j + 1)]] && stateMap[item['column' + (j + 1)]].unit) {
const unitText = new Text({
zlevel: model.zlevel,
z: model.z + 1,
_subType: stateMap[item['column' + (j + 1)]],
style:{
x: elem + width - 5,
y: model.rowHeight * (i + contentIndex),
fontWeight: 'normal',
fontSize: model.fontSize,
fontFamily: 'consolas',
text: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].unit : '',
textFill: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].unitColor : '#4CCDE4',
textAlign: 'right',
textPosition: 'inside',
textVerticalAlign: 'bottom',
textLineHeight: model.rowHeight
}
});
this.grouper.add(unitText);
this.tabelContent.push(unitText);
}
this.grouper.add(text); this.grouper.add(text);
this.tabelContent.push(text); this.tabelContent.push(text);
} }

View File

@ -139,6 +139,14 @@
@deleteDataModel="deleteDataModel" @deleteDataModel="deleteDataModel"
/> />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="状态表" name="StateTable">
<state-table
ref="stateTable"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="按钮" name="IscsButton"> <el-tab-pane label="按钮" name="IscsButton">
<iscs-button <iscs-button
ref="iscsButton" ref="iscsButton"
@ -198,6 +206,7 @@ import LightingGroup from './lightingGroup';
import BalancedElectric from './balancedElectric'; import BalancedElectric from './balancedElectric';
import ElectricButterflyValve from './electricButterflyValve'; import ElectricButterflyValve from './electricButterflyValve';
import Cistern from './cistern'; import Cistern from './cistern';
import StateTable from '../iscsCommonElem/stateTable';
export default { export default {
name: 'IscsOperate', name: 'IscsOperate',
@ -221,7 +230,8 @@ export default {
LightingGroup, LightingGroup,
BalancedElectric, BalancedElectric,
ElectricButterflyValve, ElectricButterflyValve,
Cistern Cistern,
StateTable
}, },
mixins: [ mixins: [
], ],

View File

@ -97,7 +97,7 @@ import IscsRect from '../iscsCommonElem/rect';
import BrakeMachine from '../iscsAfcOperate/brakeMachine'; import BrakeMachine from '../iscsAfcOperate/brakeMachine';
import Staircase from '../iscsOperate/staircase'; import Staircase from '../iscsOperate/staircase';
import SingleStaircase from './singleStaircase'; import SingleStaircase from './singleStaircase';
import StateTable from '../iscsOperate/stateTable'; import StateTable from '../iscsCommonElem/stateTable';
export default { export default {
name: 'IscsOperate', name: 'IscsOperate',
components: { components: {

View File

@ -56,7 +56,7 @@
<el-table-column :key="i" :label="'列'+(i + 1)" :prop="'column'+ (i + 1)"> <el-table-column :key="i" :label="'列'+(i + 1)" :prop="'column'+ (i + 1)">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="i === 0" v-model="addModel.tableData[scope.$index]['column'+ (i + 1)]" size="small" /> <el-input v-if="i === 0" v-model="addModel.tableData[scope.$index]['column'+ (i + 1)]" size="small" />
<el-select v-else v-model="addModel.tableData[scope.$index]['column'+ (i + 1)]" size="small"> <el-select v-else v-model="addModel.tableData[scope.$index]['column'+ (i + 1)]" filterable size="small">
<el-option <el-option
v-for="it in stateList" v-for="it in stateList"
:key="it.value" :key="it.value"
@ -131,7 +131,17 @@ export default {
{label: '解码器状态', value: 'decoderState'}, {label: '解码器状态', value: 'decoderState'},
{label: '四路解码器状态', value: 'quadDecoderState'}, {label: '四路解码器状态', value: 'quadDecoderState'},
{label: '四路解码器模式状态', value: 'quadDecoderModeState'}, {label: '四路解码器模式状态', value: 'quadDecoderModeState'},
{label: '控制键盘状态', value: 'controlKeyboardState'} {label: '控制键盘状态', value: 'controlKeyboardState'},
{label: '进线电源', value: 'coilInPower'},
{label: '旁路开关状态', value: 'bypassSwitchStatus'},
{label: '电源欠压报警', value: 'powerUnderVoltageAlarm'},
{label: '风扇运行状态', value: 'fanRunningState'},
{label: '总报警信号', value: 'generalAlarmSignal'},
{label: '电池容量', value: 'batteryCapacity'},
{label: '充电时间', value: 'chargingTime'},
{label: '放电时间', value: 'dischargeTime'},
{label: '交流输出电压', value: 'acOutputVoltage'},
{label: '直流电压信号', value: 'dcVoltageSignal'}
], ],
rules: { rules: {
width:[{ required: true, message:'请输入设备图形宽度', trigger: 'blur' }], width:[{ required: true, message:'请输入设备图形宽度', trigger: 'blur' }],

View File

@ -142,7 +142,7 @@ import IscsLine from '../iscsCommonElem/line';
import IscsText from '../iscsCommonElem/text'; import IscsText from '../iscsCommonElem/text';
import IscsRect from '../iscsCommonElem/rect'; import IscsRect from '../iscsCommonElem/rect';
import IscsButton from '../iscsCommonElem/button'; import IscsButton from '../iscsCommonElem/button';
import StateTable from './stateTable'; import StateTable from '../iscsCommonElem/stateTable';
export default { export default {
name: 'IscsOperate', name: 'IscsOperate',

View File

@ -18,6 +18,18 @@ export default {
mes: '1111' mes: '1111'
}; };
}, },
watch: {
'$store.state.iscs.selectedCount': function() {
const device = this.$store.state.iscs.selected;
if (device && device._type === 'IscsButton' && device.function === 'GoEPS') {
this.width = 1520;
this.$refs.iscsPlate.show('25');
} else if (device && device._type === 'IscsButton' && device.function === 'GoBack') {
this.width = 1220;
this.$refs.iscsPlate.show('24');
}
}
},
mounted() { mounted() {
this.$refs.iscsPlate.show('24'); this.$refs.iscsPlate.show('24');
}, },

View File

@ -74,6 +74,9 @@ export default {
'$store.state.config.canvasSizeCount': function (val) { '$store.state.config.canvasSizeCount': function (val) {
this.reSize(); this.reSize();
}, },
widthCanvas() {
this.reSize();
},
'$store.state.socket.equipmentStatus': function (val) { '$store.state.socket.equipmentStatus': function (val) {
if (val.length) { if (val.length) {
this.statusMessage(val); this.statusMessage(val);
@ -150,7 +153,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
// this.width = this.$store.state.config.width; // this.width = this.$store.state.config.width;
// this.height = this.$store.state.config.height; // this.height = this.$store.state.config.height;
// this.$iscs && this.$iscs.resize({ width: this.width, height: this.height }); this.$iscs && this.$iscs.resize({ width: this.widthCanvas, height: this.canvasHeight });
}); });
}, },
iscsDestroy() { iscsDestroy() {

View File

@ -24,6 +24,7 @@ export default {
if (device && device._type === 'IscsButton' && device.function === 'PublicArea') { if (device && device._type === 'IscsButton' && device.function === 'PublicArea') {
this.width = 1520; this.width = 1520;
this.$refs.iscsPlate.show('12'); this.$refs.iscsPlate.show('12');
console.log(this.width);
} else if (device && device._type === 'IscsButton' && device.function === 'GoBack') { } else if (device && device._type === 'IscsButton' && device.function === 'GoBack') {
this.width = 1100; this.width = 1100;
this.$refs.iscsPlate.show('14'); this.$refs.iscsPlate.show('14');