index.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <view class="total-page page-env-160 page-box">
  3. <Nav :title="'我的'" :back="false" :is_fixed="true" :opacity="scrollTop" :justify="'left'" :color="'#fff'">
  4. <view class="p-20">
  5. <IndexPersonal ref="memberObj" @setMemberData="setMemberData"></IndexPersonal>
  6. <!-- <IndexColumn ref="columnObj" :memberData="memberData" :model-time="modelTime"></IndexColumn> -->
  7. </view>
  8. </Nav>
  9. <view class="p-20">
  10. <view class="personal m-lr10 row-justify-sb center">
  11. <text class="sys-weight-600">精选系列</text>
  12. <view class="row-justify-sb center">
  13. <view class="personal_text">
  14. <uni-datetime-picker type="date">
  15. <view class="personal sys-background-fff size-24 sys-weight-600 p-lr30 r-40">{{indexTime}}
  16. </view>
  17. </uni-datetime-picker>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. <TaskItem :type="5" :taskList="backlogList" @heartBut="heartBut"></TaskItem>
  23. <Tab class="tabs_height" :tab-index="0"></Tab>
  24. </view>
  25. </template>
  26. <script>
  27. import TaskItem from "@/common/task/task-item.vue"
  28. import PieChart from "@/common/chart/pie_chart.vue"
  29. import CircleChart from "@/common/chart/circle_chart.vue"
  30. // 个人信息
  31. import IndexColumn from "./module/index_column.vue"
  32. // 顶部栏目
  33. import IndexPersonal from "./module/index_personal.vue"
  34. import {
  35. getDateBacklogStatistics,
  36. getDayBacklogList
  37. } from "@/api/task";
  38. import {
  39. date
  40. } from "@/uni_modules/uv-ui-tools/libs/function/test";
  41. export default {
  42. components: {
  43. TaskItem,
  44. PieChart,
  45. CircleChart,
  46. IndexColumn,
  47. IndexPersonal
  48. },
  49. data() {
  50. return {
  51. modelTime: this.$tools.getDate('-'),
  52. indexTime: this.$tools.getDate('-'),
  53. is_admin: false,
  54. scrollTop: 0,
  55. topNavHeight: 0,
  56. chartList: [{
  57. name: "超期",
  58. color: '#DE5847',
  59. value: "0"
  60. }, {
  61. name: "滞后",
  62. color: '#EF8F27',
  63. value: "0"
  64. }, {
  65. name: "正常",
  66. color: '#3ABF7D',
  67. value: "0"
  68. }, ],
  69. memberData: {
  70. draftNum: 0,
  71. creditNum: 0,
  72. noticeNum: 0,
  73. take_num: 0,
  74. unreadNum: 0,
  75. },
  76. statisticsData: {
  77. endNum: 0,
  78. exceedDate: 0,
  79. lagDate: 0,
  80. totalNum: 0,
  81. },
  82. loanList: [],
  83. backlogList: [],
  84. weekData: [],
  85. weekNum: 1,
  86. dayNum: 0,
  87. day: '',
  88. month: '',
  89. page: 1,
  90. isAjax: false,
  91. total: null
  92. }
  93. },
  94. watch: {},
  95. onLoad() {},
  96. onShow() {},
  97. onPageScroll(res) {
  98. this.scrollTop = res.scrollTop / 120
  99. },
  100. mounted() {
  101. this.backlogListData()
  102. },
  103. onReachBottom() {},
  104. methods: {
  105. heartBut(data) {
  106. if (uni.getStorageSync('loanList')) {
  107. this.loanList = uni.getStorageSync('loanList')
  108. }
  109. if (data) {
  110. this.backlogList.forEach((i, k) => {
  111. if (i.id === data.id) {
  112. i.live = !i.live
  113. }
  114. })
  115. uni.setStorageSync('backlogList', this.backlogList)
  116. if (data.type) {
  117. this.backlogList.forEach((v, j) => {
  118. if (v.id === data.id) {
  119. this.loanList.push(v)
  120. }
  121. })
  122. uni.setStorageSync('loanList', this.loanList)
  123. } else {
  124. this.backlogList.forEach((v, j) => {
  125. if (v.id === data.id) {
  126. this.loanList.splice(j, 1)
  127. }
  128. })
  129. uni.setStorageSync('loanList', this.loanList)
  130. }
  131. }
  132. },
  133. backlogListData() {
  134. let data = uni.getStorageSync('backlogList')
  135. if (data) {
  136. this.backlogList = data
  137. } else {
  138. this.backlogList = [{
  139. img: 'https://copyright.bdstatic.com/vcg/creative/d6c6a351be227d5d3b3e8c1f96f56e50.jpg@h_1280',
  140. proportion: '37',
  141. name: 'Downtown Office Tower -Prime Location',
  142. live: false,
  143. percentage: '3.1',
  144. description: 'Metro Properties LLC',
  145. amount: '5.0',
  146. trend: '7.5',
  147. risk: 'LTV 37%',
  148. time: '2024-001',
  149. id: 1,
  150. },
  151. {
  152. img: 'https://pic.rmb.bdstatic.com/bjh/3ea195479f8a/250303/f53064611fee7c092312f3b6ea8e439d.jpeg',
  153. proportion: '71',
  154. name: 'Tower -Prime Location',
  155. live: false,
  156. percentage: '5.1',
  157. description: 'Healthcare Properties Inc',
  158. amount: '5.0',
  159. trend: '7.5',
  160. risk: 'LTV 37%',
  161. time: '2024-001',
  162. id: 2,
  163. }
  164. ]
  165. uni.setStorageSync('backlogList', this.backlogList)
  166. }
  167. }
  168. },
  169. }
  170. </script>
  171. <style lang="scss" scoped>
  172. .personal {
  173. height: 55rpx;
  174. line-height: 55rpx;
  175. }
  176. .pie_chart {
  177. width: 135px
  178. }
  179. .circle_chart {
  180. width: 135px;
  181. padding-top: 20rpx;
  182. }
  183. .chart_dot {
  184. width: 16rpx;
  185. height: 16rpx;
  186. border-radius: 50%;
  187. }
  188. </style>