map/ui/dasadmin/src/utils/directive.ts
高云鹏 bf702e66bf 单风机:添加温度跳转提示,添加权限
实时数据:选择测点显示逻辑修改
设备:添加权限,附属属性添加,文件添加
2024-12-26 18:01:09 +08:00

21 lines
538 B
TypeScript

import { useAdminInfo } from '/@/stores/adminInfo'
const authorityStore = useAdminInfo()
export const permission = () => {
return {
mounted: (el: any, binding: { value: number[] }) => {
let hasShow = false
for (let item of binding.value) {
if (authorityStore.authorities.includes(item)) {
hasShow = true
break
}
}
if (!hasShow) {
el.style.display = 'none'
}
}
}
}