From ca22cdd5550cfa0defb0f430c538698182cdaec1 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期一, 30 十二月 2024 16:42:49 +0800 Subject: [PATCH] Merge branch 'master' of http://dlindusit.com:53929/r/iailab-plat-ui-vue3 --- src/views/bpm/processInstance/index.vue | 77 +++++++++++++++++++------------------- 1 files changed, 38 insertions(+), 39 deletions(-) diff --git a/src/views/bpm/processInstance/index.vue b/src/views/bpm/processInstance/index.vue index f2bb29d..2ffb162 100644 --- a/src/views/bpm/processInstance/index.vue +++ b/src/views/bpm/processInstance/index.vue @@ -1,5 +1,4 @@ <template> - <ContentWrap> <!-- 搜索工作栏 --> <el-form @@ -24,13 +23,14 @@ </el-form-item> <!-- TODO @ tuituji:style 可以使用 unocss --> - <el-form-item label="" prop="category" :style="{ position: 'absolute', right: '130px' }"> - <!-- TODO @tuituji:应该选择好分类,就触发搜索啦。 --> + <el-form-item label="" prop="category" :style="{ position: 'absolute', right: '300px' }"> + <!-- TODO @tuituji:应该选择好分类,就触发搜索啦。 RE:done & to check--> <el-select v-model="queryParams.category" placeholder="请选择流程分类" clearable class="!w-155px" + @change="handleQuery" > <el-option v-for="category in categoryList" @@ -41,21 +41,38 @@ </el-select> </el-form-item> + <el-form-item label="" prop="status" :style="{ position: 'absolute', right: '130px' }"> + <el-select + v-model="queryParams.status" + placeholder="请选择流程状态" + clearable + class="!w-155px" + @change="handleQuery" + > + <el-option + v-for="dict in getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS)" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> + </el-form-item> + <!-- 高级筛选 --> <!-- TODO @ tuituji:style 可以使用 unocss --> <el-form-item :style="{ position: 'absolute', right: '0px' }"> - <el-button v-popover="popoverRef" v-click-outside="onClickOutside" :icon="List"> - 高级筛选 - </el-button> <el-popover - ref="popoverRef" - trigger="click" - virtual-triggering + :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" @@ -85,21 +102,6 @@ class="!w-390px" /> </el-form-item> - <el-form-item label="流程状态" class="bold-label" label-position="top" prop="status"> - <el-select - v-model="queryParams.status" - placeholder="请选择流程状态" - clearable - class="!w-390px" - > - <el-option - v-for="dict in getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS)" - :key="dict.value" - :label="dict.label" - :value="dict.value" - /> - </el-select> - </el-form-item> <el-form-item label="发起时间" class="bold-label" label-position="top" prop="createTime"> <el-date-picker v-model="queryParams.createTime" @@ -111,8 +113,13 @@ class="!w-240px" /> </el-form-item> + <!-- TODO tuituiji:参考钉钉,1)按照清空、取消、确认排序。2)右对齐。3)确认增加 primary --> + <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> - <!-- TODO @tuituji:这里应该有确认,和取消、清空搜索条件,三个按钮。 --> </el-form-item> </el-form> </ContentWrap> @@ -129,7 +136,7 @@ fixed="left" /> <!-- TODO @芋艿:摘要 --> - <!-- TODO @tuituji:流程状态。可见需求文档里 --> + <!-- TODO tuituiji:参考钉钉;1)审批中时,展示审批任务;2)非审批中,展示状态 --> <el-table-column label="流程状态" prop="status" width="120"> <template #default="scope"> <dict-tag :type="DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS" :value="scope.row.status" /> @@ -197,8 +204,7 @@ </ContentWrap> </template> <script lang="ts" setup> -// TODO @tuituji:List 改成 <Icon icon="ep:plus" class="mr-5px" /> 类似这种组件哈。 -import { List } from '@element-plus/icons-vue' +// TODO @tuituji:List 改成 <Icon icon="ep:plus" class="mr-5px" /> 类似这种组件哈。 RE:done & to check import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { dateFormatter } from '@/utils/formatTime' import { ElMessageBox } from 'element-plus' @@ -240,6 +246,8 @@ } } +const showPopover = ref(false) + /** 搜索按钮操作 */ const handleQuery = () => { queryParams.pageNo = 1 @@ -272,7 +280,7 @@ } /** 查看详情 */ -const handleDetail = (row) => { +const handleDetail = (row: ProcessInstanceVO) => { router.push({ name: 'BpmProcessInstanceDetail', query: { @@ -282,7 +290,7 @@ } /** 取消按钮操作 */ -const handleCancel = async (row) => { +const handleCancel = async (row: ProcessInstanceVO) => { // 二次确认 const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', { confirmButtonText: t('common.ok'), @@ -295,15 +303,6 @@ message.success('取消成功') // 刷新列表 await getList() -} - -// TODO @tuituji:这个 import 是不是没用哈? -import { ClickOutside as vClickOutside } from 'element-plus' - -// TODO @tuituji:onClickAdvancedSearch。方法名叫这个,会更好一些哇?打开高级搜索。 -const popoverRef = ref() -const onClickOutside = () => { - unref(popoverRef).popperRef?.delayHide?.() } /** 激活时 **/ -- Gitblit v1.9.3