index.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <template>
  2. <view class="schedule">
  3. <u-navbar ref="uNavbar" :border-bottom="false" :back-icon-color="setNav.backColor" :is-back="setNav.isdisPlayNavTitle"
  4. :title-size="setNav.size" :title-bold="setNav.bold" :title="setNav.navTitle" :title-color="setNav.color" :background="setNav"></u-navbar>
  5. <view class="contentMain" v-if="data.length">
  6. <view v-for="(item, index) in data" :key="item.id"
  7. class="u-swipe-action" @click="click(item)" >
  8. <view class="item">
  9. <view class="title">{{item.message_title}}</view>
  10. <view class="userInfo">
  11. <view class="user">
  12. <view class="name">拟稿人:{{item.from_dept_name}}</view>
  13. <view class="name">发文日期:{{item.receive_time}}</view>
  14. <view class="name">流程结束日期:{{item.finish_time}}</view>
  15. </view>
  16. <!-- <view class="status">发文审核中</view> -->
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="no-data" v-else>暂无数据</view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. data() {
  27. return {
  28. setNav: {
  29. backgroundColor: '#fff', //背景色
  30. color: '##343434', //字体颜色
  31. bold: true,
  32. size: '36',
  33. backColor: '##343434',
  34. isdisPlayNavTitle: true, //是否显示返回按钮
  35. navTitle: '待办' //导航标题
  36. },
  37. data: [],
  38. pageNo: 1,
  39. total: 0,
  40. userInfo: {}
  41. }
  42. },
  43. onReachBottom() {
  44. if (this.data.length >= this.total) {
  45. return
  46. }
  47. this.pageNo += 1
  48. this.init()
  49. },
  50. onLoad() {
  51. this.userInfo = JSON.parse(uni.getStorageSync('userInfo') || '{}');
  52. this.init()
  53. },
  54. computed: {
  55. },
  56. methods: {
  57. async init() {
  58. let res = await this.$u.post(`boman-web-core/message/toDoMessage`, {
  59.  "pageNo": this.pageNo,
  60.         "pageSize": 10,
  61.         "username": this.userInfo.userName
  62. })
  63. if (res.data && res.data.rows) {
  64. res.data.rows = res.data.rows.map(item => {
  65. return Object.assign({}, item, {
  66. show: false
  67. })
  68. })
  69. if (this.pageNo == 1) {
  70. this.data = res.data.rows
  71. this.total = res.data.total
  72. } else {
  73. this.data = this.data.concat(res.data.rows)
  74. }
  75. }
  76. },
  77. click(item) {
  78. // 跳转到审核页面
  79. uni.navigateTo({
  80. url: '/pages/centerView/schedule/details?id=' + item.id + '&objId=' + item.receive_id
  81. })
  82. // if (this.active === 0) {
  83. // } else {
  84. // // 跳转到审核页面
  85. // }
  86. }
  87. }
  88. }
  89. </script>
  90. <style lang="scss" scoped>
  91. .schedule {
  92. height: 100%;
  93. background: #fff;
  94. .contentMain {
  95. padding: 0 20rpx;
  96. .item {
  97. .title {
  98. font-size: 28rpx;
  99. font-weight: bold;
  100. color: #343434;
  101. padding: 30rpx 30rpx 0 30rpx;
  102. white-space: break-word;
  103. word-break:break-all;
  104. }
  105. .userInfo {
  106. display: flex;
  107. align-items: flex-end;
  108. border-bottom: solid 1rpx #DADADA;
  109. padding: 30rpx;
  110. .user {
  111. flex: 1;
  112. color: #666;
  113. font-size: 24rpx;
  114. .name {
  115. margin-bottom: 10rpx;
  116. }
  117. }
  118. .status {
  119. color: #009FE8;
  120. font-size: 26rpx;
  121. margin-bottom: 4rpx;
  122. }
  123. .statusBtn {
  124. color: #fff;
  125. font-size: 22rpx;
  126. margin-bottom: 4rpx;
  127. background: #61C320;
  128. padding: 10rpx 20rpx;
  129. border-radius: 40rpx;
  130. }
  131. }
  132. }
  133. }
  134. }
  135. </style>