reportForm.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979
  1. <template>
  2. <view class="reportForm-container container">
  3. <view id="nav-bar-wrap-id" class="nav-bar-wrap">
  4. <search-bar @goSearch="goSearch" :searchTitle="searchPlaceholderList.SummarySearch" :width="50">
  5. <template slot="content-left">
  6. <view class="content">
  7. <view class="hot-top" @click="goHot" v-if="wholeShowListData.IsShowList">
  8. <image class="hot-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/hot_icon_report.png"></image>
  9. <text class="sea_ipt">榜单</text>
  10. </view>
  11. </view>
  12. </template>
  13. </search-bar>
  14. <view class="global_one_tabs tabs-box">
  15. <view :class="['item', item.ChartPermissionId == tabAct_id && 'tabs-active']" v-for="(item, index) in tabBars" :key="item.ChartPermissionId" @click="toggleTab(item, index)">
  16. {{ item.PermissionName }}
  17. <!-- <view class="active" v-if="item.ChartPermissionId == tabAct_id"></view> -->
  18. </view>
  19. </view>
  20. </view>
  21. <!-- 内容 -->
  22. <view class="strategy" v-if="strategyIndex >= 4">
  23. <view class="banne-content" v-if="strategyIndex == 4">
  24. <swiper autoplay :interval="4000" circular>
  25. <view v-for="(bannerItem, index) in bannerDataList" :key="index" @click.native="bannerSwiperHandler(bannerItem)">
  26. <swiper-item>
  27. <image :src="bannerItem.IndexImg"></image>
  28. </swiper-item>
  29. </view>
  30. </swiper>
  31. </view>
  32. <view class="tab-cont-two">
  33. <view v-for="(item, index) in tabBarsTow" :key="index" class="scroll-tab-box">
  34. <view v-for="key in item.Items" :key="key.CategoryId" :id="'__' + index" class="scroll-tab-item" :class="{ active: tabAct_idTwo == key.CategoryId }" @click.stop="toggleTabTwo(key, index)">
  35. {{ key.MatchTypeName }}
  36. <text class="reg-text" v-if="key.IsRed"></text>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="row"> </view>
  41. <block v-if="tabAct_idTwo != 99999">
  42. <!-- 子组件 -->
  43. <strategy
  44. :strategyIndexTwo="strategyIndexTwo"
  45. :pageNumFather="pageNumFather"
  46. :matchTypeName="matchTypeName"
  47. :tabAct_idTwo="tabAct_idTwo"
  48. :isNum="isNum"
  49. :tabAct_id="tabAct_id"
  50. :isSwitchover="isSwitchover"
  51. @hideIsred="hideIsred"
  52. />
  53. </block>
  54. <!-- 时间线 -->
  55. <block v-if="tabAct_idTwo == 99999">
  56. <time-line ref="timeChild" :dataList="timeLine" @setRouter="setRouter" />
  57. <u-loadmore :status="status" icon-type="flower" :load-text="loadText" v-if="totalPage > 1" />
  58. </block>
  59. </view>
  60. <!-- </view> -->
  61. <view class="industrial_eport_one" v-else>
  62. <!-- 行业报告 -->
  63. <view class="industry" v-if="tradeList">
  64. <view class="industry-top">
  65. <view class="img-top-box">
  66. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/industry-ico.png"></image>
  67. <text>行业综述</text>
  68. </view>
  69. <view> </view>
  70. </view>
  71. <view class="global_card_content report_formcard_content">
  72. <view class="industry-box" @click="isClickHandle(item.CategoryId)" v-for="item in tradeList" :key="item.CategoryId">
  73. <view class="box-left">
  74. {{ item.MatchTypeName }}
  75. <text v-if="item.IsRed"></text>
  76. </view>
  77. <view class="box-right">
  78. <text>{{ item.UpdateTime }}</text>
  79. <u-icon name="arrow-right" color="#333333" size="34"></u-icon>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. <view class="industry-top">
  85. <view class="img-top-box">
  86. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/company_ico.png"></image>
  87. <text>公司速览</text>
  88. </view>
  89. <view> </view>
  90. </view>
  91. <view v-if="labelListData.length" :class="[labelListData.length > 9 ? 'label-content-column' : 'label-content']">
  92. <view @click="strategyLabelHadel(item)" :class="['item', item.Stock.length > 6 && 'item-size', 'text_oneLine']" v-for="item in labelListData" :key="item.ArticleId">
  93. {{ item.Stock }}
  94. </view>
  95. </view>
  96. <!-- 产业报告 -->
  97. <view class="industry">
  98. <view style="height: 12rpx" v-if="!tradeList"></view>
  99. <view class="industry-top industry-sticky">
  100. <view class="img-top-box">
  101. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/property_ico.png" style="height: 50rpx"></image>
  102. <text class="text-sub">细分产业</text>
  103. </view>
  104. <view class="checkbox-content">
  105. <view :class="['item', item.isAct && 'act-item']" v-for="item in deepCoverList" :key="item.value" @click="checkboxChange(item)">{{ item.lable }}</view>
  106. </view>
  107. </view>
  108. <!-- 需要循环的地方 -->
  109. <view class="forindustry global_card_content" v-for="item in industryList" :key="item.IndustrialManagementId" @click="goIndustryReport(item.IndustrialManagementId)">
  110. <image class="image-box" v-if="item.IsNew" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/new_report.png"></image>
  111. <image class="image-box" v-if="item.IsHot" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/hot_report.png"></image>
  112. <!-- 火锅底料这个位置 -->
  113. <view class="industry-content">
  114. <view class="industry-box-left">
  115. <view class="item-wrap">
  116. <zb-popover placement="bottom-start" :options="actions" theme="dark" ref="Popover1" @handleClick="() => popoverHandleClick(item)" @select="selectOption($event, item)">
  117. <image class="follw-image" :src="getDisplayText(item)"></image>
  118. </zb-popover>
  119. </view>
  120. <view class="global_title">{{ item.IndustryName }} </view>
  121. </view>
  122. <view class="ndustry-box-tiem global_content_center">
  123. <text v-if="item.IsRed" class="read"></text>
  124. <text class="ndustry-box-text">{{ item.UpdateTime }}</text>
  125. <u-icon name="arrow-right" color="#333" size="28"></u-icon>
  126. </view>
  127. </view>
  128. <view class="read-more">
  129. <view class="industry-video-item" @click.stop="handelVideoPlay(item)" :style="{ 'background-image': 'url(' + item.IndustryVideo.BackgroundImg + ')' }" v-if="item.IndustryVideo">
  130. 5min
  131. <br />
  132. 逻辑解析
  133. <view class="industry-video-icon">
  134. <image src="https://hzstatic.hzinsights.com/cygx/video-right-top-icon.svg"></image>
  135. </view>
  136. </view>
  137. <block v-if="item.IndustrialSubjectList">
  138. <view v-if="item.IndustryVideo" style="display: flex; flex-wrap: wrap; width: 502rpx">
  139. <view v-for="val in item.IndustrialSubjectList.slice(0, 6)" :key="val.IndustrialSubjectId" class="text-box text_oneLine">{{ val.SubjectName }}</view>
  140. </view>
  141. <block v-if="item.IndustryVideo && item.IndustrialSubjectList.length > 6">
  142. <view v-for="val in item.IndustrialSubjectList.slice(6)" :key="val.IndustrialSubjectId" class="text-box">{{ val.SubjectName }}</view>
  143. </block>
  144. <block v-if="!item.IndustryVideo">
  145. <view v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId" class="text-box text_oneLine">{{ val.SubjectName }}</view>
  146. </block>
  147. </block>
  148. </view>
  149. </view>
  150. <!-- <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="totalPage > 1 && !isShowOpen" /> -->
  151. <view class="bottom-btn-content">
  152. <view class="opne-content">
  153. 已为您折叠不感兴趣的产业
  154. <view @click="isShowOpenHandler" class="content-text">
  155. {{ isShowOpen ? "展开" : "收起" }}
  156. </view>
  157. <image :src="isShowOpen ? 'https://hzstatic.hzinsights.com/yx_xcx/expand_icon.png' : 'https://hzstatic.hzinsights.com/yx_xcx/collapse_icon.png'"></image>
  158. </view>
  159. <view class="opne-content all-setup">
  160. 您也可以
  161. <view @click="allSetupHandler" class="content-text"> 批量设置 </view>
  162. 兴趣度
  163. </view>
  164. </view>
  165. </view>
  166. </view>
  167. <u-modal
  168. v-model="goFollowShow"
  169. :content-style="{ fontSize: '32rpx' }"
  170. @confirm="goFollowShowBtn"
  171. :show-cancel-button="isCancelBtn"
  172. :confirm-text="confirmText"
  173. @cancel="isCancelBtn = false"
  174. :show-title="false"
  175. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  176. :confirm-style="{ fontWeight: '700' }"
  177. >
  178. <view class="slot-content">
  179. <rich-text :nodes="accounts"></rich-text>
  180. </view>
  181. </u-modal>
  182. <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
  183. <!-- 视频模块 -->
  184. <videoModule :showVideoPop.sync="showVideoPop" :videoPopList="videoPopList" />
  185. <modalDialog :isShowhasPermission="isShowhasPermission" :applyForIsShow="applyForIsShow" :jurisdictionList="jurisdictionList" :hasPermission="hasPermission" />
  186. <Loading />
  187. </view>
  188. </template>
  189. <script>
  190. import strategy from "./components/strategy.vue";
  191. import { Throttle, Debounce } from "@/config/util.js";
  192. import freeCharge from "@/components/freeCharge";
  193. import videoModule from "@/components/videoModule/index";
  194. import modalDialog from "@/components/modalDialog.vue";
  195. import SearchBar from "@/components/search-bar/searchBar.vue";
  196. import TimeLine from "@/components/report/timeLine.vue";
  197. import { Reports, Home } from "@/config/api.js";
  198. let app = getApp();
  199. export default {
  200. components: {
  201. strategy,
  202. freeCharge,
  203. videoModule,
  204. modalDialog,
  205. SearchBar,
  206. TimeLine,
  207. },
  208. data() {
  209. return {
  210. tabAct_id: "",
  211. tabAct_idTwo: "",
  212. tabBars: [],
  213. pageNumFather: "",
  214. shadowStyle: {
  215. backgroundImage: "none",
  216. },
  217. tabBarsTow: [],
  218. isNum: 1,
  219. strategyIndex: "",
  220. strategyIndexTwo: 0,
  221. isSwitchover: 1,
  222. tradeList: [],
  223. OrderColumn: "",
  224. industryList: [],
  225. loadText: {
  226. loadmore: "上拉加载更多",
  227. loading: "加载中",
  228. nomore: "已经到底了",
  229. },
  230. refresh: false, //正在下拉
  231. page_no: 1,
  232. pageSize: 10,
  233. status: "loadmore",
  234. haveData: true,
  235. totalPage: "",
  236. matchTypeName: "",
  237. deepCoverFocus: [], //深度覆盖 //推荐关注
  238. deepCoverList: [
  239. {
  240. value: "cover",
  241. lable: "深度覆盖",
  242. isAct: false,
  243. },
  244. {
  245. value: "focus",
  246. lable: "推荐关注",
  247. isAct: false,
  248. },
  249. ],
  250. isScrollShow: false,
  251. goFollowShow: false,
  252. accounts: "",
  253. confirmText: "知道了",
  254. isCancelBtn: false,
  255. scrollLeft: 0,
  256. showTransition: false, //点击绝密后的隐现
  257. showVideoPop: false, //视频弹窗显示控制
  258. videoPopList: {}, // 视频信息
  259. isShowhasPermission: false, // 联系销售的提交申请
  260. applyForIsShow: false, // 提交申请
  261. jurisdictionList: {},
  262. hasPermission: "", //权限
  263. labelListData: [],
  264. timeLine: [], //时间线数据
  265. bannerDataList: [],
  266. bulletinData: {},
  267. actions: [
  268. { text: "接受推送", imgUrl: "https://hzstatic.hzinsights.com/new_cygx/AcceptBtn.png", key: 0 },
  269. { text: "重点关注", imgUrl: "https://hzstatic.hzinsights.com/new_cygx/FocusBtn.png", key: 1 },
  270. { text: "不感兴趣", imgUrl: "https://hzstatic.hzinsights.com/new_cygx/uninterestedBtn.png", key: 3 },
  271. ], // 动态设置的气泡选项内容
  272. isShowOpen: true, // 展开收起
  273. IsInterested: true, //
  274. page_no_open: 1,
  275. };
  276. },
  277. onLoad(option) {
  278. this.loadList(option);
  279. this.getBannerList();
  280. },
  281. watch: {
  282. //监听tabs的变化
  283. tabAct_id: {
  284. handler() {
  285. this.initList();
  286. },
  287. immediate: true,
  288. },
  289. tabAct_idTwo: {
  290. handler(newVal) {
  291. newVal == 99999 && this.getTimeLineList();
  292. },
  293. immediate: true,
  294. },
  295. },
  296. methods: {
  297. //获取一级事件
  298. getClassify() {
  299. Reports.getClassify().then((res) => {
  300. if (res.Ret !== 200) return;
  301. this.tabBars = res.Data.List || [];
  302. if (!this.tabAct_id) {
  303. this.tabAct_id = res.Data.List[0].ChartPermissionId;
  304. this.$store.dispatch("statistics", {
  305. PageType: "Report",
  306. ChartPermissionId: Number(this.tabAct_id),
  307. });
  308. }
  309. this.getHomeStockName();
  310. });
  311. },
  312. //获取二级事件
  313. async getstrategyAll() {
  314. const res =
  315. this.tabAct_id == 148 || this.tabAct_id == 62
  316. ? await Reports.getZhouQistrategyAll({
  317. ChartPermissionId: this.tabAct_id,
  318. })
  319. : await Reports.getstrategyAll({
  320. ChartPermissionId: this.tabAct_id,
  321. });
  322. if (res.Ret === 200) {
  323. this.tabAct_id == 23 &&
  324. res.Data.List.push({
  325. CategoryId: 100001,
  326. IsRed: false,
  327. ListGroup: 4,
  328. MatchTypeName: "数据思维",
  329. SubCategoryName: "",
  330. });
  331. if (!this.tabAct_idTwo) {
  332. this.tabAct_idTwo = res.Data.List[0].CategoryId;
  333. }
  334. this.matchTypeName = res.Data.List[0].MatchTypeName;
  335. // 使用 Map 来存储分组后的数据
  336. const result = new Map();
  337. // 将原始数据按 ListGroup 分组
  338. res.Data.List.forEach((item) => {
  339. // 如果当前 ListGroup 不存在,初始化一个新数组
  340. if (!result.has(item.ListGroup)) {
  341. result.set(item.ListGroup, []);
  342. }
  343. // 获取对应 ListGroup 的数组,并添加当前项
  344. const groupArray = result.get(item.ListGroup);
  345. groupArray.push(item);
  346. });
  347. // 如果需要将 Map 转换回普通对象或数组形式,请使用以下代码:
  348. const arrayResult = Array.from(result.entries()).map(([ListGroup, items]) => ({
  349. GroupId: ListGroup,
  350. Items: items, // 当前 GroupId 对应的所有项目
  351. }));
  352. this.tabBarsTow = arrayResult;
  353. }
  354. },
  355. //tabs切换事件
  356. toggleTab(item, index) {
  357. this.strategyIndex = index;
  358. this.tabAct_idTwo = "";
  359. this.deepCoverFocus = [];
  360. this.labelListData = [];
  361. this.tabBarsTow = [];
  362. if (this.tabAct_id !== item.ChartPermissionId) {
  363. this.tabAct_id = item.ChartPermissionId;
  364. this.$store.dispatch("statistics", {
  365. PageType: "Report",
  366. ChartPermissionId: Number(this.tabAct_id),
  367. });
  368. this.getHomeStockName();
  369. this.page_no = 1;
  370. uni.pageScrollTo({
  371. scrollTop: 0,
  372. duration: 0,
  373. });
  374. }
  375. },
  376. scrollMove(e) {
  377. this.scrollLeft = e.detail.scrollLeft;
  378. },
  379. //tabs切换二级事件
  380. toggleTabTwo(item, index) {
  381. if (item.CategoryId === 100001) {
  382. uni.navigateTo({
  383. url: "/reportPages/selectedBulletin/selectedBulletin",
  384. });
  385. return;
  386. }
  387. this.matchTypeName = item.MatchTypeName;
  388. this.strategyIndexTwo = index;
  389. if (this.tabAct_idTwo !== item.CategoryId) {
  390. this.tabAct_idTwo = item.CategoryId;
  391. this.page_no = 1;
  392. uni.pageScrollTo({
  393. scrollTop: 0,
  394. duration: 0,
  395. });
  396. }
  397. },
  398. //获取报告所有品种接口
  399. getTradeList() {
  400. Reports.getTradeList({
  401. ChartPermissionId: this.tabAct_id,
  402. }).then((res) => {
  403. if (res.Ret == 200) {
  404. this.tradeList = res.Data.List || [];
  405. }
  406. });
  407. },
  408. //获取产业报告所有品种接口
  409. getIndustryList() {
  410. Reports.getIndustryList({
  411. ChartPermissionId: this.tabAct_id,
  412. OrderColumn: this.OrderColumn,
  413. PageSize: this.pageSize,
  414. CurrentIndex: this.isShowOpen ? this.page_no : this.page_no_open,
  415. IsOpen: this.isShowOpen ? 0 : 1,
  416. DeepCover: this.deepCoverFocus.includes("cover") ? 1 : 0,
  417. RecommendFocus: this.deepCoverFocus.includes("focus") ? 1 : 0,
  418. }).then((res) => {
  419. // this.industryList=res.Data.List
  420. this.IsInterested = res.Data.IsInterested;
  421. this.isShowOpen = res.Data.IsShowOpen;
  422. this.status = res.Data.Paging.IsEnd ? "nomore" : "loadmore";
  423. this.totalPage = res.Data.Paging.Pages; //总页数
  424. if (this.page_no === 1) {
  425. this.industryList = res.Data.List || [];
  426. this.haveData = this.industryList.length ? true : false;
  427. if (this.refresh) {
  428. uni.stopPullDownRefresh();
  429. this.refresh = false;
  430. }
  431. } else {
  432. this.industryList = this.industryList.concat(res.Data.List);
  433. }
  434. });
  435. },
  436. //跳转季度策略
  437. isClickHandle(id) {
  438. uni.navigateTo({
  439. url: "/reportPages/industrialReport/industrialReport?id=" + id,
  440. });
  441. },
  442. //跳转产业报告
  443. async goIndustryReport(id) {
  444. this.$store.commit("setRouterReport", "产业列表");
  445. uni.navigateTo({ url: "/reportPages/IndustryReport/IndustryReport?id=" + id });
  446. },
  447. //点击关注的图标
  448. async reportFllow(id) {
  449. await this.$store.dispatch("showLoginModal");
  450. const res = await Reports.reportFllow({
  451. IndustrialManagementId: id,
  452. PageRouter: "细分产业列表",
  453. });
  454. if (res.Ret === 200) {
  455. if (res.Data.Status == 1) {
  456. this.goFollowShow = true;
  457. this.confirmText = res.Data.GoFollow ? "去关注" : "知道了";
  458. if (res.Data.GoFollow) {
  459. this.accounts = `产业关注成功 <br> 想要及时获取该产业内容的更新推送,请关注【查研观向小助手】公众号`;
  460. this.isCancelBtn = true;
  461. } else {
  462. this.accounts = "产业关注成功<br>请关注【查研观向小助手】公众号,及时获取产业报告更新提醒";
  463. }
  464. }
  465. this.industryList.forEach((key) => {
  466. if (key.IndustrialManagementId == id) {
  467. if (key.IsFollow == 1) {
  468. key.IsFollow = 0;
  469. uni.showToast({
  470. title: "已取消关注",
  471. icon: "none",
  472. duration: 2000,
  473. });
  474. } else {
  475. key.IsFollow = 1;
  476. }
  477. }
  478. });
  479. }
  480. },
  481. goFollowShowBtn() {
  482. if (this.confirmText == "去关注") {
  483. uni.navigateTo({
  484. url: "/activityPages/accountsOfficial/accountsOfficial",
  485. });
  486. }
  487. this.goFollowShow = false;
  488. },
  489. hideIsred(is) {
  490. this.tabBarsTow[this.strategyIndexTwo].IsRed = is;
  491. },
  492. // h获取时间线
  493. async getTimeLineList() {
  494. const res =
  495. this.tabAct_id == 23
  496. ? await Reports.getTacticsTimeLine({
  497. PageSize: this.pageSize,
  498. CurrentIndex: this.page_no,
  499. })
  500. : await Reports.getGushowTimeLine({
  501. PageSize: this.pageSize,
  502. CurrentIndex: this.page_no,
  503. });
  504. if (res.Ret === 200) {
  505. this.status = this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
  506. this.totalPage = res.Data.Paging.Pages;
  507. let list = res.Data.List || [];
  508. list = list.map((item) => {
  509. let temp = item;
  510. temp.date = item.PublishTime.split(" ")[0];
  511. if (item.Content.length) {
  512. item.isShowBtn = item.Content.length > 60 ? true : false;
  513. item.isExpand = item.Content.length > 60 ? false : true;
  514. }
  515. return temp;
  516. });
  517. if (this.page_no === 1) {
  518. this.timeLine = list;
  519. this.haveData = this.timeLine.length ? true : false;
  520. if (this.refresh) {
  521. uni.stopPullDownRefresh();
  522. this.refresh = false;
  523. }
  524. } else {
  525. this.timeLine = this.timeLine.concat(list);
  526. }
  527. }
  528. setTimeout(() => {
  529. this.$refs.timeChild.loadTimeLine = true;
  530. this.$refs.timeChild.getConentsHeight();
  531. }, 0);
  532. },
  533. /* 搜索 */
  534. async goSearch() {
  535. uni.navigateTo({ url: "/pages-search/indedxSearch/indedxSearch?id=报告" + "&source=深度研究页面" });
  536. },
  537. /* 初始 */
  538. initList() {
  539. if (this.tabAct_id && this.strategyIndex < 4) {
  540. this.page_no = 1;
  541. this.refresh = true;
  542. this.getIndustryList();
  543. this.getTradeList();
  544. }
  545. this.strategyIndex >= 4 && this.getstrategyAll();
  546. this.isNum = 1;
  547. },
  548. /* 页面加载 */
  549. loadList(option) {
  550. app.globalData.isSx = true;
  551. this.strategyIndex = option.strategyIndex || "";
  552. this.tabAct_id = option.tab || "";
  553. if (option.tabs !== "" && option.tabs) {
  554. this.strategyIndex = 4;
  555. this.tabAct_idTwo = option.tabs;
  556. }
  557. if (this.tabAct_id == 31) {
  558. this.strategyIndex = 5;
  559. }
  560. this.getClassify();
  561. },
  562. goSecretDetail(type) {
  563. uni.navigateTo({
  564. url: "/reportPages/secretDetails/secretDetails?type=" + type,
  565. });
  566. },
  567. /* 跳转榜单 */
  568. goHot() {
  569. uni.navigateTo({
  570. url: "/reportPages/hotList/hotList",
  571. });
  572. },
  573. //点击了checkbox
  574. checkboxChange(item) {
  575. item.isAct = !item.isAct;
  576. let arr = [];
  577. this.deepCoverList.forEach((key) => {
  578. if (key.isAct) {
  579. arr.push(key.value);
  580. }
  581. });
  582. this.deepCoverFocus = arr;
  583. this.page_no = 1;
  584. this.getIndustryList();
  585. },
  586. // 视频播放权限判断
  587. async handelVideoPlay(item) {
  588. this.$store.commit("setRouterReport", "产业列表");
  589. await this.$store.dispatch("showLoginModal");
  590. if (item.AuthInfo.HasPermission == 1) {
  591. this.playVideo(item);
  592. } else {
  593. this.hasPermission = item.AuthInfo.HasPermission;
  594. this.jurisdictionList.ActivityId = item.IndustryVideo.Id;
  595. this.jurisdictionList.isAudioVideo = 3;
  596. if (this.hasPermission == 2) {
  597. this.jurisdictionList.SellerMobile = item.AuthInfo.SellerMobile;
  598. this.jurisdictionList.SellerName = item.AuthInfo.SellerName;
  599. this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
  600. this.isShowhasPermission = true;
  601. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  602. this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
  603. this.applyForIsShow = true;
  604. }
  605. }
  606. },
  607. playVideo(item) {
  608. let params = {
  609. Id: item.IndustryVideo.Id,
  610. ResourceUrl: item.IndustryVideo.ResourceUrl,
  611. BackgroundImg: item.IndustryVideo.BackgroundImg,
  612. Title: `5min【${item.IndustryName}】逻辑解析`,
  613. };
  614. if (this.$store.state.videoPlay.playVideoId != item.Id) {
  615. this.$store.commit("videoPlay/palyTimeUpdate", 0);
  616. this.$store.commit("videoPlay/playVideo", item.Id);
  617. }
  618. this.globalBgAudioManager.stop();
  619. this.videoPopList = params;
  620. this.showVideoPop = true;
  621. },
  622. // 获取产业下的标签
  623. async getHomeStockName() {
  624. const res = await Reports.getHomeStockName({
  625. ChartPermissionId: this.tabAct_id,
  626. });
  627. if (res.Ret === 200) {
  628. this.labelListData = res.Data.List || [];
  629. }
  630. },
  631. // 策略平台的 标签 点击事件
  632. strategyLabelHadel(item) {
  633. this.$store.commit("setRouterReport", "综述链接");
  634. //去往文章详情页面
  635. uni.navigateTo({ url: "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId });
  636. },
  637. // 获取banner 列表
  638. async getBannerList() {
  639. const res = await Reports.collectionBannerList();
  640. if (res.Ret === 200) {
  641. this.bannerDataList = res.Data.ListA || [];
  642. this.bulletinData = res.Data.ListB || {};
  643. }
  644. },
  645. // bannaer 点击事件
  646. bannerSwiperHandler(item) {
  647. uni.navigateTo({
  648. url: item.Path,
  649. });
  650. },
  651. // 精选看板的点击事件
  652. lookBulletinhandler() {
  653. uni.navigateTo({
  654. url: "/reportPages/selectedBulletin/selectedBulletin",
  655. });
  656. },
  657. popoverHandleClick(option) {
  658. this.actions = [
  659. { text: "接受推送", imgUrl: "https://hzstatic.hzinsights.com/new_cygx/AcceptBtn.png", key: 0 },
  660. { text: "重点关注", imgUrl: "https://hzstatic.hzinsights.com/new_cygx/FocusBtn.png", key: 1 },
  661. { text: "不感兴趣", imgUrl: "https://hzstatic.hzinsights.com/new_cygx/uninterestedBtn.png", key: 3 },
  662. ].filter((item) => item.key !== option.FollowType);
  663. },
  664. async selectOption(e, item) {
  665. if (!e) return;
  666. await this.$store.dispatch("showLoginModal");
  667. const res = await Reports.reportFllow({
  668. IndustrialManagementId: item.IndustrialManagementId,
  669. FollowType: e.key,
  670. PageRouter: "细分产业列表",
  671. });
  672. if (res.Ret === 200) {
  673. item.FollowType = res.Data.Status;
  674. let content =
  675. res.Data.Status == 1
  676. ? "请关注【查研观向小助手】公众号及时获取产业内容更新提醒"
  677. : res.Data.Status == 0
  678. ? "请关注【查研观向小助手】公众号给您推送产业内容更新"
  679. : "产业内容更新将不再以公众号消息推送给您";
  680. uni.showModal({
  681. title: res.Data.Status == 1 ? "已设置为重点关注产业" : "设置成功",
  682. content,
  683. confirmText: "知道了",
  684. confirmColor: "#376CBB",
  685. showCancel: false,
  686. });
  687. }
  688. },
  689. getDisplayText(item) {
  690. return item.FollowType == 1
  691. ? "https://hzstatic.hzinsights.com/new_cygx/FocusIcon.png"
  692. : item.FollowType == 0
  693. ? "https://hzstatic.hzinsights.com/new_cygx/AcceptIcon.png"
  694. : "https://hzstatic.hzinsights.com/new_cygx/uninterested.png";
  695. },
  696. // 点击展开收起
  697. isShowOpenHandler() {
  698. this.isShowOpen = !this.isShowOpen;
  699. if (this.isShowOpen) {
  700. this.page_no = 1;
  701. this.status = "loading";
  702. this.getIndustryList();
  703. } else if (!this.isShowOpen) {
  704. this.page_no++;
  705. this.page_no_open = 1;
  706. this.status = "loading";
  707. this.getIndustryList();
  708. }
  709. },
  710. // 批量设置
  711. allSetupHandler() {
  712. uni.navigateTo({
  713. url: "/reportPages/pushrules/pushrules",
  714. });
  715. },
  716. },
  717. /* 触底 */
  718. onReachBottom: Throttle(function () {
  719. if (this.strategyIndex == 4 && this.tabAct_idTwo != 99999) {
  720. this.isNum++;
  721. return;
  722. }
  723. if (this.status === "nomore" || (!this.isShowOpen && this.IsInterested)) return;
  724. this.status = "loading";
  725. this.page_no++;
  726. this.page_no_open++;
  727. this.tabAct_idTwo != 99999 ? this.getIndustryList() : this.getTimeLineList();
  728. }),
  729. /* 下拉刷新 */
  730. onPullDownRefresh: Throttle(function () {
  731. if (this.strategyIndex == 4) {
  732. this.tabAct_idTwo != 99999 ? (this.pageNumFather = 1) : this.getTimeLineList();
  733. } else {
  734. this.industryList = [];
  735. this.pageNumFather = null;
  736. this.page_no = 1;
  737. this.refresh = true;
  738. this.isShowOpen = false;
  739. this.getIndustryList();
  740. this.getTradeList();
  741. }
  742. wx.stopPullDownRefresh();
  743. }),
  744. onShow() {
  745. this.getRecordTracking("深度研究");
  746. if (this.tabAct_id) {
  747. this.$store.dispatch("statistics", {
  748. PageType: "Report",
  749. ChartPermissionId: Number(this.tabAct_id),
  750. });
  751. }
  752. if (this.tabAct_id && app.globalData.isSx) {
  753. this.getTradeList();
  754. }
  755. },
  756. /**
  757. * 用户点击分享
  758. */
  759. onShareAppMessage: function (res) {
  760. return {
  761. title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : "深度研究",
  762. path: "/pages/reportForm/reportForm?tab=" + this.tabAct_id + "&tabs=" + this.tabAct_idTwo + "&strategyIndex=" + this.strategyIndex,
  763. success: (res) => {},
  764. fail: (err) => {},
  765. };
  766. },
  767. onHide() {
  768. if (this.showTransition) {
  769. this.showTransition = false;
  770. }
  771. if (this.strategyIndex == 4 || this.strategyIndex == 5) return;
  772. },
  773. };
  774. </script>
  775. <style lang="scss">
  776. @import "./index.scss";
  777. .reportForm-container {
  778. .nav-bar-wrap {
  779. position: sticky;
  780. top: 0;
  781. left: 0;
  782. z-index: 99;
  783. .content {
  784. position: relative;
  785. padding-left: 30rpx;
  786. .hot-top {
  787. display: flex;
  788. align-items: center;
  789. width: 140rpx;
  790. height: 100%;
  791. color: $uni-color-new;
  792. font-size: 30rpx;
  793. flex-shrink: 0;
  794. .hot-img {
  795. width: 40rpx;
  796. height: 40rpx;
  797. margin-right: 10rpx;
  798. }
  799. }
  800. }
  801. }
  802. .label-content {
  803. display: flex;
  804. flex-wrap: wrap;
  805. background-color: #fff;
  806. padding: 30rpx 30rpx 0rpx 80rpx;
  807. margin: 20rpx 0 0;
  808. .item {
  809. margin-bottom: 20px !important;
  810. }
  811. }
  812. .label-content-column {
  813. display: flex;
  814. flex-wrap: wrap;
  815. flex-direction: column;
  816. overflow: hidden;
  817. padding: 20rpx 30rpx 0;
  818. overflow-x: auto;
  819. height: 164rpx;
  820. background-color: #fff;
  821. justify-content: space-between;
  822. border-radius: 4rpx;
  823. &::after {
  824. content: "";
  825. width: 0rpx;
  826. height: 46rpx;
  827. }
  828. }
  829. .label-content .item,
  830. .label-content-column .item {
  831. display: flex;
  832. align-items: center;
  833. justify-content: center;
  834. margin-right: 12rpx;
  835. margin-bottom: 20rpx;
  836. width: 180rpx;
  837. height: 52rpx;
  838. background: #e5efff;
  839. border-radius: 150rpx;
  840. font-size: 24rpx;
  841. color: $uni-color-new;
  842. }
  843. .label-content .item,
  844. .label-content-column .item-size {
  845. font-size: 24rpx;
  846. }
  847. .banne-content {
  848. // height: 110rpx;
  849. width: 100%;
  850. padding: 20rpx 30rpx 0;
  851. overflow: hidden;
  852. margin: 0 auto 20rpx;
  853. border-radius: 8rpx;
  854. display: flex;
  855. justify-content: space-between;
  856. swiper {
  857. // width: 447rpx;
  858. flex: 1;
  859. height: 110rpx;
  860. border-radius: 16rpx;
  861. overflow: hidden;
  862. }
  863. image {
  864. width: 100%;
  865. height: 100%;
  866. }
  867. .bulletin {
  868. position: relative;
  869. width: 214rpx;
  870. height: 110rpx;
  871. border-radius: 16rpx;
  872. overflow: hidden;
  873. .limit-img {
  874. position: absolute;
  875. top: 0;
  876. right: 0;
  877. width: 50rpx;
  878. height: 26rpx;
  879. z-index: 1;
  880. }
  881. }
  882. }
  883. .tabs-box {
  884. .item {
  885. width: 108rpx;
  886. }
  887. }
  888. }
  889. .content-intimate {
  890. position: fixed;
  891. display: flex;
  892. align-items: center;
  893. bottom: 96rpx;
  894. right: 41rpx;
  895. height: 156rpx;
  896. .content {
  897. width: 432rpx;
  898. height: 112rpx;
  899. background-color: #fff;
  900. display: flex;
  901. border-radius: 56rpx;
  902. overflow: hidden;
  903. .cont-border {
  904. margin: 0 2rpx;
  905. }
  906. view {
  907. flex: 1;
  908. background-color: #376cbb;
  909. font-size: 30rpx;
  910. color: #fff;
  911. padding-top: 15rpx;
  912. text-align: center;
  913. }
  914. }
  915. image {
  916. width: 156rpx;
  917. height: 100%;
  918. z-index: 99;
  919. }
  920. }
  921. .new-recommend {
  922. width: 220rpx;
  923. height: 51rpx;
  924. display: flex;
  925. align-items: center;
  926. justify-content: space-between;
  927. color: #999999;
  928. font-size: 24rpx;
  929. background-color: #f8f8fa;
  930. border-radius: 47rpx;
  931. margin: auto 0;
  932. overflow: hidden;
  933. text {
  934. height: 51rpx;
  935. line-height: 51rpx;
  936. width: 120rpx;
  937. text-align: center;
  938. }
  939. .items-act {
  940. background-color: #376cbb;
  941. color: #fff;
  942. border-radius: 47rpx;
  943. }
  944. }
  945. .bottom-btn-content {
  946. padding: 15rpx 30px 30rpx;
  947. .opne-content {
  948. display: flex;
  949. align-items: center;
  950. justify-content: center;
  951. image {
  952. width: 24rpx;
  953. height: 24rpx;
  954. }
  955. .content-text {
  956. color: #376cbb;
  957. margin: 0 5rpx 0 10rpx;
  958. }
  959. margin-bottom: 15rpx;
  960. }
  961. .all-setup {
  962. .content-text {
  963. text-decoration: underline;
  964. }
  965. }
  966. }
  967. </style>