出版物字段添加

master
yujialong 2 years ago
parent 16f44661fe
commit d94596c3f9
  1. BIN
      src/assets/images/style/44.png
  2. BIN
      src/assets/images/style/45.png
  3. BIN
      src/assets/images/style/46.png
  4. BIN
      src/assets/images/style/47.png
  5. BIN
      src/assets/images/style/48.png
  6. 11
      src/const/column.js
  7. 141
      src/pages/article/add/index.vue

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

@ -87,4 +87,15 @@ export default {
name: '产品资料和其它'
}
],
// 专利类别
patentClasses: [
{
id: 1,
name: '发明专利'
},
{
id: 2,
name: '实用外观'
}
]
}

@ -58,9 +58,100 @@
</el-date-picker>
</el-form-item>
</div>
<template v-if="form.articleTemplate === 26">
<!-- 专利 -->
<template v-if="isPatent">
<div class="item-line">
<el-form-item prop="doi" label="DOI">
<el-form-item prop="patentClassId" label="专利类别">
<el-select v-model="form.patentClassId" clearable>
<template v-for="item in patentClasses">
<el-option
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</template>
</el-select>
</el-form-item>
<el-form-item prop="applicationNumber" label="申请号">
<el-input
placeholder="请输入申请号"
v-model.trim="form.applicationNumber"
clearable
maxlength="50"
class="inline-input"
></el-input>
</el-form-item>
</div>
<div class="item-line">
<el-form-item prop="applicationDate" label="申请日期">
<el-date-picker
v-model="form.applicationDate"
type="date"
placeholder="选择日期"
format="yyyy-MM-dd"
:clearable="false"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item prop="dateOfAuthorization" label="授权日期">
<el-date-picker
v-model="form.dateOfAuthorization"
type="date"
placeholder="选择日期"
format="yyyy-MM-dd"
:clearable="false"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</div>
<el-form-item prop="inventor" label="发明人">
<el-input
style="width: 940px"
type="textarea"
v-model="form.inventor"
:rows="3"
></el-input>
</el-form-item>
</template>
<!-- 专著 -->
<template v-if="isMonograph">
<div class="item-line">
<el-form-item prop="publishingHouse" label="出版社">
<el-input
placeholder="请输入出版社"
v-model.trim="form.publishingHouse"
clearable
maxlength="50"
class="inline-input"
></el-input>
</el-form-item>
<el-form-item prop="writersAndEditors" label="编写人员">
<el-input
placeholder="请输入编写人员"
v-model.trim="form.writersAndEditors"
clearable
maxlength="50"
class="inline-input"
></el-input>
</el-form-item>
</div>
<div class="item-line">
<el-form-item prop="publicationYear" label="出版时间">
<el-date-picker
style="width: 300px"
v-model="form.publicationYear"
type="year"
placeholder="请选择出版时间"
format="yyyy"
value-format="yyyy">
</el-date-picker>
</el-form-item>
</div>
</template>
<!-- 期刊详情 or 论文 -->
<template v-if="form.articleTemplate === 26 || isThesis">
<div class="item-line">
<el-form-item v-if="!isThesis" prop="doi" label="DOI">
<el-input
placeholder="请输入DOI"
v-model.trim="form.doi"
@ -69,21 +160,21 @@
class="inline-input"
></el-input>
</el-form-item>
<el-form-item prop="publicationYear" label="出版年份">
<el-form-item prop="publicationYear" :label="isThesis ? '发表年度' : '出版年份'">
<el-date-picker
style="width: 300px"
v-model="form.publicationYear"
type="year"
placeholder="请选择出版年份"
:placeholder="'请选择' + (isThesis ? '发表年度' : '出版年份')"
format="yyyy"
value-format="yyyy">
</el-date-picker>
</el-form-item>
</div>
<div class="item-line">
<el-form-item prop="periodicalName" label="刊物名称">
<el-form-item prop="periodicalName" :label="isThesis ? '期刊名称' : '刊物名称'">
<el-input
placeholder="请输入刊物名称"
:placeholder="'请输入' + (isThesis ? '期刊名称' : '刊物名称')"
v-model="form.periodicalName"
clearable
maxlength="50"
@ -120,7 +211,8 @@
></el-input>
</el-form-item>
</template>
<div v-else class="item-line">
<!-- 非出版物的才显示下面字段 -->
<div v-else-if="!isPublication" class="item-line">
<el-form-item prop="source" label="来源">
<el-input
placeholder="请输入来源"
@ -151,6 +243,7 @@
></el-input>
</el-form-item>
</div>
<template v-if="!isPublication">
<div v-if="form.articleTemplate === 25" class="item-line">
<el-form-item prop="lectureSeries" label="演讲系列">
<el-input
@ -427,6 +520,7 @@
</el-switch>
</el-form-item>
</template>
</template>
</el-form>
<div class="btns">
<el-button type="primary" @click="submit(1)">发布</el-button>
@ -525,6 +619,7 @@ export default {
site: this.$store.state.content.site,
userId: this.$store.state.user.userId,
publicationTypes: ColumnConst.publicationTypes,
patentClasses: ColumnConst.patentClasses,
headers: {
token: Util.local.get(Setting.tokenKey)
},
@ -586,7 +681,16 @@ export default {
linkAddress: '',
siteSelection: '',
fileList: [],
isOpen: 1
isOpen: 1,
patentClassId: '',
patentName: '',
writersAndEditors: '',
inventor: '',
famousWorks: '',
applicationNumber: '',
applicationDate: '',
dateOfAuthorization: '',
publishingHouse: ''
},
rules: {
title: [
@ -648,7 +752,23 @@ export default {
]),
...mapState('content', [
'column'
])
]),
//
isPublication() {
return this.columnInfo.templateId === 11
},
//
isThesis() {
return this.columnInfo.listStyleId === 46
},
//
isPatent() {
return this.columnInfo.listStyleId === 44
},
//
isMonograph() {
return this.columnInfo.listStyleId === 45
},
},
components: {
Editor,
@ -1246,6 +1366,8 @@ export default {
if (tId !== 25) {
if (!form.releaseTime) return Util.errorMsg('请选择发布日期')
}
//
if (!this.isPublication) {
if (tId === 22 || tId === 23 || tId === 24) {
if (!form.titleImg ) return Util.errorMsg('请上传封面')
}
@ -1264,6 +1386,7 @@ export default {
}
if ((tId === 22 || tId === 23 || tId === 25) && !form.mainBody) return Util.errorMsg('请输入正文')
}
}
if (this.uploading) return Util.errorMsg('文件正在上传,请上传完成后再发布')
if (form.connectionType === 1) {
form.linkAddress = this.links.join()

Loading…
Cancel
Save