Merge branch 'master' into 'fix_20230830'
保存 See merge request laws-nio/laws-weilai!361
This commit is contained in:
+1
-1
@@ -5890,7 +5890,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
if (sheet != null) {
|
||||
StringBuilder headerSb = new StringBuilder();
|
||||
int rowNos = sheet.getLastRowNum();// 得到excel的总记录条数
|
||||
for (int i = 0; i <= rowNos; i++) {// 遍历行
|
||||
for (int i = 0; i <= rowNos; i++) {
|
||||
if (i == 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
+281
@@ -0,0 +1,281 @@
|
||||
package com.jero.modules.project.controller;
|
||||
|
||||
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.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.util.PageUtil;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.entity.ProjectRxswinEO;
|
||||
import com.jero.modules.project.service.IProjectRxswinEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: rxswin表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-08-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="rxswin表")
|
||||
@RestController
|
||||
@RequestMapping("/project/projectRxswinEO")
|
||||
@Slf4j
|
||||
public class ProjectRxswinEOController extends JeroController<ProjectRxswinEO, IProjectRxswinEOService> {
|
||||
@Autowired
|
||||
private IProjectRxswinEOService projectRxswinEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param projectRxswinEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "rxswin表-分页列表查询")
|
||||
@ApiOperation(value="rxswin表-分页列表查询", notes="rxswin表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProjectRxswinEO projectRxswinEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProjectRxswinEO> queryWrapper = QueryGenerator.initQueryWrapper(projectRxswinEO, req.getParameterMap());
|
||||
List<ProjectRxswinEO> projectRxswinEOList = projectRxswinEOService.getPageInfo(projectRxswinEO);
|
||||
Page pages = PageUtil.getPages(pageNo, pageSize, projectRxswinEOList);
|
||||
return Result.OK(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "rxswin表-列表查询")
|
||||
@ApiOperation(value="rxswin表-列表查询", notes="rxswin表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProjectRxswinEO>> queryList() {
|
||||
List<ProjectRxswinEO> list = projectRxswinEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param projectRxswinEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "rxswin表-添加")
|
||||
@ApiOperation(value="rxswin表-添加", notes="rxswin表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProjectRxswinEO projectRxswinEO) {
|
||||
projectRxswinEOService.add(projectRxswinEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param projectRxswinEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "rxswin表-编辑")
|
||||
@ApiOperation(value="rxswin表-编辑", notes="rxswin表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProjectRxswinEO projectRxswinEO) {
|
||||
projectRxswinEOService.editById(projectRxswinEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "rxswin表-通过id删除")
|
||||
@ApiOperation(value="rxswin表-通过id删除", notes="rxswin表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
projectRxswinEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "rxswin表-批量删除")
|
||||
@ApiOperation(value="rxswin表-批量删除", notes="rxswin表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.projectRxswinEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "rxswin表-通过id查询")
|
||||
@ApiOperation(value="rxswin表-通过id查询", notes="rxswin表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProjectRxswinEO projectRxswinEO = projectRxswinEOService.queryById(id);
|
||||
if(projectRxswinEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(projectRxswinEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param projectRxswinEO
|
||||
*/
|
||||
@ApiOperation(value="导出", notes="导出")
|
||||
@RequestMapping(value = "/exportXls",method = RequestMethod.GET)
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProjectRxswinEO projectRxswinEO) {
|
||||
return projectRxswinEOService.exportXls(request,projectRxswinEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
* @param file
|
||||
* @param cut
|
||||
* @param version
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="导入", notes="导入")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(MultipartFile file,String cut,String version,String projectId) {
|
||||
projectRxswinEOService.importExcel(file,cut,version,projectId);
|
||||
return Result.OK("");
|
||||
}
|
||||
|
||||
/**
|
||||
* 调取--第一层
|
||||
*
|
||||
* @param projectRxswinEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "调取--第一层")
|
||||
@ApiOperation(value="调取--第一层", notes="调取--第一层")
|
||||
@GetMapping(value = "/getOnePage")
|
||||
public Result<?> getOnePage(ProjectRxswinEO projectRxswinEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
|
||||
IPage<ProjectLibraryBase> pageList = projectRxswinEOService.getOnePage(pageNo,pageSize,projectRxswinEO);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
/**
|
||||
* 调取--第二层
|
||||
*
|
||||
* @param projectRxswinEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "调取--第二层")
|
||||
@ApiOperation(value="调取--第二层", notes="调取--第二层")
|
||||
@GetMapping(value = "/getTwoPage")
|
||||
public Result<?> getTwoPage(ProjectRxswinEO projectRxswinEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
IPage<ProjectRxswinEO> pageList = projectRxswinEOService.getTwoPage(pageNo,pageSize,projectRxswinEO);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@AutoLog(value = "提交")
|
||||
@ApiOperation(value="提交", notes="提交")
|
||||
@GetMapping(value = "/submitInfo")
|
||||
public Result<?> submitInfo(@RequestParam(name="projectId",required=true) String projectId,
|
||||
@RequestParam(name="ids",required=true) String ids) {
|
||||
projectRxswinEOService.submitInfo(projectId,ids);
|
||||
return Result.OK("提交成功");
|
||||
}
|
||||
|
||||
@AutoLog(value = "覆盖验证")
|
||||
@ApiOperation(value="覆盖验证", notes="覆盖验证")
|
||||
@GetMapping(value = "/iSExist")
|
||||
public Result<?> iSExist(@RequestParam(name="projectId",required=true) String projectId,
|
||||
@RequestParam(name="ids",required=true) String ids) {
|
||||
String iSExist = projectRxswinEOService.iSExist(projectId, ids);
|
||||
return Result.OK(iSExist);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param projectId
|
||||
* @param ids
|
||||
* @param flag flag-->YES覆盖, flag-->NO不覆盖
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "调取后保存数据")
|
||||
@ApiOperation(value="调取后保存数据", notes="调取后保存数据")
|
||||
@GetMapping(value = "/addBatch")
|
||||
public Result<?> addBatch(@RequestParam(name="projectId",required=true) String projectId,
|
||||
@RequestParam(name="ids",required=true) String ids,
|
||||
@RequestParam(name="flag",required=true) String flag) {
|
||||
projectRxswinEOService.addBatch(projectId, ids,flag);
|
||||
return Result.OK("");
|
||||
}
|
||||
|
||||
/**
|
||||
* 对应版本下拉
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对应版本下拉")
|
||||
@ApiOperation(value="对应版本下拉", notes="对应版本下拉")
|
||||
@GetMapping(value = "/getVersionList")
|
||||
public Result<List<String>> getVersionList(String projectId) {
|
||||
List<String> list = projectRxswinEOService.getVersionList(projectId);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "模板下载")
|
||||
@GetMapping(value = "/exportTemplate")
|
||||
public void exportTemplate(@RequestParam Map<String,Object> map, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
projectRxswinEOService.exportTemplate(map, response, request);
|
||||
}
|
||||
|
||||
}
|
||||
+7
@@ -112,6 +112,13 @@ public class ProjectLibraryBase implements Comparable<ProjectLibraryBase> {
|
||||
@TableField(exist = false)
|
||||
private java.lang.String targetMarketName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private java.lang.String targetMarketNameCn;
|
||||
|
||||
@TableField(exist = false)
|
||||
private java.lang.String targetMarketNameEn;
|
||||
|
||||
|
||||
//主项目id parent_id
|
||||
private String parentId;
|
||||
|
||||
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
package com.jero.modules.project.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: rxswin表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-08-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("project_rxswin")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="project_rxswin对象", description="rxswin表")
|
||||
public class ProjectRxswinEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**项目id*/
|
||||
@ApiModelProperty(value = "项目id")
|
||||
private java.lang.String projectId;
|
||||
|
||||
/**文档库id(编号)*/
|
||||
@ApiModelProperty(value = "文档库id(编号)")
|
||||
private java.lang.String documentId;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "编号")
|
||||
@Excel(name = "编号", width = 15)
|
||||
private String serialNumber;
|
||||
|
||||
/**主题*/
|
||||
@Excel(name = "主题", width = 15)
|
||||
@ApiModelProperty(value = "主题")
|
||||
private java.lang.String theme;
|
||||
|
||||
/**RXSWIN*/
|
||||
@Excel(name = "RXSWIN", width = 15)
|
||||
@ApiModelProperty(value = "RXSWIN")
|
||||
private java.lang.String rxswin;
|
||||
|
||||
/**版本*/
|
||||
@Excel(name = "版本", width = 15)
|
||||
@ApiModelProperty(value = "对应版本")
|
||||
private java.lang.String version;
|
||||
|
||||
/**状态(0->保存,1->提交)*/
|
||||
@ApiModelProperty(value = "状态(0->保存,1->提交)")
|
||||
private java.lang.String state;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "中英文切换")
|
||||
private String cut;
|
||||
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "表头排序字段")
|
||||
private java.lang.String orderByField;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "排序")
|
||||
private java.lang.String orderBy;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "行号")
|
||||
private java.lang.Integer number;
|
||||
|
||||
}
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
package com.jero.modules.project.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: rxswin表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-08-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("project_rxswin")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="project_rxswin对象", description="rxswin表")
|
||||
public class ProjectRxswinEOEn implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**项目id*/
|
||||
@ApiModelProperty(value = "项目id")
|
||||
private String projectId;
|
||||
|
||||
/**文档库id(编号)*/
|
||||
@ApiModelProperty(value = "文档库id(编号)")
|
||||
private String documentId;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "编号")
|
||||
@Excel(name = "No.", width = 15)
|
||||
private String serialNumber;
|
||||
|
||||
/**主题*/
|
||||
@Excel(name = "Theme", width = 15)
|
||||
@ApiModelProperty(value = "主题")
|
||||
private String theme;
|
||||
|
||||
/**RXSWIN*/
|
||||
@Excel(name = "RXSWIN", width = 15)
|
||||
@ApiModelProperty(value = "RXSWIN")
|
||||
private String rxswin;
|
||||
|
||||
/**版本*/
|
||||
@Excel(name = "Corresponding version", width = 30)
|
||||
@ApiModelProperty(value = "版本")
|
||||
private String version;
|
||||
|
||||
/**状态(0->保存,1->提交)*/
|
||||
@ApiModelProperty(value = "状态(0->保存,1->提交)")
|
||||
private String state;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "中英文切换")
|
||||
private String cut;
|
||||
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "表头排序字段")
|
||||
private String orderByField;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "排序")
|
||||
private String orderBy;
|
||||
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.jero.modules.project.enums;
|
||||
|
||||
/**
|
||||
* 当前状态枚举类
|
||||
*/
|
||||
public enum RxswinEnum {
|
||||
|
||||
ONE("编号","No."),
|
||||
TWO("主题","Theme"),
|
||||
THREE("RXSWIN","RXSWIN"),
|
||||
FOUR("对应版本","Corresponding version")
|
||||
;
|
||||
|
||||
|
||||
String nameCn;
|
||||
String nameEn;
|
||||
|
||||
private RxswinEnum(String nameCn,String nameEn) {
|
||||
this.nameCn = nameCn;
|
||||
this.nameEn = nameEn;
|
||||
}
|
||||
|
||||
public String getNameCn() {
|
||||
return nameCn;
|
||||
}
|
||||
|
||||
public void setNameCn(String nameCn) {
|
||||
this.nameCn = nameCn;
|
||||
}
|
||||
|
||||
public String getNameEn() {
|
||||
return nameEn;
|
||||
}
|
||||
|
||||
public void setNameEn(String nameEn) {
|
||||
this.nameEn = nameEn;
|
||||
}
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.jero.modules.project.enums;
|
||||
|
||||
/**
|
||||
* 任务状态枚举类
|
||||
*/
|
||||
public enum StatusEnum {
|
||||
SAVE("保存","0"),
|
||||
SUBMIT("提交","1"),
|
||||
COVER_YES("覆盖","YES"),
|
||||
COVER_NO("不覆盖","NO"),
|
||||
;
|
||||
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
private StatusEnum(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;
|
||||
}
|
||||
|
||||
public static String getTextByValue(String value) {
|
||||
StatusEnum[] values = values();
|
||||
for (StatusEnum taskStatusEnum : values) {
|
||||
if (taskStatusEnum.value.equals(value)) {
|
||||
return taskStatusEnum.name;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.jero.modules.project.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.project.entity.ProjectRxswinEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: rxswin表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-08-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ProjectRxswinEOMapper extends BaseMapper<ProjectRxswinEO> {
|
||||
|
||||
List<ProjectLibraryBase> queryProjectLibraryBaseList(@Param("id") String id,
|
||||
@Param("parentId") String parentId);
|
||||
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.project.mapper.ProjectRxswinEOMapper">
|
||||
<resultMap id="ProjectRxswinEOResultMap" type="com.jero.modules.project.entity.ProjectRxswinEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="project_id" property="projectId" />
|
||||
<result column="document_id" property="documentId" />
|
||||
<result column="theme" property="theme" />
|
||||
<result column="rxswin" property="rxswin" />
|
||||
<result column="version" property="version" />
|
||||
<result column="state" property="state" />
|
||||
</resultMap>
|
||||
<select id="queryProjectLibraryBaseList" resultType="com.jero.modules.project.entity.ProjectLibraryBase">
|
||||
SELECT
|
||||
plb.id,
|
||||
plb.project_name_id,
|
||||
pni.project_name AS project_name,
|
||||
pyni.id AS year_name_id,
|
||||
pyni.year_name,
|
||||
plb.target_market,
|
||||
plb.parent_id,
|
||||
plb.project_version,
|
||||
plb.software_version,
|
||||
sdi.item_text targetMarketNameCn,
|
||||
sdi.en_name targetMarketNameEN,
|
||||
plb.create_time
|
||||
FROM
|
||||
project_library_base AS plb
|
||||
LEFT JOIN project_name_info AS pni ON plb.project_name_id = pni.id
|
||||
LEFT JOIN project_year_name_info AS pyni ON plb.year_name_id = pyni.id
|
||||
LEFT JOIN sys_dict_item AS sdi ON sdi.item_value = plb.target_market
|
||||
where plb.parent_id = #{parentId}
|
||||
or plb.id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
package com.jero.modules.project.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.entity.ProjectRxswinEO;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: rxswin表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-08-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IProjectRxswinEOService extends IService<ProjectRxswinEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param projectRxswinEO
|
||||
* @return
|
||||
*/
|
||||
void add(ProjectRxswinEO projectRxswinEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param projectRxswinEO
|
||||
* @return
|
||||
*/
|
||||
void editById(ProjectRxswinEO projectRxswinEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ProjectRxswinEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ProjectRxswinEO> queryList();
|
||||
|
||||
List<ProjectRxswinEO> getPageInfo(ProjectRxswinEO projectRxswinEO);
|
||||
|
||||
/**
|
||||
* 调取--第一层
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param projectRxswinEO
|
||||
* @return
|
||||
*/
|
||||
Page<ProjectLibraryBase> getOnePage(Integer pageNo,Integer pageSize, ProjectRxswinEO projectRxswinEO);
|
||||
|
||||
/**
|
||||
* 调取--第二层
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param projectRxswinEO
|
||||
* @return
|
||||
*/
|
||||
Page<ProjectRxswinEO> getTwoPage(Integer pageNo,Integer pageSize,ProjectRxswinEO projectRxswinEO);
|
||||
|
||||
/**
|
||||
* 提交
|
||||
* @param projectId
|
||||
* @param ids
|
||||
*/
|
||||
void submitInfo(String projectId,String ids);
|
||||
|
||||
/**
|
||||
* 覆盖验证
|
||||
* @param projectId
|
||||
* @param ids
|
||||
*/
|
||||
String iSExist(String projectId,String ids);
|
||||
|
||||
|
||||
void addBatch(String projectId,String ids,String flag);
|
||||
|
||||
List<String> getVersionList(String projectId);
|
||||
|
||||
ModelAndView exportXls(HttpServletRequest request, ProjectRxswinEO projectRxswinEO);
|
||||
|
||||
void exportTemplate(Map<String, Object> map, HttpServletResponse response, HttpServletRequest request);
|
||||
|
||||
void importExcel(MultipartFile file, String cut, String version, String projectId);
|
||||
}
|
||||
+838
@@ -0,0 +1,838 @@
|
||||
package com.jero.modules.project.service.impl;
|
||||
|
||||
import com.aliyuncs.utils.IOUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.PageUtil;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||
import com.jero.modules.dummy.enums.OrderEnum;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.entity.ProjectRxswinEO;
|
||||
import com.jero.modules.project.entity.ProjectRxswinEOEn;
|
||||
import com.jero.modules.project.enums.RxswinEnum;
|
||||
import com.jero.modules.project.enums.StatusEnum;
|
||||
import com.jero.modules.project.mapper.ProjectRxswinEOMapper;
|
||||
import com.jero.modules.project.service.IProjectRxswinEOService;
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCell;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.VerticalAlignment;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.ss.usermodel.WorkbookFactory;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.OutputStream;
|
||||
import java.text.Collator;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: rxswin表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-08-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ProjectRxswinEOServiceImpl extends ServiceImpl<ProjectRxswinEOMapper, ProjectRxswinEO> implements IProjectRxswinEOService {
|
||||
|
||||
@Autowired
|
||||
private ProjectRxswinEOMapper projectRxswinEOMapper;
|
||||
@Autowired
|
||||
private BussDocumentLibraryEOServiceImpl bussDocumentLibraryEOService;
|
||||
@Autowired
|
||||
private ProjectLibraryBaseServiceImpl projectLibraryBaseService;
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param projectRxswinEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(ProjectRxswinEO projectRxswinEO) {
|
||||
//判断主题是否已存在
|
||||
LambdaQueryWrapper<ProjectRxswinEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(ProjectRxswinEO::getProjectId, projectRxswinEO.getProjectId());
|
||||
wrapper.eq(ProjectRxswinEO::getTheme, projectRxswinEO.getTheme());
|
||||
List<ProjectRxswinEO> rxswinEOList = this.list(wrapper);
|
||||
if (!rxswinEOList.isEmpty()) {
|
||||
throw new JeroBootException("主题:" + projectRxswinEO.getTheme() + "已存在,请重新添加");
|
||||
}
|
||||
Date now = new Date();
|
||||
projectRxswinEO.setCreateTime(now);
|
||||
projectRxswinEO.setUpdateTime(now);
|
||||
projectRxswinEO.setState(StatusEnum.SAVE.getValue());
|
||||
save(projectRxswinEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param projectRxswinEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(ProjectRxswinEO projectRxswinEO) {
|
||||
//判断主题是否存在
|
||||
LambdaQueryWrapper<ProjectRxswinEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(ProjectRxswinEO::getProjectId, projectRxswinEO.getProjectId());
|
||||
wrapper.eq(ProjectRxswinEO::getTheme, projectRxswinEO.getTheme());
|
||||
wrapper.ne(ProjectRxswinEO::getId, projectRxswinEO.getId());
|
||||
List<ProjectRxswinEO> rxswinEOList = this.list(wrapper);
|
||||
if (!rxswinEOList.isEmpty()) {
|
||||
throw new JeroBootException("主题:" + projectRxswinEO.getTheme() + "已存在,请重新添加");
|
||||
}
|
||||
Date now = new Date();
|
||||
projectRxswinEO.setUpdateTime(now);
|
||||
projectRxswinEO.setState(StatusEnum.SAVE.getValue());
|
||||
saveOrUpdate(projectRxswinEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProjectRxswinEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProjectRxswinEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProjectRxswinEO> getPageInfo(ProjectRxswinEO projectRxswinEO) {
|
||||
LambdaQueryWrapper<ProjectRxswinEO> wrapper = new LambdaQueryWrapper<>();
|
||||
if (StringUtils.isBlank(projectRxswinEO.getProjectId())) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
wrapper.eq(ProjectRxswinEO::getProjectId, projectRxswinEO.getProjectId());
|
||||
|
||||
if (StringUtils.isNotBlank(projectRxswinEO.getTheme())) {
|
||||
wrapper.like(ProjectRxswinEO::getTheme, projectRxswinEO.getTheme());
|
||||
}
|
||||
if (StringUtils.isNotBlank(projectRxswinEO.getVersion())) {
|
||||
wrapper.eq(ProjectRxswinEO::getVersion, projectRxswinEO.getVersion());
|
||||
}
|
||||
if (StringUtils.isNotBlank(projectRxswinEO.getRxswin())) {
|
||||
wrapper.like(ProjectRxswinEO::getRxswin, projectRxswinEO.getRxswin());
|
||||
}
|
||||
if (StringUtils.isBlank(projectRxswinEO.getOrderByField())) {
|
||||
wrapper.orderByDesc(ProjectRxswinEO::getCreateTime);
|
||||
}
|
||||
List<ProjectRxswinEO> projectRxswinEOList = this.list(wrapper);
|
||||
|
||||
if (!projectRxswinEOList.isEmpty()) {
|
||||
List<String> documentIdList = projectRxswinEOList.stream().map(ProjectRxswinEO::getDocumentId).distinct().collect(Collectors.toList());
|
||||
List<BussDocumentLibraryEO> bussDocumentLibraryEOList = getBussDocumentLibraryEOList(documentIdList);
|
||||
for (ProjectRxswinEO projectRxswinEOTemp : projectRxswinEOList) {
|
||||
List<BussDocumentLibraryEO> collect = bussDocumentLibraryEOList.stream()
|
||||
.filter(e -> e.getId().equals(projectRxswinEOTemp.getDocumentId())).collect(Collectors.toList());
|
||||
if (!collect.isEmpty()) {
|
||||
projectRxswinEOTemp.setSerialNumber(collect.get(0).getSerialNumber());
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(projectRxswinEO.getSerialNumber())) {
|
||||
projectRxswinEOList = projectRxswinEOList.stream()
|
||||
.filter(e -> e.getSerialNumber().contains(projectRxswinEO.getSerialNumber())).collect(Collectors.toList());
|
||||
}
|
||||
heartSort(projectRxswinEO, projectRxswinEOList);
|
||||
}
|
||||
return projectRxswinEOList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 调取--第一层
|
||||
*
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param projectRxswinEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Page<ProjectLibraryBase> getOnePage(Integer pageNo, Integer pageSize, ProjectRxswinEO projectRxswinEO) {
|
||||
ProjectLibraryBase libraryBase = projectLibraryBaseService.getById(projectRxswinEO.getProjectId());
|
||||
String id = "";
|
||||
String parentId = "";
|
||||
if (StringUtils.isBlank(libraryBase.getParentId())) {
|
||||
id = libraryBase.getId();
|
||||
parentId = libraryBase.getId();
|
||||
} else {
|
||||
id = libraryBase.getParentId();
|
||||
parentId = libraryBase.getParentId();
|
||||
}
|
||||
List<ProjectLibraryBase> libraryBaseList = projectRxswinEOMapper.queryProjectLibraryBaseList(id, parentId);
|
||||
for (ProjectLibraryBase projectLibraryBase : libraryBaseList) {
|
||||
//项目名称
|
||||
String projectName = "";
|
||||
if (CutEnum.CN.getValue().equals(projectRxswinEO.getCut())) {
|
||||
projectName = projectLibraryBase.getProjectName() + " " + projectLibraryBase.getYearName()
|
||||
+ "-" + projectLibraryBase.getTargetMarketNameCn() + "-" + projectLibraryBase.getProjectVersion();
|
||||
} else {
|
||||
projectName = projectLibraryBase.getProjectName() + " " + projectLibraryBase.getYearName()
|
||||
+ "-" + projectLibraryBase.getTargetMarketNameEn() + "-" + projectLibraryBase.getProjectVersion();
|
||||
}
|
||||
projectLibraryBase.setProjectName(projectName);
|
||||
}
|
||||
Collections.sort(libraryBaseList);
|
||||
return PageUtil.getPages(pageNo, pageSize, libraryBaseList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 调取--第二层
|
||||
*
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param projectRxswinEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Page<ProjectRxswinEO> getTwoPage(Integer pageNo, Integer pageSize, ProjectRxswinEO projectRxswinEO) {
|
||||
|
||||
LambdaQueryWrapper<ProjectRxswinEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(ProjectRxswinEO::getProjectId, projectRxswinEO.getProjectId());
|
||||
wrapper.eq(ProjectRxswinEO::getState, StatusEnum.SUBMIT.getValue());//提交的
|
||||
|
||||
if (StringUtils.isNotBlank(projectRxswinEO.getTheme())) {
|
||||
wrapper.like(ProjectRxswinEO::getTheme, projectRxswinEO.getTheme());
|
||||
}
|
||||
if (StringUtils.isNotBlank(projectRxswinEO.getVersion())) {
|
||||
wrapper.eq(ProjectRxswinEO::getVersion, projectRxswinEO.getVersion());
|
||||
}
|
||||
if (StringUtils.isNotBlank(projectRxswinEO.getRxswin())) {
|
||||
wrapper.like(ProjectRxswinEO::getRxswin, projectRxswinEO.getRxswin());
|
||||
}
|
||||
if (StringUtils.isBlank(projectRxswinEO.getOrderByField())) {
|
||||
wrapper.orderByDesc(ProjectRxswinEO::getCreateTime);
|
||||
}
|
||||
|
||||
List<ProjectRxswinEO> projectRxswinEOList = this.list(wrapper);
|
||||
|
||||
if (!projectRxswinEOList.isEmpty()) {
|
||||
List<String> documentIdList = projectRxswinEOList.stream().map(ProjectRxswinEO::getDocumentId).distinct().collect(Collectors.toList());
|
||||
List<BussDocumentLibraryEO> bussDocumentLibraryEOList = getBussDocumentLibraryEOList(documentIdList);
|
||||
for (ProjectRxswinEO projectRxswinEOTemp : projectRxswinEOList) {
|
||||
List<BussDocumentLibraryEO> collect = bussDocumentLibraryEOList.stream()
|
||||
.filter(e -> e.getId().equals(projectRxswinEOTemp.getDocumentId())).collect(Collectors.toList());
|
||||
if (!collect.isEmpty()) {
|
||||
projectRxswinEOTemp.setSerialNumber(collect.get(0).getSerialNumber());
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(projectRxswinEO.getSerialNumber())) {
|
||||
projectRxswinEOList = projectRxswinEOList.stream()
|
||||
.filter(e -> e.getSerialNumber().contains(projectRxswinEO.getSerialNumber())).collect(Collectors.toList());
|
||||
}
|
||||
heartSort(projectRxswinEO, projectRxswinEOList);
|
||||
}
|
||||
return PageUtil.getPages(pageNo, pageSize, projectRxswinEOList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交
|
||||
*
|
||||
* @param projectId
|
||||
* @param ids
|
||||
*/
|
||||
@Override
|
||||
public void submitInfo(String projectId, String ids) {
|
||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
LambdaQueryWrapper<ProjectRxswinEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(ProjectRxswinEO::getId, Arrays.asList(ids.split(",")));
|
||||
List<ProjectRxswinEO> rxswinEOList = this.list(wrapper);
|
||||
for (ProjectRxswinEO projectRxswinEO : rxswinEOList) {
|
||||
projectRxswinEO.setUpdateBy(user.getUsername());
|
||||
projectRxswinEO.setState(StatusEnum.SUBMIT.getValue());
|
||||
}
|
||||
this.updateBatchById(rxswinEOList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 覆盖验证
|
||||
*
|
||||
* @param projectId
|
||||
* @param ids
|
||||
*/
|
||||
@Override
|
||||
public String iSExist(String projectId, String ids) {
|
||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
//新增的
|
||||
LambdaQueryWrapper<ProjectRxswinEO> wrapper = new LambdaQueryWrapper<>();
|
||||
// wrapper.eq(ProjectRxswinEO::getProjectId, projectId);
|
||||
wrapper.in(ProjectRxswinEO::getId, Arrays.asList(ids.split(",")));
|
||||
List<ProjectRxswinEO> rxswinEOList = this.list(wrapper);
|
||||
|
||||
//已存在的
|
||||
LambdaQueryWrapper<ProjectRxswinEO> wrapperTemp = new LambdaQueryWrapper<>();
|
||||
wrapperTemp.eq(ProjectRxswinEO::getProjectId, projectId);
|
||||
List<ProjectRxswinEO> rxswinEOS = this.list(wrapperTemp);
|
||||
|
||||
if (!rxswinEOS.isEmpty()) {
|
||||
List<String> themeList = rxswinEOS.stream().map(ProjectRxswinEO::getTheme).collect(Collectors.toList());
|
||||
List<ProjectRxswinEO> projectRxswinEOS = rxswinEOList.stream().filter(e -> themeList.contains(e.getTheme())).collect(Collectors.toList());
|
||||
if (projectRxswinEOS.isEmpty()) {
|
||||
//直接新增
|
||||
saveBatchInfo(projectId, user, rxswinEOList);
|
||||
} else {
|
||||
return "YES";
|
||||
}
|
||||
} else {
|
||||
//直接新增
|
||||
saveBatchInfo(projectId, user, rxswinEOList);
|
||||
}
|
||||
return "NO";
|
||||
}
|
||||
|
||||
private void saveBatchInfo(String projectId, LoginUser user, List<ProjectRxswinEO> rxswinEOList) {
|
||||
for (ProjectRxswinEO projectRxswinEO : rxswinEOList) {
|
||||
projectRxswinEO.setId(UUID.randomUUID().toString().replaceAll("-", ""));
|
||||
projectRxswinEO.setProjectId(projectId);
|
||||
projectRxswinEO.setCreateTime(new Date());
|
||||
projectRxswinEO.setCreateBy(user.getUsername());
|
||||
projectRxswinEO.setState(StatusEnum.SAVE.getValue());
|
||||
}
|
||||
this.saveBatch(rxswinEOList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 调取后保存数据
|
||||
*
|
||||
* @param projectId
|
||||
* @param ids
|
||||
* @param flag
|
||||
*/
|
||||
@Override
|
||||
public void addBatch(String projectId, String ids, String flag) {
|
||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
//新增的
|
||||
LambdaQueryWrapper<ProjectRxswinEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(ProjectRxswinEO::getId, Arrays.asList(ids.split(",")));
|
||||
List<ProjectRxswinEO> rxswinEOList = this.list(wrapper);
|
||||
|
||||
//已存在的
|
||||
LambdaQueryWrapper<ProjectRxswinEO> wrapperTemp = new LambdaQueryWrapper<>();
|
||||
wrapperTemp.eq(ProjectRxswinEO::getProjectId, projectId);
|
||||
List<ProjectRxswinEO> rxswinEOS = this.list(wrapperTemp);
|
||||
|
||||
List<String> themeList = rxswinEOS.stream().map(ProjectRxswinEO::getTheme).collect(Collectors.toList());
|
||||
List<ProjectRxswinEO> yesList = rxswinEOList.stream().filter(e -> themeList.contains(e.getTheme())).collect(Collectors.toList());
|
||||
List<ProjectRxswinEO> noList = rxswinEOList.stream().filter(e -> !themeList.contains(e.getTheme())).collect(Collectors.toList());
|
||||
|
||||
|
||||
if (StatusEnum.COVER_YES.getValue().equals(flag)) {
|
||||
//未存在的进行新增
|
||||
saveBatchInfo(projectId, user, noList);
|
||||
|
||||
for (ProjectRxswinEO projectRxswinEO : yesList) {
|
||||
List<ProjectRxswinEO> collect = rxswinEOS.stream()
|
||||
.filter(e -> projectRxswinEO.getTheme().equals(e.getTheme())).collect(Collectors.toList());
|
||||
if (!collect.isEmpty()) {
|
||||
projectRxswinEO.setId(collect.get(0).getId());
|
||||
projectRxswinEO.setCreateTime(collect.get(0).getCreateTime());
|
||||
}
|
||||
projectRxswinEO.setUpdateTime(new Date());
|
||||
projectRxswinEO.setCreateBy(user.getUsername());
|
||||
projectRxswinEO.setState(StatusEnum.SAVE.getValue());
|
||||
projectRxswinEO.setProjectId(projectId);
|
||||
}
|
||||
//已存在的进行覆盖
|
||||
this.updateBatchById(yesList);
|
||||
|
||||
|
||||
} else if (StatusEnum.COVER_NO.getValue().equals(flag)) {
|
||||
saveBatchInfo(projectId, user, noList);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getVersionList(String projectId) {
|
||||
LambdaQueryWrapper<ProjectRxswinEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(ProjectRxswinEO::getProjectId, projectId);
|
||||
List<ProjectRxswinEO> rxswinEOList = this.list(wrapper);
|
||||
List<String> versionList = rxswinEOList.stream()
|
||||
.filter(e -> StringUtils.isNotBlank(e.getVersion()))
|
||||
.map(ProjectRxswinEO::getVersion).distinct().collect(Collectors.toList());
|
||||
Collections.sort(versionList, (a, b) -> {
|
||||
return Integer.parseInt(a) - Integer.parseInt(b);
|
||||
});
|
||||
return versionList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProjectRxswinEO projectRxswinEO) {
|
||||
// Step.2 获取导出数据
|
||||
List<ProjectRxswinEO> pageList = getPageInfo(projectRxswinEO);
|
||||
List<ProjectRxswinEO> exportList = null;
|
||||
|
||||
// 过滤选中数据
|
||||
String selections = request.getParameter("selections");
|
||||
if (oConvertUtils.isNotEmpty(selections)) {
|
||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||
exportList = pageList.stream().filter(e -> selectionList.contains(e.getId())).collect(Collectors.toList());
|
||||
} else {
|
||||
exportList = pageList;
|
||||
}
|
||||
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
if (CutEnum.CN.getValue().equals(projectRxswinEO.getCut())) {
|
||||
mv.addObject(NormalExcelConstants.CLASS, ProjectRxswinEO.class);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
||||
ExportParams exportParams = new ExportParams(null, null, "RXSWIN");
|
||||
mv.addObject(NormalExcelConstants.PARAMS, exportParams);
|
||||
} else {
|
||||
List<ProjectRxswinEOEn> dataList = new ArrayList<>();
|
||||
for (ProjectRxswinEO projectRxswinEOTemp : exportList) {
|
||||
ProjectRxswinEOEn projectRxswinEOEn = new ProjectRxswinEOEn();
|
||||
BeanUtils.copyProperties(projectRxswinEOTemp, projectRxswinEOEn);
|
||||
dataList.add(projectRxswinEOEn);
|
||||
}
|
||||
mv.addObject(NormalExcelConstants.CLASS, ProjectRxswinEOEn.class);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, dataList);
|
||||
ExportParams exportParams = new ExportParams(null, null, "RXSWIN");
|
||||
mv.addObject(NormalExcelConstants.PARAMS, exportParams);
|
||||
}
|
||||
return mv;
|
||||
}
|
||||
|
||||
|
||||
public List<BussDocumentLibraryEO> getBussDocumentLibraryEOList(List<String> documentIdList) {
|
||||
LambdaQueryWrapper<BussDocumentLibraryEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(BussDocumentLibraryEO::getId, documentIdList);
|
||||
return bussDocumentLibraryEOService.list(wrapper);
|
||||
}
|
||||
|
||||
private void heartSort(ProjectRxswinEO projectRxswinEO, List<ProjectRxswinEO> projectRxswinEOList) {
|
||||
Collator comparator = Collator.getInstance(Locale.CHINESE);
|
||||
// 编号
|
||||
if ("serialNumber".equals(projectRxswinEO.getOrderByField())) {
|
||||
if (OrderEnum.POSITIVE.getValue().equals(projectRxswinEO.getOrderBy())) {
|
||||
Collections.sort(projectRxswinEOList, (e1, e2) -> {
|
||||
String e1PlannedBpLaunchBatch = com.jero.modules.system.util.StringUtils.isNotBlank(e1.getSerialNumber()) ? e1.getSerialNumber() : "";
|
||||
String e2PlannedBpLaunchBatch = com.jero.modules.system.util.StringUtils.isNotBlank(e2.getSerialNumber()) ? e2.getSerialNumber() : "";
|
||||
return comparator.compare(e1PlannedBpLaunchBatch, e2PlannedBpLaunchBatch);
|
||||
});
|
||||
} else if (OrderEnum.REVERSE.getValue().equals(projectRxswinEO.getOrderBy())) {
|
||||
Collections.sort(projectRxswinEOList, (e1, e2) -> {
|
||||
String e1PlannedBpLaunchBatch = com.jero.modules.system.util.StringUtils.isNotBlank(e1.getSerialNumber()) ? e1.getSerialNumber() : "";
|
||||
String e2PlannedBpLaunchBatch = com.jero.modules.system.util.StringUtils.isNotBlank(e2.getSerialNumber()) ? e2.getSerialNumber() : "";
|
||||
return comparator.compare(e2PlannedBpLaunchBatch, e1PlannedBpLaunchBatch);
|
||||
});
|
||||
}
|
||||
}
|
||||
// 主题
|
||||
if ("theme".equals(projectRxswinEO.getOrderByField())) {
|
||||
if (OrderEnum.POSITIVE.getValue().equals(projectRxswinEO.getOrderBy())) {
|
||||
Collections.sort(projectRxswinEOList, (e1, e2) -> {
|
||||
String e1Market = com.jero.modules.system.util.StringUtils.isNotBlank(e1.getTheme()) ? e1.getTheme() : "";
|
||||
String e2Market = com.jero.modules.system.util.StringUtils.isNotBlank(e2.getTheme()) ? e2.getTheme() : "";
|
||||
return comparator.compare(e1Market, e2Market);
|
||||
});
|
||||
} else if (OrderEnum.REVERSE.getValue().equals(projectRxswinEO.getOrderBy())) {
|
||||
Collections.sort(projectRxswinEOList, (e1, e2) -> {
|
||||
String e1Market = com.jero.modules.system.util.StringUtils.isNotBlank(e1.getTheme()) ? e1.getTheme() : "";
|
||||
String e2Market = com.jero.modules.system.util.StringUtils.isNotBlank(e2.getTheme()) ? e2.getTheme() : "";
|
||||
return comparator.compare(e2Market, e1Market);
|
||||
});
|
||||
}
|
||||
}
|
||||
//RXSWIN
|
||||
if ("rxswin".equals(projectRxswinEO.getOrderByField())) {
|
||||
if (OrderEnum.POSITIVE.getValue().equals(projectRxswinEO.getOrderBy())) {
|
||||
Collections.sort(projectRxswinEOList, (e1, e2) -> {
|
||||
String e1Market = com.jero.modules.system.util.StringUtils.isNotBlank(e1.getRxswin()) ? e1.getRxswin() : "";
|
||||
String e2Market = com.jero.modules.system.util.StringUtils.isNotBlank(e2.getRxswin()) ? e2.getRxswin() : "";
|
||||
return comparator.compare(e1Market, e2Market);
|
||||
});
|
||||
} else if (OrderEnum.REVERSE.getValue().equals(projectRxswinEO.getOrderBy())) {
|
||||
Collections.sort(projectRxswinEOList, (e1, e2) -> {
|
||||
String e1Market = com.jero.modules.system.util.StringUtils.isNotBlank(e1.getRxswin()) ? e1.getRxswin() : "";
|
||||
String e2Market = com.jero.modules.system.util.StringUtils.isNotBlank(e2.getRxswin()) ? e2.getRxswin() : "";
|
||||
return comparator.compare(e2Market, e1Market);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//对应版本
|
||||
if ("version".equals(projectRxswinEO.getOrderByField())) {
|
||||
if (OrderEnum.POSITIVE.getValue().equals(projectRxswinEO.getOrderBy())) {
|
||||
Collections.sort(projectRxswinEOList, (e1, e2) -> {
|
||||
String e1Market = com.jero.modules.system.util.StringUtils.isNotBlank(e1.getVersion()) ? e1.getVersion() : "";
|
||||
String e2Market = com.jero.modules.system.util.StringUtils.isNotBlank(e2.getVersion()) ? e2.getVersion() : "";
|
||||
return comparator.compare(e1Market, e2Market);
|
||||
});
|
||||
} else if (OrderEnum.REVERSE.getValue().equals(projectRxswinEO.getOrderBy())) {
|
||||
Collections.sort(projectRxswinEOList, (e1, e2) -> {
|
||||
String e1Market = com.jero.modules.system.util.StringUtils.isNotBlank(e1.getVersion()) ? e1.getVersion() : "";
|
||||
String e2Market = com.jero.modules.system.util.StringUtils.isNotBlank(e2.getVersion()) ? e2.getVersion() : "";
|
||||
return comparator.compare(e2Market, e1Market);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportTemplate(Map<String, Object> map, HttpServletResponse response, HttpServletRequest request) {
|
||||
OutputStream os = null;
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
String cut = (String) map.get("cut");
|
||||
String sheetName = "";
|
||||
if (com.jero.modules.system.util.StringUtils.equals(cut, CutEnum.CN.getValue())) {
|
||||
sheetName = "RXSWIN";
|
||||
} else {
|
||||
sheetName = "RXSWIN";
|
||||
}
|
||||
String fileOriName = "文档库导入模板.xls";
|
||||
String filePath = uploadpath + File.separator + fileOriName;
|
||||
try {
|
||||
List<String> list = new ArrayList<>();
|
||||
if (CutEnum.CN.getValue().equals((String) map.get("cut"))) {
|
||||
list.add("编号,主题,RXSWIN,对应版本");
|
||||
} else {
|
||||
list.add("No.,Theme,RXSWIN,Corresponding version");
|
||||
}
|
||||
//创建临时文件夹
|
||||
File nowFile = new File(filePath);
|
||||
if (nowFile.exists()) {
|
||||
nowFile.delete();
|
||||
}
|
||||
nowFile.mkdirs();
|
||||
HSSFSheet sheet = workbook.createSheet(sheetName);
|
||||
sheet.setDefaultColumnWidth(16);//列宽
|
||||
HSSFCellStyle cellStyle = workbook.createCellStyle();
|
||||
cellStyle.setWrapText(true);//自动换行
|
||||
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
|
||||
for (int i = 0; i < 1; i++) {
|
||||
//表头
|
||||
Row row = sheet.createRow(i);//开始创建标题行
|
||||
String exportFieldName = list.get(i);
|
||||
if (i == 0) {
|
||||
if (com.jero.modules.system.util.StringUtils.isNotBlank(exportFieldName)) {
|
||||
String[] headerArr = exportFieldName.split(",");
|
||||
for (int j = 0; j < headerArr.length; j++) {
|
||||
row.createCell(j).setCellValue(headerArr[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=\"" + fileOriName + ".xls");
|
||||
response.setContentType("application/force-download");
|
||||
response.flushBuffer();
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
} catch (Exception e) {
|
||||
throw new JeroBootException("下载文件失败,请重试");
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public void importExcel(MultipartFile file, String cut, String version, String projectId) {
|
||||
String title = "";
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
title = "编号,主题,RXSWIN,对应版本";
|
||||
} else {
|
||||
title = "No.,Theme,RXSWIN,Corresponding version";
|
||||
}
|
||||
// 获取文件名
|
||||
String fileName = file.getOriginalFilename();
|
||||
// 获取文件后缀
|
||||
String prefix = fileName.substring(fileName.lastIndexOf("."));
|
||||
if (!(prefix.equals(".xls") || prefix.equals(".xlsx"))) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
throw new JeroBootException("文件格式错误,请导入.xls或.xlsx格式");
|
||||
} else {
|
||||
throw new JeroBootException("The file format is wrong, please import. xls or. xlsx format.");
|
||||
}
|
||||
}
|
||||
Workbook workbook = null;
|
||||
try {
|
||||
File excelFile = File.createTempFile(fileName, prefix);
|
||||
file.transferTo(excelFile);
|
||||
workbook = WorkbookFactory.create(excelFile);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
List<ProjectRxswinEO> projectRxswinEOList = new ArrayList<>();
|
||||
if (workbook != null) {
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
if (sheet != null) {
|
||||
StringBuilder headerSb = new StringBuilder();
|
||||
int rowNos = sheet.getLastRowNum();// 得到excel的总记录条数
|
||||
for (int i = 0; i <= rowNos; i++) {
|
||||
Row row = sheet.getRow(i);
|
||||
Row headerRow = sheet.getRow(0);
|
||||
boolean isBlank = bussDocumentLibraryEOService.isRowEmpty(row);
|
||||
ProjectRxswinEO projectRxswinEO = new ProjectRxswinEO();
|
||||
if (row != null && !isBlank) {
|
||||
int columNos = headerRow.getLastCellNum();// 表头总共的列数
|
||||
for (int j = 0; j < columNos; j++) {
|
||||
Cell cell = row.getCell(j);
|
||||
Cell headerCell = headerRow.getCell(j);
|
||||
if (cell != null) {
|
||||
if (i == 0) {
|
||||
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
|
||||
headerSb.append(cell.getStringCellValue() + ",");
|
||||
} else {
|
||||
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
|
||||
String stringCellValue = cell.getStringCellValue();
|
||||
if (StringUtils.isNotBlank(stringCellValue)) {
|
||||
String replace = stringCellValue.replace(",", ",");
|
||||
rxswinEOSet(projectRxswinEO, headerCell, replace);
|
||||
} else {
|
||||
rxswinEOSet(projectRxswinEO, headerCell, "");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (i != 0) {
|
||||
rxswinEOSet(projectRxswinEO, headerCell, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i != 0) {
|
||||
projectRxswinEOList.add(projectRxswinEO);
|
||||
// dataList.add(rowList);
|
||||
}
|
||||
}
|
||||
}
|
||||
String substring = headerSb.toString();
|
||||
if (substring.endsWith(",") || substring.endsWith(",")) {
|
||||
substring = headerSb.substring(0, headerSb.length() - 1);
|
||||
}
|
||||
String excelHeader = substring.toString();
|
||||
if (!title.equals(excelHeader)) {
|
||||
workbook.close();
|
||||
//删除原上传文件
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
throw new JeroBootException("读取失败,请严格按照模板文件导入数据");
|
||||
} else {
|
||||
throw new JeroBootException("The data fails to be read. Import data strictly according to the template file");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
List<BussDocumentLibraryEO> libraryEOList = bussDocumentLibraryEOService.list();
|
||||
List<String> serialNumberList = libraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
|
||||
|
||||
List<String> msgList = new ArrayList<>();
|
||||
//数据验证
|
||||
dataVerify(cut, projectId, projectRxswinEOList, serialNumberList, msgList);
|
||||
|
||||
if (msgList.size() > 0) {
|
||||
//返回报错信息
|
||||
String html = "";
|
||||
for (String s : msgList) {
|
||||
html += s + "</br>";
|
||||
}
|
||||
throw new JeroBootException(html);
|
||||
} else {
|
||||
for (ProjectRxswinEO projectRxswinEO : projectRxswinEOList) {
|
||||
projectRxswinEO.setProjectId(projectId);
|
||||
projectRxswinEO.setState(StatusEnum.SAVE.getValue());
|
||||
List<BussDocumentLibraryEO> collect = libraryEOList.stream()
|
||||
.filter(e -> e.getSerialNumber().equals(projectRxswinEO.getSerialNumber()))
|
||||
.collect(Collectors.toList());
|
||||
if (!collect.isEmpty()) {
|
||||
projectRxswinEO.setDocumentId(collect.get(0).getId());
|
||||
}
|
||||
}
|
||||
this.saveBatch(projectRxswinEOList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void dataVerify(String cut, String projectId, List<ProjectRxswinEO> projectRxswinEOList, List<String> serialNumberList, List<String> msgList) {
|
||||
List<ProjectRxswinEO> projectRxswinEOListTemp = projectRxswinEOList;
|
||||
int number = 2;
|
||||
int numberTemp = 2;
|
||||
for (ProjectRxswinEO rxswinEO : projectRxswinEOListTemp) {
|
||||
rxswinEO.setNumber(number);
|
||||
number++;
|
||||
}
|
||||
for (ProjectRxswinEO projectRxswinEO : projectRxswinEOList) {
|
||||
projectRxswinEO.setNumber(numberTemp);
|
||||
numberTemp++;
|
||||
}
|
||||
int count = 2;
|
||||
for (ProjectRxswinEO projectRxswinEO : projectRxswinEOList) {
|
||||
StringBuilder errorMsg = new StringBuilder();
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg.append("第" + count + "行:");
|
||||
} else {
|
||||
errorMsg.append(count + " line:");
|
||||
}
|
||||
int countError = 0;
|
||||
List<ProjectRxswinEO> rxswinEOS = projectRxswinEOListTemp.stream()
|
||||
.filter(e -> !e.getNumber().equals(projectRxswinEO.getNumber()) && e.getTheme().equals(projectRxswinEO.getTheme()))
|
||||
.collect(Collectors.toList());
|
||||
if(!rxswinEOS.isEmpty()){
|
||||
List<Integer> numberList = rxswinEOS.stream().map(ProjectRxswinEO::getNumber).collect(Collectors.toList());
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
errorMsg.append(RxswinEnum.TWO.getNameCn()+"与"+StringUtils.join(numberList,",")+"行主题重复,");
|
||||
}else{
|
||||
errorMsg.append(RxswinEnum.TWO.getNameEn()+" and "+StringUtils.join(numberList,",")+" are duplicated,");
|
||||
}
|
||||
|
||||
countError ++;
|
||||
}
|
||||
projectRxswinEOListTemp = projectRxswinEOListTemp.stream().filter(e->!e.getTheme().equals(projectRxswinEO.getTheme())).collect(Collectors.toList());
|
||||
|
||||
String serialNumber = projectRxswinEO.getSerialNumber();
|
||||
String theme = projectRxswinEO.getTheme();
|
||||
String rxswin = projectRxswinEO.getRxswin();
|
||||
String versionTemp = projectRxswinEO.getVersion();
|
||||
LambdaQueryWrapper<ProjectRxswinEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(ProjectRxswinEO::getProjectId, projectId);
|
||||
wrapper.eq(ProjectRxswinEO::getTheme, theme);
|
||||
List<ProjectRxswinEO> rxswinEOList = this.list(wrapper);
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
countError = isMust(errorMsg, RxswinEnum.ONE.getNameCn(), serialNumber, "不能为空,", countError);
|
||||
//验证编号是否存在
|
||||
if (StringUtils.isNotBlank(serialNumber) && !serialNumberList.contains(serialNumber)) {
|
||||
errorMsg.append(RxswinEnum.ONE.getNameCn() + "不存在,");
|
||||
// errorMsg += RxswinEnum.ONE.getNameCn()+"不存在,";
|
||||
countError++;
|
||||
}
|
||||
|
||||
countError = isMust(errorMsg, RxswinEnum.TWO.getNameCn(), theme, "不能为空,", countError);
|
||||
//验证主题是否存在
|
||||
if (!rxswinEOList.isEmpty()) {
|
||||
errorMsg.append(RxswinEnum.TWO.getNameCn() + "已存在,");
|
||||
// errorMsg += RxswinEnum.TWO.getNameCn()+"已存在,";
|
||||
countError++;
|
||||
}
|
||||
|
||||
countError = isMust(errorMsg, RxswinEnum.THREE.getNameCn(), rxswin, "不能为空,", countError);
|
||||
countError = isMust(errorMsg, RxswinEnum.FOUR.getNameCn(), versionTemp, "不能为空,", countError);
|
||||
} else {
|
||||
countError = isMust(errorMsg, RxswinEnum.ONE.getNameEn(), serialNumber, " cannot be empty,", countError);
|
||||
//验证编号是否存在
|
||||
if (StringUtils.isNotBlank(serialNumber) && !serialNumberList.contains(serialNumber)) {
|
||||
errorMsg.append(RxswinEnum.ONE.getNameEn() + " absent,");
|
||||
// errorMsg += RxswinEnum.ONE.getNameEn()+" absent,";
|
||||
countError++;
|
||||
}
|
||||
|
||||
countError = isMust(errorMsg, RxswinEnum.TWO.getNameEn(), theme, " cannot be empty,", countError);
|
||||
//验证主题是否存在
|
||||
if (!rxswinEOList.isEmpty()) {
|
||||
errorMsg.append(RxswinEnum.TWO.getNameEn() + " already exists,");
|
||||
// errorMsg += RxswinEnum.TWO.getNameCn()+" already exists,";
|
||||
countError++;
|
||||
}
|
||||
|
||||
countError = isMust(errorMsg, RxswinEnum.THREE.getNameEn(), rxswin, " cannot be empty,", countError);
|
||||
countError = isMust(errorMsg, RxswinEnum.FOUR.getNameEn(), versionTemp, " cannot be empty,", countError);
|
||||
}
|
||||
if (countError > 0) {
|
||||
if (errorMsg.toString().endsWith(",")) {
|
||||
String substring = errorMsg.substring(0, errorMsg.length() - 1);
|
||||
msgList.add(substring);
|
||||
} else {
|
||||
msgList.add(errorMsg.toString());
|
||||
}
|
||||
}
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
private int isMust(StringBuilder errorMsg, String field, String value, String reminder, int countError) {
|
||||
if (StringUtils.isBlank(value)) {
|
||||
errorMsg.append(field + reminder);
|
||||
// errorMsg += field + reminder;
|
||||
countError++;
|
||||
}
|
||||
return countError;
|
||||
}
|
||||
|
||||
|
||||
private void rxswinEOSet(ProjectRxswinEO projectRxswinEO, Cell headerCell, String replace) {
|
||||
if (RxswinEnum.ONE.getNameCn().equals(headerCell.getStringCellValue())
|
||||
|| RxswinEnum.ONE.getNameEn().equals(headerCell.getStringCellValue())) {
|
||||
projectRxswinEO.setSerialNumber(replace);
|
||||
|
||||
} else if (RxswinEnum.TWO.getNameCn().equals(headerCell.getStringCellValue())
|
||||
|| RxswinEnum.TWO.getNameEn().equals(headerCell.getStringCellValue())) {
|
||||
projectRxswinEO.setTheme(replace);
|
||||
|
||||
} else if (RxswinEnum.THREE.getNameCn().equals(headerCell.getStringCellValue())
|
||||
|| RxswinEnum.THREE.getNameEn().equals(headerCell.getStringCellValue())) {
|
||||
projectRxswinEO.setRxswin(replace);
|
||||
|
||||
} else if (RxswinEnum.FOUR.getNameCn().equals(headerCell.getStringCellValue())
|
||||
|| RxswinEnum.FOUR.getNameEn().equals(headerCell.getStringCellValue())) {
|
||||
projectRxswinEO.setVersion(replace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1929,7 +1929,7 @@ module.exports = {
|
||||
softwareversion:'Software version',
|
||||
softwareplatform:'Software platform',
|
||||
softwarereleasetime:'Software release time',
|
||||
theme:'theme',
|
||||
theme:'Theme',
|
||||
influencestatute:'Influence statute',
|
||||
vdrste:'VDR status',
|
||||
impactdescription:'Impact description',
|
||||
@@ -1955,4 +1955,6 @@ module.exports = {
|
||||
Reasonforreturn:'Reason for return',
|
||||
maintenanceTemplate:'Maintenance template',
|
||||
UserFeedback:'User Feedback',
|
||||
Correspondingversion:'Corresponding version',
|
||||
Listcreationtime:'List creation time',
|
||||
}
|
||||
@@ -3911,4 +3911,6 @@ module.exports = {
|
||||
Modifyremarks:'修改备注',
|
||||
Reasonforreturn:'退回原因',
|
||||
UserFeedback:'用户反馈',
|
||||
Correspondingversion:'对应版本',
|
||||
Listcreationtime:'清单创建时间',
|
||||
}
|
||||
@@ -50,6 +50,10 @@
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
version: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
paramsTemplateId: {
|
||||
type: String,
|
||||
default: ''
|
||||
@@ -73,6 +77,9 @@
|
||||
computed: {
|
||||
importUrl() {
|
||||
if (this.projectId) {
|
||||
if(this.version){
|
||||
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut + '&projectId=' + this.projectId +'&version=' + this.version
|
||||
}
|
||||
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut + '&projectId=' + this.projectId
|
||||
} else if (this.dummyInventoryBaseId) {
|
||||
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut + '&dummyInventoryBaseId=' + this.dummyInventoryBaseId
|
||||
|
||||
@@ -0,0 +1,289 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="box-title-text">
|
||||
<a-input class="box-input" :value="value" :title="value" @input="indexclick($event)"
|
||||
:disabled="true"
|
||||
:placeholder="!isDisabled?$t('PleaseEnterOrSelect')+query.db_field_txt:query.db_field_txt"/>
|
||||
<a-button v-if="!isDisabled" type="primary" class="button-box" @click="standardClick">
|
||||
{{this.$t('standardSelection')}}
|
||||
</a-button>
|
||||
</div>
|
||||
<a-drawer
|
||||
:title="$t('standardSelection')"
|
||||
:maskClosable="false"
|
||||
:width="1000"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="handleCancel"
|
||||
:visible="visible"
|
||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||
<div style="margin-bottom: 60px">
|
||||
<currencySearch
|
||||
:flag="'1'"
|
||||
:url="url"
|
||||
:queryParam='queryParam'
|
||||
@searchQuery="searchQuery"
|
||||
@searchReset="searchReset"
|
||||
/>
|
||||
<a-table
|
||||
:components="drag(columns,'cloumns')"
|
||||
:columns="columns"
|
||||
rowKey="serial_number"
|
||||
:scroll="{x: 1500}"
|
||||
:data-source="dataList"
|
||||
:pagination="false"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:loading="loading">
|
||||
|
||||
</a-table>
|
||||
<div class="page" v-if="dataList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
:current="pageNo"
|
||||
@change="onChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import currencySearch from '@/components/currencySearch/index'
|
||||
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
components: {
|
||||
currencySearch
|
||||
},
|
||||
props: ['query', 'value', 'standard'],
|
||||
computed: {
|
||||
isDisabled() {
|
||||
if (this.query.db_field_name === 'replaced_standard') {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
},
|
||||
mixins: [ResizeColumnProvide,ResizeHeader],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
selectedRowKeys: [],
|
||||
selectedRowList: [],
|
||||
content: [],
|
||||
loading: false,
|
||||
queryParam: {},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
dataIndex: 'serial_number',
|
||||
ellipsis: true,
|
||||
align: 'left',
|
||||
width: 480
|
||||
},
|
||||
{
|
||||
title: this.$t('title'),
|
||||
dataIndex: 'title',
|
||||
ellipsis: true,
|
||||
align: 'left',
|
||||
width: 480
|
||||
},
|
||||
{
|
||||
title: this.$t('TextStatus'),
|
||||
dataIndex: 'state',
|
||||
align: 'left',
|
||||
width: 480
|
||||
}
|
||||
],
|
||||
dataList: [],
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
url: {
|
||||
seachList: 'document/bussDocumentLibraryEO/queryCondition' //搜索字段
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.replacePage()
|
||||
},
|
||||
methods: {
|
||||
standardClick() {
|
||||
this.visible = true
|
||||
this.queryParam = {}
|
||||
this.replacePage()
|
||||
},
|
||||
replacePage() {
|
||||
let query = {
|
||||
...this.queryParam,
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize
|
||||
}
|
||||
this.selectedRowKeys = []
|
||||
this.loading = true
|
||||
postAction('document/bussDocumentLibraryEO/replacePageInfo', query).then((res) => {
|
||||
this.loading = false
|
||||
if (res.success) {
|
||||
this.dataList = res.result.records
|
||||
this.total = res.result.total
|
||||
this.selectedRowKeys = this.standard[this.query.db_field_name] ? this.standard[this.query.db_field_name].split(',') : []
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit() {
|
||||
let serial_number = []
|
||||
let replace_standard_id = []
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
// let content = JSON.parse(JSON.stringify(this.selectedRowList))
|
||||
this.selectedRowList.forEach(res => {
|
||||
serial_number.push(res.serial_number)
|
||||
replace_standard_id.push(res.id)
|
||||
})
|
||||
this.$emit('input', serial_number.join(','))
|
||||
console.log(replace_standard_id)
|
||||
this.$emit('change', this.query.db_field_name, replace_standard_id.join(','))
|
||||
// this.$emit('changecontent', this.content)
|
||||
this.visible = false
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
indexclick(event) {
|
||||
this.$emit('input', event.target.value)
|
||||
},
|
||||
onSelectChange(value,row) {
|
||||
console.log(value)
|
||||
console.log(row)
|
||||
this.selectedRowKeys = value
|
||||
this.selectedRowList = row
|
||||
// this.content = []
|
||||
// value.forEach(val => {
|
||||
// this.dataList.forEach((res) => {
|
||||
// if (res.id === val) {
|
||||
// this.content.push(res)
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
},
|
||||
searchQuery(queryParam) {
|
||||
let queryParamQuery = JSON.parse(JSON.stringify(queryParam))
|
||||
Object.keys(queryParamQuery).forEach(res => {
|
||||
if (queryParamQuery[res] instanceof Array) {
|
||||
queryParamQuery[res] = queryParamQuery[res].join(',')
|
||||
}
|
||||
})
|
||||
this.queryParam = queryParamQuery
|
||||
this.replacePage()
|
||||
},
|
||||
searchReset(queryParam) {
|
||||
this.queryParam = queryParam
|
||||
this.replacePage()
|
||||
},
|
||||
onChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.replacePage()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.replacePage()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.button-box {
|
||||
margin-left: 10px;
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
|
||||
}
|
||||
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
|
||||
.box-title-text-index {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title-text-index {
|
||||
display: inline-block;
|
||||
min-width: 60px;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.box-input-index {
|
||||
display: inline-block;
|
||||
width: 80%;
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.box-button {
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/deep/.ant-table-thead > tr > th {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/*/deep/.ant-table-tbody > tr > td {*/
|
||||
/* color: #040B29 ;*/
|
||||
/*}*/
|
||||
</style>
|
||||
<style>
|
||||
/*.ant-input-disabled{*/
|
||||
/* background-color: #f5f5f5!important;*/
|
||||
/*}*/
|
||||
</style>
|
||||
@@ -69,13 +69,24 @@
|
||||
<span class="text-field-right" :title="queryForm.vehiclePlatform"
|
||||
>{{queryForm.vehiclePlatform}}</span>
|
||||
</div>
|
||||
<div class="text-field" v-has="'rxswin:view'">
|
||||
<span class="text-field-left" style="float: left;margin-top: 3px" :title="'RXSWIN'">RXSWIN</span>
|
||||
<span class="text-field-right text-field-right-color" :title="RXSWIN" style='margin-left: 2px;'
|
||||
>
|
||||
<span v-has="'projectRelatedPersonnel:page'"
|
||||
@click="rxswinClick">
|
||||
<a-icon type="eye"/>
|
||||
RXSWIN{{$t('detailedList')}}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-text">
|
||||
<div class="text-field">
|
||||
<span class="text-field-left" :title="$t('softwareVersion')">{{$t('softwareVersion')}}</span>
|
||||
<span class="text-field-right" :title="queryForm.softwareVersion"
|
||||
>{{queryForm.softwareVersion}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-text">
|
||||
<div class="text-field">
|
||||
<span class="text-field-left" :title="$t('dehicleDevelopmentPlan')">{{$t('dehicleDevelopmentPlan')}}</span>
|
||||
<span class="text-field-right text-field-right-color"
|
||||
@@ -90,6 +101,15 @@
|
||||
@click="urlClick(queryForm.attestationPlan)"
|
||||
>{{queryForm.attestationPlan}}</span>
|
||||
</div>
|
||||
<!-- <div class="text-field">-->
|
||||
<!-- <span class="text-field-left" :title="$t('configurationInformation')">{{$t('configurationInformation')}}</span>-->
|
||||
<!-- <span class="text-field-right text-field-right-color"-->
|
||||
<!-- :title="queryForm.ipdInfo"-->
|
||||
<!-- @click="urlClick(queryForm.ipdInfo)"-->
|
||||
<!-- >{{queryForm.ipdInfo}}</span>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="content-text">
|
||||
<div class="text-field">
|
||||
<span class="text-field-left" :title="$t('configurationInformation')">{{$t('configurationInformation')}}</span>
|
||||
<span class="text-field-right text-field-right-color"
|
||||
@@ -97,9 +117,7 @@
|
||||
@click="urlClick(queryForm.ipdInfo)"
|
||||
>{{queryForm.ipdInfo}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-text">
|
||||
<div class="text-field-content">
|
||||
<div class="text-field">
|
||||
<span class="text-field-left" :title="$t('explain')">{{$t('explain')}}</span>
|
||||
<span class="text-field-right" :title="queryForm.explanation"
|
||||
>{{queryForm.explanation}}</span>
|
||||
@@ -153,6 +171,7 @@
|
||||
@projectStatusForm="projectStatusForm"/>
|
||||
<versionStatistics ref="versionStatisticsRef" @versionStatisticsForm="versionStatisticsForm"/>
|
||||
<listOfRelevantPersonnel ref="listOfRelevantPersonnelRef"/>
|
||||
<rxswinModel ref="rxswinModelRef"/>
|
||||
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
|
||||
<settingList :url="url" ref="settingListRef" @settingListForm="settingListForm"/>
|
||||
</div>
|
||||
@@ -161,6 +180,7 @@
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
import listOfRelevantPersonnel from './listOfRelevantPersonnel'
|
||||
import rxswinModel from './rxswinModel'
|
||||
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
||||
import addModel from './addModel'
|
||||
import versionStatistics from './versionStatistics'
|
||||
@@ -173,6 +193,7 @@
|
||||
name: 'ProjectDetails',
|
||||
components: {
|
||||
listOfRelevantPersonnel,
|
||||
rxswinModel,
|
||||
addModel,
|
||||
settingList,
|
||||
projectStatus,
|
||||
@@ -237,6 +258,9 @@
|
||||
ListOfRelevantPersonnelClick() {
|
||||
this.$refs.listOfRelevantPersonnelRef.getData()
|
||||
},
|
||||
rxswinClick(){
|
||||
this.$refs.rxswinModelRef.getData()
|
||||
},
|
||||
urlClick(val) {
|
||||
if (val) {
|
||||
window.open(val)
|
||||
|
||||
@@ -12,17 +12,6 @@
|
||||
v-model="queryParam.inspectionItem"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('areaOfResponsibility')">
|
||||
<span>{{ $t('areaOfResponsibility') }}</span>
|
||||
</div>
|
||||
<j-multi-select-tag class="box-input" v-model="queryParam.dutyTerritory"
|
||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('ProcessStatus')">
|
||||
@@ -44,16 +33,6 @@
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('standardNo')">
|
||||
<span>{{ $t('standardNo') }}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standardNo')"
|
||||
v-model="queryParam.serialNumber"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('statisticalNodes')">
|
||||
@@ -77,6 +56,28 @@
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('areaOfResponsibility')">
|
||||
<span>{{ $t('areaOfResponsibility') }}</span>
|
||||
</div>
|
||||
<j-multi-select-tag class="box-input" v-model="queryParam.dutyTerritory"
|
||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('standardNo')">
|
||||
<span>{{ $t('standardNo') }}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standardNo')"
|
||||
v-model="queryParam.serialNumber"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
</template>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px; " class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24">
|
||||
|
||||
@@ -26,13 +26,25 @@
|
||||
<!-- </a-col>-->
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('areaOfResponsibility')">
|
||||
<span>{{ $t('areaOfResponsibility') }}</span>
|
||||
<div class="title-text" :title="$t('statisticalNodes')">
|
||||
<span>{{ $t('statisticalNodes') }}</span>
|
||||
</div>
|
||||
<j-multi-select-tag class="box-input" v-model="queryParam.dutyTerritory"
|
||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
||||
allowClear
|
||||
show-search
|
||||
class="box-input"
|
||||
optionFilterProp="label"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
v-model="queryParam.firstLevelDutyTerritory">
|
||||
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
||||
:key="key"
|
||||
:label="item.key"
|
||||
:value="item.key">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.key ">
|
||||
{{ item.key }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
@@ -72,25 +84,13 @@
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('statisticalNodes')">
|
||||
<span>{{ $t('statisticalNodes') }}</span>
|
||||
<div class="title-text" :title="$t('areaOfResponsibility')">
|
||||
<span>{{ $t('areaOfResponsibility') }}</span>
|
||||
</div>
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
||||
allowClear
|
||||
show-search
|
||||
class="box-input"
|
||||
optionFilterProp="label"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
v-model="queryParam.firstLevelDutyTerritory">
|
||||
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
||||
:key="key"
|
||||
:label="item.key"
|
||||
:value="item.key">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.key ">
|
||||
{{ item.key }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<j-multi-select-tag class="box-input" v-model="queryParam.dutyTerritory"
|
||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||
</div>
|
||||
</a-col>
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1,733 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-drawer
|
||||
:title="'RXSWIN'"
|
||||
:width="1280"
|
||||
:visible="visible"
|
||||
:maskClosable="false"
|
||||
@close="handleCancel"
|
||||
>
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="12" :sm="8">
|
||||
<div class="box-title-text-search">
|
||||
<div class="title-text-search" :title="$t('standard')">
|
||||
<span>{{$t('standard')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input-search" allowClear :placeholder="$t('PleaseEnter') + $t('standard')"
|
||||
v-model="queryParam.serialNumber"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :md="12" :sm="8">
|
||||
<div class="box-title-text-search">
|
||||
<div class="title-text-search" :title="$t('theme')">
|
||||
<span>{{$t('theme')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input-search" allowClear :placeholder="$t('PleaseEnter') + $t('theme')"
|
||||
v-model="queryParam.theme"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="8">
|
||||
<div class="box-title-text-search">
|
||||
<div class="title-text-search" :title="'RXSWIN'">
|
||||
<span>RXSWIN</span>
|
||||
</div>
|
||||
<a-input class="box-input-search" allowClear :placeholder="$t('PleaseEnter') + 'RXSWIN'"
|
||||
v-model="queryParam.rxswin"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="8">
|
||||
<div class="box-title-text-search">
|
||||
<div class="title-text-search" :title="$t('Correspondingversion')">
|
||||
<span>{{$t('Correspondingversion')}}</span>
|
||||
</div>
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('Correspondingversion')"
|
||||
allowClear
|
||||
show-search
|
||||
class="box-input-search"
|
||||
optionFilterProp="label"
|
||||
showSearch
|
||||
:autoClearSearchValue="false"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
v-model="queryParam.version">
|
||||
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
||||
:key="key"
|
||||
:label="item"
|
||||
:value="item">
|
||||
<span style="display: inline-block;width: 100%" :title=" item ">
|
||||
{{ item }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
</template>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px;margin-bottom: 20px"
|
||||
class="table-page-search-submitButtons">
|
||||
<a @click="handleToggleSearch">
|
||||
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
</a>
|
||||
<a-button class="box-button-search" style="margin-left: 8px"
|
||||
@click="searchReset">{{$t('reset')}}</a-button>
|
||||
<a-button class="box-button-search" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||
</span>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<div class="table-operator">
|
||||
<!-- 提交-->
|
||||
<div v-show="staFlag != '1'" class="operator-text" @click="submit" v-has="'rxswin:submit'">
|
||||
<a-icon type="check-circle"/>
|
||||
{{$t('submit')}}
|
||||
</div>
|
||||
<!-- 新增-->
|
||||
<div v-show="staFlag != '1'" class="operator-text" @click="handleAdd" v-has="'rxswin:add'">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('newlyAdded')}}
|
||||
</div>
|
||||
<!-- 模板下载-->
|
||||
<div v-show="staFlag != '1'" @click="handleModule" v-has="'rxswin:templatedownload'" class="operator-text">
|
||||
<a-icon type="download"/>
|
||||
{{$t('templateDownload')}}
|
||||
</div>
|
||||
<!-- 导出-->
|
||||
<div @click="handleExport" v-has="'rxswin:export'" class="operator-text">
|
||||
<a-icon type="export" :rotate="-90"/>
|
||||
{{$t('export')}}
|
||||
</div>
|
||||
<!-- 导入-->
|
||||
<div v-show="staFlag != '1'" class="operator-text"
|
||||
v-has="'rxswin:Import'">
|
||||
<ImportFile :url="url" :projectId="$route.query.id" :version="$route.query.projectVersion" :accept="'.xls'"
|
||||
:isTrue="true"
|
||||
@getList="getList"/>
|
||||
</div>
|
||||
<!-- 批量删除-->
|
||||
<div v-show="staFlag != '1'" class="operator-text"
|
||||
@click="batDeleteClick"
|
||||
v-has="'rxswin:batchdelete'">
|
||||
<a-icon type="delete"/>
|
||||
{{$t('BatchDelete')}}
|
||||
</div>
|
||||
<!-- 调取-->
|
||||
<div v-show="staFlag != '1'" @click="transferClick"
|
||||
v-has="'rxswin:fetch'"
|
||||
class="operator-text">
|
||||
<a-icon type="profile"/>
|
||||
{{$t('Transfer')}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- rowKey="id"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"-->
|
||||
<a-table
|
||||
class="table"
|
||||
:components="drag(columns,'columns')"
|
||||
:columns="columns"
|
||||
rowKey="id"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
@change="tableOnChange"
|
||||
:pagination="false"
|
||||
:scroll="{x:800,y: 500}"
|
||||
:data-source="dataSource"
|
||||
:loading="loading"
|
||||
>
|
||||
<span slot="operation" slot-scope="record">
|
||||
<a class="text" v-has="'rxswin:edit'" @click="edit(record)" v-if="staFlag != '1'">
|
||||
{{$t('edit')}}
|
||||
</a>
|
||||
<a class="text" v-has="'rxswin:delete'" @click="del(record)" v-if="staFlag != '1'">
|
||||
{{$t('delete')}}
|
||||
</a>
|
||||
</span>
|
||||
</a-table>
|
||||
<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>
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
|
||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<!-- 新增编辑-->
|
||||
<a-modal
|
||||
:title="title"
|
||||
:width="600"
|
||||
:visible="editVisible"
|
||||
:maskClosable="false"
|
||||
@ok="editOk"
|
||||
@cancel="editVisible = false"
|
||||
>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('standard')">{{$t('standard')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="serialNumber">
|
||||
<Standardselection
|
||||
:query="{'db_field_txt':$t('standard')}"
|
||||
:standard="formInline"
|
||||
@change="StandardselectionChange"
|
||||
v-model="formInline.serialNumber"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('theme')">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text">{{$t('theme')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="theme">
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter') + $t('theme')"
|
||||
v-model="formInline.theme" :maxLength="100"></a-input>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="'RXSWIN'">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text">RXSWIN</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="rxswin">
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter') + 'RXSWIN'"
|
||||
v-model="formInline.rxswin" :maxLength="100"></a-input>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
</a-modal>
|
||||
<transferList :url="url" @transferListForm="transferListForm" ref="transferListRef"/>
|
||||
<transferListvirtal :url="url" @transferListFormHomo="transferListFormHomo" ref="transferListvirtalRef"/>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
import SelectedBy from '@/components/SelectedBy/index'
|
||||
import personBatting from './personBatting'
|
||||
import Standardselection from '@/components/StandardselectionRxswin/index'
|
||||
import { getAction, postAction, downloadFile, putAction, deleteAction } from '@/api/manage'
|
||||
import ImportFile from '@/components/ImportFile/index'
|
||||
import transferList from './transferListRxswin'
|
||||
import transferListvirtal from './transferListvirtalRxswin'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
||||
|
||||
export default {
|
||||
name: 'listOfRelevantPersonnel',
|
||||
components: {
|
||||
PersonnelSelection,
|
||||
Standardselection,
|
||||
transferList,
|
||||
transferListvirtal,
|
||||
ImportFile,
|
||||
personBatting,
|
||||
SelectedBy
|
||||
},
|
||||
mixins: [ResizeHeader, ResizeColumnProvide],
|
||||
data() {
|
||||
return {
|
||||
toggleSearchStatus: false,
|
||||
firstLevelDutyTerritoryList:[],
|
||||
visible: false,
|
||||
queryParam: {},
|
||||
title:'',
|
||||
selectVisible: false,
|
||||
submitLoading: false,
|
||||
selectLoading: false,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
align: 'left',
|
||||
dataIndex: 'serialNumber',
|
||||
ellipsis: true,
|
||||
sorter:true,
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
title: this.$t('theme'),
|
||||
align: 'left',
|
||||
dataIndex: 'theme',
|
||||
ellipsis: true,
|
||||
sorter:true,
|
||||
width: 300
|
||||
},
|
||||
{
|
||||
title: 'RXSWIN',
|
||||
align: 'left',
|
||||
dataIndex: 'rxswin',
|
||||
ellipsis: true,
|
||||
sorter:true,
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
title: this.$t('Correspondingversion'),
|
||||
align: 'left',
|
||||
dataIndex: 'version',
|
||||
ellipsis: true,
|
||||
sorter:true,
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'left',
|
||||
width: 110,
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
}
|
||||
],
|
||||
dataSource: [],
|
||||
selectDataSource:[],
|
||||
loading: false,
|
||||
editVisible: false,
|
||||
confirmLoading: false,
|
||||
formInline: {},
|
||||
rules: {
|
||||
serialNumber: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('standard') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
theme: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('theme') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
rxswin: [
|
||||
{
|
||||
required: true,
|
||||
message: 'RXSWIN' + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
},
|
||||
// pageSize: 10,
|
||||
// pageNo: 1,
|
||||
url: {
|
||||
page: '/project/projectRxswinEO/page',
|
||||
edit: '/project/projectRelatedPersonnel/edit',
|
||||
exportData: '/project/projectRxswinEO/exportXls',
|
||||
importZipUrl: '/project/projectRxswinEO/importExcel',
|
||||
queryCertificationEngineer: '/project/projectRelatedPersonnel/queryCertificationEngineer'
|
||||
},
|
||||
selectedRowKeys: [],
|
||||
dictOptionsValue: [],
|
||||
administrators: false,
|
||||
userIds:'',
|
||||
userName:'',
|
||||
orderBy: '1',
|
||||
orderByField: '',
|
||||
total: 0,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
staFlag:'',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
getFirstLevelDutyTerritory() {
|
||||
getAction('/project/projectRxswinEO/getVersionList', {projectId: this.$route.query.id}).then((res) => {
|
||||
if (res.success) {
|
||||
this.firstLevelDutyTerritoryList = res.result
|
||||
} else {
|
||||
this.firstLevelDutyTerritoryList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
this.visible = true
|
||||
this.queryParam = {}
|
||||
this.administrators = false
|
||||
this.getFirstLevelDutyTerritory()
|
||||
this.getList()
|
||||
},
|
||||
handleToggleSearch() {
|
||||
this.toggleSearchStatus = !this.toggleSearchStatus
|
||||
},
|
||||
tableOnChange(pagination, filters, sorter) {
|
||||
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
||||
if (sorter.columnKey == 'dutyTerritory_dictText') {
|
||||
this.orderByField = 'dutyTerritory'
|
||||
} else if (sorter.columnKey == 'lawEngineerName') {
|
||||
this.orderByField = 'lawEngineer'
|
||||
}else if (sorter.columnKey == 'engineeringInterfacePersonName') {
|
||||
this.orderByField = 'engineeringInterfacePerson'
|
||||
}else if (sorter.columnKey == 'engineerLawSetName') {
|
||||
this.orderByField = 'engineerLawSet'
|
||||
} else if (sorter.columnKey == 'engineerAttSetName') {
|
||||
this.orderByField = 'engineerAttSet'
|
||||
} else {
|
||||
this.orderByField = sorter.columnKey
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
personBattingTable() {
|
||||
this.selectedRowKeys = []
|
||||
this.getList()
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit() {
|
||||
this.visible = false
|
||||
},
|
||||
submit(){
|
||||
let ids = []
|
||||
this.dataSource.forEach(item => {
|
||||
ids.push(item.id)
|
||||
})
|
||||
let query = {
|
||||
projectId: this.$route.query.id,
|
||||
ids: ids.join(',')
|
||||
}
|
||||
getAction('/project/projectRxswinEO/submitInfo', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.getList()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
},
|
||||
batDeleteClick() {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
onOk() {
|
||||
deleteAction('/project/projectRxswinEO/deleteBatch', { ids: _this.selectedRowKeys.join(',') }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
deleteData(name) {
|
||||
this.formInline[name] = ''
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
getPersonnelList() {
|
||||
this.getList()
|
||||
},
|
||||
StandardselectionChange(value, id) {
|
||||
this.formInline.documentId = id
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
editOk() {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let url = ''
|
||||
let Action = ''
|
||||
if(this.title == this.$t('newlyAdded')){
|
||||
url = '/project/projectRxswinEO/add'
|
||||
Action = postAction
|
||||
}else{
|
||||
url = '/project/projectRxswinEO/edit'
|
||||
Action = putAction
|
||||
}
|
||||
let query = {
|
||||
projectId: this.$route.query.id,
|
||||
...this.formInline,
|
||||
version:this.$route.query.projectVersion
|
||||
}
|
||||
this.confirmLoading = true
|
||||
Action(url, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.editVisible = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.confirmLoading = false
|
||||
this.getList()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
edit(item) {
|
||||
this.editVisible = true
|
||||
this.title = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.formInline = JSON.parse(JSON.stringify(item))
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
handleAdd(){
|
||||
this.editVisible = true
|
||||
this.title = this.$t('newlyAdded')
|
||||
this.$nextTick(() => {
|
||||
this.formInline = {}
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
del(item){
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
onOk() {
|
||||
deleteAction('/project/projectRxswinEO/deleteBatch', { ids: item.id }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onSelectChange(value) {
|
||||
this.selectedRowKeys = value
|
||||
},
|
||||
searchQuery() {
|
||||
this.getList()
|
||||
},
|
||||
searchReset() {
|
||||
this.queryParam = {}
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
let query = {
|
||||
projectId: this.$route.query.id,
|
||||
...this.queryParam,
|
||||
orderBy: this.orderBy,
|
||||
orderByField: this.orderByField,
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.page, query).then((res) => {
|
||||
if (res.success) {
|
||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
return
|
||||
}
|
||||
this.dataSource = res.result.records || []
|
||||
if(this.dataSource.length != 0 && this.dataSource[0].state == '1'){
|
||||
this.staFlag = '1'
|
||||
}
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.getList()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.getList()
|
||||
},
|
||||
handleExport() {
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
let long = localStorage.getItem('language')
|
||||
let cut = ''
|
||||
if (long && long == 'zh-cn') {
|
||||
this.cut = 'cn'
|
||||
} else if (long && long == 'en-us') {
|
||||
this.cut = 'en'
|
||||
}
|
||||
let query = {
|
||||
ids: selectedRowKeys.join(','),
|
||||
cut:cut,
|
||||
projectId: this.$route.query.id
|
||||
}
|
||||
downloadFile(this.url.exportData, 'RXSWIN' + '.xls', query, this.Deselect)
|
||||
},
|
||||
Deselect() {
|
||||
this.selectedRowKeys = []
|
||||
},
|
||||
handleModule() {
|
||||
downloadFile('project/projectRxswinEO/exportTemplate', 'RXSWIN' + '.xls', {})
|
||||
},
|
||||
//调取
|
||||
transferClick() {
|
||||
this.$refs.transferListRef.transferModel()
|
||||
},
|
||||
transferListForm(id) {
|
||||
this.$refs.transferListvirtalRef.transferModel(id)
|
||||
},
|
||||
transferListFormHomo() {
|
||||
this.$refs.transferListRef.handleCancel()
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.box-input-search .ant-select-selection--single {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input-search .ant-select-selection--multiple {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input-search .ant-select-selection__rendered {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
/*align-items: center;*/
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 114px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 48px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.table-operator {
|
||||
text-align: right;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.itemOption {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.box-title-text-search {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-text-search {
|
||||
width: 110px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: 3px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.box-input-search {
|
||||
display: inline-block;
|
||||
width: calc(100% - 100px);
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.box-button-search {
|
||||
height: 38px;
|
||||
/*margin-top: 2px;*/
|
||||
}
|
||||
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
|
||||
/*/deep/.table .ant-table-thead > tr > th {*/
|
||||
/* font-weight: bolder;*/
|
||||
/*}*/
|
||||
|
||||
/*/deep/.table .ant-table-tbody > tr > td {*/
|
||||
/* color: #040B29 ;*/
|
||||
/*}*/
|
||||
|
||||
.table {
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,233 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="$t('Transfer')"
|
||||
:maskClosable="false"
|
||||
:width="1000"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="handleCancel"
|
||||
:visible="visible"
|
||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||
<div style="margin-bottom: 60px">
|
||||
<a-table
|
||||
:components="drag(columns,'columns')"
|
||||
:columns="columns"
|
||||
rowKey="id"
|
||||
:scroll="{x: 800}"
|
||||
:data-source="dataList"
|
||||
:pagination="false"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,columnTitle:' ' }"
|
||||
:loading="loading">
|
||||
|
||||
</a-table>
|
||||
<div class="page" v-if="dataList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
:current="pageNo"
|
||||
@change="onChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
||||
<a-button @click="handleSubmit(undefined)" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
||||
|
||||
export default {
|
||||
name: 'transferList',
|
||||
components: {},
|
||||
props: ['url'],
|
||||
mixins: [ResizeHeader, ResizeColumnProvide],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
queryParam: {},
|
||||
confirmLoading: false,
|
||||
selectedRowKeys: [],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('projectVersion'),
|
||||
dataIndex: 'projectName',
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
width: 235
|
||||
},
|
||||
{
|
||||
title: this.$t('Listcreationtime'),
|
||||
dataIndex: 'createTime',
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
},
|
||||
],
|
||||
dataList: [],
|
||||
content: [],
|
||||
loading: false,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
transferModel() {
|
||||
this.visible = true
|
||||
this.queryParam = {}
|
||||
this.selectedRowKeys = []
|
||||
this.replacePage()
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.replacePage()
|
||||
},
|
||||
searchReset() {
|
||||
this.pageNo = 1
|
||||
this.queryParam = {}
|
||||
this.replacePage()
|
||||
},
|
||||
onChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.replacePage()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.replacePage()
|
||||
},
|
||||
replacePage() {
|
||||
let query = {
|
||||
projectId: this.$route.query.id,
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
...this.queryParam
|
||||
}
|
||||
this.loading = true
|
||||
getAction('/project/projectRxswinEO/getOnePage', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataList = res.result.records || []
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
onSelectChange(value) {
|
||||
this.selectedRowKeys = value
|
||||
if (this.selectedRowKeys.length > 1) {
|
||||
this.selectedRowKeys.shift()
|
||||
}
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit(flag) {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
this.confirmLoading = true
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
this.confirmLoading = false
|
||||
this.$emit('transferListForm',selectedRowKeys.join(','))
|
||||
this.selectedRowKeys = []
|
||||
// postAction(this.url.addModel, {
|
||||
// dummyInventoryBaseId: selectedRowKeys.join(','),
|
||||
// projectLibraryId: this.$route.query.id,
|
||||
// flag: flag
|
||||
// }).then((res) => {
|
||||
// if (res.success) {
|
||||
// this.confirmLoading = false
|
||||
// this.$message.success(this.$t('OperationSuccessful'))
|
||||
// this.visible = false
|
||||
// this.selectedRowKeys = []
|
||||
// this.$emit('transferListForm')
|
||||
// } else {
|
||||
// if (res.message == '该虚拟清单的维护清单中没有数据,是否需要添加') {
|
||||
// this.confirmLoading = false
|
||||
// this.getAdd()
|
||||
// return
|
||||
// }
|
||||
// this.$message.warning(this.$t('operationFailed'))
|
||||
// this.confirmLoading = false
|
||||
// }
|
||||
// })
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
getAdd() {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('TheDoesNotContainData'),
|
||||
onOk() {
|
||||
_this.handleSubmit('1')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
z-index: 100;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 20%;
|
||||
min-width: 110px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: 3px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
width: 70%;
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.box-button {
|
||||
height: 38px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,370 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="$t('Transfer')"
|
||||
:maskClosable="false"
|
||||
:width="1100"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="handleCancel"
|
||||
:visible="visible"
|
||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||
<div style="margin-bottom: 60px">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="12" :sm="8">
|
||||
<div class="box-title-text-search">
|
||||
<div class="title-text-search" :title="$t('standard')">
|
||||
<span>{{$t('standard')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input-search" allowClear :placeholder="$t('PleaseEnter') + $t('standard')"
|
||||
v-model="queryParam.serialNumber"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :md="12" :sm="8">
|
||||
<div class="box-title-text-search">
|
||||
<div class="title-text-search" :title="$t('theme')">
|
||||
<span>{{$t('theme')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input-search" allowClear :placeholder="$t('PleaseEnter') + $t('theme')"
|
||||
v-model="queryParam.theme"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="8">
|
||||
<div class="box-title-text-search">
|
||||
<div class="title-text-search" :title="'RXSWIN'">
|
||||
<span>RXSWIN</span>
|
||||
</div>
|
||||
<a-input class="box-input-search" allowClear :placeholder="$t('PleaseEnter') + 'RXSWIN'"
|
||||
v-model="queryParam.rxswin"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<!-- <a-col :md="12" :sm="8">-->
|
||||
<!-- <div class="box-title-text-search">-->
|
||||
<!-- <div class="title-text-search" :title="$t('Correspondingversion')">-->
|
||||
<!-- <span>{{$t('Correspondingversion')}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('Correspondingversion')"-->
|
||||
<!-- allowClear-->
|
||||
<!-- show-search-->
|
||||
<!-- class="box-input-search"-->
|
||||
<!-- optionFilterProp="label"-->
|
||||
<!-- showSearch-->
|
||||
<!-- :autoClearSearchValue="false"-->
|
||||
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
|
||||
<!-- v-model="queryParam.version">-->
|
||||
<!-- <a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"-->
|
||||
<!-- :key="key"-->
|
||||
<!-- :label="item.key"-->
|
||||
<!-- :value="item.key">-->
|
||||
<!-- <span style="display: inline-block;width: 100%" :title=" item.key ">-->
|
||||
<!-- {{ item.key }}-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-select-option>-->
|
||||
<!-- </a-select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </a-col>-->
|
||||
</template>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px;margin-bottom: 20px"
|
||||
class="table-page-search-submitButtons">
|
||||
<a @click="handleToggleSearch">
|
||||
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
</a>
|
||||
<a-button class="box-button-search" style="margin-left: 8px"
|
||||
@click="searchReset">{{$t('reset')}}</a-button>
|
||||
<a-button class="box-button-search" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||
</span>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<a-table
|
||||
:columns="columns"
|
||||
rowKey="id"
|
||||
:scroll="{x: 800,y:'calc(100vh - 330px)'}"
|
||||
:data-source="dataList"
|
||||
:pagination="false"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:loading="loading">
|
||||
|
||||
</a-table>
|
||||
<div class="page" v-if="dataList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
:current="pageNo"
|
||||
@change="onChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
||||
<a-button @click="handleSubmit(undefined)" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
|
||||
|
||||
export default {
|
||||
name: 'transferList',
|
||||
components: {
|
||||
globalAdvancedQuery
|
||||
},
|
||||
props: ['url'],
|
||||
data() {
|
||||
return {
|
||||
toggleSearchStatus: false,
|
||||
visible: false,
|
||||
queryParam: {},
|
||||
confirmLoading: false,
|
||||
selectedRowKeys: [],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
align: 'left',
|
||||
dataIndex: 'serialNumber',
|
||||
ellipsis: true,
|
||||
sorter:true,
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
title: this.$t('theme'),
|
||||
align: 'left',
|
||||
dataIndex: 'theme',
|
||||
ellipsis: true,
|
||||
sorter:true,
|
||||
width: 300
|
||||
},
|
||||
{
|
||||
title: 'RXSWIN',
|
||||
align: 'left',
|
||||
dataIndex: 'rxswin',
|
||||
ellipsis: true,
|
||||
sorter:true,
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
title: this.$t('Correspondingversion'),
|
||||
align: 'left',
|
||||
dataIndex: 'version',
|
||||
ellipsis: true,
|
||||
sorter:true,
|
||||
width: 170
|
||||
},
|
||||
],
|
||||
dataList: [],
|
||||
content: [],
|
||||
loading: false,
|
||||
dummyInventoryBaseId:'',
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
transferModel(id) {
|
||||
this.visible = true
|
||||
this.projectId = id
|
||||
this.queryParam = {}
|
||||
this.selectedRowKeys = []
|
||||
this.replacePage()
|
||||
},
|
||||
handleToggleSearch() {
|
||||
this.toggleSearchStatus = !this.toggleSearchStatus
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.replacePage()
|
||||
},
|
||||
searchReset() {
|
||||
this.pageNo = 1
|
||||
this.queryParam = {}
|
||||
this.replacePage()
|
||||
},
|
||||
onChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.replacePage()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.replacePage()
|
||||
},
|
||||
replacePage() {
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
...this.queryParam,
|
||||
projectId: this.projectId
|
||||
}
|
||||
this.loading = true
|
||||
getAction('/project/projectRxswinEO/getTwoPage', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataList = res.result.records || []
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
onSelectChange(value) {
|
||||
this.selectedRowKeys = value
|
||||
// if (this.selectedRowKeys.length > 1) {
|
||||
// this.selectedRowKeys.shift()
|
||||
// }
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit(flag) {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
this.confirmLoading = true
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
getAction('/project/projectRxswinEO/iSExist', {
|
||||
projectId: this.$route.query.id,
|
||||
// projectLibraryId: this.$route.query.id,
|
||||
ids: selectedRowKeys.join(','),
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
this.confirmLoading = false
|
||||
// this.$message.success(this.$t('OperationSuccessful'))
|
||||
if(res.result == 'YES'){
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('AlreadyExists'),
|
||||
onOk() {
|
||||
getAction('/project/projectRxswinEO/addBatch', {
|
||||
ids: selectedRowKeys.join(','),
|
||||
flag:'YES',
|
||||
projectId: _this.$route.query.id,
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.visible = false
|
||||
_this.$emit('transferListFormHomo')
|
||||
} else {
|
||||
_this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
onCancel() {
|
||||
_this.visible = false
|
||||
_this.$emit('transferListFormHomo')
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.visible = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.$emit('transferListFormHomo')
|
||||
}
|
||||
this.selectedRowKeys = []
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
z-index: 100;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 20%;
|
||||
min-width: 110px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: 3px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
width: 70%;
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.box-button {
|
||||
height: 38px;
|
||||
}
|
||||
.box-title-text-search {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-text-search {
|
||||
width: 110px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: 3px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.box-input-search {
|
||||
display: inline-block;
|
||||
width: calc(100% - 100px);
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.box-button-search {
|
||||
height: 38px;
|
||||
/*margin-top: 2px;*/
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user