有哈
This commit is contained in:
parent
c69c2f0731
commit
92a028bc23
@ -25,6 +25,7 @@
|
|||||||
<el-radio-group v-model="itemInfo.isActive">
|
<el-radio-group v-model="itemInfo.isActive">
|
||||||
<el-radio :label="1">主管(指定一级)</el-radio>
|
<el-radio :label="1">主管(指定一级)</el-radio>
|
||||||
<el-radio :label="0">指定成员</el-radio>
|
<el-radio :label="0">指定成员</el-radio>
|
||||||
|
<el-radio :label="-1">被考核人自己</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<div v-if="itemInfo.isActive!==0 && itemInfo.isActive!==-1" style="padding:30px 0 0 20px;">
|
<div v-if="itemInfo.isActive!==0 && itemInfo.isActive!==-1" style="padding:30px 0 0 20px;">
|
||||||
<span>被考评人的</span>
|
<span>被考评人的</span>
|
||||||
@ -42,7 +43,7 @@
|
|||||||
<span style="font-size:14px;padding:0 0 0 10px;">{{itemInfo.name}}</span>
|
<span style="font-size:14px;padding:0 0 0 10px;">{{itemInfo.name}}</span>
|
||||||
</div>
|
</div>
|
||||||
<getpersonl v-if="itemInfo.isShow" :value.sync='itemInfo.optIds' :isShow.sync='itemInfo.isShow' :showDataList.sync='itemInfo.list'/>
|
<getpersonl v-if="itemInfo.isShow" :value.sync='itemInfo.optIds' :isShow.sync='itemInfo.isShow' :showDataList.sync='itemInfo.list'/>
|
||||||
<div style="padding:20px 0 0 0 ">
|
<div v-if="itemInfo.isActive!==-1" style="padding:20px 0 0 0 ">
|
||||||
<span>当执行人为多人时的处理方式:</span>
|
<span>当执行人为多人时的处理方式:</span>
|
||||||
<div style="padding:10px 0 0 20px">
|
<div style="padding:10px 0 0 20px">
|
||||||
<el-radio-group v-model="itemInfo.stepType">
|
<el-radio-group v-model="itemInfo.stepType">
|
||||||
@ -132,7 +133,7 @@ export default {
|
|||||||
list = list.map(i => {
|
list = list.map(i => {
|
||||||
i.isShow = false
|
i.isShow = false
|
||||||
i = Object.assign({}, this.handleOptType(i), i)
|
i = Object.assign({}, this.handleOptType(i), i)
|
||||||
i.isActive = i.optType === 0 ? 0 : 1
|
i.isActive = (i.optType === 0 || i.optType === -1) ? i.optType : 1
|
||||||
i.roleDtos = JSON.parse(JSON.stringify(this.roleDtos)).map(j => {
|
i.roleDtos = JSON.parse(JSON.stringify(this.roleDtos)).map(j => {
|
||||||
j.checked = i.roleIds ? i.roleIds.includes(String(j.id)) : false
|
j.checked = i.roleIds ? i.roleIds.includes(String(j.id)) : false
|
||||||
return j
|
return j
|
||||||
@ -157,6 +158,7 @@ export default {
|
|||||||
return obj
|
return obj
|
||||||
}
|
}
|
||||||
if (i.optType === -1) {
|
if (i.optType === -1) {
|
||||||
|
obj.name = '被考核人'
|
||||||
return obj
|
return obj
|
||||||
} else {
|
} else {
|
||||||
obj.name = this.options.filter(j => j.id === i.optType)[0].name
|
obj.name = this.options.filter(j => j.id === i.optType)[0].name
|
||||||
@ -231,10 +233,11 @@ export default {
|
|||||||
n.map(i => {
|
n.map(i => {
|
||||||
i.roleIds = ''
|
i.roleIds = ''
|
||||||
i.roleDtos.map(j => {
|
i.roleDtos.map(j => {
|
||||||
if (j.type !== 1 && j.checked) i.roleIds += j.id + ','
|
console.log('j: ', j)
|
||||||
|
if (j.type !== 1 && j.checked) i.roleIds += j.roleId + ','
|
||||||
})
|
})
|
||||||
i.roleIds = i.roleIds.substring(0, i.roleIds.length - 1)
|
i.roleIds = i.roleIds.substring(0, i.roleIds.length - 1)
|
||||||
i.optType = i.isActive === 0 ? 0 : i.optType
|
i.optType = (i.isActive === 0 || i.isActive === -1) ? i.isActive : i.optType
|
||||||
})
|
})
|
||||||
console.log('n: ', n)
|
console.log('n: ', n)
|
||||||
this.$emit('update:info', this.list)
|
this.$emit('update:info', this.list)
|
||||||
@ -248,27 +251,25 @@ export default {
|
|||||||
list: {
|
list: {
|
||||||
deep: true,
|
deep: true,
|
||||||
handler (n, o) {
|
handler (n, o) {
|
||||||
this.handleIsEmit(n)
|
this.handleIsEmit(JSON.parse(JSON.stringify(n)))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
itemInfo: {
|
itemInfo: {
|
||||||
deep: true,
|
deep: true,
|
||||||
handler (n, o) {
|
handler (n, o) {
|
||||||
console.log('nxcq: ', n)
|
const arr = n
|
||||||
if (n.isActive !== 0) {
|
console.log('arr: ', arr)
|
||||||
if (n.optType === 0 && n.optType !== -1) {
|
if (arr.isActive !== 0 && arr.isActive !== -1) {
|
||||||
n.name = this.options.filter(i => i.id === n.optType)[0].name
|
if (arr.optType < 1) arr.optType = 1
|
||||||
n.optType = 1
|
arr.name = this.options.filter(i => i.id === arr.optType)[0].name
|
||||||
}
|
} else if (arr.isActive === 0) {
|
||||||
if (n.optType === -1) {
|
if (arr.list) {
|
||||||
n.name = '考核人员自己'
|
arr.name = this.handleTitle(arr.list)
|
||||||
|
} else {
|
||||||
|
arr.name = '未指定成员'
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (n.list) {
|
arr.name = '被考核人自己'
|
||||||
n.name = this.handleTitle(n.list)
|
|
||||||
} else {
|
|
||||||
n.name = '未指定成员'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// n.roleIds = ''
|
// n.roleIds = ''
|
||||||
// n.roleDtos.map(i => {
|
// n.roleDtos.map(i => {
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
<el-radio-group v-model="itemInfo.isActive">
|
<el-radio-group v-model="itemInfo.isActive">
|
||||||
<el-radio :label="1">主管(指定一级)</el-radio>
|
<el-radio :label="1">主管(指定一级)</el-radio>
|
||||||
<el-radio :label="0">指定成员</el-radio>
|
<el-radio :label="0">指定成员</el-radio>
|
||||||
|
<el-radio :label="-1">被考核人自己</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<div v-if="itemInfo.isActive!==0 && itemInfo.isActive!==-1" style="padding:30px 0 0 20px;">
|
<div v-if="itemInfo.isActive!==0 && itemInfo.isActive!==-1" style="padding:30px 0 0 20px;">
|
||||||
<span>被考评人的</span>
|
<span>被考评人的</span>
|
||||||
@ -42,7 +43,7 @@
|
|||||||
<span style="font-size:14px;padding:0 0 0 10px;">{{itemInfo.name}}</span>
|
<span style="font-size:14px;padding:0 0 0 10px;">{{itemInfo.name}}</span>
|
||||||
</div>
|
</div>
|
||||||
<getpersonl v-if="itemInfo.isShow" :value.sync='itemInfo.optIds' :isShow.sync='itemInfo.isShow' :showDataList.sync='itemInfo.list'/>
|
<getpersonl v-if="itemInfo.isShow" :value.sync='itemInfo.optIds' :isShow.sync='itemInfo.isShow' :showDataList.sync='itemInfo.list'/>
|
||||||
<div style="padding:20px 0 0 0 ">
|
<div v-if="itemInfo.isActive !== -1" style="padding:20px 0 0 0 ">
|
||||||
<span>当执行人为多人时的处理方式:</span>
|
<span>当执行人为多人时的处理方式:</span>
|
||||||
<div style="padding:10px 0 0 20px">
|
<div style="padding:10px 0 0 20px">
|
||||||
<el-radio-group v-model="itemInfo.stepType">
|
<el-radio-group v-model="itemInfo.stepType">
|
||||||
@ -137,7 +138,8 @@ export default {
|
|||||||
list = list.map(i => {
|
list = list.map(i => {
|
||||||
i.isShow = false
|
i.isShow = false
|
||||||
i = Object.assign({}, this.handleOptType(i), i)
|
i = Object.assign({}, this.handleOptType(i), i)
|
||||||
i.isActive = i.optType === 0 ? 0 : 1
|
console.log('i: ', i)
|
||||||
|
i.isActive = (i.optType === 0 || i.optType === -1) ? i.optType : 1
|
||||||
i.roleDtos = JSON.parse(JSON.stringify(this.roleDtos)).map(j => {
|
i.roleDtos = JSON.parse(JSON.stringify(this.roleDtos)).map(j => {
|
||||||
j.checked = i.roleIds ? i.roleIds.includes(String(j.id)) : false
|
j.checked = i.roleIds ? i.roleIds.includes(String(j.id)) : false
|
||||||
return j
|
return j
|
||||||
@ -162,6 +164,7 @@ export default {
|
|||||||
return obj
|
return obj
|
||||||
}
|
}
|
||||||
if (i.optType === -1) {
|
if (i.optType === -1) {
|
||||||
|
obj.name = '被考核人'
|
||||||
return obj
|
return obj
|
||||||
} else {
|
} else {
|
||||||
obj.name = this.options.filter(j => j.id === i.optType)[0].name
|
obj.name = this.options.filter(j => j.id === i.optType)[0].name
|
||||||
@ -239,10 +242,10 @@ export default {
|
|||||||
arr = arr.map(i => {
|
arr = arr.map(i => {
|
||||||
i.roleIds = ''
|
i.roleIds = ''
|
||||||
i.roleDtos.map(j => {
|
i.roleDtos.map(j => {
|
||||||
if (j.type !== 1 && j.checked) i.roleIds += j.id + ','
|
if (j.type !== 1 && j.checked) i.roleIds += j.roleId + ','
|
||||||
})
|
})
|
||||||
i.roleIds = i.roleIds.substring(0, i.roleIds.length - 1)
|
i.roleIds = i.roleIds.substring(0, i.roleIds.length - 1)
|
||||||
i.optType = i.isActive === 0 ? 0 : i.optType
|
i.optType = (i.isActive === 0 || i.isActive === -1) ? i.isActive : i.optType
|
||||||
return i
|
return i
|
||||||
})
|
})
|
||||||
console.log('arr: ', arr)
|
console.log('arr: ', arr)
|
||||||
@ -266,15 +269,17 @@ export default {
|
|||||||
handler (n, o) {
|
handler (n, o) {
|
||||||
const arr = n
|
const arr = n
|
||||||
console.log('arr: ', arr)
|
console.log('arr: ', arr)
|
||||||
if (arr.isActive !== 0) {
|
if (arr.isActive !== 0 && arr.isActive !== -1) {
|
||||||
if (arr.optType === 0) arr.optType = 1
|
if (arr.optType < 1) arr.optType = 1
|
||||||
arr.name = this.options.filter(i => i.id === arr.optType)[0].name
|
arr.name = this.options.filter(i => i.id === arr.optType)[0].name
|
||||||
} else {
|
} else if (arr.isActive === 0) {
|
||||||
if (arr.list) {
|
if (arr.list) {
|
||||||
arr.name = this.handleTitle(arr.list)
|
arr.name = this.handleTitle(arr.list)
|
||||||
} else {
|
} else {
|
||||||
arr.name = '未指定成员'
|
arr.name = '未指定成员'
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
arr.name = '被考核人自己'
|
||||||
}
|
}
|
||||||
// this.$emit('update:info', this.list)
|
// this.$emit('update:info', this.list)
|
||||||
// n.roleIds = ''
|
// n.roleIds = ''
|
||||||
|
|||||||
@ -239,7 +239,7 @@ export default {
|
|||||||
n.map(i => {
|
n.map(i => {
|
||||||
i.roleIds = ''
|
i.roleIds = ''
|
||||||
i.roleDtos.map(j => {
|
i.roleDtos.map(j => {
|
||||||
if (j.type !== 1 && j.checked) i.roleIds += j.id + ','
|
if (j.type !== 1 && j.checked) i.roleIds += j.roleId + ','
|
||||||
})
|
})
|
||||||
i.roleIds = i.roleIds.substring(0, i.roleIds.length - 1)
|
i.roleIds = i.roleIds.substring(0, i.roleIds.length - 1)
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user