Showing
1 changed file
with
10 additions
and
2 deletions
| @@ -88,7 +88,12 @@ | @@ -88,7 +88,12 @@ | ||
| 88 | @change="(checked:boolean)=>hanldeSwitch(checked,record)" | 88 | @change="(checked:boolean)=>hanldeSwitch(checked,record)" |
| 89 | /> | 89 | /> |
| 90 | </Authority> | 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 | </template> | 97 | </template> |
| 93 | </BasicTable> | 98 | </BasicTable> |
| 94 | <DataFlowModal @register="registerModal" @success="handleSuccess" /> | 99 | <DataFlowModal @register="registerModal" @success="handleSuccess" /> |
| @@ -106,15 +111,18 @@ | @@ -106,15 +111,18 @@ | ||
| 106 | import { useMessage } from '/@/hooks/web/useMessage'; | 111 | import { useMessage } from '/@/hooks/web/useMessage'; |
| 107 | import { Authority } from '/@/components/Authority'; | 112 | import { Authority } from '/@/components/Authority'; |
| 108 | import { useBatchDelete } from '/@/hooks/web/useBatchDelete'; | 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 | import { PermissionDataFlowEnum, BusinessDataFlowTextEnum } from './enum'; | 115 | import { PermissionDataFlowEnum, BusinessDataFlowTextEnum } from './enum'; |
| 111 | import { DataFlowModal } from './components/dataflowmodal'; | 116 | import { DataFlowModal } from './components/dataflowmodal'; |
| 112 | import { defaultTableAttribute } from './config'; | 117 | import { defaultTableAttribute } from './config'; |
| 118 | + import { usePermission } from '/@/hooks/web/usePermission'; | ||
| 113 | 119 | ||
| 114 | const { createMessage } = useMessage(); | 120 | const { createMessage } = useMessage(); |
| 115 | 121 | ||
| 116 | const loading = ref(true); | 122 | const loading = ref(true); |
| 117 | 123 | ||
| 124 | + const { hasPermission } = usePermission(); | ||
| 125 | + | ||
| 118 | const handleSuccess = () => { | 126 | const handleSuccess = () => { |
| 119 | reload(); | 127 | reload(); |
| 120 | }; | 128 | }; |