Commit dc0c9601 authored by zhengke's avatar zhengke

no message

parent a4516c55
...@@ -158,10 +158,8 @@ ...@@ -158,10 +158,8 @@
var newMsg = { var newMsg = {
busDetailsList: postMsg busDetailsList: postMsg
} }
postMsg.forEach(x=>{ console.log(newMsg,'-------')
if(x.SurveyType==2) console.log(x.ScoreNum,'----') // $('#submitB').attr('disabled', true)
})
$('#submitB').attr('disabled', true)
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: `${getApiUrl().urlPost}`, url: `${getApiUrl().urlPost}`,
...@@ -278,9 +276,19 @@ ...@@ -278,9 +276,19 @@
} }
}); });
} }
function chgStar(num,index){ function chgStar(num,i){
dataList[index].ScoreNum = num dataList[i].ScoreNum = num
renderStar() var item = dataList[i]
$(`#star${i+1}`).html(`<img id="star_1id_${i+1}point" onmouseover="chgStar(1,${i})"
src="${item.ScoreNum>=1?STAR_IMG[0]:STAR_IMG[1]}"></img>
<img id="star_2id_${i+1}point" onmouseover="chgStar(2,${i})"
src="${item.ScoreNum>=2?STAR_IMG[0]:STAR_IMG[1]}"></img>
<img id="star_3id_${i+1}point" onmouseover="chgStar(3,${i})"
src="${item.ScoreNum>=3?STAR_IMG[0]:STAR_IMG[1]}"></img>
<img id="star_4id_${i+1}point" onmouseover="chgStar(4,${i})"
src="${item.ScoreNum>=4?STAR_IMG[0]:STAR_IMG[1]}"></img>
<img id="star_5id_${i+1}point" onmouseover="chgStar(5,${i})"
src="${item.ScoreNum>=5?STAR_IMG[0]:STAR_IMG[1]}"></img>`)
} }
function renderStar(){ function renderStar(){
// return // return
......
...@@ -141,9 +141,9 @@ ...@@ -141,9 +141,9 @@
item.SurveyOptionsList.forEach(y => { item.SurveyOptionsList.forEach(y => {
//单选 //单选
if (item.SurveyType == 2) { if (item.SurveyType == 2) {
if (item.ScoreNum == y.ID) { if (item.ScoreNum == y.ID) {
y.IsCheck = "1"; y.IsCheck = "1";
} }
} }
//多选 //多选
if (item.SurveyType == 3) { if (item.SurveyType == 3) {
...@@ -155,15 +155,11 @@ ...@@ -155,15 +155,11 @@
}) })
item.ScoreNum = 0; item.ScoreNum = 0;
} }
if(item.SurveyType==2) console.log(item,'-------111')
postMsg.push(item); postMsg.push(item);
}) })
} }
postMsg.forEach(x=>{ console.log(postMsg,'-------')
if(x.SurveyType==2) console.log(x,'-------') // $('#submitB').attr('disabled', true)
})
return
$('#submitB').attr('disabled', true)
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: `${getApiUrl().urlPost}`, url: `${getApiUrl().urlPost}`,
...@@ -280,9 +276,19 @@ ...@@ -280,9 +276,19 @@
} }
}); });
} }
function chgStar(num,index){ function chgStar(num,i){
dataList[index].ScoreNum = num dataList[i].ScoreNum = num
renderStar() var item = dataList[i]
$(`#star${i+1}`).html(`<img id="star_1id_${i+1}point" onmouseover="chgStar(1,${i})"
src="${item.ScoreNum>=1?STAR_IMG[0]:STAR_IMG[1]}"></img>
<img id="star_2id_${i+1}point" onmouseover="chgStar(2,${i})"
src="${item.ScoreNum>=2?STAR_IMG[0]:STAR_IMG[1]}"></img>
<img id="star_3id_${i+1}point" onmouseover="chgStar(3,${i})"
src="${item.ScoreNum>=3?STAR_IMG[0]:STAR_IMG[1]}"></img>
<img id="star_4id_${i+1}point" onmouseover="chgStar(4,${i})"
src="${item.ScoreNum>=4?STAR_IMG[0]:STAR_IMG[1]}"></img>
<img id="star_5id_${i+1}point" onmouseover="chgStar(5,${i})"
src="${item.ScoreNum>=5?STAR_IMG[0]:STAR_IMG[1]}"></img>`)
} }
function renderStar(){ function renderStar(){
// return // return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment