fix:图片拖拽调接口 #339

Merged
yaoshuli merged 1 commits from fix/change_task into test 1 year ago

@ -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;
}
}}
</style>

@ -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'

@ -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)"
/>

@ -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})
}
};

@ -23,6 +23,7 @@ configUseStore.$subscribe(() => {
const props = defineProps<{
value: string[] | null
label: string
id:string
}>()
const emit = defineEmits<{

@ -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<string>(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(
</n-icon>
</template>
<n-collapse-item :title="label" name="1">
<Upload v-model:value="url" @update:value="onChange" />
<Upload v-model:value="url" @update:value="onChange"/>
</n-collapse-item>
</n-collapse>
</div>

@ -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
})
</script>

@ -20,7 +20,7 @@ useKeydown('enter', closeLoginModal)
<template>
<div class="main">
<!-- 侧边 -->
<Aside />
<Aside :contentRef="contentRef"/>
<!-- 内容 -->
<Content ref="contentRef" />

Loading…
Cancel
Save