Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梁国权
gin-vue-admin
提交
35ec61c8
G
gin-vue-admin
项目概览
梁国权
/
gin-vue-admin
与 Fork 源项目一致
Fork自
FLIPPED-AURORA / gin-vue-admin
通知
2
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,体验更适合开发者的 AI 搜索 >>
提交
35ec61c8
编写于
3月 22, 2020
作者:
Mr.奇淼(
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码生成器前端页面 后端基本字段 完成
上级
b75d8391
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
181 addition
and
1 deletion
+181
-1
QMPlusServer/model/autoCodeModel/autoCode.go
QMPlusServer/model/autoCodeModel/autoCode.go
+22
-0
QMPlusVuePage/src/view/login/login.vue
QMPlusVuePage/src/view/login/login.vue
+1
-1
QMPlusVuePage/src/view/superAdmin/autoCode/index.vue
QMPlusVuePage/src/view/superAdmin/autoCode/index.vue
+158
-0
未找到文件。
QMPlusServer/model/autoCodeModel/autoCode.go
0 → 100644
浏览文件 @
35ec61c8
package
autoCodeModel
type
AutoCodeStruct
struct
{
StructName
string
`json:"structName"`
StructType
[]
string
`json:"structType"`
Components
[]
Component
`json:"components"`
}
type
Component
struct
{
ComponentName
string
`json:"componentName"`
ComponentType
string
`json:"componentType"`
Ismultiple
bool
`json:"isMultiple"`
ComponentShowType
string
`json:"componentShowType"`
NideDictionary
bool
`json:"nideDictionary"`
DictionaryName
string
`json:"dictionaryName"`
ComponentDictionary
[]
Dictionary
`json:"dictionary"`
}
type
Dictionary
struct
{
Label
string
`json:"label"`
Value
string
`json:"value"`
}
QMPlusVuePage/src/view/login/login.vue
浏览文件 @
35ec61c8
...
...
@@ -20,7 +20,7 @@
<el-input
v-model=
"loginForm.captcha"
name=
"logVerify"
placeholder=
"请输入验证码
(测试环境有问题可不输入 本地搭建环境可用)
"
placeholder=
"请输入验证码"
maxlength=
"10"
/>
<img
:src=
"path + picPath"
alt=
"请输入验证码"
@
click=
"loginVefify()"
class=
"vPic"
>
...
...
QMPlusVuePage/src/view/superAdmin/autoCode/index.vue
0 → 100644
浏览文件 @
35ec61c8
<
template
>
<div>
<!-- 此版本为简单版 -->
<!-- 结构体基础配置 -->
<el-form
ref=
"form"
:model=
"form"
label-width=
"100px"
:inline=
"true"
>
<el-form-item
label=
"结构名称"
:span=
"8"
>
<el-input
v-model=
"form.structName"
></el-input>
</el-form-item>
<el-form-item
label=
"结构类型"
:span=
"8"
>
<el-select
v-model=
"form.structType"
multiple
placeholder=
"请选择结构类型(多选)"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<!-- 组件列表 -->
<div
class=
"button-box clearflex"
>
<el-button
@
click=
"editAndAddComponent()"
type=
"primary"
>
新增组件
</el-button>
</div>
<el-table
:data=
"form.components"
border
stripe
>
<el-table-column
type=
"index"
label=
"序列"
width=
"180"
>
</el-table-column>
<el-table-column
prop=
"componentName"
label=
"组件名"
width=
"180"
>
</el-table-column>
<el-table-column
prop=
"componentType"
label=
"组件数据类型"
width=
"180"
>
</el-table-column>
<el-table-column
prop=
"componentShowType"
label=
"组件展示类型"
>
</el-table-column>
<el-table-column
prop=
"dictionaryName"
label=
"字典名称(选)"
>
</el-table-column>
<el-table-column
label=
"操作"
>
<template
slot-scope=
"scope"
>
<el-button
@
click=
"editAndAddComponent(scope.row)"
>
编辑
</el-button>
<el-popover
placement=
"top"
width=
"160"
v-model=
"scope.row.visible"
>
<p>
这是一段内容这是一段内容确定删除吗?
</p>
<div
style=
"text-align: right; margin: 0"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"scope.row.visible = false"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"deleteComponent(scope.$index)"
>
确定
</el-button>
</div>
<el-button
slot=
"reference"
>
删除
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
<!-- 组件列表 -->
<div
class=
"button-box clearflex"
>
<el-button
@
click=
"enterForm"
type=
"primary"
>
提交
</el-button>
</div>
<!-- 组件弹窗 -->
<el-dialog
title=
"组件内容"
:visible.sync=
"dialogFlag"
>
<ComponentDialog
:dialogMiddle=
"dialogMiddle"
/>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"closeDialog"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"enterDialog"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
const
componentTemplate
=
{
componentName
:
""
,
componentType
:
""
,
componentShowType
:
""
,
dictionaryName
:
""
,
isMultiple
:
false
,
nideDictionary
:
false
,
visible
:
false
,
componentDictionary
:[]
}
import
ComponentDialog
from
"
@/view/superAdmin/autoCode/component/componentDialog.vue
"
export
default
{
name
:
"
autoCode
"
,
data
(){
return
{
addFlag
:
""
,
form
:{
structName
:
""
,
structType
:[],
components
:[]
},
options
:[
{
label
:
"
表格类型
"
,
value
:
"
grid
"
},
{
label
:
"
表单类型
"
,
value
:
"
form
"
}
],
dialogMiddle
:{},
bk
:{},
dialogFlag
:
false
}
},
components
:{
ComponentDialog
},
methods
:{
editAndAddComponent
(
item
){
this
.
dialogFlag
=
true
if
(
item
){
this
.
addFlag
=
"
edit
"
this
.
bk
=
JSON
.
parse
(
JSON
.
stringify
(
item
))
this
.
dialogMiddle
=
item
}
else
{
this
.
addFlag
=
"
add
"
this
.
dialogMiddle
=
JSON
.
parse
(
JSON
.
stringify
(
componentTemplate
))
}
},
enterDialog
(){
if
(
this
.
addFlag
==
"
add
"
){
this
.
form
.
components
.
push
(
this
.
dialogMiddle
)
}
this
.
dialogFlag
=
false
},
closeDialog
(){
if
(
this
.
addFlag
==
"
edit
"
){
this
.
dialogMiddle
=
this
.
bk
}
this
.
dialogFlag
=
false
},
deleteComponent
(
index
){
this
.
form
.
components
.
splice
(
index
,
1
)
},
enterForm
(){
console
.
log
(
this
.
form
)
}
}
}
</
script
>
<
style
scope
lang=
"scss"
>
.button-box
{
padding
:
10px
20px
;
.el-button
{
float
:
right
;
}
}
</
style
>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录