diff --git a/src/views/xgf/flow/components/sendUtil.vue b/src/views/xgf/flow/components/sendUtil.vue index 0d4c79f..5cf5078 100644 --- a/src/views/xgf/flow/components/sendUtil.vue +++ b/src/views/xgf/flow/components/sendUtil.vue @@ -12,7 +12,7 @@ - + - + @@ -78,7 +78,9 @@ export default { OPINION: '', user: '', tm: new Date().getTime(), - list: [] + list: [], + isShow: true, + info: {} }, rules: { STATUS: [ @@ -110,12 +112,23 @@ export default { }, methods: { async init(e) { - console.log(JSON.parse(sessionStorage.getItem('user'))) + console.log(e) this.loading = true this.visible = true this.heirloom = JSON.stringify(e) this.form.list = JSON.stringify(e) - await this.getDepartmentTree() + this.info = e[0] + if (this.info.FLOWS_TYPE === '0') { + if (this.info.FLOWS_STEP === 0) { + this.isShow = true + await this.getDepartmentTree() + } else { + this.isShow = false + } + } else { + this.isShow = true + await this.getCorpDepartmentTree() + } this.loading = false }, sendMessage(e) { @@ -147,18 +160,43 @@ export default { }) }) }, + getCorpDepartmentTree() { + return new Promise(resolve => { + requestFN( + '/openApi/corpDepartment/listTree', + {} + ).then((data) => { + this.departmentTree = this.removeEmptyChildren(JSON.parse(data.zTreeNodes)) + resolve(true) + }).catch((e) => { + }) + }) + }, getPeopleList(e) { this.form.APPOINT_DEPARTMENT_NAME = e.name - requestFN( - '/user/listAll', - { - DEPARTMENT_ID: e.id - } - ).then((data) => { - this.peopleList = data.userList - }).catch((e) => { - console.log(e) - }) + if (this.info.FLOWS_TYPE === '0') { + requestFN( + '/user/listAll', + { + DEPARTMENT_ID: e.id + } + ).then((data) => { + this.peopleList = data.userList + }).catch((e) => { + console.log(e) + }) + } else { + requestFN( + '/user/listAllManageAndCorp', + { + DEPARTMENT_ID: e.id + } + ).then((data) => { + this.peopleList = data.userList + }).catch((e) => { + console.log(e) + }) + } }, chooseUser(e) { const entity = JSON.parse(e)