From 78e423cc50bf6792a35421d844b0a49cb4faafb7 Mon Sep 17 00:00:00 2001 From: 100011797 <2642441182@qq.com> Date: Tue, 10 Jan 2023 18:30:05 +0800 Subject: [PATCH 01/13] =?UTF-8?q?feat:=20=E8=A1=A8=E6=A0=BC=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Table/index.vue | 96 ++++++++++++++++++++++++++++------ src/views/demo/table/index.vue | 12 +++-- 2 files changed, 90 insertions(+), 18 deletions(-) diff --git a/src/components/Table/index.vue b/src/components/Table/index.vue index 9b21c30c..c921bd97 100644 --- a/src/components/Table/index.vue +++ b/src/components/Table/index.vue @@ -4,17 +4,17 @@
-
-
+
+
-
+
-
+
- + + +
@@ -49,14 +63,17 @@ From d682234293d68ddae95b91bf6a6793eeef7e6269 Mon Sep 17 00:00:00 2001 From: 100011797 <2642441182@qq.com> Date: Wed, 11 Jan 2023 10:01:28 +0800 Subject: [PATCH 02/13] fix: merge --- src/components/Table/index.vue | 44 ++++++++++++++++++---------------- src/views/demo/table/index.vue | 31 ++++++++++++++---------- 2 files changed, 42 insertions(+), 33 deletions(-) diff --git a/src/components/Table/index.vue b/src/components/Table/index.vue index c921bd97..c7143149 100644 --- a/src/components/Table/index.vue +++ b/src/components/Table/index.vue @@ -53,8 +53,13 @@
@@ -135,33 +140,30 @@ const modelChange = (type: keyof typeof ModelEnum) => { // 请求数据 const handleSearch = async (params1?: Record) => { const resp = await props.request({ - pageSize: 10, + pageSize: 12, pageIndex: 1, ...params1 }) if(resp.status === 200){ - dataSource.value = [ // resp.result?.data || - { - key: '1', - name: '胡彦斌', - age: 32, - address: '西湖区湖底公园1号', - }, - { - key: '2', - name: '胡彦祖', - age: 42, - address: '西湖区湖底公园1号', - }, - ], + dataSource.value = resp.result?.data || [] pageIndex.value = resp.result?.pageIndex || 0 pageSize.value = resp.result?.pageSize || 6 total.value = resp.result?.total || 0 } } -const pageChange = () => { - +const pageChange = (page: number, size: number) => { + if(pageSize.value === size) { + handleSearch({ + pageSize: size, + pageIndex: page, + }) + } else { + handleSearch({ + pageSize: size, + pageIndex: 1, + }) + } } watchEffect(() => { @@ -226,9 +228,9 @@ watchEffect(() => { margin-top: 20px; display: flex; justify-content: flex-end; - // position: absolute; - // right: 24px; - // bottom: 24px; + /deep/ .ant-pagination-item { + display: none !important; + } } } \ No newline at end of file diff --git a/src/views/demo/table/index.vue b/src/views/demo/table/index.vue index 1aa3ed02..66db096e 100644 --- a/src/views/demo/table/index.vue +++ b/src/views/demo/table/index.vue @@ -3,19 +3,19 @@ server.post(`/device-product/_query`, data) -const actions = [{ - key: 'delete', - disabled: true, - text: "删除" -}] +const actions = [ + { + key: 'edit', + // disabled: true, + text: "编辑" + }, + { + key: 'delete', + disabled: true, + text: "删除" + } +] From a4830e4c30ece00523cd296824271802c4b163b0 Mon Sep 17 00:00:00 2001 From: jackhoo_98 Date: Wed, 11 Jan 2023 10:50:31 +0800 Subject: [PATCH 04/13] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=AF=81?= =?UTF-8?q?=E4=B9=A6=E6=96=B0=E5=A2=9E=20=E8=A1=A8=E5=8D=95=E5=A4=9A?= =?UTF-8?q?=E5=B1=82=E6=95=B0=E6=8D=AE=E6=A0=A1=E9=AA=8C=E3=80=81=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E4=BC=A0=E6=95=B0=E6=8D=AE=E5=8F=8C=E5=90=91?= =?UTF-8?q?=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Certificate/Detail/CertificateFile.vue | 6 +- src/views/link/Certificate/Detail/index.vue | 106 ++++++++++-------- src/views/link/Certificate/index.vue | 7 +- 3 files changed, 66 insertions(+), 53 deletions(-) diff --git a/src/views/link/Certificate/Detail/CertificateFile.vue b/src/views/link/Certificate/Detail/CertificateFile.vue index b6ffb26c..ae64c8f0 100644 --- a/src/views/link/Certificate/Detail/CertificateFile.vue +++ b/src/views/link/Certificate/Detail/CertificateFile.vue @@ -64,16 +64,14 @@ const handleChange = (info: UploadChangeParam) => { message.success('上传成功!'); const result = info.file.response?.result; keystoreBase64.value = result; - console.log(1114, result); loading.value = false; emit('change', result); emit('update:modelValue', result); } }; const textChange = (val: any) => { - val.name = props.name; - emit('change', val); - // emit('update:modelValue', val); + emit('change', keystoreBase64.value); + emit('update:modelValue', keystoreBase64.value); }; watch( diff --git a/src/views/link/Certificate/Detail/index.vue b/src/views/link/Certificate/Detail/index.vue index ec301a57..1cb904b1 100644 --- a/src/views/link/Certificate/Detail/index.vue +++ b/src/views/link/Certificate/Detail/index.vue @@ -10,10 +10,8 @@ :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }" autocomplete="off" - @finish="onFinish" - :rules="formRules" > - + - + - + - + @@ -61,6 +63,8 @@ class="form-submit" html-type="submit" type="primary" + @click.prevent="onSubmit" + :loading="loading" >保存 @@ -89,7 +93,7 @@ diff --git a/src/views/link/Certificate/index.vue b/src/views/link/Certificate/index.vue index 757828d4..c289ab74 100644 --- a/src/views/link/Certificate/index.vue +++ b/src/views/link/Certificate/index.vue @@ -3,8 +3,11 @@ From 2436e8fa0d64e3d4270e096a96d3b2f3231b7683 Mon Sep 17 00:00:00 2001 From: easy <1358086367@qq.com> Date: Wed, 11 Jan 2023 14:41:16 +0800 Subject: [PATCH 06/13] =?UTF-8?q?update:=20api=E9=85=8D=E7=BD=AE=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 18 ++++-- .../system/apiPage/components/LeftTree.vue | 61 +++++++++++++------ src/views/system/apiPage/index.d.ts | 14 +++++ src/views/system/apiPage/index.vue | 28 ++++++++- 4 files changed, 94 insertions(+), 27 deletions(-) create mode 100644 src/views/system/apiPage/index.d.ts diff --git a/components.d.ts b/components.d.ts index c6352220..e1d825a2 100644 --- a/components.d.ts +++ b/components.d.ts @@ -7,29 +7,39 @@ export {} declare module '@vue/runtime-core' { export interface GlobalComponents { + ABadge: typeof import('ant-design-vue/es')['Badge'] AButton: typeof import('ant-design-vue/es')['Button'] + ACard: typeof import('ant-design-vue/es')['Card'] ACheckbox: typeof import('ant-design-vue/es')['Checkbox'] - ACheckboxGroup: typeof import('ant-design-vue/es')['CheckboxGroup'] ACol: typeof import('ant-design-vue/es')['Col'] - ACollapse: typeof import('ant-design-vue/es')['Collapse'] - ACollapsePanel: typeof import('ant-design-vue/es')['CollapsePanel'] + ADatePicker: typeof import('ant-design-vue/es')['DatePicker'] + ADivider: typeof import('ant-design-vue/es')['Divider'] + AEmpty: typeof import('ant-design-vue/es')['Empty'] AForm: typeof import('ant-design-vue/es')['Form'] AFormItem: typeof import('ant-design-vue/es')['FormItem'] AInput: typeof import('ant-design-vue/es')['Input'] AInputNumber: typeof import('ant-design-vue/es')['InputNumber'] + AInputPassword: typeof import('ant-design-vue/es')['InputPassword'] AModal: typeof import('ant-design-vue/es')['Modal'] + APagination: typeof import('ant-design-vue/es')['Pagination'] + APopconfirm: typeof import('ant-design-vue/es')['Popconfirm'] ARow: typeof import('ant-design-vue/es')['Row'] ASelect: typeof import('ant-design-vue/es')['Select'] - ASelectOption: typeof import('ant-design-vue/es')['SelectOption'] ASpin: typeof import('ant-design-vue/es')['Spin'] + ATable: typeof import('ant-design-vue/es')['Table'] ATooltip: typeof import('ant-design-vue/es')['Tooltip'] + ATree: typeof import('ant-design-vue/es')['Tree'] AUpload: typeof import('ant-design-vue/es')['Upload'] BadgeStatus: typeof import('./src/components/BadgeStatus/index.vue')['default'] CardBox: typeof import('./src/components/CardBox/index.vue')['default'] + FormFormBuilder: typeof import('./src/components/Form/FormBuilder.vue')['default'] GeoComponent: typeof import('./src/components/GeoComponent/index.vue')['default'] MonacoEditor: typeof import('./src/components/MonacoEditor/index.vue')['default'] + PermissionButton: typeof import('./src/components/PermissionButton/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] + Table: typeof import('./src/components/Table/index.vue')['default'] + TitleComponent: typeof import('./src/components/TitleComponent/index.vue')['default'] ValueItem: typeof import('./src/components/ValueItem/index.vue')['default'] } } diff --git a/src/views/system/apiPage/components/LeftTree.vue b/src/views/system/apiPage/components/LeftTree.vue index acdd1f5a..91f414d4 100644 --- a/src/views/system/apiPage/components/LeftTree.vue +++ b/src/views/system/apiPage/components/LeftTree.vue @@ -15,51 +15,62 @@ import { TreeProps } from 'ant-design-vue'; import { getTreeOne_api, getTreeTwo_api } from '@/api/system/apiPage'; +import { treeNodeTpye } from '../index'; -type treeNodeTpye = { - name: string; - url: string; - children?: treeNodeTpye[]; -}; const emits = defineEmits(['select']); -const treeData: TreeProps['treeData'] = ref([]); +const treeData = ref([]); const getTreeData = () => { let tree: treeNodeTpye[] = []; - getTreeOne_api().then((resp) => { - tree = resp.urls.map((item) => ({ + getTreeOne_api().then((resp: any) => { + tree = resp.urls.map((item: any) => ({ ...item, key: item.url, })); const allPromise = tree.map((item) => getTreeTwo_api(item.name)); Promise.all(allPromise).then((values) => { - values.forEach((item, i) => { - tree[i].children = combData(item.paths); + values.forEach((item: any, i) => { + tree[i].children = combData(item?.paths); }); - console.log(tree); - treeData.value = tree + treeData.value = tree; }); }); }; -const clickSelectItem = (key, { node }) => { - emits('select', node); +const clickSelectItem: TreeProps['onSelect'] = (key, node: any) => { + emits('select', node.node.dataRef); }; onMounted(() => { getTreeData(); }); -const combData = (dataSource: object): object[] => { - const apiList: object[] = []; +const combData = (dataSource: object) => { + const apiList: treeNodeTpye[] = []; const keys = Object.keys(dataSource); keys.forEach((key) => { const method = Object.keys(dataSource[key] || {})[0]; const name = dataSource[key][method].tags[0]; - let apiObj = apiList.find((item) => item.name === name); - if (!apiObj) { - apiObj = { name, link: key, methods: dataSource[key], key }; + let apiObj: treeNodeTpye | undefined = apiList.find( + (item) => item.name === name, + ); + if (apiObj) { + apiObj.apiList?.push({ + url: key, + method: dataSource[key], + }); + } else { + apiObj = { + name, + key: name, + apiList: [ + { + url: key, + method: dataSource[key], + }, + ], + }; apiList.push(apiObj); } }); @@ -68,4 +79,14 @@ const combData = (dataSource: object): object[] => { }; - + diff --git a/src/views/system/apiPage/index.d.ts b/src/views/system/apiPage/index.d.ts new file mode 100644 index 00000000..e0155dde --- /dev/null +++ b/src/views/system/apiPage/index.d.ts @@ -0,0 +1,14 @@ +export type treeNodeTpye = { + name: string; + key: string; + link?: string; + apiList?: object[]; + children?: treeNodeTpye[]; +}; +export type methodType = { + [key:string]: object +} +export type apiObjType = { + url: string, + method: methodType +} \ No newline at end of file diff --git a/src/views/system/apiPage/index.vue b/src/views/system/apiPage/index.vue index 92339a94..6cc516ba 100644 --- a/src/views/system/apiPage/index.vue +++ b/src/views/system/apiPage/index.vue @@ -1,15 +1,37 @@ \ No newline at end of file + From bf493c3a96c762d5bccfba4502fdaacb4ed0fd0a Mon Sep 17 00:00:00 2001 From: xieyonghong <18010623010@163.com> Date: Wed, 11 Jan 2023 16:06:06 +0800 Subject: [PATCH 07/13] =?UTF-8?q?feat:=20=E5=AE=8C=E5=96=84FormBuilder?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 17 ++ src/components/Form/FormBuilder.vue | 251 ++++++++++++++++++++++++- src/components/Form/index.modules.d.ts | 40 ++++ src/components/Form/index.ts | 1 + src/components/Form/util.ts | 15 ++ src/style.css | 4 + src/views/demo/Form.vue | 54 +++++- 7 files changed, 376 insertions(+), 6 deletions(-) create mode 100644 src/components/Form/index.modules.d.ts create mode 100644 src/components/Form/util.ts diff --git a/components.d.ts b/components.d.ts index 7c068950..d63a4b41 100644 --- a/components.d.ts +++ b/components.d.ts @@ -8,8 +8,25 @@ export {} declare module '@vue/runtime-core' { export interface GlobalComponents { AButton: typeof import('ant-design-vue/es')['Button'] + ACheckbox: typeof import('ant-design-vue/es')['Checkbox'] + ACheckboxGroup: typeof import('ant-design-vue/es')['CheckboxGroup'] + ACol: typeof import('ant-design-vue/es')['Col'] + ADatePicker: typeof import('ant-design-vue/es')['DatePicker'] + ADivider: typeof import('ant-design-vue/es')['Divider'] + AForm: typeof import('ant-design-vue/es')['Form'] + AFormItem: typeof import('ant-design-vue/es')['FormItem'] + AInput: typeof import('ant-design-vue/es')['Input'] + AInputPassword: typeof import('ant-design-vue/es')['InputPassword'] APopconfirm: typeof import('ant-design-vue/es')['Popconfirm'] + ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup'] + ARow: typeof import('ant-design-vue/es')['Row'] + ASelect: typeof import('ant-design-vue/es')['Select'] + ASpin: typeof import('ant-design-vue/es')['Spin'] + ASwitch: typeof import('ant-design-vue/es')['Switch'] + ATimePicker: typeof import('ant-design-vue/es')['TimePicker'] ATooltip: typeof import('ant-design-vue/es')['Tooltip'] + ATreeSelect: typeof import('ant-design-vue/es')['TreeSelect'] + AUpload: typeof import('ant-design-vue/es')['Upload'] BadgeStatus: typeof import('./src/components/BadgeStatus/index.vue')['default'] CardBox: typeof import('./src/components/CardBox/index.vue')['default'] FormFormBuilder: typeof import('./src/components/Form/FormBuilder.vue')['default'] diff --git a/src/components/Form/FormBuilder.vue b/src/components/Form/FormBuilder.vue index d1a74645..6de34440 100644 --- a/src/components/Form/FormBuilder.vue +++ b/src/components/Form/FormBuilder.vue @@ -1,11 +1,254 @@ - diff --git a/src/views/system/apiPage/components/ApiTest.vue b/src/views/system/apiPage/components/ApiTest.vue new file mode 100644 index 00000000..b0bb47d0 --- /dev/null +++ b/src/views/system/apiPage/components/ApiTest.vue @@ -0,0 +1,42 @@ + + + + + \ No newline at end of file diff --git a/src/views/system/apiPage/components/ChooseApi.vue b/src/views/system/apiPage/components/ChooseApi.vue new file mode 100644 index 00000000..24362336 --- /dev/null +++ b/src/views/system/apiPage/components/ChooseApi.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/src/views/system/apiPage/components/InputCard.vue b/src/views/system/apiPage/components/InputCard.vue new file mode 100644 index 00000000..c1742737 --- /dev/null +++ b/src/views/system/apiPage/components/InputCard.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/src/views/system/apiPage/components/LeftTree.vue b/src/views/system/apiPage/components/LeftTree.vue index 91f414d4..cbae4bea 100644 --- a/src/views/system/apiPage/components/LeftTree.vue +++ b/src/views/system/apiPage/components/LeftTree.vue @@ -81,6 +81,9 @@ const combData = (dataSource: object) => { \ No newline at end of file diff --git a/src/views/link/AccessConfig/components/Network.vue b/src/views/link/AccessConfig/components/Network.vue new file mode 100644 index 00000000..8bb9b232 --- /dev/null +++ b/src/views/link/AccessConfig/components/Network.vue @@ -0,0 +1,733 @@ + + + + + diff --git a/src/views/link/AccessConfig/components/Provider/index.vue b/src/views/link/AccessConfig/components/Provider/index.vue new file mode 100644 index 00000000..d73dad78 --- /dev/null +++ b/src/views/link/AccessConfig/components/Provider/index.vue @@ -0,0 +1,145 @@ + + + + + diff --git a/src/views/link/AccessConfig/index.vue b/src/views/link/AccessConfig/index.vue index 5ce2ef66..e1509f3b 100644 --- a/src/views/link/AccessConfig/index.vue +++ b/src/views/link/AccessConfig/index.vue @@ -1,11 +1,18 @@ From 2d49f87ceaa6e8c41acef4f6fdec1c9a78140775 Mon Sep 17 00:00:00 2001 From: 100011797 <2642441182@qq.com> Date: Wed, 11 Jan 2023 18:24:07 +0800 Subject: [PATCH 13/13] =?UTF-8?q?feat:=20=E8=A1=A8=E6=A0=BC=E9=80=89?= =?UTF-8?q?=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 6 +- src/components/CardBox/index.vue | 93 ++++++------ src/components/Table/index.vue | 102 +++++++------ src/components/Table/old/index.module.less | 45 ------ src/components/Table/old/index.tsx | 168 --------------------- src/views/demo/index.vue | 6 +- src/views/demo/table/index.vue | 111 ++++++++++---- 7 files changed, 193 insertions(+), 338 deletions(-) delete mode 100644 src/components/Table/old/index.module.less delete mode 100644 src/components/Table/old/index.tsx diff --git a/components.d.ts b/components.d.ts index e30d186c..2ef70390 100644 --- a/components.d.ts +++ b/components.d.ts @@ -7,6 +7,7 @@ export {} declare module '@vue/runtime-core' { export interface GlobalComponents { + AAlert: typeof import('ant-design-vue/es')['Alert'] ABadge: typeof import('ant-design-vue/es')['Badge'] AButton: typeof import('ant-design-vue/es')['Button'] ACard: typeof import('ant-design-vue/es')['Card'] @@ -16,13 +17,12 @@ declare module '@vue/runtime-core' { ADatePicker: typeof import('ant-design-vue/es')['DatePicker'] ADivider: typeof import('ant-design-vue/es')['Divider'] AEmpty: typeof import('ant-design-vue/es')['Empty'] - ADatePicker: typeof import('ant-design-vue/es')['DatePicker'] - ADivider: typeof import('ant-design-vue/es')['Divider'] - AEmpty: typeof import('ant-design-vue/es')['Empty'] AForm: typeof import('ant-design-vue/es')['Form'] AFormItem: typeof import('ant-design-vue/es')['FormItem'] AInput: typeof import('ant-design-vue/es')['Input'] + AInputNumber: typeof import('ant-design-vue/es')['InputNumber'] AInputPassword: typeof import('ant-design-vue/es')['InputPassword'] + AModal: typeof import('ant-design-vue/es')['Modal'] APagination: typeof import('ant-design-vue/es')['Pagination'] APopconfirm: typeof import('ant-design-vue/es')['Popconfirm'] ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup'] diff --git a/src/components/CardBox/index.vue b/src/components/CardBox/index.vue index fc942f65..1cc26f6e 100644 --- a/src/components/CardBox/index.vue +++ b/src/components/CardBox/index.vue @@ -2,17 +2,10 @@
-
+
@@ -27,7 +20,7 @@ -
+
@@ -47,21 +40,12 @@ >
- - -
- -
-
+
- - + + + + +
@@ -89,18 +87,26 @@ diff --git a/src/components/Table/index.vue b/src/components/Table/index.vue index 9a623d59..d352dcc4 100644 --- a/src/components/Table/index.vue +++ b/src/components/Table/index.vue @@ -15,9 +15,13 @@
- +
+ + + +
- - - - +
@@ -46,23 +41,21 @@
- +