微调,下拉联动

This commit is contained in:
@fawn-nine
2023-09-01 13:20:22 +08:00
parent 2f73d642c3
commit 163df2be57
2 changed files with 51 additions and 8 deletions

View File

@@ -205,7 +205,40 @@
<div v-else> <div v-else>
<!-- 有分组时 --> <!-- 有分组时 -->
<div v-for="(item,key) of tableData_C" :key="key"> <div v-for="(item,key) of tableData_C" :key="key">
<p class="shen_number">{{key}}</p> <div v-if="key == 'nogroup'">
<!-- 显示无分组 -->
<el-table :data="item" border stripe class="table" ref="multipleTable" :show-header="false"
header-cell-class-name="table-header" empty-text="New messages (0)" style="margin-bottom: 20px;">
<el-table-column prop="Realname" label="Realname">
<template slot-scope="scope">
<p @click="perSonnel(scope.row.user_id)" class="perSonGo">{{scope.row.realname}}</p>
</template>
</el-table-column>
<el-table-column prop="email" label="Email"></el-table-column>
<el-table-column prop="ghindex" label="H-Google" width="110px" align="center">
<template slot-scope="scope">
<p v-html="colorIndex(scope.row.google_index,scope.row.google_time)"></p>
</template>
</el-table-column>
<el-table-column label="" width="300" align="center">
<template slot-scope="scope">
<el-button size="mini" type="primary" plain icon="el-icon-edit"
@click="perSonnel(scope.row.user_id)">User Edit</el-button>
<el-button size="mini" type="primary" plain icon="el-icon-edit"
@click="bhandleEdit(scope.$index, scope.row)">Board Edit</el-button>
<el-button size="mini" type="danger" plain icon="el-icon-delete" style="margin-top: 10px;"
@click="handleDelete(scope.$index, scope.row)">Delete</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
<div v-for="(item,key) of tableData_C" :key="key">
<div v-if="key !== 'nogroup'">
<!-- 显示有分组 -->
<p class="shen_number" v-if="key !== 'nogroup'">{{key}}</p>
<el-table :data="item" border stripe class="table" ref="multipleTable" :show-header="false" <el-table :data="item" border stripe class="table" ref="multipleTable" :show-header="false"
header-cell-class-name="table-header" empty-text="New messages (0)" style="margin-bottom: 20px;"> header-cell-class-name="table-header" empty-text="New messages (0)" style="margin-bottom: 20px;">
<el-table-column prop="Realname" label="Realname"> <el-table-column prop="Realname" label="Realname">
@@ -261,6 +294,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<!-- 添加弹出框 --> <!-- 添加弹出框 -->
<el-dialog title="Add Editorial board" :visible.sync="addVisible" width="750px" :close-on-click-modal="false" <el-dialog title="Add Editorial board" :visible.sync="addVisible" width="750px" :close-on-click-modal="false"
@@ -1004,7 +1038,9 @@
}, },
// 分组管理 // 分组管理
addGroup() { addGroup() {
this.$router.push('/editorGroup'); console.log(this.query.journal_id,'this.query.journal_id')
this.$router.push('/editorGroup?journal_id='+this.query.journal_id);
}, },
// 用户跳转 // 用户跳转

View File

@@ -57,7 +57,7 @@
df_jour: [], df_jour: [],
addVisible: false, addVisible: false,
addForm: { addForm: {
journal_id: 0, journal_id: this.$route.query.journal_id - 0,
journal_title: '', journal_title: '',
group_name: '' group_name: ''
}, },
@@ -84,8 +84,14 @@
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
this.df_jour = res.data.journals; this.df_jour = res.data.journals;
this.addForm.journal_id = this.df_jour[0].journal_id this.df_jour.map(item => {
this.addForm.journal_title = this.df_jour[0].title 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(); this.getDate();
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
@@ -131,6 +137,7 @@
// 保存添加 // 保存添加
saveAdd(addForm) { saveAdd(addForm) {
console.log(this.addForm,'this.addForm')
this.$refs.add_Form.validate((valid) => { this.$refs.add_Form.validate((valid) => {
if (valid) { if (valid) {
this.$api this.$api