music-list.tsx 24 KB

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