From 5fa2d692c4083d578f73f8af0d0924147b8f4f19 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期二, 21 三月 2023 10:07:49 +0800
Subject: [PATCH] 地址修改
---
src/views/systemSetting/baseSetting/department/createUser/index.vue | 138 ++++++++++++++++++++++++++++-----------------
1 files changed, 85 insertions(+), 53 deletions(-)
diff --git a/src/views/systemSetting/baseSetting/department/createUser/index.vue b/src/views/systemSetting/baseSetting/department/createUser/index.vue
index 321ffee..bd9769c 100644
--- a/src/views/systemSetting/baseSetting/department/createUser/index.vue
+++ b/src/views/systemSetting/baseSetting/department/createUser/index.vue
@@ -19,14 +19,14 @@
</el-form-item>
<!-- 涓婄骇閮ㄩ棬 -->
<el-form-item class="optionItems" label="涓婄骇閮ㄩ棬:" prop="parentId">
- <el-select v-model="depart.parentId" placeholder="璇疯緭鍏ヤ笂绾ч儴闂�">
- <el-option :value="mylabel">
+ <el-select ref="projectApplicant" v-model="depart.parentId" placeholder="璇疯緭鍏ヤ笂绾ч儴闂�">
+ <el-option :value="mylabel">
<el-tree
ref="tree"
:check-strictly="true"
:data="departList"
:props="defaultProps"
- show-checkbox
+ @node-click="handleCheck"
@check-change="handleCheck"
default-expand-all
node-key="id"
@@ -74,12 +74,18 @@
<li class="li-btn">
<i class="el-icon-plus" @click="openUser = true"></i>
</li>
+ <li class="li-btn">
+ <el-tooltip class="item" effect="light" content="娓呴櫎閫変腑浜哄憳" placement="top" :enterable="false">
+ <i class="el-icon-minus" @click="clrarUser"></i>
+ </el-tooltip>
+
+ </li>
</ul>
<div class="card" v-if="openUser">
<el-card class="box-card">
<div slot="header" class="myclear">
<span>宸ヤ綔浜哄憳</span>
- <div @click="addUser">纭</div>
+ <div class="box-card-sub" @click="addUser">纭</div>
</div>
<div class="scrollWrap">
<el-checkbox-group v-model="checkedUser">
@@ -246,9 +252,9 @@
// 鑾峰彇鎵�鏈夌敤鎴蜂俊鎭�
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;
}
});
},
@@ -267,8 +273,12 @@
}
});
});
- this.checkedList[0].leader = true;
+ if (this.checkedList.length > 0) this.checkedList[0].leader = true;
this.openUser = false;
+ },
+ // 娓呴櫎閫変腑鐢ㄦ埛
+ clrarUser(){
+ this.checkedUser=[]
},
handleClose() {
this.$emit("changMyDialog", { flag: false });
@@ -278,32 +288,42 @@
this.departTypeList = await getTypeList(1, "08");
},
handleCheck(data, checked) {
- this.depart.parentId = data.departName;
- // 鑾峰彇褰撳墠閫夋嫨鐨刬d鍦ㄦ暟缁勪腑鐨勭储寮�
- const indexs = this.selectOrg.orgsid.indexOf(data.id);
- // 濡傛灉涓嶅瓨鍦ㄦ暟缁勪腑锛屽苟涓旀暟缁勪腑宸茬粡鏈変竴涓猧d骞朵笖checked涓簍rue鐨勬椂鍊欙紝浠h〃涓嶈兘鍐嶆閫夋嫨銆�
- if (indexs < 0 && this.selectOrg.orgsid.length === 1 && checked) {
- this.$message({
- message: "鍙兘閫夋嫨涓�涓儴闂紒",
- type: "warning",
- showClose: true,
- });
- // 璁剧疆宸查�夋嫨鐨勮妭鐐逛负false 寰堥噸瑕�
- this.$refs.tree.setChecked(data, false);
- } else if (this.selectOrg.orgsid.length === 0 && checked) {
- // 鍙戠幇鏁扮粍涓虹┖ 骞朵笖鏄凡閫夋嫨
- // 闃叉鏁扮粍鏈夊�硷紝棣栧厛娓呯┖锛屽啀push
- this.selectOrg.orgsid = [];
- this.selectOrg.orgsid.push(data.id);
- } else if (
- indexs >= 0 &&
- this.selectOrg.orgsid.length === 1 &&
- !checked
- ) {
- // 鍐嶆鐩存帴杩涜璧嬪�间负绌烘搷浣�
- this.selectOrg.orgsid = [];
- this.depart.parentId = "";
+ if(checked.childNodes.length == 0){
+ this.depart.parentId = data.departName;
+ let _this = this;
+ _this.$refs.projectApplicant.blur();
+ this.selectOrg.orgsid = []
+ this.selectOrg.orgsid.push(data.id)
+ }else {
+ return
}
+
+ // this.depart.parentId = data.departName;
+ // // 鑾峰彇褰撳墠閫夋嫨鐨刬d鍦ㄦ暟缁勪腑鐨勭储寮�
+ // const indexs = this.selectOrg.orgsid.indexOf(data.id);
+ // // 濡傛灉涓嶅瓨鍦ㄦ暟缁勪腑锛屽苟涓旀暟缁勪腑宸茬粡鏈変竴涓猧d骞朵笖checked涓簍rue鐨勬椂鍊欙紝浠h〃涓嶈兘鍐嶆閫夋嫨銆�
+ // if (indexs < 0 && this.selectOrg.orgsid.length === 1 && checked) {
+ // this.$message({
+ // message: "鍙兘閫夋嫨涓�涓儴闂紒",
+ // type: "warning",
+ // showClose: true,
+ // });
+ // // 璁剧疆宸查�夋嫨鐨勮妭鐐逛负false 寰堥噸瑕�
+ // this.$refs.tree.setChecked(data, false);
+ // } else if (this.selectOrg.orgsid.length === 0 && checked) {
+ // // 鍙戠幇鏁扮粍涓虹┖ 骞朵笖鏄凡閫夋嫨
+ // // 闃叉鏁扮粍鏈夊�硷紝棣栧厛娓呯┖锛屽啀push
+ // this.selectOrg.orgsid = [];
+ // this.selectOrg.orgsid.push(data.id);
+ // } else if (
+ // indexs >= 0 &&
+ // this.selectOrg.orgsid.length === 1 &&
+ // !checked
+ // ) {
+ // // 鍐嶆鐩存帴杩涜璧嬪�间负绌烘搷浣�
+ // this.selectOrg.orgsid = [];
+ // this.depart.parentId = "";
+ // }
},
// 璁剧疆棰嗗
setLeader(idx) {
@@ -318,12 +338,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 {
@@ -331,19 +351,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;
@@ -370,6 +390,12 @@
width: 36px;
height: 36px;
border-radius: 50%;
+ .el-icon-plus{
+ cursor: pointer;
+ }
+ .el-icon-minus{
+ cursor: pointer;
+ }
}
.el-form-item__content {
width: 400px;
@@ -402,17 +428,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;
@@ -427,9 +454,14 @@
.myclear {
width: 100%;
line-height: 20px;
- color: #4b9bb7;
+ // color: #4b9bb7;
display: flex;
justify-content: space-between;
+ .box-card-sub{
+ color: #2f54eb;
+ margin-left: 5px;
+ cursor: pointer;
+ }
}
.hidebar {
@@ -437,8 +469,8 @@
top: 77px;
right: 20px;
width: 20px;
- height: 160px;
- background-color: #09152f;
+ height: 180px;
+ // background-color: #09152f;
}
.item {
@@ -469,4 +501,4 @@
padding-right: 20px;
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.8.0