diff --git a/index.html b/index.html
index 0c18c48..61e08e2 100644
--- a/index.html
+++ b/index.html
@@ -4,7 +4,7 @@
-
Vite App
+ 博客API管理后台
diff --git a/package.json b/package.json
index 5b12744..1694571 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
"axios": "^0.22.0",
"element-plus": "^1.1.0-beta.19",
"moment": "^2.29.1",
+ "pretty-bytes": "^5.6.0",
"unplugin-element-plus": "^0.1.0",
"vue": "^3.2.16",
"vue-axios": "^3.3.7",
diff --git a/src/config/menu.ts b/src/config/menu.ts
index 89df1f4..8e70a86 100644
--- a/src/config/menu.ts
+++ b/src/config/menu.ts
@@ -18,7 +18,6 @@ export default [
{ title: '一言', path: '/api/hitokoto' },
{ title: '照片墙', path: '/api/photoWall' },
{ title: '图片资源库', path: '/api/sourceImage' },
- { title: '中国行政区划', path: '/api/chinaProvince' },
{ title: '歌曲库', path: '/api/music' }
]
},{
diff --git a/src/router.ts b/src/router.ts
index 7ab0021..dcf137d 100644
--- a/src/router.ts
+++ b/src/router.ts
@@ -5,12 +5,19 @@ import Home from './views/Home.vue'
import Welcome from './views/Welcome.vue'
import SystemUser from './views/system/SystemUser.vue'
import SystemRole from './views/system/SystemRole.vue'
+import SystemConfig from './views/system/SystemConfig.vue'
+
+import Music from './views/api/Music.vue'
+
const routes: Array = [
{ path: '/login', name: 'Login', component: Login },
{ path: '/', name: 'Home', component: Home, children: [
{ path: '/', name: 'Welcome', component: Welcome },
{ path: '/system/user', name: 'SystemUser', component: SystemUser },
{ path: '/system/role', name: 'SystemRole', component: SystemRole },
+ { path: '/system/config', name: 'SystemConfig', component: SystemConfig },
+
+ { path: '/api/music', name: 'Music', component: Music },
]}
]
diff --git a/src/static/common.less b/src/static/common.less
index 9e5364e..2bc2b71 100644
--- a/src/static/common.less
+++ b/src/static/common.less
@@ -67,7 +67,4 @@ html,body,#app,.layout {
.main-view {
position: relative;
height: 100%;
-}
-.main-view .search-row:not(:last-child) {
- margin-bottom: 10px;
}
\ No newline at end of file
diff --git a/src/store/index.ts b/src/store/index.ts
index a8d4b35..cfb0e3a 100644
--- a/src/store/index.ts
+++ b/src/store/index.ts
@@ -11,7 +11,8 @@ class Store {
token: null
},
breadcrumb: [],
- pageSizeOpts: [10, 20, 50, 100]
+ pageSizeOpts: [10, 20, 50, 100],
+ pageLayout: 'sizes, prev, pager, next, total, ->, jumper'
}
mutations = {
/**
diff --git a/src/store/types.ts b/src/store/types.ts
index 417eb72..db72ec4 100644
--- a/src/store/types.ts
+++ b/src/store/types.ts
@@ -12,4 +12,5 @@ export interface StateType {
}
breadcrumb: string[] // 面包屑导航文字
pageSizeOpts: number[] // 分页大小可选列表
+ pageLayout: string // 分页工具栏
}
\ No newline at end of file
diff --git a/src/views/api/Music.vue b/src/views/api/Music.vue
new file mode 100644
index 0000000..c93edaf
--- /dev/null
+++ b/src/views/api/Music.vue
@@ -0,0 +1,314 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ prettyBytes(scope.row.size) }}
+
+
+
+
+
+
+
+ {{ findMusicLib(scope.row.lib_id) }}
+
+
+
+
+
+
+
+
+
+ 修改
+ 歌词
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/system/SystemConfig.vue b/src/views/system/SystemConfig.vue
new file mode 100644
index 0000000..f18d35d
--- /dev/null
+++ b/src/views/system/SystemConfig.vue
@@ -0,0 +1,151 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ JSON.stringify(scope.row.value, null, ' ') }}
+
+
+
+
+
+
+ {{ scope.row.is_public ? '是' : '否' }}
+
+
+
+
+ {{ datetimeFormat(scope.row.created_at) }}
+
+
+
+
+ {{ datetimeFormat(scope.row.updated_at) }}
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/system/SystemConfigAdd.vue b/src/views/system/SystemConfigAdd.vue
new file mode 100644
index 0000000..145c613
--- /dev/null
+++ b/src/views/system/SystemConfigAdd.vue
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/system/SystemRole.vue b/src/views/system/SystemRole.vue
index 1b759d7..b79ad54 100644
--- a/src/views/system/SystemRole.vue
+++ b/src/views/system/SystemRole.vue
@@ -41,6 +41,7 @@
@@ -152,6 +153,7 @@ export default class SystemRole extends BaseList {
}
this.modalTitle = '新增角色'
this.addModal = true
+ this.clearValidate()
}
addUri(fieldName: 'include_uri' | 'exclude_uri', uri: string | null) {
if(!uri) return
@@ -176,6 +178,7 @@ export default class SystemRole extends BaseList {
this.formData.exclude_uri = row.exclude_uri
this.modalTitle = '修改角色'
this.addModal = true
+ this.clearValidate()
}
remove(row: SystemRoleModel) {
ElMessageBox.confirm(`是否确认删除 ${row.name} 角色?`, '确认删除', {type: 'warning'}).then(async () => {
@@ -199,6 +202,11 @@ export default class SystemRole extends BaseList {
this.loadData()
})
}
+ clearValidate() {
+ this.$nextTick(() => {
+ this.roleForm.clearValidate()
+ })
+ }
}
class SystemRolePage extends Page {
diff --git a/src/views/system/SystemUser.vue b/src/views/system/SystemUser.vue
index e69de29..746e87d 100644
--- a/src/views/system/SystemUser.vue
+++ b/src/views/system/SystemUser.vue
@@ -0,0 +1,193 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ datetimeFormat(scope.row.created_at) }}
+
+
+
+
+ {{ datetimeFormat(scope.row.updated_at) }}
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yarn.lock b/yarn.lock
index 19c6adb..b0819de 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -731,6 +731,11 @@ postcss@^8.1.10, postcss@^8.3.8:
nanoid "^3.1.25"
source-map-js "^0.6.2"
+pretty-bytes@^5.6.0:
+ version "5.6.0"
+ resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb"
+ integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==
+
promise@^7.0.1:
version "7.3.1"
resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf"