|
@@ -3,7 +3,6 @@ import Pdfh5 from 'pdfh5'
|
|
|
import 'pdfh5/css/pdfh5.css'
|
|
import 'pdfh5/css/pdfh5.css'
|
|
|
import { snapshoot, download } from '@/api/platform/file/attachment' // 印章,快照
|
|
import { snapshoot, download } from '@/api/platform/file/attachment' // 印章,快照
|
|
|
import ActionUtils from '@/utils/action'
|
|
import ActionUtils from '@/utils/action'
|
|
|
-import store from '@/store'
|
|
|
|
|
|
|
|
|
|
export const preview = (tableForm, url) => {
|
|
export const preview = (tableForm, url) => {
|
|
|
let isMobile = false
|
|
let isMobile = false
|
|
@@ -36,17 +35,15 @@ export const preview = (tableForm, url) => {
|
|
|
},
|
|
},
|
|
|
(tpl) => {
|
|
(tpl) => {
|
|
|
tableForm.dialogTemplate = tpl
|
|
tableForm.dialogTemplate = tpl
|
|
|
- const { role } = store.getters.userInfo || {}
|
|
|
|
|
- // 系统管理角色、检验科主任、检验科副主任、文件管理员、技术负责人、质量负责人可下载打印
|
|
|
|
|
- const hasRole = role.some(item => ['xtgljs', 'syszr', 'jykfzr', 'wjgly', 'jsfzr', 'zlfzr', 'jyy'].includes(item.alias))
|
|
|
|
|
- if (1 || hasRole) {
|
|
|
|
|
|
|
+ const hasHighRole = localStorage.getItem('hasHighRole') === '1'
|
|
|
|
|
+ if (hasHighRole) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
const toolbarCover = document.createElement('div')
|
|
const toolbarCover = document.createElement('div')
|
|
|
toolbarCover.classList.add('toolbar-cover')
|
|
toolbarCover.classList.add('toolbar-cover')
|
|
|
toolbarCover.addEventListener('click', () => {
|
|
toolbarCover.addEventListener('click', () => {
|
|
|
- confirm('无权操作,请联系管理员开放相关权限!', '提示')
|
|
|
|
|
|
|
+ confirm('无权操作,请联系系统管理员!', '提示')
|
|
|
})
|
|
})
|
|
|
document.querySelector('.btn-cover').children[1].appendChild(toolbarCover)
|
|
document.querySelector('.btn-cover').children[1].appendChild(toolbarCover)
|
|
|
}, 1000)
|
|
}, 1000)
|