cannotListPage.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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.buttonType==1?'checkDiv':''" @click="topLeftClickType(1)">
  9. <p class="text-p">校院巡查</p>
  10. </div>
  11. <div :class="queryParams.buttonType==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="deptName" show-overflow-tooltip/>
  48. <el-table-column label="检查类型" align="center" prop="deptName" show-overflow-tooltip width="180"/>
  49. <el-table-column label="实验室" align="center" prop="deptName" show-overflow-tooltip width="240"/>
  50. <el-table-column label="检查时间" sortable align="center" prop="deptName" show-overflow-tooltip width="160"/>
  51. <el-table-column label="处理人" align="center" prop="deptName" show-overflow-tooltip width="90"/>
  52. <el-table-column label="原因描述" align="center" prop="deptName" show-overflow-tooltip width="435"/>
  53. <el-table-column label="操作" align="center" prop="deptName" width="80">
  54. <template slot-scope="scope">
  55. <div class="table-button-box">
  56. <p class="table-button-null"></p>
  57. <p class="table-button-p" @click="addDialogOpen(true,scope.row)">详情</p>
  58. <p class="table-button-null"></p>
  59. </div>
  60. </template>
  61. </el-table-column>
  62. </el-table>
  63. <pagination :page-sizes="[20, 30, 40, 50]"
  64. v-show="total>0"
  65. :total="total"
  66. :page.sync="queryParams.pageNum"
  67. :limit.sync="queryParams.pageSize"
  68. @pagination="getList"
  69. />
  70. </div>
  71. <infoDialog v-if="infoDialogType"></infoDialog>
  72. </div>
  73. </template>
  74. <script>
  75. import infoDialog from '@/views/safetyCheck/components/infoDialog/infoDialog.vue'
  76. export default {
  77. name: 'cannotListPage',
  78. components: {
  79. infoDialog
  80. },
  81. data(){
  82. return{
  83. infoDialogType:false,
  84. queryParams:{
  85. pageNum:1,
  86. pageSize:20,
  87. buttonType:1,
  88. safetyType:"",
  89. timeType:0,
  90. searchValue:"",
  91. data1:""
  92. },
  93. dateRange:[],
  94. tableList:[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},],
  95. total:0,
  96. }
  97. },
  98. created(){},
  99. mounted(){},
  100. methods:{
  101. //开关详情页面
  102. addDialogOpen(type,data){
  103. if(this.infoDialogType != type){
  104. this.$set(this,'infoDialogType',type);
  105. }
  106. },
  107. //范围选择
  108. topLeftClickType(type){
  109. if(this.queryParams.buttonType != type){
  110. this.$set(this.queryParams,'buttonType',type);
  111. this.getList();
  112. }
  113. },
  114. //时间排序方法
  115. sortChange(val){
  116. //ascending 上 descending 下 null 无
  117. console.log('val',val.order)
  118. this.$set(this.queryParams,'timeType',val.order=='ascending'?1:(val.order=='descending'?2:''));
  119. },
  120. //获取数据列表
  121. getList(){
  122. // this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
  123. // this.queryParamsData.type = 'RFID_RECOGNIZER';
  124. // listHardware(this.queryParamsData).then(response => {
  125. // this.total = response.total;
  126. // this.tableList = response.rows;
  127. // });
  128. },
  129. /** 搜索按钮操作 */
  130. handleQuery() {
  131. this.$set(this.queryParams,'pageNum',1);
  132. this.getList();
  133. },
  134. /** 重置按钮操作 */
  135. resetQuery() {
  136. this.$set(this,'dateRange',[]);
  137. this.$set(this,'queryParams',{
  138. pageNum:1,
  139. pageSize:20,
  140. buttonType:1,
  141. timeType:0,
  142. searchValue:"",
  143. data1:""
  144. });
  145. this.handleQuery();
  146. },
  147. },
  148. }
  149. </script>
  150. <style scoped lang="scss">
  151. .cannotListPage{
  152. flex: 1;
  153. display: flex !important;
  154. flex-direction: column;
  155. overflow: hidden;
  156. .title-box{
  157. padding-top:20px;
  158. .form-button-max-big-box{
  159. display: inline-block;
  160. .form-button-big-box{
  161. display: flex;
  162. div{
  163. position: relative;
  164. height:40px;
  165. width:100px;
  166. line-height: 40px;
  167. text-align: center;
  168. color:#0045AF;
  169. font-size:14px;
  170. border:1px solid #0045AF;
  171. border-radius:4px;
  172. margin-left:10px;
  173. font-weight:500;
  174. cursor: pointer;
  175. }
  176. .checkDiv{
  177. color:#fff;
  178. background-color:#0045AF;
  179. border:1px solid #0045AF;
  180. }
  181. }
  182. }
  183. }
  184. .content-box{
  185. flex: 1;
  186. display: flex;
  187. flex-direction: column;
  188. padding:0 20px 20px;
  189. overflow: hidden;
  190. }
  191. }
  192. </style>