Commit 559e3030 authored by 陈珊's avatar 陈珊

钢筋检测、回弹检测增加异常填报

parent 758e6e53
...@@ -110,6 +110,33 @@ ...@@ -110,6 +110,33 @@
</div> </div>
</div> </div>
<div id="popup-unusual" class="hidden popup-info">
<form class="layui-form">
<div class="layui-form-item">
<div class="layui-label">* 异常类型:</div>
<select name="unusual_type" lay-verify="required" required>
<option value="1">数据异常</option>
<option value="2">试验时间异常</option>
<option value="3">试验位置异常</option>
<option value="4">图片异常</option>
<option value="5">摄像头异常</option>
</select>
</div>
<div class="layui-form-item layui-form-text">
<div class="layui-label">* 异常原因:</div>
<textarea placeholder="请输入内容" lay-verify="required" required name="unusual_reason"
class="layui-textarea"></textarea>
</div>
<div class="layui-form-item submit-btn">
<button class="layui-btn" style="background: #3FD9FF;" lay-submit="" lay-filter="submit-unusual">
</button>
<button class="layui-btn" style="background: #8EA5C5;" onclick="layer.closeAll()">
</button>
</div>
</form>
</div>
</body> </body>
<script type="text/javascript" <script type="text/javascript"
src="https://webapi.amap.com/maps?v=1.4.15&key=fc00c5b70f67a8414344682f217d4b6e&plugin=AMap.MarkerClusterer,AMap.DistrictSearch"></script> src="https://webapi.amap.com/maps?v=1.4.15&key=fc00c5b70f67a8414344682f217d4b6e&plugin=AMap.MarkerClusterer,AMap.DistrictSearch"></script>
......
...@@ -113,6 +113,32 @@ ...@@ -113,6 +113,32 @@
</div> </div>
</div> </div>
<div id="popup-unusual" class="hidden popup-info">
<form class="layui-form">
<div class="layui-form-item">
<div class="layui-label">* 异常类型:</div>
<select name="unusual_type" lay-verify="required" required>
<option value="1">数据异常</option>
<option value="2">试验时间异常</option>
<option value="3">试验位置异常</option>
<option value="4">图片异常</option>
<option value="5">摄像头异常</option>
</select>
</div>
<div class="layui-form-item layui-form-text">
<div class="layui-label">* 异常原因:</div>
<textarea placeholder="请输入内容" lay-verify="required" required name="unusual_reason"
class="layui-textarea"></textarea>
</div>
<div class="layui-form-item submit-btn">
<button class="layui-btn" style="background: #3FD9FF;" lay-submit="" lay-filter="submit-unusual">
</button>
<button class="layui-btn" style="background: #8EA5C5;" onclick="layer.closeAll()">
</button>
</div>
</form>
</div>
</body> </body>
<script type="text/javascript" <script type="text/javascript"
src="https://webapi.amap.com/maps?v=1.4.15&key=fc00c5b70f67a8414344682f217d4b6e&plugin=AMap.MarkerClusterer,AMap.DistrictSearch"></script> src="https://webapi.amap.com/maps?v=1.4.15&key=fc00c5b70f67a8414344682f217d4b6e&plugin=AMap.MarkerClusterer,AMap.DistrictSearch"></script>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
} }
.container .header { .container .header {
z-index: 99; z-index: 9999;
position: relative; position: relative;
background-image: url("../../images/gczljc/header.png"); background-image: url("../../images/gczljc/header.png");
background-size: 100% 100%; background-size: 100% 100%;
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
left: .2rem; left: .2rem;
top: .2rem; top: .2rem;
height: calc(4rem + 20%); height: calc(4rem + 20%);
z-index: 9; z-index: 9999;
} }
.container .maincon .left-item .card .main { .container .maincon .left-item .card .main {
...@@ -398,7 +398,7 @@ ...@@ -398,7 +398,7 @@
right: .2rem; right: .2rem;
top: .2rem; top: .2rem;
bottom: 0; bottom: 0;
z-index: 9; z-index: 9999;
} }
.container .maincon .right-item .card1 { .container .maincon .right-item .card1 {
...@@ -491,7 +491,7 @@ ...@@ -491,7 +491,7 @@
bottom: 0; bottom: 0;
height: calc(80% - 4rem); height: calc(80% - 4rem);
display: flex; display: flex;
z-index: 9; z-index: 9999;
} }
.container .maincon .bottom-item .card1 { .container .maincon .bottom-item .card1 {
...@@ -858,13 +858,13 @@ ...@@ -858,13 +858,13 @@
} }
.el-empty .el-empty__image { .el-empty .el-empty__image {
width: .8rem; width: .6rem;
margin: auto; margin: auto;
} }
.el-empty .el-empty__description { .el-empty .el-empty__description {
color: #dadada; color: #dadada;
font-size: .14rem; font-size: .12rem;
margin-top: .1rem; margin-top: .1rem;
} }
...@@ -911,7 +911,7 @@ ...@@ -911,7 +911,7 @@
.amap-info-content { .amap-info-content {
background: linear-gradient(90deg, rgba(0, 92, 186, 0.6) 0%, rgba(0, 92, 186, 0.11) 99%); background: linear-gradient(90deg, rgba(0, 92, 186, 0.6) 0%, rgba(0, 92, 186, 0.11) 99%);
color: #97ABCB; color: #d3e4ff;
} }
.amap-info-close { .amap-info-close {
...@@ -920,6 +920,7 @@ ...@@ -920,6 +920,7 @@
.bg-item { .bg-item {
position: absolute; position: absolute;
z-index: 999;
} }
.bg-item img { .bg-item img {
...@@ -929,12 +930,14 @@ ...@@ -929,12 +930,14 @@
.shang-item { .shang-item {
left: 0; left: 0;
right: 0;
top: 0; top: 0;
height: 1.6rem; height: 1.6rem;
} }
.xia-item { .xia-item {
left: 0; left: 0;
right: 0;
bottom: 0; bottom: 0;
height: calc(80% - 4rem); height: calc(80% - 4rem);
} }
...@@ -942,12 +945,14 @@ ...@@ -942,12 +945,14 @@
.zuo-item { .zuo-item {
left: 0; left: 0;
top: 0; top: 0;
bottom: 0;
width: 5.5rem; width: 5.5rem;
} }
.you-item { .you-item {
right: 0; right: 0;
top: 0; top: 0;
bottom: 0;
width: 5.5rem; width: 5.5rem;
} }
......
...@@ -11,7 +11,19 @@ ...@@ -11,7 +11,19 @@
.container .content .map .info-item { .container .content .map .info-item {
cursor: pointer; cursor: pointer;
padding: 12px 27px 10px 12px; display: flex;
align-items: center;
padding-right: .3rem;
}
.container .content .map .info-item .btn {
font-size: .14rem;
color: #FFF;
border: 0.01rem solid #FFF;
border-radius: .12rem;
padding: .05rem .1rem;
cursor: pointer;
white-space: nowrap;
} }
.container .content .map .bottom-center .amap-info-sharp { .container .content .map .bottom-center .amap-info-sharp {
...@@ -925,3 +937,71 @@ ...@@ -925,3 +937,71 @@
width: 0.25rem; width: 0.25rem;
height: 0.25rem; height: 0.25rem;
} }
.layui-label {
color: #fff;
margin-bottom: 12px;
}
#popup-unusual {
position: relative;
}
.submit-btn {
position: absolute;
left: 50%;
bottom: .7rem;
transform: translateX(-50%);
width: 100%;
text-align: center;
}
.layui-form {
padding: 20px;
}
.layui-form .layui-input {
background: transparent;
border-color: #4470C5;
color: #fff;
}
.layui-form textarea {
background: transparent;
border-color: #4470C5;
color: #fFF;
}
.layui-form-select dl {
background: #1E499B;
color: #fff;
border-color: #4470C5;
}
.layui-form-select dl dd.layui-this {
background-color: #3069F4;
}
.layui-form-select dl dd:hover {
background-color: #46A6D8;
}
table {
width: 100%;
table-layout: fixed;
}
td {
width: 100%;
word-break: keep-all;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.switch {
height: inherit;
padding: 6px 12px;
line-height: inherit;
background-color: #46A6D8;
}
...@@ -11,7 +11,19 @@ ...@@ -11,7 +11,19 @@
.container .content .map .info-item { .container .content .map .info-item {
cursor: pointer; cursor: pointer;
padding: 12px 27px 10px 12px; display: flex;
align-items: center;
padding-right: .3rem;
}
.container .content .map .info-item .btn {
font-size: .14rem;
color: #FFF;
border: 0.01rem solid #FFF;
border-radius: .12rem;
padding: .05rem .1rem;
cursor: pointer;
white-space: nowrap;
} }
.container .content .map .bottom-center .amap-info-sharp { .container .content .map .bottom-center .amap-info-sharp {
...@@ -814,3 +826,71 @@ ...@@ -814,3 +826,71 @@
width: 0.25rem; width: 0.25rem;
height: 0.25rem; height: 0.25rem;
} }
.layui-label {
color: #fff;
margin-bottom: 12px;
}
#popup-unusual {
position: relative;
}
.submit-btn {
position: absolute;
left: 50%;
bottom: .7rem;
transform: translateX(-50%);
width: 100%;
text-align: center;
}
.layui-form {
padding: 20px;
}
.layui-form .layui-input {
background: transparent;
border-color: #4470C5;
color: #fff;
}
.layui-form textarea {
background: transparent;
border-color: #4470C5;
color: #fFF;
}
.layui-form-select dl {
background: #1E499B;
color: #fff;
border-color: #4470C5;
}
.layui-form-select dl dd.layui-this {
background-color: #3069F4;
}
.layui-form-select dl dd:hover {
background-color: #46A6D8;
}
table {
width: 100%;
table-layout: fixed;
}
td {
width: 100%;
word-break: keep-all;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.switch {
height: inherit;
padding: 6px 12px;
line-height: inherit;
background-color: #46A6D8;
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.container{ .container{
@include background-base('../../images/gczljc/img_beijin.png'); @include background-base('../../images/gczljc/img_beijin.png');
.header{ .header{
z-index: 99; z-index: 9999;
position: relative; position: relative;
@include background-base('../../images/gczljc/header.png'); @include background-base('../../images/gczljc/header.png');
height: .86rem; height: .86rem;
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
left: .2rem; left: .2rem;
top: .2rem; top: .2rem;
height: calc(4rem + 20%); height: calc(4rem + 20%);
z-index: 9; z-index: 9999;
.card{ .card{
.main{ .main{
padding: .3rem 0; padding: .3rem 0;
...@@ -295,7 +295,7 @@ ...@@ -295,7 +295,7 @@
right: .2rem; right: .2rem;
top: .2rem; top: .2rem;
bottom: 0; bottom: 0;
z-index: 9; z-index: 9999;
.card1{ .card1{
height: 3.22rem; height: 3.22rem;
.main{ .main{
...@@ -366,7 +366,7 @@ ...@@ -366,7 +366,7 @@
bottom: 0; bottom: 0;
height: calc(80% - 4rem); height: calc(80% - 4rem);
display: flex; display: flex;
z-index: 9; z-index: 9999;
.card1{ .card1{
height: 100%; height: 100%;
width: 4.8rem; width: 4.8rem;
...@@ -658,12 +658,12 @@ ...@@ -658,12 +658,12 @@
text-align: center; text-align: center;
padding: .3rem 0; padding: .3rem 0;
.el-empty__image{ .el-empty__image{
width: .8rem; width: .6rem;
margin: auto; margin: auto;
} }
.el-empty__description{ .el-empty__description{
color: #dadada; color: #dadada;
font-size: .14rem; font-size: .12rem;
margin-top: .1rem; margin-top: .1rem;
} }
} }
...@@ -711,7 +711,7 @@ ...@@ -711,7 +711,7 @@
.amap-info-content{ .amap-info-content{
background: linear-gradient(90deg, rgba(0,92,186,0.6) 0%, rgba(0,92,186,0.11) 99%); background: linear-gradient(90deg, rgba(0,92,186,0.6) 0%, rgba(0,92,186,0.11) 99%);
color: #97ABCB; color: #d3e4ff;
} }
.amap-info-close{ .amap-info-close{
right: 1px !important; right: 1px !important;
...@@ -721,6 +721,7 @@ ...@@ -721,6 +721,7 @@
.bg-item{ .bg-item{
position: absolute; position: absolute;
z-index: 999;
img{ img{
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -728,22 +729,26 @@ ...@@ -728,22 +729,26 @@
} }
.shang-item{ .shang-item{
left: 0; left: 0;
right: 0;
top: 0; top: 0;
height: 1.6rem; height: 1.6rem;
} }
.xia-item{ .xia-item{
left: 0; left: 0;
right: 0;
bottom: 0; bottom: 0;
height: calc(80% - 4rem); height: calc(80% - 4rem);
} }
.zuo-item{ .zuo-item{
left: 0; left: 0;
top: 0; top: 0;
bottom: 0;
width: 5.5rem; width: 5.5rem;
} }
.you-item{ .you-item{
right: 0; right: 0;
top: 0; top: 0;
bottom: 0;
width: 5.5rem; width: 5.5rem;
} }
......
...@@ -15,7 +15,18 @@ ...@@ -15,7 +15,18 @@
.map{ .map{
.info-item{ .info-item{
cursor: pointer; cursor: pointer;
padding: 12px 27px 10px 12px; display: flex;
align-items: center;
padding-right: .3rem;
.btn{
font-size: .14rem;
color: $white;
border: $border $white;
border-radius: .12rem;
padding: .05rem .1rem;
cursor: pointer;
white-space: nowrap;
}
} }
.bottom-center .amap-info-sharp{ .bottom-center .amap-info-sharp{
border-top-color: rgba(0, 0, 0, 0.6); border-top-color: rgba(0, 0, 0, 0.6);
...@@ -785,3 +796,73 @@ ...@@ -785,3 +796,73 @@
} }
} }
} }
.layui-label {
color: #fff;
margin-bottom: 12px;
}
#popup-unusual {
position: relative;
}
.submit-btn {
position: absolute;
left: 50%;
bottom: .7rem;
transform: translateX(-50%);
width: 100%;
text-align: center;
}
.layui-form {
padding: 20px;
}
.layui-form .layui-input {
background: transparent;
border-color: #4470C5;
color: #fff;
}
.layui-form textarea {
background: transparent;
border-color: #4470C5;
color: #fFF;
}
.layui-form-select dl {
background: #1E499B;
color: #fff;
border-color: #4470C5;
}
.layui-form-select dl dd.layui-this {
background-color: #3069F4;
}
.layui-form-select dl dd:hover {
background-color: #46A6D8;
}
table {
width: 100%;
table-layout: fixed;
}
td {
width: 100%;
word-break: keep-all;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.switch {
height: inherit;
padding: 6px 12px;
line-height: inherit;
background-color: #46A6D8;
}
\ No newline at end of file
...@@ -15,7 +15,18 @@ ...@@ -15,7 +15,18 @@
.map{ .map{
.info-item{ .info-item{
cursor: pointer; cursor: pointer;
padding: 12px 27px 10px 12px; display: flex;
align-items: center;
padding-right: .3rem;
.btn{
font-size: .14rem;
color: $white;
border: $border $white;
border-radius: .12rem;
padding: .05rem .1rem;
cursor: pointer;
white-space: nowrap;
}
} }
.bottom-center .amap-info-sharp{ .bottom-center .amap-info-sharp{
border-top-color: rgba(0, 0, 0, 0.6); border-top-color: rgba(0, 0, 0, 0.6);
...@@ -662,3 +673,74 @@ ...@@ -662,3 +673,74 @@
} }
} }
} }
.layui-label {
color: #fff;
margin-bottom: 12px;
}
#popup-unusual {
position: relative;
}
.submit-btn {
position: absolute;
left: 50%;
bottom: .7rem;
transform: translateX(-50%);
width: 100%;
text-align: center;
}
.layui-form {
padding: 20px;
}
.layui-form .layui-input {
background: transparent;
border-color: #4470C5;
color: #fff;
}
.layui-form textarea {
background: transparent;
border-color: #4470C5;
color: #fFF;
}
.layui-form-select dl {
background: #1E499B;
color: #fff;
border-color: #4470C5;
}
.layui-form-select dl dd.layui-this {
background-color: #3069F4;
}
.layui-form-select dl dd:hover {
background-color: #46A6D8;
}
table {
width: 100%;
table-layout: fixed;
}
td {
width: 100%;
word-break: keep-all;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.switch {
height: inherit;
padding: 6px 12px;
line-height: inherit;
background-color: #46A6D8;
}
\ No newline at end of file
...@@ -209,7 +209,11 @@ var map = { ...@@ -209,7 +209,11 @@ var map = {
}), }),
map: map map: map
}); });
marker.content = `<p class="info-item" onclick="detail.getData('${data[i].project_id}')">${data[i].project_name}</p>`; marker.content = `
<div class="info-item">
<p onclick="detail.getData('${data[i].project_id}')" style="padding: 0.2rem .5rem .2rem .3rem">${data[i].project_name}</p>
<p class='btn' onclick="getBottomData.showPopup('${data[i].project_id}','${item2.SceneTask_id}','${item2.customer_id}','${item2.task_id}','${item2.order_id}')">异常录入</p>
</div>`;
marker.on('mouseover', infoOpen); marker.on('mouseover', infoOpen);
marker.on('click', newMAp); marker.on('click', newMAp);
} }
...@@ -247,6 +251,30 @@ var map = { ...@@ -247,6 +251,30 @@ var map = {
}, },
} }
var getBottomData = {
showPopup: function (project_id, table_id, customer_id, task_id, order_id) {
$(".layui-form")[0].reset()
this.formData = {
project_id,
table_id,
customer_id,
task_id,
order_id
}
layer.open({
type: 1,
shadeClose: true,
maxmin: true,
title: "<p class='popup-title'>异常信息录入</p>",
area: ['8rem', '45%'],
content: $('#popup-unusual'),
end: function () {
$("#popup-unusual").css('display', 'none');
}
});
},
}
var detail = { var detail = {
data: [], data: [],
ysjl_list: [], ysjl_list: [],
...@@ -584,6 +612,53 @@ function init() { ...@@ -584,6 +612,53 @@ function init() {
// } // }
// }); // });
// }) // })
layui.use(['form', 'layer', 'laydate'], function () {
var form = layui.form;
var layer = layui.layer;
form.verify({
title: function (value) {
if (value.length < 5) {
return '标题至少得5个字符啊';
}
}
, pass: [
/^[\S]{6,12}$/
, '密码必须6到12位,且不能出现空格'
]
, content: function (value) {
layedit.sync(editIndex);
}
});
form.on('submit(submit-unusual)', function (data) {
var finalData = $.extend($.extend({
action: 1,
screen_kind: 5,
}, getBottomData.formData), data.field)
$.ajax({
url: baseURL_Utility + "UnusualHandle.ashx",
type: "post",
dataType: "json",
data: finalData,
success: function (data) {
console.log(data)
if(data.status == 200){
layer.msg('已录入', {icon: 0}, function(){});
setTimeout(() => {
layer.closeAll();
}, 1000);
}else{
layer.msg(data.msg, {icon: 0}, function(){});
}
},
error: function (jqXHR) {
console.log("发生错误:" + jqXHR.status);
}
})
return false;
});
})
taskList.init(); taskList.init();
testCount.init(); testCount.init();
} }
\ No newline at end of file
...@@ -217,7 +217,11 @@ var map = { ...@@ -217,7 +217,11 @@ var map = {
}), }),
map: map map: map
}); });
marker.content = `<p class="info-item" onclick="detail.getData('${data[i].project_id}')">${data[i].project_name}</p>`; marker.content = `
<div class="info-item">
<p onclick="detail.getData('${data[i].project_id}')" style="padding: 0.2rem .5rem .2rem .3rem">${data[i].project_name}</p>
<p class='btn' onclick="getBottomData.showPopup('${data[i].project_id}','${item2.SceneTask_id}','${item2.customer_id}','${item2.task_id}','${item2.order_id}')">异常录入</p>
</div>`;
marker.on('mouseover', infoOpen); marker.on('mouseover', infoOpen);
marker.on('click', newMAp); marker.on('click', newMAp);
} }
...@@ -255,11 +259,37 @@ var map = { ...@@ -255,11 +259,37 @@ var map = {
}, },
} }
var getBottomData = {
showPopup: function (project_id, table_id, customer_id, task_id, order_id) {
$(".layui-form")[0].reset()
this.formData = {
project_id,
table_id,
customer_id,
task_id,
order_id
}
layer.open({
type: 1,
shadeClose: true,
maxmin: true,
title: "<p class='popup-title'>异常信息录入</p>",
area: ['8rem', '45%'],
content: $('#popup-unusual'),
end: function () {
$("#popup-unusual").css('display', 'none');
}
});
},
}
var detail = { var detail = {
project_id: '',
data: [], data: [],
ysjl_list: [], ysjl_list: [],
getData: function (project_id, sample_id, index, index2) { getData: function (project_id, sample_id, index, index2) {
let _this = this; let _this = this;
_this.project_id = project_id;
$.ajax({ $.ajax({
url: baseURL_htjc + "GetTaskInfo.ashx", url: baseURL_htjc + "GetTaskInfo.ashx",
type: "post", type: "post",
...@@ -531,7 +561,9 @@ function sublistClick(id) { ...@@ -531,7 +561,9 @@ function sublistClick(id) {
init(); init();
function init() { function init() {
getHeader(); getHeader();
layui.use(['layer', 'laydate'], function () { layui.use(['form', 'layer', 'laydate'], function () {
var form = layui.form;
var layer = layui.layer;
var laydate = layui.laydate; var laydate = layui.laydate;
laydateObj = laydate.render({ laydateObj = laydate.render({
elem: '#rw-date' elem: '#rw-date'
...@@ -540,6 +572,49 @@ function init() { ...@@ -540,6 +572,49 @@ function init() {
taskList.init(); taskList.init();
} }
}); });
form.verify({
title: function (value) {
if (value.length < 5) {
return '标题至少得5个字符啊';
}
}
, pass: [
/^[\S]{6,12}$/
, '密码必须6到12位,且不能出现空格'
]
, content: function (value) {
layedit.sync(editIndex);
}
});
form.on('submit(submit-unusual)', function (data) {
var finalData = $.extend($.extend({
action: 1,
screen_kind: 4,
}, getBottomData.formData), data.field)
$.ajax({
url: baseURL_Utility + "UnusualHandle.ashx",
type: "post",
dataType: "json",
data: finalData,
success: function (data) {
console.log(data)
if(data.status == 200){
layer.msg('已录入', {icon: 0}, function(){});
setTimeout(() => {
layer.closeAll();
}, 1000);
}else{
layer.msg(data.msg, {icon: 0}, function(){});
}
},
error: function (jqXHR) {
console.log("发生错误:" + jqXHR.status);
}
})
return false;
});
}) })
taskList.init(); taskList.init();
testCount.init(); testCount.init();
......
const baseurl = 'http://192.168.0.187:5000/api/'; const baseurl = 'http://192.168.0.198:5000/api/';
const api_key = 16859729202501; const api_key = 16859729202501;
const api_secret = "5B18352190E64BB3B1BC24CAE62DE700"; const api_secret = "5B18352190E64BB3B1BC24CAE62DE700";
var station_id = ''; var station_id = '';
......
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