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,7 +14,9 @@ | ||
14 | <template #importType="{ model }"> | 14 | <template #importType="{ model }"> |
15 | <RadioGroup v-model:value="model.importType"> | 15 | <RadioGroup v-model:value="model.importType"> |
16 | <Radio value="2">JSON导入</Radio> | 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 | </RadioGroup> | 20 | </RadioGroup> |
19 | <div v-if="model.importType === '1'" class="absolute -left-28"> | 21 | <div v-if="model.importType === '1'" class="absolute -left-28"> |
20 | <Button @click="handleTemplateDownload" type="link">excel模板下载</Button> | 22 | <Button @click="handleTemplateDownload" type="link">excel模板下载</Button> |
@@ -39,6 +41,7 @@ | @@ -39,6 +41,7 @@ | ||
39 | } from '/@/api/device/modelOfMatter'; | 41 | } from '/@/api/device/modelOfMatter'; |
40 | import { useLoading } from '/@/components/Loading'; | 42 | import { useLoading } from '/@/components/Loading'; |
41 | import { BasicForm, useForm } from '/@/components/Form'; | 43 | import { BasicForm, useForm } from '/@/components/Form'; |
44 | + import { Authority } from '/@/components/Authority'; | ||
42 | 45 | ||
43 | const emits = defineEmits(['register', 'handleImportCSV', 'handleReload']); | 46 | const emits = defineEmits(['register', 'handleImportCSV', 'handleReload']); |
44 | 47 |
@@ -35,11 +35,15 @@ | @@ -35,11 +35,15 @@ | ||
35 | <Button v-if="!record.ifShowClass" type="primary" @click="handleOpenTsl"> | 35 | <Button v-if="!record.ifShowClass" type="primary" @click="handleOpenTsl"> |
36 | 物模型TSL</Button | 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 | <Authority | 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 | <Button type="primary" @click="handleSelectImport">导入物模型</Button> | 48 | <Button type="primary" @click="handleSelectImport">导入物模型</Button> |
45 | </Authority> | 49 | </Authority> |