Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+15
-18
@@ -546,11 +546,12 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
}else{
|
||||
content = "Content";
|
||||
}
|
||||
String moth = lawsMonthlyReportWriteEOS.get(0).getMonth().replaceAll("-", "年") + "月";
|
||||
//单独设置每页右侧的时间
|
||||
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 12, false, true, "Microsoft YaHei UI");
|
||||
WordUtil.exportWord(document, content, null, ParagraphAlignment.LEFT, 0, 12, false, true, "Microsoft YaHei UI");
|
||||
//生成页眉页脚
|
||||
WordUtil.exportHeardAndFoot(document,lawsMonthlyReportWriteEOS.get(0).getMonth());
|
||||
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 18, false, false, "Blue Sky Noto Regular");
|
||||
WordUtil.exportWord(document, content, null, ParagraphAlignment.LEFT, 0, 12, false, true, "Blue Sky Noto Regular");
|
||||
//生成页脚
|
||||
WordUtil.exportHeardAndFootMain(document,moth);
|
||||
int oneCount = 1;
|
||||
|
||||
for (LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO : reportTitleOneList) {
|
||||
@@ -564,7 +565,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
oneTitle = lawsMonthlyReportTitleTemplateEO.getTitleEn();
|
||||
}
|
||||
if(StringUtils.isNotBlank(oneTitle)){
|
||||
WordUtil.exportWord(document, oneNumber+" "+oneTitle, null, ParagraphAlignment.LEFT, 0, 12, false, true, "Microsoft YaHei UI");
|
||||
WordUtil.exportWord(document, oneNumber+" "+oneTitle, null, ParagraphAlignment.LEFT, 0, 12, false, true, "Blue Sky Noto Regular");
|
||||
oneCount++;
|
||||
}
|
||||
|
||||
@@ -586,7 +587,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
twoTitle = monthlyReportTitleTemplateEO.getTitleEn();
|
||||
}
|
||||
if(StringUtils.isNotBlank(twoTitle)){
|
||||
WordUtil.exportWord(document, twoNumber+" "+twoTitle, null, ParagraphAlignment.LEFT, 2, 12, false, true, "Microsoft YaHei UI");
|
||||
WordUtil.exportWord(document, twoNumber+" "+twoTitle, null, ParagraphAlignment.LEFT, 2, 12, false, true, "Blue Sky Noto Regular");
|
||||
twoCount++;
|
||||
}
|
||||
|
||||
@@ -599,7 +600,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
reportTitle = lawsMonthlyReportWriteEO.getTitleEn();
|
||||
}
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(reportTitle)){
|
||||
WordUtil.exportWord(document, reportCount+". "+reportTitle, null, ParagraphAlignment.LEFT, 6, 10, false, false, "Microsoft YaHei UI");
|
||||
WordUtil.exportWord(document, reportCount+". "+reportTitle, null, ParagraphAlignment.LEFT, 6, 12, false, false, "Blue Sky Noto Regular");
|
||||
reportCount++;
|
||||
}
|
||||
}
|
||||
@@ -617,15 +618,11 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
|
||||
//树形数据字典
|
||||
List<SysCategory> categoryList = sysCategoryService.list();
|
||||
String content = "";
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
content = "主要内容";
|
||||
}else{
|
||||
content = "Content";
|
||||
}
|
||||
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 12, false, true, "Microsoft YaHei UI");
|
||||
String moth = lawsMonthlyReportWriteEOS.get(0).getMonth().replaceAll("-", "年") + "月";
|
||||
//生成页眉页脚
|
||||
WordUtil.exportHeardAndFoot(document,lawsMonthlyReportWriteEOS.get(0).getMonth());
|
||||
WordUtil.exportHeardAndFoot(document,moth);
|
||||
//生成标题
|
||||
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 18, false, true, "Blue Sky Noto Regular");
|
||||
int oneCount = 1;
|
||||
|
||||
for (LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO : reportTitleOneList) {
|
||||
@@ -639,7 +636,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
oneTitle = lawsMonthlyReportTitleTemplateEO.getTitleEn();
|
||||
}
|
||||
if(StringUtils.isNotBlank(oneTitle)){
|
||||
WordUtil.exportWord(document, oneNumber+" "+oneTitle, null, ParagraphAlignment.LEFT, 0, 12, false, true, "Microsoft YaHei UI");
|
||||
WordUtil.exportWord(document, oneNumber+" "+oneTitle, null, ParagraphAlignment.LEFT, 0, 14, false, true, "Blue Sky Noto Regular");
|
||||
oneCount++;
|
||||
}
|
||||
|
||||
@@ -661,7 +658,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
twoTitle = monthlyReportTitleTemplateEO.getTitleEn();
|
||||
}
|
||||
if(StringUtils.isNotBlank(twoTitle)){
|
||||
WordUtil.exportWord(document, twoNumber+" "+twoTitle, null, ParagraphAlignment.LEFT, 2, 12, false, true, "Microsoft YaHei UI");
|
||||
WordUtil.exportWord(document, twoNumber+" "+twoTitle, null, ParagraphAlignment.LEFT, 2, 12, false, true, "Blue Sky Noto Regular");
|
||||
twoCount++;
|
||||
}
|
||||
//二级目录下放--->新征求意见清单模板, 新发布标准清单模板
|
||||
@@ -686,7 +683,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
reportTitle = lawsMonthlyReportWriteEO.getTitleEn();
|
||||
}
|
||||
if(StringUtils.isNotBlank(reportTitle)){
|
||||
WordUtil.exportWord(document, reportCount+". "+reportTitle, null, ParagraphAlignment.LEFT, 6, 10, false, false, "Microsoft YaHei UI");
|
||||
WordUtil.exportWord(document, reportCount+". "+reportTitle, null, ParagraphAlignment.LEFT, 6, 11, false, false, "Blue Sky Noto Regular");
|
||||
}
|
||||
|
||||
|
||||
|
||||
+38
-4
@@ -224,15 +224,48 @@ public class WordUtil {
|
||||
if (sectPr == null) sectPr = document.getDocument().getBody().addNewSectPr();
|
||||
CTPageMar pageMar = sectPr.getPgMar();
|
||||
if (pageMar == null) pageMar = sectPr.addNewPgMar();
|
||||
pageMar.setLeft(BigInteger.valueOf(720)); //720 TWentieths of an Inch Point (Twips) = 720/20 = 36 pt = 36/72 = 0.5"
|
||||
pageMar.setRight(BigInteger.valueOf(720));
|
||||
pageMar.setTop(BigInteger.valueOf(1440)); //1440 Twips = 1440/20 = 72 pt = 72/72 = 1"
|
||||
pageMar.setBottom(BigInteger.valueOf(1440));
|
||||
pageMar.setLeft(BigInteger.valueOf(1000)); //左边距
|
||||
pageMar.setRight(BigInteger.valueOf(1000));//右边距
|
||||
pageMar.setTop(BigInteger.valueOf(1440)); //页眉高度
|
||||
pageMar.setBottom(BigInteger.valueOf(1440));//页脚高度
|
||||
|
||||
pageMar.setHeader(BigInteger.valueOf(500)); //页眉上边框到顶部的距离
|
||||
pageMar.setFooter(BigInteger.valueOf(800)); //页脚下边框到底部的距离
|
||||
}
|
||||
|
||||
/**
|
||||
* 主页面(只有页脚)
|
||||
* @param document
|
||||
* @param month
|
||||
*/
|
||||
@SneakyThrows
|
||||
public static void exportHeardAndFootMain(XWPFDocument document,String month){
|
||||
XWPFHeaderFooterPolicy headerFooterPolicy = document.getHeaderFooterPolicy();
|
||||
if (headerFooterPolicy == null) headerFooterPolicy = document.createHeaderFooterPolicy();
|
||||
// XWPFHeader header = headerFooterPolicy.createHeader(XWPFHeaderFooterPolicy.DEFAULT);
|
||||
// XWPFParagraph paragraph = header.createParagraph();//创建新的段落
|
||||
// XWPFRun run = paragraph.createRun();
|
||||
|
||||
XWPFFooter footer = headerFooterPolicy.createFooter(XWPFHeaderFooterPolicy.DEFAULT);
|
||||
XWPFParagraph paragraph = footer.createParagraph();
|
||||
paragraph.setAlignment(ParagraphAlignment.CENTER);
|
||||
XWPFRun run = paragraph.createRun();
|
||||
run.setText("NIO Internal");
|
||||
|
||||
|
||||
CTSectPr sectPr = document.getDocument().getBody().getSectPr();
|
||||
if (sectPr == null) sectPr = document.getDocument().getBody().addNewSectPr();
|
||||
CTPageMar pageMar = sectPr.getPgMar();
|
||||
if (pageMar == null) pageMar = sectPr.addNewPgMar();
|
||||
pageMar.setLeft(BigInteger.valueOf(1000)); //左边距
|
||||
pageMar.setRight(BigInteger.valueOf(1000));//右边距
|
||||
pageMar.setTop(BigInteger.valueOf(1440)); //页眉高度
|
||||
pageMar.setBottom(BigInteger.valueOf(1440));//页脚高度
|
||||
|
||||
pageMar.setHeader(BigInteger.valueOf(500)); //页眉上边框到顶部的距离
|
||||
pageMar.setFooter(BigInteger.valueOf(1200)); //页脚下边框到底部的距离
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出工具示例
|
||||
*
|
||||
@@ -628,6 +661,7 @@ public class WordUtil {
|
||||
}
|
||||
|
||||
private static void setCell(XWPFTableRow tableRow, String fieldName,String technologyTerritory) {
|
||||
|
||||
tableRow.setHeight(500);
|
||||
CTTblWidth ctTblWidth0 = tableRow.getCell(0).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth0.setType(STTblWidth.DXA);
|
||||
|
||||
+18
-4
@@ -42,7 +42,6 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="studioEngineerName">
|
||||
<PersonnelSelection :query="{db_field_name:'studioEngineer',db_field_txt:$t('authorizedUser')}"
|
||||
:isSingleChoice="true"
|
||||
:personneQuery="formInline"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="formInline.studioEngineerName"/>
|
||||
@@ -293,12 +292,22 @@
|
||||
getAction('/problemKnowledgeBase/problemKnowledgeBaseEO/queryById', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.formInline = res.result || {}
|
||||
this.formInline = { ...this.formInline }
|
||||
if (this.formInline.showPermissions == 'Privacy') {
|
||||
this.isDisplay = true
|
||||
if (this.formInline.permissionUserList && this.formInline.permissionUserList.length > 0) {
|
||||
let userId = []
|
||||
let userName = []
|
||||
this.formInline.permissionUserList.forEach(val => {
|
||||
userId.push(val.userId)
|
||||
userName.push(val.userName)
|
||||
})
|
||||
this.formInline.studioEngineerName = userName.join(',')
|
||||
this.formInline.studioEngineer = userId.join(',')
|
||||
}
|
||||
} else {
|
||||
this.isDisplay = false
|
||||
}
|
||||
this.formInline = { ...this.formInline }
|
||||
} else {
|
||||
this.formInline = {}
|
||||
}
|
||||
@@ -390,10 +399,13 @@
|
||||
this.loading = true
|
||||
this.confirmLoading = true
|
||||
let url = ''
|
||||
let Action
|
||||
if (this.formInline.id) {
|
||||
url = this.url.edit
|
||||
Action = putAction
|
||||
} else {
|
||||
url = this.url.add
|
||||
Action = postAction
|
||||
}
|
||||
formInline.permissionUserList = []
|
||||
if (formInline.showPermissions == 'Privacy') {
|
||||
@@ -404,12 +416,14 @@
|
||||
})
|
||||
})
|
||||
}
|
||||
postAction(url, formInline).then((res) => {
|
||||
Action(url, formInline).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.loading = false
|
||||
if (this.$route.query.id) {
|
||||
|
||||
this.$router.push({
|
||||
path: '/problemKnowledgeBaseRelease'
|
||||
})
|
||||
} else {
|
||||
this.$router.push({
|
||||
path: '/problemknowledgeBase'
|
||||
|
||||
+9
-3
@@ -6,7 +6,7 @@
|
||||
<span>{{$t('searchContent')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('searchContent')"
|
||||
v-model="searchContent"></a-input>
|
||||
v-model="searchStr"></a-input>
|
||||
<a-button class="box-button" type="primary" @click="onSearch">{{$t('query')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" @click="ResetSearch">{{$t('reset')}}</a-button>
|
||||
</div>
|
||||
@@ -76,6 +76,7 @@
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
||||
<classificationMaintenanceModel ref="classificationMaintenanceModelRef"/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -95,6 +96,7 @@
|
||||
checkboxText: [],
|
||||
conList: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
pageSize: 10,
|
||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||
pageNo: 1,
|
||||
@@ -112,7 +114,7 @@
|
||||
this.getList()
|
||||
},
|
||||
ResetSearch() {
|
||||
this.searchContent = ''
|
||||
this.searchStr = ''
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
@@ -148,14 +150,18 @@
|
||||
getList() {
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize
|
||||
pageSize: this.pageSize,
|
||||
searchStr: this.searchStr
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.getInfoList, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.conList = res.result.records
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.conList = []
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
+14
-6
@@ -57,12 +57,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, putAction } from '@/api/manage'
|
||||
import { getAction, postAction, putAction, deleteAction } from '@/api/manage'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'problemKnowledgeBaseRelease',
|
||||
@@ -72,11 +74,12 @@
|
||||
conList: [],
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
loading: false,
|
||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||
pageNo: 1,
|
||||
url: {
|
||||
getInfoList: 'search/document/getFullTextInfoList',
|
||||
deleteBatch: ''
|
||||
getInfoList: '/problemKnowledgeBase/problemKnowledgeBaseEO/page',
|
||||
deleteBatch: '/problemKnowledgeBase/problemKnowledgeBaseEO/deleteBatch'
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -84,6 +87,7 @@
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.getList()
|
||||
@@ -96,14 +100,18 @@
|
||||
getList() {
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize
|
||||
pageSize: this.pageSize,
|
||||
createBy: this.userInfo().username
|
||||
}
|
||||
postAction(this.url.getInfoList, query).then((res) => {
|
||||
this.loading = true
|
||||
getAction(this.url.getInfoList, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.conList = res.result.records
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.conList = []
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -131,7 +139,7 @@
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
onOk() {
|
||||
getAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
|
||||
deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
|
||||
Reference in New Issue
Block a user