unsubmittedPageList.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <!--未提交检查列表-->
  2. <template>
  3. <div class="unsubmittedPageList">
  4. <div class="unsubmittedPageList-page" v-if="pageType == 1">
  5. <el-form :model="queryParams" ref="queryForm" style="margin-top:20px;" :inline="true" v-show="showSearch">
  6. <el-form-item label="关键字" prop="searchValue" label-width="70px">
  7. <el-input
  8. style="width:230px;"
  9. v-model="queryParams.searchValue"
  10. placeholder="请输入实验室/负责人/检查单号"
  11. clearable
  12. size="small"
  13. maxLength="20"
  14. />
  15. </el-form-item>
  16. <el-form-item label="整改类型" prop="zgType" label-width="80px">
  17. <el-select v-model="queryParams.zgType" placeholder="请选择整改类型" clearable size="small">
  18. <el-option label="一般整改" value="0" />
  19. <el-option label="重大整改" value="1" />
  20. </el-select>
  21. </el-form-item>
  22. <el-form-item label="检查时间" label-width="80px">
  23. <el-date-picker
  24. :clearable="false"
  25. v-model="dateRange"
  26. size="small"
  27. style="width: 240px"
  28. value-format="yyyy-MM-dd"
  29. type="daterange"
  30. range-separator="-"
  31. start-placeholder="开始日期"
  32. end-placeholder="结束日期"
  33. ></el-date-picker>
  34. </el-form-item>
  35. <el-form-item>
  36. <p class="inquire-button-one" @click="handleQuery">查询</p>
  37. <p class="reset-button-one" @click="resetQuery">重置</p>
  38. </el-form-item>
  39. <el-form-item style="float: right;">
  40. <el-col :span="1.5">
  41. <p class="reset-button-one"
  42. @click="backPage"
  43. >返回</p>
  44. </el-col>
  45. </el-form-item>
  46. </el-form>
  47. <el-table v-loading="loading" border :data="checkRecordList">
  48. <el-table-column label="检查单号" align="left" prop="checkNum" width="200px" show-overflow-tooltip/>
  49. <el-table-column label="实验室名称" align="left" prop="laboratoryName" show-overflow-tooltip/>
  50. <el-table-column label="实验楼" align="left" prop="buildingName" width="200px" show-overflow-tooltip/>
  51. <el-table-column label="房间号" align="left" prop="fjNumber" width="180px"/>
  52. <el-table-column label="隐患数" align="left" prop="countYh" width="128px">
  53. <template slot-scope="scope">
  54. <span style="color:#FF5E5E;">{{scope.row.countYh}}</span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column label="实验室负责人" align="left" prop="fzrName" width="130px" />
  58. <el-table-column label="负责人联系方式" align="left" prop="fzrLxfs" width="164px" />
  59. <el-table-column label="检查时间" align="left" prop="createTime" width="200px" />
  60. <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="120" v-if="tableButtonType">
  61. <template slot-scope="scope">
  62. <div class="button-box" style="display: flex;margin-left:20px;">
  63. <p class="table-min-button"
  64. @click="goPageInfo(2,scope.row)"
  65. v-hasPermi="['laboratory:checkRecord:query']"
  66. >查看</p>
  67. </div>
  68. </template>
  69. </el-table-column>
  70. </el-table>
  71. <pagination
  72. v-show="total>0"
  73. :total="total"
  74. :page.sync="queryParams.pageNum"
  75. :limit.sync="queryParams.pageSize"
  76. @pagination="getList"
  77. />
  78. </div>
  79. <unsubmitted-info v-if="pageType == 2" :infoId="infoId"></unsubmitted-info>
  80. </div>
  81. </template>
  82. <script>
  83. import { checkRecord, getCheckRecord, delCheckRecord, addCheckRecord, updateCheckRecord,listJcjl } from "@/api/laboratory/checkRecord";
  84. import unsubmittedInfo from "./unsubmittedInfo.vue"
  85. export default {
  86. name: 'unsubmittedPageList',
  87. components: {
  88. unsubmittedInfo
  89. },
  90. data() {
  91. return {
  92. tableButtonType:this.hasPermiDom(['laboratory:checkRecord:query']),
  93. //页面状态
  94. pageType:1,
  95. // 显示搜索条件
  96. showSearch: true,
  97. // 遮罩层
  98. loading: true,
  99. // 总条数
  100. total: 0,
  101. // 安全检查表格数据
  102. checkRecordList: [],
  103. //查询时间
  104. dateRange:[],
  105. // 查询参数
  106. queryParams: {
  107. pageNum: 1,
  108. pageSize:20,
  109. isCg:1,
  110. searchValue: null,
  111. laboratoryName: null,
  112. fzrName: null,
  113. zgType: null,
  114. },
  115. infoId:"",
  116. }
  117. },
  118. created() {
  119. },
  120. mounted(){
  121. this.getList();
  122. },
  123. methods: {
  124. /** 搜索按钮操作 */
  125. handleQuery() {
  126. this.queryParams.pageNum = 1;
  127. this.getList();
  128. },
  129. /** 重置按钮操作 */
  130. resetQuery() {
  131. this.resetForm("queryForm");
  132. this.dateRange = [];
  133. this.queryParams.searchValue = "";
  134. this.queryParams.beginTime = "";
  135. this.queryParams.endTime = "";
  136. this.handleQuery();
  137. },
  138. //页面状态切换
  139. goPageInfo(type,row){
  140. if(type == 2){
  141. this.pageType = 2;
  142. this.infoId = row.id;
  143. }else if(type == 1){
  144. this.pageType = 1;
  145. this.getList();
  146. }
  147. },
  148. //返回
  149. backPage(){
  150. this.$parent.goPageInfo(1);
  151. },
  152. /** 查询列表 */
  153. getList() {
  154. this.loading = true;
  155. if(this.dateRange&&this.dateRange.length>0){
  156. this.queryParams.beginTime=this.dateRange[0]
  157. this.queryParams.endTime=this.dateRange[1]
  158. }else{
  159. this.queryParams.beginTime=null;
  160. this.queryParams.endTime=null
  161. }
  162. // checkRecord(this.queryParams).then( response => {
  163. listJcjl(this.queryParams).then( response => {
  164. this.checkRecordList = response.rows;
  165. this.total = response.total;
  166. this.loading = false;
  167. });
  168. },
  169. }
  170. }
  171. </script>
  172. <style scoped lang="scss">
  173. .unsubmittedPageList{
  174. flex:1;
  175. display: flex;
  176. flex-direction: column;
  177. overflow: hidden;
  178. .unsubmittedPageList-page{
  179. flex:1;
  180. display: flex;
  181. flex-direction: column;
  182. overflow: hidden;
  183. padding:0 20px 20px;
  184. }
  185. }
  186. </style>