Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
rsbuild-vue3-template
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
曾哲
rsbuild-vue3-template
Commits
aa430ea4
提交
aa430ea4
authored
12月 10, 2024
作者:
xiejiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 修复列表显示问题
上级
e6d99d88
隐藏空白字符变更
内嵌
并排
正在显示
21 个修改的文件
包含
250 行增加
和
102 行删除
+250
-102
index.ts
src/api/modules/menu/index.ts
+13
-1
update.png
src/assets/images/update.png
+0
-0
components.d.ts
src/components.d.ts
+2
-0
index.vue
src/components/PageContainer/index.vue
+13
-16
index.vue
src/components/UpdateVersion/index.vue
+45
-0
index.ts
src/stores/interface/index.ts
+2
-0
common.less
src/styles/common.less
+14
-0
index.ts
src/utils/index.ts
+6
-0
index.vue
src/views/customer/institution/index.vue
+16
-2
dictionary-subset.vue
src/views/sys-config/dictionary/dictionary-subset.vue
+4
-5
index.vue
src/views/sys-config/dictionary/index.vue
+21
-6
dictionary-subset-edit.vue
...ews/sys-config/dictionary/page/dictionary-subset-edit.vue
+1
-1
index.vue
src/views/sys-config/menu/index.vue
+16
-2
menu-edit.vue
src/views/sys-config/menu/page/menu-edit.vue
+1
-1
index.vue
src/views/sys-config/version/index.vue
+17
-3
version-detail.vue
src/views/sys-config/version/page/version-detail.vue
+6
-10
detail.vue
src/views/sys-permissions/role/detail.vue
+23
-17
index.vue
src/views/sys-permissions/role/index.vue
+16
-2
detail.vue
src/views/sys-permissions/user/detail.vue
+9
-11
index.vue
src/views/sys-permissions/user/index.vue
+24
-5
user-edit.vue
src/views/sys-permissions/user/page/user-edit.vue
+1
-20
没有找到文件。
src/api/modules/menu/index.ts
浏览文件 @
aa430ea4
...
...
@@ -25,7 +25,9 @@ const api = {
postSaveMenu
:
'/platform/permission/saveMenu'
,
// 保存角色菜单权限
postSaveDataRange
:
'/platform/permission/saveDataRange'
,
// 保存数据权限
getDataRange
:
'/platform/permission/dataRange'
,
// 查询角色的数据权限
postDataRangeClone
:
'/platform/permission/dataRange/clone'
// 应用数据权限至其他菜单
postDataRangeClone
:
'/platform/permission/dataRange/clone'
,
// 应用数据权限至其他菜单
postSaveUserClient
:
'/platform/version/saveUserClient'
// 保存用户客户端版本
}
/**
...
...
@@ -213,3 +215,13 @@ export const getDataRange = (params: { roleId: string; menuId: string }) => {
export
const
postDataRangeClone
=
(
data
:
{
roleId
:
string
;
sourceMenuId
:
string
;
targetMenuId
:
string
[]
})
=>
{
return
http
.
post
(
api
.
postDataRangeClone
,
data
)
}
/**
* @description 保存用户客户端版本
* @author 汪洋
* @docs http://api.seevin.com/project/669/interface/api/33363
* @param versionId 客户端版本号
*/
export
const
postSaveUserClient
=
(
data
:
{
versionId
:
string
})
=>
{
return
http
.
post
(
api
.
postSaveUserClient
,
data
)
}
src/assets/images/update.png
0 → 100644
浏览文件 @
aa430ea4
100.7 KB
src/components.d.ts
浏览文件 @
aa430ea4
...
...
@@ -68,6 +68,8 @@ declare module 'vue' {
TTextarea
:
typeof
import
(
'tdesign-vue-next'
)[
'Textarea'
]
TTooltip
:
typeof
import
(
'tdesign-vue-next'
)[
'Tooltip'
]
TTree
:
typeof
import
(
'tdesign-vue-next'
)[
'Tree'
]
UpdateDialog
:
typeof
import
(
'./components/UpdateDialog/index.vue'
)[
'default'
]
UpdateVersion
:
typeof
import
(
'./components/UpdateVersion/index.vue'
)[
'default'
]
Upload
:
typeof
import
(
'./components/Upload/index.vue'
)[
'default'
]
WangEditor
:
typeof
import
(
'./components/WangEditor/index.vue'
)[
'default'
]
}
...
...
src/components/PageContainer/index.vue
浏览文件 @
aa430ea4
...
...
@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-07 11:19:31
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-10 1
1:13
:57
* @LastEditTime: 2024-12-10 1
4:16
:57
* @Description: 表格页面容器组件
-->
<
template
>
...
...
@@ -47,21 +47,18 @@
@
sort-change=
"onSortChange"
>
<!-- 为每一列创建动态插槽 -->
<
template
#
default=
"{ row }"
>
<template
v-for=
"col in columns"
:key=
"col.colKey"
>
<template
v-if=
"col.colKey != 'operation'"
>
<t-tooltip
:content=
"row[col.colKey as string]"
placement=
"top"
theme=
"light"
overlay-class-name=
"custom-tooltip"
>
<div
class=
"cell-content"
>
{{
row
[
col
.
colKey
as
string
]
||
'-'
}}
</div>
</t-tooltip>
</
template
>
<
template
v-for=
"col in columns"
:key=
"col.colKey"
#[
soltName
(
col
)]="{
row
}"
>
<template
v-if=
"col.colKey != 'operation'"
>
<t-tooltip
:content=
"row[col.colKey as string]"
placement=
"top"
theme=
"light"
overlay-class-name=
"custom-tooltip"
>
<div
class=
"cell-content"
>
{{
row
[
col
.
colKey
as
string
]
||
'-'
}}
</div>
</t-tooltip>
</
template
>
</template>
<!-- 保留自定义列插槽 -->
<
template
v-for=
"[name] in Object.entries($slots)"
#[
name
]="
scope
"
>
<slot
:name=
"name"
v-bind=
"scope"
/>
...
...
@@ -73,11 +70,11 @@
</template>
<
script
setup
lang=
"tsx"
>
import
{
ref
,
computed
}
from
'vue
'
import
{
PrimaryTableCol
,
TableProps
}
from
'tdesign-vue-next
'
import
{
PageContainerProps
,
Pagination
}
from
'./interface'
import
PageFilters
from
'../PageFilters/index.vue'
import
{
filterItemProp
}
from
'../PageFilters/interface'
import
{
PrimaryTableCol
,
TableProps
}
from
'tdesign-vue-next
'
import
{
soltName
}
from
'@/utils
'
defineOptions
({
name
:
'PageContainer'
})
...
...
src/components/UpdateVersion/index.vue
0 → 100644
浏览文件 @
aa430ea4
<!--
* @Author: xiejiang
* @Date: 2024-12-10 15:36:04
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-10 15:46:52
* @Description: 更新版本弹窗
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
<
template
>
<Dialog
:dialog-visible=
"isShowPuzzleVcode"
width=
"640px"
:close-on-overlay-click=
"false"
@
close=
"isShowPuzzleVcode = false"
>
<template
#
body
>
<main
class=
"updata-main"
>
<div
class=
"flex items-center"
>
<span>
业务分支:
</span>
<span>
{{
state
.
platformType
==
1
?
'平台端'
:
'机构端'
}}
</span>
</div>
<div>
<span>
版本号:
</span>
<span>
{{
state
.
version
}}
</span>
</div>
<div>
<span>
更新说明:
</span>
<div
class=
"content-div"
v-html=
"state.description"
></div>
</div>
<!--
<t-button
type=
"primary"
size=
"small"
class=
"m-t-32"
@
click=
"handleSure"
:loading=
"loading"
>
{{
btmTitle
}}
</-button>
-->
<!--
<img
:src=
"bgImage"
alt=
""
/>
-->
</main>
</
template
>
</Dialog>
</template>
<
script
setup
lang=
"ts"
name=
"upadta-version"
>
import
{
ResVersion
}
from
'@/api/interface/version/index'
const
isShowPuzzleVcode
=
ref
(
false
)
const
state
=
reactive
<
ResVersion
>
({})
</
script
>
<
style
lang=
"less"
scoped
></
style
>
src/stores/interface/index.ts
浏览文件 @
aa430ea4
...
...
@@ -8,6 +8,7 @@
/* GlobalState */
import
{
ComputedRef
}
from
'vue'
import
{
ResVersion
}
from
'@/api/interface/version/index'
export
interface
GlobalState
{
isCollapse
:
boolean
...
...
@@ -28,6 +29,7 @@ export interface UserInfo {
loginAddress
?:
string
time
:
string
}
clientLastVersion
?:
ResVersion
status
:
string
telephone
:
string
token
:
string
...
...
src/styles/common.less
浏览文件 @
aa430ea4
...
...
@@ -39,6 +39,20 @@
box-shadow: none !important;
}
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.inputUserName-del {
border-radius: 3px;
padding: 3px 4px;
margin-left: 8px;
color: var(--td-font-gray-3);
background: var(--td-gray-color-1);
}
// 表格
.t-table {
thead th {
...
...
src/utils/index.ts
浏览文件 @
aa430ea4
import
{
RouteRecordRaw
}
from
'vue-router'
import
{
PrimaryTableCol
}
from
'tdesign-vue-next'
import
{
useAuthStore
}
from
'@/stores/modules/auth'
import
{
cloneDeep
}
from
'lodash-es'
export
const
EMPTY
=
'-'
// 空占位符
// 插槽名
export
const
soltName
=
(
col
:
PrimaryTableCol
)
=>
{
return
col
.
colKey
as
string
}
// 系统权限按钮
export
const
buttonPms
=
(
key
:
string
)
=>
{
const
userAuth
=
useAuthStore
()
...
...
src/views/customer/institution/index.vue
浏览文件 @
aa430ea4
...
...
@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-28 15:01:02
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-
09 16:35:49
* @LastEditTime: 2024-12-
10 15:21:08
* @Description: 机构管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
...
...
@@ -15,6 +15,7 @@
:loading=
"loading"
:pagination=
"pagination"
@
search-change=
"handleSearch"
@
clear=
"handleClear"
@
page-change=
"handlePage"
>
<template
#
header-left
>
...
...
@@ -176,7 +177,20 @@ const columns: PrimaryTableCol[] = [
},
{
title
:
'机构备注'
,
colKey
:
'remark'
},
{
title
:
'添加时间'
,
colKey
:
'inputTime'
},
{
title
:
'添加人'
,
colKey
:
'inputUserName'
},
{
title
:
'添加人'
,
colKey
:
'inputUserName'
,
cell
:
(
h
,
{
row
})
=>
{
return
(
<
div
class
=
'flex items-center justify-between'
>
<
div
class
=
{
row
.
inputUserDelFlag
?
'w-[calc(100%-58px)] ellipsis text-[var(--td-font-gray-3)]'
:
''
}
>
<
span
class
=
{
row
.
inputUserDelFlag
?
'text-[var(--td-font-gray-3)]'
:
''
}
>
{
row
.
inputUserName
||
'-'
}
<
/span
>
<
/div
>
{
row
.
inputUserDelFlag
?
<
span
class
=
'inputUserName-del'
>
已删除
<
/span> : ''
}
<
/div
>
)
}
},
{
title
:
'操作'
,
colKey
:
'operation'
,
fixed
:
'right'
,
width
:
260
}
]
...
...
src/views/sys-config/dictionary/dictionary-subset.vue
浏览文件 @
aa430ea4
...
...
@@ -40,11 +40,9 @@
<template
v-for=
"(_, name) in $slots"
#[
name
]="
scope
"
>
<slot
:name=
"name"
v-bind=
"scope"
/>
</
template
>
<
template
#
default=
"{ row }"
>
<template
v-for=
"col in columns"
:key=
"col.colKey"
>
<template
v-if=
"col.colKey != 'operation'"
>
<div
class=
"cell-content"
>
{{
row
[
col
.
colKey
as
string
]
||
'-'
}}
</div>
</
template
>
<
template
v-for=
"col in columns"
#[
soltName
(
col
)]="{
row
}"
:key=
"col.colKey"
>
<template
v-if=
"col.colKey != 'operation'"
>
<div
class=
"cell-content"
>
{{
row
[
col
.
colKey
as
string
]
||
'-'
}}
</div>
</
template
>
</template>
</t-table>
...
...
@@ -64,6 +62,7 @@ import { MessagePlugin, PrimaryTableCol, PaginationProps } from 'tdesign-vue-nex
import
{
ArrowDownIcon
,
ArrowUpIcon
}
from
'tdesign-icons-vue-next'
import
{
useBasic
}
from
'@/hooks/useBasic'
import
MessageBox
from
'@/utils/messageBox'
import
{
soltName
}
from
'@/utils'
import
{
dictionaryAttributeTxt
}
from
'@/utils/status'
import
{
ResDictionary
}
from
'@/api/interface/dectionory'
import
{
...
...
src/views/sys-config/dictionary/index.vue
浏览文件 @
aa430ea4
...
...
@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-
09 16:36:11
* @LastEditTime: 2024-12-
10 15:04:00
* @Description: 系统字典
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
...
...
@@ -15,6 +15,7 @@
:loading=
"loading"
:pagination=
"pagination"
@
search-change=
"handleSearch"
@
clear=
"handleClear"
@
page-change=
"handlePage"
>
<template
#
header-left
>
...
...
@@ -37,10 +38,11 @@
<
template
#
operation=
"{ row }"
>
<operate-btn
v-if=
"row.status != '2'"
content=
"启用"
@
click=
"handelStatus(row, 2)"
>
</operate-btn>
<operate-btn
v-if=
"row.isAllowEdit"
content=
"编辑"
@
click=
"handelEdit(row)"
>
</operate-btn>
<operate-btn
v-if=
"row.isAllowAddsub"
content=
"管理子集"
@
click=
"handelSubset(row)"
>
</operate-btn>
<operate-btn
v-if=
"row.isAllowEdit || row.status == '1'"
content=
"编辑"
@
click=
"handelEdit(row)"
>
</operate-btn>
<operate-btn
v-if=
"row.isAllowAddsub || row.status == '1'"
content=
"管理子集"
@
click=
"handelSubset(row)"
>
</operate-btn>
<operate-btn
v-if=
"row.status == '2'"
content=
"停用"
@
click=
"handelStatus(row, 1)"
>
</operate-btn>
<operate-btn
v-if=
"row.isAllowDelete"
content=
"删除"
@
click=
"handelDel(row)"
></operate-btn>
<operate-btn
v-if=
"row.isAllowDelete
|| row.status == '1'
"
content=
"删除"
@
click=
"handelDel(row)"
></operate-btn>
</
template
>
</PageContainer>
...
...
@@ -154,8 +156,21 @@ const columns: PrimaryTableCol[] = [
)
}
},
{
title
:
'添加人'
,
colKey
:
'inputUserName'
},
{
title
:
'添加 时间'
,
colKey
:
'inputTime'
},
{
title
:
'添加人'
,
colKey
:
'inputUserName'
,
cell
:
(
h
,
{
row
})
=>
{
return
(
<
div
class
=
'flex items-center justify-between'
>
<
div
class
=
{
row
.
inputUserDelFlag
?
'w-[calc(100%-58px)] ellipsis text-[var(--td-font-gray-3)]'
:
''
}
>
<
span
class
=
{
row
.
inputUserDelFlag
?
'text-[var(--td-font-gray-3)]'
:
''
}
>
{
row
.
inputUserName
||
'-'
}
<
/span
>
<
/div
>
{
row
.
inputUserDelFlag
?
<
span
class
=
'inputUserName-del'
>
已删除
<
/span> : ''
}
<
/div
>
)
}
},
{
title
:
'添加时间'
,
colKey
:
'inputTime'
},
{
title
:
'操作'
,
colKey
:
'operation'
,
fixed
:
'right'
,
width
:
260
}
]
...
...
src/views/sys-config/dictionary/page/dictionary-subset-edit.vue
浏览文件 @
aa430ea4
...
...
@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-12-02 18:41:38
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-
05 17:05:19
* @LastEditTime: 2024-12-
10 14:44:24
* @Description: 新增编辑枚举值
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
...
...
src/views/sys-config/menu/index.vue
浏览文件 @
aa430ea4
...
...
@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-
09 16:40:0
3
* @LastEditTime: 2024-12-
10 15:19:3
3
* @Description: 菜单管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
...
...
@@ -23,6 +23,7 @@
:show-tree=
"true"
@
search-change=
"handleSearch"
@
page-change=
"handlePage"
@
clear=
"handleClear"
table-maxheight=
"550px"
class=
"max-h-[calc(100%-50px)]"
>
...
...
@@ -151,7 +152,20 @@ const columns: PrimaryTableCol[] = [
}
},
{
title
:
'创建时间'
,
colKey
:
'inputTime'
},
{
title
:
'创建人'
,
colKey
:
'inputUserName'
,
width
:
104
},
{
title
:
'创建人'
,
colKey
:
'inputUserName'
,
cell
:
(
h
,
{
row
})
=>
{
return
(
<
div
class
=
'flex items-center justify-between'
>
<
div
class
=
{
row
.
inputUserDelFlag
?
'w-[calc(100%-58px)] ellipsis text-[var(--td-font-gray-3)]'
:
''
}
>
<
span
class
=
{
row
.
inputUserDelFlag
?
'text-[var(--td-font-gray-3)]'
:
''
}
>
{
row
.
inputUserName
||
'-'
}
<
/span
>
<
/div
>
{
row
.
inputUserDelFlag
?
<
span
class
=
'inputUserName-del'
>
已删除
<
/span> : ''
}
<
/div
>
)
}
},
{
title
:
'操作'
,
colKey
:
'operation'
,
width
:
184
}
]
// 标签页
...
...
src/views/sys-config/menu/page/menu-edit.vue
浏览文件 @
aa430ea4
...
...
@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-10 11:
29:57
* @LastEditTime: 2024-12-10 11:
40:24
* @Description: 菜单管理-新增编辑菜单
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
...
...
src/views/sys-config/version/index.vue
浏览文件 @
aa430ea4
...
...
@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-
09 18:22:42
* @LastEditTime: 2024-12-
10 15:20:00
* @Description: 版本管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
...
...
@@ -107,7 +107,8 @@ const filterConditions = ref<filterItemProp[]>([
$attrs
:
{
'disable-date'
:
(
date
:
string
)
=>
{
return
dayjs
(
date
).
isBefore
(
dayjs
().
format
(
'YYYY-MM'
))
||
dayjs
(
date
).
isAfter
(
dayjs
().
format
(
'YYYY-MM-DD'
))
}
},
mode
:
'month'
}
},
{
...
...
@@ -145,7 +146,20 @@ const columns: PrimaryTableCol[] = [
{
title
:
'版本备注'
,
colKey
:
'remark'
},
{
title
:
'上线时间'
,
colKey
:
'onlineTime'
},
{
title
:
'添加时间'
,
colKey
:
'inputTime'
},
{
title
:
'添加人'
,
colKey
:
'inputUserName'
,
width
:
104
},
{
title
:
'添加人'
,
colKey
:
'inputUserName'
,
cell
:
(
h
,
{
row
})
=>
{
return
(
<
div
class
=
'flex items-center justify-between'
>
<
div
class
=
{
row
.
inputUserDelFlag
?
'w-[calc(100%-58px)] ellipsis text-[var(--td-font-gray-3)]'
:
''
}
>
<
span
class
=
{
row
.
inputUserDelFlag
?
'text-[var(--td-font-gray-3)]'
:
''
}
>
{
row
.
inputUserName
||
'-'
}
<
/span
>
<
/div
>
{
row
.
inputUserDelFlag
?
<
span
class
=
'inputUserName-del'
>
已删除
<
/span> : ''
}
<
/div
>
)
}
},
{
title
:
'操作'
,
colKey
:
'operation'
,
width
:
220
}
]
// 标签页
...
...
src/views/sys-config/version/page/version-detail.vue
浏览文件 @
aa430ea4
...
...
@@ -2,13 +2,13 @@
* @Author: xiejiang
* @Date: 2024-12-08 09:25:35
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-10 1
1:22:08
* @LastEditTime: 2024-12-10 1
4:18:35
* @Description:
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
<
template
>
<Drawer
:drawer-visible=
"drawerVisible"
width=
"480px"
title=
"版本详情"
@
close=
"close"
:footer=
"false"
>
<InfoLable
class=
"mb-[16px]"
label=
"当前终端"
:value=
"
props.tab
Type == 1 ? '平台端' : '机构端'"
/>
<InfoLable
class=
"mb-[16px]"
label=
"当前终端"
:value=
"
state.platform
Type == 1 ? '平台端' : '机构端'"
/>
<InfoLable
class=
"mb-[16px]"
label=
"版本号"
:value=
"state.version"
/>
<InfoLable
class=
"mb-[16px]"
label=
"更新说明"
><div
v-html=
"state.description || '-'"
></div>
</InfoLable>
<InfoLable
class=
"mb-[16px]"
label=
"版本备注"
:value=
"state.remark || '-'"
/>
...
...
@@ -20,11 +20,9 @@
<template
v-for=
"(_, name) in $slots"
#[
name
]="
scope
"
>
<slot
:name=
"name"
v-bind=
"scope"
/>
</
template
>
<
template
#
default=
"{ row }"
>
<template
v-for=
"col in columns"
:key=
"col.colKey"
>
<template
v-if=
"col.colKey != 'operation'"
>
<div
class=
"cell-content"
>
{{
row
[
col
.
colKey
as
string
]
||
'-'
}}
</div>
</
template
>
<
template
v-for=
"col in columns"
#[
soltName
(
col
)]="{
row
}"
:key=
"col.colKey"
>
<template
v-if=
"col.colKey != 'operation'"
>
<div
class=
"cell-content"
>
{{
row
[
col
.
colKey
as
string
]
||
'-'
}}
</div>
</
template
>
</template>
</t-table>
...
...
@@ -34,11 +32,9 @@
<
script
setup
lang=
"tsx"
name=
"version-detail"
>
import
{
PrimaryTableCol
}
from
'tdesign-vue-next'
import
{
statusVersionTxt
}
from
'@/utils/status'
import
{
soltName
}
from
'@/utils'
import
{
getVersionDetail
}
from
'@/api/modules/version/index'
import
{
ResVersion
}
from
'@/api/interface/version'
const
props
=
defineProps
<
{
tabType
:
number
}
>
()
const
drawerVisible
=
ref
(
false
)
...
...
src/views/sys-permissions/role/detail.vue
浏览文件 @
aa430ea4
...
...
@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-12-01 10:37:37
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-
08 15:11:47
* @LastEditTime: 2024-12-
10 14:23:34
* @Description:
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
...
...
@@ -30,18 +30,18 @@
:data=
"tableData"
:columns=
"columns"
:loading=
"loading"
@
page-change=
"onLogsPageChange"
:pagination=
"pagination.total > 10 ? pagination : undefined"
>
<!-- 保留自定义列插槽 -->
<template
v-for=
"(_, name) in $slots"
#[
name
]="
scope
"
>
<slot
:name=
"name"
v-bind=
"scope"
/>
</
template
>
<
template
#
default=
"{ row }"
>
<template
v-for=
"col in columns"
:key=
"col.colKey"
>
<template
v-if=
"col.colKey != 'operation'"
>
<div
class=
"cell-content"
>
{{
row
[
col
.
colKey
as
string
]
||
'-'
}}
</div>
</
template
>
</template>
<template
v-for=
"col in columns"
#[
soltName
(
col
)]="
{ row }" :key="col.colKey">
<t-tooltip
:content=
"row[col.colKey as string]"
placement=
"top"
theme=
"light"
overlay-class-name=
"custom-tooltip"
>
<div
class=
"cell-content ellipsis"
>
{{
row
[
col
.
colKey
as
string
]
||
'-'
}}
</div>
</t-tooltip>
</
template
>
</t-table>
</main>
...
...
@@ -50,13 +50,15 @@
<
script
setup
lang=
"ts"
name=
"role-detail"
>
import
{
useRoute
}
from
'vue-router'
import
{
PrimaryTableCol
}
from
'tdesign-vue-next'
import
{
PrimaryTableCol
,
PaginationProps
}
from
'tdesign-vue-next'
import
{
useBasic
}
from
'@/hooks/useBasic'
import
{
ResRoleList
}
from
'@/api/interface/user-roles/index'
import
{
getRoleDetail
}
from
'@/api/modules/user-roles/index'
import
{
statusTxt
}
from
'@/utils/status'
import
{
soltName
}
from
'@/utils'
const
route
=
useRoute
()
const
{
setBreadcrumb
}
=
useBasic
()
const
state
=
ref
<
ResRoleList
>
()
...
...
@@ -67,11 +69,15 @@ const getData = () => {
}).
then
(
res
=>
{
state
.
value
=
res
.
data
tableData
.
value
=
res
.
data
?.
roleUsers
?.
list
||
[]
pagination
.
value
.
total
=
res
?.
recordsFiltered
as
number
pagination
.
value
.
total
=
res
.
data
?.
roleUsers
?.
total
as
number
})
}
const
{
setBreadcrumb
}
=
useBasic
()
const
onLogsPageChange
=
(
val
:
PaginationProps
)
=>
{
pagination
.
value
.
page
=
val
.
current
as
number
pagination
.
value
.
limit
=
val
.
pageSize
as
number
getData
()
}
const
loading
=
ref
(
false
)
...
...
@@ -91,9 +97,9 @@ const columns: PrimaryTableCol[] = [
},
{
title
:
'用户姓名'
,
colKey
:
'userName'
},
{
title
:
'手机号码'
,
colKey
:
'mobile'
},
{
title
:
'最近登录时间'
,
colKey
:
'
rol
e'
},
{
title
:
'最近登录IP'
,
colKey
:
'
role
'
},
{
title
:
'最近登录设备类型'
,
colKey
:
'
rol
e'
}
{
title
:
'最近登录时间'
,
colKey
:
'
tim
e'
},
{
title
:
'最近登录IP'
,
colKey
:
'
loginIp
'
},
{
title
:
'最近登录设备类型'
,
colKey
:
'
devic
e'
}
]
onMounted
(()
=>
{
...
...
src/views/sys-permissions/role/index.vue
浏览文件 @
aa430ea4
...
...
@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-28 15:01:02
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-
09 16:33:4
2
* @LastEditTime: 2024-12-
10 15:20:2
2
* @Description: 角色管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
...
...
@@ -15,6 +15,7 @@
:loading=
"loading"
:pagination=
"pagination"
@
search-change=
"handleSearch"
@
clear=
"handleClear"
@
page-change=
"handlePage"
>
<template
#
header-left
>
...
...
@@ -125,7 +126,20 @@ const columns: PrimaryTableCol[] = [
}
},
{
title
:
'添加时间'
,
colKey
:
'inputTime'
},
{
title
:
'添加人'
,
colKey
:
'inputUserName'
},
{
title
:
'添加人'
,
colKey
:
'inputUserName'
,
cell
:
(
h
,
{
row
})
=>
{
return
(
<
div
class
=
'flex items-center justify-between'
>
<
div
class
=
{
row
.
inputUserDelFlag
?
'w-[calc(100%-58px)] ellipsis text-[var(--td-font-gray-3)]'
:
''
}
>
<
span
class
=
{
row
.
inputUserDelFlag
?
'text-[var(--td-font-gray-3)]'
:
''
}
>
{
row
.
inputUserName
||
'-'
}
<
/span
>
<
/div
>
{
row
.
inputUserDelFlag
?
<
span
class
=
'inputUserName-del'
>
已删除
<
/span> : ''
}
<
/div
>
)
}
},
{
title
:
'操作'
,
colKey
:
'operation'
,
fixed
:
'right'
,
width
:
260
}
]
...
...
src/views/sys-permissions/user/detail.vue
浏览文件 @
aa430ea4
...
...
@@ -29,16 +29,14 @@
max-height=
"400px"
:pagination=
"pagination.total > 10 ? pagination : undefined"
>
<template
#
default=
"
{ row }">
<template
v-for=
"col in columns"
:key=
"col.colKey"
>
<template
v-if=
"col.colKey == 'dataPermission'"
>
<div
class=
"cell-content"
>
{{
dataPermissions
(
row
)
||
'-'
}}
</div>
</
template
>
<
template
v-else-if=
"col.colKey == 'functionPermission'"
>
<div
class=
"cell-content"
>
{{
functionPermission
(
row
)
||
'-'
}}
</div>
</
template
>
<
template
v-else
>
{{
row
[
col
.
colKey
as
string
]
||
'-'
}}
</
template
>
<template
v-for=
"col in columns"
#[
soltName
(
col
)]="
{ row }" :key="col.colKey">
<template
v-if=
"col.colKey == 'dataPermission'"
>
<div
class=
"cell-content"
>
{{
dataPermissions
(
row
)
||
'-'
}}
</div>
</
template
>
<
template
v-else-if=
"col.colKey == 'functionPermission'"
>
<div
class=
"cell-content"
>
{{
functionPermission
(
row
)
||
'-'
}}
</div>
</
template
>
<
template
v-else
>
{{
row
[
col
.
colKey
as
string
]
||
'-'
}}
</
template
>
</template>
</t-table>
...
...
@@ -62,6 +60,7 @@ import { useRoute } from 'vue-router'
import
{
PrimaryTableCol
,
PaginationProps
,
TableProps
}
from
'tdesign-vue-next'
import
{
useBasic
}
from
'@/hooks/useBasic'
import
{
statusTxt
}
from
'@/utils/status'
import
{
soltName
}
from
'@/utils'
import
{
getUserDetail
,
getLogs
}
from
'@/api/modules/user-roles/index'
import
{
ResUserList
,
ResLog
}
from
'@/api/interface/user-roles/index'
...
...
@@ -135,8 +134,7 @@ const dataPermissions = (row: ResUserList) => {
const
rolePermissions
=
row
.
rolePermissions
||
[]
const
txt
=
areaPermissions
.
map
((
val
:
{
name
:
string
})
=>
val
.
name
).
join
(
','
)
+
'-'
+
rolePermissions
.
map
((
val
:
{
name
:
string
})
=>
val
.
name
).
join
(
','
)
(
rolePermissions
.
length
?
'-'
+
rolePermissions
.
map
((
val
:
{
name
:
string
})
=>
val
.
name
).
join
(
','
)
:
''
)
return
txt
}
...
...
src/views/sys-permissions/user/index.vue
浏览文件 @
aa430ea4
...
...
@@ -2,7 +2,7 @@
* @Author: xiejiang
* @Date: 2024-11-28 15:01:02
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-
09 17:26:42
* @LastEditTime: 2024-12-
10 15:25:28
* @Description: 用户管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
-->
...
...
@@ -15,6 +15,7 @@
:loading=
"loading"
:pagination=
"pagination"
@
search-change=
"handleSearch"
@
clear=
"handleClear"
@
page-change=
"handlePage"
>
<template
#
header-left
>
...
...
@@ -122,9 +123,14 @@ const columns: PrimaryTableCol[] = [
cell
:
(
h
,
{
row
})
=>
{
const
roles
=
row
.
roles
||
[]
return
(
<
p
class
=
'ellipsis w-full'
>
<
span
>
{
roles
.
map
((
e
:
{
name
:
string
})
=>
e
.
name
).
join
(
';'
)
||
'-'
}
<
/span
>
<
/p
>
<
t
-
tooltip
content
=
{
roles
.
map
((
e
:
{
name
:
string
})
=>
e
.
name
).
join
(
';'
)
||
'-'
}
placement
=
'top'
theme
=
'light'
overlay
-
class
-
name
=
'custom-tooltip'
>
<
p
class
=
'ellipsis'
>
{
roles
.
map
((
e
:
{
name
:
string
})
=>
e
.
name
).
join
(
';'
)
||
'-'
}
<
/p
>
<
/t-tooltip
>
)
}
},
...
...
@@ -141,7 +147,20 @@ const columns: PrimaryTableCol[] = [
}
},
{
title
:
'添加时间'
,
colKey
:
'inputTime'
},
{
title
:
'添加人'
,
colKey
:
'inputUserName'
},
{
title
:
'添加人'
,
colKey
:
'inputUserName'
,
cell
:
(
h
,
{
row
})
=>
{
return
(
<
div
class
=
'flex items-center justify-between'
>
<
div
class
=
{
row
.
inputUserDelFlag
?
'w-[calc(100%-58px)] ellipsis text-[var(--td-font-gray-3)]'
:
''
}
>
<
span
class
=
{
row
.
inputUserDelFlag
?
'text-[var(--td-font-gray-3)]'
:
''
}
>
{
row
.
inputUserName
||
'-'
}
<
/span
>
<
/div
>
{
row
.
inputUserDelFlag
?
<
span
class
=
'inputUserName-del'
>
已删除
<
/span> : ''
}
<
/div
>
)
}
},
{
title
:
'操作'
,
colKey
:
'operation'
,
fixed
:
'right'
,
width
:
220
}
]
...
...
src/views/sys-permissions/user/page/user-edit.vue
浏览文件 @
aa430ea4
...
...
@@ -57,14 +57,6 @@ const formData = reactive<ReqUser>({
})
const
validateTelePhone
:
CustomValidator
=
async
val
=>
{
if
(
!
val
)
{
return
{
result
:
false
,
message
:
'请填写用户手机号码!'
,
type
:
'error'
}
}
if
(
!
isPhoneNumber
(
val
))
{
return
{
result
:
false
,
...
...
@@ -72,18 +64,6 @@ const validateTelePhone: CustomValidator = async val => {
type
:
'error'
}
}
else
{
await
new
Promise
(
resolve
=>
{
const
timer
=
setTimeout
(()
=>
{
resolve
(
val
)
clearTimeout
(
timer
)
return
{
result
:
false
,
message
:
'该手机号码已被使用!'
,
type
:
'error'
}
})
})
return
{
result
:
true
,
message
:
''
,
...
...
@@ -101,6 +81,7 @@ const rules: FormProps['rules'] = {
}
],
mobile
:
[
{
required
:
true
,
message
:
'请填写用户手机号码!'
,
type
:
'error'
},
{
validator
:
validateTelePhone
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论