|
@@ -2,11 +2,10 @@ import SaveForm from '@/components/save-form'
|
|
import Pagination from '@/components/pagination'
|
|
import Pagination from '@/components/pagination'
|
|
import {DataTableRowKey, NButton, NDataTable, NFormItem, NIcon, NImage, NInput, NModal, NSelect, NSpace, NTag, useDialog, useMessage} from 'naive-ui'
|
|
import {DataTableRowKey, NButton, NDataTable, NFormItem, NIcon, NImage, NInput, NModal, NSelect, NSpace, NTag, useDialog, useMessage} from 'naive-ui'
|
|
import {defineComponent, onMounted, reactive, ref, watch} from 'vue'
|
|
import {defineComponent, onMounted, reactive, ref, watch} from 'vue'
|
|
-import {musicSheetApplicationOwnerList, musicSheetCategoriesQueryTree, musicSheetPage, musicSheetRemove, musicSheetStatusList, musicTagPage} from '../../api'
|
|
|
|
|
|
+import {musicSheetApplicationOwnerList, musicSheetPage, musicSheetRemove, musicSheetStatusList, musicTagPage} 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 {filterPointCategory} from '@/views/teaching-manage/unit-test'
|
|
|
|
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 {getMapValueByKey} from "@/utils/filters";
|
|
import {appKey, musicSheetSourceType, musicSheetType} from "@/utils/constant";
|
|
import {appKey, musicSheetSourceType, musicSheetType} from "@/utils/constant";
|
|
@@ -45,7 +44,7 @@ export default defineComponent({
|
|
visiableMusic: false,
|
|
visiableMusic: false,
|
|
musicOperation: 'add',
|
|
musicOperation: 'add',
|
|
musicData: {} as any,
|
|
musicData: {} as any,
|
|
- musicSheetCategories: [] as any,
|
|
|
|
|
|
+ // musicSheetCategories: [] as any,
|
|
musicPreview: false,
|
|
musicPreview: false,
|
|
musicScore: null as any,
|
|
musicScore: null as any,
|
|
showUseProject: false, // 适用项目
|
|
showUseProject: false, // 适用项目
|
|
@@ -63,10 +62,12 @@ export default defineComponent({
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '曲目编号',
|
|
title: '曲目编号',
|
|
|
|
+ minWidth:'200px',
|
|
key: 'id'
|
|
key: 'id'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '曲目名称',
|
|
title: '曲目名称',
|
|
|
|
+ minWidth:'200px',
|
|
key: 'name'
|
|
key: 'name'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -78,17 +79,26 @@ export default defineComponent({
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '音乐人',
|
|
title: '音乐人',
|
|
|
|
+ minWidth:'100px',
|
|
key: 'composer'
|
|
key: 'composer'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '曲目类型',
|
|
title: '曲目类型',
|
|
|
|
+ minWidth:'100px',
|
|
key: 'musicSheetType',
|
|
key: 'musicSheetType',
|
|
render(row: any) {
|
|
render(row: any) {
|
|
return getMapValueByKey(row.musicSheetType, new Map(Object.entries(musicSheetType)));
|
|
return getMapValueByKey(row.musicSheetType, new Map(Object.entries(musicSheetType)));
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
|
|
+ title: '可用声部',
|
|
|
|
+ minWidth:'100px',
|
|
|
|
+ maxWidth:'300px',
|
|
|
|
+ key: 'subjectNames',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
title: '作者属性',
|
|
title: '作者属性',
|
|
|
|
+ minWidth:'100px',
|
|
key: 'sourceType',
|
|
key: 'sourceType',
|
|
render(row: any) {
|
|
render(row: any) {
|
|
return getMapValueByKey(row.sourceType, new Map(Object.entries(musicSheetSourceType)));
|
|
return getMapValueByKey(row.sourceType, new Map(Object.entries(musicSheetSourceType)));
|
|
@@ -96,6 +106,7 @@ export default defineComponent({
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '所属人',
|
|
title: '所属人',
|
|
|
|
+ minWidth:'200px',
|
|
key: 'composer',
|
|
key: 'composer',
|
|
render(row: any) {
|
|
render(row: any) {
|
|
return <div>{getOwnerName(row.musicSheetExtend, row.sourceType)}</div>
|
|
return <div>{getOwnerName(row.musicSheetExtend, row.sourceType)}</div>
|
|
@@ -103,14 +114,17 @@ export default defineComponent({
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '上传人',
|
|
title: '上传人',
|
|
|
|
+ minWidth:'100px',
|
|
key: 'createByName'
|
|
key: 'createByName'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '上传时间',
|
|
title: '上传时间',
|
|
|
|
+ minWidth:'150px',
|
|
key: 'createTime'
|
|
key: 'createTime'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '审核版本',
|
|
title: '审核版本',
|
|
|
|
+ minWidth:'100px',
|
|
key: 'appAuditFlag',
|
|
key: 'appAuditFlag',
|
|
render(row: any) {
|
|
render(row: any) {
|
|
return <div>{row.appAuditFlag ? '是' : '否'}</div>
|
|
return <div>{row.appAuditFlag ? '是' : '否'}</div>
|
|
@@ -118,6 +132,7 @@ export default defineComponent({
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '适用项目',
|
|
title: '适用项目',
|
|
|
|
+ minWidth:'150px',
|
|
key: 'projectName',
|
|
key: 'projectName',
|
|
render(row: any) {
|
|
render(row: any) {
|
|
return (
|
|
return (
|
|
@@ -145,6 +160,7 @@ export default defineComponent({
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '状态',
|
|
title: '状态',
|
|
|
|
+ minWidth:'50px',
|
|
key: 'status',
|
|
key: 'status',
|
|
render(row: any) {
|
|
render(row: any) {
|
|
return (
|
|
return (
|
|
@@ -156,6 +172,7 @@ export default defineComponent({
|
|
title: '操作',
|
|
title: '操作',
|
|
key: 'operation',
|
|
key: 'operation',
|
|
fixed: 'right',
|
|
fixed: 'right',
|
|
|
|
+ width: '300px',
|
|
render(row: any) {
|
|
render(row: any) {
|
|
return (
|
|
return (
|
|
<NSpace>
|
|
<NSpace>
|
|
@@ -249,7 +266,7 @@ export default defineComponent({
|
|
const onChangeStatus = (row: any) => {
|
|
const onChangeStatus = (row: any) => {
|
|
const statusStr = row.status ? '停用' : '启用'
|
|
const statusStr = row.status ? '停用' : '启用'
|
|
dialog.warning({
|
|
dialog.warning({
|
|
- title: '警告',
|
|
|
|
|
|
+ title: '提示',
|
|
content: `是否${statusStr}?`,
|
|
content: `是否${statusStr}?`,
|
|
positiveText: '确定',
|
|
positiveText: '确定',
|
|
negativeText: '取消',
|
|
negativeText: '取消',
|
|
@@ -274,7 +291,7 @@ export default defineComponent({
|
|
}
|
|
}
|
|
const statusStr = !status ? '停用' : '启用'
|
|
const statusStr = !status ? '停用' : '启用'
|
|
dialog.warning({
|
|
dialog.warning({
|
|
- title: '警告',
|
|
|
|
|
|
+ title: '提示',
|
|
content: `是否${statusStr}` + length + `条数据?`,
|
|
content: `是否${statusStr}` + length + `条数据?`,
|
|
positiveText: '确定',
|
|
positiveText: '确定',
|
|
negativeText: '取消',
|
|
negativeText: '取消',
|
|
@@ -335,13 +352,13 @@ export default defineComponent({
|
|
}
|
|
}
|
|
|
|
|
|
// 获取分类
|
|
// 获取分类
|
|
- const getMusicSheetCategorieList = async () => {
|
|
|
|
- try {
|
|
|
|
- const {data} = await musicSheetCategoriesQueryTree({enable: true})
|
|
|
|
- state.musicSheetCategories = filterPointCategory(data, 'musicSheetCategoriesList')
|
|
|
|
- } catch (e) {
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ // const getMusicSheetCategorieList = async () => {
|
|
|
|
+ // try {
|
|
|
|
+ // const {data} = await musicSheetCategoriesQueryTree({enable: true})
|
|
|
|
+ // state.musicSheetCategories = filterPointCategory(data, 'musicSheetCategoriesList')
|
|
|
|
+ // } catch (e) {
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
|
|
// 获取声部
|
|
// 获取声部
|
|
const initSubjectList = async () => {
|
|
const initSubjectList = async () => {
|
|
@@ -397,6 +414,7 @@ export default defineComponent({
|
|
}
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
|
+ state.loading = true
|
|
// getTagList()
|
|
// getTagList()
|
|
if (props.searchId) {
|
|
if (props.searchId) {
|
|
state.searchForm.categoriesId = props.searchId || null
|
|
state.searchForm.categoriesId = props.searchId || null
|
|
@@ -405,7 +423,8 @@ export default defineComponent({
|
|
initSubjectList()
|
|
initSubjectList()
|
|
initUseAppList()
|
|
initUseAppList()
|
|
getList()
|
|
getList()
|
|
- getMusicSheetCategorieList()
|
|
|
|
|
|
+ // getMusicSheetCategorieList()
|
|
|
|
+ state.loading = false
|
|
})
|
|
})
|
|
|
|
|
|
return () => (
|
|
return () => (
|
|
@@ -572,7 +591,7 @@ export default defineComponent({
|
|
onBatchChangeStatus(false)
|
|
onBatchChangeStatus(false)
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
- 批量禁用
|
|
|
|
|
|
+ 批量停用
|
|
</NButton>
|
|
</NButton>
|
|
<NButton
|
|
<NButton
|
|
disabled={checkedRowKeysRef.value.length == 0}
|
|
disabled={checkedRowKeysRef.value.length == 0}
|
|
@@ -593,6 +612,7 @@ export default defineComponent({
|
|
data={state.dataList}
|
|
data={state.dataList}
|
|
rowKey={(row: any) => row.id}
|
|
rowKey={(row: any) => row.id}
|
|
onUpdateCheckedRowKeys={handleCheck}
|
|
onUpdateCheckedRowKeys={handleCheck}
|
|
|
|
+ scrollX={'2000'}
|
|
></NDataTable>
|
|
></NDataTable>
|
|
<Pagination
|
|
<Pagination
|
|
v-model:page={state.pagination.page}
|
|
v-model:page={state.pagination.page}
|
|
@@ -622,7 +642,7 @@ export default defineComponent({
|
|
type={state.musicOperation}
|
|
type={state.musicOperation}
|
|
data={state.musicData}
|
|
data={state.musicData}
|
|
subjectList={state.subjectList}
|
|
subjectList={state.subjectList}
|
|
- musicSheetCategories={state.musicSheetCategories}
|
|
|
|
|
|
+ // musicSheetCategories={state.musicSheetCategories}
|
|
// tagList={state.tagList}
|
|
// tagList={state.tagList}
|
|
onClose={() => (state.visiableMusic = false)}
|
|
onClose={() => (state.visiableMusic = false)}
|
|
onGetList={getList}
|
|
onGetList={getList}
|