index.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template>
  2. <view class="content-box">
  3. <view class="policy-item-box" style="justify-content: space-around;">
  4. <view v-for="(item, idx) in projectList" :key="idx" :class="{ active: active === idx }" class="policy-item-name" @click="changeProjectTabs(idx)">
  5. {{ item }}
  6. </view>
  7. </view>
  8. <view class="project-box">
  9. <view class="project-content display-around-column" v-for="(item, idx) in projectData" :key="idx" style="padding-top: 20rpx;"
  10. :class="{ borderBottom: idx == projectData.length - 1 }" @click="enterProjectDeatil()">
  11. <view class="display-between items-center pos-class">
  12. <view style="font-size: 30rpx;">{{item.title}}</view>
  13. <!-- <image src="/static/important_icon.png" mode="aspectFit" style="width:80rpx;height: 80rpx;"></image> -->
  14. </view>
  15. <view class="display-flex-start pos-class">
  16. <view class="left-title">业主名称</view>
  17. <view>{{item.name}}</view>
  18. </view>
  19. <view class="display-flex-start pos-class" style="margin-bottom: 20rpx;">
  20. <view class="left-title">总投资</view>
  21. <view>{{item.maxMony}}</view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import md5 from "@/common/md5.js";
  29. export default {
  30. data() {
  31. return {
  32. swiperList: [],
  33. projectList: ["新建", "续建"],
  34. active: 0,
  35. projectData: new Array(5).fill({
  36. title:"普汇中金生命科学国际合作中心",
  37. name: "普汇中金国际控股有限公司",
  38. maxMony: "160000(万元)",
  39. }),
  40. };
  41. },
  42. onLoad(option) {
  43. this.active = Number(option.idx)
  44. },
  45. methods: {
  46. enterProjectDeatil(id) {
  47. uni.navigateTo({
  48. url:"/pages/metrics/projectPage/detail?id=" + id
  49. });
  50. },
  51. changeProjectTabs(idx) {
  52. let that = this;
  53. that.active = idx;
  54. switch (idx) {
  55. case 0:
  56. // that.getPolicyList("2");
  57. break;
  58. case 1:
  59. // that.getPolicyList("3");
  60. break;
  61. case 2:
  62. // that.getPolicyList("4");
  63. break;
  64. case 3:
  65. // that.getPolicyList("5");
  66. break;
  67. }
  68. },
  69. },
  70. };
  71. </script>
  72. <style lang="scss">
  73. .content-box {
  74. display: flex;
  75. flex-direction: column;
  76. flex: 1;
  77. }
  78. .policy-item-box {
  79. display: flex;
  80. justify-content: space-between;
  81. margin: 0 20rpx;
  82. margin-top: 20rpx;
  83. .policy-item-name {
  84. padding-bottom: 10rpx;
  85. font-size: 30rpx;
  86. width: 25%;
  87. text-align: center;
  88. }
  89. .active {
  90. font-weight: 600;
  91. border-bottom: 7rpx solid #02a7f0;
  92. }
  93. }
  94. .project-content {
  95. border-top: 1px solid #f2f2f2;
  96. }
  97. .pos-class {
  98. padding-left: 10rpx;
  99. margin-bottom: 10rpx;
  100. font-size: 28rpx;
  101. }
  102. .left-title {
  103. width: 20%;
  104. color: #7F7F7F;
  105. font-size: 26rpx;
  106. }
  107. .borderBottom {
  108. border-bottom: 1px solid #f2f2f2;
  109. }
  110. </style>