This commit is contained in:
fan 2019-12-02 16:21:40 +08:00
commit 97af268212
7 changed files with 224 additions and 191 deletions

View File

@ -263,7 +263,7 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色 fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐 textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top' // 字体垂直对齐 textVerticalAlign: 'top', // 字体垂直对齐
}, },
lamp: { lamp: {
count: 4, // 控制模式的个数 count: 4, // 控制模式的个数

View File

@ -259,7 +259,13 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 控制模式字体颜色 fontColor: '#ffffff', // 控制模式字体颜色
fontWeight: 'normal', // 控制模式字体粗细 fontWeight: 'normal', // 控制模式字体粗细
textAlign: 'middle', // 控制模式水平对齐 textAlign: 'middle', // 控制模式水平对齐
textVerticalAlign: 'top' // 控制模式垂直对齐 textVerticalAlign: 'top', // 控制模式垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText:'紧急站控', // 紧急站控文字内容
interconnectedControlText:'连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
}, },
lamp: { lamp: {
count: 3, // 控制模式灯个数 count: 3, // 控制模式灯个数

View File

@ -263,7 +263,13 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色 fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐 textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top' // 字体垂直对齐 textVerticalAlign: 'top', // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText:'紧急站控', // 紧急站控文字内容
interconnectedControlText:'连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
}, },
lamp: { lamp: {
count: 4, // 控制模式的个数 count: 4, // 控制模式的个数

View File

@ -260,7 +260,13 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色 fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐 textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top' // 字体垂直对齐 textVerticalAlign: 'top', // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText:'紧急站控', // 紧急站控文字内容
interconnectedControlText:'连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
}, },
lamp: { lamp: {
count: 4, // 控制模式的个数 count: 4, // 控制模式的个数

View File

@ -242,7 +242,13 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色 fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐 textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top' // 字体垂直对齐 textVerticalAlign: 'top', // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText:'紧急站控', // 紧急站控文字内容
interconnectedControlText:'连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
}, },
lamp: { lamp: {
count: 2, // 控制模式灯个数 count: 2, // 控制模式灯个数

View File

@ -24,6 +24,7 @@ export default class StationControl extends Group {
} }
create() { create() {
debugger;
const model = this.model; const model = this.model;
// 紧急站控 // 紧急站控
if (this.style.StationControl.lamp.emergencyControlShow) { if (this.style.StationControl.lamp.emergencyControlShow) {
@ -36,7 +37,8 @@ export default class StationControl extends Group {
x: model.position.x - this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x, x: model.position.x - this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x,
y: model.position.y + this.style.StationControl.lamp.offset.y y: model.position.y + this.style.StationControl.lamp.offset.y
}, },
context: model.jjzkContent, context: this.style.StationControl.text.emergencyControlText,
// model.jjzkContent,
pop: false pop: false
}); });
this.add(this.emergencyControl); this.add(this.emergencyControl);
@ -52,7 +54,8 @@ export default class StationControl extends Group {
x: model.position.x - this.style.StationControl.lamp.distance / 2 + this.style.StationControl.lamp.offset.x, x: model.position.x - this.style.StationControl.lamp.distance / 2 + this.style.StationControl.lamp.offset.x,
y: model.position.y + this.style.StationControl.lamp.offset.y y: model.position.y + this.style.StationControl.lamp.offset.y
}, },
context: model.zokContent, context: this.style.StationControl.text.centerControlText,
// model.zokContent,
pop: false pop: false
}); });
this.add(this.centerControl); this.add(this.centerControl);
@ -68,7 +71,8 @@ export default class StationControl extends Group {
x: model.position.x + this.style.StationControl.lamp.distance / 2 + this.style.StationControl.lamp.offset.x, x: model.position.x + this.style.StationControl.lamp.distance / 2 + this.style.StationControl.lamp.offset.x,
y: model.position.y + this.style.StationControl.lamp.offset.y y: model.position.y + this.style.StationControl.lamp.offset.y
}, },
context: model.zakContent, context: this.style.StationControl.text.substationControlText,
// model.zakContent
pop: false pop: false
}); });
this.add(this.substationControl); this.add(this.substationControl);
@ -84,7 +88,8 @@ export default class StationControl extends Group {
x: model.position.x + this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x, x: model.position.x + this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x,
y: model.position.y + this.style.StationControl.lamp.offset.y y: model.position.y + this.style.StationControl.lamp.offset.y
}, },
context: model.lskContent || '联锁控', // context: model.lskContent || '联锁控',
context:this.style.StationControl.text.interconnectedControlText || '联锁控',
pop: false pop: false
}); });
this.add(this.interconnectedControl); this.add(this.interconnectedControl);

View File

@ -8,7 +8,7 @@
</div> </div>
<div class="button_box"> <div class="button_box">
<el-button-group class="map-draft-group"> <el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button> <!-- <el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button> -->
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button> <el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group> </el-button-group>
</div> </div>
@ -68,13 +68,13 @@ export default {
x: 0, x: 0,
y: 0 y: 0
}, },
stationCode: '', stationCode: ''
zokContent: '', // zokContent: '',
zakContent: '', // zakContent: '',
jjzkContent: '', // jjzkContent: '',
zbjkContent: '', // zbjkContent: '',
zzkContent: '', // zzkContent: '',
lskContent: '' // lskContent: ''
}, },
addModel: { addModel: {
stationCode: '' stationCode: ''
@ -104,21 +104,21 @@ export default {
name: this.$t('map.drawData'), name: this.$t('map.drawData'),
item: [ item: [
{ prop: 'code', label: this.$t('map.stationControlCode'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.stationControlList, change: true, deviceChange: this.deviceChange }, { prop: 'code', label: this.$t('map.stationControlCode'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.stationControlList, change: true, deviceChange: this.deviceChange },
{ prop: 'zokContent', label: this.$t('map.zokContent'), type: 'input' }, // { prop: 'zokContent', label: this.$t('map.zokContent'), type: 'input' },
{ prop: 'zakContent', label: this.$t('map.zakContent'), type: 'input' }, // { prop: 'zakContent', label: this.$t('map.zakContent'), type: 'input' },
{ prop: 'jjzkContent', label: this.$t('map.jjzkContent'), type: 'input' }, // { prop: 'jjzkContent', label: this.$t('map.jjzkContent'), type: 'input' },
{ prop: 'zzkContent', label: this.$t('map.zzkContent'), type: 'input' }, // { prop: 'zzkContent', label: this.$t('map.zzkContent'), type: 'input' },
{ prop: 'lskContent', label: `${this.$t('map.interconnected')}:`, type: 'input' }, // { prop: 'lskContent', label: `${this.$t('map.interconnected')}:`, type: 'input' },
{ prop: 'position', label: this.$t('map.stationControlPosition'), type: 'coordinate', width: '150px', children: [ { prop: 'position', label: this.$t('map.stationControlPosition'), type: 'coordinate', width: '150px', children: [
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px', change:true, deviceChange:this.updateView },
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px', change:true, deviceChange:this.updateView }
] } ] }
] ]
}, },
map: { map: {
name: this.$t('map.mapData'), name: this.$t('map.mapData'),
item: [ item: [
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList } { prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, change: true, deviceChange:this.updateView}
] ]
} }
} }
@ -133,18 +133,18 @@ export default {
stationCode: [ stationCode: [
{ required: true, message: this.$t('rules.stationControlStationCode'), trigger: 'change' } { required: true, message: this.$t('rules.stationControlStationCode'), trigger: 'change' }
], ],
zokContent: [ // zokContent: [
{ required: true, message: this.$t('rules.stationControlZokContent'), trigger: 'blur' } // { required: true, message: this.$t('rules.stationControlZokContent'), trigger: 'blur' }
], // ],
zakContent: [ // zakContent: [
{ required: true, message: this.$t('rules.stationControlZakContent'), trigger: 'blur' } // { required: true, message: this.$t('rules.stationControlZakContent'), trigger: 'blur' }
], // ],
jjzkContent: [ // jjzkContent: [
{ required: true, message: this.$t('rules.stationControlJjzkContent'), trigger: 'blur' } // { required: true, message: this.$t('rules.stationControlJjzkContent'), trigger: 'blur' }
], // ],
zzkContent: [ // zzkContent: [
{ required: true, message: this.$t('rules.stationControlZzkContent'), trigger: 'blur' } // { required: true, message: this.$t('rules.stationControlZzkContent'), trigger: 'blur' }
], // ],
'position.x': [ 'position.x': [
{ required: true, message: this.$t('rules.stationControlPositionX'), trigger: 'blur' } { required: true, message: this.$t('rules.stationControlPositionX'), trigger: 'blur' }
], ],
@ -172,6 +172,10 @@ export default {
deviceChange(code) { deviceChange(code) {
this.$emit('setCenter', code); this.$emit('setCenter', code);
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code)); this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
this.edit();
},
updateView() {
this.edit();
}, },
deviceSelect(selected) { deviceSelect(selected) {
this.$refs.dataform.resetFields(); this.$refs.dataform.resetFields();
@ -190,13 +194,13 @@ export default {
const uid = getUID('StationControl'); const uid = getUID('StationControl');
const model = { const model = {
_type: 'StationControl', _type: 'StationControl',
code: uid, code: uid
zokContent: '中控', // zokContent: '',
zbjkContent: '总报警', // zbjkContent: '',
zakContent: '站控', // zakContent: '',
jjzkContent: '紧急站控', // jjzkContent: '',
zzkContent: '站中控按钮', // zzkContent: '',
lskContent: '连锁控' // lskContent: ''
}; };
this.stationList.forEach(elem => { this.stationList.forEach(elem => {
if (elem.code === this.addModel.stationCode) { if (elem.code === this.addModel.stationCode) {