ソースを参照

提交代码-魏-合并

魏志佳 5 年 前
コミット
3283f08060
30 ファイル変更1774 行追加4559 行削除
  1. 5 0
      src/components/ctop/vm-image-list.vue
  2. 0 35
      src/views/404.vue
  3. 0 263
      src/views/modules/Statistics/allDetail.vue
  4. 0 420
      src/views/modules/Statistics/allStatistics.vue
  5. 2 2
      src/views/modules/Statistics/dataDisplayStatistics.vue
  6. 0 208
      src/views/modules/Statistics/projectDetail.vue
  7. 0 216
      src/views/modules/Statistics/projectStatistics.vue
  8. 0 230
      src/views/modules/Statistics/projectVideo.vue
  9. 0 209
      src/views/modules/Statistics/quarterDetail.vue
  10. 0 339
      src/views/modules/Statistics/quarterStatistics.vue
  11. 0 571
      src/views/modules/Statistics/toutiaoAccount.vue
  12. 0 582
      src/views/modules/Statistics/toutiaoMaterialStatistics.vue
  13. 0 195
      src/views/modules/achievements/adminDetail.vue
  14. 0 280
      src/views/modules/achievements/adminInfo.vue
  15. 4 3
      src/views/modules/advertiser/UserAllocationList.vue
  16. 5 1
      src/views/modules/kuaishouapp/account/accountIndex.vue
  17. 135 36
      src/views/modules/kuaishouapp/account/advertisingGroup.vue
  18. 1 1
      src/views/modules/kuaishouapp/account/copyGroup.vue
  19. 538 497
      src/views/modules/kuaishouapp/account/editAllGroup.vue
  20. 2 2
      src/views/modules/kuaishouapp/account/editGroup.vue
  21. 275 257
      src/views/modules/kuaishouapp/account/newMould.vue
  22. 3 1
      src/views/modules/kuaishouapp/account/originality.vue
  23. 7 2
      src/views/modules/kuaishouapp/account/stepForm/Step2.vue
  24. 60 20
      src/views/modules/kuaishouapp/account/stepForm/Step3.vue
  25. 3 0
      src/views/modules/kuaishouapp/account/stepForm/stepModule/checkMatemal.vue
  26. 343 0
      src/views/modules/kuaishouapp/account/stepForm/stepModule/createAppNew.vue
  27. 41 40
      src/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue
  28. 1 0
      src/views/modules/material/scriptMaterial.vue
  29. 100 90
      src/views/modules/material/videoMaterial.vue
  30. 249 59
      src/views/modules/onlineTraining/onlineTrainingList.vue

+ 5 - 0
src/components/ctop/vm-image-list.vue

@@ -38,10 +38,15 @@
       <div class="panel-heading">{{ title }}</div>
       <a-row type="flex" align="middle" justify="space-between" class="panel-body">
         <div class="search-bar">
+<<<<<<< HEAD
+          <a-button @click="handleAdd" v-show="show" type="primary" icon="plus">新增</a-button>
+          <a-input placeholder="请输入搜索内容" v-model="keyword" style="width: 300px"></a-input>
+=======
           <a-button @click="handleAdd" type="primary" icon="plus" style="margin-right:10px">新增</a-button>
           <a-input placeholder="请输入搜索内容" v-model="keyword" style="width: 300px">
             <a-icon slot="addonAfter" type="search" style="cursor: pointer;" @click="search" />
           </a-input>
+>>>>>>> test-2
           <!--          <Button type="ghost" @click="search"><i class="fa fa-search"></i></Button>-->
         </div>
         <a-row type="flex" align="middle" class="page">

+ 0 - 35
src/views/404.vue

@@ -1,41 +1,6 @@
 <template>
   <div>
     404 page 
-    agreement n. 协定;协议;契约;(意见或看法)一致;应允;同意
-    alliance n.(国家、政党等的)结盟,同盟;结盟团体;联盟
-    allies n.(尤指战时的)同盟国;(尤指从政者的)盟友,支持者;(第一次世界大战中的)协约国;(第二次世界大战中的)同盟国
-            v.与…结盟
-    ambassador n.大使;使节
-    amendment n.(法律、文件的)改动,修正案,修改,修订;(美国宪法的)修正案
-    press n.报章杂志;报刊;印刷媒体;记者;新闻工作者;新闻界;报道;评论
-            v.(被)压,挤,推,施加压力;按,压(使启动);将…塞进;把…按入
-    conference n.(通常持续几天的大型正式)会议,研讨会;(正式)讨论会,商讨会;体育协会(或联合会)
-    cabinet n.内阁;储藏柜;陈列柜
-    campaign n.运动(为社会、商业或政治目的而进行的一系列有计划的活动);战役
-            v.参加运动,领导运动(如为实现政治变革或赢得竞选胜利)
-    elect v.选举;推选;选择,决定(做某事)
-            adj.(用于名词后)当选而尚未就职的,候任的;上帝的选民
-            n.被选的人
-    shoe-string 鞋带
-    majority  n.大部分;大多数;(获胜的)票数;多数票;超出其余各方票数总和的票数
-    bare adj.裸体的;裸露的;(树木)光秃秃的;(土地)荒芜的;无遮盖的;没有保护的
-         v.揭开;脱掉(衣服)
-    majority n.大部分;大多数;(获胜的)票数;多数票;超出其余各方票数总和的票数
-    absolute adj.完全的;全部的;绝对的;(英语口语中尤用以强调)道地的,确实的,十足的;肯定的;无疑的;明确的
-            n.绝对真理(指思想或原理)
-    majority n.大部分;大多数;(获胜的)票数;多数票;超出其余各方票数总和的票数
-    abstain from  不参加;投弃权票;不说;没有
-    voting n.投票;选举;表决
-            v.投票(赞成 / 反对);表决(支持 / 不支持);选举;选出,推举(某人担任某职);表决(授奖给某人);表明,认为,公认(某事好或坏)
-            vote的现在分词
-    cast one’s ballot 投票选举; 投票表决; 选票; 投票总数; 要求某人无记名投票; 进行无记名投票
-
-
-
-    Extremist   militant  invade 
-aggression          terrorist  evacuate 
-compromise          military coupe 
-armed conflict
   </div>
 </template>
 

+ 0 - 263
src/views/modules/Statistics/allDetail.vue

@@ -1,263 +0,0 @@
-<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')
-    if (typeAll == 'all') {
-      this.columns = columns
-      postAction('/ctop/performance2/getVideoList', {
-        startDate: weekDate[0],
-        endDate: weekDate[1],
-        userId: userId,
-        appType: appType
-      }).then(res => {
-        if (res.success) {
-          this.dataList = res.result.map((item, index) => {
-            return {
-              ...item,
-              key: index
-            }
-          })
-        } else {
-          this.$message.error(res.message)
-        }
-      })
-    } else {
-      if (type == 1) {
-        this.columns = columns
-        postAction('/ctop/performance2/getWeekEffiVideoList', {
-          startDate: weekDate[0],
-          endDate: weekDate[1],
-          userId: userId,
-          appType: appType
-        }).then(res => {
-          if (res.success) {
-            this.dataList = res.result.map((item, index) => {
-              return {
-                ...item,
-                key: index
-              }
-            })
-          } else {
-            this.$message.error(res.message)
-          }
-        })
-      } else if (type == 2) {
-        this.columns = columnsYou
-        if (appType == 2) {
-          postAction('/ctop/performance2/getKuaiShouYouhuaAccountsList', {
-            startDate: weekDate[0],
-            endDate: weekDate[1],
-            userId: userId,
-            appType: appType
-          }).then(res => {
-            if (res.success) {
-              this.dataList = res.result.map((item, index) => {
-                return {
-                  ...item,
-                  key: index
-                }
-              })
-            } else {
-              this.$message.error(res.message)
-            }
-          })
-        } else {
-          postAction('/ctop/performance2/getToutiaoYouhuaAccountsList', {
-            startDate: weekDate[0],
-            endDate: weekDate[1],
-            userId: userId,
-            appType: appType
-          }).then(res => {
-            if (res.success) {
-              this.dataList = res.result.map((item, index) => {
-                return {
-                  ...item,
-                  key: index
-                }
-              })
-            } else {
-              this.$message.error(res.message)
-            }
-          })
-        }
-      }
-    }
-  }
-}
-</script>

+ 0 - 420
src/views/modules/Statistics/allStatistics.vue

@@ -1,420 +0,0 @@
-<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: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-month-picker placeholder="选择月份" :disabledDate="disabledDate" @change="getTimeData" v-model="mouth" />
-          <a-select style="width:300px;margin-bottom:30px" placeholder="选择时段" v-model="dateRange">
-            <a-select-option :value="item" v-for="(item, index) of options" :key="index">{{ 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">
-              <div v-if="type == 1">
-                <a :disabled="record.effiVideoCount == 0" @click="toDetail(record, 'effi')">有效视频详情</a>
-                <a-divider type="vertical" />
-                <a :disabled="record.videoCount == 0" @click="toDetail(record, 'all')">总视频详情</a>
-              </div>
-              <div v-else>
-                <a :disabled="record.effiVideoCount == 0" @click="toDetail(record, 'effi')">查看详情</a>
-              </div>
-            </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: '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: 'effiVideoCount',
-    align: 'center'
-  },
-  {
-    title: '操作',
-    dataIndex: 'action',
-    key: 'action',
-    align: 'center',
-    scopedSlots: {
-      customRender: 'action'
-    }
-  }
-]
-
-Date.prototype.format = function(fmt) {
-  var o = {
-    'M+': this.getMonth() + 1, //月份
-    'd+': this.getDate(), //日
-    'h+': this.getHours(), //小时
-    'm+': this.getMinutes(), //分
-    's+': this.getSeconds(), //秒
-    'q+': Math.floor((this.getMonth() + 3) / 3), //季度
-    S: this.getMilliseconds() //毫秒
-  }
-  if (/(y+)/.test(fmt)) {
-    fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
-  }
-  for (var k in o) {
-    if (new RegExp('(' + k + ')').test(fmt)) {
-      fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length))
-    }
-  }
-  return fmt
-}
-
-function allWeeks(now_month) {
-  let week_array = []
-  let today = new Date(Date.parse(now_month))
-  let year = today.getFullYear()
-  let month = today.getMonth()
-  let i = 0
-
-  let start = new Date(year, month, 1) // 得到当月第一天
-  let end = new Date(year, month + 1, 0) // 得到当月最后一天
-  let start_day = start.getDay() // 当月第一天是周几
-  console.log(start.format('yyyy-MM-dd'), end.format('yyyy-MM-dd')) // 每月的起始日期
-  switch (start_day) {
-    case 0:
-      i = 0 - 1
-      break
-    case 1:
-      i = 0 - 2
-      break
-    case 2:
-      i = 0 - 3
-      break
-    case 3:
-      i = 0 - 4
-      break
-    case 4:
-      i = 0 - 5
-      break
-    case 5:
-      i = 1
-      break
-    case 6:
-      i = 0
-      break
-  }
-
-  while (new Date(year, month, i + 6) <= end) {
-    week_array.push([new Date(year, month, i).format('yyyy-MM-dd'), new Date(year, month, i + 6).format('yyyy-MM-dd')])
-    i += 7
-  }
-  return week_array
-}
-
-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,
-      mouth: null,
-      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 = []
-    },
-    getTimeData(data) {
-      this.dateRange = ''
-      this.options = []
-      this.dataList = []
-      if (data) {
-        var getDate = new Date(data).format('yyyy-MM')
-        this.timeData(getDate)
-      }
-    },
-    timeData(data) {
-      var options = allWeeks(data)
-      console.log(options)
-      this.options = []
-      for (let i = 0; i < options.length; i++) {
-        this.options.push(options[i][0] + '~' + options[i][1])
-      }
-    },
-    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()
-        }
-      }
-    },
-    onTabChange(key, type) {
-      console.log(key, type)
-      this.type = 1
-      this.dateRange = null
-      this.mouth = null
-      this.options = []
-      this.dataList = []
-      this.columns = columns
-      this[type] = key
-    },
-    toDetail(item, typeAll) {
-      localStorage.setItem('detailUserId', item.userId)
-      localStorage.setItem('appType', this.noTitleKey)
-      localStorage.setItem('roleData', this.type)
-      localStorage.setItem('weekDate', this.dateRange)
-      localStorage.setItem('typeAll', typeAll)
-      this.$router.replace({
-        path: '/Statistics/allDetail'
-      })
-    },
-    getKuaishouList() {
-      this.loading = true
-      var params = {}
-      var dateRange = this.dateRange.split('~')
-      params.startDate = dateRange[0]
-      params.endDate = dateRange[1]
-      postAction('/ctop/performance2/kuaishouWeekReport', 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)
-        }
-      })
-    },
-
-    getToutiaoList() {
-      this.loading = true
-      var params = {}
-      var dateRange = this.dateRange.split('~')
-      params.startDate = dateRange[0]
-      params.endDate = dateRange[1]
-      postAction('/ctop/performance2/toutiaoWeekReport', 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)
-        }
-      })
-    },
-    getKuaishouYouHuaList() {
-      this.loading = true
-      var params = {}
-      var dateRange = this.dateRange.split('~')
-      params.startDate = dateRange[0]
-      params.endDate = dateRange[1]
-      postAction('/ctop/performance2/kuaishouYouhuaWeekReport', 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)
-        }
-      })
-    },
-    getToutiaoYouHuaList() {
-      this.loading = true
-      var params = {}
-      var dateRange = this.dateRange.split('~')
-      params.startDate = dateRange[0]
-      params.endDate = dateRange[1]
-      postAction('/ctop/performance2/toutiaoYouhuaWeekReport', 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()
-  }
-}
-</script>

+ 2 - 2
src/views/modules/Statistics/dataDisplayStatistics.vue

@@ -861,7 +861,7 @@ export default {
                 formCount: item.formCount > 0 ? item.formCount : item.activationCount,
                 eventRegister: item.eventRegister,
                 eventRegisterCost: item.eventRegisterCost.toFixed(2),
-                eventNextDayStayRatio:item.eventNextDayStayRatio?item.eventNextDayStayRatio.toFixed(2) + '%' : 0 + '%'
+                eventNextDayStayRatio:item.eventNextDayStayRatio?(item.eventNextDayStayRatio*100).toFixed(2) + '%' : 0 + '%'
               }
             })
             var index = this.data.length
@@ -981,7 +981,7 @@ export default {
                 afterFormPrice: res.result.ratioJson.discountConversionPrice.toFixed(2),
                 eventRegister: res.result.ratioJson.eventRegister,
                 eventRegisterCost: res.result.ratioJson.eventRegisterCost.toFixed(2),
-                eventNextDayStayRatio:res.result.ratioJson.eventNextDayStayRatio?res.result.ratioJson.eventNextDayStayRatio.toFixed(2) + '%' : 0 + '%'
+                eventNextDayStayRatio:res.result.ratioJson.eventNextDayStayRatio?(res.result.ratioJson.eventNextDayStayRatio*100).toFixed(2) + '%' : 0 + '%'
               }
               this.data.push(allNow)
               this.statDate = res.result.statDate

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

@@ -1,208 +0,0 @@
-<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="mediaId">
-              {{ text == 1 ? '头条' : '快手' }}
-            </span>
-            <span slot="quarter" slot-scope="text, record">
-              {{ record.year + '年第' + record.quarter + '季度' }}
-            </span>
-            <span slot="startDate" slot-scope="text, record">
-              {{ record.startDate + '~' + record.endDate }}
-            </span>
-            <span slot="action" slot-scope="text, record">
-              <a :disabled="record.cost == 0 || record.cost == 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 { 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: '账户id',
-    dataIndex: 'accountId',
-    key: 'accountId',
-    align: 'center'
-  },
-  {
-    title: '账户运营',
-    dataIndex: 'userName',
-    key: 'userName',
-    align: 'center'
-  },
-  {
-    title: '广告主名称',
-    dataIndex: 'advertiserName',
-    key: 'advertiserName',
-    align: 'center'
-  },
-  {
-    title: '授权名称',
-    dataIndex: 'authName',
-    key: 'authName',
-    align: 'center'
-  },
-  {
-    title: '季度消耗',
-    dataIndex: 'cost',
-    key: 'cost',
-    align: 'center'
-  },
-  {
-    title: '媒体类型',
-    dataIndex: 'mediaId',
-    key: 'mediaId',
-    align: 'center',
-    scopedSlots: { customRender: 'mediaId' }
-  },
-  {
-    title: '绩效年度',
-    dataIndex: 'quarter',
-    key: 'quarter',
-    align: 'center',
-    scopedSlots: { customRender: 'quarter' }
-  },
-  {
-    title: '运营所属时间段',
-    dataIndex: 'startDate',
-    key: 'startDate',
-    align: 'center',
-    scopedSlots: { customRender: 'startDate' }
-  },
-  {
-    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: columns,
-      dataList: []
-    }
-  },
-  methods: {
-    ...mapGetters(['nickname', 'avatar', 'userInfo']),
-    toDetail(item) {
-      localStorage.setItem('videoAccountId', item.accountId)
-      localStorage.setItem('videoAppType', item.mediaId)
-      localStorage.setItem('videoYear', item.year)
-      localStorage.setItem('videoQuarter', item.quarter)
-
-      this.$router.replace({
-        path: '/Statistics/projectVideo'
-      })
-    }
-  },
-  filters: {
-    roleName: function(value) {
-      var status = {
-        clip: '剪辑',
-        shot: '拍摄',
-        plan: '策划',
-        plane: '平面'
-      }
-      return status[value]
-    }
-  },
-  created() {
-    var userId = localStorage.getItem('projectStatisticsId')
-    var appType = localStorage.getItem('projectAppType') == 'kuaishou' ? 2 : 1
-    var type = localStorage.getItem('projectYear')
-    var weekDate = localStorage.getItem('projectQuarter')
-
-    postAction('/ctop/performance2/getQuarterAccountDetail', {
-      year: type,
-      quarter: weekDate,
-      appType: appType,
-      projectId: userId
-    }).then(res => {
-      if (res.success) {
-        this.dataList = res.result.map((item, index) => {
-          return {
-            ...item,
-            key: index
-          }
-        })
-      } else {
-        this.$message.error(res.message)
-      }
-    })
-  }
-}
-</script>

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

@@ -1,216 +0,0 @@
-<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) {
-      // {"year":2020,"quarter":1,"appType":2,"projectId":47}
-      localStorage.setItem('projectStatisticsId', item.projectId)
-      localStorage.setItem('projectAppType', this.noTitleKey)
-      localStorage.setItem('projectYear', this.year)
-      localStorage.setItem('projectQuarter', this.dateRange)
-
-      this.$router.replace({
-        path: '/Statistics/projectDetail'
-      })
-    },
-    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>

+ 0 - 230
src/views/modules/Statistics/projectVideo.vue

@@ -1,230 +0,0 @@
-<style></style>
-<template>
-  <div class="admin-detail">
-    <a-row :gutter="10" style="margin-top:10px">
-      <a-col :span="24">
-        <a-card style="width:100%;">
-          <h3 style="margin:20px 0">当前账户总消耗为:{{ sumAll }}</h3>
-
-          <a-table
-            :columns="columns"
-            :dataSource="dataList"
-            bordered
-            :loading="loading"
-            size="middle"
-            :pagination="true"
-          >
-            <span slot-scope="text" slot="creativeUrl">
-              <video class="video" :src="text" controls="controls" style="height:200px" v-if="text">
-                您的浏览器不支持 video 标签。
-              </video>
-              <div v-else>
-                暂无视频
-              </div>
-            </span>
-            <span slot="shot" slot-scope="text">{{ text ? text : '-' }}</span>
-            <span slot="plan" slot-scope="text">{{ text ? text : '-' }}</span>
-            <span slot="plane" slot-scope="text">{{ text ? text : '-' }}</span>
-            <span slot="clip" slot-scope="text">{{ text ? text : '-' }}</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: 'creativeUrl',
-    key: 'creativeUrl',
-    align: 'center',
-    scopedSlots: {
-      customRender: 'creativeUrl'
-    },
-    width: 200
-  },
-  {
-    title: '账户消耗',
-    dataIndex: 'charge',
-    key: 'charge',
-    align: 'center',
-    scopedSlots: {
-      customRender: 'charge'
-    }
-  },
-  {
-    title: '拍摄',
-    dataIndex: 'shot',
-    key: 'shot',
-    align: 'center',
-    scopedSlots: {
-      customRender: 'shot'
-    }
-  },
-  {
-    title: '编导',
-    dataIndex: 'plan',
-    key: 'plan',
-    align: 'center',
-    scopedSlots: {
-      customRender: 'plan'
-    }
-  },
-  {
-    title: '平面',
-    dataIndex: 'plane',
-    key: 'plane',
-    align: 'center',
-    scopedSlots: {
-      customRender: 'plane'
-    }
-  },
-  {
-    title: '剪辑',
-    dataIndex: 'clip',
-    key: 'clip',
-    align: 'center',
-    scopedSlots: {
-      customRender: 'clip'
-    }
-  }
-]
-function sum(arr) {
-  var len = arr.length
-  if (len == 0) {
-    return 0
-  } else if (len == 1) {
-    return arr[0]
-  } else {
-    return arr[0] + sum(arr.slice(1))
-  }
-}
-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: [],
-      sumAll: null
-    }
-  },
-  methods: {
-    ...mapGetters(['nickname', 'avatar', 'userInfo'])
-  },
-  filters: {
-    roleName: function(value) {
-      var status = {
-        clip: '剪辑',
-        shot: '拍摄',
-        plan: '策划',
-        plane: '平面'
-      }
-      return status[value]
-    }
-  },
-  created() {
-    var userId = localStorage.getItem('videoAccountId')
-    var appType = localStorage.getItem('videoAppType')
-    //  == 'kuaishou' ? 2 : 1
-    var type = localStorage.getItem('videoYear')
-    var weekDate = localStorage.getItem('videoQuarter')
-    if (appType == '2') {
-      // /ctop/performance2/getKuaishouQuarterVideoInfoByAccountId
-      postAction('/ctop/performance2/getKuaishouQuarterVideoInfoByAccountId', {
-        year: type,
-        quarter: weekDate,
-        accountId: userId
-      }).then(res => {
-        if (res.success) {
-          this.dataList = res.result.map((item, index) => {
-            return {
-              ...item,
-              key: index
-            }
-          })
-
-          var sumAll = this.dataList.map(item => {
-            return item.charge
-          })
-          this.sumAll = sum(sumAll)
-        } else {
-          this.$message.error(res.message)
-        }
-      })
-    } else {
-      postAction('/ctop/performance2/getToutiaoQuarterVideoInfoByAccountId', {
-        year: type,
-        quarter: weekDate,
-        accountId: userId
-      }).then(res => {
-        if (res.success) {
-          this.dataList = res.result.map((item, index) => {
-            return {
-              ...item,
-              key: index
-            }
-          })
-          var sumAll = this.dataList.map(item => {
-            return item.charge
-          })
-          this.sumAll = sum(sumAll)
-        } else {
-          this.$message.error(res.message)
-        }
-      })
-    }
-  }
-}
-</script>

+ 0 - 209
src/views/modules/Statistics/quarterDetail.vue

@@ -1,209 +0,0 @@
-<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="true">
-
-            <span slot="startDate" slot-scope="text,record"> {{ record.startDate + '~' + record.endDate }}</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
-    })
-  }
-  // "realname": "兰兰",
-  //             "authName": "拉活-RTA(lan)",
-  //             "advertiserName": "支付宝(中国)网络技术有限公司",
-  //             "projectName": "支付宝-拉活"
-  const columns = [{
-      title: '项目名称',
-      dataIndex: 'projectName',
-      key: 'projectName',
-      align: 'center',
-      scopedSlots: {
-        customRender: 'projectName'
-      }
-    },
-    {
-      title: '授权名称',
-      dataIndex: 'authName',
-      key: 'authName',
-      align: 'center',
-      scopedSlots: {
-        customRender: 'authName'
-      }
-    },
-    {
-      title: '账户id',
-      dataIndex: 'accountId',
-      key: 'accountId',
-      align: 'center',
-      scopedSlots: {
-        customRender: 'accountId'
-      }
-    },
-    {
-      title: '广告主名称',
-      dataIndex: 'advertiserName',
-      key: 'advertiserName',
-      align: 'center',
-      scopedSlots: {
-        customRender: 'advertiserName'
-      }
-    },
-    {
-      title: '运营',
-      dataIndex: 'realname',
-      key: 'realname',
-      align: 'center',
-      scopedSlots: {
-        customRender: 'realname'
-      }
-    },
-    {
-      title: '消耗',
-      dataIndex: 'cost',
-      key: 'cost',
-      align: 'center',
-      scopedSlots: {
-        customRender: 'cost'
-      }
-    },
-    {
-      title: '所属时间段',
-      dataIndex: 'startDate',
-      key: 'startDate',
-      align: 'center',
-      scopedSlots: {
-        customRender: 'startDate'
-      }
-    }
-  ]
-
-  function sum(arr) {
-    var len = arr.length
-    if (len == 0) {
-      return 0
-    } else if (len == 1) {
-      return arr[0]
-    } else {
-      return arr[0] + sum(arr.slice(1))
-    }
-  }
-  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: [],
-        sumAll: null
-      }
-    },
-    methods: {
-      ...mapGetters(['nickname', 'avatar', 'userInfo'])
-    },
-    filters: {
-      roleName: function (value) {
-        var status = {
-          clip: '剪辑',
-          shot: '拍摄',
-          plan: '策划',
-          plane: '平面'
-        }
-        return status[value]
-      }
-    },
-    created() {
-      var userId = localStorage.getItem('quarterUserId')
-      var appType = localStorage.getItem('quarterAppType') == 'kuaishou' ? 2 : 1
-      var type = localStorage.getItem('quarterYear')
-      var weekDate = localStorage.getItem('quarterNow')
-
-
-      //   localStorage.setItem('quarterUserId', item.userId)
-      //   localStorage.setItem('quarterAppType', this.noTitleKey)
-      //   localStorage.setItem('quarterYear', this.year)
-      //   localStorage.setItem('quarterNow', this.dateRange)
-      //   this.$router.replace({
-      //     path: '/Statistics/quarterDetail'
-      //   })
-      postAction('/ctop/performance2/getYunyingQuarterDetailByUserId', {
-        "year": type,
-        "quarter": weekDate,
-        "userId": userId,
-        "appType": appType
-      }).then(res => {
-        if (res.success) {
-          this.dataList = res.result.map((item, index) => {
-            return {
-              ...item,
-              key: index
-            }
-          })
-        } else {
-          this.$message.error(res.message)
-        }
-      })
-    }
-  }
-</script>

+ 0 - 339
src/views/modules/Statistics/quarterStatistics.vue

@@ -1,339 +0,0 @@
-<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: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>
-          <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 @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: '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'
-    }
-  }
-]
-
-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
-      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()
-        }
-      }
-    },
-    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('quarterUserId', item.userId)
-      localStorage.setItem('quarterAppType', this.noTitleKey)
-      localStorage.setItem('quarterYear', this.year)
-      localStorage.setItem('quarterNow', this.dateRange)
-      this.$router.replace({
-        path: '/Statistics/quarterDetail'
-      })
-    },
-    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)
-        }
-      })
-    },
-
-    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)
-        }
-      })
-    },
-    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)
-        }
-      })
-    },
-    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>

+ 0 - 571
src/views/modules/Statistics/toutiaoAccount.vue

@@ -1,571 +0,0 @@
-<style lang="scss" scoped>
-.search-bar {
-  display: flex;
-  align-items: center;
-}
-
-.search-box p {
-  display: inline-block;
-  border: 1px solid #f2f2f2;
-  border-radius: 5px;
-  margin-right: 10px;
-  padding: 5px 10px;
-  cursor: pointer;
-}
-</style>
-<style>
-.search-box .ant-card-body {
-  padding: 5px 15px;
-}
-
-.ant-modal-wrap .yincang .ant-modal-content .ant-modal-footer {
-  display: none !important;
-}
-
-.yincang .ant-col-6 p {
-  text-align: left;
-  color: red;
-  font-size: 16px;
-  font-weight: 500;
-}
-
-.ant-table-thead div {
-  font-weight: 700;
-}
-
-.tool-tip {
-  position: absolute;
-  top: 65px;
-  right: 10px;
-}
-
-th div {
-  white-space: nowrap;
-}
-</style>
-<template>
-  <div class="data-account-statistics">
-    <a-row class="image-list-heading vm-panel">
-      <div class="panel-heading" style="display:flex;justify-content: space-between;">
-        {{ title }}
-        <a-button @click="dianji">进入素材报表</a-button>
-      </div>
-      <a-row type="flex" align="middle" justify="space-between" class="panel-body">
-        <div class="search-bar" style="width:100%">
-          <span>账户选择:</span>
-          <treeselect :appId.sync="appId" request="1" />
-          <a-button type="primary" style="margin:10px" @click="addUser">搜索</a-button>
-          <a-button type="primary" style="margin:10px" @click="getDataResetAll">重置</a-button>
-        </div>
-      </a-row>
-      <a-row>
-        <a-col :span="24">
-          <a-card :bordered="false" class="search-box">
-            <time-check @getAdd="getAdd" :startValue.sync="startValue" :timeList="timeList" ref="timeCheck">
-            </time-check>
-          </a-card>
-        </a-col>
-      </a-row>
-    </a-row>
-    <a-row :gutter="10" style="margin-top:10px">
-      <a-col :span="24">
-        <a-card style="width:100%;">
-          <a-table
-            :columns="columns"
-            :dataSource="data"
-            bordered
-            id="outTable"
-            :pagination="ipagination"
-            size="middle"
-            :customRow="rowClick"
-            :loading="loading"
-            :scroll="{ x: 2000 }"
-          >
-            <div slot="videoUrl" slot-scope="url">
-              <video class="video" :src="url" controls="controls" style="height:200px;width:112.5px">
-                您的浏览器不支持 video 标签。
-              </video>
-            </div>
-            <!-- <span slot="photoClickRatio" slot-scope="photoClickRatio">{{ photoClickRatio | getBo }}</span>
-            <span slot="actionRatio" slot-scope="actionRatio">{{ actionRatio | getBo }}</span>
-            <span slot="impression1kCost" slot-scope="impression1kCost">{{ impression1kCost | toFixtwo }}</span>
-            <span slot="photoClickCost" slot-scope="photoClickCost">{{ photoClickCost | toFixtwo }}</span>
-            <span slot="actionCost" slot-scope="actionCost">{{ actionCost | toFixtwo }}</span>
-            <span slot="conversionPrice" slot-scope="conversionPrice">{{ conversionPrice | toFixtwo }}</span> -->
-          </a-table>
-        </a-card>
-      </a-col>
-    </a-row>
-    <!-- <ratio-modal ref="ratio" /> -->
-  </div>
-</template>
-
-<script>
-import ARow from 'ant-design-vue/es/grid/Row'
-import ACol from 'ant-design-vue/es/grid/Col'
-import countTo from 'vue-count-to'
-import moment from 'moment'
-import { getMaterialReportByAccount } from '@api/statistics'
-import { getAction, postAction, postFile, downFile, downFilePost, deleteAction } from '@/api/manage'
-import axios from 'axios'
-import lifting from './components/lifting'
-import timeCheck from './components/timeCheck'
-import ratioModal from './components/ratioModal'
-import { mapGetters } from 'vuex'
-
-import { JeecgListMixin } from '@/mixins/ipagination'
-
-// import the component
-import Treeselect from './components/Treeselect.vue'
-
-var length = 0
-var active = 1
-
-const columns = [
-  {
-    title: '视频',
-    dataIndex: 'videoUrl',
-    key: 'videoUrl',
-    align: 'center',
-    scopedSlots: {
-      customRender: 'videoUrl'
-    }
-  },
-  {
-    title: '花费',
-    dataIndex: 'cost',
-    key: 'cost',
-    align: 'center',
-    sorter: (a, b) => a.cost - b.cost
-  },
-  {
-    title: '展示量',
-    dataIndex: 'showNum',
-    key: 'showNum',
-    align: 'center',
-    sorter: (a, b) => a.showNum - b.showNum
-  },
-  {
-    title: '点击量',
-    dataIndex: 'click',
-    key: 'click',
-    align: 'center',
-    sorter: (a, b) => a.click - b.click
-  },
-  {
-    title: '转化量',
-    dataIndex: 'convertNum',
-    key: 'convertNum',
-    align: 'center',
-    sorter: (a, b) => a.convertNum - b.convertNum
-  },
-  {
-    title: '应用下载-激活',
-    dataIndex: 'active',
-    key: 'active',
-    align: 'center',
-    sorter: (a, b) => a.active - b.active
-  },
-  {
-    title: '应用下载-安卓下载完成',
-    dataIndex: 'downloadFinish',
-    key: 'downloadFinish',
-    align: 'center',
-    sorter: (a, b) => a.downloadFinish - b.downloadFinish
-  },
-  {
-    title: '应用下载-点击安装数',
-    dataIndex: 'clickInstall',
-    key: 'clickInstall',
-    align: 'center',
-    sorter: (a, b) => a.clickInstall - b.clickInstall
-  },
-  {
-    title: '应用下载-付费',
-    dataIndex: 'inAppPay',
-    key: 'inAppPay',
-    align: 'center',
-    sorter: (a, b) => a.inAppPay - b.inAppPay
-  },
-  {
-    title: '总播放',
-    dataIndex: 'totalPlay',
-    key: 'totalPlay',
-    align: 'center',
-    sorter: (a, b) => a.totalPlay - b.totalPlay
-  },
-  {
-    title: '有效播放',
-    dataIndex: 'validPlay',
-    key: 'validPlay',
-    align: 'center',
-    sorter: (a, b) => a.validPlay - b.validPlay
-  },
-  {
-    title: 'wifi播放',
-    dataIndex: 'wifiPlay',
-    key: 'wifiPlay',
-    align: 'center',
-    sorter: (a, b) => a.wifiPlay - b.wifiPlay
-  },
-  {
-    title: '播放100%进度总数',
-    dataIndex: 'play100FeedBreak',
-    key: 'play100FeedBreak',
-    align: 'center',
-    sorter: (a, b) => a.play100FeedBreak - b.play100FeedBreak
-  },
-  {
-    title: '播放75%进度总数',
-    dataIndex: 'play75FeedBreak',
-    key: 'play75FeedBreak',
-    align: 'center',
-    sorter: (a, b) => a.play75FeedBreak - b.play75FeedBreak
-  },
-  {
-    title: '评论数',
-    dataIndex: 'comment',
-    key: 'comment',
-    align: 'center',
-    sorter: (a, b) => a.comment - b.comment
-  },
-  {
-    title: '平均次留数',
-    dataIndex: 'nextDayOpen',
-    key: 'nextDayOpen',
-    align: 'center',
-    sorter: (a, b) => a.nextDayOpen - b.nextDayOpen
-  },
-  {
-    title: '平均次留率(%)',
-    dataIndex: 'nextDayOpenRate',
-    key: 'nextDayOpenRate',
-    align: 'center',
-    sorter: (a, b) => a.nextDayOpenRate - b.nextDayOpenRate
-  },
-  {
-    title: '平均次留成本(元)',
-    dataIndex: 'nextDayOpenCost',
-    key: 'nextDayOpenCost',
-    align: 'center',
-    sorter: (a, b) => a.nextDayOpenCost - b.nextDayOpenCost
-  }
-]
-const columnsDetail = [
-  {
-    title: '日期',
-    dataIndex: 'statDate',
-    key: 'statDate',
-    align: 'center'
-  },
-  {
-    title: '花费',
-    dataIndex: 'cost',
-    key: 'cost',
-    align: 'center'
-  },
-  {
-    title: '封面曝光数',
-    dataIndex: 'photoShow',
-    key: 'photoShow',
-    align: 'center'
-  },
-  {
-    title: '封面点击数',
-    dataIndex: 'photoClick',
-    key: 'photoClick',
-    align: 'center'
-  },
-  {
-    title: '素材曝光数',
-    dataIndex: 'aclick',
-    key: 'aclick',
-    align: 'center'
-  },
-  {
-    title: '行为数',
-    dataIndex: 'bclick',
-    key: 'bclick',
-    align: 'center'
-  },
-  {
-    title: '封面点击率',
-    dataIndex: 'photoClickRatio',
-    key: 'photoClickRatio',
-    align: 'center',
-    scopedSlots: {
-      customRender: 'photoClickRatio'
-    }
-  },
-  {
-    title: '行为率',
-    dataIndex: 'actionRatio',
-    key: 'actionRatio',
-    align: 'center',
-    scopedSlots: {
-      customRender: 'actionRatio'
-    }
-  },
-
-  {
-    title: '均千次封面曝光花费(元)',
-    dataIndex: 'impression1kCost',
-    key: 'impression1kCost',
-    scopedSlots: {
-      customRender: 'impression1kCost'
-    },
-    align: 'center'
-  },
-  {
-    title: '平均封面点击单价(元)',
-    dataIndex: 'photoClickCost',
-    key: 'photoClickCost',
-    scopedSlots: {
-      customRender: 'photoClickCost'
-    },
-    align: 'center'
-  },
-  {
-    title: '平均行为单价(元)',
-    dataIndex: 'actionCost',
-    key: 'actionCost',
-    scopedSlots: {
-      customRender: 'actionCost'
-    },
-    align: 'center'
-  },
-  {
-    title: '转化数',
-    dataIndex: 'conversions',
-    key: 'conversions',
-    align: 'center'
-  },
-  {
-    title: '转化单价(元)',
-    dataIndex: 'conversionPrice',
-    key: 'conversionPrice',
-    scopedSlots: {
-      customRender: 'conversionPrice'
-    },
-    align: 'center'
-  }
-]
-export default {
-  name: 'data-display-statistics',
-  components: {
-    ACol,
-    ARow,
-    countTo,
-    lifting,
-    timeCheck,
-    ratioModal,
-    Treeselect
-  },
-  mixins: [JeecgListMixin],
-  data: function() {
-    return {
-      title: '头条账户素材报表',
-      show: true,
-      timeList: [
-        { label: '今天', value: 1, show: true },
-        { label: '昨天', value: 2, show: true },
-        { label: '近一周', value: 3, show: true },
-        { label: '近十五天', value: 4, show: true },
-        { label: '近一月', value: 5, show: true },
-        { label: '近三月', value: 6, show: true },
-        { label: '近半年', value: 7, show: true },
-        { label: '近一年', value: 8, show: true }
-      ],
-      active: 1,
-      data: [],
-      columns,
-      columnsDetail,
-      list: [],
-      appId: [],
-      startValue: [],
-      allValue: [],
-      loading: false,
-      rowClick: record => ({
-        // 事件
-        on: {
-          click: () => {
-            // 点击改行时要做的事情
-            // this.detail = record
-            // this.visible = true
-            // this.getMineList(record.signature)
-            // this.$refs.ratio.getMineList(record, this.active)
-          }
-        }
-      })
-    }
-  },
-  filters: {
-    formatDate: function(value) {
-      let date = new Date(value)
-      let y = date.getFullYear()
-      let MM = date.getMonth() + 1
-      MM = MM < 10 ? '0' + MM : MM
-      let d = date.getDate()
-      d = d < 10 ? '0' + d : d
-      let h = date.getHours()
-      h = h < 10 ? '0' + h : h
-      let m = date.getMinutes()
-      m = m < 10 ? '0' + m : m
-      let s = date.getSeconds()
-      s = s < 10 ? '0' + s : s
-      return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s
-    },
-    toFixtwo: function(value) {
-      if (value) {
-        return value.toFixed(2)
-      } else {
-        return 0.0
-      }
-    },
-    getBo: function(value) {
-      if (value) {
-        return (value * 100).toFixed(2) + '%'
-      } else {
-        return '0.00%'
-      }
-    }
-  },
-  methods: {
-    moment,
-    ...mapGetters(['nickname', 'avatar', 'userInfo']),
-    disabledDate(current) {
-      return current && current > moment().endOf('day')
-    },
-    handleChange(value) {
-      console.log(value)
-      //   this.appId = value
-    },
-    getElseData(value) {
-      this.getStatistics()
-    },
-    handleBlur() {
-      console.log('blur')
-    },
-    getDataReset() {
-      this.addUser()
-    },
-    getDataResetAll() {
-      this.active = 1
-      this.allValue = []
-      this.appId = []
-      this.data = []
-    },
-    getCompanyReport(type) {
-      this.ipagination.current = 1
-      this.loading = true
-      var date = new Date()
-      var params = {}
-      params.userId = this.userInfo().id
-      params.accountIds = JSON.stringify(this.appId)
-      switch (type) {
-        case 1:
-          params.startDate = moment(new Date()).format('YYYY-MM-DD')
-          params.endDate = moment(new Date()).format('YYYY-MM-DD')
-          break
-        case 2:
-          params.startDate = this.$getDay(-1)
-          params.endDate = this.$getDay(-1)
-          break
-        case 3:
-          params.startDate = this.$getDay(-7)
-          params.endDate = this.$getDay(-1)
-          break
-        case 4:
-          params.startDate = this.$getDay(-15)
-          params.endDate = this.$getDay(-1)
-          break
-        case 5:
-          params.startDate = this.$getDay(-30)
-          params.endDate = this.$getDay(-1)
-          break
-        case 6:
-          params.startDate = this.$getDay(-90)
-          params.endDate = this.$getDay(-1)
-          break
-        case 7:
-          params.startDate = this.$getDay(-180)
-          params.endDate = this.$getDay(-1)
-          break
-        case 8:
-          params.startDate = this.$getDay(-365)
-          params.endDate = this.$getDay(-1)
-          break
-        case 9:
-          params.startDate = moment(this.startValue[0]._d).format('YYYY-MM-DD')
-          params.endDate = moment(this.startValue[1]._d).format('YYYY-MM-DD')
-          break
-      }
-
-      postAction('/ctop/bytedanceCreativeDailyReport/bytedanceCreativeAccountReportList', params).then(res => {
-        if (res.success) {
-          if (res.result.length > 0) {
-            this.data = res.result.map((item, index) => {
-              return {
-                ...item,
-                key: index
-              }
-            })
-            this.ipagination.total = res.result.length
-          } else {
-            this.$message.error('选择的账户无数据')
-          }
-          this.loading = false
-        } else {
-          this.$message.error(res.message)
-          this.loading = false
-        }
-      })
-    },
-    addUser() {
-      if (this.appId.length > 0) {
-        this.loading = true
-        this.getCompanyReport(this.active)
-      } else {
-        this.$message.error('请选择账户以及时间')
-        return
-      }
-    },
-    getStatistics() {
-      var params = {}
-      params.accountIds = JSON.stringify(this.appId)
-      params.type = this.active
-      params.statHour = this.statHour
-      params.discount = this.discount
-      if (this.active == 9) {
-        params.startDate = this.allValue[0]
-        params.endDate = this.allValue[1]
-      }
-      this.data = []
-    },
-    getAdd(checked) {
-      if (checked == 9) {
-        if (this.startValue.length > 0 && this.startValue[0]) {
-          this.allValue[0] = moment(this.startValue[0]._d).format('YYYY-MM-DD')
-          this.allValue[1] = moment(this.startValue[1]._d).format('YYYY-MM-DD')
-        }
-      } else {
-        this.startValue = []
-        this.allValue = []
-      }
-      this.active = checked
-      active = checked
-      this.ipagination.current = 1
-    },
-    dianji() {
-      this.$router.replace({
-        path: '/Statistics/toutiaoMaterialStatistics'
-      })
-    }
-  },
-  watch: {},
-  distoryed() {},
-  mounted: function() {
-    this.$nextTick(() => {})
-  }
-}
-</script>

+ 0 - 582
src/views/modules/Statistics/toutiaoMaterialStatistics.vue

@@ -1,582 +0,0 @@
-<style lang="scss" scoped>
-.search-bar {
-  display: flex;
-  align-items: center;
-}
-
-.search-box p {
-  display: inline-block;
-  border: 1px solid #f2f2f2;
-  border-radius: 5px;
-  margin-right: 10px;
-  padding: 5px 10px;
-  cursor: pointer;
-}
-</style>
-<style>
-/* .data-display-statistics .ant-card-body {
-  padding: 0 15px;
-} */
-.toutiao-material-statistics .search-box .ant-card-body {
-  display: flex;
-}
-
-.data-display-statistics .ant-col-6 {
-  margin: 10px 0;
-}
-
-.data-display-statistics .ant-col-6 .ant-card-body {
-  display: flex;
-  justify-content: center;
-}
-
-.data-display-statistics .ant-col-6 p,
-.data-display-statistics .ant-col-6 span {
-  text-align: center;
-  line-height: 40px;
-  font-size: 30px;
-  font-weight: 600;
-  color: red;
-  margin: 0;
-}
-
-.search-box .ant-card-body {
-  padding: 5px 15px;
-}
-
-.data-display-statistics .ant-col-6 .ant-card-body .styleElse {
-  line-height: 60px;
-  height: 40px;
-  font-size: 16px;
-  font-weight: 400;
-  margin-left: 10px;
-}
-
-.ant-modal-wrap .yincang .ant-modal-content .ant-modal-footer {
-  display: none !important;
-}
-
-.yincang .ant-col-6 p {
-  text-align: left;
-  color: red;
-  font-size: 16px;
-  font-weight: 500;
-}
-
-.ant-table-thead div {
-  font-weight: 700;
-}
-
-.tool-tip {
-  position: absolute;
-  top: 65px;
-  right: 10px;
-}
-
-.ant-table-thead tr th {
-  background: none;
-}
-
-/* th div {
-  white-space: nowrap;
-} */
-</style>
-<template>
-  <div class="toutiao-material-statistics">
-    <a-row class="image-list-heading vm-panel">
-      <div class="panel-heading" style="display:flex;justify-content: space-between;">
-        {{ title }}
-        <a-button @click="dianji">进入账户报表</a-button>
-      </div>
-      <a-row>
-        <a-col :span="24">
-          <a-card :bordered="false" class="search-box" style="display:flex">
-            <p
-              :style="active == item.value ? 'color:cornflowerblue;background:#f2f2f2' : ''"
-              v-for="(item, index) of timeList"
-              :key="index"
-              @click="getAdd(item.value)"
-            >
-              {{ item.label }}
-            </p>
-            <a-range-picker
-              style="width:400px"
-              :disabledDate="disabledDate"
-              :showTime="{
-                hideDisabledOptions: true
-              }"
-              format="YYYY-MM-DD"
-              v-model="startValue"
-              @ok="getAdd(9)"
-            />
-            <a-button type="primary" style="margin-left:10px" @click="getCompanyReport(active)">搜索</a-button>
-            <a-button type="primary" style="margin-left:10px" @click="getDataResetAll">重置</a-button>
-          </a-card>
-        </a-col>
-      </a-row>
-    </a-row>
-    <a-row :gutter="10" style="margin-top:10px">
-      <a-col :span="24">
-        <a-card style="width:100%;">
-          <a-table
-            :columns="columns"
-            :dataSource="data"
-            bordered
-            id="outTable"
-            :pagination="ipagination"
-            size="middle"
-            :customRow="rowClick"
-            :loading="loading"
-            :scroll="{ x: 2000 }"
-          >
-            <div slot="videoUrl" slot-scope="videoUrl">
-              <video @click.stop class="video" :src="videoUrl" controls="controls" style="height:200px;width:112.5px">
-                您的浏览器不支持 video 标签。
-              </video>
-            </div>
-            <!-- <span slot="photoClickRatio" slot-scope="photoClickRatio">{{ photoClickRatio | getBo }}</span>
-            <span slot="actionRatio" slot-scope="actionRatio">{{ actionRatio | getBo }}</span>
-            <span slot="impression1kCost" slot-scope="impression1kCost">{{ impression1kCost | toFixtwo }}</span>
-            <span slot="photoClickCost" slot-scope="photoClickCost">{{ photoClickCost | toFixtwo }}</span>
-            <span slot="actionCost" slot-scope="actionCost">{{ actionCost | toFixtwo }}</span>
-            <span slot="conversionPrice" slot-scope="conversionPrice">{{ conversionPrice | toFixtwo }}</span> -->
-          </a-table>
-        </a-card>
-      </a-col>
-    </a-row>
-
-    <!-- <ratio-modal ref="ratio" /> -->
-  </div>
-</template>
-
-<script>
-import ARow from 'ant-design-vue/es/grid/Row'
-import ACol from 'ant-design-vue/es/grid/Col'
-import moment from 'moment'
-import { getKuaiShouMaterialMarket, getKuaiShouChainRatio } from '@api/statistics'
-
-import { getAction, postAction, postFile, downFile, downFilePost, deleteAction } from '@/api/manage'
-import axios from 'axios'
-import { mapGetters } from 'vuex'
-import { stopOtherVideo, closeAllVideoFun } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
-
-import timeCheck from './components/timeCheck'
-import ratioModal from './components/ratioModal'
-
-import { JeecgListMixin } from '@/mixins/ipagination'
-
-var length = 0
-var active = 1
-const columns = [
-  {
-    title: '视频',
-    dataIndex: 'videoUrl',
-    key: 'videoUrl',
-    align: 'center',
-    scopedSlots: {
-      customRender: 'videoUrl'
-    }
-  },
-  {
-    title: '花费',
-    dataIndex: 'cost',
-    key: 'cost',
-    align: 'center',
-    sorter: (a, b) => a.cost - b.cost
-  },
-  {
-    title: '展示量',
-    dataIndex: 'showNum',
-    key: 'showNum',
-    align: 'center',
-    sorter: (a, b) => a.showNum - b.showNum
-  },
-  {
-    title: '点击量',
-    dataIndex: 'click',
-    key: 'click',
-    align: 'center',
-    sorter: (a, b) => a.click - b.click
-  },
-  {
-    title: '转化量',
-    dataIndex: 'convertNum',
-    key: 'convertNum',
-    align: 'center',
-    sorter: (a, b) => a.convertNum - b.convertNum
-  },
-  {
-    title: '应用下载-激活',
-    dataIndex: 'active',
-    key: 'active',
-    align: 'center',
-    sorter: (a, b) => a.active - b.active
-  },
-  {
-    title: '应用下载-安卓下载完成',
-    dataIndex: 'downloadFinish',
-    key: 'downloadFinish',
-    align: 'center',
-    sorter: (a, b) => a.downloadFinish - b.downloadFinish
-  },
-  {
-    title: '应用下载-点击安装数',
-    dataIndex: 'clickInstall',
-    key: 'clickInstall',
-    align: 'center',
-    sorter: (a, b) => a.clickInstall - b.clickInstall
-  },
-  {
-    title: '应用下载-付费',
-    dataIndex: 'inAppPay',
-    key: 'inAppPay',
-    align: 'center',
-    sorter: (a, b) => a.inAppPay - b.inAppPay
-  },
-  {
-    title: '总播放',
-    dataIndex: 'totalPlay',
-    key: 'totalPlay',
-    align: 'center',
-    sorter: (a, b) => a.totalPlay - b.totalPlay
-  },
-  {
-    title: '有效播放',
-    dataIndex: 'validPlay',
-    key: 'validPlay',
-    align: 'center',
-    sorter: (a, b) => a.validPlay - b.validPlay
-  },
-  {
-    title: 'wifi播放',
-    dataIndex: 'wifiPlay',
-    key: 'wifiPlay',
-    align: 'center',
-    sorter: (a, b) => a.wifiPlay - b.wifiPlay
-  },
-  {
-    title: '播放100%进度总数',
-    dataIndex: 'play100FeedBreak',
-    key: 'play100FeedBreak',
-    align: 'center',
-    sorter: (a, b) => a.play100FeedBreak - b.play100FeedBreak
-  },
-  {
-    title: '播放75%进度总数',
-    dataIndex: 'play75FeedBreak',
-    key: 'play75FeedBreak',
-    align: 'center',
-    sorter: (a, b) => a.play75FeedBreak - b.play75FeedBreak
-  },
-  {
-    title: '评论数',
-    dataIndex: 'comment',
-    key: 'comment',
-    align: 'center',
-    sorter: (a, b) => a.comment - b.comment
-  },
-  {
-    title: '平均次留数',
-    dataIndex: 'nextDayOpen',
-    key: 'nextDayOpen',
-    align: 'center',
-    sorter: (a, b) => a.nextDayOpen - b.nextDayOpen
-  },
-  {
-    title: '平均次留率(%)',
-    dataIndex: 'nextDayOpenRate',
-    key: 'nextDayOpenRate',
-    align: 'center',
-    sorter: (a, b) => a.nextDayOpenRate - b.nextDayOpenRate
-  },
-  {
-    title: '平均次留成本(元)',
-    dataIndex: 'nextDayOpenCost',
-    key: 'nextDayOpenCost',
-    align: 'center',
-    sorter: (a, b) => a.nextDayOpenCost - b.nextDayOpenCost
-  }
-]
-const columnsDetail = [
-  {
-    title: '日期',
-    dataIndex: 'statDate',
-    key: 'statDate',
-    align: 'center'
-  },
-  {
-    title: '花费',
-    dataIndex: 'cost',
-    key: 'cost',
-    align: 'center'
-  },
-  {
-    title: '封面曝光数',
-    dataIndex: 'photoShow',
-    key: 'photoShow',
-    align: 'center'
-  },
-  {
-    title: '封面点击数',
-    dataIndex: 'photoClick',
-    key: 'photoClick',
-    align: 'center'
-  },
-  {
-    title: '素材曝光数',
-    dataIndex: 'aclick',
-    key: 'aclick',
-    align: 'center'
-  },
-  {
-    title: '行为数',
-    dataIndex: 'bclick',
-    key: 'bclick',
-    align: 'center'
-  },
-  {
-    title: '封面点击率',
-    dataIndex: 'photoClickRatio',
-    key: 'photoClickRatio',
-    align: 'center',
-    scopedSlots: {
-      customRender: 'photoClickRatio'
-    }
-  },
-  {
-    title: '行为率',
-    dataIndex: 'actionRatio',
-    key: 'actionRatio',
-    align: 'center',
-    scopedSlots: {
-      customRender: 'actionRatio'
-    }
-  },
-
-  {
-    title: '均千次封面曝光花费(元)',
-    dataIndex: 'impression1kCost',
-    key: 'impression1kCost',
-    scopedSlots: {
-      customRender: 'impression1kCost'
-    },
-    align: 'center'
-  },
-  {
-    title: '平均封面点击单价(元)',
-    dataIndex: 'photoClickCost',
-    key: 'photoClickCost',
-    scopedSlots: {
-      customRender: 'photoClickCost'
-    },
-    align: 'center'
-  },
-  {
-    title: '平均行为单价(元)',
-    dataIndex: 'actionCost',
-    key: 'actionCost',
-    scopedSlots: {
-      customRender: 'actionCost'
-    },
-    align: 'center'
-  },
-  {
-    title: '转化数',
-    dataIndex: 'conversions',
-    key: 'conversions',
-    align: 'center'
-  },
-  {
-    title: '转化单价(元)',
-    dataIndex: 'conversionPrice',
-    key: 'conversionPrice',
-    scopedSlots: {
-      customRender: 'conversionPrice'
-    },
-    align: 'center'
-  }
-]
-export default {
-  name: 'data-display-statistics',
-  components: {
-    ACol,
-    ARow,
-    timeCheck,
-    ratioModal
-  },
-  mixins: [JeecgListMixin],
-  data: function() {
-    return {
-      title: '头条素材大盘报表',
-      columns,
-      columnsDetail,
-      data: [],
-      active: 1,
-      pagin: 1,
-      allValue: [],
-      startValue: [],
-      visible: false,
-      showVideo: false,
-      detail: null,
-      dataDetail: [],
-      dataYestodayDetail: [],
-      dataChainRatio: [],
-      loading: false,
-      timeList: [
-        { label: '今天', value: 1, show: true },
-        { label: '昨天', value: 2, show: true },
-        { label: '近一周', value: 3, show: true },
-        { label: '近十五天', value: 4, show: true },
-        { label: '近一月', value: 5, show: true },
-        { label: '近三月', value: 6, show: true },
-        { label: '近半年', value: 7, show: true },
-        { label: '近一年', value: 8, show: true }
-      ],
-      rowClick: record => ({
-        // 事件
-        on: {
-          click: () => {
-            // 点击改行时要做的事情
-            // this.detail = record
-            // this.visible = true
-            // this.getMineList(record.signature)
-            //   this.$refs.ratio.getMineList(record, this.active)
-          }
-        }
-      })
-    }
-  },
-  filters: {
-    formatDate: function(value) {
-      let date = new Date(value)
-      let y = date.getFullYear()
-      let MM = date.getMonth() + 1
-      MM = MM < 10 ? '0' + MM : MM
-      let d = date.getDate()
-      d = d < 10 ? '0' + d : d
-      let h = date.getHours()
-      h = h < 10 ? '0' + h : h
-      let m = date.getMinutes()
-      m = m < 10 ? '0' + m : m
-      let s = date.getSeconds()
-      s = s < 10 ? '0' + s : s
-      return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s
-    },
-    toFixtwo: function(value) {
-      if (value) {
-        return value.toFixed(2)
-      } else {
-        return 0.0
-      }
-    },
-    getBo: function(value) {
-      if (value) {
-        return (value * 100).toFixed(2) + '%'
-      } else {
-        return '0.00%'
-      }
-    }
-  },
-  methods: {
-    handleOk() {
-      this.visible = false
-    },
-    ...mapGetters(['nickname', 'avatar', 'userInfo']),
-    moment,
-    disabledDate(current) {
-      return current && current > moment().endOf('day')
-    },
-    getAdd(checked) {
-      // /report/kuaishouReportDailyAgentSum/companyReport
-      if (checked != 9) {
-        this.startValue = []
-      }
-      this.active = checked
-      //   this.getCompanyReport(checked)
-    },
-    getCompanyReport(type) {
-      this.ipagination.current = 1
-      this.loading = true
-      var date = new Date()
-      var params = {}
-      params.userId = this.userInfo().id
-      switch (type) {
-        case 1:
-          params.startDate = moment(new Date()).format('YYYY-MM-DD')
-          params.endDate = moment(new Date()).format('YYYY-MM-DD')
-          break
-        case 2:
-          params.startDate = this.$getDay(-1)
-          params.endDate = this.$getDay(-1)
-          break
-        case 3:
-          params.startDate = this.$getDay(-7)
-          params.endDate = this.$getDay(-1)
-          break
-        case 4:
-          params.startDate = this.$getDay(-15)
-          params.endDate = this.$getDay(-1)
-          break
-        case 5:
-          params.startDate = this.$getDay(-30)
-          params.endDate = this.$getDay(-1)
-          break
-        case 6:
-          params.startDate = this.$getDay(-90)
-          params.endDate = this.$getDay(-1)
-          break
-        case 7:
-          params.startDate = this.$getDay(-180)
-          params.endDate = this.$getDay(-1)
-          break
-        case 8:
-          params.startDate = this.$getDay(-365)
-          params.endDate = this.$getDay(-1)
-          break
-        case 9:
-          params.startDate = moment(this.startValue[0]._d).format('YYYY-MM-DD')
-          params.endDate = moment(this.startValue[1]._d).format('YYYY-MM-DD')
-          break
-      }
-      this.params = params
-      postAction('/ctop/bytedanceCreativeDailyReport/bytedanceCreativeDailyReportList', params).then(res => {
-        if (res.success) {
-          this.data = res.result.map((item, index) => {
-            return {
-              key: index,
-              ...item
-            }
-          })
-          this.loading = false
-          this.ipagination.total = res.result.length
-        } else {
-          this.$message.error(res.message)
-          this.loading = false
-        }
-      })
-    },
-    getDataResetAll() {
-      this.startValue = []
-      this.allValue = []
-      this.getCompanyReport(1)
-      this.active = 1
-      this.data = []
-    },
-    dianji() {
-      this.$router.replace({
-        path: '/Statistics/toutiaoAccountMaterStatistics'
-      })
-    }
-  },
-  watch: {},
-  distoryed() {},
-  updated() {
-    stopOtherVideo()
-  },
-  mounted: function() {
-    this.$nextTick(() => {
-      this.getCompanyReport(1)
-    })
-  }
-}
-</script>

+ 0 - 195
src/views/modules/achievements/adminDetail.vue

@@ -1,195 +0,0 @@
-<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>
-          </a-table>
-        </a-card>
-      </a-col>
-    </a-row>
-  </div>
-</template>
-
-<script>
-import ACol from 'ant-design-vue/es/grid/Col'
-import ATooltip from 'ant-design-vue/es/tooltip/Tooltip'
-
-import { getAction, postAction } from '@/api/manage'
-import { mapGetters } from 'vuex'
-
-import qs from 'qs'
-
-const columns = [
-  {
-    title: '视频',
-    dataIndex: 'url',
-    key: 'url',
-    align: 'center',
-    scopedSlots: {
-      customRender: 'url'
-    },
-    width: 200
-  },
-  {
-    title: '素材名称',
-    dataIndex: 'materialName',
-    key: 'materialName',
-    align: 'center'
-  },
-  {
-    title: '水印素材名称',
-    dataIndex: 'watermarkMaterialName',
-    key: 'watermarkMaterialName',
-    align: 'center'
-  },
-  {
-    title: 'md5',
-    dataIndex: 'code',
-    key: 'code',
-    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: '工作台',
-      loading: false,
-      rankList: [],
-      tabListNoTitle: [
-        {
-          key: 'kuaishou',
-          tab: '快手'
-        },
-        {
-          key: 'toutiao',
-          tab: '头条'
-        }
-      ],
-      noTitleKey: 'kuaishou',
-      a: '',
-      columns: columns,
-      dataList: []
-    }
-  },
-  methods: {
-    ...mapGetters(['nickname', 'avatar', 'userInfo'])
-  },
-  created() {
-    var userId = localStorage.getItem('detailUserId')
-    var appType = localStorage.getItem('appType') == 'kuaishou' ? 2 : 1
-    var type = localStorage.getItem('roleData')
-    if (type == 1) {
-      this.columns = columns
-      postAction('/ctop/performance2/getEffiVideoList', {
-        year: '',
-        quarter: '',
-        userId: userId,
-        appType: appType
-      }).then(res => {
-        if (res.success) {
-          this.dataList = res.result.map((item, index) => {
-            return {
-              ...item,
-              key: index
-            }
-          })
-        } else {
-          this.$message.error(res.message)
-        }
-      })
-    } else if (type == 2) {
-      this.columns = columnsYou
-      if (appType == 2) {
-        postAction('/ctop/performance2/getKuaiShouYouhuaAccountsList', {
-          startDate: '',
-          endDate: '',
-          userId: userId,
-          appType: appType
-        }).then(res => {
-          if (res.success) {
-            this.dataList = res.result.map((item, index) => {
-              return {
-                ...item,
-                key: index
-              }
-            })
-          } else {
-            this.$message.error(res.message)
-          }
-        })
-      } else {
-        postAction('/ctop/performance2/getToutiaoYouhuaAccountsList', {
-          startDate: '',
-          endDate: '',
-          userId: userId,
-          appType: appType
-        }).then(res => {
-          if (res.success) {
-            this.dataList = res.result.map((item, index) => {
-              return {
-                ...item,
-                key: index
-              }
-            })
-          } else {
-            this.$message.error(res.message)
-          }
-        })
-      }
-    }
-  }
-}
-</script>

+ 0 - 280
src/views/modules/achievements/adminInfo.vue

@@ -1,280 +0,0 @@
-<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:300px;margin-bottom:30px"
-            placeholder="请选择角色类型"
-            v-model="type"
-            @change="getData"
-          >
-            <a-select-option :value="1">设计</a-select-option>
-            <a-select-option :value="2">优化</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.effiVideoCount == 0" @click="toDetail(record)">查看详情</a>
-            </span>
-          </a-table>
-        </a-card>
-      </a-col>
-    </a-row>
-  </div>
-</template>
-
-<script>
-import ACol from 'ant-design-vue/es/grid/Col'
-import ATooltip from 'ant-design-vue/es/tooltip/Tooltip'
-
-import { getAction, postAction } from '@/api/manage'
-import { mapGetters } from 'vuex'
-
-import qs from 'qs'
-
-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: 'effiVideoCount',
-    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: '工作台',
-      loading: false,
-      rankList: [],
-      tabListNoTitle: [
-        {
-          key: 'kuaishou',
-          tab: '快手'
-        },
-        {
-          key: 'toutiao',
-          tab: '头条'
-        }
-      ],
-      noTitleKey: 'kuaishou',
-      a: '',
-      columns: columns,
-      dataList: []
-    }
-  },
-  methods: {
-    ...mapGetters(['nickname', 'avatar', 'userInfo']),
-    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()
-        }
-      }
-    },
-    getData(data) {
-      this.dataList = []
-      this.loading = false
-    },
-    onTabChange(key, type) {
-      console.log(key, type)
-      this.type = 1
-      this.columns = columns
-      this[type] = key
-      this.dataList = []
-      this.loading = false
-      // if (key == 'kuaishou') {
-      //   this.getKuaishouList()
-      // } else if (key == 'toutiao') {
-      //   this.getToutiaoList()
-      // }
-    },
-    toDetail(item) {
-      localStorage.setItem('detailUserId', item.userId)
-      localStorage.setItem('appType', this.noTitleKey)
-      localStorage.setItem('roleData', this.type)
-      this.$router.replace({
-        path: '/achievements/adminDetail'
-      })
-    },
-    getKuaishouList() {
-      postAction('/ctop/performance2/kuaishouPerformanceInfoNow', '').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)
-        }
-      })
-    },
-
-    getToutiaoList() {
-      postAction('/ctop/performance2/toutiaoPerformanceInfoNow', '').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)
-        }
-      })
-    },
-    getKuaishouYouHuaList() {
-      postAction('/ctop/performance2/kuaishouYouhuaPerformanceInfoNow', '').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)
-        }
-      })
-    },
-    getToutiaoYouHuaList() {
-      postAction('/ctop/performance2/toutiaoYouhuaPerformanceInfoNow', '').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()
-  }
-}
-</script>

+ 4 - 3
src/views/modules/advertiser/UserAllocationList.vue

@@ -75,8 +75,8 @@
           <a-divider type="vertical" />
           <a @click="handleEdit(record)">编辑</a>
 
-          <a-divider type="vertical" />
-          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+          <a-divider type="vertical" v-show="roleCode == 'admin'"/>
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"  v-show="roleCode == 'admin'">
             <a>删除</a>
           </a-popconfirm>
         </span>
@@ -248,7 +248,8 @@
         projectId: '',
         accountId: '',
         mediaId: '',
-        form: this.$form.createForm(this)
+        form: this.$form.createForm(this),
+        roleCode:localStorage.getItem('roleCode')
       }
     },
     computed: {

+ 5 - 1
src/views/modules/kuaishouapp/account/accountIndex.vue

@@ -12,7 +12,7 @@
   <div class="account-index">
     <a-row class="image-list-heading vm-panel">
       <a-col :span="24" style="display:flex">
-        <Treeselect :appId.sync="appId" :multiple="false" style="margin:8px 20px" />
+        <Treeselect :appId.sync="appId" :multiple="false" ref="treeSelect" style="margin:8px 20px" />
         <a-button type="primary" style="margin:10px" @click="addUser">搜索</a-button>
       </a-col>
     </a-row>
@@ -379,6 +379,8 @@ export default {
     toDetail(record) {
       localStorage.setItem('advertisingGroupKey', record.campaignId)
       localStorage.setItem('accountId', this.appId)
+
+      getAction('/kuaishou/batch/getAsyncCreativeList',{campaignId:record.campaignId,accountId:this.appId}).then()
       if (localStorage.getItem('advertisingGroup')) {
         var dataElse = JSON.parse(localStorage.getItem('advertisingGroup'))
         console.log(dataElse)
@@ -419,6 +421,7 @@ export default {
         postAction('/kuaishou/batch/campaignCreate', params).then(res => {
           if (res.success) {
             this.jihua = true
+            this.loadingGroup = false
             this.refuseReason = ''
             this.unitId = ''
             // 7156834
@@ -641,6 +644,7 @@ export default {
   computed: {},
   activated() {
     this.manyTwo = this.many
+    this.$refs.treeSelect.getParticipateList()
   }
 }
 </script>

+ 135 - 36
src/views/modules/kuaishouapp/account/advertisingGroup.vue

@@ -12,6 +12,15 @@
   .advertising-group .ant-table td {
     white-space: nowrap;
   }
+
+  .ant-tabs {
+    overflow: visible;
+  }
+
+  .else-table {
+    display: table;
+    margin-top: 10px
+  }
 </style>
 <template>
   <div class="advertising-group">
@@ -22,20 +31,27 @@
           <a-tab-pane v-for="pane in title" :tab="pane.tab" :key="pane.key">
             <a-button @click="dianji" style="margin-bottom:15px;">新增广告组</a-button>
             <a-button @click="showEdit = true" style="margin:0 0 15px 15px;">列表项筛选</a-button>
-
             <div v-show="selectedRowKeys.length > 0">
               批量修改预算:
               <a-input-number :min="-1" :step="0.1" v-model="allMoney" style="width:150px" @fouse.stop />
               <a-button @click="editMoney" style="margin:0 15px 15px 15px" type="primary">修改</a-button>
 
               批量修改出价:
-              <a-select style="width: 120px" v-model="allPrice">
+              <a-select style="width: 120px" v-model="allPrice" @change="changePrice">
                 <a-select-option value="1">比例</a-select-option>
                 <a-select-option value="2">出价</a-select-option>
               </a-select>
               <a-input-number :min="-1" :step="0.1" v-model="allMoneyBidProportion" style="width:150px" @fouse.stop
                 v-if="allPrice == '1'" />
-              <a-input-number :min="0" :step="0.01" v-model="allMoneyBid" style="width:150px" @fouse.stop v-else />
+              <div v-else style="display:inline-block">
+                <a-input-number :min="0" :step="0.01" v-model="allMoneyBid" placeholder="请输入修改的出价" style="width:200px"
+                  @fouse.stop />
+                <a-input-number v-if="showDeepBid" class="else-table" :min="0" :step="0.01" v-model="deepConversionBid"
+                  placeholder="请输入修改的深度转化出价" style="width:200px" @fouse.stop />
+                <span class="else-table" v-if="allMoneyBid&&deepConversionBid">当前目标深度转化率为:
+                  {{allMoneyBid&&deepConversionBid?((allMoneyBid/deepConversionBid)*100).toFixed(2)+'%':''}}</span>
+              </div>
+
               <a-button @click="editMoneyBid" style="margin:0 15px 15px 15px" type="primary">修改</a-button>
 
               批量操作:
@@ -54,15 +70,16 @@
             </a-modal>
 
             <a-table size="middle" :columns="columns" :dataSource="dataList" bordered :customRow="rowClick"
-              :pagination="ipagination" :scroll="{ x: 3500 }" :rowSelection="{
+              :pagination="ipagination" :scroll="{ x: 2500 }" :rowSelection="{
                 selectedRowKeys: selectedRowKeys,
                 onChange: onSelectChange
-              }">
+              }" style="margin-top:30px">
               <!-- getCheckboxProps: getCheckboxProps -->
               <a slot="unitName" slot-scope="text, record" @click="toDetail(record)">{{ text }}</a>
               <span slot="action" slot-scope="text, record">
                 <a-switch v-model="record.showSwich" @change="onChangeSwitch(record)" />
               </span>
+              <span slot="deepConversionType" slot-scope="text,record">{{text|deepConversionType}}</span>
               <span slot="actionTwo" slot-scope="text, record">
                 <a @click="editDetail(record)">编辑</a>
                 <a-divider type="vertical" />
@@ -233,6 +250,27 @@
         customRender: 'action'
       }
     },
+
+    {
+      title: '广告组名称',
+      align: 'center',
+      dataIndex: 'unitName',
+      scopedSlots: {
+        customRender: 'unitName'
+      },
+      fixed: 'left',
+      width: 250
+    },
+    {
+      title: '操作',
+      align: 'center',
+      dataIndex: 'actionTwo',
+      fixed: 'left',
+      width: 200,
+      scopedSlots: {
+        customRender: 'actionTwo'
+      }
+    },
     {
       title: '预算',
       align: 'center',
@@ -242,7 +280,7 @@
         customRender: 'dayBudget'
       },
       width: 150,
-      fixed: 'left'
+
     },
     {
       title: '出价',
@@ -252,27 +290,46 @@
         customRender: 'bid'
       },
       width: 150,
-      fixed: 'left'
     },
     {
-      title: '广告组名称',
+      title: '深度转化类型',
       align: 'center',
-      dataIndex: 'unitName',
+      dataIndex: 'deepConversionType',
       scopedSlots: {
-        customRender: 'unitName'
+        customRender: 'deepConversionType'
       },
-      fixed: 'left',
-      width: 250
-    },
-    {
-      title: '操作',
-      align: 'center',
-      dataIndex: 'actionTwo',
-      fixed: 'left',
-      width: 200,
-      scopedSlots: {
-        customRender: 'actionTwo'
-      }
+      filters: [{
+          text: '未使用',
+          value: '0'
+        },
+        {
+          text: '付费',
+          value: '3'
+        }, {
+          text: '次日留存',
+          value: '7'
+        }, {
+          text: '完件',
+          value: '10'
+        }, {
+          text: '授信',
+          value: '11'
+        }, {
+          text: '添加购物车',
+          value: '13'
+        }, {
+          text: '提交订单',
+          value: '14'
+        }, {
+          text: '购买联盟广告无门槛要求',
+          value: '15'
+        },
+      ],
+      onFilter: (value, record) =>
+        record.deepConversionType
+        .toString()
+        .toLowerCase()
+        .includes(value.toLowerCase()),
     },
     {
       title: '广告组状态',
@@ -407,15 +464,15 @@
         customRender: 'unitType'
       }
     },
-    {
-      title: '落地页链接',
-      align: 'center',
-      dataIndex: 'url',
+    // {
+    //   title: '落地页链接',
+    //   align: 'center',
+    //   dataIndex: 'url',
 
-      scopedSlots: {
-        customRender: 'url'
-      }
-    }
+    //   scopedSlots: {
+    //     customRender: 'url'
+    //   }
+    // }
   ]
 
   export default {
@@ -492,11 +549,13 @@
         checkAll: false,
         allMoney: 1.2,
         allMoneyBid: null,
+        deepConversionBid: null,
         allMoneyBidProportion: 1.2,
         allType: '1',
         allPrice: '1',
         maxBid: null,
-        copyData: null
+        copyData: null,
+        showDeepBid: false
       }
     },
     filters: {
@@ -581,6 +640,19 @@
           2: '淘宝商品itemID'
         }
         return data[sta]
+      },
+      deepConversionType(sta) {
+        var data = {
+          0: '未使用',
+          3: "付费",
+          7: "次日留存",
+          10: "完件",
+          11: "授信",
+          13: "添加购物车",
+          14: "提交订单",
+          15: "购买联盟广告无门槛要求"
+        }
+        return data[sta]
       }
     },
     methods: {
@@ -752,7 +824,6 @@
         } else {
           item.elseMoney = item.dayBudget / 1000
         }
-        console.log(item)
       },
       editStatus() {
         if (this.allType == '4') {
@@ -808,8 +879,35 @@
           }
         })
       },
+
+      changePrice() {
+        if (this.allPrice == '2') {
+          if (this.selectedRowKeys.length > 0) {
+            var arr = []
+            for (let i = 0; i < this.dataList.length; i++) {
+              for (let j = 0; j < this.selectedRowKeysValue.length; j++) {
+                if (this.dataList[i].unitId == this.selectedRowKeysValue[j]) {
+                  if (this.dataList[i].deepConversionType > 0) {
+                    arr.push(true)
+                  } else {
+                    arr = []
+                  }
+                }
+              }
+
+            }
+            if (arr.length > 0) {
+              this.showDeepBid = true
+            } else {
+              this.showDeepBid = false
+            }
+          }
+        }
+      },
       editMoneyBid() {
         if (this.allPrice == '2') {
+
+
           if (this.allMoneyBid < 1 || this.allMoneyBid > this.maxBid) {
             this.$message.error('不得低于1元,不得高于项目最高出价' + this.maxBid + '元')
             return
@@ -817,10 +915,10 @@
           var params = {}
           params.accountId = localStorage.getItem('accountId')
           params.bid = this.allMoneyBid * 1000
+          params.deepConversionBid = this.deepConversionBid ? this.deepConversionBid * 1000 : null
           params.userId = this.userInfo().id
           params.unitIds = this.selectedRowKeysValue
           postAction('/kuaishou/batch/batchUpdateUnitBid', params).then(res => {
-            console.log(res)
             if (res.success) {
               if (res.result.failCount > 0) {
                 this.visible = true
@@ -1020,7 +1118,7 @@
                   this.visibleCopy = false
                   this.loading = false
                   this.getDataList(localStorage.getItem('advertisingGroupKey'))
-                }, 1000)
+                }, 3000)
                 // this.getDataList(localStorage.getItem('advertisingGroupKey'))
               }
             })
@@ -1053,7 +1151,7 @@
                   this.visibleCopy = false
                   this.loading = false
                   this.getDataList(localStorage.getItem('advertisingGroupKey'))
-                }, 1000)
+                }, 3000)
 
                 // this.getDataList(localStorage.getItem('advertisingGroupKey'))
               }
@@ -1159,7 +1257,8 @@
       this.showList = this.columns.map(item => {
         return {
           label: item.title,
-          value: item.dataIndex
+          value: item.dataIndex,
+
         }
       })
       this.dataValue = this.columns.map(item => {

+ 1 - 1
src/views/modules/kuaishouapp/account/copyGroup.vue

@@ -564,7 +564,7 @@
                 unitName: dataJson.unitName,
                 unitNameCheck: false,
                 deepConversionType: dataJson.deepConversionType,
-                deepConversionBid: dataJson.deepConversionBid
+                deepConversionBid: dataJson.deepConversionBid/1000
               }]
 
               this.populationData = dataJson

ファイルの差分が大きいため隠しています
+ 538 - 497
src/views/modules/kuaishouapp/account/editAllGroup.vue


+ 2 - 2
src/views/modules/kuaishouapp/account/editGroup.vue

@@ -50,7 +50,7 @@
             }}
           </a-select-option>
         </a-select>
-        <a @click="addApplication" style="margin-left:10px">添加应用</a>
+        <!-- <a @click="addApplication" style="margin-left:10px">添加应用</a> -->
         <creat-application ref="application" />
       </a-form-item>
       <a-form-item
@@ -680,7 +680,7 @@ export default {
               unitName: unitNameCopy?unitNameCopy:dataJson.unitName,
               unitNameCheck: false,
               deepConversionType: dataJson.deepConversionType,
-              deepConversionBid: dataJson.deepConversionBid
+              deepConversionBid: dataJson.deepConversionBid/1000
             }
           ]
 

+ 275 - 257
src/views/modules/kuaishouapp/account/newMould.vue

@@ -1,26 +1,28 @@
 <style>
-#table_time_selected1 tr {
-  border: 1px solid rgb(102, 162, 243);
-}
+  #table_time_selected1 tr {
+    border: 1px solid rgb(102, 162, 243);
+  }
+
+  .plug-timer-grid th {
+    line-height: 25px;
+  }
+
+  .group-creat .ant-form-item-required::before {
+    display: inline-block;
+    margin-right: 4px;
+    color: #f5222d;
+    font-size: 14px;
+    font-family: SimSun, sans-serif;
+    line-height: 1;
+    content: '';
+  }
 
-.plug-timer-grid th {
-  line-height: 25px;
-}
-.group-creat .ant-form-item-required::before {
-  display: inline-block;
-  margin-right: 4px;
-  color: #f5222d;
-  font-size: 14px;
-  font-family: SimSun, sans-serif;
-  line-height: 1;
-  content: '';
-}
-.else-label .ant-form-item-label label::after {
-  content: '';
-  position: relative;
-  top: -0.5px;
-  margin: 0 8px 0 2px;
-}
+  .else-label .ant-form-item-label label::after {
+    content: '';
+    position: relative;
+    top: -0.5px;
+    margin: 0 8px 0 2px;
+  }
 </style>
 <template>
   <a-card :body-style="{ padding: '24px 32px' }" :bordered="false" class="group-creat">
@@ -46,11 +48,8 @@
       </a-table>
     </a-row>
     <a-modal v-model="visible" title="广告组创建信息" :width="900" v-if="visible" :maskClosable="false">
-      <a-form-item
-        label="模板名称"
-        :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
-        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-      >
+      <a-form-item label="模板名称" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }">
         <a-input placeholder="请输入模板名称" v-model="name" style="width:100%;position:relative;" />
       </a-form-item>
 
@@ -65,247 +64,266 @@
 </template>
 
 <script>
-import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
-import moment from 'moment'
-import { mapGetters } from 'vuex'
-import jq from 'jquery'
-import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
-import targetedPopulation from '@/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue'
-export default {
-  name: 'new-mould',
-  components: {
-    targetedPopulation,
-    Treeselect
-  },
-  data() {
-    return {
-      dataList: [],
-      name: '',
-      columns: [
-        {
-          title: '模板名称',
-          align: 'center',
-          dataIndex: 'templateName',
-          scopedSlots: { customRender: 'templateName' }
-        },
-        {
-          title: '创建时间',
-          align: 'center',
-          dataIndex: 'createTime',
-          scopedSlots: { customRender: 'createTime' }
+  import {
+    getAction,
+    postAction,
+    deleteAction,
+    putAction
+  } from '@/api/manage'
+  import moment from 'moment'
+  import {
+    mapGetters
+  } from 'vuex'
+  import jq from 'jquery'
+  import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
+  import targetedPopulation from '@/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue'
+  export default {
+    name: 'new-mould',
+    components: {
+      targetedPopulation,
+      Treeselect
+    },
+    data() {
+      return {
+        dataList: [],
+        name: '',
+        columns: [{
+            title: '模板名称',
+            align: 'center',
+            dataIndex: 'templateName',
+            scopedSlots: {
+              customRender: 'templateName'
+            }
+          },
+          {
+            title: '创建时间',
+            align: 'center',
+            dataIndex: 'createTime',
+            scopedSlots: {
+              customRender: 'createTime'
+            }
+          },
+          {
+            title: '操作',
+            align: 'center',
+            dataIndex: 'action',
+            scopedSlots: {
+              customRender: 'action'
+            }
+          }
+        ],
+        appId: '',
+        populationData: {
+          // platform_os: '1',
+          // is_open: '0',
+          // gender: '1',
+          // network: '1',
+          // interest_video: [2, 3],
+          // ages_range: ['12', '41'],
+          // device_brand: ['2', '9'],
+          // device_price: ['5', '9'],
+          // fans_star: [2, 3, 4, 5],
+          // app_interest: [3, 4],
+          // android_osv: '4',
+          // business_interest_type: '2',
+          // business_interest: [34328, 34330],
+          // no_age_break: 0,
+          // no_gender_break: 0,
+          // no_area_break: 0,
+          // region: [
+          //   11,
+          //   12,
+          //   13,
+          //   14,
+          //   15,
+          //   21,
+          //   22,
+          //   23,
+          //   31,
+          //   32,
+          //   33,
+          //   34,
+          //   35,
+          //   36,
+          //   37,
+          //   41,
+          //   42,
+          //   43,
+          //   44,
+          //   45,
+          //   46,
+          //   50,
+          //   51,
+          //   52,
+          //   53,
+          //   54,
+          //   61,
+          //   62,
+          //   63,
+          //   64,
+          //   65,
+          //   71,
+          //   81,
+          //   82
+          // ],
+          // allForm: {
+          //   regionType: 'limit',
+          //   region: [
+          //     { label: '北京', value: 11 },
+          //     { label: '天津', value: 12 },
+          //     { label: '河北', value: 13 },
+          //     { label: '山西', value: 14 },
+          //     { label: '内蒙古', value: 15 },
+          //     { label: '辽宁', value: 21 },
+          //     { label: '吉林', value: 22 },
+          //     { label: '黑龙江', value: 23 },
+          //     { label: '上海', value: 31 },
+          //     { label: '江苏', value: 32 },
+          //     { label: '浙江', value: 33 },
+          //     { label: '安徽', value: 34 },
+          //     { label: '福建', value: 35 },
+          //     { label: '江西', value: 36 },
+          //     { label: '山东', value: 37 },
+          //     { label: '河南', value: 41 },
+          //     { label: '湖北', value: 42 },
+          //     { label: '湖南', value: 43 },
+          //     { label: '广东', value: 44 },
+          //     { label: '广西', value: 45 },
+          //     { label: '海南', value: 46 },
+          //     { label: '重庆', value: 50 },
+          //     { label: '四川', value: 51 },
+          //     { label: '贵州', value: 52 },
+          //     { label: '云南', value: 53 },
+          //     { label: '西藏', value: 54 },
+          //     { label: '陕西', value: 61 },
+          //     { label: '甘肃', value: 62 },
+          //     { label: '青海', value: 63 },
+          //     { label: '宁夏', value: 64 },
+          //     { label: '新疆', value: 65 },
+          //     { label: '台湾', value: 71 },
+          //     { label: '香港', value: 81 },
+          //     { label: '澳门', value: 82 }
+          //   ],
+          //   ageType: 'ageLimit',
+          //   ages_range: [],
+          //   age: [],
+          //   device: '1',
+          //   price: '1',
+          //   appType: '1',
+          //   fansStar: '1',
+          //   interestVideo: '1'
+          // }
         },
-        {
-          title: '操作',
-          align: 'center',
-          dataIndex: 'action',
-          scopedSlots: { customRender: 'action' }
+        active: 'add',
+        editId: '',
+        visible: false,
+        ipagination: {
+          current: 1,
+          pageSize: 10,
+          showTotal: (total, range) => {
+            return range[0] + '-' + range[1] + ' 共' + total + '条'
+          },
+          showQuickJumper: true,
+          onChange: current => {
+            // 切换分页时的回调,
+            // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+            this.ipagination.current = current
+            this.addUser()
+          },
+          total: 0
         }
-      ],
-      appId: '',
-      populationData: {
-        // platform_os: '1',
-        // is_open: '0',
-        // gender: '1',
-        // network: '1',
-        // interest_video: [2, 3],
-        // ages_range: ['12', '41'],
-        // device_brand: ['2', '9'],
-        // device_price: ['5', '9'],
-        // fans_star: [2, 3, 4, 5],
-        // app_interest: [3, 4],
-        // android_osv: '4',
-        // business_interest_type: '2',
-        // business_interest: [34328, 34330],
-        // no_age_break: 0,
-        // no_gender_break: 0,
-        // no_area_break: 0,
-        // region: [
-        //   11,
-        //   12,
-        //   13,
-        //   14,
-        //   15,
-        //   21,
-        //   22,
-        //   23,
-        //   31,
-        //   32,
-        //   33,
-        //   34,
-        //   35,
-        //   36,
-        //   37,
-        //   41,
-        //   42,
-        //   43,
-        //   44,
-        //   45,
-        //   46,
-        //   50,
-        //   51,
-        //   52,
-        //   53,
-        //   54,
-        //   61,
-        //   62,
-        //   63,
-        //   64,
-        //   65,
-        //   71,
-        //   81,
-        //   82
-        // ],
-        // allForm: {
-        //   regionType: 'limit',
-        //   region: [
-        //     { label: '北京', value: 11 },
-        //     { label: '天津', value: 12 },
-        //     { label: '河北', value: 13 },
-        //     { label: '山西', value: 14 },
-        //     { label: '内蒙古', value: 15 },
-        //     { label: '辽宁', value: 21 },
-        //     { label: '吉林', value: 22 },
-        //     { label: '黑龙江', value: 23 },
-        //     { label: '上海', value: 31 },
-        //     { label: '江苏', value: 32 },
-        //     { label: '浙江', value: 33 },
-        //     { label: '安徽', value: 34 },
-        //     { label: '福建', value: 35 },
-        //     { label: '江西', value: 36 },
-        //     { label: '山东', value: 37 },
-        //     { label: '河南', value: 41 },
-        //     { label: '湖北', value: 42 },
-        //     { label: '湖南', value: 43 },
-        //     { label: '广东', value: 44 },
-        //     { label: '广西', value: 45 },
-        //     { label: '海南', value: 46 },
-        //     { label: '重庆', value: 50 },
-        //     { label: '四川', value: 51 },
-        //     { label: '贵州', value: 52 },
-        //     { label: '云南', value: 53 },
-        //     { label: '西藏', value: 54 },
-        //     { label: '陕西', value: 61 },
-        //     { label: '甘肃', value: 62 },
-        //     { label: '青海', value: 63 },
-        //     { label: '宁夏', value: 64 },
-        //     { label: '新疆', value: 65 },
-        //     { label: '台湾', value: 71 },
-        //     { label: '香港', value: 81 },
-        //     { label: '澳门', value: 82 }
-        //   ],
-        //   ageType: 'ageLimit',
-        //   ages_range: [],
-        //   age: [],
-        //   device: '1',
-        //   price: '1',
-        //   appType: '1',
-        //   fansStar: '1',
-        //   interestVideo: '1'
-        // }
-      },
-      active: 'add',
-      editId: '',
-      visible: false,
-      ipagination: {
-        current: 1,
-        pageSize: 10,
-        showTotal: (total, range) => {
-          return range[0] + '-' + range[1] + ' 共' + total + '条'
-        },
-        showQuickJumper: true,
-        onChange: current => {
-          // 切换分页时的回调,
-          // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
-          this.ipagination.current = current
-          this.addUser()
-        },
-        total: 0
       }
-    }
-  },
-  computed: {},
-  filters: {},
-  methods: {
-    handleSubmit(e) {
-      //   this.$refs.population.handleSubmit()
-      e.preventDefault()
-      this.$refs.population.handleSubmit()
-      var data = this.populationData
-      console.log(JSON.stringify(data))
-      if (this.active == 'add') {
-        postAction('/kuaishou/batch/addDirectionalTemplate', {
-          accountId: this.appId,
-          templateName: this.name,
-          templateContent: JSON.stringify(this.populationData)
-        }).then(res => {
-          console.log(res)
-          if (res.success) {
-            this.visible = false
-            this.populationData = {}
-            this.name = ''
-            this.addUser()
-          }
-        })
-      } else if (this.active == 'edit') {
-        putAction('/kuaishou/batch/editDirectionalTemplate', {
-          id: this.editId,
-          templateName: this.name,
-          templateContent: JSON.stringify(this.populationData)
+    },
+    computed: {},
+    filters: {},
+    methods: {
+      handleSubmit(e) {
+        //   this.$refs.population.handleSubmit()
+        e.preventDefault()
+        this.$refs.population.handleSubmit()
+        var data = this.populationData
+        console.log(JSON.stringify(data))
+        if (this.active == 'add') {
+          postAction('/kuaishou/batch/addDirectionalTemplate', {
+            accountId: this.appId,
+            templateName: this.name,
+            templateContent: JSON.stringify(this.populationData)
+          }).then(res => {
+            console.log(res)
+            if (res.success) {
+              this.visible = false
+              this.populationData = {}
+              this.name = ''
+              this.addUser()
+            }
+          })
+        } else if (this.active == 'edit') {
+          putAction('/kuaishou/batch/editDirectionalTemplate', {
+            id: this.editId,
+            templateName: this.name,
+            templateContent: JSON.stringify(this.populationData)
+          }).then(res => {
+            console.log(res)
+            if (res.success) {
+              this.visible = false
+              this.populationData = {}
+              this.name = ''
+              this.addUser()
+            }
+          })
+        }
+      },
+      getData(className) {
+        return this.form.getFieldValue(className)
+      },
+      handleEdit(item) {
+        this.active = 'edit'
+        this.editId = item.id
+        this.name = item.templateName
+        this.populationData = JSON.parse(item.templateContent)
+        console.log(item.templateContent)
+        this.visible = true
+      },
+      handleDelete(id) {
+        deleteAction('/kuaishou/batch/deleteDirectionalTemplate', {
+          id: id
         }).then(res => {
-          console.log(res)
           if (res.success) {
-            this.visible = false
-            this.populationData = {}
-            this.name = ''
+            this.$message.success('删除成功')
             this.addUser()
+          } else {
+            this.$message.error(res.message)
           }
         })
-      }
-    },
-    getData(className) {
-      return this.form.getFieldValue(className)
-    },
-    handleEdit(item) {
-      this.active = 'edit'
-      this.editId = item.id
-      this.name = item.templateName
-      this.populationData = JSON.parse(item.templateContent)
-      this.visible = true
-    },
-    handleDelete(id) {
-      deleteAction('/kuaishou/batch/deleteDirectionalTemplate', { id: id }).then(res => {
-        if (res.success) {
-          this.$message.success('删除成功')
-          this.addUser()
-        } else {
-          this.$message.error(res.message)
-        }
-      })
-    },
-    addUser() {
-      this.loading = true
-      this.dataList = []
-      var params = {}
-      params.accountId = this.appId + ''
-      if (this.appId) {
-        getAction('/kuaishou/batch/getDirectionalTemplate', params).then(res => {
-          if (res.success) {
-            this.dataList = res.result.map((item, index) => {
-              return {
-                ...item,
-                key: index
+      },
+      addUser() {
+        this.loading = true
+        this.dataList = []
+        var params = {}
+        params.accountId = this.appId + ''
+
+        if (this.appId) {
+          getAction('/kuaishou/batch/pullPopulationList', params).then(res => {
+            getAction('/kuaishou/batch/getDirectionalTemplate', params).then(res => {
+              if (res.success) {
+                this.dataList = res.result.map((item, index) => {
+                  return {
+                    ...item,
+                    key: index
+                  }
+                })
+                this.ipagination.total = res.result.length
               }
             })
-            this.ipagination.total = res.result.length
-          }
-        })
-      } else {
-        this.$message.error('请选择账户')
+          })
+
+        } else {
+          this.$message.error('请选择账户')
+        }
       }
+    },
+    mounted: function () {
+      //   /kuaishou/batch/getDirectionalTemplate
     }
-  },
-  mounted: function() {
-    //   /kuaishou/batch/getDirectionalTemplate
   }
-}
-</script>
+</script>

+ 3 - 1
src/views/modules/kuaishouapp/account/originality.vue

@@ -21,7 +21,7 @@
         <!-- :tabList="title" :activeTabKey="titleKey" @tabChange="key => onTabChange(key, 'titleKey')" -->
         <a-tabs v-model="titleKey" type="editable-card" hideAdd @edit="remove" @change="onTabChange">
           <a-tab-pane v-for="pane in title" :tab="pane.tab" :key="pane.key">
-            <a-button @click="dianji" style="margin-bottom:15px">新增创意</a-button>
+            <a-button @click="dianji" style="margin-bottom:15px" :disabled="ipagination.total==15">新增创意</a-button>
             <div v-show="selectedRowKeys.length > 0">
               批量操作:
               <a-select style="width: 120px" v-model="allType">
@@ -38,6 +38,7 @@
               :scroll="{ x: true }"
               :customRow="rowClick"
               size="middle"
+              :pagination="ipagination"
               :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
             >
               <span slot="action" slot-scope="text, record">
@@ -459,6 +460,7 @@ export default {
               showSwich: v.putStatus == 1 ? true : false
             }
           })
+          this.ipagination.total = res.result.total
         }
       })
     },

+ 7 - 2
src/views/modules/kuaishouapp/account/stepForm/Step2.vue

@@ -39,7 +39,7 @@
             }}
           </a-select-option>
         </a-select>
-        <a @click="addApplication" style="margin-left:10px">添加应用</a>
+        <!-- <a @click="addApplication" style="margin-left:10px">添加应用</a> -->
         <creat-application ref="application" />
       </a-form-item>
       <a-form-item label="转化类型" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
@@ -537,7 +537,12 @@
             campaignId: localStorage.getItem('campaignId'),
             unitName: e.target.value
           }).then(res => {
-            this.allForm.group[index].unitNameCheck = !res.result
+            if (res.success) {
+              this.allForm.group[index].unitNameCheck = !res.result
+            } else {
+              this.allForm.group[index].unitNameCheck = false
+            }
+
           })
         }
 

+ 60 - 20
src/views/modules/kuaishouapp/account/stepForm/Step3.vue

@@ -39,9 +39,7 @@
           <a-form-item label="创意内容" :labelCol="labelCol">
             <a-layout>
               <a-layout-content style="padding:10px;">
-                <div :style="{ marginBottom: '16px' }">
-                  <a-button @click="addCreative(bestIndex)">添加创意</a-button>
-                </div>
+
                 <a-row>
                   <a-col :span="24" v-for="(item, index) of pane.list" :key="index">
                     <a-card title :ref="item">
@@ -56,9 +54,6 @@
                             v-if="item.videoList"></video>
                         </a-form-item>
                         <div class="downLoad" style="overflow:auto">
-                          <!-- <a-button @click="onCheckAllImageChange(index,item)" v-if="item.imageUrlList.length > 0">{{
-                            item.checkAllImage ? '取消  (  ' + item.checkArrImage.length + '  )' : '全选'
-                            }}</a-button> -->
                           <ul class="actor-photo-list"
                             :style="{ width: item.imageUrlList.length>4?25 * item.imageUrlList.length + '%':'100%' }"
                             v-if="item.imageUrlList.length > 0">
@@ -88,14 +83,14 @@
                     </a-card>
                   </a-col>
                 </a-row>
+                <div :style="{ marginBottom: '16px' }">
+                  <a-button @click="addCreative(bestIndex)" :disabled="contentAll>=15||listCheck">
+                    添加创意</a-button>
+                </div>
               </a-layout-content>
             </a-layout>
           </a-form-item>
           <a-form-item label="行动号召" :labelCol="labelCol" :wrapperCol="wrapperCol">
-            <!-- <a-radio-group buttonStyle="solid" v-decorator="['action_bar_text', { initialValue: '1' }]">
-              <a-radio-button value="1">竖版视频</a-radio-button>
-              <a-radio-button value="2">横版视频</a-radio-button>
-            </a-radio-group> -->
             <a-select v-decorator="['actionBarText', { rules: [{ required: true, message: '行动号召按钮文案' }] }]" showSearch
               allowClear placeholder="选择行动号召按钮文案" optionFilterProp="children" :filterOption="filterOption">
               <a-select-option v-for="appModel in appList" :key="appModel.id" :value="appModel.actionBarText">
@@ -140,7 +135,7 @@
         </div>
       </div>
       <template slot="footer">
-        <a-button key="back" @click="handleCancel">关闭</a-button>
+        <!-- <a-button key="back" @click="handleCancel">关闭</a-button> -->
         <a-button key="submit" type="primary" @click="handleOk">
           返回列表
         </a-button>
@@ -220,7 +215,8 @@
         loading: false,
         imageUrlList: [],
         checkAllImage: false,
-        checkArrImage: []
+        checkArrImage: [],
+        content: 0
       }
     },
     methods: {
@@ -256,17 +252,20 @@
             code: item.video.signature,
             accountId: localStorage.getItem('accountId')
           }).then(res => {
-            console.log(res)
             if (res.success) {
-              this.pans[index].list[item.key].description = res.result.creativeCopywriter
+              this.pans[index].list[item.key].description =
+                res.result ? res.result.creativeCopywriter : ''
             }
           })
           getAction('/ctop/MaterialImageInfo/list', {
             videoId: item.video.signature
           }).then(res => {
-            console.log(res)
+            // console.log(res)
             if (res.success) {
               this.pans[index].list[item.key].imageUrlList = res.result
+              this.pans[index].list[item.key].checkArrImage = res.result.map(item => {
+                return item.code
+              })
             }
           })
         } else {
@@ -316,6 +315,8 @@
         this.form.resetFields()
         if (this.pans.length == 0) {
           this.$bus.$emit('remove', '/account/stepForm')
+        } else {
+          this.addCreative(0)
         }
       },
       handleOk() {
@@ -337,11 +338,10 @@
         var data = this.pans[index].list.map(item => {
           return item.imageList.length + item.imageUrlList.length
         })
-        if (eval(data.join('+')) > 15) {
+        if (this.contentAll > 15) {
           this.$message.error('封面最多15张')
           return
         }
-        console.log(this.pans[index].list)
 
         this.form.validateFields((err, values) => {
           if (!err) {
@@ -361,14 +361,18 @@
                     name: (item.imageList.length + index + 1) + '-' + item.name
                   }
                 }),
-                photoId: item.videoList.photoId
+                photoId: item.videoList.photoId,
+                name: item.name
               }
             })
             console.log(dataJson)
             var allJson = dataJson.map(item => {
               return {
                 description: item.description,
-                imageArr: item.imageArr.concat(item.imageArrTwo),
+                imageArr: item.imageArr.concat(item.imageArrTwo).length > 0 ? item.imageArr.concat(item
+                  .imageArrTwo) : [{
+                  name: item.name
+                }],
                 photoId: item.photoId
               }
             })
@@ -449,6 +453,32 @@
         d = d < 10 ? '0' + d : d
 
         return 'video/' + y + '-' + MM + '-' + d + '/'
+      },
+      contentAll() {
+        var count, arr = []
+        if (this.pans[0].list.length > 0) {
+          for (let i = 0; i < this.pans[0].list.length; i++) {
+
+            arr.push(...this.pans[0].list[i].imageUrlList, ...this.pans[0].list[i].imageList)
+          }
+          return arr.length + this.content
+        } else {
+          return 0
+        }
+
+      },
+      listCheck() {
+        if (this.pans[0].list.length > 0) {
+          if (this.pans[0].list[this.pans[0].list.length - 1].imageUrlList.length == 0 && this.pans[0].list[this.pans[0]
+              .list.length - 1]
+            .imageList.length == 0) {
+            return true
+          } else {
+            return false
+          }
+        } else {
+          return false
+        }
       }
     },
     watch: {},
@@ -460,8 +490,18 @@
             list: []
           }
         })
-        console.log(this.pans)
+
         this.pansKey = this.pans[0].key
+        this.addCreative(0)
+        //  unitId: this.pansKey,
+        //               accountId: localStorage.getItem('accountId')
+        getAction('/kuaishou/batch/checkCreativeCount', {
+          unitId: this.pansKey,
+          accountId: localStorage.getItem('accountId')
+        }).then(res => {
+          console.log(res)
+          this.content = res.result
+        })
         getAction('/kuaishou/batch/getActionBarText', {
           campaignId: localStorage.getItem('campaignId')
         }).then(res => {

+ 3 - 0
src/views/modules/kuaishouapp/account/stepForm/stepModule/checkMatemal.vue

@@ -122,6 +122,9 @@ export default {
       params.materialType = typeName
       params.pageSize = this.ipagination.pageSize
       params.pageNo = this.ipagination.current
+      if(typeString == 'video'){
+          params.channelType = 0
+      }
       this.active = typeString
       this.numberType = typeName
       this.url.list = url

+ 343 - 0
src/views/modules/kuaishouapp/account/stepForm/stepModule/createAppNew.vue

@@ -0,0 +1,343 @@
+<template>
+  <div>
+    <a-modal
+      title="添加应用"
+      :visible="application"
+      @ok="handleOk"
+      :confirmLoading="confirmLoading"
+      @cancel="handleCancel"
+      width="600px"
+    >
+      <a-card :body-style="{ padding: '24px 32px' }" :bordered="false">
+        <a-form :form="form">
+          <a-form-item
+            label="设备类型"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+          >
+            <a-radio-group v-model="appType" @change="changePlatform">
+              <a-radio-button value="android">安卓</a-radio-button>
+              <a-radio-button value="ios">IOS</a-radio-button>
+            </a-radio-group>
+          </a-form-item>
+          <!-- <a-form-item v-if="appType == 'android'"> -->
+          <a-form-item
+            label="推广类型"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+          >
+            <a-radio-group v-model="platform" @change="changeShowUploadType">
+              <a-radio value="1">应用下载</a-radio>
+              <a-radio value="2">网页游戏</a-radio>
+            </a-radio-group>
+          </a-form-item>
+
+          <a-form-item
+            label="上传应用"
+            v-if="appType == 'android' && platform == '1'"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+          >
+            <a-radio-group v-model="uploadType" @change="changeShowUpload">
+              <a-radio-button value="1">本地上传</a-radio-button>
+              <a-radio-button value="2">填写链接</a-radio-button>
+            </a-radio-group>
+          </a-form-item>
+
+          <a-form-item
+            label="上传文件"
+            v-if="appType == 'android' && uploadType == '1' && platform == '1'"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+          >
+            <upload-to-ali
+              v-model="file"
+              :customDomain="customDomain"
+              preview
+              :region="region"
+              :bucket="bucket"
+              :accept="acceptVideo"
+              :max="10"
+              :size="1024000"
+              :accessKeyId="accessKeyId"
+              :accessKeySecret="accessKeySecret"
+            ></upload-to-ali>
+          </a-form-item>
+
+          <a-form-item
+            v-if="uploadType == '2' || appType == 'ios' || platform == '2'"
+            label="下载链接"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+          >
+            <a-input
+              placeholder="请填写应用链接"
+              v-decorator="[
+                'downloadUrl',
+                {
+                  rules: [{ required: true, validator: handleConfirmValue }]
+                }
+              ]"
+            />
+          </a-form-item>
+
+          <a-form-item
+            label="应用包名"
+            v-if="appType == 'android'"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+          >
+            <a-input
+              v-decorator="[
+                'packageName',
+                {
+                  rules: [{ required: true, message: '请填写正确的应用包名称' }]
+                }
+              ]"
+              placeholder="请填写包名称,如com.smile.gifmaker"
+            />
+          </a-form-item>
+
+          <a-form-item
+            label="应用名称"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+          >
+            <a-input
+              v-decorator="[
+                'appName',
+                {
+                  rules: [{ required: true, message: '请填写应用名称' }]
+                }
+              ]"
+              placeholder="请填写应用名称"
+            />
+          </a-form-item>
+
+          <a-form-item
+            label="上传图标"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 19 } }"
+          >
+            <upload-to-ali
+              v-model="imageUrl"
+              :customDomain="customDomain"
+              preview
+              :region="region"
+              :bucket="bucket"
+              :accept="acceptVideo"
+              :max="10"
+              :size="1024000"
+              :accessKeyId="accessKeyId"
+              :accessKeySecret="accessKeySecret"
+            ></upload-to-ali>
+            <span>请上传png/jpg/jpeg图片,尺寸450*450,小于100KB</span>
+          </a-form-item>
+
+          <a-form-item
+            label="应用标记"
+            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+          >
+            <a-input
+              v-decorator="[
+                'appVersion',
+                {
+                  rules: [{ required: true, message: '请填写应用标记' }]
+                }
+              ]"
+              placeholder="请填写应用标记,必填且不可重复,如快手-5.6.1.66"
+            />
+          </a-form-item>
+          <!-- <a-form-item>
+            <a-form-item :wrapperCol="{ span: 24 }" style="text-align: center">
+              <a-button htmlType="submit" type="primary">提交</a-button>
+              <a-button style="margin-left: 8px">保存</a-button>
+            </a-form-item>
+          </a-form-item> -->
+        </a-form>
+      </a-card>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { deleteAction, postAction, getAction } from '@/api/manage'
+import UploadToAli from '@femessage/upload-to-ali'
+import { mapActions, mapGetters } from 'vuex'
+
+export default {
+  name: 'BaseForm',
+  components: {
+    UploadToAli
+  },
+  data() {
+    return {
+      accountId: '',
+      accountList: {},
+      appType: 'android', //设备类型
+      platform: '1', //应用类型   : 1 Android 应用下载,2: Android 网页游戏,3: iOS 应用下载, 4:iOS 网页游戏
+      uploadType: '1', //上传类型 1 本地上传 2 填写链接
+      appVersion: '', //应用标记
+      appName: '', // 应用名称
+      packageName: '', //应用包名
+      file: '', // 上传文件
+      imageUrl: '', // 上传图标链接链接
+      downloadUrl: '', //下载链接
+      showUploadFile: true,
+      showDownLoad: false,
+      showUpload: true,
+      showAndroid: true,
+      showIOS: false,
+      customDomain: '',
+      acceptVideo: '/*.apk,/*.png,/*.jpg,/*.jpeg,/*.mp4',
+      accessKeyId: 'LTAIbNbqWzSOklQV',
+      accessKeySecret: '1rkPz7JNoXk8sJevPaeYHWqfkQXBGh',
+      region: 'oss-cn-beijing',
+      bucket: 'ctop-media',
+      form: this.$form.createForm(this),
+      url: {
+        insertTemplateUrl: '/kuaishou/kuaiShouCreateAppTemplate/insert',
+        userAllocationList: '/ctop/userAllocation/list'
+      },
+      application: false,
+      confirmLoading: false
+    }
+  },
+  methods: {
+    handleOk() {
+      this.handleSubmit()
+    },
+    handleCancel() {
+      this.form.resetFields()
+      this.imageUrl = ''
+      this.file = ''
+      this.platform = '1'
+      this.application = false
+    },
+    showApplication() {
+      this.application = true
+    },
+    handleConfirmValue(rule, value, callback) {
+      if (/(http|https):\/\/([\w.]+\/?)\S*/.test(value) && value != '') {
+        callback()
+      } else {
+        callback('链接不能为空且开头为http://或https://')
+      }
+    },
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    changePlatform() {
+      this.form.resetFields()
+      if (this.appType == 'android') {
+        this.showAndroid = true
+        this.showIOS = false
+        this.platform = '1'
+      } else {
+        this.showAndroid = false
+        this.showIOS = true
+        this.showDownLoad = true
+        this.platform = '1'
+      }
+    },
+    changeShowUpload() {
+      this.form.resetFields()
+      if (this.uploadType == '1') {
+        this.showUploadFile = true
+        this.showDownLoad = false
+      } else {
+        this.showUploadFile = false
+        this.showDownLoad = true
+      }
+    },
+    changeShowUploadType() {
+      this.form.resetFields()
+      if (this.platform == '2') {
+        this.showUpload = false
+        this.showUploadFile = false
+        this.showDownLoad = true
+        this.uploadType = '1'
+      } else {
+        this.showUpload = true
+        this.showUploadFile = true
+        this.showDownLoad = false
+      }
+    },
+
+    handleSubmit() {
+      //   console.log('设备类型:' + this.appType)
+      //   console.log('应用类型:' + this.platform)
+      //   console.log('上传类型:' + this.uploadType)
+      //   console.log('应用标记:' + this.appVersion)
+      //   console.log('应用名称:' + this.appName)
+      //   console.log('包名称:' + this.packageName)
+      //   console.log('文件地址:' + this.file)
+      //   console.log('图片地址:' + this.imageUrl)
+      //   e.preventDefault()
+      this.form.validateFields((err, values) => {
+        console.log('Received values of form: ', values)
+        if (!err) {
+          let params = {}
+          params.accountId = localStorage.getItem('accountId')
+          if (this.appType == 'android') {
+            if (this.imageUrl != '') {
+              params.imageUrl = this.imageUrl
+            }
+            if (this.platform == '2') {
+              params.url = values.downloadUrl
+            } else {
+              if (this.uploadType == '1') {
+                if (this.file != '') {
+                  params.file = this.file
+                }
+              } else if (this.uploadType == '2') {
+                params.url = values.downloadUrl
+              }
+            }
+            params.platform = this.platform
+            params.uploadType = this.uploadType
+            params.appType = 'android'
+            params.packageName = values.packageName
+            params.appName = values.appName
+            params.appVersion = values.appVersion
+            params.loginId = this.userInfo().id
+          } else {
+            params.appType = 'ios'
+            params.platform = this.platform
+            params.uploadType = '2'
+            params.url = values.downloadUrl
+            params.appName = values.appName
+            params.appVersion = values.appVersion
+            params.loginId = this.userInfo().id
+          }
+
+          console.log(params)
+          postAction(this.url.insertTemplateUrl, params).then(res => {
+            console.log(res)
+            if (res.success) {
+              this.$message.success('创建成功')
+              this.handleCancel()
+            } else {
+              this.$message.error(res.message)
+            }
+          })
+        }
+      })
+    },
+
+    onChange(value) {
+      console.log(value)
+    }
+  },
+  created: function() {
+    let params = {}
+    params.pageSize = '1000'
+    params.mediaId = '2'
+    params.userId = this.userInfo().id
+    getAction(this.url.userAllocationList, params).then(res => {
+      if (res.success) {
+        this.accountList = res.result.records
+      }
+    })
+  }
+}
+</script>

+ 41 - 40
src/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue

@@ -86,7 +86,7 @@ li:hover {
             :dataSource="dataList"
             bordered
             :pagination="false"
-            :scroll="{ y: 300 }"
+            :scroll="{ y: 300 ,x:true }"
             :rowSelection="{
               selectedRowKeys: selectedRowKeys,
               onChange: onSelectChange,
@@ -95,7 +95,7 @@ li:hover {
           >
             <span slot="orientationName" slot-scope="text, record">{{ text }}({{ record.orientationId }})</span>
             <span slot="populationType" slot-scope="text">{{ text | population_type }}</span>
-            <span slot="createTime" slot-scope="text">{{ text | getDate }}</span>
+            <span slot="putTime" slot-scope="text">{{ text | getDate }}</span>
           </a-table>
           <div style="text-align:right">
             <a-button style="margin-right:5px" @click="topMiddle = false">取消</a-button>
@@ -124,7 +124,7 @@ li:hover {
             :dataSource="dataList"
             bordered
             :pagination="false"
-            :scroll="{ y: 300 }"
+            :scroll="{ y: 300 ,x:true}"
             :rowSelection="{
               selectedRowKeys: selectedRowKeysNo,
               onChange: onSelectChangeNo,
@@ -133,7 +133,7 @@ li:hover {
           >
             <span slot="orientationName" slot-scope="text, record">{{ text }}({{ record.orientationId }})</span>
             <span slot="populationType" slot-scope="text">{{ text | population_type }}</span>
-            <span slot="createTime" slot-scope="text">{{ text | getDate }}</span>
+            <span slot="putTime" slot-scope="text">{{ text | getDate }}</span>
           </a-table>
           <div style="text-align:right">
             <a-button style="margin-right:5px" @click="topMiddleNo = false">取消</a-button>
@@ -633,9 +633,9 @@ const columns = [
   },
   {
     title: '创建时间',
-    dataIndex: 'createTime',
-    scopedSlots: { customRender: 'createTime' },
-    sorter: (a, b) => a.createTime - b.createTime
+    dataIndex: 'putTime',
+    scopedSlots: { customRender: 'putTime' },
+    sorter: (a, b) => a.putTime - b.putTime
   }
 ]
 
@@ -725,39 +725,39 @@ export default {
 
           this.targeted = n.excludePopulation ? (n.population ? '4' : '3') : '2'
           this.people = n.excludePopulation ? '3' : n.population ? '3' : '2'
-        //   this.getPeople().then(res => {
-        //     if (n.excludePopulation) {
-        //       this.keyValueNo = ''
-        //       this.selectedRowKeysValueNo = []
-        //       for (let i = 0; i < res.length; i++) {
-        //         for (let j = 0; j < n.excludePopulation.length; j++) {
-        //           if (res[i].orientationId == n.excludePopulation[j]) {
-        //             this.keyValueNo += res[i].orientationName + '   '
-        //             this.selectedRowKeysValueNo.push({
-        //               orientationId: res[i].orientationId,
-        //               orientationName: res[i].orientationName
-        //             })
-        //             this.selectedRowKeysNo.push()
-        //           }
-        //         }
-        //       }
-        //     }
-        //     if (n.population) {
-        //       this.keyValue = ''
-        //       this.selectedRowKeysValue = []
-        //       for (let i = 0; i < res.length; i++) {
-        //         for (let j = 0; j < n.population.length; j++) {
-        //           if (res[i].orientationId == n.population[j]) {
-        //             this.keyValue += res[i].orientationName + '   '
-        //             this.selectedRowKeysValue.push({
-        //               orientationId: res[i].orientationId,
-        //               orientationName: res[i].orientationName
-        //             })
-        //           }
-        //         }
-        //       }
-        //     }
-        //   })
+          this.getPeople().then(res => {
+            if (n.excludePopulation) {
+              this.keyValueNo = ''
+              this.selectedRowKeysValueNo = []
+              for (let i = 0; i < res.length; i++) {
+                for (let j = 0; j < n.excludePopulation.length; j++) {
+                  if (res[i].orientationId == n.excludePopulation[j]) {
+                    this.keyValueNo += res[i].orientationName + '   '
+                    this.selectedRowKeysValueNo.push({
+                      orientationId: res[i].orientationId,
+                      orientationName: res[i].orientationName
+                    })
+                    this.selectedRowKeysNo.push()
+                  }
+                }
+              }
+            }
+            if (n.population) {
+              this.keyValue = ''
+              this.selectedRowKeysValue = []
+              for (let i = 0; i < res.length; i++) {
+                for (let j = 0; j < n.population.length; j++) {
+                  if (res[i].orientationId == n.population[j]) {
+                    this.keyValue += res[i].orientationName + '   '
+                    this.selectedRowKeysValue.push({
+                      orientationId: res[i].orientationId,
+                      orientationName: res[i].orientationName
+                    })
+                  }
+                }
+              }
+            }
+          })
           this.$nextTick(() => {
             this.form.setFieldsValue(
               pick(n, [
@@ -767,6 +767,7 @@ export default {
                 'gender',
                 'network',
                 'agesRange',
+                'age',
                 'androidOsv',
                 'iosOsv',
                 'deviceBrand',

+ 1 - 0
src/views/modules/material/scriptMaterial.vue

@@ -1028,6 +1028,7 @@ export default {
       this.scene = ''
       this.clipRemark = ''
       this.picContent = ''
+      this.visible = false
     },
     showInput() {
       this.inputVisible = true

+ 100 - 90
src/views/modules/material/videoMaterial.vue

@@ -607,6 +607,7 @@ a {
           :accessKeySecret="accessKeySecret"
           :before-upload="fileWater"
           :dir="dirImg"
+          @delete='deleteImage'
           @loaded="overUploadImage"
         ></upload-to-ali>
         <span v-if="material.filter(item => item == false).length > 0 && urlListImage.url.length > 0" style="color:red"
@@ -722,6 +723,7 @@ a {
             :accessKeySecret="accessKeySecret"
             :before-upload="fileWater"
             :dir="dirImg"
+            @delete='deleteImage'
             @loaded="overUploadImage"
           ></upload-to-ali>
           <span
@@ -1404,6 +1406,12 @@ export default {
       if (n != '') {
         this.getList(n)
       }
+    },
+    visibleDetail:function(n,o){
+        if(!n){
+          this.refuseFile = []
+          this.refuseReason = ''
+        }
     }
   },
   methods: {
@@ -1678,6 +1686,8 @@ export default {
           // })
           this.$message.success('水印素材生成中')
           this.visibleDetail = false
+          this.refuseFile = []
+          this.refuseReason = ''
           closeAllVideoFun()
           this.loadData()
         }
@@ -1744,6 +1754,7 @@ export default {
     },
     okEditShow(item, editStatus) {
       if (editStatus == '2') {
+
         var params = {}
         params.id = item.id
         params.auditorId = this.userInfo().id
@@ -1886,26 +1897,31 @@ export default {
       })
     },
     handleOkImage() {
-      var params = {}
-      params.projectId = this.addImageData.projectId
-      params.videoId = this.addImageData.code
-      params.imageArr = this.imageArrList
-      this.loadingImage = true
-      postAction('/insertImage', params).then(res => {
-        console.log(res)
-        if (res.code == 0) {
-          this.urlListImage = {
-            url: [],
-            md5: [],
-            name: [],
-            size: []
-          }
-          this.imageArrList = []
-          this.addImageVisible = false
-          this.loadingImage = false
-          this.loadData()
+        if(this.urlListImage.url.length>0){
+            var params = {}
+            params.projectId = this.addImageData.projectId
+            params.videoId = this.addImageData.code
+            params.imageArr = this.imageArrList
+            this.loadingImage = true
+            postAction('/insertImage', params).then(res => {
+                console.log(res)
+                if (res.code == 0) {
+                this.urlListImage = {
+                    url: [],
+                    md5: [],
+                    name: [],
+                    size: []
+                }
+                this.imageArrList = []
+                this.addImageVisible = false
+                this.loadingImage = false
+                this.loadData()
+                }else{
+                this.loadingImage = false
+                }
+            })
         }
-      })
+     
     },
     handleOk() {
       this.loading = true
@@ -2059,7 +2075,8 @@ export default {
         this.queryParam = { 
             type: 'VIDEO', 
             userId: this.userInfo().id, 
-            status: key 
+            status: key ,
+            projectId:this.queryParam.projectId
         } 
         if (this.form.getFieldValue('projectId')) { 
             this.form.setFieldsValue({ 
@@ -2080,6 +2097,11 @@ export default {
       this.repeat = false
       this.$message.success('上传成功')
     },
+    deleteImage(url){
+        console.log(url,this.urlListImage.url)
+
+
+    },
     overUploadImage(urlAll) {
       //   var index = this.urlList.url.findIndex(item => item === urlAll[0])
       //   var data = { url: urlAll[0], code: this.urlList.md5[index], name: this.urlList.name[index] }
@@ -2088,97 +2110,85 @@ export default {
       that.material = []
       that.imageArrList = []
       var img
-      
-      for (var i = 0; i < this.urlListImage.url.length; i++) {
-          that.imageArrList.push({
-            // width: img.width,
-            // height: img.height,
-            // size: this.urlListImage.size[i],
-            code: this.urlListImage.md5[i],
-            url: this.urlListImage.url[i],
-            materialName: this.urlListImage.name[i]
-          })
-        img = new Image()
-        img.src = this.urlListImage.url[i]
-        if (img.complete) {
-          // 打印
-          if (img.width == 720) {
-            if (img.height == 1280) {
-              that.material.push(true)
-            } else {
-              that.material.push(false)
-            }
-          } else if (img.width == 1080) {
-            if (img.height == 1920) {
-              that.material.push(true)
-            } else {
-              that.material.push(false)
-            }
-          } else if (img.width == 1280) {
-            if (img.height == 720) {
-              that.material.push(true)
-            } else {
-              that.material.push(false)
-            }
-          } else if (img.width == 1920) {
-            if (img.height == 1080) {
-              that.material.push(true)
-            } else {
-              that.material.push(false)
-            }
-          } else {
-            that.material.push(false)
-          }
-        //   that.imageArrList.push({
-        //     width: img.width,
-        //     height: img.height,
-        //     size: this.urlListImage.size[i],
-        //     code: this.urlListImage.md5[i],
-        //     url: this.urlListImage.url[i],
-        //     materialName: this.urlListImage.name[i]
-        //   })
-        } else {
-
-          img.onload = () => {
-            // that.imageArrList.push({
-            //   width: img.width,
-            //   height: img.height,
-            //   size: that.urlListImage.size[i-1],
-            //   code: that.urlListImage.md5[i-1],
-            //   url: that.urlListImage.url[i-1],
-            //   materialName: that.urlListImage.name[i-1]
-            // })
+      if(urlAll.length>0){
+        for (var i = 0; i < this.urlListImage.url.length; i++) {
+            that.imageArrList.push({
+                // width: img.width,
+                // height: img.height,
+                // size: this.urlListImage.size[i],
+                code: this.urlListImage.md5[i],
+                url: this.urlListImage.url[i],
+                materialName: this.urlListImage.name[i]
+            })
+            img = new Image()
+            img.src = this.urlListImage.url[i]
+            if (img.complete) {
+            // 打印
             if (img.width == 720) {
                 if (img.height == 1280) {
-                  that.material.push(true)
+                that.material.push(true)
                 } else {
-                  that.material.push(false)
+                that.material.push(false)
                 }
             } else if (img.width == 1080) {
                 if (img.height == 1920) {
-                  that.material.push(true)
+                that.material.push(true)
                 } else {
-                  that.material.push(false)
+                that.material.push(false)
                 }
             } else if (img.width == 1280) {
                 if (img.height == 720) {
-                  that.material.push(true)
+                that.material.push(true)
                 } else {
-                  that.material.push(false)
+                that.material.push(false)
                 }
             } else if (img.width == 1920) {
                 if (img.height == 1080) {
-                  that.material.push(true)
+                that.material.push(true)
                 } else {
-                  that.material.push(false)
+                that.material.push(false)
                 }
             } else {
                 that.material.push(false)
             }
-            
-          }
+            } else {
+
+            img.onload = () => {
+                if (img.width == 720) {
+                    if (img.height == 1280) {
+                    that.material.push(true)
+                    } else {
+                    that.material.push(false)
+                    }
+                } else if (img.width == 1080) {
+                    if (img.height == 1920) {
+                    that.material.push(true)
+                    } else {
+                    that.material.push(false)
+                    }
+                } else if (img.width == 1280) {
+                    if (img.height == 720) {
+                    that.material.push(true)
+                    } else {
+                    that.material.push(false)
+                    }
+                } else if (img.width == 1920) {
+                    if (img.height == 1080) {
+                    that.material.push(true)
+                    } else {
+                    that.material.push(false)
+                    }
+                } else {
+                    that.material.push(false)
+                }
+                
+            }
+            }
         }
+      }else{
+
       }
+
     },
     file(file) {
       var bmf = new BMF()

+ 249 - 59
src/views/modules/onlineTraining/onlineTrainingList.vue

@@ -16,7 +16,10 @@
   <a-row :gutter="10">
 
     <a-col :sm="6" style="margin-bottom: 20px;z-index: 10">
-      <a-card class="search-box" style="min-height:500px">
+      <a-card class="search-box" style="min-height:500px" title="在线视频培训列表">
+        <a slot="extra" @click="addList">
+          新增培训视频
+        </a>
         <a-directory-tree defaultExpandAll @select="onSelect" @expand="onExpand" :loadData="onLoadData"
           :treeData="treeData">
         </a-directory-tree>
@@ -44,12 +47,87 @@
         <div id="videoPlay" style="height:800px" v-show="!startList"></div>
       </a-card>
     </a-col>
+    <a-modal :width="800" title="培训视频上传" @cancel="closeImage" @afterClose="closeImage" v-model="addImageVisible">
+      <template slot="footer">
+        <a-button key="back" @click="closeImage">取消</a-button>
+        <a-button key="submit" type="primary" @click="handleOkImage" :loading="loadingImage" :disabled="fileUrl==''">
+          确定
+        </a-button>
+      </template>
+      <a-form :form="form">
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="培训上传方式">
+          <a-radio-group buttonStyle="solid" v-model="typeUpload" @change="clear">
+            <a-radio-button value="1">原有目录上传</a-radio-button>
+            <a-radio-button value="2" :disabled="roleName!='admin'">新建目录上传</a-radio-button>
+          </a-radio-group>
+        </a-form-item>
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="一级目录选择">
+          <a-select
+            v-decorator="['media', { rules: [{ required: true, message: '请选择一级目录' }], initialValue: '汇创视频培训'  }]"
+            showSearch allowClear placeholder="选择模板" optionFilterProp="children" :filterOption="filterOption" disabled>
+            <a-select-option value="汇创视频培训">
+              汇创视频培训
+            </a-select-option>
+          </a-select>
+        </a-form-item>
+        <div v-if="typeUpload == '1'">
+          <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="二级目录选择">
+            <a-select v-decorator="['title', { rules: [{ required: true, message: '请选择二级目录' }]  }]" style="width: 100%"
+              placeholder="请选择二级目录" @change="getTopic">
+              <a-select-option v-for="(item,index) in titleList" :key="index" :value="item.value">
+                {{item.label}}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+          <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="三级目录选择">
+            <a-select v-decorator="['topic', { rules: [{ required: true, message: '请选择三级目录' }]  }]" style="width: 100%"
+              placeholder="请选择三级目录" :disabled="!getData('title')" @change="setOssDir">
+              <a-select-option v-for="(item,index) in topicList" :key="index" :value="item.value">
+                {{item.label}}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </div>
+        <div v-else>
+          <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="二级目录">
+            <!-- <a-input placeholder="请填写二级目录"
+              v-decorator="['titleAll', { rules: [{ required: true, message: '二级目录必填' }]  }]" /> -->
+            <a-select mode="tags" v-model="oneList" placeholder="请填写二级目录" @change="handleChange" autoClearSearchValue>
+              <a-select-option v-for="(item,index) in titleList" :key="index" :value="item.value">
+                {{item.label}}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+          <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="三级目录">
+            <a-input placeholder="请填写三级目录"
+              v-decorator="['topicAll', { rules: [{ required: true, message: '三级目录必填' }]  }]" />
+          </a-form-item>
+        </div>
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="培训视频名称">
+          <a-input placeholder="请填写培训视频名称"
+            v-decorator="['name', { rules: [{ required: true,message:'培训视频名称不能为空'}] }]" />
+        </a-form-item>
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="培训视频简介">
+          <a-input placeholder="请填写培训视频简介" v-decorator="['intro']" />
+        </a-form-item>
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="文件上传"
+          v-show="(getData('title') && getData('topic'))||(oneList.length>0 && getData('topicAll'))">
+          <upload-to-ali v-model="fileUrl" :customDomain="customDomain" preview :region="region" :bucket="bucket"
+            :accept="acceptVideo" :max="10" :size="1024000" :accessKeyId="accessKeyId"
+            :accessKeySecret="accessKeySecret" :before-upload="file" :dir="dirVideo" @loaded="overUpload">
+          </upload-to-ali>
+        </a-form-item>
+
+      </a-form>
+
+    </a-modal>
   </a-row>
 </template>
 
 <script>
   import {
-    getAction
+    getAction,
+    postAction
   } from '@/api/manage'
   import {
     JeecgListMixin
@@ -57,6 +135,7 @@
   import moment from 'moment'
   import $ from 'jquery'
   import qs from 'qs'
+  import UploadToAli from '@femessage/upload-to-ali'
   // document.write(textDes('https://ctop-media.oss-cn-beijing.aliyuncs.com/video/2020-03-20/20网服-1584693978588.mp4'))
   // document.write('<br>' + desDecrypt('s4HMPbmUfZ0=', 'ckplayerDesKey'))
   function textDes(str) {
@@ -92,49 +171,38 @@
     mixins: [JeecgListMixin],
     data() {
       return {
-        visibleDetail: false,
-        srcList: '',
-        timeList: [{
-            label: '分类1',
-            value: 1,
-            show: true
+        typeUpload: '1',
+        titleList: [],
+        topicList: [],
+        oneList: [],
+        fileUrl: '',
+        customDomain: '',
+        region: 'oss-cn-beijing',
+        bucket: 'ctop-media',
+        acceptVideo: 'video/mpeg,video/mp4',
+        accessKeyId: 'LTAIbNbqWzSOklQV',
+        accessKeySecret: '1rkPz7JNoXk8sJevPaeYHWqfkQXBGh',
+        labelCol: {
+          xs: {
+            span: 24
           },
-          {
-            label: '分类2',
-            value: 2,
-            show: true
-          },
-          {
-            label: '分类3',
-            value: 3,
-            show: true
-          },
-          {
-            label: '分类4',
-            value: 4,
-            show: true
-          },
-          {
-            label: '分类5',
-            value: 5,
-            show: true
-          },
-          {
-            label: '分类6',
-            value: 6,
-            show: true
-          },
-          {
-            label: '分类7',
-            value: 7,
-            show: true
+          sm: {
+            span: 5
+          }
+        },
+        wrapperCol: {
+          xs: {
+            span: 24
           },
-          {
-            label: '分类8',
-            value: 8,
-            show: true
+          sm: {
+            span: 12
           }
-        ],
+        },
+        visibleDetail: false,
+        srcList: '',
+        loadingImage: false,
+        addImageVisible: false,
+        form: this.$form.createForm(this),
         treeData: [{
             title: '巨量引擎',
             key: '巨量引擎'
@@ -170,29 +238,140 @@
           video: "" //视频地址
         },
         active: 1,
-        data: [{
-            title: '素材库-脚本库视频'
-          },
-          {
-            title: '素材库-脚本库文档'
-          },
-          {
-            title: '素材库-视频库操作视频'
-          },
-          {
-            title: '素材库-视频库操作文档'
-          }
-        ],
         url: {
           list: '/ctop/materialInfo/list'
         },
         startList: true,
         simpleMode: false,
-        course: null
+        course: null,
+        dirVideo: "online/",
+        roleName: localStorage.getItem('roleCode')
       }
     },
-    components: {},
+    components: {
+      UploadToAli,
+    },
     methods: {
+      clear() {
+        this.form.setFieldsValue({
+          topic: '',
+          title: ''
+        })
+      },
+      filterOption(input, option) {
+        return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      },
+      getTopic(e) {
+        //    e.target.value 
+        console.log(e)
+        this.topicList = []
+        this.form.setFieldsValue({
+          topic: ''
+        })
+        getAction('/ctop/edu/system/topic', {
+          title: e
+        }).then(res => {
+          if (res.success) {
+            this.topicList = res.result.map(item => {
+              return {
+                value: item,
+                label: item
+              }
+            })
+          }
+        })
+      },
+      setOssDir(e) {
+        this.dirVideo = 'online/' + this.getData('title') + '/' + this.getData('topic')
+      },
+      setOssDirElse() {
+        this.dirVideo = 'online/' + this.oneList[0] + '/' + this.getData('topicAll')
+      },
+      addList() {
+        this.addImageVisible = true
+        this.loadingImage = false
+        this.typeUpload = '1'
+        getAction("/ctop/edu/system/lesson").then(res => {
+          console.log(res)
+          if (res.success) {
+            this.titleList = res.result.map(item => {
+              return {
+                value: item,
+                label: item
+              }
+            })
+          }
+        })
+
+      },
+      handleChange(value) {
+        console.log(value)
+        if (value.length == 2) {
+          this.oneList = [value.pop()]
+        }
+
+      },
+      handleOkImage(e) {
+        this.loadingImage = true
+        this.form.validateFieldsAndScroll((err, values) => {
+          if (err) {
+            // 这里做逻辑处理
+          } else {
+            var params = {}
+            if (this.typeUpload == '1') {
+              params = {
+                ...values,
+                ossFileUrl: 'https:' + this.fileUrl,
+                fileType: 1
+              }
+            } else {
+              params = {
+                ...values,
+                ossFileUrl: 'https:' + this.fileUrl,
+                fileType: 1,
+                title: this.oneList[0],
+                topic: values.topicAll
+              }
+            }
+            postAction('/ctop/edu/lesson/upload', params).then(res => {
+              if (res.success) {
+                this.loadingImage = false
+                this.closeImage()
+                getAction("/ctop/edu/system/lesson").then(res => {
+
+                })
+              }
+            })
+          }
+        })
+      },
+      closeImage() {
+        this.addImageVisible = false
+        this.form.resetFields()
+        this.fileUrl = ""
+        this.oneList = []
+      },
+      file(file) {
+        if (this.typeUpload == '1') {
+          this.dirVideo = 'online/' + this.getData('title') + '/' + this.getData('topic')
+        } else {
+          this.dirVideo = 'online/' + this.oneList[0] + '/' + this.getData('topicAll')
+        }
+        var that = this
+        console.log(this.dirVideo)
+        return new Promise(function (resolve, reject) {
+
+          if (that.dirVideo.split('/').length == 3) {
+            resolve()
+          } else {
+            reject()
+          }
+
+        })
+      },
+      overUpload() {
+
+      },
       onLoadData(treeNode) {
         console.log(treeNode)
         return new Promise(resolve => {
@@ -337,7 +516,12 @@
 
 
                 } else {
-                  this.videoObject.video = textDes(res.result.fileUrl)
+                  if (res.result.fileUrl) {
+                    this.videoObject.video = textDes(res.result.fileUrl)
+                  } else {
+                    this.videoObject.video = textDes(res.result.ossFileUrl)
+                  }
+
                 }
                 console.log(this.videoObject.video)
 
@@ -394,6 +578,9 @@
         this.ipagination.current = page
         this.loadData()
       },
+      getData(className) {
+        return this.form.getFieldValue(className)
+      },
       getAdd(checked) {
         this.active = checked
         if (checked == 5) {
@@ -456,11 +643,14 @@
     },
     mounted() {
       this.$nextTick(() => {
-        this.videoObject.video = " CK:2OoC8kA6lhNFqCi2uVquDPpnuq9VcRji9nGXe5nqadA6Jey7YFFEP8pE99j58UBbLyb7YN7cpkw="
+        this.videoObject.video =
+          " CK:2OoC8kA6lhNFqCi2uVquDPpnuq9VcRji9nGXe5nqadA6Jey7YFFEP8pE99j58UBbLyb7YN7cpkw="
 
         let player = new ckplayer(this.videoObject)
 
+
       })
+
     },
     created() {
       // console.log(player)