Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
ocrCloudPlatformAdmin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ocr-cloud-platform
ocrCloudPlatformAdmin
Commits
dd2148d2
Commit
dd2148d2
authored
Jan 27, 2024
by
黄明步
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成调用记录导出
parent
a7d44850
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
17 deletions
+36
-17
src/main/resources/templates/appAbilityRecord/list.html
+36
-17
No files found.
src/main/resources/templates/appAbilityRecord/list.html
View file @
dd2148d2
...
...
@@ -5,6 +5,7 @@
<meta
charset=
"UTF-8"
>
<title>
ocr应用能力调用记录
</title>
<link
rel=
"stylesheet"
href=
"layui/css/layui.css"
media=
"all"
>
<script
src=
"js/FileSaver.min.js"
></script>
<style>
html
,
body
{
width
:
100%
;
...
...
@@ -81,7 +82,7 @@
</script>
<script>
var
list
,
table
,
form
,
condition
=
{};
let
courtList
=
[];
let
courtList
=
[]
,
formData
;
layui
.
use
([
'laydate'
,
"table"
,
"form"
],
function
()
{
var
laydate
=
layui
.
laydate
table
=
layui
.
table
;
...
...
@@ -198,31 +199,49 @@
table
.
on
(
"toolbar(recordList)"
,
function
(
obj
)
{
if
(
obj
.
event
===
"exports"
)
{
$
.
ajax
({
url
:
gatewayUrl
+
"/appAbilityRecordAll/getList"
,
data
:
condition
,
type
:
"post"
,
success
:
function
(
data
)
{
table
.
exportFile
(
list
.
config
.
id
,
data
);
},
error
:
function
()
{
layer
.
msg
(
"导出数据失败!"
,
{
icon
:
2
});
}
})
layer
.
confirm
(
'由于当前数据量过大,仅支持导出10000条记录,是否继续?'
,
{
icon
:
3
},
function
(
index
){
// 在确认按钮点击时关闭确认框
layer
.
close
(
index
);
let
loadIndex
=
layer
.
load
(
2
);
handleFormData
()
$
.
ajax
({
url
:
gatewayUrl
+
"/appAbilityRecordAll/exportRecord"
,
data
:
formData
,
type
:
"post"
,
xhrFields
:
{
responseType
:
'blob'
// 设置响应类型为二进制流
},
success
:
function
(
data
)
{
let
blob
=
new
Blob
([
data
],
{
type
:
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
});
saveAs
(
blob
,
'应用能力调用记录.xlsx'
);
layer
.
close
(
loadIndex
)
},
error
:
function
()
{
layer
.
close
(
loadIndex
)
layer
.
msg
(
"数据量过大,导出数据失败!"
,
{
icon
:
2
});
}
})
},
function
(){
layer
.
msg
(
'已取消导出'
);
});
}
});
function
search
()
{
let
formData
=
form
.
val
(
"searchForm"
)
handleFormData
()
list
.
reload
({
where
:
formData
,
page
:
{
curr
:
1
}
})
}
function
handleFormData
()
{
formData
=
form
.
val
(
"searchForm"
)
formData
.
ipScope
=
""
courtList
.
filter
(
item
=>
item
.
courtCode
===
parseInt
(
formData
.
courtCode
)).
forEach
(
item
=>
{
// 如果法院ipScope为空的,则默认赋值为'255.255.255.255' 并添加到formData中
formData
.
ipScope
=
item
.
ipScope
?
item
.
ipScope
:
"255.255.255.255"
})
list
.
reload
({
where
:
formData
,
page
:
{
curr
:
1
}
})
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment