update 参考文献改为手动插入
This commit is contained in:
@@ -35,11 +35,15 @@
|
|||||||
<a-button @click="addReviseForeword">前言(修订标准)</a-button>
|
<a-button @click="addReviseForeword">前言(修订标准)</a-button>
|
||||||
</a-button-group>
|
</a-button-group>
|
||||||
|
|
||||||
<a-button-group v-if="!!form.processId">
|
<a-button-group v-if="!!form.processId" style="margin-bottom: 10px">
|
||||||
<a-button @click="addPublicationChapter">添加发布章</a-button>
|
<a-button @click="addPublicationChapter">添加发布章</a-button>
|
||||||
<a-button @click="insertSignatureInfo">插入签审信息</a-button>
|
<a-button @click="insertSignatureInfo">插入签审信息</a-button>
|
||||||
</a-button-group>
|
</a-button-group>
|
||||||
|
|
||||||
|
<a-button-group>
|
||||||
|
<a-button @click="initReferences">参考文献</a-button>
|
||||||
|
</a-button-group>
|
||||||
|
|
||||||
<!-- 企标基础信息读取 -->
|
<!-- 企标基础信息读取 -->
|
||||||
<a-modal v-model="initModalVisible" title="企标文件初始化" @ok="handleInitModalConfirm">
|
<a-modal v-model="initModalVisible" title="企标文件初始化" @ok="handleInitModalConfirm">
|
||||||
<a-form-model id="components-form-demo-validate-other" :model="form" v-bind="formItemLayout"
|
<a-form-model id="components-form-demo-validate-other" :model="form" v-bind="formItemLayout"
|
||||||
@@ -1126,6 +1130,16 @@ export default {
|
|||||||
oParagraph9.AddPageBreak()
|
oParagraph9.AddPageBreak()
|
||||||
oDocument.InsertContent([oParagraph9])
|
oDocument.InsertContent([oParagraph9])
|
||||||
|
|
||||||
|
// 插入终止线
|
||||||
|
const oParagraphLine = Api.CreateParagraph()
|
||||||
|
const oFill = Api.CreateSolidFill(Api.CreateRGBColor(0, 0, 0))
|
||||||
|
const oStroke = Api.CreateStroke(0, Api.CreateNoFill())
|
||||||
|
const oDrawing = Api.CreateShape('rect', 1810900, 19000, oFill, oStroke)
|
||||||
|
oParagraphLine.SetJc('center')
|
||||||
|
oParagraphLine.SetSpacingBefore(840)
|
||||||
|
oParagraphLine.AddDrawing(oDrawing)
|
||||||
|
oDocument.Push(oParagraphLine)
|
||||||
|
|
||||||
Api.GoToFooter(1)
|
Api.GoToFooter(1)
|
||||||
Api.asc_SetSectionStartPage(1)
|
Api.asc_SetSectionStartPage(1)
|
||||||
|
|
||||||
@@ -1150,7 +1164,6 @@ export default {
|
|||||||
let timer = setTimeout(() => {
|
let timer = setTimeout(() => {
|
||||||
this.initializeDirectory()
|
this.initializeDirectory()
|
||||||
this.replaceData()
|
this.replaceData()
|
||||||
this.initReferences()
|
|
||||||
clearTimeout(timer)
|
clearTimeout(timer)
|
||||||
timer = null
|
timer = null
|
||||||
}, 1600)
|
}, 1600)
|
||||||
@@ -2126,11 +2139,7 @@ export default {
|
|||||||
if (flag) {
|
if (flag) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 参考文献是在最后生成的,所以不需要和引言一样校验正文是否存在
|
DE.controllers.Toolbar.api.put_AddPageBreak()
|
||||||
const documentCount = oDocument.GetElementsCount()
|
|
||||||
// 获取文档最后一个段落
|
|
||||||
const lastParagraph = oDocument.GetElement(documentCount - 1)
|
|
||||||
// 参考文献标题文本
|
|
||||||
const oRunTitle = Api.CreateRun()
|
const oRunTitle = Api.CreateRun()
|
||||||
const oParagraphTitle = Api.CreateParagraph()
|
const oParagraphTitle = Api.CreateParagraph()
|
||||||
let oNewDocumentStyle = oDocument.GetStyle('Heading 1')
|
let oNewDocumentStyle = oDocument.GetStyle('Heading 1')
|
||||||
@@ -2148,8 +2157,7 @@ export default {
|
|||||||
oParagraphTitle.SetColor(0, 0, 0)
|
oParagraphTitle.SetColor(0, 0, 0)
|
||||||
oParagraphTitle.SetJc('center')
|
oParagraphTitle.SetJc('center')
|
||||||
oParagraphTitle.SetBold(false)
|
oParagraphTitle.SetBold(false)
|
||||||
lastParagraph.AddPageBreak()
|
oDocument.InsertContent([oParagraphTitle])
|
||||||
oDocument.Push(oParagraphTitle)
|
|
||||||
const text = '[1] GB/T 10112-1999 术语工作 原则与方法'
|
const text = '[1] GB/T 10112-1999 术语工作 原则与方法'
|
||||||
const contentParagraph = Api.CreateParagraph()
|
const contentParagraph = Api.CreateParagraph()
|
||||||
contentParagraph.AddText(text)
|
contentParagraph.AddText(text)
|
||||||
@@ -2158,16 +2166,8 @@ export default {
|
|||||||
contentParagraph.SetColor(0, 0, 0)
|
contentParagraph.SetColor(0, 0, 0)
|
||||||
contentParagraph.SetSpacingAfter(0)
|
contentParagraph.SetSpacingAfter(0)
|
||||||
contentParagraph.SetBold(false)
|
contentParagraph.SetBold(false)
|
||||||
oDocument.Push(contentParagraph)
|
oDocument.InsertContent([contentParagraph])
|
||||||
// 插入终止线
|
|
||||||
const oParagraphLine = Api.CreateParagraph()
|
|
||||||
const oFill = Api.CreateSolidFill(Api.CreateRGBColor(0, 0, 0))
|
|
||||||
const oStroke = Api.CreateStroke(0, Api.CreateNoFill())
|
|
||||||
const oDrawing = Api.CreateShape('rect', 1810900, 19000, oFill, oStroke)
|
|
||||||
oParagraphLine.SetJc('center')
|
|
||||||
oParagraphLine.SetSpacingBefore(840)
|
|
||||||
oParagraphLine.AddDrawing(oDrawing)
|
|
||||||
oDocument.Push(oParagraphLine)
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user