From 5c7fbb76fa2dcf6cc320593578e9f7f0d123788f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=8B=E4=BA=8E=E5=88=9D=E8=A7=81?= <752204717@qq.com> Date: Wed, 21 Jan 2026 14:34:14 +0800 Subject: [PATCH] tijiao --- src/assets/css/main.css | 8 +- src/common/js/commonJS.js | 8 + src/components/common/Header.vue | 2 +- src/components/common/Header2.vue | 2 +- src/components/common/langs/en.js | 25 +- src/components/common/langs/zh.js | 23 +- src/components/page/GenerateCharts.vue | 578 ++++++---- src/components/page/OnlineProofreading.vue | 2 +- src/components/page/articleListEditor_B1.vue | 220 +++- src/components/page/comArtHtmlCreatNew.vue | 2 +- .../page/components/table/DynamicTable.vue | 243 ++++ .../page/components/table/LateX.vue | 4 +- .../page/components/table/MediaLinkDialog.vue | 9 +- .../page/components/table/catalogue.vue | 262 +++++ .../page/components/table/content.vue | 2 +- .../page/components/table/table.vue | 80 +- .../page/components/table/word copy.vue | 2 +- src/components/page/components/table/word.vue | 1001 +++++++---------- .../components/table/wordHtmlTypesetting.vue | 328 +++--- src/components/page/per_text.vue | 8 +- 20 files changed, 1729 insertions(+), 1080 deletions(-) create mode 100644 src/components/page/components/table/DynamicTable.vue create mode 100644 src/components/page/components/table/catalogue.vue diff --git a/src/assets/css/main.css b/src/assets/css/main.css index 6634b84..2cf126f 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -9,7 +9,13 @@ margin: 0; padding: 0; } - +/* 禁止选中特定段落或组件 */ +.no-select { + user-select: none; /* 标准语法 */ + -webkit-user-select: none; /* Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} html, body, #app, diff --git a/src/common/js/commonJS.js b/src/common/js/commonJS.js index 04e0b86..e6f6b8f 100644 --- a/src/common/js/commonJS.js +++ b/src/common/js/commonJS.js @@ -2055,6 +2055,14 @@ export default { onAction: () => { // 插入自定义表格到编辑器中 ed.setContent(''); + const customCallback = ed.getParam('clear_custom_action'); + if (typeof customCallback === 'function') { + customCallback(ed, vueInstance); + } else { + // 3. 如果没有自定义逻辑,执行默认逻辑 + vueInstance.$emit('onClear'); + } + } }); diff --git a/src/components/common/Header.vue b/src/components/common/Header.vue index 3d1623b..febaf40 100644 --- a/src/components/common/Header.vue +++ b/src/components/common/Header.vue @@ -18,7 +18,7 @@ -
\s*(.*?)\s*<\/p>$/, '$1').trim(); - + str = await that.$commonJS.decodeHtml(str); await that.$api @@ -746,10 +765,18 @@ this.saveContent(newContent, selectedMedia.linkData.mainId); }) .then(async (res) => { if (res.code == 0) { + loading.close(); this.editVisible = false; - this.getDate(); + this.refreshCurrentContent('content', am_id, res.data); this.getCommentList(); + } else { + loading.close(); + this.$message.error(res.msg); } + }) + .catch((err) => { + loading.close(); + this.$message.error(err); }); }, async saveContentList(content, am_id) { @@ -759,7 +786,12 @@ this.saveContent(newContent, selectedMedia.linkData.mainId); message: 'Please enter the content!' }); } - + const loading = this.$loading({ + lock: true, + text: 'Loading...', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); await this.$api .post('api/Preaccept/addMoreRow', { article_id: this.articleId, @@ -768,10 +800,18 @@ this.saveContent(newContent, selectedMedia.linkData.mainId); }) .then(async (res) => { if (res.code == 0) { + loading.close(); this.addContentVisible = false; - this.getDate(); + this.refreshCurrentContent('addMoreRow', am_id, res.data); this.getCommentList(); + } else { + loading.close(); + this.$message.error(res.msg); } + }) + .catch((err) => { + loading.close(); + this.$message.error(err); }); }, isHeaderRow(rowIndex, table) { @@ -877,8 +917,10 @@ this.saveContent(newContent, selectedMedia.linkData.mainId); var am_id; if (type == 'img') { am_id = this.Main_List.find((item) => item.ami_id == id).am_id; - } else { + } else if (type == 'table') { am_id = this.Main_List.find((item) => item.amt_id == id).am_id; + } else { + am_id = id; } if (am_id) { this.goToComment(am_id); @@ -903,8 +945,10 @@ this.saveContent(newContent, selectedMedia.linkData.mainId); } }, async onDelete(dataId) { + var that = this; var dataInfo = this.Main_List.find((item) => item.am_id == dataId); - + var dataIndex = this.Main_List.indexOf(dataInfo); + var type = ''; if (dataInfo.type == 1) { type = 'img'; @@ -913,53 +957,70 @@ this.saveContent(newContent, selectedMedia.linkData.mainId); } else if (dataInfo.type == 0) { type = 'content'; } + var url = ''; + switch (type) { + case 'table': + url = that.urlList.removePositioningTable; + break; + case 'img': + url = that.urlList.removePositioningImage; + break; + case 'content': + url = that.urlList.delete; + break; + } + if (dataInfo.type == 0 && dataInfo.content == '') { + await that.$api + .post(url, { + am_id: dataId + }) + .then(async (res) => { + if (res.code == 0) { + setTimeout(() => { + that.Main_List.splice(dataIndex, 1); - await this.$confirm(this.$t('commonTable.removeContent'), 'Prompt', { - confirmButtonText: 'Submit', - cancelButtonText: 'Cancel', - type: 'warning' - }) - .then(async () => { - var that = this; - var url = ''; - switch (type) { - case 'table': - url = that.urlList.removePositioningTable; - break; - case 'img': - url = that.urlList.removePositioningImage; - break; - case 'content': - url = that.urlList.delete; - break; - } - await that.$api - .post(url, { - am_id: dataId - }) - .then(async (res) => { - if (res.code == 0) { - setTimeout(() => { - that.getDate(); - that.getCommentList(); - if (type == 'img') { - that.$refs.commonWordHtmlTypeSetting.refresh('img'); - } else { - that.$refs.commonWordHtmlTypeSetting.refresh('table'); - } - - that.$forceUpdate(); - }); - } - }); - // this.Main_List.splice( - // this.Main_List.findIndex((item) => item.p_main_id == dataId), - // 1 - // ); + that.getCommentList(); + that.$forceUpdate(); + }); + } else { + this.$message.error(res.msg); + } + }) + .catch((err) => { + this.$message.error(err); + }); + } else { + await this.$confirm(this.$t('commonTable.removeContent'), 'Prompt', { + confirmButtonText: 'Submit', + cancelButtonText: 'Cancel', + type: 'warning' }) - .catch((err) => { - console.log('err at line 466:', err); - }); + .then(async () => { + await that.$api + .post(url, { + am_id: dataId + }) + .then(async (res) => { + if (res.code == 0) { + setTimeout(() => { + that.Main_List.splice(dataIndex, 1); + that.$forceUpdate(); + if (type == 'img') { + that.$refs.commonWordHtmlTypeSetting.refresh('removeImg', { ami_id: dataInfo.ami_id }); + } else if (type == 'table') { + that.$refs.commonWordHtmlTypeSetting.refresh('removeTable', { amt_id: dataInfo.amt_id }); + } + that.getCommentList(); + + that.$forceUpdate(); + }); + } + }); + }) + .catch((err) => { + console.log('err at line 466:', err); + }); + } }, async onDeletes(dataId) { await this.$confirm(this.$t('commonTable.removeContent'), 'Prompt', { @@ -978,8 +1039,8 @@ this.saveContent(newContent, selectedMedia.linkData.mainId); setTimeout(() => { that.getDate(); that.getCommentList(); - that.$refs.commonWordHtmlTypeSetting.refresh('img'); - that.$refs.commonWordHtmlTypeSetting.refresh('table'); + that.$refs.commonWordHtmlTypeSetting.reload(); + that.$forceUpdate(); }); } @@ -994,20 +1055,40 @@ this.saveContent(newContent, selectedMedia.linkData.mainId); }); }, async changeSort(type, id) { + var that = this; + const index = this.Main_List.findIndex((item) => item.am_id == id); + if(type=='up'&&index==0){ + + return + } + if(type=='down'&&index==this.Main_List.length-1){ + + return + } + const load = this.$loading({ + lock: true, + text: 'Loading...', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); await that.$api .post(type == 'up' ? '/api/Preaccept/upArticleMain' : '/api/Preaccept/downArticleMain', { am_id: id }) .then(async (res) => { if (res.code == 0) { - setTimeout(() => { - that.getDate(); - that.getCommentList(); - - that.$forceUpdate(); - }); + load.close(); + await this.refreshCurrentContent(`${type}ArticleMain`, id); + that.$forceUpdate(); + } else { + load.close(); + this.$message.error(res.msg); } + }) + .catch((err) => { + load.close(); + this.$message.error(err); }); }, async addCommentSetting(content) { @@ -1103,7 +1184,7 @@ this.saveContent(newContent, selectedMedia.linkData.mainId); if (data && data.remark) { this.$alert( `
${data.remark}
${data.remark}
No Manuscript
-No Manuscript
+ +No Manuscript
+ + ${data.remark}
| + + | +
| + + | +