Merge branch 'refs/heads/dev_1.0.0_beta3' into dev
This commit is contained in:
commit
11e8188559
2
.env
2
.env
@ -49,4 +49,4 @@ VITE_SOURCE_MAP=N
|
|||||||
# Used to differentiate storage across different domains
|
# Used to differentiate storage across different domains
|
||||||
VITE_STORAGE_PREFIX=
|
VITE_STORAGE_PREFIX=
|
||||||
|
|
||||||
|
VITE_ICONIFY_URL=/iconify
|
||||||
|
36
package.json
36
package.json
@ -66,44 +66,44 @@
|
|||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"pinia": "2.1.7",
|
"pinia": "2.1.7",
|
||||||
"ts-md5": "1.3.1",
|
"ts-md5": "1.3.1",
|
||||||
"vue": "3.4.26",
|
"vue": "3.4.27",
|
||||||
"vue-codemirror6": "^1.3.0",
|
"vue-codemirror6": "^1.3.0",
|
||||||
"vue-draggable-plus": "0.4.0",
|
"vue-draggable-plus": "0.4.1",
|
||||||
"vue-i18n": "9.13.1",
|
"vue-i18n": "9.13.1",
|
||||||
"vue-router": "4.3.2"
|
"vue-router": "4.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@elegant-router/vue": "0.3.6",
|
"@elegant-router/vue": "0.3.7",
|
||||||
"@iconify/json": "2.2.207",
|
"@iconify/json": "2.2.211",
|
||||||
"@sa/scripts": "workspace:*",
|
"@sa/scripts": "workspace:*",
|
||||||
"@sa/uno-preset": "workspace:*",
|
"@sa/uno-preset": "workspace:*",
|
||||||
"@soybeanjs/eslint-config": "1.3.4",
|
"@soybeanjs/eslint-config": "1.3.5",
|
||||||
"@types/lodash-es": "4.17.12",
|
"@types/lodash-es": "4.17.12",
|
||||||
"@types/node": "20.12.10",
|
"@types/node": "20.12.12",
|
||||||
"@types/nprogress": "0.2.3",
|
"@types/nprogress": "0.2.3",
|
||||||
"@unocss/eslint-config": "0.59.4",
|
"@unocss/eslint-config": "0.60.2",
|
||||||
"@unocss/preset-icons": "0.59.4",
|
"@unocss/preset-icons": "0.60.2",
|
||||||
"@unocss/preset-uno": "0.59.4",
|
"@unocss/preset-uno": "0.60.2",
|
||||||
"@unocss/transformer-directives": "0.59.4",
|
"@unocss/transformer-directives": "0.60.2",
|
||||||
"@unocss/transformer-variant-group": "0.59.4",
|
"@unocss/transformer-variant-group": "0.60.2",
|
||||||
"@unocss/vite": "0.59.4",
|
"@unocss/vite": "0.60.2",
|
||||||
"@vitejs/plugin-vue": "5.0.4",
|
"@vitejs/plugin-vue": "5.0.4",
|
||||||
"@vitejs/plugin-vue-jsx": "3.1.0",
|
"@vitejs/plugin-vue-jsx": "3.1.0",
|
||||||
"eslint": "9.2.0",
|
"eslint": "9.3.0",
|
||||||
"eslint-plugin-vue": "9.25.0",
|
"eslint-plugin-vue": "9.26.0",
|
||||||
"lint-staged": "15.2.2",
|
"lint-staged": "15.2.2",
|
||||||
"sass": "1.76.0",
|
"sass": "1.77.2",
|
||||||
"simple-git-hooks": "2.11.1",
|
"simple-git-hooks": "2.11.1",
|
||||||
"tsx": "4.9.3",
|
"tsx": "4.10.5",
|
||||||
"typescript": "5.4.5",
|
"typescript": "5.4.5",
|
||||||
"unplugin-icons": "0.19.0",
|
"unplugin-icons": "0.19.0",
|
||||||
"unplugin-vue-components": "0.27.0",
|
"unplugin-vue-components": "0.27.0",
|
||||||
"vite": "5.2.11",
|
"vite": "5.2.11",
|
||||||
"vite-plugin-progress": "0.0.7",
|
"vite-plugin-progress": "0.0.7",
|
||||||
"vite-plugin-svg-icons": "2.0.1",
|
"vite-plugin-svg-icons": "2.0.1",
|
||||||
"vite-plugin-vue-devtools": "7.1.3",
|
"vite-plugin-vue-devtools": "7.2.0",
|
||||||
"vue-eslint-parser": "9.4.2",
|
"vue-eslint-parser": "9.4.2",
|
||||||
"vue-tsc": "2.0.16"
|
"vue-tsc": "2.0.19"
|
||||||
},
|
},
|
||||||
"simple-git-hooks": {
|
"simple-git-hooks": {
|
||||||
"commit-msg": "pnpm sa git-commit-verify",
|
"commit-msg": "pnpm sa git-commit-verify",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/axios",
|
"name": "@sa/axios",
|
||||||
"version": "1.1.0",
|
"version": "1.1.2",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
@ -12,7 +12,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sa/utils": "workspace:*",
|
"@sa/utils": "workspace:*",
|
||||||
"axios": "1.6.8",
|
"axios": "1.6.8",
|
||||||
"axios-retry": "4.1.0",
|
"axios-retry": "4.2.0",
|
||||||
"qs": "6.12.1"
|
"qs": "6.12.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/color",
|
"name": "@sa/color",
|
||||||
"version": "1.1.0",
|
"version": "1.1.2",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/hooks",
|
"name": "@sa/hooks",
|
||||||
"version": "1.1.0",
|
"version": "1.1.2",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/materials",
|
"name": "@sa/materials",
|
||||||
"version": "1.1.0",
|
"version": "1.1.2",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@ -36,7 +36,7 @@ defineSlots<Slots>();
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class=":soy: relative inline-flex cursor-pointer items-center justify-center gap-12px whitespace-nowrap border-1px rounded-4px border-solid px-12px py-4px"
|
class=":soy: relative inline-flex cursor-pointer items-center justify-center gap-12px whitespace-nowrap border-(1px solid) rounded-4px px-12px py-4px"
|
||||||
:class="[
|
:class="[
|
||||||
style['button-tab'],
|
style['button-tab'],
|
||||||
{ [style['button-tab_dark']]: darkMode },
|
{ [style['button-tab_dark']]: darkMode },
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/fetch",
|
"name": "@sa/fetch",
|
||||||
"version": "1.1.0",
|
"version": "1.1.2",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/scripts",
|
"name": "@sa/scripts",
|
||||||
"version": "1.1.0",
|
"version": "1.1.2",
|
||||||
"bin": {
|
"bin": {
|
||||||
"sa": "./bin.ts"
|
"sa": "./bin.ts"
|
||||||
},
|
},
|
||||||
@ -19,9 +19,9 @@
|
|||||||
"cac": "6.7.14",
|
"cac": "6.7.14",
|
||||||
"consola": "3.2.3",
|
"consola": "3.2.3",
|
||||||
"enquirer": "2.4.1",
|
"enquirer": "2.4.1",
|
||||||
"execa": "8.0.1",
|
"execa": "9.1.0",
|
||||||
"kolorist": "1.8.0",
|
"kolorist": "1.8.0",
|
||||||
"npm-check-updates": "16.14.20",
|
"npm-check-updates": "16.14.20",
|
||||||
"rimraf": "5.0.5"
|
"rimraf": "5.0.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,5 +3,5 @@ import type { Options } from 'execa';
|
|||||||
export async function execCommand(cmd: string, args: string[], options?: Options) {
|
export async function execCommand(cmd: string, args: string[], options?: Options) {
|
||||||
const { execa } = await import('execa');
|
const { execa } = await import('execa');
|
||||||
const res = await execa(cmd, args, options);
|
const res = await execa(cmd, args, options);
|
||||||
return res?.stdout?.trim() || '';
|
return (res?.stdout as string)?.trim() || '';
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/uno-preset",
|
"name": "@sa/uno-preset",
|
||||||
"version": "1.1.0",
|
"version": "1.1.2",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/utils",
|
"name": "@sa/utils",
|
||||||
"version": "1.1.0",
|
"version": "1.1.2",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
2261
pnpm-lock.yaml
2261
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
21
public/iconify/ant-design.json
Normal file
21
public/iconify/ant-design.json
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"prefix": "ant-design",
|
||||||
|
"lastModified": 1712643605,
|
||||||
|
"aliases": {},
|
||||||
|
"width": 1024,
|
||||||
|
"height": 1024,
|
||||||
|
"icons": {
|
||||||
|
"database-outlined": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32m-600 72h560v208H232zm560 480H232V408h560zm0 272H232V680h560zM304 240a40 40 0 1 0 80 0a40 40 0 1 0-80 0m0 272a40 40 0 1 0 80 0a40 40 0 1 0-80 0m0 272a40 40 0 1 0 80 0a40 40 0 1 0-80 0\"/>"
|
||||||
|
},
|
||||||
|
"info-circle-outlined": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448s448-200.6 448-448S759.4 64 512 64m0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372s372 166.6 372 372s-166.6 372-372 372\"/><path fill=\"currentColor\" d=\"M464 336a48 48 0 1 0 96 0a48 48 0 1 0-96 0m72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8\"/>"
|
||||||
|
},
|
||||||
|
"profile-outlined": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32m-40 728H184V184h656zM492 400h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8m0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8m0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8M340 368a40 40 0 1 0 80 0a40 40 0 1 0-80 0m0 144a40 40 0 1 0 80 0a40 40 0 1 0-80 0m0 144a40 40 0 1 0 80 0a40 40 0 1 0-80 0\"/>"
|
||||||
|
},
|
||||||
|
"schedule-outlined": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M928 224H768v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H548v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H328v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H96c-17.7 0-32 14.3-32 32v576c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V256c0-17.7-14.3-32-32-32m-40 568H136V296h120v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h148v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h148v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h120zM416 496H232c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8m0 136H232c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8m308.2-177.4L620.6 598.3l-52.8-73.1c-3-4.2-7.8-6.6-12.9-6.6H500c-6.5 0-10.3 7.4-6.5 12.7l114.1 158.2a15.9 15.9 0 0 0 25.8 0l165-228.7c3.8-5.3 0-12.7-6.5-12.7H737c-5-.1-9.8 2.4-12.8 6.5\"/>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
15
public/iconify/carbon.json
Normal file
15
public/iconify/carbon.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"prefix": "carbon",
|
||||||
|
"lastModified": 1716442163,
|
||||||
|
"aliases": {},
|
||||||
|
"width": 32,
|
||||||
|
"height": 32,
|
||||||
|
"icons": {
|
||||||
|
"retry-failed": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M26.41 25L30 21.41L28.59 20L25 23.59L21.41 20L20 21.41L23.59 25L20 28.59L21.41 30L25 26.41L28.59 30L30 28.59zM18 2A12.035 12.035 0 0 0 6 14v6.2l-3.6-3.6L1 18l6 6l6-6l-1.4-1.4L8 20.2V14a10 10 0 0 1 20 0v3h2v-3A12.035 12.035 0 0 0 18 2\"/>"
|
||||||
|
},
|
||||||
|
"batch-job": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M32 26v-2h-2.101a5 5 0 0 0-.732-1.753l1.49-1.49l-1.414-1.414l-1.49 1.49A5 5 0 0 0 26 20.101V18h-2v2.101a5 5 0 0 0-1.753.732l-1.49-1.49l-1.414 1.414l1.49 1.49A5 5 0 0 0 20.101 24H18v2h2.101c.13.637.384 1.229.732 1.753l-1.49 1.49l1.414 1.414l1.49-1.49a5 5 0 0 0 1.753.732V32h2v-2.101a5 5 0 0 0 1.753-.732l1.49 1.49l1.414-1.414l-1.49-1.49A5 5 0 0 0 29.899 26zm-7 2c-1.654 0-3-1.346-3-3s1.346-3 3-3s3 1.346 3 3s-1.346 3-3 3m-5-11h-8a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2m-8-2h8V4h-8z\"/><path fill=\"currentColor\" d=\"M17 21H8a2 2 0 0 1-2-2V7h2v12h9z\"/><path fill=\"currentColor\" d=\"M13 25H4c-1.103 0-2-.897-2-2V11h2v12h9z\"/>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
15
public/iconify/eos-icons.json
Normal file
15
public/iconify/eos-icons.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"prefix": "eos-icons",
|
||||||
|
"lastModified": 1715669522,
|
||||||
|
"aliases": {},
|
||||||
|
"width": 24,
|
||||||
|
"height": 24,
|
||||||
|
"icons": {
|
||||||
|
"cronjob": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M10.021 1.021h6v2h-6zM20.04 7.41l1.434-1.434l-1.414-1.414l-1.433 1.433A8.99 8.99 0 0 0 7.53 5.881l1.42 1.44a7.04 7.04 0 0 1 4.06-1.3l.01.001v6.98l4.953 4.958A7.001 7.001 0 0 1 6.01 13.021h3l-4-4l-4 4h3A9 9 0 1 0 20.04 7.41\"/>"
|
||||||
|
},
|
||||||
|
"namespace": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M23 11v2c-.852 0-1 .35-1 1.314v4.498c0 2.514-1.46 3.156-4 3.188v-2c1.404-.032 2 .154 2-1.36v-4.297a3.1 3.1 0 0 1 .294-1.56a1.7 1.7 0 0 1 .997-.783a1.7 1.7 0 0 1-.997-.783A3.1 3.1 0 0 1 20 9.657V5.359c0-1.513-.596-1.327-2-1.359V2c2.54.032 4 .674 4 3.188v4.498c0 .963.148 1.314 1 1.314M1 11v2c.852 0 1 .35 1 1.314v4.498C2 21.326 3.46 21.968 6 22v-2c-1.404-.032-2 .154-2-1.36v-4.297a3.1 3.1 0 0 0-.294-1.56A1.7 1.7 0 0 0 2.709 12a1.7 1.7 0 0 0 .997-.783A3.1 3.1 0 0 0 4 9.657V5.359C4 3.846 4.596 4.032 6 4V2c-2.54.032-4 .674-4 3.188v4.498C2 10.649 1.852 11 1 11m17-2H6v6h12ZM8 11h8v2H8Z\"/>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
12
public/iconify/heroicons.json
Normal file
12
public/iconify/heroicons.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"prefix": "heroicons",
|
||||||
|
"lastModified": 1714370929,
|
||||||
|
"aliases": {},
|
||||||
|
"width": 24,
|
||||||
|
"height": 24,
|
||||||
|
"icons": {
|
||||||
|
"language": {
|
||||||
|
"body": "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"m10.5 21l5.25-11.25L21 21m-9-3h7.5M3 5.621a49 49 0 0 1 6-.371m0 0q1.681 0 3.334.114M9 5.25V3m3.334 2.364C11.176 10.658 7.69 15.08 3 17.502m9.334-12.138q1.344.092 2.666.257m-4.589 8.495a18 18 0 0 1-3.827-5.802\"/>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
12
public/iconify/line-md.json
Normal file
12
public/iconify/line-md.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"prefix": "line-md",
|
||||||
|
"lastModified": 1711104095,
|
||||||
|
"aliases": {},
|
||||||
|
"width": 24,
|
||||||
|
"height": 24,
|
||||||
|
"icons": {
|
||||||
|
"menu-fold-left": {
|
||||||
|
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"2\"><path stroke-dasharray=\"10\" stroke-dashoffset=\"10\" d=\"M7 9L4 12L7 15\"><animate fill=\"freeze\" attributeName=\"stroke-dashoffset\" begin=\"0.6s\" dur=\"0.2s\" values=\"10;0\"/></path><path stroke-dasharray=\"16\" stroke-dashoffset=\"16\" d=\"M19 5H5\"><animate fill=\"freeze\" attributeName=\"stroke-dashoffset\" dur=\"0.2s\" values=\"16;0\"/></path><path stroke-dasharray=\"12\" stroke-dashoffset=\"12\" d=\"M19 12H10\"><animate fill=\"freeze\" attributeName=\"stroke-dashoffset\" begin=\"0.2s\" dur=\"0.2s\" values=\"12;0\"/></path><path stroke-dasharray=\"16\" stroke-dashoffset=\"16\" d=\"M19 19H5\"><animate fill=\"freeze\" attributeName=\"stroke-dashoffset\" begin=\"0.4s\" dur=\"0.2s\" values=\"16;0\"/></path></g>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
12
public/iconify/lucide.json
Normal file
12
public/iconify/lucide.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"prefix": "lucide",
|
||||||
|
"lastModified": 1716442717,
|
||||||
|
"aliases": {},
|
||||||
|
"width": 24,
|
||||||
|
"height": 24,
|
||||||
|
"icons": {
|
||||||
|
"workflow": {
|
||||||
|
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><rect width=\"8\" height=\"8\" x=\"3\" y=\"3\" rx=\"2\"/><path d=\"M7 11v4a2 2 0 0 0 2 2h4\"/><rect width=\"8\" height=\"8\" x=\"13\" y=\"13\" rx=\"2\"/></g>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
13
public/iconify/majesticons.json
Normal file
13
public/iconify/majesticons.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"prefix": "majesticons",
|
||||||
|
"lastModified": 1702312916,
|
||||||
|
"aliases": {},
|
||||||
|
"width": 24,
|
||||||
|
"height": 24,
|
||||||
|
"icons": {
|
||||||
|
"color-swatch-line": {
|
||||||
|
"body": "<g fill=\"currentColor\"><path d=\"M2 5a3 3 0 0 1 3-3h4a3 3 0 0 1 3 3v16a1 1 0 0 1-1 1H5a3 3 0 0 1-3-3V5zm3-1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h5V5a1 1 0 0 0-1-1H5z\"/><path d=\"M14.707 7.121a1 1 0 0 0-1.414 0l-1.586 1.586a1 1 0 1 1-1.414-1.414l1.586-1.586a3 3 0 0 1 4.242 0l2.172 2.172a3 3 0 0 1 .115 4.12H19a3 3 0 0 1 3 3v4a3 3 0 0 1-3 3h-8a1 1 0 1 1 0-2h8a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-2.586l-4.707 4.708a1 1 0 1 1-1.414-1.414l6.586-6.586a1 1 0 0 0 0-1.414L14.707 7.12zM7 15a1 1 0 0 1 1 1v.001a1 1 0 1 1-2 0V16a1 1 0 0 1 1-1z\"/></g>",
|
||||||
|
"hidden": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
public/iconify/material-symbols.json
Normal file
30
public/iconify/material-symbols.json
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"prefix": "material-symbols",
|
||||||
|
"lastModified": 1715672497,
|
||||||
|
"aliases": {},
|
||||||
|
"width": 24,
|
||||||
|
"height": 24,
|
||||||
|
"icons": {
|
||||||
|
"dashboard-outline-rounded": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M13 8V4q0-.425.288-.712T14 3h6q.425 0 .713.288T21 4v4q0 .425-.288.713T20 9h-6q-.425 0-.712-.288T13 8M3 12V4q0-.425.288-.712T4 3h6q.425 0 .713.288T11 4v8q0 .425-.288.713T10 13H4q-.425 0-.712-.288T3 12m10 8v-8q0-.425.288-.712T14 11h6q.425 0 .713.288T21 12v8q0 .425-.288.713T20 21h-6q-.425 0-.712-.288T13 20M3 20v-4q0-.425.288-.712T4 15h6q.425 0 .713.288T11 16v4q0 .425-.288.713T10 21H4q-.425 0-.712-.288T3 20m2-9h4V5H5zm10 8h4v-6h-4zm0-12h4V5h-4zM5 19h4v-2H5zm4-2\"/>"
|
||||||
|
},
|
||||||
|
"group-work-outline": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M8 16q.825 0 1.413-.587T10 14t-.587-1.412T8 12t-1.412.588T6 14t.588 1.413T8 16m8 0q.825 0 1.413-.587T18 14t-.587-1.412T16 12t-1.412.588T14 14t.588 1.413T16 16m-4-6q.825 0 1.413-.587T14 8t-.587-1.412T12 6t-1.412.588T10 8t.588 1.413T12 10m0 12q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22m0-2q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20m0-8\"/>"
|
||||||
|
},
|
||||||
|
"help-outline-rounded": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M11.95 18q.525 0 .888-.363t.362-.887t-.362-.888t-.888-.362t-.887.363t-.363.887t.363.888t.887.362m.05 4q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22m0-2q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20m.1-12.3q.625 0 1.088.4t.462 1q0 .55-.337.975t-.763.8q-.575.5-1.012 1.1t-.438 1.35q0 .35.263.588t.612.237q.375 0 .638-.25t.337-.625q.1-.525.45-.937t.75-.788q.575-.55.988-1.2t.412-1.45q0-1.275-1.037-2.087T12.1 6q-.95 0-1.812.4T8.975 7.625q-.175.3-.112.638t.337.512q.35.2.725.125t.625-.425q.275-.375.688-.575t.862-.2\"/>"
|
||||||
|
},
|
||||||
|
"manage-accounts": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"m16 21l-.3-1.5q-.3-.125-.562-.262T14.6 18.9l-1.45.45l-1-1.7l1.15-1q-.05-.35-.05-.65t.05-.65l-1.15-1l1-1.7l1.45.45q.275-.2.538-.337t.562-.263L16 11h2l.3 1.5q.3.125.563.275t.537.375l1.45-.5l1 1.75l-1.15 1q.05.3.05.625t-.05.625l1.15 1l-1 1.7l-1.45-.45q-.275.2-.537.338t-.563.262L18 21zM2 20v-2.8q0-.825.425-1.55t1.175-1.1q1.275-.65 2.875-1.1T10 13h.35q.15 0 .3.05q-.725 1.8-.6 3.575T11.25 20zm15-2q.825 0 1.413-.587T19 16t-.587-1.412T17 14t-1.412.588T15 16t.588 1.413T17 18m-7-6q-1.65 0-2.825-1.175T6 8t1.175-2.825T10 4t2.825 1.175T14 8t-1.175 2.825T10 12\"/>"
|
||||||
|
},
|
||||||
|
"notifications-active-outline-rounded": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M5 19q-.425 0-.712-.288T4 18t.288-.712T5 17h1v-7q0-2.075 1.25-3.687T10.5 4.2v-.7q0-.625.438-1.062T12 2t1.063.438T13.5 3.5v.7q2 .5 3.25 2.113T18 10v7h1q.425 0 .713.288T20 18t-.288.713T19 19zm7 3q-.825 0-1.412-.587T10 20h4q0 .825-.587 1.413T12 22m-4-5h8v-7q0-1.65-1.175-2.825T12 6T9.175 7.175T8 10zm-5-7q-.425 0-.712-.325t-.238-.75q.2-1.875 1.05-3.488t2.175-2.812q.325-.275.738-.25t.662.375t.2.75t-.375.7q-.975.925-1.6 2.15T4.075 9q-.05.425-.35.713T3 10m18 0q-.425 0-.725-.288T19.925 9q-.2-1.425-.825-2.65T17.5 4.2q-.325-.3-.375-.7t.2-.75t.663-.375t.737.25q1.325 1.2 2.175 2.812t1.05 3.488q.05.425-.237.75T21 10\"/>"
|
||||||
|
},
|
||||||
|
"unknown-document-outline": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M5 4v16zv5zm2 10h3.675q.275-.575.638-1.075t.812-.925H7zm0 4h3.075Q10 17.5 10 17t.075-1H7zm-2 4q-.825 0-1.412-.587T3 20V4q0-.825.588-1.412T5 2h8l6 6v2.3q-.475-.15-.975-.225T17 10V9h-5V4H5v16h5.675q.275.575.638 1.075t.812.925zm12-10q2.075 0 3.538 1.463T22 17t-1.463 3.538T17 22t-3.537-1.463T12 17t1.463-3.537T17 12m0 8q.275 0 .463-.187t.187-.463t-.187-.462T17 18.7t-.462.188t-.188.462t.188.463T17 20m-.45-1.9h.9v-.25q0-.275.15-.488t.35-.412q.35-.3.55-.575t.2-.775q0-.725-.475-1.162T17 14q-.575 0-1.037.338t-.663.912l.8.35q.075-.3.313-.525T17 14.85q.375 0 .588.188t.212.562q0 .275-.15.463t-.35.387q-.15.15-.312.3t-.288.35q-.075.15-.112.3t-.038.35z\"/>"
|
||||||
|
},
|
||||||
|
"sunny": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M11 5V1h2v4zm6.65 2.75l-1.375-1.375l2.8-2.875l1.4 1.425zM19 13v-2h4v2zm-8 10v-4h2v4zM6.35 7.7L3.5 4.925l1.425-1.4L7.75 6.35zm12.7 12.8l-2.775-2.875l1.35-1.35l2.85 2.75zM1 13v-2h4v2zm3.925 7.5l-1.4-1.425l2.8-2.8l.725.675l.725.7zM12 18q-2.5 0-4.25-1.75T6 12t1.75-4.25T12 6t4.25 1.75T18 12t-1.75 4.25T12 18\"/>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
11
public/iconify/octicon.json
Normal file
11
public/iconify/octicon.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"prefix": "octicon",
|
||||||
|
"lastModified": 1713764738,
|
||||||
|
"aliases": {},
|
||||||
|
"icons": {
|
||||||
|
"tasklist": {
|
||||||
|
"body": "<path fill-rule=\"evenodd\" d=\"M15.41 9H7.59C7 9 7 8.59 7 8c0-.59 0-1 .59-1h7.81c.59 0 .59.41.59 1c0 .59 0 1-.59 1h.01zM9.59 4C9 4 9 3.59 9 3c0-.59 0-1 .59-1h5.81c.59 0 .59.41.59 1c0 .59 0 1-.59 1H9.59zM0 3.91l1.41-1.3L3 4.2L7.09 0L8.5 1.41L3 6.91l-3-3zM7.59 12h7.81c.59 0 .59.41.59 1c0 .59 0 1-.59 1H7.59C7 14 7 13.59 7 13c0-.59 0-1 .59-1z\" fill=\"currentColor\"/>",
|
||||||
|
"hidden": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
12
public/iconify/ph.json
Normal file
12
public/iconify/ph.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"prefix": "ph",
|
||||||
|
"lastModified": 1714973607,
|
||||||
|
"aliases": {},
|
||||||
|
"width": 256,
|
||||||
|
"height": 256,
|
||||||
|
"icons": {
|
||||||
|
"user-circle": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24M74.08 197.5a64 64 0 0 1 107.84 0a87.83 87.83 0 0 1-107.84 0M96 120a32 32 0 1 1 32 32a32 32 0 0 1-32-32m97.76 66.41a79.66 79.66 0 0 0-36.06-28.75a48 48 0 1 0-59.4 0a79.66 79.66 0 0 0-36.06 28.75a88 88 0 1 1 131.52 0\"/>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
18
public/iconify/simple-icons.json
Normal file
18
public/iconify/simple-icons.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"prefix": "simple-icons",
|
||||||
|
"lastModified": 1716788850,
|
||||||
|
"aliases": {},
|
||||||
|
"width": 24,
|
||||||
|
"height": 24,
|
||||||
|
"icons": {
|
||||||
|
"gitee": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M11.984 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12a12 12 0 0 0 12-12A12 12 0 0 0 12 0zm6.09 5.333c.328 0 .593.266.592.593v1.482a.594.594 0 0 1-.593.592H9.777c-.982 0-1.778.796-1.778 1.778v5.63c0 .327.266.592.593.592h5.63c.982 0 1.778-.796 1.778-1.778v-.296a.593.593 0 0 0-.592-.593h-4.15a.59.59 0 0 1-.592-.592v-1.482a.593.593 0 0 1 .593-.592h6.815c.327 0 .593.265.593.592v3.408a4 4 0 0 1-4 4H5.926a.593.593 0 0 1-.593-.593V9.778a4.444 4.444 0 0 1 4.445-4.444h8.296Z\"/>"
|
||||||
|
},
|
||||||
|
"github": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12\"/>"
|
||||||
|
},
|
||||||
|
"maildotru": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M15.61 12c0 1.99-1.62 3.61-3.61 3.61S8.39 13.99 8.39 12S10.01 8.39 12 8.39s3.61 1.62 3.61 3.61M12 0C5.383 0 0 5.383 0 12s5.383 12 12 12c2.424 0 4.761-.722 6.76-2.087l.034-.024l-1.617-1.879l-.027.017A9.5 9.5 0 0 1 12 21.54c-5.26 0-9.54-4.28-9.54-9.54S6.74 2.46 12 2.46s9.54 4.28 9.54 9.54a9.6 9.6 0 0 1-.225 2.05c-.301 1.239-1.169 1.618-1.82 1.568c-.654-.053-1.42-.52-1.426-1.661V12A6.076 6.076 0 0 0 12 5.93A6.076 6.076 0 0 0 5.93 12A6.076 6.076 0 0 0 12 18.07a6.02 6.02 0 0 0 4.3-1.792a3.9 3.9 0 0 0 3.32 1.805c.874 0 1.74-.292 2.437-.821c.719-.547 1.256-1.336 1.553-2.285c.047-.154.135-.504.135-.507l.002-.013c.175-.76.253-1.52.253-2.457c0-6.617-5.383-12-12-12\"/>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
12
public/iconify/typcn.json
Normal file
12
public/iconify/typcn.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"prefix": "typcn",
|
||||||
|
"lastModified": 1702314177,
|
||||||
|
"aliases": {},
|
||||||
|
"width": 24,
|
||||||
|
"height": 24,
|
||||||
|
"icons": {
|
||||||
|
"flow-merge": {
|
||||||
|
"body": "<path fill=\"currentColor\" d=\"M18 16.184v-1.851c0-1.93-1.57-3.5-3.5-3.5c-.827 0-1.5-.673-1.5-1.5V7.816A2.997 2.997 0 0 0 15 5c0-1.654-1.346-3-3-3S9 3.346 9 5c0 1.302.839 2.401 2 2.815v1.518c0 .827-.673 1.5-1.5 1.5c-1.93 0-3.5 1.57-3.5 3.5v1.851A2.997 2.997 0 0 0 4 19c0 1.654 1.346 3 3 3s3-1.346 3-3a2.997 2.997 0 0 0-2-2.816v-1.851c0-.827.673-1.5 1.5-1.5c.979 0 1.864-.407 2.5-1.058a3.487 3.487 0 0 0 2.5 1.058c.827 0 1.5.673 1.5 1.5v1.851A2.997 2.997 0 0 0 14 19c0 1.654 1.346 3 3 3s3-1.346 3-3a2.997 2.997 0 0 0-2-2.816M7 20a1.001 1.001 0 0 1 0-2a1.001 1.001 0 0 1 0 2m5-16a1.001 1.001 0 1 1-1 1c0-.551.448-1 1-1m5 16a1.001 1.001 0 0 1 0-2a1.001 1.001 0 0 1 0 2\"/>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,9 +1,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { UploadCustomRequestOptions, UploadFileInfo } from 'naive-ui';
|
import type { UploadCustomRequestOptions, UploadFileInfo } from 'naive-ui';
|
||||||
import { request } from '@/service/request';
|
import { request } from '@/service/request';
|
||||||
|
import { $t } from '@/locales';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'FlieUpload'
|
name: 'FileUpload'
|
||||||
});
|
});
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@ -15,7 +16,7 @@ defineProps<Props>();
|
|||||||
|
|
||||||
const beforeUpload = (fileData: { file: UploadFileInfo; fileList: UploadFileInfo[] }) => {
|
const beforeUpload = (fileData: { file: UploadFileInfo; fileList: UploadFileInfo[] }) => {
|
||||||
if (fileData.file.file?.type !== 'application/json') {
|
if (fileData.file.file?.type !== 'application/json') {
|
||||||
window.$message?.error('只能上传json格式的文件,请重新上传');
|
window.$message?.error($t('common.checkUploadType'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -64,7 +64,7 @@ watch(
|
|||||||
<div>
|
<div>
|
||||||
<NInputGroup v-if="triggerType === 2">
|
<NInputGroup v-if="triggerType === 2">
|
||||||
<NInputNumber v-model:value="interval" :placeholder="$t('page.jobTask.form.triggerInterval')" />
|
<NInputNumber v-model:value="interval" :placeholder="$t('page.jobTask.form.triggerInterval')" />
|
||||||
<NInputGroupLabel>秒</NInputGroupLabel>
|
<NInputGroupLabel>{{ $t('common.second') }}</NInputGroupLabel>
|
||||||
</NInputGroup>
|
</NInputGroup>
|
||||||
<CronInput
|
<CronInput
|
||||||
v-else-if="triggerType === 3"
|
v-else-if="triggerType === 3"
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
import CronInput from '@sa/cron-input';
|
import CronInput from '@sa/cron-input';
|
||||||
import { useAppStore } from '@/store/modules/app';
|
import { useAppStore } from '@/store/modules/app';
|
||||||
|
import { $t } from '@/locales';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'SceneTriggerInterval'
|
name: 'SceneTriggerInterval'
|
||||||
@ -62,12 +63,11 @@ watch(
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<CronInput v-if="backOff === 3" v-model="cron" :lang="app.locale" />
|
<CronInput v-if="backOff === 3" v-model="cron" :lang="app.locale" />
|
||||||
<NInputNumber
|
|
||||||
v-else-if="backOff === 2 || backOff === 4"
|
<NInputGroup v-else-if="backOff === 2 || backOff === 4">
|
||||||
v-model:value="interval"
|
<NInputNumber v-model:value="interval" :placeholder="$t('page.retryScene.form.triggerInterval')" clearable />
|
||||||
:placeholder="$t('page.retryScene.form.triggerInterval')"
|
<NInputGroupLabel>{{ $t('common.second') }}</NInputGroupLabel>
|
||||||
clearable
|
</NInputGroup>
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
@ -3,6 +3,7 @@ import { computed } from 'vue';
|
|||||||
import { useAppStore } from '@/store/modules/app';
|
import { useAppStore } from '@/store/modules/app';
|
||||||
import { useThemeStore } from '@/store/modules/theme';
|
import { useThemeStore } from '@/store/modules/theme';
|
||||||
import { useRouteStore } from '@/store/modules/route';
|
import { useRouteStore } from '@/store/modules/route';
|
||||||
|
import { useTabStore } from '@/store/modules/tab';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'GlobalContent'
|
name: 'GlobalContent'
|
||||||
@ -20,6 +21,7 @@ withDefaults(defineProps<Props>(), {
|
|||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const themeStore = useThemeStore();
|
const themeStore = useThemeStore();
|
||||||
const routeStore = useRouteStore();
|
const routeStore = useRouteStore();
|
||||||
|
const tabStore = useTabStore();
|
||||||
|
|
||||||
const transitionName = computed(() => (themeStore.page.animate ? themeStore.page.animateMode : ''));
|
const transitionName = computed(() => (themeStore.page.animate ? themeStore.page.animateMode : ''));
|
||||||
</script>
|
</script>
|
||||||
@ -36,7 +38,7 @@ const transitionName = computed(() => (themeStore.page.animate ? themeStore.page
|
|||||||
<component
|
<component
|
||||||
:is="Component"
|
:is="Component"
|
||||||
v-if="appStore.reloadFlag"
|
v-if="appStore.reloadFlag"
|
||||||
:key="route.path"
|
:key="tabStore.getTabIdByRoute(route)"
|
||||||
:class="{ 'p-16px': showPadding }"
|
:class="{ 'p-16px': showPadding }"
|
||||||
class="flex-grow bg-layout transition-300"
|
class="flex-grow bg-layout transition-300"
|
||||||
/>
|
/>
|
||||||
|
@ -52,7 +52,7 @@ const href = (url: string) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<DarkModeContainer class="h-full flex-y-center shadow-header">
|
<DarkModeContainer class="h-full flex-y-center px-12px shadow-header">
|
||||||
<GlobalLogo v-if="showLogo" class="h-full" :style="{ width: themeStore.sider.width + 'px' }" />
|
<GlobalLogo v-if="showLogo" class="h-full" :style="{ width: themeStore.sider.width + 'px' }" />
|
||||||
<HorizontalMenu v-if="showMenu" mode="horizontal" :menus="headerMenus" class="px-12px" />
|
<HorizontalMenu v-if="showMenu" mode="horizontal" :menus="headerMenus" class="px-12px" />
|
||||||
<div v-else class="h-full flex-y-center flex-1-hidden">
|
<div v-else class="h-full flex-y-center flex-1-hidden">
|
||||||
|
@ -68,7 +68,7 @@ function handleClickMixMenu(menu: App.Global.Menu) {
|
|||||||
<component :is="icon" :class="[isMini ? 'text-icon-small' : 'text-icon-large']" />
|
<component :is="icon" :class="[isMini ? 'text-icon-small' : 'text-icon-large']" />
|
||||||
<p
|
<p
|
||||||
class="w-full ellipsis-text text-center text-12px transition-height-300"
|
class="w-full ellipsis-text text-center text-12px transition-height-300"
|
||||||
:class="[isMini ? 'h-0 pt-0' : 'h-24px pt-4px']"
|
:class="[isMini ? 'h-0 pt-0' : 'h-20px pt-4px']"
|
||||||
>
|
>
|
||||||
{{ label }}
|
{{ label }}
|
||||||
</p>
|
</p>
|
||||||
|
@ -55,8 +55,8 @@ function handleResetActiveMenu() {
|
|||||||
:inverted="siderInverted"
|
:inverted="siderInverted"
|
||||||
:style="{ width: showDrawer ? themeStore.sider.mixChildMenuWidth + 'px' : '0px' }"
|
:style="{ width: showDrawer ? themeStore.sider.mixChildMenuWidth + 'px' : '0px' }"
|
||||||
>
|
>
|
||||||
<header class="flex-y-center justify-between" :style="{ height: themeStore.header.height + 'px' }">
|
<header class="flex-y-center justify-between px-12px" :style="{ height: themeStore.header.height + 'px' }">
|
||||||
<h2 class="pl-8px text-16px text-primary font-bold">{{ $t('system.title') }}</h2>
|
<h2 class="text-16px text-primary font-bold">{{ $t('system.title') }}</h2>
|
||||||
<PinToggler
|
<PinToggler
|
||||||
:pin="appStore.mixSiderFixed"
|
:pin="appStore.mixSiderFixed"
|
||||||
:class="{ 'text-white:88 !hover:text-white': siderInverted }"
|
:class="{ 'text-white:88 !hover:text-white': siderInverted }"
|
||||||
|
@ -73,10 +73,8 @@ function getActivePathIndex() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** key enter */
|
/** key enter */
|
||||||
function handleEnter(e: Event | undefined) {
|
function handleEnter() {
|
||||||
if (resultOptions.value?.length === 0 || activePath.value === '') return;
|
if (resultOptions.value?.length === 0 || activePath.value === '') return;
|
||||||
|
|
||||||
e?.preventDefault();
|
|
||||||
handleClose();
|
handleClose();
|
||||||
router.push(activePath.value);
|
router.push(activePath.value);
|
||||||
}
|
}
|
||||||
@ -114,7 +112,7 @@ registerShortcut();
|
|||||||
|
|
||||||
<div class="mt-20px">
|
<div class="mt-20px">
|
||||||
<NEmpty v-if="resultOptions.length === 0" :description="$t('common.noData')" />
|
<NEmpty v-if="resultOptions.length === 0" :description="$t('common.noData')" />
|
||||||
<SearchResult v-else v-model:path="activePath" :options="resultOptions" @enter="handleEnter" />
|
<SearchResult v-else v-model:path="activePath" :options="resultOptions" @enter.prevent="handleEnter" />
|
||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<SearchFooter v-if="!isMobile" />
|
<SearchFooter v-if="!isMobile" />
|
||||||
|
@ -141,6 +141,10 @@ function init() {
|
|||||||
tabStore.initTabStore(route);
|
tabStore.initTabStore(route);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function removeFocus() {
|
||||||
|
(document.activeElement as HTMLElement)?.blur();
|
||||||
|
}
|
||||||
|
|
||||||
// watch
|
// watch
|
||||||
watch(
|
watch(
|
||||||
() => route.fullPath,
|
() => route.fullPath,
|
||||||
@ -162,7 +166,11 @@ init();
|
|||||||
<template>
|
<template>
|
||||||
<DarkModeContainer class="size-full flex-y-center px-16px shadow-tab">
|
<DarkModeContainer class="size-full flex-y-center px-16px shadow-tab">
|
||||||
<div ref="bsWrapper" class="h-full flex-1-hidden">
|
<div ref="bsWrapper" class="h-full flex-1-hidden">
|
||||||
<BetterScroll ref="bsScroll" :options="{ scrollX: true, scrollY: false, click: appStore.isMobile }">
|
<BetterScroll
|
||||||
|
ref="bsScroll"
|
||||||
|
:options="{ scrollX: true, scrollY: false, click: appStore.isMobile }"
|
||||||
|
@click="removeFocus"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
ref="tabRef"
|
ref="tabRef"
|
||||||
class="h-full flex pr-18px"
|
class="h-full flex pr-18px"
|
||||||
|
@ -24,9 +24,13 @@ const local: App.I18n.Schema = {
|
|||||||
rollbackSuccess: 'Rollback Success',
|
rollbackSuccess: 'Rollback Success',
|
||||||
deleteSuccess: 'Delete Success',
|
deleteSuccess: 'Delete Success',
|
||||||
confirmDelete: 'Are you sure you want to delete?',
|
confirmDelete: 'Are you sure you want to delete?',
|
||||||
import: 'import',
|
checkUploadType: 'Only JSON format files can be uploaded, please re-upload',
|
||||||
export: 'export',
|
second: 's',
|
||||||
batchCopy: 'BatchCopy',
|
millisecond: 'ms',
|
||||||
|
import: 'Import',
|
||||||
|
export: 'Export',
|
||||||
|
exportAll: 'Are you sure to export all?',
|
||||||
|
exportPar: 'Are you sure to export {num} pieces of data?',
|
||||||
edit: 'Edit',
|
edit: 'Edit',
|
||||||
detail: 'Detail',
|
detail: 'Detail',
|
||||||
index: 'Index',
|
index: 'Index',
|
||||||
@ -522,7 +526,7 @@ const local: App.I18n.Schema = {
|
|||||||
form: {
|
form: {
|
||||||
groupName: 'Please enter group name',
|
groupName: 'Please enter group name',
|
||||||
token: 'Please enter Token',
|
token: 'Please enter Token',
|
||||||
groupStatus: 'Group status',
|
groupStatus: 'Please select group status',
|
||||||
description: 'Please enter description',
|
description: 'Please enter description',
|
||||||
idGeneratorMode: 'Please select ID generator mode',
|
idGeneratorMode: 'Please select ID generator mode',
|
||||||
groupPartition: 'Please select Group partition',
|
groupPartition: 'Please select Group partition',
|
||||||
@ -865,9 +869,9 @@ const local: App.I18n.Schema = {
|
|||||||
sceneStatus: 'State',
|
sceneStatus: 'State',
|
||||||
backOff: 'Backoff strategy',
|
backOff: 'Backoff strategy',
|
||||||
maxRetryCount: 'Maximum number of retries',
|
maxRetryCount: 'Maximum number of retries',
|
||||||
triggerInterval: 'Intervals(s)',
|
triggerInterval: 'Intervals',
|
||||||
deadlineRequest: 'Call chain timeout(ms)',
|
deadlineRequest: 'Call chain timeout',
|
||||||
executorTimeout: 'Overtime time(s)',
|
executorTimeout: 'Overtime time',
|
||||||
createDt: 'Creation time',
|
createDt: 'Creation time',
|
||||||
updateDt: 'Update time',
|
updateDt: 'Update time',
|
||||||
description: 'Describe',
|
description: 'Describe',
|
||||||
|
@ -24,9 +24,13 @@ const local: App.I18n.Schema = {
|
|||||||
rollbackSuccess: '回滚成功',
|
rollbackSuccess: '回滚成功',
|
||||||
deleteSuccess: '删除成功',
|
deleteSuccess: '删除成功',
|
||||||
confirmDelete: '确认删除吗?',
|
confirmDelete: '确认删除吗?',
|
||||||
|
checkUploadType: '只能上传json格式的文件,请重新上传',
|
||||||
|
second: '秒',
|
||||||
|
millisecond: '毫秒',
|
||||||
import: '导入',
|
import: '导入',
|
||||||
export: '导出',
|
export: '导出',
|
||||||
batchCopy: '批量复制',
|
exportAll: '确认导出列表中全部数据吗?',
|
||||||
|
exportPar: '确认导出{num}条数据吗?',
|
||||||
edit: '编辑',
|
edit: '编辑',
|
||||||
detail: '详情',
|
detail: '详情',
|
||||||
index: '序号',
|
index: '序号',
|
||||||
@ -872,9 +876,9 @@ const local: App.I18n.Schema = {
|
|||||||
sceneStatus: '状态',
|
sceneStatus: '状态',
|
||||||
backOff: '退避策略',
|
backOff: '退避策略',
|
||||||
maxRetryCount: '最大重试次数',
|
maxRetryCount: '最大重试次数',
|
||||||
triggerInterval: '间隔时间(秒)',
|
triggerInterval: '间隔时间',
|
||||||
deadlineRequest: '调用链超时时间(毫秒)',
|
deadlineRequest: '调用链超时时间',
|
||||||
executorTimeout: '超时时间(秒)',
|
executorTimeout: '超时时间',
|
||||||
createDt: '创建时间',
|
createDt: '创建时间',
|
||||||
updateDt: '更新时间',
|
updateDt: '更新时间',
|
||||||
description: '描述',
|
description: '描述',
|
||||||
|
@ -222,7 +222,8 @@ export const generatedRoutes: GeneratedRoute[] = [
|
|||||||
meta: {
|
meta: {
|
||||||
title: 'job_batch',
|
title: 'job_batch',
|
||||||
i18nKey: 'route.job_batch',
|
i18nKey: 'route.job_batch',
|
||||||
icon: 'carbon:batch-job'
|
icon: 'carbon:batch-job',
|
||||||
|
order: 20
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -232,7 +233,8 @@ export const generatedRoutes: GeneratedRoute[] = [
|
|||||||
meta: {
|
meta: {
|
||||||
title: 'job_task',
|
title: 'job_task',
|
||||||
i18nKey: 'route.job_task',
|
i18nKey: 'route.job_task',
|
||||||
icon: 'octicon:tasklist'
|
icon: 'octicon:tasklist',
|
||||||
|
order: 10
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -474,7 +476,7 @@ export const generatedRoutes: GeneratedRoute[] = [
|
|||||||
title: 'retry_scene',
|
title: 'retry_scene',
|
||||||
i18nKey: 'route.retry_scene',
|
i18nKey: 'route.retry_scene',
|
||||||
icon: 'cbi:scene-dynamic',
|
icon: 'cbi:scene-dynamic',
|
||||||
order: 40
|
order: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -544,7 +546,8 @@ export const generatedRoutes: GeneratedRoute[] = [
|
|||||||
meta: {
|
meta: {
|
||||||
title: 'workflow_batch',
|
title: 'workflow_batch',
|
||||||
i18nKey: 'route.workflow_batch',
|
i18nKey: 'route.workflow_batch',
|
||||||
icon: 'carbon:batch-job'
|
icon: 'carbon:batch-job',
|
||||||
|
order: 10
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -615,7 +618,8 @@ export const generatedRoutes: GeneratedRoute[] = [
|
|||||||
meta: {
|
meta: {
|
||||||
title: 'workflow_task',
|
title: 'workflow_task',
|
||||||
i18nKey: 'route.workflow_task',
|
i18nKey: 'route.workflow_task',
|
||||||
icon: 'octicon:tasklist'
|
icon: 'octicon:tasklist',
|
||||||
|
order: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -42,7 +42,13 @@ function transformElegantRouteToVueRoute(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getLayoutName(component: string) {
|
function getLayoutName(component: string) {
|
||||||
return component.replace(LAYOUT_PREFIX, '');
|
const layout = component.replace(LAYOUT_PREFIX, '');
|
||||||
|
|
||||||
|
if(!layouts[layout]) {
|
||||||
|
throw new Error(`Layout component "${layout}" not found`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isView(component: string) {
|
function isView(component: string) {
|
||||||
@ -50,7 +56,13 @@ function transformElegantRouteToVueRoute(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getViewName(component: string) {
|
function getViewName(component: string) {
|
||||||
return component.replace(VIEW_PREFIX, '');
|
const view = component.replace(VIEW_PREFIX, '');
|
||||||
|
|
||||||
|
if(!views[view]) {
|
||||||
|
throw new Error(`View component "${view}" not found`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isFirstLevelRoute(item: ElegantConstRoute) {
|
function isFirstLevelRoute(item: ElegantConstRoute) {
|
||||||
@ -81,6 +93,7 @@ function transformElegantRouteToVueRoute(
|
|||||||
|
|
||||||
const vueRoute = { name, path, ...rest } as RouteRecordRaw;
|
const vueRoute = { name, path, ...rest } as RouteRecordRaw;
|
||||||
|
|
||||||
|
try {
|
||||||
if (component) {
|
if (component) {
|
||||||
if (isSingleLevelRoute(route)) {
|
if (isSingleLevelRoute(route)) {
|
||||||
const { layout, view } = getSingleLevelRouteComponent(component);
|
const { layout, view } = getSingleLevelRouteComponent(component);
|
||||||
@ -114,6 +127,11 @@ function transformElegantRouteToVueRoute(
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} catch (error: any) {
|
||||||
|
console.error(`Error transforming route "${route.name}": ${error.toString()}`);
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// add redirect to child
|
// add redirect to child
|
||||||
if (children?.length && !vueRoute.redirect) {
|
if (children?.length && !vueRoute.redirect) {
|
||||||
|
@ -179,15 +179,18 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
|
|||||||
async function initConstantRoute() {
|
async function initConstantRoute() {
|
||||||
if (isInitConstantRoute.value) return;
|
if (isInitConstantRoute.value) return;
|
||||||
|
|
||||||
if (authRouteMode.value === 'static') {
|
|
||||||
const staticRoute = createStaticRoutes();
|
const staticRoute = createStaticRoutes();
|
||||||
|
|
||||||
|
if (authRouteMode.value === 'static') {
|
||||||
addConstantRoutes(staticRoute.constantRoutes);
|
addConstantRoutes(staticRoute.constantRoutes);
|
||||||
} else {
|
} else {
|
||||||
const { data, error } = await fetchGetConstantRoutes();
|
const { data, error } = await fetchGetConstantRoutes();
|
||||||
|
|
||||||
if (!error) {
|
if (!error) {
|
||||||
addConstantRoutes(data);
|
addConstantRoutes(data);
|
||||||
|
} else {
|
||||||
|
// if fetch constant routes failed, use static constant routes
|
||||||
|
addConstantRoutes(staticRoute.constantRoutes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -240,6 +243,9 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
|
|||||||
handleUpdateRootRouteRedirect(home);
|
handleUpdateRootRouteRedirect(home);
|
||||||
|
|
||||||
setIsInitAuthRoute(true);
|
setIsInitAuthRoute(true);
|
||||||
|
} else {
|
||||||
|
// if fetch user routes failed, reset store
|
||||||
|
authStore.resetStore();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { useEventListener } from '@vueuse/core';
|
import { useEventListener } from '@vueuse/core';
|
||||||
import type { RouteKey } from '@elegant-router/types';
|
import type { RouteKey } from '@elegant-router/types';
|
||||||
|
import { router } from '@/router';
|
||||||
import { SetupStoreId } from '@/enum';
|
import { SetupStoreId } from '@/enum';
|
||||||
import { useRouterPush } from '@/hooks/common/router';
|
import { useRouterPush } from '@/hooks/common/router';
|
||||||
import { localStg } from '@/utils/storage';
|
import { localStg } from '@/utils/storage';
|
||||||
@ -17,13 +17,13 @@ import {
|
|||||||
getDefaultHomeTab,
|
getDefaultHomeTab,
|
||||||
getFixedTabIds,
|
getFixedTabIds,
|
||||||
getTabByRoute,
|
getTabByRoute,
|
||||||
|
getTabIdByRoute,
|
||||||
isTabInTabs,
|
isTabInTabs,
|
||||||
updateTabByI18nKey,
|
updateTabByI18nKey,
|
||||||
updateTabsByI18nKey
|
updateTabsByI18nKey
|
||||||
} from './shared';
|
} from './shared';
|
||||||
|
|
||||||
export const useTabStore = defineStore(SetupStoreId.Tab, () => {
|
export const useTabStore = defineStore(SetupStoreId.Tab, () => {
|
||||||
const router = useRouter();
|
|
||||||
const routeStore = useRouteStore();
|
const routeStore = useRouteStore();
|
||||||
const themeStore = useThemeStore();
|
const themeStore = useThemeStore();
|
||||||
const { routerPush } = useRouterPush(false);
|
const { routerPush } = useRouterPush(false);
|
||||||
@ -289,6 +289,7 @@ export const useTabStore = defineStore(SetupStoreId.Tab, () => {
|
|||||||
setTabLabel,
|
setTabLabel,
|
||||||
resetTabLabel,
|
resetTabLabel,
|
||||||
isTabRetain,
|
isTabRetain,
|
||||||
updateTabsByLocale
|
updateTabsByLocale,
|
||||||
|
getTabIdByRoute
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
13
src/typings/api.d.ts
vendored
13
src/typings/api.d.ts
vendored
@ -378,9 +378,15 @@ declare namespace Api {
|
|||||||
|
|
||||||
/** groupConfig search params */
|
/** groupConfig search params */
|
||||||
type GroupConfigSearchParams = CommonType.RecordNullable<
|
type GroupConfigSearchParams = CommonType.RecordNullable<
|
||||||
Pick<Api.GroupConfig.GroupConfig, 'groupName'> & CommonSearchParams
|
Pick<Api.GroupConfig.GroupConfig, 'groupName' | 'groupStatus'> & CommonSearchParams
|
||||||
>;
|
>;
|
||||||
|
|
||||||
|
/** export groupConfig */
|
||||||
|
type ExportGroupConfig = Common.CommonRecord<{
|
||||||
|
groupIds: string[];
|
||||||
|
}> &
|
||||||
|
CommonType.RecordNullable<Pick<Api.GroupConfig.GroupConfig, 'groupName' | 'groupStatus'>>;
|
||||||
|
|
||||||
type GroupConfigRequestVO = {
|
type GroupConfigRequestVO = {
|
||||||
groupName: string;
|
groupName: string;
|
||||||
groupStatus: GroupStatusType;
|
groupStatus: GroupStatusType;
|
||||||
@ -844,6 +850,11 @@ declare namespace Api {
|
|||||||
CommonSearchParams
|
CommonSearchParams
|
||||||
>;
|
>;
|
||||||
|
|
||||||
|
type ExportScene = Common.CommonRecord<{
|
||||||
|
sceneIds: string[];
|
||||||
|
}> &
|
||||||
|
SceneSearchParams;
|
||||||
|
|
||||||
/** scene list */
|
/** scene list */
|
||||||
type SceneList = Common.PaginatingQueryRecord<Scene>;
|
type SceneList = Common.PaginatingQueryRecord<Scene>;
|
||||||
|
|
||||||
|
6
src/typings/app.d.ts
vendored
6
src/typings/app.d.ts
vendored
@ -274,9 +274,13 @@ declare namespace App {
|
|||||||
rollbackSuccess: string;
|
rollbackSuccess: string;
|
||||||
deleteSuccess: string;
|
deleteSuccess: string;
|
||||||
confirmDelete: string;
|
confirmDelete: string;
|
||||||
|
checkUploadType: string;
|
||||||
|
second: string;
|
||||||
|
millisecond: string;
|
||||||
import: string;
|
import: string;
|
||||||
export: string;
|
export: string;
|
||||||
batchCopy: string;
|
exportAll: string;
|
||||||
|
exportPar: string;
|
||||||
edit: string;
|
edit: string;
|
||||||
detail: string;
|
detail: string;
|
||||||
index: string;
|
index: string;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="tsx">
|
<script setup lang="tsx">
|
||||||
import { NButton, NTag } from 'naive-ui';
|
import { NButton, NPopconfirm, NTag } from 'naive-ui';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useBoolean } from '@sa/hooks';
|
import { useBoolean } from '@sa/hooks';
|
||||||
import { fetchGetGroupConfigList, fetchUpdateGroupStatus } from '@/service/api';
|
import { fetchGetGroupConfigList, fetchUpdateGroupStatus } from '@/service/api';
|
||||||
@ -10,6 +10,7 @@ import { groupConfigIdModeRecord, yesOrNoRecord } from '@/constants/business';
|
|||||||
import { tagColor } from '@/utils/common';
|
import { tagColor } from '@/utils/common';
|
||||||
import StatusSwitch from '@/components/common/status-switch.vue';
|
import StatusSwitch from '@/components/common/status-switch.vue';
|
||||||
import { useAuth } from '@/hooks/business/auth';
|
import { useAuth } from '@/hooks/business/auth';
|
||||||
|
import { downloadFetch } from '@/utils/download';
|
||||||
import GroupOperateDrawer from './modules/group-operate-drawer.vue';
|
import GroupOperateDrawer from './modules/group-operate-drawer.vue';
|
||||||
import GroupDetailDrawer from './modules/group-detail-drawer.vue';
|
import GroupDetailDrawer from './modules/group-detail-drawer.vue';
|
||||||
import GroupSearch from './modules/group-search.vue';
|
import GroupSearch from './modules/group-search.vue';
|
||||||
@ -29,6 +30,11 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
groupName: null
|
groupName: null
|
||||||
},
|
},
|
||||||
columns: () => [
|
columns: () => [
|
||||||
|
{
|
||||||
|
type: 'selection',
|
||||||
|
align: 'center',
|
||||||
|
width: 48
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'index',
|
key: 'index',
|
||||||
title: $t('common.index'),
|
title: $t('common.index'),
|
||||||
@ -154,6 +160,18 @@ const {
|
|||||||
function edit(id: string) {
|
function edit(id: string) {
|
||||||
handleEdit(id);
|
handleEdit(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function body(): Api.GroupConfig.ExportGroupConfig {
|
||||||
|
return {
|
||||||
|
groupName: searchParams.groupName,
|
||||||
|
groupStatus: searchParams.groupStatus,
|
||||||
|
groupIds: checkedRowKeys.value
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleExport() {
|
||||||
|
downloadFetch('/group/export', body(), $t('page.groupConfig.title'));
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -175,7 +193,28 @@ function edit(id: string) {
|
|||||||
:show-add="hasAuth('R_ADMIN')"
|
:show-add="hasAuth('R_ADMIN')"
|
||||||
@add="handleAdd"
|
@add="handleAdd"
|
||||||
@refresh="getData"
|
@refresh="getData"
|
||||||
/>
|
>
|
||||||
|
<template #addAfter>
|
||||||
|
<FileUpload v-if="hasAuth('R_ADMIN')" action="/group/import" accept="application/json" />
|
||||||
|
<NPopconfirm @positive-click="handleExport">
|
||||||
|
<template #trigger>
|
||||||
|
<NButton size="small" ghost type="primary" :disabled="checkedRowKeys.length === 0 && hasAuth('R_USER')">
|
||||||
|
<template #icon>
|
||||||
|
<IconPajamasExport class="text-icon" />
|
||||||
|
</template>
|
||||||
|
{{ $t('common.export') }}
|
||||||
|
</NButton>
|
||||||
|
</template>
|
||||||
|
<template #default>
|
||||||
|
{{
|
||||||
|
checkedRowKeys.length === 0
|
||||||
|
? $t('common.exportAll')
|
||||||
|
: $t('common.exportPar', { num: checkedRowKeys.length })
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</NPopconfirm>
|
||||||
|
</template>
|
||||||
|
</TableHeaderOperation>
|
||||||
</template>
|
</template>
|
||||||
<NDataTable
|
<NDataTable
|
||||||
v-model:checked-row-keys="checkedRowKeys"
|
v-model:checked-row-keys="checkedRowKeys"
|
||||||
|
@ -66,15 +66,6 @@ type RuleKey = Extract<
|
|||||||
'groupName' | 'token' | 'groupStatus' | 'idGeneratorMode' | 'initScene' | 'groupPartition'
|
'groupName' | 'token' | 'groupStatus' | 'idGeneratorMode' | 'initScene' | 'groupPartition'
|
||||||
>;
|
>;
|
||||||
|
|
||||||
// const rules: Record<RuleKey, App.Global.FormRule> = {
|
|
||||||
// groupName: defaultRequiredRule,
|
|
||||||
// token: defaultRequiredRule,
|
|
||||||
// groupStatus: defaultRequiredRule,
|
|
||||||
// idGeneratorMode: defaultRequiredRule,
|
|
||||||
// initScene: defaultRequiredRule,
|
|
||||||
// groupPartition: defaultRequiredRule
|
|
||||||
// };
|
|
||||||
|
|
||||||
const rules = {
|
const rules = {
|
||||||
groupName: [
|
groupName: [
|
||||||
defaultRequiredRule,
|
defaultRequiredRule,
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
|
import { translateOptions } from '@/utils/common';
|
||||||
|
import { groupConfigStatusOptions } from '@/constants/business';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'GroupSearch'
|
name: 'GroupSearch'
|
||||||
@ -28,6 +30,13 @@ function search() {
|
|||||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.groupConfig.groupName')" path="groupName" class="pr-24px">
|
<NFormItemGi span="24 s:12 m:6" :label="$t('page.groupConfig.groupName')" path="groupName" class="pr-24px">
|
||||||
<NInput v-model:value="model.groupName" :placeholder="$t('page.groupConfig.form.groupName')" />
|
<NInput v-model:value="model.groupName" :placeholder="$t('page.groupConfig.form.groupName')" />
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
|
<NFormItemGi span="24 s:12 m:6" :label="$t('page.groupConfig.groupStatus')" path="groupStatus" class="pr-24px">
|
||||||
|
<NSelect
|
||||||
|
v-model:value="model.groupStatus"
|
||||||
|
:placeholder="$t('page.groupConfig.form.groupStatus')"
|
||||||
|
:options="translateOptions(groupConfigStatusOptions)"
|
||||||
|
/>
|
||||||
|
</NFormItemGi>
|
||||||
</SearchForm>
|
</SearchForm>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -10,9 +10,11 @@ import { blockStrategyRecord, taskTypeRecord, triggerTypeRecord } from '@/consta
|
|||||||
import StatusSwitch from '@/components/common/status-switch.vue';
|
import StatusSwitch from '@/components/common/status-switch.vue';
|
||||||
import { useRouterPush } from '@/hooks/common/router';
|
import { useRouterPush } from '@/hooks/common/router';
|
||||||
import { useAuth } from '@/hooks/business/auth';
|
import { useAuth } from '@/hooks/business/auth';
|
||||||
|
import { downloadFetch } from '@/utils/download';
|
||||||
import JobTaskOperateDrawer from './modules/job-task-operate-drawer.vue';
|
import JobTaskOperateDrawer from './modules/job-task-operate-drawer.vue';
|
||||||
import JobTaskSearch from './modules/job-task-search.vue';
|
import JobTaskSearch from './modules/job-task-search.vue';
|
||||||
import JobTaskDetailDrawer from './modules/job-task-detail-drawer.vue';
|
import JobTaskDetailDrawer from './modules/job-task-detail-drawer.vue';
|
||||||
|
|
||||||
const { hasAuth } = useAuth();
|
const { hasAuth } = useAuth();
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
@ -33,11 +35,16 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP
|
|||||||
jobStatus: null
|
jobStatus: null
|
||||||
},
|
},
|
||||||
columns: () => [
|
columns: () => [
|
||||||
|
{
|
||||||
|
type: 'selection',
|
||||||
|
align: 'center',
|
||||||
|
width: 48
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'index',
|
key: 'index',
|
||||||
title: $t('common.index'),
|
title: $t('common.index'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120
|
width: 48
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'jobName',
|
key: 'jobName',
|
||||||
@ -245,6 +252,10 @@ async function handleTriggerJob(id: string) {
|
|||||||
function goToBatch(jobId: string) {
|
function goToBatch(jobId: string) {
|
||||||
routerPushByKey('job_batch', { query: { jobId } });
|
routerPushByKey('job_batch', { query: { jobId } });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleExport() {
|
||||||
|
downloadFetch('/job/export', checkedRowKeys.value, $t('page.jobTask.title'));
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -264,7 +275,28 @@ function goToBatch(jobId: string) {
|
|||||||
:show-delete="false"
|
:show-delete="false"
|
||||||
@add="handleAdd"
|
@add="handleAdd"
|
||||||
@refresh="getData"
|
@refresh="getData"
|
||||||
/>
|
>
|
||||||
|
<template #addAfter>
|
||||||
|
<FileUpload action="/job/import" accept="application/json" />
|
||||||
|
<NPopconfirm @positive-click="handleExport">
|
||||||
|
<template #trigger>
|
||||||
|
<NButton size="small" ghost type="primary" :disabled="checkedRowKeys.length === 0 && hasAuth('R_USER')">
|
||||||
|
<template #icon>
|
||||||
|
<IconPajamasExport class="text-icon" />
|
||||||
|
</template>
|
||||||
|
{{ $t('common.export') }}
|
||||||
|
</NButton>
|
||||||
|
</template>
|
||||||
|
<template #default>
|
||||||
|
{{
|
||||||
|
checkedRowKeys.length === 0
|
||||||
|
? $t('common.exportAll')
|
||||||
|
: $t('common.exportPar', { num: checkedRowKeys.length })
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</NPopconfirm>
|
||||||
|
</template>
|
||||||
|
</TableHeaderOperation>
|
||||||
</template>
|
</template>
|
||||||
<NDataTable
|
<NDataTable
|
||||||
v-model:checked-row-keys="checkedRowKeys"
|
v-model:checked-row-keys="checkedRowKeys"
|
||||||
|
@ -371,6 +371,7 @@ watch(visible, () => {
|
|||||||
:placeholder="$t('page.jobTask.form.executorTimeout')"
|
:placeholder="$t('page.jobTask.form.executorTimeout')"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
|
<NInputGroupLabel>{{ $t('common.second') }}</NInputGroupLabel>
|
||||||
</NInputGroup>
|
</NInputGroup>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
</NGi>
|
</NGi>
|
||||||
@ -389,6 +390,7 @@ watch(visible, () => {
|
|||||||
<NGrid cols="2 s:1 m:2" responsive="screen" x-gap="20">
|
<NGrid cols="2 s:1 m:2" responsive="screen" x-gap="20">
|
||||||
<NGi>
|
<NGi>
|
||||||
<NFormItem :label="$t('page.jobTask.retryInterval')" path="retryInterval">
|
<NFormItem :label="$t('page.jobTask.retryInterval')" path="retryInterval">
|
||||||
|
<NInputGroup>
|
||||||
<NInputNumber
|
<NInputNumber
|
||||||
v-model:value="model.retryInterval"
|
v-model:value="model.retryInterval"
|
||||||
:min="1"
|
:min="1"
|
||||||
@ -396,6 +398,8 @@ watch(visible, () => {
|
|||||||
:placeholder="$t('page.jobTask.form.retryInterval')"
|
:placeholder="$t('page.jobTask.form.retryInterval')"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
|
<NInputGroupLabel>{{ $t('common.second') }}</NInputGroupLabel>
|
||||||
|
</NInputGroup>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
</NGi>
|
</NGi>
|
||||||
<NGi>
|
<NGi>
|
||||||
|
@ -359,13 +359,13 @@ watch(
|
|||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
<NFormItemGi span="24 m:12" :label="$t('page.manage.menu.keepAlive')" path="keepAlive">
|
<NFormItemGi span="24 m:12" :label="$t('page.manage.menu.keepAlive')" path="keepAlive">
|
||||||
<NRadioGroup v-model:value="model.keepAlive">
|
<NRadioGroup v-model:value="model.keepAlive">
|
||||||
<NRadio value :label="$t('common.yesOrNo.yes')" />
|
<NRadio :value="true" :label="$t('common.yesOrNo.yes')" />
|
||||||
<NRadio :value="false" :label="$t('common.yesOrNo.no')" />
|
<NRadio :value="false" :label="$t('common.yesOrNo.no')" />
|
||||||
</NRadioGroup>
|
</NRadioGroup>
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
<NFormItemGi span="24 m:12" :label="$t('page.manage.menu.constant')" path="constant">
|
<NFormItemGi span="24 m:12" :label="$t('page.manage.menu.constant')" path="constant">
|
||||||
<NRadioGroup v-model:value="model.constant">
|
<NRadioGroup v-model:value="model.constant">
|
||||||
<NRadio value :label="$t('common.yesOrNo.yes')" />
|
<NRadio :value="true" :label="$t('common.yesOrNo.yes')" />
|
||||||
<NRadio :value="false" :label="$t('common.yesOrNo.no')" />
|
<NRadio :value="false" :label="$t('common.yesOrNo.no')" />
|
||||||
</NRadioGroup>
|
</NRadioGroup>
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
@ -374,7 +374,6 @@ watch(
|
|||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
<NFormItemGi span="24 m:12" :label="$t('page.manage.menu.hideInMenu')" path="hideInMenu">
|
<NFormItemGi span="24 m:12" :label="$t('page.manage.menu.hideInMenu')" path="hideInMenu">
|
||||||
<NRadioGroup v-model:value="model.hideInMenu">
|
<NRadioGroup v-model:value="model.hideInMenu">
|
||||||
<!-- eslint-disable-next-line vue/prefer-true-attribute-shorthand -->
|
|
||||||
<NRadio :value="true" :label="$t('common.yesOrNo.yes')" />
|
<NRadio :value="true" :label="$t('common.yesOrNo.yes')" />
|
||||||
<NRadio :value="false" :label="$t('common.yesOrNo.no')" />
|
<NRadio :value="false" :label="$t('common.yesOrNo.no')" />
|
||||||
</NRadioGroup>
|
</NRadioGroup>
|
||||||
@ -394,7 +393,7 @@ watch(
|
|||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
<NFormItemGi span="24 m:12" :label="$t('page.manage.menu.multiTab')" path="multiTab">
|
<NFormItemGi span="24 m:12" :label="$t('page.manage.menu.multiTab')" path="multiTab">
|
||||||
<NRadioGroup v-model:value="model.multiTab">
|
<NRadioGroup v-model:value="model.multiTab">
|
||||||
<NRadio value :label="$t('common.yesOrNo.yes')" />
|
<NRadio :value="true" :label="$t('common.yesOrNo.yes')" />
|
||||||
<NRadio :value="false" :label="$t('common.yesOrNo.no')" />
|
<NRadio :value="false" :label="$t('common.yesOrNo.no')" />
|
||||||
</NRadioGroup>
|
</NRadioGroup>
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
|
@ -27,7 +27,9 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
apiFn: fetchGetRetryDeadLetterPageList,
|
apiFn: fetchGetRetryDeadLetterPageList,
|
||||||
apiParams: {
|
apiParams: {
|
||||||
page: 1,
|
page: 1,
|
||||||
size: 10
|
size: 10,
|
||||||
|
groupName: null,
|
||||||
|
sceneName: null
|
||||||
// if you want to use the searchParams in Form, you need to define the following properties, and the value is null
|
// if you want to use the searchParams in Form, you need to define the following properties, and the value is null
|
||||||
// the value can not be undefined, otherwise the property in Form will not be reactive
|
// the value can not be undefined, otherwise the property in Form will not be reactive
|
||||||
},
|
},
|
||||||
@ -191,6 +193,7 @@ async function rollback(row: Api.RetryDeadLetter.DeadLetter) {
|
|||||||
v-model:columns="columnChecks"
|
v-model:columns="columnChecks"
|
||||||
:disabled-delete="checkedRowKeys.length === 0"
|
:disabled-delete="checkedRowKeys.length === 0"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
:show-add="false"
|
||||||
@add="handleAdd"
|
@add="handleAdd"
|
||||||
@delete="handleBatchDelete"
|
@delete="handleBatchDelete"
|
||||||
@refresh="getData"
|
@refresh="getData"
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
import { translateOptions2 } from '@/utils/common';
|
import { fetchGetAllGroupNameList } from '@/service/api';
|
||||||
import { fetchGetAllGroupNameList, fetchGetRetrySceneList } from '@/service/api';
|
import SelectGroup from '@/components/common/select-group.vue';
|
||||||
|
import SelectScene from '@/components/common/select-scene.vue';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'RetryDeadLetterSearch'
|
name: 'RetryDeadLetterSearch'
|
||||||
@ -19,24 +20,12 @@ const model = defineModel<Api.RetryDeadLetter.RetryDeadLetterSearchParams>('mode
|
|||||||
|
|
||||||
/** 组列表 */
|
/** 组列表 */
|
||||||
const groupNameList = ref<string[]>([]);
|
const groupNameList = ref<string[]>([]);
|
||||||
/** 场景列表 */
|
|
||||||
const sceneNameList = ref<string[]>([]);
|
|
||||||
|
|
||||||
async function getGroupNameList() {
|
async function getGroupNameList() {
|
||||||
const res = await fetchGetAllGroupNameList();
|
const res = await fetchGetAllGroupNameList();
|
||||||
groupNameList.value = res.data as string[];
|
groupNameList.value = res.data as string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleGroupNameUpdate(groupName: string) {
|
|
||||||
if (groupName) {
|
|
||||||
const res = await fetchGetRetrySceneList({ groupName });
|
|
||||||
sceneNameList.value = res.data!.map((scene: Api.RetryScene.Scene) => scene.sceneName);
|
|
||||||
} else {
|
|
||||||
model.value.sceneName = '';
|
|
||||||
sceneNameList.value = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function reset() {
|
function reset() {
|
||||||
emit('reset');
|
emit('reset');
|
||||||
}
|
}
|
||||||
@ -52,24 +41,11 @@ onMounted(() => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<SearchForm :model="model" @search="search" @reset="reset">
|
<SearchForm :model="model" @search="search" @reset="reset">
|
||||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryDeadLetter.groupName')" path="groupName" class="py-1 pr-24px">
|
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryLog.groupName')" path="groupName" class="pr-24px">
|
||||||
<NSelect
|
<SelectGroup v-model:value="model.groupName" />
|
||||||
v-model:value="model.groupName"
|
|
||||||
:placeholder="$t('page.retryDeadLetter.form.groupName')"
|
|
||||||
:options="translateOptions2(groupNameList)"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
@update:value="handleGroupNameUpdate"
|
|
||||||
/>
|
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
|
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryLog.sceneName')" path="sceneName" class="pr-24px">
|
||||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryDeadLetter.sceneName')" path="sceneName" class="py-1 pr-24px">
|
<SelectScene v-model:value="model.sceneName" :group-name="model.groupName as string" />
|
||||||
<NSelect
|
|
||||||
v-model:value="model.sceneName"
|
|
||||||
:placeholder="$t('page.retryDeadLetter.form.sceneName')"
|
|
||||||
:options="translateOptions2(sceneNameList)"
|
|
||||||
clearable
|
|
||||||
/>
|
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
</SearchForm>
|
</SearchForm>
|
||||||
</template>
|
</template>
|
||||||
|
@ -184,6 +184,7 @@ async function loadRetryInfo(row: Api.RetryLog.RetryLog) {
|
|||||||
v-model:columns="columnChecks"
|
v-model:columns="columnChecks"
|
||||||
:disabled-delete="checkedRowKeys.length === 0"
|
:disabled-delete="checkedRowKeys.length === 0"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
:show-add="false"
|
||||||
@delete="handleBatchDelete"
|
@delete="handleBatchDelete"
|
||||||
@refresh="getData"
|
@refresh="getData"
|
||||||
/>
|
/>
|
||||||
|
@ -28,7 +28,7 @@ function search() {
|
|||||||
<template>
|
<template>
|
||||||
<SearchForm :model="model" @search="search" @reset="reset">
|
<SearchForm :model="model" @search="search" @reset="reset">
|
||||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryLog.groupName')" path="groupName" class="pr-24px">
|
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryLog.groupName')" path="groupName" class="pr-24px">
|
||||||
<SelectGroup v-model="model.groupName" />
|
<SelectGroup v-model:value="model.groupName" />
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryLog.sceneName')" path="sceneName" class="pr-24px">
|
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryLog.sceneName')" path="sceneName" class="pr-24px">
|
||||||
<SelectScene v-model:value="model.sceneName" :group-name="model.groupName as string" />
|
<SelectScene v-model:value="model.sceneName" :group-name="model.groupName as string" />
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="tsx">
|
<script setup lang="tsx">
|
||||||
import { NButton, NTag } from 'naive-ui';
|
import { NButton, NPopconfirm, NTag } from 'naive-ui';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useBoolean } from '@sa/hooks';
|
import { useBoolean } from '@sa/hooks';
|
||||||
import { fetchGetRetryScenePageList, fetchUpdateSceneStatus } from '@/service/api';
|
import { fetchGetRetryScenePageList, fetchUpdateSceneStatus } from '@/service/api';
|
||||||
@ -9,9 +9,11 @@ import { useTable, useTableOperate } from '@/hooks/common/table';
|
|||||||
import { DelayLevel, backOffRecord, routeKeyRecord } from '@/constants/business';
|
import { DelayLevel, backOffRecord, routeKeyRecord } from '@/constants/business';
|
||||||
import StatusSwitch from '@/components/common/status-switch.vue';
|
import StatusSwitch from '@/components/common/status-switch.vue';
|
||||||
import { downloadFetch } from '@/utils/download';
|
import { downloadFetch } from '@/utils/download';
|
||||||
|
import { useAuth } from '@/hooks/business/auth';
|
||||||
import SceneOperateDrawer from './modules/scene-operate-drawer.vue';
|
import SceneOperateDrawer from './modules/scene-operate-drawer.vue';
|
||||||
import SceneSearch from './modules/scene-search.vue';
|
import SceneSearch from './modules/scene-search.vue';
|
||||||
import SceneDetailDrawer from './modules/scene-detail-drawer.vue';
|
import SceneDetailDrawer from './modules/scene-detail-drawer.vue';
|
||||||
|
const { hasAuth } = useAuth();
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
|
|
||||||
@ -186,8 +188,17 @@ function triggerInterval(backOff: number, maxRetryCount: number) {
|
|||||||
return desc.substring(1, desc.length);
|
return desc.substring(1, desc.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function body(): Api.RetryScene.ExportScene {
|
||||||
|
return {
|
||||||
|
sceneIds: checkedRowKeys.value,
|
||||||
|
groupName: searchParams.groupName,
|
||||||
|
sceneName: searchParams.sceneName,
|
||||||
|
sceneStatus: searchParams.sceneStatus
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
function handleExport() {
|
function handleExport() {
|
||||||
downloadFetch('/scene-config/export', checkedRowKeys.value, $t('page.retryScene.title'));
|
downloadFetch('/scene-config/export', body(), $t('page.retryScene.title'));
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -212,13 +223,24 @@ function handleExport() {
|
|||||||
>
|
>
|
||||||
<template #addAfter>
|
<template #addAfter>
|
||||||
<FileUpload action="/scene-config/import" accept="application/json" />
|
<FileUpload action="/scene-config/import" accept="application/json" />
|
||||||
<NButton size="small" ghost type="primary" @click="handleExport">
|
<NPopconfirm @positive-click="handleExport">
|
||||||
|
<template #trigger>
|
||||||
|
<NButton size="small" ghost type="primary" :disabled="checkedRowKeys.length === 0 && hasAuth('R_USER')">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<IconPajamasExport class="text-icon" />
|
<IconPajamasExport class="text-icon" />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('common.export') }}
|
{{ $t('common.export') }}
|
||||||
</NButton>
|
</NButton>
|
||||||
</template>
|
</template>
|
||||||
|
<template #default>
|
||||||
|
{{
|
||||||
|
checkedRowKeys.length === 0
|
||||||
|
? $t('common.exportAll')
|
||||||
|
: $t('common.exportPar', { num: checkedRowKeys.length })
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</NPopconfirm>
|
||||||
|
</template>
|
||||||
</TableHeaderOperation>
|
</TableHeaderOperation>
|
||||||
</template>
|
</template>
|
||||||
<NDataTable
|
<NDataTable
|
||||||
|
@ -330,6 +330,7 @@ watch(
|
|||||||
<NGrid cols="2 s:1 m:2" responsive="screen" x-gap="20">
|
<NGrid cols="2 s:1 m:2" responsive="screen" x-gap="20">
|
||||||
<NGi>
|
<NGi>
|
||||||
<NFormItem :label="$t('page.retryScene.executorTimeout')" path="executorTimeout">
|
<NFormItem :label="$t('page.retryScene.executorTimeout')" path="executorTimeout">
|
||||||
|
<NInputGroup>
|
||||||
<NInputNumber
|
<NInputNumber
|
||||||
v-model:value="model.executorTimeout"
|
v-model:value="model.executorTimeout"
|
||||||
:min="1"
|
:min="1"
|
||||||
@ -337,10 +338,13 @@ watch(
|
|||||||
:placeholder="$t('page.retryScene.form.executorTimeout')"
|
:placeholder="$t('page.retryScene.form.executorTimeout')"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
|
<NInputGroupLabel>{{ $t('common.second') }}</NInputGroupLabel>
|
||||||
|
</NInputGroup>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
</NGi>
|
</NGi>
|
||||||
<NGi>
|
<NGi>
|
||||||
<NFormItem :label="$t('page.retryScene.deadlineRequest')" path="deadlineRequest">
|
<NFormItem :label="$t('page.retryScene.deadlineRequest')" path="deadlineRequest">
|
||||||
|
<NInputGroup>
|
||||||
<NInputNumber
|
<NInputNumber
|
||||||
v-model:value="model.deadlineRequest"
|
v-model:value="model.deadlineRequest"
|
||||||
:min="100"
|
:min="100"
|
||||||
@ -348,6 +352,8 @@ watch(
|
|||||||
:placeholder="$t('page.retryScene.form.deadlineRequest')"
|
:placeholder="$t('page.retryScene.form.deadlineRequest')"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
|
<NInputGroupLabel>{{ $t('common.millisecond') }}</NInputGroupLabel>
|
||||||
|
</NInputGroup>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
</NGi>
|
</NGi>
|
||||||
</NGrid>
|
</NGrid>
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
import SelectGroup from '@/components/common/select-group.vue';
|
import SelectGroup from '@/components/common/select-group.vue';
|
||||||
import SelectScene from '@/components/common/select-scene.vue';
|
import { translateOptions } from '@/utils/common';
|
||||||
|
import { enableStatusNumberOptions } from '@/constants/business';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'SceneSearch'
|
name: 'SceneSearch'
|
||||||
@ -28,10 +29,17 @@ function search() {
|
|||||||
<template>
|
<template>
|
||||||
<SearchForm :model="model" @search="search" @reset="reset">
|
<SearchForm :model="model" @search="search" @reset="reset">
|
||||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryScene.groupName')" path="groupName" class="pr-24px">
|
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryScene.groupName')" path="groupName" class="pr-24px">
|
||||||
<SelectGroup v-model="model.groupName" />
|
<SelectGroup v-model:value="model.groupName" />
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryScene.sceneName')" path="sceneName" class="pr-24px">
|
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryScene.sceneName')" path="sceneName" class="pr-24px">
|
||||||
<SelectScene v-model:value="model.sceneName" :group-name="model.groupName as string" />
|
<NInput v-model:value="model.sceneName" :placeholder="$t('page.retryScene.form.sceneName')" />
|
||||||
|
</NFormItemGi>
|
||||||
|
<NFormItemGi span="24 s:12 m:6" :label="$t('page.retryScene.sceneStatus')" path="sceneStatus" class="pr-24px">
|
||||||
|
<NSelect
|
||||||
|
v-model:value="model.sceneStatus"
|
||||||
|
:placeholder="$t('page.jobTask.form.jobStatus')"
|
||||||
|
:options="translateOptions(enableStatusNumberOptions)"
|
||||||
|
/>
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
</SearchForm>
|
</SearchForm>
|
||||||
</template>
|
</template>
|
||||||
|
@ -14,7 +14,6 @@ import { useAppStore } from '@/store/modules/app';
|
|||||||
import { useTable, useTableOperate } from '@/hooks/common/table';
|
import { useTable, useTableOperate } from '@/hooks/common/table';
|
||||||
import { retryTaskStatusTypeRecord, retryTaskTypeRecord } from '@/constants/business';
|
import { retryTaskStatusTypeRecord, retryTaskTypeRecord } from '@/constants/business';
|
||||||
import { tagColor } from '@/utils/common';
|
import { tagColor } from '@/utils/common';
|
||||||
import CustomerTableHeaderOperation from './modules/customer-table-header-operation.vue';
|
|
||||||
import RetryTaskOperateDrawer from './modules/retry-task-operate-drawer.vue';
|
import RetryTaskOperateDrawer from './modules/retry-task-operate-drawer.vue';
|
||||||
import RetryTaskBatchAddDrawer from './modules/retry-task-batch-add-drawer.vue';
|
import RetryTaskBatchAddDrawer from './modules/retry-task-batch-add-drawer.vue';
|
||||||
import RetryTaskSearch from './modules/retry-task-search.vue';
|
import RetryTaskSearch from './modules/retry-task-search.vue';
|
||||||
@ -311,15 +310,23 @@ async function updateRetryTaskStatus(id: number, groupName: string, retryStatus:
|
|||||||
header-class="view-card-header"
|
header-class="view-card-header"
|
||||||
>
|
>
|
||||||
<template #header-extra>
|
<template #header-extra>
|
||||||
<CustomerTableHeaderOperation
|
<TableHeaderOperation
|
||||||
v-model:columns="columnChecks"
|
v-model:columns="columnChecks"
|
||||||
:disabled-delete="checkedRowKeys.length === 0"
|
:disabled-delete="checkedRowKeys.length === 0"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@add="handleAdd"
|
@add="handleAdd"
|
||||||
@batch-add="handleBatchAdd"
|
|
||||||
@delete="handleBatchDelete"
|
@delete="handleBatchDelete"
|
||||||
@refresh="getData"
|
@refresh="getData"
|
||||||
/>
|
>
|
||||||
|
<template #addAfter>
|
||||||
|
<NButton size="small" ghost type="primary" @click="handleBatchAdd">
|
||||||
|
<template #icon>
|
||||||
|
<icon-ic-round-plus class="text-icon" />
|
||||||
|
</template>
|
||||||
|
{{ $t('common.batchAdd') }}
|
||||||
|
</NButton>
|
||||||
|
</template>
|
||||||
|
</TableHeaderOperation>
|
||||||
</template>
|
</template>
|
||||||
<NDataTable
|
<NDataTable
|
||||||
v-model:checked-row-keys="checkedRowKeys"
|
v-model:checked-row-keys="checkedRowKeys"
|
||||||
|
@ -1,86 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
defineOptions({
|
|
||||||
name: 'CustomerTableHeaderOperation'
|
|
||||||
});
|
|
||||||
|
|
||||||
interface Props {
|
|
||||||
itemAlign?: NaiveUI.Align;
|
|
||||||
disabledDelete?: boolean;
|
|
||||||
loading?: boolean;
|
|
||||||
showDelete?: boolean;
|
|
||||||
showAdd?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
withDefaults(defineProps<Props>(), {
|
|
||||||
showDelete: true,
|
|
||||||
showAdd: true
|
|
||||||
});
|
|
||||||
|
|
||||||
interface Emits {
|
|
||||||
(e: 'add'): void;
|
|
||||||
(e: 'batchAdd'): void;
|
|
||||||
(e: 'delete'): void;
|
|
||||||
(e: 'refresh'): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
const emit = defineEmits<Emits>();
|
|
||||||
|
|
||||||
const columns = defineModel<NaiveUI.TableColumnCheck[]>('columns', {
|
|
||||||
default: () => []
|
|
||||||
});
|
|
||||||
|
|
||||||
function add() {
|
|
||||||
emit('add');
|
|
||||||
}
|
|
||||||
|
|
||||||
function batchAdd() {
|
|
||||||
emit('batchAdd');
|
|
||||||
}
|
|
||||||
|
|
||||||
function batchDelete() {
|
|
||||||
emit('delete');
|
|
||||||
}
|
|
||||||
|
|
||||||
function refresh() {
|
|
||||||
emit('refresh');
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<NSpace :align="itemAlign" wrap justify="end" class="lt-sm:w-200px">
|
|
||||||
<slot name="default">
|
|
||||||
<NButton v-if="showAdd" size="small" ghost type="primary" @click="add">
|
|
||||||
<template #icon>
|
|
||||||
<icon-ic-round-plus class="text-icon" />
|
|
||||||
</template>
|
|
||||||
{{ $t('common.add') }}
|
|
||||||
</NButton>
|
|
||||||
<NButton v-if="showAdd" size="small" ghost type="primary" @click="batchAdd">
|
|
||||||
<template #icon>
|
|
||||||
<icon-ic-round-plus class="text-icon" />
|
|
||||||
</template>
|
|
||||||
{{ $t('common.batchAdd') }}
|
|
||||||
</NButton>
|
|
||||||
<NPopconfirm v-if="showDelete" @positive-click="batchDelete">
|
|
||||||
<template #trigger>
|
|
||||||
<NButton size="small" ghost type="error" :disabled="disabledDelete">
|
|
||||||
<template #icon>
|
|
||||||
<icon-ic-round-delete class="text-icon" />
|
|
||||||
</template>
|
|
||||||
{{ $t('common.batchDelete') }}
|
|
||||||
</NButton>
|
|
||||||
</template>
|
|
||||||
{{ $t('common.confirmDelete') }}
|
|
||||||
</NPopconfirm>
|
|
||||||
</slot>
|
|
||||||
<NButton size="small" @click="refresh">
|
|
||||||
<template #icon>
|
|
||||||
<icon-mdi-refresh class="text-icon" :class="{ 'animate-spin': loading }" />
|
|
||||||
</template>
|
|
||||||
{{ $t('common.refresh') }}
|
|
||||||
</NButton>
|
|
||||||
<TableColumnSetting v-model:columns="columns" />
|
|
||||||
</NSpace>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
@ -14,6 +14,7 @@ import { triggerTypeRecord } from '@/constants/business';
|
|||||||
import StatusSwitch from '@/components/common/status-switch.vue';
|
import StatusSwitch from '@/components/common/status-switch.vue';
|
||||||
import { tagColor } from '@/utils/common';
|
import { tagColor } from '@/utils/common';
|
||||||
import { useAuth } from '@/hooks/business/auth';
|
import { useAuth } from '@/hooks/business/auth';
|
||||||
|
import { downloadFetch } from '@/utils/download';
|
||||||
import WorkflowSearch from './modules/workflow-search.vue';
|
import WorkflowSearch from './modules/workflow-search.vue';
|
||||||
const { hasAuth } = useAuth();
|
const { hasAuth } = useAuth();
|
||||||
|
|
||||||
@ -247,6 +248,10 @@ async function execute(id: string) {
|
|||||||
getData();
|
getData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleExport() {
|
||||||
|
downloadFetch('/workflow/export', checkedRowKeys.value, $t('page.workflow.title'));
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -268,7 +273,28 @@ async function execute(id: string) {
|
|||||||
@add="handleAdd"
|
@add="handleAdd"
|
||||||
@delete="handleBatchDelete"
|
@delete="handleBatchDelete"
|
||||||
@refresh="getData"
|
@refresh="getData"
|
||||||
/>
|
>
|
||||||
|
<template #addAfter>
|
||||||
|
<FileUpload action="/workflow/import" accept="application/json" />
|
||||||
|
<NPopconfirm @positive-click="handleExport">
|
||||||
|
<template #trigger>
|
||||||
|
<NButton size="small" ghost type="primary" :disabled="checkedRowKeys.length === 0 && hasAuth('R_USER')">
|
||||||
|
<template #icon>
|
||||||
|
<IconPajamasExport class="text-icon" />
|
||||||
|
</template>
|
||||||
|
{{ $t('common.export') }}
|
||||||
|
</NButton>
|
||||||
|
</template>
|
||||||
|
<template #default>
|
||||||
|
{{
|
||||||
|
checkedRowKeys.length === 0
|
||||||
|
? $t('common.exportAll')
|
||||||
|
: $t('common.exportPar', { num: checkedRowKeys.length })
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</NPopconfirm>
|
||||||
|
</template>
|
||||||
|
</TableHeaderOperation>
|
||||||
</template>
|
</template>
|
||||||
<NDataTable
|
<NDataTable
|
||||||
v-model:checked-row-keys="checkedRowKeys"
|
v-model:checked-row-keys="checkedRowKeys"
|
||||||
|
Loading…
Reference in New Issue
Block a user