fix: 缩略图预览

bak
elseif 1 year ago
parent 6d9da330c2
commit d03b8edda7

3
components.d.ts vendored

@ -20,7 +20,6 @@ declare module 'vue' {
NDialogProvider: typeof import('naive-ui')['NDialogProvider'] NDialogProvider: typeof import('naive-ui')['NDialogProvider']
NDivider: typeof import('naive-ui')['NDivider'] NDivider: typeof import('naive-ui')['NDivider']
NDropdown: typeof import('naive-ui')['NDropdown'] NDropdown: typeof import('naive-ui')['NDropdown']
NEmpty: typeof import('naive-ui')['NEmpty']
NForm: typeof import('naive-ui')['NForm'] NForm: typeof import('naive-ui')['NForm']
NFormItem: typeof import('naive-ui')['NFormItem'] NFormItem: typeof import('naive-ui')['NFormItem']
NGi: typeof import('naive-ui')['NGi'] NGi: typeof import('naive-ui')['NGi']
@ -39,8 +38,6 @@ declare module 'vue' {
NSpace: typeof import('naive-ui')['NSpace'] NSpace: typeof import('naive-ui')['NSpace']
NSpin: typeof import('naive-ui')['NSpin'] NSpin: typeof import('naive-ui')['NSpin']
NSwitch: typeof import('naive-ui')['NSwitch'] NSwitch: typeof import('naive-ui')['NSwitch']
NTabPane: typeof import('naive-ui')['NTabPane']
NTabs: typeof import('naive-ui')['NTabs']
NTag: typeof import('naive-ui')['NTag'] NTag: typeof import('naive-ui')['NTag']
NTooltip: typeof import('naive-ui')['NTooltip'] NTooltip: typeof import('naive-ui')['NTooltip']
NUpload: typeof import('naive-ui')['NUpload'] NUpload: typeof import('naive-ui')['NUpload']

@ -1,5 +1,5 @@
import type { AsideEntity } from './aside' import type { AsideEntity } from './aside'
import { IzProjectVue, IztaskrromVue, PictureDownloadVue, PlanVue, ReportUserVue, TimeVue } from '@/views/home/aside/comp/items' import { IzProjectVue, IzStatus, IztaskrromVue, PictureDownloadVue, PlanVue, ReportUserVue, TimeVue } from '@/views/home/aside/comp/items'
export interface RowData { export interface RowData {
id: string id: string
@ -104,7 +104,7 @@ export const asideMap: Recordable<AsideEntity> = {
defaultValue: null, defaultValue: null,
isDefaultFilter: false, isDefaultFilter: false,
key: 'izstatus', key: 'izstatus',
component: PlanVue, // todo component: IzStatus, // todo
}, },
izuptime: { izuptime: {
label: '提报时间', label: '提报时间',

@ -229,7 +229,7 @@ export const useDictionaryStore = defineStore({
async fetchizstatusListt() { async fetchizstatusListt() {
const list = await getizstatusList() const list = await getizstatusList()
this.izstatusList = generateOptions2(list, 'codeno', 'name') this.izstatusList = generateOptions2(list, 'codeno', 'name')
return this.backList return this.izstatusList
}, },
}, },
}) })

@ -17,10 +17,10 @@ const props = defineProps({
}) })
const actionConfig = { const actionConfig = {
3: [{ label: '查看', key: 'view' }, { label: '重置审批', key: 'reset' }], 3: [{ label: '查看', key: 'view' }],
4: [{ label: '查看', key: 'view' }, { label: '重置审批', key: 'reset' }], 4: [{ label: '查看', key: 'view' }],
2: [{ label: '通过', key: 'approval' }, { label: '不通过', key: 'reject' }, { label: '重置审批', key: 'reset' }], 2: [{ label: '通过', key: 'approval' }, { label: '不通过', key: 'reject' }],
5: [{ label: '通过', key: 'approval' }, { label: '不通过', key: 'reject' }, { label: '重置审批', key: 'reset' }], 5: [{ label: '通过', key: 'approval' }, { label: '不通过', key: 'reject' }],
} }
const actions = computed(() => { const actions = computed(() => {

@ -0,0 +1,57 @@
<script lang="ts" setup>
import { onBeforeMount, ref } from 'vue'
import type { FormRules } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary'
const props = defineProps<{
value: string[] | null
label: string
}>()
const emit = defineEmits<{
(e: 'update:value', value: string[]): void
}>()
const formValue = ref({
plans: props.value,
})
const rules: FormRules = {
plans: [
{
required: false,
type: 'array',
trigger: ['blur', 'change'],
},
],
}
const options = ref([])
const configStore = useDictionary()
const labStyle = {
fontWeight: 'bold',
}
onBeforeMount(async () => {
const list = await configStore.fetchizstatusListt()
debugger
options.value = list
})
function onChange(value: Array<string>) {
emit('update:value', value)
}
</script>
<template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择审核状态" multiple
:options="options" @update:value="onChange"
/>
</n-form-item>
</n-form>
</template>
<style lang="less" scoped></style>

@ -19,5 +19,6 @@ import IzCustomtype from './IzCustomtype.vue'
import IzProductVue from './IzProduct.vue' import IzProductVue from './IzProduct.vue'
import IzProjecttype from './IzProjecttype.vue' import IzProjecttype from './IzProjecttype.vue'
import IzVisitcity from './IzVisitcity.vue' import IzVisitcity from './IzVisitcity.vue'
import IzStatus from './IzStatus.vue'
export { IzProjecttype, IzVisitcity, IzCustomlevel, IzCustomtype, IzCustomname, IzfirmVue, IzProductVue, IzvisitproVue, IztaskstatusVue, IztaskrromVue, IzProjectVue, IzShowVue, PictureDownloadVue, PictureUploadVue, PlaceHolderVue, RegionVue, SimilarityVue, ReportUserVue, PlanVue, PictureTypeVue, TimeVue } export { IzProjecttype, IzStatus, IzVisitcity, IzCustomlevel, IzCustomtype, IzCustomname, IzfirmVue, IzProductVue, IzvisitproVue, IztaskstatusVue, IztaskrromVue, IzProjectVue, IzShowVue, PictureDownloadVue, PictureUploadVue, PlaceHolderVue, RegionVue, SimilarityVue, ReportUserVue, PlanVue, PictureTypeVue, TimeVue }

@ -36,6 +36,7 @@ const loading = ref(false)
const message = useMessage() const message = useMessage()
const totalCount = ref(0) const totalCount = ref(0)
const sortBy = ref<'asc' | 'desc'>('desc') const sortBy = ref<'asc' | 'desc'>('desc')
const imageRef = ref<ComponentElRef | null>()
let canloadMore = true let canloadMore = true
let filterId = null let filterId = null
@ -297,8 +298,8 @@ function sortHandler() {
:src="item.imgUrl" :src="item.imgUrl"
> --> > -->
<n-image <n-image
class="img" :img-props="{ onClick: hideDownload }" :class="{ 'img-fit': viewMode !== 'masonry' }" class="img" :img-props="{ onClick: hideDownload }"
:src="item.thumburl" :class="{ 'img-fit': viewMode !== 'masonry' }" :preview-src="item.imgUrl" :src="item.thumburl"
/> />
<div class="percent"> <div class="percent">
<SvgIcon size="42" name="tag" /> <SvgIcon size="42" name="tag" />

@ -32,7 +32,6 @@ const { isLoading } = useInfiniteScroll(
async function loadMore() { async function loadMore() {
if (isLoading.value || el.value == null) if (isLoading.value || el.value == null)
return return
const more = await fetchList() const more = await fetchList()
data.value.push(...more) data.value.push(...more)
} }

@ -54,7 +54,7 @@ const loading = ref(false)
let _masonry: null | Masonry = null let _masonry: null | Masonry = null
const show = ref(false) const show = ref(false)
const sortBy: PictureSortParam = { const sortBy: PictureSortParam = {
orderbyname: 'asc', orderbyname: 'desc',
orderbyvalue: 'fromuptime', orderbyvalue: 'fromuptime',
} }
const batch = ref(false) const batch = ref(false)

@ -51,7 +51,7 @@ const taskpagination = reactive({
pageSize: 10, pageSize: 10,
}) })
const sortBy: PictureSortParam = { const sortBy: PictureSortParam = {
orderbyname: 'asc', orderbyname: 'desc',
orderbyvalue: 'pictureResult', orderbyvalue: 'pictureResult',
} }
const workStore = useWorkOrder() const workStore = useWorkOrder()

Loading…
Cancel
Save