PutDetails.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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.sendTime }}</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. fetchAuthorByFinderUin(this.$route.query.id).then(res => {
  124. this.authorInfo = res.model
  125. })
  126. },
  127. methods: {
  128. /**
  129. * 点击搜索
  130. */
  131. handleClickSearch () {
  132. console.log(this.formData)
  133. this.reloadData()
  134. },
  135. handleChangePicker (date, dateString) {
  136. console.log(date, dateString)
  137. this.formData.startTime = Number(date[0].format('x'))
  138. this.formData.endTime = Number(date[1].format('x'))
  139. if (this.formData.searchValue) {
  140. this.handleClickPush()
  141. }
  142. },
  143. handleClickPush (item) {
  144. console.log(this.formData)
  145. item.status = 1
  146. saveAuthorVideo(item)
  147. this.reloadData()
  148. },
  149. reloadData () {
  150. // const parems = {
  151. // startXXX: this.formData.startTime
  152. // }
  153. this.tableList = []
  154. console.log('formData = ' + JSON.stringify(this.formData))
  155. fetchVideoList(this.formData).then(res => {
  156. this.tableList = res.models
  157. console.log(res)
  158. })
  159. }
  160. }
  161. }
  162. </script>
  163. <style lang="less">
  164. .flex {
  165. display: flex;
  166. }
  167. .flex-col {
  168. flex-direction: column;
  169. }
  170. .flex-1 {
  171. flex: 1;
  172. }
  173. .justify-around {
  174. justify-content: space-around;
  175. }
  176. .justify-center {
  177. justify-content: center;
  178. }
  179. .items-center {
  180. align-items: center;
  181. }
  182. .text-center {
  183. text-align: center;
  184. }
  185. .num {
  186. color: #00A0E9;
  187. }
  188. .username {
  189. }
  190. </style>