blackListInfo.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <!--黑名单历史记录-->
  2. <template>
  3. <div class="blackListInfo">
  4. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
  5. <el-form-item class="button-box">
  6. <p class="reset-button-one" @click="backPage"><i class="el-icon-arrow-left"></i>返回</p>
  7. </el-form-item>
  8. <el-form-item label="状态" prop="overStatus" label-width="50px">
  9. <el-select v-model="queryParams.overStatus" clearable placeholder="请选择状态">
  10. <el-option
  11. v-for="dict in overStatusOptions"
  12. :key="dict.id"
  13. :label="dict.name"
  14. :value="dict.id"
  15. ></el-option>
  16. </el-select>
  17. </el-form-item>
  18. <el-form-item label="学期" prop="semesterId" label-width="50px">
  19. <el-select v-model="queryParams.semesterId" clearable placeholder="请选择学期">
  20. <el-option
  21. v-for="dict in semesterOptions"
  22. :key="dict.id"
  23. :label="dict.semesterName"
  24. :value="dict.id"
  25. ></el-option>
  26. </el-select>
  27. </el-form-item>
  28. <el-form-item label="创建时间" prop="dateRange" style="margin-left:10px;">
  29. <el-date-picker
  30. :clearable="false"
  31. v-model="dateRange"
  32. size="small"
  33. style="width: 240px"
  34. value-format="yyyy-MM-dd"
  35. type="daterange"
  36. range-separator="-"
  37. start-placeholder="开始日期"
  38. end-placeholder="结束日期"
  39. ></el-date-picker>
  40. </el-form-item>
  41. <el-form-item>
  42. <p class="inquire-button-one" @click="handleQuery">查询</p>
  43. <p class="reset-button-one" @click="resetQuery">重置</p>
  44. </el-form-item>
  45. </el-form>
  46. <el-table v-loading="loading" border :data="recordList">
  47. <el-table-column label="姓名" align="left" prop="nickName" />
  48. <el-table-column label="原因" align="left" prop="reason" />
  49. <el-table-column label="时间" align="left" prop="createTime" />
  50. <el-table-column label="处理方式" align="left" prop="treatmentMethod" />
  51. <el-table-column label="处理状态" align="left" prop="surplusPoints">
  52. <template slot-scope="scope">
  53. <div class="scope-big-box" v-if="scope.row.learnStatus == 0 || scope.row.learnStatus == 1">
  54. <p>学习</p>
  55. <p :class="scope.row.learnStatus == 0 ?'scopeColorA':(scope.row.learnStatus == 1 ?'scopeColorB':'')">{{scope.row.learnStatus == 0 ?'未完成':(scope.row.learnStatus == 1 ?'已完成':'')}}</p>
  56. </div>
  57. <div class="scope-big-box" v-if="scope.row.practiceStatus == 0 || scope.row.practiceStatus == 1">
  58. <p>做题</p>
  59. <p :class="scope.row.practiceStatus == 0 ?'scopeColorA':(scope.row.practiceStatus == 1 ?'scopeColorB':'')">{{scope.row.practiceStatus == 0 ?'未完成':(scope.row.practiceStatus == 1 ?'已完成':'')}}</p>
  60. </div>
  61. <div class="scope-big-box" v-if="scope.row.testStatus == 0 || scope.row.testStatus == 1">
  62. <p>考试</p>
  63. <p :class="scope.row.testStatus == 0 ?'scopeColorA':(scope.row.testStatus == 1 ?'scopeColorB':'')">{{scope.row.testStatus == 0 ?'未完成':(scope.row.testStatus == 1 ?'已完成':'')}}</p>
  64. </div>
  65. </template>
  66. </el-table-column>
  67. <el-table-column label="信用分" align="left" prop="creditScore" />
  68. </el-table>
  69. <pagination
  70. v-show="total>0"
  71. :total="total"
  72. layout="total, prev, pager, next, sizes, jumper"
  73. :page.sync="queryParams.pageNum"
  74. :limit.sync="queryParams.pageSize"
  75. @pagination="getList"
  76. />
  77. </div>
  78. </template>
  79. <script>
  80. import { getBlackDetail } from "@/api/laboratory/blacklist";
  81. import { getSemesterList } from "@/api/laboratory/semester";
  82. export default {
  83. props: {
  84. propsData:{},
  85. },
  86. name: "blackListInfo",
  87. data() {
  88. return {
  89. //加载状态
  90. loading:false,
  91. // 显示搜索条件
  92. showSearch: true,
  93. // 查询参数
  94. queryParams: {
  95. pageNum: 1,
  96. pageSize:20,
  97. points: null,
  98. joinUserId: null,
  99. mode: null,
  100. deptName: null,
  101. deptId: null,
  102. userId: null,
  103. semesterId: null,
  104. overStatus: null
  105. },
  106. //状态条件
  107. overStatusOptions:[
  108. {id:1,name:"已完成"},
  109. {id:0,name:"未完成"},
  110. ],
  111. //列表数据
  112. recordList:[],
  113. total:0,
  114. // 日期范围
  115. dateRange: [],
  116. //学期列表
  117. semesterOptions:[],
  118. }
  119. },
  120. created(){
  121. this.getList()
  122. },
  123. mounted(){
  124. this.getSemesterList()
  125. },
  126. methods:{
  127. //返回上级页面
  128. backPage(){
  129. this.$parent.goPage(1);
  130. },
  131. /** 查询数据 */
  132. getList() {
  133. this.loading = true;
  134. if(this.dateRange&&this.dateRange.length>0)
  135. {
  136. this.queryParams.beginTime=this.dateRange[0]
  137. this.queryParams.endTime=this.dateRange[1]
  138. }
  139. else
  140. {
  141. this.queryParams.beginTime=null;
  142. this.queryParams.endTime=null
  143. }
  144. this.queryParams.blackId = this.propsData.userId;
  145. getBlackDetail(this.queryParams).then( response => {
  146. this.recordList = response.rows;
  147. this.total = response.total;
  148. this.loading = false;
  149. });
  150. },
  151. /** 查询学期列表 */
  152. getSemesterList() {
  153. getSemesterList().then(response => {
  154. this.$set(this, 'semesterOptions', response.data)
  155. });
  156. },
  157. /** 搜索按钮操作 */
  158. handleQuery() {
  159. this.queryParams.pageNum = 1;
  160. this.getList();
  161. },
  162. /** 重置按钮操作 */
  163. resetQuery() {
  164. this.resetForm("queryParams");
  165. this.dateRange = [];
  166. this.queryParams = {};
  167. this.recordList = [];
  168. this.handleQuery();
  169. },
  170. },
  171. }
  172. </script>
  173. <style scoped lang="scss">
  174. .blackListInfo{
  175. flex:1;
  176. display: flex!important;
  177. flex-direction: column;
  178. .scope-big-box{
  179. display: flex;
  180. p{
  181. font-size:14px;
  182. height:20px;
  183. line-height:20px;
  184. margin:4px 0;
  185. }
  186. p:nth-child(1){
  187. margin-right:10px;
  188. }
  189. p:nth-child(2){
  190. }
  191. .scopeColorA{
  192. padding:0 4px;
  193. border-radius:4px;
  194. color:#999;
  195. background: #dedede;
  196. }
  197. .scopeColorB{
  198. padding:0 4px;
  199. border-radius:4px;
  200. color:#fff;
  201. background: #39A922;
  202. }
  203. }
  204. }
  205. </style>