ResourceSharing2.vue 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991
  1. <template>
  2. <div class="autoBox box" style="min-height: 900px;position: relative;">
  3. <div class="crumbs" >
  4. <div style="overflow: hidden;height: 18px;" >
  5. <el-breadcrumb separator-class="el-icon-arrow-right" style="float: left;height: 18px;">
  6. <el-breadcrumb-item :to="{ path: 'home' }">{{$t('common.Home')}}</el-breadcrumb-item>
  7. <el-breadcrumb-item :to="{ path: 'resourceSharing' }" class="pointer">{{$t('common.ResourceSharing')}}</el-breadcrumb-item>
  8. </el-breadcrumb>
  9. <el-breadcrumb separator="/" style="float: right;height: 18px;" v-if="screenIndex=='0'">
  10. <span :class="screenIndex==index?'secNavActive':''"
  11. class="pointer"
  12. style="height: 18px;"
  13. @click="screenChange(item,index)"
  14. v-for="(item,index) in resourceSharingScreen" :key="item.label">
  15. &nbsp;&nbsp;{{$t(item.label)}} &nbsp;&nbsp;
  16. <span v-if="index+1!==resourceSharingScreen.length" style="color: #2c3e50">/</span></span>
  17. </el-breadcrumb>
  18. <el-breadcrumb separator="/" style="float: right;height: 18px;" v-if="screenIndex=='1'">
  19. <span :class="screenIndex==index?'secNavActive':''"
  20. class="pointer"
  21. style="height: 18px;"
  22. @click="screenChange(item,index)"
  23. v-for="(item,index) in resourceSharingScreen">
  24. &nbsp;&nbsp;{{$t(item.label)}} &nbsp;&nbsp;
  25. <span v-if="index+1!==resourceSharingScreen.length" style="color: #2c3e50">/</span></span>
  26. </el-breadcrumb>
  27. </div>
  28. </div>
  29. <div v-show="screenIndex==0" class="mainBody screen1">
  30. <div class="slideShow">
  31. <el-carousel :interval="5000" arrow="never" indicator-position="none">
  32. <el-carousel-item v-for="item in slideShowImg" :key="item">
  33. <div style="width: 100%; height: 100%;background-color: #ecedef;">
  34. <img v-show="slideShowImg!=undefined||slideShowImg!=false" :src="'api/file/pub/'+ item.carouselMapAddress" alt="" style="width: 100%; height: 100%;">
  35. <img v-show="slideShowImg==undefined||slideShowImg==false" src="../../assets/img/ResourceSharing/banner1.jpg" alt="" style="width: 100%; height: 100%;">
  36. <!--<div style="width: 920px;height:100%; float: left;">
  37. <img :src="'api/file/pub/'+ item.carouselMapAddress" alt="" style="width: 100%; height: 100%;">
  38. </div>
  39. <div style="width: 280px;height:100%;float: right;font-size: 14px;" class="activity">
  40. <div style="width: 100%;padding-left: 25px;box-sizing: border-box;color: #666666">
  41. <div v-show="item.name" style="font-size: 22px;font-weight: 600; margin: 40px 0 15px 5px">
  42. <span>{{item.name}}</span>
  43. </div>
  44. <div v-show="item.address" style="font-size: 16px;margin: 10px 0 20px 5px">
  45. <p style="margin: 0 0 5px 0;font-size: 16px;">{{$t('common.resourceAddress')}}:</p>
  46. <span>{{item.address}}</span>
  47. </div>
  48. <div v-show="item.affiliatedUnitName" style="font-size: 16px;margin: 10px 0 20px 5px">
  49. <p style="margin: 0 0 5px 0;font-size: 16px;">{{$t('common.resourceSubordinateUnits')}}:</p>
  50. <span>{{item.affiliatedUnitName}}</span>
  51. </div>
  52. &lt;!&ndash; <div v-show="item.researchType"><span>:</span><span>{{item.researchType}}</span></div>&ndash;&gt;
  53. &lt;!&ndash; <div v-show="item.createDate"><span>:</span><span>{{item.createDate}}</span></div>&ndash;&gt;
  54. </div>
  55. </div>
  56. <div style="clear: both;"></div>-->
  57. </div>
  58. </el-carousel-item>
  59. </el-carousel>
  60. </div>
  61. <div class="researchClassify" style="width: 98%; margin: 20px auto 0 auto;">
  62. <Screen v-bind:screen1="screen1" @screenBack="screenBack"></Screen>
  63. </div>
  64. <div class="researchClassify" style="width: 98%;background-color: white;margin: 5px auto 73px auto">
  65. <div style="width: 100%;height: 51px;">
  66. <div class="rankSearchPub">
  67. <!-- <div class="rank">-->
  68. <!-- <span :class="rankActive==0?'active':''" style="margin-right: 25px" @click="dataChangeByTime1">{{$t("common.resourceAccordingTime")}}</span>-->
  69. <!-- <span :class="rankActive==1?'active':''" style="margin-right: 25px" @click="dataChangeByHeat1">{{$t("common.resourceAccordingHeat")}}</span>-->
  70. <!-- </div>-->
  71. <div class="search" style="width: 270px;">
  72. <!-- <input type="text" style="width: 270px;" :placeholder="$t('common.resourceInputName')" onkeydown="dataChangeByName1" v-model="searchText1">-->
  73. <el-input v-model="searchText1" :placeholder="$t('common.resourceInputName')" @change="dataChangeByName1" style="width: 270px;"></el-input>
  74. <i style="position: absolute; right: 0;margin: 8px 8px 0 0;opacity: 0.5;" class="el-icon-search" @click="dataChangeByName1"></i>
  75. </div>
  76. <div class="publishing">
  77. <span style="color: #0091FF;font-size: 14px;line-height: 30px;" @click="toResultsIssue">{{$t("common.resourceResultsRelease")}}</span>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <div style="width: 98%; overflow: hidden;margin: auto;">
  83. <div v-show="cursorList1.length == 0 ||cursorList1.length == undefined" style="text-align: center;height: 60px;border-bottom: 1px solid #eee;border-top: 1px solid #eee;">
  84. <span v-show="language=='en'" style="line-height: 60px;">no data</span>
  85. <span v-show="language=='zh'" style="line-height: 60px;">暂无数据</span>
  86. </div>
  87. <div v-for="(item,index) in cursorList1" class="cursor"
  88. :style="{'margin-left':index%3==0 ? '0':'2.5%','margin-right':index%3==2 ? '0':'2.5%'}"
  89. @click="toDetails(item,index)"
  90. >
  91. <div v-if="item.informationVisibleStatus" style="width: 44px; height: 44px; position: absolute;top: 0;left: 0;">
  92. <!-- <span style="background: red">会员</span>-->
  93. <img src="@/assets/img/ResourceSharing/vip.jpg" alt="" style="width: 100%">
  94. </div>
  95. <div style="box-sizing: border-box;height: 100%">
  96. <div style="width: 85%; height: 288px; margin: 10px auto 10px auto;text-align: center;">
  97. <!-- <img :src="item.researchResultCover" alt="">-->
  98. <img :src="'api/file/pub/'+ item.researchResultCover" alt="" style="width: 208px; height: 288px;">
  99. </div>
  100. <div style="color: #333333">
  101. <div style="width: 100%;font-weight: 700; font-size: 20px;text-align: center; ">
  102. <span style="display: inline-block; width: 5%;margin: 14px 2px;overflow: hidden;">《</span>
  103. <span style="display: inline-block; max-width:85%;margin: 14px 0;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
  104. {{item.name}}
  105. </span>
  106. <span style="display: inline-block; width: 5%;margin: 14px 2px;overflow: hidden;">》</span>
  107. </div>
  108. <p style="margin:0 0 14px 0;text-align: center;color: #666666;">
  109. <span style="font-weight: 400; font-size: 16px;display: inline-block; max-width:85%;height: 24.8px;" class="oneLine">{{item.affiliatedUnitName}}</span>
  110. </p>
  111. <p style="margin: 14px 0 14px 0;color: #1890FF;text-align: center;">
  112. <span style="font-weight: 400; font-size: 16px;border: 1px solid #1890FF;padding: 2px 14px;box-sizing: border-box;">{{item.researchResultType}}</span>
  113. </p>
  114. <p style="margin: 14px 0 16px 0;text-align: center;">
  115. <span style="color: #666666;font-size: 14px;">{{item.createDate}}</span>
  116. </p>
  117. <div style="overflow: hidden;width: 100%;height: 46px;background: #F8F8F8;position: absolute;bottom: 0;left: 0">
  118. <div style="float: right;line-height: 46px;color: #333333;">
  119. <i class="el-icon-star-off" style="margin-right: 3px;vertical-align: middle;"></i>
  120. <!-- <span style="margin-right: 15px;vertical-align: middle;">{{item.likeNum}}</span>|-->
  121. <span style="margin-right: 15px;vertical-align: middle;">52346</span>
  122. <!-- <i class="el-icon-star-off" style="margin-right: 3px;vertical-align: middle;"></i>-->
  123. |<img src="@/assets/img/ResourceSharing/heat.png" alt="" style="width: 16px;height: 16px;margin: 0 3px 0 6px;vertical-align: middle;">
  124. <span style="margin-right: 30px;vertical-align: middle;">12594</span>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. <div style="width: 100%;position: relative;height: 100px;margin-bottom: 30px;">
  132. <el-pagination
  133. background
  134. style="height: 80px;position: absolute;left: 50%;top: 100px;transform: translate(-50%,-50%);"
  135. :current-page="page.results.currentPage"
  136. :page-sizes="[6, 12, 18, 24]"
  137. :page-size="page.results.pageSize"
  138. @current-change="handleCurrentChange1"
  139. layout="prev, pager, next"
  140. :total="page.results.totalPage-0"
  141. ></el-pagination>
  142. </div>
  143. </div>
  144. <div v-show="screenIndex==1" class="mainBody screen2">
  145. <div class="slideShow">
  146. <el-carousel :interval="5000" arrow="never" indicator-position="none">
  147. <el-carousel-item v-for="item in slideShowImg" :key="item">
  148. <div style="width: 100%; height: 100%;background-color: #ecedef;">
  149. <img v-show="slideShowImg!=undefined||slideShowImg!=false" :src="'api/file/pub/'+ item.carouselMapAddress" alt="" style="width: 100%; height: 100%;">
  150. <img v-show="slideShowImg==undefined||slideShowImg==false" src="../../assets/img/ResourceSharing/banner2.png" alt="" style="width: 100%; height: 100%;">
  151. <!--<div style="width: 920px;height:100%; float: left;">
  152. <img :src="'api/file/pub/'+ item.carouselMapAddress" alt="" style="width: 100%; height: 100%;">
  153. </div>
  154. <div style="width: 280px;height:100%;float: right;font-size: 14px;" class="activity">
  155. <div style="width: 100%;padding-left: 25px;box-sizing: border-box;color: #666666">
  156. <div v-show="item.name" style="font-size: 22px;font-weight: 600; margin: 40px 0 15px 5px">
  157. <span>{{item.name}}</span>
  158. </div>
  159. <div v-show="item.address" style="font-size: 16px;margin: 10px 0 20px 5px">
  160. <p style="margin: 0 0 5px 0;font-size: 16px;">{{$t('common.resourceAddress')}}:</p>
  161. <span>{{item.address}}</span>
  162. </div>
  163. <div v-show="item.affiliatedUnitName" style="font-size: 16px;margin: 10px 0 20px 5px">
  164. <p style="margin: 0 0 5px 0;font-size: 16px;">{{$t('common.resourceSubordinateUnits')}}:</p>
  165. <span>{{item.affiliatedUnitName}}</span>
  166. </div>
  167. </div>
  168. </div>
  169. <div style="clear: both;"></div>-->
  170. </div>
  171. </el-carousel-item>
  172. </el-carousel>
  173. </div>
  174. <div class="researchClassify" style="width: 98%; margin: 20px auto 0 auto;">
  175. <Screen v-bind:screen1="screen1" @screenBack="screenBack"></Screen>
  176. </div>
  177. <div class="researchClassify" style="width: 98%;background-color: white;margin: 5px auto 73px auto">
  178. <div style="width: 100%;height: 51px;">
  179. <div class="rankSearchPub">
  180. <!-- <div class="rank">-->
  181. <!-- <span :class="rankActive==0?'active':''" style="margin-right: 25px" @click="dataChangeByTime1">{{$t("common.resourceAccordingTime")}}</span>-->
  182. <!-- <span :class="rankActive==1?'active':''" style="margin-right: 25px" @click="dataChangeByHeat1">{{$t("common.resourceAccordingHeat")}}</span>-->
  183. <!-- </div>-->
  184. <div class="search" style="width: 270px;">
  185. <!-- <input type="text" style="width: 270px;" :placeholder="$t('common.resourceInputName')" onkeydown="dataChangeByName1" v-model="searchText1">-->
  186. <el-input v-model="searchText1" :placeholder="$t('common.resourceInputName')" @change="dataChangeByName1" style="width: 270px;"></el-input>
  187. <i style="position: absolute; right: 0;margin: 8px 8px 0 0;opacity: 0.5;font-size: 16px;" class="el-icon-search" @click="dataChangeByName1"></i>
  188. </div>
  189. <div class="publishing">
  190. <span style="color: #0091FF;font-size: 14px;line-height: 30px;" @click="toResultsIssue">{{$t("common.resourceResourceRelease")}}</span>
  191. </div>
  192. </div>
  193. </div>
  194. </div>
  195. <div style="width: 98%; overflow: hidden;margin: auto;">
  196. <div v-if="cursorList1">
  197. </div>
  198. <div v-for="(item,index) in cursorList2" class="cursor"
  199. :style="{'margin-left':index%3==0 ? '0':'2.5%','margin-right':index%3==2 ? '0':'2.5%'}"
  200. @click="toResourceDetails(item,index)"
  201. >
  202. <div style="box-sizing: border-box;height: 100%">
  203. <div>
  204. <!-- <img :src="item.researchResourcesMedia" alt="" width="100%">-->
  205. <img :src="'api/file/pub/'+ item.researchResourcesMedia" alt="" style="width: 100%; height: 260px;">
  206. </div>
  207. <div style="color: #333333;margin: 26px 0 0 0;">
  208. <h4 style="font-weight: 700; font-size: 20px; margin: 8px 24px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
  209. <span>{{item.name}}</span>
  210. </h4>
  211. <p style="margin: 8px 24px;color: #666666;">
  212. <i class="el-icon-office-building" style="margin-right: 3px;overflow: hidden"></i>
  213. <span style="font-weight: 400; font-size: 16px;display: inline-block;max-width: 92%" class="oneLine">{{item.affiliatedUnitName}}</span>
  214. </p>
  215. <p style="margin: 8px 24px;color: #666666;font-size: 16px;">
  216. <i class="el-icon-location-outline" style="margin-right: 3px;overflow: hidden"></i>
  217. <span style="font-weight: 400; font-size: 16px;display: inline-block;max-width: 92%" class="oneLine">{{item.address}}</span>
  218. </p>
  219. <p style="margin: 26px 24px 48px;color: #1890FF;">
  220. <span style="font-weight: 400; font-size: 16px;border: 1px solid #1890FF;padding: 1px 8px;box-sizing: border-box;">{{item.researchResourcesType}}</span>
  221. </p>
  222. <div style="overflow: hidden;width: 100%;height: 46px;background: #F8F8F8;position: absolute;bottom: 0;left: 0">
  223. <span style="color: #666666;font-size: 14px;line-height: 46px;margin-left: 32px">{{item.createDate}}</span>
  224. <div style="float: right;line-height: 46px;color: #333333;">
  225. <i class="el-icon-star-off" style="margin-right: 3px;vertical-align: middle;font-size: 16px;"></i>
  226. <!-- <span style="margin-right: 15px;vertical-align: middle;">{{item.likeNum}}</span>-->
  227. <span style="margin-right: 15px;vertical-align: middle;">52346</span>
  228. <!-- |<i class="el-icon-star-off" style="margin-right: 3px;vertical-align: middle;font-size: 16px;"></i>-->
  229. <!-- <span style="margin-right: 30px;vertical-align: middle;">{{item.heatNum}}</span>-->
  230. </div>
  231. </div>
  232. </div>
  233. </div>
  234. </div>
  235. </div>
  236. <div style="width: 100%;position: relative;height: 100px;margin-bottom: 30px;">
  237. <el-pagination
  238. background
  239. style="height: 80px;position: absolute;left: 50%;top: 100px;transform: translate(-50%,-50%);"
  240. :current-page="page.resource.currentPage"
  241. :page-sizes="[6, 12, 18, 24]"
  242. :page-size="page.resource.pageSize"
  243. @current-change="handleCurrentChange2"
  244. layout="prev, pager, next"
  245. :total="page.resource.totalPage-0"
  246. ></el-pagination>
  247. </div>
  248. </div>
  249. <!-- 登录提示-->
  250. <el-dialog
  251. :title="$i18n.locale=='zh'?'提示':'Reminder'"
  252. :visible.sync="toViewLogin"
  253. :width="$i18n.locale=='zh'?'500px':'750px'"
  254. :height="$i18n.locale=='zh'?'300px':'386px'"
  255. :before-close="toViewLoginChange"
  256. >
  257. <div style="width: 100%;height: 100%;">
  258. <img src="@/assets/img/loginTips.png" alt="" style="width: 180px;height: 180px;margin-left: 20px;">
  259. <div style="float: right;margin-right: 20px;" :style="$i18n.locale=='zh'?'width: 49%;margin-top: 10px;':'width: 453px;margin-top: -25px;'">
  260. <div style="font-size: 20px;font-weight: normal;color: #333333;
  261. font-family: HiraginoSansGB-W3, HiraginoSansGB;
  262. line-height: 40px;">
  263. {{$t('common.ReminderFirst')}}
  264. </div>
  265. <div style="font-size: 16px;font-family: HiraginoSansGB-W3, HiraginoSansGB;
  266. font-weight: normal;color: #666666;line-height: 30px;">
  267. {{$t('common.ReminderSecond')}} <span style="color: #0091FF;font-size: 18px;">{{num}}</span> {{$t('common.ReminderThird')}}
  268. </div>
  269. <div style="font-size: 14px;font-family: HiraginoSansGB-W3, HiraginoSansGB;
  270. font-weight: normal;color: #666666;line-height: 30px;">
  271. {{$t('common.ReminderForth')}}
  272. </div>
  273. <div style="font-size: 14px;font-family: HiraginoSansGB-W3, HiraginoSansGB;
  274. height:33px;line-height:60px;font-weight: normal;color: #0091FF;">
  275. <span style="margin-left: 40px;" class="cursor" @click="toView('login')">
  276. {{$t('common.ReminderFifth')}}
  277. </span>
  278. <span style="margin-left: 10px;" class="cursor" @click="toView('Register')">
  279. {{$t('common.ReminderSixth')}}
  280. </span>
  281. </div>
  282. </div>
  283. </div>
  284. </el-dialog>
  285. </div>
  286. </template>
  287. <script>
  288. import Base from "@/views/base/Base";
  289. import {getDicts,getDictByTypeValue} from '@/api/dict';
  290. import { getBaseResearchResultViews} from "@/api/research/baseResearchResultView";
  291. import { getBaseResearchResourcesViews} from "@/api/research/resource/baseResearchResourcesView";
  292. import { formatDate } from "@/utils/formatUtils";
  293. import Screen from "@/components/screen";
  294. export default {
  295. name: "resourceSharing2",
  296. components: { Screen},
  297. extends: Base,
  298. data () {
  299. return {
  300. num:5,
  301. timer:'',
  302. toViewLogin:false,
  303. language:this.$i18n.locale,
  304. params: {
  305. pageNo:'',
  306. pageSize:'',
  307. language:'',
  308. status:0,
  309. name:'',
  310. researchResultType:'',
  311. researchResourcesType:'',
  312. },
  313. screenIndex:0,//screen状态
  314. resourceSharingScreen:[
  315. {
  316. label:"common.ResearchResults",
  317. value:'0'
  318. },
  319. {
  320. label:"common.ResearchResources",
  321. value:'1'
  322. }
  323. ],
  324. page:{
  325. results:{
  326. currentPage: '',//当前页
  327. totalPage:'',//页数
  328. pageNo:1,
  329. pageSize:6,
  330. language:'',
  331. status:0,
  332. name:'',
  333. researchResultType:'',
  334. },
  335. resource:{
  336. currentPage: '',//当前页
  337. totalPage:'',//页数
  338. pageNo:1,
  339. pageSize:9,
  340. language:'',
  341. status:0,
  342. name:'',
  343. researchResourcesType:'',
  344. },
  345. },
  346. slideShowImg:[],
  347. slideShowImgFlag:0,
  348. classifySel1:-1,//子分类选中
  349. classifySel2:-1,//子分类选中
  350. classify1:'',
  351. classify2:'',
  352. rankActive:0,//时间、热度排行选中
  353. cursorList1:[],
  354. cursorList2:[],
  355. searchText1:'',
  356. searchText2:'',
  357. //Screen导航
  358. screen1:{
  359. value:'common.Category',
  360. item:[
  361. {
  362. value:null,
  363. ifValue:true,
  364. label:'common.All'
  365. },
  366. ]
  367. },
  368. }
  369. },
  370. mounted() {
  371. this.paramsScreen()
  372. this.initData();
  373. },
  374. watch:{
  375. '$i18n.locale'(){
  376. this.slideShowImgFlag=0;
  377. this.slideShowImg=[];
  378. this.initData();
  379. this.screen1 = {
  380. value:'common.Category',
  381. item:[
  382. {
  383. value:null,
  384. ifValue:true,
  385. label:'common.All'
  386. },
  387. ]
  388. }
  389. },
  390. 'screenIndex'(){
  391. this.initData();
  392. },
  393. "toViewLogin"(){
  394. if(this.toViewLogin==true){
  395. this.loginTipsChange()
  396. }
  397. },
  398. },
  399. methods:{
  400. initData(){
  401. this.getClassify();
  402. },
  403. paramsScreen(){
  404. if(this.$route.params.key){
  405. this.screenIndex = this.$route.params.key;
  406. }
  407. },
  408. toDetails(item,index){
  409. let params = {
  410. entityId:item.entityId,
  411. // researchResultFileId:item.researchResultFileId,
  412. }
  413. this.toView('resourceSharingDetails',params)
  414. },
  415. toResourceDetails(item,index){
  416. let params = {
  417. entityId:item.entityId,
  418. }
  419. this.toView('resourceSharingResourceDetails',params)
  420. },
  421. toResultsIssue(){
  422. if (!this.$Cookies.get('token')){
  423. this.toViewLogin = true;
  424. }else{
  425. this.toView('resourceSharingResultsIssue')
  426. }
  427. },
  428. toResourceIssue(){
  429. if (!this.$Cookies.get('token')){
  430. this.toViewLogin = true;
  431. }else{
  432. this.toView('resourceSharingResourceIssue')
  433. }
  434. },
  435. toView(router, json) {
  436. this.$router.push({ name: router, params: {key:json} });
  437. },
  438. screenChange(item,index) {
  439. this.screenIndex = index;
  440. this.screen1 = {
  441. value:'common.Category',
  442. item:[
  443. {
  444. value:null,
  445. ifValue:true,
  446. label:'common.All'
  447. },
  448. ]
  449. }
  450. },
  451. handleCurrentChange1(val) {
  452. this.page.results.currentPage = val;
  453. this.page.results.pageNo = val;
  454. this.initData();
  455. },
  456. handleCurrentChange2(val) {
  457. this.page.resource.currentPage = val;
  458. this.page.resource.pageNo = val;
  459. this.initData();
  460. },
  461. async getClassify(){
  462. let that = this;
  463. if (this.$i18n.locale.toUpperCase() == 'ZH') {
  464. that.classify1 = '';
  465. that.classify2 = '';
  466. await getDicts(
  467. "RESEARCH_RESULT_TYPE_DICT,RESEARCH_RESOURCE_TYPE_DICT"
  468. ).then(result => {
  469. if (result.data) {
  470. that.classify1 = result.data[0];
  471. that.classify2 = result.data[1];
  472. this.language = this.$i18n.locale;
  473. that.screen1 = {
  474. value:'common.Category',
  475. item:[
  476. {
  477. value:null,
  478. ifValue:true,
  479. label:'common.All'
  480. },
  481. ]
  482. }
  483. for(let i=1;i<=that.classify1.length;i++){
  484. let arr = {
  485. value:that.classify1[i-1].label,
  486. label:that.classify1[i-1].label,
  487. ifValue:false
  488. }
  489. that.screen1.item.push(JSON.parse(JSON.stringify(arr)));
  490. }
  491. }
  492. })
  493. this.getCursorList1();
  494. this.getCursorList2();
  495. }else if (this.$i18n.locale.toUpperCase() == 'EN'){
  496. that.classify1 = '';
  497. that.classify2 = '';
  498. await getDicts(
  499. "RESEARCH_RESULT_TYPE_DICT_EN,RESEARCH_RESOURCE_TYPE_DICT_EN"
  500. ).then(result => {
  501. if (result.data) {
  502. that.classify1 = result.data[0];
  503. that.classify2 = result.data[1];
  504. this.language = this.$i18n.locale;
  505. for(let i=1;i<=that.classify1.length;i++){
  506. let arr = {
  507. value:that.classify1[i-1].label,
  508. label:that.classify1[i-1].label,
  509. ifValue:false
  510. }
  511. that.screen1.item.push(JSON.parse(JSON.stringify(arr)));
  512. }
  513. }
  514. })
  515. this.getCursorList1();
  516. this.getCursorList2();
  517. }
  518. },
  519. getCursorList1() {
  520. let that = this;
  521. let param = that.page.results;
  522. if (this.$i18n.locale.toUpperCase() == 'ZH') {
  523. param.language = 'ZH';
  524. } else if (this.$i18n.locale.toUpperCase() == 'EN') {
  525. param.language = 'EN';
  526. }
  527. getBaseResearchResultViews(param).then((resulet) => {
  528. let that = this;
  529. let data = resulet.data;
  530. if (data.baseResearchResultViews) {
  531. that.cursorList1 = data.baseResearchResultViews;
  532. that.cursorList1.forEach((i) => {
  533. i.createDate = i.createDate ? formatDate(i.createDate, "YYYY-MM-DD") : "";
  534. })
  535. for (let i=0;i<that.cursorList1.length;i++){
  536. for (let o=0;o<that.classify1.length;o++){
  537. if (that.cursorList1[i].researchResultType == that.classify1[o].value){
  538. that.cursorList1[i].researchResultType = that.classify1[o].label;
  539. }
  540. }
  541. }
  542. if(that.slideShowImgFlag==0||that.slideShowImgFlag==1){
  543. that.cursorList1.forEach((i) => {
  544. if(i.uploadCarouselMap == 'Y'){
  545. let arr = {
  546. name:i.name,
  547. address:'',
  548. affiliatedUnitName:i.affiliatedUnitName,
  549. researchType:i.researchResultType,
  550. createDate:i.createDate,
  551. carouselMapAddress:i.carouselMapAddress,
  552. }
  553. that.slideShowImg.push(arr);
  554. }
  555. })
  556. that.slideShowImgFlag++;
  557. }
  558. }
  559. if (data.page){
  560. that.page.results.totalPage = data.page.totalPage;
  561. }
  562. });
  563. },
  564. getCursorList2(){
  565. let that = this;
  566. let param = that.page.resource;
  567. if (this.$i18n.locale.toUpperCase() == 'ZH') {
  568. param.language = 'ZH';
  569. } else if (this.$i18n.locale.toUpperCase() == 'EN') {
  570. param.language = 'EN';
  571. }
  572. getBaseResearchResourcesViews(param).then((resulet) => {
  573. let that = this;
  574. let data = resulet.data;
  575. if (data.baseResearchResourcesViews) {
  576. that.cursorList2 = data.baseResearchResourcesViews;
  577. that.cursorList2.forEach((i) => {
  578. i.createDate = i.createDate ? formatDate(i.createDate, "YYYY-MM-DD") : "";
  579. if (i.researchResourcesMedia){
  580. i.researchResourcesMedia = i.researchResourcesMedia.split(',')
  581. i.researchResourcesMedia = i.researchResourcesMedia[0]
  582. }
  583. })
  584. for (let i=0;i<that.cursorList2.length;i++){
  585. for (let o=0;o<that.classify2.length;o++){
  586. if (that.cursorList2[i].researchResourcesType == that.classify2[o].value){
  587. that.cursorList2[i].researchResourcesType = that.classify2[o].label;
  588. }
  589. }
  590. }
  591. if(that.slideShowImgFlag==0||that.slideShowImgFlag==1){
  592. that.cursorList2.forEach((i) => {
  593. if(i.uploadCarouselMap == 'Y'){
  594. let arr = {
  595. name:i.name,
  596. address:i.address,
  597. affiliatedUnitName:i.affiliatedUnitName,
  598. researchType:i.researchResourcesType,
  599. createDate:'',
  600. carouselMapAddress:i.carouselMapAddress,
  601. }
  602. that.slideShowImg.push(arr);
  603. }
  604. })
  605. that.slideShowImgFlag++;
  606. }
  607. }
  608. if (data.page){
  609. that.page.resource.totalPage = data.page.totalPage;
  610. }
  611. });
  612. },
  613. dataChangeByType1(item,index){
  614. let that = this;
  615. let param = that.page.results;
  616. if (this.$i18n.locale.toUpperCase() == 'ZH') {
  617. param.language = 'ZH';
  618. } else if (this.$i18n.locale.toUpperCase() == 'EN') {
  619. param.language = 'EN';
  620. }
  621. if(item == -1){
  622. that.classifySel1 = item
  623. param.researchResultType = '';
  624. }else{
  625. that.classifySel1 = index
  626. param.researchResultType = item.value;
  627. }
  628. getBaseResearchResultViews(param).then((resulet) => {
  629. let data = resulet.data;
  630. if (data.baseResearchResultViews) {
  631. that.cursorList1 = data.baseResearchResultViews;
  632. that.cursorList1.forEach((i) => {
  633. i.createDate = i.createDate ? formatDate(i.createDate, "YYYY-MM-DD") : "";
  634. })
  635. for (let i=0;i<that.cursorList1.length;i++){
  636. for (let o=0;o<that.classify1.length;o++){
  637. if (that.cursorList1[i].researchResultType == that.classify1[o].value){
  638. that.cursorList1[i].researchResultType = that.classify1[o].label;
  639. }
  640. }
  641. }
  642. if(that.slideShowImgFlag==0||that.slideShowImgFlag==1){
  643. that.cursorList1.forEach((i) => {
  644. if(i.uploadCarouselMap == 'Y'){
  645. that.slideShowImg.push(i.carouselMapAddress);
  646. }
  647. })
  648. that.slideShowImgFlag++;
  649. }
  650. }else{
  651. that.cursorList1 = {};
  652. }
  653. if (data.page){
  654. that.page.results.totalPage = data.page.totalPage;
  655. }
  656. });
  657. },
  658. dataChangeByType2(item,index){
  659. let that = this;
  660. let param = that.page.resource;
  661. if (this.$i18n.locale.toUpperCase() == 'ZH') {
  662. param.language = 'ZH';
  663. } else if (this.$i18n.locale.toUpperCase() == 'EN') {
  664. param.language = 'EN';
  665. }
  666. if(item == -1){
  667. that.classifySel2 = item
  668. param.researchResourcesType = '';
  669. }else{
  670. that.classifySel2 = index
  671. param.researchResourcesType = item.value;
  672. }
  673. getBaseResearchResourcesViews(param).then((resulet) => {
  674. let data = resulet.data;
  675. if (data.baseResearchResourcesViews) {
  676. that.cursorList2 = data.baseResearchResourcesViews;
  677. that.cursorList2.forEach((i) => {
  678. i.createDate = i.createDate ? formatDate(i.createDate, "YYYY-MM-DD") : "";
  679. if (i.researchResourcesMedia){
  680. i.researchResourcesMedia = i.researchResourcesMedia.split(',');
  681. i.researchResourcesMedia = i.researchResourcesMedia[0]
  682. }
  683. });
  684. for (let i=0;i<that.cursorList2.length;i++){
  685. for (let o=0;o<that.classify2.length;o++){
  686. if (that.cursorList2[i].researchResourcesType == that.classify2[o].value){
  687. that.cursorList2[i].researchResourcesType = that.classify2[o].label;
  688. }
  689. }
  690. }
  691. if(that.slideShowImgFlag==0||that.slideShowImgFlag==1){
  692. that.cursorList2.forEach((i) => {
  693. if(i.uploadCarouselMap == 'Y'){
  694. that.slideShowImg.push(i.carouselMapAddress);
  695. }
  696. })
  697. that.slideShowImgFlag++;
  698. }
  699. }else{
  700. that.cursorList2 = {};
  701. }
  702. if (data.page){
  703. that.page.resource.totalPage = data.page.totalPage;
  704. }
  705. });
  706. },
  707. dataChangeByName1(item,index){
  708. let that = this;
  709. let param = that.page.results;
  710. if (this.$i18n.locale.toUpperCase() == 'ZH') {
  711. param.language = 'ZH';
  712. } else if (this.$i18n.locale.toUpperCase() == 'EN') {
  713. param.language = 'EN';
  714. }
  715. param.name = that.searchText1;
  716. getBaseResearchResultViews(param).then((resulet) => {
  717. let that = this;
  718. let data = resulet.data;
  719. if (data.baseResearchResultViews) {
  720. that.cursorList1 = data.baseResearchResultViews;
  721. that.cursorList1.forEach((i) => {
  722. i.createDate = i.createDate ? formatDate(i.createDate, "YYYY-MM-DD") : "";
  723. })
  724. for (let i=0;i<that.cursorList1.length;i++){
  725. for (let o=0;o<that.classify1.length;o++){
  726. if (that.cursorList1[i].researchResultType == that.classify1[o].value){
  727. that.cursorList1[i].researchResultType = that.classify[o].label;
  728. }
  729. }
  730. }
  731. if(that.slideShowImgFlag==0||that.slideShowImgFlag==1){
  732. that.cursorList1.forEach((i) => {
  733. if(i.uploadCarouselMap == 'Y'){
  734. that.slideShowImg.push(i.carouselMapAddress);
  735. }
  736. })
  737. that.slideShowImgFlag++;
  738. }
  739. }else{
  740. that.cursorList1 = {};
  741. }
  742. if (data.page){
  743. that.page.results.totalPage = data.page.totalPage;
  744. }
  745. });
  746. },
  747. dataChangeByName2(item,index){
  748. let that = this;
  749. let param = that.page.resource;
  750. if (this.$i18n.locale.toUpperCase() == 'ZH') {
  751. param.language = 'ZH';
  752. } else if (this.$i18n.locale.toUpperCase() == 'EN') {
  753. param.language = 'EN';
  754. }
  755. param.name = that.searchText2;
  756. getBaseResearchResourcesViews(param).then((resulet) => {
  757. let that = this;
  758. let data = resulet.data;
  759. if (data.baseResearchResourcesViews) {
  760. that.cursorList2 = data.baseResearchResourcesViews;
  761. that.cursorList2.forEach((i) => {
  762. i.createDate = i.createDate ? formatDate(i.createDate, "YYYY-MM-DD") : "";
  763. if (i.researchResourcesMedia){
  764. i.researchResourcesMedia = i.researchResourcesMedia.split(',')
  765. i.researchResourcesMedia = i.researchResourcesMedia[0]
  766. }
  767. })
  768. for (let i=0;i<that.cursorList2.length;i++){
  769. for (let o=0;o<that.classify2.length;o++){
  770. if (that.cursorList2[i].researchResourcesType == that.classify2[o].value){
  771. that.cursorList2[i].researchResourcesType = that.classify2[o].label;
  772. }
  773. }
  774. }
  775. if(that.slideShowImgFlag==0||that.slideShowImgFlag==1){
  776. that.cursorList2.forEach((i) => {
  777. if(i.uploadCarouselMap == 'Y'){
  778. that.slideShowImg.push(i.carouselMapAddress);
  779. }
  780. })
  781. that.slideShowImgFlag++;
  782. }
  783. }else{
  784. that.cursorList2 = {};
  785. }
  786. if (data.page){
  787. that.page.resource.totalPage = data.page.totalPage;
  788. }
  789. });
  790. },
  791. dataChangeByTime1(){
  792. let that = this;
  793. let param = that.page.results;
  794. if (this.$i18n.locale.toUpperCase() == 'ZH') {
  795. param.language = 'ZH';
  796. } else if (this.$i18n.locale.toUpperCase() == 'EN') {
  797. param.language = 'EN';
  798. }
  799. },
  800. dataChangeByHeat1(){
  801. let that = this;
  802. let param = that.page.results;
  803. if (this.$i18n.locale.toUpperCase() == 'ZH') {
  804. param.language = 'ZH';
  805. } else if (this.$i18n.locale.toUpperCase() == 'EN') {
  806. param.language = 'EN';
  807. }
  808. },
  809. dataChangeByTime2(){
  810. let that = this;
  811. let param = that.page.resource;
  812. if (this.$i18n.locale.toUpperCase() == 'ZH') {
  813. param.language = 'ZH';
  814. } else if (this.$i18n.locale.toUpperCase() == 'EN') {
  815. param.language = 'EN';
  816. }
  817. },
  818. dataChangeByHeat2(){
  819. let that = this;
  820. let param = that.page.resource;
  821. if (this.$i18n.locale.toUpperCase() == 'ZH') {
  822. param.language = 'ZH';
  823. } else if (this.$i18n.locale.toUpperCase() == 'EN') {
  824. param.language = 'EN';
  825. }
  826. },
  827. // 判断未登录跳转是否关闭
  828. toViewLoginChange(done){
  829. this.toViewLogin=false;
  830. this.num=5;
  831. clearInterval(this.timer);
  832. },
  833. loginTipsChange(){
  834. const that=this;
  835. this.num =5;
  836. // clearInterval(timer_interval);
  837. this.timer = setInterval(function() {
  838. if (that.num > 0) {
  839. that.num--;
  840. } else {
  841. if(that.toViewLogin==true){
  842. clearInterval(that.timer);
  843. that.toView('login');
  844. }else {
  845. clearInterval(that.timer);
  846. }
  847. }
  848. }, 1000)
  849. },
  850. },
  851. }
  852. </script>
  853. <style scoped>
  854. .oneLine{
  855. /* 隐藏溢出元素 */
  856. overflow: hidden;
  857. /* 单行显示 */
  858. white-space: nowrap;
  859. /* 溢出显示省略号 */
  860. text-overflow: ellipsis;
  861. }
  862. .threeLine{
  863. overflow : hidden;
  864. text-overflow: ellipsis;
  865. display: -webkit-box;
  866. -webkit-line-clamp: 3;
  867. -webkit-box-orient: vertical;
  868. }
  869. .pointer:hover{
  870. cursor: pointer;
  871. }
  872. .box {
  873. margin-top: 10px;
  874. background: #fff;
  875. /* height: 500px; */
  876. padding: 20px 0;
  877. }
  878. .crumbs {
  879. margin:0 20px;
  880. }
  881. .secNavActive{
  882. color: #0091FF;
  883. }
  884. .mainBody{
  885. width: 100%;
  886. margin-top: 10px;
  887. box-sizing: border-box;
  888. }
  889. .mainBody .slideShow{
  890. width: 100%;
  891. }
  892. .mainBody .researchClassify{
  893. cursor: pointer;
  894. width: 100%;
  895. /*height: 51px;*/
  896. overflow: hidden;
  897. background-color: #F8F8F8;
  898. }
  899. .mainBody .researchClassify .option{
  900. /*float: left;*/
  901. height: 51px;
  902. color: #9B9B9B;
  903. font-size: 16px;
  904. font-weight: 400;
  905. line-height: 51px;
  906. padding: 0 10px;
  907. box-sizing: border-box;
  908. }
  909. .mainBody .researchClassify .option .active{
  910. color: #6699FF;
  911. font-weight: 600;
  912. }
  913. .mainBody .researchClassify .rankSearchPub{
  914. float: right;
  915. height: 56px;
  916. box-sizing: border-box;
  917. }
  918. .mainBody .researchClassify .rankSearchPub .rank{
  919. float: left;
  920. height: 51px;
  921. line-height: 51px;
  922. font-size: 16px;
  923. color: rgba(0,0,0,0.65);
  924. }
  925. .mainBody .researchClassify .rankSearchPub .rank .active{
  926. color: #0091FF;
  927. }
  928. .mainBody .researchClassify .rankSearchPub .search{
  929. float: left;
  930. width: 103px;
  931. height: 32px;
  932. margin: 10px 15px 9px 0;
  933. border-radius: 5px;
  934. position: relative;
  935. }
  936. .mainBody .researchClassify .rankSearchPub .search input[type=text]{
  937. width: 103px;
  938. height: 32px;
  939. border: 1px solid #D9D9D9;
  940. margin: 0;
  941. padding: 0 32px 0 5px;
  942. box-sizing: border-box;
  943. border-radius: 4px;
  944. }
  945. .mainBody .researchClassify .rankSearchPub .search input[type=text]:focus{
  946. border: 1px solid #0091FF;
  947. outline: none;
  948. }
  949. .mainBody .researchClassify .rankSearchPub .publishing{
  950. float: left;
  951. /*width: 120px;*/
  952. height: 32px;
  953. line-height: 30px;
  954. margin: 9px 30px 8px 0;
  955. padding: 0 20px;
  956. box-sizing: border-box;
  957. border: 1px solid #1890FF;
  958. color: #1890FF;
  959. border-radius: 16px;
  960. text-align: center;
  961. }
  962. .mainBody .cursor{
  963. width: 30%;
  964. height: 525px;
  965. border: 1px solid rgba(228, 228, 228, 1);
  966. float: left;
  967. margin:0 2.5% 30px 2.5%;
  968. box-sizing: border-box;
  969. position: relative
  970. }
  971. .activity {
  972. height: 100%;
  973. background: url(../../assets/img/introductionCooperation/detailsbg.png) no-repeat;
  974. }
  975. </style>
  976. <style>
  977. .box .el-input__inner{
  978. height: 32px;
  979. }
  980. </style>