This commit is contained in:
2025-10-21 10:04:36 +08:00
parent 2070a9f423
commit 89ca76d55b
3 changed files with 304 additions and 30 deletions

View File

@@ -2,8 +2,8 @@
//记得切换 //记得切换
//正式 //正式
const mediaUrl = '/public/'; // const mediaUrl = '/public/';
const baseUrl = '/'; // const baseUrl = '/';
// const mediaUrl = 'https://submission.tmrjournals.com/public/'; // const mediaUrl = 'https://submission.tmrjournals.com/public/';
@@ -14,9 +14,9 @@ const baseUrl = '/';
//本地(正式环境 ) //本地(正式环境 )
// const mediaUrl = 'https://submission.tmrjournals.com/public/'; const mediaUrl = 'https://submission.tmrjournals.com/public/';
// const mediaUrl = 'http://192.168.110.110/tougao/public/index.php/';
// const baseUrl = '/api'; const baseUrl = '/api';
// const mediaUrl = 'http://www.tougao.com/'; // const mediaUrl = 'http://www.tougao.com/';
// const baseUrl = 'http://www.tougao.com/'; // const baseUrl = 'http://www.tougao.com/';

View File

@@ -593,28 +593,53 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form ref="add_Form" :model="addForm" :rules="rules" label-width="150px" v-if="dis_able"> <el-form ref="add_Form" :model="addForm" :rules="rules" label-width="150px" v-if="dis_able">
<el-form-item label="Personal Picture :" prop="board_icon">
<div class="portrait" @click="unplIcon">
<img src="@/assets/img/userImg.jpg" class="portrait" v-if="pictureUrl == ''" />
<img :src="pictureUrl" class="portrait" v-if="pictureUrl != ''" />
<el-upload
class="avatar-uploader"
ref="upIconIMg"
:action="baseUrl + 'api/Ucenter/up_userIcon_file'"
:show-file-list="false"
name="icon"
:on-success="handleAvatarSuccess2"
:on-error="handleAvatarError2"
:before-upload="beforeAvatarUpload2"
style="display: none"
>
<img v-if="pictureUrl == ''" :src="pictureUrl" class="avatar" accept=".png,.jpg" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<div class="ptmark">Upload avatar</div>
</div>
</el-form-item>
<el-form-item label="Email :" prop="email"> <el-form-item label="Email :" prop="email">
{{ addForm.email }} <el-input v-model="addForm.email"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="Account :" prop="account"> <!-- <el-form-item label="Account :" prop="account">
{{addForm.account}} {{addForm.account}}
</el-form-item> --> </el-form-item> -->
<el-form-item label="Realname :" prop="name"> <!-- <el-form-item label="Realname :" prop="name">
{{ addForm.name }} {{ addForm.name }}
<!-- <el-input v-model="addForm.name" style="width: 300px;"></el-input> -->
</el-form-item> -->
<el-form-item label="English name :" prop="realname">
<el-input v-model="addForm.realname"></el-input>
</el-form-item>
<el-form-item label="Website :" prop="website">
<el-input v-model="addForm.website" placeholder="eg:http://..."></el-input>
</el-form-item>
<el-form-item label="Title :" prop="technical">
<el-select v-model="addForm.technical" filterable placeholder="Please select" value-key="groupID" style="width: 200px">
<el-option v-for="item in df_technical" :key="item.label" :label="item.label" :value="item.label"></el-option>
</el-select>
</el-form-item>
<el-form-item label="Affiliation :" prop="affiliation">
<el-input v-model="addForm.affiliation" placeholder="Please enter"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="Picture :" prop="board_icon">
<span slot="label">
<i style="color: #F56C6C;">*</i>
Picture
</span>
<el-upload class="avatar-uploader" :action="baseUrl+'api/Board/up_boardIcon_file'"
:show-file-list="false" name="boardIcon" :on-success="handleAvatarSuccess"
:on-error="handleAvatarError" :before-upload="beforeAvatarUpload">
<img v-if="imageUrl" :src="imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item> -->
<el-form-item label="Journal :" prop="journal_id"> <el-form-item label="Journal :" prop="journal_id">
<el-select <el-select
v-model="addForm.journal_id" v-model="addForm.journal_id"
@@ -670,7 +695,7 @@
</el-dialog> </el-dialog>
<!-- 编委弹窗 --> <!-- 编委弹窗 -->
<el-dialog title="Edit Board" :visible.sync="BoardEditorFormVisible" width="800px" :close-on-click-modal="false"> <el-dialog title="Edit Board" :visible.sync="BoardEditorFormVisible" width="800px" :close-on-click-modal="false">
<el-form ref="BoardEditorForm" :model="BoardEditorForm" label-width="130px" :rules="BoardEditorFormRule"> <el-form ref="BoardEditorForm" :model="BoardEditorForm" label-width="160px" :rules="BoardEditorFormRule">
<el-form-item label="Type :"> <el-form-item label="Type :">
<el-radio-group v-model="BoardEditorForm.type"> <el-radio-group v-model="BoardEditorForm.type">
<el-radio :label="0">Editor-in-Chief</el-radio> <el-radio :label="0">Editor-in-Chief</el-radio>
@@ -688,6 +713,48 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="Personal Picture :" prop="email">
<div class="portrait" @click="unplIcon">
<img src="@/assets/img/userImg.jpg" class="portrait" v-if="pictureUrl == ''" />
<img :src="pictureUrl" class="portrait" v-if="pictureUrl != ''" />
<el-upload
class="avatar-uploader"
ref="upIconIMg"
:action="baseUrl + 'api/Ucenter/up_userIcon_file'"
:show-file-list="false"
name="icon"
:on-success="handleAvatarSuccess2"
:on-error="handleAvatarError2"
:before-upload="beforeAvatarUpload2"
style="display: none"
>
<img v-if="pictureUrl" :src="pictureUrl" class="avatar" accept=".png,.jpg" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<div class="ptmark">Upload avatar</div>
</div>
</el-form-item>
<el-form-item label="Email :" prop="email">
<el-input v-model="BoardEditorForm.email"></el-input>
</el-form-item>
<el-form-item label="English name :" prop="realname">
<el-input v-model="BoardEditorForm.realname"></el-input>
</el-form-item>
<el-form-item label="Website :" prop="website">
<el-input v-model="BoardEditorForm.website" placeholder="eg:http://..."></el-input>
</el-form-item>
<el-form-item label="Title :" prop="technical">
<el-select v-model="BoardEditorForm.technical" filterable placeholder="Please select" value-key="groupID" style="width: 200px">
<el-option v-for="item in df_technical" :key="item.label" :label="item.label" :value="item.label"></el-option>
</el-select>
</el-form-item>
<el-form-item label="Affiliation :" prop="affiliation">
<el-input v-model="BoardEditorForm.affiliation" placeholder="Please enter"></el-input>
</el-form-item>
<el-form-item label="Research Areas :" prop="research_areas"> <el-form-item label="Research Areas :" prop="research_areas">
<el-input type="textarea" rows="5" v-model="BoardEditorForm.research_areas"></el-input> <el-input type="textarea" rows="5" v-model="BoardEditorForm.research_areas"></el-input>
</el-form-item> </el-form-item>
@@ -704,8 +771,10 @@
export default { export default {
data() { data() {
return { return {
pictureUrl:'',
journalInfo: {}, // 选中期刊信息 journalInfo: {}, // 选中期刊信息
baseUrl: this.Common.baseUrl, baseUrl: this.Common.baseUrl,
mediaUrl: this.Common.mediaUrl,
edit_id: localStorage.getItem('U_id'), edit_id: localStorage.getItem('U_id'),
now_year: 0, now_year: 0,
tableData_0: [], tableData_0: [],
@@ -729,7 +798,12 @@ export default {
addForm: { addForm: {
email: '', email: '',
board_icon: '', board_icon: '',
board_group_id: -1 board_group_id: -1,
technical: '',
affiliation: '',
website: '',
realname: ''
}, },
editForm: { editForm: {
journal_id: 0 journal_id: 0
@@ -747,6 +821,63 @@ export default {
imageUrl: '', imageUrl: '',
imageUrl_: '', imageUrl_: '',
imageUrl_Mark: 0, imageUrl_Mark: 0,
df_technical: [
{
label: 'Professor'
},
{
label: 'Associate Professor'
},
{
label: 'Assistant Professor'
},
// {
// label: 'Ph.D.',
// },
{
label: 'Researcher'
},
{
label: 'Associate research fellow'
},
{
label: 'Assistant research fellow'
},
{
label: 'Engineer'
},
{
label: 'Senior engineer'
},
{
label: 'Associate Researcher'
},
{
label: 'Lecturer'
},
{
label: 'Associate Chief Physician'
},
{
label: 'Assistant Researcher'
},
{
label: 'Physician'
},
{
label: 'Chief Physician'
},
{
label: 'Senior Lecturer'
},
{
label: 'Research Fellow'
},
{
label: 'Senior Investigator'
}
],
title_options: [ title_options: [
{ {
value: 'Instructor' value: 'Instructor'
@@ -883,6 +1014,13 @@ export default {
trigger: 'blur' trigger: 'blur'
} }
], ],
realname: [
{
required: true,
message: 'Please input english name',
trigger: 'blur'
}
],
email: [ email: [
{ {
required: true, required: true,
@@ -928,6 +1066,13 @@ export default {
trigger: 'blur' trigger: 'blur'
} }
], ],
affiliation: [
{
required: true,
message: 'Please input affiliation',
trigger: 'blur'
}
],
type: [ type: [
{ {
required: true, required: true,
@@ -949,6 +1094,13 @@ export default {
trigger: 'blur' trigger: 'blur'
} }
], ],
technical: [
{
required: true,
message: 'Please input title',
trigger: 'blur'
}
],
field: [ field: [
{ {
required: true, required: true,
@@ -979,6 +1131,37 @@ export default {
] ]
}, },
BoardEditorFormRule: { BoardEditorFormRule: {
email: [
{
required: true,
message: 'Please input email',
trigger: 'blur'
},
{
validator: function (rule, value, callback) {
if (/^[-.-_A-Za-z0-9]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(value) == false) {
callback(new Error('Please enter the correct email format'));
} else {
callback();
}
},
trigger: 'blur'
}
],
affiliation: [
{
required: true,
message: 'Please input affiliation',
trigger: 'blur'
}
],
technical: [
{
required: true,
message: 'Please input title',
trigger: 'blur'
}
],
research_areas: [ research_areas: [
{ {
required: true, required: true,
@@ -993,6 +1176,44 @@ export default {
this.getjour(); this.getjour();
}, },
methods: { methods: {
unplIcon() {
this.$refs['upIconIMg'].$refs['upload-inner'].handleClick();
},
//上传头像
handleAvatarSuccess2(res, file) {
console.log('res at line 1183:', res)
if (res.code == 0) {
// this.$api
// .post('api/Ucenter/updateIncon', {
// user_id: this.role_id,
// icon: res.upurl
// })
// .then((res) => {
// if (res.code == 0) {
// this.$message.success('Successfully uploaded the avatar!');
// this.pictureUrl = URL.createObjectURL(file.raw);
// } else {
// this.$message.error(res.msg);
// }
// })
// .catch((err) => {
// this.$message.error(err);
// });
} else {
this.$message.error(res.msg);
}
},
handleAvatarError2(res, file) {
// this.$message.error(res);
},
beforeAvatarUpload2(file) {
const isLt2M = file.size / 1024 / 1024 < 1;
if (!isLt2M) {
this.$message.error('Picture size cannot exceed 1M!');
}
return isLt2M;
},
// 获取编委和负责期刊列表数据 // 获取编委和负责期刊列表数据
getDate() { getDate() {
const loading = this.$loading({ const loading = this.$loading({
@@ -1308,6 +1529,11 @@ export default {
this.BoardEditorForm.type = row.type; this.BoardEditorForm.type = row.type;
this.BoardEditorForm.board_group_id = row.board_group_id; this.BoardEditorForm.board_group_id = row.board_group_id;
this.BoardEditorForm.research_areas = row.research_areas; this.BoardEditorForm.research_areas = row.research_areas;
if (row.icon != '') {
this.pictureUrl = this.mediaUrl + 'usericon/' + row.icon;
} else {
this.pictureUrl = '';
}
this.BoardEditorFormVisible = true; this.BoardEditorFormVisible = true;
}); });
}, },
@@ -1328,7 +1554,12 @@ export default {
this.addForm.user_id = res.data.user_info.user_id; this.addForm.user_id = res.data.user_info.user_id;
this.addForm.account = res.data.user_info.account; this.addForm.account = res.data.user_info.account;
this.addForm.email = res.data.user_info.email; this.addForm.email = res.data.user_info.email;
this.addForm.name = res.data.user_info.realname; this.addForm.realname = res.data.user_info.realname;
this.addForm.affiliation = res.data.user_info.affiliation;
this.addForm.website = res.data.user_info.website;
this.addForm.technical = res.data.user_info.technical;
this.pictureUrl = this.mediaUrl + 'usericon/' + res.data.user_info.icon;
this.$forceUpdate()
} }
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
@@ -1346,17 +1577,23 @@ export default {
saveAdd() { saveAdd() {
this.$refs.add_Form.validate((valid) => { this.$refs.add_Form.validate((valid) => {
if (valid) { if (valid) {
// if (this.addForm.board_icon == '' || this.addForm.board_icon == undefined) { if (this.addForm.board_icon == '' || this.addForm.board_icon == undefined) {
// this.$message.error('Please upload the picture!'); this.$message.error('Please upload the picture!');
// return return
// } }
this.$api this.$api
.post('api/Board/addBoard', { .post('api/Board/addBoardNew', {
user_id: this.addForm.user_id, user_id: this.addForm.user_id,
journal_id: this.addForm.journal_id, journal_id: this.addForm.journal_id,
board_group_id: this.addForm.board_group_id, board_group_id: this.addForm.board_group_id,
type: this.addForm.type, type: this.addForm.type,
research_areas: this.addForm.field research_areas: this.addForm.field,
realname: this.addForm.realname,
email: this.addForm.email,
website: this.addForm.website,
affiliation: this.addForm.affiliation,
technical: this.addForm.technical,
icon: this.addForm.icon,
}) })
.then((res) => { .then((res) => {
if (res.code == 0) { if (res.code == 0) {
@@ -1748,4 +1985,39 @@ export default {
height: 140px; height: 140px;
display: block; display: block;
} }
.portrait {
width: 83px;
height: 83px;
border-radius: 110px;
border: 1.5px solid #eee;
cursor: pointer;
position: relative;
display: inline-block;
}
.portrait > img {
width: 80px;
height: 80px;
border-radius: 110px;
}
.portrait .ptmark {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: #00000033;
color: #fff;
border-radius: 110px;
font-size: 16px;
line-height: 22px;
display: none;
padding: 22px 0 0 0;
text-align: center;
}
.portrait:hover .ptmark {
display: block;
}
</style> </style>

View File

@@ -74,7 +74,9 @@ module.exports = {
// target: 'http://www.tougao.com/', // target: 'http://www.tougao.com/',
// target: 'http://192.168.110.110/tougao/public/index.php/', // target: 'http://192.168.110.110/tougao/public/index.php/',
// target: 'http://api.tmrjournals.com/public/index.php/',//正式 // target: 'http://api.tmrjournals.com/public/index.php/',//正式
// target: 'http://zmzm.tougao.dev.com/',//程晓玲
// target: 'http://192.168.110.90:80/',//晓玲
// target: 'http://zmzm.tougao.dev.com/',//晓玲
target: 'https://submission.tmrjournals.com/',//正式 target: 'https://submission.tmrjournals.com/',//正式
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {