diff --git a/src/api/data/config.ts b/src/api/data/config.ts index 0badf08..d7539b3 100644 --- a/src/api/data/config.ts +++ b/src/api/data/config.ts @@ -10,6 +10,13 @@ export function getConfigList(params?) { params, }); } +export function getConfigAllList(params?) { + return http.request({ + url: '/config/list', + method: 'GET', + params, + }); +} /** * @description: 根据ID获取详情 */ @@ -19,15 +26,6 @@ export function getConfigDetail(id) { method: 'get', }); } -/** - * @description: 刷新缓存 - */ -export function refreshCache() { - return http.request({ - url: '/config/refreshCache', - method: 'get', - }); -} /** * @description: 添加配置 */ @@ -78,6 +76,13 @@ export function getConfigItemList(params?) { params, }); } +export function getConfigItemAllList(params?) { + return http.request({ + url: '/config/item/list', + method: 'GET', + params, + }); +} /** * @description: 根据ID获取详情 */ diff --git a/src/components/Upload/Images.vue b/src/components/Upload/Images.vue index dd30340..6c50b40 100644 --- a/src/components/Upload/Images.vue +++ b/src/components/Upload/Images.vue @@ -131,7 +131,7 @@ const handleHttpUpload = async (options: UploadRequestOptions) => { fileName: res.fileName }) } - emit('upload', list) + emit('upload', list,props.zIndex) } else { emit("upload", res, props.zIndex); } @@ -142,7 +142,7 @@ const handleHttpUpload = async (options: UploadRequestOptions) => { type: "error" }); if (props.multiple) { - emit('upload', props.fileList) + emit('upload', props.fileList,props.zIndex) } else { uploadRef.value!.clearFiles(); emit("upload", "", props.zIndex); @@ -166,7 +166,7 @@ const handleEdit = (index: any) => { const handleRemove = (index: any) => { editIndex = index if (props.multiple) { - emit("upload", props.fileList.filter((f, i) => !(editIndex == i))) + emit("upload", props.fileList.filter((f, i) => !(editIndex == i)),props.zIndex) } else { uploadRef.value!.clearFiles(); emit("upload", "" ,props.zIndex); @@ -255,9 +255,10 @@ const beforeUpload: UploadProps["beforeUpload"] = (rawFile) => { .upload-box { position: relative; display: flex; - + flex-wrap: wrap; >div { margin-right: 10px; + margin-bottom: 10px; position: relative; &.items { diff --git a/src/components/Upload/file.vue b/src/components/Upload/file.vue index ab2da4f..163d056 100644 --- a/src/components/Upload/file.vue +++ b/src/components/Upload/file.vue @@ -38,7 +38,7 @@ @@ -72,7 +72,7 @@ const props = defineProps({ }, limit: { type: Number, - default: 2 + default: undefined }, fileList: { type: Array, @@ -124,9 +124,9 @@ const handleHttpUpload = async (options: UploadRequestOptions) => { filePath: res.fileUrl, fileName: res.fileName, }) - emit('upload', list) + emit('upload', list,props.zIndex) }else{ - emit("upload", res.fileUrl,res.fileName, props.zIndex); + emit("upload", res.fileUrl,res.fileName,props.zIndex); } } catch (error) { ElNotification({ @@ -135,10 +135,10 @@ const handleHttpUpload = async (options: UploadRequestOptions) => { type: "error" }); if(props.multiple){ - emit('upload', props.fileList) + emit('upload', props.fileList,props.zIndex) }else{ uploadRef.value!.clearFiles(); - emit("upload", "", "", props.zIndex); + emit("upload", "", "",props.zIndex); } options.onError(error as any); } finally { @@ -152,7 +152,7 @@ const onPreview=(uploadFile: UploadFile)=> { const handleRemove: UploadProps["onRemove"] = (file:any) => { if(props.multiple){ - emit("upload",props.fileList.filter((f) => !(f === file.url))) + emit("upload",props.fileList.filter((f) => !(f === file.url)),props.zIndex) }else{ uploadRef.value!.clearFiles(); emit("upload", "", "", props.zIndex); diff --git a/src/views/data/config/columnsItem.ts b/src/views/data/config/columnsItem.ts index 6e8e759..2a489bc 100644 --- a/src/views/data/config/columnsItem.ts +++ b/src/views/data/config/columnsItem.ts @@ -38,43 +38,44 @@ export const columns = [ typeText='多行文本' break; case 'password': - typeText='密码' - break; + typeText='密码' + break; case 'radio': - typeText='单选框' - break; + typeText='单选框' + break; case 'checkbox': - typeText='复选框' - break; + typeText='复选框' + break; case 'select': - typeText='下拉框(单选)' - break; + typeText='下拉框(单选)' + break; case 'selects': typeText='下拉框(多选)' break; case 'icon': typeText='字体图标' break; - case 'date': - typeText='日期' - break; + case 'date': + typeText='日期' + break; case 'datetime': - typeText='时间' - break; + typeText='时间' + break; case 'image': typeText='单张图片' break; - case 'images': - typeText='多张图片' - break; + case 'images': + typeText='多张图片' + break; case 'file': - typeText='单个文件' + typeText='单个文件' + break; case 'files': typeText='多个文件' break; - case 'ueditor': + case 'ueditor': typeText='富文本编辑器' - break; + break; default: break; } diff --git a/src/views/setting/configWeb/BasicSetting.vue b/src/views/setting/configWeb/BasicSetting.vue index 3a94e7b..a4d8b77 100644 --- a/src/views/setting/configWeb/BasicSetting.vue +++ b/src/views/setting/configWeb/BasicSetting.vue @@ -1,52 +1,69 @@ diff --git a/src/views/setting/configWeb/index.vue b/src/views/setting/configWeb/index.vue index ac337e5..bcea7fe 100644 --- a/src/views/setting/configWeb/index.vue +++ b/src/views/setting/configWeb/index.vue @@ -1,23 +1,64 @@