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