From 47d7d2c1e141d805b28c54ac8cf6d5b6f1a2610d Mon Sep 17 00:00:00 2001
From: shikeying <pxzsky@163.com>
Date: 星期三, 22 三月 2023 14:27:55 +0800
Subject: [PATCH] 演示请假流程

---
 public/bpmnjs/index.js                        |    4 +++-
 src/api/activiti/historyFormdata.js           |    2 +-
 src/views/workflow/leave/index.vue            |   26 +++++++++++++-------------
 src/api/workflow/leave.js                     |    2 +-
 src/views/activiti/task/index.vue             |    8 ++++----
 src/views/workflow/leave/leaveHistoryForm.vue |    6 +++---
 6 files changed, 25 insertions(+), 23 deletions(-)

diff --git a/public/bpmnjs/index.js b/public/bpmnjs/index.js
index bcc753b..ed434aa 100644
--- a/public/bpmnjs/index.js
+++ b/public/bpmnjs/index.js
@@ -75,8 +75,10 @@
         instanceId
       };
 
+      let token = localStorage.getItem("Authorization");
+
       _jquery.default.ajax({
-        url: localStorage.getItem("VUE_APP_BASE_API") + '/activitiHistory/gethighLine',
+        url: localStorage.getItem("VUE_APP_BASE_API") + '/wf/history/getHighLine?Authorization='+token,
         // url: 'http://localhost:8080/activitiHistory/gethighLine',
         type: 'GET',
         data: param1,
diff --git a/src/api/activiti/historyFormdata.js b/src/api/activiti/historyFormdata.js
index 78326a8..cd52a87 100644
--- a/src/api/activiti/historyFormdata.js
+++ b/src/api/activiti/historyFormdata.js
@@ -2,7 +2,7 @@
 // 鏌ヨ璇峰亣璇︾粏
 export function historyFromData(instanceId) {
   return request({
-    url: '/historyFromData/ByInstanceId/' + instanceId,
+    url: '/wf/history/formData/ByInstanceId/' + instanceId,
     method: 'get'
   })
 }
diff --git a/src/api/workflow/leave.js b/src/api/workflow/leave.js
index d5763b3..a26c760 100644
--- a/src/api/workflow/leave.js
+++ b/src/api/workflow/leave.js
@@ -20,7 +20,7 @@
 // 鏌ヨ璇峰亣璇︾粏
 export function getLeave(id) {
   return request({
-    url: '/wf/leave/' + id,
+    url: '/wf/leave/view/' + id,
     method: 'get'
   })
 }
diff --git a/src/views/activiti/task/index.vue b/src/views/activiti/task/index.vue
index a977981..f5ed247 100644
--- a/src/views/activiti/task/index.vue
+++ b/src/views/activiti/task/index.vue
@@ -17,7 +17,7 @@
             type="text"
             icon="el-icon-edit"
             @click="examineAndApprove (scope.row)"
-            v-hasPermi="['workflow:leave:edit']"
+            v-hasPermi="['wf:task:**']"
           >瀹℃壒
           </el-button>
         </template>
@@ -143,8 +143,8 @@
         console.log(row)
         this.reset();
         this.definitionKey = row.definitionKey;
-          this.businessKey = row.businessKey;
-         this.id=row.id;
+        this.businessKey = row.businessKey;
+        this.id=row.id;
         formDataShow(row.id).then(response => {
           // FormProperty_3qipis2--__!!radio--__!!瀹℃壒鎰忚--__!!i--__!!鍚屾剰--__--涓嶅悓鎰�
           // FormProperty_0lffpcm--__!!textarea--__!!鎵规敞--__!!f--__!!null
@@ -178,7 +178,7 @@
       /** 鎻愪氦鎸夐挳 */
       submitForm() {
         formDataSave(this.id,this.form.formData).then(response => {
-          this.msgSuccess("瀹℃壒鎴愬姛");
+          this.$modal.msgSuccess("瀹℃壒鎴愬姛");
           this.open = false;
           this.getList();
         });
diff --git a/src/views/workflow/leave/index.vue b/src/views/workflow/leave/index.vue
index 9f446d8..106e097 100644
--- a/src/views/workflow/leave/index.vue
+++ b/src/views/workflow/leave/index.vue
@@ -90,7 +90,7 @@
       <el-table-column label="鍘熷洜" align="center" prop="reason"/>
       <el-table-column label="寮�濮嬫椂闂�" align="center" prop="leave_start_time" width="180">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.leaveStartTime, '{y}-{m}-{d}') }}</span>
+          <span>{{ parseTime(scope.row.leave_start_time, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
       <el-table-column label="缁撴潫鏃堕棿" align="center" prop="leave_end_time" width="180">
@@ -235,6 +235,7 @@
 
 
   import leaveHistoryForm from "./leaveHistoryForm";
+  import {getToken} from "@/utils/auth";
 
   export default {
     name: 'Leave',
@@ -404,14 +405,13 @@
       },
       /** 杩涘害鏌ョ湅 */
       checkTheSchedule(row) {
-        getDefinitionsByInstanceId(row.instanceId).then(response => {
-          let data = response.data
+        getDefinitionsByInstanceId(row.instance_id).then(response => {
+          let data = response.data;
+          localStorage.setItem("Authorization", getToken());
           // this.url = '/bpmnjs/index.html?type=lookBpmn&deploymentFileUUID='+data.deploymentID+'&deploymentName='+ encodeURI(data.resourceName);
-          this.modelerUrl = '/bpmnjs/index.html?type=lookBpmn&instanceId=' + row.instanceId + '&deploymentFileUUID=' + data.deploymentID + '&deploymentName=' + encodeURI(data.resourceName);
-          this.modelVisible = true
+          this.modelerUrl = '/bpmnjs/index.html?type=lookBpmn&instanceId=' + row.instance_id + '&deploymentFileUUID=' + data.deploymentID + '&deploymentName=' + encodeURI(data.resourceName);
+          this.modelVisible = true;
         })
-
-
       },
       /** 鎻愪氦鎸夐挳 */
       submitForm() {
@@ -419,15 +419,15 @@
           if (valid) {
             if (this.form.id != null) {
               updateLeave(this.form).then(response => {
-                this.msgSuccess('淇敼鎴愬姛')
-                this.open = false
-                this.getList()
+                this.$modal.msgSuccess('淇敼鎴愬姛');
+                this.open = false;
+                this.getList();
               })
             } else {
               addLeave(this.form).then(response => {
-                this.msgSuccess('鏂板鎴愬姛')
-                this.open = false
-                this.getList()
+                this.$modal.msgSuccess('鏂板鎴愬姛');
+                this.open = false;
+                this.getList();
               })
             }
           }
diff --git a/src/views/workflow/leave/leaveHistoryForm.vue b/src/views/workflow/leave/leaveHistoryForm.vue
index 0041b17..f08d1c0 100644
--- a/src/views/workflow/leave/leaveHistoryForm.vue
+++ b/src/views/workflow/leave/leaveHistoryForm.vue
@@ -1,7 +1,7 @@
 <template>
   <div>
     <div>
-    <h2>璇峰亣浜猴細{{form.createName}}</h2>
+    <h2>璇峰亣浜猴細{{form.create_name}}</h2>
     <el-form  label-width="80px">
       <el-form-item label="璇峰亣绫诲瀷" >
        <el-input v-model="form.type"/>
@@ -13,10 +13,10 @@
         <el-input v-model="form.reason" />
       </el-form-item>
       <el-form-item label="寮�濮嬫椂闂�">
-        <el-input v-model="form.leaveStartTime"/>
+        <el-input v-model="form.leave_start_time"/>
       </el-form-item>
       <el-form-item label="缁撴潫鏃堕棿">
-        <el-input v-model="form.leaveEndTime"/>
+        <el-input v-model="form.leave_end_time"/>
       </el-form-item>
     </el-form>
     </div>

--
Gitblit v1.9.1