likeList.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <template>
  2. <div class="app-container calendar-list-container">
  3. <!-- 查询和其他操作 -->
  4. <div class="filter-container">
  5. <el-input clearable class="filter-item" style="width: 200px;" placeholder="抖音"
  6. v-model="listQuery.platformName"></el-input>
  7. <el-input clearable class="filter-item" style="width: 200px;" placeholder="视频系列"
  8. v-model="listQuery.videoSeries"></el-input>
  9. <el-input clearable class="filter-item" style="width: 200px;" placeholder="视频名称"
  10. v-model="listQuery.videoName"></el-input>
  11. <el-input clearable class="filter-item" style="width: 200px;" placeholder="抖音账号"
  12. v-model="listQuery.tiktokAccount"></el-input>
  13. <el-select v-model="listQuery.status" clearable placeholder="状态" class="filter-item" style="width: 200px">
  14. <el-option :key="item.type" v-for="item in statusTypeList" :label="item.name" :value="item.type">
  15. </el-option>
  16. </el-select>
  17. <el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查找</el-button>
  18. <el-button class="filter-item" type="primary" v-waves icon="el-icon-download"
  19. @click="handleDownLoad">导出</el-button>
  20. </div>
  21. <!-- 查询结果 -->
  22. <el-table size="small" :data="list" v-loading="listLoading" element-loading-text="正在查询中。。。" border fit
  23. highlight-current-row>
  24. <el-table-column type="index" label="序号" header-align="center" align="center">
  25. </el-table-column>
  26. <el-table-column align="center" min-width="100px" label="员工号" prop="employeNo">
  27. </el-table-column>
  28. <el-table-column align="center" min-width="100px" label="员工姓名" prop="userName">
  29. </el-table-column>
  30. <el-table-column align="center" min-width="100px" label="平台" prop="platformName">
  31. </el-table-column>
  32. <el-table-column align="center" min-width="100" label="账号" prop="accountName">
  33. </el-table-column>
  34. <el-table-column align="center" min-width="100" label="视频系列" prop="videoSeries">
  35. </el-table-column>
  36. <el-table-column align="center" min-width="100" label="第几集" prop="episodeNumber">
  37. </el-table-column>
  38. <el-table-column align="center" min-width="100" label="视频名称" prop="videoName">
  39. </el-table-column>
  40. <el-table-column align="center" min-width="100" label="抖音账号" prop="tiktokAccount">
  41. </el-table-column>
  42. <el-table-column align="center" min-width="80px" label="状态" prop="statusName">
  43. </el-table-column>
  44. <el-table-column align="center" min-width="200px" label="附件">
  45. <template slot-scope="props">
  46. <div v-for="(item, index) in props.row.files" :key="index">
  47. <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
  48. </div>
  49. </template>
  50. </el-table-column>
  51. <el-table-column align="center" label="操作" width="150px" class-name="small-padding fixed-width">
  52. <template slot-scope="scope">
  53. <el-button :disabled="scope.row.status == 0 ? false : true" type="primary" size="small"
  54. @click="handleCreate(scope.row.id,0)">通过</el-button>
  55. <el-button :disabled="scope.row.status == 0 ? false : true" type="warning" size="small"
  56. @click="handleCreate(scope.row.id,1)">不通过</el-button>
  57. </template>
  58. </el-table-column>
  59. </el-table>
  60. <!-- 分页 -->
  61. <div class="pagination-container">
  62. <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
  63. :current-page="listQuery.page" :page-sizes="[10, 20, 30, 50]" :page-size="listQuery.limit"
  64. layout="total, sizes, prev, pager, next, jumper" :total="total">
  65. </el-pagination>
  66. </div>
  67. <!-- 添加或修改对话框 -->
  68. <el-dialog :close-on-click-modal="false" title="点赞审批" :visible.sync="dialogFormVisible" width="40%">
  69. <el-form :rules="rules" ref="dataForm" :model="dataForm" status-icon label-position="left" label-width="80px">
  70. <el-form-item label="积分" prop="integral" v-if="flag == 0">
  71. <el-input-number :min="0" :step="1" v-model="dataForm.integral" style="width: 100%"></el-input-number>
  72. </el-form-item>
  73. <el-form-item label="驳回原因" prop="content" v-else>
  74. <el-input type="textarea" :rows="2" placeholder="请输入驳回原因" v-model="dataForm.content" style="width: 100%"></el-input>
  75. </el-form-item>
  76. </el-form>
  77. <div slot="footer" class="dialog-footer">
  78. <el-button @click="dialogFormVisible = false">取消</el-button>
  79. <el-button type="primary" @click="handleComplete">确定</el-button>
  80. </div>
  81. </el-dialog>
  82. </div>
  83. </template>
  84. <script>
  85. import {
  86. complete,
  87. list,
  88. } from "@/api/yeZhanManage/likeList";
  89. import waves from "@/directive/waves"; // 水波纹指令
  90. import Tinymce from "@/components/Tinymce";
  91. export default {
  92. components: { Tinymce },
  93. directives: { waves },
  94. data() {
  95. return {
  96. uploadInfoId: '',
  97. flag: '',
  98. dialogFormVisible: false,
  99. dataForm: {
  100. integral:undefined,
  101. content:undefined,
  102. },
  103. rules: {
  104. integral: [{ required: true, message: "积分不能为空", trigger: "blur" }],
  105. content: [{ required: true, message: "驳回原因不能为空", trigger: "blur" }],
  106. },
  107. statusTypeList: [
  108. {
  109. type: 0,
  110. name: "待审核",
  111. },
  112. {
  113. type: 1,
  114. name: "已通过",
  115. },
  116. {
  117. type: 2,
  118. name: "未通过",
  119. },
  120. ],
  121. list: [
  122. ],
  123. total: 0,
  124. listLoading: false,
  125. listQuery: {
  126. page: 1,
  127. limit: 10,
  128. platformName: '',
  129. videoSeries: '',
  130. videoName: '',
  131. tiktokAccount: '',
  132. status: "",
  133. },
  134. };
  135. },
  136. created() {
  137. this.getList();
  138. },
  139. methods: {
  140. handleDownLoad() {
  141. window.location.href = process.env.BASE_API + '/mall-video/export/likeList?platformName=' + this.listQuery.platformName + '&videoSeries=' + this.listQuery.videoSeries + '&videoName=' + this.listQuery.videoName + '&tiktokAccount=' + this.listQuery.tiktokAccount + '&status=' + this.listQuery.status;
  142. },
  143. getList() {
  144. this.listLoading = true;
  145. list(this.listQuery)
  146. .then((response) => {
  147. this.list = response.data.data.items;
  148. this.total = response.data.data.total;
  149. this.listLoading = false;
  150. })
  151. .catch(() => {
  152. this.list = [];
  153. this.total = 0;
  154. this.listLoading = false;
  155. });
  156. },
  157. handleFilter() {
  158. this.listQuery.page = 1;
  159. this.getList();
  160. },
  161. handleSizeChange(val) {
  162. this.listQuery.limit = val;
  163. this.getList();
  164. },
  165. handleCurrentChange(val) {
  166. this.listQuery.page = val;
  167. this.getList();
  168. },
  169. handleCreate(uploadInfoId, flag) {
  170. this.uploadInfoId = uploadInfoId;
  171. this.flag = flag;
  172. this.dialogFormVisible = true;
  173. this.$nextTick(() => {
  174. this.dataForm.content = undefined;
  175. this.dataForm.integral = undefined;
  176. this.$refs["dataForm"].clearValidate();
  177. });
  178. },
  179. handleComplete() {
  180. this.$refs["dataForm"].validate((valid) => {
  181. if (valid) {
  182. complete({ uploadInfoId: this.uploadInfoId, flag: this.flag, integral: this.dataForm.integral, content: this.dataForm.content }).then(() => {
  183. this.dialogFormVisible = false;
  184. this.$notify({
  185. title: "成功",
  186. message: "操作成功",
  187. type: "success",
  188. duration: 2000,
  189. });
  190. this.getList();
  191. });
  192. }
  193. })
  194. }
  195. },
  196. };
  197. </script>