Explorar o código

Merge remote-tracking branch 'origin/starv_master'

liyongli %!s(int64=2) %!d(string=hai) anos
pai
achega
1e8250b26c

+ 22 - 0
src/router/rank.js

@@ -47,7 +47,29 @@ const rankRouter = [
         name: "userStayRanking",
         component: () =>
             import(/* webpackChunkName: "UserStayRanking" */ "../views/Ranking/UserStayRanking.vue"),
+    },
+    //   直播播放次数排行榜
+    {
+        path: "/liveBroadcastsNum",
+        name: "liveBroadcastsNum",
+        component: () =>
+            import(/* webpackChunkName: "LiveBroadcastsNum" */ "../views/Ranking/LiveBroadcastsNum.vue"),
+    },
+    //   直播在线用户数排行榜
+    {
+        path: "/liveStreamingUser",
+        name: "liveStreamingUser",
+        component: () =>
+            import(/* webpackChunkName: "LiveStreamingUser" */ "../views/Ranking/LiveStreamingUser.vue"),
+    },
+    //   直播停留时长排行榜
+    {
+        path: "/liveResidenceDuration",
+        name: "liveResidenceDuration",
+        component: () =>
+            import(/* webpackChunkName: "LiveResidenceDuration" */ "../views/Ranking/LiveResidenceDuration.vue"),
     }
+    
 ];
 
 export default rankRouter;

+ 20 - 3
src/views/Ranking/FusionNumberManuscript.vue

@@ -14,6 +14,15 @@
           @click="handleClick(cur)"
           >{{ cur }}</el-button
         >
+        <el-checkbox
+          v-if="tabs.btns.length"
+          v-model="checkedAll"
+          label="全选"
+          size="large"
+          border
+          @change="handleCheck"
+          class="checkAll"
+        />
       </el-row>
     </div>
     <div class="card-rank">
@@ -42,8 +51,7 @@ export default {
         btns: [],
       },
       tableData: [],
-      typeData: [],
-      tabHigh: 600,
+      checkedAll: false,
     };
   },
   mounted() {
@@ -53,11 +61,16 @@ export default {
     handleClick(e) {
       if(this.btnFocus.includes(e) && this.btnFocus.length!==1){
         this.btnFocus = this.btnFocus.filter((v)=>{return v!==e});
+        this.checkedAll = false;
       }else if(!this.btnFocus.includes(e)){
         this.btnFocus.push(e);
       }
       this.setTableData();
     },
+    handleCheck() {
+      this.btnFocus = this.checkedAll ? this.tabs.btns : [];
+      this.setTableData();
+    },
     setTableData() {
       const that = this;
       this.tableData = [];
@@ -78,7 +91,8 @@ export default {
       const that = this;
       getAccountType()
         .then((res) => {
-          that.btnFocus = res;
+          const [cur] = res;
+          that.btnFocus = [cur];
           that.tabs.btns = res;
           that.setTableData();
         })
@@ -126,4 +140,7 @@ h4 {
   border-color:#409eff !important;
   background-color:#409eff !important;
 }
+.checkAll{
+  margin-left: 10px;
+}
 </style>

+ 21 - 3
src/views/Ranking/FusionVermicelli.vue

@@ -14,6 +14,15 @@
           @click="handleClick(cur)"
           >{{ cur }}</el-button
         >
+        <el-checkbox
+          v-if="tabs.btns.length"
+          v-model="checkedAll"
+          label="全选"
+          size="large"
+          border
+          @change="handleCheck"
+          class="checkAll"
+        />
       </el-row>
     </div>
     <div class="card-rank">
@@ -22,7 +31,7 @@
           :data="tableData"
           header-row-class-name="card-tabs-header"
         >
-          <el-table-column align="center" prop="title" label="关键词" />
+          <el-table-column align="center" prop="title" label="融合号" />
           <el-table-column align="center" prop="fansCount" label="粉丝量" />
         </el-table>
       </div>
@@ -45,7 +54,7 @@ export default {
         btns: [],
       },
       tableData: [],
-      typeData: [],
+      checkedAll: false,
     };
   },
   mounted() {
@@ -55,11 +64,16 @@ export default {
     handleClick(e) {
       if(this.btnFocus.includes(e) && this.btnFocus.length!==1){
         this.btnFocus = this.btnFocus.filter((v)=>{return v!==e});
+        this.checkedAll = false;
       }else if(!this.btnFocus.includes(e)){
         this.btnFocus.push(e);
       }
       this.setTableData();
     },
+    handleCheck() {
+      this.btnFocus = this.checkedAll ? this.tabs.btns : [];
+      this.setTableData();
+    },
     setTableData() {
       const that = this;
       this.tableData = [];
@@ -78,7 +92,8 @@ export default {
       const that = this;
       getAccountType()
         .then((res) => {
-          that.btnFocus = res;
+          const [cur] = res;
+          that.btnFocus = [cur];
           that.tabs.btns = res;
           that.setTableData();
 
@@ -127,4 +142,7 @@ h4 {
   border-color:#409eff !important;
   background-color:#409eff !important;
 }
+.checkAll{
+  margin-left: 10px;
+}
 </style>

+ 156 - 0
src/views/Ranking/LiveBroadcastsNum.vue

@@ -0,0 +1,156 @@
+<template>
+  <div class="manuscriptIssued">
+    <el-loading></el-loading>
+    <el-breadcrumb separator-class="el-icon-arrow-right">
+      <el-breadcrumb-item>全媒体平台</el-breadcrumb-item>
+      <el-breadcrumb-item>直播播放次数排行榜</el-breadcrumb-item>
+    </el-breadcrumb>
+    <div class="groupType">
+      <el-row class="mb-4">
+        <el-button
+          v-for="cur in tabs.btns"
+          :key="cur.value"
+          :class="cur.value == btnFocus ? 'btnFocus' : ''"
+          @click="handleClick(cur)"
+          >{{ cur.label }}</el-button
+        >
+      </el-row>
+    </div>
+    <div class="card-rank">
+      <div>
+        <h4>日榜</h4>
+        <el-table :data="dayData" header-row-class-name="card-tabs-header">
+          <el-table-column align="center" prop="name" :label="subTitle" />
+          <el-table-column align="center" prop="cnt" label="次数" />
+        </el-table>
+      </div>
+      <div>
+        <h4>周榜</h4>
+        <el-table :data="weekData" header-row-class-name="card-tabs-header">
+          <el-table-column align="center" prop="name" :label="subTitle" />
+          <el-table-column align="center" prop="cnt" label="次数" />
+        </el-table>
+      </div>
+      <div>
+        <h4>月榜</h4>
+        <el-table :data="monthData" header-row-class-name="card-tabs-header">
+          <el-table-column align="center" prop="name" :label="subTitle" />
+          <el-table-column align="center" prop="cnt" label="次数" />
+        </el-table>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import { getLiveCnt } from "@/api/index";
+
+const ElLoading = require("element-plus/lib/el-loading/index");
+import "element-plus/lib/theme-chalk/el-loading.css";
+
+export default {
+  name: "ManuscriptIssued",
+  data() {
+    return {
+      activeName: 1,
+      btnFocus: "center",
+      title: "中心",
+      subTitle: "中心名称",
+      tabs: {
+        name: "直播热度排行榜",
+        code: 1,
+        btns: [
+          {
+            label: "中心榜",
+            value: "center",
+            title: "中心名称",
+          },
+          {
+            label: "人员榜",
+            value: "user",
+            title: "人员名称",
+          },
+          // {
+          //   label: "中心内部榜",
+          //   value: 2,
+          //   title:"中心名称"
+          // },
+          {
+            label: "部门内部人员榜",
+            value: "depart",
+            title: "部门名称",
+          },
+        ],
+      },
+      dayData: [],
+      weekData: [],
+      monthData: [],
+    };
+  },
+  mounted() {
+    this.setTableData();
+  },
+  methods: {
+    handleClick(e) {
+      this.title = e.label.substring(0, e.label.length - 1);
+      this.btnFocus = e.value;
+      this.subTitle = e.title;
+      this.setTableData();
+    },
+    setTableData() {
+      const that = this;
+      this.load = ElLoading.default.service();
+      getLiveCnt({ type: this.btnFocus,target:"pv" })
+        .then((res) => {
+          const { day, week, month } = res;
+          that.dayData = day;
+          that.weekData = week;
+          that.monthData = month;
+          that.load.close();
+        })
+        .catch((err) => {
+          that.dayData = [];
+          that.weekData = [];
+          that.monthData = [];
+          console.log("catch", err);
+        });
+    },
+  },
+};
+</script>
+<style>
+.manuscriptIssued {
+  margin: 10px;
+}
+.card-tabs,
+.el-tabs__header {
+  padding: 0 100px;
+}
+.groupType {
+  padding: 15px 10px;
+  box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.12);
+}
+.card-rank {
+  padding: 10px 15px;
+  box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.12);
+  display: flex;
+  align-items: flex-start;
+  justify-content: space-between;
+}
+.card-rank > div {
+  width: 32%;
+}
+h4 {
+  text-align: left;
+  color: #e18116;
+  margin-bottom: 50px;
+  font-weight: bold;
+}
+.card-tabs-header th {
+  background: #f5f7fa !important;
+}
+.btnFocus {
+  color: #fff !important;
+  border-color: #409eff !important;
+  background-color: #409eff !important;
+}
+</style>

+ 156 - 0
src/views/Ranking/LiveResidenceDuration.vue

@@ -0,0 +1,156 @@
+<template>
+  <div class="manuscriptIssued">
+    <el-loading></el-loading>
+    <el-breadcrumb separator-class="el-icon-arrow-right">
+      <el-breadcrumb-item>全媒体平台</el-breadcrumb-item>
+      <el-breadcrumb-item>直播停留时长排行榜</el-breadcrumb-item>
+    </el-breadcrumb>
+    <div class="groupType">
+      <el-row class="mb-4">
+        <el-button
+          v-for="cur in tabs.btns"
+          :key="cur.value"
+          :class="cur.value == btnFocus ? 'btnFocus' : ''"
+          @click="handleClick(cur)"
+          >{{ cur.label }}</el-button
+        >
+      </el-row>
+    </div>
+    <div class="card-rank">
+      <div>
+        <h4>日榜</h4>
+        <el-table :data="dayData" header-row-class-name="card-tabs-header">
+          <el-table-column align="center" prop="name" :label="subTitle" />
+          <el-table-column align="center" prop="cnt" label="时长/秒" />
+        </el-table>
+      </div>
+      <div>
+        <h4>周榜</h4>
+        <el-table :data="weekData" header-row-class-name="card-tabs-header">
+          <el-table-column align="center" prop="name" :label="subTitle" />
+          <el-table-column align="center" prop="cnt" label="时长/秒" />
+        </el-table>
+      </div>
+      <div>
+        <h4>月榜</h4>
+        <el-table :data="monthData" header-row-class-name="card-tabs-header">
+          <el-table-column align="center" prop="name" :label="subTitle" />
+          <el-table-column align="center" prop="cnt" label="时长/秒" />
+        </el-table>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import { getLiveCnt } from "@/api/index";
+
+const ElLoading = require("element-plus/lib/el-loading/index");
+import "element-plus/lib/theme-chalk/el-loading.css";
+
+export default {
+  name: "ManuscriptIssued",
+  data() {
+    return {
+      activeName: 1,
+      btnFocus: "center",
+      title: "中心",
+      subTitle: "中心名称",
+      tabs: {
+        name: "直播热度排行榜",
+        code: 1,
+        btns: [
+          {
+            label: "中心榜",
+            value: "center",
+            title: "中心名称",
+          },
+          {
+            label: "人员榜",
+            value: "user",
+            title: "人员名称",
+          },
+          // {
+          //   label: "中心内部榜",
+          //   value: 2,
+          //   title:"中心名称"
+          // },
+          {
+            label: "部门内部人员榜",
+            value: "depart",
+            title: "部门名称",
+          },
+        ],
+      },
+      dayData: [],
+      weekData: [],
+      monthData: [],
+    };
+  },
+  mounted() {
+    this.setTableData();
+  },
+  methods: {
+    handleClick(e) {
+      this.title = e.label.substring(0, e.label.length - 1);
+      this.btnFocus = e.value;
+      this.subTitle = e.title;
+      this.setTableData();
+    },
+    setTableData() {
+      const that = this;
+      this.load = ElLoading.default.service();
+      getLiveCnt({ type: this.btnFocus,target:"duration" })
+        .then((res) => {
+          const { day, week, month } = res;
+          that.dayData = day;
+          that.weekData = week;
+          that.monthData = month;
+          that.load.close();
+        })
+        .catch((err) => {
+          that.dayData = [];
+          that.weekData = [];
+          that.monthData = [];
+          console.log("catch", err);
+        });
+    },
+  },
+};
+</script>
+<style>
+.manuscriptIssued {
+  margin: 10px;
+}
+.card-tabs,
+.el-tabs__header {
+  padding: 0 100px;
+}
+.groupType {
+  padding: 15px 10px;
+  box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.12);
+}
+.card-rank {
+  padding: 10px 15px;
+  box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.12);
+  display: flex;
+  align-items: flex-start;
+  justify-content: space-between;
+}
+.card-rank > div {
+  width: 32%;
+}
+h4 {
+  text-align: left;
+  color: #e18116;
+  margin-bottom: 50px;
+  font-weight: bold;
+}
+.card-tabs-header th {
+  background: #f5f7fa !important;
+}
+.btnFocus {
+  color: #fff !important;
+  border-color: #409eff !important;
+  background-color: #409eff !important;
+}
+</style>

+ 156 - 0
src/views/Ranking/LiveStreamingUser.vue

@@ -0,0 +1,156 @@
+<template>
+  <div class="manuscriptIssued">
+    <el-loading></el-loading>
+    <el-breadcrumb separator-class="el-icon-arrow-right">
+      <el-breadcrumb-item>全媒体平台</el-breadcrumb-item>
+      <el-breadcrumb-item>直播在线用户数排行榜</el-breadcrumb-item>
+    </el-breadcrumb>
+    <div class="groupType">
+      <el-row class="mb-4">
+        <el-button
+          v-for="cur in tabs.btns"
+          :key="cur.value"
+          :class="cur.value == btnFocus ? 'btnFocus' : ''"
+          @click="handleClick(cur)"
+          >{{ cur.label }}</el-button
+        >
+      </el-row>
+    </div>
+    <div class="card-rank">
+      <div>
+        <h4>日榜</h4>
+        <el-table :data="dayData" header-row-class-name="card-tabs-header">
+          <el-table-column align="center" prop="name" :label="subTitle" />
+          <el-table-column align="center" prop="cnt" label="用户数" />
+        </el-table>
+      </div>
+      <div>
+        <h4>周榜</h4>
+        <el-table :data="weekData" header-row-class-name="card-tabs-header">
+          <el-table-column align="center" prop="name" :label="subTitle" />
+          <el-table-column align="center" prop="cnt" label="用户数" />
+        </el-table>
+      </div>
+      <div>
+        <h4>月榜</h4>
+        <el-table :data="monthData" header-row-class-name="card-tabs-header">
+          <el-table-column align="center" prop="name" :label="subTitle" />
+          <el-table-column align="center" prop="cnt" label="用户数" />
+        </el-table>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import { getLiveCnt } from "@/api/index";
+
+const ElLoading = require("element-plus/lib/el-loading/index");
+import "element-plus/lib/theme-chalk/el-loading.css";
+
+export default {
+  name: "ManuscriptIssued",
+  data() {
+    return {
+      activeName: 1,
+      btnFocus: "center",
+      title: "中心",
+      subTitle: "中心名称",
+      tabs: {
+        name: "直播热度排行榜",
+        code: 1,
+        btns: [
+          {
+            label: "中心榜",
+            value: "center",
+            title: "中心名称",
+          },
+          {
+            label: "人员榜",
+            value: "user",
+            title: "人员名称",
+          },
+          // {
+          //   label: "中心内部榜",
+          //   value: 2,
+          //   title:"中心名称"
+          // },
+          {
+            label: "部门内部人员榜",
+            value: "depart",
+            title: "部门名称",
+          },
+        ],
+      },
+      dayData: [],
+      weekData: [],
+      monthData: [],
+    };
+  },
+  mounted() {
+    this.setTableData();
+  },
+  methods: {
+    handleClick(e) {
+      this.title = e.label.substring(0, e.label.length - 1);
+      this.btnFocus = e.value;
+      this.subTitle = e.title;
+      this.setTableData();
+    },
+    setTableData() {
+      const that = this;
+      this.load = ElLoading.default.service();
+      getLiveCnt({ type: this.btnFocus,target:"cnt" })
+        .then((res) => {
+          const { day, week, month } = res;
+          that.dayData = day;
+          that.weekData = week;
+          that.monthData = month;
+          that.load.close();
+        })
+        .catch((err) => {
+          that.dayData = [];
+          that.weekData = [];
+          that.monthData = [];
+          console.log("catch", err);
+        });
+    },
+  },
+};
+</script>
+<style>
+.manuscriptIssued {
+  margin: 10px;
+}
+.card-tabs,
+.el-tabs__header {
+  padding: 0 100px;
+}
+.groupType {
+  padding: 15px 10px;
+  box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.12);
+}
+.card-rank {
+  padding: 10px 15px;
+  box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.12);
+  display: flex;
+  align-items: flex-start;
+  justify-content: space-between;
+}
+.card-rank > div {
+  width: 32%;
+}
+h4 {
+  text-align: left;
+  color: #e18116;
+  margin-bottom: 50px;
+  font-weight: bold;
+}
+.card-tabs-header th {
+  background: #f5f7fa !important;
+}
+.btnFocus {
+  color: #fff !important;
+  border-color: #409eff !important;
+  background-color: #409eff !important;
+}
+</style>

+ 11 - 9
src/views/Ranking/ManuscriptDissemination.vue

@@ -18,32 +18,32 @@
     </div>
     <div class="card-rank">
       <div>
-        <h4>分中心日榜</h4>
+        <h4>日榜</h4>
         <el-table
           :data="dayData"
           header-row-class-name="card-tabs-header"
         >
-          <el-table-column align="center" prop="name" :label="title" />
+          <el-table-column align="center" prop="name" :label="subTitle" />
           <el-table-column align="center" prop="cnt" label="传播量" />
         </el-table>
       </div>
       <div>
-        <h4>分中心周榜</h4>
+        <h4>周榜</h4>
         <el-table
           :data="weekData"
           header-row-class-name="card-tabs-header"
         >
-          <el-table-column align="center" prop="name" :label="title" />
+          <el-table-column align="center" prop="name" :label="subTitle" />
           <el-table-column align="center" prop="cnt" label="传播量" />
         </el-table>
       </div>
       <div>
-        <h4>分中心月榜</h4>
+        <h4>月榜</h4>
         <el-table
           :data="monthData"
           header-row-class-name="card-tabs-header"
         >
-          <el-table-column align="center" prop="name" :label="title" />
+          <el-table-column align="center" prop="name" :label="subTitle" />
           <el-table-column align="center" prop="cnt" label="传播量" />
         </el-table>
       </div>
@@ -62,13 +62,14 @@ export default {
     return {
       activeName: 1,
       btnFocus: "center",
-      title:"中心名称",
+      title:"中心",
+      subTitle:"中心名称",
       tabs: {
         name: "稿件传播量排行榜",
         code: 1,
         btns: [
           {
-            label: "中心榜",
+            label: "中心榜",
             value: "center",
             title:"中心名称"
           },
@@ -99,8 +100,9 @@ export default {
   },
   methods: {
     handleClick(e) {
+      this.title=e.label.substring(0,e.label.length-1);
       this.btnFocus = e.value;
-      this.title = e.title;
+      this.subTitle = e.title;
       this.setTableData();
     },
     setTableData() {

+ 21 - 28
src/views/Ranking/ManuscriptIssued.vue

@@ -18,32 +18,23 @@
     </div>
     <div class="card-rank">
       <div>
-        <h4>分中心日榜</h4>
-        <el-table
-          :data="dayData"
-          header-row-class-name="card-tabs-header"
-        >
-          <el-table-column align="center" prop="name" :label="title" />
+        <h4>日榜</h4>
+        <el-table :data="dayData" header-row-class-name="card-tabs-header">
+          <el-table-column align="center" prop="name" :label="subTitle" />
           <el-table-column align="center" prop="cnt" label="次数" />
         </el-table>
       </div>
       <div>
-        <h4>分中心周榜</h4>
-        <el-table
-          :data="weekData"
-          header-row-class-name="card-tabs-header"
-        >
-          <el-table-column align="center" prop="name" :label="title" />
+        <h4>周榜</h4>
+        <el-table :data="weekData" header-row-class-name="card-tabs-header">
+          <el-table-column align="center" prop="name" :label="subTitle" />
           <el-table-column align="center" prop="cnt" label="次数" />
         </el-table>
       </div>
       <div>
-        <h4>分中心月榜</h4>
-        <el-table
-          :data="monthData"
-          header-row-class-name="card-tabs-header"
-        >
-          <el-table-column align="center" prop="name" :label="title" />
+        <h4>月榜</h4>
+        <el-table :data="monthData" header-row-class-name="card-tabs-header">
+          <el-table-column align="center" prop="name" :label="subTitle" />
           <el-table-column align="center" prop="cnt" label="次数" />
         </el-table>
       </div>
@@ -62,20 +53,21 @@ export default {
     return {
       activeName: 1,
       btnFocus: "center",
-      title:"中心名称",
+      title: "中心",
+      subTitle: "中心名称",
       tabs: {
         name: "已发稿件数量排行榜",
         code: 1,
         btns: [
           {
-            label: "中心榜",
+            label: "中心榜",
             value: "center",
-            title:"中心名称"
+            title: "中心名称",
           },
           {
             label: "人员榜",
             value: "user",
-            title:"人员名称"
+            title: "人员名称",
           },
           // {
           //   label: "中心内部榜",
@@ -85,7 +77,7 @@ export default {
           {
             label: "部门内部人员榜",
             value: "depart",
-            title:"部门名称"
+            title: "部门名称",
           },
         ],
       },
@@ -99,8 +91,9 @@ export default {
   },
   methods: {
     handleClick(e) {
+      this.title = e.label.substring(0, e.label.length - 1);
       this.btnFocus = e.value;
-      this.title = e.title;
+      this.subTitle = e.title;
       this.setTableData();
     },
     setTableData() {
@@ -132,7 +125,7 @@ export default {
 .el-tabs__header {
   padding: 0 100px;
 }
-.groupType{
+.groupType {
   padding: 15px 10px;
   box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.12);
 }
@@ -156,8 +149,8 @@ h4 {
   background: #f5f7fa !important;
 }
 .btnFocus {
-  color:#FFF !important;
-  border-color:#409eff !important;
-  background-color:#409eff !important;
+  color: #fff !important;
+  border-color: #409eff !important;
+  background-color: #409eff !important;
 }
 </style>

+ 29 - 9
src/views/Ranking/ManuscriptQuantity.vue

@@ -14,12 +14,21 @@
           @click="handleClick(cur)"
           >{{ cur }}</el-button
         >
+        <el-checkbox
+          v-if="tabs.btns.length"
+          v-model="checkedAll"
+          label="全选"
+          size="large"
+          border
+          @change="handleCheck"
+          class="checkAll"
+        />
       </el-row>
     </div>
     <div class="card-rank">
       <div>
         <el-table :data="tableData" header-row-class-name="card-tabs-header">
-          <el-table-column align="center" prop="AccountName" label="关键词" />
+          <el-table-column align="center" prop="AccountName" label="融合号" />
           <el-table-column align="center" prop="cnt" label="稿件数量" />
         </el-table>
       </div>
@@ -42,7 +51,7 @@ export default {
         btns: [],
       },
       tableData: [],
-      typeData: [],
+      checkedAll: false,
     };
   },
   mounted() {
@@ -50,13 +59,20 @@ export default {
   },
   methods: {
     handleClick(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)){
+      if (this.btnFocus.includes(e) && this.btnFocus.length !== 1) {
+        this.btnFocus = this.btnFocus.filter((v) => {
+          return v !== e;
+        });
+        this.checkedAll = false;
+      } else if (!this.btnFocus.includes(e)) {
         this.btnFocus.push(e);
       }
       this.setTableData();
     },
+    handleCheck() {
+      this.btnFocus = this.checkedAll ? this.tabs.btns : [];
+      this.setTableData();
+    },
     setTableData() {
       const that = this;
       this.tableData = [];
@@ -77,7 +93,8 @@ export default {
       const that = this;
       getAccountType()
         .then((res) => {
-          that.btnFocus = res;
+          const [cur] = res;
+          that.btnFocus = [cur];
           that.tabs.btns = res;
           that.setTableData();
         })
@@ -125,8 +142,11 @@ h4 {
   margin: 15px 0px 10px;
 }
 .btnFocus {
-  color:#FFF !important;
-  border-color:#409eff !important;
-  background-color:#409eff !important;
+  color: #fff !important;
+  border-color: #409eff !important;
+  background-color: #409eff !important;
+}
+.checkAll{
+  margin-left: 10px;
 }
 </style>

+ 11 - 9
src/views/Ranking/MaterialContribution.vue

@@ -18,32 +18,32 @@
     </div>
     <div class="card-rank">
       <div>
-        <h4>分中心日榜</h4>
+        <h4>日榜</h4>
         <el-table
           :data="dayData"
           header-row-class-name="card-tabs-header"
         >
-          <el-table-column align="center" prop="name" :label="title" />
+          <el-table-column align="center" prop="name" :label="subTitle" />
           <el-table-column align="center" prop="cnt" label="贡献量" />
         </el-table>
       </div>
       <div>
-        <h4>分中心周榜</h4>
+        <h4>周榜</h4>
         <el-table
           :data="weekData"
           header-row-class-name="card-tabs-header"
         >
-          <el-table-column align="center" prop="name" :label="title" />
+          <el-table-column align="center" prop="name" :label="subTitle" />
           <el-table-column align="center" prop="cnt" label="贡献量" />
         </el-table>
       </div>
       <div>
-        <h4>分中心月榜</h4>
+        <h4>月榜</h4>
         <el-table
           :data="monthData"
           header-row-class-name="card-tabs-header"
         >
-          <el-table-column align="center" prop="name" :label="title" />
+          <el-table-column align="center" prop="name" :label="subTitle" />
           <el-table-column align="center" prop="cnt" label="贡献量" />
         </el-table>
       </div>
@@ -62,13 +62,14 @@ export default {
     return {
       activeName: 1,
       btnFocus: "center",
-      title:"中心名称",
+      title: "中心",
+      subTitle: "中心名称",
       tabs: {
         name: "素材贡献量排行榜",
         code: 1,
         btns: [
           {
-            label: "中心榜",
+            label: "中心榜",
             value: "center",
             title:"中心名称"
           },
@@ -99,8 +100,9 @@ export default {
   },
   methods: {
     handleClick(e) {
+      this.title=e.label.substring(0,e.label.length-1);
       this.btnFocus = e.value;
-      this.title = e.title;
+      this.subTitle = e.title;
       this.setTableData();
     },
     setTableData() {

+ 0 - 1
src/views/Ranking/UserStayRanking.vue

@@ -43,7 +43,6 @@ export default {
         btns: [],
       },
       tableData: [],
-      typeData: [],
     };
   },
   mounted() {