Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
YX_IDENT_beijing_auxiliary_YD
Project
Project
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
zhangyusheng
YX_IDENT_beijing_auxiliary_YD
Commits
5c1c7095
Commit
5c1c7095
authored
Mar 15, 2019
by
liboyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改页面
parent
f8419d08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
createTaskList.html
...resources/static/views/createTaskList/createTaskList.html
+1
-1
createTaskList.js
...n/resources/static/views/createTaskList/createTaskList.js
+18
-4
No files found.
src/main/resources/static/views/createTaskList/createTaskList.html
View file @
5c1c7095
...
...
@@ -84,7 +84,7 @@
</table>
<!-- /.table -->
<div
class=
"box-footer"
style=
"text-align: right;"
>
<h4>
已选择数量:{{cardsTotal}}
</h4>
<h4>
已选择数量:{{cardsTotal
+groupCardsTotal
}}
</h4>
<button
class=
"btn btn-primary"
ng-click=
"createTaskList(type.typeCode)"
>
创建任务单
</button>
</div>
</div>
...
...
src/main/resources/static/views/createTaskList/createTaskList.js
View file @
5c1c7095
...
...
@@ -101,7 +101,6 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
// }]
// });
// }
$rootScope
.
selectedGroup
=
[];
$scope
.
getPoliceList
=
function
(
groupList
){
ngDialog
.
open
({
...
...
@@ -111,6 +110,7 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
closeByDocument
:
false
,
controller
:
[
'$scope'
,
'HttpService'
,
function
(
$scope
)
{
$scope
.
policeList
=
groupList
;
$rootScope
.
groupCardsTotal
=
0
;
//创建变量用来保存选中结果
var
updateSelected
=
function
(
action
,
task
)
{
if
(
action
===
'add'
&&
$rootScope
.
selectedGroup
.
indexOf
(
task
)
===
-
1
)
{
...
...
@@ -119,12 +119,17 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
if
(
action
===
'remove'
&&
$rootScope
.
selectedGroup
.
indexOf
(
task
)
!==
-
1
)
$rootScope
.
selectedGroup
.
splice
(
$rootScope
.
selectedGroup
.
indexOf
(
task
),
1
);
};
//更新某一列数据的选择
var
temp
=
0
;
$rootScope
.
cardsTotal
=
0
;
$scope
.
updateSelection
=
function
(
$event
,
task
)
{
var
checkbox
=
$event
.
target
;
var
action
=
(
checkbox
.
checked
?
'add'
:
'remove'
);
updateSelected
(
action
,
task
);
$rootScope
.
groupCardsTotal
=
0
var
sum
=
0
;
for
(
var
i
=
0
;
i
<
$scope
.
selectedGroup
.
length
;
i
++
)
{
sum
+=
parseInt
(
$scope
.
selectedGroup
[
i
].
VALID_COUNT
);
}
$rootScope
.
groupCardsTotal
=
$rootScope
.
groupCardsTotal
+
sum
;
};
//全选操作
$scope
.
selectAll
=
function
(
task
,
$event
)
{
...
...
@@ -133,7 +138,15 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
for
(
var
i
=
0
;
i
<
task
.
length
;
i
++
)
{
var
contact
=
task
[
i
];
updateSelected
(
action
,
contact
);
$rootScope
.
groupCardsTotal
=
0
}
var
sum
=
0
;
for
(
var
i
=
0
;
i
<
$scope
.
selectedGroup
.
length
;
i
++
)
{
sum
+=
parseInt
(
$scope
.
selectedGroup
[
i
].
VALID_COUNT
);
}
$rootScope
.
groupCardsTotal
=
$rootScope
.
groupCardsTotal
+
sum
;
};
$scope
.
isSelected
=
function
(
task
)
{
return
$rootScope
.
selectedGroup
.
indexOf
(
task
)
>=
0
;
...
...
@@ -165,7 +178,8 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
for
(
var
i
=
0
;
i
<
$scope
.
selected
.
length
;
i
++
)
{
sum
+=
parseInt
(
$scope
.
selected
[
i
].
countyValidCount
);
}
$rootScope
.
cardsTotal
=
$rootScope
.
cardsTotal
+
sum
;
$rootScope
.
cardsTotal
=
$rootScope
.
cardsTotal
+
sum
;
};
//全选操作
...
...
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