|
@@ -192,7 +192,7 @@ export default {
|
|
|
}
|
|
|
var element = { value: item._id, label: item.title, children: children, id: item._id };
|
|
|
this.options.push(element);
|
|
|
- this.questionList = questionList;
|
|
|
+ this.questionList.push(questionList);
|
|
|
// 查询数据包列表
|
|
|
this.getCondition();
|
|
|
} else {
|
|
@@ -243,12 +243,15 @@ export default {
|
|
|
handleChange(value, index) {
|
|
|
console.log(value, index, this.oldValue);
|
|
|
for (var i = 0; i < this.questionList.length; i++) {
|
|
|
- if (value[1] == this.questionList[i].questionId) {
|
|
|
- if (this.oldValue.length >= index + 1) {
|
|
|
- console.log("XXXXXXXXXXXXX");
|
|
|
- this.setOptionsDisabled(this.oldValue[index], false);
|
|
|
+ var questionList = this.questionList[i]
|
|
|
+ for (var j = 0; j < questionList.length; j++) {
|
|
|
+ if (value[1] == questionList[j].questionId) {
|
|
|
+ if (this.oldValue.length >= index + 1) {
|
|
|
+ console.log("XXXXXXXXXXXXX");
|
|
|
+ this.setOptionsDisabled(this.oldValue[index], false);
|
|
|
+ }
|
|
|
+ this.questionListSel[index] = questionList[j];
|
|
|
}
|
|
|
- this.questionListSel[index] = this.questionList[i];
|
|
|
}
|
|
|
}
|
|
|
this.setOptionsDisabled(value, true);
|
|
@@ -283,13 +286,15 @@ export default {
|
|
|
handleChangeY(value, index) {
|
|
|
console.log("handleChangeX", value, index, this.optionsYOldValue);
|
|
|
for (var i = 0; i < this.questionList.length; i++) {
|
|
|
- if (value[1] == this.questionList[i].questionId) {
|
|
|
- if (this.optionsYOldValue.length >= index + 1) {
|
|
|
- console.log("XXXXXXXXXXXXX");
|
|
|
- this.setOptionsDisabledXY(this.optionsYOldValue[index], false, 1);
|
|
|
- this.setOptionsDisabledXY(this.optionsYOldValue[index], false, 0);
|
|
|
+ var questionList = this.questionList[i];
|
|
|
+ for (var j = 0; j < questionList.length; j++) {
|
|
|
+ if (value[1] == questionList[j].questionId) {
|
|
|
+ if (this.optionsYOldValue.length >= index + 1) {
|
|
|
+ this.setOptionsDisabledXY(this.optionsYOldValue[index], false, 1);
|
|
|
+ this.setOptionsDisabledXY(this.optionsYOldValue[index], false, 0);
|
|
|
+ }
|
|
|
+ // this.questionListSel[index] = this.questionList[i];
|
|
|
}
|
|
|
- // this.questionListSel[index] = this.questionList[i];
|
|
|
}
|
|
|
}
|
|
|
this.setOptionsDisabledXY(value, true, 1);
|
|
@@ -549,16 +554,18 @@ export default {
|
|
|
var ylist = [];
|
|
|
for (var i = 0; i < this.questionList.length; i++) {
|
|
|
var item = this.questionList[i];
|
|
|
- for (var m = 0; m < this.optionsXValue.length; m++) {
|
|
|
- var element = this.optionsXValue[m];
|
|
|
- if (item.questionId == element[1]) {
|
|
|
- xlist.push(item);
|
|
|
+ for (var j = 0; j < item.length; j++) {
|
|
|
+ for (var m = 0; m < this.optionsXValue.length; m++) {
|
|
|
+ var element = this.optionsXValue[m];
|
|
|
+ if (item[j].questionId == element[1]) {
|
|
|
+ xlist.push(item[j]);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- for (var n = 0; n < this.optionsYValue.length; n++) {
|
|
|
- var element = this.optionsYValue[n];
|
|
|
- if (item.questionId == element[1]) {
|
|
|
- ylist.push(item);
|
|
|
+ for (var n = 0; n < this.optionsYValue.length; n++) {
|
|
|
+ var element = this.optionsYValue[n];
|
|
|
+ if (item[j].questionId == element[1]) {
|
|
|
+ ylist.push(item[j]);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -613,10 +620,13 @@ export default {
|
|
|
console.log("one", top[y].name)
|
|
|
for (var z = 0; z < one.length; z++) {
|
|
|
var two = one[z];
|
|
|
- data.push({ time: top[y].name, type: top[y].title[z], value: two })
|
|
|
+ if (top[y].title[z] != "total") {
|
|
|
+ data.push({ time: top[y].name, type: top[y].title[z], value: two })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
this.crossAnalyse[x].data = data;
|
|
|
+ this.crossAnalyse[x].question = data;
|
|
|
}
|
|
|
console.log("data", this.crossAnalyse);
|
|
|
|