diff --git a/api/api.js b/api/api.js
index 5a89a0c..b5d682d 100644
--- a/api/api.js
+++ b/api/api.js
@@ -3,7 +3,6 @@ import http from "@/utils/http.js";
-
//登录
export const login = (data) => syhttp.post('/login/account', data)
//验证码
@@ -36,6 +35,9 @@ export const addaction = (data) => syhttp.post('/action/add', data)
//添加操作
export const binddevice = (data) => syhttp.post('/land/bind', data)
+//操作具体
+export const listForType = (data) => syhttp.get('/action/listForType', data)
+
//首页
export const lindexist = (data) => syhttp.get('/index/index', data)
//产品列表
diff --git a/pages.json b/pages.json
index ccfd175..bef601d 100644
--- a/pages.json
+++ b/pages.json
@@ -124,6 +124,14 @@
"navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black"
}
+ },{
+ "path": "pages/husbandryForm/detail",
+ "style": {
+ "navigationBarTitleText": "操作详情",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#F4F4F4",
+ "navigationBarTextStyle": "black"
+ }
},
{
"path": "pages/updatePassword/updatePassword",
@@ -144,9 +152,7 @@
"style": {
"navigationStyle": "custom"
}
- }
-
- , {
+ }, {
"path": "pages/Login/resgier",
"style": {
"navigationStyle": "custom"
diff --git a/pages/addLand/addLand.vue b/pages/addLand/addLand.vue
index a85cff2..c4ad637 100644
--- a/pages/addLand/addLand.vue
+++ b/pages/addLand/addLand.vue
@@ -7,34 +7,34 @@
-->
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/pages/husbandryForm/Pest.vue b/pages/husbandryForm/Pest.vue
index 2740eae..aa23870 100644
--- a/pages/husbandryForm/Pest.vue
+++ b/pages/husbandryForm/Pest.vue
@@ -18,22 +18,22 @@
-
+
-
+
-
+
-
+
diff --git a/pages/husbandryForm/fertilize.vue b/pages/husbandryForm/fertilize.vue
index a646afd..25aeeb9 100644
--- a/pages/husbandryForm/fertilize.vue
+++ b/pages/husbandryForm/fertilize.vue
@@ -18,22 +18,22 @@
-
+
-
+
-
+
-
+
diff --git a/pages/husbandryForm/irrigate.vue b/pages/husbandryForm/irrigate.vue
index 48faedf..66fc79c 100644
--- a/pages/husbandryForm/irrigate.vue
+++ b/pages/husbandryForm/irrigate.vue
@@ -6,28 +6,28 @@
-
+
-
+
-
+
-
+
-
+
diff --git a/pages/husbandryForm/sow.vue b/pages/husbandryForm/sow.vue
index e7701b4..8b57208 100644
--- a/pages/husbandryForm/sow.vue
+++ b/pages/husbandryForm/sow.vue
@@ -11,9 +11,9 @@
-
-
+
+
diff --git a/pages/husbandryForm/weeding.vue b/pages/husbandryForm/weeding.vue
index 1eef0ef..dca355e 100644
--- a/pages/husbandryForm/weeding.vue
+++ b/pages/husbandryForm/weeding.vue
@@ -18,22 +18,22 @@
-
+
-
+
-
+
-
+
@@ -303,7 +303,7 @@
onLoad((options) => {
if (options.task) {
let data = options.task ? JSON.parse(decodeURIComponent(options.task)) : null;
- console.log(data, data.detail)
+ // console.log(data, data.detail)
Object.assign(formData, data.detail);
pic.splice(0, pic.length, ...data.detail.pic);
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 8ea566c..cd6222b 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -116,21 +116,18 @@
}
const getlist = () => {
landlist(fomData).then((res) => {
-
if (res.code == 1) {
datalist.splice(0, datalist.length, ...res.data);
-
fomData.page_no += fomData.page_no
-
+
}
+
})
}
const search = () => {
-
getlist()
-
}
@@ -184,7 +181,7 @@
.custom-style {
color: #606266;
- width: 120rpx;
+ width: 140rpx;
border-radius: 30rpx;
margin-top: 10rpx;
margin-right: 20rpx;
diff --git a/pages/index/massif.vue b/pages/index/massif.vue
index 6f2197d..d55589b 100644
--- a/pages/index/massif.vue
+++ b/pages/index/massif.vue
@@ -23,6 +23,7 @@
+
@@ -47,7 +48,7 @@
-
+
暂无信息
@@ -57,6 +58,9 @@
+
+ 记农事
+
@@ -74,9 +78,11 @@
+
+
-
+
@@ -89,7 +95,8 @@
刷新时间: {{getNowTimeFn()}}
-
+
@@ -106,6 +113,16 @@
+
+
+
+
+
+ 暂无数据
+
+
+
+
@@ -118,7 +135,8 @@
刷新时间: {{getNowTimeFn()}}
-
+
@@ -135,16 +153,22 @@
-
-
-
+
+
+
+
@@ -171,8 +195,8 @@
产品编号:
-
+
@@ -186,7 +210,11 @@
+
+
@@ -203,12 +231,33 @@
bindproduct,
lindexist,
landlist,
+ plantlist,
landproduct
} from '@/api/api.js'
-
+ const showPicker = ref(false)
+ const showPicker1 = ref(false)
const showModal = ref(false)
+ const columns1 = reactive([
+ [{
+ label: '施肥',
+ route: "/pages/husbandryForm/fertilize"
+ }, {
+ label: '除草',
+ route: "/pages/husbandryForm/weeding"
+ }, {
+ label: '灌溉',
+ route: "/pages/husbandryForm/irrigate"
+ }, {
+ label: '除虫',
+ route: "/pages/husbandryForm/Pest"
+ }, {
+ label: '收获',
+ route: "/pages/husbandryForm/harvest"
+ }]
+ ]);
+ const columns2 = reactive([])
const range = reactive([])
// 土壤监测数据
const url = ref('https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg')
@@ -259,7 +308,7 @@
])
const dataobj = reactive({})
const tdId = ref('')
-
+ const palntId = ref('')
// 绑定设备
const equipmentId = ref("")
const bindFn = () => {
@@ -273,7 +322,7 @@
// console.log('条码类型:' + res.scanType);
console.log('条码内容:' + res.result.split('='));
uni.navigateTo({
- url:'/pages/landDetail/results?id='+res.result.split('=')[1]
+ url: '/pages/landDetail/results?id=' + res.result.split('=')[1]
})
}
});
@@ -335,9 +384,7 @@
])
onShow(() => {
-
getlist()
-
getlist1()
getlist2()
})
@@ -350,7 +397,7 @@
}).then((res) => {
if (res.code == 1) {
-
+ getlist3(res.data.id)
Object.assign(dataobj, res.data);
if (res.data && res.data.monitor && res.data.monitor.soil_monitor_data) {
@@ -417,7 +464,30 @@
}
})
+
}
+ const getlist3 = (id) => {
+ plantlist({
+ land_id: id
+ }).then((res) => {
+
+ if (res.code == 1) {
+ columns2.splice(0)
+ let arr1 = []
+ arr1.splice(0, arr1.length, ...res.data.map((step, index) => {
+ return {
+ name: step.kind + '-' + step.id,
+ id: step.id,
+ };
+ }));
+ columns2.push(arr1)
+
+ }
+ })
+
+
+ }
+
//关闭弹窗
const closeModal = () => {
showModal.value = false
@@ -440,6 +510,18 @@
console.log(res)
})
}
+ const confirm2 = (e) => {
+ showPicker.value = false
+
+ uni.navigateTo({
+ url: e.value[0].route + '?id=' + palntId.value
+ })
+ }
+ const confirm1 = (e) => {
+ palntId.value = e.value[0].id
+ showPicker1.value = false
+ showPicker.value = true
+ }
const confirm = (e) => {
// console.log(e)
tdId.value = e.id
@@ -461,7 +543,7 @@
const currentTime = formattedHour + ':' + formattedMinute;
return currentTime
}
-
+
const navgo = () => {
uni.navigateTo({
@@ -475,7 +557,7 @@
}
getNowTimeFn()
-