This commit is contained in:
2025-11-17 17:00:14 +08:00
parent a4eaf0d5cb
commit ef0e8e83e0
40 changed files with 10582 additions and 3381 deletions

View File

@@ -697,15 +697,7 @@ export default {
async saveContent(content, am_id) {
var that = this;
var str = content.replace(/^<p>\s*(.*?)\s*<\/p>$/, '$1').trim();
// var str = content.replace(/^<p>(.*?)<\/p>$/, '$1') ? content.replace(/^<p>(.*?)<\/p>$/, '$1') : '';
console.log('str at line 580:', JSON.stringify(str));
// if (str == '') {
// this.$message({
// type: 'warning',
// message: 'Please enter the content!'
// });
// }
str = await that.$commonJS.decodeHtml(str);
await that.$api
@@ -938,7 +930,6 @@ export default {
})
.then(async () => {
var that = this;
await that.$api
.post('/api/Preaccept/delMoreArticleMains', {
ids: dataId
@@ -1201,14 +1192,21 @@ export default {
},
async onAddRow(mainId) {
await this.$api
.post(this.urlList.addRow, {
am_id: mainId,
article_id: this.articleId
})
.then(async (res) => {
this.getDate();
if(res.code == 0){
this.getDate();
this.getCommentList();
}else{
this.$message.error(res.msg);
}
})
.catch((err) => {
this.$message.error(err.msg);
@@ -1477,120 +1475,13 @@ export default {
});
},
getWord() {
// var htmlContent = `<h3 class="man_Title" contenteditable="false">${this.detailTitle} </h3>`;
// htmlContent += this.Main_List.map((item) => {
// //批注
// let contentHtml = '';
// var isRemark = ``;
// if (item.remark && item.remark != '') {
// // isRemark = `<img class="isRemark" main-id="${item.am_id}" src="${this.remarkImageUrl}" alt="" style="width:20px;height:20px;"/>`;
// isRemark = `<span class="isRemark" main-id="${item.am_id}"><img class="isRemarkIcon" main-id="${item.am_id}" src="${
// this.remarkImageUrl
// }" alt="" style="width: 20px; height: 20px" />
// <span class="isRemarkIcon" main-id="${item.am_id}" > (${item.am_id})</span>
// ${item.state == 0 ? `<span class="Resolved" main-id="${item.am_id}">Resolved</span>` : ''}
// </span>
// `;
// }
// // 判断是否是图片
// if (item.type == 1) {
// var extension = item.image.url.split('.').pop().toLowerCase();
// if (extension == 'tif') {
// contentHtml = `
// <p contenteditable="false" main-state="${item.state}" class="MaxPicture pMain" data-id="${item.ami_id}" main-id="${
// item.am_id
// }">
// <img src="" data-img-id="${item.ami_id}" style="width: ${item.width ? `${item.width}px` : '100%'}" />
// <font class="font" style="width: ${item.width ? `${item.width}px` : '100%'}">${item.image.note ? item.image.note : ''}</font>
// </p>
// `;
// } else if (['jpg', 'jpeg', 'png'].includes(extension)) {
// contentHtml = `
// <p contenteditable="false" main-state="${item.state}" class="MaxPicture pMain" data-id="${
// item.ami_id
// }" main-id="${item.am_id}">
// ${isRemark}
// <img src="${this.mediaUrl + item.image.url}" style="width: ${
// item.width ? `${item.width}px` : '100%'
// }" />
// <font class="font" style="width: ${item.width ? `${item.width}px` : '100%'}" >${
// item.image.note ? item.image.note : ''
// }</font>
// </p>
// `;
// } else {
// contentHtml = `
// <p contenteditable="false" main-state="${item.state}" class="MaxPicture pMain" data-id="${
// item.ami_id
// }" main-id="${item.am_id}">
// ${isRemark}
// <span
// style="
// text-align: center;
// font-size: 30px;
// display: flex;
// align-items: center;
// justify-content: center;
// "
// >
// Figures ( .${item.image.url.split('.').pop().toUpperCase()})
// </span>
// <font class="font" style="width: ${item.width ? `${item.width}px` : '100%'}" >${
// item.image.note ? item.image.note : ''
// }</font>
// </p>
// `;
// }
// } else if (item.type == 2) {
// var tableList = JSON.parse(item.table.table_data);
// contentHtml = `
// <div contenteditable="false" data-id="${item.amt_id}" main-state="${item.state}" main-id="${
// item.am_id
// }" class="thumbnailTableBox wordTableHtml table_Box pMain" style="width: 100%; padding: 8px 15px; box-sizing: border-box; border-radius: 4px; position: relative;">
// ${isRemark}
// <font class="font tableTitle" style="width:100%" >${item.table.title ? item.table.title : ''}</font>
// <table border="1" style="width: auto; border-collapse: collapse; text-align: center; ">
// ${tableList
// .map((row) => {
// return `
// <tr>
// ${row
// .map((cell) => {
// return `
// <td colspan="${cell.colspan || 1}" rowspan="${cell.rowspan || 1}">
// <span>${cell.text || ''}</span>
// </td>
// `;
// })
// .join('')} <!-- join the cells in the row -->
// </tr>
// `;
// })
// .join('')} <!-- join the rows -->
// </table>
// <font class="font" style="width:100%" >${item.table.note ? item.table.note : ''}</font>
// </div>
// `;
// } else {
// contentHtml = `<p class="pMain" main-state="${item.state}" contenteditable="false" data-id="${item.am_id}" main-id="${item.am_id}">${isRemark}${item.content}</p>`;
// }
// // 判断是否是表格类型
// return contentHtml;
// }).join('');
// this.htmlContent = htmlContent;
this.htmlContent = 'true';
},
// 获取数据
async getDate() {
// await this.$api.post('api/Proofread/proofRead', {
// article_id: this.$route.query.id
// });
this.imagesList = [];
let urlLInk = '';
let urlTask = {};
@@ -1598,7 +1489,6 @@ export default {
urlLInk = 'api/Preaccept/getArticleMainsNew';
urlTask.article_id = this.Art_Id;
}
const loading = this.$loading({
lock: true,
text: 'Loading...',
@@ -1611,26 +1501,22 @@ export default {
.post(urlLInk, urlTask)
.then(async (res) => {
if (res.code == 0) {
// res.data.list.forEach((data) => {
// if (data.amt_id) {
// try {
// const parsedData = JSON.parse(data.table.table_data);
// } catch (e) {
// console.error(e.message);
// }
// }
// });
this.Main_List = res.data.list;
this.Main_List = res.data.list.map(e=>{
e.checked = false;
return e;
});
this.getManuscirptContent();
for (let i = 0; i < this.Main_List.length; i++) {
this.Main_List[i].text = this.Main_List[i].content;
this.Main_List[i].getnum = 0;
// this.Main_List[i].checked = false;
}
// setTimeout(async () => {
this.$nextTick(async () => {
await this.getWord();
loading.close();
});
// }, 1000);