任务分配规则页面vxe操作栏显示隐藏bug

This commit is contained in:
gexinzhineng/gxzn27 2023-03-02 16:46:39 +08:00
parent 31505ae35b
commit c5cb59f4ba
2 changed files with 18 additions and 2 deletions

View File

@ -1,7 +1,7 @@
<template>
<ContentWrap>
<!-- 列表 -->
<XTable @register="registerTable">
<XTable @register="registerTable" ref="xGrid">
<template #options_default="{ row }">
<span :key="option" v-for="option in row.options">
<el-tag>
@ -145,11 +145,12 @@ import { listSimpleUserGroupsApi } from '@/api/bpm/userGroup'
import { listSimpleDeptApi } from '@/api/system/dept'
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
import { handleTree, defaultProps } from '@/utils/tree'
import { allSchemas, rules } from './taskAssignRule.data'
import { allSchemas, rules, idShowActionClick } from './taskAssignRule.data'
const { t } = useI18n() //
const message = useMessage() //
const { query } = useRoute()
const xGrid = ref()
// ========== ==========
@ -165,6 +166,8 @@ const taskAssignScriptDictDatas = getDictOptions(DICT_TYPE.BPM_TASK_ASSIGN_SCRIP
const modelId = query.modelId
// processDefinitionId
const processDefinitionId = query.processDefinitionId
let isShow = idShowActionClick(modelId)
//
const queryParams = reactive({
modelId: modelId,
@ -346,5 +349,10 @@ onMounted(() => {
listSimpleUserGroupsApi().then((data) => {
userGroupOptions.value.push(...data)
})
if (!isShow) {
setTimeout(() => {
xGrid.value.Ref.hideColumn('actionbtns')
}, 100)
}
})
</script>

View File

@ -43,4 +43,12 @@ const crudSchemas = reactive<VxeCrudSchema>({
}
]
})
export const idShowActionClick = (modelId?: any) => {
if (modelId) {
return true
} else {
return false
}
}
export const { allSchemas } = useVxeCrudSchemas(crudSchemas)