index.vue 6.0 KB

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