diff --git a/ui/src/enums/model.ts b/ui/src/enums/model.ts new file mode 100644 index 000000000..342f0ccb9 --- /dev/null +++ b/ui/src/enums/model.ts @@ -0,0 +1,8 @@ +export enum PermissionType { + PRIVATE = '私有', + PUBLIC = '公用' +} +export enum PermissionDesc { + PRIVATE = '仅自己使用', + PUBLIC = '所有用户都可使用,不能编辑' +} diff --git a/ui/src/views/template/component/CreateModelDialog.vue b/ui/src/views/template/component/CreateModelDialog.vue index a4aed1c22..6dd8df67b 100644 --- a/ui/src/views/template/component/CreateModelDialog.vue +++ b/ui/src/views/template/component/CreateModelDialog.vue @@ -59,9 +59,26 @@ - - 私有 - 公用 + + + + + @@ -145,6 +162,7 @@ import type { FormField } from '@/components/dynamics-form/type' import DynamicsForm from '@/components/dynamics-form/index.vue' import type { FormRules } from 'element-plus' import { MsgSuccess } from '@/utils/message' +import { PermissionType, PermissionDesc } from '@/enums/model' const providerValue = ref() const dynamicsFormRef = ref>() diff --git a/ui/src/views/template/component/EditModel.vue b/ui/src/views/template/component/EditModel.vue index 6a8451169..9278906f3 100644 --- a/ui/src/views/template/component/EditModel.vue +++ b/ui/src/views/template/component/EditModel.vue @@ -52,9 +52,26 @@ - - 私有 - 公用 + + + + + @@ -137,7 +154,7 @@ import type { FormField } from '@/components/dynamics-form/type' import DynamicsForm from '@/components/dynamics-form/index.vue' import type { FormRules } from 'element-plus' import { MsgSuccess } from '@/utils/message' -import AppIcon from '@/components/icons/AppIcon.vue' +import { PermissionType, PermissionDesc } from '@/enums/model' const providerValue = ref() const dynamicsFormRef = ref>()