开始分包

master
Tuzki 2 years ago
parent d5f10c1bed
commit 2f6d8adff3
  1. 35
      api/system/addCrop/addCrop.js
  2. 11
      api/system/block/block.js
  3. 835
      components/htz-image-upload/htz-image-upload.vue
  4. 4
      components/uni-section/uni-section.vue
  5. 2
      components/verifition/verifyPoint/verifyPoint.vue
  6. 2
      components/verifition/verifySlider/verifySlider.vue
  7. 1
      config.js
  8. 23
      package.json
  9. 30
      pages.json
  10. 3
      pages/block/index.vue
  11. 10
      pages/index.vue
  12. 4
      pages/login.vue
  13. 2
      pages/traceability-code/inventory.vue
  14. 2
      pages/traceability-code/sales.vue
  15. 2
      pages/traceability-product/delivery/deliveryEdit.vue
  16. 4
      pages/traceability-product/loss/index.vue
  17. 23
      pages/work/index.vue
  18. BIN
      static/favicon.ico
  19. 78
      static/images/code_bg.svg
  20. 2
      static/images/icon_agriculture.svg
  21. 2
      static/images/icon_damage.svg
  22. 2
      static/images/icon_delivery.svg
  23. 17
      static/images/icon_delivery_line.svg
  24. 2
      static/images/icon_inventory-code.svg
  25. 2
      static/images/icon_machining.svg
  26. 2
      static/images/icon_plant.svg
  27. 2
      static/images/icon_product.svg
  28. 2
      static/images/icon_sale-code.svg
  29. 2
      static/images/icon_sale.svg
  30. 2
      static/images/icon_select.svg
  31. 2
      static/images/index_bg.svg
  32. 2
      static/images/login_bg.svg
  33. BIN
      static/images/searchBg/del.png
  34. BIN
      static/images/searchBg/del2.png
  35. BIN
      static/images/searchBg/search-bg.png
  36. BIN
      static/logo.png
  37. BIN
      static/logo200.png
  38. 10
      store/index.js
  39. 305
      sunPages/addCropForm/addCropForm.vue
  40. 166
      sunPages/addCrops/addCrops.vue
  41. 98
      sunPages/blockDetail/blockDetail.vue
  42. 290
      sunPages/commonSearch/commonSearch.vue
  43. 1
      uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue
  44. 1
      uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue

@ -0,0 +1,35 @@
import request from '@/utils/request'
// 获得农产品 列表—下拉框
export function getAgriculturalProductList() {
return request({
url: '/traceability/agricultural-product/selectList',
method: 'get'
})
}
// 获得产品品种 列表—下拉框
export function getSpeciesList(params) {
return request({
url: '/traceability/species/selectList',
method: 'get',
params,
})
}
// 获得全部地块列表
export function getBlockList(id,status) {
return request({
url: '/traceability/block/all?baseId='+id+'&status='+status,
method: 'get',
})
}
// 创建农作物信息;
export function createCropper(data) {
return request({
url: '/traceability/cropper/create',
method: 'post',
data: data
})
}

@ -60,4 +60,13 @@ export function updateBlock(data) {
method: 'put',
data: data
})
}
}
// 结束种植;
export function stopCropper(data) {
return request({
url: '/traceability/cropper/updateStatus',
method: 'put',
data: data
})
}

@ -0,0 +1,835 @@
<template>
<view class="htz-image-upload-list">
<view class="htz-image-upload-Item" v-for="(item,index) in uploadLists" :key="index">
<view class="htz-image-upload-Item-video" v-if="isVideo(item)">
<!-- #ifndef APP-PLUS -->
<video :disabled="false" :controls="false" :src="getFileUrl(item)">
<cover-view class="htz-image-upload-Item-video-fixed" @click="previewVideo(getFileUrl(item))">
</cover-view>
<cover-view class="htz-image-upload-Item-del-cover" v-if="remove && previewVideoSrc==''" @click="imgDel(index)">×</cover-view>
</video>
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<view class="htz-image-upload-Item-video-fixed" @click="previewVideo(getFileUrl(item))"></view>
<image class="htz-image-upload-Item-video-app-poster" mode="widthFix" :src="appVideoPoster"></image>
<!-- #endif -->
</view>
<image v-else :src="getFileUrl(item)" @click="imgPreview(getFileUrl(item))"></image>
<view class="htz-image-upload-Item-del" v-if="remove" @click="imgDel(index)">×</view>
</view>
<view class="htz-image-upload-Item htz-image-upload-Item-add" v-if="uploadLists.length<max && add" @click="chooseFile">
+
</view>
<view class="preview-full" v-if="previewVideoSrc!=''">
<video :autoplay="true" :src="previewVideoSrc" :show-fullscreen-btn="false">
<cover-view class="preview-full-close" @click="previewVideoClose"> ×
</cover-view>
</video>
</view>
<!-- -->
</view>
</template>
<style>
.ceshi {
width: 100%;
height: 100%;
position: relative;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: #FFFFFF;
color: #2C405A;
opacity: 0.5;
z-index: 100;
}
</style>
<script>
export default {
name: 'htz-image-upload',
props: {
max: { //
type: Number,
default: 1,
},
chooseNum: { //
type: Number,
default: 9,
},
name: { //
type: String,
default: 'file',
},
dataType: { //v-model
type: Number,
default: 0, // 0: ['http://xxxx.jpg','http://xxxx.jpg'] 1:[{type:0,url:'http://xxxx.jpg'}] type 0 1 url 使
},
remove: { //
type: Boolean,
default: true,
},
add: { //
type: Boolean,
default: true,
},
disabled: { //
type: Boolean,
default: false,
},
sourceType: { // psH5
type: Array,
default: () => ['album', 'camera'],
},
action: { // 使uniClouduniCloud
type: String,
default: '',
},
headers: { //
type: Object,
default: () => {},
},
formData: { //HTTP form data
type: Object,
default: () => {},
},
compress: { //
type: Boolean,
default: true,
},
quality: { //0100
type: Number,
default: 80,
},
// #ifndef VUE3
value: { //
type: Array,
default: () => [],
},
// #endif
// #ifdef VUE3
modelValue: { //
type: Array,
default: () => [],
},
// #endif
uploadSuccess: {
default: (res) => {
return {
success: false,
url: ''
}
},
},
mediaType: { // image/video/all
type: String,
default: 'image',
},
maxDuration: { // 60 ()
type: Number,
default: 60,
},
camera: { //'front''back''back'()
type: String,
default: 'back',
},
appVideoPoster: { //app app
type: String,
default: '/static/htz-image-upload/play.png',
},
},
data() {
return {
uploadLists: [],
mediaTypeData: ['image', 'video', 'all'],
previewVideoSrc: '',
}
},
mounted: function() {
this.$nextTick(function() {
// #ifndef VUE3
this.uploadLists = this.value;
// #endif
// #ifdef VUE3
this.uploadLists = this.modelValue;
// #endif
if (this.mediaTypeData.indexOf(this.mediaType) == -1) {
uni.showModal({
title: '提示',
content: 'mediaType参数不正确',
showCancel: false,
success: function(res) {
if (res.confirm) {
//console.log('');
} else if (res.cancel) {
//console.log('');
}
}
});
}
});
},
watch: {
// #ifndef VUE3
value(val, oldVal) {
//console.log('value',val, oldVal)
this.uploadLists = val;
},
// #endif
// #ifdef VUE3
modelValue(val, oldVal) {
//console.log('value',val, oldVal)
this.uploadLists = val;
},
// #endif
},
methods: {
isVideo(item) {
let isPass = false
if ((!/.(gif|jpg|jpeg|png|gif|jpg|png)$/i.test(item) && this.dataType == 0) || (this.dataType == 1 && item
.type == 1)) {
isPass = true
}
return isPass
},
getFileUrl(item) {
var url = item;
if (this.dataType == 1) {
url = item.url
}
//console.log('url', url)
return url
},
previewVideo(src) {
this.previewVideoSrc = src;
// this.previewVideoSrc =
// 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-fbd63a76-dc76-485c-b711-f79f2986daeb/ba804d82-860b-4d1a-a706-5a4c8ce137c3.mp4'
},
previewVideoClose() {
this.previewVideoSrc = ''
//console.log('previewVideoClose', this.previewVideoSrc)
},
imgDel(index) {
uni.showModal({
title: '提示',
content: '您确定要删除么?',
success: (res) => {
if (res.confirm) {
// this.uploadLists.splice(index, 1)
// this.$emit("input", this.uploadLists);
// this.$emit("imgDelete", this.uploadLists);
let delUrl = this.uploadLists[index]
this.uploadLists.splice(index, 1)
// #ifndef VUE3
this.$emit("input", this.uploadLists);
// #endif
// #ifdef VUE3
this.$emit("update:modelValue", this.uploadLists);
// #endif
this.$emit("imgDelete", {
del: delUrl,
tempFilePaths: this.uploadLists
});
} else if (res.cancel) {}
}
});
},
imgPreview(index) {
var imgData = []
this.uploadLists.forEach(item => {
if (!this.isVideo(item)) {
imgData.push(this.getFileUrl(item))
}
})
//console.log('imgPreview', imgData)
uni.previewImage({
urls: imgData,
current: index,
loop: true,
});
},
chooseFile() {
if (this.disabled) {
return false;
}
switch (this.mediaTypeData.indexOf(this.mediaType)) {
case 1: //
this.videoAdd();
break;
case 2: //
uni.showActionSheet({
itemList: ['相册', '视频'],
success: (res) => {
if (res.tapIndex == 1) {
this.videoAdd();
} else if (res.tapIndex == 0) {
this.imgAdd();
}
},
fail: (res) => {
console.log(res.errMsg);
}
});
break;
default: //
this.imgAdd();
break;
}
//if(this.mediaType=='image'){
},
videoAdd() {
//console.log('videoAdd')
let nowNum = Math.abs(this.uploadLists.length - this.max);
let thisNum = (this.chooseNum > nowNum ? nowNum : this.chooseNum) //
uni.chooseVideo({
compressed: this.compress,
sourceType: this.sourceType,
camera: this.camera,
maxDuration: this.maxDuration,
success: (res) => {
// console.log('videoAdd', res)
// console.log(res.tempFilePath)
this.chooseSuccessMethod([res.tempFilePath], 1)
//this.imgUpload([res.tempFilePath]);
//console.log('tempFiles', res)
// if (this.action == '') { //
// this.$emit("chooseSuccess", res.tempFilePaths);
// } else {
// if (this.compress && (res.tempFiles[0].size / 1024 > 1025)) { // 1M
// this.imgCompress(res.tempFilePaths);
// } else {
// this.imgUpload(res.tempFilePaths);
// }
// }
}
});
},
imgAdd() {
//console.log('imgAdd')
let nowNum = Math.abs(this.uploadLists.length - this.max);
let thisNum = (this.chooseNum > nowNum ? nowNum : this.chooseNum) //
//console.log('nowNum', nowNum)
//console.log('thisNum', thisNum)
// #ifdef APP-PLUS
if (this.sourceType.length > 1) {
uni.showActionSheet({
itemList: ['拍摄', '从手机相册选择'],
success: (res) => {
if (res.tapIndex == 1) {
this.appGallery(thisNum);
} else if (res.tapIndex == 0) {
this.appCamera();
}
},
fail: (res) => {
console.log(res.errMsg);
}
});
}
if (this.sourceType.length == 1 && this.sourceType.indexOf('album') > -1) {
this.appGallery(thisNum);
}
if (this.sourceType.length == 1 && this.sourceType.indexOf('camera') > -1) {
this.appCamera();
}
// #endif
//#ifndef APP-PLUS
uni.chooseImage({
count: thisNum,
sizeType: ['original', 'compressed'], //
sourceType: this.sourceType,
success: (res) => {
this.chooseSuccessMethod(res.tempFilePaths, 0)
//console.log('tempFiles', res)
// if (this.action == '') { //
// this.$emit("chooseSuccess", res.tempFilePaths);
// } else {
// if (this.compress && (res.tempFiles[0].size / 1024 > 1025)) { // 1M
// this.imgCompress(res.tempFilePaths);
// } else {
// this.imgUpload(res.tempFilePaths);
// }
// }
}
});
// #endif
},
appCamera() {
var cmr = plus.camera.getCamera();
var res = cmr.supportedImageResolutions[0];
var fmt = cmr.supportedImageFormats[0];
//console.log("Resolution: " + res + ", Format: " + fmt);
cmr.captureImage((path) => {
//alert("Capture image success: " + path);
this.chooseSuccessMethod([path], 0)
},
(error) => {
//alert("Capture image failed: " + error.message);
console.log("Capture image failed: " + error.message)
}, {
resolution: res,
format: fmt
}
);
},
appGallery(maxNum) {
plus.gallery.pick((res) => {
this.chooseSuccessMethod(res.files, 0)
}, function(e) {
//console.log("");
}, {
filter: "image",
multiple: true,
maximum: maxNum
});
},
chooseSuccessMethod(filePaths, type) {
if (this.action == '') { //
this.$emit("chooseSuccess", filePaths, type); //filePaths type 0 1
} else {
if (type == 1) {
this.imgUpload(filePaths, type);
} else {
if (this.compress) { //
this.imgCompress(filePaths, type);
} else {
this.imgUpload(filePaths, type);
}
}
}
},
imgCompress(tempFilePaths, type) { //type 0 1
uni.showLoading({
title: '压缩中...'
});
let compressImgs = [];
let results = [];
tempFilePaths.forEach((item, index) => {
compressImgs.push(new Promise((resolve, reject) => {
// #ifndef H5
uni.compressImage({
src: item,
quality: this.quality,
success: res => {
//console.log('compressImage', res.tempFilePath)
results.push(res.tempFilePath);
resolve(res.tempFilePath);
},
fail: (err) => {
//console.log(err.errMsg);
reject(err);
},
complete: () => {
//uni.hideLoading();
}
})
// #endif
// #ifdef H5
this.canvasDataURL(item, {
quality: this.quality / 100
}, (base64Codes) => {
//this.imgUpload(base64Codes);
results.push(base64Codes);
resolve(base64Codes);
})
// #endif
}))
})
Promise.all(compressImgs) //
.then((results) => {
uni.hideLoading();
//console.log('imgCompress', type)
this.imgUpload(results, type);
})
.catch((res, object) => {
uni.hideLoading();
});
},
imgUpload(tempFilePaths, type) { //type 0 1
// if (this.action == '') {
// uni.showToast({
// title: '',
// icon: 'none',
// duration: 2000
// });
// return false;
// }
if (this.action == 'uniCloud') {
this.uniCloudUpload(tempFilePaths, type)
return
}
uni.showLoading({
title: '上传中'
});
//console.log('imgUpload', tempFilePaths)
let uploadImgs = [];
tempFilePaths.forEach((item, index) => {
uploadImgs.push(new Promise((resolve, reject) => {
//console.log(index, item)
const uploadTask = uni.uploadFile({
url: this.action, //
filePath: item,
name: this.name,
fileType: 'image',
formData: this.formData,
header: this.headers,
success: (uploadFileRes) => {
//uni.hideLoading();
//console.log(typeof this.uploadSuccess)
//console.log('')
uploadFileRes.fileType = type
if (typeof this.uploadSuccess == 'function') {
let thisUploadSuccess = this.uploadSuccess(
uploadFileRes)
if (thisUploadSuccess.success) {
let keyName = '';
// #ifndef VUE3
keyName = 'value'
// #endif
// #ifdef VUE3
keyName = 'modelValue'
// #endif
if (this.dataType == 0) {
this[keyName].push(thisUploadSuccess.url)
} else {
this[keyName].push({
type: type,
url: thisUploadSuccess.url,
...thisUploadSuccess
})
}
//this.$emit("input", this.uploadLists);
// #ifndef VUE3
this.$emit("input", this.uploadLists);
// #endif
// #ifdef VUE3
this.$emit("update:modelValue", this.uploadLists);
// #endif
}
}
resolve(uploadFileRes);
this.$emit("uploadSuccess", uploadFileRes);
},
fail: (err) => {
console.log(err);
//uni.hideLoading();
reject(err);
this.$emit("uploadFail", err);
},
complete: () => {
//uni.hideLoading();
}
});
}))
})
Promise.all(uploadImgs) //
.then((results) => {
uni.hideLoading();
})
.catch((res, object) => {
uni.hideLoading();
this.$emit("uploadFail", res);
});
// uploadTask.onProgressUpdate((res) => {
// //console.log('',)
// uni.showLoading({
// title: '' + res.progress + '%'
// });
// if (res.progress == 100) {
// uni.hideLoading();
// }
// });
},
uniCloudUpload(tempFilePaths, type) {
uni.showLoading({
title: '上传中'
});
console.log('uniCloudUpload', tempFilePaths);
let uploadImgs = [];
tempFilePaths.forEach((item, index) => {
uploadImgs.push(new Promise((resolve, reject) => {
uniCloud.uploadFile({
filePath: item,
cloudPath: this.guid() + '.' + this.getFileType(item, type),
success(uploadFileRes) {
if (uploadFileRes.success) {
resolve(uploadFileRes.fileID);
}
},
fail(err) {
console.log(err);
reject(err);
},
complete() {}
});
}))
})
Promise.all(uploadImgs) //
.then((results) => {
uni.hideLoading();
// console.log('then', results)
uniCloud.getTempFileURL({
fileList: results,
success: (res) => {
//console.log('success',res.fileList)
res.fileList.forEach(item => {
//console.log(item.tempFileURL)
//this.value.push(item.tempFileURL)
// #ifndef VUE3
this.value.push(item.tempFileURL)
this.$emit("input", this.value);
// #endif
// #ifdef VUE3
this.modelValue.push(item.tempFileURL)
this.$emit("update:modelValue", this.modelValue);
// #endif
})
},
fail() {},
complete() {}
});
})
.catch((res, object) => {
uni.hideLoading();
});
},
getFileType(path, type) { //jpg mp4
// #ifdef H5
var result = type == 0 ? 'jpg' : 'mp4';
// #endif
// #ifndef H5
var result = path.split('.').pop().toLowerCase();
// #ifdef MP
if (this.compress) { //
result = type == 0 ? 'jpg' : 'mp4';
}
// #endif
// #endif
return result;
},
guid() {
return 'xxxxxxxx-date-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random() * 16 | 0,
v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
}).replace(/date/g, function(c) {
return Date.parse(new Date());
});
},
canvasDataURL(path, obj, callback) {
var img = new Image();
img.src = path;
img.onload = function() {
var that = this;
//
var w = that.width,
h = that.height,
scale = w / h;
w = obj.width || w;
h = obj.height || (w / scale);
var quality = 0.8; // 0.8
//canvas
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
//
var anw = document.createAttribute("width");
anw.nodeValue = w;
var anh = document.createAttribute("height");
anh.nodeValue = h;
canvas.setAttributeNode(anw);
canvas.setAttributeNode(anh);
ctx.drawImage(that, 0, 0, w, h);
//
if (obj.quality && obj.quality <= 1 && obj.quality > 0) {
quality = obj.quality;
}
// quality
var base64 = canvas.toDataURL('image/jpeg', quality);
// base64
callback(base64);
}
},
}
}
</script>
<style>
.preview-full {
position: fixed;
top: 0;
left: 0;
bottom: 0;
width: 100%;
height: 100%;
z-index: 1002;
}
.preview-full video {
width: 100%;
height: 100%;
z-index: 1002;
}
.preview-full-close {
position: fixed;
right: 32rpx;
top: 25rpx;
width: 80rpx;
height: 80rpx;
line-height: 60rpx;
text-align: center;
z-index: 1003;
/* background-color: #808080; */
color: #fff;
font-size: 65rpx;
font-weight: bold;
text-shadow: 1px 2px 5px rgb(0 0 0);
}
/* .preview-full-close-before,
.preview-full-close-after {
position: absolute;
top: 50%;
left: 50%;
content: '';
height: 60rpx;
margin-top: -30rpx;
width: 6rpx;
margin-left: -3rpx;
background-color: #FFFFFF;
z-index: 20000;
}
.preview-full-close-before {
transform: rotate(45deg);
}
.preview-full-close-after {
transform: rotate(-45deg);
} */
.htz-image-upload-list {
display: flex;
flex-wrap: wrap;
}
.htz-image-upload-Item {
width: 160rpx;
height: 160rpx;
margin: 13rpx;
border-radius: 10rpx;
position: relative;
}
.htz-image-upload-Item image {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
.htz-image-upload-Item-video {
width: 100%;
height: 100%;
border-radius: 10rpx;
position: relative;
}
.htz-image-upload-Item-video-fixed {
position: absolute;
top: 0;
left: 0;
bottom: 0;
width: 100%;
height: 100%;
border-radius: 10rpx;
z-index: 996;
}
.htz-image-upload-Item video {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
.htz-image-upload-Item-add {
font-size: 105rpx;
/* line-height: 160rpx; */
text-align: center;
border: 1px dashed #d9d9d9;
color: #d9d9d9;
}
.htz-image-upload-Item-del {
background-color: #f5222d;
font-size: 24rpx;
position: absolute;
width: 35rpx;
height: 35rpx;
line-height: 35rpx;
text-align: center;
top: 0;
right: 0;
z-index: 997;
color: #fff;
}
.htz-image-upload-Item-del-cover {
background-color: #f5222d;
font-size: 24rpx;
position: absolute;
width: 35rpx;
height: 35rpx;
text-align: center;
top: 0;
right: 0;
color: #fff;
/* #ifdef APP-PLUS */
line-height: 25rpx;
/* #endif */
/* #ifndef APP-PLUS */
line-height: 35rpx;
/* #endif */
z-index: 997;
}
.htz-image-upload-Item-video-app-poster {
width: 100%;
height: 100%;
}
</style>

@ -100,7 +100,7 @@
}
</script>
<style lang="scss" >
$uni-primary: #2979ff !default;
$uni-primary: #14C171 !default;
.uni-section {
background-color: #fff;
@ -116,7 +116,7 @@
&__decoration{
margin-right: 6px;
background-color: $uni-primary;
background-color: #14C171;
&.line {
width: 4px;
height: 12px;

@ -41,7 +41,7 @@
* VerifyPoints
* @description 点选
* */
import {aesEncrypt} from "./../utils/ase.js"
import {aesEncrypt} from "../utils/ase.js"
import {myRequest} from "../utils/request.js"
export default {
name: 'VerifyPoints',

@ -45,7 +45,7 @@
* */
import {
aesEncrypt
} from "./../utils/ase.js"
} from "../utils/ase.js"
import {
myRequest
} from "../utils/request.js"

@ -1,6 +1,7 @@
// 应用全局配置
module.exports = {
// baseUrl: 'http://api-dashboard.yudao.iocoder.cn',
// baseUrl: 'http://127.0.0.1:48080',
baseUrl: 'http://192.168.130.193:48080',
baseApi: '/admin-api',
// 应用信息

@ -1,7 +1,20 @@
{
"dependencies": {
"crypto-js": "^4.2.0",
"jsencrypt": "^3.3.2",
"jsrsasign": "^11.1.0"
}
"id": "sunui-upimg",
"name": "图片上传",
"displayName": "图片上传",
"version": "v2.77",
"description": "图片上传插件",
"keywords": [
"图片上传",
"上传图片",
"h5",
"小程序",
"多图片上传"
],
"dcloudext": {
"category": [
"前端组件",
"通用组件"
]
}
}

@ -13,12 +13,12 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/work/index",
"style": {
"navigationBarTitleText": "工作台"
}
},
// {
// "path": "pages/work/index",
// "style": {
// "navigationBarTitleText": "工作台"
// }
// },
{
"path": "pages/block/index",
"style": {
@ -174,6 +174,24 @@
"navigationBarTitleText": "绘制地块",
"enablePullDownRefresh": false
}
}, {
"path": "addCrops/addCrops",
"style": {
"navigationBarTitleText": "添加农作物",
"enablePullDownRefresh": false
}
}, {
"path": "commonSearch/commonSearch",
"style": {
"navigationBarTitleText": "搜索",
"enablePullDownRefresh": false
}
}, {
"path": "addCropForm/addCropForm",
"style": {
"navigationBarTitleText": "添加种植作物",
"enablePullDownRefresh": false
}
}
]
}],

@ -32,13 +32,14 @@
</template>
<script>
import uniSection from "@/components/uni-section/uni-section"
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import { getBlockPage, deleteBlock } from '@/api/system/block/block';
import DictTag from '@/components/DictTag/index.vue';
export default {
components: {
DictTag
DictTag,uniSection
},
data() {
return {

@ -27,16 +27,20 @@
<!-- 首页 导航 -->
<view class="v-index-nav v-container row m-t-small">
<view class="v-index-nav-item col-8">
<view class="icon">
<navigator url="/sunPages/addCrops/addCrops">
<view class="icon">
<image class="v-index-bg" src="@/static/images/icon_plant.svg"></image>
</view>
<view class="text">开始种植</view>
</navigator>
</view>
<view class="v-index-nav-item col-8">
<navigator url="/sunPages/addCropForm/addCropForm">
<view class="icon">
<image class="v-index-bg" src="@/static/images/icon_agriculture.svg"></image>
</view>
<view class="text">农事操作</view>
</navigator>
</view>
<view class="v-index-nav-item col-8">
<navigator url="/pages/traceability-product/machining/index">
@ -176,7 +180,7 @@
newData.forEach((item) => {
total += Number(item.value);
})
this.ProductCode = newData.map((item) => {
return {
name: item.name,
@ -213,4 +217,4 @@
<style>
page{background-color: #fff;}
</style>
</style>

@ -131,7 +131,7 @@
.login-form-content {
text-align: center;
margin: 20px auto;
margin: 20px auto;
width: 70%;
.input-item {
@ -178,4 +178,4 @@
.login-code-img {
height: 45px;
}
</style>
</style>

@ -130,4 +130,4 @@
</script>
<style>
</style>
</style>

@ -132,4 +132,4 @@
</script>
<style>
</style>
</style>

@ -75,7 +75,7 @@
import * as ProductApi from "@/api/traceability/product"
import * as DeliveryApi from "@/api/traceability/deliveryrecord"
import * as customApi from "@/api/traceability/custom"
import cityPicker from '@/uni_modules/piaoyi-cityPicker/components/piaoyi-cityPicker/piaoyi-cityPicker'
import cityPicker from '@/sunPages/uni_modules/piaoyi-cityPicker/components/piaoyi-cityPicker/piaoyi-cityPicker'
import {
getDictDatas,
DICT_TYPE

@ -142,7 +142,7 @@
this.RecordData = this.listData[index].damagedList
this.$refs.popup.open()
},
//
closePopup() {
this.$refs.popup.close()
@ -194,4 +194,4 @@
</script>
<style>
</style>
</style>

@ -75,20 +75,25 @@
</template>
<script>
import uniSection from "@/components/uni-section/uni-section"
export default {
components: {
uniSection
},
data() {
return {
current: 0,
swiperDotIndex: 0,
data: [{
image: '/static/images/banner/banner01.jpg'
},
{
image: '/static/images/banner/banner02.jpg'
},
{
image: '/static/images/banner/banner03.jpg'
}
data: [
// {
// image: '/static/images/banner/banner01.jpg'
// },
// {
// image: '/static/images/banner/banner02.jpg'
// },
// {
// image: '/static/images/banner/banner03.jpg'
// }
]
}
},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

@ -37,7 +37,7 @@
<use xlink:href="#SVGID_1_" style="overflow:visible;"/>
</clipPath>
<g style="clip-path:url(#SVGID_00000181773893939841324850000014405899197395641239_);">
<linearGradient id="SVGID_00000128456639987428407860000003645621382620013242_" gradientUnits="userSpaceOnUse" x1="375" y1="536" x2="375" y2="-114" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="0" style="stop-color:#D4F9EA"/>
<stop offset="7.000000e-02" style="stop-color:#CFF9E8"/>
@ -45,113 +45,113 @@
<stop offset="1" style="stop-color:#B6FCDF;stop-opacity:0"/>
</linearGradient>
<rect style="fill:url(#SVGID_00000128456639987428407860000003645621382620013242_);" width="750" height="650"/>
<linearGradient id="SVGID_00000141420051871661126010000017657480840683991433_" gradientUnits="userSpaceOnUse" x1="478.22" y1="356.55" x2="478.22" y2="24.94" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="0" style="stop-color:#8FEFC8"/>
<stop offset="1" style="stop-color:#D9FAED;stop-opacity:0"/>
</linearGradient>
<polygon style="fill:url(#SVGID_00000141420051871661126010000017657480840683991433_);" points="436.2,216.7 521,179.4
<polygon style="fill:url(#SVGID_00000141420051871661126010000017657480840683991433_);" points="436.2,216.7 521,179.4
520.2,473.8 435.4,511.1 "/>
<linearGradient id="SVGID_00000145018112856777795830000016363021679549673662_" gradientUnits="userSpaceOnUse" x1="435.94" y1="393.81" x2="435.94" y2="319.28" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="0" style="stop-color:#ACFCDB"/>
<stop offset="1" style="stop-color:#D9FAED"/>
</linearGradient>
<polygon style="fill:url(#SVGID_00000145018112856777795830000016363021679549673662_);" points="350.8,179.5 435.7,142.2
<polygon style="fill:url(#SVGID_00000145018112856777795830000016363021679549673662_);" points="350.8,179.5 435.7,142.2
521,179.4 436.2,216.7 "/>
<linearGradient id="SVGID_00000134231381810237191250000008583313931747195547_" gradientUnits="userSpaceOnUse" x1="393.11" y1="356.54" x2="393.11" y2="24.94" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="0" style="stop-color:#ACFCDB"/>
<stop offset="1" style="stop-color:#D9FAED;stop-opacity:0"/>
</linearGradient>
<polygon style="fill:url(#SVGID_00000134231381810237191250000008583313931747195547_);" points="436.2,216.7 435.4,511.1
<polygon style="fill:url(#SVGID_00000134231381810237191250000008583313931747195547_);" points="436.2,216.7 435.4,511.1
350,473.8 350.8,179.5 "/>
<linearGradient id="SVGID_00000147213619468581382230000013765869613485756829_" gradientUnits="userSpaceOnUse" x1="720.345" y1="292.84" x2="720.345" y2="63.27" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="0" style="stop-color:#8FEFC8"/>
<stop offset="1" style="stop-color:#D9FAED;stop-opacity:0"/>
</linearGradient>
<polygon style="fill:url(#SVGID_00000147213619468581382230000013765869613485756829_);" points="691.3,269 750,243.2
<polygon style="fill:url(#SVGID_00000147213619468581382230000013765869613485756829_);" points="691.3,269 750,243.2
749.4,446.9 690.7,472.7 "/>
<linearGradient id="SVGID_00000124120402934328948450000013460307193979536825_" gradientUnits="userSpaceOnUse" x1="691.08" y1="318.64" x2="691.08" y2="267.04" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="0" style="stop-color:#ACFCDB"/>
<stop offset="1" style="stop-color:#D9FAED"/>
</linearGradient>
<polygon style="fill:url(#SVGID_00000124120402934328948450000013460307193979536825_);" points="632.2,243.2 690.9,217.4
<polygon style="fill:url(#SVGID_00000124120402934328948450000013460307193979536825_);" points="632.2,243.2 690.9,217.4
750,243.2 691.3,269 "/>
<linearGradient id="SVGID_00000009591021207625217800000013914068450437846446_" gradientUnits="userSpaceOnUse" x1="661.425" y1="292.84" x2="661.425" y2="63.27" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="0" style="stop-color:#ACFCDB"/>
<stop offset="1" style="stop-color:#D9FAED;stop-opacity:0"/>
</linearGradient>
<polygon style="fill:url(#SVGID_00000009591021207625217800000013914068450437846446_);" points="691.3,269 690.7,472.7
<polygon style="fill:url(#SVGID_00000009591021207625217800000013914068450437846446_);" points="691.3,269 690.7,472.7
631.6,446.9 632.2,243.2 "/>
<linearGradient id="SVGID_00000010291378336017367330000004009255705342262718_" gradientUnits="userSpaceOnUse" x1="614.375" y1="185.52" x2="614.375" y2="-143.63" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="0" style="stop-color:#8FEFC8"/>
<stop offset="1" style="stop-color:#D9FAED;stop-opacity:0"/>
</linearGradient>
<polygon style="fill:url(#SVGID_00000010291378336017367330000004009255705342262718_);" points="556.2,402.1 673.7,350.5
<polygon style="fill:url(#SVGID_00000010291378336017367330000004009255705342262718_);" points="556.2,402.1 673.7,350.5
672.5,628 555.1,679.6 "/>
<linearGradient id="SVGID_00000004541130688120693880000013428825639474602124_" gradientUnits="userSpaceOnUse" x1="555.84" y1="237.11" x2="555.84" y2="133.93" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="0" style="stop-color:#D9FAED"/>
<stop offset="1" style="stop-color:#FFFFFF"/>
</linearGradient>
<polygon style="fill:url(#SVGID_00000004541130688120693880000013428825639474602124_);" points="438,350.5 555.5,298.9
<polygon style="fill:url(#SVGID_00000004541130688120693880000013428825639474602124_);" points="438,350.5 555.5,298.9
673.7,350.5 556.2,402.1 "/>
<linearGradient id="SVGID_00000098917598748380777910000011595452631511281031_" gradientUnits="userSpaceOnUse" x1="496.53" y1="185.52" x2="496.53" y2="-143.63" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="0" style="stop-color:#ACFCDB"/>
<stop offset="1" style="stop-color:#D9FAED;stop-opacity:0"/>
</linearGradient>
<polygon style="fill:url(#SVGID_00000098917598748380777910000011595452631511281031_);" points="556.2,402.1 555.1,679.6
<polygon style="fill:url(#SVGID_00000098917598748380777910000011595452631511281031_);" points="556.2,402.1 555.1,679.6
436.8,628 438,350.5 "/>
<linearGradient id="SVGID_00000177476839433169233280000004144890155995685532_" gradientUnits="userSpaceOnUse" x1="588.4557" y1="193.3501" x2="602.0443" y2="169.7999" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="0" style="stop-color:#8FEFC8"/>
<stop offset="1" style="stop-color:#D9FAED"/>
</linearGradient>
<polygon style="fill:url(#SVGID_00000177476839433169233280000004144890155995685532_);" points="556.5,361.1 634.8,326.7
<polygon style="fill:url(#SVGID_00000177476839433169233280000004144890155995685532_);" points="556.5,361.1 634.8,326.7
634,347.8 555.7,382.1 "/>
<linearGradient id="SVGID_00000057143173767607422700000011935553032801050252_" gradientUnits="userSpaceOnUse" x1="556.225" y1="243.69" x2="556.225" y2="174.9" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="0" style="stop-color:#D9FAED"/>
<stop offset="1" style="stop-color:#FFFFFF"/>
</linearGradient>
<polygon style="fill:url(#SVGID_00000057143173767607422700000011935553032801050252_);" points="477.7,326.7 556,292.3
<polygon style="fill:url(#SVGID_00000057143173767607422700000011935553032801050252_);" points="477.7,326.7 556,292.3
634.8,326.7 556.5,361.1 "/>
<linearGradient id="SVGID_00000020374119250677271870000008012765586761247156_" gradientUnits="userSpaceOnUse" x1="494.9211" y1="219.2668" x2="538.449" y2="143.8831" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="0" style="stop-color:#ACFCDB"/>
<stop offset="1" style="stop-color:#D9FAED"/>
</linearGradient>
<polygon style="fill:url(#SVGID_00000020374119250677271870000008012765586761247156_);" points="556.5,361.1 555.7,382.1
<polygon style="fill:url(#SVGID_00000020374119250677271870000008012765586761247156_);" points="556.5,361.1 555.7,382.1
476.9,347.8 477.7,326.7 "/>
<linearGradient id="SVGID_00000123399064247777925920000017359039850780144312_" gradientUnits="userSpaceOnUse" x1="568.07" y1="185.43" x2="568.07" y2="207.5" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="0" style="stop-color:#D9FAED"/>
<stop offset="1" style="stop-color:#03FF98"/>
</linearGradient>
<polygon style="fill:url(#SVGID_00000123399064247777925920000017359039850780144312_);" points="543.1,345.8 582.4,328.5
<polygon style="fill:url(#SVGID_00000123399064247777925920000017359039850780144312_);" points="543.1,345.8 582.4,328.5
593.1,333.3 553.7,350.6 "/>
<linearGradient id="SVGID_00000022539003629864025690000017832452525668890007_" gradientUnits="userSpaceOnUse" x1="538.79" y1="193.99" x2="538.79" y2="214.08" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="0" style="stop-color:#D9FAED"/>
<stop offset="1" style="stop-color:#03FF98"/>
</linearGradient>
<polygon style="fill:url(#SVGID_00000022539003629864025690000017832452525668890007_);" points="516.1,337.2 550.8,321.9
<polygon style="fill:url(#SVGID_00000022539003629864025690000017832452525668890007_);" points="516.1,337.2 550.8,321.9
561.5,326.7 526.8,342 "/>
<linearGradient id="SVGID_00000102529314548172298620000005107466312962098071_" gradientUnits="userSpaceOnUse" x1="513.46" y1="201.88" x2="513.46" y2="218.68" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="0" style="stop-color:#D9FAED"/>
<stop offset="1" style="stop-color:#03FF98"/>
</linearGradient>
<polygon style="fill:url(#SVGID_00000102529314548172298620000005107466312962098071_);" points="494.4,329.3 521.9,317.3
<polygon style="fill:url(#SVGID_00000102529314548172298620000005107466312962098071_);" points="494.4,329.3 521.9,317.3
532.5,322.1 505,334.1 "/>
<g class="st17">
<image style="overflow:visible;opacity:0.35;enable-background:new ;" width="88" height="70" xlink:href="65E2613A.png" transform="matrix(1 0 0 1 534.31 272.47)">
</image>
<path class="st18" d="M550,305.6l56.6,21c0,0,1.4-4.7-4-9.2c-3.9-3.3-5.3-2.6-7.2-5.9s-2-7.9-5.3-7.9s-7.6,6.2-10.2,5.6
@ -159,29 +159,29 @@
</g>
<path class="st19" d="M537.5,310.2l56.6,21c0,0,1.4-4.7-4-9.2c-3.9-3.3-5.3-2.6-7.2-5.9s-2-7.9-5.3-7.9s-7.6,6.2-10.2,5.6
s-4.6-7.9-6.6-8.5s-4.1,3.6-5.9,2.6c-4-2-2.6-15.1-10.5-15.8C538.5,291.6,537.5,310.2,537.5,310.2z"/>
<image style="overflow:visible;opacity:0.75;enable-background:new ;" width="727" height="728" xlink:href="65E26139.png" transform="matrix(1 0 0 1 -243.69 -285.53)">
</image>
<linearGradient id="SVGID_00000057116982736602932220000000909790111981264790_" gradientUnits="userSpaceOnUse" x1="294.0816" y1="155.6209" x2="-54.3416" y2="759.1191" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="5.000000e-02" style="stop-color:#FFFFFF"/>
<stop offset="0.43" style="stop-color:#FFFFFF;stop-opacity:0.3"/>
<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0.22"/>
</linearGradient>
<circle style="opacity:0.2;fill:url(#SVGID_00000057116982736602932220000000909790111981264790_);enable-background:new ;" cx="119.9" cy="78.6" r="348.4"/>
<image style="overflow:visible;opacity:0.75;enable-background:new ;" width="529" height="530" xlink:href="65E26136.png" transform="matrix(1 0 0 1 -144.69 -186.53)">
</image>
<linearGradient id="SVGID_00000067925312875833977260000009958956600939297679_" gradientUnits="userSpaceOnUse" x1="244.5136" y1="241.4874" x2="-4.7736" y2="673.2526" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="5.000000e-02" style="stop-color:#FFFFFF"/>
<stop offset="0.43" style="stop-color:#FFFFFF;stop-opacity:0.27"/>
<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0.22"/>
</linearGradient>
<circle style="opacity:0.2;fill:url(#SVGID_00000067925312875833977260000009958956600939297679_);enable-background:new ;" cx="119.9" cy="78.6" r="249.2"/>
<linearGradient id="SVGID_00000076563400190211320510000016920521453607730849_" gradientUnits="userSpaceOnUse" x1="245.5306" y1="239.739" x2="-5.7688" y2="674.9907" gradientTransform="matrix(1 0 0 -1 0 536)">
<stop offset="0" style="stop-color:#FFFFFF;stop-opacity:0.5"/>
<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 73 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 35 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 49 KiB

@ -1,16 +1 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 26.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 200 50" style="enable-background:new 0 0 200 50;" xml:space="preserve">
<style type="text/css">
.st0{fill:#14C171;}
</style>
<g>
<path class="st0" d="M55.6,35.9h128c2.2,0,3.9,1.8,3.9,3.9l0,0c0,2.2-1.8,3.9-3.9,3.9h-128c-2.2,0-3.9-1.8-3.9-3.9l0,0
C51.7,37.6,53.4,35.9,55.6,35.9z"/>
<path class="st0" d="M16.4,35.9h23.5c2.2,0,3.9,1.8,3.9,3.9l0,0c0,2.2-1.8,3.9-3.9,3.9H16.4c-2.2,0-3.9-1.8-3.9-3.9l0,0
C12.5,37.6,14.3,35.9,16.4,35.9z"/>
<path class="st0" d="M156.8,7.4L186.3,37c1.5,1.5,1.5,4,0,5.5l0,0c-1.5,1.5-4,1.5-5.5,0L151.3,13c-1.5-1.5-1.5-4,0-5.5l0,0
C152.8,5.9,155.3,5.9,156.8,7.4z"/>
</g>
</svg>
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 200 50" style="enable-background:new 0 0 200 50" xml:space="preserve"><style>.st0{fill:#14c171}</style><path class="st0" d="M55.6 35.9h128c2.2 0 3.9 1.8 3.9 3.9 0 2.2-1.8 3.9-3.9 3.9h-128c-2.2 0-3.9-1.8-3.9-3.9 0-2.2 1.7-3.9 3.9-3.9zM16.4 35.9h23.5c2.2 0 3.9 1.8 3.9 3.9 0 2.2-1.8 3.9-3.9 3.9H16.4c-2.2 0-3.9-1.8-3.9-3.9 0-2.2 1.8-3.9 3.9-3.9z"/><path class="st0" d="M156.8 7.4 186.3 37c1.5 1.5 1.5 4 0 5.5s-4 1.5-5.5 0L151.3 13c-1.5-1.5-1.5-4 0-5.5 1.5-1.6 4-1.6 5.5-.1z"/></svg>

Before

Width:  |  Height:  |  Size: 885 B

After

Width:  |  Height:  |  Size: 574 B

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

@ -1 +1 @@
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 180 115"><defs><style>.cls-1{fill:#58d100;}.cls-2{fill:#ff505d;}.cls-3{fill:#60b71c;}.cls-4{fill:url(#未命名的渐变_240);}.cls-5{fill:#ffab00;}.cls-6{fill:url(#未命名的渐变_82);}.cls-7{fill:#fff;}</style><linearGradient id="未命名的渐变_240" x1="56.33" y1="-22.29" x2="136.34" y2="116.29" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f9e6d2"/><stop offset="1" stop-color="#f9e6d2" stop-opacity="0.05"/></linearGradient><linearGradient id="未命名的渐变_82" x1="90" y1="41.59" x2="90" y2="91.43" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f9df46"/><stop offset="1" stop-color="#ff8000"/></linearGradient></defs><title>移动端图标</title><path class="cls-1" d="M80.33,24.9S78.45,14,92.67,14.66c0,0-.48,11.56-12.34,10.24Zm0,0"/><path class="cls-2" d="M125.53,39.45c.16-.57.28-1.14.39-1.71a8.94,8.94,0,0,0-4.32-8.62,9.38,9.38,0,0,0-10.17.18,9.37,9.37,0,0,0-8.32-5.91,9,9,0,0,0-8.42,4.71c-.24.53-.45,1.07-.65,1.63a22.07,22.07,0,0,0-1.23,6.79A22.91,22.91,0,0,0,96.39,49.4h0a5.88,5.88,0,0,0,4.75,2.77,5.65,5.65,0,0,0,3.52-1A5.67,5.67,0,0,0,107.05,54a5.91,5.91,0,0,0,5.48.38h0a22.84,22.84,0,0,0,10.2-8.64,22.14,22.14,0,0,0,2.79-6.31Zm0,0"/><path class="cls-3" d="M112,26a8.52,8.52,0,0,0-.32,1.5,9.2,9.2,0,0,0,1.42.58,8.56,8.56,0,0,0,11-7.15A8.53,8.53,0,0,0,112,26Zm0,0"/><path class="cls-3" d="M112,26a6.61,6.61,0,0,1-.38.92,5.54,5.54,0,0,1-4.26-8A5.52,5.52,0,0,1,112,26Zm0,0"/><path class="cls-4" d="M178.2,9.47a6.18,6.18,0,0,0-4.35-1.8H6a6.06,6.06,0,0,0-6,6.06v12a4.39,4.39,0,0,0,4.39,4.39H4.8a7.11,7.11,0,0,1,6.63,6.06l7.69,52.36A32,32,0,0,0,26,104.07a8.92,8.92,0,0,0,6.89,3.26H151.1a3.1,3.1,0,0,0,2.16-1,32.16,32.16,0,0,0,9-17.8L170.6,33.9a4.64,4.64,0,0,1,3.61-3.83h.95A4.81,4.81,0,0,0,180,25.23V13.82A6.18,6.18,0,0,0,178.2,9.47Z"/><circle class="cls-5" cx="77.14" cy="41.31" r="18.01"/><path class="cls-6" d="M134.1,42.5a3.08,3.08,0,0,0-2.18-.91H48a3,3,0,0,0-3,3v6a2.2,2.2,0,0,0,2.2,2.2h.2a3.53,3.53,0,0,1,3.31,3L54.56,82A16,16,0,0,0,58,89.79a4.44,4.44,0,0,0,3.44,1.64h59.11a1.61,1.61,0,0,0,1.08-.48,16.06,16.06,0,0,0,4.49-8.9l4.18-27.34a2.31,2.31,0,0,1,1.8-1.91h.48a2.43,2.43,0,0,0,1.71-.71,2.39,2.39,0,0,0,.71-1.71V44.67A3,3,0,0,0,134.1,42.5Z"/><path class="cls-7" d="M81.57,70.26a2.65,2.65,0,0,1-2.66,2.65H75.78a2.65,2.65,0,0,1-2.66-2.65V53.45a2.63,2.63,0,0,1,.78-1.87,2.67,2.67,0,0,1,1.88-.78h3.15a2.66,2.66,0,0,1,2.66,2.65Z"/><path class="cls-7" d="M97.46,70.26a2.65,2.65,0,0,1-2.66,2.65H91.66A2.65,2.65,0,0,1,89,70.26V53.45a2.66,2.66,0,0,1,2.66-2.65H94.8a2.66,2.66,0,0,1,2.66,2.65Z"/><path class="cls-7" d="M112.32,70.26a2.67,2.67,0,0,1-2.67,2.65h-3.14a2.65,2.65,0,0,1-2.66-2.65V53.45a2.66,2.66,0,0,1,2.66-2.65h3.14a2.67,2.67,0,0,1,2.67,2.65Z"/></svg>
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 180 115"><defs><linearGradient id="未命名的渐变_240" x1="56.33" y1="-22.29" x2="136.34" y2="116.29" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f9e6d2"/><stop offset="1" stop-color="#f9e6d2" stop-opacity=".05"/></linearGradient><linearGradient id="未命名的渐变_82" x1="90" y1="41.59" x2="90" y2="91.43" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f9df46"/><stop offset="1" stop-color="#ff8000"/></linearGradient><style>.cls-3{fill:#60b71c}.cls-7{fill:#fff}</style></defs><path d="M80.33 24.9S78.45 14 92.67 14.66c0 0-.48 11.56-12.34 10.24Zm0 0" style="fill:#58d100"/><path d="M125.53 39.45c.16-.57.28-1.14.39-1.71a8.94 8.94 0 0 0-4.32-8.62 9.38 9.38 0 0 0-10.17.18 9.37 9.37 0 0 0-8.32-5.91 9 9 0 0 0-8.42 4.71c-.24.53-.45 1.07-.65 1.63a22.07 22.07 0 0 0-1.23 6.79 22.91 22.91 0 0 0 3.58 12.88 5.88 5.88 0 0 0 4.75 2.77 5.65 5.65 0 0 0 3.52-1 5.67 5.67 0 0 0 2.39 2.83 5.91 5.91 0 0 0 5.48.38 22.84 22.84 0 0 0 10.2-8.64 22.14 22.14 0 0 0 2.79-6.31Zm0 0" style="fill:#ff505d"/><path class="cls-3" d="M112 26a8.52 8.52 0 0 0-.32 1.5 9.2 9.2 0 0 0 1.42.58 8.56 8.56 0 0 0 11-7.15A8.53 8.53 0 0 0 112 26Zm0 0"/><path class="cls-3" d="M112 26a6.61 6.61 0 0 1-.38.92 5.54 5.54 0 0 1-4.26-8A5.52 5.52 0 0 1 112 26Zm0 0"/><path d="M178.2 9.47a6.18 6.18 0 0 0-4.35-1.8H6a6.06 6.06 0 0 0-6 6.06v12a4.39 4.39 0 0 0 4.39 4.39h.41a7.11 7.11 0 0 1 6.63 6.06l7.69 52.36A32 32 0 0 0 26 104.07a8.92 8.92 0 0 0 6.89 3.26H151.1a3.1 3.1 0 0 0 2.16-1 32.16 32.16 0 0 0 9-17.8l8.34-54.63a4.64 4.64 0 0 1 3.61-3.83h.95a4.81 4.81 0 0 0 4.84-4.84V13.82a6.18 6.18 0 0 0-1.8-4.35Z" style="fill:url(#未命名的渐变_240)"/><circle cx="77.14" cy="41.31" r="18.01" style="fill:#ffab00"/><path d="M134.1 42.5a3.08 3.08 0 0 0-2.18-.91H48a3 3 0 0 0-3 3v6a2.2 2.2 0 0 0 2.2 2.2h.2a3.53 3.53 0 0 1 3.31 3L54.56 82A16 16 0 0 0 58 89.79a4.44 4.44 0 0 0 3.44 1.64h59.11a1.61 1.61 0 0 0 1.08-.48 16.06 16.06 0 0 0 4.49-8.9l4.18-27.34a2.31 2.31 0 0 1 1.8-1.91h.48a2.43 2.43 0 0 0 1.71-.71 2.39 2.39 0 0 0 .71-1.71v-5.71a3 3 0 0 0-.9-2.17Z" style="fill:url(#未命名的渐变_82)"/><path class="cls-7" d="M81.57 70.26a2.65 2.65 0 0 1-2.66 2.65h-3.13a2.65 2.65 0 0 1-2.66-2.65V53.45a2.63 2.63 0 0 1 .78-1.87 2.67 2.67 0 0 1 1.88-.78h3.15a2.66 2.66 0 0 1 2.66 2.65ZM97.46 70.26a2.65 2.65 0 0 1-2.66 2.65h-3.14A2.65 2.65 0 0 1 89 70.26V53.45a2.66 2.66 0 0 1 2.66-2.65h3.14a2.66 2.66 0 0 1 2.66 2.65ZM112.32 70.26a2.67 2.67 0 0 1-2.67 2.65h-3.14a2.65 2.65 0 0 1-2.66-2.65V53.45a2.66 2.66 0 0 1 2.66-2.65h3.14a2.67 2.67 0 0 1 2.67 2.65Z"/></svg>

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

@ -1 +1 @@
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><defs><style>.cls-1{fill:#14c171;}.cls-2{fill:#fff;}</style></defs><title>移动端图标</title><path class="cls-1" d="M0,0H20A20,20,0,0,1,40,20V40a0,0,0,0,1,0,0H32A32,32,0,0,1,0,8V0A0,0,0,0,1,0,0Z"/><path class="cls-2" d="M30.76,11.1l-13,13.26-6.64-5.68a1.32,1.32,0,0,0-1.85.15,1.3,1.3,0,0,0,.15,1.84l7.26,6.21a1.75,1.75,0,0,0,2.38-.11L32.63,12.93a1.31,1.31,0,0,0-.3-2.06h0A1.32,1.32,0,0,0,30.76,11.1Z"/></svg>
<svg data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><path d="M0 0h20a20 20 0 0 1 20 20v20h-8A32 32 0 0 1 0 8V0Z" style="fill:#14c171"/><path d="m30.76 11.1-13 13.26-6.64-5.68a1.32 1.32 0 0 0-1.85.15 1.3 1.3 0 0 0 .15 1.84l7.26 6.21a1.75 1.75 0 0 0 2.38-.11l13.57-13.84a1.31 1.31 0 0 0-.3-2.06 1.32 1.32 0 0 0-1.57.23Z" style="fill:#fff"/></svg>

Before

Width:  |  Height:  |  Size: 507 B

After

Width:  |  Height:  |  Size: 374 B

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 722 KiB

After

Width:  |  Height:  |  Size: 714 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 765 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

@ -8,6 +8,14 @@ import dict from './modules/dict'
Vue.use(Vuex)
const store = new Vuex.Store({
state: {
baseId: null
},
mutations: {
getBaseId(state, value) {
state.baseId = value
}
},
modules: {
user,
dict
@ -16,4 +24,4 @@ const store = new Vuex.Store({
getters
})
export default store
export default store

@ -0,0 +1,305 @@
<template>
<view class="v-pages">
<view class="v-form v-container">
<uni-forms :modelValue="formData" ref="formRef" :label-width="80" border :rules="formRules">
<view class="v-form-item">
<uni-forms-item label="认证类型" name="authenticationType" required>
<uni-data-picker class="m-data-pick" popupTitle=" " v-model="formData.authenticationType" :localdata="authenticationList" @change="getCustomChange"></uni-data-picker>
</uni-forms-item>
<uni-forms-item label="认证图片" name="authenticationPic">
<htz-image-upload
class="m-img-upload"
:max="1"
v-model="imgList"
mediaType="image"
:chooseNum="1"
:sourceType="['album', 'camera']"
:compress="false"
:quality="80"
:remove="true"
:headers="headers"
@uploadSuccess="ceshiUploadSuccess1"
@imgDelete="ceshiImgDelete"
@uploadFail="ceshiUploadFail"
:action="baseUrls"
></htz-image-upload>
<uni-easyinput class="not-show" v-model="formData.authenticationPic" placeholder=" " />
</uni-forms-item>
</view>
<view class="v-form-item">
<uni-forms-item label="种植方式" name="plantingWay" required>
<uni-data-picker class="m-data-pick" popupTitle=" " v-model="formData.plantingWay" :localdata="plantingWayList" @change="getCustomChange"></uni-data-picker>
</uni-forms-item>
<uni-forms-item label="作业方式" name="jobWay" required>
<uni-data-picker class="m-data-pick" popupTitle=" " v-model="formData.jobWay" :localdata="operationWayList" @change="getCustomChange"></uni-data-picker>
</uni-forms-item>
<uni-forms-item label="种植时间" name="plantingTime" required>
<uni-datetime-picker :clear-icon="false" type="date" returnType="timestamp" v-model="formData.plantingTime" @change="changeLog($event)" />
</uni-forms-item>
<uni-forms-item label="种植面积" name="plantingArea" required>
<uni-easyinput :disabled="formData.blockName == undefined" class="uni-mt-5" v-model="formData.plantingArea" @blur="checkArea">
<template slot="right" class="m-kg"></template>
</uni-easyinput>
<spna v-if="formData.blockName != undefined" class="m-notice">
可种植面积
<span class="color-red">{{ formData.blockArea }}</span>
</spna>
</uni-forms-item>
</view>
<view class="v-form-item">
<uni-forms-item label="种植地块" name="blockName" required>
<uni-easyinput class="uni-mt-5 m-padding-rigt" suffixIcon="right" v-model="formData.blockName" placeholder="请选择地块" @focus="goSearch"></uni-easyinput>
<uni-easyinput class="uni-mt-5 not-show" v-model="formData.blockId"></uni-easyinput>
</uni-forms-item>
</view>
<view class="v-form-item">
<uni-forms-item label="预计采收时间" name="harvestTime">
<uni-datetime-picker :clear-icon="false" type="date" returnType="timestamp" v-model="formData.harvestTime" @change="changeLog($event)" />
</uni-forms-item>
<uni-forms-item label="预计亩产" name="production">
<uni-easyinput v-model="formData.production" placeholder="请输入预计亩产量">
<template slot="right" class="m-kg">公斤</template>
</uni-easyinput>
</uni-forms-item>
</view>
</uni-forms>
<view class="fixed fixedBottom">
<button class="m-t-large v-primary-btn large" @click="submitForm()">保存</button>
</view>
</view>
</view>
</template>
<script>
import mix from '@/utils/mix.js';
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import { getAccessToken } from '@/utils/auth';
import config from '@/config';
import htzImageUpload from '@/components/htz-image-upload/htz-image-upload.vue';
import { createCropper } from '@/api/system/addCrop/addCrop.js';
export default {
components: {
htzImageUpload
},
data() {
return {
authenticationList: [], //
plantingWayList: [], //
operationWayList: [], //
showBlock: false,
formData: {
id: undefined,
blockId: undefined,
productId: undefined,
speciesId: undefined,
authenticationType: undefined,
authenticationPic: undefined,
plantingWay: undefined,
jobWay: undefined,
plantingTime: undefined,
plantingArea: undefined,
harvestTime: undefined,
production: undefined,
blockArea: undefined,
blockName: undefined
},
//
formRules: {},
baseUrls: config.baseUrl + config.baseApi + '/infra/file/upload',
headers: { Authorization: 'Bearer ' + getAccessToken() }, //
imgList: []
};
},
mixins: [mix],
onLoad(options) {
if (options.params) {
this.formData = JSON.parse(options.params);
if(this.formData.authenticationPic!=undefined){
this.imgList.push(this.formData.authenticationPic)
}
}
},
onReady() {
//
this.$refs.formRef.setRules(this.formRules);
setTimeout(() => {
this.formData.plantingTime = new Date().valueOf();
}, 500);
},
onShow() {
//
let arr = this.getDictDatas(DICT_TYPE.AUTHENTICATION_TYPE);
arr.forEach((item) => {
item.text = item.label;
});
this.authenticationList = arr;
// PLANTING_WAY
let arr1 = this.getDictDatas(DICT_TYPE.PLANTING_WAY);
arr1.forEach((item) => {
item.text = item.label;
});
this.plantingWayList = arr1;
// OPERATION_WAY
let arr2 = this.getDictDatas(DICT_TYPE.OPERATION_WAY);
arr2.forEach((item) => {
item.text = item.label;
});
this.operationWayList = arr2;
},
methods: {
getCustomChange() {
console.log(this.formData);
},
ceshiUploadSuccess1(res) {
//
var _res = JSON.parse(res.data);
console.log('_res', _res);
if (_res.code == 0) {
this.imgList.push(_res.data);
this.formData.authenticationPic = _res.data;
}
},
ceshiImgDelete(e) {
console.log('ceshiImgDelete', e);
},
ceshiUploadFail(err) {
//
console.log('err', err);
},
changeLog(e) {
console.log('change事件:', e, this.formData);
},
checkArea() {
if (this.formData.plantingArea > this.formData.blockArea) {
uni.showToast({
icon: 'none',
title: '警告:种植面积不可大于地块面积'
});
this.showBlock = false;
} else {
this.showBlock = true;
}
},
goSearch() {
const val = JSON.stringify(this.formData);
uni.navigateTo({
url: '/sunPages/commonSearch/commonSearch?isBlock=1&params='+val
});
},
reset() {
this.showBlock=false;
this.formData= {
id: undefined,
blockId: undefined,
productId: undefined,
speciesId: undefined,
authenticationType: undefined,
authenticationPic: undefined,
plantingWay: undefined,
jobWay: undefined,
plantingTime: undefined,
plantingArea: undefined,
harvestTime: undefined,
production: undefined,
blockArea: undefined,
blockName: undefined
};
},
submitForm(){
console.log(this.formData)
//
if(this.showBlock == false){
uni.showToast({
icon: 'none',
title: '警告:种植面积不可大于地块面积'
});
return false
}
this.$refs['formRef'].validate().then((res) => {
console.log('success', res);
createProduct(res)
.then((res) => {
uni.showToast({
title: `新增成功`,
duration: 1500,
success() {
setTimeout(() => {
this_.reset();
uni.switchTab({
url: '/pages/index'
});
}, 1500);
}
});
})
.catch((err) => {
console.log(err);
});
})
.catch((err) => {
console.log('err', err);
});
// try {
// const data = this.formData
// await ProductApi.createProduct(data)
// uni.showToast({
// title: ``,
// icon: 'success',
// duration: 2000,
// complete: function() {
// setTimeout(function() {
// uni.redirectTo({
// url: '/pages/index'
// });
// }, 2000);
// }
// })
// } finally {}
}
}
};
</script>
<style scoped lang="scss">
.not-show {
display: none;
}
.m-kg {
background: #eee;
padding: 0 11rpx;
border-radius: 15rpx;
margin-left: 10rpx;
color: #929292;
font-size: 20rpx;
height: 55rpx;
line-height: 55rpx;
}
/deep/ .m-padding-rigt .uni-easyinput__content-input {
padding-right: 25rpx;
}
/deep/ .m-data-pick .selected-area {
padding-right: 35rpx;
}
// /deep/ .m-img-upload .htz-image-upload-list {
// flex-direction: row-reverse;
// .htz-image-upload-Item-add {
// line-height: 130rpx;
// }
// }
.m-notice {
background: #ddfff3;
padding: 6rpx 10rpx;
border-radius: 10rpx;
font-size: 24rpx;
color: #4a4a4a;
.color-red {
color: #fc0022;
}
}
</style>

@ -0,0 +1,166 @@
<template>
<view class="page-box">
<view class="m-bg">
<view class="m-bg-left">添加农作物</view>
</view>
<view class="m-form">
<uni-section title="作物" type="line" padding>
<uni-easyinput class="uni-mt-5" suffixIcon="right" v-model="reviceData.productName" placeholder="请选择作物" @focus="goSearch"></uni-easyinput>
</uni-section>
<uni-section title="品种" type="line" padding>
<uni-easyinput class="uni-mt-5" suffixIcon="right" v-model="reviceData.speciesName" placeholder="请选择品种" @focus="openPopupSelect"></uni-easyinput>
</uni-section>
<hy-popup-select v-model="reviceData.speciesId" :list="SpeciesList" :filterKeys="['speciesName','name']" ref="popupRef"
@save="done">
<template slot-scope="{item,index}">
<view style="margin-top: 12rpx;">
{{item.speciesName}}
</view>
</template>
</hy-popup-select>
<button class="m-next-step" @click="nextStep">下一步</button>
</view>
</view>
</template>
<script>
import hyPopupSelect from "@/sunPages/uni_modules/hy-popup-select/components/hy-popup-select/hy-popup-select"
import uniSection from "@/components/uni-section/uni-section"
import { getSpeciesList } from '@/api/system/addCrop/addCrop.js';
export default {
components: {
uniSection,
hyPopupSelect
},
data() {
return {
reviceData: null,
value: null,
SpeciesList:null,
};
},
onLoad(options) {
if (options.params) {
this.reviceData = JSON.parse(decodeURIComponent(options.params));
console.log(this.reviceData);
} else {
this.reviceData = null;
}
},
watch: {
reviceData: {
handler(val) {
if (val != null) {
if(val.productId){
this.getSpeciesList(val.productId)
}
}
}
}
},
methods: {
goSearch() {
if (this.reviceData != null) {
const obj = {
blockID: this.reviceData.id,
blockName:this.reviceData.blockName,
baseId: this.reviceData.baseId,
blockArea:this.reviceData.blockArea
};
const val = JSON.stringify(obj);
console.log(val);
uni.redirectTo({
url: '/sunPages/commonSearch/commonSearch?isBlock=2&params=' + val
});
} else {
uni.redirectTo({
url: '/sunPages/commonSearch/commonSearch?isBlock=2'
});
}
},
//
getSpeciesList(val) {
let params = { productId: val };
getSpeciesList(params)
.then((res) => {
console.log(res)
this.SpeciesList = res.data;
})
.catch((err) => {
console.log(err);
});
},
//
openPopupSelect() {
this.$refs.popupRef.open()
},
//
done(ids, arr) {
this.reviceData.speciesId = arr[0].id
this.reviceData.speciesName = arr[0].speciesName
},
nextStep() {
if(!this.reviceData.productId){
uni.showToast({
icon:'error',
title:'请选择作物'
})
return false
}
if(!this.reviceData.speciesId){
uni.showToast({
icon:'error',
title:'请选品种'
})
return false
}
console.log(this.reviceData)
const val = JSON.stringify(this.reviceData)
uni.navigateTo({
url:'/sunPages/addCropForm/addCropForm?params='+val
})
}
}
};
</script>
<style scoped lang="scss">
.page-box {
height: 100vh;
background-color: #fff;
}
.m-bg {
width: 100%;
height: 373rpx;
padding: 40rpx 20rpx 40rpx 100rpx;
display: flex;
align-items: center;
background-image: url(../../static/images/searchBg/search-bg.png);
background-repeat: no-repeat;
background-position: 100% -70rpx;
background-size: 72%;
background-color: #fff;
.m-bg-left {
width: 178rpx;
height: 34rpx;
font-family: Source Han Sans SC;
font-weight: 500;
font-size: 36rpx;
color: #1b1b1b;
}
}
.m-form {
padding: 0 30rpx;
background: #fff;
}
.m-next-step {
margin-top: 20rpx;
width: 650rpx;
height: 80rpx;
background: linear-gradient(180deg, #14c171, #60f0ad);
border-radius: 50rpx;
color: #fff;
line-height: 80rpx;
}
</style>

@ -13,8 +13,8 @@
<!-- 注意此处的z-tabs为独立的组件可替换为第三方的tabs若需要使用z-tabs请在插件市场搜索z-tabs并引入否则会报插件找不到的错误 -->
<template #top>
<z-tabs :list="tabList" @change="tabChange" />
<template class="m-data-pick"v-if="tabIndex == 2">
<uni-datetime-picker @change='searchData' v-model="datetimerange" type="datetimerange" rangeSeparator="至" />
<template class="m-data-pick" v-if="tabIndex == 2">
<uni-datetime-picker @change="searchData" v-model="datetimerange" type="datetimerange" rangeSeparator="至" />
</template>
</template>
<!-- 如果希望其他view跟着页面滚动可以放在z-paging标签内 -->
@ -40,7 +40,7 @@
</view>
<view class="m-item-bottom">
<view class="m-note">农事记录</view>
<view class="m-end-pro">种植结束</view>
<view class="m-end-pro" @click.stop="stopCropper(item)">种植结束</view>
</view>
</view>
</template>
@ -60,7 +60,14 @@
</view>
</view>
<view class="m-item-bottom noflex">
<uni-steps :active-color="'#3f3f3f'" :options="[{title:'种植时间',desc:parseTime(item.plantTime,'{y}-{m}-{d}')},{title:'结束时间',desc:parseTime(item.endTime,'{y}-{m}-{d}')}]" :active="3"></uni-steps>
<uni-steps
:active-color="'#3f3f3f'"
:options="[
{ title: '种植时间', desc: parseTime(item.plantTime, '{y}-{m}-{d}') },
{ title: '结束时间', desc: parseTime(item.endTime, '{y}-{m}-{d}') }
]"
:active="3"
></uni-steps>
</view>
</view>
</template>
@ -77,19 +84,19 @@
标准
<dict-tag class="m-dic-tag" :type="'authentication_type'" :value="item.authenticationType" />
</view>
<view class="m-pro-Time">
采收时间{{ parseTime(item.jobTime, '{y}-{m}-{d}') }}
</view>
<view class="m-pro-Time">采收时间{{ parseTime(item.jobTime, '{y}-{m}-{d}') }}</view>
</view>
<view class="m-big-num">
{{item.production}}<br>公斤
{{ item.production }}
<br />
公斤
</view>
</view>
</view>
</template>
</view>
</z-paging>
<tempalte class="m-add-pro" v-if="tabIndex == 0 && dataList.length == 0">+新增种养品种</tempalte>
<view class="m-add-pro" @click="addCopper" v-if="tabIndex == 0 && dataList.length == 0">+新增种养品种</view>
</view>
</view>
</template>
@ -97,7 +104,7 @@
<script>
import DictTag from '@/components/DictTag/index.vue';
import { parseTime } from '@/utils/ruoyi';
import { getCropperPage,getGrowRecordPage,getRecoveryRecordPage } from '@/api/system/block/block.js';
import { getCropperPage, getGrowRecordPage, getRecoveryRecordPage, stopCropper } from '@/api/system/block/block.js';
export default {
components: {
DictTag
@ -113,7 +120,7 @@ export default {
top: '500rpx',
'z-index': 9
},
datetimerange:[],
datetimerange: [],
dataList: [],
tabList: ['种植产品', '种植历史', '采收记录'],
@ -239,7 +246,7 @@ export default {
pageSize: pageSize,
baseId: null,
blockId: this.blockData.id,
jobTime:this.datetimerange
jobTime: this.datetimerange
};
getRecoveryRecordPage(params)
.then((res) => {
@ -257,11 +264,45 @@ export default {
}
},
itemClick(item, index) {
console.log('点击了', item.title);
console.log('点击了', item, index);
},
searchData(val){
console.log(val,this.datetimerange)
searchData(val) {
console.log(val, this.datetimerange);
this.$refs.paging.reload();
},
stopCropper(row) {
let that = this
const id = row.id;
uni.showModal({
title: '提示',
content: '确定将编号为' + id + '作物结束种植吗',
showCancel: true,
confirmText: '结束',
success(res) {
if (res.confirm) {
row.plantEnd = 2
stopCropper(row).then(res=>{
uni.showToast({
icon:'none',
title:'已结束',
})
setTimeout(()=>{
that.$refs.paging.reload();
},1500)
}).catch(err=>{
console.log(err)
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
addCopper(){
const params = encodeURIComponent(JSON.stringify(this.blockData))
uni.navigateTo({
url:'/sunPages/addCrops/addCrops?params='+params
})
}
}
};
@ -279,6 +320,7 @@ export default {
border: none;
border-radius: 10rpx;
color: #eee;
z-index: 99999;
}
.m-mapbox {
width: 100%;
@ -346,7 +388,7 @@ export default {
font-size: 28rpx;
}
}
.m-big-num{
.m-big-num {
width: 20%;
font-size: 35rpx;
font-weight: bold;
@ -356,21 +398,21 @@ export default {
text-align: center;
}
}
.m-item-bottom{
margin-top: 20rpx;
display: flex;
justify-content: flex-end;
margin-right: 20rpx;
align-items: center;
.m-note{
margin-right: 20rpx;
}
.m-item-bottom {
margin-top: 20rpx;
display: flex;
justify-content: flex-end;
margin-right: 20rpx;
align-items: center;
.m-note {
margin-right: 20rpx;
}
}
.noflex{
.noflex {
display: block;
}
.no-border{
.no-border {
border: none;
}
}

@ -0,0 +1,290 @@
<template>
<view class="search-box">
<d-search-log
:color_border="color_border"
:color_text="color_border"
:store_key="store_key"
@onClickDelAllApi="onClickDelAll"
@onSearchNameApi="onSearchName"
:is_show_more="showMore"
>
<template v-if="showCrop && !showBlock" class="m-data-list" slot="dataList">
<view class="m-data-box" v-for="item in data">
<view class="m-variety-name">{{ item.varietyName }}</view>
<view class="m-variety-item-box">
<view class="m-variety-item" v-for="items in item.products" @click="check(items)">
{{ items.productName }}
</view>
</view>
</view>
</template>
<template v-if="!showCrop && !showBlock" class="m-sdata-list" slot="searchData">
<view class="m-sdata-box" v-for="item in searchData" @click="check(item)">
<view class="m-variety-name">
<image style="width: 100%; height: 100%; background-color: #d4d4d4" mode="aspectFit" :src="item.productPic" @error="imageError"></image>
</view>
<view class="m-variety-item-box">
<view class="m-variety-item-name">
{{ item.productName }}
<span class="m-jiao">{{ item.varietyName }}</span>
</view>
<view class="m-variety-item-species">
{{ item.speciesName }}
</view>
</view>
</view>
</template>
<template v-if="showBlock" class="m-sdata-list" slot="searchData">
<view class="m-sdata-box" v-for="item in searchData" @click="check(item, 1)">
<view class="m-variety-item-name">
{{ item.blockName }}
<span class="m-jiao">当前未种植</span>
</view>
<view class="m-variety-item-species">
<dict-tag :type="'land_type'" :value="item.blockType" class="m-dic-tag" />
</view>
</view>
</template>
</d-search-log>
</view>
</template>
<script>
import dSearchLog from '@/sunPages/uni_modules/d-search-log/components/d-search-log/d-search-log.vue';
import { getAgriculturalProductList, getBlockList } from '@/api/system/addCrop/addCrop.js';
import DictTag from '@/components/DictTag/index.vue';
export default {
components: {
dSearchLog: dSearchLog,
DictTag : DictTag
},
computed: {},
data() {
return {
color_border: '#989898',
store_key: 'search_list',
showMore: true,
showCrop: true,
showBlock: false,
data: [],
allData: [],
searchData: [],
resviceData: null
};
},
onLoad(options) {
console.log(options);
if (options.isBlock == 2) {
if (options.params) {
this.resviceData = JSON.parse(options.params);
} else {
this.resviceData = null;
}
console.log(this.resviceData);
this.getAgriculturalProductList();
this.showBlock = false;
this.showCrop = true;
} else {
this.resviceData = JSON.parse(options.params);
this.getBlockList();
this.showBlock = true;
this.showCrop = false;
this.showMore = false;
}
},
methods: {
onClickDelAll() {
console.log('[父级接收事件]:删除全部搜索记录');
},
onSearchName(e) {
console.log('[父级接收事件]:点击搜索:' + e);
if (this.showBlock == false) {
if (e != '') {
this.showCrop = false;
this.showMore = false;
this.searchData = this.searchByProductName(e);
} else {
this.showCrop = true;
this.showMore = true;
this.searchData = null;
}
} else {
if (e != '') {
this.searchData = this.searchByProductName(e);
} else {
this.searchData = this.allData;
}
}
console.log(this.searchData);
},
getAgriculturalProductList() {
getAgriculturalProductList()
.then((res) => {
console.log(res);
this.allData = res.data;
const data = res.data;
const groupedData = data.reduce((acc, cur) => {
const variety = cur.varietyName;
if (!acc[variety]) {
acc[variety] = [];
}
acc[variety].push(cur);
return acc;
}, {});
const result = Object.keys(groupedData).map((variety) => ({
varietyName: variety,
products: groupedData[variety]
}));
this.data = result;
})
.catch((err) => {
console.log(err);
});
},
getBlockList() {
getBlockList(1130, 2) //stroebaseid
.then((res) => {
this.allData = res.data;
this.searchData = res.data;
})
.catch((err) => {
console.log(err);
});
},
check(val, num) {
console.log(this.resviceData, val);
if (this.resviceData != null && num != '1') {
const obj = this.resviceData;
obj.productId = val.id;
obj.productName = val.productName;
const data = encodeURIComponent(JSON.stringify(obj));
uni.redirectTo({
url: '/sunPages/addCrops/addCrops?params=' + data
});
} else if (this.resviceData == null && num != '1') {
const obj = {
productId: val.id,
productName: val.productName
};
const data = encodeURIComponent(JSON.stringify(obj));
uni.redirectTo({
url: '/sunPages/addCrops/addCrops?params=' + data
});
} else {
const obj = this.resviceData;
obj.blockId = val.id;
obj.blockName = val.blockName;
obj.blockArea = val.blockArea;
const data = JSON.stringify(obj);
uni.redirectTo({
url: '/sunPages/addCropForm/addCropForm?params=' + data
});
}
},
searchByProductName(val) {
if (this.showBlock == false) {
return this.allData.filter((item) => item.productName.includes(val));
} else {
return this.allData.filter((item) => item.blockName.includes(val));
}
},
imageError(e) {
console.error('image发生error事件,携带值为' + e.detail.errMsg);
}
}
};
</script>
<style scoped lang="scss">
.search-box {
height: 100vh;
background-color: #fff;
}
.my-theme-bg {
background: linear-gradient(117deg, #60df9d, #31cb7b);
color: #fff;
}
.m-data-list {
width: 100%;
margin-top: 50rpx;
padding: 20rpx 40rpx;
.m-data-box {
margin-bottom: 30rpx;
.m-variety-name {
margin-bottom: 10rpx;
font-size: 32rpx;
font-weight: bold;
}
.m-variety-item-box {
display: flex;
flex-wrap: wrap;
.m-variety-item {
background: #f5f5f5;
padding: 9rpx 26rpx;
border-radius: 20rpx;
margin-left: 10rpx;
margin-bottom: 15rpx;
}
}
}
}
.m-sdata-list {
width: 100%;
padding: 20rpx;
.m-sdata-box {
width: 100%;
display: flex;
margin-bottom: 20rpx;
box-shadow: 0 0 7px 1px #d6d6d6;
border-radius: 15rpx;
padding: 20rpx;
.m-variety-name {
margin-right: 20rpx;
width: 100rpx;
height: 100rpx;
overflow: hidden;
border-radius: 10rpx;
}
.m-variety-item-box {
display: flex;
flex-direction: column;
.m-variety-item-name {
font-size: 38rpx;
font-weight: 500;
display: flex;
align-items: center;
margin-bottom: 10rpx;
.m-jiao {
font-size: 26rpx;
font-weight: 400;
background-color: #04921c;
padding: 3rpx 9rpx;
color: #eee;
flex: unset;
border-radius: 10rpx;
margin-left: 20rpx;
}
}
.m-variety-item-species {
max-width: 80%;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
}
}
</style>

@ -886,6 +886,7 @@
line-height: 35px;
font-size: 14px;
overflow: hidden;
padding-right: 35rpx;
}
.text-center {

@ -452,6 +452,7 @@
* 成功或失败
*/
async setSuccessAndError(res, fn) {
console.log(res,fn)
let successData = []
let errorData = []
let tempFilePath = []

Loading…
Cancel
Save