import {defineComponent, onMounted, reactive, ref} from "vue"; import SaveForm from "@components/save-form"; import {NButton, NDataTable, NDatePicker, NDescriptions, NDescriptionsItem, NFormItem, NImage, NInput, NModal, NSelect, NSpace, NStep, NSteps} from "naive-ui"; import Pagination from "@components/pagination"; import TheTooltip from "@components/TheTooltip"; export default defineComponent({ name: 'project-music-sheet-mec', setup(props, {slots, attrs, emit}) { const state = reactive({ loading: false, pagination: { page: 1, rows: 10, pageTotal: 0 }, searchForm: { keyword: null, subjectType: null, musicSubject: null, status: null }, subjectList: [], showAdd: false, currentStep: 1, dataList: [] }) onMounted(() => { }) const saveForm = ref() const onSearch = () => { saveForm.value?.submit() } const onBtnReset = () => { saveForm.value?.reset() } const onSubmit = () => { } const columns = (): any => { return [ { title: '曲目信息', key: 'id', render: (row: any) => ( <> {' '} {row.id} ) }, { title: '封面图', key: 'titleImg', render(row: any) { return } }, { title: '声部', key: 'titleImg', }, { title: '曲目名称', key: 'titleImg', }, { title: '音乐人', key: 'titleImg', }, { title: '曲目类型', key: 'titleImg', }, { title: '作者属性', key: 'titleImg', }, { title: '所属人', key: 'titleImg', }, { title: '操作', key: 'operation', fixed: 'right', render(row: any) { return ( onChangeStatus(row)} > {row.status ? '停用' : '启用'} { // state.visiableMusic = true // state.musicOperation = 'edit' // state.musicData = row }} > 修改 ) } } ] } const updateCurrent = (val: any) => { state.currentStep = val } return () => { return (
{state.currentStep === 1 && ( )} {state.currentStep === 2 && (
搜索 重置
)} {state.currentStep === 3 && (
)} { if (state.currentStep > 1) { state.currentStep = state.currentStep - 1; } else { emit('close') } }}> {state.currentStep === 1 ? '取消' : '上一步'} { if (state.currentStep < 3) { state.currentStep = state.currentStep + 1; } else { onSubmit() } }} // loading={btnLoading.value} // disabled={btnLoading.value} > {state.currentStep === 3 ? '确定' : '下一步'}
) } } })