mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2026-02-13 17:30:27 +08:00
Compare commits
1 Commits
ff007fbc03
...
feat/fulls
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13a4f6ab63 |
@@ -5,4 +5,4 @@
|
|||||||
|
|
||||||
PATH="/usr/local/bin:$PATH"
|
PATH="/usr/local/bin:$PATH"
|
||||||
|
|
||||||
pnpm dlx commitlint --edit "$1"
|
npx --no-install commitlint --edit "$1"
|
||||||
@@ -55,6 +55,9 @@ panel:
|
|||||||
pureTagsStyleCardTip: Card tags for efficient browsing
|
pureTagsStyleCardTip: Card tags for efficient browsing
|
||||||
pureTagsStyleChrome: Chrome
|
pureTagsStyleChrome: Chrome
|
||||||
pureTagsStyleChromeTip: Chrome style is classic and elegant
|
pureTagsStyleChromeTip: Chrome style is classic and elegant
|
||||||
|
pureFullScreenWatermark: FullScreen Watermark
|
||||||
|
pureEnableWatermark: Watermark
|
||||||
|
pureWatermarkText: Text
|
||||||
pureInterfaceDisplay: Interface Display
|
pureInterfaceDisplay: Interface Display
|
||||||
pureGreyModel: Grey Model
|
pureGreyModel: Grey Model
|
||||||
pureWeakModel: Weak Model
|
pureWeakModel: Weak Model
|
||||||
@@ -238,19 +241,4 @@ login:
|
|||||||
purePassWordRuleReg: The password format should be any combination of 8-18 digits
|
purePassWordRuleReg: The password format should be any combination of 8-18 digits
|
||||||
purePassWordSureReg: Please enter confirm password
|
purePassWordSureReg: Please enter confirm password
|
||||||
purePassWordDifferentReg: The two passwords do not match!
|
purePassWordDifferentReg: The two passwords do not match!
|
||||||
purePassWordUpdateReg: Password has been updated
|
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
|
|
||||||
@@ -55,6 +55,9 @@ panel:
|
|||||||
pureTagsStyleCardTip: 卡片标签,高效浏览
|
pureTagsStyleCardTip: 卡片标签,高效浏览
|
||||||
pureTagsStyleChrome: 谷歌
|
pureTagsStyleChrome: 谷歌
|
||||||
pureTagsStyleChromeTip: 谷歌风格,经典美观
|
pureTagsStyleChromeTip: 谷歌风格,经典美观
|
||||||
|
pureFullScreenWatermark: 全屏水印
|
||||||
|
pureEnableWatermark: 水印
|
||||||
|
pureWatermarkText: 文本
|
||||||
pureInterfaceDisplay: 界面显示
|
pureInterfaceDisplay: 界面显示
|
||||||
pureGreyModel: 灰色模式
|
pureGreyModel: 灰色模式
|
||||||
pureWeakModel: 色弱模式
|
pureWeakModel: 色弱模式
|
||||||
@@ -238,19 +241,4 @@ login:
|
|||||||
purePassWordRuleReg: 密码格式应为8-18位数字、字母、符号的任意两种组合
|
purePassWordRuleReg: 密码格式应为8-18位数字、字母、符号的任意两种组合
|
||||||
purePassWordSureReg: 请输入确认密码
|
purePassWordSureReg: 请输入确认密码
|
||||||
purePassWordDifferentReg: 两次密码不一致!
|
purePassWordDifferentReg: 两次密码不一致!
|
||||||
purePassWordUpdateReg: 修改密码成功
|
purePassWordUpdateReg: 修改密码成功
|
||||||
pureLoginExpired: 登录已过期,请重新登录
|
|
||||||
tableBar:
|
|
||||||
pureList: 列表
|
|
||||||
pureLarge: 宽松
|
|
||||||
pureDefault: 默认
|
|
||||||
pureSmall: 紧凑
|
|
||||||
pureColumnSettings: 列设置
|
|
||||||
pureCollapse: 折叠
|
|
||||||
pureExpand: 展开
|
|
||||||
pureRefresh: 刷新
|
|
||||||
pureDensity: 密度
|
|
||||||
pureColumnDisplay: 列展示
|
|
||||||
pureReset: 重置
|
|
||||||
pureExitFullScreen: 退出全屏
|
|
||||||
pureFullScreen: 全屏
|
|
||||||
@@ -326,8 +326,7 @@ export default defineFakeRoute([
|
|||||||
method: "get",
|
method: "get",
|
||||||
response: () => {
|
response: () => {
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: [
|
data: [
|
||||||
systemManagementRouter,
|
systemManagementRouter,
|
||||||
systemMonitorRouter,
|
systemMonitorRouter,
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ export default defineFakeRoute([
|
|||||||
method: "post",
|
method: "post",
|
||||||
response: () => {
|
response: () => {
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: {
|
data: {
|
||||||
list: [
|
list: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,8 +8,7 @@ export default defineFakeRoute([
|
|||||||
response: ({ body }) => {
|
response: ({ body }) => {
|
||||||
if (body.username === "admin") {
|
if (body.username === "admin") {
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: {
|
data: {
|
||||||
avatar: "https://avatars.githubusercontent.com/u/44761321",
|
avatar: "https://avatars.githubusercontent.com/u/44761321",
|
||||||
username: "admin",
|
username: "admin",
|
||||||
@@ -25,8 +24,7 @@ export default defineFakeRoute([
|
|||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: {
|
data: {
|
||||||
avatar: "https://avatars.githubusercontent.com/u/52823142",
|
avatar: "https://avatars.githubusercontent.com/u/52823142",
|
||||||
username: "common",
|
username: "common",
|
||||||
|
|||||||
@@ -33,8 +33,7 @@ export default defineFakeRoute([
|
|||||||
method: "get",
|
method: "get",
|
||||||
response: () => {
|
response: () => {
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: mapList()
|
data: mapList()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,7 @@ export default defineFakeRoute([
|
|||||||
method: "get",
|
method: "get",
|
||||||
response: () => {
|
response: () => {
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: {
|
data: {
|
||||||
avatar: "https://avatars.githubusercontent.com/u/44761321",
|
avatar: "https://avatars.githubusercontent.com/u/44761321",
|
||||||
username: "admin",
|
username: "admin",
|
||||||
@@ -47,8 +46,7 @@ export default defineFakeRoute([
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: {
|
data: {
|
||||||
list,
|
list,
|
||||||
total: list.length, // 总条目数
|
total: list.length, // 总条目数
|
||||||
|
|||||||
@@ -8,8 +8,7 @@ export default defineFakeRoute([
|
|||||||
response: ({ body }) => {
|
response: ({ body }) => {
|
||||||
if (body.refreshToken) {
|
if (body.refreshToken) {
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: {
|
data: {
|
||||||
accessToken: "eyJhbGciOiJIUzUxMiJ9.newAdmin",
|
accessToken: "eyJhbGciOiJIUzUxMiJ9.newAdmin",
|
||||||
refreshToken: "eyJhbGciOiJIUzUxMiJ9.newAdminRefresh",
|
refreshToken: "eyJhbGciOiJIUzUxMiJ9.newAdminRefresh",
|
||||||
@@ -19,8 +18,7 @@ export default defineFakeRoute([
|
|||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
code: 10001,
|
success: false,
|
||||||
message: "请求参数缺失或格式不正确",
|
|
||||||
data: {}
|
data: {}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,8 +50,7 @@ export default defineFakeRoute([
|
|||||||
if (body.phone) list = list.filter(item => item.phone === body.phone);
|
if (body.phone) list = list.filter(item => item.phone === body.phone);
|
||||||
if (body.deptId) list = list.filter(item => item.dept.id === body.deptId);
|
if (body.deptId) list = list.filter(item => item.dept.id === body.deptId);
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: {
|
data: {
|
||||||
list,
|
list,
|
||||||
total: list.length, // 总条目数
|
total: list.length, // 总条目数
|
||||||
@@ -67,8 +66,7 @@ export default defineFakeRoute([
|
|||||||
method: "get",
|
method: "get",
|
||||||
response: () => {
|
response: () => {
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: [
|
data: [
|
||||||
{ id: 1, name: "超级管理员" },
|
{ id: 1, name: "超级管理员" },
|
||||||
{ id: 2, name: "普通角色" }
|
{ id: 2, name: "普通角色" }
|
||||||
@@ -84,21 +82,18 @@ export default defineFakeRoute([
|
|||||||
if (body.userId) {
|
if (body.userId) {
|
||||||
if (body.userId == 1) {
|
if (body.userId == 1) {
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: [1]
|
data: [1]
|
||||||
};
|
};
|
||||||
} else if (body.userId == 2) {
|
} else if (body.userId == 2) {
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: [2]
|
data: [2]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
code: 10001,
|
success: false,
|
||||||
message: "请求参数缺失或格式不正确",
|
|
||||||
data: []
|
data: []
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -135,8 +130,7 @@ export default defineFakeRoute([
|
|||||||
);
|
);
|
||||||
if (body.code) list = list.filter(item => item.code === body.code);
|
if (body.code) list = list.filter(item => item.code === body.code);
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: {
|
data: {
|
||||||
list,
|
list,
|
||||||
total: list.length, // 总条目数
|
total: list.length, // 总条目数
|
||||||
@@ -152,8 +146,7 @@ export default defineFakeRoute([
|
|||||||
method: "post",
|
method: "post",
|
||||||
response: () => {
|
response: () => {
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: [
|
data: [
|
||||||
// 外部页面
|
// 外部页面
|
||||||
{
|
{
|
||||||
@@ -357,8 +350,7 @@ export default defineFakeRoute([
|
|||||||
response: ({ body }) => {
|
response: ({ body }) => {
|
||||||
if (body.id == 1) {
|
if (body.id == 1) {
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: [
|
data: [
|
||||||
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 200, 201,
|
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,
|
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) {
|
} else if (body.id == 2) {
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: [
|
data: [
|
||||||
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 404, 500,
|
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 404, 500,
|
||||||
501, 502, 503
|
501, 502, 503
|
||||||
@@ -383,8 +374,7 @@ export default defineFakeRoute([
|
|||||||
method: "post",
|
method: "post",
|
||||||
response: () => {
|
response: () => {
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: [
|
data: [
|
||||||
// 外部页面
|
// 外部页面
|
||||||
{
|
{
|
||||||
@@ -1265,8 +1255,7 @@ export default defineFakeRoute([
|
|||||||
method: "post",
|
method: "post",
|
||||||
response: () => {
|
response: () => {
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
name: "杭州总公司",
|
name: "杭州总公司",
|
||||||
@@ -1429,8 +1418,7 @@ export default defineFakeRoute([
|
|||||||
];
|
];
|
||||||
list = list.filter(item => item.username.includes(body?.username));
|
list = list.filter(item => item.username.includes(body?.username));
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: {
|
data: {
|
||||||
list,
|
list,
|
||||||
total: list.length, // 总条目数
|
total: list.length, // 总条目数
|
||||||
@@ -1474,8 +1462,7 @@ export default defineFakeRoute([
|
|||||||
String(item.status).includes(String(body?.status))
|
String(item.status).includes(String(body?.status))
|
||||||
);
|
);
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: {
|
data: {
|
||||||
list,
|
list,
|
||||||
total: list.length, // 总条目数
|
total: list.length, // 总条目数
|
||||||
@@ -1521,8 +1508,7 @@ export default defineFakeRoute([
|
|||||||
String(item.status).includes(String(body?.status))
|
String(item.status).includes(String(body?.status))
|
||||||
);
|
);
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: {
|
data: {
|
||||||
list,
|
list,
|
||||||
total: list.length, // 总条目数
|
total: list.length, // 总条目数
|
||||||
@@ -1580,8 +1566,7 @@ export default defineFakeRoute([
|
|||||||
];
|
];
|
||||||
list = list.filter(item => item.module.includes(body?.module));
|
list = list.filter(item => item.module.includes(body?.module));
|
||||||
return {
|
return {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: {
|
data: {
|
||||||
list,
|
list,
|
||||||
total: list.length, // 总条目数
|
total: list.length, // 总条目数
|
||||||
@@ -1616,8 +1601,7 @@ export default defineFakeRoute([
|
|||||||
"Content-Length": 17019
|
"Content-Length": 17019
|
||||||
},
|
},
|
||||||
responseBody: {
|
responseBody: {
|
||||||
code: 0,
|
success: true,
|
||||||
message: "操作成功",
|
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
parentId: 0,
|
parentId: 0,
|
||||||
|
|||||||
66
package.json
66
package.json
@@ -56,7 +56,7 @@
|
|||||||
"@pureadmin/table": "^3.3.0",
|
"@pureadmin/table": "^3.3.0",
|
||||||
"@pureadmin/utils": "^2.6.3",
|
"@pureadmin/utils": "^2.6.3",
|
||||||
"@vue-flow/background": "^1.3.2",
|
"@vue-flow/background": "^1.3.2",
|
||||||
"@vue-flow/core": "^1.48.1",
|
"@vue-flow/core": "^1.48.0",
|
||||||
"@vueuse/core": "^14.1.0",
|
"@vueuse/core": "^14.1.0",
|
||||||
"@vueuse/motion": "^3.0.3",
|
"@vueuse/motion": "^3.0.3",
|
||||||
"@wangeditor/editor": "^5.1.23",
|
"@wangeditor/editor": "^5.1.23",
|
||||||
@@ -69,14 +69,14 @@
|
|||||||
"codemirror-editor-vue3": "^2.8.0",
|
"codemirror-editor-vue3": "^2.8.0",
|
||||||
"cropperjs": "^1.6.2",
|
"cropperjs": "^1.6.2",
|
||||||
"dayjs": "^1.11.19",
|
"dayjs": "^1.11.19",
|
||||||
"deep-chat": "^2.4.1",
|
"deep-chat": "^2.3.0",
|
||||||
"echarts": "^6.0.0",
|
"echarts": "^6.0.0",
|
||||||
"el-table-infinite-scroll": "^3.0.8",
|
"el-table-infinite-scroll": "^3.0.8",
|
||||||
"element-plus": "^2.13.1",
|
"element-plus": "^2.12.0",
|
||||||
"highlight.js": "^11.11.1",
|
"highlight.js": "^11.11.1",
|
||||||
"intro.js": "^7.2.0",
|
"intro.js": "^7.2.0",
|
||||||
"js-cookie": "^3.0.5",
|
"js-cookie": "^3.0.5",
|
||||||
"jsbarcode": "^3.12.3",
|
"jsbarcode": "^3.12.1",
|
||||||
"localforage": "^1.10.0",
|
"localforage": "^1.10.0",
|
||||||
"mint-filter": "^4.0.3",
|
"mint-filter": "^4.0.3",
|
||||||
"mitt": "^3.0.1",
|
"mitt": "^3.0.1",
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
"pinyin-pro": "^3.27.0",
|
"pinyin-pro": "^3.27.0",
|
||||||
"plus-pro-components": "^0.1.30",
|
"plus-pro-components": "^0.1.30",
|
||||||
"qrcode": "^1.5.4",
|
"qrcode": "^1.5.4",
|
||||||
"qs": "^6.14.1",
|
"qs": "^6.14.0",
|
||||||
"responsive-storage": "^2.2.0",
|
"responsive-storage": "^2.2.0",
|
||||||
"sortablejs": "^1.15.6",
|
"sortablejs": "^1.15.6",
|
||||||
"swiper": "^12.0.3",
|
"swiper": "^12.0.3",
|
||||||
@@ -96,16 +96,16 @@
|
|||||||
"v3-infinite-loading": "^1.3.2",
|
"v3-infinite-loading": "^1.3.2",
|
||||||
"vditor": "^3.11.2",
|
"vditor": "^3.11.2",
|
||||||
"version-rocket": "^1.7.4",
|
"version-rocket": "^1.7.4",
|
||||||
"vue": "^3.5.26",
|
"vue": "^3.5.25",
|
||||||
"vue-i18n": "^11.2.8",
|
"vue-i18n": "^11.2.2",
|
||||||
"vue-json-pretty": "^2.6.0",
|
"vue-json-pretty": "^2.6.0",
|
||||||
"vue-pdf-embed": "^2.1.3",
|
"vue-pdf-embed": "^2.1.3",
|
||||||
"vue-router": "^4.6.4",
|
"vue-router": "^4.6.3",
|
||||||
"vue-tippy": "^6.7.1",
|
"vue-tippy": "^6.7.1",
|
||||||
"vue-types": "^6.0.0",
|
"vue-types": "^6.0.0",
|
||||||
"vue-virtual-scroller": "2.0.0-beta.8",
|
"vue-virtual-scroller": "2.0.0-beta.8",
|
||||||
"vue-waterfall-plugin-next": "^2.6.9",
|
"vue-waterfall-plugin-next": "^2.6.9",
|
||||||
"vue3-danmaku": "^1.6.7",
|
"vue3-danmaku": "^1.6.6",
|
||||||
"vue3-puzzle-vcode": "^1.1.7",
|
"vue3-puzzle-vcode": "^1.1.7",
|
||||||
"vuedraggable": "^4.1.0",
|
"vuedraggable": "^4.1.0",
|
||||||
"vxe-table": "4.6.25",
|
"vxe-table": "4.6.25",
|
||||||
@@ -114,57 +114,57 @@
|
|||||||
"xlsx": "^0.18.5"
|
"xlsx": "^0.18.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^20.3.1",
|
"@commitlint/cli": "^20.2.0",
|
||||||
"@commitlint/config-conventional": "^20.3.1",
|
"@commitlint/config-conventional": "^20.2.0",
|
||||||
"@commitlint/types": "^20.3.1",
|
"@commitlint/types": "^20.2.0",
|
||||||
"@eslint/js": "^9.39.2",
|
"@eslint/js": "^9.39.1",
|
||||||
"@faker-js/faker": "^10.2.0",
|
"@faker-js/faker": "^10.1.0",
|
||||||
"@iconify/json": "^2.2.428",
|
"@iconify/json": "^2.2.416",
|
||||||
"@iconify/vue": "4.2.0",
|
"@iconify/vue": "4.2.0",
|
||||||
"@intlify/unplugin-vue-i18n": "^11.0.3",
|
"@intlify/unplugin-vue-i18n": "^11.0.1",
|
||||||
"@tailwindcss/vite": "^4.1.18",
|
"@tailwindcss/vite": "^4.1.17",
|
||||||
"@types/codemirror": "^5.60.17",
|
"@types/codemirror": "^5.60.17",
|
||||||
"@types/dagre": "^0.7.53",
|
"@types/dagre": "^0.7.53",
|
||||||
"@types/intro.js": "^5.1.5",
|
"@types/intro.js": "^5.1.5",
|
||||||
"@types/js-cookie": "^3.0.6",
|
"@types/js-cookie": "^3.0.6",
|
||||||
"@types/node": "^20.19.30",
|
"@types/node": "^20.19.26",
|
||||||
"@types/nprogress": "^0.2.3",
|
"@types/nprogress": "^0.2.3",
|
||||||
"@types/path-browserify": "^1.0.3",
|
"@types/path-browserify": "^1.0.3",
|
||||||
"@types/qrcode": "^1.5.6",
|
"@types/qrcode": "^1.5.6",
|
||||||
"@types/qs": "^6.14.0",
|
"@types/qs": "^6.14.0",
|
||||||
"@types/sortablejs": "^1.15.9",
|
"@types/sortablejs": "^1.15.9",
|
||||||
"@vitejs/plugin-vue": "^6.0.3",
|
"@vitejs/plugin-vue": "^6.0.2",
|
||||||
"@vitejs/plugin-vue-jsx": "^5.1.3",
|
"@vitejs/plugin-vue-jsx": "^5.1.2",
|
||||||
"boxen": "^8.0.1",
|
"boxen": "^8.0.1",
|
||||||
"code-inspector-plugin": "^1.3.4",
|
"code-inspector-plugin": "^1.3.0",
|
||||||
"cssnano": "^7.1.2",
|
"cssnano": "^7.1.2",
|
||||||
"dagre": "^0.8.5",
|
"dagre": "^0.8.5",
|
||||||
"eslint": "^9.39.2",
|
"eslint": "^9.39.1",
|
||||||
"eslint-config-prettier": "^10.1.8",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
"eslint-plugin-prettier": "^5.5.5",
|
"eslint-plugin-prettier": "^5.5.4",
|
||||||
"eslint-plugin-vue": "^10.6.2",
|
"eslint-plugin-vue": "^10.6.2",
|
||||||
"gradient-string": "^3.0.0",
|
"gradient-string": "^3.0.0",
|
||||||
"husky": "^9.1.7",
|
"husky": "^9.1.7",
|
||||||
"lint-staged": "^16.2.7",
|
"lint-staged": "^16.2.7",
|
||||||
"postcss": "^8.5.6",
|
"postcss": "^8.5.6",
|
||||||
"postcss-html": "^1.8.1",
|
"postcss-html": "^1.8.0",
|
||||||
"postcss-load-config": "^6.0.1",
|
"postcss-load-config": "^6.0.1",
|
||||||
"postcss-scss": "^4.0.9",
|
"postcss-scss": "^4.0.9",
|
||||||
"prettier": "^3.8.0",
|
"prettier": "^3.7.4",
|
||||||
"rimraf": "^6.1.2",
|
"rimraf": "^6.1.2",
|
||||||
"rollup-plugin-visualizer": "^6.0.5",
|
"rollup-plugin-visualizer": "^6.0.5",
|
||||||
"sass": "^1.97.2",
|
"sass": "^1.95.1",
|
||||||
"stylelint": "^17.0.0",
|
"stylelint": "^16.26.1",
|
||||||
"stylelint-config-recess-order": "^7.4.0",
|
"stylelint-config-recess-order": "^7.4.0",
|
||||||
"stylelint-config-recommended-vue": "^1.6.1",
|
"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",
|
"stylelint-prettier": "^5.0.3",
|
||||||
"svgo": "^4.0.0",
|
"svgo": "^4.0.0",
|
||||||
"tailwindcss": "^4.1.18",
|
"tailwindcss": "^4.1.17",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
"typescript-eslint": "^8.53.0",
|
"typescript-eslint": "^8.49.0",
|
||||||
"unplugin-icons": "^23.0.1",
|
"unplugin-icons": "^22.5.0",
|
||||||
"vite": "^7.3.1",
|
"vite": "^7.2.7",
|
||||||
"vite-plugin-cdn-import": "^1.0.1",
|
"vite-plugin-cdn-import": "^1.0.1",
|
||||||
"vite-plugin-compression": "^0.5.1",
|
"vite-plugin-compression": "^0.5.1",
|
||||||
"vite-plugin-fake-server": "^2.2.2",
|
"vite-plugin-fake-server": "^2.2.2",
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
"vite-plugin-router-warn": "^2.0.0",
|
"vite-plugin-router-warn": "^2.0.0",
|
||||||
"vite-svg-loader": "^5.1.0",
|
"vite-svg-loader": "^5.1.0",
|
||||||
"vue-eslint-parser": "^10.2.0",
|
"vue-eslint-parser": "^10.2.0",
|
||||||
"vue-tsc": "^3.2.2"
|
"vue-tsc": "^3.1.8"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.19.0 || >=22.13.0",
|
"node": "^20.19.0 || >=22.13.0",
|
||||||
|
|||||||
3139
pnpm-lock.yaml
generated
3139
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
15
src/App.vue
15
src/App.vue
@@ -7,9 +7,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { useGlobal } from "@pureadmin/utils";
|
import { defineComponent } from "vue";
|
||||||
import { checkVersion } from "version-rocket";
|
import { checkVersion } from "version-rocket";
|
||||||
import { defineComponent, computed } from "vue";
|
|
||||||
import { ElConfigProvider } from "element-plus";
|
import { ElConfigProvider } from "element-plus";
|
||||||
import { ReDialog } from "@/components/ReDialog";
|
import { ReDialog } from "@/components/ReDialog";
|
||||||
import { ReDrawer } from "@/components/ReDrawer";
|
import { ReDrawer } from "@/components/ReDrawer";
|
||||||
@@ -25,16 +24,12 @@ export default defineComponent({
|
|||||||
ReDialog,
|
ReDialog,
|
||||||
ReDrawer
|
ReDrawer
|
||||||
},
|
},
|
||||||
setup() {
|
computed: {
|
||||||
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
currentLocale() {
|
||||||
const currentLocale = computed(() => {
|
return this.$storage.locale?.locale === "zh"
|
||||||
return $storage.locale?.locale === "zh"
|
|
||||||
? { ...zhCn, ...plusZhCn }
|
? { ...zhCn, ...plusZhCn }
|
||||||
: { ...en, ...plusEn };
|
: { ...en, ...plusEn };
|
||||||
});
|
}
|
||||||
return {
|
|
||||||
currentLocale
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
beforeCreate() {
|
beforeCreate() {
|
||||||
const { version, name: title } = __APP_INFO__.pkg;
|
const { version, name: title } = __APP_INFO__.pkg;
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import { http } from "@/utils/http";
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
type Result = {
|
type Result = {
|
||||||
code: number;
|
success: boolean;
|
||||||
message: string;
|
|
||||||
data?: {
|
data?: {
|
||||||
/** 列表数据 */
|
/** 列表数据 */
|
||||||
list: Array<any>;
|
list: Array<any>;
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import { http } from "@/utils/http";
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
type Result = {
|
type Result = {
|
||||||
code: number;
|
success: boolean;
|
||||||
message: string;
|
|
||||||
data: Array<any>;
|
data: Array<any>;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -15,7 +14,7 @@ export const mapJson = (params?: object) => {
|
|||||||
export const formUpload = data => {
|
export const formUpload = data => {
|
||||||
return http.request<Result>(
|
return http.request<Result>(
|
||||||
"post",
|
"post",
|
||||||
"https://pureadmin.free.beeceptor.com/images",
|
"https://run.mocky.io/v3/3aa761d7-b0b3-4a03-96b3-6168d4f7467b",
|
||||||
{ data },
|
{ data },
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import { http } from "@/utils/http";
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
type Result = {
|
type Result = {
|
||||||
code: number;
|
success: boolean;
|
||||||
message: string;
|
|
||||||
data: Array<any>;
|
data: Array<any>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
import { http } from "@/utils/http";
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
type Result = {
|
type Result = {
|
||||||
code: number;
|
success: boolean;
|
||||||
message: string;
|
|
||||||
data?: Array<any>;
|
data?: Array<any>;
|
||||||
};
|
};
|
||||||
|
|
||||||
type ResultTable = {
|
type ResultTable = {
|
||||||
code: number;
|
success: boolean;
|
||||||
message: string;
|
|
||||||
data?: {
|
data?: {
|
||||||
/** 列表数据 */
|
/** 列表数据 */
|
||||||
list: Array<any>;
|
list: Array<any>;
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import { http } from "@/utils/http";
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
export type UserResult = {
|
export type UserResult = {
|
||||||
code: number;
|
success: boolean;
|
||||||
message: string;
|
|
||||||
data: {
|
data: {
|
||||||
/** 头像 */
|
/** 头像 */
|
||||||
avatar: string;
|
avatar: string;
|
||||||
@@ -24,8 +23,7 @@ export type UserResult = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type RefreshTokenResult = {
|
export type RefreshTokenResult = {
|
||||||
code: number;
|
success: boolean;
|
||||||
message: string;
|
|
||||||
data: {
|
data: {
|
||||||
/** `token` */
|
/** `token` */
|
||||||
accessToken: string;
|
accessToken: string;
|
||||||
@@ -52,14 +50,12 @@ export type UserInfo = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type UserInfoResult = {
|
export type UserInfoResult = {
|
||||||
code: number;
|
success: boolean;
|
||||||
message: string;
|
|
||||||
data: UserInfo;
|
data: UserInfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
type ResultTable = {
|
type ResultTable = {
|
||||||
code: number;
|
success: boolean;
|
||||||
message: string;
|
|
||||||
data?: {
|
data?: {
|
||||||
/** 列表数据 */
|
/** 列表数据 */
|
||||||
list: Array<any>;
|
list: Array<any>;
|
||||||
|
|||||||
@@ -92,16 +92,14 @@ onBeforeMount(() => {
|
|||||||
|
|
||||||
// 获取模拟车辆信息
|
// 获取模拟车辆信息
|
||||||
mapJson()
|
mapJson()
|
||||||
.then(({ code, data }) => {
|
.then(({ data }) => {
|
||||||
if (code === 0) {
|
const points: object = data.map(v => {
|
||||||
const points: object = data.map(v => {
|
return {
|
||||||
return {
|
lnglat: [v.lng, v.lat],
|
||||||
lnglat: [v.lng, v.lat],
|
...v
|
||||||
...v
|
};
|
||||||
};
|
});
|
||||||
});
|
if (MarkerCluster) MarkerCluster.setData(points);
|
||||||
if (MarkerCluster) MarkerCluster.setData(points);
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.log("err:", err);
|
console.log("err:", err);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import Sortable from "sortablejs";
|
import Sortable from "sortablejs";
|
||||||
import { $t, transformI18n } from "@/plugins/i18n";
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||||
import {
|
import {
|
||||||
type PropType,
|
type PropType,
|
||||||
@@ -30,7 +30,7 @@ const props = {
|
|||||||
/** 头部最左边的标题 */
|
/** 头部最左边的标题 */
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
default: $t("tableBar.pureList")
|
default: "列表"
|
||||||
},
|
},
|
||||||
/** 对于树形表格,如果想启用展开和折叠功能,传入当前表格的ref即可 */
|
/** 对于树形表格,如果想启用展开和折叠功能,传入当前表格的ref即可 */
|
||||||
tableRef: {
|
tableRef: {
|
||||||
@@ -169,19 +169,19 @@ export default defineComponent({
|
|||||||
style={getDropdownItemStyle.value("large")}
|
style={getDropdownItemStyle.value("large")}
|
||||||
onClick={() => (size.value = "large")}
|
onClick={() => (size.value = "large")}
|
||||||
>
|
>
|
||||||
{transformI18n($t("tableBar.pureLarge"))}
|
宽松
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
style={getDropdownItemStyle.value("default")}
|
style={getDropdownItemStyle.value("default")}
|
||||||
onClick={() => (size.value = "default")}
|
onClick={() => (size.value = "default")}
|
||||||
>
|
>
|
||||||
{transformI18n($t("tableBar.pureDefault"))}
|
默认
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
style={getDropdownItemStyle.value("small")}
|
style={getDropdownItemStyle.value("small")}
|
||||||
onClick={() => (size.value = "small")}
|
onClick={() => (size.value = "small")}
|
||||||
>
|
>
|
||||||
{transformI18n($t("tableBar.pureSmall"))}
|
紧凑
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
)
|
)
|
||||||
@@ -245,9 +245,7 @@ export default defineComponent({
|
|||||||
reference: () => (
|
reference: () => (
|
||||||
<SettingIcon
|
<SettingIcon
|
||||||
class={["w-[16px]", iconClass.value]}
|
class={["w-[16px]", iconClass.value]}
|
||||||
v-tippy={rendTippyProps(
|
v-tippy={rendTippyProps("列设置")}
|
||||||
transformI18n($t("tableBar.pureColumnSettings"))
|
|
||||||
)}
|
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
@@ -270,7 +268,7 @@ export default defineComponent({
|
|||||||
{slots?.title ? (
|
{slots?.title ? (
|
||||||
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">
|
<div class="flex items-center justify-around">
|
||||||
{slots?.buttons ? (
|
{slots?.buttons ? (
|
||||||
@@ -284,9 +282,7 @@ export default defineComponent({
|
|||||||
transform: isExpandAll.value ? "none" : "rotate(-90deg)"
|
transform: isExpandAll.value ? "none" : "rotate(-90deg)"
|
||||||
}}
|
}}
|
||||||
v-tippy={rendTippyProps(
|
v-tippy={rendTippyProps(
|
||||||
isExpandAll.value
|
isExpandAll.value ? "折叠" : "展开"
|
||||||
? transformI18n($t("tableBar.pureCollapse"))
|
|
||||||
: transformI18n($t("tableBar.pureExpand"))
|
|
||||||
)}
|
)}
|
||||||
onClick={() => onExpand()}
|
onClick={() => onExpand()}
|
||||||
/>
|
/>
|
||||||
@@ -299,18 +295,14 @@ export default defineComponent({
|
|||||||
iconClass.value,
|
iconClass.value,
|
||||||
loading.value ? "animate-spin" : ""
|
loading.value ? "animate-spin" : ""
|
||||||
]}
|
]}
|
||||||
v-tippy={rendTippyProps(
|
v-tippy={rendTippyProps("刷新")}
|
||||||
transformI18n($t("tableBar.pureRefresh"))
|
|
||||||
)}
|
|
||||||
onClick={() => onReFresh()}
|
onClick={() => onReFresh()}
|
||||||
/>
|
/>
|
||||||
<el-divider direction="vertical" />
|
<el-divider direction="vertical" />
|
||||||
<el-dropdown
|
<el-dropdown
|
||||||
v-slots={dropdown}
|
v-slots={dropdown}
|
||||||
trigger="click"
|
trigger="click"
|
||||||
v-tippy={rendTippyProps(
|
v-tippy={rendTippyProps("密度")}
|
||||||
transformI18n($t("tableBar.pureDensity"))
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
<CollapseIcon class={["w-[16px]", iconClass.value]} />
|
<CollapseIcon class={["w-[16px]", iconClass.value]} />
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
@@ -326,13 +318,13 @@ export default defineComponent({
|
|||||||
<div class={[topClass.value]}>
|
<div class={[topClass.value]}>
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
class="-mr-1!"
|
class="-mr-1!"
|
||||||
label={transformI18n($t("tableBar.pureColumnDisplay"))}
|
label="列展示"
|
||||||
v-model={checkAll.value}
|
v-model={checkAll.value}
|
||||||
indeterminate={isIndeterminate.value}
|
indeterminate={isIndeterminate.value}
|
||||||
onChange={value => handleCheckAllChange(value)}
|
onChange={value => handleCheckAllChange(value)}
|
||||||
/>
|
/>
|
||||||
<el-button type="primary" link onClick={() => onReset()}>
|
<el-button type="primary" link onClick={() => onReset()}>
|
||||||
{transformI18n($t("tableBar.pureReset"))}
|
重置
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -390,11 +382,7 @@ export default defineComponent({
|
|||||||
<iconifyIconOffline
|
<iconifyIconOffline
|
||||||
class={["w-[16px]", iconClass.value]}
|
class={["w-[16px]", iconClass.value]}
|
||||||
icon={isFullscreen.value ? ExitFullscreen : Fullscreen}
|
icon={isFullscreen.value ? ExitFullscreen : Fullscreen}
|
||||||
v-tippy={
|
v-tippy={isFullscreen.value ? "退出全屏" : "全屏"}
|
||||||
isFullscreen.value
|
|
||||||
? transformI18n($t("tableBar.pureExitFullScreen"))
|
|
||||||
: transformI18n($t("tableBar.pureFullScreen"))
|
|
||||||
}
|
|
||||||
onClick={() => onFullscreen()}
|
onClick={() => onFullscreen()}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,10 +5,14 @@ import {
|
|||||||
ref,
|
ref,
|
||||||
unref,
|
unref,
|
||||||
nextTick,
|
nextTick,
|
||||||
computed,
|
computed
|
||||||
useTemplateRef
|
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import { tryOnMounted, tryOnUnmounted, useDebounceFn } from "@vueuse/core";
|
import {
|
||||||
|
tryOnMounted,
|
||||||
|
tryOnUnmounted,
|
||||||
|
templateRef,
|
||||||
|
useDebounceFn
|
||||||
|
} from "@vueuse/core";
|
||||||
import * as utilsMethods from "./utils";
|
import * as utilsMethods from "./utils";
|
||||||
const { animationFrame, copyObj } = utilsMethods;
|
const { animationFrame, copyObj } = utilsMethods;
|
||||||
animationFrame();
|
animationFrame();
|
||||||
@@ -58,14 +62,17 @@ if (props.classOption["key"] === undefined) {
|
|||||||
props.classOption["key"] = 0;
|
props.classOption["key"] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const wrap = useTemplateRef<HTMLElement | null>(
|
const wrap = templateRef<HTMLElement | null>(
|
||||||
`wrap${props.classOption["key"]}`
|
`wrap${props.classOption["key"]}`,
|
||||||
|
null
|
||||||
);
|
);
|
||||||
const slotList = useTemplateRef<HTMLElement | null>(
|
const slotList = templateRef<HTMLElement | null>(
|
||||||
`slotList${props.classOption["key"]}`
|
`slotList${props.classOption["key"]}`,
|
||||||
|
null
|
||||||
);
|
);
|
||||||
const realBox = useTemplateRef<HTMLElement | null>(
|
const realBox = templateRef<HTMLElement | null>(
|
||||||
`realBox${props.classOption["key"]}`
|
`realBox${props.classOption["key"]}`,
|
||||||
|
null
|
||||||
);
|
);
|
||||||
|
|
||||||
const leftSwitchState = computed(() => {
|
const leftSwitchState = computed(() => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import Sortable from "sortablejs";
|
import Sortable from "sortablejs";
|
||||||
import { $t, transformI18n } from "@/plugins/i18n";
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||||
import { delay, cloneDeep, getKeyList } from "@pureadmin/utils";
|
import { delay, cloneDeep, getKeyList } from "@pureadmin/utils";
|
||||||
import {
|
import {
|
||||||
@@ -24,7 +24,7 @@ const props = {
|
|||||||
/** 头部最左边的标题 */
|
/** 头部最左边的标题 */
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
default: $t("tableBar.pureList")
|
default: "列表"
|
||||||
},
|
},
|
||||||
vxeTableRef: {
|
vxeTableRef: {
|
||||||
type: Object as PropType<any>
|
type: Object as PropType<any>
|
||||||
@@ -161,19 +161,19 @@ export default defineComponent({
|
|||||||
style={getDropdownItemStyle.value("medium")}
|
style={getDropdownItemStyle.value("medium")}
|
||||||
onClick={() => changeSize("medium")}
|
onClick={() => changeSize("medium")}
|
||||||
>
|
>
|
||||||
{transformI18n($t("tableBar.pureLarge"))}
|
宽松
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
style={getDropdownItemStyle.value("small")}
|
style={getDropdownItemStyle.value("small")}
|
||||||
onClick={() => changeSize("small")}
|
onClick={() => changeSize("small")}
|
||||||
>
|
>
|
||||||
{transformI18n($t("tableBar.pureDefault"))}
|
默认
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
style={getDropdownItemStyle.value("mini")}
|
style={getDropdownItemStyle.value("mini")}
|
||||||
onClick={() => changeSize("mini")}
|
onClick={() => changeSize("mini")}
|
||||||
>
|
>
|
||||||
{transformI18n($t("tableBar.pureSmall"))}
|
紧凑
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
)
|
)
|
||||||
@@ -238,9 +238,7 @@ export default defineComponent({
|
|||||||
reference: () => (
|
reference: () => (
|
||||||
<SettingIcon
|
<SettingIcon
|
||||||
class={["w-[16px]", iconClass.value]}
|
class={["w-[16px]", iconClass.value]}
|
||||||
v-tippy={rendTippyProps(
|
v-tippy={rendTippyProps("列设置")}
|
||||||
transformI18n($t("tableBar.pureColumnSettings"))
|
|
||||||
)}
|
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
@@ -263,7 +261,7 @@ export default defineComponent({
|
|||||||
{slots?.title ? (
|
{slots?.title ? (
|
||||||
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">
|
<div class="flex items-center justify-around">
|
||||||
{slots?.buttons ? (
|
{slots?.buttons ? (
|
||||||
@@ -277,9 +275,7 @@ export default defineComponent({
|
|||||||
transform: isExpandAll.value ? "none" : "rotate(-90deg)"
|
transform: isExpandAll.value ? "none" : "rotate(-90deg)"
|
||||||
}}
|
}}
|
||||||
v-tippy={rendTippyProps(
|
v-tippy={rendTippyProps(
|
||||||
isExpandAll.value
|
isExpandAll.value ? "折叠" : "展开"
|
||||||
? transformI18n($t("tableBar.pureCollapse"))
|
|
||||||
: transformI18n($t("tableBar.pureExpand"))
|
|
||||||
)}
|
)}
|
||||||
onClick={() => onExpand()}
|
onClick={() => onExpand()}
|
||||||
/>
|
/>
|
||||||
@@ -292,18 +288,14 @@ export default defineComponent({
|
|||||||
iconClass.value,
|
iconClass.value,
|
||||||
loading.value ? "animate-spin" : ""
|
loading.value ? "animate-spin" : ""
|
||||||
]}
|
]}
|
||||||
v-tippy={rendTippyProps(
|
v-tippy={rendTippyProps("刷新")}
|
||||||
transformI18n($t("tableBar.pureRefresh"))
|
|
||||||
)}
|
|
||||||
onClick={() => onReFresh()}
|
onClick={() => onReFresh()}
|
||||||
/>
|
/>
|
||||||
<el-divider direction="vertical" />
|
<el-divider direction="vertical" />
|
||||||
<el-dropdown
|
<el-dropdown
|
||||||
v-slots={dropdown}
|
v-slots={dropdown}
|
||||||
trigger="click"
|
trigger="click"
|
||||||
v-tippy={rendTippyProps(
|
v-tippy={rendTippyProps("密度")}
|
||||||
transformI18n($t("tableBar.pureDensity"))
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
<CollapseIcon class={["w-[16px]", iconClass.value]} />
|
<CollapseIcon class={["w-[16px]", iconClass.value]} />
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
@@ -319,13 +311,13 @@ export default defineComponent({
|
|||||||
<div class={[topClass.value]}>
|
<div class={[topClass.value]}>
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
class="-mr-1!"
|
class="-mr-1!"
|
||||||
label={transformI18n($t("tableBar.pureColumnDisplay"))}
|
label="列展示"
|
||||||
v-model={checkAll.value}
|
v-model={checkAll.value}
|
||||||
indeterminate={isIndeterminate.value}
|
indeterminate={isIndeterminate.value}
|
||||||
onChange={value => handleCheckAllChange(value)}
|
onChange={value => handleCheckAllChange(value)}
|
||||||
/>
|
/>
|
||||||
<el-button type="primary" link onClick={() => onReset()}>
|
<el-button type="primary" link onClick={() => onReset()}>
|
||||||
{transformI18n($t("tableBar.pureReset"))}
|
重置
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -381,11 +373,7 @@ export default defineComponent({
|
|||||||
<iconifyIconOffline
|
<iconifyIconOffline
|
||||||
class={["w-[16px]", iconClass.value]}
|
class={["w-[16px]", iconClass.value]}
|
||||||
icon={isFullscreen.value ? ExitFullscreen : Fullscreen}
|
icon={isFullscreen.value ? ExitFullscreen : Fullscreen}
|
||||||
v-tippy={
|
v-tippy={isFullscreen.value ? "退出全屏" : "全屏"}
|
||||||
isFullscreen.value
|
|
||||||
? transformI18n($t("tableBar.pureExitFullScreen"))
|
|
||||||
: transformI18n($t("tableBar.pureFullScreen"))
|
|
||||||
}
|
|
||||||
onClick={() => onFullscreen()}
|
onClick={() => onFullscreen()}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -53,11 +53,9 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
|||||||
<LaySearch id="header-search" />
|
<LaySearch id="header-search" />
|
||||||
<!-- 国际化 -->
|
<!-- 国际化 -->
|
||||||
<el-dropdown id="header-translation" trigger="click">
|
<el-dropdown id="header-translation" trigger="click">
|
||||||
<div
|
<GlobalizationIcon
|
||||||
class="globalization-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
|
||||||
>
|
/>
|
||||||
<IconifyIconOffline :icon="GlobalizationIcon" />
|
|
||||||
</div>
|
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu class="translation">
|
<el-dropdown-menu class="translation">
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
@@ -115,7 +113,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
|||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<span
|
<span
|
||||||
class="set-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
class="set-icon navbar-bg-hover"
|
||||||
:title="t('buttons.pureOpenSystemSet')"
|
:title="t('buttons.pureOpenSystemSet')"
|
||||||
@click="onPanel"
|
@click="onPanel"
|
||||||
>
|
>
|
||||||
@@ -174,7 +172,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
|||||||
}
|
}
|
||||||
|
|
||||||
.translation {
|
.translation {
|
||||||
:deep(.el-dropdown-menu__item) {
|
::v-deep(.el-dropdown-menu__item) {
|
||||||
padding: 5px 40px;
|
padding: 5px 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -192,7 +190,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
|||||||
.logout {
|
.logout {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
|
||||||
:deep(.el-dropdown-menu__item) {
|
::v-deep(.el-dropdown-menu__item) {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
|
|||||||
@@ -3,12 +3,15 @@ import { useI18n } from "vue-i18n";
|
|||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
import { noticesData } from "./data";
|
import { noticesData } from "./data";
|
||||||
import NoticeList from "./components/NoticeList.vue";
|
import NoticeList from "./components/NoticeList.vue";
|
||||||
import BellIcon from "~icons/lucide/bell";
|
import BellIcon from "~icons/ep/bell";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const noticesNum = ref(0);
|
||||||
const notices = ref(noticesData);
|
const notices = ref(noticesData);
|
||||||
const activeKey = ref(noticesData[0]?.key);
|
const activeKey = ref(noticesData[0]?.key);
|
||||||
|
|
||||||
|
notices.value.map(v => (noticesNum.value += v.list.length));
|
||||||
|
|
||||||
const getLabel = computed(
|
const getLabel = computed(
|
||||||
() => item =>
|
() => item =>
|
||||||
t(item.name) + (item.list.length > 0 ? `(${item.list.length})` : "")
|
t(item.name) + (item.list.length > 0 ? `(${item.list.length})` : "")
|
||||||
@@ -18,9 +21,14 @@ const getLabel = computed(
|
|||||||
<template>
|
<template>
|
||||||
<el-dropdown trigger="click" placement="bottom-end">
|
<el-dropdown trigger="click" placement="bottom-end">
|
||||||
<span
|
<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>
|
<el-badge :value="Number(noticesNum) === 0 ? '' : noticesNum" :max="99">
|
||||||
<span class="header-notice-icon">
|
<span class="header-notice-icon">
|
||||||
<IconifyIconOffline :icon="BellIcon" />
|
<IconifyIconOffline :icon="BellIcon" />
|
||||||
</span>
|
</span>
|
||||||
@@ -57,34 +65,6 @@ const getLabel = computed(
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<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 {
|
.dropdown-badge {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -94,13 +74,7 @@ const getLabel = computed(
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
.header-notice-icon {
|
.header-notice-icon {
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
.header-notice-icon svg {
|
|
||||||
animation: pure-bell-ring 1s both;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ onBeforeUnmount(() => {
|
|||||||
<div class="right-panel-background" />
|
<div class="right-panel-background" />
|
||||||
<div ref="target" class="right-panel bg-bg_color">
|
<div ref="target" class="right-panel bg-bg_color">
|
||||||
<div
|
<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">
|
<h4 class="dark:text-white">
|
||||||
{{ t("panel.pureSystemSet") }}
|
{{ t("panel.pureSystemSet") }}
|
||||||
@@ -73,14 +73,12 @@ onBeforeUnmount(() => {
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<el-scrollbar
|
<el-scrollbar>
|
||||||
class="border-y border-l border-r-0 border-solid border-(--pure-border-color) h-[calc(100vh-104px)]!"
|
|
||||||
>
|
|
||||||
<slot />
|
<slot />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
|
||||||
<div
|
<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
|
<el-button
|
||||||
v-tippy="{
|
v-tippy="{
|
||||||
@@ -101,6 +99,10 @@ onBeforeUnmount(() => {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
:deep(.el-scrollbar) {
|
||||||
|
height: calc(100vh - 110px);
|
||||||
|
}
|
||||||
|
|
||||||
.right-panel-background {
|
.right-panel-background {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -137,4 +139,11 @@ onBeforeUnmount(() => {
|
|||||||
transform: translate(0);
|
transform: translate(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.project-configuration {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 14px 20px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ function handleSearch() {
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<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"
|
@click="handleSearch"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline icon="ri/search-line" />
|
<IconifyIconOffline icon="ri/search-line" />
|
||||||
|
|||||||
@@ -9,6 +9,14 @@ import {
|
|||||||
onUnmounted,
|
onUnmounted,
|
||||||
onBeforeMount
|
onBeforeMount
|
||||||
} from "vue";
|
} from "vue";
|
||||||
|
import {
|
||||||
|
useDark,
|
||||||
|
debounce,
|
||||||
|
isNumber,
|
||||||
|
useGlobal,
|
||||||
|
isAllEmpty,
|
||||||
|
useWatermark
|
||||||
|
} from "@pureadmin/utils";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { emitter } from "@/utils/mitt";
|
import { emitter } from "@/utils/mitt";
|
||||||
import LayPanel from "../lay-panel/index.vue";
|
import LayPanel from "../lay-panel/index.vue";
|
||||||
@@ -17,7 +25,6 @@ import { useAppStoreHook } from "@/store/modules/app";
|
|||||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||||
import Segmented, { type OptionsType } from "@/components/ReSegmented";
|
import Segmented, { type OptionsType } from "@/components/ReSegmented";
|
||||||
import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
|
import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
|
||||||
import { useDark, useGlobal, debounce, isNumber } from "@pureadmin/utils";
|
|
||||||
|
|
||||||
import Check from "~icons/ep/check";
|
import Check from "~icons/ep/check";
|
||||||
import LeftArrow from "~icons/ri/arrow-left-s-line?width=20&height=20";
|
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";
|
import SystemIcon from "@/assets/svg/system.svg?component";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { device } = useNav();
|
|
||||||
const { isDark } = useDark();
|
const { isDark } = useDark();
|
||||||
|
const { device, title } = useNav();
|
||||||
|
const { setWatermark, clear } = useWatermark();
|
||||||
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
||||||
|
|
||||||
const mixRef = ref();
|
const mixRef = ref();
|
||||||
@@ -58,6 +66,12 @@ const markValue = ref($storage.configure?.showModel ?? "smart");
|
|||||||
|
|
||||||
const logoVal = ref($storage.configure?.showLogo ?? true);
|
const logoVal = ref($storage.configure?.showLogo ?? true);
|
||||||
|
|
||||||
|
/** WIP... */
|
||||||
|
const watermarkConfigs = reactive({
|
||||||
|
enable: false,
|
||||||
|
text: null
|
||||||
|
});
|
||||||
|
|
||||||
const settings = reactive({
|
const settings = reactive({
|
||||||
greyVal: $storage.configure.grey,
|
greyVal: $storage.configure.grey,
|
||||||
weakVal: $storage.configure.weak,
|
weakVal: $storage.configure.weak,
|
||||||
@@ -129,6 +143,21 @@ function onChange({ option }) {
|
|||||||
emitter.emit("tagViewsShowModel", value);
|
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 */
|
/** 侧边栏Logo */
|
||||||
function logoChange() {
|
function logoChange() {
|
||||||
unref(logoVal)
|
unref(logoVal)
|
||||||
@@ -345,8 +374,8 @@ onUnmounted(() => removeMatchMedia);
|
|||||||
@click="setLayoutThemeColor(item.themeColor)"
|
@click="setLayoutThemeColor(item.themeColor)"
|
||||||
>
|
>
|
||||||
<el-icon
|
<el-icon
|
||||||
class="mt-px"
|
style="margin: 0.1em 0.1em 0 0"
|
||||||
:size="20"
|
:size="17"
|
||||||
:color="getThemeColor(item.themeColor)"
|
:color="getThemeColor(item.themeColor)"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline :icon="Check" />
|
<IconifyIconOffline :icon="Check" />
|
||||||
@@ -448,29 +477,38 @@ onUnmounted(() => removeMatchMedia);
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<p class="mt-5! font-medium text-sm dark:text-white">
|
<p class="mt-5! font-medium text-sm dark:text-white">
|
||||||
{{ t("panel.pureInterfaceDisplay") }}
|
{{ t("panel.pureFullScreenWatermark") }}
|
||||||
</p>
|
</p>
|
||||||
<ul class="setting">
|
<ul class="setting">
|
||||||
<li>
|
<li>
|
||||||
<span class="dark:text-white">{{ t("panel.pureGreyModel") }}</span>
|
<span class="dark:text-white">
|
||||||
|
{{ t("panel.pureEnableWatermark") }}
|
||||||
|
</span>
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="settings.greyVal"
|
v-model="watermarkConfigs.enable"
|
||||||
inline-prompt
|
inline-prompt
|
||||||
:active-text="t('buttons.pureOpenText')"
|
:active-text="t('buttons.pureOpenText')"
|
||||||
:inactive-text="t('buttons.pureCloseText')"
|
:inactive-text="t('buttons.pureCloseText')"
|
||||||
@change="greyChange"
|
@change="onWatermarkSwitchChange"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span class="dark:text-white">{{ t("panel.pureWeakModel") }}</span>
|
<span class="dark:text-white">
|
||||||
<el-switch
|
{{ t("panel.pureWatermarkText") }}
|
||||||
v-model="settings.weakVal"
|
</span>
|
||||||
inline-prompt
|
<el-input
|
||||||
:active-text="t('buttons.pureOpenText')"
|
v-model="watermarkConfigs.text"
|
||||||
:inactive-text="t('buttons.pureCloseText')"
|
class="w-[100px]!"
|
||||||
@change="weekChange"
|
:placeholder="title"
|
||||||
|
@input="onWatermarkInputChange"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p class="mt-5! font-medium text-sm dark:text-white">
|
||||||
|
{{ t("panel.pureInterfaceDisplay") }}
|
||||||
|
</p>
|
||||||
|
<ul class="setting">
|
||||||
<li>
|
<li>
|
||||||
<span class="dark:text-white">{{ t("panel.pureHiddenTags") }}</span>
|
<span class="dark:text-white">{{ t("panel.pureHiddenTags") }}</span>
|
||||||
<el-switch
|
<el-switch
|
||||||
@@ -491,6 +529,18 @@ onUnmounted(() => removeMatchMedia);
|
|||||||
@change="hideFooterChange"
|
@change="hideFooterChange"
|
||||||
/>
|
/>
|
||||||
</li>
|
</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>
|
<li>
|
||||||
<span class="dark:text-white">Logo</span>
|
<span class="dark:text-white">Logo</span>
|
||||||
<el-switch
|
<el-switch
|
||||||
@@ -504,15 +554,23 @@ onUnmounted(() => removeMatchMedia);
|
|||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span class="dark:text-white">
|
<span class="dark:text-white">{{ t("panel.pureGreyModel") }}</span>
|
||||||
{{ t("panel.pureMultiTagsCache") }}
|
|
||||||
</span>
|
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="settings.multiTagsCache"
|
v-model="settings.greyVal"
|
||||||
inline-prompt
|
inline-prompt
|
||||||
:active-text="t('buttons.pureOpenText')"
|
:active-text="t('buttons.pureOpenText')"
|
||||||
:inactive-text="t('buttons.pureCloseText')"
|
: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>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -538,24 +596,17 @@ onUnmounted(() => removeMatchMedia);
|
|||||||
}
|
}
|
||||||
|
|
||||||
.theme-color {
|
.theme-color {
|
||||||
display: flex;
|
height: 20px;
|
||||||
gap: 8px;
|
|
||||||
margin-top: 8px;
|
|
||||||
|
|
||||||
li {
|
li {
|
||||||
position: relative;
|
float: left;
|
||||||
width: 21px;
|
height: 20px;
|
||||||
height: 21px;
|
margin-right: 8px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
box-shadow: rgb(0 0 0 / 15%) 0 0 0 1px inset;
|
|
||||||
transition: all 0.2s ease;
|
|
||||||
|
|
||||||
&:hover {
|
&:nth-child(1) {
|
||||||
box-shadow:
|
border: 1px solid #ddd;
|
||||||
rgb(0 0 0 / 25%) 0 0 0 1px inset,
|
|
||||||
0 2px 4px rgb(0 0 0 / 15%);
|
|
||||||
transform: scale(1.1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,11 +83,9 @@ onMounted(() => {
|
|||||||
<LaySearch id="header-search" />
|
<LaySearch id="header-search" />
|
||||||
<!-- 国际化 -->
|
<!-- 国际化 -->
|
||||||
<el-dropdown id="header-translation" trigger="click">
|
<el-dropdown id="header-translation" trigger="click">
|
||||||
<div
|
<GlobalizationIcon
|
||||||
class="globalization-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
|
||||||
>
|
/>
|
||||||
<IconifyIconOffline :icon="GlobalizationIcon" />
|
|
||||||
</div>
|
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu class="translation">
|
<el-dropdown-menu class="translation">
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
@@ -143,7 +141,7 @@ onMounted(() => {
|
|||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<span
|
<span
|
||||||
class="set-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
class="set-icon navbar-bg-hover"
|
||||||
:title="t('buttons.pureOpenSystemSet')"
|
:title="t('buttons.pureOpenSystemSet')"
|
||||||
@click="onPanel"
|
@click="onPanel"
|
||||||
>
|
>
|
||||||
@@ -159,7 +157,7 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.translation {
|
.translation {
|
||||||
:deep(.el-dropdown-menu__item) {
|
::v-deep(.el-dropdown-menu__item) {
|
||||||
padding: 5px 40px;
|
padding: 5px 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,7 +175,7 @@ onMounted(() => {
|
|||||||
.logout {
|
.logout {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
|
||||||
:deep(.el-dropdown-menu__item) {
|
::v-deep(.el-dropdown-menu__item) {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
|
|||||||
@@ -104,11 +104,9 @@ watch(
|
|||||||
<LaySearch id="header-search" />
|
<LaySearch id="header-search" />
|
||||||
<!-- 国际化 -->
|
<!-- 国际化 -->
|
||||||
<el-dropdown id="header-translation" trigger="click">
|
<el-dropdown id="header-translation" trigger="click">
|
||||||
<div
|
<GlobalizationIcon
|
||||||
class="globalization-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
|
||||||
>
|
/>
|
||||||
<IconifyIconOffline :icon="GlobalizationIcon" />
|
|
||||||
</div>
|
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu class="translation">
|
<el-dropdown-menu class="translation">
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
@@ -164,7 +162,7 @@ watch(
|
|||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<span
|
<span
|
||||||
class="set-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
class="set-icon navbar-bg-hover"
|
||||||
:title="t('buttons.pureOpenSystemSet')"
|
:title="t('buttons.pureOpenSystemSet')"
|
||||||
@click="onPanel"
|
@click="onPanel"
|
||||||
>
|
>
|
||||||
@@ -180,7 +178,7 @@ watch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
.translation {
|
.translation {
|
||||||
:deep(.el-dropdown-menu__item) {
|
::v-deep(.el-dropdown-menu__item) {
|
||||||
padding: 5px 40px;
|
padding: 5px 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,7 +196,7 @@ watch(
|
|||||||
.logout {
|
.logout {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
|
||||||
:deep(.el-dropdown-menu__item) {
|
::v-deep(.el-dropdown-menu__item) {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
|
|||||||
@@ -24,10 +24,7 @@ watch(
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<span
|
<span class="fullscreen-icon navbar-bg-hover" @click="toggle">
|
||||||
class="fullscreen-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
|
||||||
@click="toggle"
|
|
||||||
>
|
|
||||||
<IconifyIconOffline :icon="screenIcon" />
|
<IconifyIconOffline :icon="screenIcon" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -209,26 +209,18 @@ function initRouter() {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
getAsyncRoutes().then(({ code, data }) => {
|
getAsyncRoutes().then(({ data }) => {
|
||||||
if (code === 0) {
|
handleAsyncRoutes(cloneDeep(data));
|
||||||
handleAsyncRoutes(cloneDeep(data));
|
storageLocal().setItem(key, data);
|
||||||
storageLocal().setItem(key, data);
|
resolve(router);
|
||||||
resolve(router);
|
|
||||||
} else {
|
|
||||||
resolve(router);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
getAsyncRoutes().then(({ code, data }) => {
|
getAsyncRoutes().then(({ data }) => {
|
||||||
if (code === 0) {
|
handleAsyncRoutes(cloneDeep(data));
|
||||||
handleAsyncRoutes(cloneDeep(data));
|
resolve(router);
|
||||||
resolve(router);
|
|
||||||
} else {
|
|
||||||
resolve(router);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,12 +80,8 @@ export const useUserStore = defineStore("pure-user", {
|
|||||||
return new Promise<UserResult>((resolve, reject) => {
|
return new Promise<UserResult>((resolve, reject) => {
|
||||||
getLogin(data)
|
getLogin(data)
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (data.code === 0) {
|
if (data?.success) setToken(data.data);
|
||||||
setToken(data.data);
|
resolve(data);
|
||||||
resolve(data);
|
|
||||||
} else {
|
|
||||||
reject(data.message);
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
reject(error);
|
reject(error);
|
||||||
@@ -107,11 +103,9 @@ export const useUserStore = defineStore("pure-user", {
|
|||||||
return new Promise<RefreshTokenResult>((resolve, reject) => {
|
return new Promise<RefreshTokenResult>((resolve, reject) => {
|
||||||
refreshTokenApi(data)
|
refreshTokenApi(data)
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (data.code === 0) {
|
if (data) {
|
||||||
setToken(data.data);
|
setToken(data.data);
|
||||||
resolve(data);
|
resolve(data);
|
||||||
} else {
|
|
||||||
reject(data.message);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.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 {
|
.design-form {
|
||||||
.el-main.config-content,
|
.el-main.config-content,
|
||||||
|
|||||||
@@ -35,18 +35,3 @@
|
|||||||
.html-weakness {
|
.html-weakness {
|
||||||
filter: invert(80%);
|
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,
|
.set-icon,
|
||||||
.fullscreen-icon,
|
.fullscreen-icon {
|
||||||
.globalization-icon {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
font-size: 16px;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -451,7 +449,7 @@
|
|||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
.search-container,
|
.search-container,
|
||||||
/* 国际化 */
|
/* 国际化 */
|
||||||
.globalization-icon,
|
.globalization,
|
||||||
/* 全屏 */
|
/* 全屏 */
|
||||||
.fullscreen-icon,
|
.fullscreen-icon,
|
||||||
/* 消息通知 */
|
/* 消息通知 */
|
||||||
@@ -470,8 +468,12 @@
|
|||||||
color: var(--pure-theme-sub-menu-active-text);
|
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);
|
color: var(--pure-theme-sub-menu-active-text);
|
||||||
|
cursor: pointer;
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -628,7 +630,7 @@ body[layout="vertical"] {
|
|||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
.search-container,
|
.search-container,
|
||||||
/* 国际化 */
|
/* 国际化 */
|
||||||
.globalization-icon,
|
.globalization,
|
||||||
/* 全屏 */
|
/* 全屏 */
|
||||||
.fullscreen-icon,
|
.fullscreen-icon,
|
||||||
/* 消息通知 */
|
/* 消息通知 */
|
||||||
|
|||||||
@@ -42,9 +42,5 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@utility navbar-bg-hover {
|
@utility navbar-bg-hover {
|
||||||
@apply select-none dark:text-white dark:hover:bg-[#242424]!;
|
@apply dark:text-white dark:hover:bg-[#242424]!;
|
||||||
}
|
|
||||||
|
|
||||||
@utility animate-scale-bounce {
|
|
||||||
animation: pure-scale-bounce 0.3s ease-in-out;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ import type {
|
|||||||
PureHttpRequestConfig
|
PureHttpRequestConfig
|
||||||
} from "./types.d";
|
} from "./types.d";
|
||||||
import { stringify } from "qs";
|
import { stringify } from "qs";
|
||||||
import { message } from "@/utils/message";
|
|
||||||
import { $t, transformI18n } from "@/plugins/i18n";
|
|
||||||
import { getToken, formatToken } from "@/utils/auth";
|
import { getToken, formatToken } from "@/utils/auth";
|
||||||
import { useUserStoreHook } from "@/store/modules/user";
|
import { useUserStoreHook } from "@/store/modules/user";
|
||||||
|
|
||||||
@@ -92,13 +90,6 @@ class PureHttp {
|
|||||||
PureHttp.requests.forEach(cb => cb(token));
|
PureHttp.requests.forEach(cb => cb(token));
|
||||||
PureHttp.requests = [];
|
PureHttp.requests = [];
|
||||||
})
|
})
|
||||||
.catch(_err => {
|
|
||||||
PureHttp.requests = [];
|
|
||||||
useUserStoreHook().logOut();
|
|
||||||
message(transformI18n($t("login.pureLoginExpired")), {
|
|
||||||
type: "warning"
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
PureHttp.isRefreshing = false;
|
PureHttp.isRefreshing = false;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ onBeforeUnmount(() => {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
:deep(.el-upload-dragger) {
|
::v-deep(.el-upload-dragger) {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 180px;
|
height: 180px;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { reactive, ref } from "vue";
|
||||||
import { formUpload } from "@/api/mock";
|
import { formUpload } from "@/api/mock";
|
||||||
import { message } from "@/utils/message";
|
import { message } from "@/utils/message";
|
||||||
import { onMounted, reactive, ref } from "vue";
|
|
||||||
import { type UserInfo, getMine } from "@/api/user";
|
import { type UserInfo, getMine } from "@/api/user";
|
||||||
import type { FormInstance, FormRules } from "element-plus";
|
import type { FormInstance, FormRules } from "element-plus";
|
||||||
import ReCropperPreview from "@/components/ReCropperPreview";
|
import ReCropperPreview from "@/components/ReCropperPreview";
|
||||||
@@ -73,8 +73,8 @@ const handleSubmitImage = () => {
|
|||||||
files: new File([cropperBlob.value], "avatar")
|
files: new File([cropperBlob.value], "avatar")
|
||||||
});
|
});
|
||||||
formUpload(formData)
|
formUpload(formData)
|
||||||
.then(({ code }) => {
|
.then(({ success, data }) => {
|
||||||
if (code === 0) {
|
if (success) {
|
||||||
message("更新头像成功", { type: "success" });
|
message("更新头像成功", { type: "success" });
|
||||||
handleClose();
|
handleClose();
|
||||||
} else {
|
} else {
|
||||||
@@ -98,11 +98,8 @@ const onSubmit = async (formEl: FormInstance) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
getMine().then(res => {
|
||||||
const { code, data } = await getMine();
|
Object.assign(userInfos, res.data);
|
||||||
if (code === 0) {
|
|
||||||
Object.assign(userInfos, data);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -55,13 +55,11 @@ const columns: TableColumnList = [
|
|||||||
|
|
||||||
async function onSearch() {
|
async function onSearch() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const { code, data } = await getMineLogs();
|
const { data } = await getMineLogs();
|
||||||
if (code === 0) {
|
dataList.value = data.list;
|
||||||
dataList.value = data.list;
|
pagination.total = data.total;
|
||||||
pagination.total = data.total;
|
pagination.pageSize = data.pageSize;
|
||||||
pagination.pageSize = data.pageSize;
|
pagination.currentPage = data.currentPage;
|
||||||
pagination.currentPage = data.currentPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { getMine } from "@/api/user";
|
import { getMine } from "@/api/user";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
import { ref, onBeforeMount } from "vue";
|
||||||
import { ReText } from "@/components/ReText";
|
import { ReText } from "@/components/ReText";
|
||||||
import Profile from "./components/Profile.vue";
|
import Profile from "./components/Profile.vue";
|
||||||
import { ref, onMounted, onBeforeMount } from "vue";
|
|
||||||
import Preferences from "./components/Preferences.vue";
|
import Preferences from "./components/Preferences.vue";
|
||||||
import SecurityLog from "./components/SecurityLog.vue";
|
import SecurityLog from "./components/SecurityLog.vue";
|
||||||
import { useGlobal, deviceDetection } from "@pureadmin/utils";
|
import { useGlobal, deviceDetection } from "@pureadmin/utils";
|
||||||
@@ -61,11 +61,8 @@ const panes = [
|
|||||||
];
|
];
|
||||||
const witchPane = ref("profile");
|
const witchPane = ref("profile");
|
||||||
|
|
||||||
onMounted(async () => {
|
getMine().then(res => {
|
||||||
const { code, data } = await getMine();
|
userInfo.value = res.data;
|
||||||
if (code === 0) {
|
|
||||||
userInfo.value = data;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -71,17 +71,17 @@ const settingTB: ContextProps = reactive({
|
|||||||
|
|
||||||
.dv-a {
|
.dv-a {
|
||||||
padding-top: 30vh;
|
padding-top: 30vh;
|
||||||
color: rgb(30 144 255 / 80%);
|
color: rgba($color: dodgerblue, $alpha: 80%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dv-b {
|
.dv-b {
|
||||||
padding-top: 10vh;
|
padding-top: 10vh;
|
||||||
color: rgb(0 0 0 / 80%);
|
color: rgba($color: #000, $alpha: 80%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dv-c {
|
.dv-c {
|
||||||
padding-top: 18vh;
|
padding-top: 18vh;
|
||||||
color: rgb(206 39 45 / 80%);
|
color: rgba($color: #ce272d, $alpha: 80%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ const submitForm = formEl => {
|
|||||||
date: validateForm.date // 别的字段
|
date: validateForm.date // 别的字段
|
||||||
});
|
});
|
||||||
formUpload(formData)
|
formUpload(formData)
|
||||||
.then(({ code }) => {
|
.then(({ success }) => {
|
||||||
if (code === 0) {
|
if (success) {
|
||||||
message("提交成功", { type: "success" });
|
message("提交成功", { type: "success" });
|
||||||
} else {
|
} else {
|
||||||
message("提交失败");
|
message("提交失败");
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ const onDownload = () => {
|
|||||||
class="pure-upload"
|
class="pure-upload"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
accept="image/jpeg,image/png,image/gif"
|
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"
|
:limit="3"
|
||||||
:headers="{ Authorization: 'eyJhbGciOiJIUzUxMiJ9.admin' }"
|
:headers="{ Authorization: 'eyJhbGciOiJIUzUxMiJ9.admin' }"
|
||||||
:on-exceed="onExceed"
|
:on-exceed="onExceed"
|
||||||
@@ -264,13 +264,13 @@ const onDownload = () => {
|
|||||||
表格操作栏中的上传头像功能
|
表格操作栏中的上传头像功能
|
||||||
</p>
|
</p>
|
||||||
<p class="text-[red] text-[12px] flex flex-auto items-center justify-end">
|
<p class="text-[red] text-[12px] flex flex-auto items-center justify-end">
|
||||||
免责声明:上传接口使用
|
免责声明:上传接口使用免费开源的
|
||||||
<el-link
|
<el-link
|
||||||
href="https://beeceptor.com/"
|
href="https://designer.mocky.io/"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
style="font-size: 16px; font-weight: 800"
|
style="font-size: 16px; font-weight: 800"
|
||||||
>
|
>
|
||||||
Beeceptor
|
Mocky
|
||||||
</el-link>
|
</el-link>
|
||||||
<span class="font-bold text-[18x]"> 请不要上传重要信息 </span
|
<span class="font-bold text-[18x]"> 请不要上传重要信息 </span
|
||||||
>,如果造成任何损失,我们概不负责
|
>,如果造成任何损失,我们概不负责
|
||||||
|
|||||||
@@ -38,14 +38,12 @@ const dataLoading = ref(true);
|
|||||||
|
|
||||||
const getCardListData = async () => {
|
const getCardListData = async () => {
|
||||||
try {
|
try {
|
||||||
const { code, data } = await getCardList();
|
const { data } = await getCardList();
|
||||||
if (code === 0) {
|
productList.value = data.list;
|
||||||
productList.value = data.list;
|
pagination.value = {
|
||||||
pagination.value = {
|
...pagination.value,
|
||||||
...pagination.value,
|
total: data.list.length
|
||||||
total: data.list.length
|
};
|
||||||
};
|
|
||||||
}
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -73,21 +73,23 @@ const onLogin = async (formEl: FormInstance | undefined) => {
|
|||||||
username: ruleForm.username,
|
username: ruleForm.username,
|
||||||
password: ruleForm.password
|
password: ruleForm.password
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(res => {
|
||||||
// 获取后端路由
|
if (res.success) {
|
||||||
await initRouter();
|
// 获取后端路由
|
||||||
disabled.value = true;
|
return initRouter().then(() => {
|
||||||
router.push(getTopMenu(true).path).then(() => {
|
disabled.value = true;
|
||||||
message(t("login.pureLoginSuccess"), { type: "success" });
|
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 => {
|
.finally(() => (loading.value = false));
|
||||||
message(t("login.pureLoginFail"), { type: "error" });
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
disabled.value = false;
|
|
||||||
loading.value = false;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -358,7 +360,7 @@ watch(loginDay, value => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.translation {
|
.translation {
|
||||||
:deep(.el-dropdown-menu__item) {
|
::v-deep(.el-dropdown-menu__item) {
|
||||||
padding: 5px 40px;
|
padding: 5px 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -129,13 +129,11 @@ export function useRole(tableRef: Ref) {
|
|||||||
|
|
||||||
async function onSearch() {
|
async function onSearch() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const { code, data } = await getLoginLogsList(toRaw(form));
|
const { data } = await getLoginLogsList(toRaw(form));
|
||||||
if (code === 0) {
|
dataList.value = data.list;
|
||||||
dataList.value = data.list;
|
pagination.total = data.total;
|
||||||
pagination.total = data.total;
|
pagination.pageSize = data.pageSize;
|
||||||
pagination.pageSize = data.pageSize;
|
pagination.currentPage = data.currentPage;
|
||||||
pagination.currentPage = data.currentPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -134,13 +134,11 @@ export function useRole(tableRef: Ref) {
|
|||||||
|
|
||||||
async function onSearch() {
|
async function onSearch() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const { code, data } = await getOperationLogsList(toRaw(form));
|
const { data } = await getOperationLogsList(toRaw(form));
|
||||||
if (code === 0) {
|
dataList.value = data.list;
|
||||||
dataList.value = data.list;
|
pagination.total = data.total;
|
||||||
pagination.total = data.total;
|
pagination.pageSize = data.pageSize;
|
||||||
pagination.pageSize = data.pageSize;
|
pagination.currentPage = data.currentPage;
|
||||||
pagination.currentPage = data.currentPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -204,13 +204,11 @@ export function useRole(tableRef: Ref) {
|
|||||||
|
|
||||||
async function onSearch() {
|
async function onSearch() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const { code, data } = await getSystemLogsList(toRaw(form));
|
const { data } = await getSystemLogsList(toRaw(form));
|
||||||
if (code === 0) {
|
dataList.value = data.list;
|
||||||
dataList.value = data.list;
|
pagination.total = data.total;
|
||||||
pagination.total = data.total;
|
pagination.pageSize = data.pageSize;
|
||||||
pagination.pageSize = data.pageSize;
|
pagination.currentPage = data.currentPage;
|
||||||
pagination.currentPage = data.currentPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -80,13 +80,11 @@ export function useRole() {
|
|||||||
|
|
||||||
async function onSearch() {
|
async function onSearch() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const { code, data } = await getOnlineLogsList(toRaw(form));
|
const { data } = await getOnlineLogsList(toRaw(form));
|
||||||
if (code === 0) {
|
dataList.value = data.list;
|
||||||
dataList.value = data.list;
|
pagination.total = data.total;
|
||||||
pagination.total = data.total;
|
pagination.pageSize = data.pageSize;
|
||||||
pagination.pageSize = data.pageSize;
|
pagination.currentPage = data.currentPage;
|
||||||
pagination.currentPage = data.currentPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { message } from "@/utils/message";
|
|
||||||
import { initRouter } from "@/router/utils";
|
import { initRouter } from "@/router/utils";
|
||||||
import { storageLocal } from "@pureadmin/utils";
|
import { storageLocal } from "@pureadmin/utils";
|
||||||
import { type CSSProperties, ref, computed } from "vue";
|
import { type CSSProperties, ref, computed } from "vue";
|
||||||
@@ -33,13 +32,12 @@ const options = [
|
|||||||
function onChange() {
|
function onChange() {
|
||||||
useUserStoreHook()
|
useUserStoreHook()
|
||||||
.loginByUsername({ username: username.value, password: "admin123" })
|
.loginByUsername({ username: username.value, password: "admin123" })
|
||||||
.then(() => {
|
.then(res => {
|
||||||
storageLocal().removeItem("async-routes");
|
if (res.success) {
|
||||||
usePermissionStoreHook().clearAllCachePage();
|
storageLocal().removeItem("async-routes");
|
||||||
initRouter();
|
usePermissionStoreHook().clearAllCachePage();
|
||||||
})
|
initRouter();
|
||||||
.catch(err => {
|
}
|
||||||
message(err, { type: "error" });
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -74,20 +74,17 @@ export function useDept() {
|
|||||||
|
|
||||||
async function onSearch() {
|
async function onSearch() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const { code, data } = await getDeptList(); // 这里是返回一维数组结构,前端自行处理成树结构,返回格式要求:唯一id加父节点parentId,parentId取父节点id
|
const { data } = await getDeptList(); // 这里是返回一维数组结构,前端自行处理成树结构,返回格式要求:唯一id加父节点parentId,parentId取父节点id
|
||||||
if (code === 0) {
|
let newData = data;
|
||||||
let newData = data;
|
if (!isAllEmpty(form.name)) {
|
||||||
if (!isAllEmpty(form.name)) {
|
// 前端搜索部门名称
|
||||||
// 前端搜索部门名称
|
newData = newData.filter(item => item.name.includes(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); // 处理成树结构
|
|
||||||
}
|
}
|
||||||
|
if (!isAllEmpty(form.status)) {
|
||||||
|
// 前端搜索状态
|
||||||
|
newData = newData.filter(item => item.status === form.status);
|
||||||
|
}
|
||||||
|
dataList.value = handleTree(newData); // 处理成树结构
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|||||||
@@ -106,18 +106,15 @@ export function useMenu() {
|
|||||||
|
|
||||||
async function onSearch() {
|
async function onSearch() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const { code, data } = await getMenuList(); // 这里是返回一维数组结构,前端自行处理成树结构,返回格式要求:唯一id加父节点parentId,parentId取父节点id
|
const { data } = await getMenuList(); // 这里是返回一维数组结构,前端自行处理成树结构,返回格式要求:唯一id加父节点parentId,parentId取父节点id
|
||||||
if (code === 0) {
|
let newData = data;
|
||||||
let newData = data;
|
if (!isAllEmpty(form.title)) {
|
||||||
if (!isAllEmpty(form.title)) {
|
// 前端搜索菜单名称
|
||||||
// 前端搜索菜单名称
|
newData = newData.filter(item =>
|
||||||
newData = newData.filter(item =>
|
transformI18n(item.title).includes(form.title)
|
||||||
transformI18n(item.title).includes(form.title)
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
dataList.value = handleTree(newData); // 处理成树结构
|
|
||||||
}
|
}
|
||||||
|
dataList.value = handleTree(newData); // 处理成树结构
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|||||||
@@ -163,13 +163,11 @@ export function useRole(treeRef: Ref) {
|
|||||||
|
|
||||||
async function onSearch() {
|
async function onSearch() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const { code, data } = await getRoleList(toRaw(form));
|
const { data } = await getRoleList(toRaw(form));
|
||||||
if (code === 0) {
|
dataList.value = data.list;
|
||||||
dataList.value = data.list;
|
pagination.total = data.total;
|
||||||
pagination.total = data.total;
|
pagination.pageSize = data.pageSize;
|
||||||
pagination.pageSize = data.pageSize;
|
pagination.currentPage = data.currentPage;
|
||||||
pagination.currentPage = data.currentPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -231,10 +229,8 @@ export function useRole(treeRef: Ref) {
|
|||||||
if (id) {
|
if (id) {
|
||||||
curRow.value = row;
|
curRow.value = row;
|
||||||
isShow.value = true;
|
isShow.value = true;
|
||||||
const { code, data } = await getRoleMenuIds({ id });
|
const { data } = await getRoleMenuIds({ id });
|
||||||
if (code === 0) {
|
treeRef.value.setCheckedKeys(data);
|
||||||
treeRef.value.setCheckedKeys(data);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
curRow.value = null;
|
curRow.value = null;
|
||||||
isShow.value = false;
|
isShow.value = false;
|
||||||
@@ -272,11 +268,9 @@ export function useRole(treeRef: Ref) {
|
|||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
onSearch();
|
onSearch();
|
||||||
const { code, data } = await getRoleMenu();
|
const { data } = await getRoleMenu();
|
||||||
if (code === 0) {
|
treeIds.value = getKeyList(data, "id");
|
||||||
treeIds.value = getKeyList(data, "id");
|
treeData.value = handleTree(data);
|
||||||
treeData.value = handleTree(data);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(isExpandAll, val => {
|
watch(isExpandAll, val => {
|
||||||
|
|||||||
@@ -272,13 +272,11 @@ export function useUser(tableRef: Ref, treeRef: Ref) {
|
|||||||
|
|
||||||
async function onSearch() {
|
async function onSearch() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const { code, data } = await getUserList(toRaw(form));
|
const { data } = await getUserList(toRaw(form));
|
||||||
if (code === 0) {
|
dataList.value = data.list;
|
||||||
dataList.value = data.list;
|
pagination.total = data.total;
|
||||||
pagination.total = data.total;
|
pagination.pageSize = data.pageSize;
|
||||||
pagination.pageSize = data.pageSize;
|
pagination.currentPage = data.currentPage;
|
||||||
pagination.currentPage = data.currentPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -499,16 +497,13 @@ export function useUser(tableRef: Ref, treeRef: Ref) {
|
|||||||
onSearch();
|
onSearch();
|
||||||
|
|
||||||
// 归属部门
|
// 归属部门
|
||||||
const { code, data } = await getDeptList();
|
const { data } = await getDeptList();
|
||||||
if (code === 0) {
|
higherDeptOptions.value = handleTree(data);
|
||||||
higherDeptOptions.value = handleTree(data);
|
treeData.value = handleTree(data);
|
||||||
treeData.value = handleTree(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
treeLoading.value = false;
|
treeLoading.value = false;
|
||||||
|
|
||||||
// 角色列表
|
// 角色列表
|
||||||
roleOptions.value = (await getAllRoleList()).data ?? [];
|
roleOptions.value = (await getAllRoleList()).data;
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
import { ref, computed } from "vue";
|
||||||
import { tableDataDrag } from "../data";
|
import { tableDataDrag } from "../data";
|
||||||
import { message } from "@/utils/message";
|
import { message } from "@/utils/message";
|
||||||
import { ref, computed, useTemplateRef } from "vue";
|
import { templateRef } from "@vueuse/core";
|
||||||
import { clone, useDark, useECharts } from "@pureadmin/utils";
|
import { clone, useDark, useECharts } from "@pureadmin/utils";
|
||||||
|
|
||||||
export function useColumns() {
|
export function useColumns() {
|
||||||
@@ -30,7 +31,7 @@ export function useColumns() {
|
|||||||
const theme = computed(() => (isDark.value ? "dark" : "light"));
|
const theme = computed(() => (isDark.value ? "dark" : "light"));
|
||||||
|
|
||||||
dataList.value.forEach((_, i) => {
|
dataList.value.forEach((_, i) => {
|
||||||
const { setOptions } = useECharts(useTemplateRef(`PieChartRef${i}`), {
|
const { setOptions } = useECharts(templateRef(`PieChartRef${i}`), {
|
||||||
theme
|
theme
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ function onCloseTags() {
|
|||||||
default-expand-all
|
default-expand-all
|
||||||
:props="{
|
:props="{
|
||||||
label: data => transformI18n(data.meta.title),
|
label: data => transformI18n(data.meta.title),
|
||||||
|
value: 'uniqueId',
|
||||||
children: 'children',
|
children: 'children',
|
||||||
disabled: 'disabled'
|
disabled: 'disabled'
|
||||||
}"
|
}"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, nextTick, ref, toRef, watch } from "vue";
|
import { computed, nextTick, ref, toRef, watch } from "vue";
|
||||||
import { TransitionPresets, transition } from "@vueuse/core";
|
import { TransitionPresets, executeTransition } from "@vueuse/core";
|
||||||
import {
|
import {
|
||||||
Position,
|
Position,
|
||||||
BaseEdge,
|
BaseEdge,
|
||||||
@@ -153,7 +153,7 @@ async function runAnimation() {
|
|||||||
currentLength.value = totalLength;
|
currentLength.value = totalLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
await transition(edgePoint, from, totalLength, {
|
await executeTransition(edgePoint, from, totalLength, {
|
||||||
transition: TransitionPresets.easeInOutCubic,
|
transition: TransitionPresets.easeInOutCubic,
|
||||||
duration: Math.max(1500, totalLength / 2),
|
duration: Math.max(1500, totalLength / 2),
|
||||||
abort: () => !isAnimating.value
|
abort: () => !isAnimating.value
|
||||||
|
|||||||
Reference in New Issue
Block a user