diff --git a/app/Http/Controllers/Api/ApproveController.php b/app/Http/Controllers/Api/ApproveController.php index 437af3314..96926c675 100755 --- a/app/Http/Controllers/Api/ApproveController.php +++ b/app/Http/Controllers/Api/ApproveController.php @@ -858,7 +858,7 @@ public function export() BillExport::create()->setTitle($title)->setHeadings($headings)->setData($datas)->setStyles(["A1:Y1" => ["font" => ["bold" => true]]]) ]; // - $fileName = '审批记录_' . Base::time() . '.xls'; + $fileName = '审批记录_' . Base::time() . '.xlsx'; $filePath = "temp/approve/export/" . date("Ym", Base::time()); $export = new BillMultipleExport($sheets); $res = $export->store($filePath . "/" . $fileName); @@ -866,7 +866,7 @@ public function export() return Base::retError('导出失败,' . $fileName . '!'); } $xlsPath = storage_path("app/" . $filePath . "/" . $fileName); - $zipFile = "app/" . $filePath . "/" . Base::rightDelete($fileName, '.xls') . ".zip"; + $zipFile = "app/" . $filePath . "/" . Base::rightDelete($fileName, '.xlsx') . ".zip"; $zipPath = storage_path($zipFile); if (file_exists($zipPath)) { Base::deleteDirAndFile($zipPath, true); diff --git a/app/Http/Controllers/Api/SystemController.php b/app/Http/Controllers/Api/SystemController.php index e271745c6..dd448a759 100755 --- a/app/Http/Controllers/Api/SystemController.php +++ b/app/Http/Controllers/Api/SystemController.php @@ -1210,7 +1210,7 @@ public function checkin__export() if (count($users) > 1) { $fileName .= "等" . count($userid) . "位成员"; } - $fileName .= '签到记录_' . Base::time() . '.xls'; + $fileName .= '签到记录_' . Base::time() . '.xlsx'; $filePath = "temp/checkin/export/" . date("Ym", Base::time()); $export = new BillMultipleExport($sheets); $res = $export->store($filePath . "/" . $fileName); @@ -1218,7 +1218,7 @@ public function checkin__export() return Base::retError('导出失败,' . $fileName . '!'); } $xlsPath = storage_path("app/" . $filePath . "/" . $fileName); - $zipFile = "app/" . $filePath . "/" . Base::rightDelete($fileName, '.xls') . ".zip"; + $zipFile = "app/" . $filePath . "/" . Base::rightDelete($fileName, '.xlsx') . ".zip"; $zipPath = storage_path($zipFile); if (file_exists($zipPath)) { Base::deleteDirAndFile($zipPath, true); diff --git a/app/Http/Controllers/IndexController.php b/app/Http/Controllers/IndexController.php index 3268116ca..8ef7bf3d9 100755 --- a/app/Http/Controllers/IndexController.php +++ b/app/Http/Controllers/IndexController.php @@ -252,7 +252,7 @@ public function desktop__publish($name = '') if ($uploadSuccessFileNum >= $fileNum){ $directoryPath = public_path("uploads/desktop"); $files = array_filter(scandir($directoryPath), function($file) use($directoryPath) { - return is_dir($directoryPath . '/' . $file) && $file != '.' && $file != '..'; + return preg_match("/^\d+\.\d+\.\d+$/", $file) && is_dir($directoryPath . '/' . $file) && $file != '.' && $file != '..'; }); sort($files); foreach ($files as $key => $file) { diff --git a/resources/assets/js/pages/manage/components/DialogView.vue b/resources/assets/js/pages/manage/components/DialogView.vue index 45a935969..cc65a0ada 100644 --- a/resources/assets/js/pages/manage/components/DialogView.vue +++ b/resources/assets/js/pages/manage/components/DialogView.vue @@ -101,18 +101,18 @@

                     
@@ -316,12 +316,17 @@ export default {
             todoShow: false,
             todoList: [],
 
-            emojiUsersNum: 5
+            emojiUsersNum: 5,
+
+            voteData: {}
         }
     },
 
     mounted() {
         this.emojiUsersNum = Math.min(6, Math.max(2, Math.floor((this.windowWidth - 180) / 52)))
+        if (Object.keys(this.voteData).length === 0) {
+            this.voteData = JSON.parse(window.localStorage.getItem(`__cache:vote__`)) || {};
+        }
     },
 
     beforeDestroy() {
@@ -411,6 +416,18 @@ export default {
             if (val) {
                 setTimeout(_ => this.operateEnter = true, 500)
             }
+        },
+        voteData: {
+            handler(val) {
+                const voteData = JSON.parse(window.localStorage.getItem('__cache:vote__')) || {}
+                for (const key in val) {
+                    voteData[key] = val[key];
+                }
+                if (Object.keys(voteData).length > 0) {
+                    window.localStorage.setItem('__cache:vote__', JSON.stringify(voteData))
+                }
+            },
+            deep: true
         }
     },
 
@@ -614,7 +631,7 @@ export default {
                 data: {
                     dialog_id: msgData.dialog_id,
                     uuid: msgData.msg.uuid,
-                    vote: msgData.msg._vote || [],
+                    vote: this.voteData[msgData.msg.uuid] || [],
                     type: type
                 }
             }).then(({ data }) => {
diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue
index e4b8c625e..1fe8eaab5 100644
--- a/resources/assets/js/pages/manage/components/DialogWrapper.vue
+++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue
@@ -1189,7 +1189,10 @@ export default {
                     //
                     this.getUserApproveStatus()
                 }
+                //
                 this.$store.dispatch('closeDialog', old_id)
+                //
+                window.localStorage.removeItem('__cache:vote__')
             },
             immediate: true
         },