Commit 3115eba8a249cf53df343f6b8ff0c3bd2f15be4c
Merge branch 'fix/category-rule' into 'main_dev'
fix: 修改产品品类物模型导入导出权限 See merge request yunteng/thingskit-front!1097
Showing
2 changed files
with
12 additions
and
5 deletions
| ... | ... | @@ -14,7 +14,9 @@ |
| 14 | 14 | <template #importType="{ model }"> |
| 15 | 15 | <RadioGroup v-model:value="model.importType"> |
| 16 | 16 | <Radio value="2">JSON导入</Radio> |
| 17 | - <Radio value="1">Excel导入</Radio> | |
| 17 | + <Authority :value="['api:yt:things_model:excel_import']"> | |
| 18 | + <Radio value="1">Excel导入</Radio> | |
| 19 | + </Authority> | |
| 18 | 20 | </RadioGroup> |
| 19 | 21 | <div v-if="model.importType === '1'" class="absolute -left-28"> |
| 20 | 22 | <Button @click="handleTemplateDownload" type="link">excel模板下载</Button> |
| ... | ... | @@ -39,6 +41,7 @@ |
| 39 | 41 | } from '/@/api/device/modelOfMatter'; |
| 40 | 42 | import { useLoading } from '/@/components/Loading'; |
| 41 | 43 | import { BasicForm, useForm } from '/@/components/Form'; |
| 44 | + import { Authority } from '/@/components/Authority'; | |
| 42 | 45 | |
| 43 | 46 | const emits = defineEmits(['register', 'handleImportCSV', 'handleReload']); |
| 44 | 47 | ... | ... |
| ... | ... | @@ -35,11 +35,15 @@ |
| 35 | 35 | <Button v-if="!record.ifShowClass" type="primary" @click="handleOpenTsl"> |
| 36 | 36 | 物模型TSL</Button |
| 37 | 37 | > |
| 38 | - <Button v-else type="primary" @click="handleExport" :loading="loading" | |
| 39 | - >导出物模型</Button | |
| 40 | - > | |
| 38 | + <Authority v-else :value="['api:yt:things_model:category:export']"> | |
| 39 | + <Button type="primary" @click="handleExport" :loading="loading">导出物模型</Button> | |
| 40 | + </Authority> | |
| 41 | 41 | <Authority |
| 42 | - :value="['api:yt:things_model:import', 'api:yt:things_model:category:import']" | |
| 42 | + :value="[ | |
| 43 | + 'api:yt:things_model:import', | |
| 44 | + 'api:yt:things_model:category:import', | |
| 45 | + 'api:yt:things_model:excel_import', | |
| 46 | + ]" | |
| 43 | 47 | > |
| 44 | 48 | <Button type="primary" @click="handleSelectImport">导入物模型</Button> |
| 45 | 49 | </Authority> | ... | ... |