Merge branch 'master' of https://gitee.com/wjl2008_admin/tougao_web into zy-edit

This commit is contained in:
2025-06-09 15:55:37 +08:00
40 changed files with 1209 additions and 5552 deletions

BIN
dist.zip

Binary file not shown.

View File

@@ -7,6 +7,7 @@
<router-view v-if="!$route.meta.keepAlive"></router-view> --> <router-view v-if="!$route.meta.keepAlive"></router-view> -->
</div> </div>
</template> </template>
<style> <style>
@import "./assets/css/main.css"; @import "./assets/css/main.css";
@import "./assets/css/color-dark.css"; @import "./assets/css/color-dark.css";

View File

@@ -1,7 +1,9 @@
import Vue from 'vue'; import Vue from 'vue';
import katex from 'katex'; import katex from 'katex';
import JSZip from 'jszip'; import JSZip from 'jszip';
import mammoth from "mammoth"; import mammoth from "mammoth";
import api from '../../api/index.js';
import Common from '@/components/common/common' import Common from '@/components/common/common'
import Tiff from 'tiff.js'; import Tiff from 'tiff.js';
var mediaUrl = Common.mediaUrl + 'articleImage/'; var mediaUrl = Common.mediaUrl + 'articleImage/';
@@ -50,9 +52,10 @@ const capitalizeFirstLetter = function (text) {
//px //px
function emuToPixels(emu) { function emuToPixels(emu) {
// 将 EMU 转换为厘米,并进一步转换为像素 // 将 EMU 转换为厘米,并进一步转换为像素
const emuToPixels = emu / 914400 * 2.54 * 96; const emuToPixels = emu * 96 / 914400;
// return parseFloat((emu * 96 / 914400).toFixed(2)); // ✅
// 四舍五入并保留两位小数 // 四舍五入并保留两位小数
return (Math.round(emuToPixels * 100) / 100).toFixed(2); return (Math.round(emuToPixels * 100) / 100).toFixed(0);
} }
function findExtentElement(blipElement) { function findExtentElement(blipElement) {
let current = blipElement.parentElement; let current = blipElement.parentElement;
@@ -67,6 +70,28 @@ function findExtentElement(blipElement) {
} }
export default { export default {
getJournalTypeName(value) {
var list = JSON.parse(localStorage.getItem('journalTypeDataAll'));
const type = list.find(item => item.value === value);
return type ? type.name : 'OTHERS';
},
journalTypeList(type) {
var journal_type = JSON.parse(localStorage.getItem('journalTypeData'));
return journal_type;
},
opMedicalList() {
var opMedical = JSON.parse(localStorage.getItem('opMedicalListData'))
return opMedical;
},
isImageValid(base64) { isImageValid(base64) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// 创建 Image 对象 // 创建 Image 对象
@@ -92,7 +117,7 @@ export default {
handleFileUpload(event, callback) { handleFileUpload(event, callback) {
const file = event.target.files[0]; const file = event.target.files[0];
if (!file || file.type !== 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') { if (!file || file.type !== 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
alert('请上传一个有效的 Word 文件'); alert('Please upload a valid Word file !');
return; return;
} }
@@ -113,7 +138,7 @@ export default {
const rels = {}; const rels = {};
Array.from(relDoc.getElementsByTagName('Relationship')).forEach((rel) => { Array.from(relDoc.getElementsByTagName('Relationship')).forEach((rel) => {
const id = rel.getAttribute('Id'); const id = rel.getAttribute('Id');
const target = rel.getAttribute('Target'); // e.g., 'media/image1.jpeg' const target = rel.getAttribute('Target');
rels[id] = target; rels[id] = target;
}); });
@@ -129,57 +154,41 @@ export default {
if (cx && cy) { if (cx && cy) {
const width = emuToPixels(cx); const width = emuToPixels(cx);
const height = emuToPixels(cy); const height = emuToPixels(cy);
const mediaFile = rels[embedId]; imageInfoMap[embedId] = { width, height };
if (mediaFile) {
imageInfoMap[mediaFile] = { width, height };
}
} }
} }
}); });
mammoth.convertToHtml({ arrayBuffer }, mammoth.convertToHtml({ arrayBuffer }, {
{
convertImage: mammoth.images.inline(async function (image) { convertImage: mammoth.images.inline(async function (image) {
console.log('image at line 163:', image)
const contentType = image.contentType.toLowerCase(); const contentType = image.contentType.toLowerCase();
// 只允许这三种格式
const allowedTypes = ['image/jpeg', 'image/jpg', 'image/png']; const allowedTypes = ['image/jpeg', 'image/jpg', 'image/png'];
if (!allowedTypes.includes(contentType)) { if (!allowedTypes.includes(contentType)) {
// 跳过不支持的格式(如 image/tiff、image/x-emf 等) return { src: '' };
return { src: '' }; // 会从 HTML 中删除这张图片
} }
// 读取为 base64 并构造 src const embedId = image.relationshipId || image.refId || '';
const imageBuffer = await image.read("base64"); const imageBuffer = await image.read("base64");
const base64Src = `data:${contentType};base64,${imageBuffer}`; const base64Src = `data:${contentType};base64,${imageBuffer}`;
let width = '', height = '';
if (embedId && imageInfoMap[embedId]) {
width = imageInfoMap[embedId].width;
height = imageInfoMap[embedId].height;
}
return { return {
src: base64Src src: base64Src,
alt: '',
width,
height,
refId: embedId,
'content-type': contentType
}; };
}) })
}) }).then((result) => {
.then((result) => {
let html = result.value; let html = result.value;
// html = html.replace(/<img[^>]+src="data:image\/x-emf[^"]*"[^>]*>/gi, '');
// 替换图片标签中的宽高
const imgTags = html.match(/<img[^>]*src="data:image\/[^"]+image(\d+)\.(png|jpg|jpeg)[^"]*"[^>]*>/gi);
if (imgTags) {
imgTags.forEach((imgTag) => {
const match = imgTag.match(/image(\d+)\.(png|jpg|jpeg)/);
if (match) {
const filename = `media/image${match[1]}.${match[2]}`;
const info = imageInfoMap[filename];
if (info) {
const newImgTag = imgTag.replace(
/<img/,
`<img width="${info.width}" height="${info.height}"`
);
html = html.replace(imgTag, newImgTag);
}
}
});
}
// 提取合法表格 // 提取合法表格
const tableContent = html.match(/<table[\s\S]*?<\/table>/g); const tableContent = html.match(/<table[\s\S]*?<\/table>/g);
@@ -188,11 +197,9 @@ export default {
: []; : [];
callback(validTables); callback(validTables);
}) }).catch(err => {
.catch(err => {
console.error('mammoth 转换失败:', err); console.error('mammoth 转换失败:', err);
}); });
}).catch(err => { }).catch(err => {
console.error("Zip 读取失败:", err); console.error("Zip 读取失败:", err);
}); });

View File

@@ -178,6 +178,9 @@ export default {
localStorage.removeItem('U_name'); localStorage.removeItem('U_name');
localStorage.removeItem('U_status'); localStorage.removeItem('U_status');
localStorage.removeItem('ms_journal_alias'); localStorage.removeItem('ms_journal_alias');
localStorage.removeItem('journalTypeData');
localStorage.removeItem('journalTypeDataAll');
localStorage.removeItem('opMedicalListData');
this.$router.push('/login'); this.$router.push('/login');
} }
}, },

View File

@@ -166,6 +166,9 @@ export default {
localStorage.removeItem('U_name'); localStorage.removeItem('U_name');
localStorage.removeItem('U_status'); localStorage.removeItem('U_status');
localStorage.removeItem('ms_journal_alias'); localStorage.removeItem('ms_journal_alias');
localStorage.removeItem('journalTypeData');
localStorage.removeItem('journalTypeDataAll');
localStorage.removeItem('opMedicalListData');
this.$router.push('/login'); this.$router.push('/login');
} }
}, },

View File

@@ -349,10 +349,10 @@ const en = {
rulesAuthorInfo: 'Please enter the author', rulesAuthorInfo: 'Please enter the author',
rulesVolInfo: 'Please enter the publication time', rulesVolInfo: 'Please enter the publication time',
rulesArticleInfo: 'Please enter the article title', rulesArticleInfo: 'Please enter the article title',
authorInfo: 'Six or less authors are required to list all authors while more than six authors are required to list three of them with “et al”.', authorInfo: 'Six or less authors are required to list all authors while more than six authors are required to list three of them with “et al.”.',
author: 'Author(s)', author: 'Author(s)',
publicationTime: 'Year', publicationTime: 'Year',
publicationTimeInfo: 'Year;Volume(issue):Inclusive page numbers.', publicationTimeInfo: 'Year;Volume(issue):Inclusive page numbers',
}, },
commonTable: { commonTable: {
add: 'Add', add: 'Add',

View File

@@ -1128,9 +1128,23 @@ export default {
}, },
handleFileChange(event) { handleFileChange(event) {
var that = this; var that = this;
const loading = this.$loading({
lock: true,
text: 'Loading...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
// 处理文件上传并传递回调函数 // 处理文件上传并传递回调函数
this.$commonJS.handleFileUpload(event, function (tables) { this.$commonJS.handleFileUpload(event, function (tables) {
console.log('tables at line 1138:', tables)
if(tables.length == 0){
loading.close()
that.$message({
type: 'warning',
message: 'No table found!'
});
return false
}
// 使用 Promise.all 等待所有表格解析完成 // 使用 Promise.all 等待所有表格解析完成
Promise.all( Promise.all(
@@ -1148,9 +1162,11 @@ export default {
.then((result) => { .then((result) => {
// 所有表格的解析完成后,处理结果 // 所有表格的解析完成后,处理结果
that.uploadWordTables = result; that.uploadWordTables = result;
loading.close()
that.tablesHtmlVisible = true; that.tablesHtmlVisible = true;
}) })
.catch((error) => { .catch((error) => {
loading.close()
console.error('Error processing tables:', error); console.error('Error processing tables:', error);
}); });
}); });

View File

@@ -477,152 +477,153 @@ export default {
journal_special_id: 'None' journal_special_id: 'None'
}, },
opInstal: [], opInstal: [],
opMedical: [ // opMedical: [
{ // {
label: 'None', // label: 'None',
value: '' // value: ''
}, // },
{ // {
label: 'ARTICLE', // label: 'ARTICLE',
value: 'Article' // value: 'Article'
}, // },
{ // {
label: 'REVIEW', // label: 'REVIEW',
value: 'Review' // value: 'Review'
}, // },
{ // {
label: 'CASE REPORT', // label: 'CASE REPORT',
value: 'Case report' // value: 'Case report'
}, // },
{ // {
label: 'RESEARCH PROPOSAL', // label: 'RESEARCH PROPOSAL',
value: 'Research proposal' // value: 'Research proposal'
}, // },
{ // {
label: 'NEWS', // label: 'NEWS',
value: 'News' // value: 'News'
}, // },
{ // {
label: 'COMMENT', // label: 'COMMENT',
value: 'Comment' // value: 'Comment'
}, // },
{ // {
label: 'CORRECTION', // label: 'CORRECTION',
value: 'Correction' // value: 'Correction'
}, // },
{ // {
label: 'HYPOTHESIS', // label: 'HYPOTHESIS',
value: 'Hypothesis' // value: 'Hypothesis'
}, // },
{ // {
label: 'PREFACE', // label: 'PREFACE',
value: 'Preface' // value: 'Preface'
}, // },
{ // {
label: 'EDITORIAL', // label: 'EDITORIAL',
value: 'Editorial' // value: 'Editorial'
}, // },
{ // {
label: 'REPORT', // label: 'REPORT',
value: 'Report' // value: 'Report'
}, // },
{ // {
label: 'LETTER', // label: 'LETTER',
value: 'Letter' // value: 'Letter'
}, // },
{ // {
label: 'EMPIRICAL FORMULA', // label: 'EMPIRICAL FORMULA',
value: 'Empirical formula' // value: 'Empirical formula'
}, // },
{ // {
label: 'EVIDENCE-BASED MEDICINE', // label: 'EVIDENCE-BASED MEDICINE',
value: 'Evidence-based medicine' // value: 'Evidence-based medicine'
}, // },
{ // {
label: 'EXPERT CONSENSUS', // label: 'EXPERT CONSENSUS',
value: 'Expert consensus' // value: 'Expert consensus'
}, // },
{ // {
label: 'LETTER TO EDITOR', // label: 'LETTER TO EDITOR',
value: 'Letter to editor' // value: 'Letter to editor'
}, // },
{ // {
label: 'QUESTIONNAIRE INVESTIGATION', // label: 'QUESTIONNAIRE INVESTIGATION',
value: 'Questionnaire investigation' // value: 'Questionnaire investigation'
}, // },
{ // {
label: 'PROTOCOL', // label: 'PROTOCOL',
value: 'Protocol' // value: 'Protocol'
}, // },
{ // {
label: 'CASE SERIES', // label: 'CASE SERIES',
value: 'Case Series' // value: 'Case Series'
}, // },
{ // {
label: 'RETRACTION', // label: 'RETRACTION',
value: 'Retraction' // value: 'Retraction'
}, // },
{ // {
label: 'MINI REVIEW', // label: 'MINI REVIEW',
value: 'Mini Review' // value: 'Mini Review'
}, // },
{ // {
label: 'RETRACTION NOTE', // label: 'RETRACTION NOTE',
value: 'Retraction Note' // value: 'Retraction Note'
}, // },
{ // {
label: '内经难经', // label: '内经难经',
value: '内经难经' // value: '内经难经'
}, // },
{ // {
label: '伤寒金匮', // label: '伤寒金匮',
value: '伤寒金匮' // value: '伤寒金匮'
}, // },
{ // {
label: '神农本草经', // label: '神农本草经',
value: '神农本草经' // value: '神农本草经'
}, // },
{ // {
label: '温病研究', // label: '温病研究',
value: '温病研究' // value: '温病研究'
}, // },
{ // {
label: '唐宋方药', // label: '唐宋方药',
value: '唐宋方药' // value: '唐宋方药'
}, // },
{ // {
label: '金元各家', // label: '金元各家',
value: '金元各家' // value: '金元各家'
}, // },
{ // {
label: '明清经典', // label: '明清经典',
value: '明清经典' // value: '明清经典'
}, // },
{ // {
label: '中西汇通', // label: '中西汇通',
value: '中西汇通' // value: '中西汇通'
}, // },
{ // {
label: '太湖选粹', // label: '太湖选粹',
value: '太湖选粹' // value: '太湖选粹'
}, // },
{ // {
label: '针灸推拿', // label: '针灸推拿',
value: '针灸推拿' // value: '针灸推拿'
}, // },
{ // {
label: '名医名方', // label: '名医名方',
value: '名医名方' // value: '名医名方'
}, // },
{ // {
label: '新冠肺炎', // label: '新冠肺炎',
value: '新冠肺炎' // value: '新冠肺炎'
}, // },
{ // {
label: '书评', // label: '书评',
value: '书评' // value: '书评'
} // }
], // ],
opMedical: [ ],
editAuthor: false, editAuthor: false,
addAuthor: false, addAuthor: false,
editSchool: false, editSchool: false,
@@ -839,7 +840,7 @@ export default {
} }
}; };
}, },
created() { created() {this.opMedical=this.$commonJS.opMedicalList()
this.getDetail(); this.getDetail();
this.getHight(); this.getHight();
window.addEventListener('resize', this.getHight); window.addEventListener('resize', this.getHight);

View File

@@ -377,152 +377,153 @@ export default {
journal_special_id: 'None' journal_special_id: 'None'
}, },
opInstal: [], opInstal: [],
opMedical: [ // opMedical: [
{ // {
label: 'None', // label: 'None',
value: '' // value: ''
}, // },
{ // {
label: 'ARTICLE', // label: 'ARTICLE',
value: 'Article' // value: 'Article'
}, // },
{ // {
label: 'REVIEW', // label: 'REVIEW',
value: 'Review' // value: 'Review'
}, // },
{ // {
label: 'CASE REPORT', // label: 'CASE REPORT',
value: 'Case report' // value: 'Case report'
}, // },
{ // {
label: 'RESEARCH PROPOSAL', // label: 'RESEARCH PROPOSAL',
value: 'Research proposal' // value: 'Research proposal'
}, // },
{ // {
label: 'NEWS', // label: 'NEWS',
value: 'News' // value: 'News'
}, // },
{ // {
label: 'COMMENT', // label: 'COMMENT',
value: 'Comment' // value: 'Comment'
}, // },
{ // {
label: 'CORRECTION', // label: 'CORRECTION',
value: 'Correction' // value: 'Correction'
}, // },
{ // {
label: 'HYPOTHESIS', // label: 'HYPOTHESIS',
value: 'Hypothesis' // value: 'Hypothesis'
}, // },
{ // {
label: 'PREFACE', // label: 'PREFACE',
value: 'Preface' // value: 'Preface'
}, // },
{ // {
label: 'EDITORIAL', // label: 'EDITORIAL',
value: 'Editorial' // value: 'Editorial'
}, // },
{ // {
label: 'REPORT', // label: 'REPORT',
value: 'Report' // value: 'Report'
}, // },
{ // {
label: 'LETTER', // label: 'LETTER',
value: 'Letter' // value: 'Letter'
}, // },
{ // {
label: 'EMPIRICAL FORMULA', // label: 'EMPIRICAL FORMULA',
value: 'Empirical formula' // value: 'Empirical formula'
}, // },
{ // {
label: 'EVIDENCE-BASED MEDICINE', // label: 'EVIDENCE-BASED MEDICINE',
value: 'Evidence-based medicine' // value: 'Evidence-based medicine'
}, // },
{ // {
label: 'EXPERT CONSENSUS', // label: 'EXPERT CONSENSUS',
value: 'Expert consensus' // value: 'Expert consensus'
}, // },
{ // {
label: 'LETTER TO EDITOR', // label: 'LETTER TO EDITOR',
value: 'Letter to editor' // value: 'Letter to editor'
}, // },
{ // {
label: 'QUESTIONNAIRE INVESTIGATION', // label: 'QUESTIONNAIRE INVESTIGATION',
value: 'Questionnaire investigation' // value: 'Questionnaire investigation'
}, // },
{ // {
label: 'PROTOCOL', // label: 'PROTOCOL',
value: 'Protocol' // value: 'Protocol'
}, // },
{ // {
label: 'CASE SERIES', // label: 'CASE SERIES',
value: 'Case Series' // value: 'Case Series'
}, // },
{ // {
label: 'RETRACTION', // label: 'RETRACTION',
value: 'Retraction' // value: 'Retraction'
}, // },
{ // {
label: 'MINI REVIEW', // label: 'MINI REVIEW',
value: 'Mini Review' // value: 'Mini Review'
}, // },
{ // {
label: 'RETRACTION NOTE', // label: 'RETRACTION NOTE',
value: 'Retraction Note' // value: 'Retraction Note'
}, // },
{ // {
label: '内经难经', // label: '内经难经',
value: '内经难经' // value: '内经难经'
}, // },
{ // {
label: '伤寒金匮', // label: '伤寒金匮',
value: '伤寒金匮' // value: '伤寒金匮'
}, // },
{ // {
label: '神农本草经', // label: '神农本草经',
value: '神农本草经' // value: '神农本草经'
}, // },
{ // {
label: '温病研究', // label: '温病研究',
value: '温病研究' // value: '温病研究'
}, // },
{ // {
label: '唐宋方药', // label: '唐宋方药',
value: '唐宋方药' // value: '唐宋方药'
}, // },
{ // {
label: '金元各家', // label: '金元各家',
value: '金元各家' // value: '金元各家'
}, // },
{ // {
label: '明清经典', // label: '明清经典',
value: '明清经典' // value: '明清经典'
}, // },
{ // {
label: '中西汇通', // label: '中西汇通',
value: '中西汇通' // value: '中西汇通'
}, // },
{ // {
label: '太湖选粹', // label: '太湖选粹',
value: '太湖选粹' // value: '太湖选粹'
}, // },
{ // {
label: '针灸推拿', // label: '针灸推拿',
value: '针灸推拿' // value: '针灸推拿'
}, // },
{ // {
label: '名医名方', // label: '名医名方',
value: '名医名方' // value: '名医名方'
}, // },
{ // {
label: '新冠肺炎', // label: '新冠肺炎',
value: '新冠肺炎' // value: '新冠肺炎'
}, // },
{ // {
label: '书评', // label: '书评',
value: '书评' // value: '书评'
} // }
], // ],
opMedical: [],
editAuthor: false, editAuthor: false,
addAuthor: false, addAuthor: false,
editSchool: false, editSchool: false,
@@ -740,6 +741,7 @@ export default {
}; };
}, },
mounted() { mounted() {
this.opMedical=this.$commonJS.opMedicalList()
this.msgform={...this.msgform, article_id: this.article_id,} this.msgform={...this.msgform, article_id: this.article_id,}
this.getDetail(); this.getDetail();
this.getHight(); this.getHight();

View File

@@ -166,8 +166,8 @@
}, },
}, },
mounted(){ async mounted(){
this.journal_type = journal_type1.journal_type this.journal_type =await this.$commonJS.journalTypeList()
// console.log(this.journal_type, this.journal_type1) // console.log(this.journal_type, this.journal_type1)
} }
}; };

File diff suppressed because it is too large Load Diff

View File

@@ -1056,88 +1056,7 @@ export default {
// topics:null // topics:null
}, },
raltiAutList: [], raltiAutList: [],
journal_type: [ journal_type: [],
{
name: 'ARTICLE',
value: 'A'
},
{
name: 'REVIEW',
value: 'B'
},
{
name: 'CASE REPORT',
value: 'C'
},
{
name: 'RESEARCH PROPOSAL',
value: 'P'
},
{
name: 'NEWS',
value: 'N'
},
{
name: 'COMMENT',
value: 'T'
},
{
name: 'CORRECTION',
value: 'CT'
},
{
name: 'HYPOTHESIS',
value: 'HT'
},
{
name: 'PREFACE',
value: 'PF'
},
{
name: 'EDITORIAL',
value: 'ET'
},
{
name: 'REPORT',
value: 'RP'
},
{
name: 'LETTER',
value: 'LR'
},
{
name: 'EMPIRICAL FORMULA',
value: 'EF'
},
{
name: 'EXPERT CONSENSUS',
value: 'EC'
},
{
name: 'LETTER TO EDITOR',
value: 'LTE'
},
{
name: 'QUESTIONNAIRE INVESTIGATION',
value: 'QI'
},
{
name: 'CASE SERIES',
value: 'CS'
},
{
name: 'RETRACTION',
value: 'RT'
},
{
name: 'MINI REVIEW',
value: 'MR'
},
{
name: 'OTHERS',
value: 'O'
}
],
reviewerForm: { reviewerForm: {
username: localStorage.getItem('U_name'), username: localStorage.getItem('U_name'),
gender: 1, gender: 1,
@@ -1416,7 +1335,9 @@ export default {
deep: true deep: true
} }
}, },
created() { async created() {
this.journal_type = await this.$commonJS.journalTypeList();
console.log('this.journal_type at line 1340:', this.journal_type);
this.initSelect(); this.initSelect();
this.getAutData(); this.getAutData();
if (this.stagingID != undefined) { if (this.stagingID != undefined) {
@@ -2311,7 +2232,7 @@ export default {
reader.onload = function (e) { reader.onload = function (e) {
that.$commonJS.extractWordTablesToArrays(File.raw, function (wordTables) { that.$commonJS.extractWordTablesToArrays(File.raw, function (wordTables) {
console.log('tablesHtml at line 61:', wordTables); console.log('tablesHtml at line 61:', wordTables);
return return;
that.addWordTablesList(wordTables); that.addWordTablesList(wordTables);
}); });
}; };

View File

@@ -55,7 +55,7 @@
<span>{{ form.title }}</span> <span>{{ form.title }}</span>
</el-form-item> </el-form-item>
<el-form-item label="Type"> <el-form-item label="Type">
<span>{{ myType }}</span> <span>{{ form.type | jtName }}</span>
</el-form-item> </el-form-item>
<el-form-item label="Major"> <el-form-item label="Major">
<span>{{form.major}}</span> <span>{{form.major}}</span>
@@ -359,77 +359,7 @@
this.initCountrys(); this.initCountrys();
}, },
computed: { computed: {
myType: function() {
let frag = '';
switch (this.form.type) {
case "A":
frag = 'ARTICLE';
break;
case 'B':
frag = 'REVIEW';
break;
case 'C':
frag = 'CASE REPORT';
break;
case 'P':
frag = 'RESEARCH PROPOSAL';
break;
case 'N':
frag = 'NEWS';
break;
case 'T':
frag = 'COMMENT';
break;
case 'CT':
frag = 'CORRECTION';
break;
case 'HT':
frag = 'HYPOTHESIS';
break;
case 'PF':
frag = 'PREFACE';
break;
case 'ET':
frag = 'EDITORIAL';
break;
case 'RP':
frag = 'REPORT';
break;
case 'LR':
frag = 'LETTER';
break;
case 'EF':
frag = 'EMPIRICAL FORMULA';
break;
case 'EM':
frag = 'EVIDENCE-BASED MEDICINE';
break;
case 'EC':
frag = 'EXPERT CONSENSUS';
break;
case 'LTE':
frag = 'LETTER TO EDITOR';
break;
case 'QI':
frag = 'QUESTIONNAIRE INVESTIGATION';
break;
case 'PT':
frag = 'PROTOCOL';
break;
case 'CS':
frag = 'CASE SERIES';
break;
case 'RT':
frag = 'RETRACTION';
break;
case 'MR':
frag = 'MINI REVIEW';
break;
default:
frag = 'OTHERS';
}
return frag;
},
coverLetterUrl: function() { coverLetterUrl: function() {
return this.baseUrl + this.form.coverLetter; return this.baseUrl + this.form.coverLetter;
}, },

View File

@@ -23,7 +23,7 @@
>ID : <b style="margin-right: 25px">{{ form.accept_sn }}</b></font >ID : <b style="margin-right: 25px">{{ form.accept_sn }}</b></font
> >
<font <font
>Type : <b style="margin-right: 25px">{{ myType }}</b></font >Type : <b style="margin-right: 25px">{{ form.type | jtName }}</b></font
> >
<font <font
>Major : <b>{{ form.major }}</b></font >Major : <b>{{ form.major }}</b></font
@@ -682,77 +682,7 @@ export default {
this.getWordTablesList(); this.getWordTablesList();
}, },
computed: { computed: {
myType: function () {
let frag = '';
switch (this.form.type) {
case 'A':
frag = 'ARTICLE';
break;
case 'B':
frag = 'REVIEW';
break;
case 'C':
frag = 'CASE REPORT';
break;
case 'P':
frag = 'RESEARCH PROPOSAL';
break;
case 'N':
frag = 'NEWS';
break;
case 'T':
frag = 'COMMENT';
break;
case 'CT':
frag = 'CORRECTION';
break;
case 'HT':
frag = 'HYPOTHESIS';
break;
case 'PF':
frag = 'PREFACE';
break;
case 'ET':
frag = 'EDITORIAL';
break;
case 'RP':
frag = 'REPORT';
break;
case 'LR':
frag = 'LETTER';
break;
case 'EF':
frag = 'EMPIRICAL FORMULA';
break;
case 'EM':
frag = 'EVIDENCE-BASED MEDICINE';
break;
case 'EC':
frag = 'EXPERT CONSENSUS';
break;
case 'LTE':
frag = 'LETTER TO EDITOR';
break;
case 'QI':
frag = 'QUESTIONNAIRE INVESTIGATION';
break;
case 'PT':
frag = 'PROTOCOL';
break;
case 'CS':
frag = 'CASE SERIES';
break;
case 'RT':
frag = 'RETRACTION';
break;
case 'MR':
frag = 'MINI REVIEW';
break;
default:
frag = 'OTHERS';
}
return frag;
},
// coverLetterUrl: function() { // coverLetterUrl: function() {
// return this.baseUrl + this.form.coverLetter; // return this.baseUrl + this.form.coverLetter;
// }, // },

View File

@@ -37,7 +37,7 @@
<span>{{form.title}}</span> <span>{{form.title}}</span>
</el-form-item> </el-form-item>
<el-form-item label="Type"> <el-form-item label="Type">
<span>{{myType}}</span> <span>{{form.type |jtName}}</span>
</el-form-item> </el-form-item>
<el-form-item label="Major"> <el-form-item label="Major">
<span>{{form.major}}</span> <span>{{form.major}}</span>
@@ -405,77 +405,7 @@
this.initFileList(); this.initFileList();
}, },
computed: { computed: {
myType: function() {
let frag = '';
switch (this.form.type) {
case "A":
frag = 'ARTICLE';
break;
case 'B':
frag = 'REVIEW';
break;
case 'C':
frag = 'CASE REPORT';
break;
case 'P':
frag = 'RESEARCH PROPOSAL';
break;
case 'N':
frag = 'NEWS';
break;
case 'T':
frag = 'COMMENT';
break;
case 'CT':
frag = 'CORRECTION';
break;
case 'HT':
frag = 'HYPOTHESIS';
break;
case 'PF':
frag = 'PREFACE';
break;
case 'ET':
frag = 'EDITORIAL';
break;
case 'RP':
frag = 'REPORT';
break;
case 'LR':
frag = 'LETTER';
break;
case 'EF':
frag = 'EMPIRICAL FORMULA';
break;
case 'EM':
frag = 'EVIDENCE-BASED MEDICINE';
break;
case 'EC':
frag = 'EXPERT CONSENSUS';
break;
case 'LTE':
frag = 'LETTER TO EDITOR';
break;
case 'QI':
frag = 'QUESTIONNAIRE INVESTIGATION';
break;
case 'PT':
frag = 'PROTOCOL';
break;
case 'CS':
frag = 'CASE SERIES';
break;
case 'RT':
frag = 'RETRACTION';
break;
case 'MR':
frag = 'MINI REVIEW';
break;
default:
frag = 'OTHERS';
}
return frag;
},
// coverLetterUrl: function() { // coverLetterUrl: function() {
// return this.baseUrl + this.form.coverLetter; // return this.baseUrl + this.form.coverLetter;
// }, // },

View File

@@ -38,7 +38,7 @@
<font>Title :</font><b>{{form.title}}</b> <font>Title :</font><b>{{form.title}}</b>
</p> </p>
<p> <p>
<font>Type :</font><b>{{myType}}</b> <font>Type :</font><b>{{form.type | jtName}}</b>
</p> </p>
<p v-show="form.type=='A'"> <p v-show="form.type=='A'">
<font>Ethical Approval :</font><b>{{form.approval?'Yes':'No'}}</b> <font>Ethical Approval :</font><b>{{form.approval?'Yes':'No'}}</b>
@@ -312,68 +312,7 @@
}, },
computed: { computed: {
myType: function() {
let frag = '';
switch (this.form.type) {
case "A":
frag = 'ARTICLE';
break;
case 'B':
frag = 'REVIEW';
break;
case 'C':
frag = 'CASE REPORT';
break;
case 'P':
frag = 'RESEARCH PROPOSAL';
break;
case 'N':
frag = 'NEWS';
break;
case 'T':
frag = 'COMMENT';
break;
case 'CT':
frag = 'CORRECTION';
break;
case 'HT':
frag = 'HYPOTHESIS';
break;
case 'PF':
frag = 'PREFACE';
break;
case 'ET':
frag = 'EDITORIAL';
break;
case 'RP':
frag = 'REPORT';
break;
case 'LR':
frag = 'LETTER';
break;
case 'EF':
frag = 'EMPIRICAL FORMULA';
break;
case 'EM':
frag = 'EVIDENCE-BASED MEDICINE';
break;
case 'EC':
frag = 'EXPERT CONSENSUS';
break;
case 'LTE':
frag = 'LETTER TO EDITOR';
break;
case 'QI':
frag = 'QUESTIONNAIRE INVESTIGATION';
break;
case 'PT':
frag = 'PROTOCOL';
break;
default:
frag = 'OTHERS';
}
return frag;
},
manuscirptUrl: function() { manuscirptUrl: function() {
return this.baseUrl + this.form.manuscirpt; return this.baseUrl + this.form.manuscirpt;
}, },

View File

@@ -34,7 +34,7 @@
<font>Title :</font><b>{{form.title}}</b> <font>Title :</font><b>{{form.title}}</b>
</p> </p>
<p> <p>
<font>Type :</font><b>{{myType}}</b> <font>Type :</font><b>{{form.type | jtName}}</b>
</p> </p>
<p v-show="form.type=='A'"> <p v-show="form.type=='A'">
<font>Ethical Approval :</font><b>{{form.approval?'Yes':'No'}}</b> <font>Ethical Approval :</font><b>{{form.approval?'Yes':'No'}}</b>
@@ -617,77 +617,7 @@
this.reviewdate(); this.reviewdate();
}, },
computed: { computed: {
myType: function() {
let frag = '';
switch (this.form.type) {
case "A":
frag = 'ARTICLE';
break;
case 'B':
frag = 'REVIEW';
break;
case 'C':
frag = 'CASE REPORT';
break;
case 'P':
frag = 'RESEARCH PROPOSAL';
break;
case 'N':
frag = 'NEWS';
break;
case 'T':
frag = 'COMMENT';
break;
case 'CT':
frag = 'CORRECTION';
break;
case 'HT':
frag = 'HYPOTHESIS';
break;
case 'PF':
frag = 'PREFACE';
break;
case 'ET':
frag = 'EDITORIAL';
break;
case 'RP':
frag = 'REPORT';
break;
case 'LR':
frag = 'LETTER';
break;
case 'EF':
frag = 'EMPIRICAL FORMULA';
break;
case 'EM':
frag = 'EVIDENCE-BASED MEDICINE';
break;
case 'EC':
frag = 'EXPERT CONSENSUS';
break;
case 'LTE':
frag = 'LETTER TO EDITOR';
break;
case 'QI':
frag = 'QUESTIONNAIRE INVESTIGATION';
break;
case 'PT':
frag = 'PROTOCOL';
break;
case 'CS':
frag = 'CASE SERIES';
break;
case 'RT':
frag = 'RETRACTION';
break;
case 'MR':
frag = 'MINI REVIEW';
break;
default:
frag = 'OTHERS';
}
return frag;
},
upload_zip: function() { upload_zip: function() {
return this.baseUrl + 'api/Article/up_file/type/repezip'; return this.baseUrl + 'api/Article/up_file/type/repezip';
}, },

View File

@@ -42,7 +42,7 @@
<b> {{form.title}}</b> <b> {{form.title}}</b>
</p> </p>
<p> <p>
<font>Type :</font><b>{{myType}}</b> <font>Type :</font><b>{{form.type |jtName}}</b>
</p> </p>
<p v-show="form.type=='A'"> <p v-show="form.type=='A'">
<font>Ethical Approval :</font><b>{{form.approval?'Yes':'No'}}</b> <font>Ethical Approval :</font><b>{{form.approval?'Yes':'No'}}</b>
@@ -627,77 +627,7 @@
this.reviewdate(); this.reviewdate();
}, },
computed: { computed: {
myType: function() {
let frag = '';
switch (this.form.type) {
case "A":
frag = 'ARTICLE';
break;
case 'B':
frag = 'REVIEW';
break;
case 'C':
frag = 'CASE REPORT';
break;
case 'P':
frag = 'RESEARCH PROPOSAL';
break;
case 'N':
frag = 'NEWS';
break;
case 'T':
frag = 'COMMENT';
break;
case 'CT':
frag = 'CORRECTION';
break;
case 'HT':
frag = 'HYPOTHESIS';
break;
case 'PF':
frag = 'PREFACE';
break;
case 'ET':
frag = 'EDITORIAL';
break;
case 'RP':
frag = 'REPORT';
break;
case 'LR':
frag = 'LETTER';
break;
case 'EF':
frag = 'EMPIRICAL FORMULA';
break;
case 'EM':
frag = 'EVIDENCE-BASED MEDICINE';
break;
case 'EC':
frag = 'EXPERT CONSENSUS';
break;
case 'LTE':
frag = 'LETTER TO EDITOR';
break;
case 'QI':
frag = 'QUESTIONNAIRE INVESTIGATION';
break;
case 'PT':
frag = 'PROTOCOL';
break;
case 'CS':
frag = 'CASE SERIES';
break;
case 'RT':
frag = 'RETRACTION';
break;
case 'MR':
frag = 'MINI REVIEW';
break;
default:
frag = 'OTHERS';
}
return frag;
},
upload_zip: function() { upload_zip: function() {
return this.baseUrl + 'api/Article/up_file/type/repezip'; return this.baseUrl + 'api/Article/up_file/type/repezip';
}, },

View File

@@ -34,7 +34,7 @@
<font>Title :</font><b>{{form.title}}</b> <font>Title :</font><b>{{form.title}}</b>
</p> </p>
<p> <p>
<font>Type :</font><b>{{myType}}</b> <font>Type :</font><b>{{form.type|jtName}}</b>
</p> </p>
<p v-show="form.type=='A'"> <p v-show="form.type=='A'">
<font>Ethical Approval :</font><b>{{form.approval?'Yes':'No'}}</b> <font>Ethical Approval :</font><b>{{form.approval?'Yes':'No'}}</b>
@@ -435,77 +435,7 @@
this.reviewdate(); this.reviewdate();
}, },
computed: { computed: {
myType: function() {
let frag = '';
switch (this.form.type) {
case "A":
frag = 'ARTICLE';
break;
case 'B':
frag = 'REVIEW';
break;
case 'C':
frag = 'CASE REPORT';
break;
case 'P':
frag = 'RESEARCH PROPOSAL';
break;
case 'N':
frag = 'NEWS';
break;
case 'T':
frag = 'COMMENT';
break;
case 'CT':
frag = 'CORRECTION';
break;
case 'HT':
frag = 'HYPOTHESIS';
break;
case 'PF':
frag = 'PREFACE';
break;
case 'ET':
frag = 'EDITORIAL';
break;
case 'RP':
frag = 'REPORT';
break;
case 'LR':
frag = 'LETTER';
break;
case 'EF':
frag = 'EMPIRICAL FORMULA';
break;
case 'EM':
frag = 'EVIDENCE-BASED MEDICINE';
break;
case 'EC':
frag = 'EXPERT CONSENSUS';
break;
case 'LTE':
frag = 'LETTER TO EDITOR';
break;
case 'QI':
frag = 'QUESTIONNAIRE INVESTIGATION';
break;
case 'PT':
frag = 'PROTOCOL';
break;
case 'CS':
frag = 'CASE SERIES';
break;
case 'RT':
frag = 'RETRACTION';
break;
case 'MR':
frag = 'MINI REVIEW';
break;
default:
frag = 'OTHERS';
}
return frag;
},
// coverLetterUrl: function() { // coverLetterUrl: function() {
// return this.baseUrl + this.form.coverLetter; // return this.baseUrl + this.form.coverLetter;
// }, // },

View File

@@ -34,7 +34,7 @@
<b> {{form.title}}</b> <b> {{form.title}}</b>
</p> </p>
<p> <p>
<font>Type :</font><b>{{myType}}</b> <font>Type :</font><b>{{form.type | jtName }}</b>
</p> </p>
<p v-show="form.type=='A'"> <p v-show="form.type=='A'">
<font>Ethical Approval :</font><b>{{form.approval?'Yes':'No'}}</b> <font>Ethical Approval :</font><b>{{form.approval?'Yes':'No'}}</b>
@@ -604,77 +604,7 @@
this.reviewdate(); this.reviewdate();
}, },
computed: { computed: {
myType: function() {
let frag = '';
switch (this.form.type) {
case "A":
frag = 'ARTICLE';
break;
case 'B':
frag = 'REVIEW';
break;
case 'C':
frag = 'CASE REPORT';
break;
case 'P':
frag = 'RESEARCH PROPOSAL';
break;
case 'N':
frag = 'NEWS';
break;
case 'T':
frag = 'COMMENT';
break;
case 'CT':
frag = 'CORRECTION';
break;
case 'HT':
frag = 'HYPOTHESIS';
break;
case 'PF':
frag = 'PREFACE';
break;
case 'ET':
frag = 'EDITORIAL';
break;
case 'RP':
frag = 'REPORT';
break;
case 'LR':
frag = 'LETTER';
break;
case 'EF':
frag = 'EMPIRICAL FORMULA';
break;
case 'EM':
frag = 'EVIDENCE-BASED MEDICINE';
break;
case 'EC':
frag = 'EXPERT CONSENSUS';
break;
case 'LTE':
frag = 'LETTER TO EDITOR';
break;
case 'QI':
frag = 'QUESTIONNAIRE INVESTIGATION';
break;
case 'PT':
frag = 'PROTOCOL';
break;
case 'CS':
frag = 'CASE SERIES';
break;
case 'RT':
frag = 'RETRACTION';
break;
case 'MR':
frag = 'MINI REVIEW';
break;
default:
frag = 'OTHERS';
}
return frag;
},
// coverLetterUrl: function() { // coverLetterUrl: function() {
// return this.baseUrl + this.form.coverLetter; // return this.baseUrl + this.form.coverLetter;
// }, // },

View File

@@ -28,7 +28,7 @@
<font>Title :</font><b>{{form.title}}</b> <font>Title :</font><b>{{form.title}}</b>
</p> </p>
<p> <p>
<font>Type :</font><b>{{myType}}</b> <font>Type :</font><b>{{form.type |jtName}}</b>
</p> </p>
<p v-show="form.type=='A'"> <p v-show="form.type=='A'">
<font>Ethical Approval :</font><b>{{form.approval?'Yes':'No'}}</b> <font>Ethical Approval :</font><b>{{form.approval?'Yes':'No'}}</b>
@@ -561,77 +561,7 @@
this.reviewdate(); this.reviewdate();
}, },
computed: { computed: {
myType: function() {
let frag = '';
switch (this.form.type) {
case "A":
frag = 'ARTICLE';
break;
case 'B':
frag = 'REVIEW';
break;
case 'C':
frag = 'CASE REPORT';
break;
case 'P':
frag = 'RESEARCH PROPOSAL';
break;
case 'N':
frag = 'NEWS';
break;
case 'T':
frag = 'COMMENT';
break;
case 'CT':
frag = 'CORRECTION';
break;
case 'HT':
frag = 'HYPOTHESIS';
break;
case 'PF':
frag = 'PREFACE';
break;
case 'ET':
frag = 'EDITORIAL';
break;
case 'RP':
frag = 'REPORT';
break;
case 'LR':
frag = 'LETTER';
break;
case 'EF':
frag = 'EMPIRICAL FORMULA';
break;
case 'EM':
frag = 'EVIDENCE-BASED MEDICINE';
break;
case 'EC':
frag = 'EXPERT CONSENSUS';
break;
case 'LTE':
frag = 'LETTER TO EDITOR';
break;
case 'QI':
frag = 'QUESTIONNAIRE INVESTIGATION';
break;
case 'PT':
frag = 'PROTOCOL';
break;
case 'CS':
frag = 'CASE SERIES';
break;
case 'RT':
frag = 'RETRACTION';
break;
case 'MR':
frag = 'MINI REVIEW';
break;
default:
frag = 'OTHERS';
}
return frag;
},
upload_zip: function() { upload_zip: function() {
return this.baseUrl + 'api/Article/up_file/type/repezip'; return this.baseUrl + 'api/Article/up_file/type/repezip';
}, },

View File

@@ -36,7 +36,7 @@
<b> {{form.title}}</b> <b> {{form.title}}</b>
</p> </p>
<p> <p>
<font>Type :</font><b>{{myType}}</b> <font>Type :</font><b>{{form.type | jtName}}</b>
</p> </p>
<p v-show="form.type=='A'"> <p v-show="form.type=='A'">
<font>Ethical Approval :</font><b>{{form.approval?'Yes':'No'}}</b> <font>Ethical Approval :</font><b>{{form.approval?'Yes':'No'}}</b>
@@ -111,7 +111,7 @@
<font>Title :</font><b>{{form.title}}</b> <font>Title :</font><b>{{form.title}}</b>
</p> </p>
<p> <p>
<font>Type :</font><b>{{myType}}</b> <font>Type :</font><b>{{form.type | jtName}}</b>
</p> </p>
<p v-show="form.type=='A'"> <p v-show="form.type=='A'">
<font>Ethical Approval :</font><b>{{form.approval?'Yes':'No'}}</b> <font>Ethical Approval :</font><b>{{form.approval?'Yes':'No'}}</b>
@@ -597,68 +597,7 @@
this.reviewdate(); this.reviewdate();
}, },
computed: { computed: {
myType: function() {
let frag = '';
switch (this.form.type) {
case "A":
frag = 'ARTICLE';
break;
case 'B':
frag = 'REVIEW';
break;
case 'C':
frag = 'CASE REPORT';
break;
case 'P':
frag = 'RESEARCH PROPOSAL';
break;
case 'N':
frag = 'NEWS';
break;
case 'T':
frag = 'COMMENT';
break;
case 'CT':
frag = 'CORRECTION';
break;
case 'HT':
frag = 'HYPOTHESIS';
break;
case 'PF':
frag = 'PREFACE';
break;
case 'ET':
frag = 'EDITORIAL';
break;
case 'RP':
frag = 'REPORT';
break;
case 'LR':
frag = 'LETTER';
break;
case 'EF':
frag = 'EMPIRICAL FORMULA';
break;
case 'EM':
frag = 'EVIDENCE-BASED MEDICINE';
break;
case 'EC':
frag = 'EXPERT CONSENSUS';
break;
case 'LTE':
frag = 'LETTER TO EDITOR';
break;
case 'QI':
frag = 'QUESTIONNAIRE INVESTIGATION';
break;
case 'PT':
frag = 'PROTOCOL';
break;
default:
frag = 'OTHERS';
}
return frag;
},
upload_zip: function() { upload_zip: function() {
return this.baseUrl + 'api/Article/up_file/type/repezip'; return this.baseUrl + 'api/Article/up_file/type/repezip';
}, },

View File

@@ -32,7 +32,7 @@
<articleListB v-if="activeIndex == '2'" :journals="journals[1]" @changeEvent="changeEvent"></articleListB> <articleListB v-if="activeIndex == '2'" :journals="journals[1]" @changeEvent="changeEvent"></articleListB>
<articleListC v-if="activeIndex == '3'" :journals="journals[0]"></articleListC> <articleListC v-if="activeIndex == '3'" :journals="journals[0]"></articleListC>
<articleListD v-if="activeIndex == '4'" ></articleListD> <articleListD v-if="activeIndex == '4'" ></articleListD>
<articleListE v-if="activeIndex == '5'" :journals="journals[2]"></articleListE> <articleListE v-if="activeIndex == '5'" :journals="journals[0]"></articleListE>
<articleListF v-if="activeIndex == '6'" ></articleListF> <articleListF v-if="activeIndex == '6'" ></articleListF>
</div> </div>
</div> </div>
@@ -79,7 +79,7 @@ export default {
[1, 2, 4].forEach(async (e, i) => { [1, 2, 4].forEach(async (e, i) => {
this.$set(this.journals, i, await this.initselect(e)); // 使用 Vue.set 确保数据是响应式的 this.$set(this.journals, i, await this.initselect(e)); // 使用 Vue.set 确保数据是响应式的
console.log('this.journals at line 80:', this.journals) // console.log('this.journals at line 80:', this.journals)
}); });
}, },
async initselect(e) { async initselect(e) {

View File

@@ -148,7 +148,7 @@
<font>ID : </font><b>{{MesDetail.accept_sn}}</b> <font>ID : </font><b>{{MesDetail.accept_sn}}</b>
</p> </p>
<p> <p>
<font>Type :</font><b>{{myType(MesDetail.type)}}</b> <font>Type :</font><b>{{MesDetail.type |jtName}}</b>
</p> </p>
<p v-show="MesDetail.type=='A'"> <p v-show="MesDetail.type=='A'">
<font>Ethical Approval :</font><b>{{MesDetail.approval?'Yes':'No'}}</b> <font>Ethical Approval :</font><b>{{MesDetail.approval?'Yes':'No'}}</b>
@@ -794,77 +794,7 @@
} }
return str; return str;
}, },
myType(e) {
let frag = '';
switch (e) {
case "A":
frag = 'ARTICLE';
break;
case 'B':
frag = 'REVIEW';
break;
case 'C':
frag = 'CASE REPORT';
break;
case 'P':
frag = 'RESEARCH PROPOSAL';
break;
case 'N':
frag = 'NEWS';
break;
case 'T':
frag = 'COMMENT';
break;
case 'CT':
frag = 'CORRECTION';
break;
case 'HT':
frag = 'HYPOTHESIS';
break;
case 'PF':
frag = 'PREFACE';
break;
case 'ET':
frag = 'EDITORIAL';
break;
case 'RP':
frag = 'REPORT';
break;
case 'LR':
frag = 'LETTER';
break;
case 'EF':
frag = 'EMPIRICAL FORMULA';
break;
case 'EM':
frag = 'EVIDENCE-BASED MEDICINE';
break;
case 'EC':
frag = 'EXPERT CONSENSUS';
break;
case 'LTE':
frag = 'LETTER TO EDITOR';
break;
case 'QI':
frag = 'QUESTIONNAIRE INVESTIGATION';
break;
case 'PT':
frag = 'PROTOCOL';
break;
case 'CS':
frag = 'CASE SERIES';
break;
case 'RT':
frag = 'RETRACTION';
break;
case 'MR':
frag = 'MINI REVIEW';
break;
default:
frag = 'OTHERS';
}
return frag;
},
journal_me(e) { journal_me(e) {
var frag = ''; var frag = '';
if (e > 0) { if (e > 0) {

View File

@@ -79,7 +79,7 @@
<span style="color: #666b7a; margin-left: 40px">Type :</span> <span style="color: #666b7a; margin-left: 40px">Type :</span>
<font> <font>
{{ artType(item.type) }} {{ item.type |jtName }}
</font> </font>
<span style="color: #666b7a; margin-left: 40px">Countries :</span> <span style="color: #666b7a; margin-left: 40px">Countries :</span>
<!-- <span :class="item.countrys.length > 1 ? 'Countries': ''" > --> <!-- <span :class="item.countrys.length > 1 ? 'Countries': ''" > -->
@@ -2306,77 +2306,7 @@ export default {
}, },
//文章类型 //文章类型
artType(e) {
let frag = '';
switch (e) {
case 'A':
frag = 'ARTICLE';
break;
case 'B':
frag = 'REVIEW';
break;
case 'C':
frag = 'CASE REPORT';
break;
case 'P':
frag = 'RESEARCH PROPOSAL';
break;
case 'N':
frag = 'NEWS';
break;
case 'T':
frag = 'COMMENT';
break;
case 'CT':
frag = 'CORRECTION';
break;
case 'HT':
frag = 'HYPOTHESIS';
break;
case 'PF':
frag = 'PREFACE';
break;
case 'ET':
frag = 'EDITORIAL';
break;
case 'RP':
frag = 'REPORT';
break;
case 'LR':
frag = 'LETTER';
break;
case 'EF':
frag = 'EMPIRICAL FORMULA';
break;
case 'EM':
frag = 'EVIDENCE-BASED MEDICINE';
break;
case 'EC':
frag = 'EXPERT CONSENSUS';
break;
case 'LTE':
frag = 'LETTER TO EDITOR';
break;
case 'QI':
frag = 'QUESTIONNAIRE INVESTIGATION';
break;
case 'PT':
frag = 'PROTOCOL';
break;
case 'CS':
frag = 'CASE SERIES';
break;
case 'RT':
frag = 'RETRACTION';
break;
case 'MR':
frag = 'MINI REVIEW';
break;
default:
frag = 'OTHERS';
}
return frag;
},
// 算平均分 // 算平均分
avegeCount(arry) { avegeCount(arry) {

View File

@@ -1029,152 +1029,153 @@ export default {
journal_special_id: 'None' journal_special_id: 'None'
}, },
opInstal: [], opInstal: [],
opMedical: [ // opMedical: [
{ // {
label: 'None', // label: 'None',
value: '' // value: ''
}, // },
{ // {
label: 'ARTICLE', // label: 'ARTICLE',
value: 'Article' // value: 'Article'
}, // },
{ // {
label: 'REVIEW', // label: 'REVIEW',
value: 'Review' // value: 'Review'
}, // },
{ // {
label: 'CASE REPORT', // label: 'CASE REPORT',
value: 'Case report' // value: 'Case report'
}, // },
{ // {
label: 'RESEARCH PROPOSAL', // label: 'RESEARCH PROPOSAL',
value: 'Research proposal' // value: 'Research proposal'
}, // },
{ // {
label: 'NEWS', // label: 'NEWS',
value: 'News' // value: 'News'
}, // },
{ // {
label: 'COMMENT', // label: 'COMMENT',
value: 'Comment' // value: 'Comment'
}, // },
{ // {
label: 'CORRECTION', // label: 'CORRECTION',
value: 'Correction' // value: 'Correction'
}, // },
{ // {
label: 'HYPOTHESIS', // label: 'HYPOTHESIS',
value: 'Hypothesis' // value: 'Hypothesis'
}, // },
{ // {
label: 'PREFACE', // label: 'PREFACE',
value: 'Preface' // value: 'Preface'
}, // },
{ // {
label: 'EDITORIAL', // label: 'EDITORIAL',
value: 'Editorial' // value: 'Editorial'
}, // },
{ // {
label: 'REPORT', // label: 'REPORT',
value: 'Report' // value: 'Report'
}, // },
{ // {
label: 'LETTER', // label: 'LETTER',
value: 'Letter' // value: 'Letter'
}, // },
{ // {
label: 'EMPIRICAL FORMULA', // label: 'EMPIRICAL FORMULA',
value: 'Empirical formula' // value: 'Empirical formula'
}, // },
{ // {
label: 'EVIDENCE-BASED MEDICINE', // label: 'EVIDENCE-BASED MEDICINE',
value: 'Evidence-based medicine' // value: 'Evidence-based medicine'
}, // },
{ // {
label: 'EXPERT CONSENSUS', // label: 'EXPERT CONSENSUS',
value: 'Expert consensus' // value: 'Expert consensus'
}, // },
{ // {
label: 'LETTER TO EDITOR', // label: 'LETTER TO EDITOR',
value: 'Letter to editor' // value: 'Letter to editor'
}, // },
{ // {
label: 'QUESTIONNAIRE INVESTIGATION', // label: 'QUESTIONNAIRE INVESTIGATION',
value: 'Questionnaire investigation' // value: 'Questionnaire investigation'
}, // },
{ // {
label: 'PROTOCOL', // label: 'PROTOCOL',
value: 'Protocol' // value: 'Protocol'
}, // },
{ // {
label: 'CASE SERIES', // label: 'CASE SERIES',
value: 'Case Series' // value: 'Case Series'
}, // },
{ // {
label: 'RETRACTION', // label: 'RETRACTION',
value: 'Retraction' // value: 'Retraction'
}, // },
{ // {
label: 'MINI REVIEW', // label: 'MINI REVIEW',
value: 'Mini Review' // value: 'Mini Review'
}, // },
{ // {
label: 'RETRACTION NOTE', // label: 'RETRACTION NOTE',
value: 'Retraction Note' // value: 'Retraction Note'
}, // },
{ // {
label: '内经难经', // label: '内经难经',
value: '内经难经' // value: '内经难经'
}, // },
{ // {
label: '伤寒金匮', // label: '伤寒金匮',
value: '伤寒金匮' // value: '伤寒金匮'
}, // },
{ // {
label: '神农本草经', // label: '神农本草经',
value: '神农本草经' // value: '神农本草经'
}, // },
{ // {
label: '温病研究', // label: '温病研究',
value: '温病研究' // value: '温病研究'
}, // },
{ // {
label: '唐宋方药', // label: '唐宋方药',
value: '唐宋方药' // value: '唐宋方药'
}, // },
{ // {
label: '金元各家', // label: '金元各家',
value: '金元各家' // value: '金元各家'
}, // },
{ // {
label: '明清经典', // label: '明清经典',
value: '明清经典' // value: '明清经典'
}, // },
{ // {
label: '中西汇通', // label: '中西汇通',
value: '中西汇通' // value: '中西汇通'
}, // },
{ // {
label: '太湖选粹', // label: '太湖选粹',
value: '太湖选粹' // value: '太湖选粹'
}, // },
{ // {
label: '针灸推拿', // label: '针灸推拿',
value: '针灸推拿' // value: '针灸推拿'
}, // },
{ // {
label: '名医名方', // label: '名医名方',
value: '名医名方' // value: '名医名方'
}, // },
{ // {
label: '新冠肺炎', // label: '新冠肺炎',
value: '新冠肺炎' // value: '新冠肺炎'
}, // },
{ // {
label: '书评', // label: '书评',
value: '书评' // value: '书评'
} // }
], // ],
opMedical:[],
editAuthor: false, editAuthor: false,
addAuthor: false, addAuthor: false,
editSchool: false, editSchool: false,
@@ -1393,6 +1394,7 @@ export default {
}; };
}, },
created() { created() {
this.opMedical=this.$commonJS.opMedicalList()
this.getHight(); this.getHight();
window.addEventListener('resize', this.getHight); window.addEventListener('resize', this.getHight);
this.getData(); this.getData();

View File

@@ -839,147 +839,148 @@
journal_special_id: "None", journal_special_id: "None",
}, },
opInstal: [], opInstal: [],
opMedical: [{ // opMedical: [{
label: 'None', // label: 'None',
value: '' // value: ''
}, // },
{ // {
label: 'ARTICLE', // label: 'ARTICLE',
value: 'Article' // value: 'Article'
}, // },
{ // {
label: 'REVIEW', // label: 'REVIEW',
value: 'Review' // value: 'Review'
}, // },
{ // {
label: 'CASE REPORT', // label: 'CASE REPORT',
value: 'Case report' // value: 'Case report'
}, // },
{ // {
label: 'RESEARCH PROPOSAL', // label: 'RESEARCH PROPOSAL',
value: 'Research proposal' // value: 'Research proposal'
}, // },
{ // {
label: 'NEWS', // label: 'NEWS',
value: 'News' // value: 'News'
}, // },
{ // {
label: 'COMMENT', // label: 'COMMENT',
value: 'Comment' // value: 'Comment'
}, // },
{ // {
label: 'CORRECTION', // label: 'CORRECTION',
value: 'Correction' // value: 'Correction'
}, // },
{ // {
label: 'HYPOTHESIS', // label: 'HYPOTHESIS',
value: 'Hypothesis' // value: 'Hypothesis'
}, // },
{ // {
label: 'PREFACE', // label: 'PREFACE',
value: 'Preface' // value: 'Preface'
}, // },
{ // {
label: 'EDITORIAL', // label: 'EDITORIAL',
value: 'Editorial' // value: 'Editorial'
}, // },
{ // {
label: 'REPORT', // label: 'REPORT',
value: 'Report' // value: 'Report'
}, // },
{ // {
label: 'LETTER', // label: 'LETTER',
value: 'Letter' // value: 'Letter'
}, // },
{ // {
label: 'EMPIRICAL FORMULA', // label: 'EMPIRICAL FORMULA',
value: 'Empirical formula' // value: 'Empirical formula'
}, // },
{ // {
label: 'EVIDENCE-BASED MEDICINE', // label: 'EVIDENCE-BASED MEDICINE',
value: 'Evidence-based medicine' // value: 'Evidence-based medicine'
}, // },
{ // {
label: 'EXPERT CONSENSUS', // label: 'EXPERT CONSENSUS',
value: 'Expert consensus' // value: 'Expert consensus'
}, // },
{ // {
label: 'LETTER TO EDITOR', // label: 'LETTER TO EDITOR',
value: 'Letter to editor' // value: 'Letter to editor'
}, // },
{ // {
label: 'QUESTIONNAIRE INVESTIGATION', // label: 'QUESTIONNAIRE INVESTIGATION',
value: 'Questionnaire investigation' // value: 'Questionnaire investigation'
}, // },
{ // {
label: 'PROTOCOL', // label: 'PROTOCOL',
value: 'Protocol' // value: 'Protocol'
}, // },
{ // {
label: 'CASE SERIES', // label: 'CASE SERIES',
value: 'Case Series' // value: 'Case Series'
}, // },
{ // {
label: 'RETRACTION', // label: 'RETRACTION',
value: 'Retraction' // value: 'Retraction'
}, // },
{ // {
label: 'MINI REVIEW', // label: 'MINI REVIEW',
value: 'Mini Review' // value: 'Mini Review'
}, // },
{ // {
label: '内经难经', // label: '内经难经',
value: '内经难经' // value: '内经难经'
}, // },
{ // {
label: '伤寒金匮', // label: '伤寒金匮',
value: '伤寒金匮' // value: '伤寒金匮'
}, // },
{ // {
label: '神农本草经', // label: '神农本草经',
value: '神农本草经' // value: '神农本草经'
}, // },
{ // {
label: '温病研究', // label: '温病研究',
value: '温病研究' // value: '温病研究'
}, // },
{ // {
label: '唐宋方药', // label: '唐宋方药',
value: '唐宋方药' // value: '唐宋方药'
}, // },
{ // {
label: '金元各家', // label: '金元各家',
value: '金元各家' // value: '金元各家'
}, // },
{ // {
label: '明清经典', // label: '明清经典',
value: '明清经典' // value: '明清经典'
}, // },
{ // {
label: '中西汇通', // label: '中西汇通',
value: '中西汇通' // value: '中西汇通'
}, // },
{ // {
label: '太湖选粹', // label: '太湖选粹',
value: '太湖选粹' // value: '太湖选粹'
}, // },
{ // {
label: '针灸推拿', // label: '针灸推拿',
value: '针灸推拿' // value: '针灸推拿'
}, // },
{ // {
label: '名医名方', // label: '名医名方',
value: '名医名方' // value: '名医名方'
}, // },
{ // {
label: '新冠肺炎', // label: '新冠肺炎',
value: '新冠肺炎' // value: '新冠肺炎'
}, // },
{ // {
label: '书评', // label: '书评',
value: '书评' // value: '书评'
} // }
], // ],
opMedical: [],
editAuthor: false, editAuthor: false,
addAuthor: false, addAuthor: false,
editSchool: false, editSchool: false,
@@ -1150,7 +1151,7 @@
}; };
}, },
created() { created() {this.opMedical=this.$commonJS.opMedicalList()
this.getHight(); this.getHight();
window.addEventListener('resize', this.getHight); window.addEventListener('resize', this.getHight);
this.getData(); this.getData();

View File

@@ -182,6 +182,8 @@ export default {
}, },
data() { data() {
return { return {
baseUrl: this.Common.baseUrl,
mediaUrl: this.Common.mediaUrl,
typesettingType: 1, typesettingType: 1,
typesettingTypeOptions: [ typesettingTypeOptions: [
{ {
@@ -316,7 +318,6 @@ export default {
console.log('粘贴的内容包含表格'); console.log('粘贴的内容包含表格');
if (_this.type == 'table') { if (_this.type == 'table') {
_this.$commonJS.parseTableToArray(content, (tableList) => { _this.$commonJS.parseTableToArray(content, (tableList) => {
var contentHtml = ` var contentHtml = `
<div class="thumbnailTableBox wordTableHtml table_Box" style=""> <div class="thumbnailTableBox wordTableHtml table_Box" style="">
<table border="1" style="width: auto; border-collapse: collapse; text-align: center;"> <table border="1" style="width: auto; border-collapse: collapse; text-align: center;">
@@ -404,7 +405,8 @@ export default {
custom_colors: false, custom_colors: false,
color_map: ['0082AA', 'TMR Blue'], color_map: ['0082AA', 'TMR Blue'],
plugins: 'texttransform kityformula-editor noneditable', // 启用 forecolor 和 code 插件 // image
plugins: 'texttransform noneditable table image', // 启用 forecolor 和 code 插件
// plugins: 'forecolor code paste table image mathType searchreplace raw', // 启用 forecolor 和 code 插件 // plugins: 'forecolor code paste table image mathType searchreplace raw', // 启用 forecolor 和 code 插件
end_container_on_empty_block: true, end_container_on_empty_block: true,
content_css: 'default', // 加载 TinyMCE 默认样式表 content_css: 'default', // 加载 TinyMCE 默认样式表
@@ -413,6 +415,50 @@ export default {
path: 'https://cdn.mathjax.org/mathjax/latest/MathJax.js', path: 'https://cdn.mathjax.org/mathjax/latest/MathJax.js',
config: 'TeX-AMS-MML_HTMLorMML' config: 'TeX-AMS-MML_HTMLorMML'
}, },
// automatic_uploads: false,
// images_upload_handler: function (blobInfo, success, failure, progress) {
// console.log('blobInfo at line 419:', blobInfo);
// return new Promise(function (resolve, reject) {
// const xhr = new XMLHttpRequest();
// const formData = new FormData();
// const file = blobInfo.blob();
// let filename = file.name;
// if (!filename) {
// // 如果没有名字,则手动生成一个
// const ext = file.type.split('/').pop(); // 从 MIME 类型获取扩展名,例如 'png'
// const timestamp = Date.now();
// filename = `unnamed_${timestamp}.${ext}`;
// }
// console.log('file at line 424:', file);
// xhr.withCredentials = false;
// xhr.open('POST', _this.baseUrl + '/api/Preaccept/up_img_mainImage');
// xhr.onload = function () {
// if (xhr.status !== 200) {
// reject('HTTP Error: ' + xhr.status);
// return;
// }
// try {
// const json = JSON.parse(xhr.responseText);
// console.log('json at line 434:', json);
// if (json.code != 0) {
// reject('Upload Error: ' + json.msg);
// return;
// }
// resolve(_this.mediaUrl + 'articleImage/' + json.data.upurl); // ✅ 返回图片 URL 给 TinyMCE 插入
// } catch (e) {
// reject('Invalid response: ' + xhr.responseText);
// }
// };
// formData.append('mainImage', file, filename);
// formData.append('article_id', _this.$route.query.id);
// xhr.send(formData);
// });
// },
//设置自定义按钮 myCustomToolbarButton //设置自定义按钮 myCustomToolbarButton
setup(ed) { setup(ed) {
_this.$commonJS.initEditorButton(_this, ed); _this.$commonJS.initEditorButton(_this, ed);

View File

@@ -2,7 +2,7 @@
<div> <div>
<!--uploadWord |customButtonExportWord |customButtonExportImg --> <!--uploadWord |customButtonExportWord |customButtonExportImg -->
<!-- image -->
<tinymce <tinymce
type="table" type="table"
ref="tinymceChild1" ref="tinymceChild1"
@@ -13,7 +13,7 @@
:value="updatedHtml" :value="updatedHtml"
:typesettingType="typesettingType" :typesettingType="typesettingType"
class="paste-area text-container" class="paste-area text-container"
:toolbar="['bold italic|customBlue removeBlue|kityformula-editor|LateX |myuppercase myuppercasea Line|subscript superscript|table tabledelete| searchreplace |clearButton']" :toolbar="['bold italic|customBlue removeBlue|LateX |myuppercase myuppercasea Line|subscript superscript|table | searchreplace |clearButton']"
style=" style="
/* white-space: pre-line; */ /* white-space: pre-line; */
line-height: 12px; line-height: 12px;

View File

@@ -1,5 +1,10 @@
<template> <template>
<div <div
@click="
isMenuVisible = false;
currentData = {};
currentId = '';
"
class="tinymce-container editor-container word-container" class="tinymce-container editor-container word-container"
:style="!isPreview ? 'padding:10px 20px 10px 30px;' : 'padding:0px;'" :style="!isPreview ? 'padding:10px 20px 10px 30px;' : 'padding:0px;'"
ref="scrollDiv" ref="scrollDiv"
@@ -35,7 +40,7 @@
> >
<div style="width: auto; display: flex; align-items: center"> <div style="width: auto; display: flex; align-items: center">
<!-- <el-checkbox v-model="checked" style="border-right: 1px solid #d8d8d8; padding: 0 20px 0 0;z-index: 10;" size="medium">Select All</el-checkbox> --> <!-- <el-checkbox v-model="checked" style="border-right: 1px solid #d8d8d8; padding: 0 20px 0 0;z-index: 10;" size="medium">Select All</el-checkbox> -->
<div <!-- <div
style="border-right: 1px solid #d8d8d8; padding: 0 20px" style="border-right: 1px solid #d8d8d8; padding: 0 20px"
:style="currentData.type == 0 ? 'Opacity:1' : 'Opacity:0.6'" :style="currentData.type == 0 ? 'Opacity:1' : 'Opacity:0.6'"
> >
@@ -59,20 +64,20 @@
H3 H3
</li> </li>
</ul> </ul>
</div> </div> -->
<div style="border-right: 1px solid #d8d8d8; padding: 0 20px"> <!-- <div style="border-right: 1px solid #d8d8d8; padding: 0 20px">
<ul class="HTitleBox" style="border: none"> <ul class="HTitleBox" style="border: none">
<li @click="addContent" style="font-size: 14px; padding: 0"> <li @click="addContent" style="font-size: 14px; padding: 0">
<i class="el-icon-document"> </i> <i class="el-icon-document"> </i>
Batch Add content Batch Add content
</li> </li>
</ul> </ul>
</div> </div> -->
</div> </div>
<div style="border-left: 1px solid #d8d8d8; padding: 0 0px; float: right"> <div style="padding: 0 0px; float: right">
<ul class="operateBox"> <ul class="operateBox">
<li <!-- <li
v-if="isEditComment" v-if="isEditComment"
style="background-color: #fff !important; color: #f56c6c; border: 1px solid #f56c6c" style="background-color: #fff !important; color: #f56c6c; border: 1px solid #f56c6c"
@mousedown="cacheSelection" @mousedown="cacheSelection"
@@ -81,18 +86,26 @@
<i class="el-icon-document-add" style="margin-top: 2px; float: left"></i> <i class="el-icon-document-add" style="margin-top: 2px; float: left"></i>
Comment Comment
</li> -->
<div style="border-right: 1px solid #d8d8d8; padding: 0 20px">
<ul class="HTitleBox" style="border: none">
<li @click="addContent" style="font-size: 14px; padding: 0; background-color: #fff !important; color: #333">
<i class="el-icon-document" style="margin-right: 2px"> </i>
Batch Add content
</li> </li>
</ul>
</div>
<li style="background-color: #cbccd1 !important; color: #333; border: 1px solid #cbccd1" @click="onAddRow"> <li style="background-color: #cbccd1 !important; color: #333; border: 1px solid #cbccd1" @click="onAddRow">
<i class="el-icon-document-add" style="margin-top: 2px"></i> <i class="el-icon-document-add" style="margin-top: 2px"></i>
Row Row
</li> </li>
<li style="" @click="onEdit"> <!-- <li style="" @click="onEdit">
<i class="el-icon-edit" style="margin-top: 2px"></i> <i class="el-icon-edit" style="margin-top: 2px"></i>
Edit Edit
</li> </li> -->
<li style="background-color: #fc625d !important" @click="onDelete"> <li style="background-color: #fc625d !important" @click="onDelete">
<i class="el-icon-delete" style="margin-top: 2px"></i> <i class="el-icon-delete" style="margin-top: 2px"></i>
@@ -163,7 +176,7 @@
v-if="currentId == item.am_id" v-if="currentId == item.am_id"
style="background-color: #fff; z-index: 100; position: absolute; right: 0px; top: -40px" style="background-color: #fff; z-index: 100; position: absolute; right: 0px; top: -40px"
> >
<el-button <!-- <el-button
v-if="currentId == item.am_id" v-if="currentId == item.am_id"
style="background-color: #006699d1; font-weight: bold; color: #fff; font-size: 16px !important" style="background-color: #006699d1; font-weight: bold; color: #fff; font-size: 16px !important"
:style="index == 0 ? ' opacity: 0.2;' : ' opacity: 1;'" :style="index == 0 ? ' opacity: 0.2;' : ' opacity: 1;'"
@@ -182,7 +195,7 @@
:disabled="index == wordList.length - 1 ? true : false" :disabled="index == wordList.length - 1 ? true : false"
@click="changeSort('down')" @click="changeSort('down')"
></el-button ></el-button
> > -->
</div> </div>
<div <div
@@ -196,7 +209,7 @@
@dragleave="handleDragLeave" @dragleave="handleDragLeave"
@drop="handleDrop" @drop="handleDrop"
class="MaxPicture pMain myeditabledivImage drop-target" class="MaxPicture pMain myeditabledivImage drop-target"
@click="initializeEditor(item.am_id, 'img', item, index)" @click.stop="initializeEditor($event, item.am_id, 'img', item, index)"
v-if="item.type == 1" v-if="item.type == 1"
:main-state="item.state" :main-state="item.state"
:remark="item.checks && item.checks.length > 0 ? 1 : 0" :remark="item.checks && item.checks.length > 0 ? 1 : 0"
@@ -226,7 +239,7 @@
@dragenter="handleDragEnter" @dragenter="handleDragEnter"
@dragleave="handleDragLeave" @dragleave="handleDragLeave"
@drop="handleDrop" @drop="handleDrop"
@click="initializeEditor(item.am_id, 'table', item, index)" @click.stop="initializeEditor($event, item.am_id, 'table', item, index)"
class="thumbnailTableBox wordTableHtml table_Box pMain myeditabledivTable drop-target" class="thumbnailTableBox wordTableHtml table_Box pMain myeditabledivTable drop-target"
v-else-if="item.type == 2" v-else-if="item.type == 2"
:main-state="item.state" :main-state="item.state"
@@ -275,7 +288,7 @@
@dragenter="handleDragEnter" @dragenter="handleDragEnter"
@dragleave="handleDragLeave" @dragleave="handleDragLeave"
@drop="handleDrop" @drop="handleDrop"
@click="initializeEditor(item.am_id, 'text', item, index)" @click.stop="initializeEditor($event, item.am_id, 'text', item, index)"
class="pMain myeditablediv drop-target" class="pMain myeditablediv drop-target"
@blur="clearEditor(item.am_id)" @blur="clearEditor(item.am_id)"
:main-state="item.state" :main-state="item.state"
@@ -487,9 +500,48 @@
<div v-if="isMenuVisible" class="context-menu" :style="{ top: `${menuPosition.y}px`, left: `${menuPosition.x}px` }"> <div v-if="isMenuVisible" class="context-menu" :style="{ top: `${menuPosition.y}px`, left: `${menuPosition.x}px` }">
<ul> <ul>
<!-- {{ menuType }} --> <!-- {{ menuType }} -->
<div v-if="currentData.type == 0">
<div style="padding: 0 60px 0 20px">
<ul class="HTitleBox" style="border: none">
<li
style="font-size: 16px"
:style="currentData.is_h1 == 1 ? 'color:#4d99f1' : 'color:#333'"
@click="currentData.is_h1 == 0 ? changeTitle(1) : changeTitle(0)"
>
H1
</li>
<li
style="font-size: 16px"
:style="currentData.is_h2 == 1 ? 'color:#4d99f1' : 'color:#333'"
@click="currentData.is_h2 == 0 ? changeTitle(2) : changeTitle(0)"
>
H2
</li>
<li
style="font-size: 16px"
:style="currentData.is_h3 == 1 ? 'color:#4d99f1' : 'color:#333'"
@click="currentData.is_h3 == 0 ? changeTitle(3) : changeTitle(0)"
>
H3
</li>
</ul>
</div>
</div>
<li @click="menuAction('edit')" style="color: rgb(43, 129, 239) !important"><i class="el-icon-edit" style=""></i>Edit</li>
<li v-if="isEditComment" style="color: #f56c6c" @mousedown="cacheSelection" @click="menuAction('comment')">
<i class="el-icon-document-add"></i>Comment
</li>
<li @click="menuAction('up')"><i class="el-icon-arrow-up" style=""></i>Move Up</li> <li @click="menuAction('up')"><i class="el-icon-arrow-up" style=""></i>Move Up</li>
<li @click="menuAction('down')"><i class="el-icon-arrow-down" style=""></i>Move Down</li> <li @click="menuAction('down')"><i class="el-icon-arrow-down" style=""></i>Move Down</li>
<li @click="menuAction('delete')"><i class="el-icon-delete" style=""></i>Delete</li> <li @click="menuAction('row')"><i class="el-icon-plus" style=""></i>Add Row</li>
<li @click="menuAction('addContent')"><i class="el-icon-document"> </i>Batch Add content</li>
<li @click="menuAction('delete')" style="color: red; margin-top: 2px; border-top: 1px solid #e5e6eb">
<i class="el-icon-delete" style=""></i>Delete
</li>
</ul> </ul>
</div> </div>
</div> </div>
@@ -833,21 +885,33 @@ export default {
this.editors = {}; this.editors = {};
}, },
methods: { methods: {
openMenu(event, type,currentId) { openMenu(event, type, currentId) {
console.log('event at line 860:', event); console.log('event at line 860:', event);
// 获取鼠标点击位置 // 获取鼠标点击位置
this.menuPosition.x = event.clientX; this.menuPosition.x = event.clientX + 30;
this.menuPosition.y = event.clientY; this.menuPosition.y = event.clientY + 40;
this.menuType = type; // 设置菜单类型,根据点击区域不同显示不同菜单 this.menuType = type; // 设置菜单类型,根据点击区域不同显示不同菜单
this.currentId=currentId; // this.currentId=currentId;
// this.isMenuVisible = true; this.isMenuVisible = true;
}, },
closeMenu() { closeMenu() {
this.isMenuVisible = false; this.isMenuVisible = false;
}, },
menuAction(action) { menuAction(action) {
console.log(`执行了:${action}`); console.log(`执行了:${action}`);
switch(action){ switch (action) {
case 'addContent':
this.addContent();
break;
case 'comment':
this.handleSelection();
break;
case 'edit':
this.onEdit();
break;
case 'row':
this.onAddRow('');
break;
case 'up': case 'up':
this.changeSort('up'); this.changeSort('up');
break; break;
@@ -1318,9 +1382,34 @@ export default {
}); });
}, },
initializeEditor(id, type, data, index) { initializeEditor(event, id, type, data, index) {
this.clearHighlight(); this.clearHighlight();
this.selectedIds = []; this.selectedIds = [];
// this.menuPosition.x = event.clientX+20;
// this.menuPosition.y = event.clientY+20;
const menuWidth = 180; // 你的菜单宽度(按实际调整)
const menuHeight = 275; // 你的菜单高度(按实际调整)
let x = event.clientX + 20;
let y = event.clientY + 20;
// 判断右侧是否越界
if (x + menuWidth > window.innerWidth) {
x = window.innerWidth - menuWidth - 10; // 留点空隙
}
// 判断底部是否越界
if (y + menuHeight > window.innerHeight) {
y = event.clientY - menuHeight - 10; // 改为往上弹
}
this.menuPosition.x = x;
this.menuPosition.y = y;
this.menuType = type; // 设置菜单类型,根据点击区域不同显示不同菜单
// this.currentId=currentId;
this.wordList.forEach((item, index) => { this.wordList.forEach((item, index) => {
item.checked = false; item.checked = false;
}); });
@@ -1328,7 +1417,7 @@ export default {
this.currentId = id; this.currentId = id;
this.currentIndex = index; this.currentIndex = index;
this.currentData = data; this.currentData = data;
this.isMenuVisible = true;
// const editorId = `editor${index}`; // const editorId = `editor${index}`;
// // 检查当前编辑器是否已经初始化 // // 检查当前编辑器是否已经初始化
// if (this.editors[editorId]) return; // if (this.editors[editorId]) return;
@@ -2453,7 +2542,7 @@ export default {
} }
.context-menu { .context-menu {
position: fixed; position: fixed;
width: 150px; width: 180px;
background-color: #fff; background-color: #fff;
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05); box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
border-radius: 4px; border-radius: 4px;
@@ -2461,6 +2550,7 @@ export default {
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: 4px; border-radius: 4px;
line-height: 28px; line-height: 28px;
box-sizing: border-box;
} }
.context-menu ul { .context-menu ul {
@@ -2475,7 +2565,7 @@ export default {
font-size: 14px; font-size: 14px;
color: rgb(51, 54, 57); color: rgb(51, 54, 57);
border-radius: 4px; border-radius: 4px;
padding: 4px 0; padding: 2px 0;
} }
.context-menu li i { .context-menu li i {
margin: 5px 10px 0 10px; margin: 5px 10px 0 10px;

View File

@@ -458,7 +458,7 @@ export default {
// var extension = img.image.split('.').pop().toLowerCase(); // var extension = img.image.split('.').pop().toLowerCase();
// if (extension === 'tif' || extension === 'jpg' || extension === 'jpeg' || extension === 'png') { // if (extension === 'tif' || extension === 'jpg' || extension === 'jpeg' || extension === 'png') {
const modalContent = `<img src="${this.mediaUrl + img.image}" alt="Image ${index}" style="width:100%;background:#FFF;" >`; const modalContent = `<img src="${this.mediaUrl + img.image}" alt="Image ${index}" style="width:100%;background:#FFF;" >`;
console.log('modalContent at line 487:', modalContent)
this.$commonJS.createImageModal(index, modalContent, 'img'); this.$commonJS.createImageModal(index, modalContent, 'img');
// } // }

View File

@@ -51,14 +51,16 @@
<p>{{ v.title }}</p> <p>{{ v.title }}</p>
</li> </li>
</ul> --> </ul> -->
<div class="go-mt" > <div class="go-mt">
<el-radio-group v-model="isCollapse" style="float:right;" size="mini" @change="changeIsCollapse"> <el-radio-group v-model="isCollapse" style="float: right" size="mini" @change="changeIsCollapse">
<el-radio-button :label="false">{{ $t('commonTable.singleRow') }}</el-radio-button> <el-radio-button :label="false">{{ $t('commonTable.singleRow') }}</el-radio-button>
<el-radio-button :label="true">{{ $t('commonTable.Multicolumn') }}</el-radio-button> <el-radio-button :label="true">{{ $t('commonTable.Multicolumn') }}</el-radio-button>
</el-radio-group> </el-radio-group>
</div> </div>
<div style="width: 200px; float: right; padding: 10px; height: calc(100% - 28px); box-sizing: border-box; overflow-y: auto" class="arrlist"> <div
style="width: 200px; float: right; padding: 10px; height: calc(100% - 28px); box-sizing: border-box; overflow-y: auto"
class="arrlist"
>
<ul style="width: 100%; height: auto"> <ul style="width: 100%; height: auto">
<!-- <li v-show="currentMenu == 1"> <!-- <li v-show="currentMenu == 1">
<div style="display: flex; flex-wrap: wrap; gap: 10px; justify-content: start"> <div style="display: flex; flex-wrap: wrap; gap: 10px; justify-content: start">
@@ -110,7 +112,7 @@
</li> --> </li> -->
<li v-show="currentMenu == 1"> <li v-show="currentMenu == 1">
<div style="" class="go-content-charts-item-box" :class="isCollapse?'double':'single'"> <div style="" class="go-content-charts-item-box" :class="isCollapse ? 'double' : 'single'">
<!-- <div class="item_box" style="width: 100%; height: auto; position: relative" > <!-- <div class="item_box" style="width: 100%; height: auto; position: relative" >
<el-collapse v-if="isShowEdit"> <el-collapse v-if="isShowEdit">
<el-collapse-item name="1" style="margin-top: 4px"> <el-collapse-item name="1" style="margin-top: 4px">
@@ -148,7 +150,10 @@
overflow: hidden; overflow: hidden;
position: relative;`" position: relative;`"
> >
<div class="imgbox" style="width: 100%; height: 80px; display: flex; justify-content: center; align-items: center"> <div
class="imgbox"
style="width: 100%; height: 80px; display: flex; justify-content: center; align-items: center"
>
<!-- 图片内容 --> <!-- 图片内容 -->
<img src="@/assets/img/upload.png" style="width: 100px; height: 100%; object-fit: cover" /> <img src="@/assets/img/upload.png" style="width: 100px; height: 100%; object-fit: cover" />
</div> </div>
@@ -191,12 +196,12 @@
<div class="title"> <div class="title">
<span <span
>Figure {{ index + 1 }} >Figure {{ index + 1 }}
<span class="previewbox" <span
class="previewbox"
@click="openPreview(index, 'img')" @click="openPreview(index, 'img')"
v-if="['jpg', 'jpeg', 'png'].includes(img.image.split('.').pop().toLowerCase())" v-if="['jpg', 'jpeg', 'png'].includes(img.image.split('.').pop().toLowerCase())"
> >
<i class="el-icon-view" style="font-size: 16px"></i> <i class="el-icon-view" style="font-size: 16px"></i>
</span> </span>
<a :href="mediaUrl + img.image.url" style="color: #000" v-else> <a :href="mediaUrl + img.image.url" style="color: #000" v-else>
<!-- <el-tooltip class="item" effect="dark" :content="$t('commonTable.preview')" placement="top"> --> <!-- <el-tooltip class="item" effect="dark" :content="$t('commonTable.preview')" placement="top"> -->
@@ -244,17 +249,30 @@
:draggable="img.has_selected == 0 ? true : false" :draggable="img.has_selected == 0 ? true : false"
@dragstart="img.has_selected == 0 ? onDragStart($event, img, index, 'img') : ''" @dragstart="img.has_selected == 0 ? onDragStart($event, img, index, 'img') : ''"
> >
<div class="imgbox" style="width: 100%; height: 80px; display: flex; justify-content: center; align-items: center"> <div
class="imgbox"
style="width: 100%; height: 80px; display: flex; justify-content: center; align-items: center"
>
<!-- 图片内容 --> <!-- 图片内容 -->
<template v-if="['jpg', 'jpeg', 'png'].includes(img.image.split('.').pop().toLowerCase())"> <template v-if="['jpg', 'jpeg', 'png'].includes(img.image.split('.').pop().toLowerCase())">
<img @click="img.has_selected == 1?goToListComment(img.article_image_id, 'img'):openPreview(index, 'img')" <img
@click="
img.has_selected == 1
? goToListComment(img.article_image_id, 'img')
: openPreview(index, 'img')
"
:data-img-id="img.article_image_id" :data-img-id="img.article_image_id"
:src="mediaUrl + img.image" :src="mediaUrl + img.image"
style="width: 140px; height: 100%; object-fit: cover" style="width: 140px; height: 100%; object-fit: cover"
/> />
</template> </template>
<template v-else-if="img.image.split('.').pop().toLowerCase() === 'tif'"> <template v-else-if="img.image.split('.').pop().toLowerCase() === 'tif'">
<img @click="img.has_selected == 1?goToListComment(img.article_image_id, 'img'):openPreview(index, 'img')" <img
@click="
img.has_selected == 1
? goToListComment(img.article_image_id, 'img')
: openPreview(index, 'img')
"
:data-img-id="img.article_image_id" :data-img-id="img.article_image_id"
:src="img.dataUrl" :src="img.dataUrl"
style="width: 140px; height: 100%; object-fit: cover" style="width: 140px; height: 100%; object-fit: cover"
@@ -310,7 +328,19 @@
</div> </div>
</li> </li>
<li v-show="currentMenu == 2"> <li v-show="currentMenu == 2">
<div style="" class="go-content-charts-item-box" :class="isCollapse?'double':'single'"> <div style="" class="go-content-charts-item-box" :class="isCollapse ? 'double' : 'single'">
<!-- <el-tooltip
class="item"
effect="dark"
content="Upload a Word file and automatically recognize all tables in the document"
placement="top-start"
>
<p @click.stop="handlePaperclip" style="display: flex; align-items: center; justify-content: space-around">
<img src="@/assets/img/word.png" style="width: 20px; height: auto" />
<span style="margin-left: 8px; font-size: 14px; color: #103f91; font-weight: bold">Upload Word</span>
</p>
</el-tooltip> -->
<div class="item_box" @click="addTable" style="width: 100%; height: auto; position: relative"> <div class="item_box" @click="addTable" style="width: 100%; height: auto; position: relative">
<div class="list-center go-flex-center go-transition" style="width: 100%"> <div class="list-center go-flex-center go-transition" style="width: 100%">
<div class="title"> <div class="title">
@@ -329,7 +359,10 @@
overflow: hidden; overflow: hidden;
position: relative;`" position: relative;`"
> >
<div class="imgbox" style="width: 100%; height: 80px; display: flex; justify-content: center; align-items: center"> <div
class="imgbox"
style="width: 100%; height: 80px; display: flex; justify-content: center; align-items: center"
>
<!-- 图片内容 --> <!-- 图片内容 -->
<img src="@/assets/img/uploadTable.png" style="width: 100px; height: 100%; object-fit: cover" /> <img src="@/assets/img/uploadTable.png" style="width: 100px; height: 100%; object-fit: cover" />
</div> </div>
@@ -416,7 +449,15 @@
:draggable="table.has_selected == 0 ? true : false" :draggable="table.has_selected == 0 ? true : false"
@dragstart="table.has_selected == 0 ? onDragStart($event, table, index, 'table') : ''" @dragstart="table.has_selected == 0 ? onDragStart($event, table, index, 'table') : ''"
> >
<div class="imgbox" @click="table.has_selected == 1?goToListComment(table.article_table_id, 'table'):openPreview(index, 'table')" style="width: 100%; height: 80px; display: flex; justify-content: center; align-items: center"> <div
class="imgbox"
@click="
table.has_selected == 1
? goToListComment(table.article_table_id, 'table')
: openPreview(index, 'table')
"
style="width: 100%; height: 80px; display: flex; justify-content: center; align-items: center"
>
<!-- 图片内容 --> <!-- 图片内容 -->
<table <table
:data-table-id="table.article_table_id" :data-table-id="table.article_table_id"
@@ -545,10 +586,8 @@ export default {
} }
}, },
methods: { methods: {
changeIsCollapse(e){ changeIsCollapse(e) {
localStorage.setItem('isCollapse', e);
localStorage.setItem('isCollapse', e)
}, },
isShowEditComment() { isShowEditComment() {
if (localStorage.getItem('U_role')) { if (localStorage.getItem('U_role')) {
@@ -879,8 +918,8 @@ export default {
} }
}, },
async created() { async created() {
this.isCollapse=localStorage.getItem('isCollapse')=='true'?true:false; this.isCollapse = localStorage.getItem('isCollapse') == 'true' ? true : false;
console.log('localStorage.getItem',typeof localStorage.getItem('isCollapse')) console.log('localStorage.getItem', typeof localStorage.getItem('isCollapse'));
this.isShowEditComment(); this.isShowEditComment();
this.isFresh = false; this.isFresh = false;
this.$nextTick(async () => { this.$nextTick(async () => {
@@ -892,7 +931,7 @@ export default {
}); });
}, },
async activated() { async activated() {
this.isCollapse=localStorage.getItem('isCollapse')=='true'?true:false; this.isCollapse = localStorage.getItem('isCollapse') == 'true' ? true : false;
this.isFresh = false; this.isFresh = false;
this.isShowEditComment(); this.isShowEditComment();
this.$nextTick(async () => { this.$nextTick(async () => {
@@ -1070,28 +1109,26 @@ li {
height: 28px; */ height: 28px; */
width: 200px; width: 200px;
float: right; float: right;
} }
.double .item_box{ .double .item_box {
width: 46% !important; width: 46% !important;
} }
.double .item_box .previewbox{ .double .item_box .previewbox {
display: none; display: none;
} }
.double .item_box .imgbox { .double .item_box .imgbox {
height: 50px !important; height: 50px !important;
width: auto !important; width: auto !important;
} }
.double .item_box .imgbox img{ .double .item_box .imgbox img {
height: 60px !important; height: 60px !important;
width: auto !important; width: auto !important;
} }
.double .go-transition .title{ .double .go-transition .title {
font-size: 12px !important; font-size: 12px !important;
padding:0 2px !important; padding: 0 2px !important;
line-height: 20px !important; line-height: 20px !important;
} }
.single{ .single {
} }
</style> </style>

View File

@@ -375,7 +375,7 @@
<font>Journal : <b <font>Journal : <b
style="margin-right: 25px;">{{journal_state(detailMess.journalname)}}</b></font> style="margin-right: 25px;">{{journal_state(detailMess.journalname)}}</b></font>
<font>ID : <b style="margin-right: 25px;">{{detailMess.accept_sn}}</b></font> <font>ID : <b style="margin-right: 25px;">{{detailMess.accept_sn}}</b></font>
<font>Type : <b style="margin-right: 25px;">{{mauntType(detailMess.type)}}</b></font> <font>Type : <b style="margin-right: 25px;">{{detailMess.type |jtName}}</b></font>
<font>Major : <b>{{detailMess.major}}</b></font> <font>Major : <b>{{detailMess.major}}</b></font>
</div> </div>
<p> <p>
@@ -1400,77 +1400,7 @@
}, },
// 文章类型 // 文章类型
mauntType(e) {
let frag = '';
switch (e) {
case "A":
frag = 'ARTICLE';
break;
case 'B':
frag = 'REVIEW';
break;
case 'C':
frag = 'CASE REPORT';
break;
case 'P':
frag = 'RESEARCH PROPOSAL';
break;
case 'N':
frag = 'NEWS';
break;
case 'T':
frag = 'COMMENT';
break;
case 'CT':
frag = 'CORRECTION';
break;
case 'HT':
frag = 'HYPOTHESIS';
break;
case 'PF':
frag = 'PREFACE';
break;
case 'ET':
frag = 'EDITORIAL';
break;
case 'RP':
frag = 'REPORT';
break;
case 'LR':
frag = 'LETTER';
break;
case 'EF':
frag = 'EMPIRICAL FORMULA';
break;
case 'EM':
frag = 'EVIDENCE-BASED MEDICINE';
break;
case 'EC':
frag = 'EXPERT CONSENSUS';
break;
case 'LTE':
frag = 'LETTER TO EDITOR';
break;
case 'QI':
frag = 'QUESTIONNAIRE INVESTIGATION';
break;
case 'PT':
frag = 'PROTOCOL';
break;
case 'CS':
frag = 'CASE SERIES';
break;
case 'RT':
frag = 'RETRACTION';
break;
case 'MR':
frag = 'MINI REVIEW';
break;
default:
frag = 'OTHERS';
}
return frag;
},
// 稿件预览 // 稿件预览
showDetail(e) { showDetail(e) {

View File

@@ -243,7 +243,7 @@
></el-input> ></el-input>
<p class="zhushi"> <p class="zhushi">
Six or less authors are required to list all authors while more than six authors are required to list three of Six or less authors are required to list all authors while more than six authors are required to list three of
them with “et al”. them with “et al.
</p> </p>
</el-form-item> </el-form-item>
<el-form-item :label="SourceType == 'journal' ? 'Title:' : 'Book'" required prop="title"> <el-form-item :label="SourceType == 'journal' ? 'Title:' : 'Book'" required prop="title">
@@ -252,37 +252,47 @@
v-model="refenceForm.title" v-model="refenceForm.title"
placeholder="eg: The role of autophagy in the treatment of osteoporosis by Chinese medicines (natural)" placeholder="eg: The role of autophagy in the treatment of osteoporosis by Chinese medicines (natural)"
></el-input> ></el-input>
<p class="zhushi" v-if="SourceType == 'journal'">
<span style="color: #409EFF;">Automatically displayed after publication "."<span style="color: #ff0000ba;margin-left: 4px;">Don't add "."!</span></span>
</p>
<el-input <el-input
v-if="SourceType == 'book'" v-if="SourceType == 'book'"
v-model="refenceForm.title" v-model="refenceForm.title"
placeholder="eg: Traditional Medicine Research" placeholder="eg: Traditional Medicine Research"
></el-input> ></el-input>
<p v-if="SourceType == 'book'" class="zhushi">Full Name of Book.</p> <p v-if="SourceType == 'book'" class="zhushi">Full Name of Book <span style="color: #409EFF;margin-left: 6px;display: none;">Automatically displayed after publication "."<span style="color: #ff0000ba;margin-left: 4px;">Don't add "."!</span></span></p>
</el-form-item> </el-form-item>
<el-form-item label="Publication Details:" required prop="dateno"> <el-form-item label="Publication Details:" required prop="dateno">
<div v-if="SourceType == 'journal'"> <div v-if="SourceType == 'journal'">
<el-input v-model="refenceForm.dateno" placeholder="eg: 2023;8(9):49-62"></el-input> <el-input v-model="refenceForm.dateno" placeholder="eg: 2023;8(9):49-62"></el-input>
<p class="zhushi">Year;Volume(issue):Inclusive page numbers.</p> <p class="zhushi">Year;Volume(issue):Inclusive page numbers<span style="color: #409EFF;margin-left: 6px;">Automatically displayed after publication "."<span style="color: #ff0000ba;margin-left: 4px;">Don't add "."!</span></span></p>
</div> </div>
<div v-if="SourceType == 'book'"> <div v-if="SourceType == 'book'">
<el-input v-model="refenceForm.dateno" placeholder="eg: New York, NY:McGraw-Hill;2011"></el-input> <el-input v-model="refenceForm.dateno" placeholder="eg: New York, NY:McGraw-Hill;2011"></el-input>
<p class="zhushi">City, State (or Country if not in the US) of publisher:Publishers name;copyright year.</p> <p class="zhushi">City, State (or Country if not in the US) of publisher:Publishers name;copyright year<span style="color: #409EFF;display: none;margin-top: -10px;">Automatically displayed after publication "."<span style="color: #ff0000ba;margin-left: 4px;">Don't add "."!</span></span></p>
</div> </div>
</el-form-item> </el-form-item>
</div> </div>
<div v-show="SourceType == 'journal'"> <div v-show="SourceType == 'journal'">
<el-form-item label="Journal:" required prop="joura"> <el-form-item label="Journal:" required prop="joura">
<el-input v-model="refenceForm.joura" placeholder="eg: Tradit Med Res"></el-input> <el-input v-model="refenceForm.joura" placeholder="eg: Tradit Med Res"></el-input>
<p class="zhushi">Abbreviated Journal Title.</p> <p class="zhushi">Abbreviated Journal Title
<span style="color: #409EFF;margin-left: 6px;">Automatically displayed after publication "."<span style="color: #ff0000ba;margin-left: 4px;">Don't add "."!</span> </span>
</p>
</el-form-item> </el-form-item>
<el-form-item label="DOI/URL:" required prop="doilink"> <el-form-item label="DOI/URL:" required prop="doilink">
<el-input v-model="refenceForm.doilink" placeholder="eg: 10.1002/cncr.30667"></el-input> <el-input v-model="refenceForm.doilink" placeholder="eg: 10.1002/cncr.30667"></el-input>
<p class="zhushi">
<span style="color: #409EFF;">Automatically displayed after publication "."<span style="color: #ff0000ba;margin-left: 4px;">Don't add "."!</span></span>
</p>
</el-form-item> </el-form-item>
</div> </div>
<!-- Book --> <!-- Book -->
<div v-show="SourceType == 'book'"> <div v-show="SourceType == 'book'">
<el-form-item label="ISBN:" required prop="isbn"> <el-form-item label="ISBN:" required prop="isbn">
<el-input v-model="refenceForm.isbn"></el-input> <el-input v-model="refenceForm.isbn"></el-input> <p class="zhushi">
<span style="color: #409EFF;display: none;">Automatically displayed after publication "."<span style="color: #ff0000ba;margin-left: 4px;">Don't add "."!</span></span>
</p>
</el-form-item> </el-form-item>
</div> </div>
<!-- others --> <!-- others -->

View File

@@ -15,7 +15,7 @@
<div class="art_state_message_id" style="padding-left: 15px;"> <div class="art_state_message_id" style="padding-left: 15px;">
<font>Journal : <b style="margin-right: 25px;">{{journal_me}}</b></font> <font>Journal : <b style="margin-right: 25px;">{{journal_me}}</b></font>
<font>ID : <b style="margin-right: 25px;">{{form.accept_sn}}</b></font> <font>ID : <b style="margin-right: 25px;">{{form.accept_sn}}</b></font>
<font>Type : <b style="margin-right: 25px;">{{myType}}</b></font> <font>Type : <b style="margin-right: 25px;">{{form.type |jtName}}</b></font>
<font>Major : <b>{{form.major}}</b></font> <font>Major : <b>{{form.major}}</b></font>
</div> </div>
<p> <p>
@@ -413,77 +413,7 @@
this.initFileList(); this.initFileList();
}, },
computed: { computed: {
myType: function() {
let frag = '';
switch (this.form.type) {
case "A":
frag = 'ARTICLE';
break;
case 'B':
frag = 'REVIEW';
break;
case 'C':
frag = 'CASE REPORT';
break;
case 'P':
frag = 'RESEARCH PROPOSAL';
break;
case 'N':
frag = 'NEWS';
break;
case 'T':
frag = 'COMMENT';
break;
case 'CT':
frag = 'CORRECTION';
break;
case 'HT':
frag = 'HYPOTHESIS';
break;
case 'PF':
frag = 'PREFACE';
break;
case 'ET':
frag = 'EDITORIAL';
break;
case 'RP':
frag = 'REPORT';
break;
case 'LR':
frag = 'LETTER';
break;
case 'EF':
frag = 'EMPIRICAL FORMULA';
break;
case 'EM':
frag = 'EVIDENCE-BASED MEDICINE';
break;
case 'EC':
frag = 'EXPERT CONSENSUS';
break;
case 'LTE':
frag = 'LETTER TO EDITOR';
break;
case 'QI':
frag = 'QUESTIONNAIRE INVESTIGATION';
break;
case 'PT':
frag = 'PROTOCOL';
break;
case 'CS':
frag = 'CASE SERIES';
break;
case 'RT':
frag = 'RETRACTION';
break;
case 'MR':
frag = 'MINI REVIEW';
break;
default:
frag = 'OTHERS';
}
return frag;
},
// coverLetterUrl: function() { // coverLetterUrl: function() {
// return this.baseUrl + this.form.coverLetter; // return this.baseUrl + this.form.coverLetter;
// }, // },

View File

@@ -126,7 +126,7 @@
<font>ID : </font><b>{{MesDetail.accept_sn}}</b> <font>ID : </font><b>{{MesDetail.accept_sn}}</b>
</p> </p>
<p> <p>
<font>Type :</font><b>{{myType(MesDetail.type)}}</b> <font>Type :</font><b>{{MesDetail.type |jtName}}</b>
</p> </p>
<p v-show="MesDetail.type=='A'"> <p v-show="MesDetail.type=='A'">
<font>Ethical Approval :</font><b>{{MesDetail.approval?'Yes':'No'}}</b> <font>Ethical Approval :</font><b>{{MesDetail.approval?'Yes':'No'}}</b>
@@ -647,77 +647,7 @@
} }
return str; return str;
}, },
myType(e) {
let frag = '';
switch (e) {
case "A":
frag = 'ARTICLE';
break;
case 'B':
frag = 'REVIEW';
break;
case 'C':
frag = 'CASE REPORT';
break;
case 'P':
frag = 'RESEARCH PROPOSAL';
break;
case 'N':
frag = 'NEWS';
break;
case 'T':
frag = 'COMMENT';
break;
case 'CT':
frag = 'CORRECTION';
break;
case 'HT':
frag = 'HYPOTHESIS';
break;
case 'PF':
frag = 'PREFACE';
break;
case 'ET':
frag = 'EDITORIAL';
break;
case 'RP':
frag = 'REPORT';
break;
case 'LR':
frag = 'LETTER';
break;
case 'EF':
frag = 'EMPIRICAL FORMULA';
break;
case 'EM':
frag = 'EVIDENCE-BASED MEDICINE';
break;
case 'EC':
frag = 'EXPERT CONSENSUS';
break;
case 'LTE':
frag = 'LETTER TO EDITOR';
break;
case 'QI':
frag = 'QUESTIONNAIRE INVESTIGATION';
break;
case 'PT':
frag = 'PROTOCOL';
break;
case 'CS':
frag = 'CASE SERIES';
break;
case 'RT':
frag = 'RETRACTION';
break;
case 'MR':
frag = 'MINI REVIEW';
break;
default:
frag = 'OTHERS';
}
return frag;
},
journal_me(e) { journal_me(e) {
var frag = ''; var frag = '';
if (e > 0) { if (e > 0) {

View File

@@ -34,7 +34,14 @@
<!-- <el-table-column prop="article_id" label="ID" width="55" align="center"></el-table-column> --> <!-- <el-table-column prop="article_id" label="ID" width="55" align="center"></el-table-column> -->
<el-table-column prop="title" label="Title" align="left"></el-table-column> <el-table-column prop="title" label="Title" align="left"></el-table-column>
<el-table-column prop="abbr" label="Journal" width="80" align="center"></el-table-column> <el-table-column prop="abbr" label="Journal" width="80" align="center"></el-table-column>
<el-table-column :formatter="typeFormat" label="Type" width="100" align="center"></el-table-column> <el-table-column label="Type" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.type | jtName }}
</template>
</el-table-column>
<el-table-column :formatter="repeFormat" prop="repetition" label="Repetition" width="80" align="center"></el-table-column> <el-table-column :formatter="repeFormat" prop="repetition" label="Repetition" width="80" align="center"></el-table-column>
<el-table-column prop="realname" label="Editor" width="100" align="center"></el-table-column> <el-table-column prop="realname" label="Editor" width="100" align="center"></el-table-column>
<el-table-column :formatter="dateFormat" prop="ctime" width="100" label="Add date" align="center"></el-table-column> <el-table-column :formatter="dateFormat" prop="ctime" width="100" label="Add date" align="center"></el-table-column>
@@ -175,77 +182,7 @@
repeFormat(row, column, cellValue, index) { repeFormat(row, column, cellValue, index) {
return cellValue + '%'; return cellValue + '%';
}, },
typeFormat(row, column, cellValue, index) {
let frag = '';
switch (row.type) {
case "A":
frag = 'ARTICLE';
break;
case 'B':
frag = 'REVIEW';
break;
case 'C':
frag = 'CASE REPORT';
break;
case 'P':
frag = 'RESEARCH PROPOSAL';
break;
case 'N':
frag = 'NEWS';
break;
case 'T':
frag = 'COMMENT';
break;
case 'CT':
frag = 'CORRECTION';
break;
case 'HT':
frag = 'HYPOTHESIS';
break;
case 'PF':
frag = 'PREFACE';
break;
case 'ET':
frag = 'EDITORIAL';
break;
case 'RP':
frag = 'REPORT';
break;
case 'LR':
frag = 'LETTER';
break;
case 'EF':
frag = 'EMPIRICAL FORMULA';
break;
case 'EM':
frag = 'EVIDENCE-BASED MEDICINE';
break;
case 'EC':
frag = 'EXPERT CONSENSUS';
break;
case 'LTE':
frag = 'LETTER TO EDITOR';
break;
case 'QI':
frag = 'QUESTIONNAIRE INVESTIGATION';
break;
case 'PT':
frag = 'PROTOCOL';
break;
case 'CS':
frag = 'CASE SERIES';
break;
case 'RT':
frag = 'RETRACTION';
break;
case 'MR':
frag = 'MINI REVIEW';
break;
default:
frag = 'OTHERS';
}
return frag;
},
formatDate(timestamp) { formatDate(timestamp) {
var date = new Date(timestamp * 1000); //时间戳为10位需*1000时间戳为13位的话不需乘1000 var date = new Date(timestamp * 1000); //时间戳为10位需*1000时间戳为13位的话不需乘1000
var Y = date.getFullYear() + '-'; var Y = date.getFullYear() + '-';

View File

@@ -25,7 +25,7 @@
<span>{{form.title}}</span> <span>{{form.title}}</span>
</el-form-item> </el-form-item>
<el-form-item label="Type"> <el-form-item label="Type">
<span>{{myType}}</span> <span>{{form.type | jtName}}</span>
</el-form-item> </el-form-item>
<el-form-item label="Repetition" v-show="form.repezip!=''"> <el-form-item label="Repetition" v-show="form.repezip!=''">
<el-link type="primary" icon="el-icon-download" :href="this.mediaUrl + form.repezip">Download</el-link> <el-link type="primary" icon="el-icon-download" :href="this.mediaUrl + form.repezip">Download</el-link>
@@ -253,77 +253,7 @@
this.initFileList(); this.initFileList();
}, },
computed: { computed: {
myType: function() {
let frag = '';
switch (this.form.type) {
case "A":
frag = 'ARTICLE';
break;
case 'B':
frag = 'REVIEW';
break;
case 'C':
frag = 'CASE REPORT';
break;
case 'P':
frag = 'RESEARCH PROPOSAL';
break;
case 'N':
frag = 'NEWS';
break;
case 'T':
frag = 'COMMENT';
break;
case 'CT':
frag = 'CORRECTION';
break;
case 'HT':
frag = 'HYPOTHESIS';
break;
case 'PF':
frag = 'PREFACE';
break;
case 'ET':
frag = 'EDITORIAL';
break;
case 'RP':
frag = 'REPORT';
break;
case 'LR':
frag = 'LETTER';
break;
case 'EF':
frag = 'EMPIRICAL FORMULA';
break;
case 'EM':
frag = 'EVIDENCE-BASED MEDICINE';
break;
case 'EC':
frag = 'EXPERT CONSENSUS';
break;
case 'LTE':
frag = 'LETTER TO EDITOR';
break;
case 'QI':
frag = 'QUESTIONNAIRE INVESTIGATION';
break;
case 'PT':
frag = 'PROTOCOL';
break;
case 'CS':
frag = 'CASE SERIES';
break;
case 'RT':
frag = 'RETRACTION';
break;
case 'MR':
frag = 'MINI REVIEW';
break;
default:
frag = 'OTHERS';
}
return frag;
},
coverLetterUrl: function() { coverLetterUrl: function() {
return this.baseUrl + this.form.coverLetter; return this.baseUrl + this.form.coverLetter;
}, },

View File

@@ -30,7 +30,8 @@
<el-option label="D" key="D" value="D"></el-option> <el-option label="D" key="D" value="D"></el-option>
<el-option label="Not rated" key="1" value="1"></el-option> <el-option label="Not rated" key="1" value="1"></el-option>
</el-select> --> </el-select> -->
<el-input clearable v-model="query.keyword" placeholder="Account / Realname / Email" style="width: 240px; margin: 0 15px"> </el-input> <el-input clearable v-model="query.keyword" placeholder="Account / Realname / Email" style="width: 240px; margin: 0 15px">
</el-input>
<el-cascader <el-cascader
clearable clearable
:ref="`cascader1`" :ref="`cascader1`"
@@ -66,8 +67,29 @@
</p> </p>
<p class="tab_tie_col"> <p class="tab_tie_col">
<span>Title: </span>{{ scope.row.technical }} <span>Title: </span>{{ scope.row.technical }}
<span style="margin-left: 30px">CV: </span> <span style="margin-left: 25px">CV: </span>
<b class="el-icon-check" style="color: #0fa31d; font-weight: bold" v-if="scope.row.cvs.length > 0"> </b> <span v-if="scope.row.cvs.length > 0" v-for="(item, index) in [scope.row.cvs[scope.row.cvs.length - 1]]">
<!-- <span style="margin-left: 20px; color: #888; font-size: 13px">
<i class="el-icon-paperclip"></i>
{{ formatDate(item.ctime) }}
</span> -->
<el-tooltip :content="formatDate(item.ctime)" placement="top">
<a
:href="mediaUrl + 'reviewer/' + item.cv"
target="_blank"
class="txt_pdf"
style="margin: 0; display: inline-block"
><img
src="@/assets/img/icon_0.png"
alt=""
class="icon_img"
style="vertical-align: middle; width: 16px; height: 16px"
/>
<i class="el-icon-download" style="font-size: 12px;margin-left: 4px;"></i>
</a>
</el-tooltip>
</span>
<!-- <b class="el-icon-check" style="color: #0fa31d; font-weight: bold" v-if="scope.row.cvs.length > 0"> </b> -->
<b class="el-icon-close" style="color: #ff0000; font-weight: bold" v-if="scope.row.cvs.length == 0"> </b> <b class="el-icon-close" style="color: #ff0000; font-weight: bold" v-if="scope.row.cvs.length == 0"> </b>
</p> </p>
<p class="tab_tie_col"><span>Email: </span>{{ scope.row.email }}</p> <p class="tab_tie_col"><span>Email: </span>{{ scope.row.email }}</p>
@@ -116,6 +138,13 @@
> >
</font> </font>
</p> </p>
<p class="tab_tie_col">
<span style="color: #0b71ff">Reviewed manuscripts {{ ReviewTime }}: </span>
<font style="display: inline-block; color: #0b71ff; font-weight: bold" v-if="scope.row.review_num_two_year">
{{ scope.row.review_num_two_year }}
</font>
<font style="display: inline-block; color: #aaa; font-weight: bold" v-else> 0 </font>
</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="Other Information"> <el-table-column label="Other Information">
@@ -179,13 +208,17 @@
</el-table-column> --> </el-table-column> -->
<el-table-column label="Research areas" width="300"> <el-table-column label="Research areas" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.user_id" style="display: flex; align-items: center; justify-content: space-between"> <div
@click="BoxMajor(scope.row, majorData[scope.row.user_id])"
v-if="scope.row.user_id"
style="display: flex; align-items: center; justify-content: space-between; cursor: pointer"
>
<!-- 使用 user_id 来获取用户的 majorData --> <!-- 使用 user_id 来获取用户的 majorData -->
<div> <div>
<div v-if="majorData[scope.row.user_id]" class="majorDataBox"> <div v-if="majorData[scope.row.user_id]" class="majorDataBox">
<p v-for="(v, i) in majorData[scope.row.user_id]" style="border-top: 1px solid #b3d8ff;"> <p v-for="(v, i) in majorData[scope.row.user_id]" style="border-top: 1px solid #b3d8ff">
<span style="font-weight:bold">{{ i + 1 }}.</span> <span style="font-weight: bold">{{ i + 1 }}.</span>
{{ v.major_title.replace("Medicine >", "").trim() }} {{ v.major_title.replace('Medicine >', '').trim() }}
</p> </p>
</div> </div>
<div v-else> <div v-else>
@@ -194,11 +227,7 @@
</div> </div>
</div> </div>
<b <b style="margin-left: 10px; color: #006699" class="el-icon-edit"></b>
@click="BoxMajor(scope.row,majorData[scope.row.user_id])"
style="margin-left: 10px; cursor: pointer; color: #006699"
class="el-icon-edit"
></b>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@@ -405,9 +434,10 @@
<el-dialog title="Remarks" :visible.sync="remarkBox" width="800px"> <el-dialog title="Remarks" :visible.sync="remarkBox" width="800px">
<el-form ref="remark" :model="remarkMes" label-width="95px"> <el-form ref="remark" :model="remarkMes" label-width="95px">
<el-form-item label="Reviewer :"> <el-form-item label="Reviewer :">
<p style="line-height: 20px; margin-top: 6px;"> <p style="line-height: 20px; margin-top: 6px">
<span style="color:#333;font-weight:bold;">{{ remarkMes.realname }}</span> <span style="color: #333; font-weight: bold">{{ remarkMes.realname }}</span>
( {{ remarkMes.email }} )</p> ( {{ remarkMes.email }} )
</p>
</el-form-item> </el-form-item>
<el-form-item label="Content :"> <el-form-item label="Content :">
<el-input type="textarea" rows="20" v-model="remarkMes.remark"></el-input> <el-input type="textarea" rows="20" v-model="remarkMes.remark"></el-input>
@@ -421,16 +451,16 @@
<el-dialog title="Edit Research areas" :visible.sync="majorBox" width="800px"> <el-dialog title="Edit Research areas" :visible.sync="majorBox" width="800px">
<el-form ref="remark" :model="majorMes" label-width="120px"> <el-form ref="remark" :model="majorMes" label-width="120px">
<el-form-item label="Reviewer :"> <el-form-item label="Reviewer :">
<p style="line-height: 20px; margin-top: 6px;"> <p style="line-height: 20px; margin-top: 6px">
<span style="color:#333;font-weight:bold;">{{ majorMes.realname }}</span> <span style="color: #333; font-weight: bold">{{ majorMes.realname }}</span>
( {{ majorMes.email }} )</p> ( {{ majorMes.email }} )
</p>
</el-form-item> </el-form-item>
<!-- <el-form-item label="Email :"> <!-- <el-form-item label="Email :">
<p style="line-height: 20px; margin-top: 6px">{{ majorMes.email }}</p> <p style="line-height: 20px; margin-top: 6px">{{ majorMes.email }}</p>
</el-form-item> --> </el-form-item> -->
<el-form-item label="Research areas :"> <el-form-item label="Research areas :">
<common-major-list :list="majorValueList" @load="(e) => (this.majorValueList = e)"></common-major-list> <common-major-list :list="majorValueList" @load="(e) => (this.majorValueList = e)"></common-major-list>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@@ -463,13 +493,17 @@
</template> </template>
<script> <script>
const currentYear = new Date().getFullYear();
var ReviewTime = `(${currentYear - 2}${currentYear})`;
import commonReviewer from '../page/components/reviewerList/add.vue'; import commonReviewer from '../page/components/reviewerList/add.vue';
export default { export default {
components: { components: {
commonReviewer commonReviewer
}, },
data() { data() {
return { return {
ReviewTime: ReviewTime,
majorValueList: [], majorValueList: [],
majorData: [], majorData: [],
selectField: [], selectField: [],
@@ -528,9 +562,7 @@ export default {
remarkMes: { remarkMes: {
remark: '' remark: ''
}, },
majorMes: { majorMes: {},
},
remarkBox: false, remarkBox: false,
majorBox: false, majorBox: false,
gradeMes: { gradeMes: {
@@ -719,9 +751,8 @@ export default {
}, },
async getContent() { async getContent() {
console.log('this.selectField at line 720:', this.selectField);
console.log('this.selectField at line 720:', this.selectField) if (this.selectField.length > 0) {
if(this.selectField.length > 0) {
this.query.user_field = this.selectField[this.selectField.length - 1]; this.query.user_field = this.selectField[this.selectField.length - 1];
} else { } else {
this.query.user_field = ''; this.query.user_field = '';
@@ -742,7 +773,7 @@ export default {
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}); });
await this.$api await this.$api
.post('api/Reviewer/getReviewerListByJournal',this.query) .post('api/Reviewer/getReviewerListByJournal', this.query)
.then(async (res) => { .then(async (res) => {
if (res.code == 0) { if (res.code == 0) {
this.tableData = res.data; this.tableData = res.data;
@@ -761,13 +792,10 @@ export default {
// }); // });
this.$forceUpdate(); this.$forceUpdate();
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
loading.close(); loading.close();
} }
}) })
.catch((err) => { .catch((err) => {
this.$message.error(err); this.$message.error(err);
@@ -1163,7 +1191,7 @@ export default {
this.remarkMes.email = e.email; this.remarkMes.email = e.email;
this.remarkMes.remark = e.remark; this.remarkMes.remark = e.remark;
}, },
BoxMajor(e,data) { BoxMajor(e, data) {
this.majorBox = true; this.majorBox = true;
this.majorMes.realname = e.realname; this.majorMes.realname = e.realname;
this.majorMes.user_id = e.user_id; this.majorMes.user_id = e.user_id;
@@ -1175,10 +1203,8 @@ export default {
? item.shu.split(',').map(Number) ? item.shu.split(',').map(Number)
: [item.shu] : [item.shu]
})); }));
}, },
async fetchMajorData(userId) { async fetchMajorData(userId) {
// if (!this.majorData[userId]) { // if (!this.majorData[userId]) {
// 判断是否已经加载过该用户的数据 // 判断是否已经加载过该用户的数据
const data = await this.getMajorData(userId); // 获取数据 const data = await this.getMajorData(userId); // 获取数据
@@ -1212,10 +1238,12 @@ export default {
}); });
}, },
saveMajor() { saveMajor() {
this.$api.post('api/Reviewer/updateUserField', { this.$api
user_id:this.majorMes.user_id, .post('api/Reviewer/updateUserField', {
user_field:this.majorValueList.map((item) => item.selectedValue[item.selectedValue.length - 1]).toString(',') user_id: this.majorMes.user_id,
}).then((res) => { user_field: this.majorValueList.map((item) => item.selectedValue[item.selectedValue.length - 1]).toString(',')
})
.then((res) => {
if (res.status == 1) { if (res.status == 1) {
this.$message.success('Success'); this.$message.success('Success');
this.majorBox = false; this.majorBox = false;
@@ -1365,6 +1393,9 @@ export default {
// ')</span>'; // ')</span>';
str = '<b style="color:#cbb504">' + num + '</b>'; str = '<b style="color:#cbb504">' + num + '</b>';
} else { } else {
if (num == null) {
num = 0;
}
// str = // str =
// '<b style="color:#0cbc15">' + // '<b style="color:#0cbc15">' +
// num + // num +
@@ -1373,7 +1404,7 @@ export default {
// ')</span>'; // ')</span>';
str = '<b style="color:#0cbc15">' + num + '</b>'; str = '<b style="color:#0cbc15">' + num + '</b>';
} }
if (time == 0) { if (time == 0 || time == null) {
// str = '<b style="color:#aaa;">0</b><span style="color:#aaa;font-size:14px;margin-left:10px;">(No time)</span>'; // str = '<b style="color:#aaa;">0</b><span style="color:#aaa;font-size:14px;margin-left:10px;">(No time)</span>';
str = '<b style="color:#aaa;">0</b>'; str = '<b style="color:#aaa;">0</b>';
} }
@@ -1530,8 +1561,7 @@ export default {
text-decoration: underline; text-decoration: underline;
cursor: pointer; cursor: pointer;
} }
.majorDataBox p:nth-child(1){ .majorDataBox p:nth-child(1) {
border-top: none !important; border-top: none !important;
} }
</style> </style>

View File

@@ -21,10 +21,10 @@ window.MathJax = {
displayMath: [['$$', '$$'], ['\\[', '\\]']], // 块级公式 displayMath: [['$$', '$$'], ['\\[', '\\]']], // 块级公式
}, },
svg: { fontCache: 'global' } svg: { fontCache: 'global' }
}; };
// 监听 DOM 变化,并自动渲染公式 // 监听 DOM 变化,并自动渲染公式
Vue.prototype.$renderMath = function () { Vue.prototype.$renderMath = function () {
if (window.MathJax && window.MathJax.typeset) { if (window.MathJax && window.MathJax.typeset) {
setTimeout(() => { setTimeout(() => {
window.MathJax.typeset(); window.MathJax.typeset();
@@ -32,7 +32,7 @@ window.MathJax = {
} else { } else {
console.warn('MathJax 未正确加载'); console.warn('MathJax 未正确加载');
} }
}; };
import VXETable from 'vxe-table' import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css' import 'vxe-table/lib/style.css'
@@ -47,6 +47,49 @@ import 'quill/dist/quill.bubble.css'
// 注册富文本编辑器组件为全局组件 // 注册富文本编辑器组件为全局组件
Vue.use(VueQuillEditor) Vue.use(VueQuillEditor)
async function loadJournalType() {
const localData = localStorage.getItem('journalType'); // 尝试从 localStorage 获取数据
// 如果 localStorage 中没有数据,则调用 API 获取并存储
if (!localData) {
try {
await api
.post('api/Articletype/getArticleType', {})
.then((res) => {
console.log('res at line 61:', res)
if (res.status == 1) {
localStorage.setItem('journalTypeData', JSON.stringify(res.data.base)); // 将数据存储到 localStorage
localStorage.setItem('journalTypeDataAll', JSON.stringify([...res.data.base, ...res.data.supplement])); // 将数据存储到 localStorage
}
})
await api
.post('api/Articletype/getMedicalType', {})
.then((res) => {
console.log('res at line 61:', res)
if (res.status == 1) {
localStorage.setItem('opMedicalListData', JSON.stringify(res.data)); // 将数据存储到 localStorage
}
})
} catch (error) {
console.error('Failed to fetch journal types:', error);
}
} else {
console.log('Journal types loaded from localStorage:', JSON.parse(localData));
}
}
// 启动应用时调用一次函数来加载 journalType 数据
// 时间过滤器 // 时间过滤器
// 定义时间过滤器(不含时分秒) // 定义时间过滤器(不含时分秒)
Vue.filter('formatDate', function (originVal) { Vue.filter('formatDate', function (originVal) {
@@ -76,7 +119,11 @@ import commonJS from '@/common/js/commonJS.js'
Vue.prototype.$commonJS = commonJS Vue.prototype.$commonJS = commonJS
Vue.prototype.Common = Common; Vue.prototype.Common = Common;
// import { getJournalTypeName } from '@/common/js/commonJS.js';
Vue.filter('jtName', function (value) {
return commonJS.getJournalTypeName(value);
});
// 使用 ES Module // 使用 ES Module
import * as echarts from 'echarts'; import * as echarts from 'echarts';
Vue.prototype.$echarts = echarts Vue.prototype.$echarts = echarts
@@ -130,9 +177,11 @@ const i18n = new VueI18n({
}); });
//使用钩子函数对路由进行权限跳转 //使用钩子函数对路由进行权限跳转
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
loadJournalType();
document.title = `${to.meta.title} | Traditional Medicine Research`; document.title = `${to.meta.title} | Traditional Medicine Research`;
const role = localStorage.getItem('U_name'); const role = localStorage.getItem('U_name');
const userrole = localStorage.getItem('U_status'); const userrole = localStorage.getItem('U_status');
if (!role && to.path != '/register' && to.path !== '/submission' && to.path !== '/verification' && to.path !== '/orcidLink' && to.path !== '/img' && to.path !== '/reviewer' && to.path !== '/thanks' && to.path !== '/login' && to.path !== '/refuse' && to.path !== '/managing' && to.path.search(/retrieve/i) < 0) { if (!role && to.path != '/register' && to.path !== '/submission' && to.path !== '/verification' && to.path !== '/orcidLink' && to.path !== '/img' && to.path !== '/reviewer' && to.path !== '/thanks' && to.path !== '/login' && to.path !== '/refuse' && to.path !== '/managing' && to.path.search(/retrieve/i) < 0) {
next('/login'); next('/login');
// } else if (to.meta.permission) { // } else if (to.meta.permission) {
@@ -157,6 +206,7 @@ router.beforeEach((to, from, next) => {
} else { } else {
next(); next();
} }
} }
}); });