diff --git a/src/views/modules/base/organization/organization.vue b/src/views/modules/base/organization/organization.vue index 2e207375b..81eb505f3 100644 --- a/src/views/modules/base/organization/organization.vue +++ b/src/views/modules/base/organization/organization.vue @@ -497,6 +497,12 @@ :show-all-levels="true" clearable> + + + +
取 消 @@ -621,6 +627,11 @@ :show-all-levels="true" clearable> + + +
取 消 @@ -1235,8 +1246,11 @@ export default { zuzhi: "", disableFlag: "", newRoles: [], - manageScopes:[] + manageScopes:[], + manageOrgIds:[], + orgLevels:'' }, + manageOrgIds:'', // 人员调动 transferForm: { name: "", @@ -1327,8 +1341,16 @@ export default { addDepartmentName: [ { required: true, message: "部门名称必填", trigger: "blur" }, ], + }, - + orgDeptOptionProps: { + multiple: false, + value: 'agencyId', + label: 'agencyName', + children: 'subAgencyList', + checkStrictly: true + }, + orgDeptOptions:[], rulesPeo: { name: [{ required: true, message: "姓名必填", trigger: "blur" }], mobile: [{ required: true, message: "联系电话必填", trigger: "blur" }], @@ -1377,6 +1399,7 @@ export default { // this.getNavigation() // 更新顶部面包屑 this.assembleBreadcrumbArr(localStorage.getItem("agencyId"), "agency"); + this.getAgencyGridDepttree() }, watch: { @@ -1710,7 +1733,9 @@ export default { : orgType == "dept" ? this.currentDepartmentId : this.currentGridOrgId, - manageScopes:manageScopeArray + manageScopes:manageScopeArray, + orgLevels:this.peoForm.orgLevels, + manageOrgIds:this.manageOrgIds }; const { data, code, msg } = await requestPost(url, params); @@ -1766,7 +1791,9 @@ export default { newRoles: this.peoForm.newRoles, agencyId: this.currentAgencyId, idCard: this.peoForm.idCard, - manageScopes:manageScopeArray + manageScopes:manageScopeArray, + orgLevels:this.peoForm.orgLevels, + manageOrgIds:this.manageOrgIds }; const { data, code, msg } = await requestPost(url, params); @@ -1893,6 +1920,9 @@ export default { (this.peoForm.gender = ""), (this.peoForm.post = ""), this.peoForm.newRoles = []; + this.peoForm.manageOrgIds = []; + this.peoForm.orgLevels =''; + this.manageOrgIds='' }, // 人员调动 transferRest () { @@ -2113,6 +2143,9 @@ export default { this.peoForm.gender = data.gender; this.peoForm.post = data.workType; this.peoForm.idCard = data.idCard; + this.peoForm.manageOrgIds = data.manageOrgIds?data.manageOrgIds.split(','):[]; + this.peoForm.orgLevels = data.orgLevels; + this.manageOrgIds = data.manageOrgIds; // 已有的权限(角色) let existedRoleArr = []; data.newRoleList.forEach(function (sysRole) { @@ -2147,6 +2180,9 @@ export default { this.peoForm.gender = data.gender; this.peoForm.idCard = data.idCard; this.peoForm.agencyName=data.agencyName; + this.peoForm.manageOrgIds = data.manageOrgIds?data.manageOrgIds.split(','):[]; + this.peoForm.orgLevels = data.orgLevels; + this.manageOrgIds = data.manageOrgIds; // 已有的权限(角色) let existedRoleArr = []; data.newRoleList.forEach(function (sysRole) { @@ -2209,6 +2245,9 @@ export default { this.peoForm.gender = data.gender; this.peoForm.post = data.workType; this.peoForm.idCard = data.idCard; + this.peoForm.manageOrgIds = data.manageOrgIds?data.manageOrgIds.split(','):[]; + this.peoForm.orgLevels = data.orgLevels; + this.manageOrgIds = data.manageOrgIds; // 已有的权限(角色) let existedRoleArr = []; data.newRoleList.forEach(function (sysRole) { @@ -2960,6 +2999,36 @@ export default { this.$message.err(msg) } }, + //组织机构树 + async getAgencyGridDepttree() { + const url = "/gov/org/customeragency/agencyGridDepttree" + let params = { + agencyId: this.$store.state.user.agencyId, + purpose: "query" + } + const { data, code, msg } = await requestPost(url, params) + if (code === 0) { + this.orgDeptOptions = [] + this.orgDeptOptions.push(data) + console.log(this.orgDeptOptions,'seee'); + + } else { + this.$message.error(msg) + } + }, + handleChangeAgency(val) { + this.$nextTick(() => { + let obj = this.$refs["agencyIdArray"].getCheckedNodes() + if (obj) { + this.peoForm.orgLevels =obj[0].pathNodes.map(item=>item.data.level).join(',') + this.manageOrgIds =obj[0].pathNodes.map(item=>item.data.agencyId).join(',') + } else { + this.manageOrgIds = '' + this.peoForm.orgLevels = '' + } + + }); + }, }, };