From 494565e131b332055dfc6e883a3430f2d2bd2eb3 Mon Sep 17 00:00:00 2001 From: weifs <605403358@qq.com> Date: Mon, 4 Mar 2024 09:51:35 +0800 Subject: [PATCH 1/4] =?UTF-8?q?perf:=20=20=E4=BC=98=E5=8C=96=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E6=8E=A5=E5=8F=A3=20=E5=88=A0=E9=99=A4=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/IndexController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/IndexController.php b/app/Http/Controllers/IndexController.php index 560d96df2..d214d1052 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) { From 0e916a28040357dd889d48721c5b920d50c26771 Mon Sep 17 00:00:00 2001 From: weifs <605403358@qq.com> Date: Tue, 5 Mar 2024 15:19:12 +0800 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20=E5=AF=BC=E5=87=BA=E7=9A=84?= =?UTF-8?q?=E7=AD=BE=E5=88=B0=E6=95=B0=E6=8D=AE=E5=92=8C=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8D=A2=E6=88=90xlsx=EF=BC=8C=E5=9B=A0?= =?UTF-8?q?=E8=80=81=E7=89=88=E6=9C=AC=E7=9A=84xls=E4=BC=9A=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E5=85=BC=E5=AE=B9=E6=80=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Api/ApproveController.php | 4 ++-- app/Http/Controllers/Api/SystemController.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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); From ae147c76ff00409857dc2bf567895a2ba7b8c952 Mon Sep 17 00:00:00 2001 From: weifs <605403358@qq.com> Date: Tue, 5 Mar 2024 15:22:40 +0800 Subject: [PATCH 3/4] =?UTF-8?q?perf:=20=20=E4=BC=98=E5=8C=96=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E6=8E=A5=E5=8F=A3=20=E5=88=A0=E9=99=A4=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/IndexController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/IndexController.php b/app/Http/Controllers/IndexController.php index d214d1052..1401577b9 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 preg_match('/^\d+\.\d+\.\d+/', $file) && 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) { From 0968c43f61e0183aaf47e38a482d037bc33fc434 Mon Sep 17 00:00:00 2001 From: weifs <605403358@qq.com> Date: Tue, 5 Mar 2024 17:50:13 +0800 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20=E5=8F=91=E8=B5=B7=E6=8A=95?= =?UTF-8?q?=E7=A5=A8=E5=8A=9F=E8=83=BD=E6=B7=BB=E5=8A=A0=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E9=80=89=E4=B8=AD=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/pages/manage/components/DialogView.vue | 27 +++++++++++++++---- .../pages/manage/components/DialogWrapper.vue | 3 +++ 2 files changed, 25 insertions(+), 5 deletions(-) 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 de81a9529..11d363e8f 100644
--- a/resources/assets/js/pages/manage/components/DialogWrapper.vue
+++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue
@@ -1153,6 +1153,9 @@ export default {
         dialogId: {
             handler(dialog_id, old_id) {
                 if (dialog_id) {
+                    //
+                    window.localStorage.removeItem('__cache:vote__')
+                    //
                     this.msgNew = 0
                     this.msgType = ''
                     this.unreadOne = 0