| | |
| | | </el-table-column> |
| | | <el-table-column prop="departTypeName" label="部门类型" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="departDes" label="部门描述" min-width="10"> |
| | | <el-table-column prop="parentDepartName" label="上级部门" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="departDes" label="部门描述" min-width="30"> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="createTime" label="创建时间" min-width="10"> |
| | | </el-table-column> --> |
| | |
| | | <updateUser |
| | | :updateFlag="updateFlag" |
| | | :userInfo="userInfo" |
| | | :getUserList="context === '' ? getUserList : search" |
| | | :getDepartList="context === '' ? getUserList : search" |
| | | @changeDialog="changMyDialog" |
| | | /> |
| | | </el-dialog> |
| | |
| | | created() { |
| | | const that = this; |
| | | this.user = JSON.parse(JSON.stringify(that.userInfo)); |
| | | this.checkedList = this.checkedUser = this.user.userInfoDTOS; |
| | | this.checkedList = this.user.userInfoDTOS; |
| | | this.checkedList.forEach((e) => { |
| | | this.checkedUser.push(e.userId); |
| | | }); |
| | | this.$axios({ |
| | | method: "get", |
| | | url: "sccg/depart/tree", |
| | |
| | | handleUser() { |
| | | this.$refs["user"].validate((valid) => { |
| | | if (valid) { |
| | | const { user } = this; |
| | | console.log(user); |
| | | const { user, checkedList } = this; |
| | | const arr = []; |
| | | checkedList.forEach((item) => { |
| | | arr.push({ leader: item.leader, userId: item.id }); |
| | | }); |
| | | this.$axios |
| | | .post("sccg/depart/update", { |
| | | id: user.id, |
| | | departName: user.departName, |
| | | parentId: user.parentId, |
| | | departDes: user.departDes, |
| | | departManagerList: arr, |
| | | }) |
| | | .then((res) => { |
| | | console.log(res); |
| | | this.$message({ |
| | | message: res.message, |
| | | type: res.code === 200 ? "success" : "warning", |
| | | }); |
| | | this.$emit("changeDialog", { flag: false }); |
| | | this.getUserList(); |
| | | debugger; |
| | | this.getDepartList(); |
| | | }); |
| | | } else { |
| | | return false; |
| | |
| | | this.checkedList.push({ |
| | | id: item.id, |
| | | username: item.username, |
| | | isLeader: 0, |
| | | checked: false, |
| | | leader: false, |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | this.checkedList[0].isLeader = 1; |
| | | this.checkedList[0].checked = true; |
| | | this.checkedList[0].leader = true; |
| | | this.openUser = false; |
| | | }, |
| | | }, |
| | | props: ["userInfo", "updateFlag", "changeDialog"], |
| | | props: ["userInfo", "updateFlag", "getDepartList", "changeDialog"], |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |