新电动车
This commit is contained in:
parent
8a26b1ed2f
commit
5e49fa4ef2
|
@ -1,7 +1,7 @@
|
||||||
const install = (Vue, vm) => {
|
const install = (Vue, vm) => {
|
||||||
uni.setStorageSync('deptId', 100);
|
uni.setStorageSync('deptId', 100);
|
||||||
Vue.prototype.$u.http.setConfig({
|
Vue.prototype.$u.http.setConfig({
|
||||||
// baseUrl: 'http://192.168.2.46:4101', //键辉本地
|
// baseUrl: 'http://192.168.2.76:4101', //键辉本地
|
||||||
// baseUrl: 'http://192.168.0.102:4101', //景森本地
|
// baseUrl: 'http://192.168.0.102:4101', //景森本地
|
||||||
baseUrl: 'https://ele.ccttiot.com/prod-api', //线上
|
baseUrl: 'https://ele.ccttiot.com/prod-api', //线上
|
||||||
loadingText: '努力加载中~',
|
loadingText: '努力加载中~',
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getlist() {
|
getlist() {
|
||||||
this.$u.get(`/bst/areaJoin/list?pageNum=1&pageSize=999`).then(res => {
|
this.$u.get(`/bst/areaJoin/list?pageNum=1&pageSize=999&types=1,2`).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.wateringList = res.rows
|
this.wateringList = res.rows
|
||||||
}
|
}
|
||||||
|
|
428
page_fenbao/yunwei/addyunwei.vue
Normal file
428
page_fenbao/yunwei/addyunwei.vue
Normal file
|
@ -0,0 +1,428 @@
|
||||||
|
<template>
|
||||||
|
<view class="page">
|
||||||
|
<u-navbar :title="tit" :border-bottom="false" :background="bgc" title-color='#000' back-icon-color="#000"
|
||||||
|
title-size='36' height='50'></u-navbar>
|
||||||
|
<view class="box">
|
||||||
|
<view class="title">
|
||||||
|
基本信息
|
||||||
|
</view>
|
||||||
|
<view class="list">
|
||||||
|
<view class="list_val" style="position: relative;">
|
||||||
|
<view class="" style="padding-top:12rpx;width: 176rpx;">身份类型</view> <input type="text" disabled="false" v-model="sheng" :placeholder="sheng" />
|
||||||
|
<!-- <u-select v-model="show" :list="arr" @confirm="confirm"></u-select> -->
|
||||||
|
</view>
|
||||||
|
<view class="list_val">
|
||||||
|
<view class="" style="padding-top:12rpx">手机号码</view> <input type="text" v-model="tel"
|
||||||
|
placeholder="请输入手机号码" />
|
||||||
|
</view>
|
||||||
|
<!-- <view class="list_val">
|
||||||
|
<view class="" style="padding-top:12rpx">分成比例</view> <input type="text" v-model="bili"
|
||||||
|
placeholder="请输入分成比例%" />
|
||||||
|
</view> -->
|
||||||
|
<view class="list_val">
|
||||||
|
<view class="" style="padding-top:12rpx">备注</view> <input type="text" v-model="beizhu"
|
||||||
|
placeholder="请输入备注" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="title">
|
||||||
|
权限
|
||||||
|
</view>
|
||||||
|
<view class="swlist">
|
||||||
|
<view class="swlist_val" v-for="(item,index) in list" :key="index">
|
||||||
|
<view class="lt">
|
||||||
|
<view class="one">
|
||||||
|
{{item.name}}
|
||||||
|
</view>
|
||||||
|
<view class="two">
|
||||||
|
{{item.tit}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="rt">
|
||||||
|
<u-switch v-model="item.checked" active-color="#4C97E7" size="36"
|
||||||
|
inactive-color="#eee"></u-switch>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="baocun" @click="btncj">
|
||||||
|
{{tit}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: false,
|
||||||
|
bgc: {
|
||||||
|
backgroundColor: "#fff"
|
||||||
|
},
|
||||||
|
level: '',
|
||||||
|
tel: '',
|
||||||
|
sheng: '运维',
|
||||||
|
arr: [{
|
||||||
|
label: '加盟商',
|
||||||
|
value: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '合伙人',
|
||||||
|
value: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
tit: '创建运维人员',
|
||||||
|
userId: '',
|
||||||
|
bili: '',
|
||||||
|
beizhu: '',
|
||||||
|
jiamtype: '',
|
||||||
|
areaId: '',
|
||||||
|
jiamid: '',
|
||||||
|
// 权限映射配置
|
||||||
|
permissionConfig: {
|
||||||
|
'查看运营区': 'area:view',
|
||||||
|
'操作运营区': 'area:edit',
|
||||||
|
'查看故障': 'fault:view',
|
||||||
|
'故障审核': 'fault:edit',
|
||||||
|
'查看订单': 'order:view',
|
||||||
|
'操作订单': 'order:edit',
|
||||||
|
'查看车辆': 'device:view',
|
||||||
|
'操作车辆': 'device:edit',
|
||||||
|
'查看订单金额': 'order:view:amount',
|
||||||
|
'查看客服': 'customerService:view',
|
||||||
|
'操作客服': 'customerService:edit'
|
||||||
|
},
|
||||||
|
list: [{
|
||||||
|
name: '查看运营区',
|
||||||
|
tit: '是否允许',
|
||||||
|
checked: false,
|
||||||
|
txt: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '操作运营区',
|
||||||
|
tit: '是否允许',
|
||||||
|
checked: false,
|
||||||
|
txt: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '查看故障',
|
||||||
|
tit: '是否允许',
|
||||||
|
checked: false,
|
||||||
|
txt: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '故障审核',
|
||||||
|
tit: '是否允许',
|
||||||
|
checked: false,
|
||||||
|
txt: 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '查看订单',
|
||||||
|
tit: '是否允许',
|
||||||
|
checked: false,
|
||||||
|
txt: 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '操作订单',
|
||||||
|
tit: '是否允许',
|
||||||
|
checked: false,
|
||||||
|
txt: 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '查看车辆',
|
||||||
|
tit: '是否允许',
|
||||||
|
checked: false,
|
||||||
|
txt: 7
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '操作车辆',
|
||||||
|
tit: '是否允许',
|
||||||
|
checked: false,
|
||||||
|
txt: 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '查看客服',
|
||||||
|
tit: '是否允许',
|
||||||
|
checked: false,
|
||||||
|
txt: 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '操作客服',
|
||||||
|
tit: '是否允许',
|
||||||
|
checked: false,
|
||||||
|
txt: 11
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onLoad(option) {
|
||||||
|
this.areaId = uni.getStorageSync('adminAreaid')
|
||||||
|
|
||||||
|
if (option.item) {
|
||||||
|
this.tit = '编辑运维人员'
|
||||||
|
const obj = JSON.parse(option.item)
|
||||||
|
this.initFormData(obj)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
// 初始化表单数据
|
||||||
|
initFormData(obj) {
|
||||||
|
this.tel = obj.userPhone
|
||||||
|
this.areaId = obj.areaId
|
||||||
|
this.bili = obj.point
|
||||||
|
this.jiamid = obj.id
|
||||||
|
this.beizhu = obj.remark
|
||||||
|
this.jiamtype = obj.type
|
||||||
|
|
||||||
|
// 设置权限选中状态
|
||||||
|
this.setPermissionStatus(obj.permissions)
|
||||||
|
|
||||||
|
// 设置身份类型显示
|
||||||
|
},
|
||||||
|
|
||||||
|
// 设置权限选中状态
|
||||||
|
setPermissionStatus(permissions) {
|
||||||
|
const permissionMap = {
|
||||||
|
'area:view': 0,
|
||||||
|
'area:edit': 1,
|
||||||
|
'fault:view': 2,
|
||||||
|
'fault:edit': 3,
|
||||||
|
'order:view': 4,
|
||||||
|
'order:edit': 5,
|
||||||
|
'device:view': 6,
|
||||||
|
'device:edit': 7,
|
||||||
|
'customerService:view': 8,
|
||||||
|
'customerService:edit': 9
|
||||||
|
}
|
||||||
|
|
||||||
|
permissions.forEach(permission => {
|
||||||
|
const index = permissionMap[permission]
|
||||||
|
if (index !== undefined) {
|
||||||
|
this.list[index].checked = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 身份选择确认
|
||||||
|
confirm(e) {
|
||||||
|
this.sheng = e[0].label
|
||||||
|
this.jiamtype = e[0].value
|
||||||
|
},
|
||||||
|
|
||||||
|
// 收集选中的权限
|
||||||
|
collectPermissions() {
|
||||||
|
return this.list
|
||||||
|
.filter(item => item.checked)
|
||||||
|
.map(item => this.permissionConfig[item.name])
|
||||||
|
.filter(Boolean) // 过滤掉undefined
|
||||||
|
},
|
||||||
|
|
||||||
|
// 构建请求数据
|
||||||
|
buildRequestData() {
|
||||||
|
return {
|
||||||
|
id: this.jiamid,
|
||||||
|
userPhone: this.tel,
|
||||||
|
areaId: this.areaId,
|
||||||
|
point: this.bili,
|
||||||
|
type: 3,
|
||||||
|
remark: this.beizhu,
|
||||||
|
permissions: this.collectPermissions()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 处理API响应
|
||||||
|
handleApiResponse(res, successMessage) {
|
||||||
|
if (res.code === 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: successMessage,
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 2000)
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 点击创建/编辑
|
||||||
|
async btncj() {
|
||||||
|
const data = this.buildRequestData()
|
||||||
|
const isEdit = this.tit === '编辑运维人员'
|
||||||
|
const apiMethod = isEdit ? 'put' : 'post'
|
||||||
|
const apiUrl = '/bst/areaJoin'
|
||||||
|
const successMessage = isEdit ? '编辑成功' : '创建成功'
|
||||||
|
|
||||||
|
try {
|
||||||
|
const res = await this.$u[apiMethod](apiUrl, data)
|
||||||
|
this.handleApiResponse(res, successMessage)
|
||||||
|
} catch (error) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请求失败,请重试',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
/deep/ .u-title,
|
||||||
|
/deep/ .uicon-nav-back {
|
||||||
|
padding-bottom: 22rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swlist {
|
||||||
|
margin-top: 34rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.swlist_val {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 324rpx;
|
||||||
|
height: 144rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||||
|
padding-top: 28rpx;
|
||||||
|
padding-left: 38rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-top: 18rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lt {
|
||||||
|
.one {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #3D3D3D;
|
||||||
|
}
|
||||||
|
|
||||||
|
.two {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #808080;
|
||||||
|
margin-top: 12rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.rt {
|
||||||
|
margin-top: 24rpx;
|
||||||
|
padding-right: 12rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #3D3D3D;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page {
|
||||||
|
width: 750rpx;
|
||||||
|
|
||||||
|
.box {
|
||||||
|
width: 750rpx;
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: scroll;
|
||||||
|
background: #F4F5F7;
|
||||||
|
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||||
|
padding: 32rpx 36rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-bottom: 100rpx;
|
||||||
|
|
||||||
|
.baocun {
|
||||||
|
width: 584rpx;
|
||||||
|
height: 90rpx;
|
||||||
|
margin: auto;
|
||||||
|
background: linear-gradient(270deg, #4C97E7 0%, #4C97E7 100%);
|
||||||
|
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
||||||
|
margin-top: 110rpx;
|
||||||
|
margin-bottom: 78rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 40rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 90rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swlist {
|
||||||
|
margin-top: 34rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.swlist_val {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 324rpx;
|
||||||
|
height: 144rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||||
|
padding-top: 28rpx;
|
||||||
|
padding-left: 38rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-top: 18rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lt {
|
||||||
|
.one {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #3D3D3D;
|
||||||
|
}
|
||||||
|
|
||||||
|
.two {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #808080;
|
||||||
|
margin-top: 12rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.rt {
|
||||||
|
margin-top: 24rpx;
|
||||||
|
padding-right: 12rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #3D3D3D;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list {
|
||||||
|
width: 680rpx;
|
||||||
|
max-height: 578rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||||
|
padding: 46rpx 36rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-top: 34rpx;
|
||||||
|
margin-bottom: 47rpx;
|
||||||
|
|
||||||
|
.list_val {
|
||||||
|
display: flex;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #3D3D3D;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 32rpx;
|
||||||
|
|
||||||
|
input {
|
||||||
|
width: 430rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
background: #F0F0F0;
|
||||||
|
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||||
|
padding-left: 32rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #808080;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
337
page_fenbao/yunwei/index.vue
Normal file
337
page_fenbao/yunwei/index.vue
Normal file
|
@ -0,0 +1,337 @@
|
||||||
|
<template>
|
||||||
|
<view class="page">
|
||||||
|
<u-navbar title="运维人员列表" :border-bottom="false" :background="bgc" title-color='#000' back-icon-color="#000" title-size='36' height='50'></u-navbar>
|
||||||
|
<view class="box">
|
||||||
|
<view class="list" v-for="(item,index) in wateringList" :key="index" @click="btnxq(index)">
|
||||||
|
<view class="top">
|
||||||
|
<view class="lt" style="display: flex;align-items: center;">
|
||||||
|
<view style="font-weight: 500;font-size: 24rpx;color: #3D3D3D;">{{item.userName == null ? '--' : item.userName}}-{{item.type == 3 ? '运维' : ''}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="rt" >
|
||||||
|
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;display: inline-block;background-color: #575B66;"></text>
|
||||||
|
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;display: inline-block;background-color: #575B66;"></text>
|
||||||
|
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;display: inline-block;background-color: #575B66;"></text>
|
||||||
|
</view>
|
||||||
|
<view class="bianji" style="display: none;" :id="tabindex == index ? 'active' : ''">
|
||||||
|
<view class="" @click="btnedit(item)">编辑</view>
|
||||||
|
<view class="" style="border: 0;color: #FF1C1C;" @click="btnshanchu(item)">删除</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="" style="width: 680rpx;height: 1px;background: #F0F0F0;margin-left: -30rpx;margin-top: 14rpx;"></view>
|
||||||
|
<view class="list_val">
|
||||||
|
<view class="list_shop">
|
||||||
|
<view class="" style="font-size: 24rpx;color: #808080;">运营区</view>
|
||||||
|
<view class="" style="font-weight: 600;font-size: 28rpx;color: #3D3D3D;margin-top:18rpx;">{{item.areaName == null ? '--' : item.areaName}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="list_shebei">
|
||||||
|
<view class="" style="font-size: 24rpx;color: #808080;">分成比例</view>
|
||||||
|
<view class="" style="font-weight: 600;font-size: 28rpx;color: #3D3D3D;margin-top:18rpx;">{{item.point == null ? '--' : item.point + '%'}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
联系电话:{{item.userPhone}}
|
||||||
|
</view>
|
||||||
|
<view class="" style="width: 680rpx;height: 1px;background: #F0F0F0;margin-left: -30rpx;margin-top: 14rpx;"></view>
|
||||||
|
<view class="" style="font-size: 24rpx;color: #3D3D3D;margin-top: 10rpx;width: 100%;display: flex;justify-content: space-between;">
|
||||||
|
<text>创建时间:{{item.createTime == null ? '--' : item.createTime}}</text> <text></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 100rpx;text-align: center;">
|
||||||
|
<view class="" style="font-size: 30rpx;color: #ccc;margin-top: 30rpx;">没有更多运维人员啦...</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="xinjian" @click="btnadd">
|
||||||
|
新建
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
bgc: {
|
||||||
|
backgroundColor: "#fff"
|
||||||
|
},
|
||||||
|
wateringList: [],
|
||||||
|
keyword:'',
|
||||||
|
tabindex:-1,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.tabindex = -1
|
||||||
|
this.getlist()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 点击删除合伙人
|
||||||
|
btnshanchu(item){
|
||||||
|
let that = this
|
||||||
|
uni.showModal({
|
||||||
|
title: '温馨提示',
|
||||||
|
content: '您确定要删除此运维吗?',
|
||||||
|
showCancel: true,
|
||||||
|
success: function(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
that.$u.delete(`/bst/areaJoin/${item.id}`).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
that.tabindex = -1
|
||||||
|
that.getlist()
|
||||||
|
uni.showToast({
|
||||||
|
title: '删除成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (res.cancel) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 点击跳转编辑合伙人
|
||||||
|
btnedit(item){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/page_fenbao/yunwei/addyunwei?item=' + JSON.stringify(item)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
btnxq(index){
|
||||||
|
if(this.tabindex == index){
|
||||||
|
this.tabindex = -1
|
||||||
|
}else{
|
||||||
|
this.tabindex = index
|
||||||
|
}
|
||||||
|
},
|
||||||
|
btnadd(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/page_fenbao/yunwei/addyunwei'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getlist() {
|
||||||
|
this.$u.get(`/bst/areaJoin/list?pageNum=1&pageSize=999&types=3`).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.wateringList = res.rows
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
#active{
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
/deep/ .u-title,
|
||||||
|
/deep/ .uicon-nav-back {
|
||||||
|
padding-bottom: 22rpx;
|
||||||
|
}
|
||||||
|
page {
|
||||||
|
background: #F4F5F7;
|
||||||
|
}
|
||||||
|
.serch{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 36rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
padding-bottom: 22rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
.lt{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 68rpx;
|
||||||
|
border: 2rpx solid #4C97E7;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
padding-left: 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.sousuo{
|
||||||
|
width: 140rpx;
|
||||||
|
height: 66rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 66rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
background: #4C97E7;
|
||||||
|
border: 2rpx solid #4C97E7;
|
||||||
|
border-radius: 0 20rpx 20rpx 0;
|
||||||
|
}
|
||||||
|
image{
|
||||||
|
width: 46rpx;
|
||||||
|
height: 46rpx;
|
||||||
|
}
|
||||||
|
input{
|
||||||
|
width: 460rpx;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
height: 68rpx;
|
||||||
|
line-height: 68rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.imgewmflag {
|
||||||
|
width: 750rpx;
|
||||||
|
height: 100vh;
|
||||||
|
background: #fff;
|
||||||
|
// opacity: .8;
|
||||||
|
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||||
|
z-index: 1;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.imgewm {
|
||||||
|
width: 700rpx;
|
||||||
|
height:700rpx;
|
||||||
|
margin: auto;
|
||||||
|
margin-top: 104rpx;
|
||||||
|
z-index: 2;
|
||||||
|
position: fixed;
|
||||||
|
top: 20%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
.xinjian{
|
||||||
|
width: 680rpx;
|
||||||
|
height: 90rpx;
|
||||||
|
background: #4C97E7;
|
||||||
|
border-radius: 49rpx 49rpx 49rpx 49rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 90rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
position: fixed;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
bottom: 56rpx;
|
||||||
|
}
|
||||||
|
.xinjians{
|
||||||
|
width: 680rpx;
|
||||||
|
height: 90rpx;
|
||||||
|
background: #4C97E7;
|
||||||
|
border-radius: 49rpx 49rpx 49rpx 49rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 90rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
position: fixed;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
bottom: 56rpx;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
.page {
|
||||||
|
width: 750rpx;
|
||||||
|
.box{
|
||||||
|
width: 750rpx;
|
||||||
|
height:100%;
|
||||||
|
background: #F4F5F7;
|
||||||
|
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||||
|
padding-bottom: 200rpx;
|
||||||
|
.list{
|
||||||
|
width: 680rpx;
|
||||||
|
max-height: 350rpx;
|
||||||
|
margin-top: 30rpx !important;
|
||||||
|
margin: auto;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.top{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
position: relative;
|
||||||
|
.bianji{
|
||||||
|
position: absolute;
|
||||||
|
top: 50rpx;
|
||||||
|
right: 0;
|
||||||
|
width: 194rpx;
|
||||||
|
height: 132rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0rpx 6rpx 16rpx 0rpx rgba(0,0,0,0.15);
|
||||||
|
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
||||||
|
text-align: center;
|
||||||
|
// display: none;
|
||||||
|
view{
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
height: 66rpx;
|
||||||
|
line-height: 66rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.list_val{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 32rpx 50rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.nav {
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
.top {
|
||||||
|
width: 750rpx;
|
||||||
|
height: 136rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
padding: 32rpx 36rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: fixed;
|
||||||
|
top: 200rpx;
|
||||||
|
/deep/ .u-content {
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 50rpx 0 0 50rpx !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .u-action {
|
||||||
|
border-radius: 0 50rpx 50rpx 0 !important;
|
||||||
|
width: 112rpx;
|
||||||
|
height: 65rpx;
|
||||||
|
line-height: 65rpx;
|
||||||
|
border: 2rpx solid #ccc;
|
||||||
|
margin-left: 0;
|
||||||
|
color: #3D3D3D;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.date {
|
||||||
|
padding-left: 80rpx;
|
||||||
|
padding-right: 80rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 750rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
margin-bottom: 36rpx;
|
||||||
|
|
||||||
|
text {
|
||||||
|
padding: 6rpx 18rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: #eee;
|
||||||
|
height: 46rpx;
|
||||||
|
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #808080;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -32,9 +32,9 @@
|
||||||
const qrSizePx = uni.upx2px(qrSizeRpx); // 将rpx转换为px
|
const qrSizePx = uni.upx2px(qrSizeRpx); // 将rpx转换为px
|
||||||
|
|
||||||
if (this.deptId == 100) {
|
if (this.deptId == 100) {
|
||||||
qr.data = 'https://wc.chuangtewl.com/xl/xd?s=' + this.sn;
|
qr.data = 'https://wx.ccttiot.com/x/d?s=' + this.sn;
|
||||||
} else if (this.deptId == 101) {
|
} else if (this.deptId == 101) {
|
||||||
qr.data = 'https://wc.chuangtewl.com/xl/xd?s=' + this.sn;
|
qr.data = 'https://wx.ccttiot.com/x/d?s=' + this.sn;
|
||||||
}
|
}
|
||||||
qr.size = qrSizePx; // 设置二维码大小为像素值
|
qr.size = qrSizePx; // 设置二维码大小为像素值
|
||||||
|
|
||||||
|
|
|
@ -113,6 +113,12 @@
|
||||||
加盟伙伴
|
加盟伙伴
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="cont" @click="btnywry">
|
||||||
|
<image src="https://api.ccttiot.com/smartmeter/img/static/umuP2xRE3AgzWymlxU10" mode=""></image>
|
||||||
|
<view class="text">
|
||||||
|
运维人员
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="cont" @click="btnkefu">
|
<view class="cont" @click="btnkefu">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u0FiBc30Xi6SzmrIqON2" mode=""></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/u0FiBc30Xi6SzmrIqON2" mode=""></image>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
|
@ -229,6 +235,12 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 点击跳转到运维人员
|
||||||
|
btnywry(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/page_fenbao/yunwei/index'
|
||||||
|
})
|
||||||
|
},
|
||||||
// 点击跳转到电子围栏
|
// 点击跳转到电子围栏
|
||||||
toMap(){
|
toMap(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
|
@ -86,8 +86,13 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
sub(){
|
sub(){
|
||||||
|
uni.showLoading({
|
||||||
|
title: '还车中...',
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
|
isHighAccuracy:true,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.lat = res.latitude
|
this.lat = res.latitude
|
||||||
|
@ -104,19 +109,27 @@
|
||||||
getfeiyong(){
|
getfeiyong(){
|
||||||
let data = {
|
let data = {
|
||||||
orderId:this.orderId,
|
orderId:this.orderId,
|
||||||
lon:this.lat,
|
lon:this.lon,
|
||||||
lat:this.lon
|
lat:this.lat
|
||||||
}
|
}
|
||||||
this.$u.post(`/app/order/calcFee`,data).then(res =>{
|
this.$u.post(`/app/order/calcFee`,data).then(res =>{
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
this.fajinobj = res.data
|
this.fajinobj = res.data
|
||||||
if(res.data.manageFee > 0 || res.data.dispatchFee > 0){
|
if(res.data.manageFee > 0 || res.data.dispatchFee > 0){
|
||||||
|
uni.hideLoading()
|
||||||
this.fjflag = true
|
this.fjflag = true
|
||||||
// this.gethc()
|
// this.gethc()
|
||||||
}else{
|
}else{
|
||||||
// this.fjflag = true
|
// this.fjflag = true
|
||||||
this.gethc()
|
this.gethc()
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
uni.hideLoading()
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -134,12 +147,14 @@
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
|
uni.hideLoading()
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url:'/pages/myorder/returned/index'
|
url:'/pages/myorder/returned/index'
|
||||||
})
|
})
|
||||||
},1500)
|
},1500)
|
||||||
}else{
|
}else{
|
||||||
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
14
pages.json
14
pages.json
|
@ -242,6 +242,20 @@
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
|
},{
|
||||||
|
"path": "yunwei/addyunwei",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path": "yunwei/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
},{
|
},{
|
||||||
"path": "renlian",
|
"path": "renlian",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
192
pages/my.vue
192
pages/my.vue
|
@ -150,7 +150,8 @@
|
||||||
adminflag:false,
|
adminflag:false,
|
||||||
user:{},
|
user:{},
|
||||||
kefulist:[],
|
kefulist:[],
|
||||||
lists:[]
|
lists:[],
|
||||||
|
logoflag:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
@ -224,15 +225,6 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/page_shanghu/guanli/admin_worke?id=${e[0].value}`
|
url: `/page_shanghu/guanli/admin_worke?id=${e[0].value}`
|
||||||
})
|
})
|
||||||
// if (this.totype == 2) {
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: `/page_shanghu/admin_index?id=${e.id}`
|
|
||||||
// })
|
|
||||||
// } else {
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: '/page_shanghu/fix_index'
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
// 请求运营区
|
// 请求运营区
|
||||||
getareaList() {
|
getareaList() {
|
||||||
|
@ -254,22 +246,7 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}else if(res.code == 401){
|
}else if(res.code == 401){
|
||||||
uni.showModal({
|
this.logoflag = true
|
||||||
title: '提示',
|
|
||||||
content: '您当前未登录,是否前去登录?',
|
|
||||||
showCancel: true,
|
|
||||||
success: function (res) {
|
|
||||||
if (res.confirm) {
|
|
||||||
uni.reLaunch({
|
|
||||||
url:'/pages/login/login'
|
|
||||||
})
|
|
||||||
} else if (res.cancel) {
|
|
||||||
uni.switchTab({
|
|
||||||
url:'/pages/index/index'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -287,87 +264,106 @@
|
||||||
},
|
},
|
||||||
// 点击事件进行操作
|
// 点击事件进行操作
|
||||||
btnpage(num){
|
btnpage(num){
|
||||||
if(num == 1){ //实名认证
|
if(this.logoflag == true){
|
||||||
uni.navigateTo({
|
|
||||||
url:'/page_user/shiming?user=' + JSON.stringify(this.user)
|
|
||||||
})
|
|
||||||
}else if(num == 2){ //我的订单
|
|
||||||
uni.navigateTo({
|
|
||||||
url:'/pages/myorder/index'
|
|
||||||
})
|
|
||||||
}else if(num == 3){ //用车指南
|
|
||||||
uni.navigateTo({
|
|
||||||
url:'/page_user/yongche/index?type=1'
|
|
||||||
})
|
|
||||||
}else if(num == 4){ //租车指南
|
|
||||||
uni.navigateTo({
|
|
||||||
url:'/page_user/yongche/index?type=0'
|
|
||||||
})
|
|
||||||
}else if(num == 5){ //故障上报
|
|
||||||
uni.navigateTo({
|
|
||||||
url:'/page_user/guzhang/index'
|
|
||||||
})
|
|
||||||
}else if(num == 6){ //故障上报记录
|
|
||||||
uni.navigateTo({
|
|
||||||
url:'/page_user/guzhang/guzhanglv'
|
|
||||||
})
|
|
||||||
}else if(num == 7){ //意见反馈
|
|
||||||
uni.navigateTo({
|
|
||||||
url:'/page_user/yijian'
|
|
||||||
})
|
|
||||||
}else if(num == 8){ //联系客服
|
|
||||||
this.kefuflag = true
|
|
||||||
}else if(num == 9){ //帮助中心
|
|
||||||
uni.navigateTo({
|
|
||||||
url:'/page_user/bangzhu'
|
|
||||||
})
|
|
||||||
}else if(num == 10){ //运维人员
|
|
||||||
this.totype = 1
|
|
||||||
if (this.list.length < 2) {
|
|
||||||
uni.setStorageSync('adminAreaid', this.list[0].value);
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/page_shanghu/fix_index'
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.show = true
|
|
||||||
}
|
|
||||||
}else if(num == 11){ //管理人员
|
|
||||||
this.totype = 2
|
|
||||||
if (this.list.length < 2) {
|
|
||||||
uni.setStorageSync('adminAreaid', this.list[0].value);
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/page_shanghu/guanli/admin_worke'
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.show = true
|
|
||||||
}
|
|
||||||
}else if(num == 12){
|
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '您确定要退出登录吗?',
|
content: '您当前未登录,是否前去登录?',
|
||||||
showCancel: true,
|
showCancel: true,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
try {
|
uni.reLaunch({
|
||||||
uni.clearStorageSync() // 同步清除
|
url:'/pages/login/login'
|
||||||
console.log('所有缓存已清除')
|
})
|
||||||
uni.showToast({ title: '缓存已清除', icon: 'success' })
|
|
||||||
uni.reLaunch({
|
|
||||||
url:'/pages/login/login'
|
|
||||||
})
|
|
||||||
} catch (e) {
|
|
||||||
console.error('清除失败:', e)
|
|
||||||
uni.showToast({ title: '清除失败', icon: 'none' })
|
|
||||||
}
|
|
||||||
} else if (res.cancel) {
|
} else if (res.cancel) {
|
||||||
console.log('取消'); // 用户点击取消
|
// uni.switchTab({
|
||||||
|
// url:'/pages/index/index'
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else if(num == 13){
|
}else{
|
||||||
uni.navigateTo({
|
if(num == 1){ //实名认证
|
||||||
url:'/page_user/luru/index'
|
uni.navigateTo({
|
||||||
})
|
url:'/page_user/shiming?user=' + JSON.stringify(this.user)
|
||||||
|
})
|
||||||
|
}else if(num == 2){ //我的订单
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/myorder/index'
|
||||||
|
})
|
||||||
|
}else if(num == 3){ //用车指南
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/page_user/yongche/index?type=1'
|
||||||
|
})
|
||||||
|
}else if(num == 4){ //租车指南
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/page_user/yongche/index?type=0'
|
||||||
|
})
|
||||||
|
}else if(num == 5){ //故障上报
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/page_user/guzhang/index'
|
||||||
|
})
|
||||||
|
}else if(num == 6){ //故障上报记录
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/page_user/guzhang/guzhanglv'
|
||||||
|
})
|
||||||
|
}else if(num == 7){ //意见反馈
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/page_user/yijian'
|
||||||
|
})
|
||||||
|
}else if(num == 8){ //联系客服
|
||||||
|
this.kefuflag = true
|
||||||
|
}else if(num == 9){ //帮助中心
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/page_user/bangzhu'
|
||||||
|
})
|
||||||
|
}else if(num == 10){ //运维人员
|
||||||
|
this.totype = 1
|
||||||
|
if (this.list.length < 2) {
|
||||||
|
uni.setStorageSync('adminAreaid', this.list[0].value);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/page_shanghu/fix_index'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.show = true
|
||||||
|
}
|
||||||
|
}else if(num == 11){ //管理人员
|
||||||
|
this.totype = 2
|
||||||
|
if (this.list.length < 2) {
|
||||||
|
uni.setStorageSync('adminAreaid', this.list[0].value);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/page_shanghu/guanli/admin_worke?id=${this.list[0].value}`
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.show = true
|
||||||
|
}
|
||||||
|
}else if(num == 12){
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '您确定要退出登录吗?',
|
||||||
|
showCancel: true,
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
try {
|
||||||
|
uni.clearStorageSync() // 同步清除
|
||||||
|
console.log('所有缓存已清除')
|
||||||
|
uni.showToast({ title: '缓存已清除', icon: 'success' })
|
||||||
|
uni.reLaunch({
|
||||||
|
url:'/pages/login/login'
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
console.error('清除失败:', e)
|
||||||
|
uni.showToast({ title: '清除失败', icon: 'none' })
|
||||||
|
}
|
||||||
|
} else if (res.cancel) {
|
||||||
|
console.log('取消'); // 用户点击取消
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else if(num == 13){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/page_user/luru/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -276,6 +276,7 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.covers = []
|
||||||
this.sockedata = ''
|
this.sockedata = ''
|
||||||
this.getMyLocation()
|
this.getMyLocation()
|
||||||
this.setMapScale()
|
this.setMapScale()
|
||||||
|
@ -362,7 +363,50 @@
|
||||||
console.log('解析后的JSON数据:', data);
|
console.log('解析后的JSON数据:', data);
|
||||||
// 这里可以处理具体的业务逻辑
|
// 这里可以处理具体的业务逻辑
|
||||||
this.sockedata = data
|
this.sockedata = data
|
||||||
this.getqingqiu()
|
// this.getqingqiu()
|
||||||
|
// this.$u.get(`/app/device/listNearBy?radius=10000¢er=${this.jingweidu}`).then((res) => {
|
||||||
|
// if (res.code == 200) {
|
||||||
|
this.covers = []
|
||||||
|
const newMarkers = []
|
||||||
|
this.parkingList.forEach(item => {
|
||||||
|
newMarkers.push({
|
||||||
|
id: parseFloat(item.id),
|
||||||
|
latitude: parseFloat(item.latitude),
|
||||||
|
longitude: parseFloat(item.longitude),
|
||||||
|
width: 40,
|
||||||
|
height: 60,
|
||||||
|
iconPath: item.type == 1 ?
|
||||||
|
'https://lxnapi.ccttiot.com/bike/img/static/up2xXqAgwCX5iER600k3' :
|
||||||
|
item.type == 2 ?
|
||||||
|
'https://lxnapi.ccttiot.com/bike/img/static/uDNY5Q4zOiZTCBTA2Jdq' :
|
||||||
|
'https://lxnapi.ccttiot.com/bike/img/static/u53BAQcFIX3vxsCzEZ7t',
|
||||||
|
callout: {
|
||||||
|
content: item.name,
|
||||||
|
color: '#ffffff',
|
||||||
|
fontSize: 14,
|
||||||
|
borderRadius: 10,
|
||||||
|
bgColor: item.type == 1 ? '#3A7EDB' : item.type == 2 ? '#FF473E' :
|
||||||
|
'#FFC107',
|
||||||
|
padding: 6,
|
||||||
|
display: 'ALWAYS'
|
||||||
|
},
|
||||||
|
isCalloutVisible: true // 添加标记
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.newMarkers = newMarkers
|
||||||
|
this.$set(this, 'covers', [...this.covers, ...newMarkers])
|
||||||
|
// this.$set(this, 'covers', [...this.covers, ...this.newMarkers])
|
||||||
|
if(this.sockedata.latitude){
|
||||||
|
this.covers.push({
|
||||||
|
latitude: this.sockedata.latitude,
|
||||||
|
longitude: this.sockedata.longitude,
|
||||||
|
width: 8,
|
||||||
|
height: 8,
|
||||||
|
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uow9Zq3edTUYCVHI9H60',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
// })
|
||||||
this.covers.push({
|
this.covers.push({
|
||||||
latitude: data.latitude,
|
latitude: data.latitude,
|
||||||
longitude: data.longitude,
|
longitude: data.longitude,
|
||||||
|
@ -956,9 +1000,9 @@
|
||||||
}))
|
}))
|
||||||
return {
|
return {
|
||||||
points: points,
|
points: points,
|
||||||
fillColor: "#3A7EDB40", //填充颜色
|
fillColor: "#88888850", //填充颜色
|
||||||
strokeColor: "#3A7EDB", //描边颜色
|
strokeColor: "#88888850", //描边颜色
|
||||||
strokeWidth: 2, //描边宽度
|
strokeWidth: 1, //描边宽度
|
||||||
zIndex: 1, //层级
|
zIndex: 1, //层级
|
||||||
}
|
}
|
||||||
}).filter(polyline => polyline !== null)
|
}).filter(polyline => polyline !== null)
|
||||||
|
@ -1035,8 +1079,8 @@
|
||||||
id: parseFloat(item.id),
|
id: parseFloat(item.id),
|
||||||
latitude: parseFloat(item.latitude),
|
latitude: parseFloat(item.latitude),
|
||||||
longitude: parseFloat(item.longitude),
|
longitude: parseFloat(item.longitude),
|
||||||
width: 20,
|
width: 40,
|
||||||
height: 28.95,
|
height: 60,
|
||||||
iconPath: item.type == 1 ?
|
iconPath: item.type == 1 ?
|
||||||
'https://lxnapi.ccttiot.com/bike/img/static/up2xXqAgwCX5iER600k3' :
|
'https://lxnapi.ccttiot.com/bike/img/static/up2xXqAgwCX5iER600k3' :
|
||||||
item.type == 2 ?
|
item.type == 2 ?
|
||||||
|
|
Loading…
Reference in New Issue
Block a user