review code.
This commit is contained in:
0
docker/.gitkeep
Normal file
0
docker/.gitkeep
Normal file
@@ -26,6 +26,6 @@ public class Const implements com.orion.lang.constant.Const {
|
||||
|
||||
public static final Long ROOT_MENU_ID = 0L;
|
||||
|
||||
public static final Integer DEFAULT_SORT = 0;
|
||||
public static final Integer DEFAULT_SORT = 10;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
/**
|
||||
* If you use the template method for development, you can use the unplugin-vue-components plugin to enable on-demand loading support.
|
||||
* 按需引入
|
||||
* https://github.com/antfu/unplugin-vue-components
|
||||
* https://arco.design/vue/docs/start
|
||||
* Although the Pro project is full of imported components, this plugin will be used by default.
|
||||
* 虽然Pro项目中是全量引入组件,但此插件会默认使用。
|
||||
*/
|
||||
import Components from 'unplugin-vue-components/vite';
|
||||
import { ArcoResolver } from 'unplugin-vue-components/resolvers';
|
||||
|
||||
/**
|
||||
* 按需引入
|
||||
* https://github.com/antfu/unplugin-vue-components
|
||||
* https://arco.design/vue/docs/start
|
||||
* 虽然Pro项目中是全量引入组件,但此插件会默认使用。
|
||||
*/
|
||||
export default function configArcoResolverPlugin() {
|
||||
const arcoResolverPlugin = Components({
|
||||
dirs: [], // Avoid parsing src/components. 避免解析到src/components
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import { vitePluginForArco } from '@arco-plugins/vite-vue';
|
||||
|
||||
/**
|
||||
* Theme import
|
||||
* 样式按需引入
|
||||
* https://github.com/arco-design/arco-plugins/blob/main/packages/plugin-vite-vue/README.md
|
||||
* https://arco.design/vue/docs/start
|
||||
*/
|
||||
import { vitePluginForArco } from '@arco-plugins/vite-vue';
|
||||
|
||||
export default function configArcoStyleImportPlugin() {
|
||||
const arcoResolverPlugin = vitePluginForArco({});
|
||||
return arcoResolverPlugin;
|
||||
return vitePluginForArco({});
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
/**
|
||||
* Used to package and output gzip. Note that this does not work properly in Vite, the specific reason is still being investigated
|
||||
* gzip压缩
|
||||
* https://github.com/anncwb/vite-plugin-compression
|
||||
*/
|
||||
import type { Plugin } from 'vite';
|
||||
import compressPlugin from 'vite-plugin-compression';
|
||||
|
||||
/**
|
||||
* gzip压缩
|
||||
* https://github.com/anncwb/vite-plugin-compression
|
||||
*/
|
||||
export default function configCompressPlugin(
|
||||
compress: 'gzip' | 'brotli',
|
||||
deleteOriginFile = false
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import viteImagemin from 'vite-plugin-imagemin';
|
||||
|
||||
/**
|
||||
* Image resource files used to compress the output of the production environment
|
||||
* 图片压缩
|
||||
* https://github.com/anncwb/vite-plugin-imagemin
|
||||
*/
|
||||
import viteImagemin from 'vite-plugin-imagemin';
|
||||
|
||||
export default function configImageminPlugin() {
|
||||
const imageminPlugin = viteImagemin({
|
||||
gifsicle: {
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/**
|
||||
* Generation packaging analysis
|
||||
* 生成打包分析
|
||||
*/
|
||||
import visualizer from 'rollup-plugin-visualizer';
|
||||
import { isReportMode } from '../utils';
|
||||
|
||||
/**
|
||||
* 生成打包分析
|
||||
*/
|
||||
export default function configVisualizerPlugin() {
|
||||
if (isReportMode()) {
|
||||
return visualizer({
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/**
|
||||
* Whether to generate package preview
|
||||
* 是否生成打包报告
|
||||
*/
|
||||
export default {};
|
||||
|
||||
5
orion-ops-ui/src/assets/style/layout.less
Normal file
5
orion-ops-ui/src/assets/style/layout.less
Normal file
@@ -0,0 +1,5 @@
|
||||
.layout-container {
|
||||
background-color: var(--color-fill-2);
|
||||
padding: 16px 16px 0 16px;
|
||||
display: flex;
|
||||
}
|
||||
@@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<a-layout-footer class="footer">Orion Ops Pro</a-layout-footer>
|
||||
<a-layout-footer class="footer">
|
||||
<div class="footer-text">
|
||||
项目地址 <a target="_blank" href="https://github.com/lijiahangmax/orion-ops-pro">github</a> - <a
|
||||
target="_blank" href="https://gitee.com/lijiahangmax/orion-ops-pro">gitee</a>
|
||||
<a class="license" target="_blank" href="https://github.com/lijiahangmax/orion-ops-pro/blob/main/LICENSE">License - Apache 2.0</a>
|
||||
</div>
|
||||
</a-layout-footer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
@@ -13,5 +19,18 @@
|
||||
height: 40px;
|
||||
color: var(--color-text-2);
|
||||
text-align: center;
|
||||
|
||||
&-text {
|
||||
text-wrap: none;
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.license {
|
||||
display: inline-block;
|
||||
margin-left: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -179,5 +179,9 @@
|
||||
width: 28px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.arco-menu-title {
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { computed } from 'vue';
|
||||
import { RouteRecordRaw, RouteRecordNormalized } from 'vue-router';
|
||||
import usePermission from '@/hooks/permission';
|
||||
import { useAppStore } from '@/store';
|
||||
import { cloneDeep } from 'lodash';
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<span> {{ item.title }}{{ formatUnreadLength(item.key) }} </span>
|
||||
</template>
|
||||
<a-result v-if="!renderList.length" status="404">
|
||||
<template #subtitle> {{ $t('messageBox.noContent') }} </template>
|
||||
<template #subtitle> {{ $t('messageBox.noContent') }}</template>
|
||||
</a-result>
|
||||
<List
|
||||
:render-list="renderList"
|
||||
@@ -31,7 +31,7 @@
|
||||
setMessageStatus,
|
||||
MessageRecord,
|
||||
MessageListType,
|
||||
} from '@/api/message';
|
||||
} from '@/api/message/message';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import List from './list.vue';
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
title: string;
|
||||
avatar?: string;
|
||||
}
|
||||
|
||||
const { loading, setLoading } = useLoading(true);
|
||||
const messageType = ref('message');
|
||||
const { t } = useI18n();
|
||||
@@ -65,6 +66,7 @@
|
||||
title: t('messageBox.tab.title.todo'),
|
||||
},
|
||||
];
|
||||
|
||||
async function fetchSourceData() {
|
||||
setLoading(true);
|
||||
try {
|
||||
@@ -76,11 +78,13 @@
|
||||
setLoading(false);
|
||||
}
|
||||
}
|
||||
|
||||
async function readMessage(data: MessageListType) {
|
||||
const ids = data.map((item) => item.id);
|
||||
await setMessageStatus({ ids });
|
||||
fetchSourceData();
|
||||
}
|
||||
|
||||
const renderList = computed(() => {
|
||||
return messageData.messageList.filter(
|
||||
(item) => messageType.value === item.type
|
||||
@@ -116,12 +120,15 @@
|
||||
:deep(.arco-list-item-meta) {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
:deep(.arco-tabs-nav) {
|
||||
padding: 14px 0 12px 16px;
|
||||
border-bottom: 1px solid var(--color-neutral-3);
|
||||
}
|
||||
|
||||
:deep(.arco-tabs-content) {
|
||||
padding-top: 0;
|
||||
|
||||
.arco-result-subtitle {
|
||||
color: rgb(var(--gray-6));
|
||||
}
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
:ellipsis="{
|
||||
rows: 1,
|
||||
}"
|
||||
>{{ item.content }}</a-typography-paragraph
|
||||
>{{ item.content }}
|
||||
</a-typography-paragraph
|
||||
>
|
||||
<a-typography-text
|
||||
v-if="item.type === 'message'"
|
||||
@@ -72,7 +73,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { PropType } from 'vue';
|
||||
import { MessageRecord, MessageListType } from '@/api/message';
|
||||
import { MessageRecord, MessageListType } from '@/api/message/message';
|
||||
|
||||
const props = defineProps({
|
||||
renderList: {
|
||||
@@ -103,45 +104,57 @@
|
||||
min-height: 86px;
|
||||
border-bottom: 1px solid rgb(var(--gray-3));
|
||||
}
|
||||
|
||||
.arco-list-item-extra {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.arco-list-item-meta-content {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.item-wrap {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.time-text {
|
||||
font-size: 12px;
|
||||
color: rgb(var(--gray-6));
|
||||
}
|
||||
|
||||
.arco-empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.arco-list-footer {
|
||||
padding: 0;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
border-top: none;
|
||||
|
||||
.arco-space-item {
|
||||
width: 100%;
|
||||
border-right: 1px solid rgb(var(--gray-3));
|
||||
|
||||
&:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
}
|
||||
|
||||
.add-border-top {
|
||||
border-top: 1px solid rgb(var(--gray-3));
|
||||
}
|
||||
}
|
||||
|
||||
.footer-wrap {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.arco-typography {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.add-border {
|
||||
border-top: 1px solid rgb(var(--gray-3));
|
||||
}
|
||||
|
||||
@@ -95,6 +95,10 @@
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.tag-link {
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,10 +8,9 @@ import i18n from './locale';
|
||||
import directive from './directive';
|
||||
import './mock';
|
||||
import App from './App.vue';
|
||||
// Styles are imported via arco-plugin. See config/plugin/arcoStyleImport.ts in the directory for details
|
||||
// 样式通过 arco-plugin 插件导入。详见目录文件 config/plugin/arcoStyleImport.ts
|
||||
// https://arco.design/docs/designlab/use-theme-package
|
||||
// 样式通过 arco-plugin 插件导入 详见目录文件 config/plugin/arcoStyleImport.ts
|
||||
import '@/assets/style/global.less';
|
||||
import '@/assets/style/layout.less';
|
||||
import '@/api/interceptor';
|
||||
|
||||
const app = createApp(App);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isEmptyStr } from '@/utils/index';
|
||||
import { isEmptyStr } from './index';
|
||||
|
||||
/**
|
||||
* 获取 base64 实际数据
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="layout-container">
|
||||
<div class="left-side">
|
||||
<div class="panel">
|
||||
<Banner />
|
||||
@@ -61,12 +61,6 @@
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.container {
|
||||
background-color: var(--color-fill-2);
|
||||
padding: 16px 20px;
|
||||
padding-bottom: 0;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.left-side {
|
||||
flex: 1;
|
||||
@@ -140,7 +134,7 @@
|
||||
<style lang="less" scoped>
|
||||
// responsive
|
||||
.mobile {
|
||||
.container {
|
||||
.layout-container {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useUserStore } from '@/store';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import type { LoginData } from '@/api/user';
|
||||
import type { LoginRequest } from '@/api/user/auth';
|
||||
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
@@ -82,7 +82,7 @@
|
||||
setLoading(true);
|
||||
try {
|
||||
// 执行登陆
|
||||
await userStore.login(values as LoginData);
|
||||
await userStore.login(values as LoginRequest);
|
||||
// 跳转路由
|
||||
const { redirect, ...othersQuery } = router.currentRoute.value.query;
|
||||
router.push({
|
||||
|
||||
0
sql/常用sql.txt
Normal file
0
sql/常用sql.txt
Normal file
Reference in New Issue
Block a user