微调,下拉联动
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
df_jour: [],
|
||||
addVisible: false,
|
||||
addForm: {
|
||||
journal_id: 0,
|
||||
journal_id: this.$route.query.journal_id - 0,
|
||||
journal_title: '',
|
||||
group_name: ''
|
||||
},
|
||||
@@ -71,9 +71,9 @@
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
created() {
|
||||
this.getJour();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 获取期刊列表
|
||||
getJour() {
|
||||
@@ -84,8 +84,14 @@
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
this.df_jour = res.data.journals;
|
||||
this.addForm.journal_id = this.df_jour[0].journal_id
|
||||
this.addForm.journal_title = this.df_jour[0].title
|
||||
this.df_jour.map(item => {
|
||||
if(this.addForm.journal_id == item.journal_id){
|
||||
this.addForm.journal_title = item.journal_id
|
||||
this.addForm.journal_title = item.title
|
||||
}
|
||||
})
|
||||
//this.addForm.journal_id = this.df_jour[0].journal_id
|
||||
//this.addForm.journal_title = this.df_jour[0].title
|
||||
this.getDate();
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
@@ -131,6 +137,7 @@
|
||||
|
||||
// 保存添加
|
||||
saveAdd(addForm) {
|
||||
console.log(this.addForm,'this.addForm')
|
||||
this.$refs.add_Form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$api
|
||||
|
||||
Reference in New Issue
Block a user