Merge remote-tracking branch 'remotes/origin/xie'

# Conflicts:
#	src/components/page/articleAdd.vue
This commit is contained in:
wangjinlei
2023-06-07 10:36:01 +08:00
12 changed files with 435 additions and 7 deletions

View File

@@ -112,6 +112,14 @@
<el-input type="textarea" rows="5" v-model="form.abstrart"
placeholder="Please enter the abstract"></el-input>
</el-form-item>
<!-- 话题 -->
<el-form-item label="Topics :" prop="topics">
<el-cascader disabled class="formTopics" @change="topicsChange"
v-model="form.topics"
:options="topicsList"
:props="topicsProps"
clearable></el-cascader>
</el-form-item>
<el-form-item label="Key words :">
<el-input v-for="(item, index) in keywordsList" :key="index" :name="index + 1"
v-model="item.ke" :placeholder="'Key words' + (index + 1)"
@@ -653,8 +661,12 @@
picturesAndTables: '',
totalpage: '',
manuscirpt: '',
<<<<<<< HEAD
supplementary: '',
code: ''
=======
topics:null
>>>>>>> remotes/origin/xie
},
journal_type: [{
name: 'ARTICLE',
@@ -871,6 +883,14 @@
},
mj_jour: [],
jour_name: '',
topicsList:null, // 话题列表
topicsProps:{
multiple: true,
emitPath: false, // 只返回该节点的值
value: "journal_topic_id", // 自定义要映射的键名
label: "title",
children: "children",
}
};
},
watch: {
@@ -888,6 +908,7 @@
this.Temporary()
} else {
this.initMajor();
this.getTopics()
}
},
computed: {
@@ -1614,6 +1635,7 @@
this.form.istransfer = false
this.form.becomeRev = false
this.initMajor();
this.getTopics()
},
// 点击tab变化
@@ -1921,6 +1943,7 @@
'article_id': this.stagingID
})
.then((res) => {
console.log(res, '已经保存的值')
if (res.code == 0) {
// 基本信息
this.form.journal = res.data.base.journal_id
@@ -1929,6 +1952,7 @@
this.form.approval = res.data.base.approval
this.form.abstrart = res.data.base.abstrart
this.form.fund = res.data.base.fund
this.form.topics = res.data.base.topics
// 领域
this.$api
.post('api/Major/getMajorForAddArticle', {
@@ -2023,12 +2047,36 @@
// 选择
chanSelt() {
this.$forceUpdate()
},
// 获取话题
getTopics(){
this.$api
.post('api/Article/getJournalTopics', {'journal_id': this.Reviewerof.journal})
.then((res) => {
if (res.code == 0) {
this.topicsList = res.data.topics
console.log(res.data.topics,'话题')
} else {
this.$message.error(res.msg);
}
});
},
// 选中值变化
topicsChange(e){
console.log(this.form.topics,'选中的话题id')
}
}
};
</script>
<style scoped>
.formTopics{
width: 100%;
}
</style>
<style>
.author-box {
width: 150%;