Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FLIPPED-AURORA
gin-vue-admin
提交
4e26a89f
G
gin-vue-admin
项目概览
FLIPPED-AURORA
/
gin-vue-admin
大约 1 年 前同步成功
通知
337
Star
18155
Fork
5506
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
4e26a89f
编写于
4月 30, 2020
作者:
Mr.奇淼(
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/gin-vue-admin_v2_dev' into gin-vue-admin_v2_dev
上级
de4ba0ca
f78ecb69
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
275 addition
and
71 deletion
+275
-71
server/resource/template/fe/table.vue.tpl
server/resource/template/fe/table.vue.tpl
+5
-5
web/package-lock.json
web/package-lock.json
+8
-0
web/src/view/about/index.vue
web/src/view/about/index.vue
+0
-0
web/src/view/iconList/index.vue
web/src/view/iconList/index.vue
+76
-2
web/src/view/layout/aside/historyComponent/history.vue
web/src/view/layout/aside/historyComponent/history.vue
+181
-62
web/src/view/layout/index.vue
web/src/view/layout/index.vue
+2
-1
web/src/view/superAdmin/menu/menu.vue
web/src/view/superAdmin/menu/menu.vue
+3
-1
未找到文件。
server/resource/template/fe/table.vue.tpl
浏览文件 @
4e26a89f
...
@@ -61,10 +61,10 @@
...
@@ -61,10 +61,10 @@
<script>
<script>
import
{
import
{
create
{{.
StructName
}}
create
{{.
StructName
}}
,
delete
{{.
StructName
}}
delete
{{.
StructName
}}
,
update
{{.
StructName
}}
update
{{.
StructName
}}
,
find
{{.
StructName
}}
find
{{.
StructName
}}
,
get
{{.
StructName
}}
List
get
{{.
StructName
}}
List
}
from
"
@/api/{{.StructName}}
"
;
// 此处请自行替换地址
}
from
"
@/api/{{.StructName}}
"
;
// 此处请自行替换地址
import
{
formatTimeToStr
}
from
"
@/utils/data
"
;
import
{
formatTimeToStr
}
from
"
@/utils/data
"
;
...
@@ -96,7 +96,7 @@ export default {
...
@@ -96,7 +96,7 @@ export default {
},
},
methods
:
{
methods
:
{
async
update
{{.
StructName
}}(
row
)
{
async
update
{{.
StructName
}}(
row
)
{
const
res
=
await
get
{{.
StructName
}}({
ID
:
row
.
ID
});
const
res
=
await
find
{{.
StructName
}}({
ID
:
row
.
ID
});
this
.
type
=
"
update
"
;
this
.
type
=
"
update
"
;
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
this
.
form
=
res
.
data
.
re
{{.
Abbreviation
}};
this
.
form
=
res
.
data
.
re
{{.
Abbreviation
}};
...
...
web/package-lock.json
浏览文件 @
4e26a89f
...
@@ -11147,6 +11147,14 @@
...
@@ -11147,6 +11147,14 @@
"integrity": "sha1-9d9zJFNAewkZHa5z4qjMc/OBqCY=",
"integrity": "sha1-9d9zJFNAewkZHa5z4qjMc/OBqCY=",
"dev": true
"dev": true
},
},
"timeline-vuejs": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/timeline-vuejs/-/timeline-vuejs-1.1.1.tgz",
"integrity": "sha512-jsdr0xNCBH/GBiW7qsOTbBxZuyk7WKD5YmtTGP1sm0su0fy+iBsEJLDyhHhQ4nTAxca8MkSbJhKGUgF5eNoEfA==",
"requires": {
"vue": "^2.5.17"
}
},
"timers-browserify": {
"timers-browserify": {
"version": "2.0.11",
"version": "2.0.11",
"resolved": "https://registry.npm.taobao.org/timers-browserify/download/timers-browserify-2.0.11.tgz",
"resolved": "https://registry.npm.taobao.org/timers-browserify/download/timers-browserify-2.0.11.tgz",
...
...
web/src/view/
tes
t/index.vue
→
web/src/view/
abou
t/index.vue
浏览文件 @
4e26a89f
文件已移动
web/src/view/iconList/index.vue
浏览文件 @
4e26a89f
<
template
>
<
template
>
<ul
class=
"icon-list"
>
<ul
class=
"icon-list
clearfix
"
>
<li>
<li>
<span>
<span>
<i
class=
"el-icon-platform-eleme"
></i>
<i
class=
"el-icon-platform-eleme"
></i>
...
@@ -1223,6 +1223,7 @@
...
@@ -1223,6 +1223,7 @@
<li>
<li>
<span>
<span>
<i
class=
"el-icon-moon"
></i>
<i
class=
"el-icon-moon"
></i>
<br/>
<span
class=
"icon-name"
>
el-icon-moon
</span></span>
<span
class=
"icon-name"
>
el-icon-moon
</span></span>
</li>
</li>
<li>
<li>
...
@@ -1413,6 +1414,79 @@
...
@@ -1413,6 +1414,79 @@
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
lang=
"scss"
scoped
>
.icon-list
{
-webkit-tap-highlight-color
:
transparent
;
font-family
:
icomoon
!
important
;
font-style
:
normal
;
font-weight
:
400
;
font-variant
:
normal
;
text-transform
:
none
;
-webkit-font-smoothing
:
antialiased
;
overflow
:
hidden
;
list-style
:
none
;
padding
:
0
!
important
;
border
:
1px
solid
#eaeefb
;
border-radius
:
4px
;
font-size
:
14px
;
color
:
#5e6d82
;
line-height
:
2em
;
li
{
-webkit-tap-highlight-color
:
transparent
;
font-family
:
icomoon
!
important
;
font-style
:
normal
;
font-weight
:
400
;
font-variant
:
normal
;
text-transform
:
none
;
-webkit-font-smoothing
:
antialiased
;
list-style
:
none
;
float
:
left
;
width
:
16
.66%
;
text-align
:
center
;
height
:
120px
;
line-height
:
120px
;
color
:
#666
;
font-size
:
13px
;
border-right
:
1px
solid
#eee
;
border-bottom
:
1px
solid
#eee
;
margin-right
:
-1px
;
margin-bottom
:
-1px
;
span
{
-webkit-tap-highlight-color
:
transparent
;
font-style
:
normal
;
font-weight
:
400
;
font-variant
:
normal
;
text-transform
:
none
;
-webkit-font-smoothing
:
antialiased
;
list-style
:
none
;
text-align
:
center
;
font-size
:
13px
;
display
:
inline-block
;
vertical-align
:
middle
;
line-height
:
normal
;
font-family
:
Helvetica
Neue
,
Helvetica
,
PingFang
SC
,
Hiragino
Sans
GB
,
Microsoft
YaHei
,
SimSun
,
sans-serif
;
color
:
#99a9bf
;
transition
:
color
.15s
linear
;
i
{
-webkit-tap-highlight-color
:
transparent
;
list-style
:
none
;
text-align
:
center
;
font-family
:
element-icons
!
important
;
font-style
:
normal
;
font-weight
:
400
;
font-variant
:
normal
;
text-transform
:
none
;
line-height
:
1
;
vertical-align
:
baseline
;
-webkit-font-smoothing
:
antialiased
;
display
:
block
;
font-size
:
32px
;
margin-bottom
:
15px
;
color
:
#606266
;
transition
:
color
.15s
linear
;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
web/src/view/layout/aside/historyComponent/history.vue
浏览文件 @
4e26a89f
<
template
>
<
template
>
<div
class=
"router-history"
>
<div
class=
"router-history"
>
<el-tabs
v-model=
"activeValue"
type=
"card"
:closable=
"!(historys.length==1&&this.$route.name=='dashboard')"
@
tab-click=
"changeTab"
@
tab-remove=
"removeTab"
>
<el-tabs
:closable=
"!(historys.length==1&&this.$route.name=='dashboard')"
@
contextmenu.prevent.native=
"openContextMenu($event)"
@
tab-click=
"changeTab"
@
tab-remove=
"removeTab"
type=
"card"
v-model=
"activeValue"
>
<el-tab-pane
<el-tab-pane
v-for=
"item in historys"
:key=
"item.name"
:key=
"item.name"
:label=
"item.meta.title"
:label=
"item.meta.title"
:name=
"item.name"
:name=
"item.name"
>
v-for=
"item in historys"
</el-tab-pane>
>
</el-tab-pane>
</el-tabs>
</el-tabs>
<!--自定义右键菜单html代码-->
<ul
:style=
"
{left:left+'px',top:top+'px'}" class="contextmenu" v-show="contextMenuVisible">
<li
@
click=
"closeAll"
>
关闭所有
</li>
<li
@
click=
"closeLeft"
>
关闭左边
</li>
<li
@
click=
"closeRight"
>
关闭右边
</li>
<li
@
click=
"closeOther"
>
关闭其他
</li>
</ul>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
"
HistoryComponent
"
,
name
:
'
HistoryComponent
'
,
data
(){
data
()
{
return
{
return
{
historys
:[],
historys
:
[],
activeValue
:
"
dashboard
"
activeValue
:
'
dashboard
'
,
contextMenuVisible
:
false
,
left
:
0
,
top
:
0
,
isCollapse
:
false
,
rightActive
:
''
}
}
},
},
created
()
{
created
()
{
const
initHistorys
=
[
const
initHistorys
=
[
{
{
name
:
"
dashboard
"
,
name
:
'
dashboard
'
,
meta
:
{
meta
:
{
title
:
"
仪表盘
"
title
:
'
仪表盘
'
}
}
}
}
]
]
this
.
historys
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"
historys
"
))
||
initHistorys
this
.
historys
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'
historys
'
))
||
initHistorys
this
.
setTab
(
this
.
$route
)
this
.
setTab
(
this
.
$route
)
},
},
methods
:{
mounted
()
{
setTab
(
route
){
this
.
$bus
.
on
(
'
totalCollapse
'
,
()
=>
{
if
(
!
this
.
historys
.
some
(
item
=>
item
.
name
==
route
.
name
)){
this
.
isCollapse
=
!
this
.
isCollapse
})
},
methods
:
{
openContextMenu
(
e
)
{
if
(
this
.
historys
.
length
==
1
&&
this
.
$route
.
name
==
'
dashboard
'
)
{
return
false
}
if
(
e
.
srcElement
.
id
)
{
this
.
contextMenuVisible
=
true
let
width
if
(
this
.
isCollapse
)
{
width
=
60
}
else
{
width
=
220
}
this
.
left
=
e
.
clientX
-
width
this
.
top
=
e
.
clientY
+
10
this
.
rightActive
=
e
.
srcElement
.
id
.
split
(
'
-
'
)[
1
]
}
},
closeAll
()
{
this
.
historys
=
[
{
name
:
'
dashboard
'
,
meta
:
{
title
:
'
仪表盘
'
}
}
]
this
.
$router
.
push
({
name
:
'
dashboard
'
})
this
.
contextMenuVisible
=
false
sessionStorage
.
setItem
(
'
historys
'
,
JSON
.
stringify
(
this
.
historys
))
},
closeLeft
()
{
const
rightIndex
=
this
.
historys
.
findIndex
(
item
=>
item
.
name
==
this
.
rightActive
)
const
activeIndex
=
this
.
historys
.
findIndex
(
item
=>
item
.
name
==
this
.
activeValue
)
this
.
historys
.
splice
(
0
,
rightIndex
)
if
(
rightIndex
>
activeIndex
)
{
this
.
$router
.
push
({
name
:
this
.
rightActive
})
}
sessionStorage
.
setItem
(
'
historys
'
,
JSON
.
stringify
(
this
.
historys
))
},
closeRight
()
{
const
leftIndex
=
this
.
historys
.
findIndex
(
item
=>
item
.
name
==
this
.
rightActive
)
const
activeIndex
=
this
.
historys
.
findIndex
(
item
=>
item
.
name
==
this
.
activeValue
)
this
.
historys
.
splice
(
leftIndex
,
this
.
historys
.
length
)
if
(
leftIndex
<
activeIndex
)
{
this
.
$router
.
push
({
name
:
this
.
rightActive
})
}
sessionStorage
.
setItem
(
'
historys
'
,
JSON
.
stringify
(
this
.
historys
))
},
closeOther
()
{
this
.
historys
=
this
.
historys
.
filter
(
item
=>
item
.
name
==
this
.
rightActive
)
this
.
$router
.
push
({
name
:
this
.
rightActive
})
sessionStorage
.
setItem
(
'
historys
'
,
JSON
.
stringify
(
this
.
historys
))
},
setTab
(
route
)
{
if
(
!
this
.
historys
.
some
(
item
=>
item
.
name
==
route
.
name
))
{
const
obj
=
{}
const
obj
=
{}
obj
.
name
=
route
.
name
obj
.
name
=
route
.
name
obj
.
meta
=
route
.
meta
obj
.
meta
=
route
.
meta
...
@@ -42,35 +130,66 @@ export default {
...
@@ -42,35 +130,66 @@ export default {
}
}
this
.
activeValue
=
this
.
$route
.
name
this
.
activeValue
=
this
.
$route
.
name
},
},
changeTab
(
tab
)
{
changeTab
(
tab
)
{
this
.
$router
.
push
({
name
:
tab
.
name
})
this
.
$router
.
push
({
name
:
tab
.
name
})
},
},
removeTab
(
tab
)
{
removeTab
(
tab
)
{
const
index
=
this
.
historys
.
findIndex
(
item
=>
item
.
name
==
tab
)
const
index
=
this
.
historys
.
findIndex
(
item
=>
item
.
name
==
tab
)
if
(
this
.
$route
.
name
==
tab
)
{
if
(
this
.
$route
.
name
==
tab
)
{
if
(
this
.
historys
.
length
==
1
)
{
if
(
this
.
historys
.
length
==
1
)
{
this
.
$router
.
push
({
name
:
"
dashboard
"
})
this
.
$router
.
push
({
name
:
'
dashboard
'
})
}
else
{
}
else
{
if
(
index
<
this
.
historys
.
length
-
1
)
{
if
(
index
<
this
.
historys
.
length
-
1
)
{
this
.
$router
.
push
({
name
:
this
.
historys
[
index
+
1
].
name
})
this
.
$router
.
push
({
name
:
this
.
historys
[
index
+
1
].
name
})
}
else
{
}
else
{
this
.
$router
.
push
({
name
:
this
.
historys
[
index
-
1
].
name
})
this
.
$router
.
push
({
name
:
this
.
historys
[
index
-
1
].
name
})
}
}
}
}
}
}
this
.
historys
.
splice
(
index
,
1
)
this
.
historys
.
splice
(
index
,
1
)
}
}
},
},
watch
:{
watch
:
{
$route
(
to
){
contextMenuVisible
()
{
this
.
historys
=
this
.
historys
.
filter
(
item
=>!
item
.
meta
.
hidden
)
if
(
this
.
contextMenuVisible
)
{
document
.
body
.
addEventListener
(
'
click
'
,
()
=>
{
this
.
contextMenuVisible
=
false
})
}
else
{
document
.
body
.
removeEventListener
(
'
click
'
,
()
=>
{
this
.
contextMenuVisible
=
false
})
}
},
$route
(
to
)
{
this
.
historys
=
this
.
historys
.
filter
(
item
=>
!
item
.
meta
.
hidden
)
this
.
setTab
(
to
)
this
.
setTab
(
to
)
sessionStorage
.
setItem
(
"
historys
"
,
JSON
.
stringify
(
this
.
historys
))
sessionStorage
.
setItem
(
'
historys
'
,
JSON
.
stringify
(
this
.
historys
))
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.contextmenu
{
width
:
100px
;
margin
:
0
;
border
:
1px
solid
#ccc
;
background
:
#fff
;
z-index
:
3000
;
position
:
absolute
;
list-style-type
:
none
;
padding
:
5px
0
;
border-radius
:
4px
;
font-size
:
14px
;
color
:
#333
;
box-shadow
:
2px
2px
3px
0
rgba
(
0
,
0
,
0
,
0
.2
);
}
.contextmenu
li
{
margin
:
0
;
padding
:
7px
16px
;
}
.contextmenu
li
:hover
{
background
:
#f2f2f2
;
cursor
:
pointer
;
}
</
style
>
</
style
>
\ No newline at end of file
web/src/view/layout/index.vue
浏览文件 @
4e26a89f
...
@@ -272,6 +272,7 @@ $mainHight: 100vh;
...
@@ -272,6 +272,7 @@ $mainHight: 100vh;
.router-history
{
.router-history
{
background
:
#fff
;
background
:
#fff
;
padding
:
0
6px
;
padding
:
0
6px
;
border-top
:
1px
solid
#DCDCDC
;
}
}
&
.el-main
{
&
.el-main
{
overflow
:
auto
;
overflow
:
auto
;
...
...
web/src/view/superAdmin/menu/menu.vue
浏览文件 @
4e26a89f
...
@@ -63,7 +63,9 @@
...
@@ -63,7 +63,9 @@
<el-input
autocomplete=
"off"
v-model=
"form.meta.title"
></el-input>
<el-input
autocomplete=
"off"
v-model=
"form.meta.title"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"图标"
prop=
"meta.icon"
>
<el-form-item
label=
"图标"
prop=
"meta.icon"
>
<el-input
autocomplete=
"off"
v-model=
"form.meta.icon"
></el-input>
<el-input
autocomplete=
"off"
v-model=
"form.meta.icon"
>
<
template
slot=
"prepend"
>
el-icon-
</
template
>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"排序标记"
prop=
"sort"
>
<el-form-item
label=
"排序标记"
prop=
"sort"
>
<el-input
autocomplete=
"off"
v-model.number=
"form.sort"
></el-input>
<el-input
autocomplete=
"off"
v-model.number=
"form.sort"
></el-input>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录