rectificationUserPage.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <div class="rectificationUserPage">
  3. <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true">
  4. <el-form-item label="关键字" prop="searchValue" label-width="80px">
  5. <el-input
  6. maxLength="30"
  7. v-model="queryParams.searchValue"
  8. placeholder="实验室/房间号/姓名"
  9. clearable
  10. style="width: 200px"/>
  11. </el-form-item>
  12. <el-form-item label="学院" prop="deptId" label-width="50px">
  13. <el-select v-model="queryParams.deptId" clearable placeholder="请选择学院">
  14. <el-option
  15. v-for="item in deptSelectList"
  16. :key="item.deptId"
  17. :label="item.deptName"
  18. :value="item.deptId">
  19. </el-option>
  20. </el-select>
  21. </el-form-item>
  22. <el-form-item>
  23. <p class="inquire-button-one" @click="handleQuery" style="margin-right:10px;">查询</p>
  24. <p class="reset-button-one" @click="resetQuery">重置</p>
  25. </el-form-item>
  26. <el-form-item style="float: right;">
  27. <el-col :span="1.5">
  28. <p class="inquire-button-one"
  29. style="width:100px;"
  30. @click="configButton(1)"
  31. >检查者配置</p>
  32. </el-col>
  33. </el-form-item>
  34. </el-form>
  35. <el-table border :data="tableList" ref="multipleTable">
  36. <el-table-column label="序号" align="center" type="index" width="60" />
  37. <el-table-column label="实验室" align="center" prop="subName" show-overflow-tooltip/>
  38. <el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip width="300"/>
  39. <el-table-column label="检查者" align="center" prop="nickNames" show-overflow-tooltip width="300"/>
  40. <el-table-column label="操作人" align="center" prop="createName" show-overflow-tooltip width="200"/>
  41. <el-table-column label="操作时间" align="center" prop="createTime" show-overflow-tooltip width="300"/>
  42. </el-table>
  43. <pagination :page-sizes="[20, 30, 40, 50]"
  44. v-show="total>0"
  45. :total="total"
  46. :page.sync="queryParams.pageNum"
  47. :limit.sync="queryParams.pageSize"
  48. @pagination="getList"
  49. />
  50. <configDialog v-if="configDialogType" :configDialogData="configDialogData"></configDialog>
  51. </div>
  52. </template>
  53. <script>
  54. import { listDepartments } from "@/api/system/dept";
  55. import { checkStaffList } from '@/api/safetyCheck/index'
  56. import configDialog from './configDialog.vue'
  57. export default {
  58. name: 'rectificationUserPage',
  59. components: {
  60. configDialog
  61. },
  62. data(){
  63. return{
  64. // 组件数据
  65. configDialogType:false,
  66. configDialogData:{
  67. configType:2,//1.检查人员配置 2.整改人员配置
  68. },
  69. //查询数据
  70. deptSelectList:[],
  71. queryParams:{
  72. pageNum:1,
  73. pageSize:20,
  74. searchValue:"",
  75. deptId:""
  76. },
  77. tableList:[{}],
  78. total:0,
  79. }
  80. },
  81. created(){
  82. },
  83. mounted(){
  84. this.listDepartments();
  85. this.getList();
  86. },
  87. methods:{
  88. //配置按钮
  89. configButton(type){
  90. if(type == 1){
  91. this.$set(this,'configDialogType',true);
  92. }else if(type == 2){
  93. this.$set(this,'configDialogType',false);
  94. }
  95. },
  96. //获取数据列表
  97. getList(){
  98. checkStaffList(this.queryParamsData).then(response => {
  99. this.total = response.total;
  100. this.tableList = response.rows;
  101. });
  102. },
  103. /** 搜索按钮操作 */
  104. handleQuery() {
  105. this.$set(this.queryParams,'pageNum',1);
  106. this.getList();
  107. },
  108. /** 重置按钮操作 */
  109. resetQuery() {
  110. this.$set(this,'queryParams',{
  111. pageNum:1,
  112. pageSize:20,
  113. searchValue:"",
  114. deptId:""
  115. });
  116. this.handleQuery();
  117. },
  118. //获取学院列表
  119. listDepartments(){
  120. listDepartments().then(response => {
  121. this.deptSelectList = response.data;
  122. });
  123. },
  124. }
  125. }
  126. </script>
  127. <style scoped lang="scss">
  128. .rectificationUserPage{
  129. padding:20px;
  130. flex:1;
  131. display: flex;
  132. flex-direction: column;
  133. overflow: hidden;
  134. }
  135. </style>