|
|
|
@ -44,27 +44,16 @@ |
|
|
|
|
ref="column" |
|
|
|
|
v-model="form.columnId" |
|
|
|
|
:options="columns" |
|
|
|
|
:props="columnProps"></el-cascader> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item v-if="form.articleTemplate === 25" prop="classificationId" label="所属分类"> |
|
|
|
|
<el-select style="width: 234px;" v-model="form.classificationId"> |
|
|
|
|
<template v-for="item in classifications"> |
|
|
|
|
<el-option |
|
|
|
|
v-if="item.classificationName" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.classificationName" |
|
|
|
|
:value="item.id"> |
|
|
|
|
</el-option> |
|
|
|
|
</template> |
|
|
|
|
</el-select> |
|
|
|
|
<el-button class="set-btn" type="primary" @click="setClass">设置</el-button> |
|
|
|
|
:props="columnProps" |
|
|
|
|
@change="columnChange"></el-cascader> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item v-else prop="releaseTime" label="发布日期"> |
|
|
|
|
<el-form-item prop="releaseTime" label="发布日期"> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="form.releaseTime" |
|
|
|
|
type="date" |
|
|
|
|
placeholder="选择日期" |
|
|
|
|
format="yyyy-MM-dd" |
|
|
|
|
:clearable="false" |
|
|
|
|
value-format="yyyy-MM-dd"> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
@ -91,6 +80,37 @@ |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
<div class="item-line"> |
|
|
|
|
<el-form-item prop="periodicalName" label="刊物名称"> |
|
|
|
|
<el-input |
|
|
|
|
placeholder="请输入刊物名称" |
|
|
|
|
v-model="form.periodicalName" |
|
|
|
|
clearable |
|
|
|
|
maxlength="50" |
|
|
|
|
class="inline-input" |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<div style="display: inline-flex;"> |
|
|
|
|
<el-form-item prop="reel" label="卷" style="margin-right: 0;"> |
|
|
|
|
<el-input |
|
|
|
|
placeholder="请输入" |
|
|
|
|
v-model="form.reel" |
|
|
|
|
clearable |
|
|
|
|
maxlength="50" |
|
|
|
|
style="width: 110px" |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="documentNumber" label="文献号" label-width="80px"> |
|
|
|
|
<el-input |
|
|
|
|
placeholder="请输入" |
|
|
|
|
v-model="form.documentNumber" |
|
|
|
|
clearable |
|
|
|
|
maxlength="50" |
|
|
|
|
style="width: 110px" |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<el-form-item prop="author" label="作者"> |
|
|
|
|
<el-input |
|
|
|
|
style="width: 940px" |
|
|
|
@ -116,6 +136,7 @@ |
|
|
|
|
v-model="form.time" |
|
|
|
|
type="datetimerange" |
|
|
|
|
range-separator="~" |
|
|
|
|
:clearable="false" |
|
|
|
|
start-placeholder="开始日期" |
|
|
|
|
end-placeholder="结束日期"> |
|
|
|
|
</el-date-picker> |
|
|
|
@ -171,15 +192,29 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
<template v-if="form.articleTemplate === 25"> |
|
|
|
|
<div class="item-line"> |
|
|
|
|
<el-form-item prop="classificationId" label="所属分类"> |
|
|
|
|
<el-select style="width: 234px;" v-model="form.classificationId"> |
|
|
|
|
<template v-for="item in classifications"> |
|
|
|
|
<el-option |
|
|
|
|
v-if="item.classificationName" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.classificationName" |
|
|
|
|
:value="item.id"> |
|
|
|
|
</el-option> |
|
|
|
|
</template> |
|
|
|
|
</el-select> |
|
|
|
|
<el-button class="set-btn" type="primary" @click="setClass">设置</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="offlineLocation" label="线下地点"> |
|
|
|
|
<el-input |
|
|
|
|
style="width: 940px" |
|
|
|
|
placeholder="请输入线下地点" |
|
|
|
|
v-model="form.offlineLocation" |
|
|
|
|
clearable |
|
|
|
|
maxlength="100" |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
<el-form-item prop="keynoteSpeaker" label="主讲人"> |
|
|
|
|
<el-input |
|
|
|
|
style="width: 940px" |
|
|
|
@ -292,6 +327,12 @@ |
|
|
|
|
:rows="3" |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="articleKeyWord" label="关键字"> |
|
|
|
|
<el-input |
|
|
|
|
style="width: 940px" |
|
|
|
|
v-model="form.articleKeyWord" |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="mainBody" label="摘要"> |
|
|
|
|
<Editor api-key='rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda' v-model="form.mainBody" :init="editorConfig" /> |
|
|
|
|
</el-form-item> |
|
|
|
@ -512,8 +553,12 @@ export default { |
|
|
|
|
articleTemplate: '', |
|
|
|
|
doi: '', |
|
|
|
|
quote: '', |
|
|
|
|
articleKeyWord: '', |
|
|
|
|
publicationTypeId: '', |
|
|
|
|
publicationYear: '', |
|
|
|
|
periodicalName: '', |
|
|
|
|
reel: '', |
|
|
|
|
documentNumber: '', |
|
|
|
|
activityEndTime: '', |
|
|
|
|
activityStartTime: '', |
|
|
|
|
time: '', |
|
|
|
@ -697,13 +742,6 @@ export default { |
|
|
|
|
this.form.id ? this.getData() : this.getColumn() |
|
|
|
|
}).catch(err => {}) |
|
|
|
|
}, |
|
|
|
|
// 每个层级加上父级id的集合 |
|
|
|
|
getId(list, ids) { |
|
|
|
|
list.forEach(e => { |
|
|
|
|
e.ids = ids ? [...ids, e.id] : [e.id] |
|
|
|
|
e.children.length ? this.getId(e.children, e.ids) : delete e.children |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 文章列表 |
|
|
|
|
getArticle() { |
|
|
|
|
// 站内链接/其他站点链接 |
|
|
|
@ -715,7 +753,8 @@ export default { |
|
|
|
|
columnIds: [id], |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: 1000, |
|
|
|
|
title: '' |
|
|
|
|
title: '', |
|
|
|
|
isDisable: 0 |
|
|
|
|
}).then(({ data }) => { |
|
|
|
|
this[inner ? 'articles' : 'otherArticles'] = data.records.filter(e => e.isRelease) // 只显示已发布的文章 |
|
|
|
|
}).catch(err => {}) |
|
|
|
@ -745,7 +784,8 @@ export default { |
|
|
|
|
columnIds: [column[column.length - 1]], // 截取走最后面的文章id,最后一个id就是栏目id |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: 1000, |
|
|
|
|
title: '' |
|
|
|
|
title: '', |
|
|
|
|
isDisable: 0 |
|
|
|
|
}).then(res => { |
|
|
|
|
this[connectionType === 1 ? 'articles' : 'otherArticles'] = res.data.records |
|
|
|
|
// 站内链接/其他站点链接 |
|
|
|
@ -797,6 +837,22 @@ export default { |
|
|
|
|
this.form.articleTemplate = id |
|
|
|
|
this.handleRules() |
|
|
|
|
}, |
|
|
|
|
// 所属栏目选择回调 |
|
|
|
|
columnChange(val) { |
|
|
|
|
const checked = this.$refs.column.getCheckedNodes() |
|
|
|
|
if (checked && checked.length) { |
|
|
|
|
// 所属栏目改变后重新查询所属分类 |
|
|
|
|
this.columnInfo = checked[checked.length - 1].data |
|
|
|
|
this.getClassification() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 每个层级加上父级id的集合 |
|
|
|
|
getId(list, ids) { |
|
|
|
|
list.forEach(e => { |
|
|
|
|
e.ids = ids ? [...ids, e.id] : [e.id] |
|
|
|
|
e.children.length ? this.getId(e.children, e.ids) : delete e.children |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 获取站点列表 |
|
|
|
|
getSite() { |
|
|
|
|
this.$post(this.api.site, { |
|
|
|
|