|
@@ -1,33 +1,17 @@
|
|
|
import SaveForm from '@/components/save-form'
|
|
|
import Pagination from '@/components/pagination'
|
|
|
-import {
|
|
|
- NButton,
|
|
|
- NDataTable,
|
|
|
- NFormItem,
|
|
|
- NImage,
|
|
|
- NInput,
|
|
|
- NModal,
|
|
|
- NSelect,
|
|
|
- NSpace,
|
|
|
- NTag,
|
|
|
- useDialog,
|
|
|
- useMessage,
|
|
|
- NCascader,
|
|
|
- NDescriptions,
|
|
|
- NDescriptionsItem, NIcon
|
|
|
-} from 'naive-ui'
|
|
|
+import {NButton, NCascader, NDataTable, NFormItem, NIcon, NImage, NInput, NModal, NSelect, NSpace, NTag, useDialog, useMessage} from 'naive-ui'
|
|
|
import {defineComponent, onMounted, reactive, ref, watch} from 'vue'
|
|
|
import {musicSheetPage, musicSheetRemove, musicSheetStatus, musicTagPage} from '../../api'
|
|
|
import {getMusicSheetCategories} from '@/views/music-categrory/api'
|
|
|
import MusicOperation from '../modal/music-operation'
|
|
|
-import {subjectBasicConfigPage, subjectPage} from '@/views/system-manage/api'
|
|
|
-import {accompanimentTypeArray, audioTypeArray} from '@/utils/searchArray'
|
|
|
+import {subjectPage} from '@/views/system-manage/api'
|
|
|
import MusicPreView from '../modal/musicPreView'
|
|
|
-import TheTooltip from '@/components/TheTooltip'
|
|
|
import {filterPointCategory} from '@/views/teaching-manage/unit-test'
|
|
|
import UseProject from "@views/music-library/music-sheet/modal/use-project";
|
|
|
-import {DeleteFilled} from "@vicons/antd";
|
|
|
-import {IMAGE_SVG} from "@wangeditor/editor/dist/editor/src/constants/svg";
|
|
|
+import {filterClientType, getMapValueByKey} from "@/utils/filters";
|
|
|
+import {getValueForKey} from "@/utils/searchArray";
|
|
|
+import {musicSheetSourceType, musicSheetType} from "@/utils/constant";
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'content-flash',
|
|
@@ -66,7 +50,8 @@ export default defineComponent({
|
|
|
musicPreview: false,
|
|
|
musicScore: null as any,
|
|
|
showUseProject: false, // 适用项目
|
|
|
- showUseProjectData: undefined // 适用项目行数据
|
|
|
+ showUseProjectData: undefined, // 适用项目行数据
|
|
|
+ detailReadonly: false // 新增、修改、详情是否可编辑
|
|
|
})
|
|
|
|
|
|
const columns = (): any => {
|
|
@@ -92,23 +77,41 @@ export default defineComponent({
|
|
|
title: '封面图',
|
|
|
key: 'titleImg',
|
|
|
render(row: any): JSX.Element {
|
|
|
- return <NImage width={60} height={60} src={row.titleImg}/>
|
|
|
+ return <NImage width={60} height={60} src={row.musicCover}/>
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
title: '音乐人',
|
|
|
- key: 'author'
|
|
|
+ key: 'composer'
|
|
|
},
|
|
|
{
|
|
|
title: '曲目类型',
|
|
|
- key: 'musicSheetCategoriesName'
|
|
|
+ key: 'musicSheetType',
|
|
|
+ render(row: any) {
|
|
|
+ return getMapValueByKey(row.musicSheetType, new Map(Object.entries(musicSheetType)));
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
title: '作者属性',
|
|
|
- key: 'authorFrom'
|
|
|
+ key: 'sourceType',
|
|
|
+ render(row: any) {
|
|
|
+ return getMapValueByKey(row.sourceType, new Map(Object.entries(musicSheetSourceType)));
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
title: '所属人',
|
|
|
+ key: 'composer'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '上传人',
|
|
|
+ key: 'createBy'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '上传时间',
|
|
|
+ key: 'createTime'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '审核版本',
|
|
|
key: 'userName'
|
|
|
},
|
|
|
{
|
|
@@ -173,6 +176,7 @@ export default defineComponent({
|
|
|
state.visiableMusic = true
|
|
|
state.musicOperation = 'preview'
|
|
|
state.musicData = row
|
|
|
+ state.detailReadonly = true
|
|
|
}}
|
|
|
>
|
|
|
查看
|
|
@@ -186,6 +190,7 @@ export default defineComponent({
|
|
|
state.visiableMusic = true
|
|
|
state.musicOperation = 'edit'
|
|
|
state.musicData = row
|
|
|
+ state.detailReadonly = true
|
|
|
}}
|
|
|
>
|
|
|
修改
|
|
@@ -256,7 +261,7 @@ export default defineComponent({
|
|
|
const onRmove = (row: any): void => {
|
|
|
dialog.warning({
|
|
|
title: '警告',
|
|
|
- content: `删除"${row.musicSheetName}",是否继续?`,
|
|
|
+ content: `删除"${row.name}",是否继续?`,
|
|
|
positiveText: '确定',
|
|
|
negativeText: '取消',
|
|
|
onPositiveClick: async () => {
|
|
@@ -467,6 +472,25 @@ export default defineComponent({
|
|
|
}
|
|
|
/>
|
|
|
</NFormItem>
|
|
|
+ <NFormItem label="审核版本" path="status">
|
|
|
+ <NSelect
|
|
|
+ v-model={[state.searchForm.status, 'value']}
|
|
|
+ placeholder="请选择审核版本"
|
|
|
+ clearable
|
|
|
+ options={
|
|
|
+ [
|
|
|
+ {
|
|
|
+ label: '是',
|
|
|
+ value: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '否',
|
|
|
+ value: 0
|
|
|
+ }
|
|
|
+ ] as any
|
|
|
+ }
|
|
|
+ />
|
|
|
+ </NFormItem>
|
|
|
<NFormItem>
|
|
|
<NSpace>
|
|
|
<NButton type="primary" onClick={onSearch}>
|
|
@@ -487,6 +511,7 @@ export default defineComponent({
|
|
|
state.visiableMusic = true
|
|
|
state.musicOperation = 'add'
|
|
|
state.musicData = {}
|
|
|
+ state.detailReadonly = true
|
|
|
}}
|
|
|
>
|
|
|
新增曲目
|
|
@@ -566,7 +591,7 @@ export default defineComponent({
|
|
|
preset="dialog"
|
|
|
showIcon={false}
|
|
|
title={'适用项目'}
|
|
|
- style={{width: '500px',height: '650px'}}
|
|
|
+ style={{width: '500px', height: '650px'}}
|
|
|
>
|
|
|
<UseProject item={state.musicScore} rowData={state.showUseProjectData}/>
|
|
|
</NModal>
|