|
@@ -17,7 +17,6 @@
|
|
|
placeholder="请选择组织架构"
|
|
|
v-model="group"
|
|
|
:options="groupData"
|
|
|
-
|
|
|
clearable
|
|
|
></el-cascader>
|
|
|
<!-- :props="{ checkStrictly: true }" -->
|
|
@@ -52,7 +51,14 @@
|
|
|
<!-- <el-button type="success" round class="add_class" @click="fileVisible = true"
|
|
|
>批量导入</el-button
|
|
|
> -->
|
|
|
- <el-button type="success" class="add_class" icon="el-icon-plus" round @click="addUser">添加管理员</el-button>
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ class="add_class"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ round
|
|
|
+ @click="addUser"
|
|
|
+ >添加管理员</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -355,18 +361,16 @@ export default {
|
|
|
methods: {
|
|
|
//文件上传成功
|
|
|
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",
|
|
|
});
|
|
|
}
|
|
|
//查询列表
|
|
@@ -405,41 +409,45 @@ export default {
|
|
|
},
|
|
|
//每页多少条
|
|
|
handleSizeChange(val) {
|
|
|
- this.pageSize=val;
|
|
|
- this.searchTarget()
|
|
|
+ this.pageSize = val;
|
|
|
+ this.searchTarget();
|
|
|
// console.log(`每页 ${val} 条`);
|
|
|
//将首页重置为1时---且总条数变化
|
|
|
//设置为当前总条数
|
|
|
},
|
|
|
//获取组织架构方法--------------------开始-----------------------
|
|
|
getChannel() {
|
|
|
- this.$http.get(`/org/findAllOrgByPOrgNo?orgNo=${this.userInfo.orgNo}`, {}, (res) => {
|
|
|
- // this.$toast.success({message:'成功'});
|
|
|
- if (res && res.code == 200) {
|
|
|
- //将值赋值给list
|
|
|
- if (res.data.length > 0) {
|
|
|
- let resAdd = this.addPro(res.data);
|
|
|
- this.ppData = JSON.parse(JSON.stringify(resAdd));
|
|
|
- let forRes = this.arrToTree(resAdd);
|
|
|
- // console.log('格式化的结构')
|
|
|
- // console.log(forRes)
|
|
|
- let resultRes = this.deleteChildren(forRes);
|
|
|
- console.log("格式化的结构且去掉children");
|
|
|
- console.log(resultRes);
|
|
|
-
|
|
|
- let listTmp =resultRes[0].children;
|
|
|
- for(let i=0;i<listTmp.length;i++){
|
|
|
- delete listTmp[i].children
|
|
|
+ this.$http.get(
|
|
|
+ `/org/findAllOrgByPOrgNo?orgNo=${this.userInfo.orgNo}`,
|
|
|
+ {},
|
|
|
+ (res) => {
|
|
|
+ // this.$toast.success({message:'成功'});
|
|
|
+ if (res && res.code == 200) {
|
|
|
+ //将值赋值给list
|
|
|
+ if (res.data.length > 0) {
|
|
|
+ let resAdd = this.addPro(res.data);
|
|
|
+ this.ppData = JSON.parse(JSON.stringify(resAdd));
|
|
|
+ let forRes = this.arrToTree(resAdd);
|
|
|
+ // console.log('格式化的结构')
|
|
|
+ // console.log(forRes)
|
|
|
+ let resultRes = this.deleteChildren(forRes);
|
|
|
+ console.log("格式化的结构且去掉children");
|
|
|
+ console.log(resultRes);
|
|
|
+
|
|
|
+ let listTmp = resultRes[0].children;
|
|
|
+ for (let i = 0; i < listTmp.length; i++) {
|
|
|
+ delete listTmp[i].children;
|
|
|
+ }
|
|
|
+ this.groupData = listTmp;
|
|
|
+ } else {
|
|
|
+ this.groupData = [];
|
|
|
}
|
|
|
- this.groupData = listTmp;
|
|
|
+ // this.channelList = res.data;
|
|
|
} else {
|
|
|
- this.groupData = [];
|
|
|
+ this.$message.error(res.msg);
|
|
|
}
|
|
|
- // this.channelList = res.data;
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg);
|
|
|
}
|
|
|
- });
|
|
|
+ );
|
|
|
},
|
|
|
//z增加
|
|
|
addPro(val) {
|
|
@@ -552,13 +560,15 @@ export default {
|
|
|
},
|
|
|
//根据现有情况进行搜索
|
|
|
searchList() {
|
|
|
- let url = `/user/findAdminUserListByPage?pageSize=${this.pageSize}&pageNum=${
|
|
|
+ let url = `/user/findUserListByPage?pageSize=${this.pageSize}&pageNum=${
|
|
|
this.pageNum
|
|
|
+ }&roleType=4${
|
|
|
+ this.group.length == 0
|
|
|
+ ? `&orgNo=${this.userInfo.orgNo}`
|
|
|
+ : `&orgNo=${this.group[this.group.length - 1]}`
|
|
|
}${this.sex == "" ? "" : `&gender=${this.sex}`}${
|
|
|
- this.group.length == 0 ? "" : `&orgNo=${this.group[this.group.length - 1]}`
|
|
|
- }${this.name == "" ? "" : `&userName=${this.name}`}${
|
|
|
- this.studentNumber == "" ? "" : `&userNo=${this.studentNumber}`
|
|
|
- }`;
|
|
|
+ this.name == "" ? "" : `&userName=${this.name}`
|
|
|
+ }${this.studentNumber == "" ? "" : `&userNo=${this.studentNumber}`}`;
|
|
|
this.$http.get(url, {}, (res) => {
|
|
|
console.log(res);
|
|
|
if (res && res.code == 200) {
|