This commit is contained in:
2025-05-20 09:55:12 +08:00
parent 4e8e8e796f
commit c60d06194c
22 changed files with 8978 additions and 321 deletions

View File

@@ -47,7 +47,8 @@
<span class="title">{{ $t('JournalCitationAnalysis.level') }} :</span><span>{{ scope.row.level }}</span>
</div>
<div class="item" v-if="scope.row.journal_topic">
<span class="title">{{ $t('JournalCitationAnalysis.journal_topic') }} :</span><span>{{ scope.row.journal_topic }}</span>
<span class="title">{{ $t('JournalCitationAnalysis.journal_topic') }} :</span
><span>{{ scope.row.journal_topic }}</span>
</div>
</div>
</template>
@@ -145,8 +146,8 @@
</el-table-column>
</el-table>
</div>
<el-dialog :title="$t('GroupClassification.edit')" :visible.sync="editDialogVisible" width="600px" :before-close="handleEditClose">
<el-form ref="detail_form" :model="detailForm" :rules="rules" label-width="165px">
<el-dialog :title="$t('GroupClassification.edit')" :visible.sync="editDialogVisible" width="1000px" :before-close="handleEditClose">
<el-form ref="detail_form" :model="detailForm" :rules="rules" label-width="180px">
<el-form-item label="Journal :">
<p style="display: flex; align-items: center; justify-content: space-between">
<span>{{ detailForm.title }}</span>
@@ -195,7 +196,28 @@
<el-input-number v-model="detailForm.fee" :min="0" v-if="source == 'all'"></el-input-number>
<span v-else>{{ detailForm.fee }}</span>
</el-form-item>
<el-form-item label="Research areas :" prop="ResearchAreas">
<el-form-item label="Journal publisher :" prop="publish_author">
<el-input v-model="detailForm.publish_author" placeholder="eg:TMR编辑部"></el-input>
</el-form-item>
<el-form-item label="WeChat Code :" prop="editor_qrcode">
<div class="portrait WeChatCode">
<el-upload
class="avatar-uploader"
ref="upIconIMg"
:action="baseUrl + 'api/Journal/uploadEditorQrcode'"
:show-file-list="false"
name="qrcode_url"
:on-success="handleAvatarSuccess2"
:on-error="handleAvatarError2"
:before-upload="beforeAvatarUpload2"
>
<img v-if="detailForm.editor_qrcode" :src="mediaUrl + 'journaleditorqrcode/' + detailForm.editor_qrcode" class="avatar" accept=".png,.jpg" />
<i v-else class="el-icon-plus avatar-uploader-icon" style="line-height: 120px"></i>
</el-upload>
</div>
</el-form-item>
<el-form-item label="Journal Topic :" prop="ResearchAreas">
<el-button @click="addArea" size="mini" type="primary" plain style="position: absolute; right: 0; margin-left: 10px"
>+ Add</el-button
>
@@ -214,10 +236,22 @@
</div>
</div>
</el-form-item>
<el-form-item label="Wechat Name :" prop="wechat_name">
<el-input v-model="detailForm.wechat_name" placeholder="eg:公众号名称"></el-input>
</el-form-item>
<el-form-item label="Wechat APP ID :" prop="wechat_app_id">
<el-input v-model="detailForm.wechat_app_id" placeholder="eg:公众号app_id"></el-input>
</el-form-item>
<el-form-item label="Wechat APP Secret :" prop="wechat_app_secret">
<el-input v-model="detailForm.wechat_app_secret" placeholder="eg:公众号app_secret"></el-input>
</el-form-item>
<!-- 简介 -->
<el-form-item label="Introduction :" prop="scope">
<el-form-item label="Introduction (English) :" prop="scope">
<el-input type="textarea" rows="5" v-model="detailForm.scope"></el-input>
</el-form-item>
<el-form-item label="Introduction (Chinese) :" prop="abstract_chinese">
<el-input type="textarea" rows="5" v-model="detailForm.abstract_chinese"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="handleEditClose()">{{ $t('GroupClassification.cancel') }}</el-button>
@@ -288,6 +322,7 @@ export default {
},
data() {
return {
mediaUrl: this.Common.mediaUrl,
baseUrl: this.Common.baseUrl,
activeNames: [],
detailForm: {},
@@ -336,11 +371,23 @@ export default {
trigger: 'blur'
}
],
// scope: [{
// required: true,
// message: 'Please input journal introduction',
// trigger: 'blur'
// }],
publish_author: [
{
required: true,
message: 'Please input Journal publisher',
trigger: 'blur'
}
],
scope: [{
required: true,
message: 'Please input journal introduction (English)',
trigger: 'blur'
}],
abstract_chinese: [{
required: true,
message: 'Please input journal introduction (Chinese)',
trigger: 'blur'
}],
email: [
{
required: true,
@@ -397,6 +444,24 @@ export default {
await this.getDate();
},
methods: {
async handleAvatarSuccess2(res, file) {
if (res.code == 0) {
this.detailForm.editor_qrcode = res.upurl;
this.$forceUpdate()
} 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;
},
addArea() {
this.detailForm.areas.push('');
},
@@ -415,18 +480,23 @@ export default {
// this.$message.error(res);
},
//上传图片
handleAvatarSuccess2(res, file) {
if (res.code == 0) {
this.detailForm.journalicon = res.upurl;
}
},
// handleAvatarSuccess2(res, file) {
// if (res.code == 0) {
// this.detailForm.journalicon = res.upurl;
// }
// },
handleEdit() {
this.$refs.detail_form.validate((valid) => {
if (valid) {
if(this.detailForm.editor_qrcode==''||!this.detailForm.editor_qrcode){
this.$message.error('Please upload WeChat Code!');
return false;
}
this.$api
.post('api/Journal/editJournal', {...this.detailForm,journal_topic:this.detailForm.areas&&this.detailForm.areas.length>0?this.detailForm.areas.toString():''})
.post('api/Journal/editJournal', {
...this.detailForm,
journal_topic: this.detailForm.areas && this.detailForm.areas.length > 0 ? this.detailForm.areas.toString() : ''
})
.then((res) => {
if (res.code == 0) {
this.$message.success('Change Success!');
@@ -585,8 +655,10 @@ export default {
});
},
openEditJournal(data) {
var that = this;
this.currentJournal = data;
this.detailForm = {
journal_id: data.journal_id,
title: data.title,
@@ -595,10 +667,20 @@ export default {
epassword: data.epassword,
kfen: data.kfen,
fee: data.fee,
editor_qrcode: data.editor_qrcode,
scope: data.scope,
areas: data.journal_topic?data.journal_topic.split(','):[''],
abstract_chinese: data.abstract_chinese,
publish_author: data.publish_author,
wechat_name: data.wechat_name,
wechat_app_id: data.wechat_app_id,
wechat_app_secret: data.wechat_app_secret,
areas: data.journal_topic ? data.journal_topic.split(',') : ['']
};
this.editDialogVisible = true;
if(this.$refs.detail_form){
this.$refs.detail_form.resetFields();
}
// this.$nextTick(() => {
// that.$refs.commonClassRef.init();
// });
@@ -989,7 +1071,7 @@ export default {
// margin-bottom: 4px;
}
}
.avatar-uploader .el-upload {
.WeChatCode .avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
@@ -999,15 +1081,15 @@ export default {
height: 120px;
}
.avatar-uploader_small {
.WeChatCode .avatar-uploader_small {
height: 120px;
}
.avatar-uploader .el-upload:hover {
.WeChatCode .avatar-uploader .el-upload:hover {
border-color: #409eff;
}
.avatar-uploader-icon {
.WeChatCode .avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 120px;
@@ -1016,19 +1098,65 @@ export default {
text-align: center;
}
.avatar-uploader_small .el-upload {
.WeChatCode .avatar-uploader_small .el-upload {
width: 80px;
height: 80px;
}
.avatar-uploader_small .avatar-uploader-icon {
.WeChatCode .avatar-uploader_small .avatar-uploader-icon {
line-height: 80px;
margin-left: -30px;
}
.avatar {
.WeChatCode .avatar {
width: 120px;
height: 120px;
display: block;
}.portrait {
/* width: 83px;
height: 83px;
border-radius: 110px;
border: 1.5px solid #eee;
cursor: pointer;
position: relative;
display: inline-block; */
}
::v-deep .WeChatCode .avatar-uploader,
.el-upload,
.avatar {
width: 120px;
height: 120px;
border-radius: 110px;
}
::v-deep .el-upload--text {
width: 120px;
height: 120px;
padding: 0 !important;
border-radius: 110px;
}
.portrait > img {
width: 120px;
height: 120px;
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;
}
.WeChatCode .avatar-uploader .el-upload {
width: 120px !important;
height: 120px !important;
}
</style>