Commit 11b079a6 authored by 陈珊's avatar 陈珊

132

parent 718066ee
......@@ -58,7 +58,7 @@ var taskList = {
</div>
<div class="item-main hidden">
${item2.sample_list.map((item3, index3) => {
return (`<div class="flex-item" onclick="detail.listgetsubRightData('${data[i].project_id}', '${item3.sample_id}', '${i}','${index3}')"><p>样品编号:${item3.sample_no}</p><p class="desc ${item3.ysjl_count>0?'blue':'yellow'}">${item3.ysjl_count>0?`<img src="../static/images/icon_gj_mr.png"/>钢筋数:${item3.sample_count}`:'<img src="../static/images/icon_gj_xz.png"/>暂未检测'}</p></div>`);
return (`<div class="flex-item" onclick="detail.listgetsubRightData('${item.project_id}', '${item3.sample_id}', '${j}','${index3}')"><p>样品编号:${item3.sample_no}</p><p class="desc ${item3.ysjl_count>0?'blue':'yellow'}">${item3.ysjl_count>0?`<img src="../static/images/icon_gj_mr.png"/>钢筋数:${item3.sample_count}`:'<img src="../static/images/icon_gj_xz.png"/>暂未检测'}</p></div>`);
}).join('')
}
</div>
......@@ -231,6 +231,9 @@ var map = {
$("#rwList .item-head").click(function () {
var mapx = $(this).attr('data-mapx');
var mapy = $(this).attr('data-mapy');
if(Math.floor(mapx) ==0 && Math.floor(mapy) == 0){
return false;
}
var index = Number($(this).attr('data-index'));
var item = taskList.data[index];
if (mapx && mapy) {
......@@ -269,7 +272,7 @@ var detail = {
}
})
},
setLeftData: function (data, sample_id, index, index2) {
setLeftData: function (data, sample_id, aindex, aindex2) {
this.data = data;
var str = '';
for (var i = 0; i < data.length; i++) {
......@@ -300,17 +303,20 @@ var detail = {
}
$("#popup-info .left-item").html(str);
if(sample_id){
detail.getsubRightData(sample_id, index, index2);
detail.getsubRightData(sample_id, aindex, aindex2);
sublistClick('subrwInfo-'+aindex);
this.showPopup();
}else{
this.setRightData(0, 'subrwInfo-0');
this.showPopup();
}
this.setRightData(0, 'subrwInfo-0');
this.showPopup();
},
setRightData(index, id) {
sublistClick(id);
var item = this.data[index];
$("#subrwList .info-item").removeClass("active");
$("#subrwList .flex-item").removeClass("active");
$("#popup-info .info-item:nth-child(" + (index + 1) + ")").addClass("active");
$("#popup-info .info-item:nth-child(" + (Number(index) + 1) + ")").addClass("active");
$("#popup-info .head").html(`${item.project_no ? '【' + item.project_no + '】' : ''}${item.project_name}`);
$("#popup-info .right-item1").html(`
<div class="main-item1">
......@@ -332,7 +338,7 @@ var detail = {
</div>
`);
}).join('')
: '' }
: '暂无数据' }
</div>
</div>
<div class="main-item">
......@@ -384,7 +390,7 @@ var detail = {
data.data[i].ysjl_list[j].jc_dataArr = [];
var z = 0;
for(var k=1; k<=100; k++){
if(item['jc_data'+k]){
if(item['jc_data'+k] != null && item['jc_data'+k] != undefined){
if(!item.jc_dataArr[z]){
item.jc_dataArr[z] = {value: []};
}
......
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