inspectionRecords.vue 12 KB

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