diff --git a/src/assets/css/main.css b/src/assets/css/main.css index 28d651c..6634b84 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -1,8 +1,9 @@ :root { - --primary-comment-deep: #00BFFF; /* 深天蓝:用于边框、标题、重要按钮 */ - --primary-comment-main: #87CEEB; /* 天蓝色:主色调,用于普通高亮 */ - --primary-comment-light: #B0E2FF; /* 浅天蓝:用于鼠标悬停 (hover) 效果 */ - --primary-comment-bg: #F0F8FF; /* 爱丽丝蓝:最浅底色,用于批注框背景 */ + --primary-comment-deep: #ffcf30; + --primary-comment-main: #87CEEB; + --primary-comment-light: #ffcf30; + --primary-comment-bg: #ffe796; + --primary-comment-font-deep: #ff9814; } * { margin: 0; diff --git a/src/common/js/commonJS.js b/src/common/js/commonJS.js index 7b859a4..eac128e 100644 --- a/src/common/js/commonJS.js +++ b/src/common/js/commonJS.js @@ -843,7 +843,7 @@ export default { // 使用正则表达式删除属性(保留 data-latex) let updatedAttributes = attributes.replace(/\s([a-zA-Z0-9-]+)(="[^"]*")?/g, function (attrMatch, attrName) { - if (attrName === "data-latex") { + if (attrName === "data-latex" || attrName === "data-id") { return attrMatch; } if (type == 'table' && tag == 'img' && (attrName === "src" || attrName === "width" || attrName === "height")) { @@ -856,9 +856,9 @@ export default { }); // 2. 删除所有不需要的标签 (除 `strong`, `em`, `sub`, `sup`, `b`, `i` 外的所有标签) if (type == 'table') { - inputHtml = inputHtml.replace(/<(?!\/?(strong|em|sub|sup|b|i|blue|wmath|img))[^>]+>/g, ''); // 删除不需要的标签 + inputHtml = inputHtml.replace(/<(?!\/?(strong|em|sub|sup|b|i|blue|wmath|img|myfigure|mytable))[^>]+>/g, ''); // 删除不需要的标签 } else { - inputHtml = inputHtml.replace(/<(?!\/?(strong|em|sub|sup|b|i|blue|wmath))[^>]+>/g, ''); // 删除不需要的标签 + inputHtml = inputHtml.replace(/<(?!\/?(strong|em|sub|sup|b|i|blue|wmath|myfigure|mytable))[^>]+>/g, ''); // 删除不需要的标签 } diff --git a/src/common/js/debounce.js b/src/common/js/debounce.js index 74e4488..0f37664 100644 --- a/src/common/js/debounce.js +++ b/src/common/js/debounce.js @@ -34,20 +34,20 @@ function throttle(fn, delay = 1000, immediate = false) { let args = arguments if (immediate) { - console.log("立即执行参数 执行一次方法") + fn.apply(_this, args) immediate = false return } if (status) { - console.log("当前点击状态为正在重复点击,请稍等片刻后在点击执行") + return } - console.log("执行节流:当前执行了一次点击方法") + fn.apply(_this, args) status = true // 修改状态 timer = setTimeout(() => { - console.log("规定时间到,重置状态,可以重新调用") + status = false }, delay) } diff --git a/src/components/common/langs/en.js b/src/components/common/langs/en.js index 408022b..f3498b6 100644 --- a/src/components/common/langs/en.js +++ b/src/components/common/langs/en.js @@ -381,7 +381,6 @@ const en = { reply: 'Reply', execute: 'Execute', revoke: 'Revoke', - solve: 'Solve', cancelsolve: 'Cancel resolved', Resolved: 'Resolved', @@ -412,9 +411,17 @@ const en = { Multicolumn: 'Multicolumn', singleRow: "single-row", Row: "Row", + addRow: "Add Row", Uncheck: 'Uncheck the paragraph', ManuscirptAIProofreading: 'Manuscript AI Proofreading', + AIProofreading: 'AI Proofreading', + Association: 'Association', BatchAddcontent: 'Batch Add content', + MoveUp: 'Move Up', + + MoveDown: 'Move Down', + jump: 'Locate', + editAssociation: 'Edit Association', }, pendingPayment: { title: 'Title', diff --git a/src/components/common/langs/zh.js b/src/components/common/langs/zh.js index dda07e1..a7b496d 100644 --- a/src/components/common/langs/zh.js +++ b/src/components/common/langs/zh.js @@ -398,9 +398,16 @@ const zh = { Multicolumn:'多列', singleRow:"单列", Row:"空行", + addRow:"新增空行", Uncheck:'取消勾选段落', ManuscirptAIProofreading:'稿件AI校对', + AIProofreading:'AI校对', + Association:'关联', BatchAddcontent: '批量添加内容', + MoveUp: '上移', + MoveDown: '下移', + jump: 'Locate', + editAssociation: 'Edit Association', }, pendingPayment: { title: 'Title', diff --git a/src/components/page/GenerateCharts.vue b/src/components/page/GenerateCharts.vue index eb7c8d6..00e2818 100644 --- a/src/components/page/GenerateCharts.vue +++ b/src/components/page/GenerateCharts.vue @@ -88,7 +88,7 @@ --> + + * + Figure Title : + --> + + * + Title: + ${label}`; + + // 执行替换(仅替换第一次匹配到的,防止全篇误伤) + const newContent = originalContent.replace(label, replacement); + + +console.log('newContent at line 592:', newContent); +this.saveContent(newContent, selectedMedia.linkData.mainId); + }, + async saveContent(content, am_id) { var that = this; var str = content.replace(/^

\s*(.*?)\s*<\/p>$/, '$1').trim(); @@ -1622,10 +1659,19 @@ this.lineStyle1 = { ...formattedData }; // 使用浅拷贝确保两个变量指 // 确定保存图片 async savePic() { - this.picStyle.picUrl; + 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) { + this.$message.error('Please upload a picture'); + return; + } + if (!titleStr) { + this.$message.error('Please enter a title'); + return; + } if (this.picStyle.visiTitle == 'Edit Figure') { this.$api .post(this.urlList.editImage, { @@ -1720,14 +1766,18 @@ this.lineStyle1 = { ...formattedData }; // 使用浅拷贝确保两个变量指 } if (strTitle != '') { strTitle = await this.$commonJS.decodeHtml(strTitle); + }else{ + this.$message.error('Please enter a title'); + return; } - const loading = this.$loading({ + + if (content && cleanedTableList && cleanedTableList.length > 0) { + const loading = this.$loading({ lock: true, text: 'Loading...', spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.7)' }); - if (content && cleanedTableList && cleanedTableList.length > 0) { if (this.lineStyle.visiTitle == 'Edit Table') { this.$api .post(this.urlList.editTable, { @@ -2287,4 +2337,5 @@ this.lineStyle1 = { ...formattedData }; // 使用浅拷贝确保两个变量指 background-color: #0066990d; /* display: block !important; */ } + diff --git a/src/components/page/OnlineProofreading.vue b/src/components/page/OnlineProofreading.vue index b52706c..4c99c86 100644 --- a/src/components/page/OnlineProofreading.vue +++ b/src/components/page/OnlineProofreading.vue @@ -136,7 +136,7 @@

diff --git a/src/components/page/components/OnlineProofreading/catalogue.vue b/src/components/page/components/OnlineProofreading/catalogue.vue index e8dc02c..142cc49 100644 --- a/src/components/page/components/OnlineProofreading/catalogue.vue +++ b/src/components/page/components/OnlineProofreading/catalogue.vue @@ -1,12 +1,10 @@