Merge remote-tracking branch 'origin/master'
This commit is contained in:
+31
-4
@@ -2,12 +2,14 @@ package com.jero.modules.ocr.controller;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.jero.common.api.vo.Result;
|
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.constant.enums.CutEnum;
|
import com.jero.common.constant.enums.CutEnum;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||||
import com.jero.modules.ocr.entity.OcrRecordEO;
|
import com.jero.modules.ocr.entity.OcrRecordEO;
|
||||||
import com.jero.modules.ocr.enums.FileSyncStateEnum;
|
import com.jero.modules.ocr.enums.FileSyncStateEnum;
|
||||||
@@ -19,6 +21,7 @@ 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.commons.lang.StringUtils;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
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;
|
||||||
@@ -30,6 +33,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -61,6 +65,10 @@ public class OcrRecordEOController extends JeroController<OcrRecordEO, IOcrRecor
|
|||||||
@PostMapping(value = "/page")
|
@PostMapping(value = "/page")
|
||||||
@RequiresPermissions("ocr:ocrRecord:page")
|
@RequiresPermissions("ocr:ocrRecord:page")
|
||||||
public Result<?> queryPageList(@RequestBody OcrRecordEOPage ocrRecordEOPage) {
|
public Result<?> queryPageList(@RequestBody OcrRecordEOPage ocrRecordEOPage) {
|
||||||
|
//查询创建者为当前用户的数据
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
String loginUser = sysUser.getUsername();
|
||||||
|
|
||||||
LambdaQueryWrapper<OcrRecordEO> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<OcrRecordEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
if (StringUtils.isNotEmpty(ocrRecordEOPage.getStandNumber())) {
|
if (StringUtils.isNotEmpty(ocrRecordEOPage.getStandNumber())) {
|
||||||
ocrRecordEOPage.setStandNumber(ocrRecordEOPage.getStandNumber().replace("%","\\%"));
|
ocrRecordEOPage.setStandNumber(ocrRecordEOPage.getStandNumber().replace("%","\\%"));
|
||||||
@@ -70,6 +78,7 @@ public class OcrRecordEOController extends JeroController<OcrRecordEO, IOcrRecor
|
|||||||
.like(StringUtils.isNotEmpty(ocrRecordEOPage.getStandName()) && CutEnum.EN.getValue().equals(ocrRecordEOPage.getCut()), OcrRecordEO::getStandNameEn, ocrRecordEOPage.getStandName())
|
.like(StringUtils.isNotEmpty(ocrRecordEOPage.getStandName()) && CutEnum.EN.getValue().equals(ocrRecordEOPage.getCut()), OcrRecordEO::getStandNameEn, ocrRecordEOPage.getStandName())
|
||||||
.like(StringUtils.isNotEmpty(ocrRecordEOPage.getStandNumber()), OcrRecordEO::getStandNumber, ocrRecordEOPage.getStandNumber())
|
.like(StringUtils.isNotEmpty(ocrRecordEOPage.getStandNumber()), OcrRecordEO::getStandNumber, ocrRecordEOPage.getStandNumber())
|
||||||
.eq(StringUtils.isNotEmpty(ocrRecordEOPage.getResultContent()), OcrRecordEO::getResultContent, ocrRecordEOPage.getResultContent())
|
.eq(StringUtils.isNotEmpty(ocrRecordEOPage.getResultContent()), OcrRecordEO::getResultContent, ocrRecordEOPage.getResultContent())
|
||||||
|
.eq(OcrRecordEO::getCreateBy,loginUser)
|
||||||
.orderBy(StringUtils.isNotBlank(ocrRecordEOPage.getOrderByField()), "1".equals(ocrRecordEOPage.getOrderBy())?true:false, OcrRecordEO::getUpdateTime)
|
.orderBy(StringUtils.isNotBlank(ocrRecordEOPage.getOrderByField()), "1".equals(ocrRecordEOPage.getOrderBy())?true:false, OcrRecordEO::getUpdateTime)
|
||||||
.orderByDesc(OcrRecordEO::getCreateTime);
|
.orderByDesc(OcrRecordEO::getCreateTime);
|
||||||
Page<OcrRecordEO> page = new Page<OcrRecordEO>(ocrRecordEOPage.getPageNo(), ocrRecordEOPage.getPageSize());
|
Page<OcrRecordEO> page = new Page<OcrRecordEO>(ocrRecordEOPage.getPageNo(), ocrRecordEOPage.getPageSize());
|
||||||
@@ -234,13 +243,31 @@ public class OcrRecordEOController extends JeroController<OcrRecordEO, IOcrRecor
|
|||||||
@ApiOperation(value="OCR识别转换记录表-通过id删除", notes="OCR识别转换记录表-通过id删除")
|
@ApiOperation(value="OCR识别转换记录表-通过id删除", notes="OCR识别转换记录表-通过id删除")
|
||||||
@GetMapping(value = "/delete")
|
@GetMapping(value = "/delete")
|
||||||
@RequiresPermissions("ocr:ocrRecord:delete")
|
@RequiresPermissions("ocr:ocrRecord:delete")
|
||||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<?> delete(@RequestParam(name="id",required=true) String id,
|
||||||
|
@RequestParam(name="cut",required=true) String cut) {
|
||||||
if (StringUtils.isBlank(id)) {
|
if (StringUtils.isBlank(id)) {
|
||||||
return Result.error("删除数据不能为空");
|
return Result.error("删除数据不能为空");
|
||||||
}
|
}
|
||||||
ocrRecordService.deleteById(id);
|
|
||||||
//TODO 删除上传的pdf文件,转换成功的将doc文件一并删除
|
//增加创建者校验
|
||||||
return Result.OK("删除成功!");
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
String loginUser = sysUser.getUsername();
|
||||||
|
QueryWrapper<OcrRecordEO> ocrRecordEOQueryWrapper = new QueryWrapper<>();
|
||||||
|
ocrRecordEOQueryWrapper.eq("id",id);
|
||||||
|
String ocrRecordEOCreateBy = ocrRecordService.list(ocrRecordEOQueryWrapper).stream().map(e -> e.getCreateBy()).collect(Collectors.toList()).get(0);
|
||||||
|
if (loginUser.equals(ocrRecordEOCreateBy)) {
|
||||||
|
ocrRecordService.deleteById(id);
|
||||||
|
|
||||||
|
//TODO 删除上传的pdf文件,转换成功的将doc文件一并删除
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
|
||||||
|
}else {
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
return Result.error("当前用户非创建者,无法下载");
|
||||||
|
}else{
|
||||||
|
return Result.error("The current user is not the creator and cannot be downloaded.");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+38
-20
@@ -1,9 +1,11 @@
|
|||||||
package com.jero.modules.ocr.controller;
|
package com.jero.modules.ocr.controller;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.constant.enums.CutEnum;
|
import com.jero.common.constant.enums.CutEnum;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.modules.ocr.entity.OcrRecordEO;
|
import com.jero.modules.ocr.entity.OcrRecordEO;
|
||||||
import com.jero.modules.ocr.enums.ResultContentEnum;
|
import com.jero.modules.ocr.enums.ResultContentEnum;
|
||||||
import com.jero.modules.ocr.service.IOcrRecordEOService;
|
import com.jero.modules.ocr.service.IOcrRecordEOService;
|
||||||
@@ -17,6 +19,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.http.entity.ContentType;
|
import org.apache.http.entity.ContentType;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
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.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@@ -29,6 +32,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @program: OcrDemo
|
* @program: OcrDemo
|
||||||
@@ -67,27 +71,41 @@ public class OcrRestfulController{
|
|||||||
@ApiOperation(value = "下载word文件")
|
@ApiOperation(value = "下载word文件")
|
||||||
@GetMapping("/downFile")
|
@GetMapping("/downFile")
|
||||||
@RequiresPermissions("ocr:ocrRestful:downFile")
|
@RequiresPermissions("ocr:ocrRestful:downFile")
|
||||||
public void downFile(String fileName, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
public void downFile(String fileName, HttpServletResponse response, HttpServletRequest request,String cut) throws Exception {
|
||||||
InputStream is = null;
|
//增加创建者校验
|
||||||
OutputStream os = null;
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
response.reset();
|
String loginUser = sysUser.getUsername();
|
||||||
try {
|
QueryWrapper<OcrRecordEO> ocrRecordEOQueryWrapper = new QueryWrapper<>();
|
||||||
String downFileName = fileName.substring(fileName.indexOf("_") + 1);
|
ocrRecordEOQueryWrapper.eq("doc_real_name",fileName);
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=" + downFileName);
|
String ocrRecordEOCreateBy = ocrRecordEOService.list(ocrRecordEOQueryWrapper).stream().map(e -> e.getCreateBy()).collect(Collectors.toList()).get(0);
|
||||||
response.setContentType("application/octet-stream");
|
if (loginUser.equals(ocrRecordEOCreateBy)) {
|
||||||
|
InputStream is = null;
|
||||||
|
OutputStream os = null;
|
||||||
|
response.reset();
|
||||||
|
try {
|
||||||
|
String downFileName = fileName.substring(fileName.indexOf("_") + 1);
|
||||||
|
response.setHeader("Content-Disposition", "attachment; filename=" + downFileName);
|
||||||
|
response.setContentType("application/octet-stream");
|
||||||
|
|
||||||
String fullPath = ocrPath + fileName;
|
String fullPath = ocrPath + fileName;
|
||||||
is = new FileInputStream(fullPath);
|
is = new FileInputStream(fullPath);
|
||||||
os = response.getOutputStream();
|
os = response.getOutputStream();
|
||||||
IOUtils.copy(is, os);
|
IOUtils.copy(is, os);
|
||||||
os.flush();
|
os.flush();
|
||||||
} catch (FileNotFoundException var4) {
|
} catch (FileNotFoundException var4) {
|
||||||
throw new JeroBootException("文件[" + ocrPath + fileName + "]不存在");
|
throw new JeroBootException("文件[" + ocrPath + fileName + "]不存在");
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
} finally {
|
} finally {
|
||||||
is.close();
|
is.close();
|
||||||
os.close();
|
os.close();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
throw new JeroBootException("当前用户非创建者,无法下载");
|
||||||
|
}else{
|
||||||
|
throw new JeroBootException("The current user is not the creator and cannot be downloaded.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -139,13 +139,10 @@ export default {
|
|||||||
...this.form
|
...this.form
|
||||||
}
|
}
|
||||||
if(this.form.username !== undefined) {
|
if(this.form.username !== undefined) {
|
||||||
this.form.username = `*${this.form.username}*`
|
params.username = `*${this.form.username}*`
|
||||||
}
|
}
|
||||||
getAction(`sys/user/page`, params).then(res => {
|
getAction(`sys/user/page`, params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
if(this.form.username !== undefined) {
|
|
||||||
this.form.username = this.form.username.slice(1,this.form.username.length-1)
|
|
||||||
}
|
|
||||||
this.areaTable = [...res.result.records]
|
this.areaTable = [...res.result.records]
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,10 +32,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 正整数 -->
|
<!-- 正整数 -->
|
||||||
<div v-if="item.controlVerify == '3'">
|
<div v-if="item.controlVerify == '3'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^[1-9]\d*$/g,'')"
|
||||||
:precision="0"
|
|
||||||
:placeholder="$t('enterPositiveInteger')"
|
:placeholder="$t('enterPositiveInteger')"
|
||||||
v-model="item.dataValue" />
|
v-model="item.dataValue" />
|
||||||
</div>
|
</div>
|
||||||
@@ -49,45 +48,41 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 整数或小数 -->
|
<!-- 整数或小数 -->
|
||||||
<div v-if="item.controlVerify == '5'">
|
<div v-if="item.controlVerify == '5'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-|\+)?\d+(\.\d+)?$/g,'')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
|
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
|
||||||
v-model="item.dataValue" />
|
v-model="item.dataValue" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 一位小数 -->
|
<!-- 一位小数 -->
|
||||||
<div v-if="item.controlVerify == '6'">
|
<div v-if="item.controlVerify == '6'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{1})$/g,'')"
|
||||||
:precision="1"
|
|
||||||
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
|
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
|
||||||
v-model="item.dataValue" />
|
v-model="item.dataValue" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 两位小数-->
|
<!-- 两位小数-->
|
||||||
<div v-if="item.controlVerify == '7'">
|
<div v-if="item.controlVerify == '7'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{2})$/g,'')"
|
||||||
:precision="2"
|
|
||||||
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
|
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
|
||||||
v-model="item.dataValue" />
|
v-model="item.dataValue" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 三位小数-->
|
<!-- 三位小数-->
|
||||||
<div v-if="item.controlVerify == '8'">
|
<div v-if="item.controlVerify == '8'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{3})$/g,'')"
|
||||||
:precision="3"
|
|
||||||
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
|
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
|
||||||
v-model="item.dataValue" />
|
v-model="item.dataValue" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 四位小数-->
|
<!-- 四位小数-->
|
||||||
<div v-if="item.controlVerify == '9'">
|
<div v-if="item.controlVerify == '9'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{4})$/g,'')"
|
||||||
:precision="4"
|
|
||||||
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
|
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
|
||||||
v-model="item.dataValue" />
|
v-model="item.dataValue" />
|
||||||
</div>
|
</div>
|
||||||
@@ -174,12 +169,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 正整数 -->
|
<!-- 正整数 -->
|
||||||
<div v-if="item.controlVerify == '3'">
|
<div v-if="item.controlVerify == '3'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^[1-9]\d*$/g,'')"
|
||||||
:precision="0"
|
:placeholder="$t('enterPositiveInteger')"
|
||||||
:placeholder="$t('enterPositiveInteger')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 正浮点书 -->
|
<!-- 正浮点书 -->
|
||||||
<div v-if="item.controlVerify == '4'">
|
<div v-if="item.controlVerify == '4'">
|
||||||
@@ -191,47 +185,43 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 整数或小数 -->
|
<!-- 整数或小数 -->
|
||||||
<div v-if="item.controlVerify == '5'">
|
<div v-if="item.controlVerify == '5'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-|\+)?\d+(\.\d+)?$/g,'')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
|
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
|
||||||
v-model="item.dataValue" />
|
v-model="item.dataValue" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 一位小数 -->
|
<!-- 一位小数 -->
|
||||||
<div v-if="item.controlVerify == '6'">
|
<div v-if="item.controlVerify == '6'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{1})$/g,'')"
|
||||||
:precision="1"
|
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 两位小数-->
|
<!-- 两位小数-->
|
||||||
<div v-if="item.controlVerify == '7'">
|
<div v-if="item.controlVerify == '7'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{2})$/g,'')"
|
||||||
:precision="2"
|
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 三位小数-->
|
<!-- 三位小数-->
|
||||||
<div v-if="item.controlVerify == '8'">
|
<div v-if="item.controlVerify == '8'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{3})$/g,'')"
|
||||||
:precision="3"
|
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 四位小数-->
|
<!-- 四位小数-->
|
||||||
<div v-if="item.controlVerify == '9'">
|
<div v-if="item.controlVerify == '9'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{4})$/g,'')"
|
||||||
:precision="4"
|
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -267,12 +257,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 正整数 -->
|
<!-- 正整数 -->
|
||||||
<div v-if="item.controlVerify == '3'">
|
<div v-if="item.controlVerify == '3'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^[1-9]\d*$/g,'')"
|
||||||
:precision="0"
|
:placeholder="$t('enterPositiveInteger')"
|
||||||
:placeholder="$t('enterPositiveInteger')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 正浮点书 -->
|
<!-- 正浮点书 -->
|
||||||
<div v-if="item.controlVerify == '4'">
|
<div v-if="item.controlVerify == '4'">
|
||||||
@@ -284,47 +273,43 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 整数或小数 -->
|
<!-- 整数或小数 -->
|
||||||
<div v-if="item.controlVerify == '5'">
|
<div v-if="item.controlVerify == '5'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-|\+)?\d+(\.\d+)?$/g,'')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
|
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
|
||||||
v-model="item.dataValue" />
|
v-model="item.dataValue" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 一位小数 -->
|
<!-- 一位小数 -->
|
||||||
<div v-if="item.controlVerify == '6'">
|
<div v-if="item.controlVerify == '6'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{1})$/g,'')"
|
||||||
:precision="1"
|
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 两位小数-->
|
<!-- 两位小数-->
|
||||||
<div v-if="item.controlVerify == '7'">
|
<div v-if="item.controlVerify == '7'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{2})$/g,'')"
|
||||||
:precision="2"
|
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 三位小数-->
|
<!-- 三位小数-->
|
||||||
<div v-if="item.controlVerify == '8'">
|
<div v-if="item.controlVerify == '8'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{3})$/g,'')"
|
||||||
:precision="3"
|
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 四位小数-->
|
<!-- 四位小数-->
|
||||||
<div v-if="item.controlVerify == '9'">
|
<div v-if="item.controlVerify == '9'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{4})$/g,'')"
|
||||||
:precision="4"
|
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if='item.type==="pull_more"' class='add-width'>
|
<div v-if='item.type==="pull_more"' class='add-width'>
|
||||||
@@ -369,12 +354,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 正整数 -->
|
<!-- 正整数 -->
|
||||||
<div v-if="item.controlVerify == '3'">
|
<div v-if="item.controlVerify == '3'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^[1-9]\d*$/g,'')"
|
||||||
:precision="0"
|
:placeholder="$t('enterPositiveInteger')"
|
||||||
:placeholder="$t('enterPositiveInteger')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 正浮点书 -->
|
<!-- 正浮点书 -->
|
||||||
<div v-if="item.controlVerify == '4'">
|
<div v-if="item.controlVerify == '4'">
|
||||||
@@ -386,47 +370,43 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 整数或小数 -->
|
<!-- 整数或小数 -->
|
||||||
<div v-if="item.controlVerify == '5'">
|
<div v-if="item.controlVerify == '5'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-|\+)?\d+(\.\d+)?$/g,'')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
|
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
|
||||||
v-model="item.dataValue" />
|
v-model="item.dataValue" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 一位小数 -->
|
<!-- 一位小数 -->
|
||||||
<div v-if="item.controlVerify == '6'">
|
<div v-if="item.controlVerify == '6'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{1})$/g,'')"
|
||||||
:precision="1"
|
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 两位小数-->
|
<!-- 两位小数-->
|
||||||
<div v-if="item.controlVerify == '7'">
|
<div v-if="item.controlVerify == '7'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{2})$/g,'')"
|
||||||
:precision="2"
|
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 三位小数-->
|
<!-- 三位小数-->
|
||||||
<div v-if="item.controlVerify == '8'">
|
<div v-if="item.controlVerify == '8'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{3})$/g,'')"
|
||||||
:precision="3"
|
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 四位小数-->
|
<!-- 四位小数-->
|
||||||
<div v-if="item.controlVerify == '9'">
|
<div v-if="item.controlVerify == '9'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{4})$/g,'')"
|
||||||
:precision="4"
|
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if='item.type==="file"' class='add-width'>
|
<div v-if='item.type==="file"' class='add-width'>
|
||||||
@@ -522,12 +502,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 正整数 -->
|
<!-- 正整数 -->
|
||||||
<div v-if="item.controlVerify == '3'">
|
<div v-if="item.controlVerify == '3'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^[1-9]\d*$/g,'')"
|
||||||
:precision="0"
|
:placeholder="$t('enterPositiveInteger')"
|
||||||
:placeholder="$t('enterPositiveInteger')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 正浮点书 -->
|
<!-- 正浮点书 -->
|
||||||
<div v-if="item.controlVerify == '4'">
|
<div v-if="item.controlVerify == '4'">
|
||||||
@@ -539,47 +518,43 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 整数或小数 -->
|
<!-- 整数或小数 -->
|
||||||
<div v-if="item.controlVerify == '5'">
|
<div v-if="item.controlVerify == '5'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-|\+)?\d+(\.\d+)?$/g,'')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
|
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
|
||||||
v-model="item.dataValue" />
|
v-model="item.dataValue" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 一位小数 -->
|
<!-- 一位小数 -->
|
||||||
<div v-if="item.controlVerify == '6'">
|
<div v-if="item.controlVerify == '6'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{1})$/g,'')"
|
||||||
:precision="1"
|
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 两位小数-->
|
<!-- 两位小数-->
|
||||||
<div v-if="item.controlVerify == '7'">
|
<div v-if="item.controlVerify == '7'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{2})$/g,'')"
|
||||||
:precision="2"
|
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 三位小数-->
|
<!-- 三位小数-->
|
||||||
<div v-if="item.controlVerify == '8'">
|
<div v-if="item.controlVerify == '8'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{3})$/g,'')"
|
||||||
:precision="3"
|
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 四位小数-->
|
<!-- 四位小数-->
|
||||||
<div v-if="item.controlVerify == '9'">
|
<div v-if="item.controlVerify == '9'">
|
||||||
<a-input-number class="box-input inputWid"
|
<a-input class="box-input inputWid"
|
||||||
:disabled="item.isLock == '1' ? true: false"
|
:disabled="item.isLock == '1' ? true: false"
|
||||||
:max="99999"
|
onkeyup="value=value.replace(/^(\-)?\d+(\.\d{4})$/g,'')"
|
||||||
:precision="4"
|
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
|
||||||
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
|
v-model="item.dataValue" />
|
||||||
v-model="item.dataValue" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if='item.type==="file"'>
|
<div v-if='item.type==="file"'>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
:data-source="dataSource"
|
:data-source="dataSource"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
|
:rowClassName="rowClassName"
|
||||||
:components="components"
|
:components="components"
|
||||||
@change="tableOnChange"
|
@change="tableOnChange"
|
||||||
@onHeaderRow='onHeaderRow'
|
@onHeaderRow='onHeaderRow'
|
||||||
@@ -231,6 +232,9 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
rowClassName(row,index) {
|
||||||
|
return row.changeFlag == '1'? 'yellow' : 'red'
|
||||||
|
},
|
||||||
// 查看配置详细信息
|
// 查看配置详细信息
|
||||||
onClickSee(val) {
|
onClickSee(val) {
|
||||||
let _this = this
|
let _this = this
|
||||||
@@ -574,5 +578,10 @@
|
|||||||
.resize-table-th {
|
.resize-table-th {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
/deep/.ant-table-tbody .yellow {
|
||||||
|
background-color: #ffff001f !important;
|
||||||
|
height: 40px !important;
|
||||||
|
border: none !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -192,7 +192,7 @@
|
|||||||
<!-- 同步上报库--->
|
<!-- 同步上报库--->
|
||||||
<a-modal v-model="areaVisibsynchronous" :title="$t('SynchronousReportLibrary')" width='650px' :footer="null">
|
<a-modal v-model="areaVisibsynchronous" :title="$t('SynchronousReportLibrary')" width='650px' :footer="null">
|
||||||
<synchronous-submission-library v-if='areaVisibsynchronous' :paramsManifest='paramsManifest' @GetgetTableList='GetgetTableList'
|
<synchronous-submission-library v-if='areaVisibsynchronous' :paramsManifest='paramsManifest' @GetgetTableList='GetgetTableList'
|
||||||
:selectedRowKeysArray='selectedRowKeysArray' @areaVisibsynchronous='areaVisibsynchronous = false'/>
|
:selectedRowKeysArray='selectedRowKeysArray' @areaVisible='areaVisibsynchronous = false'/>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
@@ -824,10 +824,11 @@ export default {
|
|||||||
if(itemIn !== 'sdt') {
|
if(itemIn !== 'sdt') {
|
||||||
if(item[itemIn] instanceof Object) {
|
if(item[itemIn] instanceof Object) {
|
||||||
postDateobj[itemIn] = item[itemIn]
|
postDateobj[itemIn] = item[itemIn]
|
||||||
if(item[itemIn].list[0].dataValue instanceof Array) {
|
item[itemIn].list.forEach((item,index) => {
|
||||||
item[itemIn].list[0].dataValue = item[itemIn].list[0].dataValue.join(',')
|
if(item.type == 'pull_more'){
|
||||||
// todo 校验
|
item.dataValue = item.dataValue.join(',')
|
||||||
}
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user