cannotListPage.vue 10 KB

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