This commit is contained in:
fan 2021-03-23 17:52:42 +08:00
commit aed6392c88
5 changed files with 21 additions and 4 deletions

View File

@ -36,6 +36,11 @@ export function deviceFactory(type, elem) {
export function parser(data) { export function parser(data) {
var iscsDevice = {}; var iscsDevice = {};
if (data) { if (data) {
Object.values(data).forEach(list => {
if (list instanceof Array) {
list.sort((a, b) => parseInt(a.code.split('_')[1]) - parseInt(b.code.split('_')[1]));
}
})
zrUtil.each(data.manualAlarmButtonList || [], elem => { zrUtil.each(data.manualAlarmButtonList || [], elem => {
iscsDevice[elem.code] = deviceFactory(deviceType.ManualAlarmButton, elem); iscsDevice[elem.code] = deviceFactory(deviceType.ManualAlarmButton, elem);
}, this); }, this);

View File

@ -5,7 +5,7 @@
<el-input-number v-model="form.z2" controls-position="right" :min="0" size="small" /> <el-input-number v-model="form.z2" controls-position="right" :min="0" size="small" />
</el-form-item> </el-form-item>
<el-form-item label="线段宽度:" prop="lineWidth"> <el-form-item label="线段宽度:" prop="lineWidth">
<el-input-number v-model="form.lineWidth" controls-position="right" :min="0" :max="50" size="small" /> <el-input-number v-model="form.lineWidth" controls-position="right" :min="0" :max="1000" size="small" />
</el-form-item> </el-form-item>
<el-form-item label="类型:" prop="type"> <el-form-item label="类型:" prop="type">
<el-select v-model="form.classify" placeholder="请选择类型" size="small"> <el-select v-model="form.classify" placeholder="请选择类型" size="small">

View File

@ -23,7 +23,7 @@ export default {
data() { data() {
return { return {
title:'', title:'',
bacground:'rgba(0,0,0,0)', bacground:'rgba(66,90,116,1)',
loading:false, loading:false,
width:window.innerWidth, width:window.innerWidth,
scaleRate:window.innerWidth / 2200, scaleRate:window.innerWidth / 2200,
@ -78,6 +78,17 @@ export default {
this.title = this.stationName + ' 火灾报警系统 FAS联动'; this.title = this.stationName + ' 火灾报警系统 FAS联动';
this.scaleRate = window.innerWidth / 1920; this.scaleRate = window.innerWidth / 1920;
this.height = 900; this.height = 900;
} else if (this.mode == 'stationHall') {
this.title = '';
params.userInterface = 'stationHallOne';
params.system = 'stationHall';
this.scaleRate = window.innerWidth / 1920;
this.height = 850;
} else if (this.mode == 'platform') {
params.userInterface = 'platformOne';
params.system = 'platform';
this.scaleRate = window.innerWidth / 1920;
this.height = 850;
} }
// if (this.stationId == 'mainHouseOne' || this.stationId == 'mainHouseTwo') { // if (this.stationId == 'mainHouseOne' || this.stationId == 'mainHouseTwo') {
// this.bacground = 'rgba(0,0,0,0)'; // this.bacground = 'rgba(0,0,0,0)';

View File

@ -46,7 +46,7 @@ export default {
return { return {
mode: 'index', mode: 'index',
deviceList: [], deviceList: [],
fasList:['sensing', 'gas', 'section', 'linkage'] fasList:['sensing', 'gas', 'section', 'linkage', 'stationHall', 'platform']
}; };
}, },
computed: { computed: {

View File

@ -180,7 +180,8 @@ export default {
} else if (this.selected._type != 'CheckBox') { } else if (this.selected._type != 'CheckBox') {
this.copyModel = this.copyModelInfo(this.selected, 10); this.copyModel = this.copyModelInfo(this.selected, 10);
const type1 = this.selected._type.charAt(0).toLowerCase() + this.selected._type.slice(1); const type1 = this.selected._type.charAt(0).toLowerCase() + this.selected._type.slice(1);
this.copyModel.code = getUID(this.selected._type, this.iscs[type1 + 'List'] || []); const list = this.iscs[type1 + 'List'] || [];
this.copyModel.code = getUID(this.selected._type, list);
} else { } else {
this.copyModel = {}; this.copyModel = {};
} }