|
@@ -1,9 +1,9 @@
|
|
|
<template>
|
|
|
<div class="record-warp">
|
|
|
<div class="record-main">
|
|
|
- <el-row >
|
|
|
+ <el-row>
|
|
|
<el-col :span="24">
|
|
|
- <div class="search-head" style="padding-bottom:10px">
|
|
|
+ <div class="search-head" style="padding-bottom: 10px">
|
|
|
<el-input v-model="name" clearable placeholder="请输入姓名"></el-input
|
|
|
>
|
|
|
|
|
@@ -53,7 +53,7 @@
|
|
|
</el-col>
|
|
|
</el-row> -->
|
|
|
|
|
|
- <div class="table-content" style="flex: 1;overflow:auto">
|
|
|
+ <div class="table-content" style="flex: 1; overflow: auto">
|
|
|
<el-table
|
|
|
:data="tableData"
|
|
|
:row-style="{ height: '0px' }"
|
|
@@ -198,10 +198,20 @@
|
|
|
<div class="demo-ruleForm">
|
|
|
<p v-show="!isDelete" class="dig_title">批量导入</p>
|
|
|
|
|
|
+ <!-- 先选择组织架构 -->
|
|
|
+ <el-cascader
|
|
|
+ placeholder="请选择组织架构"
|
|
|
+ v-model="groupLead"
|
|
|
+ :options="groupData"
|
|
|
+ :props="{ checkStrictly: true }"
|
|
|
+ clearable
|
|
|
+ ></el-cascader>
|
|
|
<el-upload
|
|
|
class="upload-demo"
|
|
|
+ style="margin-top: 40px"
|
|
|
drag
|
|
|
- :action="basePath + '/user/userImport'"
|
|
|
+ :before-upload="beforeUploadFun"
|
|
|
+ :action="basePath + `/user/userImport?orgNo=${groupLead[groupLead.length-1]}`"
|
|
|
:on-success="fileSuccess"
|
|
|
:on-error="fileError"
|
|
|
>
|
|
@@ -265,6 +275,8 @@ export default {
|
|
|
group: "",
|
|
|
ppData: [],
|
|
|
groupData: [],
|
|
|
+ //批量上传时的组织架构
|
|
|
+ groupLead: [],
|
|
|
options: [
|
|
|
{
|
|
|
value: "1",
|
|
@@ -307,8 +319,8 @@ export default {
|
|
|
created() {},
|
|
|
mounted() {
|
|
|
this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
|
|
|
- console.log("this.userInfo")
|
|
|
- console.log(this.userInfo)
|
|
|
+ console.log("this.userInfo");
|
|
|
+ console.log(this.userInfo);
|
|
|
this.getChannel();
|
|
|
if (!this.userInfo) {
|
|
|
//如果用户信息不存在跳转登陆页
|
|
@@ -317,20 +329,29 @@ export default {
|
|
|
this.searchTarget();
|
|
|
},
|
|
|
methods: {
|
|
|
+ //文件上传之前
|
|
|
+ beforeUploadFun(file){
|
|
|
+ //查询是否选择了组织架构
|
|
|
+ if(this.groupLead.length==0){
|
|
|
+ this.$message({
|
|
|
+ message:'请选择组织架构',
|
|
|
+ type:'error'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ },
|
|
|
//文件上传成功
|
|
|
fileSuccess(res) {
|
|
|
-
|
|
|
-
|
|
|
if (res.code == 200) {
|
|
|
this.searchTarget();
|
|
|
this.$message({
|
|
|
- message:res.msg,
|
|
|
+ message: res.msg,
|
|
|
type: "success",
|
|
|
});
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.$message({
|
|
|
- message:res.msg,
|
|
|
- type: 'error',
|
|
|
+ message: res.msg,
|
|
|
+ type: "error",
|
|
|
});
|
|
|
}
|
|
|
//查询列表
|
|
@@ -369,8 +390,8 @@ export default {
|
|
|
},
|
|
|
//每页多少条
|
|
|
handleSizeChange(val) {
|
|
|
- this.pageSize=val;
|
|
|
- this.searchTarget()
|
|
|
+ this.pageSize = val;
|
|
|
+ this.searchTarget();
|
|
|
//将首页重置为1时---且总条数变化
|
|
|
//设置为当前总条数
|
|
|
},
|
|
@@ -415,8 +436,7 @@ export default {
|
|
|
return item.orgNo === e.parentOrgNo;
|
|
|
});
|
|
|
// return !item.parentOrgNo;
|
|
|
- return item.orgNo== this.userInfo.orgNo
|
|
|
-
|
|
|
+ return item.orgNo == this.userInfo.orgNo;
|
|
|
});
|
|
|
return data;
|
|
|
},
|
|
@@ -511,11 +531,12 @@ export default {
|
|
|
},
|
|
|
//根据现有情况进行搜索
|
|
|
searchList() {
|
|
|
-
|
|
|
let url = `/user/findUserListByPage?pageSize=${this.pageSize}&pageNum=${
|
|
|
this.pageNum
|
|
|
}${this.sex == "" ? "" : `&gender=${this.sex}`}${
|
|
|
- this.group.length == 0 ? `&orgNo=${this.userInfo.orgNo}` : `&orgNo=${this.group[this.group.length - 1]}`
|
|
|
+ this.group.length == 0
|
|
|
+ ? `&orgNo=${this.userInfo.orgNo}`
|
|
|
+ : `&orgNo=${this.group[this.group.length - 1]}`
|
|
|
}${this.name == "" ? "" : `&userName=${this.name}`}${
|
|
|
this.studentNumber == "" ? "" : `&userNo=${this.studentNumber}`
|
|
|
}`;
|