Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sedu-mobile-v2
Overview
Overview
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
liuzhanxin
sedu-mobile-v2
Commits
6f06f9ee
Commit
6f06f9ee
authored
Jun 19, 2020
by
liuzhanxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
1293daa6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
156 additions
and
0 deletions
+156
-0
index.vue
cloudTrain/components/lab-select/index.vue
+140
-0
pages.json
cloudTrain/pages.json
+16
-0
No files found.
cloudTrain/components/lab-select/index.vue
0 → 100644
View file @
6f06f9ee
<
template
>
<view
class=
"content"
>
<uni-list
v-for=
"(item,index) in listData"
:key=
index
>
<view
class=
"itemclass"
hover-class=
"hoverclass"
hover-stay-time=
"40"
@
click=
"itemClick(item,index)"
>
<view
style=
"display: flex;flex-direction: row;align-items: center;"
>
<image
v-if=
"!item.selected "
class=
"iconsel"
mod=
"aspectFit"
src=
"../../static/common/unselected.png"
/>
<image
v-if=
"item.selected"
class=
"iconsel"
mod=
"aspectFit"
src=
"../../static/common/selected.png"
/>
<text
style=
"margin-left: 15rpx;"
>
{{
item
.
name
}}
</text>
</view>
</view>
</uni-list>
</view>
</
template
>
<
script
>
import
uniList
from
"@/components/list/uni-list/uni-list.vue"
import
uniListItem
from
"@/components/list/uni-list-item/uni-list-item.vue"
import
uniNavBar
from
"@/components/uni-header/uni-nav-bar/uni-nav-bar.vue"
export
default
{
data
()
{
return
{
title
:
[
"实验分室"
],
listData
:[],
pageIndex
:
0
,
addressSel
:[],
id
:
""
,
sel
:
""
}
},
onLoad
(
option
)
{
if
(
option
.
experimentCenterId
){
this
.
getData
(
option
.
experimentCenterId
);
}
},
methods
:
{
onNavigationBarButtonTap
(){
this
.
saveClick
();
},
goBackClick
:
function
(){
uni
.
navigateBack
({
})
},
saveClick
:
function
(){
if
(
this
.
sel
==
""
){
return
}
uni
.
navigateBack
({
})
console
.
log
(
this
.
sel
)
setTimeout
(()
=>
{
uni
.
$emit
(
"labEntitySave"
,[
this
.
sel
]);
},
200
)
},
itemClick
:
function
(
item
,
index
){
this
.
listData
.
map
((
opt
)
=>
{
opt
.
selected
=
false
;
})
this
.
listData
[
index
].
selected
=
true
this
.
sel
=
this
.
listData
[
index
]
},
getData
:
function
(
id
){
var
conditions
=
[
{
name
:
'experimentCenter.id'
,
relation
:
3
,
//等于
values
:[
id
],
},
{
name
:
"removed"
,
relation
:
5
,
values
:
[]}
]
var
body
=
{
"queryDefinitionMetaName"
:
"com.beecode.tspp.manage.query.LabEntity"
,
"queryFields"
:
[
"id"
,
"created"
,
"code"
,
"name"
,
"experimentCenter.name"
,
"college.title"
],
"orders"
:
[{
"name"
:
"created"
,
"asc"
:
false
}],
"conditions"
:
conditions
,
"pageIndex"
:
this
.
pageIndex
,
"pageSize"
:
200
,
"useScene"
:
true
,
"sceneId"
:
""
,
"usePaging"
:
true
}
uni
.
request
({
url
:
this
.
GLOBALUTIL
.
url
+
'/query/functionQuery'
,
method
:
'POST'
,
header
:
this
.
GLOBALUTIL
.
commonHeader
,
data
:
JSON
.
stringify
(
body
),
success
:
(
res
)
=>
{
var
data
=
JSON
.
parse
(
res
.
data
.
rowDatas
);
data
.
map
((
opt
)
=>
{
opt
.
selected
=
false
;
return
opt
;
})
this
.
listData
=
data
;
}
})
},
},
components
:
{
uniList
,
uniListItem
,
uniNavBar
}
}
</
script
>
<
style
>
.content
{
display
:
flex
;
flex-direction
:
column
;
background-color
:
#F7F7F7
;
padding
:
0
}
.status_bar
{
height
:
var
(
--status-bar-height
);
width
:
100%
;
}
.itemclass
{
display
:
flex
;
width
:
100%
;
height
:
90
rpx
;
background-color
:
#FFFFFF
;
border
:
1px
solid
#D8D8D8
;
flex-direction
:
row
;
justify-content
:
space-between
;
align-items
:
center
;
}
.icongo
{
width
:
40
rpx
;
height
:
30
rpx
;
}
.iconsel
{
width
:
30
rpx
;
height
:
30
rpx
;
margin-left
:
10
rpx
;
}
.hoverclass
{
opacity
:
0.5
;
background-color
:
#F5F5F5
;
}
</
style
>
cloudTrain/pages.json
View file @
6f06f9ee
...
...
@@ -305,6 +305,22 @@
"bounce"
:
"none"
}
}
},
{
"path"
:
"components/lab-select/index"
,
"style"
:
{
"navigationBarTitleText"
:
"实验分室"
,
"app-plus"
:
{
"titleNView"
:
{
"buttons"
:
[
{
"text"
:
"确定"
,
"fontSize"
:
"14"
}
]
}
}
}
}
],
"tabBar"
:
{
...
...
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