From cc41c20709e13739bcd00233fb5ffb8d8b89a02d Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 29 Mar 2023 15:29:24 +0800 Subject: [PATCH 1/4] =?UTF-8?q?update=EF=BC=9A=E4=BF=AE=E5=A4=8D=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E7=AE=A1=E7=90=86=E6=89=93=E4=B8=8D=E5=BC=80=E6=9D=83?= =?UTF-8?q?=E9=99=90=E8=A1=A8=E5=8D=95=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/role/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index 0e75d67d..af8e0d3a 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -204,7 +204,7 @@ const openForm = (type: string, id?: number) => { /** 数据权限操作 */ const menuPermissionFormRef = ref() const handleScope = async (type: string, row: RoleApi.RoleVO) => { - menuPermissionFormRef.value.openForm(type, row) + menuPermissionFormRef.value.openModal(type, row) } /** 删除按钮操作 */ From 86c6073f1f9173341db549b5eb30b52b3a9e5949 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 29 Mar 2023 15:31:34 +0800 Subject: [PATCH 2/4] =?UTF-8?q?update=EF=BC=9A=E4=BF=AE=E5=A4=8D=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E7=AE=A1=E7=90=86=E8=8F=9C=E5=8D=95=E6=9D=83=E9=99=90?= =?UTF-8?q?=E8=A1=A8=E5=8D=95tree=E7=BB=84=E4=BB=B6=E4=B8=80=E7=9B=B4?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=8A=A0=E8=BD=BD=E4=B8=AD=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/role/MenuPermissionForm.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/system/role/MenuPermissionForm.vue b/src/views/system/role/MenuPermissionForm.vue index 650fb659..70971781 100644 --- a/src/views/system/role/MenuPermissionForm.vue +++ b/src/views/system/role/MenuPermissionForm.vue @@ -59,7 +59,7 @@ show-checkbox :check-strictly="!checkStrictly" :props="defaultProps" - :data="dataScopeForm" + :data="treeOptions" empty-text="加载中,请稍后" /> From 64b974deafccaf106424228b8301d0fae8507a15 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 29 Mar 2023 17:49:17 +0800 Subject: [PATCH 3/4] =?UTF-8?q?add:=20Vue3=E9=87=8D=E6=9E=84=E7=A7=9F?= =?UTF-8?q?=E6=88=B7=E5=A5=97=E9=A4=90=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/tenantPackage/index.ts | 10 +- src/types/auto-components.d.ts | 4 - src/views/system/tenantPackage/form.vue | 199 +++++++++++ src/views/system/tenantPackage/index.vue | 320 +++++++++--------- .../tenantPackage/tenantPackage.data.ts | 73 ---- 5 files changed, 360 insertions(+), 246 deletions(-) create mode 100644 src/views/system/tenantPackage/form.vue delete mode 100644 src/views/system/tenantPackage/tenantPackage.data.ts diff --git a/src/api/system/tenantPackage/index.ts b/src/api/system/tenantPackage/index.ts index e431a9ee..37f7067a 100644 --- a/src/api/system/tenantPackage/index.ts +++ b/src/api/system/tenantPackage/index.ts @@ -20,27 +20,27 @@ export interface TenantPackagePageReqVO extends PageParam { } // 查询租户套餐列表 -export const getTenantPackageTypePageApi = (params: TenantPackagePageReqVO) => { +export const getTenantPackageTypePage = (params: TenantPackagePageReqVO) => { return request.get({ url: '/system/tenant-package/page', params }) } // 获得租户 -export const getTenantPackageApi = (id: number) => { +export const getTenantPackage = (id: number) => { return request.get({ url: '/system/tenant-package/get?id=' + id }) } // 新增租户套餐 -export const createTenantPackageTypeApi = (data: TenantPackageVO) => { +export const createTenantPackageType = (data: TenantPackageVO) => { return request.post({ url: '/system/tenant-package/create', data }) } // 修改租户套餐 -export const updateTenantPackageTypeApi = (data: TenantPackageVO) => { +export const updateTenantPackageType = (data: TenantPackageVO) => { return request.put({ url: '/system/tenant-package/update', data }) } // 删除租户套餐 -export const deleteTenantPackageTypeApi = (id: number) => { +export const deleteTenantPackageType = (id: number) => { return request.delete({ url: '/system/tenant-package/delete?id=' + id }) } // 获取租户套餐精简信息列表 diff --git a/src/types/auto-components.d.ts b/src/types/auto-components.d.ts index 480691fc..4b1eb7ef 100644 --- a/src/types/auto-components.d.ts +++ b/src/types/auto-components.d.ts @@ -52,7 +52,6 @@ declare module '@vue/runtime-core' { ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElIcon: typeof import('element-plus/es')['ElIcon'] - ElImage: typeof import('element-plus/es')['ElImage'] ElImageViewer: typeof import('element-plus/es')['ElImageViewer'] ElInput: typeof import('element-plus/es')['ElInput'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] @@ -73,10 +72,7 @@ declare module '@vue/runtime-core' { ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] ElTag: typeof import('element-plus/es')['ElTag'] - ElTimeline: typeof import('element-plus/es')['ElTimeline'] - ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] - ElTransfer: typeof import('element-plus/es')['ElTransfer'] ElTree: typeof import('element-plus/es')['ElTree'] ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect'] ElUpload: typeof import('element-plus/es')['ElUpload'] diff --git a/src/views/system/tenantPackage/form.vue b/src/views/system/tenantPackage/form.vue new file mode 100644 index 00000000..e90222e7 --- /dev/null +++ b/src/views/system/tenantPackage/form.vue @@ -0,0 +1,199 @@ + + + diff --git a/src/views/system/tenantPackage/index.vue b/src/views/system/tenantPackage/index.vue index 07ea39c6..955bf0da 100644 --- a/src/views/system/tenantPackage/index.vue +++ b/src/views/system/tenantPackage/index.vue @@ -1,187 +1,179 @@ - diff --git a/src/views/system/tenantPackage/tenantPackage.data.ts b/src/views/system/tenantPackage/tenantPackage.data.ts deleted file mode 100644 index d57dee29..00000000 --- a/src/views/system/tenantPackage/tenantPackage.data.ts +++ /dev/null @@ -1,73 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' -const { t } = useI18n() // 国际化 - -// 表单校验 -export const rules = reactive({ - name: [required], - id: [required], - type: [required], - remark: [required], - status: [required], - menuIds: [required] -}) - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'id', - primaryTitle: '套餐编号', - action: true, - columns: [ - { - title: '套餐名称', - field: 'name', - isSearch: true - }, - { - title: t('common.status'), - field: 'status', - dictType: DICT_TYPE.COMMON_STATUS, - dictClass: 'number', - isSearch: true - }, - { - title: '菜单权限', - field: 'menuIds', - isTable: false, - form: { - colProps: { - span: 24 - } - } - }, - { - title: t('form.remark'), - field: 'remark', - isTable: true, - isSearch: true, - form: { - component: 'Input', - componentProps: { - type: 'textarea', - rows: 4 - }, - colProps: { - span: 24 - } - } - }, - { - title: '创建时间', - field: 'createTime', - formatter: 'formatDate', - isForm: false, - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) From a9df1463f010baf98d72566477672ac859aabdac Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 29 Mar 2023 17:50:13 +0800 Subject: [PATCH 4/4] =?UTF-8?q?add:=20Vue3=E9=87=8D=E6=9E=84=E7=A7=9F?= =?UTF-8?q?=E6=88=B7=E5=A5=97=E9=A4=90=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/tenantPackage/form.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/system/tenantPackage/form.vue b/src/views/system/tenantPackage/form.vue index e90222e7..d642402c 100644 --- a/src/views/system/tenantPackage/form.vue +++ b/src/views/system/tenantPackage/form.vue @@ -111,7 +111,7 @@ const handleCheckedTreeNodeAll = () => { } // 全部(展开/折叠)TODO:for循环全部展开和折叠树组件数据 const handleCheckedTreeExpand = () => { - const nodes = treeRef.value!.store.nodesMap + const nodes = treeRef.value?.store.nodesMap for (let node in nodes) { nodes[node].expanded = !nodes[node].expanded }