inspectionRecords.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  1. <!--检查记录-->
  2. <template>
  3. <view id="safetyInspect" style="display: flex;flex-direction: column;flex: 1;">
  4. <view class="tabTitle" v-if="userType==1">
  5. <view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
  6. <view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
  7. <view :class="{on:curTab==index}" class="tabTitle_across"></view>
  8. </view>
  9. </view>
  10. <view class="top-button-box" :style="userType==1?'margin-top: 116rpx;':'margin-top: 0rpx;'">
  11. <view class="left-title">检查状态</view>
  12. <picker @change="bindPickerChange" :value="pickerIndex" :range="pickerArray" class="right-button-big-box">
  13. <view class="right-button-box">
  14. <view class="uni-input">{{pickerArray[pickerIndex]}}</view>
  15. <img src="@/pages_manage/images/icon_06.png">
  16. </view>
  17. </picker>
  18. </view>
  19. <scroll-view scroll-y @scrolltolower="scrollGet" class="scroll-box">
  20. <view class="for-big-box" v-for="(item,index) in dataList" :key="index">
  21. <view class="for-time-p">{{item.createTime}}</view>
  22. <img class="for-back-img" src="@/pages_manage/images/Version2.2/for_min_bg.png">
  23. <view class="for-list-box" @click="goInfo(minItem.id)"
  24. v-for="(minItem,indexTwo) in item.recordList" :key="indexTwo">
  25. <view class="min-for-title-box">
  26. <view class="min-for-type-p viewColor1" v-if="minItem.isYuqi">逾期</view>
  27. <view class="min-for-type-p" v-if="!minItem.isYuqi" :class="minItem.zgStatus==5?'viewColor1':(minItem.zgStatus==0?'viewColor2':(minItem.zgStatus==1?'viewColor3':(minItem.zgStatus==2?'viewColor4':(minItem.zgStatus==3?'viewColor5':(minItem.zgStatus==4?'viewColor6':'')))))">{{minItem.zgStatus==5?'逾期':(minItem.zgStatus==0?'待整改':(minItem.zgStatus==1?'待复核':(minItem.zgStatus==2?'驳回':(minItem.zgStatus==3?'整改中':(minItem.zgStatus==4?'已完成':'')))))}}</view>
  28. <view class="min-for-name-p">{{minItem.laboratoryName}}</view>
  29. <view class="min-for-zd-p" v-if="minItem.zgType == 1">(重大)</view>
  30. <view class="min-for-timee-p">{{minItem.createTime}}</view>
  31. </view>
  32. <view class="min-for-info-box">
  33. <view class="min-for-info-min-box">
  34. <img src="@/pages_manage/images/Version2.2/icon_jcjl_xm.png">
  35. <view>{{minItem.fzrName}}</view>
  36. </view>
  37. <view class="min-for-info-min-box">
  38. <img src="@/pages_manage/images/Version2.2/icon_jcjl_dh.png">
  39. <view>{{minItem.fzrLxfs}}</view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </scroll-view>
  45. <view class="bottom-button-p" @click="startButton">开始安全检查</view>
  46. <view class="position-box" @click="goPage">
  47. <img src="@/pages_manage/images/Version2.2/icon_wtj.png">
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. import { listOrderByYyyymmdd } from '@/api/index.js'
  53. import { rectifyList } from '@/pages_manage/workbench/problemRectification/rectifyList.vue'
  54. export default {
  55. components: {
  56. rectifyList,
  57. },
  58. name: "inspectionRecords",
  59. data() {
  60. return {
  61. userType:uni.getStorageSync('userType'),
  62. //列表请求参数
  63. getData:{
  64. pageNum:1,
  65. pageSize:20,
  66. isCg:0,
  67. zgStatus:"",
  68. getType:true,
  69. nullDataType:true,
  70. },
  71. curTab:0,
  72. tabText:['检查记录','问题整改',],
  73. pickerIndex:0,
  74. pickerArray:['全部','待整改','待复核','驳回','已完成','逾期'],
  75. dataList:[]
  76. }
  77. },
  78. onLoad() {
  79. //判断如果是学生端进入只显示问题整改
  80. if(this.userType==2){
  81. this.pageType=1
  82. }
  83. },
  84. onShow() {
  85. this.dataList=[];
  86. this.getList();
  87. },
  88. mounted(){
  89. },
  90. methods: {
  91. //顶部tab点击
  92. tabClick(index) {
  93. if(index==1){
  94. uni.redirectTo({
  95. url: '/pages_manage/workbench/problemRectification/rectifyList',//问题整改
  96. });
  97. }
  98. },
  99. //开始检查
  100. startButton(){
  101. uni.navigateTo({
  102. url: '/pages_manage/workbench/securityCheck/startChecking',//开始安全检查
  103. });
  104. },
  105. //跳转
  106. goPage(){
  107. uni.navigateTo({
  108. url: '/pages_manage/workbench/securityCheck/unsubmittedList',//未提交列表
  109. });
  110. },
  111. //去详情
  112. goInfo(id){
  113. uni.navigateTo({
  114. url: '/pages_manage/workbench/securityCheck/recordDetails?id='+id,//未提交列表
  115. });
  116. },
  117. //下啦选择
  118. bindPickerChange(e){
  119. if(e.target.value == 0){
  120. this.getData.zgStatus = "";
  121. this.getData.isYuqi = "";
  122. }else if(e.target.value == 1){
  123. this.getData.zgStatus = 0;
  124. this.getData.isYuqi = "";
  125. }else if(e.target.value == 2){
  126. this.getData.zgStatus = 1;
  127. this.getData.isYuqi = "";
  128. }else if(e.target.value == 3){
  129. this.getData.zgStatus = 2;
  130. this.getData.isYuqi = "";
  131. }/* else if(e.target.value == 4){
  132. this.getData.zgStatus = 3;
  133. this.getData.isYuqi = "";
  134. } */else if(e.target.value == 4){
  135. this.getData.zgStatus = 4;
  136. this.getData.isYuqi = "";
  137. }else if(e.target.value == 5){
  138. this.getData.zgStatus = 5;
  139. this.getData.isYuqi = "";
  140. }
  141. this.pickerIndex = e.target.value;
  142. this.getData.pageNum = 1;
  143. this.getData.getType = true;
  144. this.getData.nullDataType = true;
  145. this.dataList = [];
  146. this.getList();
  147. },
  148. //滚动加载事件
  149. scrollGet(){
  150. if(this.getData.getType){
  151. this.getData.pageNum += 1;
  152. this.getList();
  153. }
  154. },
  155. //获取列表数据
  156. async getList(){
  157. let self = this;
  158. let obj = {
  159. pageNum : this.getData.pageNum,
  160. pageSize : this.getData.pageSize,
  161. isYuqi:this.getData.isYuqi,
  162. zgStatus : this.getData.zgStatus,
  163. isCg : this.getData.isCg,
  164. }
  165. const {data} = await listOrderByYyyymmdd(obj);
  166. if(data.code==200){
  167. let self = this;
  168. for(let i=0;i<data.rows.length;i++){
  169. data.rows[i].createTime = data.rows[i].createTime.split(' ')[0];
  170. for(let o=0;o<data.rows[i].recordList.length;o++){
  171. data.rows[i].recordList[o].createTime = data.rows[i].recordList[o].createTime.split(' ')[1];
  172. let timeList = data.rows[i].recordList[o].createTime.split(':');
  173. data.rows[i].recordList[o].createTime = timeList[0]+':'+timeList[1]
  174. }
  175. }
  176. if(self.pageNum==1){
  177. if(data.rows.length > 0 && data.rows.length == self.getData.pageSize){
  178. self.dataList = data.rows;
  179. }else if(data.rows.length > 0 && data.rows.length != self.getData.pageSize){
  180. self.dataList = data.rows;
  181. self.getData.getType = false;
  182. self.getData.nullDataType = true;
  183. }else{
  184. self.getData.getType = false;
  185. self.getData.nullDataType = true;
  186. }
  187. }else{
  188. if(data.rows.length > 0 && data.rows.length == self.getData.pageSize){
  189. self.dataList = self.dataList.concat(data.rows)
  190. }else if(data.rows.length > 0 && data.rows.length != self.getData.pageSize){
  191. self.dataList = self.dataList.concat(data.rows);
  192. self.getData.getType = false;
  193. self.getData.nullDataType = true;
  194. }else{
  195. self.getData.getType = false;
  196. self.getData.nullDataType = true;
  197. }
  198. }
  199. }
  200. },
  201. }
  202. }
  203. </script>
  204. <style lang="stylus" scoped>
  205. #safetyInspect{
  206. height: 100%;
  207. width: 100%;
  208. display flex;
  209. flex-direction column;
  210. .tabTitle{
  211. position: fixed;
  212. z-index: 1000;
  213. display flex;
  214. width:100%;
  215. height: 100rpx;
  216. background: #fff;
  217. .tabTitle_li{
  218. width:146rpx;
  219. text-align center;
  220. .tabTitle_text{
  221. display: inline-block;
  222. font-size: 28rpx;
  223. font-family: PingFang SC;
  224. font-weight: 500;
  225. color: #333333;
  226. line-height: 70rpx;
  227. &.on{
  228. color:#0183FA;
  229. }
  230. }
  231. .tabTitle_across{
  232. width: 80rpx;
  233. height: 5rpx;
  234. background: #0183FA;
  235. border-radius: 3rpx;
  236. margin-left 34rpx;
  237. display none;
  238. &.on{
  239. display block;
  240. }
  241. }
  242. }
  243. }
  244. .top-button-box{
  245. height:150rpx;
  246. margin-bottom:20rpx;
  247. display flex
  248. padding:0 20rpx;
  249. background #fff;
  250. .left-title{
  251. line-height:150rpx;
  252. margin-right:15rpx;
  253. font-size:28rpx;
  254. color:#333;
  255. }
  256. .right-button-big-box{
  257. flex:1;
  258. .right-button-box{
  259. margin:34rpx 0;
  260. border:1rpx solid #A2A2A2;
  261. border-radius:10rpx;
  262. height:80rpx;
  263. display flex
  264. flex:1;
  265. view{
  266. flex:1;
  267. line-height:80rpx;
  268. margin-left:20rpx;
  269. color: #999999;
  270. font-size:28rpx;
  271. }
  272. img{
  273. width:24rpx;
  274. height:12rpx;
  275. margin:35rpx 22rpx;
  276. }
  277. }
  278. }
  279. }
  280. .scroll-box{
  281. // flex:1;
  282. overflow-y scroll;
  283. padding-bottom: 128rpx;
  284. .for-big-box:last-child{
  285. margin-bottom:180rpx;
  286. }
  287. .for-big-box{
  288. margin:0 20rpx 20rpx;
  289. overflow hidden
  290. border-bottom-left-radius :20rpx;
  291. border-bottom-right-radius :20rpx;
  292. .for-time-p{
  293. background #fff
  294. line-height:87rpx;
  295. font-size:30rpx;
  296. padding:0 22rpx;
  297. border-top-left-radius:20rpx;
  298. border-top-right-radius:20rpx;
  299. }
  300. .for-back-img{
  301. height:30rpx;
  302. width:710rpx;
  303. }
  304. .for-list-box:nth-child(3){
  305. .min-for-title-box{
  306. border:none;
  307. }
  308. }
  309. .for-list-box{
  310. background #fff
  311. padding:6rpx 0;
  312. .min-for-title-box{
  313. display flex
  314. margin:0 20rpx;
  315. border-top:1rpx solid #e0e0e0;
  316. view{
  317. line-height:35rpx;
  318. height:35rpx;
  319. margin:15rpx 0;
  320. }
  321. .min-for-type-p{
  322. border-radius:6rpx;
  323. font-size:22rpx;
  324. width:100rpx;
  325. text-align center
  326. margin-right:20rpx;
  327. }
  328. .min-for-name-p{
  329. width: 400rpx;
  330. font-size:28rpx;
  331. display:block;
  332. overflow:hidden;
  333. text-overflow:ellipsis;
  334. white-space:nowrap;
  335. }
  336. .min-for-zd-p{
  337. font-size:26rpx;
  338. color:#D80000;
  339. margin-right:10rpx;
  340. }
  341. .min-for-timee-p{
  342. flex: 1;
  343. text-align: right;
  344. font-size:26rpx;
  345. color:#999;
  346. }
  347. .viewColor1{
  348. background #ffe6e6;
  349. color:#ff5555;
  350. }
  351. .viewColor2{
  352. background #fef2dd;
  353. color:#f6a71d;
  354. }
  355. .viewColor3{
  356. background #e0f1e2;
  357. color:#30a23d;
  358. }
  359. .viewColor4{
  360. background #f2dddd;
  361. color:#a51919;
  362. }
  363. .viewColor5{
  364. background #e2f6f8;
  365. color:#3ac3d3;
  366. }
  367. .viewColor6{
  368. background #d9edfe;
  369. color:#0183fa;
  370. }
  371. }
  372. .min-for-info-box{
  373. display flex
  374. margin:0 20rpx;
  375. .min-for-info-min-box:nth-child(1){
  376. view{
  377. min-width:200rpx;
  378. }
  379. }
  380. .min-for-info-min-box{
  381. display flex
  382. height:28rpx;
  383. margin:14rpx 0;
  384. img{
  385. width:28rpx;
  386. height:28rpx;
  387. margin-right:10rpx;
  388. }
  389. view{
  390. font-size:26rpx;
  391. line-height:28rpx;
  392. }
  393. }
  394. }
  395. }
  396. }
  397. }
  398. .bottom-button-p{
  399. position fixed
  400. bottom:20rpx;
  401. left:50rpx;
  402. width:650rpx;
  403. height:100rpx;
  404. line-height:100rpx;
  405. text-align center;
  406. background #0183FA;
  407. color:#fff;
  408. font-size:28rpx;
  409. border-radius: 20rpx
  410. }
  411. .position-box{
  412. position fixed
  413. bottom:240rpx;
  414. right:30rpx;
  415. img{
  416. width:152rpx;
  417. height:152rpx;
  418. }
  419. }
  420. }
  421. </style>