Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yaru
fgqyxxlr
Commits
3846329c
Commit
3846329c
authored
Jun 21, 2020
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码生成主子表序号调整
parent
326fe6a6
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
20 deletions
+19
-20
ruoyi-admin/src/main/resources/static/ruoyi/js/common.js
+1
-11
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
+3
-2
ruoyi-admin/src/main/resources/templates/demo/table/subdata.html
+5
-2
ruoyi-generator/src/main/resources/vm/html/add.html.vm
+5
-2
ruoyi-generator/src/main/resources/vm/html/edit.html.vm
+5
-3
No files found.
ruoyi-admin/src/main/resources/static/ruoyi/js/common.js
View file @
3846329c
...
...
@@ -365,6 +365,7 @@ var sub = {
$
(
"#"
+
table
.
options
.
id
).
bootstrapTable
(
"updateRow"
,
params
);
},
delColumn
:
function
(
column
)
{
sub
.
editColumn
();
var
subColumn
=
$
.
common
.
isEmpty
(
column
)
?
"index"
:
column
;
var
ids
=
$
.
table
.
selectColumns
(
subColumn
);
if
(
ids
.
length
==
0
)
{
...
...
@@ -372,17 +373,6 @@ var sub = {
return
;
}
$
(
"#"
+
table
.
options
.
id
).
bootstrapTable
(
'remove'
,
{
field
:
subColumn
,
values
:
ids
});
if
(
$
.
common
.
equals
(
"index"
,
subColumn
))
{
sub
.
resetIndex
();
}
},
resetIndex
:
function
(
msg
)
{
var
count
=
$
(
"#"
+
table
.
options
.
id
).
bootstrapTable
(
'getData'
).
length
;
for
(
var
index
=
0
;
index
<=
count
;
index
++
)
{
// 重置序号
$
(
"#"
+
table
.
options
.
id
).
bootstrapTable
(
'updateRow'
,
{
index
:
index
,
row
:
{
index
:
parseInt
(
index
+
1
)
}
})
}
}
};
...
...
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
View file @
3846329c
...
...
@@ -45,6 +45,7 @@ var table = {
pagination
:
true
,
paginationLoop
:
false
,
pageSize
:
10
,
pageNumber
:
1
,
pageList
:
[
10
,
25
,
50
],
toolbar
:
"toolbar"
,
striped
:
false
,
...
...
@@ -275,8 +276,8 @@ var table = {
serialNumber
:
function
(
index
,
tableId
)
{
var
currentId
=
$
.
common
.
isEmpty
(
tableId
)
?
table
.
options
.
id
:
tableId
;
var
tableParams
=
$
(
"#"
+
currentId
).
bootstrapTable
(
'getOptions'
);
var
pageSize
=
tableParam
s
.
pageSize
;
var
pageNumber
=
tableParam
s
.
pageNumber
;
var
pageSize
=
$
.
common
.
isNotEmpty
(
tableParams
.
pageSize
)
?
tableParams
.
pageSize
:
table
.
option
s
.
pageSize
;
var
pageNumber
=
$
.
common
.
isNotEmpty
(
tableParams
.
pageNumber
)
?
tableParams
.
pageNumber
:
table
.
option
s
.
pageNumber
;
return
pageSize
*
(
pageNumber
-
1
)
+
index
+
1
;
},
// 列超出指定长度浮动提示 target(copy单击复制文本 open弹窗打开文本)
...
...
ruoyi-admin/src/main/resources/templates/demo/table/subdata.html
View file @
3846329c
...
...
@@ -96,7 +96,11 @@
{
field
:
'index'
,
align
:
'center'
,
title
:
"序号"
title
:
"序号"
,
formatter
:
function
(
value
,
row
,
index
)
{
var
columnIndex
=
$
.
common
.
sprintf
(
"<input type='hidden' name='index' value='%s'>"
,
$
.
table
.
serialNumber
(
index
));
return
columnIndex
+
$
.
table
.
serialNumber
(
index
);
}
},
{
field
:
'name'
,
...
...
@@ -164,7 +168,6 @@
type
:
""
,
}
});
sub
.
resetIndex
();
}
</script>
</body>
...
...
ruoyi-generator/src/main/resources/vm/html/add.html.vm
View file @
3846329c
...
...
@@ -210,7 +210,11 @@
{
field
:
'index'
,
align
:
'center'
,
title
:
"序号"
title
:
"序号"
,
formatter
:
function
(
value
,
row
,
index
)
{
var
columnIndex
=
$
.
common
.
sprintf
(
"<input type='hidden' name='index' value='%s'>"
,
$
.
table
.
serialNumber
(
index
));
return
columnIndex
+
$
.
table
.
serialNumber
(
index
);
}
},
#
foreach
(
$column
in
$subTable
.
columns
)
#
set
(
$dictType
=
$column
.
dictType
)
...
...
@@ -269,7 +273,6 @@
#
end
}
});
sub
.
resetIndex
();
}
#
end
</script>
...
...
ruoyi-generator/src/main/resources/vm/html/edit.html.vm
View file @
3846329c
...
...
@@ -211,7 +211,11 @@
{
field
:
'index'
,
align
:
'center'
,
title
:
"序号"
title
:
"序号"
,
formatter
:
function
(
value
,
row
,
index
)
{
var
columnIndex
=
$
.
common
.
sprintf
(
"<input type='hidden' name='index' value='%s'>"
,
$
.
table
.
serialNumber
(
index
));
return
columnIndex
+
$
.
table
.
serialNumber
(
index
);
}
},
#
foreach
(
$column
in
$subTable
.
columns
)
#
set
(
$dictType
=
$column
.
dictType
)
...
...
@@ -250,7 +254,6 @@
}]
};
$
.
table
.
init
(
options
);
sub
.
resetIndex
();
});
function
addColumn
()
{
...
...
@@ -271,7 +274,6 @@
#
end
}
});
sub
.
resetIndex
();
}
#
end
</script>
...
...
Write
Preview
Markdown
is supported
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