zhangqun 11 months ago
commit 71027731ef
  1. 1
      pages/index/index.vue
  2. 180
      pages/map/index.vue

@ -117,6 +117,7 @@
},
onShow(e) {
this.getData()
this.isMore = true
this.list = []
this.page = 1
this.getList()

@ -2,15 +2,8 @@
<view class="map" :style="getHeight()">
<!-- <page-head title="待排查任务" :warnNum='1' :isFixed="true" :isRight="true"></page-head> -->
<!-- 轮播图 -->
<map
id="maps"
style="width: 100%; height: 100%"
:latitude="latitude"
:longitude="longitude"
:markers="covers"
:polyline="polyline"
@mousedown="onMapTap"
>
<map id="maps" style="width: 100%; height: 100%" :latitude="latitude" :longitude="longitude" :markers="covers"
:polyline="polyline" @mousedown="onMapTap">
</map>
<cover-view class="location" @click="getLocationInfo" :style="getTop()">
<cover-image src="../../static/map/3746.png" alt="" srcset="" />
@ -20,12 +13,7 @@
<view class="status" v-if="pageType1Result.deadlineType == 2">延期</view>
<!-- <view class="status" v-if="pageType1Result.deadlineType == 3">正常</view> -->
<view class="top">
<image
src="/static/logo.png"
mode=""
style="width: 120px; height: 90px"
class="mimg"
></image>
<image src="/static/logo.png" mode="" style="width: 120px; height: 90px" class="mimg"></image>
<view class="font">
<view class="tit">{{ pageType1Result.name }}</view>
<view class="desc">
@ -54,26 +42,14 @@
<view class="search">
<view class="searchL">
<image src="/static/map/search.png" alt="" />
<input
v-model="search"
class="sinput"
placeholder-style="color: #BFBFBF;"
placeholder="搜索路段或路口"
type="text"
confirm-type="search"
@confirm="confirm"
/>
<input v-model="search" class="sinput" placeholder-style="color: #BFBFBF;" placeholder="搜索路段或路口" type="text"
confirm-type="search" @confirm="confirm" />
</view>
<view @click="onJump(4)" class="addbtn"> 新增 </view>
</view>
<scroll-view :scroll-top="0" scroll-y="true" class="list-box">
<view
class="list-item"
v-for="(item, index) in data"
:key="index"
@click="onList(item, index)"
:style="idx == index ? 'background: #E5EFFF' : ''"
>
<view class="list-item" v-for="(item, index) in data" :key="index" @click="onList(item, index)"
:style="idx == index ? 'background: #E5EFFF' : ''">
<image src="/static/map/d2.png" alt="" v-if="idx == index" />
<image src="/static/map/d1.png" alt="" v-else />
<view class="tit">
@ -88,66 +64,35 @@
<view class="form-item">
<view class="form-label">对象</view>
<view class="form-sw">
<view
:style="ftype == 1 ? 'background: #2663bf; color: #fff;' : ''"
@click="ftype = '1'"
>路段</view
>
<view
:style="ftype == 2 ? 'background: #2663bf; color: #fff;' : ''"
@click="ftype = '2'"
>路口</view
>
<view :style="ftype == 1 ? 'background: #2663bf; color: #fff;' : ''" @click="ftype = '1'">路段</view>
<view :style="ftype == 2 ? 'background: #2663bf; color: #fff;' : ''" @click="ftype = '2'">路口</view>
</view>
</view>
<view class="form-item">
<view class="form-label">道路名称</view>
<view class="form-tent">
<input
class="linput"
v-model="name1"
placeholder-style="color: #BFBFBF;"
placeholder="请输入"
/>
<input class="linput" v-model="name1" placeholder-style="color: #BFBFBF;" placeholder="请输入" />
</view>
</view>
<view class="form-item" v-if="ftype == 1">
<view class="form-label">起始路口</view>
<view class="form-tent">
<input
class="linput"
v-model="name2"
placeholder-style="color: #BFBFBF;"
placeholder="请输入"
/>
<input class="linput" v-model="name2" placeholder-style="color: #BFBFBF;" placeholder="请输入" />
</view>
</view>
<view class="form-item" v-if="ftype == 1">
<view class="form-label">终止路口</view>
<view class="form-tent">
<input
class="linput"
v-model="name3"
placeholder-style="color: #BFBFBF;"
placeholder="请输入"
/>
<input class="linput" v-model="name3" placeholder-style="color: #BFBFBF;" placeholder="请输入" />
</view>
</view>
<view class="form-item" v-if="ftype == 2">
<view class="form-label">路口名称</view>
<view class="form-tent">
<input
class="linput"
v-model="name4"
placeholder-style="color: #BFBFBF;"
placeholder="请输入"
/>
<input class="linput" v-model="name4" placeholder-style="color: #BFBFBF;" placeholder="请输入" />
</view>
</view>
<view
class="btn-box"
:style="ftype == 1 ? 'margin-top: 18px' : 'margin-top: 80px'"
>
<view class="btn-box" :style="ftype == 1 ? 'margin-top: 18px' : 'margin-top: 80px'">
<view @click="onJump(3)" class="btn btn6"> 取消 </view>
<view @click="handleSubmit" class="btn btn7"> 确定 </view>
</view>
@ -246,6 +191,7 @@ export default {
this.pageType = 1;
this.initData();
this.getSystemInfo()
},
onShow() {
if (this.pcType == 2) {
@ -327,6 +273,54 @@ export default {
};
},
methods: {
getSystemInfo() {
// #ifdef APP-PLUS
// App
//
uni.getSystemInfo({
success: function (res) {
// App
// if (res.platform === 'android' || res.platform === 'ios') {
// App
uni.getLocation({
success: function (locationRes) {
console.log('已获取定位信息', locationRes);
//
},
fail: function (error) {
console.error('获取定位信息失败', error);
if (error.errMsg.indexOf('auth deny') !== -1) {
//
uni.showModal({
title: '提示',
content: '请授权使用您的定位服务',
confirmText: '去授权',
success: function (modalRes) {
if (modalRes.confirm) {
uni.openSetting({
success: (settingRes) => {
console.log('openSetting success', settingRes.authSetting);
//
},
fail: (settingError) => {
console.log('openSetting fail', settingError);
//
}
});
}
}
});
}
}
});
// } else {
// console.log(' App ');
// // App
// }
}
});
// #endif
},
initData() {
this.$request
.globalRequest(
@ -676,6 +670,7 @@ export default {
width: 100%;
height: 64vh;
position: relative;
.location {
position: absolute;
width: 48px;
@ -688,6 +683,7 @@ export default {
background: #fff;
border-radius: 16px;
z-index: 99998;
cover-image {
width: 32px;
height: 32px;
@ -703,6 +699,7 @@ export default {
border-radius: 4px;
box-sizing: border-box;
z-index: 99999;
.status {
position: absolute;
top: 0px;
@ -714,6 +711,7 @@ export default {
background: #cc2936;
color: #fff;
text-align: center;
&::after {
content: "";
position: absolute;
@ -726,16 +724,20 @@ export default {
border-top: 26px solid #cc2936;
}
}
.font {
width: 65%;
}
.mimg {
width: 120px;
height: 90px;
}
.top {
padding: 14px;
display: flex;
.tit {
width: 92%;
height: 100rpx;
@ -749,17 +751,20 @@ export default {
font-weight: bold;
margin: 8px 14px 8px 14px;
}
.desc {
color: #666666;
display: flex;
margin-left: 14px;
}
}
.btn-box {
display: flex;
justify-content: space-between;
padding: 14px;
border-top: 1px solid #d3e0f2;
.btn {
color: white;
cursor: pointer;
@ -769,18 +774,21 @@ export default {
text-align: center;
font-size: 18px;
}
.btn1 {
width: 50%;
background: url(../../static/map/elright.png);
background-size: 100% 100%;
background-repeat: no-repeat;
}
.btn2 {
width: 50%;
background: url(../../static/map/elleft.png);
background-size: 100% 100%;
background-repeat: no-repeat;
}
.btn3 {
width: 33%;
background: url(../../static/map/l.png);
@ -788,18 +796,21 @@ export default {
background-repeat: no-repeat;
color: #363f4d;
}
.btn4 {
width: 33%;
background: url(../../static/map/c.png);
background-size: 100% 100%;
background-repeat: no-repeat;
}
.btn5 {
width: 33%;
background: url(../../static/map/r.png);
background-size: 100% 100%;
background-repeat: no-repeat;
}
.btn6 {
width: 33%;
background: url(../../static/map/ll.png);
@ -808,12 +819,14 @@ export default {
color: #363f4d;
}
.btn7 {
width: 67%;
background: url(../../static/map/rr.png);
background-size: 100% 100%;
background-repeat: no-repeat;
}
.btn8 {
width: 100%;
/* background: url(../../static/map/rr.png);
@ -824,11 +837,14 @@ export default {
}
}
}
.dialog-one {
height: 410rpx;
}
.dialog-two {
height: 410rpx;
.two-f1 {
text-align: center;
margin: 56rpx 0;
@ -836,6 +852,7 @@ export default {
font-size: 28rpx;
color: #777777;
}
.two-f2 {
text-align: center;
height: 96rpx;
@ -845,6 +862,7 @@ export default {
color: #333333;
}
}
.dialog-three {
width: 100%;
height: 340px;
@ -853,26 +871,31 @@ export default {
box-sizing: border-box;
box-shadow: 0px -4px 10px 1px rgba(0, 0, 0, 0.16);
border-radius: 4px 4px 0px 0px;
.search {
margin: 23px 0;
height: 48px;
display: flex;
justify-content: space-between;
.searchL {
width: 74%;
height: 100%;
border: 1px solid #d9d9d9;
display: flex;
image {
width: 24px;
height: 24px;
margin: 12px;
}
input {
width: 80%;
height: 100%;
}
}
.addbtn {
width: 23%;
height: 100%;
@ -883,26 +906,31 @@ export default {
justify-content: center;
}
}
.list-box {
width: 100%;
height: 244px;
// overflow: auto;
.list-item {
width: 100%;
height: 50px;
line-height: 50px;
display: flex;
image {
width: 22px;
height: 24px;
margin: 12px;
}
.tit {
width: 62%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.jl {
width: 30%;
text-align: right;
@ -913,6 +941,7 @@ export default {
}
}
}
.dialog-four {
width: 100%;
height: 372px;
@ -921,12 +950,14 @@ export default {
box-sizing: border-box;
box-shadow: 0px -4px 10px 1px rgba(0, 0, 0, 0.16);
border-radius: 4px 4px 0px 0px;
.form-item {
width: 100%;
height: 45px;
line-height: 45px;
margin-top: 24px;
display: flex;
.form-label {
width: 24%;
font-size: 16px;
@ -934,8 +965,10 @@ export default {
text-align: right;
margin-right: 10px;
}
.form-sw {
display: flex;
view {
width: 60px;
height: 100%;
@ -947,12 +980,14 @@ export default {
text-align: center;
}
}
.form-tent {
width: 76%;
height: 100%;
border-radius: 4px 4px 4px 4px;
border: 1px solid #d9d9d9;
padding-left: 12px;
input {
width: 100%;
height: 100%;
@ -963,6 +998,7 @@ export default {
}
}
}
.umodal {
position: absolute;
width: 100%;
@ -971,6 +1007,7 @@ export default {
left: 0;
z-index: 99999;
background: rgba(0, 0, 0, 0.16);
.umodal-box {
width: 90%;
height: 240rpx;
@ -979,6 +1016,7 @@ export default {
border-radius: 12rpx;
top: 600rpx;
left: 5%;
.umodal-content {
width: 100%;
height: 140rpx;
@ -988,21 +1026,25 @@ export default {
line-height: 140rpx;
padding-left: 12px;
}
.umodal-line1 {
width: 100%;
height: 1px;
background: #eaebec;
}
.umodal-line2 {
width: 1px;
height: 100%;
background: #eaebec;
}
.umodal-btnbox {
display: flex;
width: 100%;
height: 100rpx;
justify-content: center;
.umodal-btn {
width: 50%;
height: 100%;

Loading…
Cancel
Save