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
17762b2c
Commit
17762b2c
authored
Mar 11, 2025
by
Zachary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test(测试国别):测试国别
parent
d0e3d2e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
109 additions
and
0 deletions
+109
-0
index.vue
src/views/monitor/test/index.vue
+109
-0
No files found.
src/views/monitor/test/index.vue
0 → 100644
View file @
17762b2c
<
template
>
<div
class=
"testLog-manage"
>
<el-table
:data=
"datas"
border
style=
"width: 100%"
>
<el-table-column
fixed
prop=
"id"
label=
"序号"
width=
"150"
>
</el-table-column>
<el-table-column
prop=
"data"
label=
"数据"
width=
"120"
>
</el-table-column>
<el-table-column
label=
"操作"
>
<template
slot-scope=
"scope"
>
<el-button
@
click=
"addData"
type=
"text"
size=
"small"
>
增加
</el-button>
<el-button
@
click=
"updateData(scope.row)"
type=
"text"
size=
"small"
>
编辑
</el-button>
<el-button
@
click=
"delData(scope.row)"
type=
"text"
size=
"small"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-dialog
title=
"修改"
:visible
.
sync=
"dialogFormVisible"
>
<el-form
:model=
"form"
>
<el-form-item
label=
"数据"
>
<el-input
v-model=
"form.name"
autocomplete=
"off"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogFormVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogFormVisible = false"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
list
,
add
,
del
,
update
,
detectIp
}
from
'@/api/monitor/testLog'
export
default
{
name
:
'testLog'
,
data
()
{
return
{
datas
:[],
dialogFormVisible
:
false
,
}
},
created
()
{
this
.
getList
()
this
.
detectIP
()
},
methods
:
{
detectIP
(){
detectIp
().
then
(
res
=>
{
console
.
log
(
'国家是:'
,
res
)
})
},
getList
()
{
list
().
then
(
res
=>
{
res
.
data
.
forEach
(
e
=>
{
this
.
datas
.
push
(
e
)
})
})
},
delData
(
row
){
del
(
row
.
id
)
window
.
location
.
reload
()
},
clearData
(){
this
.
datas
=
[]
},
addData
()
{
this
.
$prompt
(
'请输入测试数据'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
}).
then
(({
value
})
=>
{
add
(
value
)
}).
catch
(()
=>
{
});
},
updateData
(
row
){
this
.
$prompt
(
'修改数据'
,
'修改'
,{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
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