|
@@ -155,7 +155,8 @@
|
|
|
@ok="handleSaveOk">
|
|
|
<org-people style="width:800px;height:65vh;"
|
|
|
:isOnlyOrg="false"
|
|
|
- @transCheckedTarget="transCheckedTarget"
|
|
|
+ :organizationIdsInfo="organizationIdsInfo"
|
|
|
+ @transCheckedTargets="transCheckedTargets"
|
|
|
@returnSequencesInfo="handleSequencesChange"
|
|
|
@returnGradeInfo="handleGradeChange" ></org-people>
|
|
|
</a-modal>
|
|
@@ -306,22 +307,37 @@ export default {
|
|
|
remark:'',
|
|
|
actualApprover: '',
|
|
|
actualApproverName: '',
|
|
|
- organizationId: ''
|
|
|
+ organizationIds: {}
|
|
|
},
|
|
|
authName: undefined,
|
|
|
isShowOrg: false,
|
|
|
classifyList: [],
|
|
|
// 组织架构
|
|
|
- checkedTarget: {},
|
|
|
+ checkedTargets: {},
|
|
|
// 职系
|
|
|
sequencesInfo: {},
|
|
|
// 职等
|
|
|
gradesInfo: {},
|
|
|
// 维基知识不能选择权限
|
|
|
isDocument: false,
|
|
|
- widthVar: 800
|
|
|
+ widthVar: 800,
|
|
|
+ organizationIdsInfo: {}
|
|
|
}
|
|
|
},
|
|
|
+ activated() {
|
|
|
+ if(localStorage.getItem('auditFirst')=='true'){
|
|
|
+ this.queryParam.categoryId = 9999
|
|
|
+ localStorage.setItem('auditFirst',false)
|
|
|
+ }
|
|
|
+ if(localStorage.getItem('cancle')=='true'){
|
|
|
+ localStorage.setItem('cancle',false)
|
|
|
+ }else{
|
|
|
+ this.reloadTable()
|
|
|
+ }
|
|
|
+ setTimeout(() => {
|
|
|
+ this.queryParam.categoryId = ''
|
|
|
+ },1000)
|
|
|
+ },
|
|
|
created() {
|
|
|
// 从知识管理页跳转
|
|
|
if(this.$route.query.showUnchecked) {
|
|
@@ -332,7 +348,6 @@ export default {
|
|
|
]
|
|
|
} else {
|
|
|
this.urls = api.findAllKnowledgeApprove
|
|
|
- this.queryParam.categoryId = 9999
|
|
|
this.approvalStatusList = [
|
|
|
{value: '1', label: '待节点审核'},
|
|
|
{value: '2', label: '节点驳回'},
|
|
@@ -350,7 +365,6 @@ export default {
|
|
|
setTimeout(() => {
|
|
|
let offsetWidth = document.querySelector('.scroll-ckunk').getBoundingClientRect().left
|
|
|
this.widthVar = innerWidth - offsetWidth - 40
|
|
|
- this.queryParam.categoryId = ''
|
|
|
}, 1000);
|
|
|
document.onclick=function(element){
|
|
|
if(element.target.className.indexOf('ant-cascader-menu-item')>-1){
|
|
@@ -486,19 +500,36 @@ export default {
|
|
|
if(title == 'fast') {
|
|
|
this.isDocument = arg.type == 1 ? true : false
|
|
|
this.isShowOrg = arg.approvalStatus == 3 ? true : false
|
|
|
- this.auditForm.organizationId = arg.organizationId
|
|
|
- if(arg.organizationId) {
|
|
|
- let organizationInfo = JSON.parse(arg.organizationId)
|
|
|
+ this.auditForm.organizationIds = arg.organizationIds
|
|
|
+ this.organizationIdsInfo = arg.organizationIds
|
|
|
+ if(arg.organizationIds) {
|
|
|
+ let organizationInfo = arg.organizationIds
|
|
|
let info = []
|
|
|
- for(let i of organizationInfo) {
|
|
|
- if(i.organizationId) {
|
|
|
- info.push(`${i.organizationTree.join('-')}`)
|
|
|
- } else if(i.gradeId) {
|
|
|
- info.push(`职系-${i.gradeName}`)
|
|
|
- } else {
|
|
|
- info.push(`职等-${i.gradeLevelName}`)
|
|
|
- }
|
|
|
+ // for(let i of organizationInfo) {
|
|
|
+ // if(i.organizationIds) {
|
|
|
+ // info.push(`${i.organizationTree.join('-')}`)
|
|
|
+ // } else if(i.gradeId) {
|
|
|
+ // info.push(`职系-${i.gradeName}`)
|
|
|
+ // } else {
|
|
|
+ // info.push(`职等-${i.gradeLevelName}`)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ if(organizationInfo.organizationId) {
|
|
|
+ info.push(`组织:[${organizationInfo.organizationTree}]`)
|
|
|
+ }
|
|
|
+ if(organizationInfo.gradeId) {
|
|
|
+ info.push(`职系:[${organizationInfo.gradeName}]`)
|
|
|
}
|
|
|
+ if(organizationInfo.gradeLevelId) {
|
|
|
+ info.push(`职等:[${organizationInfo.gradeLevelName}]`)
|
|
|
+ }
|
|
|
+ this.checkedTargets.organizationId = organizationInfo.organizationId
|
|
|
+ this.checkedTargets.organizationName = organizationInfo.organizationName
|
|
|
+ this.checkedTargets.organizationTree = organizationInfo.organizationTree
|
|
|
+ this.sequencesInfo.gradeId = organizationInfo.gradeId
|
|
|
+ this.sequencesInfo.gradeName = organizationInfo.gradeName
|
|
|
+ this.gradesInfo.gradeLevelId = organizationInfo.gradeLevelId
|
|
|
+ this.gradesInfo.gradeLevelName = organizationInfo.gradeLevelName
|
|
|
this.authName = info.join('/')
|
|
|
}
|
|
|
this.willAuditData.push(arg)
|
|
@@ -520,22 +551,38 @@ export default {
|
|
|
let approvalStatusData = this.willAuditData.filter(item => item.approvalStatus == 3)
|
|
|
if(approvalStatusData.length == 1) {
|
|
|
let approvalStatusInfo = approvalStatusData[0]
|
|
|
- console.log(approvalStatusInfo)
|
|
|
this.isShowOrg = true
|
|
|
this.isDocument = approvalStatusInfo.type == 1 ? true : false
|
|
|
- this.auditForm.organizationId = approvalStatusInfo.organizationId
|
|
|
- if(approvalStatusInfo.organizationId) {
|
|
|
- let organizationInfo = JSON.parse(approvalStatusInfo.organizationId)
|
|
|
+ this.auditForm.organizationIds = approvalStatusInfo.organizationIds
|
|
|
+ this.organizationIdsInfo = approvalStatusInfo.organizationIds
|
|
|
+ if(approvalStatusInfo.organizationIds) {
|
|
|
+ let organizationInfo = approvalStatusInfo.organizationIds
|
|
|
let info = []
|
|
|
- for(let i of organizationInfo) {
|
|
|
- if(i.organizationId) {
|
|
|
- info.push(`${i.organizationTree.join('-')}`)
|
|
|
- } else if(i.gradeId) {
|
|
|
- info.push(`职系-${i.gradeName}`)
|
|
|
- } else {
|
|
|
- info.push(`职等-${i.gradeLevelName}`)
|
|
|
- }
|
|
|
+ if(organizationInfo.organizationId) {
|
|
|
+ info.push(`组织:[${organizationInfo.organizationTree}]`)
|
|
|
+ }
|
|
|
+ if(organizationInfo.gradeId) {
|
|
|
+ info.push(`职系:[${organizationInfo.gradeName}]`)
|
|
|
+ }
|
|
|
+ if(organizationInfo.gradeLevelId) {
|
|
|
+ info.push(`职等:[${organizationInfo.gradeLevelName}]`)
|
|
|
}
|
|
|
+ this.checkedTargets.organizationId = organizationInfo.organizationId
|
|
|
+ this.checkedTargets.organizationName = organizationInfo.organizationName
|
|
|
+ this.checkedTargets.organizationTree = organizationInfo.organizationTree
|
|
|
+ this.sequencesInfo.gradeId = organizationInfo.gradeId
|
|
|
+ this.sequencesInfo.gradeName = organizationInfo.gradeName
|
|
|
+ this.gradesInfo.gradeLevelId = organizationInfo.gradeLevelId
|
|
|
+ this.gradesInfo.gradeLevelName = organizationInfo.gradeLevelName
|
|
|
+ // for(let i of organizationInfo) {
|
|
|
+ // if(i.organizationIds) {
|
|
|
+ // info.push(`${i.organizationTree.join('-')}`)
|
|
|
+ // } else if(i.gradeId) {
|
|
|
+ // info.push(`职系-${i.gradeName}`)
|
|
|
+ // } else {
|
|
|
+ // info.push(`职等-${i.gradeLevelName}`)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
this.authName = info.join('/')
|
|
|
}
|
|
|
} else {
|
|
@@ -546,8 +593,8 @@ export default {
|
|
|
if(!this.willAuditData.length) return
|
|
|
this.auditShow = true
|
|
|
},
|
|
|
- transCheckedTarget(arg) {
|
|
|
- this.checkedTarget = arg
|
|
|
+ transCheckedTargets(arg) {
|
|
|
+ this.checkedTargets = arg
|
|
|
},
|
|
|
handleSequencesChange(arg) {
|
|
|
this.sequencesInfo = arg
|
|
@@ -557,27 +604,54 @@ export default {
|
|
|
},
|
|
|
handleSaveOk() {
|
|
|
if(this.isShowOrg) {
|
|
|
+ // let info = []
|
|
|
+ // let res = []
|
|
|
+ // if(this.checkedTarget.organizationId) {
|
|
|
+ // info.push(`${this.checkedTarget.organizationTree.join('-')}`)
|
|
|
+ // res.push(this.checkedTarget)
|
|
|
+ // }
|
|
|
+ // if(this.sequencesInfo.gradeId) {
|
|
|
+ // info.push(`职系-${this.sequencesInfo.gradeName}`)
|
|
|
+ // res.push(this.sequencesInfo)
|
|
|
+ // }
|
|
|
+ // if(this.gradesInfo.gradeLevelId) {
|
|
|
+ // info.push(`职等-${this.gradesInfo.gradeLevelName}`)
|
|
|
+ // res.push(this.gradesInfo)
|
|
|
+ // }
|
|
|
+ // if(info.length) {
|
|
|
+ // this.authName = info.join('/')
|
|
|
+ // }
|
|
|
+ // if(res.length) {
|
|
|
+ // this.auditForm.organizationIds = res
|
|
|
+ // } else {
|
|
|
+ // this.auditForm.organizationIds = ""
|
|
|
+ // }
|
|
|
let info = []
|
|
|
- let res = []
|
|
|
- if(this.checkedTarget.organizationId) {
|
|
|
- info.push(`${this.checkedTarget.organizationTree.join('-')}`)
|
|
|
- res.push(this.checkedTarget)
|
|
|
+ let res = {}
|
|
|
+ console.log(this.checkedTargets)
|
|
|
+ if(this.checkedTargets && this.checkedTargets.organizationId) {
|
|
|
+ info.push(`组织:[${this.checkedTargets.organizationTree}]`)
|
|
|
+ res['organizationId'] = this.checkedTargets.organizationId
|
|
|
+ res['organizationName'] = this.checkedTargets.organizationName
|
|
|
+ res['organizationTree'] = this.checkedTargets.organizationTree
|
|
|
}
|
|
|
- if(this.sequencesInfo.gradeId) {
|
|
|
- info.push(`职系-${this.sequencesInfo.gradeName}`)
|
|
|
- res.push(this.sequencesInfo)
|
|
|
+ if(this.sequencesInfo && this.sequencesInfo.gradeId) {
|
|
|
+ info.push(`职系:[${this.sequencesInfo.gradeName}]`)
|
|
|
+ res['gradeId'] = this.sequencesInfo.gradeId
|
|
|
+ res['gradeName'] = this.sequencesInfo.gradeName
|
|
|
}
|
|
|
- if(this.gradesInfo.gradeLevelId) {
|
|
|
- info.push(`职等-${this.gradesInfo.gradeLevelName}`)
|
|
|
- res.push(this.gradesInfo)
|
|
|
+ if(this.gradesInfo && this.gradesInfo.gradeLevelId) {
|
|
|
+ info.push(`职等:[${this.gradesInfo.gradeLevelName}]`)
|
|
|
+ res['gradeLevelId'] = this.gradesInfo.gradeLevelId
|
|
|
+ res['gradeLevelName'] = this.gradesInfo.gradeLevelName
|
|
|
}
|
|
|
- if(info.length) {
|
|
|
+ if(info.length) {
|
|
|
this.authName = info.join('/')
|
|
|
}
|
|
|
- if(res.length) {
|
|
|
- this.auditForm.organizationId = JSON.stringify([...res])
|
|
|
+ if(Object.keys(res).length) {
|
|
|
+ this.auditForm.organizationIds = res
|
|
|
} else {
|
|
|
- this.auditForm.organizationId = ""
|
|
|
+ this.auditForm.organizationIds = {}
|
|
|
}
|
|
|
}
|
|
|
this.showAuditFlag = false
|