使用openauth.net添加一个支持自定义页面的流程

系统使用的动态表单可以满足日常普通的审批功能,但如果想对用户提交的表单数据进行统计分析、需要用户提交附件、需要复杂的表单交互,这时就需要开发者开发自己的表单页面。实现更加丰富的功能,效果如下:

本文以如何添加一个请假流程为例:

  • 添加数据库表结构

先在数据库中添加记录表单数据的表,即请假条中的内容。

  • 编写请假条表单代码

系统约定,所有开发人员自己开发的表单,全部放在views/forms文件夹下。并且以下图的文件结构进行放置。

其中:

frmLeaveReq:为业务表单的文件夹名称,必须与数据库表名保持一致。

add.vue:为业务表单页面,负责编写业务输入逻辑。内部methods必须包含方法:

getData() {
  return this.temp
}

detail.vue:为业务表单的展示页面。上层框架会调用该方法来获取表单中的数据,用于后续逻辑处理。

  • 注册表单

在项目main.js中注入刚刚添加的组件:

// 请假条表单和详情

import FrmLeaveReqAdd from '@/views/forms/userDefine/frmLeaveReq/add'

import FrmLeaveReqDetail from '@/views/forms/userDefine/frmLeaveReq/detail'

Vue.component('FrmLeaveReqAdd', FrmLeaveReqAdd)

Vue.component('FrmLeaveReqDetail', FrmLeaveReqDetail)

并在表单添加的下拉框里添加:

  • 配置表单

编写完上面代码后,运行企业版。使用【基础配置】--【表单设计】--【添加】功能添加刚刚的表单:

这样就可以在流程设计里面,选择使用刚刚添加的表单了

 

.net 中 vue 玩的最溜的,vue 中 .net 玩的最溜的,OpenAuth.Net 企业版正式发布。star 1900+的关注者,数十位付费企业及个人用户见证 OpenAuth.Net 的成长。从简单的 demo 到集权限管理、自定义表单、工作流管理为一体的快速开发框架。

最好用的.net 权限框架,工作流框架。项目地址:http://www.openauth.me/


 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
可以使用Spring Security框架来实现登录,并且可以自定义登录页面。具体步骤如下: 1. 引入Spring Security的依赖: ```xml <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-web</artifactId> <version>5.4.5</version> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-config</artifactId> <version>5.4.5</version> </dependency> ``` 2. 配置Spring Security: ```java @Configuration @EnableWebSecurity public class SecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { http .csrf().disable() .authorizeRequests() .antMatchers("/login").permitAll() .anyRequest().authenticated() .and() .formLogin() .loginPage("/customLogin") // 自定义登录页面 .loginProcessingUrl("/doLogin") .defaultSuccessUrl("/") .permitAll(); } @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.inMemoryAuthentication() .withUser("user").password("{noop}password").roles("USER"); } } ``` 3. 在自定义登录页面添加表单: ```html <form action="/doLogin" method="post"> <div> <label for="username">Username:</label> <input type="text" name="username" id="username" /> </div> <div> <label for="password">Password:</label> <input type="password" name="password" id="password" /> </div> <div> <button type="submit">Log in</button> </div> </form> ``` 以上就是实现使用Spring Security做一个登录并且自定义登录页面的步骤。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值