From c8346b01335982aaff53e008f6687f356317f562 Mon Sep 17 00:00:00 2001
From: luohairen <3399054449@qq.com>
Date: 星期四, 26 十二月 2024 17:58:37 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/flowable/task/myProcess/detail/index.vue                   |    5 ++
 src/components/Process/style/flow-viewer.scss                        |   31 +++++++++++++++
 src/components/Process/viewer/index.vue                              |    5 ++
 src/views/projectEngineering/projectLibrary/component/FileDialog.vue |   59 +++++++++++++----------------
 4 files changed, 67 insertions(+), 33 deletions(-)

diff --git a/src/components/Process/style/flow-viewer.scss b/src/components/Process/style/flow-viewer.scss
index 2c90d25..051c33e 100644
--- a/src/components/Process/style/flow-viewer.scss
+++ b/src/components/Process/style/flow-viewer.scss
@@ -131,6 +131,28 @@
     fill: rgba(252, 211, 127, 0.2) !important;
   }
 
+  // 娴佺▼绾�
+  .highlight-overtime.djs-shape .djs-visual > :nth-child(1) {
+    fill: #ff5353 !important;
+    stroke: #ff5353 !important;
+    fill-opacity: 0.2 !important;
+  }
+
+  .highlight-overtime.djs-shape .djs-visual > :nth-child(2) {
+    fill: #ff5353 !important;
+  }
+
+  .highlight-overtime.djs-shape .djs-visual > path {
+    fill: #ff5353 !important;
+    fill-opacity: 0.2 !important;
+    stroke: #ff5353 !important;
+  }
+
+  .highlight-overtime.djs-connection > .djs-visual > path {
+    stroke: #ff5353 !important;
+  }
+
+
   @keyframes draw {
     100% {
       stroke-dashoffset: 0;
@@ -179,5 +201,14 @@
       color: #666666;
       margin-right: 5px;
     }
+
+    .overtime {
+      padding: 4px;
+      background: #ffd1d1;
+      border: 1px solid rgba(255, 0, 0, 0.1);
+      border-radius: 3px;
+      color: #ff5353;
+      margin-right: 5px;
+    }
   }
 }
diff --git a/src/components/Process/viewer/index.vue b/src/components/Process/viewer/index.vue
index 6ecb67a..d57153e 100644
--- a/src/components/Process/viewer/index.vue
+++ b/src/components/Process/viewer/index.vue
@@ -7,6 +7,7 @@
           <div class="finish">宸插姙鐞�</div>
           <div class="processing">澶勭悊涓�</div>
           <div class="todo">鏈繘琛�</div>
+          <div class="overtime">宸茶秴鏃�</div>
         </div>
         <!-- 娴佺▼鍥炬樉绀� -->
         <div v-loading="loading" class="canvas" ref="flowCanvas"></div>
@@ -109,6 +110,9 @@
         if (n.$type === 'bpmn:UserTask') {
           if (completeTask) {
             canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo')
+            if(completeTask.overtime){
+              canvas.addMarker(n.id,  'highlight-overtime')
+            }
             n.outgoing?.forEach(nn => {
               const targetTask = nodeData.find(m => m.key === nn.targetRef.id)
               if (targetTask) {
@@ -119,6 +123,7 @@
                   canvas.addMarker(nn.id, targetTask.completed ? 'highlight' : 'highlight-todo')
                   canvas.addMarker(nn.targetRef.id, targetTask.completed ? 'highlight' : 'highlight-todo')
                 }
+
               }
             })
           }
diff --git a/src/views/flowable/task/myProcess/detail/index.vue b/src/views/flowable/task/myProcess/detail/index.vue
index b2d1288..6d4a7ce 100644
--- a/src/views/flowable/task/myProcess/detail/index.vue
+++ b/src/views/flowable/task/myProcess/detail/index.vue
@@ -27,7 +27,10 @@
                   :icon="setIcon(item.finishTime)"
                   :color="setColor(item.finishTime)"
                 >
-                  <p style="font-weight: 700">{{item.taskName}}<span v-if="item.comment && item.comment.type === '3'" style="color: red">(鎵ц浜嗛┏鍥�)</span></p>
+                  <p style="font-weight: 700">{{item.taskName}}
+                    <span v-if="item.comment && item.comment.type === '3'" style="color: red">(鎵ц浜嗛┏鍥�)</span>
+                    <span v-if="item.overtime" style="color: red">(宸茶秴鏃�)</span>
+                  </p>
                   <el-card :body-style="{ padding: '10px' }">
                     <el-descriptions class="margin-top" :column="1" size="small" border>
                       <el-descriptions-item v-if="item.assigneeName" label-class-name="my-label">
diff --git a/src/views/projectEngineering/projectLibrary/component/FileDialog.vue b/src/views/projectEngineering/projectLibrary/component/FileDialog.vue
index 2e16b22..6e923d2 100644
--- a/src/views/projectEngineering/projectLibrary/component/FileDialog.vue
+++ b/src/views/projectEngineering/projectLibrary/component/FileDialog.vue
@@ -17,13 +17,13 @@
       <template slot="default">
         <div v-if="!isImportOrExport" class="dialog-content">
           <el-upload
-            ref="uploadRef"
+            ref="upload"
             class="upload-demo"
-            :action="uploadUrl"
+            :action="upload.url"
             :limit="1"
             :accept="accept"
-            :headers="uploadHeaders"
-            :disabled="uploadIsUploading"
+            :headers="upload.headers"
+            :disabled="upload.isUploading"
             :on-progress="handleFileUploadProgress"
             :on-success="handleFileSuccess"
             :auto-upload="false"
@@ -55,6 +55,8 @@
 
 <script>
 
+import {getToken} from "@/utils/auth";
+
 export default {
   name: 'FileDialog',
   props: {
@@ -82,12 +84,20 @@
   data() {
     return {
       queryParams: {},
-      uploadRef: null,
       targetColumn: [],
       accept: `.zip`,
-      uploadUrl: '/project/import',
-      uploadHeaders: {},
-      uploadIsUploading: false
+      upload:{
+        // 鏄惁鏄剧ず寮瑰嚭灞傦紙鐢ㄦ埛瀵煎叆锛�
+        open: false,
+        // 寮瑰嚭灞傛爣棰橈紙鐢ㄦ埛瀵煎叆锛�
+        title: '',
+        // 鏄惁绂佺敤涓婁紶
+        isUploading: false,
+        // 璁剧疆涓婁紶鐨勮姹傚ご閮�
+        headers: { Authorization: "Bearer " + getToken() },
+        // 涓婁紶鐨勫湴鍧�
+        url: process.env.VUE_APP_BASE_API + '/project/info/import'
+      },
     };
   },
   methods: {
@@ -95,30 +105,20 @@
       console.log("瀛愮粍浠秙ubmit")
     },
     handleFileUploadProgress() {
-      this.uploadIsUploading = true;
+      this.upload.uploadIsUploading = true;
     },
-    handleFileSuccess(response, file) {
-      this.uploadIsUploading = false;
-      if (this.uploadRef) {
-        this.uploadRef.handleRemove(file);
-      }
-      if (response.code === 200) {
-        this.$emit('fileDialogCancel');
-        this.$message({
-          message: response.msg,
-          type: 'success'
-        });
-      } else {
-        this.$message.error(response.msg);
-      }
+    // 鏂囦欢涓婁紶鎴愬姛澶勭悊
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "瀵煎叆缁撴灉", { dangerouslyUseHTMLString: true });
     },
     handleDownloadFile() {
       this.download('/project/info/export/template', {}, `椤圭洰鏂囦欢妯℃澘_${new Date().getTime()}.zip`)
     },
     submitFileForm() {
-      if (this.uploadRef) {
-        this.uploadRef.submit();
-      }
+        this.$refs.upload.submit();
     },
     closeDialog() {
       this.$emit('fileDialogCancel');
@@ -145,12 +145,7 @@
       }, `椤圭洰搴�${new Date().getTime()}.zip`)
     }
   },
-  mounted() {
-    this.uploadRef = this.$refs.uploadRef;
-  },
-  created() {
-    this.isFileDialogVisible = this.fileDialogVisible;
-  }
+
 };
 </script>
 

--
Gitblit v1.8.0