代码更新1.种植溯源对接扫码溯源接口,新增溯源结果界面 2.溯源监控界面完善 3.溯源详情图片展示
This commit is contained in:
parent
b30ab32f44
commit
b2c5c27e2f
3
App.vue
3
App.vue
@ -23,11 +23,12 @@
|
||||
.card {
|
||||
position: relative;
|
||||
width: 693.93rpx;
|
||||
margin: 0 auto;
|
||||
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx 20rpx;
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 40rpx;
|
||||
font-size: 29.79rpx;
|
||||
|
||||
|
@ -44,6 +44,8 @@ export const landproduct = (data) => syhttp.get('/land/product', data)
|
||||
//绑定产品
|
||||
export const bindproduct = (data) => syhttp.post('/land/bind', data)
|
||||
|
||||
//溯源结果展示
|
||||
export const suYuan = (data) => syhttp.get('/index/suYuan', data)
|
||||
|
||||
|
||||
|
46
api/chick.js
46
api/chick.js
@ -1,46 +0,0 @@
|
||||
import syhttp from "@/utils/syhttp.js";
|
||||
|
||||
/**
|
||||
* 家畜列表
|
||||
*/
|
||||
export const animalListAPI = (data) => syhttp.get('/PoultryBreed/poultryList', data)
|
||||
// 监测数据/api
|
||||
export const animalEnvDataAPI = (data) => syhttp.get('/PoultryBreed/poultryEnvData', data)
|
||||
// 添加动物
|
||||
export const addAnimalAPI = (data) => syhttp.post('/PoultryBreed/addPoultry', data)
|
||||
// 操作列表
|
||||
export const actionsAPI = (data) => syhttp.get('/user/actions', data)
|
||||
// 操作列表
|
||||
export const animalInfoAPI = (data) => syhttp.get('/PoultryBreed/poultryInfo', data)
|
||||
// 图片列表
|
||||
export const animalPicListAPI = (data) => syhttp.get('/PoultryBreed/poultryPicList', data)
|
||||
// 上传动物图片
|
||||
export const addAnimalPicAPI = (data) => syhttp.post('/PoultryBreed/addPoultryPic', data)
|
||||
// 家禽详情
|
||||
export const poultryInfoAPI = (data) => syhttp.get('/PoultryBreed/poultryInfo', data)
|
||||
// 更新状态
|
||||
export const poultryStatusAPI = (data) => syhttp.post('/PoultryBreed/poultryStatus', data)
|
||||
// 种植操作列表
|
||||
// export const actionsListAPI = (data) => syhttp.get('/user/actions', data)
|
||||
// 种植操作详情
|
||||
// export const actionsDetailAPI = (data) => syhttp.get('/user/actionsDetail', data)
|
||||
// /api/PoultryBreed/poultryPicList
|
||||
|
||||
|
||||
// 种植操作列表
|
||||
export const actionsListAPI = (data) => syhttp.get('/user/actions', data)
|
||||
// 种植操作详情
|
||||
export const actionsDetailAPI = (data) => syhttp.get('/user/actionsDetail', data)
|
||||
|
||||
// 种植操作详情列表
|
||||
export const landCropRecordInfoAPI = (data) => syhttp.get('/PoultryBreed/poultryRecordInfo', data)
|
||||
// 进行操作
|
||||
export const addLandCropRecordAPI = (data) => syhttp.post('/PoultryBreed/addPoultryRecord', data)
|
||||
// 删除操作 delLandCropRecord
|
||||
export const delLandCropRecordAPI = (data) => syhttp.post('/PoultryBreed/delPoultryRecord', data)
|
||||
// 编辑
|
||||
export const ediLandCropRecordAPI = (data) => syhttp.post('/PoultryBreed/ediPoultryRecord', data)
|
||||
// 生长记录表
|
||||
export const landCropRecordListAPI = (data) => syhttp.get('/PoultryBreed/poultryRecordList', data)
|
||||
// 搜索
|
||||
export const animalSearchByCodeAPI = (data) => syhttp.get('/PoultryBreed/poultrySearchByCode', data)
|
37
api/plant.js
37
api/plant.js
@ -1,37 +0,0 @@
|
||||
import syhttp from "@/utils/syhttp.js";
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
*/
|
||||
export const userInfoAPI = (data) => syhttp.get('/user/userInfo', data)
|
||||
// 土地详情
|
||||
export const landInfoAPI = (data) => syhttp.get('/LandPlant/landInfo', data)
|
||||
// 添加土地详情
|
||||
export const AddlandInfoAPI = (data) => syhttp.post('/LandPlant/addLandCrop', data)
|
||||
// 添加土地详情
|
||||
export const addLandCropPicAPI = (data) => syhttp.post('/LandPlant/addLandCropPic', data)
|
||||
|
||||
// 实时监测记录
|
||||
export const landEnvDataCurrAPI = (data) => syhttp.get('/LandPlant/landEnvDataCurr', data)
|
||||
// 标记为成熟
|
||||
export const setLandCropRipeAPI = (data) => syhttp.post('/LandPlant/setLandCropRipe', data)
|
||||
// 种植图片列表
|
||||
export const landCropPicListAPI = (data) => syhttp.get('/LandPlant/landCropPicList', data)
|
||||
// 种植操作列表
|
||||
export const actionsListAPI = (data) => syhttp.get('/user/actions', data)
|
||||
// 种植操作详情
|
||||
export const actionsDetailAPI = (data) => syhttp.get('/user/actionsDetail', data)
|
||||
// 种植操作详情列表
|
||||
export const landCropRecordInfoAPI = (data) => syhttp.get('/LandPlant/landCropRecordInfo', data)
|
||||
// 检测数据表
|
||||
export const landEnvDataChartAPI = (data) => syhttp.get('/LandPlant/landEnvDataChart', data)
|
||||
// 进行操作
|
||||
export const addLandCropRecordAPI = (data) => syhttp.post('/LandPlant/addLandCropRecord', data)
|
||||
// 删除操作 delLandCropRecord
|
||||
export const delLandCropRecordAPI = (data) => syhttp.post('/LandPlant/delLandCropRecord', data)
|
||||
// 编辑
|
||||
export const ediLandCropRecordAPI = (data) => syhttp.post('/LandPlant/ediLandCropRecord', data)
|
||||
// 生长记录表
|
||||
export const landCropRecordListAPI = (data) => syhttp.get('/LandPlant/landCropRecordList', data)
|
||||
// 全部成熟
|
||||
export const landCropAllRipeAPI = (data) => syhttp.post('/LandPlant/landCropAllRipe', data)
|
@ -65,7 +65,7 @@
|
||||
})
|
||||
|
||||
const perviewFn = (url) => {
|
||||
console.log(url)
|
||||
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
|
@ -10,6 +10,7 @@
|
||||
"usingComponents" : true,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"screenOrientation":["portrait-primary","portrait-secondary","landscape-primary","landscape-secondary"],
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
@ -21,7 +22,9 @@
|
||||
"Geolocation" : {},
|
||||
"Maps" : {},
|
||||
"LivePusher" : {},
|
||||
"VideoPlayer" : {}
|
||||
"VideoPlayer" : {},
|
||||
"Barcode" : {},
|
||||
"Camera" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
|
10
pages.json
10
pages.json
@ -116,6 +116,15 @@
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/landDetail/results",
|
||||
"style": {
|
||||
"navigationBarTitleText": "溯源结果",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/updatePassword/updatePassword",
|
||||
"style": {
|
||||
@ -125,7 +134,6 @@
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "pages/index/personal",
|
||||
"style": {
|
||||
|
@ -31,7 +31,7 @@
|
||||
customStyle="background:#F5F5F5;height:80rpx;;padding-left:40rpx;border:none"
|
||||
placeholder="请输入密码" border="surround" v-model="formData.password"></u-input>
|
||||
</view>
|
||||
<view class="resgiter">
|
||||
<view class="resgiter" @click="resgiter">
|
||||
用户注册
|
||||
</view>
|
||||
<view class="sub-btn">
|
||||
@ -51,7 +51,7 @@
|
||||
login,
|
||||
|
||||
xinregister
|
||||
} from '@/api/file.js';
|
||||
} from '@/api/api.js';
|
||||
import {
|
||||
useStore
|
||||
} from 'vuex'
|
||||
@ -133,7 +133,14 @@
|
||||
})
|
||||
}
|
||||
|
||||
//注册
|
||||
|
||||
const resgiter = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/Login/resgier'
|
||||
})
|
||||
}
|
||||
//登录
|
||||
const submitFn = () => {
|
||||
|
||||
|
||||
@ -262,7 +269,7 @@
|
||||
}
|
||||
|
||||
.resgiter {
|
||||
font-size: 20rpx;
|
||||
font-size: 30rpx;
|
||||
margin-top: 40rpx;
|
||||
|
||||
}
|
||||
|
@ -44,7 +44,7 @@
|
||||
<script setup>
|
||||
import {
|
||||
logregister
|
||||
} from '@/api/file.js';
|
||||
} from '@/api/api.js';
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
@ -79,8 +79,9 @@
|
||||
logregister(formData).then((res) => {
|
||||
|
||||
if (res.code == 1) {
|
||||
uni.$u.toast('注册成功');
|
||||
uni.navigateBack({
|
||||
delta: formData
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
})
|
||||
|
@ -13,31 +13,31 @@
|
||||
<up-input placeholder="请输入土地面积" border="surround" v-model="data.formData.area"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="所在省份" prop="province_code" borderBottom required>
|
||||
<up-input placeholder="请选择所在省份" border="surround" v-model="province_name" disabled="true"
|
||||
<up-input placeholder="请选择所在省份" border="surround" v-model="province_name" :disabled="true"
|
||||
@click="isshow1"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="所在城市" prop="city_code" borderBottom required>
|
||||
<up-input placeholder="请选择所在城市" border="surround" v-model="city_name" @click="isshow2"
|
||||
disabled="true"></up-input>
|
||||
:disabled="true"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="所在区县" prop="county_code" borderBottom required>
|
||||
<up-input placeholder="请选择所在区县" border="surround" v-model="county_name" @click="isshow3"
|
||||
disabled="true"></up-input>
|
||||
:disabled="true"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="所在镇街" prop="town_code" borderBottom required>
|
||||
<up-input placeholder="请选择所在镇街" border="surround" v-model="town_name" @click="isshow4"
|
||||
disabled="true"></up-input>
|
||||
:disabled="true"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="所在乡村" prop="village_code" borderBottom required>
|
||||
<up-input placeholder="请选择所在乡村" border="surround" v-model="village_name" @click="isshow5"
|
||||
disabled="true"></up-input>
|
||||
:disabled="true"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="所在小队" prop="group_code" borderBottom required>
|
||||
<up-input placeholder="请选择所在小队" border="surround" v-model="group_name" @click="isshow6"
|
||||
disabled="true"></up-input>
|
||||
:disabled="true"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="土地负责人" prop="master_name" borderBottom required>
|
||||
<up-input placeholder="请输入土地负责人" border="surround" v-model="data.formData.master_name"></up-input>
|
||||
<up-input placeholder="请输入土地负责人名称" border="surround" v-model="data.formData.master_name"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="负责人电话" prop="master_phone" borderBottom required>
|
||||
<up-input placeholder="请输入负责人电话" type="number" border="surround"
|
||||
@ -122,7 +122,7 @@
|
||||
towns,
|
||||
villages,
|
||||
groups
|
||||
} from '@/api/file.js'
|
||||
} from '@/api/api.js'
|
||||
|
||||
const form1 = ref(null);
|
||||
const data = reactive({
|
||||
@ -204,7 +204,7 @@
|
||||
master_name: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请天下负责人',
|
||||
message: '请输入土地负责人名称',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
master_phone: [{
|
||||
|
@ -122,7 +122,7 @@
|
||||
towns,
|
||||
villages,
|
||||
groups
|
||||
} from '@/api/file.js'
|
||||
} from '@/api/api.js'
|
||||
|
||||
const form = ref(null);
|
||||
const formData = ref({
|
||||
|
@ -107,7 +107,7 @@
|
||||
towns,
|
||||
villages,
|
||||
groups
|
||||
} from '@/api/file.js'
|
||||
} from '@/api/api.js'
|
||||
|
||||
const form1 = ref();
|
||||
const data = reactive({
|
||||
|
@ -55,7 +55,7 @@
|
||||
<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"></u-image>
|
||||
<u-image :src="item" width="150.85rpx" height="150.85rpx" @click="perviewFn(item)"></u-image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -113,7 +113,7 @@
|
||||
} from '@dcloudio/uni-app';
|
||||
import {
|
||||
addaction
|
||||
} from '@/api/file.js'
|
||||
} from '@/api/api.js'
|
||||
|
||||
const pic = reactive([]);
|
||||
const calendar = ref(null)
|
||||
@ -199,6 +199,13 @@
|
||||
form.value.setRules(rules);
|
||||
|
||||
});
|
||||
//查看图片
|
||||
const perviewFn = (url) => {
|
||||
console.log(url)
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
}
|
||||
//图片删除
|
||||
const delimg = (i) => {
|
||||
pic.splice(i, 1);
|
||||
@ -293,7 +300,7 @@
|
||||
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);
|
||||
pic.splice(0, pic.length, ...data.detail.pic);
|
||||
|
||||
mode.value = 'detail'
|
||||
uni.setNavigationBarTitle({
|
||||
|
@ -3,8 +3,8 @@
|
||||
<view class="content">
|
||||
<view class="card">
|
||||
<u--form labelPosition="top" labelWidth='100' :model="formData" :rules="rules" ref="form">
|
||||
<u-form-item label="肥料品牌" prop="kind" borderBottom ref='item1' required>
|
||||
<up-input placeholder="请输入肥料品牌" :disabled="mode=='detail'" border="surround"
|
||||
<u-form-item label="肥料种类" prop="kind" borderBottom ref='item1' required>
|
||||
<up-input placeholder="请输入肥料种类" :disabled="mode=='detail'" border="surround"
|
||||
v-model="formData.kind"></up-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="肥料品牌" prop="breed" borderBottom required>
|
||||
@ -57,7 +57,7 @@
|
||||
<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"></u-image>
|
||||
<u-image :src="item" width="150.85rpx" height="150.85rpx" @click="perviewFn(item)"></u-image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -115,7 +115,7 @@
|
||||
} from '@dcloudio/uni-app';
|
||||
import {
|
||||
addaction
|
||||
} from '@/api/file.js'
|
||||
} from '@/api/api.js'
|
||||
|
||||
const pic = reactive([]);
|
||||
const calendar = ref(null)
|
||||
@ -295,6 +295,12 @@
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
//查看图片
|
||||
const perviewFn = (url) => {
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
}
|
||||
//图片删除
|
||||
const delimg = (i) => {
|
||||
@ -307,9 +313,9 @@
|
||||
|
||||
if (options.task) {
|
||||
let data = options.task ? JSON.parse(decodeURIComponent(options.task)) : null;
|
||||
console.log(data, data.detail)
|
||||
// console.log(data, data.detail)
|
||||
Object.assign(formData, data.detail);
|
||||
pic.splice(0, pic.length, data.detail.pic);
|
||||
pic.splice(0, pic.length, ...data.detail.pic);
|
||||
|
||||
mode.value = 'detail'
|
||||
uni.setNavigationBarTitle({
|
||||
|
@ -27,7 +27,7 @@
|
||||
<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"></u-image>
|
||||
<u-image :src="item" width="150.85rpx" height="150.85rpx" @click="perviewFn(item)"></u-image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -82,7 +82,7 @@
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
addaction
|
||||
} from '@/api/file.js'
|
||||
} from '@/api/api.js'
|
||||
|
||||
const form = ref(null)
|
||||
const task_id = ref('');
|
||||
@ -157,6 +157,13 @@
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
//查看图片
|
||||
const perviewFn = (url) => {
|
||||
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
}
|
||||
//图片删除
|
||||
const delimg = (i) => {
|
||||
@ -200,13 +207,13 @@
|
||||
onLoad((options) => {
|
||||
if (options.task) {
|
||||
let data = options.task ? JSON.parse(decodeURIComponent(options.task)) : null;
|
||||
console.log(data, data.detail)
|
||||
// console.log(data, data.detail)
|
||||
Object.assign(formData, data.detail);
|
||||
pic.splice(0, pic.length, data.detail.pic);
|
||||
pic.splice(0, pic.length, ...data.detail.pic);
|
||||
|
||||
mode.value = 'detail'
|
||||
uni.setNavigationBarTitle({
|
||||
title: '除草详情'
|
||||
title: '收获详情'
|
||||
})
|
||||
// formData=data.detail
|
||||
|
||||
|
@ -49,7 +49,7 @@
|
||||
<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"></u-image>
|
||||
<u-image :src="item" width="150.85rpx" height="150.85rpx" @click="perviewFn(item)" ></u-image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -113,7 +113,7 @@
|
||||
|
||||
import {
|
||||
addaction
|
||||
} from '@/api/file.js'
|
||||
} from '@/api/api.js'
|
||||
const range = reactive([{
|
||||
value: 0,
|
||||
name: "喷灌"
|
||||
@ -259,6 +259,13 @@
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
//查看图片
|
||||
const perviewFn = (url) => {
|
||||
console.log(url)
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
}
|
||||
//图片删除
|
||||
const delimg = (i) => {
|
||||
@ -305,7 +312,7 @@
|
||||
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);
|
||||
pic.splice(0, pic.length, ...data.detail.pic);
|
||||
formDatatype.value = range.find(item => item.value === formData.type).name;
|
||||
mode.value = 'detail'
|
||||
uni.setNavigationBarTitle({
|
||||
|
@ -35,7 +35,7 @@
|
||||
<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"></u-image>
|
||||
<u-image :src="item" width="150.85rpx" height="150.85rpx" @click="perviewFn(item)"></u-image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -95,7 +95,7 @@
|
||||
|
||||
import {
|
||||
addplant
|
||||
} from '@/api/file.js'
|
||||
} from '@/api/api.js'
|
||||
|
||||
const calendar = ref(null)
|
||||
const form1 = ref(null);
|
||||
@ -181,6 +181,13 @@
|
||||
url
|
||||
})
|
||||
}
|
||||
//查看图片
|
||||
const perviewFn = (url) => {
|
||||
console.log(url)
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
}
|
||||
const addFn = async () => {
|
||||
console.log(form1.value)
|
||||
|
||||
|
@ -55,7 +55,8 @@
|
||||
<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"></u-image>
|
||||
<u-image :src="item" width="150.85rpx" height="150.85rpx"
|
||||
@click="perviewFn(item)"></u-image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -113,7 +114,7 @@
|
||||
} from '@dcloudio/uni-app';
|
||||
import {
|
||||
addaction
|
||||
} from '@/api/file.js'
|
||||
} from '@/api/api.js'
|
||||
|
||||
const pic = reactive([]);
|
||||
const calendar = ref(null)
|
||||
@ -233,7 +234,13 @@
|
||||
// let res = await Uploads()
|
||||
// data.formData.pic = res.data.image
|
||||
}
|
||||
|
||||
//查看图片
|
||||
const perviewFn = (url) => {
|
||||
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
}
|
||||
//图片删除
|
||||
const delimg = (i) => {
|
||||
pic.splice(i, 1);
|
||||
@ -298,7 +305,8 @@
|
||||
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);
|
||||
|
||||
pic.splice(0, pic.length, ...data.detail.pic);
|
||||
|
||||
mode.value = 'detail'
|
||||
uni.setNavigationBarTitle({
|
||||
|
@ -43,7 +43,7 @@
|
||||
<!-- <view class="land" @click="navgo('/pages/addLand/addLand')">
|
||||
土地
|
||||
</view> -->
|
||||
|
||||
|
||||
<view class="coneng-detail" v-if="datalist.length==0">
|
||||
<view class="">
|
||||
<image src="@/static/img/zw.png" mode="aspectFit"></image>
|
||||
@ -51,7 +51,7 @@
|
||||
暂无数据
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -71,19 +71,19 @@
|
||||
reactive,
|
||||
onMounted
|
||||
} from "vue"
|
||||
|
||||
import {
|
||||
landlist
|
||||
} from '@/api/file.js'
|
||||
} from '@/api/api.js'
|
||||
onShow(() => {
|
||||
console.log(11)
|
||||
list()
|
||||
})
|
||||
onPullDownRefresh(() => {
|
||||
console.log(11)
|
||||
list()
|
||||
uni.stopPullDownRefresh()
|
||||
})
|
||||
onReachBottom(() => {
|
||||
console.log(11)
|
||||
|
||||
getlist()
|
||||
})
|
||||
const datalist = reactive([])
|
||||
@ -128,9 +128,7 @@
|
||||
}
|
||||
|
||||
const search = () => {
|
||||
console.log('111111')
|
||||
|
||||
|
||||
getlist()
|
||||
|
||||
}
|
||||
@ -147,7 +145,7 @@
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" >
|
||||
page {
|
||||
background-color: #EAF2EF;
|
||||
}
|
||||
@ -204,30 +202,33 @@
|
||||
width: 750rpx;
|
||||
|
||||
}
|
||||
.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;
|
||||
.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: 300rpx auto;
|
||||
|
||||
image {
|
||||
width: 280rpx;
|
||||
height: 142rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card {
|
||||
position: relative;
|
||||
width: 693.93rpx;
|
||||
|
@ -28,16 +28,16 @@
|
||||
<view class="">
|
||||
<view class="card" v-if="Object.keys(dataobj).length>0">
|
||||
<view class="" @click="navgo">
|
||||
<view class="">
|
||||
<view class="" style="margin: 10rpx 0;">
|
||||
土地名称: {{dataobj.title}}
|
||||
</view>
|
||||
<!-- <view class="" style="margin: 10rpx 0;">
|
||||
农作物: 洋芋
|
||||
</view> -->
|
||||
<view class="">
|
||||
<view class="" style="margin: 10rpx 0;">
|
||||
土地面积: {{dataobj.total_area}}亩
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="" style="margin: 10rpx 0;">
|
||||
种植面积: {{dataobj.total_area-dataobj.residual_area}}亩
|
||||
</view>
|
||||
</view>
|
||||
@ -76,7 +76,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 土壤监测 -->
|
||||
<view class="" v-if="dataobj&&dataobj.monitor&&dataobj.monitor.length>0">
|
||||
<!-- v-if="dataobj&&dataobj.monitor&&dataobj.monitor.length>0" -->
|
||||
<view class="">
|
||||
|
||||
<view class="soil-monitor">
|
||||
<view class="head">
|
||||
@ -136,14 +137,14 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coneng-detail" v-else>
|
||||
<!-- <view class="coneng-detail" v-else>
|
||||
<view class="">
|
||||
<image src="@/static/img/zw.png" mode="aspectFit"></image>
|
||||
<view class="">
|
||||
暂无数据
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- 组件 -->
|
||||
|
||||
<u-loading-page :loading="showLoading"></u-loading-page>
|
||||
@ -167,16 +168,15 @@
|
||||
<!-- 组件 -->
|
||||
|
||||
<view class="Modal">
|
||||
|
||||
<u-popup :show="showModal" mode="center" @close="showModal=false" :round="10">
|
||||
<u-popup :show="showModal" mode="center" @close="closeModal" :round="10">
|
||||
<view class="Modal">
|
||||
<text> 产品编号:</text>
|
||||
<uni-data-select v-model="equipmentId" :disabled="mode=='detail'"
|
||||
<uni-data-select v-model="equipmentId"
|
||||
style="width: 300rpx;margin-left: 30rpx;" :localdata="range"></uni-data-select>
|
||||
</view>
|
||||
|
||||
<view class="Modal-btn">
|
||||
<view class="Modal-btna" @click="showModal=false">
|
||||
<view class="Modal-btna" @click="closeModal">
|
||||
取消
|
||||
</view>
|
||||
<view class="Modal-btnb" @click="bindFn">
|
||||
@ -196,41 +196,30 @@
|
||||
ref
|
||||
} from 'vue';
|
||||
import {
|
||||
onLoad
|
||||
onLoad,
|
||||
onShow
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
bindproduct,
|
||||
lindexist,
|
||||
landlist,
|
||||
landproduct
|
||||
} from '@/api/file.js'
|
||||
} from '@/api/api.js'
|
||||
|
||||
|
||||
const showModal = ref(false)
|
||||
|
||||
const range = reactive([{
|
||||
value: 0,
|
||||
text: "喷灌"
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
text: "滴灌"
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
text: "沟灌"
|
||||
},
|
||||
])
|
||||
const range = reactive([])
|
||||
// 土壤监测数据
|
||||
const url = ref('https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg')
|
||||
const soilList = reactive([{
|
||||
icon: "/static/img/sj.png",
|
||||
icon: "/static/img/CTWD.png",
|
||||
name: "土壤温度",
|
||||
num: 20,
|
||||
unit: "℃",
|
||||
|
||||
}, {
|
||||
icon: "/static/img/sj.png",
|
||||
icon: "/static/img/SD.png",
|
||||
name: "土壤湿度",
|
||||
num: 20,
|
||||
unit: "%RH",
|
||||
@ -242,25 +231,25 @@
|
||||
unit: "μS/cm",
|
||||
|
||||
}, {
|
||||
icon: "/static/img/sj.png",
|
||||
icon: "/static/img/CTPH.png",
|
||||
name: "土壤PH值",
|
||||
num: 20,
|
||||
unit: "PH",
|
||||
|
||||
}, {
|
||||
icon: "/static/img/sj.png",
|
||||
icon: "/static/img/AHL.png",
|
||||
name: "土壤含氮量",
|
||||
num: 20,
|
||||
unit: "mg/kg",
|
||||
|
||||
}, {
|
||||
icon: "/static/img/sj.png",
|
||||
icon: "/static/img/AQHL.png",
|
||||
name: "土壤含磷量",
|
||||
num: 20,
|
||||
unit: "mg/kg",
|
||||
|
||||
}, {
|
||||
icon: "/static/img/sj.png",
|
||||
icon: "/static/img/AQHL.png",
|
||||
name: "土壤含钾量",
|
||||
num: 20,
|
||||
unit: "mg/kg",
|
||||
@ -281,8 +270,11 @@
|
||||
const scanFn = () => {
|
||||
uni.scanCode({
|
||||
success: function(res) {
|
||||
console.log('条码类型:' + res.scanType);
|
||||
console.log('条码内容:' + res.result);
|
||||
// console.log('条码类型:' + res.scanType);
|
||||
console.log('条码内容:' + res.result.split('='));
|
||||
uni.navigateTo({
|
||||
url:'/pages/landDetail/results?id='+res.result.split('=')[1]
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -292,31 +284,31 @@
|
||||
const columns = reactive([]);
|
||||
// 环境监测数据
|
||||
const environmentList = reactive([{
|
||||
icon: "/static/img/sj.png",
|
||||
icon: "/static/img/FS.png",
|
||||
name: "风速",
|
||||
num: 20,
|
||||
unit: "%",
|
||||
|
||||
}, {
|
||||
icon: "/static/img/sj.png",
|
||||
icon: "/static/img/FX.png",
|
||||
name: "风向",
|
||||
num: 20,
|
||||
unit: "%",
|
||||
|
||||
}, {
|
||||
icon: "/static/img/sj.png",
|
||||
icon: "/static/img/CTWD.png",
|
||||
name: "温度",
|
||||
num: 20,
|
||||
unit: "℃",
|
||||
|
||||
}, {
|
||||
icon: "/static/img/sj.png",
|
||||
icon: "/static/img/SD.png",
|
||||
name: "湿度",
|
||||
num: 20,
|
||||
unit: "%RH",
|
||||
|
||||
}, {
|
||||
icon: "/static/img/sj.png",
|
||||
icon: '/static/img/CO2.png',
|
||||
name: "二氧化碳",
|
||||
num: 20,
|
||||
unit: "ppm",
|
||||
@ -328,13 +320,13 @@
|
||||
unit: "KPa",
|
||||
|
||||
}, {
|
||||
icon: "/static/img/sj.png",
|
||||
icon: "/static/img/JY.png",
|
||||
name: "雨量",
|
||||
num: 20,
|
||||
unit: "mm",
|
||||
|
||||
}, {
|
||||
icon: "/static/img/sj.png",
|
||||
icon: "/static/img/GZ.png",
|
||||
name: "光照量",
|
||||
num: 20,
|
||||
unit: "Lux",
|
||||
@ -342,8 +334,7 @@
|
||||
},
|
||||
|
||||
])
|
||||
onLoad(() => {
|
||||
|
||||
onShow(() => {
|
||||
|
||||
getlist()
|
||||
|
||||
@ -415,21 +406,36 @@
|
||||
const getlist2 = () => {
|
||||
landproduct().then((res) => {
|
||||
if (res.code == 1) {
|
||||
range.splice(0, range.length, ...res.data.map((step, index) => {
|
||||
return {
|
||||
text: step.name,
|
||||
value: step.product_id,
|
||||
};
|
||||
}));
|
||||
|
||||
console.log(res)
|
||||
// console.log(res)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
//关闭弹窗
|
||||
const closeModal = () => {
|
||||
showModal.value = false
|
||||
equipmentId.value = ''
|
||||
}
|
||||
|
||||
|
||||
|
||||
//绑定产品
|
||||
const biproduct = () => {
|
||||
bindproduct({
|
||||
land_id: '2222',
|
||||
land_id: dataobj.id,
|
||||
product_id: equipmentId.value
|
||||
}).then((res) => {
|
||||
if (res.code == 1) {
|
||||
uni.$u.toast(res.msg);
|
||||
// this.dataobj=res.data
|
||||
equipmentId.value = ''
|
||||
}
|
||||
console.log(res)
|
||||
})
|
||||
@ -455,6 +461,7 @@
|
||||
const currentTime = formattedHour + ':' + formattedMinute;
|
||||
return currentTime
|
||||
}
|
||||
|
||||
const navgo = () => {
|
||||
|
||||
uni.navigateTo({
|
||||
@ -468,7 +475,7 @@
|
||||
}
|
||||
getNowTimeFn()
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
<style lang="scss" >
|
||||
page {
|
||||
background-color: $theme-bg-color;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@
|
||||
reactive,
|
||||
ref
|
||||
} from 'vue';
|
||||
import { logout } from '@/api/file.js'
|
||||
import { logout } from '@/api/api.js'
|
||||
import store from "@/store/index.js"
|
||||
|
||||
const userinfo = reactive({})
|
||||
@ -114,7 +114,10 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
<style lang="scss" >
|
||||
page{
|
||||
background-color: $theme-bg-color;
|
||||
}
|
||||
.head {
|
||||
height: 25vh;
|
||||
background-color: $theme-main-color;
|
||||
@ -132,8 +135,8 @@
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 75vh;
|
||||
background-color: $theme-bg-color;
|
||||
|
||||
|
||||
padding-top: 30rpx;
|
||||
|
||||
.card {
|
||||
|
@ -5,7 +5,7 @@
|
||||
<view class="video" @click="navto('/pages/live/live')">
|
||||
|
||||
<!-- <u--image :src="url" width="100%" height="300rpx"></u--image> -->
|
||||
<u-swiper :list="dataobj.pic" width="100%" height="300rpx"></u-swiper>
|
||||
<u-swiper :list="dataobj.pic" width="100%" height="300rpx" ></u-swiper>
|
||||
|
||||
</view>
|
||||
<view class="time">
|
||||
@ -99,20 +99,17 @@
|
||||
|
||||
import {
|
||||
plantlist,
|
||||
|
||||
landdetail
|
||||
} from '@/api/file.js'
|
||||
} from '@/api/api.js'
|
||||
|
||||
import {
|
||||
onLoad,
|
||||
onShow
|
||||
} from "@dcloudio/uni-app"
|
||||
const list = reactive([{
|
||||
|
||||
id: 1,
|
||||
url: 'https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg',
|
||||
|
||||
|
||||
|
||||
url: 'https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg'
|
||||
},
|
||||
{
|
||||
|
||||
@ -180,7 +177,7 @@
|
||||
landdetail({
|
||||
land_id: typeID.value
|
||||
}).then((res) => {
|
||||
console.log(res);
|
||||
|
||||
if (res.code == 1) {
|
||||
Object.assign(dataobj, res.data);
|
||||
|
||||
@ -216,7 +213,7 @@
|
||||
})
|
||||
}
|
||||
const navtoForm = (item, type) => {
|
||||
console.log(item)
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/landDetail/tudi?data=' +item.id
|
||||
})
|
||||
@ -235,8 +232,9 @@
|
||||
const currentTime = formattedHour + ':' + formattedMinute;
|
||||
return currentTime
|
||||
}
|
||||
//查看
|
||||
const perviewFn = (url) => {
|
||||
console.log(url)
|
||||
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
@ -274,7 +272,7 @@
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
border: 1px solid $theme-main-color;
|
||||
margin: 20rpx auto;
|
||||
line-height: 66rpx;
|
||||
line-height: 66.59rpx;
|
||||
text-align: center;
|
||||
color: $theme-main-color;
|
||||
}
|
||||
|
305
pages/landDetail/results.vue
Normal file
305
pages/landDetail/results.vue
Normal file
@ -0,0 +1,305 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="banner">
|
||||
<u-swiper :list="dataobj.pic" width="100%" height="484rpx"></u-swiper>
|
||||
</view>
|
||||
|
||||
<view class="content-con-a" v-if="Object.keys(dataobj).length>0">
|
||||
<view class="shop_detail">
|
||||
<view class="shop_detail-top">
|
||||
品类信息
|
||||
</view>
|
||||
<view class="shop_detail-botm">
|
||||
<view class="detail">
|
||||
<view class="detaila">
|
||||
商品名称:
|
||||
</view>
|
||||
<view class="detailb">
|
||||
{{dataobj.kind}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="detail">
|
||||
<view class="detaila">
|
||||
生产地址:
|
||||
</view>
|
||||
<view class="detailb">
|
||||
{{dataobj.land_address}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="detail">
|
||||
<view class="detaila">
|
||||
生长期:
|
||||
</view>
|
||||
<view class="detailb">
|
||||
<!-- {{dataobj.plant_date}} -->
|
||||
<!-- {{dataobj.actions[dataobj.actions.length-1].create_time.split(' ')[0]}} -->
|
||||
|
||||
{{ daysDiff }}天
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="shop_action">
|
||||
<view class="" v-for="(item,i) in dataobj.actions">
|
||||
<view class="shop_action-title">
|
||||
{{item.type_text}}
|
||||
</view>
|
||||
<view class="shop_action-detail" v-if="item.type!=3&&item.type!=5">
|
||||
<view class="action-detail">
|
||||
<view class="title">
|
||||
{{item.type_text.slice(0, -2)}}名称:
|
||||
</view>
|
||||
<view class="detail">
|
||||
{{item.detail.kind}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="action-detail">
|
||||
<view class="title">
|
||||
{{item.type_text.slice(0, -2)}}用量:
|
||||
</view>
|
||||
<view class="detail">
|
||||
{{item.detail.dosage}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="action-detail">
|
||||
<view class="title">
|
||||
{{item.type_text.slice(0, -2)}}人:
|
||||
</view>
|
||||
<view class="detail">
|
||||
{{item.detail.user}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="action-detail-img">
|
||||
<view class="title">
|
||||
{{item.type_text.slice(0, -2)}}图片:
|
||||
</view>
|
||||
<view class="detail-img">
|
||||
<u-swiper :list="dataobj.pic" width="100%" height="529rpx"></u-swiper>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="shop_action-detail" v-if="item.type==3">
|
||||
<view class="action-detail">
|
||||
<view class="title">
|
||||
灌溉方式:
|
||||
</view>
|
||||
<view class="detail">
|
||||
{{item.detail.type==0?"喷灌":item.detail.type==1?"滴灌":"沟灌"}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="action-detail">
|
||||
<view class="title">
|
||||
灌溉面积:
|
||||
</view>
|
||||
<view class="detail">
|
||||
{{item.detail.area}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="action-detail">
|
||||
<view class="title">
|
||||
灌溉人:
|
||||
</view>
|
||||
<view class="detail">
|
||||
{{item.detail.user}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="action-detail-img">
|
||||
<view class="title">
|
||||
灌溉图片:
|
||||
</view>
|
||||
<view class="detail-img">
|
||||
<u-swiper :list="dataobj.pic" width="100%" height="529rpx"></u-swiper>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="shop_action-detail" v-if="item.type==5">
|
||||
<view class="action-detail">
|
||||
<view class="title">
|
||||
收获时间:
|
||||
</view>
|
||||
<view class="detail">
|
||||
{{item.create_time}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="action-detail">
|
||||
<view class="title">
|
||||
收获人:
|
||||
</view>
|
||||
<view class="detail">
|
||||
{{item.detail.user}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="action-detail-img">
|
||||
<view class="title">
|
||||
收获图片:
|
||||
</view>
|
||||
<view class="detail-img">
|
||||
<u-swiper :list="dataobj.pic" width="100%" height="529rpx"></u-swiper>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
suYuan
|
||||
} from '@/api/api.js'
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from "vue"
|
||||
|
||||
import {
|
||||
onLoad,
|
||||
onReady
|
||||
} from "@dcloudio/uni-app"
|
||||
const task_id = ref('');
|
||||
const dataobj = reactive({})
|
||||
const daysDiff = ref('');
|
||||
onLoad((options) => {
|
||||
task_id.value = options.id
|
||||
// if (options.task_id) {
|
||||
// mode.value = "detail"
|
||||
// }
|
||||
getlist1(options.id)
|
||||
})
|
||||
|
||||
//获取详情
|
||||
const getlist1 = (id) => {
|
||||
suYuan({
|
||||
plant_id: id
|
||||
}).then((res) => {
|
||||
|
||||
if (res.code == 1) {
|
||||
Object.assign(dataobj, res.data);
|
||||
getday(res.data)
|
||||
}
|
||||
});
|
||||
};
|
||||
//生长期计算
|
||||
|
||||
const getday = (data) => {
|
||||
const start = new Date(data.plant_date);
|
||||
const end = new Date(data.actions[data.actions.length-1].create_time.split(' ')[0]);
|
||||
const diffTime = Math.abs(end - start);
|
||||
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||||
daysDiff.value = diffDays
|
||||
|
||||
}
|
||||
//查看图片
|
||||
const perviewFn = (url) => {
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: $theme-bg-color;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-top: 30rpx;
|
||||
padding-bottom: 30rpx;
|
||||
|
||||
.banner {
|
||||
width: 694rpx;
|
||||
height: 484rpx;
|
||||
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.content-con-a {
|
||||
padding: 0 32rpx;
|
||||
margin-top: 30rpx;
|
||||
|
||||
.shop_detail {
|
||||
.shop_detail-top {
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
|
||||
.shop_detail-botm {
|
||||
width: 694rpx;
|
||||
padding: 35rpx 0;
|
||||
background: #FFFFFF;
|
||||
border-radius: 21rpx 21rpx;
|
||||
|
||||
.detail {
|
||||
display: flex;
|
||||
margin-bottom: 35rpx;
|
||||
margin-left: 35rpx;
|
||||
|
||||
.detaila {
|
||||
width: 200rpx;
|
||||
}
|
||||
|
||||
.detailb {
|
||||
width: 500rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.shop_action {
|
||||
margin-top: 42rpx;
|
||||
|
||||
.shop_action-title {
|
||||
font-size: 33rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
|
||||
.shop_action-detail {
|
||||
width: 694rpx;
|
||||
padding: 35rpx 0;
|
||||
background: #FFFFFF;
|
||||
border-radius: 21rpx 21rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.action-detail {
|
||||
display: flex;
|
||||
padding-left: 35rpx;
|
||||
margin-bottom: 25rpx;
|
||||
|
||||
.title {
|
||||
width: 200rpx;
|
||||
}
|
||||
|
||||
.detail {
|
||||
width: 500rpx
|
||||
}
|
||||
}
|
||||
|
||||
.action-detail-img {
|
||||
padding-left: 35rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.title {
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
}
|
||||
|
||||
.detail-img {
|
||||
width: 627rpx;
|
||||
height: 529rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
@ -32,7 +32,7 @@
|
||||
|
||||
<view class="card_body">
|
||||
<view class="left">
|
||||
<u--image @click="perviewFn(url)" radius='10' :src="item.detail.pic[0]" width="200rpx"
|
||||
<u--image @click="perviewFn(item.detail.pic[0])" radius='10' :src="item.detail.pic[0]" width="200rpx"
|
||||
height="200rpx"></u--image>
|
||||
</view>
|
||||
<view class="right">
|
||||
@ -42,21 +42,30 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
<view class="">
|
||||
{{item.type_text.slice(0, -2)}}种类:{{item.detail.kind}}
|
||||
<view class="" v-if="!item.detail.type">
|
||||
<view class="">
|
||||
{{item.type_text.slice(0, -2)}}种类:{{item.detail.kind}}
|
||||
</view>
|
||||
<view class="">
|
||||
{{item.type_text.slice(0, -2)}}品种: {{item.detail.breed}}
|
||||
</view>
|
||||
<view class="">
|
||||
{{item.type_text.slice(0, -2)}}面积: {{item.detail.area}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
{{item.type_text.slice(0, -2)}}品种: {{item.detail.breed}}
|
||||
</view>
|
||||
<view class="">
|
||||
{{item.type_text.slice(0, -2)}}面积: {{item.detail.area}}
|
||||
<view class="" v-if="item.detail.type&&item.detail.type==1">
|
||||
{{item.type_text.slice(0, -2)}}方式:{{item.detail.type==0?"喷灌":item.detail.type==1?"滴灌":"沟灌"}}
|
||||
</view>
|
||||
<view class="">
|
||||
参与人员: {{item.detail.user}}
|
||||
</view>
|
||||
<view class="">
|
||||
开始日期: {{item.create_time}}
|
||||
<view class="" v-if="item.detail.start_date">
|
||||
开始日期: {{item.detail.start_date}}
|
||||
</view>
|
||||
<view class="" v-if="item.detail.end_date">
|
||||
结束日期: {{item.detail.end_date}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@ -100,7 +109,7 @@
|
||||
plantdetail,
|
||||
actionlist,
|
||||
landdetail
|
||||
} from '@/api/file.js'
|
||||
} from '@/api/api.js'
|
||||
|
||||
import {
|
||||
onLoad,
|
||||
@ -179,12 +188,12 @@
|
||||
landdetail({
|
||||
land_id: id
|
||||
}).then((res) => {
|
||||
console.log(res);
|
||||
|
||||
if (res.code == 1) {
|
||||
res.data.kind = a
|
||||
res.data.datapic=b
|
||||
Object.assign(dataobj, res.data);
|
||||
console.log(dataobj)
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
@ -215,7 +224,7 @@
|
||||
})
|
||||
}
|
||||
const navtoForm = (item, type) => {
|
||||
console.log(item, type)
|
||||
// console.log(item, type)
|
||||
switch (type) {
|
||||
|
||||
// 施肥
|
||||
@ -273,7 +282,7 @@
|
||||
return currentTime
|
||||
}
|
||||
const perviewFn = (url) => {
|
||||
console.log(url)
|
||||
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
|
@ -3,7 +3,10 @@
|
||||
<view :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;z-inde:-1;'">
|
||||
|
||||
<view class="root">
|
||||
<video ref="videoPlayer" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/media/af4b9202306121644508620.mp4" controls @ended="playNext" :object-fit="object_fit"
|
||||
<video ref="videoPlayer"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/media/af4b9202306121644508620.mp4" controls
|
||||
autoplay="true"
|
||||
@ended="playNext" :object-fit="object_fit" @loadedmetadata="onVideoLoaded"
|
||||
:style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;z-inde:-1;'"></video>
|
||||
</view>
|
||||
|
||||
@ -49,18 +52,18 @@
|
||||
mounted() {
|
||||
|
||||
// 初始化时播放第一个源
|
||||
this.$nextTick(() => {
|
||||
this.playCurrent();
|
||||
});
|
||||
|
||||
// this.playCurrent();
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
playCurrent() {
|
||||
|
||||
onVideoLoaded() {
|
||||
console.log(this.$refs.videoPlayer)
|
||||
if (this.$refs.videoPlayer) {
|
||||
this.$refs.videoPlayer.load();
|
||||
// this.$refs.videoPlayer.load();
|
||||
this.$refs.videoPlayer.play();
|
||||
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
@ -70,7 +73,7 @@
|
||||
if (this.currentIndex >= this.rtmpSources.length) {
|
||||
this.currentIndex = 0; // 回到第一个源
|
||||
}
|
||||
|
||||
|
||||
this.playCurrent();
|
||||
}
|
||||
|
||||
|
@ -6,9 +6,10 @@
|
||||
<u--input v-model="formData.old_password" :password="!pwdShow.old_password" placeholder="请输入原密码"
|
||||
maxlength="18">
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<!-- <template slot="suffix">
|
||||
<uni-icons :type="pwdShow.old_password?'eye-filled':'eye-slash-filled'" @click="pwdShow.old_password=!pwdShow.old_password" color="#999"></uni-icons>
|
||||
</template> -->
|
||||
<template slot="suffix">
|
||||
<uni-icons :type="pwdShow.old_password?'eye-filled':'eye-slash-filled'"
|
||||
@click="pwdShow.old_password=!pwdShow.old_password" color="#999"></uni-icons>
|
||||
</template>
|
||||
<!-- #endif -->
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
@ -16,9 +17,10 @@
|
||||
<u--input v-model="formData.password" :password="!pwdShow.password" placeholder="请输入新密码"
|
||||
maxlength="18">
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<!-- <template slot="suffix">
|
||||
<u--icon :name="pwdShow.password?'eye-off':'eye-fill'" @click="pwdShow.old_password=!pwdShow.old_password" color="#999"></u--icon>
|
||||
</template> -->
|
||||
<template slot="suffix">
|
||||
<u--icon :name="pwdShow.password?'eye-off':'eye-fill'"
|
||||
@click="pwdShow.old_password=!pwdShow.old_password" color="#999"></u--icon>
|
||||
</template>
|
||||
<!-- #endif -->
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
@ -26,9 +28,10 @@
|
||||
<u--input v-model="formData.password_confirm" :password="!pwdShow.password_confirm"
|
||||
placeholder="请确认新密码" maxlength="18">
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<!-- <template slot="suffix">
|
||||
<u--icon :name="pwdShow.password_confirm?'eye-off':'eye-fill'" @click="pwdShow.old_password=!pwdShow.old_password" color="#999"></u--icon>
|
||||
</template> -->
|
||||
<template slot="suffix">
|
||||
<u--icon :name="pwdShow.password_confirm?'eye-off':'eye-fill'"
|
||||
@click="pwdShow.old_password=!pwdShow.old_password" color="#999"></u--icon>
|
||||
</template>
|
||||
<!-- #endif -->
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
@ -45,7 +48,7 @@
|
||||
<script>
|
||||
import {
|
||||
changePassword
|
||||
} from '@/api/file.js'
|
||||
} from '@/api/api.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -91,32 +94,28 @@
|
||||
submit() {
|
||||
this.$refs.formRef.validate().then(async (e) => {
|
||||
if (e) {
|
||||
if (this.formData.password == this.formData.old_password) return uni.$u.toast('新密码不能与原密码一致');
|
||||
if (this.formData.password == this.formData.old_password) return uni.$u.toast(
|
||||
'新密码不能与原密码一致');
|
||||
if (this.formData.password !== this.formData.password_confirm) return uni.$u.toast(
|
||||
'两次新密码不一致');
|
||||
|
||||
await changePassword({
|
||||
...this.formData
|
||||
});
|
||||
uni.$u.toast('修改成功');
|
||||
this.$u.sleep(500).then(() => {
|
||||
uni.showLoading({
|
||||
mask: true,
|
||||
title: '加载中'
|
||||
|
||||
changePassword(
|
||||
this.formData
|
||||
).then((res) => {
|
||||
|
||||
if (res.code == 1) {
|
||||
uni.$u.toast('修改成功');
|
||||
uni.switchTab({
|
||||
url: '/pages/index/personal',
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index',
|
||||
success: () => {
|
||||
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
BIN
static/img/FS.png
Normal file
BIN
static/img/FS.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 828 B |
BIN
static/img/FX.png
Normal file
BIN
static/img/FX.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 697 B |
BIN
static/img/GZ.png
Normal file
BIN
static/img/GZ.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
static/img/JY.png
Normal file
BIN
static/img/JY.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
static/img/SD.png
Normal file
BIN
static/img/SD.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
2
unpackage/dist/build/.nvue/app.css.js
vendored
2
unpackage/dist/build/.nvue/app.css.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
11
unpackage/dist/build/app-plus/app-service.js
vendored
11
unpackage/dist/build/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
2
unpackage/dist/build/app-plus/app.css
vendored
2
unpackage/dist/build/app-plus/app.css
vendored
File diff suppressed because one or more lines are too long
24
unpackage/dist/build/app-plus/manifest.json
vendored
24
unpackage/dist/build/app-plus/manifest.json
vendored
@ -23,6 +23,8 @@
|
||||
},
|
||||
"LivePusher": {},
|
||||
"VideoPlayer": {},
|
||||
"Barcode": {},
|
||||
"Camera": {},
|
||||
"UniNView": {
|
||||
"description": "UniNView原生渲染"
|
||||
}
|
||||
@ -115,7 +117,7 @@
|
||||
"uni-app": {
|
||||
"control": "uni-v3",
|
||||
"vueVersion": "3",
|
||||
"compilerVersion": "3.96",
|
||||
"compilerVersion": "3.98",
|
||||
"nvueCompiler": "uni-app",
|
||||
"renderer": "auto",
|
||||
"nvue": {
|
||||
@ -128,8 +130,8 @@
|
||||
},
|
||||
"tabBar": {
|
||||
"position": "bottom",
|
||||
"color": "#B3B3B3",
|
||||
"selectedColor": "#272822",
|
||||
"color": "#272822",
|
||||
"selectedColor": "#34D190",
|
||||
"borderStyle": "rgba(255,255,255,0.4)",
|
||||
"blurEffect": "none",
|
||||
"fontSize": "10px",
|
||||
@ -139,16 +141,22 @@
|
||||
"backgroundColor": "#EBF1EF",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"pagePath": "pages/index/massif",
|
||||
"text": "首页",
|
||||
"iconPath": "/static/tabs-icon/home.png",
|
||||
"selectedIconPath": "/static/img/DK.png"
|
||||
"iconPath": "/static/tabber/a-a.png",
|
||||
"selectedIconPath": "/static/tabber/a.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"text": "地块",
|
||||
"iconPath": "/static/tabber/b-b.png",
|
||||
"selectedIconPath": "/static/tabber/b.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/index/personal",
|
||||
"text": "我的",
|
||||
"iconPath": "/static/img/WD.png",
|
||||
"selectedIconPath": "/static/img/WD.png"
|
||||
"iconPath": "/static/tabber/c-a.png",
|
||||
"selectedIconPath": "/static/tabber/c.png"
|
||||
}
|
||||
],
|
||||
"selectedIndex": 0,
|
||||
|
File diff suppressed because one or more lines are too long
BIN
unpackage/dist/build/app-plus/static/logo.png
vendored
BIN
unpackage/dist/build/app-plus/static/logo.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 3.9 KiB |
2
unpackage/dist/dev/.nvue/app.css.js
vendored
2
unpackage/dist/dev/.nvue/app.css.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user