Commit a1c92e94 authored by 陈珊's avatar 陈珊

回弹

parent 11b079a6
......@@ -239,6 +239,11 @@
border-top: 0.01rem solid rgba(68, 109, 193, 0.8);
}
.container .content .left-item .bottom-item .info-item .panel-item .panel-info .info-item .item-main .flex-item:hover {
cursor: pointer;
background: rgba(12, 112, 164, 0.8);
}
.container .content .left-item .bottom-item .info-item .panel-item .panel-info .info-item .item-main .flex-item .green {
color: #00FFA2;
}
......
......@@ -208,6 +208,10 @@
background: rgba(22,65,152,0.3);
padding: .13rem;
border-top: .01rem solid rgba(68,109,193,0.8);
&:hover{
cursor: pointer;
background: rgba(12,112,164,0.8);
}
.green{
color: #00FFA2;
}
......
......@@ -58,8 +58,8 @@ var taskList = {
</div>
</div>
<div class="item-main hidden">
${item2.sample_list.map((item3) => {
return (`<div class="flex-item"><p>${item3.sample_name}</p><p class="desc ${item3.test_status == 1 ? 'green' : item3.test_status == 2 ? 'red' : ''}">${item3.test_status_str}</p></div>`); //0未检测 1已检测 2强度不达标
${item2.sample_list.map((item3, index3) => {
return (`<div class="flex-item" onclick="detail.listgetsubRightData('${item.project_id}', '${item3.sample_id}', '${j}','${index3}')"><p>${item3.sample_name}</p><p class="desc ${item3.test_status == 1 ? 'green' : item3.test_status == 2 ? 'red' : ''}">${item3.test_status_str}</p></div>`); //0未检测 1已检测 2强度不达标
}).join('')
}
</div>
......@@ -239,6 +239,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) {
......@@ -255,7 +258,7 @@ var map = {
var detail = {
data: [],
ysjl_list: [],
getData: function (project_id) {
getData: function (project_id, sample_id, index, index2) {
let _this = this;
$.ajax({
url: baseURL_htjc + "GetTaskInfo.ashx",
......@@ -266,7 +269,7 @@ var detail = {
},
success: function (data) {
if (data.data && data.data.length > 0) {
_this.setLeftData(data.data);
_this.setLeftData(data.data, sample_id, index, index2);
} else {
$("#subrwList").html('<div class="noData">暂无数据</div>');
}
......@@ -277,7 +280,7 @@ var detail = {
}
})
},
setLeftData: function (data) {
setLeftData: function (data, sample_id, aindex, aindex2) {
this.data = data;
var str = '';
for (var i = 0; i < data.length; i++) {
......@@ -307,15 +310,21 @@ var detail = {
`;
}
$("#popup-info .left-item").html(str);
if(sample_id){
detail.getsubRightData(sample_id, aindex, aindex2);
sublistClick('subrwInfo-'+aindex);
this.showPopup();
}else{
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">
......@@ -398,7 +407,7 @@ var detail = {
console.log(data);
$("#subrwList .info-item").removeClass("active");
$("#subrwList .flex-item").removeClass("active");
$("#subrwList .info-item:nth-child(" + (index + 1) + ") .flex-item:nth-child(" + (index2 + 1) + ")").addClass("active");
$("#subrwList .info-item:nth-child(" + (Number(index) + 1) + ") .flex-item:nth-child(" + (Number(index2) + 1) + ")").addClass("active");
$("#popup-info .right-item1").addClass("hiddenImportant");
$("#popup-info .right-item2").removeClass("hiddenImportant");
var item = data[0];
......@@ -409,7 +418,7 @@ var detail = {
<div class="info-item">
<div class="desc"><p>设计强度:${item.sjqd}</p><p>强度推定值MPa:${item.tdz} / <span class="${item.test_status == 1 ? 'green' : item.test_status == 2 ? 'red' : ''}">${item.test_status_str}</span></p></div>
<div class="bw-item">
${item.ysjl_list.length > 0 ?
${item.test_status == 1 && item.ysjl_list && item.ysjl_list.length > 0 ?
item.ysjl_list.map((item2, index2) => {
return (`
<div class="item" onmouseover="mouseover(${index2}, event)" onmouseout="mouseout()">${item2.jc_data21}</div>
......@@ -422,6 +431,9 @@ var detail = {
</div>
`);
},
listgetsubRightData: function(project_id, sample_id, index, index2){
detail.getData(project_id, sample_id, index, index2);
},
showPopup: function () {
layer.open({
type: 1,
......
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