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', // 字体颜色
fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top' // 字体垂直对齐
textVerticalAlign: 'top', // 字体垂直对齐
},
lamp: {
count: 4, // 控制模式的个数

View File

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

View File

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

View File

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

View File

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

View File

@ -24,6 +24,7 @@ export default class StationControl extends Group {
}
create() {
debugger;
const model = this.model;
// 紧急站控
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,
y: model.position.y + this.style.StationControl.lamp.offset.y
},
context: model.jjzkContent,
context: this.style.StationControl.text.emergencyControlText,
// model.jjzkContent,
pop: false
});
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,
y: model.position.y + this.style.StationControl.lamp.offset.y
},
context: model.zokContent,
context: this.style.StationControl.text.centerControlText,
// model.zokContent,
pop: false
});
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,
y: model.position.y + this.style.StationControl.lamp.offset.y
},
context: model.zakContent,
context: this.style.StationControl.text.substationControlText,
// model.zakContent
pop: false
});
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,
y: model.position.y + this.style.StationControl.lamp.offset.y
},
context: model.lskContent || '联锁控',
// context: model.lskContent || '联锁控',
context:this.style.StationControl.text.interconnectedControlText || '联锁控',
pop: false
});
this.add(this.interconnectedControl);

View File

@ -8,7 +8,7 @@
</div>
<div class="button_box">
<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-group>
</div>
@ -68,13 +68,13 @@ export default {
x: 0,
y: 0
},
stationCode: '',
zokContent: '',
zakContent: '',
jjzkContent: '',
zbjkContent: '',
zzkContent: '',
lskContent: ''
stationCode: ''
// zokContent: '',
// zakContent: '',
// jjzkContent: '',
// zbjkContent: '',
// zzkContent: '',
// lskContent: ''
},
addModel: {
stationCode: ''
@ -104,21 +104,21 @@ export default {
name: this.$t('map.drawData'),
item: [
{ 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: 'zakContent', label: this.$t('map.zakContent'), type: 'input' },
{ prop: 'jjzkContent', label: this.$t('map.jjzkContent'), type: 'input' },
{ prop: 'zzkContent', label: this.$t('map.zzkContent'), type: 'input' },
{ prop: 'lskContent', label: `${this.$t('map.interconnected')}:`, type: 'input' },
// { prop: 'zokContent', label: this.$t('map.zokContent'), type: 'input' },
// { prop: 'zakContent', label: this.$t('map.zakContent'), type: 'input' },
// { prop: 'jjzkContent', label: this.$t('map.jjzkContent'), type: 'input' },
// { prop: 'zzkContent', label: this.$t('map.zzkContent'), 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.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', 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', change:true, deviceChange:this.updateView }
] }
]
},
map: {
name: this.$t('map.mapData'),
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: [
{ required: true, message: this.$t('rules.stationControlStationCode'), trigger: 'change' }
],
zokContent: [
{ required: true, message: this.$t('rules.stationControlZokContent'), trigger: 'blur' }
],
zakContent: [
{ required: true, message: this.$t('rules.stationControlZakContent'), trigger: 'blur' }
],
jjzkContent: [
{ required: true, message: this.$t('rules.stationControlJjzkContent'), trigger: 'blur' }
],
zzkContent: [
{ required: true, message: this.$t('rules.stationControlZzkContent'), trigger: 'blur' }
],
// zokContent: [
// { required: true, message: this.$t('rules.stationControlZokContent'), trigger: 'blur' }
// ],
// zakContent: [
// { required: true, message: this.$t('rules.stationControlZakContent'), trigger: 'blur' }
// ],
// jjzkContent: [
// { required: true, message: this.$t('rules.stationControlJjzkContent'), trigger: 'blur' }
// ],
// zzkContent: [
// { required: true, message: this.$t('rules.stationControlZzkContent'), trigger: 'blur' }
// ],
'position.x': [
{ required: true, message: this.$t('rules.stationControlPositionX'), trigger: 'blur' }
],
@ -172,6 +172,10 @@ export default {
deviceChange(code) {
this.$emit('setCenter', code);
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
this.edit();
},
updateView() {
this.edit();
},
deviceSelect(selected) {
this.$refs.dataform.resetFields();
@ -190,13 +194,13 @@ export default {
const uid = getUID('StationControl');
const model = {
_type: 'StationControl',
code: uid,
zokContent: '中控',
zbjkContent: '总报警',
zakContent: '站控',
jjzkContent: '紧急站控',
zzkContent: '站中控按钮',
lskContent: '连锁控'
code: uid
// zokContent: '',
// zbjkContent: '',
// zakContent: '',
// jjzkContent: '',
// zzkContent: '',
// lskContent: ''
};
this.stationList.forEach(elem => {
if (elem.code === this.addModel.stationCode) {