导入用户
This commit is contained in:
parent
b500a532b1
commit
ffe52038bb
@ -32,7 +32,7 @@ public class CxxmUserZJ extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 部门名称
|
* 部门名称
|
||||||
*/
|
*/
|
||||||
@Excel(name = "归属市县", type = Excel.Type.IMPORT, combo = {"楚雄彝族自治州","楚雄市", "禄丰市", "大姚县", "姚安县", "武定县", "双柏县", "牟定县", "南华县", "永仁县", "元谋县"})
|
@Excel(name = "归属市县", type = Excel.Type.IMPORT, combo = {"楚雄彝族自治州", "楚雄市", "禄丰市", "大姚县", "姚安县", "武定县", "双柏县", "牟定县", "南华县", "永仁县", "元谋县", "高新区"})
|
||||||
private String deptName;
|
private String deptName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10,7 +10,7 @@ import java.util.List;
|
|||||||
|
|
||||||
|
|
||||||
public interface CxxmUserMapper extends BaseMapper<SysUser> {
|
public interface CxxmUserMapper extends BaseMapper<SysUser> {
|
||||||
@Select("select distinct group_name as groupName,count(user_id) as userCount from sys_user where dept_id=#{deptId} and del_flag=0 group by group_name")
|
@Select("select distinct group_name as groupName,count(user_id) as userCount from sys_user where dept_id=#{deptId} and del_flag=0 and group_name != '' group by group_name")
|
||||||
List<UserGroup> getGroupNameByDeptId(Long deptId);
|
List<UserGroup> getGroupNameByDeptId(Long deptId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,6 @@ public class CxxmUserServiceImpl implements ICxxmUserService {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
|
||||||
public String importCxxmUser(List<CxxmUserZJ> userList, Boolean isUpdateSupport, String operName) {
|
public String importCxxmUser(List<CxxmUserZJ> userList, Boolean isUpdateSupport, String operName) {
|
||||||
if (StringUtils.isNull(userList) || userList.size() == 0) {
|
if (StringUtils.isNull(userList) || userList.size() == 0) {
|
||||||
throw new ServiceException("导入用户数据不能为空!");
|
throw new ServiceException("导入用户数据不能为空!");
|
||||||
@ -96,7 +95,7 @@ public class CxxmUserServiceImpl implements ICxxmUserService {
|
|||||||
user.setDeptName(SecurityUtils.getLoginUser().getUser().getDept().getDeptName());
|
user.setDeptName(SecurityUtils.getLoginUser().getUser().getDept().getDeptName());
|
||||||
}
|
}
|
||||||
if (user.getGroupName() == null || Objects.equals(user.getGroupName(), "")) {
|
if (user.getGroupName() == null || Objects.equals(user.getGroupName(), "")) {
|
||||||
user.setGroupName("未指定");
|
user.setGroupName("");
|
||||||
}
|
}
|
||||||
// 验证是否存在这个用户
|
// 验证是否存在这个用户
|
||||||
SysUser u = userMapper.selectUserByUserName(user.getUserName());
|
SysUser u = userMapper.selectUserByUserName(user.getUserName());
|
||||||
|
@ -189,18 +189,7 @@ public class ZftkTaskServiceImpl extends ServiceImpl<ZftkTaskMapper, ZftkTask> i
|
|||||||
task.setDgzt(dkh);
|
task.setDgzt(dkh);
|
||||||
// 构建查询条件
|
// 构建查询条件
|
||||||
LambdaQueryWrapper<ZftkTask> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ZftkTask> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
// 根据年份进行模糊查询
|
|
||||||
queryWrapper.like(Objects.nonNull(task.getNian()), ZftkTask::getNian, task.getNian());
|
|
||||||
// 根据任务所在县进行模糊查询
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getXian()), ZftkTask::getXian, task.getXian());
|
|
||||||
// 根据任务项目名称进行模糊查询
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getXmmc()), ZftkTask::getXmmc, task.getXmmc());
|
|
||||||
// 根据任务地块号进行模糊查询
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getDkh()), ZftkTask::getDkh, task.getDkh());
|
|
||||||
// 根据功能分区进行模糊查询
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getGnfq()), ZftkTask::getGnfq, task.getGnfq());
|
|
||||||
// 根据任务动工状态进行模糊查询
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getDgzt()), ZftkTask::getDgzt, task.getDgzt());
|
|
||||||
// 根据任务类型进行精确查询
|
// 根据任务类型进行精确查询
|
||||||
queryWrapper.eq(Objects.nonNull(task.getRwlx()), ZftkTask::getRwlx, task.getRwlx());
|
queryWrapper.eq(Objects.nonNull(task.getRwlx()), ZftkTask::getRwlx, task.getRwlx());
|
||||||
// 根据州级下发情况进行精确查询
|
// 根据州级下发情况进行精确查询
|
||||||
@ -218,6 +207,19 @@ public class ZftkTaskServiceImpl extends ServiceImpl<ZftkTaskMapper, ZftkTask> i
|
|||||||
// 根据部门ID查询该部门及其所有父部门的任务
|
// 根据部门ID查询该部门及其所有父部门的任务
|
||||||
queryWrapper.in(Objects.nonNull(task.getDeptId()), ZftkTask::getDeptId, deptMapper.getAllAncestorsByDeptId(task.getDeptId()));
|
queryWrapper.in(Objects.nonNull(task.getDeptId()), ZftkTask::getDeptId, deptMapper.getAllAncestorsByDeptId(task.getDeptId()));
|
||||||
|
|
||||||
|
// 根据年份进行模糊查询
|
||||||
|
queryWrapper.like(Objects.nonNull(task.getNian()), ZftkTask::getNian, task.getNian());
|
||||||
|
// 根据任务所在县进行模糊查询
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getXian()), ZftkTask::getXian, task.getXian());
|
||||||
|
// 根据任务项目名称进行模糊查询
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getXmmc()), ZftkTask::getXmmc, task.getXmmc());
|
||||||
|
// 根据任务地块号进行模糊查询
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getDkh()), ZftkTask::getDkh, task.getDkh());
|
||||||
|
// 根据功能分区进行模糊查询
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getGnfq()), ZftkTask::getGnfq, task.getGnfq());
|
||||||
|
// 根据任务动工状态进行模糊查询
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getDgzt()), ZftkTask::getDgzt, task.getDgzt());
|
||||||
|
|
||||||
// 根据处理时间进行区间查询
|
// 根据处理时间进行区间查询
|
||||||
List<String> drsjQuery = task.getDrsjQuery();
|
List<String> drsjQuery = task.getDrsjQuery();
|
||||||
if (drsjQuery != null && drsjQuery.size() == 2) {
|
if (drsjQuery != null && drsjQuery.size() == 2) {
|
||||||
|
@ -189,18 +189,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
|||||||
task.setCzwt(tbbh);
|
task.setCzwt(tbbh);
|
||||||
// 构建查询条件
|
// 构建查询条件
|
||||||
LambdaQueryWrapper<ZtTask> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ZtTask> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
// 根据年份进行模糊查询
|
|
||||||
queryWrapper.like(Objects.nonNull(task.getNian()), ZtTask::getNian, task.getNian());
|
|
||||||
// 根据任务所在县进行模糊查询
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getXian()), ZtTask::getXian, task.getXian());
|
|
||||||
// 根据任务所在乡镇进行模糊查询
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getXzmc()), ZtTask::getXzmc, task.getXzmc());
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getCsmc()), ZtTask::getCsmc, task.getCsmc());
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getTblx()), ZtTask::getTblx, task.getTblx());
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getTbbh()), ZtTask::getTbbh, task.getTbbh());
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getCzwt()), ZtTask::getCzwt, task.getCzwt());
|
|
||||||
// 根据任务项目名称进行模糊查询
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getXmmc()), ZtTask::getXmmc, task.getXmmc());
|
|
||||||
// 根据任务类型进行精确查询
|
// 根据任务类型进行精确查询
|
||||||
queryWrapper.eq(Objects.nonNull(task.getRwlx()), ZtTask::getRwlx, task.getRwlx());
|
queryWrapper.eq(Objects.nonNull(task.getRwlx()), ZtTask::getRwlx, task.getRwlx());
|
||||||
// 根据州级下发情况进行精确查询
|
// 根据州级下发情况进行精确查询
|
||||||
@ -218,6 +207,19 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
|||||||
// 根据部门ID查询该部门及其所有父部门的任务
|
// 根据部门ID查询该部门及其所有父部门的任务
|
||||||
queryWrapper.in(Objects.nonNull(task.getDeptId()), ZtTask::getDeptId, deptMapper.getAllAncestorsByDeptId(task.getDeptId()));
|
queryWrapper.in(Objects.nonNull(task.getDeptId()), ZtTask::getDeptId, deptMapper.getAllAncestorsByDeptId(task.getDeptId()));
|
||||||
|
|
||||||
|
// 根据年份进行模糊查询
|
||||||
|
queryWrapper.like(Objects.nonNull(task.getNian()), ZtTask::getNian, task.getNian());
|
||||||
|
// 根据任务所在县进行模糊查询
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getXian()), ZtTask::getXian, task.getXian());
|
||||||
|
// 根据任务所在乡镇进行模糊查询
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getXzmc()), ZtTask::getXzmc, task.getXzmc());
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getCsmc()), ZtTask::getCsmc, task.getCsmc());
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getTblx()), ZtTask::getTblx, task.getTblx());
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getTbbh()), ZtTask::getTbbh, task.getTbbh());
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getCzwt()), ZtTask::getCzwt, task.getCzwt());
|
||||||
|
// 根据任务项目名称进行模糊查询
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getXmmc()), ZtTask::getXmmc, task.getXmmc());
|
||||||
|
|
||||||
// 根据处理时间进行区间查询
|
// 根据处理时间进行区间查询
|
||||||
List<String> drsjQuery = task.getDrsjQuery();
|
List<String> drsjQuery = task.getDrsjQuery();
|
||||||
if (drsjQuery != null && drsjQuery.size() == 2) {
|
if (drsjQuery != null && drsjQuery.size() == 2) {
|
||||||
|
@ -187,18 +187,7 @@ public class ZttbTaskServiceImpl extends ServiceImpl<ZttbTaskMapper, ZttbTask> i
|
|||||||
task.setCzwt(tbbh);
|
task.setCzwt(tbbh);
|
||||||
// 构建查询条件
|
// 构建查询条件
|
||||||
LambdaQueryWrapper<ZttbTask> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ZttbTask> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
// 根据年份进行模糊查询
|
|
||||||
queryWrapper.like(Objects.nonNull(task.getNian()), ZttbTask::getNian, task.getNian());
|
|
||||||
// 根据任务所在县进行模糊查询
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getXian()), ZttbTask::getXian, task.getXian());
|
|
||||||
// 根据任务所在乡镇进行模糊查询
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getXzmc()), ZttbTask::getXzmc, task.getXzmc());
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getCsmc()), ZttbTask::getCsmc, task.getCsmc());
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getTbly()), ZttbTask::getTbly, task.getTbly());
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getTbbh()), ZttbTask::getTbbh, task.getTbbh());
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getCzwt()), ZttbTask::getCzwt, task.getCzwt());
|
|
||||||
// 根据任务项目名称进行模糊查询
|
|
||||||
queryWrapper.or().like(Objects.nonNull(task.getXmmc()), ZttbTask::getXmmc, task.getXmmc());
|
|
||||||
// 根据任务类型进行精确查询
|
// 根据任务类型进行精确查询
|
||||||
queryWrapper.eq(Objects.nonNull(task.getRwlx()), ZttbTask::getRwlx, task.getRwlx());
|
queryWrapper.eq(Objects.nonNull(task.getRwlx()), ZttbTask::getRwlx, task.getRwlx());
|
||||||
// 根据州级下发情况进行精确查询
|
// 根据州级下发情况进行精确查询
|
||||||
@ -216,6 +205,19 @@ public class ZttbTaskServiceImpl extends ServiceImpl<ZttbTaskMapper, ZttbTask> i
|
|||||||
// 根据部门ID查询该部门及其所有父部门的任务
|
// 根据部门ID查询该部门及其所有父部门的任务
|
||||||
queryWrapper.in(Objects.nonNull(task.getDeptId()), ZttbTask::getDeptId, deptMapper.getAllAncestorsByDeptId(task.getDeptId()));
|
queryWrapper.in(Objects.nonNull(task.getDeptId()), ZttbTask::getDeptId, deptMapper.getAllAncestorsByDeptId(task.getDeptId()));
|
||||||
|
|
||||||
|
// 根据年份进行模糊查询
|
||||||
|
queryWrapper.like(Objects.nonNull(task.getNian()), ZttbTask::getNian, task.getNian());
|
||||||
|
// 根据任务所在县进行模糊查询
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getXian()), ZttbTask::getXian, task.getXian());
|
||||||
|
// 根据任务所在乡镇进行模糊查询
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getXzmc()), ZttbTask::getXzmc, task.getXzmc());
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getCsmc()), ZttbTask::getCsmc, task.getCsmc());
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getTbly()), ZttbTask::getTbly, task.getTbly());
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getTbbh()), ZttbTask::getTbbh, task.getTbbh());
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getCzwt()), ZttbTask::getCzwt, task.getCzwt());
|
||||||
|
// 根据任务项目名称进行模糊查询
|
||||||
|
queryWrapper.or().like(Objects.nonNull(task.getXmmc()), ZttbTask::getXmmc, task.getXmmc());
|
||||||
|
|
||||||
// 根据处理时间进行区间查询
|
// 根据处理时间进行区间查询
|
||||||
List<String> drsjQuery = task.getDrsjQuery();
|
List<String> drsjQuery = task.getDrsjQuery();
|
||||||
if (drsjQuery != null && drsjQuery.size() == 2) {
|
if (drsjQuery != null && drsjQuery.size() == 2) {
|
||||||
|
@ -6,7 +6,7 @@ spring:
|
|||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://ruoyi-mysql:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://ruoyi-mysql:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=False&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: 7ZH2jxM1
|
password: 7ZH2jxM1
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
|
|
||||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
|
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
|
||||||
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
|
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
|
||||||
|
|
||||||
<div class="right-menu">
|
<div class="right-menu">
|
||||||
|
|
||||||
<template v-if="device!=='mobile'">
|
<template v-if="device!=='mobile'">
|
||||||
<search id="header-search" class="right-menu-item"/>
|
<search id="header-search" class="right-menu-item"/>
|
||||||
|
|
||||||
<!-- <el-tooltip content="源码地址" effect="dark" placement="bottom">-->
|
<!-- <el-tooltip content="源码地址" effect="dark" placement="bottom">-->
|
||||||
<!-- <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />-->
|
<!-- <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />-->
|
||||||
<!-- </el-tooltip>-->
|
<!-- </el-tooltip>-->
|
||||||
|
|
||||||
<el-tooltip content="操作手册" effect="dark" placement="bottom">
|
<el-tooltip content="操作手册" effect="dark" placement="bottom">
|
||||||
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect"/>
|
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect"/>
|
||||||
@ -44,6 +44,7 @@
|
|||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="right-menu" style="color: red;">非涉密系统,切勿上传涉密信息!</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -223,9 +223,9 @@
|
|||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<div style="margin-top: 10px">
|
<div style="margin-top: 10px">
|
||||||
<span>仅允许导入json格式文件。</span>
|
<span>仅允许导入json格式文件。</span>
|
||||||
<el-link type="primary" style="font-size:12px;vertical-align: baseline;"
|
<!-- <el-link type="primary" style="font-size:12px;vertical-align: baseline;"-->
|
||||||
:href='importTemplate'>下载模板
|
<!-- :href='importTemplate'>下载模板-->
|
||||||
</el-link>
|
<!-- </el-link>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
@ -240,6 +240,7 @@
|
|||||||
<script>
|
<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 {getToken} from "@/utils/auth";
|
||||||
|
import {Loading} from "element-ui";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Task",
|
name: "Task",
|
||||||
@ -468,6 +469,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 文件上传成功处理
|
// 文件上传成功处理
|
||||||
handleFileSuccess(response, file, fileList) {
|
handleFileSuccess(response, file, fileList) {
|
||||||
|
Loading.service({fullscreen: true, text: "导入中..."}).close();
|
||||||
if (response.code === 500) {
|
if (response.code === 500) {
|
||||||
this.$modal.msgError(response.msg);
|
this.$modal.msgError(response.msg);
|
||||||
}
|
}
|
||||||
@ -498,6 +500,7 @@ export default {
|
|||||||
this.$message.error("请选择任务类型!")
|
this.$message.error("请选择任务类型!")
|
||||||
} else {
|
} else {
|
||||||
this.$refs.upload.submit();
|
this.$refs.upload.submit();
|
||||||
|
Loading.service({fullscreen: true, text: "导入中..."});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//判断是否可勾选
|
//判断是否可勾选
|
||||||
|
@ -232,9 +232,9 @@
|
|||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<div style="margin-top: 10px">
|
<div style="margin-top: 10px">
|
||||||
<span>仅允许导入json格式文件。</span>
|
<span>仅允许导入json格式文件。</span>
|
||||||
<el-link type="primary" style="font-size:12px;vertical-align: baseline;"
|
<!-- <el-link type="primary" style="font-size:12px;vertical-align: baseline;"-->
|
||||||
:href='importTemplate'>下载模板
|
<!-- :href='importTemplate'>下载模板-->
|
||||||
</el-link>
|
<!-- </el-link>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
@ -249,6 +249,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { listTask, getTask, delTask, addTask, updateTask } from "@/api/cxxm/zt/task";
|
import { listTask, getTask, delTask, addTask, updateTask } from "@/api/cxxm/zt/task";
|
||||||
import {getToken} from "@/utils/auth";
|
import {getToken} from "@/utils/auth";
|
||||||
|
import {Loading} from "element-ui";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Task",
|
name: "Task",
|
||||||
@ -479,6 +480,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 文件上传成功处理
|
// 文件上传成功处理
|
||||||
handleFileSuccess(response, file, fileList) {
|
handleFileSuccess(response, file, fileList) {
|
||||||
|
Loading.service({fullscreen: true, text: "导入中..."}).close();
|
||||||
if (response.code === 500) {
|
if (response.code === 500) {
|
||||||
this.$modal.msgError(response.msg);
|
this.$modal.msgError(response.msg);
|
||||||
}
|
}
|
||||||
@ -509,6 +511,7 @@ export default {
|
|||||||
this.$message.error("请选择任务类型!")
|
this.$message.error("请选择任务类型!")
|
||||||
} else {
|
} else {
|
||||||
this.$refs.upload.submit();
|
this.$refs.upload.submit();
|
||||||
|
Loading.service({fullscreen: true, text: "导入中..."});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 自定义编号 */
|
/** 自定义编号 */
|
||||||
|
@ -234,9 +234,9 @@
|
|||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<div style="margin-top: 10px">
|
<div style="margin-top: 10px">
|
||||||
<span>仅允许导入json格式文件。</span>
|
<span>仅允许导入json格式文件。</span>
|
||||||
<el-link type="primary" style="font-size:12px;vertical-align: baseline;"
|
<!-- <el-link type="primary" style="font-size:12px;vertical-align: baseline;"-->
|
||||||
:href='importTemplate'>下载模板
|
<!-- :href='importTemplate'>下载模板-->
|
||||||
</el-link>
|
<!-- </el-link>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
@ -251,6 +251,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import {listTask, getTask, delTask, addTask, updateTask} from "@/api/cxxm/zttb/task";
|
import {listTask, getTask, delTask, addTask, updateTask} from "@/api/cxxm/zttb/task";
|
||||||
import {getToken} from "@/utils/auth";
|
import {getToken} from "@/utils/auth";
|
||||||
|
import {Loading} from "element-ui";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Task",
|
name: "Task",
|
||||||
@ -481,6 +482,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 文件上传成功处理
|
// 文件上传成功处理
|
||||||
handleFileSuccess(response, file, fileList) {
|
handleFileSuccess(response, file, fileList) {
|
||||||
|
Loading.service({fullscreen: true, text: "导入中..."}).close();
|
||||||
if (response.code === 500) {
|
if (response.code === 500) {
|
||||||
this.$modal.msgError(response.msg);
|
this.$modal.msgError(response.msg);
|
||||||
}
|
}
|
||||||
@ -511,6 +513,7 @@ export default {
|
|||||||
this.$message.error("请选择任务类型!")
|
this.$message.error("请选择任务类型!")
|
||||||
} else {
|
} else {
|
||||||
this.$refs.upload.submit();
|
this.$refs.upload.submit();
|
||||||
|
Loading.service({fullscreen: true, text: "导入中..."});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 自定义编号 */
|
/** 自定义编号 */
|
||||||
|
@ -367,10 +367,10 @@
|
|||||||
<i class="el-icon-upload"></i>
|
<i class="el-icon-upload"></i>
|
||||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||||
<div class="el-upload__tip text-center" slot="tip">
|
<div class="el-upload__tip text-center" slot="tip">
|
||||||
<!-- <div class="el-upload__tip" slot="tip">-->
|
<!-- <div class="el-upload__tip" slot="tip">-->
|
||||||
<!-- <el-checkbox v-model="upload.updateSupport"/>-->
|
<!-- <el-checkbox v-model="upload.updateSupport"/>-->
|
||||||
<!-- 是否更新已经存在的用户数据-->
|
<!-- 是否更新已经存在的用户数据-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||||
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
|
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
|
||||||
@click="importTemplate" v-hasRole="['zjgly']">下载模板
|
@click="importTemplate" v-hasRole="['zjgly']">下载模板
|
||||||
@ -402,6 +402,7 @@ import {
|
|||||||
import {getToken} from "@/utils/auth";
|
import {getToken} from "@/utils/auth";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
import {Loading} from 'element-ui';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "User",
|
name: "User",
|
||||||
@ -676,7 +677,7 @@ export default {
|
|||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.groupName == undefined || this.form.groupName == '') {
|
if (this.form.groupName == undefined || this.form.groupName == '') {
|
||||||
this.form.groupName = "未指定"
|
this.form.groupName = ""
|
||||||
}
|
}
|
||||||
if (this.form.nickName == undefined || this.form.nickName == '') {
|
if (this.form.nickName == undefined || this.form.nickName == '') {
|
||||||
this.form.nickName = this.form.userName;
|
this.form.nickName = this.form.userName;
|
||||||
@ -733,6 +734,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 文件上传成功处理
|
// 文件上传成功处理
|
||||||
handleFileSuccess(response, file, fileList) {
|
handleFileSuccess(response, file, fileList) {
|
||||||
|
Loading.service({fullscreen: true, text: "导入中..."}).close();
|
||||||
this.upload.open = false;
|
this.upload.open = false;
|
||||||
this.upload.isUploading = false;
|
this.upload.isUploading = false;
|
||||||
this.$refs.upload.clearFiles();
|
this.$refs.upload.clearFiles();
|
||||||
@ -742,6 +744,7 @@ export default {
|
|||||||
// 提交上传文件
|
// 提交上传文件
|
||||||
submitFileForm() {
|
submitFileForm() {
|
||||||
this.$refs.upload.submit();
|
this.$refs.upload.submit();
|
||||||
|
Loading.service({fullscreen: true, text: "导入中..."});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user