index.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <view class="total-page page_env page-box">
  3. <Nav :title="'工作台导航'" :back="false" :is_fixed="true" :opacity="scrollTop" :justify="'left'" :color="'#fff'">
  4. <view class="p-20">
  5. <IndexPersonal @setMemberData="setMemberData"></IndexPersonal>
  6. <IndexColumn :memberData="memberData"></IndexColumn>
  7. </view>
  8. </Nav>
  9. <view class="p-lr20 m-tb30">
  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" v-model="modelTime" @change="onChangeTime"
  15. @touchmove.stop.prevent="moveHandle">
  16. <view class="personal sys-background-fff size-24 sys-weight-600 p-lr30 r-40">{{indexTime}}
  17. </view>
  18. </uni-datetime-picker>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="page-box-bg-fff m-t30 m-lr20 m-b20 r-30 row-justify-sb flex p-b30">
  24. <view class="">
  25. <view class="row-c">
  26. <view class="pie_chart column-c">
  27. <PieChart></PieChart>
  28. <text class="size-24 text-color-12">任务完成情况</text>
  29. </view>
  30. <view class="m-b30">
  31. <view class="row-c p-tb10" v-for="(item,index) in chartList" :key="index">
  32. <view class="row-c">
  33. <view class="row-c" style="line-height: 30rpx;">
  34. <view class="chart_dot" :style="{backgroundColor:item.color}"></view>
  35. <text class="m-l16 text-color-787">{{item.name}}</text>
  36. </view>
  37. </view>
  38. <text class="text-color-12 sys-weight-600 m-l40">{{item.value}}</text>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="circle_chart column-sb-c m-t10">
  44. <CircleChart :width="'180rpx'" :height="'180rpx'" :bgColor="'#0FB160'"></CircleChart>
  45. <text class="size-24 text-color-12">任务进度</text>
  46. </view>
  47. </view>
  48. <Enblank :message="'暂无待办任务'" v-if="!taskList.length"></Enblank>
  49. <TaskItem :type="2" :taskList="taskList"></TaskItem>
  50. <Tab class="tabs_height" :tab-index="0"></Tab>
  51. </view>
  52. </template>
  53. <script>
  54. import TaskItem from "@/common/task/task-item.vue"
  55. import PieChart from "@/common/chart/pie_chart.vue"
  56. import CircleChart from "@/common/chart/circle_chart.vue"
  57. // 个人信息
  58. import IndexColumn from "./module/index_column.vue"
  59. // 顶部栏目
  60. import IndexPersonal from "./module/index_personal.vue"
  61. export default {
  62. components: {
  63. TaskItem,
  64. PieChart,
  65. CircleChart,
  66. IndexColumn,
  67. IndexPersonal
  68. },
  69. data() {
  70. return {
  71. modelTime: this.$tools.getDate('-'),
  72. indexTime: this.$tools.getDate(),
  73. is_admin: false,
  74. scrollTop: 0,
  75. topNavHeight: 0,
  76. chartList: [{
  77. name: "超期",
  78. color: '#DE5847',
  79. value: "100%"
  80. }, {
  81. name: "滞后",
  82. color: '#EF8F27',
  83. value: "100%"
  84. }, {
  85. name: "正常",
  86. color: '#3ABF7D',
  87. value: "100%"
  88. }, ],
  89. taskList: [],
  90. memberData:{}
  91. }
  92. },
  93. onLoad() {
  94. uni.hideTabBar()
  95. },
  96. onPageScroll(res) {
  97. this.scrollTop = res.scrollTop / 120
  98. },
  99. onReachBottom() {
  100. console.log('到底部了');
  101. },
  102. methods: {
  103. setMemberData(memberData){
  104. this.memberData=memberData
  105. },
  106. onChangeTime(e) {
  107. this.indexTime = e
  108. },
  109. moveHandle() {
  110. return false
  111. },
  112. },
  113. }
  114. </script>
  115. <style lang="scss" scoped>
  116. .personal {
  117. height: 55rpx;
  118. line-height: 55rpx;
  119. }
  120. .pie_chart {
  121. width: 135px
  122. }
  123. .circle_chart {
  124. width: 135px;
  125. padding-top: 20rpx;
  126. }
  127. .chart_dot {
  128. width: 16rpx;
  129. height: 16rpx;
  130. border-radius: 50%;
  131. }
  132. </style>