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'; const baseUrl = '/api';

View File

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

View File

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