music-sheet-gym.tsx 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750
  1. import { defineComponent, onMounted, reactive, ref } from 'vue'
  2. import SaveForm from '@components/save-form'
  3. import {
  4. DataTableRowKey,
  5. NButton,
  6. NCascader,
  7. NDataTable,
  8. NDatePicker,
  9. NDescriptions,
  10. NDescriptionsItem,
  11. NFormItem,
  12. NIcon,
  13. NImage,
  14. NInput,
  15. NModal,
  16. NSelect,
  17. NSpace,
  18. NTag,
  19. NTooltip,
  20. useDialog,
  21. useMessage
  22. } from 'naive-ui'
  23. import Pagination from '@components/pagination'
  24. import TheTooltip from '@components/TheTooltip'
  25. import AddMusic from '@views/music-library/project-music-sheet/module/gym/addMusic'
  26. import { getMapValueByKey, getSelectDataFromObj } from '@/utils/objectUtil'
  27. import {
  28. appKey,
  29. musicSheetAudioType,
  30. musicSheetPaymentType,
  31. musicSheetSourceType,
  32. musicSheetType
  33. } from '@/utils/constant'
  34. import {
  35. musicSheetApplicationExtendCategoryList,
  36. musicSheetApplicationExtendDel,
  37. musicSheetApplicationExtendStatus,
  38. musicSheetApplicationOwnerList,
  39. musicSheetPageByApplication,
  40. musicSheetStatusList
  41. } from '@views/music-library/api'
  42. import UpdateMusic from '@views/music-library/project-music-sheet/module/gym/updateMusic'
  43. import {musicSheetApplicationExtendSubjectList, subjectPage, sysApplicationPage} from '@views/system-manage/api'
  44. import { filterTimes } from '@/utils/dateUtil'
  45. import deepClone from '@/utils/deep.clone'
  46. import {copyText, getOwnerName} from '@views/music-library/musicUtil'
  47. import MusicPreView from '@views/music-library/music-sheet/modal/musicPreView'
  48. import { HelpCircleOutline } from '@vicons/ionicons5'
  49. export default defineComponent({
  50. name: 'project-music-sheet-mec',
  51. props: {
  52. appKey: {
  53. type: String,
  54. default: 'GYT'
  55. }
  56. },
  57. setup(props) {
  58. const dialog = useDialog()
  59. const message = useMessage()
  60. const state = reactive({
  61. loading: false,
  62. appId: null as any,
  63. pagination: {
  64. page: 1,
  65. rows: 10,
  66. pageTotal: 0
  67. },
  68. searchForm: {
  69. keyword: null,
  70. musicSheetType: null, //曲目类型(SINGLE:单曲 CONCERT:合奏)
  71. musicalInstrumentId: null, // 乐器ID
  72. musicCategoryIds: null, //曲目分类ID
  73. status: null, //曲目状态(0:停用,1:启用)
  74. sourceType: null, //来源类型/作者属性(PLATFORM: 平台; ORG: 机构; PERSON: 个人)
  75. paymentType: null, //收费类型(FREE:免费;VIP:会员;CHARGE:单曲收费)
  76. userId: null, //所属人
  77. musicCategoryId: null, //曲目分类ID
  78. times: null, // 上传时间
  79. audioType: null, //音频类型(HOMEMODE: 自制 COMMON: 普通)
  80. exquisiteFlag: null, //精品标志
  81. topFlag: null, //是否置顶(0:否;1:是)
  82. availableType: null, //可用途径 ORG 机构 PLATFORM 平台
  83. appAuditFlag: null, //是否审核版本
  84. detailFlag: null, //是否查询详情
  85. applicationId: null, //所属人项目ID
  86. extendApplicationId: null //所属人项目ID
  87. },
  88. subjectList: [],
  89. dataList: [] as any[],
  90. musicSheetCategories: [],
  91. showAddDialog: false,
  92. showEditDialog: false,
  93. userIdDisable: true,
  94. userIdData: [] as any,
  95. updateRow: {} as any, // 修改选择的行
  96. applicationId: null, //应用ID
  97. musicPreview: false,
  98. musicPreviewScoreType: 'staff', // 预览谱面类型
  99. musicScore: null as any,
  100. useProjectData: [] as any, // 适用项目行数据
  101. subjectInstrumentMap: new Map(), // 声部乐器
  102. subjectId: null,//
  103. })
  104. onMounted(async () => {
  105. state.loading = true
  106. // 获取应用APP信息
  107. try {
  108. const { data } = await sysApplicationPage({ page: 1, rows: 1, appKey: props.appKey })
  109. const tempList = data.rows || []
  110. if (!tempList || tempList.length == 0) {
  111. state.loading = false
  112. message.error('加载项目信息失败')
  113. return
  114. }
  115. state.appId = tempList[0].id
  116. state.applicationId = tempList[0].id
  117. } catch {}
  118. // 加载声部
  119. try {
  120. const { data } = await musicSheetApplicationExtendSubjectList({
  121. applicationId: state.applicationId
  122. })
  123. const tempList = data || []
  124. tempList.forEach((item: any) => {
  125. item.label = item.subjectName
  126. item.value = item.subjectId
  127. state.subjectInstrumentMap.set(item.subjectId, item.instrumentId)
  128. })
  129. state.subjectList = tempList
  130. } catch {}
  131. //加载曲目分类列表
  132. try {
  133. const { data } = await musicSheetApplicationExtendCategoryList({
  134. applicationIds: state.appId
  135. })
  136. if (data && data.length > 0) {
  137. state.musicSheetCategories = data[0].musicSheetCategories
  138. }
  139. } catch {}
  140. // 加载表格数据
  141. initUseAppList()
  142. getList()
  143. })
  144. const initUseAppList = async () => {
  145. try {
  146. const appKeys = Object.keys(appKey)
  147. const { data } = await sysApplicationPage({ page: 1, rows: 999 })
  148. const tempList = data.rows || []
  149. state.useProjectData = []
  150. const filter = tempList.filter((next: any) => {
  151. return appKeys.includes(next.appKey)
  152. })
  153. filter.forEach((item: any) => {
  154. state.useProjectData.push({
  155. ...item,
  156. label: item.appName,
  157. value: item.id
  158. })
  159. })
  160. } catch {}
  161. }
  162. const saveForm = ref()
  163. const onSearch = () => {
  164. saveForm.value?.submit()
  165. }
  166. const onBtnReset = () => {
  167. saveForm.value?.reset()
  168. }
  169. const onSubmit = () => {
  170. state.pagination.page = 1
  171. getList()
  172. }
  173. const checkedRowKeysRef = ref<DataTableRowKey[]>([])
  174. const handleCheck = (rowKeys: DataTableRowKey[]) => {
  175. checkedRowKeysRef.value = rowKeys
  176. }
  177. const getList = async () => {
  178. try {
  179. state.loading = true
  180. if (state.subjectId) {
  181. state.searchForm.musicalInstrumentId = state.subjectInstrumentMap.get(state.subjectId)
  182. }else {
  183. state.searchForm.musicalInstrumentId = null
  184. }
  185. const sourceType = state.searchForm.sourceType
  186. const { data } = await musicSheetPageByApplication({
  187. ...state.pagination,
  188. ...state.searchForm,
  189. userId: sourceType && sourceType === 'PERSON' ? state.searchForm.userId : null,
  190. organizationRoleId: sourceType && sourceType === 'ORG' ? state.searchForm.userId : null,
  191. ...filterTimes(state.searchForm.times, ['startTime', 'endTime']),
  192. applicationId: state.applicationId
  193. })
  194. state.pagination.pageTotal = Number(data.total)
  195. state.dataList = data.rows || []
  196. } catch {}
  197. state.loading = false
  198. }
  199. const onChangeStatus = (row: any) => {
  200. const statusStr = row.status ? '停用' : '启用'
  201. dialog.warning({
  202. title: '提示',
  203. content: `是否${statusStr}?`,
  204. positiveText: '确定',
  205. negativeText: '取消',
  206. onPositiveClick: async () => {
  207. try {
  208. await musicSheetApplicationExtendStatus({
  209. ids: row.applicationExtendId,
  210. status: !row.status
  211. })
  212. getList()
  213. message.success(`${statusStr}成功`)
  214. } catch {}
  215. }
  216. })
  217. }
  218. const onBatchChangeStatus = (status: boolean) => {
  219. const length = checkedRowKeysRef.value.length
  220. if (length == 0) {
  221. message.warning('未选择数据')
  222. }
  223. const statusStr = !status ? '停用' : '启用'
  224. dialog.warning({
  225. title: '提示',
  226. content: `是否${statusStr}` + length + `条数据?`,
  227. positiveText: '确定',
  228. negativeText: '取消',
  229. onPositiveClick: async () => {
  230. try {
  231. await musicSheetApplicationExtendStatus({
  232. ids: checkedRowKeysRef.value.join(','),
  233. status: status
  234. })
  235. getList()
  236. message.success(`${statusStr}成功`)
  237. } catch {}
  238. }
  239. })
  240. }
  241. const updateUserIdData = async (sourceType: any) => {
  242. if (!state.searchForm.extendApplicationId) {
  243. return
  244. }
  245. state.userIdData = []
  246. state.searchForm.userId = null
  247. if (sourceType && sourceType !== 'PLATFORM') {
  248. const { data } = await musicSheetApplicationOwnerList({
  249. page: 1,
  250. rows: 9999,
  251. sourceType: sourceType,
  252. applicationId: state.searchForm.extendApplicationId
  253. })
  254. const temp = data.rows || []
  255. temp.forEach((next: any) => {
  256. state.userIdData.push({
  257. ...next,
  258. label: sourceType === 'PERSON' ? next.userName : next.organizationRole,
  259. value: sourceType === 'PERSON' ? next.userId : next.organizationRoleId
  260. })
  261. })
  262. }
  263. }
  264. const onRmove = (row: any): void => {
  265. dialog.warning({
  266. title: '提示',
  267. content: `删除曲目,是否继续?`,
  268. positiveText: '确定',
  269. negativeText: '取消',
  270. onPositiveClick: async () => {
  271. try {
  272. await musicSheetApplicationExtendDel(row.applicationExtendId)
  273. getList()
  274. message.success('删除成功')
  275. } catch {}
  276. }
  277. })
  278. }
  279. const columns = (): any => {
  280. return [
  281. {
  282. type: 'selection'
  283. },
  284. {
  285. title: '曲目名称',
  286. key: 'id',
  287. render: (row: any) => (
  288. <>
  289. <NDescriptions labelPlacement="left" column={1}>
  290. <NDescriptionsItem label="曲目名称">
  291. <TheTooltip content={row.name} />{' '}
  292. </NDescriptionsItem>
  293. <NDescriptionsItem label="曲目编号">
  294. <div onDblclick={() => {
  295. copyText(message,row.id)
  296. }}>
  297. <TheTooltip content={row.id}/>
  298. </div>
  299. </NDescriptionsItem>
  300. </NDescriptions>
  301. </>
  302. )
  303. },
  304. {
  305. title: '封面图',
  306. key: 'musicCover',
  307. render(row: any): JSX.Element {
  308. return <NImage width={60} height={60} src={row.musicCover} />
  309. }
  310. },
  311. // {
  312. // title: '可用声部',
  313. // key: 'subjectNames',
  314. // render: (row: any) => {
  315. // return <TheTooltip content={row.subjectNames}/>
  316. // }
  317. // },
  318. {
  319. title: '曲目信息',
  320. key: 'musicSheetCategoriesName',
  321. render: (row: any) => (
  322. <>
  323. <NDescriptions labelPlacement="left" column={1}>
  324. <NDescriptionsItem label="曲目来源">
  325. {getMapValueByKey(row.sourceType, new Map(Object.entries(musicSheetSourceType)))}
  326. </NDescriptionsItem>
  327. <NDescriptionsItem label="多声轨渲染">
  328. {getMapValueByKey(row.musicSheetType, new Map(Object.entries(musicSheetType)))}
  329. </NDescriptionsItem>
  330. <NDescriptionsItem label="所属人">
  331. <TheTooltip content={getOwnerName(row.musicSheetExtend, row.sourceType)} />
  332. </NDescriptionsItem>
  333. <NDescriptionsItem label="可用声部">
  334. <TheTooltip content={row.subjectNames} />
  335. </NDescriptionsItem>
  336. </NDescriptions>
  337. </>
  338. )
  339. },
  340. {
  341. title: '伴奏类型',
  342. key: 'audioType',
  343. render: (row: any) => {
  344. return (
  345. <div>
  346. {getMapValueByKey(row.audioType, new Map(Object.entries(musicSheetAudioType)))}
  347. </div>
  348. )
  349. }
  350. },
  351. {
  352. title: '曲目分类',
  353. key: 'musicSheetCategoryName'
  354. },
  355. {
  356. title: '收费方式',
  357. key: 'paymentType',
  358. render: (row: any) => {
  359. return (
  360. <div>
  361. {row.paymentType ? (row.paymentType == 'VIP' ? '收费' : '免费') : '--'}
  362. </div>
  363. )
  364. }
  365. },
  366. {
  367. title: '上传人',
  368. minWidth: '150px',
  369. key: 'composer',
  370. render(row: any) {
  371. return (
  372. <NDescriptions labelPlacement="left" column={1}>
  373. <NDescriptionsItem label="上传人">{row.createByName}</NDescriptionsItem>
  374. <NDescriptionsItem label="上传时间">{row.createTime}</NDescriptionsItem>
  375. </NDescriptions>
  376. )
  377. }
  378. },
  379. {
  380. title: '状态',
  381. key: 'status',
  382. render(row: any) {
  383. return (
  384. <NTag type={row.status ? 'primary' : 'default'}>{row.status ? '启用' : '停用'}</NTag>
  385. )
  386. }
  387. },
  388. {
  389. title: '操作',
  390. key: 'operation',
  391. fixed: 'right',
  392. render(row: any) {
  393. return (
  394. <NSpace>
  395. <NButton
  396. type="primary"
  397. size="small"
  398. text
  399. onClick={() => {
  400. state.musicPreview = true
  401. state.musicScore = row
  402. // STAVE: '五线谱',
  403. // FIRST: '首调',
  404. // JIAN: '固定调'
  405. if ('STAVE' == row.scoreType) {
  406. state.musicPreviewScoreType = 'staff'
  407. } else if ('JIAN' == row.scoreType) {
  408. state.musicPreviewScoreType = 'fixedTone'
  409. } else if ('FIRST' == row.scoreType) {
  410. state.musicPreviewScoreType = 'firstTone'
  411. } else {
  412. return
  413. }
  414. }}
  415. >
  416. 预览
  417. </NButton>
  418. <NButton
  419. type="primary"
  420. size="small"
  421. text
  422. v-auth="musicSheetApplicationExtend/status1751235150422736897"
  423. onClick={() => onChangeStatus(row)}
  424. >
  425. {row.status ? '停用' : '启用'}
  426. </NButton>
  427. <NButton
  428. type="primary"
  429. size="small"
  430. text
  431. v-auth="musicSheetApplicationExtend/update1751235534826504193"
  432. onClick={() => {
  433. state.showEditDialog = true
  434. state.updateRow = row
  435. }}
  436. >
  437. 修改
  438. </NButton>
  439. <NButton
  440. type="primary"
  441. size="small"
  442. text
  443. disabled={!!row.status}
  444. onClick={() => onRmove(row)}
  445. v-auth="musicSheetApplicationExtend/del1770708555010191362"
  446. >
  447. 删除
  448. </NButton>
  449. </NSpace>
  450. )
  451. }
  452. }
  453. ]
  454. }
  455. return () => {
  456. return (
  457. <div class="system-menu-container">
  458. <SaveForm
  459. ref={saveForm}
  460. model={state.searchForm}
  461. onSubmit={onSubmit}
  462. saveKey="music-sheet-gym"
  463. onSetModel={(val: any) => (state.searchForm = val)}
  464. >
  465. <NFormItem label="关键词" path="keyword">
  466. <NInput
  467. placeholder="请输入曲目名称/编号"
  468. v-model:value={state.searchForm.keyword}
  469. clearable
  470. />
  471. </NFormItem>
  472. <NFormItem label="曲目来源" path="sourceType">
  473. <NSelect
  474. placeholder="请选择曲目来源"
  475. v-model:value={state.searchForm.sourceType}
  476. options={getSelectDataFromObj(musicSheetSourceType)}
  477. onUpdateValue={async (value: any) => {
  478. state.userIdData = []
  479. state.searchForm.userId = null
  480. if (value && value !== 'PLATFORM') {
  481. await updateUserIdData(value)
  482. state.userIdDisable = !state.searchForm.extendApplicationId
  483. } else {
  484. state.userIdDisable = true
  485. }
  486. }}
  487. clearable
  488. />
  489. </NFormItem>
  490. <NFormItem label="所属项目" path="extendApplicationId">
  491. <NSelect
  492. placeholder="请选择所属项目"
  493. v-model:value={state.searchForm.extendApplicationId}
  494. options={state.useProjectData}
  495. clearable
  496. onUpdateValue={async (value: any) => {
  497. state.searchForm.extendApplicationId = value
  498. if (value) {
  499. await updateUserIdData(state.searchForm.sourceType)
  500. state.userIdDisable = !(
  501. state.searchForm.sourceType && state.searchForm.sourceType !== 'PLATFORM'
  502. )
  503. } else {
  504. state.searchForm.userId = null
  505. state.userIdDisable = true
  506. state.userIdData = []
  507. }
  508. }}
  509. />
  510. </NFormItem>
  511. <NFormItem label="所属人" path="userId">
  512. <NSelect
  513. filterable
  514. placeholder="请选择所属人"
  515. disabled={state.userIdDisable}
  516. v-model:value={state.searchForm.userId}
  517. options={state.userIdData}
  518. clearable
  519. ></NSelect>
  520. </NFormItem>
  521. <NFormItem label="多声轨渲染" path="subjectType">
  522. <NSelect
  523. placeholder="请选择多声轨渲染"
  524. v-model:value={state.searchForm.musicSheetType}
  525. options={getSelectDataFromObj(musicSheetType)}
  526. clearable
  527. />
  528. </NFormItem>
  529. <NFormItem label="伴奏类型" path="audioType">
  530. <NSelect
  531. placeholder="请选择伴奏类型"
  532. v-model:value={state.searchForm.audioType}
  533. options={getSelectDataFromObj(musicSheetAudioType)}
  534. clearable
  535. />
  536. </NFormItem>
  537. <NFormItem label="可用声部" path="musicalInstrumentId">
  538. <NSelect
  539. placeholder="请选择可用声部"
  540. v-model:value={state.subjectId}
  541. options={state.subjectList}
  542. clearable
  543. filterable
  544. />
  545. </NFormItem>
  546. <NFormItem label="曲目分类" path="musicCategoryId">
  547. <NCascader
  548. valueField="id"
  549. labelField="name"
  550. children-field="children"
  551. placeholder="请选择曲目分类"
  552. v-model:value={state.searchForm.musicCategoryId}
  553. options={state.musicSheetCategories}
  554. clearable
  555. filterable
  556. />
  557. </NFormItem>
  558. {/*<NFormItem*/}
  559. {/* label="可用途径"*/}
  560. {/* path="availableType"*/}
  561. {/*>*/}
  562. {/* <NSelect*/}
  563. {/* placeholder="请选择可用途径"*/}
  564. {/* v-model:value={state.searchForm.availableType}*/}
  565. {/* options={getSelectDataFromObj(musicSheetAvailableType)}*/}
  566. {/* clearable*/}
  567. {/* >*/}
  568. {/* </NSelect>*/}
  569. {/*</NFormItem>*/}
  570. <NFormItem label="收费方式" path="paymentType">
  571. <NSelect
  572. placeholder="请选择收费方式"
  573. v-model:value={state.searchForm.paymentType}
  574. options={[
  575. {
  576. label: '免费',
  577. value: 'FREE'
  578. },
  579. {
  580. label: '收费',
  581. value: 'VIP'
  582. }
  583. ]}
  584. clearable
  585. ></NSelect>
  586. </NFormItem>
  587. <NFormItem label="状态" path="status">
  588. <NSelect
  589. v-model:value={state.searchForm.status}
  590. placeholder="请选择状态"
  591. options={
  592. [
  593. {
  594. label: '启用',
  595. value: true
  596. },
  597. {
  598. label: '停用',
  599. value: false
  600. }
  601. ] as any
  602. }
  603. clearable
  604. />
  605. </NFormItem>
  606. <NFormItem label="上传时间" path="authorFrom">
  607. <NDatePicker
  608. v-model:value={state.searchForm.times}
  609. type="daterange"
  610. clearable
  611. value-format="yyyy.MM.dd"
  612. startPlaceholder="开始时间"
  613. endPlaceholder="结束时间"
  614. />
  615. </NFormItem>
  616. <NFormItem>
  617. <NSpace>
  618. <NButton type="primary" onClick={onSearch}>
  619. 搜索
  620. </NButton>
  621. <NButton type="default" onClick={onBtnReset}>
  622. 重置
  623. </NButton>
  624. </NSpace>
  625. </NFormItem>
  626. </SaveForm>
  627. <div class={['section-container']}>
  628. <NSpace style={{ paddingBottom: '12px' }}>
  629. <NButton
  630. type="primary"
  631. v-auth="musicSheetApplicationExtend/saveBatch1751234300275064833"
  632. onClick={() => {
  633. state.showAddDialog = true
  634. }}
  635. >
  636. 添加曲目
  637. </NButton>
  638. <NButton
  639. disabled={checkedRowKeysRef.value.length == 0}
  640. v-auth="musicSheetApplicationExtend/status1751235150422736897"
  641. onClick={() => {
  642. onBatchChangeStatus(false)
  643. }}
  644. >
  645. 批量停用
  646. </NButton>
  647. <NButton
  648. disabled={checkedRowKeysRef.value.length == 0}
  649. v-auth="musicSheetApplicationExtend/status1751235150422736897"
  650. onClick={() => {
  651. onBatchChangeStatus(true)
  652. }}
  653. >
  654. 批量启用
  655. </NButton>
  656. </NSpace>
  657. <NDataTable
  658. loading={state.loading}
  659. columns={columns()}
  660. data={state.dataList}
  661. rowKey={(row: any) => row.applicationExtendId}
  662. onUpdateCheckedRowKeys={handleCheck}
  663. scrollX={'1400'}
  664. ></NDataTable>
  665. <Pagination
  666. v-model:page={state.pagination.page}
  667. v-model:pageSize={state.pagination.rows}
  668. v-model:pageTotal={state.pagination.pageTotal}
  669. onList={getList}
  670. sync
  671. saveKey="music-sheet-gym"
  672. ></Pagination>
  673. </div>
  674. <NModal
  675. v-model:show={state.showAddDialog}
  676. preset="dialog"
  677. showIcon={false}
  678. title={'添加曲目'}
  679. style={{ width: '1300px' }}
  680. >
  681. <AddMusic
  682. onClose={() => (state.showAddDialog = false)}
  683. onGetList={() => {
  684. state.pagination.page = 1
  685. getList()
  686. }}
  687. subjectList={state.subjectList}
  688. appId={state.appId}
  689. />
  690. </NModal>
  691. <NModal
  692. v-model:show={state.showEditDialog}
  693. preset="dialog"
  694. showIcon={false}
  695. title={'修改曲目'}
  696. style={{ width: '500px' }}
  697. >
  698. <UpdateMusic
  699. onClose={() => (state.showEditDialog = false)}
  700. onGetList={() => {
  701. state.pagination.page = 1
  702. getList()
  703. }}
  704. rowData={state.updateRow}
  705. appId={state.appId}
  706. musicSheetCategories={state.musicSheetCategories}
  707. />
  708. </NModal>
  709. <NModal
  710. blockScroll={true}
  711. v-model:show={state.musicPreview}
  712. preset="dialog"
  713. showIcon={false}
  714. title={'曲目预览'}
  715. style={{ width: 'auto' }}
  716. >
  717. <MusicPreView item={state.musicScore} scoreType={state.musicPreviewScoreType}/>
  718. </NModal>
  719. </div>
  720. )
  721. }
  722. }
  723. })