index.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <view class="container">
  3. <view class="back-btn" @click="backToBefore()">
  4. <u-icon name="arrow-left" color="#fff" size="20" customStyle="margin:0 auto"></u-icon>
  5. <text class="back-text">施工阶段计划</text>
  6. </view>
  7. <view class="table-area">
  8. <uni-table stripe emptyText="暂无更多数据">
  9. <uni-tr>
  10. <uni-th width="90" align="center">开始日期</uni-th>
  11. <uni-th width="90" align="center">结束日期</uni-th>
  12. <uni-th width="90" align="center">当前阶段</uni-th>
  13. <uni-th width="90" align="center">计划状态</uni-th>
  14. </uni-tr>
  15. <uni-tr v-for="(item, index) in tableData" :key="index">
  16. <uni-td align="center" width="100">{{ item.beginDate || "--"}}</uni-td>
  17. <uni-td align="center" width="100">{{ item.endDate || "--" }}</uni-td>
  18. <uni-td align="center">{{ item.content || "--" }}</uni-td>
  19. <uni-td align="center">
  20. <view class="uni-group">
  21. <text v-if="item.statusSp === '未开工'" class="wait">未开工</text>
  22. <text v-if="item.statusSp === '进行中'" class="new">进行中</text>
  23. <text v-if="item.statusSp === '已完工'" class="done">已完工</text>
  24. </view>
  25. </uni-td>
  26. </uni-tr>
  27. </uni-table>
  28. </view>
  29. </view>
  30. </template>
  31. <script setup>
  32. import {
  33. ref
  34. } from 'vue'
  35. import {
  36. onLoad
  37. } from "@dcloudio/uni-app"
  38. import {
  39. getProjectInfoDetail,
  40. } from "@/api/work/projectInfo.js"
  41. function backToBefore() {
  42. uni.navigateBack({})
  43. };
  44. let tableData = ref([])
  45. onLoad((option) => {
  46. getProjectInfoDetail({
  47. subId: option.id
  48. }).then(res => {
  49. tableData.value = res.data.planInfo
  50. })
  51. })
  52. </script>
  53. <style lang="scss" scoped>
  54. page {
  55. height: 100%;
  56. background-color: #EAF0FA;
  57. }
  58. .container {
  59. position: relative;
  60. width: 100%;
  61. height: 100%;
  62. background: linear-gradient(180deg, #1869F6 0%, #EAF0FA 64%, #EAF0FA 100%);
  63. .back-btn {
  64. position: absolute;
  65. top: 8%;
  66. left: 4%;
  67. display: flex;
  68. font-size: 40rpx;
  69. font-weight: 500;
  70. color: #FFF;
  71. .back-text {
  72. margin-left: 28rpx;
  73. }
  74. }
  75. .table-area {
  76. position: absolute;
  77. top: 14%;
  78. left: 0;
  79. width: 100%;
  80. height: 86%;
  81. background-color: #fff;
  82. border-radius: 28rpx 28rpx 0rpx 0rpx;
  83. overflow: hidden;
  84. .new {
  85. color: #1869F6;
  86. }
  87. .wait {
  88. color: #FF813E;
  89. }
  90. .done {
  91. color: #06BC43;
  92. }
  93. }
  94. }
  95. ::v-deep .uni-table {
  96. .uni-table-th,
  97. .uni-table-th-content {
  98. height: 112rpx;
  99. color: #343437;
  100. font-size: 32rpx;
  101. font-weight: 500;
  102. background-color: #EAF0FA;
  103. }
  104. .uni-table-td {
  105. color: #343437;
  106. font-size: 28rpx
  107. }
  108. }
  109. </style>