Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FLIPPED-AURORA
gin-vue-admin
提交
30d2c1a4
G
gin-vue-admin
项目概览
FLIPPED-AURORA
/
gin-vue-admin
9 个月 前同步成功
通知
324
Star
18154
Fork
5505
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
30d2c1a4
编写于
4月 07, 2020
作者:
Mr.奇淼(
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加排序功能,修改错别字 dashbord->dashboard 需更新数据库中base_menu表中 所有的dashbord改为dashboard
上级
66f43926
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
37 addition
and
10 deletion
+37
-10
server/model/sys_api.go
server/model/sys_api.go
+7
-1
web/src/utils/stringFun.js
web/src/utils/stringFun.js
+13
-0
web/src/view/dashboard/component/animition.vue
web/src/view/dashboard/component/animition.vue
+0
-0
web/src/view/dashboard/index.vue
web/src/view/dashboard/index.vue
+1
-1
web/src/view/superAdmin/api/api.vue
web/src/view/superAdmin/api/api.vue
+15
-7
web/src/view/systemTools/autoCode/index.vue
web/src/view/systemTools/autoCode/index.vue
+1
-1
未找到文件。
server/model/sys_api.go
浏览文件 @
30d2c1a4
...
...
@@ -130,7 +130,13 @@ func (a *SysApi) GetInfoList(info PageInfo, Order string, Desc bool) (err error,
}
else
{
db
=
db
.
Limit
(
limit
)
.
Offset
(
offset
)
if
Order
!=
""
{
err
=
db
.
Order
(
Order
+
" desc"
,
true
)
.
Find
(
&
apiList
)
.
Error
var
OrderStr
string
if
Desc
{
OrderStr
=
Order
+
" desc"
}
else
{
OrderStr
=
Order
}
err
=
db
.
Order
(
OrderStr
,
true
)
.
Find
(
&
apiList
)
.
Error
}
else
{
err
=
db
.
Order
(
"api_group"
,
true
)
.
Find
(
&
apiList
)
.
Error
}
...
...
web/src/utils/
toUpperCase
.js
→
web/src/utils/
stringFun
.js
浏览文件 @
30d2c1a4
...
...
@@ -4,4 +4,10 @@ export const toUpperCase = (str) => {
}
else
{
return
""
}
}
\ No newline at end of file
}
// 驼峰转换下划线
export
const
toSQLLine
=
(
str
)
=>
{
if
(
str
==
"
ID
"
)
return
"
ID
"
return
str
.
replace
(
/
([
A-Z
])
/g
,
"
_$1
"
).
toLowerCase
();
}
\ No newline at end of file
web/src/view/dashbord/component/animition.vue
→
web/src/view/dashbo
a
rd/component/animition.vue
浏览文件 @
30d2c1a4
文件已移动
web/src/view/dashbord/index.vue
→
web/src/view/dashbo
a
rd/index.vue
浏览文件 @
30d2c1a4
...
...
@@ -27,7 +27,7 @@
<
script
>
import
{
mapGetters
}
from
'
vuex
'
import
Animition
from
'
@/view/dashbord/component/animition.vue
'
import
Animition
from
'
@/view/dashbo
a
rd/component/animition.vue
'
export
default
{
name
:
'
Dashbord
'
,
data
()
{
...
...
web/src/view/superAdmin/api/api.vue
浏览文件 @
30d2c1a4
...
...
@@ -26,12 +26,12 @@
</el-form-item>
</el-form>
</div>
<el-table
:data=
"tableData"
border
stripe
>
<el-table-column
label=
"id"
min-width=
"60"
prop=
"ID"
></el-table-column>
<el-table-column
label=
"api路径"
min-width=
"150"
prop=
"path"
></el-table-column>
<el-table-column
label=
"api分组"
min-width=
"150"
prop=
"apiGroup"
></el-table-column>
<el-table-column
label=
"api简介"
min-width=
"150"
prop=
"description"
></el-table-column>
<el-table-column
label=
"请求"
min-width=
"150"
prop=
"method"
>
<el-table
@
sort-change=
"sortChange"
:data=
"tableData"
border
stripe
>
<el-table-column
sortable=
"custom"
label=
"id"
min-width=
"60"
prop=
"ID"
></el-table-column>
<el-table-column
sortable=
"custom"
label=
"api路径"
min-width=
"150"
prop=
"path"
></el-table-column>
<el-table-column
sortable=
"custom"
label=
"api分组"
min-width=
"150"
prop=
"apiGroup"
></el-table-column>
<el-table-column
sortable=
"custom"
label=
"api简介"
min-width=
"150"
prop=
"description"
></el-table-column>
<el-table-column
sortable=
"custom"
label=
"请求"
min-width=
"150"
prop=
"method"
>
<template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
method
}}
...
...
@@ -107,7 +107,7 @@ import {
deleteApi
}
from
'
@/api/api
'
import
infoList
from
'
@/components/mixins/infoList
'
import
{
toSQLLine
}
from
'
@/utils/stringFun
'
const
methodOptions
=
[
{
value
:
'
POST
'
,
...
...
@@ -160,6 +160,14 @@ export default {
}
},
methods
:
{
// 排序
sortChange
({
prop
,
order
}){
if
(
prop
){
this
.
searchInfo
.
orderKey
=
toSQLLine
(
prop
)
this
.
searchInfo
.
desc
=
order
==
"
descending
"
}
this
.
getTableData
()
},
//条件搜索前端看此方法
onSubmit
()
{
this
.
page
=
1
...
...
web/src/view/systemTools/autoCode/index.vue
浏览文件 @
30d2c1a4
...
...
@@ -80,7 +80,7 @@ const fieldTemplate={
}
import
FieldDialog
from
"
@/view/systemTools/autoCode/component/fieldDialog.vue
"
import
{
toUpperCase
}
from
"
@/utils/
toUpperCase
.js
"
import
{
toUpperCase
}
from
"
@/utils/
stringFun
.js
"
import
{
createTemp
}
from
"
@/api/autoCode.js
"
export
default
{
name
:
"
autoCode
"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录