提交 bd00dd49 authored 作者: xiejiang's avatar xiejiang

style: 修改页面还原度

上级 789504b0
......@@ -16,9 +16,9 @@ VITE_PUBLIC_PATH = /
VITE_DROP_CONSOLE = true
# 开发环境接口地址
# VITE_API_URL = http://api.pge.seevin.com
VITE_API_URL = https://api.iep.seevin.com
# 汪洋
VITE_API_URL = http://172.16.3.197:8095
# VITE_API_URL = http://172.16.3.197:8095
# 邹琪涛
# VITE_API_URL = https://e28e-14-105-62-130.ngrok-free.app
......
......@@ -13,22 +13,7 @@
</template>
<script setup lang="ts">
// import { useUserStore } from '@/stores/modules/user'
import { merge } from 'lodash-es'
// const userStore = useUserStore()
// const userInfo = computed(() => userStore.userInfo)
// const updataVersionRef = ref()
// watch(userInfo, val => {
// if (!val) return
// nextTick(() => {
// console.log(updataVersionRef.value)
// if (val?.needUpd) {
// updataVersionRef?.value.open(val?.clientLastVersion)
// }
// })
// })
const globalConfig = merge({
mode: '',
......
<!--
* @Author: xiejiang
* @Date: 2024-12-08 09:25:35
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 20:21:06
* @Description:
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
<template>
<div class="back cursor-pointer" @click="hanldleClick">返回</div>
</template>
......@@ -13,10 +21,11 @@ const hanldleClick = () => {
<style lang="less" scoped>
.back {
width: 40px;
line-height: 24px;
height: 24px;
position: absolute;
text-align: center;
border-radius: 12px;
border-radius: 3px;
z-index: 999;
border: 1px solid var(--td-gray-color-2);
color: var(--td-font-gray-2);
......
......@@ -26,8 +26,8 @@
</template>
<template #footer>
<div class="flex items-center justify-center">
<t-button shape="round" variant="outline" @click="closeDrawer" v-if="cancelBtn">取消</t-button>
<t-button shape="round" @click="confirm" :loading="loading">{{ confirmBtnText }}</t-button>
<t-button variant="outline" @click="closeDrawer" v-if="cancelBtn">取消</t-button>
<t-button @click="confirm" :loading="loading">{{ confirmBtnText }}</t-button>
</div>
</template>
</t-drawer>
......
......@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-07 11:19:31
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 16:00:12
* @LastEditTime: 2024-12-11 20:21:42
* @Description: 表格页面容器组件
-->
<template>
......@@ -15,7 +15,7 @@
@on-search="onSeachChange"
@clear="handleClear"
/>
<div class="mt-[12px] p-[16px] bg-white flex-1 max-h-[calc(100%-64px)] overflow-auto">
<div class="mt-[12px] p-[12px] bg-white flex-1 max-h-[calc(100%-64px)] overflow-auto">
<!-- 表格头部操作区 -->
<div class="flex justify-between items-center">
<div class="header-left">
......@@ -23,7 +23,7 @@
</div>
<div class="header-right">
<div class="flex items-center justify-end gap-2">
<t-button v-if="props.showSetting" variant="outline" shape="round" @click="columnControllerVisible = true">
<t-button v-if="props.showSetting" variant="outline" @click="columnControllerVisible = true">
<template #icon><SettingIcon /></template>列配置
</t-button>
<slot name="header-right"></slot>
......@@ -32,7 +32,7 @@
</div>
<!-- 表格内容区 -->
<div class="mt-[16px]">
<div class="mt-[12px]">
<t-table
:row-key="rowKey"
v-bind="tableProps"
......@@ -101,7 +101,7 @@ const props = withDefaults(
showSetting: false,
stripe: true,
loading: false,
tableMaxheight: '600px',
tableMaxheight: '550px',
pageSizes: () => [10, 15, 30, 100],
pagination: () => ({ page: 1, limit: 10, total: 0 }),
tableData: () => [],
......@@ -191,6 +191,12 @@ const onPageChange = (pageInfo: { current: number; pageSize: number }) => {
padding-right: 20px;
}
:deep(.t-table--hoverable) {
tbody tr:hover {
background-color: var(--td-brand-color-1) !important; /* 鼠标悬停时的背景色 */
}
}
.cell-content {
width: 100%;
overflow: hidden;
......
......@@ -78,6 +78,7 @@ watch(
display: flex;
align-items: center;
padding: 0 4px;
height: 32px;
box-sizing: border-box;
border: 1px solid var(--td-gray-color-1);
border-radius: 3px;
......
......@@ -29,7 +29,7 @@
<div class="content-div text-[var(--td-font-gray-1)]" v-html="state?.description"></div>
</div>
<div class="flex justify-center">
<t-button class="mt-[60px] w-[200px]" @click="handleConfirm" shape="round">更新至最新版本</t-button>
<t-button class="mt-[60px] w-[200px]" @click="handleConfirm">更新至最新版本</t-button>
</div>
</main>
</template>
......
......@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang
* @LastEditTime: 2024-11-29 14:25:15
* @LastEditTime: 2024-12-11 20:20:47
* @Description:
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
......
......@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-28 15:00:25
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-10 17:44:56
* @LastEditTime: 2024-12-11 19:55:02
* @Description: 系统配置
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
*/
......
......@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-28 15:00:25
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-01 11:40:47
* @LastEditTime: 2024-12-11 19:53:35
* @Description: 系统权限路由
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
*/
......
......@@ -35,6 +35,7 @@ export interface UserInfo {
telephone: string
token: string
needUpd?: Boolean
userType: number | string
userId: string
userName: string
}
......
......@@ -16,6 +16,10 @@
transform: translateX(30px);
}
.t-button--variant-outline {
border-color: var(--td-gray-color-2);
}
.t-button--variant-base.t-button--theme-primary {
background: linear-gradient(135deg, var(--td-brand-color), var(--td-success-color-11));
}
......@@ -47,26 +51,33 @@
.inputUserName-del {
border-radius: 3px;
padding: 3px 4px;
padding: 0 4px;
margin-left: 8px;
height: 22px;
font-size: 12px;
line-height: 22px;
box-sizing: border-box;
color: var(--td-font-gray-3);
background: var(--td-gray-color-1);
}
p {
margin: 8px 0;
margin: 0;
}
.t-tag--default {
background: var(--td-gray-color-1);
}
.t-input {
.t-input,
.t-textarea__inner {
border-color: var(--td-gray-color-2);
}
// 表格
.t-table {
// min-width: 1200px;
thead th {
background: var(--td-gray-color-1);
border: none;
......@@ -93,6 +104,11 @@ p {
font-size: 13px;
padding: 10px 16px;
}
.t-table__content {
border-bottom: 1px solid var(--td-border);
border-top: 1px solid var(--td-border);
}
}
// t-dialog
......
......@@ -88,4 +88,5 @@
--td-white: #fff;
--td-border: var(--td-gray-color-2);
--td-text-color-primary: var(--td-font-gray-1);
--td-component-border: var(--td-gray-color-1);
}
......@@ -32,13 +32,11 @@ const MessageBox = function (type: number, props = {}) {
className: 't-dialog-new-class',
confirmBtn: {
content: '确定',
variant: 'base',
shape: 'round'
variant: 'base'
},
cancelBtn: {
content: '取消',
variant: 'base',
shape: 'round'
variant: 'base'
},
...props
})
......
......@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-12-01 10:37:37
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-09 15:48:06
* @LastEditTime: 2024-12-11 18:15:00
* @Description: 机构详情
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
......@@ -12,11 +12,9 @@
<main class="m-auto max-w-[1012px]">
<!-- 基本信息 -->
<PageTitle class="mb-[24px] mt-[12px]">
<div class="flex items-center">
<div class="flex items-center justify-between w-full">
<span>基本信息</span>
<t-button shape="round" class="ml-[12px]" theme="primary" size="small" variant="outline" @click="handelEdit">
编辑机构</t-button
>
<t-button class="ml-[12px]" theme="primary" size="small" @click="handelEdit"> 编辑机构</t-button>
</div>
</PageTitle>
<div class="flex flex-wrap">
......@@ -87,3 +85,13 @@ onMounted(() => {
getData()
})
</script>
<style lang="less" scoped>
:deep(.title) {
width: 100%;
}
:deep(.prefix) {
margin-top: 4px;
}
</style>
......@@ -2,14 +2,14 @@
* @Author: xiejiang
* @Date: 2024-12-01 10:26:11
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-09 17:44:36
* @LastEditTime: 2024-12-11 18:43:44
* @Description: 新增编辑角色
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
<template>
<div class="bg-white h-full p-[12px] institution-edit">
<Back />
<t-form ref="formRef" label-align="top" class="form-class" :rules="rules" :data="formData">
<t-form ref="formRef" label-align="top" class="form-class pt-[24px]" :rules="rules" :data="formData">
<t-form-item label="机构名称" name="companyName">
<t-input maxlength="20" v-model="formData.companyName" placeholder="请输入机构名称"> </t-input>
</t-form-item>
......@@ -39,6 +39,14 @@
</div>
<t-form-item label="机构服务结束时间" name="serviceTerminationTime" class="position-relative">
<template #label>
<div style="display: inline-flex">
<span>自定义标签</span>
<p class="text-[var(--td-warning-color-6)] m-[0] text-[12px] ml-[8px]">
(机构服务的结束时间为该日期当日23:59:59)
</p>
</div>
</template>
<t-date-picker
class="w-full"
v-model="formData.serviceTerminationTime"
......@@ -47,7 +55,6 @@
:disable-date="{ before: dayjs().subtract(1, 'day').format('YYYY-MM-DD') }"
placeholder="请选择时间"
/>
<p class="text-[var(--td-warning-color-6)] text-[12px] m-0 times">机构服务的结束时间为该日期当日23:59:59</p>
</t-form-item>
<t-form-item label="机构备注" name="remark">
......@@ -57,9 +64,7 @@
<FooterFixBtn>
<template #button>
<t-button shape="round" theme="primary" :loading="submitLoading" @click="handleConfirm">
保存</t-button
></template
<t-button theme="primary" :loading="submitLoading" @click="handleConfirm"> 保存</t-button></template
>
</FooterFixBtn>
</div>
......@@ -233,6 +238,7 @@ onMounted(() => {
.info {
padding: 20px 16px;
border-radius: 3px;
margin-bottom: 24px;
background-color: var(--td-gray-color-1);
}
......@@ -242,5 +248,9 @@ onMounted(() => {
top: 44px;
}
}
:deep(.t-radio__label) {
color: var(--td-font-gray-2);
}
}
</style>
......@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-28 15:01:02
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 16:09:04
* @LastEditTime: 2024-12-11 20:19:19
* @Description: 机构管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
......@@ -30,7 +30,7 @@
<template #header-right>
<div class="flex items-center justify-end gap-2">
<t-button shape="round" theme="primary" @click="handelEdit(null)">
<t-button theme="primary" @click="handelEdit(null)">
<template #icon><AddIcon /></template>
添加机构</t-button
>
......@@ -67,6 +67,10 @@ import {
import { ResDictionary } from '@/api/interface/dectionory/index'
import { getGetDictDataByName } from '@/api/modules/dectionory/index'
defineOptions({
name: 'institution'
})
const { setBreadcrumb } = useBasic()
const router = useRouter()
......@@ -189,12 +193,16 @@ const columns: PrimaryTableCol[] = [
title: '服务状态',
colKey: 'serviceStatus',
cell: (h, { row }) => {
return (
<div class='flex items-center'>
const html =
row.serviceStatus == '0' ? (
<span>-</span>
) : (
<>
<div class={'dot ' + statusTxt(row.serviceStatus + 1)?.class}></div>
<span class={statusTxt(row.serviceStatus + 1)?.class}>{row.serviceStatus == 1 ? '服务中' : '已结束'}</span>
</div>
</>
)
return <div class='flex items-center'>{html}</div>
}
},
{ title: '机构备注', colKey: 'remark' },
......@@ -202,6 +210,7 @@ const columns: PrimaryTableCol[] = [
{
title: '添加人',
colKey: 'inputUserName',
width: 120,
cell: (h, { row }) => {
return (
<div class='flex items-center justify-between'>
......@@ -215,7 +224,7 @@ const columns: PrimaryTableCol[] = [
)
}
},
{ title: '操作', colKey: 'operation', fixed: 'right', width: 260 }
{ title: '操作', colKey: 'operation', fixed: 'right', width: 200 }
]
// 表格数据,自行规范ts
......
......@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-05 10:14:56
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 15:52:07
* @LastEditTime: 2024-12-11 18:47:47
* @Description: 首页
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
......@@ -21,10 +21,13 @@
<div class="home-user flex flex-col items-center justify-center text-right">
<p>
<span>角色:</span>
<template v-if="userInfo?.userType == 2"><span>超级管理员</span></template>
<template v-else>
<span class="max-w-[calc(100%-90px)]">
<span v-for="v in userInfo?.roleNames || []" :key="v"> {{ v }}</span></span
>
<span v-if="!userInfo?.roleNames.length">-</span>
<span v-if="!userInfo?.roleNames.length">-</span></template
>
</p>
<p>
<span>上次登录:</span>
......
......@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-05 10:14:56
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 14:15:44
* @LastEditTime: 2024-12-11 17:20:34
* @Description: 登录
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
......@@ -58,12 +58,7 @@
</span>
</t-form-item>
<t-form-item>
<t-button
class="mt-[60px] w-full text-[16px]"
:disabled="isLoginButtonDisable"
type="submit"
size="large"
shape="round"
<t-button class="mt-[60px] w-full text-[16px]" :disabled="isLoginButtonDisable" type="submit" size="large"
>登 录</t-button
>
</t-form-item>
......
......@@ -161,7 +161,7 @@ const columns: PrimaryTableCol[] = [
{
title: '操作',
colKey: 'operation',
width: 100,
width: 150,
cell: (h, { row }: { row: any }) => {
return (
<div class='flex items-center'>
......
......@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 16:20:23
* @LastEditTime: 2024-12-11 20:20:12
* @Description: 系统字典
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
......@@ -30,7 +30,7 @@
<template #header-right>
<div class="flex items-center justify-end gap-2">
<t-button shape="round" theme="primary" @click="handelEdit(null)">
<t-button theme="primary" @click="handelEdit(null)">
<template #icon><AddIcon /></template>
新增字典</t-button
>
......@@ -69,6 +69,10 @@ import {
} from '@/api/modules/dectionory'
import DictionaryEdit from './page/dictionary-edit.vue'
defineOptions({
name: 'dictionary'
})
const { setBreadcrumb } = useBasic()
const router = useRouter()
......@@ -161,6 +165,7 @@ const columns: PrimaryTableCol[] = [
{
title: '添加人',
colKey: 'inputUserName',
width: 120,
cell: (h, { row }) => {
return (
<div class='flex items-center justify-between'>
......@@ -175,7 +180,7 @@ const columns: PrimaryTableCol[] = [
}
},
{ title: '添加时间', colKey: 'inputTime' },
{ title: '操作', colKey: 'operation', fixed: 'right', width: 260 }
{ title: '操作', colKey: 'operation', fixed: 'right', width: 230 }
]
// 表格数据,自行规范ts
......
......@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-10 11:24:22
* @LastEditTime: 2024-12-11 18:16:42
* @Description: 系统字典-新增编辑字典
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
......@@ -30,7 +30,7 @@
<t-input maxlength="50" v-model="formData.dictCode" placeholder="请输入字典编码"> </t-input>
</t-form-item>
<t-form-item label="字典属性">
<div class="flex-col">
<div class="flex-col mt-[16px]">
<div class="flex">
<span class="mr-[24px] text-[var(--td-font-gray-1)]">编辑</span>
<t-radio-group v-model="formData.isAllowEdit">
......@@ -38,7 +38,7 @@
<t-radio :value="0">不允许编辑</t-radio>
</t-radio-group>
</div>
<div class="flex my-[8px]">
<div class="flex my-[16px]">
<span class="mr-[24px] text-[var(--td-font-gray-1)]">子集</span>
<t-radio-group v-model="formData.isAllowAddsub">
<t-radio :value="1">允许添加子集</t-radio>
......
......@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 16:20:08
* @LastEditTime: 2024-12-11 20:00:34
* @Description: 菜单管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
......@@ -24,7 +24,7 @@
@on-search="onSearch"
@search-change="handleSearch"
@page-change="handlePage"
@clear="handleSearch({})"
@clear="handleClear(true)"
table-maxheight="550px"
class="max-h-[calc(100%-50px)]"
>
......@@ -38,13 +38,13 @@
/></template>
<template #header-right>
<div class="flex items-center justify-end gap-2">
<t-button variant="outline" shape="round" @click="handleLog">
<t-button variant="outline" @click="handleLog">
<template #icon><RootListIcon /></template>操作日志</t-button
>
<t-button variant="outline" shape="round" @click="handleSort">
<t-button variant="outline" @click="handleSort">
<template #icon><UnfoldMoreIcon /></template>菜单排序</t-button
>
<t-button shape="round" theme="primary" @click="handleEdit(null)">
<t-button theme="primary" @click="handleEdit(null)">
<template #icon><AddIcon /></template>
新增菜单</t-button
>
......@@ -79,7 +79,7 @@
</div>
</template>
<script setup lang="tsx" name="sys-menu">
<script setup lang="tsx">
import { PrimaryTableCol, MessagePlugin } from 'tdesign-vue-next'
import type { filterItemProp } from 'src/components/PageFilters/interface/index'
import type { Pagination } from 'src/components/PageContainer/interface/index'
......@@ -93,6 +93,10 @@ import MenuEdit from './page/menu-edit.vue'
import MenuLog from './page/menu-log.vue'
import MenuSort from './page/menu-sort.vue'
defineOptions({
name: 'sys-menu'
})
const { setBreadcrumb } = useBasic()
// 标签页
const tabValue = ref(0)
......@@ -157,6 +161,7 @@ const columns: PrimaryTableCol[] = [
{
title: '创建人',
colKey: 'inputUserName',
width: 120,
cell: (h, { row }) => {
return (
<div class='flex items-center justify-between'>
......@@ -170,7 +175,7 @@ const columns: PrimaryTableCol[] = [
)
}
},
{ title: '操作', colKey: 'operation', width: 184 }
{ title: '操作', colKey: 'operation', fixed: 'right', width: 160 }
]
// 标签页
// 表格数据
......
......@@ -5,14 +5,15 @@
placeholder="操作人姓名"
v-model="condInputUserName"
@on-search="handleSearch"
@clear="handleSearch"
class="mb-[18px]"
/>
<t-table
:data="tableData"
:columns="columns"
:loading="loading"
max-height="400px"
@page-change="onPageChange"
max-height="750px"
:pagination="pagination"
>
<!-- 保留自定义列插槽 -->
......@@ -42,6 +43,11 @@ const pagination = ref<PaginationProps>({
})
// 表格columns配置
const columns: PrimaryTableCol[] = [
{
title: '序号',
colKey: 'serial-number',
width: 70
},
{ title: '操作人', colKey: 'inputUserName' },
{ title: '操作时间', colKey: 'inputTime' },
{
......@@ -108,5 +114,3 @@ defineExpose({
close
})
</script>
<style lang="less" scoped></style>
......@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 16:06:52
* @LastEditTime: 2024-12-11 20:00:51
* @Description: 版本管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
......@@ -28,11 +28,11 @@
class="max-h-[calc(100%-50px)]"
>
<template #header-left>
<p class="text-[12px] text-[var(--td-font-gray-1)]">累计更新:{{ publishedNum }}</p>
<p class="text-[12px] text-[var(--td-font-gray-1)] m-[0]">累计更新:{{ publishedNum }}</p>
</template>
<template #header-right>
<div class="flex items-center justify-end gap-2">
<t-button shape="round" theme="primary" @click="handleEdit(null)">
<t-button theme="primary" @click="handleEdit(null)">
<template #icon><AddIcon /></template>
添加版本</t-button
>
......@@ -79,6 +79,10 @@ import { statusVersionTxt } from '@/utils/status'
import VersionEdit from './page/version-edit.vue'
import VersionDetail from './page/version-detail.vue'
defineOptions({
name: 'version'
})
const { setBreadcrumb } = useBasic()
// 标签页
const tabValue = ref(1)
......@@ -151,6 +155,7 @@ const columns: PrimaryTableCol[] = [
{
title: '添加人',
colKey: 'inputUserName',
width: 120,
cell: (h, { row }) => {
return (
<div class='flex items-center justify-between'>
......@@ -164,7 +169,7 @@ const columns: PrimaryTableCol[] = [
)
}
},
{ title: '操作', colKey: 'operation', width: 220 }
{ title: '操作', colKey: 'operation', fixed: 'right', width: 220 }
]
// 标签页
const publishedNum = ref<string | number>('')
......
......@@ -2,12 +2,12 @@
* @Author: xiejiang
* @Date: 2024-12-08 09:25:35
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-10 18:05:37
* @LastEditTime: 2024-12-11 20:23:37
* @Description:
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
<template>
<Drawer :drawer-visible="drawerVisible" width="480px" title="版本详情" @close="close" :footer="false">
<Drawer :drawer-visible="drawerVisible" width="960px" title="版本详情" @close="close" :footer="false">
<InfoLable class="mb-[16px]" label="当前终端" :value="state.platformType == 1 ? '平台端' : '机构端'" />
<InfoLable class="mb-[16px]" label="版本号" :value="state.version" />
<InfoLable class="mb-[16px]" label="更新说明"><div v-html="state.description || '-'"></div> </InfoLable>
......@@ -85,6 +85,6 @@ defineExpose({
<style lang="less" scoped>
:deep(.info-label__label) {
width: 70px;
min-width: 70px;
}
</style>
<template>
<Drawer
:drawer-visible="drawerVisible"
width="480px"
width="960px"
:title="title"
:loading="submitLoading"
confirm-btn-text="保存"
......
......@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 10:17:44
* @LastEditTime: 2024-12-11 20:01:03
* @Description: 权限配置
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
......@@ -71,12 +71,10 @@
</div>
<FooterFixBtn>
<template #button>
<t-button shape="round" variant="outline" class="mr-[16px]" @click="handleClear">{{
<t-button variant="outline" class="mr-[16px]" @click="handleClear">{{
tabValue === 1 ? '清空' : '应用至其他菜单'
}}</t-button>
<t-button shape="round" theme="primary" :loading="submitLoading" @click="handleConfirm">
保存</t-button
></template
<t-button theme="primary" :loading="submitLoading" @click="handleConfirm"> 保存</t-button></template
>
</FooterFixBtn>
</div>
......@@ -90,6 +88,10 @@ import Capabilities from './page/capabilities.vue'
import DataPermissions from './page/data-permissions.vue'
import { useBasic } from '@/hooks/useBasic'
defineOptions({
name: 'authority'
})
const { setBreadcrumb } = useBasic()
// 左边角色相关
const roleName = ref('')
......@@ -176,6 +178,7 @@ onMounted(() => {
.authority {
display: flex;
max-height: calc(100% - 50px);
width: 100%;
.left {
box-sizing: border-box;
......@@ -186,20 +189,24 @@ onMounted(() => {
&-list {
padding: 0;
width: 250px;
height: calc(100% - 118px);
height: calc(100% - 50px);
overflow: auto;
padding-right: 8px;
li {
list-style: none;
padding: 8px;
height: 40px;
box-sizing: border-box;
line-height: 40px;
font-size: 13px;
cursor: pointer;
color: var(--td-font-color-2);
color: var(--td-font-gray-2);
}
li:hover {
border-radius: 8px;
color: var(--td-font-color-2);
color: var(--td-font-gray-2);
background-color: var(--td-gray-color-1);
}
......@@ -218,6 +225,18 @@ onMounted(() => {
.right {
flex: 1;
min-width: 920px;
overflow: auto;
height: 100%;
position: relative;
.t-tabs {
position: sticky;
top: 0;
left: 0;
width: 100%;
z-index: 9;
}
}
}
</style>
......@@ -2,12 +2,12 @@
* @Author: xiejiang
* @Date: 2024-12-05 17:16:22
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 16:47:06
* @LastEditTime: 2024-12-11 17:31:53
* @Description: 功能权限
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
<template>
<div class="p-[16px] capabilities" v-loading="loading">
<div class="p-[16px] pt-[0] capabilities" v-loading="loading">
<t-collapse :borderless="true" default-expand-all :expand-on-row-click="false" v-if="!loading">
<t-collapse-panel
v-for="(item, index) in menuTree"
......@@ -158,17 +158,26 @@ defineExpose({
.page-auth {
border: 1px solid var(--td-border);
padding: 10px 16px;
min-width: 138px;
margin-top: -1px;
display: flex;
width: 230px;
box-sizing: border-box;
align-items: center;
:deep(.t-checkbox) {
width: 100%;
}
:deep(.t-checkbox__label) {
max-width: calc(100% - 30px);
}
}
.page-btn {
border: 1px solid var(--td-border);
border-left: none;
margin-top: -1px;
padding: 7px 9px;
padding: 7px 9px 7px 16px;
flex: 1;
display: flex;
flex-wrap: wrap;
......
......@@ -5,20 +5,29 @@
<SearchWithButton
width="240px"
class="my-[24px]"
class="my-[16px]"
placeholder="搜索菜单功能名称"
v-model="condMenuName"
@on-search="getData"
@clear="getData"
/>
<t-tree :data="menuTree" :actived="[menuId]" @active="onTreeAcitve" activable hover transition> </t-tree>
<t-tree
:data="menuTree"
v-model:expanded="expandeds"
:actived="[menuId]"
@active="onTreeAcitve"
activable
hover
transition
>
</t-tree>
</div>
<div class="right">
<PageTitle title="数据权限" class="mb-[24px]" />
<div class="flex items-center mb-[24px]">
<span class="mr-[24px]">通用范围</span>
<span class="mr-[38px]">通用范围</span>
<t-checkbox class="text-[var(--td-font-gray-2)]" :default-checked="true" readonly>本人创建数据</t-checkbox>
</div>
<div class="flex mb-[24px] w-full">
......@@ -94,6 +103,7 @@ const condMenuName = ref('')
const loading = ref(false)
const menuTree = ref<ResMenuTree[]>([])
const menuId = ref('')
const props = defineProps({
roleId: {
type: String,
......@@ -105,6 +115,8 @@ const props = defineProps({
}
})
const expandeds = ref<string[]>()
watch([toRef(props, 'roleId')], () => {
getData()
})
......@@ -115,7 +127,9 @@ watch(toRef(props, 'tabValue'), (val: number) => {
}
})
watch(menuId, () => {
watch(menuId, val => {
const expands = expandeds.value || []
expandeds.value = [...new Set(expands.concat(val as string))]
emit('updateMenuId', menuId.value)
})
......@@ -265,6 +279,7 @@ defineExpose({
<style lang="less" scoped>
.permissions {
display: flex;
box-sizing: border-box;
.left {
box-sizing: border-box;
......@@ -276,6 +291,8 @@ defineExpose({
.right {
flex: 1;
padding: 16px;
// max-height: calc(100% - 150px);
// overflow: auto;
:deep(.t-radio-group.t-radio-group--filled) {
padding: 0;
......@@ -290,10 +307,17 @@ defineExpose({
&-main {
padding: 16px;
border: 1px solid var(--td-border);
max-height: calc(100% - 150px);
min-height: 80px;
overflow: auto;
:deep(.t-checkbox) {
width: 178px;
color: var(--td-font-gray-1);
:deep(.t-checkbox__label) {
max-width: 150px;
color: var(--td-font-gray-2);
.t-checkbox__label {
max-width: calc(100% - 24px);
}
}
}
}
......
......@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-28 15:01:02
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 16:07:24
* @LastEditTime: 2024-12-11 20:01:18
* @Description: 角色管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
......@@ -29,7 +29,7 @@
/></template>
<template #header-right>
<div class="flex items-center justify-end gap-2" v-if="buttonPms('role-add-btn')">
<t-button shape="round" theme="primary" @click="handelEdit(null)">
<t-button theme="primary" @click="handelEdit(null)">
<template #icon><AddIcon /></template>
添加角色</t-button
>
......@@ -50,7 +50,7 @@
</div>
</template>
<script setup lang="tsx" name="users">
<script setup lang="tsx">
import { useRouter } from 'vue-router'
import { PrimaryTableCol, MessagePlugin } from 'tdesign-vue-next'
import type { filterItemProp } from '@/components/PageFilters/interface/index'
......@@ -63,6 +63,10 @@ import RoleEdit from './page/role-edit.vue'
import { ResRoleList } from '@/api/interface/user-roles/index'
import { getRolePage, getRoleOperate } from '@/api/modules/user-roles/index'
defineOptions({
name: 'role'
})
const { setBreadcrumb } = useBasic()
const router = useRouter()
......@@ -130,6 +134,7 @@ const columns: PrimaryTableCol[] = [
{
title: '添加人',
colKey: 'inputUserName',
width: 120,
cell: (h, { row }) => {
return (
<div class='flex items-center justify-between'>
......@@ -143,7 +148,7 @@ const columns: PrimaryTableCol[] = [
)
}
},
{ title: '操作', colKey: 'operation', fixed: 'right', width: 260 }
{ title: '操作', colKey: 'operation', fixed: 'right', width: 240 }
]
// 表格数据,自行规范ts
......
......@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-28 15:01:02
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 16:20:34
* @LastEditTime: 2024-12-11 20:01:56
* @Description: 用户管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
......@@ -29,7 +29,7 @@
/></template>
<template #header-right>
<div class="flex items-center justify-end gap-2" v-if="buttonPms('user-add-btn')">
<t-button shape="round" theme="primary" @click="handelEdit(null)">
<t-button theme="primary" @click="handelEdit(null)">
<template #icon><AddIcon /></template>
添加用户</t-button
>
......@@ -66,6 +66,10 @@ import UserEdit from './page/user-edit.vue'
import { ResUserList } from '@/api/interface/user-roles/index'
import { getUserList, getUserOperate } from '@/api/modules/user-roles/index'
defineOptions({
name: 'users'
})
const { setBreadcrumb } = useBasic()
const router = useRouter()
......@@ -151,6 +155,7 @@ const columns: PrimaryTableCol[] = [
{
title: '添加人',
colKey: 'inputUserName',
width: 120,
cell: (h, { row }) => {
return (
<div class='flex items-center justify-between'>
......@@ -164,7 +169,7 @@ const columns: PrimaryTableCol[] = [
)
}
},
{ title: '操作', colKey: 'operation', fixed: 'right', width: 220 }
{ title: '操作', colKey: 'operation', fixed: 'right', width: 160 }
]
// 表格数据,自行规范ts
......
/*
* @Author: zhanyoulin<zhanyoulin456@163.com>
* @Date: 2023-06-13 09:41:18
* @LastEditors: zhanyoulin
* @LastEditTime: 2023-06-29 18:04:37
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-11 19:24:03
* @Description:
*/
import { defineConfig, loadEnv, ConfigEnv, UserConfig } from 'vite'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论