zhuxinbo 5 vuotta sitten
vanhempi
commit
994a9fd482

+ 201 - 0
src/views/modules/Statistics/projectDetail.vue

@@ -0,0 +1,201 @@
+<style></style>
+<template>
+  <div class="admin-detail">
+    <a-row :gutter="10" style="margin-top:10px">
+      <a-col :span="24">
+        <a-card style="width:100%;">
+          <a-table
+            :columns="columns"
+            :dataSource="dataList"
+            bordered
+            :loading="loading"
+            size="middle"
+            :pagination="false"
+          >
+            <span slot-scope="text" slot="url">
+              <video class="video" :src="text" controls="controls" style="height:200px">
+                您的浏览器不支持 video 标签。
+              </video>
+            </span>
+            <span slot="videoRoleCode" slot-scope="text">
+              {{ text | roleName }}
+            </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: 'url',
+    key: 'url',
+    align: 'center',
+    scopedSlots: {
+      customRender: 'url'
+    },
+    width: 200
+  },
+  {
+    title: '素材名称',
+    dataIndex: 'materialName',
+    key: 'materialName',
+    align: 'center'
+  },
+  {
+    title: '本职角色',
+    dataIndex: 'originRoleName',
+    key: 'originRoleName',
+    align: 'center'
+  },
+  {
+    title: '担任角色',
+    dataIndex: 'videoRoleCode',
+    key: 'videoRoleCode',
+    scopedSlots: {
+      customRender: 'videoRoleCode'
+    },
+    align: 'center'
+  },
+  {
+    title: '设计师',
+    dataIndex: 'realname',
+    key: 'realname',
+    align: 'center'
+  }
+]
+// 账户名、项目名、优化师姓名、当季消耗、授权名称
+const columnsYou = [
+  {
+    title: '账户',
+    dataIndex: 'advertiserName',
+    key: 'advertiserName',
+    align: 'center'
+  },
+  {
+    title: '项目',
+    dataIndex: 'projectName',
+    key: 'projectName',
+    align: 'center'
+  },
+  {
+    title: '优化师',
+    dataIndex: 'userName',
+    key: 'userName',
+    align: 'center'
+  },
+  {
+    title: '当季消耗',
+    dataIndex: 'totalCost',
+    key: 'totalCost',
+    align: 'center'
+  },
+  {
+    title: '授权名称',
+    dataIndex: 'authName',
+    key: 'authName',
+    align: 'center'
+  }
+]
+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: columns,
+      dataList: []
+    }
+  },
+  methods: {
+    ...mapGetters(['nickname', 'avatar', 'userInfo'])
+  },
+  filters: {
+    roleName: function(value) {
+      var status = {
+        clip: '剪辑',
+        shot: '拍摄',
+        plan: '策划',
+        plane: '平面'
+      }
+      return status[value]
+    }
+  },
+  created() {
+    var userId = localStorage.getItem('detailUserId')
+    var appType = localStorage.getItem('appType') == 'kuaishou' ? 2 : 1
+    var type = localStorage.getItem('roleData')
+    var weekDate = localStorage.getItem('weekDate').split('~')
+    var typeAll = localStorage.getItem('typeAll')
+    //
+    postAction('/ctop/performance2/getQuarterAccountDetail', {
+      year: 2020,
+      quarter: 1,
+      appType: 2,
+      projectId: 47
+    }).then(res => {
+      if (res.success) {
+        this.dataList = res.result.map((item, index) => {
+          return {
+            ...item,
+            key: index
+          }
+        })
+      } else {
+        this.$message.error(res.message)
+      }
+    })
+  }
+}
+</script>

+ 206 - 0
src/views/modules/Statistics/projectStatistics.vue

@@ -0,0 +1,206 @@
+<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-select style="width:100px;margin-bottom:30px" placeholder="选择年" v-model="year">
+            <a-select-option :value="item" v-for="item of options" :key="item">{{ item }}</a-select-option>
+          </a-select>
+          <a-select style="width:100px;margin-bottom:30px" placeholder="选择季度" v-model="dateRange">
+            <a-select-option :value="item" v-for="item of 4" :key="item">{{ item }}</a-select-option>
+          </a-select>
+          <a-button type="primary" style="margin-left:10px" @click="addUser">搜索</a-button>
+          <a-table :columns="columns" :dataSource="dataList" bordered :loading="loading" size="middle">
+            <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.totalCost == 0 || record.totalCost == null" @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 moment from 'moment'
+
+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: 'projectName',
+    key: 'projectName',
+    align: 'center'
+  },
+  {
+    title: '广告主名称',
+    dataIndex: 'advertiserName',
+    key: 'advertiserName',
+    align: 'center'
+  },
+  {
+    title: '运营负责人',
+    dataIndex: 'responsibleName',
+    key: 'responsibleName',
+    align: 'center'
+  },
+  {
+    title: '设计负责人',
+    dataIndex: 'designResponsibleName',
+    key: 'designResponsibleName',
+    align: 'center'
+  },
+  {
+    title: '总消耗',
+    dataIndex: 'totalCost',
+    key: 'totalCost',
+    align: 'center'
+  },
+  {
+    title: '操作',
+    dataIndex: 'action',
+    key: 'action',
+    align: 'center',
+    scopedSlots: { customRender: 'action' }
+  }
+]
+
+export default {
+  name: 'admin-info',
+  components: {
+    ATooltip,
+    ACol
+  },
+
+  data: function() {
+    return {
+      type: 1,
+      title: '工作台',
+      loginfo: {},
+      barData,
+      visitInfo: [],
+      visitFields: ['ip', 'visit'],
+      loading: false,
+      rankList: [],
+      options: [],
+      dateRange: null,
+      year: new Date().getFullYear(),
+      tabListNoTitle: [
+        {
+          key: 'kuaishou',
+          tab: '快手'
+        },
+        {
+          key: 'toutiao',
+          tab: '头条'
+        }
+      ],
+      noTitleKey: 'kuaishou',
+      a: '',
+      columns: columns,
+      dataList: []
+    }
+  },
+  methods: {
+    disabledDate(current) {
+      // Can not select days before today and today
+      return current && current > moment().endOf('day')
+    },
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    clearData() {
+      this.dataList = []
+    },
+    addUser() {
+      this.loading = true
+      this.getKuaishouList()
+    },
+    onTabChange(key, type) {
+      console.log(key, type)
+      this.type = 1
+      this.dateRange = null
+      this.year = '2020'
+      this.options = []
+      this.dataList = []
+      this.columns = columns
+      this[type] = key
+    },
+    toDetail(item) {},
+    getKuaishouList() {
+      var params = {}
+      params.year = this.year
+      params.quarter = this.dateRange
+      params.appType = this.noTitleKey == 'kuaishou' ? 2 : 1
+      postAction('/ctop/performance2/getProjcetListByMediaType', params).then(res => {
+        console.log(res)
+        if (res.success) {
+          this.loading = false
+          this.dataList = res.result.map((item, index) => {
+            return {
+              ...item,
+              key: index
+            }
+          })
+        } else {
+          this.loading = false
+          this.$message.error(res.message)
+        }
+      })
+    }
+  },
+  created() {
+    //   this.getKuaishouList()
+    var myDate = new Date()
+    var startYear = myDate.getFullYear() - 5 //起始年份
+    var endYear = myDate.getFullYear() + 5 //结束年份
+    for (var i = startYear; i <= endYear; i++) {
+      this.options.push(i)
+    }
+  }
+}
+</script>

+ 286 - 274
src/views/modules/Statistics/quarterStatistics.vue

@@ -1,30 +1,39 @@
 <style>
-  .admin-info .ant-list-item-content {
-    display: flex;
-    justify-content: space-around;
-  }
+.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;
-  }
+.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-card
+          style="width:100%;"
+          :tabList="tabListNoTitle"
+          :activeTabKey="noTitleKey"
+          @tabChange="key => onTabChange(key, 'noTitleKey')"
+        >
           角色选择:
-          <a-select style="width:300px;margin-bottom:30px" placeholder="请选择角色类型" v-model="type" @change="clearData">
+          <a-select
+            style="width:300px;margin-bottom:30px"
+            placeholder="请选择角色类型"
+            v-model="type"
+            @change="clearData"
+          >
             <a-select-option :value="1">设计</a-select-option>
             <a-select-option :value="2">优化</a-select-option>
           </a-select>
           季度选择:
           <a-select style="width:100px;margin-bottom:30px" placeholder="选择年" v-model="year">
-            <a-select-option :value="item" v-for="item of options" :key="item">{{item}}</a-select-option>
+            <a-select-option :value="item" v-for="item of options" :key="item">{{ item }}</a-select-option>
           </a-select>
           <a-select style="width:100px;margin-bottom:30px" placeholder="选择季度" v-model="dateRange">
-            <a-select-option :value="item" v-for="item of 4" :key="item">{{item}}</a-select-option>
+            <a-select-option :value="item" v-for="item of 4" :key="item">{{ item }}</a-select-option>
           </a-select>
           <a-button type="primary" style="margin-left:10px" @click="addUser">搜索</a-button>
           <a-table :columns="columns" :dataSource="dataList" bordered :loading="loading" size="middle">
@@ -44,284 +53,287 @@
 </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 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 Trend from '@/components/Trend'
 
-  import moment from 'moment';
+import moment from 'moment'
 
-  import {
-    getAction,
-    postAction
-  } from '@/api/manage'
-  import {
-    mapGetters
-  } from 'vuex'
+import { getAction, postAction } from '@/api/manage'
+import { mapGetters } from 'vuex'
 
-  import qs from 'qs'
+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 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'
+  //   },
+  // },
+]
+const columnsYou = [
+  {
+    title: '姓名',
+    dataIndex: 'realname',
+    key: 'realname',
+    align: 'center',
+    width: 200
+  },
+  {
+    title: '角色',
+    dataIndex: 'roleName',
+    key: 'roleName',
+    align: 'center'
+  },
+  {
+    title: '总消耗',
+    dataIndex: 'cost',
+    key: 'cost',
+    align: 'center'
+  },
+  {
+    title: '绩效',
+    dataIndex: 'effiRate',
+    key: 'effiRate',
+    align: 'center'
   }
+  // {
+  //   title: '操作',
+  //   dataIndex: 'action',
+  //   key: 'action',
+  //   align: 'center',
+  //   scopedSlots: {
+  //     customRender: 'action'
+  //   },
+  // },
+]
 
-  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'
+export default {
+  name: 'admin-info',
+  components: {
+    ATooltip,
+    ACol
+  },
+
+  data: function() {
+    return {
+      type: 1,
+      title: '工作台',
+      loginfo: {},
+      barData,
+      visitInfo: [],
+      visitFields: ['ip', 'visit'],
+      loading: false,
+      rankList: [],
+      options: [],
+      dateRange: null,
+      year: new Date().getFullYear(),
+      tabListNoTitle: [
+        {
+          key: 'kuaishou',
+          tab: '快手'
+        },
+        {
+          key: 'toutiao',
+          tab: '头条'
+        }
+      ],
+      noTitleKey: 'kuaishou',
+      a: '',
+      columns: columns,
+      dataList: []
+    }
+  },
+  methods: {
+    disabledDate(current) {
+      // Can not select days before today and today
+      return current && current > moment().endOf('day')
     },
-    // {
-    //   title: '操作',
-    //   dataIndex: 'action',
-    //   key: 'action',
-    //   align: 'center',
-    //   scopedSlots: {
-    //     customRender: 'action'
-    //   },
-    // },
-  ]
-  const columnsYou = [{
-      title: '姓名',
-      dataIndex: 'realname',
-      key: 'realname',
-      align: 'center',
-      width: 200
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    clearData() {
+      this.dataList = []
     },
-    {
-      title: '角色',
-      dataIndex: 'roleName',
-      key: 'roleName',
-      align: 'center'
+    addUser() {
+      this.loading = true
+      if (this.noTitleKey == 'kuaishou') {
+        if (this.type == 1) {
+          this.columns = columns
+          this.getKuaishouList()
+        } else if (this.type == 2) {
+          this.columns = columnsYou
+          this.getKuaishouYouHuaList()
+        }
+      } else if (this.noTitleKey == 'toutiao') {
+        if (this.type == 1) {
+          this.columns = columns
+          this.getToutiaoList()
+        } else if (this.type == 2) {
+          this.columns = columnsYou
+          this.getToutiaoYouHuaList()
+        }
+      }
     },
-    {
-      title: '总消耗',
-      dataIndex: 'cost',
-      key: 'cost',
-      align: 'center'
+    onTabChange(key, type) {
+      console.log(key, type)
+      this.type = 1
+      this.dateRange = null
+      this.year = '2020'
+      this.options = []
+      this.dataList = []
+      this.columns = columns
+      this[type] = key
     },
-    {
-      title: '绩效',
-      dataIndex: 'effiRate',
-      key: 'effiRate',
-      align: 'center'
+    toDetail(item) {
+      localStorage.setItem('detailUserId', item.userId)
+      localStorage.setItem('appType', this.noTitleKey)
+      localStorage.setItem('roleData', this.type)
+      localStorage.setItem('weekDate', this.dateRange)
+      this.$router.replace({
+        path: '/Statistics/allDetail'
+      })
     },
-    // {
-    //   title: '操作',
-    //   dataIndex: 'action',
-    //   key: 'action',
-    //   align: 'center',
-    //   scopedSlots: {
-    //     customRender: 'action'
-    //   },
-    // },
-  ]
-
-
-  export default {
-    name: 'admin-info',
-    components: {
-      ATooltip,
-      ACol,
+    getKuaishouList() {
+      var params = {}
+      params.year = this.year
+      params.quarter = this.dateRange
+      postAction('/ctop/performance2/kuaishouQuarterReport', params).then(res => {
+        console.log(res)
+        if (res.success) {
+          this.loading = false
+          this.dataList = res.result.map((item, index) => {
+            return {
+              ...item,
+              key: index
+            }
+          })
+        } else {
+          this.loading = false
+          this.$message.error(res.message)
+        }
+      })
     },
 
-    data: function () {
-      return {
-        type: 1,
-        title: '工作台',
-        loginfo: {},
-        barData,
-        visitInfo: [],
-        visitFields: ['ip', 'visit'],
-        loading: false,
-        rankList: [],
-        options: [],
-        dateRange: null,
-        year: new Date().getFullYear(),
-        tabListNoTitle: [{
-            key: 'kuaishou',
-            tab: '快手'
-          },
-          {
-            key: 'toutiao',
-            tab: '头条'
-          }
-        ],
-        noTitleKey: 'kuaishou',
-        a: '',
-        columns: columns,
-        dataList: [],
-      }
+    getToutiaoList() {
+      var params = {}
+      params.year = this.year
+      params.quarter = this.dateRange
+      postAction('/ctop/performance2/toutiaoQuarterReport', params).then(res => {
+        console.log(res)
+        if (res.success) {
+          this.loading = false
+          this.dataList = res.result.map((item, index) => {
+            return {
+              ...item,
+              key: index
+            }
+          })
+        } else {
+          this.loading = false
+          this.$message.error(res.message)
+        }
+      })
     },
-    methods: {
-      disabledDate(current) {
-        // Can not select days before today and today
-        return current && current > moment().endOf('day');
-      },
-      ...mapGetters(['nickname', 'avatar', 'userInfo']),
-      clearData() {
-        this.dataList = []
-      },
-      addUser() {
-        if (this.noTitleKey == 'kuaishou') {
-          if (this.type == 1) {
-            this.columns = columns
-            this.getKuaishouList()
-          } else if (this.type == 2) {
-            this.columns = columnsYou
-            this.getKuaishouYouHuaList()
-          }
-
-        } else if (this.noTitleKey == 'toutiao') {
-          if (this.type == 1) {
-            this.columns = columns
-            this.getToutiaoList()
-          } else if (this.type == 2) {
-            this.columns = columnsYou
-            this.getToutiaoYouHuaList()
-
-          }
+    getKuaishouYouHuaList() {
+      var params = {}
+      params.year = this.year
+      params.quarter = this.dateRange
+      postAction('/ctop/performance2/kuaishouYouhuaQuarterReport', params).then(res => {
+        console.log(res)
+        if (res.success) {
+          this.loading = false
+          this.dataList = res.result.map((item, index) => {
+            return {
+              ...item,
+              key: index
+            }
+          })
+        } else {
+          this.loading = false
+          this.$message.error(res.message)
         }
-      },
-      onTabChange(key, type) {
-        console.log(key, type)
-        this.type = 1
-        this.dateRange = null
-        this.year = '2020'
-        this.options = []
-        this.dataList = []
-        this.columns = columns
-        this[type] = key
-
-      },
-      toDetail(item) {
-        localStorage.setItem('detailUserId', item.userId)
-        localStorage.setItem('appType', this.noTitleKey)
-        localStorage.setItem('roleData', this.type)
-        localStorage.setItem('weekDate', this.dateRange)
-        this.$router.replace({
-          path: '/Statistics/allDetail'
-        })
-      },
-      getKuaishouList() {
-        var params = {}
-        params.year = this.year
-        params.quarter = this.dateRange
-        postAction('/ctop/performance2/kuaishouQuarterReport', params).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() {
-        var params = {}
-        params.year = this.year
-        params.quarter = this.dateRange
-        postAction('/ctop/performance2/toutiaoQuarterReport', params).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)
-          }
-        })
-      },
-      getKuaishouYouHuaList() {
-        var params = {}
-        params.year = this.year
-        params.quarter = this.dateRange
-        postAction('/ctop/performance2/kuaishouYouhuaQuarterReport', params).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)
-          }
-        })
-      },
-      getToutiaoYouHuaList() {
-        var params = {}
-        params.year = this.year
-        params.quarter = this.dateRange
-        postAction('/ctop/performance2/toutiaoYouhuaQuarterReport', params).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()
-      var myDate = new Date();
-      var startYear = myDate.getFullYear() - 5; //起始年份 
-      var endYear = myDate.getFullYear() + 5; //结束年份 
-      for (var i = startYear; i <= endYear; i++) {
-        this.options.push(i);
-      }
+    getToutiaoYouHuaList() {
+      var params = {}
+      params.year = this.year
+      params.quarter = this.dateRange
+      postAction('/ctop/performance2/toutiaoYouhuaQuarterReport', params).then(res => {
+        console.log(res)
+        if (res.success) {
+          this.loading = false
+          this.dataList = res.result.map((item, index) => {
+            return {
+              ...item,
+              key: index
+            }
+          })
+        } else {
+          this.loading = false
+          this.$message.error(res.message)
+        }
+      })
+    }
+  },
+  created() {
+    //   this.getKuaishouList()
+    var myDate = new Date()
+    var startYear = myDate.getFullYear() - 5 //起始年份
+    var endYear = myDate.getFullYear() + 5 //结束年份
+    for (var i = startYear; i <= endYear; i++) {
+      this.options.push(i)
     }
   }
-</script>
+}
+</script>

+ 17 - 6
src/views/modules/achievements/adminInfo.vue

@@ -80,12 +80,12 @@ const columns = [
     key: 'videoCount',
     align: 'center'
   },
-  {
-    title: '消耗',
-    dataIndex: 'cost',
-    key: 'cost',
-    align: 'center'
-  },
+  //   {
+  //     title: '消耗',
+  //     dataIndex: 'cost',
+  //     key: 'cost',
+  //     align: 'center'
+  //   },
   {
     title: '操作',
     dataIndex: 'action',
@@ -159,6 +159,7 @@ export default {
   methods: {
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
     addUser() {
+      this.loading = true
       if (this.noTitleKey == 'kuaishou') {
         if (this.type == 1) {
           this.columns = columns
@@ -179,6 +180,7 @@ export default {
     },
     getData(data) {
       this.dataList = []
+      this.loading = false
     },
     onTabChange(key, type) {
       console.log(key, type)
@@ -186,6 +188,7 @@ export default {
       this.columns = columns
       this[type] = key
       this.dataList = []
+      this.loading = false
       // if (key == 'kuaishou') {
       //   this.getKuaishouList()
       // } else if (key == 'toutiao') {
@@ -204,6 +207,7 @@ export default {
       postAction('/ctop/performance2/kuaishouPerformanceInfoNow', '').then(res => {
         console.log(res)
         if (res.success) {
+          this.loading = false
           this.dataList = res.result.map((item, index) => {
             return {
               ...item,
@@ -211,6 +215,7 @@ export default {
             }
           })
         } else {
+          this.loading = false
           this.$message.error(res.message)
         }
       })
@@ -220,6 +225,7 @@ export default {
       postAction('/ctop/performance2/toutiaoPerformanceInfoNow', '').then(res => {
         console.log(res)
         if (res.success) {
+          this.loading = false
           this.dataList = res.result.map((item, index) => {
             return {
               ...item,
@@ -227,6 +233,7 @@ export default {
             }
           })
         } else {
+          this.loading = false
           this.$message.error(res.message)
         }
       })
@@ -235,6 +242,7 @@ export default {
       postAction('/ctop/performance2/kuaishouYouhuaPerformanceInfoNow', '').then(res => {
         console.log(res)
         if (res.success) {
+          this.loading = false
           this.dataList = res.result.map((item, index) => {
             return {
               ...item,
@@ -242,6 +250,7 @@ export default {
             }
           })
         } else {
+          this.loading = false
           this.$message.error(res.message)
         }
       })
@@ -250,6 +259,7 @@ export default {
       postAction('/ctop/performance2/toutiaoYouhuaPerformanceInfoNow', '').then(res => {
         console.log(res)
         if (res.success) {
+          this.loading = false
           this.dataList = res.result.map((item, index) => {
             return {
               ...item,
@@ -257,6 +267,7 @@ export default {
             }
           })
         } else {
+          this.loading = false
           this.$message.error(res.message)
         }
       })

+ 2 - 2
vue.config.js

@@ -66,11 +66,11 @@ module.exports = {
       '/jeecg-boot': {
         // target: 'http://39.97.120.42:8080', //请求本地 需要jeecg-boot后台项目  生产环境
         // target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
-        target: 'http://192.168.1.44:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        // target: 'http://192.168.1.44:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.2.109:8080', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.103:8080', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
-        // target: 'http://192.168.2.124:8080', //请求本地 需要jeecg-boot后台项目  孙震
+        target: 'http://192.168.2.85:8080', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.43.119:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙,手机热点
         ws: false,
         changeOrigin: true