Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
HBHAndroid
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
1
Merge Requests
1
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
杨秀秀
HBHAndroid
Commits
73c1812e
Commit
73c1812e
authored
Oct 29, 2023
by
小费同学阿
💬
Committed by
杨秀秀
Nov 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
诉求分配 部门选择 修复
parent
4fea9f06
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
34 deletions
+8
-34
AppealDeptListAdapter.kt
...x/hbhbcompany/app/dialog/adapter/AppealDeptListAdapter.kt
+3
-2
AppealAllocationViewModel.java
...m/xx/hbhbcompany/ui/appeal/AppealAllocationViewModel.java
+3
-17
AppealEditViewModel.java
...ava/com/xx/hbhbcompany/ui/appeal/AppealEditViewModel.java
+1
-13
AppealViewModel.java
...in/java/com/xx/hbhbcompany/ui/appeal/AppealViewModel.java
+1
-2
No files found.
hbhbcompany/src/main/java/com/xx/hbhbcompany/app/dialog/adapter/AppealDeptListAdapter.kt
View file @
73c1812e
...
@@ -45,8 +45,9 @@ class AppealDeptListAdapter(context: Context?,val selectedTypes: MutableList<Tex
...
@@ -45,8 +45,9 @@ class AppealDeptListAdapter(context: Context?,val selectedTypes: MutableList<Tex
/*选择时的item 移除和添加*/
/*选择时的item 移除和添加*/
override
fun
itemClickCalBack
(
position
:
Int
,
data
:
TextListProvider
?)
{
override
fun
itemClickCalBack
(
position
:
Int
,
data
:
TextListProvider
?)
{
if
(
data
!=
null
)
{
if
(
data
!=
null
)
{
if
(
selectedTypes
.
contains
(
data
))
{
val
indexOf
=
selectedTypes
.
map
{
item
->
item
.
ProviderId
()
}.
indexOf
(
data
.
ProviderId
())
selectedTypes
.
remove
(
data
)
if
(
indexOf
!=
-
1
)
{
selectedTypes
.
removeAt
(
indexOf
)
}
else
{
}
else
{
selectedTypes
.
add
(
data
)
selectedTypes
.
add
(
data
)
}
}
...
...
hbhbcompany/src/main/java/com/xx/hbhbcompany/ui/appeal/AppealAllocationViewModel.java
View file @
73c1812e
...
@@ -44,6 +44,7 @@ public class AppealAllocationViewModel extends BaseViewModel<AppealRequest> {
...
@@ -44,6 +44,7 @@ public class AppealAllocationViewModel extends BaseViewModel<AppealRequest> {
public
ObservableField
<
Integer
>
imgsVisibility
=
new
ObservableField
<>(
View
.
VISIBLE
);
public
ObservableField
<
Integer
>
imgsVisibility
=
new
ObservableField
<>(
View
.
VISIBLE
);
private
List
<
TextListProvider
>
selectDept
;
/*部门控件*/
/*部门控件*/
public
LiveData
<
Integer
>
getDeptVisibility
()
{
public
LiveData
<
Integer
>
getDeptVisibility
()
{
...
@@ -79,8 +80,6 @@ public class AppealAllocationViewModel extends BaseViewModel<AppealRequest> {
...
@@ -79,8 +80,6 @@ public class AppealAllocationViewModel extends BaseViewModel<AppealRequest> {
public
ObservableField
<
String
>
finalRejectionn
=
new
ObservableField
<>(
""
);
public
ObservableField
<
String
>
finalRejectionn
=
new
ObservableField
<>(
""
);
/*上传图片*/
/*上传图片*/
public
AddImgAdapter
appealPicsAdapter
;
public
AddImgAdapter
appealPicsAdapter
;
public
List
<
TextListProvider
>
selectDept
=
new
ArrayList
<>();
//分配信息绑定
//分配信息绑定
public
ObservableField
<
String
>
allocation
=
new
ObservableField
<>(
""
);
public
ObservableField
<
String
>
allocation
=
new
ObservableField
<>(
""
);
...
@@ -148,7 +147,7 @@ public class AppealAllocationViewModel extends BaseViewModel<AppealRequest> {
...
@@ -148,7 +147,7 @@ public class AppealAllocationViewModel extends BaseViewModel<AppealRequest> {
}
}
String
displayLabel
=
displayLabelList
.
toString
();
String
displayLabel
=
displayLabelList
.
toString
();
if
(
displayLabel
.
endsWith
(
"、"
))
{
if
(
displayLabel
.
endsWith
(
"、"
))
{
displayLabel
=
displayLabel
.
substring
(
0
,
displayLabel
.
length
()
-
2
);
displayLabel
=
displayLabel
.
substring
(
0
,
displayLabel
.
length
()
-
1
);
}
}
/*label展示*/
/*label展示*/
label
.
set
(
displayLabel
);
label
.
set
(
displayLabel
);
...
@@ -159,20 +158,7 @@ public class AppealAllocationViewModel extends BaseViewModel<AppealRequest> {
...
@@ -159,20 +158,7 @@ public class AppealAllocationViewModel extends BaseViewModel<AppealRequest> {
idList
.
add
(
new
DeptIdBean
(
Integer
.
parseInt
(
resultBean
.
getAllocations
().
get
(
i
).
getDeptId
())));
idList
.
add
(
new
DeptIdBean
(
Integer
.
parseInt
(
resultBean
.
getAllocations
().
get
(
i
).
getDeptId
())));
}
}
selectDept
=
resultBean
.
getAllocations
().
stream
()
selectDept
=
resultBean
.
getAllocations
().
stream
()
.
map
(
item
->
new
TextListProvider
()
{
.
map
(
item
->
new
DeptBean
(
new
ArrayList
<>(),
Integer
.
parseInt
(
item
.
getDeptId
()),
false
,
item
.
getDeptName
())).
collect
(
Collectors
.
toList
());
@androidx
.
annotation
.
NonNull
@Override
public
String
providerText
()
{
return
item
.
getDeptName
();
}
@androidx
.
annotation
.
NonNull
@Override
public
String
ProviderId
()
{
return
item
.
getDeptId
();
}
})
.
collect
(
Collectors
.
toList
());
}
}
@Override
@Override
...
...
hbhbcompany/src/main/java/com/xx/hbhbcompany/ui/appeal/AppealEditViewModel.java
View file @
73c1812e
...
@@ -167,19 +167,7 @@ public class AppealEditViewModel extends BaseViewModel<AppealRequest> {
...
@@ -167,19 +167,7 @@ public class AppealEditViewModel extends BaseViewModel<AppealRequest> {
idList
.
add
(
new
DeptIdBean
(
Integer
.
parseInt
(
resultBean
.
getAllocations
().
get
(
i
).
getDeptId
())));
idList
.
add
(
new
DeptIdBean
(
Integer
.
parseInt
(
resultBean
.
getAllocations
().
get
(
i
).
getDeptId
())));
}
}
selectDept
=
resultBean
.
getAllocations
().
stream
()
selectDept
=
resultBean
.
getAllocations
().
stream
()
.
map
(
item
->
new
TextListProvider
()
{
.
map
(
item
->
new
DeptBean
(
new
ArrayList
<>(),
Integer
.
parseInt
(
item
.
getDeptId
()),
false
,
item
.
getDeptName
()))
@androidx
.
annotation
.
NonNull
@Override
public
String
providerText
()
{
return
item
.
getDeptName
();
}
@androidx
.
annotation
.
NonNull
@Override
public
String
ProviderId
()
{
return
item
.
getDeptId
();
}
})
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
}
}
...
...
hbhbcompany/src/main/java/com/xx/hbhbcompany/ui/appeal/AppealViewModel.java
View file @
73c1812e
...
@@ -82,8 +82,7 @@ public class AppealViewModel extends BaseViewModel<AppealRequest> {
...
@@ -82,8 +82,7 @@ public class AppealViewModel extends BaseViewModel<AppealRequest> {
public
ObservableField
<
String
>
appealDescribe
=
new
ObservableField
<>(
""
);
public
ObservableField
<
String
>
appealDescribe
=
new
ObservableField
<>(
""
);
/*上传图片*/
/*上传图片*/
public
AddImgAdapter
appealPicsAdapter
;
public
AddImgAdapter
appealPicsAdapter
;
private
List
<
TextListProvider
>
selectDept
=
new
ArrayList
<>();
public
List
<
TextListProvider
>
selectDept
=
new
ArrayList
<>();
public
AppealViewModel
(
@NonNull
Application
application
)
{
public
AppealViewModel
(
@NonNull
Application
application
)
{
super
(
application
);
super
(
application
);
...
...
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