This commit is contained in:
nyoung 2024-08-21 23:39:21 +08:00
parent e834dc9f55
commit de76d7ae99
13 changed files with 131 additions and 108 deletions

View File

@ -5,7 +5,7 @@
<view style="width: 10px; height: 100%;" @click="getback()">
<uni-icons type="left" size="18"></uni-icons>
</view>
<view class="c-title">运力</view>
<view class="c-title">运力中心</view>
<view style="width: 10px; height: 100%;"></view>
</view>
<!-- #endif -->
@ -14,7 +14,7 @@
<view style="width: 10px; " @click="getback()">
<uni-icons type="left" size="18"></uni-icons>
</view>
<view class="c-title">运力</view>
<view class="c-title">运力中心</view>
<view style="width: 10px; height: 100%;"></view>
</view>
<!-- #endif -->
@ -52,84 +52,41 @@
:markers="marker" :scale="scale" @markertap="markertap" @callouttap='callouttap' @tap="tap">
</map>
</view> -->
<view class="mubu">
<view class="zzhui">
<view class="sousuo">
<image style="width: 18px;height: 18px;margin-right: 5px" src="../../static/move/Search@2x.png"></image>
<input type="text" placeholder="请输入师傅姓名/车牌号查询" v-model="searchValue" @blur="getmove()">
</view>
<view class="c-box" v-for="(item,index) in arrlist" :key="index" v-if="item.driverStatus == 1" >
<view class="box-title"><text>空闲</text> · {{item.realName || ''}} | {{item.rescueCarNum|| ''}}</view>
<view class="box-zi">
<uni-icons type="location" color="#ffffff" size="18"></uni-icons>
<text style="margin-left: 10px;">{{item.driverPositionInfo || ''}}</text>
</view>
<view class="box-bs">
<view class="gwu" style="border-right: 1px solid white;" @click="dwindex(index)">
<uni-icons type="circle-filled" color="#ffffff" size="18"></uni-icons>
<text style="margin-left: 15px;">定位</text>
</view>
<view class="gwu" @click="gettel(item.phonenumber)">
<uni-icons type="phone-filled" color="#ffffff" size="18"></uni-icons>
<text style="margin-left: 15px;">拨打电话</text>
</view>
</view>
</view>
<view class="c-box1" v-for="(item,index) in arrlist" :key="index" v-if="item.driverStatus == 2" >
<view class="box-title"><text>暂停</text> · {{item.realName || ''}} | {{item.rescueCarNum|| ''}}</view>
<view class="box-zi">
<uni-icons type="location" color="#ffffff" size="18"></uni-icons>
<text style="margin-left: 10px;">{{item.driverPositionInfo || ''}}</text>
</view>
<view class="box-bs">
<view class="gwu" style="border-right: 1px solid white;"@click="dwindex(index)">
<uni-icons type="circle-filled" color="#ffffff" size="18"></uni-icons>
<text style="margin-left: 15px;">定位</text>
</view>
<view class="gwu" @click="gettel(item.phonenumber)">
<uni-icons type="phone-filled" color="#ffffff" size="18"></uni-icons>
<text style="margin-left: 15px;">拨打电话</text>
</view>
</view>
</view>
<view class="c-box2" v-for="(item,index) in arrlist" :key="index" v-if="item.driverStatus == 3" >
<view class="box-title"><text>忙碌</text> · {{item.realName || ''}} | {{item.rescueCarNum|| ''}}</view>
<view class="box-zi">
<uni-icons type="location" color="#ffffff" size="18"></uni-icons>
<text style="margin-left: 10px;">{{item.driverPositionInfo || ''}}</text>
</view>
<view class="box-bs">
<view class="gwu" style="border-right: 1px solid white;" @click="dwindex(index)">
<uni-icons type="circle-filled" color="#ffffff" size="18"></uni-icons>
<text style="margin-left: 15px;">定位</text>
</view>
<view class="gwu" @click="gettel(item.phonenumber)">
<uni-icons type="phone-filled" color="#ffffff" size="18"></uni-icons>
<text style="margin-left: 15px;">拨打电话</text>
</view>
</view>
</view>
<view class="c-box3" v-for="(item,index) in arrlist" :key="index" v-if="item.driverStatus == 4" >
<view class="box-title"><text>离线</text> · {{item.realName || ''}} | {{item.rescueCarNum|| ''}}</view>
<view class="box-zi">
<uni-icons type="location" color="#ffffff" size="18"></uni-icons>
<text style="margin-left: 10px;">{{item.driverPositionInfo || ''}}</text>
</view>
<view class="box-bs">
<view class="gwu" style="border-right: 1px solid white;" @click="dwindex(index)">
<uni-icons type="circle-filled" color="#ffffff" size="18"></uni-icons>
<text style="margin-left: 15px;">定位</text>
</view>
<view class="gwu" @click="gettel(item.phonenumber)">
<uni-icons type="phone-filled" color="#ffffff" size="18"></uni-icons>
<text style="margin-left: 15px;">拨打电话</text>
</view>
</view>
</view>
<view class="list">
<view class="c-box" v-for="(item,index) in arrlist" :key="index">
<view class="inline" style="padding: 15px 15px 0 15px;">
<view v-if="item.driverStatus == 1" class="item-state state-blue">空闲</view>
<view v-if="item.driverStatus == 2" class="item-state state-orange">暂停</view>
<view v-if="item.driverStatus == 3" class="item-state state-red">忙碌</view>
<view v-if="item.driverStatus == 4" class="item-state state-grey">离线</view>
<view class="inline-item"> {{item.realName || ''}} | {{item.rescueCarNum|| ''}}</view>
</view>
<view class="inline box-zi" style="padding: 15px 15px 0 15px;align-items: flex-start;">
<u-icon name="../../static/move/Sent@2x.png" color="#ffffff" size="28"></u-icon>
<text style="margin-left: 10px;font-size: 16px">{{item.driverPositionInfo || ''}}</text>
</view>
<view class="box-bs">
<view style="border-radius: 0 0 0 10px" class="gwu inline" @click="dwindex(index)">
<u-icon name="../../static/move/dingwei.png" color="#ffffff" size="28"></u-icon>
<text style="margin-left: 5px;font-size: 18px;color: #71a2ff">定位</text>
</view>
<view style="border-radius: 0 0 10px 0" class="gwu inline" @click="gettel(item.phonenumber)">
<u-icon name="../../static/move/编组 7@2x.png" color="#ffffff" size="28"></u-icon>
<text style="margin-left: 5px;font-size: 18px;color: #71a2ff">拨打电话</text>
</view>
</view>
</view>
</view>
</view>
</view>
<tabBar :msg="msg"></tabBar>
@ -148,7 +105,36 @@
id:0,
page: 1,
num: 8,
arrlist: [],
arrlist: [
{
driverStatus: 1,
realName: '孙强',
rescueCarNum: '鲁A8L2P8',
driverPositionInfo: '山东省济南市山东省济南市山东省济南市山东省济南市',
phonenumber: '13589497326'
},
{
driverStatus: 2,
realName: '孙强',
rescueCarNum: '鲁A8L2P8',
driverPositionInfo: '山东省济南市山东省济南市山东省济南市山东省济南市',
phonenumber: '13589497326'
},
{
driverStatus: 3,
realName: '孙强',
rescueCarNum: '鲁A8L2P8',
driverPositionInfo: '山东省济南市山东省济南市山东省济南市山东省济南市',
phonenumber: '13589497326'
},
{
driverStatus: 4,
realName: '孙强',
rescueCarNum: '鲁A8L2P8',
driverPositionInfo: '山东省济南市山东省济南市山东省济南市山东省济南市',
phonenumber: '13589497326'
}
],
searchValue:'',
arr: [],
latitude: 36.858810, //
@ -166,12 +152,12 @@
}
},
onLoad(option) {
this.getmove()
this.getPosition()
this.getsige()
},
mounted() {
},
@ -181,7 +167,7 @@
components:{
tabBar,
},
methods: {
dwindex(index){
console.log(index);
@ -198,22 +184,22 @@
this.latitude = res.latitude
}
});
},
getsige(){
request({
url: '/app/rescueInfo/driverInMap2',
method: 'get',
method: 'get',
}).then((res)=>{
console.log(res);
this.yi = res.data.kxNum
this.er = res.data.ztNum
this.san = res.data.mlNum
this.si = res.data.lxNum
})
},
destroyTimer() {
clearInterval(this.timerId);
this.timerId = null;
@ -226,7 +212,7 @@
getback(){
this.destroyTimer();
uni.navigateBack()
},
zhankai() {
this.num = 999
@ -236,7 +222,7 @@
getmove(){
request({
url: '/app/rescueInfo/driverInMap?searchValue='+ this.searchValue,
method: 'get',
method: 'get',
}).then((res)=>{
console.log('返回信息',res);
this.arrlist = res.data
@ -270,7 +256,7 @@
getmapdetails(){
request({
url: '/app/rescueInfo/rescueInfoDetail?rescueId='+this.id,
method: 'get',
method: 'get',
}).then((res)=>{
console.log('返回信息',res);
this.detailsinfo = res.data
@ -295,7 +281,7 @@
console.log(obj);
obj.callout = callout
arrcopy.push(obj)
let driverPosition = {}
driverPosition.id = res.data.driverInfo.id
driverPosition.latitude = res.data.driverInfo.driverLatitude
@ -307,7 +293,7 @@
driverPosition.alpha = 1
driverPosition.callout = callout
arrcopy.push(driverPosition)
this.marker = arrcopy;
console.log(this.marker)
})
@ -331,10 +317,10 @@
})
let arrlist = res.data
this.arrlist = arrlist
},
godetails(id) {
uni.navigateTo({
url: "/pages/map/mapDetails?id=" + id
@ -357,9 +343,44 @@
</script>
<style scoped lang="scss">
.list{
height: calc(100% - 70px);
overflow-y: auto;
min-height: calc(100% - 70px);
}
.inline{
display: flex;
align-items: center;
}
.inline-item{
font-size: 18px;
font-weight: bold;
margin-left: 10px;
}
.item-state{
color: white;
width: 55px;
height: 28px;
border-radius: 15px 0 15px 0;
text-align: center;
line-height: 28px;
}
.state-red{
background: #fe5c46;
}
.state-blue{
background: #317dfa;
}
.state-grey{
background: #8e8e8e;
}
.state-orange{
background: #d37c33;
}
.container {
box-sizing: border-box;
padding-bottom: 40rpx;
background: #f7faf4;
}
.c-top{
width: 100%;
@ -386,29 +407,27 @@
width: 95%;
height: 40px;
margin: 10px auto;
display: flex;align-items: center;
display: flex;align-items: center;
box-sizing: border-box;
padding-left: 15px;
background: #F6F6F6;
border-radius: 50px;
background: #f0ede6;
border-radius: 10px;
input{
width: 100%;
}
}
.c-title{
font-size: 18px;
font-weight: bold
}
.c-box {
background: linear-gradient(91deg, #78CB54 0%, rgba(120,203,84,0.4) 100%);
width: 95%;
margin: 10px auto;
box-sizing: border-box;
border-radius: 10px;
padding: 15px;
color: white;
color: #151515;
background: white;
box-shadow: 0 0 8px -5px #888888;
}
.c-box1 {
background: linear-gradient(91deg, #FFAD3F 0%, rgba(255,173,63,0.4) 100%);
@ -418,7 +437,7 @@
border-radius: 10px;
padding: 15px;
color: white;
}
.c-box2 {
background: linear-gradient(91deg, #FF3046 0%, #FFCACA 100%);
@ -428,7 +447,7 @@
border-radius: 10px;
padding: 15px;
color: white;
}
.c-box3 {
background: linear-gradient(91deg, #909090 0%, rgba(144,144,144,0.4) 100%);
@ -438,7 +457,7 @@
border-radius: 10px;
padding: 15px;
color: white;
}
.cont-bs{
width: 95%;
@ -479,7 +498,7 @@
padding: 5px 10px;
color: white;
background: #2D81FF;
border-radius: 10px;
}
.dix{
@ -495,7 +514,7 @@ border-radius: 10px;
color: #333333;
margin: 10px auto;
}
.box-top {
width: 100%;
display: flex;
@ -542,11 +561,11 @@ border-radius: 10px;
}
.box-bs{
width: 100%;
height: 60px;
display: flex;
align-items: center;
justify-content: space-between;
margin: 0px auto;
margin-top: 10px;
margin: 0;
}
.touxiang{
width: 50px;
@ -708,8 +727,12 @@ border-radius: 10px;
}
.gwu{
width: 50%;
height: 60px;
text-align: center;
}
background: #f3f3f3;
justify-content: center;
border: #dfe2eb 1px solid;
}
.box-zi{
margin: 10px auto;
}
@ -725,4 +748,4 @@ border-radius: 10px;
.se4{
background: linear-gradient(91deg, #909090 0%, rgba(144,144,144,0.4) 100%) !important;
}
</style>
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

BIN
static/move/Search@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 B

BIN
static/move/Sent@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/move/Text Box@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/move/dingwei.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
static/move/个人@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

BIN
static/move/矩形@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B

BIN
static/move/编组 7@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB