Skip to content

Commit

Permalink
fix: preview object
Browse files Browse the repository at this point in the history
Signed-off-by: guhaomine <[email protected]>
  • Loading branch information
guhaomine committed Feb 26, 2024
1 parent 50db0f4 commit 1708821
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions frontend/main/src/api/business/model/datasetModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export interface fileDetail<T> {

export interface DatasetItem {
id: string;
firstDataId?: string;
datasetId?: string;
directoryId?: string;
displaySettings?: {};
Expand Down
17 changes: 10 additions & 7 deletions frontend/main/src/views/datasets/datasetContent/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<Button type="primary" @click="handleUnlock">Unlock</Button>
</div>
</div>
<TipModal @register="tipRegister" :datasetType="(info?.type as datasetTypeEnum )" />
<TipModal @register="tipRegister" :datasetType="(info?.type as datasetTypeEnum)" />
<ModelRun
modelType="model"
@register="registerRunModel"
Expand Down Expand Up @@ -104,7 +104,7 @@
class="listcard"
v-for="i in list"
:key="i.id + sortWithLabel"
:object="objectMap[i.id]"
:object="objectMap[i.firstDataId ?? i.id]"
@handleSelected="handleSelected"
:showAnnotation="showAnnotation"
:isSelected="selectedList.filter((item) => item === i.id).length > 0"
Expand Down Expand Up @@ -154,8 +154,10 @@
<div class="custom-item font-bold mb-2 flex justify-between">
<div class="font-bold">Filter and Sort</div>

<div class="cursor-pointer"> <SvgIcon @click="resetFilter" name="reload" /> </div
></div>
<div class="cursor-pointer">
<SvgIcon @click="resetFilter" name="reload" />
</div>
</div>
<div>Sort with</div>
<Tabs size="small" v-model:activeKey="sortWithLabel">
<Tabs.TabPane key="Data">
Expand Down Expand Up @@ -284,8 +286,8 @@
</CollContainer>
</div>
</template>
<template v-else
><div>
<template v-else>
<div>
<div class="custom-item">
<div class="custom-label font-bold"> If display results</div>
<Switch @change="showAnnotationChange" v-model:checked="showAnnotation" />
Expand Down Expand Up @@ -642,7 +644,7 @@
list.value = res.list;
total.value = res.total;
}
const dataIds = tempList.map((e) => e.id);
const dataIds = tempList.map((e: any) => e.firstDataId ?? e.id);
if (dataIds.length)
datasetObjectApi({ dataIds: dataIds.toString() }).then((res) => {
const map = {};
Expand Down Expand Up @@ -935,6 +937,7 @@
</script>
<style lang="less" scoped>
@import url(./index.less);
.list {
margin: 0 -10px;
position: relative;
Expand Down

0 comments on commit 1708821

Please sign in to comment.