RealTimeInfoJournaldetails.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <template>
  2. <div>
  3. <div class="autoBox box" style="padding-top: 0;">
  4. <div class="crumbs">
  5. <el-breadcrumb separator="/" style="float: left;line-height: 40px;">
  6. <el-breadcrumb-item :to="{ path: 'home' }">{{$t('common.Home')}}</el-breadcrumb-item>
  7. <el-breadcrumb-item :to="{ path: 'realTimeInfo' }">{{$t('common.InformationData')}}</el-breadcrumb-item>
  8. <el-breadcrumb-item>{{$t('common.Journal')}}</el-breadcrumb-item>
  9. </el-breadcrumb>
  10. </div>
  11. </div>
  12. <div class="journalDetail autoBox box">
  13. <div class="details">
  14. <div style="width:246px;height: 300px;display: inline;float: left;">
  15. <img :src="'api/file/pub/' + infojournal.photo" alt="" style="width: 100%;height: 100%;">
  16. </div>
  17. <div style="display: inline;height: 339px;float: left;width: 726px;padding-left: 46px;">
  18. <div class="detailList">
  19. <span>{{$t('common.Journalname')}}:</span>
  20. <p>{{infojournal.categoryName}}</p>
  21. </div>
  22. <div class="detailList">
  23. <span>{{$t('common.Organizer')}}:</span>
  24. <p>{{infojournal.hostUnit}}</p>
  25. </div>
  26. <div class="detailList">
  27. <span>{{$t('common.Numberofperiods')}}:</span>
  28. <p>{{infoJournalViews?infoJournalViews.length:0}}</p>
  29. </div>
  30. <div class="detailList">
  31. <span>{{$t('common.intro')}}:</span>
  32. <p style="cursor: pointer;-webkit-box-orient: vertical;
  33. position:relative;
  34. line-height:1.4em;
  35. overflow: hidden;
  36. height:5.6em;" class="plate"
  37. @click="dialogVisibleChange"
  38. >{{infojournal.introduce}}</p>
  39. </div>
  40. </div>
  41. </div>
  42. <div style="width: 100%;margin-top: 20px;margin-left: 50px;">
  43. <div>
  44. <span v-for="(item,key) in eveYears" :class="i==item?'years2 cursor':'years1 cursor'"
  45. @click="years(item,index)">{{item}}
  46. <!-- <span v-for="(item,index) in value">{{item.name}}</span> -->
  47. </span>
  48. </div>
  49. </div>
  50. <div style="margin: 66px 50px 0px 50px">
  51. <div style="display: flex;justify-content: flex-start;flex-wrap:wrap;padding-bottom:40px;overflow: hidden;">
  52. <div style="width: 18%;margin-right: 20px;" v-for="(item,index) in recommend2[i]" @click="open(item.link)">
  53. <img :src="'api/file/pub/' + item.pictureUrl" alt="" style="width:100%;height:230px" >
  54. <div style="text-align: center;">
  55. <div style="width: 8px;height: 8px;background: #12559c;display: inline-block;margin-left: 10px;"></div>
  56. <span style="font-size:12px">{{item.name}} </span>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. <!-- <div style="width: 100%;position: relative;height: 100px;">
  62. <div style="position: absolute;left: 50%;top: 0;transform: translateX(-50%);">
  63. <el-pagination
  64. background
  65. layout="prev, pager, next"
  66. @current-change="handleCurrentChange"
  67. >
  68. </el-pagination>
  69. </div>
  70. </div> -->
  71. <el-dialog
  72. :title="$t('common.InformationDetails')"
  73. :visible.sync="dialogVisible"
  74. width="30%">
  75. <span style="line-height: 29px;font-size: 18px;">{{infojournal.introduce}}</span>
  76. </el-dialog>
  77. </div>
  78. </div>
  79. </template>
  80. <script>
  81. import {getInfoJournalViews,get,saveOrUpdate} from '@/api/realTimeInfo/infoJournalView'
  82. import { getDicts } from "@/api/dict";
  83. import {getJournalClassifications} from '@/api/realTimeInfo/journalClassification'
  84. export default {
  85. data(){
  86. return {
  87. index:1,
  88. i:null,
  89. id:this.$route.params.key,
  90. subscript:this.$route.params.index,
  91. eveYears:[],
  92. recommend2:[],
  93. dialogVisible:false,
  94. total:0,
  95. infoJournalViews:[],
  96. screen1:[],
  97. type:[],
  98. infojournal:{}
  99. }
  100. },
  101. mounted(){
  102. this.getList();
  103. this.getData(); // 获取字典值
  104. },
  105. watch:{
  106. '$i18n.locale'(){
  107. this.getList();
  108. this.getData();
  109. }
  110. },
  111. methods:{
  112. getData(){
  113. getDicts(this.$i18n.locale=='zh'?"JOURNAL_DICT,JOURNAL_LANGUAGE_DICT":"JOURNAL_DICT_EN,JOURNAL_LANGUAGE_DICT_EN").then(res=>{
  114. // this.$i18n.locale=='en'?"CMS_INFORMATION_TYPE_DICT_EN":"CMS_INFORMATION_TYPE_DICT"
  115. this.screen1=res.data[0];
  116. this.type=this.screen1.filter(item=>{
  117. return item.value==this.id
  118. })
  119. })
  120. },
  121. getList(){
  122. const that = this;
  123. let page={
  124. typeDict:this.id,
  125. languageDict:this.$i18n.locale.toUpperCase()
  126. }
  127. getJournalClassifications({languageDict:this.$i18n.locale.toUpperCase(),baseEntityId:this.id}).then(res =>{
  128. let data = res.data.journalClassifications;
  129. if(data){
  130. that.infojournal = data[0]
  131. }
  132. });
  133. getInfoJournalViews(page).then(res=>{
  134. console.log(res)
  135. if( JSON.stringify(res.data) !=="{}"){
  136. if(res.data){
  137. this.infoJournalViews=res.data.infoJournalViews;
  138. this.recommend2=res.data.yearMap || [];
  139. this.total=res.data.page?res.data.page.totalCount : 0;
  140. this.eveYears=[];
  141. for(let i in this.recommend2){
  142. this.eveYears.push(i);
  143. }
  144. this.eveYears.reverse();
  145. this.i=this.eveYears[0];
  146. }
  147. // this.getrecommendFlagList(page);// 获取推荐期刊
  148. }else {
  149. let language = this.$i18n.locale == 'zh'?'en':'zh';
  150. getInfoJournalViews({ typeDict:this.id,
  151. languageDict:language.toUpperCase()}).then(res => {
  152. if(res.data){
  153. this.infoJournalViews=res.data.infoJournalViews;
  154. this.recommend2=res.data.yearMap || [];
  155. this.total=res.data.page?res.data.page.totalCount : 0;
  156. this.eveYears=[];
  157. for(let i in this.recommend2){
  158. this.eveYears.push(i);
  159. }
  160. this.eveYears.reverse();
  161. this.i=this.eveYears[0];
  162. }
  163. })
  164. /*this.infoJournalViews=[];
  165. this.recommend2=[];
  166. this.total=0;
  167. this.eveYears=[];
  168. this.i=null;*/
  169. }
  170. })
  171. },
  172. dialogVisibleChange(){
  173. this.dialogVisible=true;
  174. },
  175. open(url){
  176. window.open(url);//在另外新建窗口中打开窗口
  177. },
  178. getIcon(id){
  179. if(id=='01'){
  180. return require("@/assets/img/realTimeInfo/"+'Member.png');
  181. }else if(id=='02'){
  182. return require("@/assets/img/realTimeInfo/"+'Journal.png');
  183. }else {
  184. return require("@/assets/img/realTimeInfo/"+'EnglishJournals.png');
  185. }
  186. },
  187. years(item,index){
  188. this.i=item
  189. },
  190. handleCurrentChange(val){
  191. }
  192. }
  193. }
  194. </script>
  195. <!-- Add "scoped" attribute to limit CSS to this component only -->
  196. <style scoped>
  197. .box {
  198. margin-top: 10px;
  199. background: #fff;
  200. /* border-bottom: 1px solid rgb(158, 158, 158); */
  201. /* height: 500px; */
  202. /* padding: 20px 0; */
  203. }
  204. .crumbs {
  205. width: 100%;
  206. height: 40px;
  207. margin-left: 10px;
  208. }
  209. .journalDetail {
  210. mine-height: 600px;
  211. /* padding: 0 10px; */
  212. }
  213. .details{
  214. height: 340px;
  215. margin: 0 50px;
  216. padding: 60px 0px;
  217. }
  218. .detailList{
  219. margin-bottom: 30px;
  220. white-space: 1px;
  221. }
  222. .detailList span{
  223. display: inline-block;
  224. /* width: 80px; */
  225. }
  226. .detailList p{
  227. display: inline;
  228. margin-left: 20px;
  229. }
  230. .years1 {
  231. padding: 10px 18px;
  232. font-size: 14px;
  233. background-color: #e8e8e8;
  234. color: #8fa0b4;
  235. }
  236. .years2 {
  237. padding: 10px 18px;
  238. font-size: 14px;
  239. background-color: #12559c;
  240. color: #fff;
  241. }
  242. </style>