index.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <template>
  2. <div class="todoIndex">
  3. <div class="todoItem" v-for="item in todoList" @tap.stop="toDetail(item)">
  4. <div class="handleTypeStrTip">{{ item.handleTypeStr }}</div>
  5. <div class="todoItemTitle">{{ item.title }}</div>
  6. <div class="submitTime">提交时间:{{ item.createdAt }}</div>
  7. <div class="submitPerson">提交人:{{ item.srcUserName }}</div>
  8. </div>
  9. </div>
  10. </template>
  11. <script>
  12. import { getUserLocalStorageInfo, handleListAll, userHandle, getContractById } from "@/js_sdk/http.js"
  13. export default {
  14. components: {
  15. },
  16. onShow(){
  17. this.getList()
  18. },
  19. data() {
  20. return {
  21. getUserLocalStorageInfo: getUserLocalStorageInfo(),
  22. todoList:[
  23. // {name:'2024年01月26日~2024年...',handleTypeStr:'企业房源预定'},
  24. // {name:'空调坏了,不能使用',handleTypeStr:'报事报修-派单'},
  25. // {name:'上月水费不太对,怀疑水表',handleTypeStr:'报事报修-处理'},
  26. // {name:'XXXXXXX企业入库审核',handleTypeStr:'企业入库审核'},
  27. // {name:'2024年01月26日~2024年...',handleTypeStr:'企业房源预定'},
  28. // {name:'XXXXXXX',handleTypeStr:'资源预约审核'},
  29. ]
  30. };
  31. },
  32. methods:{
  33. getList(){
  34. const data = {
  35. userId: getUserLocalStorageInfo().userId,
  36. types: '0,1,8,9,10,11'
  37. }
  38. handleListAll(data).then(res=>{
  39. this.todoList = res
  40. })
  41. },
  42. toDetail(item) {
  43. if(item.handleTypeStr === '企业房源预定'){
  44. uni.navigateTo({
  45. url:'/pages/subPackages/todo/predetermineDetail?id=' + item.routeParam.replace('id=','')
  46. })
  47. }else if(item.handleTypeStr.includes('报事报修')){
  48. uni.navigateTo({
  49. url:'/pages/subPackages/todo/dispatch?item=' + JSON.stringify({id:item.routeParam.replace('id=','')})
  50. })
  51. }else if(item.handleTypeStr.includes('资源预约审核')){
  52. uni.navigateTo({
  53. url:'/pages/subPackages/todo/resourceReview?appointId=' + item.routeParam.replace('id=','')
  54. })
  55. }else if(item.handleTypeStr.includes('企业审核')){
  56. uni.navigateTo({
  57. url:'/pages/subPackages/todo/inventoryReview?' + item.routeParam
  58. })
  59. }
  60. }
  61. }
  62. }
  63. </script>
  64. <style lang="scss">
  65. .todoIndex{
  66. .todoItem{
  67. margin-top: 24rpx;
  68. width: 686rpx;
  69. height: 212rpx;
  70. padding: 32rpx 32rpx;
  71. position: relative;
  72. background: white;
  73. border-radius: 16rpx;
  74. box-sizing: border-box;
  75. margin-left: 32rpx;
  76. .handleTypeStrTip{
  77. position: absolute;
  78. right: 0;
  79. top: 0;
  80. width: 220rpx;
  81. height: 56rpx;
  82. color: rgba(3, 101, 249, 1);
  83. font-size: 26rpx;
  84. display: flex;
  85. align-items: center;
  86. justify-content: center;
  87. background: url("https://www.idea-co-sf.com/gardenProduct/image/bj02.png") no-repeat;
  88. background-size: 100%;
  89. }
  90. .todoItemTitle{
  91. width: 400rpx;
  92. overflow: hidden;
  93. white-space: nowrap;
  94. text-overflow: ellipsis;
  95. color: rgba(34, 34, 34, 1);
  96. font-size: 32rpx;
  97. line-height: 38rpx;
  98. font-weight: 600;
  99. }
  100. .submitTime{
  101. color: rgba(102, 102, 102, 1);
  102. font-size: 28rpx;
  103. margin-top: 24rpx;
  104. line-height: 32rpx;
  105. }
  106. .submitPerson{
  107. color: rgba(102, 102, 102, 1);
  108. font-size: 28rpx;
  109. margin-top: 16rpx;
  110. line-height: 32rpx;
  111. }
  112. }
  113. }
  114. </style>