This commit is contained in:
2025-10-22 13:08:26 +08:00
parent 5c8f6197e5
commit 46db9b25cf
3 changed files with 107 additions and 116 deletions

View File

@@ -2,8 +2,8 @@
//记得切换
//正式
// const mediaUrl = '/public/';
// const baseUrl = '/';
const mediaUrl = '/public/';
const baseUrl = '/';
// const mediaUrl = 'https://submission.tmrjournals.com/public/';
@@ -19,9 +19,9 @@
// const baseUrl = '/api';
//晓玲
const mediaUrl = 'http://zmzm.tougao.dev.com/public/';
// const mediaUrl = 'http://zmzm.tougao.dev.com/public/';
const baseUrl = '/api';
// const baseUrl = '/api';
// const mediaUrl = 'http://www.tougao.com/';
// const baseUrl = 'http://www.tougao.com/';

View File

@@ -53,9 +53,10 @@
>Avg: <em>{{ journalInfo.avg }}</em></span
>
<span
>Total: <em>{{ journalInfo.boards_count }}</em>&nbsp;
>Total: <em>{{ journalInfo.boards_count }}</em
>&nbsp;
<span style="color: #909399; float: none"
>( China: <em style="color: #2675c7;font-weight: 500;">{{ journalInfo.china_count }}</em
>( China: <em style="color: #2675c7; font-weight: 500">{{ journalInfo.china_count }}</em
>)</span
>
</span>
@@ -593,30 +594,29 @@
</el-form-item>
</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="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>
<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="addForm.email"></el-input>
<el-input v-model="addForm.email"></el-input>
</el-form-item>
<!-- <el-form-item label="Account :" prop="account">
{{addForm.account}}
@@ -627,7 +627,6 @@
</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>
@@ -713,42 +712,46 @@
></el-option>
</el-select>
</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>
<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-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-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>
@@ -771,7 +774,7 @@
export default {
data() {
return {
pictureUrl:'',
pictureUrl: '',
journalInfo: {}, // 选中期刊信息
baseUrl: this.Common.baseUrl,
mediaUrl: this.Common.mediaUrl,
@@ -791,7 +794,7 @@ export default {
BoardEditorForm: {
btj_id: null,
type: 0,
research_areas: '',
email: '',
icon: '',
@@ -800,7 +803,7 @@ export default {
affiliation: '',
website: '',
realname: '',
type: '',
type: ''
},
BoardEditorFormVisible: false,
addForm: {
@@ -811,12 +814,10 @@ export default {
affiliation: '',
website: '',
realname: '',
type: '',
type: ''
},
editForm: {
journal_id: 0,
journal_id: 0
},
edit_group: [],
dis_able: false,
@@ -1192,15 +1193,15 @@ export default {
//上传头像
handleAvatarSuccess2(res, file) {
console.log('res at line 1183:', res)
// upurl
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
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', {
@@ -1382,23 +1383,19 @@ export default {
this.$refs.BoardEditorForm.validate((valid) => {
if (valid) {
if (this.BoardEditorForm.icon == '' || this.BoardEditorForm.icon == undefined) {
this.$message.error('Please upload the picture!');
return
this.$message.error('Please upload the picture!');
return;
}
this.$api
.post('/api/Board/editBoardNew', this.BoardEditorForm)
.then((res) => {
if (res.code == 0) {
this.$refs.BoardEditorForm.resetFields();
this.$message.success('succeed!');
this.BoardEditorFormVisible = false;
setTimeout(()=>{
this.getDate();
},500)
setTimeout(() => {
this.getDate();
}, 500);
} else {
this.$message.error(res.msg);
}
@@ -1520,7 +1517,7 @@ 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;
@@ -1530,7 +1527,7 @@ export default {
getJourAdd(type) {
this.$api
.post('api/Board/getBoardGroupList', {
journal_id:type?this.BoardEditorForm.journal_id: this.addForm.journal_id
journal_id: type ? this.BoardEditorForm.journal_id : this.addForm.journal_id
})
.then((res) => {
if (res.code == 0) {
@@ -1551,46 +1548,41 @@ export default {
// 编辑编委操作
bhandleEdit(index, row) {
this.$api
.post('api/Board/getBoardInfo', {
.post('api/Board/getBoardInfo', {
btj_id: row.btj_id
})
.then((res) => {
if (res.code == 0&&res.data) {
var info={...res.data}
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;
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;
});
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() {
@@ -1615,7 +1607,7 @@ export default {
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()
this.$forceUpdate();
}
} else {
this.$message.error(res.msg);
@@ -1631,14 +1623,13 @@ export default {
// 保存添加
saveAdd() {
console.log('this.addForm at line 1597:', this.addForm)
console.log('this.addForm at line 1597:', this.addForm);
this.$refs.add_Form.validate((valid) => {
if (valid) {
if (this.addForm.icon == '' || this.addForm.icon == undefined) {
this.$message.error('Please upload the picture!');
return
this.$message.error('Please upload the picture!');
return;
}
this.$api
.post('api/Board/addBoardNew', {
@@ -1652,7 +1643,7 @@ export default {
website: this.addForm.website,
affiliation: this.addForm.affiliation,
technical: this.addForm.technical,
icon: this.addForm.icon,
icon: this.addForm.icon
})
.then((res) => {
if (res.code == 0) {
@@ -1660,9 +1651,9 @@ export default {
this.$refs.add_Form.resetFields();
this.$message.success(`Added successfully`);
this.dis_able = false;
setTimeout(()=>{
this.getDate();
},500)
setTimeout(() => {
this.getDate();
}, 500);
} else {
this.$message.error(res.msg);
}

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': ''