Browse Source

修改搜索

master
邓宏 2 years ago
parent
commit
cc7f6a1508
  1. 4
      common/request.js
  2. 4
      pages/massif/info.vue
  3. 7
      pages/massif/mana/recovery.vue
  4. BIN
      static/map_point_1.png
  5. BIN
      static/map_point_2.png
  6. 34
      uni_modules/d-form/components/d-form/d-form.vue

4
common/request.js

@ -2,8 +2,8 @@ import store from "@/store"
export function host(host='default',suffix='/plant_manage'){ export function host(host='default',suffix='/plant_manage'){
var url=process.env.NODE_ENV === 'development'?{ var url=process.env.NODE_ENV === 'development'?{
default:`http://zrxsae.natappfree.cc` //陈 // default:`http://zrxsae.natappfree.cc` //陈
// default:`http://uq5pak.natappfree.cc` //马 default:`http://uq5pak.natappfree.cc` //马
}:{ }:{
default:`http://qv6mj8.natappfree.cc` default:`http://qv6mj8.natappfree.cc`
} }

4
pages/massif/info.vue

@ -14,7 +14,7 @@
v-bind="v" v-bind="v"
:required="!!rules[k]" :required="!!rules[k]"
:field="k" :field="k"
:value="(/^dateRange$|^select$/.test(v.type)?fields[k].value:formData[k])" :value="(/^dateRange$|^select$|^map$/.test(v.type)?fields[k].value:formData[k])"
ref="dForm" ref="dForm"
@input="formData[k]=$event" @input="formData[k]=$event"
@selectRDate="selectDate" @selectRDate="selectDate"
@ -37,7 +37,7 @@ import request from '@/common/request'
realityArea:{label:"实际面积",type:'digit'}, realityArea:{label:"实际面积",type:'digit'},
image:{label:"地块图片",type:"upImg",num:3,value:''}, image:{label:"地块图片",type:"upImg",num:3,value:''},
date:{label:"使用日期",type:"dateRange",value:[]}, date:{label:"使用日期",type:"dateRange",value:[]},
jw:{label:"经/纬度",type:"map"}, jw:{label:"经/纬度",type:"map",value:[]},
address:{label:"详细地址",type:"textarea"}, address:{label:"详细地址",type:"textarea"},
}, },
formData:{ formData:{

7
pages/massif/mana/recovery.vue

@ -118,7 +118,7 @@
@close="show=false" @close="show=false"
@cancel="show=false" @cancel="show=false"
:value="date" :value="date"
@confirm="searchVal[dateType]=new Date($event.value).format('yyyy-MM-dd');show=false"/> @confirm="searchVal[dateType]=new Date($event.value).format('yyyy-MM-dd');clean();search();show=false"/>
</view> </view>
</template> </template>
<script> <script>
@ -163,6 +163,11 @@ export default {
this.search(plantId) this.search(plantId)
}) })
}, },
chean(){
this.list=[]
this.total=0
this.searchVal.pageNo=1
},
async search(plantId=''){ async search(plantId=''){
if(this.total==0||this.list.length<this.total){ if(this.total==0||this.list.length<this.total){
var res=await request("/api/plantHarvest/list",{ var res=await request("/api/plantHarvest/list",{

BIN
static/map_point_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
static/map_point_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

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

@ -381,6 +381,9 @@ import {dataType} from 'black-knight/lib/config/tools'
}) })
} }
}, },
activated(){
console.log("-------activated---------------")
},
methods:{ methods:{
async afterRead(e){ async afterRead(e){
this.imgList=this.imgList.concat(e.file.map(v=>Object.assign(v,{ this.imgList=this.imgList.concat(e.file.map(v=>Object.assign(v,{
@ -426,27 +429,34 @@ import {dataType} from 'black-knight/lib/config/tools'
this.showMap=true this.showMap=true
if(!this.maps){ if(!this.maps){
var amap=uni.createMapContext("amap",this) var amap=uni.createMapContext("amap",this)
this.maps=amap.$getAppMap() this.maps=amap.$getAppMap()
this.maps.setMapType(plus.maps.MapType.MAPTYPE_SATELLITE) this.maps.setMapType(plus.maps.MapType.MAPTYPE_SATELLITE)
this.maps.onclick=(e)=>{ this.maps.onclick=(e)=>{
console.log(e,'-------maps--click---------') console.log(e,'-------maps--click---------')
} }
var polygon=new plus.maps.Polygon([ // var polygon=new plus.maps.Polygon([
new plus.maps.Point(116.39524,39.925301), // new plus.maps.Point(116.39524,39.925301),
new plus.maps.Point(116.400444,39.925285), // new plus.maps.Point(116.400444,39.925285),
new plus.maps.Point(116.400558,39.923282), // new plus.maps.Point(116.400558,39.923282),
new plus.maps.Point(116.395502,39.923082), // new plus.maps.Point(116.395502,39.923082),
]) // ])
polygon.setLineWidth(2) // polygon.setLineWidth(2)
polygon.setStrokeColor("#10C176") // polygon.setStrokeColor("#10C176")
polygon.setFillColor("#10C176") // polygon.setFillColor("#10C176")
polygon.setFillOpacity(0.3) // polygon.setFillOpacity(0.3)
this.maps.addOverlay(polygon) // this.maps.addOverlay(polygon)
var marker=new plus.maps.Marker(new plus.maps.Point(116.396137,39.924055)); var marker=new plus.maps.Marker(new plus.maps.Point(116.396137,39.924055));
marker.setIcon("/static/tab_home.png"); marker.setIcon("/static/map_point_1.png");
marker.bringToTop() marker.bringToTop()
marker.setDraggable(true) marker.setDraggable(true)
marker.onclick= e=>{
console.log('---onclick----')
}
marker.onDrag= e=>{
console.log("-----Drag:",JSON.stringify(e.getPoint()))
}
this.maps.addOverlay(marker); this.maps.addOverlay(marker);
} }
/* #endif */ /* #endif */

Loading…
Cancel
Save