kqList.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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;color: #616161;">
  13. 2023-04-26
  14. </view>
  15. </uni-col>
  16. <uni-col v-if="item.msgIsRead === '0'" :span="4">
  17. <view class="demo-uni-col light"
  18. style="color: rgb(55,186,189);margin-bottom: 10rpx;">
  19. 上班打卡
  20. </view>
  21. </uni-col>
  22. </uni-row>
  23. </view>
  24. <uni-row class="demo-uni-row">
  25. <uni-col :span="12">
  26. <view class="demo-uni-col light" style="padding: 26rpx;color: #b1b1b1;">
  27. </view>
  28. </uni-col>
  29. </uni-row>
  30. <uni-row class="demo-uni-row">
  31. <uni-col :span="12">
  32. <view class="demo-uni-col light" style="color: #b1b1b1;">
  33. {{"申请人:"+item.formData.apply_user_name}}
  34. </view>
  35. </uni-col>
  36. <uni-col :span="12">
  37. <view class="demo-uni-col light" style="color: #b1b1b1;">
  38. {{item.createTime}}
  39. </view>
  40. </uni-col>
  41. </uni-row>
  42. </view>
  43. </view>
  44. </view>
  45. </scroll-list>
  46. </view>
  47. </template>
  48. <style lang="scss" scoped>
  49. // page {
  50. // background-color: #f3f3f3;
  51. // }
  52. .page-wrap {}
  53. .infoBody {
  54. background-color: #ffffff;
  55. padding: 40rpx;
  56. border-radius: 20rpx;
  57. margin: 20rpx;
  58. box-shadow: 0px 2px 10px #cccccc;
  59. }
  60. </style>
  61. <script>
  62. export default {
  63. data() {
  64. return {
  65. option: {
  66. page: 1,
  67. size: 5,
  68. auto: true
  69. },
  70. page: 1,
  71. list: [],
  72. scrollList: [],
  73. total: 0,
  74. actions: [],
  75. file_approval_flow_run_key: '',
  76. biz_leave_flow_run_key: '',
  77. reserve_consuming_flow_run_key: '',
  78. personnel_hire_approval_flow_run_key: '',
  79. personnel_dimission_approval_flow_run_key: ''
  80. }
  81. },
  82. onLoad() {
  83. this.file_approval_flow_run_key = uni.getStorageSync('file_approval_flow_run_key')
  84. this.biz_leave_flow_run_key = uni.getStorageSync('biz_leave_flow_run_key')
  85. this.reserve_consuming_flow_run_key = uni.getStorageSync('reserve_consuming_flow_run_key')
  86. this.reserve_return_flow_run_key = uni.getStorageSync('reserve_return_flow_run_key')
  87. this.reserve_register_flow_run_key = uni.getStorageSync('reserve_register_flow_run_key')
  88. this.personnel_hire_approval_flow_run_key = uni.getStorageSync('personnel_hire_approval_flow_run_key')
  89. this.personnel_dimission_approval_flow_run_key = uni.getStorageSync(
  90. 'personnel_dimission_approval_flow_run_key')
  91. },
  92. onShow() {
  93. this.$refs.list.refresh()
  94. },
  95. methods: {
  96. handleTest(item) {
  97. item.pageType = 4
  98. uni.setStorageSync("approval", item)
  99. this.readL(item.taskId)
  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. }
  129. this.list = []
  130. },
  131. async readL(id) {
  132. // 发送请求
  133. const {
  134. data: res
  135. } = await this.$httpRequest({
  136. url: '/app/rt?taskId=' + id,
  137. method: 'get',
  138. urlType: this.$getUrlType()
  139. });
  140. if (res.code === 200) {
  141. }
  142. },
  143. async taskList(paging) {
  144. // 发送请求
  145. const {
  146. data: res
  147. } = await this.$httpRequest({
  148. url: '/app/ccRecord?pageNum=' + paging.page + '&pageSize=' + paging.size,
  149. method: 'get',
  150. urlType: this.$getUrlType()
  151. });
  152. if (res.code === 200) {
  153. for (var i = 0; i < res.rows.length; i++) {
  154. res.rows[i].formData = JSON.parse(res.rows[i].formData)
  155. }
  156. if (paging.page === 1) {
  157. this.scrollList = res.rows
  158. this.total = res.total
  159. this.$refs.list.loadSuccess({
  160. list: res.rows,
  161. total: this.total
  162. });
  163. } else if (paging.page > 1) {
  164. for (var i = 0; i < res.rows.length; i++) {
  165. this.scrollList.push(res.rows[i])
  166. }
  167. this.$refs.list.loadSuccess({
  168. list: this.scrollList,
  169. total: this.total
  170. });
  171. }
  172. }
  173. },
  174. refresh(paging) {
  175. this.taskList(paging)
  176. },
  177. scrolltolower(e) {},
  178. load(paging) {
  179. this.taskList(paging)
  180. },
  181. loadSuccess(list) {
  182. this.list = list
  183. }
  184. }
  185. }
  186. </script>