周宇
7 months ago
38 changed files with 5746 additions and 80 deletions
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,29 @@
|
||||
// 返回当前激活的Tab页面关联的iframe的Windows对象
|
||||
function activeWindow() { |
||||
var topWindow = $(window.parent.document); |
||||
var currentId = $('.page-tabs-content', topWindow).find('.active').attr('data-id'); |
||||
if (!currentId) { |
||||
return window.parent; |
||||
} |
||||
return $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow)[0].contentWindow; |
||||
} |
||||
|
||||
// 判断字符串是否为空
|
||||
function isEmpty(value) { |
||||
if (value == null || this.trim(value) == "") { |
||||
return true; |
||||
} |
||||
return false; |
||||
} |
||||
// 判断一个字符串是否为非空串
|
||||
function isNotEmpty(value) { |
||||
return !isEmpty(value); |
||||
} |
||||
// 空格截取
|
||||
function trim(value) { |
||||
if (value == null) { |
||||
return ""; |
||||
} |
||||
return value.toString().replace(/(^\s*)|(\s*$)|\r|\n/g, ""); |
||||
} |
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -0,0 +1,13 @@
|
||||
.el-collapse { |
||||
border-top: 0px solid #EBEEF5; |
||||
border-bottom: 0px solid #EBEEF5; |
||||
} |
||||
|
||||
|
||||
.el-collapse-item__wrap { |
||||
border-bottom: 0px solid #EBEEF5; |
||||
} |
||||
|
||||
.el-collapse-item__header.is-active { |
||||
display: none; |
||||
} |
@ -0,0 +1,140 @@
|
||||
function request(url,data){ |
||||
const params = new URLSearchParams(); |
||||
if(data!=null){ |
||||
for(let key in data){ |
||||
params.append(key, data[key]); |
||||
} |
||||
} |
||||
return service({ |
||||
url: url, |
||||
method: 'post', |
||||
data: params, |
||||
}) |
||||
} |
||||
|
||||
|
||||
axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8' |
||||
|
||||
// 创建axios实例
|
||||
const service = axios.create({ |
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: ctx, |
||||
// 超时 毫秒
|
||||
timeout: 10000, |
||||
}) |
||||
|
||||
let loading; |
||||
// request拦截器
|
||||
service.interceptors.request.use(config => { |
||||
if(loading==null){ |
||||
loading = app.$loading({ |
||||
lock: true, |
||||
text: '加载中...', |
||||
spinner: 'el-icon-loading', |
||||
background: 'rgba(0, 0, 0, 0.7)' |
||||
}); |
||||
} |
||||
|
||||
//config.headers['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
|
||||
//config.headers.Accept = 'application/x-www-form-urlencoded;charset=utf-8';
|
||||
// get请求映射params参数
|
||||
if (config.method === 'get' && config.params) { |
||||
let url = config.url + '?'; |
||||
for (const propName of Object.keys(config.params)) { |
||||
const value = config.params[propName]; |
||||
var part = encodeURIComponent(propName) + "="; |
||||
if (value !== null && typeof(value) !== "undefined") { |
||||
if (typeof value === 'object') { |
||||
for (const key of Object.keys(value)) { |
||||
let params = propName + '[' + key + ']'; |
||||
var subPart = encodeURIComponent(params) + "="; |
||||
url += subPart + encodeURIComponent(value[key]) + "&"; |
||||
} |
||||
} else { |
||||
url += part + encodeURIComponent(value) + "&"; |
||||
} |
||||
} |
||||
} |
||||
url = url.slice(0, -1); |
||||
config.params = {}; |
||||
config.url = url; |
||||
} |
||||
return config |
||||
}, error => { |
||||
if(loading!=null){ |
||||
loading.close(); |
||||
loading=null; |
||||
} |
||||
|
||||
app.$message.error(error) |
||||
console.log(error) |
||||
Promise.reject(error) |
||||
}) |
||||
|
||||
// 响应拦截器
|
||||
service.interceptors.response.use(res => { |
||||
if(loading!=null){ |
||||
loading.close(); |
||||
loading=null; |
||||
} |
||||
// 未设置状态码则默认成功状态
|
||||
const code = res.data.code || 200; |
||||
// 获取错误信息
|
||||
const msg = res.data.msg; |
||||
//登录超时
|
||||
if (code === 1) { |
||||
app.$message.error(msg) |
||||
return Promise.reject(new Error(msg)) |
||||
//Toast.fail('登录状态已过期,请重新登录');
|
||||
/* store.dispatch('LogOut').then(() => { |
||||
router.push({path:"/login"}).catch(()=>{}); |
||||
})*/ |
||||
|
||||
/*MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { |
||||
confirmButtonText: '重新登录', |
||||
cancelButtonText: '取消', |
||||
type: 'warning' |
||||
} |
||||
).then(() => { |
||||
store.dispatch('LogOut').then(() => { |
||||
location.href = '/index'; |
||||
}) |
||||
}).catch(() => {});*/ |
||||
} |
||||
//警告
|
||||
else if (code === 301) { |
||||
app.$message.error(msg) |
||||
return Promise.reject(new Error(msg)) |
||||
} |
||||
//错误
|
||||
else if (code === 500) { |
||||
app.$message.error(msg) |
||||
return Promise.reject(new Error(msg)) |
||||
} |
||||
//其他错误
|
||||
else if (code !== 200) { |
||||
app.$message.error(msg) |
||||
return Promise.reject('error') |
||||
} else { |
||||
return res.data |
||||
} |
||||
}, |
||||
error => { |
||||
if(loading!=null){ |
||||
loading.close(); |
||||
loading=null; |
||||
} |
||||
console.log('err' + error) |
||||
let { message } = error; |
||||
if (message == "Network Error") { |
||||
message = "后端接口连接异常"; |
||||
} |
||||
else if (message.includes("timeout")) { |
||||
message = "系统接口请求超时"; |
||||
} |
||||
else if (message.includes("Request failed with status code")) { |
||||
message = "系统接口" + message.substr(message.length - 3) + "异常"; |
||||
} |
||||
app.$message.error(message) |
||||
return Promise.reject(error) |
||||
}) |
File diff suppressed because one or more lines are too long
@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
<parent> |
||||
<artifactId>flysoft</artifactId> |
||||
<groupId>com.flysoft</groupId> |
||||
<version>4.2.0</version> |
||||
</parent> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
<artifactId>flysoft-customform</artifactId> |
||||
<description> |
||||
自定义表单模块 |
||||
</description> |
||||
|
||||
<dependencies> |
||||
<dependency> |
||||
<groupId>org.projectlombok</groupId> |
||||
<artifactId>lombok</artifactId> |
||||
<scope>provided</scope> |
||||
</dependency> |
||||
|
||||
<!-- 通用工具--> |
||||
<dependency> |
||||
<groupId>com.flysoft</groupId> |
||||
<artifactId>flysoft-common</artifactId> |
||||
</dependency> |
||||
|
||||
<!-- 核心模块--> |
||||
<dependency> |
||||
<groupId>com.flysoft</groupId> |
||||
<artifactId>flysoft-framework</artifactId> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.springframework</groupId> |
||||
<artifactId>spring-test</artifactId> |
||||
<version>5.1.7.RELEASE</version> |
||||
<scope>compile</scope> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.apache.commons</groupId> |
||||
<artifactId>commons-io</artifactId> |
||||
<version>1.3.2</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.flysoft</groupId> |
||||
<artifactId>flysoft-process-configuration</artifactId> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.flysoft</groupId> |
||||
<artifactId>flysoft-document</artifactId> |
||||
</dependency> |
||||
|
||||
</dependencies> |
||||
|
||||
</project> |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,236 @@
|
||||
package com.flysoft.customform.domain; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.util.Date; |
||||
@Data |
||||
public class PublicCustomForm extends PublicCustomFormBase{ |
||||
/** |
||||
* 主键id |
||||
*/ |
||||
private String id; |
||||
|
||||
/** |
||||
* 自定义表单,表单设计json |
||||
*/ |
||||
private String customJson; |
||||
|
||||
/** |
||||
* 自定义表单,表单数据 |
||||
*/ |
||||
private String customData; |
||||
|
||||
/** |
||||
* 文档状态 1拟稿 2流转中 3归档 |
||||
*/ |
||||
private String wjstate; |
||||
|
||||
/** |
||||
* 流程id |
||||
*/ |
||||
private String flowid; |
||||
|
||||
/** |
||||
* 流程名称 |
||||
*/ |
||||
private String subflowFlowname; |
||||
|
||||
/** |
||||
* 创建人单位id |
||||
*/ |
||||
private String createUserdwid; |
||||
|
||||
/** |
||||
* 创建人岗位id |
||||
*/ |
||||
private String createUsergwid; |
||||
|
||||
/** |
||||
* 创建人id |
||||
*/ |
||||
private String createUserid; |
||||
|
||||
/** |
||||
* 归档时间 |
||||
*/ |
||||
private Date archdate; |
||||
|
||||
/** |
||||
* 文档经办人 |
||||
*/ |
||||
private String doneman; |
||||
|
||||
/** |
||||
* 创建者 |
||||
*/ |
||||
private String createBy; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 更新者 |
||||
*/ |
||||
private String updateBy; |
||||
|
||||
/** |
||||
* 更新时间 |
||||
*/ |
||||
private Date updateTime; |
||||
|
||||
/** |
||||
* 表单类型(显示业务表基础表名) |
||||
*/ |
||||
private String businessType; |
||||
|
||||
/** |
||||
* 内部公开 0:不公开 1公开 2 按角色人员公开 |
||||
*/ |
||||
private String isPublic; |
||||
|
||||
/** |
||||
* 角色id |
||||
*/ |
||||
private String roleid; |
||||
|
||||
/** |
||||
* 内部公开单位id |
||||
*/ |
||||
private String unitId; |
||||
|
||||
/** |
||||
* 业务控制层路径 |
||||
*/ |
||||
private String formDetailUrl; |
||||
|
||||
/** |
||||
* 是否需要归档 0:不归档,1:归档 |
||||
*/ |
||||
private String isGuid; |
||||
|
||||
|
||||
|
||||
/** 历史意见1 */ |
||||
private String fqyjx1; |
||||
|
||||
/** 意见1 */ |
||||
private String flow_yj1; |
||||
|
||||
/** 历史意见2 */ |
||||
private String fqyjx2; |
||||
|
||||
/** 意见2 */ |
||||
private String flow_yj2; |
||||
|
||||
/** 历史意见3 */ |
||||
private String fqyjx3; |
||||
|
||||
/** 意见3 */ |
||||
private String flow_yj3; |
||||
|
||||
/** 历史意见4 */ |
||||
private String fqyjx4; |
||||
|
||||
/** 意见4 */ |
||||
private String flow_yj4; |
||||
|
||||
/** 历史意见5 */ |
||||
private String fqyjx5; |
||||
|
||||
/** 意见5 */ |
||||
private String flow_yj5; |
||||
|
||||
/** 历史意见6 */ |
||||
private String fqyjx6; |
||||
|
||||
/** 意见6 */ |
||||
private String flow_yj6; |
||||
|
||||
/** 历史意见7 */ |
||||
private String fqyjx7; |
||||
|
||||
/** 意见7 */ |
||||
private String flow_yj7; |
||||
|
||||
/** 历史意见8 */ |
||||
private String fqyjx8; |
||||
|
||||
/** 意见8 */ |
||||
private String flow_yj8; |
||||
|
||||
/** 历史意见9 */ |
||||
private String fqyjx9; |
||||
|
||||
/** 意见9 */ |
||||
private String flow_yj9; |
||||
|
||||
/** 历史意见10 */ |
||||
private String fqyjx10; |
||||
|
||||
/** 意见10 */ |
||||
private String flow_yj10; |
||||
|
||||
/** 历史意见11 */ |
||||
private String fqyjx11; |
||||
|
||||
/** 意见11 */ |
||||
private String flow_yj11; |
||||
|
||||
/** 历史意见12 */ |
||||
private String fqyjx12; |
||||
|
||||
/** 意见12 */ |
||||
private String flow_yj12; |
||||
|
||||
/** 历史意见13 */ |
||||
private String fqyjx13; |
||||
|
||||
/** 意见13 */ |
||||
private String flow_yj13; |
||||
|
||||
/** 历史意见14 */ |
||||
private String fqyjx14; |
||||
|
||||
/** 意见14 */ |
||||
private String flow_yj14; |
||||
|
||||
/** 历史意见15 */ |
||||
private String fqyjx15; |
||||
|
||||
/** 意见15 */ |
||||
private String flow_yj15; |
||||
|
||||
/** 历史意见16 */ |
||||
private String fqyjx16; |
||||
|
||||
/** 意见16 */ |
||||
private String flow_yj16; |
||||
|
||||
/** 历史意见17 */ |
||||
private String fqyjx17; |
||||
|
||||
/** 意见17 */ |
||||
private String flow_yj17; |
||||
|
||||
/** 历史意见18 */ |
||||
private String fqyjx18; |
||||
|
||||
/** 意见18 */ |
||||
private String flow_yj18; |
||||
|
||||
/** 历史意见19 */ |
||||
private String fqyjx19; |
||||
|
||||
/** 意见19 */ |
||||
private String flow_yj19; |
||||
|
||||
/** 历史意见20 */ |
||||
private String fqyjx20; |
||||
|
||||
/** 意见20 */ |
||||
private String flow_yj20; |
||||
|
||||
|
||||
} |
@ -0,0 +1,144 @@
|
||||
package com.flysoft.customform.domain; |
||||
|
||||
import com.flysoft.common.annotation.Excel; |
||||
import lombok.Data; |
||||
|
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* 其他页面使用字段,不在表单中存取 |
||||
*/ |
||||
@Data |
||||
public class PublicCustomFormBase { |
||||
/** 历史意见1 */ |
||||
@Excel(name = "历史意见1") |
||||
private String fqyjx1; |
||||
|
||||
/** 意见1 */ |
||||
@Excel(name = "意见1") |
||||
private String flow_yj1; |
||||
|
||||
/** 历史意见2 */ |
||||
@Excel(name = "历史意见2") |
||||
private String fqyjx2; |
||||
|
||||
/** 意见2 */ |
||||
@Excel(name = "意见2") |
||||
private String flow_yj2; |
||||
|
||||
/** 历史意见3 */ |
||||
@Excel(name = "历史意见3") |
||||
private String fqyjx3; |
||||
|
||||
/** 意见3 */ |
||||
@Excel(name = "意见3") |
||||
private String flow_yj3; |
||||
|
||||
/** 历史意见4 */ |
||||
@Excel(name = "历史意见4") |
||||
private String fqyjx4; |
||||
|
||||
/** 意见4 */ |
||||
@Excel(name = "意见4") |
||||
private String flow_yj4; |
||||
|
||||
/** 历史意见5 */ |
||||
@Excel(name = "历史意见5") |
||||
private String fqyjx5; |
||||
|
||||
/** 意见5 */ |
||||
@Excel(name = "意见5") |
||||
private String flow_yj5; |
||||
|
||||
/** 历史意见6 */ |
||||
private String fqyjx6; |
||||
|
||||
/** 意见6 */ |
||||
private String flow_yj6; |
||||
|
||||
/** 历史意见7 */ |
||||
private String fqyjx7; |
||||
|
||||
/** 意见7 */ |
||||
private String flow_yj7; |
||||
|
||||
/** 历史意见8 */ |
||||
private String fqyjx8; |
||||
|
||||
/** 意见8 */ |
||||
private String flow_yj8; |
||||
|
||||
/** 历史意见9 */ |
||||
private String fqyjx9; |
||||
|
||||
/** 意见9 */ |
||||
private String flow_yj9; |
||||
|
||||
/** 历史意见10 */ |
||||
private String fqyjx10; |
||||
|
||||
/** 意见10 */ |
||||
private String flow_yj10; |
||||
|
||||
/** 历史意见11 */ |
||||
private String fqyjx11; |
||||
|
||||
/** 意见11 */ |
||||
private String flow_yj11; |
||||
|
||||
/** 历史意见12 */ |
||||
private String fqyjx12; |
||||
|
||||
/** 意见12 */ |
||||
private String flow_yj12; |
||||
|
||||
/** 历史意见13 */ |
||||
private String fqyjx13; |
||||
|
||||
/** 意见13 */ |
||||
private String flow_yj13; |
||||
|
||||
/** 历史意见14 */ |
||||
private String fqyjx14; |
||||
|
||||
/** 意见14 */ |
||||
private String flow_yj14; |
||||
|
||||
/** 历史意见15 */ |
||||
private String fqyjx15; |
||||
|
||||
/** 意见15 */ |
||||
private String flow_yj15; |
||||
|
||||
/** 历史意见16 */ |
||||
private String fqyjx16; |
||||
|
||||
/** 意见16 */ |
||||
private String flow_yj16; |
||||
|
||||
/** 历史意见17 */ |
||||
private String fqyjx17; |
||||
|
||||
/** 意见17 */ |
||||
private String flow_yj17; |
||||
|
||||
/** 历史意见18 */ |
||||
private String fqyjx18; |
||||
|
||||
/** 意见18 */ |
||||
private String flow_yj18; |
||||
|
||||
/** 历史意见19 */ |
||||
private String fqyjx19; |
||||
|
||||
/** 意见19 */ |
||||
private String flow_yj19; |
||||
|
||||
/** 历史意见20 */ |
||||
private String fqyjx20; |
||||
|
||||
/** 意见20 */ |
||||
private String flow_yj20; |
||||
|
||||
|
||||
} |
@ -0,0 +1,17 @@
|
||||
package com.flysoft.customform.dto; |
||||
|
||||
import com.flysoft.framework.dto.BasePageDto; |
||||
import lombok.Data; |
||||
|
||||
|
||||
@Data |
||||
public class PublicCustomFormDto extends BasePageDto { |
||||
|
||||
private String id;//主键id
|
||||
|
||||
private String wjstate;//文档状态 1拟稿 2流转中 3归档
|
||||
|
||||
|
||||
|
||||
|
||||
} |
@ -0,0 +1,20 @@
|
||||
package com.flysoft.customform.mapper; |
||||
|
||||
import com.flysoft.customform.domain.PublicCustomForm; |
||||
import com.flysoft.customform.dto.PublicCustomFormDto; |
||||
import com.flysoft.customform.vo.PublicCustomFormVo; |
||||
|
||||
import java.util.List; |
||||
|
||||
public interface PublicCustomFormMapper { |
||||
int deleteByPrimaryKey(String id); |
||||
|
||||
int insertSelective(PublicCustomForm record); |
||||
|
||||
PublicCustomFormVo selectByPrimaryKey(String id); |
||||
|
||||
int updateByPrimaryKeySelective(PublicCustomForm record); |
||||
|
||||
List<PublicCustomForm> selectList(PublicCustomFormDto record); |
||||
|
||||
} |
@ -0,0 +1,21 @@
|
||||
package com.flysoft.customform.service; |
||||
|
||||
|
||||
import com.flysoft.customform.domain.PublicCustomForm; |
||||
import com.flysoft.customform.dto.PublicCustomFormDto; |
||||
import com.flysoft.customform.vo.PublicCustomFormVo; |
||||
|
||||
import java.util.List; |
||||
|
||||
public interface PublicCustomFormService { |
||||
|
||||
int deleteByPrimaryKey(String id); |
||||
|
||||
int insertSelective(PublicCustomForm record); |
||||
|
||||
PublicCustomFormVo selectByPrimaryKey(String id); |
||||
|
||||
int updateByPrimaryKeySelective(PublicCustomForm record); |
||||
|
||||
List<PublicCustomForm> selectList(PublicCustomFormDto record); |
||||
} |
@ -0,0 +1,44 @@
|
||||
package com.flysoft.customform.service.impl; |
||||
|
||||
|
||||
import com.flysoft.customform.domain.PublicCustomForm; |
||||
import com.flysoft.customform.dto.PublicCustomFormDto; |
||||
import com.flysoft.customform.mapper.PublicCustomFormMapper; |
||||
import com.flysoft.customform.service.PublicCustomFormService; |
||||
import com.flysoft.customform.vo.PublicCustomFormVo; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.*; |
||||
|
||||
|
||||
@Service |
||||
public class PublicCustomFormServiceImpl implements PublicCustomFormService { |
||||
@Resource |
||||
private PublicCustomFormMapper mapper; |
||||
|
||||
@Override |
||||
public int deleteByPrimaryKey(String id) { |
||||
return mapper.deleteByPrimaryKey(id); |
||||
} |
||||
|
||||
@Override |
||||
public int insertSelective(PublicCustomForm record) { |
||||
return mapper.insertSelective(record); |
||||
} |
||||
|
||||
@Override |
||||
public PublicCustomFormVo selectByPrimaryKey(String id) { |
||||
return mapper.selectByPrimaryKey(id); |
||||
} |
||||
|
||||
@Override |
||||
public int updateByPrimaryKeySelective(PublicCustomForm record) { |
||||
return mapper.updateByPrimaryKeySelective(record); |
||||
} |
||||
|
||||
@Override |
||||
public List<PublicCustomForm> selectList(PublicCustomFormDto record) { |
||||
return mapper.selectList(record); |
||||
} |
||||
} |
@ -0,0 +1,10 @@
|
||||
package com.flysoft.customform.vo; |
||||
|
||||
import com.flysoft.customform.domain.PublicCustomForm; |
||||
import lombok.Data; |
||||
|
||||
|
||||
@Data |
||||
public class PublicCustomFormVo extends PublicCustomForm { |
||||
|
||||
} |
@ -0,0 +1,256 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.flysoft.customform.mapper.PublicCustomFormMapper"> |
||||
<resultMap id="BaseResultMap" type="com.flysoft.customform.vo.PublicCustomFormVo"> |
||||
<id column="id" jdbcType="VARCHAR" property="id" /> |
||||
<result column="custom_json" jdbcType="VARCHAR" property="customJson" /> |
||||
<result column="custom_data" jdbcType="VARCHAR" property="customData" /> |
||||
<result column="wjstate" jdbcType="VARCHAR" property="wjstate" /> |
||||
<result column="flowid" jdbcType="VARCHAR" property="flowid" /> |
||||
<result column="subflow_flowname" jdbcType="VARCHAR" property="subflowFlowname" /> |
||||
<result column="create_userdwid" jdbcType="VARCHAR" property="createUserdwid" /> |
||||
<result column="create_usergwid" jdbcType="VARCHAR" property="createUsergwid" /> |
||||
<result column="create_userid" jdbcType="VARCHAR" property="createUserid" /> |
||||
<result column="archdate" jdbcType="TIMESTAMP" property="archdate" /> |
||||
<result column="doneman" jdbcType="VARCHAR" property="doneman" /> |
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" /> |
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> |
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
||||
<result column="business_type" jdbcType="VARCHAR" property="businessType" /> |
||||
<result column="is_public" jdbcType="VARCHAR" property="isPublic" /> |
||||
<result column="roleid" jdbcType="VARCHAR" property="roleid" /> |
||||
<result column="unit_id" jdbcType="VARCHAR" property="unitId" /> |
||||
<result column="form_detail_url" jdbcType="VARCHAR" property="formDetailUrl" /> |
||||
<result column="is_guid" jdbcType="VARCHAR" property="isGuid" /> |
||||
</resultMap> |
||||
<sql id="Base_Column_List"> |
||||
id, custom_json, custom_data, wjstate, flowid, subflow_flowname, create_userdwid, |
||||
create_usergwid, create_userid, archdate, doneman, create_by, create_time, update_by, |
||||
update_time, business_type, is_public, roleid, unit_id, form_detail_url, is_guid |
||||
</sql> |
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> |
||||
select |
||||
<include refid="Base_Column_List" /> |
||||
from public_custom_form |
||||
where id = #{id,jdbcType=VARCHAR} |
||||
</select> |
||||
|
||||
<select id="selectList" parameterType="com.flysoft.customform.dto.PublicCustomFormDto" resultMap="BaseResultMap"> |
||||
select |
||||
<include refid="Base_Column_List" /> |
||||
from public_custom_form |
||||
<where> |
||||
<if test="wjstate!=null and wjstate!=''"> |
||||
and wjstate=#{wjstate} |
||||
</if> |
||||
</where> |
||||
</select> |
||||
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> |
||||
delete from public_custom_form |
||||
where id = #{id,jdbcType=VARCHAR} |
||||
</delete> |
||||
|
||||
<insert id="insertSelective" parameterType="com.flysoft.customform.domain.PublicCustomForm"> |
||||
insert into public_custom_form |
||||
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
<if test="id != null"> |
||||
id, |
||||
</if> |
||||
<if test="customJson != null"> |
||||
custom_json, |
||||
</if> |
||||
<if test="customData != null"> |
||||
custom_data, |
||||
</if> |
||||
<if test="wjstate != null"> |
||||
wjstate, |
||||
</if> |
||||
<if test="flowid != null"> |
||||
flowid, |
||||
</if> |
||||
<if test="subflowFlowname != null"> |
||||
subflow_flowname, |
||||
</if> |
||||
<if test="createUserdwid != null"> |
||||
create_userdwid, |
||||
</if> |
||||
<if test="createUsergwid != null"> |
||||
create_usergwid, |
||||
</if> |
||||
<if test="createUserid != null"> |
||||
create_userid, |
||||
</if> |
||||
<if test="archdate != null"> |
||||
archdate, |
||||
</if> |
||||
<if test="doneman != null"> |
||||
doneman, |
||||
</if> |
||||
<if test="createBy != null"> |
||||
create_by, |
||||
</if> |
||||
<if test="createTime != null"> |
||||
create_time, |
||||
</if> |
||||
<if test="updateBy != null"> |
||||
update_by, |
||||
</if> |
||||
<if test="updateTime != null"> |
||||
update_time, |
||||
</if> |
||||
<if test="businessType != null"> |
||||
business_type, |
||||
</if> |
||||
<if test="isPublic != null"> |
||||
is_public, |
||||
</if> |
||||
<if test="roleid != null"> |
||||
roleid, |
||||
</if> |
||||
<if test="unitId != null"> |
||||
unit_id, |
||||
</if> |
||||
<if test="formDetailUrl != null"> |
||||
form_detail_url, |
||||
</if> |
||||
<if test="isGuid != null"> |
||||
is_guid, |
||||
</if> |
||||
</trim> |
||||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
<if test="id != null"> |
||||
#{id,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="customJson != null"> |
||||
#{customJson,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="customData != null"> |
||||
#{customData,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="wjstate != null"> |
||||
#{wjstate,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="flowid != null"> |
||||
#{flowid,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="subflowFlowname != null"> |
||||
#{subflowFlowname,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="createUserdwid != null"> |
||||
#{createUserdwid,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="createUsergwid != null"> |
||||
#{createUsergwid,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="createUserid != null"> |
||||
#{createUserid,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="archdate != null"> |
||||
#{archdate,jdbcType=TIMESTAMP}, |
||||
</if> |
||||
<if test="doneman != null"> |
||||
#{doneman,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="createBy != null"> |
||||
#{createBy,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="createTime != null"> |
||||
#{createTime,jdbcType=TIMESTAMP}, |
||||
</if> |
||||
<if test="updateBy != null"> |
||||
#{updateBy,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="updateTime != null"> |
||||
#{updateTime,jdbcType=TIMESTAMP}, |
||||
</if> |
||||
<if test="businessType != null"> |
||||
#{businessType,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="isPublic != null"> |
||||
#{isPublic,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="roleid != null"> |
||||
#{roleid,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="unitId != null"> |
||||
#{unitId,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="formDetailUrl != null"> |
||||
#{formDetailUrl,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="isGuid != null"> |
||||
#{isGuid,jdbcType=VARCHAR}, |
||||
</if> |
||||
</trim> |
||||
</insert> |
||||
<update id="updateByPrimaryKeySelective" parameterType="com.flysoft.customform.domain.PublicCustomForm"> |
||||
update public_custom_form |
||||
<set> |
||||
<if test="customJson != null"> |
||||
custom_json = #{customJson,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="customData != null"> |
||||
custom_data = #{customData,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="wjstate != null"> |
||||
wjstate = #{wjstate,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="flowid != null"> |
||||
flowid = #{flowid,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="subflowFlowname != null"> |
||||
subflow_flowname = #{subflowFlowname,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="createUserdwid != null"> |
||||
create_userdwid = #{createUserdwid,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="createUsergwid != null"> |
||||
create_usergwid = #{createUsergwid,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="createUserid != null"> |
||||
create_userid = #{createUserid,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="archdate != null"> |
||||
archdate = #{archdate,jdbcType=TIMESTAMP}, |
||||
</if> |
||||
<if test="doneman != null"> |
||||
doneman = #{doneman,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="createBy != null"> |
||||
create_by = #{createBy,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="createTime != null"> |
||||
create_time = #{createTime,jdbcType=TIMESTAMP}, |
||||
</if> |
||||
<if test="updateBy != null"> |
||||
update_by = #{updateBy,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="updateTime != null"> |
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
||||
</if> |
||||
<if test="businessType != null"> |
||||
business_type = #{businessType,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="isPublic != null"> |
||||
is_public = #{isPublic,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="roleid != null"> |
||||
roleid = #{roleid,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="unitId != null"> |
||||
unit_id = #{unitId,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="formDetailUrl != null"> |
||||
form_detail_url = #{formDetailUrl,jdbcType=VARCHAR}, |
||||
</if> |
||||
<if test="isGuid != null"> |
||||
is_guid = #{isGuid,jdbcType=VARCHAR}, |
||||
</if> |
||||
</set> |
||||
where id = #{id,jdbcType=VARCHAR} |
||||
</update> |
||||
|
||||
</mapper> |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,55 @@
|
||||
package com.flysoft.processConfiguration.controller; |
||||
|
||||
import com.flysoft.common.core.controller.BaseController; |
||||
import com.flysoft.common.core.domain.AjaxResult; |
||||
import com.flysoft.processConfiguration.domain.WorkFlowForms; |
||||
import com.flysoft.processConfiguration.service.IFormsCustomService; |
||||
import org.springframework.stereotype.Controller; |
||||
import org.springframework.ui.ModelMap; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.PostMapping; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.ResponseBody; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* 自定义工作流单Controller |
||||
*/ |
||||
@Controller |
||||
@RequestMapping("/processConfiguration/formsCustom") |
||||
public class FormsCustomController extends BaseController { |
||||
private String prefix = "processConfiguration/formsCustom"; |
||||
@Resource |
||||
private IFormsCustomService sev; |
||||
/** |
||||
* 跳转新增 或者编辑 |
||||
*/ |
||||
@GetMapping("/edit") |
||||
public String edit(String id, ModelMap mmap) { |
||||
mmap.put("id", id); |
||||
return prefix + "/edit"; |
||||
} |
||||
|
||||
/** |
||||
* 获取表单信息 |
||||
*/ |
||||
@PostMapping("/details") |
||||
@ResponseBody |
||||
public AjaxResult details(String id) { |
||||
Map<String, Object> res = sev.details(id); |
||||
return AjaxResult.success(res); |
||||
} |
||||
|
||||
/** |
||||
* 拷贝表单信息 |
||||
*/ |
||||
@PostMapping("/copyForm") |
||||
@ResponseBody |
||||
public AjaxResult copyForm(String id) { |
||||
WorkFlowForms workFlowForms = sev.copyForm(id); |
||||
return AjaxResult.success(workFlowForms); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,13 @@
|
||||
package com.flysoft.processConfiguration.service; |
||||
|
||||
|
||||
import com.flysoft.processConfiguration.domain.WorkFlowForms; |
||||
|
||||
import java.util.Map; |
||||
|
||||
public interface IFormsCustomService { |
||||
Map<String,Object> details(String id); |
||||
|
||||
WorkFlowForms copyForm(String id); |
||||
|
||||
} |
@ -0,0 +1,90 @@
|
||||
package com.flysoft.processConfiguration.service.impl; |
||||
|
||||
|
||||
import com.flysoft.common.utils.StringUtils; |
||||
import com.flysoft.framework.util.ShiroUtils; |
||||
import com.flysoft.processConfiguration.domain.WorkFlowForms; |
||||
import com.flysoft.processConfiguration.service.IFormsCustomService; |
||||
import com.flysoft.processConfiguration.service.IWorkFlowFormsService; |
||||
import com.flysoft.system.domain.SysDept; |
||||
import com.flysoft.system.domain.SysUser; |
||||
import com.flysoft.system.service.ISysDeptService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.*; |
||||
|
||||
|
||||
@Service |
||||
public class FormsCustomServiceImpl implements IFormsCustomService { |
||||
@Autowired |
||||
private ISysDeptService deptService; |
||||
|
||||
@Autowired |
||||
private IWorkFlowFormsService workFlowFormsService; |
||||
|
||||
@Override |
||||
public Map<String, Object> details(String id) { |
||||
Map<String,Object> res = new HashMap<>(); |
||||
SysUser user = ShiroUtils.getSysUser(); |
||||
WorkFlowForms forms = null; |
||||
List<SysDept> deptList = null; |
||||
|
||||
//编辑
|
||||
if(StringUtils.isNotEmpty(id)){ |
||||
forms = workFlowFormsService.selectWorkFlowFormsById(id); |
||||
}else{ |
||||
Long sort = workFlowFormsService.selectMaxSort(new WorkFlowForms()); |
||||
if(sort==null){ |
||||
sort=0l; |
||||
} |
||||
sort+=1; |
||||
forms = new WorkFlowForms(); |
||||
forms.setSort(Float.valueOf(sort)); |
||||
forms.setFormsName("自定义表单"+sort); |
||||
forms.setFormsUrl("customform/publicCustomForm/toAdd.html"); |
||||
forms.setFormsDetailUrl("customform/publicCustomForm"); |
||||
forms.setFormsType("public_custom_form"); |
||||
if("admin".equals(user.getLoginName())){ |
||||
forms.setCreateDwId("0");//所有单位
|
||||
}else{ |
||||
forms.setCreateDwId(user.getDwIdStr()); |
||||
} |
||||
forms.setStatus(1); |
||||
forms.setRemark(""); |
||||
forms.setUpdateUserId(""); |
||||
} |
||||
|
||||
if (!"admin".equals(ShiroUtils.getLoginName())) { |
||||
deptList = new ArrayList<>(); |
||||
SysDept dept = deptService.selectDeptByVId(user.getDwIdStr()); |
||||
deptList.add(dept); |
||||
} else { |
||||
deptList = deptService.selectDeptUnitList(); |
||||
if(deptList!=null && !deptList.isEmpty()){ |
||||
SysDept all = new SysDept(); |
||||
all.setVdeptid("0"); |
||||
all.setDeptName("所有单位"); |
||||
deptList.add(0,all); |
||||
} |
||||
} |
||||
|
||||
res.put("forms", forms); |
||||
res.put("user", user); |
||||
res.put("deptList", deptList); |
||||
return res; |
||||
} |
||||
|
||||
@Override |
||||
public WorkFlowForms copyForm(String id) { |
||||
|
||||
WorkFlowForms workFlowForms = workFlowFormsService.selectWorkFlowFormsById(id); |
||||
|
||||
String newProccessId = UUID.randomUUID().toString().replaceAll("-", ""); |
||||
workFlowForms.setId(newProccessId); |
||||
|
||||
workFlowFormsService.insertWorkFlowForms(workFlowForms); |
||||
|
||||
return workFlowForms; |
||||
} |
||||
} |
@ -0,0 +1,242 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org"> |
||||
<head> |
||||
<th:block th:include="include :: vue-header('自定义表单')"/> |
||||
</head> |
||||
<body> |
||||
|
||||
<div id="app"> |
||||
<!-- 表单配置 --> |
||||
<el-dialog title="表单配置" :visible.sync="dialogConfigForm" width="800px" top="8vh"> |
||||
<el-form :model="form" ref="ruleForm"> |
||||
<el-form-item label="序号" label-width="120px" prop="sort" :rules="[{ required: true, message: '序号不能为空!'}]"> |
||||
<el-input v-model="form.sort" autocomplete="off" ></el-input> |
||||
</el-form-item> |
||||
<el-form-item label="表单名称" label-width="120px" prop="formsName" :rules="[{ required: true, message: '表单名称不能为空!'}]"> |
||||
<el-input v-model="form.formsName" autocomplete="off"></el-input> |
||||
</el-form-item> |
||||
<el-form-item label="页面路径" label-width="120px" prop="formsDetailUrl" :rules="[{ required: true, message: '表单路径不能为空!'}]"> |
||||
<el-input v-model="form.formsUrl" autocomplete="off" placeholder="例:document/fwlz/toAdd.html" ></el-input> |
||||
</el-form-item> |
||||
<el-form-item label="表单路径" label-width="120px" prop="formsDetailUrl" :rules="[{ required: true, message: '表单路径不能为空!'}]"> |
||||
<el-input v-model="form.formsDetailUrl" autocomplete="off" placeholder="例:document/fwlz,(后缀方法可以为/add、/edit、/look)" ></el-input> |
||||
</el-form-item> |
||||
<el-form-item label="表名" label-width="120px" prop="formsType" :rules="[{ required: true, message: '表名不能为空!'}]"> |
||||
<el-input v-model="form.formsType" autocomplete="off" ></el-input> |
||||
</el-form-item> |
||||
<el-form-item label="所属单位" label-width="120px" prop="createDwId" :rules="[{ required: true, message: '请选择所属单位!'}]"> |
||||
<el-select v-model="form.createDwId" clearable filterable placeholder="请选择" > |
||||
<el-option |
||||
v-for="item in deptList" |
||||
:key="item.vdeptid" |
||||
:label="item.deptName" |
||||
:value="item.vdeptid"> |
||||
</el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
|
||||
<el-form-item label="备注" label-width="120px"> |
||||
<el-input type="textarea" v-model="form.remark"></el-input> |
||||
</el-form-item> |
||||
</el-form> |
||||
<div slot="footer" class="dialog-footer"> |
||||
<el-button @click="dialogConfigForm = false">取 消</el-button> |
||||
<el-button type="primary" @click="configClick">确 定</el-button> |
||||
</div> |
||||
</el-dialog> |
||||
|
||||
<!-- 表单设计器 --> |
||||
<avue-form-design style="height: 100vh;" |
||||
@submit="handleSubmit" |
||||
ref="formDesign" |
||||
:options="design.options" |
||||
:include-fields="design.includeFields" |
||||
:toolbar="design.toolbar" |
||||
:custom-fields="design.customFields" |
||||
> |
||||
<template slot="toolbar-left"> |
||||
<el-button type="text" |
||||
icon="el-icon-setting" |
||||
@click="handleConfig">配置</el-button> |
||||
</template> |
||||
</avue-form-design> |
||||
</div> |
||||
|
||||
|
||||
<th:block th:include="include :: vue-footer"/> |
||||
|
||||
<script th:inline="javascript"> |
||||
Vue.use(window.AvueFormDesign) |
||||
var app = new Vue({ |
||||
el: '#app', |
||||
data() { |
||||
return { |
||||
id:[[${id}]], |
||||
form:{}, |
||||
deptList:[], |
||||
//配置表单 |
||||
dialogConfigForm:false, |
||||
//设计器 |
||||
design:{ |
||||
toolbar: ['generate', 'preview', 'clear'], |
||||
options: {}, |
||||
includeFields:[ |
||||
//布局字段 |
||||
'group', /*'dynamic', */'title', |
||||
//输入字段 |
||||
'input', 'password', 'textarea', 'number', /*'url', 'array', 'img', 'map',*/ |
||||
//选择字段 |
||||
'radio', 'checkbox', 'select', 'cascader', 'tree', |
||||
//上传字段 |
||||
/*'upload',*/ |
||||
//日期时间字段 |
||||
'year', 'month', 'week', 'date', 'time', 'datetime', 'daterange', 'timerange', 'datetimerange', |
||||
//插件字段(需单独引入依赖) |
||||
/*'ueditor',*/ |
||||
//其他字段 |
||||
/*'icon', 'switch', 'rate', 'slider', 'color'*/ |
||||
], |
||||
customFields: [ |
||||
{ |
||||
title: '标题', |
||||
component: 'el-input', |
||||
icon: 'el-icon-edit', |
||||
label:'标题', |
||||
prop: 'gwsubject', |
||||
span: 24, |
||||
}, |
||||
{ |
||||
title: '意见(flow_yj1)', |
||||
component: 'el-input', |
||||
icon: 'el-icon-edit', |
||||
label:'意见(flow_yj1)', |
||||
prop: 'flow_yj1', |
||||
span: 24, |
||||
}, |
||||
{ |
||||
title: '意见(flow_yj2)', |
||||
component: 'el-input', |
||||
icon: 'el-icon-edit', |
||||
label:'意见(flow_yj2)', |
||||
prop: 'flow_yj2', |
||||
span: 24, |
||||
}, |
||||
{ |
||||
title: '意见(flow_yj3)', |
||||
component: 'el-input', |
||||
icon: 'el-icon-edit', |
||||
label:'意见(flow_yj3)', |
||||
prop: 'flow_yj3', |
||||
span: 24, |
||||
}, |
||||
{ |
||||
title: '意见(flow_yj4)', |
||||
component: 'el-input', |
||||
icon: 'el-icon-edit', |
||||
label:'意见(flow_yj4)', |
||||
prop: 'flow_yj4', |
||||
span: 24, |
||||
}, |
||||
{ |
||||
title: '意见(flow_yj5)', |
||||
component: 'el-input', |
||||
icon: 'el-icon-edit', |
||||
label:'意见(flow_yj5)', |
||||
prop: 'flow_yj5', |
||||
span: 24, |
||||
}, |
||||
{ |
||||
title: '意见(flow_yj6)', |
||||
component: 'el-input', |
||||
icon: 'el-icon-edit', |
||||
label:'意见(flow_yj6)', |
||||
prop: 'flow_yj1', |
||||
span: 24, |
||||
}, |
||||
] |
||||
}, |
||||
} |
||||
}, |
||||
methods: { |
||||
//生成 |
||||
handleSubmit(data) { |
||||
this.$message.success("查看控制台") |
||||
}, |
||||
//配置其他信息 |
||||
handleConfig(){ |
||||
//打开编辑框 |
||||
this.dialogConfigForm =true; |
||||
}, |
||||
//提交保存数据 |
||||
handleSave(){ |
||||
if(isEmpty(this.form.formsName)){ |
||||
this.$message.error('请配置表单信息!'); |
||||
return; |
||||
} |
||||
//获取配置数据 |
||||
this.$refs.formDesign.getData('string').then(data => { |
||||
// if(data.indexOf("prop:'title'")<=0){ |
||||
// this.$message.error('表单缺少标题!'); |
||||
// return; |
||||
// } |
||||
//提交保存 |
||||
this.form.iscustom=2;//是否表单自定义 1 常规表单 2 自定义表单 |
||||
this.form.customJson=data; |
||||
delete this.form.params;//删除多余属性,否则保存失败 |
||||
|
||||
//新增或者修改 |
||||
let url = "processConfiguration/forms/add"; |
||||
if(isNotEmpty(this.id)){ |
||||
url = "processConfiguration/forms/edit"; |
||||
} |
||||
request(url,this.form).then(res => { |
||||
this.$message({ |
||||
message: res.msg, |
||||
type: 'success' |
||||
}); |
||||
parent.layer.closeAll(); |
||||
}); |
||||
}) |
||||
}, |
||||
//配置表单提交 |
||||
configClick(){ |
||||
this.$refs["ruleForm"].validate((valid) => { |
||||
if (valid) { |
||||
this.dialogConfigForm = false; |
||||
} else { |
||||
console.log('error submit!!'); |
||||
return false; |
||||
} |
||||
}); |
||||
}, |
||||
init(){ |
||||
//初始化详细信息 |
||||
request('processConfiguration/formsCustom/details', {"id":this.id}).then(res => { |
||||
this.form=res.data.forms==null?{}:res.data.forms; |
||||
this.deptList=res.data.deptList==null?[]:deptList=res.data.deptList; |
||||
this.design.options=this.form.customJson; |
||||
|
||||
console.log(res.data) |
||||
}); |
||||
}, |
||||
|
||||
}, |
||||
created(){ |
||||
//初始化 |
||||
this.init(); |
||||
window['handleSave']=() =>{this.handleSave()} |
||||
//初始化时为window绑定一个方法 |
||||
/*receiveParamsFromHtml(res){console.log(res)} |
||||
window['vueDefinedMyProp']=(receiveParams) =>{this.receiveParamsFromHtml(receiveParams)} |
||||
*/ |
||||
}, |
||||
|
||||
}); |
||||
|
||||
|
||||
function submitHandler() { |
||||
window['handleSave'](); |
||||
} |
||||
</script> |
||||
</body> |
||||
</html> |
Loading…
Reference in new issue