提交公微
This commit is contained in:
@@ -200,9 +200,10 @@
|
||||
>
|
||||
<el-form ref="editMes" :model="lineStyle" label-width="80px">
|
||||
<!-- <common-late-x></common-late-x> -->
|
||||
<!-- :id="`editor-${new Date().getTime()}-${lineStyle.am_id}-${lineStyle.amt_id}-title`" -->
|
||||
<el-form-item label="Title:">
|
||||
<common-content
|
||||
:id="`editor-${new Date().getTime()}-${lineStyle.am_id}-${lineStyle.amt_id}-title`"
|
||||
:id="`editor-${new Date().getTime()}-${lineStyle.am_id}-${lineStyle.amt_id}-title`"
|
||||
:isAutomaticUpdate="true"
|
||||
:value="lineStyle.title"
|
||||
@getContent="getContent"
|
||||
@@ -228,8 +229,9 @@
|
||||
></common-table>
|
||||
</el-form-item>
|
||||
<el-form-item label="Note:">
|
||||
<!-- :id="`editor-${new Date().getTime()}-${lineStyle.am_id}-${lineStyle.amt_id}-note`" -->
|
||||
<common-content
|
||||
:id="`editor-${new Date().getTime()}-${lineStyle.am_id}-${lineStyle.amt_id}-note`"
|
||||
:id="`editor-${new Date().getTime()}-${lineStyle.am_id}-${lineStyle.amt_id}-note`"
|
||||
:isAutomaticUpdate="true"
|
||||
:value="lineStyle.note"
|
||||
@getContent="getContent"
|
||||
@@ -512,10 +514,12 @@ export default {
|
||||
addContentVisible: false,
|
||||
addContent: {},
|
||||
lineStyle: {},
|
||||
lineStyle1: {},
|
||||
contentStyle: {},
|
||||
lineTable: [],
|
||||
threeVisible: false,
|
||||
picStyle: {},
|
||||
picStyle1: {},
|
||||
commentForm: {},
|
||||
commentVisible: false,
|
||||
pictVisible: false,
|
||||
@@ -1261,14 +1265,8 @@ export default {
|
||||
this.threeVisible = true;
|
||||
},
|
||||
addUploadWordTable(data) {
|
||||
this.lineStyle = {};
|
||||
this.lineStyle = {
|
||||
...data,
|
||||
table: data.table_data,
|
||||
html_data: data.html_data,
|
||||
note: '',
|
||||
title: ''
|
||||
};
|
||||
this.lineStyle = { note: '', table: data.table_data, html_data: data.html_data };
|
||||
|
||||
this.lineStyle.visiTitle = 'Insert Table';
|
||||
this.threeVisible = true;
|
||||
},
|
||||
@@ -1294,16 +1292,19 @@ export default {
|
||||
}
|
||||
},
|
||||
updateChange(content, type) {
|
||||
console.log('content at line 1154:', content);
|
||||
// console.log('content at line 1154:', content);
|
||||
// console.log('content at line 976:', content);
|
||||
var str = this.$commonJS.transformHtmlString(content);
|
||||
if (type == 'imgNote') {
|
||||
this.picStyle.note = str;
|
||||
this.picStyle1.note = str;
|
||||
} else if (type == 'imgTitle') {
|
||||
this.picStyle.title = str;
|
||||
this.picStyle1.title = str;
|
||||
} else {
|
||||
this.lineStyle[type] = str;
|
||||
this.lineStyle1[type] = str;
|
||||
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
onEdit(dataId) {
|
||||
this.currentContent = {};
|
||||
@@ -1312,7 +1313,7 @@ export default {
|
||||
this.currentId = null;
|
||||
this.clearButton();
|
||||
var data = this.Main_List.find((item) => item.am_id == dataId);
|
||||
console.log('data at line 667:', data);
|
||||
// console.log('data at line 667:', data);
|
||||
if (data.type == 1) {
|
||||
var extension = data.image.url.split('.').pop().toLowerCase();
|
||||
if (extension == 'tif') {
|
||||
@@ -1674,8 +1675,8 @@ export default {
|
||||
async savePic() {
|
||||
this.picStyle.picUrl;
|
||||
|
||||
var str = this.picStyle.note?await this.$commonJS.decodeHtml(this.picStyle.note):'';
|
||||
var titleStr = this.picStyle.title?await this.$commonJS.decodeHtml(this.picStyle.title):"";
|
||||
var str = this.picStyle1.note ? await this.$commonJS.decodeHtml(this.picStyle1.note) : '';
|
||||
var titleStr = this.picStyle1.title ? await this.$commonJS.decodeHtml(this.picStyle1.title) : '';
|
||||
if (this.picStyle.visiTitle == 'Edit Figure') {
|
||||
this.$api
|
||||
.post(this.urlList.editImage, {
|
||||
@@ -1760,25 +1761,26 @@ export default {
|
||||
}
|
||||
};
|
||||
var cleanedTableList = content.table ? content.table : [];
|
||||
console.log('content at line 998:', content);
|
||||
console.log('content at line 998:', this.lineStyle);
|
||||
|
||||
cleanedTableList = cleanTableData(content.table);
|
||||
var strTitle = this.lineStyle.title;
|
||||
strTitle = await this.$commonJS.decodeHtml(strTitle);
|
||||
var strTitle = this.lineStyle1.title? this.lineStyle1.title : '';
|
||||
|
||||
var strNote = this.lineStyle.note;
|
||||
var strNote = this.lineStyle1.note? this.lineStyle1.note : '';
|
||||
if (strNote != '') {
|
||||
strNote = await this.$commonJS.decodeHtml(strNote);
|
||||
}
|
||||
|
||||
if (strTitle != '') {
|
||||
strTitle = await this.$commonJS.decodeHtml(strTitle);
|
||||
}
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
if (content && cleanedTableList && cleanedTableList.length > 0) {
|
||||
if (this.lineStyle.visiTitle == 'Edit Table') {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
this.$api
|
||||
.post(this.urlList.editTable, {
|
||||
amt_id: this.lineStyle.amt_id,
|
||||
@@ -1811,14 +1813,15 @@ export default {
|
||||
article_id: this.articleId,
|
||||
table_data: JSON.stringify(cleanedTableList),
|
||||
html_data: content.html_data,
|
||||
note: this.lineStyle.note,
|
||||
title: this.lineStyle.title
|
||||
note: strNote,
|
||||
title: strTitle
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('Successfully Add Table!');
|
||||
this.threeVisible = false;
|
||||
this.getDate();
|
||||
loading.close();
|
||||
this.$refs.commonWordHtmlTypeSetting.refresh('table');
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
|
||||
Reference in New Issue
Block a user