From f6ea543b3de9a770c1bf5db2baf3e8a5dc2c867a Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期一, 30 十二月 2024 18:18:44 +0800 Subject: [PATCH] 10.88.4.131 --- src/views/bpm/task/todo/index.vue | 95 ++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 76 insertions(+), 19 deletions(-) diff --git a/src/views/bpm/task/todo/index.vue b/src/views/bpm/task/todo/index.vue index 60681fc..e1449b1 100644 --- a/src/views/bpm/task/todo/index.vue +++ b/src/views/bpm/task/todo/index.vue @@ -1,5 +1,4 @@ <template> - <ContentWrap> <!-- 搜索工作栏 --> <el-form @@ -9,7 +8,7 @@ class="-mb-15px" label-width="68px" > - <el-form-item label="任务名称" prop="name"> + <el-form-item label="" prop="name"> <el-input v-model="queryParams.name" class="!w-240px" @@ -18,27 +17,79 @@ @keyup.enter="handleQuery" /> </el-form-item> - <el-form-item label="创建时间" prop="createTime"> - <el-date-picker - v-model="queryParams.createTime" - :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" - class="!w-240px" - end-placeholder="结束日期" - start-placeholder="开始日期" - type="daterange" - value-format="YYYY-MM-DD HH:mm:ss" - /> - </el-form-item> <el-form-item> <el-button @click="handleQuery"> <Icon class="mr-5px" icon="ep:search" /> 搜索 </el-button> - <el-button @click="resetQuery"> - <Icon class="mr-5px" icon="ep:refresh" /> - 重置 - </el-button> </el-form-item> + + <el-form-item label="" prop="category" :style="{ position: 'absolute', right: '130px' }"> + <el-select + v-model="queryParams.category" + placeholder="请选择流程分类" + clearable + class="!w-155px" + @change="handleQuery" + > + <el-option + v-for="category in categoryList" + :key="category.code" + :label="category.name" + :value="category.code" + /> + </el-select> + </el-form-item> + + <!-- 高级筛选 --> + <el-form-item :style="{ position: 'absolute', right: '0px' }"> + <el-popover + :visible="showPopover" + persistent + :width="400" + :show-arrow="false" + placement="bottom-end" + > + <template #reference> + <el-button @click="showPopover = !showPopover" > + <Icon icon="ep:plus" class="mr-5px" />高级筛选 + </el-button> + + </template> + <el-form-item label="流程发起人" class="bold-label" label-position="top" prop="category"> + <el-select + v-model="queryParams.category" + placeholder="请选择流程发起人" + clearable + class="!w-390px" + > + <el-option + v-for="category in categoryList" + :key="category.code" + :label="category.name" + :value="category.code" + /> + </el-select> + </el-form-item> + <el-form-item label="发起时间" class="bold-label" label-position="top" prop="createTime"> + <el-date-picker + v-model="queryParams.createTime" + value-format="YYYY-MM-DD HH:mm:ss" + type="daterange" + start-placeholder="开始日期" + end-placeholder="结束日期" + :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" + class="!w-240px" + /> + </el-form-item> + <el-form-item class="bold-label" label-position="top"> + <el-button @click="handleQuery"> 确认</el-button> + <el-button @click="showPopover = false"> 取消</el-button> + <el-button @click="resetQuery"> 清空</el-button> + </el-form-item> + </el-popover> + </el-form-item> + </el-form> </ContentWrap> @@ -88,6 +139,7 @@ <script lang="ts" setup> import { dateFormatter } from '@/utils/formatTime' import * as TaskApi from '@/api/bpm/task' +import { CategoryApi, CategoryVO } from '@/api/bpm/category' defineOptions({ name: 'BpmTodoTask' }) @@ -100,9 +152,11 @@ pageNo: 1, pageSize: 10, name: '', + category: undefined, createTime: [] }) const queryFormRef = ref() // 搜索的表单 +const categoryList = ref<CategoryVO[]>([]) // 流程分类列表 /** 查询任务列表 */ const getList = async () => { @@ -115,6 +169,8 @@ loading.value = false } } + +const showPopover = ref(false) /** 搜索按钮操作 */ const handleQuery = () => { @@ -140,7 +196,8 @@ } /** 初始化 **/ -onMounted(() => { - getList() +onMounted(async () => { + await getList() + categoryList.value = await CategoryApi.getCategorySimpleList() }) </script> -- Gitblit v1.9.3