diff --git a/src/api/index.js b/src/api/index.js
index fa6d863..2698668 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -19,8 +19,8 @@ const service = axios.create({
// baseURL: 'https://submission.tmrjournals.com/', //正式 记得切换
// baseURL: 'http://www.tougao.com/', //测试本地 记得切换
// baseURL: 'http://192.168.110.110/tougao/public/index.php/',
- baseURL: '/api', //本地
- // baseURL: '/', //正式
+ // baseURL: '/api', //本地
+ baseURL: '/', //正式
});
diff --git a/src/components/common/common.vue b/src/components/common/common.vue
index cd89684..e5d0eb1 100644
--- a/src/components/common/common.vue
+++ b/src/components/common/common.vue
@@ -15,7 +15,12 @@ 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 = 'http://zmzm.tougao.dev.com/public/';
+
// const baseUrl = '/api';
// const mediaUrl = 'http://www.tougao.com/';
diff --git a/src/components/page/editorBorder.vue b/src/components/page/editorBorder.vue
index 5389b8e..84764f8 100644
--- a/src/components/page/editorBorder.vue
+++ b/src/components/page/editorBorder.vue
@@ -53,9 +53,10 @@
>Avg: {{ journalInfo.avg }}
Total: {{ journalInfo.boards_count }}
+ >Total: {{ journalInfo.boards_count }}
( China: {{ journalInfo.china_count }}( China: {{ journalInfo.china_count }})
@@ -593,28 +594,51 @@
+
+
+

+
![]()
+
+
+
+
+
Upload avatar
+
+
- {{ addForm.email }}
+
-
+
+
+ -->
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
Editor-in-Chief
@@ -681,13 +705,59 @@
+
+
+
+

+
![]()
+
+
+
+
+
Upload avatar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -704,8 +774,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: [],
@@ -722,14 +794,27 @@ export default {
BoardEditorForm: {
btj_id: null,
type: 0,
- board_group_id: null,
- research_areas: ''
+
+ research_areas: '',
+ email: '',
+ icon: '',
+ board_group_id: -1,
+ technical: '',
+ affiliation: '',
+ website: '',
+ realname: '',
+ type: ''
},
BoardEditorFormVisible: false,
addForm: {
email: '',
- board_icon: '',
- board_group_id: -1
+ icon: '',
+ board_group_id: -1,
+ technical: '',
+ affiliation: '',
+ website: '',
+ realname: '',
+ type: ''
},
editForm: {
journal_id: 0
@@ -747,6 +832,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 +1025,13 @@ export default {
trigger: 'blur'
}
],
+ realname: [
+ {
+ required: true,
+ message: 'Please input english name',
+ trigger: 'blur'
+ }
+ ],
email: [
{
required: true,
@@ -928,6 +1077,13 @@ export default {
trigger: 'blur'
}
],
+ affiliation: [
+ {
+ required: true,
+ message: 'Please input affiliation',
+ trigger: 'blur'
+ }
+ ],
type: [
{
required: true,
@@ -949,6 +1105,13 @@ export default {
trigger: 'blur'
}
],
+ technical: [
+ {
+ required: true,
+ message: 'Please input title',
+ trigger: 'blur'
+ }
+ ],
field: [
{
required: true,
@@ -956,13 +1119,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,
@@ -979,6 +1142,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 +1187,52 @@ export default {
this.getjour();
},
methods: {
+ unplIcon() {
+ this.$refs['upIconIMg'].$refs['upload-inner'].handleClick();
+ },
+
+ //上传头像
+ 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,
+ // 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({
@@ -1142,14 +1382,20 @@ 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);
}
@@ -1271,17 +1517,17 @@ export default {
// 添加操作
addEditor(index, row) {
- this.$set(this.addForm,'journal_id', this.add_jour[0].journal_id)
+ this.$set(this.addForm, 'journal_id', this.add_jour[0].journal_id);
// this.addForm.journal_id = this.add_jour[0].journal_id;
this.getJourAdd();
this.addVisible = true;
},
// 改变期刊
- 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) {
@@ -1302,14 +1548,41 @@ 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;
- this.BoardEditorFormVisible = true;
- });
+ 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;
+ 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() {
@@ -1328,7 +1601,13 @@ 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.addForm.icon = res.data.user_info.icon;
+ this.pictureUrl = this.mediaUrl + 'usericon/' + res.data.user_info.icon;
+ this.$forceUpdate();
}
} else {
this.$message.error(res.msg);
@@ -1344,19 +1623,27 @@ 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) {
- // this.$message.error('Please upload the picture!');
- // return
- // }
+ if (this.addForm.icon == '' || this.addForm.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,
+ journal_id: this.query.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) {
@@ -1364,7 +1651,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);
}
@@ -1388,7 +1677,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)
@@ -1397,7 +1686,7 @@ export default {
// 改变期刊
getJourEdit(e) {
this.$api
- .post('api/Board/getBoardGroupList', {
+ .post('', {
journal_id: e
})
.then((res) => {
@@ -1553,7 +1842,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);
}
@@ -1573,7 +1862,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 {
@@ -1748,4 +2037,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: {