listPage.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. <!-- 权限申请列表 -->
  2. <template>
  3. <view class="permissionApplyListPage">
  4. <view class="top-picker-box">
  5. <picker @change="typeChange" :value="typeIndex" :range="typeList" :range-key="'label'">
  6. <view class="picker-p" :class="queryParams.type?'check-picker-p':''">{{queryParams.type?typeList[typeIndex].label:'请选择'}}</view>
  7. </picker>
  8. </view>
  9. <scroll-view scroll-y @scrolltolower="scrollGet" class="for-max-box">
  10. <view class="for-box" v-for="(item,index) in dataList" :key="index">
  11. <view class="title-p">{{item.data1}}</view>
  12. <view class="text-p">{{item.data2}}</view>
  13. <view class="text-p">申请权限类型:{{item.data3}}</view>
  14. <view class="text-p">申请人:{{item.data4}}</view>
  15. <view class="text-p">申请时间:{{item.data5}}</view>
  16. <view class="text-p">审核人:{{item.data6}}</view>
  17. <view class="text-p">审核时间:{{item.data7}}</view>
  18. <view class="position-p" :class="item.data8==3?'colorB':'colorA'">{{item.data8==1?'待审批':(item.data8==2?'审批通过':(item.data8==3?'驳回':''))}}</view>
  19. <view class="button-p-1" @click="throughButton()">通过</view>
  20. <view class="button-p-2" @click="rejectionButton(1)">驳回</view>
  21. </view>
  22. </scroll-view>
  23. <view class="add-button" @click="goPage()">新申请</view>
  24. <view class="shade-max-big-box" v-if="dialogType">
  25. <view class="shade-null-1" @click="rejectionButton(2)"></view>
  26. <view class="shade-big-box">
  27. <view class="shade-title-p">驳回申请</view>
  28. <textarea class="textarea" placeholder="请输入驳回原因及说明"
  29. maxlength="100" v-model="dialogText"></textarea>
  30. <view class="shade-button-box">
  31. <view @click="dialogButton(1)">取消</view>
  32. <view @click="dialogButton(2)">驳回</view>
  33. </view>
  34. </view>
  35. <view class="shade-null-2" @click="rejectionButton(2)"></view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. import {
  41. demo1,
  42. demo2
  43. } from '@/pages_hazardousWasteRecycling/api/index.js'
  44. export default {
  45. data() {
  46. return {
  47. typeList:[
  48. { value: 1, label: "全部" },
  49. { value: 2, label: "待审批" },
  50. { value: 3, label: "已通过" },
  51. { value: 4, label: "驳回" },
  52. ],
  53. // 查询参数
  54. getDataType: false,
  55. queryParams: {
  56. page: 1,
  57. pageSize: 10,
  58. type:1,
  59. },
  60. typeIndex:0,
  61. total: 0,
  62. dataList: [],
  63. dialogType:false,
  64. dialogText:'',
  65. }
  66. },
  67. onLoad(option) {
  68. },
  69. onShow() {
  70. },
  71. mounted() {
  72. this.$set(this,'dataList',[
  73. {
  74. data1:'植物营养实验室(A201)',
  75. data2:'资源环境学院-农科楼- A201',
  76. data3:'回收报备、称重登记',
  77. data4:'张三(2020110010)',
  78. data5:'2025-11-03 10:10:09',
  79. data6:'王二小',
  80. data7:'2025-11-04 10:10:09',
  81. data8:'1',
  82. },
  83. {
  84. data1:'植物营养实验室(A201)',
  85. data2:'资源环境学院-农科楼- A201',
  86. data3:'回收报备、称重登记',
  87. data4:'张三(2020110010)',
  88. data5:'2025-11-03 10:10:09',
  89. data6:'王二小',
  90. data7:'2025-11-04 10:10:09',
  91. data8:'2',
  92. },
  93. {
  94. data1:'植物营养实验室(A201)',
  95. data2:'资源环境学院-农科楼- A201',
  96. data3:'回收报备、称重登记',
  97. data4:'张三(2020110010)',
  98. data5:'2025-11-03 10:10:09',
  99. data6:'王二小',
  100. data7:'2025-11-04 10:10:09',
  101. data8:'3',
  102. },
  103. ]);
  104. },
  105. methods: {
  106. //滚动加载事件
  107. scrollGet() {
  108. let self = this;
  109. if (self.total / self.queryParams.pageSize <= self.queryParams.page) {
  110. this.$set(this, 'getDataType', true);
  111. } else {
  112. this.queryParams.page += 1;
  113. this.$nextTick(() => {
  114. this.getList();
  115. })
  116. }
  117. },
  118. //获取实验室列表
  119. async getList() {
  120. let self = this;
  121. let obj = JSON.parse(JSON.stringify(this.queryParams));
  122. const {
  123. data
  124. } = await laboratoryAppletSubList(obj);
  125. if (data.code == 200) {
  126. if(self.queryParams.page == 1){
  127. this.$set(this, 'dataList', data.data.records);
  128. this.$set(this, 'total', data.data.total);
  129. if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
  130. this.$set(this, 'getDataType', true);
  131. }
  132. }else{
  133. this.$set(this, 'dataList', [...this.dataList, ...data.data.records]);
  134. this.$set(this, 'total', data.data.total);
  135. if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
  136. this.$set(this, 'getDataType', true);
  137. }
  138. }
  139. }
  140. },
  141. //选择器
  142. typeChange(e){
  143. this.$set(this.queryParams,'type',this.typeList[e.detail.value].value);
  144. this.$set(this,'typeIndex',e.detail.value);
  145. },
  146. //通过
  147. throughButton(){
  148. let self = this;
  149. uni.showModal({
  150. content: '是否确认通过?',
  151. cancelColor: "#999",
  152. confirmColor: "#0183FA",
  153. success: function(res) {
  154. if (res.confirm) {
  155. } else if (res.cancel) {}
  156. }
  157. });
  158. },
  159. //驳回
  160. rejectionButton(type){
  161. if(type == 1){
  162. this.$set(this,'dialogText','');
  163. this.$set(this,'dialogType',true);
  164. }else{
  165. this.$set(this,'dialogType',false);
  166. }
  167. },
  168. //弹窗按钮
  169. dialogButton(type){
  170. if(type == 1){
  171. this.$set(this,'dialogType',false);
  172. }else if(type == 2){
  173. this.$set(this,'dialogType',false);
  174. }
  175. },
  176. goPage(){
  177. uni.navigateTo({
  178. url: "/pages_hazardousWasteRecycling/views/permissionApply/index",
  179. });
  180. },
  181. },
  182. }
  183. </script>
  184. <style lang="stylus" scoped>
  185. .permissionApplyListPage{
  186. height: 100%;
  187. display flex;
  188. flex-direction column;
  189. .top-picker-box{
  190. .picker-p{
  191. border:1px solid #dedede;
  192. background-color: #fff;
  193. margin:20rpx 20rpx;
  194. padding:0 40rpx;
  195. line-height:60rpx;
  196. border-radius:10rpx;
  197. color:#999;
  198. }
  199. .check-picker-p{
  200. color:#333;
  201. }
  202. }
  203. .for-max-box{
  204. flex: 1;
  205. overflow-y scroll;
  206. padding:0 20rpx;
  207. .for-box{
  208. background-color: #fff;
  209. border-radius:10rpx;
  210. border:1rpx solid #dedede;
  211. width:666rpx;
  212. overflow: hidden;
  213. margin-bottom:20rpx;
  214. padding:20rpx;
  215. position: relative;
  216. view{
  217. font-size:30rpx;
  218. line-height:50rpx;
  219. }
  220. .title-p{
  221. font-weight:700;
  222. }
  223. .text-p{
  224. }
  225. .position-p{
  226. position: absolute;
  227. top:20rpx;
  228. right:20rpx;
  229. width:140rpx;
  230. text-align: center;
  231. }
  232. .colorA{
  233. color:#0183FA;
  234. }
  235. .colorB{
  236. color:#FF6A6A;
  237. }
  238. .button-p-1{
  239. position: absolute;
  240. bottom:120rpx;
  241. right:20rpx;
  242. background-color: #0183FA;
  243. border: 1rpx solid #0183FA;
  244. border-radius:10rpx;
  245. text-align: center;
  246. height:60rpx;
  247. line-height:58rpx;
  248. width:140rpx;
  249. color:#fff;
  250. }
  251. .button-p-2{
  252. position: absolute;
  253. bottom:20rpx;
  254. right:20rpx;
  255. background-color: #fff;
  256. border: 1rpx solid #FF6A6A;
  257. border-radius:10rpx;
  258. text-align: center;
  259. height:60rpx;
  260. line-height:58rpx;
  261. width:140rpx;
  262. color:#FF6A6A;
  263. }
  264. }
  265. }
  266. .add-button{
  267. width:650rpx;
  268. height:80rpx;
  269. margin:30rpx 50rpx 40rpx;
  270. line-height:80rpx;
  271. color:#fff;
  272. background-color: #0183FA;
  273. text-align: center;
  274. border-radius:10rpx;
  275. }
  276. .shade-max-big-box{
  277. position: fixed;
  278. height:100%;
  279. width:100%;
  280. background-color: rgba(0,0,0,0.5);
  281. display: flex;
  282. flex-direction: column;
  283. overflow: hidden
  284. .shade-null-1{
  285. flex:3;
  286. }
  287. .shade-null-2{
  288. flex:5;
  289. }
  290. .shade-big-box{
  291. width: 550rpx;
  292. margin: 0 auto;
  293. // height:500rpx;
  294. background-color: #fff;
  295. border-radius:10rpx;
  296. overflow: hidden;
  297. .shade-title-p{
  298. text-align: center;
  299. font-size: 34rpx;
  300. color: #0183fa;
  301. border-bottom: 1rpx solid #dedede;
  302. line-height: 80rpx;
  303. }
  304. .textarea{
  305. width: 450rpx;
  306. height: 200rpx;
  307. margin: 40rpx auto;
  308. border:1rpx solid #dededede;
  309. border-radius:10rpx;
  310. padding:20rpx;
  311. }
  312. .shade-button-box{
  313. display: flex;
  314. view:nth-child(1){
  315. flex:1;
  316. border-top:1px solid #0183FA;
  317. background-color: #FFF;
  318. color:#0183FA;
  319. text-align: center;
  320. line-height:58rpx;
  321. height:60rpx;
  322. width:100rpx;
  323. }
  324. view:nth-child(2){
  325. flex:1;
  326. border:1px solid #0183FA;
  327. background-color: #0183FA;
  328. color:#fff;
  329. text-align: center;
  330. line-height:58rpx;
  331. height:60rpx;
  332. width:100rpx;
  333. }
  334. }
  335. }
  336. }
  337. }
  338. </style>