This commit is contained in:
parent
276634fe0b
commit
8720abb0b6
7
App.vue
7
App.vue
|
@ -1,8 +1,13 @@
|
|||
<script>
|
||||
import {
|
||||
userInfoStore
|
||||
} from '@/store/userInfo'
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
console.log('App Launch')
|
||||
const userInfo = userInfoStore()
|
||||
userInfo.saveUserInfo(307)
|
||||
uni.setStorageSync("SY_TOKEN", "dfdf4564557445df4df")
|
||||
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show')
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
import syhttp from "@/utils/syhttp.js";
|
||||
|
||||
/**
|
||||
* 家畜列表
|
||||
*/
|
||||
export const animalListAPI = (data) => syhttp.get('/AnimalBreed/animalList', data)
|
||||
// 监测数据/api
|
||||
export const animalEnvDataAPI = (data) => syhttp.get('/AnimalBreed/animalEnvData', data)
|
||||
// 添加动物
|
||||
export const addAnimalAPI = (data) => syhttp.post('/AnimalBreed/addAnimal', data)
|
||||
// 操作列表
|
||||
export const actionsAPI = (data) => syhttp.get('/user/actions', data)
|
||||
// 操作列表
|
||||
export const animalInfoAPI = (data) => syhttp.get('/AnimalBreed/animalInfo', data)
|
||||
// 操作列表
|
||||
export const animalPicListAPI = (data) => syhttp.get('/AnimalBreed/animalPicList', data)
|
||||
// 上传动物图片
|
||||
export const addAnimalPicAPI = (data) => syhttp.post('/AnimalBreed/addAnimalPic', data)
|
|
@ -0,0 +1,18 @@
|
|||
import syhttp from "@/utils/syhttp.js";
|
||||
|
||||
/**
|
||||
* 家畜列表
|
||||
*/
|
||||
export const animalListAPI = (data) => syhttp.get('/PoultryBreed/poultryList', data)
|
||||
// 监测数据/api
|
||||
export const animalEnvDataAPI = (data) => syhttp.get('/PoultryBreed/poultryEnvData', data)
|
||||
// 添加动物
|
||||
export const addAnimalAPI = (data) => syhttp.post('/PoultryBreed/addPoultry', data)
|
||||
// 操作列表
|
||||
export const actionsAPI = (data) => syhttp.get('/user/actions', data)
|
||||
// 操作列表
|
||||
export const animalInfoAPI = (data) => syhttp.get('/AnimalBreed/animalInfo', data)
|
||||
// 图片列表
|
||||
export const animalPicListAPI = (data) => syhttp.get('/PoultryBreed/poultryPicList', data)
|
||||
// 上传动物图片
|
||||
export const addAnimalPicAPI = (data) => syhttp.post('/PoultryBreed/addPoultryPic', data)
|
|
@ -0,0 +1,6 @@
|
|||
import syhttp from "@/utils/syhttp.js";
|
||||
|
||||
/**
|
||||
* 我的公司
|
||||
*/
|
||||
export const uplodeImgAPI = (data) => syhttp.post('/user/imageUpload', data)
|
|
@ -0,0 +1,22 @@
|
|||
import syhttp from "@/utils/syhttp.js";
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
*/
|
||||
export const userInfoAPI = (data) => syhttp.get('/user/userInfo', data)
|
||||
// 土地详情
|
||||
export const landInfoAPI = (data) => syhttp.get('/LandPlant/landInfo', data)
|
||||
// 添加土地详情
|
||||
export const AddlandInfoAPI = (data) => syhttp.post('/LandPlant/addLandCrop', data)
|
||||
// 添加土地详情
|
||||
export const addLandCropPicAPI = (data) => syhttp.post('/LandPlant/addLandCropPic', data)
|
||||
// 生长记录表
|
||||
export const landCropRecordListAPI = (data) => syhttp.get('/LandPlant/landCropRecordList', data)
|
||||
// 实时监测记录
|
||||
export const landEnvDataCurrAPI = (data) => syhttp.get('/LandPlant/landEnvDataCurr', data)
|
||||
// 标记为成熟
|
||||
export const setLandCropRipeAPI = (data) => syhttp.get('/LandPlant/setLandCropRipe', data)
|
||||
// 种植图片列表
|
||||
export const landCropPicListAPI = (data) => syhttp.get('/LandPlant/landCropPicList', data)
|
||||
// 种植操作列表
|
||||
export const actionsListAPI = (data) => syhttp.get('/user/actions', data)
|
|
@ -1,6 +0,0 @@
|
|||
import syhttp from "@/utils/syhttp.js";
|
||||
|
||||
/**
|
||||
* 我的公司
|
||||
*/
|
||||
export const companyMine = (data) => syhttp.post('/SuYuan/monitorDetail', data)
|
|
@ -21,7 +21,7 @@
|
|||
种植品牌
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="value" @change="change"></up-input>
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="formData.crop_name"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
|
@ -29,7 +29,7 @@
|
|||
具体品种
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="value" @change="change"></up-input>
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="formData.crop_variety"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
|
@ -37,7 +37,7 @@
|
|||
种子品牌
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="value" @change="change"></up-input>
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="formData.crop_brand"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
|
@ -45,22 +45,42 @@
|
|||
种子收购时间
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="点击输入时间" border="surround" v-model="value"
|
||||
<up-input placeholder="点击输入时间" border="surround" v-model="formData.crop_buy_time"
|
||||
@focus="showDatePicker=true"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="card-li-tit">
|
||||
上传播种图片
|
||||
</view>
|
||||
<view class="code-img">
|
||||
<view class="" @click="updateImgFn">
|
||||
<view class="" v-if="formData.pic">
|
||||
<u--image :src="formData.pic" width="637.85rpx" height="350.47rpx"></u--image>
|
||||
</view>
|
||||
<view class="carime-icon" v-else>
|
||||
<u--image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u--image>
|
||||
<view class="">
|
||||
点击上传图片
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
<view class="up-img confim-btn">
|
||||
<!-- <view class="up-img confim-btn">
|
||||
+上传播种图片
|
||||
</view>
|
||||
<view class="today-btn confim-btn" @tap="navgo('/pages/detail/plant')">
|
||||
</view> -->
|
||||
<view class="today-btn confim-btn" @tap="sowFn">
|
||||
今日播种
|
||||
</view>
|
||||
|
||||
<!-- 组件 -->
|
||||
<u-notify ref="uNotify" message="Hi uview-plus"></u-notify>
|
||||
<view class="">
|
||||
<up-calendar :closeOnClickOverlay='true' :show="showDatePicker" @confirm="confirm"
|
||||
@close="showDatePicker=false"></up-calendar>
|
||||
|
@ -68,19 +88,40 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
AddlandInfoAPI
|
||||
} from "@/api/plant.js"
|
||||
import uplodeImg from "@/utils/uplodeImg.js"
|
||||
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from "vue"
|
||||
} from "vue";
|
||||
import {
|
||||
onLoad
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
userInfoStore
|
||||
} from '@/store/userInfo'
|
||||
const userInfo = userInfoStore()
|
||||
|
||||
const uNotify = ref()
|
||||
const show = ref(false)
|
||||
const showDatePicker = ref(false)
|
||||
|
||||
const formData = reactive({
|
||||
brand: "",
|
||||
variety: "",
|
||||
user_id: userInfo.user_id,
|
||||
land_id: "",
|
||||
crop_name: "",
|
||||
crop_variety: "",
|
||||
crop_brand: "",
|
||||
crop_buy_time: "",
|
||||
pic: ""
|
||||
|
||||
})
|
||||
const confirm = (e) => {
|
||||
console.log(e)
|
||||
console.log(e[0])
|
||||
formData.crop_buy_time = e[0]
|
||||
showDatePicker.value = false
|
||||
}
|
||||
const navgo = (url) => {
|
||||
|
@ -88,6 +129,30 @@
|
|||
url
|
||||
})
|
||||
}
|
||||
const updateImgFn = async () => {
|
||||
let res = await uplodeImg()
|
||||
formData.pic = res.data.image
|
||||
// console.log(res.data)
|
||||
}
|
||||
const sowFn = async () => {
|
||||
|
||||
let res = await AddlandInfoAPI({
|
||||
...formData
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}, 2000)
|
||||
|
||||
// show.value = true
|
||||
// uNotify.value.primary('Primary主题')
|
||||
// navgo('/pages/detail/plant')
|
||||
}
|
||||
onLoad((options) => {
|
||||
|
||||
formData.land_id = options.land_id
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
|
@ -129,4 +194,22 @@
|
|||
background: linear-gradient(to right, #00A15E, #4CC593);
|
||||
/* margin: 0 auto; */
|
||||
}
|
||||
|
||||
.code-img {
|
||||
background-color: #F4F4F4;
|
||||
height: 350.47rpx;
|
||||
position: relative;
|
||||
margin-bottom: 100rpx;
|
||||
|
||||
.carime-icon {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
|
@ -1,17 +1,28 @@
|
|||
<template>
|
||||
<view class="">
|
||||
<view class="head-img">
|
||||
|
||||
<view class="">
|
||||
<u--image src="/static/img/GJ.jpg" width="693.93rpx" height=" 394.28rpx" alt=""></u--image>
|
||||
<u--image :src="props.imgUrl" width="693.93rpx" height=" 394.28rpx" alt=""></u--image>
|
||||
</view>
|
||||
<view class="poisition">
|
||||
更新时间: 2023-11-16
|
||||
{{props.text}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from 'vue'
|
||||
import uplodeFn from "@/utils/uplodeImg.js"
|
||||
|
||||
const props = defineProps({
|
||||
imgUrl: String,
|
||||
text: String
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -26,7 +37,6 @@
|
|||
position: absolute;
|
||||
width: 292.64rpx;
|
||||
height: 45rpx;
|
||||
|
||||
background-color: #FFFFFF;
|
||||
left: 21rpx;
|
||||
bottom: 21rpx;
|
||||
|
|
|
@ -3,40 +3,38 @@
|
|||
<view class="card">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
农户名称: 1号土地
|
||||
农户名称: {{userInfo.name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
种养殖类型: 土豆
|
||||
种养殖类型: 养殖户
|
||||
</view>
|
||||
<view class="">
|
||||
养殖头数: 的划分等级
|
||||
养殖头数: {{userInfo.poultry_detail.total_count}}头
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
土地面积: 20亩
|
||||
土地面积:{{userInfo.total_land_area}}亩
|
||||
</view>
|
||||
<view class="">
|
||||
公鸡: 的划分等级
|
||||
公: {{userInfo.poultry_detail.male_count}}头
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖种类: 20亩
|
||||
养殖种类: {{userInfo.poultry_detail.kind[0]}},{{userInfo.poultry_detail.kind[1]}}
|
||||
</view>
|
||||
<view class="">
|
||||
母鸡: 的划分等级
|
||||
母: {{userInfo.poultry_detail.maternal_count}}头
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
具体种类: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
幼崽: 的划分等级
|
||||
具体种类: {{userInfo.poultry_detail.breed[0]}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="circumstance">
|
||||
|
@ -44,77 +42,75 @@
|
|||
<view class="">
|
||||
养殖情况
|
||||
</view>
|
||||
<view class="updata-btn">
|
||||
更新养殖情况
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="card" v-for="item in [1,1,1,]">
|
||||
<view class="card" v-for="(item,index) in animalList" :key="index"
|
||||
@click="navgo(`/pages/poultry/feedDetail?id=${item.id}`)">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
编号: 56565
|
||||
编号: {{item.code}}
|
||||
</view>
|
||||
<view class="" style="color: #00A15E;">
|
||||
<view class="" style="color: #00A15E;" v-if='item.status==1'>
|
||||
健康
|
||||
</view>
|
||||
<view class="" style="color: #FFD736;" v-if='item.status==2'>
|
||||
产蛋期
|
||||
</view>
|
||||
<view class="" style="color: #3274F9;" v-if='item.status==4'>
|
||||
可出栏
|
||||
</view>
|
||||
<view class="" style="color: #F84221;" v-if='item.status==3'>
|
||||
生病隔离中
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖类型: 土豆
|
||||
养殖类型: {{item.kind}}
|
||||
</view>
|
||||
<view class="">
|
||||
年龄: 2年
|
||||
年龄: {{item.age}}年
|
||||
</view>
|
||||
<view class="">
|
||||
体重: 100kg
|
||||
体重: {{item.weight}}kg
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
<view class="check" @click="navgo('/pages/feedIng/feedList')">
|
||||
<view class="check" @click="navgo('/pages/poultry/feedList')">
|
||||
查看全部养殖动物<u--image src="/static/img/CKGD.png" style="margin-left: 5rpx;" width="31.54rpx"
|
||||
height="31.54rpx"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="circumstance">
|
||||
|
||||
|
||||
|
||||
<view class="circumstance" v-for="(item,index) in actionList" :key="index">
|
||||
|
||||
<!-- {{item.action_record}} -->
|
||||
|
||||
<view class="card-tit">
|
||||
<view class="">
|
||||
饲养记录
|
||||
{{index}}
|
||||
</view>
|
||||
<view class="updata-btn">
|
||||
更新饲养记录
|
||||
<view class="updata-btn" @click="navgo('/pages/growRecord/index')">
|
||||
更新{{index.slice(0,-2)}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<myTable tit='查看历史清点记录'></myTable>
|
||||
|
||||
<myTable :tit='`查看${index.slice(0,-2)}`' :dataList="item.action_record" route='/pages/poultry/allRecording'>
|
||||
</myTable>
|
||||
</view>
|
||||
<view class="circumstance">
|
||||
<view class="card-tit">
|
||||
<view class="">
|
||||
副产品记录
|
||||
</view>
|
||||
<view class="updata-btn" style="width: 300rpx;">
|
||||
更新副产品记录
|
||||
</view>
|
||||
</view>
|
||||
<myTable tit='查看历史消毒记录'></myTable>
|
||||
|
||||
</view>
|
||||
<view class="circumstance">
|
||||
<!-- <view class="circumstance">
|
||||
<view class="card-tit">
|
||||
<view class="">
|
||||
消毒情况
|
||||
</view>
|
||||
<view class="updata-btn">
|
||||
<view class="updata-btn" @click="navgo('/pages/growRecord/index')">
|
||||
更新消毒情况
|
||||
</view>
|
||||
</view>
|
||||
<myTable tit='查看历史消毒记录'></myTable>
|
||||
<myTable tit='查看历史消毒记录' route='/pages/poultry/allRecording'></myTable>
|
||||
</view> -->
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
<view class="data">
|
||||
<view class="tit">
|
||||
|
@ -162,76 +158,59 @@
|
|||
reactive
|
||||
} from "vue"
|
||||
import myTable from "@/components/myTable/index.vue"
|
||||
import {
|
||||
onLoad
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
animalListAPI,
|
||||
animalEnvDataAPI,
|
||||
actionsAPI
|
||||
} from "@/api/chick.js"
|
||||
const props = defineProps({
|
||||
userInfo: Object
|
||||
})
|
||||
const userInfo = reactive(props.userInfo)
|
||||
const data = reactive([{
|
||||
tit: "环境温度",
|
||||
icon: 'TRWD',
|
||||
icon: 'WD',
|
||||
dw: "℃",
|
||||
cont: 'soil_temperature',
|
||||
cont: 'hj_temp',
|
||||
flag: false,
|
||||
|
||||
}, {
|
||||
tit: "环境湿度",
|
||||
icon: 'TRSD',
|
||||
icon: 'JYL',
|
||||
dw: "%RH",
|
||||
cont: 'soil_moisture',
|
||||
cont: 'hj_humi',
|
||||
}, {
|
||||
tit: "氧气浓度",
|
||||
icon: 'FX',
|
||||
cont: 'wind_direction',
|
||||
cont: 'o_content',
|
||||
dw: "%",
|
||||
}, {
|
||||
tit: "二氧化碳含量",
|
||||
icon: 'FS',
|
||||
dw: "m/s",
|
||||
cont: 'wind_speed',
|
||||
dw: "mg/L",
|
||||
cont: 'c_content',
|
||||
}, {
|
||||
tit: "光照强度",
|
||||
icon: 'JYL',
|
||||
dw: "mm",
|
||||
cont: 'rainfall',
|
||||
dw: "lux",
|
||||
cont: 'light',
|
||||
}, {
|
||||
tit: "大气压强",
|
||||
icon: 'GZ',
|
||||
dw: "Wlux",
|
||||
cont: 'illumination',
|
||||
dw: "hpa",
|
||||
cont: 'dqy',
|
||||
}, {
|
||||
tit: "有害气体",
|
||||
icon: 'EYHT',
|
||||
dw: "ppm",
|
||||
cont: 'carbon_dioxide_content',
|
||||
cont: 'yhqt',
|
||||
},
|
||||
|
||||
])
|
||||
|
||||
const data2 = reactive([{
|
||||
cont: "气象多要素百叶箱",
|
||||
cont2: "1天/1次",
|
||||
}, {
|
||||
cont: "多功能控制器",
|
||||
cont2: "3个小时/次",
|
||||
}, ])
|
||||
const baseData = reactive({
|
||||
"id": 27,
|
||||
"production_base_id": 1,
|
||||
"soil_temperature": 20,
|
||||
"soil_moisture": 50,
|
||||
"room_temperature": 0,
|
||||
"air_humidity": 0,
|
||||
"air_quality_index": 0,
|
||||
"pond_temperature": 0,
|
||||
"pond_ph_value": 0,
|
||||
"wind_direction": "北",
|
||||
"wind_speed": 3.4,
|
||||
"illumination": 2,
|
||||
"rainfall": 20,
|
||||
"carbon_dioxide_content": 450,
|
||||
"nitrogen_content": 0,
|
||||
"methane_content": 0,
|
||||
"ammonia_nitrogen_content": 0,
|
||||
"nitrite_content": 0,
|
||||
"dissolved_oxygen": 0,
|
||||
"temperature_threshold": 0,
|
||||
"humidity_threshold": 0,
|
||||
"flag": 1
|
||||
|
||||
})
|
||||
const urlFn = (name) => {
|
||||
return `/static/img/${name}.png`
|
||||
|
@ -244,6 +223,32 @@
|
|||
url
|
||||
})
|
||||
}
|
||||
const animalList = reactive([])
|
||||
animalListAPI({
|
||||
user_id: 307,
|
||||
page_no: 1,
|
||||
page_size: 3,
|
||||
}).then(res => {
|
||||
res.data.forEach(item => {
|
||||
animalList.push(item)
|
||||
})
|
||||
console.log(animalList)
|
||||
})
|
||||
animalEnvDataAPI({
|
||||
user_id: 307
|
||||
}).then(res => {
|
||||
for (let key in res.data) {
|
||||
baseData[key] = (res.data)[key]
|
||||
}
|
||||
})
|
||||
const actionList = reactive({})
|
||||
// actionsAPI({
|
||||
// type: 3
|
||||
// }).then(res => {
|
||||
// for (let key in res.data) {
|
||||
// actionList[key] = (res.data)[key]
|
||||
// }
|
||||
// })
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -260,7 +265,8 @@
|
|||
|
||||
.updata-btn {
|
||||
font-size: 26.29rpx;
|
||||
width: 192.76rpx;
|
||||
// width: 192.76rpx;
|
||||
padding: 0 30rpx;
|
||||
height: 57.83rpx;
|
||||
border: 1px solid #00A15E;
|
||||
color: #00A15E;
|
||||
|
|
|
@ -3,40 +3,38 @@
|
|||
<view class="card">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
农户名称: 1号土地
|
||||
农户名称: {{userInfo.name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
种养殖类型: 土豆
|
||||
种养殖类型: 养殖户
|
||||
</view>
|
||||
<view class="">
|
||||
养殖头数: 的划分等级
|
||||
养殖头数: {{userInfo.animal_detail.total_count}}头
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
土地面积: 20亩
|
||||
土地面积:{{userInfo.total_land_area}}亩
|
||||
</view>
|
||||
<view class="">
|
||||
公猪: 的划分等级
|
||||
公: {{userInfo.animal_detail.male_count}}头
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖种类: 20亩
|
||||
养殖种类: {{userInfo.animal_detail.kind[0]}},{{userInfo.animal_detail.kind[1]}}
|
||||
</view>
|
||||
<view class="">
|
||||
母猪: 的划分等级
|
||||
母: {{userInfo.animal_detail.maternal_count}}头
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
具体种类: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
幼崽: 的划分等级
|
||||
具体种类: {{userInfo.animal_detail.breed[0]}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="circumstance">
|
||||
|
@ -44,53 +42,62 @@
|
|||
<view class="">
|
||||
养殖情况
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
<view class="card" v-for="(item,index) in [1,1,1,]" :key="index"
|
||||
@click="navgo('/pages/feedIng/feedDetail')">
|
||||
<view class="card" v-for="(item,index) in animalList" :key="index"
|
||||
@click="navgo(`/pages/feedIng/feedDetail?id=${item.id}`)">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
编号: 56565
|
||||
编号: {{item.animal_code}}
|
||||
</view>
|
||||
<view class="" style="color: #00A15E;">
|
||||
<view class="" style="color: #00A15E;" v-if='item.animal_status==1'>
|
||||
健康
|
||||
</view>
|
||||
<view class="" style="color: #FFD736;" v-if='item.animal_status==2'>
|
||||
怀孕中
|
||||
</view>
|
||||
<view class="" style="color: #3274F9;" v-if='item.animal_status==4'>
|
||||
可出栏
|
||||
</view>
|
||||
<view class="" style="color: #F84221;" v-if='item.animal_status==3'>
|
||||
生病隔离中
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖类型: 土豆
|
||||
养殖类型: {{item.animal_kind}}
|
||||
</view>
|
||||
<view class="">
|
||||
年龄: 2年
|
||||
年龄: {{item.animal_age}}年
|
||||
</view>
|
||||
<view class="">
|
||||
体重: 100kg
|
||||
体重: {{item.animal_weight}}kg
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
<view class="check" @click="navgo('/pages/feedIng/feedList')">
|
||||
查看全部养殖动物<u--image src="/static/img/CKGD.png" style="margin-left: 5rpx;" width="31.54rpx"
|
||||
height="31.54rpx"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="circumstance">
|
||||
|
||||
|
||||
|
||||
<view class="circumstance" v-for="(item,index) in actionList" :key="index">
|
||||
|
||||
<!-- {{item.action_record}} -->
|
||||
|
||||
<view class="card-tit">
|
||||
<view class="">
|
||||
饲养情况
|
||||
{{index}}
|
||||
</view>
|
||||
<view class="updata-btn" @click="navgo('/pages/growRecord/index')">
|
||||
更新饲养情况
|
||||
更新{{index.slice(0,-2)}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<myTable tit='查看历史清点记录' route='/pages/feedIng/allRecording'></myTable>
|
||||
|
||||
<myTable :tit='`查看${index.slice(0,-2)}`' :dataList="item.action_record" route='/pages/feedIng/allRecording'>
|
||||
</myTable>
|
||||
</view>
|
||||
<view class="circumstance">
|
||||
<!-- <view class="circumstance">
|
||||
<view class="card-tit">
|
||||
<view class="">
|
||||
消毒情况
|
||||
|
@ -100,8 +107,10 @@
|
|||
</view>
|
||||
</view>
|
||||
<myTable tit='查看历史消毒记录' route='/pages/feedIng/allRecording'></myTable>
|
||||
</view> -->
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
<view class="data">
|
||||
<view class="tit">
|
||||
|
@ -149,76 +158,59 @@
|
|||
reactive
|
||||
} from "vue"
|
||||
import myTable from "@/components/myTable/index.vue"
|
||||
import {
|
||||
onLoad
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
animalListAPI,
|
||||
animalEnvDataAPI,
|
||||
actionsAPI
|
||||
} from "@/api/animal.js"
|
||||
const props = defineProps({
|
||||
userInfo: Object
|
||||
})
|
||||
const userInfo = reactive(props.userInfo)
|
||||
const data = reactive([{
|
||||
tit: "环境温度",
|
||||
icon: 'TRWD',
|
||||
icon: 'WD',
|
||||
dw: "℃",
|
||||
cont: 'soil_temperature',
|
||||
cont: 'hj_temp',
|
||||
flag: false,
|
||||
|
||||
}, {
|
||||
tit: "环境湿度",
|
||||
icon: 'TRSD',
|
||||
icon: 'JYL',
|
||||
dw: "%RH",
|
||||
cont: 'soil_moisture',
|
||||
cont: 'hj_humi',
|
||||
}, {
|
||||
tit: "氧气浓度",
|
||||
icon: 'FX',
|
||||
cont: 'wind_direction',
|
||||
cont: 'o_content',
|
||||
dw: "%",
|
||||
}, {
|
||||
tit: "二氧化碳含量",
|
||||
icon: 'FS',
|
||||
dw: "m/s",
|
||||
cont: 'wind_speed',
|
||||
dw: "mg/L",
|
||||
cont: 'c_content',
|
||||
}, {
|
||||
tit: "光照强度",
|
||||
icon: 'JYL',
|
||||
dw: "mm",
|
||||
cont: 'rainfall',
|
||||
dw: "lux",
|
||||
cont: 'light',
|
||||
}, {
|
||||
tit: "大气压强",
|
||||
icon: 'GZ',
|
||||
dw: "Wlux",
|
||||
cont: 'illumination',
|
||||
dw: "hpa",
|
||||
cont: 'dqy',
|
||||
}, {
|
||||
tit: "有害气体",
|
||||
icon: 'EYHT',
|
||||
dw: "ppm",
|
||||
cont: 'carbon_dioxide_content',
|
||||
cont: 'yhqt',
|
||||
},
|
||||
|
||||
])
|
||||
|
||||
const data2 = reactive([{
|
||||
cont: "气象多要素百叶箱",
|
||||
cont2: "1天/1次",
|
||||
}, {
|
||||
cont: "多功能控制器",
|
||||
cont2: "3个小时/次",
|
||||
}, ])
|
||||
const baseData = reactive({
|
||||
"id": 27,
|
||||
"production_base_id": 1,
|
||||
"soil_temperature": 20,
|
||||
"soil_moisture": 50,
|
||||
"room_temperature": 0,
|
||||
"air_humidity": 0,
|
||||
"air_quality_index": 0,
|
||||
"pond_temperature": 0,
|
||||
"pond_ph_value": 0,
|
||||
"wind_direction": "北",
|
||||
"wind_speed": 3.4,
|
||||
"illumination": 2,
|
||||
"rainfall": 20,
|
||||
"carbon_dioxide_content": 450,
|
||||
"nitrogen_content": 0,
|
||||
"methane_content": 0,
|
||||
"ammonia_nitrogen_content": 0,
|
||||
"nitrite_content": 0,
|
||||
"dissolved_oxygen": 0,
|
||||
"temperature_threshold": 0,
|
||||
"humidity_threshold": 0,
|
||||
"flag": 1
|
||||
|
||||
})
|
||||
const urlFn = (name) => {
|
||||
return `/static/img/${name}.png`
|
||||
|
@ -231,6 +223,32 @@
|
|||
url
|
||||
})
|
||||
}
|
||||
const animalList = reactive([])
|
||||
animalListAPI({
|
||||
user_id: 307,
|
||||
page_no: 1,
|
||||
page_size: 3,
|
||||
}).then(res => {
|
||||
res.data.forEach(item => {
|
||||
animalList.push(item)
|
||||
})
|
||||
})
|
||||
animalEnvDataAPI({
|
||||
user_id: 307
|
||||
}).then(res => {
|
||||
for (let key in res.data) {
|
||||
baseData[key] = (res.data)[key]
|
||||
}
|
||||
})
|
||||
const actionList = reactive({})
|
||||
actionsAPI({
|
||||
type: 3
|
||||
}).then(res => {
|
||||
for (let key in res.data) {
|
||||
actionList[key] = (res.data)[key]
|
||||
}
|
||||
console.log(actionList)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -247,7 +265,8 @@
|
|||
|
||||
.updata-btn {
|
||||
font-size: 26.29rpx;
|
||||
width: 192.76rpx;
|
||||
// width: 192.76rpx;
|
||||
padding: 0 30rpx;
|
||||
height: 57.83rpx;
|
||||
border: 1px solid #00A15E;
|
||||
color: #00A15E;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<view class="card">
|
||||
<view class="card-li">
|
||||
农户名称: 魏鹏飞
|
||||
农户名称: {{userInfo.name}}
|
||||
</view>
|
||||
<view class="card-li">
|
||||
种养殖类型: 养殖户
|
||||
|
@ -73,6 +73,10 @@
|
|||
import {
|
||||
reactive
|
||||
} from "vue"
|
||||
const props = defineProps({
|
||||
userInfo: Object
|
||||
})
|
||||
const userInfo = reactive(props.userInfo)
|
||||
const list = reactive([{
|
||||
tit: "土地种植管理",
|
||||
type: 1,
|
||||
|
|
|
@ -8,49 +8,50 @@
|
|||
|
||||
<view class="card">
|
||||
<view class="card-li">
|
||||
农户名称: 魏鹏飞
|
||||
农户名称: {{userInfo.name}}
|
||||
</view>
|
||||
<view class="card-li">
|
||||
种养殖类型: 种植户
|
||||
</view>
|
||||
<view class="card-li">
|
||||
土地面积: 00
|
||||
土地面积: {{userInfo.total_land_area}}亩
|
||||
</view>
|
||||
<view class="card-li">
|
||||
地址: 对话方式打开就会发生的空间和
|
||||
地址: {{userInfo.area_name}}{{userInfo.street_name}}{{userInfo.village_name}}{{userInfo.brigade_name}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card" v-for="(item,index) in list" :key="index" @click="navgoFn(item.type)">
|
||||
<view class="card" v-for="(item,index) in userInfo.land_detail" :key="index"
|
||||
@click="navgoFn(item.is_cropped,item.land_id)">
|
||||
<view class="tit card-li">
|
||||
<view class="">
|
||||
土地1
|
||||
{{item.land_notes}}
|
||||
</view>
|
||||
<view class="" style="color: #00A15E;" v-if="item.type==1||item.type==2">
|
||||
<view class="" style="color: #00A15E;" v-if="item.is_cropped">
|
||||
已种植
|
||||
</view>
|
||||
<view class="" style="color: #00A15E;" v-if="item.type==0">
|
||||
<view class="" style="color: #00A15E;" v-else>
|
||||
未种植
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
面积: 10亩
|
||||
面积: {{item.land_area}}亩
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li tit">
|
||||
<view class="card-li tit" v-if="item.crop_name">
|
||||
<view class="" style="font-weight: normal;">
|
||||
农作物: 10亩
|
||||
农作物: {{item.crop_name}}
|
||||
</view>
|
||||
<view class="" style="color: #FF9B66;" v-if="item.type==2">
|
||||
<view class="" style="color: #FF9B66;" v-if="item.ripe_time">
|
||||
已成熟
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li tit" style="font-weight: normal;">
|
||||
<view class="card-li tit" style="font-weight: normal;" v-show="item.crop_yield">
|
||||
<view class="">
|
||||
预计产量: 100kg
|
||||
预计产量: {{item.crop_yield}}kg
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="" v-if="false">
|
||||
已出售: 500kg
|
||||
</view>
|
||||
</view>
|
||||
|
@ -63,9 +64,9 @@
|
|||
<view class="add-btn" @click="navgo('/pages/growRecord/index')">
|
||||
批量处理
|
||||
</view>
|
||||
<view class="add-btn add" @click="navgo('/pages/InformationAdd/index')">
|
||||
<!-- <view class="add-btn add" @click="navgo('/pages/InformationAdd/index')">
|
||||
增加种植
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -74,6 +75,11 @@
|
|||
import {
|
||||
reactive
|
||||
} from "vue"
|
||||
const props = defineProps({
|
||||
userInfo: Object
|
||||
})
|
||||
|
||||
const userInfo = reactive(props.userInfo)
|
||||
const list = reactive([{
|
||||
tit: "土地种植管理",
|
||||
type: 1,
|
||||
|
@ -106,18 +112,16 @@
|
|||
url
|
||||
})
|
||||
}
|
||||
const navgoFn = (type) => {
|
||||
const navgoFn = (type, id) => {
|
||||
|
||||
if (type == 0) {
|
||||
navgo("/pages/InformationAdd/index")
|
||||
}
|
||||
if (type == 1) {
|
||||
navgo("/pages/detail/plant")
|
||||
if (!type) {
|
||||
navgo(`/pages/InformationAdd/index?land_id=${id}`)
|
||||
} else if (type) {
|
||||
navgo(`/pages/detail/plant?land_id=${id}`)
|
||||
}
|
||||
if (type == 2) {
|
||||
navgo('/pages/detail/plant')
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -145,12 +149,11 @@
|
|||
margin: auto;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx;
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
.card-li {
|
||||
margin-bottom: 17rpx;
|
||||
// margin-bottom: 17rpx;
|
||||
}
|
||||
|
||||
.tit {
|
||||
|
|
|
@ -3,17 +3,18 @@
|
|||
<uni-table border emptyText="暂无更多数据" width="600rpx">
|
||||
<!-- 表头行 -->
|
||||
<uni-tr>
|
||||
<uni-th width="100rpx" align="center">日期</uni-th>
|
||||
<uni-th width="120rpx" align="center">日期</uni-th>
|
||||
<uni-th width="200rpx" align="center">操作</uni-th>
|
||||
<uni-th width="300.22rpx" align="center">相关信息</uni-th>
|
||||
</uni-tr>
|
||||
<!-- 表格数据行 -->
|
||||
<uni-tr v-for="(item,index) in dataList">
|
||||
<uni-td>{{item.time}}</uni-td>
|
||||
<uni-td>{{item.text}}</uni-td>
|
||||
<uni-tr v-for="(item,index) in props.dataList" :key="index">
|
||||
<!-- <uni-td>{(item.create_time).slice(5,11)}}</uni-td> -->
|
||||
<uni-td>5,11</uni-td>
|
||||
<uni-td style="text-align: center;">{{item.action_name}}</uni-td>
|
||||
<uni-td v-if="item.img"> <u--image src="/static/img/GJ.jpg" width="100%" height="210.28rpx"
|
||||
alt=""></u--image></uni-td>
|
||||
<uni-td v-else> {{item.caozuo}}</uni-td>
|
||||
<uni-td v-else> {{objFn(item.action_content)}}</uni-td>
|
||||
</uni-tr>
|
||||
|
||||
</uni-table>
|
||||
|
@ -29,29 +30,28 @@
|
|||
reactive,
|
||||
ref
|
||||
} from "vue"
|
||||
let arr = "sdsd"
|
||||
// arr.sl
|
||||
const props = defineProps({
|
||||
dataList: Object,
|
||||
tit: String,
|
||||
route: String
|
||||
})
|
||||
const tit_b = ref(props.tit)
|
||||
console.log(props, '数据')
|
||||
const dataList = reactive([{
|
||||
time: "9.10",
|
||||
text: "东京核辐射的接口返回",
|
||||
caozuo: "的结果是否及时赶赴"
|
||||
}, {
|
||||
time: "9.10",
|
||||
text: "东京核辐射的接口返回",
|
||||
caozuo: "的结果是否及时赶赴"
|
||||
},
|
||||
|
||||
], )
|
||||
const navgo = () => {
|
||||
uni.navigateTo({
|
||||
url: props.route
|
||||
})
|
||||
}
|
||||
|
||||
const objFn = (obj) => {
|
||||
for (const [key, value] of Object.entries(JSON.parse(obj))) {
|
||||
return (`${key}: ${value}`);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
<template>
|
||||
<view class="card">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
{{land.crop_id}}号土地
|
||||
</view>
|
||||
<view class="">
|
||||
溯源码: {{land.source_code}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
当前种植: {{land.crop_name}}
|
||||
</view>
|
||||
<view class="">
|
||||
种植品牌: {{land.crop_brand}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
土地面积: {{land.land_area}}亩
|
||||
</view>
|
||||
<view class="">
|
||||
种子品牌: {{land.crop_variety}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li" v-if="false">
|
||||
<view class="">
|
||||
预计产量: {{land.crop_yield}}亩
|
||||
</view>
|
||||
<view class="">
|
||||
已出售: ???
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
播种时间: {{land.seed_time}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
landInfoAPI,
|
||||
} from "@/api/plant.js"
|
||||
import {
|
||||
reactive
|
||||
} from "vue";
|
||||
const props = defineProps({
|
||||
land_id: String
|
||||
})
|
||||
const land = reactive({})
|
||||
const objFn = (res, data) => {
|
||||
for (let key in res) {
|
||||
data[key] = res[key]
|
||||
}
|
||||
|
||||
}
|
||||
setTimeout(() => {
|
||||
landInfoAPI({
|
||||
land_id: props.land_id,
|
||||
user_id: 307
|
||||
}).then(res => {
|
||||
objFn(res.data, land)
|
||||
})
|
||||
}, 300)
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.card {
|
||||
.tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 1px solid #EBF1EF;
|
||||
}
|
||||
|
||||
.card-li {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,223 @@
|
|||
<template>
|
||||
<view class="">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
监管详情
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="updata-btn">
|
||||
查看全部监管记录<u--image src="/static/img/CKGD.png" style="margin-left: 5rpx;" width="28.04rpx"
|
||||
height="28.04rpx"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="card-tit">
|
||||
<view class="">
|
||||
1号土地
|
||||
</view>
|
||||
<view class="">
|
||||
溯源码: 123148
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
当前种植: 土豆
|
||||
</view>
|
||||
<view class="">
|
||||
标志品种: 土豆大煞风景
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="select">
|
||||
监管状况: <up-input readonly placeholder="请选择" style="margin-top: 20rpx;width: 600rpx;"
|
||||
border="surround" @click.capture="selectFoucsFn" @blur="selectAct=false" v-model="value">
|
||||
</up-input>
|
||||
<view class="JT" :class="{actJT:selectAct}">
|
||||
<u--image src="/static/img/XLJT.png" width="24.53rpx" height="24.53rpx"></u--image>
|
||||
</view>
|
||||
<view class="selectvalue" v-show="selectAct">
|
||||
<view class="select-li" v-for="(item,index) in selectList" :key="index"
|
||||
@click="changSelectfn(index)" :style="{color:indexs==index?'black':'#B3B3B3'}">
|
||||
{{item}}
|
||||
<view class="" v-show='indexs==index'>
|
||||
<u--image src="/static/img/XLZZ.png" width="24.53rpx" height="24.53rpx"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view>
|
||||
<view class="">
|
||||
监管图片
|
||||
</view>
|
||||
<view class="code-img">
|
||||
<view class="carime-icon" @click="updateImgFn">
|
||||
<u--image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u--image>
|
||||
<view class="">
|
||||
点击上传图片
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from "vue"
|
||||
|
||||
|
||||
const selectList = reactive([
|
||||
"正常", "未及时更新生产状况", "生产状况与实际不符"
|
||||
])
|
||||
|
||||
const value = ref("")
|
||||
const selectAct = ref(false)
|
||||
const selectAct1 = ref(false)
|
||||
const selectFoucsFn = (e) => {
|
||||
selectAct.value = true
|
||||
}
|
||||
const indexs = ref(0)
|
||||
const changSelectfn = (index) => {
|
||||
indexs.value = index
|
||||
value.value = selectList[index]
|
||||
selectAct.value = false
|
||||
}
|
||||
const updateImgFn = () => {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['album'],
|
||||
success: (res) => {
|
||||
console.log('chooseImage success, temp path is', res.tempFilePaths[0])
|
||||
var imageSrc = res.tempFilePaths[0]
|
||||
uni.showLoading({
|
||||
title: '上传中'
|
||||
})
|
||||
this.task = uni.uploadFile({
|
||||
url: 'https://unidemo.dcloud.net.cn/upload', //仅为示例,非真实的接口地址
|
||||
filePath: imageSrc,
|
||||
name: 'file',
|
||||
formData: {
|
||||
'user': 'test'
|
||||
},
|
||||
success: (res) => {
|
||||
if (this.pageVisible) {
|
||||
console.log('uploadImage success, res is:', res)
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '上传成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
this.imageSrc = imageSrc
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
if (this.pageVisible) {
|
||||
console.log('uploadImage fail', err);
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('chooseImage fail', err)
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 20rpx;
|
||||
}
|
||||
|
||||
.updata-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #F4F4F4;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.card-li {
|
||||
margin: 20rpx 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.select {
|
||||
|
||||
position: relative;
|
||||
|
||||
.JT {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 60%;
|
||||
z-index: 9999;
|
||||
transition: .2s;
|
||||
}
|
||||
|
||||
.actJT {
|
||||
transition: .2s;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
.selectvalue {
|
||||
position: absolute;
|
||||
width: 608.53rpx;
|
||||
background-color: white;
|
||||
z-index: 99;
|
||||
font-size: 26.29rpx;
|
||||
left: 0rpx;
|
||||
bottom: -200rpx;
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
padding: 0 20rpx;
|
||||
border: 1px solid #F4F4F4;
|
||||
|
||||
.select-li {
|
||||
margin: 20rpx 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.code-img {
|
||||
margin-top: 20rpx;
|
||||
background-color: #F4F4F4;
|
||||
height: 196.26rpx;
|
||||
position: relative;
|
||||
|
||||
.carime-icon {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
106
pages.json
106
pages.json
|
@ -129,7 +129,80 @@
|
|||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
{
|
||||
"path": "pages/poultry/feedList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "养殖列表",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/poultry/feedDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "养殖详情",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/poultry/histroyFeed",
|
||||
"style": {
|
||||
"navigationBarTitleText": "历史养殖记录",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/poultry/updateFeed",
|
||||
"style": {
|
||||
"navigationBarTitleText": "更新饲养状态",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/poultry/vaccineInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "疫苗信息",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/poultry/addPoultry",
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加饲养动物",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/poultry/allFeed",
|
||||
"style": {
|
||||
"navigationBarTitleText": "全部养殖记录",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/poultry/allRecording",
|
||||
"style": {
|
||||
"navigationBarTitleText": "全部记录",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/aquatic/addAquatic",
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加养殖",
|
||||
|
@ -153,9 +226,42 @@
|
|||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/supervision/group",
|
||||
"style": {
|
||||
"navigationBarTitleText": "小组公司监管",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/supervision/captain",
|
||||
"style": {
|
||||
"navigationBarTitleText": "生产队长监管",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/supervision/farmerDeatil",
|
||||
"style": {
|
||||
"navigationBarTitleText": "农户详情",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/supervision/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "土地详情",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
{
|
||||
"path": "pages/test/index",
|
||||
"style": {
|
||||
|
|
|
@ -50,56 +50,23 @@
|
|||
<view class="" style="margin-bottom: 30rpx;">
|
||||
今日种植状态
|
||||
</view>
|
||||
<view class="head-img">
|
||||
<view class="">
|
||||
<u--image src="/static/img/GJ.jpg" width="693.93rpx" height=" 394.28rpx" alt=""></u--image>
|
||||
</view>
|
||||
<!-- <u--image :showLoading="true" :src="src" width="80px" height="80px" @click="click"></u--image> -->
|
||||
<view class="poisition">
|
||||
更新时间: 2023-11-16
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<imgCard text="地址"
|
||||
imgUrl='http://ceshi-suyuan.lihaink.cn/uploads/20231025/3048b734cff7d9adfb00aaf6ab7290e5.jpeg'>
|
||||
</imgCard>
|
||||
</view>
|
||||
<view class="status">
|
||||
<view class="" style="margin-bottom: 30rpx;">
|
||||
播种图片
|
||||
</view>
|
||||
<view class="head-img">
|
||||
<view class="">
|
||||
<u--image src="/static/img/GJ.jpg" width="693.93rpx" height=" 394.28rpx" alt=""></u--image>
|
||||
</view>
|
||||
<!-- <u--image :showLoading="true" :src="src" width="80px" height="80px" @click="click"></u--image> -->
|
||||
<view class="poisition">
|
||||
更新时间: 2023-11-16
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<imgCard text="地址"
|
||||
imgUrl='http://ceshi-suyuan.lihaink.cn/uploads/20231025/3048b734cff7d9adfb00aaf6ab7290e5.jpeg'>
|
||||
</imgCard>
|
||||
</view>
|
||||
<view class="status">
|
||||
<view class="" style="margin-bottom: 30rpx;">
|
||||
生长情况
|
||||
</view>
|
||||
<view class="head-img">
|
||||
<view class="">
|
||||
<u--image src="/static/img/GJ.jpg" width="693.93rpx" height=" 394.28rpx" alt=""></u--image>
|
||||
</view>
|
||||
<!-- <u--image :showLoading="true" :src="src" width="80px" height="80px" @click="click"></u--image> -->
|
||||
<view class="poisition">
|
||||
更新时间: 2023-11-16
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="head-img">
|
||||
<view class="">
|
||||
<u--image src="/static/img/GJ.jpg" width="693.93rpx" height=" 394.28rpx" alt=""></u--image>
|
||||
</view>
|
||||
<!-- <u--image :showLoading="true" :src="src" width="80px" height="80px" @click="click"></u--image> -->
|
||||
<view class="poisition">
|
||||
更新时间: 2023-11-16
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<imgCard text="地址" :imgUrl="item.pic" v-for="(item,index) in imgList" :key="index"></imgCard>
|
||||
</view>
|
||||
|
||||
<view class="up-btn">
|
||||
|
@ -108,7 +75,30 @@
|
|||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script setup>
|
||||
import imgCard from "@/components/imgCard.vue"
|
||||
import {
|
||||
landCropPicListAPI
|
||||
} from "@/api/plant.js"
|
||||
import {
|
||||
onLoad
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from "vue"
|
||||
const imgList = reactive([])
|
||||
onLoad((options) => {
|
||||
landCropPicListAPI({
|
||||
crop_id: options.crop_id
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
res.data.forEach(item => {
|
||||
imgList.push(item)
|
||||
})
|
||||
console.log(imgList)
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -66,7 +66,6 @@
|
|||
添加水产养殖
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="circumstance">
|
||||
<view class="card-tit">
|
||||
<view class="">
|
||||
|
|
|
@ -37,11 +37,8 @@
|
|||
<view class="">
|
||||
具体种类: 20亩
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="">
|
||||
<view class="" style="margin-bottom: 20rpx;">
|
||||
网兜计数
|
||||
|
@ -82,7 +79,6 @@
|
|||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
|
||||
<imgCard></imgCard>
|
||||
<imgCard :imgUrl='landDeatil.pic' text='地址'></imgCard>
|
||||
|
||||
<view class="bad-info">
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<u--image :src="urlFn('sj')" style="margin: 0 5rpx;" width="28.04rpx" height="28.04rpx"></u--image>
|
||||
<text>刷新时间:{{dateFn()}}</text>
|
||||
</view>
|
||||
<view style="display: flex;" @click="navgo('/pages/allPlant/index')">
|
||||
查看历史条件 <u--image src="/static/img/CKGD.png" style="margin-left: 5rpx;" width="31.54rpx"
|
||||
<view style="display: flex;" @click="navgo(`/pages/allPlant/index?crop_id=${landDeatil.crop_id}`)">
|
||||
查看历史记录 <u--image src="/static/img/CKGD.png" style="margin-left: 5rpx;" width="31.54rpx"
|
||||
height="31.54rpx"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -18,40 +18,7 @@
|
|||
上传新的种植情况
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
1号土地
|
||||
</view>
|
||||
<view class="">
|
||||
溯源码: 12302
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
当前种植: 土豆
|
||||
</view>
|
||||
<view class="">
|
||||
种植品牌: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
土地面积: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
种子品牌: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
播种时间: 2020.12.01
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<landInfo :land_id='landDeatil.land_id'></landInfo>
|
||||
<!-- 生长记录 -->
|
||||
|
||||
<view class="grow-record-tit">
|
||||
|
@ -63,7 +30,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- <myTable :dataList="dataList" tit='查看历史'></myTable> -->
|
||||
<myTable tit='查看历史消毒记录' route='/pages/records/index'></myTable>
|
||||
<myTable tit='查看历史记录' :dataList="tableDate" route='/pages/records/index'></myTable>
|
||||
|
||||
|
||||
|
||||
|
@ -112,190 +79,206 @@
|
|||
|
||||
</view>
|
||||
|
||||
<view class="ripe-btn" @click="navgo('/pages/index/index')">
|
||||
<view class="ripe-btn" @click="showPop=true">
|
||||
标记为成熟
|
||||
</view>
|
||||
|
||||
|
||||
<view class="ripe-btn" v-if="false" @click="navgo('/pages/index/index')">
|
||||
标记为全部收获
|
||||
</view>
|
||||
<!-- 组件 -->
|
||||
<!-- navgo('/pages/index/index' -->
|
||||
<u-popup :show="showPop" :round="20" mode="bottom" @close="showPop=false" @open="showPop=true">
|
||||
<view class="mark">
|
||||
<view class="head">
|
||||
<view class="">
|
||||
农作物成熟标记
|
||||
</view>
|
||||
<view class="" @tap="showPop=false">
|
||||
X
|
||||
</view>
|
||||
</view>
|
||||
<view class="mark-li">
|
||||
<view class="">
|
||||
种植类型:
|
||||
</view>
|
||||
<view class="">
|
||||
{{landDeatil.crop_name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="mark-li">
|
||||
<view class="">
|
||||
种植品牌:
|
||||
</view>
|
||||
<view class="">
|
||||
{{landDeatil.crop_brand}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="mark-li">
|
||||
<view class="">
|
||||
本期溯源码:
|
||||
</view>
|
||||
<view class="">
|
||||
{{landDeatil.source_code}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="mark-li">
|
||||
<view class="">
|
||||
成熟日期:
|
||||
</view>
|
||||
<view class="">
|
||||
?
|
||||
</view>
|
||||
</view>
|
||||
<view class="mark-li" style="display: block;border: 0;">
|
||||
<view class="">
|
||||
预计产量:
|
||||
</view>
|
||||
<view class="" style="margin-top: 20rpx;">
|
||||
<up-input placeholder="请输入内容" border="surround" v-model="crop_yield"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ripe-btn" @tap="markFn">
|
||||
确认
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script setup>
|
||||
import {
|
||||
landInfoAPI,
|
||||
addLandCropPicAPI,
|
||||
landCropRecordListAPI,
|
||||
landEnvDataCurrAPI,
|
||||
setLandCropRipeAPI
|
||||
} from "@/api/plant.js"
|
||||
import myTable from "@/components/myTable/index.vue"
|
||||
import imgCard from "@/components/imgCard.vue"
|
||||
import uplodeImg from "@/utils/uplodeImg.js"
|
||||
import landInfo from "@/components/plant/landInfo.vue"
|
||||
import {
|
||||
companyMine
|
||||
} from "@/api/test.js"
|
||||
export default {
|
||||
components: {
|
||||
myTable,
|
||||
imgCard
|
||||
ref,
|
||||
reactive
|
||||
} from "vue"
|
||||
import {
|
||||
onLoad
|
||||
} from "@dcloudio/uni-app"
|
||||
const crop_yield = ref("")
|
||||
const showPop = ref(false)
|
||||
const tableDate = reactive([])
|
||||
const landDeatil = reactive({})
|
||||
const data = reactive([{
|
||||
tit: "土壤温度",
|
||||
icon: 'TRWD',
|
||||
dw: "℃",
|
||||
cont: 'soil_temp',
|
||||
flag: false,
|
||||
|
||||
}, {
|
||||
tit: "土壤湿度",
|
||||
icon: 'TRSD',
|
||||
dw: "%RH",
|
||||
cont: 'soil_mois',
|
||||
}, {
|
||||
tit: "磷含量",
|
||||
icon: 'FX',
|
||||
cont: 'k_content',
|
||||
dw: "%",
|
||||
}, {
|
||||
tit: "氮含量",
|
||||
icon: 'FS',
|
||||
dw: "mg/l",
|
||||
cont: 'n_content',
|
||||
}, {
|
||||
tit: "钾含量",
|
||||
icon: 'JYL',
|
||||
dw: "%",
|
||||
cont: 'p_content',
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataList: [{
|
||||
time: "9.10",
|
||||
text: "东京核辐射的接口返回",
|
||||
caozuo: "的结果是否及时赶赴"
|
||||
}, {
|
||||
time: "9.10",
|
||||
text: "东京核辐射的接口返回",
|
||||
caozuo: "的结果是否及时赶赴"
|
||||
},
|
||||
|
||||
],
|
||||
// title: 'Hello'
|
||||
data: [{
|
||||
tit: "土壤温度",
|
||||
icon: 'TRWD',
|
||||
dw: "℃",
|
||||
cont: 'soil_temperature',
|
||||
flag: false,
|
||||
], )
|
||||
|
||||
}, {
|
||||
tit: "土壤湿度",
|
||||
icon: 'TRSD',
|
||||
dw: "%RH",
|
||||
cont: 'soil_moisture',
|
||||
}, {
|
||||
tit: "风向",
|
||||
icon: 'FX',
|
||||
cont: 'wind_direction',
|
||||
}, {
|
||||
tit: "风速",
|
||||
icon: 'FS',
|
||||
dw: "m/s",
|
||||
cont: 'wind_speed',
|
||||
}, {
|
||||
tit: "降雨量",
|
||||
icon: 'JYL',
|
||||
dw: "mm",
|
||||
cont: 'rainfall',
|
||||
}, {
|
||||
tit: "光照",
|
||||
icon: 'GZ',
|
||||
dw: "Wlux",
|
||||
cont: 'illumination',
|
||||
}, {
|
||||
tit: "二氧化碳",
|
||||
icon: 'EYHT',
|
||||
dw: "ppm",
|
||||
cont: 'carbon_dioxide_content',
|
||||
},
|
||||
const baseData = reactive({})
|
||||
|
||||
],
|
||||
onLoad(async (options) => {
|
||||
let res = await landInfoAPI({
|
||||
user_id: 307,
|
||||
land_id: options.land_id
|
||||
})
|
||||
objFn(res.data, landDeatil)
|
||||
let res2 = await landCropRecordListAPI({
|
||||
crop_id: landDeatil.crop_id
|
||||
})
|
||||
objFn(res2.data, tableDate)
|
||||
|
||||
data2: [{
|
||||
cont: "气象多要素百叶箱",
|
||||
cont2: "1天/1次",
|
||||
}, {
|
||||
cont: "多功能控制器",
|
||||
cont2: "3个小时/次",
|
||||
}, ],
|
||||
baseData: {
|
||||
// console.log(res2.data)
|
||||
let res3 = await landEnvDataCurrAPI({
|
||||
user_id: 307,
|
||||
})
|
||||
objFn(res3.data, baseData)
|
||||
}, )
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
companyMine({
|
||||
id: 1,
|
||||
flag: 1
|
||||
}).then(res => {
|
||||
this.baseData = res.data
|
||||
// console.log(res)
|
||||
|
||||
const updateImgFn = () => {
|
||||
let image = ""
|
||||
uplodeImg().then(res => {
|
||||
image = res.data.image
|
||||
landDeatil.pic = image
|
||||
addLandCropPicAPI({
|
||||
crop_id: landDeatil.crop_id,
|
||||
pic: image
|
||||
}).then(res2 => {
|
||||
console.log(res2)
|
||||
})
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
setTimeout(() => {
|
||||
uni.stopPullDownRefresh()
|
||||
}, 500)
|
||||
},
|
||||
methods: {
|
||||
updateImgFn() {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['album'],
|
||||
success: (res) => {
|
||||
console.log('chooseImage success, temp path is', res.tempFilePaths[0])
|
||||
var imageSrc = res.tempFilePaths[0]
|
||||
uni.showLoading({
|
||||
title: '上传中'
|
||||
})
|
||||
this.task = uni.uploadFile({
|
||||
url: 'https://unidemo.dcloud.net.cn/upload', //仅为示例,非真实的接口地址
|
||||
filePath: imageSrc,
|
||||
name: 'file',
|
||||
formData: {
|
||||
'user': 'test'
|
||||
},
|
||||
success: (res) => {
|
||||
if (this.pageVisible) {
|
||||
console.log('uploadImage success, res is:', res)
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '上传成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
this.imageSrc = imageSrc
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
if (this.pageVisible) {
|
||||
console.log('uploadImage fail', err);
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('chooseImage fail', err)
|
||||
}
|
||||
})
|
||||
},
|
||||
navgo(url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
dateFn() {
|
||||
var today = new Date();
|
||||
})
|
||||
}
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
const dateFn = () => {
|
||||
var today = new Date();
|
||||
|
||||
// 获取年、月、日
|
||||
var year = today.getFullYear();
|
||||
var month = today.getMonth() + 1; // 月份从0开始,需要加1
|
||||
var day = today.getDate();
|
||||
// 获取年、月、日
|
||||
var year = today.getFullYear();
|
||||
var month = today.getMonth() + 1; // 月份从0开始,需要加1
|
||||
var day = today.getDate();
|
||||
|
||||
// 构建日期字符串
|
||||
var dateStr = year + '-' + month + '-' + day;
|
||||
return dateStr
|
||||
// 输出日期字符串
|
||||
// 构建日期字符串
|
||||
var dateStr = year + '-' + month + '-' + day;
|
||||
return dateStr
|
||||
// 输出日期字符串
|
||||
|
||||
},
|
||||
backFn() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
test() {
|
||||
companyMine()
|
||||
},
|
||||
urlFn(name) {
|
||||
return `/static/img/${name}.png`
|
||||
},
|
||||
img(w, h, m) {
|
||||
return `width:${w}rpx;height:${h};margin:0 ${m}rpx `
|
||||
},
|
||||
navto() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index2/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
const backFn = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
const urlFn = (name) => {
|
||||
return `/static/img/${name}.png`
|
||||
}
|
||||
const img = (w, h, m) => {
|
||||
return `width:${w}rpx;height:${h};margin:0 ${m}rpx `
|
||||
}
|
||||
const navto = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index2/index'
|
||||
})
|
||||
}
|
||||
const markFn = () => {
|
||||
setLandCropRipeAPI({
|
||||
crop_id: landDeatil.crop_id,
|
||||
crop_yield: Number(crop_yield.value)
|
||||
})
|
||||
}
|
||||
|
||||
const objFn = (res, data) => {
|
||||
for (let key in res) {
|
||||
data[key] = res[key]
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -461,4 +444,25 @@
|
|||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
background: linear-gradient(to right, #00A15E, #4CC593);
|
||||
}
|
||||
|
||||
.mark {
|
||||
// padding: 30rpx;
|
||||
padding: 30rpx;
|
||||
|
||||
.head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.mark-li {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 40rpx;
|
||||
border-bottom: 1px solid #EBF1EF;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
|
@ -1,34 +1,8 @@
|
|||
<template>
|
||||
<view class="content" @click.capture="off">
|
||||
<view class="card">
|
||||
<view class="card-tit">
|
||||
<view class="">
|
||||
编号: 13254
|
||||
</view>
|
||||
<view class="" style="color: green;">
|
||||
健康
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-cont">
|
||||
<view class="card-l">
|
||||
<view class="">
|
||||
养殖品种: 黑山🐖
|
||||
</view>
|
||||
<view class="">
|
||||
养殖类型: 黑山🐖
|
||||
</view>
|
||||
<view class="">
|
||||
年龄: 黑山🐖
|
||||
</view>
|
||||
<view class="">
|
||||
体重: 黑山🐖
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-r">
|
||||
<u--image src="/static/img/GJ.jpg" width="353.97rpx" height="210.28rpx" alt=""></u--image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
|
||||
<view class="head" v-if="addList.length">
|
||||
已添加{{addList.length}}条畜生
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
|
@ -37,7 +11,15 @@
|
|||
养殖品种
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="value" @change="change"></up-input>
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="formData.kind"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="card-li-tit">
|
||||
具体品类
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="formData.breed"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
|
@ -45,13 +27,13 @@
|
|||
年龄
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="value" @change="change"></up-input>
|
||||
<up-input placeholder="请输入年龄" border="surround" v-model="formData.age"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="select">
|
||||
养殖类型: <up-input readonly placeholder="请选择" style="margin-top: 20rpx;" border="surround"
|
||||
@click.capture="selectFoucsFn" @blur="selectAct=false" v-model="value">
|
||||
养殖类型: <up-input @tap="selectFoucsFn" readonly placeholder="请选择" style="margin-top: 20rpx;"
|
||||
border="surround" v-model="gender">
|
||||
</up-input>
|
||||
<view class="JT" :class="{actJT:selectAct}">
|
||||
<u--image src="/static/img/XLJT.png" width="24.53rpx" height="24.53rpx"></u--image>
|
||||
|
@ -70,17 +52,17 @@
|
|||
</view>
|
||||
<view class="card-li">
|
||||
<view class="select">
|
||||
状态: <up-input readonly placeholder="请选择" style="margin-top: 20rpx;" border="surround"
|
||||
@click.capture="selectFoucsFn1" @blur="selectAct1=false" v-model="value">
|
||||
状态: <up-input placeholder="请选择" style="margin-top: 20rpx;" border="surround" @click="selectFoucsFn1"
|
||||
v-model="status">
|
||||
</up-input>
|
||||
<view class="JT" :class="{actJT:selectAct1}">
|
||||
<u--image src="/static/img/XLJT.png" width="24.53rpx" height="24.53rpx"></u--image>
|
||||
</view>
|
||||
<view class="selectvalue" v-show="selectAct1" style="bottom:-250rpx">
|
||||
<view class="select-li" v-for="(item,index) in selectList1" :key="index"
|
||||
@click="changSelectfn(index)" :style="{color:indexs==index?'black':'#B3B3B3'}">
|
||||
@click="changSelectfn1(index)" :style="{color:indexs1==index?'black':'#B3B3B3'}">
|
||||
{{item}}
|
||||
<view class="" v-show='indexs==index'>
|
||||
<view class="" v-show='indexs1==index'>
|
||||
<u--image src="/static/img/XLZZ.png" width="24.53rpx" height="24.53rpx"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -92,23 +74,29 @@
|
|||
体重
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="value" @change="change"></up-input>
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="formData.weight"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="code-img">
|
||||
<view class="carime-icon" @click="updateImgFn">
|
||||
<u--image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u--image>
|
||||
<view class="">
|
||||
点击上传图片
|
||||
<view class="" v-if="formData.pic">
|
||||
<u--image :src="formData.pic" width="637.85rpx" height='196.26rpx'></u--image>
|
||||
</view>
|
||||
<view class="carime-icon" v-else>
|
||||
<u--image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u--image>
|
||||
<view class="">
|
||||
上传
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="next-btn">
|
||||
<view class="next-btn" @click="nextFn">
|
||||
下一个
|
||||
</view>
|
||||
<view class="ripe-btn">
|
||||
<view class="ripe-btn" @click='navgo'>
|
||||
完成添加
|
||||
</view>
|
||||
</view>
|
||||
|
@ -119,80 +107,101 @@
|
|||
reactive,
|
||||
ref
|
||||
} from "vue"
|
||||
import uplodeImg from "@/utils/uplodeImg.js"
|
||||
import {
|
||||
addAnimalAPI,
|
||||
|
||||
} from "@/api/chick.js"
|
||||
const navgo = () => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}
|
||||
const updateImgFn = () => {
|
||||
uplodeImg().then(res => {
|
||||
formData.pic = res.data.image
|
||||
})
|
||||
|
||||
}
|
||||
const off = () => {
|
||||
selectAct.value = false
|
||||
selectAct1.value = false
|
||||
}
|
||||
|
||||
const selectList = reactive([
|
||||
"幼崽", "公猪", "母猪"
|
||||
"公猪", "母猪"
|
||||
])
|
||||
const gender = ref("")
|
||||
const status = ref("")
|
||||
const selectList1 = reactive([
|
||||
"健康", "怀孕中", "生病隔离中", "可出栏"
|
||||
])
|
||||
const value = ref("")
|
||||
const value1 = ref("")
|
||||
const selectAct = ref(false)
|
||||
const selectAct1 = ref(false)
|
||||
const selectFoucsFn = (e) => {
|
||||
selectAct.value = true
|
||||
selectAct1.value = false
|
||||
}
|
||||
const selectFoucsFn1 = (e) => {
|
||||
selectAct1.value = true
|
||||
selectAct.value = false
|
||||
}
|
||||
const indexs = ref(0)
|
||||
const indexs1 = ref(0)
|
||||
const changSelectfn = (index) => {
|
||||
indexs.value = index
|
||||
value.value = selectList[index]
|
||||
formData.gender = index + 1
|
||||
gender.value = selectList[index]
|
||||
selectAct.value = false
|
||||
selectAct1.value = false
|
||||
}
|
||||
const updateImgFn = () => {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['album'],
|
||||
success: (res) => {
|
||||
console.log('chooseImage success, temp path is', res.tempFilePaths[0])
|
||||
var imageSrc = res.tempFilePaths[0]
|
||||
uni.showLoading({
|
||||
title: '上传中'
|
||||
})
|
||||
this.task = uni.uploadFile({
|
||||
url: 'https://unidemo.dcloud.net.cn/upload', //仅为示例,非真实的接口地址
|
||||
filePath: imageSrc,
|
||||
name: 'file',
|
||||
formData: {
|
||||
'user': 'test'
|
||||
},
|
||||
success: (res) => {
|
||||
if (this.pageVisible) {
|
||||
console.log('uploadImage success, res is:', res)
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '上传成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
this.imageSrc = imageSrc
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
if (this.pageVisible) {
|
||||
console.log('uploadImage fail', err);
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('chooseImage fail', err)
|
||||
}
|
||||
const changSelectfn1 = (index) => {
|
||||
indexs1.value = index
|
||||
value1.value = selectList[index]
|
||||
formData.status = index + 1
|
||||
status.value = selectList1[index]
|
||||
selectAct.value = false
|
||||
selectAct1.value = false
|
||||
}
|
||||
const baseFormData = reactive({
|
||||
user_id: 307,
|
||||
kind: "",
|
||||
breed: "",
|
||||
gender: 1,
|
||||
age: "",
|
||||
status: 1,
|
||||
weight: "",
|
||||
pic: ""
|
||||
})
|
||||
const objFn = (res, obj) => {
|
||||
for (let key in res) {
|
||||
obj[key] = res[key]
|
||||
}
|
||||
}
|
||||
const formData = reactive({})
|
||||
objFn(baseFormData, formData)
|
||||
|
||||
const nextFn = () => {
|
||||
addAnimalAPI({
|
||||
...formData
|
||||
}).then(res => {
|
||||
status.value = ''
|
||||
gender.value = ''
|
||||
addList.push(1)
|
||||
objFn(baseFormData, formData)
|
||||
uni.showToast({
|
||||
title: '添加成功',
|
||||
icon: 'success',
|
||||
duration: 1000,
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
const addList = reactive([])
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.card-tit {
|
||||
display: flex;
|
||||
|
@ -261,7 +270,7 @@
|
|||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 60%;
|
||||
z-index: 9999;
|
||||
z-index: 9;
|
||||
transition: .2s;
|
||||
}
|
||||
|
||||
|
@ -279,7 +288,7 @@
|
|||
z-index: 99;
|
||||
font-size: 26.29rpx;
|
||||
left: 0rpx;
|
||||
bottom: -200rpx;
|
||||
bottom: -130rpx;
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
padding: 0 20rpx;
|
||||
border: 1px solid #F4F4F4;
|
||||
|
@ -310,4 +319,9 @@
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
.head {
|
||||
text-align: center;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
</style>
|
|
@ -52,7 +52,7 @@
|
|||
<view class="">
|
||||
编号: 13645
|
||||
</view>
|
||||
<view class="more-jt">
|
||||
<view class="more-jt" @click="navgo(`/pages/feedIng/histroyFeed?id=${animal_id}`)">
|
||||
查看养殖详情 <u--image src="/static/img/CKGD.png" style="margin-left: 5rpx;" width="31.54rpx"
|
||||
height="31.54rpx"></u--image>
|
||||
</view>
|
||||
|
@ -118,10 +118,16 @@
|
|||
<script setup>
|
||||
import imgCard from "@/components/imgCard.vue"
|
||||
import myTable from "@/components/myTable/index.vue"
|
||||
import {
|
||||
onLoad
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from "vue"
|
||||
import {
|
||||
animalInfoAPI
|
||||
} from "@/api/animal.js"
|
||||
const selectList = reactive([
|
||||
"健康", "怀孕中", "生病隔离中", "可出栏"
|
||||
])
|
||||
|
@ -135,6 +141,16 @@
|
|||
indexs.value = index
|
||||
value.value = selectList[index]
|
||||
}
|
||||
const animal_id = ref("")
|
||||
onLoad((options) => {
|
||||
animal_id.value = options.id
|
||||
console.log(animal_id.value, 6666)
|
||||
})
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -41,43 +41,41 @@
|
|||
</view>
|
||||
|
||||
<view class="serch">
|
||||
<u-search bgColor='white' height='63.08rpx' :show-action="false" actionText="搜索"
|
||||
<u-search bgColor='white' v-model="query" height='63.08rpx' :show-action="false" actionText="搜索"
|
||||
:animation="true"></u-search>
|
||||
<view class="serch-btn">
|
||||
<view class="serch-btn" @tap="queryFn">
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
<view class="card" v-for="(item,index) in list" @click="navgo('/pages/feedIng/feedDetail')" :key="index">
|
||||
<view class="card" v-for="(item,index) in animalList" :key="index" @click="navgo('/pages/feedIng/feedDetail')">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
编号: 12378
|
||||
编号: {{item.animal_code}}
|
||||
</view>
|
||||
<view class="" style="color: #00A15E;" v-if='true'>
|
||||
<view class="" style="color: #00A15E;" v-if='item.animal_status==1'>
|
||||
健康
|
||||
</view>
|
||||
<view class="" style="color: #FFD736;" v-if="false">
|
||||
<view class="" style="color: #FFD736;" v-if='item.animal_status==2'>
|
||||
怀孕中
|
||||
</view>
|
||||
<view class="" style="color: #3274F9;" v-if="false">
|
||||
<view class="" style="color: #3274F9;" v-if='item.animal_status==4'>
|
||||
可出栏
|
||||
</view>
|
||||
<view class="" style="color: #F84221;" v-if="false">
|
||||
生殖隔离中
|
||||
<view class="" style="color: #F84221;" v-if='item.animal_status==3'>
|
||||
生病隔离中
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖类型: 土豆
|
||||
养殖类型: {{item.animal_kind}}
|
||||
</view>
|
||||
<view class="">
|
||||
年龄: 7月
|
||||
年龄: {{item.animal_age}}年
|
||||
</view>
|
||||
<view class="">
|
||||
体重: 70kg
|
||||
体重: {{item.animal_weight}}kg
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="ripe-btn" @click="navgo('/pages/feedIng/addPoultry')">
|
||||
|
@ -87,6 +85,9 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
animalListAPI,
|
||||
} from "@/api/animal.js"
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
|
@ -96,7 +97,28 @@
|
|||
url
|
||||
})
|
||||
}
|
||||
const list = reactive([1, 1, 1, 1, 1, 1, 1, 1, 1, 1])
|
||||
const animalList = reactive([])
|
||||
animalListAPI({
|
||||
user_id: 307,
|
||||
page_no: 1,
|
||||
page_size: 3000000,
|
||||
}).then(res => {
|
||||
res.data.forEach(item => {
|
||||
animalList.push(item)
|
||||
})
|
||||
})
|
||||
const query = ref("")
|
||||
const queryFn = () => {
|
||||
animalList.splice(0, 999999999)
|
||||
animalListAPI({
|
||||
user_id: 307,
|
||||
keyword: query.value,
|
||||
}).then(res => {
|
||||
res.data.forEach(item => {
|
||||
animalList.push(item)
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -48,8 +48,7 @@
|
|||
<view class="">
|
||||
养殖情况
|
||||
</view>
|
||||
<imgCard></imgCard>
|
||||
<imgCard></imgCard>
|
||||
<imgCard v-for="(item,index) in imgList" :imgUrl='item.pic' :key="index"></imgCard>
|
||||
|
||||
</view>
|
||||
<view class="up-plant-btn" @click="updateImgFn">
|
||||
|
@ -62,53 +61,41 @@
|
|||
|
||||
<script setup>
|
||||
import imgCard from "@/components/imgCard.vue"
|
||||
import uplodeImg from "@/utils/uplodeImg.js"
|
||||
import {
|
||||
animalPicListAPI,
|
||||
addAnimalPicAPI
|
||||
} from "@/api/animal.js"
|
||||
import {
|
||||
onLoad
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from "vue";
|
||||
const updateImgFn = () => {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['album'],
|
||||
success: (res) => {
|
||||
console.log('chooseImage success, temp path is', res.tempFilePaths[0])
|
||||
var imageSrc = res.tempFilePaths[0]
|
||||
uni.showLoading({
|
||||
title: '上传中'
|
||||
})
|
||||
this.task = uni.uploadFile({
|
||||
url: 'https://unidemo.dcloud.net.cn/upload', //仅为示例,非真实的接口地址
|
||||
filePath: imageSrc,
|
||||
name: 'file',
|
||||
formData: {
|
||||
'user': 'test'
|
||||
},
|
||||
success: (res) => {
|
||||
if (this.pageVisible) {
|
||||
console.log('uploadImage success, res is:', res)
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '上传成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
this.imageSrc = imageSrc
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
if (this.pageVisible) {
|
||||
console.log('uploadImage fail', err);
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('chooseImage fail', err)
|
||||
}
|
||||
uplodeImg().then(res => {
|
||||
addAnimalPicAPI({
|
||||
animal_id: Number(animal_id.value),
|
||||
pic: res.data.image
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
})
|
||||
}
|
||||
const imgList = reactive([])
|
||||
const animal_id = ref("")
|
||||
onLoad((option) => {
|
||||
animal_id.value = option.id
|
||||
animalPicListAPI({
|
||||
animal_id: option.id
|
||||
}).then(res => {
|
||||
res.data.forEach(item => {
|
||||
imgList.push(item)
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -25,28 +25,27 @@
|
|||
|
||||
|
||||
<!-- 种植户首页 -->
|
||||
<planting v-if='flag==1'></planting>
|
||||
<planting v-if='flag==1' :userInfo='userInfo'></planting>
|
||||
<!-- 养猪的 -->
|
||||
<cultivation v-if="flag==2"></cultivation>
|
||||
<cultivation v-if="flag==2" :userInfo='userInfo'></cultivation>
|
||||
<!-- 养鸡的 -->
|
||||
<chick v-if="flag==3"> </chick>
|
||||
<chick v-if="flag==3" :userInfo='userInfo'> </chick>
|
||||
<!-- 卖鱼的首页 -->
|
||||
<fishing v-if='flag==4'></fishing>
|
||||
<fishing v-if='flag==4' :userInfo='userInfo'></fishing>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
userInfoAPI
|
||||
} from "@/api/plant.js"
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from 'vue';
|
||||
import {
|
||||
companyMine
|
||||
} from "@/api/test.js";
|
||||
import {
|
||||
counterStore
|
||||
} from '@/store/counter'
|
||||
|
||||
|
||||
import {
|
||||
onLoad
|
||||
} from "@dcloudio/uni-app"
|
||||
|
@ -58,19 +57,47 @@
|
|||
const scollChangeFn = (index) => {
|
||||
flag.value = index
|
||||
}
|
||||
const list = reactive([{
|
||||
tit: "土地种植管理",
|
||||
id: 1,
|
||||
}, {
|
||||
tit: "家畜养殖管理",
|
||||
id: 2,
|
||||
}, {
|
||||
tit: "家禽养殖管理",
|
||||
id: 3,
|
||||
}, {
|
||||
tit: "水产养殖管理",
|
||||
id: 4,
|
||||
}, ])
|
||||
const list = reactive([])
|
||||
const userInfo = reactive({
|
||||
|
||||
})
|
||||
|
||||
const initUserinfoFn = () => {
|
||||
userInfoAPI({
|
||||
user_id: 307
|
||||
}).then(res => {
|
||||
for (const key in res.data) {
|
||||
userInfo[key] = (res.data)[key]
|
||||
if (key == 'land_detail') {
|
||||
list.push({
|
||||
tit: "土地种植管理",
|
||||
id: 1,
|
||||
}, )
|
||||
} else if (key == 'animal_detail') {
|
||||
list.push({
|
||||
tit: "家畜养殖管理",
|
||||
id: 2,
|
||||
}, )
|
||||
} else if (key == 'poultry_detail') {
|
||||
list.push({
|
||||
tit: "家禽养殖管理",
|
||||
id: 3,
|
||||
}, )
|
||||
} else if (key == 'pond_detail') {
|
||||
list.push({
|
||||
tit: "水产养殖管理",
|
||||
id: 4,
|
||||
}, )
|
||||
}
|
||||
|
||||
}
|
||||
list.sort(function(a, b) {
|
||||
return a.id - b.id;
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
initUserinfoFn()
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.tabbar {
|
||||
|
@ -83,7 +110,7 @@
|
|||
white-space: nowrap;
|
||||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
width: 100%;
|
||||
min-width: 95vw;
|
||||
|
||||
|
||||
.scoll-list-li {
|
||||
|
|
|
@ -0,0 +1,327 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
|
||||
<view class="head" v-if="addList.length">
|
||||
已添加{{addList.length}}条畜生
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
<view class="card-li">
|
||||
<view class="card-li-tit">
|
||||
养殖品种
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="formData.kind"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="card-li-tit">
|
||||
具体品类
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="formData.breed"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="card-li-tit">
|
||||
年龄
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="请输入年龄" border="surround" v-model="formData.age"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="select">
|
||||
养殖类型: <up-input @tap="selectFoucsFn" readonly placeholder="请选择" style="margin-top: 20rpx;"
|
||||
border="surround" v-model="gender">
|
||||
</up-input>
|
||||
<view class="JT" :class="{actJT:selectAct}">
|
||||
<u--image src="/static/img/XLJT.png" width="24.53rpx" height="24.53rpx"></u--image>
|
||||
</view>
|
||||
<view class="selectvalue" v-show="selectAct">
|
||||
<view class="select-li" v-for="(item,index) in selectList" :key="index"
|
||||
@click="changSelectfn(index)" :style="{color:indexs==index?'black':'#B3B3B3'}">
|
||||
{{item}}
|
||||
<view class="" v-show='indexs==index'>
|
||||
<u--image src="/static/img/XLZZ.png" width="24.53rpx" height="24.53rpx"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="select">
|
||||
状态: <up-input placeholder="请选择" style="margin-top: 20rpx;" border="surround" @click="selectFoucsFn1"
|
||||
v-model="status">
|
||||
</up-input>
|
||||
<view class="JT" :class="{actJT:selectAct1}">
|
||||
<u--image src="/static/img/XLJT.png" width="24.53rpx" height="24.53rpx"></u--image>
|
||||
</view>
|
||||
<view class="selectvalue" v-show="selectAct1" style="bottom:-250rpx">
|
||||
<view class="select-li" v-for="(item,index) in selectList1" :key="index"
|
||||
@click="changSelectfn1(index)" :style="{color:indexs1==index?'black':'#B3B3B3'}">
|
||||
{{item}}
|
||||
<view class="" v-show='indexs1==index'>
|
||||
<u--image src="/static/img/XLZZ.png" width="24.53rpx" height="24.53rpx"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="card-li-tit">
|
||||
体重
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="formData.weight"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="code-img">
|
||||
<view class="carime-icon" @click="updateImgFn">
|
||||
<view class="" v-if="formData.pic">
|
||||
<u--image :src="formData.pic" width="637.85rpx" height='196.26rpx'></u--image>
|
||||
</view>
|
||||
<view class="carime-icon" v-else>
|
||||
<u--image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u--image>
|
||||
<view class="">
|
||||
上传
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="next-btn" @click="nextFn">
|
||||
下一个
|
||||
</view>
|
||||
<view class="ripe-btn" @click='navgo'>
|
||||
完成添加
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from "vue"
|
||||
import uplodeImg from "@/utils/uplodeImg.js"
|
||||
import {
|
||||
addAnimalAPI,
|
||||
|
||||
} from "@/api/animal.js"
|
||||
const navgo = () => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}
|
||||
const updateImgFn = () => {
|
||||
uplodeImg().then(res => {
|
||||
formData.pic = res.data.image
|
||||
})
|
||||
|
||||
}
|
||||
const off = () => {
|
||||
selectAct.value = false
|
||||
selectAct1.value = false
|
||||
}
|
||||
|
||||
const selectList = reactive([
|
||||
"公猪", "母猪"
|
||||
])
|
||||
const gender = ref("")
|
||||
const status = ref("")
|
||||
const selectList1 = reactive([
|
||||
"健康", "怀孕中", "生病隔离中", "可出栏"
|
||||
])
|
||||
const value = ref("")
|
||||
const value1 = ref("")
|
||||
const selectAct = ref(false)
|
||||
const selectAct1 = ref(false)
|
||||
const selectFoucsFn = (e) => {
|
||||
selectAct.value = true
|
||||
selectAct1.value = false
|
||||
}
|
||||
const selectFoucsFn1 = (e) => {
|
||||
selectAct1.value = true
|
||||
selectAct.value = false
|
||||
}
|
||||
const indexs = ref(0)
|
||||
const indexs1 = ref(0)
|
||||
const changSelectfn = (index) => {
|
||||
indexs.value = index
|
||||
value.value = selectList[index]
|
||||
formData.gender = index + 1
|
||||
gender.value = selectList[index]
|
||||
selectAct.value = false
|
||||
selectAct1.value = false
|
||||
}
|
||||
const changSelectfn1 = (index) => {
|
||||
indexs1.value = index
|
||||
value1.value = selectList[index]
|
||||
formData.status = index + 1
|
||||
status.value = selectList1[index]
|
||||
selectAct.value = false
|
||||
selectAct1.value = false
|
||||
}
|
||||
const baseFormData = reactive({
|
||||
user_id: 307,
|
||||
kind: "",
|
||||
breed: "",
|
||||
gender: 1,
|
||||
age: "",
|
||||
status: 1,
|
||||
weight: "",
|
||||
pic: ""
|
||||
})
|
||||
const objFn = (res, obj) => {
|
||||
for (let key in res) {
|
||||
obj[key] = res[key]
|
||||
}
|
||||
}
|
||||
const formData = reactive({})
|
||||
objFn(baseFormData, formData)
|
||||
|
||||
const nextFn = () => {
|
||||
addAnimalAPI({
|
||||
...formData
|
||||
}).then(res => {
|
||||
status.value = ''
|
||||
gender.value = ''
|
||||
addList.push(1)
|
||||
objFn(baseFormData, formData)
|
||||
uni.showToast({
|
||||
title: '添加成功',
|
||||
icon: 'success',
|
||||
duration: 1000,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const addList = reactive([])
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.card-tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #F4F4F4;
|
||||
padding-bottom: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.card-cont {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.card-l {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card-r {
|
||||
overflow: hidden;
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
width: 353.97rpx;
|
||||
height: 210.28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.card-li-tit {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.uplode {
|
||||
height: 350.47rpx;
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.next-btn {
|
||||
width: 196.26rpx;
|
||||
height: 66.59rpx;
|
||||
border: 1px solid #00A15E;
|
||||
color: #00A15E;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
line-height: 66rpx;
|
||||
}
|
||||
|
||||
.ripe-btn {
|
||||
width: 588.79rpx;
|
||||
height: 84.11rpx;
|
||||
background-color: #00A15E;
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 85rpx auto;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
background: linear-gradient(to right, #00A15E, #4CC593);
|
||||
}
|
||||
|
||||
.select {
|
||||
|
||||
position: relative;
|
||||
|
||||
.JT {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 60%;
|
||||
z-index: 9;
|
||||
transition: .2s;
|
||||
}
|
||||
|
||||
.actJT {
|
||||
transition: .2s;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
.selectvalue {
|
||||
position: absolute;
|
||||
width: 608.53rpx;
|
||||
background-color: white;
|
||||
z-index: 99;
|
||||
font-size: 26.29rpx;
|
||||
left: 0rpx;
|
||||
bottom: -130rpx;
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
padding: 0 20rpx;
|
||||
border: 1px solid #F4F4F4;
|
||||
|
||||
.select-li {
|
||||
margin: 20rpx 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.code-img {
|
||||
background-color: #F4F4F4;
|
||||
height: 196.26rpx;
|
||||
position: relative;
|
||||
|
||||
.carime-icon {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.head {
|
||||
text-align: center;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,79 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
编号: 52656
|
||||
</view>
|
||||
<view class="">
|
||||
溯源码: 52656
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖品种: 土豆
|
||||
</view>
|
||||
<view class="">
|
||||
年龄: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖类型: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
体重: 45kg
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
<view class="card-li">
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<u--image src="/static/img/GG.png" style="margin: 0 21rpx;" width="80rpx" height="80rpx"></u--image>
|
||||
当前养殖状态
|
||||
</view>
|
||||
<view class="" style="color: green;">
|
||||
健康
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="" style="margin-bottom: 20rpx;">
|
||||
饲养记录
|
||||
</view>
|
||||
<myTable></myTable>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import myTable from "@/components/myTable/index.vue"
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.card {
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 1px solid #EBF1EF;
|
||||
}
|
||||
|
||||
.card-li {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
margin-top: 20rpx;
|
||||
height: 500rpx;
|
||||
background-color: red;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,78 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
农户名称: 1号土地
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
种养殖类型: 土豆
|
||||
</view>
|
||||
<view class="">
|
||||
养殖头数: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
土地面积: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
公猪: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖种类: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
母猪: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
具体种类: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
幼崽: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="" style="margin-bottom: 20rpx;">
|
||||
饲养记录
|
||||
</view>
|
||||
|
||||
<myTable></myTable>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import myTable from "@/components/myTable/index.vue"
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.card {
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 1px solid #EBF1EF;
|
||||
}
|
||||
|
||||
.card-li {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
margin-top: 20rpx;
|
||||
height: 500rpx;
|
||||
background-color: red;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,305 @@
|
|||
<template>
|
||||
<view class="content" @click.capture="selectAct=false">
|
||||
|
||||
<view class="card">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
农户名称: 1号土地
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
种养殖类型: 土豆
|
||||
</view>
|
||||
<view class="">
|
||||
养殖头数: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
土地面积: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
公猪: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖种类: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
母猪: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
具体种类: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
幼崽: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="serch">
|
||||
<u-search bgColor='white' height='63.08rpx' :show-action="false" actionText="搜索"
|
||||
:animation="true"></u-search>
|
||||
<view class="serch-btn">
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
<view class="title">
|
||||
<view class="">
|
||||
编号: 13645
|
||||
</view>
|
||||
<view class="more-jt" @click="navgo(`/pages/poultry/histroyFeed?id=${animal_id}`)">
|
||||
查看养殖详情 <u--image src="/static/img/CKGD.png" style="margin-left: 5rpx;" width="31.54rpx"
|
||||
height="31.54rpx"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖类型: 母猪
|
||||
</view>
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
体重: <up-input style="height: 49.07rpx;width: 215.54rpx;margin-left: 20rpx;" placeholder="请输入内容"
|
||||
border="surround" v-model="value" @change="change"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li" style="align-items: center;">
|
||||
<view class="">
|
||||
年龄: 2年
|
||||
</view>
|
||||
<view class="select">
|
||||
状态: <up-input readonly style="height: 49.07rpx;width: 215.54rpx;margin-left: 20rpx;"
|
||||
placeholder="请选择" border="surround" @click.capture="selectFoucsFn" @blur="selectAct=false"
|
||||
v-model="value">
|
||||
</up-input>
|
||||
<view class="JT" :class="{actJT:selectAct}">
|
||||
<u--image src="/static/img/XLJT.png" width="24.53rpx" height="24.53rpx"></u--image>
|
||||
</view>
|
||||
<view class="selectvalue" v-show="selectAct">
|
||||
<view class="select-li" v-for="(item,index) in selectList" :key="index"
|
||||
@click="changSelectfn(index)" :style="{color:indexs==index?'black':'#B3B3B3'}">
|
||||
{{item}}
|
||||
<view class="" v-show='indexs==index'>
|
||||
<u--image src="/static/img/XLZZ.png" width="24.53rpx" height="24.53rpx"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<imgCard></imgCard>
|
||||
|
||||
<view class="up-plant-btn">
|
||||
上传新的种植情况
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="title">
|
||||
<view class="">
|
||||
饲养记录
|
||||
</view>
|
||||
<view class="updata-btn">
|
||||
更新生长记录
|
||||
</view>
|
||||
</view>
|
||||
<myTable tit='查看历史饲养记录' route='/pages/feedIng/allFeed'></myTable>
|
||||
<view class="ripe-btn">
|
||||
标记状态为出栏
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import imgCard from "@/components/imgCard.vue"
|
||||
import myTable from "@/components/myTable/index.vue"
|
||||
import {
|
||||
onLoad
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from "vue"
|
||||
import {
|
||||
animalInfoAPI
|
||||
} from "@/api/animal.js"
|
||||
const selectList = reactive([
|
||||
"健康", "怀孕中", "生病隔离中", "可出栏"
|
||||
])
|
||||
const value = ref("")
|
||||
const selectAct = ref(false)
|
||||
const selectFoucsFn = (e) => {
|
||||
selectAct.value = true
|
||||
}
|
||||
const indexs = ref(0)
|
||||
const changSelectfn = (index) => {
|
||||
indexs.value = index
|
||||
value.value = selectList[index]
|
||||
}
|
||||
const animal_id = ref("")
|
||||
onLoad((options) => {
|
||||
animal_id.value = options.id
|
||||
console.log(animal_id.value, 6666)
|
||||
})
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.card {
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 1px solid #EBF1EF;
|
||||
}
|
||||
|
||||
.card-li {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
margin-top: 42rpx;
|
||||
|
||||
.updata-btn {
|
||||
width: 192.76rpx;
|
||||
height: 57.83rpx;
|
||||
border: 1px solid #00A15E;
|
||||
color: #00A15E;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 31.54rpx 31.54rpx 31.54rpx 31.54rpx;
|
||||
font-size: 26.29rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.serch {
|
||||
position: relative;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.serch-btn {
|
||||
color: white;
|
||||
width: 115.65rpx;
|
||||
height: 63.08rpx;
|
||||
background-color: #1BAB6F;
|
||||
text-align: center;
|
||||
line-height: 63.08rpx;
|
||||
border-radius: 50rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.head-img {
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
|
||||
.poisition {
|
||||
opacity: 0.7;
|
||||
position: absolute;
|
||||
width: 380.26rpx;
|
||||
height: 71rpx;
|
||||
background-color: #FFFFFF;
|
||||
left: 20rpx;
|
||||
bottom: 36rpx;
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 29.79rpx;
|
||||
|
||||
.dw-cls {
|
||||
|
||||
margin: 0 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.up-plant-btn {
|
||||
width: 371.5rpx;
|
||||
height: 66.59rpx;
|
||||
color: #00A15E;
|
||||
margin: 40rpx auto;
|
||||
border: 1px solid #00A15E;
|
||||
font-weight: bold;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.ripe-btn {
|
||||
width: 588.79rpx;
|
||||
height: 84.11rpx;
|
||||
background-color: #00A15E;
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 85rpx auto;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
background: linear-gradient(to right, #00A15E, #4CC593);
|
||||
}
|
||||
|
||||
.select {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
.JT {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
z-index: 9999;
|
||||
transition: .2s;
|
||||
}
|
||||
|
||||
.actJT {
|
||||
transition: .2s;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
.selectvalue {
|
||||
position: absolute;
|
||||
width: 208.53rpx;
|
||||
background-color: white;
|
||||
z-index: 99;
|
||||
font-size: 26.29rpx;
|
||||
left: 90rpx;
|
||||
bottom: -250rpx;
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
padding: 0 20rpx;
|
||||
border: 1px solid #F4F4F4;
|
||||
|
||||
.select-li {
|
||||
margin: 20rpx 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,180 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
农户名称: 1号土地
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
种养殖类型: 土豆
|
||||
</view>
|
||||
<view class="">
|
||||
养殖头数: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
土地面积: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
公猪: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖种类: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
母猪: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
具体种类: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
幼崽: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="serch">
|
||||
<u-search bgColor='white' v-model="query" height='63.08rpx' :show-action="false" actionText="搜索"
|
||||
:animation="true"></u-search>
|
||||
<view class="serch-btn" @tap="queryFn">
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
<view class="card" v-for="(item,index) in animalList" :key="index" @click="navgo('/pages/feedIng/feedDetail')">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
编号: {{item.code}}
|
||||
</view>
|
||||
<view class="" style="color: #00A15E;" v-if='item.status==1'>
|
||||
健康
|
||||
</view>
|
||||
<view class="" style="color: #FFD736;" v-if='item.status==2'>
|
||||
怀孕中
|
||||
</view>
|
||||
<view class="" style="color: #3274F9;" v-if='item.status==4'>
|
||||
可出栏
|
||||
</view>
|
||||
<view class="" style="color: #F84221;" v-if='item.status==3'>
|
||||
生病隔离中
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖类型: {{item.kind}}
|
||||
</view>
|
||||
<view class="">
|
||||
年龄: {{item.age}}年
|
||||
</view>
|
||||
<view class="">
|
||||
体重: {{item.weight}}kg
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="ripe-btn" @click="navgo('/pages/feedIng/addPoultry')">
|
||||
添加新动物
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
animalListAPI,
|
||||
} from "@/api/chick.js"
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from "vue";
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
const animalList = reactive([])
|
||||
animalListAPI({
|
||||
user_id: 307,
|
||||
page_no: 1,
|
||||
page_size: 3000000,
|
||||
}).then(res => {
|
||||
res.data.forEach(item => {
|
||||
animalList.push(item)
|
||||
})
|
||||
})
|
||||
const query = ref("")
|
||||
const queryFn = () => {
|
||||
animalList.splice(0, 999999999)
|
||||
animalListAPI({
|
||||
user_id: 307,
|
||||
keyword: query.value,
|
||||
}).then(res => {
|
||||
res.data.forEach(item => {
|
||||
animalList.push(item)
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.card {
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 1px solid #EBF1EF;
|
||||
}
|
||||
|
||||
.card-li {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
.serch {
|
||||
position: relative;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.serch-btn {
|
||||
color: white;
|
||||
width: 115.65rpx;
|
||||
height: 63.08rpx;
|
||||
background-color: #1BAB6F;
|
||||
text-align: center;
|
||||
line-height: 63.08rpx;
|
||||
border-radius: 50rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.ripe-btn {
|
||||
width: 588.79rpx;
|
||||
height: 84.11rpx;
|
||||
background-color: #00A15E;
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 0 auto;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
background: linear-gradient(to right, #00A15E, #4CC593);
|
||||
margin-top: 64rpx;
|
||||
}
|
||||
|
||||
.showmore {
|
||||
font-size: 29.79rpx;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,134 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
编号: 52656
|
||||
</view>
|
||||
<view class="">
|
||||
溯源码: 52656
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖品种: 土豆
|
||||
</view>
|
||||
<view class="">
|
||||
年龄: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖类型: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
体重: 45kg
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
<view class="card-li">
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<u--image src="/static/img/GG.png" style="margin: 0 21rpx;" width="80rpx" height="80rpx"></u--image>
|
||||
当前养殖状态
|
||||
</view>
|
||||
<view class="" style="color: green;">
|
||||
健康
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="">
|
||||
<view class="">
|
||||
今日养殖状态
|
||||
</view>
|
||||
<imgCard></imgCard>
|
||||
<view class="">
|
||||
养殖情况
|
||||
</view>
|
||||
<imgCard v-for="(item,index) in imgList" :imgUrl='item.pic' :key="index"></imgCard>
|
||||
|
||||
</view>
|
||||
<view class="up-plant-btn" @click="updateImgFn">
|
||||
上传新的种植情况
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import imgCard from "@/components/imgCard.vue"
|
||||
import uplodeImg from "@/utils/uplodeImg.js"
|
||||
import {
|
||||
animalPicListAPI,
|
||||
addAnimalPicAPI
|
||||
} from "@/api/chick.js"
|
||||
import {
|
||||
onLoad
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from "vue";
|
||||
const updateImgFn = () => {
|
||||
uplodeImg().then(res => {
|
||||
addAnimalPicAPI({
|
||||
poultry_id: Number(animal_id.value),
|
||||
pic: res.data.image
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
})
|
||||
}
|
||||
const imgList = reactive([])
|
||||
const animal_id = ref("")
|
||||
onLoad((option) => {
|
||||
animal_id.value = option.id
|
||||
animalPicListAPI({
|
||||
poultry_id: option.id
|
||||
}).then(res => {
|
||||
res.data.forEach(item => {
|
||||
imgList.push(item)
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.card {
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 1px solid #EBF1EF;
|
||||
}
|
||||
|
||||
.card-li {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.up-plant-btn {
|
||||
width: 371.5rpx;
|
||||
height: 66.59rpx;
|
||||
color: #00A15E;
|
||||
margin: 40rpx auto;
|
||||
border: 1px solid #00A15E;
|
||||
font-weight: bold;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<view class="">
|
||||
dsfsd
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
|
@ -0,0 +1,250 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
|
||||
<view class="card">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
农户名称: 1号土地
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
种养殖类型: 土豆
|
||||
</view>
|
||||
<view class="">
|
||||
养殖头数: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
土地面积: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
公猪: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖种类: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
母猪: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
具体种类: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
幼崽: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view style="margin-bottom: 20rpx;">
|
||||
今日操作
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
喂食
|
||||
</view>
|
||||
<view class="" style="color: #00A15E;" @click="showPop=true">
|
||||
+添加喂食记录
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
注射疫苗
|
||||
</view>
|
||||
<view class="" style="color: #00A15E;">
|
||||
+添加喂食记录
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin-bottom: 20rpx;">
|
||||
具体操作内容
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
喂食
|
||||
</view>
|
||||
<view class="" style="display: flex;">
|
||||
<view class="" style="margin-right: 40rpx;">
|
||||
删除
|
||||
</view>
|
||||
<view class="" style="color: #00A15E;">
|
||||
编辑
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
饲料类型: 无机盐饲料
|
||||
</view>
|
||||
<view class="">
|
||||
饲料品牌: 双胞胎
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
喂食记录: 200kg
|
||||
</view>
|
||||
<view class="">
|
||||
备注: 双胞胎
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
疫苗注射对象
|
||||
</view>
|
||||
<view class="" style="display: flex;">
|
||||
<view class="" style="margin-right: 40rpx;">
|
||||
删除
|
||||
</view>
|
||||
<view class="" style="color: #00A15E;">
|
||||
编辑
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
疫苗名称: 无机盐饲料
|
||||
</view>
|
||||
<view class="">
|
||||
疫苗品牌: 双胞胎
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
操作人员: 200kg
|
||||
</view>
|
||||
<view class="">
|
||||
注射数量: 双胞胎
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
疫苗条形码
|
||||
<view class="code-img">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ripe-btn">
|
||||
完成今日统计
|
||||
</view>
|
||||
<!-- 组件 -->
|
||||
<view class="">
|
||||
<u-popup :show="showPop" :round="10" :closeable='true' @close="showPop=false" @open="showPop=true">
|
||||
<view class="pop-content">
|
||||
<view class="pop-tit">
|
||||
添加喂食记录
|
||||
</view>
|
||||
<view class="">
|
||||
饲料类型
|
||||
</view>
|
||||
<view class="pop-li">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="formData.value"
|
||||
@change="change"></up-input>
|
||||
</view>
|
||||
<view class="">
|
||||
饲料品牌
|
||||
</view>
|
||||
<view class="pop-li">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="formData.value"
|
||||
@change="change"></up-input>
|
||||
</view>
|
||||
|
||||
<view class="pop-confirm" @tap="confirm">
|
||||
确认
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from "vue"
|
||||
const showPop = ref(false)
|
||||
const formData = reactive({
|
||||
value: ""
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.card {
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 1px solid #EBF1EF;
|
||||
}
|
||||
|
||||
.card-li {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
.pop-content {
|
||||
padding: 20rpx;
|
||||
|
||||
.pop-tit {
|
||||
margin-bottom: 20rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.pop-li {
|
||||
margin: 20rpx 0;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.pop-confirm {
|
||||
width: 693.93rpx;
|
||||
height: 84.11rpx;
|
||||
background: linear-gradient(to right, #00A15E, #4CC593);
|
||||
color: white;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
text-align: center;
|
||||
line-height: 84rpx;
|
||||
margin-top: 70rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.ripe-btn {
|
||||
width: 588.79rpx;
|
||||
height: 84.11rpx;
|
||||
background-color: #00A15E;
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 85rpx auto;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
background: linear-gradient(to right, #00A15E, #4CC593);
|
||||
}
|
||||
|
||||
.code-img {
|
||||
background-color: red;
|
||||
height: 196.26rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,219 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="title">
|
||||
疫苗相关信息
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="card-li">
|
||||
<view class="card-li-tit">
|
||||
疫苗名称
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="value" @change="change"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="card-li-tit">
|
||||
疫苗品牌
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="value" @change="change"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="card-li-tit">
|
||||
操作人员
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="value" @change="change"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card-li">
|
||||
<view class="card-li-tit">
|
||||
疫苗条形码
|
||||
</view>
|
||||
<view class="code-img">
|
||||
<view class="carime-icon" @click="updateImgFn">
|
||||
<u--image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u--image>
|
||||
<view class="">
|
||||
点击上传图片
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="card-li-tit">
|
||||
注射对象
|
||||
</view>
|
||||
<view class="scan">
|
||||
扫描动物耳标/脚标
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view style="margin-bottom: 20rpx;" v-for="item in [1,1,1,1,1]">
|
||||
<u-swipe-action>
|
||||
<u-swipe-action-item :options="options1" style="border-radius: 20rpx;">
|
||||
<view class="" style="padding: 20rpx 30rpx;">
|
||||
<view class="swipe-action-tit">
|
||||
<view class="">
|
||||
编号: 123456
|
||||
</view>
|
||||
<view class="" style="color: #00A15E;" v-if="true">
|
||||
健康
|
||||
</view>
|
||||
<view class="" style="color: #FFD736;" v-if="0">
|
||||
怀孕中
|
||||
</view>
|
||||
<view class="" style="color: #3274F9;" v-if="0">
|
||||
可出栏
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="swipe-action-li">
|
||||
<view class="">
|
||||
养殖品种:黑山猪
|
||||
</view>
|
||||
<view class="">
|
||||
年龄: 5年
|
||||
</view>
|
||||
<view class="">
|
||||
体重: 150kg
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</u-swipe-action-item>
|
||||
</u-swipe-action>
|
||||
</view>
|
||||
|
||||
<view class="ripe-btn">
|
||||
确认
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from "vue"
|
||||
const options1 = reactive([{
|
||||
text: '删除'
|
||||
}])
|
||||
|
||||
const updateImgFn = () => {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['album'],
|
||||
success: (res) => {
|
||||
console.log('chooseImage success, temp path is', res.tempFilePaths[0])
|
||||
var imageSrc = res.tempFilePaths[0]
|
||||
uni.showLoading({
|
||||
title: '上传中'
|
||||
})
|
||||
this.task = uni.uploadFile({
|
||||
url: 'https://unidemo.dcloud.net.cn/upload', //仅为示例,非真实的接口地址
|
||||
filePath: imageSrc,
|
||||
name: 'file',
|
||||
formData: {
|
||||
'user': 'test'
|
||||
},
|
||||
success: (res) => {
|
||||
if (this.pageVisible) {
|
||||
console.log('uploadImage success, res is:', res)
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '上传成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
this.imageSrc = imageSrc
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
if (this.pageVisible) {
|
||||
console.log('uploadImage fail', err);
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('chooseImage fail', err)
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.card-li-tit {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.code-img {
|
||||
background-color: #F4F4F4;
|
||||
height: 196.26rpx;
|
||||
position: relative;
|
||||
|
||||
.carime-icon {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
.scan {
|
||||
// width: 623.83rpx;
|
||||
height: 80.61rpx;
|
||||
border: 2px solid #00A15E;
|
||||
border-radius: 50rpx;
|
||||
color: #00A15E;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
.ripe-btn {
|
||||
width: 588.79rpx;
|
||||
height: 84.11rpx;
|
||||
background-color: #00A15E;
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 85rpx auto;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
background: linear-gradient(to right, #00A15E, #4CC593);
|
||||
}
|
||||
|
||||
.swipe-action-tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #F4F4F4;
|
||||
padding-bottom: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.swipe-action-li {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// align-items: ;
|
||||
}
|
||||
</style>
|
|
@ -45,10 +45,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
companyMine
|
||||
} from "@/api/test.js"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -57,7 +57,15 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
actionsListAPI
|
||||
} from "@/api/plant.js"
|
||||
import myTable from "@/components/myTable/index.vue"
|
||||
actionsListAPI({
|
||||
type: 1
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
|
|
|
@ -0,0 +1,194 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
|
||||
|
||||
<view class="card">
|
||||
<view class="card-tit">
|
||||
<view class="" style="display: flex; align-items: center;">
|
||||
<u--image src="/static/img/bg1.png" shape="circle" style="margin: 0 5rpx;" width="84.11rpx"
|
||||
height="84.11rpx"></u--image>
|
||||
<view class="" style="margin-left: 20rpx;">
|
||||
张队长
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
管辖: 会发生肯德基回复
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li" v-if="!showMore">
|
||||
<view class="">
|
||||
监管农户: 100hu1
|
||||
</view>
|
||||
<view class="">
|
||||
涉及土地面积: 100hu1
|
||||
</view>
|
||||
</view>
|
||||
<view class="border">
|
||||
|
||||
</view>
|
||||
<view class="" v-if="showMore">
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
监管农户: 100hu1
|
||||
</view>
|
||||
<view class="">
|
||||
涉及土地面积: 100hu1
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
种植户: 100hu1
|
||||
</view>
|
||||
<view class="">
|
||||
占地面积: 100hu1
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖户-大型动物: 100hu1
|
||||
</view>
|
||||
<view class="">
|
||||
占地面积: 100hu1
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖户-禽类: 100hu1
|
||||
</view>
|
||||
<view class="">
|
||||
占地面积: 100hu1
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖户-水产: 100hu1
|
||||
</view>
|
||||
<view class="">
|
||||
占地面积: 100hu1
|
||||
</view>
|
||||
</view>
|
||||
<view class="border">
|
||||
|
||||
</view>
|
||||
<view class="detail" @click="showMore=!showMore">
|
||||
收起 <u--image src="/static/img/CKGD.png" style="margin-left: 5rpx;transform: rotate(270deg);"
|
||||
width="28.04rpx" height="28.04rpx"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detail" v-if="!showMore" @click="showMore=!showMore">
|
||||
查看监管详情 <u--image src="/static/img/CKGD.png" style="margin-left: 5rpx;transform: rotate(90deg)"
|
||||
width="28.04rpx" height="28.04rpx"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="query" @tap='showPicker=true'>
|
||||
<view class="" style="margin-right: 10rpx;">
|
||||
{{query}} (100户)
|
||||
</view>
|
||||
|
||||
<u--image src="/static/img/CKGD.png" width="35.04rpx" height="35.04rpx"></u--image>
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="card-tit">
|
||||
<view class="" style="display: flex; align-items: center;">
|
||||
<u--image src="/static/img/bg1.png" shape="circle" style="margin: 0 5rpx;" width="84.11rpx"
|
||||
height="84.11rpx"></u--image>
|
||||
<view class="" style="margin-left: 20rpx;">
|
||||
张队长
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
地址: 会发生肯德基回复
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
种养殖类别: 100户
|
||||
</view>
|
||||
<view class="">
|
||||
土地面积: 100户
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="border">
|
||||
|
||||
</view>
|
||||
<view class="">
|
||||
更新时间: 2023-10-11
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
<!-- 组件 -->
|
||||
<u-picker :show="showPicker" @close="showPicker=false" :columns="columns" @confirm="pickerConfirmFn"
|
||||
@cancel='showPicker=false' :closeOnClickOverlay='true'></u-picker>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from "vue"
|
||||
const showMore = ref(false)
|
||||
const showPicker = ref(false)
|
||||
const columns = reactive([
|
||||
['全部 ', '1队农户', '2队农户', '3队农户', '4队农户', '5队农户', '6队农户']
|
||||
]);
|
||||
const pickerConfirmFn = (e) => {
|
||||
query.value = e.value[0]
|
||||
showPicker.value = false
|
||||
}
|
||||
const query = ref("全部")
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.card {
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.card-herd {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.serch {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.card-tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.card-li {
|
||||
display: flex;
|
||||
// margin: ;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.border {
|
||||
border-bottom: 1px solid #F4F4F4;
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.detail {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.query {
|
||||
margin-bottom: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,227 @@
|
|||
<template>
|
||||
<view class="content" @click.capture="selectAct=false">
|
||||
|
||||
<view class="card">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
农户名称: 1号土地
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
种养殖类型: 土豆
|
||||
</view>
|
||||
<view class="">
|
||||
土地面积: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
联系方式: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
1号土地: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
2号土地: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
3号土地: 计划G几乎是官方
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
地址: 四川省巴中市恩阳区三
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<supervision></supervision>
|
||||
|
||||
|
||||
|
||||
<view class="title">
|
||||
<view class="">
|
||||
农户上传操作记录
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<myTable route='/pages/feedIng/allFeed'></myTable>
|
||||
<view class="ripe-btn">
|
||||
确定
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import imgCard from "@/components/imgCard.vue"
|
||||
import myTable from "@/components/myTable/index.vue"
|
||||
import supervision from "@/components/supervision/index.vue"
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from "vue"
|
||||
const selectList = reactive([
|
||||
"健康", "怀孕中", "生病隔离中", "可出栏"
|
||||
])
|
||||
const value = ref("")
|
||||
const selectAct = ref(false)
|
||||
const selectFoucsFn = (e) => {
|
||||
selectAct.value = true
|
||||
}
|
||||
const indexs = ref(0)
|
||||
const changSelectfn = (index) => {
|
||||
indexs.value = index
|
||||
value.value = selectList[index]
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.card {
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 1px solid #EBF1EF;
|
||||
}
|
||||
|
||||
.card-li {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
margin-top: 42rpx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.serch {
|
||||
position: relative;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.serch-btn {
|
||||
color: white;
|
||||
width: 115.65rpx;
|
||||
height: 63.08rpx;
|
||||
background-color: #1BAB6F;
|
||||
text-align: center;
|
||||
line-height: 63.08rpx;
|
||||
border-radius: 50rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.head-img {
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
|
||||
.poisition {
|
||||
opacity: 0.7;
|
||||
position: absolute;
|
||||
width: 380.26rpx;
|
||||
height: 71rpx;
|
||||
background-color: #FFFFFF;
|
||||
left: 20rpx;
|
||||
bottom: 36rpx;
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 29.79rpx;
|
||||
|
||||
.dw-cls {
|
||||
|
||||
margin: 0 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.up-plant-btn {
|
||||
width: 371.5rpx;
|
||||
height: 66.59rpx;
|
||||
color: #00A15E;
|
||||
margin: 40rpx auto;
|
||||
border: 1px solid #00A15E;
|
||||
font-weight: bold;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.ripe-btn {
|
||||
width: 588.79rpx;
|
||||
height: 84.11rpx;
|
||||
background-color: #00A15E;
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 85rpx auto;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
background: linear-gradient(to right, #00A15E, #4CC593);
|
||||
}
|
||||
|
||||
.select {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
.JT {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
z-index: 9999;
|
||||
transition: .2s;
|
||||
}
|
||||
|
||||
.actJT {
|
||||
transition: .2s;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
.selectvalue {
|
||||
position: absolute;
|
||||
width: 208.53rpx;
|
||||
background-color: white;
|
||||
z-index: 99;
|
||||
font-size: 26.29rpx;
|
||||
left: 90rpx;
|
||||
bottom: -250rpx;
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
padding: 0 20rpx;
|
||||
border: 1px solid #F4F4F4;
|
||||
|
||||
.select-li {
|
||||
margin: 20rpx 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.updata-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,210 @@
|
|||
<template>
|
||||
<view class="">
|
||||
<view class="content">
|
||||
<view class="border-bgc">
|
||||
</view>
|
||||
<view class="" style="height: 30rpx;">
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
<view class="card-li">
|
||||
农户名称: {{userInfo.name}}
|
||||
</view>
|
||||
<view class="card-li">
|
||||
种养殖类型: 种植户
|
||||
</view>
|
||||
<view class="card-li">
|
||||
土地面积: {{userInfo.total_land_area}}亩
|
||||
</view>
|
||||
<view class="card-li">
|
||||
地址: {{userInfo.area_name}}{{userInfo.street_name}}{{userInfo.village_name}}{{userInfo.brigade_name}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card" v-for="(item,index) in userInfo.land_detail" :key="index"
|
||||
@click="navgoFn(item.is_cropped,item.land_id)">
|
||||
<view class="tit card-li">
|
||||
<view class="">
|
||||
{{item.land_notes}}
|
||||
</view>
|
||||
<view class="" style="color: #00A15E;" v-if="item.is_cropped">
|
||||
已种植
|
||||
</view>
|
||||
<view class="" style="color: #00A15E;" v-else>
|
||||
未种植
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
面积: {{item.land_area}}亩
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li tit" v-if="item.crop_name">
|
||||
<view class="" style="font-weight: normal;">
|
||||
农作物: {{item.crop_name}}
|
||||
</view>
|
||||
<view class="" style="color: #FF9B66;" v-if="item.ripe_time">
|
||||
已成熟
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li tit" style="font-weight: normal;" v-show="item.crop_yield">
|
||||
<view class="">
|
||||
预计产量: {{item.crop_yield}}kg
|
||||
</view>
|
||||
<view class="" v-if="false">
|
||||
已出售: 500kg
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 170rpx;">
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom">
|
||||
<view class="add-btn" @click="navgo('/pages/growRecord/index')">
|
||||
批量处理
|
||||
</view>
|
||||
<view class="add-btn add" @click="navgo('/pages/InformationAdd/index')">
|
||||
增加种植
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive
|
||||
} from "vue"
|
||||
|
||||
|
||||
const userInfo = reactive({
|
||||
"id": 307,
|
||||
"create_user_id": 33,
|
||||
"company_id": 17,
|
||||
"name": "王五",
|
||||
"phone": "18148000562",
|
||||
"area_name": "纳溪区",
|
||||
"street_name": "安富街道",
|
||||
"village_name": "上坝街",
|
||||
"brigade_name": "1队",
|
||||
"is_zz_user": true,
|
||||
"is_sc_user": true,
|
||||
"is_jq_user": true,
|
||||
"is_dw_user": true,
|
||||
"total_land_area": 5000,
|
||||
"total_pond_area": 32,
|
||||
"total_henhouse_area": 0,
|
||||
"total_pasture_area": 0,
|
||||
"pond_detail": [{
|
||||
"pond_id": 74,
|
||||
"pond_area": "32",
|
||||
"pond_notes": "好看"
|
||||
},
|
||||
{
|
||||
"pond_id": 73,
|
||||
"pond_area": "",
|
||||
"pond_notes": "过好几个"
|
||||
}
|
||||
],
|
||||
"land_detail": [{
|
||||
"land_id": 69,
|
||||
"land_area": "3000",
|
||||
"land_notes": "土地二",
|
||||
"is_cropped": true,
|
||||
"source_code": "NO1698027424",
|
||||
"crop_name": "葡萄",
|
||||
"crop_variety": "阳光玫瑰",
|
||||
"crop_brand": "不知道啥品牌",
|
||||
"crop_yield": 1000,
|
||||
"seed_time": "2023-10-23 10:17:04",
|
||||
"ripe_time": "2023-10-23 16:40:01"
|
||||
},
|
||||
{
|
||||
"land_id": 68,
|
||||
"land_area": "2000",
|
||||
"land_notes": "土地一",
|
||||
"is_cropped": false
|
||||
}
|
||||
]
|
||||
})
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
const navgoFn = (type, id) => {
|
||||
|
||||
if (!type) {
|
||||
navgo("/pages/InformationAdd/index")
|
||||
} else if (type) {
|
||||
navgo(`/pages/detail/plant?land_id=${id}`)
|
||||
}
|
||||
if (type == 2) {
|
||||
navgo('/pages/detail/plant')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
min-height: 90vh;
|
||||
position: relative;
|
||||
// padding: 0 20rpx;
|
||||
// padding-top: 50rpx;
|
||||
background-color: #EAF2EF;
|
||||
padding: 0;
|
||||
|
||||
|
||||
.card {
|
||||
position: relative;
|
||||
width: 693.93rpx;
|
||||
margin: auto;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
.card-li {
|
||||
// margin-bottom: 17rpx;
|
||||
}
|
||||
|
||||
.tit {
|
||||
display: flex;
|
||||
font-size: 33.29rpx;
|
||||
font-weight: bold;
|
||||
// background-color: red;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
width: 750rpx;
|
||||
height: 150rpx;
|
||||
background-color: #EAF2EF;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.add-btn {
|
||||
width: 238.32rpx;
|
||||
height: 84.11rpx;
|
||||
border: #34D190 1px solid;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #00A15E;
|
||||
font-size: 33.29rpx;
|
||||
font-weight: bold;
|
||||
justify-content: center;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.add {
|
||||
background-color: #00A15E;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,159 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card">
|
||||
<view class="card-herd">
|
||||
<u--image src="/static/img/bg1.png" shape="circle" style="margin: 0 5rpx;" width="84.11rpx"
|
||||
height="84.11rpx"></u--image>
|
||||
<view class="">
|
||||
1号小组
|
||||
</view>
|
||||
<view class="">
|
||||
通滩指导养殖合作服务公司
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="serch">
|
||||
<view class="" style="margin-right: 61rpx;">
|
||||
监管土地
|
||||
</view>
|
||||
<u-search placeholder="搜索基地名称" :show-action="false" bgColor='white' v-model="keyword"></u-search>
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
<view class="card-tit">
|
||||
<view class="" style="display: flex; align-items: center;">
|
||||
<u--image src="/static/img/bg1.png" shape="circle" style="margin: 0 5rpx;" width="84.11rpx"
|
||||
height="84.11rpx"></u--image>
|
||||
<view class="" style="margin-left: 20rpx;">
|
||||
张队长
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
管辖: 会发生肯德基回复
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li" v-if="!showMore">
|
||||
<view class="">
|
||||
监管农户: 100hu1
|
||||
</view>
|
||||
<view class="">
|
||||
涉及土地面积: 100hu1
|
||||
</view>
|
||||
</view>
|
||||
<view class="border">
|
||||
|
||||
</view>
|
||||
<view class="" v-if="showMore">
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
监管农户: 100hu1
|
||||
</view>
|
||||
<view class="">
|
||||
涉及土地面积: 100hu1
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
种植户: 100hu1
|
||||
</view>
|
||||
<view class="">
|
||||
占地面积: 100hu1
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖户-大型动物: 100hu1
|
||||
</view>
|
||||
<view class="">
|
||||
占地面积: 100hu1
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖户-禽类: 100hu1
|
||||
</view>
|
||||
<view class="">
|
||||
占地面积: 100hu1
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖户-水产: 100hu1
|
||||
</view>
|
||||
<view class="">
|
||||
占地面积: 100hu1
|
||||
</view>
|
||||
</view>
|
||||
<view class="border">
|
||||
|
||||
</view>
|
||||
<view class="detail" @click="showMore=!showMore">
|
||||
收起 <u--image src="/static/img/CKGD.png" style="margin-left: 5rpx;transform: rotate(270deg);"
|
||||
width="28.04rpx" height="28.04rpx"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detail" v-if="!showMore" @click="showMore=!showMore">
|
||||
查看监管详情 <u--image src="/static/img/CKGD.png" style="margin-left: 5rpx;transform: rotate(90deg)"
|
||||
width="28.04rpx" height="28.04rpx"></u--image>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from "vue"
|
||||
const showMore = ref(true)
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.card {
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.card-herd {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.serch {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.card-tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.card-li {
|
||||
display: flex;
|
||||
// margin: ;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.border {
|
||||
border-bottom: 1px solid #F4F4F4;
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.detail {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
|
@ -1,11 +1,8 @@
|
|||
<template>
|
||||
<view>
|
||||
{{counter.count}}
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import {
|
||||
counterStore
|
||||
} from '@/store/counter'
|
||||
const counter = counterStore()
|
||||
|
||||
</script>
|
|
@ -1,15 +0,0 @@
|
|||
import {
|
||||
defineStore
|
||||
} from 'pinia'
|
||||
|
||||
export const counterStore = defineStore('counter', {
|
||||
state: () => ({
|
||||
count: 0
|
||||
}),
|
||||
getters: {},
|
||||
actions: {
|
||||
increment() {
|
||||
this.count++
|
||||
}
|
||||
}
|
||||
})
|
|
@ -0,0 +1,15 @@
|
|||
import {
|
||||
defineStore
|
||||
} from 'pinia'
|
||||
|
||||
export const userInfoStore = defineStore('counter', {
|
||||
state: () => ({
|
||||
user_id: ""
|
||||
}),
|
||||
getters: {},
|
||||
actions: {
|
||||
saveUserInfo(userInfo) {
|
||||
this.user_id = userInfo
|
||||
}
|
||||
}
|
||||
})
|
|
@ -2,7 +2,7 @@
|
|||
;(function(){
|
||||
let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
|
||||
const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","navigationBar":{"backgroundColor":"#F8F8F8","titleText":"uni-app","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"test","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"3.8.12","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
|
||||
const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"style":"custom","type":"default"},"isNVue":false}},{"path":"pages/InformationAdd/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"信息添加","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/growRecord/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"生长记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/detail/plant","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"详情","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/allPlant/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"全部种植","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/records/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"生长记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/profile/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"生长概况","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/feedList","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"养殖列表","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/feedDetail","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"养殖详情","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/histroyFeed","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"历史养殖记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/updateFeed","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"更新饲养状态","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/vaccineInfo","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"疫苗信息","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/addPoultry","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"添加饲养动物","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/allFeed","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"全部养殖记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/allRecording","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"全部记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/test/index","meta":{"enablePullDownRefresh":true,"navigationBar":{"titleText":"uni-app","type":"default"},"isNVue":false}},{"path":"pages/test/index1","meta":{"enablePullDownRefresh":true,"navigationBar":{"titleText":"uni-app","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
||||
const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"style":"custom","type":"default"},"isNVue":false}},{"path":"pages/InformationAdd/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"信息添加","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/growRecord/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"生长记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/detail/plant","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"详情","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/allPlant/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"全部种植","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/records/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"生长记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/profile/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"生长概况","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/feedList","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"养殖列表","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/feedDetail","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"养殖详情","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/histroyFeed","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"历史养殖记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/updateFeed","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"更新饲养状态","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/vaccineInfo","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"疫苗信息","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/addPoultry","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"添加饲养动物","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/allFeed","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"全部养殖记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/allRecording","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"全部记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/aquatic/addAquatic","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"添加养殖","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/aquatic/updateGrow","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"更新生长记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/aquatic/detail","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"详情","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/supervision/group","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"小组公司监管","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/supervision/captain","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"生产队长监管","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/supervision/farmerDeatil","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"农户详情","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/supervision/detail","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"土地详情","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/test/index","meta":{"enablePullDownRefresh":true,"navigationBar":{"titleText":"uni-app","type":"default"},"isNVue":false}},{"path":"pages/test/index1","meta":{"enablePullDownRefresh":true,"navigationBar":{"titleText":"uni-app","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
||||
__uniConfig.styles=[];//styles
|
||||
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3106,4 +3106,8 @@
|
|||
background-color: #F4F4F4;
|
||||
min-height: 100vh;
|
||||
}
|
||||
.more-jt {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
/*每个页面公共css */
|
|
@ -742,7 +742,7 @@ uni-view[data-v-9d58ba7c], uni-scroll-view[data-v-9d58ba7c], uni-swiper-item[dat
|
|||
}
|
||||
.circumstance .updata-btn[data-v-91fd8d70] {
|
||||
font-size: 0.82156rem;
|
||||
width: 6.02375rem;
|
||||
padding: 0 0.9375rem;
|
||||
height: 1.80719rem;
|
||||
border: 1px solid #00A15E;
|
||||
color: #00A15E;
|
||||
|
@ -852,13 +852,9 @@ uni-view[data-v-9d58ba7c], uni-scroll-view[data-v-9d58ba7c], uni-swiper-item[dat
|
|||
margin: auto;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 0.625rem;
|
||||
border-radius: 0.65719rem 0.65719rem 0.65719rem 0.65719rem;
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
.content .card .card-li[data-v-093aaff7] {
|
||||
margin-bottom: 0.53125rem;
|
||||
}
|
||||
.content .card .tit[data-v-093aaff7] {
|
||||
display: flex;
|
||||
font-size: 1.04031rem;
|
||||
|
@ -917,95 +913,64 @@ uni-view[data-v-9d58ba7c], uni-scroll-view[data-v-9d58ba7c], uni-swiper-item[dat
|
|||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.circumstance[data-v-bdc223d1] {
|
||||
.content[data-v-bdc223d1] {
|
||||
min-height: 90vh;
|
||||
position: relative;
|
||||
background-color: #EAF2EF;
|
||||
padding: 0;
|
||||
}
|
||||
.content .border-bgc[data-v-bdc223d1] {
|
||||
height: 6.25rem;
|
||||
background-color: #34D190;
|
||||
border-radius: 0 0 1.25rem 1.25rem;
|
||||
position: absolute;
|
||||
width: 23.4375rem;
|
||||
}
|
||||
.content .card[data-v-bdc223d1] {
|
||||
position: relative;
|
||||
width: 21.68531rem;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 1.34375rem;
|
||||
}
|
||||
.circumstance .card-tit[data-v-bdc223d1] {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 0.875rem;
|
||||
}
|
||||
.circumstance .updata-btn[data-v-bdc223d1] {
|
||||
font-size: 0.82156rem;
|
||||
width: 6.02375rem;
|
||||
height: 1.80719rem;
|
||||
border: 1px solid #00A15E;
|
||||
color: #00A15E;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 0.98563rem 0.98563rem 0.98563rem 0.98563rem;
|
||||
}
|
||||
.circumstance .check[data-v-bdc223d1] {
|
||||
font-size: 0.93094rem;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.circumstance .tab[data-v-bdc223d1] {
|
||||
height: 15.625rem;
|
||||
background-color: red;
|
||||
}
|
||||
.card .tit[data-v-bdc223d1] {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 0.625rem;
|
||||
border-bottom: 1px solid #EBF1EF;
|
||||
}
|
||||
.card .card-li[data-v-bdc223d1] {
|
||||
margin-top: 0.625rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.data .tit .tit-b[data-v-bdc223d1] {
|
||||
color: #B3B3B3;
|
||||
font-size: 0.82156rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.data .data-alanys[data-v-bdc223d1] {
|
||||
float: right;
|
||||
color: white;
|
||||
}
|
||||
.data .data-cont[data-v-bdc223d1] {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
margin-top: 0.9375rem;
|
||||
margin: auto;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.data .data-cont .data-cont-li[data-v-bdc223d1] {
|
||||
padding: 0.625rem;
|
||||
border-radius: 0.65719rem 0.65719rem 0.65719rem 0.65719rem;
|
||||
width: 9.71688rem;
|
||||
height: 6.62594rem;
|
||||
background-color: white;
|
||||
margin-bottom: 0.625rem;
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
.center[data-v-bdc223d1] {
|
||||
.content .card .card-li[data-v-bdc223d1] {
|
||||
margin-bottom: 0.53125rem;
|
||||
}
|
||||
.content .card .tit[data-v-bdc223d1] {
|
||||
display: flex;
|
||||
font-size: 1.04031rem;
|
||||
font-weight: bold;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.bottom[data-v-bdc223d1] {
|
||||
width: 23.4375rem;
|
||||
height: 4.6875rem;
|
||||
background-color: #EAF2EF;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.b-cls[data-v-bdc223d1] {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
width: 7.8125rem;
|
||||
justify-content: space-between;
|
||||
color: #4CC593;
|
||||
}
|
||||
.add-btn[data-v-bdc223d1] {
|
||||
margin: 0 auto;
|
||||
width: 6.89969rem;
|
||||
height: 1.80719rem;
|
||||
color: #00A15E;
|
||||
border: 1px solid #00A15E;
|
||||
border-radius: 1.5625rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
line-height: 1.78125rem;
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
.bottom .add-btn[data-v-bdc223d1] {
|
||||
width: 7.4475rem;
|
||||
height: 2.62844rem;
|
||||
border: #34D190 1px solid;
|
||||
border-radius: 1.31438rem 1.31438rem 1.31438rem 1.31438rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #00A15E;
|
||||
font-size: 1.04031rem;
|
||||
font-weight: bold;
|
||||
justify-content: center;
|
||||
margin-right: 0.625rem;
|
||||
}
|
||||
.bottom .add[data-v-bdc223d1] {
|
||||
background-color: #00A15E;
|
||||
color: white;
|
||||
}
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
|
@ -1044,7 +1009,7 @@ uni-view[data-v-9d58ba7c], uni-scroll-view[data-v-9d58ba7c], uni-swiper-item[dat
|
|||
}
|
||||
.circumstance .updata-btn[data-v-c4e0dba5] {
|
||||
font-size: 0.82156rem;
|
||||
width: 6.02375rem;
|
||||
padding: 0 0.9375rem;
|
||||
height: 1.80719rem;
|
||||
border: 1px solid #00A15E;
|
||||
color: #00A15E;
|
||||
|
@ -1145,7 +1110,7 @@ uni-view[data-v-9d58ba7c], uni-scroll-view[data-v-9d58ba7c], uni-swiper-item[dat
|
|||
white-space: nowrap;
|
||||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
width: 100%;
|
||||
min-width: 95vw;
|
||||
}
|
||||
.tabbar .scoll-list .scoll-list-li {
|
||||
display: inline-block;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {
|
||||
config
|
||||
} from '@/config/app';
|
||||
console.log('指定')
|
||||
|
||||
|
||||
function baseRequest(url, method, data, {
|
||||
noAuth = false,
|
||||
|
@ -14,7 +14,7 @@ function baseRequest(url, method, data, {
|
|||
return new Promise((reslove, reject) => {
|
||||
|
||||
uni.request({
|
||||
url: Url + 'adminapi' + url,
|
||||
url: Url + 'api' + url,
|
||||
method: method || 'GET',
|
||||
header: {
|
||||
...header
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
let uplodeImg = () => {
|
||||
return new Promise((reslove, reject) => {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['album'],
|
||||
success: (res) => {
|
||||
var imageSrc = res.tempFilePaths[0]
|
||||
uni.showLoading({
|
||||
title: '上传中',
|
||||
duration: 1000
|
||||
})
|
||||
let that = this
|
||||
uni.uploadFile({
|
||||
url: 'http://ceshi-suyuan.lihaink.cn/api/user/imageUpload',
|
||||
filePath: imageSrc,
|
||||
name: 'file',
|
||||
// formData: {
|
||||
// 'user': 'test'
|
||||
// },
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
title: '上传成功',
|
||||
icon: 'success',
|
||||
duration: 1000,
|
||||
})
|
||||
reslove(JSON.parse(res.data))
|
||||
|
||||
},
|
||||
fail: (err) => {
|
||||
reject(err)
|
||||
uni.showToast({
|
||||
title: '检查网络',
|
||||
duration: 1000,
|
||||
})
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
export default uplodeImg
|
Loading…
Reference in New Issue