Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fk-spider-web
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周田
fk-spider-web
Commits
d5e5b74c
Commit
d5e5b74c
authored
Sep 24, 2025
by
周田
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修正函数命名,统一为驼峰式命名法
parent
518e8e10
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
34 deletions
+46
-34
spiderData.ts
src/api/spiderData.ts
+4
-4
index.vue
src/components/Export/index.vue
+35
-23
dsnDataTab.vue
src/views/os-dataDisplay/components/dsnData/dsnDataTab.vue
+2
-2
ituDataTab.vue
src/views/os-dataDisplay/components/ituDataTab.vue
+3
-3
stDataTab.vue
src/views/os-dataDisplay/components/stDataTab.vue
+2
-2
No files found.
src/api/spiderData.ts
View file @
d5e5b74c
...
...
@@ -3,7 +3,7 @@ import type { ApiResponse, QueryParams, UserQueryParams } from '@/utils/request'
import
{
spiderDataApi
}
from
'./apiPaths'
// 获取dsn数据列表
export
function
getDsn
l
ist
(
data
:
UserQueryParams
)
{
export
function
getDsn
L
ist
(
data
:
UserQueryParams
)
{
return
request
({
url
:
spiderDataApi
.
dsnList
,
method
:
POST
,
...
...
@@ -30,7 +30,7 @@ export function deleteDsnData(data: UserQueryParams) {
}
// 获取itu数据列表
export
function
getItu
l
ist
(
data
:
UserQueryParams
)
{
export
function
getItu
L
ist
(
data
:
UserQueryParams
)
{
return
request
({
url
:
spiderDataApi
.
ituList
,
method
:
POST
,
...
...
@@ -57,7 +57,7 @@ export function deleteItuData(data: UserQueryParams) {
}
// 获取st数据列表
export
function
getSt
l
ist
(
data
:
UserQueryParams
)
{
export
function
getSt
L
ist
(
data
:
UserQueryParams
)
{
return
request
({
url
:
spiderDataApi
.
stList
,
method
:
POST
,
...
...
@@ -84,7 +84,7 @@ export function deleteStData(data: UserQueryParams) {
}
// 导出爬虫数据
export
function
e
s
portSpiderData
(
data
:
UserQueryParams
)
{
export
function
e
x
portSpiderData
(
data
:
UserQueryParams
)
{
return
request
({
url
:
spiderDataApi
.
exportSpiderData
,
method
:
POST
,
...
...
src/components/Export/index.vue
View file @
d5e5b74c
...
...
@@ -26,7 +26,7 @@
<
script
lang=
"ts"
setup
>
import
{
ref
,
watch
}
from
'vue'
import
{
defineProps
}
from
'vue'
;
import
{
e
s
portSpiderData
}
from
'@/api/spiderData'
;
import
{
e
x
portSpiderData
}
from
'@/api/spiderData'
;
import
axios
from
'axios'
const
props
=
defineProps
({
dialogVisible
:
{
...
...
@@ -44,28 +44,40 @@ const checkList = ref([])
const
timeValue
=
ref
(
''
)
// 导出方法
const
handleExport
=
async
()
=>
{
const
result
=
await
esportSpiderData
({
times
:
timeValue
.
value
,
filters
:
checkList
.
value
})
// aaa(result)
// axios({
// method: 'post',
// url: 'http://localhost:5001/api/export/downloadFile',
// responseType: 'blob',
// data: { times: timeValue.value, filters: checkList.value }
// // he
// })
// .then(res => {
// // 假设 data 是返回来的二进制数据
// const url = window.URL.createObjectURL(new Blob([res], { type: "application/zip" }))
// const link = document.createElement('a')
// link.style.display = 'none'
// link.href = url
// link.setAttribute('download', '333.zip')
// document.body.appendChild(link)
// link.click()
// document.body.removeChild(link)
// })
exportDialogVisible
.
value
=
false
// exportSpiderData({ times: timeValue.value, filters: checkList.value })
try
{
const
res
=
await
axios
.
post
(
'/api/export/downloadFile'
,
{
times
:
timeValue
.
value
,
filters
:
checkList
.
value
},
{
responseType
:
'blob'
,
headers
:
{
'Token'
:
localStorage
.
getItem
(
'token'
)
||
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiZXhwIjoxNzU5MjA5NzM4fQ.6hVko0EQTuz7OYjXEafZYLpmkVEyiLhZ8aWHi0Pni_s'
,
// 根据你的 token 存储方式调整
},
}
)
// 获取文件名
const
disposition
=
res
.
headers
[
'content-disposition'
]
let
fileName
=
'export.zip'
if
(
disposition
)
{
const
match
=
disposition
.
match
(
/filename="
?([^
"
]
+
)
"
?
/
)
if
(
match
)
fileName
=
decodeURIComponent
(
match
[
1
])
}
const
blob
=
new
Blob
([
res
.
data
],
{
type
:
'application/zip'
})
console
.
log
(
blob
.
type
,
blob
.
size
);
const
url
=
window
.
URL
.
createObjectURL
(
blob
)
const
a
=
document
.
createElement
(
'a'
)
a
.
href
=
url
a
.
download
=
fileName
document
.
body
.
appendChild
(
a
)
a
.
click
()
document
.
body
.
removeChild
(
a
)
window
.
URL
.
revokeObjectURL
(
url
)
}
catch
(
e
)
{
console
.
error
(
'导出失败'
,
e
)
}
}
// 关闭弹窗的方法
const
close
=
()
=>
{
...
...
src/views/os-dataDisplay/components/dsnData/dsnDataTab.vue
View file @
d5e5b74c
...
...
@@ -218,7 +218,7 @@
import
{
onMounted
,
ref
}
from
'vue'
import
Pagination
from
'@/components/pagination/index.vue'
import
exportDialog
from
'@/components/Export/index.vue'
import
{
getDsn
l
ist
,
getDsnDetail
,
deleteDsnData
}
from
'@/api/spiderData'
import
{
getDsn
L
ist
,
getDsnDetail
,
deleteDsnData
}
from
'@/api/spiderData'
const
showDeleteDialog
=
ref
(
false
)
const
timeValue
=
ref
(
''
)
...
...
@@ -272,7 +272,7 @@ const handleDetails = (row: any) => {
}
const
getData
=
async
()
=>
{
const
res
=
await
getDsn
l
ist
({
page
:
pageObj
.
value
.
pageNo
,
size
:
pageObj
.
value
.
pageSize
})
const
res
=
await
getDsn
L
ist
({
page
:
pageObj
.
value
.
pageNo
,
size
:
pageObj
.
value
.
pageSize
})
console
.
log
(
res
);
tableData
.
value
=
res
.
data
.
list
[
0
].
dishes
// pageObj.value.total = res.data[0].dishes.length
...
...
src/views/os-dataDisplay/components/ituDataTab.vue
View file @
d5e5b74c
...
...
@@ -274,7 +274,7 @@
import
{
onMounted
,
ref
}
from
'vue'
import
Pagination
from
'@/components/pagination/index.vue'
import
exportDialog
from
'@/components/Export/index.vue'
import
{
getItu
l
ist
,
getItuDetail
,
deleteItuData
}
from
'@/api/spiderData'
import
{
getItu
L
ist
,
getItuDetail
,
deleteItuData
}
from
'@/api/spiderData'
const
showDeleteDialog
=
ref
(
false
)
const
timeValue
=
ref
(
''
)
...
...
@@ -362,7 +362,7 @@ const handleDetails = async (id: any) => {
}
const
getData
=
async
()
=>
{
const
res
=
await
getItu
l
ist
({
page
:
pageObj
.
value
.
pageNo
,
size
:
pageObj
.
value
.
pageSize
})
const
res
=
await
getItu
L
ist
({
page
:
pageObj
.
value
.
pageNo
,
size
:
pageObj
.
value
.
pageSize
})
console
.
log
(
res
);
pageObj
.
value
.
total
=
res
.
data
.
total
tableData
.
value
=
res
.
data
.
list
...
...
@@ -388,7 +388,7 @@ const handleExport = () => {
showDeleteDialog
.
value
=
true
}
const
handleSearch
=
async
()
=>
{
const
res
=
await
getItu
l
ist
({
sat_name
:
targetName
.
value
,
ntc_id
:
snsId
.
value
,
times
:
timeValue
.
value
})
const
res
=
await
getItu
L
ist
({
sat_name
:
targetName
.
value
,
ntc_id
:
snsId
.
value
,
times
:
timeValue
.
value
})
tableData
.
value
=
res
.
data
}
onMounted
(()
=>
{
...
...
src/views/os-dataDisplay/components/stDataTab.vue
View file @
d5e5b74c
...
...
@@ -173,7 +173,7 @@
import
{
onMounted
,
ref
}
from
'vue'
import
Pagination
from
'@/components/pagination/index.vue'
import
exportDialog
from
'@/components/Export/index.vue'
import
{
getSt
l
ist
,
getStDetail
,
deleteStData
}
from
'@/api/spiderData'
import
{
getSt
L
ist
,
getStDetail
,
deleteStData
}
from
'@/api/spiderData'
const
showDeleteDialog
=
ref
(
false
)
const
timeValue
=
ref
(
''
)
...
...
@@ -231,7 +231,7 @@ ${res.data.data[0].TLE_LINE2}`
detailVisibleValue
.
value
=
true
}
const
getData
=
async
()
=>
{
const
res
=
await
getSt
l
ist
({
page
:
pageObj
.
value
.
pageNo
,
size
:
pageObj
.
value
.
pageSize
})
const
res
=
await
getSt
L
ist
({
page
:
pageObj
.
value
.
pageNo
,
size
:
pageObj
.
value
.
pageSize
})
pageObj
.
value
.
total
=
res
.
data
.
total
tableData
.
value
=
res
.
data
.
list
// console.log(res);
...
...
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