Merge remote-tracking branch 'origin/master'
This commit is contained in:
+45
-34
@@ -46,7 +46,7 @@ public class DictAspect {
|
|||||||
|
|
||||||
@Around("excudeService()")
|
@Around("excudeService()")
|
||||||
public Object doAround(ProceedingJoinPoint pjp) throws Throwable {
|
public Object doAround(ProceedingJoinPoint pjp) throws Throwable {
|
||||||
long time1=System.currentTimeMillis();
|
long time1=System.currentTimeMillis();
|
||||||
Object result = pjp.proceed();
|
Object result = pjp.proceed();
|
||||||
long time2=System.currentTimeMillis();
|
long time2=System.currentTimeMillis();
|
||||||
log.debug("获取JSON数据 耗时:"+(time2-time1)+"ms");
|
log.debug("获取JSON数据 耗时:"+(time2-time1)+"ms");
|
||||||
@@ -84,46 +84,57 @@ public class DictAspect {
|
|||||||
if (((Result) result).getResult() instanceof IPage) {
|
if (((Result) result).getResult() instanceof IPage) {
|
||||||
List<JSONObject> items = new ArrayList<>();
|
List<JSONObject> items = new ArrayList<>();
|
||||||
for (Object record : ((IPage) ((Result) result).getResult()).getRecords()) {
|
for (Object record : ((IPage) ((Result) result).getResult()).getRecords()) {
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
JSONObject item = getJsonObject(record);
|
||||||
String json="{}";
|
|
||||||
try {
|
|
||||||
//解决@JsonFormat注解解析不了的问题详见SysAnnouncement类的@JsonFormat
|
|
||||||
json = mapper.writeValueAsString(record);
|
|
||||||
} catch (JsonProcessingException e) {
|
|
||||||
log.error("json解析失败"+e.getMessage(),e);
|
|
||||||
}
|
|
||||||
JSONObject item = JSONObject.parseObject(json);
|
|
||||||
//update-begin--Author:scott -- Date:20190603 ----for:解决继承实体字段无法翻译问题------
|
|
||||||
//for (Field field : record.getClass().getDeclaredFields()) {
|
|
||||||
for (Field field : oConvertUtils.getAllFields(record)) {
|
|
||||||
//update-end--Author:scott -- Date:20190603 ----for:解决继承实体字段无法翻译问题------
|
|
||||||
if (field.getAnnotation(Dict.class) != null) {
|
|
||||||
String code = field.getAnnotation(Dict.class).dicCode();
|
|
||||||
String text = field.getAnnotation(Dict.class).dicText();
|
|
||||||
String table = field.getAnnotation(Dict.class).dictTable();
|
|
||||||
String key = String.valueOf(item.get(field.getName()));
|
|
||||||
|
|
||||||
//翻译字典值对应的txt
|
|
||||||
String textValue = translateDictValue(code, text, table, key);
|
|
||||||
|
|
||||||
log.debug(" 字典Val : "+ textValue);
|
|
||||||
log.debug(" __翻译字典字段__ "+field.getName() + CommonConstant.DICT_TEXT_SUFFIX+": "+ textValue);
|
|
||||||
item.put(field.getName() + CommonConstant.DICT_TEXT_SUFFIX, textValue);
|
|
||||||
}
|
|
||||||
//date类型默认转换string格式化日期
|
|
||||||
if (field.getType().getName().equals("java.util.Date")&&field.getAnnotation(JsonFormat.class)==null&&item.get(field.getName())!=null){
|
|
||||||
SimpleDateFormat aDate=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
||||||
item.put(field.getName(), aDate.format(new Date((Long) item.get(field.getName()))));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
items.add(item);
|
items.add(item);
|
||||||
}
|
}
|
||||||
((IPage) ((Result) result).getResult()).setRecords(items);
|
((IPage) ((Result) result).getResult()).setRecords(items);
|
||||||
|
}else if(((Result) result).getResult() instanceof List){
|
||||||
|
List<JSONObject> items = new ArrayList<>();
|
||||||
|
for (Object record : (List)((Result) result).getResult()) {
|
||||||
|
JSONObject item = getJsonObject(record);
|
||||||
|
items.add(item);
|
||||||
|
}
|
||||||
|
((Result) result).setResult(items);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private JSONObject getJsonObject(Object record) {
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
String json = "{}";
|
||||||
|
try {
|
||||||
|
//解决@JsonFormat注解解析不了的问题详见SysAnnouncement类的@JsonFormat
|
||||||
|
json = mapper.writeValueAsString(record);
|
||||||
|
} catch (JsonProcessingException e) {
|
||||||
|
log.error("json解析失败" + e.getMessage(), e);
|
||||||
|
}
|
||||||
|
JSONObject item = JSONObject.parseObject(json);
|
||||||
|
//update-begin--Author:scott -- Date:20190603 ----for:解决继承实体字段无法翻译问题------
|
||||||
|
//for (Field field : record.getClass().getDeclaredFields()) {
|
||||||
|
for (Field field : oConvertUtils.getAllFields(record)) {
|
||||||
|
//update-end--Author:scott -- Date:20190603 ----for:解决继承实体字段无法翻译问题------
|
||||||
|
if (field.getAnnotation(Dict.class) != null) {
|
||||||
|
String code = field.getAnnotation(Dict.class).dicCode();
|
||||||
|
String text = field.getAnnotation(Dict.class).dicText();
|
||||||
|
String table = field.getAnnotation(Dict.class).dictTable();
|
||||||
|
String key = String.valueOf(item.get(field.getName()));
|
||||||
|
|
||||||
|
//翻译字典值对应的txt
|
||||||
|
String textValue = translateDictValue(code, text, table, key);
|
||||||
|
|
||||||
|
log.debug(" 字典Val : " + textValue);
|
||||||
|
log.debug(" __翻译字典字段__ " + field.getName() + CommonConstant.DICT_TEXT_SUFFIX + ": " + textValue);
|
||||||
|
item.put(field.getName() + CommonConstant.DICT_TEXT_SUFFIX, textValue);
|
||||||
|
}
|
||||||
|
//date类型默认转换string格式化日期
|
||||||
|
if (field.getType().getName().equals("java.util.Date") && field.getAnnotation(JsonFormat.class) == null && item.get(field.getName()) != null) {
|
||||||
|
SimpleDateFormat aDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
item.put(field.getName(), aDate.format(new Date((Long) item.get(field.getName()))));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 翻译字典文本
|
* 翻译字典文本
|
||||||
* @param code
|
* @param code
|
||||||
|
|||||||
+1
-1
@@ -142,7 +142,7 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
|||||||
@AutoLog(value = "文档库信息表-通过id查询")
|
@AutoLog(value = "文档库信息表-通过id查询")
|
||||||
@ApiOperation(value="文档库信息表-通过id查询", notes="文档库信息表-通过id查询")
|
@ApiOperation(value="文档库信息表-通过id查询", notes="文档库信息表-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
// @RequiresPermissions("document:queryById")
|
@RequiresPermissions("document:queryById")
|
||||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(id);
|
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(id);
|
||||||
if(bussDocumentLibraryEO==null) {
|
if(bussDocumentLibraryEO==null) {
|
||||||
|
|||||||
+10
-21
@@ -48,21 +48,14 @@ public class DummyInventoryInfoEOController extends JeroController<DummyInventor
|
|||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
* @param dummyInventoryInfoEO
|
* @param dummyInventoryInfoEO
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param req
|
* @param req
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "虚拟清单详情表-分页列表查询")
|
@AutoLog(value = "虚拟清单详情表-分页列表查询")
|
||||||
@ApiOperation(value="虚拟清单详情表-分页列表查询", notes="虚拟清单详情表-分页列表查询")
|
@ApiOperation(value="虚拟清单详情表-分页列表查询", notes="虚拟清单详情表-分页列表查询")
|
||||||
@GetMapping(value = "/page")
|
@GetMapping(value = "/page")
|
||||||
public Result<?> queryPageList(DummyInventoryInfoEO dummyInventoryInfoEO,
|
public Result<?> queryPageList(DummyInventoryInfoEO dummyInventoryInfoEO,HttpServletRequest req) {
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
IPage<DummyInventoryInfoEO> pageList = dummyInventoryInfoEOService.getPageInfo(dummyInventoryInfoEO,req);
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
||||||
HttpServletRequest req) {
|
|
||||||
QueryWrapper<DummyInventoryInfoEO> queryWrapper = QueryGenerator.initQueryWrapper(dummyInventoryInfoEO, req.getParameterMap());
|
|
||||||
Page<DummyInventoryInfoEO> page = new Page<DummyInventoryInfoEO>(pageNo, pageSize);
|
|
||||||
IPage<DummyInventoryInfoEO> pageList = dummyInventoryInfoEOService.page(page, queryWrapper);
|
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,8 +67,8 @@ public class DummyInventoryInfoEOController extends JeroController<DummyInventor
|
|||||||
@AutoLog(value = "虚拟清单详情表-列表查询")
|
@AutoLog(value = "虚拟清单详情表-列表查询")
|
||||||
@ApiOperation(value="虚拟清单详情表-列表查询", notes="虚拟清单详情表-列表查询")
|
@ApiOperation(value="虚拟清单详情表-列表查询", notes="虚拟清单详情表-列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<List<DummyInventoryInfoEO>> queryList() {
|
public Result<List<DummyInventoryInfoEO>> queryList(DummyInventoryInfoEO dummyInventoryInfoEO,HttpServletRequest req) {
|
||||||
List<DummyInventoryInfoEO> list = dummyInventoryInfoEOService.queryList();
|
List<DummyInventoryInfoEO> list = dummyInventoryInfoEOService.queryList(dummyInventoryInfoEO,req);
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,8 +206,8 @@ public class DummyInventoryInfoEOController extends JeroController<DummyInventor
|
|||||||
@AutoLog(value = "复制")
|
@AutoLog(value = "复制")
|
||||||
@ApiOperation(value="复制", notes="复制")
|
@ApiOperation(value="复制", notes="复制")
|
||||||
@GetMapping(value = "/copyInfoByIds")
|
@GetMapping(value = "/copyInfoByIds")
|
||||||
public Result<?> copyInfoByIds(@RequestParam(name="id",required=true) String ids,
|
public Result<?> copyInfoByIds(@RequestParam(name="ids",required=true) String ids,
|
||||||
@RequestParam(name="id",required=true) String cut) {
|
@RequestParam(name="cut",required=true) String cut) {
|
||||||
try {
|
try {
|
||||||
dummyInventoryInfoEOService.copyInfoByIds(ids);
|
dummyInventoryInfoEOService.copyInfoByIds(ids);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -235,20 +228,16 @@ public class DummyInventoryInfoEOController extends JeroController<DummyInventor
|
|||||||
/**
|
/**
|
||||||
* 批量设置
|
* 批量设置
|
||||||
*
|
*
|
||||||
* @param dummyInventoryInfoEOList
|
* @param dummyInventoryInfoEO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "虚拟清单详情表-添加")
|
@AutoLog(value = "虚拟清单详情表-添加")
|
||||||
@ApiOperation(value="虚拟清单详情表-添加", notes="虚拟清单详情表-添加")
|
@ApiOperation(value="虚拟清单详情表-添加", notes="虚拟清单详情表-添加")
|
||||||
@PostMapping(value = "/setBatch")
|
@PostMapping(value = "/setBatch")
|
||||||
public Result<?> setBatch(@Validated @RequestBody List<DummyInventoryInfoEO> dummyInventoryInfoEOList) {
|
public Result<?> setBatch(@RequestBody DummyInventoryInfoEO dummyInventoryInfoEO) {
|
||||||
String cut = "";
|
String cut = dummyInventoryInfoEO.getCut();
|
||||||
if(dummyInventoryInfoEOList.size() != 0){
|
|
||||||
cut = dummyInventoryInfoEOList.get(0).getCut();
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
dummyInventoryInfoEOService.setBatch(dummyInventoryInfoEOList);
|
dummyInventoryInfoEOService.setBatch(dummyInventoryInfoEO);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if(CutEnum.CN.getValue().equals(cut)){
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
return Result.error("批量设置失败!");
|
return Result.error("批量设置失败!");
|
||||||
|
|||||||
+23
@@ -93,6 +93,9 @@ public class DummyInventoryInfoEO implements Serializable {
|
|||||||
@ApiModelProperty(value = "技术领域")
|
@ApiModelProperty(value = "技术领域")
|
||||||
private java.lang.String technologyTerritory;
|
private java.lang.String technologyTerritory;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String technologyTerritoryName;
|
||||||
|
|
||||||
/**新车型实施日期*/
|
/**新车型实施日期*/
|
||||||
@Excel(name = "新车型实施日期", width = 15)
|
@Excel(name = "新车型实施日期", width = 15)
|
||||||
@ApiModelProperty(value = "新车型实施日期")
|
@ApiModelProperty(value = "新车型实施日期")
|
||||||
@@ -125,21 +128,25 @@ public class DummyInventoryInfoEO implements Serializable {
|
|||||||
/**实施类别*/
|
/**实施类别*/
|
||||||
@Excel(name = "实施类别", width = 15)
|
@Excel(name = "实施类别", width = 15)
|
||||||
@ApiModelProperty(value = "实施类别")
|
@ApiModelProperty(value = "实施类别")
|
||||||
|
@Dict(dicCode ="implement_type")
|
||||||
private java.lang.String implementType;
|
private java.lang.String implementType;
|
||||||
|
|
||||||
/**认证类型*/
|
/**认证类型*/
|
||||||
@Excel(name = "认证类型", width = 15)
|
@Excel(name = "认证类型", width = 15)
|
||||||
@ApiModelProperty(value = "认证类型")
|
@ApiModelProperty(value = "认证类型")
|
||||||
|
@Dict(dicCode ="attestation_type")
|
||||||
private java.lang.String attestationType;
|
private java.lang.String attestationType;
|
||||||
|
|
||||||
/**认证级别*/
|
/**认证级别*/
|
||||||
@Excel(name = "认证级别", width = 15)
|
@Excel(name = "认证级别", width = 15)
|
||||||
@ApiModelProperty(value = "认证级别")
|
@ApiModelProperty(value = "认证级别")
|
||||||
|
@Dict(dicCode ="attestation_rank")
|
||||||
private java.lang.String attestationRank;
|
private java.lang.String attestationRank;
|
||||||
|
|
||||||
/**责任领域*/
|
/**责任领域*/
|
||||||
@Excel(name = "责任领域", width = 15)
|
@Excel(name = "责任领域", width = 15)
|
||||||
@ApiModelProperty(value = "责任领域")
|
@ApiModelProperty(value = "责任领域")
|
||||||
|
@Dict(dicCode ="duty_territory")
|
||||||
private java.lang.String dutyTerritory;
|
private java.lang.String dutyTerritory;
|
||||||
|
|
||||||
/**备注*/
|
/**备注*/
|
||||||
@@ -150,6 +157,7 @@ public class DummyInventoryInfoEO implements Serializable {
|
|||||||
/**设计符合性确认-交付物类型*/
|
/**设计符合性确认-交付物类型*/
|
||||||
@Excel(name = "设计符合性确认-交付物类型", width = 15)
|
@Excel(name = "设计符合性确认-交付物类型", width = 15)
|
||||||
@ApiModelProperty(value = "设计符合性确认-交付物类型")
|
@ApiModelProperty(value = "设计符合性确认-交付物类型")
|
||||||
|
@Dict(dicCode ="deliverable_template")
|
||||||
private java.lang.String designDeliverableType;
|
private java.lang.String designDeliverableType;
|
||||||
|
|
||||||
/**设计符合性确认-交付物模板*/
|
/**设计符合性确认-交付物模板*/
|
||||||
@@ -157,6 +165,9 @@ public class DummyInventoryInfoEO implements Serializable {
|
|||||||
@ApiModelProperty(value = "设计符合性确认-交付物模板")
|
@ApiModelProperty(value = "设计符合性确认-交付物模板")
|
||||||
private java.lang.String designDeliverableTemplate;
|
private java.lang.String designDeliverableTemplate;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String designDeliverableTemplateName;
|
||||||
|
|
||||||
/**设计符合性确认-发起人*/
|
/**设计符合性确认-发起人*/
|
||||||
@Excel(name = "设计符合性确认-发起人", width = 15)
|
@Excel(name = "设计符合性确认-发起人", width = 15)
|
||||||
@ApiModelProperty(value = "设计符合性确认-发起人")
|
@ApiModelProperty(value = "设计符合性确认-发起人")
|
||||||
@@ -177,6 +188,9 @@ public class DummyInventoryInfoEO implements Serializable {
|
|||||||
@ApiModelProperty(value = "prehomo确认-交付物模板")
|
@ApiModelProperty(value = "prehomo确认-交付物模板")
|
||||||
private java.lang.String prehomoDeliverableTemplate;
|
private java.lang.String prehomoDeliverableTemplate;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String prehomoDeliverableTemplateName;
|
||||||
|
|
||||||
/**prehomo确认-发起人*/
|
/**prehomo确认-发起人*/
|
||||||
@Excel(name = "prehomo确认-发起人", width = 15)
|
@Excel(name = "prehomo确认-发起人", width = 15)
|
||||||
@ApiModelProperty(value = "prehomo确认-发起人")
|
@ApiModelProperty(value = "prehomo确认-发起人")
|
||||||
@@ -197,6 +211,9 @@ public class DummyInventoryInfoEO implements Serializable {
|
|||||||
@ApiModelProperty(value = "验证符合性确认-交付物模板")
|
@ApiModelProperty(value = "验证符合性确认-交付物模板")
|
||||||
private java.lang.String verifyDeliverableTemplate;
|
private java.lang.String verifyDeliverableTemplate;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String verifyDeliverableTemplateName;
|
||||||
|
|
||||||
/**验证符合性确认-发起人*/
|
/**验证符合性确认-发起人*/
|
||||||
@Excel(name = "验证符合性确认-发起人", width = 15)
|
@Excel(name = "验证符合性确认-发起人", width = 15)
|
||||||
@ApiModelProperty(value = "验证符合性确认-发起人")
|
@ApiModelProperty(value = "验证符合性确认-发起人")
|
||||||
@@ -214,4 +231,10 @@ public class DummyInventoryInfoEO implements Serializable {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String ids;
|
private String ids;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer pageNo;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer pageSize;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-3
@@ -1,5 +1,6 @@
|
|||||||
package com.jero.modules.dummy.service;
|
package com.jero.modules.dummy.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
@@ -62,14 +63,16 @@ public interface IDummyInventoryInfoEOService extends IService<DummyInventoryInf
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<DummyInventoryInfoEO> queryList();
|
List<DummyInventoryInfoEO> queryList(DummyInventoryInfoEO dummyInventoryInfoEO,HttpServletRequest req);
|
||||||
|
|
||||||
|
IPage<DummyInventoryInfoEO> getPageInfo(DummyInventoryInfoEO dummyInventoryInfoEO,HttpServletRequest req);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量设置
|
* 批量设置
|
||||||
* @param dummyInventoryInfoEOList
|
* @param dummyInventoryInfoEO
|
||||||
*/
|
*/
|
||||||
void setBatch(List<DummyInventoryInfoEO> dummyInventoryInfoEOList);
|
void setBatch(DummyInventoryInfoEO dummyInventoryInfoEO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 模板下载
|
* 模板下载
|
||||||
|
|||||||
+190
-8
@@ -1,12 +1,21 @@
|
|||||||
package com.jero.modules.dummy.service.impl;
|
package com.jero.modules.dummy.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.common.constant.enums.CutEnum;
|
||||||
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||||
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
||||||
import com.jero.modules.dummy.mapper.DummyInventoryInfoEOMapper;
|
import com.jero.modules.dummy.mapper.DummyInventoryInfoEOMapper;
|
||||||
import com.jero.modules.dummy.service.IDummyInventoryInfoEOService;
|
import com.jero.modules.dummy.service.IDummyInventoryInfoEOService;
|
||||||
|
import com.jero.modules.oss.entity.OSSFile;
|
||||||
|
import com.jero.modules.oss.service.IOSSFileService;
|
||||||
|
import com.jero.modules.system.entity.SysCategory;
|
||||||
|
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -17,8 +26,11 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 虚拟清单详情表
|
* @Description: 虚拟清单详情表
|
||||||
@@ -32,6 +44,25 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBussDocumentLibraryEOService iBussDocumentLibraryEOService;
|
private IBussDocumentLibraryEOService iBussDocumentLibraryEOService;
|
||||||
|
@Autowired
|
||||||
|
private SysCategoryServiceImpl sysCategoryService;
|
||||||
|
@Autowired
|
||||||
|
private IOSSFileService iOSSFileService;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<DummyInventoryInfoEO> getPageInfo(DummyInventoryInfoEO dummyInventoryInfoEO,HttpServletRequest req) {
|
||||||
|
QueryWrapper<DummyInventoryInfoEO> queryWrapper = QueryGenerator.initQueryWrapper(dummyInventoryInfoEO, req.getParameterMap());
|
||||||
|
queryWrapper.orderByDesc("create_time");
|
||||||
|
Page<DummyInventoryInfoEO> page = new Page<DummyInventoryInfoEO>(dummyInventoryInfoEO.getPageNo(), dummyInventoryInfoEO.getPageSize());
|
||||||
|
IPage<DummyInventoryInfoEO> pageInfo = this.page(page, queryWrapper);
|
||||||
|
//技术领域处理
|
||||||
|
// treeDict(dummyInventoryInfoEO, pageInfo);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
@@ -40,6 +71,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void add(DummyInventoryInfoEO dummyInventoryInfoEO) {
|
public void add(DummyInventoryInfoEO dummyInventoryInfoEO) {
|
||||||
|
//需要验重(验重--已添加过的不能再添加,提示该标准已存在清单中,不可添加)
|
||||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getIds())){
|
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getIds())){
|
||||||
LambdaQueryWrapper<BussDocumentLibraryEO> wrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BussDocumentLibraryEO> wrapper = new LambdaQueryWrapper<>();
|
||||||
wrapper.in(BussDocumentLibraryEO::getId, Arrays.asList(dummyInventoryInfoEO.getIds().split(",")));
|
wrapper.in(BussDocumentLibraryEO::getId, Arrays.asList(dummyInventoryInfoEO.getIds().split(",")));
|
||||||
@@ -91,8 +123,25 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void deleteByIds(List<String> ids) {
|
public void deleteByIds(List<String> ids) {
|
||||||
removeByIds(ids);
|
//文件同步删除
|
||||||
}
|
LambdaQueryWrapper<DummyInventoryInfoEO> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.in(DummyInventoryInfoEO::getId,ids);
|
||||||
|
List<DummyInventoryInfoEO> dummyInventoryInfoEOList = this.list(wrapper);
|
||||||
|
List<String> fileIdList = new ArrayList<>();
|
||||||
|
for (DummyInventoryInfoEO dummyInventoryInfoEO : dummyInventoryInfoEOList) {
|
||||||
|
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getDesignDeliverableTemplate())){
|
||||||
|
fileIdList.addAll(Arrays.asList(dummyInventoryInfoEO.getDesignDeliverableTemplate().split(",")));
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getPrehomoDeliverableTemplate())){
|
||||||
|
fileIdList.addAll(Arrays.asList(dummyInventoryInfoEO.getPrehomoDeliverableTemplate().split(",")));
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getVerifyDeliverableTemplate())){
|
||||||
|
fileIdList.addAll(Arrays.asList(dummyInventoryInfoEO.getVerifyDeliverableTemplate().split(",")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
iOSSFileService.removeByIds(fileIdList);
|
||||||
|
removeByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询
|
* 通过id查询
|
||||||
@@ -111,8 +160,13 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<DummyInventoryInfoEO> queryList() {
|
public List<DummyInventoryInfoEO> queryList(DummyInventoryInfoEO dummyInventoryInfoEO,HttpServletRequest req) {
|
||||||
return list();
|
QueryWrapper<DummyInventoryInfoEO> queryWrapper = QueryGenerator.initQueryWrapper(dummyInventoryInfoEO,req.getParameterMap());
|
||||||
|
queryWrapper.orderByDesc("create_time");
|
||||||
|
List<DummyInventoryInfoEO> dummyInventoryInfoEOList = this.list(queryWrapper);
|
||||||
|
//技术领域处理
|
||||||
|
treeDict(dummyInventoryInfoEO, dummyInventoryInfoEOList);
|
||||||
|
return dummyInventoryInfoEOList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -122,17 +176,49 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void copyInfoByIds(String ids) {
|
public void copyInfoByIds(String ids) {
|
||||||
|
if(StringUtils.isNotBlank(ids)){
|
||||||
|
LambdaQueryWrapper<DummyInventoryInfoEO> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.in(DummyInventoryInfoEO::getId,Arrays.asList(ids.split(",")));
|
||||||
|
List<DummyInventoryInfoEO> dummyInventoryInfoEOList = this.list(wrapper);
|
||||||
|
for (DummyInventoryInfoEO dummyInventoryInfoEO : dummyInventoryInfoEOList) {
|
||||||
|
dummyInventoryInfoEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||||
|
}
|
||||||
|
this.saveBatch(dummyInventoryInfoEOList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量设置
|
* 批量设置
|
||||||
* @param dummyInventoryInfoEOList
|
* @param dummyInventoryInfoEO
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setBatch(List<DummyInventoryInfoEO> dummyInventoryInfoEOList) {
|
public void setBatch(DummyInventoryInfoEO dummyInventoryInfoEO) {
|
||||||
|
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getIds())){
|
||||||
|
List<DummyInventoryInfoEO> dummyInventoryInfoEOList = new ArrayList<>();
|
||||||
|
for (String id : dummyInventoryInfoEO.getIds().split(",")) {
|
||||||
|
DummyInventoryInfoEO dummyInventoryInfoEOTemp = new DummyInventoryInfoEO();
|
||||||
|
dummyInventoryInfoEOTemp.setId(id);
|
||||||
|
//实施类别 implementType
|
||||||
|
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getImplementType())){
|
||||||
|
dummyInventoryInfoEOTemp.setImplementType(dummyInventoryInfoEO.getImplementType());
|
||||||
|
}
|
||||||
|
//认证类型 attestationType
|
||||||
|
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getAttestationType())){
|
||||||
|
dummyInventoryInfoEOTemp.setAttestationType(dummyInventoryInfoEO.getAttestationType());
|
||||||
|
}
|
||||||
|
//认证级别 attestationRank
|
||||||
|
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getAttestationRank())){
|
||||||
|
dummyInventoryInfoEOTemp.setAttestationRank(dummyInventoryInfoEO.getAttestationRank());
|
||||||
|
}
|
||||||
|
//责任领域 dutyTerritory
|
||||||
|
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getDutyTerritory())){
|
||||||
|
dummyInventoryInfoEOTemp.setDutyTerritory(dummyInventoryInfoEO.getDutyTerritory());
|
||||||
|
}
|
||||||
|
dummyInventoryInfoEOList.add(dummyInventoryInfoEOTemp);
|
||||||
|
}
|
||||||
|
this.updateBatchById(dummyInventoryInfoEOList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -145,4 +231,100 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
public void exportTemplate(DummyInventoryInfoEO dummyInventoryInfoEO, HttpServletResponse response, HttpServletRequest request) {
|
public void exportTemplate(DummyInventoryInfoEO dummyInventoryInfoEO, HttpServletResponse response, HttpServletRequest request) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 技术领域数据字典处理
|
||||||
|
* @param dummyInventoryInfoEO
|
||||||
|
* @param dummyInventoryInfoEOList
|
||||||
|
*/
|
||||||
|
private void treeDict(DummyInventoryInfoEO dummyInventoryInfoEO, List<DummyInventoryInfoEO> dummyInventoryInfoEOList) {
|
||||||
|
Set<String> technologyTerritorySet = new HashSet<>();
|
||||||
|
List<String> deliverableList = new ArrayList<>();
|
||||||
|
for (DummyInventoryInfoEO record : dummyInventoryInfoEOList) {
|
||||||
|
//技术领域
|
||||||
|
if(StringUtils.isNotBlank(record.getTechnologyTerritory())){
|
||||||
|
List<String> list = Arrays.asList(record.getTechnologyTerritory().split(","));
|
||||||
|
technologyTerritorySet.addAll(list);
|
||||||
|
}
|
||||||
|
//设计符合性确认交付物模板
|
||||||
|
if(StringUtils.isNotBlank(record.getDesignDeliverableTemplate())){
|
||||||
|
deliverableList.addAll(Arrays.asList(record.getDesignDeliverableTemplate().split(",")));
|
||||||
|
}
|
||||||
|
// Prehomo确认交付物模板
|
||||||
|
if(StringUtils.isNotBlank(record.getPrehomoDeliverableTemplate())){
|
||||||
|
deliverableList.addAll(Arrays.asList(record.getPrehomoDeliverableTemplate().split(",")));
|
||||||
|
}
|
||||||
|
// 验证符合性确认交付物模板
|
||||||
|
if(StringUtils.isNotBlank(record.getVerifyDeliverableTemplate())){
|
||||||
|
deliverableList.addAll(Arrays.asList(record.getVerifyDeliverableTemplate().split(",")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//文件
|
||||||
|
List<OSSFile> fileInfos = new ArrayList<>();
|
||||||
|
if(deliverableList.size() != 0){
|
||||||
|
fileInfos = iOSSFileService.getFileInfos(StringUtils.join(deliverableList, ","));
|
||||||
|
}
|
||||||
|
|
||||||
|
//树形结构数据字典(技术领域)
|
||||||
|
LambdaQueryWrapper<SysCategory> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.in(SysCategory::getId, technologyTerritorySet);
|
||||||
|
List<SysCategory> categoryList = sysCategoryService.list(wrapper);
|
||||||
|
for (DummyInventoryInfoEO record : dummyInventoryInfoEOList) {
|
||||||
|
//技术领域
|
||||||
|
if (categoryList.size() != 0 && StringUtils.isNotBlank(record.getTechnologyTerritory())) {
|
||||||
|
List<String> technologyTerritoryList = Arrays.asList(record.getTechnologyTerritory().split(","));
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (String technologyTerritory : technologyTerritoryList) {
|
||||||
|
List<SysCategory> collect = categoryList.stream().filter(e -> technologyTerritory.equals(e.getId())).collect(Collectors.toList());
|
||||||
|
if (CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())) {
|
||||||
|
sb.append(collect.get(0).getName() + ",");
|
||||||
|
} else {
|
||||||
|
sb.append(collect.get(0).getEnName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String technologyTerritoryName = "";
|
||||||
|
if (StringUtils.isNotBlank(sb)) {
|
||||||
|
technologyTerritoryName = sb.substring(0, sb.length() - 1);
|
||||||
|
}
|
||||||
|
record.setTechnologyTerritoryName(technologyTerritoryName);
|
||||||
|
}
|
||||||
|
|
||||||
|
//交付物类型模板
|
||||||
|
if(fileInfos.size() != 0){
|
||||||
|
if(StringUtils.isNotBlank(record.getDesignDeliverableTemplate())){
|
||||||
|
String fileName = getFileName(record, fileInfos,record.getDesignDeliverableTemplate());
|
||||||
|
if(StringUtils.isNotBlank(fileName)){
|
||||||
|
record.setDesignDeliverableTemplateName(fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(record.getPrehomoDeliverableTemplate())){
|
||||||
|
String fileName = getFileName(record, fileInfos,record.getPrehomoDeliverableTemplate());
|
||||||
|
if(StringUtils.isNotBlank(fileName)){
|
||||||
|
record.setPrehomoDeliverableTemplateName(fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(record.getVerifyDeliverableTemplate())){
|
||||||
|
String fileName = getFileName(record, fileInfos,record.getVerifyDeliverableTemplate());
|
||||||
|
if(StringUtils.isNotBlank(fileName)){
|
||||||
|
record.setVerifyDeliverableTemplateName(fileName);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getFileName(DummyInventoryInfoEO dummyInventoryInfoEO,List<OSSFile> fileInfos,String deliverableTemplate){
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (String s : deliverableTemplate.split(",")) {
|
||||||
|
List<OSSFile> collect = fileInfos.stream().filter(e -> s.equals(e.getId())).collect(Collectors.toList());
|
||||||
|
sb.append(collect.get(0).getFileName() + ",");
|
||||||
|
}
|
||||||
|
String sbStr = "";
|
||||||
|
if(StringUtils.isNotBlank(sb)){
|
||||||
|
sbStr = sb.substring(0, sb.length() - 1);
|
||||||
|
}
|
||||||
|
return sbStr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+123
-36
@@ -1,19 +1,27 @@
|
|||||||
package com.jero.modules.ocr.controller;
|
package com.jero.modules.ocr.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
|
import com.jero.modules.ocr.entity.OcrRecordEO;
|
||||||
|
import com.jero.modules.ocr.enums.CheckFlagEnum;
|
||||||
import com.jero.modules.ocr.helpers.ConfigManager;
|
import com.jero.modules.ocr.helpers.ConfigManager;
|
||||||
import com.jero.modules.ocr.helpers.DocumentManager;
|
import com.jero.modules.ocr.helpers.DocumentManager;
|
||||||
import com.jero.modules.ocr.helpers.FileUtility;
|
import com.jero.modules.ocr.helpers.FileUtility;
|
||||||
import com.jero.modules.ocr.helpers.ServiceConverter;
|
import com.jero.modules.ocr.helpers.ServiceConverter;
|
||||||
|
import com.jero.modules.ocr.service.IOcrRecordEOService;
|
||||||
|
import com.jero.modules.ocr.service.WebSocketServer;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.json.simple.JSONObject;
|
import org.json.simple.JSONObject;
|
||||||
import org.json.simple.parser.JSONParser;
|
import org.json.simple.parser.JSONParser;
|
||||||
import org.json.simple.parser.ParseException;
|
import org.json.simple.parser.ParseException;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@@ -40,6 +48,11 @@ import java.util.Scanner;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class OcrCheckController {
|
public class OcrCheckController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IOcrRecordEOService ocrRecordService;
|
||||||
|
@Autowired
|
||||||
|
private WebSocketServer webSocketServer;
|
||||||
|
|
||||||
@Value("${OCR.ocrDownPath}")
|
@Value("${OCR.ocrDownPath}")
|
||||||
private String ocrDownPath;
|
private String ocrDownPath;
|
||||||
|
|
||||||
@@ -78,14 +91,37 @@ public class OcrCheckController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "验证文档是否被锁定")
|
||||||
|
@GetMapping("/verifyCheckFlag")
|
||||||
|
public Result<?> verifyCheckFlag(String id) {
|
||||||
|
if(StringUtils.isBlank(id)){
|
||||||
|
return Result.error("参数不能为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
OcrRecordEO ocrRecordEO = ocrRecordService.getById(id);
|
||||||
|
if (CheckFlagEnum.LOCK.getValue().equals(ocrRecordEO.getCheckFlag())) {
|
||||||
|
return Result.error("该文档当前正在被校核,请稍后重试!");
|
||||||
|
|
||||||
|
} else if (CheckFlagEnum.UNLOCK.getValue().equals(ocrRecordEO.getCheckFlag())) {
|
||||||
|
return Result.OK();
|
||||||
|
}
|
||||||
|
// 文档没被校核过
|
||||||
|
return Result.OK();
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "编辑文件")
|
@ApiOperation(value = "编辑文件")
|
||||||
@RequestMapping("/editorFile")
|
@RequestMapping("/editorFile")
|
||||||
public ModelAndView index(HttpServletRequest request, HttpServletResponse response, Model model) throws Exception {
|
public ModelAndView index(HttpServletRequest request, HttpServletResponse response, Model model) throws Exception {
|
||||||
|
|
||||||
String fileName = "";
|
String fileName = "";
|
||||||
if (request.getParameterMap().containsKey("fileName")) {
|
String id = "";
|
||||||
fileName = request.getParameter("fileName");
|
try {
|
||||||
}
|
if (request.getParameterMap().containsKey("fileName")) {
|
||||||
|
fileName = request.getParameter("fileName");
|
||||||
|
}
|
||||||
|
if (request.getParameterMap().containsKey("id")) {
|
||||||
|
id = request.getParameter("id");
|
||||||
|
}
|
||||||
// String fileExt = null;
|
// String fileExt = null;
|
||||||
// if (request.getParameterMap().containsKey("fileExt")) {
|
// if (request.getParameterMap().containsKey("fileExt")) {
|
||||||
// fileExt = request.getParameter("fileExt");
|
// fileExt = request.getParameter("fileExt");
|
||||||
@@ -111,37 +147,48 @@ public class OcrCheckController {
|
|||||||
// file.SetTypeDesktop(desktopMode);
|
// file.SetTypeDesktop(desktopMode);
|
||||||
// file.SetFileName(fileName);
|
// file.SetFileName(fileName);
|
||||||
|
|
||||||
log.info("==========EditorFile==========");
|
log.info("==========EditorFile==========");
|
||||||
DocumentManager.Init(request, response);
|
|
||||||
//要编辑的文件名
|
DocumentManager.Init(request, response);
|
||||||
model.addAttribute("fileName", fileName) ;
|
//要编辑的文件名
|
||||||
//要编辑的文件类型
|
model.addAttribute("fileName", fileName);
|
||||||
model.addAttribute("fileType", FileUtility.GetFileExtension(fileName).replace(".", "")) ;
|
//要编辑的文件类型
|
||||||
//要编辑的文档类型
|
model.addAttribute("fileType", FileUtility.GetFileExtension(fileName).replace(".", ""));
|
||||||
model.addAttribute("documentType",FileUtility.GetFileType(fileName).toString().toLowerCase()) ;
|
//要编辑的文档类型
|
||||||
//要编辑的文档访问url
|
model.addAttribute("documentType", FileUtility.GetFileType(fileName).toString().toLowerCase());
|
||||||
|
//要编辑的文档访问url
|
||||||
// model.addAttribute("fileUri",DocumentManager.GetFileUri(fileName, true)) ;
|
// model.addAttribute("fileUri",DocumentManager.GetFileUri(fileName, true)) ;
|
||||||
// model.addAttribute("callbackUrl", DocumentManager.GetCallback(fileName)) ;
|
// model.addAttribute("callbackUrl", DocumentManager.GetCallback(fileName)) ;
|
||||||
// model.addAttribute("serverUrl", DocumentManager.GetServerUrl(true)) ;
|
// model.addAttribute("serverUrl", DocumentManager.GetServerUrl(true)) ;
|
||||||
model.addAttribute("fileUri", ocrDownPath + "?fileName=" + fileName) ;
|
model.addAttribute("fileUri", ocrDownPath + "?fileName=" + fileName);
|
||||||
model.addAttribute("callbackUrl", ocrSavePath + "?fileName=" + fileName) ;
|
model.addAttribute("callbackUrl", ocrSavePath + "?id=" + id);
|
||||||
model.addAttribute("serverUrl", serverUrl) ;
|
model.addAttribute("serverUrl", serverUrl);
|
||||||
model.addAttribute("fileKey", ServiceConverter.GenerateRevisionId(DocumentManager.CurUserHostAddress(null) + ocrDownPath + "?fileName=" + fileName)) ;
|
model.addAttribute("fileKey", ServiceConverter.GenerateRevisionId(DocumentManager.CurUserHostAddress(null) + ocrDownPath + "?fileName=" + fileName));
|
||||||
model.addAttribute("editorMode", DocumentManager.GetEditedExts().contains(FileUtility.GetFileExtension(fileName)) && !"view".equals(request.getAttribute("mode")) ? "edit" : "view") ;
|
model.addAttribute("editorMode", DocumentManager.GetEditedExts().contains(FileUtility.GetFileExtension(fileName)) && !"view".equals(request.getAttribute("mode")) ? "edit" : "view");
|
||||||
model.addAttribute("editorUserId",DocumentManager.CurUserHostAddress(null)) ;
|
model.addAttribute("editorUserId", DocumentManager.CurUserHostAddress(null));
|
||||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
model.addAttribute("editorUserName", loginUser.getUsername()) ;
|
model.addAttribute("editorUserName", loginUser.getUsername());
|
||||||
|
|
||||||
// model.addAttribute("type", desktopMode ? "desktop" : "embedded");
|
// model.addAttribute("type", desktopMode ? "desktop" : "embedded");
|
||||||
model.addAttribute("type", true ? "desktop" : "embedded");
|
model.addAttribute("type", true ? "desktop" : "embedded");
|
||||||
model.addAttribute("docserviceApiUrl", ConfigManager.GetProperty("files.docservice.url.api"));
|
model.addAttribute("docserviceApiUrl", ConfigManager.GetProperty("files.docservice.url.api"));
|
||||||
model.addAttribute("docServiceUrlPreloader", ConfigManager.GetProperty("files.docservice.url.preloader")) ;
|
model.addAttribute("docServiceUrlPreloader", ConfigManager.GetProperty("files.docservice.url.preloader"));
|
||||||
model.addAttribute("currentYear", "2022") ;
|
model.addAttribute("currentYear", "2022");
|
||||||
model.addAttribute("convertExts", String.join(",", DocumentManager.GetConvertExts())) ;
|
model.addAttribute("convertExts", String.join(",", DocumentManager.GetConvertExts()));
|
||||||
model.addAttribute("editedExts", String.join(",", DocumentManager.GetEditedExts())) ;
|
model.addAttribute("editedExts", String.join(",", DocumentManager.GetEditedExts()));
|
||||||
model.addAttribute("documentCreated", new SimpleDateFormat("MM/dd/yyyy").format(new Date())) ;
|
model.addAttribute("documentCreated", new SimpleDateFormat("MM/dd/yyyy").format(new Date()));
|
||||||
model.addAttribute("permissionsEdit", Boolean.toString(DocumentManager.GetEditedExts().contains(FileUtility.GetFileExtension(fileName))).toLowerCase()) ;
|
model.addAttribute("permissionsEdit", Boolean.toString(DocumentManager.GetEditedExts().contains(FileUtility.GetFileExtension(fileName))).toLowerCase());
|
||||||
return new ModelAndView("editor") ;
|
return new ModelAndView("editor");
|
||||||
|
} finally {
|
||||||
|
// 校核锁定
|
||||||
|
if (StringUtils.isNotBlank(id)) {
|
||||||
|
OcrRecordEO ocrRecordEO = new OcrRecordEO();
|
||||||
|
ocrRecordEO.setId(id);
|
||||||
|
ocrRecordEO.setCheckFlag(CheckFlagEnum.LOCK.getValue());
|
||||||
|
// 校核锁定
|
||||||
|
ocrRecordService.updateById(ocrRecordEO);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -164,17 +211,25 @@ public class OcrCheckController {
|
|||||||
@ApiOperation(value = "保存文件")
|
@ApiOperation(value = "保存文件")
|
||||||
@RequestMapping("/saveFile")
|
@RequestMapping("/saveFile")
|
||||||
public void saveFile(HttpServletRequest request, HttpServletResponse response) {
|
public void saveFile(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
String id = "";
|
||||||
String fileName = "";
|
String fileName = "";
|
||||||
if (request.getParameterMap().containsKey("fileName")) {
|
|
||||||
fileName = request.getParameter("fileName");
|
|
||||||
}
|
|
||||||
PrintWriter writer = null;
|
PrintWriter writer = null;
|
||||||
log.info("==========SaveEditedFile==========");
|
|
||||||
try {
|
try {
|
||||||
|
if (request.getParameterMap().containsKey("id")) {
|
||||||
|
id = request.getParameter("id");
|
||||||
|
OcrRecordEO ocrRecordEO = ocrRecordService.getById(id);
|
||||||
|
if(ObjectUtil.isNotEmpty(ocrRecordEO)){
|
||||||
|
fileName = ocrRecordEO.getDocRealName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
log.info("==========SaveEditedFile==========");
|
||||||
|
|
||||||
writer = response.getWriter();
|
writer = response.getWriter();
|
||||||
Scanner scanner = new Scanner(request.getInputStream()).useDelimiter("\\A");
|
Scanner scanner = new Scanner(request.getInputStream()).useDelimiter("\\A");
|
||||||
String body = scanner.hasNext() ? scanner.next() : "";
|
String body = scanner.hasNext() ? scanner.next() : "";
|
||||||
JSONObject jsonObj = (JSONObject) new JSONParser().parse(body);
|
JSONObject jsonObj = (JSONObject) new JSONParser().parse(body);
|
||||||
|
log.info("返回结果:" + jsonObj.toString());
|
||||||
log.info("status:" + jsonObj.get("status"));
|
log.info("status:" + jsonObj.get("status"));
|
||||||
/*
|
/*
|
||||||
0 - no document with the key identifier could be found,
|
0 - no document with the key identifier could be found,
|
||||||
@@ -185,7 +240,16 @@ public class OcrCheckController {
|
|||||||
6 - document is being edited, but the current document state is saved,
|
6 - document is being edited, but the current document state is saved,
|
||||||
7 - error has occurred while force saving the document.
|
7 - error has occurred while force saving the document.
|
||||||
* */
|
* */
|
||||||
if ((long) jsonObj.get("status") == 2) {
|
if ((long) jsonObj.get("status") == 4) {
|
||||||
|
// status=4 没有编辑内容,直接关闭编辑窗口
|
||||||
|
// 校核解锁
|
||||||
|
if(StringUtils.isNotBlank(id)){
|
||||||
|
OcrRecordEO ocrRecordEO = new OcrRecordEO();
|
||||||
|
ocrRecordEO.setId(id);
|
||||||
|
ocrRecordEO.setCheckFlag(CheckFlagEnum.UNLOCK.getValue());
|
||||||
|
ocrRecordService.updateById(ocrRecordEO);
|
||||||
|
}
|
||||||
|
} else if ((long) jsonObj.get("status") == 2) {
|
||||||
/*
|
/*
|
||||||
* 当我们关闭编辑窗口后,十秒钟左右onlyoffice会将它存储的我们的编辑后的文件,,此时status = 2,通过request发给我们,我们需要做的就是接收到文件然后回写该文件。
|
* 当我们关闭编辑窗口后,十秒钟左右onlyoffice会将它存储的我们的编辑后的文件,,此时status = 2,通过request发给我们,我们需要做的就是接收到文件然后回写该文件。
|
||||||
* */
|
* */
|
||||||
@@ -213,17 +277,40 @@ public class OcrCheckController {
|
|||||||
out.flush();
|
out.flush();
|
||||||
}
|
}
|
||||||
connection.disconnect();
|
connection.disconnect();
|
||||||
|
// 校核解锁
|
||||||
|
if(StringUtils.isNotBlank(id)){
|
||||||
|
OcrRecordEO ocrRecordEO = new OcrRecordEO();
|
||||||
|
ocrRecordEO.setId(id);
|
||||||
|
ocrRecordEO.setCheckFlag(CheckFlagEnum.UNLOCK.getValue());
|
||||||
|
// 校核解锁
|
||||||
|
ocrRecordService.updateById(ocrRecordEO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
e.printStackTrace();
|
log.error(e.getMessage());
|
||||||
|
// 校核解锁
|
||||||
|
if(StringUtils.isNotBlank(id)){
|
||||||
|
OcrRecordEO ocrRecordEO = new OcrRecordEO();
|
||||||
|
ocrRecordEO.setId(id);
|
||||||
|
ocrRecordEO.setCheckFlag(CheckFlagEnum.UNLOCK.getValue());
|
||||||
|
ocrRecordService.updateById(ocrRecordEO);
|
||||||
|
}
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
e.printStackTrace();
|
log.error(e.getMessage());
|
||||||
|
// 校核解锁
|
||||||
|
if(StringUtils.isNotBlank(id)){
|
||||||
|
OcrRecordEO ocrRecordEO = new OcrRecordEO();
|
||||||
|
ocrRecordEO.setId(id);
|
||||||
|
ocrRecordEO.setCheckFlag(CheckFlagEnum.UNLOCK.getValue());
|
||||||
|
ocrRecordService.updateById(ocrRecordEO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* status = 1,我们给onlyoffice的服务返回{"error":"0"}的信息,这样onlyoffice会认为回调接口是没问题的,这样就可以在线编辑文档了,否则的话会弹出窗口说明
|
* status = 1,我们给onlyoffice的服务返回{"error":"0"}的信息,这样onlyoffice会认为回调接口是没问题的,这样就可以在线编辑文档了,否则的话会弹出窗口说明
|
||||||
* */
|
* */
|
||||||
writer.write("{\"error\":0}");
|
writer.write("{\"error\":0}");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,6 +129,10 @@ public class OcrRecordEO implements Serializable {
|
|||||||
/**文档库关联文件id*/
|
/**文档库关联文件id*/
|
||||||
@ApiModelProperty(value = "文档库关联文件id")
|
@ApiModelProperty(value = "文档库关联文件id")
|
||||||
private String connectId;
|
private String connectId;
|
||||||
|
|
||||||
|
/**校核锁定标识*/
|
||||||
|
@ApiModelProperty(value = "校核锁定标识")
|
||||||
|
private String checkFlag;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String docRealFile;
|
private String docRealFile;
|
||||||
|
|||||||
+35
@@ -0,0 +1,35 @@
|
|||||||
|
package com.jero.modules.ocr.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: liyawei
|
||||||
|
* @Description:
|
||||||
|
* @Date: Created in 11:20 2022/4/14
|
||||||
|
*/
|
||||||
|
public enum CheckFlagEnum {
|
||||||
|
LOCK("锁定","1"),
|
||||||
|
UNLOCK("解锁","0");
|
||||||
|
|
||||||
|
String name;
|
||||||
|
String value;
|
||||||
|
|
||||||
|
CheckFlagEnum(String name, String value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -22,5 +22,6 @@
|
|||||||
<result column="att_id" property="attId" />
|
<result column="att_id" property="attId" />
|
||||||
<result column="sync_state" property="syncState" />
|
<result column="sync_state" property="syncState" />
|
||||||
<result column="connect_id" property="connectId" />
|
<result column="connect_id" property="connectId" />
|
||||||
|
<result column="check_flag" property="checkFlag" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -138,14 +138,14 @@ spring:
|
|||||||
|
|
||||||
|
|
||||||
# url: jdbc:mysql://10.0.3.44:3306/jero-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
# url: jdbc:mysql://10.0.3.44:3306/jero-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
url: jdbc:mysql://10.10.10.44:3306/laws_weilai_test?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
|
# url: jdbc:mysql://10.10.10.44:3306/laws_weilai_test?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
|
||||||
username: root
|
|
||||||
password: 123456
|
|
||||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
# url: jdbc:mysql://121.36.69.172:3307/laws_weilai?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
|
|
||||||
# url: jdbc:mysql://121.36.69.172:3307/laws_weilai_zhn?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
|
||||||
# username: root
|
# username: root
|
||||||
# password: hzwlsoft.com
|
# password: 123456
|
||||||
|
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://121.36.69.172:3307/laws_weilai?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
|
||||||
|
# url: jdbc:mysql://121.36.69.172:3307/laws_weilai_zhn?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
|
username: root
|
||||||
|
password: hzwlsoft.com
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 多数据源配置
|
# 多数据源配置
|
||||||
#multi-datasource1:
|
#multi-datasource1:
|
||||||
|
|||||||
@@ -54,8 +54,9 @@
|
|||||||
populateIframe(iframe, headers) {
|
populateIframe(iframe, headers) {
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
let fileName= this.$route.query.fileName
|
let fileName= this.$route.query.fileName
|
||||||
|
let id=this.$route.query.id
|
||||||
// xhr.open("GET", 'http://10.0.1.31:8080/jero-boot/ocr/pageOffice/word');
|
// xhr.open("GET", 'http://10.0.1.31:8080/jero-boot/ocr/pageOffice/word');
|
||||||
xhr.open("GET", '/jero-boot/ocr/ocrCheck/editorFile?fileName='+fileName);
|
xhr.open("GET", '/jero-boot/ocr/ocrCheck/editorFile?fileName='+fileName+'&id='+id);
|
||||||
xhr.responseType = "blob";
|
xhr.responseType = "blob";
|
||||||
headers.forEach((header) => {
|
headers.forEach((header) => {
|
||||||
xhr.setRequestHeader(header[0], header[1]);
|
xhr.setRequestHeader(header[0], header[1]);
|
||||||
|
|||||||
@@ -1,83 +1,85 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="ocr">
|
<div class="ocr">
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<div class="table-page-search-wrapper">
|
<a-spin :spinning="loading">
|
||||||
<search :flag="'2'" :url="url"/>
|
<div class="table-page-search-wrapper">
|
||||||
</div>
|
<search :flag="'2'" :url="url"/>
|
||||||
<div class="table-operator">
|
|
||||||
<div class="operator-text" @click="handleUpload" v-has="'ocr:ocrRestful:addOcrRecord'">
|
|
||||||
<a-icon type="plus" />
|
|
||||||
{{ $t('upload1') }}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="operator-text" @click="handleFileExport" v-has="'document:ocrPageInfo'">
|
<div class="table-operator">
|
||||||
<a-icon type="export" />
|
<div class="operator-text" @click="handleUpload" v-has="'ocr:ocrRestful:addOcrRecord'">
|
||||||
{{ $t('RetrieveFiles') }}
|
<a-icon type="plus" />
|
||||||
|
{{ $t('upload1') }}
|
||||||
|
</div>
|
||||||
|
<div class="operator-text" @click="handleFileExport" v-has="'document:ocrPageInfo'">
|
||||||
|
<a-icon type="export" />
|
||||||
|
{{ $t('RetrieveFiles') }}
|
||||||
|
</div>
|
||||||
|
<div class="operator-text" @click="handleDel" v-has="'ocr:ocrRecord:deleteBatch'">
|
||||||
|
<a-icon type="delete" />
|
||||||
|
{{ $t('BatchDelete') }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="operator-text" @click="handleDel" v-has="'ocr:ocrRecord:deleteBatch'">
|
|
||||||
<a-icon type="delete" />
|
<!-- 上传弹框-->
|
||||||
{{ $t('BatchDelete') }}
|
<a-modal
|
||||||
|
class="show-content"
|
||||||
|
:title="$t('UploadFile')"
|
||||||
|
:visible="fileVisible"
|
||||||
|
:confirm-loading="confirmLoading"
|
||||||
|
@ok="modalOk"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
>
|
||||||
|
<addForm
|
||||||
|
ref="fileForm"
|
||||||
|
@addFormClick="addFormClick"
|
||||||
|
:flag="'2'"
|
||||||
|
v-if="fileVisible"
|
||||||
|
:url="url">
|
||||||
|
</addForm>
|
||||||
|
</a-modal>
|
||||||
|
|
||||||
|
<!-- 同步弹框-->
|
||||||
|
<a-modal
|
||||||
|
class="show-content"
|
||||||
|
:title="$t('SyncLibrary')"
|
||||||
|
v-if="toVisible"
|
||||||
|
:visible="toVisible"
|
||||||
|
:confirm-loading="confirmLoading"
|
||||||
|
@ok="handleOkTo"
|
||||||
|
@cancel="handleCancelTo"
|
||||||
|
>
|
||||||
|
<p style="text-align: center">{{$t('sureSynchronize')}}</p>
|
||||||
|
</a-modal>
|
||||||
|
<!-- 校核弹框-->
|
||||||
|
<a-modal
|
||||||
|
class="show-content"
|
||||||
|
:title="$t('check')"
|
||||||
|
v-if="checkVisible"
|
||||||
|
:visible="checkVisible"
|
||||||
|
:confirm-loading="confirmLoading"
|
||||||
|
@ok="handleOkCheck"
|
||||||
|
@cancel="handleCancelCheck"
|
||||||
|
>
|
||||||
|
<p style="text-align: center">{{$t('sureVerified')}}</p>
|
||||||
|
</a-modal>
|
||||||
|
<div class="table-detail">
|
||||||
|
<tableData
|
||||||
|
:flag="'2'"
|
||||||
|
:OperationList="OperationList"
|
||||||
|
@actionSynchron="actionSynchron"
|
||||||
|
:url="url"
|
||||||
|
showAction
|
||||||
|
@actionCheck="actionCheck"
|
||||||
|
@actionDown="actionDown"
|
||||||
|
@onSelectChange="onSelectChange"
|
||||||
|
@actionDelete="actionDelete"
|
||||||
|
@detailClick="detailClick"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 上传弹框-->
|
<doc-table v-if="drawVisible" :drawVisible="drawVisible" :drawTableSorce="drawTableSorce" @visible="docVisible" @exportVisible="exportVisible"></doc-table>
|
||||||
<a-modal
|
<!-- <ocr-upload ref="uploadFile1" :disabled="disabled" :accept="accept" :listType='listType' @uploadSuccess="uploadSuccess"></ocr-upload>-->
|
||||||
class="show-content"
|
</a-spin>
|
||||||
:title="$t('UploadFile')"
|
|
||||||
:visible="fileVisible"
|
|
||||||
:confirm-loading="confirmLoading"
|
|
||||||
@ok="modalOk"
|
|
||||||
@cancel="handleCancel"
|
|
||||||
>
|
|
||||||
<addForm
|
|
||||||
ref="fileForm"
|
|
||||||
@addFormClick="addFormClick"
|
|
||||||
:flag="'2'"
|
|
||||||
v-if="fileVisible"
|
|
||||||
:url="url">
|
|
||||||
</addForm>
|
|
||||||
</a-modal>
|
|
||||||
|
|
||||||
<!-- 同步弹框-->
|
|
||||||
<a-modal
|
|
||||||
class="show-content"
|
|
||||||
:title="$t('SyncLibrary')"
|
|
||||||
v-if="toVisible"
|
|
||||||
:visible="toVisible"
|
|
||||||
:confirm-loading="confirmLoading"
|
|
||||||
@ok="handleOkTo"
|
|
||||||
@cancel="handleCancelTo"
|
|
||||||
>
|
|
||||||
<p style="text-align: center">{{$t('sureSynchronize')}}</p>
|
|
||||||
</a-modal>
|
|
||||||
<!-- 校核弹框-->
|
|
||||||
<a-modal
|
|
||||||
class="show-content"
|
|
||||||
:title="$t('check')"
|
|
||||||
v-if="checkVisible"
|
|
||||||
:visible="checkVisible"
|
|
||||||
:confirm-loading="confirmLoading"
|
|
||||||
@ok="handleOkCheck"
|
|
||||||
@cancel="handleCancelCheck"
|
|
||||||
>
|
|
||||||
<p style="text-align: center">{{$t('sureVerified')}}</p>
|
|
||||||
</a-modal>
|
|
||||||
<div class="table-detail">
|
|
||||||
<tableData
|
|
||||||
:flag="'2'"
|
|
||||||
:OperationList="OperationList"
|
|
||||||
@actionSynchron="actionSynchron"
|
|
||||||
:url="url"
|
|
||||||
showAction
|
|
||||||
@actionCheck="actionCheck"
|
|
||||||
@actionDown="actionDown"
|
|
||||||
@onSelectChange="onSelectChange"
|
|
||||||
@actionDelete="actionDelete"
|
|
||||||
@detailClick="detailClick"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<doc-table v-if="drawVisible" :drawVisible="drawVisible" :drawTableSorce="drawTableSorce" @visible="docVisible" @exportVisible="exportVisible"></doc-table>
|
|
||||||
<!-- <ocr-upload ref="uploadFile1" :disabled="disabled" :accept="accept" :listType='listType' @uploadSuccess="uploadSuccess"></ocr-upload>-->
|
|
||||||
</a-card>
|
</a-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -159,6 +161,7 @@
|
|||||||
listType:'text',
|
listType:'text',
|
||||||
token:Vue.ls.get(ACCESS_TOKEN),
|
token:Vue.ls.get(ACCESS_TOKEN),
|
||||||
websock: null,
|
websock: null,
|
||||||
|
loading:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props:{
|
props:{
|
||||||
@@ -308,16 +311,36 @@
|
|||||||
//校核
|
//校核
|
||||||
actionCheck(val){
|
actionCheck(val){
|
||||||
// this.checkVisible=true
|
// this.checkVisible=true
|
||||||
let newUrl = this.$router.resolve({
|
this.loading=true
|
||||||
path: '/ocr/ocrSplit',
|
axios({
|
||||||
query:{
|
url: '/jero-boot/ocr/ocrCheck/verifyCheckFlag',
|
||||||
fileName: val.docRealName
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
id:val.id
|
||||||
|
},
|
||||||
|
headers: {
|
||||||
|
'X-Access-Token':this.token
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// this.$router.push({
|
.then( (res) => {
|
||||||
// path:'/ocr/ocrSplit'
|
if (res.data.success) {
|
||||||
// })
|
let newUrl = this.$router.resolve({
|
||||||
window.open(newUrl.href, '_blank')
|
path: '/ocr/ocrSplit',
|
||||||
|
query:{
|
||||||
|
fileName: val.docRealName,
|
||||||
|
id:val.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
window.open(newUrl.href, '_blank')
|
||||||
|
}else{
|
||||||
|
this.$message.error(res.data.message)
|
||||||
|
}
|
||||||
|
}).finally(()=>{
|
||||||
|
this.loading=false
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
//下载
|
//下载
|
||||||
actionDown(val){
|
actionDown(val){
|
||||||
|
|||||||
@@ -20,16 +20,16 @@
|
|||||||
<template #title="{ key: treeKey, title, record }">
|
<template #title="{ key: treeKey, title, record }">
|
||||||
<a-dropdown :trigger="['contextmenu']">
|
<a-dropdown :trigger="['contextmenu']">
|
||||||
<!-- <span>{{ title }}</span>-->
|
<!-- <span>{{ title }}</span>-->
|
||||||
<span v-if="title.indexOf(searchValue) >= -1 " :title="title" class="expand-title">
|
<span v-if="title.indexOf(searchValue) >= -1 && title.length <= 18" :title="title" class="expand-title">
|
||||||
{{ title.substr(0, title.indexOf(searchValue)) }}<span style="color: #f50">{{ searchValue }}</span>{{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
|
{{ title.substr(0, title.indexOf(searchValue)) }}<span style="color: #f50">{{ searchValue }}</span>{{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
|
||||||
</span>
|
</span>
|
||||||
<!-- <span v-else-if="title.indexOf(searchValue) >= -1 && title.length > 18 && title.indexOf(searchValue)>18" :title="title">-->
|
<span v-else-if="title.indexOf(searchValue) >= -1 && title.length > 18 && title.indexOf(searchValue)>18" :title="title">
|
||||||
<!-- {{title && title.length > 18?title.slice(0,17)+'...':title}}-->
|
{{title && title.length > 18?title.slice(0,17)+'...':title}}
|
||||||
<!-- </span>-->
|
</span>
|
||||||
<!-- <span v-else-if="title.indexOf(searchValue) >= -1 && title.length > 18 && title.indexOf(searchValue)<=18" :title="title">-->
|
<span v-else-if="title.indexOf(searchValue) >= -1 && title.length > 18 && title.indexOf(searchValue)<=18" :title="title">
|
||||||
<!-- {{ title.substr(0, title.indexOf(searchValue)) }}<span style="color: #f50">{{ title.indexOf(searchValue)+searchValue.length>18?searchValue.substr(0,18-title.indexOf(searchValue)) : searchValue }}</span>{{ title.indexOf(searchValue)+searchValue.length>18?'...': title.substr(title.indexOf(searchValue) + searchValue.length,18-title.indexOf(searchValue) - searchValue.length)+'...' }}-->
|
{{ title.substr(0, title.indexOf(searchValue)) }}<span style="color: #f50">{{ title.indexOf(searchValue)+searchValue.length>18?searchValue.substr(0,18-title.indexOf(searchValue)) : searchValue }}</span>{{ title.indexOf(searchValue)+searchValue.length>18?'...': title.substr(title.indexOf(searchValue) + searchValue.length,18-title.indexOf(searchValue) - searchValue.length)+'...' }}
|
||||||
|
|
||||||
<!-- </span>-->
|
</span>
|
||||||
<span v-else :title="title">
|
<span v-else :title="title">
|
||||||
{{title && title.length > 18?title.slice(0,17)+'...':title}}
|
{{title && title.length > 18?title.slice(0,17)+'...':title}}
|
||||||
</span>
|
</span>
|
||||||
@@ -1133,13 +1133,14 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
.split-detail-left{
|
.split-detail-left{
|
||||||
|
min-width: 300px;
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
border-right: 1px solid #E6E7EC;
|
border-right: 1px solid #E6E7EC;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
.split-detail-left-tree{
|
.split-detail-left-tree{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-item{
|
.menu-item{
|
||||||
padding: 2px 8px;
|
padding: 2px 8px;
|
||||||
border: 1px solid #000000;
|
border: 1px solid #000000;
|
||||||
@@ -1240,31 +1241,36 @@
|
|||||||
}
|
}
|
||||||
.split-detail-left{
|
.split-detail-left{
|
||||||
|
|
||||||
.ant-tree-node-content-wrapper-normal{
|
.ant-tree-node-content-wrapper-normal{
|
||||||
|
|
||||||
|
}
|
||||||
|
ant-tree-node-content-wrapper{
|
||||||
|
.expand-title{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ant-tree-title{
|
||||||
|
span{
|
||||||
|
display: block;
|
||||||
|
width: auto;
|
||||||
|
overflow:hidden;
|
||||||
|
text-overflow:ellipsis;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.ant-tree-child-tree{
|
||||||
|
.ant-tree-title{
|
||||||
|
span{
|
||||||
|
display: block;
|
||||||
|
width: auto;
|
||||||
|
overflow:hidden;
|
||||||
|
text-overflow:ellipsis;
|
||||||
|
|
||||||
}
|
}
|
||||||
.ant-tree-title{
|
|
||||||
span{
|
|
||||||
display: block;
|
|
||||||
width: 240px;
|
|
||||||
overflow:hidden;
|
|
||||||
text-overflow:ellipsis;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
.ant-tree-child-tree{
|
|
||||||
.ant-tree-title{
|
|
||||||
span{
|
|
||||||
display: block;
|
|
||||||
width: 240px;
|
|
||||||
overflow:hidden;
|
|
||||||
text-overflow:ellipsis;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.split-detail-table{
|
.split-detail-table{
|
||||||
|
|||||||
@@ -13,14 +13,15 @@
|
|||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="title-text-text" :title="$t('scopeOfApplication')">{{$t('scopeOfApplication')}}</span>
|
<span class="title-text-text"
|
||||||
|
:title="$t('implementationCategory')">{{$t('implementationCategory')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel">
|
<a-form-model-item class="itemModel">
|
||||||
<j-dict-select-tag class="box-input" v-model="formInline.shi4Yong4Fan4Wei2"
|
<j-dict-select-tag class="box-input" v-model="formInline.implementType"
|
||||||
@input="handleInput('shi4Yong4Fan4Wei2')"
|
@input="handleInput('implementType')"
|
||||||
:placeholder="$t('PleaseSelect')+$t('scopeOfApplication')"
|
:placeholder="$t('PleaseSelect')+$t('implementationCategory')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false" dictCode="apply_scope"/>
|
:triggerChange="false" dictCode="implement_type"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -34,7 +35,7 @@
|
|||||||
@input="handleInput('attestationType')"
|
@input="handleInput('attestationType')"
|
||||||
:placeholder="$t('PleaseSelect')+$t('certificationType')"
|
:placeholder="$t('PleaseSelect')+$t('certificationType')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false" dictCode=""/>
|
:triggerChange="false" dictCode="attestation_type"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -48,7 +49,7 @@
|
|||||||
@input="handleInput('attestationRank')"
|
@input="handleInput('attestationRank')"
|
||||||
:placeholder="$t('PleaseSelect')+$t('certificationLevel')"
|
:placeholder="$t('PleaseSelect')+$t('certificationLevel')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false" dictCode=""/>
|
:triggerChange="false" dictCode="attestation_rank"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -108,7 +109,7 @@
|
|||||||
this.$message.success(this.$t('OperationSuccessful'))
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
this.visible = false
|
this.visible = false
|
||||||
this.confirmLoading = false
|
this.confirmLoading = false
|
||||||
this.$emit('editModelList')
|
this.$emit('batSettingList')
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(this.$t('operationFailed'))
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
this.confirmLoading = false
|
this.confirmLoading = false
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="WVTAID">
|
<a-form-model-item class="itemModel" prop="WVTAID">
|
||||||
<a-input class="box-input"
|
<a-input class="box-input"
|
||||||
:disabled="true"
|
:disabled="false"
|
||||||
v-model="formInline.wvtaId"
|
v-model="formInline.wvtaId"
|
||||||
:placeholder="$t('PleaseEnter')+'WVTA ID'"/>
|
:placeholder="$t('PleaseEnter')+'WVTA ID'"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
@@ -175,12 +175,15 @@
|
|||||||
:title="$t('technicalField')">{{$t('technicalField')}}</span>
|
:title="$t('technicalField')">{{$t('technicalField')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="technologyTerritory">
|
<a-form-model-item class="itemModel" prop="technologyTerritory">
|
||||||
<j-dict-select-tag class="box-input" v-model="formInline.technologyTerritory"
|
<a-tree-select
|
||||||
:disabled="disabled"
|
v-model="formInline.technologyTerritory"
|
||||||
@input="handleInput('technologyTerritory')"
|
:maxTagCount="1"
|
||||||
:placeholder="$t('PleaseSelect')+$t('technicalField')"
|
class="box-input"
|
||||||
:type="'select'"
|
style="width: 100%"
|
||||||
:triggerChange="false" :dictCode="'technology_territory'"/>
|
:tree-data="CategoryTreeList"
|
||||||
|
tree-checkable
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('technicalField')"
|
||||||
|
/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -299,7 +302,7 @@
|
|||||||
@input="handleInput('designInitiator')"
|
@input="handleInput('designInitiator')"
|
||||||
:placeholder="$t('PleaseSelect')+$t('Sponsor')"
|
:placeholder="$t('PleaseSelect')+$t('Sponsor')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false" :dictCode="'dict_field'"/>
|
:triggerChange="false" :dictCode="'fa1_qi3_ren2'"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -315,7 +318,7 @@
|
|||||||
@input="handleInput('designDuty')"
|
@input="handleInput('designDuty')"
|
||||||
:placeholder="$t('PleaseSelect')+$t('personLiable')"
|
:placeholder="$t('PleaseSelect')+$t('personLiable')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false" :dictCode="'dict_field'"/>
|
:triggerChange="false" :dictCode="'ze2_ren4_ren2'"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -371,7 +374,7 @@
|
|||||||
@input="handleInput('prehomoInitiator')"
|
@input="handleInput('prehomoInitiator')"
|
||||||
:placeholder="$t('PleaseSelect')+$t('Sponsor')"
|
:placeholder="$t('PleaseSelect')+$t('Sponsor')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false" :dictCode="'dict_field'"/>
|
:triggerChange="false" :dictCode="'fa1_qi3_ren2'"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -387,7 +390,7 @@
|
|||||||
@input="handleInput('prehomoDuty')"
|
@input="handleInput('prehomoDuty')"
|
||||||
:placeholder="$t('PleaseSelect')+$t('personLiable')"
|
:placeholder="$t('PleaseSelect')+$t('personLiable')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false" :dictCode="'dict_field'"/>
|
:triggerChange="false" :dictCode="'ze2_ren4_ren2'"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -442,7 +445,7 @@
|
|||||||
@input="handleInput('verifyInitiator')"
|
@input="handleInput('verifyInitiator')"
|
||||||
:placeholder="$t('PleaseSelect')+$t('Sponsor')"
|
:placeholder="$t('PleaseSelect')+$t('Sponsor')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false" :dictCode="'dict_field'"/>
|
:triggerChange="false" :dictCode="'fa1_qi3_ren2'"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -458,7 +461,7 @@
|
|||||||
@input="handleInput('verifyDuty')"
|
@input="handleInput('verifyDuty')"
|
||||||
:placeholder="$t('PleaseSelect')+$t('personLiable')"
|
:placeholder="$t('PleaseSelect')+$t('personLiable')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false" :dictCode="'dict_field'"/>
|
:triggerChange="false" :dictCode="'ze2_ren4_ren2'"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -499,16 +502,28 @@
|
|||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
rules: {},
|
rules: {},
|
||||||
formInline: {},
|
formInline: {},
|
||||||
disabled: false
|
disabled: false,
|
||||||
|
CategoryTreeList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.getSysCategoryTree()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getSysCategoryTree() {
|
||||||
|
getAction(this.url.getSysCategoryTree, {}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.CategoryTreeList = res.result
|
||||||
|
} else {
|
||||||
|
this.CategoryTreeList = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
editModel(item) {
|
editModel(item) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.formInline = item || {}
|
this.formInline = item || {}
|
||||||
|
this.formInline.technologyTerritory = this.formInline.technologyTerritory ? this.formInline.technologyTerritory.split(',') : []
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
clickButtonToUpload(item) {
|
clickButtonToUpload(item) {
|
||||||
@@ -539,8 +554,14 @@
|
|||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
|
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||||
|
Object.keys(formInline).forEach(res => {
|
||||||
|
if (formInline[res] && formInline[res] instanceof Array) {
|
||||||
|
formInline[res] = formInline[res].join(',')
|
||||||
|
}
|
||||||
|
})
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
postAction(this.url.editModel, this.formInline).then((res) => {
|
postAction(this.url.editModel, formInline).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
this.visible = false
|
this.visible = false
|
||||||
|
|||||||
@@ -48,8 +48,8 @@
|
|||||||
<div class="title-text" :title="$t('standard')">
|
<div class="title-text" :title="$t('standard')">
|
||||||
<span>{{$t('standard')}}</span>
|
<span>{{$t('standard')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||||
v-model="queryParam.standard"></a-input>
|
v-model="queryParam.standard"></j-input>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
@@ -57,8 +57,8 @@
|
|||||||
<div class="title-text" :title="$t('title')">
|
<div class="title-text" :title="$t('title')">
|
||||||
<span>{{$t('title')}}</span>
|
<span>{{$t('title')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
||||||
v-model="queryParam.title"></a-input>
|
v-model="queryParam.title"></j-input>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
@@ -66,8 +66,8 @@
|
|||||||
<div class="title-text" :title="$t('subtitle')">
|
<div class="title-text" :title="$t('subtitle')">
|
||||||
<span>{{$t('subtitle')}}</span>
|
<span>{{$t('subtitle')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('subtitle')"
|
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('subtitle')"
|
||||||
v-model="queryParam.subtitle"></a-input>
|
v-model="queryParam.subtitle"></j-input>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||||
@@ -131,17 +131,6 @@
|
|||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="page">
|
|
||||||
<a-pagination
|
|
||||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
|
||||||
show-quick-jumper
|
|
||||||
show-size-changer
|
|
||||||
:page-size.sync="pageSize"
|
|
||||||
:total="total"
|
|
||||||
@change="pageOnChange"
|
|
||||||
@showSizeChange="SizeChange"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</a-card>
|
</a-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -175,7 +164,7 @@
|
|||||||
queryParam: {},
|
queryParam: {},
|
||||||
url: {
|
url: {
|
||||||
addModelList: '/document/bussDocumentLibraryEO/queryPageInfoDummy',
|
addModelList: '/document/bussDocumentLibraryEO/queryPageInfoDummy',
|
||||||
page: '/dummy/dummyInventoryInfoEO/page',
|
list: '/dummy/dummyInventoryInfoEO/list',
|
||||||
addModel: '/dummy/dummyInventoryInfoEO/add',
|
addModel: '/dummy/dummyInventoryInfoEO/add',
|
||||||
editModel: '/dummy/dummyInventoryInfoEO/edit',
|
editModel: '/dummy/dummyInventoryInfoEO/edit',
|
||||||
deleteBatch: '/dummy/dummyInventoryInfoEO/deleteBatch',
|
deleteBatch: '/dummy/dummyInventoryInfoEO/deleteBatch',
|
||||||
@@ -183,7 +172,8 @@
|
|||||||
setBatch: '/dummy/dummyInventoryInfoEO/setBatch',
|
setBatch: '/dummy/dummyInventoryInfoEO/setBatch',
|
||||||
importZipUrl: '/dummy/dummyInventoryInfoEO/importData',
|
importZipUrl: '/dummy/dummyInventoryInfoEO/importData',
|
||||||
exportData: '/dummy/dummyInventoryInfoEO/exportData',
|
exportData: '/dummy/dummyInventoryInfoEO/exportData',
|
||||||
exportTemplate: '/dummy/dummyInventoryInfoEO/exportTemplate'
|
exportTemplate: '/dummy/dummyInventoryInfoEO/exportTemplate',
|
||||||
|
getSysCategoryTree: '/sys/category/getSysCategoryTree'
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
@@ -199,7 +189,7 @@
|
|||||||
title: this.$t('standard'),
|
title: this.$t('standard'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'serialNumber',
|
dataIndex: 'serialNumber',
|
||||||
width: 100,
|
width: 180,
|
||||||
fixed: 'left'
|
fixed: 'left'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -249,22 +239,22 @@
|
|||||||
{
|
{
|
||||||
title: this.$t('certificationType'),
|
title: this.$t('certificationType'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'attestationType'
|
dataIndex: 'attestationType_dictText'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('certificationLevel'),
|
title: this.$t('certificationLevel'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'attestationRank'
|
dataIndex: 'attestationRank_dictText'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('technicalField'),
|
title: this.$t('technicalField'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'technologyTerritory'
|
dataIndex: 'technologyTerritoryName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('areaOfResponsibility'),
|
title: this.$t('areaOfResponsibility'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'dutyTerritory'
|
dataIndex: 'dutyTerritory_dictText'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('remarks'),
|
title: this.$t('remarks'),
|
||||||
@@ -277,17 +267,17 @@
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: this.$t('Deliverables'),
|
title: this.$t('Deliverables'),
|
||||||
dataIndex: 'designDeliverableTemplate',
|
dataIndex: 'designDeliverableTemplateName',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('Sponsor'),
|
title: this.$t('Sponsor'),
|
||||||
dataIndex: 'designInitiator',
|
dataIndex: 'designInitiator_dictText',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('personLiable'),
|
title: this.$t('personLiable'),
|
||||||
dataIndex: 'designDuty',
|
dataIndex: 'designDuty_dictText',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -297,17 +287,17 @@
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: this.$t('Deliverables'),
|
title: this.$t('Deliverables'),
|
||||||
dataIndex: 'prehomoDeliverableTemplate',
|
dataIndex: 'prehomoDeliverableTemplateName',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('Sponsor'),
|
title: this.$t('Sponsor'),
|
||||||
dataIndex: 'prehomoInitiator',
|
dataIndex: 'prehomoInitiator_dictText',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('personLiable'),
|
title: this.$t('personLiable'),
|
||||||
dataIndex: 'prehomoDuty',
|
dataIndex: 'prehomoDuty_dictText',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -317,17 +307,17 @@
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: this.$t('Deliverables'),
|
title: this.$t('Deliverables'),
|
||||||
dataIndex: 'verifyDeliverableTemplate',
|
dataIndex: 'verifyDeliverableTemplateName',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('Sponsor'),
|
title: this.$t('Sponsor'),
|
||||||
dataIndex: 'verifyInitiator',
|
dataIndex: 'verifyInitiator_dictText',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('personLiable'),
|
title: this.$t('personLiable'),
|
||||||
dataIndex: 'verifyDuty',
|
dataIndex: 'verifyDuty_dictText',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -341,15 +331,13 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
isTrue: false,
|
isTrue: false
|
||||||
total: 0,
|
|
||||||
pageSize: 10,
|
|
||||||
pageNo: 1
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.title = this.$route.query.title
|
this.title = this.$route.query.title
|
||||||
this.isTrue = this.$route.query.title == '虚拟清单详情' ? false : true
|
this.isTrue = this.$route.query.title == '虚拟清单详情' ? false : true
|
||||||
|
this.getList()
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
columns() {
|
columns() {
|
||||||
@@ -370,12 +358,10 @@
|
|||||||
this.$refs.UpdateLogRef.getList()
|
this.$refs.UpdateLogRef.getList()
|
||||||
},
|
},
|
||||||
searchQuery() {
|
searchQuery() {
|
||||||
this.pageNo = 1
|
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
searchReset() {
|
searchReset() {
|
||||||
this.queryParam = {}
|
this.queryParam = {}
|
||||||
this.pageNo = 1
|
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
//模板下载
|
//模板下载
|
||||||
@@ -417,39 +403,20 @@
|
|||||||
this.$message.warning(this.$t('selectLeastOne'))
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pageOnChange(page, pageSize) {
|
|
||||||
this.pageNo = page
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
SizeChange(page, pageSize) {
|
|
||||||
this.pageNo = 1
|
|
||||||
this.pageSize = pageSize
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
addModelList() {
|
addModelList() {
|
||||||
this.pageNo = 1
|
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
editModelList() {
|
editModelList() {
|
||||||
this.pageNo = 1
|
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
let query = {
|
let query = {
|
||||||
pageNo: this.pageNo,
|
|
||||||
pageSize: this.pageSize,
|
|
||||||
...this.queryParam
|
...this.queryParam
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.page, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
this.dataSource = res.result || []
|
||||||
this.pageNo = res.result.current - 1
|
|
||||||
this.getList()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.dataSource = res.result.records || []
|
|
||||||
this.total = res.result.total
|
|
||||||
this.loading = false
|
this.loading = false
|
||||||
} else {
|
} else {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
@@ -457,7 +424,6 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
batSettingList() {
|
batSettingList() {
|
||||||
this.pageNo = 1
|
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
batSettingClick() {
|
batSettingClick() {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<j-dict-select-tag class="box-input" v-model="queryParam.targetMarket"
|
<j-dict-select-tag class="box-input" v-model="queryParam.targetMarket"
|
||||||
:placeholder="$t('PleaseSelect')+$t('targetMarket')"
|
:placeholder="$t('PleaseSelect')+$t('targetMarket')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false" :dictCode="''"/>
|
:triggerChange="false" :dictCode="'region'"/>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<j-dict-select-tag class="box-input" v-model="queryParam.projectStatus"
|
<j-dict-select-tag class="box-input" v-model="queryParam.projectStatus"
|
||||||
:placeholder="$t('PleaseSelect')+$t('projectStatus')"
|
:placeholder="$t('PleaseSelect')+$t('projectStatus')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false" :dictCode="''"/>
|
:triggerChange="false" :dictCode="'project_status'"/>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
<template v-if="toggleSearchStatus">
|
<template v-if="toggleSearchStatus">
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
>
|
>
|
||||||
<span slot="entryName" slot-scope="text,record">
|
<span slot="projectName" slot-scope="text,record">
|
||||||
<a @click="entryNameClick(record)">{{text}}</a>
|
<a @click="entryNameClick(record)">{{text}}</a>
|
||||||
</span>
|
</span>
|
||||||
<span slot="operation" slot-scope="text,record">
|
<span slot="operation" slot-scope="text,record">
|
||||||
@@ -121,7 +121,13 @@
|
|||||||
visible: false,
|
visible: false,
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
url: {},
|
url: {
|
||||||
|
list:'project/projectLibraryBase/list',
|
||||||
|
add:'project/projectLibraryBase/add',
|
||||||
|
edit:'project/projectLibraryBase/edit',
|
||||||
|
deleteBatch:'project/projectLibraryBase/delete',
|
||||||
|
deleteAll:'project/projectLibraryBase/deleteBatch',
|
||||||
|
},
|
||||||
total: 0,
|
total: 0,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
@@ -130,8 +136,8 @@
|
|||||||
{
|
{
|
||||||
title: this.$t('entryName'),
|
title: this.$t('entryName'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'entryName',
|
dataIndex: 'projectName',
|
||||||
scopedSlots: { customRender: 'entryName' }
|
scopedSlots: { customRender: 'projectName' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('targetMarket'),
|
title: this.$t('targetMarket'),
|
||||||
@@ -146,17 +152,17 @@
|
|||||||
{
|
{
|
||||||
title: this.$t('StudioEngineer'),
|
title: this.$t('StudioEngineer'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'StudioEngineer'
|
dataIndex: 'studioEngineer'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('certifiedEngineer'),
|
title: this.$t('certifiedEngineer'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'certifiedEngineer'
|
dataIndex: 'certificationEngineer'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('CertificationTime'),
|
title: this.$t('CertificationTime'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'CertificationTime'
|
dataIndex: 'createTime'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('NTplatform'),
|
title: this.$t('NTplatform'),
|
||||||
|
|||||||
Reference in New Issue
Block a user