Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
桩
桩基检测
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张牧越
桩基检测
Commits
f342d035
Commit
f342d035
authored
Dec 19, 2023
by
马奔奔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature: 调整工程回弹数据详情
parent
ff71e8ed
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
307 additions
and
35 deletions
+307
-35
htjc.html
pages/htjc.html
+30
-2
htjc.css
static/css/dist/htjc.css
+122
-6
icon-change.png
static/images/icon-change.png
+0
-0
htjc.js
static/js/htjc.js
+155
-27
No files found.
pages/htjc.html
View file @
f342d035
...
...
@@ -92,15 +92,43 @@
<div
id=
"popup-info"
class=
"popup-info hidden"
>
<div
class=
"head"
></div>
<div
class=
"main"
>
<div
class=
"tab"
>
</div>
<div
class=
"main data-detail-main"
>
<div
class=
"left-item"
id=
"subrwList"
>
<div
class=
"noData"
>
暂无数据
</div>
</div>
<div
class=
"right-item right-item1"
></div>
<div
class=
"right-item right-item2 hiddenImportant"
></div>
</div>
<div
class=
"hoverInfo hidden"
id=
"hoverInfo"
></div>
<div
id=
"test-location-main"
class=
"test-location-main hidden"
></div>
<div
class=
"hoverInfo hidden"
id=
"hoverInfo"
onmouseover=
"detail.hoverInfoMouseover()"
onmouseout=
"detail.hoverInfoMouseout()"
></div>
</div>
<div
id=
"popup-info-change-list"
class=
"popup-info hidden"
>
<div
class=
"content"
>
<div
class=
"table"
>
<table
cellspacing=
"0"
>
<thead
class=
"table-head"
>
<tr>
<th
width=
"25%"
>
修改人员
</th>
<th
width=
"25%"
>
修改时间
</th>
<th
width=
"25%"
>
修改前
</th>
<th
width=
"25%"
>
修改后
</th>
</tr>
</thead>
<tbody
class=
"table-body"
>
</tbody>
</table>
</div>
</div>
</div>
<div
class=
"swiper hidden"
id=
"swiper"
>
<div
class=
"mask"
onclick=
"detail.swiperHide()"
></div>
<div
class=
"main"
>
...
...
static/css/dist/htjc.css
View file @
f342d035
...
...
@@ -318,7 +318,7 @@
}
.popup-info
.head
{
height
:
.
7
rem
;
height
:
.
5
rem
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
...
...
@@ -326,9 +326,45 @@
font-size
:
.18rem
;
}
.popup-info
.tab
{
width
:
100%
;
background
:
#113883
;
padding
:
0.15rem
0.5rem
;
margin-bottom
:
0.05rem
;
}
.popup-info
.tab
.tabBox
{
display
:
flex
;
align-items
:
center
;
color
:
#FFFFFF
;
}
.popup-info
.tab
.tabBox
>
div
{
margin-right
:
0.68rem
;
cursor
:
pointer
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.popup-info
.tab
.tabBox
>
div
.actived
{
color
:
#00FFFF
;
}
.popup-info
.tab
.tabBox
.actived
::after
{
display
:
block
;
content
:
''
;
width
:
0.55rem
;
height
:
0.02rem
;
background
:
#00FFFF
;
position
:
relative
;
top
:
0.15rem
;
}
.popup-info
.main
{
display
:
flex
;
height
:
calc
(
100%
-
.7rem
);
height
:
calc
(
100%
-
.
9
7rem
);
}
.popup-info
.main
.left-item
{
...
...
@@ -702,10 +738,7 @@
.popup-info
.main
.right-item
.info-item
.bw-item
.item
{
position
:
relative
;
background
:
#0D3177
;
border
:
.01rem
solid
#90A1B1
;
font-size
:
.18rem
;
color
:
#C0D3E6
;
height
:
.8rem
;
width
:
calc
(
25%
-
.2rem
);
margin
:
.2rem
.1rem
0
;
...
...
@@ -716,7 +749,28 @@
cursor
:
pointer
;
}
.popup-info
.main
.right-item
.info-item
.bw-item
.item
:hover
{
.popup-info
.main
.right-item
.info-item
.bw-item
.item
.icon-change
{
width
:
63px
;
height
:
46px
;
position
:
absolute
;
right
:
0
;
top
:
0
;
}
.popup-info
.main
.right-item
.info-item
.bw-item
.common
{
background
:
#0D3177
;
border
:
.01rem
solid
#90A1B1
;
color
:
#C0D3E6
;
}
.popup-info
.main
.right-item
.info-item
.bw-item
.fail
{
background
:
rgba
(
147
,
24
,
24
,
.5
);
border
:
.01rem
solid
#931818
;
color
:
#E7555C
;
}
.popup-info
.main
.right-item
.info-item
.bw-item
.common
:hover
{
background
:
rgba
(
42
,
210
,
255
,
0.2
);
border
:
.02rem
solid
#2AD2FF
;
color
:
#2AD2FF
;
...
...
@@ -771,6 +825,68 @@
margin-bottom
:
.1rem
;
}
.popup-info
.hoverInfo
.modification
{
border
:
.01rem
solid
#A76619
;
color
:
#D99749
;
cursor
:
pointer
;
}
#popup-info-change-list
.content
{
box-sizing
:
border-box
;
padding
:
20px
;
font-size
:
18px
;
height
:
calc
(
100%
-
.44rem
);
}
#popup-info-change-list
.content
.table
{
height
:
100%
;
overflow
:
auto
;
}
#popup-info-change-list
.content
.table
::-webkit-scrollbar
{
width
:
10px
;
height
:
10px
;
}
#popup-info-change-list
.content
.table
::-webkit-scrollbar-thumb
{
background
:
rgba
(
0
,
0
,
0
,
0.4
);
border-radius
:
8px
;
}
#popup-info-change-list
.content
.table
::-webkit-scrollbar-track
{
background
:
rgba
(
42
,
93
,
197
,
0.3
);
border-radius
:
8px
;
}
#popup-info-change-list
.content
.table-head
{
height
:
50px
;
color
:
#fff
;
background
:
rgb
(
17
,
56
,
131
);
position
:
sticky
;
top
:
0
;
}
#popup-info-change-list
.content
.table-body
tr
{
height
:
50px
;
color
:
#fff
;
}
#popup-info-change-list
.content
.table-body
tr
:nth-child
(
odd
)
{
background
:
rgba
(
17
,
56
,
131
,
.5
);
}
#popup-info-change-list
.content
.table-body
tr
:nth-child
(
even
)
{
background
:
rgba
(
17
,
56
,
131
,
.7
);
}
#popup-info-change-list
.content
.table-body
td
{
text-align
:
center
;
}
.layui-layer-content
{
height
:
calc
(
100%
-
42px
)
!important
;
}
...
...
static/images/icon-change.png
0 → 100644
View file @
f342d035
31.9 KB
static/js/htjc.js
View file @
f342d035
...
...
@@ -12,7 +12,7 @@ var taskList = {
dataType
:
"json"
,
data
:
{
keywords
:
$
(
"#rw-keywords"
).
val
(),
date
:
$
(
"#rw-date"
).
val
(),
date
:
$
(
"#rw-date"
).
val
(),
page
:
1
,
limit
:
100
},
...
...
@@ -121,7 +121,7 @@ var testCount = {
})
},
setData: function (data) {
console.log(data)
$("#zjgc").html(data[0].today_project_count);
$("#ycgc").html(data[0].today_abnormal_project_count);
$("#yjbw").html(data[0].today_test_count);
...
...
@@ -138,7 +138,7 @@ var map = {
};
var district = new AMap.DistrictSearch(options);
district.search($("#province").html(), function (status, result) {
//district.search('河南省', function (status, result) {
//district.search('河南省', function (status, result) {
var bounds = result.districtList[0]['boundaries'];
var mask = [];
for (var i = 0; i < bounds.length; i++) {
...
...
@@ -167,8 +167,8 @@ var map = {
}
//行政区查询
district.setLevel('district')
district.search($("#area").html(), function(status, result) {
//district.search('濮阳市', function (status, result) {
district.search($("#area").html(), function
(status, result) {
//district.search('濮阳市', function (status, result) {
map.remove(polygons)//清除上次结果
polygons = [];
var bounds = result.districtList[0].boundaries;
...
...
@@ -243,7 +243,7 @@ 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
)
{
if
(
Math
.
floor
(
mapx
)
==
0
&&
Math
.
floor
(
mapy
)
==
0
)
{
return
false
;
}
var
index
=
Number
(
$
(
this
).
attr
(
'data-index'
));
...
...
@@ -292,19 +292,25 @@ var detail = {
project_id
:
''
,
data
:
[],
ysjl_list
:
[],
sample_id
:
''
,
selectedTab
:
'detail'
,
// detail=>数据详情 location=>检测定位
getData
:
function
(
project_id
,
sample_id
,
index
,
index2
)
{
let
_this
=
this
;
_this
.
project_id
=
project_id
;
_this
.
sample_id
=
sample_id
;
$
.
ajax
({
url
:
baseURL_htjc
+
"GetTaskInfo.ashx"
,
type
:
"post"
,
dataType
:
"json"
,
data
:
{
project_id
project_id
,
date
:
$
(
"#rw-date"
).
val
(),
},
success
:
function
(
data
)
{
console
.
log
(
data
,
'getData'
);
if
(
data
.
data
&&
data
.
data
.
length
>
0
)
{
_this
.
setLeftData
(
data
.
data
,
sample_id
,
index
,
index2
);
_this
.
setTab
();
}
else
{
$
(
"#subrwList"
).
html
(
'<div class="noData">暂无数据</div>'
);
}
...
...
@@ -314,6 +320,31 @@ var detail = {
console
.
log
(
"发生错误:"
+
jqXHR
.
status
);
}
})
},
setTab
(){
let
str
=
(
`
<div class="tabBox">
<div class="data-detail
${
this
.
selectedTab
===
'detail'
?
'actived'
:
''
}
" onclick="detail.changeTab('data-detail')" >数据详情</div>
<div class="test-location
${
this
.
selectedTab
===
'location'
?
'actived'
:
''
}
" onclick="detail.changeTab('test-location')" >检测定位</div>
</div
`
)
$
(
"#popup-info .tab"
).
html
(
str
);
},
changeTab
(
val
){
console
.
log
(
val
);
this
.
selectedTab
=
val
$
(
'.tabBox'
).
children
().
removeClass
(
'actived'
)
$
(
`.tabBox .
${
val
}
`
).
addClass
(
'actived'
)
$
(
`#popup-info .data-detail-main`
).
addClass
(
'hiddenImportant'
)
$
(
`#popup-info .test-location-main`
).
addClass
(
'hiddenImportant'
)
$
(
`#popup-info .
${
val
}
-main`
).
removeClass
(
'hiddenImportant'
)
},
setLeftData
:
function
(
data
,
sample_id
,
aindex
,
aindex2
)
{
this
.
data
=
data
;
...
...
@@ -345,17 +376,20 @@ var detail = {
`;
}
$("#popup-info .left-item").html(str);
if
(sample_id)
{
if
(sample_id)
{
detail.getsubRightData(sample_id, aindex, aindex2);
sublistClick('subrwInfo-'+aindex);
sublistClick('subrwInfo-' + aindex);
let item = this.data[0];
$("#popup-info .head").html(`
$
{
item
.
project_no
?
'【'
+
item
.
project_no
+
'】'
:
''
}${
item
.
project_name
}
`
);
this
.
showPopup
();
}
else
{
}
else
{
this
.
setRightData
(
0
,
'subrwInfo-0'
);
this
.
showPopup
();
}
},
setRightData
(
index
,
id
)
{
sublistClick
(
id
);
console
.
log
(
this
.
data
,
'this.data'
);
var
item
=
this
.
data
[
index
];
$
(
"#subrwList .info-item"
).
removeClass
(
"active"
);
$
(
"#subrwList .flex-item"
).
removeClass
(
"active"
);
...
...
@@ -368,7 +402,7 @@ var detail = {
${
item
.
report_file
&&
`<div class="flex-item"><div class="value">回弹文件:<a href="
${
item
.
report_file
}
" style="color:#C0D3E6">点击查看</a></div></div>`
}
<div class="flex-item flex-item2 over-flex">
${
item
.
faceimg_list
&&
item
.
faceimg_list
.
length
>
0
?
item
.
faceimg_list
.
map
((
item2
)
=>
{
${
item
.
faceimg_list
&&
item
.
faceimg_list
.
length
>
0
?
item
.
faceimg_list
.
map
((
item2
)
=>
{
return
(
`
<div class="box">
<div class="img">
...
...
@@ -381,7 +415,7 @@ var detail = {
</div>
`
);
}).
join
(
''
)
:
''
}
:
''
}
<
/div>
<
/div>
<
div
class
=
"main-item"
>
...
...
@@ -438,8 +472,8 @@ var detail = {
})
},
setsubRightData
(
index
,
index2
,
data
)
{
console
.
log
(
index
,
index2
);
console
.
log
(
data
);
console
.
log
(
data
,
'data'
);
$
(
"#subrwList .info-item"
).
removeClass
(
"active"
);
$
(
"#subrwList .flex-item"
).
removeClass
(
"active"
);
$
(
"#subrwList .info-item:nth-child("
+
(
Number
(
index
)
+
1
)
+
") .flex-item:nth-child("
+
(
Number
(
index2
)
+
1
)
+
")"
).
addClass
(
"active"
);
...
...
@@ -456,7 +490,9 @@ var detail = {
${
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>
<div class="item
${
item2
.
test_status
==
'1'
?
'common'
:
'fail'
}
" onmouseover="mouseover(
${
index2
}
, event)" onmouseout="mouseout()">
${
item2
.
jc_data21
}
${
item2
.
is_change
>
0
?
'<img class="icon-change" src="../static/images/icon-change.png" />'
:
''
}
</div>
`
);
}).
join
(
''
)
:
'<div class="noData">暂无数据</div>'
...
...
@@ -466,7 +502,7 @@ var detail = {
</div>
`);
},
listgetsubRightData: function
(project_id, sample_id, index, index2)
{
listgetsubRightData: function
(project_id, sample_id, index, index2)
{
detail.getData(project_id, sample_id, index, index2);
},
showPopup: function () {
...
...
@@ -481,6 +517,76 @@ var detail = {
$("#popup-info").css('
display
', '
none
');
}
});
},
showPopupChangeList: function (sample_id, jc_data26, group_no, index, val) {
$("#popup-info-change-list .content .table .table-body").html('');
$.ajax({
url: baseURL_htjc + `GetChangeList.ashx?sample_id=${sample_id}&jc_data26=${jc_data26}&group_no=${group_no}&index=${index}`,
type: "get",
dataType: "json",
success: function (data) {
if (data.data.length) {
let arr = data.data
for (let i = 0; i < arr.length; i++) {
if (i === arr.length - 1) {
arr[i].newVal = val
break
}
arr[i].newVal = arr[i + 1].jc_data
}
$("#popup-info-change-list .content .table .table-body").append(`
${arr.map(item => {
return (`
<tr>
<td width="25%">${item.update_opname}</td>
<td width="25%">${item.update_time}</td>
<td width="25%">${item.jc_data}</td>
<td width="25%">${item.newVal}</td>
</tr>
`)
}).join('')
}
`);
}
},
error: function (jqXHR) {
console.log("发生错误:" + jqXHR.status);
}
})
layer.open({
type: 1,
shadeClose: true,
maxmin: true,
title: "<p class='
popup
-
title
'>数据修改详情</p>",
area: ['
10
rem
', '
70
%
'],
content: $('
#
popup
-
info
-
change
-
list
'),
end: function () {
$("#popup-info-change-list").css('
display
', '
none
');
}
});
},
imgView(index, index2, index3) {
var arr = this.data[index].flow_list[index2].file_list;
...
...
@@ -501,24 +607,43 @@ var detail = {
},
swiperHide
()
{
$
(
"#swiper"
).
addClass
(
"hidden"
);
},
hoverInfoMouseover
()
{
clearTimeout
(
hoverInfoTime
)
},
hoverInfoMouseout
()
{
mouseout
()
}
}
var
hoverInfoTime
;
var
isHoverInfoModal
;
// 弹窗是否正在显示
function
mouseover
(
index
,
e
)
{
if
(
isHoverInfoModal
)
{
return
}
var
arr
=
[];
let
notArr
=
[
'jc_data21'
,
'test_status'
,
'change_list'
,
'group_no'
,
'is_change'
,
'jc_data26'
]
for
(
i
in
detail
.
ysjl_list
[
index
])
{
if
(
i
!=
'jc_data21'
&&
i
!=
'test_status'
)
{
if
(
!
notArr
.
includes
(
i
)
)
{
arr
.
push
(
detail
.
ysjl_list
[
index
][
i
]);
}
}
$
(
"#hoverInfo"
).
html
(
`
${
arr
.
map
(
item2
=>
{
${
arr
.
map
((
item2
,
index2
)
=>
{
let
bool
=
detail
.
ysjl_list
[
index
].
change_list
[
0
][
`is_change
${
index2
+
1
}
`
]
>
0
return
(
`
<div>
${
item2
}
</div>
<div
onClick="detail.showPopupChangeList('
${
detail
.
sample_id
}
', '
${
detail
.
ysjl_list
[
index
].
jc_data26
}
','
${
detail
.
ysjl_list
[
index
].
group_no
}
','
${
index2
+
1
}
','
${
item2
}
')" class="
${
bool
?
'modification'
:
''
}
"
>
${
item2
}
</div>
`
);
}).
join
(
''
)
}
`);
isHoverInfoModal = true
setTimeout(() => {
var divW = $("#hoverInfo").width();
var screenW = $(window).width();
...
...
@@ -527,11 +652,14 @@ function mouseover(index, e) {
} else {
$("#hoverInfo").css("left", e.clientX + 10 + 'px').css("right", 'auto').css("top", e.clientY + 10 + 'px').removeClass("hidden");
}
}, 50);
}
function mouseout() {
setTimeout(() => {
hoverInfoTime = setTimeout(() => {
$("#hoverInfo").addClass("hidden").css("left", 0).css("right", 0).css("top", 0);
isHoverInfoModal = false
}, 50);
}
...
...
@@ -572,7 +700,7 @@ function init() {
var laydate = layui.laydate;
laydateObj = laydate.render({
elem: '#rw-date'
, value:
getNextDate(dateFormat('YYYY-mm-dd', new Date()), 0)
, value:
''
, done: function () {
taskList.init();
}
...
...
@@ -602,15 +730,15 @@ function init() {
dataType: "json",
data: finalData,
success: function (data) {
console.log(data)
if
(data.status == 200)
{
layer.msg('已录入', {
icon: 0}, function(){
});
if
(data.status == 200)
{
layer.msg('已录入', {
icon: 0 }, function () {
});
setTimeout(() => {
layer.closeAll();
}, 1000);
}
else
{
layer.msg(data.msg, {
icon: 0}, function(){
});
}
else
{
layer.msg(data.msg, {
icon: 0 }, function () {
});
}
},
error: function (jqXHR) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment