提交 邀请审稿人列表

This commit is contained in:
2025-06-11 17:42:46 +08:00
parent 0c4e44e858
commit 5951f26bd4
6 changed files with 1619 additions and 1030 deletions

View File

@@ -132,10 +132,11 @@
</p>
</el-collapse-item>
</el-collapse>
<el-collapse class="auth_colla auth_collna_ew" style="margin-top: -15px">
<el-collapse v-model="researchAreas" class="auth_colla auth_collna_ew" style="margin-top: -15px">
<el-collapse-item title="Research areas" name="1">
<div style="position: relative; height: 30px">
<common-major
v-if="form.state==0"
:articleId="editform.articleId"
@load="initMajor()"
style="position: absolute; top: 10px; right: 10px"
@@ -152,7 +153,7 @@
<span style="color: #006699; font-weight: bold; margin-right: 10px"
>Field {{ i + 1 }}:</span
>{{ v.str
}}<i
}}<i v-if="form.state==0"
class="el-icon-delete-solid"
style="color: #f56c6c !important; margin-left: 10px"
@click="handleDeleteMajor(v)"
@@ -553,6 +554,7 @@ export default {
},
data() {
return {
researchAreas:['1'],
AIcontent:'',
previewData: {},
baseUrl: this.Common.baseUrl,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,27 +1,54 @@
<template>
<div class="block commonMajor" style="width: 100%;overflow: hidden;">
<el-button type="primary" plain size="mini" @click="handleAdd" style="float:right;margin-bottom: 20px;"><i class="el-icon-plus" ></i>Add Field </el-button>
<div
v-for="(field, index) in fields"
:key="index"
class="cascader-container"
style="margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between"
>
<span style="margin-right: 10px; font-size: 12px; color: #006699; font-weight: bold">Field {{ Number(index+1) }} :</span>
<div class="block commonMajor" style="width: 100%; overflow: hidden">
<div v-if="!disabled">
<el-button type="primary" plain size="mini" @click="handleAdd" style="float: right; margin-bottom: 20px"
><i class="el-icon-plus"></i>Add Field
</el-button>
<div
v-for="(field, index) in fields"
:key="index"
class="cascader-container"
style="margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between"
>
<span style="margin-right: 10px; font-size: 12px; color: #006699; font-weight: bold">Field {{ Number(index + 1) }} :</span>
<el-cascader
:ref="`cascader${index}`"
@change="handleChange(index)"
v-model="field.selectedValue"
:placeholder="'Please select Field '"
:options="options"
:props="getProps()"
style="width: calc(100% - 120px)"
></el-cascader>
<!-- Delete button -->
<el-button size="mini" type="danger" style="margin-left: 10px" @click="handleDelete(index)"
><i class="el-icon-delete"></i
></el-button>
</div>
</div>
<div v-else>
<div
v-for="(field, index) in fields"
:key="index"
class="cascader-container"
style="display: flex; align-items: center; justify-content: space-between"
>
<span style="margin-right: 10px; font-size: 12px; color: #006699; font-weight: bold">Field {{ Number(index + 1) }} :</span>
<div style="width: calc(100% - 60px)">
{{field.str.replace('Medicine >', '').trim() }}
</div>
</div>
</div>
<el-cascader
:ref="`cascader${index}`"
@change="handleChange(index)"
v-model="field.selectedValue"
:placeholder="'Please select Field '"
:options="options"
:props="getProps()"
style="width: calc(100% - 120px)"
></el-cascader>
<!-- Delete button -->
<el-button size="mini" type="danger" style="margin-left: 10px;" @click="handleDelete(index)"><i class="el-icon-delete"></i></el-button>
</div>
<!-- <el-dialog title="Add Field " :visible.sync="coreVisible1" width="780px" :close-on-click-modal="false">
<el-form :model="coreForm1" :rules="rules1" ref="core_Form1" label-width="140px" >
<el-form-item prop="major">
@@ -45,7 +72,7 @@
<script>
export default {
props: {
props: {
userId: {
type: String,
default: ''
@@ -53,21 +80,23 @@ export default {
list: {
type: Array,
default: []
},
disabled: {
type: Boolean,
default: false
}
},
watch: {
list: {
handler(e) {
this.fields=this.list.length>0?[...this.list]:[{}]
this.fields = this.list.length > 0 ? [...this.list] : [{}];
},
immediate: true
},
}
},
data() {
return {
rules1:{},
rules1: {},
coreVisible1: false,
coreForm1: {
majorList: []
@@ -86,18 +115,18 @@ export default {
this.$nextTick(() => {
this.$refs[`cascader${i}`][0].dropDownVisible = false;
this.coreForm1.majorList = this.fields[i].selectedValue;
this.$emit('load',this.fields)
this.coreForm1.majorList = this.fields[i].selectedValue;
this.$emit('load', this.fields);
this.$forceUpdate();
});
},
onSubmit_core1(coreForm) {
console.log('coreForm at line 1963:', coreForm);
if(!this.fields[0].selectedValue||this.fields[0].selectedValue.length == 0){
if (!this.fields[0].selectedValue || this.fields[0].selectedValue.length == 0) {
this.$message.error('Please select Field !');
return false;
return false;
}
this.$refs.core_Form1.validate((valid) => {
if (valid) {
@@ -112,7 +141,7 @@ this.coreForm1.majorList = this.fields[i].selectedValue;
this.$message.success('Personal information modified successfully!');
this.coreVisible1 = false;
// this.tipVisible = false;
this.$emit('load')
this.$emit('load');
} else {
this.$message.error(res.msg);
}
@@ -129,9 +158,9 @@ this.coreForm1.majorList = this.fields[i].selectedValue;
// 动态添加一个新的 Cascader
handleAdd() {
this.$nextTick(() => {
// this.fields=[]
this.fields.push({ selectedValue: [] }); // 添加一个新的字段
this.$emit('load',this.fields)
// this.fields=[]
this.fields.push({ selectedValue: [] }); // 添加一个新的字段
this.$emit('load', this.fields);
// this.coreVisible1 = true;
});
},
@@ -139,7 +168,7 @@ this.coreForm1.majorList = this.fields[i].selectedValue;
// 删除指定的 Cascader
handleDelete(index) {
this.fields.splice(index, 1); // 删除指定索引的字段
this.$emit('load',this.fields)
this.$emit('load', this.fields);
},
// 获取 Cascader 配置

View File

@@ -0,0 +1,147 @@
<template>
<div>
<div
@click="disabled?'':BoxMajor()"
v-if="user_id"
style="display: flex; align-items: center; justify-content: space-between;"
:style="{ cursor: disabled ? '' : 'pointer' }"
>
<!-- 使用 user_id 来获取用户的 majorData -->
<div>
<div v-if="!loading" class="majorDataBox">
<p v-for="(v, i) in majorData" style="border-top: 1px solid #b3d8ff">
<span style="font-weight: bold">{{ i + 1 }}.</span>
{{ v.major_title.replace('Medicine >', '').trim() }}
</p>
</div>
<div v-else>
<span>Loading...</span>
<!-- 如果数据还在加载显示 "Loading..." -->
</div>
</div>
<b style="margin-left: 10px; color: #006699" class="el-icon-edit" v-if="!disabled"></b>
</div>
<el-dialog title="Edit Research areas" :visible.sync="majorBox" width="800px">
<el-form ref="remark" :model="majorMes" label-width="120px">
<el-form-item label="Reviewer :">
<p style="line-height: 20px; margin-top: 6px">
<span style="color: #333; font-weight: bold">{{ majorMes.realname }}</span>
( {{ majorMes.email }} )
</p>
</el-form-item>
<!-- <el-form-item label="Email :">
<p style="line-height: 20px; margin-top: 6px">{{ majorMes.email }}</p>
</el-form-item> -->
<el-form-item label="Research areas :">
<common-major-list :list="majorValueList" @load="(e) => (this.majorValueList = e)"></common-major-list>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="majorBox = false">Cancel</el-button>
<el-button type="primary" @click="saveMajor">Save</el-button>
</span>
</el-dialog>
<!-- 评级弹出框 -->
</div>
</template>
<script>
export default {
components: {},
props: ['user_id','baseInfo','disabled'],
data() {
return {
majorValueList: [],
majorData: [],
majorMes: {},
majorBox: false,
loading: false,
};
},
created() {
this.loading = true; // 开始加载数据
// this.initMajor()
},
mounted() {
this.fetchMajorData(this.user_id); // 加载第一个用户的数据
},
methods: {
BoxMajor() {
this.majorBox = true;
this.majorMes.realname = this.baseInfo.realname;
this.majorMes.user_id = this.baseInfo.user_id;
this.majorMes.email = this.baseInfo.email;
this.majorValueList = [...this.majorData].map((item) => ({
selectedValue: Array.isArray(item.shu)
? item.shu
: typeof item.shu === 'string'
? item.shu.split(',').map(Number)
: [item.shu]
}));
},
async fetchMajorData(userId) {
// if (!this.majorData[userId]) {
// 判断是否已经加载过该用户的数据
this.majorData = await this.getMajorData(userId);
this.$forceUpdate()
// }
},
// 修改标记
async getMajorData(userId) {
try {
const res = await this.$api.post('api/Reviewer/getUserField', { user_id: userId });
this.loading = false; // 开始加载数据
if (res.status === 1) {
return res.data; // 返回数据
} else {
return []; // 如果没有数据,返回空数组
}
} catch (error) {
console.error('Error fetching data:', error);
return []; // 如果发生错误,返回空数组
}
},
saveMajor() {
this.$api
.post('api/Reviewer/updateUserField', {
user_id: this.majorMes.user_id,
user_field: this.majorValueList.map((item) => item.selectedValue[item.selectedValue.length - 1]).toString(',')
})
.then((res) => {
if (res.status == 1) {
this.$message.success('Success');
this.majorBox = false;
this.fetchMajorData(this.majorMes.user_id);
} else {
this.$message.error(res.msg);
}
});
}
}
};
</script>
<style scoped>
.deteleBtn {
color: #ce1111;
margin-left: 18px;
}
.deteleBtn i {
font-weight: bold;
}
.deteleBtn:hover {
text-decoration: underline;
cursor: pointer;
}
.majorDataBox p:nth-child(1) {
border-top: none !important;
}
</style>

View File

@@ -208,27 +208,7 @@
</el-table-column> -->
<el-table-column label="Research areas" width="300">
<template slot-scope="scope">
<div
@click="BoxMajor(scope.row, majorData[scope.row.user_id])"
v-if="scope.row.user_id"
style="display: flex; align-items: center; justify-content: space-between; cursor: pointer"
>
<!-- 使用 user_id 来获取用户的 majorData -->
<div>
<div v-if="majorData[scope.row.user_id]" class="majorDataBox">
<p v-for="(v, i) in majorData[scope.row.user_id]" style="border-top: 1px solid #b3d8ff">
<span style="font-weight: bold">{{ i + 1 }}.</span>
{{ v.major_title.replace('Medicine >', '').trim() }}
</p>
</div>
<div v-else>
<span>Loading...</span>
<!-- 如果数据还在加载显示 "Loading..." -->
</div>
</div>
<b style="margin-left: 10px; color: #006699" class="el-icon-edit"></b>
</div>
<commonMajorTableList :user_id="scope.row.user_id" :baseInfo="scope.row" :key="scope.row.user_id"></commonMajorTableList>
</template>
</el-table-column>
@@ -496,9 +476,11 @@
const currentYear = new Date().getFullYear();
var ReviewTime = `(${currentYear - 2}${currentYear})`;
import commonReviewer from '../page/components/reviewerList/add.vue';
import commonMajorTableList from '../page/components/major/tableList.vue';
export default {
components: {
commonReviewer
commonReviewer,
commonMajorTableList,
},
data() {
@@ -778,7 +760,7 @@ export default {
if (res.code == 0) {
this.tableData = res.data;
for (var i = 0; i < this.tableData.length; i++) {
this.fetchMajorData(this.tableData[i].user_id); // 加载第一个用户的数据
// this.fetchMajorData(this.tableData[i].user_id); // 加载第一个用户的数据
this.getScoreData(i, this.tableData[i].score);
}
this.link_Total = res.total || 0;