accessQualification.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. <!-- 准入资格证书 -->
  2. <template>
  3. <view id="accessQualification">
  4. <view class="top-picker-max-box">
  5. <view class="top-picker-left-box">审核状态</view>
  6. <picker class="top-picker-right-box" @change="buttonChange"
  7. :range-key="'name'" :value="id" :range="buttonArray">
  8. <view>{{buttonArray[buttonArrayIndex].name}}</view>
  9. </picker>
  10. </view>
  11. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  12. <view class="for-big-box" v-for="(item,index) in infoList" :key="index">
  13. <view class="for-time-p">{{item.creatTime}}</view>
  14. <img class="for-back-img" src="@/images/basicsModules/for_min_bg.png">
  15. <view class="for-list-box" @click="goPageInfo(minItem)"
  16. v-for="(minItem,indexTwo) in item.applyList" :key="indexTwo">
  17. <view class="min-for-box-one">
  18. <view :class="minItem.auditStatus==1?'titleType1':(minItem.auditStatus==0?'titleType2':(minItem.auditStatus==2?'titleType3':''))">{{minItem.auditStatus==1?'未通过':(minItem.auditStatus==0?'待审核':(minItem.auditStatus==2?'已通过':''))}}</view>
  19. <view>{{minItem.subjectName}}</view>
  20. </view>
  21. <view class="min-for-box-two">
  22. <view></view>
  23. <view>申请人:{{minItem.userName}}</view>
  24. <view>{{minItem.hi}}</view>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="get-null-box" v-if="getData.nullDataType">暂无更多数据</view>
  29. </scroll-view>
  30. <view class="tip">请联系管理员开通<text>白名单</text>来获取实验室准入资格</view>
  31. <!-- <view class="bottom-button-box" @click="goSafeAccess">我的准入</view> -->
  32. </view>
  33. </template>
  34. <script>
  35. import { applyList } from '@/api/apiDemo/index.js'
  36. export default {
  37. data() {
  38. return {
  39. //选项
  40. buttonArray:[
  41. {name:"全部",id:""},
  42. {name:"待审核",id:"0"},
  43. {name:"已通过",id:"2"},
  44. {name:"未通过",id:"1"},
  45. ],
  46. buttonArrayIndex:0,
  47. auditStatus:"",
  48. //列表请求参数
  49. getData:{
  50. page:1,
  51. pageSize:20,
  52. getType:true,
  53. nullDataType:true,
  54. },
  55. infoList:[],
  56. }
  57. },
  58. onLoad() {
  59. },
  60. onShow(){
  61. this.clearData();
  62. this.getList();
  63. },
  64. methods: {
  65. goSafeAccess(){
  66. uni.navigateTo({
  67. url: '/pages_student/workbench/safeAccess/safeAccess',
  68. });
  69. },
  70. //清除
  71. clearData(){
  72. this.infoList = [];
  73. this.getData.page = 1;
  74. this.getData.getType = true;
  75. this.getData.nullDataType = true;
  76. },
  77. //去详情页
  78. goPageInfo(item){
  79. // uni.navigateTo({
  80. // url:'/pages_manage/workbench/accessQualification/accessQualificationInfo?item='+encodeURIComponent(JSON.stringify(item))+'&type='+encodeURIComponent(JSON.stringify(this.tabIndex))
  81. // })
  82. uni.navigateTo({
  83. url:'/page_basics/accessQualification/accessQualificationInfo?item='+encodeURIComponent(JSON.stringify(item))
  84. })
  85. },
  86. //滚动事件
  87. scrollGet(){
  88. if(this.getData.getType){
  89. this.getData.page += 1;
  90. this.getList();
  91. }
  92. },
  93. //获取头部数量数据
  94. async getTabData(){
  95. console.log("123")
  96. const {data} = await getApprovalCount()
  97. if(data.code == 200){
  98. this.tabData = data.data;
  99. }
  100. },
  101. //选择
  102. buttonChange(e){
  103. this.buttonArrayIndex = e.detail.value;
  104. this.infoList = [];
  105. this.getData.page = 1;
  106. this.getData.getType = true;
  107. this.getData.nullDataType = true;
  108. this.$set(this,'auditStatus',this.buttonArray[this.buttonArrayIndex].id);
  109. this.getList();
  110. },
  111. //获取列表数据
  112. async getList(){
  113. let self = this;
  114. let obj = {
  115. pageNum:this.getData.page,
  116. pageSize:this.getData.pageSize,
  117. auditStatus:this.auditStatus
  118. }
  119. const {data} = await applyList(obj)
  120. if(data.code==200){
  121. if(self.page==1){
  122. if(data.rows.length > 0 && data.rows.length == self.getData.pageSize){
  123. self.infoList = data.rows;
  124. }else if(data.rows.length > 0 && data.rows.length != self.getData.pageSize){
  125. self.infoList = data.rows;
  126. self.getData.getType = false;
  127. self.getData.nullDataType = true;
  128. }else{
  129. self.getData.getType = false;
  130. self.getData.nullDataType = true;
  131. }
  132. }else{
  133. if(data.rows.length > 0 && data.rows.length == self.getData.pageSize){
  134. self.infoList = self.infoList.concat(data.rows)
  135. }else if(data.rows.length > 0 && data.rows.length != self.getData.pageSize){
  136. self.infoList = self.infoList.concat(data.rows);
  137. self.getData.getType = false;
  138. self.getData.nullDataType = true;
  139. }else{
  140. self.getData.getType = false;
  141. self.getData.nullDataType = true;
  142. }
  143. }
  144. }
  145. },
  146. }
  147. }
  148. </script>
  149. <style lang="stylus" scoped>
  150. #accessQualification{
  151. height:100%;
  152. display flex
  153. flex-direction column
  154. .top-picker-max-box{
  155. height:100rpx;
  156. display flex;
  157. height:150rpx;
  158. background #fff;
  159. overflow hidden
  160. margin-bottom:15rpx;
  161. .top-picker-left-box{
  162. margin-top:34rpx;
  163. line-height:82rpx;
  164. width:145rpx;
  165. text-align center;
  166. }
  167. .top-picker-right-box{
  168. margin-top:34rpx;
  169. width:586rpx;
  170. height:82rpx;
  171. border:1rpx solid #A2A2A2;
  172. line-height:82rpx;
  173. border-radius:6rpx;
  174. view{
  175. padding:0 20rpx;
  176. color:#999999;
  177. }
  178. }
  179. }
  180. .top-max-box{
  181. height:100rpx;
  182. display flex
  183. background #fff
  184. margin-bottom:20rpx;
  185. .top-button-box{
  186. width:200rpx;
  187. padding-top:3rpx;
  188. view:nth-child(1){
  189. font-size:30rpx;
  190. text-align center;
  191. color:#333;
  192. line-height:95rpx;
  193. }
  194. view:nth-child(2){
  195. width:100rpx;
  196. height:5rpx;
  197. margin:0 auto;
  198. }
  199. .colorA{
  200. color:#0183FA!important;
  201. }
  202. .backA{
  203. background:#0183FA;
  204. }
  205. }
  206. }
  207. .info-max-box{
  208. flex:1;
  209. overflow: scroll
  210. .for-big-box:last-child{
  211. margin-bottom:180rpx;
  212. }
  213. .for-big-box{
  214. margin:0 20rpx 20rpx;
  215. overflow hidden
  216. border-radius:20rpx;
  217. // border-bottom-left-radius :20rpx;
  218. // border-bottom-right-radius :20rpx;
  219. background #fff;
  220. .for-time-p{
  221. background #fff
  222. line-height:57rpx;
  223. font-size:30rpx;
  224. padding:14rpx 22rpx 0;
  225. // border-top-left-radius:20rpx;
  226. // border-top-right-radius:20rpx;
  227. }
  228. .for-back-img{
  229. height:30rpx;
  230. width:710rpx;
  231. }
  232. .for-list-box:nth-child(3){
  233. border:none;
  234. }
  235. .for-list-box{
  236. border-top:1rpx solid #E0E0E0;
  237. margin:0 24rpx;
  238. padding:20rpx 0;
  239. .min-for-box-one{
  240. display:flex;
  241. view{
  242. height:36rpx;
  243. line-height:36rpx;
  244. margin:10rpx 0;
  245. }
  246. view:nth-child(1){
  247. width:100rpx;
  248. margin-right:20rpx;
  249. line-height:36rpx;
  250. text-align center;
  251. font-size:20rpx;
  252. }
  253. view:nth-child(2){
  254. flex:1;
  255. font-size:28rpx;
  256. }
  257. .titleType1{
  258. border-radius:6rpx;
  259. color:#FF5555;
  260. background rgba(255,85,85,0.2)
  261. }
  262. .titleType2{
  263. border-radius:6rpx;
  264. color:#F6A71D;
  265. background rgba(246,167,29,0.2)
  266. }
  267. .titleType3{
  268. border-radius:6rpx;
  269. color:#30A23D;
  270. background rgba(48,162,61,0.2)
  271. }
  272. }
  273. .min-for-box-two{
  274. display:flex;
  275. view{
  276. height:36rpx;
  277. line-height:36rpx;
  278. margin:10rpx 0;
  279. }
  280. view:nth-child(1){
  281. width:100rpx;
  282. margin-right:20rpx;
  283. line-height:36rpx;
  284. text-align center;
  285. font-size:20rpx;
  286. }
  287. view:nth-child(2){
  288. flex:1;
  289. font-size:26rpx;
  290. }
  291. view:nth-child(3){
  292. font-size:26rpx;
  293. }
  294. }
  295. }
  296. }
  297. .get-null-box{
  298. height:100rpx;
  299. line-height:100rpx;
  300. color:#999;
  301. text-align center
  302. }
  303. }
  304. .bottom-button-box{
  305. border-radius:20rpx;
  306. margin:20rpx 50rpx;
  307. width: 650rpx;
  308. height: 100rpx;
  309. line-height: 100rpx;
  310. background: #0183FA;
  311. font-size: 30rpx;
  312. color: #FFFFFF;
  313. text-align center;
  314. }
  315. .tip{
  316. width: 750rpx;
  317. height: 100rpx;
  318. line-height :100rpx;
  319. border-top: 1rpx solid #e0e0e0;
  320. background: #fff;
  321. font-size: 30rpx;
  322. color: #333;
  323. text-align center;
  324. >text{
  325. color:red;
  326. }
  327. }
  328. }
  329. </style>