|
@@ -31,7 +31,8 @@ function getInfomation() {
|
|
|
"type": getUrlArgObject('type'),
|
|
|
"name": getUrlArgObject('name'),
|
|
|
"position": getUrlArgObject('position'),
|
|
|
- "contentTypes": [1, 2, 3]
|
|
|
+ "contentTypes": [1, 2, 3],
|
|
|
+ "mrId": getUrlArgObject('mrId')
|
|
|
};
|
|
|
showName = param.name
|
|
|
$(".tabBox .title").html(showName);
|
|
@@ -113,15 +114,18 @@ function renderContent(list, contentWrapClassName) {
|
|
|
|
|
|
function renderContentscale(list, contentWrapClassName, name) {
|
|
|
var pushInfo = []
|
|
|
- anchors = '<li><i></i><a href="#' + contentWrapClassName +
|
|
|
- '">' + name + '</a></li><li class="anchor-line"></li>';
|
|
|
+ // anchors = '<li><i></i><a href="#' + contentWrapClassName +
|
|
|
+ // '">' + name + '</a></li><li class="anchor-line"></li>';
|
|
|
str = '<p class="scaletitle">' + name + '</p>'
|
|
|
$(`.${contentWrapClassName} .infos .infos-box`).append(str);
|
|
|
- $(`.${contentWrapClassName} .anchors ul`).append(anchors);
|
|
|
+ // $(`.${contentWrapClassName} .anchors ul`).append(anchors);
|
|
|
for (var i = 0; i < list[0].detailList.length; i++) {
|
|
|
var item = list[0].detailList[i];
|
|
|
- console.log(item)
|
|
|
+
|
|
|
if (item.textType == 11) {
|
|
|
+ anchors = '<li><i></i><a href="#' + contentWrapClassName + i +
|
|
|
+ '">' + item.content + '</a></li><li class="anchor-line"></li>';
|
|
|
+
|
|
|
item.content = item.content && item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
|
|
|
str = '<div class="infoBox scaleBox" data-id="' + item.id + '"><div class="title"> <h2 class="titleH2" id="' + contentWrapClassName + i +
|
|
|
'">'
|
|
@@ -129,15 +133,16 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
str += '</h2></div>'
|
|
|
str = `<div class="infoWrapper">${str}</div>`
|
|
|
$(`.${contentWrapClassName} .infos .infos-box`).append(str);
|
|
|
+ $(`.${contentWrapClassName} .anchors ul`).append(anchors);
|
|
|
for (var j = 0; j < item.subList.length; j++) {
|
|
|
var items = item.subList[j];
|
|
|
for (var k = 0; k < items.detailList.length; k++) {
|
|
|
var it = items.detailList[k];
|
|
|
it.content = it.content && it.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
|
|
|
str = '<div class="contentList" data-id="' + it.parentId + '"><div class="item-list">';
|
|
|
- if (it.selectType == 1) {
|
|
|
+ if (it.selectType == 2) {
|
|
|
str += '<p class="item-title">' + it.content + '</p>'
|
|
|
- } else if (it.selectType == 2) {
|
|
|
+ } else if (it.selectType == 1) {
|
|
|
str += '<p class="item-titles">' + it.content + '</p>'
|
|
|
}
|
|
|
|
|
@@ -149,13 +154,13 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
its.content = its.content && its.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
|
|
|
str = '<div class="radio" name="scale' + its.parentId + '" value="' + its.score + '">';
|
|
|
if (it.selectType == 1 && item.resultType == 1) {
|
|
|
- str += '<label><input class="radio_type" type="checkbox" name="scale' + its.parentId + '" value="' + its.score + '"/>'
|
|
|
+ str += '<label><input class="radio_type" type="radio" name="scale' + its.parentId + '" value="' + its.score + '"/>'
|
|
|
} else if (it.selectType == 2 && item.resultType == 1) {
|
|
|
- str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="radio" value="' + its.score + '" />'
|
|
|
+ str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.score + '" />'
|
|
|
} else if (it.selectType == 1 && item.resultType == 2) {
|
|
|
- str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.result + '" data_obj="' + its.result + '"/>'
|
|
|
- } else if (it.selectType == 2 && item.resultType == 2) {
|
|
|
str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="radio" value="' + its.result + '" data_obj="' + its.result + '"/>'
|
|
|
+ } else if (it.selectType == 2 && item.resultType == 2) {
|
|
|
+ str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.result + '" data_obj="' + its.result + '"/>'
|
|
|
}
|
|
|
str += its.content
|
|
|
if (item.resultType == 1) {
|
|
@@ -309,7 +314,7 @@ function getResult(pushInfo) {
|
|
|
for (var i = 0; i < pushInfo.length; i++) {
|
|
|
if (pushInfo[i].content.max >= num >= pushInfo[i].content.min) {
|
|
|
if (tmp) {
|
|
|
- result = pushInfo[i].result + ',' + tmp
|
|
|
+ result = pushInfo[i].result + ';' + tmp
|
|
|
} else {
|
|
|
result = pushInfo[i].result
|
|
|
}
|
|
@@ -331,7 +336,7 @@ function getResult(pushInfo) {
|
|
|
$(".result").css('display', 'block')
|
|
|
$(".foot").css('display', 'block')
|
|
|
} else {
|
|
|
- Toast('温馨提示:必填选项不能为空~', 500)
|
|
|
+ Toast('温馨提示:必填选项不能为空~', 500000)
|
|
|
}
|
|
|
})
|
|
|
|