diff --git a/pages/baseMana/formReacord.vue b/pages/baseMana/formReacord.vue
index 211a04b..763d5a4 100644
--- a/pages/baseMana/formReacord.vue
+++ b/pages/baseMana/formReacord.vue
@@ -2,6 +2,36 @@
.container{
height:100%;
background:#f6f6f6;
+ &>.d-search{
+ &/deep/ .want_search{
+ .title{
+ color:#999;
+ font-size:24rpx;
+ font-weight: normal;
+ }
+ .content{
+ display:flex;
+ flex-wrap: wrap;
+ margin:14rpx -20rpx -20rpx 0;
+ text{
+ height:48rpx;
+ line-height: 48rpx;
+ border-radius: 30rpx;
+ width:calc(100%/5 - 20rpx);
+ text-align: center;
+ font-size:24rpx;
+ margin:0 20rpx 20rpx 0;
+ transition: all 0.3s;
+ color:#999;
+ background:#EEEEEE;
+ &.active{
+ color:#fff;
+ background:#10C176;
+ }
+ }
+ }
+ }
+ }
.date-range{
flex-shrink: 0;
@@ -122,7 +152,12 @@
-
+
+ 猜你想搜
+
+ {{v.label}}
+
+
{{searchVal.startTime||"请选择开始时间"}}
@@ -183,6 +218,12 @@ import request from '@/common/request.js'
this.search()
},
methods:{
+ select(e){
+ this.$refs.dSearch.show=false
+ this.searchVal.value=this.searchVal.value==e?'':e
+ this.clean()
+ this.search()
+ },
async init(){
var res=await request("/api/plantFarming/listFarmName")
if(res.statu){
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 543c6ba..582561d 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -65,6 +65,41 @@
}
}
.card{
+ &.area{
+ position:relative;
+ z-index: 20;
+ table{
+ width:100%;
+ border-bottom:2rpx solid rgba(216, 216, 216, 0.2);
+ tr{
+ &.title{
+ font-size:24rpx;
+ }
+ &.value{
+ color:#10C176;
+ font-size:32rpx;
+ font-weight: bold;
+ }
+ }
+ }
+ .article{
+ display:flex;
+ align-items: center;
+ padding-top:20rpx;
+ text{
+ &:before{
+ color:#31C888;
+ margin-right:14rpx;
+ }
+ &.line{
+ width:5rpx;
+ height: 52rpx;
+ background:rgba(216, 216, 216, 0.2);
+ margin:0 30rpx 0 auto;
+ }
+ }
+ }
+ }
&.mana{
width:calc(50% - 46rpx);
flex-shrink: 0;
@@ -272,7 +307,21 @@
-
+
+
+ 地块个数(个) | 地块面积(亩) | 在种品种(种) | 在种面积(亩) |
+ {{massif.plotNum}} | {{massif.totalArea}} | {{massif.plantArea}} | {{massif.productCount}} |
+
+
+
+
+
+ 库存
+ 采购
+
+
+
+
@@ -318,7 +367,7 @@
-
+
{{$store.state.baseInfo.name||'基地管理'}} 切换基地
@@ -362,7 +411,7 @@
\ No newline at end of file
diff --git a/pages/home/newsDetail.vue b/pages/home/newsDetail.vue
new file mode 100644
index 0000000..adaea01
--- /dev/null
+++ b/pages/home/newsDetail.vue
@@ -0,0 +1,88 @@
+
+
+
+
+ 基本信息 推送时间:2023-02-28 10:23:56
+
+
+ 品种名称 阳光玫瑰
+
+
+ 作物类型 葡萄
+
+
+ 生长过程 发芽
+
+
+ 病虫害部位 根、茎
+
+
+ 显著症状 变色
+
+
+ 推荐农资 水溶肥、复合肥、氮肥
+
+
+ 推荐理由 由于叶子部位病变需要使用水溶肥内容这里是产品介绍内容这里是产品介绍内容这里是产品介绍内容这里是产品介绍内容这里是产品介绍内容
+
+
+
+
\ No newline at end of file
diff --git a/pages/massif/add_farming.vue b/pages/massif/add_farming.vue
index 99924c0..3943dd2 100644
--- a/pages/massif/add_farming.vue
+++ b/pages/massif/add_farming.vue
@@ -208,7 +208,7 @@
操作 病虫害记录
- 过程:{{formData.farmPests.growthProcessLabel}},病虫害部位:{{formData.farmPests.pestSite}},症状:{{formData.farmPests.symptomLabel}}({{formData.farmPests.pestName}})
+ 过程:{{formData.farmPests.growthProcessLabel}},病虫害部位:{{formData.farmPests.pestSite}},症状:{{formData.farmPests.symptomLabel}}({{formData.farmPests.pestName.map(v=>v.name).join(',')}})
@@ -355,7 +355,8 @@ export default {
method:"post",
body:{
...this.formData,
- images: this.fields.images.value
+ images: this.fields.images.value,
+ farmPests: Object.assign(this.formData.farmPests||{},{pestName:this.formData.farmPests?.pestName?.map?.(v=>v.id).join(",")||''})
}
})
if(res.statu){
diff --git a/pages/massif/mana/farmRecord.vue b/pages/massif/mana/farmRecord.vue
index bcfb4c3..2e3baa1 100644
--- a/pages/massif/mana/farmRecord.vue
+++ b/pages/massif/mana/farmRecord.vue
@@ -138,10 +138,10 @@
+添加农事
-
+
- {{v.type}} {{v.inputName}} {{v.inputTotal||0}}{{v.unit}}
+ {{v.type}} {{v.inputName}} {{v.inputTotal||0}}{{v.unit}}
{{v.growthProcess}}
@@ -233,7 +233,26 @@ export default {
})
}
}
- }
+ },
+ async toDetail(id){
+ var res=await request("/api/plantFarming/queryFarmDetailByFarmId",{
+ params:{id}
+ })
+ if(res.statu){
+ uni.navigateTo({
+ url:`/pages/home/newsDetail?id=${id}&intoPage=farming`,
+ success(res){
+ // res.ev
+ }
+ })
+ }else{
+ uni.showModal({
+ title:"提示",
+ content:res.msg||"获取农事详情失败!",
+ showCancel:false,
+ })
+ }
+ },
}
}
\ No newline at end of file
diff --git a/pages/massif/myPlant.vue b/pages/massif/myPlant.vue
new file mode 100644
index 0000000..2fc0cf8
--- /dev/null
+++ b/pages/massif/myPlant.vue
@@ -0,0 +1,234 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{v.plantStandard}} {{v.varietyName}}
+
+ 种植批次号:{{v.plantBatch}}
+ 已采收:{{v.harvested}}kg
+
+ {{v.plantArea}}
+ 农事操作{{v.farmNum||0}}次
+
+
+
+
+ 预估采收日期:{{v.harvestTime}}
+
+ 已结束
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/massif/pestRecord.vue b/pages/massif/pestRecord.vue
index a2a5ca9..b9fc1ae 100644
--- a/pages/massif/pestRecord.vue
+++ b/pages/massif/pestRecord.vue
@@ -14,7 +14,7 @@
:field="k"
v-bind="v"
:required="!!rules[k]"
- :value="/^checkBox$/.test(v.type)?fields[k].value:formData[k]"
+ :value="/^checkBox$|^navigate$/.test(v.type)?fields[k].value:formData[k]"
@input="formData[k]=$event"
@checkBox="fields[k].value=$event;formData[k]=$event.join(',')"
@select="formData[k]=$event[0].value;fields[k].value=$event[0].label"
@@ -32,7 +32,16 @@ export default {
pestSite:{label:"病虫害部位",type:"checkBox",value:[],columns:[{label:"根",value:"根"},{label:"茎",value:"茎"},{label:"叶",value:"叶"}]},
growthProcess:{label:"作物生长过程",type:"select-tab",dictCode:"growth_process"},
symptom:{label:"显著症状",type:"select-tab",dictCode:"symptom"},
- pestName:{label:"害虫名称",type:"navigate",btnFun:()=>uni.navigateTo({url:"/pages/massif/pestType",events:{type:e=>this.formData.pestName=e}})},
+ pestName:{label:"害虫名称",type:"navigate",value:"",btnFun:()=>uni.navigateTo({
+ url:"/pages/massif/pestType",
+ events:{type:e=>{
+ this.formData.pestName=e
+ this.fields.pestName.value=e.map(v=>v.name).join(",")
+ }},
+ success:res=>{
+ res.eventChannel.emit("ids",this.formData.pestName)
+ }
+ })},
medicationArea:{label:"农资作用面积",type:"digit",suffix:"亩"},
pic:{label:"凭证",type:"upImg",value:""},
description:{label:"病虫害描述",type:"textarea"},
@@ -41,7 +50,7 @@ export default {
growthProcess:'',
pestSite:'',
symptom:"",
- pestName:"",
+ pestName:[],
medicationArea:"",
pic:[],
description:"",
@@ -50,7 +59,7 @@ export default {
growthProcess:{required:true,message:"请选择作物生长过程!",trigger:['blur','change']},
pestSite:{required:true,message:"请选择病虫害部位!",trigger:['blur','change']},
symptom:{required:true,message:"请选择显著症状!",trigger:['blur','change']},
- pestName:{required:true,message:"请选择害虫!",trigger:['blur','change']},
+ pestName:{required:true,message:"请选择害虫!",type:"array",trigger:['blur','change']},
medicationArea:{required:true,message:"请输入农资作用面积!",type:"number",trigger:['blur','change']},
pic:{required:true,validator:(rule,val,call)=>{
if(!this.fields.pic.value)call(new Error("请选择凭证!"));
@@ -67,6 +76,7 @@ export default {
this.fields.pestSite.value=e?.pestSite?.split?.(",")?.filter?.(v=>v)||[]
this.fields.growthProcess.value=e?.growthProcessLabel||""
this.fields.symptom.value=e?.symptomLabel||""
+ this.fields.pestName.value=e?.pestName?.map(v=>v.name).join(',')
this.formData=Object.assign(this.formData,{
...e,
pic:e?.pic?.split?.(",")?.filter?.(v=>v)||[]
diff --git a/pages/massif/pestType.vue b/pages/massif/pestType.vue
index 1e3030f..1a049ad 100644
--- a/pages/massif/pestType.vue
+++ b/pages/massif/pestType.vue
@@ -112,7 +112,7 @@
害虫种类
- {{v}}
+ {{v.name}}
@@ -134,7 +134,7 @@ export default {
value:"",//选择的农产品
search:"",
},
- select:"",
+ select:[],
eventChannel:null,
show:false,
}
@@ -146,6 +146,7 @@ export default {
},
onLoad(){
this.eventChannel=this.getOpenerEventChannel()
+ this.eventChannel.on("ids",e=>this.select=e)
this.init()
},
methods:{
@@ -168,7 +169,6 @@ export default {
async inputSearch(){
if(this.searchVal.search){
this.searchVal.value=""
- this.select=""
var res=await request("/api/plantFarming/getPestByLike",{
params: {
@@ -191,7 +191,6 @@ export default {
async agrSearch(e){
if(e){
this.searchVal={ value:e, search:"" }
- this.select=""
if(typeof e=='string'){
var res=await request("/api/plantFarming/getPestByLike",{
params: {
@@ -215,7 +214,7 @@ export default {
}
},
submit(){
- if(this.select){
+ if(this.select.length>0){
this.eventChannel.emit("type", this.select)
uni.navigateBack()
}else{
@@ -244,6 +243,13 @@ export default {
})
}
},
+ selectPest(e){
+ if(this.select.some(v=>v.id==e.id)){
+ this.select=this.select.filter(v=>v.id!=e.id)
+ }else{
+ this.select.push(e)
+ }
+ },
}
}
\ No newline at end of file
diff --git a/router/home.js b/router/home.js
index 40ec315..8c20824 100644
--- a/router/home.js
+++ b/router/home.js
@@ -66,4 +66,26 @@ module.exports=[
}
}
},
+ {
+ path:"pages/home/news",
+ style:{
+ navigationBarTitleText:"消息",
+ navigationBarBackgroundColor:"#10C176",
+ navigationBarTextStyle:"white",
+ "app-plus":{
+ titleNView:true
+ }
+ }
+ },
+ {
+ path:"pages/home/newsDetail",
+ style:{
+ navigationBarTitleText:"",
+ navigationBarBackgroundColor:"#10C176",
+ navigationBarTextStyle:"white",
+ "app-plus":{
+ titleNView:true
+ }
+ }
+ },
]
\ No newline at end of file
diff --git a/router/massif.js b/router/massif.js
index 6051dba..76bcd91 100644
--- a/router/massif.js
+++ b/router/massif.js
@@ -143,4 +143,15 @@ module.exports=[
}
}
},
+ {
+ path:"pages/massif/myPlant",
+ style:{
+ navigationBarTitleText:"我的种植",
+ navigationBarBackgroundColor:"#10C176",
+ navigationBarTextStyle:"white",
+ "app-plus":{
+ titleNView:true,
+ }
+ }
+ },
]
\ No newline at end of file
diff --git a/store/index.js b/store/index.js
index 5f57f90..7de52c5 100644
--- a/store/index.js
+++ b/store/index.js
@@ -6,7 +6,6 @@ export default new Vuex.Store({
state:{
userInfo:{},
token:"",
- plantBaseInfoId:"",
baseInfo:{
id:"",
name:"",
diff --git a/uni.scss b/uni.scss
index 4e15ff2..00efe57 100644
--- a/uni.scss
+++ b/uni.scss
@@ -77,7 +77,7 @@ $uni-font-size-paragraph:15px;
@import '@/common/main.css';
@import 'uview-ui/theme.scss';
-@import url('https://at.alicdn.com/t/c/font_3852037_8frcz777lb4.css');
+@import url('https://at.alicdn.com/t/c/font_3852037_huussxt3ujw.css');
[class*=plant-]{
font-family: "plantMana" !important;
font-size: 16px;
diff --git a/uni_modules/d-search/components/d-search/d-search.vue b/uni_modules/d-search/components/d-search/d-search.vue
index 7f95890..2e29ede 100644
--- a/uni_modules/d-search/components/d-search/d-search.vue
+++ b/uni_modules/d-search/components/d-search/d-search.vue
@@ -40,36 +40,10 @@
transition: all 0.2s;
opacity:0;
&.show{
- z-index: 320;
+ z-index: 310;
transform: scale(1);
opacity:1;
}
- .title{
- color:#999;
- font-size:24rpx;
- font-weight: normal;
- }
- .content{
- display:flex;
- flex-wrap: wrap;
- margin:14rpx -20rpx -20rpx 0;
- text{
- height:48rpx;
- line-height: 48rpx;
- border-radius: 30rpx;
- width:calc(100%/5 - 20rpx);
- text-align: center;
- font-size:24rpx;
- margin:0 20rpx 20rpx 0;
- transition: all 0.3s;
- color:#999;
- background:#EEEEEE;
- &.active{
- color:#fff;
- background:#10C176;
- }
- }
- }
}
&>.mask{
position:fixed;
@@ -89,20 +63,17 @@
}
-
+
-
+
-
- 猜你想搜
-
- {{v.label}}
-
+
+
-
+