Commit 00f968657c6b51781b1f14730752c3a4ad39b5d5
1 parent
7ef86c14
重新初始化 BPM Form 模块
Showing
9 changed files
with
274 additions
and
89 deletions
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/form/BpmFormController.java
| @@ -84,16 +84,4 @@ public class BpmFormController { | @@ -84,16 +84,4 @@ public class BpmFormController { | ||
| 84 | return success(BpmFormConvert.INSTANCE.convertPage(pageResult)); | 84 | return success(BpmFormConvert.INSTANCE.convertPage(pageResult)); |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | - @GetMapping("/export-excel") | ||
| 88 | - @ApiOperation("导出动态表单 Excel") | ||
| 89 | - @PreAuthorize("@ss.hasPermission('bpm:form:export')") | ||
| 90 | - @OperateLog(type = EXPORT) | ||
| 91 | - public void exportFormExcel(@Valid BpmFormExportReqVO exportReqVO, | ||
| 92 | - HttpServletResponse response) throws IOException { | ||
| 93 | - List<BpmForm> list = formService.getFormList(exportReqVO); | ||
| 94 | - // 导出 Excel | ||
| 95 | - List<BpmFormExcelVO> datas = BpmFormConvert.INSTANCE.convertList02(list); | ||
| 96 | - ExcelUtils.write(response, "动态表单.xls", "数据", BpmFormExcelVO.class, datas); | ||
| 97 | - } | ||
| 98 | - | ||
| 99 | } | 87 | } |
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/form/vo/BpmFormExportReqVO.java
| 1 | package cn.iocoder.yudao.adminserver.modules.bpm.controller.form.vo; | 1 | package cn.iocoder.yudao.adminserver.modules.bpm.controller.form.vo; |
| 2 | 2 | ||
| 3 | -import lombok.*; | ||
| 4 | -import java.util.*; | ||
| 5 | -import io.swagger.annotations.*; | ||
| 6 | -import org.springframework.format.annotation.DateTimeFormat; | ||
| 7 | -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | 3 | +import io.swagger.annotations.ApiModel; |
| 4 | +import io.swagger.annotations.ApiModelProperty; | ||
| 5 | +import lombok.Data; | ||
| 8 | 6 | ||
| 9 | -@ApiModel(value = "动态表单 Excel 导出 Request VO", description = "参数和 OsFormPageReqVO 是一致的") | 7 | +@ApiModel(value = "动态表单 Excel 导出 Request VO", description = "参数和 BpmFormPageReqVO 是一致的") |
| 10 | @Data | 8 | @Data |
| 11 | public class BpmFormExportReqVO { | 9 | public class BpmFormExportReqVO { |
| 12 | 10 | ||
| 13 | @ApiModelProperty(value = "表单名称") | 11 | @ApiModelProperty(value = "表单名称") |
| 14 | private String name; | 12 | private String name; |
| 15 | 13 | ||
| 16 | - @ApiModelProperty(value = "商户状态") | ||
| 17 | - private Integer status; | ||
| 18 | - | ||
| 19 | - @ApiModelProperty(value = "表单JSON") | ||
| 20 | - private String formJson; | ||
| 21 | - | ||
| 22 | - @ApiModelProperty(value = "备注") | ||
| 23 | - private String remark; | ||
| 24 | - | ||
| 25 | - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | ||
| 26 | - @ApiModelProperty(value = "开始创建时间") | ||
| 27 | - private Date beginCreateTime; | ||
| 28 | - | ||
| 29 | - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | ||
| 30 | - @ApiModelProperty(value = "结束创建时间") | ||
| 31 | - private Date endCreateTime; | ||
| 32 | - | ||
| 33 | } | 14 | } |
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/form/vo/BpmFormPageReqVO.java
| 1 | package cn.iocoder.yudao.adminserver.modules.bpm.controller.form.vo; | 1 | package cn.iocoder.yudao.adminserver.modules.bpm.controller.form.vo; |
| 2 | 2 | ||
| 3 | -import lombok.*; | ||
| 4 | -import java.util.*; | ||
| 5 | -import io.swagger.annotations.*; | ||
| 6 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 7 | -import org.springframework.format.annotation.DateTimeFormat; | ||
| 8 | -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | 4 | +import io.swagger.annotations.ApiModel; |
| 5 | +import io.swagger.annotations.ApiModelProperty; | ||
| 6 | +import lombok.Data; | ||
| 7 | +import lombok.EqualsAndHashCode; | ||
| 8 | +import lombok.ToString; | ||
| 9 | 9 | ||
| 10 | @ApiModel("动态表单分页 Request VO") | 10 | @ApiModel("动态表单分页 Request VO") |
| 11 | @Data | 11 | @Data |
| @@ -16,21 +16,4 @@ public class BpmFormPageReqVO extends PageParam { | @@ -16,21 +16,4 @@ public class BpmFormPageReqVO extends PageParam { | ||
| 16 | @ApiModelProperty(value = "表单名称") | 16 | @ApiModelProperty(value = "表单名称") |
| 17 | private String name; | 17 | private String name; |
| 18 | 18 | ||
| 19 | - @ApiModelProperty(value = "商户状态") | ||
| 20 | - private Integer status; | ||
| 21 | - | ||
| 22 | - @ApiModelProperty(value = "表单JSON") | ||
| 23 | - private String formJson; | ||
| 24 | - | ||
| 25 | - @ApiModelProperty(value = "备注") | ||
| 26 | - private String remark; | ||
| 27 | - | ||
| 28 | - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | ||
| 29 | - @ApiModelProperty(value = "开始创建时间") | ||
| 30 | - private Date beginCreateTime; | ||
| 31 | - | ||
| 32 | - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | ||
| 33 | - @ApiModelProperty(value = "结束创建时间") | ||
| 34 | - private Date endCreateTime; | ||
| 35 | - | ||
| 36 | } | 19 | } |
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/dataobject/form/BpmForm.java
| @@ -37,10 +37,10 @@ public class BpmForm extends BaseDO { | @@ -37,10 +37,10 @@ public class BpmForm extends BaseDO { | ||
| 37 | * 状态 | 37 | * 状态 |
| 38 | */ | 38 | */ |
| 39 | private Integer status; | 39 | private Integer status; |
| 40 | - /** | ||
| 41 | - * 表单JSON | ||
| 42 | - */ | ||
| 43 | - private String formJson; | 40 | +// /** |
| 41 | +// * 表单JSON | ||
| 42 | +// */ | ||
| 43 | +// private String formJson; | ||
| 44 | /** | 44 | /** |
| 45 | * 表单配置 | 45 | * 表单配置 |
| 46 | * | 46 | * |
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/mysql/form/BpmFormMapper.java
| @@ -22,20 +22,6 @@ public interface BpmFormMapper extends BaseMapperX<BpmForm> { | @@ -22,20 +22,6 @@ public interface BpmFormMapper extends BaseMapperX<BpmForm> { | ||
| 22 | default PageResult<BpmForm> selectPage(BpmFormPageReqVO reqVO) { | 22 | default PageResult<BpmForm> selectPage(BpmFormPageReqVO reqVO) { |
| 23 | return selectPage(reqVO, new QueryWrapperX<BpmForm>() | 23 | return selectPage(reqVO, new QueryWrapperX<BpmForm>() |
| 24 | .likeIfPresent("name", reqVO.getName()) | 24 | .likeIfPresent("name", reqVO.getName()) |
| 25 | - .eqIfPresent("status", reqVO.getStatus()) | ||
| 26 | - .eqIfPresent("form_json", reqVO.getFormJson()) | ||
| 27 | - .eqIfPresent("remark", reqVO.getRemark()) | ||
| 28 | - .betweenIfPresent("create_time", reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) | ||
| 29 | - .orderByDesc("id")); | ||
| 30 | - } | ||
| 31 | - | ||
| 32 | - default List<BpmForm> selectList(BpmFormExportReqVO reqVO) { | ||
| 33 | - return selectList(new QueryWrapperX<BpmForm>() | ||
| 34 | - .likeIfPresent("name", reqVO.getName()) | ||
| 35 | - .eqIfPresent("status", reqVO.getStatus()) | ||
| 36 | - .eqIfPresent("form_json", reqVO.getFormJson()) | ||
| 37 | - .eqIfPresent("remark", reqVO.getRemark()) | ||
| 38 | - .betweenIfPresent("create_time", reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) | ||
| 39 | .orderByDesc("id")); | 25 | .orderByDesc("id")); |
| 40 | } | 26 | } |
| 41 | 27 |
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/form/BpmFormService.java
| 1 | package cn.iocoder.yudao.adminserver.modules.bpm.service.form; | 1 | package cn.iocoder.yudao.adminserver.modules.bpm.service.form; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.adminserver.modules.bpm.controller.form.vo.BpmFormCreateReqVO; | 3 | import cn.iocoder.yudao.adminserver.modules.bpm.controller.form.vo.BpmFormCreateReqVO; |
| 4 | -import cn.iocoder.yudao.adminserver.modules.bpm.controller.form.vo.BpmFormExportReqVO; | ||
| 5 | import cn.iocoder.yudao.adminserver.modules.bpm.controller.form.vo.BpmFormPageReqVO; | 4 | import cn.iocoder.yudao.adminserver.modules.bpm.controller.form.vo.BpmFormPageReqVO; |
| 6 | import cn.iocoder.yudao.adminserver.modules.bpm.controller.form.vo.BpmFormUpdateReqVO; | 5 | import cn.iocoder.yudao.adminserver.modules.bpm.controller.form.vo.BpmFormUpdateReqVO; |
| 7 | import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.form.BpmForm; | 6 | import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.form.BpmForm; |
| @@ -65,12 +64,4 @@ public interface BpmFormService { | @@ -65,12 +64,4 @@ public interface BpmFormService { | ||
| 65 | */ | 64 | */ |
| 66 | PageResult<BpmForm> getFormPage(BpmFormPageReqVO pageReqVO); | 65 | PageResult<BpmForm> getFormPage(BpmFormPageReqVO pageReqVO); |
| 67 | 66 | ||
| 68 | - /** | ||
| 69 | - * 获得动态表单列表, 用于 Excel 导出 | ||
| 70 | - * | ||
| 71 | - * @param exportReqVO 查询条件 | ||
| 72 | - * @return 动态表单列表 | ||
| 73 | - */ | ||
| 74 | - List<BpmForm> getFormList(BpmFormExportReqVO exportReqVO); | ||
| 75 | - | ||
| 76 | } | 67 | } |
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/form/BpmFormServiceImpl.java
| @@ -77,9 +77,4 @@ public class BpmFormServiceImpl implements BpmFormService { | @@ -77,9 +77,4 @@ public class BpmFormServiceImpl implements BpmFormService { | ||
| 77 | return formMapper.selectPage(pageReqVO); | 77 | return formMapper.selectPage(pageReqVO); |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | - @Override | ||
| 81 | - public List<BpmForm> getFormList(BpmFormExportReqVO exportReqVO) { | ||
| 82 | - return formMapper.selectList(exportReqVO); | ||
| 83 | - } | ||
| 84 | - | ||
| 85 | } | 80 | } |
yudao-admin-ui/src/api/bpm/form.js
0 → 100644
| 1 | +import request from '@/utils/request' | ||
| 2 | + | ||
| 3 | +// 创建工作流的表单定义 | ||
| 4 | +export function createForm(data) { | ||
| 5 | + return request({ | ||
| 6 | + url: '/bpm/form/create', | ||
| 7 | + method: 'post', | ||
| 8 | + data: data | ||
| 9 | + }) | ||
| 10 | +} | ||
| 11 | + | ||
| 12 | +// 更新工作流的表单定义 | ||
| 13 | +export function updateForm(data) { | ||
| 14 | + return request({ | ||
| 15 | + url: '/bpm/form/update', | ||
| 16 | + method: 'put', | ||
| 17 | + data: data | ||
| 18 | + }) | ||
| 19 | +} | ||
| 20 | + | ||
| 21 | +// 删除工作流的表单定义 | ||
| 22 | +export function deleteForm(id) { | ||
| 23 | + return request({ | ||
| 24 | + url: '/bpm/form/delete?id=' + id, | ||
| 25 | + method: 'delete' | ||
| 26 | + }) | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +// 获得工作流的表单定义 | ||
| 30 | +export function getForm(id) { | ||
| 31 | + return request({ | ||
| 32 | + url: '/bpm/form/get?id=' + id, | ||
| 33 | + method: 'get' | ||
| 34 | + }) | ||
| 35 | +} | ||
| 36 | + | ||
| 37 | +// 获得工作流的表单定义分页 | ||
| 38 | +export function getFormPage(query) { | ||
| 39 | + return request({ | ||
| 40 | + url: '/bpm/form/page', | ||
| 41 | + method: 'get', | ||
| 42 | + params: query | ||
| 43 | + }) | ||
| 44 | +} | ||
| 45 | + | ||
| 46 | +export class exportFormExcel { | ||
| 47 | +} |
yudao-admin-ui/src/views/bpm/form/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div class="app-container"> | ||
| 3 | + | ||
| 4 | + <!-- 搜索工作栏 --> | ||
| 5 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | ||
| 6 | + <el-form-item label="表单名" prop="name"> | ||
| 7 | + <el-input v-model="queryParams.name" placeholder="请输入表单名" clearable size="small" @keyup.enter.native="handleQuery"/> | ||
| 8 | + </el-form-item> | ||
| 9 | + <el-form-item> | ||
| 10 | + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||
| 11 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||
| 12 | + </el-form-item> | ||
| 13 | + </el-form> | ||
| 14 | + | ||
| 15 | + <!-- 操作工具栏 --> | ||
| 16 | + <el-row :gutter="10" class="mb8"> | ||
| 17 | + <el-col :span="1.5"> | ||
| 18 | + <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" | ||
| 19 | + v-hasPermi="['bpm:form:create']">新增</el-button> | ||
| 20 | + </el-col> | ||
| 21 | + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | ||
| 22 | + </el-row> | ||
| 23 | + | ||
| 24 | + <!-- 列表 --> | ||
| 25 | + <el-table v-loading="loading" :data="list"> | ||
| 26 | + <el-table-column label="编号" align="center" prop="id" /> | ||
| 27 | + <el-table-column label="表单名" align="center" prop="name" /> | ||
| 28 | + <el-table-column label="开启状态" align="center" prop="status"> | ||
| 29 | + <template slot-scope="scope"> | ||
| 30 | + <span>{{ getDictDataLabel(DICT_TYPE.SYS_COMMON_STATUS, scope.row.status) }}</span> | ||
| 31 | + </template> | ||
| 32 | + </el-table-column> | ||
| 33 | + <el-table-column label="表单配置" align="center" prop="fields" /> | ||
| 34 | + <el-table-column label="备注" align="center" prop="remark" /> | ||
| 35 | + <el-table-column label="创建时间" align="center" prop="createTime" width="180"> | ||
| 36 | + <template slot-scope="scope"> | ||
| 37 | + <span>{{ parseTime(scope.row.createTime) }}</span> | ||
| 38 | + </template> | ||
| 39 | + </el-table-column> | ||
| 40 | + <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||
| 41 | + <template slot-scope="scope"> | ||
| 42 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" | ||
| 43 | + v-hasPermi="['bpm:form:update']">修改</el-button> | ||
| 44 | + <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" | ||
| 45 | + v-hasPermi="['bpm:form:delete']">删除</el-button> | ||
| 46 | + </template> | ||
| 47 | + </el-table-column> | ||
| 48 | + </el-table> | ||
| 49 | + <!-- 分页组件 --> | ||
| 50 | + <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" | ||
| 51 | + @pagination="getList"/> | ||
| 52 | + | ||
| 53 | + <!-- 对话框(添加 / 修改) --> | ||
| 54 | + <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | ||
| 55 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | ||
| 56 | + <el-form-item label="表单名" prop="name"> | ||
| 57 | + <el-input v-model="form.name" placeholder="请输入表单名" /> | ||
| 58 | + </el-form-item> | ||
| 59 | + <el-form-item label="开启状态" prop="status"> | ||
| 60 | + <el-radio-group v-model="form.status"> | ||
| 61 | + <el-radio v-for="dict in this.getDictDatas(DICT_TYPE.SYS_COMMON_STATUS)" | ||
| 62 | + :key="dict.value" :label="parseInt(dict.value)">{{dict.label}}</el-radio> | ||
| 63 | + </el-radio-group> | ||
| 64 | + </el-form-item> | ||
| 65 | + <el-form-item label="表单配置" prop="fields"> | ||
| 66 | + <el-input v-model="form.fields" placeholder="请输入表单配置" /> | ||
| 67 | + </el-form-item> | ||
| 68 | + <el-form-item label="备注" prop="remark"> | ||
| 69 | + <el-input v-model="form.remark" placeholder="请输入备注" /> | ||
| 70 | + </el-form-item> | ||
| 71 | + </el-form> | ||
| 72 | + <div slot="footer" class="dialog-footer"> | ||
| 73 | + <el-button type="primary" @click="submitForm">确 定</el-button> | ||
| 74 | + <el-button @click="cancel">取 消</el-button> | ||
| 75 | + </div> | ||
| 76 | + </el-dialog> | ||
| 77 | + </div> | ||
| 78 | +</template> | ||
| 79 | + | ||
| 80 | +<script> | ||
| 81 | +import { createForm, updateForm, deleteForm, getForm, getFormPage, exportFormExcel } from "@/api/bpm/form"; | ||
| 82 | + | ||
| 83 | +export default { | ||
| 84 | + name: "Form", | ||
| 85 | + components: { | ||
| 86 | + }, | ||
| 87 | + data() { | ||
| 88 | + return { | ||
| 89 | + // 遮罩层 | ||
| 90 | + loading: true, | ||
| 91 | + // 显示搜索条件 | ||
| 92 | + showSearch: true, | ||
| 93 | + // 总条数 | ||
| 94 | + total: 0, | ||
| 95 | + // 工作流的列表 | ||
| 96 | + list: [], | ||
| 97 | + // 弹出层标题 | ||
| 98 | + title: "", | ||
| 99 | + // 是否显示弹出层 | ||
| 100 | + open: false, | ||
| 101 | + // 查询参数 | ||
| 102 | + queryParams: { | ||
| 103 | + pageNo: 1, | ||
| 104 | + pageSize: 10, | ||
| 105 | + name: null, | ||
| 106 | + }, | ||
| 107 | + // 表单参数 | ||
| 108 | + form: {}, | ||
| 109 | + // 表单校验 | ||
| 110 | + rules: { | ||
| 111 | + name: [{ required: true, message: "表单名不能为空", trigger: "blur" }], | ||
| 112 | + status: [{ required: true, message: "开启状态不能为空", trigger: "blur" }], | ||
| 113 | + fields: [{ required: true, message: "表单配置不能为空", trigger: "blur" }], | ||
| 114 | + } | ||
| 115 | + }; | ||
| 116 | + }, | ||
| 117 | + created() { | ||
| 118 | + this.getList(); | ||
| 119 | + }, | ||
| 120 | + methods: { | ||
| 121 | + /** 查询列表 */ | ||
| 122 | + getList() { | ||
| 123 | + this.loading = true; | ||
| 124 | + // 处理查询参数 | ||
| 125 | + let params = {...this.queryParams}; | ||
| 126 | + // 执行查询 | ||
| 127 | + getFormPage(params).then(response => { | ||
| 128 | + this.list = response.data.list; | ||
| 129 | + this.total = response.data.total; | ||
| 130 | + this.loading = false; | ||
| 131 | + }); | ||
| 132 | + }, | ||
| 133 | + /** 取消按钮 */ | ||
| 134 | + cancel() { | ||
| 135 | + this.open = false; | ||
| 136 | + this.reset(); | ||
| 137 | + }, | ||
| 138 | + /** 表单重置 */ | ||
| 139 | + reset() { | ||
| 140 | + this.form = { | ||
| 141 | + id: undefined, | ||
| 142 | + name: undefined, | ||
| 143 | + status: undefined, | ||
| 144 | + fields: undefined, | ||
| 145 | + remark: undefined, | ||
| 146 | + }; | ||
| 147 | + this.resetForm("form"); | ||
| 148 | + }, | ||
| 149 | + /** 搜索按钮操作 */ | ||
| 150 | + handleQuery() { | ||
| 151 | + this.queryParams.pageNo = 1; | ||
| 152 | + this.getList(); | ||
| 153 | + }, | ||
| 154 | + /** 重置按钮操作 */ | ||
| 155 | + resetQuery() { | ||
| 156 | + this.resetForm("queryForm"); | ||
| 157 | + this.handleQuery(); | ||
| 158 | + }, | ||
| 159 | + /** 新增按钮操作 */ | ||
| 160 | + handleAdd() { | ||
| 161 | + this.reset(); | ||
| 162 | + this.open = true; | ||
| 163 | + this.title = "添加工作流的"; | ||
| 164 | + }, | ||
| 165 | + /** 修改按钮操作 */ | ||
| 166 | + handleUpdate(row) { | ||
| 167 | + this.reset(); | ||
| 168 | + const id = row.id; | ||
| 169 | + getForm(id).then(response => { | ||
| 170 | + this.form = response.data; | ||
| 171 | + this.open = true; | ||
| 172 | + this.title = "修改工作流的"; | ||
| 173 | + }); | ||
| 174 | + }, | ||
| 175 | + /** 提交按钮 */ | ||
| 176 | + submitForm() { | ||
| 177 | + this.$refs["form"].validate(valid => { | ||
| 178 | + if (!valid) { | ||
| 179 | + return; | ||
| 180 | + } | ||
| 181 | + // 修改的提交 | ||
| 182 | + if (this.form.id != null) { | ||
| 183 | + updateForm(this.form).then(response => { | ||
| 184 | + this.msgSuccess("修改成功"); | ||
| 185 | + this.open = false; | ||
| 186 | + this.getList(); | ||
| 187 | + }); | ||
| 188 | + return; | ||
| 189 | + } | ||
| 190 | + // 添加的提交 | ||
| 191 | + createForm(this.form).then(response => { | ||
| 192 | + this.msgSuccess("新增成功"); | ||
| 193 | + this.open = false; | ||
| 194 | + this.getList(); | ||
| 195 | + }); | ||
| 196 | + }); | ||
| 197 | + }, | ||
| 198 | + /** 删除按钮操作 */ | ||
| 199 | + handleDelete(row) { | ||
| 200 | + const id = row.id; | ||
| 201 | + this.$confirm('是否确认删除工作流的编号为"' + id + '"的数据项?', "警告", { | ||
| 202 | + confirmButtonText: "确定", | ||
| 203 | + cancelButtonText: "取消", | ||
| 204 | + type: "warning" | ||
| 205 | + }).then(function() { | ||
| 206 | + return deleteForm(id); | ||
| 207 | + }).then(() => { | ||
| 208 | + this.getList(); | ||
| 209 | + this.msgSuccess("删除成功"); | ||
| 210 | + }) | ||
| 211 | + } | ||
| 212 | + } | ||
| 213 | +}; | ||
| 214 | +</script> |