Browse Source

添加巡园页面

master
邓宏 11 months ago
parent
commit
4584d3fd62
  1. 1
      pages.js
  2. 2
      pages/home/index.vue
  3. 33
      pages/patrolGarden/abnoReport.vue
  4. 75
      pages/patrolGarden/app.vue
  5. 166
      pages/patrolGarden/detail.vue
  6. 120
      pages/patrolGarden/info.vue
  7. 131
      pages/patrolGarden/record.vue
  8. 55
      router/patrolGarden.js
  9. 1
      static/patrolGarden/inventory.svg
  10. BIN
      static/patrolGarden/point.png
  11. 1
      static/patrolGarden/procure.svg
  12. 1
      static/patrolGarden/tour.svg
  13. 14
      uni.scss
  14. 59
      uni_modules/d-form/components/d-form/d-form.vue

1
pages.js

@ -9,6 +9,7 @@ module.exports = hot((pagesJson)=>{
...require("./router/massif.js"),
...require('./router/purchase.js'),
...require('./router/stock.js'),
...require('./router/patrolGarden.js'),
],
tabBar:{
color:"#999",

2
pages/home/index.vue

@ -286,6 +286,8 @@
</view>
</view>
<view @click="$u.route({url:'/pages/patrolGarden/record'})">巡园记录</view>
<view style="display:flex;">
<view class="card mana">
<view class="title">

33
pages/patrolGarden/abnoReport.vue

@ -0,0 +1,33 @@
<style scoped>
.container{
min-height: 100%;
background:#f6f6f6;
padding:30rpx;
}
</style>
<template>
<view class="container">
<u-form class="card inline" errorType="toast" :model="formData" ref="form" labelWidth="auto">
<d-form label="当前位置" type="map" @position="formData.lat=$event.latitude;formData.lng=$event.longitude"/>
<d-form label="凭证" required field="pic" :value="formData.pic" type="upImg"/>
<d-form label="描述" type="textarea" v-model="formData.dec"/>
<d-form label="是否处理" type="radio" :columns="[{label:'是',value:1},{label:'否',value:0}]"/>
</u-form>
<button class="cu-btn round bg-green shadow submit" @click="sumbit">保存</button>
</view>
</template>
<script>
export default {
data(){
return{
formData:{
pic:[],
dec:"",
},
}
},
methods:{
sumbit(){},
}
}
</script>

75
pages/patrolGarden/app.vue

@ -0,0 +1,75 @@
<style lang="less" scoped>
.container{
min-height: 100%;
background:#f6f6f6;
padding-top:30rpx;
.card{
margin-top:0;
._title{
color:#10C176;
font-size:32rpx;
display: flex;
align-items: center;
&:before{
content:"";
height:32rpx;
width:8rpx;
border-radius: 10rpx;
background:#10C176;
margin-right:15rpx;
}
}
.content{
margin-top:25rpx;
display: flex;
flex-wrap: wrap;
margin-right:-70rpx;
min-height: 700rpx;
&>view{
display: flex;
flex-direction: column;
align-items: center;
margin-right:70rpx;
image{
width:72rpx;
height:72rpx;
margin-bottom:6rpx;
}
.name{
font-size:20rpx;
}
}
}
}
}
</style>
<template>
<view class="container">
<view class="card">
<view class="_title">所有应用</view>
<view class="content">
<view>
<image src="/static/patrolGarden/inventory.svg"/>
<text class="name">库存</text>
</view>
<view>
<image src="/static/patrolGarden/procure.svg"/>
<text class="name">采购</text>
</view>
<view>
<image src="/static/patrolGarden/tour.svg"/>
<text class="name">巡园</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data(){
return{
}
}
}
</script>

166
pages/patrolGarden/detail.vue

@ -0,0 +1,166 @@
<style lang="less" scoped>
.container{
min-height: 100%;
background:#f6f6f6;
padding-top:30rpx;
.card{
margin-top:0;
position:relative;
&:before{
position:absolute;
height:34rpx;
line-height: 34rpx;
width:133rpx;
text-align: center;
color:#fff;
top:0;
right:0;
}
&.handle:before{
content:"已处理";
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='66.965' height='17.019' viewBox='0 0 66.965 17.019'%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill:%2310c176;%7D%3C/style%3E%3C/defs%3E%3Cg transform='translate(-215 -495.575)'%3E%3Cpath class='a' d='M218.295,495.627s-.028,3.42,0,3.45c.036-.036,6.616,0,6.616,0s.032,3.089,0,3.059h-2.17s-.015,3.341,0,3.379c-.036-.036,3.344,0,3.344,0s-.021.044,0,3.628h-3.344s-.072,3.442,0,3.365c.071.036,59.224.085,59.224.085v-8.346a9.109,9.109,0,0,0-8.4-8.62C273.261,495.511,218.295,495.627,218.295,495.627Z'/%3E%3Ccircle class='a' cx='1.5' cy='1.5' r='1.5' transform='translate(217 502.1)'/%3E%3Cellipse class='a' cx='1.5' cy='1.725' rx='1.5' ry='1.725' transform='translate(217 495.62)'/%3E%3Cellipse class='a' cx='1.5' cy='1.7' rx='1.5' ry='1.7' transform='translate(221 509.12)'/%3E%3Cellipse class='a' cx='1.5' cy='1.705' rx='1.5' ry='1.705' transform='translate(221.4 502.1)'/%3E%3Crect class='a' width='5' height='3' rx='1.5' transform='translate(215 509)'/%3E%3C/g%3E%3C/svg%3E");
}
&.unhandle:before{
content:"未处理";
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='66.965' height='17.019' viewBox='0 0 66.965 17.019'%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill:%23cd0916;%7D%3C/style%3E%3C/defs%3E%3Cg transform='translate(-215 -495.575)'%3E%3Cpath class='a' d='M218.295,495.627s-.028,3.42,0,3.45c.036-.036,6.616,0,6.616,0s.032,3.089,0,3.059h-2.17s-.015,3.341,0,3.379c-.036-.036,3.344,0,3.344,0s-.021.044,0,3.628h-3.344s-.072,3.442,0,3.365c.071.036,59.224.085,59.224.085v-8.346a9.109,9.109,0,0,0-8.4-8.62C273.261,495.511,218.295,495.627,218.295,495.627Z'/%3E%3Ccircle class='a' cx='1.5' cy='1.5' r='1.5' transform='translate(217 502.1)'/%3E%3Cellipse class='a' cx='1.5' cy='1.725' rx='1.5' ry='1.725' transform='translate(217 495.62)'/%3E%3Cellipse class='a' cx='1.5' cy='1.7' rx='1.5' ry='1.7' transform='translate(221 509.12)'/%3E%3Cellipse class='a' cx='1.5' cy='1.705' rx='1.5' ry='1.705' transform='translate(221.4 502.1)'/%3E%3Crect class='a' width='5' height='3' rx='1.5' transform='translate(215 509)'/%3E%3C/g%3E%3C/svg%3E");
}
.item{
&+.item{
border-top:2rpx solid rgba(216, 216, 216, 0.2);
}
text-indent:0;
padding:10rpx 0;
display: flex;
justify-content: space-between;
.label{
flex-shrink: 0;
margin-right:20rpx;
color:#777;
}
&.block{
flex-direction: column;
.label{
margin-bottom:20rpx;
}
.imgs{
display: flex;
flex-wrap: wrap;
margin-right:-20rpx;
image{
width:calc(100%/3 - 20rpx);
margin-right:20rpx;
height:160rpx;
border-radius: 10rpx;
}
}
.dec{
background:#F7F7F7;
color:#999;
font-size:28rpx;
border-radius: 24rpx;
padding:20rpx;
}
map{
width:100%;
height:372rpx;
border-radius: 10rpx;
}
.cu-btn{
margin-top:40rpx;
height:60rpx;
}
}
}
.d-form /deep/{
.u-form-item{
color:red;
}
.u-form-item__body{
flex-direction: column;
}
}
}
}
</style>
<template>
<view class="container">
<view class="card handle">
<view class="item">
<text class="label">位置</text>
<text class="val">壹号基地东南角</text>
</view>
<view class="item block">
<text class="label">凭证</text>
<view class="imgs">
<image v-for="i in 3" :key="i" src="https://alipic.lanhuapp.com/XDSlicePNGMAX19c3c750caf3b1448e14c56df8485f5ca6f3d6bbef600208f2d1156d5eaec38a.png"/>
</view>
</view>
<u-read-more :showHeight="0" toggle closeText="展开" color="#777">
<view class="item block">
<text class="label">描述</text>
<text class="dec">这里是描述......</text>
</view>
<view class="item block">
<text class="label">经纬度</text>
<map id="amap" :longitude="102.722475" :latitude="25.077679"/>
</view>
<view class="item block">
<text class="label">是否处理</text>
<u-radio-group v-model="demo" activeColor="#10C176">
<u-radio label="是" name="1" :customStyle="{marginRight: '8px'}"/>
<u-radio label="否" name="0"/>
</u-radio-group>
<button class="cu-btn round bg-green shadow submit" @click="sumbit">保存修改</button>
</view>
</u-read-more>
</view>
<view class="card unhandle">
<view class="item">
<text class="label">位置</text>
<text class="val">壹号基地东南角</text>
</view>
<view class="item block">
<text class="label">凭证</text>
<view class="imgs">
<image v-for="i in 3" :key="i" src="https://alipic.lanhuapp.com/XDSlicePNGMAX19c3c750caf3b1448e14c56df8485f5ca6f3d6bbef600208f2d1156d5eaec38a.png"/>
</view>
</view>
<u-read-more :showHeight="0" toggle closeText="展开">
<view class="item block">
<text class="label">描述</text>
<text class="dec">这里是描述......</text>
</view>
<view class="item block">
<text class="label">经纬度</text>
<map id="amap" :longitude="102.722475" :latitude="25.077679"/>
</view>
<view class="item block">
<text class="label">是否处理</text>
<u-radio-group v-model="demo" activeColor="#10C176">
<u-radio label="是" name="1" :customStyle="{marginRight: '8px'}"/>
<u-radio label="否" name="0"/>
</u-radio-group>
</view>
</u-read-more>
</view>
</view>
</template>
<script>
export default {
data(){
return{
map:null,
demo:""
}
},
async onReady(){
/* #ifdef APP-PLUS */
var amap=uni.createMapContext("amap",this)
this.map=amap.$getAppMap()
var marker=new plus.maps.Marker(new plus.maps.Point(102.722475, 25.077679))
marker.setLabel('asdasf')
this.maps.addOverlay(marker)
/* #endif */
}
}
</script>

120
pages/patrolGarden/info.vue

@ -0,0 +1,120 @@
<style lang="less" scoped>
.container{
min-height: 100%;
background:#f6f6f6;
padding:30rpx 0;
.handle{
&+.handle{
margin-top:25rpx;
}
display: flex;
position:relative;
background:#EEFBF5;
border-radius: 24rpx;
padding:30rpx;
&:before{
content:"已处理";
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='66.965' height='17.019' viewBox='0 0 66.965 17.019'%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill:%2310c176;%7D%3C/style%3E%3C/defs%3E%3Cg transform='translate(-215 -495.575)'%3E%3Cpath class='a' d='M218.295,495.627s-.028,3.42,0,3.45c.036-.036,6.616,0,6.616,0s.032,3.089,0,3.059h-2.17s-.015,3.341,0,3.379c-.036-.036,3.344,0,3.344,0s-.021.044,0,3.628h-3.344s-.072,3.442,0,3.365c.071.036,59.224.085,59.224.085v-8.346a9.109,9.109,0,0,0-8.4-8.62C273.261,495.511,218.295,495.627,218.295,495.627Z'/%3E%3Ccircle class='a' cx='1.5' cy='1.5' r='1.5' transform='translate(217 502.1)'/%3E%3Cellipse class='a' cx='1.5' cy='1.725' rx='1.5' ry='1.725' transform='translate(217 495.62)'/%3E%3Cellipse class='a' cx='1.5' cy='1.7' rx='1.5' ry='1.7' transform='translate(221 509.12)'/%3E%3Cellipse class='a' cx='1.5' cy='1.705' rx='1.5' ry='1.705' transform='translate(221.4 502.1)'/%3E%3Crect class='a' width='5' height='3' rx='1.5' transform='translate(215 509)'/%3E%3C/g%3E%3C/svg%3E");
position:absolute;
height:34rpx;
line-height: 34rpx;
width:133rpx;
text-align: center;
color:#fff;
top:0;
right:0;
}
&.un:before{
content:"未处理";
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='66.965' height='17.019' viewBox='0 0 66.965 17.019'%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill:%23cd0916;%7D%3C/style%3E%3C/defs%3E%3Cg transform='translate(-215 -495.575)'%3E%3Cpath class='a' d='M218.295,495.627s-.028,3.42,0,3.45c.036-.036,6.616,0,6.616,0s.032,3.089,0,3.059h-2.17s-.015,3.341,0,3.379c-.036-.036,3.344,0,3.344,0s-.021.044,0,3.628h-3.344s-.072,3.442,0,3.365c.071.036,59.224.085,59.224.085v-8.346a9.109,9.109,0,0,0-8.4-8.62C273.261,495.511,218.295,495.627,218.295,495.627Z'/%3E%3Ccircle class='a' cx='1.5' cy='1.5' r='1.5' transform='translate(217 502.1)'/%3E%3Cellipse class='a' cx='1.5' cy='1.725' rx='1.5' ry='1.725' transform='translate(217 495.62)'/%3E%3Cellipse class='a' cx='1.5' cy='1.7' rx='1.5' ry='1.7' transform='translate(221 509.12)'/%3E%3Cellipse class='a' cx='1.5' cy='1.705' rx='1.5' ry='1.705' transform='translate(221.4 502.1)'/%3E%3Crect class='a' width='5' height='3' rx='1.5' transform='translate(215 509)'/%3E%3C/g%3E%3C/svg%3E");
}
image{
flex-shrink: 0;
width:140rpx;
height:120rpx;
margin-right:20rpx;
}
.content{
flex-grow: 1;
width:1rpx;
.doubleLine{
font-size:24rpx;
}
.cu-btn{
background:#FFCB69;
border-radius: 4rpx;
height:40rpx;
color:#fff;
font-size:20rpx;
margin-top:10rpx;
}
}
}
.cu-btn.add{
margin:20rpx auto 10rpx;
display: flex;
width:500rpx;
background:#10C176;
}
}
</style>
<template>
<view class="container">
<u-form class="card inline" errorType="toast" :model="formData" :rules="rules" ref="form" labelWidth="auto">
<d-form label="基地名称" required/>
<d-form label="记录人" required/>
<d-form label="巡园日期" required type="calendar"/>
<d-form label="是否异常" required type="radio" :columns="[{label:'是',value:1},{label:'否',value:0}]" v-model="formData.abnormal"/>
<view class="handle">
<image src="https://alipic.lanhuapp.com/XDSlicePNGMAX194db53bfba98d0b8dd7897e8aa3b92427509704376c5621dac3520f49ce3d9a.png"/>
<view class="content">
<view class="doubleLine" style="--n:3;">柑橘黄斑病是子囊菌亚门球腔菌属的柑橘球腔菌侵染所致病菌以菌丝体在病叶和落叶中越冬柑橘黄斑病是子囊菌亚门球腔菌属的柑橘球腔菌侵染所致病菌以菌丝体在病叶和落叶中越冬</view>
</view>
</view>
<view class="handle un">
<image src="https://alipic.lanhuapp.com/XDSlicePNGMAX194db53bfba98d0b8dd7897e8aa3b92427509704376c5621dac3520f49ce3d9a.png"/>
<view class="content">
<view class="doubleLine">柑橘黄斑病是子囊菌亚门球腔菌属的柑橘球腔菌侵染所致病菌以菌丝体在病叶和落叶中越冬柑橘黄斑病是子囊菌亚门球腔菌属的柑橘球腔菌侵染所致病菌以菌丝体在病叶和落叶中越冬</view>
<button class="cu-btn shadow">立即处理</button>
</view>
</view>
<button class="cu-btn round bg-green shadow add">+继续添加异常</button>
<d-form label="凭证" type="upImg" :value="formData.pic"/>
<d-form label="备注" type="textarea" v-model="remark"/>
</u-form>
<button class="cu-btn round bg-green shadow submit" @click="sumbit">保存</button>
</view>
</template>
<script>
export default {
data(){
return{
formData:{
pic:[],
abnormal:0,
},
rules:{
},
}
},
watch:{
"formData.abnormal"(n){
if(n==1){
uni.navigateTo({
url:"/pages/patrolGarden/abnoReport"
})
}
}
},
methods:{
demo(e){
console.log(e,'----e-------')
},
sumbit(){
},
}
}
</script>

131
pages/patrolGarden/record.vue

@ -0,0 +1,131 @@
<style lang="less" scoped>
.container{
height:100%;
background:#f6f6f6;
scroll-view{
.card{
margin-top:0;
&>.title{
display: flex;
align-items: center;
.icon{
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16.001999' viewBox='0 0 16 16.002' fill='none' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cpath id='path' d='M0 16L8 16L8 0L0 0L0 16ZM4.57098 1.143L6.85699 1.143L6.85699 3.429L4.57098 3.429L4.57098 1.143ZM4.57098 4.572L6.85699 4.572L6.85699 6.858L4.57098 6.858L4.57098 4.572ZM4.57098 8.001L6.85699 8.001L6.85699 10.287L4.57098 10.287L4.57098 8.001ZM1.142 1.144L3.42801 1.144L3.42801 3.43L1.14301 3.43L1.142 1.144ZM1.142 4.573L3.42801 4.573L3.42801 6.859L1.14301 6.859L1.142 4.573ZM1.142 8.002L3.42801 8.002L3.42801 10.288L1.14301 10.288L1.142 8.002ZM9.142 16.002L11.428 16.002L11.428 12.571L14.857 12.571L14.857 16L16 16L16 9.143L9.14301 9.143L9.142 16.002ZM9.142 6.859L16 6.859L16 8L9.14301 8L9.142 6.859Z' fill='%2310C176' fill-opacity='1' fill-rule='nonzero'/%3E %3C/svg%3E ");
background-size:100% 100%;
width:32rpx;
height:32rpx;
margin-right:12rpx;
}
.name{
font-size:32rpx;
font-weight: bold;
margin-right:10rpx;
}
.statu{
margin-left:auto;
font-size:24rpx;
font-weight: bold;
&.no{
color:#00C220;
}
&.unusual{
color:#EE263A;
display: flex;
align-items: center;
&:before{
content:"";
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill:%23ee263a;%7D%3C/style%3E%3C/defs%3E%3Cpath class='a' d='M6,0A4.416,4.416,0,0,0,2.893,1.254,4.284,4.284,0,0,0,1.621,4.29v5.856h8.712V4.29A4.254,4.254,0,0,0,9.055,1.254,4.4,4.4,0,0,0,6,0Zm-.36,8.742L5.515,5.9H3.367l2.82-3.558.24,2.292,2.04.072L5.617,8.742ZM0,11.346a.654.654,0,0,1,.654-.66H11.347a.672.672,0,0,1,.462.192.684.684,0,0,1,.192.468.654.654,0,0,1-.654.654H.655A.654.654,0,0,1,0,11.346Zm0,0' transform='translate(-0.001)'/%3E%3C/svg%3E");
width:24rpx;
height:24rpx;
margin-right:4rpx;
}
}
}
.plant-youbian{
color:#777;
}
}
&>.imgs{
display: flex;
image{
border-radius: 8rpx;
width:calc((100% - 20rpx*3)/4);
height:140rpx;
&+image{
margin-left:20rpx;
}
}
}
&>.foot{
display: flex;
align-items: center;
justify-content: space-between;
border-top:2rpx solid rgba(216, 216, 216, 0.3);
color:#999;
padding-top:15rpx;
margin-top:10rpx;
}
}
}
}
</style>
<template>
<view class="container">
<d-navbar text="巡园记录" isBack style="--bg:#10C176;--c:#fff;">
<text slot="right" class="plant-xinjian" @click="toAddPage"/>
</d-navbar>
<d-search v-model="searchVal.name" @search="clean();search()"/>
<scroll-view scroll-y>
<view class="card" @click="$u.route({url:'/pages/patrolGarden/detail'})">
<view class="title">
<text class="icon"/>
<text class="name over">一号基地</text>
<text class="statu no">无异常</text>
</view>
<view class="imgs">
<image v-for="i in 4" :key="i" mode="aspectFit" src="https://alipic.lanhuapp.com/XDSlicePNGMAX3347bbbb56235edbfb4639fd8039bce3d3d9b375b7ead4bc95a9a6f3d4156935.png"/>
</view>
<u-read-more toggle closetext="展开" showHeight="80rpx">
柑橘黄斑病是子囊菌亚门球腔菌属的柑橘球腔菌侵染所致病菌以菌丝体在病叶和落叶中越冬柑橘黄斑病是子囊菌亚门球腔菌属的柑橘球腔菌侵染所致病菌以菌丝体在病叶和落叶中越冬柑橘黄斑病是子囊菌亚门球
</u-read-more>
<view class="foot">
<text>巡园日期2020-09-09</text>
<text>张召忠</text>
</view>
</view>
<view class="card" @click="$u.route({url:'/pages/patrolGarden/app'})">
<view class="title">
<text class="icon"/>
<text class="name over">一号基地</text>
<text class="statu unusual">异常</text>
<text class="plant-youbian"/>
</view>
<view class="imgs">
<image v-for="i in 4" :key="i" mode="aspectFit" src="https://alipic.lanhuapp.com/XDSlicePNGMAX3347bbbb56235edbfb4639fd8039bce3d3d9b375b7ead4bc95a9a6f3d4156935.png"/>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
export default {
data(){
return{
searchVal:{
name:"",
},
}
},
methods:{
clean(){},
async search(){
},
toAddPage(){
uni.navigateTo({
url:"/pages/patrolGarden/info"
})
},
}
}
</script>

55
router/patrolGarden.js

@ -0,0 +1,55 @@
module.exports=[
{
path:"pages/patrolGarden/record",
style:{
navigationBarTitleText:"巡园记录",
"app-plus":{
titleNView:false
}
}
},
{
path:"pages/patrolGarden/detail",
style:{
navigationBarTitleText:"巡园详情",
navigationBarBackgroundColor:"#10C176",
navigationBarTextStyle:"white",
"app-plus":{
"titleNView":true
}
}
},
{
path:"pages/patrolGarden/info",
style:{
navigationBarTitleText:"巡园信息",
navigationBarBackgroundColor:"#10C176",
navigationBarTextStyle:"white",
"app-plus":{
"titleNView":true
}
}
},
{
path:"pages/patrolGarden/app",
style:{
navigationBarTitleText:"巡园应用",
navigationBarBackgroundColor:"#10C176",
navigationBarTextStyle:"white",
"app-plus":{
"titleNView":true
}
}
},
{
path:"pages/patrolGarden/abnoReport",
style:{
navigationBarTitleText:"异常上报",
navigationBarBackgroundColor:"#10C176",
navigationBarTextStyle:"white",
"app-plus":{
"titleNView":true
}
}
},
]

1
static/patrolGarden/inventory.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><defs><style>.a{fill:#eef7ff;}.b{fill:#1b93fc;}</style></defs><g transform="translate(0)"><circle class="a" cx="18" cy="18" r="18" transform="translate(0)"/><path class="b" d="M16.446,7.114,10.064.732a2.5,2.5,0,0,0-3.538,0L.144,7.114a.47.47,0,0,0,.332.8H2.606V11.5a2.5,2.5,0,0,0,2.5,2.5h6.375a2.5,2.5,0,0,0,2.5-2.5V7.916h2.129a.47.47,0,0,0,.332-.8ZM10.6,12.205a.352.352,0,1,1-.7,0V10.659a1.6,1.6,0,1,0-3.2,0v1.546a.352.352,0,0,1-.7,0V10.659a2.307,2.307,0,1,1,4.614,0Z" transform="translate(9.993 11)"/></g></svg>

After

Width:  |  Height:  |  Size: 595 B

BIN
static/patrolGarden/point.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

1
static/patrolGarden/procure.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><defs><style>.a{fill:#fdf1f1;}.b{fill:#eb5a59;}</style></defs><g transform="translate(-0.495)"><circle class="a" cx="18" cy="18" r="18" transform="translate(0.495)"/><g transform="translate(-166.08 -187.134)"><path class="b" d="M184.9,209.959c-1.315,0-2.435,0-2.838-.01a1.909,1.909,0,0,1-1.857-1.729c-.008-.053-.989-6.694-1.281-8.3a.879.879,0,0,0-.4-.644,2.052,2.052,0,0,0-1.284-.125.544.544,0,0,1-.65-.354.483.483,0,0,1,.388-.587,3.2,3.2,0,0,1,2.13.253,1.84,1.84,0,0,1,.879,1.3c.294,1.618,1.247,8.066,1.287,8.34.013.1.132.861.814.873,1.166.023,8.734,0,8.81,0h0a.487.487,0,1,1,0,.97C190.7,209.949,187.441,209.959,184.9,209.959Z" transform="translate(0 0)"/><path class="b" d="M451.475,805.345m-1.165,0a1.165,1.165,0,1,0,1.165-1.165A1.165,1.165,0,0,0,450.31,805.345Z" transform="translate(-267.63 -594.375)"/><path class="b" d="M656.975,805.345m-1.165,0a1.165,1.165,0,1,0,1.165-1.165A1.165,1.165,0,0,0,655.81,805.345Z" transform="translate(-468.547 -594.375)"/><path class="b" d="M314.67,284.84h13.968s1.347.392,1.572,1.448-1.3,6.5-1.3,6.5-.719,1.1-1.527.978H316.152Z" transform="translate(-137.658 -84.654)"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

1
static/patrolGarden/tour.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><defs><style>.a{fill:#f2fff9;}.b,.c,.d{fill:#31c888;}.b{opacity:0.2;}.c{opacity:0.6;}.e{fill:#fafafa;}</style></defs><g transform="translate(0.011)"><circle class="a" cx="18" cy="18" r="18" transform="translate(-0.011)"/><g transform="translate(-67.674 10)"><path class="b" d="M305.39,867.792c0,.451.625.864,1.631,1.087a8.116,8.116,0,0,0,3.261,0c1.011-.223,1.631-.636,1.631-1.087,0-.69-1.467-1.25-3.261-1.25S305.39,867.1,305.39,867.792Z" transform="translate(-222.513 -852.045)"/><path class="c" d="M78.664,7.214a7.5,7.5,0,0,0,15,.069,7.5,7.5,0,0,0-15-.069Z" transform="translate(0 0)"/><path class="c" d="M335.248,615.54l2.832,3.133-2.218,2.888a.787.787,0,0,1-.641.322.8.8,0,0,1-.641-.328l-2.174-2.912Z" transform="translate(-249.098 -605.598)"/><path class="d" d="M135.435,63.253a6.307,6.307,0,0,0,4.785,6.059,6.532,6.532,0,0,0,7.259-2.925,6.144,6.144,0,0,0-1.027-7.573,6.593,6.593,0,0,0-7.79-1A6.245,6.245,0,0,0,135.435,63.253Z" transform="translate(-55.726 -56.071)"/><path class="e" d="M357.907,248.613h4.5V249h-4.5Zm-.2,1.761H362.6v.391h-4.892Z" transform="translate(-273.999 -243.693)"/><path class="e" d="M377.459,248l1.207,1.207L379.873,248Zm1.207,1.761-2.147-2.174h4.3Z" transform="translate(-292.508 -242.683)"/><path class="e" d="M397.306,181.6H395.74l.371-6.856h.783Zm-2.662-3.92h.391v.734h-.391Z" transform="translate(-310.404 -170.961)"/><path class="e" d="M382.139,372.878v-.315a.393.393,0,1,1,.783,0v.315a.393.393,0,1,1-.783,0Zm3.522-1.158h.391v.783h-.391Z" transform="translate(-298.048 -364.756)"/><path class="e" d="M591.421,400.615V400.3a.393.393,0,1,1,.783,0v.315a.393.393,0,1,1-.783,0Z" transform="translate(-503.834 -392.481)"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

14
uni.scss

@ -88,9 +88,9 @@ $uni-font-size-paragraph:15px;
.card{
background:#fff;
border-radius: 12px;
margin:15px;
padding:15px;
border-radius: 16rpx;
margin:30rpx;
padding:30rpx;
box-shadow: 0 3px 6px 1px rgba(0,0,0,0.1);
&>.title{
color:#333;
@ -117,7 +117,13 @@ view{
overflow: hidden;
white-space: nowrap;
}
.doubleLine{
word-break: break-all;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: var(--n,2);
-webkit-box-orient: vertical;
}
// .u-navbar{
// height:calc(var(--status-bar-height) + 44px);
// margin-bottom:15px;

59
uni_modules/d-form/components/d-form/d-form.vue

@ -20,13 +20,13 @@
margin-left:30rpx;
}
}
.map,.u-input,textarea{
.u-input,textarea{
background:#F7F7F7;
margin-top:14rpx;
border-radius: 24rpx;
width:100%;
}
.map,.navigate{
.navigate{
height:80rpx;
display:flex;
align-items: center;
@ -39,6 +39,12 @@
color:#999;
}
}
map{
margin-top:10rpx;
border-radius: 10rpx;
width:100%;
height:320rpx;
}
textarea{
height:auto;
min-height:160rpx;
@ -263,26 +269,6 @@
}
}
}
.amap{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
z-index: -1;
background:rgba(0, 0, 0, 0.4);
&.show{
z-index: 100;
map{
top:0;
}
}
map{
top:100%;
width:100%;
height:100%;
}
}
.select-tab-input{
position:absolute;
bottom:0;
@ -313,7 +299,8 @@
</u-input>
<button v-if="btnText || btnIcon" @click="btnFun" class="cu-btn bg-green shadow" :class="btnIcon">{{btnText}}</button>
</view>
<view v-else-if="type=='map'" class="map plant-dingweixiao" :class="{noData:value.length<=0}" @click="openMap">{{value.length>0?Object.values(value[0]).join():"选择经纬度"}}</view>
<map v-else-if="type=='map'" id="amap" :markers="points" @anchorpointtap="tapMap" :latitude="36.061089" :longitude="103.834303"/>
<!-- <view class="map plant-dingweixiao" :class="{noData:value.length<=0}" @click="openMap">{{value.length>0?Object.values(value[0]).join():"选择经纬度"}}</view> -->
<view v-else-if="type=='select'" class="plant-youbian" :class="{noData: !value[0]}" @click="show=true">{{pickerContent}}</view>
<view v-else-if="type=='navigate'" class="navigate plant-youbian" :class="{noData:!value}" @click="btnFun">{{value||placeholder||`请选择${labelName}`}}</view>
<view v-else-if="type=='select-tab'" class="select-tab">
@ -393,9 +380,9 @@
<u-overlay v-if="type=='select-tab'" :show="show" @click="show=false">
<input class="select-tab-input" placeholder="请输入" @click.stop="" :focus="show" @blur="show=false" @confirm="addCode($event.detail.value)"/>
</u-overlay>
<view v-if="type=='map'" class="amap" :class="{show:showMap}">
<!-- <view v-if="type=='map'" class="amap" :class="{show:showMap}">
<map id="amap"/>
</view>
</view> -->
</view>
</template>
@ -535,6 +522,8 @@ import {computeArea} from '@/common/utils'
pickerChangeVal:null,
dictCodeList:[],
points:[],
amap:null,
}
},
watch:{
@ -598,6 +587,23 @@ import {computeArea} from '@/common/utils'
this.getDictCode()
}
},
mounted(){
if(this.type=='map'){
this.amap=uni.createMapContext("amap",this).$getAppMap()
this.amap.onclick=e=>{
this.points=[{
id:1,
title:"sss",
latitude: e.latitude,
longitude:e.longitude,
iconPath:"/static/patrolGarden/point.png",
width:10,
height:10,
}]
this.$emit('position',e)
}
}
},
methods:{
async getDictCode(){
var res=await request("/common/api/dict/queryDictItemByDictCode",{
@ -682,6 +688,9 @@ import {computeArea} from '@/common/utils'
this.$emit("input",this.filter(e))
}
},
tapMap(e){
console.log(e,'----e-----')
},
openMap(){
// uni.navigateTo({url:"/plantPages/massif/mapEditor"})

Loading…
Cancel
Save