Commit df91c3ceff290e5d8840bfe8d457990675d1ccc1
1 parent
e47d5afc
将 Model exportBpmnXml 去除,替换成 getModel 接口
Showing
9 changed files
with
118 additions
and
98 deletions
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/model/BpmModelController.java
| 1 | 1 | package cn.iocoder.yudao.adminserver.modules.bpm.controller.model; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.adminserver.modules.bpm.controller.model.vo.BpmModelCreateReqVO; |
| 4 | +import cn.iocoder.yudao.adminserver.modules.bpm.controller.model.vo.BpmModelPageItemRespVO; | |
| 4 | 5 | import cn.iocoder.yudao.adminserver.modules.bpm.controller.model.vo.BpmModelRespVO; |
| 5 | 6 | import cn.iocoder.yudao.adminserver.modules.bpm.controller.model.vo.ModelPageReqVO; |
| 6 | -import cn.iocoder.yudao.adminserver.modules.bpm.controller.workflow.vo.FileResp; | |
| 7 | 7 | import cn.iocoder.yudao.adminserver.modules.bpm.service.model.BpmModelService; |
| 8 | 8 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 9 | 9 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 10 | -import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; | |
| 11 | 10 | import io.swagger.annotations.Api; |
| 11 | +import io.swagger.annotations.ApiImplicitParam; | |
| 12 | 12 | import io.swagger.annotations.ApiOperation; |
| 13 | 13 | import org.springframework.validation.annotation.Validated; |
| 14 | 14 | import org.springframework.web.bind.annotation.*; |
| 15 | 15 | |
| 16 | 16 | import javax.annotation.Resource; |
| 17 | -import javax.servlet.http.HttpServletResponse; | |
| 18 | -import java.io.IOException; | |
| 19 | 17 | |
| 20 | 18 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 21 | 19 | |
| ... | ... | @@ -31,11 +29,20 @@ public class BpmModelController { |
| 31 | 29 | // TODO @芋艿:权限 |
| 32 | 30 | |
| 33 | 31 | @GetMapping ("/page") |
| 34 | - @ApiOperation(value = "分页数据") | |
| 35 | - public CommonResult<PageResult<BpmModelRespVO>> getModelPage(ModelPageReqVO pageVO) { | |
| 32 | + @ApiOperation(value = "获得模型分页") | |
| 33 | + public CommonResult<PageResult<BpmModelPageItemRespVO>> getModelPage(ModelPageReqVO pageVO) { | |
| 36 | 34 | return success(bpmModelService.getModelPage(pageVO)); |
| 37 | 35 | } |
| 38 | 36 | |
| 37 | + @GetMapping("/get") | |
| 38 | + @ApiOperation("获得模型") | |
| 39 | + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = String.class) | |
| 40 | +// @PreAuthorize("@ss.hasPermission('bpm:form:query')") | |
| 41 | + public CommonResult<BpmModelRespVO> getModel(@RequestParam("id") String id) { | |
| 42 | + BpmModelRespVO model = bpmModelService.getModel(id); | |
| 43 | + return success(model); | |
| 44 | + } | |
| 45 | + | |
| 39 | 46 | @PostMapping("/create") |
| 40 | 47 | @ApiOperation(value = "新建模型") |
| 41 | 48 | public CommonResult<String> createModel(@RequestBody BpmModelCreateReqVO createRetVO) { |
| ... | ... | @@ -60,11 +67,4 @@ public class BpmModelController { |
| 60 | 67 | return bpmModelService.deploy(modelId); |
| 61 | 68 | } |
| 62 | 69 | |
| 63 | - @GetMapping("/exportBpmnXml") | |
| 64 | - @ApiOperation(value = "导出模型Xml") | |
| 65 | - public void export(@RequestParam String modelId, HttpServletResponse response) throws IOException { | |
| 66 | - FileResp fileResp = bpmModelService.exportBpmnXml(modelId); | |
| 67 | - ServletUtils.writeAttachment(response, fileResp.getFileName(), fileResp.getFileByte()); | |
| 68 | - } | |
| 69 | - | |
| 70 | 70 | } | ... | ... |
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/model/vo/BpmModelPageItemRespVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.adminserver.modules.bpm.controller.model.vo; | |
| 2 | + | |
| 3 | +import io.swagger.annotations.ApiModel; | |
| 4 | +import io.swagger.annotations.ApiModelProperty; | |
| 5 | +import lombok.Data; | |
| 6 | +import lombok.EqualsAndHashCode; | |
| 7 | +import lombok.ToString; | |
| 8 | + | |
| 9 | +import java.util.Date; | |
| 10 | + | |
| 11 | +@ApiModel("流程模型的分页的每一项 Response VO") | |
| 12 | +@Data | |
| 13 | +@EqualsAndHashCode(callSuper = true) | |
| 14 | +@ToString(callSuper = true) | |
| 15 | +public class BpmModelPageItemRespVO extends BpmModelBaseVO { | |
| 16 | + | |
| 17 | + @ApiModelProperty(value = "编号", required = true, example = "1024") | |
| 18 | + private String id; | |
| 19 | + | |
| 20 | + @ApiModelProperty(value = "表单名字", example = "请假表单") | |
| 21 | + private String formName; | |
| 22 | + | |
| 23 | + @ApiModelProperty(value = "创建时间", required = true) | |
| 24 | + private Date createTime; | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 最新部署的流程定义 | |
| 28 | + */ | |
| 29 | + private ProcessDefinition processDefinition; | |
| 30 | + | |
| 31 | + @ApiModel("流程定义") | |
| 32 | + @Data | |
| 33 | + public static class ProcessDefinition { | |
| 34 | + | |
| 35 | + @ApiModelProperty(value = "编号", required = true, example = "1024") | |
| 36 | + private String id; | |
| 37 | + | |
| 38 | + @ApiModelProperty(value = "版本", required = true, example = "1") | |
| 39 | + private Integer version; | |
| 40 | + | |
| 41 | + } | |
| 42 | + | |
| 43 | +} | ... | ... |
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/model/vo/BpmModelRespVO.java
| ... | ... | @@ -6,38 +6,15 @@ import lombok.Data; |
| 6 | 6 | import lombok.EqualsAndHashCode; |
| 7 | 7 | import lombok.ToString; |
| 8 | 8 | |
| 9 | -import java.util.Date; | |
| 9 | +import javax.validation.constraints.NotEmpty; | |
| 10 | 10 | |
| 11 | -@ApiModel("流程模型 Response VO") | |
| 11 | +@ApiModel("流程模型的创建 Request VO") | |
| 12 | 12 | @Data |
| 13 | 13 | @EqualsAndHashCode(callSuper = true) |
| 14 | 14 | @ToString(callSuper = true) |
| 15 | 15 | public class BpmModelRespVO extends BpmModelBaseVO { |
| 16 | 16 | |
| 17 | - @ApiModelProperty(value = "编号", required = true, example = "1024") | |
| 18 | - private String id; | |
| 19 | - | |
| 20 | - @ApiModelProperty(value = "表单名字", example = "请假表单") | |
| 21 | - private String formName; | |
| 22 | - | |
| 23 | - @ApiModelProperty(value = "创建时间", required = true) | |
| 24 | - private Date createTime; | |
| 25 | - | |
| 26 | - /** | |
| 27 | - * 最新部署的流程定义 | |
| 28 | - */ | |
| 29 | - private ProcessDefinition processDefinition; | |
| 30 | - | |
| 31 | - @ApiModel("流程定义") | |
| 32 | - @Data | |
| 33 | - public static class ProcessDefinition { | |
| 34 | - | |
| 35 | - @ApiModelProperty(value = "编号", required = true, example = "1024") | |
| 36 | - private String id; | |
| 37 | - | |
| 38 | - @ApiModelProperty(value = "版本", required = true, example = "1") | |
| 39 | - private Integer version; | |
| 40 | - | |
| 41 | - } | |
| 17 | + @ApiModelProperty(value = "BPMN XML", required = true) | |
| 18 | + private String bpmnXml; | |
| 42 | 19 | |
| 43 | 20 | } | ... | ... |
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/convert/model/ModelConvert.java
| 1 | 1 | package cn.iocoder.yudao.adminserver.modules.bpm.convert.model; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.adminserver.modules.bpm.controller.model.vo.BpmModelCreateReqVO; |
| 4 | +import cn.iocoder.yudao.adminserver.modules.bpm.controller.model.vo.BpmModelPageItemRespVO; | |
| 4 | 5 | import cn.iocoder.yudao.adminserver.modules.bpm.controller.model.vo.BpmModelRespVO; |
| 5 | 6 | import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.form.BpmFormDO; |
| 6 | 7 | import cn.iocoder.yudao.adminserver.modules.bpm.service.model.dto.BpmModelMetaInfoRespDTO; |
| ... | ... | @@ -25,8 +26,8 @@ public interface ModelConvert { |
| 25 | 26 | |
| 26 | 27 | ModelConvert INSTANCE = Mappers.getMapper(ModelConvert.class); |
| 27 | 28 | |
| 28 | - default List<BpmModelRespVO> convertList(List<Model> list, Map<Long, BpmFormDO> formMap, | |
| 29 | - Map<String, ProcessDefinition> processDefinitionMap) { | |
| 29 | + default List<BpmModelPageItemRespVO> convertList(List<Model> list, Map<Long, BpmFormDO> formMap, | |
| 30 | + Map<String, ProcessDefinition> processDefinitionMap) { | |
| 30 | 31 | return CollectionUtils.convertList(list, model -> { |
| 31 | 32 | BpmModelMetaInfoRespDTO metaInfo = JsonUtils.parseObject(model.getMetaInfo(), BpmModelMetaInfoRespDTO.class); |
| 32 | 33 | BpmFormDO form = metaInfo != null ? formMap.get(metaInfo.getFormId()) : null; |
| ... | ... | @@ -35,8 +36,8 @@ public interface ModelConvert { |
| 35 | 36 | }); |
| 36 | 37 | } |
| 37 | 38 | |
| 38 | - default BpmModelRespVO convert(Model model, BpmFormDO form, ProcessDefinition processDefinition) { | |
| 39 | - BpmModelRespVO modelRespVO = new BpmModelRespVO(); | |
| 39 | + default BpmModelPageItemRespVO convert(Model model, BpmFormDO form, ProcessDefinition processDefinition) { | |
| 40 | + BpmModelPageItemRespVO modelRespVO = new BpmModelPageItemRespVO(); | |
| 40 | 41 | modelRespVO.setId(model.getId()); |
| 41 | 42 | modelRespVO.setName(model.getName()); |
| 42 | 43 | modelRespVO.setKey(model.getKey()); |
| ... | ... | @@ -54,6 +55,8 @@ public interface ModelConvert { |
| 54 | 55 | return modelRespVO; |
| 55 | 56 | } |
| 56 | 57 | |
| 58 | + BpmModelRespVO convert(Model model); | |
| 59 | + | |
| 57 | 60 | default void copy(Model model, BpmModelCreateReqVO bean) { |
| 58 | 61 | model.setName(bean.getName()); |
| 59 | 62 | model.setKey(bean.getKey()); |
| ... | ... | @@ -68,6 +71,6 @@ public interface ModelConvert { |
| 68 | 71 | return metaInfo; |
| 69 | 72 | } |
| 70 | 73 | |
| 71 | - BpmModelRespVO.ProcessDefinition convert(ProcessDefinition bean); | |
| 74 | + BpmModelPageItemRespVO.ProcessDefinition convert(ProcessDefinition bean); | |
| 72 | 75 | |
| 73 | 76 | } | ... | ... |
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/model/BpmModelService.java
| 1 | 1 | package cn.iocoder.yudao.adminserver.modules.bpm.service.model; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.adminserver.modules.bpm.controller.model.vo.BpmModelCreateReqVO; |
| 4 | +import cn.iocoder.yudao.adminserver.modules.bpm.controller.model.vo.BpmModelPageItemRespVO; | |
| 4 | 5 | import cn.iocoder.yudao.adminserver.modules.bpm.controller.model.vo.BpmModelRespVO; |
| 5 | 6 | import cn.iocoder.yudao.adminserver.modules.bpm.controller.model.vo.ModelPageReqVO; |
| 6 | -import cn.iocoder.yudao.adminserver.modules.bpm.controller.workflow.vo.FileResp; | |
| 7 | 7 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 8 | 8 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 9 | 9 | |
| ... | ... | @@ -20,7 +20,15 @@ public interface BpmModelService { |
| 20 | 20 | * @param pageVO 分页查询 |
| 21 | 21 | * @return 流程模型分页 |
| 22 | 22 | */ |
| 23 | - PageResult<BpmModelRespVO> getModelPage(ModelPageReqVO pageVO); | |
| 23 | + PageResult<BpmModelPageItemRespVO> getModelPage(ModelPageReqVO pageVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 获得流程模块 | |
| 27 | + * | |
| 28 | + * @param id 编号 | |
| 29 | + * @return 流程模型 | |
| 30 | + */ | |
| 31 | + BpmModelRespVO getModel(String id); | |
| 24 | 32 | |
| 25 | 33 | // TODO @Li:不用返回 CommonResult |
| 26 | 34 | // TODO @Li:createBpmModal。 |
| ... | ... | @@ -47,16 +55,10 @@ public interface BpmModelService { |
| 47 | 55 | CommonResult<String> deploy(String modelId); |
| 48 | 56 | |
| 49 | 57 | /** |
| 50 | - * 导出模型 | |
| 51 | - * @param modelId 模型Id | |
| 52 | - * @return {@link FileResp} 返回文件 | |
| 53 | - */ | |
| 54 | - FileResp exportBpmnXml(String modelId); | |
| 55 | - | |
| 56 | - /** | |
| 57 | 58 | * 删除模型 |
| 58 | 59 | * @param modelId 模型Id |
| 59 | 60 | * @return 返回成功 |
| 60 | 61 | */ |
| 61 | 62 | CommonResult<String> deleteModel(String modelId); |
| 63 | + | |
| 62 | 64 | } | ... | ... |
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/model/impl/BpmModelServiceImpl.java
| 1 | 1 | package cn.iocoder.yudao.adminserver.modules.bpm.service.model.impl; |
| 2 | 2 | |
| 3 | +import cn.hutool.core.util.ArrayUtil; | |
| 3 | 4 | import cn.hutool.core.util.StrUtil; |
| 4 | 5 | import cn.iocoder.yudao.adminserver.modules.bpm.controller.model.vo.BpmModelCreateReqVO; |
| 6 | +import cn.iocoder.yudao.adminserver.modules.bpm.controller.model.vo.BpmModelPageItemRespVO; | |
| 5 | 7 | import cn.iocoder.yudao.adminserver.modules.bpm.controller.model.vo.BpmModelRespVO; |
| 6 | 8 | import cn.iocoder.yudao.adminserver.modules.bpm.controller.model.vo.ModelPageReqVO; |
| 7 | -import cn.iocoder.yudao.adminserver.modules.bpm.controller.workflow.vo.FileResp; | |
| 8 | 9 | import cn.iocoder.yudao.adminserver.modules.bpm.convert.model.ModelConvert; |
| 9 | 10 | import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.form.BpmFormDO; |
| 10 | 11 | import cn.iocoder.yudao.adminserver.modules.bpm.enums.BpmErrorCodeConstants; |
| ... | ... | @@ -37,7 +38,10 @@ import javax.xml.stream.XMLStreamReader; |
| 37 | 38 | import java.io.ByteArrayInputStream; |
| 38 | 39 | import java.io.InputStreamReader; |
| 39 | 40 | import java.nio.charset.StandardCharsets; |
| 40 | -import java.util.*; | |
| 41 | +import java.util.HashSet; | |
| 42 | +import java.util.List; | |
| 43 | +import java.util.Map; | |
| 44 | +import java.util.Set; | |
| 41 | 45 | |
| 42 | 46 | import static cn.iocoder.yudao.adminserver.modules.bpm.enums.BpmErrorCodeConstants.BPM_MODEL_KEY_EXISTS; |
| 43 | 47 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
| ... | ... | @@ -64,7 +68,7 @@ public class BpmModelServiceImpl implements BpmModelService { |
| 64 | 68 | private BpmDefinitionService bpmDefinitionService; |
| 65 | 69 | |
| 66 | 70 | @Override |
| 67 | - public PageResult<BpmModelRespVO> getModelPage(ModelPageReqVO pageVO) { | |
| 71 | + public PageResult<BpmModelPageItemRespVO> getModelPage(ModelPageReqVO pageVO) { | |
| 68 | 72 | ModelQuery modelQuery = repositoryService.createModelQuery(); |
| 69 | 73 | if (StrUtil.isNotBlank(pageVO.getName())) { |
| 70 | 74 | modelQuery.modelNameLike("%" + pageVO.getName() + "%"); // 模糊匹配 |
| ... | ... | @@ -92,6 +96,18 @@ public class BpmModelServiceImpl implements BpmModelService { |
| 92 | 96 | } |
| 93 | 97 | |
| 94 | 98 | @Override |
| 99 | + public BpmModelRespVO getModel(String id) { | |
| 100 | + Model model = repositoryService.getModel(id); | |
| 101 | + BpmModelRespVO modelRespVO = ModelConvert.INSTANCE.convert(model); | |
| 102 | + // 拼接 bpmn XML | |
| 103 | + byte[] bpmnBytes = repositoryService.getModelEditorSource(id); | |
| 104 | + if (ArrayUtil.isNotEmpty(bpmnBytes)) { | |
| 105 | + modelRespVO.setBpmnXml(StrUtil.utf8Str(bpmnBytes)); | |
| 106 | + } | |
| 107 | + return modelRespVO; | |
| 108 | + } | |
| 109 | + | |
| 110 | + @Override | |
| 95 | 111 | @Transactional(rollbackFor = Exception.class) // 因为进行多个 activiti 操作,所以开启事务 |
| 96 | 112 | public String createModel(BpmModelCreateReqVO createReqVO) { |
| 97 | 113 | // 校验流程标识已经存在 |
| ... | ... | @@ -210,24 +226,6 @@ public class BpmModelServiceImpl implements BpmModelService { |
| 210 | 226 | } |
| 211 | 227 | |
| 212 | 228 | @Override |
| 213 | - public FileResp exportBpmnXml(String modelId) { | |
| 214 | - try { | |
| 215 | - Model modelData = repositoryService.getModel(modelId); | |
| 216 | - if (ObjectUtils.isEmpty(modelData)) { | |
| 217 | - throw exception(BpmErrorCodeConstants.BPMN_MODEL_EDITOR_SOURCE_NOT_EXISTS); | |
| 218 | - } | |
| 219 | - byte[] bytes = repositoryService.getModelEditorSource(modelData.getId()); | |
| 220 | - FileResp fileResp = new FileResp(); | |
| 221 | - fileResp.setFileName(String.format("%s.bpmn", Optional.ofNullable(modelData.getName()).orElse("流程图"))); | |
| 222 | - fileResp.setFileByte(bytes); | |
| 223 | - return fileResp; | |
| 224 | - } catch (Exception e) { | |
| 225 | - log.info("模型部署失败!modelId = {} e = {} ", modelId, ExceptionUtils.getStackTrace(e)); | |
| 226 | - throw exception(BpmErrorCodeConstants.BPMN_MODEL_ERROR); | |
| 227 | - } | |
| 228 | - } | |
| 229 | - | |
| 230 | - @Override | |
| 231 | 229 | public CommonResult<String> deleteModel(String modelId) { |
| 232 | 230 | // TODO @Li:activitie 是逻辑删除么? |
| 233 | 231 | repositoryService.deleteModel(modelId); | ... | ... |
yudao-admin-ui/src/api/bpm/model.js
| ... | ... | @@ -8,11 +8,10 @@ export function page(query) { |
| 8 | 8 | }) |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | -export function exportBpmnXml(query) { | |
| 11 | +export function getModel(id) { | |
| 12 | 12 | return request({ |
| 13 | - url: '/bpm/model/exportBpmnXml', | |
| 14 | - method: 'get', | |
| 15 | - params: query | |
| 13 | + url: '/bpm/model/get?id=' + id, | |
| 14 | + method: 'get' | |
| 16 | 15 | }) |
| 17 | 16 | } |
| 18 | 17 | ... | ... |
yudao-admin-ui/src/views/bpm/model/index.vue
| ... | ... | @@ -47,14 +47,17 @@ |
| 47 | 47 | |
| 48 | 48 | <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" |
| 49 | 49 | @pagination="getList"/> |
| 50 | + | |
| 51 | + | |
| 50 | 52 | <el-dialog class="bpmnclass dialogClass" :visible.sync="showBpmnBool" :before-close="close" :fullscreen="true"> |
| 51 | - <vue-bpmn v-if="showBpmnBool" product="activiti" @processSave="processSave" :bpmnXml="bpmnXML" :bpmnData="bpmnData" @beforeClose="close"></vue-bpmn> | |
| 53 | + <vue-bpmn v-if="showBpmnBool" product="activiti" @processSave="processSave" | |
| 54 | + :bpmnXml="bpmnXML" :bpmnData="bpmnData" @beforeClose="close" /> | |
| 52 | 55 | </el-dialog> |
| 53 | 56 | </div> |
| 54 | 57 | </template> |
| 55 | 58 | |
| 56 | 59 | <script> |
| 57 | -import {exportBpmnXml, modelDelete, modelDeploy, modelSave, modelUpdate, page} from "@/api/bpm/model"; | |
| 60 | +import {modelDelete, modelDeploy, modelSave, modelUpdate, page, getModel} from "@/api/bpm/model"; | |
| 58 | 61 | import VueBpmn from "@/components/bpmn/VueBpmn"; |
| 59 | 62 | |
| 60 | 63 | export default { |
| ... | ... | @@ -70,13 +73,14 @@ export default { |
| 70 | 73 | total: 0, |
| 71 | 74 | // 表格数据 |
| 72 | 75 | list: [], |
| 73 | - bpmnXML: null, | |
| 74 | - bpmnData: {}, | |
| 75 | 76 | // 查询参数 |
| 76 | 77 | queryParams: { |
| 77 | 78 | pageNo: 1, |
| 78 | 79 | pageSize: 10 |
| 79 | - } | |
| 80 | + }, | |
| 81 | + // BPMN 数据 | |
| 82 | + bpmnXML: null, | |
| 83 | + bpmnData: {}, | |
| 80 | 84 | }; |
| 81 | 85 | }, |
| 82 | 86 | components: {VueBpmn}, |
| ... | ... | @@ -144,15 +148,15 @@ export default { |
| 144 | 148 | this.getList(); |
| 145 | 149 | }, |
| 146 | 150 | change(row) { |
| 147 | - const that = this; | |
| 151 | + // 重置 Model 信息 | |
| 148 | 152 | this.bpmnXML = "" |
| 149 | 153 | this.bpmnData = {} |
| 150 | - exportBpmnXml({ | |
| 151 | - modelId: row.id | |
| 152 | - }).then(response => { | |
| 153 | - that.bpmnXML = response | |
| 154 | - that.bpmnData = row | |
| 155 | - that.showBpmnBool = true | |
| 154 | + // 获得 Model 信息 | |
| 155 | + getModel(row.id).then(response => { | |
| 156 | + this.bpmnXML = response.data.bpmnXml | |
| 157 | + this.bpmnData = response.data | |
| 158 | + // 打开弹窗 | |
| 159 | + this.showBpmnBool = true | |
| 156 | 160 | }) |
| 157 | 161 | }, |
| 158 | 162 | modelDelete(row) { | ... | ... |
yudao-admin-ui/src/views/bpm/processDefinition/index.vue
| ... | ... | @@ -142,13 +142,7 @@ export default { |
| 142 | 142 | const that = this; |
| 143 | 143 | this.bpmnXML = "" |
| 144 | 144 | this.bpmnData = {} |
| 145 | - exportBpmnXml({ | |
| 146 | - modelId: row.id | |
| 147 | - }).then(response => { | |
| 148 | - that.bpmnXML = response | |
| 149 | - that.bpmnData = row | |
| 150 | - that.showBpmnBool = true | |
| 151 | - }) | |
| 145 | + // TODO @芋艿:修改成 getModel | |
| 152 | 146 | }, |
| 153 | 147 | modelDelete(row) { |
| 154 | 148 | const that = this; | ... | ... |