PutDetails.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <template>
  2. <a-row>
  3. <a-col :span="6">
  4. <div style="width: 200px">
  5. <div class="flex flex-col justify-center" style="margin-bottom: 10px">
  6. <div class="text-center">
  7. <a-avatar :size="80" :src="this.authorInfo.avatar">央</a-avatar>
  8. </div>
  9. <div class="username text-center">{{ this.authorInfo.videoAccountName }}</div>
  10. </div>
  11. <div class="flex justify-around text-center" style="margin-bottom: 5px">
  12. <div>
  13. <div>粉丝数</div>
  14. <div class="num"><span>{{ this.authorInfo.fansCount }}</span></div>
  15. </div>
  16. <div>
  17. <div>发表数</div>
  18. <div class="num">{{ this.authorInfo.sendVideoCount }}</div>
  19. </div>
  20. </div>
  21. <div class="flex justify-around text-center" style="margin-bottom: 5px">
  22. <div>
  23. <div>投放条数</div>
  24. <div class="num">{{ this.authorInfo.putCount }}</div>
  25. </div>
  26. <div>
  27. <div>投放量级</div>
  28. <div class="num">{{ this.authorInfo.putLevelCount }}</div>
  29. </div>
  30. </div>
  31. </div>
  32. </a-col>
  33. <a-col :span="18" style=" background: #fff">
  34. <div class="flex" style="padding: 10px;">
  35. <div style="margin-right: 20px">
  36. <span>发表时间:</span>
  37. <a-range-picker show-time @change="handleChangePicker">
  38. </a-range-picker>
  39. </div>
  40. <div class="flex">
  41. <a-input v-model="formData.searchValue" placeholder="请输入作者 finderUin"></a-input>
  42. <a-button style="margin-left: 10px;" type="primary" @click="handleClickSearch">搜索</a-button>
  43. </div>
  44. </div>
  45. <div style="margin-top: 10px; font-size: 14px; background: #eff2f5">
  46. <template v-for="(item, index) of tableList" :key-="index">
  47. <a-row style="background: white; margin-bottom: 20px; padding: 10px;">
  48. <a-col :span="12" style="padding-right: 20px;">
  49. <div style="margin-bottom: 5px">{{ item.desc }}</div>
  50. <div>{{ item.sendTimeStr }}</div>
  51. <a-row>
  52. <a-col :span="12">有效曝光次数:{{ item.exposureCount }}</a-col>
  53. <a-col :span="12">投放量级:{{ item.putCountLevel }}</a-col>
  54. </a-row>
  55. <a-row>
  56. <a-col :span="12">点赞次数:{{ item.likeCount }}</a-col>
  57. <a-col :span="12">投放标签:</a-col>
  58. </a-row>
  59. <a-row>
  60. <a-col :span="12">完播次数:{{ item.playCount }}</a-col>
  61. <a-col :span="12">投放年龄:</a-col>
  62. </a-row>
  63. <a-row>
  64. <a-col :span="12">关注次数:{{ item.followCount }}</a-col>
  65. <a-col :span="12">投放城市:</a-col>
  66. </a-row>
  67. <a-row>
  68. <a-col :span="12">收藏次数:{{ item.collectCount }}</a-col>
  69. <a-col :span="12">投放性别:</a-col>
  70. </a-row>
  71. <a-row>
  72. <a-col :span="12">评论次数:{{ item.commentCount }}</a-col>
  73. <a-col :span="12">投放人:</a-col>
  74. </a-row>
  75. <a-row>
  76. <a-col :span="12">点赞率:{{ item.playCount / item.likeCount }}%</a-col>
  77. <a-col :span="12"></a-col>
  78. </a-row>
  79. <a-row>
  80. <a-col :span="12">关注率:{{ item.playCount / item.followCount }}%</a-col>
  81. <a-col :span="12"></a-col>
  82. </a-row>
  83. <div style="font-size: 12px; color: #aaa; margin-top: 30px">feedid:{{ item.feedId }}</div>
  84. </a-col>
  85. <a-col :span="12">
  86. <div>
  87. <video :src="item.link" style="width: 100%" controls></video>
  88. <div>
  89. <a-button type="primary" ghost @click="handleClickPush(item)">投放</a-button>
  90. </div>
  91. </div>
  92. </a-col>
  93. </a-row>
  94. </template>
  95. </div>
  96. </a-col>
  97. </a-row>
  98. </template>
  99. <script>
  100. import { fetchVideoList, fetchAuthorByFinderUin, saveAuthorVideo } from '@/api/author'
  101. export default {
  102. data () {
  103. return {
  104. loadData: parameter => {
  105. console.log('loadData.parameter', parameter)
  106. return fetchVideoList(Object.assign(parameter, this.queryParam)).then(res => {
  107. return res
  108. })
  109. },
  110. authorInfo: {},
  111. formData: {
  112. startTime: 0,
  113. endTime: 0,
  114. searchValue: '',
  115. status: 0,
  116. size: 10000
  117. },
  118. tableList: []
  119. }
  120. },
  121. created () {
  122. console.log('参数' + this.$route.query.id)
  123. this.reloadData()
  124. },
  125. methods: {
  126. /**
  127. * 点击搜索
  128. */
  129. handleClickSearch () {
  130. console.log(this.formData)
  131. this.reloadData()
  132. },
  133. handleChangePicker (date, dateString) {
  134. console.log(date, dateString)
  135. this.formData.startTime = Number(date[0].format('x'))
  136. this.formData.endTime = Number(date[1].format('x'))
  137. console.log(this.formData.startTime)
  138. console.log(this.formData.endTime)
  139. // this.reloadData()
  140. },
  141. handleClickPush (item) {
  142. console.log(this.formData)
  143. item.status = 1
  144. saveAuthorVideo(item)
  145. this.reloadData()
  146. },
  147. reloadData () {
  148. // const parems = {
  149. // startXXX: this.formData.startTime
  150. // }
  151. fetchAuthorByFinderUin(this.$route.query.id).then(res => {
  152. this.authorInfo = res.model
  153. })
  154. this.tableList = []
  155. console.log('formData = ' + JSON.stringify(this.formData))
  156. fetchVideoList(this.formData).then(res => {
  157. this.tableList = res.models
  158. console.log(res)
  159. })
  160. }
  161. }
  162. }
  163. </script>
  164. <style lang="less">
  165. .flex {
  166. display: flex;
  167. }
  168. .flex-col {
  169. flex-direction: column;
  170. }
  171. .flex-1 {
  172. flex: 1;
  173. }
  174. .justify-around {
  175. justify-content: space-around;
  176. }
  177. .justify-center {
  178. justify-content: center;
  179. }
  180. .items-center {
  181. align-items: center;
  182. }
  183. .text-center {
  184. text-align: center;
  185. }
  186. .num {
  187. color: #00A0E9;
  188. }
  189. .username {
  190. }
  191. </style>