addMusic.tsx 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778
  1. import { defineComponent, h, onMounted, reactive, ref } from 'vue'
  2. import SaveForm from '@components/save-form'
  3. import {
  4. DataTableColumns,
  5. DataTableRowKey,
  6. NButton,
  7. NCascader,
  8. NDataTable,
  9. NFormItem,
  10. NIcon,
  11. NImage,
  12. NInput,
  13. NInputNumber,
  14. NSelect,
  15. NSpace,
  16. NStep,
  17. NSteps,
  18. useDialog,
  19. useMessage
  20. } from 'naive-ui'
  21. import Pagination from '@components/pagination'
  22. import { getMapValueByKey, getSelectDataFromObj } from '@/utils/objectUtil'
  23. import {appKey, musicSheetPaymentType, musicSheetSourceType, musicSheetType} from '@/utils/constant'
  24. import {musicSheetApplicationExtendCategoryList, musicSheetApplicationExtendSaveBatch, musicSheetApplicationOwnerList, musicSheetPage} from '@views/music-library/api'
  25. import deepClone from '@/utils/deep.clone'
  26. import { getOwnerName } from '@views/music-library/musicUtil'
  27. import TheTooltip from '@/components/TheTooltip'
  28. import {sysApplicationPage} from "@views/menu-manage/api";
  29. export default defineComponent({
  30. name: 'gym-addMusic',
  31. props: {
  32. appId: {
  33. type: String,
  34. required: true
  35. },
  36. subjectList: {
  37. type: Array,
  38. default: () => []
  39. },
  40. musicSheetCategories: {
  41. type: Array,
  42. default: () => []
  43. }
  44. },
  45. emits: ['close', 'getList'],
  46. setup(props, { slots, attrs, emit }) {
  47. const dialogs = useDialog()
  48. const message = useMessage()
  49. const state = reactive({
  50. loading: false,
  51. pagination: {
  52. page: 1,
  53. rows: 5,
  54. pageTotal: 0
  55. },
  56. stepPagination: {
  57. page: 1,
  58. rows: 5,
  59. pageTotal: 0
  60. },
  61. searchForm: {
  62. keyword: null,
  63. musicSheetType: null,
  64. subjectId: null,
  65. sourceType: null,
  66. composer : null,
  67. userId : null,
  68. applicationId : null,
  69. },
  70. subjectList: [] as any,
  71. showAdd: false,
  72. currentStep: 1,
  73. dataList: [],
  74. selectRowData: [] as any, // 选择的数据列表
  75. musicSheetCategories: [] as any,
  76. startSortNum: null as any, // 排序起始值
  77. projectMusicCategoryId: null as any, // 曲目分类ID
  78. globalPaymentType: null as any, //收费方式
  79. userIdDisable: true,
  80. userIdData: [] as any,
  81. useProjectData: [] as any, // 适用项目行数据
  82. })
  83. onMounted(async () => {
  84. state.searchForm.keyword = null
  85. state.searchForm.musicSheetType = null
  86. state.searchForm.subjectId = null
  87. state.searchForm.sourceType = null
  88. state.searchForm.composer = null
  89. state.searchForm.userId = null
  90. state.searchForm.applicationId = null
  91. state.loading = true
  92. state.subjectList = props.subjectList
  93. // state.musicSheetCategories = props.musicSheetCategories
  94. //加载曲目分类列表
  95. try {
  96. const {data} = await musicSheetApplicationExtendCategoryList({
  97. applicationIds: props.appId
  98. })
  99. if (data && data.length > 0) {
  100. state.musicSheetCategories = data[0].musicSheetCategories
  101. }
  102. } catch {
  103. }
  104. await initUseAppList()
  105. await getList()
  106. })
  107. const initUseAppList = async () => {
  108. try {
  109. const appKeys = Object.keys(appKey)
  110. const { data } = await sysApplicationPage({ page: 1, rows: 999 })
  111. const tempList = data.rows || []
  112. state.useProjectData = []
  113. const filter = tempList.filter((next: any) => {
  114. return appKeys.includes(next.appKey)
  115. })
  116. filter.forEach((item: any) => {
  117. state.useProjectData.push({
  118. ...item,
  119. label: item.appName,
  120. value: item.id
  121. })
  122. })
  123. } catch {}
  124. }
  125. const updateUserIdData = async (sourceType: any) => {
  126. if (!state.searchForm.applicationId) {
  127. return
  128. }
  129. state.userIdData = []
  130. state.searchForm.userId = null
  131. if (sourceType && sourceType !== 'PLATFORM') {
  132. const { data } = await musicSheetApplicationOwnerList({
  133. page: 1,
  134. rows: 9999,
  135. sourceType: sourceType,
  136. applicationId: state.searchForm.applicationId
  137. })
  138. const temp = data.rows || []
  139. temp.forEach((next: any) => {
  140. state.userIdData.push({
  141. ...next,
  142. label: sourceType === 'PERSON' ? next.userName : next.organizationRole,
  143. value: sourceType === 'PERSON' ? next.userId : next.organizationRoleId
  144. })
  145. })
  146. }
  147. }
  148. const getList = async () => {
  149. try {
  150. state.loading = true
  151. const sourceType = state.searchForm.sourceType
  152. const { data } = await musicSheetPage({
  153. ...state.pagination,
  154. ...state.searchForm,
  155. userId: (sourceType && sourceType === 'PERSON') ? state.searchForm.userId : null,
  156. organizationRoleId: (sourceType && sourceType === 'ORG') ? state.searchForm.userId : null,
  157. addAppId: props.appId
  158. })
  159. state.pagination.pageTotal = Number(data.total)
  160. state.dataList = data.rows || []
  161. } catch {}
  162. state.loading = false
  163. }
  164. const saveForm = ref()
  165. const onSearch = () => {
  166. saveForm.value?.submit()
  167. }
  168. const onBtnReset = () => {
  169. saveForm.value?.reset()
  170. }
  171. const onSubmit = () => {
  172. state.pagination.page = 1
  173. getList()
  174. }
  175. const onSave = async () => {
  176. if (state.selectRowData.length == 0) {
  177. message.error('未选择曲目')
  178. return
  179. }
  180. const params = [] as any[]
  181. for (let i = 0; i < state.selectRowData.length; i++) {
  182. const item = state.selectRowData[i]
  183. if (!item.projectMusicCategoryId) {
  184. message.error('曲目分类不能为空')
  185. return
  186. }
  187. if (item.sortNo === null || item.sortNo === undefined || item.sortNo === '') {
  188. message.error('排序号不能为空')
  189. return
  190. }
  191. params.push({
  192. ...item,
  193. musicSheetId: item.id,
  194. musicSheetCategoryId: item.projectMusicCategoryId,
  195. applicationId: props.appId,
  196. id: null
  197. })
  198. }
  199. const res = (await musicSheetApplicationExtendSaveBatch(params)) as any
  200. if (res && res.code == '200') {
  201. message.success(`添加成功`)
  202. emit('getList')
  203. emit('close')
  204. }
  205. }
  206. const columnsField = [
  207. {
  208. type: 'selection'
  209. },
  210. {
  211. title: '曲目编号',
  212. key: 'id'
  213. },
  214. {
  215. title: '封面图',
  216. key: 'titleImg',
  217. render(row: any) {
  218. return <NImage width={40} height={40} src={row.musicCover} />
  219. }
  220. },
  221. {
  222. title: '声部',
  223. key: 'subjectNames',
  224. render: (row: any) => {
  225. return <TheTooltip content={row.subjectNames}/>
  226. }
  227. },
  228. {
  229. title: '曲目名称',
  230. key: 'name'
  231. },
  232. {
  233. title: '音乐人',
  234. key: 'composer'
  235. },
  236. {
  237. title: '多声轨渲染',
  238. key: 'musicSheetType',
  239. render: (row: any) => {
  240. return (
  241. <div>
  242. {getMapValueByKey(row.musicSheetType, new Map(Object.entries(musicSheetType)))}
  243. </div>
  244. )
  245. }
  246. },
  247. {
  248. title: '曲目来源',
  249. key: 'sourceType',
  250. render(row: any) {
  251. return getMapValueByKey(row.sourceType, new Map(Object.entries(musicSheetSourceType)))
  252. }
  253. },
  254. {
  255. title: '所属人',
  256. key: 'userName',
  257. width: 200,
  258. render: (row: any) => {
  259. return <TheTooltip content={getOwnerName(row.musicSheetExtend, row.sourceType)} />
  260. }
  261. }
  262. ]
  263. const columns = (): any => {
  264. return columnsField
  265. }
  266. const stepColumns = (): DataTableColumns => {
  267. const field = deepClone(columnsField)
  268. field.splice(0, 1)
  269. field.push({
  270. title(column: any) {
  271. return (
  272. <NSpace>
  273. 曲目分类
  274. <NButton
  275. type="primary"
  276. size="small"
  277. text
  278. onClick={() => {
  279. dialogs.create({
  280. title: '请选择曲目分类',
  281. showIcon: false,
  282. content: () => {
  283. return h(
  284. 'div',
  285. {
  286. class: 'flex flex-col justify-center items-center text-14px'
  287. },
  288. [
  289. // icon
  290. h(NCascader, {
  291. onUpdateValue(v) {
  292. state.projectMusicCategoryId = v
  293. },
  294. valueField: 'id',
  295. labelField: 'name',
  296. childrenField: 'children',
  297. placeholderField: '请选择曲目分类',
  298. filterable: true,
  299. options: state.musicSheetCategories
  300. })
  301. ]
  302. )
  303. },
  304. positiveText: '确定',
  305. negativeText: '取消',
  306. onPositiveClick: () => {
  307. for (let i = 0; i < state.selectRowData.length; i++) {
  308. const item = state.selectRowData[i]
  309. item.projectMusicCategoryId = state.projectMusicCategoryId
  310. }
  311. }
  312. })
  313. }}
  314. >
  315. <NIcon size={15} style="padding-left: 5px;margin-top:4px">
  316. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
  317. <path d="M2 26h28v2H2z" fill="currentColor"></path>
  318. <path
  319. 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"
  320. fill="currentColor"
  321. ></path>
  322. </svg>
  323. </NIcon>
  324. </NButton>
  325. </NSpace>
  326. )
  327. },
  328. key: 'projectMusicCategoryId',
  329. width: 200,
  330. render: (row: any) => {
  331. // })
  332. return (
  333. <NCascader
  334. valueField="id"
  335. labelField="name"
  336. children-field="children"
  337. placeholder="请选择曲目分类"
  338. value={row.projectMusicCategoryId}
  339. options={state.musicSheetCategories}
  340. onUpdateValue={(value: any) => {
  341. row.projectMusicCategoryId = value
  342. }}
  343. filterable
  344. clearable
  345. />
  346. )
  347. }
  348. })
  349. field.push({
  350. title(column: any) {
  351. return (
  352. <NSpace>
  353. 收费方式
  354. <NButton
  355. type="primary"
  356. size="small"
  357. text
  358. onClick={() => {
  359. dialogs.create({
  360. title: '请选择收费方式',
  361. showIcon: false,
  362. content: () => {
  363. return h(
  364. 'div',
  365. {
  366. class: 'flex flex-col justify-center items-center text-14px'
  367. },
  368. [
  369. h(NSelect, {
  370. onUpdateValue(v) {
  371. state.globalPaymentType = v
  372. },
  373. clearable: true,
  374. options: [
  375. {
  376. label:'免费',
  377. value:'FREE'
  378. },
  379. {
  380. label:'收费',
  381. value:'VIP'
  382. }
  383. ]
  384. })
  385. ]
  386. )
  387. },
  388. positiveText: '确定',
  389. negativeText: '取消',
  390. onPositiveClick: () => {
  391. for (let i = 0; i < state.selectRowData.length; i++) {
  392. const item = state.selectRowData[i]
  393. item.paymentType = state.globalPaymentType
  394. }
  395. }
  396. })
  397. }}
  398. >
  399. <NIcon size={15} style="padding-left: 5px;margin-top:4px">
  400. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
  401. <path d="M2 26h28v2H2z" fill="currentColor"></path>
  402. <path
  403. 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"
  404. fill="currentColor"
  405. ></path>
  406. </svg>
  407. </NIcon>
  408. </NButton>
  409. </NSpace>
  410. )
  411. },
  412. key: 'paymentType',
  413. width: 200,
  414. render: (row: any) => {
  415. return (
  416. <NSelect
  417. placeholder="请选择收费方式"
  418. value={row.paymentType}
  419. options={[
  420. {
  421. label:'免费',
  422. value:'FREE'
  423. },
  424. {
  425. label:'收费',
  426. value:'VIP'
  427. }
  428. ]}
  429. clearable
  430. onUpdateValue={(value) => {
  431. row['paymentType'] = value
  432. }}
  433. />
  434. )
  435. }
  436. })
  437. field.push({
  438. title(column: any) {
  439. return (
  440. <NSpace>
  441. 排序
  442. <NButton
  443. type="primary"
  444. size="small"
  445. text
  446. onClick={() => {
  447. dialogs.create({
  448. title: '请输入排序起始值',
  449. showIcon: false,
  450. content: () => {
  451. return h(
  452. 'div',
  453. {
  454. class: 'flex flex-col justify-center items-center text-14px'
  455. },
  456. [
  457. // icon
  458. h(NInputNumber, {
  459. onUpdateValue(v) {
  460. state.startSortNum = v
  461. },
  462. min: 0,
  463. max: 9999
  464. })
  465. ]
  466. )
  467. },
  468. positiveText: '确定',
  469. negativeText: '取消',
  470. onPositiveClick: () => {
  471. if (state.startSortNum) {
  472. for (let i = 0; i < state.selectRowData.length; i++) {
  473. const item = state.selectRowData[i]
  474. item.sortNo = state.startSortNum + i
  475. }
  476. }
  477. }
  478. })
  479. }}
  480. >
  481. <NIcon size={15} style="padding-left: 5px;margin-top:4px">
  482. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
  483. <path d="M2 26h28v2H2z" fill="currentColor"></path>
  484. <path
  485. 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"
  486. fill="currentColor"
  487. ></path>
  488. </svg>
  489. </NIcon>
  490. </NButton>
  491. </NSpace>
  492. )
  493. },
  494. key: 'sortNo',
  495. width: 150,
  496. render: (row: any) => {
  497. return h(NInputNumber, {
  498. value: row.sortNo,
  499. min: 0,
  500. max: 9999,
  501. onUpdateValue(value: any) {
  502. row.sortNo = value
  503. }
  504. })
  505. }
  506. })
  507. field.push({
  508. title: '操作',
  509. key: 'operation',
  510. fixed: 'right',
  511. render(row: any) {
  512. return (
  513. <NSpace>
  514. <NButton
  515. type="primary"
  516. size="small"
  517. text
  518. //v-auth="musicSheet/update1602302618558099458"
  519. onClick={() => {
  520. dialogs.warning({
  521. title: '提示',
  522. content: `是否删除该数据?`,
  523. positiveText: '确定',
  524. negativeText: '取消',
  525. onPositiveClick: async () => {
  526. try {
  527. const index = state.selectRowData.findIndex((item: any) => {
  528. if (item.id == row.id) {
  529. return true
  530. }
  531. })
  532. if (index > -1) {
  533. state.selectRowData.splice(index, 1)
  534. }
  535. const index1 = checkedRowKeysRef.value.findIndex((item: any) => {
  536. if (item == row.id) {
  537. return true
  538. }
  539. })
  540. if (index1 > -1) {
  541. checkedRowKeysRef.value.splice(index, 1)
  542. }
  543. } catch {}
  544. }
  545. })
  546. }}
  547. >
  548. 移除
  549. </NButton>
  550. </NSpace>
  551. )
  552. }
  553. })
  554. return field
  555. }
  556. const checkedRowKeysRef = ref<DataTableRowKey[]>([])
  557. const handleCheck = (rowKeys: DataTableRowKey[]) => {
  558. checkedRowKeysRef.value = rowKeys
  559. // 添加行更新值
  560. state.dataList.forEach((next: any) => {
  561. if (checkedRowKeysRef.value.includes(next.id)) {
  562. const find = state.selectRowData.find((row: any) => {
  563. return row.id === next.id
  564. })
  565. if (!find) {
  566. state.selectRowData.push(next)
  567. }
  568. }
  569. })
  570. // 去掉行更新值
  571. state.selectRowData = state.selectRowData.filter((next: any) => {
  572. return checkedRowKeysRef.value.includes(next.id)
  573. })
  574. }
  575. return () => {
  576. return (
  577. <div class="system-menu-container">
  578. <NSpace vertical size="medium">
  579. <NSteps
  580. current={state.currentStep}
  581. // onUpdateCurrent={()=>{
  582. // state.currentStep = val
  583. // }}
  584. style={'margin-bottom: 10px;margin-top: 10px'}
  585. >
  586. <NStep title="选择曲目" description=""></NStep>
  587. <NStep title="设置曲目信息" description=""></NStep>
  588. </NSteps>
  589. </NSpace>
  590. {state.currentStep === 1 && (
  591. <div class="system-menu-container">
  592. <SaveForm
  593. ref={saveForm}
  594. model={state.searchForm}
  595. onSubmit={onSubmit}
  596. // saveKey="cooleshow-edu-addMusic"
  597. onSetModel={(val: any) => (state.searchForm = val)}
  598. >
  599. <NFormItem label="关键词" path="keyword">
  600. <NInput
  601. v-model:value={state.searchForm.keyword}
  602. placeholder="请输入曲目名称/编号"
  603. clearable
  604. />
  605. </NFormItem>
  606. <NFormItem label="多声轨渲染" path="musicSheetType">
  607. <NSelect
  608. placeholder="请选择多声轨渲染"
  609. v-model:value={state.searchForm.musicSheetType}
  610. options={getSelectDataFromObj(musicSheetType)}
  611. clearable
  612. />
  613. </NFormItem>
  614. <NFormItem label="可用声部" path="musicSubject">
  615. <NSelect
  616. placeholder="请选择可用声部"
  617. v-model:value={state.searchForm.subjectId}
  618. options={state.subjectList}
  619. clearable
  620. />
  621. </NFormItem>
  622. <NFormItem label="音乐人" path="composer">
  623. <NInput
  624. placeholder="请选择音乐人"
  625. v-model:value={state.searchForm.composer}
  626. clearable
  627. />
  628. </NFormItem>
  629. <NFormItem label="曲目来源" path="sourceType">
  630. <NSelect
  631. placeholder="请选择曲目来源"
  632. v-model:value={state.searchForm.sourceType}
  633. options={getSelectDataFromObj(musicSheetSourceType)}
  634. onUpdateValue={async (value: any) => {
  635. state.userIdData = []
  636. state.searchForm.userId = null
  637. if (value && value !== 'PLATFORM') {
  638. await updateUserIdData(value)
  639. state.userIdDisable = false
  640. } else {
  641. state.userIdDisable = true
  642. }
  643. }}
  644. clearable
  645. />
  646. </NFormItem>
  647. <NFormItem label="所属项目" path="applicationId">
  648. <NSelect
  649. placeholder="请选择所属项目"
  650. v-model:value={state.searchForm.applicationId}
  651. options={state.useProjectData}
  652. clearable
  653. onUpdateValue={async (value: any) => {
  654. state.searchForm.applicationId = value
  655. if (value) {
  656. await updateUserIdData(state.searchForm.sourceType)
  657. state.userIdDisable = !(
  658. state.searchForm.sourceType && state.searchForm.sourceType !== 'PLATFORM'
  659. )
  660. } else {
  661. state.searchForm.userId = null
  662. state.userIdDisable = true
  663. state.userIdData = []
  664. }
  665. }}
  666. />
  667. </NFormItem>
  668. <NFormItem label="所属人" path="author">
  669. <NSelect
  670. filterable
  671. placeholder="请选择所属人"
  672. disabled={state.userIdDisable || (!state.searchForm.applicationId && !state.searchForm.sourceType)}
  673. v-model:value={state.searchForm.userId}
  674. options={state.userIdData}
  675. clearable
  676. ></NSelect>
  677. </NFormItem>
  678. <NFormItem>
  679. <NSpace>
  680. <NButton type="primary" onClick={onSearch}>
  681. 搜索
  682. </NButton>
  683. <NButton type="default" onClick={onBtnReset}>
  684. 重置
  685. </NButton>
  686. </NSpace>
  687. </NFormItem>
  688. </SaveForm>
  689. <p style={{ paddingBottom: '12px' }}>
  690. 你选择了<span style={'color:red;padding:0 8px'}>{state.selectRowData.length}</span>
  691. 条曲目
  692. </p>
  693. <NDataTable
  694. loading={state.loading}
  695. columns={columns()}
  696. data={state.dataList}
  697. rowKey={(row: any) => row.id}
  698. onUpdateCheckedRowKeys={handleCheck}
  699. ></NDataTable>
  700. <Pagination
  701. v-model:page={state.pagination.page}
  702. v-model:pageSize={state.pagination.rows}
  703. v-model:pageTotal={state.pagination.pageTotal}
  704. onList={getList}
  705. sync
  706. // saveKey="cooleshow-edu-addMusic"
  707. ></Pagination>
  708. </div>
  709. )}
  710. {state.currentStep === 2 && (
  711. <div class="system-menu-container" style={'margin-top: 15px;'}>
  712. <NDataTable
  713. loading={state.loading}
  714. columns={stepColumns()}
  715. data={state.selectRowData}
  716. rowKey={(row: any) => row.id}
  717. maxHeight={500}
  718. scrollX={1800}
  719. ></NDataTable>
  720. </div>
  721. )}
  722. <NSpace justify="end" style={'margin-top:10px'}>
  723. <NButton
  724. type="default"
  725. onClick={() => {
  726. if (state.currentStep > 1) {
  727. state.currentStep = state.currentStep - 1
  728. } else {
  729. emit('close')
  730. }
  731. }}
  732. >
  733. {state.currentStep === 1 ? '取消' : '上一步'}
  734. </NButton>
  735. <NButton
  736. type="primary"
  737. onClick={() => {
  738. if (state.currentStep < 2) {
  739. if (state.selectRowData.length == 0) {
  740. message.warning('请选择曲目')
  741. return
  742. }
  743. state.currentStep = state.currentStep + 1
  744. } else {
  745. onSave()
  746. }
  747. }}
  748. // loading={btnLoading.value}
  749. // disabled={btnLoading.value}
  750. >
  751. {state.currentStep === 2 ? '确定' : '下一步'}
  752. </NButton>
  753. </NSpace>
  754. </div>
  755. )
  756. }
  757. }
  758. })