H3+审稿人编委机构
This commit is contained in:
@@ -88,7 +88,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; width: calc(100% - 260px); float: right; height: calc(100% - 0px); background-color: #e4e9ed">
|
||||
|
||||
<common-word
|
||||
:articleId="articleId"
|
||||
v-if="htmlContent"
|
||||
@@ -369,6 +368,7 @@
|
||||
<font style="color: #f56c6c; margin-right: 5px">*</font>
|
||||
Content :
|
||||
</span>
|
||||
|
||||
<common-content
|
||||
type="content"
|
||||
@openAddTable="openAddTable"
|
||||
@@ -595,28 +595,25 @@ export default {
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
|
||||
localStorage.removeItem('scrollPosition');
|
||||
this.isShowEditComment();
|
||||
this.getDate();
|
||||
this.getCommentList();
|
||||
|
||||
},
|
||||
mounted() {
|
||||
document.addEventListener('copy', (event) => {
|
||||
// 获取用户选中的文本
|
||||
const selection = document.getSelection().toString();
|
||||
|
||||
// 你可以修改剪贴板内容
|
||||
// event.clipboardData.setData('text/plain', selection + '\n---来自我的系统---');
|
||||
|
||||
console.log('用户复制了内容:', selection);
|
||||
// 阻止默认行为(如果需要自定义复制逻辑的话)
|
||||
// event.preventDefault();
|
||||
});
|
||||
// 获取用户选中的文本
|
||||
const selection = document.getSelection().toString();
|
||||
|
||||
// 你可以修改剪贴板内容
|
||||
// event.clipboardData.setData('text/plain', selection + '\n---来自我的系统---');
|
||||
|
||||
console.log('用户复制了内容:', selection);
|
||||
// 阻止默认行为(如果需要自定义复制逻辑的话)
|
||||
// event.preventDefault();
|
||||
});
|
||||
},
|
||||
async activated() {
|
||||
|
||||
this.isShowEditComment();
|
||||
this.getDate();
|
||||
this.getCommentList();
|
||||
@@ -624,9 +621,9 @@ export default {
|
||||
|
||||
methods: {
|
||||
openAddTable(content) {
|
||||
this.editVisible = false;
|
||||
this.threeVisible = true;
|
||||
this.$forceUpdate();
|
||||
this.editVisible = false;
|
||||
this.threeVisible = true;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
async copyArray(data) {
|
||||
try {
|
||||
@@ -690,6 +687,7 @@ export default {
|
||||
async getContent(type, content) {
|
||||
if (type == 'content') {
|
||||
content = this.$commonJS.transformHtmlString(content);
|
||||
|
||||
var div = document.createElement('div');
|
||||
div.innerHTML = content; // 将 HTML 字符串加载到 div 中
|
||||
// 替换所有 <strong> 为 <b>
|
||||
@@ -709,7 +707,7 @@ export default {
|
||||
|
||||
// 获取最终修改后的 HTML
|
||||
content = div.innerHTML;
|
||||
|
||||
|
||||
this.saveContent(content, this.currentContent.am_id);
|
||||
} else if (type == 'addcontent') {
|
||||
var hasTable = /<table[\s\S]*?>[\s\S]*?<\/table>/i.test(content);
|
||||
@@ -722,7 +720,7 @@ export default {
|
||||
return false;
|
||||
}
|
||||
var list = this.$commonJS.cleanAndParseWordContent(content);
|
||||
console.log('list at line 569:', list);
|
||||
|
||||
|
||||
this.saveContentList(list, this.currentId);
|
||||
} else if (type == 'table') {
|
||||
@@ -771,6 +769,8 @@ export default {
|
||||
},
|
||||
|
||||
async saveContent(content, am_id) {
|
||||
|
||||
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading...',
|
||||
@@ -780,8 +780,11 @@ export default {
|
||||
var that = this;
|
||||
var str = content.replace(/^<p>\s*(.*?)\s*<\/p>$/, '$1').trim();
|
||||
|
||||
if (str.replace(/<br\s*\/?>/gi, '').trim() === '') {
|
||||
str = '';
|
||||
}
|
||||
str = await that.$commonJS.decodeHtml(str);
|
||||
|
||||
|
||||
await that.$api
|
||||
.post(that.urlList.editContent, {
|
||||
am_id: am_id,
|
||||
@@ -816,6 +819,14 @@ export default {
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
|
||||
content = content.map((str) => {
|
||||
// 逻辑:去掉所有换行符后,如果剩下的内容是空的
|
||||
if (str.replace(/<br\s*\/?>/gi, '').trim() === '') {
|
||||
return ''; // 变成真正的空字符串
|
||||
}
|
||||
return str; // 如果有文字,保留原样
|
||||
});
|
||||
await this.$api
|
||||
.post('api/Preaccept/addMoreRow', {
|
||||
article_id: this.articleId,
|
||||
@@ -846,7 +857,6 @@ export default {
|
||||
return rowIndex < head[0].rowspan; // 假设前两行是表头
|
||||
},
|
||||
deleteComment(comment, index) {
|
||||
console.log('comment at line 480:', comment);
|
||||
if (this.isEditComment) {
|
||||
this.$confirm(this.$t('commonTable.removeAnnotations'), 'Prompt', {
|
||||
confirmButtonText: 'Submit',
|
||||
@@ -872,45 +882,45 @@ export default {
|
||||
}
|
||||
},
|
||||
saveLateX(data) {
|
||||
console.log('data at line 735:', data);
|
||||
// 1. 从 data 中解构出 wrap (或者你命名的模式变量)
|
||||
const { editorId, wmathId, latex, wrap } = data;
|
||||
const newLatex = latex ? latex.trim() : '';
|
||||
|
||||
if (!editorId || !wmathId) return;
|
||||
|
||||
const targetEditor = tinymce.get(editorId);
|
||||
if (!targetEditor) return;
|
||||
|
||||
// 2. 找到编辑器中现有的 wmath 标签
|
||||
const targetWmath = targetEditor.dom.select(`wmath[data-id="${wmathId}"]`, targetEditor.getBody())[0];
|
||||
|
||||
if (targetWmath) {
|
||||
if (!newLatex) {
|
||||
// ❌ 删除公式
|
||||
targetEditor.dom.remove(targetWmath);
|
||||
} else {
|
||||
// ✅ 更新公式
|
||||
// 保持属性纯净:同时更新 latex 内容和 wrap 属性
|
||||
targetWmath.setAttribute('data-latex', newLatex);
|
||||
|
||||
// 如果 data 中传了 wrap 模式就更新它,否则可以保留原样或设为默认
|
||||
if (wrap) {
|
||||
targetWmath.setAttribute('data-wrap', wrap);
|
||||
}
|
||||
|
||||
// 内部只放纯 latex 文本,不包裹 $ 符号
|
||||
targetWmath.innerHTML = newLatex;
|
||||
|
||||
// 1. 从 data 中解构出 wrap (或者你命名的模式变量)
|
||||
const { editorId, wmathId, latex, wrap } = data;
|
||||
const newLatex = latex ? latex.trim() : '';
|
||||
|
||||
setTimeout(() => {
|
||||
if (typeof renderMathJax === 'function') {
|
||||
// 重新渲染该编辑器内的数学公式
|
||||
renderMathJax(editorId);
|
||||
if (!editorId || !wmathId) return;
|
||||
|
||||
const targetEditor = tinymce.get(editorId);
|
||||
if (!targetEditor) return;
|
||||
|
||||
// 2. 找到编辑器中现有的 wmath 标签
|
||||
const targetWmath = targetEditor.dom.select(`wmath[data-id="${wmathId}"]`, targetEditor.getBody())[0];
|
||||
|
||||
if (targetWmath) {
|
||||
if (!newLatex) {
|
||||
// ❌ 删除公式
|
||||
targetEditor.dom.remove(targetWmath);
|
||||
} else {
|
||||
// ✅ 更新公式
|
||||
// 保持属性纯净:同时更新 latex 内容和 wrap 属性
|
||||
targetWmath.setAttribute('data-latex', newLatex);
|
||||
|
||||
// 如果 data 中传了 wrap 模式就更新它,否则可以保留原样或设为默认
|
||||
if (wrap) {
|
||||
targetWmath.setAttribute('data-wrap', wrap);
|
||||
}
|
||||
|
||||
// 内部只放纯 latex 文本,不包裹 $ 符号
|
||||
targetWmath.innerHTML = newLatex;
|
||||
|
||||
setTimeout(() => {
|
||||
if (typeof renderMathJax === 'function') {
|
||||
// 重新渲染该编辑器内的数学公式
|
||||
renderMathJax(editorId);
|
||||
}
|
||||
}, 10);
|
||||
}
|
||||
}, 10);
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
async huifu(id) {
|
||||
var that = this;
|
||||
await this.$confirm(this.$t('commonTable.reContent'), 'Prompt', {
|
||||
@@ -987,7 +997,7 @@ export default {
|
||||
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';
|
||||
@@ -1094,18 +1104,15 @@ export default {
|
||||
});
|
||||
},
|
||||
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({
|
||||
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',
|
||||
@@ -1131,7 +1138,7 @@ export default {
|
||||
});
|
||||
},
|
||||
async addCommentSetting(content) {
|
||||
console.log('content at line 602:', content);
|
||||
|
||||
await this.$api
|
||||
.post(this.urlList.addComment, {
|
||||
am_id: content.am_id,
|
||||
@@ -1154,7 +1161,7 @@ export default {
|
||||
});
|
||||
},
|
||||
async addComment(content) {
|
||||
console.log('content at line 603:', this.commentForm);
|
||||
|
||||
var str = content.replace(/^<p>(.*?)<\/p>$/, '$1') ? content.replace(/^<p>(.*?)<\/p>$/, '$1') : '';
|
||||
if (str == '') {
|
||||
this.$message({
|
||||
@@ -1237,13 +1244,13 @@ export default {
|
||||
this.getCommentList();
|
||||
},
|
||||
editComment(comment, type) {
|
||||
console.log('comment at line 813:', comment);
|
||||
|
||||
this.commentForm = {
|
||||
...comment,
|
||||
type: type,
|
||||
remark: type == 'user' ? comment.author_remark : comment.remark
|
||||
};
|
||||
console.log('this.commentForm at line 815:', this.commentForm);
|
||||
|
||||
this.commentVisible = true;
|
||||
},
|
||||
async onAddComment(data) {
|
||||
@@ -1288,7 +1295,6 @@ export default {
|
||||
break;
|
||||
}
|
||||
|
||||
console.log('data at line 739:', data);
|
||||
await this.$api
|
||||
.post(url, {
|
||||
am_id: data.mainId
|
||||
@@ -1330,21 +1336,19 @@ export default {
|
||||
return;
|
||||
}
|
||||
if (index !== -1 && resData) {
|
||||
var newData = Array.isArray(resData) ? resData : (resData ? [resData] : []);
|
||||
const updatedItems= newData.map((item) => ({
|
||||
...item,
|
||||
checked: false,
|
||||
getnum: 0,
|
||||
|
||||
}));
|
||||
var newData = Array.isArray(resData) ? resData : resData ? [resData] : [];
|
||||
const updatedItems = newData.map((item) => ({
|
||||
...item,
|
||||
checked: false,
|
||||
getnum: 0
|
||||
}));
|
||||
if (type == 'addRow') {
|
||||
this.Main_List.splice(index + 1, 0, updatedItems[0]);
|
||||
} else if (type == 'addMoreRow') {
|
||||
this.Main_List.splice(index + 1, 0, ...updatedItems);
|
||||
}else if(type=='positioningImg'||type=='positioningTable'){
|
||||
} else if (type == 'positioningImg' || type == 'positioningTable') {
|
||||
this.Main_List.splice(index + 1, 0, ...updatedItems);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this.$set(this.Main_List, index, updatedItems[0]);
|
||||
}
|
||||
} else {
|
||||
@@ -1366,7 +1370,7 @@ export default {
|
||||
});
|
||||
// 处理文件上传并传递回调函数
|
||||
this.$commonJS.handleFileUpload(event, function (tables) {
|
||||
console.log('tables at line 1138:', tables);
|
||||
|
||||
if (tables.length == 0) {
|
||||
loading.close();
|
||||
that.$message({
|
||||
@@ -1614,8 +1618,7 @@ export default {
|
||||
}
|
||||
},
|
||||
updateChange(content, type) {
|
||||
// console.log('content at line 1154:', content);
|
||||
// console.log('content at line 976:', content);
|
||||
|
||||
var str = this.$commonJS.transformHtmlString(content);
|
||||
if (type == 'imgNote') {
|
||||
this.picStyle1.note = str;
|
||||
@@ -1685,28 +1688,29 @@ export default {
|
||||
const draggedImage = JSON.parse(event.dataTransfer.getData('image'));
|
||||
const draggedImageIndex = JSON.parse(event.dataTransfer.getData('imageIndex'));
|
||||
this.$nextTick(async () => {
|
||||
|
||||
await this.$api
|
||||
.post(this.urlList.setPositioningImage, {
|
||||
am_id: dataId,
|
||||
ami_id: draggedImage.ami_id
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {loading.close()
|
||||
this.refreshCurrentContent('positioningImg',dataId, res.data);
|
||||
if (res.code == 0) {
|
||||
loading.close();
|
||||
this.refreshCurrentContent('positioningImg', dataId, res.data);
|
||||
this.$nextTick(() => {
|
||||
this.$refs.commonWordHtmlTypeSetting.refresh('positioningImg', res.data);
|
||||
});
|
||||
this.$forceUpdate();
|
||||
} else {loading.close()
|
||||
} else {
|
||||
loading.close();
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
.catch((err) => {loading.close()
|
||||
.catch((err) => {
|
||||
loading.close();
|
||||
this.$message.error(err.msg);
|
||||
});
|
||||
});
|
||||
|
||||
} else {
|
||||
const draggedtable = JSON.parse(event.dataTransfer.getData('table'));
|
||||
|
||||
@@ -1717,27 +1721,24 @@ export default {
|
||||
amt_id: draggedtable.amt_id
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {loading.close()
|
||||
this.refreshCurrentContent('positioningTable',dataId, res.data);
|
||||
if (res.code == 0) {
|
||||
loading.close();
|
||||
this.refreshCurrentContent('positioningTable', dataId, res.data);
|
||||
this.$nextTick(() => {
|
||||
this.$refs.commonWordHtmlTypeSetting.refresh('positioningTable', res.data);
|
||||
});
|
||||
this.$forceUpdate();
|
||||
} else {
|
||||
loading.close()
|
||||
loading.close();
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
loading.close()
|
||||
loading.close();
|
||||
this.$message.error(err.msg);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
getCommentList() {
|
||||
this.$api
|
||||
@@ -1912,8 +1913,11 @@ export default {
|
||||
loading.close();
|
||||
this.$message.success('Successfully edit Figure!');
|
||||
this.pictVisible = false;
|
||||
this.$refs.commonWordHtmlTypeSetting.refresh('editImg', res.data.image?{...res.data.image,has_selected:1}:res.data);
|
||||
this.refreshCurrentContent('editImg',res.data.am_id, res.data);
|
||||
this.$refs.commonWordHtmlTypeSetting.refresh(
|
||||
'editImg',
|
||||
res.data.image ? { ...res.data.image, has_selected: 1 } : res.data
|
||||
);
|
||||
this.refreshCurrentContent('editImg', res.data.am_id, res.data);
|
||||
this.$nextTick(() => {
|
||||
this.getCommentList();
|
||||
this.$forceUpdate();
|
||||
@@ -1942,7 +1946,6 @@ export default {
|
||||
this.pictVisible = false;
|
||||
|
||||
this.$refs.commonWordHtmlTypeSetting.refresh('addImg', res.data);
|
||||
|
||||
} else {
|
||||
loading.close();
|
||||
this.$message.error(res.msg);
|
||||
@@ -2026,8 +2029,11 @@ export default {
|
||||
this.$message.success('Successfully edit Table!');
|
||||
this.threeVisible = false;
|
||||
setTimeout(() => {
|
||||
this.$refs.commonWordHtmlTypeSetting.refresh('editTable', res.data.table?{...res.data.table,has_selected:1}:res.data);
|
||||
this.refreshCurrentContent('editTable',res.data.am_id, res.data);
|
||||
this.$refs.commonWordHtmlTypeSetting.refresh(
|
||||
'editTable',
|
||||
res.data.table ? { ...res.data.table, has_selected: 1 } : res.data
|
||||
);
|
||||
this.refreshCurrentContent('editTable', res.data.am_id, res.data);
|
||||
this.getCommentList();
|
||||
});
|
||||
} else {
|
||||
@@ -2571,9 +2577,8 @@ export default {
|
||||
background-color: #0066990d;
|
||||
/* display: block !important; */
|
||||
}
|
||||
wmath[data-wrap="inline"] {
|
||||
wmath[data-wrap='inline'] {
|
||||
display: inline-block !important;
|
||||
width: auto !important;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user