From 98e306c9ffa6b8ed54709bee8bb8d49204da38d6 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Wed, 16 Oct 2024 21:19:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=20GiForm=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E4=BB=A3=E7=A0=81=EF=BC=88=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=20GiDemo=20=E6=9B=B4=E6=96=B0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/GiForm/src/GiForm.vue | 261 ++++++++------------------- src/components/GiForm/src/type.ts | 18 +- 2 files changed, 85 insertions(+), 194 deletions(-) diff --git a/src/components/GiForm/src/GiForm.vue b/src/components/GiForm/src/GiForm.vue index 9dd4818..7889a3c 100644 --- a/src/components/GiForm/src/GiForm.vue +++ b/src/components/GiForm/src/GiForm.vue @@ -1,196 +1,30 @@ diff --git a/src/components/GiForm/src/type.ts b/src/components/GiForm/src/type.ts index b58693b..e3c1167 100644 --- a/src/components/GiForm/src/type.ts +++ b/src/components/GiForm/src/type.ts @@ -2,28 +2,32 @@ import type * as A from '@arco-design/web-vue' export type FormType = | 'input' + | 'input-password' + | 'input-number' | 'select' | 'radio-group' | 'checkbox-group' | 'textarea' | 'date-picker' - | 'time-picker' | 'year-picker' | 'quarter-picker' | 'week-picker' | 'range-picker' | 'month-picker' + | 'time-picker' | 'color-picker' - | 'input-number' | 'rate' | 'switch' | 'slider' | 'cascader' | 'tree-select' - | 'input-password' + | 'upload' + | 'group-title' export type ColumnsItemPropsKey = | keyof A.InputInstance['$props'] + | keyof A.InputPasswordInstance['$props'] + | keyof A.InputNumberInstance['$props'] | keyof A.SelectInstance['$props'] | keyof A.TextareaInstance['$props'] | keyof A.DatePickerInstance['$props'] @@ -35,13 +39,14 @@ export type ColumnsItemPropsKey = | keyof A.RangePickerInstance['$props'] | keyof A.RadioGroupInstance['$props'] | keyof A.CheckboxGroupInstance['$props'] - | keyof A.InputNumberInstance['$props'] | keyof A.ColorPickerInstance['$props'] | keyof A.RateInstance['$props'] | keyof A.SwitchInstance['$props'] | keyof A.SliderInstance['$props'] | keyof A.CascaderInstance['$props'] | keyof A.TreeSelectInstance['$props'] + | keyof A.UploadInstance['$props'] + | keyof A.AlertInstance['$props'] export type ColumnsItemHide = boolean | ((form: F) => boolean) export type ColumnsItemDisabled = boolean | ((form: F) => boolean) @@ -71,18 +76,21 @@ export interface ColumnsItem { item?: Omit // a-form-item的props props?: & A.InputInstance['$props'] + & A.InputPasswordInstance['$props'] + & A.InputNumberInstance['$props'] & A.SelectInstance['$props'] & A.TextareaInstance['$props'] & A.DatePickerInstance['$props'] & A.TimePickerInstance['$props'] & A.RadioGroupInstance['$props'] & A.CheckboxGroupInstance['$props'] - & A.InputNumberInstance['$props'] & A.RateInstance['$props'] & A.SwitchInstance['$props'] & A.SliderInstance['$props'] & A.CascaderInstance['$props'] & A.TreeSelectInstance['$props'] + & A.UploadInstance['$props'] + & A.AlertInstance['$props'] rules?: A.FormItemInstance['$props']['rules'] // 表单校验规则 // 下拉列表|复选框组|单选框组|级联选择组件的options options?: -- Gitee From 743bc2f3650f0e6fde2549f069c90b85160e5e59 Mon Sep 17 00:00:00 2001 From: cz176 <1761330201@qq.com> Date: Sun, 27 Oct 2024 10:33:54 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E8=83=BD?= =?UTF-8?q?=E5=8A=9B=E5=BC=80=E6=94=BE=E6=A8=A1=E5=9D=97=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/open/app.ts | 73 ++++++++++ src/views/open/app/AppAddModal.vue | 132 ++++++++++++++++++ src/views/open/app/AppDetailDrawer.vue | 44 ++++++ src/views/open/app/AppGetSecretModal.vue | 60 ++++++++ src/views/open/app/index.vue | 169 +++++++++++++++++++++++ 5 files changed, 478 insertions(+) create mode 100644 src/apis/open/app.ts create mode 100644 src/views/open/app/AppAddModal.vue create mode 100644 src/views/open/app/AppDetailDrawer.vue create mode 100644 src/views/open/app/AppGetSecretModal.vue create mode 100644 src/views/open/app/index.vue diff --git a/src/apis/open/app.ts b/src/apis/open/app.ts new file mode 100644 index 0000000..b26e770 --- /dev/null +++ b/src/apis/open/app.ts @@ -0,0 +1,73 @@ +import http from '@/utils/http' + +const BASE_URL = '/open/app' + +export interface AppResp { + id: string + name: string + appKey: string + status: string + expirationTime: string + appDesc: string + createUserString: string + updateUserString: string +} +export interface AppDetailResp { + id: string + name: string + appKey: string + status: string + expirationTime: string + appDesc: string + createTime: string + updateUser: string + updateTime: string + createUserString: string + updateUserString: string +} +export interface AppQuery { + name: string + appKey: string + sort: Array +} +export interface AppPageQuery extends AppQuery, PageQuery {} + +/** @desc 查询应用列表 */ +export function listApp(query: AppPageQuery) { + return http.get>(`${BASE_URL}`, query) +} + +/** @desc 查询应用详情 */ +export function getApp(id: string) { + return http.get(`${BASE_URL}/${id}`) +} + +/** @desc 新增应用 */ +export function addApp(data: any) { + return http.post(`${BASE_URL}`, data) +} + +/** @desc 修改应用 */ +export function updateApp(data: any, id: string) { + return http.put(`${BASE_URL}/${id}`, data) +} + +/** @desc 删除应用 */ +export function deleteApp(id: string) { + return http.del(`${BASE_URL}/${id}`) +} + +/** @desc 导出应用 */ +export function exportApp(query: AppQuery) { + return http.download(`${BASE_URL}/export`, query) +} + +/** @desc 查看AK */ +export function getAppSecret(id: string) { + return http.get(`${BASE_URL}/${id}/appsecret`) +} + +/** @desc 刷新AK */ +export function refreshAppSecret(id: string) { + return http.get(`${BASE_URL}/${id}/refreshas`) +} diff --git a/src/views/open/app/AppAddModal.vue b/src/views/open/app/AppAddModal.vue new file mode 100644 index 0000000..028e12e --- /dev/null +++ b/src/views/open/app/AppAddModal.vue @@ -0,0 +1,132 @@ + + + diff --git a/src/views/open/app/AppDetailDrawer.vue b/src/views/open/app/AppDetailDrawer.vue new file mode 100644 index 0000000..ebd50c0 --- /dev/null +++ b/src/views/open/app/AppDetailDrawer.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/src/views/open/app/AppGetSecretModal.vue b/src/views/open/app/AppGetSecretModal.vue new file mode 100644 index 0000000..4c28a9b --- /dev/null +++ b/src/views/open/app/AppGetSecretModal.vue @@ -0,0 +1,60 @@ + + + diff --git a/src/views/open/app/index.vue b/src/views/open/app/index.vue new file mode 100644 index 0000000..8514dc9 --- /dev/null +++ b/src/views/open/app/index.vue @@ -0,0 +1,169 @@ + + + + + -- Gitee