Commit 91b32b01fdbf3096a67d1a53340001be1e92cfc1
Merge branch 'ft_local_dev' into 'main'
fix:修改设备配置default不能删除和编辑 See merge request huang/yun-teng-iot-front!336
Showing
1 changed file
with
6 additions
and
1 deletions
| @@ -61,6 +61,9 @@ | @@ -61,6 +61,9 @@ | ||
| 61 | auth: 'api:yt:deviceProfile:update', | 61 | auth: 'api:yt:deviceProfile:update', |
| 62 | icon: 'clarity:note-edit-line', | 62 | icon: 'clarity:note-edit-line', |
| 63 | onClick: handleEdit.bind(null, record), | 63 | onClick: handleEdit.bind(null, record), |
| 64 | + ifShow: () => { | ||
| 65 | + return record.name !== 'default' ? true : false; | ||
| 66 | + }, | ||
| 64 | }, | 67 | }, |
| 65 | { | 68 | { |
| 66 | label: '导出', | 69 | label: '导出', |
| @@ -78,7 +81,7 @@ | @@ -78,7 +81,7 @@ | ||
| 78 | confirm: handleDeleteOrBatchDelete.bind(null, record), | 81 | confirm: handleDeleteOrBatchDelete.bind(null, record), |
| 79 | }, | 82 | }, |
| 80 | ifShow: () => { | 83 | ifShow: () => { |
| 81 | - return record.default === false; | 84 | + return record.default === false && record.name !== 'default'; |
| 82 | }, | 85 | }, |
| 83 | }, | 86 | }, |
| 84 | ]" | 87 | ]" |
| @@ -171,6 +174,8 @@ | @@ -171,6 +174,8 @@ | ||
| 171 | // Demo:status为1的选择框禁用 | 174 | // Demo:status为1的选择框禁用 |
| 172 | if (record.default === true) { | 175 | if (record.default === true) { |
| 173 | return { disabled: true }; | 176 | return { disabled: true }; |
| 177 | + } else if (record.name == 'default') { | ||
| 178 | + return { disabled: true }; | ||
| 174 | } else { | 179 | } else { |
| 175 | return { disabled: false }; | 180 | return { disabled: false }; |
| 176 | } | 181 | } |