Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
雪碧有白泡泡
可视化 csdn 数据
提交
e03c7aac
可
可视化 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看板
提交
e03c7aac
编写于
7月 01, 2023
作者:
6
63f1bb74d2451104dc7d8b9f
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Auto Commit
上级
82002b50
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
25 addition
and
13 deletion
+25
-13
src/components/SearchGrade.vue
src/components/SearchGrade.vue
+25
-13
未找到文件。
src/components/SearchGrade.vue
浏览文件 @
e03c7aac
<
script
setup
>
<
script
setup
>
import
*
as
echarts
from
'
echarts
'
;
import
*
as
echarts
from
'
echarts
'
;
import
Author
from
'
./Author.vue
'
import
Author
from
'
./Author.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
}
from
'
vue
'
;
const
state
=
reactive
({
const
state
=
reactive
({
loading
:
false
,
loading
:
false
,
searchValue
:
''
,
searchValue
:
localStorage
.
getItem
(
'
csdnUid
'
)
||
''
,
firstChart
:
null
,
firstChart
:
null
,
columns
:
tableColumns
,
columns
:
tableColumns
,
dataSource
:
[],
dataSource
:
[],
pagination
:
{
pagination
:
{
total
:
0
,
total
:
0
,
...
@@ -52,7 +52,7 @@ const getCsdnData = (uId) => {
...
@@ -52,7 +52,7 @@ const getCsdnData = (uId) => {
const
onSearch
=
()
=>
{
const
onSearch
=
()
=>
{
if
(
!
state
.
searchValue
)
{
if
(
!
state
.
searchValue
)
{
return
window
.
alert
(
'
请输入
用户id
'
)
return
window
.
alert
(
'
请输入
csdn用户id 如 qq_38870145
'
)
}
}
window
.
localStorage
.
setItem
(
'
csdnUid
'
,
state
.
searchValue
)
window
.
localStorage
.
setItem
(
'
csdnUid
'
,
state
.
searchValue
)
getCsdnData
(
state
.
searchValue
)
getCsdnData
(
state
.
searchValue
)
...
@@ -93,9 +93,9 @@ function initFirstData() {
...
@@ -93,9 +93,9 @@ function initFirstData() {
yAxis
:
{
yAxis
:
{
type
:
'
value
'
type
:
'
value
'
},
},
grid
:{
grid
:
{
x
:
5
0
,
x
:
6
0
,
x2
:
3
0
x2
:
6
0
},
},
tooltip
:
{
tooltip
:
{
formatter
:
function
(
params
)
{
formatter
:
function
(
params
)
{
...
@@ -137,9 +137,21 @@ function initFirstData() {
...
@@ -137,9 +137,21 @@ function initFirstData() {
]
]
},
},
markLine
:
{
markLine
:
{
data
:
[{
type
:
'
average
'
,
name
:
'
平均分
'
}]
itemStyle
:
{
normal
:
{
lineStyle
:
{
type
:
'
dotted
'
,
},
label
:
{
show
:
true
,
}
}
},
data
:
[{
type
:
'
average
'
,
name
:
'
平均分
'
}]
}
}
}
}
]
]
};
};
// 使用刚指定的配置项和数据显示图表。
// 使用刚指定的配置项和数据显示图表。
...
@@ -158,8 +170,8 @@ function initFirstData() {
...
@@ -158,8 +170,8 @@ function initFirstData() {
onMounted
(()
=>
{
onMounted
(()
=>
{
const
storageUid
=
window
.
localStorage
.
getItem
(
'
csdnUid
'
)
const
storageUid
=
window
.
localStorage
.
getItem
(
'
csdnUid
'
)
console
.
log
(
'
window.localStorage
'
,
window
.
localStorage
)
console
.
log
(
'
window.localStorage
'
,
window
.
localStorage
)
console
.
log
(
'
storageUid
'
,
storageUid
)
console
.
log
(
'
storageUid
'
,
storageUid
)
if
(
storageUid
)
{
if
(
storageUid
)
{
state
.
searchValue
=
storageUid
state
.
searchValue
=
storageUid
onSearch
()
onSearch
()
...
@@ -184,7 +196,7 @@ function initFirstData() {
...
@@ -184,7 +196,7 @@ function initFirstData() {
</div>
</div>
<br>
<br>
<div>
<div>
<a-input-search
v-model:value=
"state.searchValue"
:disabled=
"state.loading"
placeholder=
"输入用户id"
enter-button
<a-input-search
v-model:value=
"state.searchValue"
:disabled=
"state.loading"
placeholder=
"输入用户id
(如 qq_38870145)
"
enter-button
@
search=
"onSearch"
/>
@
search=
"onSearch"
/>
</div>
</div>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录