Procházet zdrojové kódy

优化审批管理支持条件查询

hubin před 1 rokem
rodič
revize
65f7de44ed
2 změnil soubory, kde provedl 3 přidání a 4 odebrání
  1. 2 2
      src/api/flow/definition.ts
  2. 1 2
      src/views/flow/group/index.vue

+ 2 - 2
src/api/flow/definition.ts

@@ -3,7 +3,7 @@ import { AxiosPromise } from 'axios'
 
 // apiUrl 流程定义(实例)
 const api = {
-	listCategory: '/v1/process/list-category', // 获取所有分类流程定义列表
+	listCategory: '/v1/process/list-category?keyword=', // 获取所有分类流程定义列表
 	updateStateId: '/v1/process/update-state', // 根据流程定义ID更新流程状态
 	updateProcessSort: '/v1/process/sort', // 流程组排序
 	delete: '/v1/process/delete', // 根据流程定义ID删除流程定义相关信息
@@ -14,7 +14,7 @@ const api = {
 
 function flowDefinitionListCategoryApi(data: any): AxiosPromise {
 	return request({
-		url: api.listCategory,
+		url: api.listCategory + data.keyword,
 		method: 'post',
 		data
 	})

+ 1 - 2
src/views/flow/group/index.vue

@@ -2,7 +2,7 @@
 	<el-container class="flex-column-page-wrap group-container">
 		<div class="ApprovalList">
 			<el-header class="flex flex-align-center" style="padding: 0">
-				<el-input v-model="keyword" style="width: 200px" placeholder="搜索" clearable @blur="searchProcess" />
+				<el-input v-model="keyword" style="width: 200px" placeholder="搜索" clearable @blur="searchProcess" @clear="searchProcess" />
 				<div style="margin-left: auto; flex-shrink: 0">
 					<template v-if="!sortFlag">
 						<el-button @click="addNewGroupEv">新建分组</el-button>
@@ -68,7 +68,6 @@ const addNewGroupEv = () => {
 
 // 调用子组件的方法
 const searchProcess = async () => {
-	if (!keyword.value) return
 	await dyncComponent.value.searchProcessEv({ keyword: keyword.value })
 }