fix 页码从正文开始从1计数

This commit is contained in:
赵霄
2023-09-22 10:56:46 +08:00
parent f10ace9813
commit d6ed62e6a6
+14 -2
View File
@@ -509,9 +509,10 @@ export default {
let oFooter1 = oNextSection.GetFooter('default', true) let oFooter1 = oNextSection.GetFooter('default', true)
const oParagraph20Footer = oFooter1.GetElement(0) const oParagraph20Footer = oFooter1.GetElement(0)
// oParagraph20Footer.AddText(Asc.scope.standCode); // oParagraph20Footer.AddText(Asc.scope.standCode);
oParagraph20Footer.AddPageNumber()
oParagraph20Footer.SetPosition(3) oParagraph20Footer.SetPosition(3)
oParagraph20Footer.SetJc('right') oParagraph20Footer.SetJc('right')
oParagraph20Footer.AddPageNumber() // oParagraph20Footer.AddPageNumber()
// Api.asc_SetSectionStartPage(1) // Api.asc_SetSectionStartPage(1)
const oParagraphTwo = Api.CreateParagraph() const oParagraphTwo = Api.CreateParagraph()
@@ -1286,11 +1287,22 @@ export default {
} }
}) })
setTimeout(() => { setTimeout(() => {
this.reorderSort()
this.equationOne() this.equationOne()
this.replaceData() this.replaceData()
}, 500) }, 500)
}, },
reorderSort(){
this.ctx.callCommand(() => {
try {
Api.GoToFooter(1)
Api.asc_SetSectionStartPage(1)
Api.GoToFooter(4)
Api.asc_SetSectionStartPage(1)
Api.ExitHeader_Footer(4)
} catch (e) {}
})
},
replaceData () { replaceData () {
Asc.scope.standCode = this.form.standCode Asc.scope.standCode = this.form.standCode
Asc.scope.replaceStandCode = this.form.dtqbbhbuss Asc.scope.replaceStandCode = this.form.dtqbbhbuss