首页 > 其他分享 >基于jeecgboot-vue3的Flowable流程--抄送我的功能

基于jeecgboot-vue3的Flowable流程--抄送我的功能

时间:2024-06-11 20:58:37浏览次数:9  
标签:function const record Flowable value -- jeecgboot import false

因为这个项目license问题无法开源,更多技术支持与服务请加入我的知识星球。

1、抄送我的界面代码如下:

<template>
  <div class="p-2">
    <!--查询区域-->
    <div class="jeecg-basic-table-form-container">
      <a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
        <a-row :gutter="24">
          <a-col :lg="6">
            <a-form-item name="title">
              <template #label><span title="抄送标题">抄送标题</span></template>
              <a-input placeholder="请输入抄送标题" v-model:value="queryParam.title"></a-input>
            </a-form-item>
          </a-col>
          <a-col :lg="6">
            <a-form-item name="flowName">
              <template #label><span title="流程名称">流程名称</span></template>
              <a-input placeholder="请输入流程名称" v-model:value="queryParam.flowName"></a-input>
            </a-form-item>
          </a-col>
          <template v-if="toggleSearchStatus">
            <a-col :lg="6">
              <a-form-item name="category">
                <template #label><span title="流程分类">流程分类</span></template>
                <a-input placeholder="请输入流程分类" v-model:value="queryParam.category"></a-input>
              </a-form-item>
            </a-col>
            <a-col :lg="6">
              <a-form-item name="initiatorRealname">
                <template #label><span title="发起人姓名">发起人姓</span></template>
                <a-input placeholder="请输入发起人姓名" v-model:value="queryParam.initiatorRealname"></a-input>
              </a-form-item>
            </a-col>
            <a-col :lg="6">
              <a-form-item name="createTime">
                <template #label><span title="创建日期">创建日期</span></template>
                <a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="请选择创建日期" v-model:value="queryParam.createTime" />
              </a-form-item>
            </a-col>
          </template>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
              <a-col :lg="6">
                <a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
                <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
                <a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
                  {{ toggleSearchStatus ? '收起' : '展开' }}
                  <Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
                </a>
              </a-col>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!--引用表格-->
    <BasicTable @register="registerTable" :rowSelection="rowSelection">
      <!--插槽:table标题-->
      <template #tableTitle>
        <a-button  type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
        <a-dropdown v-if="selectedRowKeys.length > 0">
          <template #overlay>
            <a-menu>
              <a-menu-item key="1" @click="batchHandleDelete">
                <Icon icon="ant-design:delete-outlined"></Icon>
                删除
              </a-menu-item>
            </a-menu>
          </template>
          <a-button>批量操作
            <Icon icon="mdi:chevron-down"></Icon>
          </a-button>
        </a-dropdown>
        <!-- 高级查询 -->
        <super-query :config="superQueryConfig" @search="handleSuperQuery" />
      </template>
      <!--操作栏-->
      <template #action="{ record }">
        <TableAction :actions="getTableAction(record)"/>
      </template>
      <template v-slot:bodyCell="{ column, record, index, text }">
      </template>
    </BasicTable>
    <!-- 表单区域 -->
    <FlowCcModal ref="registerModal" @success="handleSuccess"></FlowCcModal>
  </div>
</template>

<style lang="less" scoped>
  .jeecg-basic-table-form-container {
    padding: 0;
    .table-page-search-submitButtons {
      display: block;
      margin-bottom: 24px;
      white-space: nowrap;
    }
    .query-group-cust{
      min-width: 100px !important;
    }
    .query-group-split-cust{
      width: 30px;
      display: inline-block;
      text-align: center
    }
  }
</style>

2、详情方法如下:

<script lang="ts" name="FlowCc-flowCc" setup>
  import { ref, reactive } from 'vue';
  import { useRouter, useRoute } from 'vue-router';
  import { BasicTable, useTable, TableAction } from '/@/components/Table';
  import { useListPage } from '/@/hooks/system/useListPage';
  import { columns, superQuerySchema } from './FlowCc.data';
  import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, putAppraisal } from './FlowCc.api';
  import { downloadFile } from '/@/utils/common/renderUtils';
  import FlowCcModal from './components/FlowCcModal.vue'
  import { useUserStore } from '/@/store/modules/user';
  import { useMessage } from '/@/hooks/web/useMessage';

  const formRef = ref();
  const queryParam = reactive<any>({});
  const toggleSearchStatus = ref<boolean>(false);
  const registerModal = ref();
  const userStore = useUserStore();
  const { createMessage, createConfirm } = useMessage();
  // 获取路由器对象 href跳转用到
  const router = useRouter();
  const route = useRoute();
  //注册table数据
  const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
    tableProps: {
      title: 'flow_cc',
      api: list,
      columns,
      canResize:false,
      useSearchForm: false,
      actionColumn: {
        width: 120,
        fixed: 'right',
      },
      beforeFetch: (params) => {
        return Object.assign(params, queryParam);
      },
    },
    exportConfig: {
      name: "flow_cc",
      url: getExportUrl,
      params: queryParam,
    },
	  importConfig: {
	    url: getImportUrl,
	    success: handleSuccess
	  },
  });
  const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
  const labelCol = reactive({
    xs:24,
    sm:4,
    xl:6,
    xxl:4
  });
  const wrapperCol = reactive({
    xs: 24,
    sm: 20,
  });

  // 高级查询配置
  const superQueryConfig = reactive(superQuerySchema);

  /**
   * 高级查询事件
   */
  function handleSuperQuery(params) {
    Object.keys(params).map((k) => {
      queryParam[k] = params[k];
    });
    searchQuery();
  }

  /**
   * 新增事件
   */
  function handleAdd() {
    registerModal.value.disableSubmit = false;
    registerModal.value.add();
  }
  
  /**
   * 编辑事件
   */
  function handleEdit(record: Recordable) {
    registerModal.value.disableSubmit = false;
    registerModal.value.edit(record);
  }
   
  /**
   * 详情
   */
  function handleDetail(record: Recordable) {
    console.log("handleFlowRecord record=",record);
      putAppraisal({ id: record.id }).then(res => {
      if (res.success) {
        console.log(res);
      } else {
        createMessage.warning(res.message)
      }
    })
    router.push({ path: '/flowable/task/record/index',
      query: {
        procInsId: record.instanceId,
        deployId: record.deploymentId,
        taskId: record.taskId,
        businessKey: record.businessKey,
        category: record.category,
        appType: record.appType,
        finished: false
    }})
  }
   
  /**
   * 删除事件
   */
  async function handleDelete(record) {
    await deleteOne({ id: record.id }, handleSuccess);
  }
   
  /**
   * 批量删除事件
   */
  async function batchHandleDelete() {
    await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
  }
   
  /**
   * 成功回调
   */
  function handleSuccess() {
    (selectedRowKeys.value = []) && reload();
  }
   
  /**
   * 操作栏
   */
  function getTableAction(record) {
    return [
      {
        label: '详情',
        onClick: handleDetail.bind(null, record),
      },
    ];
  }
   
  /**
   * 查询
   */
  function searchQuery() {
    reload();
  }
  
  /**
   * 重置
   */
  function searchReset() {
    formRef.value.resetFields();
    selectedRowKeys.value = [];
    //刷新数据
    reload();
  }
  



</script>

3、效果图如下:

标签:function,const,record,Flowable,value,--,jeecgboot,import,false
From: https://blog.csdn.net/qq_40032778/article/details/139596418

相关文章

  • C# —— 显示转换
    显示转换:通过一些方法可以将其他数据类型转换为我们想要的数据类型1.括号强转作用:一般情况下将高精度的类型转换为低精度      //语法:变量类型变量名=(转换的变量类型名称)变量;      //注意:精度问题范围问题sbytesb=1;short......
  • MySQL 触发器(实验报告)
    一、实验名称:触发器 二、实验日期:2024年 6月8日三、实验目的:掌握MySQL触发器的创建及调用;四、实验用的仪器和材料:硬件:PC电脑一台;配置:内存,2G及以上 硬盘250G及以上软件环境:操作系统windows7以上数据库环境:MySQL5.7或MySQL8.0.20五、实验步骤和方法练习:#......
  • 线程介绍及其Java如何用Thread 类创建线程和操作线程方法
    目录一、进程和线程1.1进程特征2.2线程特征2.3区别二、利用Thread类创建线程2.1通过创建Thread子类,重写run()方法2.2通过实现Runnable接口,重写run()方法2.3.Callable接口+FutureTask创建线程2.3三种方法区别1.通过创建Thread子类,重写run()方法2.通过实......
  • PADS Layout为什么布的线是细狗
    PADSLayout为什么布的线是细狗​我在用PADSLayout布线的时候为什么我布的线这么细,明明调了线宽,但为什么还是跟飞线一样这个就跟设置有关了将其设置成0,就可以显示所有线了┈┈┈┈▕▔╲┈┈┈┈┈┈┈┈┈┈┈▕▔╲┈┈┈┈┈┈┈┈┈┈┈▕▔╲┈┈┈┈┈┈......
  • 见怪更怪
    爱爱爱—方大同在哪里记载第一个桃花贼谁在哪里典卖第一支紫玉钗我在这里见怪更怪见过电影里面人家的海更想去看海唱过人家的爱更想找爱你哭起来我笑起来都为了爱爱爱有一天翻开辞海找不到爱花不开树不摆还是更畅快爱还是会期待还是觉得孤单太失败我爱......
  • [20240529]简单探究FREE LISTS列表.txt
    [20240529]简单探究FREELISTS列表.txt--//简单探究shraedpool的FREELISTS列表.1.环境:SYS@test>@ver1PORT_STRING         VERSION   BANNER                                                       ......
  • spring-1-IOC、创建bean的方式、创建bean的过程
    1.背景IOC(InversionofControl,控制反转)控制反转是一种设计原则,它将对象的创建和管理责任从应用代码中移交给容器。在Spring中,IOC容器负责管理应用中的所有对象,包括它们的生命周期和相互之间的依赖关系。IOC的主要目的是为了减少代码之间的耦合,使代码更加模块化和可测试。这......
  • [20240601]简单探究free list chunk size的分布.txt
    [20240601]简单探究freelistchunksize的分布.txt--//前几天探究探究freelist,无意中发现12c版本freelistchunksize的发生了变化.单独另外写一篇blog.--//我开始分析以为脚本执行有问题,仔细查看12c版本freelistchunksize分布发生了变化.--//我找了以前的11g下的转储,发......
  • [20240604]简单探究RESERVED FREE LISTS chunk size的分布.txt
    [20240604]简单探究RESERVEDFREELISTSchunksize的分布.txt--//前几天探究探究freelist,无意中发现12c版本freelistchunksize的发生了变化.单独另外写一篇blog.--//我开始分析以为脚本执行有问题,仔细查看12c版本freelistchunksize分布发生了变化.--//我找了以前的11g下......
  • 为何超时
    为何超时代码如下defhw(n):sun=0sun=n%10*100+n//10%10*10+n//10//10%10ifsun==n:returnTruereturnFalsedefss(n):foriinrange(2,n+1):w=Trueforjinrange(2,i):ifi%j==0:w=Fa......