|
@@ -10,7 +10,7 @@
|
|
<el-button
|
|
<el-button
|
|
v-for="(cur, ind) in tabs.btns"
|
|
v-for="(cur, ind) in tabs.btns"
|
|
:key="ind"
|
|
:key="ind"
|
|
- :class="cur == btnFocus ? 'btnFocus' : ''"
|
|
|
|
|
|
+ :class="btnFocus.includes(cur) ? 'btnFocus' : ''"
|
|
@click="handleClick(cur)"
|
|
@click="handleClick(cur)"
|
|
>{{ cur }}</el-button
|
|
>{{ cur }}</el-button
|
|
>
|
|
>
|
|
@@ -19,7 +19,7 @@
|
|
<div class="card-rank">
|
|
<div class="card-rank">
|
|
<div>
|
|
<div>
|
|
<el-table :data="tableData" header-row-class-name="card-tabs-header">
|
|
<el-table :data="tableData" header-row-class-name="card-tabs-header">
|
|
- <el-table-column align="center" prop="Title" label="关键词" />
|
|
|
|
|
|
+ <el-table-column align="center" prop="AccountName" label="关键词" />
|
|
<el-table-column align="center" prop="cnt" label="稿件数量" />
|
|
<el-table-column align="center" prop="cnt" label="稿件数量" />
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
@@ -36,8 +36,7 @@ export default {
|
|
name: "ManuscriptQuantity",
|
|
name: "ManuscriptQuantity",
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- activeName: 1,
|
|
|
|
- btnFocus: "",
|
|
|
|
|
|
+ btnFocus: [],
|
|
tabs: {
|
|
tabs: {
|
|
name: "融合号稿件数量排行榜",
|
|
name: "融合号稿件数量排行榜",
|
|
btns: [],
|
|
btns: [],
|
|
@@ -51,7 +50,11 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
handleClick(e) {
|
|
handleClick(e) {
|
|
- this.btnFocus = e;
|
|
|
|
|
|
+ if(this.btnFocus.includes(e) && this.btnFocus.length!==1){
|
|
|
|
+ this.btnFocus = this.btnFocus.filter((v)=>{return v!==e});
|
|
|
|
+ }else if(!this.btnFocus.includes(e)){
|
|
|
|
+ this.btnFocus.push(e);
|
|
|
|
+ }
|
|
this.setTableData();
|
|
this.setTableData();
|
|
},
|
|
},
|
|
setTableData() {
|
|
setTableData() {
|
|
@@ -59,7 +62,7 @@ export default {
|
|
this.tableData = [];
|
|
this.tableData = [];
|
|
this.curPage = 0;
|
|
this.curPage = 0;
|
|
this.load = ElLoading.default.service();
|
|
this.load = ElLoading.default.service();
|
|
- getRongheArticleCnt({ type: this.btnFocus })
|
|
|
|
|
|
+ getRongheArticleCnt({ types: this.btnFocus })
|
|
.then((res) => {
|
|
.then((res) => {
|
|
that.total = res.length;
|
|
that.total = res.length;
|
|
that.tableData = res;
|
|
that.tableData = res;
|
|
@@ -74,8 +77,7 @@ export default {
|
|
const that = this;
|
|
const that = this;
|
|
getAccountType()
|
|
getAccountType()
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- const [item] = res;
|
|
|
|
- that.btnFocus = item;
|
|
|
|
|
|
+ that.btnFocus = res;
|
|
that.tabs.btns = res;
|
|
that.tabs.btns = res;
|
|
that.setTableData();
|
|
that.setTableData();
|
|
})
|
|
})
|