Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FLIPPED-AURORA
gin-vue-admin
提交
80c851d8
G
gin-vue-admin
项目概览
FLIPPED-AURORA
/
gin-vue-admin
12 个月 前同步成功
通知
329
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,发现更多精彩内容 >>
提交
80c851d8
编写于
12月 30, 2021
作者:
P
piexlmax
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
系统功能板块setup改造完成
上级
5442b82b
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
550 addition
and
521 deletion
+550
-521
web/src/view/example/breakpoint/breakpoint.vue
web/src/view/example/breakpoint/breakpoint.vue
+0
-3
web/src/view/systemTools/autoCode/component/fieldDialog.vue
web/src/view/systemTools/autoCode/component/fieldDialog.vue
+95
-90
web/src/view/systemTools/autoCode/component/previewCodeDialg.vue
.../view/systemTools/autoCode/component/previewCodeDialg.vue
+65
-57
web/src/view/systemTools/autoCode/index.vue
web/src/view/systemTools/autoCode/index.vue
+245
-238
web/src/view/systemTools/autoCodeAdmin/index.vue
web/src/view/systemTools/autoCodeAdmin/index.vue
+76
-48
web/src/view/systemTools/formCreate/index.vue
web/src/view/systemTools/formCreate/index.vue
+7
-9
web/src/view/systemTools/system/system.vue
web/src/view/systemTools/system/system.vue
+62
-76
未找到文件。
web/src/view/example/breakpoint/breakpoint.vue
浏览文件 @
80c851d8
...
@@ -22,9 +22,6 @@
...
@@ -22,9 +22,6 @@
</div>
</div>
</transition>
</transition>
</div>
</div>
<!--
<span
v-if=
"this.file"
>
{{
Math
.
floor
(((
this
.
formDataList
.
length
-
this
.
waitNum
)
/
this
.
formDataList
.
length
)
*
100
)
}}
%
</span>
-->
<div
class=
"tips"
>
此版本为先行体验功能测试版,样式美化和性能优化正在进行中,上传切片文件和合成的完整文件分别再QMPlusserver目录的breakpointDir文件夹和fileDir文件夹
</div>
<div
class=
"tips"
>
此版本为先行体验功能测试版,样式美化和性能优化正在进行中,上传切片文件和合成的完整文件分别再QMPlusserver目录的breakpointDir文件夹和fileDir文件夹
</div>
</div>
</div>
</div>
</div>
...
...
web/src/view/systemTools/autoCode/component/fieldDialog.vue
浏览文件 @
80c851d8
...
@@ -30,7 +30,6 @@
...
@@ -30,7 +30,6 @@
style=
"width:100%"
style=
"width:100%"
placeholder=
"请选择field数据类型"
placeholder=
"请选择field数据类型"
clearable
clearable
@
change=
"getDbfdOptions"
>
>
<el-option
<el-option
v-for=
"item in typeOptions"
v-for=
"item in typeOptions"
...
@@ -79,103 +78,109 @@
...
@@ -79,103 +78,109 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
setup
>
import
{
toLowerCase
,
toSQLLine
}
from
'
@/utils/stringFun
'
import
{
toLowerCase
,
toSQLLine
}
from
'
@/utils/stringFun
'
import
{
getSysDictionaryList
}
from
'
@/api/sysDictionary
'
import
{
getSysDictionaryList
}
from
'
@/api/sysDictionary
'
import
warningBar
from
'
@/components/warningBar/warningBar.vue
'
import
warningBar
from
'
@/components/warningBar/warningBar.vue
'
import
{
ref
,
defineProps
,
defineExpose
}
from
'
vue-demi
'
export
default
{
const
props
=
defineProps
({
name
:
'
FieldDialog
'
,
dialogMiddle
:
{
components
:
{
warningBar
},
type
:
Object
,
props
:
{
default
:
function
()
{
dialogMiddle
:
{
return
{}
type
:
Object
,
default
:
function
()
{
return
{}
}
}
}
}
})
const
middleDate
=
ref
({})
const
dictOptions
=
ref
([])
const
typeSearchOptions
=
ref
([
{
label
:
'
=
'
,
value
:
'
=
'
},
},
data
()
{
{
return
{
label
:
'
<>
'
,
middleDate
:
{},
value
:
'
<>
'
dictOptions
:
[],
typeSearchOptions
:
[
{
label
:
'
=
'
,
value
:
'
=
'
},
{
label
:
'
<>
'
,
value
:
'
<>
'
},
{
label
:
'
>
'
,
value
:
'
>
'
},
{
label
:
'
<
'
,
value
:
'
<
'
},
{
label
:
'
LIKE
'
,
value
:
'
LIKE
'
}
],
typeOptions
:
[
{
label
:
'
字符串
'
,
value
:
'
string
'
},
{
label
:
'
整型
'
,
value
:
'
int
'
},
{
label
:
'
布尔值
'
,
value
:
'
bool
'
},
{
label
:
'
浮点型
'
,
value
:
'
float64
'
},
{
label
:
'
时间
'
,
value
:
'
time.Time
'
}
],
rules
:
{
fieldName
:
[
{
required
:
true
,
message
:
'
请输入field英文名
'
,
trigger
:
'
blur
'
}
],
fieldDesc
:
[
{
required
:
true
,
message
:
'
请输入field中文名
'
,
trigger
:
'
blur
'
}
],
fieldJson
:
[
{
required
:
true
,
message
:
'
请输入field格式化json
'
,
trigger
:
'
blur
'
}
],
columnName
:
[
{
required
:
true
,
message
:
'
请输入数据库字段
'
,
trigger
:
'
blur
'
}
],
fieldType
:
[
{
required
:
true
,
message
:
'
请选择field数据类型
'
,
trigger
:
'
blur
'
}
]
}
}
},
},
async
created
()
{
{
this
.
middleDate
=
this
.
dialogMiddle
label
:
'
>
'
,
const
dictRes
=
await
getSysDictionaryList
({
value
:
'
>
'
page
:
1
,
},
pageSize
:
999999
{
})
label
:
'
<
'
,
value
:
'
<
'
this
.
dictOptions
=
dictRes
.
data
.
list
},
{
label
:
'
LIKE
'
,
value
:
'
LIKE
'
}
])
const
typeOptions
=
ref
([
{
label
:
'
字符串
'
,
value
:
'
string
'
},
{
label
:
'
整型
'
,
value
:
'
int
'
},
{
label
:
'
布尔值
'
,
value
:
'
bool
'
},
},
methods
:
{
{
autoFill
()
{
label
:
'
浮点型
'
,
this
.
middleDate
.
fieldJson
=
toLowerCase
(
this
.
middleDate
.
fieldName
)
value
:
'
float64
'
this
.
middleDate
.
columnName
=
toSQLLine
(
this
.
middleDate
.
fieldJson
)
},
},
{
label
:
'
时间
'
,
value
:
'
time.Time
'
}
}
])
const
rules
=
ref
({
fieldName
:
[
{
required
:
true
,
message
:
'
请输入field英文名
'
,
trigger
:
'
blur
'
}
],
fieldDesc
:
[
{
required
:
true
,
message
:
'
请输入field中文名
'
,
trigger
:
'
blur
'
}
],
fieldJson
:
[
{
required
:
true
,
message
:
'
请输入field格式化json
'
,
trigger
:
'
blur
'
}
],
columnName
:
[
{
required
:
true
,
message
:
'
请输入数据库字段
'
,
trigger
:
'
blur
'
}
],
fieldType
:
[
{
required
:
true
,
message
:
'
请选择field数据类型
'
,
trigger
:
'
blur
'
}
]
})
const
init
=
async
()
=>
{
middleDate
.
value
=
props
.
dialogMiddle
const
dictRes
=
await
getSysDictionaryList
({
page
:
1
,
pageSize
:
999999
})
dictOptions
.
value
=
dictRes
.
data
.
list
}
init
()
const
autoFill
=
()
=>
{
middleDate
.
value
.
fieldJson
=
toLowerCase
(
middleDate
.
value
.
fieldName
)
middleDate
.
value
.
columnName
=
toSQLLine
(
middleDate
.
value
.
fieldJson
)
}
const
fieldDialogFrom
=
ref
(
null
)
defineExpose
({
fieldDialogFrom
})
</
script
>
<
script
>
export
default
{
name
:
'
FieldDialog
'
}
}
</
script
>
</
script
>
web/src/view/systemTools/autoCode/component/previewCodeDialg.vue
浏览文件 @
80c851d8
...
@@ -8,70 +8,78 @@
...
@@ -8,70 +8,78 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
setup
>
import
marked
from
'
marked
'
import
marked
from
'
marked
'
import
hljs
from
'
highlight.js
'
import
hljs
from
'
highlight.js
'
// import 'highlight.js/styles/atelier-cave-light.css';
import
'
highlight.js/styles/atelier-plateau-light.css
'
import
'
highlight.js/styles/atelier-plateau-light.css
'
export
default
{
import
{
onMounted
,
ref
}
from
'
vue-demi
'
props
:
{
import
{
ElMessage
}
from
'
element-plus
'
previewCode
:
{
import
{
defineProps
,
defineExpose
}
from
'
vue
'
type
:
Object
,
default
()
{
const
props
=
defineProps
({
return
{}
previewCode
:
{
}
type
:
Object
,
}
default
()
{
},
return
{}
data
()
{
return
{
activeName
:
''
}
},
mounted
()
{
marked
.
setOptions
({
renderer
:
new
marked
.
Renderer
(),
highlight
:
function
(
code
)
{
return
hljs
.
highlightAuto
(
code
).
value
},
pedantic
:
false
,
gfm
:
true
,
tables
:
true
,
breaks
:
false
,
sanitize
:
false
,
smartLists
:
true
,
smartypants
:
false
,
xhtml
:
false
})
for
(
const
key
in
this
.
previewCode
)
{
if
(
this
.
activeName
===
''
)
{
this
.
activeName
=
key
}
document
.
getElementById
(
key
).
innerHTML
=
marked
(
this
.
previewCode
[
key
])
}
}
},
}
methods
:
{
})
selectText
()
{
const
element
=
document
.
getElementById
(
this
.
activeName
)
onMounted
(()
=>
{
if
(
document
.
body
.
createTextRange
)
{
marked
.
setOptions
({
const
range
=
document
.
body
.
createTextRange
()
renderer
:
new
marked
.
Renderer
(),
range
.
moveToElementText
(
element
)
highlight
:
function
(
code
)
{
range
.
select
()
return
hljs
.
highlightAuto
(
code
).
value
}
else
if
(
window
.
getSelection
)
{
const
selection
=
window
.
getSelection
()
const
range
=
document
.
createRange
()
range
.
selectNodeContents
(
element
)
selection
.
removeAllRanges
()
selection
.
addRange
(
range
)
}
else
{
alert
(
'
none
'
)
}
},
},
copy
()
{
pedantic
:
false
,
this
.
selectText
()
gfm
:
true
,
document
.
execCommand
(
'
copy
'
)
tables
:
true
,
this
.
$message
.
success
(
'
复制成功
'
)
breaks
:
false
,
sanitize
:
false
,
smartLists
:
true
,
smartypants
:
false
,
xhtml
:
false
})
for
(
const
key
in
props
.
previewCode
)
{
if
(
this
.
activeName
===
''
)
{
this
.
activeName
=
key
}
}
document
.
getElementById
(
key
).
innerHTML
=
marked
(
props
.
previewCode
[
key
])
}
})
const
activeName
=
ref
(
''
)
const
selectText
=
()
=>
{
const
element
=
document
.
getElementById
(
activeName
.
value
)
if
(
document
.
body
.
createTextRange
)
{
const
range
=
document
.
body
.
createTextRange
()
range
.
moveToElementText
(
element
)
range
.
select
()
}
else
if
(
window
.
getSelection
)
{
const
selection
=
window
.
getSelection
()
const
range
=
document
.
createRange
()
range
.
selectNodeContents
(
element
)
selection
.
removeAllRanges
()
selection
.
addRange
(
range
)
}
else
{
alert
(
'
none
'
)
}
}
}
const
copy
=
()
=>
{
selectText
()
document
.
execCommand
(
'
copy
'
)
ElMessage
.
success
(
'
复制成功
'
)
}
defineExpose
({
copy
})
</
script
>
<
script
>
export
default
{
}
}
</
script
>
</
script
>
...
...
web/src/view/systemTools/autoCode/index.vue
浏览文件 @
80c851d8
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
</
template
>
</
template
>
<el-form
ref=
"getTableForm"
style=
"margin-top:24px"
:inline=
"true"
:model=
"dbform"
label-width=
"120px"
>
<el-form
ref=
"getTableForm"
style=
"margin-top:24px"
:inline=
"true"
:model=
"dbform"
label-width=
"120px"
>
<el-form-item
label=
"数据库名"
prop=
"structName"
>
<el-form-item
label=
"数据库名"
prop=
"structName"
>
<el-select
v-model=
"dbform.dbName"
filterable
placeholder=
"请选择数据库"
@
change=
"getTable"
>
<el-select
v-model=
"dbform.dbName"
filterable
placeholder=
"请选择数据库"
@
change=
"getTable
Func
"
>
<el-option
<el-option
v-for=
"item in dbOptions"
v-for=
"item in dbOptions"
:key=
"item.database"
:key=
"item.database"
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
size=
"mini"
type=
"primary"
@
click=
"getColumn"
>
使用此表创建
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"getColumn
Func
"
>
使用此表创建
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</el-collapse-item>
</el-collapse-item>
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
<el-input
v-model=
"form.description"
placeholder=
"中文描述作为自动api描述"
/>
<el-input
v-model=
"form.description"
placeholder=
"中文描述作为自动api描述"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"文件名称"
prop=
"packageName"
>
<el-form-item
label=
"文件名称"
prop=
"packageName"
>
<el-input
v-model=
"form.packageName"
placeholder=
"生成文件的默认名称(建议为驼峰格式,首字母小写,如sysXxxXxxx)"
@
blur=
"toLowerCase(form,'packageName')"
/>
<el-input
v-model=
"form.packageName"
placeholder=
"生成文件的默认名称(建议为驼峰格式,首字母小写,如sysXxxXxxx)"
@
blur=
"toLowerCase
Func
(form,'packageName')"
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<
template
#label
>
<
template
#label
>
...
@@ -138,7 +138,7 @@
...
@@ -138,7 +138,7 @@
</div>
</div>
<!-- 组件弹窗 -->
<!-- 组件弹窗 -->
<el-dialog
v-model=
"dialogFlag"
title=
"组件内容"
>
<el-dialog
v-model=
"dialogFlag"
title=
"组件内容"
>
<FieldDialog
v-if=
"dialogFlag"
ref=
"fieldDialog"
:dialog-middle=
"dialogMiddle"
/>
<FieldDialog
v-if=
"dialogFlag"
ref=
"fieldDialog
Node
"
:dialog-middle=
"dialogMiddle"
/>
<
template
#footer
>
<
template
#footer
>
<div
class=
"dialog-footer"
>
<div
class=
"dialog-footer"
>
<el-button
size=
"mini"
@
click=
"closeDialog"
>
取 消
</el-button>
<el-button
size=
"mini"
@
click=
"closeDialog"
>
取 消
</el-button>
...
@@ -155,7 +155,7 @@
...
@@ -155,7 +155,7 @@
<el-button
size=
"mini"
type=
"primary"
@
click=
"copy"
>
复制
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"copy"
>
复制
</el-button>
</div>
</div>
</
template
>
</
template
>
<PreviewCodeDialog
v-if=
"previewFlag"
ref=
"preview"
:preview-code=
"preViewCode"
/>
<PreviewCodeDialog
v-if=
"previewFlag"
ref=
"preview
Node
"
:preview-code=
"preViewCode"
/>
<
template
#footer
>
<
template
#footer
>
<div
class=
"dialog-footer"
style=
"padding-top:14px;padding-right:14px"
>
<div
class=
"dialog-footer"
style=
"padding-top:14px;padding-right:14px"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"previewFlag = false"
>
确 定
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"previewFlag = false"
>
确 定
</el-button>
...
@@ -165,7 +165,8 @@
...
@@ -165,7 +165,8 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
setup
>
const
fieldTemplate
=
{
const
fieldTemplate
=
{
fieldName
:
''
,
fieldName
:
''
,
fieldDesc
:
''
,
fieldDesc
:
''
,
...
@@ -184,240 +185,230 @@ import PreviewCodeDialog from '@/view/systemTools/autoCode/component/previewCode
...
@@ -184,240 +185,230 @@ import PreviewCodeDialog from '@/view/systemTools/autoCode/component/previewCode
import
{
toUpperCase
,
toHump
,
toSQLLine
,
toLowerCase
}
from
'
@/utils/stringFun
'
import
{
toUpperCase
,
toHump
,
toSQLLine
,
toLowerCase
}
from
'
@/utils/stringFun
'
import
{
createTemp
,
getDB
,
getTable
,
getColumn
,
preview
,
getMeta
}
from
'
@/api/autoCode
'
import
{
createTemp
,
getDB
,
getTable
,
getColumn
,
preview
,
getMeta
}
from
'
@/api/autoCode
'
import
{
getDict
}
from
'
@/utils/dictionary
'
import
{
getDict
}
from
'
@/utils/dictionary
'
import
{
ref
,
getCurrentInstance
}
from
'
vue
'
import
{
useRoute
}
from
'
vue-router
'
import
{
ElMessage
}
from
'
element-plus
'
export
default
{
const
route
=
useRoute
()
name
:
'
AutoCode
'
,
const
activeNames
=
ref
([
''
])
components
:
{
const
preViewCode
=
ref
({})
FieldDialog
,
const
dbform
=
ref
({
PreviewCodeDialog
dbName
:
''
,
},
tableName
:
''
data
()
{
})
return
{
const
dbOptions
=
ref
([])
activeNames
:
[
''
],
const
tableOptions
=
ref
([])
preViewCode
:
{},
const
addFlag
=
ref
(
''
)
dbform
:
{
const
fdMap
=
ref
({})
dbName
:
''
,
const
form
=
ref
({
tableName
:
''
structName
:
''
,
},
tableName
:
''
,
dbOptions
:
[],
packageName
:
''
,
tableOptions
:
[],
abbreviation
:
''
,
addFlag
:
''
,
description
:
''
,
fdMap
:
{},
autoCreateApiToSql
:
false
,
form
:
{
autoMoveFile
:
false
,
structName
:
''
,
fields
:
[]
tableName
:
''
,
})
packageName
:
''
,
const
rules
=
ref
({
abbreviation
:
''
,
structName
:
[
description
:
''
,
{
required
:
true
,
message
:
'
请输入结构体名称
'
,
trigger
:
'
blur
'
}
autoCreateApiToSql
:
false
,
],
autoMoveFile
:
false
,
abbreviation
:
[
fields
:
[]
{
required
:
true
,
message
:
'
请输入结构体简称
'
,
trigger
:
'
blur
'
}
},
],
rules
:
{
description
:
[
structName
:
[
{
required
:
true
,
message
:
'
请输入结构体描述
'
,
trigger
:
'
blur
'
}
{
required
:
true
,
message
:
'
请输入结构体名称
'
,
trigger
:
'
blur
'
}
],
],
packageName
:
[
abbreviation
:
[
{
{
required
:
true
,
message
:
'
请输入结构体简称
'
,
trigger
:
'
blur
'
}
required
:
true
,
],
message
:
'
文件名称:sysXxxxXxxx
'
,
description
:
[
trigger
:
'
blur
'
{
required
:
true
,
message
:
'
请输入结构体描述
'
,
trigger
:
'
blur
'
}
],
packageName
:
[
{
required
:
true
,
message
:
'
文件名称:sysXxxxXxxx
'
,
trigger
:
'
blur
'
}
]
},
dialogMiddle
:
{},
bk
:
{},
dialogFlag
:
false
,
previewFlag
:
false
}
},
created
()
{
this
.
getDb
()
this
.
setFdMap
()
const
id
=
this
.
$route
.
params
.
id
if
(
id
)
{
this
.
getAutoCodeJson
(
id
)
}
}
},
]
methods
:
{
})
toLowerCase
(
form
,
key
)
{
const
dialogMiddle
=
ref
({})
form
[
key
]
=
toLowerCase
(
form
[
key
])
const
bk
=
ref
({})
},
const
dialogFlag
=
ref
(
false
)
selectText
()
{
const
previewFlag
=
ref
(
false
)
this
.
$refs
.
preview
.
selectText
()
},
const
toLowerCaseFunc
=
(
form
,
key
)
=>
{
copy
()
{
form
[
key
]
=
toLowerCase
(
form
[
key
])
this
.
$refs
.
preview
.
copy
()
}
},
const
previewNode
=
ref
(
null
)
editAndAddField
(
item
)
{
const
selectText
=
()
=>
{
this
.
dialogFlag
=
true
previewNode
.
value
.
selectText
()
if
(
item
)
{
}
this
.
addFlag
=
'
edit
'
const
copy
=
()
=>
{
this
.
bk
=
JSON
.
parse
(
JSON
.
stringify
(
item
))
previewNode
.
value
.
copy
()
this
.
dialogMiddle
=
item
}
}
else
{
const
editAndAddField
=
(
item
)
=>
{
this
.
addFlag
=
'
add
'
dialogFlag
.
value
=
true
this
.
dialogMiddle
=
JSON
.
parse
(
JSON
.
stringify
(
fieldTemplate
))
if
(
item
)
{
}
addFlag
.
value
=
'
edit
'
},
bk
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
item
))
moveUpField
(
index
)
{
dialogMiddle
.
value
=
item
if
(
index
===
0
)
{
}
else
{
return
addFlag
.
value
=
'
add
'
}
dialogMiddle
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
fieldTemplate
))
const
oldUpField
=
this
.
form
.
fields
[
index
-
1
]
}
this
.
form
.
fields
.
splice
(
index
-
1
,
1
)
}
this
.
form
.
fields
.
splice
(
index
,
0
,
oldUpField
)
const
moveUpField
=
(
index
)
=>
{
},
if
(
index
===
0
)
{
moveDownField
(
index
)
{
return
const
fCount
=
this
.
form
.
fields
.
length
}
if
(
index
===
fCount
-
1
)
{
const
oldUpField
=
form
.
value
.
fields
[
index
-
1
]
return
form
.
value
.
fields
.
splice
(
index
-
1
,
1
)
form
.
value
.
fields
.
splice
(
index
,
0
,
oldUpField
)
}
const
moveDownField
=
(
index
)
=>
{
const
fCount
=
form
.
value
.
fields
.
length
if
(
index
===
fCount
-
1
)
{
return
}
const
oldDownField
=
form
.
value
.
fields
[
index
+
1
]
form
.
value
.
fields
.
splice
(
index
+
1
,
1
)
form
.
value
.
fields
.
splice
(
index
,
0
,
oldDownField
)
}
const
currentInstance
=
getCurrentInstance
()
const
enterDialog
=
()
=>
{
currentInstance
.
refs
.
fieldDialogNode
.
fieldDialogFrom
.
validate
(
valid
=>
{
if
(
valid
)
{
dialogMiddle
.
value
.
fieldName
=
toUpperCase
(
dialogMiddle
.
value
.
fieldName
)
if
(
addFlag
.
value
===
'
add
'
)
{
form
.
value
.
fields
.
push
(
dialogMiddle
.
value
)
}
}
const
oldDownField
=
this
.
form
.
fields
[
index
+
1
]
dialogFlag
.
value
=
false
this
.
form
.
fields
.
splice
(
index
+
1
,
1
)
}
else
{
this
.
form
.
fields
.
splice
(
index
,
0
,
oldDownField
)
return
false
},
}
enterDialog
()
{
})
this
.
$refs
.
fieldDialog
.
$refs
.
fieldDialogFrom
.
validate
(
valid
=>
{
}
if
(
valid
)
{
const
closeDialog
=
()
=>
{
this
.
dialogMiddle
.
fieldName
=
toUpperCase
(
if
(
addFlag
.
value
===
'
edit
'
)
{
this
.
dialogMiddle
.
fieldName
dialogMiddle
.
value
=
bk
.
value
)
}
if
(
this
.
addFlag
===
'
add
'
)
{
dialogFlag
.
value
=
false
this
.
form
.
fields
.
push
(
this
.
dialogMiddle
)
}
}
const
deleteField
=
(
index
)
=>
{
this
.
dialogFlag
=
false
form
.
value
.
fields
.
splice
(
index
,
1
)
}
else
{
}
return
false
const
autoCodeForm
=
ref
(
null
)
const
enterForm
=
async
(
isPreview
)
=>
{
if
(
form
.
value
.
fields
.
length
<=
0
)
{
ElMessage
({
type
:
'
error
'
,
message
:
'
请填写至少一个field
'
})
return
false
}
if
(
form
.
value
.
fields
.
some
(
item
=>
item
.
fieldName
===
form
.
value
.
structName
)
)
{
ElMessage
({
type
:
'
error
'
,
message
:
'
存在与结构体同名的字段
'
})
return
false
}
autoCodeForm
.
value
.
validate
(
async
valid
=>
{
if
(
valid
)
{
for
(
const
key
in
form
.
value
)
{
if
(
typeof
form
.
value
[
key
]
===
'
string
'
)
{
form
.
value
[
key
]
=
form
.
value
[
key
].
trim
()
}
}
})
},
closeDialog
()
{
if
(
this
.
addFlag
===
'
edit
'
)
{
this
.
dialogMiddle
=
this
.
bk
}
this
.
dialogFlag
=
false
},
deleteField
(
index
)
{
this
.
form
.
fields
.
splice
(
index
,
1
)
},
async
enterForm
(
isPreview
)
{
if
(
this
.
form
.
fields
.
length
<=
0
)
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
请填写至少一个field
'
})
return
false
}
}
if
(
form
.
value
.
structName
=
toUpperCase
(
form
.
value
.
structName
)
this
.
form
.
fields
.
some
(
item
=>
item
.
fieldName
===
this
.
form
.
structName
)
if
(
form
.
value
.
tableName
)
{
form
.
value
.
tableName
=
form
.
value
.
tableName
.
replace
(
'
'
,
''
)
}
)
{
if
(
form
.
value
.
structName
===
form
.
value
.
abbreviation
)
{
this
.
$m
essage
({
ElM
essage
({
type
:
'
error
'
,
type
:
'
error
'
,
message
:
'
存在与结构体同名的字段
'
message
:
'
structName和struct简称不能相同
'
})
})
return
false
return
false
}
}
this
.
$refs
.
autoCodeForm
.
validate
(
async
valid
=>
{
form
.
value
.
humpPackageName
=
toSQLLine
(
form
.
value
.
packageName
)
if
(
valid
)
{
if
(
isPreview
)
{
for
(
const
key
in
this
.
form
)
{
const
data
=
await
preview
(
form
.
value
)
if
(
typeof
this
.
form
[
key
]
===
'
string
'
)
{
preViewCode
.
value
=
data
.
data
.
autoCode
this
.
form
[
key
]
=
this
.
form
[
key
].
trim
()
previewFlag
.
value
=
true
}
}
else
{
}
const
data
=
await
createTemp
(
form
.
value
)
this
.
form
.
structName
=
toUpperCase
(
this
.
form
.
structName
)
if
(
data
.
headers
?.
success
===
'
false
'
)
{
if
(
this
.
form
.
tableName
)
{
this
.
form
.
tableName
=
this
.
form
.
tableName
.
replace
(
'
'
,
''
)
}
return
if
(
this
.
form
.
structName
===
this
.
form
.
abbreviation
)
{
}
else
{
this
.
$message
({
if
(
form
.
value
.
autoMoveFile
)
{
type
:
'
error
'
,
ElMessage
({
message
:
'
structName和struct简称不能相同
'
type
:
'
success
'
,
message
:
'
自动化代码创建成功,自动移动成功
'
})
})
return
false
return
}
this
.
form
.
humpPackageName
=
toSQLLine
(
this
.
form
.
packageName
)
if
(
isPreview
)
{
const
data
=
await
preview
(
this
.
form
)
this
.
preViewCode
=
data
.
data
.
autoCode
this
.
previewFlag
=
true
}
else
{
const
data
=
await
createTemp
(
this
.
form
)
if
(
data
.
headers
?.
success
===
'
false
'
)
{
return
}
else
{
if
(
this
.
form
.
autoMoveFile
)
{
this
.
$message
({
type
:
'
success
'
,
message
:
'
自动化代码创建成功,自动移动成功
'
})
return
}
this
.
$message
({
type
:
'
success
'
,
message
:
'
自动化代码创建成功,正在下载
'
})
}
const
blob
=
new
Blob
([
data
])
const
fileName
=
'
ginvueadmin.zip
'
if
(
'
download
'
in
document
.
createElement
(
'
a
'
))
{
// 不是IE浏览器
const
url
=
window
.
URL
.
createObjectURL
(
blob
)
const
link
=
document
.
createElement
(
'
a
'
)
link
.
style
.
display
=
'
none
'
link
.
href
=
url
link
.
setAttribute
(
'
download
'
,
fileName
)
document
.
body
.
appendChild
(
link
)
link
.
click
()
document
.
body
.
removeChild
(
link
)
// 下载完成移除元素
window
.
URL
.
revokeObjectURL
(
url
)
// 释放掉blob对象
}
else
{
// IE 10+
window
.
navigator
.
msSaveBlob
(
blob
,
fileName
)
}
}
}
ElMessage
({
type
:
'
success
'
,
message
:
'
自动化代码创建成功,正在下载
'
})
}
const
blob
=
new
Blob
([
data
])
const
fileName
=
'
ginvueadmin.zip
'
if
(
'
download
'
in
document
.
createElement
(
'
a
'
))
{
// 不是IE浏览器
const
url
=
window
.
URL
.
createObjectURL
(
blob
)
const
link
=
document
.
createElement
(
'
a
'
)
link
.
style
.
display
=
'
none
'
link
.
href
=
url
link
.
setAttribute
(
'
download
'
,
fileName
)
document
.
body
.
appendChild
(
link
)
link
.
click
()
document
.
body
.
removeChild
(
link
)
// 下载完成移除元素
window
.
URL
.
revokeObjectURL
(
url
)
// 释放掉blob对象
}
else
{
}
else
{
return
false
// IE 10+
window
.
navigator
.
msSaveBlob
(
blob
,
fileName
)
}
}
})
},
async
getDb
()
{
const
res
=
await
getDB
()
if
(
res
.
code
===
0
)
{
this
.
dbOptions
=
res
.
data
.
dbs
}
}
},
}
else
{
async
getTable
()
{
return
false
const
res
=
await
getTable
({
dbName
:
this
.
dbform
.
dbName
})
}
if
(
res
.
code
===
0
)
{
})
this
.
tableOptions
=
res
.
data
.
tables
}
}
const
getDbFunc
=
async
()
=>
{
this
.
dbform
.
tableName
=
''
const
res
=
await
getDB
()
},
if
(
res
.
code
===
0
)
{
async
getColumn
()
{
dbOptions
.
value
=
res
.
data
.
dbs
const
gormModelList
=
[
'
id
'
,
'
created_at
'
,
'
updated_at
'
,
'
deleted_at
'
]
}
const
res
=
await
getColumn
(
this
.
dbform
)
}
if
(
res
.
code
===
0
)
{
const
getTableFunc
=
async
()
=>
{
const
tbHump
=
toHump
(
this
.
dbform
.
tableName
)
const
res
=
await
getTable
({
dbName
:
dbform
.
value
.
dbName
})
this
.
form
.
structName
=
toUpperCase
(
tbHump
)
if
(
res
.
code
===
0
)
{
this
.
form
.
tableName
=
this
.
dbform
.
tableName
tableOptions
.
value
=
res
.
data
.
tables
this
.
form
.
packageName
=
tbHump
}
this
.
form
.
abbreviation
=
tbHump
dbform
.
value
.
tableName
=
''
this
.
form
.
description
=
tbHump
+
'
表
'
}
this
.
form
.
autoCreateApiToSql
=
true
const
getColumnFunc
=
async
()
=>
{
this
.
form
.
fields
=
[]
const
gormModelList
=
[
'
id
'
,
'
created_at
'
,
'
updated_at
'
,
'
deleted_at
'
]
res
.
data
.
columns
&&
const
res
=
await
getColumn
(
dbform
.
value
)
if
(
res
.
code
===
0
)
{
const
tbHump
=
toHump
(
dbform
.
value
.
tableName
)
form
.
value
.
structName
=
toUpperCase
(
tbHump
)
form
.
value
.
tableName
=
dbform
.
value
.
tableName
form
.
value
.
packageName
=
tbHump
form
.
value
.
abbreviation
=
tbHump
form
.
value
.
description
=
tbHump
+
'
表
'
form
.
value
.
autoCreateApiToSql
=
true
form
.
value
.
fields
=
[]
res
.
data
.
columns
&&
res
.
data
.
columns
.
forEach
(
item
=>
{
res
.
data
.
columns
.
forEach
(
item
=>
{
if
(
!
gormModelList
.
some
(
gormfd
=>
gormfd
===
item
.
columnName
))
{
if
(
!
gormModelList
.
some
(
gormfd
=>
gormfd
===
item
.
columnName
))
{
const
fbHump
=
toHump
(
item
.
columnName
)
const
fbHump
=
toHump
(
item
.
columnName
)
this
.
form
.
fields
.
push
({
form
.
value
.
fields
.
push
({
fieldName
:
toUpperCase
(
fbHump
),
fieldName
:
toUpperCase
(
fbHump
),
fieldDesc
:
item
.
columnComment
||
fbHump
+
'
字段
'
,
fieldDesc
:
item
.
columnComment
||
fbHump
+
'
字段
'
,
fieldType
:
this
.
fdMap
[
item
.
dataType
],
fieldType
:
fdMap
.
value
[
item
.
dataType
],
dataType
:
item
.
dataType
,
dataType
:
item
.
dataType
,
fieldJson
:
fbHump
,
fieldJson
:
fbHump
,
dataTypeLong
:
item
.
dataTypeLong
&&
item
.
dataTypeLong
.
split
(
'
,
'
)[
0
],
dataTypeLong
:
item
.
dataTypeLong
&&
item
.
dataTypeLong
.
split
(
'
,
'
)[
0
],
...
@@ -428,25 +419,41 @@ export default {
...
@@ -428,25 +419,41 @@ export default {
})
})
}
}
})
})
}
},
async
setFdMap
()
{
const
fdTypes
=
[
'
string
'
,
'
int
'
,
'
bool
'
,
'
float64
'
,
'
time.Time
'
]
fdTypes
.
forEach
(
async
fdtype
=>
{
const
res
=
await
getDict
(
fdtype
)
res
&&
res
.
forEach
(
item
=>
{
this
.
fdMap
[
item
.
label
]
=
fdtype
})
})
},
async
getAutoCodeJson
(
id
)
{
const
res
=
await
getMeta
({
id
:
Number
(
id
)
})
if
(
res
.
code
===
0
)
{
this
.
form
=
JSON
.
parse
(
res
.
data
.
meta
)
}
}
}
}
}
}
const
setFdMap
=
async
()
=>
{
const
fdTypes
=
[
'
string
'
,
'
int
'
,
'
bool
'
,
'
float64
'
,
'
time.Time
'
]
fdTypes
.
forEach
(
async
fdtype
=>
{
const
res
=
await
getDict
(
fdtype
)
res
&&
res
.
forEach
(
item
=>
{
fdMap
.
value
[
item
.
label
]
=
fdtype
})
})
}
const
getAutoCodeJson
=
async
(
id
)
=>
{
const
res
=
await
getMeta
({
id
:
Number
(
id
)
})
if
(
res
.
code
===
0
)
{
form
.
value
=
JSON
.
parse
(
res
.
data
.
meta
)
}
}
const
init
=
()
=>
{
getDbFunc
()
setFdMap
()
const
id
=
route
.
params
.
id
if
(
id
)
{
getAutoCodeJson
(
id
)
}
}
init
()
</
script
>
<
script
>
export
default
{
name
:
'
AutoCode
'
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
...
...
web/src/view/systemTools/autoCodeAdmin/index.vue
浏览文件 @
80c851d8
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
<el-table-column
align=
"left"
label=
"操作"
min-width=
"180"
>
<el-table-column
align=
"left"
label=
"操作"
min-width=
"180"
>
<
template
#default=
"scope"
>
<
template
#default=
"scope"
>
<div>
<div>
<el-button
size=
"mini"
type=
"text"
:disabled=
"scope.row.flag === 1"
@
click=
"rollback(scope.row)"
>
回滚
</el-button>
<el-button
size=
"mini"
type=
"text"
:disabled=
"scope.row.flag === 1"
@
click=
"rollback
Func
(scope.row)"
>
回滚
</el-button>
<el-button
size=
"mini"
type=
"text"
@
click=
"goAutoCode(scope.row)"
>
复用
</el-button>
<el-button
size=
"mini"
type=
"text"
@
click=
"goAutoCode(scope.row)"
>
复用
</el-button>
<el-button
size=
"mini"
type=
"text"
@
click=
"deleteRow(scope.row)"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"text"
@
click=
"deleteRow(scope.row)"
>
删除
</el-button>
</div>
</div>
...
@@ -62,59 +62,87 @@
...
@@ -62,59 +62,87 @@
</template>
</template>
<
script
>
<
script
>
// 获取列表内容封装在mixins内部 getTableData方法 初始化已封装完成 条件搜索时候 请把条件安好后台定制的结构体字段 放到 this.searchInfo 中即可实现条件搜索
export
default
{
name
:
'
AutoCodeAdmin
'
,
}
</
script
>
<
script
setup
>
import
{
getSysHistory
,
rollback
,
delSysHistory
}
from
'
@/api/autoCode.js
'
import
{
getSysHistory
,
rollback
,
delSysHistory
}
from
'
@/api/autoCode.js
'
import
infoList
from
'
@/mixins/infoList
'
import
{
useRouter
}
from
'
vue-router
'
import
{
ElMessage
,
ElMessageBox
}
from
'
element-plus
'
import
{
ref
}
from
'
vue
'
import
{
formatDate
}
from
'
@/utils/format
'
const
router
=
useRouter
()
export
default
{
const
page
=
ref
(
1
)
name
:
'
Api
'
,
const
total
=
ref
(
0
)
mixins
:
[
infoList
],
const
pageSize
=
ref
(
10
)
data
()
{
const
tableData
=
ref
([])
return
{
listApi
:
getSysHistory
// 分页
const
handleSizeChange
=
(
val
)
=>
{
pageSize
.
value
=
val
getTableData
()
}
const
handleCurrentChange
=
(
val
)
=>
{
page
.
value
=
val
getTableData
()
}
// 查询
const
getTableData
=
async
()
=>
{
const
table
=
await
getSysHistory
({
page
:
page
.
value
,
pageSize
:
pageSize
.
value
})
if
(
table
.
code
===
0
)
{
tableData
.
value
=
table
.
data
.
list
total
.
value
=
table
.
data
.
total
page
.
value
=
table
.
data
.
page
pageSize
.
value
=
table
.
data
.
pageSize
}
}
getTableData
()
const
deleteRow
=
async
(
row
)
=>
{
ElMessageBox
.
confirm
(
'
此操作将删除本历史, 是否继续?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
(
async
()
=>
{
const
res
=
await
delSysHistory
({
id
:
Number
(
row
.
ID
)
})
if
(
res
.
code
===
0
)
{
ElMessage
.
success
(
'
删除成功
'
)
getTableData
()
}
}
},
})
created
()
{
}
this
.
getTableData
()
const
rollbackFunc
=
async
(
row
)
=>
{
},
ElMessageBox
.
confirm
(
'
此操作将删除自动创建的文件和api, 是否继续?
'
,
'
提示
'
,
{
methods
:
{
confirmButtonText
:
'
确定
'
,
async
deleteRow
(
row
)
{
cancelButtonText
:
'
取消
'
,
this
.
$confirm
(
'
此操作将删除本历史, 是否继续?
'
,
'
提示
'
,
{
type
:
'
warning
'
confirmButtonText
:
'
确定
'
,
}).
then
(
async
()
=>
{
cancelButtonText
:
'
取消
'
,
const
res
=
await
rollback
({
id
:
Number
(
row
.
ID
)
})
type
:
'
warning
'
if
(
res
.
code
===
0
)
{
}).
then
(
async
()
=>
{
ElMessage
.
success
(
'
回滚成功
'
)
const
res
=
await
delSysHistory
({
id
:
Number
(
row
.
ID
)
})
getTableData
()
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
'
删除成功
'
)
this
.
getTableData
()
}
})
},
async
rollback
(
row
)
{
this
.
$confirm
(
'
此操作将删除自动创建的文件和api, 是否继续?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
(
async
()
=>
{
const
res
=
await
rollback
({
id
:
Number
(
row
.
ID
)
})
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
'
回滚成功
'
)
this
.
getTableData
()
}
})
},
goAutoCode
(
row
)
{
if
(
row
)
{
this
.
$router
.
push
({
name
:
'
autoCodeEdit
'
,
params
:
{
id
:
row
.
ID
}})
}
else
{
this
.
$router
.
push
({
name
:
'
autoCode
'
})
}
}
}
})
}
const
goAutoCode
=
(
row
)
=>
{
if
(
row
)
{
router
.
push
({
name
:
'
autoCodeEdit
'
,
params
:
{
id
:
row
.
ID
}})
}
else
{
router
.
push
({
name
:
'
autoCode
'
})
}
}
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
...
...
web/src/view/systemTools/formCreate/index.vue
浏览文件 @
80c851d8
...
@@ -5,15 +5,13 @@
...
@@ -5,15 +5,13 @@
</
template
>
</
template
>
<
script
>
<
script
>
var
path
=
import
.
meta
.
env
.
VITE_BASE_PATH
var
port
=
import
.
meta
.
env
.
VITE_SERVER_PORT
export
default
{
export
default
{
name
:
'
FormGenerator
'
,
name
:
'
FormGenerator
'
data
()
{
return
{
basePath
:
path
,
basePort
:
port
}
}
}
}
</
script
>
</
script
>
<
script
setup
>
import
{
ref
}
from
'
vue
'
const
basePath
=
ref
(
import
.
meta
.
env
.
VITE_BASE_PATH
)
const
basePort
=
ref
(
import
.
meta
.
env
.
VITE_SERVER_PORT
)
</
script
>
web/src/view/systemTools/system/system.vue
浏览文件 @
80c851d8
...
@@ -127,19 +127,6 @@
...
@@ -127,19 +127,6 @@
<el-input
v-model.number=
"config.captcha.imgHeight"
/>
<el-input
v-model.number=
"config.captcha.imgHeight"
/>
</el-form-item>
</el-form-item>
</el-collapse-item>
</el-collapse-item>
<el-collapse-item
title=
"验证码配置"
name=
"8"
>
<el-form-item
label=
"keyLong"
>
<el-input
v-model.number=
"config.captcha.keyLong"
/>
</el-form-item>
<el-form-item
label=
"imgWidth"
>
<el-input
v-model.number=
"config.captcha.imgWidth"
/>
</el-form-item>
<el-form-item
label=
"imgHeight"
>
<el-input
v-model.number=
"config.captcha.imgHeight"
/>
</el-form-item>
</el-collapse-item>
<el-collapse-item
title=
"数据库配置"
name=
"9"
>
<el-collapse-item
title=
"数据库配置"
name=
"9"
>
<template
v-if=
"config.system.dbType === 'mysql'"
>
<template
v-if=
"config.system.dbType === 'mysql'"
>
<el-form-item
label=
"username"
>
<el-form-item
label=
"username"
>
...
@@ -353,73 +340,72 @@
...
@@ -353,73 +340,72 @@
</template>
</template>
<
script
>
<
script
>
export
default
{
name
:
'
Config
'
}
</
script
>
<
script
setup
>
import
{
getSystemConfig
,
setSystemConfig
}
from
'
@/api/system
'
import
{
getSystemConfig
,
setSystemConfig
}
from
'
@/api/system
'
import
{
emailTest
}
from
'
@/api/email
'
import
{
emailTest
}
from
'
@/api/email
'
export
default
{
import
{
ref
}
from
'
vue
'
name
:
'
Config
'
,
import
{
ElMessage
}
from
'
element-plus
'
data
()
{
return
{
const
config
=
ref
({
config
:
{
system
:
{},
system
:
{},
jwt
:
{},
jwt
:
{},
casbin
:
{},
casbin
:
{},
mysql
:
{},
mysql
:
{},
pgsql
:
{},
pgsql
:
{},
excel
:
{},
excel
:
{},
autoCode
:
{},
autoCode
:
{},
redis
:
{},
redis
:
{},
qiniu
:
{},
qiniu
:
{},
tencentCOS
:
{},
tencentCOS
:
{},
aliyunOSS
:
{},
aliyunOSS
:
{},
huaWeiObs
:
{},
huaWeiObs
:
{},
captcha
:
{},
captcha
:
{},
zap
:
{},
zap
:
{},
local
:
{},
local
:
{},
email
:
{},
email
:
{},
timer
:
{
timer
:
{
detail
:
{}
detail
:
{}
}
}
})
}
}
const
initForm
=
async
()
=>
{
},
const
res
=
await
getSystemConfig
()
async
created
()
{
if
(
res
.
code
===
0
)
{
await
this
.
initForm
()
config
.
value
=
res
.
data
.
config
},
}
methods
:
{
}
async
initForm
()
{
initForm
()
const
res
=
await
getSystemConfig
()
const
reload
=
()
=>
{}
if
(
res
.
code
===
0
)
{
const
update
=
async
()
=>
{
this
.
config
=
res
.
data
.
config
const
res
=
await
setSystemConfig
({
config
:
config
.
value
})
}
if
(
res
.
code
===
0
)
{
},
ElMessage
({
reload
()
{},
type
:
'
success
'
,
async
update
()
{
message
:
'
配置文件设置成功
'
const
res
=
await
setSystemConfig
({
config
:
this
.
config
})
})
if
(
res
.
code
===
0
)
{
await
initForm
()
this
.
$message
({
type
:
'
success
'
,
message
:
'
配置文件设置成功
'
})
await
this
.
initForm
()
}
},
async
email
()
{
const
res
=
await
emailTest
()
if
(
res
.
code
===
0
)
{
this
.
$message
({
type
:
'
success
'
,
message
:
'
邮件发送成功
'
})
await
this
.
initForm
()
}
else
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
邮件发送失败
'
})
}
}
}
}
}
}
const
email
=
async
()
=>
{
const
res
=
await
emailTest
()
if
(
res
.
code
===
0
)
{
ElMessage
({
type
:
'
success
'
,
message
:
'
邮件发送成功
'
})
await
initForm
()
}
else
{
ElMessage
({
type
:
'
error
'
,
message
:
'
邮件发送失败
'
})
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录