myAll.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <template>
  2. <view>
  3. <scroll-list ref="list" :option="option" @load="load" @refresh="refresh" @loadSuccess="loadSuccess"
  4. @scrolltolower="scrolltolower">
  5. <view v-for="(item, index) in list" :key="index" @click="handleTest(item)">
  6. <view class="infoBody">
  7. <view>
  8. <view style="border-bottom: 1px #b8b8b8 solid;">
  9. <uni-row class="demo-uni-row">
  10. <uni-col :span="20">
  11. <view class="demo-uni-col dark"
  12. style="font-size: 36rpx;margin: -20rpx 0 0 0;font-weight: bold;letter-spacing:5rpx;">
  13. {{item.formData.title}}
  14. </view>
  15. </uni-col>
  16. </uni-row>
  17. </view>
  18. <uni-row class="demo-uni-row">
  19. <uni-col>
  20. <view class="demo-uni-col light" style="padding: 26rpx;color: #b1b1b1;">
  21. {{item.formData.reason ? item.formData.reason : ''}}
  22. </view>
  23. </uni-col>
  24. </uni-row>
  25. <uni-row class="demo-uni-row">
  26. <uni-col :span="5">
  27. <view class="demo-uni-col light" style="color: #727272;">
  28. 申请人:
  29. </view>
  30. </uni-col>
  31. <uni-col :span="6">
  32. <view class="demo-uni-col light" style="color: #727272;">
  33. {{item.formData.apply_user_name}}
  34. </view>
  35. </uni-col>
  36. <uni-col :span="13">
  37. <view class="demo-uni-col light" style="color: #727272;">
  38. {{item.createTime}}
  39. </view>
  40. </uni-col>
  41. </uni-row>
  42. </view>
  43. <view></view>
  44. </view>
  45. </view>
  46. </scroll-list>
  47. </view>
  48. </template>
  49. <style lang="scss" scoped>
  50. // page {
  51. // background-color: #f3f3f3;
  52. // }
  53. .page-wrap {}
  54. .infoBody {
  55. background-color: #ffffff;
  56. padding: 40rpx;
  57. border-radius: 20rpx;
  58. margin: 20rpx;
  59. box-shadow: 0px 2px 10px #cccccc;
  60. }
  61. </style>
  62. <script>
  63. export default {
  64. data() {
  65. return {
  66. option: {
  67. page: 1,
  68. size: 5,
  69. auto: true
  70. },
  71. page: 1,
  72. list: [],
  73. scrollList: [],
  74. total: 0,
  75. file_approval_flow_run_key: '',
  76. biz_leave_flow_run_key: '',
  77. reserve_consuming_flow_run_key: '',
  78. reserve_return_flow_run_key: '',
  79. reserve_register_flow_run_key: '',
  80. personnel_hire_approval_flow_run_key: ''
  81. }
  82. },
  83. onLoad() {
  84. this.file_approval_flow_run_key = uni.getStorageSync('file_approval_flow_run_key')
  85. this.biz_leave_flow_run_key = uni.getStorageSync('biz_leave_flow_run_key')
  86. this.reserve_consuming_flow_run_key = uni.getStorageSync('reserve_consuming_flow_run_key')
  87. this.reserve_return_flow_run_key = uni.getStorageSync('reserve_return_flow_run_key')
  88. this.reserve_register_flow_run_key = uni.getStorageSync('reserve_register_flow_run_key')
  89. this.personnel_hire_approval_flow_run_key = uni.getStorageSync('personnel_hire_approval_flow_run_key')
  90. this.personnel_dimission_approval_flow_run_key = uni.getStorageSync(
  91. 'personnel_dimission_approval_flow_run_key')
  92. },
  93. onShow() {
  94. this.$refs.list.refresh()
  95. },
  96. methods: {
  97. handleTest(item) {
  98. item.pageType = 2
  99. uni.setStorageSync("approval", item)
  100. if (item.examplesId === this.file_approval_flow_run_key) {
  101. this.$goto('../ge/geNewsApproval')
  102. } else if (item.examplesId === this.biz_leave_flow_run_key) {
  103. this.$goto('../ge/geApproval')
  104. } else if (item.examplesId === this.reserve_register_flow_run_key) {
  105. this.$goto('../ge/geReserveApproval')
  106. } else if (item.examplesId === this.reserve_consuming_flow_run_key) {
  107. this.$goto('../ge/geReserveApproval')
  108. } else if (item.examplesId === this.reserve_return_flow_run_key) {
  109. this.$goto('../ge/geReserveApproval')
  110. } else if (item.examplesId === this.personnel_hire_approval_flow_run_key) {
  111. this.$goto('../ge/geEntry')
  112. } else if (item.examplesId === this.personnel_dimission_approval_flow_run_key) {
  113. this.$goto('../ge/geDimission')
  114. } else if (item.examplesId === uni.getStorageSync('interview_record_approval_flow_run_key')) {
  115. this.$goto('../ge/geInterview')
  116. } else if (item.examplesId === uni.getStorageSync('instant_notice_approval_flow_run_key')) {
  117. this.$goto('../ge/geNotice')
  118. } else if (item.examplesId === uni.getStorageSync('shift_official_approval_flow_run_key')) {
  119. this.$goto('../ge/geShiftOfficial')
  120. } else if (item.examplesId === uni.getStorageSync('use_seal_approval_flow_run_key')) {
  121. this.$goto('../ge/geUseSeal')
  122. } else if (item.examplesId === uni.getStorageSync('device_repairs_approval_flow_run_key')) {
  123. this.$goto('../ge/geDeviceRepairs')
  124. } else if (item.examplesId === uni.getStorageSync('device_scrap_approval_flow_run_key')) {
  125. this.$goto('../ge/geDeviceScrap')
  126. } else if (item.examplesId === uni.getStorageSync('purchase_approval_flow_run_key')) {
  127. this.$goto('../ge/gePurchase')
  128. } else if (item.examplesId === uni.getStorageSync('contract_approval_flow_run_key')) {
  129. this.$goto('../ge/geContract')
  130. } else if (item.examplesId === uni.getStorageSync('phone_card_apply_flow_run_key')) {
  131. this.$goto('../ge/gePhoneApply')
  132. } else if (item.examplesId === uni.getStorageSync('letter_dispose_flow_run_key')) {
  133. this.$goto('../ge/geLetterDispose')
  134. }
  135. this.list = []
  136. },
  137. async taskList(paging) {
  138. // 发送请求
  139. const {
  140. data: res
  141. } = await this.$httpRequest({
  142. url: '/app/gd?pageNum=' + paging.page + '&pageSize=' + paging.size,
  143. method: 'get',
  144. urlType: this.$getUrlType()
  145. });
  146. if (res.code === 200) {
  147. if (paging.page === 1) {
  148. this.scrollList = res.rows
  149. this.total = res.total
  150. this.$refs.list.loadSuccess({
  151. list: res.rows,
  152. total: this.total
  153. });
  154. } else if (paging.page > 1) {
  155. for (var i = 0; i < res.rows.length; i++) {
  156. this.scrollList.push(res.rows[i])
  157. }
  158. this.$refs.list.loadSuccess({
  159. list: this.scrollList,
  160. total: this.total
  161. });
  162. }
  163. }
  164. },
  165. // 刷新刷剧
  166. refresh(paging) {
  167. this.taskList(paging)
  168. },
  169. scrolltolower(e) {
  170. console.log(e)
  171. },
  172. load(paging) {
  173. this.taskList(paging)
  174. },
  175. loadSuccess(list) {
  176. this.list = list
  177. }
  178. }
  179. }
  180. </script>