Index.vue 30 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057
  1. <style lang="scss" scoped>
  2. .preview {
  3. height: 80vh;
  4. overflow: auto;
  5. .aname{
  6. text-align: center;
  7. margin-bottom: 20px;
  8. color: #333;
  9. font-size: 16px;
  10. }
  11. .ainfo{
  12. display: flex;
  13. margin-bottom: 10px;
  14. p{
  15. width: 60%;
  16. margin-left: 15px;
  17. line-height: 26px;
  18. }
  19. }
  20. b{
  21. color: #333;
  22. }
  23. div{
  24. line-height: 26px;
  25. margin-bottom: 10px;
  26. overflow: auto;
  27. }
  28. }
  29. </style>
  30. <template>
  31. <section v-if="this.role_id==1" class="index-content">
  32. <div class="index_header">
  33. <div class="header-item">
  34. <div class="item-img">
  35. <img src="../assets/book.png" alt="" />
  36. <span class="text">
  37. 期刊总数 <br /><span class="count">{{
  38. form.journal_total
  39. }}</span></span
  40. >
  41. </div>
  42. <div class="item-img">
  43. <img src="../assets/network.png" alt="" />
  44. <span class="text">
  45. 文章发布量 <br /><span class="count">{{
  46. form.article_total
  47. }}</span></span
  48. >
  49. </div>
  50. </div>
  51. <div class="header-item">
  52. <div class="item-text">
  53. <div>
  54. <span class="text">会议举办次数</span
  55. ><span class="count">{{ form.conference_total }}</span>
  56. </div>
  57. <div>
  58. <span class="text">活动举办次数</span>
  59. <span class="count">{{ form.activity_total }}</span>
  60. </div>
  61. </div>
  62. <div class="item-text">
  63. <div>
  64. <span class="text">总阅读次数</span
  65. ><span class="count">{{ form.article_readnum }}</span>
  66. </div>
  67. <div>
  68. <span class="text">转发次数</span
  69. ><span class="count">{{ form.article_forwardnum }}</span>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="header-item" style="position: relative">
  74. <span style="position: absolute; top: 0; left: 5px; color: #666"
  75. >搜索热词</span
  76. >
  77. <wordcloud
  78. v-if="form.search_hot_word"
  79. style="width: 80%; height: 100px; margin-left: 20%"
  80. :data="form.search_hot_word"
  81. nameKey="name"
  82. :fontSize="[10, 24]"
  83. valueKey="value"
  84. :color="myColors"
  85. :showTooltip="false"
  86. >
  87. </wordcloud>
  88. </div>
  89. </div>
  90. <div class="index-main">
  91. <div class="main-item">
  92. <div class="item-title">期刊统计</div>
  93. <div class="item-more" style="cursor:pointer;" @click='$router.push({"path":"/journal/journal"})'>查看更多>></div>
  94. </div>
  95. <div class="main-content">
  96. <div class="c1">
  97. <div class="c1-title">学科期刊分布</div>
  98. <div ref="subject" style="width: 100%; height: 250px"></div>
  99. </div>
  100. <div class="c2">
  101. <div class="c2-title">单位期刊统计</div>
  102. <div ref="company" style="width: 100%; height: 250px"></div>
  103. </div>
  104. <div class="c1">
  105. <div class="c1-title">期刊文章TOP5</div>
  106. <div ref="article" style="width: 100%; height: 250px"></div>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="index-main">
  111. <div class="main-item">
  112. <div class="item-title">文章统计</div>
  113. <div class="item-more" style="cursor:pointer;" @click='$router.push({"path":"/article/article"})'>查看更多>></div>
  114. </div>
  115. <div class="main-content">
  116. <div class="c1">
  117. <div class="c1-title">文章来源分析</div>
  118. <div ref="article_sorce" style="width: 100%; height: 250px"></div>
  119. </div>
  120. <div class="c2">
  121. <div class="c2-title">文章发布/时间统计</div>
  122. <div ref="article_time" style="width: 100%; height: 250px"></div>
  123. </div>
  124. <div class="c1">
  125. <div class="c1-title">文章阅读量TOP5</div>
  126. <div ref="article_ready" style="width: 100%; height: 250px">
  127. <div class="h2">
  128. <span>序号</span>
  129. <span>文章标题</span>
  130. <span>阅读次数</span>
  131. </div>
  132. <div
  133. class="con2"
  134. v-for="(item, index) in form.article_readnum_top5"
  135. :key="index"
  136. @click="getArticle(item.id),open=true"
  137. >
  138. <span>{{ index + 1 }}</span>
  139. <span class="a_title">{{ item.name }}</span>
  140. <span>{{ item.read_num }}</span>
  141. </div>
  142. <div></div>
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. <div class="index-main">
  148. <div class="main-item">
  149. <div class="item-title">会议统计</div>
  150. <div class="item-more" style="cursor:pointer;" @click='$router.push({"path":"/conference/conference"})'>查看更多>></div>
  151. </div>
  152. <div class="main-content">
  153. <div class="c1">
  154. <div class="c1-title">会议主办方统计</div>
  155. <div ref="meet_count" style="width: 100%; height: 250px"></div>
  156. </div>
  157. <div class="c1">
  158. <div class="c2-title">会议发布/时间统计</div>
  159. <div ref="meet_time" style="width: 100%; height: 250px"></div>
  160. </div>
  161. </div>
  162. </div>
  163. <el-dialog
  164. title=""
  165. :visible.sync="open"
  166. width="414px">
  167. <div class="preview">
  168. <p class="aname">{{article.name}}</p>
  169. <div class="ainfo">
  170. <img width="100" :src="article.img" alt="">
  171. <p>
  172. 发布单位:{{journal_name}} <br>
  173. 作者:{{article.author}} <br>
  174. 发表时间:{{article.publish_time}}
  175. </p>
  176. </div>
  177. <b>文章简介</b>
  178. <div class="adesc">{{article.desc}}</div>
  179. <b>文章内容</b>
  180. <div v-html="article.content"></div>
  181. </div>
  182. <!-- <span slot="footer" class="dialog-footer">
  183. <el-button type="primary" @click="open = false">确 定</el-button>
  184. </span> -->
  185. </el-dialog>
  186. </section>
  187. <!-- 期刊管理员首页 -->
  188. <section v-else>
  189. <CASCI></CASCI>
  190. </section>
  191. </template>
  192. <script>
  193. import echarts from "echarts";
  194. import wordcloud from "vue-wordcloud";
  195. import CASCI from '../components/CASCI'
  196. export default {
  197. data() {
  198. return {
  199. // chartData: [],
  200. open:false,
  201. form: {},
  202. article:{},
  203. list: [
  204. { article_header: "中国生态效率时空演化研究", count: "132" },
  205. { article_header: "中国生态效率时空演化研究", count: "132" },
  206. { article_header: "中国生态效率时空演化研究", count: "132" },
  207. { article_header: "中国生态效率时空演化研究", count: "132" },
  208. { article_header: "中国生态效率时空演化研究", count: "132" },
  209. ],
  210. myColors: ["#1f77b4", "#629fc9", "#94bedb", "#c9e0ef"],
  211. role_id:1
  212. };
  213. },
  214. components: {
  215. wordcloud,
  216. CASCI
  217. },
  218. computed: {},
  219. methods: {
  220. getEcharts() {
  221. var myChart = this.$echarts.init(this.$refs.subject);
  222. var myChart1 = this.$echarts.init(this.$refs.company);
  223. var myChart2 = this.$echarts.init(this.$refs.article);
  224. var myChart3 = this.$echarts.init(this.$refs.article_sorce);
  225. var myChart4 = this.$echarts.init(this.$refs.article_time);
  226. var myChart5 = this.$echarts.init(this.$refs.meet_count);
  227. var myChart6 = this.$echarts.init(this.$refs.meet_time);
  228. // 学科期刊
  229. let option = {
  230. backgroundColor: "#fff",
  231. // title: {
  232. // text: 'Customized Pie',
  233. // left: 'center',
  234. // top: 20,
  235. // textStyle: {
  236. // color: '#ccc'
  237. // }
  238. // },
  239. color: ["#9379ff", "#62A2FF", "#FFD053", "#FF9F41", "#FF542C"],
  240. tooltip: {
  241. trigger: "item",
  242. formatter: "{a} <br/>{b} : {c} ({d}%)",
  243. },
  244. // visualMap: {
  245. // show: false,
  246. // min: 80,
  247. // max: 600,
  248. // inRange: {
  249. // colorLightness: [0, 1]
  250. // }
  251. // },
  252. series: [
  253. {
  254. name: "期刊数量",
  255. type: "pie",
  256. radius: "55%",
  257. center: ["50%", "50%"],
  258. // data: [
  259. // { value: 335, name: "直接访问" },
  260. // { value: 310, name: "邮件营销" },
  261. // { value: 274, name: "联盟广告" },
  262. // { value: 235, name: "视频广告" },
  263. // { value: 400, name: "搜索引擎" },
  264. // ].sort(function (a, b) {
  265. // return a.value - b.value;
  266. // }),
  267. data: this.form.subject_journal.sort(function (a, b) {
  268. return a.value - b.value;
  269. }),
  270. roseType: "radius",
  271. label: {
  272. color: "rgba(102, 102, 102,1)",
  273. fontSize: 14,
  274. },
  275. labelLine: {
  276. lineStyle: {
  277. color: "rgba(000, 000, 000, 0.1)",
  278. },
  279. smooth: 0.2,
  280. length: 8,
  281. length2: 5,
  282. },
  283. itemStyle: {
  284. // color: '#c23531',
  285. // shadowBlur: 200,
  286. // shadowColor: 'rgba(0, 0, 0, 0.5)'
  287. },
  288. animationType: "scale",
  289. animationEasing: "elasticOut",
  290. animationDelay: function (idx) {
  291. return Math.random() * 200;
  292. },
  293. },
  294. ],
  295. };
  296. // 单位期刊统计
  297. let option1 = {
  298. color: ["#5066FF"],
  299. tooltip: {
  300. trigger: "axis",
  301. axisPointer: {
  302. // 坐标轴指示器,坐标轴触发有效
  303. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  304. },
  305. },
  306. grid: {
  307. left: "3%",
  308. right: "4%",
  309. bottom: "3%",
  310. top: "10%",
  311. containLabel: true,
  312. },
  313. xAxis: [
  314. {
  315. type: "category",
  316. // data: ["Mon", "Tue", "Wed", "Thu"],
  317. data: this.form.organizer_journal_x,
  318. axisTick: {
  319. alignWithLabel: true,
  320. },
  321. axisLine: {
  322. lineStyle: {
  323. color: "#D4D8EE",
  324. width: 2,
  325. type: "dotted",
  326. },
  327. },
  328. axisLabel: {
  329. formatter: function (val) {
  330. // return "中国科"; //对每个标签处理后的结果(通过js字符串方法处理)
  331. return val;
  332. },
  333. // x轴字体颜色
  334. textStyle: {
  335. color: "#999999",
  336. // lineHeight: 20,
  337. fontSize: 12,
  338. },
  339. align: "center",
  340. // padding:[10,0 ,0,-40],
  341. },
  342. },
  343. ],
  344. yAxis: [
  345. {
  346. type: "value",
  347. boundaryGap: ["0%", "20%"],
  348. axisTick: {
  349. show: false,
  350. },
  351. axisLine: {
  352. show: false,
  353. },
  354. axisLabel: {
  355. show: true,
  356. textStyle: {
  357. color: "#666666", //更改坐标轴文字颜色
  358. fontSize: 14, //更改坐标轴文字大小
  359. },
  360. },
  361. splitLine: {
  362. show: true,
  363. lineStyle: {
  364. type: "dashed",
  365. },
  366. },
  367. // data:['0' , '100' , '200' , '300,400]
  368. },
  369. ],
  370. series: [
  371. {
  372. name: "期刊数量",
  373. type: "bar",
  374. barWidth: "40%",
  375. // data: [10, 52, 200, 334],
  376. data: this.form.organizer_journal_y,
  377. itemStyle: {
  378. //柱形图圆角,鼠标移上去效果,如果只是一个数字则说明四个参数全部设置为那么多
  379. normal: {
  380. //柱形图圆角,初始化效果
  381. barBorderRadius: [10, 10, 10, 10],
  382. },
  383. },
  384. },
  385. ],
  386. };
  387. // 期刊文章前5
  388. let option2 = {
  389. // title: {
  390. // text: '世界人口总量',
  391. // subtext: '数据来自网络'
  392. // },
  393. tooltip: {
  394. trigger: "axis",
  395. axisPointer: {
  396. type: "shadow",
  397. },
  398. },
  399. // legend: {
  400. // data: ['2011年', '2012年']
  401. // },
  402. grid: {
  403. left: "3%",
  404. right: "4%",
  405. bottom: "3%",
  406. top: "10%",
  407. containLabel: true,
  408. },
  409. xAxis: {
  410. type: "value",
  411. show: false,
  412. // boundaryGap: ['0', '50%']
  413. },
  414. yAxis: {
  415. // show:false,
  416. type: "category",
  417. axisTick: {
  418. show: false,
  419. },
  420. axisLine: {
  421. show: false,
  422. },
  423. // data: ["应用物理", "应用物理", "应用物理", "应用物理", "应用物理"],
  424. data: this.form.journal_article_x,
  425. },
  426. series: [
  427. // {
  428. // name: '2011年',
  429. // type: 'bar',
  430. // data: [18203, 23489, 29034, 104970, 131744]
  431. // },
  432. {
  433. name: "文章数量",
  434. type: "bar",
  435. // data: [19325, 23438, 31000, 121594, 134141],
  436. data: this.form.journal_article_y,
  437. barWidth: "30%",
  438. itemStyle: {
  439. //柱形图圆角,鼠标移上去效果,如果只是一个数字则说明四个参数全部设置为那么多
  440. normal: {
  441. //柱形图圆角,初始化效果
  442. barBorderRadius: [10, 10, 10, 10],
  443. color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
  444. {
  445. offset: 0,
  446. color: "#FF852C",
  447. },
  448. {
  449. offset: 1,
  450. color: "#FFCF29",
  451. },
  452. ]),
  453. label: {
  454. show: true, //开启显示
  455. position: "right", //在上方显示
  456. textStyle: {
  457. //数值样式
  458. color: "#666666",
  459. fontSize: 14,
  460. },
  461. },
  462. },
  463. },
  464. },
  465. ],
  466. };
  467. // 文章来源分布
  468. let option3 = {
  469. backgroundColor: "#fff",
  470. // title: {
  471. // text: 'Customized Pie',
  472. // left: 'center',
  473. // top: 20,
  474. // textStyle: {
  475. // color: '#ccc'
  476. // }
  477. // },
  478. color: ["#FA9022", "#DCDB01", "#8C70F8", "#34A6FE", "#2A4AD1"],
  479. tooltip: {
  480. trigger: "item",
  481. formatter: "{a} <br/>{b} : {c} ({d}%)",
  482. },
  483. // visualMap: {
  484. // show: false,
  485. // min: 80,
  486. // max: 600,
  487. // inRange: {
  488. // colorLightness: [0, 1]
  489. // }
  490. // },
  491. series: [
  492. {
  493. name: "访问来源",
  494. type: "pie",
  495. radius: "55%",
  496. center: ["50%", "50%"],
  497. // data: [
  498. // { value: 335, name: "直接访问" },
  499. // { value: 310, name: "邮件营销" },
  500. // { value: 274, name: "联盟广告" },
  501. // { value: 235, name: "视频广告" },
  502. // { value: 400, name: "搜索引擎" },
  503. // ].sort(function (a, b) {
  504. // return a.value - b.value;
  505. // }),
  506. // data:this.form.journal_article.sort(function(a,b){return a.value-b.value}),
  507. data: this.form.journal_article,
  508. roseType: "radius",
  509. label: {
  510. color: "rgba(102, 102, 102,1)",
  511. fontSize: 14,
  512. },
  513. labelLine: {
  514. lineStyle: {
  515. color: "rgba(000, 000, 000, 0.1)",
  516. },
  517. smooth: 0.2,
  518. length: 8,
  519. length2: 5,
  520. },
  521. itemStyle: {
  522. // color: '#c23531',
  523. // shadowBlur: 200,
  524. // shadowColor: 'rgba(0, 0, 0, 0.5)'
  525. },
  526. animationType: "scale",
  527. animationEasing: "elasticOut",
  528. animationDelay: function (idx) {
  529. return Math.random() * 200;
  530. },
  531. },
  532. ],
  533. };
  534. // 文章分布/时间统计
  535. let option4 = {
  536. color: "#FFB81E",
  537. grid: {
  538. left: "3%",
  539. right: "4%",
  540. bottom: "3%",
  541. top: "10%",
  542. containLabel: true,
  543. },
  544. xAxis: {
  545. type: "category",
  546. boundaryGap: false,
  547. axisLine: {
  548. lineStyle: {
  549. color: "#D4D8EE",
  550. width: 2,
  551. // type:'dotted',
  552. },
  553. },
  554. // data: ["1", "2", "3", "", "", "", ""],
  555. data: this.form.pubtime_article_x,
  556. axisLabel: {
  557. formatter: function (val) {
  558. // return "中国科学院成都生物研究所 中国科学院成都生物研究所"; //对每个标签处理后的结果(通过js字符串方法处理)
  559. return val;
  560. },
  561. // x轴字体颜色
  562. textStyle: {
  563. color: "#999999",
  564. // lineHeight: 20,
  565. // fontSize: 12
  566. },
  567. align: "left",
  568. // padding:[10,0 ,0,-40],
  569. },
  570. },
  571. yAxis: {
  572. type: "value",
  573. splitLine: {
  574. show: true,
  575. lineStyle: {
  576. type: "dashed",
  577. },
  578. },
  579. axisTick: {
  580. show: false,
  581. interval: 100,
  582. },
  583. axisLine: {
  584. show: false,
  585. },
  586. boundaryGap: ["0%", "30%"],
  587. },
  588. series: [
  589. {
  590. // data: [50, 200, 20, 300, 150, 300, 100],
  591. data: this.form.pubtime_article_y,
  592. type: "line",
  593. symbol: "none", //取消折点圆圈
  594. areaStyle: {
  595. color: {
  596. type: "linear",
  597. x: 0,
  598. y: 0,
  599. x2: 0,
  600. y2: 1,
  601. colorStops: [
  602. {
  603. offset: 0,
  604. color: "#FFC765", // 0% 处的颜色
  605. },
  606. {
  607. offset: 1,
  608. color: "#ffffff", // 100% 处的颜色
  609. },
  610. ],
  611. global: false, // 缺省为 false
  612. },
  613. },
  614. smooth: true,
  615. },
  616. ],
  617. };
  618. // 会议主办方统计
  619. let option5 = {
  620. color: ["#5066FF"],
  621. tooltip: {
  622. trigger: "axis",
  623. axisPointer: {
  624. // 坐标轴指示器,坐标轴触发有效
  625. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  626. },
  627. },
  628. grid: {
  629. left: "3%",
  630. right: "4%",
  631. bottom: "3%",
  632. top: "10%",
  633. containLabel: true,
  634. },
  635. xAxis: [
  636. {
  637. type: "category",
  638. // data: ["", "", "", "", "", ""],
  639. data: this.form.organizer_conference_x,
  640. axisTick: {
  641. alignWithLabel: true,
  642. },
  643. axisLine: {
  644. lineStyle: {
  645. color: "#D4D8EE",
  646. width: 2,
  647. type: "dotted",
  648. },
  649. },
  650. axisLabel: {
  651. formatter: function (val) {
  652. // return "中国科"; //对每个标签处理后的结果(通过js字符串方法处理)
  653. return val;
  654. },
  655. // x轴字体颜色
  656. textStyle: {
  657. color: "#999999",
  658. // lineHeight: 20,
  659. fontSize: 12,
  660. },
  661. align: "center",
  662. // padding:[10,0 ,0,-40],
  663. },
  664. },
  665. ],
  666. yAxis: [
  667. {
  668. type: "value",
  669. boundaryGap: ["0%", "20%"],
  670. axisTick: {
  671. show: false,
  672. },
  673. axisLine: {
  674. show: false,
  675. },
  676. axisLabel: {
  677. show: true,
  678. textStyle: {
  679. color: "#666666", //更改坐标轴文字颜色
  680. fontSize: 14, //更改坐标轴文字大小
  681. },
  682. },
  683. splitLine: {
  684. show: true,
  685. lineStyle: {
  686. type: "dashed",
  687. },
  688. },
  689. // data:['0' , '100' , '200' , '300,400]
  690. },
  691. ],
  692. series: [
  693. {
  694. name: "会议数量",
  695. type: "bar",
  696. barWidth: "40%",
  697. // data: [50, 52, 200, 334, 45, 190, 240],
  698. data: this.form.organizer_conference_y,
  699. itemStyle: {
  700. //柱形图圆角,鼠标移上去效果,如果只是一个数字则说明四个参数全部设置为那么多
  701. normal: {
  702. //柱形图圆角,初始化效果
  703. barBorderRadius: [10, 10, 10, 10],
  704. },
  705. },
  706. },
  707. ],
  708. };
  709. // 会议发布/时间统计
  710. let option6 = {
  711. color: "#FFB81E",
  712. grid: {
  713. left: "3%",
  714. right: "4%",
  715. bottom: "3%",
  716. top: "10%",
  717. containLabel: true,
  718. },
  719. xAxis: {
  720. type: "category",
  721. boundaryGap: false,
  722. axisLine: {
  723. lineStyle: {
  724. color: "#D4D8EE",
  725. width: 2,
  726. // type:'dotted',
  727. },
  728. },
  729. // data: ["1", "1", "1", "1", "1", "1", "1"],
  730. data: this.form.pubtime_conference_x,
  731. axisLabel: {
  732. formatter: function (val) {
  733. return val;
  734. },
  735. // x轴字体颜色
  736. textStyle: {
  737. color: "#999999",
  738. // lineHeight: 20,
  739. // fontSize: 12
  740. },
  741. align: "left",
  742. // padding:[10,0 ,0,-40],
  743. },
  744. },
  745. yAxis: {
  746. type: "value",
  747. splitLine: {
  748. show: true,
  749. lineStyle: {
  750. type: "dashed",
  751. },
  752. },
  753. axisTick: {
  754. show: false,
  755. interval: 100,
  756. },
  757. axisLine: {
  758. show: false,
  759. },
  760. boundaryGap: ["0%", "30%"],
  761. },
  762. series: [
  763. {
  764. // data: [50, 200, 20, 300, 150, 300, 100],
  765. data: this.form.pubtime_conference_y,
  766. type: "line",
  767. symbol: "none", //取消折点圆圈
  768. areaStyle: {
  769. color: {
  770. type: "linear",
  771. x: 0,
  772. y: 0,
  773. x2: 0,
  774. y2: 1,
  775. colorStops: [
  776. {
  777. offset: 0,
  778. color: "#FFC765", // 0% 处的颜色
  779. },
  780. {
  781. offset: 1,
  782. color: "#ffffff", // 100% 处的颜色
  783. },
  784. ],
  785. global: false, // 缺省为 false
  786. },
  787. },
  788. smooth: true,
  789. },
  790. ],
  791. };
  792. myChart.setOption(option);
  793. myChart1.setOption(option1);
  794. myChart2.setOption(option2);
  795. myChart3.setOption(option3);
  796. myChart4.setOption(option4);
  797. myChart5.setOption(option5);
  798. myChart6.setOption(option6);
  799. },
  800. getData() {
  801. this.$api.getIndexData({}).then((res) => {
  802. this.form = res.data.data;
  803. this.form.search_hot_word = this.form.search_hot_word.concat(
  804. this.form.search_hot_word
  805. );
  806. let organizer_journal_x = [];
  807. let organizer_journal_y = [];
  808. let journal_article_x = [];
  809. let journal_article_y = [];
  810. let pubtime_article_x = [];
  811. let pubtime_article_y = [];
  812. let organizer_conference_x = [];
  813. let organizer_conference_y = [];
  814. let pubtime_conference_x = [];
  815. let pubtime_conference_y = [];
  816. this.form.organizer_journal.forEach((item, index) => {
  817. organizer_journal_x.push(item.name);
  818. organizer_journal_y.push(item.value);
  819. });
  820. this.form.journal_article_top5.forEach((item, index) => {
  821. journal_article_x.push(item.journal_name);
  822. journal_article_y.push(item.count);
  823. });
  824. this.form.pubtime_article.forEach((item, index) => {
  825. pubtime_article_x.push(item.publish_time);
  826. pubtime_article_y.push(item.count);
  827. });
  828. this.form.organizer_conference.forEach((item, index) => {
  829. organizer_conference_x.push(item.organizer_name);
  830. organizer_conference_y.push(item.count);
  831. });
  832. this.form.pubtime_conference.forEach((item, index) => {
  833. pubtime_conference_x.push(item.publish_time);
  834. pubtime_conference_y.push(item.count);
  835. });
  836. this.form.organizer_journal_x = organizer_journal_x;
  837. this.form.organizer_journal_y = organizer_journal_y;
  838. this.form.journal_article_x = journal_article_x.reverse();
  839. this.form.journal_article_y = journal_article_y.reverse();
  840. this.form.pubtime_article_x = pubtime_article_x;
  841. this.form.pubtime_article_y = pubtime_article_y;
  842. this.form.organizer_conference_x = organizer_journal_x;
  843. this.form.organizer_conference_y = organizer_journal_y;
  844. this.form.pubtime_conference_x = pubtime_conference_x;
  845. this.form.pubtime_conference_y = pubtime_conference_y;
  846. this.getEcharts();
  847. });
  848. },
  849. getArticle(id){
  850. this.article={};
  851. this.$api.getArticle({ id: id }).then((res) => {
  852. this.article = res.data.data;
  853. });
  854. }
  855. },
  856. mounted() {},
  857. beforeCreate(){
  858. this.$api.getAccountInfo().then((res) => {
  859. this.role_id = res.data.data.role_id;
  860. // this.getData();
  861. // var color = [];
  862. // for (let i = 0; i < 5; i++) {
  863. // let c =
  864. // "rgb(" +
  865. // [
  866. // Math.round(Math.random() * 160),
  867. // Math.round(Math.random() * 160),
  868. // Math.round(Math.random() * 160),
  869. // ].join(",") +
  870. // ")";
  871. // color.push(c);
  872. // }
  873. // this.myColors = color;
  874. });
  875. },
  876. created() {
  877. this.$api.getAccountInfo().then((res) => {
  878. this.role_id = res.data.data.role_id;
  879. this.getData();
  880. var color = [];
  881. for (let i = 0; i < 5; i++) {
  882. let c =
  883. "rgb(" +
  884. [
  885. Math.round(Math.random() * 160),
  886. Math.round(Math.random() * 160),
  887. Math.round(Math.random() * 160),
  888. ].join(",") +
  889. ")";
  890. color.push(c);
  891. }
  892. this.myColors = color;
  893. });
  894. },
  895. };
  896. </script>
  897. <style lang='scss' scoped>
  898. section {
  899. // width:100%;
  900. .index_header {
  901. background: #ffffff;
  902. height: 102px;
  903. border-radius: 10px;
  904. display: flex;
  905. align-items: center;
  906. .header-item {
  907. flex: 1;
  908. display: flex;
  909. justify-content: space-evenly;
  910. align-items: center;
  911. height: 56px;
  912. &:not(:last-child) {
  913. border-right: 1px solid #d8d8d8;
  914. }
  915. .text {
  916. font-size: 16px;
  917. color: #666666;
  918. }
  919. .count {
  920. font-size: 32px;
  921. }
  922. .item-img {
  923. display: flex;
  924. img {
  925. width: 56px;
  926. height: 56px;
  927. margin-right: 30px;
  928. }
  929. .text {
  930. position: relative;
  931. top: -8px;
  932. }
  933. .count {
  934. color: #208cfe;
  935. position: relative;
  936. bottom: -11px;
  937. }
  938. }
  939. .item-text {
  940. & > div {
  941. display: flex;
  942. align-items: center;
  943. .text {
  944. width: 120px;
  945. }
  946. }
  947. }
  948. }
  949. }
  950. .index-main {
  951. background: #ffffff;
  952. border-radius: 10px;
  953. margin-top: 20px;
  954. padding: 20px;
  955. .main-item {
  956. position: relative;
  957. .item-title {
  958. font-size: 18px;
  959. font-weight: bold;
  960. color: #333333;
  961. margin-bottom: 20px;
  962. }
  963. .item-more {
  964. position: absolute;
  965. top: 20px;
  966. right: 20px;
  967. font-size: 14px;
  968. color: #3895fe;
  969. }
  970. }
  971. .main-content {
  972. display: flex;
  973. & > div:not(:last-child) {
  974. border-right: 1px solid #eee;
  975. }
  976. .c1 {
  977. flex: 1;
  978. .h2 {
  979. font-size: 14px;
  980. color: #999999;
  981. height: 40px;
  982. line-height: 40px;
  983. width: 80%;
  984. span:nth-of-type(2) {
  985. margin-left: 20px;
  986. }
  987. span:last-child {
  988. float: right;
  989. }
  990. }
  991. .con2 {
  992. font-size: 14px;
  993. color: #333333;
  994. height: 36px;
  995. line-height: 36px;
  996. background: #fafafa;
  997. border-radius: 7px;
  998. margin-bottom: 8px;
  999. padding: 0 10px;
  1000. display: flex;
  1001. width: 80%;
  1002. cursor: pointer;
  1003. &:nth-of-type(2) {
  1004. color: #ef3d3d;
  1005. }
  1006. &:nth-of-type(3) {
  1007. color: #fdad23;
  1008. }
  1009. &:nth-of-type(4) {
  1010. color: #56ccf6;
  1011. }
  1012. span:nth-of-type(2) {
  1013. margin-left: 20px;
  1014. }
  1015. span:last-child {
  1016. float: right;
  1017. }
  1018. .a_title {
  1019. white-space: nowrap;
  1020. text-overflow: ellipsis;
  1021. overflow: hidden;
  1022. width: 80%;
  1023. }
  1024. }
  1025. }
  1026. .c2 {
  1027. flex: 1.5;
  1028. }
  1029. .c1,
  1030. .c2 {
  1031. width: 100%;
  1032. // flex:1;
  1033. padding: 10px;
  1034. box-sizing: border-box;
  1035. }
  1036. .c1-title,
  1037. .c2-title {
  1038. font-size: 15px;
  1039. font-weight: bold;
  1040. color: #666666;
  1041. // margin-top:20px;
  1042. }
  1043. }
  1044. }
  1045. }
  1046. </style>