更新
This commit is contained in:
188
userManagement/yunSite/components/auth.vue
Normal file
188
userManagement/yunSite/components/auth.vue
Normal file
@@ -0,0 +1,188 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="company_body">
|
||||
<!-- <view class="header_seach_seach">
|
||||
<uni-easyinput @confirm="seachFn"
|
||||
style="height: 100%; flex: 1; margin: 0 auto; background-color: #FFFFFF; border-radius:12rpx ;"
|
||||
prefixIcon="search" v-model="getData.params.siteName" placeholder="油站名称" >
|
||||
</uni-easyinput>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="company_list">
|
||||
<view @tap="seleFn(item)" v-for="(item,index) in authList" class="company_list_item">
|
||||
<image src="../../../static/selegs.png" style="width: 73rpx; height: 73rpx;"></image>
|
||||
<view class="company_list_item_text">{{item.roleName}}</view>
|
||||
<view style="flex-grow: 1; text-align: end;text-align: -webkit-right;">
|
||||
<view class="checkboxs">
|
||||
<view v-if="item.isChecked" class="checkboxss"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import serve from '@/api/userManagement/yunSite.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
sysRoleList: [],
|
||||
timer: null,
|
||||
authList: [],
|
||||
// getData: {
|
||||
// pageSize: 15,
|
||||
// currentPage: 1,
|
||||
// params: {
|
||||
// siteName: ""
|
||||
// },
|
||||
// },
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.item) {
|
||||
this.sysRoleList = JSON.parse(decodeURI(options.item))
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getAuthList()
|
||||
},
|
||||
// onReachBottom() {
|
||||
// this.getData.currentPage += 1
|
||||
// this.getAuthList()
|
||||
// },
|
||||
methods: {
|
||||
|
||||
seleFn(item) {
|
||||
clearTimeout(this.timer)
|
||||
|
||||
this.$set(item, 'isChecked', !item.isChecked)
|
||||
|
||||
uni.$emit('yunSiteAuth', item)
|
||||
this.timer = setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 200)
|
||||
},
|
||||
seachFn() {
|
||||
// this.getData.currentPage = 1
|
||||
this.getDriversList()
|
||||
},
|
||||
getAuthList() {
|
||||
|
||||
serve.getSiteCloudRoles().then(res => {
|
||||
if (res.code !== 20000) return
|
||||
|
||||
let data = res.data.map(item => {
|
||||
item['isChecked'] = false
|
||||
return item
|
||||
|
||||
})
|
||||
|
||||
data.forEach(item => {
|
||||
this.sysRoleList.forEach(secItem => {
|
||||
if (secItem.id === item.id) {
|
||||
item['isChecked'] = true
|
||||
}
|
||||
})
|
||||
})
|
||||
// if (this.getData.currentPage !== 1) {
|
||||
// this.authList = this.authList.concat(data);
|
||||
// return
|
||||
// }
|
||||
this.authList = data
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.companytip {
|
||||
width: 88rpx;
|
||||
height: 38rpx;
|
||||
border-radius: 4rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.checkboxss {
|
||||
width: 80%;
|
||||
height: 80%;
|
||||
background-color: #2866FF;
|
||||
border-radius: 50px;
|
||||
}
|
||||
|
||||
.checkboxs {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
border-radius: 50px;
|
||||
border: 1px solid #BBBBBB;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.checkbox__inner {
|
||||
border-radius: 50px !important;
|
||||
}
|
||||
|
||||
.uni-data-checklist {
|
||||
flex: 0 !important;
|
||||
}
|
||||
|
||||
.uni-data-checklist .checklist-group .checklist-box {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.uni-data-checklist {
|
||||
width: max-content;
|
||||
}
|
||||
|
||||
.company_list_item_text {
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
margin-left: 23rpx;
|
||||
}
|
||||
|
||||
.company_list_item {
|
||||
min-height: 92rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 3px 9px 0px rgba(88, 88, 88, 0.2);
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 9rpx 21rpx;
|
||||
margin-top: 19rpx;
|
||||
}
|
||||
|
||||
.company_list {
|
||||
width: 100vw;
|
||||
padding: 0 31rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.company_body {
|
||||
background-color: #2866FF;
|
||||
padding: 25rpx 0;
|
||||
}
|
||||
|
||||
.uni-easyinput__content {
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
.uni-easyinput {
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
.header_seach_seach {
|
||||
display: flex;
|
||||
height: 80rpx;
|
||||
background-color: #2866FF;
|
||||
padding: 0 31rpx;
|
||||
}
|
||||
</style>
|
||||
194
userManagement/yunSite/components/serviceStation.vue
Normal file
194
userManagement/yunSite/components/serviceStation.vue
Normal file
@@ -0,0 +1,194 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="company_body">
|
||||
<view class="header_seach_seach">
|
||||
<uni-easyinput @confirm="seachFn"
|
||||
style="height: 100%; flex: 1; margin: 0 auto; background-color: #FFFFFF; border-radius:12rpx ;"
|
||||
prefixIcon="search" v-model="getData.otherSiteName" placeholder="请输入油站名称进行查询" >
|
||||
</uni-easyinput>
|
||||
</view>
|
||||
</view>
|
||||
<view class="company_list">
|
||||
<view @tap="seleFn(item)" v-for="(item,index) in stationList" class="company_list_item">
|
||||
<image src="../../../static/selegs.png" style="width: 73rpx; height: 73rpx;"></image>
|
||||
<view class="company_list_item_text">{{item.otherSiteName}}</view>
|
||||
<view style="flex-grow: 1; text-align: end;text-align: -webkit-right;">
|
||||
<view class="checkboxs">
|
||||
<view v-if="item.isChecked" class="checkboxss"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import serve from '@/api/userManagement/yunSite.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
oilCompanyInfoList:[],
|
||||
siteId:'',
|
||||
timer: null,
|
||||
stationList:[],
|
||||
getData: {
|
||||
otherSiteName:''
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
// if(options.item) {
|
||||
// let item = JSON.parse(decodeURI(options.item))
|
||||
// this.siteId = item.siteId
|
||||
// // this.oilCompanyInfoList = JSON.parse(decodeURI(options.item))
|
||||
// }
|
||||
},
|
||||
onShow() {
|
||||
// this.getDriversList()
|
||||
},
|
||||
// onReachBottom() {
|
||||
// // this.getData.currentPage += 1
|
||||
// this.getDriversList()
|
||||
// },
|
||||
methods: {
|
||||
|
||||
seleFn(item) {
|
||||
clearTimeout(this.timer)
|
||||
|
||||
this.$set(item,'isChecked',!item.isChecked)
|
||||
|
||||
uni.$emit('yunSiteServiceStation', item)
|
||||
this.timer = setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 200)
|
||||
},
|
||||
seachFn() {
|
||||
if(!this.getData.otherSiteName) {
|
||||
uni.showToast({
|
||||
title:'搜索条件不可为空',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
// this.getData.currentPage = 1
|
||||
this.getDriversList()
|
||||
},
|
||||
getDriversList() {
|
||||
|
||||
serve.getSiteChannelList(this.getData).then(res => {
|
||||
if (res.code !== 20000) return
|
||||
|
||||
let data = res.data.map(item => {
|
||||
item['isChecked'] = false
|
||||
return item
|
||||
})
|
||||
|
||||
// data.forEach(item => {
|
||||
// this.oilCompanyInfoList.forEach(secItem =>{
|
||||
// if(secItem.id === item.id) {
|
||||
// item['isChecked'] = true
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
|
||||
// if (this.getData.currentPage !== 1) {
|
||||
// this.stationList = this.stationList.concat(data);
|
||||
// return
|
||||
// }
|
||||
this.stationList = data
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.companytip {
|
||||
width: 88rpx;
|
||||
height: 38rpx;
|
||||
border-radius: 4rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.checkboxss {
|
||||
width: 80%;
|
||||
height: 80%;
|
||||
background-color: #2866FF;
|
||||
border-radius: 50px;
|
||||
}
|
||||
|
||||
.checkboxs {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
border-radius: 50px;
|
||||
border: 1px solid #BBBBBB;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.checkbox__inner {
|
||||
border-radius: 50px !important;
|
||||
}
|
||||
|
||||
.uni-data-checklist {
|
||||
flex: 0 !important;
|
||||
}
|
||||
|
||||
.uni-data-checklist .checklist-group .checklist-box {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.uni-data-checklist {
|
||||
width: max-content;
|
||||
}
|
||||
|
||||
.company_list_item_text {
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
margin-left: 23rpx;
|
||||
}
|
||||
|
||||
.company_list_item {
|
||||
min-height: 92rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 3px 9px 0px rgba(88, 88, 88, 0.2);
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 9rpx 21rpx;
|
||||
margin-top: 19rpx;
|
||||
}
|
||||
|
||||
.company_list {
|
||||
width: 100vw;
|
||||
padding: 0 31rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.company_body {
|
||||
background-color: #2866FF;
|
||||
padding: 25rpx 0;
|
||||
}
|
||||
|
||||
.uni-easyinput__content {
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
.uni-easyinput {
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
.header_seach_seach {
|
||||
display: flex;
|
||||
height: 80rpx;
|
||||
background-color: #2866FF;
|
||||
padding: 0 31rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user