Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tea-resources-web
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
tea-resources-web
Commits
6cefbeb7
Commit
6cefbeb7
authored
Jul 22, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
网关日志模块导出
parent
2e82804a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
2 deletions
+34
-2
gatewayLog.vue
src/views/OpenApi/gatewayLog.vue
+34
-2
No files found.
src/views/OpenApi/gatewayLog.vue
View file @
6cefbeb7
...
@@ -66,6 +66,16 @@
...
@@ -66,6 +66,16 @@
@
click=
"resetQuery"
@
click=
"resetQuery"
>
{{
commonField
.
resetName
}}
</el-button>
>
{{
commonField
.
resetName
}}
</el-button>
</el-form-item>
</el-form-item>
<div
style=
"text-align: end;"
>
<!-- //导出-->
<el-button
:class=
"commonField.queryClass"
:type=
"commonField.typePrimary"
:icon=
"commonField.exportIcon"
:size=
"commonField.smallSize"
@
click=
"handleExport"
>
{{
commonField
.
exportName
}}
</el-button>
</div>
</el-form>
</el-form>
</div>
</div>
<div
style=
"padding:5px 10px"
>
<div
style=
"padding:5px 10px"
>
...
@@ -201,7 +211,7 @@
...
@@ -201,7 +211,7 @@
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"请求参数:"
prop=
requestData
>
<el-form-item
label=
"请求参数:"
prop=
"requestData"
>
<el-input
v-model=
"form.requestData"
:disabled=
"formDisabled"
show-word-limit
maxlength=
"20"
placeholder=
"请输入ip"
/>
<el-input
v-model=
"form.requestData"
:disabled=
"formDisabled"
show-word-limit
maxlength=
"20"
placeholder=
"请输入ip"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -242,7 +252,7 @@
...
@@ -242,7 +252,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
iaminstitutionListApi
,
openapilogDetailApi
,
iaminstitutionExportApi
}
from
'@/api/openApi'
import
{
iaminstitutionListApi
,
openapilogDetailApi
,
iaminstitutionExportApi
}
from
'@/api/openApi'
import
commonField
from
'@/utils/commonField'
import
commonField
from
'@/utils/commonField'
export
default
{
export
default
{
...
@@ -333,6 +343,28 @@ export default {
...
@@ -333,6 +343,28 @@ export default {
this
.
queryParams
.
endTime
=
''
this
.
queryParams
.
endTime
=
''
}
}
},
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
this
.
$confirm
(
'是否确认操作?'
,
'警告'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
function
()
{
return
iaminstitutionExportApi
(
queryParams
).
then
(
response
=>
{
const
blob
=
new
Blob
([
response
])
const
downloadElement
=
document
.
createElement
(
'a'
)
const
href
=
window
.
URL
.
createObjectURL
(
blob
)
// 创建下载的链接
downloadElement
.
href
=
href
downloadElement
.
download
=
'网关日志'
+
'.xls'
// 下载后文件名
document
.
body
.
appendChild
(
downloadElement
)
downloadElement
.
click
()
// 点击下载
document
.
body
.
removeChild
(
downloadElement
)
// 下载完成移除元素
window
.
URL
.
revokeObjectURL
(
href
)
// 释放掉blob对象
// this.download(response.msg);
})
})
},
/** 表单重置*/
/** 表单重置*/
reset
()
{
reset
()
{
this
.
form
=
{
this
.
form
=
{
...
...
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