开发流程与工序关系功能呢。新增工序、流程实体

pull/1/head
wangziyangyang 2020-03-16 12:56:22 +08:00
parent 9b538d6ca6
commit 0027d0eeee
24 changed files with 1121 additions and 2 deletions

View File

@ -0,0 +1,49 @@
package com.wangziyang.mes.basedata.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wangziyang.mes.basedata.request.SpFlowReq;
import com.wangziyang.mes.basedata.service.ISpFlowService;
import com.wangziyang.mes.common.BaseController;
import com.wangziyang.mes.common.Result;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* <p>
*
* </p>
*
* @author WangZiYang
* @since 2020-03-14
*/
@Controller
@RequestMapping("/basedata/flow")
public class SpFlowController extends BaseController {
@Autowired
public ISpFlowService iSpFlowService;
/**
*
*
* @param req
* @return Result
*/
@ApiOperation("主数据表头分页查询")
@ApiImplicitParams({@ApiImplicitParam(name = "req", value = "请求参数", defaultValue = "请求参数")})
@PostMapping("/page")
@ResponseBody
public Result page(SpFlowReq req) {
IPage result = iSpFlowService.page(req);
return Result.success(result);
}
}

View File

@ -0,0 +1,110 @@
package com.wangziyang.mes.basedata.controller;
import com.wangziyang.mes.basedata.entity.SpFlow;
import com.wangziyang.mes.basedata.entity.SpOper;
import com.wangziyang.mes.basedata.request.SpTableManagerReq;
import com.wangziyang.mes.basedata.service.ISpFlowService;
import com.wangziyang.mes.basedata.service.ISpOperService;
import com.wangziyang.mes.basedata.vo.SpOperVo;
import com.wangziyang.mes.common.BaseController;
import com.wangziyang.mes.common.Result;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
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 java.util.ArrayList;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author WangZiYang
* @since 2020-03-14
*/
@Controller
@RequestMapping("/basedata/flow/process")
public class SpFlowOperRelationController extends BaseController {
/**
*
*/
@Autowired
public ISpFlowService iSpFlowService;
/**
*
*/
@Autowired
public ISpOperService iSpOperService;
/**
*
*
* @param model
* @return
*/
@ApiOperation("流程与工序关系管理界面UI")
@ApiImplicitParams({@ApiImplicitParam(name = "model", value = "模型", defaultValue = "模型")})
@GetMapping("/list-ui")
public String listUI(Model model) {
return "basedata/flowprocess/list";
}
/**
*
*
* @param model
* @param record
* @return
*/
@ApiOperation("流程与工序关系管理编辑界面")
@GetMapping("/add-or-update-ui")
public String addOrUpdateUI(Model model, SpFlow record) {
List<SpOper> operList = iSpOperService.list();
List<SpOperVo> spOperVos = new ArrayList<>();
//得出全部的工序数据
for (SpOper spOper : operList) {
SpOperVo operVo = new SpOperVo();
operVo.setValue(spOper.getId());
operVo.setTitle(spOper.getOper());
spOperVos.add(operVo);
}
model.addAttribute("allOper", spOperVos);
if (StringUtils.isNotEmpty(record.getId())) {
SpFlow flowbyId = iSpFlowService.getById(record.getId());
//当前流程信息
model.addAttribute("flow", flowbyId);
// model.addAttribute("current", spOperVos);
}
return "basedata/flowprocess/addOrUpdate";
}
/**
*
*
* @param req
* @return Result
*/
@ApiOperation("主数据表头分页查询")
@ApiImplicitParams({@ApiImplicitParam(name = "req", value = "请求参数", defaultValue = "请求参数")})
@PostMapping("/page")
@ResponseBody
public Result page(SpTableManagerReq req) {
// IPage result = iSpTableManagerService.page(req);
return Result.success();
}
}

View File

@ -0,0 +1,21 @@
package com.wangziyang.mes.basedata.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import com.wangziyang.mes.common.BaseController;
/**
* <p>
*
* </p>
*
* @author WangZiYang
* @since 2020-03-14
*/
@Controller
@RequestMapping("/basedata/sp-oper")
public class SpOperController extends BaseController {
}

View File

@ -0,0 +1,4 @@
package com.wangziyang.mes.basedata.dto;
public class SpFlowOperRelationDto {
}

View File

@ -0,0 +1,98 @@
package com.wangziyang.mes.basedata.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wangziyang.mes.common.BaseEntity;
/**
* <p>
*
* </p>
*
* @author WangZiYang
* @since 2020-03-14
*/
@TableName(value = "sp_flow")
public class SpFlow extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private String flow;
/**
*
*/
private String flowDesc;
/**
* A>B>C
*/
private String process;
@Override
public String toString() {
return "SpFlow{" +
"flow=" + flow +
", flowDesc=" + flowDesc +
", process=" + process +
"}";
}
/**
*
*
* @return flow
*/
public String getFlow() {
return this.flow;
}
/**
*
*
* @param flow
*/
public void setFlow(String flow) {
this.flow = flow;
}
/**
*
*
* @return flowDesc
*/
public String getFlowDesc() {
return this.flowDesc;
}
/**
*
*
* @param flowDesc
*/
public void setFlowDesc(String flowDesc) {
this.flowDesc = flowDesc;
}
/**
* A>B>C
*
* @return process A>B>C
*/
public String getProcess() {
return this.process;
}
/**
* A>B>C
*
* @param process A>B>C
*/
public void setProcess(String process) {
this.process = process;
}
}

View File

@ -0,0 +1,249 @@
package com.wangziyang.mes.basedata.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wangziyang.mes.common.BaseEntity;
/**
* <p>
*
* </p>
*
* @author WangZiYang
* @since 2020-03-14
*/
@TableName("sp_flow_oper_relation")
public class SpFlowOperRelation extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String flowId;
/**
*
*/
private String flow;
/**
* ID
*/
private String perOperId;
/**
*
*/
private String perOper;
/**
* ID
*/
private String operId;
/**
*
*/
private String oper;
/**
* ID
*/
private String nextOperId;
/**
*
*/
private String nextOper;
/**
*
*/
private Integer sortNum;
/**
* firstOper;lastOper
*/
private String operType;
/**
* ID
*
* @return flowId ID
*/
public String getFlowId() {
return this.flowId;
}
/**
* ID
*
* @param flowId ID
*/
public void setFlowId(String flowId) {
this.flowId = flowId;
}
/**
*
*
* @return flow
*/
public String getFlow() {
return this.flow;
}
/**
*
*
* @param flow
*/
public void setFlow(String flow) {
this.flow = flow;
}
/**
* ID
*
* @return perOperId ID
*/
public String getPerOperId() {
return this.perOperId;
}
/**
* ID
*
* @param perOperId ID
*/
public void setPerOperId(String perOperId) {
this.perOperId = perOperId;
}
/**
*
*
* @return perOper
*/
public String getPerOper() {
return this.perOper;
}
/**
*
*
* @param perOper
*/
public void setPerOper(String perOper) {
this.perOper = perOper;
}
/**
* ID
*
* @return operId ID
*/
public String getOperId() {
return this.operId;
}
/**
* ID
*
* @param operId ID
*/
public void setOperId(String operId) {
this.operId = operId;
}
/**
*
*
* @return oper
*/
public String getOper() {
return this.oper;
}
/**
*
*
* @param oper
*/
public void setOper(String oper) {
this.oper = oper;
}
/**
* ID
*
* @return nextOperId ID
*/
public String getNextOperId() {
return this.nextOperId;
}
/**
* ID
*
* @param nextOperId ID
*/
public void setNextOperId(String nextOperId) {
this.nextOperId = nextOperId;
}
/**
*
*
* @return nextOper
*/
public String getNextOper() {
return this.nextOper;
}
/**
*
*
* @param nextOper
*/
public void setNextOper(String nextOper) {
this.nextOper = nextOper;
}
/**
*
*
* @return sortNum
*/
public Integer getSortNum() {
return this.sortNum;
}
/**
*
*
* @param sortNum
*/
public void setSortNum(Integer sortNum) {
this.sortNum = sortNum;
}
/**
* firstOper;lastOper
*
* @return operType firstOper;lastOper
*/
public String getOperType() {
return this.operType;
}
/**
* firstOper;lastOper
*
* @param operType firstOper;lastOper
*/
public void setOperType(String operType) {
this.operType = operType;
}
}

View File

@ -0,0 +1,71 @@
package com.wangziyang.mes.basedata.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wangziyang.mes.common.BaseEntity;
/**
* <p>
*
* </p>
*
* @author WangZiYang
* @since 2020-03-14
*/
@TableName(value = "sp_oper")
public class SpOper extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private String oper;
/**
*
*/
private String operDesc;
@Override
public String toString() {
return "SpOper{" +
"oper=" + oper +
", operDesc=" + operDesc +
"}";
}
/**
*
*
* @return oper
*/
public String getOper() {
return this.oper;
}
/**
*
*
* @param oper
*/
public void setOper(String oper) {
this.oper = oper;
}
/**
*
*
* @return operDesc
*/
public String getOperDesc() {
return this.operDesc;
}
/**
*
*
* @param operDesc
*/
public void setOperDesc(String operDesc) {
this.operDesc = operDesc;
}
}

View File

@ -0,0 +1,16 @@
package com.wangziyang.mes.basedata.mapper;
import com.wangziyang.mes.basedata.entity.SpFlow;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper
* </p>
*
* @author WangZiYang
* @since 2020-03-14
*/
public interface SpFlowMapper extends BaseMapper<SpFlow> {
}

View File

@ -0,0 +1,16 @@
package com.wangziyang.mes.basedata.mapper;
import com.wangziyang.mes.basedata.entity.SpFlowOperRelation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper
* </p>
*
* @author WangZiYang
* @since 2020-03-14
*/
public interface SpFlowOperRelationMapper extends BaseMapper<SpFlowOperRelation> {
}

View File

@ -0,0 +1,16 @@
package com.wangziyang.mes.basedata.mapper;
import com.wangziyang.mes.basedata.entity.SpOper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper
* </p>
*
* @author WangZiYang
* @since 2020-03-14
*/
public interface SpOperMapper extends BaseMapper<SpOper> {
}

View File

@ -0,0 +1,10 @@
package com.wangziyang.mes.basedata.request;
import com.wangziyang.mes.common.BasePageReq;
/**
*
* @author wangziyang
* @since 2020/03/15
*/
public class SpFlowReq extends BasePageReq {
}

View File

@ -0,0 +1,11 @@
package com.wangziyang.mes.basedata.request;
import com.wangziyang.mes.common.BasePageReq;
/**
*
* @author wangziyang
* @since 2020/03/15
*/
public class SpOperReq extends BasePageReq {
}

View File

@ -3,7 +3,9 @@ package com.wangziyang.mes.basedata.request;
import com.wangziyang.mes.common.BasePageReq;
/**
*
*
* @author wangziyang
* @since 2020/03/15
*/
public class SpTableManagerReq extends BasePageReq {
}

View File

@ -0,0 +1,16 @@
package com.wangziyang.mes.basedata.service;
import com.wangziyang.mes.basedata.entity.SpFlowOperRelation;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
*
* </p>
*
* @author WangZiYang
* @since 2020-03-14
*/
public interface ISpFlowOperRelationService extends IService<SpFlowOperRelation> {
}

View File

@ -0,0 +1,16 @@
package com.wangziyang.mes.basedata.service;
import com.wangziyang.mes.basedata.entity.SpFlow;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
*
* </p>
*
* @author WangZiYang
* @since 2020-03-14
*/
public interface ISpFlowService extends IService<SpFlow> {
}

View File

@ -0,0 +1,16 @@
package com.wangziyang.mes.basedata.service;
import com.wangziyang.mes.basedata.entity.SpOper;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
*
* </p>
*
* @author WangZiYang
* @since 2020-03-14
*/
public interface ISpOperService extends IService<SpOper> {
}

View File

@ -0,0 +1,20 @@
package com.wangziyang.mes.basedata.service.impl;
import com.wangziyang.mes.basedata.entity.SpFlowOperRelation;
import com.wangziyang.mes.basedata.mapper.SpFlowOperRelationMapper;
import com.wangziyang.mes.basedata.service.ISpFlowOperRelationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
*
* </p>
*
* @author WangZiYang
* @since 2020-03-14
*/
@Service
public class SpFlowOperRelationServiceImpl extends ServiceImpl<SpFlowOperRelationMapper, SpFlowOperRelation> implements ISpFlowOperRelationService {
}

View File

@ -0,0 +1,20 @@
package com.wangziyang.mes.basedata.service.impl;
import com.wangziyang.mes.basedata.entity.SpFlow;
import com.wangziyang.mes.basedata.mapper.SpFlowMapper;
import com.wangziyang.mes.basedata.service.ISpFlowService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
*
* </p>
*
* @author WangZiYang
* @since 2020-03-14
*/
@Service
public class SpFlowServiceImpl extends ServiceImpl<SpFlowMapper, SpFlow> implements ISpFlowService {
}

View File

@ -0,0 +1,20 @@
package com.wangziyang.mes.basedata.service.impl;
import com.wangziyang.mes.basedata.entity.SpOper;
import com.wangziyang.mes.basedata.mapper.SpOperMapper;
import com.wangziyang.mes.basedata.service.ISpOperService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
*
* </p>
*
* @author WangZiYang
* @since 2020-03-14
*/
@Service
public class SpOperServiceImpl extends ServiceImpl<SpOperMapper, SpOper> implements ISpOperService {
}

View File

@ -0,0 +1,54 @@
package com.wangziyang.mes.basedata.vo;
/**
* 穿
*
* @author wangziyang
* @since 2020/03/16
*/
public class SpOperVo {
/**
* ID
*/
private String value;
/**
*
*/
private String title;
/**
* ID
*
* @return value ID
*/
public String getValue() {
return this.value;
}
/**
* ID
*
* @param value ID
*/
public void setValue(String value) {
this.value = value;
}
/**
*
*
* @return title
*/
public String getTitle() {
return this.title;
}
/**
*
*
* @param title
*/
public void setTitle(String title) {
this.title = title;
}
}

View File

@ -105,7 +105,7 @@ public class CodeGenerator {
strategy.setNaming(NamingStrategy.underline_to_camel);
strategy.setColumnNaming(NamingStrategy.underline_to_camel);
strategy.setSuperEntityClass("com.wangziyang.mes.common.BaseEntity");
strategy.setEntityLombokModel(true);
// strategy.setEntityLombokModel(true);
//strategy.setRestControllerStyle(true);
strategy.setRestControllerStyle(false);
// 公共父类

View File

@ -0,0 +1,5 @@
<?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.wangziyang.mes.basedata.mapper.SpFlowOperRelationMapper">
</mapper>

View File

@ -0,0 +1,112 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>添加用户</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<#include "${request.contextPath}/common/common.ftl">
</head>
<body>
<div class="splayui-container">
<div class="splayui-main">
<form class="layui-form splayui-form">
<div class="layui-form-item">
<div class="layui-inline">
<label for="js-name" class="layui-form-label sp-required">流程编码
</label>
<div class="layui-input-inline">
<input type="text" id="js-flow" name="flow" lay-verify="required" autocomplete="off"
class="layui-input" value="${flow.flow}">
</div>
</div>
<div class="layui-inline">
<label for="js-code" class="layui-form-label sp-required">流程描述
</label>
<div class="layui-input-inline">
<input type="text" id="js-flowDesc" name="flowDesc" lay-verify="required" autocomplete="off"
class="layui-input" value="${flow.flowDesc}">
</div>
</div>
<div class="layui-inline">
<label for="js-descr" class="layui-form-label sp-required">流程时序
</label>
<div class="layui-input-inline">
<input type="text" id="js-process" name="process" lay-verify="required" autocomplete="off"
class="layui-input" value="${flow.process}">
</div>
</div>
</div>
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
<legend>流程与工序关系</legend>
</fieldset>
<div id="js-shuttle" class="demo-transfer"></div>
</div>
<div class="layui-form-item layui-hide">
<div class="layui-input-block">
<input id="js-id" name="id" value="${result.id}"/>
<button id="js-submit" class="layui-btn" lay-demotransferactive="getData" lay-submit
lay-filter="js-submit-filter">确定
</button>
</div>
</div>
</form>
</div>
</div>
<script>
layui.use(['form', 'util', 'transfer', 'util'], function () {
var form = layui.form,
util = layui.util,
layer = layui.layer,
transfer = layui.transfer;
console.log("1");
//模拟数据
data2 = [];
<#list allOper as oper >
oper = {};
oper.value = '${oper.value}';
oper.title = '${oper.title}';
data2.push(oper);
</#list>
//初始右侧数据
transfer.render({
elem: '#js-shuttle',
title: ['全部工序', '当前Flow下工序']
, data: data2
, value: ["1", "3", "5", "7", "9", "11"]
, id: 'key123' //定义唯一索引
})
//监听提交
form.on('submit(js-submit-filter)', function (data) {
spUtil.submitForm({
url: "${request.contextPath}/admin/sys/role/add-or-update",
data: data.field
});
});
//批量办法定事件
util.event('lay-demoTransferActive', {
getData: function (othis) {
var getData = transfer.getData('key123'); //获取右侧数据
console.log(JSON.stringify(getData));
}
, reload: function () {
//实例重载
transfer.reload('key123', {
title: ['文人', '喜欢的文人']
, value: ['2', '5', '9']
, showSearch: true
})
}
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,167 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>系统角色列表</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<#include "${request.contextPath}/common/common.ftl">
</head>
<body>
<div class="splayui-container">
<div class="splayui-main">
<!--查询参数-->
<form id="js-search-form" class="layui-form" lay-filter="js-q-form-filter">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">姓名</label>
<div class="layui-input-inline">
<input type="text" name="nameLike" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<a class="layui-btn" lay-submit lay-filter="js-search-filter"><i
class="layui-icon layui-icon-search layuiadmin-button-btn"></i></a>
</div>
</div>
</form>
<!--表格-->
<table class="layui-hide" id="js-record-table" lay-filter="js-record-table-filter"></table>
</div>
</div>
<!--表格头操作模板-->
<script type="text/html" id="js-record-table-toolbar-top">
<div class="layui-btn-container">
<button class="layui-btn layui-btn-danger layui-btn-sm" lay-event="deleteBatch"><i
class="layui-icon">&#xe640;</i>批量删除
</button>
<@shiro.hasPermission name="user:add">
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon">&#xe61f;</i>添加</button>
</@shiro.hasPermission>
</div>
</script>
<!--行操作模板-->
<script type="text/html" id="js-record-table-toolbar-right">
<a class="layui-btn layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete"><i class="layui-icon layui-icon-delete"></i>删除</a>
</script>
<!--js逻辑-->
<script>
layui.use(['form', 'table', 'spLayer', 'spTable'], function () {
var form = layui.form,
table = layui.table,
spLayer = layui.spLayer,
spTable = layui.spTable;
// 表格及数据初始化
var tableIns = spTable.render({
url: '${request.contextPath}/basedata/flow/page',
cols: [
[{
type: 'checkbox'
}, {
field: 'flow', title: '流程'
}, {
field: 'flowDesc', title: '流程描述'
}, {
field: 'process', title: '流程时序过程'
}, {
fixed: 'right',
field: 'operate',
title: '操作',
toolbar: '#js-record-table-toolbar-right',
unresize: true,
width: 150
}]
],
done: function (res, curr, count) {
}
});
/*
* 数据表格中form表单元素是动态插入,所以需要更新渲染下
* http://www.layui.com/doc/modules/form.html#render
*/
$(function () {
form.render();
});
/**
* 搜索按钮事件
*/
form.on('submit(js-search-filter)', function (data) {
tableIns.reload({
where: data.field,
page: {
// 重新从第 1 页开始
curr: 1
}
});
// 阻止表单跳转。如果需要表单跳转,去掉这段即可。
return false;
});
/**
* 头工具栏事件
*/
table.on('toolbar(js-record-table-filter)', function (obj) {
var checkStatus = table.checkStatus(obj.config.id);
// 批量删除
if (obj.event === 'deleteBatch') {
var checkStatus = table.checkStatus('record-table'),
data = checkStatus.data;
if (data.length > 0) {
layer.confirm('确认要删除吗?', function (index) {
});
} else {
layer.msg("请先选择需要删除的数据!");
}
}
// 添加
if (obj.event === 'add') {
var index = spLayer.open({
title: '添加',
area: ['80%', '90%'],
content: '${request.contextPath}/basedata/flow/process/add-or-update-ui'
});
}
});
/**
* 监听行工具事件
*/
table.on('tool(js-record-table-filter)', function (obj) {
var data = obj.data;
// 编辑
if (obj.event === 'edit') {
spLayer.open({
title: '编辑',
area: ['80%', '90%'],
// 请求url参数
spWhere: {id: data.id},
content: '${request.contextPath}/basedata/flow/process/add-or-update-ui'
});
}
// 删除
if (obj.event === 'delete') {
layer.confirm('确认要删除吗?', function (index) {
obj.del();
layer.close(index);
});
}
});
});
</script>
</body>
</html>