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
f0f07367
Commit
f0f07367
authored
Sep 09, 2025
by
周田
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'yzh' into 'main'
feat:完成了任务信息与系统管理的对话框组件。 See merge request
!4
parents
ebeff1a1
d6d735c4
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
758 additions
and
138 deletions
+758
-138
dialog1.png
src/assets/picture/dialog1.png
+0
-0
index.vue
src/components/Delete/index.vue
+48
-27
allDataTab.vue
src/views/os-dataDisplay/components/allDataTab.vue
+328
-19
index.vue
src/views/os-spiderManager/index.vue
+6
-43
addUserDialog.vue
src/views/os-system/components/addUserDialog.vue
+126
-0
index.vue
src/views/os-system/index.vue
+50
-22
addTaskDialog.vue
src/views/os-taskInformation/components/addTaskDialog.vue
+145
-0
taskCard.vue
src/views/os-taskInformation/components/taskCard.vue
+29
-4
index.vue
src/views/os-taskInformation/index.vue
+26
-23
No files found.
src/assets/picture/dialog1.png
0 → 100644
View file @
f0f07367
6.26 KB
src/components/Delete/index.vue
View file @
f0f07367
<
template
>
<el-dialog
v-model=
"dialogVisible"
title=
"Tips"
width=
"500"
:before-close=
"handleClose"
>
<span>
This is a message
</span>
<template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
Cancel
</el-button>
<el-button
type=
"primary"
@
click=
"dialogVisible = false"
>
Confirm
</el-button>
</div>
</
template
>
</el-dialog>
<el-dialog
v-model=
"deleteDialogVisible"
title=
"删除"
width=
"250"
center
align-center
@
close=
"close"
draggable
>
<div
class=
"text-center"
>
<span
style=
"color: #fff;font-size: 15px;"
>
确定删除吗?
</span>
</div>
<template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"close"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleDelelte"
>
确定
</el-button>
</div>
</
template
>
</el-dialog>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
}
from
'vue'
import
{
ElMessageBox
}
from
'element-plus'
import
{
ref
,
watch
}
from
'vue'
import
{
defineProps
}
from
'vue'
;
const
dialogVisible
=
ref
(
false
)
const
props
=
defineProps
({
dialogVisible
:
{
type
:
Boolean
,
default
:
false
},
mode
:
{
type
:
String
,
default
:
'1'
}
})
const
emit
=
defineEmits
([
'update:dialogVisible'
,
'confirm'
])
const
deleteDialogVisible
=
ref
(
props
.
dialogVisible
)
const
handleClose
=
(
done
:
()
=>
void
)
=>
{
ElMessageBox
.
confirm
(
'Are you sure to close this dialog?'
)
.
then
(()
=>
{
done
()
})
.
catch
(()
=>
{
// catch error
})
// 删除方法
const
handleDelelte
=
()
=>
{
emit
(
'confirm'
)
deleteDialogVisible
.
value
=
false
}
// 关闭弹窗的方法
const
close
=
()
=>
{
deleteDialogVisible
.
value
=
false
}
// 监听父组件传过来的值
watch
(()
=>
props
.
dialogVisible
,
(
newVal
)
=>
{
deleteDialogVisible
.
value
=
newVal
}
)
// 监听组件内的值并向父组件更新
watch
(()
=>
deleteDialogVisible
.
value
,
(
newVal
)
=>
{
emit
(
'update:dialogVisible'
,
newVal
)
}
)
</
script
>
\ No newline at end of file
src/views/os-dataDisplay/components/allDataTab.vue
View file @
f0f07367
...
...
@@ -68,11 +68,11 @@
<el-table-column
property=
"name"
label=
"站点位置"
show-overflow-tooltip
/>
<el-table-column
property=
"name"
label=
"站点名称"
show-overflow-tooltip
/>
<el-table-column
property=
"name"
label=
"Norad Cat ID"
show-overflow-tooltip
/>
<el-table-column
property=
"name"
label=
"SNS Notice ID"
show-overflow-tooltip
/>
<el-table-column
property=
"name"
label=
"数据时间"
show-overflow-tooltip
/>
<el-table-column
property=
"name"
label=
"记录时间"
show-overflow-tooltip
/>
<el-table-column
property=
"name"
label=
"TLE"
show-overflow-tooltip
/>
<el-table-column
property=
"name"
label=
"是否为同步"
show-overflow-tooltip
/>
<el-table-column
property=
"name"
label=
"SNS Notice ID"
show-overflow-tooltip
/>
<el-table-column
property=
"name"
label=
"数据时间"
show-overflow-tooltip
/>
<el-table-column
property=
"name"
label=
"记录时间"
show-overflow-tooltip
/>
<el-table-column
property=
"name"
label=
"TLE"
show-overflow-tooltip
/>
<el-table-column
property=
"name"
label=
"是否为同步"
show-overflow-tooltip
/>
<el-table-column
label=
"操作"
width=
"60"
>
<template
#
default=
"scope"
>
<el-button
type=
"primary"
plain
link
@
click=
"handleDetails(scope.row)"
>
...
...
@@ -87,6 +87,287 @@
</div>
</div>
<div
class=
"detailForm"
>
<el-dialog
v-model=
"detailVisibleValue"
title=
"详情"
center
width=
"765px"
align-center
@
close=
"handleClose"
draggable
>
<el-form
label-width=
"155px"
size=
"small"
>
<div
class=
"form-group"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"SNS Notice ID:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"主管部门:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"目标名称:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"计划/非计划类型:"
>
<el-select
placeholder=
" "
>
<el-option
label=
"计划"
value=
"planned"
/>
<el-option
label=
"非计划"
value=
"unplanned"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"是否为同步:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"同步位置:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"近地点:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"远地点:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"最低海拔:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"参考主体:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"最低频率:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"最高频率:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"状态:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"有效期:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"最早使用日期:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"是否确认使用:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"是否暂停使用:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"记录时间:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"是否纳入国际频率总表:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"最早监管日期:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"是否恢复使用:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"有效期卫星网络旧名称:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"最新相关 BR IFIC 发布日期:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"往返光时(s):"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"距离(km):"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"目标方位:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"目标俯仰:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"上行信号来源:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"上行发射功率:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"上行信号频段:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"风速(km/kr):"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"下行信号来源:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"下行信号频段:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"下行接收功率:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"类型:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"INTLDES:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"失效时间:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"周期(min):"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"INCL:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"RCS:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"SITE:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"是否恢复使用:"
>
<el-input
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"有效期卫星网络旧名称:"
>
<el-input
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"TLE:"
>
<el-input
type=
"textarea"
/>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
</el-dialog>
</div>
</template>
<
script
setup
lang=
"ts"
>
...
...
@@ -95,6 +376,7 @@ import Pagination from '@/components/pagination/index.vue'
const
timeValue
=
ref
(
''
)
const
size
=
ref
(
'综合数据'
)
const
sizeOptions
=
[
'综合数据'
,
'DSN数据'
,
'ITU数据'
,
'ST数据'
]
const
detailVisibleValue
=
ref
(
false
)
const
tableData
=
ref
([
{
name
:
'1'
,
...
...
@@ -134,18 +416,26 @@ const pageObj = ref({
})
const
handleDetails
=
(
row
:
any
)
=>
{
console
.
log
(
row
);
}
const
handleConfirm
=
(
row
:
any
)
=>
{
console
.
log
(
row
);
detailVisibleValue
.
value
=
true
}
const
getData
=
()
=>
{
console
.
log
(
'getData'
);
}
const
handleClose
=
()
=>
{
detailVisibleValue
.
value
=
false
}
</
script
>
<
style
scoped
lang=
"scss"
>
//
调整表单项间距
.detailForm
{
.el-form-item
{
margin-bottom
:
7px
!important
;
}
}
/* 工具栏样式 */
.toolbarStyle
{
background-image
:
url("@/assets/picture/box3.png")
;
...
...
@@ -168,47 +458,65 @@ const getData = () => {
</
style
>
<
style
>
/* 修改el文本域的背景颜色与边框 */
.el-textarea__inner
{
background-color
:
#1d5484
;
--el-input-border-color
:
none
;
}
/* 修改el选择器的样式 */
.el-select__wrapper
{
background-color
:
#1d5484
;
box-shadow
:
none
;
}
/* 删除el选择器选中时的边框 */
.is-hovering
{
box-shadow
:
none
!important
;
}
/* 修改el输入框的样式 */
.el-input__wrapper
{
background-color
:
#1d5484
;
box-shadow
:
none
;
}
/* 修改el下拉框的背景颜色 */
.el-select-dropdown
{
background-color
:
#1d5484
;
}
/* 修改el下拉框选项的字体颜色 */
.el-select-dropdown__item
{
color
:
#FFFFFF
;
}
/* 修改el下拉框选项选中时的文字颜色 */
.el-select-dropdown__item
:hover
{
color
:
#409eff
;
}
/* 修改el日期选择器的边框为none */
.el-date-editor
{
--el-input-border-color
:
none
--el-input-border-color
:
none
}
/* 去除按钮点击后的黑边框 */
.el-button
:focus
{
outline
:
none
;
outline
:
none
;
}
</
style
>
<
style
>
/* 修改弹窗样式 */
.el-dialog
{
background
:
transparent
;
background-image
:
url("@/assets/picture/dialog1.png")
;
background-size
:
100%
100%
;
background-repeat
:
no-repeat
;
color
:
#ffffff
;
.el-dialog__title
{
color
:
#ffffff
;
}
}
/* 修改表单样式 */
.el-form
{
.el-form-item__label
{
color
:
#ffffff
;
}
}
</
style
>
\ No newline at end of file
src/views/os-spiderManager/index.vue
View file @
f0f07367
<
template
>
<div
class=
"mt-20"
>
</div>
<div>
<el-table
:data=
"tableData"
style=
"width: 100%"
border
:header-cell-style=
"
{ textAlign: 'center' }"
...
...
@@ -17,52 +16,16 @@
</el-table-column>
</el-table>
</div>
<div
class=
"pagination w-full flex flex-row-reverse pr-4 m-t-4"
>
<Pagination
:total=
"pageObj.total"
v-model:page=
"pageObj.pageNo"
v-model:limit=
"pageObj.pageSize"
@
pagination=
"getData"
/>
</div>
</template>
<
script
setup
lang=
"ts"
>
import
{
ref
}
from
'vue'
import
Pagination
from
'@/components/pagination/index.vue'
const
errorValue
=
ref
(
''
)
const
taskValue
=
ref
(
''
)
const
timeValue
=
ref
(
''
)
const
searchInput
=
ref
(
''
)
const
targetOptions
=
[
{
value
:
'task1'
,
label
:
'sk网'
,
},
{
value
:
'task2'
,
label
:
'nasa网'
,
},
{
value
:
'task3'
,
label
:
'网'
,
},
]
const
resOptions
=
[
{
value
:
'task1'
,
label
:
'网络中断'
,
},
{
value
:
'task2'
,
label
:
'地址不存在'
,
},
{
value
:
'task3'
,
label
:
'反爬虫'
,
},
]
const
tableData
=
ref
([
{
name
:
'1'
,
...
...
@@ -114,14 +77,14 @@ const pageObj = ref({
const
handleDetails
=
(
row
:
any
)
=>
{
console
.
log
(
row
);
}
const
handleConfirm
=
(
row
:
any
)
=>
{
console
.
log
(
row
);
}
const
getData
=
()
=>
{
console
.
log
(
'getData'
);
}
</
script
>
<
style
scoped
></
style
>
<
style
scoped
>
/* 去除按钮边框 */
.el-button
:focus
{
outline
:
none
;
}
</
style
>
src/views/os-system/components/addUserDialog.vue
0 → 100644
View file @
f0f07367
<
template
>
<el-dialog
v-model=
"currentVisible"
:title=
"currentMode === '1' ? '新增用户' : '编辑用户'"
width=
"610"
center
align-center
@
close=
"handleClose"
draggable
>
<el-form
:inline=
"true"
>
<el-form-item
label=
"用户账号:"
>
<el-input
v-model=
"taskName"
/>
</el-form-item>
<el-form-item
label=
"用户名称:"
>
<el-input
v-model=
"taskFrequency"
/>
</el-form-item>
</el-form>
<div
class=
"m-t-4"
>
</div>
<el-form
:inline=
"true"
>
<el-form-item
label=
"用户备注:"
>
<el-input
v-model=
"taskName"
/>
</el-form-item>
<el-form-item
label=
"用户密码:"
>
<el-input
v-model=
"taskFrequency"
/>
</el-form-item>
</el-form>
<div
class=
"m-t-4"
>
</div>
<template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"handleClose"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleConfirm"
>
确定
</el-button>
</div>
</
template
>
</el-dialog>
</template>
<
script
lang=
"ts"
setup
>
import
{
onMounted
,
ref
}
from
'vue'
import
{
defineProps
}
from
'vue'
;
import
{
watch
}
from
'vue'
const
props
=
defineProps
({
dialogVisible
:
{
type
:
Boolean
,
default
:
false
},
mode
:
{
type
:
String
,
default
:
'add'
},
userCount
:
{
type
:
String
,
default
:
''
},
userName
:
{
type
:
String
,
default
:
''
},
userRemark
:
{
type
:
String
,
default
:
false
},
userPassword
:
{
type
:
String
,
default
:
''
}
})
// 向父组件传递dialog值
const
emit
=
defineEmits
([
'update:dialogVisible'
,
'confirm'
])
// 组件的状态
const
currentVisible
=
ref
(
props
.
dialogVisible
)
const
currentMode
=
ref
(
props
.
mode
)
const
taskName
=
ref
(
''
)
const
taskFrequency
=
ref
(
''
)
// 关闭的方法
const
handleClose
=
()
=>
{
currentVisible
.
value
=
false
}
// 确定的方法
const
handleConfirm
=
()
=>
{
emit
(
'confirm'
)
currentVisible
.
value
=
false
}
// 监听props变化,同步给组件内部
watch
(()
=>
props
.
dialogVisible
,
(
newVal
)
=>
{
currentVisible
.
value
=
newVal
}
)
// 监听组件内部状态变化,同步给父组件,这样才能做到控制对话框组件的显隐
watch
(()
=>
currentVisible
.
value
,
(
newVal
)
=>
{
emit
(
'update:dialogVisible'
,
newVal
)
}
)
watch
(()
=>
props
.
mode
,
(
newVal
)
=>
{
currentMode
.
value
=
newVal
}
)
</
script
>
<
style
>
/* 修改弹窗样式 */
.el-dialog
{
background
:
transparent
;
background-image
:
url("@/assets/picture/dialog1.png")
;
background-size
:
100%
100%
;
background-repeat
:
no-repeat
;
color
:
#ffffff
;
.el-dialog__title
{
color
:
#ffffff
;
}
}
/* 修改表单样式 */
.el-form
{
.el-form-item__label
{
color
:
#ffffff
;
}
}
</
style
>
src/views/os-system/index.vue
View file @
f0f07367
...
...
@@ -2,14 +2,14 @@
<div
class=
"text-left p-8"
>
<el-form
inline
>
<el-form-item>
<el-button
type=
"primary"
plain
>
创建用户
</el-button>
<el-button
type=
"primary"
plain
@
click=
"openAddUserDialog"
>
创建用户
</el-button>
</el-form-item>
<el-form-item>
<el-button
type=
"danger"
plain
>
批量删除
</el-button>
<el-button
type=
"danger"
plain
@
click=
"handleConfirm"
>
批量删除
</el-button>
</el-form-item>
</el-form>
</div>
<el-table
:data=
"tableData"
style=
"width: 100%"
border
:header-cell-style=
"
{ textAlign: 'center' }
"
<el-table
:data=
"tableData"
style=
"width: 100%"
border
:header-cell-style=
"
{ textAlign: 'center' }"
:cell-style="{ textAlign: 'center' }" :row-style="{ height: '58px' }">
<el-table-column
type=
"selection"
width=
"40"
/>
<el-table-column
property=
"name"
label=
"序号"
width=
"55"
/>
...
...
@@ -33,29 +33,25 @@
<Pagination
:total=
"pageObj.total"
v-model:page=
"pageObj.pageNo"
v-model:limit=
"pageObj.pageSize"
@
pagination=
"getData"
/>
</div>
<deleteDialog
v-model:dialogVisible=
"showDeleteDialog"
@
confirm=
"handleDeleteConfirm"
@
mode=
"deleteMode"
/>
<addUserDialog
v-model:dialogVisible=
"dialogVisible"
:mode=
"mode"
:user-count=
"userCount"
:user-name=
"userName"
:user-remark=
"userRemark"
:user-password=
"userPassword "
@
confirm=
"handleConfirm"
/>
</template>
<
script
setup
lang=
"ts"
>
import
{
ref
}
from
'vue'
import
Pagination
from
'@/components/pagination/index.vue'
import
deleteDialog
from
'@/components/Delete/index.vue'
import
addUserDialog
from
'./components/addUserDialog.vue'
const
errorValue
=
ref
(
''
)
const
taskValue
=
ref
(
''
)
const
timeValue
=
ref
(
''
)
const
searchInput
=
ref
(
''
)
const
rolesOptions
=
[
{
value
:
'task1'
,
label
:
'管理员'
,
},
{
value
:
'task2'
,
label
:
'用户'
,
},
]
const
userCount
=
ref
(
''
)
const
userName
=
ref
(
''
)
const
userRemark
=
ref
(
''
)
const
userPassword
=
ref
(
''
)
const
showDeleteDialog
=
ref
(
false
)
const
deleteMode
=
ref
(
'2'
)
const
dialogVisible
=
ref
(
false
)
const
mode
=
ref
(
'1'
)
const
tableData
=
ref
([
{
name
:
'1'
,
...
...
@@ -94,16 +90,48 @@ const pageObj = ref({
pageNo
:
1
})
const
handleDetails
=
(
row
:
any
)
=>
{
mode
.
value
=
'2'
// userCount.value = row.name
// userName.value = row.name
// userRemark.value = row.name
// userPassword.value = row.name
dialogVisible
.
value
=
true
console
.
log
(
row
);
}
const
handleConfirm
=
(
row
:
any
)
=>
{
console
.
log
(
row
);
showDeleteDialog
.
value
=
true
}
const
getData
=
()
=>
{
console
.
log
(
'getData'
);
}
const
handleDeleteConfirm
=
()
=>
{
}
const
openAddUserDialog
=
()
=>
{
mode
.
value
=
'1'
dialogVisible
.
value
=
true
}
</
script
>
<
style
scoped
></
style
>
<
style
scoped
>
/* 去除按钮边框 */
.el-button
:focus
{
outline
:
none
;
}
</
style
>
<
style
>
/* 修改弹窗样式 */
.el-dialog
{
background-image
:
url("@/assets/picture/dialog1.png")
;
background-size
:
100%
100%
;
background-repeat
:
no-repeat
;
.el-dialog__title
{
color
:
#ffffff
;
}
}
</
style
>
src/views/os-taskInformation/components/addTaskDialog.vue
0 → 100644
View file @
f0f07367
<
template
>
<el-dialog
v-model=
"currentVisible"
title=
"新增"
width=
"610"
center
align-center
@
close=
"handleClose"
draggable
>
<el-form
:inline=
"true"
v-if=
"currentMode === '1'"
>
<el-form-item
label=
"任务名称:"
>
<el-input
v-model=
"taskName"
placeholder=
"请输入任务名称"
/>
</el-form-item>
<el-form-item
label=
"执行时间:"
>
<el-input
v-model=
"taskFrequency"
placeholder=
"请输入执行时间"
/>
</el-form-item>
</el-form>
<div
class=
"m-t-4"
>
</div>
<el-form
:inline=
"true"
>
<el-form-item
label=
"所属爬虫:"
>
<el-select
v-model=
"spiderTypeValue"
placeholder=
"请选择爬虫类型"
style=
"width: 183px"
>
<el-option
v-for=
"item in spiderTypeOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"执行频率:"
>
<el-input
v-model=
"taskFrequency"
placeholder=
"请输入执行频率"
/>
</el-form-item>
</el-form>
<div
class=
"m-t-4"
>
</div>
<el-form
:inline=
"true"
>
<el-form-item
label=
"启用/停止:"
>
<el-switch
v-model=
"taskSwitchValue"
class=
"ml-2"
style=
"--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
/>
</el-form-item>
</el-form>
<template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"handleClose"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleConfirm"
>
确定
</el-button>
</div>
</
template
>
</el-dialog>
</template>
<
script
lang=
"ts"
setup
>
import
{
onMounted
,
ref
}
from
'vue'
import
{
defineProps
}
from
'vue'
;
import
{
watch
}
from
'vue'
const
props
=
defineProps
({
dialogVisible
:
{
type
:
Boolean
,
default
:
false
},
mode
:
{
type
:
String
,
default
:
'1'
},
spiderType
:
{
type
:
String
,
default
:
''
},
frequency
:
{
type
:
String
,
default
:
''
},
taskStatus
:
{
type
:
Boolean
,
default
:
false
}
})
// 向父组件传递dialog值
const
emit
=
defineEmits
([
'update:dialogVisible'
,
'confirm'
])
// 组件的状态
const
currentVisible
=
ref
(
props
.
dialogVisible
)
const
currentMode
=
ref
(
props
.
mode
)
const
taskName
=
ref
(
''
)
const
taskFrequency
=
ref
(
''
)
const
taskSwitchValue
=
ref
(
false
)
const
spiderTypeValue
=
ref
(
''
)
const
spiderTypeOptions
=
ref
([
{
value
:
'选项1'
,
label
:
'DSN爬虫'
},
{
value
:
'选项2'
,
label
:
'ITU爬虫'
},
{
value
:
'选项3'
,
label
:
'ST爬虫'
},
])
// 关闭的方法
const
handleClose
=
()
=>
{
currentVisible
.
value
=
false
}
// 确定的方法
const
handleConfirm
=
()
=>
{
emit
(
'confirm'
)
currentVisible
.
value
=
false
}
// 监听props变化,同步给组件内部
watch
(()
=>
props
.
dialogVisible
,
(
newVal
)
=>
{
currentVisible
.
value
=
newVal
}
)
// 监听组件内部状态变化,同步给父组件,这样才能做到控制对话框组件的显隐
watch
(()
=>
currentVisible
.
value
,
(
newVal
)
=>
{
emit
(
'update:dialogVisible'
,
newVal
)
}
)
watch
(()
=>
props
.
mode
,
(
newVal
)
=>
{
currentMode
.
value
=
newVal
}
)
</
script
>
<
style
>
/* 修改弹出框样式 */
.el-dialog
{
background
:
transparent
;
background-image
:
url("@/assets/picture/dialog1.png")
;
background-size
:
100%
100%
;
background-repeat
:
no-repeat
;
color
:
#ffffff
;
.el-dialog__title
{
color
:
#ffffff
;
}
}
/* 修改表单样式 */
.el-form
{
.el-form-item__label
{
color
:
#ffffff
;
}
}
</
style
>
src/views/os-taskInformation/components/taskCard.vue
View file @
f0f07367
...
...
@@ -8,9 +8,9 @@
</div>
<div
class=
"flex justify-center"
>
<el-form-item>
<el-button
type=
"primary"
>
编辑
</el-button>
<el-button
type=
"primary"
@
click=
"editTask"
>
编辑
</el-button>
<el-button
type=
"success"
>
执行记录
</el-button>
<el-button
type=
"danger"
>
删除
</el-button>
<el-button
type=
"danger"
@
click=
"deleteTask"
>
删除
</el-button>
</el-form-item>
</div>
<div
class=
"wordStyle flex justify-center"
>
...
...
@@ -38,13 +38,18 @@
</el-space>
</el-form-item>
</div>
</div>
<deleteDialog
v-model:dialogVisible=
"showDeleteDialog"
@
confirm=
"handleDeleteConfirm"
@
mode=
"deleteMode"
/>
<addTaskDialog
v-model:dialogVisible=
"showTaskDialog"
@
confirm=
"handleEdit"
:mode=
"editMode"
/>
</div>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
}
from
'vue'
import
deleteDialog
from
'@/components/Delete/index.vue'
import
addTaskDialog
from
'./addTaskDialog.vue'
defineProps
({
successTask
:
{
type
:
String
,
...
...
@@ -59,6 +64,10 @@ defineProps({
default
:
''
}
})
const
editMode
=
ref
(
''
)
const
deleteMode
=
ref
(
'1'
)
const
showDeleteDialog
=
ref
(
false
)
const
showTaskDialog
=
ref
(
false
)
const
taskSwitch
=
ref
(
false
)
const
options
=
[
{
...
...
@@ -86,9 +95,25 @@ const options = [
label
:
'近一月'
,
},
]
const
deleteTask
=
()
=>
{
deleteMode
.
value
=
'1'
showDeleteDialog
.
value
=
true
}
const
editTask
=
()
=>
{
editMode
.
value
=
'2'
showTaskDialog
.
value
=
true
}
const
handleEdit
=
()
=>
{
}
const
handleDeleteConfirm
=
()
=>
{
}
</
script
>
<
style
lang=
"scss"
scoped
>
//
任务卡片样式
.taskCard
{
background-image
:
url("@/assets/picture/box2.png")
;
background-size
:
100%
100%
;
...
...
@@ -111,7 +136,7 @@ const options = [
}
}
//
去除按钮边框
.el-button
:focus
{
outline
:
none
;
}
...
...
src/views/os-taskInformation/index.vue
View file @
f0f07367
...
...
@@ -28,7 +28,7 @@
</el-form-item>
<el-form-item>
<el-space>
<el-button
type=
"primary"
>
新建任务
</el-button>
<el-button
type=
"primary"
@
click=
"openTaskDialog"
>
新建任务
</el-button>
</el-space>
</el-form-item>
</el-form>
...
...
@@ -41,18 +41,19 @@
@
pagination=
"getData"
/>
</div>
</div>
<addTaskDialog
v-model:dialogVisible=
"showDialog"
@
confirm=
"handleDeleteConfirm"
:mode=
"editMode"
/>
</
template
>
<
script
setup
lang=
"ts"
>
import
{
ref
}
from
'vue'
import
{
Search
}
from
'@element-plus/icons-vue'
import
Pagination
from
'@/components/pagination/index.vue'
import
taskCard
from
'./components/taskCard.vue'
import
addTaskDialog
from
'./components/addTaskDialog.vue'
const
e
rrorValue
=
ref
(
'
'
)
const
e
ditMode
=
ref
(
'1
'
)
const
taskValue
=
ref
(
''
)
const
timeValue
=
ref
(
''
)
const
searchInput
=
ref
(
''
)
const
taskOptions
=
[
{
value
:
'task1'
,
...
...
@@ -67,18 +68,6 @@ const taskOptions = [
label
:
'网'
,
},
]
const
tableData
=
ref
([
{
name
:
'1'
,
address
:
'sk网'
,
address1
:
'成功'
,
address2
:
'100'
,
address3
:
'0'
,
address4
:
'无'
,
address5
:
'10s'
,
address6
:
'2023-05-13 10:00:00'
,
}
])
const
pageObj
=
ref
({
total
:
10
,
pageSize
:
10
,
...
...
@@ -87,9 +76,22 @@ const pageObj = ref({
const
getData
=
()
=>
{
console
.
log
(
'getData'
);
}
// 控制对话框显示/隐藏的状态变量
const
showDialog
=
ref
(
false
)
// 处理删除确认
const
handleDeleteConfirm
=
()
=>
{
console
.
log
(
'用户确认删除'
)
// 在这里执行实际的删除操作
}
const
openTaskDialog
=
()
=>
{
showDialog
.
value
=
true
}
</
script
>
<
style
scoped
>
/* 卡片样式 */
.cardStyle
{
display
:
flex
;
flex-wrap
:
wrap
;
...
...
@@ -98,20 +100,21 @@ const getData = () => {
padding
:
8px
;
height
:
26vh
;
}
/* 文本样式 */
.el-text
{
color
:
#FFFFFF
;
}
/* 工具栏样式 */
.toolbarStyle
{
background-image
:
url("@/assets/picture/box3.png")
;
background-size
:
100%
100%
;
background-repeat
:
no-repeat
;
}
/* 表单样式 */
.formStyle
{
display
:
flex
;
justify-content
:
space-around
;
margin-top
:
1%
;
padding
:
3px
;
}
</
style
>
...
...
@@ -145,10 +148,10 @@ const getData = () => {
}
/* 修改el下拉框选项选中时的文字颜色 */
.el-select-dropdown__item
:hover
{
color
:
#409eff
;
.el-select-dropdown__item
:hover
{
color
:
#409eff
;
}
/* 去除按钮边框 */
.el-button
:focus
{
outline
:
none
;
}
...
...
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