companyTabulation.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <template>
  2. <view class="container container-secret">
  3. <view class="collect-ul" v-if="haveData">
  4. <view class="collect-ltem" v-for="(item, index) in collectList" :key="index" @click="goDetail(item)">
  5. <text class="title text_twoLine"
  6. >{{ item.Title }}
  7. <text class="reg-text" v-if="item.IsRed"></text>
  8. </text>
  9. <view class="content">
  10. <view class="item-left">
  11. <view class="abstract">{{ item.SubjectName ? "更新:" + item.SubjectName : "" }}</view>
  12. <view class="desc">
  13. <text class="publishDate">{{ item.PublishDate }}</text>
  14. </view>
  15. </view>
  16. <u-icon name="arrow-right" color="#BDBDBD" size="34"></u-icon>
  17. </view>
  18. </view>
  19. <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="totalPage > 1" />
  20. </view>
  21. <view class="nodata" v-else>
  22. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/act_search.png" mode="" class="nodata_ico"></image>
  23. <text>暂时没有报告的内容</text>
  24. </view>
  25. <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
  26. <Loading />
  27. </view>
  28. </template>
  29. <script>
  30. import { Reports } from "@/config/api.js";
  31. import { Throttle } from "@/config/util.js";
  32. import freeCharge from "@/components/freeCharge";
  33. let app = getApp({ allowDefault: true });
  34. export default {
  35. data() {
  36. return {
  37. refresh: false, //正在下拉
  38. page_no: 1,
  39. pageSize: 10,
  40. collectList: [],
  41. haveData: true,
  42. totalPage: "",
  43. status: "loadmore",
  44. loadText: {
  45. loadmore: "上拉加载更多",
  46. loading: "加载中",
  47. nomore: "已经到底了",
  48. },
  49. };
  50. },
  51. components: {
  52. freeCharge,
  53. },
  54. computed: {},
  55. methods: {
  56. //点击头部的tabs
  57. tabsHandler(item) {
  58. this.isType = item.value;
  59. this.page_no = 1;
  60. this.getList();
  61. },
  62. //获取数据
  63. async getList() {
  64. const res = await Reports.hetReport_selectionList({
  65. PageSize: this.pageSize,
  66. CurrentIndex: this.page_no,
  67. });
  68. if (res.Ret == 200) {
  69. this.status = this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
  70. this.totalPage = res.Data.Paging.Pages; //总页数
  71. if (this.page_no === 1) {
  72. this.collectList = res.Data.List || [];
  73. this.haveData = this.collectList.length ? true : false;
  74. if (this.refresh) {
  75. uni.stopPullDownRefresh();
  76. this.refresh = false;
  77. }
  78. } else {
  79. this.collectList = this.collectList.concat(res.Data.List);
  80. }
  81. }
  82. },
  83. //跳转详情
  84. goDetail(item) {
  85. /* 无需授权且已绑定 检验是或否有权限 */
  86. item.IsRed = false;
  87. uni.navigateTo({ url: "/reportPages/keyCompany/keyCompany?id=" + item.ArticleId });
  88. },
  89. },
  90. onLoad() {
  91. this.getList();
  92. },
  93. /* 触底 */
  94. onReachBottom: Throttle(function () {
  95. if (this.status === "nomore") return;
  96. this.status = "loading";
  97. this.page_no++;
  98. this.getList();
  99. }),
  100. /* 下拉刷新 */
  101. onPullDownRefresh: Throttle(function () {
  102. this.page_no = 1;
  103. this.refresh = true;
  104. this.getList();
  105. }),
  106. /* 用户点击分享 */
  107. // onShareAppMessage: function (res) {
  108. // return {
  109. // title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : "周度汇总",
  110. // path: "/reportPages/secretDetails/secretDetails?type=" + this.isType,
  111. // success: (res) => {},
  112. // fail: (err) => {},
  113. // };
  114. // },
  115. };
  116. </script>
  117. <style lang="scss" scoped>
  118. .container-secret {
  119. background: #f7f7f7;
  120. padding-bottom: 30rpx;
  121. .collect-ul {
  122. padding-top: 4rpx;
  123. .collect-ltem {
  124. padding: 30rpx 20rpx 30rpx 34rpx;
  125. background: #fff;
  126. margin-bottom: 4rpx;
  127. width: 682rpx;
  128. margin: 20rpx auto 0;
  129. .title {
  130. position: relative;
  131. color: #4a4a4a;
  132. font-size: 34rpx;
  133. padding-left: 28rpx;
  134. .reg-text {
  135. position: absolute;
  136. top: 15rpx;
  137. left: 0rpx;
  138. width: 14rpx;
  139. height: 14rpx;
  140. background-color: #ff0000;
  141. border-radius: 50%;
  142. z-index: 9;
  143. }
  144. }
  145. .content {
  146. display: flex;
  147. align-items: center;
  148. justify-content: space-between;
  149. }
  150. .desc {
  151. display: flex;
  152. align-items: center;
  153. margin-top: 17rpx;
  154. padding-left: 28rpx;
  155. color: #999;
  156. }
  157. .publishDate {
  158. margin-right: 30rpx;
  159. white-space: nowrap;
  160. }
  161. .text-name {
  162. color: #2c83ff;
  163. font-size: 26rpx;
  164. }
  165. }
  166. }
  167. .title {
  168. color: #333333;
  169. font-size: 30rpx;
  170. font-weight: 400;
  171. width: 100%;
  172. padding-bottom: 15rpx;
  173. border-bottom: 1px dashed #ccc;
  174. }
  175. .abstract {
  176. margin: 20rpx 0 0 30rpx;
  177. color: #666666;
  178. font-size: 28rpx;
  179. font-weight: 400;
  180. padding-right: 10rpx;
  181. min-height: 30rpx;
  182. }
  183. }
  184. </style>