代码更新1.种植溯源对接扫码溯源接口,新增溯源结果界面 2.溯源监控界面完善 3.溯源详情图片展示
This commit is contained in:
parent
b30ab32f44
commit
b2c5c27e2f
3
App.vue
3
App.vue
|
@ -23,11 +23,12 @@
|
||||||
.card {
|
.card {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 693.93rpx;
|
width: 693.93rpx;
|
||||||
margin: 0 auto;
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 20rpx 20rpx;
|
padding: 20rpx 20rpx;
|
||||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||||
|
margin: 0 auto;
|
||||||
margin-bottom: 40rpx;
|
margin-bottom: 40rpx;
|
||||||
font-size: 29.79rpx;
|
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 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) => {
|
const perviewFn = (url) => {
|
||||||
console.log(url)
|
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
urls: [url]
|
urls: [url]
|
||||||
})
|
})
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
"usingComponents" : true,
|
"usingComponents" : true,
|
||||||
"nvueStyleCompiler" : "uni-app",
|
"nvueStyleCompiler" : "uni-app",
|
||||||
"compilerVersion" : 3,
|
"compilerVersion" : 3,
|
||||||
|
"screenOrientation":["portrait-primary","portrait-secondary","landscape-primary","landscape-secondary"],
|
||||||
"splashscreen" : {
|
"splashscreen" : {
|
||||||
"alwaysShowBeforeRender" : true,
|
"alwaysShowBeforeRender" : true,
|
||||||
"waiting" : true,
|
"waiting" : true,
|
||||||
|
@ -21,7 +22,9 @@
|
||||||
"Geolocation" : {},
|
"Geolocation" : {},
|
||||||
"Maps" : {},
|
"Maps" : {},
|
||||||
"LivePusher" : {},
|
"LivePusher" : {},
|
||||||
"VideoPlayer" : {}
|
"VideoPlayer" : {},
|
||||||
|
"Barcode" : {},
|
||||||
|
"Camera" : {}
|
||||||
},
|
},
|
||||||
/* 应用发布信息 */
|
/* 应用发布信息 */
|
||||||
"distribute" : {
|
"distribute" : {
|
||||||
|
|
10
pages.json
10
pages.json
|
@ -116,6 +116,15 @@
|
||||||
"navigationBarTextStyle": "black"
|
"navigationBarTextStyle": "black"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/landDetail/results",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "溯源结果",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#F4F4F4",
|
||||||
|
"navigationBarTextStyle": "black"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/updatePassword/updatePassword",
|
"path": "pages/updatePassword/updatePassword",
|
||||||
"style": {
|
"style": {
|
||||||
|
@ -125,7 +134,6 @@
|
||||||
"navigationBarTextStyle": "black"
|
"navigationBarTextStyle": "black"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "pages/index/personal",
|
"path": "pages/index/personal",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
customStyle="background:#F5F5F5;height:80rpx;;padding-left:40rpx;border:none"
|
customStyle="background:#F5F5F5;height:80rpx;;padding-left:40rpx;border:none"
|
||||||
placeholder="请输入密码" border="surround" v-model="formData.password"></u-input>
|
placeholder="请输入密码" border="surround" v-model="formData.password"></u-input>
|
||||||
</view>
|
</view>
|
||||||
<view class="resgiter">
|
<view class="resgiter" @click="resgiter">
|
||||||
用户注册
|
用户注册
|
||||||
</view>
|
</view>
|
||||||
<view class="sub-btn">
|
<view class="sub-btn">
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
login,
|
login,
|
||||||
|
|
||||||
xinregister
|
xinregister
|
||||||
} from '@/api/file.js';
|
} from '@/api/api.js';
|
||||||
import {
|
import {
|
||||||
useStore
|
useStore
|
||||||
} from 'vuex'
|
} from 'vuex'
|
||||||
|
@ -133,7 +133,14 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//注册
|
||||||
|
|
||||||
|
const resgiter = () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/Login/resgier'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//登录
|
||||||
const submitFn = () => {
|
const submitFn = () => {
|
||||||
|
|
||||||
|
|
||||||
|
@ -262,7 +269,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.resgiter {
|
.resgiter {
|
||||||
font-size: 20rpx;
|
font-size: 30rpx;
|
||||||
margin-top: 40rpx;
|
margin-top: 40rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
logregister
|
logregister
|
||||||
} from '@/api/file.js';
|
} from '@/api/api.js';
|
||||||
import {
|
import {
|
||||||
reactive,
|
reactive,
|
||||||
ref
|
ref
|
||||||
|
@ -79,8 +79,9 @@
|
||||||
logregister(formData).then((res) => {
|
logregister(formData).then((res) => {
|
||||||
|
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
|
uni.$u.toast('注册成功');
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: formData
|
delta: 1
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -13,31 +13,31 @@
|
||||||
<up-input placeholder="请输入土地面积" border="surround" v-model="data.formData.area"></up-input>
|
<up-input placeholder="请输入土地面积" border="surround" v-model="data.formData.area"></up-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="所在省份" prop="province_code" borderBottom required>
|
<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>
|
@click="isshow1"></up-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="所在城市" prop="city_code" borderBottom required>
|
<u-form-item label="所在城市" prop="city_code" borderBottom required>
|
||||||
<up-input placeholder="请选择所在城市" border="surround" v-model="city_name" @click="isshow2"
|
<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>
|
||||||
<u-form-item label="所在区县" prop="county_code" borderBottom required>
|
<u-form-item label="所在区县" prop="county_code" borderBottom required>
|
||||||
<up-input placeholder="请选择所在区县" border="surround" v-model="county_name" @click="isshow3"
|
<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>
|
||||||
<u-form-item label="所在镇街" prop="town_code" borderBottom required>
|
<u-form-item label="所在镇街" prop="town_code" borderBottom required>
|
||||||
<up-input placeholder="请选择所在镇街" border="surround" v-model="town_name" @click="isshow4"
|
<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>
|
||||||
<u-form-item label="所在乡村" prop="village_code" borderBottom required>
|
<u-form-item label="所在乡村" prop="village_code" borderBottom required>
|
||||||
<up-input placeholder="请选择所在乡村" border="surround" v-model="village_name" @click="isshow5"
|
<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>
|
||||||
<u-form-item label="所在小队" prop="group_code" borderBottom required>
|
<u-form-item label="所在小队" prop="group_code" borderBottom required>
|
||||||
<up-input placeholder="请选择所在小队" border="surround" v-model="group_name" @click="isshow6"
|
<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>
|
||||||
<u-form-item label="土地负责人" prop="master_name" borderBottom required>
|
<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>
|
||||||
<u-form-item label="负责人电话" prop="master_phone" borderBottom required>
|
<u-form-item label="负责人电话" prop="master_phone" borderBottom required>
|
||||||
<up-input placeholder="请输入负责人电话" type="number" border="surround"
|
<up-input placeholder="请输入负责人电话" type="number" border="surround"
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
towns,
|
towns,
|
||||||
villages,
|
villages,
|
||||||
groups
|
groups
|
||||||
} from '@/api/file.js'
|
} from '@/api/api.js'
|
||||||
|
|
||||||
const form1 = ref(null);
|
const form1 = ref(null);
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
|
@ -204,7 +204,7 @@
|
||||||
master_name: [{
|
master_name: [{
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
message: '请天下负责人',
|
message: '请输入土地负责人名称',
|
||||||
trigger: ['blur', 'change']
|
trigger: ['blur', 'change']
|
||||||
}],
|
}],
|
||||||
master_phone: [{
|
master_phone: [{
|
||||||
|
|
|
@ -122,7 +122,7 @@
|
||||||
towns,
|
towns,
|
||||||
villages,
|
villages,
|
||||||
groups
|
groups
|
||||||
} from '@/api/file.js'
|
} from '@/api/api.js'
|
||||||
|
|
||||||
const form = ref(null);
|
const form = ref(null);
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
|
|
|
@ -107,7 +107,7 @@
|
||||||
towns,
|
towns,
|
||||||
villages,
|
villages,
|
||||||
groups
|
groups
|
||||||
} from '@/api/file.js'
|
} from '@/api/api.js'
|
||||||
|
|
||||||
const form1 = ref();
|
const form1 = ref();
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-icon name="close" size="15" style="margin-left:120.85rpx;"
|
<u-icon name="close" size="15" style="margin-left:120.85rpx;"
|
||||||
@click="delimg(i)" v-show="mode=='add'"></u-icon>
|
@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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
import {
|
import {
|
||||||
addaction
|
addaction
|
||||||
} from '@/api/file.js'
|
} from '@/api/api.js'
|
||||||
|
|
||||||
const pic = reactive([]);
|
const pic = reactive([]);
|
||||||
const calendar = ref(null)
|
const calendar = ref(null)
|
||||||
|
@ -199,6 +199,13 @@
|
||||||
form.value.setRules(rules);
|
form.value.setRules(rules);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
//查看图片
|
||||||
|
const perviewFn = (url) => {
|
||||||
|
console.log(url)
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [url]
|
||||||
|
})
|
||||||
|
}
|
||||||
//图片删除
|
//图片删除
|
||||||
const delimg = (i) => {
|
const delimg = (i) => {
|
||||||
pic.splice(i, 1);
|
pic.splice(i, 1);
|
||||||
|
@ -293,7 +300,7 @@
|
||||||
let data = options.task ? JSON.parse(decodeURIComponent(options.task)) : null;
|
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);
|
Object.assign(formData, data.detail);
|
||||||
pic.splice(0, pic.length, data.detail.pic);
|
pic.splice(0, pic.length, ...data.detail.pic);
|
||||||
|
|
||||||
mode.value = 'detail'
|
mode.value = 'detail'
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<u--form labelPosition="top" labelWidth='100' :model="formData" :rules="rules" ref="form">
|
<u--form labelPosition="top" labelWidth='100' :model="formData" :rules="rules" ref="form">
|
||||||
<u-form-item label="肥料品牌" prop="kind" borderBottom ref='item1' required>
|
<u-form-item label="肥料种类" prop="kind" borderBottom ref='item1' required>
|
||||||
<up-input placeholder="请输入肥料品牌" :disabled="mode=='detail'" border="surround"
|
<up-input placeholder="请输入肥料种类" :disabled="mode=='detail'" border="surround"
|
||||||
v-model="formData.kind"></up-input>
|
v-model="formData.kind"></up-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="肥料品牌" prop="breed" borderBottom required>
|
<u-form-item label="肥料品牌" prop="breed" borderBottom required>
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)"
|
<u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)"
|
||||||
v-show="mode=='add'"></u-icon>
|
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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
import {
|
import {
|
||||||
addaction
|
addaction
|
||||||
} from '@/api/file.js'
|
} from '@/api/api.js'
|
||||||
|
|
||||||
const pic = reactive([]);
|
const pic = reactive([]);
|
||||||
const calendar = ref(null)
|
const calendar = ref(null)
|
||||||
|
@ -295,6 +295,12 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
//查看图片
|
||||||
|
const perviewFn = (url) => {
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [url]
|
||||||
|
})
|
||||||
}
|
}
|
||||||
//图片删除
|
//图片删除
|
||||||
const delimg = (i) => {
|
const delimg = (i) => {
|
||||||
|
@ -307,9 +313,9 @@
|
||||||
|
|
||||||
if (options.task) {
|
if (options.task) {
|
||||||
let data = options.task ? JSON.parse(decodeURIComponent(options.task)) : null;
|
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);
|
Object.assign(formData, data.detail);
|
||||||
pic.splice(0, pic.length, data.detail.pic);
|
pic.splice(0, pic.length, ...data.detail.pic);
|
||||||
|
|
||||||
mode.value = 'detail'
|
mode.value = 'detail'
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)"
|
<u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)"
|
||||||
v-show="mode=='add'"></u-icon>
|
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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
} from "@dcloudio/uni-app"
|
} from "@dcloudio/uni-app"
|
||||||
import {
|
import {
|
||||||
addaction
|
addaction
|
||||||
} from '@/api/file.js'
|
} from '@/api/api.js'
|
||||||
|
|
||||||
const form = ref(null)
|
const form = ref(null)
|
||||||
const task_id = ref('');
|
const task_id = ref('');
|
||||||
|
@ -157,6 +157,13 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
//查看图片
|
||||||
|
const perviewFn = (url) => {
|
||||||
|
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [url]
|
||||||
|
})
|
||||||
}
|
}
|
||||||
//图片删除
|
//图片删除
|
||||||
const delimg = (i) => {
|
const delimg = (i) => {
|
||||||
|
@ -200,13 +207,13 @@
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
if (options.task) {
|
if (options.task) {
|
||||||
let data = options.task ? JSON.parse(decodeURIComponent(options.task)) : null;
|
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);
|
Object.assign(formData, data.detail);
|
||||||
pic.splice(0, pic.length, data.detail.pic);
|
pic.splice(0, pic.length, ...data.detail.pic);
|
||||||
|
|
||||||
mode.value = 'detail'
|
mode.value = 'detail'
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: '除草详情'
|
title: '收获详情'
|
||||||
})
|
})
|
||||||
// formData=data.detail
|
// formData=data.detail
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)"
|
<u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)"
|
||||||
v-show="mode=='add'"></u-icon>
|
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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
|
|
||||||
import {
|
import {
|
||||||
addaction
|
addaction
|
||||||
} from '@/api/file.js'
|
} from '@/api/api.js'
|
||||||
const range = reactive([{
|
const range = reactive([{
|
||||||
value: 0,
|
value: 0,
|
||||||
name: "喷灌"
|
name: "喷灌"
|
||||||
|
@ -259,6 +259,13 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
//查看图片
|
||||||
|
const perviewFn = (url) => {
|
||||||
|
console.log(url)
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [url]
|
||||||
|
})
|
||||||
}
|
}
|
||||||
//图片删除
|
//图片删除
|
||||||
const delimg = (i) => {
|
const delimg = (i) => {
|
||||||
|
@ -305,7 +312,7 @@
|
||||||
let data = options.task ? JSON.parse(decodeURIComponent(options.task)) : null;
|
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);
|
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;
|
formDatatype.value = range.find(item => item.value === formData.type).name;
|
||||||
mode.value = 'detail'
|
mode.value = 'detail'
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-icon name="close" size="15" style="margin-left:120.85rpx;"
|
<u-icon name="close" size="15" style="margin-left:120.85rpx;"
|
||||||
@click="delimg(i)" v-show="mode=='add'"></u-icon>
|
@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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
|
|
||||||
import {
|
import {
|
||||||
addplant
|
addplant
|
||||||
} from '@/api/file.js'
|
} from '@/api/api.js'
|
||||||
|
|
||||||
const calendar = ref(null)
|
const calendar = ref(null)
|
||||||
const form1 = ref(null);
|
const form1 = ref(null);
|
||||||
|
@ -181,6 +181,13 @@
|
||||||
url
|
url
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//查看图片
|
||||||
|
const perviewFn = (url) => {
|
||||||
|
console.log(url)
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [url]
|
||||||
|
})
|
||||||
|
}
|
||||||
const addFn = async () => {
|
const addFn = async () => {
|
||||||
console.log(form1.value)
|
console.log(form1.value)
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,8 @@
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)"
|
<u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)"
|
||||||
v-show="mode=='add'"></u-icon>
|
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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -113,7 +114,7 @@
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
import {
|
import {
|
||||||
addaction
|
addaction
|
||||||
} from '@/api/file.js'
|
} from '@/api/api.js'
|
||||||
|
|
||||||
const pic = reactive([]);
|
const pic = reactive([]);
|
||||||
const calendar = ref(null)
|
const calendar = ref(null)
|
||||||
|
@ -233,7 +234,13 @@
|
||||||
// let res = await Uploads()
|
// let res = await Uploads()
|
||||||
// data.formData.pic = res.data.image
|
// data.formData.pic = res.data.image
|
||||||
}
|
}
|
||||||
|
//查看图片
|
||||||
|
const perviewFn = (url) => {
|
||||||
|
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [url]
|
||||||
|
})
|
||||||
|
}
|
||||||
//图片删除
|
//图片删除
|
||||||
const delimg = (i) => {
|
const delimg = (i) => {
|
||||||
pic.splice(i, 1);
|
pic.splice(i, 1);
|
||||||
|
@ -298,7 +305,8 @@
|
||||||
let data = options.task ? JSON.parse(decodeURIComponent(options.task)) : null;
|
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);
|
Object.assign(formData, data.detail);
|
||||||
pic.splice(0, pic.length, data.detail.pic);
|
|
||||||
|
pic.splice(0, pic.length, ...data.detail.pic);
|
||||||
|
|
||||||
mode.value = 'detail'
|
mode.value = 'detail'
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
|
|
|
@ -71,19 +71,19 @@
|
||||||
reactive,
|
reactive,
|
||||||
onMounted
|
onMounted
|
||||||
} from "vue"
|
} from "vue"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
landlist
|
landlist
|
||||||
} from '@/api/file.js'
|
} from '@/api/api.js'
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
console.log(11)
|
|
||||||
list()
|
list()
|
||||||
})
|
})
|
||||||
onPullDownRefresh(() => {
|
onPullDownRefresh(() => {
|
||||||
console.log(11)
|
list()
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
})
|
})
|
||||||
onReachBottom(() => {
|
onReachBottom(() => {
|
||||||
console.log(11)
|
|
||||||
getlist()
|
getlist()
|
||||||
})
|
})
|
||||||
const datalist = reactive([])
|
const datalist = reactive([])
|
||||||
|
@ -128,8 +128,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const search = () => {
|
const search = () => {
|
||||||
console.log('111111')
|
|
||||||
|
|
||||||
|
|
||||||
getlist()
|
getlist()
|
||||||
|
|
||||||
|
@ -204,6 +202,7 @@
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.coneng-detail {
|
.coneng-detail {
|
||||||
width: 478rpx;
|
width: 478rpx;
|
||||||
height: 341rpx;
|
height: 341rpx;
|
||||||
|
@ -218,7 +217,8 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 70rpx auto;
|
|
||||||
|
margin: 300rpx auto;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 280rpx;
|
width: 280rpx;
|
||||||
|
@ -228,6 +228,7 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 693.93rpx;
|
width: 693.93rpx;
|
||||||
|
|
|
@ -28,16 +28,16 @@
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="card" v-if="Object.keys(dataobj).length>0">
|
<view class="card" v-if="Object.keys(dataobj).length>0">
|
||||||
<view class="" @click="navgo">
|
<view class="" @click="navgo">
|
||||||
<view class="">
|
<view class="" style="margin: 10rpx 0;">
|
||||||
土地名称: {{dataobj.title}}
|
土地名称: {{dataobj.title}}
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="" style="margin: 10rpx 0;">
|
<!-- <view class="" style="margin: 10rpx 0;">
|
||||||
农作物: 洋芋
|
农作物: 洋芋
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="">
|
<view class="" style="margin: 10rpx 0;">
|
||||||
土地面积: {{dataobj.total_area}}亩
|
土地面积: {{dataobj.total_area}}亩
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="" style="margin: 10rpx 0;">
|
||||||
种植面积: {{dataobj.total_area-dataobj.residual_area}}亩
|
种植面积: {{dataobj.total_area-dataobj.residual_area}}亩
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -76,7 +76,8 @@
|
||||||
</view>
|
</view>
|
||||||
</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="soil-monitor">
|
||||||
<view class="head">
|
<view class="head">
|
||||||
|
@ -136,14 +137,14 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="coneng-detail" v-else>
|
<!-- <view class="coneng-detail" v-else>
|
||||||
<view class="">
|
<view class="">
|
||||||
<image src="@/static/img/zw.png" mode="aspectFit"></image>
|
<image src="@/static/img/zw.png" mode="aspectFit"></image>
|
||||||
<view class="">
|
<view class="">
|
||||||
暂无数据
|
暂无数据
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<!-- 组件 -->
|
<!-- 组件 -->
|
||||||
|
|
||||||
<u-loading-page :loading="showLoading"></u-loading-page>
|
<u-loading-page :loading="showLoading"></u-loading-page>
|
||||||
|
@ -167,16 +168,15 @@
|
||||||
<!-- 组件 -->
|
<!-- 组件 -->
|
||||||
|
|
||||||
<view class="Modal">
|
<view class="Modal">
|
||||||
|
<u-popup :show="showModal" mode="center" @close="closeModal" :round="10">
|
||||||
<u-popup :show="showModal" mode="center" @close="showModal=false" :round="10">
|
|
||||||
<view class="Modal">
|
<view class="Modal">
|
||||||
<text> 产品编号:</text>
|
<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>
|
style="width: 300rpx;margin-left: 30rpx;" :localdata="range"></uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="Modal-btn">
|
<view class="Modal-btn">
|
||||||
<view class="Modal-btna" @click="showModal=false">
|
<view class="Modal-btna" @click="closeModal">
|
||||||
取消
|
取消
|
||||||
</view>
|
</view>
|
||||||
<view class="Modal-btnb" @click="bindFn">
|
<view class="Modal-btnb" @click="bindFn">
|
||||||
|
@ -196,41 +196,30 @@
|
||||||
ref
|
ref
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import {
|
import {
|
||||||
onLoad
|
onLoad,
|
||||||
|
onShow
|
||||||
} from "@dcloudio/uni-app"
|
} from "@dcloudio/uni-app"
|
||||||
import {
|
import {
|
||||||
bindproduct,
|
bindproduct,
|
||||||
lindexist,
|
lindexist,
|
||||||
landlist,
|
landlist,
|
||||||
landproduct
|
landproduct
|
||||||
} from '@/api/file.js'
|
} from '@/api/api.js'
|
||||||
|
|
||||||
|
|
||||||
const showModal = ref(false)
|
const showModal = ref(false)
|
||||||
|
|
||||||
const range = reactive([{
|
const range = reactive([])
|
||||||
value: 0,
|
|
||||||
text: "喷灌"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 1,
|
|
||||||
text: "滴灌"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 2,
|
|
||||||
text: "沟灌"
|
|
||||||
},
|
|
||||||
])
|
|
||||||
// 土壤监测数据
|
// 土壤监测数据
|
||||||
const url = ref('https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg')
|
const url = ref('https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg')
|
||||||
const soilList = reactive([{
|
const soilList = reactive([{
|
||||||
icon: "/static/img/sj.png",
|
icon: "/static/img/CTWD.png",
|
||||||
name: "土壤温度",
|
name: "土壤温度",
|
||||||
num: 20,
|
num: 20,
|
||||||
unit: "℃",
|
unit: "℃",
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
icon: "/static/img/sj.png",
|
icon: "/static/img/SD.png",
|
||||||
name: "土壤湿度",
|
name: "土壤湿度",
|
||||||
num: 20,
|
num: 20,
|
||||||
unit: "%RH",
|
unit: "%RH",
|
||||||
|
@ -242,25 +231,25 @@
|
||||||
unit: "μS/cm",
|
unit: "μS/cm",
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
icon: "/static/img/sj.png",
|
icon: "/static/img/CTPH.png",
|
||||||
name: "土壤PH值",
|
name: "土壤PH值",
|
||||||
num: 20,
|
num: 20,
|
||||||
unit: "PH",
|
unit: "PH",
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
icon: "/static/img/sj.png",
|
icon: "/static/img/AHL.png",
|
||||||
name: "土壤含氮量",
|
name: "土壤含氮量",
|
||||||
num: 20,
|
num: 20,
|
||||||
unit: "mg/kg",
|
unit: "mg/kg",
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
icon: "/static/img/sj.png",
|
icon: "/static/img/AQHL.png",
|
||||||
name: "土壤含磷量",
|
name: "土壤含磷量",
|
||||||
num: 20,
|
num: 20,
|
||||||
unit: "mg/kg",
|
unit: "mg/kg",
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
icon: "/static/img/sj.png",
|
icon: "/static/img/AQHL.png",
|
||||||
name: "土壤含钾量",
|
name: "土壤含钾量",
|
||||||
num: 20,
|
num: 20,
|
||||||
unit: "mg/kg",
|
unit: "mg/kg",
|
||||||
|
@ -281,8 +270,11 @@
|
||||||
const scanFn = () => {
|
const scanFn = () => {
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
console.log('条码类型:' + res.scanType);
|
// console.log('条码类型:' + res.scanType);
|
||||||
console.log('条码内容:' + res.result);
|
console.log('条码内容:' + res.result.split('='));
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/landDetail/results?id='+res.result.split('=')[1]
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -292,31 +284,31 @@
|
||||||
const columns = reactive([]);
|
const columns = reactive([]);
|
||||||
// 环境监测数据
|
// 环境监测数据
|
||||||
const environmentList = reactive([{
|
const environmentList = reactive([{
|
||||||
icon: "/static/img/sj.png",
|
icon: "/static/img/FS.png",
|
||||||
name: "风速",
|
name: "风速",
|
||||||
num: 20,
|
num: 20,
|
||||||
unit: "%",
|
unit: "%",
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
icon: "/static/img/sj.png",
|
icon: "/static/img/FX.png",
|
||||||
name: "风向",
|
name: "风向",
|
||||||
num: 20,
|
num: 20,
|
||||||
unit: "%",
|
unit: "%",
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
icon: "/static/img/sj.png",
|
icon: "/static/img/CTWD.png",
|
||||||
name: "温度",
|
name: "温度",
|
||||||
num: 20,
|
num: 20,
|
||||||
unit: "℃",
|
unit: "℃",
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
icon: "/static/img/sj.png",
|
icon: "/static/img/SD.png",
|
||||||
name: "湿度",
|
name: "湿度",
|
||||||
num: 20,
|
num: 20,
|
||||||
unit: "%RH",
|
unit: "%RH",
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
icon: "/static/img/sj.png",
|
icon: '/static/img/CO2.png',
|
||||||
name: "二氧化碳",
|
name: "二氧化碳",
|
||||||
num: 20,
|
num: 20,
|
||||||
unit: "ppm",
|
unit: "ppm",
|
||||||
|
@ -328,13 +320,13 @@
|
||||||
unit: "KPa",
|
unit: "KPa",
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
icon: "/static/img/sj.png",
|
icon: "/static/img/JY.png",
|
||||||
name: "雨量",
|
name: "雨量",
|
||||||
num: 20,
|
num: 20,
|
||||||
unit: "mm",
|
unit: "mm",
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
icon: "/static/img/sj.png",
|
icon: "/static/img/GZ.png",
|
||||||
name: "光照量",
|
name: "光照量",
|
||||||
num: 20,
|
num: 20,
|
||||||
unit: "Lux",
|
unit: "Lux",
|
||||||
|
@ -342,8 +334,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
])
|
])
|
||||||
onLoad(() => {
|
onShow(() => {
|
||||||
|
|
||||||
|
|
||||||
getlist()
|
getlist()
|
||||||
|
|
||||||
|
@ -415,21 +406,36 @@
|
||||||
const getlist2 = () => {
|
const getlist2 = () => {
|
||||||
landproduct().then((res) => {
|
landproduct().then((res) => {
|
||||||
if (res.code == 1) {
|
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 = () => {
|
const biproduct = () => {
|
||||||
bindproduct({
|
bindproduct({
|
||||||
land_id: '2222',
|
land_id: dataobj.id,
|
||||||
product_id: equipmentId.value
|
product_id: equipmentId.value
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
uni.$u.toast(res.msg);
|
uni.$u.toast(res.msg);
|
||||||
// this.dataobj=res.data
|
// this.dataobj=res.data
|
||||||
|
equipmentId.value = ''
|
||||||
}
|
}
|
||||||
console.log(res)
|
console.log(res)
|
||||||
})
|
})
|
||||||
|
@ -455,6 +461,7 @@
|
||||||
const currentTime = formattedHour + ':' + formattedMinute;
|
const currentTime = formattedHour + ':' + formattedMinute;
|
||||||
return currentTime
|
return currentTime
|
||||||
}
|
}
|
||||||
|
|
||||||
const navgo = () => {
|
const navgo = () => {
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -468,7 +475,7 @@
|
||||||
}
|
}
|
||||||
getNowTimeFn()
|
getNowTimeFn()
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" >
|
||||||
page {
|
page {
|
||||||
background-color: $theme-bg-color;
|
background-color: $theme-bg-color;
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
reactive,
|
reactive,
|
||||||
ref
|
ref
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import { logout } from '@/api/file.js'
|
import { logout } from '@/api/api.js'
|
||||||
import store from "@/store/index.js"
|
import store from "@/store/index.js"
|
||||||
|
|
||||||
const userinfo = reactive({})
|
const userinfo = reactive({})
|
||||||
|
@ -114,7 +114,10 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" >
|
||||||
|
page{
|
||||||
|
background-color: $theme-bg-color;
|
||||||
|
}
|
||||||
.head {
|
.head {
|
||||||
height: 25vh;
|
height: 25vh;
|
||||||
background-color: $theme-main-color;
|
background-color: $theme-main-color;
|
||||||
|
@ -132,8 +135,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
height: 75vh;
|
|
||||||
background-color: $theme-bg-color;
|
|
||||||
padding-top: 30rpx;
|
padding-top: 30rpx;
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
|
|
|
@ -99,20 +99,17 @@
|
||||||
|
|
||||||
import {
|
import {
|
||||||
plantlist,
|
plantlist,
|
||||||
|
|
||||||
landdetail
|
landdetail
|
||||||
} from '@/api/file.js'
|
} from '@/api/api.js'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
onShow
|
onShow
|
||||||
} from "@dcloudio/uni-app"
|
} from "@dcloudio/uni-app"
|
||||||
const list = reactive([{
|
const list = reactive([{
|
||||||
|
|
||||||
id: 1,
|
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({
|
landdetail({
|
||||||
land_id: typeID.value
|
land_id: typeID.value
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res);
|
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
Object.assign(dataobj, res.data);
|
Object.assign(dataobj, res.data);
|
||||||
|
|
||||||
|
@ -216,7 +213,7 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const navtoForm = (item, type) => {
|
const navtoForm = (item, type) => {
|
||||||
console.log(item)
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/landDetail/tudi?data=' +item.id
|
url: '/pages/landDetail/tudi?data=' +item.id
|
||||||
})
|
})
|
||||||
|
@ -235,8 +232,9 @@
|
||||||
const currentTime = formattedHour + ':' + formattedMinute;
|
const currentTime = formattedHour + ':' + formattedMinute;
|
||||||
return currentTime
|
return currentTime
|
||||||
}
|
}
|
||||||
|
//查看
|
||||||
const perviewFn = (url) => {
|
const perviewFn = (url) => {
|
||||||
console.log(url)
|
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
urls: [url]
|
urls: [url]
|
||||||
})
|
})
|
||||||
|
@ -274,7 +272,7 @@
|
||||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||||
border: 1px solid $theme-main-color;
|
border: 1px solid $theme-main-color;
|
||||||
margin: 20rpx auto;
|
margin: 20rpx auto;
|
||||||
line-height: 66rpx;
|
line-height: 66.59rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: $theme-main-color;
|
color: $theme-main-color;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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="card_body">
|
||||||
<view class="left">
|
<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>
|
height="200rpx"></u--image>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
|
@ -42,6 +42,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-else>
|
<view class="" v-else>
|
||||||
|
<view class="" v-if="!item.detail.type">
|
||||||
<view class="">
|
<view class="">
|
||||||
{{item.type_text.slice(0, -2)}}种类:{{item.detail.kind}}
|
{{item.type_text.slice(0, -2)}}种类:{{item.detail.kind}}
|
||||||
</view>
|
</view>
|
||||||
|
@ -51,12 +52,20 @@
|
||||||
<view class="">
|
<view class="">
|
||||||
{{item.type_text.slice(0, -2)}}面积: {{item.detail.area}}
|
{{item.type_text.slice(0, -2)}}面积: {{item.detail.area}}
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
<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="">
|
<view class="">
|
||||||
参与人员: {{item.detail.user}}
|
参与人员: {{item.detail.user}}
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="" v-if="item.detail.start_date">
|
||||||
开始日期: {{item.create_time}}
|
开始日期: {{item.detail.start_date}}
|
||||||
</view>
|
</view>
|
||||||
|
<view class="" v-if="item.detail.end_date">
|
||||||
|
结束日期: {{item.detail.end_date}}
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
@ -100,7 +109,7 @@
|
||||||
plantdetail,
|
plantdetail,
|
||||||
actionlist,
|
actionlist,
|
||||||
landdetail
|
landdetail
|
||||||
} from '@/api/file.js'
|
} from '@/api/api.js'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
|
@ -179,12 +188,12 @@
|
||||||
landdetail({
|
landdetail({
|
||||||
land_id: id
|
land_id: id
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res);
|
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
res.data.kind = a
|
res.data.kind = a
|
||||||
res.data.datapic=b
|
res.data.datapic=b
|
||||||
Object.assign(dataobj, res.data);
|
Object.assign(dataobj, res.data);
|
||||||
console.log(dataobj)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -215,7 +224,7 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const navtoForm = (item, type) => {
|
const navtoForm = (item, type) => {
|
||||||
console.log(item, type)
|
// console.log(item, type)
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
|
||||||
// 施肥
|
// 施肥
|
||||||
|
@ -273,7 +282,7 @@
|
||||||
return currentTime
|
return currentTime
|
||||||
}
|
}
|
||||||
const perviewFn = (url) => {
|
const perviewFn = (url) => {
|
||||||
console.log(url)
|
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
urls: [url]
|
urls: [url]
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
<view :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;z-inde:-1;'">
|
<view :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;z-inde:-1;'">
|
||||||
|
|
||||||
<view class="root">
|
<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>
|
:style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;z-inde:-1;'"></video>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -49,16 +52,16 @@
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
// 初始化时播放第一个源
|
// 初始化时播放第一个源
|
||||||
this.$nextTick(() => {
|
|
||||||
this.playCurrent();
|
// this.playCurrent();
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
playCurrent() {
|
onVideoLoaded() {
|
||||||
|
console.log(this.$refs.videoPlayer)
|
||||||
if (this.$refs.videoPlayer) {
|
if (this.$refs.videoPlayer) {
|
||||||
this.$refs.videoPlayer.load();
|
// this.$refs.videoPlayer.load();
|
||||||
this.$refs.videoPlayer.play();
|
this.$refs.videoPlayer.play();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,9 +6,10 @@
|
||||||
<u--input v-model="formData.old_password" :password="!pwdShow.old_password" placeholder="请输入原密码"
|
<u--input v-model="formData.old_password" :password="!pwdShow.old_password" placeholder="请输入原密码"
|
||||||
maxlength="18">
|
maxlength="18">
|
||||||
<!-- #ifdef APP-PLUS -->
|
<!-- #ifdef APP-PLUS -->
|
||||||
<!-- <template slot="suffix">
|
<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>
|
<uni-icons :type="pwdShow.old_password?'eye-filled':'eye-slash-filled'"
|
||||||
</template> -->
|
@click="pwdShow.old_password=!pwdShow.old_password" color="#999"></uni-icons>
|
||||||
|
</template>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</u--input>
|
</u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
@ -16,9 +17,10 @@
|
||||||
<u--input v-model="formData.password" :password="!pwdShow.password" placeholder="请输入新密码"
|
<u--input v-model="formData.password" :password="!pwdShow.password" placeholder="请输入新密码"
|
||||||
maxlength="18">
|
maxlength="18">
|
||||||
<!-- #ifdef APP-PLUS -->
|
<!-- #ifdef APP-PLUS -->
|
||||||
<!-- <template slot="suffix">
|
<template slot="suffix">
|
||||||
<u--icon :name="pwdShow.password?'eye-off':'eye-fill'" @click="pwdShow.old_password=!pwdShow.old_password" color="#999"></u--icon>
|
<u--icon :name="pwdShow.password?'eye-off':'eye-fill'"
|
||||||
</template> -->
|
@click="pwdShow.old_password=!pwdShow.old_password" color="#999"></u--icon>
|
||||||
|
</template>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</u--input>
|
</u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
@ -26,9 +28,10 @@
|
||||||
<u--input v-model="formData.password_confirm" :password="!pwdShow.password_confirm"
|
<u--input v-model="formData.password_confirm" :password="!pwdShow.password_confirm"
|
||||||
placeholder="请确认新密码" maxlength="18">
|
placeholder="请确认新密码" maxlength="18">
|
||||||
<!-- #ifdef APP-PLUS -->
|
<!-- #ifdef APP-PLUS -->
|
||||||
<!-- <template slot="suffix">
|
<template slot="suffix">
|
||||||
<u--icon :name="pwdShow.password_confirm?'eye-off':'eye-fill'" @click="pwdShow.old_password=!pwdShow.old_password" color="#999"></u--icon>
|
<u--icon :name="pwdShow.password_confirm?'eye-off':'eye-fill'"
|
||||||
</template> -->
|
@click="pwdShow.old_password=!pwdShow.old_password" color="#999"></u--icon>
|
||||||
|
</template>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</u--input>
|
</u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
@ -45,7 +48,7 @@
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
changePassword
|
changePassword
|
||||||
} from '@/api/file.js'
|
} from '@/api/api.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -91,31 +94,27 @@
|
||||||
submit() {
|
submit() {
|
||||||
this.$refs.formRef.validate().then(async (e) => {
|
this.$refs.formRef.validate().then(async (e) => {
|
||||||
if (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(
|
if (this.formData.password !== this.formData.password_confirm) return uni.$u.toast(
|
||||||
'两次新密码不一致');
|
'两次新密码不一致');
|
||||||
|
|
||||||
await changePassword({
|
changePassword(
|
||||||
...this.formData
|
this.formData
|
||||||
});
|
).then((res) => {
|
||||||
|
|
||||||
|
if (res.code == 1) {
|
||||||
uni.$u.toast('修改成功');
|
uni.$u.toast('修改成功');
|
||||||
this.$u.sleep(500).then(() => {
|
|
||||||
uni.showLoading({
|
|
||||||
mask: true,
|
|
||||||
title: '加载中'
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/index/index',
|
url: '/pages/index/personal',
|
||||||
success: () => {
|
|
||||||
|
|
||||||
uni.hideLoading()
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 828 B |
Binary file not shown.
After Width: | Height: | Size: 697 B |
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -23,6 +23,8 @@
|
||||||
},
|
},
|
||||||
"LivePusher": {},
|
"LivePusher": {},
|
||||||
"VideoPlayer": {},
|
"VideoPlayer": {},
|
||||||
|
"Barcode": {},
|
||||||
|
"Camera": {},
|
||||||
"UniNView": {
|
"UniNView": {
|
||||||
"description": "UniNView原生渲染"
|
"description": "UniNView原生渲染"
|
||||||
}
|
}
|
||||||
|
@ -115,7 +117,7 @@
|
||||||
"uni-app": {
|
"uni-app": {
|
||||||
"control": "uni-v3",
|
"control": "uni-v3",
|
||||||
"vueVersion": "3",
|
"vueVersion": "3",
|
||||||
"compilerVersion": "3.96",
|
"compilerVersion": "3.98",
|
||||||
"nvueCompiler": "uni-app",
|
"nvueCompiler": "uni-app",
|
||||||
"renderer": "auto",
|
"renderer": "auto",
|
||||||
"nvue": {
|
"nvue": {
|
||||||
|
@ -128,8 +130,8 @@
|
||||||
},
|
},
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
"position": "bottom",
|
"position": "bottom",
|
||||||
"color": "#B3B3B3",
|
"color": "#272822",
|
||||||
"selectedColor": "#272822",
|
"selectedColor": "#34D190",
|
||||||
"borderStyle": "rgba(255,255,255,0.4)",
|
"borderStyle": "rgba(255,255,255,0.4)",
|
||||||
"blurEffect": "none",
|
"blurEffect": "none",
|
||||||
"fontSize": "10px",
|
"fontSize": "10px",
|
||||||
|
@ -139,16 +141,22 @@
|
||||||
"backgroundColor": "#EBF1EF",
|
"backgroundColor": "#EBF1EF",
|
||||||
"list": [
|
"list": [
|
||||||
{
|
{
|
||||||
"pagePath": "pages/index/index",
|
"pagePath": "pages/index/massif",
|
||||||
"text": "首页",
|
"text": "首页",
|
||||||
"iconPath": "/static/tabs-icon/home.png",
|
"iconPath": "/static/tabber/a-a.png",
|
||||||
"selectedIconPath": "/static/img/DK.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",
|
"pagePath": "pages/index/personal",
|
||||||
"text": "我的",
|
"text": "我的",
|
||||||
"iconPath": "/static/img/WD.png",
|
"iconPath": "/static/tabber/c-a.png",
|
||||||
"selectedIconPath": "/static/img/WD.png"
|
"selectedIconPath": "/static/tabber/c.png"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"selectedIndex": 0,
|
"selectedIndex": 0,
|
||||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 3.9 KiB |
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue