music-sheet-klx_jg.tsx 24 KB

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