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

@ -118,33 +118,33 @@ export default {
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);
if ((model.code == 'group_2' && model['valve']) || (model.code == 'group_52' && model['valve'])) {
const model1 = this.$iscs.iscsDevice['group_9'].model;
model1['valve'] = model['valve'];
const model2 = this.$iscs.iscsDevice['group_21'].model;
model2['valve'] = model['valve'];
const model3 = this.$iscs.iscsDevice['group_19'].model;
model3['valve'] = model['valve'];
const model4 = this.$iscs.iscsDevice['group_8'].model;
model4['valve'] = model['valve'];
this.handleModel(model1);
this.handleModel(model2);
this.handleModel(model3);
this.handleModel(model4);
time = 1500;
}
setTimeout(() => {
if ((model.code == 'group_2' && model['valve']) || (model.code == 'group_52' && model['valve'])) {
const model1 = this.$iscs.iscsDevice['group_9'].model;
model1['valve'] = model['valve'];
const model2 = this.$iscs.iscsDevice['group_21'].model;
model2['valve'] = model['valve'];
const model3 = this.$iscs.iscsDevice['group_19'].model;
model3['valve'] = model['valve'];
const model4 = this.$iscs.iscsDevice['group_8'].model;
model4['valve'] = model['valve'];
this.handleModel(model1);
this.handleModel(model2);
this.handleModel(model3);
this.handleModel(model4);
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);
this.model[this.rowData.key] = this.rowData[this.rowData.key];
this.handleModel(this.model);
this.relevance();
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() {
@ -142,44 +157,47 @@ export default {
time = 1500;
}
setTimeout(() => {
let model = {};
// valve true 绿 false
if (this.model.code == 'group_2' || this.model.code == 'group_52') {
model = this.$iscs.iscsDevice['group_23'].model;
model['valve'] = !(this.$iscs.iscsDevice['group_2'].model['valve'] || this.$iscs.iscsDevice['group_52'].model['valve']);
} else if (this.model.code == 'group_3' || this.model.code == 'group_16') {
model = this.$iscs.iscsDevice['group_15'].model;
model['valve'] = !(this.$iscs.iscsDevice['group_3'].model['valve'] || this.$iscs.iscsDevice['group_16'].model['valve']);
}
if (model && model.code) {
this.handleModel(model);
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(() => {
if (this.model.code == 'group_2' && !this.model['valve']) {
modelRelevance = this.$iscs.iscsDevice['group_34'].model;
modelRelevance['valve'] = this.model['valve'];
} else if (this.model.code == 'group_52' && !this.model['valve']) {
modelRelevance = this.$iscs.iscsDevice['group_22'].model;
modelRelevance['valve'] = this.model['valve'];
let model = {};
// valve true 绿 false
if (this.model.code == 'group_2' || this.model.code == 'group_52') {
model = this.$iscs.iscsDevice['group_23'].model;
model['valve'] = !(this.$iscs.iscsDevice['group_2'].model['valve'] || this.$iscs.iscsDevice['group_52'].model['valve']);
} else if (this.model.code == 'group_3' || this.model.code == 'group_16') {
model = this.$iscs.iscsDevice['group_15'].model;
model['valve'] = !(this.$iscs.iscsDevice['group_3'].model['valve'] || this.$iscs.iscsDevice['group_16'].model['valve']);
}
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);
if (model && model.code) {
this.handleModel(model);
time = 1500;
}
setTimeout(() => {
if (this.model.code == 'group_2' && !this.model['valve']) {
modelRelevance = this.$iscs.iscsDevice['group_34'].model;
modelRelevance['valve'] = this.model['valve'];
} else if (this.model.code == 'group_52' && !this.model['valve']) {
modelRelevance = this.$iscs.iscsDevice['group_22'].model;
modelRelevance['valve'] = this.model['valve'];
}
if (modelRelevance && modelRelevance.code) {
this.handleModel(modelRelevance);
}
}, 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) {