batchAudit.vue 7.6 KB

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