浏览代码

#返显高亮工作流

Roland 3 年之前
父节点
当前提交
e9e73c402b

+ 0 - 1
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/activiti/service/workflow/impl/TaskServiceImpl.java

@@ -267,7 +267,6 @@ public class TaskServiceImpl implements TaskService {
     }
 
     private void responseImage(HttpServletResponse response, InputStream inputStream, String picName) throws IOException {
-        BufferedImage src = ImageIO.read(inputStream);
         response.setContentType("application/octet-stream;charset=UTF-8");
         response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode(picName, "UTF-8"));
         byte[] b = new byte[1024];

+ 8 - 0
yudao-admin-ui/src/api/oa/todo.js

@@ -81,3 +81,11 @@ export function processHistorySteps(id) {
     method: 'get'
   })
 }
+
+
+export function getHighlightImg(id) {
+  return request({
+    url: '/workflow/task/process/highlight-img/'+id,
+    method: 'get'
+  })
+}

+ 7 - 2
yudao-admin-ui/src/views/oa/leave/index.vue

@@ -137,11 +137,12 @@
       </div>
     </el-dialog>
 
-    <el-dialog :title="title" :visible.sync="dialogStepsVisible" width="600px" append-to-body>
+    <el-dialog :title="title" :visible.sync="dialogStepsVisible" width="750px" append-to-body>
       <el-steps :active="stepActive" finish-status="success" >
         <el-step :title="stepTitle(item)" :description="stepAssignee(item.assignee)" icon="el-icon-edit"  v-for="(item) in handleTask.historyTask"></el-step>
       </el-steps>
       <br/>
+      <div v-html="svgUrl"></div>
       <el-steps direction="vertical" :active="stepActive">
         <el-step :title="stepTitle(item)" :description="stepDes(item)" v-for="(item) in handleTask.historyTask"></el-step>
       </el-steps>
@@ -156,7 +157,7 @@
 <script>
 import { createLeave, updateLeave, deleteLeave, getLeave, getLeavePage, exportLeaveExcel } from "@/api/oa/leave"
 import { getDictDataLabel, getDictDatas, DICT_TYPE } from '@/utils/dict'
-import { processHistorySteps } from '@/api/oa/todo'
+import { processHistorySteps,getHighlightImg } from '@/api/oa/todo'
 export default {
   name: "Leave",
   components: {
@@ -194,6 +195,7 @@ export default {
       },
       // 表单参数
       form: {},
+      svgUrl: "",
       handleTask: {
         historyTask:[],
         taskVariable: "",
@@ -361,6 +363,9 @@ export default {
         this.handleTask.historyTask = response.data;
         this.dialogStepsVisible = true
         this.title = "审批进度";
+        getHighlightImg(row.processInstanceId).then(response => {
+          that.svgUrl = response
+        })
       });
     },
     /** 导出按钮操作 */