|
@@ -146,8 +146,7 @@ pageManager.prototype._mergeData = function () {
|
|
rectNo: -1,
|
|
rectNo: -1,
|
|
isSubject: true,
|
|
isSubject: true,
|
|
cdelete: 0,
|
|
cdelete: 0,
|
|
- minHeight: -1,
|
|
|
|
- content: null
|
|
|
|
|
|
+ minHeight: -1
|
|
};
|
|
};
|
|
for (let index in data) {
|
|
for (let index in data) {
|
|
item = data[index];
|
|
item = data[index];
|
|
@@ -246,17 +245,19 @@ pageManager.prototype._itemToPage = function (item) {
|
|
item.questions = questionsTemp;
|
|
item.questions = questionsTemp;
|
|
domOption.height = holdHeight;
|
|
domOption.height = holdHeight;
|
|
domOption.questions = cHoldQuestions;
|
|
domOption.questions = cHoldQuestions;
|
|
- if (domOption.questions.length > 0) {
|
|
|
|
- item.height -= domOption.height;
|
|
|
|
- item.height < nextBoxHeight && (item.height = nextBoxHeight);
|
|
|
|
- this.currentPage.addDom(domOption);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
if (item.height > this.minHeight) {
|
|
if (item.height > this.minHeight) {
|
|
domOption.isDrag = false;
|
|
domOption.isDrag = false;
|
|
} else {
|
|
} else {
|
|
domOption.isDrag = true;
|
|
domOption.isDrag = true;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (domOption.questions.length > 0) {
|
|
|
|
+ item.height -= domOption.height;
|
|
|
|
+ item.height < nextBoxHeight && (item.height = nextBoxHeight);
|
|
|
|
+ this.currentPage.addDom(domOption);
|
|
|
|
+ }
|
|
// 如果有最小高度,则说明是刷新状态
|
|
// 如果有最小高度,则说明是刷新状态
|
|
if(item.minHeight) {
|
|
if(item.minHeight) {
|
|
item.minHeight -= domOption.height;
|
|
item.minHeight -= domOption.height;
|
|
@@ -266,10 +267,14 @@ pageManager.prototype._itemToPage = function (item) {
|
|
this.currentPage = null;
|
|
this.currentPage = null;
|
|
if (item.height > this.minHeight) {
|
|
if (item.height > this.minHeight) {
|
|
// 如果有最小高度,则说明是刷新状态
|
|
// 如果有最小高度,则说明是刷新状态
|
|
- if(item.minHeight) {
|
|
|
|
- item.minHeight <= 0 && (item.cdelete = 1);
|
|
|
|
|
|
+ if (item.questions.length < 1) {
|
|
|
|
+ let lastQuestion = JSON.parse(JSON.stringify( domOption.questions[domOption.questions.length - 1] ));
|
|
|
|
+ lastQuestion.minHeight = item.height;
|
|
|
|
+ lastQuestion.isSubQuestion = true;
|
|
|
|
+ item.questions.push(lastQuestion);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ item.minHeight <= 0 ? item.cdelete = 1 : item.cdelete = 0;
|
|
this._itemToPage(item);
|
|
this._itemToPage(item);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -333,10 +338,11 @@ pageManager.prototype._refreshPage = function () {
|
|
questions: doms[j].questions,
|
|
questions: doms[j].questions,
|
|
rectNo: doms[j].rectNo,
|
|
rectNo: doms[j].rectNo,
|
|
minHeight: doms[j].minHeight,
|
|
minHeight: doms[j].minHeight,
|
|
- content: doms[j].content
|
|
|
|
|
|
+ content: doms[j].content,
|
|
|
|
+ cdelete: 0
|
|
};
|
|
};
|
|
if(parseInt(item.rectNo) === nowRectNo) {
|
|
if(parseInt(item.rectNo) === nowRectNo) {
|
|
- data[(length-1)].questions.push.apply(data[(length-1)].questions, item.questions);
|
|
|
|
|
|
+ !item.questions[0].isSubQuestion && data[(length-1)].questions.push.apply(data[(length-1)].questions, item.questions);
|
|
data[(length-1)].height += item.height;
|
|
data[(length-1)].height += item.height;
|
|
} else {
|
|
} else {
|
|
nowRectNo = parseInt(item.rectNo);
|
|
nowRectNo = parseInt(item.rectNo);
|