Merge branch 'feature/bpm' of https://gitee.com/yudaocode/yudao-ui-admin-vue3 into feature/bpm

pull/683/MERGE
jason 2025-01-24 23:36:43 +08:00
commit e3db7d3014
10 changed files with 230 additions and 89 deletions

View File

@ -16,7 +16,8 @@ import {
FieldPermissionType, FieldPermissionType,
ListenerParam ListenerParam
} from './consts' } from './consts'
import { parseFormFields } from '@/components/FormCreate/src/utils/index' import { parseFormFields } from '@/components/FormCreate/src/utils'
export function useWatchNode(props: { flowNode: SimpleFlowNode }): Ref<SimpleFlowNode> { export function useWatchNode(props: { flowNode: SimpleFlowNode }): Ref<SimpleFlowNode> {
const node = ref<SimpleFlowNode>(props.flowNode) const node = ref<SimpleFlowNode>(props.flowNode)
watch( watch(
@ -46,7 +47,7 @@ export function useFormFieldsPermission(defaultPermission: FieldPermissionType)
// 字段权限配置. 需要有 field, title, permissioin 属性 // 字段权限配置. 需要有 field, title, permissioin 属性
const fieldsPermissionConfig = ref<Array<Record<string, any>>>([]) const fieldsPermissionConfig = ref<Array<Record<string, any>>>([])
const formType = inject<Ref<number|undefined>>('formType', ref()) // 表单类型 const formType = inject<Ref<number | undefined>>('formType', ref()) // 表单类型
const formFields = inject<Ref<string[]>>('formFields', ref([])) // 流程表单字段 const formFields = inject<Ref<string[]>>('formFields', ref([])) // 流程表单字段
@ -108,7 +109,7 @@ export function useFormFieldsPermission(defaultPermission: FieldPermissionType)
* @description * @description
*/ */
export function useFormFields() { export function useFormFields() {
const formFields = inject<Ref<string[]>>('formFields',ref([])) // 流程表单字段 const formFields = inject<Ref<string[]>>('formFields', ref([])) // 流程表单字段
return parseFormCreateFields(unref(formFields)) return parseFormCreateFields(unref(formFields))
} }
@ -178,7 +179,7 @@ export function useNodeForm(nodeType: NodeType) {
const postOptions = inject<Ref<PostApi.PostVO[]>>('postList', ref([])) // 岗位列表 const postOptions = inject<Ref<PostApi.PostVO[]>>('postList', ref([])) // 岗位列表
const userOptions = inject<Ref<UserApi.UserVO[]>>('userList', ref([])) // 用户列表 const userOptions = inject<Ref<UserApi.UserVO[]>>('userList', ref([])) // 用户列表
const deptOptions = inject<Ref<DeptApi.DeptVO[]>>('deptList', ref([])) // 部门列表 const deptOptions = inject<Ref<DeptApi.DeptVO[]>>('deptList', ref([])) // 部门列表
const userGroupOptions = inject<Ref<UserGroupApi.UserGroupVO[]>>('userGroupList',ref([])) // 用户组列表 const userGroupOptions = inject<Ref<UserGroupApi.UserGroupVO[]>>('userGroupList', ref([])) // 用户组列表
const deptTreeOptions = inject('deptTree', ref()) // 部门树 const deptTreeOptions = inject('deptTree', ref()) // 部门树
const formFields = inject<Ref<string[]>>('formFields', ref([])) // 流程表单字段 const formFields = inject<Ref<string[]>>('formFields', ref([])) // 流程表单字段
const configForm = ref<UserTaskFormType | CopyTaskFormType>() const configForm = ref<UserTaskFormType | CopyTaskFormType>()

View File

@ -9,7 +9,6 @@
]" ]"
> >
<div class="node-title-container"> <div class="node-title-container">
<!-- TODO @芋艿 需要更换图标 -->
<div class="node-title-icon delay-node"><span class="iconfont icon-delay"></span></div> <div class="node-title-icon delay-node"><span class="iconfont icon-delay"></span></div>
<input <input
v-if="!readonly && showInput" v-if="!readonly && showInput"

View File

@ -1,6 +1,10 @@
<template> <template>
<div class="panel-tab__content"> <div class="panel-tab__content">
<el-radio-group v-model="approveMethod" @change="onApproveMethodChange"> <el-radio-group
v-if="type === 'UserTask'"
v-model="approveMethod"
@change="onApproveMethodChange"
>
<div class="flex-col"> <div class="flex-col">
<div v-for="(item, index) in APPROVE_METHODS" :key="index"> <div v-for="(item, index) in APPROVE_METHODS" :key="index">
<el-radio :value="item.value" :label="item.value"> <el-radio :value="item.value" :label="item.value">
@ -23,6 +27,9 @@
</div> </div>
</div> </div>
</el-radio-group> </el-radio-group>
<div v-else>
除了UserTask以外节点的多实例待实现
</div>
<!-- 与Simple设计器配置合并保留以前的代码 --> <!-- 与Simple设计器配置合并保留以前的代码 -->
<el-form label-width="90px" style="display: none"> <el-form label-width="90px" style="display: none">
<el-form-item label="快捷配置"> <el-form-item label="快捷配置">
@ -301,19 +308,21 @@ const approveMethod = ref()
const approveRatio = ref(100) const approveRatio = ref(100)
const otherExtensions = ref() const otherExtensions = ref()
const getElementLoopNew = () => { const getElementLoopNew = () => {
const extensionElements = if (props.type === 'UserTask') {
bpmnElement.value.businessObject?.extensionElements ?? const extensionElements =
bpmnInstances().moddle.create('bpmn:ExtensionElements', { values: [] }) bpmnElement.value.businessObject?.extensionElements ??
approveMethod.value = extensionElements.values.filter( bpmnInstances().moddle.create('bpmn:ExtensionElements', { values: [] })
(ex) => ex.$type === `${prefix}:ApproveMethod` approveMethod.value = extensionElements.values.filter(
)?.[0]?.value (ex) => ex.$type === `${prefix}:ApproveMethod`
)?.[0]?.value
otherExtensions.value = otherExtensions.value =
extensionElements.values.filter((ex) => ex.$type !== `${prefix}:ApproveMethod`) ?? [] extensionElements.values.filter((ex) => ex.$type !== `${prefix}:ApproveMethod`) ?? []
if (!approveMethod.value) { if (!approveMethod.value) {
approveMethod.value = ApproveMethodType.SEQUENTIAL_APPROVE approveMethod.value = ApproveMethodType.SEQUENTIAL_APPROVE
updateLoopCharacteristics() updateLoopCharacteristics()
}
} }
} }
const onApproveMethodChange = () => { const onApproveMethodChange = () => {

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="flex items-center h-50px"> <div class="flex items-center h-50px" v-memo="[categoryInfo.name, isCategorySorting]">
<!-- 头部分类名 --> <!-- 头部分类名 -->
<div class="flex items-center"> <div class="flex items-center">
<el-tooltip content="拖动排序" v-if="isCategorySorting"> <el-tooltip content="拖动排序" v-if="isCategorySorting">
@ -13,7 +13,7 @@
<div class="color-gray-600 text-16px"> ({{ categoryInfo.modelList?.length || 0 }}) </div> <div class="color-gray-600 text-16px"> ({{ categoryInfo.modelList?.length || 0 }}) </div>
</div> </div>
<!-- 头部操作 --> <!-- 头部操作 -->
<div class="flex-1 flex" v-if="!isCategorySorting"> <div class="flex-1 flex" v-show="!isCategorySorting">
<div <div
v-if="categoryInfo.modelList.length > 0" v-if="categoryInfo.modelList.length > 0"
class="ml-20px flex items-center" class="ml-20px flex items-center"
@ -69,16 +69,17 @@
<el-collapse-transition> <el-collapse-transition>
<div v-show="isExpand"> <div v-show="isExpand">
<el-table <el-table
v-if="modelList && modelList.length > 0"
:class="categoryInfo.name" :class="categoryInfo.name"
ref="tableRef" ref="tableRef"
:header-cell-style="{ backgroundColor: isDark ? '' : '#edeff0', paddingLeft: '10px' }"
:cell-style="{ paddingLeft: '10px' }"
:row-style="{ height: '68px' }"
:data="modelList" :data="modelList"
row-key="id" row-key="id"
:header-cell-style="tableHeaderStyle"
:cell-style="tableCellStyle"
:row-style="{ height: '68px' }"
> >
<el-table-column label="流程名" prop="name" min-width="150"> <el-table-column label="流程名" prop="name" min-width="150">
<template #default="scope"> <template #default="{ row }">
<div class="flex items-center"> <div class="flex items-center">
<el-tooltip content="拖动排序" v-if="isModelSorting"> <el-tooltip content="拖动排序" v-if="isModelSorting">
<Icon <Icon
@ -86,27 +87,25 @@
class="drag-icon cursor-move text-#8a909c mr-10px" class="drag-icon cursor-move text-#8a909c mr-10px"
/> />
</el-tooltip> </el-tooltip>
<el-image :src="scope.row.icon" class="h-38px w-38px mr-10px rounded" /> <el-image v-if="row.icon" :src="row.icon" class="h-38px w-38px mr-10px rounded" />
{{ scope.row.name }} {{ row.name }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="可见范围" prop="startUserIds" min-width="150"> <el-table-column label="可见范围" prop="startUserIds" min-width="150">
<template #default="scope"> <template #default="{ row }">
<el-text v-if="!scope.row.startUsers || scope.row.startUsers.length === 0"> <el-text v-if="!row.startUsers?.length"> </el-text>
全部可见 <el-text v-else-if="row.startUsers.length === 1">
</el-text> {{ row.startUsers[0].nickname }}
<el-text v-else-if="scope.row.startUsers.length == 1">
{{ scope.row.startUsers[0].nickname }}
</el-text> </el-text>
<el-text v-else> <el-text v-else>
<el-tooltip <el-tooltip
class="box-item" class="box-item"
effect="dark" effect="dark"
placement="top" placement="top"
:content="scope.row.startUsers.map((user: any) => user.nickname).join('、')" :content="row.startUsers.map((user: any) => user.nickname).join('、')"
> >
{{ scope.row.startUsers[0].nickname }} {{ scope.row.startUsers.length }} 人可见 {{ row.startUsers[0].nickname }} {{ row.startUsers.length }} 人可见
</el-tooltip> </el-tooltip>
</el-text> </el-text>
</template> </template>
@ -245,7 +244,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { CategoryApi, CategoryVO } from '@/api/bpm/category' import { CategoryApi, CategoryVO } from '@/api/bpm/category'
import Sortable from 'sortablejs' import Sortable from 'sortablejs'
import { propTypes } from '@/utils/propTypes'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import * as ModelApi from '@/api/bpm/model' import * as ModelApi from '@/api/bpm/model'
import * as FormApi from '@/api/bpm/form' import * as FormApi from '@/api/bpm/form'
@ -254,15 +252,49 @@ import { BpmModelFormType } from '@/utils/constants'
import { checkPermi } from '@/utils/permission' import { checkPermi } from '@/utils/permission'
import { useUserStoreWithOut } from '@/store/modules/user' import { useUserStoreWithOut } from '@/store/modules/user'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { cloneDeep } from 'lodash-es' import { cloneDeep, isEqual } from 'lodash-es'
import { useTagsView } from '@/hooks/web/useTagsView' import { useTagsView } from '@/hooks/web/useTagsView'
import { useDebounceFn } from '@vueuse/core'
defineOptions({ name: 'BpmModel' }) defineOptions({ name: 'BpmModel' })
const props = defineProps({ // Props
categoryInfo: propTypes.object.def([]), // interface UserInfo {
isCategorySorting: propTypes.bool.def(false) // nickname: string
}) [key: string]: any
}
interface ProcessDefinition {
deploymentTime: string
version: number
suspensionState: number
}
interface ModelInfo {
id: number
name: string
icon?: string
startUsers?: UserInfo[]
processDefinition?: ProcessDefinition
formType?: number
formId?: number
formName?: string
formCustomCreatePath?: string
managerUserIds?: number[]
[key: string]: any
}
interface CategoryInfoProps {
id: number
name: string
modelList: ModelInfo[]
}
const props = defineProps<{
categoryInfo: CategoryInfoProps
isCategorySorting: boolean
}>()
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
@ -271,10 +303,20 @@ const userStore = useUserStoreWithOut() // 用户信息缓存
const isDark = computed(() => useAppStore().getIsDark) // const isDark = computed(() => useAppStore().getIsDark) //
const isModelSorting = ref(false) // const isModelSorting = ref(false) //
const originalData: any = ref([]) // const originalData = ref<ModelInfo[]>([]) //
const modelList: any = ref([]) // const modelList = ref<ModelInfo[]>([]) //
const isExpand = ref(false) // const isExpand = ref(false) //
// 使 computed
const tableHeaderStyle = computed(() => ({
backgroundColor: isDark.value ? '' : '#edeff0',
paddingLeft: '10px'
}))
const tableCellStyle = computed(() => ({
paddingLeft: '10px'
}))
/** 权限校验:通过 computed 解决列表的卡顿问题 */ /** 权限校验:通过 computed 解决列表的卡顿问题 */
const hasPermiUpdate = computed(() => { const hasPermiUpdate = computed(() => {
return checkPermi(['bpm:model:update']) return checkPermi(['bpm:model:update'])
@ -449,14 +491,15 @@ const handleModelSortCancel = () => {
/** 创建拖拽实例 */ /** 创建拖拽实例 */
const tableRef = ref() const tableRef = ref()
const initSort = () => { const initSort = useDebounceFn(() => {
const table = document.querySelector(`.${props.categoryInfo.name} .el-table__body-wrapper tbody`) const table = document.querySelector(`.${props.categoryInfo.name} .el-table__body-wrapper tbody`)
if (!table) return
Sortable.create(table, { Sortable.create(table, {
group: 'shared', group: 'shared',
animation: 150, animation: 150,
draggable: '.el-table__row', draggable: '.el-table__row',
handle: '.drag-icon', handle: '.drag-icon',
//
onEnd: ({ newDraggableIndex, oldDraggableIndex }) => { onEnd: ({ newDraggableIndex, oldDraggableIndex }) => {
if (oldDraggableIndex !== newDraggableIndex) { if (oldDraggableIndex !== newDraggableIndex) {
modelList.value.splice( modelList.value.splice(
@ -467,15 +510,18 @@ const initSort = () => {
} }
} }
}) })
} }, 200)
/** 更新 modelList 模型列表 */ /** 更新 modelList 模型列表 */
const updateModeList = () => { const updateModeList = useDebounceFn(() => {
modelList.value = cloneDeep(props.categoryInfo.modelList) const newModelList = props.categoryInfo.modelList
if (props.categoryInfo.modelList.length > 0) { if (!isEqual(modelList.value, newModelList)) {
isExpand.value = true modelList.value = cloneDeep(newModelList)
if (newModelList?.length > 0) {
isExpand.value = true
}
} }
} }, 100)
/** 重命名弹窗确定 */ /** 重命名弹窗确定 */
const renameCategoryVisible = ref(false) const renameCategoryVisible = ref(false)
@ -526,14 +572,15 @@ const openModelForm = async (type: string, id?: number) => {
} }
} }
watch(() => props.categoryInfo.modelList, updateModeList, { immediate: true }) watchEffect(() => {
watch( if (props.categoryInfo?.modelList) {
() => props.isCategorySorting, updateModeList()
(val) => { }
if (val) isExpand.value = false
}, if (props.isCategorySorting) {
{ immediate: true } isExpand.value = false
) }
})
</script> </script>
<style lang="scss"> <style lang="scss">
@ -550,10 +597,16 @@ watch(
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
:deep() { .category-draggable-model {
.el-table__cell { :deep(.el-table__cell) {
overflow: hidden; overflow: hidden;
border-bottom: none !important; border-bottom: none !important;
} }
//
:deep(.el-table__body) {
will-change: transform;
transform: translateZ(0);
}
} }
</style> </style>

View File

@ -75,12 +75,12 @@
</el-radio-group> </el-radio-group>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item v-if="modelData.customTitleSetting" class="mb-20px"> <el-form-item v-if="modelData.titleSetting" class="mb-20px">
<template #label> <template #label>
<el-text size="large" tag="b">标题设置</el-text> <el-text size="large" tag="b">标题设置</el-text>
</template> </template>
<div class="flex flex-col"> <div class="flex flex-col">
<el-radio-group v-model="modelData.customTitleSetting.enable"> <el-radio-group v-model="modelData.titleSetting.enable">
<div class="flex flex-col"> <div class="flex flex-col">
<el-radio :value="false" <el-radio :value="false"
>系统默认 <el-text type="info"> 展示流程名称 </el-text></el-radio >系统默认 <el-text type="info"> 展示流程名称 </el-text></el-radio
@ -96,18 +96,50 @@
</div> </div>
</el-radio-group> </el-radio-group>
<el-mention <el-mention
v-if="modelData.customTitleSetting.enable" v-if="modelData.titleSetting.enable"
v-model="modelData.customTitleSetting.title" v-model="modelData.titleSetting.title"
type="textarea" type="textarea"
prefix="{" prefix="{"
split="}" split="}"
whole whole
:options="formFieldOptions" :options="formFieldOptions4Title"
placeholder="请插入表单字段或输入文本" placeholder="请插入表单字段(输入 '{' 可以选择表单字段)或输入文本"
class="w-600px!" class="w-600px!"
/> />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item
v-if="modelData.summarySetting && modelData.formType === BpmModelFormType.NORMAL"
class="mb-20px"
>
<template #label>
<el-text size="large" tag="b">摘要设置</el-text>
</template>
<div class="flex flex-col">
<el-radio-group v-model="modelData.summarySetting.enable">
<div class="flex flex-col">
<el-radio :value="false">
系统默认 <el-text type="info"> 展示表单前 3 个字段 </el-text>
</el-radio>
<el-radio :value="true"> 自定义摘要 </el-radio>
</div>
</el-radio-group>
<el-select
class="w-500px!"
v-if="modelData.summarySetting.enable"
v-model="modelData.summarySetting.summary"
multiple
placeholder="请选择要展示的表单字段"
>
<el-option
v-for="item in formFieldOptions4Summary"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</el-form-item>
</el-form> </el-form>
</template> </template>
@ -174,21 +206,30 @@ const numberExample = computed(() => {
}) })
/** 表单选项 */ /** 表单选项 */
const formField = ref<Array<{ field: ProcessVariableEnum; title: string }>>([]) const formField = ref<Array<{ field: string; title: string }>>([])
const formFieldOptions = computed(() => { const formFieldOptions4Title = computed(() => {
let cloneFormField = formField.value.map((item) => {
return {
label: item.title,
value: item.field
}
})
// ID // ID
formField.value.unshift({ cloneFormField.unshift({
field: ProcessVariableEnum.PROCESS_DEFINITION_NAME, label: ProcessVariableEnum.PROCESS_DEFINITION_NAME,
title: '流程名称' value: '流程名称'
}) })
formField.value.unshift({ cloneFormField.unshift({
field: ProcessVariableEnum.START_TIME, label: ProcessVariableEnum.START_TIME,
title: '发起时间' value: '发起时间'
}) })
formField.value.unshift({ cloneFormField.unshift({
field: ProcessVariableEnum.START_USER_ID, label: ProcessVariableEnum.START_USER_ID,
title: '发起人' value: '发起人'
}) })
return cloneFormField
})
const formFieldOptions4Summary = computed(() => {
return formField.value.map((item) => { return formField.value.map((item) => {
return { return {
label: item.title, label: item.title,
@ -211,12 +252,18 @@ const initData = () => {
if (!modelData.value.autoApprovalType) { if (!modelData.value.autoApprovalType) {
modelData.value.autoApprovalType = BpmAutoApproveType.NONE modelData.value.autoApprovalType = BpmAutoApproveType.NONE
} }
if (!modelData.value.customTitleSetting) { if (!modelData.value.titleSetting) {
modelData.value.customTitleSetting = { modelData.value.titleSetting = {
enable: false, enable: false,
title: '' title: ''
} }
} }
if (!modelData.value.summarySetting) {
modelData.value.summarySetting = {
enable: false,
summary: []
}
}
} }
defineExpose({ initData }) defineExpose({ initData })
@ -224,9 +271,9 @@ defineExpose({ initData })
watch( watch(
() => modelData.value.formId, () => modelData.value.formId,
async (newFormId) => { async (newFormId) => {
if (newFormId && modelData.value.formType === BpmModelFormType.CUSTOM) { if (newFormId && modelData.value.formType === BpmModelFormType.NORMAL) {
const data = await FormApi.getForm(newFormId) const data = await FormApi.getForm(newFormId)
const result: Array<{ field: ProcessVariableEnum; title: string }> = [] const result: Array<{ field: string; title: string }> = []
if (data.fields) { if (data.fields) {
data.fields.forEach((fieldStr: string) => { data.fields.forEach((fieldStr: string) => {
parseFormFields(JSON.parse(fieldStr), result) parseFormFields(JSON.parse(fieldStr), result)

View File

@ -155,9 +155,13 @@ const formData: any = ref({
length: 5 length: 5
}, },
autoApprovalType: BpmAutoApproveType.NONE, autoApprovalType: BpmAutoApproveType.NONE,
customTitleSetting: { titleSetting: {
enable: false, enable: false,
title: '' title: ''
},
summarySetting: {
enable: false,
summary: []
} }
}) })

View File

@ -130,6 +130,15 @@
<ContentWrap> <ContentWrap>
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column label="流程名称" align="center" prop="name" min-width="200px" fixed="left" /> <el-table-column label="流程名称" align="center" prop="name" min-width="200px" fixed="left" />
<el-table-column label="摘要" prop="summary" min-width="180" fixed="left">
<template #default="scope">
<div class="flex flex-col" v-if="scope.row.summary && scope.row.summary.length > 0">
<div v-for="(item, index) in scope.row.summary" :key="index">
<el-text type="info"> {{ item.key }} : {{ item.value }} </el-text>
</div>
</div>
</template>
</el-table-column>
<el-table-column <el-table-column
label="流程分类" label="流程分类"
align="center" align="center"

View File

@ -44,6 +44,7 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<!-- TODO 芋艿增加摘要 -->
<el-table-column align="center" label="流程名" prop="processInstanceName" min-width="180" /> <el-table-column align="center" label="流程名" prop="processInstanceName" min-width="180" />
<el-table-column <el-table-column
align="center" align="center"

View File

@ -64,7 +64,7 @@
:value="dict.value" :value="dict.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 高级筛选 --> <!-- 高级筛选 -->
<el-form-item :style="{ position: 'absolute', right: '0px' }"> <el-form-item :style="{ position: 'absolute', right: '0px' }">
@ -77,9 +77,9 @@
> >
<template #reference> <template #reference>
<el-button @click="showPopover = !showPopover" > <el-button @click="showPopover = !showPopover" >
<Icon icon="ep:plus" class="mr-5px" />高级筛选 <Icon icon="ep:plus" class="mr-5px" />高级筛选
</el-button> </el-button>
</template> </template>
<el-form-item label="流程发起人" class="bold-label" label-position="top" prop="category"> <el-form-item label="流程发起人" class="bold-label" label-position="top" prop="category">
<el-select <el-select
@ -95,7 +95,7 @@
:value="category.code" :value="category.code"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="发起时间" class="bold-label" label-position="top" prop="createTime"> <el-form-item label="发起时间" class="bold-label" label-position="top" prop="createTime">
<el-date-picker <el-date-picker
v-model="queryParams.createTime" v-model="queryParams.createTime"
@ -122,6 +122,15 @@
<ContentWrap> <ContentWrap>
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column align="center" label="流程" prop="processInstance.name" width="180" /> <el-table-column align="center" label="流程" prop="processInstance.name" width="180" />
<el-table-column label="摘要" prop="summary" min-width="180">
<template #default="scope">
<div class="flex flex-col" v-if="scope.row.summary && scope.row.summary.length > 0">
<div v-for="(item, index) in scope.row.summary" :key="index">
<el-text type="info"> {{ item.key }} : {{ item.value }} </el-text>
</div>
</div>
</template>
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
label="发起人" label="发起人"
@ -195,7 +204,7 @@ const queryParams = reactive({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
name: '', name: '',
category: undefined, category: undefined,
status: undefined, status: undefined,
createTime: [] createTime: []
}) })

View File

@ -60,9 +60,9 @@
> >
<template #reference> <template #reference>
<el-button @click="showPopover = !showPopover" > <el-button @click="showPopover = !showPopover" >
<Icon icon="ep:plus" class="mr-5px" />高级筛选 <Icon icon="ep:plus" class="mr-5px" />高级筛选
</el-button> </el-button>
</template> </template>
<el-form-item label="流程发起人" class="bold-label" label-position="top" prop="category"> <el-form-item label="流程发起人" class="bold-label" label-position="top" prop="category">
<el-select <el-select
@ -78,7 +78,7 @@
:value="category.code" :value="category.code"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="发起时间" class="bold-label" label-position="top" prop="createTime"> <el-form-item label="发起时间" class="bold-label" label-position="top" prop="createTime">
<el-date-picker <el-date-picker
v-model="queryParams.createTime" v-model="queryParams.createTime"
@ -105,6 +105,15 @@
<ContentWrap> <ContentWrap>
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column align="center" label="流程" prop="processInstance.name" width="180" /> <el-table-column align="center" label="流程" prop="processInstance.name" width="180" />
<el-table-column label="摘要" prop="summary" min-width="180">
<template #default="scope">
<div class="flex flex-col" v-if="scope.row.summary && scope.row.summary.length > 0">
<div v-for="(item, index) in scope.row.summary" :key="index">
<el-text type="info"> {{ item.key }} : {{ item.value }} </el-text>
</div>
</div>
</template>
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
label="发起人" label="发起人"