From 4375dc32762e17547725129e64b47933f5a3b5ff Mon Sep 17 00:00:00 2001
From: jia <1451658316@qq.com>
Date: Thu, 7 Dec 2023 09:44:22 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=BA=AF=E6=BA=90=E7=95=8C?=
=?UTF-8?q?=E9=9D=A2=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 4 +-
manifest.json | 222 +++++------
node_modules/.vite/deps/_metadata.json | 6 +-
node_modules/.vite/deps/uview-plus.js | 234 ++++++------
pages.json | 133 ++++++-
pages/Login/login.vue | 2 +-
pages/Login/resgier.vue | 2 +-
pages/addLand/addLand.vue | 484 ------------------------
pages/addLand/addLand1.vue | 504 -------------------------
pages/addLand/addLand2.vue | 403 --------------------
pages/husbandryForm/Pest.vue | 352 ++++++++++-------
pages/husbandryForm/fertilize.vue | 334 ++++++++--------
pages/husbandryForm/harvest.vue | 312 ---------------
pages/husbandryForm/irrigate.vue | 76 ++--
pages/husbandryForm/sow.vue | 29 +-
pages/husbandryForm/weeding.vue | 299 +++++++--------
pages/index/index.vue | 100 +++--
pages/index/massif.vue | 86 ++---
pages/index/personal.vue | 7 +-
19 files changed, 1036 insertions(+), 2553 deletions(-)
delete mode 100644 pages/addLand/addLand.vue
delete mode 100644 pages/addLand/addLand1.vue
delete mode 100644 pages/addLand/addLand2.vue
delete mode 100644 pages/husbandryForm/harvest.vue
diff --git a/App.vue b/App.vue
index ab62577..11071ef 100644
--- a/App.vue
+++ b/App.vue
@@ -18,7 +18,9 @@
\ No newline at end of file
diff --git a/pages/addLand/addLand1.vue b/pages/addLand/addLand1.vue
deleted file mode 100644
index 4b1ac1f..0000000
--- a/pages/addLand/addLand1.vue
+++ /dev/null
@@ -1,504 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 土地图片
-
-
-
-
-
-
-
-
-
- 点击上传图片
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 完成添加
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/addLand/addLand2.vue b/pages/addLand/addLand2.vue
deleted file mode 100644
index f7db278..0000000
--- a/pages/addLand/addLand2.vue
+++ /dev/null
@@ -1,403 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 土地图片
-
-
-
-
-
-
-
-
-
- 点击上传图片
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 提交
-
-
-
-
\ No newline at end of file
diff --git a/pages/husbandryForm/Pest.vue b/pages/husbandryForm/Pest.vue
index 1844e52..820df75 100644
--- a/pages/husbandryForm/Pest.vue
+++ b/pages/husbandryForm/Pest.vue
@@ -3,59 +3,68 @@
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 杀虫图片
+ 疫苗图片
-
-
+
+
@@ -80,16 +89,20 @@
-
-
-
+
+
+
+
+
完成添加
@@ -113,17 +126,79 @@
} from "vue";
import {
onLoad,
- onReady
- } from '@dcloudio/uni-app';
+ onReady,
+
+ } from "@dcloudio/uni-app"
+
import {
addaction
} from '@/api/api.js'
+ const range = reactive([{
+ value: 1,
+ name: "猪瘟疫苗"
+ },
+ {
+ value: 2,
+ name: "禽流感疫苗"
+ },
+ {
+ value: 3,
+ name: "口蹄疫疫苗"
+ },
+ {
+ value: 4,
+ name: "蓝耳病疫苗"
+ }, {
+ value: 5,
+ name: "新城疫疫苗"
+ }, {
+ value: 6,
+ name: "弓形虫病疫苗"
+ }, {
+ value: 7,
+ name: "猪乙型脑炎疫苗"
+ }, {
+ value: 8,
+ name: "禽痘疫苗"
+ }, {
+ value: 9,
+ name: "炭痘疫苗"
+ }, {
+ value: 10,
+ name: "布鲁氏菌病疫苗"
+ },
+ {
+ value: 11,
+ name: "结核病疼苗"
+ },
+ ])
+ const range1 = reactive([{
+ value: 1,
+ text: "肌肉注射"
+ },
+ {
+ value: 2,
+ text: "皮下注射",
+ }
+ ])
+ const range2 = reactive([{
+ value: 1,
+ text: "颈部",
+
+ },
+ {
+ value: 2,
+ text: "大腿"
+ }
+ ])
+ const task_id = ref('');
const pic = reactive([]);
const calendar = ref(null)
const calendar1 = ref(null)
+ const formDatatype = ref('')
+ const showgg = ref(false)
const form = ref(null)
- const task_id = ref('');
const value1 = ref(Date.now());
const show1 = ref(false);
const show2 = ref(false);
@@ -132,58 +207,56 @@
show1.value = true
}
const openDate1 = () => {
- // calendar1.value.open()
+ // calendar.value.open()
show2.value = true
}
+ const formatter = (type, value) => {
+ if (type === 'year') {
+ return `${value}年`;
+ }
+ if (type === 'month') {
+ return `${value}月`;
+ }
+ if (type === 'day') {
+ return `${value}日`;
+ }
+ return value;
+ };
// console.log()
const formData = reactive({
- kind: "",
- breed: "",
- dosage: "",
- start_date: "",
- dosage: "",
- end_date: "",
+ type: "",
+
+
})
-const formatter = (type, value) => {
- if (type === 'year') {
- return `${value}年`;
- }
- if (type === 'month') {
- return `${value}月`;
- }
- if (type === 'day') {
- return `${value}日`;
- }
- return value;
-};
-//获取时间
+ //获取灌溉参数
+
+ const ggSelect = (e) => {
+ formDatatype.value = e.name
+ formData.type = e.value
+ }
+
+ //打开灌溉弹窗
+ const showggai = () => {
+ showgg.value = true
+ }
+
+ //获取时间
const dateConfirmfn = (e) => {
formData.start_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
show1.value = false
}
+//获取时间
const dateConfirmfn1 = (e) => {
- formData.end_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
- show2.value = false
+ formData.start_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
+ show1.value = false
}
- const rules = ref({
- 'kind': {
- type: 'string',
+ const rules = {
+ 'type': {
+ type: 'number',
required: true,
- message: '请填写杀虫剂品牌',
- trigger: ['blur', 'change']
- },
- 'breed': {
- type: 'string',
- required: true,
- message: '请填写杀虫剂品牌',
- trigger: ['blur', 'change']
- },
- 'dosage': {
- type: 'string',
- required: true,
- message: '请填写杀虫剂用量',
- trigger: ['blur', 'change']
+ message: '请选择灌溉方式',
+ trigger: ['change']
},
'start_date': {
type: 'string',
@@ -215,11 +288,53 @@ const formatter = (type, value) => {
message: '请填写备注',
trigger: ['blur', 'change']
},
- })
+ }
onReady(() => {
form.value.setRules(rules);
});
+ const navgo = (url) => {
+ uni.navigateTo({
+ url
+ })
+ }
+ const addFn = () => {
+ // console.log(formData)
+ form.value.validate().then(res => {
+ if (res) {
+ formData.pic = pic
+ let data1 = {
+ plant_id: task_id.value,
+ type: 3,
+ detail: JSON.stringify(formData)
+ };
+ if (formData.pic.length == 0) {
+ uni.$u.toast('请上传图片')
+ return
+ }
+
+
+
+ // 表单验证通过,执行提交操作
+
+ addaction(data1).then((res) => {
+ console.log(res)
+ if (res.code == 1) {
+ uni.$u.toast(res.msg)
+ uni.navigateBack({
+ delta: 1
+ })
+ }
+ })
+ // uni.$u.toast('校验成功')
+ }
+ }).catch((err) => {
+ uni.$u.toast(err[0].message)
+ console.log(err)
+ })
+
+
+ }
//查看图片
const perviewFn = (url) => {
console.log(url)
@@ -266,59 +381,6 @@ const formatter = (type, value) => {
// data.formData.pic = res.data.image
}
-
- const navgo = (url) => {
- uni.navigateTo({
- url
- })
- }
-
- const addFn = () => {
- form.value.validate().then(res => {
- console.log(res)
- if (res) {
-
-
-
-
- formData.pic = pic
- let data1 = {
- plant_id: task_id.value,
- type: 4,
- detail: JSON.stringify(formData)
- };
- if (formData.pic.length == 0) {
-
- uni.$u.toast('请上传图片')
- return
- }
-
- console.log('表单通过');
-
- // 表单验证通过,执行提交操作
-
- addaction(data1).then((res) => {
- console.log(res)
- if (res.code == 1) {
- uni.$u.toast(res.msg)
- uni.navigateBack({
- delta: 1
- })
- }
- })
- // uni.$u.toast('校验成功')
- }
-
- }).catch((err)=>{
- uni.$u.toast(err[0].message)
- console.log(err)
- })
-
-
-
- }
-
-
const mode = ref('add')
onLoad((options) => {
if (options.task) {
@@ -326,15 +388,14 @@ const formatter = (type, value) => {
console.log(data, data.detail)
Object.assign(formData, data.detail);
pic.splice(0, pic.length, ...data.detail.pic);
-
+ formDatatype.value = range.find(item => item.value === formData.type).name;
mode.value = 'detail'
uni.setNavigationBarTitle({
- title: '虫害防治信息详情'
+ title: '灌溉详情'
})
// formData=data.detail
-
} else {
task_id.value = options.id
}
@@ -345,6 +406,9 @@ const formatter = (type, value) => {
\ No newline at end of file
diff --git a/pages/husbandryForm/irrigate.vue b/pages/husbandryForm/irrigate.vue
index 1935093..6d57fba 100644
--- a/pages/husbandryForm/irrigate.vue
+++ b/pages/husbandryForm/irrigate.vue
@@ -3,44 +3,50 @@
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
-
+
-
-
-
+
-
+
-
-
+
- 灌溉图片
+ 消毒图片
-
-
-
-
+
+
+
+
@@ -121,15 +124,15 @@
} from '@/api/api.js'
const range = reactive([{
value: 1,
- name: "喷灌"
+ name: "栏舍"
},
{
value: 2,
- name: "滴灌"
+ name: "词料槽"
},
{
value: 3,
- name: "沟灌"
+ name: "饮水设备"
},
])
const task_id = ref('');
@@ -141,15 +144,12 @@
const form = ref(null)
const value1 = ref(Date.now());
const show1 = ref(false);
- const show2 = ref(false);
+
const openDate = () => {
// calendar.value.open()
show1.value = true
}
- const openDate1 = () => {
- // calendar1.value.open()
- show2.value = true
- }
+
const formatter = (type, value) => {
if (type === 'year') {
return `${value}年`;
@@ -186,10 +186,7 @@
formData.start_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
show1.value = false
}
- const dateConfirmfn1 = (e) => {
- formData.end_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
- show2.value = false
- }
+
const rules = {
'type': {
type: 'number',
@@ -355,6 +352,9 @@