unsubmittedList.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <!-- 安全检查未提交列表 -->
  2. <template>
  3. <view id="unsubmittedList">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="scroll-box">
  5. <view v-if="!dataList[0]" style="line-height:100rpx;text-align: center;color:#999;">暂无数据</view>
  6. <view class="for-big-box" v-for="(item,index) in dataList" :key="index">
  7. <view class="for-time-p">{{item.createTime}}</view>
  8. <img class="for-back-img" src="@/images/Version2.2/for_min_bg.png">
  9. <view class="for-list-box" @click="startButton(minItem.id)" v-for="(minItem,indexTwo) in item.recordList" :key="indexTwo">
  10. <view class="min-for-title-box">
  11. <view>{{minItem.laboratoryName}}</view>
  12. <view>{{minItem.createTime}}</view>
  13. </view>
  14. <view class="min-for-info-box">
  15. <view class="min-for-info-min-box">
  16. <img src="@/images/Version2.2/icon_jcjl_xm.png">
  17. <view>{{minItem.fzrName}}</view>
  18. </view>
  19. <view class="min-for-info-min-box">
  20. <img src="@/images/Version2.2/icon_jcjl_dh.png">
  21. <view>{{minItem.fzrLxfs}}</view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </scroll-view>
  27. </view>
  28. </template>
  29. <script>
  30. import { listOrderByYyyymmdd } from '@/api/index.js'
  31. export default {
  32. name: "unsubmittedList",
  33. data() {
  34. return {
  35. //列表请求参数
  36. getData:{
  37. pageNum:1,
  38. pageSize:20,
  39. isCg:1,
  40. getType:true,
  41. nullDataType:true,
  42. },
  43. dataList:[]
  44. }
  45. },
  46. onLoad() {
  47. },
  48. onShow() {
  49. this.dataList=[];
  50. this.getList();
  51. },
  52. methods: {
  53. //开始检查
  54. startButton(id){
  55. uni.navigateTo({
  56. url: '/pages_manage/workbench/securityCheck/startChecking?id='+id,//开始安全检查
  57. });
  58. },
  59. //滚动加载事件
  60. scrollGet(){
  61. if(this.getData.getType){
  62. this.getData.pageNum += 1;
  63. this.getList();
  64. }
  65. },
  66. //获取列表数据
  67. async getList(){
  68. let self = this;
  69. const {data} = await listOrderByYyyymmdd(this.getData);
  70. if(data.code==200){
  71. let self = this;
  72. for(let i=0;i<data.rows.length;i++){
  73. data.rows[i].createTime = data.rows[i].createTime.split(' ')[0];
  74. for(let o=0;o<data.rows[i].recordList.length;o++){
  75. data.rows[i].recordList[o].createTime = data.rows[i].recordList[o].createTime.split(' ')[1];
  76. let timeList = data.rows[i].recordList[o].createTime.split(':');
  77. data.rows[i].recordList[o].createTime = timeList[0]+':'+timeList[1]
  78. }
  79. }
  80. if(self.pageNum==1){
  81. if(data.rows.length > 0 && data.rows.length == self.getData.pageSize){
  82. self.dataList = data.rows;
  83. }else if(data.rows.length > 0 && data.rows.length != self.getData.pageSize){
  84. self.dataList = data.rows;
  85. self.getData.getType = false;
  86. self.getData.nullDataType = true;
  87. }else{
  88. self.getData.getType = false;
  89. self.getData.nullDataType = true;
  90. }
  91. }else{
  92. if(data.rows.length > 0 && data.rows.length == self.getData.pageSize){
  93. self.dataList = self.dataList.concat(data.rows)
  94. }else if(data.rows.length > 0 && data.rows.length != self.getData.pageSize){
  95. self.dataList = self.dataList.concat(data.rows);
  96. self.getData.getType = false;
  97. self.getData.nullDataType = true;
  98. }else{
  99. self.getData.getType = false;
  100. self.getData.nullDataType = true;
  101. }
  102. }
  103. }
  104. },
  105. }
  106. }
  107. </script>
  108. <style lang="stylus" scoped>
  109. #unsubmittedList{
  110. height: 100%;
  111. width: 100%;
  112. display flex
  113. .scroll-box{
  114. flex:1;
  115. overflow-y scroll
  116. .for-big-box:last-child{
  117. margin-bottom:180rpx;
  118. }
  119. .for-big-box{
  120. margin: 20rpx 20rpx 0;
  121. overflow hidden
  122. border-bottom-left-radius :20rpx;
  123. border-bottom-right-radius :20rpx;
  124. .for-time-p{
  125. background #fff
  126. line-height:87rpx;
  127. font-size:30rpx;
  128. padding:0 22rpx;
  129. border-top-left-radius:20rpx;
  130. border-top-right-radius:20rpx;
  131. }
  132. .for-back-img{
  133. height:30rpx;
  134. width:710rpx;
  135. }
  136. .for-list-box:nth-child(3){
  137. .min-for-title-box{
  138. border:none;
  139. }
  140. }
  141. .for-list-box{
  142. background #fff
  143. padding:6rpx 0;
  144. .min-for-title-box{
  145. display flex
  146. margin:0 20rpx;
  147. border-top:1rpx solid #e0e0e0;
  148. view{
  149. line-height:35rpx;
  150. height:35rpx;
  151. margin:15rpx 0;
  152. }
  153. view:nth-child(1){
  154. flex:1;
  155. font-size:28rpx;
  156. display:block;
  157. overflow:hidden;
  158. text-overflow:ellipsis;
  159. white-space:nowrap;
  160. }
  161. view:nth-child(2){
  162. font-size:26rpx;
  163. color:#999;
  164. }
  165. }
  166. .min-for-info-box{
  167. display flex
  168. margin:0 20rpx;
  169. .min-for-info-min-box:nth-child(1){
  170. view{
  171. min-width:200rpx;
  172. }
  173. }
  174. .min-for-info-min-box{
  175. display flex
  176. height:28rpx;
  177. margin:14rpx 0;
  178. img{
  179. width:28rpx;
  180. height:28rpx;
  181. margin-right:10rpx;
  182. }
  183. view{
  184. font-size:26rpx;
  185. line-height:28rpx;
  186. }
  187. }
  188. }
  189. }
  190. }
  191. }
  192. }
  193. </style>