cannotListPage.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  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.checkCategory?scope.row.checkCategory:'-'}}</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. this.getCorrelationNum();
  192. unableRectifyList(obj).then(response => {
  193. this.total = response.data.total;
  194. this.tableList = response.data.records;
  195. });
  196. },
  197. /** 搜索按钮操作 */
  198. handleQuery() {
  199. this.$set(this.queryParams,'pageNum',1);
  200. this.getList();
  201. },
  202. /** 重置按钮操作 */
  203. resetQuery() {
  204. this.$set(this,'dateRange',[]);
  205. this.$set(this,'queryParams',{
  206. pageNum:1,
  207. pageSize:20,
  208. rectifyStatus:4,
  209. hazardType:1,
  210. searchValue:"",
  211. checkTimeOrder:"",
  212. myRelated:1,
  213. });
  214. this.handleQuery();
  215. },
  216. },
  217. }
  218. </script>
  219. <style scoped lang="scss">
  220. .cannotListPage{
  221. flex: 1;
  222. display: flex !important;
  223. flex-direction: column;
  224. overflow: hidden;
  225. .title-box{
  226. padding-top:20px;
  227. .form-button-max-big-box{
  228. display: inline-block;
  229. margin-left:10px;
  230. .form-button-big-box{
  231. display: flex;
  232. p:nth-child(1){
  233. border-top-left-radius: 4px;
  234. border-bottom-left-radius: 4px;
  235. border-top:1px solid #E0E0E0;
  236. border-bottom:1px solid #E0E0E0;
  237. }
  238. p:nth-child(2){
  239. border-top-right-radius: 4px;
  240. border-bottom-right-radius: 4px;
  241. border-top:1px solid #E0E0E0;
  242. border-bottom:1px solid #E0E0E0;
  243. border-right:1px solid #E0E0E0;
  244. }
  245. p{
  246. height:40px;
  247. width:100px;
  248. line-height: 40px;
  249. text-align: center;
  250. color:#666666;
  251. font-size:14px;
  252. font-weight:500;
  253. cursor: pointer;
  254. border-left:1px solid #E0E0E0;
  255. }
  256. .checkDiv{
  257. color:#fff!important;
  258. border:1px solid #0183FA!important;
  259. background-color: #0183FA;
  260. }
  261. }
  262. }
  263. .form-button-max-big-box-me{
  264. display: inline-block;
  265. .form-button-big-box-me{
  266. display: flex;
  267. div{
  268. position: relative;
  269. height:40px;
  270. width:130px;
  271. line-height: 40px;
  272. text-align: center;
  273. color:#999;
  274. font-size:14px;
  275. border:1px solid #999;
  276. border-radius:4px;
  277. margin-left:10px;
  278. font-weight:500;
  279. cursor: pointer;
  280. .icon-p-me{
  281. width:15px;
  282. height:15px;
  283. line-height:15px;
  284. text-align: center;
  285. position: absolute;
  286. right:0;
  287. bottom:0;
  288. color:#fff;
  289. background: #0183fa;
  290. border-top-left-radius:4px;
  291. }
  292. }
  293. .checkDiv-me{
  294. color:#0183FA!important;
  295. border:1px solid #0183FA!important;
  296. }
  297. }
  298. }
  299. }
  300. .content-box{
  301. flex: 1;
  302. display: flex;
  303. flex-direction: column;
  304. padding:0 20px 20px;
  305. overflow: hidden;
  306. }
  307. }
  308. </style>