Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_54624550
gin-vue-admin
提交
90125a0e
G
gin-vue-admin
项目概览
weixin_54624550
/
gin-vue-admin
与 Fork 源项目一致
Fork自
FLIPPED-AURORA / gin-vue-admin
通知
3
Star
0
Fork
0
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
90125a0e
编写于
5月 25, 2020
作者:
K
klausY
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
顶部搜索功能添加及生成代码功能去重校验
上级
4954ff1d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
77 addition
and
52 deletion
+77
-52
server/model/sys_user.go
server/model/sys_user.go
+2
-1
web/package-lock.json
web/package-lock.json
+18
-34
web/src/view/layout/index.vue
web/src/view/layout/index.vue
+41
-3
web/src/view/systemTools/autoCode/component/fieldDialog.vue
web/src/view/systemTools/autoCode/component/fieldDialog.vue
+4
-4
web/src/view/systemTools/autoCode/index.vue
web/src/view/systemTools/autoCode/index.vue
+12
-10
未找到文件。
server/model/sys_user.go
浏览文件 @
90125a0e
...
...
@@ -2,7 +2,7 @@ package model
import
(
"github.com/jinzhu/gorm"
uuid
"github.com/satori/go.uuid"
"github.com/satori/go.uuid"
)
type
SysUser
struct
{
...
...
@@ -15,3 +15,4 @@ type SysUser struct {
Authority
SysAuthority
`json:"authority" gorm:"ForeignKey:AuthorityId;AssociationForeignKey:AuthorityId"`
AuthorityId
string
`json:"authorityId" gorm:"default:888"`
}
web/package-lock.json
浏览文件 @
90125a0e
...
...
@@ -2878,8 +2878,7 @@
"version": "4.6.0",
"resolved": "https://registry.npm.taobao.org/co/download/co-4.6.0.tgz",
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
"dev": true,
"optional": true
"dev": true
},
"coa": {
"version": "2.0.2",
...
...
@@ -5246,8 +5245,7 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"aproba": {
"version": "1.2.0",
...
...
@@ -5268,14 +5266,12 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
...
...
@@ -5290,20 +5286,17 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"core-util-is": {
"version": "1.0.2",
...
...
@@ -5420,8 +5413,7 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"ini": {
"version": "1.3.5",
...
...
@@ -5433,7 +5425,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
...
...
@@ -5448,7 +5439,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
...
...
@@ -5456,14 +5446,12 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
...
...
@@ -5482,7 +5470,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
...
...
@@ -5563,8 +5550,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"object-assign": {
"version": "4.1.1",
...
...
@@ -5576,7 +5562,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
...
...
@@ -5662,8 +5647,7 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
...
...
@@ -5699,7 +5683,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
...
...
@@ -5719,7 +5702,6 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
...
...
@@ -5763,14 +5745,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
}
}
},
...
...
@@ -9892,8 +9872,7 @@
"version": "4.0.8",
"resolved": "https://registry.npm.taobao.org/rx-lite/download/rx-lite-4.0.8.tgz",
"integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=",
"dev": true,
"optional": true
"dev": true
},
"rx-lite-aggregates": {
"version": "4.0.8",
...
...
@@ -10115,6 +10094,11 @@
"ajv-keywords": "^3.1.0"
}
},
"screenfull": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/screenfull/-/screenfull-5.0.2.tgz",
"integrity": "sha512-cCF2b+L/mnEiORLN5xSAz6H3t18i2oHh9BA8+CQlAh5DRw2+NFAGQJOSYbcGw8B2k04g/lVvFcfZ83b3ysH5UQ=="
},
"script-ext-html-webpack-plugin": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/script-ext-html-webpack-plugin/-/script-ext-html-webpack-plugin-2.1.4.tgz",
...
...
web/src/view/layout/index.vue
浏览文件 @
90125a0e
...
...
@@ -28,6 +28,19 @@
>
{{
item
.
meta
.
title
}}
</el-breadcrumb-item>
</el-breadcrumb>
<div
class=
"fl-right right-box"
>
<transition
name=
"el-fade-in-linear"
>
<div
v-show=
"show"
class=
"transition-box"
style=
"display: inline-block; "
>
<el-select
v-model=
"value"
filterable
placeholder=
"请选择"
@
blur=
"test()"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</div>
</transition>
<i
class=
"el-icon-search"
style=
"font-size: 20px; display: inline-block; "
@
click=
"show = !show"
></i>
<Screenfull
class=
"screenfull"
></Screenfull>
<el-dropdown>
<span
class=
"el-dropdown-link"
>
...
...
@@ -95,6 +108,7 @@ export default {
name
:
"
Layout
"
,
data
()
{
return
{
show
:
false
,
isCollapse
:
false
,
isSider
:
true
,
isMobile
:
false
,
...
...
@@ -124,7 +138,24 @@ export default {
trigger
:
"
blur
"
}
]
}
},
options
:
[{
value
:
'
选项1
'
,
label
:
'
黄金糕
'
},
{
value
:
'
选项2
'
,
label
:
'
双皮奶
'
},
{
value
:
'
选项3
'
,
label
:
'
蚵仔煎
'
},
{
value
:
'
选项4
'
,
label
:
'
龙须面
'
},
{
value
:
'
选项5
'
,
label
:
'
北京烤鸭
'
}],
value
:
''
};
},
components
:
{
...
...
@@ -133,6 +164,9 @@ export default {
Screenfull
},
methods
:
{
test
(){
this
.
show
=
false
},
...
mapActions
(
"
user
"
,
[
"
LoginOut
"
]),
totalCollapse
()
{
this
.
isCollapse
=
!
this
.
isCollapse
;
...
...
@@ -321,7 +355,7 @@ $mainHight: 100vh;
&
:not
(
.el-menu--collapse
)
{
width
:
220px
;
}
}
.el-menu--collapse
{
li
{
...
...
@@ -374,8 +408,12 @@ $mainHight: 100vh;
vertical-align
:
middle
;
}
}
.el-input__inner
{
border
:
none
;
border-bottom
:
1px
solid
#606266
;
}
.screenfull
{
display
:
inline-block
;
}
</
style
>
web/src/view/systemTools/autoCode/component/fieldDialog.vue
浏览文件 @
90125a0e
...
...
@@ -78,11 +78,11 @@ export default {
fieldJson
:[
{
required
:
true
,
message
:
'
请输入field格式化json
'
,
trigger
:
'
blur
'
}],
fieldType
:[
{
required
:
true
,
message
:
'
请选择field数据类型
'
,
trigger
:
'
blur
'
}]
}
}
}
}
,
}
</
script
>
<
style
lang=
"scss"
>
</
style
>
\ No newline at end of file
</
style
>
web/src/view/systemTools/autoCode/index.vue
浏览文件 @
90125a0e
...
...
@@ -28,7 +28,6 @@
width=
"280"
>
</el-table-column>
<el-table-column
v-test
prop=
"fieldName"
label=
"Field名"
width=
"280"
>
...
...
@@ -117,12 +116,6 @@ export default {
components
:{
FieldDialog
},
directives
:{
'
test
'
:
function
(
el
,
binding
,
vnode
){
/** el可以获取当前dom节点,并且进行编译,也可以操作事件 **/
/** binding指的是一个对象,一般不用 **/
/** vnode 是 Vue 编译生成的虚拟节点 **/
console
.
log
(
el
.
click
());
//获取v-model的值
}},
methods
:{
editAndAddField
(
item
){
this
.
dialogFlag
=
true
...
...
@@ -135,9 +128,14 @@ export default {
this
.
dialogMiddle
=
JSON
.
parse
(
JSON
.
stringify
(
fieldTemplate
))
}
},
regExp
(
ele
){
return
ele
.
replace
(
/
\s
*/g
,
""
)
},
enterDialog
(){
console
.
log
(
this
.
dialogMiddle
.
fieldName
.
replace
(
/
\s
*/g
,
""
))
this
.
dialogMiddle
.
fieldName
=
this
.
regExp
(
this
.
dialogMiddle
.
fieldName
)
this
.
dialogMiddle
.
fieldDesc
=
this
.
regExp
(
this
.
dialogMiddle
.
fieldDesc
)
this
.
dialogMiddle
.
fieldJson
=
this
.
regExp
(
this
.
dialogMiddle
.
fieldJson
)
this
.
dialogMiddle
.
columnName
=
this
.
regExp
(
this
.
dialogMiddle
.
columnName
)
this
.
$refs
.
fieldDialog
.
$refs
.
fieldDialogFrom
.
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
dialogMiddle
.
fieldName
=
toUpperCase
(
this
.
dialogMiddle
.
fieldName
)
...
...
@@ -170,7 +168,11 @@ export default {
}
this
.
$refs
.
autoCodeForm
.
validate
(
async
(
valid
)
=>
{
if
(
valid
)
{
this
.
form
.
structName
=
toUpperCase
(
this
.
form
.
structName
)
this
.
form
.
structName
=
this
.
regExp
(
this
.
form
.
structName
)
this
.
form
.
structName
=
toUpperCase
(
this
.
form
.
structName
)
this
.
form
.
abbreviation
=
this
.
regExp
(
this
.
form
.
abbreviation
)
this
.
form
.
packageName
=
this
.
regExp
(
this
.
form
.
packageName
)
if
(
this
.
form
.
structName
==
this
.
form
.
abbreviation
){
this
.
$message
({
type
:
"
error
"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录