This commit is contained in:
2025-01-16 13:18:31 +08:00
parent 1ed566c97f
commit 0f24749c84
2 changed files with 49 additions and 100 deletions

View File

@@ -50,14 +50,14 @@
<p v-html="scope.row.title"></p>
</template>
</el-table-column>
<el-table-column label="Cite" width="100px" align="center">
<el-table-column label="Cite" width="80px" align="center">
<template slot-scope="scope">
<p style="cursor: pointer; color: #006699 !important" @click="goCite(scope.row)">
{{ scope.row.cite_num ? scope.row.cite_num.length : 0 }}
<span style="margin-left: 4px; cursor: pointer; color: #006699 !important; font-weight: bold">
<!-- <span style="margin-left: 4px; cursor: pointer; color: #006699 !important; font-weight: bold">
<i class="el-icon-edit"></i>
</span>
</span> -->
</p>
</template>
</el-table-column>
@@ -80,15 +80,28 @@
<p v-html="scope.row.sort"></p>
</template>
</el-table-column>
<el-table-column label="" width="190px" align="center">
<el-table-column label="" width="220px" align="center">
<template slot-scope="scope">
<el-button size="mini" type="primary" plain icon="el-icon-edit" @click="EditDetail(scope.row)"> Edit</el-button>
<el-button size="mini" type="primary" plain icon="el-icon-notebook-2" @click="htmlContet(scope.row)"> Html</el-button>
<p style="margin-top: 10px">
<el-button size="mini" type="primary" plain icon="el-icon-tickets" @click="ChoseRelated(scope.row)">
<el-button size="small" type="primary" @click="EditDetail(scope.row)" style="padding: 4px 6px !important;border-right-color: hsla(0, 0%, 100%, .5);">
Edit</el-button
>
<el-button-group style="margin-left: 10px;">
<el-button size="small" type="primary" plain @click="htmlContet(scope.row)" style="padding: 4px 6px !important"
>Html</el-button
>
<el-button size="small" type="primary" plain @click="goCite(scope.row)" style="padding: 4px 6px !important"
>Cite</el-button
>
<el-button
size="small"
type="primary"
plain
@click="ChoseRelated(scope.row)"
style="background: #fff !important; color: #4165d7 !important; padding: 4px 6px !important"
>
Relevant</el-button
>
</p>
</el-button-group>
</template>
</el-table-column>
</el-table>
@@ -281,12 +294,12 @@
<span style="margin-left: 15px; color: #0b4b6a" v-if="mains != ''">Typesetting completed</span>
<template v-if="mains != ''">
<el-button
v-if="html_type == 2&&tg_article_id!=0"
v-if="html_type == 2 && tg_article_id != 0"
type="primary"
plain
icon="el-icon-document-copy"
@click.stop
@click=" htmlLayout2()"
@click="htmlLayout2()"
style="margin-left: 20px"
>
<font>Edit Html Proofread</font>
@@ -410,24 +423,24 @@
<el-table-column type="index" align="center" width="50"> </el-table-column>
<el-table-column label="CONTENT" align="center">
<template slot-scope="scope">
<p class="wrongLine" style="text-align: left" v-if="scope.row.author == ''">
{{ scope.row.refer_frag }}
</p>
<div v-else>
<div style="text-align: left" v-if="scope.row.refer_type == 'journal'">
<p>
{{ scope.row.author }},{{ scope.row.title }}, <em>{{ scope.row.joura }}</em> ,{{
scope.row.dateno
}}<br />
</p>
<a class="doiLink" :href="scope.row.doilink" target="_blank">{{ scope.row.doilink }}</a>
<p class="wrongLine" style="text-align: left" v-if="scope.row.author == ''">
{{ scope.row.refer_frag }}
</p>
<div v-else>
<div style="text-align: left" v-if="scope.row.refer_type == 'journal'">
<p>
{{ scope.row.author }},{{ scope.row.title }}, <em>{{ scope.row.joura }}</em> ,{{
scope.row.dateno
}}<br />
</p>
<a class="doiLink" :href="scope.row.doilink" target="_blank">{{ scope.row.doilink }}</a>
</div>
<div style="text-align: left" v-if="scope.row.refer_type == 'book'">
<p>{{ scope.row.author }},{{ scope.row.title }},{{ scope.row.dateno }}<br /></p>
<a class="doiLink" :href="scope.row.isbn" target="_blank">{{ scope.row.isbn }}</a>
</div>
</div>
<div style="text-align: left" v-if="scope.row.refer_type == 'book'">
<p>{{ scope.row.author }},{{ scope.row.title }},{{ scope.row.dateno }}<br /></p>
<a class="doiLink" :href="scope.row.isbn" target="_blank">{{ scope.row.isbn }}</a>
</div>
</div>
</template>
</template>
</el-table-column>
</el-table>
</div>
@@ -1004,24 +1017,14 @@ export default {
var htmlContent = ``;
htmlContent += this.mains
.map((item) => {
//批注
let contentHtml = '';
var isRemark = ``;
// 判断是否是图片
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 = `
contentHtml = `
<p contenteditable="false" main-state="${item.state}" class="MaxPicture pMain" data-id="${
item.ami_id
}" main-id="${item.am_id}">
@@ -1034,30 +1037,6 @@ export default {
}</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);
@@ -1090,6 +1069,7 @@ export default {
</div>
`;
} else {
console.log('item at line 1019:', 333333)
contentHtml = `<p class="pMain" main-state="${item.state}" contenteditable="false" data-id="${item.am_id}" main-id="${item.am_id}">${isRemark}${item.content}</p>`;
}
@@ -1099,6 +1079,7 @@ export default {
})
.join('');
this.htmlContent = htmlContent;
console.log('this.htmlContent at line 820:', this.htmlContent)
},
getMainsInfo2(e) {
this.loadHtml = true;
@@ -1217,6 +1198,7 @@ export default {
background: 'rgba(0, 0, 0, 0.7)'
});
await this.creatMains();
this.html_type=2;
await this.getMainsInfo2();
loading.close();
} else {

View File

@@ -764,18 +764,7 @@ export default {
// 判断是否是图片
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 = `
contentHtml = `
<p contenteditable="false" main-state="${item.state}" class="MaxPicture pMain" data-id="${
item.ami_id
}" main-id="${item.am_id}">
@@ -788,30 +777,6 @@ export default {
}</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);
@@ -853,6 +818,7 @@ export default {
})
.join('');
this.htmlContent = htmlContent;
console.log('this.htmlContent at line 820:', this.htmlContent)
},
getMainsInfo2(e) {
this.loadHtml = true;
@@ -972,6 +938,7 @@ export default {
background: 'rgba(0, 0, 0, 0.7)'
});
await this.creatMains();
this.html_type=2;
await this.getMainsInfo2();
loading.close();
} else {