Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
platform
/
fanxing_new
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5acf2840
authored
Jul 07, 2020
by
潘建波
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat
✨
任务设置增加10条分页,增加滚动控制修改任务后滚动条还在当前的位置
1 parent
0bb93399
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
9 deletions
package.json
src/views/taskManage/editSet.vue
src/views/taskManage/index.vue
package.json
View file @
5acf284
...
...
@@ -8,7 +8,7 @@
"test:unit"
:
"vue-cli-service test:unit"
,
"lint"
:
"vue-cli-service lint"
,
"analyzer"
:
"cross-env use_analyzer=true npm run serve"
,
"commit"
:
"git
add . && git
-cz"
"commit"
:
"git-cz"
},
"dependencies"
:
{
"@svgdotjs/svg.js"
:
"^3.0.16"
,
...
...
@@ -90,5 +90,10 @@
"browserslist"
:
[
"> 1%"
,
"last 2 versions"
]
],
"config"
:{
"commitizen"
:{
"path"
:
"./node_modules/cz-conventional-changelog"
}
}
}
src/views/taskManage/editSet.vue
View file @
5acf284
...
...
@@ -166,6 +166,7 @@ export default {
priority
:
"normal"
,
period
:
true
},
pedittype
:
"add"
,
vchanAry
:
[],
platT
:
[],
sessionData
:
{},
...
...
@@ -187,10 +188,6 @@ export default {
};
},
props
:
{
pedittype
:
{
type
:
String
,
default
:
"add"
},
freeList
:
{
type
:
Array
,
// eslint-disable-next-line vue/require-valid-default-prop
...
...
@@ -205,12 +202,13 @@ export default {
var
freeArr
=
[];
this
.
freeList
.
forEach
(
ele
=>
{
if
(
ele
.
license_info
&&
ele
.
license_info
.
platType
)
{
this
.
platT
.
set
(
ele
.
license_info
.
platType
);
this
.
platT
.
push
(
ele
.
license_info
.
platType
);
}
});
}
},
initData
(
type
,
pdata
)
{
this
.
pedittype
=
type
;
this
.
platT
=
[];
this
.
setvisible
=
true
;
if
(
type
==
"add"
)
{
...
...
@@ -229,6 +227,7 @@ export default {
};
}
if
(
type
==
"edit"
)
{
this
.
pedittype
=
type
;
if
(
pdata
.
start_time
)
{
let
startT
=
pdata
.
start_time
;
let
endT
=
pdata
.
end_time
;
...
...
src/views/taskManage/index.vue
View file @
5acf284
...
...
@@ -234,9 +234,10 @@
background
prev-text=
"上一页"
next-text=
"下一页"
:page-sizes=
"[30, 50, 100, 200]"
:page-sizes=
"[
10,
30, 50, 100, 200]"
layout=
"total, prev, pager, next,sizes, jumper"
:current-page=
"page"
:page-size=
"30"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:total=
"total"
...
...
@@ -283,7 +284,8 @@ export default {
subTaskData
:
[],
pedittype
:
"add"
,
currentRow
:
{},
assign_ip
:
""
assign_ip
:
""
,
curscrollTop
:
0
};
},
components
:
{
...
...
@@ -408,6 +410,7 @@ export default {
},
query
()
{
this
.
page
=
1
;
this
.
curscrollTop
=
0
;
this
.
getTaskList
();
},
getTaskList
()
{
...
...
@@ -448,14 +451,23 @@ export default {
}
});
this
.
tableData
=
res
.
list_data
;
this
.
$nextTick
(()
=>
{
this
.
$refs
.
table
.
$el
.
children
[
2
].
scrollTop
=
this
.
curscrollTop
;
});
}
})
.
catch
(
error
=>
{});
},
editVideo
(
index
,
row
)
{
this
.
setsSrollTop
();
this
.
$refs
.
editvideo
.
showModal
(
row
);
},
editTask
(
type
,
index
,
row
)
{
if
(
type
===
"add"
)
{
this
.
curscrollTop
=
0
;
}
else
{
this
.
setsSrollTop
();
}
this
.
$refs
.
editset
.
initData
(
type
,
row
);
this
.
pedittype
=
type
;
this
.
$nextTick
(()
=>
{
...
...
@@ -463,6 +475,7 @@ export default {
});
},
setTaskStatus
(
data
,
type
)
{
this
.
setsSrollTop
();
if
(
data
.
status
==
"NotInTimeOfDay"
)
{
return
;
}
...
...
@@ -494,12 +507,16 @@ export default {
}
});
});
},
setsSrollTop
()
{
this
.
curscrollTop
=
this
.
$refs
.
table
.
$el
.
children
[
2
].
scrollTop
;
}
},
mounted
()
{
this
.
getTaskList
();
},
created
()
{
this
.
curscrollTop
=
0
;
this
.
getFreelist
();
}
};
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment