mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2026-02-13 17:30:27 +08:00
Compare commits
1 Commits
pages
...
feat/fulls
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13a4f6ab63 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,9 +1,10 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
.eslintcache
|
||||
report.html
|
||||
dist
|
||||
vite.config.*.timestamp*
|
||||
|
||||
yarn.lock
|
||||
|
||||
8
.husky/commit-msg
Executable file
8
.husky/commit-msg
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
# shellcheck source=./_/husky.sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
PATH="/usr/local/bin:$PATH"
|
||||
|
||||
npx --no-install commitlint --edit "$1"
|
||||
9
.husky/common.sh
Normal file
9
.husky/common.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
command_exists () {
|
||||
command -v "$1" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
# Workaround for Windows 10, Git Bash and Pnpm
|
||||
if command_exists winpty && test -t 1; then
|
||||
exec < /dev/tty
|
||||
fi
|
||||
10
.husky/pre-commit
Executable file
10
.husky/pre-commit
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
. "$(dirname "$0")/common.sh"
|
||||
|
||||
[ -n "$CI" ] && exit 0
|
||||
|
||||
PATH="/usr/local/bin:$PATH"
|
||||
|
||||
# Perform lint check on files in the staging area through .lintstagedrc configuration
|
||||
pnpm exec lint-staged
|
||||
164
index.html
164
index.html
@@ -1,94 +1,84 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="renderer" content="webkit" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
|
||||
/>
|
||||
<title>vue-pure-admin</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</head>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="renderer" content="webkit" />
|
||||
<meta name="viewport"
|
||||
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" />
|
||||
<title>vue-pure-admin</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function () {
|
||||
var hm = document.createElement("script")
|
||||
hm.src = "https://hm.baidu.com/hm.js?d3824e75ef2bf6d851035f74ae1aec68"
|
||||
var s = document.getElementsByTagName("script")[0]
|
||||
s.parentNode.insertBefore(hm, s)
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<style>
|
||||
html,
|
||||
body,
|
||||
#app {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.loader,
|
||||
.loader::before,
|
||||
.loader::after {
|
||||
width: 2.5em;
|
||||
height: 2.5em;
|
||||
border-radius: 50%;
|
||||
animation: load-animation 1.8s infinite ease-in-out;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
.loader {
|
||||
position: relative;
|
||||
top: 0;
|
||||
margin: 80px auto;
|
||||
font-size: 10px;
|
||||
color: #406eeb;
|
||||
text-indent: -9999em;
|
||||
transform: translateZ(0);
|
||||
transform: translate(-50%, 0);
|
||||
animation-delay: -0.16s;
|
||||
}
|
||||
|
||||
.loader::before,
|
||||
.loader::after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.loader::before {
|
||||
left: -3.5em;
|
||||
animation-delay: -0.32s;
|
||||
}
|
||||
|
||||
.loader::after {
|
||||
left: 3.5em;
|
||||
}
|
||||
|
||||
@keyframes load-animation {
|
||||
|
||||
0%,
|
||||
80%,
|
||||
100% {
|
||||
box-shadow: 0 2.5em 0 -1.3em;
|
||||
<body>
|
||||
<div id="app">
|
||||
<style>
|
||||
html,
|
||||
body,
|
||||
#app {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
40% {
|
||||
box-shadow: 0 2.5em 0 0;
|
||||
.loader,
|
||||
.loader::before,
|
||||
.loader::after {
|
||||
width: 2.5em;
|
||||
height: 2.5em;
|
||||
border-radius: 50%;
|
||||
animation: load-animation 1.8s infinite ease-in-out;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
.loader {
|
||||
position: relative;
|
||||
top: 0;
|
||||
margin: 80px auto;
|
||||
font-size: 10px;
|
||||
color: #406eeb;
|
||||
text-indent: -9999em;
|
||||
transform: translateZ(0);
|
||||
transform: translate(-50%, 0);
|
||||
animation-delay: -0.16s;
|
||||
}
|
||||
|
||||
.loader::before,
|
||||
.loader::after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.loader::before {
|
||||
left: -3.5em;
|
||||
animation-delay: -0.32s;
|
||||
}
|
||||
|
||||
.loader::after {
|
||||
left: 3.5em;
|
||||
}
|
||||
|
||||
@keyframes load-animation {
|
||||
0%,
|
||||
80%,
|
||||
100% {
|
||||
box-shadow: 0 2.5em 0 -1.3em;
|
||||
}
|
||||
|
||||
40% {
|
||||
box-shadow: 0 2.5em 0 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -19,8 +19,6 @@ buttons:
|
||||
pureBackTop: BackTop
|
||||
pureOpenText: Open
|
||||
pureCloseText: Close
|
||||
pureWatchMore: Watch More
|
||||
pureMarkAsRead: Mark As Read
|
||||
search:
|
||||
pureTotal: Total
|
||||
pureHistory: History
|
||||
@@ -57,6 +55,9 @@ panel:
|
||||
pureTagsStyleCardTip: Card tags for efficient browsing
|
||||
pureTagsStyleChrome: Chrome
|
||||
pureTagsStyleChromeTip: Chrome style is classic and elegant
|
||||
pureFullScreenWatermark: FullScreen Watermark
|
||||
pureEnableWatermark: Watermark
|
||||
pureWatermarkText: Text
|
||||
pureInterfaceDisplay: Interface Display
|
||||
pureGreyModel: Grey Model
|
||||
pureWeakModel: Weak Model
|
||||
@@ -240,19 +241,4 @@ login:
|
||||
purePassWordRuleReg: The password format should be any combination of 8-18 digits
|
||||
purePassWordSureReg: Please enter confirm password
|
||||
purePassWordDifferentReg: The two passwords do not match!
|
||||
purePassWordUpdateReg: Password has been updated
|
||||
pureLoginExpired: Login expired, please login again
|
||||
tableBar:
|
||||
pureList: List
|
||||
pureLarge: Large
|
||||
pureDefault: Default
|
||||
pureSmall: Small
|
||||
pureColumnSettings: ColumnSettings
|
||||
pureCollapse: Collapse
|
||||
pureExpand: Expand
|
||||
pureRefresh: Refresh
|
||||
pureDensity: Density
|
||||
pureColumnDisplay: ColumnDisplay
|
||||
pureReset: Reset
|
||||
pureExitFullScreen: ExitFullScreen
|
||||
pureFullScreen: FullScreen
|
||||
purePassWordUpdateReg: Password has been updated
|
||||
@@ -19,8 +19,6 @@ buttons:
|
||||
pureBackTop: 回到顶部
|
||||
pureOpenText: 开
|
||||
pureCloseText: 关
|
||||
pureWatchMore: 查看更多
|
||||
pureMarkAsRead: 标为已读
|
||||
search:
|
||||
pureTotal: 共
|
||||
pureHistory: 搜索历史
|
||||
@@ -57,6 +55,9 @@ panel:
|
||||
pureTagsStyleCardTip: 卡片标签,高效浏览
|
||||
pureTagsStyleChrome: 谷歌
|
||||
pureTagsStyleChromeTip: 谷歌风格,经典美观
|
||||
pureFullScreenWatermark: 全屏水印
|
||||
pureEnableWatermark: 水印
|
||||
pureWatermarkText: 文本
|
||||
pureInterfaceDisplay: 界面显示
|
||||
pureGreyModel: 灰色模式
|
||||
pureWeakModel: 色弱模式
|
||||
@@ -240,19 +241,4 @@ login:
|
||||
purePassWordRuleReg: 密码格式应为8-18位数字、字母、符号的任意两种组合
|
||||
purePassWordSureReg: 请输入确认密码
|
||||
purePassWordDifferentReg: 两次密码不一致!
|
||||
purePassWordUpdateReg: 修改密码成功
|
||||
pureLoginExpired: 登录已过期,请重新登录
|
||||
tableBar:
|
||||
pureList: 列表
|
||||
pureLarge: 宽松
|
||||
pureDefault: 默认
|
||||
pureSmall: 紧凑
|
||||
pureColumnSettings: 列设置
|
||||
pureCollapse: 折叠
|
||||
pureExpand: 展开
|
||||
pureRefresh: 刷新
|
||||
pureDensity: 密度
|
||||
pureColumnDisplay: 列展示
|
||||
pureReset: 重置
|
||||
pureExitFullScreen: 退出全屏
|
||||
pureFullScreen: 全屏
|
||||
purePassWordUpdateReg: 修改密码成功
|
||||
@@ -326,8 +326,7 @@ export default defineFakeRoute([
|
||||
method: "get",
|
||||
response: () => {
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: [
|
||||
systemManagementRouter,
|
||||
systemMonitorRouter,
|
||||
|
||||
@@ -6,8 +6,7 @@ export default defineFakeRoute([
|
||||
method: "post",
|
||||
response: () => {
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: {
|
||||
list: [
|
||||
{
|
||||
|
||||
@@ -8,8 +8,7 @@ export default defineFakeRoute([
|
||||
response: ({ body }) => {
|
||||
if (body.username === "admin") {
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: {
|
||||
avatar: "https://avatars.githubusercontent.com/u/44761321",
|
||||
username: "admin",
|
||||
@@ -25,8 +24,7 @@ export default defineFakeRoute([
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: {
|
||||
avatar: "https://avatars.githubusercontent.com/u/52823142",
|
||||
username: "common",
|
||||
|
||||
@@ -33,8 +33,7 @@ export default defineFakeRoute([
|
||||
method: "get",
|
||||
response: () => {
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: mapList()
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,8 +8,7 @@ export default defineFakeRoute([
|
||||
method: "get",
|
||||
response: () => {
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: {
|
||||
avatar: "https://avatars.githubusercontent.com/u/44761321",
|
||||
username: "admin",
|
||||
@@ -47,8 +46,7 @@ export default defineFakeRoute([
|
||||
}
|
||||
];
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: {
|
||||
list,
|
||||
total: list.length, // 总条目数
|
||||
|
||||
@@ -8,8 +8,7 @@ export default defineFakeRoute([
|
||||
response: ({ body }) => {
|
||||
if (body.refreshToken) {
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: {
|
||||
accessToken: "eyJhbGciOiJIUzUxMiJ9.newAdmin",
|
||||
refreshToken: "eyJhbGciOiJIUzUxMiJ9.newAdminRefresh",
|
||||
@@ -19,8 +18,7 @@ export default defineFakeRoute([
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
code: 10001,
|
||||
message: "请求参数缺失或格式不正确",
|
||||
success: false,
|
||||
data: {}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -50,8 +50,7 @@ export default defineFakeRoute([
|
||||
if (body.phone) list = list.filter(item => item.phone === body.phone);
|
||||
if (body.deptId) list = list.filter(item => item.dept.id === body.deptId);
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: {
|
||||
list,
|
||||
total: list.length, // 总条目数
|
||||
@@ -67,8 +66,7 @@ export default defineFakeRoute([
|
||||
method: "get",
|
||||
response: () => {
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: [
|
||||
{ id: 1, name: "超级管理员" },
|
||||
{ id: 2, name: "普通角色" }
|
||||
@@ -84,21 +82,18 @@ export default defineFakeRoute([
|
||||
if (body.userId) {
|
||||
if (body.userId == 1) {
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: [1]
|
||||
};
|
||||
} else if (body.userId == 2) {
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: [2]
|
||||
};
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
code: 10001,
|
||||
message: "请求参数缺失或格式不正确",
|
||||
success: false,
|
||||
data: []
|
||||
};
|
||||
}
|
||||
@@ -135,8 +130,7 @@ export default defineFakeRoute([
|
||||
);
|
||||
if (body.code) list = list.filter(item => item.code === body.code);
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: {
|
||||
list,
|
||||
total: list.length, // 总条目数
|
||||
@@ -152,8 +146,7 @@ export default defineFakeRoute([
|
||||
method: "post",
|
||||
response: () => {
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: [
|
||||
// 外部页面
|
||||
{
|
||||
@@ -357,8 +350,7 @@ export default defineFakeRoute([
|
||||
response: ({ body }) => {
|
||||
if (body.id == 1) {
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: [
|
||||
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 200, 201,
|
||||
202, 203, 204, 205, 300, 301, 302, 303, 304, 400, 401, 402, 403,
|
||||
@@ -367,8 +359,7 @@ export default defineFakeRoute([
|
||||
};
|
||||
} else if (body.id == 2) {
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: [
|
||||
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 404, 500,
|
||||
501, 502, 503
|
||||
@@ -383,8 +374,7 @@ export default defineFakeRoute([
|
||||
method: "post",
|
||||
response: () => {
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: [
|
||||
// 外部页面
|
||||
{
|
||||
@@ -1265,8 +1255,7 @@ export default defineFakeRoute([
|
||||
method: "post",
|
||||
response: () => {
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: [
|
||||
{
|
||||
name: "杭州总公司",
|
||||
@@ -1429,8 +1418,7 @@ export default defineFakeRoute([
|
||||
];
|
||||
list = list.filter(item => item.username.includes(body?.username));
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: {
|
||||
list,
|
||||
total: list.length, // 总条目数
|
||||
@@ -1474,8 +1462,7 @@ export default defineFakeRoute([
|
||||
String(item.status).includes(String(body?.status))
|
||||
);
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: {
|
||||
list,
|
||||
total: list.length, // 总条目数
|
||||
@@ -1521,8 +1508,7 @@ export default defineFakeRoute([
|
||||
String(item.status).includes(String(body?.status))
|
||||
);
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: {
|
||||
list,
|
||||
total: list.length, // 总条目数
|
||||
@@ -1580,8 +1566,7 @@ export default defineFakeRoute([
|
||||
];
|
||||
list = list.filter(item => item.module.includes(body?.module));
|
||||
return {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: {
|
||||
list,
|
||||
total: list.length, // 总条目数
|
||||
@@ -1616,8 +1601,7 @@ export default defineFakeRoute([
|
||||
"Content-Length": 17019
|
||||
},
|
||||
responseBody: {
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
success: true,
|
||||
data: [
|
||||
{
|
||||
parentId: 0,
|
||||
|
||||
82
package.json
82
package.json
@@ -54,29 +54,29 @@
|
||||
"@logicflow/extension": "^1.2.28",
|
||||
"@pureadmin/descriptions": "^1.2.1",
|
||||
"@pureadmin/table": "^3.3.0",
|
||||
"@pureadmin/utils": "^2.6.4",
|
||||
"@pureadmin/utils": "^2.6.3",
|
||||
"@vue-flow/background": "^1.3.2",
|
||||
"@vue-flow/core": "^1.48.2",
|
||||
"@vueuse/core": "^14.2.0",
|
||||
"@vue-flow/core": "^1.48.0",
|
||||
"@vueuse/core": "^14.1.0",
|
||||
"@vueuse/motion": "^3.0.3",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"@zxcvbn-ts/core": "^3.0.4",
|
||||
"animate.css": "^4.1.1",
|
||||
"axios": "^1.13.4",
|
||||
"axios": "^1.13.2",
|
||||
"china-area-data": "^5.0.1",
|
||||
"codemirror": "^5.65.20",
|
||||
"codemirror-editor-vue3": "^2.8.0",
|
||||
"cropperjs": "^1.6.2",
|
||||
"dayjs": "^1.11.19",
|
||||
"deep-chat": "^2.4.2",
|
||||
"deep-chat": "^2.3.0",
|
||||
"echarts": "^6.0.0",
|
||||
"el-table-infinite-scroll": "^3.0.8",
|
||||
"element-plus": "^2.13.2",
|
||||
"element-plus": "^2.12.0",
|
||||
"highlight.js": "^11.11.1",
|
||||
"intro.js": "^7.2.0",
|
||||
"js-cookie": "^3.0.5",
|
||||
"jsbarcode": "^3.12.3",
|
||||
"jsbarcode": "^3.12.1",
|
||||
"localforage": "^1.10.0",
|
||||
"mint-filter": "^4.0.3",
|
||||
"mitt": "^3.0.1",
|
||||
@@ -84,28 +84,28 @@
|
||||
"nprogress": "^0.2.0",
|
||||
"path-browserify": "^1.0.1",
|
||||
"pinia": "^3.0.4",
|
||||
"pinyin-pro": "^3.28.0",
|
||||
"pinyin-pro": "^3.27.0",
|
||||
"plus-pro-components": "^0.1.30",
|
||||
"qrcode": "^1.5.4",
|
||||
"qs": "^6.14.1",
|
||||
"qs": "^6.14.0",
|
||||
"responsive-storage": "^2.2.0",
|
||||
"sortablejs": "^1.15.6",
|
||||
"swiper": "^12.1.0",
|
||||
"swiper": "^12.0.3",
|
||||
"typeit": "^8.8.7",
|
||||
"v-contextmenu": "^3.2.0",
|
||||
"v3-infinite-loading": "^1.3.2",
|
||||
"vditor": "^3.11.2",
|
||||
"version-rocket": "^1.7.4",
|
||||
"vue": "^3.5.27",
|
||||
"vue-i18n": "^11.2.8",
|
||||
"vue": "^3.5.25",
|
||||
"vue-i18n": "^11.2.2",
|
||||
"vue-json-pretty": "^2.6.0",
|
||||
"vue-pdf-embed": "^2.1.3",
|
||||
"vue-router": "^5.0.2",
|
||||
"vue-router": "^4.6.3",
|
||||
"vue-tippy": "^6.7.1",
|
||||
"vue-types": "^6.0.0",
|
||||
"vue-virtual-scroller": "2.0.0-beta.8",
|
||||
"vue-waterfall-plugin-next": "^2.6.9",
|
||||
"vue3-danmaku": "^1.6.7",
|
||||
"vue3-danmaku": "^1.6.6",
|
||||
"vue3-puzzle-vcode": "^1.1.7",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"vxe-table": "4.6.25",
|
||||
@@ -114,57 +114,57 @@
|
||||
"xlsx": "^0.18.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^20.4.1",
|
||||
"@commitlint/config-conventional": "^20.4.1",
|
||||
"@commitlint/types": "^20.4.0",
|
||||
"@eslint/js": "^9.39.2",
|
||||
"@faker-js/faker": "^10.2.0",
|
||||
"@iconify/json": "^2.2.435",
|
||||
"@commitlint/cli": "^20.2.0",
|
||||
"@commitlint/config-conventional": "^20.2.0",
|
||||
"@commitlint/types": "^20.2.0",
|
||||
"@eslint/js": "^9.39.1",
|
||||
"@faker-js/faker": "^10.1.0",
|
||||
"@iconify/json": "^2.2.416",
|
||||
"@iconify/vue": "4.2.0",
|
||||
"@intlify/unplugin-vue-i18n": "^11.0.3",
|
||||
"@tailwindcss/vite": "^4.1.18",
|
||||
"@intlify/unplugin-vue-i18n": "^11.0.1",
|
||||
"@tailwindcss/vite": "^4.1.17",
|
||||
"@types/codemirror": "^5.60.17",
|
||||
"@types/dagre": "^0.7.53",
|
||||
"@types/intro.js": "^5.1.5",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"@types/node": "^20.19.31",
|
||||
"@types/node": "^20.19.26",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/path-browserify": "^1.0.3",
|
||||
"@types/qrcode": "^1.5.6",
|
||||
"@types/qs": "^6.14.0",
|
||||
"@types/sortablejs": "^1.15.9",
|
||||
"@vitejs/plugin-vue": "^6.0.4",
|
||||
"@vitejs/plugin-vue-jsx": "^5.1.4",
|
||||
"@vitejs/plugin-vue": "^6.0.2",
|
||||
"@vitejs/plugin-vue-jsx": "^5.1.2",
|
||||
"boxen": "^8.0.1",
|
||||
"code-inspector-plugin": "^1.4.1",
|
||||
"code-inspector-plugin": "^1.3.0",
|
||||
"cssnano": "^7.1.2",
|
||||
"dagre": "^0.8.5",
|
||||
"eslint": "^9.39.2",
|
||||
"eslint": "^9.39.1",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-prettier": "^5.5.5",
|
||||
"eslint-plugin-vue": "^10.7.0",
|
||||
"eslint-plugin-prettier": "^5.5.4",
|
||||
"eslint-plugin-vue": "^10.6.2",
|
||||
"gradient-string": "^3.0.0",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^16.2.7",
|
||||
"postcss": "^8.5.6",
|
||||
"postcss-html": "^1.8.1",
|
||||
"postcss-html": "^1.8.0",
|
||||
"postcss-load-config": "^6.0.1",
|
||||
"postcss-scss": "^4.0.9",
|
||||
"prettier": "^3.8.1",
|
||||
"prettier": "^3.7.4",
|
||||
"rimraf": "^6.1.2",
|
||||
"rollup-plugin-visualizer": "^6.0.5",
|
||||
"sass": "^1.97.3",
|
||||
"stylelint": "^17.1.1",
|
||||
"stylelint-config-recess-order": "^7.6.0",
|
||||
"sass": "^1.95.1",
|
||||
"stylelint": "^16.26.1",
|
||||
"stylelint-config-recess-order": "^7.4.0",
|
||||
"stylelint-config-recommended-vue": "^1.6.1",
|
||||
"stylelint-config-standard-scss": "^17.0.0",
|
||||
"stylelint-config-standard-scss": "^14.0.0",
|
||||
"stylelint-prettier": "^5.0.3",
|
||||
"svgo": "^4.0.0",
|
||||
"tailwindcss": "^4.1.18",
|
||||
"tailwindcss": "^4.1.17",
|
||||
"typescript": "^5.9.3",
|
||||
"typescript-eslint": "^8.54.0",
|
||||
"unplugin-icons": "^23.0.1",
|
||||
"vite": "^7.3.1",
|
||||
"typescript-eslint": "^8.49.0",
|
||||
"unplugin-icons": "^22.5.0",
|
||||
"vite": "^7.2.7",
|
||||
"vite-plugin-cdn-import": "^1.0.1",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-fake-server": "^2.2.2",
|
||||
@@ -172,7 +172,7 @@
|
||||
"vite-plugin-router-warn": "^2.0.0",
|
||||
"vite-svg-loader": "^5.1.0",
|
||||
"vue-eslint-parser": "^10.2.0",
|
||||
"vue-tsc": "^3.2.4"
|
||||
"vue-tsc": "^3.1.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || >=22.13.0",
|
||||
@@ -206,4 +206,4 @@
|
||||
"vue3-danmaku"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
3716
pnpm-lock.yaml
generated
3716
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
54
src/App.vue
54
src/App.vue
@@ -7,18 +7,15 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { useRouter } from "vue-router";
|
||||
import { useGlobal } from "@pureadmin/utils";
|
||||
import { defineComponent } from "vue";
|
||||
import { checkVersion } from "version-rocket";
|
||||
import { defineComponent, computed } from "vue";
|
||||
import { ElConfigProvider } from "element-plus";
|
||||
import { ReDialog, closeAllDialog } from "@/components/ReDialog";
|
||||
import { ReDrawer, closeAllDrawer } from "@/components/ReDrawer";
|
||||
import { ReDialog } from "@/components/ReDialog";
|
||||
import { ReDrawer } from "@/components/ReDrawer";
|
||||
import en from "element-plus/es/locale/lang/en";
|
||||
import zhCn from "element-plus/es/locale/lang/zh-cn";
|
||||
import plusEn from "plus-pro-components/es/locale/lang/en";
|
||||
import plusZhCn from "plus-pro-components/es/locale/lang/zh-cn";
|
||||
// import { ElNotification } from "element-plus";
|
||||
|
||||
export default defineComponent({
|
||||
name: "app",
|
||||
@@ -27,23 +24,12 @@ export default defineComponent({
|
||||
ReDialog,
|
||||
ReDrawer
|
||||
},
|
||||
setup() {
|
||||
const router = useRouter();
|
||||
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
||||
const currentLocale = computed(() => {
|
||||
return $storage.locale?.locale === "zh"
|
||||
computed: {
|
||||
currentLocale() {
|
||||
return this.$storage.locale?.locale === "zh"
|
||||
? { ...zhCn, ...plusZhCn }
|
||||
: { ...en, ...plusEn };
|
||||
});
|
||||
|
||||
router.beforeEach(() => {
|
||||
closeAllDialog();
|
||||
closeAllDrawer();
|
||||
});
|
||||
|
||||
return {
|
||||
currentLocale
|
||||
};
|
||||
}
|
||||
},
|
||||
beforeCreate() {
|
||||
const { version, name: title } = __APP_INFO__.pkg;
|
||||
@@ -68,31 +54,5 @@ export default defineComponent({
|
||||
);
|
||||
}
|
||||
}
|
||||
// mounted() {
|
||||
// ElNotification({
|
||||
// title: "高级服务",
|
||||
// duration: 0,
|
||||
// customClass: "fullpage-notification",
|
||||
// // @ts-expect-error
|
||||
// style: { width: "260px" },
|
||||
// position: "bottom-right",
|
||||
// dangerouslyUseHTMLString: true,
|
||||
// message: `
|
||||
// <a target='_blank' class='block text-base text-center border mt-4 rounded hover:text-[red]!' href='https://pure-admin.cn/pages/service'>
|
||||
// 补差价活动即将结束!
|
||||
// </a>
|
||||
// `
|
||||
// });
|
||||
// }
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.fullpage-notification > .el-notification__group > .el-notification__closeBtn {
|
||||
top: 15px;
|
||||
}
|
||||
.fullpage-notification > div > h2 {
|
||||
color: red;
|
||||
font-size: 18px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
code: number;
|
||||
message: string;
|
||||
success: boolean;
|
||||
data?: {
|
||||
/** 列表数据 */
|
||||
list: Array<any>;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
code: number;
|
||||
message: string;
|
||||
success: boolean;
|
||||
data: Array<any>;
|
||||
};
|
||||
|
||||
@@ -15,7 +14,7 @@ export const mapJson = (params?: object) => {
|
||||
export const formUpload = data => {
|
||||
return http.request<Result>(
|
||||
"post",
|
||||
"https://pureadmin.free.beeceptor.com/images",
|
||||
"https://run.mocky.io/v3/3aa761d7-b0b3-4a03-96b3-6168d4f7467b",
|
||||
{ data },
|
||||
{
|
||||
headers: {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
code: number;
|
||||
message: string;
|
||||
success: boolean;
|
||||
data: Array<any>;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
code: number;
|
||||
message: string;
|
||||
success: boolean;
|
||||
data?: Array<any>;
|
||||
};
|
||||
|
||||
type ResultTable = {
|
||||
code: number;
|
||||
message: string;
|
||||
success: boolean;
|
||||
data?: {
|
||||
/** 列表数据 */
|
||||
list: Array<any>;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
export type UserResult = {
|
||||
code: number;
|
||||
message: string;
|
||||
success: boolean;
|
||||
data: {
|
||||
/** 头像 */
|
||||
avatar: string;
|
||||
@@ -24,8 +23,7 @@ export type UserResult = {
|
||||
};
|
||||
|
||||
export type RefreshTokenResult = {
|
||||
code: number;
|
||||
message: string;
|
||||
success: boolean;
|
||||
data: {
|
||||
/** `token` */
|
||||
accessToken: string;
|
||||
@@ -52,14 +50,12 @@ export type UserInfo = {
|
||||
};
|
||||
|
||||
export type UserInfoResult = {
|
||||
code: number;
|
||||
message: string;
|
||||
success: boolean;
|
||||
data: UserInfo;
|
||||
};
|
||||
|
||||
type ResultTable = {
|
||||
code: number;
|
||||
message: string;
|
||||
success: boolean;
|
||||
data?: {
|
||||
/** 列表数据 */
|
||||
list: Array<any>;
|
||||
|
||||
@@ -92,16 +92,14 @@ onBeforeMount(() => {
|
||||
|
||||
// 获取模拟车辆信息
|
||||
mapJson()
|
||||
.then(({ code, data }) => {
|
||||
if (code === 0) {
|
||||
const points: object = data.map(v => {
|
||||
return {
|
||||
lnglat: [v.lng, v.lat],
|
||||
...v
|
||||
};
|
||||
});
|
||||
if (MarkerCluster) MarkerCluster.setData(points);
|
||||
}
|
||||
.then(({ data }) => {
|
||||
const points: object = data.map(v => {
|
||||
return {
|
||||
lnglat: [v.lng, v.lat],
|
||||
...v
|
||||
};
|
||||
});
|
||||
if (MarkerCluster) MarkerCluster.setData(points);
|
||||
})
|
||||
.catch(err => {
|
||||
console.log("err:", err);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Sortable from "sortablejs";
|
||||
import { $t, transformI18n } from "@/plugins/i18n";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||
import {
|
||||
type PropType,
|
||||
@@ -30,7 +30,7 @@ const props = {
|
||||
/** 头部最左边的标题 */
|
||||
title: {
|
||||
type: String,
|
||||
default: $t("tableBar.pureList")
|
||||
default: "列表"
|
||||
},
|
||||
/** 对于树形表格,如果想启用展开和折叠功能,传入当前表格的ref即可 */
|
||||
tableRef: {
|
||||
@@ -169,19 +169,19 @@ export default defineComponent({
|
||||
style={getDropdownItemStyle.value("large")}
|
||||
onClick={() => (size.value = "large")}
|
||||
>
|
||||
{transformI18n($t("tableBar.pureLarge"))}
|
||||
宽松
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
style={getDropdownItemStyle.value("default")}
|
||||
onClick={() => (size.value = "default")}
|
||||
>
|
||||
{transformI18n($t("tableBar.pureDefault"))}
|
||||
默认
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
style={getDropdownItemStyle.value("small")}
|
||||
onClick={() => (size.value = "small")}
|
||||
>
|
||||
{transformI18n($t("tableBar.pureSmall"))}
|
||||
紧凑
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
)
|
||||
@@ -245,9 +245,7 @@ export default defineComponent({
|
||||
reference: () => (
|
||||
<SettingIcon
|
||||
class={["w-[16px]", iconClass.value]}
|
||||
v-tippy={rendTippyProps(
|
||||
transformI18n($t("tableBar.pureColumnSettings"))
|
||||
)}
|
||||
v-tippy={rendTippyProps("列设置")}
|
||||
/>
|
||||
)
|
||||
};
|
||||
@@ -270,7 +268,7 @@ export default defineComponent({
|
||||
{slots?.title ? (
|
||||
slots.title()
|
||||
) : (
|
||||
<p class="font-bold truncate">{transformI18n(props.title)}</p>
|
||||
<p class="font-bold truncate">{props.title}</p>
|
||||
)}
|
||||
<div class="flex items-center justify-around">
|
||||
{slots?.buttons ? (
|
||||
@@ -284,9 +282,7 @@ export default defineComponent({
|
||||
transform: isExpandAll.value ? "none" : "rotate(-90deg)"
|
||||
}}
|
||||
v-tippy={rendTippyProps(
|
||||
isExpandAll.value
|
||||
? transformI18n($t("tableBar.pureCollapse"))
|
||||
: transformI18n($t("tableBar.pureExpand"))
|
||||
isExpandAll.value ? "折叠" : "展开"
|
||||
)}
|
||||
onClick={() => onExpand()}
|
||||
/>
|
||||
@@ -299,18 +295,14 @@ export default defineComponent({
|
||||
iconClass.value,
|
||||
loading.value ? "animate-spin" : ""
|
||||
]}
|
||||
v-tippy={rendTippyProps(
|
||||
transformI18n($t("tableBar.pureRefresh"))
|
||||
)}
|
||||
v-tippy={rendTippyProps("刷新")}
|
||||
onClick={() => onReFresh()}
|
||||
/>
|
||||
<el-divider direction="vertical" />
|
||||
<el-dropdown
|
||||
v-slots={dropdown}
|
||||
trigger="click"
|
||||
v-tippy={rendTippyProps(
|
||||
transformI18n($t("tableBar.pureDensity"))
|
||||
)}
|
||||
v-tippy={rendTippyProps("密度")}
|
||||
>
|
||||
<CollapseIcon class={["w-[16px]", iconClass.value]} />
|
||||
</el-dropdown>
|
||||
@@ -326,13 +318,13 @@ export default defineComponent({
|
||||
<div class={[topClass.value]}>
|
||||
<el-checkbox
|
||||
class="-mr-1!"
|
||||
label={transformI18n($t("tableBar.pureColumnDisplay"))}
|
||||
label="列展示"
|
||||
v-model={checkAll.value}
|
||||
indeterminate={isIndeterminate.value}
|
||||
onChange={value => handleCheckAllChange(value)}
|
||||
/>
|
||||
<el-button type="primary" link onClick={() => onReset()}>
|
||||
{transformI18n($t("tableBar.pureReset"))}
|
||||
重置
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
@@ -390,11 +382,7 @@ export default defineComponent({
|
||||
<iconifyIconOffline
|
||||
class={["w-[16px]", iconClass.value]}
|
||||
icon={isFullscreen.value ? ExitFullscreen : Fullscreen}
|
||||
v-tippy={
|
||||
isFullscreen.value
|
||||
? transformI18n($t("tableBar.pureExitFullScreen"))
|
||||
: transformI18n($t("tableBar.pureFullScreen"))
|
||||
}
|
||||
v-tippy={isFullscreen.value ? "退出全屏" : "全屏"}
|
||||
onClick={() => onFullscreen()}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -5,10 +5,14 @@ import {
|
||||
ref,
|
||||
unref,
|
||||
nextTick,
|
||||
computed,
|
||||
useTemplateRef
|
||||
computed
|
||||
} from "vue";
|
||||
import { tryOnMounted, tryOnUnmounted, useDebounceFn } from "@vueuse/core";
|
||||
import {
|
||||
tryOnMounted,
|
||||
tryOnUnmounted,
|
||||
templateRef,
|
||||
useDebounceFn
|
||||
} from "@vueuse/core";
|
||||
import * as utilsMethods from "./utils";
|
||||
const { animationFrame, copyObj } = utilsMethods;
|
||||
animationFrame();
|
||||
@@ -58,14 +62,17 @@ if (props.classOption["key"] === undefined) {
|
||||
props.classOption["key"] = 0;
|
||||
}
|
||||
|
||||
const wrap = useTemplateRef<HTMLElement | null>(
|
||||
`wrap${props.classOption["key"]}`
|
||||
const wrap = templateRef<HTMLElement | null>(
|
||||
`wrap${props.classOption["key"]}`,
|
||||
null
|
||||
);
|
||||
const slotList = useTemplateRef<HTMLElement | null>(
|
||||
`slotList${props.classOption["key"]}`
|
||||
const slotList = templateRef<HTMLElement | null>(
|
||||
`slotList${props.classOption["key"]}`,
|
||||
null
|
||||
);
|
||||
const realBox = useTemplateRef<HTMLElement | null>(
|
||||
`realBox${props.classOption["key"]}`
|
||||
const realBox = templateRef<HTMLElement | null>(
|
||||
`realBox${props.classOption["key"]}`,
|
||||
null
|
||||
);
|
||||
|
||||
const leftSwitchState = computed(() => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Sortable from "sortablejs";
|
||||
import { $t, transformI18n } from "@/plugins/i18n";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||
import { delay, cloneDeep, getKeyList } from "@pureadmin/utils";
|
||||
import {
|
||||
@@ -24,7 +24,7 @@ const props = {
|
||||
/** 头部最左边的标题 */
|
||||
title: {
|
||||
type: String,
|
||||
default: $t("tableBar.pureList")
|
||||
default: "列表"
|
||||
},
|
||||
vxeTableRef: {
|
||||
type: Object as PropType<any>
|
||||
@@ -161,19 +161,19 @@ export default defineComponent({
|
||||
style={getDropdownItemStyle.value("medium")}
|
||||
onClick={() => changeSize("medium")}
|
||||
>
|
||||
{transformI18n($t("tableBar.pureLarge"))}
|
||||
宽松
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
style={getDropdownItemStyle.value("small")}
|
||||
onClick={() => changeSize("small")}
|
||||
>
|
||||
{transformI18n($t("tableBar.pureDefault"))}
|
||||
默认
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
style={getDropdownItemStyle.value("mini")}
|
||||
onClick={() => changeSize("mini")}
|
||||
>
|
||||
{transformI18n($t("tableBar.pureSmall"))}
|
||||
紧凑
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
)
|
||||
@@ -238,9 +238,7 @@ export default defineComponent({
|
||||
reference: () => (
|
||||
<SettingIcon
|
||||
class={["w-[16px]", iconClass.value]}
|
||||
v-tippy={rendTippyProps(
|
||||
transformI18n($t("tableBar.pureColumnSettings"))
|
||||
)}
|
||||
v-tippy={rendTippyProps("列设置")}
|
||||
/>
|
||||
)
|
||||
};
|
||||
@@ -263,7 +261,7 @@ export default defineComponent({
|
||||
{slots?.title ? (
|
||||
slots.title()
|
||||
) : (
|
||||
<p class="font-bold truncate">{transformI18n(props.title)}</p>
|
||||
<p class="font-bold truncate">{props.title}</p>
|
||||
)}
|
||||
<div class="flex items-center justify-around">
|
||||
{slots?.buttons ? (
|
||||
@@ -277,9 +275,7 @@ export default defineComponent({
|
||||
transform: isExpandAll.value ? "none" : "rotate(-90deg)"
|
||||
}}
|
||||
v-tippy={rendTippyProps(
|
||||
isExpandAll.value
|
||||
? transformI18n($t("tableBar.pureCollapse"))
|
||||
: transformI18n($t("tableBar.pureExpand"))
|
||||
isExpandAll.value ? "折叠" : "展开"
|
||||
)}
|
||||
onClick={() => onExpand()}
|
||||
/>
|
||||
@@ -292,18 +288,14 @@ export default defineComponent({
|
||||
iconClass.value,
|
||||
loading.value ? "animate-spin" : ""
|
||||
]}
|
||||
v-tippy={rendTippyProps(
|
||||
transformI18n($t("tableBar.pureRefresh"))
|
||||
)}
|
||||
v-tippy={rendTippyProps("刷新")}
|
||||
onClick={() => onReFresh()}
|
||||
/>
|
||||
<el-divider direction="vertical" />
|
||||
<el-dropdown
|
||||
v-slots={dropdown}
|
||||
trigger="click"
|
||||
v-tippy={rendTippyProps(
|
||||
transformI18n($t("tableBar.pureDensity"))
|
||||
)}
|
||||
v-tippy={rendTippyProps("密度")}
|
||||
>
|
||||
<CollapseIcon class={["w-[16px]", iconClass.value]} />
|
||||
</el-dropdown>
|
||||
@@ -319,13 +311,13 @@ export default defineComponent({
|
||||
<div class={[topClass.value]}>
|
||||
<el-checkbox
|
||||
class="-mr-1!"
|
||||
label={transformI18n($t("tableBar.pureColumnDisplay"))}
|
||||
label="列展示"
|
||||
v-model={checkAll.value}
|
||||
indeterminate={isIndeterminate.value}
|
||||
onChange={value => handleCheckAllChange(value)}
|
||||
/>
|
||||
<el-button type="primary" link onClick={() => onReset()}>
|
||||
{transformI18n($t("tableBar.pureReset"))}
|
||||
重置
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
@@ -381,11 +373,7 @@ export default defineComponent({
|
||||
<iconifyIconOffline
|
||||
class={["w-[16px]", iconClass.value]}
|
||||
icon={isFullscreen.value ? ExitFullscreen : Fullscreen}
|
||||
v-tippy={
|
||||
isFullscreen.value
|
||||
? transformI18n($t("tableBar.pureExitFullScreen"))
|
||||
: transformI18n($t("tableBar.pureFullScreen"))
|
||||
}
|
||||
v-tippy={isFullscreen.value ? "退出全屏" : "全屏"}
|
||||
onClick={() => onFullscreen()}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@ const TITLE = getConfig("Title");
|
||||
<footer
|
||||
class="layout-footer text-[rgba(0,0,0,0.6)] dark:text-[rgba(220,220,242,0.8)]"
|
||||
>
|
||||
Copyright © 2020-2025
|
||||
Copyright © 2020-present
|
||||
<a
|
||||
class="hover:text-primary!"
|
||||
href="https://github.com/pure-admin"
|
||||
@@ -16,23 +16,12 @@ const TITLE = getConfig("Title");
|
||||
>
|
||||
{{ TITLE }}
|
||||
</a>
|
||||
<!-- <div class="ml-8">
|
||||
<span>赞助商:</span>
|
||||
<a
|
||||
class="hover:text-primary"
|
||||
href="https://ai-tools.cn/resume/start"
|
||||
target="_blank"
|
||||
>
|
||||
二猫 AI 简历
|
||||
</a>
|
||||
</div> -->
|
||||
</footer>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.layout-footer {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
|
||||
@@ -53,11 +53,9 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
||||
<LaySearch id="header-search" />
|
||||
<!-- 国际化 -->
|
||||
<el-dropdown id="header-translation" trigger="click">
|
||||
<div
|
||||
class="globalization-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||
>
|
||||
<IconifyIconOffline :icon="GlobalizationIcon" />
|
||||
</div>
|
||||
<GlobalizationIcon
|
||||
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
|
||||
/>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu class="translation">
|
||||
<el-dropdown-item
|
||||
@@ -115,7 +113,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<span
|
||||
class="set-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||
class="set-icon navbar-bg-hover"
|
||||
:title="t('buttons.pureOpenSystemSet')"
|
||||
@click="onPanel"
|
||||
>
|
||||
@@ -174,7 +172,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
||||
}
|
||||
|
||||
.translation {
|
||||
:deep(.el-dropdown-menu__item) {
|
||||
::v-deep(.el-dropdown-menu__item) {
|
||||
padding: 5px 40px;
|
||||
}
|
||||
|
||||
@@ -192,7 +190,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
||||
.logout {
|
||||
width: 120px;
|
||||
|
||||
:deep(.el-dropdown-menu__item) {
|
||||
::v-deep(.el-dropdown-menu__item) {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
min-width: 100%;
|
||||
|
||||
@@ -8,10 +8,6 @@ defineProps({
|
||||
noticeItem: {
|
||||
type: Object as PropType<ListItem>,
|
||||
default: () => {}
|
||||
},
|
||||
isLast: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
});
|
||||
|
||||
@@ -53,11 +49,7 @@ function hoverDescription(event, description) {
|
||||
|
||||
<template>
|
||||
<div
|
||||
:class="[
|
||||
'notice-container',
|
||||
'border-0 border-solid border-[#f0f0f0] dark:border-[#303030]',
|
||||
{ 'border-b': !isLast }
|
||||
]"
|
||||
class="notice-container border-0 border-b-[1px] border-solid border-[#f0f0f0] dark:border-[#303030]"
|
||||
>
|
||||
<el-avatar
|
||||
v-if="noticeItem.avatar"
|
||||
@@ -127,6 +119,8 @@ function hoverDescription(event, description) {
|
||||
justify-content: space-between;
|
||||
padding: 12px 0;
|
||||
|
||||
// border-bottom: 1px solid #f0f0f0;
|
||||
|
||||
.notice-container-avatar {
|
||||
margin-right: 16px;
|
||||
background: #fff;
|
||||
|
||||
@@ -18,12 +18,7 @@ defineProps({
|
||||
|
||||
<template>
|
||||
<div v-if="list.length">
|
||||
<NoticeItem
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
:noticeItem="item"
|
||||
:isLast="index === list.length - 1"
|
||||
/>
|
||||
<NoticeItem v-for="(item, index) in list" :key="index" :noticeItem="item" />
|
||||
</div>
|
||||
<el-empty v-else :description="transformI18n(emptyText)" />
|
||||
</template>
|
||||
|
||||
@@ -3,53 +3,32 @@ import { useI18n } from "vue-i18n";
|
||||
import { ref, computed } from "vue";
|
||||
import { noticesData } from "./data";
|
||||
import NoticeList from "./components/NoticeList.vue";
|
||||
|
||||
import BellIcon from "~icons/lucide/bell";
|
||||
import ArrowRightIcon from "~icons/ri/arrow-right-s-line";
|
||||
import BellIcon from "~icons/ep/bell";
|
||||
|
||||
const { t } = useI18n();
|
||||
const dropdownRef = ref();
|
||||
const noticesNum = ref(0);
|
||||
const notices = ref(noticesData);
|
||||
const activeKey = ref(noticesData[0]?.key);
|
||||
|
||||
notices.value.map(v => (noticesNum.value += v.list.length));
|
||||
|
||||
const getLabel = computed(
|
||||
() => item =>
|
||||
t(item.name) + (item.list.length > 0 ? `(${item.list.length})` : "")
|
||||
);
|
||||
|
||||
const currentNoticeHasData = computed(() => {
|
||||
const currentNotice = notices.value.find(
|
||||
item => item.key === activeKey.value
|
||||
);
|
||||
return currentNotice && currentNotice.list.length > 0;
|
||||
});
|
||||
|
||||
const hasAnyNoticeData = computed(() => {
|
||||
return notices.value.some(
|
||||
item => Array.isArray(item.list) && item.list.length > 0
|
||||
);
|
||||
});
|
||||
|
||||
const onWatchMore = () => {
|
||||
dropdownRef.value.handleClose();
|
||||
};
|
||||
|
||||
const onMarkAsRead = () => {
|
||||
const currentNotice = notices.value.find(
|
||||
item => item.key === activeKey.value
|
||||
);
|
||||
if (currentNotice) {
|
||||
currentNotice.list = [];
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-dropdown ref="dropdownRef" trigger="click" placement="bottom-end">
|
||||
<el-dropdown trigger="click" placement="bottom-end">
|
||||
<span
|
||||
:class="['dropdown-badge', 'navbar-bg-hover', 'select-none', 'mr-[7px]']"
|
||||
:class="[
|
||||
'dropdown-badge',
|
||||
'navbar-bg-hover',
|
||||
'select-none',
|
||||
Number(noticesNum) !== 0 && 'mr-[10px]'
|
||||
]"
|
||||
>
|
||||
<el-badge is-dot :hidden="!hasAnyNoticeData">
|
||||
<el-badge :value="Number(noticesNum) === 0 ? '' : noticesNum" :max="99">
|
||||
<span class="header-notice-icon">
|
||||
<IconifyIconOffline :icon="BellIcon" />
|
||||
</span>
|
||||
@@ -71,7 +50,7 @@ const onMarkAsRead = () => {
|
||||
<span v-else>
|
||||
<template v-for="item in notices" :key="item.key">
|
||||
<el-tab-pane :label="getLabel(item)" :name="`${item.key}`">
|
||||
<el-scrollbar max-height="345px">
|
||||
<el-scrollbar max-height="330px">
|
||||
<div class="noticeList-container">
|
||||
<NoticeList :list="item.list" :emptyText="item.emptyText" />
|
||||
</div>
|
||||
@@ -80,54 +59,12 @@ const onMarkAsRead = () => {
|
||||
</template>
|
||||
</span>
|
||||
</el-tabs>
|
||||
<div
|
||||
v-if="currentNoticeHasData"
|
||||
class="border-t border-t-(--el-border-color-light) text-sm"
|
||||
>
|
||||
<div class="flex-bc m-1">
|
||||
<el-button type="primary" size="small" text @click="onWatchMore">
|
||||
{{ t("buttons.pureWatchMore") }}
|
||||
<IconifyIconOffline :icon="ArrowRightIcon" />
|
||||
</el-button>
|
||||
<el-button type="primary" size="small" text @click="onMarkAsRead">
|
||||
{{ t("buttons.pureMarkAsRead") }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* ”铃铛“摇晃衰减动画 */
|
||||
@keyframes pure-bell-ring {
|
||||
0%,
|
||||
100% {
|
||||
transform-origin: top;
|
||||
}
|
||||
|
||||
15% {
|
||||
transform: rotateZ(10deg);
|
||||
}
|
||||
|
||||
30% {
|
||||
transform: rotateZ(-10deg);
|
||||
}
|
||||
|
||||
45% {
|
||||
transform: rotateZ(5deg);
|
||||
}
|
||||
|
||||
60% {
|
||||
transform: rotateZ(-5deg);
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: rotateZ(2deg);
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-badge {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -137,13 +74,7 @@ const onMarkAsRead = () => {
|
||||
cursor: pointer;
|
||||
|
||||
.header-notice-icon {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.header-notice-icon svg {
|
||||
animation: pure-bell-ring 1s both;
|
||||
}
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ onBeforeUnmount(() => {
|
||||
<div class="right-panel-background" />
|
||||
<div ref="target" class="right-panel bg-bg_color">
|
||||
<div
|
||||
class="flex-bc py-3 px-5 border-0 border-l border-solid border-(--pure-border-color)"
|
||||
class="project-configuration border-0 border-b-[1px] border-solid border-[var(--pure-border-color)]"
|
||||
>
|
||||
<h4 class="dark:text-white">
|
||||
{{ t("panel.pureSystemSet") }}
|
||||
@@ -73,14 +73,12 @@ onBeforeUnmount(() => {
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
<el-scrollbar
|
||||
class="border-y border-l border-r-0 border-solid border-(--pure-border-color) h-[calc(100vh-104px)]!"
|
||||
>
|
||||
<el-scrollbar>
|
||||
<slot />
|
||||
</el-scrollbar>
|
||||
|
||||
<div
|
||||
class="flex justify-end p-3 border-0 border-l border-solid border-(--pure-border-color)"
|
||||
class="flex justify-end p-3 border-0 border-t-[1px] border-solid border-[var(--pure-border-color)]"
|
||||
>
|
||||
<el-button
|
||||
v-tippy="{
|
||||
@@ -101,6 +99,10 @@ onBeforeUnmount(() => {
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-scrollbar) {
|
||||
height: calc(100vh - 110px);
|
||||
}
|
||||
|
||||
.right-panel-background {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
@@ -137,4 +139,11 @@ onBeforeUnmount(() => {
|
||||
transform: translate(0);
|
||||
}
|
||||
}
|
||||
|
||||
.project-configuration {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 14px 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -11,7 +11,7 @@ function handleSearch() {
|
||||
<template>
|
||||
<div>
|
||||
<div
|
||||
class="search-container w-[40px] h-[48px] flex-c cursor-pointer navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||
class="search-container w-[40px] h-[48px] flex-c cursor-pointer navbar-bg-hover"
|
||||
@click="handleSearch"
|
||||
>
|
||||
<IconifyIconOffline icon="ri/search-line" />
|
||||
|
||||
@@ -9,6 +9,14 @@ import {
|
||||
onUnmounted,
|
||||
onBeforeMount
|
||||
} from "vue";
|
||||
import {
|
||||
useDark,
|
||||
debounce,
|
||||
isNumber,
|
||||
useGlobal,
|
||||
isAllEmpty,
|
||||
useWatermark
|
||||
} from "@pureadmin/utils";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { emitter } from "@/utils/mitt";
|
||||
import LayPanel from "../lay-panel/index.vue";
|
||||
@@ -17,7 +25,6 @@ import { useAppStoreHook } from "@/store/modules/app";
|
||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||
import Segmented, { type OptionsType } from "@/components/ReSegmented";
|
||||
import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
|
||||
import { useDark, useGlobal, debounce, isNumber } from "@pureadmin/utils";
|
||||
|
||||
import Check from "~icons/ep/check";
|
||||
import LeftArrow from "~icons/ri/arrow-left-s-line?width=20&height=20";
|
||||
@@ -27,8 +34,9 @@ import DarkIcon from "@/assets/svg/dark.svg?component";
|
||||
import SystemIcon from "@/assets/svg/system.svg?component";
|
||||
|
||||
const { t } = useI18n();
|
||||
const { device } = useNav();
|
||||
const { isDark } = useDark();
|
||||
const { device, title } = useNav();
|
||||
const { setWatermark, clear } = useWatermark();
|
||||
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
||||
|
||||
const mixRef = ref();
|
||||
@@ -58,6 +66,12 @@ const markValue = ref($storage.configure?.showModel ?? "smart");
|
||||
|
||||
const logoVal = ref($storage.configure?.showLogo ?? true);
|
||||
|
||||
/** WIP... */
|
||||
const watermarkConfigs = reactive({
|
||||
enable: false,
|
||||
text: null
|
||||
});
|
||||
|
||||
const settings = reactive({
|
||||
greyVal: $storage.configure.grey,
|
||||
weakVal: $storage.configure.weak,
|
||||
@@ -129,6 +143,21 @@ function onChange({ option }) {
|
||||
emitter.emit("tagViewsShowModel", value);
|
||||
}
|
||||
|
||||
function onWatermarkSwitchChange(value) {
|
||||
const text = isAllEmpty(watermarkConfigs.text)
|
||||
? title.value
|
||||
: watermarkConfigs.text;
|
||||
if (value) {
|
||||
setWatermark(text);
|
||||
} else {
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
function onWatermarkInputChange(value) {
|
||||
setWatermark(value);
|
||||
}
|
||||
|
||||
/** 侧边栏Logo */
|
||||
function logoChange() {
|
||||
unref(logoVal)
|
||||
@@ -345,8 +374,8 @@ onUnmounted(() => removeMatchMedia);
|
||||
@click="setLayoutThemeColor(item.themeColor)"
|
||||
>
|
||||
<el-icon
|
||||
class="mt-px"
|
||||
:size="20"
|
||||
style="margin: 0.1em 0.1em 0 0"
|
||||
:size="17"
|
||||
:color="getThemeColor(item.themeColor)"
|
||||
>
|
||||
<IconifyIconOffline :icon="Check" />
|
||||
@@ -448,29 +477,38 @@ onUnmounted(() => removeMatchMedia);
|
||||
/>
|
||||
|
||||
<p class="mt-5! font-medium text-sm dark:text-white">
|
||||
{{ t("panel.pureInterfaceDisplay") }}
|
||||
{{ t("panel.pureFullScreenWatermark") }}
|
||||
</p>
|
||||
<ul class="setting">
|
||||
<li>
|
||||
<span class="dark:text-white">{{ t("panel.pureGreyModel") }}</span>
|
||||
<span class="dark:text-white">
|
||||
{{ t("panel.pureEnableWatermark") }}
|
||||
</span>
|
||||
<el-switch
|
||||
v-model="settings.greyVal"
|
||||
v-model="watermarkConfigs.enable"
|
||||
inline-prompt
|
||||
:active-text="t('buttons.pureOpenText')"
|
||||
:inactive-text="t('buttons.pureCloseText')"
|
||||
@change="greyChange"
|
||||
@change="onWatermarkSwitchChange"
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<span class="dark:text-white">{{ t("panel.pureWeakModel") }}</span>
|
||||
<el-switch
|
||||
v-model="settings.weakVal"
|
||||
inline-prompt
|
||||
:active-text="t('buttons.pureOpenText')"
|
||||
:inactive-text="t('buttons.pureCloseText')"
|
||||
@change="weekChange"
|
||||
<span class="dark:text-white">
|
||||
{{ t("panel.pureWatermarkText") }}
|
||||
</span>
|
||||
<el-input
|
||||
v-model="watermarkConfigs.text"
|
||||
class="w-[100px]!"
|
||||
:placeholder="title"
|
||||
@input="onWatermarkInputChange"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p class="mt-5! font-medium text-sm dark:text-white">
|
||||
{{ t("panel.pureInterfaceDisplay") }}
|
||||
</p>
|
||||
<ul class="setting">
|
||||
<li>
|
||||
<span class="dark:text-white">{{ t("panel.pureHiddenTags") }}</span>
|
||||
<el-switch
|
||||
@@ -491,6 +529,18 @@ onUnmounted(() => removeMatchMedia);
|
||||
@change="hideFooterChange"
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<span class="dark:text-white">
|
||||
{{ t("panel.pureMultiTagsCache") }}
|
||||
</span>
|
||||
<el-switch
|
||||
v-model="settings.multiTagsCache"
|
||||
inline-prompt
|
||||
:active-text="t('buttons.pureOpenText')"
|
||||
:inactive-text="t('buttons.pureCloseText')"
|
||||
@change="multiTagsCacheChange"
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<span class="dark:text-white">Logo</span>
|
||||
<el-switch
|
||||
@@ -504,15 +554,23 @@ onUnmounted(() => removeMatchMedia);
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<span class="dark:text-white">
|
||||
{{ t("panel.pureMultiTagsCache") }}
|
||||
</span>
|
||||
<span class="dark:text-white">{{ t("panel.pureGreyModel") }}</span>
|
||||
<el-switch
|
||||
v-model="settings.multiTagsCache"
|
||||
v-model="settings.greyVal"
|
||||
inline-prompt
|
||||
:active-text="t('buttons.pureOpenText')"
|
||||
:inactive-text="t('buttons.pureCloseText')"
|
||||
@change="multiTagsCacheChange"
|
||||
@change="greyChange"
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<span class="dark:text-white">{{ t("panel.pureWeakModel") }}</span>
|
||||
<el-switch
|
||||
v-model="settings.weakVal"
|
||||
inline-prompt
|
||||
:active-text="t('buttons.pureOpenText')"
|
||||
:inactive-text="t('buttons.pureCloseText')"
|
||||
@change="weekChange"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -538,24 +596,17 @@ onUnmounted(() => removeMatchMedia);
|
||||
}
|
||||
|
||||
.theme-color {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-top: 8px;
|
||||
height: 20px;
|
||||
|
||||
li {
|
||||
position: relative;
|
||||
width: 21px;
|
||||
height: 21px;
|
||||
float: left;
|
||||
height: 20px;
|
||||
margin-right: 8px;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
box-shadow: rgb(0 0 0 / 15%) 0 0 0 1px inset;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&:hover {
|
||||
box-shadow:
|
||||
rgb(0 0 0 / 25%) 0 0 0 1px inset,
|
||||
0 2px 4px rgb(0 0 0 / 15%);
|
||||
transform: scale(1.1);
|
||||
&:nth-child(1) {
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,11 +83,9 @@ onMounted(() => {
|
||||
<LaySearch id="header-search" />
|
||||
<!-- 国际化 -->
|
||||
<el-dropdown id="header-translation" trigger="click">
|
||||
<div
|
||||
class="globalization-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||
>
|
||||
<IconifyIconOffline :icon="GlobalizationIcon" />
|
||||
</div>
|
||||
<GlobalizationIcon
|
||||
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
|
||||
/>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu class="translation">
|
||||
<el-dropdown-item
|
||||
@@ -143,7 +141,7 @@ onMounted(() => {
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<span
|
||||
class="set-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||
class="set-icon navbar-bg-hover"
|
||||
:title="t('buttons.pureOpenSystemSet')"
|
||||
@click="onPanel"
|
||||
>
|
||||
@@ -159,7 +157,7 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.translation {
|
||||
:deep(.el-dropdown-menu__item) {
|
||||
::v-deep(.el-dropdown-menu__item) {
|
||||
padding: 5px 40px;
|
||||
}
|
||||
|
||||
@@ -177,7 +175,7 @@ onMounted(() => {
|
||||
.logout {
|
||||
width: 120px;
|
||||
|
||||
:deep(.el-dropdown-menu__item) {
|
||||
::v-deep(.el-dropdown-menu__item) {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
min-width: 100%;
|
||||
|
||||
@@ -104,11 +104,9 @@ watch(
|
||||
<LaySearch id="header-search" />
|
||||
<!-- 国际化 -->
|
||||
<el-dropdown id="header-translation" trigger="click">
|
||||
<div
|
||||
class="globalization-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||
>
|
||||
<IconifyIconOffline :icon="GlobalizationIcon" />
|
||||
</div>
|
||||
<GlobalizationIcon
|
||||
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
|
||||
/>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu class="translation">
|
||||
<el-dropdown-item
|
||||
@@ -164,7 +162,7 @@ watch(
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<span
|
||||
class="set-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||
class="set-icon navbar-bg-hover"
|
||||
:title="t('buttons.pureOpenSystemSet')"
|
||||
@click="onPanel"
|
||||
>
|
||||
@@ -180,7 +178,7 @@ watch(
|
||||
}
|
||||
|
||||
.translation {
|
||||
:deep(.el-dropdown-menu__item) {
|
||||
::v-deep(.el-dropdown-menu__item) {
|
||||
padding: 5px 40px;
|
||||
}
|
||||
|
||||
@@ -198,7 +196,7 @@ watch(
|
||||
.logout {
|
||||
width: 120px;
|
||||
|
||||
:deep(.el-dropdown-menu__item) {
|
||||
::v-deep(.el-dropdown-menu__item) {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
min-width: 100%;
|
||||
|
||||
@@ -24,10 +24,7 @@ watch(
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span
|
||||
class="fullscreen-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||
@click="toggle"
|
||||
>
|
||||
<span class="fullscreen-icon navbar-bg-hover" @click="toggle">
|
||||
<IconifyIconOffline :icon="screenIcon" />
|
||||
</span>
|
||||
</template>
|
||||
|
||||
@@ -209,26 +209,18 @@ function initRouter() {
|
||||
});
|
||||
} else {
|
||||
return new Promise(resolve => {
|
||||
getAsyncRoutes().then(({ code, data }) => {
|
||||
if (code === 0) {
|
||||
handleAsyncRoutes(cloneDeep(data));
|
||||
storageLocal().setItem(key, data);
|
||||
resolve(router);
|
||||
} else {
|
||||
resolve(router);
|
||||
}
|
||||
getAsyncRoutes().then(({ data }) => {
|
||||
handleAsyncRoutes(cloneDeep(data));
|
||||
storageLocal().setItem(key, data);
|
||||
resolve(router);
|
||||
});
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return new Promise(resolve => {
|
||||
getAsyncRoutes().then(({ code, data }) => {
|
||||
if (code === 0) {
|
||||
handleAsyncRoutes(cloneDeep(data));
|
||||
resolve(router);
|
||||
} else {
|
||||
resolve(router);
|
||||
}
|
||||
getAsyncRoutes().then(({ data }) => {
|
||||
handleAsyncRoutes(cloneDeep(data));
|
||||
resolve(router);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -80,12 +80,8 @@ export const useUserStore = defineStore("pure-user", {
|
||||
return new Promise<UserResult>((resolve, reject) => {
|
||||
getLogin(data)
|
||||
.then(data => {
|
||||
if (data.code === 0) {
|
||||
setToken(data.data);
|
||||
resolve(data);
|
||||
} else {
|
||||
reject(data.message);
|
||||
}
|
||||
if (data?.success) setToken(data.data);
|
||||
resolve(data);
|
||||
})
|
||||
.catch(error => {
|
||||
reject(error);
|
||||
@@ -107,11 +103,9 @@ export const useUserStore = defineStore("pure-user", {
|
||||
return new Promise<RefreshTokenResult>((resolve, reject) => {
|
||||
refreshTokenApi(data)
|
||||
.then(data => {
|
||||
if (data.code === 0) {
|
||||
if (data) {
|
||||
setToken(data.data);
|
||||
resolve(data);
|
||||
} else {
|
||||
reject(data.message);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
@@ -135,6 +135,17 @@ html.dark {
|
||||
}
|
||||
}
|
||||
|
||||
/* 系统配置面板 */
|
||||
.right-panel-items {
|
||||
.el-divider__text {
|
||||
--el-bg-color: var(--el-bg-color);
|
||||
}
|
||||
|
||||
.el-divider--horizontal {
|
||||
border-top: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* 表单设计器 */
|
||||
.design-form {
|
||||
.el-main.config-content,
|
||||
|
||||
@@ -35,18 +35,3 @@
|
||||
.html-weakness {
|
||||
filter: invert(80%);
|
||||
}
|
||||
|
||||
/* 轻微缩小,再恢复原状的平滑缩放动画 */
|
||||
@keyframes pure-scale-bounce {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(0.9);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,14 +34,12 @@
|
||||
}
|
||||
|
||||
.set-icon,
|
||||
.fullscreen-icon,
|
||||
.globalization-icon {
|
||||
.fullscreen-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 40px;
|
||||
height: 48px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -233,7 +231,6 @@
|
||||
.is-active.submenu-title-noDropdown.outer-most > * {
|
||||
z-index: 1;
|
||||
color: #fff;
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
.is-active.submenu-title-noDropdown.outer-most::before {
|
||||
@@ -452,7 +449,7 @@
|
||||
/* 搜索 */
|
||||
.search-container,
|
||||
/* 国际化 */
|
||||
.globalization-icon,
|
||||
.globalization,
|
||||
/* 全屏 */
|
||||
.fullscreen-icon,
|
||||
/* 消息通知 */
|
||||
@@ -471,8 +468,12 @@
|
||||
color: var(--pure-theme-sub-menu-active-text);
|
||||
}
|
||||
|
||||
.globalization-icon {
|
||||
.globalization {
|
||||
width: 40px;
|
||||
height: 48px;
|
||||
padding: 11px;
|
||||
color: var(--pure-theme-sub-menu-active-text);
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
@@ -629,7 +630,7 @@ body[layout="vertical"] {
|
||||
/* 搜索 */
|
||||
.search-container,
|
||||
/* 国际化 */
|
||||
.globalization-icon,
|
||||
.globalization,
|
||||
/* 全屏 */
|
||||
.fullscreen-icon,
|
||||
/* 消息通知 */
|
||||
|
||||
@@ -42,9 +42,5 @@
|
||||
}
|
||||
|
||||
@utility navbar-bg-hover {
|
||||
@apply select-none dark:text-white dark:hover:bg-[#242424]!;
|
||||
}
|
||||
|
||||
@utility animate-scale-bounce {
|
||||
animation: pure-scale-bounce 0.3s ease-in-out;
|
||||
@apply dark:text-white dark:hover:bg-[#242424]!;
|
||||
}
|
||||
|
||||
@@ -10,8 +10,6 @@ import type {
|
||||
PureHttpRequestConfig
|
||||
} from "./types.d";
|
||||
import { stringify } from "qs";
|
||||
import { message } from "@/utils/message";
|
||||
import { $t, transformI18n } from "@/plugins/i18n";
|
||||
import { getToken, formatToken } from "@/utils/auth";
|
||||
import { useUserStoreHook } from "@/store/modules/user";
|
||||
|
||||
@@ -92,13 +90,6 @@ class PureHttp {
|
||||
PureHttp.requests.forEach(cb => cb(token));
|
||||
PureHttp.requests = [];
|
||||
})
|
||||
.catch(_err => {
|
||||
PureHttp.requests = [];
|
||||
useUserStoreHook().logOut();
|
||||
message(transformI18n($t("login.pureLoginExpired")), {
|
||||
type: "warning"
|
||||
});
|
||||
})
|
||||
.finally(() => {
|
||||
PureHttp.isRefreshing = false;
|
||||
});
|
||||
|
||||
@@ -171,7 +171,7 @@ onBeforeUnmount(() => {
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-upload-dragger) {
|
||||
::v-deep(.el-upload-dragger) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 180px;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from "vue";
|
||||
import { formUpload } from "@/api/mock";
|
||||
import { message } from "@/utils/message";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { type UserInfo, getMine } from "@/api/user";
|
||||
import type { FormInstance, FormRules } from "element-plus";
|
||||
import ReCropperPreview from "@/components/ReCropperPreview";
|
||||
@@ -73,8 +73,8 @@ const handleSubmitImage = () => {
|
||||
files: new File([cropperBlob.value], "avatar")
|
||||
});
|
||||
formUpload(formData)
|
||||
.then(({ code }) => {
|
||||
if (code === 0) {
|
||||
.then(({ success, data }) => {
|
||||
if (success) {
|
||||
message("更新头像成功", { type: "success" });
|
||||
handleClose();
|
||||
} else {
|
||||
@@ -98,11 +98,8 @@ const onSubmit = async (formEl: FormInstance) => {
|
||||
});
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
const { code, data } = await getMine();
|
||||
if (code === 0) {
|
||||
Object.assign(userInfos, data);
|
||||
}
|
||||
getMine().then(res => {
|
||||
Object.assign(userInfos, res.data);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -55,13 +55,11 @@ const columns: TableColumnList = [
|
||||
|
||||
async function onSearch() {
|
||||
loading.value = true;
|
||||
const { code, data } = await getMineLogs();
|
||||
if (code === 0) {
|
||||
dataList.value = data.list;
|
||||
pagination.total = data.total;
|
||||
pagination.pageSize = data.pageSize;
|
||||
pagination.currentPage = data.currentPage;
|
||||
}
|
||||
const { data } = await getMineLogs();
|
||||
dataList.value = data.list;
|
||||
pagination.total = data.total;
|
||||
pagination.pageSize = data.pageSize;
|
||||
pagination.currentPage = data.currentPage;
|
||||
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { getMine } from "@/api/user";
|
||||
import { useRouter } from "vue-router";
|
||||
import { ref, onBeforeMount } from "vue";
|
||||
import { ReText } from "@/components/ReText";
|
||||
import Profile from "./components/Profile.vue";
|
||||
import { ref, onMounted, onBeforeMount } from "vue";
|
||||
import Preferences from "./components/Preferences.vue";
|
||||
import SecurityLog from "./components/SecurityLog.vue";
|
||||
import { useGlobal, deviceDetection } from "@pureadmin/utils";
|
||||
@@ -61,11 +61,8 @@ const panes = [
|
||||
];
|
||||
const witchPane = ref("profile");
|
||||
|
||||
onMounted(async () => {
|
||||
const { code, data } = await getMine();
|
||||
if (code === 0) {
|
||||
userInfo.value = data;
|
||||
}
|
||||
getMine().then(res => {
|
||||
userInfo.value = res.data;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -56,13 +56,13 @@ onMounted(() => {
|
||||
:avatars="{
|
||||
default: {
|
||||
styles: {
|
||||
position: 'start',
|
||||
position: 'left',
|
||||
container: { marginLeft: '12px', marginRight: '5px' }
|
||||
}
|
||||
},
|
||||
ai: {
|
||||
src: 'https://xiaoxian521.github.io/hyperlink/img/vue-pure-admin/chatai/gemini.png',
|
||||
styles: { position: 'start', avatar: { paddingTop: '6px' } }
|
||||
styles: { position: 'left', avatar: { paddingTop: '6px' } }
|
||||
}
|
||||
}"
|
||||
:speechToText="{
|
||||
@@ -80,11 +80,11 @@ onMounted(() => {
|
||||
},
|
||||
svg: { styles: { default: { bottom: '0.35em', left: '0.35em' } } }
|
||||
},
|
||||
position: 'inside-end'
|
||||
position: 'inside-right'
|
||||
}
|
||||
}"
|
||||
:submitButtonStyles="{
|
||||
position: 'outside-end',
|
||||
position: 'outside-right',
|
||||
submit: {
|
||||
container: {
|
||||
default: {
|
||||
|
||||
@@ -89,7 +89,7 @@ onMounted(() => {
|
||||
}
|
||||
}"
|
||||
:submitButtonStyles="{
|
||||
position: 'outside-end',
|
||||
position: 'outside-right',
|
||||
submit: {
|
||||
container: {
|
||||
default: {
|
||||
|
||||
@@ -46,7 +46,7 @@ onMounted(() => {
|
||||
}
|
||||
}"
|
||||
:avatars="{
|
||||
default: { styles: { position: 'start' } },
|
||||
default: { styles: { position: 'left' } },
|
||||
ai: { src: 'https://xiaoxian521.github.io/hyperlink/svg/openai.svg' }
|
||||
}"
|
||||
:submitButtonStyles="{
|
||||
|
||||
@@ -22,7 +22,7 @@ onMounted(() => {
|
||||
style="border-radius: 8px"
|
||||
:speechToText="{
|
||||
webSpeech: { language: 'zh-CN' },
|
||||
button: { position: 'outside-start' }
|
||||
button: { position: 'outside-left' }
|
||||
}"
|
||||
:textInput="{
|
||||
placeholder: { text: '发送消息' }
|
||||
|
||||
@@ -68,7 +68,7 @@ const shortcuts1 = [
|
||||
|
||||
const value3 = ref("");
|
||||
const datePickerRef = ref();
|
||||
const placement = ref("auto") as any;
|
||||
const placement = ref("auto");
|
||||
const checkTag = ref([
|
||||
{
|
||||
title: "auto", // https://popper.js.org/docs/v2/constructors/#options
|
||||
|
||||
@@ -71,17 +71,17 @@ const settingTB: ContextProps = reactive({
|
||||
|
||||
.dv-a {
|
||||
padding-top: 30vh;
|
||||
color: rgb(30 144 255 / 80%);
|
||||
color: rgba($color: dodgerblue, $alpha: 80%);
|
||||
}
|
||||
|
||||
.dv-b {
|
||||
padding-top: 10vh;
|
||||
color: rgb(0 0 0 / 80%);
|
||||
color: rgba($color: #000, $alpha: 80%);
|
||||
}
|
||||
|
||||
.dv-c {
|
||||
padding-top: 18vh;
|
||||
color: rgb(206 39 45 / 80%);
|
||||
color: rgba($color: #ce272d, $alpha: 80%);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -23,8 +23,8 @@ const submitForm = formEl => {
|
||||
date: validateForm.date // 别的字段
|
||||
});
|
||||
formUpload(formData)
|
||||
.then(({ code }) => {
|
||||
if (code === 0) {
|
||||
.then(({ success }) => {
|
||||
if (success) {
|
||||
message("提交成功", { type: "success" });
|
||||
} else {
|
||||
message("提交失败");
|
||||
|
||||
@@ -143,7 +143,7 @@ const onDownload = () => {
|
||||
class="pure-upload"
|
||||
list-type="picture-card"
|
||||
accept="image/jpeg,image/png,image/gif"
|
||||
action="https://pureadmin.free.beeceptor.com/images"
|
||||
action="https://run.mocky.io/v3/3aa761d7-b0b3-4a03-96b3-6168d4f7467b"
|
||||
:limit="3"
|
||||
:headers="{ Authorization: 'eyJhbGciOiJIUzUxMiJ9.admin' }"
|
||||
:on-exceed="onExceed"
|
||||
@@ -264,13 +264,13 @@ const onDownload = () => {
|
||||
表格操作栏中的上传头像功能
|
||||
</p>
|
||||
<p class="text-[red] text-[12px] flex flex-auto items-center justify-end">
|
||||
免责声明:上传接口使用
|
||||
免责声明:上传接口使用免费开源的
|
||||
<el-link
|
||||
href="https://beeceptor.com/"
|
||||
href="https://designer.mocky.io/"
|
||||
target="_blank"
|
||||
style="font-size: 16px; font-weight: 800"
|
||||
>
|
||||
Beeceptor
|
||||
Mocky
|
||||
</el-link>
|
||||
<span class="font-bold text-[18x]"> 请不要上传重要信息 </span
|
||||
>,如果造成任何损失,我们概不负责
|
||||
|
||||
@@ -38,14 +38,12 @@ const dataLoading = ref(true);
|
||||
|
||||
const getCardListData = async () => {
|
||||
try {
|
||||
const { code, data } = await getCardList();
|
||||
if (code === 0) {
|
||||
productList.value = data.list;
|
||||
pagination.value = {
|
||||
...pagination.value,
|
||||
total: data.list.length
|
||||
};
|
||||
}
|
||||
const { data } = await getCardList();
|
||||
productList.value = data.list;
|
||||
pagination.value = {
|
||||
...pagination.value,
|
||||
total: data.list.length
|
||||
};
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
|
||||
@@ -73,21 +73,23 @@ const onLogin = async (formEl: FormInstance | undefined) => {
|
||||
username: ruleForm.username,
|
||||
password: ruleForm.password
|
||||
})
|
||||
.then(async () => {
|
||||
// 获取后端路由
|
||||
await initRouter();
|
||||
disabled.value = true;
|
||||
router.push(getTopMenu(true).path).then(() => {
|
||||
message(t("login.pureLoginSuccess"), { type: "success" });
|
||||
});
|
||||
.then(res => {
|
||||
if (res.success) {
|
||||
// 获取后端路由
|
||||
return initRouter().then(() => {
|
||||
disabled.value = true;
|
||||
router
|
||||
.push(getTopMenu(true).path)
|
||||
.then(() => {
|
||||
message(t("login.pureLoginSuccess"), { type: "success" });
|
||||
})
|
||||
.finally(() => (disabled.value = false));
|
||||
});
|
||||
} else {
|
||||
message(t("login.pureLoginFail"), { type: "error" });
|
||||
}
|
||||
})
|
||||
.catch(_err => {
|
||||
message(t("login.pureLoginFail"), { type: "error" });
|
||||
})
|
||||
.finally(() => {
|
||||
disabled.value = false;
|
||||
loading.value = false;
|
||||
});
|
||||
.finally(() => (loading.value = false));
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -334,9 +336,9 @@ watch(loginDay, value => {
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="w-full flex-c flex-wrap absolute bottom-3 text-sm text-[rgba(0,0,0,0.6)] dark:text-[rgba(220,220,242,0.8)]"
|
||||
class="w-full flex-c absolute bottom-3 text-sm text-[rgba(0,0,0,0.6)] dark:text-[rgba(220,220,242,0.8)]"
|
||||
>
|
||||
Copyright © 2020-2025
|
||||
Copyright © 2020-present
|
||||
<a
|
||||
class="hover:text-primary!"
|
||||
href="https://github.com/pure-admin"
|
||||
@@ -344,16 +346,6 @@ watch(loginDay, value => {
|
||||
>
|
||||
{{ title }}
|
||||
</a>
|
||||
<!-- <div class="ml-8">
|
||||
<span>赞助商:</span>
|
||||
<a
|
||||
class="hover:text-primary"
|
||||
href="https://ai-tools.cn/resume/start"
|
||||
target="_blank"
|
||||
>
|
||||
二猫 AI 简历
|
||||
</a>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -368,7 +360,7 @@ watch(loginDay, value => {
|
||||
}
|
||||
|
||||
.translation {
|
||||
:deep(.el-dropdown-menu__item) {
|
||||
::v-deep(.el-dropdown-menu__item) {
|
||||
padding: 5px 40px;
|
||||
}
|
||||
|
||||
|
||||
@@ -129,13 +129,11 @@ export function useRole(tableRef: Ref) {
|
||||
|
||||
async function onSearch() {
|
||||
loading.value = true;
|
||||
const { code, data } = await getLoginLogsList(toRaw(form));
|
||||
if (code === 0) {
|
||||
dataList.value = data.list;
|
||||
pagination.total = data.total;
|
||||
pagination.pageSize = data.pageSize;
|
||||
pagination.currentPage = data.currentPage;
|
||||
}
|
||||
const { data } = await getLoginLogsList(toRaw(form));
|
||||
dataList.value = data.list;
|
||||
pagination.total = data.total;
|
||||
pagination.pageSize = data.pageSize;
|
||||
pagination.currentPage = data.currentPage;
|
||||
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
|
||||
@@ -134,13 +134,11 @@ export function useRole(tableRef: Ref) {
|
||||
|
||||
async function onSearch() {
|
||||
loading.value = true;
|
||||
const { code, data } = await getOperationLogsList(toRaw(form));
|
||||
if (code === 0) {
|
||||
dataList.value = data.list;
|
||||
pagination.total = data.total;
|
||||
pagination.pageSize = data.pageSize;
|
||||
pagination.currentPage = data.currentPage;
|
||||
}
|
||||
const { data } = await getOperationLogsList(toRaw(form));
|
||||
dataList.value = data.list;
|
||||
pagination.total = data.total;
|
||||
pagination.pageSize = data.pageSize;
|
||||
pagination.currentPage = data.currentPage;
|
||||
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
|
||||
@@ -204,13 +204,11 @@ export function useRole(tableRef: Ref) {
|
||||
|
||||
async function onSearch() {
|
||||
loading.value = true;
|
||||
const { code, data } = await getSystemLogsList(toRaw(form));
|
||||
if (code === 0) {
|
||||
dataList.value = data.list;
|
||||
pagination.total = data.total;
|
||||
pagination.pageSize = data.pageSize;
|
||||
pagination.currentPage = data.currentPage;
|
||||
}
|
||||
const { data } = await getSystemLogsList(toRaw(form));
|
||||
dataList.value = data.list;
|
||||
pagination.total = data.total;
|
||||
pagination.pageSize = data.pageSize;
|
||||
pagination.currentPage = data.currentPage;
|
||||
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
|
||||
@@ -80,13 +80,11 @@ export function useRole() {
|
||||
|
||||
async function onSearch() {
|
||||
loading.value = true;
|
||||
const { code, data } = await getOnlineLogsList(toRaw(form));
|
||||
if (code === 0) {
|
||||
dataList.value = data.list;
|
||||
pagination.total = data.total;
|
||||
pagination.pageSize = data.pageSize;
|
||||
pagination.currentPage = data.currentPage;
|
||||
}
|
||||
const { data } = await getOnlineLogsList(toRaw(form));
|
||||
dataList.value = data.list;
|
||||
pagination.total = data.total;
|
||||
pagination.pageSize = data.pageSize;
|
||||
pagination.currentPage = data.currentPage;
|
||||
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
import { message } from "@/utils/message";
|
||||
import { initRouter } from "@/router/utils";
|
||||
import { storageLocal } from "@pureadmin/utils";
|
||||
import { type CSSProperties, ref, computed } from "vue";
|
||||
@@ -33,13 +32,12 @@ const options = [
|
||||
function onChange() {
|
||||
useUserStoreHook()
|
||||
.loginByUsername({ username: username.value, password: "admin123" })
|
||||
.then(() => {
|
||||
storageLocal().removeItem("async-routes");
|
||||
usePermissionStoreHook().clearAllCachePage();
|
||||
initRouter();
|
||||
})
|
||||
.catch(err => {
|
||||
message(err, { type: "error" });
|
||||
.then(res => {
|
||||
if (res.success) {
|
||||
storageLocal().removeItem("async-routes");
|
||||
usePermissionStoreHook().clearAllCachePage();
|
||||
initRouter();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -74,20 +74,17 @@ export function useDept() {
|
||||
|
||||
async function onSearch() {
|
||||
loading.value = true;
|
||||
const { code, data } = await getDeptList(); // 这里是返回一维数组结构,前端自行处理成树结构,返回格式要求:唯一id加父节点parentId,parentId取父节点id
|
||||
if (code === 0) {
|
||||
let newData = data;
|
||||
if (!isAllEmpty(form.name)) {
|
||||
// 前端搜索部门名称
|
||||
newData = newData.filter(item => item.name.includes(form.name));
|
||||
}
|
||||
if (!isAllEmpty(form.status)) {
|
||||
// 前端搜索状态
|
||||
newData = newData.filter(item => item.status === form.status);
|
||||
}
|
||||
dataList.value = handleTree(newData); // 处理成树结构
|
||||
const { data } = await getDeptList(); // 这里是返回一维数组结构,前端自行处理成树结构,返回格式要求:唯一id加父节点parentId,parentId取父节点id
|
||||
let newData = data;
|
||||
if (!isAllEmpty(form.name)) {
|
||||
// 前端搜索部门名称
|
||||
newData = newData.filter(item => item.name.includes(form.name));
|
||||
}
|
||||
|
||||
if (!isAllEmpty(form.status)) {
|
||||
// 前端搜索状态
|
||||
newData = newData.filter(item => item.status === form.status);
|
||||
}
|
||||
dataList.value = handleTree(newData); // 处理成树结构
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
}, 500);
|
||||
|
||||
@@ -106,18 +106,15 @@ export function useMenu() {
|
||||
|
||||
async function onSearch() {
|
||||
loading.value = true;
|
||||
const { code, data } = await getMenuList(); // 这里是返回一维数组结构,前端自行处理成树结构,返回格式要求:唯一id加父节点parentId,parentId取父节点id
|
||||
if (code === 0) {
|
||||
let newData = data;
|
||||
if (!isAllEmpty(form.title)) {
|
||||
// 前端搜索菜单名称
|
||||
newData = newData.filter(item =>
|
||||
transformI18n(item.title).includes(form.title)
|
||||
);
|
||||
}
|
||||
dataList.value = handleTree(newData); // 处理成树结构
|
||||
const { data } = await getMenuList(); // 这里是返回一维数组结构,前端自行处理成树结构,返回格式要求:唯一id加父节点parentId,parentId取父节点id
|
||||
let newData = data;
|
||||
if (!isAllEmpty(form.title)) {
|
||||
// 前端搜索菜单名称
|
||||
newData = newData.filter(item =>
|
||||
transformI18n(item.title).includes(form.title)
|
||||
);
|
||||
}
|
||||
|
||||
dataList.value = handleTree(newData); // 处理成树结构
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
}, 500);
|
||||
|
||||
@@ -163,13 +163,11 @@ export function useRole(treeRef: Ref) {
|
||||
|
||||
async function onSearch() {
|
||||
loading.value = true;
|
||||
const { code, data } = await getRoleList(toRaw(form));
|
||||
if (code === 0) {
|
||||
dataList.value = data.list;
|
||||
pagination.total = data.total;
|
||||
pagination.pageSize = data.pageSize;
|
||||
pagination.currentPage = data.currentPage;
|
||||
}
|
||||
const { data } = await getRoleList(toRaw(form));
|
||||
dataList.value = data.list;
|
||||
pagination.total = data.total;
|
||||
pagination.pageSize = data.pageSize;
|
||||
pagination.currentPage = data.currentPage;
|
||||
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
@@ -231,10 +229,8 @@ export function useRole(treeRef: Ref) {
|
||||
if (id) {
|
||||
curRow.value = row;
|
||||
isShow.value = true;
|
||||
const { code, data } = await getRoleMenuIds({ id });
|
||||
if (code === 0) {
|
||||
treeRef.value.setCheckedKeys(data);
|
||||
}
|
||||
const { data } = await getRoleMenuIds({ id });
|
||||
treeRef.value.setCheckedKeys(data);
|
||||
} else {
|
||||
curRow.value = null;
|
||||
isShow.value = false;
|
||||
@@ -272,11 +268,9 @@ export function useRole(treeRef: Ref) {
|
||||
|
||||
onMounted(async () => {
|
||||
onSearch();
|
||||
const { code, data } = await getRoleMenu();
|
||||
if (code === 0) {
|
||||
treeIds.value = getKeyList(data, "id");
|
||||
treeData.value = handleTree(data);
|
||||
}
|
||||
const { data } = await getRoleMenu();
|
||||
treeIds.value = getKeyList(data, "id");
|
||||
treeData.value = handleTree(data);
|
||||
});
|
||||
|
||||
watch(isExpandAll, val => {
|
||||
|
||||
@@ -272,13 +272,11 @@ export function useUser(tableRef: Ref, treeRef: Ref) {
|
||||
|
||||
async function onSearch() {
|
||||
loading.value = true;
|
||||
const { code, data } = await getUserList(toRaw(form));
|
||||
if (code === 0) {
|
||||
dataList.value = data.list;
|
||||
pagination.total = data.total;
|
||||
pagination.pageSize = data.pageSize;
|
||||
pagination.currentPage = data.currentPage;
|
||||
}
|
||||
const { data } = await getUserList(toRaw(form));
|
||||
dataList.value = data.list;
|
||||
pagination.total = data.total;
|
||||
pagination.pageSize = data.pageSize;
|
||||
pagination.currentPage = data.currentPage;
|
||||
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
@@ -499,16 +497,13 @@ export function useUser(tableRef: Ref, treeRef: Ref) {
|
||||
onSearch();
|
||||
|
||||
// 归属部门
|
||||
const { code, data } = await getDeptList();
|
||||
if (code === 0) {
|
||||
higherDeptOptions.value = handleTree(data);
|
||||
treeData.value = handleTree(data);
|
||||
}
|
||||
|
||||
const { data } = await getDeptList();
|
||||
higherDeptOptions.value = handleTree(data);
|
||||
treeData.value = handleTree(data);
|
||||
treeLoading.value = false;
|
||||
|
||||
// 角色列表
|
||||
roleOptions.value = (await getAllRoleList()).data ?? [];
|
||||
roleOptions.value = (await getAllRoleList()).data;
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { ref, computed } from "vue";
|
||||
import { tableDataDrag } from "../data";
|
||||
import { message } from "@/utils/message";
|
||||
import { ref, computed, useTemplateRef } from "vue";
|
||||
import { templateRef } from "@vueuse/core";
|
||||
import { clone, useDark, useECharts } from "@pureadmin/utils";
|
||||
|
||||
export function useColumns() {
|
||||
@@ -30,7 +31,7 @@ export function useColumns() {
|
||||
const theme = computed(() => (isDark.value ? "dark" : "light"));
|
||||
|
||||
dataList.value.forEach((_, i) => {
|
||||
const { setOptions } = useECharts(useTemplateRef(`PieChartRef${i}`), {
|
||||
const { setOptions } = useECharts(templateRef(`PieChartRef${i}`), {
|
||||
theme
|
||||
});
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import {
|
||||
getNodeByUniqueId,
|
||||
appendFieldByUniqueId
|
||||
} from "@/utils/tree";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useDetail } from "./hooks";
|
||||
import { ref, computed } from "vue";
|
||||
import { clone } from "@pureadmin/utils";
|
||||
@@ -16,7 +15,6 @@ defineOptions({
|
||||
name: "Tabs"
|
||||
});
|
||||
|
||||
const { locale } = useI18n();
|
||||
const { toDetail, router } = useDetail();
|
||||
const menusTree = clone(usePermissionStoreHook().wholeMenus, true);
|
||||
|
||||
@@ -32,12 +30,6 @@ const multiTags = computed(() => {
|
||||
return useMultiTagsStoreHook()?.multiTags;
|
||||
});
|
||||
|
||||
const treeSelectProps = {
|
||||
label: (data: any) => transformI18n(data.meta.title),
|
||||
children: "children",
|
||||
disabled: "disabled"
|
||||
};
|
||||
|
||||
function onCloseTags() {
|
||||
if (currentValues.value.length === 0) return;
|
||||
currentValues.value.forEach(uniqueId => {
|
||||
@@ -100,7 +92,6 @@ function onCloseTags() {
|
||||
|
||||
<el-divider />
|
||||
<el-tree-select
|
||||
:key="locale"
|
||||
v-model="currentValues"
|
||||
class="w-[300px]!"
|
||||
node-key="uniqueId"
|
||||
@@ -109,7 +100,12 @@ function onCloseTags() {
|
||||
multiple
|
||||
filterable
|
||||
default-expand-all
|
||||
:props="treeSelectProps"
|
||||
:props="{
|
||||
label: data => transformI18n(data.meta.title),
|
||||
value: 'uniqueId',
|
||||
children: 'children',
|
||||
disabled: 'disabled'
|
||||
}"
|
||||
:data="treeData"
|
||||
>
|
||||
<template #default="{ data }">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, ref, toRef, watch } from "vue";
|
||||
import { TransitionPresets, transition } from "@vueuse/core";
|
||||
import { TransitionPresets, executeTransition } from "@vueuse/core";
|
||||
import {
|
||||
Position,
|
||||
BaseEdge,
|
||||
@@ -153,7 +153,7 @@ async function runAnimation() {
|
||||
currentLength.value = totalLength;
|
||||
}
|
||||
|
||||
await transition(edgePoint, from, totalLength, {
|
||||
await executeTransition(edgePoint, from, totalLength, {
|
||||
transition: TransitionPresets.easeInOutCubic,
|
||||
duration: Math.max(1500, totalLength / 2),
|
||||
abort: () => !isAnimating.value
|
||||
|
||||
@@ -185,13 +185,11 @@ const optionsBasis: Array<OptionsType> = [
|
||||
}
|
||||
}"
|
||||
>
|
||||
<el-card shadow="never">
|
||||
<el-card shadow="never" class="h-[580px]">
|
||||
<div class="flex justify-between">
|
||||
<span class="text-md font-medium">数据统计</span>
|
||||
</div>
|
||||
<el-scrollbar max-height="504" class="mt-3">
|
||||
<WelcomeTable />
|
||||
</el-scrollbar>
|
||||
<WelcomeTable class="mt-3" />
|
||||
</el-card>
|
||||
</re-col>
|
||||
|
||||
@@ -273,10 +271,6 @@ const optionsBasis: Array<OptionsType> = [
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-timeline.is-start) {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
margin: 20px 20px 0 !important;
|
||||
}
|
||||
|
||||
@@ -59,4 +59,4 @@ export default ({ mode }: ConfigEnv): UserConfigExport => {
|
||||
__APP_INFO__: JSON.stringify(__APP_INFO__)
|
||||
}
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user