Index.vue 30 KB

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