gasRecycle.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. <!--供气回收记录-->
  2. <template>
  3. <view id="gasRecycle">
  4. <view class="tabTitle">
  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. <scroll-view scroll-y @scrolltolower="scrollGet" class="scroll-box">
  11. <view class="for-big-box" v-for="(item,index) in dataList" :key="index">
  12. <view class="for-time-p">{{item.createTimeApp}}</view>
  13. <img class="for-back-img" src="@/images/basicsModules/for_min_bg.png">
  14. <!-- 供气 -->
  15. <view class="for-box" @click="goInfo(item2)" v-for="(item2,index2) in item.taskVOList" :key="index2">
  16. <view class="for-title-box">
  17. <view class="viewColor1">供气</view>
  18. <view><text v-for="(item3,index3) in item2.detailListVO" :key="index3" v-if="index3<2">{{item3.airName}}-{{item3.configName}}*{{item3.bottleNumber}}<text>{{index3<1?' ':'...'}}</text></text></view>
  19. </view>
  20. <view class="for-address-box">
  21. <img src="@/images/basicsModules/icon_wtzg_sj.png">
  22. <view>{{item2.createTime}}</view>
  23. </view>
  24. <view class="for-time-box">
  25. <img src="@/images/basicsModules/icon_wtzg_xx.png">
  26. <view>{{item2.campus}}-{{item2.building}}-{{item2.room}}</view>
  27. </view>
  28. </view>
  29. <!-- 回收 -->
  30. <view class="for-box" @click="goInfo(item4)" v-for="(item4,index4) in item.bottleStorageOutVOList" :key="index4">
  31. <view class="for-title-box">
  32. <view class="viewColor3">回收</view>
  33. <view><text v-for="(item5,index5) in item4.detailListVO" :key="index5" v-if="index5<2">{{item5.airName}}-{{item5.configName}}<text>{{index5<1?' ':'...'}}</text></text></view>
  34. </view>
  35. <view class="for-address-box">
  36. <img src="@/images/basicsModules/icon_wtzg_sj.png">
  37. <view>{{item4.createTime}}</view>
  38. </view>
  39. <view class="for-time-box">
  40. <img src="@/images/basicsModules/icon_wtzg_xx.png">
  41. <view>{{item4.campus}}-{{item4.building}}-{{item4.room}}</view>
  42. </view>
  43. </view>
  44. <!-- 问题 -->
  45. <view class="for-box" @click="goInfo(item6)" v-for="(item6,index6) in item.bottleStorageVOList" :key="index6">
  46. <view class="for-title-box">
  47. <view class="viewColor2">问题</view>
  48. <view><text v-for="(item7,index7) in item6.detailListVO" :key="index7" v-if="index7<2">{{item7.airName}}-{{item7.configName}}<text>{{index7<1?' ':'...'}}</text></text></view>
  49. </view>
  50. <view class="for-address-box">
  51. <img src="@/images/basicsModules/icon_wtzg_sj.png">
  52. <view>{{item6.createTime}}</view>
  53. </view>
  54. <view class="for-time-box">
  55. <img src="@/images/basicsModules/icon_wtzg_xx.png">
  56. <view>{{item6.campus}}-{{item6.building}}-{{item6.room}}</view>
  57. </view>
  58. </view>
  59. </view>
  60. <view class="get-null-box" v-if="noData">暂无更多数据</view>
  61. </scroll-view>
  62. </view>
  63. </template>
  64. <script>
  65. import { gasRecycleList } from '@/api/apiDemo/index.js'
  66. export default {
  67. name: "gasRecycle",
  68. data() {
  69. return {
  70. //列表请求参数
  71. getData:{
  72. pageNum:1,
  73. pageSize:20,
  74. remarkStatus:0,//0 未处理, 1 已处理
  75. },
  76. userType:uni.getStorageSync('userType'),
  77. curTab:0,
  78. tabText:['待处理','已处理',],
  79. dataList:[],
  80. noData:false,
  81. }
  82. },
  83. onLoad() {
  84. },
  85. onShow() {
  86. },
  87. mounted(){
  88. this.getList()
  89. },
  90. methods: {
  91. //顶部tab点击
  92. tabClick(index) {
  93. this.curTab = index;
  94. this.getData.pageNum=1;
  95. this.getData.remarkStatus=index;
  96. this.dataList=[];
  97. this.getList();
  98. },
  99. goInfo(d){
  100. if(d.remark=='gq'){
  101. uni.redirectTo({
  102. url:'/pages_supplier/gasRecycle/gasRecycleAirDetail?item='+encodeURIComponent(JSON.stringify(d))+'&status='+this.curTab
  103. });
  104. }else if(d.remark=='hs'){
  105. uni.redirectTo({
  106. url:'/pages_supplier/gasRecycle/gasRecycleRecycleDetail?item='+encodeURIComponent(JSON.stringify(d))+'&status='+this.curTab
  107. });
  108. }else if(d.remark=='wt'){
  109. uni.redirectTo({
  110. url:'/pages_supplier/gasRecycle/gasRecycleIssueDetail?item='+encodeURIComponent(JSON.stringify(d))+'&status='+this.curTab
  111. });
  112. }
  113. },
  114. //滚动加载事件
  115. scrollGet(){
  116. this.getData.pageNum += 1;
  117. this.getList();
  118. },
  119. //获取列表数据
  120. async getList(){
  121. let _this = this;
  122. const {data} = await gasRecycleList(_this.getData);
  123. if(data.code==200){
  124. let _this = this;
  125. let res=data.rows
  126. if(res && res.length>0){
  127. if(_this.getData.pageNum==1){
  128. _this.dataList=res;
  129. }else{
  130. _this.dataList=_this.dataList.concat(res);
  131. }
  132. }else{
  133. _this.noData=true;
  134. }
  135. }
  136. },
  137. }
  138. }
  139. </script>
  140. <style lang="stylus" scoped>
  141. #gasRecycle {
  142. height: 100%;
  143. width: 100%;
  144. flex :1;
  145. display flex;
  146. flex-direction column
  147. overflow hidden
  148. .tabTitle{
  149. display flex;
  150. width:100%;
  151. height: 100rpx;
  152. background: #fff;
  153. margin-bottom 16rpx;
  154. .tabTitle_li{
  155. width:146rpx;
  156. text-align center;
  157. margin-top: 16rpx;
  158. .tabTitle_text{
  159. display: inline-block;
  160. font-size: 28rpx;
  161. font-family: PingFang SC;
  162. font-weight: 500;
  163. color: #333333;
  164. line-height: 64rpx;
  165. &.on{
  166. color:#0183FA;
  167. }
  168. }
  169. .tabTitle_across{
  170. width: 50rpx;
  171. height: 6rpx;
  172. background: #0183FA;
  173. border-radius: 3rpx;
  174. margin-left 50rpx;
  175. display none;
  176. &.on{
  177. display block;
  178. }
  179. }
  180. }
  181. }
  182. .scroll-box{
  183. // flex:1;
  184. overflow-y scroll;
  185. .for-big-box:last-child{
  186. margin-bottom:180rpx;
  187. }
  188. .for-big-box{
  189. margin:0 20rpx 20rpx;
  190. overflow hidden
  191. border-bottom-left-radius :20rpx;
  192. border-bottom-right-radius :20rpx;
  193. .for-time-p{
  194. background #fff
  195. line-height:87rpx;
  196. font-size:30rpx;
  197. padding:0 22rpx;
  198. border-top-left-radius:20rpx;
  199. border-top-right-radius:20rpx;
  200. }
  201. .for-back-img{
  202. height:30rpx;
  203. width:710rpx;
  204. }
  205. .for-list-box:nth-child(3){
  206. .min-for-title-box{
  207. border:none;
  208. }
  209. }
  210. .for-box{
  211. overflow hidden;
  212. background: #fff;
  213. .for-title-box{
  214. display:flex;
  215. margin:0 26rpx 0;
  216. border-top:1rpx solid #dedede;
  217. padding-top:45rpx;
  218. view:nth-child(1){
  219. width:98rpx;
  220. line-height:38rpx;
  221. height:38rpx;
  222. border-radius:6rpx;
  223. font-size:20rpx;
  224. text-align center;
  225. margin-right:10rpx;
  226. }
  227. view:nth-child(2){
  228. flex:1;
  229. font-size:30rpx;
  230. color:#333;
  231. height:36rpx;
  232. lin-height:36rpx;
  233. margin-right:10rpx;
  234. display:block;
  235. overflow:hidden;
  236. text-overflow:ellipsis;
  237. white-space:nowrap;
  238. }
  239. view:nth-child(3){
  240. font-size:30rpx;
  241. color:#333;
  242. height:36rpx;
  243. lin-height:36rpx;
  244. color:#D80000;
  245. }
  246. .viewColor1{
  247. background #ffe6e6;
  248. color:#ff5555;
  249. }
  250. .viewColor2{
  251. background #fef2dd;
  252. color:#f6a71d;
  253. }
  254. .viewColor3{
  255. background #e0f1e2;
  256. color:#30a23d;
  257. }
  258. .viewColor4{
  259. background #f2dddd;
  260. color:#a51919;
  261. }
  262. .viewColor5{
  263. background #e2f6f8;
  264. color:#3ac3d3;
  265. }
  266. .viewColor6{
  267. background #d9edfe;
  268. color:#0183fa;
  269. }
  270. }
  271. .for-address-box{
  272. display:flex;
  273. margin:33rpx 26rpx 0;
  274. img{
  275. width:28rpx;
  276. height:28rpx;
  277. margin-right:20rpx;
  278. }
  279. view{
  280. font-size:28rpx;
  281. line-height:28rpx;
  282. color:#666;
  283. }
  284. }
  285. .for-time-box{
  286. display:flex;
  287. margin:26rpx 26rpx 0;
  288. padding-bottom:32rpx;
  289. img{
  290. width:28rpx;
  291. height:28rpx;
  292. margin-right:20rpx;
  293. }
  294. view{
  295. font-size:28rpx;
  296. line-height:28rpx;
  297. color:#666;
  298. }
  299. }
  300. }
  301. }
  302. /*暂无数据*/
  303. .get-null-box{
  304. height:100rpx;
  305. line-height:100rpx;
  306. color:#999;
  307. text-align center
  308. }
  309. }
  310. }
  311. </style>