Commit dc0c9601 authored by zhengke's avatar zhengke

no message

parent a4516c55
......@@ -158,10 +158,8 @@
var newMsg = {
busDetailsList: postMsg
}
postMsg.forEach(x=>{
if(x.SurveyType==2) console.log(x.ScoreNum,'----')
})
$('#submitB').attr('disabled', true)
console.log(newMsg,'-------')
// $('#submitB').attr('disabled', true)
$.ajax({
type: "POST",
url: `${getApiUrl().urlPost}`,
......@@ -278,9 +276,19 @@
}
});
}
function chgStar(num,index){
dataList[index].ScoreNum = num
renderStar()
function chgStar(num,i){
dataList[i].ScoreNum = num
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(){
// return
......
......@@ -141,9 +141,9 @@
item.SurveyOptionsList.forEach(y => {
//单选
if (item.SurveyType == 2) {
if (item.ScoreNum == y.ID) {
y.IsCheck = "1";
}
if (item.ScoreNum == y.ID) {
y.IsCheck = "1";
}
}
//多选
if (item.SurveyType == 3) {
......@@ -155,15 +155,11 @@
})
item.ScoreNum = 0;
}
if(item.SurveyType==2) console.log(item,'-------111')
postMsg.push(item);
})
}
postMsg.forEach(x=>{
if(x.SurveyType==2) console.log(x,'-------')
})
return
$('#submitB').attr('disabled', true)
console.log(postMsg,'-------')
// $('#submitB').attr('disabled', true)
$.ajax({
type: "POST",
url: `${getApiUrl().urlPost}`,
......@@ -280,9 +276,19 @@
}
});
}
function chgStar(num,index){
dataList[index].ScoreNum = num
renderStar()
function chgStar(num,i){
dataList[i].ScoreNum = num
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(){
// 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