index.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. <template>
  2. <view class="flex-common-css page-box box-bg">
  3. <Nav :title="'我的'" :genre="1" :back="false" :is_fixed='false'></Nav>
  4. <Search :placeholder="'姓名或电话'" @setSearch="setSearch"></Search>
  5. <task-ima-tab @setProductId="setProductId" :num-type="0"></task-ima-tab>
  6. <!-- <view class="page-box-bg-fff m-lr20 r-20">
  7. <z-tabs ref="tabs" :list="tabsList" :active-style="{color:'#10B261',fontWeight:'bold',fontSize:'30rpx'}"
  8. :bar-style="{background:'#10B261'}" :inactive-style="{fontWeight:'bold',fontSize:'28rpx'}"
  9. :current="current" :bar-animate-mode="'worm'" @change="tabsChange" />
  10. </view> -->
  11. <view class="p-20">
  12. <view class="personal m-lr10 row-justify-sb center">
  13. <text class="sys-weight-600">精选系列</text>
  14. <view class="row-justify-sb center">
  15. <view class="personal_text">
  16. <uni-datetime-picker type="date">
  17. <view class="personal sys-background-fff size-24 sys-weight-600 p-lr30 r-40">{{indexTime}}
  18. </view>
  19. </uni-datetime-picker>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="scroll-view-css flex-direction">
  25. <TaskItem :type="5" :taskList="backlogList" @heartBut="heartBut"></TaskItem>
  26. </view>
  27. <Tab class="tabs_height" :tab-index="1"></Tab>
  28. </view>
  29. </template>
  30. <script>
  31. import TaskItem from "@/common/task/task-item.vue"
  32. import PieChart from "@/common/chart/pie_chart.vue"
  33. import CircleChart from "@/common/chart/circle_chart.vue"
  34. // 个人信息
  35. import IndexColumn from "./module/index_column.vue"
  36. // 顶部栏目
  37. import IndexPersonal from "./module/index_personal.vue"
  38. import {
  39. getDateBacklogStatistics,
  40. getDayBacklogList
  41. } from "@/api/task";
  42. import TaskImaTab from "@/common/task/task_ima_tab.vue";
  43. import {
  44. date
  45. } from "@/uni_modules/uv-ui-tools/libs/function/test";
  46. export default {
  47. components: {
  48. TaskItem,
  49. PieChart,
  50. CircleChart,
  51. IndexColumn,
  52. IndexPersonal,
  53. TaskImaTab
  54. },
  55. data() {
  56. return {
  57. current: 0,
  58. modelTime: this.$tools.getDate('-'),
  59. indexTime: this.$tools.getDate('-'),
  60. is_admin: false,
  61. scrollTop: 0,
  62. topNavHeight: 0,
  63. tabsList: [{
  64. name: '全部',
  65. disabled: false
  66. }, {
  67. name: '未完成(0)',
  68. dot_color: 'red',
  69. is_dot: false,
  70. disabled: false
  71. }, {
  72. name: '已完成',
  73. dot_color: 'red',
  74. is_dot: false,
  75. disabled: false
  76. }],
  77. memberData: {
  78. draftNum: 0,
  79. creditNum: 0,
  80. noticeNum: 0,
  81. take_num: 0,
  82. unreadNum: 0,
  83. },
  84. statisticsData: {
  85. endNum: 0,
  86. exceedDate: 0,
  87. lagDate: 0,
  88. totalNum: 0,
  89. },
  90. loanList: [],
  91. backlogList: [],
  92. weekData: [],
  93. weekNum: 1,
  94. dayNum: 0,
  95. day: '',
  96. month: '',
  97. page: 1,
  98. isAjax: false,
  99. total: null
  100. }
  101. },
  102. watch: {},
  103. onLoad() {},
  104. onShow() {},
  105. onPageScroll(res) {
  106. this.scrollTop = res.scrollTop / 120
  107. },
  108. mounted() {
  109. this.backlogListData()
  110. },
  111. onReachBottom() {},
  112. methods: {
  113. heartBut(data) {
  114. if (uni.getStorageSync('loanList')) {
  115. this.loanList = uni.getStorageSync('loanList')
  116. }
  117. if (data) {
  118. this.backlogList.forEach((i, k) => {
  119. if (i.id === data.id) {
  120. i.live = !i.live
  121. }
  122. })
  123. uni.setStorageSync('backlogList', this.backlogList)
  124. if (data.type) {
  125. this.backlogList.forEach((v, j) => {
  126. if (v.id === data.id) {
  127. this.loanList.push(v)
  128. }
  129. })
  130. uni.setStorageSync('loanList', this.loanList)
  131. } else {
  132. this.backlogList.forEach((v, j) => {
  133. if (v.id === data.id) {
  134. this.loanList.splice(j, 1)
  135. }
  136. })
  137. uni.setStorageSync('loanList', this.loanList)
  138. }
  139. }
  140. },
  141. backlogListData() {
  142. let data = uni.getStorageSync('backlogList')
  143. if (data) {
  144. this.backlogList = data
  145. } else {
  146. this.backlogList = [{
  147. img: 'https://copyright.bdstatic.com/vcg/creative/d6c6a351be227d5d3b3e8c1f96f56e50.jpg@h_1280',
  148. proportion: '37',
  149. name: '市中心写字楼 - 优越地段',
  150. live: false,
  151. percentage: '3.1',
  152. description: '地铁地产有限责任公司',
  153. amount: '5.0',
  154. trend: '7.5',
  155. risk: '客户终身价值 37%',
  156. time: '2024-001',
  157. id: 1,
  158. },
  159. {
  160. img: 'https://pic.rmb.bdstatic.com/bjh/3ea195479f8a/250303/f53064611fee7c092312f3b6ea8e439d.jpeg',
  161. proportion: '71',
  162. name: '塔楼-黄金地段',
  163. live: false,
  164. percentage: '4.1',
  165. description: '医疗地产公司',
  166. amount: '5.0',
  167. trend: '5.5',
  168. risk: '客户终身价值 77%',
  169. time: '2024-002',
  170. id: 2,
  171. },
  172. {
  173. img: 'https://qcloud.dpfile.com/pc/3B5v9C_aeqiLmADxyv5K2oclwwy3V_g7gw7Dmq38AuV9VmaUI3Rb5Uvj6kJNMMCrY0q73sB2DyQcgmKUxZFQtw.jpg',
  174. proportion: '60',
  175. name: '豪华零售中心-高街',
  176. live: false,
  177. percentage: '1.5',
  178. description: '奢侈品地产公司',
  179. amount: '8.5',
  180. trend: '6.8',
  181. risk: '客户终身价值 10.5%',
  182. time: '2024-002',
  183. id: 3,
  184. }
  185. ]
  186. uni.setStorageSync('backlogList', this.backlogList)
  187. }
  188. }
  189. },
  190. }
  191. </script>
  192. <style lang="scss" scoped>
  193. .box-bg{
  194. background-image: url('https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/task/task-nav-bg.png');
  195. background-repeat: no-repeat;
  196. background-size: 100% auto;
  197. }
  198. .head-tab {
  199. padding: 8rpx 16rpx;
  200. }
  201. .croll-view-item {
  202. width: 320rpx;
  203. height: 224rpx;
  204. border-radius: 40rpx;
  205. display: flex;
  206. flex-direction: column;
  207. align-items: center;
  208. justify-content: center;
  209. }
  210. .scroll-view {
  211. white-space: nowrap;
  212. }
  213. .personal {
  214. height: 55rpx;
  215. line-height: 55rpx;
  216. }
  217. .pie_chart {
  218. width: 135px
  219. }
  220. .circle_chart {
  221. width: 135px;
  222. padding-top: 20rpx;
  223. }
  224. .chart_dot {
  225. width: 16rpx;
  226. height: 16rpx;
  227. border-radius: 50%;
  228. }
  229. </style>