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