diff --git a/src/api/index.js b/src/api/index.js index 487fb66..525753d 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -19,8 +19,8 @@ const service = axios.create({ // baseURL: 'https://submission.tmrjournals.com/', //正式 记得切换 // baseURL: 'http://www.tougao.com/', //测试本地 记得切换 // baseURL: 'http://192.168.110.110/tougao/public/index.php/', - baseURL: '/api', //本地 - // baseURL: '/', //正式 + // baseURL: '/api', //本地 + baseURL: '/', //正式 }); diff --git a/src/components/common/common.vue b/src/components/common/common.vue index d0b6e1c..9bac70a 100644 --- a/src/components/common/common.vue +++ b/src/components/common/common.vue @@ -13,9 +13,7 @@ const baseUrl = '/'; //测试环境 -// const mediaUrl = 'http://tougaotest.tmrjournals.com/public/'; -// // const mediaUrl = 'http://zmzm.tougao.dev.com/public/'; -// const baseUrl = '/api'; + ////新正式环境 // const mediaUrl = 'http://mytest.tmrjournals.com/public/'; diff --git a/src/components/common/langs/en.js b/src/components/common/langs/en.js index 237e068..1773b4b 100644 --- a/src/components/common/langs/en.js +++ b/src/components/common/langs/en.js @@ -290,12 +290,13 @@ const en = { state1: 'With editor', state2: 'Under review', state3: 'Reject', + stateDraft: 'Awaiting Submission', state4: 'Revision', state5: 'Accept', state6: 'Pre-accept', state8: 'Final Decision', act1: 'Dealing', - act2: 'Finished' + act2: 'Finished', }, evaluationsis: { EmploymentRate: 'Employment Rate', diff --git a/src/components/common/langs/zh.js b/src/components/common/langs/zh.js index 40ce74e..cc1c374 100644 --- a/src/components/common/langs/zh.js +++ b/src/components/common/langs/zh.js @@ -276,6 +276,7 @@ const zh = { state1: '已受理', state2: '送审中', state3: '拒稿', + stateDraft: '待提交', state4: '退修', state5: '接收', state6: '预接收', diff --git a/src/components/page/GenerateCharts.vue b/src/components/page/GenerateCharts.vue index 67e1a05..b08fb99 100644 --- a/src/components/page/GenerateCharts.vue +++ b/src/components/page/GenerateCharts.vue @@ -780,9 +780,8 @@ export default { var that = this; var str = content.replace(/^

\s*(.*?)\s*<\/p>$/, '$1').trim(); - if (str.replace(//gi, '').trim() === '') { - str = ''; - } + str = str.replace(//gi, ''); + str = await that.$commonJS.decodeHtml(str); await that.$api @@ -1138,7 +1137,7 @@ export default { }); }, async addCommentSetting(content) { - + await this.$api .post(this.urlList.addComment, { am_id: content.am_id, @@ -1161,8 +1160,10 @@ export default { }); }, async addComment(content) { - - var str = content.replace(/^

(.*?)<\/p>$/, '$1') ? content.replace(/^

(.*?)<\/p>$/, '$1') : ''; + + var str= this.$commonJS.transformHtmlString(content) + str=str.replace(//gi, ''); + console.log("🚀 ~ addComment ~ content:", str); if (str == '') { this.$message({ type: 'warning', @@ -1884,6 +1885,9 @@ export default { // 确定保存图片 async savePic() { var str = this.picStyle1.note ? await this.$commonJS.decodeHtml(this.picStyle1.note) : ''; + + + var titleStr = this.picStyle1.title ? await this.$commonJS.decodeHtml(this.picStyle1.title) : ''; if (!this.picStyle.picUrl) { @@ -1894,6 +1898,8 @@ export default { this.$message.error('Please enter a title'); return; } + str = str.replace(//gi, ''); + titleStr = titleStr.replace(//gi, ''); const loading = this.$loading({ lock: true, text: 'Loading...', @@ -1969,28 +1975,42 @@ export default { }, async saveTable(content) { const cleanTableData = (tableList) => { - if (tableList.length == 0) { - return []; - } else { - // 假设第一行是表头,保存表头 - const header = tableList[0]; + if (tableList.length == 0) { + return []; + } else { + // 定义清理函数:去掉所有 br 标签和 TinyMCE 占位符 + const cleanText = (text) => { + if (!text) return ""; + return text.replace(//gi, '').trim(); + }; - // 从第二行开始,移除与表头相同的行 - const cleanedTable = tableList.filter((row, index) => { - // 如果是第一行,则保留 - if (index === 0) return true; + // 1. 获取处理后的干净表头 + const header = tableList[0].map(cell => ({ + ...cell, + text: cleanText(cell.text) + })); - // 比较当前行的每个单元格与表头是否相同 - const isHeaderRow = row.every((cell, cellIndex) => { - return cell.text === header[cellIndex].text; - }); + // 2. 过滤逻辑 + const cleanedTable = tableList.map((row) => { + // 首先:把每一行里的每个 cell.text 里的
都去掉 + return row.map(cell => ({ + ...cell, + text: cleanText(cell.text) + })); + }).filter((row, index) => { + if (index === 0) return true; - return !isHeaderRow; // 只保留与表头不同的行 - }); + // 3. 此时比较的就是没有
的文本了 + const isHeaderRow = row.every((cell, cellIndex) => { + return cell.text === header[cellIndex].text; + }); - return cleanedTable; - } - }; + return !isHeaderRow; + }); + + return cleanedTable; + } +}; var cleanedTableList = content.table ? content.table : []; cleanedTableList = cleanTableData(content.table); @@ -2014,11 +2034,15 @@ export default { spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.7)' }); + strNote = strNote.replace(//gi, ''); + strTitle = strTitle.replace(//gi, ''); + var tableStr=JSON.stringify(cleanedTableList) + if (this.lineStyle.visiTitle == 'Edit Table') { this.$api .post(this.urlList.editTable, { amt_id: this.lineStyle.amt_id, - table_data: JSON.stringify(cleanedTableList), + table_data: tableStr, html_data: content.html_data, note: strNote, title: strTitle diff --git a/src/components/page/articleDetailEditor.vue b/src/components/page/articleDetailEditor.vue index 694d4b0..965be5d 100644 --- a/src/components/page/articleDetailEditor.vue +++ b/src/components/page/articleDetailEditor.vue @@ -928,7 +928,7 @@

Status : {{ articleState }} - Change + Change
Remarks : @@ -1553,6 +1553,7 @@ export default { remarks: '', state: '', ctime: '', + is_draft: '', authorList: [], transList: [] }, @@ -1788,10 +1789,17 @@ export default { }, articleState: function () { let str = ''; - switch (this.form.state) { + + + if(this.form.is_draft==1&&this.form.state==3){ + str = this.$t('artstate.stateDraft'); + return str; + }else{ + switch (this.form.state) { case 0: str = this.$t('artstate.state0'); break; + case 1: str = this.$t('artstate.state1'); break; @@ -1814,7 +1822,9 @@ export default { str = this.$t('artstate.state6'); break; } - return str; + return str; + } + } }, methods: { @@ -2540,6 +2550,7 @@ export default { this.form.is_use_ai = res.article.is_use_ai; this.form.use_ai_explain = res.article.use_ai_explain; this.form.transList = res.transfer; + this.form.is_draft = res.article.is_draft; this.msgs = res.msg; var alist = res.authors; let alist_name = []; diff --git a/src/components/page/articleList.vue b/src/components/page/articleList.vue index 1e13190..b6f7d40 100644 --- a/src/components/page/articleList.vue +++ b/src/components/page/articleList.vue @@ -87,9 +87,13 @@

-->
- + + {{$t('artstate.stateDraft')}} + + {{item.state,'tst' | stateChange}} +
@@ -1058,7 +1062,7 @@ this.$router.push({ border: 1px solid #fff; color: #fff; text-align: center; - padding: 6px 18px; + padding: 6px 12px; letter-spacing: -0.5px; border-top-right-radius: 3px; /* border-top-left-radius: 3px; */ diff --git a/src/components/page/articleListEditor_A.vue b/src/components/page/articleListEditor_A.vue index 4a6f38c..fcc7670 100644 --- a/src/components/page/articleListEditor_A.vue +++ b/src/components/page/articleListEditor_A.vue @@ -125,7 +125,7 @@ Status : - {{ stateFormat(item.state) }} + {{ stateFormat(item.is_draft==1&&item.state==3?'draft':item.state) }}

@@ -2629,6 +2629,9 @@ export default { case 0: str = this.$t('artstate.state0'); break; + case 'draft': + str = this.$t('artstate.stateDraft'); + break; case 1: str = this.$t('artstate.state1'); break; diff --git a/src/components/page/articleListEditor_B1.vue b/src/components/page/articleListEditor_B1.vue index 7e422d1..b2d8cfd 100644 --- a/src/components/page/articleListEditor_B1.vue +++ b/src/components/page/articleListEditor_B1.vue @@ -96,6 +96,11 @@ + + + Yes + No + @@ -108,65 +113,61 @@ - +
+ Fetching highlights, please wait... +
+ - +
- - +
+ Fetching medical history of objective, please wait... +
+ - - +
@@ -188,27 +189,27 @@ - +
+
+ Fetching abstract, please wait... +
+ + +
@@ -266,6 +267,7 @@ +