Showing
1 changed file
with
10 additions
and
2 deletions
| ... | ... | @@ -88,7 +88,12 @@ |
| 88 | 88 | @change="(checked:boolean)=>hanldeSwitch(checked,record)" |
| 89 | 89 | /> |
| 90 | 90 | </Authority> |
| 91 | - <Authority> 无权限 </Authority> | |
| 91 | + <Tag | |
| 92 | + v-if="!hasPermission(PermissionDataFlowEnum.PERMISSION_STATUS)" | |
| 93 | + :color="record.status ? 'green' : 'red'" | |
| 94 | + > | |
| 95 | + {{ record.status ? '启用' : '禁用' }} | |
| 96 | + </Tag> | |
| 92 | 97 | </template> |
| 93 | 98 | </BasicTable> |
| 94 | 99 | <DataFlowModal @register="registerModal" @success="handleSuccess" /> |
| ... | ... | @@ -106,15 +111,18 @@ |
| 106 | 111 | import { useMessage } from '/@/hooks/web/useMessage'; |
| 107 | 112 | import { Authority } from '/@/components/Authority'; |
| 108 | 113 | import { useBatchDelete } from '/@/hooks/web/useBatchDelete'; |
| 109 | - import { Switch, Popconfirm } from 'ant-design-vue'; | |
| 114 | + import { Switch, Popconfirm, Tag } from 'ant-design-vue'; | |
| 110 | 115 | import { PermissionDataFlowEnum, BusinessDataFlowTextEnum } from './enum'; |
| 111 | 116 | import { DataFlowModal } from './components/dataflowmodal'; |
| 112 | 117 | import { defaultTableAttribute } from './config'; |
| 118 | + import { usePermission } from '/@/hooks/web/usePermission'; | |
| 113 | 119 | |
| 114 | 120 | const { createMessage } = useMessage(); |
| 115 | 121 | |
| 116 | 122 | const loading = ref(true); |
| 117 | 123 | |
| 124 | + const { hasPermission } = usePermission(); | |
| 125 | + | |
| 118 | 126 | const handleSuccess = () => { |
| 119 | 127 | reload(); |
| 120 | 128 | }; | ... | ... |