online 增加html
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
<div v-for="(item, index) in item.articles" class="actList">
|
||||
<span>{{ item.npp }}.</span>
|
||||
<font @click="lookView(item)">{{ item.title }}</font>
|
||||
<el-button style="margin-left: 20px;padding: 4px 10px !important;" size="mini" type="primary" plain icon="el-icon-notebook-2" @click="htmlContet(item)"> Html</el-button>
|
||||
<!-- <span style="margin-left: 30px;color: #aaa;">sort:</span>
|
||||
<b class="sort">{{item.sort}}</b>
|
||||
<i class="el-icon-edit ediCon" @click="changSort(item)"></i> -->
|
||||
@@ -73,6 +74,8 @@
|
||||
<div style="float: left; width: calc(100% - 140px)">
|
||||
<span>{{ index + 1 }}.</span>
|
||||
<font @click="lookView(item)">{{ item.title }}</font>
|
||||
<el-button style="margin-left: 20px;padding: 4px 10px !important;" size="mini" type="primary" plain icon="el-icon-notebook-2" @click="htmlContet(item)"> Html</el-button>
|
||||
|
||||
</div>
|
||||
|
||||
<el-button @click="Chukan0(item)" type="warning" plain size="mini" style="float: right"> Issue in advance </el-button>
|
||||
@@ -119,11 +122,16 @@
|
||||
<p style="font-size: 16px; margin: 20px 0 50px 0">Successfully uploaded the database!</p>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<commonHtml ref="htmlRef"></commonHtml>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Loading, Select } from 'element-ui';
|
||||
import commonHtml from '@/components/page/components/html/index.vue';
|
||||
export default {
|
||||
components:{
|
||||
commonHtml
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseUrl: this.Common.baseUrl,
|
||||
@@ -178,8 +186,15 @@ export default {
|
||||
this.getDate();
|
||||
},
|
||||
methods: {
|
||||
htmlContet(data){
|
||||
console.log('data at line 189:', data)
|
||||
this.$nextTick((e)=>{
|
||||
this.$refs.htmlRef.htmlContet(data)
|
||||
})
|
||||
|
||||
},
|
||||
// 获取数据
|
||||
getDate() {
|
||||
getDate() {console.log('at line 189:',localStorage.getItem('U_pointJour') )
|
||||
this.$api
|
||||
.post('api/Article/getJournal', {
|
||||
// username: this.query.username
|
||||
@@ -187,6 +202,7 @@ export default {
|
||||
.then((res) => {
|
||||
this.jourList = res;
|
||||
if (localStorage.getItem('U_pointJour') == null) {
|
||||
|
||||
this.query.issn = this.jourList[0].issn;
|
||||
|
||||
this.currentJournal = this.jourList[0];
|
||||
@@ -196,6 +212,8 @@ export default {
|
||||
this.getNoralDate0();
|
||||
}
|
||||
} else {
|
||||
var info=this.jourList.find(e=>e.journal_id==localStorage.getItem('U_pointJour'))
|
||||
this.query.issn = info.issn;
|
||||
if (this.currentJournal.cycle != 0) {
|
||||
this.getNoralDate();
|
||||
} else {
|
||||
|
||||
@@ -270,24 +270,42 @@
|
||||
<template slot="title">
|
||||
Html Layout :
|
||||
<span style="margin-left: 15px; color: #666" v-if="mains == ''">No Layout</span>
|
||||
<el-button type="primary" @click="htmlLayout2('creat')" style="margin-left: 20px" class="import" v-if="mains == ''"
|
||||
>Create Html Proofread</el-button
|
||||
>
|
||||
<span style="margin-left: 15px; color: #0b4b6a" v-if="mains != ''">Typesetting completed</span>
|
||||
<el-button
|
||||
v-if="mains != ''"
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-document-copy"
|
||||
@click.stop
|
||||
@click="html_type == 2 ? htmlLayout2() : htmlLayout()"
|
||||
@click="htmlLayout2('creat')"
|
||||
style="margin-left: 20px"
|
||||
class="import"
|
||||
v-if="mains == ''"
|
||||
>Create Html Proofread</el-button
|
||||
>
|
||||
<font>Edit Html Proofread</font>
|
||||
</el-button>
|
||||
<el-button
|
||||
<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"
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-document-copy"
|
||||
@click.stop
|
||||
@click=" htmlLayout2()"
|
||||
style="margin-left: 20px"
|
||||
>
|
||||
<font>Edit Html Proofread</font>
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="html_type != 2"
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-document-copy"
|
||||
@click.stop
|
||||
@click="htmlLayout()"
|
||||
style="margin-left: 20px"
|
||||
>
|
||||
<font>Edit Html Proofread</font>
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
v-if="mains != ''&&html_type == 0"
|
||||
<el-button
|
||||
v-if="mains != '' && html_type == 0"
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-document-copy"
|
||||
@@ -306,13 +324,13 @@
|
||||
>Create Html Proofread</el-button
|
||||
>
|
||||
</div> -->
|
||||
<!-- <el-radio v-model="createType" label="1">Use last manuscirpt version</el-radio>
|
||||
<!-- <el-radio v-model="createType" label="1">Use last manuscirpt version</el-radio>
|
||||
<el-radio v-model="createType" label="2">Use new file upload</el-radio> -->
|
||||
|
||||
<!-- 使用默认最新稿件生成 -->
|
||||
|
||||
<!-- 文件上传 -->
|
||||
<!-- <div class="up" style="margin: 20px 0 0 0" v-if="createType == '2'">
|
||||
<!-- 使用默认最新稿件生成 -->
|
||||
|
||||
<!-- 文件上传 -->
|
||||
<!-- <div class="up" style="margin: 20px 0 0 0" v-if="createType == '2'">
|
||||
<el-upload
|
||||
ref="uploadFile"
|
||||
class="upload-demo up_newstyle"
|
||||
@@ -334,11 +352,11 @@
|
||||
</el-upload>
|
||||
<el-button type="primary" @click="htmlLayout" class="import">Create Html Proofread</el-button>
|
||||
</div> -->
|
||||
<!-- end -->
|
||||
<!-- end -->
|
||||
<!-- </div> -->
|
||||
<!-- end -->
|
||||
|
||||
<div class="titHtml" v-if="mains != '' && html_type != 2" style="height: 50vh;overflow-y: auto;">
|
||||
<div class="titHtml" v-if="mains != '' && html_type != 2" style="height: 50vh; overflow-y: auto">
|
||||
<div v-for="(item, index) in mains" :key="index">
|
||||
<p v-html="item.content" v-if="item.width == 0"></p>
|
||||
<p v-if="item.width != 0" class="MaxPicture">
|
||||
@@ -427,6 +445,7 @@ import { watch } from 'vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tg_article_id: 0,
|
||||
html_type: null,
|
||||
htmlContent: '',
|
||||
wordStyle: `
|
||||
@@ -986,7 +1005,7 @@ export default {
|
||||
//批注
|
||||
let contentHtml = '';
|
||||
var isRemark = ``;
|
||||
|
||||
|
||||
// 判断是否是图片
|
||||
if (item.type == 1) {
|
||||
var extension = item.image.url.split('.').pop().toLowerCase();
|
||||
@@ -1084,21 +1103,19 @@ export default {
|
||||
this.$api
|
||||
.post('api/Publish/getHtmlForType2', {
|
||||
article_id: this.articleId
|
||||
|
||||
})
|
||||
.then((res) => {
|
||||
this.loadHtml = false;
|
||||
if (res.code == 0) {
|
||||
// console.log(res,'res')
|
||||
|
||||
|
||||
this.mains = '';
|
||||
if( res.data.list.length>0){
|
||||
if (res.data.list.length > 0) {
|
||||
this.mains = res.data.list;
|
||||
this.getWord();
|
||||
}else{
|
||||
} else {
|
||||
this.mains = '';
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
@@ -1112,13 +1129,9 @@ export default {
|
||||
this.$api
|
||||
.post('api/Publish/createHtmlForType2', {
|
||||
article_id: this.articleId
|
||||
|
||||
})
|
||||
.then((res) => {
|
||||
|
||||
})
|
||||
.then((res) => {})
|
||||
.catch((err) => {
|
||||
|
||||
this.$message.error(err);
|
||||
});
|
||||
},
|
||||
@@ -1141,8 +1154,8 @@ export default {
|
||||
},
|
||||
// 文章html弹出层
|
||||
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;
|
||||
|
||||
@@ -1156,24 +1169,20 @@ export default {
|
||||
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) {
|
||||
|
||||
|
||||
if (this.html_type == 2) {
|
||||
if (e.has_html == 1) {
|
||||
await this.getMainsInfo2();
|
||||
|
||||
this.HtmlVisible = true;
|
||||
} else {
|
||||
this.mains=''
|
||||
this.mains = '';
|
||||
this.HtmlVisible = true;
|
||||
|
||||
}
|
||||
|
||||
}else{
|
||||
} else {
|
||||
await this.getMainsInfo(e);
|
||||
this.HtmlVisible = true;
|
||||
this.HtmlVisible = true;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
// 生成html
|
||||
@@ -1197,23 +1206,23 @@ export default {
|
||||
// })
|
||||
// },
|
||||
// 修改文章html
|
||||
async htmlLayout2(type) {
|
||||
|
||||
async htmlLayout2(type) {
|
||||
if (type == 'creat') {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
await this.creatMains();
|
||||
await this.getMainsInfo2();
|
||||
loading.close();
|
||||
} else { this.HtmlVisible=false
|
||||
lock: true,
|
||||
text: 'Loading...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
await this.creatMains();
|
||||
await this.getMainsInfo2();
|
||||
loading.close();
|
||||
} else {
|
||||
this.HtmlVisible = false;
|
||||
this.$router.push({
|
||||
path: '/GenerateCharts',
|
||||
query: {
|
||||
id: this.articleId
|
||||
id: this.tg_article_id
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
1325
src/components/page/components/html/index.vue
Normal file
1325
src/components/page/components/html/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user