|
@@ -1,9 +1,7 @@
|
|
|
<template>
|
|
<template>
|
|
|
<z-paging ref="paging" v-model="list" bgColor="#f7f7f7" @query="query" safe-area-inset-bottom>
|
|
<z-paging ref="paging" v-model="list" bgColor="#f7f7f7" @query="query" safe-area-inset-bottom>
|
|
|
<template #top>
|
|
<template #top>
|
|
|
- <ut-navbar title="添加管理记录" :fixed="false">
|
|
|
|
|
- <template #left><view class=""></view></template>
|
|
|
|
|
- </ut-navbar>
|
|
|
|
|
|
|
+ <ut-navbar title="添加管理记录" :fixed="false"></ut-navbar>
|
|
|
</template>
|
|
</template>
|
|
|
<view class="pt-24">
|
|
<view class="pt-24">
|
|
|
<up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules" labelWidth="auto" ref="upFormRef">
|
|
<up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules" labelWidth="auto" ref="upFormRef">
|
|
@@ -25,9 +23,8 @@
|
|
|
</view>
|
|
</view>
|
|
|
</ut-datetime-picker>
|
|
</ut-datetime-picker>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
-
|
|
|
|
|
<!-- 操作类型 -->
|
|
<!-- 操作类型 -->
|
|
|
- <ut-action-sheet v-model="form.operationType" :tabs="operationTypeOptions" title="选择操作类型">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.operationType" :tabs="operationTypeOptions" title="选择操作类型" mode="custom">
|
|
|
<up-form-item borderBottom label="操作类型" required prop="operationType" id="operationTypepppp">
|
|
<up-form-item borderBottom label="操作类型" required prop="operationType" id="operationTypepppp">
|
|
|
<view v-if="form.operationType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(operationTypeOptions, form.operationType) }}</view>
|
|
<view v-if="form.operationType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(operationTypeOptions, form.operationType) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择操作类型</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择操作类型</view>
|
|
@@ -36,18 +33,19 @@
|
|
|
</template>
|
|
</template>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</ut-action-sheet>
|
|
</ut-action-sheet>
|
|
|
- <up-form-item :borderBottom="false" label="种养殖所在基地" required prop="baseId" id="baseIdpppp">
|
|
|
|
|
- <view v-if="!deawerData" class="w-100% d-flex a-c j-c pd-24 b-radius bg-#FBFDFB border-#AFDDBB" @click="openDrawer">
|
|
|
|
|
|
|
+ <!-- 操作地块 -->
|
|
|
|
|
+ <up-form-item :borderBottom="false" label="操作地块" required prop="baseId" id="baseIdpppp">
|
|
|
|
|
+ <view v-if="!deawerData" class="w-100% d-flex a-c j-c pd-24 b-radius bg-#FBFDFB border-#AFDDBB" @click="goSelectBase()">
|
|
|
<view class=""></view>
|
|
<view class=""></view>
|
|
|
- <view class="f-s-34 c-primary">请选择种养殖所在的基地</view>
|
|
|
|
|
|
|
+ <view class="f-s-34 c-primary">请选择操作地块</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="w-100%" v-else>
|
|
<view class="w-100%" v-else>
|
|
|
- <Baseinfo :modeValue="deawerData" @close="handleBaseinfoClose" :baseType="form.taskType" />
|
|
|
|
|
|
|
+ <Baseinfo :modeValue="deawerData" @close="handleBaseinfoClose" :baseType="'1'" />
|
|
|
</view>
|
|
</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
<!-- 操作方式 -->
|
|
<!-- 操作方式 -->
|
|
|
<up-form-item borderBottom label="操作方式" required prop="operationMethod" id="operationMethodpppp">
|
|
<up-form-item borderBottom label="操作方式" required prop="operationMethod" id="operationMethodpppp">
|
|
|
- <up-input v-model="form.operationMethod" placeholder="请输入操作方式" border="none"></up-input>
|
|
|
|
|
|
|
+ <up-input v-model="form.operationMethod" placeholder="如:人工锄草、机械中耕、喷雾器叶面喷施等" border="none"></up-input>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
|
|
|
|
|
<!-- 记录人 -->
|
|
<!-- 记录人 -->
|
|
@@ -63,8 +61,11 @@
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
|
|
|
|
|
<!-- 备注 -->
|
|
<!-- 备注 -->
|
|
|
- <up-form-item borderBottom label="备注" prop="remark" id="remarkpppp">
|
|
|
|
|
- <up-input v-model="form.remark" placeholder="请输入备注" border="none"></up-input>
|
|
|
|
|
|
|
+ <up-form-item borderBottom label="备注/说明" prop="remark" id="remarkpppp">
|
|
|
|
|
+ <up-input v-model="form.remark" placeholder="如:“防治阔叶杂草”、“花期追肥”" border="none"></up-input>
|
|
|
|
|
+ </up-form-item>
|
|
|
|
|
+ <up-form-item label="过程图片" prop="technicalFile" borderBottom id="technicalFilepppp">
|
|
|
|
|
+ <ut-upload v-model="form.technicalFile" :max-count="9" valueType="array" accept="image"></ut-upload>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
</up-form>
|
|
</up-form>
|
|
@@ -81,6 +82,7 @@
|
|
|
import { ref, reactive, computed, getCurrentInstance, type ComponentInternalInstance } from 'vue';
|
|
import { ref, reactive, computed, getCurrentInstance, type ComponentInternalInstance } from 'vue';
|
|
|
import { useClientRequest } from '@/utils/request';
|
|
import { useClientRequest } from '@/utils/request';
|
|
|
import { useInfoStore } from '@/store';
|
|
import { useInfoStore } from '@/store';
|
|
|
|
|
+import Baseinfo from '../models/baseinfo.vue';
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
const { yes_no } = toRefs<any>(proxy?.useDict('yes_no'));
|
|
const { yes_no } = toRefs<any>(proxy?.useDict('yes_no'));
|
|
|
const deawerData = ref();
|
|
const deawerData = ref();
|
|
@@ -96,8 +98,9 @@ const form = ref({
|
|
|
recorder: infoStore.userInfo?.name,
|
|
recorder: infoStore.userInfo?.name,
|
|
|
useMaterial: '0' as '0' | '1',
|
|
useMaterial: '0' as '0' | '1',
|
|
|
remark: '',
|
|
remark: '',
|
|
|
|
|
+ technicalFile: '',
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+const baseId = ref('');
|
|
|
// 操作类型选项(示例,可以根据实际需求调整)
|
|
// 操作类型选项(示例,可以根据实际需求调整)
|
|
|
const operationTypeOptions = ref([
|
|
const operationTypeOptions = ref([
|
|
|
{ label: '浇水', value: '1' },
|
|
{ label: '浇水', value: '1' },
|
|
@@ -142,13 +145,6 @@ const rules = reactive({
|
|
|
remark: [{ required: false, message: '请输入备注' }],
|
|
remark: [{ required: false, message: '请输入备注' }],
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-// 字典标签选择函数(从 port-create 复制)
|
|
|
|
|
-const selectDictLabel = (dict: any[], value: any) => {
|
|
|
|
|
- if (!dict || dict.length === 0) return '';
|
|
|
|
|
- const item = dict.find((item) => item.value === value);
|
|
|
|
|
- return item ? item.label : '';
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
const paging = ref();
|
|
const paging = ref();
|
|
|
const list = ref();
|
|
const list = ref();
|
|
|
const upFormRef = ref<any>();
|
|
const upFormRef = ref<any>();
|
|
@@ -240,4 +236,15 @@ const saveDraft = () => {
|
|
|
true,
|
|
true,
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|
|
|
|
|
+//去操作地块页面选择地块
|
|
|
|
|
+const goSelectBase = () => {
|
|
|
|
|
+ uni.$once('updatelands', function (data) {
|
|
|
|
|
+ deawerData.value = data;
|
|
|
|
|
+ console.log(deawerData.value, 'deawerData.value');
|
|
|
|
|
+ });
|
|
|
|
|
+ uni.$u.route({ type: 'navigateTo', url: '/tools/supervise-plot/index', params: { baseId: baseId.value } });
|
|
|
|
|
+};
|
|
|
|
|
+onLoad((options: any) => {
|
|
|
|
|
+ baseId.value = options?.baseId;
|
|
|
|
|
+});
|
|
|
</script>
|
|
</script>
|