Showing
1 changed file
with
12 additions
and
9 deletions
| @@ -29,18 +29,21 @@ | @@ -29,18 +29,21 @@ | ||
| 29 | icon: 'ant-design:font-size-outlined', | 29 | icon: 'ant-design:font-size-outlined', |
| 30 | auth: 'api:yt:js:test', | 30 | auth: 'api:yt:js:test', |
| 31 | onClick: handleBindTest.bind(null, record), | 31 | onClick: handleBindTest.bind(null, record), |
| 32 | + ifShow: record.status == 0, | ||
| 32 | }, | 33 | }, |
| 33 | { | 34 | { |
| 34 | label: '编辑', | 35 | label: '编辑', |
| 35 | icon: 'clarity:note-edit-line', | 36 | icon: 'clarity:note-edit-line', |
| 36 | auth: 'api:yt:js:update', | 37 | auth: 'api:yt:js:update', |
| 37 | onClick: handleCreateOrEdit.bind(null, record), | 38 | onClick: handleCreateOrEdit.bind(null, record), |
| 39 | + ifShow: record.status == 0, | ||
| 38 | }, | 40 | }, |
| 39 | { | 41 | { |
| 40 | label: '删除', | 42 | label: '删除', |
| 41 | icon: 'ant-design:delete-outlined', | 43 | icon: 'ant-design:delete-outlined', |
| 42 | auth: 'api:yt:js:delete', | 44 | auth: 'api:yt:js:delete', |
| 43 | color: 'error', | 45 | color: 'error', |
| 46 | + ifShow: record.status == 0, | ||
| 44 | popConfirm: { | 47 | popConfirm: { |
| 45 | title: '是否确认删除', | 48 | title: '是否确认删除', |
| 46 | confirm: handleDeleteOrBatchDelete.bind(null, record), | 49 | confirm: handleDeleteOrBatchDelete.bind(null, record), |
| @@ -50,16 +53,16 @@ | @@ -50,16 +53,16 @@ | ||
| 50 | /> | 53 | /> |
| 51 | </template> | 54 | </template> |
| 52 | <template #status="{ record }"> | 55 | <template #status="{ record }"> |
| 53 | - <Switch | ||
| 54 | - :checked="record.status === 1" | ||
| 55 | - :loading="record.pendingStatus" | ||
| 56 | - checkedChildren="启用" | ||
| 57 | - unCheckedChildren="禁用" | ||
| 58 | - @change="(checked:boolean)=>statusChange(checked,record)" | ||
| 59 | - /> | 56 | + <Authority value="api:yt:js:update:status"> |
| 57 | + <Switch | ||
| 58 | + :checked="record.status === 1" | ||
| 59 | + :loading="record.pendingStatus" | ||
| 60 | + checkedChildren="启用" | ||
| 61 | + unCheckedChildren="禁用" | ||
| 62 | + @change="(checked:boolean)=>statusChange(checked,record)" | ||
| 63 | + /> | ||
| 64 | + </Authority> | ||
| 60 | </template> | 65 | </template> |
| 61 | - <!-- <Authority value="api:yt:js:update:status"> | ||
| 62 | - </Authority> --> | ||
| 63 | </BasicTable> | 66 | </BasicTable> |
| 64 | <ConverScriptModal @register="registerModal" @success="handleSuccess" /> | 67 | <ConverScriptModal @register="registerModal" @success="handleSuccess" /> |
| 65 | </div> | 68 | </div> |