index.vue 5.9 KB

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