考核管理删除考核人

This commit is contained in:
leave 2020-11-04 10:25:34 +08:00
parent f2ecd0690d
commit 5bafcfdf2e
4 changed files with 63 additions and 33 deletions

View File

@ -79,3 +79,12 @@ export function apiGet375 (query) {
params: query params: query
}) })
} }
// 考核管理组管理变更
export function apiAssessManagerChange (query) {
return request({
url: '/lz_management/performance/assess/manager/change',
method: 'post',
data: query
})
}

View File

@ -85,17 +85,11 @@
</div> --> </div> -->
</div> </div>
</popup-right> </popup-right>
<popupRemovePerson
:showPopup.sync='showPerson'
:startId='startId'
@cb="handlePopupRemoveList"
/>
</div> </div>
</template> </template>
<script> <script>
import PopupRight from '@/components/PopupRight' import PopupRight from '@/components/PopupRight'
import popupRemovePerson from '@/components/popupPerson'
export default { export default {
props: { props: {
showPopup: { showPopup: {
@ -114,14 +108,12 @@ export default {
}, },
data () { data () {
return { return {
showPerson: false,
permissionsRadio: '0', // permissionsRadio: '0', //
permissionsPrompt: '被考核人的目标完成确认后,管理员和部门主管都可以调整目标' permissionsPrompt: '被考核人的目标完成确认后,管理员和部门主管都可以调整目标'
} }
}, },
components: { components: {
PopupRight, PopupRight
popupRemovePerson
}, },
watch: { watch: {
'showPopup': function (newVal) { 'showPopup': function (newVal) {
@ -136,11 +128,7 @@ export default {
}, },
handleAdd () { }, handleAdd () { },
handleDelete () { handleDelete () {
this.showPerson = true this.$emit('remove')
},
handlePopupRemoveList () {
console.log('要删除的人员')
this.$emit('update:showPopup', false)
} }
// handlePermissionsRadio () { // handlePermissionsRadio () {

View File

@ -124,12 +124,15 @@
@cb="handleDeptSubmit" @cb="handleDeptSubmit"
/> />
<el-dialog title="删除确认" :visible.sync="visibleRemovePerson" width="440px"> <el-dialog title="删除确认" :visible.sync="visibleRemovePerson" width="440px">
<div v-if="popupData.selectedList.length>1">
<div class="commonFont line-space">确认将选中的{{popupData.selectedList.length}}从考核中删除删除后绩效考核数据将被清空数据无法恢复请确认是否删除</div> <div class="commonFont line-space">确认将选中的{{popupData.selectedList.length}}从考核中删除删除后绩效考核数据将被清空数据无法恢复请确认是否删除</div>
<div class="commonFont line-space">请在下方输入框中输入<span style="color: red;">删除</span>二字确认您已知晓删除将导致数据无法恢复</div> <div class="commonFont line-space">请在下方输入框中输入<span style="color: red;">删除</span>二字确认您已知晓删除将导致数据无法恢复</div>
<div><el-input v-model="removeConfirmInput" placeholder="请输入“删除二字”" size="small"></el-input></div> <div><el-input v-model="removeConfirmInput" placeholder="请输入“删除二字”" size="small"></el-input></div>
</div>
<div v-else class="commonFont">被考核人删除后本次考核相关数据数据将被清空数据无法恢复请确认是否删除</div>
<div slot="footer"> <div slot="footer">
<el-button @click="visibleRemovePerson = false" size="small"> </el-button> <el-button @click="visibleRemovePerson = false" size="small"> </el-button>
<el-button @click="handleConfirmRemovePerson" type="primary" size="small" :disabled="removeConfirmInput!=='删除'"> </el-button> <el-button @click="handleConfirmRemovePerson" type="primary" size="small" :disabled="removeConfirmInput!=='删除'&&popupData.selectedList.length>1"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -140,8 +143,7 @@
import PopupRight from '@/components/PopupRight' import PopupRight from '@/components/PopupRight'
import EvaluationTeamFilter from '@/components/EvaluationTeamFilter' import EvaluationTeamFilter from '@/components/EvaluationTeamFilter'
import dialogDepart from '@/components/getDepart' import dialogDepart from '@/components/getDepart'
import { apiManagerDetail, apiAssessManagerChange } from '@/api/assessment'
import { apiManagerDetail } from '@/api/assessment'
export default { export default {
props: { props: {
@ -221,17 +223,34 @@ export default {
this.popupData.selectedList = val this.popupData.selectedList = val
}, },
handleSubmitPopup () { handleSubmitPopup () {
// //
if (this.popupData.selectedList.length <= 0) {
this.$message.error('请选择删除的人员')
return
}
this.visibleRemovePerson = true this.visibleRemovePerson = true
// const list = this.popupData.selectedList
// this.$emit('update:showPopup', false)
}, },
handleConfirmRemovePerson () { handleConfirmRemovePerson () {
// //
console.log('删除') let removeStaffIds = []
this.popupData.selectedList.forEach(item => {
removeStaffIds.push(item.id)
})
let dicPara = {
changeType: 1,
confirm: 0,
staffIds: removeStaffIds.join(),
startId: this.startId
}
console.log('删除数据===', dicPara)
apiAssessManagerChange(dicPara).then(res => {
if (res.code !== 200) {
return
}
//
this.visibleRemovePerson = false this.visibleRemovePerson = false
this.$emit('update:showPopup', false)
this.$emit('cb') this.$emit('cb')
})
}, },
hundlePopupHide () { hundlePopupHide () {
this.$emit('update:showPopup', false) this.$emit('update:showPopup', false)
@ -350,8 +369,8 @@ export default {
'showPopup': function (newVal, oldVal) { 'showPopup': function (newVal, oldVal) {
if (newVal) { if (newVal) {
this.handleGainAssessmentGroupList() this.handleGainAssessmentGroupList()
console.log('显示人员选择---------')
} else { } else {
this.removeConfirmInput = ''
this.rqAssessmentParameter.startId = null this.rqAssessmentParameter.startId = null
this.rqAssessmentParameter.staffIds = '' this.rqAssessmentParameter.staffIds = ''
this.rqAssessmentParameter.evaluationIds = '' this.rqAssessmentParameter.evaluationIds = ''
@ -362,6 +381,12 @@ export default {
this.staffIds = '' this.staffIds = ''
this.popupData.tableList = [] this.popupData.tableList = []
this.popupData.selectedList = [] this.popupData.selectedList = []
this.$nextTick(() => {
if (this.$refs.popupMultipleTable) {
console.log('lllllllllllllllllllllllllllllllll')
this.$refs.popupMultipleTable.clearSelection()
}
})
} }
} }
} }

View File

@ -178,11 +178,13 @@
popupRightTitle="管理绩效考核" popupRightTitle="管理绩效考核"
:startId='options.startId' :startId='options.startId'
@cb="handlePopupMangeSubmit" @cb="handlePopupMangeSubmit"
@remove="showPopupPerson=true"
/> />
<popupRemovePerson <popupRemovePerson
:showPopup="showPopupPerson" :showPopup.sync='showPopupPerson'
title="删除被考核人员" :startId='options.startId'
></popupRemovePerson> @cb="handlePopupRemoveListSuccessful"
/>
</div> </div>
</template> </template>
@ -205,7 +207,7 @@ export default {
startId: this.$route.query.id || '' startId: this.$route.query.id || ''
}, },
showPopupMange: false, // showPopupMange: false, //
showPopupPerson: false, showPopupPerson: false, //
showChooseList: false, showChooseList: false,
dialogVisible: false, dialogVisible: false,
form: { form: {
@ -400,6 +402,12 @@ export default {
}, },
handlePopupMangeSubmit () { handlePopupMangeSubmit () {
this.showPopupMange = false this.showPopupMange = false
},
handlePopupRemoveListSuccessful () {
//
this.showPopupMange = false
this.showPopupPerson = false
this.handleGetListContent()
} }
}, },
watch: { watch: {