diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-datasource/src/main/java/org/dromara/visor/framework/datasource/configuration/OrionDataSourceAutoConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-datasource/src/main/java/org/dromara/visor/framework/datasource/configuration/OrionDataSourceAutoConfiguration.java index 560526ed..5d21efdb 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-datasource/src/main/java/org/dromara/visor/framework/datasource/configuration/OrionDataSourceAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-datasource/src/main/java/org/dromara/visor/framework/datasource/configuration/OrionDataSourceAutoConfiguration.java @@ -51,7 +51,7 @@ public class OrionDataSourceAutoConfiguration { * @return druid 广告过滤器 */ @Bean - @ConditionalOnProperty(name = "spring.datasource.druid.web-stat-filter.enabled", havingValue = "true") + @ConditionalOnProperty(value = "spring.datasource.druid.web-stat-filter.enabled", havingValue = "true") public FilterRegistrationBean druidAdRemoveFilterFilter(DruidStatProperties properties) { // 获取 druid web 监控页面的参数 DruidStatProperties.StatViewServlet config = properties.getStatViewServlet(); diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-swagger/src/main/java/org/dromara/visor/framework/swagger/configuration/OrionSwaggerAutoConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-swagger/src/main/java/org/dromara/visor/framework/swagger/configuration/OrionSwaggerAutoConfiguration.java index c1d14fc2..e991d915 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-swagger/src/main/java/org/dromara/visor/framework/swagger/configuration/OrionSwaggerAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-swagger/src/main/java/org/dromara/visor/framework/swagger/configuration/OrionSwaggerAutoConfiguration.java @@ -61,7 +61,7 @@ import java.util.Optional; */ @ConditionalOnClass({OpenAPI.class}) @EnableConfigurationProperties(SwaggerConfig.class) -@ConditionalOnProperty(name = "springdoc.api-docs.enabled", havingValue = "true") +@ConditionalOnProperty(value = "springdoc.api-docs.enabled", havingValue = "true") @AutoConfiguration @AutoConfigureOrder(AutoConfigureOrderConst.FRAMEWORK_SWAGGER) public class OrionSwaggerAutoConfiguration { diff --git a/orion-visor-ui/src/components/app/app-footer/index.vue b/orion-visor-ui/src/components/app/app-footer/index.vue index 02f6aa5e..448efe08 100644 --- a/orion-visor-ui/src/components/app/app-footer/index.vue +++ b/orion-visor-ui/src/components/app/app-footer/index.vue @@ -9,7 +9,8 @@ v{{ version }} - Copyright 2023 - {{ new Date().getFullYear() }} Jiahang Li, All rights reserved. + Copyright 2023 - {{ new Date().getFullYear() }} Dromara, All rights reserved. Designed by + Jiahang Li. diff --git a/orion-visor-ui/src/components/system/menu/grant-table/index.vue b/orion-visor-ui/src/components/system/menu/grant-table/index.vue index a22eb78a..895e14e3 100644 --- a/orion-visor-ui/src/components/system/menu/grant-table/index.vue +++ b/orion-visor-ui/src/components/system/menu/grant-table/index.vue @@ -22,7 +22,13 @@ - + + + {{ childrenMenu.name }} (必选) + + + {{ childrenMenu.name }} @@ -73,6 +79,7 @@ import type { MenuQueryResponse } from '@/api/system/menu'; import { useCacheStore } from '@/store'; import { ref, watch } from 'vue'; + import { DEFAULT_ROUTE_NAME } from '@/router/constants'; import { findNode, flatNodeKeys, flatNodes } from '@/utils/tree'; const cacheStore = useCacheStore(); diff --git a/orion-visor-ui/src/components/system/menu/tree-selector/index.vue b/orion-visor-ui/src/components/system/menu/tree-selector/index.vue index 77adc16b..c34951e0 100644 --- a/orion-visor-ui/src/components/system/menu/tree-selector/index.vue +++ b/orion-visor-ui/src/components/system/menu/tree-selector/index.vue @@ -39,7 +39,11 @@ return props.modelValue; }, set(e) { - emits('update:modelValue', e); + if (e) { + emits('update:modelValue', e); + } else { + emits('update:modelValue', null); + } } }); diff --git a/orion-visor-ui/src/components/user/role/selector/index.vue b/orion-visor-ui/src/components/user/role/selector/index.vue index 64add1b7..b9f66e3a 100644 --- a/orion-visor-ui/src/components/user/role/selector/index.vue +++ b/orion-visor-ui/src/components/user/role/selector/index.vue @@ -40,7 +40,15 @@ return props.modelValue; }, set(e) { - emits('update:modelValue', e); + if (e) { + emits('update:modelValue', e); + } else { + if (props.multiple) { + emits('update:modelValue', []); + } else { + emits('update:modelValue', null); + } + } } }); const optionData = ref>([]); diff --git a/orion-visor-ui/src/components/user/user/selector/index.vue b/orion-visor-ui/src/components/user/user/selector/index.vue index fa1aa0fc..b1d512ae 100644 --- a/orion-visor-ui/src/components/user/user/selector/index.vue +++ b/orion-visor-ui/src/components/user/user/selector/index.vue @@ -39,7 +39,15 @@ return props.modelValue; }, set(e) { - emits('update:modelValue', e); + if (e) { + emits('update:modelValue', e); + } else { + if (props.multiple) { + emits('update:modelValue', []); + } else { + emits('update:modelValue', null); + } + } } }); const optionData = ref>([]); diff --git a/orion-visor-ui/src/views/asset/grant/index.vue b/orion-visor-ui/src/views/asset/grant/index.vue index ee9f0f01..348099e6 100644 --- a/orion-visor-ui/src/views/asset/grant/index.vue +++ b/orion-visor-ui/src/views/asset/grant/index.vue @@ -43,7 +43,7 @@ // 跳转到指定页 onBeforeMount(() => { - const key = route.query.key; + const key = route.query.key as string; if (key) { activeKey.value = Number(key); } diff --git a/orion-visor-ui/src/views/exec/batch-upload/index.vue b/orion-visor-ui/src/views/exec/batch-upload/index.vue index 7c67d048..3517afea 100644 --- a/orion-visor-ui/src/views/exec/batch-upload/index.vue +++ b/orion-visor-ui/src/views/exec/batch-upload/index.vue @@ -30,12 +30,12 @@ // 跳转日志 onMounted(async () => { - const idParam = route.query.id; - const keyParam = route.query.key; + const idParam = route.query.id as string; + const keyParam = route.query.key as string; if (idParam) { - await panel.value?.openLog(Number.parseInt(idParam as string)); + await panel.value?.openLog(Number.parseInt(idParam)); } else if (keyParam) { - await panel.value?.openLog(Number.parseInt(keyParam as string)); + await panel.value?.openLog(Number.parseInt(keyParam)); } }); diff --git a/orion-visor-ui/src/views/exec/exec-command-log/components/exec-command-host-log-table.vue b/orion-visor-ui/src/views/exec/exec-command-log/components/exec-command-host-log-table.vue index 65081a12..38673bbd 100644 --- a/orion-visor-ui/src/views/exec/exec-command-log/components/exec-command-host-log-table.vue +++ b/orion-visor-ui/src/views/exec/exec-command-log/components/exec-command-host-log-table.vue @@ -3,7 +3,7 @@ { - return isNumber(record.exitCode) ? record.exitCode : '-'; - }, - }, { - title: '执行状态', - dataIndex: 'status', - slotName: 'status', - align: 'left', - width: 118, - }, { - title: '错误信息', - dataIndex: 'errorMessage', - slotName: 'errorMessage', - align: 'left', - ellipsis: true, - tooltip: true, - width: 168, - }, { - title: '执行时间', - dataIndex: 'startTime', - slotName: 'startTime', - align: 'left', - width: 190, - }, { - title: '操作', - slotName: 'handle', - width: 258, - align: 'center', - fixed: 'right', - }, -] as TableColumnData[]; - -export default columns; diff --git a/orion-visor-ui/src/views/exec/exec-command-log/types/table.columns.ts b/orion-visor-ui/src/views/exec/exec-command-log/types/table.columns.ts index 4be4187d..e447b6af 100644 --- a/orion-visor-ui/src/views/exec/exec-command-log/types/table.columns.ts +++ b/orion-visor-ui/src/views/exec/exec-command-log/types/table.columns.ts @@ -1,6 +1,8 @@ import type { TableColumnData } from '@arco-design/web-vue/es/table/interface'; +import { isNumber } from '@/utils/is'; -const columns = [ +// 表格列 +export const tableColumns = [ { title: 'id', dataIndex: 'id', @@ -51,4 +53,56 @@ const columns = [ }, ] as TableColumnData[]; -export default columns; +// 主机列 +export const hostColumns = [ + { + title: 'id', + dataIndex: 'id', + slotName: 'id', + width: 100, + align: 'left', + fixed: 'left', + }, { + title: '执行主机', + dataIndex: 'hostName', + slotName: 'hostName', + align: 'left', + ellipsis: true, + tooltip: true, + }, { + title: '退出码', + dataIndex: 'exitCode', + slotName: 'exitCode', + align: 'left', + width: 118, + render: ({ record }) => { + return isNumber(record.exitCode) ? record.exitCode : '-'; + }, + }, { + title: '执行状态', + dataIndex: 'status', + slotName: 'status', + align: 'left', + width: 118, + }, { + title: '错误信息', + dataIndex: 'errorMessage', + slotName: 'errorMessage', + align: 'left', + ellipsis: true, + tooltip: true, + width: 168, + }, { + title: '执行时间', + dataIndex: 'startTime', + slotName: 'startTime', + align: 'left', + width: 190, + }, { + title: '操作', + slotName: 'handle', + width: 258, + align: 'center', + fixed: 'right', + }, +] as TableColumnData[]; diff --git a/orion-visor-ui/src/views/exec/exec-command/index.vue b/orion-visor-ui/src/views/exec/exec-command/index.vue index 4f67425a..15ab7b37 100644 --- a/orion-visor-ui/src/views/exec/exec-command/index.vue +++ b/orion-visor-ui/src/views/exec/exec-command/index.vue @@ -60,12 +60,12 @@ // 跳转日志 onMounted(async () => { - const idParam = route.query.id; - const keyParam = route.query.key; + const idParam = route.query.id as string; + const keyParam = route.query.key as string; if (idParam) { - await openLogWithId(Number.parseInt(idParam as string)); + await openLogWithId(Number.parseInt(idParam)); } else if (keyParam) { - await openLogWithId(Number.parseInt(keyParam as string)); + await openLogWithId(Number.parseInt(keyParam)); } }); diff --git a/orion-visor-ui/src/views/exec/exec-job-log-view/index.vue b/orion-visor-ui/src/views/exec/exec-job-log-view/index.vue index 7c1aab16..048fe2e4 100644 --- a/orion-visor-ui/src/views/exec/exec-job-log-view/index.vue +++ b/orion-visor-ui/src/views/exec/exec-job-log-view/index.vue @@ -36,9 +36,9 @@ }; onMounted(() => { - const idParam = route.query.id; + const idParam = route.query.id as string; if (idParam) { - init(Number.parseInt(idParam as string)); + init(Number.parseInt(idParam)); } }); diff --git a/orion-visor-ui/src/views/exec/exec-job-log/components/exec-job-host-log-table.vue b/orion-visor-ui/src/views/exec/exec-job-log/components/exec-job-host-log-table.vue index 718c656a..d412907d 100644 --- a/orion-visor-ui/src/views/exec/exec-job-log/components/exec-job-host-log-table.vue +++ b/orion-visor-ui/src/views/exec/exec-job-log/components/exec-job-host-log-table.vue @@ -3,7 +3,7 @@ { // 打开默认 tab let openTab; - const tab = route.query.tab; + const tab = route.query.tab as string; if (tab) { openTab = Object.values(TerminalTabs).find(s => s.key === tab); } @@ -167,9 +167,9 @@ // 加载主机 await loadHosts(); // 默认连接主机 - const connect = route.query.connect; + const connect = route.query.connect as string; if (connect) { - const connectHostId = Number.parseInt(connect as string); + const connectHostId = Number.parseInt(connect); const connectHost = hosts.hostList.find(s => s.id === connectHostId); // 打开连接 if (connectHost) { diff --git a/orion-visor-ui/src/views/system/setting/index.vue b/orion-visor-ui/src/views/system/setting/index.vue index d5f0f35b..b9d896d1 100644 --- a/orion-visor-ui/src/views/system/setting/index.vue +++ b/orion-visor-ui/src/views/system/setting/index.vue @@ -35,9 +35,9 @@ // 跳转到指定页 onBeforeMount(() => { - const key = route.query.key; + const key = route.query.key as string; if (key) { - activeKey.value = key as string; + activeKey.value = key; } }); diff --git a/sql/init-4-data.sql b/sql/init-4-data.sql index 8326e9bf..1da4cade 100644 --- a/sql/init-4-data.sql +++ b/sql/init-4-data.sql @@ -324,7 +324,8 @@ INSERT INTO `dict_value` VALUES (431, 61, 'updatePasswordReason', 'NEW', '为了 INSERT INTO `dict_value` VALUES (432, 2, 'operatorLogType', 'exec-job:update-exec-user', '修改计划执行用户', '{}', 45, '2024-12-13 00:17:03', '2024-12-13 00:17:03', '1', '1', 0); -- 菜单配置 -INSERT INTO `system_menu` VALUES (1, 0, '工作台', NULL, 1, 10, 1, 1, 1, 0, 'IconComputer', NULL, 'workplace', '2023-07-28 10:51:50', '2024-08-11 00:05:44', '1', '1', 0); +INSERT INTO `system_menu` VALUES (1, 0, '仪表盘', NULL, 1, 10, 1, 1, 1, 0, 'IconDashboard', NULL, 'dashboard', '2023-07-28 10:51:50', '2024-08-11 00:05:44', '1', '1', 0); +INSERT INTO `system_menu` VALUES (2, 1, '工作台', NULL, 2, 10, 1, 1, 1, 0, 'IconComputer', NULL, 'workplace', '2023-07-28 10:51:50', '2024-08-11 00:05:44', '1', '1', 0); INSERT INTO `system_menu` VALUES (5, 0, '用户管理', NULL, 1, 700, 1, 1, 1, 0, 'icon-user', NULL, 'userModule', '2023-07-28 10:55:38', '2024-06-17 20:45:29', '1', '1', 0); INSERT INTO `system_menu` VALUES (8, 0, '项目地址', NULL, 1, 1000, 1, 1, 1, 0, 'icon-link', 'https://visor.dromara.org', '', '2023-07-28 11:04:59', '2024-08-29 18:10:57', '1', '1', 0); INSERT INTO `system_menu` VALUES (10, 5, '角色管理', NULL, 2, 10, 1, 1, 1, 0, 'IconUserGroup', '', 'role', '2023-07-28 10:55:52', '2024-03-07 19:10:13', '1', '1', 0);