music-sheet-klx.tsx 25 KB

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