|
@@ -0,0 +1,191 @@
|
|
|
+<style>
|
|
|
+ .admin-info .ant-list-item-content {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ }
|
|
|
+
|
|
|
+ .admin-info .ant-table-middle tr.ant-table-expanded-row td>.ant-table-wrapper {
|
|
|
+ margin: -12px -9px -13px;
|
|
|
+ }
|
|
|
+</style>
|
|
|
+<template>
|
|
|
+ <div class="admin-info">
|
|
|
+ <a-row :gutter="10" style="margin-top:10px">
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-card style="width:100%;" :tabList="tabListNoTitle" :activeTabKey="noTitleKey"
|
|
|
+ @tabChange="key => onTabChange(key, 'noTitleKey')">
|
|
|
+ <a-table :columns="columns" :dataSource="dataList" bordered :loading="loading" size="middle"
|
|
|
+ :pagination="false">
|
|
|
+ <span slot-scope="text" slot="videoUrl">
|
|
|
+ <video class="video" :src="text" controls="controls" style="height:200px">
|
|
|
+ 您的浏览器不支持 video 标签。
|
|
|
+ </video>
|
|
|
+ </span>
|
|
|
+ <span slot="action" slot-scope="text,record">
|
|
|
+ <a :disabled="record.effiVideoCount == 0" @click="toDetail(record)">查看详情</a>
|
|
|
+ </span>
|
|
|
+ </a-table>
|
|
|
+ </a-card>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import ChartCard from '@/components/ChartCard'
|
|
|
+ import ACol from 'ant-design-vue/es/grid/Col'
|
|
|
+ import ATooltip from 'ant-design-vue/es/tooltip/Tooltip'
|
|
|
+ import MiniArea from '@/components/chart/MiniArea'
|
|
|
+ import MiniBar from '@/components/chart/MiniBar'
|
|
|
+ import MiniProgress from '@/components/chart/MiniProgress'
|
|
|
+ import RankList from '@/components/chart/RankList'
|
|
|
+ import Bar from '@/components/chart/Bar'
|
|
|
+ import LineChartMultid from '@/components/chart/LineChartMultid'
|
|
|
+ import HeadInfo from '@/components/tools/HeadInfo.vue'
|
|
|
+
|
|
|
+ import Trend from '@/components/Trend'
|
|
|
+
|
|
|
+ import {
|
|
|
+ getAction,
|
|
|
+ postAction
|
|
|
+ } from '@/api/manage'
|
|
|
+ import {
|
|
|
+ mapGetters
|
|
|
+ } from 'vuex'
|
|
|
+
|
|
|
+ import qs from 'qs'
|
|
|
+
|
|
|
+ const barData = []
|
|
|
+ for (let i = 0; i < 12; i += 1) {
|
|
|
+ barData.push({
|
|
|
+ x: `${i + 1}月`,
|
|
|
+ y: Math.floor(Math.random() * 1000) + 200
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const columns = [{
|
|
|
+ title: '姓名',
|
|
|
+ dataIndex: 'realname',
|
|
|
+ key: 'realname',
|
|
|
+ align: 'center',
|
|
|
+ width: 200
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '角色',
|
|
|
+ dataIndex: 'roleName',
|
|
|
+ key: 'roleName',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '有效视频数量',
|
|
|
+ dataIndex: 'effiVideoCount',
|
|
|
+ key: 'effiVideoCount',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '总视频数量',
|
|
|
+ dataIndex: 'videoCount',
|
|
|
+ key: 'videoCount',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '消耗',
|
|
|
+ dataIndex: 'cost',
|
|
|
+ key: 'cost',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'action',
|
|
|
+ key: 'action',
|
|
|
+ align: 'center',
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: 'action'
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ]
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name: 'admin-info',
|
|
|
+ components: {
|
|
|
+ ATooltip,
|
|
|
+ ACol,
|
|
|
+ },
|
|
|
+
|
|
|
+ data: function () {
|
|
|
+ return {
|
|
|
+ title: '工作台',
|
|
|
+ loginfo: {},
|
|
|
+ barData,
|
|
|
+ visitInfo: [],
|
|
|
+ visitFields: ['ip', 'visit'],
|
|
|
+ loading: false,
|
|
|
+ rankList: [],
|
|
|
+ tabListNoTitle: [{
|
|
|
+ key: 'kuaishou',
|
|
|
+ tab: '快手'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'toutiao',
|
|
|
+ tab: '头条'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ noTitleKey: 'kuaishou',
|
|
|
+ a: '',
|
|
|
+ columns,
|
|
|
+ dataList: [],
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
|
+ onTabChange(key, type) {
|
|
|
+ console.log(key, type)
|
|
|
+ this[type] = key
|
|
|
+ if (key == 'kuaishou') {
|
|
|
+ this.getKuaishouList()
|
|
|
+ } else if (key == 'toutiao') {
|
|
|
+ this.getToutiaoList()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ toDetail(item) {
|
|
|
+ localStorage.setItem('detailUserId',item.userId)
|
|
|
+ localStorage.setItem('appType',this.noTitleKey)
|
|
|
+ this.$router.replace({ path: '/achievements/adminDetail' })
|
|
|
+ },
|
|
|
+ getKuaishouList() {
|
|
|
+ postAction('/ctop/performance2/kuaishouPerformanceInfoNow', '').then(res => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.success) {
|
|
|
+ this.dataList = res.result.map((item, index) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ key: index,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ getToutiaoList() {
|
|
|
+ postAction('/ctop/performance2/toutiaoPerformanceInfoNow', '').then(res => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.success) {
|
|
|
+ this.dataList = res.result.map((item, index) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ key: index,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getKuaishouList()
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|