import pinia from '~src/store/init' import { useAppStore } from '~src/store' import { decode, encode } from 'js-base64' import { getObjVal, isNullES } from 'js-fast-way' import { fullDrawer } from 'hc-vue3-ui' //初始变量 const store = useAppStore(pinia) // 按钮权限 export const btnAuth = (key) => { try { const info = store.getButtonsVal(key) return !!getObjVal(info) } catch { return false } } // 跳转到PDF页面 export const toPdfPage = (url) => { if (isNullES(url)) { window.$message.warning('pdf地址为空') return } fullDrawer({ type: 'url', content: '/#/pdf?url=' + url, }).then() //window.open('/#/pdf?code=' + encode(url), '_blank') } export { encode, decode }