xy 1 year ago
parent 215c7b1136
commit 4e2299f553

@ -48,7 +48,7 @@ router.beforeEach(async(to, from, next) => {
}
if (store.state.permission.addRoutes && store.state.permission.addRoutes instanceof Array && store.state.permission.addRoutes.length > 0) {
if (to.path === '/sql/index' && store.state.user.name !== '管理员') {
if (to.path === '/sql/index' && store.state.user.adminId !== 1) {
next(from.path)
return
}

@ -8,7 +8,7 @@
</template>
<template v-else-if="type === 'pdf'">
<iframe :src="url" frameborder="0" style="width: 100%;height: 100%;" />
<VueOfficePdf :src="url" style="height: 100vh;" />
<!-- <VueOfficePdf :src="url" style="height: 100vh;" />-->
</template>
<template v-else-if="['png', 'jpg', 'jpeg', 'gif', 'webp', 'svg'].indexOf(type) !== -1">
<el-image ref="elImage" fit="contain" :preview-src-list="[url]" :src="url" style="width: 100vw;height: 100vh;" alt="" @load="loadImg" />
@ -72,6 +72,8 @@ export default {
this.url = window.decodeURIComponent(this.$route.query.url ?? '')
}
this.type = this.$route.query.type || this.url.split('.').at(-1)
if (this.type === 'pdf') {
}
}
}
}

Loading…
Cancel
Save