大更新
This commit is contained in:
parent
f8c40ab799
commit
b12515b753
144
pages.json
144
pages.json
|
@ -232,6 +232,150 @@
|
|||
"navigationBarTextStyle": "white",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/feed/water",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "添加喂水记录",
|
||||
"navigationBarBackgroundColor": "#feb048",
|
||||
"navigationBarTextStyle": "white",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/feed/sterilize",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "添加消毒记录",
|
||||
"navigationBarBackgroundColor": "#feb048",
|
||||
"navigationBarTextStyle": "white",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/feed/vaccine",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "添加疫苗记录",
|
||||
"navigationBarBackgroundColor": "#feb048",
|
||||
"navigationBarTextStyle": "white",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/feed/expelling",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "添加驱虫记录",
|
||||
"navigationBarBackgroundColor": "#feb048",
|
||||
"navigationBarTextStyle": "white",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/feedDetail/feedDetail",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "操作详情",
|
||||
"navigationBarBackgroundColor": "#feb048",
|
||||
"navigationBarTextStyle": "white",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/feedDetail/expellingDetail",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "操作详情",
|
||||
"navigationBarBackgroundColor": "#feb048",
|
||||
"navigationBarTextStyle": "white",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/feedDetail/sterilizeDetail",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "操作详情",
|
||||
"navigationBarBackgroundColor": "#feb048",
|
||||
"navigationBarTextStyle": "white",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/feedDetail/vaccineDetail",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "操作详情",
|
||||
"navigationBarBackgroundColor": "#feb048",
|
||||
"navigationBarTextStyle": "white",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/feedDetail/waterDetail",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "操作详情",
|
||||
"navigationBarBackgroundColor": "#feb048",
|
||||
"navigationBarTextStyle": "white",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/plantAdmin/moreBreed",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "养殖列表",
|
||||
"navigationBarBackgroundColor": "#feb048",
|
||||
"navigationBarTextStyle": "white",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/plantAdmin/moreFeed",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "喂养列表",
|
||||
"navigationBarBackgroundColor": "#feb048",
|
||||
"navigationBarTextStyle": "white",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/record/record",
|
||||
"style" :
|
||||
{
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/jump/jump",
|
||||
"style" :
|
||||
{
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/jump/addJump",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "转栏登记",
|
||||
"navigationBarBackgroundColor": "#feb048",
|
||||
"navigationBarTextStyle": "white",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/jump/jumpDetail",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "转栏详情",
|
||||
"navigationBarBackgroundColor": "#feb048",
|
||||
"navigationBarTextStyle": "white",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,402 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card-d">
|
||||
<u--form labelWidth='130' :model="formData" :rules="rules" ref="form">
|
||||
|
||||
<view class="c-title">驱虫信息</view>
|
||||
<view class="c-box">
|
||||
<u-form-item label="驱虫药名称" prop="user" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请输入驱虫药名称" :disabled="mode=='detail'" type="txt" border="none"
|
||||
v-model="formData.user"></up-input>
|
||||
</u-form-item>
|
||||
<up-form-item label="驱虫方式" prop="master_name" borderBottom required @click="showFun=true">
|
||||
<up-input input-align="right" placeholder="请输入驱虫方式" border="none" suffixIcon="arrow-down"
|
||||
suffix-icon-style="color: #b6b6b6;" v-model="formData.fun" readonly></up-input>
|
||||
</up-form-item>
|
||||
<u-form-item label="驱虫人员" prop="start_date" @click="openDate" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请输入驱虫人员姓名" :disabled="mode=='detail'" type="number" border="none"
|
||||
v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="驱虫时间" prop="start_date" @click="openDate" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请选择时间" suffixIcon="arrow-down"
|
||||
suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.start_date"
|
||||
style="pointer-events: none;"></up-input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
<view class="card-li">
|
||||
<view class="c-title">驱虫图片</view>
|
||||
<view class="c-box c-box-p">
|
||||
<view class="code-img1">
|
||||
<view class="" v-if="pic.length>0"
|
||||
style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;">
|
||||
<view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;">
|
||||
<view class="">
|
||||
<u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)"
|
||||
v-show="mode=='add'"></u-icon>
|
||||
<u-image :src="item" width="150.85rpx" height="150.85rpx" @click="perviewFn(item)"></u-image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="code-img" v-if="mode=='add'">
|
||||
<view class="" @click="updateImgFn">
|
||||
<view class="carime-icon">
|
||||
<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="c-title">备注信息</view>
|
||||
<view class="c-box" style="padding: 0 20rpx;">
|
||||
<u-form-item prop="remark" borderBottom>
|
||||
<u--textarea v-model="formData.remark" :disabled="mode=='detail'" placeholder="请输入内容"></u--textarea>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
|
||||
</u--form>
|
||||
<u-button class="btn" v-if="mode=='add'" @click="addFn">完成添加</u-button>
|
||||
</view>
|
||||
<u-action-sheet :show="showFun" keyName="name" closeOnClickOverlay :actions="[{name:'栏舍'}, {name:'饲料槽'}, {name: '饮水设备'}]" title="请选择"
|
||||
@close="showFun = false" @select="selectFun"></u-action-sheet>
|
||||
<u-datetime-picker :show="show1" :max-date="getNowTime()" v-model="value1" mode="datetime" @confirm="dateConfirmfn"
|
||||
:formatter="formatter" @cancel="show1=false"></u-datetime-picker>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
Uploads
|
||||
} from "@/api/upload.js"
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from "vue";
|
||||
import {
|
||||
onLoad,
|
||||
onReady
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
addaction
|
||||
} from '@/api/api.js'
|
||||
const form = ref(null)
|
||||
const task_id = ref('');
|
||||
const pic = reactive([]);
|
||||
const show1 = ref(false)
|
||||
const formData = reactive({
|
||||
user: "",
|
||||
remark: "",
|
||||
pic: [],
|
||||
start_date: '',
|
||||
fun: ''
|
||||
})
|
||||
const dateConfirmfn = (e) => {
|
||||
formData.start_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
|
||||
show1.value = false
|
||||
}
|
||||
const formatter = (type, value) => {
|
||||
if (type === 'year') {
|
||||
return `${value}年`;
|
||||
}
|
||||
if (type === 'month') {
|
||||
return `${value}月`;
|
||||
}
|
||||
if (type === 'day') {
|
||||
return `${value}日`;
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const rules = {
|
||||
'user': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写参与人',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
// 'remark': {
|
||||
// type: 'string',
|
||||
// required: true,
|
||||
// message: '请填写备注',
|
||||
// trigger: ['blur', 'change']
|
||||
// },
|
||||
}
|
||||
|
||||
const showFun = ref(false);
|
||||
const selectFun = (e)=>{
|
||||
formData.fun = e.name;
|
||||
}
|
||||
|
||||
onReady(() => {
|
||||
form.value.setRules(rules);
|
||||
});
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
const openDate = () => {
|
||||
// calendar.value.open()
|
||||
show1.value = true
|
||||
// alert(455)
|
||||
}
|
||||
const value1 = ref(Date.now());
|
||||
const getNowTime = () => {
|
||||
const now = new Date();
|
||||
|
||||
|
||||
const timestamp = now.getTime();
|
||||
// console.log(timestamp)
|
||||
return timestamp
|
||||
|
||||
}
|
||||
const addFn = () => {
|
||||
form.value.validate().then(res => {
|
||||
console.log(res)
|
||||
if (res) {
|
||||
formData.pic = pic
|
||||
let data1 = {
|
||||
plant_id: task_id.value,
|
||||
type: 5,
|
||||
detail: JSON.stringify(formData)
|
||||
};
|
||||
if (formData.pic.length == 0) {
|
||||
|
||||
uni.$u.toast('请上传图片')
|
||||
return
|
||||
}
|
||||
|
||||
console.log('表单通过');
|
||||
|
||||
// 表单验证通过,执行提交操作
|
||||
|
||||
addaction(data1).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
uni.$u.toast(res.msg)
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
})
|
||||
// uni.$u.toast('校验成功')
|
||||
}
|
||||
|
||||
}).catch((err) => {
|
||||
uni.$u.toast(err[0].message)
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
//查看图片
|
||||
const perviewFn = (url) => {
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
}
|
||||
//图片删除
|
||||
const delimg = (i) => {
|
||||
pic.splice(i, 1);
|
||||
}
|
||||
//图片上传
|
||||
const updateImgFn = async () => {
|
||||
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['original', 'compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
success: (res) => {
|
||||
Uploads(res.tempFilePaths[0], 'img').then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
pic.push(res.data.url)
|
||||
console.log(data.formData)
|
||||
|
||||
uni.$u.toast('上传成功')
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}).catch(err => {
|
||||
//console.log('err', err);
|
||||
// uni.$u.toast('上传失败')
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
//console.log('choose失败');
|
||||
uni.$u.toast('添加失败')
|
||||
}
|
||||
});
|
||||
// let res = await Uploads()
|
||||
// data.formData.pic = res.data.image
|
||||
}
|
||||
const mode = ref('add')
|
||||
onLoad((options) => {
|
||||
if (options.task) {
|
||||
let data = options.task ? JSON.parse(decodeURIComponent(options.task)) : null;
|
||||
// console.log(data, data.detail)
|
||||
Object.assign(formData, data.detail);
|
||||
pic.splice(0, pic.length, ...data.detail.pic);
|
||||
|
||||
mode.value = 'detail'
|
||||
uni.setNavigationBarTitle({
|
||||
title: '收获详情'
|
||||
})
|
||||
// formData=data.detail
|
||||
|
||||
|
||||
} else {
|
||||
task_id.value = options.id
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
page {
|
||||
background-color: #fffcf5;
|
||||
}
|
||||
|
||||
.card-d {
|
||||
background-color: #fffcf5;
|
||||
padding: 0;
|
||||
padding-bottom: 80rpx;
|
||||
|
||||
.c-title {
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
padding-bottom: 15rpx;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 0.8rem;
|
||||
width: 6rpx;
|
||||
margin-top: 0.2rem;
|
||||
margin-right: 10rpx;
|
||||
background-color: #feb048;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.c-box {
|
||||
background-color: #fff;
|
||||
padding-left: 30rpx;
|
||||
padding-right: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.c-box-p {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 20rpx auto;
|
||||
width: 694rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 80rpx;
|
||||
background-color: #feb048;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card-li {
|
||||
position: relative;
|
||||
margin-bottom: 0;
|
||||
|
||||
span {
|
||||
position: absolute;
|
||||
left: -9px;
|
||||
color: #f56c6c;
|
||||
line-height: 20px;
|
||||
font-size: 20px;
|
||||
top: 3px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.confim-btn {
|
||||
margin: 0 auto;
|
||||
width: 196.26rpx;
|
||||
height: 66.59rpx;
|
||||
/* border: ; */
|
||||
border: #00A15E 1px solid;
|
||||
color: #00A15E;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
}
|
||||
|
||||
.up-img {
|
||||
width: 341.71rpx
|
||||
}
|
||||
|
||||
.today-btn {
|
||||
width: 588.79rpx;
|
||||
background-color: #00A15E;
|
||||
color: white;
|
||||
position: fixed;
|
||||
bottom: 40rpx;
|
||||
/* transform: ; */
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.confirm {
|
||||
position: fixed;
|
||||
height: 84.11rpx;
|
||||
display: flex;
|
||||
bottom: 30rpx;
|
||||
width: 750rpx;
|
||||
|
||||
.confirm-btn {
|
||||
width: 315.42rpx;
|
||||
height: 84.11rpx;
|
||||
border: #00A15E 1px solid;
|
||||
margin: 0 auto;
|
||||
border-radius: 80rpx;
|
||||
text-align: center;
|
||||
line-height: 84rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<!-- 播种 -->
|
||||
<view class="content">
|
||||
<view class="card">
|
||||
<view class="card-d">
|
||||
<u--form labelWidth='130' :model="formData" :rules="rules" ref="form">
|
||||
|
||||
<view class="c-title">喂食信息</view>
|
||||
|
@ -30,7 +30,7 @@
|
|||
</view>
|
||||
|
||||
<view class="card-li">
|
||||
<view class="c-title">收获图片</view>
|
||||
<view class="c-title">喂食图片</view>
|
||||
<view class="c-box c-box-p">
|
||||
<view class="code-img1">
|
||||
<view class="" v-if="pic.length>0"
|
||||
|
@ -273,11 +273,11 @@
|
|||
|
||||
<style lang='scss' scoped>
|
||||
page {
|
||||
background-color: #f7fffc;
|
||||
background-color: #fffcf5;
|
||||
}
|
||||
|
||||
.card {
|
||||
background-color: #f7fffc;
|
||||
.card-d {
|
||||
background-color: #fffcf5;
|
||||
padding: 0;
|
||||
padding-bottom: 80rpx;
|
||||
|
||||
|
|
|
@ -0,0 +1,410 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card-d">
|
||||
<u--form labelWidth='130' :model="formData" :rules="rules" ref="form">
|
||||
|
||||
<view class="c-title">消毒信息</view>
|
||||
<view class="c-box">
|
||||
<u-form-item label="消毒剂名称" prop="user" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请输入消毒剂名称" :disabled="mode=='detail'" type="txt" border="none"
|
||||
v-model="formData.user"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="消毒剂浓度" prop="formData.breed" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请输入消毒剂浓度" :disabled="mode=='detail'" type="number" border="none"
|
||||
v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="消毒方法" prop="start_date" @click="openDate" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请输入消毒方法" :disabled="mode=='detail'" type="number" border="none"
|
||||
v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<up-form-item label="消毒区域" prop="master_name" borderBottom required @click="showFun=true">
|
||||
<up-input input-align="right" placeholder="请选择区域" border="none" suffixIcon="arrow-down"
|
||||
suffix-icon-style="color: #b6b6b6;" v-model="formData.fun" readonly></up-input>
|
||||
</up-form-item>
|
||||
<u-form-item label="消毒人员" prop="start_date" @click="openDate" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请输入消毒人员姓名" :disabled="mode=='detail'" type="number" border="none"
|
||||
v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="消毒时间" prop="start_date" @click="openDate" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请选择时间" suffixIcon="arrow-down"
|
||||
suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.start_date"
|
||||
style="pointer-events: none;"></up-input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
<view class="card-li">
|
||||
<view class="c-title">消毒图片</view>
|
||||
<view class="c-box c-box-p">
|
||||
<view class="code-img1">
|
||||
<view class="" v-if="pic.length>0"
|
||||
style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;">
|
||||
<view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;">
|
||||
<view class="">
|
||||
<u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)"
|
||||
v-show="mode=='add'"></u-icon>
|
||||
<u-image :src="item" width="150.85rpx" height="150.85rpx" @click="perviewFn(item)"></u-image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="code-img" v-if="mode=='add'">
|
||||
<view class="" @click="updateImgFn">
|
||||
<view class="carime-icon">
|
||||
<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="c-title">备注信息</view>
|
||||
<view class="c-box" style="padding: 0 20rpx;">
|
||||
<u-form-item prop="remark" borderBottom>
|
||||
<u--textarea v-model="formData.remark" :disabled="mode=='detail'" placeholder="请输入内容"></u--textarea>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
|
||||
</u--form>
|
||||
<u-button class="btn" v-if="mode=='add'" @click="addFn">完成添加</u-button>
|
||||
</view>
|
||||
<u-action-sheet :show="showFun" keyName="name" closeOnClickOverlay :actions="[{name:'栏舍'}, {name:'饲料槽'}, {name: '饮水设备'}]" title="请选择"
|
||||
@close="showFun = false" @select="selectFun"></u-action-sheet>
|
||||
<u-datetime-picker :show="show1" :max-date="getNowTime()" v-model="value1" mode="datetime" @confirm="dateConfirmfn"
|
||||
:formatter="formatter" @cancel="show1=false"></u-datetime-picker>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
Uploads
|
||||
} from "@/api/upload.js"
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from "vue";
|
||||
import {
|
||||
onLoad,
|
||||
onReady
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
addaction
|
||||
} from '@/api/api.js'
|
||||
const form = ref(null)
|
||||
const task_id = ref('');
|
||||
const pic = reactive([]);
|
||||
const show1 = ref(false)
|
||||
const formData = reactive({
|
||||
user: "",
|
||||
remark: "",
|
||||
pic: [],
|
||||
start_date: '',
|
||||
fun: ''
|
||||
})
|
||||
const dateConfirmfn = (e) => {
|
||||
formData.start_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
|
||||
show1.value = false
|
||||
}
|
||||
const formatter = (type, value) => {
|
||||
if (type === 'year') {
|
||||
return `${value}年`;
|
||||
}
|
||||
if (type === 'month') {
|
||||
return `${value}月`;
|
||||
}
|
||||
if (type === 'day') {
|
||||
return `${value}日`;
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const rules = {
|
||||
'user': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写参与人',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
// 'remark': {
|
||||
// type: 'string',
|
||||
// required: true,
|
||||
// message: '请填写备注',
|
||||
// trigger: ['blur', 'change']
|
||||
// },
|
||||
}
|
||||
|
||||
const showFun = ref(false);
|
||||
const selectFun = (e)=>{
|
||||
formData.fun = e.name;
|
||||
}
|
||||
|
||||
onReady(() => {
|
||||
form.value.setRules(rules);
|
||||
});
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
const openDate = () => {
|
||||
// calendar.value.open()
|
||||
show1.value = true
|
||||
// alert(455)
|
||||
}
|
||||
const value1 = ref(Date.now());
|
||||
const getNowTime = () => {
|
||||
const now = new Date();
|
||||
|
||||
|
||||
const timestamp = now.getTime();
|
||||
// console.log(timestamp)
|
||||
return timestamp
|
||||
|
||||
}
|
||||
const addFn = () => {
|
||||
form.value.validate().then(res => {
|
||||
console.log(res)
|
||||
if (res) {
|
||||
formData.pic = pic
|
||||
let data1 = {
|
||||
plant_id: task_id.value,
|
||||
type: 5,
|
||||
detail: JSON.stringify(formData)
|
||||
};
|
||||
if (formData.pic.length == 0) {
|
||||
|
||||
uni.$u.toast('请上传图片')
|
||||
return
|
||||
}
|
||||
|
||||
console.log('表单通过');
|
||||
|
||||
// 表单验证通过,执行提交操作
|
||||
|
||||
addaction(data1).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
uni.$u.toast(res.msg)
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
})
|
||||
// uni.$u.toast('校验成功')
|
||||
}
|
||||
|
||||
}).catch((err) => {
|
||||
uni.$u.toast(err[0].message)
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
//查看图片
|
||||
const perviewFn = (url) => {
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
}
|
||||
//图片删除
|
||||
const delimg = (i) => {
|
||||
pic.splice(i, 1);
|
||||
}
|
||||
//图片上传
|
||||
const updateImgFn = async () => {
|
||||
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['original', 'compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
success: (res) => {
|
||||
Uploads(res.tempFilePaths[0], 'img').then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
pic.push(res.data.url)
|
||||
console.log(data.formData)
|
||||
|
||||
uni.$u.toast('上传成功')
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}).catch(err => {
|
||||
//console.log('err', err);
|
||||
// uni.$u.toast('上传失败')
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
//console.log('choose失败');
|
||||
uni.$u.toast('添加失败')
|
||||
}
|
||||
});
|
||||
// let res = await Uploads()
|
||||
// data.formData.pic = res.data.image
|
||||
}
|
||||
const mode = ref('add')
|
||||
onLoad((options) => {
|
||||
if (options.task) {
|
||||
let data = options.task ? JSON.parse(decodeURIComponent(options.task)) : null;
|
||||
// console.log(data, data.detail)
|
||||
Object.assign(formData, data.detail);
|
||||
pic.splice(0, pic.length, ...data.detail.pic);
|
||||
|
||||
mode.value = 'detail'
|
||||
uni.setNavigationBarTitle({
|
||||
title: '收获详情'
|
||||
})
|
||||
// formData=data.detail
|
||||
|
||||
|
||||
} else {
|
||||
task_id.value = options.id
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
page {
|
||||
background-color: #fffcf5;
|
||||
}
|
||||
|
||||
.card-d {
|
||||
background-color: #fffcf5;
|
||||
padding: 0;
|
||||
padding-bottom: 80rpx;
|
||||
|
||||
.c-title {
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
padding-bottom: 15rpx;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 0.8rem;
|
||||
width: 6rpx;
|
||||
margin-top: 0.2rem;
|
||||
margin-right: 10rpx;
|
||||
background-color: #feb048;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.c-box {
|
||||
background-color: #fff;
|
||||
padding-left: 30rpx;
|
||||
padding-right: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.c-box-p {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 20rpx auto;
|
||||
width: 694rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 80rpx;
|
||||
background-color: #feb048;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card-li {
|
||||
position: relative;
|
||||
margin-bottom: 0;
|
||||
|
||||
span {
|
||||
position: absolute;
|
||||
left: -9px;
|
||||
color: #f56c6c;
|
||||
line-height: 20px;
|
||||
font-size: 20px;
|
||||
top: 3px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.confim-btn {
|
||||
margin: 0 auto;
|
||||
width: 196.26rpx;
|
||||
height: 66.59rpx;
|
||||
/* border: ; */
|
||||
border: #00A15E 1px solid;
|
||||
color: #00A15E;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
}
|
||||
|
||||
.up-img {
|
||||
width: 341.71rpx
|
||||
}
|
||||
|
||||
.today-btn {
|
||||
width: 588.79rpx;
|
||||
background-color: #00A15E;
|
||||
color: white;
|
||||
position: fixed;
|
||||
bottom: 40rpx;
|
||||
/* transform: ; */
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.confirm {
|
||||
position: fixed;
|
||||
height: 84.11rpx;
|
||||
display: flex;
|
||||
bottom: 30rpx;
|
||||
width: 750rpx;
|
||||
|
||||
.confirm-btn {
|
||||
width: 315.42rpx;
|
||||
height: 84.11rpx;
|
||||
border: #00A15E 1px solid;
|
||||
margin: 0 auto;
|
||||
border-radius: 80rpx;
|
||||
text-align: center;
|
||||
line-height: 84rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,430 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card-d">
|
||||
<u--form labelWidth='130' :model="formData" :rules="rules" ref="form">
|
||||
|
||||
<view class="c-title">疫苗信息</view>
|
||||
<view class="c-box">
|
||||
<up-form-item label="疫苗名称" prop="master_name" borderBottom required @click="showName=true">
|
||||
<up-input input-align="right" placeholder="请选择疫苗" border="none" suffixIcon="arrow-down"
|
||||
suffix-icon-style="color: #b6b6b6;" v-model="formData.name" readonly></up-input>
|
||||
</up-form-item>
|
||||
<u-form-item label="疫苗厂家" prop="formData.breed" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请输入疫苗厂家" :disabled="mode=='detail'" border="none"
|
||||
v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="疫苗批次号" prop="start_date" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请输入批次号" :disabled="mode=='detail'" border="none"
|
||||
v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<up-form-item label="疫苗接种方式" prop="master_name" borderBottom required @click="showFun=true">
|
||||
<up-input input-align="right" placeholder="请选择方式" border="none" suffixIcon="arrow-down"
|
||||
suffix-icon-style="color: #b6b6b6;" v-model="formData.fun" readonly></up-input>
|
||||
</up-form-item>
|
||||
<up-form-item label="疫苗接种部位" prop="master_name" borderBottom required @click="showPart=true">
|
||||
<up-input input-align="right" placeholder="请选择接种部位" border="none" suffixIcon="arrow-down"
|
||||
suffix-icon-style="color: #b6b6b6;" v-model="formData.part" readonly></up-input>
|
||||
</up-form-item>
|
||||
<u-form-item label="免疫有限期" prop="start_date" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请输入免疫有限期" :disabled="mode=='detail'" border="none"
|
||||
v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="疫苗注射人员" prop="start_date" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请输入操作人员姓名" :disabled="mode=='detail'" border="none"
|
||||
v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="疫苗接种时间" prop="start_date" @click="openDate" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请选择时间" suffixIcon="arrow-down"
|
||||
suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.start_date"
|
||||
style="pointer-events: none;"></up-input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
<view class="card-li">
|
||||
<view class="c-title">接种图片</view>
|
||||
<view class="c-box c-box-p">
|
||||
<view class="code-img1">
|
||||
<view class="" v-if="pic.length>0"
|
||||
style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;">
|
||||
<view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;">
|
||||
<view class="">
|
||||
<u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)"
|
||||
v-show="mode=='add'"></u-icon>
|
||||
<u-image :src="item" width="150.85rpx" height="150.85rpx" @click="perviewFn(item)"></u-image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="code-img" v-if="mode=='add'">
|
||||
<view class="" @click="updateImgFn">
|
||||
<view class="carime-icon">
|
||||
<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="c-title">备注信息</view>
|
||||
<view class="c-box" style="padding: 0 20rpx;">
|
||||
<u-form-item prop="remark" borderBottom>
|
||||
<u--textarea v-model="formData.remark" :disabled="mode=='detail'" placeholder="请输入内容"></u--textarea>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
|
||||
</u--form>
|
||||
<u-button class="btn" v-if="mode=='add'" @click="addFn">完成添加</u-button>
|
||||
</view>
|
||||
<u-action-sheet :show="showName" keyName="name" closeOnClickOverlay :actions="[{name:'禽流感疫苗'}, {name:'弓形虫病疫苗'}, {name: '其他疫苗'}]" title="请选择疫苗名称"
|
||||
@close="showName = false" @select="selectName"></u-action-sheet>
|
||||
<u-action-sheet :show="showFun" keyName="name" closeOnClickOverlay :actions="[{name:'肌肉注射'}, {name:'皮下注射'}]" title="请选择接种方式"
|
||||
@close="showFun = false" @select="selectFun"></u-action-sheet>
|
||||
<u-action-sheet :show="showPart" keyName="name" closeOnClickOverlay :actions="[{name:'颈部'}, {name:'大腿'}]" title="请选择接种部位"
|
||||
@close="showPart = false" @select="selectPart"></u-action-sheet>
|
||||
<u-datetime-picker :show="show1" :max-date="getNowTime()" v-model="value1" mode="datetime" @confirm="dateConfirmfn"
|
||||
:formatter="formatter" @cancel="show1=false"></u-datetime-picker>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
Uploads
|
||||
} from "@/api/upload.js"
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from "vue";
|
||||
import {
|
||||
onLoad,
|
||||
onReady
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
addaction
|
||||
} from '@/api/api.js'
|
||||
const form = ref(null)
|
||||
const task_id = ref('');
|
||||
const pic = reactive([]);
|
||||
const show1 = ref(false)
|
||||
const formData = reactive({
|
||||
user: "",
|
||||
remark: "",
|
||||
pic: [],
|
||||
start_date: '',
|
||||
fun: ''
|
||||
})
|
||||
const dateConfirmfn = (e) => {
|
||||
formData.start_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
|
||||
show1.value = false
|
||||
}
|
||||
const formatter = (type, value) => {
|
||||
if (type === 'year') {
|
||||
return `${value}年`;
|
||||
}
|
||||
if (type === 'month') {
|
||||
return `${value}月`;
|
||||
}
|
||||
if (type === 'day') {
|
||||
return `${value}日`;
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const rules = {
|
||||
'user': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写参与人',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
// 'remark': {
|
||||
// type: 'string',
|
||||
// required: true,
|
||||
// message: '请填写备注',
|
||||
// trigger: ['blur', 'change']
|
||||
// },
|
||||
}
|
||||
|
||||
const showFun = ref(false);
|
||||
const selectFun = (e)=>{
|
||||
formData.fun = e.name;
|
||||
}
|
||||
const showPart = ref(false);
|
||||
const selectPart = (e)=>{
|
||||
formData.part = e.name;
|
||||
}
|
||||
const showName = ref(false);
|
||||
const selectName = (e)=>{
|
||||
formData.name = e.name;
|
||||
}
|
||||
|
||||
onReady(() => {
|
||||
form.value.setRules(rules);
|
||||
});
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
const openDate = () => {
|
||||
// calendar.value.open()
|
||||
show1.value = true
|
||||
// alert(455)
|
||||
}
|
||||
const value1 = ref(Date.now());
|
||||
const getNowTime = () => {
|
||||
const now = new Date();
|
||||
|
||||
|
||||
const timestamp = now.getTime();
|
||||
// console.log(timestamp)
|
||||
return timestamp
|
||||
|
||||
}
|
||||
const addFn = () => {
|
||||
form.value.validate().then(res => {
|
||||
console.log(res)
|
||||
if (res) {
|
||||
formData.pic = pic
|
||||
let data1 = {
|
||||
plant_id: task_id.value,
|
||||
type: 5,
|
||||
detail: JSON.stringify(formData)
|
||||
};
|
||||
if (formData.pic.length == 0) {
|
||||
|
||||
uni.$u.toast('请上传图片')
|
||||
return
|
||||
}
|
||||
|
||||
console.log('表单通过');
|
||||
|
||||
// 表单验证通过,执行提交操作
|
||||
|
||||
addaction(data1).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
uni.$u.toast(res.msg)
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
})
|
||||
// uni.$u.toast('校验成功')
|
||||
}
|
||||
|
||||
}).catch((err) => {
|
||||
uni.$u.toast(err[0].message)
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
//查看图片
|
||||
const perviewFn = (url) => {
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
}
|
||||
//图片删除
|
||||
const delimg = (i) => {
|
||||
pic.splice(i, 1);
|
||||
}
|
||||
//图片上传
|
||||
const updateImgFn = async () => {
|
||||
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['original', 'compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
success: (res) => {
|
||||
Uploads(res.tempFilePaths[0], 'img').then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
pic.push(res.data.url)
|
||||
console.log(data.formData)
|
||||
|
||||
uni.$u.toast('上传成功')
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}).catch(err => {
|
||||
//console.log('err', err);
|
||||
// uni.$u.toast('上传失败')
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
//console.log('choose失败');
|
||||
uni.$u.toast('添加失败')
|
||||
}
|
||||
});
|
||||
// let res = await Uploads()
|
||||
// data.formData.pic = res.data.image
|
||||
}
|
||||
const mode = ref('add')
|
||||
onLoad((options) => {
|
||||
if (options.task) {
|
||||
let data = options.task ? JSON.parse(decodeURIComponent(options.task)) : null;
|
||||
// console.log(data, data.detail)
|
||||
Object.assign(formData, data.detail);
|
||||
pic.splice(0, pic.length, ...data.detail.pic);
|
||||
|
||||
mode.value = 'detail'
|
||||
uni.setNavigationBarTitle({
|
||||
title: '收获详情'
|
||||
})
|
||||
// formData=data.detail
|
||||
|
||||
|
||||
} else {
|
||||
task_id.value = options.id
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
page {
|
||||
background-color: #fffcf5;
|
||||
}
|
||||
|
||||
.card-d {
|
||||
background-color: #fffcf5;
|
||||
padding: 0;
|
||||
padding-bottom: 80rpx;
|
||||
|
||||
.c-title {
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
padding-bottom: 15rpx;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 0.8rem;
|
||||
width: 6rpx;
|
||||
margin-top: 0.2rem;
|
||||
margin-right: 10rpx;
|
||||
background-color: #feb048;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.c-box {
|
||||
background-color: #fff;
|
||||
padding-left: 30rpx;
|
||||
padding-right: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.c-box-p {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 20rpx auto;
|
||||
width: 694rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 80rpx;
|
||||
background-color: #feb048;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card-li {
|
||||
position: relative;
|
||||
margin-bottom: 0;
|
||||
|
||||
span {
|
||||
position: absolute;
|
||||
left: -9px;
|
||||
color: #f56c6c;
|
||||
line-height: 20px;
|
||||
font-size: 20px;
|
||||
top: 3px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.confim-btn {
|
||||
margin: 0 auto;
|
||||
width: 196.26rpx;
|
||||
height: 66.59rpx;
|
||||
/* border: ; */
|
||||
border: #00A15E 1px solid;
|
||||
color: #00A15E;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
}
|
||||
|
||||
.up-img {
|
||||
width: 341.71rpx
|
||||
}
|
||||
|
||||
.today-btn {
|
||||
width: 588.79rpx;
|
||||
background-color: #00A15E;
|
||||
color: white;
|
||||
position: fixed;
|
||||
bottom: 40rpx;
|
||||
/* transform: ; */
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.confirm {
|
||||
position: fixed;
|
||||
height: 84.11rpx;
|
||||
display: flex;
|
||||
bottom: 30rpx;
|
||||
width: 750rpx;
|
||||
|
||||
.confirm-btn {
|
||||
width: 315.42rpx;
|
||||
height: 84.11rpx;
|
||||
border: #00A15E 1px solid;
|
||||
margin: 0 auto;
|
||||
border-radius: 80rpx;
|
||||
text-align: center;
|
||||
line-height: 84rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,401 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card-d">
|
||||
<u--form labelWidth='130' :model="formData" :rules="rules" ref="form">
|
||||
|
||||
<view class="c-title">喂水信息</view>
|
||||
<view class="c-box">
|
||||
<u-form-item label="喂水量(L)" prop="user" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请输入喂水量" :disabled="mode=='detail'" type="number"
|
||||
border="none" v-model="formData.user"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="喂水人员" prop="start_date" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请输入喂水人员" :disabled="mode=='detail'"
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="喂水时间" prop="start_date" @click="openDate" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请选择时间" suffixIcon="arrow-down"
|
||||
suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.start_date"
|
||||
style="pointer-events: none;"></up-input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
<view class="card-li">
|
||||
<view class="c-title">喂水图片</view>
|
||||
<view class="c-box c-box-p">
|
||||
<view class="code-img1">
|
||||
<view class="" v-if="pic.length>0"
|
||||
style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;">
|
||||
<view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;">
|
||||
<view class="">
|
||||
<u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)"
|
||||
v-show="mode=='add'"></u-icon>
|
||||
<u-image :src="item" width="150.85rpx" height="150.85rpx"
|
||||
@click="perviewFn(item)"></u-image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="code-img" v-if="mode=='add'">
|
||||
<view class="" @click="updateImgFn">
|
||||
<view class="carime-icon">
|
||||
<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="c-title">备注信息</view>
|
||||
<view class="c-box" style="padding: 0 20rpx;">
|
||||
<u-form-item prop="remark" borderBottom>
|
||||
<u--textarea v-model="formData.remark" :disabled="mode=='detail'"
|
||||
placeholder="请输入内容"></u--textarea>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
|
||||
</u--form>
|
||||
<u-button class="btn" v-if="mode=='add'" @click="addFn">完成添加</u-button>
|
||||
</view>
|
||||
<u-datetime-picker :show="show1" :max-date="getNowTime()" v-model="value1" mode="datetime"
|
||||
@confirm="dateConfirmfn" :formatter="formatter" @cancel="show1=false"></u-datetime-picker>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
Uploads
|
||||
} from "@/api/upload.js"
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from "vue";
|
||||
import {
|
||||
onLoad,
|
||||
onReady
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
addaction
|
||||
} from '@/api/api.js'
|
||||
|
||||
const form = ref(null)
|
||||
const task_id = ref('');
|
||||
const pic = reactive([]);
|
||||
const show1 = ref(false)
|
||||
const formData = reactive({
|
||||
user: "",
|
||||
remark: "",
|
||||
pic: [],
|
||||
start_date: ''
|
||||
})
|
||||
const dateConfirmfn = (e) => {
|
||||
formData.start_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
|
||||
show1.value = false
|
||||
}
|
||||
const formatter = (type, value) => {
|
||||
if (type === 'year') {
|
||||
return `${value}年`;
|
||||
}
|
||||
if (type === 'month') {
|
||||
return `${value}月`;
|
||||
}
|
||||
if (type === 'day') {
|
||||
return `${value}日`;
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const rules = {
|
||||
'user': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写参与人',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
// 'remark': {
|
||||
// type: 'string',
|
||||
// required: true,
|
||||
// message: '请填写备注',
|
||||
// trigger: ['blur', 'change']
|
||||
// },
|
||||
}
|
||||
onReady(() => {
|
||||
form.value.setRules(rules);
|
||||
|
||||
});
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
const openDate = () => {
|
||||
// calendar.value.open()
|
||||
show1.value = true
|
||||
// alert(455)
|
||||
}
|
||||
const value1 = ref(Date.now());
|
||||
const getNowTime = () => {
|
||||
const now = new Date();
|
||||
|
||||
|
||||
const timestamp = now.getTime();
|
||||
// console.log(timestamp)
|
||||
return timestamp
|
||||
|
||||
}
|
||||
const addFn = () => {
|
||||
form.value.validate().then(res => {
|
||||
console.log(res)
|
||||
if (res) {
|
||||
|
||||
|
||||
|
||||
|
||||
formData.pic = pic
|
||||
let data1 = {
|
||||
plant_id: task_id.value,
|
||||
type: 5,
|
||||
detail: JSON.stringify(formData)
|
||||
};
|
||||
if (formData.pic.length == 0) {
|
||||
|
||||
uni.$u.toast('请上传图片')
|
||||
return
|
||||
}
|
||||
|
||||
console.log('表单通过');
|
||||
|
||||
// 表单验证通过,执行提交操作
|
||||
|
||||
addaction(data1).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
uni.$u.toast(res.msg)
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
})
|
||||
// uni.$u.toast('校验成功')
|
||||
}
|
||||
|
||||
}).catch((err) => {
|
||||
uni.$u.toast(err[0].message)
|
||||
console.log(err)
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
//查看图片
|
||||
const perviewFn = (url) => {
|
||||
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
}
|
||||
//图片删除
|
||||
const delimg = (i) => {
|
||||
pic.splice(i, 1);
|
||||
}
|
||||
//图片上传
|
||||
const updateImgFn = async () => {
|
||||
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['original', 'compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
success: (res) => {
|
||||
Uploads(res.tempFilePaths[0], 'img').then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
pic.push(res.data.url)
|
||||
console.log(data.formData)
|
||||
|
||||
uni.$u.toast('上传成功')
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}).catch(err => {
|
||||
//console.log('err', err);
|
||||
// uni.$u.toast('上传失败')
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
//console.log('choose失败');
|
||||
uni.$u.toast('添加失败')
|
||||
}
|
||||
});
|
||||
// let res = await Uploads()
|
||||
// data.formData.pic = res.data.image
|
||||
}
|
||||
const mode = ref('add')
|
||||
onLoad((options) => {
|
||||
if (options.task) {
|
||||
let data = options.task ? JSON.parse(decodeURIComponent(options.task)) : null;
|
||||
// console.log(data, data.detail)
|
||||
Object.assign(formData, data.detail);
|
||||
pic.splice(0, pic.length, ...data.detail.pic);
|
||||
|
||||
mode.value = 'detail'
|
||||
uni.setNavigationBarTitle({
|
||||
title: '收获详情'
|
||||
})
|
||||
// formData=data.detail
|
||||
|
||||
|
||||
} else {
|
||||
task_id.value = options.id
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
page {
|
||||
background-color: #fffcf5;
|
||||
}
|
||||
|
||||
.card-d {
|
||||
background-color: #fffcf5;
|
||||
padding: 0;
|
||||
padding-bottom: 80rpx;
|
||||
|
||||
.c-title {
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
padding-bottom: 15rpx;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 0.8rem;
|
||||
width: 6rpx;
|
||||
margin-top: 0.2rem;
|
||||
margin-right: 10rpx;
|
||||
background-color: #feb048;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.c-box {
|
||||
background-color: #fff;
|
||||
padding-left: 30rpx;
|
||||
padding-right: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.c-box-p {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 20rpx auto;
|
||||
width: 694rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 80rpx;
|
||||
background-color: #feb048;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card-li {
|
||||
position: relative;
|
||||
margin-bottom: 0;
|
||||
|
||||
span {
|
||||
position: absolute;
|
||||
left: -9px;
|
||||
color: #f56c6c;
|
||||
line-height: 20px;
|
||||
font-size: 20px;
|
||||
top: 3px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.confim-btn {
|
||||
margin: 0 auto;
|
||||
width: 196.26rpx;
|
||||
height: 66.59rpx;
|
||||
/* border: ; */
|
||||
border: #00A15E 1px solid;
|
||||
color: #00A15E;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
}
|
||||
|
||||
.up-img {
|
||||
width: 341.71rpx
|
||||
}
|
||||
|
||||
.today-btn {
|
||||
width: 588.79rpx;
|
||||
background-color: #00A15E;
|
||||
color: white;
|
||||
position: fixed;
|
||||
bottom: 40rpx;
|
||||
/* transform: ; */
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.confirm {
|
||||
position: fixed;
|
||||
height: 84.11rpx;
|
||||
display: flex;
|
||||
bottom: 30rpx;
|
||||
width: 750rpx;
|
||||
|
||||
.confirm-btn {
|
||||
width: 315.42rpx;
|
||||
height: 84.11rpx;
|
||||
border: #00A15E 1px solid;
|
||||
margin: 0 auto;
|
||||
border-radius: 80rpx;
|
||||
text-align: center;
|
||||
line-height: 84rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,125 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card-d">
|
||||
<u--form labelWidth='130' :model="formData" :rules="rules" ref="form">
|
||||
<view class="c-title">驱虫信息</view>
|
||||
<view class="c-box">
|
||||
<u-form-item label="驱虫药名称" borderBottom>
|
||||
<up-input readonly type="txt"
|
||||
border="none" v-model="formData.user"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="驱虫方式" borderBottom>
|
||||
<up-input readonly type="number"
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="操作人员" borderBottom >
|
||||
<up-input readonly type="number"
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="驱虫时间" borderBottom >
|
||||
<up-input type="number" readonly
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<swiper class="swiper" autoplay indicator-dots indicator-active-color="#ffb049" indicator-color="rgba(255,255,255,0.4)">
|
||||
<swiper-item class="swiper-item" v-for="(item, index) in 2" :key="index">
|
||||
<image class="img" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/91fb0202311021455371420.jpg"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<u-form-item label="备注" borderBottom >
|
||||
<view class="">
|
||||
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</u--form>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from "vue";
|
||||
import {
|
||||
onLoad,
|
||||
onReady
|
||||
} from "@dcloudio/uni-app"
|
||||
|
||||
const formData = reactive({
|
||||
user: "",
|
||||
remark: "",
|
||||
pic: [],
|
||||
start_date: '',
|
||||
notes: ''
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
page {
|
||||
background-color: #fffcf5;
|
||||
}
|
||||
|
||||
.card-d {
|
||||
background-color: #fffcf5;
|
||||
|
||||
.c-title {
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
padding-bottom: 15rpx;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 0.8rem;
|
||||
width: 6rpx;
|
||||
margin-top: 0.2rem;
|
||||
margin-right: 10rpx;
|
||||
background-color: #feb048;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.c-box {
|
||||
background-color: #fff;
|
||||
padding: 20rpx;
|
||||
margin: 28rpx;
|
||||
margin-top: 0;
|
||||
border-radius: 14rpx;
|
||||
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.c-box-p {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 20rpx auto;
|
||||
width: 694rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 80rpx;
|
||||
background-color: #feb048;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper{
|
||||
width: 654rpx;
|
||||
height: 400rpx;
|
||||
margin: 20rpx 0;
|
||||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
.img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.u-form-item__body){
|
||||
padding: 5rpx 0 !important;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,129 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card-d">
|
||||
<u--form labelWidth='130' :model="formData" :rules="rules" ref="form">
|
||||
<view class="c-title">喂食信息</view>
|
||||
<view class="c-box">
|
||||
<u-form-item label="饲料种类" borderBottom>
|
||||
<up-input readonly type="txt"
|
||||
border="none" v-model="formData.user"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="饲料品牌" borderBottom>
|
||||
<up-input readonly type="number"
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="饲料消耗量(kg)" borderBottom >
|
||||
<up-input readonly type="number"
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="喂养人员" borderBottom >
|
||||
<up-input readonly type="number"
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="喂食时间" borderBottom >
|
||||
<up-input type="number" readonly
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<swiper class="swiper" autoplay indicator-dots indicator-active-color="#ffb049" indicator-color="rgba(255,255,255,0.4)">
|
||||
<swiper-item class="swiper-item" v-for="(item, index) in 2" :key="index">
|
||||
<image class="img" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/91fb0202311021455371420.jpg"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<u-form-item label="备注" borderBottom >
|
||||
<view class="">
|
||||
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</u--form>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from "vue";
|
||||
import {
|
||||
onLoad,
|
||||
onReady
|
||||
} from "@dcloudio/uni-app"
|
||||
|
||||
const formData = reactive({
|
||||
user: "",
|
||||
remark: "",
|
||||
pic: [],
|
||||
start_date: '',
|
||||
notes: ''
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
page {
|
||||
background-color: #fffcf5;
|
||||
}
|
||||
|
||||
.card-d {
|
||||
background-color: #fffcf5;
|
||||
|
||||
.c-title {
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
padding-bottom: 15rpx;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 0.8rem;
|
||||
width: 6rpx;
|
||||
margin-top: 0.2rem;
|
||||
margin-right: 10rpx;
|
||||
background-color: #feb048;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.c-box {
|
||||
background-color: #fff;
|
||||
padding: 20rpx;
|
||||
margin: 28rpx;
|
||||
margin-top: 0;
|
||||
border-radius: 14rpx;
|
||||
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.c-box-p {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 20rpx auto;
|
||||
width: 694rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 80rpx;
|
||||
background-color: #feb048;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper{
|
||||
width: 654rpx;
|
||||
height: 400rpx;
|
||||
margin: 20rpx 0;
|
||||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
.img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.u-form-item__body){
|
||||
padding: 5rpx 0 !important;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,133 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card-d">
|
||||
<u--form labelWidth='130' :model="formData" :rules="rules" ref="form">
|
||||
<view class="c-title">消毒信息</view>
|
||||
<view class="c-box">
|
||||
<u-form-item label="消毒剂名称" borderBottom>
|
||||
<up-input readonly type="txt"
|
||||
border="none" v-model="formData.user"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="消毒剂浓度" borderBottom>
|
||||
<up-input readonly type="number"
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="消毒方法" borderBottom>
|
||||
<up-input readonly type="number"
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="消毒区域" borderBottom>
|
||||
<up-input readonly type="number"
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="消毒人员" borderBottom >
|
||||
<up-input readonly type="number"
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="消毒时间" borderBottom >
|
||||
<up-input type="number" readonly
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<swiper class="swiper" autoplay indicator-dots indicator-active-color="#ffb049" indicator-color="rgba(255,255,255,0.4)">
|
||||
<swiper-item class="swiper-item" v-for="(item, index) in 2" :key="index">
|
||||
<image class="img" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/91fb0202311021455371420.jpg"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<u-form-item label="备注" borderBottom >
|
||||
<view class="">
|
||||
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</u--form>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from "vue";
|
||||
import {
|
||||
onLoad,
|
||||
onReady
|
||||
} from "@dcloudio/uni-app"
|
||||
|
||||
const formData = reactive({
|
||||
user: "",
|
||||
remark: "",
|
||||
pic: [],
|
||||
start_date: '',
|
||||
notes: ''
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
page {
|
||||
background-color: #fffcf5;
|
||||
}
|
||||
|
||||
.card-d {
|
||||
background-color: #fffcf5;
|
||||
|
||||
.c-title {
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
padding-bottom: 15rpx;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 0.8rem;
|
||||
width: 6rpx;
|
||||
margin-top: 0.2rem;
|
||||
margin-right: 10rpx;
|
||||
background-color: #feb048;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.c-box {
|
||||
background-color: #fff;
|
||||
padding: 20rpx;
|
||||
margin: 28rpx;
|
||||
margin-top: 0;
|
||||
border-radius: 14rpx;
|
||||
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.c-box-p {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 20rpx auto;
|
||||
width: 694rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 80rpx;
|
||||
background-color: #feb048;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper{
|
||||
width: 654rpx;
|
||||
height: 400rpx;
|
||||
margin: 20rpx 0;
|
||||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
.img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.u-form-item__body){
|
||||
padding: 5rpx 0 !important;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,141 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card-d">
|
||||
<u--form labelWidth='130' :model="formData" :rules="rules" ref="form">
|
||||
<view class="c-title">疫苗信息</view>
|
||||
<view class="c-box">
|
||||
<u-form-item label="疫苗名称" borderBottom>
|
||||
<up-input readonly type="txt"
|
||||
border="none" v-model="formData.user"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="疫苗厂家" borderBottom>
|
||||
<up-input readonly type="number"
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="疫苗批次号" borderBottom>
|
||||
<up-input readonly type="number"
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="接种方式" borderBottom >
|
||||
<up-input readonly type="number"
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="接种部位" borderBottom>
|
||||
<up-input readonly type="number"
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="免疫有限期" borderBottom >
|
||||
<up-input type="number" readonly
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="注射人员" borderBottom >
|
||||
<up-input type="number" readonly
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="接种时间" borderBottom >
|
||||
<up-input type="number" readonly
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<swiper class="swiper" autoplay indicator-dots indicator-active-color="#ffb049" indicator-color="rgba(255,255,255,0.4)">
|
||||
<swiper-item class="swiper-item" v-for="(item, index) in 2" :key="index">
|
||||
<image class="img" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/91fb0202311021455371420.jpg"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<u-form-item label="备注" borderBottom >
|
||||
<view class="">
|
||||
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</u--form>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from "vue";
|
||||
import {
|
||||
onLoad,
|
||||
onReady
|
||||
} from "@dcloudio/uni-app"
|
||||
|
||||
const formData = reactive({
|
||||
user: "",
|
||||
remark: "",
|
||||
pic: [],
|
||||
start_date: '',
|
||||
notes: ''
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
page {
|
||||
background-color: #fffcf5;
|
||||
}
|
||||
|
||||
.card-d {
|
||||
background-color: #fffcf5;
|
||||
|
||||
.c-title {
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
padding-bottom: 15rpx;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 0.8rem;
|
||||
width: 6rpx;
|
||||
margin-top: 0.2rem;
|
||||
margin-right: 10rpx;
|
||||
background-color: #feb048;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.c-box {
|
||||
background-color: #fff;
|
||||
padding: 20rpx;
|
||||
margin: 28rpx;
|
||||
margin-top: 0;
|
||||
border-radius: 14rpx;
|
||||
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.c-box-p {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 20rpx auto;
|
||||
width: 694rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 80rpx;
|
||||
background-color: #feb048;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper{
|
||||
width: 654rpx;
|
||||
height: 400rpx;
|
||||
margin: 20rpx 0;
|
||||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
.img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.u-form-item__body){
|
||||
padding: 5rpx 0 !important;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,121 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card-d">
|
||||
<u--form labelWidth='130' :model="formData" :rules="rules" ref="form">
|
||||
<view class="c-title">喂水信息</view>
|
||||
<view class="c-box">
|
||||
<u-form-item label="喂水量(L)" borderBottom>
|
||||
<up-input readonly type="number"
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="喂水人员" borderBottom >
|
||||
<up-input readonly type="number"
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="喂水时间" borderBottom >
|
||||
<up-input type="number" readonly
|
||||
border="none" v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<swiper class="swiper" autoplay indicator-dots indicator-active-color="#ffb049" indicator-color="rgba(255,255,255,0.4)">
|
||||
<swiper-item class="swiper-item" v-for="(item, index) in 2" :key="index">
|
||||
<image class="img" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/91fb0202311021455371420.jpg"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<u-form-item label="备注" borderBottom >
|
||||
<view class="">
|
||||
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</u--form>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from "vue";
|
||||
import {
|
||||
onLoad,
|
||||
onReady
|
||||
} from "@dcloudio/uni-app"
|
||||
|
||||
const formData = reactive({
|
||||
user: "",
|
||||
remark: "",
|
||||
pic: [],
|
||||
start_date: '',
|
||||
notes: ''
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
page {
|
||||
background-color: #fffcf5;
|
||||
}
|
||||
|
||||
.card-d {
|
||||
background-color: #fffcf5;
|
||||
|
||||
.c-title {
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
padding-bottom: 15rpx;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 0.8rem;
|
||||
width: 6rpx;
|
||||
margin-top: 0.2rem;
|
||||
margin-right: 10rpx;
|
||||
background-color: #feb048;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.c-box {
|
||||
background-color: #fff;
|
||||
padding: 20rpx;
|
||||
margin: 28rpx;
|
||||
margin-top: 0;
|
||||
border-radius: 14rpx;
|
||||
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.c-box-p {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 20rpx auto;
|
||||
width: 694rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 80rpx;
|
||||
background-color: #feb048;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper{
|
||||
width: 654rpx;
|
||||
height: 400rpx;
|
||||
margin: 20rpx 0;
|
||||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
.img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.u-form-item__body){
|
||||
padding: 5rpx 0 !important;
|
||||
}
|
||||
</style>
|
|
@ -51,14 +51,14 @@
|
|||
tips: '档案新增、档案详情/编辑',
|
||||
bg: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/3246c202312191633441356.png',
|
||||
color: '#1f84cc',
|
||||
url: ''
|
||||
url: '/pages/record/record'
|
||||
},
|
||||
{
|
||||
name: '转栏记录',
|
||||
tips: '转入/转出舍栏、转栏时间',
|
||||
bg: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/cee51202312191634095436.png',
|
||||
color: '#c36136',
|
||||
url: ''
|
||||
url: '/pages/jump/jump'
|
||||
},
|
||||
{
|
||||
name: '离栏记录',
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="(dataobj.total_area-dataobj.residual_area)==0" @click="palnt(dataobj.id)">
|
||||
<!-- <view v-if="(dataobj.total_area-dataobj.residual_area)==0" @click="palnt(dataobj.id)">
|
||||
<view class="empty-land" style="background-image: url('static/main/index/xzzh.png');">
|
||||
<text></text>
|
||||
<text>去新增》</text>
|
||||
|
@ -82,7 +82,7 @@
|
|||
<u--image v-if="columns2[0]&&columns2[0].length>0" @click="showPicker1=true" :src="u('qtj')"
|
||||
click="showPicker1=true" width="170rpx" height="40rpx"
|
||||
style="position: absolute;right: 80rpx;top: 80rpx;"></u--image>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="live-tit" style="color: #1A1A1A;">
|
||||
<view class="tit" style="">
|
||||
养殖场监控数据
|
||||
|
|
|
@ -0,0 +1,381 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card-d">
|
||||
<u--form labelWidth='130' :model="formData" :rules="rules" ref="form">
|
||||
|
||||
<view class="c-title">转栏信息</view>
|
||||
<view class="c-box">
|
||||
<u-form-item label="耳号" prop="formData.breed" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请输入耳号" :disabled="mode=='detail'" border="none"
|
||||
v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<up-form-item label="转出栏舍" prop="master_name" borderBottom required @click="showFun=true">
|
||||
<up-input input-align="right" placeholder="请选择转出栏舍" border="none" suffixIcon="arrow-down"
|
||||
suffix-icon-style="color: #b6b6b6;" v-model="formData.fun" readonly></up-input>
|
||||
</up-form-item>
|
||||
<up-form-item label="转入栏舍" prop="master_name" borderBottom required @click="showPart=true">
|
||||
<up-input input-align="right" placeholder="请选择转入栏舍" border="none" suffixIcon="arrow-down"
|
||||
suffix-icon-style="color: #b6b6b6;" v-model="formData.part" readonly></up-input>
|
||||
</up-form-item>
|
||||
<u-form-item label="操作人员" prop="start_date" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请输入操作人员姓名" :disabled="mode=='detail'" border="none"
|
||||
v-model="formData.breed"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="转舍时间" prop="start_date" @click="openDate" borderBottom required>
|
||||
<up-input input-align="right" placeholder="请选择时间" suffixIcon="arrow-down"
|
||||
suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.start_date"
|
||||
style="pointer-events: none;"></up-input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
<view class="c-title">备注信息</view>
|
||||
<view class="c-box" style="padding: 0 20rpx;">
|
||||
<u-form-item prop="remark" borderBottom>
|
||||
<u--textarea v-model="formData.remark" :disabled="mode=='detail'" placeholder="请输入内容"></u--textarea>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
|
||||
</u--form>
|
||||
<u-button class="btn" v-if="mode=='add'" @click="addFn">完成添加</u-button>
|
||||
</view>
|
||||
<u-action-sheet :show="showFun" keyName="name" closeOnClickOverlay :actions="[{name:'栏舍1'}, {name:'栏舍2'}]" title="请选择接种方式"
|
||||
@close="showFun = false" @select="selectFun"></u-action-sheet>
|
||||
<u-action-sheet :show="showPart" keyName="name" closeOnClickOverlay :actions="[{name:'栏舍1'}, {name:'栏舍2'}]" title="请选择接种部位"
|
||||
@close="showPart = false" @select="selectPart"></u-action-sheet>
|
||||
<u-datetime-picker :show="show1" :max-date="getNowTime()" v-model="value1" mode="datetime" @confirm="dateConfirmfn"
|
||||
:formatter="formatter" @cancel="show1=false"></u-datetime-picker>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
Uploads
|
||||
} from "@/api/upload.js"
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from "vue";
|
||||
import {
|
||||
onLoad,
|
||||
onReady
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
addaction
|
||||
} from '@/api/api.js'
|
||||
const form = ref(null)
|
||||
const task_id = ref('');
|
||||
const pic = reactive([]);
|
||||
const show1 = ref(false)
|
||||
const formData = reactive({
|
||||
user: "",
|
||||
remark: "",
|
||||
pic: [],
|
||||
start_date: '',
|
||||
fun: ''
|
||||
})
|
||||
const dateConfirmfn = (e) => {
|
||||
formData.start_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
|
||||
show1.value = false
|
||||
}
|
||||
const formatter = (type, value) => {
|
||||
if (type === 'year') {
|
||||
return `${value}年`;
|
||||
}
|
||||
if (type === 'month') {
|
||||
return `${value}月`;
|
||||
}
|
||||
if (type === 'day') {
|
||||
return `${value}日`;
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const rules = {
|
||||
'user': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写参与人',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
// 'remark': {
|
||||
// type: 'string',
|
||||
// required: true,
|
||||
// message: '请填写备注',
|
||||
// trigger: ['blur', 'change']
|
||||
// },
|
||||
}
|
||||
|
||||
const showFun = ref(false);
|
||||
const selectFun = (e)=>{
|
||||
formData.fun = e.name;
|
||||
}
|
||||
const showPart = ref(false);
|
||||
const selectPart = (e)=>{
|
||||
formData.part = e.name;
|
||||
}
|
||||
|
||||
onReady(() => {
|
||||
form.value.setRules(rules);
|
||||
});
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
const openDate = () => {
|
||||
// calendar.value.open()
|
||||
show1.value = true
|
||||
// alert(455)
|
||||
}
|
||||
const value1 = ref(Date.now());
|
||||
const getNowTime = () => {
|
||||
const now = new Date();
|
||||
|
||||
|
||||
const timestamp = now.getTime();
|
||||
// console.log(timestamp)
|
||||
return timestamp
|
||||
|
||||
}
|
||||
const addFn = () => {
|
||||
form.value.validate().then(res => {
|
||||
console.log(res)
|
||||
if (res) {
|
||||
formData.pic = pic
|
||||
let data1 = {
|
||||
plant_id: task_id.value,
|
||||
type: 5,
|
||||
detail: JSON.stringify(formData)
|
||||
};
|
||||
if (formData.pic.length == 0) {
|
||||
|
||||
uni.$u.toast('请上传图片')
|
||||
return
|
||||
}
|
||||
|
||||
console.log('表单通过');
|
||||
|
||||
// 表单验证通过,执行提交操作
|
||||
|
||||
addaction(data1).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
uni.$u.toast(res.msg)
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
})
|
||||
// uni.$u.toast('校验成功')
|
||||
}
|
||||
|
||||
}).catch((err) => {
|
||||
uni.$u.toast(err[0].message)
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
//查看图片
|
||||
const perviewFn = (url) => {
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
}
|
||||
//图片删除
|
||||
const delimg = (i) => {
|
||||
pic.splice(i, 1);
|
||||
}
|
||||
//图片上传
|
||||
const updateImgFn = async () => {
|
||||
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['original', 'compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
success: (res) => {
|
||||
Uploads(res.tempFilePaths[0], 'img').then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
pic.push(res.data.url)
|
||||
console.log(data.formData)
|
||||
|
||||
uni.$u.toast('上传成功')
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}).catch(err => {
|
||||
//console.log('err', err);
|
||||
// uni.$u.toast('上传失败')
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
//console.log('choose失败');
|
||||
uni.$u.toast('添加失败')
|
||||
}
|
||||
});
|
||||
// let res = await Uploads()
|
||||
// data.formData.pic = res.data.image
|
||||
}
|
||||
const mode = ref('add')
|
||||
onLoad((options) => {
|
||||
if (options.task) {
|
||||
let data = options.task ? JSON.parse(decodeURIComponent(options.task)) : null;
|
||||
// console.log(data, data.detail)
|
||||
Object.assign(formData, data.detail);
|
||||
pic.splice(0, pic.length, ...data.detail.pic);
|
||||
|
||||
mode.value = 'detail'
|
||||
uni.setNavigationBarTitle({
|
||||
title: '收获详情'
|
||||
})
|
||||
// formData=data.detail
|
||||
|
||||
|
||||
} else {
|
||||
task_id.value = options.id
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
page {
|
||||
background-color: #fffcf5;
|
||||
}
|
||||
|
||||
.card-d {
|
||||
background-color: #fffcf5;
|
||||
padding: 0;
|
||||
padding-bottom: 80rpx;
|
||||
|
||||
.c-title {
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
padding-bottom: 15rpx;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 0.8rem;
|
||||
width: 6rpx;
|
||||
margin-top: 0.2rem;
|
||||
margin-right: 10rpx;
|
||||
background-color: #feb048;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.c-box {
|
||||
background-color: #fff;
|
||||
padding-left: 30rpx;
|
||||
padding-right: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.c-box-p {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 20rpx auto;
|
||||
width: 694rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 80rpx;
|
||||
background-color: #feb048;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card-li {
|
||||
position: relative;
|
||||
margin-bottom: 0;
|
||||
|
||||
span {
|
||||
position: absolute;
|
||||
left: -9px;
|
||||
color: #f56c6c;
|
||||
line-height: 20px;
|
||||
font-size: 20px;
|
||||
top: 3px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.confim-btn {
|
||||
margin: 0 auto;
|
||||
width: 196.26rpx;
|
||||
height: 66.59rpx;
|
||||
/* border: ; */
|
||||
border: #00A15E 1px solid;
|
||||
color: #00A15E;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
}
|
||||
|
||||
.up-img {
|
||||
width: 341.71rpx
|
||||
}
|
||||
|
||||
.today-btn {
|
||||
width: 588.79rpx;
|
||||
background-color: #00A15E;
|
||||
color: white;
|
||||
position: fixed;
|
||||
bottom: 40rpx;
|
||||
/* transform: ; */
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.confirm {
|
||||
position: fixed;
|
||||
height: 84.11rpx;
|
||||
display: flex;
|
||||
bottom: 30rpx;
|
||||
width: 750rpx;
|
||||
|
||||
.confirm-btn {
|
||||
width: 315.42rpx;
|
||||
height: 84.11rpx;
|
||||
border: #00A15E 1px solid;
|
||||
margin: 0 auto;
|
||||
border-radius: 80rpx;
|
||||
text-align: center;
|
||||
line-height: 84rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,251 @@
|
|||
<template>
|
||||
<view style="position: relative;">
|
||||
<view class="top">
|
||||
<view class="" style="height:var(--status-bar-height) ;">
|
||||
</view>
|
||||
<view class="nav-con">
|
||||
<view class="left"></view>
|
||||
<view class="title" @click="navBack">
|
||||
<u-icon name="arrow-left" color="#fff" style="margin-right: 10rpx;"></u-icon> <text
|
||||
style="padding-bottom: 5rpx;">转栏记录</text>
|
||||
</view>
|
||||
<view class="btn" style="margin-top: -5rpx;">
|
||||
<u-icon name="plus" color="#fff" style="margin-right: 20rpx;"
|
||||
@click="navTo('/pages/jump/addJump')"></u-icon>
|
||||
<Myindex url='/pages/index/massif' />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="height:var(--status-bar-height) ;">
|
||||
</view>
|
||||
<view class="nav-con">
|
||||
</view>
|
||||
|
||||
<view class="content">
|
||||
<view class="serch">
|
||||
<u-search bgColor="white" :show-action="false" placeholder="请输入耳号" v-model="searchKey" shape="round"
|
||||
:clearabled='false' @change="inputval"></u-search>
|
||||
<view class="ser-text" @click="search">
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
<view class="tits">
|
||||
转栏信息
|
||||
</view>
|
||||
<view class="">
|
||||
<block class="" v-if="dataList.length>0">
|
||||
<view class="thing-card" v-for="(item, index) in dataList" :key="index" @click="navTo('/pages/jump/jumpDetail')">
|
||||
<view class="c-title">耳号</view>
|
||||
<view class="c-body">
|
||||
<view class="c-item">
|
||||
<view class="flex">
|
||||
<view class="f-title">转出栏舍:</view>
|
||||
<view>栏舍12号</view>
|
||||
</view>
|
||||
<view class="flex">
|
||||
<view class="f-title">转入栏舍:</view>
|
||||
<view>栏舍16号</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="c-item">
|
||||
<view class="flex">
|
||||
<view class="f-title">转舍时间:</view>
|
||||
<view>2023-12-21</view>
|
||||
</view>
|
||||
<view class="flex">
|
||||
<view class="f-title">备注:</view>
|
||||
<view>这是备注栏舍16号栏舍16号栏舍16号栏舍16号</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="coneng-detail" v-else>
|
||||
<view class="">
|
||||
<image src="@/static/img/zw.png" mode="aspectFit"></image>
|
||||
<view class="">
|
||||
暂无数据
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
onLoad,
|
||||
onShow,
|
||||
onReachBottom,
|
||||
onPullDownRefresh
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
onMounted
|
||||
} from "vue"
|
||||
import Myindex from '@/components/return/index.vue';
|
||||
|
||||
const searchKey = ref('');
|
||||
const dataList = reactive([
|
||||
{
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
//跳转
|
||||
const navTo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
|
||||
//查看
|
||||
const perviewFn = (url) => {
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: $theme-bg-color;
|
||||
}
|
||||
|
||||
.top {
|
||||
background-color: #feb048;
|
||||
position: fixed;
|
||||
z-index: 999999;
|
||||
width: 750rpx;
|
||||
|
||||
}
|
||||
|
||||
.nav-con {
|
||||
width: 100vw;
|
||||
height: 44px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-top: 20rpx;
|
||||
padding-bottom: 10rpx;
|
||||
color: #fff;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
.tits {
|
||||
position: relative;
|
||||
padding-left: 20rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.tits::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 0;
|
||||
width: 3px;
|
||||
/* 左边框的宽度 */
|
||||
height: 30rpx;
|
||||
background-color: #FFB049;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
padding: 0 28rpx;
|
||||
|
||||
.serch {
|
||||
box-shadow: 1rpx 1rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
|
||||
border-radius: 200rpx;
|
||||
position: relative;
|
||||
color: #feb048;
|
||||
font-size: 28rpx;
|
||||
margin-top: 20rpx;
|
||||
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.ser-text {
|
||||
position: absolute;
|
||||
padding-left: 20rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
right: 40rpx;
|
||||
|
||||
}
|
||||
|
||||
.ser-text::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 0;
|
||||
width: 2px;
|
||||
/* 左边框的宽度 */
|
||||
height: 20rpx;
|
||||
background-color: #FFB049;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.thing-card {
|
||||
width: 694;
|
||||
box-sizing: border-box;
|
||||
padding: 28rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
margin-bottom: 30rpx;
|
||||
box-shadow: 1rpx 1rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
|
||||
|
||||
.c-title{
|
||||
font-weight: bold;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.c-body{
|
||||
display: flex;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
.c-item{
|
||||
flex: 1;
|
||||
.flex{
|
||||
display: flex;
|
||||
.f-title{
|
||||
color: #333;
|
||||
margin-right: 10rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
view{
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,224 @@
|
|||
<template>
|
||||
<view style="position: relative;">
|
||||
|
||||
<view class="content">
|
||||
<view class="tits">
|
||||
转栏信息
|
||||
</view>
|
||||
<view class="">
|
||||
<block class="" v-if="dataList.length>0">
|
||||
<view class="thing-card" v-for="(item, index) in dataList" :key="index" @click="navTo('')">
|
||||
<view class="c-title">耳号</view>
|
||||
<view class="c-body">
|
||||
<view class="c-item">
|
||||
<view class="flex">
|
||||
<view class="f-title">转出栏舍:</view>
|
||||
<view>栏舍12号</view>
|
||||
</view>
|
||||
<view class="flex">
|
||||
<view class="f-title">转入栏舍:</view>
|
||||
<view>栏舍16号</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="c-item">
|
||||
<view class="flex">
|
||||
<view class="f-title">转舍时间:</view>
|
||||
<view>2023-12-21</view>
|
||||
</view>
|
||||
<view class="flex">
|
||||
<view class="f-title">备注:</view>
|
||||
<view>这是备注栏舍16号栏舍16号栏舍16号栏舍16号</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="coneng-detail" v-else>
|
||||
<view class="">
|
||||
<image src="@/static/img/zw.png" mode="aspectFit"></image>
|
||||
<view class="">
|
||||
暂无数据
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
onLoad,
|
||||
onShow,
|
||||
onReachBottom,
|
||||
onPullDownRefresh
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
onMounted
|
||||
} from "vue"
|
||||
import Myindex from '@/components/return/index.vue';
|
||||
|
||||
const searchKey = ref('');
|
||||
const dataList = reactive([
|
||||
{
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
//跳转
|
||||
const navTo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
|
||||
//查看
|
||||
const perviewFn = (url) => {
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: $theme-bg-color;
|
||||
}
|
||||
|
||||
.top {
|
||||
background-color: #feb048;
|
||||
position: fixed;
|
||||
z-index: 999999;
|
||||
width: 750rpx;
|
||||
|
||||
}
|
||||
|
||||
.nav-con {
|
||||
width: 100vw;
|
||||
height: 44px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-top: 20rpx;
|
||||
padding-bottom: 10rpx;
|
||||
color: #fff;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
.tits {
|
||||
position: relative;
|
||||
padding-left: 20rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.tits::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 0;
|
||||
width: 3px;
|
||||
/* 左边框的宽度 */
|
||||
height: 30rpx;
|
||||
background-color: #FFB049;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
padding: 0 28rpx;
|
||||
|
||||
.serch {
|
||||
box-shadow: 1rpx 1rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
|
||||
border-radius: 200rpx;
|
||||
position: relative;
|
||||
color: #feb048;
|
||||
font-size: 28rpx;
|
||||
margin-top: 20rpx;
|
||||
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.ser-text {
|
||||
position: absolute;
|
||||
padding-left: 20rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
right: 40rpx;
|
||||
|
||||
}
|
||||
|
||||
.ser-text::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 0;
|
||||
width: 2px;
|
||||
/* 左边框的宽度 */
|
||||
height: 20rpx;
|
||||
background-color: #FFB049;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.thing-card {
|
||||
width: 694;
|
||||
box-sizing: border-box;
|
||||
padding: 28rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
margin-bottom: 30rpx;
|
||||
box-shadow: 1rpx 1rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
|
||||
|
||||
.c-title{
|
||||
font-weight: bold;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.c-body{
|
||||
display: flex;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
.c-item{
|
||||
flex: 1;
|
||||
.flex{
|
||||
display: flex;
|
||||
.f-title{
|
||||
color: #333;
|
||||
margin-right: 10rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
view{
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -228,8 +228,8 @@
|
|||
const changeTime = ref(Date.now())
|
||||
const selectDate = (e)=>{
|
||||
let date = new Date(e.value);
|
||||
if(data.formData.type>1) data.formData.brith_date = `${date.getFullYear()}-${date.getMonth()+1}-${date.getDate()}`;
|
||||
else data.formData.join_date = `${date.getFullYear()}-${date.getMonth()+1}-${date.getDate()}`;
|
||||
if(data.formData.type>1) data.formData.brith_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd');
|
||||
else data.formData.join_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd');
|
||||
showDate.value = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -201,6 +201,12 @@
|
|||
const selectOne = (e)=>{
|
||||
if(navType.value==1){
|
||||
navTo(`/pages/plantAdmin/addBreed?name=${e.name}&type=${e.name=='购买'?1:2}`)
|
||||
}else {
|
||||
if(e.name=='喂食') return navTo(`/pages/feed/feed?id=23`);
|
||||
if(e.name=='喂水') return navTo(`/pages/feed/water?id=23`);
|
||||
if(e.name=='消毒') return navTo(`/pages/feed/sterilize?id=23`);
|
||||
if(e.name=='疫苗') return navTo(`/pages/feed/vaccine?id=23`);
|
||||
if(e.name=='驱虫') return navTo(`/pages/feed/expelling?id=23`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<view class="">
|
||||
<view class="tit tit-more" style="margin: 20rpx 0;">
|
||||
<view>养殖信息</view>
|
||||
<view class="more">查看更多 <u-icon name="arrow-right"></u-icon> </view>
|
||||
<view class="more" @click="navTo('/pages/plantAdmin/moreBreed')">查看更多 <u-icon name="arrow-right"></u-icon> </view>
|
||||
</view>
|
||||
<block class="" v-if="dataList.length>0">
|
||||
<view class="thing-card" v-for="(item,index) in dataList" :key="index">
|
||||
|
@ -82,20 +82,20 @@
|
|||
<view class="">
|
||||
<view class="tit tit-more" style="margin: 20rpx 0;">
|
||||
<view>喂养信息</view>
|
||||
<view class="more">查看更多 <u-icon name="arrow-right"></u-icon> </view>
|
||||
<view class="more" @click="navTo('/pages/plantAdmin/moreFeed')">查看更多 <u-icon name="arrow-right"></u-icon> </view>
|
||||
</view>
|
||||
<block class="" v-if="feedDataList.length>0">
|
||||
<view class="thing-card" v-for="(item,index) in feedDataList" :key="index">
|
||||
<view class="card_body">
|
||||
<view class="left">
|
||||
<u--image @click="perviewFn(item.img)" radius='10' :src="item.img" width="200rpx"
|
||||
<u--image @click="perviewFn('https://lihai001.oss-cn-chengdu.aliyuncs.com/def/91fb0202311021455371420.jpg')" radius='10' src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/91fb0202311021455371420.jpg" width="200rpx"
|
||||
height="200rpx"></u--image>
|
||||
</view>
|
||||
<u--image src="/static/main/house/xia_yi_ji_btn.png" class="next" width="38rpx" height="38rpx"></u--image>
|
||||
<view class="right" style="color: #7B7B7B;" @click="navtoForm(item,i)">
|
||||
<u--image src="/static/main/house/xia_yi_ji_btn.png" class="next" width="38rpx" height="38rpx" @click="navFeed(item)"></u--image>
|
||||
<view class="right" style="color: #7B7B7B;" @click="navFeed(item)">
|
||||
<view class="r-item">
|
||||
<view class="item-title">操作类型:</view>
|
||||
<view>喂食</view>
|
||||
<view>{{item.type_name}}</view>
|
||||
</view>
|
||||
<view class="r-item">
|
||||
<view class="item-title">操作人员:</view>
|
||||
|
@ -161,17 +161,13 @@
|
|||
qr_code: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/76751202312201347169905.png',
|
||||
showCode: false
|
||||
}])
|
||||
const feedDataList = reactive([{
|
||||
name: '栏舍一号',
|
||||
img: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/91fb0202311021455371420.jpg',
|
||||
animal_name: '山羊',
|
||||
animal_type: '哺乳动物',
|
||||
capacity: '50只',
|
||||
create_by: '张三',
|
||||
create_time: '2023-12-19',
|
||||
qr_code: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/76751202312201347169905.png',
|
||||
showCode: false
|
||||
}])
|
||||
const feedDataList = reactive([
|
||||
{type_name: '喂食'},
|
||||
{type_name: '喂水'},
|
||||
{type_name: '消毒'},
|
||||
{type_name: '疫苗'},
|
||||
{type_name: '驱虫'},
|
||||
])
|
||||
const dataobj = reactive({})
|
||||
const typeID = ref('')
|
||||
|
||||
|
@ -237,7 +233,7 @@
|
|||
const show = ref(false);
|
||||
const selectList = ref([]);
|
||||
const navType = ref(1);
|
||||
//新增种植
|
||||
|
||||
const addshowPicke = (type=1) => {
|
||||
if(type==1){
|
||||
selectList.value = [
|
||||
|
@ -261,7 +257,11 @@
|
|||
if(navType.value==1){
|
||||
navTo(`/pages/plantAdmin/addBreed?name=${e.name}&type=${e.name=='购买'?1:2}`)
|
||||
}else {
|
||||
navTo(`/pages/feed/feed?id=23`);
|
||||
if(e.name=='喂食') return navTo(`/pages/feed/feed?id=23&house_id=1`);
|
||||
if(e.name=='喂水') return navTo(`/pages/feed/water?id=23&house_id=1`);
|
||||
if(e.name=='消毒') return navTo(`/pages/feed/sterilize?id=23&house_id=1`);
|
||||
if(e.name=='疫苗') return navTo(`/pages/feed/vaccine?id=23&house_id=1`);
|
||||
if(e.name=='驱虫') return navTo(`/pages/feed/expelling?id=23&house_id=1`);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -271,10 +271,12 @@
|
|||
url
|
||||
})
|
||||
}
|
||||
const navtoForm = (item, type) => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/landDetail/tudi?data=' + item.id
|
||||
})
|
||||
const navFeed = (e)=>{
|
||||
if(e.type_name=='喂食') navTo(`/pages/feedDetail/feedDetail?id=1`)
|
||||
if(e.type_name=='喂水') navTo(`/pages/feedDetail/waterDetail?id=1`)
|
||||
if(e.type_name=='消毒') navTo(`/pages/feedDetail/sterilizeDetail?id=1`)
|
||||
if(e.type_name=='疫苗') navTo(`/pages/feedDetail/vaccineDetail?id=1`)
|
||||
if(e.type_name=='驱虫') navTo(`/pages/feedDetail/expellingDetail?id=1`)
|
||||
}
|
||||
|
||||
|
||||
|
@ -306,7 +308,6 @@
|
|||
<style lang="scss" scoped>
|
||||
.box {
|
||||
width: 750rpx;
|
||||
min-height: 100vh;
|
||||
background-color: $theme-bg-color;
|
||||
padding: 0;
|
||||
|
||||
|
|
|
@ -0,0 +1,298 @@
|
|||
<template>
|
||||
<view class="box">
|
||||
<view class="content">
|
||||
<view class="">
|
||||
<block class="" v-if="dataList.length>0">
|
||||
<view class="thing-card" v-for="(item,index) in dataList" :key="index">
|
||||
<view class="card_body">
|
||||
<view class="left">
|
||||
<u--image @click="perviewFn(item.img)" radius='10' :src="item.img" width="250rpx"
|
||||
height="250rpx"></u--image>
|
||||
<u---image class="qr-code" @click="perviewFn(item.qr_code)" src="/static/main/house/su_yuan_ma_btn.png" width="60rpx" height="60rpx"></u---image>
|
||||
</view>
|
||||
<u--image src="/static/main/house/xia_yi_ji_btn.png" class="next" width="38rpx" height="38rpx" @click="navTo(`/pages/plantAdmin/breedDetail?id=${item.id}`)"></u--image>
|
||||
<view class="right" style="color: #7B7B7B;" @click="navTo(`/pages/plantAdmin/breedDetail?id=${item.id}`)">
|
||||
<view class="name">耳号</view>
|
||||
<view class="r-item">
|
||||
<view class="item-title">品类:</view>
|
||||
<view>黑山羊</view>
|
||||
</view>
|
||||
<view class="r-item">
|
||||
<view class="item-title">品种:</view>
|
||||
<view>山羊</view>
|
||||
</view>
|
||||
<view class="r-item">
|
||||
<view class="item-title">性别:</view>
|
||||
<view>公</view>
|
||||
</view>
|
||||
<view class="r-item">
|
||||
<view class="item-title">栏舍:</view>
|
||||
<view>栏舍一号</view>
|
||||
</view>
|
||||
<view class="r-item">
|
||||
<view class="item-title">来源:</view>
|
||||
<view>购买</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
<view class="coneng-detail" v-else>
|
||||
<view class="">
|
||||
<image src="@/static/img/zw.png" mode="aspectFit"></image>
|
||||
<view class="">
|
||||
暂无数据
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from "vue"
|
||||
|
||||
import {
|
||||
onLoad,
|
||||
onShow
|
||||
} from "@dcloudio/uni-app"
|
||||
const dataList = reactive([{
|
||||
id: 1,
|
||||
name: '栏舍一号',
|
||||
img: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/91fb0202311021455371420.jpg',
|
||||
animal_name: '山羊',
|
||||
animal_type: '哺乳动物',
|
||||
capacity: '50只',
|
||||
create_by: '张三',
|
||||
create_time: '2023-12-19',
|
||||
qr_code: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/76751202312201347169905.png',
|
||||
showCode: false
|
||||
}])
|
||||
|
||||
//跳转
|
||||
const navTo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
|
||||
const getNowTimeFn = () => {
|
||||
const now = new Date();
|
||||
const hour = now.getHours();
|
||||
const minute = now.getMinutes();
|
||||
const formattedHour = hour < 10 ? '0' + hour : hour;
|
||||
const formattedMinute = minute < 10 ? '0' + minute : minute;
|
||||
const currentTime = formattedHour + ':' + formattedMinute;
|
||||
return currentTime
|
||||
}
|
||||
//查看
|
||||
const perviewFn = (url) => {
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
}
|
||||
|
||||
let img = ''
|
||||
let codeImg = ''
|
||||
const showCodeFn = (i) => {
|
||||
// dataList[i].showCode != dataList[i].showCode
|
||||
dataList[i].showCode = !dataList[i].showCode
|
||||
console.log(dataList[i].showCode)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
width: 750rpx;
|
||||
background-color: $theme-bg-color;
|
||||
padding: 0;
|
||||
|
||||
.content {
|
||||
width: 693.93rpx;
|
||||
margin: auto;
|
||||
padding-top: 20rpx;
|
||||
|
||||
.add-btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.add-thing {
|
||||
height: 90rpx;
|
||||
width: 335rpx;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
line-height: 90rpx;
|
||||
text-align: center;
|
||||
color: white;
|
||||
background-color: $theme-main-color;
|
||||
}
|
||||
}
|
||||
|
||||
// padding: 20rpx;
|
||||
.time {
|
||||
display: flex;
|
||||
font-size: 26.29rpx;
|
||||
color: #737373;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.video {
|
||||
// margin-top: 10rpx;
|
||||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.coneng-detail {
|
||||
width: 478rpx;
|
||||
height: 341rpx;
|
||||
// background: #FFFFFF;
|
||||
border-radius: 6px 6px 6px 6px;
|
||||
opacity: 1;
|
||||
font-size: 25rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #737373;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin: 70rpx auto;
|
||||
|
||||
image {
|
||||
width: 280rpx;
|
||||
height: 142rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.thing-card {
|
||||
width: 693.93rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
margin-bottom: 30rpx;
|
||||
box-shadow: 1rpx 1rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
|
||||
|
||||
.head {
|
||||
height: 90rpx;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
background-color: $theme-main-color;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 90rpx;
|
||||
color: white;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.card_body {
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
.next {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
right: 20rpx;
|
||||
}
|
||||
|
||||
.left {
|
||||
flex-shrink: 0;
|
||||
position: relative;
|
||||
.qr-code{
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
margin-left: 20rpx;
|
||||
|
||||
.name {
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.r-item {
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
|
||||
.item-title {
|
||||
color: #333;
|
||||
flex-shrink: 0;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.row2 {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 2;
|
||||
/* 设置为需要显示的行数 */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tit {
|
||||
position: relative;
|
||||
padding-left: 20rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.tit-more {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.more {
|
||||
display: flex;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
.tit::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 0;
|
||||
width: 3px;
|
||||
/* 左边框的宽度 */
|
||||
height: 30rpx;
|
||||
background-color: #FFB049;
|
||||
}
|
||||
|
||||
.code-btn {
|
||||
border: 1px solid $theme-main-color;
|
||||
border-radius: 30rpx;
|
||||
padding: 3rpx 20rpx;
|
||||
color: $theme-main-color;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
}
|
||||
|
||||
.actBtn {
|
||||
background: linear-gradient(to right, #FEFFFF 0%, #E8FAF2 100%);
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,287 @@
|
|||
<template>
|
||||
<view class="box">
|
||||
<view class="content">
|
||||
<view class="">
|
||||
<block class="" v-if="feedDataList.length>0">
|
||||
<view class="thing-card" v-for="(item,index) in feedDataList" :key="index">
|
||||
<view class="card_body">
|
||||
<view class="left">
|
||||
<u--image @click="perviewFn('https://lihai001.oss-cn-chengdu.aliyuncs.com/def/91fb0202311021455371420.jpg')" radius='10' src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/91fb0202311021455371420.jpg" width="200rpx"
|
||||
height="200rpx"></u--image>
|
||||
</view>
|
||||
<u--image src="/static/main/house/xia_yi_ji_btn.png" class="next" width="38rpx" height="38rpx" @click="navFeed(item)"></u--image>
|
||||
<view class="right" style="color: #7B7B7B;" @click="navFeed(item)">
|
||||
<view class="r-item">
|
||||
<view class="item-title">操作类型:</view>
|
||||
<view>{{item.type_name}}</view>
|
||||
</view>
|
||||
<view class="r-item">
|
||||
<view class="item-title">操作人员:</view>
|
||||
<view>赵桑</view>
|
||||
</view>
|
||||
<view class="r-item">
|
||||
<view class="item-title">操作日期:</view>
|
||||
<view>2023-12-20</view>
|
||||
</view>
|
||||
<view class="r-item" style="height: 80rpx;">
|
||||
<view class="item-title">备注:</view>
|
||||
<view class="row2">栏舍一号栏舍一号栏舍一号栏舍一号栏舍一号栏舍一号栏舍一号栏舍一号栏舍一号栏舍一号栏舍一号栏舍一号栏舍一号栏舍一号栏舍一号栏舍一号栏舍一号栏舍一号</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<view class="coneng-detail" v-else>
|
||||
<view class="">
|
||||
<image src="@/static/img/zw.png" mode="aspectFit"></image>
|
||||
<view class="">
|
||||
暂无数据
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from "vue"
|
||||
|
||||
import {
|
||||
onLoad,
|
||||
onShow
|
||||
} from "@dcloudio/uni-app"
|
||||
const feedDataList = reactive([
|
||||
{type_name: '喂食'},
|
||||
{type_name: '喂水'},
|
||||
{type_name: '消毒'},
|
||||
{type_name: '疫苗'},
|
||||
{type_name: '驱虫'},
|
||||
])
|
||||
|
||||
//跳转
|
||||
const navTo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
const navFeed = (e)=>{
|
||||
if(e.type_name=='喂食') navTo(`/pages/feedDetail/feedDetail?id=1`)
|
||||
if(e.type_name=='喂水') navTo(`/pages/feedDetail/waterDetail?id=1`)
|
||||
if(e.type_name=='消毒') navTo(`/pages/feedDetail/sterilizeDetail?id=1`)
|
||||
if(e.type_name=='疫苗') navTo(`/pages/feedDetail/vaccineDetail?id=1`)
|
||||
if(e.type_name=='驱虫') navTo(`/pages/feedDetail/expellingDetail?id=1`)
|
||||
}
|
||||
|
||||
|
||||
const getNowTimeFn = () => {
|
||||
const now = new Date();
|
||||
const hour = now.getHours();
|
||||
const minute = now.getMinutes();
|
||||
const formattedHour = hour < 10 ? '0' + hour : hour;
|
||||
const formattedMinute = minute < 10 ? '0' + minute : minute;
|
||||
const currentTime = formattedHour + ':' + formattedMinute;
|
||||
return currentTime
|
||||
}
|
||||
//查看
|
||||
const perviewFn = (url) => {
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
width: 750rpx;
|
||||
background-color: $theme-bg-color;
|
||||
padding: 0;
|
||||
|
||||
.content {
|
||||
width: 693.93rpx;
|
||||
margin: auto;
|
||||
padding-top: 20rpx;
|
||||
|
||||
.add-btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.add-thing {
|
||||
height: 90rpx;
|
||||
width: 335rpx;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
line-height: 90rpx;
|
||||
text-align: center;
|
||||
color: white;
|
||||
background-color: $theme-main-color;
|
||||
}
|
||||
}
|
||||
|
||||
// padding: 20rpx;
|
||||
.time {
|
||||
display: flex;
|
||||
font-size: 26.29rpx;
|
||||
color: #737373;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.video {
|
||||
// margin-top: 10rpx;
|
||||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.coneng-detail {
|
||||
width: 478rpx;
|
||||
height: 341rpx;
|
||||
// background: #FFFFFF;
|
||||
border-radius: 6px 6px 6px 6px;
|
||||
opacity: 1;
|
||||
font-size: 25rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #737373;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin: 70rpx auto;
|
||||
|
||||
image {
|
||||
width: 280rpx;
|
||||
height: 142rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.thing-card {
|
||||
width: 693.93rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
margin-bottom: 30rpx;
|
||||
box-shadow: 1rpx 1rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
|
||||
|
||||
.head {
|
||||
height: 90rpx;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
background-color: $theme-main-color;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 90rpx;
|
||||
color: white;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.card_body {
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
.next {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
right: 20rpx;
|
||||
}
|
||||
|
||||
.left {
|
||||
flex-shrink: 0;
|
||||
position: relative;
|
||||
.qr-code{
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
margin-left: 20rpx;
|
||||
|
||||
.name {
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.r-item {
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
|
||||
.item-title {
|
||||
color: #333;
|
||||
flex-shrink: 0;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.row2 {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 2;
|
||||
/* 设置为需要显示的行数 */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tit {
|
||||
position: relative;
|
||||
padding-left: 20rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.tit-more {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.more {
|
||||
display: flex;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
.tit::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 0;
|
||||
width: 3px;
|
||||
/* 左边框的宽度 */
|
||||
height: 30rpx;
|
||||
background-color: #FFB049;
|
||||
}
|
||||
|
||||
.code-btn {
|
||||
border: 1px solid $theme-main-color;
|
||||
border-radius: 30rpx;
|
||||
padding: 3rpx 20rpx;
|
||||
color: $theme-main-color;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
}
|
||||
|
||||
.actBtn {
|
||||
background: linear-gradient(to right, #FEFFFF 0%, #E8FAF2 100%);
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,332 @@
|
|||
<template>
|
||||
<view style="position: relative;">
|
||||
<view class="top">
|
||||
<view class="" style="height:var(--status-bar-height) ;">
|
||||
</view>
|
||||
<view class="nav-con">
|
||||
<view class="left"></view>
|
||||
<view class="title" @click="navBack">
|
||||
<u-icon name="arrow-left" color="#fff" style="margin-right: 10rpx;"></u-icon> <text
|
||||
style="padding-bottom: 5rpx;">档案管理</text>
|
||||
</view>
|
||||
<view class="btn" style="margin-top: -5rpx;">
|
||||
<u-icon name="plus" color="#fff" style="margin-right: 20rpx;"
|
||||
@click="show=true"></u-icon>
|
||||
<Myindex url='/pages/index/massif' />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="height:var(--status-bar-height) ;">
|
||||
</view>
|
||||
<view class="nav-con">
|
||||
</view>
|
||||
|
||||
<view class="content">
|
||||
<view class="serch">
|
||||
<u-search bgColor="white" :show-action="false" placeholder="请输入耳号" v-model="searchKey" shape="round"
|
||||
:clearabled='false' @change="inputval"></u-search>
|
||||
<view class="ser-text" @click="search">
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
<view class="tits">
|
||||
档案信息
|
||||
</view>
|
||||
<view class="">
|
||||
<block class="" v-if="dataList.length>0">
|
||||
<view class="thing-card" v-for="(item,index) in dataList" :key="index">
|
||||
<view class="card_body">
|
||||
<view class="left">
|
||||
<u--image @click="perviewFn(item.img)" radius='10' :src="item.img" width="250rpx"
|
||||
height="250rpx"></u--image>
|
||||
<u---image class="qr-code" @click="perviewFn(item.qr_code)" src="/static/main/house/su_yuan_ma_btn.png"
|
||||
width="60rpx" height="60rpx"></u---image>
|
||||
</view>
|
||||
<u--image src="/static/main/house/xia_yi_ji_btn.png" class="next" width="38rpx" height="38rpx"
|
||||
@click="navTo(`/pages/plantAdmin/breedDetail?id=${item.id}`)"></u--image>
|
||||
<view class="right" style="color: #7B7B7B;" @click="navTo(`/pages/plantAdmin/breedDetail?id=${item.id}`)">
|
||||
<view class="name">耳号</view>
|
||||
<view class="r-item">
|
||||
<view class="item-title">品类:</view>
|
||||
<view>黑山羊</view>
|
||||
</view>
|
||||
<view class="r-item">
|
||||
<view class="item-title">品种:</view>
|
||||
<view>山羊</view>
|
||||
</view>
|
||||
<view class="r-item">
|
||||
<view class="item-title">性别:</view>
|
||||
<view>公</view>
|
||||
</view>
|
||||
<view class="r-item">
|
||||
<view class="item-title">栏舍:</view>
|
||||
<view>栏舍一号</view>
|
||||
</view>
|
||||
<view class="r-item">
|
||||
<view class="item-title">来源:</view>
|
||||
<view>购买</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
<view class="coneng-detail" v-else>
|
||||
<view class="">
|
||||
<image src="@/static/img/zw.png" mode="aspectFit"></image>
|
||||
<view class="">
|
||||
暂无数据
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-action-sheet :show="show" keyName="name" closeOnClickOverlay :actions="selectList" title="请选择"
|
||||
@close="show = false" @select="selectOne">
|
||||
</u-action-sheet>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
onLoad,
|
||||
onShow,
|
||||
onReachBottom,
|
||||
onPullDownRefresh
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
onMounted
|
||||
} from "vue"
|
||||
import Myindex from '@/components/return/index.vue';
|
||||
|
||||
const searchKey = ref('');
|
||||
const dataList = reactive([{
|
||||
id: 1,
|
||||
name: '栏舍一号',
|
||||
img: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/91fb0202311021455371420.jpg',
|
||||
animal_name: '山羊',
|
||||
animal_type: '哺乳动物',
|
||||
capacity: '50只',
|
||||
create_by: '张三',
|
||||
create_time: '2023-12-19',
|
||||
qr_code: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/76751202312201347169905.png',
|
||||
showCode: false
|
||||
}])
|
||||
|
||||
const show = ref(false);
|
||||
const selectList = ref([
|
||||
{name: '购买'},
|
||||
{name: '自繁'},
|
||||
]);
|
||||
const selectOne = (e)=>{
|
||||
navTo(`/pages/plantAdmin/addBreed?name=${e.name}&type=${e.name=='购买'?1:2}`)
|
||||
}
|
||||
|
||||
//跳转
|
||||
const navTo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
|
||||
const getNowTimeFn = () => {
|
||||
const now = new Date();
|
||||
const hour = now.getHours();
|
||||
const minute = now.getMinutes();
|
||||
const formattedHour = hour < 10 ? '0' + hour : hour;
|
||||
const formattedMinute = minute < 10 ? '0' + minute : minute;
|
||||
const currentTime = formattedHour + ':' + formattedMinute;
|
||||
return currentTime
|
||||
}
|
||||
//查看
|
||||
const perviewFn = (url) => {
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
}
|
||||
|
||||
let img = ''
|
||||
let codeImg = ''
|
||||
const showCodeFn = (i) => {
|
||||
// dataList[i].showCode != dataList[i].showCode
|
||||
dataList[i].showCode = !dataList[i].showCode
|
||||
console.log(dataList[i].showCode)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: $theme-bg-color;
|
||||
}
|
||||
|
||||
.top {
|
||||
background-color: #feb048;
|
||||
position: fixed;
|
||||
z-index: 999999;
|
||||
width: 750rpx;
|
||||
|
||||
}
|
||||
|
||||
.nav-con {
|
||||
width: 100vw;
|
||||
height: 44px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-top: 20rpx;
|
||||
padding-bottom: 10rpx;
|
||||
color: #fff;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
.tits {
|
||||
position: relative;
|
||||
padding-left: 20rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.tits::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 0;
|
||||
width: 3px;
|
||||
/* 左边框的宽度 */
|
||||
height: 30rpx;
|
||||
background-color: #FFB049;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
padding: 0 28rpx;
|
||||
|
||||
.serch {
|
||||
box-shadow: 1rpx 1rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
|
||||
border-radius: 200rpx;
|
||||
position: relative;
|
||||
color: #feb048;
|
||||
font-size: 28rpx;
|
||||
margin-top: 20rpx;
|
||||
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.ser-text {
|
||||
position: absolute;
|
||||
padding-left: 20rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
right: 40rpx;
|
||||
|
||||
}
|
||||
|
||||
.ser-text::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 0;
|
||||
width: 2px;
|
||||
/* 左边框的宽度 */
|
||||
height: 20rpx;
|
||||
background-color: #FFB049;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.thing-card {
|
||||
width: 694;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
margin-bottom: 30rpx;
|
||||
box-shadow: 1rpx 1rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
|
||||
|
||||
.head {
|
||||
height: 90rpx;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
background-color: $theme-main-color;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 90rpx;
|
||||
color: white;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.card_body {
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
.next {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
right: 20rpx;
|
||||
}
|
||||
|
||||
.left {
|
||||
flex-shrink: 0;
|
||||
position: relative;
|
||||
|
||||
.qr-code {
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
margin-left: 20rpx;
|
||||
|
||||
.name {
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.r-item {
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
|
||||
.item-title {
|
||||
color: #333;
|
||||
flex-shrink: 0;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.row2 {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 2;
|
||||
/* 设置为需要显示的行数 */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue