music-sheet-gym.tsx 24 KB

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