调整综合监控故障流程显示

This commit is contained in:
zyy 2020-11-03 18:48:02 +08:00 committed by fan
parent 5bb0dcf0e0
commit b59b3459ee
4 changed files with 69 additions and 19 deletions

View File

@ -135,6 +135,7 @@ export default {
buttonText: '立即创建', buttonText: '立即创建',
showDeleteButton: false, showDeleteButton: false,
field: '', field: '',
groupMode: null,
form: { form: {
classify:'solid', classify:'solid',
code: '', code: '',
@ -230,12 +231,15 @@ export default {
if (this.form.isGradual) { if (this.form.isGradual) {
if (this.form.modelList.length) { if (this.form.modelList.length) {
this.$emit('createDataModel', lineModel); this.$emit('createDataModel', lineModel);
this.groupMode && this.$emit('createDataModel', this.groupMode);
this.initPage(); this.initPage();
} else { } else {
this.$message.error('渐变列表不能为空'); this.$message.error('渐变列表不能为空');
} }
} else { } else {
this.$emit('createDataModel', lineModel); this.$emit('createDataModel', lineModel);
console.log(this.groupMode, '====');
this.groupMode && this.$emit('createDataModel', this.groupMode);
this.initPage(); this.initPage();
} }
} else { } else {
@ -285,9 +289,17 @@ export default {
}, },
addChildElement(model) { addChildElement(model) {
this.form.controlCode = model.code; this.form.controlCode = model.code;
const groupMode = this.$iscs.iscsDevice[model.code].model; this.groupMode = JSON.parse(JSON.stringify(this.$iscs.iscsDevice[model.code].model));
groupMode['lineCode'] = this.form.code; if (typeof this.groupMode['lineCode'] == 'string') {
this.$emit('createDataModel', groupMode); this.groupMode['lineCode'] = [];
}
if (!this.groupMode['lineCode']) {
this.groupMode['lineCode'] = [this.form.code];
} else {
if (!this.groupMode['lineCode'].includes(this.form.code)) {
this.groupMode['lineCode'].push(this.form.code);
}
}
}, },
addModelList() { addModelList() {
const param = { const param = {

View File

@ -152,10 +152,12 @@ export default {
})); }));
if (model.lineCode) { if (model.lineCode) {
// //
model.lineCode.forEach(item => {
arr.push({ arr.push({
code: model.lineCode, code: item,
strokeColor: model.valve ? '#00FF1E' : '#FF0000' strokeColor: model.valve ? '#00FF1E' : '#FF0000'
}); });
});
} }
// //
arr.forEach(el => { arr.forEach(el => {

View File

@ -64,7 +64,8 @@ export default {
], ],
list: { list: {
valve: ['控分', '控合'] valve: ['控分', '控合']
} },
farmed: ''
}; };
}, },
computed: { computed: {
@ -87,6 +88,7 @@ export default {
commit() { commit() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
this.farmed = '';
if (this.formModel.value == 'frame_group') { if (this.formModel.value == 'frame_group') {
this.setMalfunction(); this.setMalfunction();
} else { } else {
@ -155,7 +157,7 @@ export default {
}, time); }, time);
}, },
// //
handleModel(model, judge = false) { handleModel(model, judge = true) {
const arr = []; const arr = [];
model.statusList.forEach(item => { model.statusList.forEach(item => {
if (item.key == 'valve' && item.value == model.valve) { if (item.key == 'valve' && item.value == model.valve) {
@ -177,10 +179,13 @@ export default {
return device.model; return device.model;
})); }));
if (model.lineCode) { if (model.lineCode) {
//
model.lineCode.forEach(item => {
arr.push({ arr.push({
code: model.lineCode, code: item,
strokeColor: model.valve ? '#00FF1E' : '#FF0000' strokeColor: model.valve ? '#00FF1E' : '#FF0000'
}); });
});
} }
// //
arr.forEach(el => { arr.forEach(el => {
@ -199,7 +204,7 @@ export default {
// //
if (judge) { if (judge) {
const params = { const params = {
name: model.name, name: model.name + this.farmed,
times: this.filterTime(), times: this.filterTime(),
station: this.$route.query.stationName, station: this.$route.query.stationName,
key: 'valve', key: 'valve',
@ -243,6 +248,7 @@ export default {
this.$iscs.iscsDevice['group_43'].model['valve'] = true; this.$iscs.iscsDevice['group_43'].model['valve'] = true;
this.$iscs.iscsDevice['group_47'].model['valve'] = true; this.$iscs.iscsDevice['group_47'].model['valve'] = true;
this.$iscs.iscsDevice['group_48'].model['valve'] = true; this.$iscs.iscsDevice['group_48'].model['valve'] = true;
this.farmed = '';
this.handleModel(this.$iscs.iscsDevice['group_11'].model); this.handleModel(this.$iscs.iscsDevice['group_11'].model);
const promise1 = new Promise((resolve) => { const promise1 = new Promise((resolve) => {
@ -305,11 +311,39 @@ export default {
]); ]);
Promise.all([promise1, promise2]).then(() => { Promise.all([promise1, promise2]).then(() => {
this.$message.success('105/106/201/202/211/212/213/214开关因为框架电流保护动作跳闸分位'); this.$message.success('105/106/201/202/211/212/213/214开关因为框架电流保护动作跳闸分位');
const params = { this.handleAlarm();
name: '框架电流保护动作跳闸', });
},
handleAlarm() {
const list = [
{
name: '211断路器',
times: this.filterTime(), times: this.filterTime(),
station: this.$route.query.stationName, station: '象峰站'
key: 'frame' },
{
name: '212断路器',
times: this.filterTime(),
station: '象峰站'
},
{
name: '211断路器',
times: this.filterTime(),
station: '树兜站'
},
{
name: '212断路器',
times: this.filterTime(),
station: '树兜站'
}
];
list.forEach(item => {
const params = {
name: item.name,
times: item.times,
station: item.station,
key: 'valve',
valve: true
}; };
this.$store.dispatch('iscs/setAddAlarmList', params); // this.$store.dispatch('iscs/setAddAlarmList', params); //
this.$store.dispatch('iscs/setAddIncidentList', params); // this.$store.dispatch('iscs/setAddIncidentList', params); //

View File

@ -238,10 +238,12 @@ export default {
})); }));
if (model.lineCode) { if (model.lineCode) {
// //
model.lineCode.forEach(item => {
arr.push({ arr.push({
code: model.lineCode, code: item,
strokeColor: model.valve ? '#00FF1E' : '#FF0000' strokeColor: model.valve ? '#00FF1E' : '#FF0000'
}); });
});
} }
// //
arr.forEach(el => { arr.forEach(el => {