update 新制定前言,最后边的“本文起草人...”应另起一行。

This commit is contained in:
赵霄
2023-09-05 10:55:32 +08:00
parent ddcce79cba
commit 596c31f83c
+38 -41
View File
@@ -44,28 +44,28 @@
<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"
@submit="handleInitModalConfirm"> @submit="handleInitModalConfirm">
<a-form-item label="企标编号"> <a-form-item label="企标编号">
<a-input v-model="form.standCode" placeholder="请填写企标编号"/> <a-input v-model="form.standCode" placeholder="请填写企标编号" />
</a-form-item> </a-form-item>
<a-form-item label="代替企标编号"> <a-form-item label="代替企标编号">
<a-input v-model="form.replaceStandCode" placeholder="请填写代替企标编号"/> <a-input v-model="form.replaceStandCode" placeholder="请填写代替企标编号" />
</a-form-item> </a-form-item>
<a-form-item label="标准中文名称"> <a-form-item label="标准中文名称">
<a-input v-model="form.standCNName" placeholder="请填写标准中文名称"/> <a-input v-model="form.standCNName" placeholder="请填写标准中文名称" />
</a-form-item> </a-form-item>
<a-form-item label="标准英文名称"> <a-form-item label="标准英文名称">
<a-input v-model="form.standENName" placeholder="请填写标准英文名称"/> <a-input v-model="form.standENName" placeholder="请填写标准英文名称" />
</a-form-item> </a-form-item>
<a-form-item label="发布日期"> <a-form-item label="发布日期">
<el-date-picker v-model="form.issueDate" placeholder="请选择发布日期"/> <el-date-picker v-model="form.issueDate" placeholder="请选择发布日期" />
</a-form-item> </a-form-item>
<a-form-item label="实施日期"> <a-form-item label="实施日期">
<el-date-picker v-model="form.impDate" placeholder="请选择实施日期"/> <el-date-picker v-model="form.impDate" placeholder="请选择实施日期" />
</a-form-item> </a-form-item>
<a-form-item label="主要起草人"> <a-form-item label="主要起草人">
<a-input v-model="form.primaryDrafter" placeholder="请填写主起草人"/> <a-input v-model="form.primaryDrafter" placeholder="请填写主起草人" />
</a-form-item> </a-form-item>
<a-form-item label="起草部门"> <a-form-item label="起草部门">
<a-input v-model="form.drafterDeptName" placeholder="请填写主起草人"/> <a-input v-model="form.drafterDeptName" placeholder="请填写主起草人" />
</a-form-item> </a-form-item>
</a-form-model> </a-form-model>
</a-modal> </a-modal>
@@ -73,9 +73,9 @@
</template> </template>
<script> <script>
import {BORDER_DISABLE} from '@/config' import { BORDER_DISABLE } from '@/config'
import moment from 'moment' import moment from 'moment'
import {imageSvg} from '@/pages/page1/common/image' import { imageSvg } from '@/pages/page1/common/image'
const debounce = function (fn, delay) { const debounce = function (fn, delay) {
let timer = null let timer = null
@@ -92,7 +92,7 @@ const debounce = function (fn, delay) {
} }
export default { export default {
data() { data () {
return { return {
initModalVisible: false, initModalVisible: false,
form: {}, form: {},
@@ -101,8 +101,8 @@ export default {
isDisplay: false, isDisplay: false,
num: 0, num: 0,
formItemLayout: { formItemLayout: {
labelCol: {span: 6}, labelCol: { span: 6 },
wrapperCol: {span: 14} wrapperCol: { span: 14 }
}, },
numData: { numData: {
1: 'A', 1: 'A',
@@ -138,7 +138,7 @@ export default {
/** /**
* 企标文件初始化 * 企标文件初始化
**/ **/
handleInitModalConfirm() { handleInitModalConfirm () {
const replaceForm = JSON.parse(JSON.stringify(this.form)) const replaceForm = JSON.parse(JSON.stringify(this.form))
// 日期转换 // 日期转换
replaceForm.issueDate = moment(replaceForm.issueDate).format('YYYY-MM-DD') replaceForm.issueDate = moment(replaceForm.issueDate).format('YYYY-MM-DD')
@@ -212,8 +212,8 @@ export default {
this.initModalVisible = false this.initModalVisible = false
}, },
// 创建封面 // 创建封面
handleCreateCover() { handleCreateCover () {
Asc.scope.standCode = this.form.standCode || 'Q/ZZ xxxx-xxxx'; Asc.scope.standCode = this.form.standCode || 'Q/ZZ xxxx-xxxx'
Asc.scope.replaceStandCode = this.form.dtqbbhbuss || 'Q/ZZ xxxx-xxxx' Asc.scope.replaceStandCode = this.form.dtqbbhbuss || 'Q/ZZ xxxx-xxxx'
Asc.scope.standCNName = this.form.standName || 'xx' Asc.scope.standCNName = this.form.standName || 'xx'
Asc.scope.standENName = this.form.standEnName || 'xx' Asc.scope.standENName = this.form.standEnName || 'xx'
@@ -315,7 +315,6 @@ export default {
oParagraph4.SetBold(false) oParagraph4.SetBold(false)
oDocument.InsertContent([oParagraph4]) oDocument.InsertContent([oParagraph4])
const oParagraphOne = Api.CreateParagraph() const oParagraphOne = Api.CreateParagraph()
const oInlineLvlSdtStandCodeOne = Api.CreateInlineLvlSdt() const oInlineLvlSdtStandCodeOne = Api.CreateInlineLvlSdt()
oInlineLvlSdtStandCodeOne.SetAlias('foton.replaceStandCode') oInlineLvlSdtStandCodeOne.SetAlias('foton.replaceStandCode')
@@ -536,7 +535,7 @@ export default {
}, 500) }, 500)
}, },
equationClick() { equationClick () {
// this.isTrue = !this.isTrue // this.isTrue = !this.isTrue
this.ctx.callCommand(() => { this.ctx.callCommand(() => {
try { try {
@@ -669,7 +668,7 @@ export default {
}) })
}, },
//双面排版 //双面排版
doubleSided() { doubleSided () {
this.isTrue = !this.isTrue this.isTrue = !this.isTrue
Asc.scope.isTrue = this.isTrue Asc.scope.isTrue = this.isTrue
this.ctx.callCommand(() => { this.ctx.callCommand(() => {
@@ -716,7 +715,7 @@ export default {
}, },
//封面左上角 //封面左上角
catalogueClick() { catalogueClick () {
this.ctx.callCommand(() => { this.ctx.callCommand(() => {
try { try {
const oDocument = Api.GetDocument() const oDocument = Api.GetDocument()
@@ -749,7 +748,7 @@ export default {
}, },
//终结线 //终结线
terminationLine() { terminationLine () {
this.ctx.callCommand(() => { this.ctx.callCommand(() => {
try { try {
// DE.controllers.Toolbar.api.put_LineEndSize() // DE.controllers.Toolbar.api.put_LineEndSize()
@@ -768,7 +767,7 @@ export default {
}) })
}, },
// 目次 // 目次
handleInitDirectory() { handleInitDirectory () {
this.ctx.callCommand(() => { this.ctx.callCommand(() => {
try { try {
const oDocument = Api.GetDocument() const oDocument = Api.GetDocument()
@@ -804,7 +803,7 @@ export default {
}) })
}, },
// 初始化前言 // 初始化前言
handleInitForeword() { handleInitForeword () {
window.Asc.scope.BORDER_DISABLE = BORDER_DISABLE window.Asc.scope.BORDER_DISABLE = BORDER_DISABLE
this.ctx.callCommand(() => { this.ctx.callCommand(() => {
try { try {
@@ -844,7 +843,6 @@ export default {
oParagraph2.SetBold(false) oParagraph2.SetBold(false)
oDocument.InsertContent([oParagraph2]) oDocument.InsertContent([oParagraph2])
for (let i = 0; i < 2; i++) { for (let i = 0; i < 2; i++) {
let text = '' let text = ''
switch (i) { switch (i) {
@@ -971,7 +969,7 @@ export default {
/** /**
* 初始化前言,仅包含前言两个字,下面的内容由客户选择创建 * 初始化前言,仅包含前言两个字,下面的内容由客户选择创建
*/ */
initForeword() { initForeword () {
window.Asc.scope.BORDER_DISABLE = BORDER_DISABLE window.Asc.scope.BORDER_DISABLE = BORDER_DISABLE
this.ctx.callCommand(() => { this.ctx.callCommand(() => {
try { try {
@@ -1012,7 +1010,7 @@ export default {
}, 500) }, 500)
}, },
// 初始化正文 // 初始化正文
handleInit() { handleInit () {
window.Asc.scope.BORDER_DISABLE = BORDER_DISABLE window.Asc.scope.BORDER_DISABLE = BORDER_DISABLE
Asc.scope.standCNName = this.form.standName Asc.scope.standCNName = this.form.standName
Asc.scope.standCode = this.form.standCode || 'x/xx xxxx-xxxx' Asc.scope.standCode = this.form.standCode || 'x/xx xxxx-xxxx'
@@ -1205,7 +1203,7 @@ export default {
}, 500) }, 500)
}, },
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
Asc.scope.standCNName = this.form.standName Asc.scope.standCNName = this.form.standName
@@ -1336,7 +1334,6 @@ export default {
oHeader2Text.GetElement(0).SetPosition(-4) oHeader2Text.GetElement(0).SetPosition(-4)
oHeader2Text.GetElement(0).SetJc('right') oHeader2Text.GetElement(0).SetJc('right')
let oHeaderTextOne = oSectionOne.GetHeader('even', true) let oHeaderTextOne = oSectionOne.GetHeader('even', true)
const oParagraphTextOne = oHeaderTextOne.GetElement(0) const oParagraphTextOne = oHeaderTextOne.GetElement(0)
let oHeader2TextOne = oSectionOne.GetHeader('default', true) let oHeader2TextOne = oSectionOne.GetHeader('default', true)
@@ -1347,7 +1344,6 @@ export default {
oHeaderTextOne.GetElement(0).SetPosition(-4) oHeaderTextOne.GetElement(0).SetPosition(-4)
oHeaderTextOne.GetElement(0).SetJc('left') oHeaderTextOne.GetElement(0).SetJc('left')
oParagraph20TextOne.Delete() oParagraph20TextOne.Delete()
oHeader2TextOne.GetElement(0).AddText(Asc.scope.standCode) oHeader2TextOne.GetElement(0).AddText(Asc.scope.standCode)
oHeader2TextOne.GetElement(0).SetPosition(-4) oHeader2TextOne.GetElement(0).SetPosition(-4)
@@ -1366,7 +1362,7 @@ export default {
} }
}, },
getYearMonth(date) { getYearMonth (date) {
date = (date + '').split(/[ ]+/) date = (date + '').split(/[ ]+/)
let result = [] let result = []
let reg = /^(\d{4})-(\d{1,2})-(\d{1,2})$/ let reg = /^(\d{4})-(\d{1,2})-(\d{1,2})$/
@@ -1379,7 +1375,7 @@ export default {
}, },
//创建发布认可章 //创建发布认可章
addSeal() { addSeal () {
if (this.form.issueTime) { if (this.form.issueTime) {
let getYearMonth = this.getYearMonth(this.form.issueTime) let getYearMonth = this.getYearMonth(this.form.issueTime)
Asc.scope.year = getYearMonth[0] Asc.scope.year = getYearMonth[0]
@@ -1471,7 +1467,7 @@ export default {
}, },
// 创建空行 // 创建空行
handleInsertRow() { handleInsertRow () {
window.Asc.scope.BORDER_DISABLE = BORDER_DISABLE window.Asc.scope.BORDER_DISABLE = BORDER_DISABLE
this.ctx.callCommand(() => { this.ctx.callCommand(() => {
try { try {
@@ -1535,7 +1531,7 @@ export default {
}, },
// 创建内容控件 // 创建内容控件
handleInsertControl(control) { handleInsertControl (control) {
Asc.scope.alias = control.key Asc.scope.alias = control.key
this.ctx.callCommand(() => { this.ctx.callCommand(() => {
try { try {
@@ -1684,7 +1680,7 @@ export default {
/** /**
* 数据替换 * 数据替换
*/ */
handleReplace() { handleReplace () {
this.initModalVisible = true this.initModalVisible = true
}, },
equationOne: debounce(function () { equationOne: debounce(function () {
@@ -1712,7 +1708,7 @@ export default {
let text = list[i].GetText() let text = list[i].GetText()
text = text.replace(/\s*/g, '') text = text.replace(/\s*/g, '')
text = text.substring(0, 2) text = text.substring(0, 2)
oDocument.SearchAndReplace({'searchString': '附 录 ', 'replaceString': text}) oDocument.SearchAndReplace({ 'searchString': '附 录 ', 'replaceString': text })
list[i].SetPosition(0) list[i].SetPosition(0)
} }
if (list[i].GetIndLeft() == 283) { if (list[i].GetIndLeft() == 283) {
@@ -1745,7 +1741,7 @@ export default {
/** /**
* 添加新制定标准化文件格式前言 * 添加新制定标准化文件格式前言
*/ */
addNewForeword() { addNewForeword () {
window.Asc.scope.BORDER_DISABLE = BORDER_DISABLE window.Asc.scope.BORDER_DISABLE = BORDER_DISABLE
this.ctx.callCommand(() => { this.ctx.callCommand(() => {
try { try {
@@ -1759,7 +1755,8 @@ export default {
'本文件附录A为规范性附录,附录B为资料性附录。(如有附录,则需在前言中提及)', '本文件附录A为规范性附录,附录B为资料性附录。(如有附录,则需在前言中提及)',
'本文件由中国重型汽车集团有限公司提出。', '本文件由中国重型汽车集团有限公司提出。',
'本文件由中国重型汽车集团有限公司汽车研究总院归口。', '本文件由中国重型汽车集团有限公司汽车研究总院归口。',
'本文件起草单位:中国重型汽车集团有限公司汽车研究总院。本文件主要起草人:xx、XX。' '本文件起草单位:中国重型汽车集团有限公司汽车研究总院。',
'本文件主要起草人:xx、XX。'
] ]
} }
/** /**
@@ -1814,7 +1811,7 @@ export default {
/** /**
* 添加修订标准化文件格式前言 * 添加修订标准化文件格式前言
*/ */
addReviseForeword() { addReviseForeword () {
window.Asc.scope.BORDER_DISABLE = BORDER_DISABLE window.Asc.scope.BORDER_DISABLE = BORDER_DISABLE
this.ctx.callCommand(() => { this.ctx.callCommand(() => {
try { try {
@@ -1911,7 +1908,7 @@ export default {
}) })
} }
}, },
created() { created () {
// 获取企标详情 // 获取企标详情
// this.$axios // this.$axios
// .get("/static/json/detail.json") // .get("/static/json/detail.json")
@@ -1926,8 +1923,8 @@ export default {
// }); // });
// this.initModalVisible = true; // this.initModalVisible = true;
}, },
mounted() { mounted () {
function param2Obj(url) { function param2Obj (url) {
const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ') const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
if (!search) { if (!search) {
return {} return {}