更新
This commit is contained in:
0
api/userManagement/customer.js
Normal file
0
api/userManagement/customer.js
Normal file
45
api/userManagement/yunSite.js
Normal file
45
api/userManagement/yunSite.js
Normal file
@@ -0,0 +1,45 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
// 司机
|
||||
customerRelationSite(data) {
|
||||
return request({
|
||||
url: '/oil-user/oilCustomerChannelRelation/customerRelationSite',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
},
|
||||
|
||||
// 油站渠道
|
||||
getSiteChannelList(data) {
|
||||
return request({
|
||||
url: '/oil-site/oilSiteChannel/getSiteChannelList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
},
|
||||
// 权限
|
||||
getSiteCloudRoles() {
|
||||
return request({
|
||||
url: '/oil-user/sysRole/getSiteCloudRoles',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
// 修改
|
||||
updateCustomerRelationSite(data) {
|
||||
return request({
|
||||
url: '/oil-user/oilCustomerChannelRelation/updateCustomerRelationSite',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
},
|
||||
// 新增
|
||||
saveCustomerRelationSite(data) {
|
||||
return request({
|
||||
url: '/oil-user/oilCustomerChannelRelation/saveCustomerRelationSite',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
57
pages.json
57
pages.json
@@ -414,6 +414,63 @@
|
||||
|
||||
}
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "userManagement",
|
||||
"pages": [{
|
||||
"path": "customer/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "客户运营系统用户信息",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "yunSite/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "星油云站用户信息",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"path": "customer/detail",
|
||||
"style": {
|
||||
"navigationBarBackgroundColor": "#2866FF",
|
||||
"navigationBarTitleText": "用户详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
"path": "yunSite/detail",
|
||||
"style": {
|
||||
"navigationBarBackgroundColor": "#2866FF",
|
||||
"navigationBarTitleText": "用户详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"path": "yunSite/components/serviceStation",
|
||||
"style": {
|
||||
"navigationBarTitleText": "请选择油站",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"path": "yunSite/components/auth",
|
||||
"style": {
|
||||
"navigationBarTitleText": "请选择权限",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@@ -132,5 +132,25 @@
|
||||
"lable":"finance:account:serviceStation"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"用户管理",
|
||||
"icon":"iconxiugaiyonghuxinxi",
|
||||
"label":"userManagement",
|
||||
"colorOpen":false,
|
||||
"submenu":[
|
||||
{
|
||||
"icon":"iconxiugaiyonghuxinxi",
|
||||
"name":"客户运营系统",
|
||||
"router":"/userManagement/customer/index",
|
||||
"lable":"management:user:customer"
|
||||
},
|
||||
{
|
||||
"icon":"iconxiugaiyonghuxinxi",
|
||||
"name":"星油云站",
|
||||
"router":"/userManagement/yunSite/index",
|
||||
"lable":"management:user:yunSite"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
177
userManagement/customer/detail.vue
Normal file
177
userManagement/customer/detail.vue
Normal file
@@ -0,0 +1,177 @@
|
||||
<template>
|
||||
<view class="detail">
|
||||
<view class="addDiver_card">
|
||||
<view class="card_title">
|
||||
<view class="tiao"></view>
|
||||
<view class="card_title_text">基础信息</view>
|
||||
</view>
|
||||
<uni-list>
|
||||
<uni-list-item>
|
||||
<view class="list_header" slot="header">
|
||||
用户手机号
|
||||
</view>
|
||||
<view style="padding-right: 16px !important;" slot="body" class="list_right">
|
||||
<input v-model="postData.userName" placeholder="请输入昵称" class="list_right_input" />
|
||||
</view>
|
||||
</uni-list-item>
|
||||
<uni-list-item>
|
||||
<view class="list_header" slot="header">
|
||||
用户姓名
|
||||
</view>
|
||||
<view style="padding-right: 16px !important;" slot="body" class="list_right">
|
||||
<input v-model="postData.userName" placeholder="请输入昵称" class="list_right_input" />
|
||||
</view>
|
||||
</uni-list-item>
|
||||
<uni-list-item>
|
||||
<view class="list_header" slot="header">
|
||||
用户密码
|
||||
</view>
|
||||
<view style="padding-right: 16px !important;" slot="body" class="list_right">
|
||||
<input v-model="postData.userName" placeholder="请输入昵称" class="list_right_input" />
|
||||
</view>
|
||||
</uni-list-item>
|
||||
</uni-list>
|
||||
<view class="card_title">
|
||||
<view class="tiao"></view>
|
||||
<view class="card_title_text">用户权限信息</view>
|
||||
</view>
|
||||
<uni-list>
|
||||
<uni-list-item>
|
||||
<view class="list_header" slot="header">
|
||||
选择企业
|
||||
</view>
|
||||
<view style="padding-right: 16px !important;" slot="body" class="list_right">
|
||||
<input v-model="postData.userName" placeholder="请输入昵称" class="list_right_input" />
|
||||
</view>
|
||||
</uni-list-item>
|
||||
<uni-list-item direction="column" >
|
||||
<view class="list_header" slot="header">
|
||||
所属权限
|
||||
</view>
|
||||
<view slot="body" >
|
||||
<view class="label-list">
|
||||
<text class="label">星油云站超级管理员</text>
|
||||
</view>
|
||||
</view>
|
||||
</uni-list-item>
|
||||
</uni-list>
|
||||
</view>
|
||||
<view class="button-group">
|
||||
<view class="button red">修改</view>
|
||||
<view class="button blue">保存</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
postData: {}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.detail {
|
||||
padding: 0 40rpx;
|
||||
|
||||
.addDiver_card {
|
||||
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 3px 9px 0px rgba(88, 88, 88, 0.2);
|
||||
border-radius: 20rpx;
|
||||
margin-top: 38rpx;
|
||||
overflow: hidden;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.card_title {
|
||||
display: flex;
|
||||
// border-bottom: 1px solid #F0F0F0;
|
||||
align-items: center;
|
||||
padding-bottom: 17rpx;
|
||||
height: 86rpx;
|
||||
}
|
||||
|
||||
.card_title_text {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.tiao {
|
||||
width: 8rpx;
|
||||
height: 34rpx;
|
||||
background: #2866FF;
|
||||
}
|
||||
|
||||
.list_header {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// padding-left: 16px;
|
||||
position: relative;
|
||||
height: fit-content;
|
||||
}
|
||||
|
||||
|
||||
.list_right {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.list_right_input {
|
||||
width: 100%;
|
||||
color: #333333;
|
||||
text-align: end !important;
|
||||
font-size: 28rpx;
|
||||
text-align: right !important;
|
||||
padding-left: 90rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.label-list {
|
||||
margin-top: 25rpx;
|
||||
}
|
||||
.label {
|
||||
padding: 10rpx 15rpx;
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
border: 1px solid #F0F0F0;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.button-group {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 70rpx;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.button {
|
||||
width: 670rpx;
|
||||
height: 100rpx;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
color: #fff;
|
||||
border-radius: 10rpx;
|
||||
&:nth-of-type(2) {
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
&.red{
|
||||
background: #EA0000;
|
||||
}
|
||||
&.blue {
|
||||
background: #2866FF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
8
userManagement/customer/index.vue
Normal file
8
userManagement/customer/index.vue
Normal file
@@ -0,0 +1,8 @@
|
||||
<template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
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>
|
||||
338
userManagement/yunSite/detail.vue
Normal file
338
userManagement/yunSite/detail.vue
Normal file
@@ -0,0 +1,338 @@
|
||||
<template>
|
||||
<view class="detail">
|
||||
<view class="addDiver_card">
|
||||
<view class="card_title">
|
||||
<view class="tiao"></view>
|
||||
<view class="card_title_text">基础信息</view>
|
||||
</view>
|
||||
<uni-list>
|
||||
<uni-list-item>
|
||||
<view class="list_header" slot="header">
|
||||
用户手机号
|
||||
</view>
|
||||
<view slot="body" class="list_right">
|
||||
<input v-model="postData.phone" :disabled="!isAdd" placeholder="请输入用户手机号"
|
||||
class="list_right_input" />
|
||||
</view>
|
||||
</uni-list-item>
|
||||
<uni-list-item>
|
||||
<view class="list_header" slot="header">
|
||||
用户姓名
|
||||
</view>
|
||||
<view slot="body" class="list_right">
|
||||
<input v-model="postData.customerName" :disabled="!wantUpdate" placeholder="请输入用户姓名"
|
||||
class="list_right_input" />
|
||||
</view>
|
||||
</uni-list-item>
|
||||
</uni-list>
|
||||
<view class="card_title">
|
||||
<view class="tiao"></view>
|
||||
<view class="card_title_text">用户权限信息</view>
|
||||
</view>
|
||||
<uni-list>
|
||||
<uni-list-item
|
||||
@tap="jump('/userManagement/yunSite/components/serviceStation',{siteId:postData.siteId}, isAdd)">
|
||||
<view class="list_header" slot="header">
|
||||
油站渠道
|
||||
</view>
|
||||
<view slot="body" class="list-frame site">
|
||||
<view class="tips rel2rpx">{{postData.siteName}}</view>
|
||||
<view v-if="isAdd && !postData.siteName" class="tips">选择油站渠道</view>
|
||||
<uni-icons v-show="isAdd" color="#999" type="right" size="15"></uni-icons>
|
||||
</view>
|
||||
</uni-list-item>
|
||||
<!-- <uni-list-item direction="column"
|
||||
@tap="jump('/userManagement/yunSite/components/serviceStation',postData.oilSiteInfoList)">
|
||||
<view class="list_header" slot="header">
|
||||
油站渠道
|
||||
</view>
|
||||
<view slot="body" class="list-frame">
|
||||
<view>
|
||||
<text class="label" v-for="(item,index) in postData.oilSiteInfoList"
|
||||
:key="index">{{item.siteName}}</text>
|
||||
</view>
|
||||
<view v-if="!postData.oilSiteInfoList.length" class="tips">选择油站渠道</view>
|
||||
<uni-icons v-show="wantUpdate" color="#999" type="right" size="15"></uni-icons>
|
||||
</view>
|
||||
</uni-list-item> -->
|
||||
<uni-list-item direction="column"
|
||||
@tap="jump('/userManagement/yunSite/components/auth',postData.sysRoleList)">
|
||||
<view class="list_header" slot="header">
|
||||
所属权限
|
||||
</view>
|
||||
<view slot="body" class="list-frame">
|
||||
<view>
|
||||
<text class="label" v-for="(item,index) in postData.sysRoleList"
|
||||
:key="index">{{item.roleName}}</text>
|
||||
</view>
|
||||
<view v-if="!postData.sysRoleList.length" class="tips">选择所属权限</view>
|
||||
<uni-icons v-show="wantUpdate || !postData.sysRoleList.length" color="#999" type="right"
|
||||
size="15"></uni-icons>
|
||||
</view>
|
||||
</uni-list-item>
|
||||
</uni-list>
|
||||
</view>
|
||||
<view class="button-group">
|
||||
<view v-if="!wantUpdate" class="button red" @tap="update">修改</view>
|
||||
<view v-else class="button blue" @tap="submit">保存</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tool from '@/utils/tool'
|
||||
|
||||
import serve from '@/api/userManagement/yunSite.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isAdd: false,
|
||||
wantUpdate: false,
|
||||
postData: {
|
||||
phone: '',
|
||||
siteName: '',
|
||||
customerName: '',
|
||||
sysRoleList: [],
|
||||
// oilSiteInfoList: [],
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.item) {
|
||||
this.postData = JSON.parse(decodeURI(options.item))
|
||||
if (!this.postData.sysRoleList) this.postData.sysRoleList = []
|
||||
} else this.isAdd = this.wantUpdate = true
|
||||
|
||||
uni.$on('yunSiteServiceStation', (item) => {
|
||||
this.postData.channelId = item.siteId
|
||||
this.postData.siteName = item.otherSiteName
|
||||
// item['name'] = item.siteName
|
||||
// if (!item.isChecked) {
|
||||
// let index = this.postData.oilSiteInfoList.findIndex(secItem => secItem.id == item.id)
|
||||
// if (index !== -1) {
|
||||
// this.postData.oilSiteInfoList.splice(index, 1)
|
||||
// }
|
||||
// return
|
||||
// }
|
||||
// this.postData.oilSiteInfoList.push(item)
|
||||
})
|
||||
|
||||
uni.$on('yunSiteAuth', (item) => {
|
||||
if (!item.isChecked) {
|
||||
let index = this.postData.sysRoleList.findIndex(secItem => secItem.id == item.id)
|
||||
if (index !== -1) {
|
||||
this.postData.sysRoleList.splice(index, 1)
|
||||
}
|
||||
return
|
||||
}
|
||||
this.postData.sysRoleList.push(item)
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
let needCheckMap = {
|
||||
customerName:{
|
||||
tacitly:'',
|
||||
WrongText:'请输入用户姓名'
|
||||
},
|
||||
phone:{
|
||||
custom:/^[1][3,4,5,7,8,9][0-9]{9}$/,
|
||||
WrongText:'请输入正确手机号码'
|
||||
},
|
||||
siteName:{
|
||||
tacitly:'',
|
||||
WrongText:'请选择油站渠道'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
let check = tool.checkFn(this.postData,[],needCheckMap)
|
||||
|
||||
if(!check.result){
|
||||
uni.showToast({
|
||||
title:check.WrongText,
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
let ids = this.postData.sysRoleList.reduce((pre, cur) => {
|
||||
pre.push(cur.id)
|
||||
return pre
|
||||
}, [])
|
||||
this.postData.roleIds = ids
|
||||
|
||||
this.judgeQuery().then(res => {
|
||||
|
||||
if (res.code === 20000) {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1500)
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
judgeQuery() {
|
||||
if (this.isAdd) return serve.saveCustomerRelationSite(this.postData)
|
||||
else return serve.updateCustomerRelationSite(this.postData)
|
||||
},
|
||||
update() {
|
||||
this.wantUpdate = true
|
||||
},
|
||||
|
||||
jump(path, item,banJump = true) {
|
||||
if(!banJump) return
|
||||
if (!this.wantUpdate) return
|
||||
let url = item ? `${path}?item=${encodeURI(JSON.stringify(item))}` : path
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.detail {
|
||||
padding: 0 40rpx;
|
||||
|
||||
.addDiver_card {
|
||||
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 3px 9px 0px rgba(88, 88, 88, 0.2);
|
||||
border-radius: 20rpx;
|
||||
margin-top: 38rpx;
|
||||
overflow: hidden;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.card_title {
|
||||
display: flex;
|
||||
// border-bottom: 1px solid #F0F0F0;
|
||||
align-items: center;
|
||||
padding-bottom: 17rpx;
|
||||
height: 86rpx;
|
||||
}
|
||||
|
||||
.card_title_text {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.tiao {
|
||||
width: 8rpx;
|
||||
height: 34rpx;
|
||||
background: #2866FF;
|
||||
}
|
||||
|
||||
.list_header {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// padding-left: 16px;
|
||||
position: relative;
|
||||
height: fit-content;
|
||||
}
|
||||
|
||||
|
||||
.list_right {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.list_right_input {
|
||||
width: 100%;
|
||||
color: #333333;
|
||||
text-align: end !important;
|
||||
font-size: 28rpx;
|
||||
text-align: right !important;
|
||||
padding-left: 90rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.list-frame {
|
||||
margin-top: 25rpx;
|
||||
position: relative;
|
||||
|
||||
&.site {
|
||||
margin: 0;
|
||||
flex: 1
|
||||
}
|
||||
|
||||
uni-icons {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-51%);
|
||||
right: -30rpx;
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
text-align: right;
|
||||
&.rel2rpx {
|
||||
position: 'relative';
|
||||
top: 2rpx
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.single-label {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.label {
|
||||
margin: 3rpx 1rpx;
|
||||
display: inline-block;
|
||||
padding: 10rpx 15rpx;
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
border: 1px solid #F0F0F0;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.button-group {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 70rpx;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.button {
|
||||
width: 670rpx;
|
||||
height: 100rpx;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
color: #fff;
|
||||
border-radius: 10rpx;
|
||||
|
||||
// &:nth-of-type(2) {
|
||||
// margin-top: 50rpx;
|
||||
// }
|
||||
|
||||
&.red {
|
||||
background: #EA0000;
|
||||
}
|
||||
|
||||
&.blue {
|
||||
background: #2866FF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
255
userManagement/yunSite/index.vue
Normal file
255
userManagement/yunSite/index.vue
Normal file
@@ -0,0 +1,255 @@
|
||||
<template>
|
||||
<view @click="ejectOpen=false" style="height: 100vh;display: flex;flex-direction: column;">
|
||||
<view class="header">
|
||||
<view :style="{height:styles.top+'px'}"></view>
|
||||
<uni-nav-bar @clickLeft='jump(-1)' :border="false" color='white' backgroundColor="rgba(0,0,0,0)"
|
||||
left-icon="back" title="用户信息" />
|
||||
<view class="seach">
|
||||
<uni-easyinput style="flex:1" :candidate='candidate' :ejectOpen='ejectOpen' @ejectFn='ejectFn'
|
||||
:letfText='letfText' confirmType='search' @confirm='seachFn'
|
||||
placeholder-style="color:#bbbbbb;font-weight: 100;" v-model="seachValue"
|
||||
:placeholder="letfText=='企业'?'企业名,企业ID':'司机姓名,司机手机号'" @iconClick="onClick">
|
||||
</uni-easyinput>
|
||||
<button @tap="jump('/userManagement/yunSite/detail')" class="header_seach_butten">
|
||||
<uni-icons type="plusempty" size="20" color="#bbbbbb"></uni-icons>
|
||||
<view>新增</view>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<view style="flex:1;overflow: hidden;">
|
||||
<view v-if="!tableList.length"
|
||||
style="width: 100vw; height: 100%; display: flex;align-items: center;justify-content: center;">
|
||||
<image src="@/static/qx.png" style="width: 500rpx; height: 355rpx;"></image>
|
||||
</view>
|
||||
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower='scrolltolower'>
|
||||
<view class="container">
|
||||
<view v-for="(item,index) in tableList" class="form_body">
|
||||
<view @tap="jump('/userManagement/yunSite/detail',item)" class="form_body_item">
|
||||
<view class="form_body_item_body">
|
||||
<view class="form-item_body_left" style="">
|
||||
<image :src="item.headPhoto?item.headPhoto: '../../static/tx.png'"
|
||||
style="width: 100rpx; height: 100rpx;border-radius: 50%;"></image>
|
||||
<view class="form_body_item_body_container">
|
||||
<view :style="{color:item.customerName ?'':'#999999'}">
|
||||
{{item.customerName ||'暂无' }}
|
||||
</view>
|
||||
<view>
|
||||
{{item.phone || '暂无'}}
|
||||
<view class="copy" v-if="item.phone" @tap.stop="copy(item.phone)"></view>
|
||||
</view>
|
||||
<view class="form-item_body_left_bottom_text" style="">
|
||||
{{item.siteName ||'暂无'}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form_body_item_footer">
|
||||
<view>{{item.customerId}}</view>
|
||||
<view>{{item.updateTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import serve from '@/api/userManagement/yunSite.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
seachValue: '',
|
||||
letfText: '司机',
|
||||
ejectOpen: false,
|
||||
candidate: ['司机', '油站'],
|
||||
|
||||
styles: {},
|
||||
paramter: {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
sorted: {
|
||||
createTime: 'desc'
|
||||
},
|
||||
params: {}
|
||||
},
|
||||
tableList: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.styles = uni.getMenuButtonBoundingClientRect()
|
||||
},
|
||||
onShow() {
|
||||
this.seachFn()
|
||||
},
|
||||
methods: {
|
||||
ejectFn(e) {
|
||||
this.letfText = e
|
||||
this.tableList = []
|
||||
this.getByPage()
|
||||
},
|
||||
seachFn() {
|
||||
this.tableList = []
|
||||
this.paramter.currentPage = 1
|
||||
this.getByPage()
|
||||
},
|
||||
getByPage() {
|
||||
if (this.letfText == '油站') {
|
||||
this.paramter.params = {
|
||||
siteName: this.seachValue
|
||||
}
|
||||
} else {
|
||||
this.paramter.params = {
|
||||
customerName: this.seachValue,
|
||||
}
|
||||
}
|
||||
this.siteHandle()
|
||||
},
|
||||
siteHandle() {
|
||||
serve.customerRelationSite(this.paramter).then(res => {
|
||||
if (!res.data.list.length) {
|
||||
uni.showToast({
|
||||
title: '没有数据了哦~',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.tableList = this.tableList.concat(res.data.list);
|
||||
})
|
||||
},
|
||||
// 触底加载
|
||||
scrolltolower() {
|
||||
this.paramter.currentPage += 1
|
||||
this.getByPage()
|
||||
|
||||
},
|
||||
handlerNumber(number) {
|
||||
if (number == 0) return number
|
||||
if (!number) {
|
||||
return '--'
|
||||
}
|
||||
return +number.toFixed(2)
|
||||
},
|
||||
|
||||
jump(path, item) {
|
||||
|
||||
if (path === -1) {
|
||||
return uni.navigateBack()
|
||||
}
|
||||
|
||||
let url = item ? `${path}?item=${encodeURI(JSON.stringify(item))}` : path
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
onClick() {
|
||||
this.ejectOpen = !this.ejectOpen
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.uni-easyinput__content {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.header {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
min-height: 403rpx;
|
||||
background: url('https://xoi-support.oss-cn-hangzhou.aliyuncs.com/星油admin小程序/sjbj.png') center/100% no-repeat;
|
||||
}
|
||||
|
||||
.header .seach {
|
||||
display: flex;
|
||||
margin-top: 60rpx;
|
||||
padding: 0 50rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
.uni-easyinput__content {
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
.header_seach_butten {
|
||||
font-size: 24rpx !important;
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
margin: 0 !important;
|
||||
flex-shrink: 1;
|
||||
margin-left: 9rpx !important;
|
||||
background: #FFFFFF !important;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 40rpx;
|
||||
}
|
||||
|
||||
.form_body {
|
||||
/* width: 100vw; */
|
||||
padding: 0 10px;
|
||||
margin-top: 40rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:nth-of-type(1) {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.form_body_item {
|
||||
height: 217rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 3px 9px 0px rgba(88, 88, 88, 0.2);
|
||||
border-radius: 12rpx;
|
||||
font-size: 28rpx;
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
/* .form-item_body_right {
|
||||
flex-grow: 1;
|
||||
text-align: end;
|
||||
color: #999999;
|
||||
font-size: 24rpx;
|
||||
height: max-content;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
} */
|
||||
|
||||
.form_body_item_body {
|
||||
padding-bottom: 30rpx;
|
||||
border-bottom: 1px solid #F0F0F0;
|
||||
}
|
||||
|
||||
.form_body_item_body_container {
|
||||
margin-left: 24rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.form-item_body_left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.form-item_body_left_bottom_text {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.form_body_item_footer {
|
||||
display: flex;
|
||||
color: #BBBBBB;
|
||||
font-size: 22rpx;
|
||||
justify-content: space-between;
|
||||
/* margin-top: 15rpx; */
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
}
|
||||
</style>
|
||||
@@ -3,10 +3,10 @@ import utils from '@/utils/encode'
|
||||
// const env = process.env.NODE_ENV
|
||||
// const env = 'test'
|
||||
const env = 'test'
|
||||
const testUrl = 'http://192.168.1.83:38080'
|
||||
const testUrl = 'http://192.168.1.85:38080'
|
||||
// const productUrl = 'https://www.xingoil.com/adminapi'
|
||||
// const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
|
||||
// const productUrl = 'http://uat.xingoil.com/adminapi'
|
||||
const productUrl = 'http://uat.xingoil.com/adminapi'
|
||||
|
||||
const service = axios.create({
|
||||
baseURL: env == 'production' ? productUrl : testUrl,
|
||||
|
||||
Reference in New Issue
Block a user