|
@@ -1,29 +1,12 @@
|
|
|
-import { defineComponent, h, onMounted, reactive, ref } from 'vue'
|
|
|
+import {defineComponent, h, onMounted, reactive, ref} from 'vue'
|
|
|
import SaveForm from '@components/save-form'
|
|
|
-import {
|
|
|
- DataTableColumns,
|
|
|
- DataTableRowKey,
|
|
|
- NButton,
|
|
|
- NCascader,
|
|
|
- NDataTable,
|
|
|
- NFormItem,
|
|
|
- NIcon,
|
|
|
- NImage,
|
|
|
- NInput,
|
|
|
- NInputNumber,
|
|
|
- NSelect,
|
|
|
- NSpace,
|
|
|
- NStep,
|
|
|
- NSteps,
|
|
|
- useDialog,
|
|
|
- useMessage
|
|
|
-} from 'naive-ui'
|
|
|
+import {DataTableColumns, DataTableRowKey, NButton, NCascader, NDataTable, NFormItem, NIcon, NImage, NInput, NInputNumber, NSelect, NSpace, NStep, NSteps, useDialog, useMessage} from 'naive-ui'
|
|
|
import Pagination from '@components/pagination'
|
|
|
-import { getMapValueByKey, getSelectDataFromObj } from '@/utils/objectUtil'
|
|
|
-import {appKey, musicSheetPaymentType, musicSheetSourceType, musicSheetType} from '@/utils/constant'
|
|
|
+import {getMapValueByKey, getSelectDataFromObj} from '@/utils/objectUtil'
|
|
|
+import {appKey, musicSheetSourceType, musicSheetType, scoreType} from '@/utils/constant'
|
|
|
import {musicSheetApplicationExtendCategoryList, musicSheetApplicationExtendSaveBatch, musicSheetApplicationOwnerList, musicSheetPage} from '@views/music-library/api'
|
|
|
import deepClone from '@/utils/deep.clone'
|
|
|
-import { getOwnerName } from '@views/music-library/musicUtil'
|
|
|
+import {getOwnerName} from '@views/music-library/musicUtil'
|
|
|
import TheTooltip from '@/components/TheTooltip'
|
|
|
import {sysApplicationPage} from "@views/menu-manage/api";
|
|
|
|
|
@@ -77,6 +60,8 @@ export default defineComponent({
|
|
|
startSortNum: null as any, // 排序起始值
|
|
|
projectMusicCategoryId: null as any, // 曲目分类ID
|
|
|
globalPaymentType: null as any, //收费方式
|
|
|
+ isConvertibleScore: null as any,//是否支持转简谱
|
|
|
+ scoreType: null as any,//默认谱面
|
|
|
|
|
|
userIdDisable: true,
|
|
|
userIdData: [] as any,
|
|
@@ -197,6 +182,14 @@ export default defineComponent({
|
|
|
message.error('曲目分类不能为空')
|
|
|
return
|
|
|
}
|
|
|
+ if (item.scoreType == null) {
|
|
|
+ message.error('默认谱面不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (item.isConvertibleScore == null) {
|
|
|
+ message.error('是否支持转简谱不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (item.sortNo === null || item.sortNo === undefined || item.sortNo === '') {
|
|
|
message.error('排序号不能为空')
|
|
|
return
|
|
@@ -310,7 +303,6 @@ export default defineComponent({
|
|
|
valueField: 'id',
|
|
|
labelField: 'name',
|
|
|
childrenField: 'children',
|
|
|
- placeholderField: '请选择曲目分类',
|
|
|
filterable: true,
|
|
|
options: state.musicSheetCategories
|
|
|
})
|
|
@@ -453,6 +445,165 @@ export default defineComponent({
|
|
|
field.push({
|
|
|
title(column: any) {
|
|
|
return (
|
|
|
+ <NSpace>
|
|
|
+ 默认谱面
|
|
|
+ <NButton
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ text
|
|
|
+ onClick={() => {
|
|
|
+ dialogs.create({
|
|
|
+ title: '请选择默认谱面',
|
|
|
+ showIcon: false,
|
|
|
+ content: () => {
|
|
|
+ return h(
|
|
|
+ 'div',
|
|
|
+ {
|
|
|
+ class: 'flex flex-col justify-center items-center text-14px'
|
|
|
+ },
|
|
|
+ [
|
|
|
+ // icon
|
|
|
+ h(NSelect, {
|
|
|
+ onUpdateValue(v) {
|
|
|
+ state.scoreType = v
|
|
|
+ },
|
|
|
+ options: getSelectDataFromObj(scoreType)
|
|
|
+ })
|
|
|
+ ]
|
|
|
+ )
|
|
|
+ },
|
|
|
+ positiveText: '确定',
|
|
|
+ negativeText: '取消',
|
|
|
+ onPositiveClick: () => {
|
|
|
+ for (let i = 0; i < state.selectRowData.length; i++) {
|
|
|
+ const item = state.selectRowData[i]
|
|
|
+ item.scoreType = state.scoreType
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <NIcon size={15} style="padding-left: 5px;margin-top:4px">
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
|
+ <path d="M2 26h28v2H2z" fill="currentColor"></path>
|
|
|
+ <path
|
|
|
+ d="M25.4 9c.8-.8.8-2 0-2.8l-3.6-3.6c-.8-.8-2-.8-2.8 0l-15 15V24h6.4l15-15zm-5-5L24 7.6l-3 3L17.4 7l3-3zM6 22v-3.6l10-10l3.6 3.6l-10 10H6z"
|
|
|
+ fill="currentColor"
|
|
|
+ ></path>
|
|
|
+ </svg>
|
|
|
+ </NIcon>
|
|
|
+ </NButton>
|
|
|
+ </NSpace>
|
|
|
+ )
|
|
|
+ },
|
|
|
+ key: 'scoreType',
|
|
|
+ width: 200,
|
|
|
+ render: (row: any) => {
|
|
|
+ // })
|
|
|
+ return (
|
|
|
+ <NSelect
|
|
|
+ placeholder="请选择默认谱面"
|
|
|
+ value={row.scoreType}
|
|
|
+ options={getSelectDataFromObj(scoreType)}
|
|
|
+ onUpdateValue={(value: any) => {
|
|
|
+ row.scoreType = value
|
|
|
+ }}
|
|
|
+ clearable
|
|
|
+ />
|
|
|
+ )
|
|
|
+ }
|
|
|
+ })
|
|
|
+ field.push({
|
|
|
+ title(column: any) {
|
|
|
+ return (
|
|
|
+ <NSpace>
|
|
|
+ 是否支持转简谱
|
|
|
+ <NButton
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ text
|
|
|
+ onClick={() => {
|
|
|
+ dialogs.create({
|
|
|
+ title: '是否支持转简谱',
|
|
|
+ showIcon: false,
|
|
|
+ content: () => {
|
|
|
+ return h(
|
|
|
+ 'div',
|
|
|
+ {
|
|
|
+ class: 'flex flex-col justify-center items-center text-14px'
|
|
|
+ },
|
|
|
+ [
|
|
|
+ // icon
|
|
|
+ h(NSelect, {
|
|
|
+ onUpdateValue(v) {
|
|
|
+ state.isConvertibleScore = v
|
|
|
+ },
|
|
|
+ options: [
|
|
|
+ {
|
|
|
+ label: '是',
|
|
|
+ value: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '否',
|
|
|
+ value: false
|
|
|
+ }] as any
|
|
|
+ })
|
|
|
+ ]
|
|
|
+ )
|
|
|
+ },
|
|
|
+ positiveText: '确定',
|
|
|
+ negativeText: '取消',
|
|
|
+ onPositiveClick: () => {
|
|
|
+ for (let i = 0; i < state.selectRowData.length; i++) {
|
|
|
+ const item = state.selectRowData[i]
|
|
|
+ item.isConvertibleScore = state.isConvertibleScore
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <NIcon size={15} style="padding-left: 5px;margin-top:4px">
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
|
+ <path d="M2 26h28v2H2z" fill="currentColor"></path>
|
|
|
+ <path
|
|
|
+ d="M25.4 9c.8-.8.8-2 0-2.8l-3.6-3.6c-.8-.8-2-.8-2.8 0l-15 15V24h6.4l15-15zm-5-5L24 7.6l-3 3L17.4 7l3-3zM6 22v-3.6l10-10l3.6 3.6l-10 10H6z"
|
|
|
+ fill="currentColor"
|
|
|
+ ></path>
|
|
|
+ </svg>
|
|
|
+ </NIcon>
|
|
|
+ </NButton>
|
|
|
+ </NSpace>
|
|
|
+ )
|
|
|
+ },
|
|
|
+ key: 'isConvertibleScore',
|
|
|
+ width: 200,
|
|
|
+ render: (row: any) => {
|
|
|
+ // })
|
|
|
+ return (
|
|
|
+ <NSelect
|
|
|
+ value={row.isConvertibleScore}
|
|
|
+ options={[
|
|
|
+ {
|
|
|
+ label: '是',
|
|
|
+ value: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '否',
|
|
|
+ value: false
|
|
|
+ } as any
|
|
|
+ ]}
|
|
|
+ onUpdateValue={(value: any) => {
|
|
|
+ row.isConvertibleScore = value
|
|
|
+ }}
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ />
|
|
|
+ )
|
|
|
+ }
|
|
|
+ })
|
|
|
+ field.push({
|
|
|
+ title(column: any) {
|
|
|
+ return (
|
|
|
<NSpace>
|
|
|
排序
|
|
|
<NButton
|
|
@@ -636,6 +787,7 @@ export default defineComponent({
|
|
|
v-model:value={state.searchForm.subjectId}
|
|
|
options={state.subjectList}
|
|
|
clearable
|
|
|
+ filterable
|
|
|
/>
|
|
|
</NFormItem>
|
|
|
<NFormItem label="音乐人" path="composer">
|