权限设置

This commit is contained in:
leave 2020-10-30 18:10:40 +08:00
parent 61953f090a
commit 211117eef1
2 changed files with 247 additions and 13 deletions

View File

@ -4,7 +4,7 @@
title="考评组筛选" title="考评组筛选"
:visible="true" :visible="true"
:before-close="handleCancel" :before-close="handleCancel"
width="920" width="920px"
> >
<div class="team-filter-content"> <div class="team-filter-content">
<el-col <el-col

View File

@ -7,6 +7,7 @@
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
plain
@click="handleChangeDirector" @click="handleChangeDirector"
>更换智能绩效主管理员</el-button> >更换智能绩效主管理员</el-button>
</div> </div>
@ -55,40 +56,211 @@
</div> </div>
</div> </div>
<dialog-depart <dialog-personnel
v-if="showDialogDepart" v-if="showDialogPersonnel"
title="更换智能绩效主管理员"
:len="1"
:value.sync='depIds' :value.sync='depIds'
:isShow.sync='showDialogDepart' :isShow.sync='showDialogPersonnel'
:showDataList.sync='showData' :showDataList.sync='showData'
/> @cb="handleDialogSubmitDepart"
></dialog-personnel>
<popup-right <popup-right
v-if="showPopupAddSub" v-if="showPopupAddSub"
@cancel="hundlePopupAddSubHide" @cancel="hundlePopupAddSubHide"
@submit="handlePopupAddSubSubmit" @submit="handlePopupAddSubSubmit"
title="智能绩效子管理员设置" title="智能绩效子管理员设置"
class="popup" class="popup"
></popup-right> >
<div
slot="content"
style="width: 480px;"
>
<el-form
:model="popupFromSub"
label-width="110px"
label-suffix=""
label-position="left"
size="small"
>
<el-form-item label="子管理员">
<el-button
type="primary"
size="small"
plain
@click="handlePopupChooseSub"
>请选择</el-button>
</el-form-item>
<el-form-item
label="功能模块"
label-width="90px"
>
<el-col :span="1">
<el-tooltip
class="item"
effect="dark"
content="分别控制管理员有1.发起OKR考核权限基础设置-OKR模块需要开启开启后OKR全公司可见2.发起绩效考核的权限"
placement="bottom"
>
<i class="el-icon-info" />
</el-tooltip>
</el-col>
<el-col :span="11">
<el-checkbox-group
v-model="popupFromSub.checkList"
@change="handlePopupCheckModel"
>
<el-checkbox label="0">OKR</el-checkbox>
<el-checkbox label="1">绩效考核</el-checkbox>
</el-checkbox-group>
</el-col>
</el-form-item>
<div v-if="popupFromSub.showChoosePerformance">
<el-form-item
label="管理范围"
label-width="90px"
>
<el-col :span="1">
<el-tooltip
class="item"
effect="dark"
content="管理员能查看和管理那些员工的绩效考核非OKR"
placement="bottom"
>
<i class="el-icon-info" />
</el-tooltip>
</el-col>
<el-col :span="23">
<el-col :span="10">
<el-radio-group v-model="popupFromSub.radioScope">
<el-radio :label="3">全公司</el-radio>
<el-radio :label="6">所在部门及以下部门</el-radio>
<el-radio :label="9">特定部门</el-radio>
</el-radio-group>
</el-col>
<el-col :span="24">
<el-tag
v-for="tag in tags"
:key="tag.name"
closable
:type="tag.type"
>
{{tag.name}}
</el-tag>
</el-col>
<el-col :span="10">
<el-button
type="primary"
plain
@click="handlePopupChooseDept"
>请选择</el-button>
</el-col>
</el-col>
</el-form-item>
<el-form-item label="是否可见考核结果">
<el-switch v-model="popupFromSub.resultsVisible"></el-switch>
</el-form-item>
<el-form-item label="菜单权限">
<div>
<el-checkbox
v-model="popupFromSub.popupMenu"
@change="handleMenuCheckAllChange"
>全部权限</el-checkbox>
</div>
<div>
<el-checkbox
:indeterminate="popupFromSub.isIndeterminate"
v-model="popupFromSub.menuMngCheckAll"
@change="handleMenuMngCheckAllChange"
>考核管理</el-checkbox>
<el-checkbox-group
v-model="popupFromSub.menuManage"
@change="handleMenuMngCheckChange"
class="popup-menu-mange-group"
>
<el-checkbox label="发起考核"></el-checkbox>
<el-checkbox label="发起考核"></el-checkbox>
<el-checkbox label="发起考核"></el-checkbox>
<el-checkbox label="发起考核"></el-checkbox>
<el-checkbox label="发起考核"></el-checkbox>
</el-checkbox-group>
</div>
<div>
<el-checkbox label="指标库"></el-checkbox>
</div>
</el-form-item>
<el-form-item
v-if="popupFromSub.showGroup"
label="考评组权限"
>
<div>
<el-radio
v-model="popupFromSub.groupRadio"
label="0"
>全部考评组</el-radio>
</div>
<div>
<el-radio
v-model="popupFromSub.groupRadio"
label="1"
>特定考评组</el-radio>
</div>
<div v-if="popupFromSub.groupRadio ==='1'">
<el-button
type="primary"
plain
@click="handlePopupChooseGroup"
>请选择</el-button>
</div>
</el-form-item>
</div>
</el-form>
</div>
</popup-right>
</div> </div>
</template> </template>
<script> <script>
import dialogDepart from '@/components/getDepart' import dialogPersonnel from '@/components/getPersonnel'
import popupRight from '@/components/PopupRight' import popupRight from '@/components/PopupRight'
export default { export default {
components: { components: {
dialogDepart, dialogPersonnel,
popupRight popupRight
}, },
data () { data () {
return { return {
url: '', url: '',
showDialogDepart: false, showDialogPersonnel: false,
tableDataList: [], tableDataList: [],
showData: {}, showData: {
list: []
},
depIds: '22', depIds: '22',
showPopupAddSub: false // showPopupAddSub: false, //
popupFromSub: {
showChoosePerformance: true, //
radioScope: 3, //
resultsVisible: true, //
checkList: ['1'],
menuManage: [], //
menuCheckAll: false,
menuMngCheckAll: false, //
isIndeterminate: true, //
showGroup: true, //
groupRadio: '0' // 0 1
},
tags: [
{ name: '标签一', type: '' },
{ name: 'llkk卡卡街坊邻里', type: 'success' },
{ name: '标签三', type: 'info' },
{ name: '标签四', type: 'warning' },
{ name: '标签五', type: 'danger' }
]
} }
}, },
methods: { methods: {
@ -97,10 +269,57 @@ export default {
}, },
handleChangeDirector () { handleChangeDirector () {
// //
this.showDialogDepart = true this.showDialogPersonnel = true
},
handleDialogSubmitDepart (val) {
if (val.list.length <= 0) {
this.$message({
showClose: true,
message: '请选择主管理员',
type: 'error'
}); return
}
console.log('handleDialogSubmitDepart== ', val)
let msg = '是否将智能绩效主管理员变更为' + val.title
this.$confirm(msg, '提示')
.then(_ => {
this.showDialogPersonnel = false
})
.catch(_ => { })
}, },
handleSubAdd () { handleSubAdd () {
this.showPopupAddSub = true
},
hundlePopupAddSubHide () {
this.showPopupAddSub = false
},
handlePopupAddSubSubmit () {
this.showPopupAddSub = false
},
handlePopupChooseSub () {
//
},
handlePopupCheckModel (val) {
console.log(val.indexOf('1'))
this.popupFromSub.showChoosePerformance = val.indexOf('1') > -1
//
console.log('功能模块--======', val, this.popupFromSub.checkList)
},
handlePopupChooseDept () {
//
},
//
handleMenuCheckAllChange () {
//
},
handleMenuMngCheckAllChange () {
//
},
handleMenuMngCheckChange () {
//
},
handlePopupChooseGroup () {
//
} }
} }
} }
@ -143,5 +362,20 @@ export default {
justify-content: space-between; justify-content: space-between;
} }
} }
.popup {
.el-radio-group {
line-height: inherit !important;
padding-top: 5px;
}
.el-tag {
margin-right: 10px;
margin-bottom: 5px;
}
}
.popup-menu-mange-group {
width: 300px;
padding: 5px 15px;
background-color: #f9f9f9;
}
} }
</style> </style>