From 685a7fb3ac953ed646165e05687eca961359a1c2 Mon Sep 17 00:00:00 2001 From: lihui_ocr Date: Fri, 24 May 2024 11:28:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=9B=BE=E7=89=87=E6=8B=96=E6=8B=BD?= =?UTF-8?q?=E8=B0=83=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Header/RecycleModal.vue | 46 ++++++++++++++----- src/store/modules/asideConfig.ts | 4 +- src/views/home/aside/Aside.vue | 20 ++++++++ src/views/home/aside/comp/Upload.vue | 6 +-- .../aside/comp/items/IzApprovalStatus.vue | 1 + .../home/aside/comp/items/PictureUpload.vue | 11 +++-- src/views/home/content/Content.vue | 4 +- src/views/home/index.vue | 2 +- 8 files changed, 71 insertions(+), 23 deletions(-) diff --git a/src/layout/components/Header/RecycleModal.vue b/src/layout/components/Header/RecycleModal.vue index 461634e..de53b5f 100644 --- a/src/layout/components/Header/RecycleModal.vue +++ b/src/layout/components/Header/RecycleModal.vue @@ -957,7 +957,8 @@ watch(() => show.value, async (newVal) => { ::v-deep(.vue-waterfall) { overflow-x: hidden; .vue-waterfall-column { - max-width: 190px; + max-width: 100%; + } } @@ -1115,6 +1116,7 @@ watch(() => show.value, async (newVal) => { .scroll { overflow-y: auto; overflow-x: hidden; + // height: calc(100vh - 282px); height: 800px; margin-left: 20px; @@ -1147,22 +1149,42 @@ watch(() => show.value, async (newVal) => { grid-gap: 0px 8px; } } -@media (min-width: 1440px) { + +@media (min-width: 1442px) { ::v-deep(.vue-waterfall) { overflow-x: hidden; .vue-waterfall-column { - max-width: 190px; - margin-right: 8.5px; + + width: 198px !important; } } + } -@media (max-width: 1930px) { -::v-deep(.vue-waterfall) { - overflow-x: hidden; - .vue-waterfall-column { - max-width: 190px; - margin-right: 8.1px; - +/* 定义滚动条的宽度及背景颜色 */ + ::-webkit-scrollbar { + position: fixed; + width: 5px; /* for vertical scrollbars */ + height: 10px; /* for horizontal scrollbars */ + background: #f1f1f1; + display: none; + } + + /* 定义滚动条轨道的样式 */ + ::-webkit-scrollbar-track { + background-color: #e1e1e1; + border-radius: 10px; /* 圆角 */ + display: none; + } + + /* 定义滚动条滑块的样式 */ + ::-webkit-scrollbar-thumb { + display: none; + background-color: #888; + border-radius: 10px; /* 圆角 */ + } + + /* 滑块hover时的样式 */ + ::-webkit-scrollbar-thumb:hover { + background-color: #555; } -}} diff --git a/src/store/modules/asideConfig.ts b/src/store/modules/asideConfig.ts index ae0dfc5..260b1e6 100644 --- a/src/store/modules/asideConfig.ts +++ b/src/store/modules/asideConfig.ts @@ -1,6 +1,6 @@ -import { defineStore } from 'pinia' -import { store } from '@/store' import { getConfig } from '@/api/system/user' +import { store } from '@/store' +import { defineStore } from 'pinia' import { getFilter } from '@/api/home/filter' import type { AsideConfig } from '/#/api' diff --git a/src/views/home/aside/Aside.vue b/src/views/home/aside/Aside.vue index ee87ca9..bb401b3 100644 --- a/src/views/home/aside/Aside.vue +++ b/src/views/home/aside/Aside.vue @@ -27,6 +27,13 @@ import emitter from '@/utils/mitt' import { getFilterList } from '@/api/home/main' import { useKeydown } from '@/hooks/event/useKeydown' +const props = defineProps({ + contentRef: { + type: Object, + required: true, + }, + +}) const configStore = useConfig() // 所有左侧模块的值 @@ -279,6 +286,18 @@ function updateComponent(key, e) { customObjRef.value = tempobj // asideValue = Object.assign({}, asideValue, tempobj); console.log('asideValue跟新值', tempobj) + console.log('表格数据-----------',props. contentRef.listData) + console.log('图片名字-------------',tempobj.izupload) + if(tempobj.izupload){ + props. contentRef.listData.map((item)=>{ + const index = item.thumburl.lastIndexOf('/') + 1; // 获取最后一个 '/' 的位置并加1 +const result = item.thumburl.substring(index); + if(tempobj.izupload==result){ + tempobj.izupload=item.pictureid + + } + }) + } configStore.setAsideValue(tempobj) } @@ -342,6 +361,7 @@ useKeydown('s', () => setShowSearch(true)) :key="item.key" v-model:value="asideValue[item.key]" :label="item.config?.label" + @update:value="(e) => updateComponent(item.key, e)" /> diff --git a/src/views/home/aside/comp/Upload.vue b/src/views/home/aside/comp/Upload.vue index b630b9a..2451ea5 100644 --- a/src/views/home/aside/comp/Upload.vue +++ b/src/views/home/aside/comp/Upload.vue @@ -12,7 +12,7 @@ const props = defineProps<{ }>() const emit = defineEmits<{ - (e: 'update:value', value: string): void + (e: 'update:value', value: Object): void }>() @@ -27,7 +27,7 @@ async function customRequest(data: UploadCustomRequestOptions) { const result = await upload({ file: data.file.file as any }) const imgUrl = getImgUrl(result.data) figureUrl.value = imgUrl - emit('update:value', result.data) +emit('update:value', {result:result.data,imgname: data[0].name}) } const showFigure = computed(() => { @@ -85,7 +85,7 @@ const handleDrop = async (e) => { const result = await upload({ file: files[0] as any }) const imgUrl = getImgUrl(result.data) figureUrl.value = imgUrl - emit('update:value', result.data) + emit('update:value', {result:result.data,imgname: files[0].name}) } }; diff --git a/src/views/home/aside/comp/items/IzApprovalStatus.vue b/src/views/home/aside/comp/items/IzApprovalStatus.vue index 128a4cc..da7e2b8 100644 --- a/src/views/home/aside/comp/items/IzApprovalStatus.vue +++ b/src/views/home/aside/comp/items/IzApprovalStatus.vue @@ -23,6 +23,7 @@ configUseStore.$subscribe(() => { const props = defineProps<{ value: string[] | null label: string + id:string }>() const emit = defineEmits<{ diff --git a/src/views/home/aside/comp/items/PictureUpload.vue b/src/views/home/aside/comp/items/PictureUpload.vue index 5b74bdf..42944a9 100644 --- a/src/views/home/aside/comp/items/PictureUpload.vue +++ b/src/views/home/aside/comp/items/PictureUpload.vue @@ -8,14 +8,17 @@ const props = defineProps<{ }>() const emit = defineEmits<{ - (e: 'update:value', value: string): void + (e: 'update:value', value: Object): void, }>() const url = ref(props.value) -function onChange(value: string) { - emit('update:value', value) +function onChange(value) { + + emit('update:value', value.imgname) } + + watch( () => props, (newVal, oldVal) => { @@ -42,7 +45,7 @@ watch( - + diff --git a/src/views/home/content/Content.vue b/src/views/home/content/Content.vue index e442533..c3713a1 100644 --- a/src/views/home/content/Content.vue +++ b/src/views/home/content/Content.vue @@ -337,6 +337,8 @@ async function featchList(userSearchId?: string) { isRepeatHis: item.isRepeatHis, wide: item.wide, high: item.high, + pictureid: item.pictureid, + loadOver: false, } }) @@ -785,7 +787,7 @@ function previewImageUrl(img1, img2) { }; defineExpose({ showLoginSuccessModal, - closeLoginSuccessModal, + closeLoginSuccessModal,listData }) diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 58f8d3c..732351c 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -20,7 +20,7 @@ useKeydown('enter', closeLoginModal)