Auto Commit

上级 a687cee0
...@@ -10,35 +10,29 @@ const state = reactive({ ...@@ -10,35 +10,29 @@ const state = reactive({
columns: [{ columns: [{
title: '文章名称', title: '文章名称',
dataIndex: 'title', dataIndex: 'title',
width: '20%', fixed:true
}, { }, {
title: '链接', title: '链接',
dataIndex: 'url', dataIndex: 'url',
sorter: true, sorter: true,
width: '20%',
}, { }, {
title: '浏览量', title: '浏览量',
dataIndex: 'viewCount', dataIndex: 'viewCount',
sorter: true, sorter: true,
width: '20%',
}, { }, {
title: '收藏量', title: '收藏量',
dataIndex: 'collectCount', dataIndex: 'collectCount',
sorter: true, sorter: true,
width: '20%',
}, { }, {
title: '分数', title: '分数',
dataIndex: 'score', dataIndex: 'score',
sorter: true, sorter: true,
width: '20%',
}, { }, {
title: '建议', title: '建议',
dataIndex: 'message', dataIndex: 'message',
width: '20%',
}, { }, {
title: '发文时间', title: '发文时间',
dataIndex: 'postTime', dataIndex: 'postTime',
width: '20%',
}], }],
dataSource: [] dataSource: []
}) })
...@@ -61,7 +55,7 @@ const getCsdnData = (uId) => { ...@@ -61,7 +55,7 @@ const getCsdnData = (uId) => {
}) })
} }
onMounted(() => { onMounted(() => {
getCsdnData() onSearch()
}) })
const onSearch = () => { const onSearch = () => {
if (!state.searchValue) { if (!state.searchValue) {
...@@ -116,7 +110,7 @@ function initFirstData() { ...@@ -116,7 +110,7 @@ function initFirstData() {
formatter: function (params) { formatter: function (params) {
console.log('params', params) console.log('params', params)
const findItem = state.dataSource.find(item => { const findItem = state.dataSource.find(item => {
return item.title == params.name return item.postTime == params.name
}) })
return `<span style='color:blue'>-<span> 博客标题:${params.name} <br> return `<span style='color:blue'>-<span> 博客标题:${params.name} <br>
<span style='color:green'>-<span> 博客质量:${params.value} <br> <span style='color:green'>-<span> 博客质量:${params.value} <br>
...@@ -160,7 +154,7 @@ function initFirstData() { ...@@ -160,7 +154,7 @@ function initFirstData() {
window.onresize = myChart.resize window.onresize = myChart.resize
myChart.on('click', function (params) { myChart.on('click', function (params) {
const findItem = state.dataSource.find(item => { const findItem = state.dataSource.find(item => {
return item.title == params.name return item.postTime == params.name
}) })
if (params.name) { if (params.name) {
window.open(findItem.src, '_blank') window.open(findItem.src, '_blank')
...@@ -180,11 +174,11 @@ function initFirstData() { ...@@ -180,11 +174,11 @@ function initFirstData() {
</div> </div>
<br> <br>
<div> <div>
<a-table :columns="state.columns" :data-source="state.dataSource" :loading="state.loading"> <a-table :scroll="{ x: 800 }" :columns="state.columns" :data-source="state.dataSource" :loading="state.loading">
</a-table> </a-table>
</div> </div>
<div> <div>
<div id="first" style="width:100vw;height:100vh;"></div> <div id="first" style="width:800px;max-height:900px;"></div>
</div> </div>
</div> </div>
</template> </template>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册