提交 789504b0 authored 作者: xiejiang's avatar xiejiang

style: 修改页面菜单登录页面还原度

上级 442c6fd6
...@@ -16,7 +16,6 @@ declare module 'vue' { ...@@ -16,7 +16,6 @@ declare module 'vue' {
Drawer: typeof import('./components/Drawer/index.vue')['default'] Drawer: typeof import('./components/Drawer/index.vue')['default']
FooterFixBtn: typeof import('./components/FooterFixBtn/index.vue')['default'] FooterFixBtn: typeof import('./components/FooterFixBtn/index.vue')['default']
ImageViewer: typeof import('./components/ImageViewer/index.vue')['default'] ImageViewer: typeof import('./components/ImageViewer/index.vue')['default']
Img: typeof import('./components/Upload/Img.vue')['default']
InfoLable: typeof import('./components/InfoLable/index.vue')['default'] InfoLable: typeof import('./components/InfoLable/index.vue')['default']
Media: typeof import('./components/Upload/media.vue')['default'] Media: typeof import('./components/Upload/media.vue')['default']
OperateBtn: typeof import('./components/OperateBtn/index.vue')['default'] OperateBtn: typeof import('./components/OperateBtn/index.vue')['default']
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-27 15:14:31 * @Date: 2024-11-27 15:14:31
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 10:59:29 * @LastEditTime: 2024-12-11 14:05:24
* @Description: 弹窗 * @Description: 弹窗
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-06 09:53:55 * @Date: 2024-11-06 09:53:55
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-02 14:13:30 * @LastEditTime: 2024-12-11 14:09:22
* @Description: 抽屉 * @Description: 抽屉
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -73,15 +73,18 @@ watch( ...@@ -73,15 +73,18 @@ watch(
) )
</script> </script>
<style lang="less" scoped> <style lang="less">
/* stylelint-disable-next-line selector-pseudo-class-no-unknown */ .t-drawer__footer {
:global(.t-drawer__footer) { padding-top: 10px;
padding-top: 12px;
padding-bottom: 12px; padding-bottom: 12px;
height: 48px;
} }
/* stylelint-disable-next-line selector-pseudo-class-no-unknown */ .t-drawer__header {
:global(.t-drawer__body) { min-height: 48px;
padding: 20px 16px; }
.t-drawer__body {
padding: 20px;
} }
</style> </style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-28 09:24:26 * @Date: 2024-11-28 09:24:26
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 10:23:44 * @LastEditTime: 2024-12-11 15:38:35
* @Description: table操作按钮 * @Description: table操作按钮
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -47,7 +47,7 @@ const handleClick = () => { ...@@ -47,7 +47,7 @@ const handleClick = () => {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.t-button--variant-text { .t-button--variant-text {
padding: 0 8px; padding: 0 10px 0 0;
color: var(--td-brand-color-8); color: var(--td-brand-color-8);
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-07 11:19:31 * @Date: 2024-11-07 11:19:31
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 11:15:52 * @LastEditTime: 2024-12-11 16:00:12
* @Description: 表格页面容器组件 * @Description: 表格页面容器组件
--> -->
<template> <template>
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
:filter-conditions="props.filterConditions" :filter-conditions="props.filterConditions"
v-bind="filtersProps" v-bind="filtersProps"
@on-filter="handleSeach" @on-filter="handleSeach"
@on-search="onSeachChange"
@clear="handleClear" @clear="handleClear"
/> />
<div class="mt-[12px] p-[16px] bg-white flex-1 max-h-[calc(100%-64px)] overflow-auto"> <div class="mt-[12px] p-[16px] bg-white flex-1 max-h-[calc(100%-64px)] overflow-auto">
...@@ -119,6 +120,7 @@ const emit = defineEmits<{ ...@@ -119,6 +120,7 @@ const emit = defineEmits<{
'page-change': [pageInfo: Pagination] 'page-change': [pageInfo: Pagination]
clear: [] clear: []
change: [changeParams: any] change: [changeParams: any]
'on-search': [params: Record<string, any>]
}>() }>()
// 清空 // 清空
...@@ -159,6 +161,12 @@ const handleSeach = (params: Record<string, any>) => { ...@@ -159,6 +161,12 @@ const handleSeach = (params: Record<string, any>) => {
emit('search-change', params) emit('search-change', params)
} }
// 处理搜索条件不调用接口
const onSeachChange = (params: Record<string, any>) => {
searchValue.value = params
emit('on-search', params)
}
// 处理排序变化 // 处理排序变化
const onSortChange: TableProps['onSortChange'] = val => { const onSortChange: TableProps['onSortChange'] = val => {
emit('sort-change', val) emit('sort-change', val)
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<div class="px-[16px] pb-[16px] pt-[4px] bg-white"> <div class="px-[16px] pb-[16px] pt-[4px] bg-white">
<!-- 筛选框区域 && 按钮 --> <!-- 筛选框区域 && 按钮 -->
<div class="flex"> <div class="flex">
<div class="flex-1 flex flex-wrap"> <div class="flex-1">
<div class="flex flex-wrap">
<div class="mr-[8px] mt-[12px]" v-for="item in filterData" :key="item.prop"> <div class="mr-[8px] mt-[12px]" v-for="item in filterData" :key="item.prop">
<t-input <t-input
v-model="item.str" v-model="item.str"
...@@ -50,13 +51,6 @@ ...@@ -50,13 +51,6 @@
/> />
</div> </div>
</div> </div>
<div class="flex flex-col w-[60px] mt-[12px] ml-[88px]">
<t-button theme="default" variant="base" @click="handleFilterSearch">查询</t-button>
<t-button v-show="isShowFilterResult" theme="default" variant="outline" class="mt-[12px]" @click="handleClear">
清空
</t-button>
</div>
</div>
<!-- 筛选结果区域 --> <!-- 筛选结果区域 -->
<transition> <transition>
<div class="mt-[4px] flex flex-wrap max-h-[100vh] min-h-[36px]" v-if="isShowFilterResult"> <div class="mt-[4px] flex flex-wrap max-h-[100vh] min-h-[36px]" v-if="isShowFilterResult">
...@@ -64,7 +58,9 @@ ...@@ -64,7 +58,9 @@
<div class="flex items-center mr-[16px] mt-[12px]" v-if="item.str || item.values?.length"> <div class="flex items-center mr-[16px] mt-[12px]" v-if="item.str || item.values?.length">
<div class="text-font-gray-3">{{ item.label }}:</div> <div class="text-font-gray-3">{{ item.label }}:</div>
<template v-if="['select', 'input', 'date'].includes(item.type)"> <template v-if="['select', 'input', 'date'].includes(item.type)">
<t-tag :closable="!item.closable" @close="filterResultClose(item)">{{ returnFilterResult(item) }}</t-tag> <t-tag :closable="!item.closable" @close="filterResultClose(item)">{{
returnFilterResult(item)
}}</t-tag>
</template> </template>
<template v-else-if="item.type === 'multiple-select'"> <template v-else-if="item.type === 'multiple-select'">
<t-tag <t-tag
...@@ -82,6 +78,21 @@ ...@@ -82,6 +78,21 @@
</div> </div>
</transition> </transition>
</div> </div>
<div class="flex flex-col w-[60px] mt-[12px] ml-[88px]">
<t-button theme="default" variant="base" class="bg-btn" @click="handleFilterSearch">查询</t-button>
<t-button
v-show="isShowFilterResult"
theme="default"
variant="outline"
class="mt-[12px] clear-btn"
@click="handleClear"
>
清空
</t-button>
</div>
</div>
</div>
</template> </template>
<script setup lang="ts" generic="T"> <script setup lang="ts" generic="T">
...@@ -145,6 +156,7 @@ const filterParams: DynamicType = reactive({}) ...@@ -145,6 +156,7 @@ const filterParams: DynamicType = reactive({})
const emit = defineEmits<{ const emit = defineEmits<{
'on-filter': [filter: DynamicType['filter']] 'on-filter': [filter: DynamicType['filter']]
'on-search': [filter: DynamicType['filter']]
clear: [] clear: []
}>() }>()
...@@ -173,16 +185,16 @@ watch( ...@@ -173,16 +185,16 @@ watch(
} }
) )
// watch( watch(
// () => filterData, () => filterData,
// () => { () => {
// handleFilterSearch() resetFilterConditions()
// }, emit('on-search', filterParams as DynamicType)
// { },
// deep: true, {
// immediate: true deep: true
// } }
// ) )
defineExpose<DynamicType>({ defineExpose<DynamicType>({
resetFilterConditions resetFilterConditions
...@@ -230,4 +242,12 @@ defineExpose<DynamicType>({ ...@@ -230,4 +242,12 @@ defineExpose<DynamicType>({
border-top: 1px solid var(--td-gray-color-2); border-top: 1px solid var(--td-gray-color-2);
} }
} }
.bg-btn {
background-color: var(--td-gray-color-1);
}
.clear-btn {
border-color: var(--td-gray-color-2);
}
</style> </style>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<template> <template>
<div class="sreach-with-button-wrap" :style="{ width }"> <div class="sreach-with-button-wrap" :style="{ width }">
<t-input <t-input
v-model="searchKey" v-model.trim="searchKey"
clearable clearable
:placeholder="placeholder" :placeholder="placeholder"
borderless borderless
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-12-10 15:36:04 * @Date: 2024-12-10 15:36:04
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 09:59:56 * @LastEditTime: 2024-12-11 15:32:44
* @Description: 更新版本弹窗 * @Description: 更新版本弹窗
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<div class="content-div text-[var(--td-font-gray-1)]" v-html="state?.description"></div> <div class="content-div text-[var(--td-font-gray-1)]" v-html="state?.description"></div>
</div> </div>
<div class="flex justify-center"> <div class="flex justify-center">
<t-button class="mt-[60px] w-[250px]" @click="handleConfirm" shape="round">更新至最新版本</t-button> <t-button class="mt-[60px] w-[200px]" @click="handleConfirm" shape="round">更新至最新版本</t-button>
</div> </div>
</main> </main>
</template> </template>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-11 09:38:40 * @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-08 11:40:59 * @LastEditTime: 2024-12-11 14:32:29
* @Description: * @Description:
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
<Icon <Icon
:name="isCollapse ? 'indent-right' : 'indent-left'" :name="isCollapse ? 'indent-right' : 'indent-left'"
size="24" size="24"
class="cursor-pointer" class="cursor-pointer ml-[15px]"
:class="[isCollapse ? 'ml-[33px]' : 'ml-[15px]']"
@click="changeCollapse" @click="changeCollapse"
></Icon> ></Icon>
<Breadcrumb id="breadcrumb" /> <Breadcrumb id="breadcrumb" />
......
...@@ -52,8 +52,8 @@ provide('refresh', refreshCurrentPage) ...@@ -52,8 +52,8 @@ provide('refresh', refreshCurrentPage)
const screenWidth = ref(0) const screenWidth = ref(0)
const listeningWindow = useDebounceFn(() => { const listeningWindow = useDebounceFn(() => {
screenWidth.value = document.body.clientWidth screenWidth.value = document.body.clientWidth
if (!isCollapse.value && screenWidth.value < 1200) globalStore.setGlobalState('isCollapse', true) if (!isCollapse.value && screenWidth.value < 1440) globalStore.setGlobalState('isCollapse', true)
if (isCollapse.value && screenWidth.value > 1200) globalStore.setGlobalState('isCollapse', false) if (isCollapse.value && screenWidth.value > 1440) globalStore.setGlobalState('isCollapse', false)
}, 100) }, 100)
window.addEventListener('resize', listeningWindow, false) window.addEventListener('resize', listeningWindow, false)
onBeforeUnmount(() => { onBeforeUnmount(() => {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-11 09:38:40 * @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-08 16:25:46 * @LastEditTime: 2024-12-11 15:09:34
* @Description: * @Description:
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</div> </div>
</template> </template>
<template #default> <template #default>
<t-icon name="search" size="24" /> <t-icon name="search" size="16" />
</template> </template>
</t-tooltip> </t-tooltip>
</div> </div>
...@@ -99,7 +99,16 @@ const handleClickMenu = (label: string) => { ...@@ -99,7 +99,16 @@ const handleClickMenu = (label: string) => {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin: 16px 8px; margin: 16px 8px 0;
:deep(.t-input) {
background-color: var(--td-gray-color-1);
border: none;
}
:deep(.t-input--focused) {
box-shadow: none;
}
:deep(.t-input.t-input--prefix.t-input--suffix) { :deep(.t-input.t-input--prefix.t-input--suffix) {
padding: 0 4px 0 14px; padding: 0 4px 0 14px;
......
...@@ -2,21 +2,21 @@ ...@@ -2,21 +2,21 @@
* @Author: zhanyoulin<zhanyoulin456@163.com> * @Author: zhanyoulin<zhanyoulin456@163.com>
* @Date: 2023-06-25 09:01:18 * @Date: 2023-06-25 09:01:18
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-11-30 15:19:39 * @LastEditTime: 2024-12-11 15:18:35
* @Description: * @Description:
--> -->
<template> <template>
<template v-for="subItem in menuList" :key="subItem.menuId"> <template v-for="subItem in menuList" :key="subItem.menuId">
<t-submenu v-if="subItem.children?.length" :value="subItem.menuSign" :title="subItem.menuName"> <t-submenu v-if="subItem.children?.length" :value="subItem.menuSign" :title="subItem.menuName">
<template #icon> <template #icon>
<t-icon :name="subItem.icon" /> <t-icon size="16" :name="subItem.icon" />
</template> </template>
<SubMenu :menu-list="subItem.children" /> <SubMenu :menu-list="subItem.children" />
</t-submenu> </t-submenu>
<t-menu-item v-else :value="subItem.menuSign" @click="handleClickMenu(subItem)" class="reset-menu-item"> <t-menu-item v-else :value="subItem.menuSign" @click="handleClickMenu(subItem)" class="reset-menu-item">
<template #icon> <!-- <template #icon>
<t-icon :name="subItem.icon" /> <t-icon :name="subItem.icon" />
</template> </template> -->
<span>{{ subItem.menuName }}</span> <span>{{ subItem.menuName }}</span>
</t-menu-item> </t-menu-item>
</template> </template>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-11 09:38:40 * @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-08 11:25:18 * @LastEditTime: 2024-12-11 15:19:39
* @Description: * @Description:
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -38,8 +38,6 @@ const defaultMenu = ref('') ...@@ -38,8 +38,6 @@ const defaultMenu = ref('')
// 设置展开菜单 // 设置展开菜单
const expandedFunc = (name: string) => { const expandedFunc = (name: string) => {
expanded.value = [menuList.value.find(item => item.children?.some(em => em.menuSign === name))?.menuSign] as string[] expanded.value = [menuList.value.find(item => item.children?.some(em => em.menuSign === name))?.menuSign] as string[]
console.log(expanded.value)
} }
watch(activeMenu, val => { watch(activeMenu, val => {
...@@ -53,28 +51,75 @@ onMounted(() => { ...@@ -53,28 +51,75 @@ onMounted(() => {
}) })
</script> </script>
<style lang="less"> <style lang="less">
.t-default-menu { .t-default-menu .reset-menu-item.t-is-active::after {
height: calc(100% - 112px) !important; background: none;
} }
.t-default-menu.t-is-collapsed { .t-default-menu.t-is-collapsed .t-menu .t-menu__item {
width: 52px !important; justify-content: flex-start !important;
} }
.t-default-menu__inner .t-menu { .t-default-menu .t-menu__item .t-icon {
padding: var(--td-comp-paddingTB-l) 0; width: 16px !important;
height: 16px !important;
} }
.t-default-menu .t-menu__item.t-is-opened { .t-default-menu {
color: var(--td-brand-color) !important; height: calc(100% - 112px) !important;
font-size: 13px;
.t-submenu {
> .t-menu__item {
.t-menu__content {
font-weight: 700; font-weight: 700;
}
.t-icon { > .t-icon {
font-weight: 400;
}
}
.t-is-active {
color: var(--td-brand-color);
> .t-icon {
color: var(--td-brand-color); color: var(--td-brand-color);
} }
} }
}
.t-is-collapsed { .t-menu__item {
height: 48px;
line-height: 48px;
color: var(--td-font-gray-1);
}
// .t-menu__content {
// font-size: 13px;
// }
.t-default-menu.t-is-collapsed {
width: 52px !important;
}
.t-default-menu__inner .t-menu {
padding: var(--td-comp-paddingTB-l) 0;
}
// .t-default-menu .t-menu__item.t-is-opened {
// // color: var(--td-brand-color) !important;
// font-weight: 700;
// .t-icon {
// font-weight: 400;
// }
// }
.t-is-active {
color: var(--td-brand-color);
}
.t-is-collapsed {
.t-menu__item { .t-menu__item {
border-radius: 0 8px 8px 0; border-radius: 0 8px 8px 0;
} }
...@@ -101,5 +146,6 @@ onMounted(() => { ...@@ -101,5 +146,6 @@ onMounted(() => {
color: var(--td-white) !important; color: var(--td-white) !important;
} }
} }
}
} }
</style> </style>
...@@ -20,11 +20,9 @@ ...@@ -20,11 +20,9 @@
color: var(--td-font-gray-0); color: var(--td-font-gray-0);
cursor: pointer; cursor: pointer;
background-color: var(--white); background-color: var(--white);
border-color: #e1e3e5;
&.active { &.active {
color: var(--primary); color: var(--primary);
background-color: #e8ebf4;
border: none; border: none;
.t-tag__icon-close { .t-tag__icon-close {
...@@ -45,7 +43,6 @@ ...@@ -45,7 +43,6 @@
} }
&:hover { &:hover {
background-color: var(--td-brand-color-1);
color: var(--td-brand-color); color: var(--td-brand-color);
} }
} }
......
...@@ -18,4 +18,8 @@ ...@@ -18,4 +18,8 @@
position: relative; position: relative;
} }
} }
.t-layout__sider {
border-top: 1px solid var(--td-gray-color-2);
}
} }
...@@ -57,6 +57,14 @@ p { ...@@ -57,6 +57,14 @@ p {
margin: 8px 0; margin: 8px 0;
} }
.t-tag--default {
background: var(--td-gray-color-1);
}
.t-input {
border-color: var(--td-gray-color-2);
}
// 表格 // 表格
.t-table { .t-table {
thead th { thead th {
...@@ -93,6 +101,10 @@ p { ...@@ -93,6 +101,10 @@ p {
.t-dialog__body__icon { .t-dialog__body__icon {
color: var(--td-font-gray-2); color: var(--td-font-gray-2);
} }
.t-button {
background-color: var(--td-gray-color-1);
}
} }
/* scroll bar */ /* scroll bar */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-28 15:01:02 * @Date: 2024-11-28 15:01:02
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 11:09:12 * @LastEditTime: 2024-12-11 16:09:04
* @Description: 机构管理 * @Description: 机构管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
:pagination="pagination" :pagination="pagination"
@search-change="handleSearch" @search-change="handleSearch"
@clear="handleClear(true)" @clear="handleClear(true)"
@on-search="onSearch"
@page-change="handlePage" @page-change="handlePage"
> >
<template #header-left> <template #header-left>
...@@ -246,6 +247,11 @@ const handleSearch = (params: Record<string, any>) => { ...@@ -246,6 +247,11 @@ const handleSearch = (params: Record<string, any>) => {
getData() getData()
} }
// 搜索
const onSearch = (params: Record<string, any>) => {
searchParams.value = params
}
const handleClear = (flge: boolean | null) => { const handleClear = (flge: boolean | null) => {
if (flge) { if (flge) {
searchParams.value = {} searchParams.value = {}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-05 10:14:56 * @Date: 2024-11-05 10:14:56
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-10 17:13:32 * @LastEditTime: 2024-12-11 15:52:07
* @Description: 首页 * @Description: 首页
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
</div> --> </div> -->
<div class="home-avatar flex items-center justify-center"> <div class="home-avatar flex items-center justify-center">
<div class="text-center"> <div class="text-center">
<p class="text-20 bold">{{ userInfo && userInfo.userName }},您好!</p> <p class="text-[20px] bold">{{ userInfo && userInfo.userName }},您好!</p>
<p class="text-14">欢迎使用智慧教育平台</p> <p class="text-14">欢迎使用智慧教育平台</p>
</div> </div>
</div> </div>
<div class="home-line w-full"></div> <div class="home-line w-full"></div>
<div class="home-user flex flex-col items-center justify-center"> <div class="home-user flex flex-col items-center justify-center text-right">
<p> <p>
<span>角色:</span> <span>角色:</span>
<span class="max-w-[calc(100%-90px)]"> <span class="max-w-[calc(100%-90px)]">
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</p> </p>
<p> <p>
<span>上次登录:</span> <span>上次登录:</span>
<span class="max-w-[calc(100%-90px)] text-right" <span class="max-w-[calc(100%-90px)]"
>{{ userInfo?.loginInfo.loginAddress || '-' }}{{ userInfo?.loginInfo.loginIp || '-' }}{{ >{{ userInfo?.loginInfo.loginAddress || '-' }}{{ userInfo?.loginInfo.loginIp || '-' }}{{
userInfo?.loginInfo.time || '-' userInfo?.loginInfo.time || '-'
}}{{ userInfo?.loginInfo.device || '-' }}</span }}{{ userInfo?.loginInfo.device || '-' }}</span
...@@ -87,7 +87,8 @@ onMounted(() => { ...@@ -87,7 +87,8 @@ onMounted(() => {
} }
&-user { &-user {
width: 33%; // width: 33%;
width: 600px;
margin: 0 auto; margin: 0 auto;
> p { > p {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-05 10:14:56 * @Date: 2024-11-05 10:14:56
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-10 11:20:18 * @LastEditTime: 2024-12-11 14:15:44
* @Description: 登录 * @Description: 登录
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="login"> <div class="login">
<div class="left"></div> <div class="left"></div>
<div class="right"> <div class="right">
<div class="px-[168px]"> <div class="px-[168px] mt-[-40px]">
<div class="text-center flex flex-col items-center"> <div class="text-center flex flex-col items-center">
<!-- <img :src="logo" class="" width="46" alt="" /> --> <!-- <img :src="logo" class="" width="46" alt="" /> -->
<img :src="welcome" class="mb-[28px]" height="46" alt="" /> <img :src="welcome" class="mb-[28px]" height="46" alt="" />
......
...@@ -98,6 +98,11 @@ const dictionarys = [ ...@@ -98,6 +98,11 @@ const dictionarys = [
value: 'isAllowDelete', value: 'isAllowDelete',
allow: 5, allow: 5,
noAllow: 6 noAllow: 6
},
{
value: 'isAllowEdit',
allow: 1,
noAllow: 2
} }
] ]
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-11 09:38:40 * @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 11:28:55 * @LastEditTime: 2024-12-11 16:20:23
* @Description: 系统字典 * @Description: 系统字典
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
:loading="loading" :loading="loading"
:pagination="pagination" :pagination="pagination"
@search-change="handleSearch" @search-change="handleSearch"
@on-search="onSearch"
@clear="handleClear(true)" @clear="handleClear(true)"
@page-change="handlePage" @page-change="handlePage"
> >
...@@ -223,6 +224,9 @@ const handleSearch = (params: Record<string, any>) => { ...@@ -223,6 +224,9 @@ const handleSearch = (params: Record<string, any>) => {
getData() getData()
} }
const onSearch = (params: Record<string, any>) => {
searchParams.value = params
}
// 清空搜索条件 // 清空搜索条件
const handleClear = (flge: boolean | null) => { const handleClear = (flge: boolean | null) => {
if (flge) { if (flge) {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-11 09:38:40 * @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 11:08:50 * @LastEditTime: 2024-12-11 16:20:08
* @Description: 菜单管理 * @Description: 菜单管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -21,9 +21,10 @@ ...@@ -21,9 +21,10 @@
:loading="loading" :loading="loading"
:pagination="pagination" :pagination="pagination"
:show-tree="true" :show-tree="true"
@on-search="onSearch"
@search-change="handleSearch" @search-change="handleSearch"
@page-change="handlePage" @page-change="handlePage"
@clear="handleClear(true)" @clear="handleSearch({})"
table-maxheight="550px" table-maxheight="550px"
class="max-h-[calc(100%-50px)]" class="max-h-[calc(100%-50px)]"
> >
...@@ -37,10 +38,10 @@ ...@@ -37,10 +38,10 @@
/></template> /></template>
<template #header-right> <template #header-right>
<div class="flex items-center justify-end gap-2"> <div class="flex items-center justify-end gap-2">
<t-button variant="outline" @click="handleLog"> <t-button variant="outline" shape="round" @click="handleLog">
<template #icon><RootListIcon /></template>操作日志</t-button <template #icon><RootListIcon /></template>操作日志</t-button
> >
<t-button variant="outline" @click="handleSort"> <t-button variant="outline" shape="round" @click="handleSort">
<template #icon><UnfoldMoreIcon /></template>菜单排序</t-button <template #icon><UnfoldMoreIcon /></template>菜单排序</t-button
> >
<t-button shape="round" theme="primary" @click="handleEdit(null)"> <t-button shape="round" theme="primary" @click="handleEdit(null)">
...@@ -199,6 +200,10 @@ const handleClear = (flge: boolean | null) => { ...@@ -199,6 +200,10 @@ const handleClear = (flge: boolean | null) => {
getData() getData()
} }
const onSearch = (params: Record<string, any>) => {
searchParams.value = params
}
// 分页变更 // 分页变更
const handlePage = (pageInfo: { page: number; limit: number }) => { const handlePage = (pageInfo: { page: number; limit: number }) => {
pagination.value = { ...pagination.value, ...pageInfo } pagination.value = { ...pagination.value, ...pageInfo }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-11 09:38:40 * @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 09:06:44 * @LastEditTime: 2024-12-11 16:06:52
* @Description: 版本管理 * @Description: 版本管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -20,9 +20,10 @@ ...@@ -20,9 +20,10 @@
:loading="loading" :loading="loading"
:pagination="pagination" :pagination="pagination"
:show-tree="true" :show-tree="true"
@on-search="onSearch"
@search-change="handleSearch" @search-change="handleSearch"
@page-change="handlePage" @page-change="handlePage"
@clear="handleSearch(searchParams)" @clear="handleSearch({})"
table-maxheight="550px" table-maxheight="550px"
class="max-h-[calc(100%-50px)]" class="max-h-[calc(100%-50px)]"
> >
...@@ -182,6 +183,11 @@ const handleSearch = (params: Record<string, any>) => { ...@@ -182,6 +183,11 @@ const handleSearch = (params: Record<string, any>) => {
getData() getData()
} }
// 搜索
const onSearch = (params: Record<string, any>) => {
searchParams.value = params
}
// 分页变更 // 分页变更
const handlePage = (pageInfo: { page: number; limit: number }) => { const handlePage = (pageInfo: { page: number; limit: number }) => {
pagination.value = { ...pagination.value, ...pageInfo } pagination.value = { ...pagination.value, ...pageInfo }
......
...@@ -60,7 +60,7 @@ const rules: FormProps['rules'] = { ...@@ -60,7 +60,7 @@ const rules: FormProps['rules'] = {
version: [ version: [
{ {
required: true, required: true,
message: '请填写版本号!', message: '请输入版本号!',
trigger: 'blur' trigger: 'blur'
}, },
{ {
......
...@@ -2,19 +2,19 @@ ...@@ -2,19 +2,19 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-12-05 17:16:22 * @Date: 2024-12-05 17:16:22
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 10:19:13 * @LastEditTime: 2024-12-11 16:47:06
* @Description: 功能权限 * @Description: 功能权限
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
<template> <template>
<div class="p-[16px] capabilities" v-loading="loading"> <div class="p-[16px] capabilities" v-loading="loading">
<t-collapse :borderless="true" default-expand-all :expand-on-row-click="false"> <t-collapse :borderless="true" default-expand-all :expand-on-row-click="false" v-if="!loading">
<t-collapse-panel <t-collapse-panel
v-for="(item, index) in menuTree" v-for="(item, index) in menuTree"
:key="item.menuId" :key="item.menuId"
:class="index === 0 ? 'magrin-bottom' : ''" :class="index === 0 ? 'magrin-bottom' : ''"
> >
<template #expandIcon><CaretDownSmallIcon class="text-[var(--td-brand-color)]" /></template> <!-- <template #expandIcon><CaretDownSmallIcon class="text-[var(--td-brand-color)]" /></template> -->
<template #header> <template #header>
<t-checkbox v-model="item.selected" @change="handleSelectAll(item)">{{ item.menuName }}</t-checkbox> <t-checkbox v-model="item.selected" @change="handleSelectAll(item)">{{ item.menuName }}</t-checkbox>
</template> </template>
...@@ -75,7 +75,6 @@ function findNodeById(tree: ResMenuTree[], id: string) { ...@@ -75,7 +75,6 @@ function findNodeById(tree: ResMenuTree[], id: string) {
} }
}) })
} }
const handleSelectAll = (itx: ResMenuTree) => { const handleSelectAll = (itx: ResMenuTree) => {
// 勾选则需要勾选父级 // 勾选则需要勾选父级
if (itx.selected) { if (itx.selected) {
...@@ -119,7 +118,6 @@ const getData = () => { ...@@ -119,7 +118,6 @@ const getData = () => {
getMenuTree({ roleId: props.roleId, condMenuName: props.condMenuName }) getMenuTree({ roleId: props.roleId, condMenuName: props.condMenuName })
.then(res => { .then(res => {
if (Array.isArray(res.data)) { if (Array.isArray(res.data)) {
// 检查 res.data 是否为数组
menuTree.value = res.data as ResMenuTree[] menuTree.value = res.data as ResMenuTree[]
} else { } else {
menuTree.value = [] // 如果不是数组,设置为空数组 menuTree.value = [] // 如果不是数组,设置为空数组
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-28 15:01:02 * @Date: 2024-11-28 15:01:02
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 11:09:59 * @LastEditTime: 2024-12-11 16:07:24
* @Description: 角色管理 * @Description: 角色管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
:pagination="pagination" :pagination="pagination"
@search-change="handleSearch" @search-change="handleSearch"
@clear="handleClear(true)" @clear="handleClear(true)"
@on-search="onSearch"
@page-change="handlePage" @page-change="handlePage"
> >
<template #header-left> <template #header-left>
...@@ -157,6 +158,11 @@ const handleSearch = (params: Record<string, any>) => { ...@@ -157,6 +158,11 @@ const handleSearch = (params: Record<string, any>) => {
getData() getData()
} }
// 搜索
const onSearch = (params: Record<string, any>) => {
searchParams.value = params
}
// 清空搜索条件 // 清空搜索条件
const handleClear = (flge: boolean | null) => { const handleClear = (flge: boolean | null) => {
if (flge) { if (flge) {
......
...@@ -119,15 +119,15 @@ const getData = () => { ...@@ -119,15 +119,15 @@ const getData = () => {
const dataPermissions = (row: ResUserList) => { const dataPermissions = (row: ResUserList) => {
const areaPermissions = row.areaPermissions || [] const areaPermissions = row.areaPermissions || []
const rolePermissions = row.rolePermissions || [] const rolePermissions = row.rolePermissions || []
const areaPermissionsTxt = areaPermissions.map((val: { name: string }) => val.name).join(',') || '-' const areaPermissionsTxt = areaPermissions.map((val: { name: string }) => val.name).join(';') || '-'
const rolePermissionsTxt = rolePermissions.map((val: { name: string }) => val.name).join(',') || '-' const rolePermissionsTxt = rolePermissions.map((val: { name: string }) => val.name).join(';') || '-'
return { areaPermissionsTxt, rolePermissionsTxt } return { areaPermissionsTxt, rolePermissionsTxt }
} }
const functionPermission = (row: ResUserList) => { const functionPermission = (row: ResUserList) => {
const buttonNames = row.buttonNames || [] const buttonNames = row.buttonNames || []
return row.menuName || '-' + (buttonNames.length ? '(' + buttonNames.join(',') + ')' : '') return row.menuName || '-' + (buttonNames.length ? '(' + buttonNames.join(';') + ')' : '')
} }
// 合并单元格 // 合并单元格
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-28 15:01:02 * @Date: 2024-11-28 15:01:02
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 11:10:10 * @LastEditTime: 2024-12-11 16:20:34
* @Description: 用户管理 * @Description: 用户管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
:pagination="pagination" :pagination="pagination"
@search-change="handleSearch" @search-change="handleSearch"
@clear="handleClear(true)" @clear="handleClear(true)"
@on-search="onSearch"
@page-change="handlePage" @page-change="handlePage"
> >
<template #header-left> <template #header-left>
...@@ -169,6 +170,11 @@ const columns: PrimaryTableCol[] = [ ...@@ -169,6 +170,11 @@ const columns: PrimaryTableCol[] = [
// 表格数据,自行规范ts // 表格数据,自行规范ts
const tableData = ref<ResUserList[]>([]) const tableData = ref<ResUserList[]>([])
// 搜索
const onSearch = (params: Record<string, any>) => {
searchParams.value = params
}
// 获取表格数据接口 // 获取表格数据接口
const getData = () => { const getData = () => {
loading.value = true loading.value = true
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论