出版物添加

master
yujialong 2 years ago
parent f246835e34
commit 4ad44c9d5c
  1. 37
      src/const/column.js
  2. 9
      src/pages/column/index.vue
  3. 82
      src/pages/publication/index.vue
  4. 157
      src/pages/publication/monograph.vue
  5. 88
      src/pages/publication/patent.vue
  6. 58
      src/pages/publication/thesis.vue

@ -22,6 +22,32 @@
name: '子级优先栏目' name: '子级优先栏目'
} }
], ],
long: [
{
name: 'SFEL',
path: 'sfel'
},
{
name: 'SFEL-科普之窗',
path: 'science'
},
{
name: 'SFEL-装置介绍-实验站',
path: 'exp'
},
{
name: 'SFEL-人才队伍',
path: 'talent'
},
{
name: 'SFEL-用户共享',
path: 'userSharing'
},
{
name: 'SFEL-概况',
path: 'survey'
},
],
// 出版物类型 // 出版物类型
publicationTypes: [ publicationTypes: [
{ {
@ -61,4 +87,15 @@
name: '产品资料和其它' name: '产品资料和其它'
} }
], ],
// 专利类别
patentClasses: [
{
id: 1,
name: '发明专利'
},
{
id: 2,
name: '实用外观'
}
]
} }

@ -217,11 +217,18 @@ export default {
if (data.typeId !== 3) this.loaded = true; // if (data.typeId !== 3) this.loaded = true; //
this.info = data; this.info = data;
this.showNav = this.showNavIds.includes(data.listStyleId); this.showNav = this.showNavIds.includes(data.listStyleId);
this.handlePublication();
this.getLeftColumn(); this.getLeftColumn();
this.getClassification(); this.getClassification();
}) })
.catch((res) => { }); .catch((res) => { });
}, },
//
handlePublication() {
this.$post(`${this.api.getsSublevelColumnsUnderALevel}?id=${this.id}&siteId=${this.site}`).then(({ data }) => {
data.length && data.every(e => e.templateId == 11) && this.$router.push(`/publication?siteId=${this.site}&id=${this.id}`) //
}).catch(err => {})
},
// banner // banner
getBanner(data) { getBanner(data) {
for (const e of data) { for (const e of data) {
@ -298,7 +305,7 @@ export default {
}, },
// //
getLeftColumn() { getLeftColumn() {
this.$post(`${this.api.oneLevelChecksThemAll}?id=${this.id}&isSort=1`) this.$post(`${this.api.oneLevelChecksThemAll}?id=${this.id}&isSort=1&siteId=${this.site}`)
.then(({ data }) => { .then(({ data }) => {
const fromColumn = this.$route.query.column; // column const fromColumn = this.$route.query.column; // column
const { typeId } = this.info; const { typeId } = this.info;

@ -1,74 +1,108 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<div class="single-banner single-banner-overview"> <div class="banner">
<img class="banner-img" :src="modules[0].form.pic" alt=""> <img width="100%" height="280" :src="info.columnBanner" alt="" />
<div class="texts"> <div class="texts">
<h6 class="banner-title">{{ modules[0].form.title }}</h6> <p class="text">{{ info.columnName }}</p>
</div> </div>
</div> </div>
<ul class="tabs wow fadeInLeft"> <ul class="tabs wow fadeInLeft">
<template v-for="(item, i) in tabs"> <template v-for="(item, i) in tabs">
<li :class="{active: i == active}" :key="i" @click="tabChange(i)">{{ item }}</li> <li :class="{active: item.listStyleId == active}" :key="i" @click="tabChange(item, i)">{{ item.columnName }}</li>
</template> </template>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<Thesis v-if="!active" /> <!-- 根据栏目的listStyleId判断是哪个列表样式这个出版物页面只显示下面三个列表样式 -->
<Patent v-if="active === 1" /> <!-- 论文 -->
<Thesis v-if="active === 46" :id.sync="curId" />
<!-- 专利 -->
<Patent v-if="active === 44" :id.sync="curId" />
<!-- 专著 -->
<Monograph v-if="active === 45" :id.sync="curId" />
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import mixins from '@/mixins/page' import mixins from '@/mixins/article'
import WOW from 'wow.js'
import Thesis from './thesis' import Thesis from './thesis'
import Patent from './patent' import Patent from './patent'
import Monograph from './monograph'
export default { export default {
mixins: [mixins], mixins: [mixins],
data() { data() {
return { return {
info: {},
active: 0, active: 0,
tabs: ['论文', '专利', '专著'] curId: '',
tabs: []
} }
}, },
components: { components: {
Thesis, Thesis,
Patent Patent,
Monograph
}, },
mounted() { mounted() {
new WOW().init() this.getInfo()
this.getColumn()
}, },
methods: { methods: {
// //
getInfo() { getInfo() {
// / this.id &&
this.$post(`${this.api[this.preview ? 'getRedisCache' : 'findPage']}?columnId=${this.id}`).then(({ data }) => { this.$post(`${this.api.findColumn}?id=${this.id}`)
.then(({ data }) => {
this.info = data
})
.catch((res) => { })
},
//
getColumn() {
this.$post(`${this.api.getsSublevelColumnsUnderALevel}?id=${this.id}&siteId=${this.site}`).then(({ data }) => {
if (data.length) { if (data.length) {
// state1theEditedJson稿0jsonBeforeEditing this.tabs = data
const json = JSON.parse(this.preview ? this.active = data[0].listStyleId
data : this.curId = data[0].id
data[data.length - 1][data[data.length - 1].state ? 'theEditedJson' : 'jsonBeforeEditing'])
this.modules = json
console.log("🚀 ~ file: index.vue ~ line 180 ~ this.$post ~ json", json)
} }
}).catch(err => {}) }).catch(err => {})
}, },
// tab // tab
tabChange(i) { tabChange(item) {
this.active = i this.active = item.listStyleId
this.curId = item.id
}, },
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import url(../../plugins/wow/animate.css);
@import "../../styles/page/page.scss";
.wrap { .wrap {
background-color: #f9f9f9; background-color: #f9f9f9;
} }
.banner {
position: relative;
height: 280px;
color: #fff;
.texts {
position: absolute;
top: 123px;
left: 243px;
}
.text {
font-size: 3.42rem;
font-weight: 600;
@include ellipsis;
}
.sub {
margin-top: 10px;
font-size: 2rem;
}
}
.tabs { .tabs {
display: flex; display: flex;
justify-content: center; justify-content: center;

@ -0,0 +1,157 @@
<template>
<div class="wrap">
<div class="forms">
<div class="item">
<span class="label">出版时间</span>
<el-date-picker
style="width: 300px"
v-model="form.publicationYear"
type="year"
placeholder="请选择出版时间"
format="yyyy"
value-format="yyyy"
@change="initData">
</el-date-picker>
</div>
<div class="search">
<input type="text" placeholder="请输入著作名称/出版社名称/编写人员" v-model="form.title">
<i class="icon">
<img src="@/assets/images/search-white.png" alt="">
</i>
</div>
</div>
<el-table :data="list" class="patent-table" ref="table" stripe header-align="center">
<el-table-column prop="title" label="著作名称" align="center" min-width="150"></el-table-column>
<el-table-column prop="publishingHouse" label="出版社" align="center" min-width="150"></el-table-column>
<el-table-column prop="writersAndEditors" label="编写人员" align="center" min-width="150"></el-table-column>
<el-table-column prop="publicationYear" label="出版时间" align="center" min-width="150"></el-table-column>
</el-table>
<div class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
</div>
</div>
</template>
<script>
import Util from '@/libs/util';
import ColumnConst from '@/const/column'
export default {
props: ['id'],
data() {
return {
patentClasses: ColumnConst.patentClasses,
searchTimer: null,
form: {
patentClassId: '',
applicationDate: ''
},
classifications: [],
list: [],
page: 1,
pageSize: 10,
total: 0,
}
},
watch: {
id() {
this.id && this.initData()
},
'form.title': function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData();
}, 500);
}
},
mounted() {
this.initData()
},
methods: {
//
getArticle() {
this.id && this.$post(this.api.newlyPublishedArticles, {
siteId: this.$route.query.siteId || this.$store.state.content.site,
columnIds: this.id,
pageNum: this.page,
pageSize: this.pageSize,
...this.form
})
.then(({ data }) => {
this.list = Util.removeTag(data.records);
this.total = +data.total;
})
.catch((res) => { });
},
initData() {
this.page = 1
this.getArticle()
},
currentChange(val) {
this.page = val
this.getData()
},
}
};
</script>
<style lang="scss" scoped>
.forms {
display: flex;
align-items: center;
padding: 30px;
margin-bottom: 20px;
background-color: #fff;
.item {
display: inline-flex;
align-items: center;
margin-right: 30px;
}
.label {
font-size: 16px;
color: #333;
white-space: nowrap;
}
/deep/.el-input__inner {
width: 100%;
height: 48px;
line-height: 48px;
border: 0;
background: #F7F7F7;
}
.search {
display: inline-flex;
width: 34%;
input {
width: 100%;
height: 48px;
padding: 0 15px;
font-size: 14px;
color: #333;
background: #F7F7F7;
border: 0;
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
&:focus {
outline: none;
}
}
}
.icon {
display: inline-flex;
justify-content: center;
align-items: center;
width: 62px;
height: 48px;
background: #1583FF;
border-radius: 0px 6px 6px 0px;
cursor: pointer;
}
}
/deep/.patent-table {
thead tr, thead th {
color: #fff;
background-color: #1583FF;
}
}
</style>

@ -3,25 +3,26 @@
<div class="forms"> <div class="forms">
<div class="item"> <div class="item">
<span class="label">专利类别</span> <span class="label">专利类别</span>
<el-select v-model="form.classificationId"> <el-select v-model="form.patentClassId">
<el-option <el-option
v-for="item in classifications" v-for="item in patentClasses"
:key="item.id" :key="item.id"
:label="item.classificationName" :label="item.name"
:value="item.id"> :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div class="item"> <div class="item">
<span class="label">申请日期</span> <span class="label">申请日期</span>
<el-select v-model="form.classificationId"> <el-date-picker
<el-option v-model="form.applicationDate"
v-for="item in classifications" type="date"
:key="item.id" placeholder="选择日期"
:label="item.classificationName" format="yyyy-MM-dd"
:value="item.id"> :clearable="false"
</el-option> value-format="yyyy-MM-dd"
</el-select> @change="initData">
</el-date-picker>
</div> </div>
<div class="search"> <div class="search">
<input type="text" placeholder="请输入专利名称/发明人姓名/申请号员" v-model="form.title"> <input type="text" placeholder="请输入专利名称/发明人姓名/申请号员" v-model="form.title">
@ -32,12 +33,16 @@
</div> </div>
<el-table :data="list" class="patent-table" ref="table" stripe header-align="center"> <el-table :data="list" class="patent-table" ref="table" stripe header-align="center">
<el-table-column prop="name" label="专利名称" align="center" min-width="150"></el-table-column> <el-table-column prop="title" label="专利名称" align="center" min-width="150"></el-table-column>
<el-table-column prop="name" label="专利类别" align="center" min-width="150"></el-table-column> <el-table-column label="专利类别" align="center" min-width="150">
<el-table-column prop="name" label="申请号" align="center" min-width="150"></el-table-column> <template slot-scope="scope">
<el-table-column prop="name" label="申请日期" align="center" min-width="150"></el-table-column> {{ scope.row.patentClassId ? patentClasses.find(e => e.id == scope.row.patentClassId).name : '' }}
<el-table-column prop="name" label="授权日期" align="center" min-width="150"></el-table-column> </template>
<el-table-column prop="name" label="发明人" align="center" min-width="150"></el-table-column> </el-table-column>
<el-table-column prop="applicationNumber" label="申请号" align="center" min-width="150"></el-table-column>
<el-table-column prop="applicationDate" label="申请日期" align="center" min-width="150"></el-table-column>
<el-table-column prop="dateOfAuthorization" label="授权日期" align="center" min-width="150"></el-table-column>
<el-table-column prop="inventor" label="发明人" align="center" min-width="150"></el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination> <el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
@ -46,30 +51,59 @@
</template> </template>
<script> <script>
import Util from '@/libs/util';
import ColumnConst from '@/const/column'
export default { export default {
props: ['id'],
data() { data() {
return { return {
patentClasses: ColumnConst.patentClasses,
searchTimer: null,
form: { form: {
patentClassId: '',
applicationDate: ''
}, },
classifications: [], classifications: [],
list: [ list: [],
{
name: '副驾驶的路径'
},
{
name: '副驾驶的路径'
}
],
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
} }
}, },
watch: {
id() {
this.id && this.initData()
},
'form.title': function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData();
}, 500);
}
},
mounted() { mounted() {
this.initData()
}, },
methods: { methods: {
//
getArticle() {
this.id && this.$post(this.api.newlyPublishedArticles, {
siteId: this.$route.query.siteId || this.$store.state.content.site,
columnIds: this.id,
pageNum: this.page,
pageSize: this.pageSize,
...this.form
})
.then(({ data }) => {
this.list = Util.removeTag(data.records);
this.total = +data.total;
})
.catch((res) => { });
},
initData() {
this.page = 1
this.getArticle()
},
currentChange(val) { currentChange(val) {
this.page = val this.page = val
this.getData() this.getData()

@ -21,37 +21,67 @@
</div> </div>
<ul class="list"> <ul class="list">
<li> <li v-for="(item, i) in articles" :key="i">
<h6>新型靶向药物开发与重大疾病诊疗一代高性能绿色安全新能源汽车</h6> <h6>{{ item.title }}</h6>
<p class="meta">作者: Xia, Ming; Huang, Zunkai; Tian, Li; Wang, Hui; Chang, Victor; Zhu, Yongxin; Feng, Songlin</p> <p class="meta">作者: {{ item.author }}</p>
<p class="meta">期刊名称: J. Syst. Architect.</p> <p class="meta">期刊名称: {{ item.periodicalName }}</p>
<p class="meta">出版年: 2021 : 115 文献号: 101991</p> <p class="meta">出版年: {{ item.publicationYear }} : {{ item.reel }} 文献号: {{ item.documentNumber }}</p>
</li>
<li>
<h6>新型靶向药物开发与重大疾病诊疗一代高性能绿色安全新能源汽车</h6>
<p class="meta">作者: Xia, Ming; Huang, Zunkai; Tian, Li; Wang, Hui; Chang, Victor; Zhu, Yongxin; Feng, Songlin</p>
<p class="meta">期刊名称: J. Syst. Architect.</p>
<p class="meta">出版年: 2021 : 115 文献号: 101991</p>
</li> </li>
</ul> </ul>
</div> </div>
</template> </template>
<script> <script>
import Util from '@/libs/util';
export default { export default {
props: ['id'],
data() { data() {
return { return {
searchTimer: null,
form: { form: {
}, },
classifications: [] classifications: [],
articles: [],
page: 1,
pageSize: 10,
total: 0,
}
},
watch: {
id() {
this.id && this.initData()
},
'form.title': function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData();
}, 500);
} }
}, },
mounted() { mounted() {
this.initData()
}, },
methods: { methods: {
//
getArticle() {
this.id && this.$post(this.api.newlyPublishedArticles, {
siteId: this.$route.query.siteId || this.$store.state.content.site,
columnIds: this.id,
pageNum: this.page,
pageSize: this.pageSize,
...this.form
})
.then(({ data }) => {
this.articles = Util.removeTag(data.records);
this.total = +data.total;
})
.catch((res) => { });
},
initData() {
this.page = 1
this.getArticle()
},
} }
}; };
</script> </script>

Loading…
Cancel
Save