fix文件上传

This commit is contained in:
ZhiJian 2024-08-04 17:13:05 +08:00
parent 2dc8aaad49
commit 3afade2532
16 changed files with 214 additions and 118 deletions

View File

@ -51,10 +51,15 @@ public class AppTaskController extends BaseController {
@ApiOperation("查询任务列表")
@GetMapping("/list")
public TableDataInfo list(TaskQuery taskQuery, PageDomain pageDomain) {
// 参数设置
taskQuery.setDeptId(getDeptId());
if (getLoginUser().getUser().getRoles().get(0).getRoleName().equals("外业调查员")) {
taskQuery.setToId(getUserId());
}
if (taskQuery.getZjxfqk() == null || taskQuery.getZjxfqk().equals("")) {
taskQuery.setZjxfqk("1");
}
// 分发
if (Objects.equals(taskQuery.getRwlx(), "1")) {
taskQuery.setRwlx(null);
ZftkTaskQuery zftkTaskQuery = new ZftkTaskQuery();
@ -67,8 +72,7 @@ public class AppTaskController extends BaseController {
BeanUtils.copyProperties(taskQuery, zttbTaskQuery);
Page<ZttbTask> page = zttbTaskService.getPageDistribute(zttbTaskQuery, pageDomain);
return getDataTableByPage(page);
}
else if (Objects.equals(taskQuery.getRwlx(), "0")) {
} else if (Objects.equals(taskQuery.getRwlx(), "0")) {
taskQuery.setRwlx(null);
ZtTaskQuery ztTaskQuery = new ZtTaskQuery();
BeanUtils.copyProperties(taskQuery, ztTaskQuery);
@ -98,7 +102,9 @@ public class AppTaskController extends BaseController {
@ApiOperation("查询州级下发任务列表")
@GetMapping("/distribute/list")
public TableDataInfo distributeList(TaskQuery taskQuery, PageDomain pageDomain) {
// 分发
if (Objects.equals(taskQuery.getRwlx(), "1")) {
// 参数设置
taskQuery.setRwlx(null);
ZftkTaskQuery zftkTaskQuery = new ZftkTaskQuery();
BeanUtils.copyProperties(taskQuery, zftkTaskQuery);
@ -106,6 +112,7 @@ public class AppTaskController extends BaseController {
// 返回查询结果
return getDataTableByPage(page);
} else if (Objects.equals(taskQuery.getRwlx(), "2")) {
// 参数设置
taskQuery.setRwlx(null);
ZttbTaskQuery zttbTaskQuery = new ZttbTaskQuery();
BeanUtils.copyProperties(taskQuery, zttbTaskQuery);
@ -113,6 +120,7 @@ public class AppTaskController extends BaseController {
// 返回查询结果
return getDataTableByPage(page);
} else if (Objects.equals(taskQuery.getRwlx(), "0")) {
// 参数设置
taskQuery.setRwlx(null);
ZtTaskQuery ztTaskQuery = new ZtTaskQuery();
BeanUtils.copyProperties(taskQuery, ztTaskQuery);
@ -141,26 +149,33 @@ public class AppTaskController extends BaseController {
*/
@ApiOperation("查询本人任务列表")
@GetMapping("/my/list")
public TableDataInfo meList(TaskQuery taskQuery, PageDomain pageDomain) {
public TableDataInfo myList(TaskQuery taskQuery, PageDomain pageDomain) {
// 分发
if (Objects.equals(taskQuery.getRwlx(), "1")) {
// 参数设置
taskQuery.setRwlx(null);
taskQuery.setToId(getUserId());
taskQuery.setZjxfqk("1");
ZftkTaskQuery zftkTaskQuery = new ZftkTaskQuery();
BeanUtils.copyProperties(taskQuery, zftkTaskQuery);
Page<ZftkTask> page = taskService.getPageDistribute2(zftkTaskQuery, pageDomain);
// 返回查询结果
return getDataTableByPage(page);
} else if (Objects.equals(taskQuery.getRwlx(), "2")) {
// 参数设置
taskQuery.setRwlx(null);
taskQuery.setToId(getUserId());
taskQuery.setZjxfqk("1");
ZttbTaskQuery zttbTaskQuery = new ZttbTaskQuery();
BeanUtils.copyProperties(taskQuery, zttbTaskQuery);
Page<ZttbTask> page = zttbTaskService.getPageDistribute2(zttbTaskQuery, pageDomain);
// 返回查询结果
return getDataTableByPage(page);
} else if (Objects.equals(taskQuery.getRwlx(), "0")) {
// 参数设置
taskQuery.setRwlx(null);
taskQuery.setToId(getUserId());
taskQuery.setZjxfqk("1");
ZtTaskQuery ztTaskQuery = new ZtTaskQuery();
BeanUtils.copyProperties(taskQuery, ztTaskQuery);
Page<ZtTask> page = ztTaskService.getPageDistribute2(ztTaskQuery, pageDomain);

View File

@ -98,6 +98,9 @@ public class ZftkTaskServiceImpl extends ServiceImpl<ZftkTaskMapper, ZftkTask> i
// 解析文件内容
Map map = JSONObject.parseObject(content.toString(), Map.class);
Object features = map.get("features");
if (features == null) {
throw new RuntimeException("文件格式错误缺少features信息");
}
List importData = JSONObject.parseObject(features.toString(), List.class);
List<String> failList = new ArrayList<>();
@ -109,14 +112,24 @@ public class ZftkTaskServiceImpl extends ServiceImpl<ZftkTaskMapper, ZftkTask> i
// 提取并设置图斑空间数据
Object geometry = item.get("geometry");
if (geometry == null) {
throw new RuntimeException("文件格式错误缺少geometry信息");
}
taskGis.setGis(geometry.toString());
// 提取并设置图斑信息
Object properties = item.get("properties");
if (properties == null) {
throw new RuntimeException("文件格式错误缺少properties信息");
}
Map taskMap = JSONObject.parseObject(properties.toString(), Map.class);
// 校验必填字段是否存在
String[] requiredFields = new String[]{"NF", "XMC", "XMMC", "DKH", "GNFQ", "DKMJ", "NYDMJ", "GDMJ", "JSYDMJ", "WLYDMJ", "YJJBNTMJ", "DGZT", "X", "Y", "XDM"};
for (String field : requiredFields) {
String fieldLowerCase = field.toLowerCase();
if (taskMap.containsKey(fieldLowerCase)) {
throw new RuntimeException(StringUtils.format("字段:{}必须使用大写字母,请纠正为{}!", fieldLowerCase, field));
}
if (taskMap.get(field) == null) {
throw new RuntimeException(StringUtils.format("缺少必须字段:{},请检查导入数据!", field));
}
@ -285,6 +298,10 @@ public class ZftkTaskServiceImpl extends ServiceImpl<ZftkTaskMapper, ZftkTask> i
if (task.getDeptId() == null) {
task.setDeptId(SecurityUtils.getLoginUser().getUser().getDeptId());
}
// 默认州级已下发
if (task.getZjxfqk() == null) {
task.setZjxfqk("1");
}
// 初始化分页对象
Page<ZftkTask> page = new Page<>(pageDomain.getPageNum(), pageDomain.getPageSize());
LambdaQueryWrapper<ZftkTask> queryWrapper = getQueryWrapper(task);

View File

@ -99,6 +99,9 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
// 解析文件内容
Map map = JSONObject.parseObject(content.toString(), Map.class);
Object features = map.get("features");
if (features == null) {
throw new RuntimeException("文件格式错误缺少features信息");
}
List importData = JSONObject.parseObject(features.toString(), List.class);
List<String> failList = new ArrayList<>();
@ -110,15 +113,25 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
// 提取并设置图斑空间数据
Object geometry = item.get("geometry");
if (geometry == null) {
throw new RuntimeException("文件格式错误缺少geometry信息");
}
taskGis.setGis(geometry.toString());
// 提取并设置图斑信息
Object properties = item.get("properties");
if (properties == null) {
throw new RuntimeException("文件格式错误缺少properties信息");
}
Map taskMap = JSONObject.parseObject(properties.toString(), Map.class);
// 校验必填字段是否存在
String[] requiredFields = new String[]{"NF", "XMC", "XZMC", "CJDCQ", "JCBH", "XFSJ", "JCMJ", "GDMJ", "XMMC"};
String[] requiredFields = new String[]{"NF", "XMC", "XZMC", "CJDCQ", "JCBH", "XFSJ", "JCMJ", "GDMJ", "XMMC", "X", "Y"};
for (String field : requiredFields) {
String fieldLowerCase = field.toLowerCase();
if (taskMap.containsKey(fieldLowerCase)) {
throw new RuntimeException(StringUtils.format("字段:{}必须使用大写字母,请纠正为{}!", fieldLowerCase,field));
}
if (taskMap.get(field) == null) {
throw new RuntimeException(StringUtils.format("缺少必须字段:{},请检查导入数据!", field));
}
@ -285,6 +298,10 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
if (task.getDeptId() == null) {
task.setDeptId(SecurityUtils.getLoginUser().getUser().getDeptId());
}
// 默认州级已下发
if (task.getZjxfqk() == null) {
task.setZjxfqk("1");
}
// 初始化分页对象
Page<ZtTask> page = new Page<>(pageDomain.getPageNum(), pageDomain.getPageSize());
LambdaQueryWrapper<ZtTask> queryWrapper = getQueryWrapper(task);

View File

@ -97,6 +97,9 @@ public class ZttbTaskServiceImpl extends ServiceImpl<ZttbTaskMapper, ZttbTask> i
// 解析文件内容
Map map = JSONObject.parseObject(content.toString(), Map.class);
Object features = map.get("features");
if (features == null) {
throw new RuntimeException("文件格式错误缺少features信息");
}
List importData = JSONObject.parseObject(features.toString(), List.class);
List<String> failList = new ArrayList<>();
@ -108,16 +111,26 @@ public class ZttbTaskServiceImpl extends ServiceImpl<ZttbTaskMapper, ZttbTask> i
// 提取并设置图斑空间数据
Object geometry = item.get("geometry");
if (geometry == null) {
throw new RuntimeException("文件格式错误缺少geometry信息");
}
taskGis.setGis(geometry.toString());
// 提取并设置图斑信息
Object properties = item.get("properties");
if (properties == null) {
throw new RuntimeException("文件格式错误缺少properties信息");
}
Map taskMap = JSONObject.parseObject(properties.toString(), Map.class);
// 校验必填字段是否存在
String[] requiredFields = new String[]{"NF", "XMC", "XZMC", "CJDCQ", "JCBH", "XFSJ", "JCMJ", "GDMJ", "XMMC"};
String[] requiredFields = new String[]{"NF", "XMC", "XZMC", "CJDCQ", "JCBH", "XFSJ", "JCMJ", "GDMJ", "XMMC", "X", "Y"};
for (String field : requiredFields) {
String fieldLowerCase = field.toLowerCase();
if (taskMap.containsKey(fieldLowerCase)) {
throw new RuntimeException(StringUtils.format("字段:{}必须使用大写字母,请纠正为{}", fieldLowerCase,field));
}
if (taskMap.get(field) == null) {
throw new RuntimeException(StringUtils.format("缺少必须字段:{},请检查导入数据!", field));
throw new RuntimeException(StringUtils.format("缺少必须字段:{},请检查导入数据!", field));
}
}
zttbTask.setRwlx(rwlx);
@ -284,6 +297,10 @@ public class ZttbTaskServiceImpl extends ServiceImpl<ZttbTaskMapper, ZttbTask> i
if (task.getDeptId() == null) {
task.setDeptId(SecurityUtils.getLoginUser().getUser().getDeptId());
}
// 默认州级已下发
if (task.getZjxfqk() == null) {
task.setZjxfqk("1");
}
// 初始化分页对象
Page<ZttbTask> page = new Page<>(pageDomain.getPageNum(), pageDomain.getPageSize());
LambdaQueryWrapper<ZttbTask> queryWrapper = getQueryWrapper(task);

View File

@ -6,7 +6,7 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://ruoyi-mysql:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=False&serverTimezone=GMT%2B8
url: jdbc:mysql://ruoyi-mysql:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
username: root
password: 7ZH2jxM1
# 从库数据源

View File

@ -19,7 +19,12 @@ export default {
data() {
return {
map: null,
infoData: {},
infoData: {
x: "101.51821267418167",
y: "25.053135818719412",
dkh: "",
tbbh: ""
},
recordData: {},
lineTool: null,//
polygonTool: null,//

View File

@ -74,7 +74,8 @@
size="mini"
:disabled="single"
@click="handleUpdate"
>修改</el-button>
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -84,7 +85,8 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除</el-button>
>删除
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -117,14 +119,16 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button>
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
v-if="scope.row.zjxfqk==0"
@click="handleDelete(scope.row)"
>删除</el-button>
>删除
</el-button>
<el-button
size="mini"
type="text"
@ -311,8 +315,7 @@ export default {
//
form: {},
//
rules: {
},
rules: {},
//
importTemplate: process.env.VUE_APP_BASE_API + "/profile/common/执法踏勘数据要求V1.0.doc",
//
@ -457,7 +460,8 @@ export default {
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}).catch(() => {
});
},
/** 导入按钮操作 */
handleImport() {
@ -518,6 +522,11 @@ export default {
//
submitFileForm() {
this.upload.rwlx = "zftk";
//
if(this.$refs.upload.uploadFiles.length === 0){
this.$message.error("请上传文件");
return;
}
if (this.upload.rwlx == null) {
this.$message.error("请选择任务类型!")
} else {

View File

@ -98,12 +98,12 @@
<el-table-column label="乡镇名称" align="center" prop="xzmc"/>
<el-table-column label="村社名称" align="center" prop="csmc" min-width="180"/>
<el-table-column label="图斑类型" align="center" prop="tblx"/>
<el-table-column label="图斑编号" align="center" prop="tbbh" min-width="190"/>
<el-table-column label="图斑编号" align="center" prop="tbbh" min-width="180" :show-overflow-tooltip="true"/>
<el-table-column label="图斑面积" align="center" prop="tbmj" :show-overflow-tooltip="true"/>
<el-table-column label="耕地面积" align="center" prop="gdmj" :show-overflow-tooltip="true"/>
<el-table-column label="基本农田面积" align="center" prop="jbntmj" :show-overflow-tooltip="true"/>
<el-table-column label="项目名称" align="center" prop="xmmc"/>
<el-table-column label="存在问题" align="center" prop="czwt"/>
<el-table-column label="项目名称" align="center" prop="xmmc" min-width="180"/>
<el-table-column label="存在问题" align="center" prop="czwt" min-width="180"/>
<el-table-column label="导入人员" align="center" prop="createBy" min-width="120"/>
<el-table-column label="导入时间" align="center" prop="drsj" min-width="120">
<template slot-scope="scope">

View File

@ -77,7 +77,7 @@
<el-table-column label="乡镇名称" align="center" prop="xzmc"/>
<el-table-column label="村社名称" align="center" prop="csmc" min-width="180"/>
<el-table-column label="图斑类型" align="center" prop="tblx"/>
<el-table-column label="图斑编号" align="center" prop="tbbh" min-width="190"/>
<el-table-column label="图斑编号" align="center" prop="tbbh" min-width="180" :show-overflow-tooltip="true"/>
<el-table-column label="已巡查次数" align="center" prop="yxccs"/>
<el-table-column label="州级巡查次数" align="center" prop="zjxccs"/>
<el-table-column label="县级巡查次数" align="center" prop="xjxccs"/>
@ -89,8 +89,8 @@
<el-table-column label="图斑面积" align="center" prop="tbmj" :show-overflow-tooltip="true"/>
<el-table-column label="耕地面积" align="center" prop="gdmj" :show-overflow-tooltip="true"/>
<el-table-column label="基本农田面积" align="center" prop="jbntmj" :show-overflow-tooltip="true"/>
<el-table-column label="项目名称" align="center" prop="xmmc"/>
<el-table-column label="存在问题" align="center" prop="czwt"/>
<el-table-column label="项目名称" align="center" prop="xmmc" min-width="180"/>
<el-table-column label="存在问题" align="center" prop="czwt" min-width="180"/>
<el-table-column label="导入人员" align="center" prop="createBy" min-width="120"/>
<el-table-column label="导入时间" align="center" prop="drsj" min-width="120">
<template slot-scope="scope">

View File

@ -127,12 +127,12 @@
<el-table-column label="乡镇名称" align="center" prop="xzmc"/>
<el-table-column label="村社名称" align="center" prop="csmc" min-width="180"/>
<el-table-column label="图斑类型" align="center" prop="tblx"/>
<el-table-column label="图斑编号" align="center" prop="tbbh" min-width="190"/>
<el-table-column label="图斑编号" align="center" prop="tbbh" min-width="180" :show-overflow-tooltip="true"/>
<el-table-column label="图斑面积" align="center" prop="tbmj" :show-overflow-tooltip="true"/>
<el-table-column label="耕地面积" align="center" prop="gdmj" :show-overflow-tooltip="true"/>
<el-table-column label="基本农田面积" align="center" prop="jbntmj" :show-overflow-tooltip="true"/>
<el-table-column label="项目名称" align="center" prop="xmmc"/>
<el-table-column label="存在问题" align="center" prop="czwt"/>
<el-table-column label="项目名称" align="center" prop="xmmc" min-width="180"/>
<el-table-column label="存在问题" align="center" prop="czwt" min-width="180"/>
<el-table-column label="导入人员" align="center" prop="createBy" min-width="120"/>
<el-table-column label="导入时间" align="center" prop="drsj" min-width="120">
<template slot-scope="scope">

View File

@ -97,12 +97,12 @@
<el-table-column label="乡镇名称" align="center" prop="xzmc"/>
<el-table-column label="村社名称" align="center" prop="csmc" min-width="180"/>
<el-table-column label="图斑类型" align="center" prop="tblx"/>
<el-table-column label="图斑编号" align="center" prop="tbbh" min-width="190"/>
<el-table-column label="图斑编号" align="center" prop="tbbh" min-width="180" :show-overflow-tooltip="true"/>
<el-table-column label="图斑面积" align="center" prop="tbmj" :show-overflow-tooltip="true"/>
<el-table-column label="耕地面积" align="center" prop="gdmj" :show-overflow-tooltip="true"/>
<el-table-column label="基本农田面积" align="center" prop="jbntmj" :show-overflow-tooltip="true"/>
<el-table-column label="项目名称" align="center" prop="xmmc"/>
<el-table-column label="存在问题" align="center" prop="czwt"/>
<el-table-column label="项目名称" align="center" prop="xmmc" min-width="180"/>
<el-table-column label="存在问题" align="center" prop="czwt" min-width="180"/>
<el-table-column label="导入人员" align="center" prop="createBy" min-width="120"/>
<el-table-column label="导入时间" align="center" prop="drsj" min-width="120">
<template slot-scope="scope">
@ -529,6 +529,11 @@ export default {
//
submitFileForm() {
this.upload.rwlx="zftk";
//
if(this.$refs.upload.uploadFiles.length === 0){
this.$message.error("请上传文件");
return;
}
if (this.upload.rwlx == null) {
this.$message.error("请选择任务类型!")
} else {

View File

@ -99,13 +99,13 @@
<el-table-column label="乡镇名称" align="center" prop="xzmc"/>
<el-table-column label="村社名称" align="center" prop="csmc" min-width="180"/>
<el-table-column label="图斑来源" align="center" prop="tbly"/>
<el-table-column label="图斑编号" align="center" prop="tbbh" min-width="190"/>
<el-table-column label="图斑编号" align="center" prop="tbbh" min-width="180" :show-overflow-tooltip="true"/>
<el-table-column label="图斑面积" align="center" prop="tbmj" :show-overflow-tooltip="true"/>
<el-table-column label="耕地面积" align="center" prop="gdmj" :show-overflow-tooltip="true"/>
<el-table-column label="基本农田面积" align="center" prop="jbntmj" :show-overflow-tooltip="true"/>
<el-table-column label="项目名称" align="center" prop="xmmc"/>
<el-table-column label="存在问题" align="center" prop="czwt"/>
<el-table-column label="导入人员" align="center" prop="createBy"/>
<el-table-column label="项目名称" align="center" prop="xmmc" min-width="180"/>
<el-table-column label="存在问题" align="center" prop="czwt" min-width="180"/>
<el-table-column label="导入人员" align="center" prop="createBy" min-width="180"/>
<el-table-column label="导入时间" align="center" prop="drsj" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.drsj, '{y}-{m}-{d}') }}</span>

View File

@ -77,7 +77,7 @@
<el-table-column label="乡镇名称" align="center" prop="xzmc"/>
<el-table-column label="村社名称" align="center" prop="csmc" min-width="180"/>
<el-table-column label="图斑来源" align="center" prop="tbly"/>
<el-table-column label="图斑编号" align="center" prop="tbbh" min-width="190"/>
<el-table-column label="图斑编号" align="center" prop="tbbh" min-width="180" :show-overflow-tooltip="true"/>
<el-table-column label="已巡查次数" align="center" prop="yxccs"/>
<el-table-column label="州级巡查次数" align="center" prop="zjxccs"/>
<el-table-column label="县级巡查次数" align="center" prop="xjxccs"/>
@ -89,8 +89,8 @@
<el-table-column label="图斑面积" align="center" prop="tbmj" :show-overflow-tooltip="true"/>
<el-table-column label="耕地面积" align="center" prop="gdmj" :show-overflow-tooltip="true"/>
<el-table-column label="基本农田面积" align="center" prop="jbntmj" :show-overflow-tooltip="true"/>
<el-table-column label="项目名称" align="center" prop="xmmc"/>
<el-table-column label="存在问题" align="center" prop="czwt"/>
<el-table-column label="项目名称" align="center" prop="xmmc" min-width="180"/>
<el-table-column label="存在问题" align="center" prop="czwt" min-width="180"/>
<el-table-column label="导入人员" align="center" prop="createBy" width="180"/>
<el-table-column label="导入时间" align="center" prop="drsj" width="180">
<template slot-scope="scope">

View File

@ -128,12 +128,12 @@
<el-table-column label="乡镇名称" align="center" prop="xzmc"/>
<el-table-column label="村社名称" align="center" prop="csmc" min-width="180"/>
<el-table-column label="图斑来源" align="center" prop="tbly"/>
<el-table-column label="图斑编号" align="center" prop="tbbh" min-width="190"/>
<el-table-column label="图斑编号" align="center" prop="tbbh" min-width="180" :show-overflow-tooltip="true"/>
<el-table-column label="图斑面积" align="center" prop="tbmj" :show-overflow-tooltip="true"/>
<el-table-column label="耕地面积" align="center" prop="gdmj" :show-overflow-tooltip="true"/>
<el-table-column label="基本农田面积" align="center" prop="jbntmj" :show-overflow-tooltip="true"/>
<el-table-column label="项目名称" align="center" prop="xmmc"/>
<el-table-column label="存在问题" align="center" prop="czwt"/>
<el-table-column label="项目名称" align="center" prop="xmmc" min-width="180"/>
<el-table-column label="存在问题" align="center" prop="czwt" min-width="180"/>
<el-table-column label="导入人员" align="center" prop="createBy" width="180"/>
<el-table-column label="导入时间" align="center" prop="drsj" width="180">
<template slot-scope="scope">

View File

@ -99,12 +99,12 @@
<el-table-column label="乡镇名称" align="center" prop="xzmc"/>
<el-table-column label="村社名称" align="center" prop="csmc" min-width="180"/>
<el-table-column label="图斑来源" align="center" prop="tbly"/>
<el-table-column label="图斑编号" align="center" prop="tbbh" min-width="190"/>
<el-table-column label="图斑编号" align="center" prop="tbbh" min-width="180" :show-overflow-tooltip="true"/>
<el-table-column label="图斑面积" align="center" prop="tbmj" :show-overflow-tooltip="true"/>
<el-table-column label="耕地面积" align="center" prop="gdmj" :show-overflow-tooltip="true"/>
<el-table-column label="基本农田面积" align="center" prop="jbntmj" :show-overflow-tooltip="true"/>
<el-table-column label="项目名称" align="center" prop="xmmc"/>
<el-table-column label="存在问题" align="center" prop="czwt"/>
<el-table-column label="项目名称" align="center" prop="xmmc" min-width="180"/>
<el-table-column label="存在问题" align="center" prop="czwt" min-width="180"/>
<el-table-column label="导入人员" align="center" prop="createBy" min-width="120"/>
<el-table-column label="导入时间" align="center" prop="drsj" min-width="120">
<template slot-scope="scope">
@ -531,6 +531,11 @@ export default {
//
submitFileForm() {
this.upload.rwlx = "zftk";
//
if(this.$refs.upload.uploadFiles.length === 0){
this.$message.error("请上传文件");
return;
}
if (this.upload.rwlx == null) {
this.$message.error("请选择任务类型!")
} else {

View File

@ -164,6 +164,7 @@
<el-table-column type="selection" width="50" align="center"/>
<el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible"/>
<el-table-column label="登录账号" align="center" key="userName" prop="userName" v-if="columns[1].visible"
width="120"
:show-overflow-tooltip="true"/>
<el-table-column label="用户姓名" align="center" key="nickName" prop="nickName" v-if="columns[2].visible"
:show-overflow-tooltip="true"/>
@ -766,6 +767,11 @@ export default {
},
//
submitFileForm() {
//
if(this.$refs.upload.uploadFiles.length === 0){
this.$message.error("请上传文件");
return;
}
if(!this.isAllowed){
this.$message.error('文件格式错误!');
return;