|
@@ -7,9 +7,9 @@
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
|
<title>Document</title>
|
|
<title>Document</title>
|
|
|
- <link rel="stylesheet" href="{% static '/lib/layui/css/layui.css' %}">
|
|
|
|
|
<link rel="stylesheet" href="{% static '/lib/font/fontIcon/iconfont.css' %}">
|
|
<link rel="stylesheet" href="{% static '/lib/font/fontIcon/iconfont.css' %}">
|
|
|
<link rel="stylesheet" href="{% static '/lib/css/reset.css' %}">
|
|
<link rel="stylesheet" href="{% static '/lib/css/reset.css' %}">
|
|
|
|
|
+ <link rel="stylesheet" href="{% static '/lib/layui/css/layui.css' %}">
|
|
|
<style>
|
|
<style>
|
|
|
/* 面包屑导航 */
|
|
/* 面包屑导航 */
|
|
|
|
|
|
|
@@ -208,7 +208,10 @@
|
|
|
width: 30%;
|
|
width: 30%;
|
|
|
text-align: right;
|
|
text-align: right;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ .dev .devLeft img{
|
|
|
|
|
+ width: 60px;
|
|
|
|
|
+ height: 60px;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
.dev .devRight {
|
|
.dev .devRight {
|
|
|
padding-left: 15px;
|
|
padding-left: 15px;
|
|
@@ -244,6 +247,9 @@
|
|
|
padding: 5px 15px;
|
|
padding: 5px 15px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ #myModal>div{
|
|
|
|
|
+ padding-top: 20px;
|
|
|
|
|
+ }
|
|
|
.layui-input {
|
|
.layui-input {
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
color: #333;
|
|
color: #333;
|
|
@@ -254,6 +260,19 @@
|
|
|
height: 30px;
|
|
height: 30px;
|
|
|
vertical-align: middle;
|
|
vertical-align: middle;
|
|
|
}
|
|
}
|
|
|
|
|
+ .layui-form-select .layui-input,.layui-form-item .layui-input-inline{
|
|
|
|
|
+ width: 210px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .layui-form input{
|
|
|
|
|
+ color: #858585;
|
|
|
|
|
+ background-color: #FFF;
|
|
|
|
|
+ border: 1px solid #D5D5D5;
|
|
|
|
|
+ padding: 5px 4px 6px;
|
|
|
|
|
+ width: 200px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .timeStage{
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|
|
|
</head>
|
|
</head>
|
|
|
|
|
|
|
@@ -319,7 +338,43 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<input type="hidden" id="qxzPhotoId">
|
|
<input type="hidden" id="qxzPhotoId">
|
|
|
-
|
|
|
|
|
|
|
+ <!-- 导出提示框 -->
|
|
|
|
|
+ <div id="myModal" >
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <form class="layui-form" action="">
|
|
|
|
|
+ <div class="layui-form-item">
|
|
|
|
|
+ <label class="layui-form-label">文件名称:</label>
|
|
|
|
|
+ <div class="layui-input-block">
|
|
|
|
|
+ <input type="text" id="filename" name="name" required lay-verify="required" placeholder="请输入文件的名称" maxlength="15" class="col-xs-12">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="layui-form-item">
|
|
|
|
|
+ <label class="layui-form-label">下载类型:</label>
|
|
|
|
|
+ <div class="layui-input-inline">
|
|
|
|
|
+ <select name="downtype" lay-verify="required" lay-filter="downtype" id="downtype">
|
|
|
|
|
+ <option value="1">全部</option>
|
|
|
|
|
+ <option value="2">时间段</option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="layui-form-item timeStage">
|
|
|
|
|
+ <label class="layui-form-label">时间段:</label>
|
|
|
|
|
+ <div class="layui-input-inline">
|
|
|
|
|
+ <input type="text" id="timSelectBox3" autocomplete="off" placeholder="请选择时间段 " class="col-xs-12">
|
|
|
|
|
+ <input type="hidden" id="downbegin" name="begin">
|
|
|
|
|
+ <input type="hidden" id="downend" name="end">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="layui-form-item">
|
|
|
|
|
+ <div class="layui-input-block">
|
|
|
|
|
+ <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
|
|
|
|
|
+ <button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </form>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
<script src="{% static '/lib/js/jquery-2.1.4.min.js'%}"></script>
|
|
<script src="{% static '/lib/js/jquery-2.1.4.min.js'%}"></script>
|
|
|
<script src="{% static '/lib/layui/layui.js'%}"></script>
|
|
<script src="{% static '/lib/layui/layui.js'%}"></script>
|
|
@@ -328,12 +383,13 @@
|
|
|
<script src="{% static '/lib/js/qxz_dict.js'%}"></script>
|
|
<script src="{% static '/lib/js/qxz_dict.js'%}"></script>
|
|
|
<script>
|
|
<script>
|
|
|
var currPage = 1, totelpage;
|
|
var currPage = 1, totelpage;
|
|
|
- var layer, element, laydate, laypage;
|
|
|
|
|
- layui.use(['element', 'layer', 'laydate', 'laypage'], function () {
|
|
|
|
|
|
|
+ var layer, element, laydate, laypage,form;
|
|
|
|
|
+ layui.use(['element', 'layer', 'laydate', 'laypage','form'], function () {
|
|
|
element = layui.element;
|
|
element = layui.element;
|
|
|
layer = layui.layer;
|
|
layer = layui.layer;
|
|
|
laydate = layui.laydate;
|
|
laydate = layui.laydate;
|
|
|
laypage = layui.laypage;
|
|
laypage = layui.laypage;
|
|
|
|
|
+ form = layui.form;
|
|
|
getEquipList(1, '');
|
|
getEquipList(1, '');
|
|
|
// 搜索
|
|
// 搜索
|
|
|
$('#searchBtn').on('click', function () {
|
|
$('#searchBtn').on('click', function () {
|
|
@@ -354,7 +410,63 @@
|
|
|
$('#tableEnd').val(dateArray[1])
|
|
$('#tableEnd').val(dateArray[1])
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+ //执行一个laydate实例
|
|
|
|
|
+ laydate.render({
|
|
|
|
|
+ elem: '#timSelectBox3' //指定元素
|
|
|
|
|
+ , range: true
|
|
|
|
|
+ , done: function (value, date) {
|
|
|
|
|
+ var dateArray = value.split(' - ')
|
|
|
|
|
+ $('#downbegin').val(dateArray[0])
|
|
|
|
|
+ $('#downend').val(dateArray[1])
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ form.on('select(downtype)', function(data){
|
|
|
|
|
+ if (data.value == 2) {
|
|
|
|
|
+ $('.timeStage').show();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $('.timeStage').hide();
|
|
|
|
|
+ $('#downbegin').val('');
|
|
|
|
|
+ $('#downend').val('');
|
|
|
|
|
+ $('#downtimSelectBox').val('');
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ form.on('submit(formDemo)', function(data){
|
|
|
|
|
+ if(data.field.downtype == 2){
|
|
|
|
|
+ if(!data.field.begin || !data.field.end){
|
|
|
|
|
+ layer.msg('请将时间填写完整!')
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ window.location.href = 'qxz_data_export?id='+$('.equipListUl li.active').attr('id')+'&begin='+$('#downbegin').val()+'&end='+$('#downend').val()+'&filename='+$('#filename').val()
|
|
|
|
|
+ layer.msg(JSON.stringify(data.field));
|
|
|
|
|
+ return false;
|
|
|
|
|
+ });
|
|
|
})
|
|
})
|
|
|
|
|
+ // 判断主流浏览器
|
|
|
|
|
+ function decideExport(){
|
|
|
|
|
+ // $('#myModal').modal('toggle')
|
|
|
|
|
+ layer.open({
|
|
|
|
|
+ type:1,
|
|
|
|
|
+ title: '下载'
|
|
|
|
|
+ ,area:['550px','350px']
|
|
|
|
|
+ ,content: $('#myModal')
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ //导出
|
|
|
|
|
+ function operation() {
|
|
|
|
|
+ if (!$('#filename').val()) {
|
|
|
|
|
+ layer.msg("请填写文件名!", { time: 2000 });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if ($('#downtype').val() == 2) {
|
|
|
|
|
+ if (!($('#downbegin').val() && $('#downbegin').val())) {
|
|
|
|
|
+ layer.msg("请选择时间段!", { time: 2000 });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ window.location.href = 'cbd_data_export?id='+$('#equip_id').val()+'&begin='+$('#downbegin').val()+'&end='+$('#downend').val()+'&filename='+$('#filename').val()
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
// 首页
|
|
// 首页
|
|
|
function gotofirstpage() {
|
|
function gotofirstpage() {
|
|
|
currpage = 1;
|
|
currpage = 1;
|
|
@@ -500,26 +612,29 @@
|
|
|
, layout: ['prev', 'page', 'next', 'skip']
|
|
, layout: ['prev', 'page', 'next', 'skip']
|
|
|
, jump: function (obj, first) {
|
|
, jump: function (obj, first) {
|
|
|
var currId = $(".equipListUl .active").attr("id");
|
|
var currId = $(".equipListUl .active").attr("id");
|
|
|
- $.ajax({
|
|
|
|
|
- url: 'qxz_report_detail2',
|
|
|
|
|
- type: 'post',
|
|
|
|
|
- data: {
|
|
|
|
|
- page: obj.curr,
|
|
|
|
|
- e_id: currId,
|
|
|
|
|
- begin: $('#tableBegin').val(),
|
|
|
|
|
- end: $('#tableEnd').val(),
|
|
|
|
|
- },
|
|
|
|
|
- dataType: 'json',
|
|
|
|
|
- beforeSend: function () {
|
|
|
|
|
- loadFlage = layer.load();
|
|
|
|
|
- },
|
|
|
|
|
- complete: function () {
|
|
|
|
|
- layer.close(loadFlage);
|
|
|
|
|
- },
|
|
|
|
|
- success: function (data) {
|
|
|
|
|
- randerTable(data)
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if(!first){
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ url: 'qxz_report_detail2',
|
|
|
|
|
+ type: 'post',
|
|
|
|
|
+ data: {
|
|
|
|
|
+ page: obj.curr,
|
|
|
|
|
+ e_id: currId,
|
|
|
|
|
+ begin: $('#tableBegin').val(),
|
|
|
|
|
+ end: $('#tableEnd').val(),
|
|
|
|
|
+ },
|
|
|
|
|
+ dataType: 'json',
|
|
|
|
|
+ beforeSend: function () {
|
|
|
|
|
+ loadFlage = layer.load();
|
|
|
|
|
+ },
|
|
|
|
|
+ complete: function () {
|
|
|
|
|
+ layer.close(loadFlage);
|
|
|
|
|
+ },
|
|
|
|
|
+ success: function (data) {
|
|
|
|
|
+ randerTable(data)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|