工程库、人员考勤接口对接
|
|
@ -17,7 +17,7 @@ body{
|
|||
.content>form>div:nth-child(n + 3){
|
||||
border: 1px solid #E9E9E9;
|
||||
width: 80%;
|
||||
height: 24%;
|
||||
height: 18%;
|
||||
margin-left: 10%;
|
||||
}
|
||||
.content button{
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ html {
|
|||
margin-right: 5%;
|
||||
}
|
||||
.select-box{
|
||||
width: 40%;
|
||||
width: 46%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
|
|
|||
|
|
@ -3,14 +3,16 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>人员考勤</title>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../js/public/jq.js"></script>
|
||||
<script src="../../../js/public/token.js"></script>
|
||||
<script src="../../../js/public/public.js"></script>
|
||||
<script src="../../../js/public/public_utils.js"></script>
|
||||
<script src="../../../js/public/aescbc.js"></script>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../plugs/layui-v2.9.2/layui/layui.js"></script>
|
||||
<link href="../../../plugs/layui-v2.9.2/layui/css/layui.css" rel="stylesheet">
|
||||
<script src="../../../util/Interceptor.js"></script>
|
||||
<!-- <script src="../../../util/Interceptor.js"></script> -->
|
||||
<script src="../../../util/time.js"></script>
|
||||
<!--业务js-->
|
||||
<script src="../../../js/wireManager/attendance/attendance.js"></script>
|
||||
|
||||
|
|
@ -63,30 +65,30 @@
|
|||
<div class="form-group" style="margin-top: 0.5%">
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<input id="search1" type="text" class="layui-input" placeholder="输入姓名" >
|
||||
<input id="userName" name="userName" type="text" class="layui-input" placeholder="输入姓名" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<input id="search2" type="text" class="layui-input" placeholder="输入工程名称" >
|
||||
<input id="proName" name="proName" type="text" class="layui-input" placeholder="输入工程名称" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<input id="search3" type="text" class="layui-input" placeholder="输入工作站" >
|
||||
<input id="yjName" name="yjName" type="text" class="layui-input" placeholder="输入工作站" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" class="layui-input" autocomplete="off" id="month" name="month" placeholder="选择月份" >
|
||||
<input type="text" class="layui-input" autocomplete="off" id="makeMonth" name="makeMonth" placeholder="选择月份" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit lay-filter="query">
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal" onclick="queryClick()">
|
||||
<i class="layui-icon layui-icon-search"></i>
|
||||
查询
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-primary" onclick="reset()">
|
||||
<button class="layui-btn layui-btn-sm layui-btn-primary" onclick="resetClick()">
|
||||
<i class="layui-icon layui-icon-refresh"></i>
|
||||
重置
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
}
|
||||
.header{
|
||||
width: 100%;
|
||||
height: 10%;
|
||||
height: 13%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
|
@ -75,7 +75,6 @@
|
|||
color: #FFF;
|
||||
border-top-left-radius: 6px;
|
||||
border-top-right-radius: 6px;
|
||||
background-color: #52C1F5;
|
||||
}
|
||||
.viewHeader>img{
|
||||
width: 32px;
|
||||
|
|
@ -87,7 +86,6 @@
|
|||
}
|
||||
.viewContent{
|
||||
width: 100%;
|
||||
height: 220px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
|
@ -95,7 +93,6 @@
|
|||
}
|
||||
.viewContent>img{
|
||||
width: 160px;
|
||||
height: 210px;
|
||||
|
||||
}
|
||||
.viewFooter{
|
||||
|
|
@ -151,37 +148,37 @@
|
|||
<img src="../../../image/dataIcon2.png" alt="">
|
||||
</div>
|
||||
<div class="flex-column" style="margin-left: 2%;">
|
||||
<div style="font-weight: bold;font-size: 22px;">xxxxxx工程名称</div>
|
||||
<div style="color: darkgrey;margin-top: 10px;">双回路</div>
|
||||
<div id="username" style="font-weight: bold;font-size: 22px;">--</div>
|
||||
<div id="tel" style="color: darkgrey;margin-top: 10px;">--</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-column" style="width: 12%;height: 100%;margin-left: 2%;">
|
||||
<div style="color: darkgrey;">巡护区段数量</div>
|
||||
<div style="margin-top: 10px;">16</div>
|
||||
<div id="allMake" style="margin-top: 10px;">--</div>
|
||||
</div>
|
||||
<div class="flex-column" style="width: 12%;height: 100%;margin-left: 2%;">
|
||||
<div style="color: darkgrey;">巡1次张数</div>
|
||||
<div style="margin-top: 10px;">8</div>
|
||||
<div id="oneMake" style="margin-top: 10px;">--</div>
|
||||
</div>
|
||||
<div class="flex-column" style="width: 12%;height: 100%;margin-left: 2%;">
|
||||
<div style="color: darkgrey;">巡2次张数</div>
|
||||
<div style="margin-top: 10px;">8</div>
|
||||
<div id="twoMake" style="margin-top: 10px;">--</div>
|
||||
</div>
|
||||
<div class="flex-column" style="width: 12%;height: 100%;margin-left: 2%;">
|
||||
<div style="color: darkgrey;">特巡天数</div>
|
||||
<div style="margin-top: 10px;">4</div>
|
||||
<div id="special" style="margin-top: 10px;">--</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 30%;height: 100%;display: flex;align-items: center;justify-items: center;">
|
||||
<div id="more">
|
||||
<input type="text" class="layui-input" readonly placeholder="月份" id="month" style="border: none;color:#409EFF;font-weight: bold;font-size: 30px;text-align: center; ">
|
||||
<input id="makeMonth" type="text" class="layui-input" readonly placeholder="月份" style="border: none;color:#409EFF;font-weight: bold;font-size: 30px;text-align: center; ">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%;height: 88%;">
|
||||
<div style="width: 100%;height: 85%;">
|
||||
<div class="layui-tab layui-tab-brief" lay-filter="projectTab" style="height: 100%;width: 100%;display: flex;flex-direction: column;margin: 0;">
|
||||
<ul id="projectList" class="layui-tab-title" style="width: 100%;height: 10%;background-color: #FFF;">
|
||||
</ul>
|
||||
<!-- <ul id="projectList" class="layui-tab-title" style="width: 100%;height: 10%;background-color: #FFF;">
|
||||
</ul> -->
|
||||
|
||||
<div class="layui-tab-content" style="width: 100%;height: 92%;background-color: #E6E6E6;">
|
||||
<div class="layui-tab-item layui-show" style="width: 100%;height: 100%;overflow-y: auto;">
|
||||
|
|
|
|||
|
|
@ -3,14 +3,15 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>护线员子系统</title>
|
||||
<script src="../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../js/public/jq.js"></script>
|
||||
<script src="../../js/public/token.js"></script>
|
||||
<script src="../../js/public/public.js"></script>
|
||||
<script src="../../js/public/public_utils.js"></script>
|
||||
<script src="../../js/public/aescbc.js"></script>
|
||||
<script src="../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../plugs/layui-v2.9.2/layui/layui.js"></script>
|
||||
<link href="../../plugs/layui-v2.9.2/layui/css/layui.css" rel="stylesheet">
|
||||
<script src="../../util/Interceptor.js"></script>
|
||||
<!-- <script src="../../util/Interceptor.js"></script> -->
|
||||
<!--业务js-->
|
||||
<script src="../../js/wireManager/header.js"></script>
|
||||
<!-- css -->
|
||||
|
|
@ -23,7 +24,7 @@
|
|||
<div></div>
|
||||
<div style="font-weight: bold; font-size: 16px;">护线员管理</div>
|
||||
<div class="select-box">
|
||||
迪庆运检站
|
||||
<input type="text" name="taskSourceId" id="taskSourceId" class="layui-input" readonly autocomplete="off" style="width: 425px;border: none;cursor: pointer;">
|
||||
</div>
|
||||
</div>
|
||||
<ul class="layui-tab-title tab-box">
|
||||
|
|
@ -60,7 +61,7 @@
|
|||
<div class="layui-tab-content" style="width: 100%;height: 90%;">
|
||||
<!-- 栏目1 -->
|
||||
<div class="layui-tab-item layui-show">
|
||||
<iframe src="index.html" frameborder="0" width="100%"
|
||||
<iframe src="index.html" id="indexFrame" frameborder="0" width="100%"
|
||||
height="100%"></iframe>
|
||||
</div>
|
||||
<!-- 栏目2 -->
|
||||
|
|
|
|||
|
|
@ -3,11 +3,12 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>护线员首页</title>
|
||||
<script src="../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../js/public/jq.js"></script>
|
||||
<script src="../../js/public/token.js"></script>
|
||||
<script src="../../js/public/public.js"></script>
|
||||
<script src="../../js/public/public_utils.js"></script>
|
||||
<script src="../../js/public/aescbc.js"></script>
|
||||
<script src="../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../js/public/echarts.min.js"></script>
|
||||
<script src="../../js/public/echarts-liquidfill.min.js"></script>
|
||||
<script src="../../plugs/layui-v2.9.2/layui/layui.js"></script>
|
||||
|
|
@ -31,7 +32,7 @@
|
|||
<div class="iconBox"> <img src="../../image/dataIcon1.png" alt="" srcset=""> </div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div>20</div>
|
||||
<div id="proNum">--</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -41,7 +42,7 @@
|
|||
<div class="iconBox"> <img src="../../image/dataIcon2.png" alt="" srcset=""> </div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div>123</div>
|
||||
<div id="workerNum">--</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -51,7 +52,7 @@
|
|||
<div class="iconBox"> <img src="../../image/dataIcon3.png" alt="" srcset=""> </div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div>3,208</div>
|
||||
<div id="towerNum">--</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -61,7 +62,7 @@
|
|||
<div class="iconBox"> <img src="../../image/dataIcon4.png" alt="" srcset=""> </div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div>2,000</div>
|
||||
<div id="makeNum">--</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -71,7 +72,7 @@
|
|||
<div class="iconBox"> <img src="../../image/dataIcon5.png" alt="" srcset=""> </div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div>1,208</div>
|
||||
<div id="notMakeNum">--</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -81,7 +82,7 @@
|
|||
<div class="iconBox"> <img src="../../image/dataIcon5.png" alt="" srcset=""> </div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div>123</div>
|
||||
<div id="specialDayNum">--</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -103,7 +104,9 @@
|
|||
<div style="height: 94%;width: 100%;margin-top: 1%;">
|
||||
<div style="height: 100%;width: 100%;overflow: auto;" id="personnelRate" class="scrollable">
|
||||
<table id="personnelTable" border="0" style="width: 100%;white-space: nowrap;">
|
||||
<thead></thead>
|
||||
<thead>
|
||||
<tr></tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,77 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>护线员考勤</title>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../js/public/jq.js"></script>
|
||||
<script src="../../../js/public/token.js"></script>
|
||||
<script src="../../../js/public/public.js"></script>
|
||||
<script src="../../../js/public/public_utils.js"></script>
|
||||
<script src="../../../js/public/aescbc.js"></script>
|
||||
<script src="../../../plugs/layui2.7.6/layui.js"></script>
|
||||
<link href="../../../plugs/layui2.7.6/css/layui.css" rel="stylesheet">
|
||||
<!-- <script src="../../../util/Interceptor.js"></script> -->
|
||||
<!--业务js-->
|
||||
<script src="../../../js/wireManager/project/addTower.js"></script>
|
||||
<!-- css -->
|
||||
<link type="text/css" media="screen" href="../../../css/formAdd.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
.layui-form-item .layui-input-inline{
|
||||
width: 425px;
|
||||
}
|
||||
|
||||
.layui-form-item {
|
||||
position: relative;
|
||||
margin-bottom: 0px !important;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.btnOption1>div,.btnOption2>div,.btnOption3>div,.btnOption4>div,.btnOption5>div,.btnOption6>div{
|
||||
float: left;
|
||||
border: 1px solid #E4E4E4;
|
||||
border-radius: 10px;
|
||||
color: #9D9D9D;
|
||||
width: 83px;
|
||||
height: 38px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pass{
|
||||
border: 1px solid #A0CFFF!important;
|
||||
background-color: #F0F7FF!important;
|
||||
color: #409EFF!important;
|
||||
}
|
||||
.layui-dropdown{
|
||||
height: 300px;
|
||||
overflow-x: hidden;
|
||||
white-space: nowrap;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<form class="form-inline layui-form" onsubmit="return false">
|
||||
<div class="layui-form-item" style="margin-top: 5%;">
|
||||
<div class="layui-inline" style="margin-left: 10%; margin-top: 1%">
|
||||
<label class="layui-form-label" style="width: 116px;"><i class="tip-required"
|
||||
style="color: red;font-size: 20px">*</i>杆塔名称:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="gtName" id="gtName" class="layui-input" lay-verify="required" maxlength="200" autocomplete="off" placeholder="请输入杆塔名称" style="width: 425px">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button id="closeBt" class="layui-btn layui-btn-primary layui-border-blue" style="position: fixed;left: 6%;top: 80%;background-color: #ffffff">取消</button>
|
||||
<button id="submitBt" type="button" class="layui-btn" lay-submit lay-filter="formDemo" style="position: fixed;left: 87%;top: 80%;">保存</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -3,14 +3,15 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>护线员考勤</title>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../js/public/jq.js"></script>
|
||||
<script src="../../../js/public/token.js"></script>
|
||||
<script src="../../../js/public/public.js"></script>
|
||||
<script src="../../../js/public/public_utils.js"></script>
|
||||
<script src="../../../js/public/aescbc.js"></script>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../plugs/layui-v2.9.2/layui/layui.js"></script>
|
||||
<link href="../../../plugs/layui-v2.9.2/layui/css/layui.css" rel="stylesheet">
|
||||
<script src="../../../util/Interceptor.js"></script>
|
||||
<script src="../../../plugs/layui2.7.6/layui.js"></script>
|
||||
<link href="../../../plugs/layui2.7.6/css/layui.css" rel="stylesheet">
|
||||
<!-- <script src="../../../util/Interceptor.js"></script> -->
|
||||
<!--业务js-->
|
||||
<script src="../../../js/wireManager/project/projectAdd.js"></script>
|
||||
<!-- css -->
|
||||
|
|
@ -46,41 +47,45 @@
|
|||
background-color: #F0F7FF!important;
|
||||
color: #409EFF!important;
|
||||
}
|
||||
|
||||
.layui-dropdown{
|
||||
height: 300px;
|
||||
overflow-x: hidden;
|
||||
white-space: nowrap;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<form class="form-inline layui-form" onsubmit="return false">
|
||||
|
||||
<div class="layui-form-item" style="margin-top: 5%;">
|
||||
<div class="layui-inline" style="margin-left: 10%; margin-top: 1%;">
|
||||
<label class="layui-form-label" style="width: 116px;"><i class="tip-required"
|
||||
style="color: red;font-size: 20px">*</i>所属运检站:</label>
|
||||
<div class="layui-input-inline">
|
||||
<!-- <select id="taskSourceId" name="taskSourceId" class="layui-select" lay-verify="required"></select> -->
|
||||
<input type="text" name="taskSourceId" id="taskSourceId" lay-verify="required" class="layui-input" readonly autocomplete="off" placeholder="请选择运检站" style="width: 425px">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="margin-top: 5%;">
|
||||
<div class="layui-inline" style="margin-left: 10%; margin-top: 1%">
|
||||
<label class="layui-form-label" style="width: 116px;"><i class="tip-required"
|
||||
style="color: red;font-size: 20px">*</i>线路工程名称:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="id" id="id" hidden >
|
||||
<input type="text" name="proName" id="proName" class="layui-input" lay-verify="required" maxlength="200" autocomplete="off" placeholder="请输入线路工程名称" style="width: 425px">
|
||||
<input type="text" name="proId" id="proId" hidden >
|
||||
<input type="text" name="lineProName" id="lineProName" class="layui-input" lay-verify="required" maxlength="200" autocomplete="off" placeholder="请输入线路工程名称" style="width: 425px">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item" style="margin-top: 5%;">
|
||||
<div class="layui-inline" style="margin-left: 10%; margin-top: 1%;">
|
||||
<label class="layui-form-label" style="width: 116px;"><i class="tip-required"
|
||||
style="color: red;font-size: 20px">*</i>所属运检站:</label>
|
||||
<div class="layui-input-inline">
|
||||
<select id="taskSourceId" name="taskSourceId" class="layui-select" lay-verify="required"></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item" style="margin-top: 5%;">
|
||||
<div class="layui-inline" style="margin-left: 0%;">
|
||||
<label class="layui-form-label" style="width: 116px;"><i class="tip-required"
|
||||
style="color: red;font-size: 20px">*</i>电压等级:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="powerDevice" id="powerDevice" class="layui-input" lay-verify="required" maxlength="500" placeholder="请填写" style="width: 425px">
|
||||
<input type="text" name="volLevel" id="volLevel" class="layui-input" lay-verify="required" maxlength="500" placeholder="请填写" style="width: 425px">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -89,8 +94,9 @@
|
|||
<div class="layui-inline" style="width: 620px;margin-left: 2%;">
|
||||
<label class="layui-form-label"><i class="tip-required" style="color: red;font-size: 20px">*</i>单/双回路:</label>
|
||||
<div class="layui-input-block btnOption1 bmscTrain">
|
||||
<div data-value="单回路">单回路</div>
|
||||
<div data-value="双回路">双回路</div>
|
||||
<div data-value="0">单回路</div>
|
||||
<div data-value="1">双回路</div>
|
||||
<span style="color: #FF3B30;">*注:双回路请配置对应的双双回路杆塔</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,14 +3,15 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>护线员考勤</title>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../js/public/jq.js"></script>
|
||||
<script src="../../../js/public/token.js"></script>
|
||||
<script src="../../../js/public/public.js"></script>
|
||||
<script src="../../../js/public/public_utils.js"></script>
|
||||
<script src="../../../js/public/aescbc.js"></script>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../plugs/layui-v2.9.2/layui/layui.js"></script>
|
||||
<link href="../../../plugs/layui-v2.9.2/layui/css/layui.css" rel="stylesheet">
|
||||
<script src="../../../util/Interceptor.js"></script>
|
||||
<!-- <script src="../../../util/Interceptor.js"></script> -->
|
||||
<!--业务js-->
|
||||
<script src="../../../js/wireManager/project/projectDetail.js"></script>
|
||||
|
||||
|
|
@ -93,17 +94,17 @@
|
|||
<img src="../../../image/dataIcon2.png" alt="">
|
||||
</div>
|
||||
<div class="flex-column" style="margin-left: 5%;">
|
||||
<div style="font-weight: bold;font-size: 22px;">xxxxxx工程名称</div>
|
||||
<div style="color: darkgrey;margin-top: 10px;">双回路</div>
|
||||
<div id="proName" style="font-weight: bold;font-size: 22px;">--</div>
|
||||
<div class="isTwo" style="color: darkgrey;margin-top: 10px;">--</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-column" style="width: 20%;height: 100%;margin-left: 2%;">
|
||||
<div style="color: darkgrey;">杆塔数量</div>
|
||||
<div style="margin-top: 10px;">200</div>
|
||||
<div id="powerNum" style="margin-top: 10px;">0</div>
|
||||
</div>
|
||||
<div class="flex-column" style="width: 20%;height: 100%;margin-left: 2%;">
|
||||
<div style="color: darkgrey;">群众护线员数量</div>
|
||||
<div style="margin-top: 10px;">10</div>
|
||||
<div id="lineNum" style="margin-top: 10px;">0</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 30%;height: 100%;display: flex;align-items: center;justify-items: center;">
|
||||
|
|
@ -141,16 +142,16 @@
|
|||
<th>所属运检站</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500kV大宝Ⅰ回线</td>
|
||||
<td>运检一公司 / 迪庆运检站</td>
|
||||
<td id="lineProName">--</td>
|
||||
<td id="yjName">--</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>电压等级</th>
|
||||
<th>单/双回路</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500kV</td>
|
||||
<td>单回路</td>
|
||||
<td id="volLevel">--</td>
|
||||
<td class="isTwo">--</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
@ -160,43 +161,39 @@
|
|||
<div class="form-group" style="margin-top: 0.5%">
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<input id="search1" type="text" class="layui-input" placeholder="杆塔,护线员姓名" >
|
||||
<input id="keyWord" name="keyWord" type="text" class="layui-input" placeholder="杆塔,护线员姓名" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<select id="search2" name="search2" class="layui-select" lay-verify="required">
|
||||
<option value="" selected>杆塔绑定状态</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline" id="two">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit lay-filter="queryGm">
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal" onclick="queryClick1()">
|
||||
<i class="layui-icon layui-icon-search"></i>
|
||||
查询
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-primary" lay-submit lay-filter="resetGm">
|
||||
<button class="layui-btn layui-btn-sm layui-btn-primary" onclick="resetClick1()">
|
||||
<i class="layui-icon layui-icon-refresh"></i>
|
||||
重置
|
||||
</button>
|
||||
<button id="exportBt" class="layui-btn layui-btn-sm">
|
||||
<button id="exportBt" class="layui-btn layui-btn-sm" onclick="exportData1()">
|
||||
<i class="layui-icon"></i>
|
||||
导出
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal" onclick="addGm()">
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal" onclick="addClick1()">
|
||||
<i class="layui-icon"></i>
|
||||
新增杆塔
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal">
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal" onclick="updClick1()">
|
||||
<i class="layui-icon"></i>
|
||||
修改杆塔
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-danger">
|
||||
<button class="layui-btn layui-btn-sm layui-btn-danger" onclick="delClick1()">
|
||||
<i class="layui-icon"></i>
|
||||
删除杆塔
|
||||
</button>
|
||||
<button id="importBt" class="layui-btn layui-btn-sm">
|
||||
<button id="importBt" class="layui-btn layui-btn-sm" onclick="importData1()">
|
||||
<i class="layui-icon"></i>
|
||||
导入
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -2,15 +2,16 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>护线员考勤</title>
|
||||
<title>导入</title>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../js/public/jq.js"></script>
|
||||
<script src="../../../js/public/token.js"></script>
|
||||
<script src="../../../js/public/public.js"></script>
|
||||
<script src="../../../js/public/public_utils.js"></script>
|
||||
<script src="../../../js/public/aescbc.js"></script>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../plugs/layui-v2.9.2/layui/layui.js"></script>
|
||||
<link href="../../../plugs/layui-v2.9.2/layui/css/layui.css" rel="stylesheet">
|
||||
<script src="../../../util/Interceptor.js"></script>
|
||||
<!-- <script src="../../../util/Interceptor.js"></script> -->
|
||||
<!--业务js-->
|
||||
<script src="../../../js/wireManager/project/projectImport.js"></script>
|
||||
<!-- css -->
|
||||
|
|
@ -23,21 +24,41 @@
|
|||
</div>
|
||||
<div class="layui-form-item">
|
||||
</div>
|
||||
<div>
|
||||
<img src="../../../../image/down.jpg" height="100%">
|
||||
<div>
|
||||
<img src="../../../image/selectIcon.png" height="100%" width="13%">
|
||||
<div style="color: #333333;font-size: 16px;margin-top: 2%;">
|
||||
<div class="layui-inline" >
|
||||
<div style="color: #333333;font-size: 16px;margin-top: 2%;">
|
||||
选择导入工程信息
|
||||
</div>
|
||||
<div style="margin-top: 6%;">
|
||||
<select id="projecct" name="projecct">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 1.5%;">
|
||||
<img src="../../../image/down.jpg" height="100%">
|
||||
<div style="color: #333333;font-size: 16px;margin-top: 2%;">填写导入数据信息</div>
|
||||
<div style="color: #999999;margin-top: 0.6%;">请按照数据模板的格式准备导入数据,模板中的表头名称不可更改,表头行不能删除。</div>
|
||||
<div style="margin-top: 1%;">
|
||||
<a id="tempId" href="../../../../downloads/导入模版.xlsx" download="导入模版.xlsx" style="color: #409EFF;">下载模板</a>
|
||||
<a id="tempId" href="../../../templateDown/导入杆塔信息模板.xlsx" download="导入杆塔信息模板.xlsx" style="color: #409EFF;">下载模板</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="layui-upload" style="margin-top: 1.5%;">
|
||||
<img src="../../../../image/up.jpg" height="100%">
|
||||
<img src="../../../image/up.jpg" height="100%">
|
||||
<div style="color: #333333;font-size: 16px;margin-top: 2%;"><span style="color: red">*</span>上传填好的信息表</div>
|
||||
<div style="color: #999999;margin-top: 0.6%;">文件后缀名必须为xls或xlsx(即Excel格式),文件大小不得大于10M</div>
|
||||
<input style="margin-left: 30px;margin-top: 10px;" type="file" accept=".xls,.xlsx" id="file" name="file">
|
||||
</div>
|
||||
<div style="margin-top: 1.5%;background-color: #FFF5E6;border-radius: 5px;height: 16%;display: flex;align-items: center;">
|
||||
<img src="../../../image/exclamationMark.png" width="40" height="40" style="border: none; margin-left: 2%;"/>
|
||||
<div style="margin-left: 2%;">
|
||||
<div style="color:#666666">特别提示</div>
|
||||
<div style="color:#999999;font-size: 12px;margin-top:2%">导入过程中请确保工程名称与系统工程名称一致性</div>
|
||||
</div>
|
||||
</div>
|
||||
<button id="closeBt" class="layui-btn layui-btn-primary layui-border-blue" style="position: fixed;left: 9%;top: 80%;background-color: #ffffff">取消</button>
|
||||
<button id="searchBt" class="layui-btn" lay-submit lay-filter="formDemo" style="position: fixed;left: 90%;top: 80%;">保存</button>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -3,14 +3,15 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>工程库</title>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../js/public/jq.js"></script>
|
||||
<script src="../../../js/public/token.js"></script>
|
||||
<script src="../../../js/public/public.js"></script>
|
||||
<script src="../../../js/public/public_utils.js"></script>
|
||||
<script src="../../../js/public/aescbc.js"></script>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../plugs/layui-v2.9.2/layui/layui.js"></script>
|
||||
<link href="../../../plugs/layui-v2.9.2/layui/css/layui.css" rel="stylesheet">
|
||||
<script src="../../../util/Interceptor.js"></script>
|
||||
<!-- <script src="../../../util/Interceptor.js"></script> -->
|
||||
<!--业务js-->
|
||||
<script src="../../../js/wireManager/project/projectList.js"></script>
|
||||
|
||||
|
|
@ -40,22 +41,22 @@
|
|||
<div class="form-group" style="margin-top: 0.5%">
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<input id="search1" type="text" class="layui-input" placeholder="输入分公司名称" >
|
||||
<input id="fgsName" name="fgsName" type="text" class="layui-input" placeholder="输入分公司名称" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<input id="search2" type="text" class="layui-input" placeholder="输入工程名称" >
|
||||
<input id="proName" name="proName" type="text" class="layui-input" placeholder="输入工程名称" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit lay-filter="query">
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal" onclick="queryClick()">
|
||||
<i class="layui-icon layui-icon-search"></i>
|
||||
查询
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-primary" lay-submit lay-filter="reset">
|
||||
<button class="layui-btn layui-btn-sm layui-btn-primary" onclick="resetClick()">
|
||||
<i class="layui-icon layui-icon-refresh"></i>
|
||||
重置
|
||||
</button>
|
||||
|
|
@ -65,7 +66,7 @@
|
|||
<i class="layui-icon"></i>新增工程</button>
|
||||
<button id="importBt" class="layui-btn layui-btn-sm"
|
||||
onclick="importData()">
|
||||
<i class="layui-icon"></i>导入</button>
|
||||
<i class="layui-icon"></i>导入杆塔</button>
|
||||
<button id="exportBt" class="layui-btn layui-btn-sm"
|
||||
onclick="exportData()">
|
||||
<i class="layui-icon"></i>导出</button>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,77 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>护线员考勤</title>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../js/public/jq.js"></script>
|
||||
<script src="../../../js/public/token.js"></script>
|
||||
<script src="../../../js/public/public.js"></script>
|
||||
<script src="../../../js/public/public_utils.js"></script>
|
||||
<script src="../../../js/public/aescbc.js"></script>
|
||||
<script src="../../../plugs/layui2.7.6/layui.js"></script>
|
||||
<link href="../../../plugs/layui2.7.6/css/layui.css" rel="stylesheet">
|
||||
<!-- <script src="../../../util/Interceptor.js"></script> -->
|
||||
<!--业务js-->
|
||||
<script src="../../../js/wireManager/project/updTower.js"></script>
|
||||
<!-- css -->
|
||||
<link type="text/css" media="screen" href="../../../css/formAdd.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
.layui-form-item .layui-input-inline{
|
||||
width: 425px;
|
||||
}
|
||||
|
||||
.layui-form-item {
|
||||
position: relative;
|
||||
margin-bottom: 0px !important;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.btnOption1>div,.btnOption2>div,.btnOption3>div,.btnOption4>div,.btnOption5>div,.btnOption6>div{
|
||||
float: left;
|
||||
border: 1px solid #E4E4E4;
|
||||
border-radius: 10px;
|
||||
color: #9D9D9D;
|
||||
width: 83px;
|
||||
height: 38px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pass{
|
||||
border: 1px solid #A0CFFF!important;
|
||||
background-color: #F0F7FF!important;
|
||||
color: #409EFF!important;
|
||||
}
|
||||
.layui-dropdown{
|
||||
height: 300px;
|
||||
overflow-x: hidden;
|
||||
white-space: nowrap;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<form class="form-inline layui-form" onsubmit="return false">
|
||||
<div class="layui-form-item" style="margin-top: 5%;">
|
||||
<div class="layui-inline" style="margin-left: 10%; margin-top: 1%">
|
||||
<label class="layui-form-label" style="width: 116px;"><i class="tip-required"
|
||||
style="color: red;font-size: 20px">*</i>杆塔名称:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="gtName" id="gtName" class="layui-input" lay-verify="required" maxlength="200" autocomplete="off" placeholder="请输入杆塔名称" style="width: 425px">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button id="closeBt" class="layui-btn layui-btn-primary layui-border-blue" style="position: fixed;left: 6%;top: 80%;background-color: #ffffff">取消</button>
|
||||
<button id="submitBt" type="button" class="layui-btn" lay-submit lay-filter="formDemo" style="position: fixed;left: 87%;top: 80%;">保存</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
|
|
@ -0,0 +1,25 @@
|
|||
let Authorization = localStorage.getItem("smz-token");
|
||||
|
||||
$.ajaxSetup({
|
||||
cache : false,
|
||||
headers : {
|
||||
"Authorization" : Authorization
|
||||
},
|
||||
error : function(xhr, textStatus, errorThrown) {
|
||||
var msg = xhr.responseText;
|
||||
var response = JSON.parse(msg);
|
||||
var code = response.code;
|
||||
var message = response.message;
|
||||
if (code == 400) {
|
||||
layer.msg(message);
|
||||
} else if (code == 401) {
|
||||
localStorage.removeItem("smz-token");
|
||||
location.href = '/login.html';
|
||||
} else if (code == 403) {
|
||||
console.log("未授权:" + message);
|
||||
layer.msg('未授权');
|
||||
} else if (code == 500) {
|
||||
layer.msg('系统错误:' + message);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -1,11 +1,17 @@
|
|||
//系统请求路径
|
||||
let PATH_URL="http://127.0.0.1:18080/zhgd"
|
||||
let PATH_URL="http://127.0.0.1:1917/line"
|
||||
// let PATH_URL=getContextPath();
|
||||
//登录页面路径
|
||||
let LOGIN_PATH="http://127.0.0.1:8849/ah-bns-web/html/test/test.html";
|
||||
//加解密开关
|
||||
let jm_switch=false;
|
||||
let token=localStorage.getItem("token")
|
||||
let token=localStorage.getItem("smz-token")
|
||||
console.log(token)
|
||||
|
||||
|
||||
|
||||
function getContextPath() {
|
||||
var pathName = document.location.pathname;
|
||||
var index = pathName.substr(1).indexOf("/");
|
||||
var result = pathName.substr(0, index + 1);
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ function success(data,textStatus, jqXhr){
|
|||
}else if(data.code==401){
|
||||
window.location.href = LOGIN_PATH;
|
||||
}
|
||||
layer.msg("数据调用成功")
|
||||
//layer.msg("数据调用成功")
|
||||
}
|
||||
/**
|
||||
* 异常调用
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ var nextMonthFirstDay = new Date(currentDate.getFullYear(), currentDate.getMonth
|
|||
// 获取当前月份的天数 //本月多少天
|
||||
var daysInMonth = Math.floor((nextMonthFirstDay.getTime() - firstDay.getTime()) / (24 * 60 * 60 * 1000));
|
||||
// console.log(daysInMonth);
|
||||
var year = currentDate.getFullYear();
|
||||
var month = currentDate.getMonth() + 1;//当前第几月
|
||||
var pers = []
|
||||
var table,form,laydate,element;
|
||||
var tabIndex = 0;
|
||||
var tableType = 'layui_table1';
|
||||
var times = getCurrentDateTimeArr();
|
||||
layui.use(['form','layer','table','laydate','element'], function () {
|
||||
table = layui.table;
|
||||
form = layui.form;
|
||||
|
|
@ -19,10 +19,11 @@ layui.use(['form','layer','table','laydate','element'], function () {
|
|||
|
||||
// 渲染时间选择器
|
||||
laydate.render({
|
||||
elem: '#month',
|
||||
elem: '#makeMonth',
|
||||
type: 'month',
|
||||
format: 'yyyy-MM',
|
||||
fullPanel: true,
|
||||
value: times[0] + "-" + times[1]
|
||||
});
|
||||
|
||||
//监听Tab切换,以改变地址hash值
|
||||
|
|
@ -34,44 +35,26 @@ layui.use(['form','layer','table','laydate','element'], function () {
|
|||
// $('#search2').val('');
|
||||
// $('#search3').val('');
|
||||
// $('#month').val('');
|
||||
|
||||
if(tabIndex==0){
|
||||
tableType = 'layui_table1';
|
||||
initTable1();
|
||||
}else if(tabIndex==1){
|
||||
tableType = 'layui_table2';
|
||||
initTable2();
|
||||
}else if(tabIndex==2){
|
||||
tableType = 'layui_table3';
|
||||
initTable3();
|
||||
}else{
|
||||
tableType = 'layui_table1';
|
||||
initTable1();
|
||||
}
|
||||
});
|
||||
|
||||
// 触发submit提交 按钮点击或者表单被执行提交时触发
|
||||
form.on('submit(query)', function (data) {
|
||||
console.log($('#month').val())
|
||||
let arr = $('#month').val().split('-')
|
||||
month = Number(arr[1]);
|
||||
year = Number(arr[0]);
|
||||
daysInMonth = new Date(arr[0], arr[1], 0).getDate();
|
||||
|
||||
console.log("搜索")
|
||||
if(tabIndex==0){
|
||||
initTable1();
|
||||
}else if(tabIndex==1){
|
||||
initTable2();
|
||||
}else if(tabIndex==2){
|
||||
initTable3();
|
||||
}else{
|
||||
initTable1();
|
||||
}
|
||||
return false; // 阻止表单跳转。如果需要表单跳转,去掉这段即可。
|
||||
});
|
||||
|
||||
table.on('tool(table)', function (obj) {
|
||||
table.on(`tool(${tableType})`, function (obj) {
|
||||
switch (obj.event) {
|
||||
case 'detail':
|
||||
console.log('详情',obj)
|
||||
checkView()
|
||||
checkView(obj)
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -81,93 +64,89 @@ layui.use(['form','layer','table','laydate','element'], function () {
|
|||
|
||||
});
|
||||
|
||||
// 静态数据
|
||||
var tableData = [
|
||||
{id: 1,isWork:['2.1','2.3','7.4','7.15'],name: '李云飞', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
|
||||
{id: 1,isWork:['7.21','7.31','7.14'],name: '肖洁', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'/'},
|
||||
{id: 1,isWork:['7.22','7.23','7.24'],name: '李小龙', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
|
||||
{id: 1,isWork:['7.12','7.13','7.14'],name: '李小龙', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
|
||||
{id: 1,isWork:['7.2','7.3','7.4'],name: '张爱国', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'/'},
|
||||
{id: 1,isWork:['7.4','7.5','7.7'],name: '孙建国', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'/'},
|
||||
{id: 1,isWork:['7.4','7.9','7.7'],name: '孙建国', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'/'},
|
||||
{id: 1,isWork:['7.4','7.5','7.8'],name: '孙建国', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'/'},
|
||||
{id: 1,isWork:['7.2','7.3','7.4'],name: '孙建国', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'/'},
|
||||
{id: 1,isWork:['7.2','7.3','7.4'],name: '孙建国', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'/'},
|
||||
{id: 1,isWork:['7.2','7.3','7.4'],name: '孙建国', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
|
||||
{id: 1,isWork:['7.2','7.3','7.4'],name: '李小龙', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
|
||||
{id: 1,isWork:['7.2','7.3','7.4'],name: '李小龙', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
|
||||
{id: 1,isWork:['7.2','7.3','7.4'],name: '李小龙', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
|
||||
{id: 1,isWork:['7.2','7.3','7.4'],name: '李云飞', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
|
||||
{id: 1,isWork:['7.2','7.3','7.4'],name: '肖洁', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
|
||||
{id: 1,isWork:['7.2','7.3','7.4'],name: '李云飞', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
|
||||
{id: 1,isWork:['7.2','7.3','7.4'],name: '肖洁', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
|
||||
{id: 1,isWork:['7.2','7.3','7.4'],name: '肖洁', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
|
||||
{id: 1,isWork:['7.2','7.3','7.4'],name: '李云飞', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
|
||||
{id: 1,isWork:['7.2','7.3','7.4'],name: '肖洁', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
|
||||
];
|
||||
/**
|
||||
* 重置操作
|
||||
*/
|
||||
function reset(){
|
||||
console.log("重置")
|
||||
console.log(tabIndex)
|
||||
$('#search1').val('');
|
||||
$('#search2').val('');
|
||||
$('#search3').val('');
|
||||
$('#month').val('');
|
||||
if(tabIndex==0){
|
||||
initTable1();
|
||||
}else if(tabIndex==1){
|
||||
initTable2();
|
||||
}else if(tabIndex==2){
|
||||
initTable3();
|
||||
}else{
|
||||
initTable1();
|
||||
}
|
||||
|
||||
//查询
|
||||
function queryClick(){
|
||||
let userName = $('#userName').val();
|
||||
let proName = $('#proName').val();
|
||||
let yjName = $('#yjName').val();
|
||||
let startMakeMonth = $('#makeMonth').val();
|
||||
let endMakeMonth = $('#makeMonth').val();
|
||||
table.reload(tableType, {
|
||||
where: {
|
||||
userName: userName,
|
||||
proName: proName,
|
||||
yjName: yjName,
|
||||
startMakeMonth: startMakeMonth,
|
||||
endMakeMonth: endMakeMonth
|
||||
}
|
||||
})
|
||||
}
|
||||
//重置
|
||||
function resetClick(){
|
||||
$('#userName').val("");
|
||||
$('#proName').val("");
|
||||
$('#yjName').val("");
|
||||
$('#makeMonth').val("");
|
||||
table.reload(tableType, {
|
||||
where: {
|
||||
userName: "",
|
||||
proName: "",
|
||||
yjName: "",
|
||||
startMakeMonth: '',
|
||||
endMakeMonth: "",
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 初始化数据 全部
|
||||
*/
|
||||
function initTable1(){
|
||||
console.log('全部')
|
||||
let obj = {
|
||||
"tabIndex": tabIndex,
|
||||
"search1": $("#search1").val(),
|
||||
"search2": $("#search2").val(),
|
||||
"search3": $("#search3").val(),
|
||||
"month": $("#month").val(),
|
||||
}
|
||||
// 渲染表格
|
||||
table.render({
|
||||
elem: '#table',
|
||||
// url: "/sys/achievement",
|
||||
// where: obj,
|
||||
page: true,
|
||||
skin: 'line', // 表格样式
|
||||
cols: [[
|
||||
{
|
||||
title: '序号',
|
||||
field: 'zizeng',
|
||||
align: 'center',
|
||||
type: 'numbers'
|
||||
},
|
||||
{field:'name', title: '姓 名',align: 'center',},
|
||||
{field:'idCard', title: '身份证号',align: 'center',},
|
||||
{field:'phone', title: '联系电话',align: 'center',},
|
||||
{field:'month', title: '月份',align: 'center',},
|
||||
{field:'normal', title: '正常巡视(基*次)',align: 'center',},
|
||||
{field:'special', title: '正常特巡(天*人)',align: 'center',width:170},
|
||||
{field:'line', title: '管辖线路名称',align: 'center',width:170},
|
||||
{field:'station', title: '所属运检站',align: 'center', },
|
||||
{
|
||||
title: '操作',
|
||||
toolbar: '#opeator-bar',
|
||||
align: 'center',
|
||||
width: 200
|
||||
}
|
||||
]],
|
||||
data: tableData
|
||||
id: 'layui_table1',
|
||||
elem: '#table',
|
||||
url: PATH_URL + '/attendance/getAllInspectionList',
|
||||
where: {
|
||||
startMakeMonth: $('#makeMonth').val(),
|
||||
endMakeMonth: $('#makeMonth').val()
|
||||
},
|
||||
page: true, //开启分页
|
||||
method:'post',
|
||||
skin: 'line', // 表格样式
|
||||
cols: [[
|
||||
// {
|
||||
// type: 'checkbox'
|
||||
// },
|
||||
{
|
||||
title: '序号',
|
||||
field: 'zizeng',
|
||||
align: 'center',
|
||||
type: 'numbers'
|
||||
},
|
||||
{field:'userName', title: '姓名',align: 'center',},
|
||||
{field:'idNumber', title: '身份证号',align: 'center',},
|
||||
{field:'tel', title: '联系电话',align: 'center',},
|
||||
{field:'makeMonth', title: '月份',align: 'center',},
|
||||
|
||||
{field:'allMake', title: '正常巡视(基*次)',align: 'center',},
|
||||
{field:'special', title: '特巡(天*人)',align: 'center',width:170},
|
||||
{field:'proName', title: '管辖线路名称',align: 'center',width:170},
|
||||
{field:'yjName', title: '所属运检站',align: 'center', },
|
||||
{
|
||||
title: '操作',
|
||||
toolbar: '#opeator-bar',
|
||||
align: 'center',
|
||||
width: 200
|
||||
}
|
||||
]],
|
||||
done: function(res,curr,count){
|
||||
//checkPermission();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
|
@ -177,43 +156,60 @@ function initTable1(){
|
|||
*/
|
||||
function initTable2(){
|
||||
console.log('正常巡视统计')
|
||||
let obj = {
|
||||
"tabIndex": tabIndex,
|
||||
"search1": $("#search1").val(),
|
||||
"search2": $("#search2").val(),
|
||||
"search3": $("#search3").val(),
|
||||
"month": $("#month").val(),
|
||||
}
|
||||
// 渲染表格
|
||||
table.render({
|
||||
elem: '#table',
|
||||
// url: "/sys/achievement",
|
||||
// where: obj,
|
||||
page: true,
|
||||
skin: 'line', // 表格样式
|
||||
cols: [[
|
||||
{
|
||||
title: '序号',
|
||||
field: 'zizeng',
|
||||
align: 'center',
|
||||
type: 'numbers'
|
||||
},
|
||||
{field:'name', title: '姓名',align: 'center',},
|
||||
{field:'line', title: '管辖线路名称',align: 'center',},
|
||||
{field:'station', title: '所属运检站',align: 'center',},
|
||||
{field:'month', title: '月份',align: 'center',},
|
||||
{field:'first', title: '巡1次区段(塔)',align: 'center',},
|
||||
{field:'normal', title: '巡1次张数',align: 'center',width:170},
|
||||
{field:'second', title: '巡2次区段(塔)',align: 'center',width:170},
|
||||
{field:'special', title: '巡2次张数',align: 'center', },
|
||||
{
|
||||
title: '操作',
|
||||
toolbar: '#opeator-bar',
|
||||
align: 'center',
|
||||
width: 200
|
||||
}
|
||||
]],
|
||||
data: tableData
|
||||
id: 'layui_table2',
|
||||
elem: '#table',
|
||||
url: PATH_URL + '/lineProject/getLineProjectList',
|
||||
where: {
|
||||
},
|
||||
page: true, //开启分页
|
||||
method:'post',
|
||||
skin: 'line', // 表格样式
|
||||
cols: [[
|
||||
// {
|
||||
// type: 'checkbox'
|
||||
// },
|
||||
{
|
||||
title: '序号',
|
||||
field: 'zizeng',
|
||||
align: 'center',
|
||||
type: 'numbers'
|
||||
},
|
||||
{field:'fgsName', title: '分公司',align: 'center',},
|
||||
{field:'yjName', title: '运检站',align: 'center',},
|
||||
{field:'proName', title: '线路工程名称',align: 'center',},
|
||||
{field:'volLevel', title: '电压等级',align: 'center',},
|
||||
{
|
||||
title: '单/双回路',
|
||||
field: '',
|
||||
align: 'center',
|
||||
templet: function(d){
|
||||
let isTwo = d.isTwo;
|
||||
let html;
|
||||
if(isTwo == '0' || isTwo == 0){
|
||||
html = '<span>单回路</span>'
|
||||
}else{
|
||||
html = '<span>双回路</span>'
|
||||
}
|
||||
// 返回模板内容
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{field:'powerNum', title: '杆塔数量',align: 'center',},
|
||||
{field:'lineNum', title: '群众护线员数量',align: 'center',width:170},
|
||||
{field:'inLinePowerNum', title: '已绑定护线员杆塔数量',align: 'center',width:170},
|
||||
{field:'unLinePowerNum', title: '未绑定护线员杆塔数量',align: 'center', },
|
||||
{
|
||||
title: '操作',
|
||||
toolbar: '#opeator-bar',
|
||||
align: 'center',
|
||||
width: 200
|
||||
}
|
||||
]],
|
||||
done: function(res,curr,count){
|
||||
//checkPermission();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -222,56 +218,59 @@ function initTable2(){
|
|||
*/
|
||||
function initTable3(){
|
||||
console.log('特巡统计')
|
||||
let obj = {
|
||||
"tabIndex": tabIndex,
|
||||
"search1": $("#search1").val(),
|
||||
"search2": $("#search2").val(),
|
||||
"search3": $("#search3").val(),
|
||||
"month": $("#month").val(),
|
||||
}
|
||||
let cols = [
|
||||
{
|
||||
title: '序号',
|
||||
field: 'zizeng',
|
||||
align: 'center',
|
||||
type: 'numbers'
|
||||
},
|
||||
{field:'name', title: '姓 名',align: 'center',width:100},
|
||||
{field:'line', title: '管辖线路名称',align: 'center',width:200},
|
||||
{field:'station', title: '所属运检站',align: 'center',width:200},
|
||||
{field:'special', title: '总计(天)',align: 'center',width:100,templet: function(d){
|
||||
return `<apan>${d.isWork.length}</apan>`
|
||||
}},
|
||||
|
||||
]
|
||||
console.log(daysInMonth,'daysInMonth')
|
||||
for (let k = 1; k <= daysInMonth; k++) {
|
||||
let str = month+'.'+k;
|
||||
let obj = {field:'isWork', title: str,align: 'center',width:70,
|
||||
templet: function(d){
|
||||
if(d.isWork.includes(d.LAY_COL.title)){
|
||||
return `<i class="layui-icon" style="color: red;"></i> `
|
||||
}else{
|
||||
return `<apan></apan>`
|
||||
}
|
||||
}}
|
||||
cols.push(obj)
|
||||
}
|
||||
cols.push({
|
||||
title: '操作',
|
||||
toolbar: '#opeator-bar',
|
||||
align: 'center',
|
||||
width: 200
|
||||
})
|
||||
// 渲染表格
|
||||
table.render({
|
||||
elem: '#table',
|
||||
// url: "/sys/achievement",
|
||||
// where: obj,
|
||||
page: true,
|
||||
skin: 'line', // 表格样式
|
||||
cols: [cols],
|
||||
data: tableData
|
||||
id: 'layui_table3',
|
||||
elem: '#table',
|
||||
url: PATH_URL + '/lineProject/getLineProjectList',
|
||||
where: {
|
||||
},
|
||||
page: true, //开启分页
|
||||
method:'post',
|
||||
skin: 'line', // 表格样式
|
||||
cols: [[
|
||||
// {
|
||||
// type: 'checkbox'
|
||||
// },
|
||||
{
|
||||
title: '序号',
|
||||
field: 'zizeng',
|
||||
align: 'center',
|
||||
type: 'numbers'
|
||||
},
|
||||
{field:'fgsName', title: '分公司',align: 'center',},
|
||||
{field:'yjName', title: '运检站',align: 'center',},
|
||||
{field:'proName', title: '线路工程名称',align: 'center',},
|
||||
{field:'volLevel', title: '电压等级',align: 'center',},
|
||||
{
|
||||
title: '单/双回路',
|
||||
field: '',
|
||||
align: 'center',
|
||||
templet: function(d){
|
||||
let isTwo = d.isTwo;
|
||||
let html;
|
||||
if(isTwo == '0' || isTwo == 0){
|
||||
html = '<span>单回路</span>'
|
||||
}else{
|
||||
html = '<span>双回路</span>'
|
||||
}
|
||||
// 返回模板内容
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{field:'powerNum', title: '杆塔数量',align: 'center',},
|
||||
{field:'lineNum', title: '群众护线员数量',align: 'center',width:170},
|
||||
{field:'inLinePowerNum', title: '已绑定护线员杆塔数量',align: 'center',width:170},
|
||||
{field:'unLinePowerNum', title: '未绑定护线员杆塔数量',align: 'center', },
|
||||
{
|
||||
title: '操作',
|
||||
toolbar: '#opeator-bar',
|
||||
align: 'center',
|
||||
width: 200
|
||||
}
|
||||
]],
|
||||
done: function(res,curr,count){
|
||||
//checkPermission();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -279,18 +278,19 @@ function initTable3(){
|
|||
/**
|
||||
* 详情
|
||||
* */
|
||||
function checkView(id) {
|
||||
function checkView(obj) {
|
||||
let height = '98%';
|
||||
let width = '95%';
|
||||
// $.ajax({
|
||||
// type: 'post',
|
||||
// contentType: "application/x-www-form-urlencoded",
|
||||
// url: oiPlanUrl + '/monthlyPlanSubmission/getDataById',
|
||||
// dataType: 'json',
|
||||
// data: {
|
||||
// id: id
|
||||
// },
|
||||
// success: function (data) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: PATH_URL + '/attendance/getInspectionParticular',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify({
|
||||
makeMonth: $("#makeMonth").val(),
|
||||
proId: obj.data.proId
|
||||
}),
|
||||
success: function (data) {
|
||||
console.log("dataaaaaa:", data)
|
||||
var index = layer.open({
|
||||
title: ['详情'],
|
||||
type: 2,
|
||||
|
|
@ -300,13 +300,14 @@ function checkView(id) {
|
|||
success: function (layero, index) {
|
||||
// console.log(data);
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
myIframe.init(year,month);
|
||||
// var fnc = myIframe.setData(data.data); //aaa()为子页面的方法
|
||||
var times = obj.data.makeMonth.split("-")
|
||||
myIframe.init(times[0],times[1]);
|
||||
myIframe.setData(data); //aaa()为子页面的方法
|
||||
|
||||
},
|
||||
});
|
||||
// }
|
||||
// })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -31,14 +31,27 @@ layui.use(['form','layer','table','laydate','element'], function () {
|
|||
}
|
||||
|
||||
//监听Tab切换,以改变地址hash值
|
||||
element.on('tab(projectTab)', function(data){
|
||||
console.log(data)
|
||||
console.log(tabList[data.index])
|
||||
// tabIndex = data.index;
|
||||
getView()
|
||||
});
|
||||
// element.on('tab(projectTab)', function(data){
|
||||
// console.log(data)
|
||||
// console.log(tabList[data.index])
|
||||
// // tabIndex = data.index;
|
||||
// getView()
|
||||
// });
|
||||
});
|
||||
|
||||
|
||||
function setData(data){
|
||||
$("#username").text(data.data.userName);
|
||||
$("#tel").text(data.data.tel);
|
||||
|
||||
$("#allMake").text(data.data.allMake);
|
||||
$("#oneMake").text(data.data.oneMake);
|
||||
$("#twoMake").text(data.data.twoMake);
|
||||
$("#special").text(data.data.special);
|
||||
$("#makeMonth").val(data.data.makeMonth);
|
||||
|
||||
getView(data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化数据
|
||||
|
|
@ -71,85 +84,136 @@ function init(chosenYear,chosenMonth){
|
|||
cols: [cols],
|
||||
data: tableData
|
||||
});
|
||||
getTab(chosenMonth)
|
||||
// getTab(chosenMonth)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function getTab(chosenMonth){
|
||||
console.log(chosenMonth)
|
||||
tabList = [{id:'1',projectName:'xxx工程'},{id:'2',projectName:'xxx工程'},{id:'3',projectName:'xxx工程'},{id:'4',projectName:'xxx工程'}]
|
||||
// projectList
|
||||
$("#projectList").html('')
|
||||
let html = ``
|
||||
for (let k = 0; k < tabList.length; k++) {
|
||||
if(k==0){
|
||||
html+= '<li class="layui-this" style="margin-left:20px;">'+ tabList[0].projectName +'</li>';
|
||||
}else{
|
||||
html+= '<li>'+ tabList[k].projectName +'</li>';
|
||||
}
|
||||
}
|
||||
$("#projectList").append(html);
|
||||
getView()
|
||||
}
|
||||
// function getTab(chosenMonth){
|
||||
// console.log(chosenMonth)
|
||||
// tabList = [{id:'1',projectName:'xxx工程'},{id:'2',projectName:'xxx工程'},{id:'3',projectName:'xxx工程'},{id:'4',projectName:'xxx工程'}]
|
||||
// // projectList
|
||||
// $("#projectList").html('')
|
||||
// let html = ``
|
||||
// for (let k = 0; k < tabList.length; k++) {
|
||||
// if(k==0){
|
||||
// html+= '<li class="layui-this" style="margin-left:20px;">'+ tabList[0].projectName +'</li>';
|
||||
// }else{
|
||||
// html+= '<li>'+ tabList[k].projectName +'</li>';
|
||||
// }
|
||||
// }
|
||||
// $("#projectList").append(html);
|
||||
// getView()
|
||||
// }
|
||||
|
||||
function getView(){
|
||||
viewList1 = [{name:'#1'},{name:'#1'},{name:'#1'},{name:'#1'},{name:'#1'},{name:'#1'},{name:'#1'},{name:'#1'},{name:'#1'}]
|
||||
function getView(data){
|
||||
var oneMakeList = data.data.oneMakeList;
|
||||
$("#firstViewBox").html('');
|
||||
let html1 = ``;
|
||||
for (let i = 0;i < viewList1.length;i++) {
|
||||
for (let i = 0;i < oneMakeList.length;i++) {
|
||||
var color;
|
||||
var proNameHtml;
|
||||
var height;
|
||||
var imgHeight;
|
||||
if(oneMakeList[i].makeType == "0"){
|
||||
//巡视计划内
|
||||
color = "#52C1F5";
|
||||
proNameHtml = ""
|
||||
height = "220px"
|
||||
imgHeight = "210px";
|
||||
}else{
|
||||
//巡视计划外
|
||||
color = "#FF9900";
|
||||
proNameHtml = `
|
||||
<div class="viewFooter">
|
||||
<i class="layui-icon"></i>
|
||||
${ oneMakeList[i].proName }
|
||||
</div>
|
||||
`;
|
||||
height = "196px";
|
||||
imgHeight = "186px";
|
||||
}
|
||||
html1+= `<div class="viewBox">
|
||||
<div class="viewHeader">
|
||||
<div class="viewHeader" style="background-color: ${color};">
|
||||
<img src="../../../image/dataIcon3.png" alt="">
|
||||
<span>${viewList1[i].name}</span>
|
||||
<span>${oneMakeList[i].gtName}</span>
|
||||
</div>
|
||||
<div class="viewContent">
|
||||
<img src="../../../image/viewImg.jpg" alt="">
|
||||
<div class="viewContent" style="height: ${ height }">
|
||||
<img src="../../../image/viewImg.jpg" style="height: ${ imgHeight }" alt="">
|
||||
</div>
|
||||
<div class="viewFooter">
|
||||
<i class="layui-icon"></i>
|
||||
2024-03-15
|
||||
</div>
|
||||
${ proNameHtml }
|
||||
</div>`;
|
||||
}
|
||||
$("#firstViewBox").append(html1);
|
||||
|
||||
viewList2 = [{name:'#2'},{name:'#2'},{name:'#2'},{name:'#2'},{name:'#2'},{name:'#2'},{name:'#2'},{name:'#2'},{name:'#2'}]
|
||||
var twoMakeList = data.data.twoMakeList;
|
||||
$("#secondViewBox").html('');
|
||||
let html2 = ``;
|
||||
for (let j = 0;j < viewList2.length;j++) {
|
||||
for (let i = 0;i < twoMakeList.length;i++) {
|
||||
var color;
|
||||
var proNameHtml;
|
||||
var height;
|
||||
var imgHeight;
|
||||
if(oneMakeList[i].makeType == "0"){
|
||||
//巡视计划内
|
||||
color = "#52C1F5";
|
||||
proNameHtml = "";
|
||||
height = "220px";
|
||||
imgHeight = "210px";
|
||||
}else{
|
||||
//巡视计划外
|
||||
color = "#FF9900";
|
||||
proNameHtml = `
|
||||
<div class="viewFooter">
|
||||
<i class="layui-icon"></i>
|
||||
${ twoMakeList[i].proName }
|
||||
</div>
|
||||
`;
|
||||
height = "196px";
|
||||
imgHeight = "186px";
|
||||
}
|
||||
html2+= `<div class="viewBox">
|
||||
<div class="viewHeader">
|
||||
<div class="viewHeader" style="background-color: ${color};">
|
||||
<img src="../../../image/dataIcon3.png" alt="">
|
||||
<span>${viewList2[j].name}</span>
|
||||
<span>${twoMakeList[i].gtName}</span>
|
||||
</div>
|
||||
<div class="viewContent">
|
||||
<img src="../../../image/viewImg.jpg" alt="">
|
||||
<div class="viewContent" style="height: ${ height }">
|
||||
<img src="../../../image/viewImg.jpg" style="height: ${ imgHeight }" alt="">
|
||||
</div>
|
||||
<div class="viewFooter">
|
||||
<i class="layui-icon"></i>
|
||||
2024-03-15
|
||||
</div>
|
||||
${ proNameHtml }
|
||||
</div>`;
|
||||
}
|
||||
$("#secondViewBox").append(html2);
|
||||
|
||||
viewList3 = [{name:'#3'},{name:'#3'},{name:'#3'},{name:'#3'},{name:'#3'},{name:'#3'},{name:'#3'},{name:'#3'},{name:'#3'}]
|
||||
spMakeList = data.data.spMakeList;
|
||||
$("#specialViewBox").html('');
|
||||
let html3 = ``;
|
||||
for (let j = 0;j < viewList3.length;j++) {
|
||||
html3+= `<div class="viewBox">
|
||||
<div class="viewHeader">
|
||||
for (let i = 0;i < spMakeList.length;i++) {
|
||||
var color;
|
||||
var proNameHtml;
|
||||
var height;
|
||||
var imgHeight;
|
||||
html2+= `<div class="viewBox">
|
||||
<div class="viewHeader" style="background-color: #73A0FA;">
|
||||
<img src="../../../image/dataIcon3.png" alt="">
|
||||
<span>${viewList3[j].name}</span>
|
||||
<span>${spMakeList[i].gtName}</span>
|
||||
</div>
|
||||
<div class="viewContent">
|
||||
<img src="../../../image/viewImg.jpg" alt="">
|
||||
<div class="viewContent" style="height: 220px">
|
||||
<img src="../../../image/viewImg.jpg" style="height: 210px" alt="">
|
||||
</div>
|
||||
<div class="viewFooter">
|
||||
<i class="layui-icon"></i>
|
||||
2024-03-15
|
||||
</div>
|
||||
${ proNameHtml }
|
||||
</div>`;
|
||||
}
|
||||
$("#specialViewBox").append(html3);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,47 @@
|
|||
let laypage,table,form,element;
|
||||
let layer,laypage,table,form,element,dropdown;
|
||||
|
||||
layui.use(['element', 'layer', 'form', 'element','laypage'], function(){
|
||||
var layer = layui.layer; //弹层
|
||||
element = layui.element; //分页
|
||||
laypage = layui.laypage; //分页
|
||||
table = layui.table; //表格
|
||||
form=layui.form;
|
||||
})
|
||||
layer = layui.layer; //弹层
|
||||
element = layui.element; //分页
|
||||
laypage = layui.laypage; //分页
|
||||
table = layui.table; //表格
|
||||
form=layui.form;
|
||||
dropdown = layui.dropdown;
|
||||
|
||||
init()
|
||||
})
|
||||
|
||||
function init(){
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: PATH_URL + '/homePageSelect/getLineProtectorSubComAndStandDropdown', // 请求地址
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: {}, //获取提交的表单字段
|
||||
success: function (data) {
|
||||
console.log("datadatasss:", data.data)
|
||||
$("#taskSourceId").val(data.data[0].child[0].parentName + ' / ' + data.data[0].child[0].title);
|
||||
$("#taskSourceId").attr("stationId", data.data[0].child[0].id);
|
||||
$("#taskSourceId").attr("stationName", data.data[0].child[0].title);
|
||||
|
||||
dropdown.render({
|
||||
elem: '#taskSourceId',
|
||||
accordion: true,
|
||||
data: data.data,
|
||||
click: function(item){
|
||||
console.log(item)
|
||||
$("#taskSourceId").val(`${item.parentName + ' / ' + item.title}`);
|
||||
$("#taskSourceId").attr("stationId", item.id);
|
||||
$("#taskSourceId").attr("stationName", item.title);
|
||||
|
||||
var iframe = $("#indexFrame")[0];
|
||||
var iframeWindow = iframe.contentWindow;
|
||||
iframeWindow.setData();
|
||||
},
|
||||
});
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, e) {
|
||||
layer.msg('数据请求发生异常,请稍后重试', {icon: 16, scrollbar: false});
|
||||
top.layer.close(addLoadingMsg); //再执行关闭
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1,246 +1,141 @@
|
|||
let laypage,table,form,element;
|
||||
let layer,laypage,table,form,element;
|
||||
|
||||
layui.use(['element', 'layer', 'form', 'element','laypage'], function(){
|
||||
var layer = layui.layer; //弹层
|
||||
layer = layui.layer; //弹层
|
||||
element = layui.element; //分页
|
||||
laypage = layui.laypage; //分页
|
||||
table = layui.table; //表格
|
||||
form=layui.form;
|
||||
var list = [{name:'111',personnelAvgUseRate:'30'},{name:'222',personnelAvgUseRate:'11'},{name:'333',personnelAvgUseRate:'45'}];
|
||||
// console.log(list)
|
||||
monthRateEcharts(list)
|
||||
getTableData()
|
||||
|
||||
|
||||
|
||||
setData();
|
||||
})
|
||||
|
||||
function setData(){
|
||||
|
||||
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: PATH_URL + '/lineProjectHomePage/getDataOverview',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify({"yjId": yjId}),
|
||||
success: function (data) {
|
||||
console.log("data:", data)
|
||||
var dataOverview = data.dataOverview;
|
||||
//线路总数
|
||||
$("#proNum").text(dataOverview.proNum);
|
||||
//护线员人数
|
||||
$("#workerNum").text(dataOverview.workerNum);
|
||||
//杆塔总数
|
||||
$("#towerNum").text(dataOverview.towerNum);
|
||||
//本月已巡视
|
||||
$("#makeNum").text(dataOverview.makeNum);
|
||||
//本月未巡视
|
||||
$("#notMakeNum").text(dataOverview.notMakeNum);
|
||||
//本月特巡天数
|
||||
$("#specialDayNum").text(dataOverview.specialDayNum);
|
||||
|
||||
|
||||
|
||||
//处理一下数据,将数据与右下角的表格列一一对应
|
||||
var value = data.proDataOverview;
|
||||
var arr = []
|
||||
for (var i = 0; i < value.length; i++) {
|
||||
var json = {
|
||||
index: i + 1,
|
||||
lineProName: value[i].lineProName,
|
||||
towerNum: value[i].towerNum,
|
||||
makeNum: value[i].makeNum,
|
||||
notMakeNum: value[i].notMakeNum,
|
||||
workerNum: value[i].workerNum,
|
||||
makeWorkerNum: value[i].makeWorkerNum,
|
||||
arrivalRate: value[i].arrivalRate,
|
||||
}
|
||||
arr.push(json);
|
||||
}
|
||||
//表格数据赋值
|
||||
getTableData(arr);
|
||||
|
||||
//echart图数据赋值
|
||||
monthRateEcharts(data.dataOverview)
|
||||
},
|
||||
error: function (xhr, textStatus, errorThrown) {
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function getTableData(){
|
||||
// $.ajax({
|
||||
// type: 'post',
|
||||
// url: oiPlanUrl + '/dayPlanStatistics/getPersonnelUtilizationRate',
|
||||
// data: {
|
||||
// companyId: companyId,
|
||||
// month: $("#workTime").val(),
|
||||
// },
|
||||
// success: function (data) {
|
||||
let data = {
|
||||
code:200,
|
||||
data:[
|
||||
{ index:1,
|
||||
project:"工程xxxxx",
|
||||
gmNum:"10",
|
||||
viewNum:"11",
|
||||
unViewNum:"12",
|
||||
peopleNum:"13",
|
||||
viewPeople:"14",
|
||||
rate:"88.3%"
|
||||
},
|
||||
{ index:2,
|
||||
project:"工程xxxxx",
|
||||
gmNum:"10",
|
||||
viewNum:"11",
|
||||
unViewNum:"12",
|
||||
peopleNum:"13",
|
||||
viewPeople:"14",
|
||||
rate:"88.3%"
|
||||
},
|
||||
{ index:3,
|
||||
project:"工程xxxxx",
|
||||
gmNum:"10",
|
||||
viewNum:"11",
|
||||
unViewNum:"12",
|
||||
peopleNum:"13",
|
||||
viewPeople:"14",
|
||||
rate:"88.3%"
|
||||
},
|
||||
{ index:4,
|
||||
project:"工程xxxxx",
|
||||
gmNum:"10",
|
||||
viewNum:"11",
|
||||
unViewNum:"12",
|
||||
peopleNum:"13",
|
||||
viewPeople:"14",
|
||||
rate:"88.3%"
|
||||
},
|
||||
{ index:5,
|
||||
project:"工程xxxxx",
|
||||
gmNum:"10",
|
||||
viewNum:"11",
|
||||
unViewNum:"12",
|
||||
peopleNum:"13",
|
||||
viewPeople:"14",
|
||||
rate:"88.3%"
|
||||
},
|
||||
{ index:6,
|
||||
project:"工程xxxxx",
|
||||
gmNum:"10",
|
||||
viewNum:"11",
|
||||
unViewNum:"12",
|
||||
peopleNum:"13",
|
||||
viewPeople:"14",
|
||||
rate:"88.3%"
|
||||
},
|
||||
{ index:7,
|
||||
project:"工程xxxxx",
|
||||
gmNum:"10",
|
||||
viewNum:"11",
|
||||
unViewNum:"12",
|
||||
peopleNum:"13",
|
||||
viewPeople:"14",
|
||||
rate:"88.3%"
|
||||
},
|
||||
{ index:8,
|
||||
project:"工程xxxxx",
|
||||
gmNum:"10",
|
||||
viewNum:"11",
|
||||
unViewNum:"12",
|
||||
peopleNum:"13",
|
||||
viewPeople:"14",
|
||||
rate:"88.3%"
|
||||
},
|
||||
{ index:9,
|
||||
project:"工程xxxxx",
|
||||
gmNum:"10",
|
||||
viewNum:"11",
|
||||
unViewNum:"12",
|
||||
peopleNum:"13",
|
||||
viewPeople:"14",
|
||||
rate:"88.3%"
|
||||
},
|
||||
{ index:10,
|
||||
project:"工程xxxxx",
|
||||
gmNum:"10",
|
||||
viewNum:"11",
|
||||
unViewNum:"12",
|
||||
peopleNum:"13",
|
||||
viewPeople:"14",
|
||||
rate:"88.3%"
|
||||
},
|
||||
{ index:11,
|
||||
project:"工程xxxxx",
|
||||
gmNum:"10",
|
||||
viewNum:"11",
|
||||
unViewNum:"12",
|
||||
peopleNum:"13",
|
||||
viewPeople:"14",
|
||||
rate:"88.3%"
|
||||
},
|
||||
{ index:12,
|
||||
project:"工程xxxxx",
|
||||
gmNum:"10",
|
||||
viewNum:"11",
|
||||
unViewNum:"12",
|
||||
peopleNum:"13",
|
||||
viewPeople:"14",
|
||||
rate:"88.3%"
|
||||
},
|
||||
{ index:13,
|
||||
project:"工程xxxxx",
|
||||
gmNum:"10",
|
||||
viewNum:"11",
|
||||
unViewNum:"12",
|
||||
peopleNum:"13",
|
||||
viewPeople:"14",
|
||||
rate:"88.3%"
|
||||
},
|
||||
{ index:14,
|
||||
project:"工程xxxxx",
|
||||
gmNum:"10",
|
||||
viewNum:"11",
|
||||
unViewNum:"12",
|
||||
peopleNum:"13",
|
||||
viewPeople:"14",
|
||||
rate:"88.3%"
|
||||
},
|
||||
{ index:15,
|
||||
project:"工程xxxxx",
|
||||
gmNum:"10",
|
||||
viewNum:"11",
|
||||
unViewNum:"12",
|
||||
peopleNum:"13",
|
||||
viewPeople:"14",
|
||||
rate:"88.3%"
|
||||
},
|
||||
{ index:16,
|
||||
project:"工程xxxxx",
|
||||
gmNum:"10",
|
||||
viewNum:"11",
|
||||
unViewNum:"12",
|
||||
peopleNum:"13",
|
||||
viewPeople:"14",
|
||||
rate:"88.3%"
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
intervalId = "";
|
||||
var html ="";
|
||||
$("#personnelTable thead tr").empty();
|
||||
$("#personnelTable tbody").empty();
|
||||
if (data.code == 200) {
|
||||
var list = data.data;
|
||||
if(list.length>0){
|
||||
html+= '<th width="10%">序号</th>';
|
||||
html+= '<th width="12%">工程名称</th>';
|
||||
html+= '<th width="12%">杆塔数量</th>';
|
||||
html+= '<th width="12%">已巡数量</th>';
|
||||
html+= '<th width="12%">未巡数量</th>';
|
||||
html+= '<th width="12%">护线员人数</th>';
|
||||
html+= '<th width="12%">已巡视人数</th>';
|
||||
html+= '<th width="12%">到位率</th>';
|
||||
// for (let i = 0; i < list[0].length; i++) {
|
||||
// html+= '<th title="'+list[0][i].name+'">'+list[0][i].name+'</th>';
|
||||
// }
|
||||
$("#personnelTable thead tr").append(html);
|
||||
var echartArr = [];
|
||||
for (let k = 0; k < list.length; k++) {
|
||||
var obj = {};
|
||||
obj = list[k]
|
||||
// obj.data = list[k][0].date;
|
||||
// for (let i = 0; i < l; i++) {
|
||||
// obj['personnelAvgUseRate' + i] = Number(list[k][i].personnelAvgUseRate * 100).toFixed(2)+"%";
|
||||
// }
|
||||
echartArr.push(obj);
|
||||
}
|
||||
var tbody = $('#personnelTable tbody');
|
||||
echartArr.forEach(function(item) {
|
||||
// console.log(item)
|
||||
|
||||
// console.log(Object.values(item))
|
||||
var row = $('<tr>');
|
||||
Object.values(item).forEach(function(value) {
|
||||
// console.log(value)
|
||||
var cell = $('<td>').text(value);
|
||||
row.append(cell);
|
||||
});
|
||||
tbody.append(row);
|
||||
});
|
||||
}
|
||||
clearInterval(intervalId);
|
||||
// monveinout();
|
||||
console.log("ddddd");
|
||||
$("#personnelRate").unbind()
|
||||
$("#personnelRate").hover(function(){
|
||||
clearInterval(intervalId);
|
||||
},function(){
|
||||
intervalId = setInterval(scrolldiv, 40);
|
||||
});
|
||||
// 开始滚动
|
||||
scrollableDiv = $('.scrollable'); // 假设你的滚动容器类名为.scrollable
|
||||
totalHeight = scrollableDiv[0].scrollHeight;
|
||||
visibleHeight = scrollableDiv.innerHeight();
|
||||
currentScrollTop = 0;
|
||||
intervalId = setInterval(scrolldiv, 40); // 这个数字是滚动间隔的时间,单位是毫秒
|
||||
// 如果需要停止滚动,可以使用以下代码
|
||||
// clearInterval(intervalId);
|
||||
}else{
|
||||
|
||||
}
|
||||
// },
|
||||
// error: function (xhr, textStatus, errorThrown) {
|
||||
// }
|
||||
// });
|
||||
function getTableData(list){
|
||||
let data = {
|
||||
code:200,
|
||||
data: list
|
||||
|
||||
}
|
||||
intervalId = "";
|
||||
var html ="";
|
||||
$("#personnelTable thead tr").empty();
|
||||
$("#personnelTable tbody").empty();
|
||||
if (data.code == 200) {
|
||||
var list = data.data;
|
||||
if(list.length>0){
|
||||
html+= '<th width="10%">序号</th>';
|
||||
html+= '<th width="12%">工程名称</th>';
|
||||
html+= '<th width="12%">杆塔数量</th>';
|
||||
html+= '<th width="12%">已巡数量</th>';
|
||||
html+= '<th width="12%">未巡数量</th>';
|
||||
html+= '<th width="12%">护线员人数</th>';
|
||||
html+= '<th width="12%">已巡视人数</th>';
|
||||
html+= '<th width="12%">到位率</th>';
|
||||
// for (let i = 0; i < list[0].length; i++) {
|
||||
// html+= '<th title="'+list[0][i].name+'">'+list[0][i].name+'</th>';
|
||||
// }
|
||||
$("#personnelTable thead tr").append(html);
|
||||
var echartArr = [];
|
||||
for (let k = 0; k < list.length; k++) {
|
||||
var obj = {};
|
||||
obj = list[k]
|
||||
// obj.data = list[k][0].date;
|
||||
// for (let i = 0; i < l; i++) {
|
||||
// obj['personnelAvgUseRate' + i] = Number(list[k][i].personnelAvgUseRate * 100).toFixed(2)+"%";
|
||||
// }
|
||||
echartArr.push(obj);
|
||||
}
|
||||
var tbody = $('#personnelTable tbody');
|
||||
echartArr.forEach(function(item) {
|
||||
// console.log(item)
|
||||
|
||||
// console.log(Object.values(item))
|
||||
var row = $('<tr>');
|
||||
Object.values(item).forEach(function(value) {
|
||||
// console.log(value)
|
||||
var cell = $('<td>').text(value);
|
||||
row.append(cell);
|
||||
});
|
||||
tbody.append(row);
|
||||
});
|
||||
}
|
||||
clearInterval(intervalId);
|
||||
// monveinout();
|
||||
console.log("ddddd");
|
||||
$("#personnelRate").unbind()
|
||||
$("#personnelRate").hover(function(){
|
||||
clearInterval(intervalId);
|
||||
},function(){
|
||||
intervalId = setInterval(scrolldiv, 40);
|
||||
});
|
||||
// 开始滚动
|
||||
scrollableDiv = $('.scrollable'); // 假设你的滚动容器类名为.scrollable
|
||||
totalHeight = scrollableDiv[0].scrollHeight;
|
||||
visibleHeight = scrollableDiv.innerHeight();
|
||||
currentScrollTop = 0;
|
||||
intervalId = setInterval(scrolldiv, 40); // 这个数字是滚动间隔的时间,单位是毫秒
|
||||
// 如果需要停止滚动,可以使用以下代码
|
||||
// clearInterval(intervalId);
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
function monveinout(){
|
||||
const element = document.getElementById('personnelRate');
|
||||
|
|
@ -260,7 +155,7 @@ function monveinout(){
|
|||
});
|
||||
}
|
||||
var scrollableDiv = $('.scrollable'); // 假设你的滚动容器类名为.scrollable
|
||||
var totalHeight = scrollableDiv[0].scrollHeight;
|
||||
var totalHeight = $('.scrollable').scrollHeight;//scrollHeight;
|
||||
var visibleHeight = scrollableDiv.innerHeight();
|
||||
var currentScrollTop = 0;
|
||||
function scrolldiv() {
|
||||
|
|
@ -276,15 +171,15 @@ function scrolldiv() {
|
|||
}
|
||||
|
||||
//图表
|
||||
function monthRateEcharts(list) {
|
||||
function monthRateEcharts(data) {
|
||||
console.log('monthRateEcharts')
|
||||
//先销毁
|
||||
echarts.init(document.getElementById("monthRate")).dispose();
|
||||
var myChart = echarts.init(document.getElementById("monthRate"));
|
||||
|
||||
var value = 0.6;//百分比
|
||||
var value1 = 1100//已巡杆塔数
|
||||
var value2 = 1300//总杆塔数
|
||||
var value = data.arrivalRate;//百分比
|
||||
var value1 = data.makeNum//已巡杆塔数
|
||||
var value2 = data.towerNum//总杆塔数
|
||||
var option = {
|
||||
backgroundColor: '#fff',
|
||||
title: [
|
||||
|
|
@ -328,7 +223,7 @@ function monthRateEcharts(list) {
|
|||
},
|
||||
},
|
||||
{
|
||||
text: (value * 100).toFixed(0),
|
||||
text: value,
|
||||
left: '47.5%',
|
||||
top: '40%',
|
||||
textAlign: 'center',
|
||||
|
|
@ -339,7 +234,6 @@ function monthRateEcharts(list) {
|
|||
},
|
||||
|
||||
{
|
||||
text:"%",
|
||||
left: '56%',
|
||||
top: '43%',
|
||||
textAlign: 'center',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,74 @@
|
|||
var layer;
|
||||
var parentData;
|
||||
layui.use(['layer', 'form'], function () {
|
||||
var form = layui.form;
|
||||
layer = layui.layer;
|
||||
|
||||
|
||||
|
||||
|
||||
$("#closeBt").click(function () {
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
});
|
||||
|
||||
// 验证成功后才会执行下面的操作
|
||||
form.on('submit(formDemo)', function (data) {
|
||||
addData(data); // 新增
|
||||
});
|
||||
});
|
||||
|
||||
function setData(proId){
|
||||
parentData = proId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param formData
|
||||
*/
|
||||
function addData(formData) {
|
||||
// 加载提示
|
||||
let loadingMsg = layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']});
|
||||
|
||||
formData.field.proId = parentData;
|
||||
// form请求地址
|
||||
let formUrl = PATH_URL + "/lineProject/insertPower";
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: formUrl, // 请求地址
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify(formData.field),
|
||||
success: function (data) {
|
||||
debugger
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if(data.code == 200){
|
||||
parent.layer.msg("添加成功", { icon: 1 });
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
parent.document.getElementById('powerNum').innerText = data.data.powerNum;
|
||||
// reloading();
|
||||
}else{
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, e) {
|
||||
layer.close(loadingMsg);
|
||||
layer.msg('数据请求发生异常,请稍后重试', {icon: 16, scrollbar: false});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 关闭页面 刷新页面
|
||||
*/
|
||||
function reloading() {
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
window.parent.location.reload();
|
||||
}
|
||||
|
|
@ -6,23 +6,22 @@ var examFileNames = [];
|
|||
var examFilePaths = [];
|
||||
var assignmentTypeStatus = "";
|
||||
|
||||
var workTypeValue = "";
|
||||
var workMethodValue = "";
|
||||
var controlLevelValue = "";
|
||||
var riskLevelValue = "";
|
||||
var controlMethodsValue = "";
|
||||
var isSupportValue = "";
|
||||
layui.use(['layer', 'form', 'upload','laydate'], function () {
|
||||
var workTypeValue = -1;
|
||||
var dropdown;
|
||||
var layer;
|
||||
var parentData;
|
||||
layui.use(['layer', 'form', 'upload','laydate','dropdown'], function () {
|
||||
var laydate = layui.laydate;
|
||||
var upload1 = layui.upload;
|
||||
var upload2 = layui.upload;
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
layer = layui.layer;
|
||||
dropdown = layui.dropdown;
|
||||
|
||||
|
||||
//按钮样式
|
||||
btnStyle();
|
||||
|
||||
initPower()
|
||||
|
||||
|
||||
$("#closeBt").click(function () {
|
||||
|
|
@ -32,7 +31,7 @@ layui.use(['layer', 'form', 'upload','laydate'], function () {
|
|||
|
||||
// 验证成功后才会执行下面的操作
|
||||
form.on('submit(formDemo)', function (data) {
|
||||
if($("#id").val()==''){
|
||||
if($("#proId").val()==''){
|
||||
addData(data); // 新增
|
||||
}else{
|
||||
updateData(data); // 修改
|
||||
|
|
@ -40,7 +39,32 @@ layui.use(['layer', 'form', 'upload','laydate'], function () {
|
|||
});
|
||||
});
|
||||
|
||||
|
||||
//初始化
|
||||
function initPower(){
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: PATH_URL + '/homePageSelect/getLineProtectorSubComAndStandDropdown', // 请求地址
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: {}, //获取提交的表单字段
|
||||
success: function (data) {
|
||||
console.log("data:", data)
|
||||
dropdown.render({
|
||||
elem: '#taskSourceId',
|
||||
data: data.data,
|
||||
click: function(item){
|
||||
console.log(item)
|
||||
$("#taskSourceId").val(`${item.parentName + ' / ' + item.title}`);
|
||||
$("#taskSourceId").attr("stationId", item.id);
|
||||
$("#taskSourceId").attr("stationName", item.title);
|
||||
},
|
||||
});
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, e) {
|
||||
layer.msg('数据请求发生异常,请稍后重试', {icon: 16, scrollbar: false});
|
||||
top.layer.close(addLoadingMsg); //再执行关闭
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -49,54 +73,29 @@ layui.use(['layer', 'form', 'upload','laydate'], function () {
|
|||
* @param formData
|
||||
*/
|
||||
function addData(formData) {
|
||||
if (workTypeValue == "") {
|
||||
layer.msg("请选择作业类型", {icon: 0})
|
||||
return
|
||||
}else if (workMethodValue == "") {
|
||||
layer.msg("请选择作业方式", {icon: 0})
|
||||
return
|
||||
}else if (controlLevelValue == "") {
|
||||
layer.msg("请选择管控层级", {icon: 0})
|
||||
return
|
||||
}else if (riskLevelValue == "") {
|
||||
layer.msg("请选择风险等级", {icon: 0})
|
||||
return
|
||||
}else if (controlMethodsValue == "") {
|
||||
layer.msg("请选择管控方式", {icon: 0})
|
||||
return
|
||||
}else if (isSupportValue == "") {
|
||||
layer.msg("请选择是否需要外协人员支援", {icon: 0})
|
||||
if (workTypeValue == -1) {
|
||||
layer.msg("请选择回路类型", {icon: 0})
|
||||
return
|
||||
}else {
|
||||
console.log(formData.field);
|
||||
var allCheckboxStates = getAllCheckboxStates();
|
||||
console.log(allCheckboxStates);
|
||||
|
||||
|
||||
formData.field.isTwo = workTypeValue;
|
||||
formData.field.yjId = $("#taskSourceId").attr("stationId");
|
||||
formData.field.yjName = $("#taskSourceId").attr("stationName");
|
||||
// 加载提示
|
||||
let loadingMsg = layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']});
|
||||
// form请求地址
|
||||
let formUrl = oiPlanUrl + "/monthlyPlanSubmission/add";
|
||||
let formUrl = PATH_URL + "/lineProject/insertPro";
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
async: false, // 默认异步true,false表示同步
|
||||
url: formUrl, // 请求地址
|
||||
data:{
|
||||
"proName": $("#proName").val(),
|
||||
"workType": workTypeValue,
|
||||
"workMethod": workMethodValue,
|
||||
"controlLevel": controlLevelValue,
|
||||
"riskLevel": riskLevelValue,
|
||||
|
||||
"controlMethods": controlMethodsValue,
|
||||
|
||||
"isSupport": isSupportValue,
|
||||
},
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify(formData.field),
|
||||
success: function (data) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if(data.code == 200){
|
||||
top.layer.msg("添加成功");
|
||||
reloading();
|
||||
parent.layer.msg("添加成功", { icon: 1 });
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
// reloading();
|
||||
}else{
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
|
@ -115,32 +114,33 @@ function addData(formData) {
|
|||
* @returns {boolean}
|
||||
*/
|
||||
function updateData(formData) {
|
||||
var allCheckboxStates = getAllCheckboxStates();
|
||||
|
||||
if(parentData.data.proName === $("#lineProName").val()){
|
||||
layer.msg("您想要修改的杆塔名称与原名称一致,无法修改!", { icon: 0, time: 3000 });
|
||||
$("#lineProName").focus();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
formData.field.isTwo = workTypeValue;
|
||||
formData.field.yjId = $("#taskSourceId").attr("stationId");
|
||||
formData.field.yjName = $("#taskSourceId").attr("stationName");
|
||||
// 加载提示
|
||||
let loadingMsg = layer.msg('数据请求中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']});
|
||||
// form请求地址
|
||||
let formUrl = oiPlanUrl + "/monthlyPlanSubmission/update";
|
||||
let formUrl = PATH_URL + "/lineProject/updatePro";
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
async: false, // 默认异步true,false表示同步
|
||||
url: formUrl, // 请求地址
|
||||
data:{
|
||||
"id": $("#id").val(),
|
||||
"proName": $("#proName").val(),
|
||||
"workType": workTypeValue,
|
||||
"workMethod": workMethodValue,
|
||||
"controlLevel": controlLevelValue,
|
||||
"riskLevel": riskLevelValue,
|
||||
|
||||
"controlMethods": controlMethodsValue,
|
||||
|
||||
"isSupport": isSupportValue,
|
||||
},
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify(formData.field),
|
||||
success: function (data) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if(data.code == 200){
|
||||
top.layer.msg("修改成功");
|
||||
reloading();
|
||||
parent.layer.msg("修改成功", { icon: 1 });
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
//reloading();
|
||||
}else{
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
|
@ -152,20 +152,6 @@ function updateData(formData) {
|
|||
});
|
||||
}
|
||||
|
||||
// 获取所有复选框的当前状态
|
||||
function getAllCheckboxStates() {
|
||||
var checkboxes = document.querySelectorAll('.bmscTrain input[type="checkbox"]');
|
||||
var states = {};
|
||||
checkboxes.forEach(function(checkbox) {
|
||||
if (checkbox.checked){
|
||||
states[checkbox.name] = 1;
|
||||
}else {
|
||||
states[checkbox.name] = 0;
|
||||
}
|
||||
});
|
||||
console.log(states);
|
||||
return states;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -178,113 +164,10 @@ function btnStyle() {
|
|||
$(this).attr('value', value).siblings().attr('value', '');
|
||||
workTypeValue = value;
|
||||
});
|
||||
|
||||
$('.btnOption2 > div').click(function () {
|
||||
$(this).addClass('pass').siblings().removeClass('pass');
|
||||
var value = $(this).data('value');
|
||||
$(this).attr('value', value).siblings().attr('value', '');
|
||||
workMethodValue = value;
|
||||
});
|
||||
|
||||
$('.btnOption3 > div').click(function () {
|
||||
$(this).addClass('pass').siblings().removeClass('pass');
|
||||
var value = $(this).data('value');
|
||||
$(this).attr('value', value).siblings().attr('value', '');
|
||||
controlLevelValue = value;
|
||||
});
|
||||
|
||||
$('.btnOption4 > div').click(function () {
|
||||
$(this).addClass('pass').siblings().removeClass('pass');
|
||||
var value = $(this).data('value');
|
||||
$(this).attr('value', value).siblings().attr('value', '');
|
||||
riskLevelValue = value;
|
||||
});
|
||||
|
||||
$('.btnOption5 > div').click(function () {
|
||||
$(this).addClass('pass').siblings().removeClass('pass');
|
||||
var value = $(this).data('value');
|
||||
$(this).attr('value', value).siblings().attr('value', '');
|
||||
controlMethodsValue = value;
|
||||
});
|
||||
|
||||
$('.btnOption6 > div').click(function () {
|
||||
$(this).addClass('pass').siblings().removeClass('pass');
|
||||
var value = $(this).data('value');
|
||||
$(this).attr('value', value).siblings().attr('value', '');
|
||||
isSupportValue = value;
|
||||
console.log(isSupportValue);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function importData() {
|
||||
var fileData = new FormData();
|
||||
fileData.append('file', $('#file')[0].files[0]);
|
||||
fileData.append('trainFileName', trainFileNames.toString());
|
||||
fileData.append('trainFilePath', trainFilePaths.toString());
|
||||
fileData.append('examFileName', examFileNames.toString());
|
||||
fileData.append('examFilePath', examFilePaths.toString());
|
||||
// 加载提示
|
||||
loadingMsg = top.layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']});
|
||||
// form请求地址
|
||||
var formUrl = oiPlanUrl + "/offlineResUpload/importData";
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: formUrl, // 请求地址
|
||||
data: fileData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function (data) {
|
||||
top.layer.close(loadingMsg); //再执行关闭
|
||||
if (data.code == 200) {
|
||||
top.layer.alert(data.msg);
|
||||
|
||||
reloading();
|
||||
} else {
|
||||
top.layer.alert(data.msg, {icon: 2});
|
||||
}
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, e) {
|
||||
layer.msg('数据请求发生异常,请稍后重试', {icon: 16, scrollbar: false});
|
||||
top.layer.close(addLoadingMsg); //再执行关闭
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取任务来源
|
||||
* @param id
|
||||
* @param key
|
||||
*/
|
||||
function getTaskSource(id,key) {
|
||||
$("#"+id).empty();
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: oiPlanUrl + '/monthlyPlanSubmission/getTaskSource',
|
||||
async: false,
|
||||
success: function (data) {
|
||||
if(data.code == 200){
|
||||
var html = ''
|
||||
for (let i = 0; i < data.data.length; i++) {
|
||||
if (key == data.data[i].id) {
|
||||
html += '<option selected value=\'' + data.data[i].id + '\'>' + data.data[i].name + '</option>';
|
||||
} else {
|
||||
html += '<option value=\'' + data.data[i].id + '\'>' + data.data[i].name + '</option>';
|
||||
}
|
||||
}
|
||||
$("#"+id).append(html);
|
||||
}else{
|
||||
$("#"+id).append('<option value="">--无数据--</option>');
|
||||
}
|
||||
layui.form.render();
|
||||
},
|
||||
error: function (err) {
|
||||
console.log("获取字典表出错:", err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐藏提交按钮和关闭按钮
|
||||
|
|
@ -307,58 +190,22 @@ function hideSubmit() {
|
|||
* @param data
|
||||
*/
|
||||
function setData(data) {
|
||||
console.log(data);
|
||||
$("#id").val(data[0].id);
|
||||
$("#proName").val(data[0].proName);
|
||||
getTaskSource("taskSourceId",data[0].taskSourceId);
|
||||
// $("#taskSourceId").val(data[0].taskSourceId);
|
||||
parentData = data;
|
||||
|
||||
$("#proId").val(data.data.proId);
|
||||
$("#taskSourceId").val(data.data.fgsName + " / " + data.data.yjName);
|
||||
$("#lineProName").val(data.data.proName);
|
||||
$("#volLevel").val(data.data.volLevel);
|
||||
|
||||
$("#taskSourceId").attr("stationId", data.data.yjId);
|
||||
$("#taskSourceId").attr("stationName", data.data.yjName);
|
||||
|
||||
// 首先移除所有选项的 pass 类
|
||||
$('.btnOption1 > div').removeClass('pass');
|
||||
// 根据 值 添加 pass 类和设置 value 属性
|
||||
$('.btnOption1 > div').each(function () {
|
||||
if ($(this).data('value') === data[0].workType) {
|
||||
$(this).addClass('pass').attr('value', data[0].workType);
|
||||
} else {
|
||||
$(this).attr('value', '');
|
||||
}
|
||||
});
|
||||
|
||||
// 首先移除所有选项的 pass 类
|
||||
$('.btnOption2 > div').removeClass('pass');
|
||||
// 根据 值 添加 pass 类和设置 value 属性
|
||||
$('.btnOption2 > div').each(function () {
|
||||
if ($(this).data('value') == data[0].workMethod) {
|
||||
$(this).addClass('pass').attr('value', data[0].workMethod);
|
||||
} else {
|
||||
$(this).attr('value', '');
|
||||
}
|
||||
});
|
||||
// 首先移除所有选项的 pass 类
|
||||
$('.btnOption3 > div').removeClass('pass');
|
||||
// 根据 值 添加 pass 类和设置 value 属性
|
||||
$('.btnOption3 > div').each(function () {
|
||||
if ($(this).data('value') == data[0].controlLevel) {
|
||||
$(this).addClass('pass').attr('value', data[0].controlLevel);
|
||||
} else {
|
||||
$(this).attr('value', '');
|
||||
}
|
||||
});
|
||||
// 首先移除所有选项的 pass 类
|
||||
$('.btnOption4 > div').removeClass('pass');
|
||||
// 根据 值 添加 pass 类和设置 value 属性
|
||||
$('.btnOption4 > div').each(function () {
|
||||
if ($(this).data('value') == data[0].riskLevel) {
|
||||
$(this).addClass('pass').attr('value', data[0].riskLevel);
|
||||
} else {
|
||||
$(this).attr('value', '');
|
||||
}
|
||||
});
|
||||
// 首先移除所有选项的 pass 类
|
||||
$('.btnOption5 > div').removeClass('pass');
|
||||
// 根据 值 添加 pass 类和设置 value 属性
|
||||
$('.btnOption5 > div').each(function () {
|
||||
if ($(this).data('value') == data[0].controlMethods) {
|
||||
$(this).addClass('pass').attr('value', data[0].controlMethods);
|
||||
if ($(this).data('value') === data.data.isTwo) {
|
||||
$(this).addClass('pass').attr('value', data.data.isTwo);
|
||||
} else {
|
||||
$(this).attr('value', '');
|
||||
}
|
||||
|
|
@ -366,18 +213,8 @@ function setData(data) {
|
|||
|
||||
var checkStatus = {};
|
||||
setCheckboxStates(checkStatus);
|
||||
console.log(checkStatus);
|
||||
console.log("checkStatus:", checkStatus);
|
||||
|
||||
// 首先移除所有选项的 pass 类
|
||||
$('.btnOption6 > div').removeClass('pass');
|
||||
// 根据 值 添加 pass 类和设置 value 属性
|
||||
$('.btnOption6 > div').each(function () {
|
||||
if ($(this).data('value') == data[0].isSupport) {
|
||||
$(this).addClass('pass').attr('value', data[0].isSupport);
|
||||
} else {
|
||||
$(this).attr('value', '');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 根据提供的状态对象来设置复选框的状态
|
||||
|
|
|
|||
|
|
@ -1,31 +1,34 @@
|
|||
var table,form,layer,element;
|
||||
var parentData;
|
||||
layui.use(['form','layer','table','element'], function () {
|
||||
table = layui.table;
|
||||
form = layui.form;
|
||||
layer = layui.layer;
|
||||
|
||||
|
||||
//杆塔信息
|
||||
|
||||
initGmTable()
|
||||
// 触发submit提交 按钮点击或者表单被执行提交时触发
|
||||
form.on('submit(queryGm)', function (data) {
|
||||
console.log("搜索")
|
||||
// 对表格进行重载。id 即 table表格的id
|
||||
table.reload('gmTable', {
|
||||
// //设定异步数据接口的额外参数
|
||||
page:{curr : 1}
|
||||
,where: data.field
|
||||
})
|
||||
return false; // 阻止表单跳转。如果需要表单跳转,去掉这段即可。
|
||||
});
|
||||
if(parentData.isTwo == '0'){
|
||||
//单回路
|
||||
initGmTableOne();
|
||||
}else{
|
||||
//双回路
|
||||
var html = `<div class="layui-input-inline">
|
||||
<select id="type" name="type" class="layui-select" lay-verify="required">
|
||||
<option value="" >杆塔绑定状态</option>
|
||||
<option value="1" >已绑定</option>
|
||||
<option value="2" >未绑定</option>
|
||||
</select>
|
||||
</div>`
|
||||
$("#two").append(html)
|
||||
initGmTableTwo();
|
||||
}
|
||||
form.on('submit(resetGm)', function () {
|
||||
console.log("重置")
|
||||
$('#search1').val('');
|
||||
$('#search2').val('');
|
||||
$('#keyWord').val('');
|
||||
$('#type').val('');
|
||||
form.render("select");
|
||||
let obj = {
|
||||
search1:'',
|
||||
search2:''
|
||||
keyWord:'',
|
||||
type:'',
|
||||
proId: parentData.proId
|
||||
}
|
||||
// 对表格进行重载。id 即 table表格的id
|
||||
table.reload('gmTable', {
|
||||
|
|
@ -35,19 +38,13 @@ layui.use(['form','layer','table','element'], function () {
|
|||
})
|
||||
return false; // 阻止表单跳转。如果需要表单跳转,去掉这段即可。
|
||||
});
|
||||
let selectList = [{name:'全部',value:''},{name:'已绑定',value:'0'},{name:'未绑定',value:'1'}]
|
||||
$.each(selectList, function(index, value) {
|
||||
// console.log(value);
|
||||
$('#search2').append(new Option(value.name, value.value)); // 下拉菜单里添加元素
|
||||
});
|
||||
form.render("select");//重新渲染
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//人员信息
|
||||
initStaffTable()
|
||||
//initStaffTable()
|
||||
// 触发submit提交 按钮点击或者表单被执行提交时触发
|
||||
form.on('submit(queryUser)', function (data) {
|
||||
console.log("搜索")
|
||||
|
|
@ -75,110 +72,305 @@ layui.use(['form','layer','table','element'], function () {
|
|||
})
|
||||
return false; // 阻止表单跳转。如果需要表单跳转,去掉这段即可。
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
form.render();
|
||||
init();
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// 静态数据
|
||||
var tableData = [
|
||||
{id: 1, gmName: 'N1', lName: '张三', uName: 'J10 (xxxx乙线)',month:'张三'},
|
||||
{id: 1, gmName: 'N1', lName: '张三', uName: 'J10 (xxxx乙线)',month:'张三'},
|
||||
{id: 1, gmName: 'N1', lName: '张三', uName: 'J10 (xxxx乙线)',month:'张三'},
|
||||
{id: 1, gmName: 'N1', lName: '张三', uName: 'J10 (xxxx乙线)',month:'张三'},
|
||||
{id: 1, gmName: 'N1', lName: '张三', uName: 'J10 (xxxx乙线)',month:'张三'},
|
||||
{id: 1, gmName: 'N1', lName: '张三', uName: 'J10 (xxxx乙线)',month:'张三'},
|
||||
{id: 1, gmName: 'N1', lName: '张三', uName: 'J10 (xxxx乙线)',month:'张三'},
|
||||
{id: 1, gmName: 'N1', lName: '张三', uName: 'J10 (xxxx乙线)',month:'张三'},
|
||||
{id: 1, gmName: 'N1', lName: '张三', uName: 'J10 (xxxx乙线)',month:'张三'},
|
||||
{id: 1, gmName: 'N1', lName: '张三', uName: 'J10 (xxxx乙线)',month:'张三'},
|
||||
{id: 1, gmName: 'N1', lName: '张三', uName: 'J10 (xxxx乙线)',month:'张三'},
|
||||
{id: 1, gmName: 'N1', lName: '张三', uName: 'J10 (xxxx乙线)',month:'张三'},
|
||||
{id: 1, gmName: 'N1', lName: '张三', uName: 'J10 (xxxx乙线)',month:'张三'},
|
||||
{id: 1, gmName: 'N1', lName: '张三', uName: 'J10 (xxxx乙线)',month:'张三'},
|
||||
{id: 1, gmName: 'N1', lName: '张三', uName: 'J10 (xxxx乙线)',month:'张三'},
|
||||
{id: 1, gmName: 'N1', lName: '张三', uName: 'J10 (xxxx乙线)',month:'张三'},
|
||||
];
|
||||
|
||||
// 静态数据
|
||||
var tableData2 = [
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
{id: 1, name: '李云飞', idCard: '342224196202241356', phone: '15665366624',line:'500kV邑劝甲线,500kV邑劝乙线',area:'N1/N2/N3/N4/N5/N6/N7/N8/N9/N10',startTime:'2024-01-01', endTime:'2025-01-01'},
|
||||
];
|
||||
|
||||
/**
|
||||
* 初始化数据
|
||||
*/
|
||||
function init(){
|
||||
|
||||
//杆塔信息搜索
|
||||
function queryClick1(){
|
||||
var type = "";
|
||||
if(parentData.isTwo == '1'){
|
||||
//双回路
|
||||
type = $("#type").val();
|
||||
}
|
||||
// 对表格进行重载。id 即 table表格的id
|
||||
table.reload('layui_table', {
|
||||
// //设定异步数据接口的额外参数
|
||||
page:{curr : 1}
|
||||
,where: {
|
||||
'keyWord': $("#keyWord").val(),
|
||||
'type': type,
|
||||
'proId': parentData.proId
|
||||
}
|
||||
})
|
||||
}
|
||||
// 渲染杆塔表格
|
||||
function initGmTable(){
|
||||
|
||||
table.render({
|
||||
elem: '#gmTable',
|
||||
// url: "/sys/achievement",
|
||||
page: true,
|
||||
skin: 'line', // 表格样式
|
||||
cols: [[
|
||||
{
|
||||
type: 'checkbox'
|
||||
|
||||
//重置
|
||||
function resetClick1(){
|
||||
//重置
|
||||
$('#keyWord').val("");
|
||||
$('#type').val("");
|
||||
table.reload('layui_table', {
|
||||
where: {
|
||||
'keyWord': '',
|
||||
'type': '',
|
||||
'proId': parentData.proId
|
||||
}
|
||||
})
|
||||
}
|
||||
//新增杆塔
|
||||
function addClick1(){
|
||||
var height = '80%';
|
||||
var width = '50%';
|
||||
var index = layer.open({
|
||||
title: ['新增', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: 'addTower.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function (layero, index) {
|
||||
// //打开页面成功时执行
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
myIframe.setData(parentData.proId);
|
||||
|
||||
},
|
||||
yes: function (index, layero) {
|
||||
// //提交子页面时执行
|
||||
// // 获取弹出层中的form表单元素
|
||||
// var formSubmit = layer.getChildFrame('form', index);
|
||||
// var submited = formSubmit.find('button')[0];
|
||||
// // 触发点击事件,会对表单进行验证,验证成功则提交表单,失败则返回错误信息
|
||||
// // var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
// // myIframe.selectCheck(); //aaa()为子页面的方法
|
||||
// submited.click();
|
||||
// example.ajax.reload(); // 刷新页面
|
||||
},
|
||||
end: function(){
|
||||
if(parentData.isTwo == '0'){
|
||||
initGmTableOne()
|
||||
}else{
|
||||
initGmTableTwo()
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
//修改杆塔信息
|
||||
function updClick1(){
|
||||
var checkStatus = table.checkStatus('layui_table');
|
||||
var data = checkStatus.data;
|
||||
if(data.length == 0){
|
||||
layer.msg("请勾选需要修改的数据", { icon: 0} );
|
||||
return;
|
||||
}
|
||||
if(data.length > 1){
|
||||
layer.msg("请勿勾选多个", { icon: 0} )
|
||||
return;
|
||||
}
|
||||
|
||||
var height = '80%';
|
||||
var width = '50%';
|
||||
var index = layer.open({
|
||||
title: ['修改', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: 'updTower.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function (layero, index) {
|
||||
// //打开页面成功时执行
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
myIframe.setData(data, parentData.proId);
|
||||
},
|
||||
yes: function (index, layero) {
|
||||
// //提交子页面时执行
|
||||
// // 获取弹出层中的form表单元素
|
||||
// var formSubmit = layer.getChildFrame('form', index);
|
||||
// var submited = formSubmit.find('button')[0];
|
||||
},
|
||||
end: function(){
|
||||
if(parentData.isTwo == '0'){
|
||||
initGmTableOne()
|
||||
}else{
|
||||
initGmTableTwo()
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
//删除杆塔
|
||||
function delClick1(){
|
||||
var checkStatus = table.checkStatus('layui_table');
|
||||
var data = checkStatus.data;
|
||||
if(data.length == 0){
|
||||
layer.msg("请勾选需要删除的数据", { icon: 0} );
|
||||
return;
|
||||
}
|
||||
|
||||
var gtIds = '';
|
||||
if(data.length == 1){
|
||||
gtIds = data[0].gtId;
|
||||
}
|
||||
if(data.length > 1){
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
if(i < data.length - 1){
|
||||
gtIds += data[i].gtId + ',';
|
||||
}else{
|
||||
gtIds += data[i].gtId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
var index = layer.confirm("确认删除吗?",{icon: 0},function(){
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: PATH_URL + "/lineProject/delPowerId", // 请求地址
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: 'json', // 服务器返回数据类型
|
||||
data: JSON.stringify({ "gtIds": gtIds, "proId": parentData.proId }), //获取提交的表单字段
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg("删除成功", { icon: 1 });
|
||||
document.getElementById('powerNum').innerText = data.data.powerNum;
|
||||
if(parentData.isTwo == '0'){
|
||||
initGmTableOne()
|
||||
}else{
|
||||
initGmTableTwo()
|
||||
}
|
||||
|
||||
//关闭弹框
|
||||
layer.close(index); //再执行关闭
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, e) {
|
||||
top.layer.close(loadingMsg);
|
||||
layer.msg('数据请求发生异常,请稍后重试', {icon: 16, scrollbar: false});
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
//导入杆塔信息
|
||||
function importData1(){
|
||||
var height = '99%';
|
||||
var width = '50%';
|
||||
var index = layer.open({
|
||||
title: [`导入`, 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
// content: 'child/orgInformation.html',
|
||||
content: 'projectImport.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function (layero, index) {
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
var json = {
|
||||
type: '2',
|
||||
proId: parentData.proId
|
||||
}
|
||||
myIframe.setParam(json)
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
field: 'zizeng',
|
||||
align: 'center',
|
||||
type: 'numbers'
|
||||
yes: function (index, layero) {
|
||||
},
|
||||
{field:'gmName', title: '杆塔名称',align: 'center',},
|
||||
{field:'lName', title: '护线员 (来源:人员合同)',align: 'center',},
|
||||
|
||||
|
||||
{field:'uName', title: '对应双回路杆塔',align: 'center',},
|
||||
{field:'month', title: '对应双回路杆塔护线员',align: 'center',},
|
||||
|
||||
{
|
||||
title: '操作(双回路杆塔设置)',
|
||||
toolbar: '#opeator-bar',
|
||||
align: 'center',
|
||||
width: 200
|
||||
end: function () {
|
||||
if(parentData.isTwo == '0'){
|
||||
initGmTableOne()
|
||||
}else{
|
||||
initGmTableTwo()
|
||||
}
|
||||
}
|
||||
]],
|
||||
data: tableData
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function setData(data){
|
||||
$("#proName").text(data.proName);
|
||||
$(".isTwo").text(data.isTwo == '0'? '单回路': '双回路');
|
||||
$("#powerNum").text(data.powerNum);
|
||||
$("#lineNum").text(data.lineNum);
|
||||
$("#lineProName").text(data.proName);
|
||||
|
||||
$("#yjName").text(data.fgsName + ' / ' + data.yjName);
|
||||
$("#volLevel").text(data.volLevel + 'kV');
|
||||
|
||||
parentData = data;
|
||||
}
|
||||
|
||||
// 渲染杆塔表格 单回路
|
||||
function initGmTableOne(){
|
||||
table.render({
|
||||
id: 'layui_table',
|
||||
elem: '#gmTable',
|
||||
url: PATH_URL + '/lineProject/getDetailsPowerList',
|
||||
where: {
|
||||
proId: parentData.proId
|
||||
},
|
||||
page: true, //开启分页
|
||||
method:'post',
|
||||
skin: 'line', // 表格样式
|
||||
cols: [[
|
||||
{
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
field: 'zizeng',
|
||||
align: 'center',
|
||||
type: 'numbers'
|
||||
},
|
||||
{field:'gtName', title: '杆塔名称',align: 'center',},
|
||||
{field:'gtUserName', title: '护线员 (来源:人员合同)',align: 'center',},
|
||||
]],
|
||||
done: function(res,curr,count){
|
||||
//checkPermission();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 渲染杆塔表格 双回路
|
||||
function initGmTableTwo(){
|
||||
table.render({
|
||||
id: 'layui_table',
|
||||
elem: '#gmTable',
|
||||
url: PATH_URL + '/lineProject/getDetailsPowerList',
|
||||
where: {
|
||||
proId: parentData.proId
|
||||
},
|
||||
page: true, //开启分页
|
||||
method:'post',
|
||||
skin: 'line', // 表格样式
|
||||
cols: [[
|
||||
{
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
field: 'zizeng',
|
||||
align: 'center',
|
||||
type: 'numbers'
|
||||
},
|
||||
{field:'gtName', title: '杆塔名称',align: 'center',},
|
||||
{field:'gtUserName', title: '护线员 (来源:人员合同)',align: 'center',},
|
||||
{field:'gtTwoName', title: '对应双回路杆塔',align: 'center',},
|
||||
{field:'gtTwoUserName', title: '对应双回路杆塔护线员',align: 'center',},
|
||||
{
|
||||
title: '操作(双回路杆塔设置)',
|
||||
field: '',
|
||||
align: 'center',
|
||||
templet: function(d){
|
||||
console.log("sssss:", d.gtTwoName)
|
||||
let isTwo = d.isTwo;
|
||||
let html;
|
||||
if(isTwo == '0' || isTwo == 0){
|
||||
html = '<span>单回路</span>'
|
||||
}else{
|
||||
html = '<span>双回路</span>'
|
||||
}
|
||||
// 返回模板内容
|
||||
return html;
|
||||
}
|
||||
}
|
||||
]],
|
||||
done: function(res,curr,count){
|
||||
//checkPermission();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function addGm(){
|
||||
var height = '42%';
|
||||
var width = '38%';
|
||||
|
|
@ -231,7 +423,7 @@ function initStaffTable(){
|
|||
|
||||
|
||||
function editProject(){
|
||||
window.parent.updateView();
|
||||
window.parent.updateView(parentData.proId);
|
||||
}
|
||||
|
||||
function projectAddUser(){
|
||||
|
|
@ -263,3 +455,24 @@ function projectAddUser(){
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
//导出杆塔信息
|
||||
function exportData1() {
|
||||
var keyWord = $("#keyWord").val();
|
||||
var type = '';
|
||||
var path = '';
|
||||
if(parentData.isTwo == '0'){
|
||||
type = '';
|
||||
path = 'exportPowerDataOne';
|
||||
}else{
|
||||
type = $("#type").val();
|
||||
path = 'exportPowerDataTwo';
|
||||
}
|
||||
var proId = parentData.proId;
|
||||
|
||||
window.location.href = PATH_URL + `/lineProject/${path}?token=` + token
|
||||
+ "&keyWord=" + keyWord
|
||||
+ "&type=" + type
|
||||
+ "&proId=" + proId
|
||||
+ "&proName=" + parentData.proName
|
||||
}
|
||||
|
|
@ -1,9 +1,7 @@
|
|||
var idNumber;
|
||||
var loadingMsg;
|
||||
var trainFileNames = [];
|
||||
var trainFilePaths = [];
|
||||
var examFileNames = [];
|
||||
var examFilePaths = [];
|
||||
var parentValue;
|
||||
|
||||
|
||||
layui.use(['layer', 'form', 'upload'], function () {
|
||||
var upload1 = layui.upload;
|
||||
|
|
@ -11,8 +9,6 @@ layui.use(['layer', 'form', 'upload'], function () {
|
|||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
|
||||
getProjectSelect();
|
||||
|
||||
|
||||
$("#closeBt").click(function () {
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
|
|
@ -25,63 +21,96 @@ layui.use(['layer', 'form', 'upload'], function () {
|
|||
return
|
||||
}
|
||||
|
||||
$("#hideUpload1").trigger("click");
|
||||
|
||||
excelUpload();
|
||||
});
|
||||
|
||||
if(parentValue.type == '1'){
|
||||
//从工程主页面打开,此时工程默认没有选中
|
||||
getProjectSelect("");
|
||||
}
|
||||
if(parentValue.type == '2'){
|
||||
//从工程详情页面打开,此时工程有值
|
||||
getProjectSelect(parentValue.proId);
|
||||
}
|
||||
|
||||
});
|
||||
function setParam(data){
|
||||
parentValue = data;
|
||||
}
|
||||
|
||||
function importData() {
|
||||
var fileData = new FormData();
|
||||
fileData.append('file', $('#file')[0].files[0]);
|
||||
// 加载提示
|
||||
loadingMsg = top.layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']});
|
||||
// form请求地址
|
||||
var formUrl = oiPlanUrl + "/monthlyPlanSubmission/importData";
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: formUrl, // 请求地址
|
||||
data: fileData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function (data) {
|
||||
top.layer.close(loadingMsg); //再执行关闭
|
||||
if (data.code == 200) {
|
||||
top.layer.alert(data.msg);
|
||||
function getProjectSelect(proId) {
|
||||
$("#projecct").empty();
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: PATH_URL + "/lineProject/getProList",
|
||||
data: {
|
||||
},
|
||||
success: function (data) {
|
||||
console.log("获取工程下拉列表OK");
|
||||
if(data.code == 200){
|
||||
let html = '<option value="">--请选择工程--</option>';
|
||||
let resultObj = data.data;
|
||||
let htm = setOption(proId,resultObj,html);
|
||||
$("#projecct").html(htm);
|
||||
}else{
|
||||
$("#projecct").html('<option value="">--无数据--</option>');
|
||||
}
|
||||
|
||||
|
||||
if(parentValue.type == '2'){
|
||||
$("#projecct").prop("disabled", true);
|
||||
}
|
||||
|
||||
layui.form.render();
|
||||
},
|
||||
error: function (err) {
|
||||
console.log("获取工程下拉列表出错:", err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
reloading();
|
||||
} else {
|
||||
top.layer.alert(data.msg, {icon: 2});
|
||||
}
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, e) {
|
||||
layer.msg('数据请求发生异常,请稍后重试', {icon: 16, scrollbar: false});
|
||||
top.layer.close(addLoadingMsg); //再执行关闭
|
||||
/**
|
||||
* 下拉框set值
|
||||
*/
|
||||
function setOption(id,resultObj,html) {
|
||||
for (let i = 0; i < resultObj.length; i++) {
|
||||
if (id == resultObj[i].id) {
|
||||
html += '<option selected value=\'' + resultObj[i].id + '\'>' + resultObj[i].name + '</option>';
|
||||
} else {
|
||||
html += '<option value=\'' + resultObj[i].id + '\'>' + resultObj[i].name + '</option>';
|
||||
}
|
||||
});
|
||||
}
|
||||
return html;
|
||||
}
|
||||
|
||||
function excelUpload() {
|
||||
loadingMsg = top.layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']}); //④创建一个formData对象
|
||||
if($("#projecct").val() == ""){
|
||||
layer.msg("请选择工程", { icon: 0 });
|
||||
return
|
||||
}
|
||||
|
||||
loadingMsg = layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']}); //④创建一个formData对象
|
||||
var fileData = new FormData();
|
||||
fileData.append('file', $('#file')[0].files[0]);
|
||||
fileData.append('proId', $("#projecct").val());
|
||||
$.ajax({
|
||||
url : oiPlanUrl + "/monthlyPlanSubmission/importData",
|
||||
url : PATH_URL + "/lineProject/importData",
|
||||
type : 'POST',
|
||||
data : fileData,
|
||||
processData : false,// ⑧告诉jQuery不要去处理发送的数据
|
||||
contentType : false, // ⑨告诉jQuery不要去设置Content-Type请求头
|
||||
success : function(result) {
|
||||
console.log(result)
|
||||
top.layer.close(loadingMsg);
|
||||
if (result.data.success) {
|
||||
layer.msg(result.data.msg,{icon:1,time:1500},function () {
|
||||
// reloadData();
|
||||
reloading();
|
||||
});
|
||||
layer.close(loadingMsg);
|
||||
if (result.code == 200) {
|
||||
parent.document.getElementById('powerNum').innerText = result.data.powerNum;
|
||||
|
||||
parent.layer.alert(result.msg,{icon:1});
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
} else {
|
||||
showModal(result.data);
|
||||
layer.alert(result.msg,{icon:2});
|
||||
}
|
||||
},
|
||||
error : function(XMLHttpRequest, textStatus, errorThrown,result) {
|
||||
|
|
@ -124,6 +153,35 @@ function showModal(result) {
|
|||
}, 1000);
|
||||
}
|
||||
|
||||
|
||||
//初始化工程下拉选
|
||||
function getProSelect(subId,proId) {
|
||||
$("#proId").empty();
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: systemPath + '/select/getProBySubId',
|
||||
data: {
|
||||
subId: subId
|
||||
},
|
||||
async: false,
|
||||
success: function (data) {
|
||||
console.log("获取工程下拉列表OK");
|
||||
if(data.code == 200){
|
||||
let html = '<option value="">--请选择工程--</option>';
|
||||
let resultObj = data.data;
|
||||
let htm = setOption(proId,resultObj,html);
|
||||
$("#proId").html(htm);
|
||||
}else{
|
||||
$("#proId").html('<option value="">--无数据--</option>');
|
||||
}
|
||||
layui.form.render();
|
||||
},
|
||||
error: function (err) {
|
||||
console.log("获取工程下拉列表出错:", err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//刷新页面
|
||||
function reloading() {
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
|
|
|
|||
|
|
@ -5,47 +5,19 @@ layui.use(['form','layer','table'], function () {
|
|||
form = layui.form;
|
||||
layer = layui.layer;
|
||||
|
||||
// 触发submit提交 按钮点击或者表单被执行提交时触发
|
||||
form.on('submit(query)', function (data) {
|
||||
console.log("搜索")
|
||||
// 对表格进行重载。id 即 table表格的id
|
||||
table.reload('table', {
|
||||
// //设定异步数据接口的额外参数
|
||||
page:{curr : 1}
|
||||
,where: data.field
|
||||
})
|
||||
return false; // 阻止表单跳转。如果需要表单跳转,去掉这段即可。
|
||||
});
|
||||
form.on('submit(reset)', function () {
|
||||
console.log("重置")
|
||||
$('#search1').val('');
|
||||
$('#search2').val('');
|
||||
let obj = {
|
||||
search1:'',
|
||||
search2:''
|
||||
}
|
||||
// 对表格进行重载。id 即 table表格的id
|
||||
table.reload('table', {
|
||||
// //设定异步数据接口的额外参数
|
||||
page:{curr : 1}
|
||||
,where: obj
|
||||
})
|
||||
return false; // 阻止表单跳转。如果需要表单跳转,去掉这段即可。
|
||||
});
|
||||
|
||||
table.on('tool(table)', function (obj) {
|
||||
switch (obj.event) {
|
||||
case 'edit':
|
||||
case 'detail':
|
||||
console.log('详情',obj)
|
||||
updateView()
|
||||
checkView(obj.data)
|
||||
break;
|
||||
case 'edit':
|
||||
console.log('修改',obj)
|
||||
updateView(obj.data.proId)
|
||||
break;
|
||||
case 'del':
|
||||
console.log('删除',obj)
|
||||
delView()
|
||||
break;
|
||||
case 'detail':
|
||||
console.log('详情',obj)
|
||||
checkView()
|
||||
delView(obj.data.proId)
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -53,21 +25,28 @@ layui.use(['form','layer','table'], function () {
|
|||
init();
|
||||
});
|
||||
|
||||
// 静态数据
|
||||
var tableData = [
|
||||
{id: 1, sName: '昆明运检一站', lName: '±500kV永富直流线', uName: '张雄',month:'2024-03',alls:'16基',first:'6基',second:'7基',other:'2基',unStation:'3基',days:'2'},
|
||||
{id: 2, sName: '昆明运检一站', lName: '±500kV永富直流线', uName: '张雄',month:'2024-03',alls:'16基',first:'6基',second:'7基',other:'2基',unStation:'3基',days:'2'},
|
||||
{id: 2, sName: '昆明运检一站', lName: '±500kV永富直流线', uName: '张雄',month:'2024-03',alls:'16基',first:'6基',second:'7基',other:'2基',unStation:'3基',days:'2'},
|
||||
{id: 2, sName: '昆明运检一站', lName: '±500kV永富直流线', uName: '张雄',month:'2024-03',alls:'16基',first:'6基',second:'7基',other:'2基',unStation:'3基',days:'2'},
|
||||
{id: 2, sName: '昆明运检一站', lName: '±500kV永富直流线', uName: '张雄',month:'2024-03',alls:'16基',first:'6基',second:'7基',other:'2基',unStation:'3基',days:'2'},
|
||||
{id: 2, sName: '昆明运检一站', lName: '±500kV永富直流线', uName: '张雄',month:'2024-03',alls:'16基',first:'6基',second:'7基',other:'2基',unStation:'3基',days:'2'},
|
||||
{id: 2, sName: '昆明运检一站', lName: '±500kV永富直流线', uName: '张雄',month:'2024-03',alls:'16基',first:'6基',second:'7基',other:'2基',unStation:'3基',days:'2'},
|
||||
{id: 2, sName: '昆明运检一站', lName: '±500kV永富直流线', uName: '张雄',month:'2024-03',alls:'16基',first:'6基',second:'7基',other:'2基',unStation:'3基',days:'2'},
|
||||
{id: 2, sName: '昆明运检一站', lName: '±500kV永富直流线', uName: '张雄',month:'2024-03',alls:'16基',first:'6基',second:'7基',other:'2基',unStation:'3基',days:'2'},
|
||||
{id: 2, sName: '昆明运检一站', lName: '±500kV永富直流线', uName: '张雄',month:'2024-03',alls:'16基',first:'6基',second:'7基',other:'2基',unStation:'3基',days:'2'},
|
||||
{id: 2, sName: '昆明运检一站', lName: '±500kV永富直流线', uName: '张雄',month:'2024-03',alls:'16基',first:'6基',second:'7基',other:'2基',unStation:'3基',days:'2'}
|
||||
];
|
||||
|
||||
//查询
|
||||
function queryClick(){
|
||||
let fgsName = $('#fgsName').val();
|
||||
let proName = $('#proName').val();
|
||||
table.reload('layui_table', {
|
||||
where: {
|
||||
fgsName: fgsName,
|
||||
proName: proName,
|
||||
}
|
||||
})
|
||||
}
|
||||
//重置
|
||||
function resetClick(){
|
||||
$('#fgsName').val("");
|
||||
$('#proName').val("");
|
||||
table.reload('layui_table', {
|
||||
where: {
|
||||
fgsName: "",
|
||||
proName: "",
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化数据
|
||||
|
|
@ -75,29 +54,48 @@ layui.use(['form','layer','table'], function () {
|
|||
function init(){
|
||||
// 渲染表格
|
||||
table.render({
|
||||
id: 'layui_table',
|
||||
elem: '#table',
|
||||
// url: "/sys/achievement",
|
||||
page: true,
|
||||
url: PATH_URL + '/lineProject/getLineProjectList',
|
||||
where: {
|
||||
},
|
||||
page: true, //开启分页
|
||||
method:'post',
|
||||
skin: 'line', // 表格样式
|
||||
cols: [[
|
||||
{
|
||||
type: 'checkbox'
|
||||
},
|
||||
// {
|
||||
// type: 'checkbox'
|
||||
// },
|
||||
{
|
||||
title: '序号',
|
||||
field: 'zizeng',
|
||||
align: 'center',
|
||||
type: 'numbers'
|
||||
},
|
||||
{field:'sName', title: '分公司',align: 'center',},
|
||||
{field:'sName', title: '运检站',align: 'center',},
|
||||
{field:'lName', title: '线路工程名称',align: 'center',},
|
||||
{field:'uName', title: '电压等级',align: 'center',},
|
||||
{field:'month', title: '单/双回路',align: 'center',},
|
||||
{field:'alls', title: '杆塔数量',align: 'center',},
|
||||
{field:'first', title: '群众护线员数量',align: 'center',width:170},
|
||||
{field:'second', title: '已绑定护线员杆塔数量',align: 'center',width:170},
|
||||
{field:'other', title: '未绑定护线员杆塔数量',align: 'center', },
|
||||
{field:'fgsName', title: '分公司',align: 'center',},
|
||||
{field:'yjName', title: '运检站',align: 'center',},
|
||||
{field:'proName', title: '线路工程名称',align: 'center',},
|
||||
{field:'volLevel', title: '电压等级',align: 'center',},
|
||||
{
|
||||
title: '单/双回路',
|
||||
field: '',
|
||||
align: 'center',
|
||||
templet: function(d){
|
||||
let isTwo = d.isTwo;
|
||||
let html;
|
||||
if(isTwo == '0' || isTwo == 0){
|
||||
html = '<span>单回路</span>'
|
||||
}else{
|
||||
html = '<span>双回路</span>'
|
||||
}
|
||||
// 返回模板内容
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{field:'powerNum', title: '杆塔数量',align: 'center',},
|
||||
{field:'lineNum', title: '群众护线员数量',align: 'center',width:170},
|
||||
{field:'inLinePowerNum', title: '已绑定护线员杆塔数量',align: 'center',width:170},
|
||||
{field:'unLinePowerNum', title: '未绑定护线员杆塔数量',align: 'center', },
|
||||
{
|
||||
title: '操作',
|
||||
toolbar: '#opeator-bar',
|
||||
|
|
@ -105,7 +103,9 @@ function init(){
|
|||
width: 200
|
||||
}
|
||||
]],
|
||||
data: tableData
|
||||
done: function(res,curr,count){
|
||||
//checkPermission();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
|
@ -139,41 +139,45 @@ function add() {
|
|||
// // myIframe.selectCheck(); //aaa()为子页面的方法
|
||||
// submited.click();
|
||||
// example.ajax.reload(); // 刷新页面
|
||||
}
|
||||
},
|
||||
end: function(){
|
||||
queryClick();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
* */
|
||||
function checkView(id) {
|
||||
function checkView(vo) {
|
||||
let height = '98%';
|
||||
let width = '95%';
|
||||
// $.ajax({
|
||||
// type: 'post',
|
||||
// contentType: "application/x-www-form-urlencoded",
|
||||
// url: oiPlanUrl + '/monthlyPlanSubmission/getDataById',
|
||||
// dataType: 'json',
|
||||
// data: {
|
||||
// id: id
|
||||
// },
|
||||
// success: function (data) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: PATH_URL + '/lineProject/getProById',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify({"proId": vo.proId}),
|
||||
success: function (data) {
|
||||
console.log("data:", data)
|
||||
|
||||
|
||||
var index = layer.open({
|
||||
title: ['详情'],
|
||||
type: 2,
|
||||
content: 'projectDetail.html',
|
||||
content: './projectDetail.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function (layero, index) {
|
||||
// console.log(data);
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
// myIframe.hideSubmit();
|
||||
// var fnc = myIframe.setData(data.data); //aaa()为子页面的方法
|
||||
var fnc = myIframe.setData(data.data); //aaa()为子页面的方法
|
||||
|
||||
},
|
||||
});
|
||||
// }
|
||||
// })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -181,84 +185,70 @@ function checkView(id) {
|
|||
* 修改
|
||||
* */
|
||||
function updateView(id) {
|
||||
var height = '90%';
|
||||
var width = '55%';
|
||||
// $.ajax({
|
||||
// type: 'post',
|
||||
// contentType: "application/x-www-form-urlencoded",
|
||||
// url: oiPlanUrl + '/monthlyPlanSubmission/getDataById',
|
||||
// dataType: 'json',
|
||||
// data: {
|
||||
// id: id
|
||||
// },
|
||||
// success: function (data) {
|
||||
var index = layer.open({
|
||||
title: ['修改', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: 'projectAdd.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function (layero, index) {
|
||||
//打开页面成功时执行
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
// myIframe.setData(data.data); //aaa()为子页面的方法
|
||||
},
|
||||
yes: function (index, layero) {
|
||||
// //提交子页面时执行
|
||||
// // 获取弹出层中的form表单元素
|
||||
// var formSubmit = layer.getChildFrame('form', index);
|
||||
// var submited = formSubmit.find('button')[0];
|
||||
// // 触发点击事件,会对表单进行验证,验证成功则提交表单,失败则返回错误信息
|
||||
// submited.click();
|
||||
}
|
||||
});
|
||||
// }
|
||||
// })
|
||||
var height = '90%';
|
||||
var width = '55%';
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
url: PATH_URL + '/lineProject/getProById',
|
||||
data: JSON.stringify({"proId": id}),
|
||||
success: function (data) {
|
||||
var index = layer.open({
|
||||
title: ['修改', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: 'projectAdd.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function (layero, index) {
|
||||
//打开页面成功时执行
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
myIframe.setData(data); //aaa()为子页面的方法
|
||||
},
|
||||
yes: function (index, layero) {
|
||||
// //提交子页面时执行
|
||||
// // 获取弹出层中的form表单元素
|
||||
// var formSubmit = layer.getChildFrame('form', index);
|
||||
// var submited = formSubmit.find('button')[0];
|
||||
// // 触发点击事件,会对表单进行验证,验证成功则提交表单,失败则返回错误信息
|
||||
// submited.click();
|
||||
},
|
||||
end: function(){
|
||||
queryClick();
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除按钮
|
||||
* */
|
||||
function buttonDelete(id, permission, pers) {
|
||||
if (permission != "") {
|
||||
if ($.inArray(permission, pers) < 0) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
var btn = $("<button class='layui-btn layui-btn-xs' title='删除' onclick='delView(\"" + id +"\")'><i class='layui-icon'></i></button>");
|
||||
return btn.prop("outerHTML");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* */
|
||||
function delView(id) {
|
||||
let index = layer.confirm("是否确定删除数据?", function () {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: oiPlanUrl + '/monthlyPlanSubmission/del',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success: function (data) {
|
||||
layer.close(index);
|
||||
if (data.code == 200) {
|
||||
top.layer.alert('删除成功', {icon: 1});
|
||||
// example.ajax.reload(); // 刷新页面
|
||||
} else {
|
||||
layer.msg("删除失败", {icon: 2}, function () {
|
||||
// example.ajax.reload(); // 刷新页面
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
let index = layer.confirm("是否确定删除数据?", function () {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: PATH_URL + '/lineProject/delProId',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify({ "proIds": id }),
|
||||
success: function (data) {
|
||||
layer.close(index);
|
||||
if (data.code == 200) {
|
||||
top.layer.alert('删除成功', {icon: 1});
|
||||
// example.ajax.reload(); // 刷新页面
|
||||
} else {
|
||||
layer.msg("删除失败", {icon: 2}, function () {
|
||||
// example.ajax.reload(); // 刷新页面
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function importData(){
|
||||
var height = '80%';
|
||||
var height = '99%';
|
||||
var width = '50%';
|
||||
var index = layer.open({
|
||||
title: [`导入`, 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
|
|
@ -268,51 +258,29 @@ function importData(){
|
|||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function (layero, index) {
|
||||
/*var myIframe = parent.window[layero.find('iframe')[0]['name']];
|
||||
var json = {'proIds': proId}
|
||||
myIframe.setParams(json)*/
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
var json = {
|
||||
type: '1',
|
||||
proId: ""
|
||||
}
|
||||
myIframe.setParam(json)
|
||||
},
|
||||
yes: function (index, layero) {
|
||||
},
|
||||
end: function () {
|
||||
queryClick();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function importDataThread(formData, idx) {
|
||||
$.ajax({
|
||||
url: oiPlanUrl + "/basePerson/importData",
|
||||
type: 'POST',
|
||||
async: false,
|
||||
data: formData,
|
||||
timeout: 20000,
|
||||
// 告诉jQuery不要去处理发送的数据
|
||||
processData: false,
|
||||
// 告诉jQuery不要去设置Content-Type请求头
|
||||
contentType: false,
|
||||
success: function (data) {
|
||||
layer.close(idx);
|
||||
if (data.code == 200) {
|
||||
layer.alert(data.data, {icon: 1});
|
||||
// example.ajax.reload(); // 刷新页面
|
||||
} else{
|
||||
layer.alert(data.msg, {icon: 2});
|
||||
}
|
||||
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||||
console.log(JSON.stringify(errorThrown));
|
||||
layer.close(idx);
|
||||
}
|
||||
});
|
||||
$("#basePersonFile").val("");
|
||||
}
|
||||
|
||||
//导出
|
||||
function exportData() {
|
||||
// let search1 = $('#search1').val();
|
||||
// let search2 = $('#search2').val();
|
||||
window.location.href = oiPlanUrl + "/monthlyPlanSubmission/export?token=" + token;
|
||||
|
||||
|
||||
var fgsName = $("#fgsName").val();
|
||||
var proName = $("#proName").val();
|
||||
|
||||
window.location.href = PATH_URL + `/lineProject/exportProData?token=` + token
|
||||
+ "&fgsName=" + fgsName
|
||||
+ "&proName=" + proName
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
var layer;
|
||||
var parentData;
|
||||
var parentProId;
|
||||
layui.use(['layer', 'form'], function () {
|
||||
var form = layui.form;
|
||||
layer = layui.layer;
|
||||
|
||||
|
||||
|
||||
|
||||
$("#closeBt").click(function () {
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
});
|
||||
|
||||
// 验证成功后才会执行下面的操作
|
||||
form.on('submit(formDemo)', function (data) {
|
||||
updData(data); // 新增
|
||||
});
|
||||
});
|
||||
|
||||
function setData(data, proId){
|
||||
parentData = data;
|
||||
parentProId = proId;
|
||||
|
||||
$("#gtName").val(parentData[0].gtName);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param formData
|
||||
*/
|
||||
function updData(formData) {
|
||||
if(parentData[0].gtName === $("#gtName").val()){
|
||||
layer.msg("您想要修改的杆塔名称与原名称一致,无法修改!", { icon: 0, time: 3000 });
|
||||
$("#gtName").focus();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// 加载提示
|
||||
let loadingMsg = layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']});
|
||||
|
||||
debugger
|
||||
formData.field.gtId = parentData[0].gtId;
|
||||
formData.field.proId = parentProId;
|
||||
|
||||
// form请求地址
|
||||
let formUrl = PATH_URL + "/lineProject/updatePower";
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: formUrl, // 请求地址
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify(formData.field),
|
||||
success: function (data) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if(data.code == 200){
|
||||
parent.layer.msg("修改成功", { icon: 1 });
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
// reloading();
|
||||
}else{
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, e) {
|
||||
layer.close(loadingMsg);
|
||||
layer.msg('数据请求发生异常,请稍后重试', {icon: 16, scrollbar: false});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 关闭页面 刷新页面
|
||||
*/
|
||||
function reloading() {
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
window.parent.location.reload();
|
||||
}
|
||||
|
|
@ -32,6 +32,8 @@ layui.use(['upload','laydate','form'], function () {
|
|||
var files = this.files = obj.pushFile(); // 将每次选择的文件追加到文件队列
|
||||
// 读取本地文件
|
||||
obj.preview(function(index, file, result){
|
||||
|
||||
|
||||
var tr = $(['<tr id="upload-'+ index +'">',
|
||||
'<td>'+ file.name +'</td>',
|
||||
'<td>'+ (file.size/1024).toFixed(1) +'kb</td>',
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ function init(){
|
|||
// 渲染表格
|
||||
table.render({
|
||||
elem: '#table',
|
||||
// url: "/sys/achievement",
|
||||
// url: PATH_URL + "/makeInfo/getListTab",
|
||||
page: true,
|
||||
skin: 'line', // 表格样式
|
||||
cols: [[
|
||||
|
|
@ -92,7 +92,7 @@ function init(){
|
|||
{field:'sName', title: '运检站',align: 'center',},
|
||||
{field:'lName', title: '线路名称',align: 'center',},
|
||||
{field:'uName', title: '姓名',align: 'center',},
|
||||
{field:'month', title: '月份',align: 'center',},
|
||||
{field:'makeMonth', title: '月份',align: 'center',},
|
||||
{field:'alls', title: '负责巡护区段',align: 'center',},
|
||||
{
|
||||
field: '',
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-view{display:block;position:relative;margin:10px 0;padding:0;border:1px solid #eee;border-left-width:6px;background-color:#fafafa;color:#333;font-family:Courier New;font-size:13px}.layui-code-title{position:relative;padding:0 10px;height:40px;line-height:40px;border-bottom:1px solid #eee;font-size:12px}.layui-code-title>.layui-code-about{position:absolute;right:10px;top:0;color:#b7b7b7}.layui-code-about>a{padding-left:10px}.layui-code-view>.layui-code-ol,.layui-code-view>.layui-code-ul{position:relative;overflow:auto}.layui-code-view>.layui-code-ol>li{position:relative;margin-left:45px;line-height:20px;padding:0 10px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view>.layui-code-ol>li:first-child,.layui-code-view>.layui-code-ul>li:first-child{padding-top:10px}.layui-code-view>.layui-code-ol>li:last-child,.layui-code-view>.layui-code-ul>li:last-child{padding-bottom:10px}.layui-code-view>.layui-code-ul>li{position:relative;line-height:20px;padding:0 10px;list-style-type:none;*list-style-type:none;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-dark{border:1px solid #0c0c0c;border-left-color:#3f3f3f;background-color:#0c0c0c;color:#c2be9e}.layui-code-dark>.layui-code-title{border-bottom:none}.layui-code-dark>.layui-code-ol>li,.layui-code-dark>.layui-code-ul>li{background-color:#3f3f3f;border-left:none}.layui-code-dark>.layui-code-ul>li{margin-left:6px}.layui-code-demo .layui-code{visibility:visible!important;margin:-15px;border-top:none;border-right:none;border-bottom:none}.layui-code-demo .layui-tab-content{padding:15px;border-top:none}
|
||||
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 701 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 299 KiB |
|
|
@ -0,0 +1,125 @@
|
|||
// 秒数转化为时分秒(未补零)
|
||||
function formatSeconds(value) {
|
||||
// 秒
|
||||
let second = parseInt(value)
|
||||
// 分
|
||||
let minute = 0
|
||||
// 小时
|
||||
let hour = 0
|
||||
// 天
|
||||
// let day = 0
|
||||
// 如果秒数大于60,将秒数转换成整数
|
||||
if (second > 60) {
|
||||
// 获取分钟,除以60取整数,得到整数分钟
|
||||
minute = parseInt(second / 60)
|
||||
// 获取秒数,秒数取佘,得到整数秒数
|
||||
second = parseInt(second % 60)
|
||||
// 如果分钟大于60,将分钟转换成小时
|
||||
if (minute > 60) {
|
||||
// 获取小时,获取分钟除以60,得到整数小时
|
||||
hour = parseInt(minute / 60)
|
||||
// 获取小时后取佘的分,获取分钟除以60取佘的分
|
||||
minute = parseInt(minute % 60)
|
||||
// 如果小时大于24,将小时转换成天
|
||||
// if (hour > 23) {
|
||||
// // 获取天数,获取小时除以24,得到整天数
|
||||
// day = parseInt(hour / 24)
|
||||
// // 获取天数后取余的小时,获取小时除以24取余的小时
|
||||
// hour = parseInt(hour % 24)
|
||||
// }
|
||||
}
|
||||
}
|
||||
return [hour, minute, second]
|
||||
}
|
||||
|
||||
// 秒数转化为时分秒(补零)
|
||||
function formatSecondsZero(value) {
|
||||
let second = parseInt(value); // 秒
|
||||
let minute = 0; // 分
|
||||
let hour = 0; // 时
|
||||
if (second > 59) {
|
||||
minute = parseInt(second / 60)
|
||||
second = parseInt(second % 60)
|
||||
if (minute > 59) {
|
||||
hour = parseInt(minute / 60)
|
||||
minute = parseInt(minute % 60)
|
||||
if (hour < 10) hour = '0' + hour; //小时补零
|
||||
}
|
||||
}
|
||||
if (second < 10) second = '0' + second; //秒数补零
|
||||
if (minute < 10) minute = '0' + minute; //分钟补零
|
||||
let result = '' + second;
|
||||
result = '' + minute + ':' + result
|
||||
if (hour > 0) {
|
||||
result = '' + hour + ':' + result
|
||||
}
|
||||
console.log(hour,minute,second);
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
function optionTitleNum(index) {
|
||||
var letter = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", ]
|
||||
return letter[index];
|
||||
}
|
||||
|
||||
//获取当前时间(年月日时分秒 yy-mm-dd hh:mm:ss)
|
||||
function getCurrentDateTime() {
|
||||
const now = new Date();
|
||||
const year = now.getFullYear();
|
||||
const month = (now.getMonth() + 1).toString().padStart(2, '0');
|
||||
const day = now.getDate().toString().padStart(2, '0');
|
||||
const hours = now.getHours().toString().padStart(2, '0');
|
||||
const minutes = now.getMinutes().toString().padStart(2, '0');
|
||||
const seconds = now.getSeconds().toString().padStart(2, '0');
|
||||
|
||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
}
|
||||
|
||||
//获取当前时间(年月日时分秒 保存到数组)
|
||||
function getCurrentDateTimeArr() {
|
||||
const now = new Date();
|
||||
const year = now.getFullYear();
|
||||
const month = (now.getMonth() + 1).toString().padStart(2, '0');
|
||||
const day = now.getDate().toString().padStart(2, '0');
|
||||
const hours = now.getHours().toString().padStart(2, '0');
|
||||
const minutes = now.getMinutes().toString().padStart(2, '0');
|
||||
const seconds = now.getSeconds().toString().padStart(2, '0');
|
||||
|
||||
return [year, month, day, hours, minutes, seconds];
|
||||
}
|
||||
|
||||
//以当前时间减去制定日期计算相差的时间
|
||||
function calculateIntervalTime(startTime,endTime) {
|
||||
const startData = Date.parse(startTime)/1000
|
||||
const endData = Date.parse(endTime)/1000
|
||||
let resData = ''
|
||||
|
||||
if(startData < endData){
|
||||
resData = endData - startData
|
||||
}
|
||||
if(startData == endData){
|
||||
return 0
|
||||
}
|
||||
// var day = Math.floor(resData / ( 3600 * 24))
|
||||
// var hour = Math.floor((resData - day*3600*24) / 3600)
|
||||
// var minute = Math.floor((resData - day*3600*24 - 3600*hour) / 60)
|
||||
// var second = Math.floor(resData - day*3600*24 - 3600*hour - 60*minute)
|
||||
var second = Math.floor(resData)
|
||||
return second;
|
||||
}
|
||||
|
||||
//比较两时间大小
|
||||
function compare(time1, time2) {
|
||||
if(time1 != "" && time2 != ""){
|
||||
if(new Date(time1).getTime() > new Date(time2).getTime()){
|
||||
return 0;
|
||||
}else if(new Date(time1).getTime() < new Date(time2).getTime()){
|
||||
return 1;
|
||||
}else{
|
||||
return 2;
|
||||
}
|
||||
}else{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||