123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396 |
- <template>
- <view id="keyconmpany" class="container content-conmpany" v-if="haveData">
- <block v-if="Object.keys(reportDetail).length > 0">
- <view class="report-content-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="macro-strategy">
- <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/macro-strategy.png"></image>
- 宏观策略
- </view>
- <view class="description">
- <mp-html :content="strFontSize(reportDetail.MarketStrategy)" />
- <view class="detailed">
- <text>详细策略报告请</text>
- <text @click="reportDetailLink">点击查看</text>
- </view>
- </view>
- <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']"
- @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>
- </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="strFontSize(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">
- <view class="item-name">
- <text style="display: inline-block; vertical-align: middle; font-weight: 600">{{ key.SubjectName }}</text>
- <image v-if="key.IsNew" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/new_report.png"></image>
- </view>
- <text class="itel-label" v-for="val in key.CompanyLabel" :key="val"># {{ val }}</text>
- </view>
- <mp-html :content="strFontSize(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="goArticle(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>
- </view>
- </view>
- <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>
- </block>
- </view>
- <view class="nodata" v-else>
- <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/report_loading_icon.png" class="nodata_img"></image>
- <view class="nodata-tip">正在努力编辑中,请耐心等待...</view>
- </view>
- </template>
- <script>
- import { Reports } from "@/config/api.js";
- import statement from "@/reportPages/components/statement.vue";
- export default {
- data() {
- return {
- list: [],
- dataList: [],
- dataListSubject: [],
- reportDetail: {},
- isShowBackTop: false,
- isShowStatement: false,
- areacodeShow: false,
- haveData: true,
- };
- },
- components: { statement },
- methods: {
- // 返回top
- goBackTop() {
- wx.pageScrollTo({
- selector: ".industry-ul",
- duration: 300,
- });
- },
- async reportSelectionDetail() {
- const res = await Reports.reportSelectionDetail({
- IsBestNew: true,
- });
- if (res.Ret === 200) {
- this.reportDetail = res.Data.Detail;
- this.haveData = this.reportDetail ? true : false;
- this.dataList = res.Data.List;
- this.dataListSubject = res.Data.ListPermissionSubject;
- } else {
- this.haveData = false;
- }
- },
- // 详细策略报告请
- reportDetailLink() {
- if (this.reportDetail.CeLueArticleId > 0) {
- this.$store.dispatch("checkHandle", "/pageMy/reportDetail/reportDetail?id=" + this.reportDetail.CeLueArticleId);
- } else {
- uni.showToast({
- title: "文章ID有误",
- icon: "error",
- duration: 2000,
- });
- }
- },
- // 锚点
- async 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();
- const res = await Reports.reportClickHistory({
- ArticleId: this.reportDetail.ArticleId,
- IndustrialSubjectId: item.IndustrialSubjectId,
- });
- },
- // 公司综述报告请
- goArticle(id) {
- this.$store.dispatch("checkHandle", "/pageMy/reportDetail/reportDetail?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.reportSelectionDetail();
- },
- onShow() {
- this.$store.commit("setRouterReport", "重点公司");
- },
- onPageScroll(e) {
- this.isShowBackTop = e.scrollTop > 180 ? true : false;
- },
- onShareAppMessage() {
- return {
- title: "重点公司",
- path: "/reportPages/keyCompany/keyCompany",
- };
- },
- };
- </script>
- <style lang="scss" scoped>
- .content-conmpany {
- padding: 30rpx 34rpx;
- color: #333;
- font-size: 28rpx;
- .author-time {
- display: flex;
- 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-top: 30rpx;
- :first-child {
- float: left;
- font-weight: 500;
- }
- }
- .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;
- }
- }
- }
- .industry-ul {
- margin-bottom: 20rpx;
- .industry-li {
- display: flex;
- margin-bottom: 10rpx;
- .industry-name {
- width: 42rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- background: #3385ff;
- color: #fff;
- writing-mode: tb-rl;
- }
- .industry-subject {
- border-top: 1px solid #ececec;
- flex: 1;
- display: flex;
- flex-wrap: wrap;
- .subject-item {
- position: relative;
- width: 213rpx;
- height: 63rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- line-height: 39rpx;
- border-bottom: 1px solid #ececec;
- border-right: 1px solid #ececec;
- text-decoration: underline;
- .icon_subject {
- position: absolute;
- top: 0;
- left: 0;
- width: 48rpx;
- height: 48rpx;
- }
- }
- }
- .industry-top-border {
- border-top: none !important;
- }
- .subject-item-top-border {
- border-top: 1px solid #ececec;
- }
- }
- }
- .back-top {
- position: fixed;
- z-index: 99;
- bottom: 200rpx;
- right: 50rpx;
- width: 100rpx;
- height: 100rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .content-ul {
- .content-li {
- margin-top: 30rpx;
- padding-bottom: 20rpx;
- border-bottom: 2rpx dashed #e2e2e2;
- font-size: 28rpx;
- .content-title {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 195rpx;
- padding: 3rpx 0;
- border-radius: 0rpx 50rpx 50rpx 0rpx;
- background-color: #3385ff;
- color: #fff;
- margin-bottom: 20rpx;
- font-size: 32rpx;
- image {
- width: 32rpx;
- height: 34rpx;
- margin-right: 15rpx;
- }
- }
- .li-list {
- margin-top: 20rpx;
- .li-subject {
- padding: 20rpx;
- margin-bottom: 20rpx;
- background: #f2f2f2;
- .item-name {
- display: inline-block;
- font-size: 30rpx;
- margin-right: 27rpx;
- line-height: 60rpx;
- }
- .itel-label {
- display: inline-block;
- margin-right: 27rpx;
- color: #3385ff;
- line-height: 60rpx;
- vertical-align: middle;
- }
- image {
- width: 60rpx;
- height: 30rpx;
- vertical-align: middle;
- margin-left: 10rpx;
- }
- }
- .li-item {
- margin-top: 20rpx;
- }
- }
- }
- .subject-detali {
- text-align: right;
- margin-top: 20rpx;
- }
- }
- .macro-strategy {
- display: flex;
- align-items: center;
- width: 230rpx;
- height: 50rpx;
- padding-left: 35rpx;
- background-color: #3385ff;
- color: #fff;
- border-radius: 0rpx 50rpx 50rpx 0rpx;
- margin: 30rpx 0;
- image {
- width: 36rpx;
- height: 36rpx;
- margin-right: 10rpx;
- }
- }
- .nodata-tip {
- color: #999;
- font-size: 30rpx;
- }
- }
- </style>
|