This commit is contained in:
2025-10-22 13:03:24 +08:00
parent 89ca76d55b
commit 5c8f6197e5
3 changed files with 105 additions and 39 deletions

View File

@@ -14,7 +14,12 @@
//本地(正式环境 )
const mediaUrl = 'https://submission.tmrjournals.com/public/';
// const mediaUrl = 'https://submission.tmrjournals.com/public/';
// const baseUrl = '/api';
//晓玲
const mediaUrl = 'http://zmzm.tougao.dev.com/public/';
const baseUrl = '/api';

View File

@@ -594,7 +594,7 @@
</el-form>
<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">
<el-form-item label="Personal Picture :" prop="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 != ''" />
@@ -706,7 +706,7 @@
<el-form-item label="Group :" v-if="BoardEditorForm.type == 2">
<el-select v-model="BoardEditorForm.board_group_id" placeholder="Please select a group" style="width: 300px">
<el-option
v-for="item in edit_group"
v-for="item in add_group"
:label="item.group_name"
:key="item.board_group_id"
:value="item.board_group_id"
@@ -791,22 +791,32 @@ export default {
BoardEditorForm: {
btj_id: null,
type: 0,
board_group_id: null,
research_areas: ''
},
BoardEditorFormVisible: false,
addForm: {
research_areas: '',
email: '',
board_icon: '',
icon: '',
board_group_id: -1,
technical: '',
affiliation: '',
website: '',
realname: ''
realname: '',
type: '',
},
BoardEditorFormVisible: false,
addForm: {
email: '',
icon: '',
board_group_id: -1,
technical: '',
affiliation: '',
website: '',
realname: '',
type: '',
},
editForm: {
journal_id: 0
journal_id: 0,
},
edit_group: [],
dis_able: false,
@@ -1108,13 +1118,13 @@ export default {
trigger: 'blur'
}
],
board_icon: [
{
required: true,
message: 'Please select a icon',
trigger: 'blur'
}
],
// icon: [
// {
// required: true,
// message: 'Please select a icon',
// trigger: 'blur'
// }
// ],
address: [
{
required: true,
@@ -1183,7 +1193,15 @@ export default {
//上传头像
handleAvatarSuccess2(res, file) {
console.log('res at line 1183:', res)
// upurl
if (res.code == 0) {
if(this.addVisible){
this.addForm.icon=res.upurl
}else if(this.BoardEditorFormVisible){
this.BoardEditorForm.icon=res.upurl
}
this.pictureUrl = URL.createObjectURL(file.raw);
// this.$api
// .post('api/Ucenter/updateIncon', {
// user_id: this.role_id,
@@ -1363,14 +1381,24 @@ export default {
saveBoard() {
this.$refs.BoardEditorForm.validate((valid) => {
if (valid) {
if (this.BoardEditorForm.icon == '' || this.BoardEditorForm.icon == undefined) {
this.$message.error('Please upload the picture!');
return
}
this.$api
.post('/api/Board/editBoard', this.BoardEditorForm)
.post('/api/Board/editBoardNew', this.BoardEditorForm)
.then((res) => {
if (res.code == 0) {
this.getDate();
this.$refs.BoardEditorForm.resetFields();
this.$message.success('succeed!');
this.BoardEditorFormVisible = false;
setTimeout(()=>{
this.getDate();
},500)
} else {
this.$message.error(res.msg);
}
@@ -1499,10 +1527,10 @@ export default {
},
// 改变期刊
getJourAdd() {
getJourAdd(type) {
this.$api
.post('api/Board/getBoardGroupList', {
journal_id: this.addForm.journal_id
journal_id:type?this.BoardEditorForm.journal_id: this.addForm.journal_id
})
.then((res) => {
if (res.code == 0) {
@@ -1523,19 +1551,46 @@ export default {
// 编辑编委操作
bhandleEdit(index, row) {
this.$nextTick(() => {
// console.log(row,'row')
this.BoardEditorForm.btj_id = row.btj_id;
this.BoardEditorForm.type = row.type;
this.BoardEditorForm.board_group_id = row.board_group_id;
this.BoardEditorForm.research_areas = row.research_areas;
if (row.icon != '') {
this.pictureUrl = this.mediaUrl + 'usericon/' + row.icon;
this.$api
.post('api/Board/getBoardInfo', {
btj_id: row.btj_id
})
.then((res) => {
if (res.code == 0&&res.data) {
var info={...res.data}
this.$nextTick(() => {
this.BoardEditorForm.btj_id = info.btj_id;
this.BoardEditorForm.type = info.type;
this.BoardEditorForm.board_group_id = info.board_group_id;
this.BoardEditorForm.research_areas = info.research_areas;
this.BoardEditorForm.affiliation = info.affiliation||info.company;
this.BoardEditorForm.icon = info.icon;
this.BoardEditorForm.technical = info.technical;
this.BoardEditorForm.website = info.website;
this.BoardEditorForm.email = info.email;
this.BoardEditorForm.realname = info.realname;
this.BoardEditorForm.journal_id = info.journal_id;
// this.pictureUrl=this.mediaUrl + 'usericon/' + info.icon;
if (info.icon != '') {
this.pictureUrl = this.mediaUrl + 'usericon/' + info.icon;
} else {
this.pictureUrl = '';
}
this.getJourAdd('edit');
this.BoardEditorFormVisible = true;
});
} else {
}
})
.catch((err) => {
this.$message.error(err);
});
},
// 查找账号
saerNa_U() {
@@ -1558,6 +1613,7 @@ export default {
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.addForm.icon = res.data.user_info.icon;
this.pictureUrl = this.mediaUrl + 'usericon/' + res.data.user_info.icon;
this.$forceUpdate()
}
@@ -1575,16 +1631,19 @@ export default {
// 保存添加
saveAdd() {
console.log('this.addForm at line 1597:', this.addForm)
this.$refs.add_Form.validate((valid) => {
if (valid) {
if (this.addForm.board_icon == '' || this.addForm.board_icon == undefined) {
if (this.addForm.icon == '' || this.addForm.icon == undefined) {
this.$message.error('Please upload the picture!');
return
}
this.$api
.post('api/Board/addBoardNew', {
user_id: this.addForm.user_id,
journal_id: this.addForm.journal_id,
journal_id: this.query.journal_id,
board_group_id: this.addForm.board_group_id,
type: this.addForm.type,
research_areas: this.addForm.field,
@@ -1601,7 +1660,9 @@ export default {
this.$refs.add_Form.resetFields();
this.$message.success(`Added successfully`);
this.dis_able = false;
this.getDate();
setTimeout(()=>{
this.getDate();
},500)
} else {
this.$message.error(res.msg);
}
@@ -1625,7 +1686,7 @@ export default {
// 编辑操作
handleEdit(index, row) {
this.editForm = Object.assign({}, row);
this.imageUrl_ = this.baseUrl + 'journalpublic/' + this.editForm.board_icon;
this.imageUrl_ = this.baseUrl + 'journalpublic/' + this.editForm.icon;
this.imageUrl_Mark = 0;
this.editVisible = true;
// this.getJourEdit(this.query.journal_id)
@@ -1634,7 +1695,7 @@ export default {
// 改变期刊
getJourEdit(e) {
this.$api
.post('api/Board/getBoardGroupList', {
.post('', {
journal_id: e
})
.then((res) => {
@@ -1790,7 +1851,7 @@ export default {
//上传图片-添加
handleAvatarSuccess(res, file) {
if (res.code == 0) {
this.addForm.board_icon = res.upurl;
this.addForm.icon = res.upurl;
} else {
this.$message.error(res.msg);
}
@@ -1810,7 +1871,7 @@ export default {
//上传图片-编辑
handleAvatarSuccess_(res, file) {
if (res.code == 0) {
this.editForm.board_icon = res.upurl;
this.editForm.icon = res.upurl;
// this.imageUrl_ = this.baseUrl + 'boardIcon/' + res.upurl;
this.imageUrl_Mark = 1;
} else {

View File

@@ -76,8 +76,8 @@ module.exports = {
// target: 'http://api.tmrjournals.com/public/index.php/',//正式
// target: 'http://192.168.110.90:80/',//晓玲
// target: 'http://zmzm.tougao.dev.com/',//晓玲
target: 'https://submission.tmrjournals.com/',//正式
target: 'http://zmzm.tougao.dev.com/',//晓玲
// target: 'https://submission.tmrjournals.com/',//正式
changeOrigin: true,
pathRewrite: {
'^/api': ''