inspectionRecords.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  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. if(First){//非第一次进入
  80. console.log(1111)
  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. self.dataList=[];
  152. let obj = {
  153. pageNum : this.getData.pageNum,
  154. pageSize : this.getData.pageSize,
  155. isYuqi:this.getData.isYuqi,
  156. zgStatus : this.getData.zgStatus,
  157. isCg : this.getData.isCg,
  158. }
  159. const {data} = await listOrderByYyyymmdd(obj);
  160. if(data.code==200){
  161. let self = this;
  162. for(let i=0;i<data.rows.length;i++){
  163. data.rows[i].createTime = data.rows[i].createTime.split(' ')[0];
  164. for(let o=0;o<data.rows[i].recordList.length;o++){
  165. data.rows[i].recordList[o].createTime = data.rows[i].recordList[o].createTime.split(' ')[1];
  166. let timeList = data.rows[i].recordList[o].createTime.split(':');
  167. data.rows[i].recordList[o].createTime = timeList[0]+':'+timeList[1]
  168. }
  169. }
  170. if(self.pageNum==1){
  171. if(data.rows.length > 0 && data.rows.length == self.getData.pageSize){
  172. self.dataList = data.rows;
  173. }else if(data.rows.length > 0 && data.rows.length != self.getData.pageSize){
  174. self.dataList = data.rows;
  175. self.getData.getType = false;
  176. self.getData.nullDataType = true;
  177. }else{
  178. self.getData.getType = false;
  179. self.getData.nullDataType = true;
  180. }
  181. }else{
  182. if(data.rows.length > 0 && data.rows.length == self.getData.pageSize){
  183. self.dataList = self.dataList.concat(data.rows)
  184. }else if(data.rows.length > 0 && data.rows.length != self.getData.pageSize){
  185. self.dataList = self.dataList.concat(data.rows);
  186. self.getData.getType = false;
  187. self.getData.nullDataType = true;
  188. }else{
  189. self.getData.getType = false;
  190. self.getData.nullDataType = true;
  191. }
  192. }
  193. }
  194. },
  195. }
  196. }
  197. </script>
  198. <style lang="stylus" scoped>
  199. #safetyInspect{
  200. height: 100%;
  201. width: 100%;
  202. display flex;
  203. flex-direction column;
  204. .top-button-box{
  205. height:150rpx;
  206. margin-bottom:20rpx;
  207. display flex
  208. padding:0 20rpx;
  209. background #fff
  210. .left-title{
  211. line-height:150rpx;
  212. margin-right:15rpx;
  213. font-size:28rpx;
  214. color:#333;
  215. }
  216. .right-button-big-box{
  217. flex:1;
  218. .right-button-box{
  219. margin:34rpx 0;
  220. border:1rpx solid #A2A2A2;
  221. border-radius:10rpx;
  222. height:80rpx;
  223. display flex
  224. flex:1;
  225. view{
  226. flex:1;
  227. line-height:80rpx;
  228. margin-left:20rpx;
  229. color: #999999;
  230. font-size:28rpx;
  231. }
  232. img{
  233. width:24rpx;
  234. height:12rpx;
  235. margin:35rpx 22rpx;
  236. }
  237. }
  238. }
  239. }
  240. .scroll-box{
  241. // flex:1;
  242. overflow-y scroll;
  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. flex:1;
  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. font-size:26rpx;
  302. color:#999;
  303. }
  304. .viewColor1{
  305. background #ffe6e6;
  306. color:#ff5555;
  307. }
  308. .viewColor2{
  309. background #fef2dd;
  310. color:#f6a71d;
  311. }
  312. .viewColor3{
  313. background #e0f1e2;
  314. color:#30a23d;
  315. }
  316. .viewColor4{
  317. background #f2dddd;
  318. color:#a51919;
  319. }
  320. .viewColor5{
  321. background #e2f6f8;
  322. color:#3ac3d3;
  323. }
  324. .viewColor6{
  325. background #d9edfe;
  326. color:#0183fa;
  327. }
  328. }
  329. .min-for-info-box{
  330. display flex
  331. margin:0 20rpx;
  332. .min-for-info-min-box:nth-child(1){
  333. view{
  334. min-width:200rpx;
  335. }
  336. }
  337. .min-for-info-min-box{
  338. display flex
  339. height:28rpx;
  340. margin:14rpx 0;
  341. img{
  342. width:28rpx;
  343. height:28rpx;
  344. margin-right:10rpx;
  345. }
  346. view{
  347. font-size:26rpx;
  348. line-height:28rpx;
  349. }
  350. }
  351. }
  352. }
  353. }
  354. }
  355. .bottom-button-p{
  356. position fixed
  357. bottom:20rpx;
  358. left:50rpx;
  359. width:650rpx;
  360. height:100rpx;
  361. line-height:100rpx;
  362. text-align center;
  363. background #0183FA;
  364. color:#fff;
  365. font-size:28rpx;
  366. border-radius: 20rpx
  367. }
  368. .position-box{
  369. position fixed
  370. bottom:240rpx;
  371. right:30rpx;
  372. img{
  373. width:152rpx;
  374. height:152rpx;
  375. }
  376. }
  377. }
  378. </style>