cannotListPage.vue 6.2 KB

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