cannotListPage.vue 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  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. <!--与我相关-->
  17. <div class="form-button-max-big-box-me">
  18. <div class="form-button-big-box-me">
  19. <div :class="queryParams.myRelated==1?'checkDiv-me':''" @click="topRightClickType">
  20. <p class="text-p-me">与我有关{{correlationNum}}</p>
  21. <p class="el-icon-check icon-p-me" v-if="queryParams.myRelated==1"></p>
  22. </div>
  23. </div>
  24. </div>
  25. <el-form-item label="关键字" prop="searchValue">
  26. <el-input
  27. maxLength="30"
  28. v-model="queryParams.searchValue"
  29. placeholder="计划标题/实验室/房间号"
  30. clearable
  31. style="width: 200px"
  32. />
  33. </el-form-item>
  34. <el-form-item label="处置时间" prop="dateRange" style="margin-left:10px;" label-width="70px">
  35. <el-date-picker
  36. :clearable="false"
  37. v-model="dateRange"
  38. size="small"
  39. style="width: 240px"
  40. value-format="yyyy-MM-dd"
  41. type="daterange"
  42. range-separator="-"
  43. start-placeholder="开始日期"
  44. end-placeholder="结束日期"
  45. ></el-date-picker>
  46. </el-form-item>
  47. <el-form-item>
  48. <p class="inquire-button-one" @click="handleQuery" style="margin-right:10px;">查询</p>
  49. <p class="reset-button-one" @click="resetQuery">重置</p>
  50. </el-form-item>
  51. </el-form>
  52. </div>
  53. <div class="content-box">
  54. <el-table border :data="tableList" ref="multipleTable" @sort-change="sortChange">
  55. <el-table-column label="序号" align="center" type="index" width="60" />
  56. <el-table-column label="计划标题" align="center" prop="title" show-overflow-tooltip/>
  57. <el-table-column label="检查类型" align="center" prop="deptName" show-overflow-tooltip width="180">
  58. <template slot-scope="scope">
  59. {{scope.row.hazardType == 1?'校院巡查':(scope.row.hazardType == 2?'实验室自查':'')}}
  60. </template>
  61. </el-table-column>
  62. <el-table-column label="实验室" align="center" prop="subRoom" show-overflow-tooltip width="240"/>
  63. <el-table-column label="检查时间" sortable align="center" prop="checkTime" show-overflow-tooltip width="160"/>
  64. <el-table-column label="处理人" align="center" prop="rectifyName" show-overflow-tooltip width="90"/>
  65. <el-table-column label="原因描述" align="center" prop="rectifyMeasure" show-overflow-tooltip width="435"/>
  66. <el-table-column label="操作" align="center" width="80">
  67. <template slot-scope="scope">
  68. <div class="table-button-box">
  69. <p class="table-button-null"></p>
  70. <p class="table-button-p" v-hasPermi="['safety:rectifyHazard:query']"
  71. @click="addDialogOpen(true,scope.row)">详情</p>
  72. <p class="table-button-null"></p>
  73. </div>
  74. </template>
  75. </el-table-column>
  76. </el-table>
  77. <pagination :page-sizes="[20, 30, 40, 50]"
  78. v-show="total>0"
  79. :total="total"
  80. :page.sync="queryParams.pageNum"
  81. :limit.sync="queryParams.pageSize"
  82. @pagination="getList"
  83. />
  84. </div>
  85. <infoDialog v-if="infoDialogType" :propsInfoDialogData="propsInfoDialogData"></infoDialog>
  86. </div>
  87. </template>
  88. <script>
  89. import { unableRectifyList } from '@/api/safetyCheck/index'
  90. import infoDialog from '@/views/safetyCheck/components/infoDialog/infoDialog.vue'
  91. export default {
  92. name: 'cannotListPage',
  93. components: {
  94. infoDialog
  95. },
  96. data(){
  97. return{
  98. propsInfoDialogData:{},
  99. infoDialogType:false,
  100. queryParams:{
  101. pageNum:1,
  102. pageSize:20,
  103. rectifyStatus:4,
  104. hazardType:1,
  105. searchValue:"",
  106. checkTimeOrder:"",
  107. myRelated:1,
  108. },
  109. dateRange:[],
  110. tableList:[],
  111. total:0,
  112. correlationNum:'',
  113. }
  114. },
  115. created(){},
  116. mounted(){
  117. this.getList();
  118. },
  119. methods:{
  120. //获取相关数量
  121. getCorrelationNum(){
  122. unableRectifyList({
  123. pageNum:1,
  124. pageSize:20,
  125. rectifyStatus:4,
  126. checkTimeOrder:"",
  127. myRelated:1,
  128. hazardType:this.queryParams.hazardType,
  129. searchValue:this.queryParams.searchValue,
  130. beginTime:this.dateRange[0]?this.dateRange[0]:'',
  131. endTime:this.dateRange[1]?this.dateRange[1]:'',
  132. }).then(response => {
  133. this.$set(this,'correlationNum',response.data.total>999?' 999+':(response.data.total<1?'':' '+response.data.total));
  134. });
  135. },
  136. //与我相关按钮
  137. topRightClickType(){
  138. this.$set(this.queryParams,'myRelated',this.queryParams.myRelated==1?0:1);
  139. this.handleQuery();
  140. },
  141. //开关详情页面
  142. addDialogOpen(type,data){
  143. if(this.infoDialogType != type){
  144. if(type){
  145. let obj = {
  146. id:data.id
  147. }
  148. this.$set(this,'propsInfoDialogData',obj);
  149. this.$set(this,'infoDialogType',type);
  150. }else{
  151. this.getList();
  152. this.$set(this,'infoDialogType',type);
  153. }
  154. }
  155. },
  156. //范围选择
  157. topLeftClickType(type){
  158. if(this.queryParams.hazardType != type){
  159. this.$set(this.queryParams,'hazardType',type);
  160. this.handleQuery();
  161. }
  162. },
  163. //时间排序方法
  164. sortChange(val){
  165. if(val.prop == 'checkTime'){
  166. this.$set(this.queryParams,'checkTimeOrder',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
  167. this.$set(this.queryParams,'zgTimeOrder','');
  168. this.$set(this.queryParams,'zgTermOrder','');
  169. this.handleQuery();
  170. }
  171. },
  172. //获取数据列表
  173. getList(){
  174. let obj = JSON.parse(JSON.stringify(this.queryParams))
  175. if(this.dateRange[0]){
  176. obj.beginTime = this.dateRange[0];
  177. }else{
  178. obj.beginTime = "";
  179. }
  180. if(this.dateRange[1]){
  181. obj.endTime = this.dateRange[1];
  182. }else{
  183. obj.endTime = "";
  184. }
  185. this.getCorrelationNum();
  186. unableRectifyList(obj).then(response => {
  187. this.total = response.data.total;
  188. this.tableList = response.data.records;
  189. });
  190. },
  191. /** 搜索按钮操作 */
  192. handleQuery() {
  193. this.$set(this.queryParams,'pageNum',1);
  194. this.getList();
  195. },
  196. /** 重置按钮操作 */
  197. resetQuery() {
  198. this.$set(this,'dateRange',[]);
  199. this.$set(this,'queryParams',{
  200. pageNum:1,
  201. pageSize:20,
  202. rectifyStatus:4,
  203. hazardType:1,
  204. searchValue:"",
  205. checkTimeOrder:"",
  206. myRelated:1,
  207. });
  208. this.handleQuery();
  209. },
  210. },
  211. }
  212. </script>
  213. <style scoped lang="scss">
  214. .cannotListPage{
  215. flex: 1;
  216. display: flex !important;
  217. flex-direction: column;
  218. overflow: hidden;
  219. .title-box{
  220. padding-top:20px;
  221. .form-button-max-big-box{
  222. display: inline-block;
  223. .form-button-big-box{
  224. display: flex;
  225. div{
  226. position: relative;
  227. height:40px;
  228. width:100px;
  229. line-height: 40px;
  230. text-align: center;
  231. color:#0045AF;
  232. font-size:14px;
  233. border:1px solid #0045AF;
  234. border-radius:4px;
  235. margin-left:10px;
  236. font-weight:500;
  237. cursor: pointer;
  238. }
  239. .checkDiv{
  240. color:#fff;
  241. background-color:#0045AF;
  242. border:1px solid #0045AF;
  243. }
  244. }
  245. }
  246. .form-button-max-big-box-me{
  247. display: inline-block;
  248. .form-button-big-box-me{
  249. display: flex;
  250. div{
  251. position: relative;
  252. height:40px;
  253. width:130px;
  254. line-height: 40px;
  255. text-align: center;
  256. color:#999;
  257. font-size:14px;
  258. border:1px solid #999;
  259. border-radius:4px;
  260. margin-left:10px;
  261. font-weight:500;
  262. cursor: pointer;
  263. .icon-p-me{
  264. width:15px;
  265. height:15px;
  266. line-height:15px;
  267. text-align: center;
  268. position: absolute;
  269. right:0;
  270. bottom:0;
  271. color:#fff;
  272. background: #0183fa;
  273. border-top-left-radius:4px;
  274. }
  275. }
  276. .checkDiv-me{
  277. color:#0183FA!important;
  278. border:1px solid #0183FA!important;
  279. }
  280. }
  281. }
  282. }
  283. .content-box{
  284. flex: 1;
  285. display: flex;
  286. flex-direction: column;
  287. padding:0 20px 20px;
  288. overflow: hidden;
  289. }
  290. }
  291. </style>