Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
source-trace-manage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenqikuai
source-trace-manage
Commits
c9eb219e
Commit
c9eb219e
authored
Jun 21, 2022
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor:藏品列表重命名、藏品类型更新、藏品管理菜单更新
parent
a0092a16
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
62 additions
and
52 deletions
+62
-52
constants.ts
...n/CollectionManagement/components/AlbumTable/constants.ts
+3
-3
constants.ts
...llectionManagement/components/copyrightTable/constants.ts
+3
-8
index.vue
.../CollectionManagement/components/copyrightTable/index.vue
+0
-0
index.vue
src/views/Collection/CollectionManagement/index.vue
+49
-38
index.vue
...views/Collection/PassMaker/UploadBoxFormControl/index.vue
+1
-1
types.ts
src/views/Collection/PassMaker/types.ts
+5
-1
index.vue
src/views/Collection/TransferRecords/index.vue
+1
-1
No files found.
src/views/Collection/CollectionManagement/components/AlbumTable/constants.ts
View file @
c9eb219e
...
@@ -9,19 +9,19 @@ export const columns = [
...
@@ -9,19 +9,19 @@ export const columns = [
{
{
label
:
"发行时间"
,
label
:
"发行时间"
,
prop
:
""
,
prop
:
""
,
width
:
2
0
0
,
width
:
2
5
0
,
slotName
:
"time"
,
slotName
:
"time"
,
},
},
{
{
label
:
"发行状态"
,
label
:
"发行状态"
,
prop
:
""
,
prop
:
""
,
slotName
:
"status"
,
slotName
:
"status"
,
width
:
18
0
,
width
:
20
0
,
},
},
{
{
label
:
"操作"
,
label
:
"操作"
,
prop
:
""
,
prop
:
""
,
slotName
:
"transfer"
,
slotName
:
"transfer"
,
width
:
7
0
,
width
:
10
0
,
},
},
]
as
iTableColumn
[];
]
as
iTableColumn
[];
src/views/Collection/CollectionManagement/components/
Picture
Table/constants.ts
→
src/views/Collection/CollectionManagement/components/
copyright
Table/constants.ts
View file @
c9eb219e
...
@@ -8,26 +8,21 @@ export const columns = [
...
@@ -8,26 +8,21 @@ export const columns = [
slotName
:
"name"
,
slotName
:
"name"
,
},
},
{
{
label
:
"通证标识"
,
prop
:
"identifier"
,
width
:
300
,
},
{
label
:
"发行时间"
,
label
:
"发行时间"
,
prop
:
"create_time"
,
prop
:
"create_time"
,
slotName
:
"create_time"
,
slotName
:
"create_time"
,
width
:
2
0
0
,
width
:
2
5
0
,
},
},
{
{
label
:
"发行状态"
,
label
:
"发行状态"
,
prop
:
""
,
prop
:
""
,
slotName
:
"status"
,
slotName
:
"status"
,
width
:
18
0
,
width
:
20
0
,
},
},
{
{
label
:
"操作"
,
label
:
"操作"
,
slotName
:
"transfer"
,
slotName
:
"transfer"
,
prop
:
""
,
prop
:
""
,
width
:
7
0
,
width
:
10
0
,
},
},
]
as
iTableColumn
[];
]
as
iTableColumn
[];
src/views/Collection/CollectionManagement/components/
Picture
Table/index.vue
→
src/views/Collection/CollectionManagement/components/
copyright
Table/index.vue
View file @
c9eb219e
File moved
src/views/Collection/CollectionManagement/index.vue
View file @
c9eb219e
...
@@ -3,20 +3,8 @@
...
@@ -3,20 +3,8 @@
<div
class=
"flex flex-col w-full h-full"
>
<div
class=
"flex flex-col w-full h-full"
>
<div
class=
"flex items-center flex-shrink-0"
>
<div
class=
"flex items-center flex-shrink-0"
>
<Search
<Search
:model-value=
"
:model-value=
"currentSearchStr"
activedMenu === eCollectionType.picture
@
update:model-value=
"handleCurrentSearchStrChange"
? searchStrOfPicture
: searchStrOfAlbum
"
@
update:model-value=
"
(v) =>
{
if (activedMenu === eCollectionType.picture) {
searchStrOfPicture = v;
} else {
searchStrOfAlbum = v;
}
}
"
placeholder=
"搜索"
placeholder=
"搜索"
></Search>
></Search>
<Avatar
class=
"ml-7"
></Avatar>
<Avatar
class=
"ml-7"
></Avatar>
...
@@ -83,26 +71,26 @@
...
@@ -83,26 +71,26 @@
></syMenu>
></syMenu>
<div
class=
"flex-grow overflow-hidden relative"
>
<div
class=
"flex-grow overflow-hidden relative"
>
<
Picture
Table
<
Copyright
Table
v-if=
"tableDataOfPicture.length !== 0"
v-if=
"tableDataOfPicture.length !== 0"
ref=
"
picture
TableRef"
ref=
"
copyright
TableRef"
v-show=
"activedMenu === eCollectionType.
picture
"
v-show=
"activedMenu === eCollectionType.
copright
"
:active=
"activedMenu === eCollectionType.
picture
"
:active=
"activedMenu === eCollectionType.
copright
"
:table-data=
"tableDataOfPicture"
:table-data=
"tableDataOfPicture"
:loading=
"loadingOfPicture"
:loading=
"loadingOfPicture"
@
scroll-to-end=
"fetchNextPageOfPicture"
@
scroll-to-end=
"fetchNextPageOfPicture"
@
transferExecuted=
"handleTransferExecuted"
@
transferExecuted=
"handleTransferExecuted"
></
Picture
Table>
></
Copyright
Table>
<Empty
<Empty
v-if=
"
v-if=
"
activedMenu === eCollectionType.
picture
&&
activedMenu === eCollectionType.
copright
&&
!loadingOfPicture &&
!loadingOfPicture &&
tableDataOfPicture.length === 0
tableDataOfPicture.length === 0
"
"
class=
"absolute top-1/3 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
class=
"absolute top-1/3 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
>
>
{{
{{
searchingStrOfPicture
===
""
debouncedSearchStrOfCopyright
===
""
?
"暂无数据"
?
"暂无数据"
:
"没有找到匹配结果,尝试其他关键词搜索"
:
"没有找到匹配结果,尝试其他关键词搜索"
}}
}}
...
@@ -125,7 +113,7 @@
...
@@ -125,7 +113,7 @@
class=
"absolute top-1/3 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
class=
"absolute top-1/3 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
>
>
{{
{{
searching
StrOfAlbum
===
""
debouncedSearch
StrOfAlbum
===
""
?
"暂无数据"
?
"暂无数据"
:
"没有找到匹配结果,尝试其他关键词搜索"
:
"没有找到匹配结果,尝试其他关键词搜索"
}}
}}
...
@@ -135,7 +123,7 @@
...
@@ -135,7 +123,7 @@
</LayoutVue>
</LayoutVue>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
onBeforeMount
,
ref
,
watch
}
from
"vue"
;
import
{
computed
,
onBeforeMount
,
ref
,
watch
}
from
"vue"
;
import
{
GO_URLS
,
syButton
,
syMenu
}
from
"cqk-sy-ui"
;
import
{
GO_URLS
,
syButton
,
syMenu
}
from
"cqk-sy-ui"
;
import
LayoutVue
from
"@/components/Layout.vue"
;
import
LayoutVue
from
"@/components/Layout.vue"
;
...
@@ -143,7 +131,7 @@ import Search from "@/components/Search/index.vue";
...
@@ -143,7 +131,7 @@ import Search from "@/components/Search/index.vue";
import
Avatar
from
"@/components/Avatar/index.vue"
;
import
Avatar
from
"@/components/Avatar/index.vue"
;
import
Title
from
"@/components/Title.vue"
;
import
Title
from
"@/components/Title.vue"
;
import
Icon
from
"@/components/Icon/index.vue"
;
import
Icon
from
"@/components/Icon/index.vue"
;
import
PictureTable
from
"./components/Picture
Table/index.vue"
;
import
CopyrightTable
from
"./components/Copyright
Table/index.vue"
;
import
AlbumTable
from
"./components/AlbumTable/index.vue"
;
import
AlbumTable
from
"./components/AlbumTable/index.vue"
;
import
{
eCollectionType
}
from
"../PassMaker/types"
;
import
{
eCollectionType
}
from
"../PassMaker/types"
;
...
@@ -157,23 +145,46 @@ import Empty from "@/components/Empty/index.vue";
...
@@ -157,23 +145,46 @@ import Empty from "@/components/Empty/index.vue";
import
{
useRoute
}
from
"vue-router"
;
import
{
useRoute
}
from
"vue-router"
;
import
{
router
}
from
"@/router"
;
import
{
router
}
from
"@/router"
;
const
searchStrOfPicture
=
ref
(
""
);
const
searchStrOfCopyright
=
ref
(
""
);
const
searchStrOfDerivatives
=
ref
(
""
);
const
searchStrOfAlbum
=
ref
(
""
);
const
searchStrOfAlbum
=
ref
(
""
);
const
searchingStrOfPicture
=
ref
(
""
);
const
debouncedSearchStrOfCopyright
=
ref
(
""
);
const
searchingStrOfAlbum
=
ref
(
""
);
const
debouncedSearchStrOfDerivatives
=
ref
(
""
);
const
debouncedSearchStrOfAlbum
=
ref
(
""
);
const
pictureTableRef
=
ref
<
InstanceType
<
typeof
Picture
Table
>>
();
const
copyrightTableRef
=
ref
<
InstanceType
<
typeof
Copyright
Table
>>
();
const
activedMenu
=
ref
(
eCollectionType
.
picture
);
const
activedMenu
=
ref
(
eCollectionType
.
copright
);
const
menuList
=
[
const
menuList
=
[
{
label
:
"藏品列表"
,
value
:
eCollectionType
.
picture
},
{
label
:
"版权"
,
value
:
eCollectionType
.
copright
},
{
label
:
"专辑列表"
,
value
:
eCollectionType
.
album
},
{
label
:
"衍生品"
,
value
:
eCollectionType
.
derivatives
},
{
label
:
"专辑"
,
value
:
eCollectionType
.
album
},
];
];
const
currentSearchStr
=
computed
(()
=>
{
if
(
activedMenu
.
value
===
eCollectionType
.
copright
)
{
return
searchStrOfCopyright
.
value
;
}
else
if
(
activedMenu
.
value
===
eCollectionType
.
derivatives
)
{
return
searchStrOfDerivatives
.
value
;
}
else
if
(
activedMenu
.
value
===
eCollectionType
.
album
)
{
return
searchStrOfAlbum
.
value
;
}
return
""
;
});
function
handleCurrentSearchStrChange
(
str
:
string
)
{
if
(
activedMenu
.
value
===
eCollectionType
.
copright
)
{
searchStrOfCopyright
.
value
=
str
;
}
else
if
(
activedMenu
.
value
===
eCollectionType
.
derivatives
)
{
searchStrOfDerivatives
.
value
=
str
;
}
else
if
(
activedMenu
.
value
===
eCollectionType
.
album
)
{
searchStrOfAlbum
.
value
=
str
;
}
}
const
route
=
useRoute
();
const
route
=
useRoute
();
onBeforeMount
(()
=>
{
onBeforeMount
(()
=>
{
activedMenu
.
value
=
activedMenu
.
value
=
(
route
.
query
.
type
as
eCollectionType
)
||
eCollectionType
.
picture
;
(
route
.
query
.
type
as
eCollectionType
)
||
eCollectionType
.
copright
;
});
});
watch
(
activedMenu
,
(
menu
)
=>
{
watch
(
activedMenu
,
(
menu
)
=>
{
...
@@ -242,7 +253,7 @@ async function fetchPictureData({
...
@@ -242,7 +253,7 @@ async function fetchPictureData({
params
:
{
params
:
{
page
:
page
,
page
:
page
,
page_size
:
page_size
,
page_size
:
page_size
,
name
:
searchStrOf
Picture
.
value
,
name
:
searchStrOf
Copyright
.
value
,
},
},
});
});
return
{
return
{
...
@@ -252,10 +263,10 @@ async function fetchPictureData({
...
@@ -252,10 +263,10 @@ async function fetchPictureData({
}
}
watchDebounced
(
watchDebounced
(
searchStrOf
Picture
,
searchStrOf
Copyright
,
()
=>
{
()
=>
{
refetchPicture
().
then
(()
=>
{
refetchPicture
().
then
(()
=>
{
searchingStrOfPicture
.
value
=
searchStrOfPicture
.
value
;
debouncedSearchStrOfCopyright
.
value
=
searchStrOfCopyright
.
value
;
});
});
},
},
{
debounce
:
watchStrChangeDebounceTime
}
{
debounce
:
watchStrChangeDebounceTime
}
...
@@ -265,19 +276,19 @@ watchDebounced(
...
@@ -265,19 +276,19 @@ watchDebounced(
searchStrOfAlbum
,
searchStrOfAlbum
,
()
=>
{
()
=>
{
refetchAlbum
().
then
(()
=>
{
refetchAlbum
().
then
(()
=>
{
searching
StrOfAlbum
.
value
=
searchStrOfAlbum
.
value
;
debouncedSearch
StrOfAlbum
.
value
=
searchStrOfAlbum
.
value
;
});
});
},
},
{
debounce
:
watchStrChangeDebounceTime
}
{
debounce
:
watchStrChangeDebounceTime
}
);
);
function
refetchPicture
()
{
function
refetchPicture
()
{
picture
TableRef
.
value
?.
scrollTo
(
0
,
0
);
copyright
TableRef
.
value
?.
scrollTo
(
0
,
0
);
return
__refetchOfPicture
();
return
__refetchOfPicture
();
}
}
function
refetchAlbum
()
{
function
refetchAlbum
()
{
picture
TableRef
.
value
?.
scrollTo
(
0
,
0
);
copyright
TableRef
.
value
?.
scrollTo
(
0
,
0
);
return
__refetchOfAlbum
();
return
__refetchOfAlbum
();
}
}
...
...
src/views/Collection/PassMaker/UploadBoxFormControl/index.vue
View file @
c9eb219e
<
template
>
<
template
>
<HandleAllKindsOfType
<HandleAllKindsOfType
v-if=
"activedMenu === eCollectionType.
picture
"
v-if=
"activedMenu === eCollectionType.
derivatives
"
type=
"uploadPicture"
type=
"uploadPicture"
:file=
"fileData"
:file=
"fileData"
@
clear=
"
@
clear=
"
...
...
src/views/Collection/PassMaker/types.ts
View file @
c9eb219e
export
enum
eCollectionType
{
export
enum
eCollectionType
{
picture
=
"picture"
,
/**版权 */
copright
=
"copright"
,
/**衍生品 */
derivatives
=
"derivatives"
,
/**专辑 */
album
=
"album"
,
album
=
"album"
,
}
}
src/views/Collection/TransferRecords/index.vue
View file @
c9eb219e
...
@@ -85,7 +85,7 @@ const fetchTableData = async ({
...
@@ -85,7 +85,7 @@ const fetchTableData = async ({
})
=>
{
})
=>
{
// 当前状态
// 当前状态
let
res
:
any
;
let
res
:
any
;
if
(
type
.
value
===
eCollectionType
.
picture
)
{
if
(
type
.
value
===
eCollectionType
.
derivatives
)
{
res
=
await
$ajax
({
res
=
await
$ajax
({
type
:
"get"
,
type
:
"get"
,
url
:
GO_URLS
.
transferList
,
url
:
GO_URLS
.
transferList
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment