提交 html
This commit is contained in:
@@ -82,26 +82,36 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="" width="220px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<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
|
||||
>
|
||||
<p style="display: flex; align-items: center; justify-content: space-around">
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
plain
|
||||
@click="ChoseRelated(scope.row)"
|
||||
style="background: #fff !important; color: #4165d7 !important; padding: 4px 6px !important"
|
||||
@click="EditDetail(scope.row)"
|
||||
style="padding: 4px 10px !important; float: left"
|
||||
>
|
||||
Relevant</el-button
|
||||
<i class="el-icon-edit"></i> Edit</el-button
|
||||
>
|
||||
</el-button-group>
|
||||
<el-dropdown :hide-on-click="false" style="">
|
||||
|
||||
<span class="el-dropdown-link"> More operations<i class="el-icon-arrow-down el-icon--right"></i> </span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
|
||||
<el-dropdown-item
|
||||
><p @click="htmlContet(scope.row)"><i class="el-icon-notebook-2"></i>Html</p></el-dropdown-item
|
||||
>
|
||||
|
||||
<el-dropdown-item divided
|
||||
><p @click="goCite(scope.row)"><i class="el-icon-edit"></i>Cite</p>
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item divided>
|
||||
<p @click="ChoseRelated(scope.row)"><i class="el-icon-tickets"></i>Relevant</p>
|
||||
</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -1017,7 +1027,6 @@ export default {
|
||||
var htmlContent = ``;
|
||||
htmlContent += this.mains
|
||||
.map((item) => {
|
||||
|
||||
//批注
|
||||
let contentHtml = '';
|
||||
var isRemark = ``;
|
||||
@@ -1026,15 +1035,15 @@ export default {
|
||||
if (item.type == 1) {
|
||||
contentHtml = `
|
||||
<p contenteditable="false" main-state="${item.state}" class="MaxPicture pMain" data-id="${
|
||||
item.ami_id
|
||||
}" main-id="${item.am_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%'
|
||||
}" />
|
||||
item.width ? `${item.width}px` : '100%'
|
||||
}" />
|
||||
<font class="font" style="width: ${item.width ? `${item.width}px` : '100%'}" >${
|
||||
item.image.note ? item.image.note : ''
|
||||
}</font>
|
||||
item.image.note ? item.image.note : ''
|
||||
}</font>
|
||||
</p>
|
||||
`;
|
||||
} else if (item.type == 2) {
|
||||
@@ -1069,7 +1078,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>`;
|
||||
}
|
||||
|
||||
@@ -1079,7 +1088,7 @@ export default {
|
||||
})
|
||||
.join('');
|
||||
this.htmlContent = htmlContent;
|
||||
console.log('this.htmlContent at line 820:', this.htmlContent)
|
||||
|
||||
},
|
||||
getMainsInfo2(e) {
|
||||
this.loadHtml = true;
|
||||
@@ -1139,35 +1148,38 @@ export default {
|
||||
async htmlContet(e) {
|
||||
this.articleId = e.article_id;
|
||||
this.tg_article_id = e.tg_article_id;
|
||||
// this.articleId = '3444';
|
||||
this.UpHtpFIle.article_id = e.article_id;
|
||||
|
||||
this.refersList = await this.getRefersList();
|
||||
// this.UpHtpFIle.refers = e.refers
|
||||
this.UpHtpFIle.p_article_id = e.p_article_id;
|
||||
this.UpHtpFIle.doi = e.doi;
|
||||
this.UpHtpFIle.htmlfile = e.file_html;
|
||||
this.UpHtpFIle.title = e.title;
|
||||
this.UpHtpFIle.mains = e.mains;
|
||||
this.UpLoadFile.article_id = e.article_id;
|
||||
this.html_type = e.html_type;
|
||||
// this.html_type = 2;
|
||||
|
||||
if (this.html_type == 2) {
|
||||
if (e.has_html == 1) {
|
||||
await this.getMainsInfo2();
|
||||
|
||||
this.HtmlVisible = true;
|
||||
} else {
|
||||
this.mains = '';
|
||||
this.HtmlVisible = true;
|
||||
}
|
||||
} else {
|
||||
await this.getMainsInfo(e);
|
||||
this.HtmlVisible = true;
|
||||
}
|
||||
await this.$api
|
||||
.post('api/Publish/getPublishArticleDetail', {
|
||||
article_id: e.article_id
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {
|
||||
console.log('res.code at line 1148:', res.code);
|
||||
this.html_type = res.data.detail.html_type;
|
||||
if (this.html_type == 2) {
|
||||
if ( res.data.detail.has_html == 1) {
|
||||
await this.getMainsInfo2();
|
||||
this.HtmlVisible = true;
|
||||
} else {
|
||||
this.mains = '';
|
||||
this.HtmlVisible = true;
|
||||
}
|
||||
} else {
|
||||
await this.getMainsInfo(e);
|
||||
this.HtmlVisible = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
// 生成html
|
||||
// CreateHtml(){
|
||||
// const loading = this.$loading({
|
||||
@@ -1187,6 +1199,7 @@ export default {
|
||||
// this.htmlLayout()
|
||||
// }
|
||||
// })
|
||||
|
||||
// },
|
||||
// 修改文章html
|
||||
async htmlLayout2(type) {
|
||||
@@ -1198,7 +1211,7 @@ export default {
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
await this.creatMains();
|
||||
this.html_type=2;
|
||||
this.html_type = 2;
|
||||
await this.getMainsInfo2();
|
||||
loading.close();
|
||||
} else {
|
||||
|
||||
@@ -876,38 +876,42 @@ export default {
|
||||
},
|
||||
// 文章html弹出层
|
||||
async htmlContet(e) {
|
||||
console.log('e at line 923:', e);
|
||||
this.articleId = e.article_id;
|
||||
this.tg_article_id = e.tg_article_id;
|
||||
// this.articleId = '3444';
|
||||
this.UpHtpFIle.article_id = e.article_id;
|
||||
|
||||
this.refersList = await this.getRefersList();
|
||||
// this.UpHtpFIle.refers = e.refers
|
||||
this.UpHtpFIle.p_article_id = e.p_article_id;
|
||||
this.UpHtpFIle.doi = e.doi;
|
||||
this.UpHtpFIle.htmlfile = e.file_html;
|
||||
this.UpHtpFIle.title = e.title;
|
||||
this.UpHtpFIle.mains = e.mains;
|
||||
this.UpLoadFile.article_id = e.article_id;
|
||||
this.html_type = e.html_type;
|
||||
// this.html_type = 2;
|
||||
|
||||
if (this.html_type == 2) {
|
||||
if (e.has_html == 1) {
|
||||
await this.getMainsInfo2();
|
||||
|
||||
this.HtmlVisible = true;
|
||||
} else {
|
||||
this.mains = '';
|
||||
this.HtmlVisible = true;
|
||||
}
|
||||
} else {
|
||||
await this.getMainsInfo(e);
|
||||
this.HtmlVisible = true;
|
||||
}
|
||||
await this.$api
|
||||
.post('api/Publish/getPublishArticleDetail', {
|
||||
article_id: e.article_id
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {
|
||||
console.log('res.code at line 1148:', res.code);
|
||||
this.html_type = res.data.detail.html_type;
|
||||
if (this.html_type == 2) {
|
||||
if ( res.data.detail.has_html == 1) {
|
||||
await this.getMainsInfo2();
|
||||
this.HtmlVisible = true;
|
||||
} else {
|
||||
this.mains = '';
|
||||
this.HtmlVisible = true;
|
||||
}
|
||||
} else {
|
||||
await this.getMainsInfo(e);
|
||||
this.HtmlVisible = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
|
||||
// 生成html
|
||||
// CreateHtml(){
|
||||
// const loading = this.$loading({
|
||||
|
||||
Reference in New Issue
Block a user