diff --git a/common/request.js b/common/request.js
index beef9c2..1ec414d 100644
--- a/common/request.js
+++ b/common/request.js
@@ -2,8 +2,8 @@ import store from "@/store"
export function host(host='default',suffix='/plant_manage'){
var url=process.env.NODE_ENV === 'development'?{
- default:`http://wmyrzw.natappfree.cc` //陈
- // default:`http://uq5pak.natappfree.cc` //马
+ // default:`http://wmyrzw.natappfree.cc` //陈
+ default:`http://b9uckg.natappfree.cc` //马
}:{
default:`http://qv6mj8.natappfree.cc`
}
diff --git a/pages.js b/pages.js
index dd16d4e..e0e96ef 100644
--- a/pages.js
+++ b/pages.js
@@ -9,19 +9,6 @@ module.exports = hot((pagesJson)=>{
...require("./router/massif.js"),
...require('./router/purchase.js'),
...require('./router/stock.js'),
- // {
- // "path":"pages/demo",
- // "style":{
- // "navigationBarTitleText":"测试地图",
- // "navigationBarBackgroundColor":"#10C176",
- // "navigationBarTextStyle":"white",
- // "app-plus":{
- // "titleNView":true,
- // "nvueCompiler":"uni-app",
- // "nvueStyleCompiler":"uni-app"
- // }
- // }
- // },
],
tabBar:{
color:"#999",
@@ -38,7 +25,7 @@ module.exports = hot((pagesJson)=>{
list: [
// {name:"测试页面",path:"pages/demo"},
// {name: "地块管理",path: "pages/massif/mana/index","query": ""},
- {name: "地块基本信息",path: "pages/massif/info","query": ""},
+ // {name: "地块基本信息",path: "pages/massif/info","query": ""},
{name: "登录",path: "pages/home/login","query": ""},
{name: "首页",path: "pages/home/index","query": ""},
{name: "仓库管理",path: "pages/warehouse/mana","query": ""},
diff --git a/pages/demo.nvue b/pages/demo.nvue
deleted file mode 100644
index 7e6312e..0000000
--- a/pages/demo.nvue
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 66e183b..da180b9 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -201,6 +201,9 @@
margin-right:12rpx;
text-shadow: 6rpx -6rpx rgba(var(--c),0.3);
}
+ &.active{
+ color:rgba(var(--c),1);
+ }
}
}
.item{
@@ -209,6 +212,7 @@
margin-top:40rpx;
&:before{
content:" ";
+ flex-shrink: 0;
width:20rpx;
height:20rpx;
margin-right:16rpx;
@@ -217,8 +221,11 @@
}
text{
&:first-child{
+ flex-shrink: 0;
+ min-width:140rpx;
color:#333333;
font-size:28rpx;
+ margin-right:20rpx;
}
&:nth-child(2){
color:#999999;
@@ -313,19 +320,21 @@
基地管理 切换基地
- 农事记录
- 投入品
+ 农事记录
+ 投入品
-
- 农事 [示例]今日完成了草莓园浇水任务。
-
-
- 投入品 [示例]今日完成了草莓园浇水任务。
-
-
- 投入品 [示例]今日完成了草莓园浇水任务。
-
+
+
+ 农事 {{new Date(v.time).format('yyyy-MM-dd')}}{{v.userName}}{{v.plotName}}{{v.farmWorkName}}
+
+
+
+
+ 投入品 {{new Date(v.time).format('yyyy-MM-dd')}}{{v.userName}}{{v.plotName}}{{v.farmWorkName}}
+
+
+
@@ -341,16 +350,24 @@ import request from '@/common/request.js'
show:false,
plantBase:[[]],
massif:{},
+ baseInfo:{},
+ baseIndex:"",
}
},
computed:{
isAdmin(){
return this.$store.getters.userInfo.roleCode=='companyAdmin'
},
+ isEmpty(){
+ if(!baseIndex)return (this.baseInfo.farmWork||[]).length+(baseInfo.farmingInput||[]).length<=0
+ else if(baseIndex=='record')return (this.baseInfo.farmWork||[]).length<=0
+ else return (baseInfo.farmingInput||[]).length<=0
+ },
},
watch:{
"$store.state.plantBaseInfoId"(n){
this.getMassif(n)
+ this.getBaseInfo(n)
}
},
onLoad() {
@@ -392,6 +409,21 @@ import request from '@/common/request.js'
})
}
},
+ async getBaseInfo(plantBaseId){
+ console.log('-------------getBaseInfo-----------------')
+ var res=await request("/api/plantIndex/queryFarmWorkAndInput",{
+ params:{plantBaseId}
+ })
+ if(res.statu){
+ this.baseInfo=res.data
+ }else{
+ uni.showModal({
+ title:"提示",
+ content:res.msg||"获取基地管理信息失败!",
+ showCancel:false,
+ })
+ }
+ },
}
}
diff --git a/pages/massif/mapEditor.vue b/pages/massif/mapEditor.vue
new file mode 100644
index 0000000..a89f3f4
--- /dev/null
+++ b/pages/massif/mapEditor.vue
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
diff --git a/router/massif.js b/router/massif.js
index fea4069..2649d1f 100644
--- a/router/massif.js
+++ b/router/massif.js
@@ -90,4 +90,15 @@ module.exports=[
}
}
},
+ {
+ path:"pages/massif/mapEditor",
+ style:{
+ navigationBarTitleText:"地图编辑",
+ navigationBarBackgroundColor:"#10C176",
+ navigationBarTextStyle:"white",
+ "app-plus":{
+ titleNView:true,
+ }
+ }
+ },
]
\ No newline at end of file
diff --git a/uni_modules/d-form/components/d-form/d-form.vue b/uni_modules/d-form/components/d-form/d-form.vue
index 8809653..e129166 100644
--- a/uni_modules/d-form/components/d-form/d-form.vue
+++ b/uni_modules/d-form/components/d-form/d-form.vue
@@ -425,14 +425,12 @@ import {dataType} from 'black-knight/lib/config/tools'
}
},
openMap(){
+ // uni.navigateTo({url:"/pages/massif/mapEditor"})
/* #ifdef APP-PLUS */
this.showMap=true
-
+
if(!this.maps){
var amap=uni.createMapContext("amap",this)
-for(var i in plus.maps.MapStyles){
- console.log(i,'-plus.maps.MapStyles-------')
-}
this.maps=amap.$getAppMap()
this.maps.setMapType(plus.maps.MapType.MAPTYPE_SATELLITE)
@@ -442,7 +440,7 @@ for(var i in plus.maps.MapStyles){
this.maps.addOverlay(polyline)
this.maps.onclick=(e)=>{
- if(this.value.length<=0 && this.markerList.length<=2){
+ if(this.value.length<=0){
var marker=new plus.maps.Marker(new plus.maps.Point(e.longitude, e.latitude));
marker.setIcon("/static/map_point_1.png");
marker.bringToTop()
@@ -450,6 +448,11 @@ for(var i in plus.maps.MapStyles){
marker.onDrag= e=>{
console.log("-----Drag:",JSON.stringify(e.getPoint()))
}
+ if(this.markerList.length<=0){
+ marker.onclick= e=>{
+ console.log('-------------asdf--------------------')
+ }
+ }
this.markerList.push(marker)
this.maps.addOverlay(marker);