This commit is contained in:
熊成强 2020-11-09 09:07:15 +08:00
commit 238c6ecd4a

View File

@ -111,6 +111,17 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination
:hide-on-single-page="true"
:current-page.sync="rqInfoParameter.currPage"
:page-size="rqInfoParameter.pageSize"
:total="rqInfoParameter.totalCount"
:page-count="rqInfoParameter.totalPage"
@current-change="handleCurrentChange"
layout="total, prev, pager, next, jumper"
></el-pagination>
</div> </div>
<div class="authority-ceo line-space comonPrompt"> <div class="authority-ceo line-space comonPrompt">
<div class="comonTitle line-space">企业负责人</div> <div class="comonTitle line-space">企业负责人</div>
@ -194,20 +205,24 @@
<el-tooltip <el-tooltip
class="item" class="item"
effect="dark" effect="dark"
content="分别控制管理员有1.发起OKR考核权限基础设置-OKR模块需要开启开启后OKR全公司可见2.发起绩效考核的权限" content="分别控制管理员有1.发起绩效考核的权限"
placement="bottom" placement="bottom"
> >
<i class="el-icon-info" /> <i class="el-icon-info" />
</el-tooltip> </el-tooltip>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-checkbox-group <el-checkbox
v-model="popupFromSub.featuresCheck"
@change="popupFromSub.featuresCheck=true"
>绩效考核</el-checkbox>
<!-- <el-checkbox-group
v-model="popupFromSub.featuresChckList" v-model="popupFromSub.featuresChckList"
@change="handlePopupCheckModel" @change="handlePopupCheckModel"
> >
<el-checkbox label="0">OKR</el-checkbox> <el-checkbox label="0">OKR</el-checkbox>
<el-checkbox label="1">绩效考核</el-checkbox> <el-checkbox label="1">绩效考核</el-checkbox>
</el-checkbox-group> </el-checkbox-group> -->
</el-col> </el-col>
</el-form-item> </el-form-item>
<div v-if="popupFromSub.showChoosePerformance"> <div v-if="popupFromSub.showChoosePerformance">
@ -260,9 +275,9 @@
</el-col> </el-col>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="是否可见考核结果"> <!-- <el-form-item label="是否可见考核结果">
<el-switch v-model="popupFromSub.resultsVisible"></el-switch> <el-switch v-model="popupFromSub.resultsVisible"></el-switch>
</el-form-item> </el-form-item> -->
<el-form-item label="菜单权限"> <el-form-item label="菜单权限">
<div> <div>
<el-checkbox <el-checkbox
@ -302,7 +317,7 @@
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
v-if="popupFromSub.menuCheckData.indexOf('考评组')>-1" v-if="popupFromSub.menuCheckData.indexOf(2)>-1"
label="考评组权限" label="考评组权限"
> >
<div> <div>
@ -377,7 +392,7 @@ export default {
popupSubMngEdit: false, // false true popupSubMngEdit: false, // false true
menuCheckAllData: [2, 21, 23], menuCheckAllData: [2, 21, 23],
menuMngCheckAll: [15, 16], // menuMngCheckAll: [15, 16], //
menuIdOrNameData: { '全部权限': 1, '考核管理': 2, '发起考核': 15, '开始评分': 16, '考评组': 21, '绩效报表': 23 }, // menuIdOrNameData: { '': 1, '': 2, '': 15, '': 16, '': 21, '': 23 },
mainData: { mainData: {
masterFirst: { masterFirst: {
headerUrl: '', headerUrl: '',
@ -389,6 +404,8 @@ export default {
boss: []// boss: []//
}, },
popupFromSub: { popupFromSub: {
id: '', // id
featuresCheck: true,
subPersonData: null, // subPersonData: null, //
shwoDepartData: { shwoDepartData: {
title: '', title: '',
@ -403,6 +420,12 @@ export default {
menuMngCheck: [], // menuMngCheck: [], //
groupRadio: '0', // 0 1 groupRadio: '0', // 0 1
assessmentList: [] // assessmentList: [] //
},
rqInfoParameter: {
currPage: 1,
pageSize: 10,
totalCount: 1,
totalPage: 1
} }
} }
}, },
@ -415,11 +438,13 @@ export default {
if (!newVal) { if (!newVal) {
this.popupSubMngEdit = false this.popupSubMngEdit = false
this.popupFromSub = { this.popupFromSub = {
id: '', // id
subPersonData: null, // subPersonData: null, //
shwoDepartData: { shwoDepartData: {
title: '', title: '',
list: [] list: []
}, // }, //
featuresCheck: true,
featuresChckList: ['0', '1'], // featuresChckList: ['0', '1'], //
showChoosePerformance: true, // showChoosePerformance: true, //
radioScope: 0, // radioScope: 0, //
@ -535,6 +560,11 @@ export default {
this.popupFromSub.menuMngCheck = this.menuMngCheckAll this.popupFromSub.menuMngCheck = this.menuMngCheckAll
this.showPopupAddSub = true this.showPopupAddSub = true
}, },
handleCurrentChange (val) {
//
this.rqInfoParameter.currPage = val
this.handleGetSetPageInfo()
},
handleChildEdit (row) { handleChildEdit (row) {
this.popupSubMngEdit = true this.popupSubMngEdit = true
this.showPopupAddSub = true this.showPopupAddSub = true
@ -544,16 +574,45 @@ export default {
if (res.code !== 200) { if (res.code !== 200) {
return return
} }
this.showPopupAddSub = true
const data = res.data const data = res.data
this.popupFromSub.id = row.id
this.popupFromSub.subPersonData = { title: row.name, value: row.staffId } this.popupFromSub.subPersonData = { title: row.name, value: row.staffId }
this.popupFromSub.radioScope = data.departmentId // this.popupFromSub.radioScope = data.departmentId //
this.popupFromSub.shwoDepartData.list = data.departmentInfos // this.popupFromSub.shwoDepartData.list = data.departmentInfos //
this.popupFromSub.evaluationGroupId = data.evaluationGroupId // this.popupFromSub.evaluationGroupId = data.evaluationGroupId //
this.popupFromSub.assessmentList = data.departmentInfos this.popupFromSub.assessmentList = data.departmentInfos
data.selectStaffMenuInfos.map((item, index) => { this.popupFromSub.menuCheckAllState = false //
return this.menuIdOrNameData.value() console.log('selectStaffMenuInfos====', data.selectStaffMenuInfos)
let selectStaffMenuInfos = data.selectStaffMenuInfos ? data.selectStaffMenuInfos : []
selectStaffMenuInfos.forEach(item => {
switch (item) {
case 1:
this.popupFromSub.menuCheckAllState = true
break
case 2:
case 21:
case 23:
console.log('item ======', item)
if (this.popupFromSub.menuCheckData.indexOf(item) < 0) {
this.popupFromSub.menuCheckData.push(item)
}
break
case 15:
case 16:
if (this.popupFromSub.menuMngCheck.indexOf(item) < 0) {
this.popupFromSub.menuMngCheck.push(item)
}
break
default:
break
}
}) })
console.log('权限详情---', res) if (this.popupFromSub.menuCheckData.indexOf(2) < 0) {
this.popupFromSub.menuMngCheck = []
}
console.log('编辑====', this.popupFromSub)
// console.log('---', res)
}) })
}, },
handleChildDelete (row) { handleChildDelete (row) {
@ -567,6 +626,7 @@ export default {
message: '删除子管理成功', message: '删除子管理成功',
type: 'success' type: 'success'
}) // }) //
this.rqInfoParameter.currPage = 1
this.handleGetSetPageInfo() this.handleGetSetPageInfo()
} }
}) })
@ -590,8 +650,14 @@ export default {
}).join(',') }).join(',')
// id // id
let menuIdStr = '' let menuIdStr = ''
let menuCheckList = this.popupFromSub.menuCheckData.concat(this.popupFromSub.menuMngCheck)
if (this.popupFromSub.menuCheckAllState) {
//
menuCheckList.push('1')
}
menuIdStr = menuCheckList.join(',')
let paraDic = { let paraDic = {
id: '', id: this.popupFromSub.id,
staffId: this.popupFromSub.subPersonData.value, staffId: this.popupFromSub.subPersonData.value,
departmentId: this.popupFromSub.radioScope, // departmentId: this.popupFromSub.radioScope, //
departmentInfoStr: departmentInfoStr, departmentInfoStr: departmentInfoStr,
@ -600,7 +666,13 @@ export default {
selectStaffMenuInfoStr: menuIdStr, // selectStaffMenuInfoStr: menuIdStr, //
departmentLevel: 'CHILD_PM' departmentLevel: 'CHILD_PM'
} }
console.log('提交---============', paraDic) apiSetPermissionsRoleChange(paraDic).then(res => {
if (res.code === 200) {
this.showPopupAddSub = false
//
this.handleGetSetPageInfo()
}
})
} }
// this.popupFromSub.subPersonData // this.popupFromSub.subPersonData
@ -649,14 +721,17 @@ export default {
this.popupFromSub.assessmentList.splice(this.popupFromSub.assessmentList.indexOf(item), 1) this.popupFromSub.assessmentList.splice(this.popupFromSub.assessmentList.indexOf(item), 1)
}, },
handleGetSetPageInfo () { handleGetSetPageInfo () {
let paraDic = { let rqDic = {
currPage: 1, currPage: this.rqInfoParameter.currPage,
pageSize: 400 pageSize: this.rqInfoParameter.pageSize
} }
apiSetPermissionsInfo(paraDic).then(res => { apiSetPermissionsInfo(rqDic).then(res => {
if (res.code !== 200) { if (res.code !== 200) {
return return
} }
this.rqInfoParameter.currPage = res.currPage
this.rqInfoParameter.totalCount = res.totalCount
this.rqInfoParameter.totalPage = res.totalPage
this.mainData.masterFirst = res.data.masterPM.length > 0 ? res.data.masterPM[0] : {} this.mainData.masterFirst = res.data.masterPM.length > 0 ? res.data.masterPM[0] : {}
this.mainData.childPm = res.data.childPm this.mainData.childPm = res.data.childPm
this.mainData.boss = res.data.boss this.mainData.boss = res.data.boss
@ -697,6 +772,10 @@ export default {
width: 100%; width: 100%;
justify-content: space-between; justify-content: space-between;
} }
.el-pagination {
margin-top: 10px;
text-align: right;
}
} }
&-ceo { &-ceo {
align-content: start; align-content: start;