style: table 样式修改&项目前端问题修改
This commit is contained in:
parent
43394a1b28
commit
52093c562f
|
@ -38,7 +38,7 @@
|
||||||
"@7polo/kity": "2.0.8",
|
"@7polo/kity": "2.0.8",
|
||||||
"@7polo/kityminder-core": "1.4.53",
|
"@7polo/kityminder-core": "1.4.53",
|
||||||
"@arco-design/web-vue": "^2.51.0",
|
"@arco-design/web-vue": "^2.51.0",
|
||||||
"@arco-themes/vue-ms-theme-default": "^0.0.28",
|
"@arco-themes/vue-ms-theme-default": "^0.0.29",
|
||||||
"@form-create/arco-design": "^3.1.22",
|
"@form-create/arco-design": "^3.1.22",
|
||||||
"@types/color": "^3.0.3",
|
"@types/color": "^3.0.3",
|
||||||
"@vueuse/core": "^10.2.1",
|
"@vueuse/core": "^10.2.1",
|
||||||
|
|
|
@ -77,8 +77,14 @@
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else-if="item.slotName === SpecialColumnEnum.OPERATION">
|
||||||
|
<slot name="operation" v-bind="{ record, rowIndex }" />
|
||||||
|
</template>
|
||||||
|
<template v-else-if="item.slotName === SpecialColumnEnum.ACTION">
|
||||||
|
<slot name="action" v-bind="{ record, rowIndex }" />
|
||||||
|
</template>
|
||||||
<template v-else-if="item.showTooltip">
|
<template v-else-if="item.showTooltip">
|
||||||
<a-tooltip placement="top" :content="record[item.dataIndex as string]">
|
<a-tooltip placement="top" :content="String(record[item.dataIndex as string])">
|
||||||
<a-input
|
<a-input
|
||||||
v-if="editActiveKey === rowIndex && item.dataIndex === editKey"
|
v-if="editActiveKey === rowIndex && item.dataIndex === editKey"
|
||||||
ref="currentInputRef"
|
ref="currentInputRef"
|
||||||
|
|
|
@ -139,13 +139,17 @@
|
||||||
margin-left: 16px;
|
margin-left: 16px;
|
||||||
color: var(--color-text-4);
|
color: var(--color-text-4);
|
||||||
background-color: var(--color-text-10);
|
background-color: var(--color-text-10);
|
||||||
|
cursor: pointer;
|
||||||
|
&:hover {
|
||||||
|
color: rgba(var(--primary-5));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.mode-button {
|
.mode-button {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: row nowrap;
|
flex-flow: row nowrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.active-color {
|
.active-color {
|
||||||
color: var(--color-primary-5);
|
color: rgba(var(--primary-5));
|
||||||
}
|
}
|
||||||
.mode-button-title {
|
.mode-button-title {
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
|
|
|
@ -69,13 +69,15 @@
|
||||||
flex-flow: row nowrap;
|
flex-flow: row nowrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.dropdown-icon {
|
.dropdown-icon {
|
||||||
margin-left: 2px;
|
margin-left: 4px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: rgb(var(--primary-6));
|
border-radius: 50%;
|
||||||
|
color: var(--color-text-4);
|
||||||
|
background-color: rgb(var(--primary-3));
|
||||||
}
|
}
|
||||||
.dropdown-icon:hover {
|
.dropdown-icon:hover {
|
||||||
border-radius: 50%;
|
color: rgb(var(--primary-5));
|
||||||
background-color: rgb(var(--primary-3));
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<div class="form">
|
<div class="form">
|
||||||
<a-form ref="formRef" :model="form" size="large" :style="{ width: '600px' }" layout="vertical">
|
<a-form ref="formRef" :model="form" size="large" :style="{ width: '632px' }" layout="vertical">
|
||||||
<a-form-item
|
<a-form-item
|
||||||
field="name"
|
field="name"
|
||||||
required
|
required
|
||||||
|
@ -48,9 +48,6 @@
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item field="description" :label="t('system.organization.description')">
|
|
||||||
<a-input v-model="form.description" :placeholder="t('system.organization.descriptionPlaceholder')" />
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item field="module" :label="t('system.project.moduleSetting')">
|
<a-form-item field="module" :label="t('system.project.moduleSetting')">
|
||||||
<a-checkbox-group v-model="form.moduleIds" :options="moduleOption">
|
<a-checkbox-group v-model="form.moduleIds" :options="moduleOption">
|
||||||
<template #label="{ data }">
|
<template #label="{ data }">
|
||||||
|
@ -58,12 +55,15 @@
|
||||||
</template>
|
</template>
|
||||||
</a-checkbox-group>
|
</a-checkbox-group>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item field="description" :label="t('system.organization.description')">
|
||||||
|
<a-input v-model="form.description" :placeholder="t('system.organization.descriptionPlaceholder')" />
|
||||||
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="flex flex-row justify-between">
|
<div class="flex flex-row justify-between">
|
||||||
<div class="flex flex-row items-center gap-[4px]">
|
<div class="flex flex-row items-center gap-[4px]">
|
||||||
<a-switch v-model="form.enable" />
|
<a-switch v-model="form.enable" size="small" />
|
||||||
<span>{{ t('system.organization.status') }}</span>
|
<span>{{ t('system.organization.status') }}</span>
|
||||||
<a-tooltip :content="t('system.project.createTip')" position="top">
|
<a-tooltip :content="t('system.project.createTip')" position="top">
|
||||||
<MsIcon type="icon-icon-maybe_outlined" class="text-[var(--color-text-4)]" />
|
<MsIcon type="icon-icon-maybe_outlined" class="text-[var(--color-text-4)]" />
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
const formRef = ref<FormInstance>();
|
const formRef = ref<FormInstance>();
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const isEdit = computed(() => !!props.currentProject?.id);
|
const isEdit = computed(() => !!props.currentProject);
|
||||||
const affiliatedOrgOption = ref<SystemOrgOption[]>([]);
|
const affiliatedOrgOption = ref<SystemOrgOption[]>([]);
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const currentOrgId = computed(() => appStore.currentOrgId);
|
const currentOrgId = computed(() => appStore.currentOrgId);
|
||||||
|
@ -188,7 +188,7 @@
|
||||||
};
|
};
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
initAffiliatedOrgOption();
|
initAffiliatedOrgOption();
|
||||||
if (props.currentProject) {
|
if (isEdit.value && props.currentProject) {
|
||||||
form.id = props.currentProject.id;
|
form.id = props.currentProject.id;
|
||||||
form.name = props.currentProject.name;
|
form.name = props.currentProject.name;
|
||||||
form.description = props.currentProject.description;
|
form.description = props.currentProject.description;
|
||||||
|
|
|
@ -68,6 +68,7 @@
|
||||||
const props = defineProps<projectDrawerProps>();
|
const props = defineProps<projectDrawerProps>();
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'cancel'): void;
|
(e: 'cancel'): void;
|
||||||
|
(e: 'requestFetchData'): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const currentVisible = ref(props.visible);
|
const currentVisible = ref(props.visible);
|
||||||
|
@ -80,10 +81,13 @@
|
||||||
{
|
{
|
||||||
title: 'system.organization.userName',
|
title: 'system.organization.userName',
|
||||||
slotName: 'name',
|
slotName: 'name',
|
||||||
|
showTooltip: true,
|
||||||
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'system.organization.email',
|
title: 'system.organization.email',
|
||||||
dataIndex: 'email',
|
dataIndex: 'email',
|
||||||
|
showTooltip: true,
|
||||||
width: 200,
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -123,6 +127,7 @@
|
||||||
userVisible.value = false;
|
userVisible.value = false;
|
||||||
if (shouldSearch) {
|
if (shouldSearch) {
|
||||||
fetchData();
|
fetchData();
|
||||||
|
emit('requestFetchData');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ export default {
|
||||||
'system.project.affiliatedOrgPlaceholder': '请选择所属组织',
|
'system.project.affiliatedOrgPlaceholder': '请选择所属组织',
|
||||||
'system.project.projectAdmin': '项目管理员',
|
'system.project.projectAdmin': '项目管理员',
|
||||||
'system.project.projectAdminPlaceholder': '默认选择创建项目人为项目管理员',
|
'system.project.projectAdminPlaceholder': '默认选择创建项目人为项目管理员',
|
||||||
'system.project.moduleSetting': '模块设置',
|
'system.project.moduleSetting': '启用模块',
|
||||||
'system.project.projectNameRequired': '项目名称不能为空',
|
'system.project.projectNameRequired': '项目名称不能为空',
|
||||||
'system.project.createTip': '项目启用后,将展示在项目切换列表',
|
'system.project.createTip': '项目启用后,将展示在项目切换列表',
|
||||||
'system.project.affiliatedOrgRequired': '所属组织不能为空',
|
'system.project.affiliatedOrgRequired': '所属组织不能为空',
|
||||||
|
|
|
@ -44,9 +44,13 @@
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</MsBaseTable>
|
</MsBaseTable>
|
||||||
<AddProjectModal :visible="addProjectVisible" @cancel="handleAddProjectModalCancel" />
|
<AddProjectModal
|
||||||
|
:visible="addProjectVisible"
|
||||||
|
:current-project="currentUpdateProject"
|
||||||
|
@cancel="handleAddProjectModalCancel"
|
||||||
|
/>
|
||||||
<AddUserModal :project-id="currentProjectId" :visible="userVisible" @cancel="handleAddUserModalCancel" />
|
<AddUserModal :project-id="currentProjectId" :visible="userVisible" @cancel="handleAddUserModalCancel" />
|
||||||
<UserDrawer v-bind="currentUserDrawer" @cancel="handleUserDrawerCancel" />
|
<UserDrawer v-bind="currentUserDrawer" @request-fetch-data="fetchData" @cancel="handleUserDrawerCancel" />
|
||||||
</MsCard>
|
</MsCard>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -185,6 +189,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
const showAddProject = () => {
|
const showAddProject = () => {
|
||||||
|
currentUpdateProject.value = undefined;
|
||||||
addProjectVisible.value = true;
|
addProjectVisible.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -261,7 +266,6 @@
|
||||||
|
|
||||||
const handleUserDrawerCancel = () => {
|
const handleUserDrawerCancel = () => {
|
||||||
currentUserDrawer.visible = false;
|
currentUserDrawer.visible = false;
|
||||||
fetchData();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleAddUserModalCancel = (shouldSearch: boolean) => {
|
const handleAddUserModalCancel = (shouldSearch: boolean) => {
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
@submit="fetchData"
|
@submit="fetchData"
|
||||||
/>
|
/>
|
||||||
<ProjectDrawer v-bind="currentProjectDrawer" @cancel="handleProjectDrawerCancel" />
|
<ProjectDrawer v-bind="currentProjectDrawer" @cancel="handleProjectDrawerCancel" />
|
||||||
<UserDrawer v-bind="currentUserDrawer" @cancel="handleUserDrawerCancel" />
|
<UserDrawer v-bind="currentUserDrawer" @request-fetch-data="fetchData" @cancel="handleUserDrawerCancel" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
@ -255,23 +255,23 @@
|
||||||
|
|
||||||
const handleProjectDrawerCancel = () => {
|
const handleProjectDrawerCancel = () => {
|
||||||
currentProjectDrawer.visible = false;
|
currentProjectDrawer.visible = false;
|
||||||
fetchData();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const showProjectDrawer = (record: TableData) => {
|
const showProjectDrawer = (record: TableData) => {
|
||||||
|
currentUserDrawer.visible = false;
|
||||||
currentProjectDrawer.visible = true;
|
currentProjectDrawer.visible = true;
|
||||||
currentProjectDrawer.organizationId = record.id;
|
currentProjectDrawer.organizationId = record.id;
|
||||||
currentProjectDrawer.currentName = record.name;
|
currentProjectDrawer.currentName = record.name;
|
||||||
};
|
};
|
||||||
|
|
||||||
const showUserDrawer = (record: TableData) => {
|
const showUserDrawer = (record: TableData) => {
|
||||||
|
currentProjectDrawer.visible = false;
|
||||||
currentUserDrawer.visible = true;
|
currentUserDrawer.visible = true;
|
||||||
currentUserDrawer.organizationId = record.id;
|
currentUserDrawer.organizationId = record.id;
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleUserDrawerCancel = () => {
|
const handleUserDrawerCancel = () => {
|
||||||
currentUserDrawer.visible = false;
|
currentUserDrawer.visible = false;
|
||||||
fetchData();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleAddUserModalCancel = () => {
|
const handleAddUserModalCancel = () => {
|
||||||
|
|
|
@ -43,7 +43,12 @@
|
||||||
@submit="fetchData"
|
@submit="fetchData"
|
||||||
@cancel="handleAddUserModalCancel"
|
@cancel="handleAddUserModalCancel"
|
||||||
/>
|
/>
|
||||||
<UserDrawer :project-id="currentProjectId" v-bind="currentUserDrawer" @cancel="handleUserDrawerCancel" />
|
<UserDrawer
|
||||||
|
:project-id="currentProjectId"
|
||||||
|
v-bind="currentUserDrawer"
|
||||||
|
@request-fetch-data="fetchData"
|
||||||
|
@cancel="handleUserDrawerCancel"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
:organization-id="props.organizationId"
|
:organization-id="props.organizationId"
|
||||||
:visible="userVisible"
|
:visible="userVisible"
|
||||||
@cancel="handleHideUserModal"
|
@cancel="handleHideUserModal"
|
||||||
@submit="fetchData"
|
@submit="handleAddMembeSubmit"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -72,6 +72,7 @@
|
||||||
const props = defineProps<projectDrawerProps>();
|
const props = defineProps<projectDrawerProps>();
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'cancel'): void;
|
(e: 'cancel'): void;
|
||||||
|
(e: 'requestFetchData'): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const currentVisible = ref(props.visible);
|
const currentVisible = ref(props.visible);
|
||||||
|
@ -84,11 +85,15 @@
|
||||||
{
|
{
|
||||||
title: 'system.organization.userName',
|
title: 'system.organization.userName',
|
||||||
slotName: 'name',
|
slotName: 'name',
|
||||||
|
dataIndex: 'nameTooltip',
|
||||||
|
showTooltip: true,
|
||||||
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'system.organization.email',
|
title: 'system.organization.email',
|
||||||
dataIndex: 'email',
|
dataIndex: 'email',
|
||||||
width: 200,
|
width: 200,
|
||||||
|
showTooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'system.organization.phone',
|
title: 'system.organization.phone',
|
||||||
|
@ -97,14 +102,21 @@
|
||||||
{ title: 'system.organization.operation', slotName: 'operation' },
|
{ title: 'system.organization.operation', slotName: 'operation' },
|
||||||
];
|
];
|
||||||
|
|
||||||
const { propsRes, propsEvent, loadList, setLoadListParams, setKeyword } = useTable(postUserTableByOrgIdOrProjectId, {
|
const { propsRes, propsEvent, loadList, setLoadListParams, setKeyword } = useTable(
|
||||||
|
postUserTableByOrgIdOrProjectId,
|
||||||
|
{
|
||||||
columns: projectColumn,
|
columns: projectColumn,
|
||||||
showSetting: false,
|
showSetting: false,
|
||||||
scroll: { y: 'auto', x: '600px' },
|
scroll: { y: 'auto', x: '600px' },
|
||||||
selectable: false,
|
selectable: false,
|
||||||
size: 'small',
|
size: 'small',
|
||||||
noDisable: false,
|
noDisable: false,
|
||||||
});
|
},
|
||||||
|
(record: any) => ({
|
||||||
|
...record,
|
||||||
|
nameTooltip: record.name + (record.adminFlag ? `(${t('common.admin')})` : ''),
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
async function searchUser() {
|
async function searchUser() {
|
||||||
setKeyword(keyword.value);
|
setKeyword(keyword.value);
|
||||||
|
@ -128,6 +140,10 @@
|
||||||
const handleAddMember = () => {
|
const handleAddMember = () => {
|
||||||
userVisible.value = true;
|
userVisible.value = true;
|
||||||
};
|
};
|
||||||
|
const handleAddMembeSubmit = () => {
|
||||||
|
fetchData();
|
||||||
|
emit('requestFetchData');
|
||||||
|
};
|
||||||
|
|
||||||
const handleHideUserModal = () => {
|
const handleHideUserModal = () => {
|
||||||
userVisible.value = false;
|
userVisible.value = false;
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
@batch-action="handleTableBatch"
|
@batch-action="handleTableBatch"
|
||||||
>
|
>
|
||||||
<template #organization="{ record }">
|
<template #organization="{ record }">
|
||||||
<MsTagGroup :tag-list="record.organizationList"> </MsTagGroup>
|
<MsTagGroup theme="outline" :tag-list="record.organizationList"> </MsTagGroup>
|
||||||
</template>
|
</template>
|
||||||
<template #userRole="{ record }">
|
<template #userRole="{ record }">
|
||||||
<MsTagGroup :tag-list="record.userRoleList" type="primary" theme="outline"> </MsTagGroup>
|
<MsTagGroup :tag-list="record.userRoleList" type="primary" theme="outline"> </MsTagGroup>
|
||||||
|
@ -261,7 +261,7 @@
|
||||||
{
|
{
|
||||||
tableKey: TableKeyEnum.SYSTEM_USER,
|
tableKey: TableKeyEnum.SYSTEM_USER,
|
||||||
columns,
|
columns,
|
||||||
scroll: { x: 1200 },
|
size: 'default',
|
||||||
selectable: true,
|
selectable: true,
|
||||||
},
|
},
|
||||||
(record) => ({
|
(record) => ({
|
||||||
|
|
Loading…
Reference in New Issue