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
808b936a
Commit
808b936a
authored
Nov 11, 2025
by
yzh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:esa爬虫静态页面
parent
aa2540fa
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
25 deletions
+36
-25
index.vue
src/components/Export/index.vue
+3
-3
index.vue
src/components/pagination/index.vue
+16
-2
esDataTab.vue
src/views/os-dataDisplay/components/esDataTab.vue
+0
-0
index.vue
src/views/os-dataDisplay/index.vue
+5
-1
addTaskDialog.vue
src/views/os-taskInformation/components/addTaskDialog.vue
+12
-19
No files found.
src/components/Export/index.vue
View file @
808b936a
...
@@ -236,7 +236,7 @@ const handleExport = async () => {
...
@@ -236,7 +236,7 @@ const handleExport = async () => {
// 4. 使用之前获取的句柄保存文件
// 4. 使用之前获取的句柄保存文件
await
saveToSelectedLocation
(
res
.
data
,
fileHandle
);
await
saveToSelectedLocation
(
res
.
data
,
fileHandle
);
loading
.
close
();
loading
.
close
();
ElMessage
.
success
(
'
ZIP文件保存
成功'
);
ElMessage
.
success
(
'
数据导出
成功'
);
close
()
close
()
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
'导出失败'
,
e
);
console
.
error
(
'导出失败'
,
e
);
...
@@ -246,8 +246,8 @@ const handleExport = async () => {
...
@@ -246,8 +246,8 @@ const handleExport = async () => {
}
}
});
});
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
'操作失败'
,
error
);
console
.
error
(
error
);
ElMessage
.
error
(
'无法打开保存对话框,请使用浏览器默认下载'
);
//
ElMessage.error('无法打开保存对话框,请使用浏览器默认下载');
}
}
};
};
...
...
src/components/pagination/index.vue
View file @
808b936a
<!-- 基于 ruoyi-vue3 的 Pagination 重构,核心是简化无用的属性,并使用 ts 重写 -->
<!-- 基于 ruoyi-vue3 的 Pagination 重构,核心是简化无用的属性,并使用 ts 重写 -->
<
template
>
<
template
>
<el-pagination
<el-config-provider
:locale=
"zhCn"
>
<el-pagination
v-show=
"total > 0"
v-show=
"total > 0"
v-model:current-page=
"currentPage"
v-model:current-page=
"currentPage"
v-model:page-size=
"pageSize"
v-model:page-size=
"pageSize"
...
@@ -9,15 +10,28 @@
...
@@ -9,15 +10,28 @@
:pager-count=
"pagerCount"
:pager-count=
"pagerCount"
:total=
"total"
:total=
"total"
class=
"mt-4"
class=
"mt-4"
layout=
"total,
sizes, prev, pager, next, jumper"
layout=
"total,sizes, prev, pager, next, jumper"
@
size-change=
"handleSizeChange"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
@
current-change=
"handleCurrentChange"
jumper-text=
"跳转"
/>
/>
</el-config-provider>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
computed
}
from
'vue'
import
{
computed
}
from
'vue'
// ElConfigProvider 组件
import
{
ElConfigProvider
}
from
'element-plus'
;
// 引入中文包
import
zhCn
from
'element-plus/es/locale/lang/zh-cn'
;
defineOptions
({
name
:
'Pagination'
})
defineOptions
({
name
:
'Pagination'
})
// 更改分页文字
zhCn
.
el
.
pagination
.
total
=
'共 `{total} 条`'
;
zhCn
.
el
.
pagination
.
goto
=
'跳至'
;
zhCn
.
el
.
pagination
.
pagesize
=
'条/页'
;
zhCn
.
el
.
pagination
.
pageClassifier
=
'页'
;
const
props
=
defineProps
({
const
props
=
defineProps
({
// 总条目数
// 总条目数
total
:
{
total
:
{
...
...
src/views/os-dataDisplay/components/esDataTab.vue
0 → 100644
View file @
808b936a
This diff is collapsed.
Click to expand it.
src/views/os-dataDisplay/index.vue
View file @
808b936a
...
@@ -35,6 +35,8 @@
...
@@ -35,6 +35,8 @@
<!-- ST数据页面组件 -->
<!-- ST数据页面组件 -->
<stDataTab
v-if=
"mode === 'ST数据'"
>
<stDataTab
v-if=
"mode === 'ST数据'"
>
</stDataTab>
</stDataTab>
<esDataTab
v-if=
"mode === 'ESA数据'"
>
</esDataTab>
</div>
</div>
<exportDialog
v-model:dialogVisible=
"showDeleteDialog"
@
confirm=
"handleExportConfirm"
/>
<exportDialog
v-model:dialogVisible=
"showDeleteDialog"
@
confirm=
"handleExportConfirm"
/>
...
@@ -48,13 +50,15 @@ import allDataTab from './components/allDataTab.vue'
...
@@ -48,13 +50,15 @@ import allDataTab from './components/allDataTab.vue'
import
ituDataTab
from
'./components/ituDataTab.vue'
import
ituDataTab
from
'./components/ituDataTab.vue'
import
stDataTab
from
'./components/stDataTab.vue'
import
stDataTab
from
'./components/stDataTab.vue'
import
dsnDataTab
from
'./components/dsnData/dsnTab.vue'
import
dsnDataTab
from
'./components/dsnData/dsnTab.vue'
import
esDataTab
from
'./components/esDataTab.vue'
import
exportDialog
from
'@/components/Export/index.vue'
import
exportDialog
from
'@/components/Export/index.vue'
import
{
genFileId
}
from
'element-plus'
import
{
genFileId
}
from
'element-plus'
import
type
{
UploadInstance
,
UploadProps
,
UploadRawFile
}
from
'element-plus'
import
type
{
UploadInstance
,
UploadProps
,
UploadRawFile
}
from
'element-plus'
// const
// const
const
mode
=
ref
(
'DSN数据'
)
const
mode
=
ref
(
'DSN数据'
)
const
showDeleteDialog
=
ref
(
false
)
const
showDeleteDialog
=
ref
(
false
)
const
sizeOptions
=
[
'DSN数据'
,
'ITU数据'
,
'ST数据'
]
const
sizeOptions
=
[
'DSN数据'
,
'ITU数据'
,
'ST数据'
,
'ES数据'
]
const
route
=
useRoute
()
const
route
=
useRoute
()
const
router
=
useRouter
()
const
router
=
useRouter
()
const
modeValue
=
ref
<
any
>
(
'数据展示'
)
const
modeValue
=
ref
<
any
>
(
'数据展示'
)
...
...
src/views/os-taskInformation/components/addTaskDialog.vue
View file @
808b936a
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"所属爬虫:"
v-if=
"currentMode === AddMode.ADD_TASK"
prop=
"spiderTypeValue"
>
<el-form-item
label=
"所属爬虫:"
v-if=
"currentMode === AddMode.ADD_TASK"
prop=
"spiderTypeValue"
>
<el-select
v-model=
"ruleForm.spiderTypeValue"
placeholder=
"请选择所属爬虫"
style=
"width: 90%"
>
<el-select
v-model=
"ruleForm.spiderTypeValue"
placeholder=
"请选择所属爬虫"
style=
"width: 90%"
>
<el-option
v-for=
"item in spiderTypeOptions"
:key=
"item.
value"
:label=
"item.label
"
<el-option
v-for=
"item in spiderTypeOptions"
:key=
"item.
spider"
:label=
"item.spider
"
:value=
"item.
value"
:id=
"item.value
"
/>
:value=
"item.
spider"
:id=
"item.spider
"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"执行频率:"
prop=
"cronExpression"
>
<el-form-item
label=
"执行频率:"
prop=
"cronExpression"
>
...
@@ -35,6 +35,7 @@ import { AddMode } from './enum'
...
@@ -35,6 +35,7 @@ import { AddMode } from './enum'
import
{
Crontab
}
from
'@/components/Crontab/index'
import
{
Crontab
}
from
'@/components/Crontab/index'
import
type
{
FormInstance
,
FormRules
}
from
'element-plus'
import
type
{
FormInstance
,
FormRules
}
from
'element-plus'
import
{
ElMessage
}
from
'element-plus'
import
{
ElMessage
}
from
'element-plus'
import
{
getSpiderList
}
from
'@/api/system.ts'
interface
RuleForm
{
interface
RuleForm
{
taskName
:
string
taskName
:
string
...
@@ -59,7 +60,7 @@ const props = defineProps<addDialogPropType>()
...
@@ -59,7 +60,7 @@ const props = defineProps<addDialogPropType>()
const
rules
=
ref
<
FormRules
<
RuleForm
>>
({
const
rules
=
ref
<
FormRules
<
RuleForm
>>
({
taskName
:
[
taskName
:
[
{
required
:
true
,
message
:
'请输入任务名称'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入任务名称'
,
trigger
:
'blur'
},
{
min
:
1
,
max
:
50
,
message
:
'任务名称应在1-5
0个字符之间'
,
trigger
:
'blur'
},
{
min
:
2
,
max
:
50
,
message
:
'任务名称应在2-2
0个字符之间'
,
trigger
:
'blur'
},
],
],
spiderTypeValue
:
[
spiderTypeValue
:
[
{
{
...
@@ -93,20 +94,7 @@ const emit = defineEmits(['update:dialogVisible', 'confirm', 'update:mode', 'get
...
@@ -93,20 +94,7 @@ const emit = defineEmits(['update:dialogVisible', 'confirm', 'update:mode', 'get
// 组件的状态
// 组件的状态
const
currentVisible
=
ref
(
props
.
dialogVisible
)
const
currentVisible
=
ref
(
props
.
dialogVisible
)
const
currentMode
=
ref
(
props
.
mode
)
const
currentMode
=
ref
(
props
.
mode
)
const
spiderTypeOptions
=
ref
([
const
spiderTypeOptions
=
ref
()
{
value
:
'api_spider'
,
label
:
'api_spider'
},
{
value
:
'dsn_now'
,
label
:
'dsn_now'
},
{
value
:
'itu_space_explorer'
,
label
:
'itu_space_explorer'
},
])
const
taskParams
=
ref
({
const
taskParams
=
ref
({
scrapyd_server_id
:
'1'
,
scrapyd_server_id
:
'1'
,
schedule_type
:
'0'
,
schedule_type
:
'0'
,
...
@@ -162,7 +150,12 @@ const handleConfirm = async () => {
...
@@ -162,7 +150,12 @@ const handleConfirm = async () => {
}
}
})
})
}
}
const
getData
=
async
()
=>
{
const
res
=
await
getSpiderList
({
scrapydServerId
:
'1'
,
project
:
'spiders'
})
spiderTypeOptions
.
value
=
res
.
data
console
.
log
(
res
);
}
// 监听props变化,同步给组件内部
// 监听props变化,同步给组件内部
watch
(()
=>
props
.
dialogVisible
,
watch
(()
=>
props
.
dialogVisible
,
(
newVal
)
=>
{
(
newVal
)
=>
{
...
@@ -202,7 +195,7 @@ watch(
...
@@ -202,7 +195,7 @@ watch(
{
immediate
:
true
}
{
immediate
:
true
}
);
);
onMounted
(()
=>
{
onMounted
(()
=>
{
getData
()
})
})
</
script
>
</
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