Merge branch 'v_1.0.0' of http://gitlab.ldxinyong.com/enterpriseManagement/digitization-ui into v_1.0.0
This commit is contained in:
commit
f7409c00a5
34
src/api/setPermissions.js
Normal file
34
src/api/setPermissions.js
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
// 设置权限
|
||||||
|
// 权限设置列表
|
||||||
|
export function apiSetPermissionsInfo (query) {
|
||||||
|
return request({
|
||||||
|
url: '/lz_management/user/lzstaffrole/role/set',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 权限详情
|
||||||
|
export function apiSetPermissionsRoleDetail (query) {
|
||||||
|
return request({
|
||||||
|
url: '/lz_management/user/lzstaffrole/role/detail',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 权限添加或更新
|
||||||
|
export function apiSetPermissionsRoleChange (query) {
|
||||||
|
return request({
|
||||||
|
url: '/lz_management/user/lzstaffrole/role/addOrUpdate',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除管理员
|
||||||
|
export function apiSetPermissionsRoleDelete (query) {
|
||||||
|
return request({
|
||||||
|
url: '/lz_management/user/lzstaffrole/role/delete',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -34,7 +34,8 @@ import {
|
|||||||
Menu,
|
Menu,
|
||||||
MenuItem,
|
MenuItem,
|
||||||
Loading,
|
Loading,
|
||||||
Image
|
Image,
|
||||||
|
Avatar
|
||||||
} from 'element-ui'
|
} from 'element-ui'
|
||||||
|
|
||||||
Vue.prototype.$loading = Loading
|
Vue.prototype.$loading = Loading
|
||||||
@ -75,3 +76,4 @@ Vue.use(Cascader)
|
|||||||
Vue.use(Menu)
|
Vue.use(Menu)
|
||||||
Vue.use(MenuItem)
|
Vue.use(MenuItem)
|
||||||
Vue.use(Image)
|
Vue.use(Image)
|
||||||
|
Vue.use(Avatar)
|
||||||
|
|||||||
@ -183,6 +183,7 @@
|
|||||||
@remove="showPopupPerson=true"
|
@remove="showPopupPerson=true"
|
||||||
/>
|
/>
|
||||||
<popupRemovePerson
|
<popupRemovePerson
|
||||||
|
title="删除被考核人员"
|
||||||
:showPopup.sync='showPopupPerson'
|
:showPopup.sync='showPopupPerson'
|
||||||
:startId='options.startId'
|
:startId='options.startId'
|
||||||
@cb="handlePopupRemoveListSuccessful"
|
@cb="handlePopupRemoveListSuccessful"
|
||||||
|
|||||||
@ -13,8 +13,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="comonPrompt">绩效应用的主管理员,可由钉钉主管理员设置,绩效主管理员具有应用所有权限,且可以设置智能绩效应用子管理员</div>
|
<div class="comonPrompt">绩效应用的主管理员,可由钉钉主管理员设置,绩效主管理员具有应用所有权限,且可以设置智能绩效应用子管理员</div>
|
||||||
<div class="authority-main-info">
|
<div class="authority-main-info">
|
||||||
<el-image :src="url"></el-image>
|
<el-avatar
|
||||||
<div class="authority-main-info-name">阿三来了</div>
|
icon="el-icon-user-solid"
|
||||||
|
:size="40"
|
||||||
|
:src="mainData.masterFirst.headerUrl?mainData.masterFirst.headerUrl:''"
|
||||||
|
></el-avatar>
|
||||||
|
<div class="authority-main-info-name">{{mainData.masterFirst.name}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="authority-sub line-space">
|
<div class="authority-sub line-space">
|
||||||
@ -30,21 +34,106 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="comonPrompt line-space">可把绩效应用的日常管理工作交给绩效子管理员,绩效子管理员可由绩效主管理员设置</div>
|
<div class="comonPrompt line-space">可把绩效应用的日常管理工作交给绩效子管理员,绩效子管理员可由绩效主管理员设置</div>
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableDataList"
|
:data="mainData.childPm.list"
|
||||||
:header-cell-style="handleSubGetTableStyle"
|
:header-cell-style="handleSubGetTableStyle"
|
||||||
|
:cell-style="handleSubGetTableCellStyle"
|
||||||
|
max-height="500px"
|
||||||
>
|
>
|
||||||
<el-table-column label="姓名"></el-table-column>
|
<el-table-column
|
||||||
<el-table-column label="功能模块"></el-table-column>
|
width="50px"
|
||||||
<el-table-column label="管理范围"></el-table-column>
|
align="center"
|
||||||
<el-table-column label="是否可见考核结果"></el-table-column>
|
>
|
||||||
<el-table-column label="菜单权限"></el-table-column>
|
<template slot-scope="scope">
|
||||||
<el-table-column label="管理考评组"></el-table-column>
|
<el-avatar
|
||||||
<el-table-column label="操作"></el-table-column>
|
icon="el-icon-user-solid"
|
||||||
|
:size="40"
|
||||||
|
:src="scope.row.headerUrl?scope.row.headerUrl:''"
|
||||||
|
></el-avatar>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="姓名"
|
||||||
|
prop="name"
|
||||||
|
align="left"
|
||||||
|
width="100px"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="功能模块"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{handleGetChildeModel(scope.row.functionModel)}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="管理范围"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">{{handleGetChildeMangeRange(scope.row.departmentId)}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="是否可见考核结果"
|
||||||
|
align="center"
|
||||||
|
> <template slot-scope="scope">{{scope.row.canSee===0?'不可见':'可见'}}</template></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="菜单权限"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{scope.row.menuNames.join()}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="管理考评组"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{scope.row.evaluationGroupId===0?'全部考评组权限':'特定考评组权限'}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
@click="handleChildEdit(scope.row)"
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
>编辑</el-button>
|
||||||
|
<el-button
|
||||||
|
@click="handleChildDelete(scope.row)"
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
>删除</el-button>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="authority-ceo line-space">
|
<div class="authority-ceo line-space comonPrompt">
|
||||||
<div class="comonTitle line-space">企业负责人</div>
|
<div class="comonTitle line-space">企业负责人</div>
|
||||||
<div class="comonPrompt">企业负责人可以看到全公司的绩效数据,可由钉钉主管理员在通讯录设置</div>
|
<div>企业负责人可以看到全公司的绩效数据,可由钉钉主管理员在通讯录设置</div>
|
||||||
|
<div
|
||||||
|
v-if="mainData.boss.length>0"
|
||||||
|
class="authority-ceo-info"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-for="(item, index) in mainData.boss"
|
||||||
|
:key="index"
|
||||||
|
class="authority-ceo-info-item"
|
||||||
|
>
|
||||||
|
<el-avatar
|
||||||
|
icon="el-icon-user-solid"
|
||||||
|
:size="40"
|
||||||
|
:src="item.headerUrl?item.headerUrl :''"
|
||||||
|
></el-avatar>
|
||||||
|
<span class="authority-main-info-name">{{item.name}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="authority-department line-space">
|
<div class="authority-department line-space">
|
||||||
<div class="comonTitle line-space">部门主管</div>
|
<div class="comonTitle line-space">部门主管</div>
|
||||||
@ -59,12 +148,11 @@
|
|||||||
<dialog-personnel
|
<dialog-personnel
|
||||||
v-if="showDialogPersonnel"
|
v-if="showDialogPersonnel"
|
||||||
title="更换智能绩效主管理员"
|
title="更换智能绩效主管理员"
|
||||||
:len="1"
|
:len=1
|
||||||
:value.sync='depIds'
|
|
||||||
:isShow.sync='showDialogPersonnel'
|
:isShow.sync='showDialogPersonnel'
|
||||||
:showDataList.sync='showData'
|
|
||||||
@cb="handleDialogSubmitDepart"
|
@cb="handleDialogSubmitDepart"
|
||||||
></dialog-personnel>
|
></dialog-personnel>
|
||||||
|
|
||||||
<popup-right
|
<popup-right
|
||||||
v-if="showPopupAddSub"
|
v-if="showPopupAddSub"
|
||||||
@cancel="hundlePopupAddSubHide"
|
@cancel="hundlePopupAddSubHide"
|
||||||
@ -225,7 +313,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import dialogPersonnel from '@/components/getPersonnel'
|
import dialogPersonnel from '@/components/getPersonnel'
|
||||||
import popupRight from '@/components/PopupRight'
|
import popupRight from '@/components/PopupRight'
|
||||||
|
import { apiSetPermissionsInfo, apiSetPermissionsRoleChange, apiSetPermissionsRoleDelete } from '@/api/setPermissions'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
dialogPersonnel,
|
dialogPersonnel,
|
||||||
@ -233,13 +321,18 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
mainData: {
|
||||||
|
masterFirst: {
|
||||||
|
headerUrl: '',
|
||||||
|
name: '',
|
||||||
|
id: ''
|
||||||
|
}, // 第一个主管理员
|
||||||
|
childPm: [], // 子管理员
|
||||||
|
masterPM: [], // 主管理员
|
||||||
|
boss: []// 老板
|
||||||
|
},
|
||||||
url: '',
|
url: '',
|
||||||
showDialogPersonnel: false,
|
showDialogPersonnel: false,
|
||||||
tableDataList: [],
|
|
||||||
showData: {
|
|
||||||
list: []
|
|
||||||
},
|
|
||||||
depIds: '22',
|
|
||||||
showPopupAddSub: false, // 显示添加子管理员
|
showPopupAddSub: false, // 显示添加子管理员
|
||||||
popupFromSub: {
|
popupFromSub: {
|
||||||
showChoosePerformance: true, // 选择绩效选择
|
showChoosePerformance: true, // 选择绩效选择
|
||||||
@ -263,9 +356,62 @@ export default {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created () {
|
||||||
|
this.handleGetSetPageInfo()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSubGetTableStyle () {
|
handleGetChildeModel (type) {
|
||||||
return { 'background-color': '#f5f4f5', 'text-align': 'center' }
|
let modelStr = ''
|
||||||
|
switch (type) {
|
||||||
|
case 1:
|
||||||
|
modelStr = '绩效考核'
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
return modelStr
|
||||||
|
},
|
||||||
|
handleGetChildeMangeRange (type) {
|
||||||
|
let typeStr = ''
|
||||||
|
switch (type) {
|
||||||
|
case 0:
|
||||||
|
typeStr = '全公司'
|
||||||
|
break
|
||||||
|
case 1:
|
||||||
|
typeStr = '所在部门及以下部门'
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
typeStr = '特定部门'
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
return typeStr
|
||||||
|
},
|
||||||
|
handleGetChildeGroupPermissions (type) {
|
||||||
|
// 考评组权限
|
||||||
|
let typeStr = ''
|
||||||
|
switch (type) {
|
||||||
|
case 0:
|
||||||
|
typeStr = '全部考评组权限'
|
||||||
|
break
|
||||||
|
case 1:
|
||||||
|
typeStr = '特定考评组权限'
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
return typeStr
|
||||||
|
},
|
||||||
|
handleSubGetTableStyle (row) {
|
||||||
|
let alignStr = 'center'
|
||||||
|
if (row.columnIndex === 1) {
|
||||||
|
alignStr = 'left'
|
||||||
|
}
|
||||||
|
return { 'height': '40px', 'background-color': '#f5f4f5', 'text-align': alignStr }
|
||||||
|
},
|
||||||
|
handleSubGetTableCellStyle () {
|
||||||
|
return { 'padding': '5px 0px !important' }
|
||||||
},
|
},
|
||||||
handleChangeDirector () {
|
handleChangeDirector () {
|
||||||
// 更换主管
|
// 更换主管
|
||||||
@ -283,13 +429,43 @@ export default {
|
|||||||
let msg = '是否将智能绩效主管理员变更为' + val.title
|
let msg = '是否将智能绩效主管理员变更为' + val.title
|
||||||
this.$confirm(msg, '提示')
|
this.$confirm(msg, '提示')
|
||||||
.then(_ => {
|
.then(_ => {
|
||||||
this.showDialogPersonnel = false
|
let dicPara = {
|
||||||
|
departmentLevel: 'MASTER_PM',
|
||||||
|
staffId: val.value
|
||||||
|
}
|
||||||
|
apiSetPermissionsRoleChange(dicPara).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.showDialogPersonnel = false
|
||||||
|
this.$router.push({name: 'workbench-home'})
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.catch(_ => { })
|
.catch(_ => { })
|
||||||
},
|
},
|
||||||
handleSubAdd () {
|
handleSubAdd () {
|
||||||
this.showPopupAddSub = true
|
this.showPopupAddSub = true
|
||||||
},
|
},
|
||||||
|
handleChildEdit (row) {
|
||||||
|
console.log('子管理员编辑', row)
|
||||||
|
},
|
||||||
|
handleChildDelete (row) {
|
||||||
|
// 删除子管理员
|
||||||
|
this.$confirm('确认删除该管理员,删除后该子管理员将失去智能绩效的子管理员权限', '提示').then(_ => {
|
||||||
|
console.log('删除子管理员', row)
|
||||||
|
apiSetPermissionsRoleDelete({id: row.id}).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
// 删除成功
|
||||||
|
this.$message({
|
||||||
|
message: '删除子管理成功',
|
||||||
|
type: 'success'
|
||||||
|
}) // 刷新页面信息
|
||||||
|
this.handleGetSetPageInfo()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(_ => {
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
hundlePopupAddSubHide () {
|
hundlePopupAddSubHide () {
|
||||||
this.showPopupAddSub = false
|
this.showPopupAddSub = false
|
||||||
},
|
},
|
||||||
@ -320,6 +496,22 @@ export default {
|
|||||||
},
|
},
|
||||||
handlePopupChooseGroup () {
|
handlePopupChooseGroup () {
|
||||||
// 特定考评组 选择
|
// 特定考评组 选择
|
||||||
|
},
|
||||||
|
handleGetSetPageInfo () {
|
||||||
|
let paraDic = {
|
||||||
|
currPage: 1,
|
||||||
|
pageSize: 400
|
||||||
|
}
|
||||||
|
apiSetPermissionsInfo(paraDic).then(res => {
|
||||||
|
if (res.code !== 200) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.mainData.masterFirst = res.data.masterPM.length > 0 ? res.data.masterPM[0] : {}
|
||||||
|
this.mainData.childPm = res.data.childPm
|
||||||
|
this.mainData.boss = res.data.boss
|
||||||
|
this.masterPM = res.data.masterPM
|
||||||
|
console.log('权限设置页面====---', res)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -331,12 +523,6 @@ export default {
|
|||||||
.line-space {
|
.line-space {
|
||||||
margin-bottom: 18px;
|
margin-bottom: 18px;
|
||||||
}
|
}
|
||||||
.el-image {
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
border-radius: 20px;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
&-main {
|
&-main {
|
||||||
&-header {
|
&-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -349,7 +535,6 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
height: 72px;
|
height: 72px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
line-height: 72px;
|
|
||||||
&-name {
|
&-name {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
@ -362,6 +547,19 @@ export default {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&-ceo {
|
||||||
|
align-content: start;
|
||||||
|
&-info {
|
||||||
|
display: flex;
|
||||||
|
height: 72px;
|
||||||
|
&-item {
|
||||||
|
display: flex;
|
||||||
|
width: 100px;
|
||||||
|
align-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.popup {
|
.popup {
|
||||||
.el-radio-group {
|
.el-radio-group {
|
||||||
line-height: inherit !important;
|
line-height: inherit !important;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user