Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
Project
Project
Details
Activity
Releases
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
黄媛媛
ElectricitySheep
Commits
c7d28c24
Commit
c7d28c24
authored
Aug 19, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增排序
parent
0f517a30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
4 deletions
+29
-4
shareCategory.vue
src/components/Share/shareCategory.vue
+29
-4
No files found.
src/components/Share/shareCategory.vue
View file @
c7d28c24
...
...
@@ -16,6 +16,7 @@
@
click=
"msg.pageIndex=1,getList()"
>
</span>
</div>
<br>
<el-button
@
click=
"saveSort()"
size=
"small"
type=
"primary"
>
保存排序
</el-button>
<div
v-loading=
"loading"
flex=
"dir:left box:mean"
class=
"cat-list"
style=
"margin-top:20px;"
>
<el-card
class=
"card-item-box"
shadow=
"never"
>
<div
slot=
"header"
class=
"clearfix"
>
...
...
@@ -159,7 +160,8 @@
<el-input
type=
"text"
size=
"small"
v-model=
"addMsg.Name"
></el-input>
</el-form-item>
<el-form-item
label=
"排序"
>
<el-input
type=
"text"
size=
"small"
v-model=
"addMsg.SortNum"
@
keyup
.
native=
"checkInteger(addMsg,'SortNum')"
></el-input>
<el-input
type=
"text"
size=
"small"
v-model=
"addMsg.SortNum"
@
keyup
.
native=
"checkInteger(addMsg,'SortNum')"
></el-input>
</el-form-item>
</el-form>
</div>
...
...
@@ -309,8 +311,8 @@
this
.
addMsg
.
Name
=
tempObj
.
Name
;
this
.
addMsg
.
Level
=
tempObj
.
Level
;
this
.
addMsg
.
ParentId
=
tempObj
.
ParentId
;
this
.
addMsg
.
FirstLevelName
=
tempObj
.
FirstLevelName
;
this
.
addMsg
.
SecondLevelName
=
tempObj
.
SecondLevelName
;
this
.
addMsg
.
FirstLevelName
=
tempObj
.
FirstLevelName
;
this
.
addMsg
.
SecondLevelName
=
tempObj
.
SecondLevelName
;
this
.
IsShowCategory
=
false
;
}
}
else
{
...
...
@@ -402,7 +404,30 @@
this
.
active2
=
index
;
this
.
addMsg
.
ParentId
=
item
.
Id
;
},
//批量修改排序
saveSort
()
{
this
.
sortList
=
[];
this
.
dataFirst
.
forEach
((
item
,
index
)
=>
{
item
.
children
.
forEach
((
item2
,
index2
)
=>
{
let
obj
=
{
Id
:
item2
.
Id
,
SortNum
:
index2
+
1
,
}
this
.
sortList
.
push
(
obj
)
})
let
obj
=
{
Id
:
item
.
Id
,
SortNum
:
index
+
1
,
}
this
.
sortList
.
push
(
obj
)
})
this
.
apipost
(
"/api/Share/SetShareCategorySortList"
,
this
.
sortList
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
)
this
.
getList
();
}
})
},
},
mounted
()
{
this
.
getList
();
...
...
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