Compare commits

...

4 Commits

  1. 1502
      src/const/modules.js
  2. 2
      src/pages/article/add/editor.js
  3. 13
      src/pages/article/add/index.vue
  4. 248
      src/pages/article/list/index.vue
  5. 12
      src/pages/column/page/application.vue
  6. 4
      src/pages/column/page/contactUs.vue
  7. 26
      src/pages/column/page/governance.vue
  8. 56
      src/store/modules/user.js

File diff suppressed because it is too large Load Diff

@ -309,7 +309,7 @@ export default {
title: '人物详情', description: '', content: ` title: '人物详情', description: '', content: `
<div class="tiny-wrap"> <div class="tiny-wrap">
<div class="people"> <div class="people">
<img class="pic" src="https://new.iasf.ac.cn/images/team/5.png"/> <img class="pic" src="https://www.iasf.ac.cn/images/team/5.png"/>
<div class="texts"> <div class="texts">
<h6>谢明远 XIE Mingyuan</h6> <h6>谢明远 XIE Mingyuan</h6>
<div class="text"> <div class="text">

@ -532,9 +532,9 @@ export default {
classificationId: [ classificationId: [
{ required: false, message: '请选择所属分类', trigger: 'change' } { required: false, message: '请选择所属分类', trigger: 'change' }
], ],
eventProfile: [ // eventProfile: [
{ required: true, message: '请输入活动简介', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
], // ],
releaseTime: [ releaseTime: [
{ required: true, message: '请选择发布日期', trigger: 'change' } { required: true, message: '请选择发布日期', trigger: 'change' }
], ],
@ -1313,7 +1313,12 @@ export default {
this.$post(this.api.updateArticle, form).then(res => { this.$post(this.api.updateArticle, form).then(res => {
this.updateFile(fileId, form, form.id) this.updateFile(fileId, form, form.id)
Util.successMsg('修改成功') Util.successMsg('修改成功')
next ? next() : this.$router.push(`list?columnId=` + form.columnId + (form.columnId != this.originColumnId ? '&last=1' : '')) // last if (next) {
next()
} else {
// last
form.columnId != this.originColumnId ? this.$router.push(`list?columnId=${form.columnId}&last=1`) : this.$router.back()
}
}).catch(err => { }).catch(err => {
this.submiting = false this.submiting = false
}) })

@ -3,189 +3,100 @@
<div style="width: 218px;border-right: 1px solid #EBEDF0"> <div style="width: 218px;border-right: 1px solid #EBEDF0">
<p class="page-name mb">全部栏目</p> <p class="page-name mb">全部栏目</p>
<div style="height: calc(100vh - 190px);overflow: auto"> <div style="height: calc(100vh - 190px);overflow: auto">
<el-tree ref="column" <el-tree ref="column" :data="columns" highlight-current :expand-on-click-node="false" default-expand-all
:data="columns" :props="defaultProps" node-key="id" @node-click="initData">
highlight-current <span class="custom-tree-node" slot-scope="{ node, data }">
:expand-on-click-node="false" <span class="org-name" :title="node.label">{{ node.label }}</span>
default-expand-all
:props="defaultProps"
node-key="id"
@node-click="initData">
<span class="custom-tree-node"
slot-scope="{ node, data }">
<span class="org-name"
:title="node.label">{{ node.label }}</span>
</span> </span>
</el-tree> </el-tree>
</div> </div>
</div> </div>
<div class="p-l-20" <div class="p-l-20" style="width: calc(100% - 219px);">
style="width: calc(100% - 219px);">
<div class="tool"> <div class="tool">
<div class="search-wrap"> <div class="search-wrap">
<el-select v-model="field" <el-select v-model="field" @change="initData">
@change="initData"> <el-option v-for="(item, i) in keywords" :key="i" :label="item.name" :value="item.id">
<el-option v-for="(item, i) in keywords"
:key="i"
:label="item.name"
:value="item.id">
</el-option> </el-option>
</el-select> </el-select>
<el-input class="keyword" <el-input class="keyword" :placeholder="'请输入' + keywords.find(e => e.id === field).name"
:placeholder="'请输入' + keywords.find(e => e.id === field).name" v-model.trim="keyword" clearable></el-input>
v-model.trim="keyword"
clearable></el-input>
</div> </div>
<div class="actions"> <div class="actions">
<el-dropdown class="setting" <el-dropdown class="setting" trigger="click" :hide-on-click="false">
trigger="click" <img class="icon" src="@/assets/images/setting.png" alt="">
:hide-on-click="false">
<img class="icon"
src="@/assets/images/setting.png"
alt="">
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item> <el-dropdown-item>
<el-button @click="resetColumns" <el-button @click="resetColumns" type="text">列重置</el-button>
type="text">列重置</el-button>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item v-for="(column, i) in settings" <el-dropdown-item v-for="(column, i) in settings" :key="i" :divided="i === 0">
:key="i"
:divided="i === 0">
<el-checkbox v-model="column.show">{{ column.name }}</el-checkbox> <el-checkbox v-model="column.show">{{ column.name }}</el-checkbox>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:新增'" <el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:新增'" type="primary" @click="add">新增</el-button>
type="primary" <el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:删除'" @click="batchDel">删除</el-button>
@click="add">新增</el-button>
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:删除'"
@click="batchDel">删除</el-button>
</div> </div>
</div> </div>
<el-table :data="list" <el-table :data="list" class="table" ref="table" header-align="center" @selection-change="handleSelectionChange"
class="table" row-key="id" @sort-change="sortChange">
ref="table" <el-table-column v-if="settings[0].show" type="selection" width="55" align="center"
header-align="center" :reserve-selection="true"></el-table-column>
@selection-change="handleSelectionChange" <el-table-column type="index" width="60" label="序号" align="center">
row-key="id"
@sort-change="sortChange">
<el-table-column v-if="settings[0].show"
type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="60"
label="序号"
align="center">
<template scope="scope"> <template scope="scope">
<span>{{(page - 1) * pageSize + scope.$index + 1}}</span> <span>{{ (page - 1) * pageSize + scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="settings[1].show" <el-table-column v-if="settings[1].show" show-overflow-tooltip prop="title" label="标题" align="center"
show-overflow-tooltip min-width="150"></el-table-column>
prop="title" <el-table-column v-if="settings[2].show" prop="columnName" label="栏目" align="center"
label="标题" min-width="120"></el-table-column>
align="center" <el-table-column v-if="settings[3].show" prop="classificationName" label="所属分类" align="center"
min-width="150"></el-table-column> min-width="120"></el-table-column>
<el-table-column v-if="settings[2].show" <el-table-column v-if="settings[4].show" prop="typeId" label="栏目类型" align="center" min-width="100">
prop="columnName"
label="栏目"
align="center"
min-width="120"></el-table-column>
<el-table-column v-if="settings[3].show"
prop="classificationName"
label="所属分类"
align="center"
min-width="120"></el-table-column>
<el-table-column v-if="settings[4].show"
prop="typeId"
label="栏目类型"
align="center"
min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ types.find(e => e.id === scope.row.typeId).name }} {{ types.find(e => e.id === scope.row.typeId).name }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="settings[5].show" <el-table-column v-if="settings[5].show" prop="founderName" label="录入人" align="center"
prop="founderName" min-width="80"></el-table-column>
label="录入人" <el-table-column v-if="settings[6].show" prop="editorName" label="修改人" align="center"
align="center" min-width="80"></el-table-column>
min-width="80"></el-table-column> <el-table-column v-if="settings[7].show" prop="updateTime" label="修改日期" align="center" min-width="150"
<el-table-column v-if="settings[6].show" sortable="custom"></el-table-column>
prop="editorName" <el-table-column v-if="settings[8].show" prop="releaseTime" label="发布日期" align="center" min-width="100"
label="修改人" sortable="custom"></el-table-column>
align="center" <el-table-column v-if="settings[9].show" prop="totalBrowsing" label="总浏览" align="center"
min-width="80"></el-table-column> min-width="70"></el-table-column>
<el-table-column v-if="settings[7].show" <el-table-column v-if="settings[10].show" prop="workNumber" label="状态" align="center" min-width="80">
prop="updateTime"
label="修改日期"
align="center"
min-width="150"
sortable="custom"></el-table-column>
<el-table-column v-if="settings[8].show"
prop="releaseTime"
label="发布日期"
align="center"
min-width="100"
sortable="custom"></el-table-column>
<el-table-column v-if="settings[9].show"
prop="totalBrowsing"
label="总浏览"
align="center"
min-width="70"></el-table-column>
<el-table-column v-if="settings[10].show"
prop="workNumber"
label="状态"
align="center"
min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.isRelease ? '已发布' : '草稿' }} {{ scope.row.isRelease ? '已发布' : '草稿' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-auth="'/site/list:' + siteName + ':内容管理:文章管理:置顶'" <el-table-column v-auth="'/site/list:' + siteName + ':内容管理:文章管理:置顶'" prop="sequence" label="置顶" align="center"
prop="sequence" min-width="80" sortable="custom">
label="置顶"
align="center"
min-width="80"
sortable="custom">
<template slot-scope="scope"> <template slot-scope="scope">
<i v-if="scope.row.isRelease" <i v-if="scope.row.isRelease" :class="['squ-icon', scope.row.isTop ? 'el-icon-check' : 'el-icon-close']"
:class="['squ-icon', scope.row.isTop ? 'el-icon-check' : 'el-icon-close']" @click="sticky(scope.row)"></i>
@click="sticky(scope.row)"></i>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="settings[11].show" <el-table-column v-if="settings[11].show" label="操作" align="center" width="190">
label="操作"
align="center"
width="190">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:预览'" <el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:预览'" type="text"
type="text" @click="preview(scope.row)">预览</el-button>
@click="preview(scope.row)">预览</el-button> <el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:编辑'" type="text"
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:编辑'" @click="edit(scope.row)">编辑</el-button>
type="text" <el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:删除'" type="text"
@click="edit(scope.row)">编辑</el-button> @click="handleDelete(scope.row)">删除</el-button>
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:删除'" <el-switch v-if="scope.row.isRelease" v-auth="'/site/list:' + siteName + ':内容管理:文章管理:禁用'" class="m-l-10"
type="text" v-model="scope.row.isDisable" :active-value="0" :inactive-value="1"
@click="handleDelete(scope.row)">删除</el-button> @change="switchOff($event, scope.row, scope.$index)">
<el-switch v-if="scope.row.isRelease"
v-auth="'/site/list:' + siteName + ':内容管理:文章管理:禁用'"
class="m-l-10"
v-model="scope.row.isDisable"
:active-value="0"
:inactive-value="1"
@change="switchOff($event, scope.row, scope.$index)">
</el-switch> </el-switch>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
@current-change="currentChange" :total="total"></el-pagination>
:current-page="page"
layout="total, prev, pager, next"
:total="total"></el-pagination>
</div> </div>
</div> </div>
</div> </div>
@ -226,9 +137,9 @@ export default {
name: '修改人' name: '修改人'
} }
], ],
keyword: '', keyword: this.$route.query.keyword || '',
list: [], list: [],
page: 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
modifiedTimeSort: '', modifiedTimeSort: '',
@ -336,7 +247,7 @@ export default {
// //
getData () { getData () {
const id = this.$refs.column.getCurrentKey() const id = this.$refs.column.getCurrentKey()
this.$router.push(`/article?columnId=${id}`).catch(e => { }) this.$router.push(`/article?columnId=${id}&page=${this.page}&keyword=${this.keyword || ''}`).catch(e => { })
const keyword = encodeURI(this.keyword) const keyword = encodeURI(this.keyword)
const data = { const data = {
siteId: this.$store.state.content.site.id, siteId: this.$store.state.content.site.id,
@ -494,30 +405,35 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.custom-tree-node { .custom-tree-node {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
} }
.name { .name {
display: inline-block; display: inline-block;
max-width: 160px; max-width: 160px;
margin-right: 20px; margin-right: 20px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.squ-icon { .squ-icon {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
cursor: pointer; cursor: pointer;
color: #f70000; color: #f70000;
&.el-icon-check {
color: #05991e; &.el-icon-check {
} color: #05991e;
}
} }
/deep/.squ-input { /deep/.squ-input {
width: auto; width: auto;
.el-input__inner {
width: 60px; .el-input__inner {
padding: 0 10px; width: 60px;
} padding: 0 10px;
}
} }
</style> </style>

@ -82,7 +82,7 @@
</div> </div>
<ul class="news"> <ul class="news">
<li> <li>
<img src="https://new.iasf.ac.cn/images/home/3.png" alt=""> <img src="https://www.iasf.ac.cn/images/home/3.png" alt="">
<div class="texts"> <div class="texts">
<h6>2022 New Year Message from President Sun Dongbai</h6> <h6>2022 New Year Message from President Sun Dongbai</h6>
<p class="des">2021 is another challenging year for the Institute of Advanced Science Facilities, <p class="des">2021 is another challenging year for the Institute of Advanced Science Facilities,
@ -92,7 +92,7 @@
</div> </div>
</li> </li>
<li> <li>
<img src="https://new.iasf.ac.cn/images/home/3.png" alt=""> <img src="https://www.iasf.ac.cn/images/home/3.png" alt="">
<div class="texts"> <div class="texts">
<h6>2022 New Year Message from President Sun Dongbai</h6> <h6>2022 New Year Message from President Sun Dongbai</h6>
<p class="des">2021 is another challenging year for the Institute of Advanced Science Facilities, <p class="des">2021 is another challenging year for the Institute of Advanced Science Facilities,
@ -102,7 +102,7 @@
</div> </div>
</li> </li>
<li> <li>
<img src="https://new.iasf.ac.cn/images/home/3.png" alt=""> <img src="https://www.iasf.ac.cn/images/home/3.png" alt="">
<div class="texts"> <div class="texts">
<h6>2022 New Year Message from President Sun Dongbai</h6> <h6>2022 New Year Message from President Sun Dongbai</h6>
<p class="des">2021 is another challenging year for the Institute of Advanced Science Facilities, <p class="des">2021 is another challenging year for the Institute of Advanced Science Facilities,
@ -112,7 +112,7 @@
</div> </div>
</li> </li>
<li> <li>
<img src="https://new.iasf.ac.cn/images/home/3.png" alt=""> <img src="https://www.iasf.ac.cn/images/home/3.png" alt="">
<div class="texts"> <div class="texts">
<h6>2022 New Year Message from President Sun Dongbai</h6> <h6>2022 New Year Message from President Sun Dongbai</h6>
<p class="des">2021 is another challenging year for the Institute of Advanced Science Facilities, <p class="des">2021 is another challenging year for the Institute of Advanced Science Facilities,
@ -122,7 +122,7 @@
</div> </div>
</li> </li>
<li> <li>
<img src="https://new.iasf.ac.cn/images/home/3.png" alt=""> <img src="https://www.iasf.ac.cn/images/home/3.png" alt="">
<div class="texts"> <div class="texts">
<h6>2022 New Year Message from President Sun Dongbai</h6> <h6>2022 New Year Message from President Sun Dongbai</h6>
<p class="des">2021 is another challenging year for the Institute of Advanced Science Facilities, <p class="des">2021 is another challenging year for the Institute of Advanced Science Facilities,
@ -132,7 +132,7 @@
</div> </div>
</li> </li>
<li> <li>
<img src="https://new.iasf.ac.cn/images/home/3.png" alt=""> <img src="https://www.iasf.ac.cn/images/home/3.png" alt="">
<div class="texts"> <div class="texts">
<h6>2022 New Year Message from President Sun Dongbai</h6> <h6>2022 New Year Message from President Sun Dongbai</h6>
<p class="des">2021 is another challenging year for the Institute of Advanced Science Facilities, <p class="des">2021 is another challenging year for the Institute of Advanced Science Facilities,

@ -91,8 +91,8 @@ export default {
.block { .block {
padding: 2rem 0; padding: 2rem 0;
background: url(https://new.iasf.ac.cn/images/contactUs/3.png) 0 130px no-repeat, background: url(https://www.iasf.ac.cn/images/contactUs/3.png) 0 130px no-repeat,
url(https://new.iasf.ac.cn/images/contactUs/4.png) bottom right no-repeat; url(https://www.iasf.ac.cn/images/contactUs/4.png) bottom right no-repeat;
background-color: #f7f8fa; background-color: #f7f8fa;
} }

@ -34,21 +34,23 @@
</div> </div>
</div> </div>
<div class="cards"> <div class="c-wrap">
<ul> <div class="cards">
<li v-for="(item, i) in modules[2].list" :key="i">{{ item.title }}</li> <ul>
<div class="cover" @click="toSet(2)">点击配置文本</div> <li v-for="(item, i) in modules[2].list" :key="i">{{ item.title }}</li>
</ul> </ul>
</div> </div>
<div class="block committee gray"> <div class="block committee gray">
<div class="inner c-wrap"> <div class="inner c-wrap">
<div class="left"> <div class="left">
<h2>{{ modules[2].list[curYear].list[0].title }}</h2> <h2>{{ modules[2].list[curYear].list[0].title }}</h2>
<div class="text" v-html="modules[2].list[curYear].list[0].des"></div> <div class="text" v-html="modules[2].list[curYear].list[0].des"></div>
</div>
<img class="pic" :src="modules[2].list[curYear].list[0].pic" alt="">
</div> </div>
<img class="pic" :src="modules[2].list[curYear].list[0].pic" alt="">
</div> </div>
<div class="cover" @click="toSet(2)">点击配置文本</div>
</div> </div>
</div> </div>

@ -6,35 +6,35 @@ import addRoutes from '@/libs/route/addRoutes'
* 用户信息 * 用户信息
* */ * */
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
avatar: 'https://new.iasf.ac.cn/images/avatar.png', avatar: 'https://www.iasf.ac.cn/images/avatar.png',
userId: '', userId: '',
userName: '', userName: '',
crumbs: '' crumbs: ''
},
mutations: {
setAvatar: (state, avatar) => {
if (avatar) state.avatar = avatar
}, },
mutations: { setUserId: (state, userId) => {
setAvatar: (state, avatar) => { state.userId = userId
if (avatar) state.avatar = avatar
},
setUserId: (state, userId) => {
state.userId = userId
},
setUserName: (state, userName) => {
state.userName = userName
},
setCrumbs: (state, crumbs) => {
state.crumbs = crumbs
}
}, },
actions: { setUserName: (state, userName) => {
logout({ commit, state, dispatch }) { state.userName = userName
return new Promise((resolve, reject) => { },
util.local.remove(Setting.storeKey) setCrumbs: (state, crumbs) => {
util.local.remove(Setting.tokenKey) state.crumbs = crumbs
location.reload() }
resolve() },
}) actions: {
} logout ({ commit, state, dispatch }) {
return new Promise((resolve, reject) => {
util.local.remove(Setting.storeKey)
util.local.remove(Setting.tokenKey)
location.reload()
resolve()
})
} }
}
}; };
Loading…
Cancel
Save