feat: 批量去除 vo
This commit is contained in:
@@ -26,17 +26,23 @@ import ProcessDefinitionDetail from './modules/form.vue';
|
||||
|
||||
defineOptions({ name: 'BpmProcessInstanceCreate' });
|
||||
|
||||
const route = useRoute(); // 路由
|
||||
const route = useRoute();
|
||||
|
||||
const searchName = ref(''); // 当前搜索关键字
|
||||
const isSearching = ref(false); // 是否处于搜索状态
|
||||
const processInstanceId: any = route.query.processInstanceId; // 流程实例编号。场景:重新发起时
|
||||
const loading = ref(true); // 加载中
|
||||
const categoryList: any = ref([]); // 分类的列表
|
||||
const activeCategory = ref(''); // 当前选中的分类
|
||||
const processDefinitionList = ref<
|
||||
BpmProcessDefinitionApi.ProcessDefinitionVO[]
|
||||
>([]); // 流程定义的列表
|
||||
// 当前搜索关键字
|
||||
const searchName = ref('');
|
||||
const isSearching = ref(false);
|
||||
// 流程实例编号。场景:重新发起时
|
||||
const processInstanceId: any = route.query.processInstanceId;
|
||||
// 加载中
|
||||
const loading = ref(true);
|
||||
// 分类的列表
|
||||
const categoryList: any = ref([]);
|
||||
// 当前选中的分类
|
||||
const activeCategory = ref('');
|
||||
// 流程定义的列表
|
||||
const processDefinitionList = ref<BpmProcessDefinitionApi.ProcessDefinition[]>(
|
||||
[],
|
||||
);
|
||||
|
||||
// 实现 groupBy 功能
|
||||
function groupBy(array: any[], key: string) {
|
||||
@@ -112,7 +118,7 @@ async function handleGetProcessDefinitionList() {
|
||||
|
||||
/** 用于存储搜索过滤后的流程定义 */
|
||||
const filteredProcessDefinitionList = ref<
|
||||
BpmProcessDefinitionApi.ProcessDefinitionVO[]
|
||||
BpmProcessDefinitionApi.ProcessDefinition[]
|
||||
>([]);
|
||||
|
||||
/** 搜索流程 */
|
||||
@@ -159,13 +165,13 @@ const processDefinitionGroup = computed(() => {
|
||||
// 按照 categoryList 的顺序重新组织数据
|
||||
const orderedGroup: Record<
|
||||
string,
|
||||
BpmProcessDefinitionApi.ProcessDefinitionVO[]
|
||||
BpmProcessDefinitionApi.ProcessDefinition[]
|
||||
> = {};
|
||||
categoryList.value.forEach((category: BpmCategoryApi.Category) => {
|
||||
if (grouped[category.code]) {
|
||||
orderedGroup[category.code] = grouped[
|
||||
category.code
|
||||
] as BpmProcessDefinitionApi.ProcessDefinitionVO[];
|
||||
] as BpmProcessDefinitionApi.ProcessDefinition[];
|
||||
}
|
||||
});
|
||||
return orderedGroup;
|
||||
@@ -183,7 +189,7 @@ const processDefinitionDetailRef = ref();
|
||||
|
||||
/** 处理选择流程的按钮操作 */
|
||||
async function handleSelect(
|
||||
row: BpmProcessDefinitionApi.ProcessDefinitionVO,
|
||||
row: BpmProcessDefinitionApi.ProcessDefinition,
|
||||
formVariables?: any,
|
||||
) {
|
||||
// 设置选择的流程
|
||||
|
||||
@@ -166,7 +166,7 @@ async function initProcessInfo(row: any, formVariables?: any) {
|
||||
});
|
||||
|
||||
// 加载流程图
|
||||
const processDefinitionDetail: BpmProcessDefinitionApi.ProcessDefinitionVO =
|
||||
const processDefinitionDetail: BpmProcessDefinitionApi.ProcessDefinition =
|
||||
await getProcessDefinition(row.id);
|
||||
if (processDefinitionDetail) {
|
||||
bpmnXML.value = processDefinitionDetail.bpmnXml;
|
||||
|
||||
@@ -63,7 +63,7 @@ enum FieldPermissionType {
|
||||
}
|
||||
|
||||
const processInstanceLoading = ref(false); // 流程实例的加载中
|
||||
const processInstance = ref<BpmProcessInstanceApi.ProcessInstanceVO>(); // 流程实例
|
||||
const processInstance = ref<BpmProcessInstanceApi.ProcessInstance>(); // 流程实例
|
||||
const processDefinition = ref<any>({}); // 流程定义
|
||||
const processModelView = ref<any>({}); // 流程模型视图
|
||||
const operationButtonRef = ref(); // 操作按钮组件 ref
|
||||
|
||||
@@ -36,7 +36,7 @@ const columns = shallowRef([
|
||||
field: 'approver',
|
||||
title: '审批人',
|
||||
slots: {
|
||||
default: ({ row }: { row: BpmTaskApi.TaskManagerVO }) => {
|
||||
default: ({ row }: { row: BpmTaskApi.TaskManager }) => {
|
||||
return row.assigneeUser?.nickname || row.ownerUser?.nickname;
|
||||
},
|
||||
},
|
||||
@@ -106,7 +106,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
cellConfig: {
|
||||
height: 60,
|
||||
},
|
||||
} as VxeTableGridOptions<BpmTaskApi.TaskVO>,
|
||||
} as VxeTableGridOptions<BpmTaskApi.Task>,
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -137,7 +137,7 @@ const taskForm = ref<TaskForm>({
|
||||
* 显示表单详情
|
||||
* @param row 任务数据
|
||||
*/
|
||||
async function showFormDetail(row: BpmTaskApi.TaskManagerVO): Promise<void> {
|
||||
async function showFormDetail(row: BpmTaskApi.TaskManager): Promise<void> {
|
||||
// 设置表单配置和表单字段
|
||||
taskForm.value = {
|
||||
rule: [],
|
||||
|
||||
@@ -27,7 +27,7 @@ function onRefresh() {
|
||||
}
|
||||
|
||||
/** 查看流程实例 */
|
||||
function handleDetail(row: BpmTaskApi.TaskVO) {
|
||||
function handleDetail(row: BpmTaskApi.Task) {
|
||||
router.push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: { id: row.id },
|
||||
@@ -35,7 +35,7 @@ function handleDetail(row: BpmTaskApi.TaskVO) {
|
||||
}
|
||||
|
||||
/** 取消流程实例 */
|
||||
function handleCancel(row: BpmTaskApi.TaskVO) {
|
||||
function handleCancel(row: BpmTaskApi.Task) {
|
||||
prompt({
|
||||
async beforeClose(scope) {
|
||||
if (scope.isConfirm) {
|
||||
@@ -96,7 +96,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
cellConfig: {
|
||||
height: 64,
|
||||
},
|
||||
} as VxeTableGridOptions<BpmTaskApi.TaskVO>,
|
||||
} as VxeTableGridOptions<BpmTaskApi.Task>,
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ function onTaskClick(task: BpmProcessInstanceApi.Task) {
|
||||
}
|
||||
|
||||
/** 查看流程实例 */
|
||||
function handleDetail(row: BpmProcessInstanceApi.ProcessInstanceVO) {
|
||||
function handleDetail(row: BpmProcessInstanceApi.ProcessInstance) {
|
||||
console.warn(row);
|
||||
router.push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
@@ -42,7 +42,7 @@ function handleDetail(row: BpmProcessInstanceApi.ProcessInstanceVO) {
|
||||
}
|
||||
|
||||
/** 取消流程实例 */
|
||||
function handleCancel(row: BpmProcessInstanceApi.ProcessInstanceVO) {
|
||||
function handleCancel(row: BpmProcessInstanceApi.ProcessInstance) {
|
||||
prompt({
|
||||
async beforeClose(scope) {
|
||||
if (scope.isConfirm) {
|
||||
@@ -102,7 +102,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
refresh: { code: 'query' },
|
||||
search: true,
|
||||
},
|
||||
} as VxeTableGridOptions<BpmProcessInstanceApi.ProcessInstanceVO>,
|
||||
} as VxeTableGridOptions<BpmProcessInstanceApi.ProcessInstance>,
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -93,8 +93,8 @@ export function useGridFormSchema(
|
||||
/** 列表的字段 */
|
||||
export function useGridColumns(
|
||||
formFields: any[] = [],
|
||||
): VxeTableGridOptions<BpmProcessInstanceApi.ProcessInstanceVO>['columns'] {
|
||||
const baseColumns: VxeGridPropTypes.Columns<BpmProcessInstanceApi.ProcessInstanceVO> =
|
||||
): VxeTableGridOptions<BpmProcessInstanceApi.ProcessInstance>['columns'] {
|
||||
const baseColumns: VxeGridPropTypes.Columns<BpmProcessInstanceApi.ProcessInstance> =
|
||||
[
|
||||
{
|
||||
field: 'name',
|
||||
|
||||
@@ -70,7 +70,7 @@ function onRefresh() {
|
||||
}
|
||||
|
||||
/** 查看详情 */
|
||||
const handleDetail = (row: BpmProcessInstanceApi.ProcessInstanceVO) => {
|
||||
const handleDetail = (row: BpmProcessInstanceApi.ProcessInstance) => {
|
||||
router.push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
@@ -80,7 +80,7 @@ const handleDetail = (row: BpmProcessInstanceApi.ProcessInstanceVO) => {
|
||||
};
|
||||
|
||||
/** 取消按钮操作 */
|
||||
const handleCancel = async (row: BpmProcessInstanceApi.ProcessInstanceVO) => {
|
||||
const handleCancel = async (row: BpmProcessInstanceApi.ProcessInstance) => {
|
||||
cancelReason.value = ''; // 重置取消原因
|
||||
confirm({
|
||||
title: '取消流程',
|
||||
|
||||
Reference in New Issue
Block a user