|
|
@@ -119,13 +119,36 @@ export default {
|
|
|
this.loading = false
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 判断当前用户是否为超级管理员和高权限角色
|
|
|
+ */
|
|
|
+ isRoleFilter () {
|
|
|
+ const highRoles = this.$store.getters.userInfo.highRoles || [] // 高权限角色
|
|
|
+ const userRole = this.$store.getters.userInfo.role || [] // 用户权限角色
|
|
|
+ let isHighRole = false
|
|
|
+ userRole.forEach(el => {
|
|
|
+ const roleAlias = el.alias
|
|
|
+ if (highRoles.includes(roleAlias)) {
|
|
|
+ isHighRole = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return this.$store.getters.isSuper || isHighRole
|
|
|
+ },
|
|
|
/**
|
|
|
* 获取格式化参数
|
|
|
*/
|
|
|
getSearchFormData () {
|
|
|
let paramjson = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
|
|
|
paramjson['Q^status^NE'] = '已暂存'
|
|
|
+ if (this.isRoleFilter()) { // 超级管理员和高权限角色不做审批人过滤
|
|
|
+ } else {
|
|
|
+ /* 审批人过滤
|
|
|
+ const { userId } = this.$store.getters || ''
|
|
|
+ if (userId) {
|
|
|
+ paramjson['Q^executor_^S'] = userId
|
|
|
+ }
|
|
|
+ */
|
|
|
+ }
|
|
|
return ActionUtils.formatParams(
|
|
|
// this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {},
|
|
|
paramjson,
|