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,27 +51,31 @@ 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();
BeanUtils.copyProperties(taskQuery,zftkTaskQuery);
BeanUtils.copyProperties(taskQuery, zftkTaskQuery);
Page<ZftkTask> page = taskService.getPageDistribute(zftkTaskQuery, pageDomain);
return getDataTableByPage(page);
} else if (Objects.equals(taskQuery.getRwlx(), "2")) {
taskQuery.setRwlx(null);
ZttbTaskQuery zttbTaskQuery = new ZttbTaskQuery();
BeanUtils.copyProperties(taskQuery,zttbTaskQuery);
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);
BeanUtils.copyProperties(taskQuery, ztTaskQuery);
Page<ZtTask> page = ztTaskService.getPageDistribute(ztTaskQuery, pageDomain);
return getDataTableByPage(page);
}
@ -89,7 +93,7 @@ public class AppTaskController extends BaseController {
return success(taskService.getTaskDetail(id));
} else if (rwlx.equals("2")) {
return success(zttbTaskService.getTaskDetail(id));
}else if(rwlx.equals("0")){
} else if (rwlx.equals("0")) {
return success(ztTaskService.getTaskDetail(id));
}
return success();
@ -98,24 +102,28 @@ 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);
BeanUtils.copyProperties(taskQuery, zftkTaskQuery);
Page<ZftkTask> page = taskService.getPageDistribute(zftkTaskQuery, pageDomain);
// 返回查询结果
return getDataTableByPage(page);
} else if (Objects.equals(taskQuery.getRwlx(), "2")) {
// 参数设置
taskQuery.setRwlx(null);
ZttbTaskQuery zttbTaskQuery = new ZttbTaskQuery();
BeanUtils.copyProperties(taskQuery,zttbTaskQuery);
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);
BeanUtils.copyProperties(taskQuery, ztTaskQuery);
Page<ZtTask> page = ztTaskService.getPageDistribute(ztTaskQuery, pageDomain);
// 返回查询结果
return getDataTableByPage(page);
@ -141,28 +149,35 @@ 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);
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);
BeanUtils.copyProperties(taskQuery, zttbTaskQuery);
Page<ZttbTask> page = zttbTaskService.getPageDistribute2(zttbTaskQuery, pageDomain);
// 返回查询结果
return getDataTableByPage(page);
}else if (Objects.equals(taskQuery.getRwlx(), "0")) {
} else if (Objects.equals(taskQuery.getRwlx(), "0")) {
// 参数设置
taskQuery.setRwlx(null);
taskQuery.setToId(getUserId());
taskQuery.setZjxfqk("1");
ZtTaskQuery ztTaskQuery = new ZtTaskQuery();
BeanUtils.copyProperties(taskQuery,ztTaskQuery);
BeanUtils.copyProperties(taskQuery, ztTaskQuery);
Page<ZtTask> page = ztTaskService.getPageDistribute2(ztTaskQuery, pageDomain);
// 返回查询结果
return getDataTableByPage(page);

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

@ -3,7 +3,7 @@
<div id="lonlatMap" style=" width:100%; height: 100%;position: absolute;z-index: 1"></div>
<div
style="position: absolute;right:10px;top: 10px;z-index: 2;background:rgba(255,255,255,0.6);border-radius: 5px;overflow: hidden">
<!-- <div class="map-gj">图层</div>-->
<!-- <div class="map-gj">图层</div>-->
<div class="map-gj" @click="onLineTool">测距</div>
<div class="map-gj" @click="onPolygonTool">测面</div>
<div class="map-gj" @click="clerOver">清除</div>
@ -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

@ -1,30 +1,30 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<!-- <el-form-item label="年份" prop="nian">-->
<!-- <el-input-->
<!-- v-model="queryParams.nian"-->
<!-- placeholder="请输入年份"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="县名称" prop="xian">-->
<!-- <el-input-->
<!-- v-model="queryParams.xian"-->
<!-- placeholder="请输入县名称"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="项目名称" prop="xmmc">-->
<!-- <el-input-->
<!-- v-model="queryParams.xmmc"-->
<!-- placeholder="请输入项目名称"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="年份" prop="nian">-->
<!-- <el-input-->
<!-- v-model="queryParams.nian"-->
<!-- placeholder="请输入年份"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="县名称" prop="xian">-->
<!-- <el-input-->
<!-- v-model="queryParams.xian"-->
<!-- placeholder="请输入县名称"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="项目名称" prop="xmmc">-->
<!-- <el-input-->
<!-- v-model="queryParams.xmmc"-->
<!-- placeholder="请输入项目名称"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="综合搜索" prop="dkh">
<el-input
v-model="queryParams.dkh"
@ -33,22 +33,22 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="功能分区" prop="gnfq">-->
<!-- <el-input-->
<!-- v-model="queryParams.gnfq"-->
<!-- placeholder="请输入功能分区"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="动工状态" prop="dgzt">-->
<!-- <el-input-->
<!-- v-model="queryParams.dgzt"-->
<!-- placeholder="请输入动工状态"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="功能分区" prop="gnfq">-->
<!-- <el-input-->
<!-- v-model="queryParams.gnfq"-->
<!-- placeholder="请输入功能分区"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="动工状态" prop="dgzt">-->
<!-- <el-input-->
<!-- v-model="queryParams.dgzt"-->
<!-- placeholder="请输入动工状态"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -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>
@ -92,10 +94,10 @@
<el-table v-loading="loading" :data="taskList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :selectable="selectable" fixed="left"/>
<el-table-column label="id" align="center" prop="id" fixed="left"/>
<el-table-column label="年份" align="center" prop="nian" />
<el-table-column label="县名称" align="center" prop="xian" />
<el-table-column label="年份" align="center" prop="nian"/>
<el-table-column label="县名称" align="center" prop="xian"/>
<el-table-column label="项目名称" align="center" prop="xmmc" min-width="180"/>
<el-table-column label="地块号" align="center" prop="dkh" />
<el-table-column label="地块号" align="center" prop="dkh"/>
<el-table-column label="功能分区" align="center" prop="gnfq" min-width="180"/>
<el-table-column label="地块面积" align="center" prop="dkmj" :show-overflow-tooltip="true"/>
<el-table-column label="农用地面积" align="center" prop="nydmj" :show-overflow-tooltip="true"/>
@ -103,7 +105,7 @@
<el-table-column label="建设用地面积" align="center" prop="jsydmj" :show-overflow-tooltip="true"/>
<el-table-column label="未利用用地面积" align="center" prop="wlydmj" :show-overflow-tooltip="true"/>
<el-table-column label="永久基本农田面积" align="center" prop="yjjbntmj" :show-overflow-tooltip="true"/>
<el-table-column label="动工状态" align="center" prop="dgzt" />
<el-table-column label="动工状态" align="center" prop="dgzt"/>
<el-table-column label="导入人员" align="center" prop="createBy" min-width="120"/>
<el-table-column label="导入时间" align="center" prop="drsj" width="180">
<template slot-scope="scope">
@ -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"
@ -149,50 +153,50 @@
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="125px">
<el-form-item label="年份" prop="nian">
<el-input v-model="form.nian" placeholder="请输入年份" />
<el-input v-model="form.nian" placeholder="请输入年份"/>
</el-form-item>
<el-form-item label="县名称" prop="xian">
<el-input v-model="form.xian" placeholder="请输入县名称" />
<el-input v-model="form.xian" placeholder="请输入县名称"/>
</el-form-item>
<el-form-item label="项目名称" prop="xmmc">
<el-input v-model="form.xmmc" placeholder="请输入项目名称" />
<el-input v-model="form.xmmc" placeholder="请输入项目名称"/>
</el-form-item>
<el-form-item label="地块号" prop="dkh">
<el-input v-model="form.dkh" placeholder="请输入地块号" />
<el-input v-model="form.dkh" placeholder="请输入地块号"/>
</el-form-item>
<el-form-item label="功能分区" prop="gnfq">
<el-input v-model="form.gnfq" placeholder="请输入功能分区" />
<el-input v-model="form.gnfq" placeholder="请输入功能分区"/>
</el-form-item>
<el-form-item label="地块面积" prop="dkmj">
<el-input v-model="form.dkmj" placeholder="请输入地块面积" />
<el-input v-model="form.dkmj" placeholder="请输入地块面积"/>
</el-form-item>
<el-form-item label="农用地面积" prop="nydmj">
<el-input v-model="form.nydmj" placeholder="请输入农用地面积" />
<el-input v-model="form.nydmj" placeholder="请输入农用地面积"/>
</el-form-item>
<el-form-item label="耕地面积" prop="gdmj">
<el-input v-model="form.gdmj" placeholder="请输入耕地面积" />
<el-input v-model="form.gdmj" placeholder="请输入耕地面积"/>
</el-form-item>
<el-form-item label="建设用地面积" prop="jsydmj">
<el-input v-model="form.jsydmj" placeholder="请输入建设用地面积" />
<el-input v-model="form.jsydmj" placeholder="请输入建设用地面积"/>
</el-form-item>
<el-form-item label="未利用用地面积" prop="wlydmj">
<el-input v-model="form.wlydmj" placeholder="请输入未利用用地面积" />
<el-input v-model="form.wlydmj" placeholder="请输入未利用用地面积"/>
</el-form-item>
<el-form-item label="永久基本农田面积" prop="yjjbntmj">
<el-input v-model="form.yjjbntmj" placeholder="请输入永久基本农田面积" />
<el-input v-model="form.yjjbntmj" placeholder="请输入永久基本农田面积"/>
</el-form-item>
<el-form-item label="动工状态" prop="dgzt">
<el-input v-model="form.dgzt" placeholder="请输入动工状态" />
<el-input v-model="form.dgzt" placeholder="请输入动工状态"/>
</el-form-item>
<el-form-item label="经度" prop="x">
<el-input v-model="form.x" placeholder="请输入经度" />
<el-input v-model="form.x" placeholder="请输入经度"/>
</el-form-item>
<el-form-item label="纬度" prop="y">
<el-input v-model="form.y" placeholder="请输入纬度" />
<el-input v-model="form.y" placeholder="请输入纬度"/>
</el-form-item>
<!-- <el-form-item label="详细信息" prop="info">-->
<!-- <el-input v-model="form.info" type="textarea" placeholder="请输入内容" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="详细信息" prop="info">-->
<!-- <el-input v-model="form.info" type="textarea" placeholder="请输入内容" />-->
<!-- </el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -239,7 +243,7 @@
</template>
<script>
import { listTask, getTask, delTask, addTask, updateTask } from "@/api/cxxm/zftk/task";
import {listTask, getTask, delTask, addTask, updateTask} from "@/api/cxxm/zftk/task";
import {getToken} from "@/utils/auth";
import {Loading} from "element-ui";
@ -311,8 +315,7 @@ export default {
//
form: {},
//
rules: {
},
rules: {},
//
importTemplate: process.env.VUE_APP_BASE_API + "/profile/common/执法踏勘数据要求V1.0.doc",
//
@ -416,7 +419,7 @@ export default {
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 修改按钮操作 */
@ -452,12 +455,13 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除任务编号为"' + ids + '"的数据项?').then(function() {
this.$modal.confirm('是否确认删除任务编号为"' + ids + '"的数据项?').then(function () {
return delTask(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}).catch(() => {
});
},
/** 导入按钮操作 */
handleImport() {
@ -517,7 +521,12 @@ export default {
},
//
submitFileForm() {
this.upload.rwlx="zftk";
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;