From 702eec26f73ced524cba807aad2b20a58734113e Mon Sep 17 00:00:00 2001
From: fangyuan <527392886@qq.com>
Date: 星期五, 30 十二月 2022 16:14:20 +0800
Subject: [PATCH] 开关修改
---
src/views/systemSetting/baseSetting/department/createUser/index.vue | 89 +++++++++++++++++++++-----------------------
1 files changed, 42 insertions(+), 47 deletions(-)
diff --git a/src/views/systemSetting/baseSetting/department/createUser/index.vue b/src/views/systemSetting/baseSetting/department/createUser/index.vue
index 87520fd..9756121 100644
--- a/src/views/systemSetting/baseSetting/department/createUser/index.vue
+++ b/src/views/systemSetting/baseSetting/department/createUser/index.vue
@@ -51,7 +51,7 @@
<el-form-item class="optionItem add" label="娣诲姞浜哄憳:">
<ul class="addPerson">
<li
- v-for="(item, index) in cehckedList"
+ v-for="(item, index) in checkedList"
:key="index"
@click="setLeader(index)"
>
@@ -60,13 +60,13 @@
<i
:class="[
'el-icon-user-solid',
- item.checked ? 'leader' : '',
+ item.leader ? 'leader' : '',
]"
></i>
</div>
<label
style="font-size: 12px"
- :class="[item.checked ? 'leader' : '']"
+ :class="[item.leader ? 'leader' : '']"
>{{ item.username }}</label
>
</div>
@@ -96,8 +96,10 @@
</el-card>
</div>
</el-form-item>
- <el-form-item>
- <label style="color:#ff0000ab">绾㈣壊浠h〃閮ㄩ棬棰嗗锛岀偣鍑诲ご鍍忓彲璁剧疆閮ㄩ棬棰嗗</label>
+ <el-form-item style="margin-top: -40px">
+ <label style="color: #ff0000ab"
+ >绾㈣壊浠h〃閮ㄩ棬棰嗗锛岀偣鍑诲ご鍍忓彲璁剧疆閮ㄩ棬棰嗗</label
+ >
</el-form-item>
<!-- 閮ㄩ棬鎻忚堪 -->
<el-form-item class="optionItem" label="閮ㄩ棬鎻忚堪:" prop="departDes">
@@ -168,7 +170,7 @@
userList: [],
departList: [],
checkedUser: [],
- cehckedList: [],
+ checkedList: [],
openUser: false,
departTypeList: [],
selectOrg: {
@@ -194,10 +196,10 @@
handleUser() {
this.$refs.user.validate((valid) => {
if (valid) {
- const { depart, cehckedList, selectOrg } = this;
+ const { depart, checkedList, selectOrg } = this;
const arr = [];
- cehckedList.forEach((item) => {
- arr.push({ isLeader: item.isLeader, userId: item.id });
+ checkedList.forEach((item) => {
+ arr.push({ leader: item.leader, userId: item.id });
});
console.log(arr);
this.$axios({
@@ -236,38 +238,36 @@
method: "get",
url: "sccg/depart/tree",
}).then((res) => {
- console.log(res);
- res.data.unshift({ id: 0, departName: "椤剁骇鑿滃崟" });
+ // console.log(res);
+ // res.data.unshift({ id: 0, departName: "椤剁骇鑿滃崟" });
this.departList = res.data;
});
},
// 鑾峰彇鎵�鏈夌敤鎴蜂俊鎭�
getUserList() {
// 鑾峰彇鎵�鏈夌敤鎴蜂俊鎭�佺敤鎴锋煡璇�(鏆傛椂鏀寔鐢佃瘽鍙风爜)
- this.$axios.get(`sccg/admin/list`).then((res) => {
+ this.$axios.get(`/sccg/depart/query_surplus_user`).then((res) => {
if (res.code === 200) {
- this.userList = res.data.records;
+ this.userList = res.data;
}
});
},
addUser() {
console.log(this.checkedUser);
console.log(this.userList);
- this.cehckedList = [];
+ this.checkedList = [];
this.userList.forEach((item) => {
this.checkedUser.forEach((child) => {
if (item.id == child) {
- this.cehckedList.push({
+ this.checkedList.push({
id: item.id,
username: item.username,
- isLeader: 0,
- checked: false,
+ leader: false,
});
}
});
});
- this.cehckedList[0].isLeader = 1;
- this.cehckedList[0].checked = true;
+ if (this.checkedList.length > 0) this.checkedList[0].leader = true;
this.openUser = false;
},
handleClose() {
@@ -307,14 +307,8 @@
},
// 璁剧疆棰嗗
setLeader(idx) {
- this.cehckedList.forEach((item, index) => {
- if (index === idx) {
- item.checked = true;
- item.isLeader = 1;
- } else {
- item.checked = false;
- item.isLeader = 0;
- }
+ this.checkedList.forEach((item, index) => {
+ item.leader = index === idx;
});
},
},
@@ -324,12 +318,12 @@
<style lang="scss" scoped>
.createUser {
border-radius: 1px;
- background-color: #09152f;
+ // background-color: #09152f;
main {
text-align: left;
padding: 0 55px;
- background-color: #09152f;
+ // background-color: #09152f;
padding-bottom: 50px;
.mainContent {
@@ -337,19 +331,19 @@
justify-content: center;
padding-top: 50px;
- &::v-deep .el-form-item__label {
- color: #4b9bb7;
- }
+ // &::v-deep .el-form-item__label {
+ // color: #4b9bb7;
+ // }
- &::v-deep .el-input__inner {
- background-color: #09152f;
- border: 1px solid #17324c;
- }
+ // &::v-deep .el-input__inner {
+ // background-color: #09152f;
+ // border: 1px solid #17324c;
+ // }
- &::v-deep .el-textarea__inner {
- background-color: #09152f;
- border: 1px solid #17324c;
- }
+ // &::v-deep .el-textarea__inner {
+ // background-color: #09152f;
+ // border: 1px solid #17324c;
+ // }
.addPerson {
display: flex;
@@ -408,17 +402,18 @@
right: 0;
.box-card {
- max-height: 200px;
+ min-height: 240px;
+ max-height: 260px;
overflow: hidden;
- background-color: #09152f;
+ // background-color: #09152f;
position: relative;
max-width: 220px;
.scrollWrap {
overflow: scroll;
- height: 160px;
+ height: 180px;
position: relative;
- color: #4b9bb7;
+ // color: #4b9bb7;
.el-checkbox-group {
display: flex;
@@ -433,7 +428,7 @@
.myclear {
width: 100%;
line-height: 20px;
- color: #4b9bb7;
+ // color: #4b9bb7;
display: flex;
justify-content: space-between;
}
@@ -443,8 +438,8 @@
top: 77px;
right: 20px;
width: 20px;
- height: 160px;
- background-color: #09152f;
+ height: 180px;
+ // background-color: #09152f;
}
.item {
--
Gitblit v1.8.0