1 |
- import{da as t,du as s,dv as i}from"./index-779ffae6.js";const o=t("catch-store",{state:()=>({bookVersionList:[],musicTypeList:[],subjectList:[]}),getters:{getBookVersion(){return this.bookVersionList},getMusicCategories(){return this.musicTypeList},getAllMusicCategories(){return[{name:"全部",id:null},...this.musicTypeList]},getSubjectList(){return this.subjectList},getSubjectAllList(){return[{name:"全部",id:null},...this.subjectList]}},actions:{setBookVersion(e){this.bookVersionList=e},setMusicCategories(e){this.musicTypeList=e},setSubjects(e){this.subjectList=e},async getSubjects(){try{if(this.getSubjectList&&this.getSubjectList.length>0)return Promise.resolve();const{data:e}=await s({enableFlag:!0,delFlag:0,page:1,rows:999});return this.setSubjects(e.rows||[]),Promise.resolve()}catch(e){return Promise.reject(e)}},async getMusicSheetCategory(){try{if(this.getMusicCategories&&this.getMusicCategories.length>0)return Promise.resolve();const{data:e}=await i({enable:!0,page:1,rows:999});return this.setMusicCategories(e.rows||[]),Promise.resolve()}catch(e){return Promise.reject(e)}}}});export{o as u};
|