detail.js 1005 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. export const useDetailStore = defineStore('detailStore', () => {
  2. const companyId = ref('')
  3. const menuInfo = ref({
  4. menuIndex : '0',
  5. menuId : 'menu02',
  6. pageRtName : '미디어 관리',
  7. pageStatus : '0',
  8. })
  9. const boardInfo = ref({
  10. seq : '',
  11. pageType : '',
  12. status: '',
  13. })
  14. const adminInfo = ref({
  15. adminId : '',
  16. pageType : ''
  17. })
  18. const getCompanyId = computed(()=>companyId.value)
  19. function setAccountId(payload){
  20. getCompanyId.value = payload
  21. }
  22. function reset() {
  23. companyId.value = ''
  24. menuInfo.value = {
  25. menuIndex : '0',
  26. menuId : 'menu02',
  27. pageRtName : '미디어 관리',
  28. pageStatus : '0',
  29. }
  30. boardInfo.value = {
  31. seq : '',
  32. pageType : '',
  33. status: '',
  34. }
  35. adminInfo.value = {
  36. adminId : '',
  37. pageType : ''
  38. }
  39. }
  40. return {companyId, getCompanyId, menuInfo, boardInfo, setAccountId, adminInfo, reset}
  41. }, {persist: { storage: persistedState.sessionStorage,}})