(function(){ Vue.components = Vue.components || {} function RegVueCom(name, com){ Vue.component(name, com); Vue.components[name] = com; } RegVueCom("qkjq-portal-footer", function(resolve, reject){ var template = "
\n
\n
\n
\n
\n 友情链接\n
\n
\n
\n \n {{item.otitle}}\n
\n
\n
\n
\n
\n 关注公众号\n
\n \n
\n
\n
\n\n
\n 版权所有:中国机械科学研究总院集团有限公司\n \n 京ICP备2024100983号-1\n \n \n 京公网安备:11010802040622 号\n \n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(),links:[] }; }, methods: { getLinks(){ let _this = this; $.ajax({ url:'/www/dd/cms/json-tab-latest?_id=index_links&pi=1&ps=1000', type:'get', success:function(res){ _this.links = res.data; } }) }, nav(item){ window.open(item.linkurl,'_blank') } }, created: function(){ }, mounted: function(){ this.getLinks(); }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("qkjq-portal-nodata", function(resolve, reject){ var template = "
\n \n 暂无数据\n \n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), qikan:'', seachkey:'', cur:'home', options:[ { value: '期刊1', label: '期刊1' }, { value: '期刊3', label: '期刊3' }, { value: '期刊2', label: '期刊2' } ] }; }, methods: { nav(type){ this.cur=type; this.$router.push({path:type}) } }, created: function(){ }, mounted: function(){ this.cur= this.$route.path.replace('/',"") }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("qkjq-portal-file", function(resolve, reject){ var template = "
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), info:'', }; }, watch: { '$route.params.type': { handler:function (type, oldVal){ this.getData(type); }, deep:true } }, methods: { getData(type){ let _this = this; $.ajax({ url:'/www/dd/cms/json-tab-latest?_id='+type+'&pi=1&ps=1', type:'get', success:function(res){ $.ajax({ url:'/www/dd/cms/json-post?_id='+res.data[0].alias+'&pi=1&ps=1', type:'get', success:function(data){ _this.info = data.data; }}) } }) }, }, created: function(){ }, mounted: function(){ if(this.type){ this.getData(this.type) } }, props: ['title', 'data', 'config','type'] }) }) })(template, resolve, reject); }); RegVueCom("qkjq-portal-post", function(resolve, reject){ var template = "
\n\n\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), info:'', }; }, watch: { '$route.params.type': { handler:function (type, oldVal){ this.getData(type); }, deep:true } }, methods: { getData(type){ let _this = this; $.ajax({ url:'/www/dd/cms/json-tab-latest?_id='+type+'&pi=1&ps=1', type:'get', success:function(res){ _this.info = res.data[0]; } }) }, }, created: function(){ }, mounted: function(){ if(this.data){ this.getData(this.data) } }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("qkjq-portal-header", function(resolve, reject){ var template = "
\n
\n \"Logo\"\n
\n \n \n \n 登录\n
\n
\n
\n
\n
首页
\n
新闻中心
\n
期刊导航
\n
投稿指南
\n
热点专栏
\n
推荐文章
\n
关于我们
\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), qikan:'', seachkey:'', cur:'home', options:[ { value: '期刊1', label: '期刊1' }, { value: '期刊3', label: '期刊3' }, { value: '期刊2', label: '期刊2' } ] }; }, methods: { nav(type){ if(this.cur !=type){ this.$router.push({path:type}) } }, login(){ window.location.href='https://www.camjournals.com/core/login'; }, dosearch(){ this.$router.push({path:'/search/'+this.seachkey}) } }, watch:{ "$route"(to, from) { let path = to.path; if(path == 'detail'){path = "news"} this.cur = path } }, created: function(){ }, mounted: function(){ this.cur= this.$route.path }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("qkjq-portal-index-view", function(resolve, reject){ var template = "
\n
\n
\n
\n
\n
\n
{{ counters[0].displayedValue }} 本
\n
期刊
\n
\n
\n
\n
\n
\n
{{ counters[1].displayedValue }} 篇
\n
论文
\n
\n
\n
\n
\n
\n
{{ counters[2].displayedValue }} 人
\n
编委会人数
\n
\n
\n
\n
\n
\n
{{ counters[3].displayedValue }} 年
\n
历史
\n
\n
\n
\n
\n \n 作者投稿\n \n
\n
\n\n
\n
\n
\n 期刊导航\n Journal Navigation\n
\n
\n 更多 >\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n 推荐文章\n Recommended Articles\n
\n
\n 更多 >\n
\n
\n
\n \n \n
\n
\n
{{ item.otitle }}
\n
{{ item.options.summary }}
\n
{{ item.authors }}
\n
\n {{ item.pubname }}\n {{ formatDate(item.publishdate) }}\n
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n 期刊动态\n Journal News\n
\n
\n 更多 >\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n
\n
\n \n {{ item.otitle }}\n {{ formatDate(item.publishtime) }}\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n 学术活动\n Academic Activities\n
\n
\n 更多 >\n
\n
\n
\n
\n
\n
\n
{{ item.otitle }}
\n
来源网站:{{ item.tag || '锻压技术' }}
\n
{{ formatDate(item.publishtime) }}
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n 行业热点\n Industry Trends\n
\n
\n 更多 >\n
\n
\n
\n \n \n
\n
\n
{{ item.otitle }}
\n
{{ formatDate(item.publishtime) }}
\n
\n
\n
\n
\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), curNews:0, bannerUrl:'', qklist:[], newsList:[], links:[], paperList:[], hyrdList:[], xshdList: [], counters: [ { targetValue: 20, displayedValue: 0, duration: 1000 }, { targetValue: 16550, displayedValue: 0, duration: 1500 }, { targetValue: 100, displayedValue: 0, duration: 1200 }, { targetValue: 120, displayedValue: 0, duration: 1100 }, ], backgroundStyle: {} }; }, methods: { getStatData(){ let _this = this; $.ajax({ url:'/www/qk/api/index-tj', type:'get', success:function(res){ const dataValues = [ res.data.num_pubs, res.data.num_articles, res.data.num_people, res.data.num_history ]; _this.counters = _this.counters.map((counter, index) => ({ ...counter, targetValue: dataValues[index] })); _this.counters.forEach((counter, index) => _this.animateCounter(counter, index)); } }) }, generateBackground() { const canvas = document.createElement('canvas'); const ctx = canvas.getContext('2d'); canvas.width = 800; canvas.height = 600; // 随机生成线条 for (let i = 0; i < 50; i++) { ctx.beginPath(); ctx.moveTo(Math.random() * canvas.width, Math.random() * canvas.height); ctx.lineTo(Math.random() * canvas.width, Math.random() * canvas.height); ctx.strokeStyle = `rgba(${Math.random() * 255}, ${Math.random() * 255}, ${Math.random() * 255}, 0.5)`; ctx.lineWidth = Math.random() * 3; ctx.stroke(); } return { backgroundImage: `url(${canvas.toDataURL()})`, backgroundSize: 'cover', backgroundPosition: 'center' }; }, formatDate(date) { return moment(date).format('YYYY-MM-DD'); }, animateCounter(counter, index) { const increment = counter.targetValue / (counter.duration / 10); let currentValue = 0; const timer = setInterval(() => { currentValue += increment; if (currentValue >= counter.targetValue) { currentValue = counter.targetValue; clearInterval(timer); } this.$set(this.counters[index], 'displayedValue', Math.floor(currentValue)); }, 10); }, carouselChange(idx){ this.curNews = idx; }, setCurNews(item){ if(item.otype == 1){ window.open(item.linkurl,'_blank') } else{ this.$router.push({path:'/post/'+item.alias}) } // // this.$refs.carousel.setActiveItem(idx) }, nav(type){ this.$router.push({path:type}) }, navQiKanInner(item){ this.$router.push({path: '/qikan/'+ item.id}) }, navQiKan(item){ if(item.url_index){ if(item.url_index.indexOf('http')>=0){ window.open(item.url_index,'_blank') }else{ this.$router.push({path: item.url_index}) } } }, navArticle(item){ window.open(item.read_html_url, "_blank") //this.$router.push({path:'/post/'+ item.alias}) }, navPaper(item){ //window.open(item.read_html_url, "_blank") this.$router.push({path:'/post/'+ item.alias}) }, getQKList(){ let _this =this; $.ajax({ url:'/www/qk/api/publications/', type:'get', success:function(res){ const result = res.data.flatMap((value, index, array) => { if (index % 7 === 0) { return [array.slice(index, index + 7)]; } return []; }); _this.qklist =result; } }) }, getXshd(){ let _this = this; $.ajax({ url:'/www/dd/cms/json-tab-latest?_id=xshd&pi=1&ps=6', type:'get', success:function(res){ const result = res.data.flatMap((value, index, array) => { if (index % 3 === 0) { return [array.slice(index, index + 3)]; } return []; }); _this.xshdList =result; } }) }, getHyrd(){ let _this = this; $.ajax({ url:'/www/dd/cms/json-tab-latest?_id=hyrd&pi=1&ps=12', type:'get', success:function(res){ const result = res.data.flatMap((value, index, array) => { if (index % 4 === 0) { return [array.slice(index, index + 4)]; } return []; }); _this.hyrdList =result; } }) }, getBanner(){ let _this = this; $.ajax({ url:'/www/dd/cms/json-tab-latest?_id=index_slide&pi=1&ps=10', type:'get', success:function(res){ _this.bannerUrl = res.data[0].urls.img_cover; } }) }, getNewsList(){ let _this = this; $.ajax({ url:'/www/dd/cms/json-tab-latest?_id=qkdt&pi=1&ps=5', type:'get', success:function(res){ _this.newsList = res.data.map(item => { if (!item.urls.img_cover){ item.backgroundStyle = _this.generateBackground(); } return item; }); } }) }, getPaperList(){ let _this = this; $.ajax({ url:'/www/qk/api/articles-tjwz?pi=1&ps='+18, type:'get', success:function(res){ const result = res.data.flatMap((value, index, array) => { if (index % 6 === 0) { return [array.slice(index, index + 6)]; } return []; }); _this.paperList = result; } }) }, initIntersectionObserver() { const sections = document.querySelectorAll('.trends, .news, .content-block:not(.banner .content-block)'); sections.forEach(section => { section.classList.remove('visible'); // Reset visibility }); this.observer = new IntersectionObserver( (entries) => { entries.forEach((entry) => { if (entry.isIntersecting) { entry.target.classList.add('visible'); } }); }, { threshold: 0.2, rootMargin: '0px' } ); sections.forEach((section) => { this.observer.observe(section); }); }, cleanupIntersectionObserver() { if (this.observer) { this.observer.disconnect(); } } }, created: function(){ }, mounted: function(){ this.getStatData(); this.getBanner(); this.getQKList(); this.getHyrd(); this.getXshd(); this.getNewsList(); this.getPaperList(); this.initIntersectionObserver(); }, props: ['title', 'data', 'config'] }) }); })(template, resolve, reject); }); RegVueCom("qkjq-portal-news", function(resolve, reject){ var template = "
\n
\n \n 首页\n 新闻中心\n 新闻详情\n \n
\n {{newsInfo.otitle}}\n
\n
\n
\n 时间:{{(newsInfo.options||{}).time}}  \n 来源:{{(newsInfo.options||{}).author}}\n
\n\n
\n \n
\n
\n
\n \n
\n \n \n \n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), newsId:'', newsInfo:{} }; }, methods: { getDetail(){ let _this = this; $.ajax({ url:'/www/dd/cms/json-post?_id='+this.data.alias, type:'get', success:function(res){ _this.newsInfo = res.data; } }) } }, created: function(){ }, mounted: function(){ this.getDetail(); }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("qkjq-portal-about", function(resolve, reject){ var template = "
\n
\n
\n
关于我们
\n
\n
\n
\n {{ item.oname }} \n
\n \n
\n
\n
\n
\n
0\">\n
\n
{{newsList[0].otitle}}
\n
\n
\n
\n
\n \n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), allClicked:true, active:'', subactive:'', curType:-1, curTypeName:'', newsTabs:[], news:[], total:0, pi:1, ps:6, treeData: [], newsList:[] }; }, watch:{ curType(val){ this.getNews(val) } }, methods: { setActive(item){ this.active = item.alias; this.pi = 1; this.getNewsList(this.active) }, setSubActive(item){ this.subactive = item.alias; this.pi = 1; this.getNewsList(this.subactive) }, allClick(){ this.active=''; this.pi = 1; this.subactive='', this.getNewsList('about'); }, changeType(type){ this.curType = type }, nav(item){ this.$router.push({path:'/post/'+ item.alias}) }, pageChange(page){ this.pi = page; this.getNewsList(); }, getTreeData(){ let _this = this; $.ajax({ url:'/www/dd/cms/json-tabs?_id=about', type:'get', success:function(res){ _this.treeData = window._utils.dealTree(res.data,2); } }) }, getNewsList(type='about'){ let _this = this; $.ajax({ url:'/www/dd/cms/json-tab-latest?_id='+type+'&pi='+this.pi+'&ps='+this.ps, type:'get', success:function(res){ if (res.data.length > 0){ $.ajax({ url:'/www/dd/cms/json-post?_id='+res.data[0].alias+'&pi=1&ps=1', type:'get', success:function(data){ _this.newsList = [data.data]; } }); } else{ _this.newsList = []; } } }) }, }, created: function(){ }, mounted: function(){ this.getTreeData(); this.getNewsList(); }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("qkjq-portal-newsList", function(resolve, reject){ var template = "
\n
\n
\n
新闻中心
\n
\n
\n
\n {{ item.oname }} \n
\n \n
\n
\n
\n
\n
\n
\n
\n {{ item.otitle }}\n
\n
\n {{ item.tag }}\n
\n
\n
\n {{ item.options.creater }} 发表时间: {{ item.publishtime }}\n
\n
\n 5\" background layout=\"prev, pager, next, total\" :page-size=\"ps\" :total=\"total\" :current-page.sync=\"pi\">\n \n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), allClicked:true, active:'', subactive:'', curType:-1, curTypeName:'', newsTabs:[], news:[], total:0, pi:1, ps:6, treeData: [], newsList:[] }; }, watch:{ curType(val){ this.getNews(val) } }, methods: { setActive(item){ this.active = item.alias; this.pi = 1; this.subactive = ''; this.getNewsList(this.active) }, setSubActive(item){ this.subactive = item.alias; this.pi = 1; this.getNewsList(this.subactive) }, allClick(){ this.active=''; this.pi = 1; this.subactive=''; this.getNewsList('news'); }, changeType(type){ this.curType = type }, nav(item){ this.$router.push({path:'/post/'+ item.alias}) }, pageChange(page){ this.pi = page; this.getNewsList(this.subactive||this.active); }, getTreeData(){ let _this = this; $.ajax({ url:'/www/dd/cms/json-tabs?_id=news', type:'get', success:function(res){ _this.treeData = window._utils.dealTree(res.data,2); } }) }, getNewsList(type='news'){ let _this = this; $.ajax({ url:'/www/dd/cms/json-tab-latest?_id='+type+'&pi='+this.pi+'&ps='+this.ps, type:'get', success:function(res){ _this.total = res.total; _this.newsList = res.data; } }) }, }, created: function(){ // Check for active and subactive parameters from the route const activeParam = this.$route.query.active; const subactiveParam = this.$route.query.subactive; debugger; if (subactiveParam) { this.subactive = subactiveParam; this.allClicked = false; this.getNewsList(this.subactive); } else if (activeParam) { this.active = activeParam; this.allClicked = false; this.getNewsList(this.active); } }, mounted: function(){ this.getTreeData(); // Only call getNewsList if no active or subactive parameters are provided if (!this.$route.query.active && !this.$route.query.subactive) { this.getNewsList(); } }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("qkjq-portal-post/:id-view", function(resolve, reject){ var template = "
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), postInfo:{}, views:'', postId:'', }; }, watch: { '$route.params.id': { handler:function (id, oldVal){ this.postId = id; this.getTypeInfo( this.postId); }, deep:true } }, methods: { getTypeInfo(postId){ let _this = this; $.ajax({ url:'/www/dd/cms/json-post?_id='+postId+'&pi=1&ps=1', type:'get', success:function(res){ debugger; $.ajax({ url:'/www/dd/cms/json-tab?_id='+ res.data.calias+'&pi=1&ps=1', type:'get', success:function(tab){ _this.views = tab.data.post_view; _this.postInfo = res.data; if(res.data.otype == 1){ window.open(res.data.linkurl,'_blank') _this.$router.back(-1) } }}) }}) } }, created: function(){ }, mounted: function(){ this.postId = this.$route.params.id; this.getTypeInfo( this.postId); }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("qkjq-portal-search/:key-view", function(resolve, reject){ var template = "
\n
\n
\n
\n
搜索结果
\n
\n 共搜索到关于【{{key}}】的记录{{total}}条\n
\n
\n
\n \n \n \n \n
\n
\n
\n
\n

期刊

\n
\n
\n \n
\n
\n
\n ps\"\n @current-change=\"pageChange('journal', $event)\"\n background\n layout=\"prev, pager, next, total\"\n :page-size=\"ps\"\n :total=\"journalTotal\"\n >\n
\n 没有找到关于 \"{{key}}\" 在期刊中的结果\n
\n
\n
\n

文章

\n
\n
\n
\n {{formatDate(item.publishdate)}}\n {{item.pubname}}\n
\n
\n ps\"\n @current-change=\"pageChange('article', $event)\"\n background\n layout=\"prev, pager, next, total\"\n :page-size=\"ps\"\n :total=\"articleTotal\"\n >\n
\n 没有找到关于 \"{{key}}\" 在文章中的结果\n
\n
\n
\n

新闻

\n
\n
\n
\n {{formatDate(item.publishtime)}}\n 新闻\n
\n
\n ps\"\n @current-change=\"pageChange('news', $event)\"\n background\n layout=\"prev, pager, next, total\"\n :page-size=\"ps\"\n :total=\"newsTotal\"\n >\n
\n 没有找到关于 \"{{key}}\" 在新闻中的结果\n
\n
\n
\n
\n
"; return (function(template, resolve, reject) { seajs.use([], function() { return resolve({ template: template, data: function() { return { id: Math.uuid(), jieshao: '', key: '', currentCategory: 'all', ps: 5, journalData: [], journalTotal: 0, journalPi: 1, articleData: [], articleTotal: 0, articlePi: 1, newsData: [], newsTotal: 0, newsPi: 1 }; }, computed: { total: function() { return this.journalTotal + this.articleTotal + this.newsTotal; } }, watch: { '$route.params.key': { handler: function(key, oldVal) { this.key = key; this.journalPi = 1; this.articlePi = 1; this.newsPi = 1; this.getData(); }, deep: true }, currentCategory: { handler: function() { this.getData(); } } }, methods: { formatDate(date) { return moment(date).format('YYYY-MM-DD'); }, nav(item) { this.$router.push({ path: '/post/' + item.alias }); }, navJournal(item){ this.$router.push({path: '/qikan/'+ item.id}) }, navArticle(item){ window.open(item.read_html_url,'_blank') }, setCategory(category) { this.currentCategory = category; }, showCategory(category) { return this.currentCategory === 'all' || this.currentCategory === category; }, getData() { if (!this.key) return; let _this = this; const apiEndpoints = { journal: `/www/qk/api/search-journal?query=${this.key}&pi=${this.journalPi}&ps=${this.ps}`, article: `/www/qk/api/search-article?query=${this.key}&pi=${this.articlePi}&ps=${this.ps}`, news: `/www/qk/api/search-news?query=${this.key}&pi=${this.newsPi}&ps=${this.ps}` }; const fetchData = (category) => { return new Promise((resolve) => { $.ajax({ url: apiEndpoints[category], type: 'get', success: function(res) { const data = res.data.map(item => ({ ...item, category: category.charAt(0).toUpperCase() + category.slice(1), otitle: item.otitle.replace(_this.key, `${_this.key}`) })); resolve({ total: res.total, data: data }); }, error: function() { resolve({ total: 0, data: [] }); } }); }); }; const categoriesToFetch = this.currentCategory === 'all' ? ['journal', 'article', 'news'] : [this.currentCategory]; Promise.all(categoriesToFetch.map(category => fetchData(category))).then(results => { categoriesToFetch.forEach((category, index) => { _this[`${category}Data`] = results[index].data; _this[`${category}Total`] = results[index].total; }); }); }, pageChange(category, page) { this[`${category}Pi`] = page; this.getData(); } }, created: function() {}, mounted: function() { this.key = this.$route.params.key; this.getData(); }, props: ['title', 'data', 'config'] }); }); })(template, resolve, reject); }); RegVueCom("qkjq-portal-tab/:type-view", function(resolve, reject){ var template = "
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), jieshao:'', postTypes:'', views:'', }; }, watch:{ '$route.params.type': { handler:function (type, oldVal){ this.postTypes = type; this.getTypeInfo(type); }, deep:true } }, methods: { getTypeInfo(type){ let _this = this; $.ajax({ url:'/www/dd/cms/json-tab?_id='+type+'&pi=1&ps=1', type:'get', success:function(res){ _this.views = res.data.oview; }}) } }, created: function(){ }, mounted: function(){ let type = this.$route.params.type; this.postTypes = type; this.getTypeInfo(type); }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("qkjq-portal-qikanList", function(resolve, reject){ var template = "
\n
\n
\n
期刊导航
\n
\n
\n
\n {{ item.oname }} \n
\n \n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
{{ item.oname }}
\n
\n
\n 出版周期: {{ item.ofrequency }}\n 语种: {{ item.language }}\n
\n
\n ISSN: {{ item.issn }}\n CN: {{ item.onumber }}\n
\n
\n
\n 主办单位:\n {{ item.zbdw }}\n
\n
\n 收录情况:\n {{ item.inclusion_status }}\n
\n
\n 期刊介绍:\n {{ item.odesc }}\n
\n
\n \n \n
\n
\n
\n
\n \n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), allClicked:true, defaultProps: { children: 'children', label: 'oname', nodeKey:'id' }, treeData: [], qikanList:[], active:'', subactive:'', }; }, methods: { handleNodeClick(data) { this.allClicked = false; this.getQK(data.alias) }, setActive(item){ this.active = item.alias; this.getQK(this.active) }, setSubActive(item){ this.subactive = item.alias; this.getQK(this.subactive) }, navMulu(item){ //url_content: "知网目录" // url_home: "期刊主页 or 文章地址" //url_submit: "投稿地址 or 文章地址" if(item.options && item.options.url_content){ if(item.options.url_content.indexOf('http')>=0){ window.open(item.options.url_content,'_blank') }else{ this.$router.push({path:'/post/'+item.options.url_content}) } } }, navTougao(item){ if(item.url_submit){ if(item.url_submit.indexOf('http')>=0){ window.open(item.url_submit,'_blank') }else{ this.$router.push({path:'/post/'+item.url_submit}) } } }, navHome(item){ if(item.url_index && item.url_index.indexOf('http')>=0){ window.open(item.url_index,'_blank') }else{ this.$router.push({path:'/qikan/'+item.id}) } }, navHomeInner(item){ this.$router.push({path:'/qikan/'+item.id}) }, getQK(type){ let _this = this; $.ajax({ url:'/www/qk/api/publications/'+type, type:'get', success:function(res){ _this.qikanList = res.data; } }) }, allClick(){ this.$refs.tree.setCurrentKey(); this.allClicked = true; this.getQK('') }, }, created: function(){ }, mounted: function(){ let _this =this; $.ajax({ url:'/www/dd/cms/json-tabs?_id=qikan', type:'get', success:function(res){ _this.treeData = window._utils.dealTree(res.data,2); console.log('---->', _this.treeData) } }) this.getQK('qikan') }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("qkjq-portal-tougao", function(resolve, reject){ var template = "
\n
\n \n
\n
\n

\n 智能推荐期刊\n

\n

输入研究领域或论文题目,获取大模型驱动的期刊推荐

\n
\n
\n \n \n \n \n {{ isLoading ? '查询中...' : '确定' }}\n \n
\n
\n\n \n \n
\n \n

AI正在分析您的输入,请稍候...

\n
\n
\n\n \n \n
\n
\n
\n \"Journal\n
\n
\n
\n

征文范围

\n

\n {{ item.scope || '' }}\n

\n

投稿说明

\n

\n {{ item.submit_desc || '' }}\n

\n
\n
\n 投稿链接\n
\n
\n
\n \n
\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), allClicked:true, defaultProps: { children: 'children', label: 'oname', nodeKey:'id' }, treeData: [], qikanList:[], researchInput: "", isLoading: false }; }, methods: { handleNodeClick(data) { this.allClicked = false; this.getQK(data.alias) }, nav(url){ if(url.indexOf('http')>=0){ window.open(url,'_blank') }else{ this.$router.push({path:'/post/'+url}) } }, navMulu(item){ //url_content: "知网目录" //url_home: "期刊主页 or 文章地址" //url_submit: "投稿地址 or 文章地址" if(item.url_content){ this.nav(item.url_content) } else{ this.$notify.error({ title: '', message: '暂无数据', }); } }, navTougao(item){ if(item.url_submit){ this.nav(item.url_submit) } else{ this.navHome(item) } }, navHome(item){ if(item.url_home){ this.nav(item.url_home) } else{ this.$notify.error({ title: '', message: '暂无数据', }); } }, getRecommendations() { let _this = this; if (!this.researchInput) { _this.getQK('qikan'); return; } _this.isLoading = true; const MINIMUM_DELAY = 1000; // 1 second minimum delay const startTime = Date.now(); $.ajax({ url: '/www/qk/api/publicationsByAI?message=' + _this.researchInput, type: 'get', success: function(res) { const elapsedTime = Date.now() - startTime; const remainingDelay = MINIMUM_DELAY - elapsedTime; // If the request took less than MINIMUM_DELAY, add remaining delay if (remainingDelay > 0) { setTimeout(function() { _this.qikanList = res.data; _this.isLoading = false; }, remainingDelay); } else { // If request already took longer than MINIMUM_DELAY, update immediately _this.qikanList = res.data; _this.isLoading = false; } }, error: function() { // Optional: handle error case _this.isLoading = false; } }); }, getQK(type){ let _this = this; $.ajax({ url:'/www/qk/api/publications/'+type, type:'get', success:function(res){ _this.qikanList = res.data; } }) }, allClick(){ this.$refs.tree.setCurrentKey(); this.allClicked = true; this.getQK('qikan') }, }, created: function(){ }, mounted: function(){ let _this =this; $.ajax({ url:'/www/dd/cms/json-tabs?_id=qikan', type:'get', success:function(res){ _this.treeData = window._utils.dealTree(res.data,2); } }) this.getQK('qikan') }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("qkjq-portal-paper", function(resolve, reject){ var template = "
\n
\n
\n
\n
\n
\n {{paperInfo.options.publicationName}}\n
\n {{paperInfo.options.resName}}\n
\n
\n 关键字:{{paperInfo.options.keyword}} \n
\n
\n 作者:{{paperInfo.options.authors}} \n
\n
\n 单位: \n {{paperInfo.options.authorCompany}}\n
\n
\n 基金: \n {{paperInfo.options.fund||\"--\"}}\n
\n
\n 引用: \n {{paperInfo.options.yearAndVolumeAndIssueStr}}\n
\n
\n DOI:\n {{paperInfo.options.doi}}\n
\n
\n 发布时间: {{paperInfo.options.publishDate}}\n
\n \n
\n {{paperInfo.options.summary}}\n
\n \n
\n
\n
\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), paperInfo:{} }; }, methods: { getPaperList(type='paper'){ let _this = this; $.ajax({ url:'/www/dd/cms/json-post?_id='+type+'&pi=1&ps=1', type:'get', success:function(res){ _this.paperInfo = res.data; } }) }, }, created: function(){ }, mounted: function(){ this.paperInfo = this.data; //this.data && this.getPaperList(this.data) }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("qkjq-portal-qikan/:id-view", function(resolve, reject){ var template = "
\n
\n \n
\n \"Journal\n
\n \n \n
\n
\n\n \n
\n

{{item.oname}}

\n \n \n
\n
\n

基本信息

\n
\n 出版周期\n {{item.ofrequency}}\n
\n
\n 语种\n {{item.language}}\n
\n
\n 影响因子\n {{item.impact_factor}}\n
\n
\n\n
\n

出版标识

\n
\n ISSN\n {{item.issn}}\n
\n
\n CN\n {{item.onumber}}\n
\n
\n\n
\n

学术认证

\n
\n 核心期刊\n {{item.is_core?'是':'否'}}\n
\n
\n EI收录\n {{item.is_ei?'是':'否'}}\n
\n
\n SCI收录\n {{item.is_sci?'是':'否'}}\n
\n
\n\n
\n

联系方式

\n
\n 联系人\n {{item.contactperson}}\n
\n
\n 邮箱\n {{item.email}}\n
\n
\n 电话\n {{item.phone}}\n
\n
\n
\n\n \n
\n
\n

主办单位

\n

{{item.zbdw}}

\n
\n
\n

收录情况

\n

{{item.inclusion_status}}

\n
\n
\n

期刊介绍

\n

{{item.odesc}}

\n
\n
\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), item:{} }; }, methods: { getPaperList(postId){ let _this = this; $.ajax({ url:'/www/qk/api/publication?id='+postId, type:'get', success:function(res){ _this.item = res.data; } }) }, navHome(item){ if(item.url_index && item.url_index.indexOf('http')>=0){ window.open(item.url_index,'_blank') }else{ this.$router.push({path:'/qikan/'+item.id}) } }, navTougao(item){ if(item.url_submit){ if(item.url_submit.indexOf('http')>=0){ window.open(item.url_submit,'_blank') }else{ this.$router.push({path:'/post/'+item.url_submit}) } } }, }, created: function(){ }, mounted: function(){ this.postId = this.$route.params.id; this.getPaperList(this.postId) }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("qkjq-portal-hotIssueList", function(resolve, reject){ var template = "
\n
\n
0\">\n
热点专栏
\n
\n
\n
\n {{ item.oname }} \n
\n \n
\n
\n
\n
\n \n \n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), allClicked:true, searchKey:'', active:'', subactive:'', defaultProps: { children: 'children', label: 'oname', nodeKey:'id' }, total:0, pi:1, ps:5, type:'paper', treeData: [], paperList:[] }; }, methods: { setActive(item){ this.active = item.alias; this.pi = 1; this.getPaperList(this.active) }, setSubActive(item){ this.subactive = item.alias; this.pi = 1; this.getPaperList(this.subactive) }, getPaperList(type=''){ let _this = this; $.ajax({ url:'/www/qk/api/articles-rdzl?_id='+type+'&pi='+this.pi+'&ps='+this.ps, type:'get', success:function(res){ _this.total = res.total; _this.paperList = res.data; } }) }, allClick(){ this.active=''; this.subactive='', this.getPaperList(''); }, pageChange(page){ this.pi = page; this.getPaperList(this.active); }, nav(item){ window.open(item.read_html_url,'_blank') //this.$router.push({path:'/post/'+item.alias}) }, }, created: function(){ }, mounted: function(){ let _this = this; $.ajax({ url:'/www/dd/cms/json-tabs/rdzl', type:'get', success:function(res){ _this.treeData = window._utils.dealTree(res.data,2); } }) this.searchKey = this.$route.query.search; if(this.searchKey){ $.ajax({ url:'/www/dd/cms/json-search?query='+this.searchKey+'&pi=1&ps=10', type:'get', success:function(res){ _this.total = res.pager.total; _this.paperList = res.data; } }) }else{ this.getPaperList(); } }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("qkjq-portal-paperList", function(resolve, reject){ var template = "
\n
\n
\n
推荐文章
\n
\n
\n
\n {{ item.oname }} \n
\n \n
\n
\n
\n
\n
\n
\n
\n {{ item.pubname }}\n
\n
\n {{ item.otitle }}\n
\n
\n
\n {{ item.authors }}\n
\n
\n {{ item.doi }}\n
\n
\n \n
\n
\n 发表时间: {{ item.publishdate }}\n
\n
\n 1\" background layout=\"prev, pager, next, total\" :page-size=\"ps\" :total=\"total\" :current-page.sync=\"pi\">\n \n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), allClicked:true, searchKey:'', active:'', subactive:'', defaultProps: { children: 'children', label: 'oname', nodeKey:'id' }, total:0, pi:1, ps:5, type:'paper', treeData: [], paperList:[] }; }, methods: { setActive(item){ this.active = item.alias; this.pi = 1; this.getPaperList(this.active) }, setSubActive(item){ this.subactive = item.alias; this.pi = 1; this.getPaperList(this.subactive) }, getPaperList(type=''){ let _this = this; $.ajax({ url:'/www/qk/api/articles-tjwz?_id='+type+'&pi='+this.pi+'&ps='+this.ps, type:'get', success:function(res){ _this.total = res.total; _this.paperList = res.data.map(item => ({ ...item, otitle: item.otitle.replace(/<[^>]*>/g, '') })); } }) }, allClick(){ this.active=''; this.subactive='', this.getPaperList(''); }, pageChange(page){ this.pi = page; this.getPaperList(this.active); }, nav(item){ window.open(item.read_html_url,'_blank') //this.$router.push({path:'/post/'+item.alias}) }, }, created: function(){ }, mounted: function(){ let _this = this; $.ajax({ url:'/www/qk/api/tabs-tjwz', type:'get', success:function(res){ _this.treeData = window._utils.dealTree(res.data,2); debugger; } }) this.searchKey = this.$route.query.search; if(this.searchKey){ $.ajax({ url:'/www/dd/cms/json-search?query='+this.searchKey+'&pi=1&ps=10', type:'get', success:function(res){ _this.total = res.pager.total; _this.paperList = res.data; } }) }else{ this.getPaperList(); } }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); })();