@@ -230,10 +230,6 @@
Html Layout :
< span style = "margin-left: 15px;color: #666;" v-if = "UpHtpFIle.mains==''" > No Layout < / span >
< span style = "margin-left: 15px;color: #0b4b6a;" v-if = "UpHtpFIle.mains!=''" > Typesetting completed < / span >
< ! - - < el -button v-if = "UpHtpFIle.mains==''" type="text" plain icon="el-icon-document-copy" @click="showCreateHtmlItem()"
style = "margin-left: 20px;" >
< font > Create Html Proofread < / font >
< / el-button > -- >
< el -button v-if = "UpHtpFIle.mains!=''" type="primary" plain icon="el-icon-document-copy" @click="htmlLayout()"
style = "margin-left: 20px;" >
< font > Edit Html Proofread < / font >
@@ -242,12 +238,15 @@
< div >
<!-- 生成选项 -- >
< div v-if = "UpHtpFIle.mains==''" >
< el -radio v-model = "createType" label="1" > 使用稿件最终版生成html < / el -radio >
< el-radio v-model = "createType" label="2" > 重新上传word文件生成html < / el -radio >
<!-- 方式是重新上传 , 且没有上传文件时 , 按钮不可用 -- >
< el-button type = "primary" @click ="htmlLayout" class = "import" v-if = "createType=='2' && fileL_manuscirpt != '' || createType=='1'" > Create Html Proofread < / el -button >
< 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 style = "margin: 20px 0 0 0" v-if = "createType == '1'" >
< el -button type = "primary" @click ="htmlLayout" class = "import" > Create Html Proofread < / el-button >
< / div >
<!-- 文件上传 -- >
< div 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" :action = "upload_manuscirpt"
accept = ".docx" name = "completedManuscirpt" :before-upload = "beforeupload_manuscirpt"
:on-error = "uperr_coverLetter" :on-success = "upSuccess_manuscirpt" :limit = "1"
@@ -260,28 +259,28 @@
Only Word and compressed files can be uploaded ( file format : . docx ) .
< / div > -- >
< / el-upload >
< el-button type = "primary" @click ="htmlLayout" class = "import" > Create Html Proofread < / el-button >
< / div >
<!-- end -- >
< / div >
<!-- end -- >
< div class = "titHtml" v-if = "UpHtpFIle.mains!=''" >
< div v-for = "(item,index) in UpHtpFIle.mains" >
< div v-for = "(item,index) in UpHtpFIle.mains" :key="index" >
< p v-html = "item.content" v-if="item.width==0" > < / p >
< p v-if = "item.width!=0" class="MaxPicture" >
< img :src = "baseUrl+'public/mainimg/'+item.content" :style = "'width:'+item.width+'px'" >
< font :style = "'width:'+item.width+'px'" > { { item . note } }
< / font >
< font :style = "'width:'+item.width+'px'" > { { item . note } } < / font >
< / p >
< / div >
< / div > < / div >
< / div >
< / div >
< / el-collapse-item >
< el-collapse-item name = "references" >
< template slot = "title" >
References :
< span style = "margin-left: 15px;color: #666;" v-if = "UpHtpFIle.refers==''" > Have no refernces < / span >
< span style = "margin-left: 15px;color: #0b4b6a;" v-if = "UpHtpFIle.refers!=''" > There are {{ UpHtpFIle.refers.length }} pieces of data in total. < / span >
< el -button type = "primary" plain icon = "el-icon-document-copy" @click ="goEditRefernces"
< el -button type = "primary" plain icon = "el-icon-document-copy" @click ="goEditRefernces" @click.stop
style = "margin-left: 20px;" >
< font > Edit References < / font >
< / el-button >
@@ -336,7 +335,7 @@ import { watch } from 'vue';
return {
articleId : null ,
createType : '1' , // html生成方式
collapseActiveNames : [ 'html' ] , // 手风琴绑定值
collapseActiveNames : [ ] , // 手风琴绑定值
// oldFile:false, // 是否用新文件生成
fileL _manuscirpt : [ ] ,
baseUrl : this . Common . baseUrl ,
@@ -449,10 +448,6 @@ import { watch } from 'vue';
this . collapseActiveNames = [ 'html' ]
} ,
showCreateHtmlItem ( ) {
this . collapseActiveNames [ 0 ] = 'html'
//console.log(this.collapseActiveNames)
} ,
beforeupload _manuscirpt ( file ) {
let flieArr = file . name . split ( "." )
let fileSuffix = flieArr [ flieArr . length - 1 ] ;
@@ -916,9 +911,20 @@ import { watch } from 'vue';
} ,
} ,
// watch:{
watch: {
HtmlVisible : {
handler ( newVal , oldVal ) {
if ( this . UpHtpFIle . mains == '' && newVal == true ) { //打开赋值
this . collapseActiveNames . push ( 'html' )
} else { // 关闭清空
this . collapseActiveNames = [ ]
}
} ,
deep : true // 可以深度检测到 person 对象的属性值的变化
} ,
// collapseActiveNames : {
// handler(newVal, oldVal) {
// console.log(newVal, '新传入的值')
// this.$nextTick(()=>{
// this.oldFile = newVal.find((item)=>{item.name===''});
// })
@@ -926,7 +932,7 @@ import { watch } from 'vue';
// // immediate: true,
// deep: true // 可以深度检测到 person 对象的属性值的变化
// }
// }
}
} ;
< / script >
@@ -936,7 +942,7 @@ import { watch } from 'vue';
. up _newstyle {
margin - left : 10 px ;
}
. up . up _newstyle { margin - left : 0 ; margin - bottom : 15 px ; }
/ deep / . el - upload -- text {
background - color : # ecf5ff ;
border : 1 px solid # b3d8ff ! important ;