|
@@ -2,11 +2,8 @@ import SaveForm from '@/components/save-form'
|
|
import Pagination from '@/components/pagination'
|
|
import Pagination from '@/components/pagination'
|
|
import {
|
|
import {
|
|
DataTableRowKey,
|
|
DataTableRowKey,
|
|
- NButton,
|
|
|
|
- NCascader,
|
|
|
|
- NDataTable,
|
|
|
|
- NDescriptions,
|
|
|
|
- NDescriptionsItem,
|
|
|
|
|
|
+ NButton, NCascader,
|
|
|
|
+ NDataTable, NDescriptions, NDescriptionsItem,
|
|
NFormItem,
|
|
NFormItem,
|
|
NIcon,
|
|
NIcon,
|
|
NImage,
|
|
NImage,
|
|
@@ -19,34 +16,32 @@ import {
|
|
useDialog,
|
|
useDialog,
|
|
useMessage
|
|
useMessage
|
|
} from 'naive-ui'
|
|
} from 'naive-ui'
|
|
-import { defineComponent, onMounted, onUnmounted, reactive, ref, watch } from 'vue'
|
|
|
|
|
|
+import {defineComponent, onMounted, onUnmounted, reactive, ref, watch} from 'vue'
|
|
import {
|
|
import {
|
|
musicSheetApplicationOwnerList,
|
|
musicSheetApplicationOwnerList,
|
|
musicSheetPage,
|
|
musicSheetPage,
|
|
musicSheetRemove,
|
|
musicSheetRemove,
|
|
musicSheetImg,
|
|
musicSheetImg,
|
|
musicSheetStatusList,
|
|
musicSheetStatusList,
|
|
- musicTagPage,
|
|
|
|
- musicSheetCategoriesQueryTree
|
|
|
|
|
|
+ musicTagPage, musicSheetCategoriesQueryTree
|
|
} from '../../api'
|
|
} from '../../api'
|
|
import MusicOperation from '../modal/music-operation'
|
|
import MusicOperation from '../modal/music-operation'
|
|
-import { subjectPage } from '@/views/system-manage/api'
|
|
|
|
|
|
+import {subjectPage} from '@/views/system-manage/api'
|
|
import MusicPreView from '../modal/musicPreView'
|
|
import MusicPreView from '../modal/musicPreView'
|
|
import UseProject from '@views/music-library/music-sheet/modal/use-project'
|
|
import UseProject from '@views/music-library/music-sheet/modal/use-project'
|
|
-import { getMapValueByKey } from '@/utils/filters'
|
|
|
|
-import { appKey, musicSheetSourceType, musicSheetType } from '@/utils/constant'
|
|
|
|
-import { getSelectDataFromObj } from '@/utils/objectUtil'
|
|
|
|
-import { sysApplicationPage } from '@views/menu-manage/api'
|
|
|
|
-import { getOwnerName } from '@views/music-library/musicUtil'
|
|
|
|
|
|
+import {getMapValueByKey} from '@/utils/filters'
|
|
|
|
+import {appKey, musicSheetSourceType, musicSheetType} from '@/utils/constant'
|
|
|
|
+import {getSelectDataFromObj} from '@/utils/objectUtil'
|
|
|
|
+import {sysApplicationPage} from '@views/menu-manage/api'
|
|
|
|
+import {getOwnerName} from '@views/music-library/musicUtil'
|
|
import styles from './music-list.module.less'
|
|
import styles from './music-list.module.less'
|
|
-import { api_uploadFile } from '@/plugins/uploadFile'
|
|
|
|
import MusicCreateImg from '../modal/music-create-img'
|
|
import MusicCreateImg from '../modal/music-create-img'
|
|
-import TheTooltip from '@components/TheTooltip'
|
|
|
|
|
|
+import TheTooltip from "@components/TheTooltip";
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: 'music-list',
|
|
name: 'music-list',
|
|
props: ['searchId', 'musicCategoryId'],
|
|
props: ['searchId', 'musicCategoryId'],
|
|
- setup(props, { emit }) {
|
|
|
|
|
|
+ setup(props, {emit}) {
|
|
const dialog = useDialog()
|
|
const dialog = useDialog()
|
|
const message = useMessage()
|
|
const message = useMessage()
|
|
const state = reactive({
|
|
const state = reactive({
|
|
@@ -99,12 +94,12 @@ export default defineComponent({
|
|
key: 'id',
|
|
key: 'id',
|
|
render(row: any) {
|
|
render(row: any) {
|
|
return (
|
|
return (
|
|
- <NDescriptions labelPlacement="left" column={1}>
|
|
|
|
- <NDescriptionsItem label="名称">
|
|
|
|
- <TheTooltip content={row.name} />
|
|
|
|
- </NDescriptionsItem>
|
|
|
|
- <NDescriptionsItem label="编号">{row.id}</NDescriptionsItem>
|
|
|
|
- </NDescriptions>
|
|
|
|
|
|
+ <NDescriptions labelPlacement="left" column={1}>
|
|
|
|
+ <NDescriptionsItem label="名称">
|
|
|
|
+ <TheTooltip content={row.name}/>
|
|
|
|
+ </NDescriptionsItem>
|
|
|
|
+ <NDescriptionsItem label="编号">{row.id}</NDescriptionsItem>
|
|
|
|
+ </NDescriptions>
|
|
)
|
|
)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -112,7 +107,7 @@ export default defineComponent({
|
|
title: '封面图',
|
|
title: '封面图',
|
|
key: 'titleImg',
|
|
key: 'titleImg',
|
|
render(row: any): JSX.Element {
|
|
render(row: any): JSX.Element {
|
|
- return <NImage width={60} height={60} src={row.musicCover} />
|
|
|
|
|
|
+ return <NImage width={60} height={60} src={row.musicCover}/>
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -121,37 +116,24 @@ export default defineComponent({
|
|
key: 'composer',
|
|
key: 'composer',
|
|
render(row: any) {
|
|
render(row: any) {
|
|
return (
|
|
return (
|
|
- <NDescriptions labelPlacement="left" column={1}>
|
|
|
|
- <NDescriptionsItem label="音乐人">{row.composer}</NDescriptionsItem>
|
|
|
|
- <NDescriptionsItem label="类型">
|
|
|
|
- {getMapValueByKey(row.musicSheetType, new Map(Object.entries(musicSheetType)))}
|
|
|
|
- </NDescriptionsItem>
|
|
|
|
- <NDescriptionsItem label="分类">{row.musicCategoryName}</NDescriptionsItem>
|
|
|
|
- </NDescriptions>
|
|
|
|
|
|
+ <NDescriptions labelPlacement="left" column={1}>
|
|
|
|
+ <NDescriptionsItem label="音乐人">{row.composer}</NDescriptionsItem>
|
|
|
|
+ <NDescriptionsItem label="类型">{getMapValueByKey(row.musicSheetType, new Map(Object.entries(musicSheetType)))}</NDescriptionsItem>
|
|
|
|
+ <NDescriptionsItem label="分类">{row.musicCategoryName}</NDescriptionsItem>
|
|
|
|
+ </NDescriptions>
|
|
)
|
|
)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '曲目分类',
|
|
|
|
- minWidth: '100px',
|
|
|
|
- key: 'musicCategoryName'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
title: '作者属性',
|
|
title: '作者属性',
|
|
minWidth: '250px',
|
|
minWidth: '250px',
|
|
key: 'sourceType',
|
|
key: 'sourceType',
|
|
render(row: any) {
|
|
render(row: any) {
|
|
return (
|
|
return (
|
|
- <NDescriptions labelPlacement="left" column={1}>
|
|
|
|
- <NDescriptionsItem label="属性">
|
|
|
|
- {getMapValueByKey(row.sourceType, new Map(Object.entries(musicSheetSourceType)))}
|
|
|
|
- </NDescriptionsItem>
|
|
|
|
- <NDescriptionsItem label="所属人">
|
|
|
|
- {getOwnerName(row.musicSheetExtend, row.sourceType)
|
|
|
|
- ? getOwnerName(row.musicSheetExtend, row.sourceType)
|
|
|
|
- : '--'}
|
|
|
|
- </NDescriptionsItem>
|
|
|
|
- </NDescriptions>
|
|
|
|
|
|
+ <NDescriptions labelPlacement="left" column={1}>
|
|
|
|
+ <NDescriptionsItem label="属性">{getMapValueByKey(row.sourceType, new Map(Object.entries(musicSheetSourceType)))}</NDescriptionsItem>
|
|
|
|
+ <NDescriptionsItem label="所属人">{getOwnerName(row.musicSheetExtend, row.sourceType) ? getOwnerName(row.musicSheetExtend, row.sourceType) : "--"}</NDescriptionsItem>
|
|
|
|
+ </NDescriptions>
|
|
)
|
|
)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -195,10 +177,10 @@ export default defineComponent({
|
|
key: 'updateBy',
|
|
key: 'updateBy',
|
|
render(row: any) {
|
|
render(row: any) {
|
|
return (
|
|
return (
|
|
- <NDescriptions labelPlacement="left" column={1}>
|
|
|
|
- <NDescriptionsItem label="更新人">{row.updateByName}</NDescriptionsItem>
|
|
|
|
- <NDescriptionsItem label="更新时间">{row.updateTime}</NDescriptionsItem>
|
|
|
|
- </NDescriptions>
|
|
|
|
|
|
+ <NDescriptions labelPlacement="left" column={1}>
|
|
|
|
+ <NDescriptionsItem label="更新人">{row.updateByName}</NDescriptionsItem>
|
|
|
|
+ <NDescriptionsItem label="更新时间">{row.updateTime}</NDescriptionsItem>
|
|
|
|
+ </NDescriptions>
|
|
)
|
|
)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -208,7 +190,7 @@ export default defineComponent({
|
|
maxWidth: '300px',
|
|
maxWidth: '300px',
|
|
key: 'subjectNames',
|
|
key: 'subjectNames',
|
|
render(row: any) {
|
|
render(row: any) {
|
|
- return <TheTooltip content={row.subjectNames} />
|
|
|
|
|
|
+ return <TheTooltip content={row.subjectNames}/>
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -225,7 +207,7 @@ export default defineComponent({
|
|
key: 'status',
|
|
key: 'status',
|
|
render(row: any) {
|
|
render(row: any) {
|
|
return (
|
|
return (
|
|
- <NTag type={row.status ? 'primary' : 'default'}>{row.status ? '启用' : '停用'}</NTag>
|
|
|
|
|
|
+ <NTag type={row.status ? 'primary' : 'default'}>{row.status ? '启用' : '停用'}</NTag>
|
|
)
|
|
)
|
|
}
|
|
}
|
|
},
|
|
},
|