myLaunch.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  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.taskName}}
  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>
  26. <view class="demo-uni-col light" style="padding: 26rpx;color: #b1b1b1;">
  27. {{item.formData.reason ? item.formData.reason : ''}}
  28. </view>
  29. </uni-col>
  30. </uni-row>
  31. <uni-row class="demo-uni-row">
  32. <uni-col :span="13">
  33. <view class="demo-uni-col light" style="color: #727272;">
  34. {{item.createTime}}
  35. </view>
  36. </uni-col>
  37. </uni-row>
  38. </view>
  39. </view>
  40. </view>
  41. </scroll-list>
  42. </view>
  43. </template>
  44. <style lang="scss" scoped>
  45. // page {
  46. // background-color: #f3f3f3;
  47. // }
  48. .page-wrap {}
  49. .infoBody {
  50. background-color: #ffffff;
  51. padding: 40rpx;
  52. border-radius: 20rpx;
  53. margin: 20rpx;
  54. box-shadow: 0px 2px 10px #cccccc;
  55. }
  56. </style>
  57. <script>
  58. export default {
  59. data() {
  60. return {
  61. option: {
  62. page: 1,
  63. size: 5,
  64. auto: true
  65. },
  66. page: 1,
  67. list: [],
  68. scrollList: [],
  69. total: 0,
  70. actions: [{
  71. name: '事假',
  72. id: '0'
  73. },
  74. {
  75. name: '病假',
  76. id: '1'
  77. },
  78. {
  79. name: '调休',
  80. id: '2'
  81. },
  82. {
  83. name: '年假',
  84. id: '3'
  85. },
  86. {
  87. name: '婚假',
  88. id: '4'
  89. },
  90. {
  91. name: '产假',
  92. id: '6'
  93. },
  94. {
  95. name: '陪产假',
  96. id: '7'
  97. },
  98. {
  99. name: '丧假',
  100. id: '5'
  101. },
  102. ],
  103. file_approval_flow_run_key: '',
  104. biz_leave_flow_run_key: '',
  105. reserve_consuming_flow_run_key: '',
  106. reserve_return_flow_run_key: '',
  107. reserve_register_flow_run_key: '',
  108. personnel_hire_approval_flow_run_key: ''
  109. }
  110. },
  111. onLoad() {
  112. this.file_approval_flow_run_key = uni.getStorageSync('file_approval_flow_run_key')
  113. this.biz_leave_flow_run_key = uni.getStorageSync('biz_leave_flow_run_key')
  114. this.reserve_consuming_flow_run_key = uni.getStorageSync('reserve_consuming_flow_run_key')
  115. this.reserve_return_flow_run_key = uni.getStorageSync('reserve_return_flow_run_key')
  116. this.reserve_register_flow_run_key = uni.getStorageSync('reserve_register_flow_run_key')
  117. this.personnel_hire_approval_flow_run_key = uni.getStorageSync('personnel_hire_approval_flow_run_key')
  118. this.personnel_dimission_approval_flow_run_key = uni.getStorageSync(
  119. 'personnel_dimission_approval_flow_run_key')
  120. },
  121. onShow() {
  122. this.$refs.list.refresh()
  123. },
  124. methods: {
  125. handleTest(item) {
  126. item.pageType = 3
  127. uni.setStorageSync("approval", item)
  128. this.readL(item.id)
  129. if (item.examplesId === this.file_approval_flow_run_key) {
  130. this.$goto('../ge/geNewsApproval')
  131. } else if (item.examplesId === this.biz_leave_flow_run_key) {
  132. this.$goto('../ge/geApproval')
  133. } else if (item.examplesId === this.reserve_register_flow_run_key) {
  134. this.$goto('../ge/geReserveApproval')
  135. } else if (item.examplesId === this.reserve_consuming_flow_run_key) {
  136. this.$goto('../ge/geReserveApproval')
  137. } else if (item.examplesId === this.reserve_return_flow_run_key) {
  138. this.$goto('../ge/geReserveApproval')
  139. } else if (item.examplesId === this.personnel_hire_approval_flow_run_key) {
  140. this.$goto('../ge/geEntry')
  141. } else if (item.examplesId === this.personnel_dimission_approval_flow_run_key) {
  142. this.$goto('../ge/geDimission')
  143. } else if (item.examplesId === uni.getStorageSync('interview_record_approval_flow_run_key')) {
  144. this.$goto('../ge/geInterview')
  145. } else if (item.examplesId === uni.getStorageSync('instant_notice_approval_flow_run_key')) {
  146. this.$goto('../ge/geNotice')
  147. } else if (item.examplesId === uni.getStorageSync('shift_official_approval_flow_run_key')) {
  148. this.$goto('../ge/geShiftOfficial')
  149. } else if (item.examplesId === uni.getStorageSync('use_seal_approval_flow_run_key')) {
  150. this.$goto('../ge/geUseSeal')
  151. } else if (item.examplesId === uni.getStorageSync('device_repairs_approval_flow_run_key')) {
  152. this.$goto('../ge/geDeviceRepairs')
  153. } else if (item.examplesId === uni.getStorageSync('device_scrap_approval_flow_run_key')) {
  154. this.$goto('../ge/geDeviceScrap')
  155. }else if (item.examplesId === uni.getStorageSync('purchase_approval_flow_run_key')) {
  156. this.$goto('../ge/gePurchase')
  157. }else if (item.examplesId === uni.getStorageSync('contract_approval_flow_run_key')) {
  158. this.$goto('../ge/geContract')
  159. }
  160. this.list = []
  161. },
  162. async readL(id) {
  163. // 发送请求
  164. const {
  165. data: res
  166. } = await this.$httpRequest({
  167. url: '/app/rl?id=' + id,
  168. method: 'get',
  169. urlType: this.$getUrlType()
  170. });
  171. if (res.code === 200) {
  172. }
  173. },
  174. async taskList(paging) {
  175. // 发送请求
  176. const {
  177. data: res
  178. } = await this.$httpRequest({
  179. url: '/app/initiator?pageNum=' + paging.page + '&pageSize=' + paging.size,
  180. method: 'get',
  181. urlType: this.$getUrlType()
  182. });
  183. if (res.code === 200) {
  184. if (paging.page === 1) {
  185. this.scrollList = res.rows
  186. this.total = res.total
  187. this.$refs.list.loadSuccess({
  188. list: res.rows,
  189. total: this.total
  190. });
  191. } else if (paging.page > 1) {
  192. for (var i = 0; i < res.rows.length; i++) {
  193. this.scrollList.push(res.rows[i])
  194. }
  195. this.$refs.list.loadSuccess({
  196. list: this.scrollList,
  197. total: this.total
  198. });
  199. }
  200. }
  201. },
  202. refresh(paging) {
  203. this.taskList(paging)
  204. },
  205. scrolltolower(e) {},
  206. load(paging) {
  207. this.taskList(paging)
  208. },
  209. loadSuccess(list) {
  210. this.list = list
  211. }
  212. }
  213. }
  214. </script>