From 89ca76d55b19e6bbab80314e657ceb0109359419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=8B=E4=BA=8E=E5=88=9D=E8=A7=81?= <752204717@qq.com> Date: Tue, 21 Oct 2025 10:04:36 +0800 Subject: [PATCH] tijiao --- src/components/common/common.vue | 10 +- src/components/page/editorBorder.vue | 320 +++++++++++++++++++++++++-- vue.config.js | 4 +- 3 files changed, 304 insertions(+), 30 deletions(-) diff --git a/src/components/common/common.vue b/src/components/common/common.vue index cd89684..2af024a 100644 --- a/src/components/common/common.vue +++ b/src/components/common/common.vue @@ -2,8 +2,8 @@ //记得切换 //正式 -const mediaUrl = '/public/'; -const baseUrl = '/'; +// const mediaUrl = '/public/'; +// const baseUrl = '/'; // const mediaUrl = 'https://submission.tmrjournals.com/public/'; @@ -14,9 +14,9 @@ const baseUrl = '/'; //本地(正式环境 ) -// const mediaUrl = 'https://submission.tmrjournals.com/public/'; -// const mediaUrl = 'http://192.168.110.110/tougao/public/index.php/'; -// const baseUrl = '/api'; +const mediaUrl = 'https://submission.tmrjournals.com/public/'; + +const baseUrl = '/api'; // const mediaUrl = 'http://www.tougao.com/'; // const baseUrl = 'http://www.tougao.com/'; diff --git a/src/components/page/editorBorder.vue b/src/components/page/editorBorder.vue index 5389b8e..82bce89 100644 --- a/src/components/page/editorBorder.vue +++ b/src/components/page/editorBorder.vue @@ -593,28 +593,53 @@ + + +
+ + + +
Upload avatar
+
+
- {{ addForm.email }} + - + + + --> + + + + + + + + + + + + + + - - + Editor-in-Chief @@ -688,6 +713,48 @@ > + + +
+ + + +
Upload avatar
+
+
+ + + + + + + + + + + + + + + + + + + + @@ -704,8 +771,10 @@ export default { data() { return { + pictureUrl:'', journalInfo: {}, // 选中期刊信息 baseUrl: this.Common.baseUrl, + mediaUrl: this.Common.mediaUrl, edit_id: localStorage.getItem('U_id'), now_year: 0, tableData_0: [], @@ -729,7 +798,12 @@ export default { addForm: { email: '', board_icon: '', - board_group_id: -1 + board_group_id: -1, + technical: '', + affiliation: '', + website: '', + realname: '' + }, editForm: { journal_id: 0 @@ -747,6 +821,63 @@ export default { imageUrl: '', imageUrl_: '', 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: [ { value: 'Instructor' @@ -883,6 +1014,13 @@ export default { trigger: 'blur' } ], + realname: [ + { + required: true, + message: 'Please input english name', + trigger: 'blur' + } + ], email: [ { required: true, @@ -928,6 +1066,13 @@ export default { trigger: 'blur' } ], + affiliation: [ + { + required: true, + message: 'Please input affiliation', + trigger: 'blur' + } + ], type: [ { required: true, @@ -949,6 +1094,13 @@ export default { trigger: 'blur' } ], + technical: [ + { + required: true, + message: 'Please input title', + trigger: 'blur' + } + ], field: [ { required: true, @@ -979,6 +1131,37 @@ export default { ] }, 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: [ { required: true, @@ -993,6 +1176,44 @@ export default { this.getjour(); }, 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() { const loading = this.$loading({ @@ -1308,6 +1529,11 @@ export default { 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; + } else { + this.pictureUrl = ''; + } this.BoardEditorFormVisible = true; }); }, @@ -1328,7 +1554,12 @@ export default { this.addForm.user_id = res.data.user_info.user_id; this.addForm.account = res.data.user_info.account; 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 { this.$message.error(res.msg); @@ -1346,17 +1577,23 @@ export default { saveAdd() { this.$refs.add_Form.validate((valid) => { if (valid) { - // if (this.addForm.board_icon == '' || this.addForm.board_icon == undefined) { - // this.$message.error('Please upload the picture!'); - // return - // } + if (this.addForm.board_icon == '' || this.addForm.board_icon == undefined) { + this.$message.error('Please upload the picture!'); + return + } this.$api - .post('api/Board/addBoard', { + .post('api/Board/addBoardNew', { user_id: this.addForm.user_id, journal_id: this.addForm.journal_id, board_group_id: this.addForm.board_group_id, 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) => { if (res.code == 0) { @@ -1748,4 +1985,39 @@ export default { height: 140px; 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; +} diff --git a/vue.config.js b/vue.config.js index 738c4e0..63a64ca 100644 --- a/vue.config.js +++ b/vue.config.js @@ -74,7 +74,9 @@ module.exports = { // target: 'http://www.tougao.com/', // target: 'http://192.168.110.110/tougao/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/',//正式 changeOrigin: true, pathRewrite: {