selectCertificate.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <!-- 选择证书 -->
  2. <template>
  3. <div class="page-container selectCertificate-addPage">
  4. <div class="page-form-title-box">
  5. <el-form :model="queryParams" class="form-box" ref="queryForm"
  6. :inline="true" style="width:100%;">
  7. <el-form-item label="" prop="queryParamsData1">
  8. <el-select v-model="queryParams.queryParamsData1" placeholder="是否共享" style="width: 120px">
  9. <el-option label="共享" value="1"/>
  10. <el-option label="不共享" value="2"/>
  11. </el-select>
  12. </el-form-item>
  13. <el-form-item label="" prop="queryParamsData2">
  14. <el-select v-model="queryParams.queryParamsData2" placeholder="考试类型" style="width: 140px">
  15. <el-option
  16. v-for="dict in optionListA"
  17. :key="dict.id"
  18. :label="dict.examTypeName"
  19. :value="dict.id"
  20. />
  21. </el-select>
  22. </el-form-item>
  23. <el-form-item label="" prop="queryParamsData3">
  24. <el-select v-model="queryParams.queryParamsData3" placeholder="颁发单位" style="width: 120px">
  25. <el-option
  26. v-for="dict in optionListB"
  27. :key="dict.deptId"
  28. :label="dict.deptName"
  29. :value="dict.deptId"
  30. />
  31. </el-select>
  32. </el-form-item>
  33. <el-form-item label="" prop="queryParamsData4">
  34. <el-input
  35. maxLength="30"
  36. v-model="queryParams.queryParamsData4"
  37. placeholder="搜索名称"
  38. style="width: 140px"
  39. />
  40. </el-form-item>
  41. <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
  42. <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
  43. </el-form>
  44. </div>
  45. <div class="page-content-box">
  46. <el-table class="table-box" v-loading="loading" border :data="dataList">
  47. <el-table-column label="证书模板名称" prop="name" show-overflow-tooltip/>
  48. <el-table-column label="适用考试类型" prop="content" width="200" show-overflow-tooltip/>
  49. <el-table-column label="是否共享" prop="content" width="200" show-overflow-tooltip>
  50. <template slot-scope="scope">
  51. <span style="padding:2px 10px;border:1px solid rgb(1, 131, 251);border-radius:4px;color: rgb(1, 131, 251);background-color:rgba(1, 131, 251,0.2)">共享</span>
  52. <span style="padding:2px 10px;border:1px solid rgb(245, 154, 35);border-radius:4px;color: rgb(245, 154, 35);background-color:rgba(245, 154, 35,0.2)">不共享</span>
  53. </template>
  54. </el-table-column>
  55. <el-table-column label="颁发单位" prop="content" width="200" show-overflow-tooltip/>
  56. <el-table-column label="更新人" prop="content" width="200" show-overflow-tooltip/>
  57. <el-table-column label="操作" width="200" show-overflow-tooltip>
  58. <template slot-scope="scope">
  59. <div class="table-button-box">
  60. <p class="table-button-null"></p>
  61. <p class="table-button-p"
  62. @click="checkButton(scope.row)"
  63. >选择</p>
  64. <p class="table-button-null"></p>
  65. </div>
  66. </template>
  67. </el-table-column>
  68. </el-table>
  69. <pagination :page-sizes="[20, 30, 40, 50]"
  70. v-show="total>0"
  71. :total="total"
  72. :page.sync="queryParams.page"
  73. :limit.sync="queryParams.pageSize"
  74. @pagination="getList"
  75. />
  76. </div>
  77. </div>
  78. </template>
  79. <script>
  80. import { examElExamTypeList,systemDeptCurrentDept, } from "@/api/safetyEducationExaminationNew/index";
  81. export default {
  82. name: 'addPage',
  83. props: {
  84. propsData: {}
  85. },
  86. data() {
  87. return {
  88. //页面遮罩
  89. loading:false,
  90. //下拉列表数据
  91. optionListA:[],
  92. optionListB:[],
  93. //查询条件
  94. queryParams:{
  95. page:1,
  96. pageSize:20,
  97. queryParamsData1:null,
  98. queryParamsData2 :null,
  99. queryParamsData3 :null,
  100. queryParamsData4 :'',
  101. },
  102. //列表数据
  103. dataList:[{}],
  104. //数据数量
  105. total:0,
  106. }
  107. },
  108. created() {
  109. },
  110. mounted() {
  111. this.examElExamTypeList();
  112. this.systemDeptCurrentDept();
  113. },
  114. methods: {
  115. // 提交按钮
  116. checkButton(row) {
  117. this.$parent.$parent.drawerOffButton()
  118. },
  119. //查询按钮
  120. handleQuery(){
  121. this.$set(this.queryParams,'page',1);
  122. this.getList();
  123. },
  124. //重置按钮
  125. resetQuery(){
  126. this.$set(this,'queryParams',{
  127. page:1,
  128. pageSize:20,
  129. queryParamsData1:null,
  130. queryParamsData2 :null,
  131. queryParamsData3 :null,
  132. queryParamsData4 :'',
  133. });
  134. this.getList();
  135. },
  136. //获取数据列表
  137. getList(){
  138. this.$set(this,'loading',true);
  139. let obj = JSON.parse(JSON.stringify(this.queryParams))
  140. getListFunction(obj).then(response => {
  141. this.$set(this,'loading',false);
  142. this.$set(this,'dataList',response.data.records);
  143. this.$set(this,'total',response.data.total);
  144. });
  145. },
  146. //查询全部考试类型
  147. examElExamTypeList(){
  148. examElExamTypeList({}).then(response => {
  149. this.$set(this,'optionListA',response.data);
  150. });
  151. },
  152. //学院列表
  153. systemDeptCurrentDept(){
  154. systemDeptCurrentDept({}).then(response => {
  155. this.$set(this,'optionListB',response.data);
  156. });
  157. },
  158. }
  159. }
  160. </script>
  161. <style scoped lang="scss">
  162. .selectCertificate-addPage {
  163. flex:1;
  164. display: flex;
  165. flex-direction: column;
  166. overflow: hidden;
  167. }
  168. </style>