music-sheet-kt.tsx 25 KB

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