This commit is contained in:
fan 2020-10-28 11:14:55 +08:00
commit 93e927c39f
2 changed files with 79 additions and 61 deletions

View File

@ -117,20 +117,6 @@ export default {
this.handleModel(modelRelevance);
time = 1500;
}
setTimeout(() => {
let models = {};
// valve true 绿 false
if (model.code == 'group_2' || model.code == 'group_52') {
models = this.$iscs.iscsDevice['group_23'].model;
models['valve'] = false;
} else if (model.code == 'group_3' || model.code == 'group_16') {
models = this.$iscs.iscsDevice['group_15'].model;
models['valve'] = false;
}
if (models && models.code) {
this.handleModel(models);
time = 1500;
}
setTimeout(() => {
if ((model.code == 'group_2' && model['valve']) || (model.code == 'group_52' && model['valve'])) {
const model1 = this.$iscs.iscsDevice['group_9'].model;
@ -145,6 +131,20 @@ export default {
this.handleModel(model2);
this.handleModel(model3);
this.handleModel(model4);
time = 1500;
}
setTimeout(() => {
let models = {};
// valve true 绿 false
if (model.code == 'group_2' || model.code == 'group_52') {
models = this.$iscs.iscsDevice['group_23'].model;
models['valve'] = false;
} else if (model.code == 'group_3' || model.code == 'group_16') {
models = this.$iscs.iscsDevice['group_15'].model;
models['valve'] = false;
}
if (models && models.code) {
this.handleModel(models);
}
}, time);
}, time);

View File

@ -122,9 +122,24 @@ export default {
this.showSublayer = false;
this.rowData[this.rowData.key] = !this.rowData[this.rowData.key];
this.elemList.splice(this.activeIndex, 1, this.rowData);
if (this.model.code == 'group_3' || this.model.code == 'group_16') {
if (this.rowData[this.rowData.key]) {
this.model[this.rowData.key] = this.rowData[this.rowData.key];
this.handleModel(this.model);
this.relevance();
} else {
if (this.$iscs.iscsDevice['group_15'].model['valve']) {
this.model[this.rowData.key] = this.rowData[this.rowData.key];
this.handleModel(this.model);
} else {
console.log('不允许点击');
}
}
} else {
this.model[this.rowData.key] = this.rowData[this.rowData.key];
this.handleModel(this.model);
this.relevance();
}
},
//
relevance() {
@ -141,6 +156,22 @@ export default {
this.handleModel(modelRelevance);
time = 1500;
}
setTimeout(() => {
if ((this.model.code == 'group_2' && this.model['valve']) || (this.model.code == 'group_52' && this.model['valve'])) {
const model1 = this.$iscs.iscsDevice['group_9'].model;
model1['valve'] = this.model['valve'];
const model2 = this.$iscs.iscsDevice['group_21'].model;
model2['valve'] = this.model['valve'];
const model3 = this.$iscs.iscsDevice['group_19'].model;
model3['valve'] = this.model['valve'];
const model4 = this.$iscs.iscsDevice['group_8'].model;
model4['valve'] = this.model['valve'];
this.handleModel(model1);
this.handleModel(model2);
this.handleModel(model3);
this.handleModel(model4);
time = 1500;
}
setTimeout(() => {
let model = {};
// valve true 绿 false
@ -166,20 +197,7 @@ export default {
if (modelRelevance && modelRelevance.code) {
this.handleModel(modelRelevance);
}
if ((this.model.code == 'group_2' && this.model['valve']) || (this.model.code == 'group_52' && this.model['valve'])) {
const model1 = this.$iscs.iscsDevice['group_9'].model;
model1['valve'] = this.model['valve'];
const model2 = this.$iscs.iscsDevice['group_21'].model;
model2['valve'] = this.model['valve'];
const model3 = this.$iscs.iscsDevice['group_19'].model;
model3['valve'] = this.model['valve'];
const model4 = this.$iscs.iscsDevice['group_8'].model;
model4['valve'] = this.model['valve'];
this.handleModel(model1);
this.handleModel(model2);
this.handleModel(model3);
this.handleModel(model4);
}
}, time);
}, time);
}, time);
@ -213,7 +231,7 @@ export default {
device.instance.setState(el);
}
});
const textList = setNum(Object.values(model.elemMap), true);
const textList = setNum(Object.values(model.elemMap), model.valve);
textList.forEach(el => {
const device = this.$iscs.iscsDevice[el.code];
if (device && device.instance) {