Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
a8f2ff45
Commit
a8f2ff45
authored
Sep 24, 2021
by
若依
Committed by
Gitee
Sep 24, 2021
Browse files
!331 update 代码生成编辑页面 拼写错误修正
Merge pull request !331 from 疯狂的狮子Li/master
parents
64802828
eaa3baab
Changes
1
Hide whitespace changes
Inline
Side-by-side
ruoyi-ui/src/views/tool/gen/editTable.vue
View file @
a8f2ff45
...
...
@@ -4,8 +4,8 @@
<el-tab-pane
label=
"基本信息"
name=
"basic"
>
<basic-info-form
ref=
"basicInfo"
:info=
"info"
/>
</el-tab-pane>
<el-tab-pane
label=
"字段信息"
name=
"c
loum
"
>
<el-table
ref=
"dragTable"
:data=
"c
l
oumns"
row-key=
"columnId"
:max-height=
"tableHeight"
>
<el-tab-pane
label=
"字段信息"
name=
"c
olumnInfo
"
>
<el-table
ref=
"dragTable"
:data=
"co
l
umns"
row-key=
"columnId"
:max-height=
"tableHeight"
>
<el-table-column
label=
"序号"
type=
"index"
min-width=
"5%"
class-name=
"allowDrag"
/>
<el-table-column
label=
"字段列名"
...
...
@@ -141,13 +141,13 @@ export default {
data
()
{
return
{
// 选中选项卡的 name
activeName
:
"
c
loum
"
,
activeName
:
"
c
olumnInfo
"
,
// 表格的高度
tableHeight
:
document
.
documentElement
.
scrollHeight
-
245
+
"
px
"
,
// 表信息
tables
:
[],
// 表列信息
c
l
oumns
:
[],
co
l
umns
:
[],
// 字典信息
dictOptions
:
[],
// 菜单信息
...
...
@@ -161,7 +161,7 @@ export default {
if
(
tableId
)
{
// 获取表详细信息
getGenTable
(
tableId
).
then
(
res
=>
{
this
.
c
l
oumns
=
res
.
data
.
rows
;
this
.
co
l
umns
=
res
.
data
.
rows
;
this
.
info
=
res
.
data
.
info
;
this
.
tables
=
res
.
data
.
tables
;
});
...
...
@@ -184,7 +184,7 @@ export default {
const
validateResult
=
res
.
every
(
item
=>
!!
item
);
if
(
validateResult
)
{
const
genTable
=
Object
.
assign
({},
basicForm
.
model
,
genForm
.
model
);
genTable
.
columns
=
this
.
c
l
oumns
;
genTable
.
columns
=
this
.
co
l
umns
;
genTable
.
params
=
{
treeCode
:
genTable
.
treeCode
,
treeName
:
genTable
.
treeName
,
...
...
@@ -220,10 +220,10 @@ export default {
const
sortable
=
Sortable
.
create
(
el
,
{
handle
:
"
.allowDrag
"
,
onEnd
:
evt
=>
{
const
targetRow
=
this
.
c
l
oumns
.
splice
(
evt
.
oldIndex
,
1
)[
0
];
this
.
c
l
oumns
.
splice
(
evt
.
newIndex
,
0
,
targetRow
);
for
(
let
index
in
this
.
c
l
oumns
)
{
this
.
c
l
oumns
[
index
].
sort
=
parseInt
(
index
)
+
1
;
const
targetRow
=
this
.
co
l
umns
.
splice
(
evt
.
oldIndex
,
1
)[
0
];
this
.
co
l
umns
.
splice
(
evt
.
newIndex
,
0
,
targetRow
);
for
(
let
index
in
this
.
co
l
umns
)
{
this
.
co
l
umns
[
index
].
sort
=
parseInt
(
index
)
+
1
;
}
}
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment