Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
雪碧有白泡泡
可视化 csdn 数据
提交
73b4be4c
可
可视化 csdn 数据
项目概览
雪碧有白泡泡
/
可视化 csdn 数据
与 Fork 源项目一致
Fork自
yma16 / 可视化 csdn 数据
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
可
可视化 csdn 数据
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
73b4be4c
编写于
1月 05, 2024
作者:
Q
qq_38870145
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fri Jan 5 21:53:00 CST 2024 inscode
上级
dfeb4e36
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
29 addition
and
9 deletion
+29
-9
src/components/SearchGrade.vue
src/components/SearchGrade.vue
+29
-9
未找到文件。
src/components/SearchGrade.vue
浏览文件 @
73b4be4c
...
@@ -4,7 +4,7 @@ import ExportBtn from './ExportBtn.vue';
...
@@ -4,7 +4,7 @@ import ExportBtn from './ExportBtn.vue';
import
EchartBar
from
'
./EchartBar.vue
'
;
import
EchartBar
from
'
./EchartBar.vue
'
;
import
{
tableColumns
}
from
'
./const
'
;
import
{
tableColumns
}
from
'
./const
'
;
import
{
getRemoteCsdnGrade
}
from
'
../service/csdnApi
'
;
import
{
getRemoteCsdnGrade
}
from
'
../service/csdnApi
'
;
import
{
onMounted
,
reactive
,
onUnmounted
}
from
'
vue
'
;
import
{
onMounted
,
reactive
,
onUnmounted
,
computed
}
from
'
vue
'
;
const
state
=
reactive
({
const
state
=
reactive
({
title
:
'
csdn用户根据id快速查分数改文章
'
,
title
:
'
csdn用户根据id快速查分数改文章
'
,
...
@@ -24,7 +24,8 @@ const state = reactive({
...
@@ -24,7 +24,8 @@ const state = reactive({
},
},
onShowSizeChange
:
changePageSize
,
// 改变每页数量时更新显示
onShowSizeChange
:
changePageSize
,
// 改变每页数量时更新显示
onChange
:
changePage
,
//点击页码事件
onChange
:
changePage
,
//点击页码事件
}
},
selectedRows
:
[]
})
})
// storage
// storage
...
@@ -47,7 +48,7 @@ const getCsdnData = (uId) => {
...
@@ -47,7 +48,7 @@ const getCsdnData = (uId) => {
state
.
pagination
.
total
=
state
.
dataSource
.
length
state
.
pagination
.
total
=
state
.
dataSource
.
length
state
.
loading
=
false
state
.
loading
=
false
saveStorege
(
state
.
dataSource
)
saveStorege
(
state
.
dataSource
)
}).
catch
((
r
)
=>
{
}).
catch
((
r
)
=>
{
state
.
pagination
.
total
=
0
state
.
pagination
.
total
=
0
console
.
log
(
r
)
console
.
log
(
r
)
...
@@ -57,8 +58,8 @@ const getCsdnData = (uId) => {
...
@@ -57,8 +58,8 @@ const getCsdnData = (uId) => {
})
})
}
}
async
function
saveStorege
(
val
){
async
function
saveStorege
(
val
)
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
window
.
localStorage
.
setItem
(
'
csdnUidData
'
,
JSON
.
stringify
(
val
))
window
.
localStorage
.
setItem
(
'
csdnUidData
'
,
JSON
.
stringify
(
val
))
resolve
(
true
)
resolve
(
true
)
})
})
...
@@ -72,6 +73,24 @@ const onSearch = () => {
...
@@ -72,6 +73,24 @@ const onSearch = () => {
getCsdnData
(
state
.
searchValue
)
getCsdnData
(
state
.
searchValue
)
}
}
const
rowSelection
=
{
onChange
:
(
selectedRowKeys
,
selectedRows
)
=>
{
console
.
log
(
`selectedRowKeys:
${
selectedRowKeys
}
`
,
'
selectedRows:
'
,
selectedRows
);
state
.
selectedRows
=
selectedRows
},
getCheckboxProps
:
(
record
)
=>
({
disabled
:
record
.
name
===
'
Disabled User
'
,
// Column configuration not to be checked
name
:
record
.
name
,
})
}
const
exportTableData
=
computed
(()
=>
{
if
(
state
.
selectedRows
?.
length
)
{
return
state
.
selectedRows
}
return
state
.
dataSource
})
...
@@ -109,7 +128,7 @@ onUnmounted(() => {
...
@@ -109,7 +128,7 @@ onUnmounted(() => {
<a
style=
"font-size: 24px;font-weight:bolder;"
>
{{
state
.
title
}}
</a>
<a
style=
"font-size: 24px;font-weight:bolder;"
>
{{
state
.
title
}}
</a>
</div>
</div>
<div>
<div>
</div>
</div>
<br>
<br>
<div
style=
"display:flex"
>
<div
style=
"display:flex"
>
...
@@ -118,9 +137,10 @@ onUnmounted(() => {
...
@@ -118,9 +137,10 @@ onUnmounted(() => {
</div>
</div>
<div>
<div>
<ExportBtn
:table-data=
"state.dataSource"
:user-id=
"state.searchValue"
/>
<ExportBtn
:table-data=
"exportTableData"
:user-id=
"state.searchValue"
/>
<a-table
:scroll=
"
{ x: 800, y: 600 }" :columns="state.columns" :data-source="state.dataSource"
<a-table
:scroll=
"
{ x: 800, y: 600 }" :columns="state.columns" :row-selection="rowSelection"
:loading="state.loading" :pagination="state.pagination" bordered style="border-bottom:1px solid #f0f0f0;">
:data-source="state.dataSource" :loading="state.loading" :pagination="state.pagination" bordered
style="border-bottom:1px solid #f0f0f0;">
<template
#bodyCell
="
{ column, record }">
<template
#bodyCell
="
{ column, record }">
<template
v-if=
"column.key === 'url'"
>
<template
v-if=
"column.key === 'url'"
>
<a
:href=
"record.url"
target=
"_blank"
>
<a
:href=
"record.url"
target=
"_blank"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录