Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+3
@@ -155,6 +155,9 @@ public class SarFileCompareInfoServiceImpl extends ServiceImpl<SarFileCompareInf
|
||||
double compareSimilarity = 0.0;
|
||||
if (null != leftTxt && !leftTxt.isEmpty()) {
|
||||
for (int j = 0; j < rightItemList.size(); j++) {
|
||||
if(null == rightItemList.get(j).getTargetStand()){
|
||||
rightItemList.get(j).setTargetStand(-1);
|
||||
}
|
||||
String rightTxt = rightItemList.get(j).getItemsText();
|
||||
if (null != rightTxt && !rightTxt.isEmpty()) {
|
||||
double similarity = CompHanLPUtils.findSimilarity(leftTxt.trim(), rightTxt.trim());
|
||||
|
||||
+3
@@ -2229,6 +2229,9 @@ public class DiffUtils {
|
||||
}
|
||||
|
||||
public List<String> getHtmlDiffStr(String text1,String text2){
|
||||
text1 = text1.replaceAll("<img.*\\>", "");
|
||||
text2 = text2.replaceAll("<img.*\\>", "");
|
||||
|
||||
LinkedList<Diff> diffs = diff_main(text1, text2);
|
||||
//定义输出结果
|
||||
String LResultStr="";
|
||||
|
||||
+1
-1
@@ -494,7 +494,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
os.close();
|
||||
fis.close();
|
||||
} catch (Exception e) {
|
||||
|
||||
e.printStackTrace();
|
||||
}finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
File file = new File(uploadpath + "/tempZip"+l);
|
||||
|
||||
+92
-54
@@ -28,17 +28,22 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFldChar;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTJc;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPageMar;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblLayoutType;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STFldCharType;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STJc;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblLayoutType;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblWidth;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class WordUtil {
|
||||
@@ -410,11 +415,12 @@ public class WordUtil {
|
||||
String stateName = dictItem(sysDictItems, state,cut, DictCodeReportEnum.STATE.getValue());
|
||||
String useMethodName = dictItem(sysDictItems, useMethod,cut, DictCodeReportEnum.USEMETHOD.getValue());
|
||||
|
||||
|
||||
XWPFTable table = document.createTable(12, 2);
|
||||
|
||||
//表格属性
|
||||
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
||||
//固定列宽(英文和数字的时候自动换行)
|
||||
CTTblLayoutType ctTblLayoutType = tablePr.isSetTblLayout() ? tablePr.getTblLayout() : tablePr.addNewTblLayout();
|
||||
ctTblLayoutType.setType(STTblLayoutType.FIXED);
|
||||
//表格宽度
|
||||
CTJc cTJc = tablePr.addNewJc();
|
||||
//居中
|
||||
@@ -478,57 +484,62 @@ public class WordUtil {
|
||||
//第12行
|
||||
setCell(table, 11,"Link",link);
|
||||
}
|
||||
// if(CutEnum.CN.getValue().equals(cut)){
|
||||
// //第1行
|
||||
// setCell(table.getRow(0), "相关领域",technologyTerritoryName);
|
||||
// //第2行
|
||||
// setCell(table.getRow(1), "适用车型",applyCarName);
|
||||
// //第3行
|
||||
// setCell(table.getRow(2), "适用范围",applyScopeName);
|
||||
// //第4行
|
||||
// setCell(table.getRow(3), "状态",stateName);
|
||||
// //第5行
|
||||
// setCell(table.getRow(4), "用法",useMethodName);
|
||||
// //第6行
|
||||
// setCell(table.getRow(5), "实施车型",implementCar);
|
||||
// //第7行
|
||||
// setCell(table.getRow(6), "新车型实施日期",newCarImplementTime);
|
||||
// //第8行
|
||||
// setCell(table.getRow(7), "在产车实施日期",productionCarImplementTime);
|
||||
// //第9行
|
||||
// setCell(table.getRow(8), "主要内容",contentCn);
|
||||
// //第10行
|
||||
// setCell(table.getRow(9), "NIO工作进展",workProgressCn);
|
||||
// //第11行
|
||||
// setCell(table.getRow(10), "法规联系人",lawsContact);
|
||||
// //第12行
|
||||
// setCell(table.getRow(11), "链接",link);
|
||||
// }else{
|
||||
// //第1行
|
||||
// setCell(table.getRow(0), "Related Areas",technologyTerritoryName);
|
||||
// //第2行
|
||||
// setCell(table.getRow(1), "Vehicle Type",applyCarName);
|
||||
// //第3行
|
||||
// setCell(table.getRow(2), "Scope",applyScopeName);
|
||||
// //第4行
|
||||
// setCell(table.getRow(3), "Status",stateName);
|
||||
// //第5行
|
||||
// setCell(table.getRow(4), "usage",useMethodName);
|
||||
// //第6行
|
||||
// setCell(table.getRow(5), "Implementation Model",implementCar);
|
||||
// //第7行
|
||||
// setCell(table.getRow(6), "New Type Execution Date",newCarImplementTime);
|
||||
// //第8行
|
||||
// setCell(table.getRow(7), "New Vehicle Execution Date",productionCarImplementTime);
|
||||
// //第9行
|
||||
// setCell(table.getRow(8), "Main Content",contentEn);
|
||||
// //第10行
|
||||
// setCell(table.getRow(9), "NIO Work Progress",workProgressEn);
|
||||
// //第11行
|
||||
// setCell(table.getRow(10), "Regulatory Contact",lawsContact);
|
||||
// //第12行
|
||||
// setCell(table.getRow(11), "Link",link);
|
||||
// }
|
||||
// ctTblLayoutType.setType(STTblLayoutType.FIXED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 已固定长度分隔字符串
|
||||
* @param str
|
||||
* @return
|
||||
*/
|
||||
public List<String> splitStr(String str){
|
||||
//检查参数是否合法
|
||||
if (null == str || str.equals("")) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
int length = 3;
|
||||
int n = (str.length() + length - 1) / length; //获取整个字符串可以被切割成字符子串的个数
|
||||
List<String> list = new ArrayList<>();
|
||||
for (int i = 0; i < n; i++) {
|
||||
if (i < (n - 1)) {
|
||||
list.add(str.substring(i * length, (i + 1) * length)) ;
|
||||
} else {
|
||||
list.add(str.substring(i * length));
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断字符串是否完全由数字组成
|
||||
* @param str
|
||||
* @return
|
||||
*/
|
||||
public boolean verifyFigure(String str){
|
||||
Pattern p = Pattern.compile("[0-9]*");
|
||||
Matcher m = p.matcher(str);
|
||||
return m.matches();
|
||||
}
|
||||
/**
|
||||
* 判断字符串是否完全由字母组成
|
||||
* @param str
|
||||
* @return
|
||||
*/
|
||||
public boolean verifyEn(String str){
|
||||
Pattern enPatten = Pattern.compile("^[a-zA-Z]*");
|
||||
Matcher enMatch = enPatten.matcher(str);
|
||||
return enMatch.matches();
|
||||
}
|
||||
/**
|
||||
* 判断字符串是否完全由数字和字母组成
|
||||
* @param str
|
||||
* @return
|
||||
*/
|
||||
public boolean verifyFigureAndEn(String str){
|
||||
Pattern figureAndEnPattern = Pattern.compile("[0-9a-zA-Z]{1,}");
|
||||
Matcher figureAndEnMatcher = figureAndEnPattern.matcher(str);
|
||||
return figureAndEnMatcher.matches();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -553,6 +564,9 @@ public class WordUtil {
|
||||
|
||||
//表格属性
|
||||
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
||||
//固定列宽(英文和数字的时候自动换行)
|
||||
CTTblLayoutType ctTblLayoutType = tablePr.isSetTblLayout() ? tablePr.getTblLayout() : tablePr.addNewTblLayout();
|
||||
ctTblLayoutType.setType(STTblLayoutType.FIXED);
|
||||
//表格宽度
|
||||
CTJc cTJc = tablePr.addNewJc();
|
||||
//居中
|
||||
@@ -597,6 +611,9 @@ public class WordUtil {
|
||||
XWPFTable table = document.createTable(newOpinionTemplateEOList.size()+1, 4);
|
||||
//表格属性
|
||||
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
||||
//固定列宽(英文和数字的时候自动换行)
|
||||
CTTblLayoutType ctTblLayoutType = tablePr.isSetTblLayout() ? tablePr.getTblLayout() : tablePr.addNewTblLayout();
|
||||
ctTblLayoutType.setType(STTblLayoutType.FIXED);
|
||||
//表格宽度
|
||||
CTJc cTJc = tablePr.addNewJc();
|
||||
//居中
|
||||
@@ -632,6 +649,9 @@ public class WordUtil {
|
||||
XWPFTable table = document.createTable(newStandardTemplateEOList.size()+1, 5);
|
||||
//表格属性
|
||||
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
||||
//固定列宽(英文和数字的时候自动换行)
|
||||
CTTblLayoutType ctTblLayoutType = tablePr.isSetTblLayout() ? tablePr.getTblLayout() : tablePr.addNewTblLayout();
|
||||
ctTblLayoutType.setType(STTblLayoutType.FIXED);
|
||||
//表格宽度
|
||||
CTJc cTJc = tablePr.addNewJc();
|
||||
//居中
|
||||
@@ -809,11 +829,29 @@ public class WordUtil {
|
||||
ctTblWidth0.setW(BigInteger.valueOf(2000));
|
||||
CTTblWidth ctTblWidth1 = table.getRow(number).getCell(1).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth1.setType(STTblWidth.DXA);
|
||||
ctTblWidth1.setW(BigInteger.valueOf(5000));
|
||||
ctTblWidth1.setW(BigInteger.valueOf(6000));
|
||||
|
||||
// XWPFParagraph para = table.getRow(number).getCell(1).getParagraphs().get(0);
|
||||
// XWPFRun run = para.createRun();//对某个段落设置格式
|
||||
// run.addBreak();//换行
|
||||
|
||||
table.getRow(number).getCell(0).setText(fieldName);
|
||||
table.getRow(number).getCell(1).setText(technologyTerritory);
|
||||
|
||||
}
|
||||
// private static void setCell(XWPFTable table, int number, String fieldName,String technologyTerritory) {
|
||||
//
|
||||
// table.getRow(number).setHeight(500);
|
||||
// CTTblWidth ctTblWidth0 = table.getRow(number).getCell(0).getCTTc().addNewTcPr().addNewTcW();
|
||||
// ctTblWidth0.setType(STTblWidth.DXA);
|
||||
// ctTblWidth0.setW(BigInteger.valueOf(2000));
|
||||
// CTTblWidth ctTblWidth1 = table.getRow(number).getCell(1).getCTTc().addNewTcPr().addNewTcW();
|
||||
// ctTblWidth1.setType(STTblWidth.DXA);
|
||||
// ctTblWidth1.setW(BigInteger.valueOf(5000));
|
||||
//
|
||||
// table.getRow(number).getCell(0).setText(fieldName);
|
||||
// table.getRow(number).getCell(1).setText(technologyTerritory);
|
||||
// }
|
||||
// private static void setCell(XWPFTableRow tableRow, String fieldName,String technologyTerritory) {
|
||||
//
|
||||
// tableRow.setHeight(500);
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
selectedRowrowValue: [],
|
||||
dataSource: [],
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 100,
|
||||
pageSizeOptions: ['100', '200'],
|
||||
total: 0,
|
||||
searchParmes: {},
|
||||
@@ -505,7 +505,9 @@
|
||||
getTableListReset() {
|
||||
let params = {
|
||||
paramsManifestId: this.$route.query.id,
|
||||
userTypes: this.currentPersonRole
|
||||
userTypes: this.currentPersonRole,
|
||||
pageNo:this.pageNo,
|
||||
pageSize:this.pageSize
|
||||
}
|
||||
this.loading = true
|
||||
this.$emit('listReset', '')
|
||||
|
||||
@@ -767,6 +767,11 @@ export default {
|
||||
this.loading = true
|
||||
getAction(this.url.list, params).then(res => {
|
||||
if (res.success) {
|
||||
if (res.result.pageList.current > 1 && res.result.pageList.records.length == 0) {
|
||||
this.pageNo = 1
|
||||
this.loadData()
|
||||
return
|
||||
}
|
||||
this.dataSource = res.result.pageList.records || []
|
||||
this.authmanage =res.result.auth_manage
|
||||
this.total = res.result.pageList.total
|
||||
|
||||
@@ -44,10 +44,10 @@
|
||||
:columns="columns"
|
||||
>
|
||||
<span slot="projectName" slot-scope="text,record" :title="text">
|
||||
{{ text && text.length > 15 ? text.slice(0, 14) + '...' : text }}
|
||||
{{ text }}
|
||||
</span>
|
||||
<span slot="templateName" slot-scope="text,record" :title="text">
|
||||
{{ text && text.length > 25 ? text.slice(0, 21) + '...' : text }}
|
||||
{{ text }}
|
||||
</span>
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<a class="text-operation" v-has="'report:exportTemplate:edit'" @click="edit(record)">{{$t('edit')}}</a>
|
||||
@@ -150,6 +150,7 @@ export default {
|
||||
title: this.$t('templateName'),
|
||||
align: 'center',
|
||||
dataIndex: 'templateName',
|
||||
ellipsis: true,
|
||||
width: 300,
|
||||
scopedSlots: { customRender: 'templateName' }
|
||||
},
|
||||
@@ -157,25 +158,29 @@ export default {
|
||||
title: this.$t('contentDescription'),
|
||||
align: 'center',
|
||||
dataIndex: 'description',
|
||||
ellipsis: true,
|
||||
width: 300,
|
||||
scopedSlots: { customRender: 'projectName' }
|
||||
},
|
||||
{
|
||||
title: this.$t('status'),
|
||||
align: 'center',
|
||||
width: 100,
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
dataIndex: 'state_dictText'
|
||||
},
|
||||
{
|
||||
title: this.$t('creater'),
|
||||
align: 'center',
|
||||
width: 100,
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
dataIndex: 'createBy'
|
||||
},
|
||||
{
|
||||
title: this.$t('Latestupdatetime'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
ellipsis: true,
|
||||
dataIndex: 'updateTime'
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user