Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gm_flutter
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
林生雨
gm_flutter
Commits
d17089a3
Commit
d17089a3
authored
Jul 06, 2020
by
杜欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二级方案
parent
363711f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
15 deletions
+23
-15
MechanismBoxPage.dart
lib/ClueModel/page/mechanismBox/MechanismBoxPage.dart
+22
-15
LevelOneFeedList.dart
lib/ClueModel/server/entity/LevelOneFeedList.dart
+1
-0
No files found.
lib/ClueModel/page/mechanismBox/MechanismBoxPage.dart
View file @
d17089a3
...
...
@@ -14,7 +14,7 @@ class MechanismBox implements IBottomPicker {
VoidCallback
dismissCall
;
TextEditingController
textController
=
TextEditingController
();
MechanismModel
_model
=
new
MechanismModel
();
List
<
int
>
doctor_ids
=
new
List
();
List
doctor_ids
=
new
List
();
LevelOneListModel
_levelModel
=
LevelOneListModel
();
RefreshController
refreshController
=
RefreshController
();
...
...
@@ -157,9 +157,15 @@ class MechanismBox implements IBottomPicker {
color:
Color
(
0xffF7F6FA
),
);
}
dynamic
hospital
=
_levelModel
.
data
[
index
].
hospital
;
hospital
[
"checked"
]
=
false
;
return
HospitalItem
(
hospital
);
print
(
'object'
);
print
(
_levelModel
.
data
[
index
].
toString
());
if
(
_levelModel
.
data
[
index
].
cardType
==
'hospital'
)
{
Hospital
hospital
=
_levelModel
.
data
[
index
].
hospital
;
return
HospitalItem
(
hospital
);
}
else
{
return
Container
();
}
},
childCount:
_levelModel
.
data
.
length
+
1
,
),
...
...
@@ -173,13 +179,17 @@ class MechanismBox implements IBottomPicker {
}
// 机构卡片
Widget
HospitalItem
(
hospital
)
{
print
(
'object'
);
print
(
hospital
.
toString
());
Widget
HospitalItem
(
Hospital
hospital
)
{
return
GestureDetector
(
onTap:
()
{
hospital
.
checked
=
true
;
doctor_ids
.
add
(
hospital
.
hosiptalId
);
if
(
doctor_ids
.
indexOf
(
hospital
.
hosiptalId
)
!=
-
1
)
{
doctor_ids
.
add
(
hospital
.
hosiptalId
);
}
else
{
doctor_ids
.
remove
(
hospital
.
hosiptalId
);
}
print
(
doctor_ids
.
toList
());
hospital
.
isCheck
=
!
hospital
.
isCheck
;
_levelModel
.
cardsLive
.
notifyView
(
_levelModel
.
cardsLive
.
data
);
},
child:
Container
(
height:
94.5
,
...
...
@@ -191,7 +201,7 @@ class MechanismBox implements IBottomPicker {
child:
Container
(
height:
17
,
width:
17
,
child:
hospital
.
checked
child:
hospital
.
isCheck
?
Image
.
asset
(
"assets/icon-checked.png"
)
:
Image
.
asset
(
"assets/icon-check.png"
),
)),
...
...
@@ -328,13 +338,10 @@ class MechanismBox implements IBottomPicker {
keyboardType:
TextInputType
.
text
,
textInputAction:
TextInputAction
.
send
,
onSubmitted:
(
txt
)
{
if
(!(
doctor_ids
.
length
>
3
||
doctor_ids
.
length
<
1
))
{
if
(
doctor_ids
.
length
>
3
||
doctor_ids
.
length
<
1
)
{
NativeToast
.
showNativeToast
(
'请选择1-3个机构咨询'
);
}
else
{
if
(
txt
==
''
)
{
NativeToast
.
showNativeToast
(
'text'
);
}
else
{
if
(
txt
!=
''
)
{
_model
.
sendMessage
(
doctor_ids
,
txt
,
plan_id
);
dismissCall
();
textController
.
text
=
''
;
...
...
lib/ClueModel/server/entity/LevelOneFeedList.dart
View file @
d17089a3
...
...
@@ -203,6 +203,7 @@ class Hospital {
String
address
;
String
consultType
;
String
messageUrl
;
bool
isCheck
=
false
;
Hospital
(
{
this
.
portrait
,
...
...
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