Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
modeng-web
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
邢保振
modeng-web
Commits
c7f84b54
Commit
c7f84b54
authored
Dec 12, 2023
by
zhaoqingwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
阿拉丁-魔登
parent
a3a5f45b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
218 additions
and
2 deletions
+218
-2
adsDeskRequest.js
src/api/operation/adsDeskRequest.js
+12
-0
index.vue
src/components/JsonEditor/index.vue
+47
-0
index.vue
src/views/adsdesk/adsUser/index.vue
+2
-2
index.vue
src/views/operation/requestLog/index.vue
+157
-0
No files found.
src/api/operation/adsDeskRequest.js
0 → 100644
View file @
c7f84b54
import
request
from
'@/utils/request'
import
{
baseUrl
}
from
'@/utils/constant'
// 查询请求记录列表
export
function
listAdsDeskRequest
(
data
)
{
return
request
({
url
:
baseUrl
+
'/request_log/list'
,
method
:
'post'
,
data
:
data
})
}
\ No newline at end of file
src/components/JsonEditor/index.vue
0 → 100644
View file @
c7f84b54
<
template
>
<json-editor-vue
class=
"editor"
language=
"zh-CN"
v-model=
"data"
:currentMode=
"currentMode"
:options=
"options"
@
change=
"changeJson"
/>
</
template
>
<
script
setup
>
import
{
ref
}
from
"vue"
;
import
JsonEditorVue
from
'json-editor-vue3'
const
{
proxy
}
=
getCurrentInstance
();
const
options
=
ref
({})
const
props
=
defineProps
({
data
:
{
required
:
true
,
type
:
Object
},
currentMode
:
{
required
:
false
,
type
:
String
,
default
:
"code"
}
})
function
changeJson
()
{
proxy
.
$emit
(
"changeJson"
,
props
.
data
);
}
</
script
>
<
style
lang=
"scss"
>
.editor
{
height
:
350px
;
}
.jsoneditor-menu
{
//display: none;
background-color
:
#b1b3b8
;
}
</
style
>
\ No newline at end of file
src/views/adsdesk/adsUser/index.vue
View file @
c7f84b54
...
@@ -87,12 +87,12 @@
...
@@ -87,12 +87,12 @@
<el-table-column
prop=
"name"
label=
"用户姓名"
min-width=
"120"
show-overflow-tooltip
fixed
/>
<el-table-column
prop=
"name"
label=
"用户姓名"
min-width=
"120"
show-overflow-tooltip
fixed
/>
<el-table-column
label=
"操作"
align=
"center"
min-width=
"200"
fixed
>
<el-table-column
label=
"操作"
align=
"center"
min-width=
"200"
fixed
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
<
!--
<
el-button
type=
"text"
type=
"text"
icon=
"View"
icon=
"View"
@
click=
"handleCustomerDetail(scope.row.customerId)"
@
click=
"handleCustomerDetail(scope.row.customerId)"
>
客户详情
>
客户详情
</el-button>
</el-button>
-->
<el-button
<el-button
type=
"text"
type=
"text"
icon=
"Pointer"
icon=
"Pointer"
...
...
src/views/operation/requestLog/index.vue
0 → 100644
View file @
c7f84b54
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"请求地址"
prop=
"requestUrl"
>
<el-input
v-model=
"queryParams.requestUrl"
placeholder=
"请输入请求地址"
clearable
style=
"width: 160px"
@
keyup
.
enter=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"操作人"
prop=
"optUser"
>
<el-input
v-model=
"queryParams.optUser"
placeholder=
"请输入请求操作人"
clearable
style=
"width: 160px"
@
keyup
.
enter=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"Search"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"Refresh"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
:data=
"requestLogList"
@
sort-change=
"handleSortChange"
>
<el-table-column
label=
"编号"
align=
"center"
sortable=
"custom"
prop=
"id"
/>
<el-table-column
label=
"请求地址"
align=
"center"
prop=
"requestUrl"
/>
<el-table-column
label=
"请求方式"
align=
"center"
prop=
"requestMethod"
/>
<el-table-column
label=
"请求数据"
align=
"center"
>
<template
#
default=
"scope"
>
<span
v-if=
"!scope.row.requestBody"
>
无
</span>
<el-button
plain
icon=
"CirclePlus"
v-if=
"scope.row.requestBody"
@
click=
"showDetail(scope.row.requestBody)"
>
查看
</el-button>
</
template
>
</el-table-column>
<el-table-column
label=
"响应状态"
align=
"center"
prop=
"responseCode"
/>
<el-table-column
label=
"响应数据"
align=
"center"
>
<
template
#
default=
"scope"
>
<span
v-if=
"!scope.row.responseBody"
>
无
</span>
<el-button
plain
icon=
"CirclePlus"
v-if=
"scope.row.responseBody"
@
click=
"showDetail(scope.row.responseBody)"
>
查看
</el-button>
</
template
>
</el-table-column>
<el-table-column
label=
"操作人"
sortable=
"custom"
align=
"center"
prop=
"optUser"
/>
<el-table-column
label=
"请求时间"
sortable=
"custom"
align=
"center"
prop=
"gmtCreate"
>
<
template
#
default=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
gmtCreate
)
}}
</span>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
v-model:page=
"queryParams.pageNum"
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<el-dialog
title=
"详情"
v-model=
"show"
width=
"500px"
append-to-body
>
<el-row
align=
"middle"
style=
"margin-top:0;"
>
<el-col
:span=
"24"
>
<json-editor
:data=
"detail"
currentMode=
"view"
/>
</el-col>
</el-row>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"show=false"
>
关闭
</el-button>
</div>
</
template
>
</el-dialog>
</div>
</template>
<
script
setup
name=
"RequestLog"
>
import
{
ref
}
from
"vue"
;
//import JsonEditor from "@/components/JsonEditor"
import
{
listAdsDeskRequest
}
from
"@/api/operation/adsDeskRequest"
;
const
{
proxy
}
=
getCurrentInstance
();
// const {ads_media_code, sys_yes_no} = proxy.useDict('ads_media_code', 'sys_yes_no');
const
requestLogList
=
ref
([]);
const
loading
=
ref
(
true
);
const
showSearch
=
ref
(
true
);
const
total
=
ref
(
0
);
const
title
=
ref
(
""
);
const
show
=
ref
(
false
);
const
detail
=
ref
({})
const
queryParams
=
ref
({
pageNum
:
1
,
pageSize
:
10
,
requestUrl
:
null
,
optUser
:
null
});
function
showDetail
(
body
)
{
show
.
value
=
true
detail
.
value
=
JSON
.
parse
(
body
)
}
function
getList
()
{
loading
.
value
=
true
;
listAdsDeskRequest
(
queryParams
.
value
).
then
(
response
=>
{
requestLogList
.
value
=
response
.
rows
;
total
.
value
=
response
.
total
;
loading
.
value
=
false
;
});
}
/** 搜索按钮操作 */
function
handleQuery
()
{
queryParams
.
value
.
pageNum
=
1
;
getList
();
}
/** 重置按钮操作 */
function
resetQuery
()
{
proxy
.
resetForm
(
"queryRef"
);
handleQuery
();
}
/** 排序触发事件 */
function
handleSortChange
(
column
,
prop
,
order
)
{
queryParams
.
value
.
orderByColumn
=
column
.
prop
;
queryParams
.
value
.
isAsc
=
column
.
order
;
getList
();
}
/** 删除按钮操作 */
// function handleDelete(row) {
// const deleteIds = row.id ? [row.id] : ids.value;
// proxy.$modal.confirm('是否确认删除API根地址编号为"' + deleteIds + '"的数据项?').then(function () {
// return delApiRootUrl(deleteIds);
// }).then(() => {
// getList();
// proxy.$modal.msgSuccess("删除成功");
// }).catch(() => {
// });
// }
getList
();
</
script
>
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