Commit e881d3f6 by 黄明步

调用记录搜索相关

parent 8f0a4424
......@@ -14,19 +14,38 @@
body {
background-color: #fff;
}
.layui-input-inline {
width: 150px !important;
}
</style>
</head>
<body>
<div class="layui-form" style="margin-left: 10px;" lay-filter="searchForm">
<div class="layui-form" style="margin-left: 5px;" lay-filter="searchForm">
<div class="layui-form-item" style="padding-top:10px;margin-bottom: 0">
法院:
<div class="layui-inline">
<label class="layui-form-label" style="width: 80px;">法院:</label>
<div class="layui-input-inline" style="width: 355px;">
<!--<label class="layui-form-label" style="width: 50px;">法院:</label>-->
<div class="layui-input-inline">
<div id="court"></div>
</div>
</div>
厂商:
<div class="layui-inline">
<!--<label class="layui-form-label" style="width: 50px;">厂商:</label>-->
<div class="layui-input-inline">
<div id="businessVendor"></div>
</div>
</div>
识别能力:
<div class="layui-inline">
<label class="layui-form-label">内外网</label>
<!--<label class="layui-form-label" style="width: 50px;">识别能力:</label>-->
<div class="layui-input-inline">
<div id="ability"></div>
</div>
</div>
内外网:
<div class="layui-inline">
<!--<label class="layui-form-label">内外网</label>-->
<div class="layui-input-inline">
<select name="network">
<option value="-1" selected>全部</option>
......@@ -35,6 +54,17 @@
</select>
</div>
</div>
开始时间:
<div class="layui-inline">
<input type="text" name="startTime" id="startTime" placeholder="yyyy-MM-dd"
lay-verify="datetime" class="layui-input">
</div>
结束时间:
<div class="layui-inline">
<input type="text" name="endTime" id="endTime" placeholder="yyyy-MM-dd"
lay-verify="datetime" class="layui-input">
</div>
<div class="layui-inline">
<button onclick="search();" class="layui-btn layui-btn-sm layui-btn-normal">搜索</button>
</div>
......@@ -52,10 +82,19 @@
<script>
var list, table, form, condition = {};
let courtList = [];
layui.use(["table", "form"], function () {
layui.use(['laydate', "table", "form"], function () {
var laydate = layui.laydate
table = layui.table;
form = layui.form;
initSearchForm(function (result) {
//日期时间选择器
laydate.render({
elem: '#endTime'
});
laydate.render({
elem: '#startTime'
});
initSearchForm(
function (courtListData) {
xmSelect.render({
el: '#court',
tips: "选择法院",
......@@ -64,28 +103,65 @@
autoRow: true,
radio: true,
clickClose: true,
data: result,
data: courtListData,
prop: {
name: 'name',
value: 'courtCode'
},
on: function (select) {
}
})
});
},
function (applicationListData) {
xmSelect.render({
el: '#businessVendor',
tips: "选择厂商",
filterable: true,
name: 'applicationId',
autoRow: true,
radio: true,
clickClose: true,
data: applicationListData,
prop: {
name: 'description',
value: 'id'
},
on: function (select) {
}
});
},
function (abilityListData) {
xmSelect.render({
el: '#ability',
tips: "选择识别能力",
filterable: true,
name: 'abilityId',
autoRow: true,
radio: true,
clickClose: true,
data: abilityListData,
prop: {
name: 'name',
value: 'id'
},
on: function (select) {
}
});
}
);
list = table.render({
elem: "#recordList"
, url: "appAbilityRecordAll/getListByPage"
, title: "ocr应用能力调用记录"
, response: {
elem: "#recordList",
url: "appAbilityRecordAll/getListByPage",
title: "ocr应用能力调用记录",
response: {
statusCode: 200
}
, method: "post"
, page: true
, toolbar: true
, defaultToolbar: ['filter', 'print', {title: "导出数据表格", layEvent: "exports", icon: "layui-icon-export"}]
, cols: [
},
method: "post",
page: true,
toolbar: true,
defaultToolbar: ['filter', 'print', {title: "导出数据表格", layEvent: "exports", icon: "layui-icon-export"}],
cols: [
[
{field: 'id', width: 80, title: '编号', align: "center", hide: true}
, {field: 'courtName', width: 260, title: '法院名称', align: "center"}
......@@ -93,9 +169,9 @@
, {field: 'callCount', width: 90, title: '调用次数', align: "center"}
, {field: 'appAbilityName', width: 180, title: '识别能力', align: "center"}
, {field: 'ip', width: 160, title: '调用方IP', align: "center"}
, {field: 'callTime', width: 180, title: '调用时间', align: "center"}
, {field: 'fileCount', width: 90, title: '文件页数', align: "center"}
, {field: 'serverIp', width: 160, title: '服务器IP', align: "center"}
, {field: 'callTime', title: '调用时间', align: "center"}
// , {
// title: '操作', align: 'center'
// , templet: function (data) {
......@@ -104,11 +180,11 @@
// }
// }
]
]
, before: function (e) {
],
before: function (e) {
condition = e.where;
}
, parseData: function (res) {
},
parseData: function (res) {
return {
code: res.code,
msg: res.msg,
......@@ -119,7 +195,6 @@
});
});
});
table.on("toolbar(recordList)", function (obj) {
if (obj.event === "exports") {
......@@ -151,13 +226,27 @@
}
function initSearchForm(callback) {
function initSearchForm(courtListCallback, applicationListCallback, abilityListCallback) {
$.get("appAbilityRecordAll/getCourtByRole", function (res) {
if (res.code !== 200) {
layer.msg(res.msg, {icon: 2});
} else {
courtList = res.data;
callback(res.data)
courtListCallback(res.data)
}
});
$.get(gatewayUrl + "/configApp/selectApplicationAll", function (res) {
if (res.code !== 200) {
layer.msg(res.msg, {icon: 2});
} else {
applicationListCallback(res.data)
}
});
$.get(gatewayUrl + "/configApp/selectConfigAbilityAll", function (res) {
if (res.code !== 200) {
layer.msg(res.msg, {icon: 2});
} else {
abilityListCallback(res.data)
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment