Skip to content

Commit c5cb59f

Browse files
committed
任务分配规则页面vxe操作栏显示隐藏bug
1 parent 31505ae commit c5cb59f

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

src/views/bpm/taskAssignRule/index.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<ContentWrap>
33
<!-- 列表 -->
4-
<XTable @register="registerTable">
4+
<XTable @register="registerTable" ref="xGrid">
55
<template #options_default="{ row }">
66
<span :key="option" v-for="option in row.options">
77
<el-tag>
@@ -145,11 +145,12 @@ import { listSimpleUserGroupsApi } from '@/api/bpm/userGroup'
145145
import { listSimpleDeptApi } from '@/api/system/dept'
146146
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
147147
import { handleTree, defaultProps } from '@/utils/tree'
148-
import { allSchemas, rules } from './taskAssignRule.data'
148+
import { allSchemas, rules, idShowActionClick } from './taskAssignRule.data'
149149
150150
const { t } = useI18n() // 国际化
151151
const message = useMessage() // 消息弹窗
152152
const { query } = useRoute()
153+
const xGrid = ref()
153154
154155
// ========== 列表相关 ==========
155156
@@ -165,6 +166,8 @@ const taskAssignScriptDictDatas = getDictOptions(DICT_TYPE.BPM_TASK_ASSIGN_SCRIP
165166
const modelId = query.modelId
166167
// 流程定义的编号。如果 processDefinitionId 非空,则用于流程定义的查看,不支持配置
167168
const processDefinitionId = query.processDefinitionId
169+
let isShow = idShowActionClick(modelId)
170+
168171
// 查询参数
169172
const queryParams = reactive({
170173
modelId: modelId,
@@ -346,5 +349,10 @@ onMounted(() => {
346349
listSimpleUserGroupsApi().then((data) => {
347350
userGroupOptions.value.push(...data)
348351
})
352+
if (!isShow) {
353+
setTimeout(() => {
354+
xGrid.value.Ref.hideColumn('actionbtns')
355+
}, 100)
356+
}
349357
})
350358
</script>

src/views/bpm/taskAssignRule/taskAssignRule.data.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,12 @@ const crudSchemas = reactive<VxeCrudSchema>({
4343
}
4444
]
4545
})
46+
47+
export const idShowActionClick = (modelId?: any) => {
48+
if (modelId) {
49+
return true
50+
} else {
51+
return false
52+
}
53+
}
4654
export const { allSchemas } = useVxeCrudSchemas(crudSchemas)

0 commit comments

Comments
 (0)