@@ -87,7 +87,7 @@ | |||||
CONFIRM(content='是否确认执行此操作?'){ | CONFIRM(content='是否确认执行此操作?'){ | ||||
return new Promise((resolve)=>{ | return new Promise((resolve)=>{ | ||||
uni.showModal({ | uni.showModal({ | ||||
title: '提示信息', | |||||
title: '提示', | |||||
content: content, | content: content, | ||||
cancelText: "取消", | cancelText: "取消", | ||||
confirmText: "确认", | confirmText: "确认", | ||||
@@ -53,12 +53,14 @@ | |||||
if (obj) this.title_ = obj.label | if (obj) this.title_ = obj.label | ||||
this.title_ = obj ? obj.label : this.title | this.title_ = obj ? obj.label : this.title | ||||
this.value_ = this.value | this.value_ = this.value | ||||
this.show = true | |||||
}, | }, | ||||
change(e) { | change(e) { | ||||
this.$emit("update:value",e) | this.$emit("update:value",e) | ||||
let obj = this.options.find(e1=>e1.value == e) | let obj = this.options.find(e1=>e1.value == e) | ||||
if(obj) this.title_ = obj.label | if(obj) this.title_ = obj.label | ||||
this.$emit("change") | this.$emit("change") | ||||
this.close() | |||||
}, | }, | ||||
} | } | ||||
} | } | ||||
@@ -66,10 +68,10 @@ | |||||
<style scoped lang="scss"> | <style scoped lang="scss"> | ||||
.u-radio-group { | .u-radio-group { | ||||
width: 550rpx; | |||||
width: 560rpx; | |||||
max-height: 680rpx; | max-height: 680rpx; | ||||
overflow-y: auto; | overflow-y: auto; | ||||
padding: 0 24rpx; | |||||
padding: 12rpx 32rpx 24rpx 32rpx; | |||||
.u-cell { | .u-cell { | ||||
background-color: #fff; | background-color: #fff; | ||||
border-radius: 20rpx; | border-radius: 20rpx; | ||||
@@ -82,6 +84,11 @@ | |||||
} | } | ||||
.u-radio { | .u-radio { | ||||
margin-top: 18rpx; | |||||
margin-top: 26rpx; | |||||
padding-bottom:28rpx!important; | |||||
} | |||||
.u-radio:last-child{ | |||||
border-bottom: none; | |||||
padding-bottom:14rpx!important; | |||||
} | } | ||||
</style> | </style> |
@@ -112,6 +112,7 @@ | |||||
} | } | ||||
this.value_ = this.value | this.value_ = this.value | ||||
this.searchText = '' | this.searchText = '' | ||||
this.show = true | |||||
}, | }, | ||||
change(e) { | change(e) { | ||||
this.gruopValue = e | this.gruopValue = e | ||||
@@ -143,6 +144,7 @@ | |||||
.u-radio-group { | .u-radio-group { | ||||
width: 92%; | width: 92%; | ||||
max-height: 680rpx; | max-height: 680rpx; | ||||
min-height: 360rpx; | |||||
overflow-y: auto; | overflow-y: auto; | ||||
padding: 0 30rpx; | padding: 0 30rpx; | ||||
@@ -158,7 +158,6 @@ | |||||
}, | }, | ||||
// 切换tab | // 切换tab | ||||
tabsChange(item) { | tabsChange(item) { | ||||
console.log(1) | |||||
if (this.tabIndex == item.value) return | if (this.tabIndex == item.value) return | ||||
this.tabIndex = item.value | this.tabIndex = item.value | ||||
setTimeout(() => { | setTimeout(() => { | ||||
@@ -36,6 +36,10 @@ | |||||
</u-form-item> | </u-form-item> | ||||
</u--form> | </u--form> | ||||
</view> | </view> | ||||
<view style="padding: 36rpx 30rpx;position: fixed;bottom: 0;width: 100%;box-sizing: border-box;"> | |||||
<u-button @click="confirm" type="primary" style="border-radius: 36rpx;height: 72rpx;" | |||||
text="确定"></u-button> | |||||
</view> | |||||
</view> | </view> | ||||
</template> | </template> | ||||
@@ -56,7 +60,13 @@ | |||||
rules: [] | rules: [] | ||||
} | } | ||||
}, | }, | ||||
methods: {} | |||||
methods: { | |||||
confirm(){ | |||||
this.CONFIRM(`是否删除点名任务?`).then(()=>{ | |||||
}) | |||||
} | |||||
} | |||||
} | } | ||||
</script> | </script> | ||||
@@ -46,10 +46,6 @@ | |||||
list: [{}, {}, {}, {}, {}, {}, {}, {}, {}, ], | list: [{}, {}, {}, {}, {}, {}, {}, {}, {}, ], | ||||
isLoading: false, | isLoading: false, | ||||
status: 'loadmore', //loading正在加载 loadmore加载更多 nomore没有更多了 | status: 'loadmore', //loading正在加载 loadmore加载更多 nomore没有更多了 | ||||
search: { | |||||
loudong: 1, | |||||
qinshi: '' | |||||
}, | |||||
page: { | page: { | ||||
size: 8, | size: 8, | ||||
page: 8, | page: 8, | ||||
@@ -1,9 +1,9 @@ | |||||
<template> | <template> | ||||
<view style="height: 100%;"> | <view style="height: 100%;"> | ||||
<view class="searchBox"> | <view class="searchBox"> | ||||
<selectRadio :value.sync="search.loudong" :options="[{value:1,label:'loudong1'},{value:2,label:'loudong2'}]" | |||||
<selectRadio :value.sync="search.loudong" :options="[{value:1,label:'男生宿舍1号楼'},{value:2,label:'男生宿舍2号楼'},{value:3,label:'女生宿舍1号楼'},{value:4,label:'女生宿舍2号楼'}]" | |||||
title="楼栋" /> | title="楼栋" /> | ||||
<selectSearch :value.sync="search.qinshi" :options="[{value:1,label:'qinshi1'},{value:2,label:'qinshi2'}]" | |||||
<selectSearch :value.sync="search.qinshi" :options="[{value:1,label:'qinshi1'},{value:2,label:'qinshi2'},{value:1,label:'qinshi1'},{value:2,label:'qinshi2'},{value:1,label:'qinshi1'},{value:2,label:'qinshi2'},{value:1,label:'qinshi1'},{value:2,label:'qinshi2'},{value:1,label:'qinshi1'},{value:2,label:'qinshi2'}]" | |||||
placeholder="请选择寝室" popupTitle="请选择寝室" search-placeholder="请输入寝室号"/> | placeholder="请选择寝室" popupTitle="请选择寝室" search-placeholder="请输入寝室号"/> | ||||
</view> | </view> | ||||
<u-empty marginTop="100rpx" :show="false" mode="list" text="暂无数据"></u-empty> | <u-empty marginTop="100rpx" :show="false" mode="list" text="暂无数据"></u-empty> | ||||
@@ -121,13 +121,13 @@ | |||||
justify-content: space-between; | justify-content: space-between; | ||||
.room { | .room { | ||||
font-size: 34rpx; | |||||
font-size: 32rpx; | |||||
} | } | ||||
.peopleNum { | .peopleNum { | ||||
uni-image { | uni-image { | ||||
width: 34rpx; | |||||
height: 34rpx; | |||||
width: 30rpx; | |||||
height: 30rpx; | |||||
position: relative; | position: relative; | ||||
top: 8rpx; | top: 8rpx; | ||||
margin-right: 6rpx; | margin-right: 6rpx; | ||||
@@ -135,7 +135,7 @@ | |||||
uni-text { | uni-text { | ||||
color: #2388FF; | color: #2388FF; | ||||
font-size: 30rpx; | |||||
font-size: 26rpx; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -144,7 +144,7 @@ | |||||
margin-top: 18rpx; | margin-top: 18rpx; | ||||
display: flex; | display: flex; | ||||
justify-content: space-between; | justify-content: space-between; | ||||
font-size: 30rpx; | |||||
font-size: 26rpx; | |||||
.returnNum {} | .returnNum {} | ||||
@@ -161,7 +161,7 @@ | |||||
content: ""; | content: ""; | ||||
display: block; | display: block; | ||||
position: absolute; | position: absolute; | ||||
top: 30rpx;bottom: 0; | |||||
top: 26rpx;bottom: 0; | |||||
left: 0;right: 0; | left: 0;right: 0; | ||||
margin: 0 auto; | margin: 0 auto; | ||||
width: 1rpx; | width: 1rpx; | ||||
@@ -180,7 +180,7 @@ | |||||
} | } | ||||
uni-text { | uni-text { | ||||
font-size: 30rpx; | |||||
font-size: 28rpx; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -1,22 +1,232 @@ | |||||
<template> | <template> | ||||
<view> | |||||
点名 | |||||
<view style="height: 100%;"> | |||||
<view class="topBox"> | |||||
<view class="left"> | |||||
<selectTree v-model="search.departCalss" :labels.sync="search.departCalssName" /> | |||||
</view> | |||||
<view class="right" @click="manageClick" :style="{color:isManage?'#EF2D2D':'#333'}"> | |||||
<text>{{isManage?'取消管理':'批量管理'}}</text> | |||||
</view> | |||||
</view> | |||||
<u-empty marginTop="100rpx" :show="false" mode="list" text="暂无数据"></u-empty> | |||||
<u-list @scrolltolower="scrolltolower" style="height: calc(100% - 110rpx);"> | |||||
<u-checkbox-group v-model="checkboxValue" placement="column"> | |||||
<u-list-item v-for="(item, index) in list" :key="index"> | |||||
<u-checkbox v-if="isManage" :name="item.name" shape="circle" label=""></u-checkbox> | |||||
<view :class="{whiteCard:true,active:checkboxValue.includes(item.name)}"> | |||||
<view class="row1"> | |||||
教室(海康) | |||||
</view> | |||||
<view class="row2"> | |||||
<view class=""> | |||||
持续时间:20 | |||||
</view> | |||||
<view class=""> | |||||
相似度:0.5 | |||||
</view> | |||||
</view> | |||||
<view class="bottom" v-show="!isManage"> | |||||
<view class="btn" @click="NAV_TO('./passengerFlow/detail')"> | |||||
<image src="@/static/image/see.png" mode=""></image> | |||||
<text>查看</text> | |||||
</view> | |||||
<view class="btn" @click="NAV_TO('./passengerFlow/detail')"> | |||||
<image src="@/static/image/earlyWarning/delete.png" mode=""></image> | |||||
<text>删除</text> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
</u-list-item> | |||||
</u-checkbox-group> | |||||
<u-loadmore :status="status" /> | |||||
<view class="bottomConfirm" v-if="isManage"> | |||||
<u-checkbox-group><u-checkbox shape="circle" label="全选" name="" @change="radioChange"></u-checkbox></u-checkbox-group> | |||||
<u-button @click="confirm" type="primary" style="border-radius: 36rpx;height: 72rpx;margin-left:16rpx" | |||||
text="确定删除"></u-button> | |||||
</view> | |||||
</u-list> | |||||
<image class="addBtn" @click="NAV_TO('./passengerFlow/add')" src="@/static/image/add.png" mode=""></image> | |||||
</view> | </view> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
import SelectTree from "@/components/selectTree.vue" | |||||
export default { | export default { | ||||
components: { | |||||
SelectTree | |||||
}, | |||||
data() { | data() { | ||||
return { | return { | ||||
list: [{name:1}, {name:2}, {name:3}, {name:4}, {name:5}, {name:6}, {name:7}, {name:8}, {name:9}], | |||||
isLoading: false, | |||||
status: 'loadmore', //loading正在加载 loadmore加载更多 nomore没有更多了 | |||||
search: { | |||||
class: '', | |||||
}, | |||||
page: { | |||||
size: 8, | |||||
page: 8, | |||||
}, | |||||
checkboxValue: [], | |||||
isManage:false, | |||||
} | } | ||||
}, | }, | ||||
methods: { | methods: { | ||||
} | |||||
scrolltolower() { | |||||
this.loadmore() | |||||
}, | |||||
loadmore() { | |||||
if (this.status != 'loadmore') return | |||||
this.status = 'loading' | |||||
setTimeout(() => { | |||||
for (let i = 0; i < 1; i++) { | |||||
this.list.push({}, {}, {}, {}, {}, {}) | |||||
} | |||||
// 获取到的总条数>=接口总条数 || 接口总条数为0 | |||||
if (this.list.length >= 14) { | |||||
this.status = 'nomore' | |||||
} else { | |||||
this.status = 'loadmore' | |||||
} | |||||
}, 2000) | |||||
}, | |||||
refresh() { | |||||
this.status = 'loadmore' | |||||
this.list = [] | |||||
this.page.page = 1 | |||||
this.loadmore() | |||||
}, | |||||
manageClick(){ | |||||
this.checkboxValue = [] | |||||
this.isManage = this.isManage?false:true | |||||
}, | |||||
radioChange(e){ | |||||
if(e){ | |||||
let ids = this.list.map(e=>e.name) | |||||
this.checkboxValue = ids | |||||
}else{ | |||||
this.checkboxValue = [] | |||||
} | |||||
}, | |||||
confirm(){ | |||||
this.CONFIRM(`是否删除点名任务?`).then(()=>{ | |||||
}) | |||||
}, | |||||
pullDownRefresh() { | |||||
this.refresh() | |||||
} | |||||
}, | |||||
onLoad() { | |||||
this.loadmore() | |||||
}, | |||||
} | } | ||||
</script> | </script> | ||||
<style> | |||||
<style lang="scss" scoped> | |||||
.addBtn { | |||||
width: 140rpx; | |||||
height: 140rpx; | |||||
position: fixed; | |||||
right: 15rpx; | |||||
bottom: 160rpx; | |||||
} | |||||
.bottomConfirm { | |||||
padding: 30rpx; | |||||
display: flex; | |||||
} | |||||
.topBox { | |||||
margin: 12rpx 28rpx; | |||||
display: flex; | |||||
justify-content: space-between; | |||||
</style> | |||||
.left { | |||||
flex: 1; | |||||
} | |||||
.right { | |||||
font-size: 28rpx; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
color: #333; | |||||
padding: 0 26rpx; | |||||
} | |||||
} | |||||
.u-list-item { | |||||
display: flex; | |||||
align-items: center; | |||||
flex-direction: unset; | |||||
margin: 12rpx 28rpx; | |||||
.whiteCard { | |||||
flex: 1; | |||||
&.active{ | |||||
border: 1rpx solid #2388FF; | |||||
background-color: #F2F8FF; | |||||
} | |||||
} | |||||
.u-checkbox{ | |||||
margin-right: 12rpx; | |||||
} | |||||
} | |||||
.whiteCard { | |||||
background-color: #fff; | |||||
border-radius: 18rpx; | |||||
padding: 30rpx; | |||||
color: #333333; | |||||
.row1 { | |||||
font-size: 32rpx; | |||||
} | |||||
.row2 { | |||||
font-size: 26rpx; | |||||
margin-top: 20rpx; | |||||
display: flex; | |||||
justify-content: space-between; | |||||
} | |||||
.bottom { | |||||
display: flex; | |||||
border-top: 1rpx solid rgba(0, 0, 0, 0.1); | |||||
margin-top: 36rpx; | |||||
padding-top: 22rpx; | |||||
position: relative; | |||||
::after { | |||||
content: ""; | |||||
display: block; | |||||
position: absolute; | |||||
top: 26rpx; | |||||
bottom: 0; | |||||
left: 0; | |||||
right: 0; | |||||
margin: 0 auto; | |||||
width: 1rpx; | |||||
height: 32rpx; | |||||
background-color: rgba(0, 0, 0, 0.01); | |||||
} | |||||
.btn { | |||||
width: 100%; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
uni-image { | |||||
width: 34rpx; | |||||
height: 34rpx; | |||||
margin-right: 6rpx; | |||||
} | |||||
uni-text { | |||||
font-size: 30rpx; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
</style> |