material.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852
  1. <template>
  2. <view class="container Index-container">
  3. <view class="top-content-box">
  4. <search-bar @goSearch="goSearch" :searchTitle="searchPlaceholderList.SummarySearch" :width="70" />
  5. <view class="top-tabs tabs-content-ul">
  6. <block v-for="item in topTabBars" :key="item.Id">
  7. <view v-if="item.IsShow" :class="['item', item.Id == topTabsActive && 'tabs-active']" @click="topTabsChange(item)">
  8. {{ item.Name }}
  9. <block v-if="(item.Id === 3 || item.Id === 5) && wholeShowListData.IsShowChart">
  10. <image class="limit-img tabs-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/limit_icon.png" mode=""></image>
  11. </block>
  12. <view class="active" v-if="item.Id == topTabsActive"></view>
  13. </view>
  14. </block>
  15. </view>
  16. <view class="tabs-content">
  17. <view class="global_two_tabs" v-if="topTabsActive == '2' || topTabsActive == '3'">
  18. <view :class="['item', item.ChartPermissionId == secondActive && 'tabs-active']" v-for="(item, index) in secondBars" :key="item.ChartPermissionId" @click="handleClickTopSub(item)">
  19. {{ item.PermissionName }}
  20. <block v-if="wholeShowListData.IsShowResearch && index === secondBars.length - 1 && topTabsActive == '2'">
  21. <image class="limit-img tabs-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/limit_icon.png" mode=""></image>
  22. </block>
  23. <view class="active" v-if="item.ChartPermissionId == secondActive"></view>
  24. </view>
  25. </view>
  26. <block v-if="topTabsActive == '3'">
  27. <view class="children-ul" v-if="chartChildren.length">
  28. <view :class="['chart-children', chartChildrenActive == item.CtagId ? 'children-active' : '']" v-for="item in chartChildren" :key="item.CtagId" @click="handleChartChildren(item)">{{
  29. item.Name
  30. }}</view>
  31. </view>
  32. <!-- 我的收藏滚动显示 -->
  33. <view class="notice" @click="noticeBarHandler" v-if="secondActive==0">
  34. <van-notice-bar
  35. custom-class="custom-class-notice"
  36. color="#E37318"
  37. background="#FFF1E9"
  38. text="如何定制自己的图表面板:在上方分栏下选择感兴趣的图表类别,点击标题查看大图,点亮☆收藏就可以在自己的图表首页可见。也可在报告中随时点☆收藏感兴趣的图表。"
  39. />
  40. </view>
  41. </block>
  42. <view v-if="topTabsActive == '4'" class="medium-ul">
  43. <view class="global_two_tabs">
  44. <view @click="mediumClickHandler(item)" :class="['item', item.isSelect && 'tabs-active']" v-for="item in mediumSelect" :key="item.value">
  45. {{ item.name }}
  46. </view>
  47. <!-- 各种状态选择 -->
  48. <view class="select-conyent" ref="select-conyent" style="margin-left: 20rpx">
  49. <van-dropdown-menu active-color="#333333">
  50. <van-dropdown-item id="industry" :title="chartPermissionName">
  51. <view class="menu-items">
  52. <view class="menu-items-box" v-for="item in listChartPermission" :key="item.ChartPermissionId" @click="overallClick(item)">
  53. <view class="items-box">
  54. <u-icon v-if="item.IsChoose" name="checkbox-mark" :color="'#376cbb'" size="24"></u-icon>
  55. </view>
  56. <text>{{ item.PermissionName }}</text>
  57. </view>
  58. </view>
  59. <view class="replacement">
  60. <text @click="replacementBtn" class="replacement-box">重置</text>
  61. <text @click="replacementConfirm">确定</text>
  62. </view>
  63. </van-dropdown-item>
  64. </van-dropdown-menu>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. <block v-if="haveData">
  71. <view class="content-ul">
  72. <block v-if="topTabsActive == 4">
  73. <view style="width: 49%" v-for="item in roadshowPageList" :key="item.Id">
  74. <RoadshowItem :list="item" @isCollectionHandeler="isCollectionHandeler" />
  75. </view>
  76. </block>
  77. <block v-else>
  78. <view class="report-ul" style="width: 49%">
  79. <block v-for="(item, index) in dataList" :key="index">
  80. <view v-if="index % 2 == 0">
  81. <ChartItem v-if="topTabsActive == 3" :list="item" :isMyChartCollection="isMyChartCollection" @myChartIsTop="myChartIsTop" @myChartCollect="myChartCollect" />
  82. <ReportItem v-if="topTabsActive == 2" :list="item" />
  83. </view>
  84. </block>
  85. </view>
  86. <view class="report-ul" style="width: 49%">
  87. <block v-for="(item, index) in dataList" :key="index">
  88. <view v-if="index % 2 !== 0">
  89. <ChartItem v-if="topTabsActive == 3" :list="item" :isMyChartCollection="isMyChartCollection" @myChartIsTop="myChartIsTop" @myChartCollect="myChartCollect" />
  90. <ReportItem v-if="topTabsActive == 2" :list="item" />
  91. </view>
  92. </block>
  93. </view>
  94. </block>
  95. </view>
  96. <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="pageNum > 1" />
  97. </block>
  98. <view class="nodata" v-else-if="haveData === false" style="padding-top: 400rpx">
  99. <block class="nodata" v-if="!isBindingMobile && secondActive == 0">
  100. <text>请先绑定联系方式</text>
  101. <view class="bind-mobile" @click="bindingMobile">绑定联系方式</view>
  102. </block>
  103. <block v-else>
  104. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/act_search.png" mode="" class="nodata_ico"></image>
  105. <text>{{ topTabsActive == 3 && secondActive == 0 ? "暂无收藏的图表" : "暂时没有数据" }}</text>
  106. </block>
  107. </view>
  108. <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
  109. <view v-if="showAudioBox">
  110. <audioModule :showAudioPop.sync="showAudioPop" />
  111. </view>
  112. <view class="paly-list-image" v-if="topTabsActive == 4 && playlistData.length > 0" @click="showAudioBoxPlayList">
  113. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/Joined_play_list.png"></image>
  114. </view>
  115. <Loading />
  116. <van-popup custom-class="custom-class-popup" :show="isNoticeBarShow" :close-on-click-overlay="false" @close="onCloseHandler">
  117. <view class="close-iocn">
  118. <van-icon @click="onCloseHandler" color="#333" name="cross" />
  119. </view>
  120. <view class="popup-box">
  121. 如何定制自己的图表面板:在上方分栏下选择感兴趣的图表类别,点击标题查看大图,点亮<van-icon name="star" color="#E37318" />收藏就可以在自己的图表首页可见。也可在报告中随时点<van-icon
  122. name="star"
  123. color="#E37318"
  124. />收藏感兴趣的图表。
  125. </view>
  126. </van-popup>
  127. </view>
  128. </template>
  129. <script>
  130. import { Home, Reports, Chart, activity } from "@/config/api.js";
  131. import { Throttle, deepCopy } from "@/config/util.js";
  132. import freeCharge from "@/components/freeCharge";
  133. import SearchBar from "@/components/search-bar/searchBar.vue";
  134. import audioModule from "@/components/audioModule/index";
  135. import ChartItem from "@/components/ItemComponent/chartItem.vue";
  136. import ReportItem from "@/components/ItemComponent/reportItem.vue";
  137. import RoadshowItem from "@/components/ItemComponent/roadshowItem.vue";
  138. let app = getApp();
  139. export default {
  140. data() {
  141. return {
  142. topTabBars: [],
  143. topTabsActive: 2, //一级top的tabs
  144. secondActive: "", //二级的tabs
  145. secondBars: [], //二级的tabs数组
  146. chartChildren: [], //二级的tabs下的标签
  147. chartChildrenActive: 0,
  148. refresh: false,
  149. pageSize: 10, //条数
  150. pageNum: 1, //页码
  151. haveMore: true, //是否有更多数据
  152. haveData: null, //是否有数据
  153. //数据列表
  154. dataList: [],
  155. status: "loadmore",
  156. loadText: {
  157. loadmore: "上拉加载更多",
  158. loading: "加载中",
  159. nomore: "已经到底了",
  160. },
  161. showTransition: false, //点击绝密后的隐现
  162. isBindingMobile: true, //图表我的收藏是否绑定手机号
  163. videoContext: null,
  164. shareSourceType: "", //通过分享单个音频点进页面时使用
  165. shareSourceId: "", //通过分享单个视频点进页面时使用
  166. roadshowPageList: [], //音频 视频 list
  167. showAudioPop: false,
  168. mediumActive: "",
  169. mediumSelect: [
  170. { name: "路演回放", value: 1, IsChoose: false },
  171. { name: "问答系列", value: 2, IsChoose: false },
  172. { name: "调研反馈", value: 3, IsChoose: false },
  173. ],
  174. listChartPermission: [], // 行业
  175. chartPermissionName: "全行业",
  176. chartPermissionIds: "",
  177. isNoticeBarShow: false,
  178. };
  179. },
  180. components: {
  181. freeCharge,
  182. ChartItem,
  183. ReportItem,
  184. RoadshowItem,
  185. SearchBar,
  186. audioModule,
  187. },
  188. watch: {},
  189. onLoad(optios) {
  190. this.getUserSearchContent();
  191. this.getHeaderTab();
  192. if (optios.topTabsActive) {
  193. this.topTabsActive = optios.topTabsActive;
  194. this.secondActive = optios.secondActive;
  195. this.chartChildrenActive = optios.childrenActive;
  196. this.shareSourceType = optios.SourceType;
  197. this.shareSourceId = optios.SourceId;
  198. }
  199. this.getTabs();
  200. this.getReportList();
  201. },
  202. onShow() {
  203. this.getRecordTracking("纪要库");
  204. this.$store.commit("setRouterActivity", "纪要库");
  205. this.$store.commit("setRouterReport", "纪要库");
  206. //进入页面的记录
  207. this.$store.dispatch("statistics", { PageType: "Activit" });
  208. // #ifdef MP-WEIXIN
  209. uni.hideHomeButton();
  210. // #endif
  211. this.$store.commit("audioBg/parseIntAudio", true);
  212. },
  213. computed: {
  214. curVoiceId() {
  215. //当前正在播放的音频id
  216. return this.$store.state.audioBg.indexId;
  217. },
  218. curAudioPaused() {
  219. //当前音频是否暂停状态
  220. return this.$store.state.audioBg.paused;
  221. },
  222. showAudioBox() {
  223. return this.$store.state.audioBg.parseIntShow;
  224. },
  225. isMyChartCollection() {
  226. return this.topTabsActive == "3" && this.secondActive == 0;
  227. },
  228. // 播放列表数据
  229. playlistData() {
  230. return this.$store.state.audioJoinPlaylist.playlist;
  231. },
  232. },
  233. methods: {
  234. //点击顶部一级分类
  235. topTabsChange(item) {
  236. if (item.Id == 5) {
  237. // 精选看板的点击事件
  238. uni.navigateTo({
  239. url: "/reportPages/selectedBulletin/selectedBulletin",
  240. });
  241. return;
  242. }
  243. this.topTabsActive = item.Id;
  244. this.chartChildren = [];
  245. this.chartChildrenActive = 0;
  246. this.secondActive = "";
  247. this.pageNum = 1;
  248. this.dataList = [];
  249. this.shareSourceId = "";
  250. this.shareSourceType = "";
  251. uni.pageScrollTo({
  252. scrollTop: 0,
  253. duration: 0,
  254. });
  255. if (this.topTabsActive == "2" || this.topTabsActive == "3") {
  256. this.getTabs();
  257. } else {
  258. this.initData();
  259. }
  260. this.$store.commit("setRouterReport", item.Id === 3 ? "我的收藏" : "纪要库");
  261. },
  262. //点击顶部二级分类
  263. handleClickTopSub(item) {
  264. this.$store.commit("setRouterReport", item.PermissionName === "我的收藏" ? "我的收藏" : "纪要库");
  265. this.secondActive = item.ChartPermissionId;
  266. this.chartChildren = [];
  267. this.chartChildrenActive = 0;
  268. this.childrenChartData();
  269. this.initData();
  270. },
  271. //点击图标的二级分类 处理数据
  272. childrenChartData() {
  273. if (this.topTabsActive == 3 && this.secondActive != 0) {
  274. let arr = [];
  275. this.secondBars &&
  276. this.secondBars.forEach((item) => {
  277. if (this.secondActive == item.ChartPermissionId) {
  278. deepCopy(arr, item.List);
  279. arr.unshift({
  280. CtagId: 0,
  281. Name: "全部",
  282. });
  283. this.chartChildren = arr;
  284. }
  285. });
  286. this.chartChildrenActive > 0 ? "" : (this.chartChildrenActive = 0);
  287. }
  288. },
  289. //点击图标的三级分类
  290. handleChartChildren(item) {
  291. this.chartChildrenActive = item.CtagId;
  292. this.initData();
  293. },
  294. // 点击为路演的筛选
  295. mediumClickHandler(item) {
  296. this.shareSourceType = "";
  297. this.shareSourceId = "";
  298. item.isSelect = !item.isSelect;
  299. let arr = [];
  300. this.mediumSelect.forEach((key) => {
  301. if (key.isSelect) {
  302. arr.push(key.value);
  303. }
  304. });
  305. this.mediumActive = arr.join(",");
  306. this.initData();
  307. },
  308. //点击
  309. initData() {
  310. this.pageNum = 1;
  311. this.dataList = [];
  312. uni.pageScrollTo({
  313. scrollTop: 0,
  314. duration: 0,
  315. });
  316. this.getReportList();
  317. },
  318. /* 获取tab分类 */
  319. getTabs() {
  320. this.secondBars = [];
  321. this.topTabsActive == "2"
  322. ? Home.Tab().then((res) => {
  323. if (res.Ret === 200) {
  324. this.secondBars = res.Data.List;
  325. this.secondActive > 0 ? "" : (this.secondActive = this.secondBars[0].ChartPermissionId);
  326. this.getReportList();
  327. }
  328. })
  329. : this.topTabsActive == "3"
  330. ? Chart.getChartPatg().then((res) => {
  331. if (res.Ret === 200) {
  332. let arr = res.Data;
  333. arr.unshift({
  334. ChartPermissionId: 0,
  335. PermissionName: "我的收藏",
  336. });
  337. this.secondBars = arr;
  338. this.secondActive ? "" : (this.secondActive = 0);
  339. this.secondActive > 0 && this.childrenChartData();
  340. this.getReportList();
  341. }
  342. })
  343. : "";
  344. },
  345. /* 获取列表 */
  346. async getReportList() {
  347. if (this.topTabsActive == "3" && this.secondActive == 0) {
  348. const res = await Chart.getChartcollection({
  349. PageSize: this.pageSize,
  350. CurrentIndex: this.pageNum,
  351. });
  352. if (res.Ret === 200) {
  353. this.status = this.pageNum < res.Data.Paging.Pages ? "loadmore" : "nomore";
  354. this.isBindingMobile = res.Data.IsBindingMobile;
  355. if (this.pageNum === 1) {
  356. this.dataList = res.Data.List || [];
  357. this.haveData = this.dataList.length > 0 ? true : false;
  358. } else {
  359. this.dataList = this.dataList.concat(res.Data.List);
  360. }
  361. }
  362. } else if (this.topTabsActive == 4) {
  363. const res = await Home.microRoadshowList({
  364. PageSize: this.pageSize,
  365. CurrentIndex: this.pageNum,
  366. SourceId: this.shareSourceId,
  367. SourceType: this.shareSourceType,
  368. ChartPermissionIds: this.chartPermissionIds,
  369. SearchType: this.mediumActive,
  370. });
  371. if (res.Ret === 200) {
  372. this.status = this.pageNum < res.Data.Paging.Pages ? "loadmore" : "nomore";
  373. if (this.pageNum == 1) {
  374. this.roadshowPageList = res.Data.List || [];
  375. this.haveData = this.roadshowPageList.length > 0 ? true : false;
  376. if (this.refresh) {
  377. uni.stopPullDownRefresh();
  378. this.refresh = false;
  379. }
  380. } else {
  381. this.roadshowPageList = this.roadshowPageList.concat(res.Data.List);
  382. }
  383. }
  384. } else {
  385. const res = await Home.getList({
  386. PageSize: this.pageSize,
  387. CurrentIndex: this.pageNum,
  388. ChartPermissionId: this.secondActive,
  389. CtagId: this.chartChildrenActive,
  390. ListType: this.topTabsActive,
  391. });
  392. if (res.Ret === 200) {
  393. this.processingData(res);
  394. }
  395. }
  396. },
  397. //处理数据
  398. processingData(res) {
  399. if (!res.Data.HaveResearch) {
  400. this.$util.modalShow("", "您暂无查看买方研选权限", "", () => {
  401. uni.reLaunch({
  402. url: "/pages/index/index",
  403. });
  404. });
  405. }
  406. this.status = this.pageNum < res.Data.Paging.Pages ? "loadmore" : "nomore";
  407. res.Data.List &&
  408. res.Data.List.forEach((item) => {
  409. if (item.BodyHtml) {
  410. item.BodyHtml = item.BodyHtml.replace(/'\'/g, "");
  411. }
  412. });
  413. if (this.topTabsActive == "2") {
  414. if (this.pageNum === 1) {
  415. this.dataList = res.Data.List || [];
  416. this.haveData = this.dataList.length ? true : false;
  417. } else {
  418. this.dataList = this.dataList.concat(res.Data.List);
  419. }
  420. } else {
  421. if (this.pageNum === 1) {
  422. this.haveData = res.Data.List ? true : res.Data.ChartList ? true : false;
  423. }
  424. if (!res.Data.List) {
  425. this.dataList = this.dataList.concat(res.Data.ChartList);
  426. } else if (!res.Data.ChartList) {
  427. this.dataList = this.dataList.concat(res.Data.List);
  428. } else {
  429. this.dataList.push(res.Data.List.shift());
  430. let newArr = [];
  431. let newArrTwo = [];
  432. for (let i = 0; i < res.Data.List.length; i += 2) {
  433. newArr.push(res.Data.List.slice(i, i + 2));
  434. }
  435. for (let i = 0; i < res.Data.ChartList.length; i += 2) {
  436. newArrTwo.push(res.Data.ChartList.slice(i, i + 2));
  437. }
  438. let arr = [];
  439. newArr.forEach((item, index) => {
  440. if (newArrTwo[index]) {
  441. arr.push(newArrTwo[index], item);
  442. } else {
  443. arr.push(item);
  444. }
  445. });
  446. this.dataList = this.dataList.concat(arr.flat(Infinity));
  447. }
  448. }
  449. if (this.refresh) {
  450. uni.stopPullDownRefresh();
  451. this.refresh = false;
  452. }
  453. },
  454. //我的收藏的删除
  455. myChartCollect(id) {
  456. uni.showModal({
  457. content: "确认要将该图表移除我的收藏吗?",
  458. confirmColor: "#376cbb",
  459. cancelColor: "#606266",
  460. success: async (res) => {
  461. if (res.confirm) {
  462. const res = await Chart.myChartCollect({
  463. ChartId: id,
  464. });
  465. if (res.Ret === 200) {
  466. this.initData();
  467. this.$util.toast("已取消收藏");
  468. }
  469. }
  470. },
  471. });
  472. },
  473. //我的收藏 置顶
  474. async myChartIsTop(id) {
  475. const res = await Chart.myChartTop({
  476. ChartId: id,
  477. });
  478. if (res.Ret === 200) {
  479. this.initData();
  480. this.$util.toast(res.Msg);
  481. }
  482. },
  483. /* 搜索 */
  484. goSearch() {
  485. uni.navigateTo({ url: "/pages-search/indedxSearch/indedxSearch?isType=" + this.topTabsActive + "&source=纪要库页面" });
  486. },
  487. /* 绑定联系方式 */
  488. bindingMobile() {
  489. uni.showModal({
  490. title: "即将前往登录页面,请确认是否继续",
  491. content: "为了给您提供更好的使用体验,请登录后再进行查看或操作",
  492. confirmColor: "#376cbb",
  493. cancelColor: "#606266",
  494. success: function (res) {
  495. if (res.confirm) {
  496. //已授权未绑定
  497. uni.navigateTo({
  498. url: "/pageMy/login/login",
  499. });
  500. }
  501. },
  502. });
  503. },
  504. //获取顶部导航
  505. async getHeaderTab() {
  506. const res = await Home.headerTab();
  507. if (res.Ret === 200) {
  508. this.topTabBars = res.Data || [];
  509. }
  510. },
  511. // 微路演收藏
  512. async isCollectionHandeler(item) {
  513. await this.$store.dispatch("showLoginModal");
  514. const res = await Home.microRoadshowCollect({
  515. SourceId: item.SourceId,
  516. SourceType: item.Type,
  517. PageRouter: this.$store.state.pageRouterReport,
  518. });
  519. if (res.Ret === 200) {
  520. let index = this.roadshowPageList.findIndex((key) => key.SourceId == item.SourceId && key.Type == item.Type);
  521. res.Data.Status == 1 ? this.$set(this.roadshowPageList[index], "IsCollect", true) : this.$set(this.roadshowPageList[index], "IsCollect", false);
  522. uni.showToast({
  523. title: res.Msg,
  524. duration: 2000,
  525. });
  526. }
  527. },
  528. // 选择的选中事件
  529. overallClick(item) {
  530. item.IsChoose = !item.IsChoose;
  531. },
  532. // 下拉的选择的重置事件
  533. replacementBtn() {
  534. this.page_no = 1;
  535. this.chartPermissionIds = "";
  536. this.listChartPermission.map((item) => (item.IsChoose = false));
  537. this.chartPermissionName = "全行业";
  538. this.initData();
  539. },
  540. // 下拉选择的确定事件
  541. replacementConfirm() {
  542. this.page_no = 1;
  543. const arr = [];
  544. const str = [];
  545. this.listChartPermission.forEach((key) => {
  546. if (key.IsChoose) {
  547. arr.push(key.ChartPermissionId);
  548. str.push(key.PermissionName);
  549. }
  550. });
  551. if (str.length == this.listChartPermission.length || str.length <= 0) {
  552. this.chartPermissionName = "全行业";
  553. } else {
  554. this.chartPermissionName = str.join(",");
  555. }
  556. this.chartPermissionIds = arr.join(",");
  557. this.initData();
  558. this.selectComponent("#industry").toggle(false);
  559. },
  560. // 获取权限、所有的行业
  561. async getUserSearchContent() {
  562. const res = await Reports.permissionNoyx({});
  563. if (res.Ret === 200) {
  564. this.listChartPermission =
  565. res.Data.List.map((item) => {
  566. return {
  567. ...item,
  568. IsChoose: false,
  569. };
  570. }) || [];
  571. }
  572. },
  573. showAudioBoxPlayList() {
  574. this.$store.commit("audioBg/parseIntAudio", true);
  575. this.showAudioPop = true;
  576. uni.$emit("play-list-emit", {});
  577. },
  578. // 点击了图表下的滚动条
  579. noticeBarHandler() {
  580. this.isNoticeBarShow = true;
  581. },
  582. // 关闭滚动条的弹框
  583. onCloseHandler() {
  584. this.isNoticeBarShow = false;
  585. },
  586. },
  587. onHide() {
  588. this.$store.commit("audioBg/parseIntAudio", false);
  589. },
  590. mounted() {
  591. uni.$on("updateAudioVideo", (data) => {
  592. this.$store.dispatch("checkHandle", "noGO");
  593. this.getReportList();
  594. });
  595. },
  596. /* 下拉刷新 */
  597. onPullDownRefresh: Throttle(function () {
  598. this.shareSourceId = "";
  599. this.shareSourceType = "";
  600. this.status = "loadmore";
  601. this.refresh = true;
  602. this.dataList = [];
  603. this.pageNum = 1;
  604. this.getReportList();
  605. }),
  606. // 上拉加载
  607. onReachBottom: Throttle(function () {
  608. if (this.status === "nomore") return;
  609. this.status = "loading";
  610. this.pageNum++;
  611. this.getReportList();
  612. }),
  613. /** 用户点击分享*/
  614. onShareAppMessage: function ({ from, target }) {
  615. if (from === "button") {
  616. let item = target.dataset.item;
  617. let title_share = item.AudioTitle || item.Title;
  618. this.getRecordTracking("微路演转发", { SourceId: item.SourceId, SourceType: item.SourceType });
  619. return {
  620. title: title_share,
  621. path: "/pages/material/material?topTabsActive=4" + "&SourceId=" + item.SourceId + "&SourceType=" + item.Type,
  622. imageUrl: item.AudioShareImg || item.ShareImg,
  623. };
  624. } else {
  625. return {
  626. title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : "素材库",
  627. path: "/pages/material/material?topTabsActive=" + this.topTabsActive + "&secondActive=" + this.secondActive + "&childrenActive=" + this.chartChildrenActive,
  628. success: (res) => {},
  629. fail: (err) => {},
  630. };
  631. }
  632. },
  633. };
  634. </script>
  635. <style lang="scss">
  636. .Index-container {
  637. background-color: $uni-bg-color;
  638. font-size: 30rpx;
  639. /deep/ .search-box {
  640. margin-left: 30rpx !important;
  641. }
  642. .content-ul {
  643. display: flex;
  644. flex-wrap: wrap;
  645. justify-content: space-between;
  646. padding: 20rpx 15rpx;
  647. }
  648. .top-content-box {
  649. position: sticky;
  650. top: 0;
  651. left: 0;
  652. width: 100%;
  653. z-index: 9;
  654. .top-tabs {
  655. width: 100%;
  656. display: flex;
  657. align-items: center;
  658. justify-content: space-between;
  659. font-size: 28rpx;
  660. background-color: #fff;
  661. padding: 35rpx 0 10rpx;
  662. &::-webkit-scrollbar {
  663. width: 0;
  664. height: 0;
  665. display: none;
  666. }
  667. .item {
  668. position: relative;
  669. display: flex;
  670. justify-content: center;
  671. padding-bottom: 8rpx;
  672. flex: 1;
  673. flex-shrink: 0;
  674. .limit-img {
  675. position: absolute;
  676. top: -20rpx;
  677. right: -30rpx;
  678. z-index: 99;
  679. }
  680. .active {
  681. position: absolute;
  682. left: 50%;
  683. bottom: 0;
  684. transform: translateX(-50%);
  685. width: 32rpx;
  686. height: 6rpx;
  687. border-radius: 2rpx;
  688. background: $uni-color-new;
  689. }
  690. }
  691. .tabs-active {
  692. color: $uni-color-new;
  693. font-weight: 500;
  694. }
  695. }
  696. }
  697. .tabs-content-ul {
  698. padding: 35rpx 50rpx 10rpx 20rpx !important;
  699. .item {
  700. flex: none !important;
  701. padding: 0 20rpx;
  702. }
  703. }
  704. .tabs-content {
  705. .children-ul {
  706. padding: 20rpx 20rpx 0;
  707. display: flex;
  708. flex-wrap: wrap;
  709. background-color: #fff;
  710. .children-active {
  711. background-color: $uni-color-new;
  712. color: #fff;
  713. }
  714. }
  715. .chart-children {
  716. display: flex;
  717. align-items: center;
  718. height: 52rpx;
  719. padding: 0 30rpx;
  720. margin: 0rpx 20rpx 20rpx 0;
  721. background-color: #f8f8fa;
  722. color: #666666;
  723. font-size: 24rpx;
  724. border-radius: 100rpx;
  725. }
  726. }
  727. .tabs-img {
  728. width: 46rpx;
  729. height: 26rpx;
  730. }
  731. .nodata {
  732. font-size: 40rpx;
  733. .bind-mobile {
  734. width: 244rpx;
  735. height: 58rpx;
  736. background: #376cbb;
  737. border-radius: 8rpx;
  738. font-size: 28rpx;
  739. line-height: 58rpx;
  740. text-align: center;
  741. color: #fff;
  742. margin: 50rpx auto;
  743. }
  744. }
  745. .select-conyent {
  746. .items-box {
  747. width: 40rpx;
  748. }
  749. .menu-items {
  750. background-color: #f8f8fa;
  751. width: 100%;
  752. display: flex;
  753. flex-wrap: wrap;
  754. padding: 30rpx 30rpx 0;
  755. .menu-items-box {
  756. display: flex;
  757. width: 50%;
  758. font-size: 28rpx;
  759. font-weight: 400;
  760. margin-bottom: 40rpx;
  761. }
  762. }
  763. .replacement {
  764. margin: 0rpx 30rpx 20rpx;
  765. display: flex;
  766. background-color: $uni-color-new;
  767. height: 60rpx;
  768. line-height: 58rpx;
  769. font-size: 28rpx;
  770. font-weight: 400;
  771. color: #ffffff;
  772. border-radius: 30rpx;
  773. text {
  774. flex: 1;
  775. text-align: center;
  776. line-height: 60rpx;
  777. }
  778. .replacement-box {
  779. border: 1rpx solid $uni-color-new;
  780. line-height: 58rpx;
  781. color: $uni-color-new;
  782. background: #ffffff;
  783. border-radius: 28rpx 0rpx 28rpx 28rpx;
  784. }
  785. }
  786. }
  787. .paly-list-image {
  788. position: fixed;
  789. right: 50rpx;
  790. bottom: 150rpx;
  791. z-index: 99;
  792. width: 100rpx;
  793. height: 100rpx;
  794. image {
  795. width: 100rpx;
  796. height: 100rpx;
  797. }
  798. }
  799. /deep/.van-dropdown-menu {
  800. background-color: #fff;
  801. box-shadow: none !important;
  802. display: flex;
  803. align-items: center;
  804. }
  805. /deep/.van-dropdown-menu__item {
  806. box-sizing: border-box;
  807. width: 160rpx;
  808. // margin-right: 20rpx;
  809. padding-right: 20rpx;
  810. height: 51rpx;
  811. border-radius: 26rpx;
  812. background: #f8f8fa;
  813. }
  814. /deep/.van-dropdown-item {
  815. margin-top: -10rpx;
  816. }
  817. /deep/[data-index="2"] {
  818. margin-right: 0rpx;
  819. }
  820. /deep/ .van-ellipsis {
  821. font-size: 24rpx;
  822. }
  823. .custom-class-popup {
  824. border-radius: 12rpx;
  825. .close-iocn {
  826. padding: 25rpx 35rpx;
  827. display: flex;
  828. justify-content: flex-end;
  829. }
  830. .popup-box {
  831. width: 632rpx;
  832. padding: 0 30rpx 50rpx;
  833. line-height: 48rpx;
  834. font-size: 32rpx;
  835. }
  836. }
  837. }
  838. </style>