Merge branch 'dev_2nd_LCYH' of http://git.hzwlsoft.com/laws-nio/laws-weilai into dev_2nd_LCYH

This commit is contained in:
yuekuo
2023-03-29 14:27:37 +08:00
20 changed files with 168 additions and 70 deletions
@@ -1,6 +1,7 @@
package com.jero.modules.ota.controller; package com.jero.modules.ota.controller;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -8,11 +9,13 @@ import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog; import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.system.base.controller.JeroController; import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.query.QueryGenerator; import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.extRepo.entity.ExtRepoData;
import com.jero.modules.ota.entity.OtaBaCxList; import com.jero.modules.ota.entity.OtaBaCxList;
import com.jero.modules.ota.service.IOtaBaCxListService; import com.jero.modules.ota.service.IOtaBaCxListService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@@ -57,9 +60,33 @@ public class OtaBaCxListController extends JeroController<OtaBaCxList, IOtaBaCxL
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
QueryWrapper<OtaBaCxList> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxList, req.getParameterMap());
queryWrapper.orderByDesc("create_time");
Page<OtaBaCxList> page = new Page<OtaBaCxList>(pageNo, pageSize); Page<OtaBaCxList> page = new Page<OtaBaCxList>(pageNo, pageSize);
LambdaQueryWrapper<OtaBaCxList> queryWrapper = new LambdaQueryWrapper<>();
// 文件名称模糊查询
String cpdjbh = req.getParameter("cpdjbh");
if (StringUtils.isNotBlank(cpdjbh)) {
cpdjbh = cpdjbh.replace("%", "\\%");
queryWrapper.like(OtaBaCxList::getCpdjbh, cpdjbh);
}
String ggpc = req.getParameter("ggpc");
if (StringUtils.isNotBlank(ggpc)) {
ggpc = ggpc.replace("%", "\\%");
queryWrapper.like(OtaBaCxList::getGgpc, ggpc);
}
String cpsb = req.getParameter("cpsb");
if (StringUtils.isNotBlank(cpsb)) {
cpsb = cpsb.replace("%", "\\%");
queryWrapper.like(OtaBaCxList::getCpsb, cpsb);
}
String cpmc = req.getParameter("cpmc");
if (StringUtils.isNotBlank(cpmc)) {
cpmc = cpmc.replace("%", "\\%");
queryWrapper.like(OtaBaCxList::getCpmc, cpmc);
}
queryWrapper.orderByDesc(OtaBaCxList::getCreateTime);
IPage<OtaBaCxList> pageList = otaBaCxListService.page(page, queryWrapper); IPage<OtaBaCxList> pageList = otaBaCxListService.page(page, queryWrapper);
return Result.OK(pageList); return Result.OK(pageList);
} }
@@ -1,5 +1,6 @@
package com.jero.modules.ota.controller; package com.jero.modules.ota.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -176,11 +177,12 @@ public class OtaBaSjListController extends JeroController<OtaBaSjList, IOtaBaSjL
@AutoLog(value = "升级备案-备案维护") @AutoLog(value = "升级备案-备案维护")
@ApiOperation(value = "升级备案-备案维护", notes = "升级备案-备案维护") @ApiOperation(value = "升级备案-备案维护", notes = "升级备案-备案维护")
@PostMapping(value = "/batchRecord") @PostMapping(value = "/batchRecord")
public Result<?> batchRecord(@RequestParam(name = "ids", required = true) String ids, public Result<?> batchRecord(@RequestBody JSONObject json) {
@RequestParam(name = "bazt", required = true) String bazt, String ids = json.getString("ids");
@RequestParam(name = "batjsj", required = true) String batjsj, String bazt = json.getString("bazt");
@RequestParam(name = "bz", required = true) String bz, String batjsj = json.getString("batjsj");
@RequestParam(name = "cut") String cut) { String bz = json.getString("bz");
String cut = json.getString("cut");
otaBaSjListService.batchRecord(ids, bazt, batjsj, bz, cut); otaBaSjListService.batchRecord(ids, bazt, batjsj, bz, cut);
return Result.OK("备案维护成功!"); return Result.OK("备案维护成功!");
} }
@@ -3,6 +3,7 @@ package com.jero.modules.ota.entity;
import java.io.Serializable; import java.io.Serializable;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
@@ -21,105 +22,146 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
/** /**
* @Description: 升级备案-升级活动备案列表 * @Description: 升级备案-升级活动备案列表
* @Author: jero-boot * @Author: jero-boot
* @Date: 2023-03-17 * @Date: 2023-03-17
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("ota_ba_sj_list") @TableName("ota_ba_sj_list")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@ApiModel(value="ota_ba_sj_list对象", description="升级备案-升级活动备案列表") @ApiModel(value = "ota_ba_sj_list对象", description = "升级备案-升级活动备案列表")
public class OtaBaSjList implements Serializable { public class OtaBaSjList implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**主键*/ /**
@TableId(type = IdType.ASSIGN_ID) * 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "主键")
private java.lang.String id; private java.lang.String id;
/**创建人*/ /**
* 创建人
*/
@ApiModelProperty(value = "创建人") @ApiModelProperty(value = "创建人")
private java.lang.String createBy; private java.lang.String createBy;
/**创建日期*/ /**
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") * 创建日期
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") */
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期") @ApiModelProperty(value = "创建日期")
private java.util.Date createTime; private java.util.Date createTime;
/**更新人*/ /**
* 更新人
*/
@ApiModelProperty(value = "更新人") @ApiModelProperty(value = "更新人")
private java.lang.String updateBy; private java.lang.String updateBy;
/**更新日期*/ /**
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") * 更新日期
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") */
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期") @ApiModelProperty(value = "更新日期")
private java.util.Date updateTime; private java.util.Date updateTime;
/**所属部门*/ /**
* 所属部门
*/
@ApiModelProperty(value = "所属部门") @ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode; private java.lang.String sysOrgCode;
/**otaId*/ /**
@Excel(name = "otaId", width = 15) * otaId
*/
@Excel(name = "otaId", width = 15)
@ApiModelProperty(value = "otaId") @ApiModelProperty(value = "otaId")
private java.lang.String otaId; private java.lang.String otaId;
/**产品登记编号*/ /**
@Excel(name = "产品登记编号", width = 15) * 产品登记编号
*/
@Excel(name = "产品登记编号", width = 15)
@ApiModelProperty(value = "产品登记编号") @ApiModelProperty(value = "产品登记编号")
private java.lang.String cpdjbh; private java.lang.String cpdjbh;
/**公告批次*/ /**
@Excel(name = "公告批次", width = 15) * 公告批次
*/
@Excel(name = "公告批次", width = 15)
@ApiModelProperty(value = "公告批次") @ApiModelProperty(value = "公告批次")
private java.lang.String ggpc; private java.lang.String ggpc;
/**产品商标*/ /**
@Excel(name = "产品商标", width = 15) * 产品商标
*/
@Excel(name = "产品商标", width = 15)
@ApiModelProperty(value = "产品商标") @ApiModelProperty(value = "产品商标")
private java.lang.String cpsb; private java.lang.String cpsb;
/**产品名称*/ /**
@Excel(name = "产品名称", width = 15) * 产品名称
*/
@Excel(name = "产品名称", width = 15)
@ApiModelProperty(value = "产品名称") @ApiModelProperty(value = "产品名称")
private java.lang.String cpmc; private java.lang.String cpmc;
/**产品型号*/ /**
@Excel(name = "产品型号", width = 15) * 产品型号
*/
@Excel(name = "产品型号", width = 15)
@ApiModelProperty(value = "产品型号") @ApiModelProperty(value = "产品型号")
private java.lang.String cpxh; private java.lang.String cpxh;
/**备案状态*/ /**
@Excel(name = "备案状态", width = 15) * 备案状态
*/
@Excel(name = "备案状态", width = 15)
@ApiModelProperty(value = "备案状态") @ApiModelProperty(value = "备案状态")
@Dict(dicCode = "recordstatus")
private java.lang.String bazt; private java.lang.String bazt;
/**备案提交时间*/ /**
@Excel(name = "备案提交时间", width = 15, format = "yyyy-MM-dd") * 备案提交时间
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") */
@DateTimeFormat(pattern="yyyy-MM-dd") @Excel(name = "备案提交时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "备案提交时间") @ApiModelProperty(value = "备案提交时间")
private java.util.Date batjsj; private java.util.Date batjsj;
/**创建时间*/ /**
@Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd") * 创建时间
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") */
@DateTimeFormat(pattern="yyyy-MM-dd") @Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
private java.util.Date cjsj; private java.util.Date cjsj;
/**备注*/ /**
@Excel(name = "备注", width = 15) * 备注
*/
@Excel(name = "备注", width = 15)
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
private java.lang.String bz; private java.lang.String bz;
/**升级驾驶附件*/ /**
* 升级驾驶附件
*/
@Excel(name = "升级驾驶附件", width = 15) @Excel(name = "升级驾驶附件", width = 15)
@ApiModelProperty(value = "升级驾驶附件") @ApiModelProperty(value = "升级驾驶附件")
private java.lang.String sjjsfj; private java.lang.String sjjsfj;
/**
* 升级状态(0:升级中;1:升级结束)
*/
@Excel(name = "升级状态", width = 15)
@ApiModelProperty(value = "升级状态")
private java.lang.String sjzt;
public void updateData(OtaBaSjSjmbcx otaBaSjSjmbcx) { public void updateData(OtaBaSjSjmbcx otaBaSjSjmbcx) {
this.cpdjbh = otaBaSjSjmbcx.getBabh(); this.cpdjbh = otaBaSjSjmbcx.getBabh();
@@ -9,8 +9,8 @@ import com.jero.modules.ota.entity.OtaBaCxLsjl;
import com.jero.modules.ota.mapper.OtaBaCxListMapper; import com.jero.modules.ota.mapper.OtaBaCxListMapper;
import com.jero.modules.ota.service.*; import com.jero.modules.ota.service.*;
import com.jero.modules.ota.utils.ImportFileUtil; import com.jero.modules.ota.utils.ImportFileUtil;
import com.jero.modules.system.util.StringUtils;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.logging.Log; import org.apache.ibatis.logging.Log;
import org.apache.ibatis.logging.LogFactory; import org.apache.ibatis.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@@ -2,19 +2,18 @@ package com.jero.modules.ota.service.impl;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jero.modules.ota.entity.AttachmentEO; import com.jero.modules.ota.entity.*;
import com.jero.modules.ota.entity.OtaBaCxAqcs;
import com.jero.modules.ota.entity.OtaBaSjJssj;
import com.jero.modules.ota.entity.OtaBaSjJssjyy;
import com.jero.modules.ota.mapper.OtaBaSjJssjMapper; import com.jero.modules.ota.mapper.OtaBaSjJssjMapper;
import com.jero.modules.ota.service.IOtaBaCxTxjlService; import com.jero.modules.ota.service.IOtaBaCxTxjlService;
import com.jero.modules.ota.service.IOtaBaSjJssjService; import com.jero.modules.ota.service.IOtaBaSjJssjService;
import com.jero.modules.ota.service.IOtaBaSjJssjyyService; import com.jero.modules.ota.service.IOtaBaSjJssjyyService;
import com.jero.modules.ota.service.IOtaBaSjListService;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Date; import java.util.Date;
@@ -32,6 +31,8 @@ public class OtaBaSjJssjServiceImpl extends ServiceImpl<OtaBaSjJssjMapper, OtaBa
@Autowired @Autowired
private IOtaBaSjJssjyyService otaBaSjJssjyyService; private IOtaBaSjJssjyyService otaBaSjJssjyyService;
@Autowired
private IOtaBaSjListService otaBaSjListService;
/** /**
* 保存 * 保存
@@ -42,10 +43,23 @@ public class OtaBaSjJssjServiceImpl extends ServiceImpl<OtaBaSjJssjMapper, OtaBa
@Override @Override
public void add(OtaBaSjJssj otaBaSjJssj) { public void add(OtaBaSjJssj otaBaSjJssj) {
Date now = new Date(); Date now = new Date();
otaBaSjJssj.setCreateTime(now); if (StringUtils.isEmpty(otaBaSjJssj.getId())) {
otaBaSjJssj.setCreateTime(now);
OtaBaSjList otaBaSjList = otaBaSjListService.queryById(otaBaSjJssj.getOtaId());
otaBaSjList.setSjzt("1");
otaBaSjListService.editById(otaBaSjList);
}
otaBaSjJssj.setUpdateTime(now); otaBaSjJssj.setUpdateTime(now);
save(otaBaSjJssj); saveOrUpdate(otaBaSjJssj);
otaBaSjJssjyyService.saveBatch(otaBaSjJssj.getList()); otaBaSjJssjyyService.deleteByOtaId(otaBaSjJssj.getOtaId());
if (ObjectUtils.isNotEmpty(otaBaSjJssj.getList())) {
List<OtaBaSjJssjyy> yyList = new ArrayList<>();
for (OtaBaSjJssjyy yy : otaBaSjJssj.getList()) {
yy.setOtaId(otaBaSjJssj.getOtaId());
yyList.add(yy);
}
otaBaSjJssjyyService.saveBatch(yyList);
}
} }
/** /**
@@ -111,9 +125,10 @@ public class OtaBaSjJssjServiceImpl extends ServiceImpl<OtaBaSjJssjMapper, OtaBa
LambdaQueryWrapper<OtaBaSjJssj> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<OtaBaSjJssj> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(OtaBaSjJssj::getOtaId, otaId); queryWrapper.eq(OtaBaSjJssj::getOtaId, otaId);
OtaBaSjJssj res = this.getOne(queryWrapper, false); OtaBaSjJssj res = this.getOne(queryWrapper, false);
if (ObjectUtils.isNotEmpty(res)) {
List<OtaBaSjJssjyy> list = otaBaSjJssjyyService.queryByOtaId(otaId); List<OtaBaSjJssjyy> list = otaBaSjJssjyyService.queryByOtaId(otaId);
res.setList(list); res.setList(list);
}
return res; return res;
} }
@@ -78,6 +78,7 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl<OtaBaSjSjmbcxMapper, O
otaBaSjList = new OtaBaSjList(); otaBaSjList = new OtaBaSjList();
otaBaSjList.setId(UUID.randomUUID().toString().replace("-", "")); otaBaSjList.setId(UUID.randomUUID().toString().replace("-", ""));
otaBaSjList.updateData(otaBaSjSjmbcx); otaBaSjList.updateData(otaBaSjSjmbcx);
otaBaSjList.setSjzt("0");
otaBaSjListService.add(otaBaSjList); otaBaSjListService.add(otaBaSjList);
otaBaSjSjmbcx.setOtaId(otaBaSjList.getId()); otaBaSjSjmbcx.setOtaId(otaBaSjList.getId());
otaBaSjSjmbcx.setCreateTime(now); otaBaSjSjmbcx.setCreateTime(now);
@@ -100,7 +100,7 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
oldList = new ArrayList<>(); oldList = new ArrayList<>();
} }
ComparisonUtil cu = new ComparisonUtil(); ComparisonUtil cu = new ComparisonUtil();
List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.SJ_SJXTMCBH, OtaTitleEnum.SJKZQMC.getName(), oldList, newList, sysDictService); List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.SJ_SJXTMCBH, OtaTitleEnum.XTMC.getName(), oldList, newList, sysDictService);
saveOrUpdateBatch(newList); saveOrUpdateBatch(newList);
otaBaCxTxjlService.saveBatch(reList); otaBaCxTxjlService.saveBatch(reList);
} }
@@ -59,7 +59,7 @@ public class ComparisonUtil<T> {
tableField.setAccessible(true); tableField.setAccessible(true);
String tableFieldStr = ""; String tableFieldStr = "";
Object tableFieldObj = tableField.get(newObj); Object tableFieldObj = tableField.get(newObj);
if (ObjectUtils.isNotEmpty(tableFieldStr)) { if (ObjectUtils.isNotEmpty(tableFieldObj)) {
tableFieldStr = tableFieldObj.toString(); tableFieldStr = tableFieldObj.toString();
} }
String content = "新增了一条'" + tableFieldStr + "'"; String content = "新增了一条'" + tableFieldStr + "'";
@@ -77,7 +77,7 @@ public class ComparisonUtil<T> {
String newStr = ""; String newStr = "";
if (ObjectUtils.isNotEmpty(newVal) && !field.getName().equals(tableField.getName())) { if (ObjectUtils.isNotEmpty(newVal) && !field.getName().equals(tableField.getName())) {
newStr = parseDictText(ote, field, newObj, sysDictService); newStr = parseDictText(ote, field, newObj, sysDictService);
content = tableField.get(newObj).toString() + "-" + title + "由'空'改为'" + newStr + "'"; content = tableFieldStr + "-" + title + "由'空'改为'" + newStr + "'";
resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content)); resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content));
} }
} }
+1
View File
@@ -1739,4 +1739,5 @@ module.exports = {
verifyConformanceConfirmation:'Verify conformance confirmation', verifyConformanceConfirmation:'Verify conformance confirmation',
designConformanceVerification:'Design conformance verification', designConformanceVerification:'Design conformance verification',
nomorethan:'No more than 10', nomorethan:'No more than 10',
uploadedfilelarger:'The uploaded file is larger than 50 MB',
} }
+1
View File
@@ -1841,4 +1841,5 @@ module.exports = {
verifyConformanceConfirmation:'验证符合性确认', verifyConformanceConfirmation:'验证符合性确认',
designConformanceVerification:'设计符合性确认', designConformanceVerification:'设计符合性确认',
nomorethan:'不能超过10个', nomorethan:'不能超过10个',
uploadedfilelarger:'文件大于50M',
} }
+10 -1
View File
@@ -34,7 +34,7 @@
export default { export default {
name: 'file', name: 'file',
props: ['disableds', 'disabled', 'thisFileUploadUrl','acceptcode', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple', 'restrictUploads', 'Uploadable'], props: ['disableds', 'disabled', 'thisFileUploadUrl','size' ,'acceptcode', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple', 'restrictUploads', 'Uploadable'],
data() { data() {
return { return {
visible: false, visible: false,
@@ -98,6 +98,15 @@
return false return false
} }
} }
// 根据大小拦截
if(this.size){
const isLt2KB = file.size / 1024 /1024 < this.size
let name = file.name
if (!isLt2KB) {
this.$message.error(name + this.$t('uploadedfilelarger'))
return false
}
}
if (this.isMultiple) { if (this.isMultiple) {
if ((this.myfileList && this.myfileList.length == 1) || this.myfileList && this.myfileList.length > 1) { if ((this.myfileList && this.myfileList.length == 1) || this.myfileList && this.myfileList.length > 1) {
this.$message.warning(this.$t('onlyOnefileUploaded')) this.$message.warning(this.$t('onlyOnefileUploaded'))
@@ -68,7 +68,7 @@
<a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button> <a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button>
<a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button> <a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button>
</div> </div>
<uploadFile ref="uploadFile" :acceptcode="'doc,docx,pdf'" @uploadSuccess="uploadSuccess"></uploadFile> <uploadFile ref="uploadFile" :acceptcode="'doc,docx,pdf'" :size="50" @uploadSuccess="uploadSuccess"></uploadFile>
</div> </div>
</template> </template>
@@ -83,7 +83,7 @@
}} }}
</a-button> </a-button>
<p>{{$t('noteone')}}</p> <p>{{$t('noteone')}}</p>
<uploadFile ref="uploadFile" :acceptcode="'csv'" @uploadSuccess="uploadSuccess"></uploadFile> <uploadFile ref="uploadFile" :acceptcode="'csv'" :size="20" @uploadSuccess="uploadSuccess"></uploadFile>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -162,7 +162,7 @@
<a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button> <a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button>
<a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button> <a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button>
</div> </div>
<uploadFile ref="uploadFile" :acceptcode="'doc,docx,pdf'" @uploadSuccess="uploadSuccess"></uploadFile> <uploadFile ref="uploadFile" :acceptcode="'doc,docx,pdf'" :size="50" @uploadSuccess="uploadSuccess"></uploadFile>
</div> </div>
</template> </template>
@@ -182,7 +182,7 @@
<a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button> <a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button>
<a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button> <a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button>
</div> </div>
<uploadFile ref="uploadFile" :acceptcode="'doc,docx,pdf'" @uploadSuccess="uploadSuccess"></uploadFile> <uploadFile ref="uploadFile" :acceptcode="'doc,docx,pdf'" :size="50" @uploadSuccess="uploadSuccess"></uploadFile>
</div> </div>
</template> </template>
@@ -103,7 +103,7 @@
<a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button> <a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button>
<a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button> <a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button>
</div> </div>
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile> <uploadFile ref="uploadFile" :acceptcode="'doc,docx,pdf'" :size="50" @uploadSuccess="uploadSuccess"></uploadFile>
</div> </div>
</template> </template>
@@ -93,7 +93,7 @@
</span> </span>
</div> </div>
<div style='width: 300px'> <div style='width: 300px'>
<span class='content-text' style='background: #f3f6f6;line-height: 50px;text-align: center;color: #191E29;font-weight: bold'>{{$t('fillincontent')}}</span> <span class='content-text' style='background: #f3f6f6;line-height: 50px;text-align: center;color: #191E29;font-weight: bold'>{{$t('configuration')}}</span>
<span class='radio-text'> <span class='radio-text'>
<a-radio-group style='margin-left: 40px;' v-model="query.jgldPz"> <a-radio-group style='margin-left: 40px;' v-model="query.jgldPz">
<a-radio :value="1"> {{ $t('yes') }} </a-radio> <a-radio :value="1"> {{ $t('yes') }} </a-radio>
@@ -948,7 +948,7 @@ export default {
this.$message.success(this.$t('SavedSuccessfully')) this.$message.success(this.$t('SavedSuccessfully'))
this.getData() this.getData()
} }
}) })
}, },
@@ -47,7 +47,7 @@
<a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button> <a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button>
<a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button> <a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button>
</div> </div>
<uploadFile ref="uploadFile" :acceptcode="'doc,docx,pdf'" @uploadSuccess="uploadSuccess"></uploadFile> <uploadFile ref="uploadFile" :acceptcode="'doc,docx,pdf'" :size="50" @uploadSuccess="uploadSuccess"></uploadFile>
</div> </div>
</template> </template>
@@ -34,7 +34,7 @@
<a-button type="primary" style='width: 73px;margin-right: 50px' @click="last">{{ $t('last') }}</a-button> <a-button type="primary" style='width: 73px;margin-right: 50px' @click="last">{{ $t('last') }}</a-button>
<a-button type="primary" style='width: 73px' @click='next'>{{ $t('next') }}</a-button> <a-button type="primary" style='width: 73px' @click='next'>{{ $t('next') }}</a-button>
</div> </div>
<uploadFile ref="uploadFile" :acceptcode="'doc,docx,pdf'" @uploadSuccess="uploadSuccess"></uploadFile> <uploadFile ref="uploadFile" :acceptcode="'doc,docx,pdf'" :size="50" @uploadSuccess="uploadSuccess"></uploadFile>
</div> </div>
</template> </template>
@@ -99,7 +99,7 @@
<a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button> <a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button>
</div> </div>
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile> <uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile>
<uploadFileOta ref="uploadFileOta" :acceptcode="'doc,docx,pdf'" @uploadSuccess="uploadSuccessOta"></uploadFileOta> <uploadFileOta ref="uploadFileOta" :acceptcode="'doc,docx,pdf'" :size="50" @uploadSuccess="uploadSuccessOta"></uploadFileOta>
</div> </div>
</template> </template>