From cd0fcb903f74771cfe5108f6f9eb0c12b5a09692 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Sun, 20 Apr 2025 08:32:26 +0800 Subject: [PATCH] no message --- app/Http/Controllers/Api/SystemController.php | 10 ++++++ public/tools/map/style.css | 1 + resources/assets/js/components/UserSelect.vue | 35 ++++++++++++++++--- resources/assets/js/functions/common.js | 20 +++++++---- .../manage/components/DialogView/file.vue | 2 +- .../components/MeetingManager/index.vue | 4 +-- resources/assets/js/store/actions.js | 10 +++--- .../assets/statics/public/tools/map/style.css | 1 + 8 files changed, 64 insertions(+), 19 deletions(-) diff --git a/app/Http/Controllers/Api/SystemController.php b/app/Http/Controllers/Api/SystemController.php index 90b58c343..ff2d2c898 100755 --- a/app/Http/Controllers/Api/SystemController.php +++ b/app/Http/Controllers/Api/SystemController.php @@ -1543,6 +1543,16 @@ class SystemController extends AbstractController return !str_starts_with($item, 'office/{path}/'); }); } + // 添加OKR资源 + $okrContent = @file_get_contents("http://nginx/apps/okr/"); + preg_match_all('/]*src=["\']([^"\']+)["\'][^>]*>/i', $okrContent, $scriptMatches); + foreach ($scriptMatches[1] as $src) { + $array[] = $src; + } + preg_match_all('/]*rel=["\']stylesheet["\'][^>]*href=["\']([^"\']+)["\'][^>]*>/i', $okrContent, $linkMatches); + foreach ($linkMatches[1] as $href) { + $array[] = $href; + } } return array_map(function($item) use ($version) { diff --git a/public/tools/map/style.css b/public/tools/map/style.css index 1028f4980..b4149d435 100644 --- a/public/tools/map/style.css +++ b/public/tools/map/style.css @@ -118,6 +118,7 @@ body { top: 0; z-index: 1; background-color: #ffffff; + word-break: break-all; } #poi-list { diff --git a/resources/assets/js/components/UserSelect.vue b/resources/assets/js/components/UserSelect.vue index 61e354d3a..8c60ac2ff 100755 --- a/resources/assets/js/components/UserSelect.vue +++ b/resources/assets/js/components/UserSelect.vue @@ -60,7 +60,13 @@
- +
@@ -284,9 +290,10 @@ export default { ], switchActive: 'recent', - loadIng: 0, // 搜索框等待效果 - waitIng: 0, // 页面等待效果 - submittIng: 0, // 提交按钮等待效果 + loadIng: 0, // 搜索框等待效果 + waitIng: 0, // 页面等待效果 + submittIng: 0, // 提交按钮等待效果 + backspaceDelete: false, // 是否按删除键删除 values: [], selects: [], @@ -725,7 +732,7 @@ export default { this.selects.push(userid) // 滚动到选中的位置 this.$nextTick(() => { - $A.scrollIntoViewIfNeeded(this.$refs.selected.querySelector(`li[data-id="${userid}"]`)) + $A.scrollIntoViewIfNeeded(this.$refs.selected.querySelector(`li[data-id="${userid}"]`), true) }) } }, @@ -807,6 +814,24 @@ export default { } }, + onKeydown(event) { + // 按下删除键时,判断是否符合删除条件 + this.backspaceDelete = event.key === 'Backspace' && !this.searchKey && this.selects.length > 0; + }, + + onKeyup(event) { + if (event.key === 'Backspace' && this.backspaceDelete) { + // 从最后一个元素开始向前遍历,找到第一个不是不可取消的元素 + for (let i = this.selects.length - 1; i >= 0; i--) { + const userid = this.selects[i]; + if (!this.isUncancelable(userid)) { + this.onRemoveItem(userid); + break; // 找到并移除后立即退出循环 + } + } + } + }, + show() { this.onSelection() }, diff --git a/resources/assets/js/functions/common.js b/resources/assets/js/functions/common.js index 055c76ee1..a1e595abe 100755 --- a/resources/assets/js/functions/common.js +++ b/resources/assets/js/functions/common.js @@ -662,13 +662,13 @@ const timezone = require("dayjs/plugin/timezone"); if (url) { url = this.removeURLParameter(url, Object.keys(params)) } - url+= ""; - url+= url.indexOf("?") === -1 ? '?' : ''; + url += ""; + url += url.indexOf("?") === -1 ? '?' : ''; for (let key in params) { if (!params.hasOwnProperty(key)) { continue; } - url+= '&' + key + '=' + params[key]; + url += '&' + key + '=' + encodeURIComponent(params[key]); } return this.rightDelete(url.replace("?&", "?"), '?'); } @@ -1133,15 +1133,23 @@ const timezone = require("dayjs/plugin/timezone"); /** * 按需滚动到View * @param element + * @param smooth */ - scrollIntoViewIfNeeded(element) { + scrollIntoViewIfNeeded(element = null, smooth = false) { if (!element) { return; } - if (typeof element.scrollIntoViewIfNeeded === "function") { + if (!smooth && typeof element.scrollIntoViewIfNeeded === "function") { element.scrollIntoViewIfNeeded() } else { - $A.scrollToView(element, {block: "nearest", inline: "nearest"}) + const options = { + block: "nearest", + inline: "nearest" + } + if (smooth) { + options.behavior = 'smooth' + } + $A.scrollToView(element, options) } }, diff --git a/resources/assets/js/pages/manage/components/DialogView/file.vue b/resources/assets/js/pages/manage/components/DialogView/file.vue index 169278867..ad7a4e928 100644 --- a/resources/assets/js/pages/manage/components/DialogView/file.vue +++ b/resources/assets/js/pages/manage/components/DialogView/file.vue @@ -8,7 +8,7 @@
-
+
diff --git a/resources/assets/js/pages/manage/components/MeetingManager/index.vue b/resources/assets/js/pages/manage/components/MeetingManager/index.vue index 91d549d38..7e009fdb8 100644 --- a/resources/assets/js/pages/manage/components/MeetingManager/index.vue +++ b/resources/assets/js/pages/manage/components/MeetingManager/index.vue @@ -405,8 +405,8 @@ export default { .replace(/^\//, ''); const meetingPath = $A.urlAddParams("/" + meetingLink, { type: 'direct', - nickname: encodeURIComponent(data.nickname), - avatar: encodeURIComponent(data.userimg), + nickname: data.nickname, + avatar: data.userimg, audio: this.addData.tracks.includes("audio") ? 1 : 0, video: this.addData.tracks.includes("video") ? 1 : 0, token: this.userToken, diff --git a/resources/assets/js/store/actions.js b/resources/assets/js/store/actions.js index bd82c6833..e8abdbfb5 100644 --- a/resources/assets/js/store/actions.js +++ b/resources/assets/js/store/actions.js @@ -1247,11 +1247,11 @@ export default { const title = $A.L("定位签到") const channel = $A.randomString(6) const params = { - title: encodeURIComponent(title), - label: encodeURIComponent($A.L("选择附近地点")), - placeholder: encodeURIComponent($A.L("搜索地点")), - noresult: encodeURIComponent($A.L("附近没有找到地点")), - errtip: encodeURIComponent($A.L("定位失败")), + title, + label: $A.L("选择附近地点"), + placeholder: $A.L("搜索地点"), + noresult: $A.L("附近没有找到地点"), + errtip: $A.L("定位失败"), selectclose: "true", channel, } diff --git a/resources/assets/statics/public/tools/map/style.css b/resources/assets/statics/public/tools/map/style.css index 1028f4980..b4149d435 100644 --- a/resources/assets/statics/public/tools/map/style.css +++ b/resources/assets/statics/public/tools/map/style.css @@ -118,6 +118,7 @@ body { top: 0; z-index: 1; background-color: #ffffff; + word-break: break-all; } #poi-list {