diff --git a/src/assets/images/publication-bg.png b/src/assets/images/publication-bg.png new file mode 100644 index 0000000..3b8c9b6 Binary files /dev/null and b/src/assets/images/publication-bg.png differ diff --git a/src/mixins/article/index.js b/src/mixins/article/index.js index 78b4126..eddd63f 100644 --- a/src/mixins/article/index.js +++ b/src/mixins/article/index.js @@ -30,7 +30,7 @@ export default { const ids = href.split('-') // 栏目文章是用-分割的,栏目是必选,文章不是必选。选择了文章则跳转到文章页,否则跳转到栏目页 // 站点id:站内链接取当前站点,其他站点链接取siteSelection const site = cType === 1 ? - (this.$route.query.siteId || this.site) : + (this.site) : to.siteSelection if (ids[1]) { // 文章 href = '/article?articleId=' + ids[1] @@ -54,7 +54,7 @@ export default { } } else if (typeId !== 4 || (typeId === 4 && !to.children.length)) { // 常规栏目跳转到column页,长页栏目直接获取path - this.$router.push(`/${typeId === 3 ? to.path : 'column'}?id=${to.id}&siteId=${this.$route.query.siteId || this.site}`).catch(err => {}) + this.$router.push(`/${typeId === 3 ? to.path : 'column'}?id=${to.id}&siteId=${this.site}`).catch(err => {}) } }, // 跳转文章页面 @@ -66,7 +66,7 @@ export default { const ids = href.split('-') // 栏目文章是用-分割的,栏目是必选,文章不是必选。选择了文章则跳转到文章页,否则跳转到栏目页 // 站点id:站内链接取当前站点,其他站点链接取siteSelection const site = cType === 1 ? - (this.$route.query.siteId || this.site) : + (this.site) : item.siteSelection if (ids[1]) { // 文章 href = '/article?articleId=' + ids[1] @@ -89,7 +89,7 @@ export default { location.href = href } } else { - this.$router.push(`/article?articleId=${item.id}&site=${this.$route.query.siteId || this.site}&id=${item.columnId}`) + this.$router.push(`/article?articleId=${item.id}&site=${this.site}&id=${item.columnId}`) } } } diff --git a/src/pages/column/index.vue b/src/pages/column/index.vue index 2f43908..453e57e 100644 --- a/src/pages/column/index.vue +++ b/src/pages/column/index.vue @@ -267,9 +267,13 @@ export default { }, // 判断是否是出版物模板,如果是则跳转 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 => {}) + if (this.info.templateId === 11) { // 出版社直接跳转到单个的出版社页面(/publication/single),否则就查询子级是否是出版社模板(templateId = 11),是的话就跳转到/publication/index,必须是每个子级都是出版社才跳转,后者是前者的集合(专利、专著、论文) + this.$router.push(`/publication/single?siteId=${this.site}&id=${this.id}&type=${this.info.listStyleId}`) + } else { + 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 规则:当前栏目有上传的,用当前的,没有上传的话,读取上级的(上级没有读上上级,以此类推)都没有的读取默认的 getBanner(data) { diff --git a/src/pages/publication/index.vue b/src/pages/publication/index.vue index c0b4402..715cd00 100644 --- a/src/pages/publication/index.vue +++ b/src/pages/publication/index.vue @@ -55,6 +55,7 @@ export default { this.id && this.$post(`${this.api.findColumn}?id=${this.id}`) .then(({ data }) => { + if (!data.columnBanner) data.columnBanner = require('@/assets/images/publication-bg.png'); this.info = data }) .catch((res) => { }) diff --git a/src/pages/publication/monograph.vue b/src/pages/publication/monograph.vue index 6865042..0c4895c 100644 --- a/src/pages/publication/monograph.vue +++ b/src/pages/publication/monograph.vue @@ -10,14 +10,12 @@ placeholder="请选择出版时间" format="yyyy" value-format="yyyy" + clearable @change="initData"> @@ -96,73 +94,11 @@ export default { \ No newline at end of file diff --git a/src/pages/publication/patent.vue b/src/pages/publication/patent.vue index dbfcf4b..5fc5ea2 100644 --- a/src/pages/publication/patent.vue +++ b/src/pages/publication/patent.vue @@ -3,7 +3,7 @@
专利类别: - +
@@ -114,73 +110,11 @@ export default { \ No newline at end of file diff --git a/src/pages/publication/single.vue b/src/pages/publication/single.vue new file mode 100644 index 0000000..4f5143e --- /dev/null +++ b/src/pages/publication/single.vue @@ -0,0 +1,115 @@ + + + + + \ No newline at end of file diff --git a/src/pages/publication/thesis.vue b/src/pages/publication/thesis.vue index fe1107e..0ab5ddf 100644 --- a/src/pages/publication/thesis.vue +++ b/src/pages/publication/thesis.vue @@ -10,14 +10,12 @@ placeholder="请选择出版时间" format="yyyy" value-format="yyyy" + clearable @change="initData"> @@ -89,58 +87,7 @@ export default { \ No newline at end of file diff --git a/src/router/modules/publication.js b/src/router/modules/publication.js index dc77df7..3d379b8 100644 --- a/src/router/modules/publication.js +++ b/src/router/modules/publication.js @@ -5,10 +5,12 @@ export default { component: BasicLayout, children: [ { - name, path: `/${name}`, component: () => import(`@/pages/${name}`), - meta: { title: '' } + }, + { + path: `single`, + component: () => import(`@/pages/${name}/single`), }, ] }; diff --git a/src/styles/page/publication.scss b/src/styles/page/publication.scss new file mode 100644 index 0000000..e32f15a --- /dev/null +++ b/src/styles/page/publication.scss @@ -0,0 +1,64 @@ +.forms { + display: flex; + align-items: center; + padding: 15px; + 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: 38px; + line-height: 38px; + border: 0; + background: #F7F7F7; + } + .search { + display: inline-flex; + width: 34%; + input { + width: 100%; + height: 38px; + 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: 38px; + background: #1583FF; + border-radius: 0px 6px 6px 0px; + cursor: pointer; + } +} + +@media (max-width: 1200px) { + .forms { + padding: 1.25rem; + flex-direction: column; + .item, .search,div { + width: 80%;margin: 0 auto; + justify-content: center; + margin-top: 20px; + } + } +} \ No newline at end of file