pointsDetailList.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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.userName"></el-input>
  7. <el-input clearable class="filter-item" style="width: 200px;" placeholder="积分说明"
  8. v-model="listQuery.comment"></el-input>
  9. <el-select v-model="listQuery.deptId" clearable placeholder="请选择部门" style="top: -4px;width: 200px;">
  10. <el-option :key="item.type" v-for="item in depTypeList" :label="item.deptName" :value="item.deptId">
  11. </el-option>
  12. </el-select>
  13. <el-select v-model="listQuery.integralType" clearable placeholder="请选择积分类型" style="top: -4px;width: 200px;">
  14. <el-option :key="item.dictValue" v-for="item in allTypeList" :label="item.dictLabel" :value="item.dictValue">
  15. </el-option>
  16. </el-select>
  17. <el-date-picker class="filter-item" value-format="yyyy-MM-dd" v-model="listQuery.createTime" type="date" placeholder="选择获取时间">
  18. </el-date-picker>
  19. <el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查找</el-button>
  20. <el-button class="filter-item" type="primary" :loading="downloadLoading" v-waves icon="el-icon-download" @click="handleDownload">导出</el-button>
  21. </div>
  22. <!-- 查询结果 -->
  23. <el-table size="small" :data="list" v-loading="listLoading" element-loading-text="正在查询中。。。" border fit
  24. highlight-current-row>
  25. <el-table-column type="index" label="序号" header-align="center" align="center">
  26. </el-table-column>
  27. <el-table-column align="center" min-width="80px" label="姓名" prop="userName">
  28. </el-table-column>
  29. <el-table-column align="center" min-width="150px" label="部门" prop="deptName">
  30. </el-table-column>
  31. <el-table-column align="center" min-width="80px" label="积分类型" prop="integralTypeName">
  32. </el-table-column>
  33. <el-table-column align="center" min-width="200px" label="积分说明" prop="comment">
  34. </el-table-column>
  35. <el-table-column align="center" min-width="80px" label="积分">
  36. <template slot-scope="scope">
  37. <span style="color: #67C23A;font-weight: 600;font-size: 14px;" v-if="scope.row.pm == 0">
  38. + {{ scope.row.integral }}
  39. </span>
  40. <span style="color: #F56C6C;font-weight: 600;font-size: 14px;" v-else>
  41. - {{ scope.row.integral }}
  42. </span>
  43. </template>
  44. </el-table-column>
  45. <el-table-column align="center" min-width="80px" label="获取时间" prop="createTime">
  46. </el-table-column>
  47. </el-table>
  48. <!-- 分页 -->
  49. <div class="pagination-container">
  50. <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
  51. :current-page="listQuery.page" :page-sizes="[10, 20, 30, 50]" :page-size="listQuery.limit"
  52. layout="total, sizes, prev, pager, next, jumper" :total="total">
  53. </el-pagination>
  54. </div>
  55. </div>
  56. </template>
  57. <style>
  58. .demo-table-expand {
  59. font-size: 0;
  60. }
  61. .demo-table-expand label {
  62. width: 200px;
  63. color: #99a9bf;
  64. }
  65. .demo-table-expand .el-form-item {
  66. margin-right: 0;
  67. margin-bottom: 0;
  68. }
  69. </style>
  70. <script>
  71. import { getPointDetailList } from "@/api/pointManage";
  72. import { depTypeList,dataTypeList } from "@/api/public";
  73. import waves from "@/directive/waves"; // 水波纹指令
  74. import Tinymce from '@/components/Tinymce'
  75. export default {
  76. name: 'pointList',
  77. components: { Tinymce },
  78. directives: { waves },
  79. data() {
  80. return {
  81. depTypeList: [],
  82. allTypeList: [],
  83. list: [],
  84. total: 0,
  85. listLoading: false,
  86. downloadLoading: false,
  87. listQuery: {
  88. page: 1,
  89. limit: 10,
  90. deptId: '',
  91. userName: '',
  92. comment:'',
  93. createTime: '',
  94. integralType:'',
  95. },
  96. }
  97. },
  98. created() {
  99. this.getDepTypeList();
  100. this.getPointRulesType();
  101. this.getList();
  102. },
  103. methods: {
  104. handleDownload() {
  105. window.location.href = process.env.BASE_API + '/mall-integral/export/details/page?integralType=' + this.listQuery.integralType + '&deptId=' + this.listQuery.deptId + '&userName=' + this.listQuery.userName + '&createTime=' + this.listQuery.createTime + '&comment=' + this.listQuery.comment;
  106. },
  107. getDepTypeList() {
  108. depTypeList().then(response => {
  109. this.depTypeList = response.data.data;
  110. })
  111. },
  112. getPointRulesType() {
  113. dataTypeList({dictType:'integral_rule_type'}).then(response => {
  114. this.allTypeList = response.data.data;
  115. })
  116. },
  117. getList() {
  118. this.listLoading = true
  119. getPointDetailList(this.listQuery).then(response => {
  120. this.list = response.data.data.items
  121. this.total = response.data.data.total
  122. this.listLoading = false
  123. })
  124. },
  125. handleFilter() {
  126. this.listQuery.page = 1
  127. this.getList()
  128. },
  129. handleSizeChange(val) {
  130. this.listQuery.limit = val
  131. this.getList()
  132. },
  133. handleCurrentChange(val) {
  134. this.listQuery.page = val
  135. this.getList()
  136. },
  137. }
  138. }
  139. </script>
  140. <style>
  141. .ad-avatar-uploader .el-upload {
  142. border: 1px dashed #d9d9d9;
  143. border-radius: 6px;
  144. cursor: pointer;
  145. position: relative;
  146. overflow: hidden;
  147. }
  148. .ad-avatar-uploader .el-upload:hover {
  149. border-color: #409EFF;
  150. }
  151. .ad-avatar-uploader-icon {
  152. font-size: 28px;
  153. color: #8c939d;
  154. width: 178px;
  155. height: 178px;
  156. line-height: 178px;
  157. text-align: center;
  158. }
  159. .ad-avatar {
  160. display: block;
  161. }
  162. </style>