index.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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'
  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. // id=5457A19F-9D2B-4027-BA2B-5BA3C665F871&proveType=1
  57. uni.navigateTo({
  58. url:'/pages/subPackages/todo/inventoryReview?' + item.routeParam
  59. })
  60. }
  61. }
  62. }
  63. }
  64. </script>
  65. <style lang="scss">
  66. .todoIndex{
  67. .todoItem{
  68. margin-top: 24rpx;
  69. width: 686rpx;
  70. height: 212rpx;
  71. padding: 32rpx 32rpx;
  72. position: relative;
  73. background: white;
  74. border-radius: 16rpx;
  75. box-sizing: border-box;
  76. margin-left: 32rpx;
  77. .handleTypeStrTip{
  78. position: absolute;
  79. right: 0;
  80. top: 0;
  81. width: 220rpx;
  82. height: 56rpx;
  83. color: rgba(3, 101, 249, 1);
  84. font-size: 26rpx;
  85. display: flex;
  86. align-items: center;
  87. justify-content: center;
  88. background: url("https://www.idea-co-sf.com/gardenProduct/image/bj02.png") no-repeat;
  89. background-size: 100%;
  90. }
  91. .todoItemTitle{
  92. width: 400rpx;
  93. overflow: hidden;
  94. white-space: nowrap;
  95. text-overflow: ellipsis;
  96. color: rgba(34, 34, 34, 1);
  97. font-size: 32rpx;
  98. line-height: 38rpx;
  99. font-weight: 600;
  100. }
  101. .submitTime{
  102. color: rgba(102, 102, 102, 1);
  103. font-size: 28rpx;
  104. margin-top: 24rpx;
  105. line-height: 32rpx;
  106. }
  107. .submitPerson{
  108. color: rgba(102, 102, 102, 1);
  109. font-size: 28rpx;
  110. margin-top: 16rpx;
  111. line-height: 32rpx;
  112. }
  113. }
  114. }
  115. </style>