Browse Source

初始化

master
OUMYYE\Administrator 2 years ago
parent
commit
b8c7b1ffb2
  1. 4
      .env.development.example
  2. 4
      .env.production.example
  3. BIN
      public/imgs/bg.png
  4. 1
      public/vite.svg
  5. 8
      src/assets/style/element.scss
  6. 211
      src/assets/style/style.scss
  7. 5
      src/layout/Index.vue
  8. 14
      src/main.js
  9. 37
      src/router/index.js
  10. 35
      src/util/request.js
  11. 3
      src/views/Home.vue
  12. 2
      src/views/setting/system/environment.vue
  13. 4307
      yarn.lock.bak

4
.env.development.example

@ -0,0 +1,4 @@
NODE_ENV = 'development'
# 请求域名
VITE_APP_BASE_URL='http://127.0.0.1:8082/'

4
.env.production.example

@ -0,0 +1,4 @@
NODE_ENV = 'production'
# 请求域名
VITE_APP_BASE_URL='http://127.0.0.1:8082/'

BIN
public/imgs/bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 KiB

1
public/vite.svg

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

8
src/assets/style/element.scss

@ -1,8 +0,0 @@
// @/styles/element/index.scss
@forward "element-plus/theme-chalk/src/common/var.scss" with (
$colors: (
"primary": (
"base": #162582,
)
)
);

211
src/assets/style/style.scss

@ -1,211 +0,0 @@
:root:root {
--primary-color: #184DCF;
--van-blue: var(--primary-color);
--van-tabs-bottom-bar-width: 60px;
--background-color: #ededed;
}
body {
font-size: 14px;
font-family: PingFang-SC-Heavy;
margin: 0;
--header-height: 8.377vh;
}
#app {
margin: auto;
}
p {
margin: 0.5em 0;
}
svg {
width: 1em;
}
svg+span {
margin-left: .5em;
}
.none {
display: none;
}
.flex {
display: flex;
}
.flex-inline {
display: inline-flex;
}
.flex.v-center,
.flex-inline.v-center {
align-items: center;
}
.flex.center,
.flex-inline.center {
justify-content: center;
}
.flex.between,
.flex-inline.between {
justify-content: space-between;
}
.flex.end,
.flex-inline.end {
justify-content: flex-end;
}
.flex.wrap,
.flex-inline.wrap {
flex-wrap: wrap;
}
.flex.max-content,
.flex-inline.max-content {
width: max-content;
}
.flex.gap,
.flex-inline.gap {
gap: 0 8px;
}
.flex.gap-10 {
gap: 0 10px;
}
.flex.gap-16 {
gap: 0 16px;
}
.text-center {
text-align: center;
}
.text-nowrap {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.text-wrap {
white-space: pre-wrap;
}
.container {
padding: 18px 36px;
}
.pointer:hover {
cursor: pointer;
}
.relative {
position: relative;
}
.ml-4 {
margin-left: 4px;
}
.ml-8 {
margin-left: 8px;
}
.ml-10 {
margin-left: 10px;
}
.mr-4 {
margin-right: 4px;
}
.mr-8 {
margin-right: 8px;
}
.mr-10 {
margin-right: 10px;
}
.mr-20 {
margin-right: 20px;
}
.mt-8 {
margin-top: 8px;
}
.mt-10 {
margin-top: 10px;
}
.mt-20 {
margin-top: 20px;
}
.mb-8 {
margin-bottom: 8px;
}
.mb-10 {
margin-bottom: 10px;
}
.mb-20 {
margin-bottom: 20px;
}
.mb-40 {
margin-bottom: 40px;
}
.card {
background-color: #fff;
margin-bottom: 10px;
padding-top: 6px;
h2 {
color: #666;
font-size: 12px;
font-weight: normal;
margin: var(--van-cell-group-inset-padding);
padding: var(--van-cell-vertical-padding) 0;
}
header {
margin: var(--van-cell-group-inset-padding);
margin-top: 16px;
font-size: 17px;
font-weight: bold;
}
.content {
box-shadow: inset 0px -1px 0px 0px rgba(227, 227, 227, 1);
color: #666;
margin-top: 10px;
padding: var(--van-cell-group-inset-padding);
padding-bottom: 30px;
font-size: 12px;
font-weight: 400;
}
footer {
box-shadow: inset 0px -1px 0px 0px rgba(227, 227, 227, 1);
padding: var(--van-cell-group-inset-padding);
padding-top: 16px;
padding-bottom: 16px;
}
}
.wrapper {
height: 100vh;
background-color: var(--background-color);
overflow: auto;
}

5
src/layout/Index.vue

@ -40,11 +40,6 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { HomeFilled, Platform, Setting, Menu } from '@element-plus/icons-vue'
import { useRouter } from "vue-router";
const router = useRouter();
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

14
src/main.js

@ -1,14 +0,0 @@
import { createApp } from 'vue'
import router from './router/index'
import { createPinia } from 'pinia'
import App from './App.vue'
import IconComponent from '@/components/Icon.vue'
import './assets/style/style.scss'
createApp(App)
.use(router)
.use(createPinia())
.component('Icon', IconComponent)
.mount('#app')

37
src/router/index.js

@ -1,37 +0,0 @@
import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '@/views/Home.vue'
import Layout from '@/layout/Index.vue'
import NotFound from '@/views/error/404.vue'
const constantRoutes = [
{
path: '/layout',
component: Layout,
redirect: to => {
return '/'
},
children: [
{
path: '/',
component: Home
}
]
},
{
path: '/:catchAll(.*)',
component: NotFound,
meta: {
title: '404'
}
}
];
const router = createRouter({
history: createWebHashHistory(),
routes: constantRoutes
});
export default router;

35
src/util/request.js

@ -1,35 +0,0 @@
const basePath = '/api'
export function post(url, data) {
return new Promise((resolve, reject) => {
fetch(`${basePath}${url}`, {
method: 'POST',
body: data? JSON.stringify(data) : '',
}).then(res => {
return res.json();
}).then(res => {
if (res.ok()) {
resolve(res)
} else {
reject(res)
}
})
})
}
export function get(url) {
return new Promise((resolve, reject) => {
fetch(`${basePath}${url}`, {
method: 'GET',
}).then(res => {
return res.json();
}).then(res => {
if (res.ok()) {
resolve(res)
} else {
reject(res)
}
})
})
}

3
src/views/Home.vue

@ -40,9 +40,6 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { useRouter } from "vue-router";
const router = useRouter();
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.container { .container {

2
src/views/setting/system/environment.vue

@ -86,7 +86,7 @@
<el-table :data="[info.jvm]" size="large"> <el-table :data="[info.jvm]" size="large">
<el-table-column prop="name" label="Java名称" min-width="120" /> <el-table-column prop="name" label="Java名称" min-width="120" />
<el-table-column prop="startTime" label="启动时间" min-width="120" /> <el-table-column prop="startTime" label="启动时间" min-width="120" />
<el-table-column prop="home" label="安装路径" min-width="120" /> <el-table-column prop="nphome" label="安装路径" min-width="120" />
<el-table-column prop="inputArgs" label="运行参数" min-width="120" /> <el-table-column prop="inputArgs" label="运行参数" min-width="120" />
<el-table-column prop="version" label="Java版本" min-width="120" /> <el-table-column prop="version" label="Java版本" min-width="120" />
<el-table-column prop="runTime" label="运行时长" min-width="120" /> <el-table-column prop="runTime" label="运行时长" min-width="120" />

4307
yarn.lock.bak

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save