cannotListPage.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  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. <el-form-item label="关键字" prop="searchValue">
  17. <el-input
  18. maxLength="30"
  19. v-model="queryParams.searchValue"
  20. placeholder="计划标题/实验室/房间号"
  21. clearable
  22. style="width: 200px"
  23. />
  24. </el-form-item>
  25. <el-form-item label="处置时间" prop="dateRange" style="margin-left:10px;" label-width="70px">
  26. <el-date-picker
  27. :clearable="false"
  28. v-model="dateRange"
  29. size="small"
  30. style="width: 240px"
  31. value-format="yyyy-MM-dd"
  32. type="daterange"
  33. range-separator="-"
  34. start-placeholder="开始日期"
  35. end-placeholder="结束日期"
  36. ></el-date-picker>
  37. </el-form-item>
  38. <el-form-item>
  39. <p class="inquire-button-one" @click="handleQuery" style="margin-right:10px;">查询</p>
  40. <p class="reset-button-one" @click="resetQuery">重置</p>
  41. </el-form-item>
  42. <!--与我相关-->
  43. <div class="form-button-max-big-box-me">
  44. <div class="form-button-big-box-me">
  45. <div :class="queryParams.myRelated==1?'checkDiv-me':''" @click="topRightClickType">
  46. <p class="text-p-me">与我有关{{correlationNum}}</p>
  47. <p class="el-icon-check icon-p-me" v-if="queryParams.myRelated==1"></p>
  48. </div>
  49. </div>
  50. </div>
  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. hazardType:1,
  127. searchValue:"",
  128. checkTimeOrder:"",
  129. myRelated:1,
  130. }).then(response => {
  131. this.$set(this,'correlationNum',response.data.total>999?' 999+':(response.data.total<1?'':' '+response.data.total));
  132. });
  133. },
  134. //与我相关按钮
  135. topRightClickType(){
  136. this.$set(this.queryParams,'myRelated',this.queryParams.myRelated==1?0:1);
  137. this.handleQuery();
  138. },
  139. //开关详情页面
  140. addDialogOpen(type,data){
  141. if(this.infoDialogType != type){
  142. if(type){
  143. let obj = {
  144. id:data.id
  145. }
  146. this.$set(this,'propsInfoDialogData',obj);
  147. this.$set(this,'infoDialogType',type);
  148. }else{
  149. this.getList();
  150. this.$set(this,'infoDialogType',type);
  151. }
  152. }
  153. },
  154. //范围选择
  155. topLeftClickType(type){
  156. if(this.queryParams.hazardType != type){
  157. this.$set(this.queryParams,'hazardType',type);
  158. this.handleQuery();
  159. }
  160. },
  161. //时间排序方法
  162. sortChange(val){
  163. if(val.prop == 'checkTime'){
  164. this.$set(this.queryParams,'checkTimeOrder',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
  165. this.$set(this.queryParams,'zgTimeOrder','');
  166. this.$set(this.queryParams,'zgTermOrder','');
  167. this.handleQuery();
  168. }
  169. },
  170. //获取数据列表
  171. getList(){
  172. let obj = JSON.parse(JSON.stringify(this.queryParams))
  173. if(this.dateRange[0]){
  174. obj.beginTime = this.dateRange[0];
  175. }else{
  176. obj.beginTime = "";
  177. }
  178. if(this.dateRange[1]){
  179. obj.endTime = this.dateRange[1];
  180. }else{
  181. obj.endTime = "";
  182. }
  183. this.getCorrelationNum();
  184. unableRectifyList(obj).then(response => {
  185. this.total = response.data.total;
  186. this.tableList = response.data.records;
  187. });
  188. },
  189. /** 搜索按钮操作 */
  190. handleQuery() {
  191. this.$set(this.queryParams,'pageNum',1);
  192. this.getList();
  193. },
  194. /** 重置按钮操作 */
  195. resetQuery() {
  196. this.$set(this,'dateRange',[]);
  197. this.$set(this,'queryParams',{
  198. pageNum:1,
  199. pageSize:20,
  200. rectifyStatus:4,
  201. hazardType:1,
  202. searchValue:"",
  203. checkTimeOrder:"",
  204. myRelated:1,
  205. });
  206. this.handleQuery();
  207. },
  208. },
  209. }
  210. </script>
  211. <style scoped lang="scss">
  212. .cannotListPage{
  213. flex: 1;
  214. display: flex !important;
  215. flex-direction: column;
  216. overflow: hidden;
  217. .title-box{
  218. padding-top:20px;
  219. .form-button-max-big-box{
  220. display: inline-block;
  221. .form-button-big-box{
  222. display: flex;
  223. div{
  224. position: relative;
  225. height:40px;
  226. width:100px;
  227. line-height: 40px;
  228. text-align: center;
  229. color:#0045AF;
  230. font-size:14px;
  231. border:1px solid #0045AF;
  232. border-radius:4px;
  233. margin-left:10px;
  234. font-weight:500;
  235. cursor: pointer;
  236. }
  237. .checkDiv{
  238. color:#fff;
  239. background-color:#0045AF;
  240. border:1px solid #0045AF;
  241. }
  242. }
  243. }
  244. .form-button-max-big-box-me{
  245. display: inline-block;
  246. .form-button-big-box-me{
  247. display: flex;
  248. div{
  249. position: relative;
  250. height:40px;
  251. width:130px;
  252. line-height: 40px;
  253. text-align: center;
  254. color:#999;
  255. font-size:14px;
  256. border:1px solid #999;
  257. border-radius:4px;
  258. margin-left:10px;
  259. font-weight:500;
  260. cursor: pointer;
  261. .icon-p-me{
  262. width:15px;
  263. height:15px;
  264. line-height:15px;
  265. text-align: center;
  266. position: absolute;
  267. right:0;
  268. bottom:0;
  269. color:#fff;
  270. background: #0183fa;
  271. border-top-left-radius:4px;
  272. }
  273. }
  274. .checkDiv-me{
  275. color:#0183FA!important;
  276. border:1px solid #0183FA!important;
  277. }
  278. }
  279. }
  280. }
  281. .content-box{
  282. flex: 1;
  283. display: flex;
  284. flex-direction: column;
  285. padding:0 20px 20px;
  286. overflow: hidden;
  287. }
  288. }
  289. </style>