|
@@ -5,6 +5,7 @@ import api from '../../api/test'
|
|
import editorApi from '../../api/editor'
|
|
import editorApi from '../../api/editor'
|
|
import timeFormat from '../../util/time'
|
|
import timeFormat from '../../util/time'
|
|
import { format } from "util";
|
|
import { format } from "util";
|
|
|
|
+import { json } from "body-parser";
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
HeaderData, HistogramHorizontal, HistogramHorizontals
|
|
HeaderData, HistogramHorizontal, HistogramHorizontals
|
|
@@ -234,7 +235,7 @@ export default {
|
|
}
|
|
}
|
|
children.push({ value: question.questionId, label: question.content, disabled: disabled })
|
|
children.push({ value: question.questionId, label: question.content, disabled: disabled })
|
|
}
|
|
}
|
|
- var element = { value: item._id, label: item.title, children: children, id: item._id };
|
|
|
|
|
|
+ var element = { value: item._id, label: item.title, children: children, id: item._id, houseNameList: item.houseNameList };
|
|
this.options.push(element);
|
|
this.options.push(element);
|
|
this.questionList.push(questionList);
|
|
this.questionList.push(questionList);
|
|
} else {
|
|
} else {
|
|
@@ -324,13 +325,20 @@ export default {
|
|
this.questionChilds.splice(index, 1, []);
|
|
this.questionChilds.splice(index, 1, []);
|
|
},
|
|
},
|
|
handleChangeX(value, index) {
|
|
handleChangeX(value, index) {
|
|
- console.log("handleChangeX", value, index, this.optionsXOldValue);
|
|
|
|
|
|
+ console.log("handleChangeX-0", value, index, this.optionsXOldValue);
|
|
|
|
+
|
|
for (var i = 0; i < this.questionList.length; i++) {
|
|
for (var i = 0; i < this.questionList.length; i++) {
|
|
- if (value[1] == this.questionList[i].questionId) {
|
|
|
|
- if (this.optionsXOldValue.length >= index + 1) {
|
|
|
|
- console.log("XXXXXXXXXXXXX");
|
|
|
|
- this.setOptionsDisabledXY(this.optionsXOldValue[index], false, 0);
|
|
|
|
- this.setOptionsDisabledXY(this.optionsYOldValue[index], false, 1);
|
|
|
|
|
|
+ var questionList = this.questionList[i];
|
|
|
|
+ console.log("handleChangeXOld-1", questionList, value[1]);
|
|
|
|
+ for (var j = 0; j < questionList.length; j++) {
|
|
|
|
+
|
|
|
|
+ if (value[1] == questionList[j].questionId) {
|
|
|
|
+ console.log("handleChangeXOld-2", this.optionsXOldValue.length, index + 1);
|
|
|
|
+ if (this.optionsXOldValue.length >= index + 1) {
|
|
|
|
+ console.log("handleChangeXOld", this.optionsXOldValue[index]);
|
|
|
|
+ this.setOptionsDisabledXY(this.optionsXOldValue[index], false, 0);
|
|
|
|
+ this.setOptionsDisabledXY(this.optionsXOldValue[index], false, 1);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -371,8 +379,9 @@ export default {
|
|
this.getCrossAnalyse();
|
|
this.getCrossAnalyse();
|
|
},
|
|
},
|
|
setOptionsDisabledXY(value, disabled, type = 0) {
|
|
setOptionsDisabledXY(value, disabled, type = 0) {
|
|
|
|
+ if (value === undefined) { return }
|
|
var newOptions = [];
|
|
var newOptions = [];
|
|
- // console.log("setOptionsDisabledXY--0", value, disabled, type);
|
|
|
|
|
|
+ console.log("setOptionsDisabledXY--0", value, disabled, type);
|
|
var options = type == 0 ? this.optionsX : this.optionsY;
|
|
var options = type == 0 ? this.optionsX : this.optionsY;
|
|
for (var i = 0; i < options.length; i++) {
|
|
for (var i = 0; i < options.length; i++) {
|
|
var item = options[i];
|
|
var item = options[i];
|
|
@@ -693,7 +702,7 @@ export default {
|
|
for (var q = 0; q < qqq.length; q++) {
|
|
for (var q = 0; q < qqq.length; q++) {
|
|
sss.push({ name: rowArr[q], title: qqq[q].name, value: qqq[q].value })
|
|
sss.push({ name: rowArr[q], title: qqq[q].name, value: qqq[q].value })
|
|
}
|
|
}
|
|
- this.crossAnalyse.push({ table: sss, data: [], question: null, name: null });
|
|
|
|
|
|
+ this.crossAnalyse.push({ table: sss, data: [], question: null, name: null, subName: "", desc: "" });
|
|
}
|
|
}
|
|
// console.log("SSSSS", this.crossAnalyse);
|
|
// console.log("SSSSS", this.crossAnalyse);
|
|
|
|
|
|
@@ -737,20 +746,29 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
goToPreviewPage() {
|
|
goToPreviewPage() {
|
|
-
|
|
|
|
- this.$router.push({
|
|
|
|
- name: 'previewPage',
|
|
|
|
- params: {
|
|
|
|
- chartData: this.chartData,
|
|
|
|
- answerData: this.answerData,
|
|
|
|
- currentDate: this.currentDate,
|
|
|
|
- options: this.options,
|
|
|
|
- filterStr: this.filterStr,
|
|
|
|
- isShowTable: this.isShowTable,
|
|
|
|
- isCrossAnalyse: this.isCrossAnalyse,
|
|
|
|
- crossAnalyse: this.crossAnalyse
|
|
|
|
- }
|
|
|
|
|
|
+ let params = {
|
|
|
|
+ chartData: this.chartData,
|
|
|
|
+ answerData: this.answerData,
|
|
|
|
+ currentDate: this.currentDate,
|
|
|
|
+ options: this.options,
|
|
|
|
+ filterStr: this.filterStr,
|
|
|
|
+ isShowTable: this.isShowTable,
|
|
|
|
+ isCrossAnalyse: this.isCrossAnalyse,
|
|
|
|
+ crossAnalyse: this.crossAnalyse
|
|
|
|
+ }
|
|
|
|
+ let ed = encodeURIComponent(JSON.stringify(params))
|
|
|
|
+ window.localStorage.setItem('PreviewPagePDF', ed)
|
|
|
|
+ const { href } = this.$router.resolve({
|
|
|
|
+ path: '/previewPage',
|
|
})
|
|
})
|
|
|
|
+ window.open(href, '_blank')
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ analyseInput(value, index) {
|
|
|
|
+ console.log("analyseInput", value, index);
|
|
|
|
+ },
|
|
|
|
+ analyseTextarea(value) {
|
|
|
|
+ console.log("analyseTextarea", value);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|