| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 模型列表 --> |
| | | <el-collapse-transition> |
| | | <div v-show="isExpand"> |
| | |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="可见范围" prop="startUserIds" min-width="100"> |
| | | <el-table-column label="可见范围" prop="startUserIds" min-width="150"> |
| | | <template #default="scope"> |
| | | <el-text v-if="!scope.row.startUsers || scope.row.startUsers.length === 0"> |
| | | 全部可见 |
| | |
| | | </el-text> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="表单信息" prop="formType" min-width="200"> |
| | | <el-table-column label="表单信息" prop="formType" min-width="150"> |
| | | <template #default="scope"> |
| | | <el-button |
| | | v-if="scope.row.formType === BpmModelFormType.NORMAL" |
| | |
| | | :disabled="!isManagerUser(scope.row)" |
| | | > |
| | | 修改 |
| | | </el-button> |
| | | <el-button |
| | | link |
| | | class="!ml-5px" |
| | | type="primary" |
| | | @click="handleDesign(scope.row)" |
| | | v-hasPermi="['bpm:model:update']" |
| | | :disabled="!isManagerUser(scope.row)" |
| | | > |
| | | 设计 |
| | | </el-button> |
| | | <el-button |
| | | link |
| | |
| | | </template> |
| | | </Dialog> |
| | | |
| | | <!-- 弹窗:表单详情 --> |
| | | <Dialog title="表单详情" v-model="formDetailVisible" width="800"> |
| | | <form-create :rule="formDetailPreview.rule" :option="formDetailPreview.option" /> |
| | | </Dialog> |
| | | |
| | | <!-- 表单弹窗:添加流程模型 --> |
| | | <ModelForm :categoryId="categoryInfo.code" ref="modelFormRef" @success="emit('success')" /> |
| | | </template> |
| | |
| | | import * as ModelApi from '@/api/bpm/model' |
| | | import * as FormApi from '@/api/bpm/form' |
| | | import { setConfAndFields2 } from '@/utils/formCreate' |
| | | import { BpmModelFormType, BpmModelType } from '@/utils/constants' |
| | | import { BpmModelFormType } from '@/utils/constants' |
| | | import { checkPermi } from '@/utils/permission' |
| | | import { useUserStoreWithOut } from '@/store/modules/user' |
| | | import { useAppStore } from '@/store/modules/app' |
| | |
| | | // 刷新列表 |
| | | emit('success') |
| | | } catch {} |
| | | } |
| | | |
| | | /** 设计流程 */ |
| | | const handleDesign = (row: any) => { |
| | | if (row.type == BpmModelType.BPMN) { |
| | | push({ |
| | | name: 'BpmModelEditor', |
| | | query: { |
| | | modelId: row.id |
| | | } |
| | | }) |
| | | } else { |
| | | push({ |
| | | name: 'SimpleModelDesign', |
| | | query: { |
| | | modelId: row.id |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | /** 发布流程 */ |
| | |
| | | /** 添加流程模型弹窗 */ |
| | | const modelFormRef = ref() |
| | | const openModelForm = (type: string, id?: number) => { |
| | | modelFormRef.value.open(type, id) |
| | | if (type === 'create') { |
| | | push({ name: 'BpmModelCreate' }) |
| | | } else { |
| | | push({ |
| | | name: 'BpmModelUpdate', |
| | | params: { id } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | watch(() => props.categoryInfo.modelList, updateModeList, { immediate: true }) |