bding 2 سال پیش
والد
کامیت
db93c66ddb
3فایلهای تغییر یافته به همراه342 افزوده شده و 227 حذف شده
  1. 15 0
      activityPages/activityDetail/activityDetail.vue
  2. 56 3
      pageMy/myCollection/myCollection.vue
  3. 271 224
      reportPages/keyCompany/keyCompany.vue

+ 15 - 0
activityPages/activityDetail/activityDetail.vue

@@ -1024,5 +1024,20 @@ export default {
       }
     }
   }
+  .select-box {
+    width: 100%;
+
+    .box {
+      height: 95prx;
+      line-height: 95rpx;
+      text-align: center;
+      font-size: 32rpx;
+      border-bottom: 1rpx solid #ebebeb;
+    }
+
+    .box-bottom {
+      border-bottom: none !important;
+    }
+  }
 }
 </style>

+ 56 - 3
pageMy/myCollection/myCollection.vue

@@ -12,6 +12,14 @@
           <RoadshowItem :list="item" @isCollectionHandeler="isCollectionHandeler" />
         </view>
       </view>
+      <blok v-if="tabsActive == 3">
+        <viwe class="chart-ul">
+          <view style="width: 49%" v-for="item in collectList" :key="item.Id">
+            <ChartItem class="chart-item" :isMyChartCollection="true" :list="item" @myChartIsTop="myChartIsTop" @myChartCollect="myChartCollect" />
+          </view>
+        </viwe>
+      </blok>
+
       <block v-else>
         <view class="content-item" v-for="item in collectList" :key="item.ArticleId">
           <view class="item-user" v-if="item.Source == 2">
@@ -51,9 +59,10 @@
 </template>
 
 <script>
-import { Mine, Report, Home, User } from "@/config/api.js";
+import { Mine, Report, Home, User, Chart } from "@/config/api.js";
 import RoadshowItem from "@/components/ItemComponent/roadshowItem.vue";
 import freeCharge from "@/components/freeCharge";
+import ChartItem from "@/components/ItemComponent/chartItem.vue";
 export default {
   data() {
     return {
@@ -73,8 +82,9 @@ export default {
       tabsList: [
         { name: "报告", id: 1 },
         { name: "微路演", id: 2 },
+        { name: "图表", id: 3 },
       ],
-      tabsActive: 1,
+      tabsActive: 3,
     };
   },
   onLoad() {
@@ -84,6 +94,7 @@ export default {
   components: {
     freeCharge,
     RoadshowItem,
+    ChartItem,
   },
   methods: {
     /* 获取列表 */
@@ -94,6 +105,11 @@ export default {
               PageSize: this.pageSize,
               CurrentIndex: this.page_no,
             })
+          : this.tabsActive == 3
+          ? await Chart.getChartcollection({
+              PageSize: this.pageSize,
+              CurrentIndex: this.pageNum,
+            })
           : this.getrroadshowList();
       if (res.Ret === 200) {
         this.status = this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
@@ -189,6 +205,37 @@ export default {
         });
       }
     },
+    //我的收藏的删除
+    myChartCollect(id) {
+      uni.showModal({
+        content: "确认要将该图表移除我的收藏吗?",
+        confirmColor: "#3385FF",
+        cancelColor: "#606266",
+        success: async (res) => {
+          if (res.confirm) {
+            const res = await Chart.myChartCollect({
+              ChartId: id,
+            });
+            if (res.Ret === 200) {
+              this.page_no = 1;
+              this.getCollectList();
+              this.$util.toast("已取消收藏");
+            }
+          }
+        },
+      });
+    },
+    //我的收藏 置顶
+    async myChartIsTop(id) {
+      const res = await Chart.myChartTop({
+        ChartId: id,
+      });
+      if (res.Ret === 200) {
+        this.page_no = 1;
+        this.getCollectList();
+        this.$util.toast(res.Msg);
+      }
+    },
   },
   computed: {
     curVoiceId() {
@@ -244,7 +291,7 @@ export default {
 };
 </script>
 
-<style lang="scss" scoped>
+<style lang="scss">
 .myCollection-container {
   background-color: #f7f7f7;
   .collect-ul {
@@ -342,5 +389,11 @@ export default {
       width: 49%;
     }
   }
+  .chart-ul {
+    display: flex;
+    flex-wrap: wrap;
+    padding: 15rpx;
+    justify-content: space-between;
+  }
 }
 </style>

+ 271 - 224
reportPages/keyCompany/keyCompany.vue

@@ -1,283 +1,330 @@
 <template>
-  <view class="container content-conmpany">
-    <view class="top-tabs">
-      <view :class="['item', item.value == tabsActive && 'tabs-active']" v-for="item in tabList" :key="item.value" @click="topTabsChange(item)">
-        {{ item.name }}
-        <view v-if="item.value == tabsActive" class="item-active"></view>
+  <view id="keyconmpany" class="container content-conmpany">
+    <view class="title">{{ reportDetail.Title }}</view>
+    <view class="author-time">
+      <text>{{ reportDetail.Department }}</text>
+      <text>{{ reportDetail.PublishDate }}</text>
+    </view>
+    <view class="content-statement">
+      <text>注:请务必阅读</text>
+      <text class="statement" @click="isShowStatement = true">免责声明 </text>
+    </view>
+    <view class="content-abstract">
+      <text>产品说明:</text>
+      <text>{{ reportDetail.ProductDescription }} </text>
+    </view>
+    <view class="description">
+      <mp-html :content="reportDetail.MarketStrategy" />
+      <view class="detailed">
+        <text>详细策略报告请</text>
+        <text @click="reportDetailLink">点击查看</text>
       </view>
     </view>
-    <view :class="['collect-ul', tabsActive == 1 && 'chart-content']" v-if="haveData">
-      <block v-if="tabsActive == 2">
-        <view class="collect-ltem" v-for="(item, index) in collectList" :key="index" @click="goDetail(item)">
-          <text class="title text_twoLine"
-            >{{ item.Title }}
-            <text class="reg-text" v-if="item.IsRed"></text>
-          </text>
-          <view class="content">
-            <view class="item-left">
-              <view class="abstract">{{ item.Abstract }}</view>
-              <view class="desc">
-                <text class="publishDate">{{ item.PublishDate }}</text>
-              </view>
-            </view>
-            <u-icon name="arrow-right" color="#BDBDBD" size="34"></u-icon>
+    <view class="industry-ul">
+      <view class="industry-li" v-for="(item, index) in dataListSubject" :key="index">
+        <view class="industry-name">{{ item.PermissionName }}</view>
+        <view :class="['industry-subject',item.ListSubject.length<3 &&'industry-top-border']">
+          <view :class="['subject-item','text_oneLine',item.ListSubject.length<3 &&'subject-item-top-border']" class="" @click="positionSubject(key)" v-for="key in item.ListSubject" :key="key.IndustrialSubjectId">
+            {{ key.SubjectName }}
+            <image v-if="key.IsNew" class="icon_subject" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/new_subject.png"></image>
           </view>
         </view>
-      </block>
-      <block v-else>
-        <view class="chart-ltem" v-for="(item, index) in collectList" :key="index" @click="goDetail(item)">
-          <view class="ltem-title text_twoLine">{{ item.Title }}</view>
-          <view class="item-content-img">
-            <image :src="item.BodyHtml" mode=""></image>
-          </view>
-          <view class="chart-tag">
-            <text class="tag-item" v-if="item.PtagName">{{ item.PtagName }}</text>
-            <text class="tag-item" v-if="item.CtagName">{{ item.CtagName }}</text>
+      </view>
+    </view>
+    <view class="content-ul">
+      <view class="content-li" v-for="item in dataList" :key="item.PermissionName">
+        <view class="content-title">
+          <image :src="item.IcoLink"></image>
+          {{ item.PermissionName }}
+        </view>
+        <mp-html :content="item.BodyChartSummary" />
+        <view class="li-list">
+          <view class="li-item" v-for="key in item.List" :key="key.IndustrialSubjectId">
+            <view :id="'subject' + key.IndustrialSubjectId" class="li-subject">
+              {{ key.SubjectName }}
+              <image v-if="key.IsNew" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/new_report.png"></image>
+              <text class="itel-label" v-for="val in key.CompanyLabel" :key="val"># {{ val }}</text>
+            </view>
+            <mp-html :content="key.Body" />
+            <view class="subject-detali" v-if="key.OverviewArticleId > 0">
+              <text style="display: inline-block">公司综述报告请</text>
+              <text style="color: #3385ff; margin-left: 10rpx; display: inline-block" @click="IndustryReport(key.OverviewArticleId)">点击查看</text>
+            </view>
+            <view class="subject-detali" v-if="key.List">
+              <text style="display: inline-block">相关调研纪要、深度报告请</text>
+              <text style="color: #3385ff; margin-left: 10rpx; display: inline-block" @click="industry(key.List)">点击查看</text>
+            </view>
           </view>
         </view>
-      </block>
-      <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="totalPage > 1" />
+      </view>
     </view>
-    <view class="nodata" v-else>
-      <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/act_search.png" mode="" class="nodata_ico"></image>
-      <text>暂时没有报告的内容</text>
+    <view class="back-top" v-if="isShowBackTop" @click="goBackTop">
+      <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/back_top.png"></image>
+    </view>
+    <statement :show="isShowStatement" />
+    <view class="select-box">
+      <u-popup v-model="areacodeShow" mode="bottom" @close="cancel">
+        <view class="box" style="color: #2c83ff" v-for="item in list" :key="item.IndustrialManagementId" @click="industryDetitle(item)"> {{ item.IndustryName }}</view>
+        <view class="box box-bottom" style="color: #a9afb8" @click="cancel">取消</view>
+      </u-popup>
     </view>
   </view>
 </template>
 
 <script>
 import { Reports } from "@/config/api.js";
+import statement from "@/reportPages/components/statement.vue";
+
 export default {
   data() {
     return {
-      tabList: [
-        { name: "季度关注", value: 1 },
-        { name: "年度关注", value: 2 },
-      ],
-      tabsActive: 1,
-      page_no: 1,
-      pageSize: 10,
-      collectList: [],
-      haveData: true,
-      totalPage: "",
-      status: "loadmore",
-      loadText: {
-        loadmore: "上拉加载更多",
-        loading: "加载中",
-        nomore: "已经到底了",
-      },
+      list: [],
+      dataList: [],
+      dataListSubject: [],
+      reportDetail: {},
+      isShowBackTop: false,
+      isShowStatement: false,
+      areacodeShow: false,
     };
   },
+  components: { statement },
   methods: {
-    // 头部选择框事件
-    topTabsChange(item) {
-      this.tabsActive = item.value;
-      this.collectList = [];
-      this.getList();
+    // 返回top
+    goBackTop() {
+      wx.pageScrollTo({
+        scrollTop: 0,
+        duration: 300,
+      });
     },
-    //获取数据
-    async getList() {
-      const res =
-        this.tabsActive == 2
-          ? await Reports.reportListByType({
-              PageSize: this.pageSize,
-              CurrentIndex: this.page_no,
-              ReportType: 1,
-            })
-          : await Reports.getChartQuarter({
-              PageSize: this.pageSize,
-              CurrentIndex: this.page_no,
-            });
-      if (res.Ret == 200) {
-        this.status = res.Data.Paging.IsEnd ? "nomore" : "loadmore";
-        this.totalPage = res.Data.Paging.Pages; //总页数
-        if (this.page_no === 1) {
-          this.collectList = res.Data.List || [];
-          this.haveData = this.collectList.length ? true : false;
-        } else {
-          this.collectList = this.collectList.concat(res.Data.List);
-        }
+    async reportSelectionDetail() {
+      const res = await Reports.reportSelectionDetail({
+        IsBestNew: true,
+      });
+      if (res.Ret === 200) {
+        this.reportDetail = res.Data.Detail;
+        this.dataList = res.Data.List;
+        this.dataListSubject = res.Data.ListPermissionSubject;
       }
     },
-    //跳转详情
-    goDetail(item) {
-      /* 无需授权且已绑定 检验是或否有权限 */
-      if (this.tabsActive == 2) {
-        item.IsRed = false;
-        this.$store.dispatch("checkHandle", "/reportPages/reportSecretDetail/reportSecretDetail?type=1&id=" + item.ArticleId);
-      } else {
-        this.$store.dispatch("checkHandle", "/pageMy/chartPage/chartPage?id=" + item.ChartId);
+    // 详细策略报告请
+    reportDetailLink() {
+      this.$store.dispatch("checkHandle", "/pageMy/reportDetail/reportDetail?id=" + this.reportDetail.CeLueArticleId);
+    },
+    // 锚点
+    positionSubject(item) {
+      let className = `#subject${item.IndustrialSubjectId}`;
+      uni
+        .createSelectorQuery()
+        .select(className)
+        .boundingClientRect((con) => {
+          uni
+            .createSelectorQuery()
+            .select("#keyconmpany")
+            .boundingClientRect((res) => {
+              // 获取根元素要滑动的元素
+              uni.pageScrollTo({
+                selector: "#keyconmpany", // 滑动的元素
+                duration: 300,
+                scrollTop: con.top - res.top, //到达距离顶部的top值
+              });
+            })
+            .exec();
+        })
+        .exec();
+    },
+    // 公司综述报告请
+    IndustryReport(id) {
+      this.$store.dispatch("checkHandle", "/reportPages/IndustryReport/IndustryReport?id=" + id);
+    },
+    // 判断一个还是多个
+    industry(item) {
+      if (item.length > 1) {
+        this.list = item;
+        this.areacodeShow = true;
+      } else if (item.length > 0 || item.length == 1) {
+        uni.navigateTo({
+          url: "/reportPages/IndustryReport/IndustryReport?id=" + item[0].IndustrialManagementId,
+        });
       }
     },
+
+    // 选择后的事件
+    industryDetitle(item) {
+      uni.navigateTo({
+        url: "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId,
+      });
+
+      this.areacodeShow = false;
+    },
+
+    // 选择的取消
+    cancel() {
+      this.areacodeShow = false;
+    },
   },
   onLoad() {
-    this.getList();
+    this.reportSelectionDetail();
   },
   onShow() {
     this.$store.commit("setRouterReport", "重点公司");
   },
-  onReachBottom() {
-    if (this.status === "nomore") return;
-    this.status = "loading";
-    this.page_no++;
-    this.getList();
+  onPageScroll(e) {
+    this.isShowBackTop = e.scrollTop > 180 ? true : false;
   },
 };
 </script>
 
 <style lang="scss" scoped>
 .content-conmpany {
-  background: #f7f7f7;
-  padding-bottom: 30rpx;
-  .top-tabs {
-    position: sticky;
-    top: 0;
-    left: 0;
-    height: 78rpx;
-    width: 100%;
+  padding: 30rpx 34rpx;
+  color: #333;
+  font-size: 28rpx;
+  .title {
+    font-weight: 500;
+    font-size: 34rpx;
+    line-height: 48rpx;
+  }
+  .author-time {
     display: flex;
-    padding: 10rpx 35rpx 20rpx;
-    background: #fff;
-    .item {
-      position: relative;
-      margin-right: 80rpx;
-      height: 55rpx;
-      font-size: 30rpx;
-      color: #999999;
-      .item-active {
-        position: absolute;
-        left: 50%;
-        bottom: 0;
-        height: 4rpx;
-        width: 80%;
-        transform: translateX(-50%);
-        border-radius: 1rpx;
-        background: linear-gradient(90deg, #2e85ff 0%, #7eeaf6 100%);
-      }
-    }
-    .tabs-active {
+    justify-content: space-between;
+    line-height: 39rpx;
+    margin: 25rpx 0 35rpx;
+  }
+  .content-statement {
+    display: flex;
+    color: #707070;
+    .statement {
+      margin-left: 10rpx;
       color: #3385ff;
+    }
+  }
+  .content-abstract {
+    margin: 30rpx 0 20rpx;
+    :first-child {
+      float: left;
       font-weight: 500;
     }
   }
-  .collect-ul {
-    padding-top: 4rpx;
-    .collect-ltem {
-      padding: 30rpx 20rpx 30rpx 34rpx;
-      background: #fff;
-      margin-bottom: 4rpx;
-      width: 682rpx;
-      margin: 20rpx auto 0;
-      .title {
-        position: relative;
-        color: #4a4a4a;
-        font-size: 34rpx;
-        padding-left: 28rpx;
-
-        .reg-text {
-          position: absolute;
-          top: 15rpx;
-          left: 0rpx;
-          width: 14rpx;
-          height: 14rpx;
-          background-color: #ff0000;
-          border-radius: 50%;
-          z-index: 9;
-        }
+  .description {
+    color: #666666;
+    .detailed {
+      display: flex;
+      justify-content: flex-end;
+      color: #3385ff;
+      margin: 20rpx 0;
+      :first-child {
+        float: left;
+        margin-right: 10rpx;
+        color: #333333;
+        font-weight: 500;
       }
-
-      .content {
+    }
+  }
+  .industry-ul {
+    margin-bottom: 20rpx;
+    .industry-li {
+      display: flex;
+      margin-bottom: 10rpx;
+      .industry-name {
+        width: 42rpx;
         display: flex;
-        align-items: center;
-        justify-content: space-between;
+        justify-content: center;
+        background: #3385ff;
+        color: #fff;
+        writing-mode: tb-rl;
       }
-
-      .desc {
+      .industry-subject {
+        border-top: 1px solid #ececec;
+        flex: 1;
         display: flex;
-        align-items: center;
-        margin-top: 17rpx;
-        padding-left: 28rpx;
-        color: #999;
+        flex-wrap: wrap;
+        .subject-item {
+          position: relative;
+          width: 213rpx;
+          height: 63rpx;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          // text-decoration-line: underline;
+          line-height: 39rpx;
+          border-bottom: 1px solid #ececec;
+          border-right: 1px solid #ececec;
+          .icon_subject {
+            position: absolute;
+            top: 0;
+            left: 0;
+            width: 48rpx;
+            height: 48rpx;
+          }
+        }
       }
-
-      .publishDate {
-        margin-right: 30rpx;
-        white-space: nowrap;
+      .industry-top-border {
+          border-top: none !important;
       }
-
-      .text-name {
-        color: #2c83ff;
-        font-size: 26rpx;
+      .subject-item-top-border {
+         border-top: 1px solid #ececec;
       }
     }
-    .title {
-      color: #333333;
-      font-size: 30rpx;
-      font-weight: 400;
+  }
+  .back-top {
+    position: fixed;
+    z-index: 99;
+    bottom: 200rpx;
+    right: 50rpx;
+    width: 100rpx;
+    height: 100rpx;
+    image {
       width: 100%;
-      padding-bottom: 15rpx;
-      border-bottom: 1px dashed #ccc;
+      height: 100%;
     }
-    .abstract {
-      margin: 20rpx 0 0 30rpx;
-      color: #666666;
-      font-size: 28rpx;
-      font-weight: 400;
-      padding-right: 10rpx;
-    }
-  }
-  .chart-content {
-    display: flex;
-    flex-wrap: wrap;
-    justify-content: space-between;
-    padding: 20rpx;
   }
-  .chart-ltem {
-    width: 350rpx;
-    background: #ffffff;
-    box-shadow: 0rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.16);
-    border-radius: 8rpx;
-    margin-bottom: 20rpx;
-    padding: 20rpx;
-    .ltem-title {
-      font-size: 32rpx;
-      font-weight: 500;
-      color: #333333;
-      line-height: 38rpx;
-      border-bottom: 1rpx solid #dcdfe6;
-      padding-bottom: 10rpx;
-    }
-    .item-content-img {
-      display: flex;
-      align-items: center;
-      width: 330rpx;
-      height: 286rpx;
-      margin-left: -6rpx;
-      margin-bottom: -20rpx;
-      image {
-        width: 100%;
-        height: 286rpx;
-        vertical-align: middle;
-      }
-    }
-    .chart-tag {
-      display: flex;
-      justify-content: space-between;
-      padding-top: 20rpx;
-      border-top: 1rpx solid #dcdfe6;
-      font-size: 24rpx;
-      font-weight: 400;
-      color: #3385ff;
-      .tag-item {
+  .content-ul {
+    .content-li {
+      margin-top: 30rpx;
+      padding-bottom: 20rpx;
+      border-bottom: 2rpx dashed #e2e2e2;
+      .content-title {
         display: flex;
-        align-items: center;
         justify-content: center;
-        width: 150rpx;
-        height: 38rpx;
-        background: #ffffff;
-        border-radius: 28rpx;
-        border: 2rpx solid #3189ff;
+        align-items: center;
+        width: 195rpx;
+        padding: 3rpx 0;
+        border-radius: 0rpx 50rpx 50rpx 0rpx;
+        background-color: #3385ff;
+        color: #fff;
+        margin-bottom: 20rpx;
+        image {
+          width: 32rpx;
+          height: 34rpx;
+          margin-right: 15rpx;
+        }
       }
+      .li-list {
+        margin-top: 20rpx;
+        .li-subject {
+          display: flex;
+          padding: 20rpx;
+          margin-bottom: 20rpx;
+          background: #f2f2f2;
+          .itel-label {
+            margin-left: 27rpx;
+            color: #3385ff;
+          }
+          image {
+            width: 60rpx;
+            height: 30rpx;
+            margin-top: 6rpx;
+            margin-left: 10rpx;
+          }
+        }
+        .li-item {
+          margin-top: 20rpx;
+        }
+      }
+    }
+    .subject-detali {
+      text-align: right;
+      margin-top: 20rpx;
     }
   }
 }