cannotListPage.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <!--暂无法整改隐患-->
  2. <template>
  3. <div class="cannotListPage">
  4. <div class="title-box">
  5. <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
  6. <div class="form-button-max-big-box">
  7. <div class="form-button-big-box" style="margin-left:10px;">
  8. <div :class="queryParams.hazardType==1?'checkDiv':''" @click="topLeftClickType(1)">
  9. <p class="text-p">校院巡查</p>
  10. </div>
  11. <div :class="queryParams.hazardType==2?'checkDiv':''" @click="topLeftClickType(2)">
  12. <p class="text-p">实验室自查</p>
  13. </div>
  14. </div>
  15. </div>
  16. <el-form-item label="关键字" prop="searchValue">
  17. <el-input
  18. maxLength="30"
  19. v-model="queryParams.searchValue"
  20. placeholder="计划标题/实验室/房间号"
  21. clearable
  22. style="width: 200px"
  23. />
  24. </el-form-item>
  25. <el-form-item label="处置时间" prop="dateRange" style="margin-left:10px;" label-width="70px">
  26. <el-date-picker
  27. :clearable="false"
  28. v-model="dateRange"
  29. size="small"
  30. style="width: 240px"
  31. value-format="yyyy-MM-dd"
  32. type="daterange"
  33. range-separator="-"
  34. start-placeholder="开始日期"
  35. end-placeholder="结束日期"
  36. ></el-date-picker>
  37. </el-form-item>
  38. <el-form-item>
  39. <p class="inquire-button-one" @click="handleQuery" style="margin-right:10px;">查询</p>
  40. <p class="reset-button-one" @click="resetQuery">重置</p>
  41. </el-form-item>
  42. </el-form>
  43. </div>
  44. <div class="content-box">
  45. <el-table border :data="tableList" ref="multipleTable" @sort-change="sortChange">
  46. <el-table-column label="序号" align="center" type="index" width="60" />
  47. <el-table-column label="计划标题" align="center" prop="title" show-overflow-tooltip/>
  48. <el-table-column label="检查类型" align="center" prop="deptName" show-overflow-tooltip width="180">
  49. <template slot-scope="scope">
  50. {{scope.row.hazardType == 1?'校院巡查':(scope.row.hazardType == 2?'实验室自查':'')}}
  51. </template>
  52. </el-table-column>
  53. <el-table-column label="实验室" align="center" prop="subRoom" show-overflow-tooltip width="240"/>
  54. <el-table-column label="检查时间" sortable align="center" prop="checkTime" show-overflow-tooltip width="160"/>
  55. <el-table-column label="处理人" align="center" prop="rectifyName" show-overflow-tooltip width="90"/>
  56. <el-table-column label="原因描述" align="center" prop="rectifyMeasure" show-overflow-tooltip width="435"/>
  57. <el-table-column label="操作" align="center" width="80">
  58. <template slot-scope="scope">
  59. <div class="table-button-box">
  60. <p class="table-button-null"></p>
  61. <p class="table-button-p" @click="addDialogOpen(true,scope.row)">详情</p>
  62. <p class="table-button-null"></p>
  63. </div>
  64. </template>
  65. </el-table-column>
  66. </el-table>
  67. <pagination :page-sizes="[20, 30, 40, 50]"
  68. v-show="total>0"
  69. :total="total"
  70. :page.sync="queryParams.pageNum"
  71. :limit.sync="queryParams.pageSize"
  72. @pagination="getList"
  73. />
  74. </div>
  75. <infoDialog v-if="infoDialogType" :propsInfoDialogData="propsInfoDialogData"></infoDialog>
  76. </div>
  77. </template>
  78. <script>
  79. import { unableRectifyList } from '@/api/safetyCheck/index'
  80. import infoDialog from '@/views/safetyCheck/components/infoDialog/infoDialog.vue'
  81. export default {
  82. name: 'cannotListPage',
  83. components: {
  84. infoDialog
  85. },
  86. data(){
  87. return{
  88. propsInfoDialogData:{},
  89. infoDialogType:false,
  90. queryParams:{
  91. pageNum:1,
  92. pageSize:20,
  93. rectifyStatus:4,
  94. hazardType:1,
  95. searchValue:"",
  96. checkTimeOrder:"",
  97. },
  98. dateRange:[],
  99. tableList:[],
  100. total:0,
  101. }
  102. },
  103. created(){},
  104. mounted(){
  105. this.getList();
  106. },
  107. methods:{
  108. //开关详情页面
  109. addDialogOpen(type,data){
  110. if(this.infoDialogType != type){
  111. if(type){
  112. let obj = {
  113. id:data.id
  114. }
  115. this.$set(this,'propsInfoDialogData',obj);
  116. this.$set(this,'infoDialogType',type);
  117. }else{
  118. this.getList();
  119. this.$set(this,'infoDialogType',type);
  120. }
  121. }
  122. },
  123. //范围选择
  124. topLeftClickType(type){
  125. if(this.queryParams.hazardType != type){
  126. this.$set(this.queryParams,'hazardType',type);
  127. this.getList();
  128. }
  129. },
  130. //时间排序方法
  131. sortChange(val){
  132. //ascending 上 descending 下 null 无
  133. console.log('val',val.order)
  134. this.$set(this.queryParams,'timeType',val.order=='ascending'?1:(val.order=='descending'?2:''));
  135. },
  136. //获取数据列表
  137. getList(){
  138. let obj = JSON.parse(JSON.stringify(this.queryParams))
  139. if(this.dateRange[0]){
  140. obj.beginTime = this.dateRange[0];
  141. }else{
  142. obj.beginTime = "";
  143. }
  144. if(this.dateRange[1]){
  145. obj.endTime = this.dateRange[1];
  146. }else{
  147. obj.endTime = "";
  148. }
  149. unableRectifyList(obj).then(response => {
  150. this.total = response.data.total;
  151. this.tableList = response.data.records;
  152. });
  153. },
  154. /** 搜索按钮操作 */
  155. handleQuery() {
  156. this.$set(this.queryParams,'pageNum',1);
  157. this.getList();
  158. },
  159. /** 重置按钮操作 */
  160. resetQuery() {
  161. this.$set(this,'dateRange',[]);
  162. this.$set(this,'queryParams',{
  163. pageNum:1,
  164. pageSize:20,
  165. rectifyStatus:4,
  166. hazardType:1,
  167. searchValue:"",
  168. checkTimeOrder:"",
  169. });
  170. this.handleQuery();
  171. },
  172. },
  173. }
  174. </script>
  175. <style scoped lang="scss">
  176. .cannotListPage{
  177. flex: 1;
  178. display: flex !important;
  179. flex-direction: column;
  180. overflow: hidden;
  181. .title-box{
  182. padding-top:20px;
  183. .form-button-max-big-box{
  184. display: inline-block;
  185. .form-button-big-box{
  186. display: flex;
  187. div{
  188. position: relative;
  189. height:40px;
  190. width:100px;
  191. line-height: 40px;
  192. text-align: center;
  193. color:#0045AF;
  194. font-size:14px;
  195. border:1px solid #0045AF;
  196. border-radius:4px;
  197. margin-left:10px;
  198. font-weight:500;
  199. cursor: pointer;
  200. }
  201. .checkDiv{
  202. color:#fff;
  203. background-color:#0045AF;
  204. border:1px solid #0045AF;
  205. }
  206. }
  207. }
  208. }
  209. .content-box{
  210. flex: 1;
  211. display: flex;
  212. flex-direction: column;
  213. padding:0 20px 20px;
  214. overflow: hidden;
  215. }
  216. }
  217. </style>