From 75a2c40ace3d72b3ae673d100c76ed157674998b Mon Sep 17 00:00:00 2001 From: RubyLiu Date: Fri, 18 Aug 2023 18:18:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20table=20=E8=A1=A8=E6=A0=BC=E5=90=88?= =?UTF-8?q?=E5=B9=B6&=E7=AC=AC=E4=B8=80=E8=A1=8C=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package.json | 2 +- .../setting/system/organizationAndProject.ts | 7 ++- .../components/pure/ms-table/base-table.vue | 30 +++++++++++ frontend/src/components/pure/ms-table/type.ts | 2 + .../src/components/pure/ms-table/useTable.ts | 1 + .../models/setting/system/orgAndProject.ts | 12 +++++ frontend/src/store/modules/setting/types.ts | 1 + .../src/store/modules/setting/usergroup.ts | 1 + .../components/addProjectModal.vue | 54 +++++++++++-------- .../components/systemOrganization.vue | 3 ++ .../components/systemProject.vue | 3 ++ .../system/organizationAndProject/index.vue | 24 +++++++-- .../system/usergroup/components/authTable.vue | 18 +++++-- .../system/usergroup/components/index.vue | 12 +++-- .../views/setting/system/usergroup/index.vue | 30 ++++++----- 15 files changed, 150 insertions(+), 50 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 0fa253ac4c..0592096178 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -38,7 +38,7 @@ "@7polo/kity": "2.0.8", "@7polo/kityminder-core": "1.4.53", "@arco-design/web-vue": "^2.49.2", - "@arco-themes/vue-ms-theme-default": "^0.0.25", + "@arco-themes/vue-ms-theme-default": "^0.0.28", "@form-create/arco-design": "^3.1.22", "@types/color": "^3.0.3", "@vueuse/core": "^10.2.1", diff --git a/frontend/src/api/modules/setting/system/organizationAndProject.ts b/frontend/src/api/modules/setting/system/organizationAndProject.ts index 5476fdaa8c..2592a956eb 100644 --- a/frontend/src/api/modules/setting/system/organizationAndProject.ts +++ b/frontend/src/api/modules/setting/system/organizationAndProject.ts @@ -2,7 +2,10 @@ import MSR from '@/api/http/index'; import * as orgUrl from '@/api/requrls/setting/system/organizationAndProject'; import { TableQueryParams } from '@/models/common'; import { AddUserToOrgOrProjectParams } from '@/models/setting/systemOrg'; -import { CreateOrUpdateSystemOrgParams } from '@/models/setting/system/orgAndProject'; +import { + CreateOrUpdateSystemOrgParams, + CreateOrUpdateSystemProjectParams, +} from '@/models/setting/system/orgAndProject'; // 获取组织列表 export function postOrgTable(data: TableQueryParams) { @@ -10,7 +13,7 @@ export function postOrgTable(data: TableQueryParams) { } // 创建或修改组织 -export function createOrUpdateOrg(data: CreateOrUpdateSystemOrgParams) { +export function createOrUpdateOrg(data: CreateOrUpdateSystemOrgParams | CreateOrUpdateSystemProjectParams) { return MSR.post({ url: data.id ? orgUrl.postModifyOrgUrl : orgUrl.postAddOrgUrl, data }); } diff --git a/frontend/src/components/pure/ms-table/base-table.vue b/frontend/src/components/pure/ms-table/base-table.vue index ec2e69c410..6ac77d5581 100644 --- a/frontend/src/components/pure/ms-table/base-table.vue +++ b/frontend/src/components/pure/ms-table/base-table.vue @@ -11,8 +11,12 @@ v-bind="$attrs" :row-class="getRowClass" :selected-keys="props.selectedKeys" + :span-method="spanMethod" @selection-change="(e) => selectionChange(e, true)" > +