mkm
/
yanzhiAPP
Template
2
0
Fork 0

完成溯源界面修改

This commit is contained in:
jia 2023-12-07 09:44:22 +08:00
parent c3ab1b77cd
commit 4375dc3276
19 changed files with 1036 additions and 2553 deletions

View File

@ -18,7 +18,9 @@
<style lang="scss"> <style lang="scss">
@import "uview-plus/index.scss"; @import "uview-plus/index.scss";
page {
background-color: $theme-bg-color;
}
.card { .card {
position: relative; position: relative;
width: 693.93rpx; width: 693.93rpx;

View File

@ -1,112 +1,112 @@
{ {
"name": "种植溯源", "name" : "养殖溯源",
"appid": "__UNI__D087881", "appid" : "__UNI__EBC53DB",
"description": "", "description" : "",
"versionName": "1.0.1", "versionName" : "1.0.0",
"versionCode": "100", "versionCode" : "100",
"transformPx": false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus": { "app-plus" : {
"usingComponents": true, "usingComponents" : true,
"nvueStyleCompiler": "uni-app", "nvueStyleCompiler" : "uni-app",
"compilerVersion": 3, "compilerVersion" : 3,
"screenOrientation": [ "screenOrientation" : [
"portrait-primary", "portrait-primary",
"portrait-secondary", "portrait-secondary",
"landscape-primary", "landscape-primary",
"landscape-secondary" "landscape-secondary"
], ],
"splashscreen": { "splashscreen" : {
"alwaysShowBeforeRender": true, "alwaysShowBeforeRender" : true,
"waiting": true, "waiting" : true,
"autoclose": true, "autoclose" : true,
"delay": 0 "delay" : 0
}, },
/* */ /* */
"modules": { "modules" : {
"Geolocation": {}, "Geolocation" : {},
"Maps": {}, "Maps" : {},
"LivePusher": {}, "LivePusher" : {},
"VideoPlayer": {}, "VideoPlayer" : {},
"Barcode": {}, "Barcode" : {},
"Camera": {}, "Camera" : {},
"UniMP": { "UniMP" : {
"description": "uni小程序" "description" : "uni小程序"
} }
}, },
/* */ /* */
"distribute": { "distribute" : {
/* android */ /* android */
"android": { "android" : {
"permissions": [ "permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>", "<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>", "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
], ],
"minSdkVersion": 21 "minSdkVersion" : 21
}, },
/* ios */ /* ios */
"ios": { "ios" : {
"dSYMs": false "dSYMs" : false
}, },
/* SDK */ /* SDK */
"sdkConfigs": { "sdkConfigs" : {
"ad": {}, "ad" : {},
"geolocation": { "geolocation" : {
"amap": { "amap" : {
"name": "amap_18982406440DFVLElaO", "name" : "amap_18982406440DFVLElaO",
"__platform__": ["android"], "__platform__" : [ "android" ],
"appkey_ios": "4e6789b864fe1a2d76b98e38158f20f2", "appkey_ios" : "4e6789b864fe1a2d76b98e38158f20f2",
"appkey_android": "a230d943475443eb29fc3871fbef8605" "appkey_android" : "a230d943475443eb29fc3871fbef8605"
}, },
"system": { "system" : {
"__platform__": ["ios", "android"] "__platform__" : [ "ios", "android" ]
} }
}, },
"maps": { "maps" : {
"amap": { "amap" : {
"name": "4e6789b864fe1a2d76b98e38158f20f2", "name" : "4e6789b864fe1a2d76b98e38158f20f2",
"appkey_ios": "a230d943475443eb29fc3871fbef8605", "appkey_ios" : "a230d943475443eb29fc3871fbef8605",
"appkey_android": "a230d943475443eb29fc3871fbef8605" "appkey_android" : "a230d943475443eb29fc3871fbef8605"
} }
} }
} }
} }
}, },
/* */ /* */
"quickapp": {}, "quickapp" : {},
/* */ /* */
"mp-weixin": { "mp-weixin" : {
"appid": "", "appid" : "",
"setting": { "setting" : {
"urlCheck": false "urlCheck" : false
}, },
"usingComponents": true "usingComponents" : true
}, },
"mp-alipay": { "mp-alipay" : {
"usingComponents": true "usingComponents" : true
}, },
"mp-baidu": { "mp-baidu" : {
"usingComponents": true "usingComponents" : true
}, },
"mp-toutiao": { "mp-toutiao" : {
"usingComponents": true "usingComponents" : true
}, },
"uniStatistics": { "uniStatistics" : {
"enable": false "enable" : false
}, },
"vueVersion": "3" "vueVersion" : "3"
} }

View File

@ -1,11 +1,11 @@
{ {
"hash": "ff711c6a", "hash": "873cefea",
"browserHash": "fa669d50", "browserHash": "d0b9aaca",
"optimized": { "optimized": {
"uview-plus": { "uview-plus": {
"src": "../../uview-plus/index.js", "src": "../../uview-plus/index.js",
"file": "uview-plus.js", "file": "uview-plus.js",
"fileHash": "31730495", "fileHash": "945a1341",
"needsInterop": false "needsInterop": false
} }
}, },

234
node_modules/.vite/deps/uview-plus.js generated vendored
View File

@ -1,4 +1,4 @@
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/mixin/mixin.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/mixin/mixin.js
var mixin_default = { var mixin_default = {
// 定义每个组件都可能需要用到的外部样式以及类名 // 定义每个组件都可能需要用到的外部样式以及类名
props: { props: {
@ -129,10 +129,10 @@ var mixin_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/mixin/mpMixin.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/mixin/mpMixin.js
var mpMixin_default = {}; var mpMixin_default = {};
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/utils.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/luch-request/utils.js
var { toString } = Object.prototype; var { toString } = Object.prototype;
function isArray(val) { function isArray(val) {
return toString.call(val) === "[object Array]"; return toString.call(val) === "[object Array]";
@ -188,7 +188,7 @@ function isUndefined(val) {
return typeof val === "undefined"; return typeof val === "undefined";
} }
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/helpers/buildURL.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/luch-request/helpers/buildURL.js
function encode(val) { function encode(val) {
return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
} }
@ -231,17 +231,17 @@ function buildURL(url2, params) {
return url2; return url2;
} }
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/helpers/isAbsoluteURL.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/luch-request/helpers/isAbsoluteURL.js
function isAbsoluteURL(url2) { function isAbsoluteURL(url2) {
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2); return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
} }
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/helpers/combineURLs.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/luch-request/helpers/combineURLs.js
function combineURLs(baseURL, relativeURL) { function combineURLs(baseURL, relativeURL) {
return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL; return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
} }
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/core/buildFullPath.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/luch-request/core/buildFullPath.js
function buildFullPath(baseURL, requestedURL) { function buildFullPath(baseURL, requestedURL) {
if (baseURL && !isAbsoluteURL(requestedURL)) { if (baseURL && !isAbsoluteURL(requestedURL)) {
return combineURLs(baseURL, requestedURL); return combineURLs(baseURL, requestedURL);
@ -249,7 +249,7 @@ function buildFullPath(baseURL, requestedURL) {
return requestedURL; return requestedURL;
} }
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/core/settle.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/luch-request/core/settle.js
function settle(resolve, reject, response) { function settle(resolve, reject, response) {
const { validateStatus: validateStatus2 } = response.config; const { validateStatus: validateStatus2 } = response.config;
const status = response.statusCode; const status = response.statusCode;
@ -260,7 +260,7 @@ function settle(resolve, reject, response) {
} }
} }
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/adapters/index.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/luch-request/adapters/index.js
var mergeKeys = (keys, config2) => { var mergeKeys = (keys, config2) => {
const config = {}; const config = {};
keys.forEach((prop) => { keys.forEach((prop) => {
@ -323,10 +323,10 @@ var adapters_default = (config) => new Promise((resolve, reject) => {
} }
}); });
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/core/dispatchRequest.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/luch-request/core/dispatchRequest.js
var dispatchRequest_default = (config) => adapters_default(config); var dispatchRequest_default = (config) => adapters_default(config);
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/core/InterceptorManager.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/luch-request/core/InterceptorManager.js
function InterceptorManager() { function InterceptorManager() {
this.handlers = []; this.handlers = [];
} }
@ -351,7 +351,7 @@ InterceptorManager.prototype.forEach = function forEach2(fn) {
}; };
var InterceptorManager_default = InterceptorManager; var InterceptorManager_default = InterceptorManager;
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/core/mergeConfig.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/luch-request/core/mergeConfig.js
var mergeKeys2 = (keys, globalsConfig, config2) => { var mergeKeys2 = (keys, globalsConfig, config2) => {
const config = {}; const config = {};
keys.forEach((prop) => { keys.forEach((prop) => {
@ -413,7 +413,7 @@ var mergeConfig_default = (globalsConfig, config2 = {}) => {
return config; return config;
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/core/defaults.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/luch-request/core/defaults.js
var defaults_default = { var defaults_default = {
baseURL: "", baseURL: "",
header: {}, header: {},
@ -428,7 +428,7 @@ var defaults_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/utils/clone.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/luch-request/utils/clone.js
var clone = function() { var clone = function() {
"use strict"; "use strict";
function _instanceof(obj, type) { function _instanceof(obj, type) {
@ -625,7 +625,7 @@ var clone = function() {
}(); }();
var clone_default = clone; var clone_default = clone;
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/core/Request.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/luch-request/core/Request.js
var Request = class { var Request = class {
/** /**
* @param {Object} arg - 全局配置 * @param {Object} arg - 全局配置
@ -763,10 +763,10 @@ var Request = class {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/index.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/luch-request/index.js
var luch_request_default = Request; var luch_request_default = Request;
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/util/route.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/util/route.js
var Router = class { var Router = class {
constructor() { constructor() {
this.config = { this.config = {
@ -866,7 +866,7 @@ var Router = class {
}; };
var route_default = new Router().route; var route_default = new Router().route;
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/function/colorGradient.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/function/colorGradient.js
function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) { function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
const startRGB = hexToRgb(startColor, false); const startRGB = hexToRgb(startColor, false);
const startR = startRGB[0]; const startR = startRGB[0];
@ -978,7 +978,7 @@ var colorGradient_default = {
colorToRgba colorToRgba
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/function/test.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/function/test.js
function email(value) { function email(value) {
return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value); return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value);
} }
@ -1152,7 +1152,7 @@ var test_default = {
string string
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/function/debounce.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/function/debounce.js
var timeout = null; var timeout = null;
function debounce(func2, wait = 500, immediate = false) { function debounce(func2, wait = 500, immediate = false) {
if (timeout !== null) if (timeout !== null)
@ -1172,7 +1172,7 @@ function debounce(func2, wait = 500, immediate = false) {
} }
var debounce_default = debounce; var debounce_default = debounce;
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/function/throttle.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/function/throttle.js
var timer; var timer;
var flag; var flag;
function throttle(func2, wait = 500, immediate = true) { function throttle(func2, wait = 500, immediate = true) {
@ -1194,7 +1194,7 @@ function throttle(func2, wait = 500, immediate = true) {
} }
var throttle_default = throttle; var throttle_default = throttle;
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/function/digit.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/function/digit.js
var _boundaryCheckingState = true; var _boundaryCheckingState = true;
function strip(num, precision = 15) { function strip(num, precision = 15) {
return +parseFloat(Number(num).toPrecision(precision)); return +parseFloat(Number(num).toPrecision(precision));
@ -1258,7 +1258,7 @@ function round(num, ratio) {
return result; return result;
} }
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/function/index.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/function/index.js
function range2(min = 0, max = 0, value = 0) { function range2(min = 0, max = 0, value = 0) {
return Math.max(min, Math.min(max, Number(value))); return Math.max(min, Math.min(max, Number(value)));
} }
@ -1732,7 +1732,7 @@ var function_default = {
setConfig setConfig
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/config.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/config.js
var version = "3"; var version = "3";
if (true) { if (true) {
console.log(` console.log(`
@ -1767,7 +1767,7 @@ var config_default = {
unit: "px" unit: "px"
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/actionSheet.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/actionSheet.js
var actionSheet_default = { var actionSheet_default = {
// action-sheet组件 // action-sheet组件
actionSheet: { actionSheet: {
@ -1785,7 +1785,7 @@ var actionSheet_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/album.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/album.js
var album_default = { var album_default = {
// album 组件 // album 组件
album: { album: {
@ -1803,7 +1803,7 @@ var album_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/alert.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/alert.js
var alert_default = { var alert_default = {
// alert警告组件 // alert警告组件
alert: { alert: {
@ -1818,7 +1818,7 @@ var alert_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/avatar.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/avatar.js
var avatar_default = { var avatar_default = {
// avatar 组件 // avatar 组件
avatar: { avatar: {
@ -1839,7 +1839,7 @@ var avatar_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/avatarGroup.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/avatarGroup.js
var avatarGroup_default = { var avatarGroup_default = {
// avatarGroup 组件 // avatarGroup 组件
avatarGroup: { avatarGroup: {
@ -1855,7 +1855,7 @@ var avatarGroup_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/backtop.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/backtop.js
var backtop_default = { var backtop_default = {
// backtop组件 // backtop组件
backtop: { backtop: {
@ -1875,7 +1875,7 @@ var backtop_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/badge.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/badge.js
var badge_default = { var badge_default = {
// 徽标数组件 // 徽标数组件
badge: { badge: {
@ -1895,7 +1895,7 @@ var badge_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/button.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/button.js
var button_default = { var button_default = {
// button组件 // button组件
button: { button: {
@ -1930,7 +1930,7 @@ var button_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/calendar.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/calendar.js
var calendar_default = { var calendar_default = {
// calendar 组件 // calendar 组件
calendar: { calendar: {
@ -1967,7 +1967,7 @@ var calendar_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/carKeyboard.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/carKeyboard.js
var carKeyboard_default = { var carKeyboard_default = {
// 车牌号键盘 // 车牌号键盘
carKeyboard: { carKeyboard: {
@ -1975,7 +1975,7 @@ var carKeyboard_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/cell.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/cell.js
var cell_default = { var cell_default = {
// cell组件的props // cell组件的props
cell: { cell: {
@ -2003,7 +2003,7 @@ var cell_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/cellGroup.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/cellGroup.js
var cellGroup_default = { var cellGroup_default = {
// cell-group组件的props // cell-group组件的props
cellGroup: { cellGroup: {
@ -2013,7 +2013,7 @@ var cellGroup_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/checkbox.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/checkbox.js
var checkbox_default = { var checkbox_default = {
// checkbox组件 // checkbox组件
checkbox: { checkbox: {
@ -2033,7 +2033,7 @@ var checkbox_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/checkboxGroup.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/checkboxGroup.js
var checkboxGroup_default = { var checkboxGroup_default = {
// checkbox-group组件 // checkbox-group组件
checkboxGroup: { checkboxGroup: {
@ -2055,7 +2055,7 @@ var checkboxGroup_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/circleProgress.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/circleProgress.js
var circleProgress_default = { var circleProgress_default = {
// circleProgress 组件 // circleProgress 组件
circleProgress: { circleProgress: {
@ -2063,7 +2063,7 @@ var circleProgress_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/code.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/code.js
var code_default = { var code_default = {
// code 组件 // code 组件
code: { code: {
@ -2076,7 +2076,7 @@ var code_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/codeInput.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/codeInput.js
var codeInput_default = { var codeInput_default = {
// codeInput 组件 // codeInput 组件
codeInput: { codeInput: {
@ -2098,7 +2098,7 @@ var codeInput_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/col.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/col.js
var col_default = { var col_default = {
// col 组件 // col 组件
col: { col: {
@ -2110,7 +2110,7 @@ var col_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/collapse.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/collapse.js
var collapse_default = { var collapse_default = {
// collapse 组件 // collapse 组件
collapse: { collapse: {
@ -2120,7 +2120,7 @@ var collapse_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/collapseItem.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/collapseItem.js
var collapseItem_default = { var collapseItem_default = {
// collapseItem 组件 // collapseItem 组件
collapseItem: { collapseItem: {
@ -2138,7 +2138,7 @@ var collapseItem_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/columnNotice.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/columnNotice.js
var columnNotice_default = { var columnNotice_default = {
// columnNotice 组件 // columnNotice 组件
columnNotice: { columnNotice: {
@ -2155,7 +2155,7 @@ var columnNotice_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/countDown.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/countDown.js
var countDown_default = { var countDown_default = {
// u-count-down 计时器组件 // u-count-down 计时器组件
countDown: { countDown: {
@ -2166,7 +2166,7 @@ var countDown_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/countTo.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/countTo.js
var countTo_default = { var countTo_default = {
// countTo 组件 // countTo 组件
countTo: { countTo: {
@ -2184,7 +2184,7 @@ var countTo_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/datetimePicker.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/datetimePicker.js
var datetimePicker_default = { var datetimePicker_default = {
// datetimePicker 组件 // datetimePicker 组件
datetimePicker: { datetimePicker: {
@ -2213,7 +2213,7 @@ var datetimePicker_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/divider.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/divider.js
var divider_default = { var divider_default = {
// divider组件 // divider组件
divider: { divider: {
@ -2228,7 +2228,7 @@ var divider_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/empty.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/empty.js
var empty_default = { var empty_default = {
// empty组件 // empty组件
empty: { empty: {
@ -2246,7 +2246,7 @@ var empty_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/form.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/form.js
var form_default = { var form_default = {
// form 组件 // form 组件
form: { form: {
@ -2261,7 +2261,7 @@ var form_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/formItem.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/formItem.js
var formItem_default = { var formItem_default = {
// formItem 组件 // formItem 组件
formItem: { formItem: {
@ -2276,7 +2276,7 @@ var formItem_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/gap.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/gap.js
var gap_default = { var gap_default = {
// gap组件 // gap组件
gap: { gap: {
@ -2288,7 +2288,7 @@ var gap_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/grid.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/grid.js
var grid_default = { var grid_default = {
// grid组件 // grid组件
grid: { grid: {
@ -2298,7 +2298,7 @@ var grid_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/gridItem.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/gridItem.js
var gridItem_default = { var gridItem_default = {
// grid-item组件 // grid-item组件
gridItem: { gridItem: {
@ -2307,7 +2307,7 @@ var gridItem_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/icon.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/icon.js
var { var {
color color
} = config_default; } = config_default;
@ -2334,7 +2334,7 @@ var icon_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/image.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/image.js
var image_default = { var image_default = {
// image组件 // image组件
image: { image: {
@ -2357,7 +2357,7 @@ var image_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/indexAnchor.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/indexAnchor.js
var indexAnchor_default = { var indexAnchor_default = {
// indexAnchor 组件 // indexAnchor 组件
indexAnchor: { indexAnchor: {
@ -2369,7 +2369,7 @@ var indexAnchor_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/indexList.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/indexList.js
var indexList_default = { var indexList_default = {
// indexList 组件 // indexList 组件
indexList: { indexList: {
@ -2381,7 +2381,7 @@ var indexList_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/input.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/input.js
var input_default = { var input_default = {
// index 组件 // index 组件
input: { input: {
@ -2422,7 +2422,7 @@ var input_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/keyboard.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/keyboard.js
var keyboard_default = { var keyboard_default = {
// 键盘组件 // 键盘组件
keyboard: { keyboard: {
@ -2445,7 +2445,7 @@ var keyboard_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/line.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/line.js
var line_default = { var line_default = {
// line组件 // line组件
line: { line: {
@ -2458,7 +2458,7 @@ var line_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/lineProgress.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/lineProgress.js
var lineProgress_default = { var lineProgress_default = {
// lineProgress 组件 // lineProgress 组件
lineProgress: { lineProgress: {
@ -2470,7 +2470,7 @@ var lineProgress_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/link.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/link.js
var { var {
color: color2 color: color2
} = config_default; } = config_default;
@ -2487,7 +2487,7 @@ var link_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/list.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/list.js
var list_default = { var list_default = {
// list 组件 // list 组件
list: { list: {
@ -2508,7 +2508,7 @@ var list_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/listItem.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/listItem.js
var listItem_default = { var listItem_default = {
// listItem 组件 // listItem 组件
listItem: { listItem: {
@ -2516,7 +2516,7 @@ var listItem_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/loadingIcon.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/loadingIcon.js
var { var {
color: color3 color: color3
} = config_default; } = config_default;
@ -2537,7 +2537,7 @@ var loadingIcon_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/loadingPage.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/loadingPage.js
var loadingPage_default = { var loadingPage_default = {
// loading-page组件 // loading-page组件
loadingPage: { loadingPage: {
@ -2553,7 +2553,7 @@ var loadingPage_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/loadmore.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/loadmore.js
var loadmore_default = { var loadmore_default = {
// loadmore 组件 // loadmore 组件
loadmore: { loadmore: {
@ -2578,7 +2578,7 @@ var loadmore_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/modal.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/modal.js
var modal_default = { var modal_default = {
// modal 组件 // modal 组件
modal: { modal: {
@ -2601,7 +2601,7 @@ var modal_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/color.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/color.js
var color4 = { var color4 = {
primary: "#3c9cff", primary: "#3c9cff",
info: "#909399", info: "#909399",
@ -2617,7 +2617,7 @@ var color4 = {
}; };
var color_default = color4; var color_default = color4;
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/navbar.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/navbar.js
var navbar_default = { var navbar_default = {
// navbar 组件 // navbar 组件
navbar: { navbar: {
@ -2640,7 +2640,7 @@ var navbar_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/noNetwork.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/noNetwork.js
var noNetwork_default = { var noNetwork_default = {
// noNetwork // noNetwork
noNetwork: { noNetwork: {
@ -2650,7 +2650,7 @@ var noNetwork_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/noticeBar.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/noticeBar.js
var noticeBar_default = { var noticeBar_default = {
// noticeBar // noticeBar
noticeBar: { noticeBar: {
@ -2670,7 +2670,7 @@ var noticeBar_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/notify.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/notify.js
var notify_default = { var notify_default = {
// notify组件 // notify组件
notify: { notify: {
@ -2685,7 +2685,7 @@ var notify_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/numberBox.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/numberBox.js
var numberBox_default = { var numberBox_default = {
// 步进器组件 // 步进器组件
numberBox: { numberBox: {
@ -2713,7 +2713,7 @@ var numberBox_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/numberKeyboard.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/numberKeyboard.js
var numberKeyboard_default = { var numberKeyboard_default = {
// 数字键盘 // 数字键盘
numberKeyboard: { numberKeyboard: {
@ -2723,7 +2723,7 @@ var numberKeyboard_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/overlay.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/overlay.js
var overlay_default = { var overlay_default = {
// overlay组件 // overlay组件
overlay: { overlay: {
@ -2734,7 +2734,7 @@ var overlay_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/parse.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/parse.js
var parse_default = { var parse_default = {
// parse // parse
parse: { parse: {
@ -2749,7 +2749,7 @@ var parse_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/picker.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/picker.js
var picker_default = { var picker_default = {
// picker // picker
picker: { picker: {
@ -2771,7 +2771,7 @@ var picker_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/popup.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/popup.js
var popup_default = { var popup_default = {
// popup组件 // popup组件
popup: { popup: {
@ -2794,7 +2794,7 @@ var popup_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/radio.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/radio.js
var radio_default = { var radio_default = {
// radio组件 // radio组件
radio: { radio: {
@ -2814,7 +2814,7 @@ var radio_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/radioGroup.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/radioGroup.js
var radioGroup_default = { var radioGroup_default = {
// radio-group组件 // radio-group组件
radioGroup: { radioGroup: {
@ -2837,7 +2837,7 @@ var radioGroup_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/rate.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/rate.js
var rate_default = { var rate_default = {
// rate组件 // rate组件
rate: { rate: {
@ -2856,7 +2856,7 @@ var rate_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/readMore.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/readMore.js
var readMore_default = { var readMore_default = {
// readMore // readMore
readMore: { readMore: {
@ -2871,7 +2871,7 @@ var readMore_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/row.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/row.js
var row_default = { var row_default = {
// row // row
row: { row: {
@ -2881,7 +2881,7 @@ var row_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/rowNotice.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/rowNotice.js
var rowNotice_default = { var rowNotice_default = {
// rowNotice // rowNotice
rowNotice: { rowNotice: {
@ -2895,7 +2895,7 @@ var rowNotice_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/scrollList.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/scrollList.js
var scrollList_default = { var scrollList_default = {
// scrollList // scrollList
scrollList: { scrollList: {
@ -2908,7 +2908,7 @@ var scrollList_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/search.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/search.js
var search_default = { var search_default = {
// search // search
search: { search: {
@ -2938,7 +2938,7 @@ var search_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/section.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/section.js
var section_default = { var section_default = {
// u-section组件 // u-section组件
section: { section: {
@ -2955,7 +2955,7 @@ var section_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/skeleton.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/skeleton.js
var skeleton_default = { var skeleton_default = {
// skeleton // skeleton
skeleton: { skeleton: {
@ -2973,7 +2973,7 @@ var skeleton_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/slider.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/slider.js
var slider_default = { var slider_default = {
// slider组件 // slider组件
slider: { slider: {
@ -2992,7 +2992,7 @@ var slider_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/statusBar.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/statusBar.js
var statusBar_default = { var statusBar_default = {
// statusBar // statusBar
statusBar: { statusBar: {
@ -3000,7 +3000,7 @@ var statusBar_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/steps.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/steps.js
var steps_default = { var steps_default = {
// steps组件 // steps组件
steps: { steps: {
@ -3014,7 +3014,7 @@ var steps_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/stepsItem.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/stepsItem.js
var stepsItem_default = { var stepsItem_default = {
// steps-item组件 // steps-item组件
stepsItem: { stepsItem: {
@ -3025,7 +3025,7 @@ var stepsItem_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/sticky.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/sticky.js
var sticky_default = { var sticky_default = {
// sticky组件 // sticky组件
sticky: { sticky: {
@ -3038,7 +3038,7 @@ var sticky_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/subsection.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/subsection.js
var subsection_default = { var subsection_default = {
// subsection组件 // subsection组件
subsection: { subsection: {
@ -3054,7 +3054,7 @@ var subsection_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/swipeAction.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/swipeAction.js
var swipeAction_default = { var swipeAction_default = {
// swipe-action组件 // swipe-action组件
swipeAction: { swipeAction: {
@ -3062,7 +3062,7 @@ var swipeAction_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/swipeActionItem.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/swipeActionItem.js
var swipeActionItem_default = { var swipeActionItem_default = {
// swipeActionItem 组件 // swipeActionItem 组件
swipeActionItem: { swipeActionItem: {
@ -3076,7 +3076,7 @@ var swipeActionItem_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/swiper.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/swiper.js
var swiper_default = { var swiper_default = {
// swiper 组件 // swiper 组件
swiper: { swiper: {
@ -3107,7 +3107,7 @@ var swiper_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/swipterIndicator.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/swipterIndicator.js
var swipterIndicator_default = { var swipterIndicator_default = {
// swiperIndicator 组件 // swiperIndicator 组件
swiperIndicator: { swiperIndicator: {
@ -3119,7 +3119,7 @@ var swipterIndicator_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/switch.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/switch.js
var switch_default = { var switch_default = {
// switch // switch
switch: { switch: {
@ -3136,7 +3136,7 @@ var switch_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/tabbar.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/tabbar.js
var tabbar_default = { var tabbar_default = {
// tabbar // tabbar
tabbar: { tabbar: {
@ -3151,7 +3151,7 @@ var tabbar_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/tabbarItem.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/tabbarItem.js
var tabbarItem_default = { var tabbarItem_default = {
// //
tabbarItem: { tabbarItem: {
@ -3164,7 +3164,7 @@ var tabbarItem_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/tabs.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/tabs.js
var tabs_default = { var tabs_default = {
// //
tabs: { tabs: {
@ -3189,7 +3189,7 @@ var tabs_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/tag.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/tag.js
var tag_default = { var tag_default = {
// tag 组件 // tag 组件
tag: { tag: {
@ -3211,7 +3211,7 @@ var tag_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/text.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/text.js
var text_default = { var text_default = {
// text 组件 // text 组件
text: { text: {
@ -3241,7 +3241,7 @@ var text_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/textarea.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/textarea.js
var textarea_default = { var textarea_default = {
// textarea 组件 // textarea 组件
textarea: { textarea: {
@ -3270,7 +3270,7 @@ var textarea_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/toast.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/toast.js
var toast_default = { var toast_default = {
// toast组件 // toast组件
toast: { toast: {
@ -3293,7 +3293,7 @@ var toast_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/toolbar.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/toolbar.js
var toolbar_default = { var toolbar_default = {
// toolbar 组件 // toolbar 组件
toolbar: { toolbar: {
@ -3306,7 +3306,7 @@ var toolbar_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/tooltip.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/tooltip.js
var tooltip_default = { var tooltip_default = {
// tooltip 组件 // tooltip 组件
tooltip: { tooltip: {
@ -3324,7 +3324,7 @@ var tooltip_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/transition.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/transition.js
var transition_default = { var transition_default = {
// transition动画组件的props // transition动画组件的props
transition: { transition: {
@ -3335,7 +3335,7 @@ var transition_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props/upload.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props/upload.js
var upload_default = { var upload_default = {
// upload组件 // upload组件
upload: { upload: {
@ -3364,7 +3364,7 @@ var upload_default = {
} }
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/props.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/props.js
var { var {
color: color5 color: color5
} = config_default; } = config_default;
@ -3459,7 +3459,7 @@ var props_default = {
...upload_default ...upload_default
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/config/zIndex.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/config/zIndex.js
var zIndex_default = { var zIndex_default = {
toast: 10090, toast: 10090,
noNetwork: 10080, noNetwork: 10080,
@ -3472,13 +3472,13 @@ var zIndex_default = {
indexListSticky: 965 indexListSticky: 965
}; };
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/libs/function/platform.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/libs/function/platform.js
var platform = "none"; var platform = "none";
platform = "vue3"; platform = "vue3";
platform = "h5"; platform = "h5";
var platform_default = platform; var platform_default = platform;
// E:/新建文件夹/TraceabilityAPP/node_modules/uview-plus/index.js // E:/新建文件夹/yanzhiAPP/node_modules/uview-plus/index.js
var pleaseSetTranspileDependencies = {}; var pleaseSetTranspileDependencies = {};
var babelTest = pleaseSetTranspileDependencies == null ? void 0 : pleaseSetTranspileDependencies.test; var babelTest = pleaseSetTranspileDependencies == null ? void 0 : pleaseSetTranspileDependencies.test;
var $u = { var $u = {

View File

@ -10,15 +10,15 @@
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages "pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/index/massif", "path": "pages/index/massif",
"style": { "style": {
"navigationBarTitleText": "地块", "navigationBarTitleText": "",
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4", "navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
} }
},{ }, {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationStyle": "custom", "navigationStyle": "custom",
@ -45,9 +45,18 @@
} }
}, },
{ {
"path": "pages/husbandryForm/harvest", "path": "pages/husbandryForm/addbarn",
"style": { "style": {
"navigationBarTitleText": "添加收获信息", "navigationBarTitleText": "添加栏舍",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/husbandryForm/dewormingrecord",
"style": {
"navigationBarTitleText": "驱虫记录",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4", "navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
@ -56,7 +65,7 @@
{ {
"path": "pages/husbandryForm/Pest", "path": "pages/husbandryForm/Pest",
"style": { "style": {
"navigationBarTitleText": "添加虫害防治信息", "navigationBarTitleText": "疫苗记录",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4", "navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
@ -65,7 +74,7 @@
{ {
"path": "pages/husbandryForm/irrigate", "path": "pages/husbandryForm/irrigate",
"style": { "style": {
"navigationBarTitleText": "添加灌溉信息", "navigationBarTitleText": "消毒记录",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4", "navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
@ -74,7 +83,7 @@
{ {
"path": "pages/husbandryForm/weeding", "path": "pages/husbandryForm/weeding",
"style": { "style": {
"navigationBarTitleText": "添加除草信息", "navigationBarTitleText": "喂水记录",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4", "navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
@ -83,7 +92,7 @@
{ {
"path": "pages/husbandryForm/fertilize", "path": "pages/husbandryForm/fertilize",
"style": { "style": {
"navigationBarTitleText": "添加施肥信息", "navigationBarTitleText": "喂食记录",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4", "navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
@ -92,7 +101,7 @@
{ {
"path": "pages/husbandryForm/sow", "path": "pages/husbandryForm/sow",
"style": { "style": {
"navigationBarTitleText": "添加种植信息", "navigationBarTitleText": "添加栏舍",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4", "navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
@ -101,16 +110,16 @@
{ {
"path": "pages/live/live", "path": "pages/live/live",
"style": { "style": {
"navigationBarTitleText": "苗情监测", "navigationBarTitleText": "养殖监测",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4", "navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
} }
}, },
{ {
"path": "pages/addLand/addLand", "path": "pages/addfarm/addfarm",
"style": { "style": {
"navigationBarTitleText": "添加土地信息", "navigationBarTitleText": "添加养殖场信息",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4", "navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
@ -124,7 +133,7 @@
"navigationBarBackgroundColor": "#F4F4F4", "navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
} }
},{ }, {
"path": "pages/husbandryForm/detail", "path": "pages/husbandryForm/detail",
"style": { "style": {
"navigationBarTitleText": "操作详情", "navigationBarTitleText": "操作详情",
@ -142,6 +151,98 @@
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
} }
}, },
{
"path": "pages/farminfo/farminfo",
"style": {
"navigationBarTitleText": "养殖场信息",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black"
}
},{
"path": "pages/filemanagement/index",
"style": {
"navigationBarTitleText": "档案管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black"
}
},{
"path": "pages/filemanagement/add",
"style": {
"navigationBarTitleText": "新增档案",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black"
}
},{
"path": "pages/filemanagement/detail",
"style": {
"navigationBarTitleText": "档案详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black"
}
},{
"path": "pages/filemanagement/result",
"style": {
"navigationBarTitleText": "喂养信息",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/transferrecord/index",
"style": {
"navigationBarTitleText": "转栏列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black"
}
},{
"path": "pages/transferrecord/add",
"style": {
"navigationBarTitleText": "转栏记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black"
}
}, {
"path": "pages/outrecord/index",
"style": {
"navigationBarTitleText": "离栏列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black"
}
},{
"path": "pages/outrecord/add",
"style": {
"navigationBarTitleText": "离栏记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/barnsetting/index",
"style": {
"navigationBarTitleText": "栏舍设置",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black"
}
},{
"path": "pages/husbandryForm/jiben",
"style": {
"navigationBarTitleText": "更新信息",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black"
}
},
{ {
"path": "pages/index/personal", "path": "pages/index/personal",
"style": { "style": {
@ -181,11 +282,11 @@
}, },
{ {
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"text": "", "text": "地",
"iconPath": "static/tabber/b-b.png", "iconPath": "static/tabber/b-b.png",
"selectedIconPath": "static/tabber/b.png" "selectedIconPath": "static/tabber/b.png"
}, },
{ {
"pagePath": "pages/index/personal", "pagePath": "pages/index/personal",
"text": "我的", "text": "我的",

View File

@ -2,7 +2,7 @@
<view class="box"> <view class="box">
<view class="content"> <view class="content">
<view class="tit"> <view class="tit">
欢迎进入吟龙土壤墒情监测溯系统! 欢迎进入吟龙养殖监测溯源系统!
</view> </view>
<view class="input-card"> <view class="input-card">
<view class="login-type" v-for="(item,i) in arr1.list" :key="i" @click="aclick(i)"> <view class="login-type" v-for="(item,i) in arr1.list" :key="i" @click="aclick(i)">

View File

@ -4,7 +4,7 @@
<view class="box"> <view class="box">
<view class="content"> <view class="content">
<view class="tit"> <view class="tit">
欢迎进入吟龙土壤墒情监测溯系统! 欢迎进入吟龙养殖监测溯源系统!
</view> </view>
<view class="input-card"> <view class="input-card">
<view class="login-type"> <view class="login-type">

View File

@ -1,484 +0,0 @@
<template>
<view class="content">
<view class="card">
<u-form labelPosition="top" labelWidth='100' :model="data.formData" ref="form1">
<!-- <u-form-item label="姓名" prop="name"><u-input v-model="data.formData.name" /></u-form-item>
<u-form-item label="简介" prop="intro"><u-input v-model="data.formData.intro" /></u-form-item> -->
<u-form-item label="土地名称" prop="title" borderBottom ref='item1' required>
<up-input placeholder="请输入土地名称" border="surround" v-model="data.formData.title"></up-input>
</u-form-item>
<u-form-item label="土地面积" prop="area" borderBottom required>
<up-input placeholder="请输入土地面积" border="surround" v-model="data.formData.area"></up-input>
</u-form-item>
<u-form-item label="所在省份" prop="province_code" borderBottom required @click="isshow1">
<up-input placeholder="请选择所在省份" border="surround" v-model="province_name" readonly
style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="所在城市" prop="city_code" borderBottom required @click="isshow2">
<up-input placeholder="请选择所在城市" border="surround" v-model="city_name" readonly
style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="所在区县" prop="county_code" borderBottom required @click="isshow3">
<up-input placeholder="请选择所在区县" border="surround" v-model="county_name" readonly
style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="土地详细地址" prop="town_code" borderBottom required>
<u-input placeholder="请输入土地详细地址" border="surround" v-model="data.formData.address">
<template #suffix>
<u-icon name="map-fill" size="28" @click="location"></u-icon>
</template>
</u-input>
</u-form-item>
<u-form-item label="土地负责人" prop="master_name" borderBottom required>
<up-input placeholder="请输入土地负责人名称" border="surround" v-model="data.formData.master_name"></up-input>
</u-form-item>
<u-form-item label="负责人电话" prop="master_phone" borderBottom required>
<up-input placeholder="请输入负责人电话" type="number" border="surround"
v-model="data.formData.master_phone"></up-input>
</u-form-item>
<view class="card-li">
<view class="card-li-tit">
土地图片
</view>
<view class="code-img1">
<view class="" v-if="pic.length>0"
style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;">
<view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;">
<view class="">
<u-icon name="close" size="15" style="margin-left:120.85rpx;"
@click="delimg(i)"></u-icon>
<u-image :src="item" width="150.85rpx" height="150.85rpx"></u-image>
</view>
</view>
</view>
</view>
<view class="code-img">
<view class="" @click="updateImgFn">
<view class="carime-icon">
<u-image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u-image>
<view class="">
点击上传图片
</view>
</view>
</view>
</view>
</view>
</u-form>
<u-action-sheet :show="show" keyName="name" closeOnClickOverlay :actions="columns" title="请选择"
@close="show = false" @select="leavaType1">
</u-action-sheet>
<u-action-sheet :show="show1" keyName="name" :actions="columns1" title="请选择" @close="show1 = false"
@select="leavaType2">
</u-action-sheet>
<u-action-sheet :show="show2" keyName="name" :actions="columns2" title="请选择" @close="show2 = false"
@select="leavaType3">
</u-action-sheet>
<u-action-sheet :show="show3" keyName="name" :actions="columns3" title="请选择" @close="show3 = false"
@select="leavaType4">
</u-action-sheet>
<u-action-sheet :show="show4" keyName="name" :actions="columns4" title="请选择" @close="show4 = false"
@select="leavaType5">
</u-action-sheet>
<u-action-sheet :show="show5" keyName="name" :actions="columns5" title="请选择" @close="show5 = false"
@select="leavaType6">
</u-action-sheet>
<u-button @click="submit">提交</u-button>
</view>
</view>
</template>
<script setup>
import {
ref,
reactive,
onMounted,
unref,
computed,
watch
} from 'vue';
import {
onLoad,
onReady
} from '@dcloudio/uni-app';
import {
Uploads
} from "@/api/upload.js"
import {
addland,
province,
city,
county,
towns,
villages,
groups
} from '@/api/api.js'
const form1 = ref(null);
const data = reactive({
formData: {
title: '',
area: '',
province_code: '',
city_code: '',
county_code: '',
address: '',
master_name: '',
master_phone: '',
pic: ['https://img0.baidu.com/it/u=1717510975,3258230326&fm=253&fmt=auto?w=120&h=80',
'https://img0.baidu.com/it/u=1717510975,3258230326&fm=253&fmt=auto?w=120&h=80'
]
},
rules: {
// name: [{
// required: true,
// message: '',
// //
// trigger: ['change', 'blur'],
// }],
// intro: [{
// min: 5,
// message: '5',
// trigger: 'change'
// }],
title: [{
type: 'string',
required: true,
message: '请填写土地名称',
trigger: ['blur', 'change']
}],
area: [{
type: 'string',
required: true,
message: '请填写土地面积',
trigger: ['blur', 'change']
}],
province_code: [{
type: 'string',
required: true,
message: '请请选择所在省份',
trigger: 'change'
}],
city_code: [{
type: 'string',
required: true,
message: '请选择所在城市',
trigger: 'change'
}],
county_code: [{
type: 'string',
required: true,
message: '请选择所在区县',
trigger: 'change'
}],
address: [{
type: 'string',
required: true,
message: '请输入土地详细地址',
trigger: ['blur', 'change']
}],
master_name: [{
type: 'string',
required: true,
message: '请输入土地负责人名称',
trigger: ['blur', 'change']
}],
master_phone: [{
required: true,
message: '请输入手机号',
trigger: ['change', 'blur'],
},
{
validator: (rule, value, callback) => {
// truefalse
// uni.$u.test.mobile()truefalse
return uni.$u.test.mobile(value);
},
message: '手机号码不正确',
// blurchange
trigger: ['change', 'blur'],
}
],
}
});
const pic = reactive([]);
const province_name = ref(null)
const city_name = ref(null)
const county_name = ref(null)
const show = ref(false)
const show1 = ref(false)
const show2 = ref(false)
const columns = reactive([])
const columns1 = reactive([])
const columns2 = reactive([])
const provincen = () => {
province().then((res) => {
columns.splice(0, columns.length, ...res.data.map((step, index) => {
return {
name: step.province_name,
id: step.province_code,
};
}));
});
}
const cityn = (id) => {
city({
province_code: id
}).then((res) => {
columns1.splice(0, columns.length, ...res.data.map((step, index) => {
return {
name: step.city_name,
id: step.city_code,
};
}));
});
}
const countyn = (id) => {
county({
city_code: id
}).then((res) => {
columns2.splice(0, columns.length, ...res.data.map((step, index) => {
return {
name: step.county_name,
id: step.county_code,
};
}));
});
}
//
const delimg = (i) => {
pic.splice(i, 1);
}
//
const updateImgFn = async () => {
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
Uploads(res.tempFilePaths[0], 'img').then(res => {
// console.log(res)
if (res.code == 1) {
pic.push(res.data.url)
console.log(data.formData)
uni.$u.toast('上传成功')
}
}).catch(err => {
//console.log('err', err);
// uni.$u.toast('')
})
},
fail: function(err) {
//console.log('choose');
uni.$u.toast('添加失败')
}
});
// let res = await Uploads()
// data.formData.pic = res.data.image
}
//
const isshow1 = () => {
show.value = true
}
const isshow2 = () => {
show1.value = true
}
const isshow3 = () => {
show2.value = true
}
const isshow4 = () => {
show3.value = true
}
const isshow5 = () => {
show4.value = true
}
const isshow6 = () => {
show5.value = true
}
const leavaType1 = (e) => {
province_name.value = e.name
data.formData.province_code = e.id
cityn(e.id)
}
const leavaType2 = (e) => {
city_name.value = e.name
data.formData.city_code = e.id
countyn(e.id)
}
const leavaType3 = (e) => {
county_name.value = e.name
data.formData.county_code = e.id
}
const location = () => {
//#ifdef APP
uni.showLoading({
title: '获取位置中'
})
uni.getLocation({
type: 'gcj02',
geocode: true,
isHighAccuracy: true,
success: async (res) => {
// console.log(res)
data.formData.address = res.address.city + res.address.district + res.address.street + res
.address.streetNum + res.address.poiName
uni.hideLoading();
},
fail: (err) => {
uni.hideLoading();
console.log(err)
}
});
//#endif
//#ifdef H5
uni.$u.toast('暂不支持')
//#endif
}
onReady(() => {
form1.value.setRules(data.rules);
});
const submit = async () => {
try {
const valid = await form1.value.validate();
if (valid) {
// console.log('', data.formData);
if (pic.length == 0) {
uni.$u.toast('请上传图片')
return
}
data.formData.pic = JSON.stringify(pic)
//
addland(data.formData).then((res) => {
console.log(res)
if (res.code == 1) {
uni.navigateBack({
delta: 1
})
uni.$u.toast(res.msg)
// console.log('');
}
})
} else {
//
console.log('表单验证未通过');
}
} catch (error) {
//
console.error(error);
}
}
onLoad((options) => {
provincen()
})
</script>
<style lang="scss">
.card-li-tit {
margin-bottom: 20rpx;
}
.confim-btn {
margin: 0 auto;
width: 196.26rpx;
height: 66.59rpx;
/* border: ; */
border: #00A15E 1px solid;
color: #00A15E;
display: flex;
align-items: center;
justify-content: center;
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
}
.up-img {
width: 341.71rpx
}
.today-btn {
width: 588.79rpx;
background-color: #00A15E;
color: white;
position: fixed;
bottom: 40rpx;
/* transform: ; */
left: 50%;
transform: translateX(-50%);
background: linear-gradient(to right, #00A15E, #4CC593);
/* margin: 0 auto; */
}
.code-img {
background-color: #F4F4F4;
height: 350.47rpx;
position: relative;
margin-bottom: 100rpx;
.carime-icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
}
}
</style>

View File

@ -1,504 +0,0 @@
<template>
<view class="content">
<view class="card">
<u--form labelPosition="top" labelWidth='100' :model="formData" :rules="rules" ref="form">
<u-form-item label="土地名称" prop="formData.title" borderBottom ref='item1' required>
<up-input placeholder="请输入土地名称" border="surround" v-model="formData.title"></up-input>
</u-form-item>
<u-form-item label="土地面积" prop="formData.area" borderBottom required>
<up-input placeholder="请输入土地面积" border="surround" v-model="formData.area"></up-input>
</u-form-item>
<u-form-item label="所在省份" prop="formData.province_code" borderBottom required>
<up-input placeholder="请选择所在省份" border="surround" v-model="province_name" disabled="true"
@click="isshow1"></up-input>
</u-form-item>
<u-form-item label="所在城市" prop="formData.city_code" borderBottom required>
<up-input placeholder="请选择所在城市" border="surround" v-model="city_name" @click="isshow2"
disabled="true"></up-input>
</u-form-item>
<u-form-item label="所在区县" prop="formData.county_code" borderBottom required>
<up-input placeholder="请选择所在区县" border="surround" v-model="county_name" @click="isshow3"
disabled="true"></up-input>
</u-form-item>
<u-form-item label="所在镇街" prop="formData.town_code" borderBottom required>
<up-input placeholder="请选择所在镇街" border="surround" v-model="town_name" @click="isshow4"
disabled="true"></up-input>
</u-form-item>
<u-form-item label="所在乡村" prop="formData.village_code" borderBottom required>
<up-input placeholder="请选择所在乡村" border="surround" v-model="village_name" @click="isshow5"
disabled="true"></up-input>
</u-form-item>
<u-form-item label="所在小队" prop="formData.group_code" borderBottom required>
<up-input placeholder="请选择所在小队" border="surround" v-model="group_name" @click="isshow6"
disabled="true"></up-input>
</u-form-item>
<u-form-item label="土地负责人" prop="formData.master_name" borderBottom required>
<up-input placeholder="请输入土地负责人" border="surround" v-model="formData.master_name"></up-input>
</u-form-item>
<u-form-item label="负责人电话" prop="formData.master_phone" borderBottom required>
<up-input placeholder="请输入负责人电话" type="number" border="surround"
v-model="formData.master_phone"></up-input>
</u-form-item>
<view class="card-li">
<view class="card-li-tit">
土地图片
</view>
<view class="code-img">
<view class="" @click="updateImgFn">
<view class="" v-if="formData.pic">
<u-image :src="formData.buy_cert" width="637.85rpx" height="350.47rpx"></u-image>
</view>
<view class="carime-icon" v-else>
<u-image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u-image>
<view class="">
点击上传图片
</view>
</view>
</view>
</view>
</view>
</u--form>
</view>
<u-action-sheet :show="show" keyName="name" closeOnClickOverlay :actions="columns" title="请选择"
@close="show = false" @select="leavaType1">
</u-action-sheet>
<u-action-sheet :show="show1" keyName="name" :actions="columns1" title="请选择" @close="show1 = false"
@select="leavaType2">
</u-action-sheet>
<u-action-sheet :show="show2" keyName="name" :actions="columns2" title="请选择" @close="show2 = false"
@select="leavaType3">
</u-action-sheet>
<u-action-sheet :show="show3" keyName="name" :actions="columns3" title="请选择" @close="show3 = false"
@select="leavaType4">
</u-action-sheet>
<u-action-sheet :show="show4" keyName="name" :actions="columns4" title="请选择" @close="show4 = false"
@select="leavaType5">
</u-action-sheet>
<u-action-sheet :show="show5" keyName="name" :actions="columns5" title="请选择" @close="show5 = false"
@select="leavaType6">
</u-action-sheet>
<!-- <view class="up-img confim-btn">
+上传播种图片
</view> -->
<view class="confirm">
<view class="confirm-btn" style="color: white;background-color: #0AA565;" @click="addFn">
完成添加
</view>
</view>
<!-- <view class="today-btn confim-btn" @tap="sowFn">
今日播种
</view> -->
</view>
</template>
<script setup>
import uplodeImg from "@/utils/uplodeImg.js"
import {
reactive,
ref
} from "vue";
import {
onLoad,
onReady
} from "@dcloudio/uni-app"
import {
addland,
province,
city,
county,
towns,
villages,
groups
} from '@/api/api.js'
const form = ref(null);
const formData = ref({
title: '',
area: '',
province_code: '',
city_code: '',
county_code: '',
code: '',
village_code: '',
group_code: '',
master_name: '',
master_phone: ''
})
const rules = reactive({
title: {
type: 'string',
required: true,
message: '请填写土地名称',
trigger: ['blur']
},
area: {
type: 'string',
required: true,
message: '请填写土地面积',
trigger: ['blur', 'change']
},
province_code: {
type: 'string',
required: true,
message: '请请选择所在省份',
trigger: ['blur', 'change']
},
city_code: {
type: 'string',
required: true,
message: '请选择所在城市',
trigger: ['blur', 'change']
},
county_code: {
type: 'string',
required: true,
message: '请选择所在区县',
trigger: ['blur', 'change']
},
town_code: {
type: 'string',
required: true,
message: '请选择所在镇街',
trigger: ['blur', 'change']
},
village_code: {
type: 'string',
required: true,
message: '请选择所在乡村',
trigger: ['blur', 'change']
},
group_code: {
type: 'string',
required: true,
message: '请选择小队',
trigger: ['blur', 'change']
},
master_name: {
type: 'string',
required: true,
message: '请天下负责人',
trigger: ['blur', 'change']
},
master_phone: [{
required: true,
message: '请输入手机号',
trigger: ['change', 'blur'],
},
{
//
validator: (rule, value, callback) => {
// truefalse
// this.$u.test.mobile()truefalse
// return this.$u.test.mobile(value);
},
message: '手机号码不正确',
// blurchange
trigger: ['change', 'blur'],
}
],
})
const province_name = ref(null)
const city_name = ref(null)
const county_name = ref(null)
const town_name = ref(null)
const village_name = ref(null)
const group_name = ref(null)
const show = ref(false)
const show1 = ref(false)
const show2 = ref(false)
const show3 = ref(false)
const show4 = ref(false)
const show5 = ref(false)
const columns = reactive([])
const columns1 = reactive([])
const columns2 = reactive([])
const columns3 = reactive([])
const columns4 = reactive([])
const columns5 = reactive([])
const provincen = () => {
province().then((res) => {
columns.splice(0, columns.length, ...res.data.map((step, index) => {
return {
name: step.province_name,
id: step.province_code,
};
}));
});
}
const cityn = (id) => {
console.log(id)
city({
province_code: id
}).then((res) => {
columns1.splice(0, columns.length, ...res.data.map((step, index) => {
return {
name: step.city_name,
id: step.city_code,
};
}));
});
}
const countyn = (id) => {
county({
city_code: id
}).then((res) => {
columns2.splice(0, columns.length, ...res.data.map((step, index) => {
return {
name: step.county_name,
id: step.county_code,
};
}));
});
}
const townsn = (id) => {
towns({
county_code: id
}).then((res) => {
columns3.splice(0, columns.length, ...res.data.map((step, index) => {
return {
name: step.town_name,
id: step.town_code,
};
}));
});
}
const villagesn = (id) => {
villages({
town_code: id
}).then((res) => {
columns4.splice(0, columns.length, ...res.data.map((step, index) => {
return {
name: step.village_name,
id: step.village_code,
};
}));
});
}
const groupsn = () => {
groups().then((res) => {
columns5.splice(0, columns.length, ...res.data.map((step, index) => {
return {
name: step.group_name,
id: step.group_code,
};
}));
});
}
//
const isshow1 = () => {
show.value = true
}
const isshow2 = () => {
show1.value = true
}
const isshow3 = () => {
show2.value = true
}
const isshow4 = () => {
show3.value = true
}
const isshow5 = () => {
show4.value = true
}
const isshow6 = () => {
show5.value = true
}
const leavaType1 = (e) => {
console.log('Received value:', e)
province_name.value = e.name
formData.province_code = e.id
cityn(e.id)
}
const leavaType2 = (e) => {
city_name.value = e.name
formData.city_code = e.id
countyn(e.id)
}
const leavaType3 = (e) => {
county_name.value = e.name
formData.county_code = e.id
townsn(e.id)
}
const leavaType4 = (e) => {
town_name.value = e.name
formData.town_code = e.id
villagesn(e.id)
}
const leavaType5 = (e) => {
village_name.value = e.name
formData.village_code = e.id
groupsn()
}
const leavaType6 = (e) => {
group_name.value = e.name
formData.group_code = e.id
}
const navgo = (url) => {
uni.navigateTo({
url
})
}
const addFn = () => {
console.log('11111');
form.value.validate((valid) => {
console.log(valid);
if (valid) {
uni.showToast({
icon: "none",
title: "表单验证通过"
})
addland(this.formData).then((res) => {
console.log(res)
})
} else {
uni.$u.toast('校验失败')
}
})
// form.value.validate().then(res => {
// console.log(6)
// }).catch(errors => {
// uni.$u.toast('')
// })
// console.log()
// return
// this.$refs.form.validate(valid).then(res => {
// console.log(valid)
// uni.$u.toast('')
// }).catch(errors => {
// uni.$u.toast('')
// })
// navgo('/pages/index/index')
}
const updateImgFn = async () => {
let res = await uplodeImg()
formData.buy_cert = res.data.image
}
onLoad((options) => {
provincen()
})
</script>
<style lang='scss' scoped>
.tit {
display: flex;
justify-content: space-between;
}
.card-li-tit {
margin-bottom: 20rpx;
}
.confim-btn {
margin: 0 auto;
width: 196.26rpx;
height: 66.59rpx;
/* border: ; */
border: #00A15E 1px solid;
color: #00A15E;
display: flex;
align-items: center;
justify-content: center;
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
}
.up-img {
width: 341.71rpx
}
.today-btn {
width: 588.79rpx;
background-color: #00A15E;
color: white;
position: fixed;
bottom: 40rpx;
/* transform: ; */
left: 50%;
transform: translateX(-50%);
background: linear-gradient(to right, #00A15E, #4CC593);
/* margin: 0 auto; */
}
.code-img {
background-color: #F4F4F4;
height: 350.47rpx;
position: relative;
margin-bottom: 100rpx;
.carime-icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
}
}
.confirm {
position: fixed;
height: 84.11rpx;
display: flex;
bottom: 30rpx;
width: 750rpx;
.confirm-btn {
width: 315.42rpx;
height: 84.11rpx;
border: #00A15E 1px solid;
margin: 0 auto;
border-radius: 80rpx;
text-align: center;
line-height: 84rpx;
}
}
</style>

View File

@ -1,403 +0,0 @@
<template>
<view class="content">
<view class="card">
<u-form labelPosition="top" labelWidth='100' :model="data.formData" ref="form1">
<!-- <u-form-item label="姓名" prop="name"><u-input v-model="data.formData.name" /></u-form-item>
<u-form-item label="简介" prop="intro"><u-input v-model="data.formData.intro" /></u-form-item> -->
<u-form-item label="土地名称" prop="title" borderBottom ref='item1' required>
<up-input placeholder="请输入土地名称" border="surround" v-model="data.formData.title"></up-input>
</u-form-item>
<u-form-item label="土地面积" prop="area" borderBottom required>
<up-input placeholder="请输入土地面积" border="surround" v-model="data.formData.area"></up-input>
</u-form-item>
<u-form-item label="所在省份" prop="province_code" borderBottom required>
<up-input placeholder="请选择所在省份" border="surround" v-model="province_name" disabled="true"
@click="isshow1"></up-input>
</u-form-item>
<u-form-item label="所在城市" prop="city_code" borderBottom required>
<up-input placeholder="请选择所在城市" border="surround" v-model="city_name" @click="isshow2"
disabled="true"></up-input>
</u-form-item>
<u-form-item label="所在区县" prop="county_code" borderBottom required>
<up-input placeholder="请选择所在区县" border="surround" v-model="county_name" @click="isshow3"
disabled="true"></up-input>
</u-form-item>
<u-form-item label="所在镇街" prop="town_code" borderBottom required>
<up-input placeholder="请选择所在镇街" border="surround" v-model="town_name" @click="isshow4"
disabled="true"></up-input>
</u-form-item>
<u-form-item label="所在乡村" prop="village_code" borderBottom required>
<up-input placeholder="请选择所在乡村" border="surround" v-model="village_name" @click="isshow5"
disabled="true"></up-input>
</u-form-item>
<u-form-item label="所在小队" prop="group_code" borderBottom required>
<up-input placeholder="请选择所在小队" border="surround" v-model="group_name" @click="isshow6"
disabled="true"></up-input>
</u-form-item>
<u-form-item label="土地负责人" prop="master_name" borderBottom required>
<up-input placeholder="请输入土地负责人" border="surround" v-model="data.formData.master_name"></up-input>
</u-form-item>
<u-form-item label="负责人电话" prop="master_phone" borderBottom required>
<up-input placeholder="请输入负责人电话" type="number" border="surround"
v-model="data.formData.master_phone"></up-input>
</u-form-item>
<view class="card-li">
<view class="card-li-tit">
土地图片
</view>
<view class="code-img">
<view class="" @click="updateImgFn">
<view class="" v-if="data.formData.pic">
<u-image :src="data.formData.pic" width="637.85rpx" height="350.47rpx"></u-image>
</view>
<view class="carime-icon" v-else>
<u-image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u-image>
<view class="">
点击上传图片
</view>
</view>
</view>
</view>
</view>
</u-form>
<u-action-sheet :show="show" keyName="name" closeOnClickOverlay :actions="columns" title="请选择"
@close="show = false" @select="leavaType1">
</u-action-sheet>
<u-action-sheet :show="show1" keyName="name" :actions="columns1" title="请选择" @close="show1 = false"
@select="leavaType2">
</u-action-sheet>
<u-action-sheet :show="show2" keyName="name" :actions="columns2" title="请选择" @close="show2 = false"
@select="leavaType3">
</u-action-sheet>
<u-action-sheet :show="show3" keyName="name" :actions="columns3" title="请选择" @close="show3 = false"
@select="leavaType4">
</u-action-sheet>
<u-action-sheet :show="show4" keyName="name" :actions="columns4" title="请选择" @close="show4 = false"
@select="leavaType5">
</u-action-sheet>
<u-action-sheet :show="show5" keyName="name" :actions="columns5" title="请选择" @close="show5 = false"
@select="leavaType6">
</u-action-sheet>
<u-button @click="submit">提交</u-button>
</view>
</template>
<script setup>
import {
ref,
reactive,
onMounted,
unref,
computed,
watch
} from 'vue';
import {
onLoad,
onReady
} from '@dcloudio/uni-app';
import {
addland,
province,
city,
county,
towns,
villages,
groups
} from '@/api/api.js'
const form1 = ref();
const data = reactive({
formData: {
title: '',
area: '',
province_code: '',
city_code: '',
county_code: '',
town_code: '',
village_code: '',
group_code: '',
master_name: '',
master_phone: ''
},
rules: {
// name: [{
// required: true,
// message: '',
// //
// trigger: ['change', 'blur'],
// }],
// intro: [{
// min: 5,
// message: '5',
// trigger: 'change'
// }],
title: [{
type: 'string',
required: true,
message: '请填写土地名称',
trigger: ['blur', 'change']
}],
area: [{
type: 'string',
required: true,
message: '请填写土地面积',
trigger: ['blur', 'change']
}],
province_code: [{
type: 'string',
required: true,
message: '请请选择所在省份',
trigger: 'change'
}],
city_code: [{
type: 'string',
required: true,
message: '请选择所在城市',
trigger: 'change'
}],
county_code: [{
type: 'string',
required: true,
message: '请选择所在区县',
trigger: 'change'
}],
town_code: [{
type: 'string',
required: true,
message: '请选择所在镇街',
trigger: 'change'
}],
village_code: [{
type: 'string',
required: true,
message: '请选择所在乡村',
trigger: 'change'
}],
group_code: [{
type: 'string',
required: true,
message: '请选择小队',
trigger: 'change'
}],
master_name: [{
type: 'string',
required: true,
message: '请天下负责人',
trigger: ['blur', 'change']
}],
master_phone: [{
required: true,
message: '请输入手机号',
trigger: ['change', 'blur'],
},
{
//
validator: (rule, value, callback) => {
// truefalse
// this.$u.test.mobile()truefalse
// return this.$u.test.mobile(value);
},
message: '手机号码不正确',
// blurchange
trigger: ['change', 'blur'],
}
],
}
});
const province_name = ref(null)
const city_name = ref(null)
const county_name = ref(null)
const town_name = ref(null)
const village_name = ref(null)
const group_name = ref(null)
const show = ref(false)
const show1 = ref(false)
const show2 = ref(false)
const show3 = ref(false)
const show4 = ref(false)
const show5 = ref(false)
const columns = reactive([])
const columns1 = reactive([])
const columns2 = reactive([])
const columns3 = reactive([])
const columns4 = reactive([])
const columns5 = reactive([])
const provincen = () => {
province().then((res) => {
columns.splice(0, columns.length, ...res.data.map((step, index) => {
return {
name: step.province_name,
id: step.province_code,
};
}));
});
}
const cityn = (id) => {
console.log(id)
city({
province_code: id
}).then((res) => {
columns1.splice(0, columns.length, ...res.data.map((step, index) => {
return {
name: step.city_name,
id: step.city_code,
};
}));
});
}
const countyn = (id) => {
county({
city_code: id
}).then((res) => {
columns2.splice(0, columns.length, ...res.data.map((step, index) => {
return {
name: step.county_name,
id: step.county_code,
};
}));
});
}
const townsn = (id) => {
towns({
county_code: id
}).then((res) => {
columns3.splice(0, columns.length, ...res.data.map((step, index) => {
return {
name: step.town_name,
id: step.town_code,
};
}));
});
}
const villagesn = (id) => {
villages({
town_code: id
}).then((res) => {
columns4.splice(0, columns.length, ...res.data.map((step, index) => {
return {
name: step.village_name,
id: step.village_code,
};
}));
});
}
const groupsn = () => {
groups().then((res) => {
columns5.splice(0, columns.length, ...res.data.map((step, index) => {
return {
name: step.group_name,
id: step.group_code,
};
}));
});
}
//
const isshow1 = () => {
show.value = true
}
const isshow2 = () => {
show1.value = true
}
const isshow3 = () => {
show2.value = true
}
const isshow4 = () => {
show3.value = true
}
const isshow5 = () => {
show4.value = true
}
const isshow6 = () => {
show5.value = true
}
const leavaType1 = (e) => {
console.log('Received value:', e)
province_name.value = e.name
data.formData.province_code = e.id
cityn(e.id)
}
const leavaType2 = (e) => {
city_name.value = e.name
data.formData.city_code = e.id
countyn(e.id)
}
const leavaType3 = (e) => {
county_name.value = e.name
data.formData.county_code = e.id
townsn(e.id)
}
const leavaType4 = (e) => {
town_name.value = e.name
data.formData.town_code = e.id
villagesn(e.id)
}
const leavaType5 = (e) => {
village_name.value = e.name
data.formData.village_code = e.id
}
const leavaType6 = (e) => {
console.log(e)
group_name.value = e.name
data.formData.group_code = e.id.toString()
}
onReady(() => {
form1.value.setRules(data.rules);
});
const submit = (e) => {
form1.value.validate(valid => {
console.log(valid)
if (valid) {
uni.showToast({
title: "验证通过",
icon: 'none'
});
console.log('验证通过');
} else {
console.log('验证失败');
}
});
}
onLoad((options) => {
provincen()
groupsn()
})
</script>

View File

@ -3,59 +3,68 @@
<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="type" borderBottom required @click="showggai">
<up-input placeholder="请输入杀虫剂种类" :disabled="mode=='detail'" border="surround" <!-- <uni-data-select v-model="formData.type" :disabled="mode=='detail'"
v-model="formData.kind"></up-input> :localdata="range"></uni-data-select> -->
<up-input placeholder="请选择疫苗名称" readonly border="surround" v-model="formDatatype"
style="pointer-events: none;"></up-input>
</u-form-item> </u-form-item>
<u-form-item label="杀虫剂品牌" prop="breed" borderBottom required> <u-form-item label="疫苗厂家" prop="type" borderBottom required @click="showggai">
<up-input placeholder="请输入杀虫剂品牌" :disabled="mode=='detail'" border="surround" <!-- <uni-data-select v-model="formData.type" :disabled="mode=='detail'"
v-model="formData.breed"></up-input> :localdata="range"></uni-data-select> -->
</u-form-item> <up-input placeholder="请输入疫苗厂家" :disabled="mode=='detail'" type="number" border="surround"
<u-form-item label="杀虫剂用量" prop="dosage" borderBottom required>
<up-input placeholder="请输入杀虫剂用量" border="surround" :disabled="mode=='detail'"
v-model="formData.dosage"></up-input>
</u-form-item>
<view class="" v-if="mode=='add'">
<u-form-item label="开始日期" @click="openDate" prop="start_date" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround"
v-model="formData.start_date" style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="结束日期" prop="end_date" @click="openDate1" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround"
v-model="formData.end_date" style="pointer-events: none;"></up-input>
</u-form-item>
</view>
<view class="" v-else>
<u-form-item label="开始日期" prop="start_date" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround"
v-model="formData.start_date" style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="结束日期" prop="end_date" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround"
v-model="formData.end_date" style="pointer-events: none;"></up-input>
</u-form-item>
</view>
<u-form-item label="作业面积" prop="area" borderBottom required>
<up-input placeholder="请输入作业面积" :disabled="mode=='detail'" type="number" border="surround"
v-model="formData.area"></up-input> v-model="formData.area"></up-input>
</u-form-item> </u-form-item>
<u-form-item label="参与人" prop="user" borderBottom required> <u-form-item label="疫苗批次号" prop="type" borderBottom required @click="showggai">
<up-input placeholder="请输入参与人" :disabled="mode=='detail'" type="txt" border="surround" <!-- <uni-data-select v-model="formData.type" :disabled="mode=='detail'"
:localdata="range"></uni-data-select> -->
<up-input placeholder="请输入疫苗批次号" :disabled="mode=='detail'" type="number" border="surround"
v-model="formData.area"></up-input>
</u-form-item>
<view class="" v-if="mode=='add'">
<u-form-item label="疫苗接种日期" @click="openDate" prop="start_date" borderBottom required>
<up-input placeholder="疫苗接种日期" readonly border="surround" v-model="formData.start_date"
style="pointer-events: none;"></up-input>
</u-form-item>
</view>
<view class="" v-else>
<u-form-item label="疫苗接种日期" prop="start_date" borderBottom required>
<up-input placeholder="疫苗接种日期" readonly border="surround" v-model="formData.start_date"
style="pointer-events: none;"></up-input>
</u-form-item>
</view>
<u-form-item label="疫苗接种方式" prop="type" borderBottom required>
<uni-data-select v-model="formData.type" :localdata="range1"></uni-data-select>
</u-form-item>
<u-form-item label="疫苗接种部位" prop="type" borderBottom required>
<uni-data-select v-model="formData.type" :localdata="range2"></uni-data-select>
</u-form-item>
<u-form-item label="免疫有限期" prop="end_date" @click="openDate1" borderBottom required>
<up-input placeholder="免疫有限期" readonly border="surround" v-model="formData.end_date"
style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="疫苗注射人员" prop="user" borderBottom required>
<up-input placeholder="请输入疫苗注射人员" :disabled="mode=='detail'" type="txt" border="surround"
v-model="formData.user"></up-input> v-model="formData.user"></up-input>
</u-form-item> </u-form-item>
<view class="card-li"> <view class="card-li">
<view class="card-li-tit"> <view class="card-li-tit">
杀虫图片 疫苗图片
</view> </view>
<view class="code-img1"> <view class="code-img1">
<view class="" v-if="pic.length>0" <view class="" v-if="pic.length>0"
style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;"> style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;">
<view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;"> <view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;">
<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)"
@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" @click="perviewFn(item)"></u-image> <u-image :src="item" width="150.85rpx" height="150.85rpx"
@click="perviewFn(item)"></u-image>
</view> </view>
</view> </view>
</view> </view>
@ -80,16 +89,20 @@
</u--form> </u--form>
<view> <view>
<!-- <uni-calendar ref="calendar" :showMonth="true" :lunar="true" :insert="false" @confirm="dateConfirmfn" /> <!-- <uni-calendar ref="calendar" :showMonth="true" :lunar="true" :insert="false" @confirm="dateConfirmfn" />
<uni-calendar ref="calendar1" :showMonth="true" :lunar="true" :insert="false" <uni-calendar ref="calendar1" :showMonth="true" :lunar="true" :insert="false"
@confirm="dateConfirmfn1" /> --> @confirm="dateConfirmfn1" /> -->
<u-datetime-picker :show="show1" v-model="value1" mode="datetime" @confirm="dateConfirmfn" <u-datetime-picker :show="show1" v-model="value1" mode="datetime" @confirm="dateConfirmfn"
:formatter="formatter" @cancel="show1=false"></u-datetime-picker> :formatter="formatter" @cancel="show1=false"></u-datetime-picker>
<u-datetime-picker :show="show2" v-model="value1" mode="datetime" @confirm="dateConfirmfn1" <u-datetime-picker :show="show2" v-model="value1" mode="datetime" @confirm="dateConfirmfn1"
:formatter="formatter" @cancel="show2=false"></u-datetime-picker> :formatter="formatter" @cancel="show2=false"></u-datetime-picker>
<u-action-sheet :show="showgg" :actions="range" title="请选择灌溉方式" @close="showgg = false"
@select="ggSelect">
</u-action-sheet>
</view> </view>
</view> </view>
<view class="confirm" v-if="mode=='add'"> <view class="confirm" v-if="mode=='add'">
<view class="confirm-btn" style="color: white;background-color: #0AA565;" @click="addFn"> <view class="confirm-btn" style="color: white;background-color: #0AA565;" @click="addFn">
完成添加 完成添加
@ -113,17 +126,79 @@
} from "vue"; } from "vue";
import { import {
onLoad, onLoad,
onReady onReady,
} from '@dcloudio/uni-app';
} from "@dcloudio/uni-app"
import { import {
addaction addaction
} from '@/api/api.js' } from '@/api/api.js'
const range = reactive([{
value: 1,
name: "猪瘟疫苗"
},
{
value: 2,
name: "禽流感疫苗"
},
{
value: 3,
name: "口蹄疫疫苗"
},
{
value: 4,
name: "蓝耳病疫苗"
}, {
value: 5,
name: "新城疫疫苗"
}, {
value: 6,
name: "弓形虫病疫苗"
}, {
value: 7,
name: "猪乙型脑炎疫苗"
}, {
value: 8,
name: "禽痘疫苗"
}, {
value: 9,
name: "炭痘疫苗"
}, {
value: 10,
name: "布鲁氏菌病疫苗"
},
{
value: 11,
name: "结核病疼苗"
},
])
const range1 = reactive([{
value: 1,
text: "肌肉注射"
},
{
value: 2,
text: "皮下注射",
}
])
const range2 = reactive([{
value: 1,
text: "颈部",
},
{
value: 2,
text: "大腿"
}
])
const task_id = ref('');
const pic = reactive([]); const pic = reactive([]);
const calendar = ref(null) const calendar = ref(null)
const calendar1 = ref(null) const calendar1 = ref(null)
const formDatatype = ref('')
const showgg = ref(false)
const form = ref(null) const form = ref(null)
const task_id = ref('');
const value1 = ref(Date.now()); const value1 = ref(Date.now());
const show1 = ref(false); const show1 = ref(false);
const show2 = ref(false); const show2 = ref(false);
@ -132,58 +207,56 @@
show1.value = true show1.value = true
} }
const openDate1 = () => { const openDate1 = () => {
// calendar1.value.open() // calendar.value.open()
show2.value = true show2.value = true
} }
const formatter = (type, value) => {
if (type === 'year') {
return `${value}`;
}
if (type === 'month') {
return `${value}`;
}
if (type === 'day') {
return `${value}`;
}
return value;
};
// console.log() // console.log()
const formData = reactive({ const formData = reactive({
kind: "", type: "",
breed: "",
dosage: "",
start_date: "",
dosage: "",
end_date: "",
}) })
const formatter = (type, value) => { //
if (type === 'year') {
return `${value}`; const ggSelect = (e) => {
} formDatatype.value = e.name
if (type === 'month') { formData.type = e.value
return `${value}`; }
}
if (type === 'day') { //
return `${value}`; const showggai = () => {
} showgg.value = true
return value; }
};
// //
const dateConfirmfn = (e) => { const dateConfirmfn = (e) => {
formData.start_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ') formData.start_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
show1.value = false show1.value = false
} }
//
const dateConfirmfn1 = (e) => { const dateConfirmfn1 = (e) => {
formData.end_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ') formData.start_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
show2.value = false show1.value = false
} }
const rules = ref({ const rules = {
'kind': { 'type': {
type: 'string', type: 'number',
required: true, required: true,
message: '请填写杀虫剂品牌', message: '请选择灌溉方式',
trigger: ['blur', 'change'] trigger: ['change']
},
'breed': {
type: 'string',
required: true,
message: '请填写杀虫剂品牌',
trigger: ['blur', 'change']
},
'dosage': {
type: 'string',
required: true,
message: '请填写杀虫剂用量',
trigger: ['blur', 'change']
}, },
'start_date': { 'start_date': {
type: 'string', type: 'string',
@ -215,11 +288,53 @@ const formatter = (type, value) => {
message: '请填写备注', message: '请填写备注',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
}) }
onReady(() => { onReady(() => {
form.value.setRules(rules); form.value.setRules(rules);
}); });
const navgo = (url) => {
uni.navigateTo({
url
})
}
const addFn = () => {
// console.log(formData)
form.value.validate().then(res => {
if (res) {
formData.pic = pic
let data1 = {
plant_id: task_id.value,
type: 3,
detail: JSON.stringify(formData)
};
if (formData.pic.length == 0) {
uni.$u.toast('请上传图片')
return
}
//
addaction(data1).then((res) => {
console.log(res)
if (res.code == 1) {
uni.$u.toast(res.msg)
uni.navigateBack({
delta: 1
})
}
})
// uni.$u.toast('')
}
}).catch((err) => {
uni.$u.toast(err[0].message)
console.log(err)
})
}
// //
const perviewFn = (url) => { const perviewFn = (url) => {
console.log(url) console.log(url)
@ -266,59 +381,6 @@ const formatter = (type, value) => {
// data.formData.pic = res.data.image // data.formData.pic = res.data.image
} }
const navgo = (url) => {
uni.navigateTo({
url
})
}
const addFn = () => {
form.value.validate().then(res => {
console.log(res)
if (res) {
formData.pic = pic
let data1 = {
plant_id: task_id.value,
type: 4,
detail: JSON.stringify(formData)
};
if (formData.pic.length == 0) {
uni.$u.toast('请上传图片')
return
}
console.log('表单通过');
//
addaction(data1).then((res) => {
console.log(res)
if (res.code == 1) {
uni.$u.toast(res.msg)
uni.navigateBack({
delta: 1
})
}
})
// uni.$u.toast('')
}
}).catch((err)=>{
uni.$u.toast(err[0].message)
console.log(err)
})
}
const mode = ref('add') const mode = ref('add')
onLoad((options) => { onLoad((options) => {
if (options.task) { if (options.task) {
@ -326,15 +388,14 @@ const formatter = (type, value) => {
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;
mode.value = 'detail' mode.value = 'detail'
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '虫害防治信息详情' title: '灌溉详情'
}) })
// formData=data.detail // formData=data.detail
} else { } else {
task_id.value = options.id task_id.value = options.id
} }
@ -345,6 +406,9 @@ const formatter = (type, value) => {
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
page{
background-color: #fff;
}
.content { .content {
padding-bottom: 100rpx; padding-bottom: 100rpx;
} }

View File

@ -3,57 +3,51 @@
<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="type" borderBottom required @click="showggai">
<up-input placeholder="请输入肥料种类" :disabled="mode=='detail'" border="surround" <!-- <uni-data-select v-model="formData.type" :disabled="mode=='detail'"
v-model="formData.kind"></up-input> :localdata="range"></uni-data-select> -->
<up-input placeholder="请选择饲料类型" readonly border="surround" v-model="formDatatype"
style="pointer-events: none;"></up-input>
</u-form-item> </u-form-item>
<u-form-item label="肥料品牌" prop="breed" borderBottom required> <u-form-item label="饲料品牌" prop="type" borderBottom required @click="showggai">
<up-input placeholder="请输入肥料品牌" :disabled="mode=='detail'" border="surround" <!-- <uni-data-select v-model="formData.type" :disabled="mode=='detail'"
v-model="formData.breed"></up-input> :localdata="range"></uni-data-select> -->
</u-form-item> <up-input placeholder="请输入饲料品牌" :disabled="mode=='detail'" type="number" border="surround"
<u-form-item label="肥料用量" prop="dosage" borderBottom required>
<up-input placeholder="请输入肥料用量" border="surround" :disabled="mode=='detail'"
v-model="formData.dosage"></up-input>
</u-form-item>
<view class="" v-if="mode=='add'">
<u-form-item label="开始日期" @click="openDate" prop="start_date" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround" v-model="formData.start_date"
style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="结束日期" prop="end_date" @click="openDate1" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround" v-model="formData.end_date"
style="pointer-events: none;"></up-input>
</u-form-item>
</view>
<view class="" v-else>
<u-form-item label="开始日期" prop="start_date" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround" v-model="formData.start_date"
style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="结束日期" prop="end_date" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround" v-model="formData.end_date"
style="pointer-events: none;"></up-input>
</u-form-item>
</view>
<u-form-item label="作业面积" prop="area" borderBottom required>
<up-input placeholder="请输入作业面积" :disabled="mode=='detail'" type="number" border="surround"
v-model="formData.area"></up-input> v-model="formData.area"></up-input>
</u-form-item> </u-form-item>
<u-form-item label="参与人" prop="user" borderBottom required> <u-form-item label="饲料消耗量" prop="type" borderBottom required @click="showggai">
<up-input placeholder="请输入参与人" :disabled="mode=='detail'" type="txt" border="surround" <!-- <uni-data-select v-model="formData.type" :disabled="mode=='detail'"
:localdata="range"></uni-data-select> -->
<up-input placeholder="请输入饲料消耗量" :disabled="mode=='detail'" type="number" border="surround"
v-model="formData.area"></up-input>
</u-form-item>
<view class="" v-if="mode=='add'">
<u-form-item label="喂食时间" @click="openDate" prop="start_date" borderBottom required>
<up-input placeholder="喂食时间" readonly border="surround" v-model="formData.start_date"
style="pointer-events: none;"></up-input>
</u-form-item>
</view>
<view class="" v-else>
<u-form-item label="喂食时间" prop="start_date" borderBottom required>
<up-input placeholder="喂食时间" readonly border="surround" v-model="formData.start_date"
style="pointer-events: none;"></up-input>
</u-form-item>
</view>
<u-form-item label="喂食人员" prop="user" borderBottom required>
<up-input placeholder="请输入喂食人员" :disabled="mode=='detail'" type="txt" border="surround"
v-model="formData.user"></up-input> v-model="formData.user"></up-input>
</u-form-item> </u-form-item>
<view class="card-li"> <view class="card-li">
<view class="card-li-tit"> <view class="card-li-tit">
施肥图片 喂食图片
</view> </view>
<view class="code-img1"> <view class="code-img1">
<view class="" v-if="pic.length>0" <view class="" v-if="pic.length>0"
style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;"> style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;">
<view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;"> <view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;">
<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>
@ -88,12 +82,14 @@
@confirm="dateConfirmfn1" /> --> @confirm="dateConfirmfn1" /> -->
<u-datetime-picker :show="show1" v-model="value1" mode="datetime" @confirm="dateConfirmfn" <u-datetime-picker :show="show1" v-model="value1" mode="datetime" @confirm="dateConfirmfn"
:formatter="formatter" @cancel="show1=false"></u-datetime-picker> :formatter="formatter" @cancel="show1=false"></u-datetime-picker>
<u-datetime-picker :show="show2" v-model="value1" mode="datetime" @confirm="dateConfirmfn1"
:formatter="formatter" @cancel="show2=false"></u-datetime-picker> <u-action-sheet :show="showgg" :actions="range" title="请选择灌溉方式" @close="showgg = false"
@select="ggSelect">
</u-action-sheet>
</view> </view>
</view> </view>
<view class="confirm" v-if="mode=='add'"> <view class="confirm" v-if="mode=='add'">
<view class="confirm-btn" style="color: white;background-color: #0AA565;" @click="addFn"> <view class="confirm-btn" style="color: white;background-color: #0AA565;" @click="addFn">
完成添加 完成添加
@ -117,65 +113,94 @@
} from "vue"; } from "vue";
import { import {
onLoad, onLoad,
onReady onReady,
} from '@dcloudio/uni-app';
} from "@dcloudio/uni-app"
import { import {
addaction addaction
} from '@/api/api.js' } from '@/api/api.js'
const range = reactive([{
value: 1,
name: "植物性饲料"
},
{
value: 2,
name: "动物性词料"
},
{
value: 3,
name: "矿物质饲料"
},
{
value: 4,
name: "添加剂饲料"
}, {
value: 5,
name: "全价配合饲料"
}, {
value: 6,
name: "青贮饲料"
},
])
const task_id = ref('');
const pic = reactive([]); const pic = reactive([]);
const calendar = ref(null) const calendar = ref(null)
const calendar1 = ref(null) const calendar1 = ref(null)
const formDatatype = ref('')
const showgg = ref(false)
const form = ref(null) const form = ref(null)
const task_id = ref('');
const value1 = ref(Date.now()); const value1 = ref(Date.now());
const show1 = ref(false); const show1 = ref(false);
const show2 = ref(false);
const openDate = () => { const openDate = () => {
// calendar.value.open() // calendar.value.open()
show1.value = true show1.value = true
} }
const openDate1 = () => {
// calendar1.value.open() const formatter = (type, value) => {
show2.value = true if (type === 'year') {
} return `${value}`;
}
if (type === 'month') {
return `${value}`;
}
if (type === 'day') {
return `${value}`;
}
return value;
};
// console.log() // console.log()
const formData = reactive({ const formData = reactive({
kind: "", type: "",
breed: "",
dosage: "",
start_date: "",
dosage: "",
end_date: "",
}) })
//
const ggSelect = (e) => {
formDatatype.value = e.name
formData.type = e.value
}
//
const showggai = () => {
showgg.value = true
}
//
const dateConfirmfn = (e) => { const dateConfirmfn = (e) => {
formData.start_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ') formData.start_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
show1.value = false show1.value = false
} }
const dateConfirmfn1 = (e) => {
formData.end_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ') const rules = {
show2.value = false 'type': {
} type: 'number',
const rules = ref({
'kind': {
type: 'string',
required: true, required: true,
message: '请填写肥料种类', message: '请选择灌溉方式',
trigger: ['blur', 'change'] trigger: ['change']
},
'breed': {
type: 'string',
required: true,
message: '请填写肥料品牌',
trigger: ['blur', 'change']
},
'dosage': {
type: 'string',
required: true,
message: '请填写肥料用量',
trigger: ['blur', 'change']
}, },
'start_date': { 'start_date': {
type: 'string', type: 'string',
@ -207,23 +232,64 @@
message: '请填写备注', message: '请填写备注',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
}) }
onReady(() => { onReady(() => {
form.value.setRules(rules); form.value.setRules(rules);
}); });
const formatter = (type, value) => { const navgo = (url) => {
if (type === 'year') { uni.navigateTo({
return `${value}`; url
} })
if (type === 'month') { }
return `${value}`; const addFn = () => {
} // console.log(formData)
if (type === 'day') { form.value.validate().then(res => {
return `${value}`; if (res) {
} formData.pic = pic
return value; let data1 = {
}; plant_id: task_id.value,
type: 3,
detail: JSON.stringify(formData)
};
if (formData.pic.length == 0) {
uni.$u.toast('请上传图片')
return
}
//
addaction(data1).then((res) => {
console.log(res)
if (res.code == 1) {
uni.$u.toast(res.msg)
uni.navigateBack({
delta: 1
})
}
})
// uni.$u.toast('')
}
}).catch((err) => {
uni.$u.toast(err[0].message)
console.log(err)
})
}
//
const perviewFn = (url) => {
console.log(url)
uni.previewImage({
urls: [url]
})
}
//
const delimg = (i) => {
pic.splice(i, 1);
}
// //
const updateImgFn = async () => { const updateImgFn = async () => {
@ -235,10 +301,9 @@
Uploads(res.tempFilePaths[0], 'img').then(res => { Uploads(res.tempFilePaths[0], 'img').then(res => {
console.log(res) console.log(res)
if (res.code == 1) { if (res.code == 1) {
pic.push(res.data.url) pic.push(res.data.url)
console.log(data.formData)
console.log(pic)
uni.$u.toast('上传成功') uni.$u.toast('上传成功')
@ -260,95 +325,21 @@
// data.formData.pic = res.data.image // data.formData.pic = res.data.image
} }
const navgo = (url) => {
uni.navigateTo({
url
})
}
const addFn = () => {
form.value.validate().then(res => {
// console.log(res)
if (res) {
formData.pic = pic
let data1 = {
plant_id: task_id.value,
type: 1,
detail: JSON.stringify(formData)
};
if (formData.pic.length == 0) {
uni.$u.toast('请上传图片')
return
}
let endTime = new Date(formData.end_date)
let startTime = new Date(formData.start_date)
if (endTime < startTime) {
uni.$u.toast("结束时间不能小于开始时间");
return
} else if (startTime > endTime) {
uni.$u.toast("开始时间不能大于结束时间");
return
} else {
console.log("开始时间和结束时间合法");
}
console.log('表单通过');
//
addaction(data1).then((res) => {
console.log(res)
if (res.code == 1) {
uni.$u.toast(res.msg)
uni.navigateBack({
delta: 1
})
}
})
// uni.$u.toast('')
}
}).catch((err)=>{
uni.$u.toast(err[0].message)
console.log(err)
})
}
//
const perviewFn = (url) => {
uni.previewImage({
urls: [url]
})
}
//
const delimg = (i) => {
pic.splice(i, 1);
}
const mode = ref('add') const mode = ref('add')
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);
formDatatype.value = range.find(item => item.value === formData.type).name;
mode.value = 'detail' mode.value = 'detail'
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '施肥详情' title: '灌溉详情'
}) })
// formData=data.detail // formData=data.detail
} else { } else {
task_id.value = options.id task_id.value = options.id
} }
@ -359,6 +350,9 @@
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
page{
background-color: #fff;
}
.content { .content {
padding-bottom: 100rpx; padding-bottom: 100rpx;
} }

View File

@ -1,312 +0,0 @@
<template>
<!-- 播种 -->
<view class="content">
<view class="card">
<u--form labelPosition="top" labelWidth='100' :model="formData" :rules="rules" ref="form">
<!-- <u-form-item label="作业地块" prop="formData.breed" borderBottom required>
<up-input placeholder="请输入作业地块" :disabled="mode=='detail'" border="surround"
v-model="formData.breed"></up-input>
</u-form-item>
<u-form-item label="作业面积" prop="formData.breed" borderBottom required>
<up-input placeholder="请输入作业面积" :disabled="mode=='detail'" type="number" border="surround"
v-model="formData.breed"></up-input>
</u-form-item> -->
<u-form-item label="参与人" prop="user" borderBottom required>
<up-input placeholder="请输入参与人" :disabled="mode=='detail'" type="txt" border="surround"
v-model="formData.user"></up-input>
</u-form-item>
<view class="card-li">
<view class="card-li-tit">
收获图片
</view>
<view class="code-img1">
<view class="" v-if="pic.length>0"
style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;">
<view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;">
<view class="">
<u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)"
v-show="mode=='add'"></u-icon>
<u-image :src="item" width="150.85rpx" height="150.85rpx" @click="perviewFn(item)"></u-image>
</view>
</view>
</view>
</view>
<view class="code-img" v-if="mode=='add'">
<view class="" @click="updateImgFn">
<view class="carime-icon">
<u-image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u-image>
<view class="">
点击上传图片
</view>
</view>
</view>
</view>
</view>
<u-form-item label="备注" prop="remark" borderBottom required>
<u--textarea v-model="formData.remark" :disabled="mode=='detail'" placeholder="请输入内容"></u--textarea>
</u-form-item>
</u--form>
</view>
<view class="confirm" v-if="mode=='add'">
<view class="confirm-btn" style="color: white;background-color: #0AA565;" @click="addFn">
完成添加
</view>
</view>
</view>
</template>
<script setup>
import {
Uploads
} from "@/api/upload.js"
import {
reactive,
ref
} from "vue";
import {
onLoad,
onReady
} from "@dcloudio/uni-app"
import {
addaction
} from '@/api/api.js'
const form = ref(null)
const task_id = ref('');
const pic = reactive([]);
const formData = reactive({
user: "",
remark: "",
pic: []
})
const dateConfirmfn = (e) => {
console.log(e)
}
const rules = {
'user': {
type: 'string',
required: true,
message: '请填写参与人',
trigger: ['blur', 'change']
},
'remark': {
type: 'string',
required: true,
message: '请填写备注',
trigger: ['blur', 'change']
},
}
onReady(() => {
form.value.setRules(rules);
});
const navgo = (url) => {
uni.navigateTo({
url
})
}
const addFn = () => {
form.value.validate().then(res => {
console.log(res)
if (res) {
formData.pic = pic
let data1 = {
plant_id: task_id.value,
type: 5,
detail: JSON.stringify(formData)
};
if (formData.pic.length == 0) {
uni.$u.toast('请上传图片')
return
}
console.log('表单通过');
//
addaction(data1).then((res) => {
console.log(res)
if (res.code == 1) {
uni.$u.toast(res.msg)
uni.navigateBack({
delta: 1
})
}
})
// uni.$u.toast('')
}
}).catch((err)=>{
uni.$u.toast(err[0].message)
console.log(err)
})
}
//
const perviewFn = (url) => {
uni.previewImage({
urls: [url]
})
}
//
const delimg = (i) => {
pic.splice(i, 1);
}
//
const updateImgFn = async () => {
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
Uploads(res.tempFilePaths[0], 'img').then(res => {
console.log(res)
if (res.code == 1) {
pic.push(res.data.url)
console.log(data.formData)
uni.$u.toast('上传成功')
}
}).catch(err => {
//console.log('err', err);
// uni.$u.toast('')
})
},
fail: function(err) {
//console.log('choose');
uni.$u.toast('添加失败')
}
});
// let res = await Uploads()
// data.formData.pic = res.data.image
}
const mode = ref('add')
onLoad((options) => {
if (options.task) {
let data = options.task ? JSON.parse(decodeURIComponent(options.task)) : null;
// console.log(data, data.detail)
Object.assign(formData, data.detail);
pic.splice(0, pic.length, ...data.detail.pic);
mode.value = 'detail'
uni.setNavigationBarTitle({
title: '收获详情'
})
// formData=data.detail
} else {
task_id.value = options.id
}
})
</script>
<style lang='scss' scoped>
.content {
padding-bottom: 100rpx;
}
.tit {
display: flex;
justify-content: space-between;
}
.card-li-tit {
margin-bottom: 20rpx;
}
.confim-btn {
margin: 0 auto;
width: 196.26rpx;
height: 66.59rpx;
/* border: ; */
border: #00A15E 1px solid;
color: #00A15E;
display: flex;
align-items: center;
justify-content: center;
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
}
.up-img {
width: 341.71rpx
}
.today-btn {
width: 588.79rpx;
background-color: #00A15E;
color: white;
position: fixed;
bottom: 40rpx;
/* transform: ; */
left: 50%;
transform: translateX(-50%);
background: linear-gradient(to right, #00A15E, #4CC593);
/* margin: 0 auto; */
}
.code-img {
background-color: #F4F4F4;
height: 350.47rpx;
position: relative;
/* margin-bottom: 100rpx; */
.carime-icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
}
}
.confirm {
position: fixed;
height: 84.11rpx;
display: flex;
bottom: 30rpx;
width: 750rpx;
.confirm-btn {
width: 315.42rpx;
height: 84.11rpx;
border: #00A15E 1px solid;
margin: 0 auto;
border-radius: 80rpx;
text-align: center;
line-height: 84rpx;
}
}
</style>

View File

@ -3,44 +3,50 @@
<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="type" borderBottom required @click="showggai"> <u-form-item label="消毒剂名称" prop="area" borderBottom required>
<up-input placeholder="请输入消毒剂名称" :disabled="mode=='detail'" type="number" border="surround"
v-model="formData.area"></up-input>
</u-form-item>
<u-form-item label="消毒剂浓度" prop="area" borderBottom required>
<up-input placeholder="请输入消毒剂浓度" :disabled="mode=='detail'" type="number" border="surround"
v-model="formData.area"></up-input>
</u-form-item>
<u-form-item label="消毒方法" prop="area" borderBottom required>
<up-input placeholder="请输入消毒方法" :disabled="mode=='detail'" type="number" border="surround"
v-model="formData.area"></up-input>
</u-form-item>
<u-form-item label="消毒地区" prop="type" borderBottom required @click="showggai">
<!-- <uni-data-select v-model="formData.type" :disabled="mode=='detail'" <!-- <uni-data-select v-model="formData.type" :disabled="mode=='detail'"
:localdata="range"></uni-data-select> --> :localdata="range"></uni-data-select> -->
<up-input placeholder="请选择灌溉方式" readonly border="surround" v-model="formDatatype" <up-input placeholder="请选择消毒地区" readonly border="surround" v-model="formDatatype"
style="pointer-events: none;"></up-input> style="pointer-events: none;"></up-input>
</u-form-item> </u-form-item>
<view class="" v-if="mode=='add'"> <view class="" v-if="mode=='add'">
<u-form-item label="开始日期" @click="openDate" prop="start_date" borderBottom required> <u-form-item label="消毒日期" @click="openDate" prop="start_date" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround" v-model="formData.start_date" <up-input placeholder="请选择消毒日期" readonly border="surround" v-model="formData.start_date"
style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="结束日期" prop="end_date" @click="openDate1" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround" v-model="formData.end_date"
style="pointer-events: none;"></up-input> style="pointer-events: none;"></up-input>
</u-form-item> </u-form-item>
</view> </view>
<view class="" v-else> <view class="" v-else>
<u-form-item label="开始日期" prop="start_date" borderBottom required> <u-form-item label="消毒日期" prop="start_date" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround" v-model="formData.start_date" <up-input placeholder="请选择日期" readonly border="surround" v-model="formData.start_date"
style="pointer-events: none;"></up-input> style="pointer-events: none;"></up-input>
</u-form-item> </u-form-item>
<u-form-item label="结束日期" prop="end_date" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround" v-model="formData.end_date"
style="pointer-events: none;"></up-input>
</u-form-item>
</view> </view>
<u-form-item label="灌溉面积" prop="area" borderBottom required> <u-form-item label="消毒面积" prop="area" borderBottom required>
<up-input placeholder="请输入作业面积" :disabled="mode=='detail'" type="number" border="surround" <up-input placeholder="请输入作业面积" :disabled="mode=='detail'" type="number" border="surround"
v-model="formData.area"></up-input> v-model="formData.area"></up-input>
</u-form-item> </u-form-item>
<u-form-item label="参与人" prop="user" borderBottom required> <u-form-item label="消毒人员" prop="user" borderBottom required>
<up-input placeholder="请输入参与人" :disabled="mode=='detail'" type="txt" border="surround" <up-input placeholder="请输入消毒人员" :disabled="mode=='detail'" type="txt" border="surround"
v-model="formData.user"></up-input> v-model="formData.user"></up-input>
</u-form-item> </u-form-item>
<view class="card-li"> <view class="card-li">
<view class="card-li-tit"> <view class="card-li-tit">
灌溉图片 消毒图片
</view> </view>
<view class="code-img1"> <view class="code-img1">
<view class="" v-if="pic.length>0" <view class="" v-if="pic.length>0"
@ -75,15 +81,12 @@
</u--form> </u--form>
<view> <view>
<!-- <uni-calendar ref="calendar" :showMonth="true" :lunar="true" :insert="false" @confirm="dateConfirmfn" /> <u-datetime-picker :show="show1" v-model="value1" mode="datetime" @confirm="dateConfirmfn"
<uni-calendar ref="calendar1" :showMonth="true" :lunar="true" :insert="false" :formatter="formatter" @cancel="show1=false"></u-datetime-picker>
@confirm="dateConfirmfn1" /> -->
<u-datetime-picker :show="show1" v-model="value1" mode="datetime" @confirm="dateConfirmfn" <u-action-sheet :show="showgg" :actions="range" title="请选择灌溉方式" @close="showgg = false"
:formatter="formatter" @cancel="show1=false"></u-datetime-picker> @select="ggSelect">
<u-datetime-picker :show="show2" v-model="value1" mode="datetime" @confirm="dateConfirmfn1"
:formatter="formatter" @cancel="show2=false"></u-datetime-picker>
<u-action-sheet :show="showgg" :actions="range" title="请选择灌溉方式" @close="showgg = false"
@select="ggSelect">
</u-action-sheet> </u-action-sheet>
</view> </view>
</view> </view>
@ -121,15 +124,15 @@
} from '@/api/api.js' } from '@/api/api.js'
const range = reactive([{ const range = reactive([{
value: 1, value: 1,
name: "喷灌" name: "栏舍"
}, },
{ {
value: 2, value: 2,
name: "滴灌" name: "词料槽"
}, },
{ {
value: 3, value: 3,
name: "沟灌" name: "饮水设备"
}, },
]) ])
const task_id = ref(''); const task_id = ref('');
@ -141,15 +144,12 @@
const form = ref(null) const form = ref(null)
const value1 = ref(Date.now()); const value1 = ref(Date.now());
const show1 = ref(false); const show1 = ref(false);
const show2 = ref(false);
const openDate = () => { const openDate = () => {
// calendar.value.open() // calendar.value.open()
show1.value = true show1.value = true
} }
const openDate1 = () => {
// calendar1.value.open()
show2.value = true
}
const formatter = (type, value) => { const formatter = (type, value) => {
if (type === 'year') { if (type === 'year') {
return `${value}`; return `${value}`;
@ -186,10 +186,7 @@
formData.start_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ') formData.start_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
show1.value = false show1.value = false
} }
const dateConfirmfn1 = (e) => {
formData.end_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
show2.value = false
}
const rules = { const rules = {
'type': { 'type': {
type: 'number', type: 'number',
@ -355,6 +352,9 @@
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
page{
background-color: #fff;
}
.content { .content {
padding-bottom: 100rpx; padding-bottom: 100rpx;
} }

View File

@ -3,30 +3,31 @@
<view class="content"> <view class="content">
<view class="card"> <view class="card">
<u-form labelPosition="top" labelWidth='100' :model="data.formData" ref="form1"> <u-form labelPosition="top" labelWidth='100' :model="data.formData" ref="form1">
<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="data.formData.kind"></up-input> v-model="data.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>
<up-input placeholder="请输入品种" :disabled="mode=='detail'" border="surround" <up-input placeholder="请输入动物类型" :disabled="mode=='detail'" border="surround"
v-model="data.formData.breed"></up-input> v-model="data.formData.breed"></up-input>
</u-form-item> </u-form-item>
<u-form-item label="开始日期" prop="date" borderBottom required @click="openDate"> <u-form-item label="栏舍类型" prop="breed" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround" v-model="data.formData.date" <up-input placeholder="请输入栏舍类型" :disabled="mode=='detail'" border="surround"
style="pointer-events: none;"></up-input> v-model="data.formData.breed"></up-input>
</u-form-item> </u-form-item>
<u-form-item label="种植面积" prop="area" borderBottom required> <u-form-item label="容量" prop="area" borderBottom required>
<up-input placeholder="请输入种植面积" :disabled="mode=='detail'" type="number" border="surround" <up-input placeholder="请输入容量" :disabled="mode=='detail'" type="number" border="surround"
v-model="data.formData.area"></up-input> v-model="data.formData.area"></up-input>
</u-form-item> </u-form-item>
<u-form-item label="参与人" prop="user" borderBottom required> <u-form-item label="负责人" prop="user" borderBottom required>
<up-input placeholder="请输入参与人" :disabled="mode=='detail'" type="txt" border="surround" <up-input placeholder="请输入负责人" :disabled="mode=='detail'" type="txt" border="surround"
v-model="data.formData.user"></up-input> v-model="data.formData.user"></up-input>
</u-form-item> </u-form-item>
<view class="card-li"> <view class="card-li">
<view class="card-li-tit"> <view class="card-li-tit">
种植图片 栏舍图片
</view> </view>
<view class="code-img1"> <view class="code-img1">
<view class="" v-if="pic.length>0" <view class="" v-if="pic.length>0"
@ -291,6 +292,10 @@ const formatter = (type, value) => {
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
page{
background-color: #fff;
}
.content { .content {
padding-bottom: 100rpx; padding-bottom: 100rpx;
} }

View File

@ -3,50 +3,34 @@
<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="area" borderBottom required>
<up-input placeholder="请输入除草剂种类" :disabled="mode=='detail'" border="surround" <up-input placeholder="请输入喂水量" :disabled="mode=='detail'" type="number" border="surround"
v-model="formData.kind"></up-input>
</u-form-item>
<u-form-item label="除草剂品牌" prop="breed" borderBottom required>
<up-input placeholder="请输入除草剂品牌" :disabled="mode=='detail'" border="surround"
v-model="formData.breed"></up-input>
</u-form-item>
<u-form-item label="除草剂用量" prop="dosage" borderBottom required>
<up-input placeholder="请输入除草剂用量" border="surround" :disabled="mode=='detail'"
v-model="formData.dosage"></up-input>
</u-form-item>
<view class="" v-if="mode=='add'">
<u-form-item label="开始日期" @click="openDate" prop="start_date" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround"
v-model="formData.start_date" style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="结束日期" prop="end_date" @click="openDate1" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround"
v-model="formData.end_date" style="pointer-events: none;"></up-input>
</u-form-item>
</view>
<view class="" v-else>
<u-form-item label="开始日期" prop="start_date" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround"
v-model="formData.start_date" style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="结束日期" prop="end_date" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround"
v-model="formData.end_date" style="pointer-events: none;"></up-input>
</u-form-item>
</view>
<u-form-item label="作业面积" prop="area" borderBottom required>
<up-input placeholder="请输入作业面积" :disabled="mode=='detail'" type="number" border="surround"
v-model="formData.area"></up-input> v-model="formData.area"></up-input>
</u-form-item> </u-form-item>
<u-form-item label="参与人" prop="user" borderBottom required>
<up-input placeholder="请输入参与人" :disabled="mode=='detail'" type="txt" border="surround"
<view class="" v-if="mode=='add'">
<u-form-item label="喂水时间" @click="openDate" prop="start_date" borderBottom required>
<up-input placeholder="请选择喂水时间" readonly border="surround" v-model="formData.start_date"
style="pointer-events: none;"></up-input>
</u-form-item>
</view>
<view class="" v-else>
<u-form-item label="喂水时间" prop="start_date" borderBottom required>
<up-input placeholder="请选择喂水时间" readonly border="surround" v-model="formData.start_date"
style="pointer-events: none;"></up-input>
</u-form-item>
</view>
<u-form-item label="喂水人员" prop="user" borderBottom required>
<up-input placeholder="请输入喂水人员" :disabled="mode=='detail'" type="txt" border="surround"
v-model="formData.user"></up-input> v-model="formData.user"></up-input>
</u-form-item> </u-form-item>
<view class="card-li"> <view class="card-li">
<view class="card-li-tit"> <view class="card-li-tit">
土地图片 喂水图片
</view> </view>
<view class="code-img1"> <view class="code-img1">
<view class="" v-if="pic.length>0" <view class="" v-if="pic.length>0"
@ -81,16 +65,17 @@
</u--form> </u--form>
<view> <view>
<!-- <uni-calendar ref="calendar" :showMonth="true" :lunar="true" :insert="false" @confirm="dateConfirmfn" /> <u-datetime-picker :show="show1" v-model="value1" mode="datetime" @confirm="dateConfirmfn"
<uni-calendar ref="calendar1" :showMonth="true" :lunar="true" :insert="false" :formatter="formatter" @cancel="show1=false"></u-datetime-picker>
@confirm="dateConfirmfn1" /> -->
<u-datetime-picker :show="show1" v-model="value1" mode="datetime" @confirm="dateConfirmfn" <u-action-sheet :show="showgg" :actions="range" title="请选择灌溉方式" @close="showgg = false"
:formatter="formatter" @cancel="show1=false"></u-datetime-picker> @select="ggSelect">
<u-datetime-picker :show="show2" v-model="value1" mode="datetime" @confirm="dateConfirmfn1"
:formatter="formatter" @cancel="show2=false"></u-datetime-picker> </u-action-sheet>
</view> </view>
</view> </view>
<view class="confirm" v-if="mode=='add'"> <view class="confirm" v-if="mode=='add'">
<view class="confirm-btn" style="color: white;background-color: #0AA565;" @click="addFn"> <view class="confirm-btn" style="color: white;background-color: #0AA565;" @click="addFn">
完成添加 完成添加
@ -114,28 +99,41 @@
} from "vue"; } from "vue";
import { import {
onLoad, onLoad,
onReady onReady,
} from '@dcloudio/uni-app';
} from "@dcloudio/uni-app"
import { import {
addaction addaction
} from '@/api/api.js' } from '@/api/api.js'
const range = reactive([{
value: 1,
name: "栏舍"
},
{
value: 2,
name: "词料槽"
},
{
value: 3,
name: "饮水设备"
},
])
const task_id = ref('');
const pic = reactive([]); const pic = reactive([]);
const calendar = ref(null) const calendar = ref(null)
const calendar1 = ref(null) const calendar1 = ref(null)
const formDatatype = ref('')
const showgg = ref(false)
const form = ref(null) const form = ref(null)
const task_id = ref(''); const value1 = ref(Date.now());
const value1 = ref(Date.now());
const show1 = ref(false); const show1 = ref(false);
const show2 = ref(false);
const openDate = () => { const openDate = () => {
// calendar.value.open() // calendar.value.open()
show1.value = true show1.value = true
} }
const openDate1 = () => {
// calendar1.value.open()
show2.value = true
}
const formatter = (type, value) => { const formatter = (type, value) => {
if (type === 'year') { if (type === 'year') {
return `${value}`; return `${value}`;
@ -150,42 +148,35 @@ const value1 = ref(Date.now());
}; };
// console.log() // console.log()
const formData = reactive({ const formData = reactive({
kind: "", type: "",
breed: "",
dosage: "",
start_date: "",
dosage: "",
end_date: "",
}) })
//
const ggSelect = (e) => {
formDatatype.value = e.name
formData.type = e.value
}
//
const showggai = () => {
showgg.value = true
}
// //
const dateConfirmfn = (e) => { const dateConfirmfn = (e) => {
formData.start_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ') formData.start_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
show1.value = false show1.value = false
} }
const dateConfirmfn1 = (e) => {
formData.end_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ') const rules = {
show2.value = false 'type': {
} type: 'number',
const rules = ref({
'kind': {
type: 'string',
required: true, required: true,
message: '请填写除草剂种类', message: '请选择灌溉方式',
trigger: ['blur', 'change'] trigger: ['change']
},
'breed': {
type: 'string',
required: true,
message: '请填写除草剂品牌',
trigger: ['blur', 'change']
},
'dosage': {
type: 'string',
required: true,
message: '请填写除草剂用量',
trigger: ['blur', 'change']
}, },
'start_date': { 'start_date': {
type: 'string', type: 'string',
@ -217,11 +208,74 @@ const value1 = ref(Date.now());
message: '请填写备注', message: '请填写备注',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
}) }
onReady(() => { onReady(() => {
form.value.setRules(rules); form.value.setRules(rules);
}); });
const navgo = (url) => {
uni.navigateTo({
url
})
}
const addFn = () => {
// console.log(formData)
form.value.validate().then(res => {
if (res) {
formData.pic = pic
let data1 = {
plant_id: task_id.value,
type: 3,
detail: JSON.stringify(formData)
};
if (formData.pic.length == 0) {
uni.$u.toast('请上传图片')
return
}
let endTime = new Date(formData.end_date)
let startTime = new Date(formData.start_date)
if (endTime < startTime) {
uni.$u.toast("结束时间不能小于开始时间");
return
} else if (startTime > endTime) {
uni.$u.toast("开始时间不能大于结束时间");
return
} else {
console.log("开始时间和结束时间合法");
}
//
addaction(data1).then((res) => {
console.log(res)
if (res.code == 1) {
uni.$u.toast(res.msg)
uni.navigateBack({
delta: 1
})
}
})
// uni.$u.toast('')
}
}).catch((err)=>{
uni.$u.toast(err[0].message)
console.log(err)
})
}
//
const perviewFn = (url) => {
console.log(url)
uni.previewImage({
urls: [url]
})
}
//
const delimg = (i) => {
pic.splice(i, 1);
}
// //
const updateImgFn = async () => { const updateImgFn = async () => {
@ -256,88 +310,20 @@ const value1 = ref(Date.now());
// 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) => {
pic.splice(i, 1);
}
const addFn = () => {
form.value.validate().then(res => {
console.log(res)
if (res) {
formData.pic = pic
let data1 = {
plant_id: task_id.value,
type: 2,
detail: JSON.stringify(formData)
};
if (formData.pic.length == 0) {
uni.$u.toast('请上传图片')
return
}
let endTime = new Date(formData.end_date)
let startTime = new Date(formData.start_date)
if (endTime < startTime) {
uni.$u.toast("结束时间不能小于开始时间");
return
} else if (startTime > endTime) {
uni.$u.toast("开始时间不能大于结束时间");
return
} else {
console.log("开始时间和结束时间合法");
}
console.log('表单通过');
//
addaction(data1).then((res) => {
console.log(res)
if (res.code == 1) {
uni.$u.toast(res.msg)
uni.navigateBack({
delta: 1
})
}
})
// uni.$u.toast('')
}
}).catch((err)=>{
uni.$u.toast(err[0].message)
console.log(err)
})
}
const mode = ref('add') const mode = ref('add')
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);
formDatatype.value = range.find(item => item.value === formData.type).name;
mode.value = 'detail' mode.value = 'detail'
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '除草详情' title: '灌溉详情'
}) })
// formData=data.detail // formData=data.detail
} else { } else {
@ -350,6 +336,9 @@ const value1 = ref(Date.now());
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
page{
background-color: #fff;
}
.content { .content {
padding-bottom: 100rpx; padding-bottom: 100rpx;
} }

View File

@ -6,20 +6,35 @@
<view class="serch"> <view class="serch">
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<view class="head-img" style="top: var(--status-bar-height);"> <view class="head-img" style="top: var(--status-bar-height);">
<Myindex url='/pages/index/index'/> <Myindex url='/pages/index/index' />
</view> </view>
<!-- #endif -->
<u-search bgColor="white" :show-action="false" margin='0 30rpx' placeholder="搜索你的土地信息"
v-model="fomData.keyword" shape="round" :clearabled='false' @change="inputval"></u-search>
<u-button class="custom-style" @click="search">搜索</u-button>
<!-- #endif -->
<view class="" style="display: flex;">
<u-search bgColor="white" :show-action="false" margin='0 30rpx' placeholder="搜索你的土地信息"
v-model="fomData.keyword" shape="round" :clearabled='false' @change="inputval"></u-search>
<u-button class="custom-style" @click="search">搜索</u-button>
</view>
<view class="banner">
<view class="" @click="navgo('1')">
栏舍管理
</view>
<view class="" @click="navgo('2')">
档案管理
</view>
<view class="" @click="navgo('3')">
转栏记录
</view>
<view class="" @click="navgo('4')">
离栏记录
</view>
</view>
</view> </view>
<view class="card" v-for="(item,index) in datalist" :key="index" @click="navgo(item)"
style="margin-top: calc(var(--status-bar-height) + 40rpx);"> <view class="card" v-for="(item,index) in datalist" :key="index" @click="navgo(item)">
<view class="tit card-li"> <view class="tit card-li">
<view class=""> <view class="">
{{item.title}} {{item.title}}
@ -87,13 +102,13 @@
import { import {
landlist landlist
} from '@/api/api.js' } from '@/api/api.js'
onLoad(()=>{ onLoad(() => {
// console.log(store.state.userInfo) // console.log(store.state.userInfo)
if (!store.state.userInfo) { if (!store.state.userInfo) {
uni.redirectTo({ uni.redirectTo({
url:'/pages/Login/login' url: '/pages/Login/login'
}) })
} }
}) })
onShow(() => { onShow(() => {
@ -148,25 +163,50 @@
}) })
} }
// //
const inputval= (e) => { const inputval = (e) => {
// console.log(e) // console.log(e)
if(e.length==0){ if (e.length == 0) {
list() list()
} }
} }
// //
const search = () => { const search = () => {
list() list()
} }
const navgo = (item) => { const navgo = (i) => {
uni.navigateTo({ switch (i) {
url: '/pages/landDetail/index?id=' + item.id case '1':
})
uni.navigateTo({
url: '/pages/barnsetting/index'
})
break;
case '2':
uni.navigateTo({
url: '/pages/filemanagement/index'
})
break;
case '3':
uni.navigateTo({
url: '/pages/transferrecord/index'
})
break;
case '4':
uni.navigateTo({
url: '/pages/outrecord/index'
})
break;
default:
// expression case
}
} }
onMounted(() => { onMounted(() => {
@ -185,7 +225,7 @@
position: relative; position: relative;
padding-top: 180rpx; padding-top: 370rpx;
.head-img { .head-img {
position: absolute; position: absolute;
@ -214,11 +254,10 @@
.serch { .serch {
width: 100%; width: 100%;
height: 100rpx; height: 280rpx;
background-color: #EAF2EF; background-color: #EAF2EF;
position: absolute; position: absolute;
position: fixed; position: fixed;
display: flex;
top: 0; top: 0;
padding-top: calc(70rpx + var(--status-bar-height) + 20rpx); padding-top: calc(70rpx + var(--status-bar-height) + 20rpx);
padding-right: 20rpx; padding-right: 20rpx;
@ -245,6 +284,21 @@
} }
.banner {
display: flex;
justify-content: space-around;
view {
width: 150rpx;
height: 150rpx;
line-height: 150rpx;
text-align: center;
background-color: #fff;
margin-top: 20rpx;
}
}
.coneng-detail { .coneng-detail {
width: 478rpx; width: 478rpx;
height: 341rpx; height: 341rpx;

View File

@ -47,20 +47,18 @@
<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="" style="margin: 10rpx 0;"> <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="" style="margin: 10rpx 0;"> <view class="" style="margin: 10rpx 0;">
土地面积: {{dataobj.total_area}} 养殖场面积: {{dataobj.total_area}}
</view>
<view class="" style="margin: 10rpx 0;">
种植面积: {{dataobj.total_area-dataobj.residual_area}}
</view> </view>
</view> </view>
<view class="changeLand" @click="show=true"> <view class="changeLand" @click="show=true">
切换土地 切换养殖场
</view> </view>
</view> </view>
@ -73,20 +71,19 @@
</view> </view>
</view> </view>
</view> </view>
<view class="add-thing" @click="showPicker1=true" v-if="columns2[0]&&columns2[0].length>0"> <view class="add-thing" @click="showPicker1=true" v-if="columns2[0]&&columns2[0].length>0">
记农事 记养殖
</view> </view>
<!-- 苗情监测 --> <!-- 苗情监测 -->
<view class=""> <view class="">
<view class="live-video soil-monitor"> <view class="live-video soil-monitor">
<view class="head"> <view class="head">
<view class="tit"> <view class="tit">
苗情监测数据 养殖监测视频
</view> </view>
<view class="flushed-time"> <view class="flushed-time">
<u-icon name="clock"></u-icon> <u-icon name="clock"></u-icon>
@ -108,7 +105,7 @@
<view class="soil-monitor"> <view class="soil-monitor">
<view class="head"> <view class="head">
<view class="tit"> <view class="tit">
土壤监测数据 智能监测数据
</view> </view>
<view class="flushed-time"> <view class="flushed-time">
<u-icon name="clock"></u-icon> <u-icon name="clock"></u-icon>
@ -142,36 +139,7 @@
</view> </view>
</view> </view>
</view>
<!-- 环境监测 -->
<view class="soil-monitor">
<view class="head">
<view class="tit">
环境监测数据
</view>
<view class="flushed-time">
<u-icon name="clock"></u-icon>
<text>刷新时间: {{getNowTimeFn()}} </text>
</view>
</view>
<view class="monitor-content"
v-if="dataobj&&dataobj.monitor&&dataobj.monitor.air_monitor_data&&Object.keys(dataobj.monitor.air_monitor_data).length>0">
<view class="monitor-card" v-for="(item,index) in environmentList" :key="index">
<view class="name">
<view class="">
<u--image :src="item.icon" width="38.55rpx" height="38.55rpx"></u--image>
</view>
<view class="" style="margin-left: 10rpx;">
{{item.name}}
</view>
</view>
<view class="num">
<text style="font-size: 70rpx;">{{item.num}}</text>
<text>{{item.unit}}</text>
</view>
</view>
</view>
<view class="coneng-detail" v-else> <view class="coneng-detail" v-else>
@ -258,23 +226,29 @@
const showPicker = ref(false) const showPicker = ref(false)
const showPicker1 = ref(false) const showPicker1 = ref(false)
const showModal = ref(false) const showModal = ref(false)
const columns1 = reactive([ const columns1 = ([
[{ [{
label: '施肥', label: '喂食记录',
route: "/pages/husbandryForm/fertilize" route: "/pages/husbandryForm/fertilize"
}, { }, {
label: '除草', label: '喂水记录',
route: "/pages/husbandryForm/weeding" route: "/pages/husbandryForm/weeding"
}, { }, {
label: '灌溉', label: '消毒记录',
route: "/pages/husbandryForm/irrigate" route: "/pages/husbandryForm/irrigate"
}, { }, {
label: '除虫', label: '疫苗记录',
route: "/pages/husbandryForm/Pest" route: "/pages/husbandryForm/Pest"
}, { }, {
label: '收获', label: '转栏记录',
route: "/pages/husbandryForm/harvest" route: "/pages/husbandryForm/harvest"
}] },
{
label: '离栏记录',
route: "/pages/husbandryForm/harvest"
},
]
]); ]);
const columns2 = reactive([]) const columns2 = reactive([])

View File

@ -86,7 +86,10 @@
text: "安全设置", text: "安全设置",
nav: "/pages/updatePassword/updatePassword" nav: "/pages/updatePassword/updatePassword"
}, },
{
text: "养殖场信息",
nav: "/pages/farminfo/farminfo"
},
]) ])
const loginOutFn = () => { const loginOutFn = () => {
@ -151,7 +154,7 @@
.head-return { .head-return {
margin-top: 30rpx; margin-top: 30rpx;
margin-left: calc(100% - 200rpx); margin-left: calc(100% - 200rpx);
} }
} }