DataResourseSharing.vue 42 KB

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