From aa885e4b410aaf66e933b8cb98613b846e9e2f00 Mon Sep 17 00:00:00 2001 From: dawuliao Date: Mon, 26 Jun 2023 14:08:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[feature]=20=E6=9C=AC=E5=9C=B0=E5=90=AF?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/yarn.lock | 11 +++-------- server/public/.htaccess | 8 -------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/admin/yarn.lock b/admin/yarn.lock index 3d06ce999..9bbde1467 100644 --- a/admin/yarn.lock +++ b/admin/yarn.lock @@ -1802,10 +1802,10 @@ es6-symbol@^3.1.1, es6-symbol@^3.1.3: d "^1.0.1" ext "^1.1.2" -esbuild-darwin-arm64@0.14.53: +esbuild-windows-64@0.14.53: version "0.14.53" - resolved "https://registry.npmmirror.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.53.tgz" - integrity sha512-otJwDU3hnI15Q98PX4MJbknSZ/WSR1I45il7gcxcECXzfN4Mrpft5hBDHXNRnCh+5858uPXBXA1Vaz2jVWLaIA== + resolved "https://registry.npmmirror.com/esbuild-windows-64/-/esbuild-windows-64-0.14.53.tgz" + integrity sha512-s9skQFF0I7zqnQ2K8S1xdLSfZFsPLuOGmSx57h2btSEswv0N0YodYvqLcJMrNMXh6EynOmWD7rz+0rWWbFpIHQ== esbuild@^0.14.47: version "0.14.53" @@ -2223,11 +2223,6 @@ fs.realpath@^1.0.0: resolved "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - function-bind@^1.1.1: version "1.1.1" resolved "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.1.tgz" diff --git a/server/public/.htaccess b/server/public/.htaccess index cbc786893..e69de29bb 100644 --- a/server/public/.htaccess +++ b/server/public/.htaccess @@ -1,8 +0,0 @@ - - Options +FollowSymlinks -Multiviews - RewriteEngine On - - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] - -- Gitee From cabd0759a3fea4920eddaec269c7416ef06006ee Mon Sep 17 00:00:00 2001 From: dawuliao Date: Mon, 26 Jun 2023 17:19:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[feature]=20=E6=B7=BB=E5=8A=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E4=BC=A0=20=E4=B8=8E=20=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E7=B4=A0=E6=9D=90=E7=AE=A1=E7=90=86=EF=BC=8C=20=E5=BC=80?= =?UTF-8?q?=E5=90=AF=E7=BC=93=E5=AD=98redis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/src/components/material/file.vue | 5 + admin/src/components/material/hook.ts | 13 ++- admin/src/components/material/index.vue | 91 ++++++++++++++++++- admin/src/views/material/index.vue | 4 + server/.example.env | 2 +- .../adminapi/controller/UploadController.php | 19 +++- server/app/adminapi/lists/file/FileLists.php | 8 +- server/app/common/enum/FileEnum.php | 3 +- server/app/common/service/UploadService.php | 87 +++++++++++++++++- .../common/service/storage/engine/Server.php | 2 +- server/config/cache.php | 8 ++ server/config/project.php | 5 + 12 files changed, 234 insertions(+), 13 deletions(-) diff --git a/admin/src/components/material/file.vue b/admin/src/components/material/file.vue index a9f050033..fef7d719b 100644 --- a/admin/src/components/material/file.vue +++ b/admin/src/components/material/file.vue @@ -3,6 +3,11 @@
+
{ + await fileCateAdd({ + type, + name: value, + pid: pid + }) + getCateLists() + } + // 编辑分组 const handleEditCate = async (value: string, id: number) => { await fileCateEdit({ @@ -82,6 +91,7 @@ export function useCate(type: number) { cateId, cateLists, handleAddCate, + handleAddChildCate, handleEditCate, handleDeleteCate, getCateLists, @@ -105,7 +115,8 @@ export function useFile( const fileParams = reactive({ name: '', type: type, - cid: cateId + cid: cateId, + source: '' }) const { pager, getLists, resetPage } = usePaging({ fetchFun: fileList, diff --git a/admin/src/components/material/index.vue b/admin/src/components/material/index.vue index 72660bbdd..53640a99b 100644 --- a/admin/src/components/material/index.vue +++ b/admin/src/components/material/index.vue @@ -42,6 +42,20 @@
+ +
+ + 添加分组 + +
+
删除分组
@@ -91,6 +105,16 @@ > 本地上传 + + 本地上传 +
+ + + +
重命名 - + 查看 + + 地址 + 下载
@@ -359,6 +421,7 @@
+ @@ -367,6 +430,7 @@ import { useCate, useFile } from './hook' import FileItem from './file.vue' import Preview from './preview.vue' import type { Ref } from 'vue' +import { ElMessage } from 'element-plus' const props = defineProps({ fileSize: { type: String, @@ -403,6 +467,17 @@ const typeValue = computed(() => { return 0 } }) +const options = [ + { + value: '0', + label: '后台上传' + }, + { + value: '1', + label: '前端上传' + } +] + const visible: Ref = inject('visible')! const previewUrl = ref('') const showPreview = ref(false) @@ -411,6 +486,7 @@ const { cateId, cateLists, handleAddCate, + handleAddChildCate, handleEditCate, handleDeleteCate, getCateLists, @@ -492,6 +568,19 @@ onMounted(() => { defineExpose({ clearSelect }) + +const textCopys = ref() +const textCopy = (uri: string) => { + const text = uri // 复制文本内容 + const input = textCopys.value + input.value = text // 修改input的内容 + input.select() // 选中文本 + document.execCommand('copy') // 浏览器复制 + ElMessage({ + message: '地址复制成功', + type: 'success' + }) +}