remove 删除无用代码

This commit is contained in:
gssong 2024-12-14 00:50:16 +08:00
parent 6fd3850f7c
commit ae39338bf7
20 changed files with 31 additions and 743 deletions

View File

@ -9,11 +9,6 @@ export interface CategoryVO {
*/
categoryName: string;
/**
*
*/
categoryCode: string;
/**
* id
*/
@ -38,11 +33,6 @@ export interface CategoryForm extends BaseEntity {
*/
categoryName?: string;
/**
*
*/
categoryCode?: string;
/**
* id
*/
@ -59,9 +49,4 @@ export interface CategoryQuery extends PageQuery {
*
*/
categoryName?: string;
/**
*
*/
categoryCode?: string;
}

View File

@ -1,8 +1,7 @@
import { DefinitionConfigVO } from '@/api/workflow/definitionConfig/types';
export interface FlowDefinitionQuery extends PageQuery {
flowCode?: string;
flowName?: string;
categoryCode?: string;
category: string;
isPublish?: number;
}
@ -15,7 +14,6 @@ export interface FlowDefinitionVo {
activityStatus: boolean;
createTime: Date;
updateTime: Date;
wfDefinitionConfigVo: DefinitionConfigVO;
}
export interface FlowDefinitionForm {

View File

@ -1,53 +0,0 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { DefinitionConfigVO, DefinitionConfigForm } from '@/api/workflow/definitionConfig/types';
/**
*
* @param definitionId
*/
export const getByDefId = (definitionId: string | number): AxiosPromise<DefinitionConfigVO> => {
return request({
url: '/workflow/defConfig/getByDefId/' + definitionId,
method: 'get'
});
};
/**
*
* @param data
*/
export const saveOrUpdate = (data: DefinitionConfigForm) => {
return request({
url: '/workflow/defConfig/saveOrUpdate',
method: 'post',
data: data
});
};
/**
*
* @param id
*/
export const deldefinitionConfig = (id: string | number | Array<string | number>) => {
return request({
url: '/workflow/defConfig/' + id,
method: 'delete'
});
};
/**
*
* @param tableName
* @param definitionId
*/
export const getByTableNameNotDefId = (tableName: string, definitionId: string | number) => {
return request({
url: `/workflow/defConfig/getByTableNameNotDefId`,
method: 'get',
params: {
tableName: tableName,
definitionId: definitionId
}
});
};

View File

@ -1,102 +0,0 @@
import { FormManageVO } from '@/api/workflow/formManage/types';
export interface DefinitionConfigVO {
/**
*
*/
id: string | number;
/**
*
*/
tableName?: string;
/**
* ID
*/
definitionId: string | number;
/**
* KEY
*/
processKey: string;
/**
*
*/
version?: string | number;
/**
*
*/
remark: string;
/**
*
*/
wfFormManageVo: FormManageVO;
}
export interface DefinitionConfigForm extends BaseEntity {
/**
*
*/
id?: string | number;
/**
*
*/
tableName?: string;
/**
* ID
*/
definitionId?: string | number;
/**
* KEY
*/
processKey?: string;
/**
*
*/
version?: string | number;
/**
*
*/
remark?: string;
/**
*
*/
wfFormManageVo?: FormManageVO;
}
export interface DefinitionConfigQuery extends PageQuery {
/**
*
*/
tableName?: string;
/**
* ID
*/
definitionId?: string | number;
/**
* KEY
*/
processKey?: string;
/**
*
*/
version?: string | number;
/**
*
*/
wfFormManageVo: FormManageVO;
}

View File

@ -1,76 +0,0 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { FormManageVO, FormManageForm, FormManageQuery } from '@/api/workflow/formManage/types';
/**
*
* @param query
* @returns {*}
*/
export const listFormManage = (query?: FormManageQuery): AxiosPromise<FormManageVO[]> => {
return request({
url: '/workflow/formManage/list',
method: 'get',
params: query
});
};
/**
*
* @param query
* @returns {*}
*/
export const selectListFormManage = (): AxiosPromise<FormManageVO[]> => {
return request({
url: '/workflow/formManage/list/selectList',
method: 'get'
});
};
/**
*
* @param id
*/
export const getFormManage = (id: string | number): AxiosPromise<FormManageVO> => {
return request({
url: '/workflow/formManage/' + id,
method: 'get'
});
};
/**
*
* @param data
*/
export const addFormManage = (data: FormManageForm) => {
return request({
url: '/workflow/formManage',
method: 'post',
data: data
});
};
/**
*
* @param data
*/
export const updateFormManage = (data: FormManageForm) => {
return request({
url: '/workflow/formManage',
method: 'put',
data: data
});
};
/**
*
* @param id
*/
export const delFormManage = (id: string | number | Array<string | number>) => {
return request({
url: '/workflow/formManage/' + id,
method: 'delete'
});
};

View File

@ -1,69 +0,0 @@
export interface FormManageVO {
/**
*
*/
id: string | number;
/**
*
*/
formName: string;
/**
*
*/
formType: string;
/**
*
*/
formTypeName: string;
/**
* /ID
*/
router: string;
/**
*
*/
remark: string;
}
export interface FormManageForm extends BaseEntity {
/**
*
*/
id?: string | number;
/**
*
*/
formName?: string;
/**
*
*/
formType?: string;
/**
* /ID
*/
router?: string;
/**
*
*/
remark?: string;
}
export interface FormManageQuery extends PageQuery {
/**
*
*/
formName?: string;
/**
*
*/
formType?: string;
}

View File

@ -1,7 +1,7 @@
import { FlowTaskVO } from '@/api/workflow/task/types';
export interface FlowInstanceQuery extends PageQuery {
categoryCode?: string;
category?: string;
nodeName?: string;
flowCode?: string;
flowName?: string;

View File

@ -1,104 +0,0 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { ModelForm, ModelQuery, ModelVO } from '@/api/workflow/model/types';
/**
*
* @param query
* @returns {*}
*/
export const listModel = (query: ModelQuery): AxiosPromise<ModelVO[]> => {
return request({
url: '/workflow/model/list',
method: 'get',
params: query
});
};
/**
*
* @param query
* @returns {*}
*/
export const getInfo = (id: string): AxiosPromise<ModelForm> => {
return request({
url: '/workflow/model/getInfo/' + id,
method: 'get'
});
};
/**
*
* @param data
* @returns {*}
*/
export const addModel = (data: ModelForm): AxiosPromise<void> => {
return request({
url: '/workflow/model/save',
method: 'post',
data: data
});
};
/**
*
* @param data
* @returns {*}
*/
export function update(data: ModelForm): AxiosPromise<void> {
return request({
url: '/workflow/model/update',
method: 'put',
data: data
});
}
/**
*
* @param data
* @returns {*}
*/
export function editModelXml(data: ModelForm): AxiosPromise<void> {
return request({
url: '/workflow/model/editModelXml',
method: 'put',
data: data
});
}
/**
* id删除模型
* @returns {*}
* @param id id
*/
export function delModel(id: string | string[]): AxiosPromise<void> {
return request({
url: '/workflow/model/' + id,
method: 'delete'
});
}
/**
*
* @returns {*}
* @param id id
*/
export const modelDeploy = (id: string): AxiosPromise<void> => {
return request({
url: `/workflow/model/modelDeploy/${id}`,
method: 'post'
});
};
/**
*
* @param data
* @returns {*}
*/
export const copyModel = (data: ModelForm): AxiosPromise<void> => {
return request({
url: '/workflow/model/copyModel',
method: 'post',
data: data
});
};

View File

@ -1,66 +0,0 @@
export interface ModelForm {
id: string;
name: string;
key: string;
categoryCode: string;
xml: string;
svg: string;
description: string;
}
export interface ModelQuery extends PageQuery {
name?: string;
key?: string;
categoryCode?: string;
}
export interface OriginalPersistentState {
metaInfo: string;
editorSourceValueId: string;
createTime: string;
deploymentId?: string;
name: string;
tenantId: string;
category?: string;
version: number;
editorSourceExtraValueId?: string;
key: string;
lastUpdateTime: string;
}
export interface PersistentState {
metaInfo: string;
editorSourceValueId: string;
createTime: string;
deploymentId?: string;
name: string;
tenantId: string;
category?: string;
version: number;
editorSourceExtraValueId?: string;
key: string;
lastUpdateTime: string;
}
export interface ModelVO {
id: string;
revision: number;
originalPersistentState: OriginalPersistentState;
name: string;
key: string;
category?: string;
createTime: string;
lastUpdateTime: string;
version: number;
metaInfo: string;
deploymentId?: string;
editorSourceValueId: string;
editorSourceExtraValueId?: string;
tenantId: string;
persistentState: PersistentState;
revisionNext: number;
idPrefix: string;
inserted: boolean;
updated: boolean;
deleted: boolean;
}

View File

@ -1,38 +0,0 @@
import { FormManageVO } from '@/api/workflow/formManage/types';
export interface NodeConfigVO {
/**
*
*/
id: string | number;
/**
* id
*/
formId: string | number;
/**
*
*/
formType: string;
/**
*
*/
nodeName: string;
/**
* id
*/
nodeId: string | number;
/**
* id
*/
definitionId: string | number;
/**
*
*/
wfFormManageVo: FormManageVO;
}

View File

@ -144,17 +144,6 @@ export const terminationTask = (data: any) => {
});
};
/**
*
* @returns
*/
export const getInstanceVariable = (taskId: string) => {
return request({
url: `/workflow/task/getInstanceVariable/${taskId}`,
method: 'get'
});
};
/**
*
* @returns
@ -166,42 +155,6 @@ export const getBackTaskNode = (processInstanceId: string) => {
});
};
/**
*
* @returns
*/
export const delegateTask = (data: any) => {
return request({
url: `/workflow/task/delegateTask`,
method: 'post',
data: data
});
};
/**
*
* @param taskId
* @returns {*}
*/
export const getTaskUserIdsByAddMultiInstance = (taskId: string) => {
return request({
url: '/workflow/task/getTaskUserIdsByAddMultiInstance/' + taskId,
method: 'get'
});
};
/**
*
* @param taskId
* @returns {*}
*/
export const getListByDeleteMultiInstance = (taskId: string) => {
return request({
url: '/workflow/task/getListByDeleteMultiInstance/' + taskId,
method: 'get'
});
};
/**
* delegateTask transferTask addSignature reductionSignature
* @returns

View File

@ -1,5 +1,3 @@
import { NodeConfigVO } from '@/api/workflow/nodeConfig/types';
import { DefinitionConfigVO } from '@/api/workflow/definitionConfig/types';
export interface TaskQuery extends PageQuery {
nodeName?: string;
flowCode?: string;
@ -29,8 +27,6 @@ export interface FlowTaskVO {
nodeType: number;
nodeRatio: string | number;
version?: string;
wfNodeConfigVo?: NodeConfigVO;
wfDefinitionConfigVo?: DefinitionConfigVO;
}
export interface VariableVo {

View File

@ -12,29 +12,5 @@ export default {
taskId: routerJumpVo.taskId
}
});
// if (routerJumpVo.wfNodeConfigVo && routerJumpVo.wfNodeConfigVo.formType === 'static' && routerJumpVo.wfNodeConfigVo.wfFormManageVo) {
// proxy.$tab.closePage(proxy.$route);
// proxy.$router.push({
// path: `${routerJumpVo.wfNodeConfigVo.wfFormManageVo.router}`,
// query: {
// id: routerJumpVo.businessKey,
// type: routerJumpVo.type,
// taskId: routerJumpVo.taskId
// }
// });
// } else if (routerJumpVo.wfNodeConfigVo && routerJumpVo.wfNodeConfigVo.formType === 'dynamic' && routerJumpVo.wfNodeConfigVo.wfFormManageVo) {
// proxy.$tab.closePage(proxy.$route);
// proxy.$router.push({
// path: `${routerJumpVo.wfNodeConfigVo.wfFormManageVo.router}`,
// query: {
// id: routerJumpVo.businessKey,
// type: routerJumpVo.type,
// taskId: routerJumpVo.taskId
// }
// });
// } else {
// proxy?.$modal.msgError('请到模型配置菜单!');
// }
}
};

View File

@ -1,9 +1,4 @@
import { NodeConfigVO } from '@/api/workflow/nodeConfig/types';
import { DefinitionConfigVO } from '@/api/workflow/definitionConfig/types';
export interface RouterJumpVo {
wfNodeConfigVo: NodeConfigVO;
wfDefinitionConfigVo: DefinitionConfigVO;
businessKey: string;
taskId: string | number;
type: string;
@ -11,6 +6,6 @@ export interface RouterJumpVo {
export interface StartProcessBo {
businessKey: string | number;
tableName: string;
flowCode: string;
variables: any;
}

View File

@ -6,9 +6,6 @@
<el-form-item label="分类名称" prop="categoryName">
<el-input v-model="queryParams.categoryName" placeholder="请输入分类名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="分类编码" prop="categoryCode">
<el-input v-model="queryParams.categoryCode" placeholder="请输入分类编码" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
@ -38,7 +35,6 @@
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
>
<el-table-column label="分类名称" prop="categoryName" />
<el-table-column label="分类编码" align="center" prop="categoryCode" />
<el-table-column label="排序" align="center" prop="sortNum" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
@ -71,9 +67,6 @@
<el-form-item label="分类名称" prop="categoryName">
<el-input v-model="form.categoryName" placeholder="请输入分类名称" />
</el-form-item>
<el-form-item label="分类编码" prop="categoryCode">
<el-input v-model="form.categoryCode" placeholder="请输入分类编码" />
</el-form-item>
<el-form-item label="排序" prop="sortNum">
<el-input-number v-model="form.sortNum" placeholder="请输入排序" controls-position="right" :min="0" />
</el-form-item>
@ -119,7 +112,6 @@ const dialog = reactive<DialogOption>({
const initFormData: CategoryForm = {
id: undefined,
categoryName: undefined,
categoryCode: undefined,
parentId: undefined,
sortNum: 0
};
@ -129,13 +121,11 @@ const data = reactive<PageData<CategoryForm, CategoryQuery>>({
queryParams: {
pageNum: 1,
pageSize: 10,
categoryName: undefined,
categoryCode: undefined
categoryName: undefined
},
rules: {
id: [{ required: true, message: '主键不能为空', trigger: 'blur' }],
categoryName: [{ required: true, message: '分类名称不能为空', trigger: 'blur' }],
categoryCode: [{ required: true, message: '分类编码不能为空', trigger: 'blur' }],
parentId: [{ required: true, message: '父级id不能为空', trigger: 'blur' }]
}
});

View File

@ -89,7 +89,7 @@ const leaveFormRef = ref<ElFormInstance>();
const submitFormData = ref<StartProcessBo>({
businessKey: '',
tableName: '',
flowCode: '',
variables: {}
});
const taskVariables = ref<Record<string, any>>({});
@ -186,7 +186,7 @@ const submitForm = (status: string) => {
//
const handleStartWorkFlow = async (data: LeaveVO) => {
try {
submitFormData.value.tableName = 'test_leave';
submitFormData.value.flowCode = 'leaveFlow-serial1';
submitFormData.value.businessKey = data.id;
//
taskVariables.value = {

View File

@ -75,14 +75,7 @@
<el-tag v-else type="danger">失效</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="表名/表单KEY" width="120" :show-overflow-tooltip="true">
<template #default="scope">
<span v-if="scope.row.wfDefinitionConfigVo">
{{ scope.row.wfDefinitionConfigVo.tableName }}
</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="320" class-name="small-padding fixed-width">
<el-table-column fixed="right" label="操作" align="center" width="245" class-name="small-padding fixed-width">
<template #default="scope">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
@ -112,9 +105,6 @@
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button link type="primary" size="small" icon="Tickets" @click="handleDefinitionConfigOpen(scope.row)">绑定业务</el-button>
</el-col>
<el-col :span="1.5">
<el-button link type="primary" v-if="scope.row.isPublish === 0" icon="Pointer" size="small" @click="design(scope.row)"
>流程设计</el-button
@ -196,7 +186,7 @@
<el-tag v-else type="danger">失效</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" width="245" class-name="small-padding fixed-width">
<template #default="scope">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
@ -210,12 +200,12 @@
{{ scope.row.activityStatus ? '挂起流程' : '激活流程' }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="text" size="small" icon="Tickets" @click="handleDefinitionConfigOpen(scope.row)">绑定业务</el-button>
</el-col>
<el-col :span="1.5">
<el-button link type="primary" icon="Delete" size="small" @click="handleDelete(scope.row)">删除流程</el-button>
</el-col>
<el-col v-if="scope.row.isPublish === 0" :span="1.5">
<el-button link type="primary" icon="Pointer" size="small" @click="design(scope.row)">流程设计</el-button>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
@ -224,43 +214,12 @@
<el-col v-if="scope.row.isPublish !== 1" :span="1.5">
<el-button link type="primary" size="small" icon="CircleCheck" @click="handlePublish(scope.row)">发布流程</el-button>
</el-col>
<el-col v-if="scope.row.isPublish === 0" :span="1.5">
<el-button link type="primary" icon="Pointer" size="small" @click="design(scope.row)">流程设计</el-button>
</el-col>
</el-row>
</template>
</el-table-column>
</el-table>
</el-dialog>
<!-- 表单配置 -->
<el-dialog
v-model="definitionConfigDialog.visible"
:title="definitionConfigDialog.title"
width="650px"
append-to-body
:close-on-click-modal="false"
>
<el-form :model="definitionConfigForm" label-width="auto">
<el-form-item label="流程KEY">
<el-input v-model="definitionConfigForm.processKey" disabled />
</el-form-item>
<el-form-item label="表名" prop="formId">
<el-input v-model="definitionConfigForm.tableName" placeholder="示例:test_leave" />
</el-form-item>
<el-form-item label="备注">
<el-input v-model="definitionConfigForm.remark" type="textarea" resize="none" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button @click="definitionConfigDialog.visible = false">取消</el-button>
<el-button type="primary" @click="handlerSaveForm">保存</el-button>
</div>
</template>
</el-dialog>
<!-- 新增流程定义 -->
<el-dialog v-model="modelDialog.visible" :title="modelDialog.title" width="650px" append-to-body :close-on-click-modal="false">
<template #footer>
@ -294,22 +253,19 @@
</template>
<script lang="ts" setup name="processDefinition">
import { listDefinition, definitionXml, deleteDefinition, active, importDef, getHisListByKey, publish, add, copy } from '@/api/workflow/definition';
import { getByTableNameNotDefId, getByDefId, saveOrUpdate } from '@/api/workflow/definitionConfig';
import { listDefinition, deleteDefinition, active, importDef, getHisListByKey, publish, add, copy } from '@/api/workflow/definition';
import { listCategory } from '@/api/workflow/category';
import { CategoryVO } from '@/api/workflow/category/types';
import { FlowDefinitionQuery, FlowDefinitionVo, FlowDefinitionForm } from '@/api/workflow/definition/types';
import { DefinitionConfigForm } from '@/api/workflow/definitionConfig/types';
import { UploadRequestOptions } from 'element-plus';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const queryFormRef = ref<ElFormInstance>();
const categoryTreeRef = ref<ElTreeInstance>();
const definitionConfigForm = ref<DefinitionConfigForm>({});
type CategoryOption = {
categoryCode: string;
id: string;
categoryName: string;
children?: CategoryOption[];
};
@ -341,11 +297,6 @@ const processDefinitionDialog = reactive<DialogOption>({
title: '历史版本'
});
const definitionConfigDialog = reactive<DialogOption>({
visible: false,
title: '流程定义配置'
});
const modelDialog = reactive<DialogOption>({
visible: false,
title: '新增流程'
@ -378,7 +329,7 @@ onMounted(() => {
/** 节点单击事件 */
const handleNodeClick = (data: CategoryVO) => {
queryParams.value.category = data.id;
if (data.id === 'ALL') {
if (data.id === '0') {
queryParams.value.category = '';
}
handleQuery();
@ -402,7 +353,7 @@ watchEffect(
const getTreeselect = async () => {
const res = await listCategory();
categoryOptions.value = [];
const data: CategoryOption = { id: 'ALL', categoryName: '顶级节点', children: [] };
const data: CategoryOption = { id: '0', categoryName: '顶级节点', children: [] };
data.children = proxy?.handleTree<CategoryOption>(res.data, 'id', 'parentId');
categoryOptions.value.push(data);
};
@ -500,7 +451,7 @@ const handlerImportDefinition = (data: UploadRequestOptions): XMLHttpRequest =>
let formData = new FormData();
uploadDialogLoading.value = true;
formData.append('file', data.file);
formData.append('categoryId', selectCategory.value);
formData.append('category', selectCategory.value);
importDef(formData)
.then(() => {
uploadDialog.visible = false;
@ -512,48 +463,6 @@ const handlerImportDefinition = (data: UploadRequestOptions): XMLHttpRequest =>
});
return;
};
//
const handleDefinitionConfigOpen = async (row: FlowDefinitionVo) => {
definitionConfigDialog.visible = true;
definitionConfigForm.value.processKey = row.flowCode;
definitionConfigForm.value.definitionId = row.id;
definitionConfigForm.value.version = row.version;
const resp = await getByDefId(row.id);
if (resp.data) {
definitionConfigForm.value = resp.data;
} else {
definitionConfigForm.value.tableName = undefined;
definitionConfigForm.value.remark = undefined;
}
};
//
const handlerSaveForm = async () => {
getByTableNameNotDefId(definitionConfigForm.value.tableName, definitionConfigForm.value.definitionId).then((res) => {
if (res.data && res.data.length > 0) {
ElMessageBox.confirm('表名已被【' + res.data[0].processKey + '】版本v' + res.data[0].version + '.0绑定确认后将会删除绑定的流程KEY!', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
saveOrUpdate(definitionConfigForm.value).then((resp) => {
if (resp.code === 200) {
proxy?.$modal.msgSuccess('操作成功');
definitionConfigDialog.visible = false;
getList();
}
});
});
} else {
saveOrUpdate(definitionConfigForm.value).then((resp) => {
if (resp.code === 200) {
proxy?.$modal.msgSuccess('操作成功');
definitionConfigDialog.visible = false;
getList();
}
});
}
});
};
/**
* 设计流程
* @param row

View File

@ -226,7 +226,7 @@ const processDefinitionDialog = reactive<DialogOption>({
});
type CategoryOption = {
categoryCode: string;
id: string;
categoryName: string;
children?: CategoryOption[];
};
@ -247,14 +247,14 @@ const queryParams = ref<FlowInstanceQuery>({
flowName: undefined,
flowCode: undefined,
createByIds: [],
categoryCode: undefined
category: undefined
});
/** 节点单击事件 */
const handleNodeClick = (data: CategoryVO) => {
queryParams.value.categoryCode = data.categoryCode;
if (data.categoryCode === 'ALL') {
queryParams.value.categoryCode = '';
queryParams.value.category = data.id;
if (data.id === '0') {
queryParams.value.category = '';
}
handleQuery();
};
@ -277,7 +277,7 @@ watchEffect(
const getTreeselect = async () => {
const res = await listCategory();
categoryOptions.value = [];
const data: CategoryOption = { categoryCode: 'ALL', categoryName: '顶级节点', children: [] };
const data: CategoryOption = { id: '0', categoryName: '顶级节点', children: [] };
data.children = proxy?.handleTree<CategoryOption>(res.data, 'id', 'parentId');
categoryOptions.value.push(data);
};
@ -293,7 +293,7 @@ const handleQuery = () => {
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields();
queryParams.value.categoryCode = '';
queryParams.value.category = '';
queryParams.value.pageNum = 1;
queryParams.value.pageSize = 10;
queryParams.value.createByIds = [];
@ -369,8 +369,6 @@ const cancelPopover = async (index: any) => {
/** 查看按钮操作 */
const handleView = (row) => {
const routerJumpVo = reactive<RouterJumpVo>({
wfDefinitionConfigVo: row.wfDefinitionConfigVo,
wfNodeConfigVo: row.wfNodeConfigVo,
businessKey: row.businessId,
taskId: row.id,
type: 'view'

View File

@ -133,7 +133,7 @@ const categoryOptions = ref<CategoryOption[]>([]);
const categoryName = ref('');
interface CategoryOption {
categoryCode: string;
id: string;
categoryName: string;
children?: CategoryOption[];
}
@ -144,7 +144,7 @@ const queryParams = ref<FlowInstanceQuery>({
pageNum: 1,
pageSize: 10,
flowCode: undefined,
categoryCode: undefined
category: undefined
});
onMounted(() => {
@ -154,9 +154,9 @@ onMounted(() => {
/** 节点单击事件 */
const handleNodeClick = (data: CategoryVO) => {
queryParams.value.categoryCode = data.categoryCode;
if (data.categoryCode === 'ALL') {
queryParams.value.categoryCode = '';
queryParams.value.category = data.id;
if (data.id === '0') {
queryParams.value.category = '';
}
handleQuery();
};
@ -179,7 +179,7 @@ watchEffect(
const getTreeselect = async () => {
const res = await listCategory();
categoryOptions.value = [];
const data: CategoryOption = { categoryCode: 'ALL', categoryName: '顶级节点', children: [] };
const data: CategoryOption = { id: '0', categoryName: '顶级节点', children: [] };
data.children = proxy?.handleTree<CategoryOption>(res.data, 'id', 'parentId');
categoryOptions.value.push(data);
};
@ -191,7 +191,7 @@ const handleQuery = () => {
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields();
queryParams.value.categoryCode = '';
queryParams.value.category = '';
queryParams.value.pageNum = 1;
queryParams.value.pageSize = 10;
handleQuery();
@ -243,8 +243,6 @@ const handleCancelProcessApply = async (businessId: string) => {
//
const handleOpen = async (row, type) => {
const routerJumpVo = reactive<RouterJumpVo>({
wfDefinitionConfigVo: row.wfDefinitionConfigVo,
wfNodeConfigVo: row.wfNodeConfigVo,
businessKey: row.businessId,
taskId: row.id,
type: type

View File

@ -88,7 +88,7 @@ const queryParams = ref<TaskQuery>({
pageSize: 10,
nodeName: undefined,
flowName: undefined,
flowCode: undefined,
flowCode: undefined
});
/** 搜索按钮操作 */
const handleQuery = () => {
@ -120,8 +120,6 @@ const getTaskCopyList = () => {
/** 查看按钮操作 */
const handleView = (row) => {
const routerJumpVo = reactive<RouterJumpVo>({
wfDefinitionConfigVo: row.wfDefinitionConfigVo,
wfNodeConfigVo: row.wfNodeConfigVo,
businessKey: row.businessId,
taskId: row.id,
type: 'view'