mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-26 09:11:52 +08:00
完善 BPM Model 的搜索功能
This commit is contained in:
parent
d8bbc71543
commit
430f1369be
@ -14,7 +14,13 @@ import lombok.ToString;
|
|||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
public class ModelPageReqVO extends PageParam {
|
public class ModelPageReqVO extends PageParam {
|
||||||
|
|
||||||
@ApiModelProperty(value = "名字", example = "芋道")
|
@ApiModelProperty(value = "标识", example = "process1641042089407", notes = "精准匹配")
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "名字", example = "芋道", notes = "模糊匹配")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1")
|
||||||
|
private String category;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -55,9 +55,15 @@ public class BpmModelServiceImpl implements BpmModelService {
|
|||||||
@Override
|
@Override
|
||||||
public PageResult<BpmModelPageItemRespVO> getModelPage(ModelPageReqVO pageVO) {
|
public PageResult<BpmModelPageItemRespVO> getModelPage(ModelPageReqVO pageVO) {
|
||||||
ModelQuery modelQuery = repositoryService.createModelQuery();
|
ModelQuery modelQuery = repositoryService.createModelQuery();
|
||||||
|
if (StrUtil.isNotBlank(pageVO.getKey())) {
|
||||||
|
modelQuery.modelKey(pageVO.getKey());
|
||||||
|
}
|
||||||
if (StrUtil.isNotBlank(pageVO.getName())) {
|
if (StrUtil.isNotBlank(pageVO.getName())) {
|
||||||
modelQuery.modelNameLike("%" + pageVO.getName() + "%"); // 模糊匹配
|
modelQuery.modelNameLike("%" + pageVO.getName() + "%"); // 模糊匹配
|
||||||
}
|
}
|
||||||
|
if (StrUtil.isNotBlank(pageVO.getCategory())) {
|
||||||
|
modelQuery.modelCategory(pageVO.getCategory());
|
||||||
|
}
|
||||||
// 执行查询
|
// 执行查询
|
||||||
List<Model> models = modelQuery.orderByCreateTime().desc()
|
List<Model> models = modelQuery.orderByCreateTime().desc()
|
||||||
.listPage(PageUtils.getStart(pageVO), pageVO.getPageSize());
|
.listPage(PageUtils.getStart(pageVO), pageVO.getPageSize());
|
||||||
|
@ -8,6 +8,7 @@ import store from '@/store'
|
|||||||
export const DICT_TYPE = {
|
export const DICT_TYPE = {
|
||||||
USER_TYPE: 'user_type',
|
USER_TYPE: 'user_type',
|
||||||
|
|
||||||
|
// system
|
||||||
SYS_COMMON_STATUS: 'sys_common_status',
|
SYS_COMMON_STATUS: 'sys_common_status',
|
||||||
SYS_MENU_TYPE: 'sys_menu_type',
|
SYS_MENU_TYPE: 'sys_menu_type',
|
||||||
SYS_ROLE_TYPE: 'sys_role_type',
|
SYS_ROLE_TYPE: 'sys_role_type',
|
||||||
@ -24,13 +25,17 @@ export const DICT_TYPE = {
|
|||||||
SYS_SMS_RECEIVE_STATUS: 'sys_sms_receive_status',
|
SYS_SMS_RECEIVE_STATUS: 'sys_sms_receive_status',
|
||||||
SYS_ERROR_CODE_TYPE: 'sys_error_code_type',
|
SYS_ERROR_CODE_TYPE: 'sys_error_code_type',
|
||||||
|
|
||||||
|
// infra
|
||||||
INF_REDIS_TIMEOUT_TYPE: 'inf_redis_timeout_type',
|
INF_REDIS_TIMEOUT_TYPE: 'inf_redis_timeout_type',
|
||||||
INF_JOB_STATUS: 'inf_job_status',
|
INF_JOB_STATUS: 'inf_job_status',
|
||||||
INF_JOB_LOG_STATUS: 'inf_job_log_status',
|
INF_JOB_LOG_STATUS: 'inf_job_log_status',
|
||||||
INF_API_ERROR_LOG_PROCESS_STATUS: 'inf_api_error_log_process_status',
|
INF_API_ERROR_LOG_PROCESS_STATUS: 'inf_api_error_log_process_status',
|
||||||
|
|
||||||
|
// tool
|
||||||
TOOL_CODEGEN_TEMPLATE_TYPE: 'tool_codegen_template_type',
|
TOOL_CODEGEN_TEMPLATE_TYPE: 'tool_codegen_template_type',
|
||||||
|
|
||||||
|
// bpm
|
||||||
|
BPM_MODEL_CATEGORY: 'bpm_model_category',
|
||||||
OA_LEAVE_STATUS: 'flow_status',
|
OA_LEAVE_STATUS: 'flow_status',
|
||||||
OA_LEAVE_TYPE: 'oa_leave_type'
|
OA_LEAVE_TYPE: 'oa_leave_type'
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,19 @@
|
|||||||
|
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="模型名字" prop="name">
|
<el-form-item label="流程标识" prop="key">
|
||||||
<el-input v-model="queryParams.name" placeholder="请输入模型名字" clearable style="width: 240px;" size="small"
|
<el-input v-model="queryParams.key" placeholder="请输入流程标识" clearable style="width: 240px;" size="small"
|
||||||
@keyup.enter.native="handleQuery"/>
|
@keyup.enter.native="handleQuery"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="流程名称" prop="name">
|
||||||
|
<el-input v-model="queryParams.name" placeholder="请输入流程名称" clearable style="width: 240px;" size="small"
|
||||||
|
@keyup.enter.native="handleQuery"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="流程分类" prop="category">
|
||||||
|
<el-select v-model="queryParams.category" placeholder="流程分类" clearable size="small" style="width: 240px">
|
||||||
|
<el-option v-for="dict in categoryDictDatas" :key="parseInt(dict.value)" :label="dict.label" :value="parseInt(dict.value)"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
@ -24,10 +33,13 @@
|
|||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="流程编号" align="center" prop="id" :show-overflow-tooltip="true" />
|
|
||||||
<el-table-column label="流程标识" align="center" prop="key" />
|
<el-table-column label="流程标识" align="center" prop="key" />
|
||||||
<el-table-column label="流程名称" align="center" prop="name" />
|
<el-table-column label="流程名称" align="center" prop="name" />
|
||||||
<el-table-column label="流程分类" align="center" prop="category" /> <!-- TODO 芋艿:数据字典的格式化 -->
|
<el-table-column label="流程分类" align="center" prop="category">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ getDictDataLabel(DICT_TYPE.BPM_MODEL_CATEGORY, scope.row.category) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="表单信息" align="center" prop="formId" /> <!-- TODO 芋艿:需要支持表单的点击 -->
|
<el-table-column label="表单信息" align="center" prop="formId" /> <!-- TODO 芋艿:需要支持表单的点击 -->
|
||||||
<el-table-column label="流程版本" align="center" prop="processDefinition.version" />
|
<el-table-column label="流程版本" align="center" prop="processDefinition.version" />
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
@ -59,6 +71,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import {deleteModel, deployModel, createModel, updateModel, getModelPage, getModel} from "@/api/bpm/model";
|
import {deleteModel, deployModel, createModel, updateModel, getModelPage, getModel} from "@/api/bpm/model";
|
||||||
import VueBpmn from "@/components/bpmn/VueBpmn";
|
import VueBpmn from "@/components/bpmn/VueBpmn";
|
||||||
|
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "model",
|
name: "model",
|
||||||
@ -77,10 +90,14 @@ export default {
|
|||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
},
|
},
|
||||||
|
|
||||||
// BPMN 数据
|
// BPMN 数据
|
||||||
showBpmnOpen: false,
|
showBpmnOpen: false,
|
||||||
bpmnXML: null,
|
bpmnXML: null,
|
||||||
bpmnData: {},
|
bpmnData: {},
|
||||||
|
|
||||||
|
// 数据字典
|
||||||
|
categoryDictDatas: getDictDatas(DICT_TYPE.BPM_MODEL_CATEGORY),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {VueBpmn},
|
components: {VueBpmn},
|
||||||
|
Loading…
Reference in New Issue
Block a user