PutDetails.vue 7.5 KB

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