schoolListPage.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <!--校院巡查隐患-->
  2. <template>
  3. <div class="schoolListPage">
  4. <div class="schoolListPage-page" v-if="minPageType == 1">
  5. <div class="title-box">
  6. <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
  7. <div class="form-button-max-big-box">
  8. <div class="form-button-big-box" style="margin-left:10px;">
  9. <div :class="queryParams.buttonType==1?'checkDiv':''" @click="topLeftClickType(1)">
  10. <p class="text-p">全部</p>
  11. <p class="el-icon-check icon-p" v-if="queryParams.buttonType==1"></p>
  12. </div>
  13. <div :class="queryParams.buttonType==2?'checkDiv':''" @click="topLeftClickType(2)">
  14. <p class="text-p">待检查</p>
  15. <p class="el-icon-check icon-p" v-if="queryParams.buttonType==2"></p>
  16. </div>
  17. <div :class="queryParams.buttonType==3?'checkDiv':''" @click="topLeftClickType(3)">
  18. <p class="text-p">检查中</p>
  19. <p class="el-icon-check icon-p" v-if="queryParams.buttonType==3"></p>
  20. </div>
  21. <div :class="queryParams.buttonType==4?'checkDiv':''" @click="topLeftClickType(4)">
  22. <p class="text-p">已检查</p>
  23. <p class="el-icon-check icon-p" v-if="queryParams.buttonType==4"></p>
  24. </div>
  25. </div>
  26. </div>
  27. <el-form-item label="关键字" prop="searchValue">
  28. <el-input
  29. maxLength="30"
  30. v-model="queryParams.searchValue"
  31. placeholder="计划标题/实验室/房间号"
  32. clearable
  33. style="width: 200px"
  34. />
  35. </el-form-item>
  36. <el-form-item label="整改时间" prop="dateRange" style="margin-left:10px;" label-width="70px">
  37. <el-date-picker
  38. :clearable="false"
  39. v-model="dateRange"
  40. size="small"
  41. style="width: 240px"
  42. value-format="yyyy-MM-dd"
  43. type="daterange"
  44. range-separator="-"
  45. start-placeholder="开始日期"
  46. end-placeholder="结束日期"
  47. ></el-date-picker>
  48. </el-form-item>
  49. <el-form-item label="审核状态" prop="safetyType">
  50. <el-select v-model="queryParams.safetyType" placeholder="请选择" style="width: 160px">
  51. <el-option
  52. v-for="item in options"
  53. :key="item.value"
  54. :label="item.label"
  55. :value="item.value">
  56. </el-option>
  57. </el-select>
  58. </el-form-item>
  59. <el-form-item>
  60. <p class="inquire-button-one" @click="handleQuery" style="margin-right:10px;">查询</p>
  61. <p class="reset-button-one" @click="resetQuery">重置</p>
  62. </el-form-item>
  63. <el-form-item style="float: right;">
  64. <el-col :span="1.5">
  65. <p class="inquire-button-one"
  66. style="width:90px;"
  67. @click="goPage(2)"
  68. >批量审核</p>
  69. </el-col>
  70. </el-form-item>
  71. </el-form>
  72. </div>
  73. <div class="content-box">
  74. <el-table border :data="tableList" ref="multipleTable" @sort-change="sortChange">
  75. <el-table-column label="序号" align="center" type="index" width="60" />
  76. <el-table-column label="计划标题" align="center" prop="deptName" show-overflow-tooltip/>
  77. <el-table-column label="隐患描述" align="center" prop="deptName" show-overflow-tooltip width="250"/>
  78. <el-table-column label="实验室" align="center" prop="deptName" show-overflow-tooltip width="200"/>
  79. <el-table-column label="检查时间" sortable align="center" prop="deptName" show-overflow-tooltip width="160"/>
  80. <el-table-column label="整改人" align="center" prop="deptName" show-overflow-tooltip width="90"/>
  81. <el-table-column label="整改期限" sortable align="center" prop="deptName" show-overflow-tooltip width="130"/>
  82. <el-table-column label="整改状态" align="center" prop="deptName" show-overflow-tooltip width="110"/>
  83. <el-table-column label="整改时间" sortable align="center" prop="deptName" show-overflow-tooltip width="160"/>
  84. <el-table-column label="审核状态" align="center" prop="deptName" show-overflow-tooltip width="80"/>
  85. <el-table-column label="操作" align="center" prop="deptName" width="80">
  86. <template slot-scope="scope">
  87. <div class="table-button-box">
  88. <p class="table-button-null"></p>
  89. <p class="table-button-p" @click="addDialogOpen(true,scope.row)">详情</p>
  90. <p class="table-button-null"></p>
  91. </div>
  92. </template>
  93. </el-table-column>
  94. </el-table>
  95. <pagination :page-sizes="[20, 30, 40, 50]"
  96. v-show="total>0"
  97. :total="total"
  98. :page.sync="queryParams.pageNum"
  99. :limit.sync="queryParams.pageSize"
  100. @pagination="getList"
  101. />
  102. </div>
  103. </div>
  104. <batchAudit v-if="minPageType == 2"></batchAudit>
  105. <infoDialog v-if="infoDialogType"></infoDialog>
  106. </div>
  107. </template>
  108. <script>
  109. import batchAudit from './batchAudit.vue'
  110. import infoDialog from '@/views/safetyCheck/components/infoDialog/infoDialog.vue'
  111. export default {
  112. name: 'schoolListPage',
  113. components: {
  114. batchAudit,
  115. infoDialog
  116. },
  117. data(){
  118. return{
  119. minPageType:1,
  120. infoDialogType:false,
  121. options:[
  122. {value:"待审核",label:"0"},
  123. {value:"已通过",label:"1"},
  124. {value:"已驳回",label:"2"},
  125. ],
  126. queryParams:{
  127. pageNum:1,
  128. pageSize:20,
  129. buttonType:1,
  130. safetyType:"",
  131. timeType:0,
  132. searchValue:"",
  133. data1:""
  134. },
  135. dateRange:[],
  136. tableList:[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},],
  137. total:0,
  138. }
  139. },
  140. created(){},
  141. mounted(){},
  142. methods:{
  143. //开关详情页面
  144. addDialogOpen(type,data){
  145. if(this.infoDialogType != type){
  146. this.$set(this,'infoDialogType',type);
  147. }
  148. },
  149. //页面切换
  150. goPage(type){
  151. if(this.minPageType != type){
  152. this.$set(this,'minPageType',type);
  153. }
  154. },
  155. //范围选择
  156. topLeftClickType(type){
  157. if(this.queryParams.buttonType != type){
  158. this.$set(this.queryParams,'buttonType',type);
  159. this.getList();
  160. }
  161. },
  162. //时间排序方法
  163. sortChange(val){
  164. //ascending 上 descending 下 null 无
  165. console.log('val',val.order)
  166. this.$set(this.queryParams,'timeType',val.order=='ascending'?1:(val.order=='descending'?2:''));
  167. },
  168. //获取数据列表
  169. getList(){
  170. // this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
  171. // this.queryParamsData.type = 'RFID_RECOGNIZER';
  172. // listHardware(this.queryParamsData).then(response => {
  173. // this.total = response.total;
  174. // this.tableList = response.rows;
  175. // });
  176. },
  177. /** 搜索按钮操作 */
  178. handleQuery() {
  179. this.$set(this.queryParams,'pageNum',1);
  180. this.getList();
  181. },
  182. /** 重置按钮操作 */
  183. resetQuery() {
  184. this.$set(this,'dateRange',[]);
  185. this.$set(this,'queryParams',{
  186. pageNum:1,
  187. pageSize:20,
  188. buttonType:1,
  189. timeType:0,
  190. searchValue:"",
  191. data1:""
  192. });
  193. this.handleQuery();
  194. },
  195. },
  196. }
  197. </script>
  198. <style scoped lang="scss">
  199. .schoolListPage{
  200. flex: 1;
  201. display: flex !important;
  202. flex-direction: column;
  203. overflow: hidden;
  204. .schoolListPage-page{
  205. flex: 1;
  206. display: flex !important;
  207. flex-direction: column;
  208. overflow: hidden;
  209. .title-box{
  210. padding-top:20px;
  211. .form-button-max-big-box{
  212. display: inline-block;
  213. .form-button-big-box{
  214. display: flex;
  215. div{
  216. position: relative;
  217. height:40px;
  218. width:80px;
  219. line-height: 40px;
  220. text-align: center;
  221. color:#999;
  222. font-size:14px;
  223. border:1px solid #999;
  224. border-radius:4px;
  225. margin-left:10px;
  226. font-weight:500;
  227. cursor: pointer;
  228. .icon-p{
  229. width:15px;
  230. height:15px;
  231. line-height:15px;
  232. text-align: center;
  233. position: absolute;
  234. right:0;
  235. bottom:0;
  236. color:#fff;
  237. background: #0183fa;
  238. border-top-left-radius:4px;
  239. }
  240. }
  241. .checkDiv{
  242. color:#0183FA;
  243. border:1px solid #0183FA;
  244. }
  245. }
  246. }
  247. }
  248. .content-box{
  249. flex: 1;
  250. display: flex;
  251. flex-direction: column;
  252. padding:0 20px 20px;
  253. overflow: hidden;
  254. }
  255. }
  256. }
  257. </style>