|
@@ -87,7 +87,7 @@
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item class="knowledgeAddUpdateLabel oneline" v-if="knowledgeForm.type==1" prop="actualApproverName">
|
|
|
<span slot="label">  权限</span>
|
|
|
- <div @click="showAuditFlag = true">
|
|
|
+ <div @click="handleAuthClickshow">
|
|
|
<a-select class="addItemBox" v-model="authName" :showArrow="false" :open="false" placeholder="请选择您建议的权限范围"></a-select>
|
|
|
</div>
|
|
|
</a-form-model-item>
|
|
@@ -118,8 +118,10 @@
|
|
|
okText="保存"
|
|
|
@ok="handleSaveOk">
|
|
|
<org-people :isOnlyOrg="false"
|
|
|
+ :organizationIdsInfo="organizationIdsInfo"
|
|
|
style="width:800px;height:65vh;"
|
|
|
@transCheckedTarget="transCheckedTarget"
|
|
|
+ @transCheckedTargets="transCheckedTargets"
|
|
|
@returnSequencesInfo="handleSequencesChange"
|
|
|
@returnGradeInfo="handleGradeChange" />
|
|
|
</a-modal>
|
|
@@ -166,7 +168,7 @@ export default {
|
|
|
attachmentName: '',
|
|
|
createBy: '',
|
|
|
author: '',
|
|
|
- organizationId:''
|
|
|
+ organizationIds: {}
|
|
|
},
|
|
|
options: [
|
|
|
{
|
|
@@ -264,14 +266,15 @@ export default {
|
|
|
},
|
|
|
headers: {},
|
|
|
isSubmit:false,
|
|
|
- innerWidth: 800,
|
|
|
+ widthVar: 800,
|
|
|
authName: undefined,
|
|
|
- // 组织架构
|
|
|
checkedTarget: {},
|
|
|
+ checkedTargets: {},
|
|
|
// 职系
|
|
|
sequencesInfo: {},
|
|
|
// 职等
|
|
|
gradesInfo: {},
|
|
|
+ organizationIdsInfo: {}
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -294,27 +297,52 @@ export default {
|
|
|
this.knowledgeForm.content = res.data.content
|
|
|
this.knowledgeForm.attachment = res.data.attachment
|
|
|
this.knowledgeForm.attachmentName = res.data.attachmentName
|
|
|
+ this.knowledgeForm.organizationIds = res.data.organizationIds
|
|
|
this.approverData = res.data.approvals
|
|
|
this.knowledgeForm.createBy = res.data.createBy
|
|
|
this.knowledgeForm.author = res.data.author
|
|
|
//res.data.organizationId='[{\"organizationId\":\"C0000\",\"organizationName\":\"惠科集团\",\"organizationTree\":[\"惠科集团\"]},{\"gradeId\":\"O/F\",\"gradeName\":\"制造职系\"},{\"gradeLevelId\":\"1\",\"gradeLevelName\":\"1\"}]'
|
|
|
- console.log(res.data.organizationId)
|
|
|
- let organizationIdArr = JSON.parse(res.data.organizationId)
|
|
|
- if(organizationIdArr!=null){
|
|
|
+ if(res.data.organizationIds) {
|
|
|
+ let organizationInfo = res.data.organizationIds
|
|
|
let info = []
|
|
|
- organizationIdArr.forEach(element => {
|
|
|
- if(element.organizationTree){
|
|
|
- info.push(`${element.organizationTree.join('-')}`)
|
|
|
- }
|
|
|
- if(element.gradeName){
|
|
|
- info.push(`职系-${element.gradeName}`)
|
|
|
- }
|
|
|
- if(element.gradeLevelName){
|
|
|
- info.push(`职等-${element.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
|
|
|
+ // console.log(this.checkedTargets)
|
|
|
+ // console.log(this.sequencesInfo)
|
|
|
+ // console.log(this.gradeLevelId)
|
|
|
+ this.accessAuthority = info.join('/')
|
|
|
this.authName = info.join('/')
|
|
|
}
|
|
|
+ // let organizationIdArr = JSON.parse(res.data.organizationId)
|
|
|
+ // if(organizationIdArr!=null){
|
|
|
+ // let info = []
|
|
|
+ // organizationIdArr.forEach(element => {
|
|
|
+ // if(element.organizationTree){
|
|
|
+ // info.push(`${element.organizationTree.join('-')}`)
|
|
|
+ // }
|
|
|
+ // if(element.gradeName){
|
|
|
+ // info.push(`职系-${element.gradeName}`)
|
|
|
+ // }
|
|
|
+ // if(element.gradeLevelName){
|
|
|
+ // info.push(`职等-${element.gradeLevelName}`)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // this.authName = info.join('/')
|
|
|
+ // }
|
|
|
this.titlesChange()
|
|
|
this.summaryChange()
|
|
|
})
|
|
@@ -353,6 +381,10 @@ export default {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleAuthClickshow() {
|
|
|
+ this.organizationIdsInfo = this.knowledgeForm.organizationIds
|
|
|
+ this.showAuditFlag = true
|
|
|
+ },
|
|
|
//分类修改数据
|
|
|
popupVisibleChange(value) {
|
|
|
if(value==false){
|
|
@@ -368,6 +400,9 @@ export default {
|
|
|
transCheckedTarget(arg) {
|
|
|
this.checkedTarget = arg
|
|
|
},
|
|
|
+ transCheckedTargets(arg) {
|
|
|
+ this.checkedTargets = arg
|
|
|
+ },
|
|
|
handleSequencesChange(arg) {
|
|
|
this.sequencesInfo = arg
|
|
|
},
|
|
@@ -377,30 +412,32 @@ export default {
|
|
|
handleSaveOk() {
|
|
|
if(this.isShowOrg) {
|
|
|
let info = []
|
|
|
- let res = []
|
|
|
- if(this.checkedTarget.organizationId) {
|
|
|
- info.push(`${this.checkedTarget.organizationTree.join('-')}`)
|
|
|
- res.push(this.checkedTarget)
|
|
|
+ let res = {}
|
|
|
+ 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
|
|
|
}
|
|
|
- console.log(info)
|
|
|
if(info.length) {
|
|
|
this.authName = info.join('/')
|
|
|
}
|
|
|
- if(res.length) {
|
|
|
- this.knowledgeForm.organizationId = JSON.stringify([...res])
|
|
|
+ if(Object.keys(res).length) {
|
|
|
+ this.knowledgeForm.organizationIds = res
|
|
|
} else {
|
|
|
- this.knowledgeForm.organizationId = ""
|
|
|
+ this.knowledgeForm.organizationIds = {}
|
|
|
}
|
|
|
}
|
|
|
- console.log(this.knowledgeForm.organizationId)
|
|
|
this.showAuditFlag = false
|
|
|
},
|
|
|
// title修改限制数量
|
|
@@ -789,6 +826,10 @@ export default {
|
|
|
.ant-cascader-picker-label{
|
|
|
height: 30px;
|
|
|
}
|
|
|
+.ant-select-selection__placeholder {
|
|
|
+ height: 22px;
|
|
|
+ line-height: 22px;
|
|
|
+}
|
|
|
</style>
|
|
|
<style scoped>
|
|
|
/deep/ .ant-cascader-menus {
|