yujialong 2 years ago
parent ab7d6de9fd
commit 11e903d5e5
  1. 2
      src/App.vue
  2. 2
      src/layouts/navbar/index.vue
  3. 3
      src/mixins/article/index.js
  4. 60
      src/mixins/estate/index.js
  5. 61
      src/mixins/overview/index.js
  6. 12
      src/mixins/page/index.js
  7. 5
      src/pages/column/index.vue
  8. 3
      src/pages/estate/event/index.vue
  9. 4
      src/pages/estate/location/index.vue
  10. 4
      src/pages/estate/orgSetup/index.vue
  11. 4
      src/pages/estate/survey/index.vue
  12. 2
      src/pages/news/index.vue
  13. 3
      src/pages/overviewDevHistory/index.vue
  14. 4
      src/pages/overviewIntro/index.vue
  15. 4
      src/pages/overviewLocation/index.vue
  16. 4
      src/pages/overviewSetup/index.vue
  17. 4
      src/pages/overviewTrailer/index.vue
  18. 11
      src/pages/publication/index.vue
  19. 28
      src/pages/publication/single.vue
  20. 4
      src/pages/publish/index.vue

@ -10,7 +10,6 @@ import util from '@/libs/util';
export default {
name: 'App',
created() {
console.log('i18n=>',this.$i18n.locale)
//localStorage
if (util.local.get(Setting.storeKey)) {
this.$store.replaceState(Object.assign({}, this.$store.state, util.local.get(Setting.storeKey)));
@ -91,7 +90,6 @@ export default {
window.onbeforeunload = function(){
sessionStorage.removeItem('navPageSize')
}
console.log('document.body.clientWidth=>', document.body.clientWidth)
if(document.body.clientWidth > 1600 ) {
sessionStorage.setItem('navPageSize', 10)
}else if(document.body.clientWidth > 1500 && document.body.clientWidth <= 1600) {

@ -71,7 +71,7 @@ export default {
//
getColumn() {
this.$post(this.api.listWithTree, {
siteId: this.$route.query.siteId || this.site,
siteId: this.site,
columnName: '',
templateId: '',
typeId : '',

@ -18,9 +18,6 @@ export default {
// 点击栏目回调
columnTo(to) {
const { typeId,menuVisible } = to
console.log('typeId=>' ,typeId)
console.log('to=>' ,to)
console.log('menuVisible=>' ,menuVisible)
// 跳转链接
if (typeId === 2) {
if ( menuVisible === 1 && to.children.find(i=>i.menuVisible ===1)) return

@ -1,9 +1,13 @@
export default {
data() {
return {
tabs: ['产业光源概况', '大事记', '机构设置', '地理位置'],
active: +this.$route.query.id,
tabs: [],
}
},
mounted() {
this.getColumn()
},
methods: {
// 获取文章详情
getInfo() {
@ -19,35 +23,33 @@ export default {
}
}).catch(err => {})
},
// tab回调
tabChange(i) {
this.active = i
// 跳转到固定的长页,这里的id不能变
let path = '/overviewIntro?id=220'
if (i == 1) path = '/overviewDevHistory?id=214'
if (i == 2) path = '/overviewTrailer?id=215'
if (i == 3) path = '/overviewLocation?id=216'
this.$router.push(path + '&siteId=3')
// 获取所有栏目
getColumn() {
this.$post(this.api.listWithTreeMenuVisible, {
siteId: this.site,
columnName: '',
templateId: '',
typeId: '',
isSort: 1
})
.then(({ data }) => {
this.getParent(data)
})
.catch((err) => { });
},
tabChangeNewPage(i) {
console.log("process.env.NODE_ENV === 'development'",)
const devServer = process.env.NODE_ENV === 'development'
let path
if (devServer) {
path = '/estate/survey?id=258'
if (i == 1) path = '/estate/event?id=259'
if (i == 2) path = '/estate/orgSetup?id=270'
if (i == 3) path = '/estate/location?id=261'
}else {
path = '/estate/survey?id=233'
if (i == 1) path = '/estate/event?id=234'
if (i == 2) path = '/estate/orgSetup?id=235'
if (i == 3) path = '/estate/location?id=236'
// 获取父级
getParent(data, parent = {}) {
for (const e of data) {
if (e.id == this.id) {
this.tabs = parent.children
} else if (e.children.length) {
this.getParent(e.children, e)
}
}
this.active = i
// 跳转到固定的长页,这里的id不能变
console.log('path=>',path)
this.$router.push(path + '&siteId=5')
}
},
// tab回调
tabChange(item) {
this.$router.push(`/${item.path}?id=${item.id}&siteId=${item.siteId}`)
},
}
};

@ -1,9 +1,13 @@
export default {
data() {
return {
tabs: ['S³FEL介绍', '发展历程', 'S³FEL宣传片', '地理位置', '机构设置'],
active: +this.$route.query.id,
tabs: [],
}
},
mounted() {
this.getColumn()
},
methods: {
// 获取文章详情
getInfo() {
@ -14,41 +18,38 @@ export default {
const json = JSON.parse(this.preview ?
data :
data[data.length - 1][data[data.length - 1].state ? 'theEditedJson' : 'jsonBeforeEditing'])
console.log('json=》',json)
this.modules = json
console.log("🚀 ~ file: index.vue ~ line 180 ~ this.$post ~ json", json)
}
}).catch(err => {})
},
// 获取所有栏目
getColumn() {
this.$post(this.api.listWithTreeMenuVisible, {
siteId: this.site,
columnName: '',
templateId: '',
typeId: '',
isSort: 1
})
.then(({ data }) => {
this.getParent(data)
})
.catch((err) => { });
},
// 获取父级
getParent(data, parent = {}) {
for (const e of data) {
if (e.id == this.id) {
this.tabs = parent.children
} else if (e.children.length) {
this.getParent(e.children, e)
}
}
},
// tab回调
tabChange(i) {
this.active = i
// 跳转到固定的长页,这里的id不能变
let path = '/overviewIntro?id=378'
if (i == 1) path = '/overviewDevHistory?id=379'
if (i == 2) path = '/overviewTrailer?id=380'
if (i == 3) path = '/overviewLocation?id=381'
if (i == 4) path = '/overviewSetup?id=382'
this.$router.push(path + '&siteId=4')
tabChange(item) {
this.$router.push(`/${item.path}?id=${item.id}&siteId=${item.siteId}`)
},
},
filters: {
i18nName(name,type) {
switch (name) {
case 'S³FEL介绍':
return type.t('column.sfeLintroduce')
case '发展历程':
return type.t('column.develHistory')
case 'S³FEL宣传片':
return type.t('column.sfeltrailer')
case '地理位置':
return type.t('column.geographicLocation')
case '机构设置':
return type.t('column.organization')
default:
return name
}
}
}
};

@ -3,13 +3,17 @@ import Util from '@/libs/util'
export default {
data() {
return {
site: this.$store.state.content.site,
id: this.$route.query.id,
preview: this.$route.query.preview,
modules: [],
articles: []
}
},
computed: {
site() {
return this.$route.query.siteId || this.$store.state.content.site
}
},
mounted() {
this.getInfo && this.id && this.getInfo()
},
@ -32,7 +36,7 @@ export default {
} else { // 栏目
href = '/column?id=' + link.columnId[link.columnId.length - 1]
}
href += '&siteId=' + (this.$route.query.siteId || this.site)
href += '&siteId=' + (this.site)
if (!link.articleId) href = this.$router.resolve(href).href
} else if (type === 3) { // 站外链接
if (link.otherArticleId) { // 文章
@ -83,7 +87,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]
@ -95,7 +99,7 @@ export default {
}
this.toHref(item.isOpen, href)
} else {
this.$router.push(`/article?articleId=${item.id}&siteId=${this.$route.query.siteId || this.site}&id=${this.id}&columnName=${form.columnTitle === 2 ? form.columnTitleCustom : form.columnName}&path=${this.$route.path.replace('/', '')}`)
this.$router.push(`/article?articleId=${item.id}&siteId=${this.site}&id=${this.id}&columnName=${form.columnTitle === 2 ? form.columnTitleCustom : form.columnName}&path=${this.$route.path.replace('/', '')}`)
}
},
// 关联栏目的查看全部跳转

@ -473,10 +473,8 @@ export default {
if (typeId === 4 && !fromColumn) {
id = [this.deepestId];
}
console.log('id=>',id)
this.getAllId = id
this.getArticle(id);
console.log('data=>',data)
this.columns = data;
// banner
if (!this.info.columnBanner) {
@ -518,7 +516,6 @@ export default {
siteId: this.site
})
.then(({ data }) => {
console.log(99122)
this.news = Util.removeTag(data.records);
})
.catch((res) => { });
@ -592,7 +589,6 @@ export default {
this.labels.map((e) => {
if (this.lableId.includes(e.id)) labelName.push(e.labelName);
});
console.log('====>',columnIds)
this.$post(this.api.newlyPublishedArticles, {
siteId: this.site,
columnIds,
@ -629,7 +625,6 @@ export default {
filter() {
this.page = 1;
this.isFilter = !!(this.form.classificationId || this.form.title || this.form.convokeType || this.lableId.length); //
console.log('this.isFilter=>' ,this.isFilter)
let id = [];
if (this.isFilter) {
this.getIds(this.columns, id);

@ -10,7 +10,7 @@
<ul class="tabs wow fadeInLeft">
<template v-for="(item, i) in tabs">
<li :class="{active: i == active}" :key="i" @click="tabChangeNewPage(i)">{{ item }}</li>
<li :class="{active: item.id == active}" :key="i" @click="tabChange(item)">{{ item.columnName }}</li>
</template>
</ul>
@ -53,7 +53,6 @@ export default {
mixins: [mixins, overview],
data() {
return {
active: 1,
curYear: 0
}
},

@ -10,7 +10,7 @@
<ul class="tabs wow fadeInLeft">
<template v-for="(item, i) in tabs">
<li :class="{active: i == active}" :key="i" @click="tabChangeNewPage(i)">{{ item }}</li>
<li :class="{active: item.id == active}" :key="i" @click="tabChange(item)">{{ item.columnName }}</li>
</template>
</ul>
@ -54,7 +54,7 @@ export default {
mixins: [mixins, overview],
data() {
return {
active: 3
}
},
mounted() {

@ -10,7 +10,7 @@
<ul class="tabs wow fadeInLeft">
<template v-for="(item, i) in tabs">
<li :class="{active: i == active}" :key="i" @click="tabChangeNewPage(i)">{{ item }}</li>
<li :class="{active: item.id == active}" :key="i" @click="tabChange(item)">{{ item.columnName }}</li>
</template>
</ul>
@ -37,7 +37,7 @@ export default {
mixins: [mixins, overview],
data() {
return {
active: 2
}
},
mounted() {

@ -10,7 +10,7 @@
<ul class="tabs wow fadeInLeft">
<template v-for="(item, i) in tabs">
<li :class="{active: i == active}" :key="i" @click="tabChangeNewPage(i)">{{ item }}</li>
<li :class="{active: item.id == active}" :key="i" @click="tabChange(item)">{{ item.columnName }}</li>
</template>
</ul>
@ -37,7 +37,7 @@ export default {
mixins: [mixins, overview],
data() {
return {
active: 0
}
},
mounted() {

@ -250,7 +250,7 @@ export default {
const ids = href.split('-') // -
// idsiteSelection
const site = cType === 1 ?
(this.$route.query.siteId || this.site) :
(this.site) :
data.siteSelection
if (ids[1]) { //
href = '/article?id=' + ids[1]

@ -9,7 +9,7 @@
<ul class="tabs wow fadeInLeft">
<template v-for="(item, i) in tabs">
<li :class="{active: i == active}" :key="i" @click="tabChange(i)">{{ item | i18nName($i18n) }}</li>
<li :class="{active: item.id == active}" :key="i" @click="tabChange(item)">{{ item.columnName }}</li>
</template>
</ul>
@ -72,7 +72,6 @@ export default {
mixins: [mixins, overview],
data() {
return {
active: 1,
curYear: 0
}
},

@ -9,7 +9,7 @@
<ul class="tabs wow fadeInLeft">
<template v-for="(item, i) in tabs">
<li :class="{active: i == active}" :key="i" @click="tabChange(i)">{{ item | i18nName($i18n) }}</li>
<li :class="{active: item.id == active}" :key="i" @click="tabChange(item)">{{ item.columnName }}</li>
</template>
</ul>
@ -43,7 +43,7 @@ export default {
mixins: [mixins, overview],
data() {
return {
active: 0,
}
},
mounted() {

@ -9,7 +9,7 @@
<ul class="tabs wow fadeInLeft">
<template v-for="(item, i) in tabs">
<li :class="{active: i == active}" :key="i" @click="tabChange(i)">{{ item | i18nName($i18n) }}</li>
<li :class="{active: item.id == active}" :key="i" @click="tabChange(item)">{{ item.columnName }}</li>
</template>
</ul>
@ -27,7 +27,7 @@ export default {
mixins: [mixins, overview],
data() {
return {
active: 3
}
},
mounted() {

@ -9,7 +9,7 @@
<ul class="tabs wow fadeInLeft">
<template v-for="(item, i) in tabs">
<li :class="{active: i == active}" :key="i" @click="tabChange(i)">{{ item | i18nName($i18n) }}</li>
<li :class="{active: item.id == active}" :key="i" @click="tabChange(item)">{{ item.columnName }}</li>
</template>
</ul>
@ -37,7 +37,7 @@ export default {
mixins: [mixins, overview],
data() {
return {
active: 4
}
},
mounted() {

@ -9,7 +9,7 @@
<ul class="tabs wow fadeInLeft">
<template v-for="(item, i) in tabs">
<li :class="{active: i == active}" :key="i" @click="tabChange(i)">{{ item | i18nName($i18n) }}</li>
<li :class="{active: item.id == active}" :key="i" @click="tabChange(item)">{{ item.columnName }}</li>
</template>
</ul>
@ -33,7 +33,7 @@ export default {
mixins: [mixins, overview],
data() {
return {
active: 2
}
},
mounted() {

@ -37,6 +37,7 @@ export default {
info: {},
active: 0,
curId: '',
tab: this.$route.query.tab,
tabs: []
}
},
@ -63,8 +64,14 @@ export default {
//
getColumn() {
this.$post(`${this.api.getsSublevelColumnsUnderALevel}?id=${this.id}&siteId=${this.site}`).then(({ data }) => {
if (data.length) {
this.tabs = data
this.tabs = data
// urltabtabtabid
if (this.tab) {
const id = +this.tab
const item = data.find(e => e.id == id)
this.active = item ? item.listStyleId : ''
this.curId = id
} else if (data.length) {
this.active = data[0].listStyleId
this.curId = data[0].id
}

@ -40,6 +40,7 @@ export default {
],
info: {},
type: +this.$route.query.type, // listStyleId
parent: null
}
},
components: {
@ -49,6 +50,7 @@ export default {
Monograph
},
mounted() {
this.getColumn()
this.getInfo()
},
methods: {
@ -61,6 +63,32 @@ export default {
})
.catch((res) => { })
},
//
getColumn() {
this.$post(this.api.listWithTreeMenuVisible, {
siteId: this.site,
columnName: '',
templateId: '',
typeId: '',
isSort: 1
})
.then(({ data }) => {
this.getParent(data)
const list = this.parent.children
list && list.length && list.every(e => e.templateId == 11) && this.$router.push(`/publication?siteId=${this.site}&id=${this.parent.id}&tab=${this.id}`) //
})
.catch((err) => { });
},
//
getParent(data, parent = {}) {
for (const e of data) {
if (e.id == this.id) {
this.parent = parent
} else if (e.children.length) {
this.getParent(e.children, e)
}
}
},
}
};
</script>

@ -57,9 +57,7 @@ export default {
//
getArticle() {
this.$post(this.api.newlyPublishedArticles, {
siteId: this.$route.query.siteId || this.site,
siteId: this.site,
columnIds: [this.id],
pageNum: this.page,
pageSize: this.pageSize,

Loading…
Cancel
Save