This commit is contained in:
熊成强 2020-11-04 10:26:44 +08:00
commit a9f8011a62
4 changed files with 63 additions and 33 deletions

View File

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

View File

@ -124,12 +124,15 @@
@cb="handleDeptSubmit"
/>
<el-dialog title="删除确认" :visible.sync="visibleRemovePerson" width="440px">
<div class="commonFont line-space">确认将选中的{{popupData.selectedList.length}}从考核中删除删除后绩效考核数据将被清空数据无法恢复请确认是否删除</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 v-if="popupData.selectedList.length>1">
<div class="commonFont line-space">确认将选中的{{popupData.selectedList.length}}从考核中删除删除后绩效考核数据将被清空数据无法恢复请确认是否删除</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>
<div v-else class="commonFont">被考核人删除后本次考核相关数据数据将被清空数据无法恢复请确认是否删除</div>
<div slot="footer">
<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>
</el-dialog>
</div>
@ -140,8 +143,7 @@
import PopupRight from '@/components/PopupRight'
import EvaluationTeamFilter from '@/components/EvaluationTeamFilter'
import dialogDepart from '@/components/getDepart'
import { apiManagerDetail } from '@/api/assessment'
import { apiManagerDetail, apiAssessManagerChange } from '@/api/assessment'
export default {
props: {
@ -221,17 +223,34 @@ export default {
this.popupData.selectedList = val
},
handleSubmitPopup () {
//
//
if (this.popupData.selectedList.length <= 0) {
this.$message.error('请选择删除的人员')
return
}
this.visibleRemovePerson = true
// const list = this.popupData.selectedList
// this.$emit('update:showPopup', false)
},
handleConfirmRemovePerson () {
//
console.log('删除')
this.visibleRemovePerson = false
this.$emit('update:showPopup', false)
this.$emit('cb')
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.$emit('cb')
})
},
hundlePopupHide () {
this.$emit('update:showPopup', false)
@ -350,8 +369,8 @@ export default {
'showPopup': function (newVal, oldVal) {
if (newVal) {
this.handleGainAssessmentGroupList()
console.log('显示人员选择---------')
} else {
this.removeConfirmInput = ''
this.rqAssessmentParameter.startId = null
this.rqAssessmentParameter.staffIds = ''
this.rqAssessmentParameter.evaluationIds = ''
@ -362,6 +381,12 @@ export default {
this.staffIds = ''
this.popupData.tableList = []
this.popupData.selectedList = []
this.$nextTick(() => {
if (this.$refs.popupMultipleTable) {
console.log('lllllllllllllllllllllllllllllllll')
this.$refs.popupMultipleTable.clearSelection()
}
})
}
}
}

View File

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