更新了表单样式

This commit is contained in:
weipengfei 2023-12-13 18:30:45 +08:00
parent 339d96f174
commit 883df22b42
10 changed files with 2378 additions and 2055 deletions

View File

@ -1,11 +1,11 @@
{ {
"hash": "8ba23d55", "hash": "e0ca0843",
"browserHash": "9b7bcd37", "browserHash": "6115931f",
"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": "5cac3687", "fileHash": "fbfa4a11",
"needsInterop": false "needsInterop": false
} }
}, },

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

@ -1,4 +1,4 @@
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/mixin/mixin.js // ../../../../里海数字乡村/TraceabilityAPP/node_modules/uview-plus/libs/mixin/mixin.js
var mixin_default = { var mixin_default = {
// 定义每个组件都可能需要用到的外部样式以及类名 // 定义每个组件都可能需要用到的外部样式以及类名
props: { props: {
@ -129,10 +129,10 @@ var mixin_default = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/mixin/mpMixin.js // ../../../../里海数字乡村/TraceabilityAPP/node_modules/uview-plus/libs/mixin/mpMixin.js
var mpMixin_default = {}; var mpMixin_default = {};
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/utils.js // ../../../../里海数字乡村/TraceabilityAPP/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";
} }
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/helpers/buildURL.js // ../../../../里海数字乡村/TraceabilityAPP/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;
} }
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/helpers/isAbsoluteURL.js // ../../../../里海数字乡村/TraceabilityAPP/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);
} }
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/helpers/combineURLs.js // ../../../../里海数字乡村/TraceabilityAPP/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;
} }
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/core/buildFullPath.js // ../../../../里海数字乡村/TraceabilityAPP/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;
} }
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/core/settle.js // ../../../../里海数字乡村/TraceabilityAPP/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) {
} }
} }
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/adapters/index.js // ../../../../里海数字乡村/TraceabilityAPP/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) => {
} }
}); });
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/core/dispatchRequest.js // ../../../../里海数字乡村/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/core/dispatchRequest.js
var dispatchRequest_default = (config) => adapters_default(config); var dispatchRequest_default = (config) => adapters_default(config);
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/core/InterceptorManager.js // ../../../../里海数字乡村/TraceabilityAPP/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;
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/core/mergeConfig.js // ../../../../里海数字乡村/TraceabilityAPP/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;
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/core/defaults.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/utils/clone.js // ../../../../里海数字乡村/TraceabilityAPP/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;
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/core/Request.js // ../../../../里海数字乡村/TraceabilityAPP/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 {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/index.js // ../../../../里海数字乡村/TraceabilityAPP/node_modules/uview-plus/libs/luch-request/index.js
var luch_request_default = Request; var luch_request_default = Request;
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/util/route.js // ../../../../里海数字乡村/TraceabilityAPP/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;
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/function/colorGradient.js // ../../../../里海数字乡村/TraceabilityAPP/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
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/function/test.js // ../../../../里海数字乡村/TraceabilityAPP/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
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/function/debounce.js // ../../../../里海数字乡村/TraceabilityAPP/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;
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/function/throttle.js // ../../../../里海数字乡村/TraceabilityAPP/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;
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/function/digit.js // ../../../../里海数字乡村/TraceabilityAPP/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;
} }
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/function/index.js // ../../../../里海数字乡村/TraceabilityAPP/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
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/config.js // ../../../../里海数字乡村/TraceabilityAPP/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"
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/actionSheet.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/album.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/alert.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/avatar.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/avatarGroup.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/backtop.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/badge.js // ../../../../里海数字乡村/TraceabilityAPP/node_modules/uview-plus/libs/config/props/badge.js
var badge_default = { var badge_default = {
// 徽标数组件 // 徽标数组件
badge: { badge: {
@ -1895,7 +1895,7 @@ var badge_default = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/button.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/calendar.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/carKeyboard.js // ../../../../里海数字乡村/TraceabilityAPP/node_modules/uview-plus/libs/config/props/carKeyboard.js
var carKeyboard_default = { var carKeyboard_default = {
// 车牌号键盘 // 车牌号键盘
carKeyboard: { carKeyboard: {
@ -1975,7 +1975,7 @@ var carKeyboard_default = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/cell.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/cellGroup.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/checkbox.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/checkboxGroup.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/circleProgress.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/code.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/codeInput.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/col.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/collapse.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/collapseItem.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/columnNotice.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/countDown.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/countTo.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/datetimePicker.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/divider.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/empty.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/form.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/formItem.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/gap.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/grid.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/gridItem.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/icon.js // ../../../../里海数字乡村/TraceabilityAPP/node_modules/uview-plus/libs/config/props/icon.js
var { var {
color color
} = config_default; } = config_default;
@ -2334,7 +2334,7 @@ var icon_default = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/image.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/indexAnchor.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/indexList.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/input.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/keyboard.js // ../../../../里海数字乡村/TraceabilityAPP/node_modules/uview-plus/libs/config/props/keyboard.js
var keyboard_default = { var keyboard_default = {
// 键盘组件 // 键盘组件
keyboard: { keyboard: {
@ -2445,7 +2445,7 @@ var keyboard_default = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/line.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/lineProgress.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/link.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/list.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/listItem.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/loadingIcon.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/loadingPage.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/loadmore.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/modal.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/color.js // ../../../../里海数字乡村/TraceabilityAPP/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;
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/navbar.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/noNetwork.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/noticeBar.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/notify.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/numberBox.js // ../../../../里海数字乡村/TraceabilityAPP/node_modules/uview-plus/libs/config/props/numberBox.js
var numberBox_default = { var numberBox_default = {
// 步进器组件 // 步进器组件
numberBox: { numberBox: {
@ -2713,7 +2713,7 @@ var numberBox_default = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/numberKeyboard.js // ../../../../里海数字乡村/TraceabilityAPP/node_modules/uview-plus/libs/config/props/numberKeyboard.js
var numberKeyboard_default = { var numberKeyboard_default = {
// 数字键盘 // 数字键盘
numberKeyboard: { numberKeyboard: {
@ -2723,7 +2723,7 @@ var numberKeyboard_default = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/overlay.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/parse.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/picker.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/popup.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/radio.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/radioGroup.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/rate.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/readMore.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/row.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/rowNotice.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/scrollList.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/search.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/section.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/skeleton.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/slider.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/statusBar.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/steps.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/stepsItem.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/sticky.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/subsection.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/swipeAction.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/swipeActionItem.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/swiper.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/swipterIndicator.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/switch.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/tabbar.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/tabbarItem.js // ../../../../里海数字乡村/TraceabilityAPP/node_modules/uview-plus/libs/config/props/tabbarItem.js
var tabbarItem_default = { var tabbarItem_default = {
// //
tabbarItem: { tabbarItem: {
@ -3164,7 +3164,7 @@ var tabbarItem_default = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/tabs.js // ../../../../里海数字乡村/TraceabilityAPP/node_modules/uview-plus/libs/config/props/tabs.js
var tabs_default = { var tabs_default = {
// //
tabs: { tabs: {
@ -3189,7 +3189,7 @@ var tabs_default = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/tag.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/text.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/textarea.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/toast.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/toolbar.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/tooltip.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/transition.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props/upload.js // ../../../../里海数字乡村/TraceabilityAPP/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 = {
} }
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/props.js // ../../../../里海数字乡村/TraceabilityAPP/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
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/config/zIndex.js // ../../../../里海数字乡村/TraceabilityAPP/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
}; };
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/libs/function/platform.js // ../../../../里海数字乡村/TraceabilityAPP/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;
// ../../../../../books/apps/LiHai/TraceabilityAPP/node_modules/uview-plus/index.js // ../../../../里海数字乡村/TraceabilityAPP/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

@ -2,77 +2,79 @@
<view class="content"> <view class="content">
<view class="card"> <view class="card">
<u-form labelPosition="top" labelWidth='100' :model="data.formData" ref="form1"> <up-form labelWidth='100' :model="data.formData" ref="form1">
<!-- <u-form-item label="姓名" prop="name"><u-input v-model="data.formData.name" /></u-form-item> <!-- <up-form-item label="姓名" prop="name"><u-input v-model="data.formData.name" /></up-form-item>
<u-form-item label="简介" prop="intro"><u-input v-model="data.formData.intro" /></u-form-item> --> <up-form-item label="简介" prop="intro"><u-input v-model="data.formData.intro" /></up-form-item> -->
<u-form-item label="土地名称" prop="title" borderBottom ref='item1' required> <view class="c-title">土地信息</view>
<up-input placeholder="请输入土地名称" border="surround" v-model="data.formData.title"></up-input> <view class="c-box">
</u-form-item> <up-form-item label="土地名称" prop="title" borderBottom required>
<u-form-item label="土地面积" prop="area" borderBottom required> <up-input input-align="right" placeholder="请输入土地名称" border="none" v-model="data.formData.title"></up-input>
<up-input placeholder="请输入土地面积" border="surround" v-model="data.formData.area"></up-input> </up-form-item>
</u-form-item> <up-form-item label="土地面积" prop="area" borderBottom required>
<u-form-item label="所在省份" prop="province_code" borderBottom required @click="isshow1"> <up-input input-align="right" placeholder="请输入土地面积" border="none" v-model="data.formData.area"></up-input>
<up-input placeholder="请选择所在省份" border="surround" v-model="province_name" readonly </up-form-item>
style="pointer-events: none;"></up-input> <up-form-item label="土地负责人" prop="master_name" borderBottom required>
</u-form-item> <up-input input-align="right" placeholder="请输入土地负责人名称" border="none" v-model="data.formData.master_name"></up-input>
<u-form-item label="所在城市" prop="city_code" borderBottom required @click="isshow2"> </up-form-item>
<up-input placeholder="请选择所在城市" border="surround" v-model="city_name" readonly <up-form-item label="负责人电话" prop="master_phone" borderBottom required>
style="pointer-events: none;"></up-input> <up-input input-align="right" placeholder="请输入负责人电话" type="number" border="none"
</u-form-item> v-model="data.formData.master_phone"></up-input>
<u-form-item label="所在区县" prop="county_code" borderBottom required @click="isshow3"> </up-form-item>
<up-input placeholder="请选择所在区县" border="surround" v-model="county_name" readonly </view>
style="pointer-events: none;"></up-input>
</u-form-item> <view class="c-title">地址信息</view>
<u-form-item label="土地详细地址" prop="town_code" borderBottom required> <view class="c-box">
<u-input placeholder="请输入土地详细地址" border="surround" v-model="data.formData.address"> <up-form-item label="所在省份" prop="province_code" borderBottom required @click="isshow1">
<up-input input-align="right" placeholder="请选择所在省份" suffixIcon="arrow-down" suffix-icon-style="color: #b6b6b6;" border="none" v-model="province_name" readonly
style="pointer-events: none;"></up-input>
</up-form-item>
<up-form-item label="所在城市" prop="city_code" borderBottom required @click="isshow2">
<up-input input-align="right" placeholder="请选择所在城市" suffixIcon="arrow-down" suffix-icon-style="color: #b6b6b6;" border="none" v-model="city_name" readonly
style="pointer-events: none;"></up-input>
</up-form-item>
<up-form-item label="所在区县" prop="county_code" borderBottom required @click="isshow3">
<up-input input-align="right" placeholder="请选择所在区县" suffixIcon="arrow-down" suffix-icon-style="color: #b6b6b6;" border="none" v-model="county_name" readonly
style="pointer-events: none;"></up-input>
</up-form-item>
<up-form-item label="土地详细地址" prop="town_code" borderBottom required>
<up-input input-align="right" placeholder="请输入土地详细地址" suffixIcon="map" suffix-icon-style="color: #b6b6b6;" border="none" v-model="data.formData.address">
</up-input>
</up-form-item>
</view>
<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">
<view class="c-title">土地图片</view>
<view class="c-box c-box-p">
<view class="code-img1">
<view class="" v-if="pic.length>0"
style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;">
<view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;">
<view class="">
<u-icon name="close" size="15" style="margin-left:120.85rpx;"
@click="delimg(i)"></u-icon>
<u-image :src="item" width="150.85rpx" height="150.85rpx"></u-image>
</view>
</view>
</view>
<view class="card-li-tit"> </view>
<span>*</span> <view class="code-img">
土地图片 <view class="" @click="updateImgFn">
</view> <view class="carime-icon">
<view class="code-img1"> <u-image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u-image>
<view class="" v-if="pic.length>0" <view class="">
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>
<view class=""> </view>
<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>
<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>
</view>
</view> </view>
</u-form> </up-form>
<u-action-sheet :show="show" keyName="name" closeOnClickOverlay :actions="columns" title="请选择" <u-action-sheet :show="show" keyName="name" closeOnClickOverlay :actions="columns" title="请选择"
@close="show = false" @select="leavaType1"> @close="show = false" @select="leavaType1">
@ -92,7 +94,7 @@
<u-action-sheet :show="show5" keyName="name" :actions="columns5" title="请选择" @close="show5 = false" <u-action-sheet :show="show5" keyName="name" :actions="columns5" title="请选择" @close="show5 = false"
@select="leavaType6"> @select="leavaType6">
</u-action-sheet> </u-action-sheet>
<u-button @click="submit">提交</u-button> <u-button class="btn" @click="submit">提交</u-button>
</view> </view>
</view> </view>
</template> </template>
@ -432,9 +434,54 @@
</script> </script>
<style lang="scss"> <style lang="scss">
page{
background-color: #f7fffc;
}
.card{
background-color: #f7fffc;
padding: 0;
padding-bottom: 80rpx;
.c-title{
font-weight: bold;
display: flex;
align-items: center;
padding: 30rpx;
padding-bottom: 15rpx;
&:before{
content: '';
display: inline-block;
height: 0.8rem;
width: 6rpx;
margin-top: 0.2rem;
margin-right: 10rpx;
background-color: #35d190;
border-radius: 6rpx;
}
}
.c-box{
background-color: #fff;
padding-left: 30rpx;
padding-right: 20rpx;
padding-bottom: 20rpx;
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
}
.c-box-p{
padding: 20rpx;
}
.btn{
margin: 20rpx auto;
width: 694rpx;
height: 80rpx;
border-radius: 80rpx;
background-color: #4ad69b;
color: #fff;
}
}
.card-li-tit { .card-li-tit {
position: relative; position: relative;
span { span {
position: absolute; position: absolute;
left: -9px; left: -9px;
@ -480,7 +527,6 @@
background-color: #F4F4F4; background-color: #F4F4F4;
height: 350.47rpx; height: 350.47rpx;
position: relative; position: relative;
margin-bottom: 100rpx;
.carime-icon { .carime-icon {
position: absolute; position: absolute;

View File

@ -432,7 +432,7 @@
justify-content: space-between; justify-content: space-between;
} }
.card-li-tit { .card-li {
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }

View File

@ -2,83 +2,92 @@
<!-- 播种 --> <!-- 播种 -->
<view class="content"> <view class="content">
<view class="card"> <view class="card">
<u--form labelPosition="top" labelWidth='130' :model="formData" :rules="rules" ref="form"> <u--form labelWidth='130' :model="formData" :rules="rules" ref="form">
<u-form-item label="除虫剂种类" prop="kind" borderBottom ref='item1' required> <view class="c-title">除虫信息</view>
<up-input placeholder="请输入除虫剂种类" :disabled="mode=='detail'" border="surround" <view class="c-box">
v-model="formData.kind"></up-input> <u-form-item label="除虫剂种类" prop="kind" borderBottom ref='item1' required>
</u-form-item> <up-input input-align="right" placeholder="请输入除虫剂种类" :disabled="mode=='detail'" border="none"
<u-form-item label="除虫剂品牌" prop="breed" borderBottom required> v-model="formData.kind"></up-input>
<up-input placeholder="请输入除虫剂品牌" :disabled="mode=='detail'" border="surround" </u-form-item>
v-model="formData.breed"></up-input> <u-form-item label="除虫剂品牌" prop="breed" borderBottom required>
</u-form-item> <up-input input-align="right" placeholder="请输入除虫剂品牌" :disabled="mode=='detail'" border="none"
<u-form-item label="除虫剂用量(升)" prop="dosage" borderBottom required> v-model="formData.breed"></up-input>
<up-input placeholder="请输入除虫剂用量" type='number' border="surround" :disabled="mode=='detail'" </u-form-item>
v-model="formData.dosage"></up-input> <u-form-item label="除虫剂用量(升)" prop="dosage" borderBottom required>
</u-form-item> <up-input input-align="right" placeholder="请输入除虫剂用量" type='number' border="none" :disabled="mode=='detail'"
v-model="formData.dosage"></up-input>
<view class="" v-if="mode=='add'"> </u-form-item>
<u-form-item label="开始日期" @click="openDate" prop="start_date" borderBottom required> <u-form-item label="作业面积(亩)" prop="area" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround" v-model="formData.start_date" <up-input input-align="right" placeholder="请输入作业面积" :disabled="mode=='detail'" type="number" border="none"
style="pointer-events: none;"></up-input> v-model="formData.area"></up-input>
</u-form-item> </u-form-item>
<u-form-item label="结束日期" prop="end_date" @click="openDate1" borderBottom required> <u-form-item label="参与人员" prop="user" borderBottom required>
<up-input placeholder="请选择日期" readonly border="surround" v-model="formData.end_date" <up-input input-align="right" placeholder="请输入参与人姓名" :disabled="mode=='detail'" type="txt" border="none"
style="pointer-events: none;"></up-input> v-model="formData.user"></up-input>
</u-form-item> </u-form-item>
<view class="" v-if="mode=='add'">
<u-form-item label="开始日期" @click="openDate" prop="start_date" borderBottom required>
<up-input input-align="right" placeholder="请选择日期" suffixIcon="arrow-down"
suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.start_date"
style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="结束日期" prop="end_date" @click="openDate1" borderBottom required>
<up-input input-align="right" placeholder="请选择日期" suffixIcon="arrow-down"
suffix-icon-style="color: #b6b6b6;" readonly border="none" 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 input-align="right" placeholder="请选择日期" suffixIcon="arrow-down"
suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.start_date"
style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="结束日期" prop="end_date" borderBottom required>
<up-input input-align="right" placeholder="请选择日期" suffixIcon="arrow-down"
suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.end_date"
style="pointer-events: none;"></up-input>
</u-form-item>
</view>
</view> </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>
</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">
<view class="card-li-tit"> <view class="c-title">除虫图片</view>
<span>*</span> <view class="c-box c-box-p">
除虫图片 <view class="code-img1">
</view> <view class="" v-if="pic.length>0"
<view class="code-img1"> style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;">
<view class="" v-if="pic.length>0" <view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;">
style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;"> <view class="">
<view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;"> <u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)"
<view class=""> v-show="mode=='add'"></u-icon>
<u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)" <u-image :src="item" width="150.85rpx" height="150.85rpx"
v-show="mode=='add'"></u-icon> @click="perviewFn(item)"></u-image>
<u-image :src="item" width="150.85rpx" height="150.85rpx" </view>
@click="perviewFn(item)"></u-image> </view>
</view> </view>
</view>
</view>
</view> </view>
<view class="code-img" v-if="mode=='add'"> <view class="code-img" v-if="mode=='add'">
<view class="" @click="updateImgFn"> <view class="" @click="updateImgFn">
<view class="carime-icon"> <view class="carime-icon">
<u-image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u-image> <u-image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u-image>
<view class=""> <view class="">
点击上传图片 点击上传图片
</view> </view>
</view> </view>
</view> </view>
</view>
</view> </view>
</view> </view>
<u-form-item label="备注" prop="remark" borderBottom>
<u--textarea v-model="formData.remark" :disabled="mode=='detail'" placeholder="请输入内容"></u--textarea> <view class="c-title">备注信息</view>
</u-form-item> <view class="c-box" style="padding: 0 20rpx;">
<u-form-item prop="remark" borderBottom>
<u--textarea v-model="formData.remark" :disabled="mode=='detail'" placeholder="请输入内容"></u--textarea>
</u-form-item>
</view>
</u--form> </u--form>
<view> <view>
@ -90,13 +99,7 @@
<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>
</view> </view>
</view> <u-button class="btn" v-if="mode=='add'" @click="addFn">完成添加</u-button>
<view class="confirm" v-if="mode=='add'">
<view class="confirm-btn" style="color: white;background-color: #0AA565;" @click="addFn">
完成添加
</view>
</view> </view>
@ -384,93 +387,139 @@
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.content { page {
padding-bottom: 100rpx; background-color: #f7fffc;
} }
.tit { .card {
display: flex; background-color: #f7fffc;
justify-content: space-between; padding: 0;
} padding-bottom: 80rpx;
.card-li-tit { .c-title {
position: relative; font-weight: bold;
display: flex;
align-items: center;
padding: 30rpx;
padding-bottom: 15rpx;
span { &:before {
position: absolute; content: '';
left: -9px; display: inline-block;
color: #f56c6c; height: 0.8rem;
line-height: 20px; width: 6rpx;
font-size: 20px; margin-top: 0.2rem;
top: 3px; margin-right: 10rpx;
} background-color: #35d190;
border-radius: 6rpx;
}
}
margin-bottom: 20rpx; .c-box {
} background-color: #fff;
padding-left: 30rpx;
padding-right: 20rpx;
padding-bottom: 20rpx;
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
}
.confim-btn { .c-box-p {
margin: 0 auto; padding: 20rpx;
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 { .btn {
width: 341.71rpx margin: 20rpx auto;
} width: 694rpx;
height: 80rpx;
border-radius: 80rpx;
background-color: #4ad69b;
color: #fff;
}
}
.today-btn { .tit {
width: 588.79rpx; display: flex;
background-color: #00A15E; justify-content: space-between;
color: white; }
position: fixed;
bottom: 40rpx;
/* transform: ; */
left: 50%;
transform: translateX(-50%);
background: linear-gradient(to right, #00A15E, #4CC593);
/* margin: 0 auto; */
}
.code-img { .card-li {
background-color: #F4F4F4; position: relative;
height: 350.47rpx; margin-bottom: 0;
position: relative;
/* margin-bottom: 100rpx; */
.carime-icon { span {
position: absolute; position: absolute;
top: 50%; left: -9px;
left: 50%; color: #f56c6c;
transform: translate(-50%, -50%); line-height: 20px;
display: flex; font-size: 20px;
flex-direction: column; top: 3px;
align-items: center; }
}
} }
.confirm { .confim-btn {
position: fixed; margin: 0 auto;
height: 84.11rpx; width: 196.26rpx;
display: flex; height: 66.59rpx;
bottom: 30rpx; /* border: ; */
width: 750rpx; border: #00A15E 1px solid;
color: #00A15E;
display: flex;
align-items: center;
justify-content: center;
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
}
.confirm-btn { .up-img {
width: 315.42rpx; width: 341.71rpx
height: 84.11rpx; }
border: #00A15E 1px solid;
margin: 0 auto; .today-btn {
border-radius: 80rpx; width: 588.79rpx;
text-align: center; background-color: #00A15E;
line-height: 84rpx; 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> </style>

View File

@ -1,482 +1,530 @@
<template> <template>
<!-- 播种 --> <!-- 播种 -->
<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 labelWidth='100' :model="formData" :rules="rules" ref="form">
<u-form-item label="肥料种类" prop="kind" borderBottom ref='item1' required> <view class="c-title">施肥信息</view>
<up-input placeholder="请输入肥料种类" :disabled="mode=='detail'" border="surround" <view class="c-box">
v-model="formData.kind"></up-input> <u-form-item label="肥料种类" prop="kind" borderBottom ref='item1' required>
</u-form-item> <up-input input-align="right" placeholder="请输入肥料种类" :disabled="mode=='detail'" border="none"
<u-form-item label="肥料品牌" prop="breed" borderBottom required> v-model="formData.kind"></up-input>
<up-input placeholder="请输入肥料品牌" :disabled="mode=='detail'" border="surround" </u-form-item>
v-model="formData.breed"></up-input> <u-form-item label="肥料品牌" prop="breed" borderBottom required>
</u-form-item> <up-input input-align="right" placeholder="请输入肥料品牌" :disabled="mode=='detail'" border="none"
<u-form-item label="肥料用量(斤)" prop="dosage" borderBottom required> v-model="formData.breed"></up-input>
<up-input placeholder="请输入肥料用量" border="surround" type='number' :disabled="mode=='detail'" </u-form-item>
v-model="formData.dosage"></up-input> <u-form-item label="肥料用量(斤)" prop="dosage" borderBottom required>
</u-form-item> <up-input input-align="right" placeholder="请输入肥料用量" border="none" type='number' :disabled="mode=='detail'"
v-model="formData.dosage"></up-input>
</u-form-item>
<u-form-item label="作业面积(亩)" prop="area" borderBottom required>
<up-input input-align="right" placeholder="请输入作业面积" :disabled="mode=='detail'" type="number" border="none"
v-model="formData.area"></up-input>
</u-form-item>
<u-form-item label="参与人员" prop="user" borderBottom required>
<up-input input-align="right" placeholder="请输入参与人姓名" :disabled="mode=='detail'" type="txt" border="none"
v-model="formData.user"></up-input>
</u-form-item><view class="" v-if="mode=='add'">
<u-form-item label="开始日期" @click="openDate" prop="start_date" borderBottom required>
<up-input input-align="right" placeholder="请选择日期" suffixIcon="arrow-down" suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.start_date"
style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="结束日期" prop="end_date" @click="openDate1" borderBottom required>
<up-input input-align="right" placeholder="请选择日期" suffixIcon="arrow-down" suffix-icon-style="color: #b6b6b6;" readonly border="none" 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 input-align="right" placeholder="请选择日期" suffixIcon="arrow-down" suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.start_date"
style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="结束日期" prop="end_date" borderBottom required>
<up-input input-align="right" placeholder="请选择日期" suffixIcon="arrow-down" suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.end_date"
style="pointer-events: none;"></up-input>
</u-form-item>
</view>
</view>
<view class="card-li">
<view class="c-title">施肥图片</view>
<view class="c-box c-box-p">
<view class="code-img1">
<view class="" v-if="pic.length>0"
style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;">
<view class="" v-if="mode=='add'"> <view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;">
<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>
</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">
<span>*</span>
施肥图片
</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 class=""> </view>
<u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)" <view class="code-img" v-if="mode=='add'">
v-show="mode=='add'"></u-icon> <view class="" @click="updateImgFn">
<u-image :src="item" width="150.85rpx" height="150.85rpx" <view class="carime-icon">
@click="perviewFn(item)"></u-image> <u-image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u-image>
</view> <view class="">
</view> 点击上传图片
</view> </view>
</view>
</view> </view>
<view class="code-img" v-if="mode=='add'">
<view class="" @click="updateImgFn">
<view class="carime-icon">
<u-image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u-image>
<view class="">
点击上传图片
</view>
</view>
</view> </view>
</view>
</view>
</view> <view class="c-title">备注信息</view>
</view> <view class="c-box" style="padding: 0 20rpx;">
<u-form-item label="备注" prop="remark" borderBottom> <u-form-item prop="remark" borderBottom>
<u--textarea v-model="formData.remark" :disabled="mode=='detail'" placeholder="请输入内容"></u--textarea> <u--textarea v-model="formData.remark" :disabled="mode=='detail'" placeholder="请输入内容"></u--textarea>
</u-form-item> </u-form-item>
</view>
</u--form>
<view>
<!-- <uni-calendar ref="calendar" :showMonth="true" :lunar="true" :insert="false" @confirm="dateConfirmfn" /> </u--form>
<view>
<!-- <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>
</view> </view>
</view>
<view class="confirm" v-if="mode=='add'"> <u-button class="btn" v-if="mode=='add'" @click="addFn">完成添加</u-button>
<view class="confirm-btn" style="color: white;background-color: #0AA565;" @click="addFn">
完成添加
</view>
</view> </view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { import {
Uploads Uploads
} from "@/api/upload.js" } from "@/api/upload.js"
import { import {
reactive, reactive,
ref ref
} from "vue"; } from "vue";
import { import {
onLoad, onLoad,
onReady onReady
} from '@dcloudio/uni-app'; } from '@dcloudio/uni-app';
import { import {
addaction, addaction,
plantdetail plantdetail
} from '@/api/api.js' } from '@/api/api.js'
const pic = reactive([]); const pic = reactive([]);
const calendar = ref(null) const calendar = ref(null)
const calendar1 = ref(null) const calendar1 = ref(null)
const form = ref(null) const form = ref(null)
const task_id = ref(''); 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);
const dataobj = reactive({}); const dataobj = reactive({});
const openDate = () => { const openDate = () => {
// calendar.value.open() // calendar.value.open()
show1.value = true show1.value = true
} }
const openDate1 = () => { const openDate1 = () => {
// calendar1.value.open() // calendar1.value.open()
show2.value = true show2.value = true
} }
// console.log() // console.log()
const formData = reactive({ const formData = reactive({
kind: "", kind: "",
breed: "", breed: "",
dosage: "", dosage: "",
start_date: "", start_date: "",
dosage: "", dosage: "",
end_date: "", end_date: "",
}) })
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.end_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
show2.value = false show2.value = false
} }
const rules = ref({ const rules = ref({
'kind': { 'kind': {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写肥料种类', message: '请填写肥料种类',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
'breed': { 'breed': {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写肥料品牌', message: '请填写肥料品牌',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
'dosage': { 'dosage': {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写肥料用量', message: '请填写肥料用量',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
'start_date': { 'start_date': {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写开始日期', message: '请填写开始日期',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
'end_date': { 'end_date': {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写结束日期', message: '请填写结束日期',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
'area': { 'area': {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写土地面积', message: '请填写土地面积',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
'user': { 'user': {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写参与人', message: '请填写参与人',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
} }
// , // ,
// 'remark': { // 'remark': {
// type: 'string', // type: 'string',
// required: true, // required: true,
// message: '', // message: '',
// trigger: ['blur', 'change'] // trigger: ['blur', 'change']
// }, // },
}) })
onReady(() => { onReady(() => {
form.value.setRules(rules); form.value.setRules(rules);
}); });
const formatter = (type, value) => { const formatter = (type, value) => {
if (type === 'year') { if (type === 'year') {
return `${value}`; return `${value}`;
} }
if (type === 'month') { if (type === 'month') {
return `${value}`; return `${value}`;
} }
if (type === 'day') { if (type === 'day') {
return `${value}`; return `${value}`;
} }
return value; return value;
}; };
// //
const updateImgFn = async () => { const updateImgFn = async () => {
uni.chooseImage({ uni.chooseImage({
count: 1, count: 1,
sizeType: ['original', 'compressed'], sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'], sourceType: ['album', 'camera'],
success: (res) => { success: (res) => {
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(pic) console.log(pic)
uni.$u.toast('上传成功') uni.$u.toast('上传成功')
} }
}).catch(err => { }).catch(err => {
//console.log('err', err); //console.log('err', err);
// uni.$u.toast('') // uni.$u.toast('')
}) })
}, },
fail: function(err) { fail: function(err) {
//console.log('choose'); //console.log('choose');
uni.$u.toast('添加失败') uni.$u.toast('添加失败')
} }
}); });
// let res = await Uploads() // let res = await Uploads()
// data.formData.pic = res.data.image // data.formData.pic = res.data.image
} }
const navgo = (url) => { const navgo = (url) => {
uni.navigateTo({ uni.navigateTo({
url url
}) })
} }
const addFn = () => { const addFn = () => {
form.value.validate().then(res => { form.value.validate().then(res => {
// console.log(res) // console.log(res)
if (res) { if (res) {
if (formData.area > dataobj.area) { if (formData.area > dataobj.area) {
uni.$u.toast('作业面积不能超过种植面积') uni.$u.toast('作业面积不能超过种植面积')
return return
} }
formData.pic = pic formData.pic = pic
let data1 = { let data1 = {
plant_id: task_id.value, plant_id: task_id.value,
type: 1, type: 1,
detail: JSON.stringify(formData) detail: JSON.stringify(formData)
}; };
if (formData.pic.length == 0) { if (formData.pic.length == 0) {
uni.$u.toast('请上传图片') uni.$u.toast('请上传图片')
return return
} }
let endTime = new Date(formData.end_date) let endTime = new Date(formData.end_date)
let startTime = new Date(formData.start_date) let startTime = new Date(formData.start_date)
let plantTime = new Date(dataobj.plant_date) let plantTime = new Date(dataobj.plant_date)
console.log(startTime<plantTime,endTime<plantTime) console.log(startTime < plantTime, endTime < plantTime)
if(startTime<plantTime ){ if (startTime < plantTime) {
uni.$u.toast("施肥时间必须超过种植的时间"); uni.$u.toast("施肥时间必须超过种植的时间");
return return
} }
if(endTime<plantTime){ if (endTime < plantTime) {
uni.$u.toast("施肥时间必须超过种植的时间"); uni.$u.toast("施肥时间必须超过种植的时间");
return return
} }
if (endTime < startTime) { if (endTime < startTime) {
uni.$u.toast("结束时间不能小于开始时间"); uni.$u.toast("结束时间不能小于开始时间");
return return
} else if (startTime > endTime) { } else if (startTime > endTime) {
uni.$u.toast("开始时间不能大于结束时间"); uni.$u.toast("开始时间不能大于结束时间");
return return
} else { } else {
console.log("开始时间和结束时间合法"); console.log("开始时间和结束时间合法");
} }
console.log('表单通过'); console.log('表单通过');
// //
addaction(data1).then((res) => { addaction(data1).then((res) => {
// console.log(res) // console.log(res)
if (res.code == 1) { if (res.code == 1) {
uni.$u.toast(res.msg) uni.$u.toast(res.msg)
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
} }
}) })
// uni.$u.toast('') // uni.$u.toast('')
} }
}).catch((err) => { }).catch((err) => {
console.log(err) console.log(err)
}) })
} }
// //
const perviewFn = (url) => { const perviewFn = (url) => {
uni.previewImage({ uni.previewImage({
urls: [url] urls: [url]
}) })
} }
// //
const delimg = (i) => { const delimg = (i) => {
pic.splice(i, 1); pic.splice(i, 1);
} }
const getlist = () => { const getlist = () => {
plantdetail({ plantdetail({
plant_id: task_id.value plant_id: task_id.value
}).then((res) => { }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
// console.log(res) // console.log(res)
Object.assign(dataobj, res.data) Object.assign(dataobj, res.data)
} }
}); });
}; };
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);
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
} }
getlist() getlist()
}) })
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.content { page {
padding-bottom: 100rpx; background-color: #f7fffc;
}
.tit { }
display: flex;
justify-content: space-between;
}
.card-li-tit { .card {
position: relative; background-color: #f7fffc;
padding: 0;
padding-bottom: 80rpx;
span { .c-title {
position: absolute; font-weight: bold;
left: -9px; display: flex;
color: #f56c6c; align-items: center;
line-height: 20px; padding: 30rpx;
font-size: 20px; padding-bottom: 15rpx;
top: 3px;
}
margin-bottom: 20rpx; &:before {
} content: '';
display: inline-block;
height: 0.8rem;
width: 6rpx;
margin-top: 0.2rem;
margin-right: 10rpx;
background-color: #35d190;
border-radius: 6rpx;
}
}
.confim-btn { .c-box {
margin: 0 auto; background-color: #fff;
width: 196.26rpx; padding-left: 30rpx;
height: 66.59rpx; padding-right: 20rpx;
/* border: ; */ padding-bottom: 20rpx;
border: #00A15E 1px solid; box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
color: #00A15E; }
display: flex;
align-items: center;
justify-content: center;
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
}
.up-img { .c-box-p {
width: 341.71rpx padding: 20rpx;
} }
.today-btn { .btn {
width: 588.79rpx; margin: 20rpx auto;
background-color: #00A15E; width: 694rpx;
color: white; height: 80rpx;
position: fixed; border-radius: 80rpx;
bottom: 40rpx; background-color: #4ad69b;
/* transform: ; */ color: #fff;
left: 50%; }
transform: translateX(-50%); }
background: linear-gradient(to right, #00A15E, #4CC593);
/* margin: 0 auto; */
}
.code-img { .tit {
background-color: #F4F4F4; display: flex;
height: 350.47rpx; justify-content: space-between;
position: relative; }
/* margin-bottom: 100rpx; */
.carime-icon { .card-li {
position: absolute; position: relative;
top: 50%; margin-bottom: 0;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
}
} span {
position: absolute;
left: -9px;
color: #f56c6c;
line-height: 20px;
font-size: 20px;
top: 3px;
}
.confirm { }
position: fixed;
height: 84.11rpx;
display: flex;
bottom: 30rpx;
width: 750rpx;
.confirm-btn { .confim-btn {
width: 315.42rpx; margin: 0 auto;
height: 84.11rpx; width: 196.26rpx;
border: #00A15E 1px solid; height: 66.59rpx;
margin: 0 auto; /* border: ; */
border-radius: 80rpx; border: #00A15E 1px solid;
text-align: center; color: #00A15E;
line-height: 84rpx; 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> </style>

View File

@ -2,65 +2,70 @@
<!-- 播种 --> <!-- 播种 -->
<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 labelWidth='100' :model="formData" :rules="rules" ref="form">
<view class="c-title">收获信息</view>
<view class="c-box">
<!-- <u-form-item label="作业地块" prop="formData.breed" borderBottom required>
<up-input input-align="right" placeholder="请输入作业地块" :disabled="mode=='detail'" border="none"
v-model="formData.breed"></up-input>
</u-form-item> -->
<u-form-item label="参与人员" prop="user" borderBottom required>
<up-input input-align="right" placeholder="请输入参与人姓名" :disabled="mode=='detail'" type="txt" border="none"
v-model="formData.user"></up-input>
</u-form-item>
<u-form-item label="作业面积" prop="formData.breed" borderBottom required>
<up-input input-align="right" placeholder="请输入作业面积" :disabled="mode=='detail'" type="number" border="none"
v-model="formData.breed"></up-input>
</u-form-item>
<u-form-item label="收获日期" prop="start_date" borderBottom required>
<up-input input-align="right" placeholder="请选择日期" suffixIcon="arrow-down"
suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.start_date"
style="pointer-events: none;"></up-input>
</u-form-item>
</view>
<!-- <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">
<view class="card-li-tit"> <view class="c-title">收获图片</view>
<span>*</span> <view class="c-box c-box-p">
收获图片 <view class="code-img1">
</view> <view class="" v-if="pic.length>0"
<view class="code-img1"> style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;">
<view class="" v-if="pic.length>0" <view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;">
style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;"> <view class="">
<view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;"> <u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)"
<view class=""> v-show="mode=='add'"></u-icon>
<u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)" <u-image :src="item" width="150.85rpx" height="150.85rpx" @click="perviewFn(item)"></u-image>
v-show="mode=='add'"></u-icon> </view>
<u-image :src="item" width="150.85rpx" height="150.85rpx" @click="perviewFn(item)"></u-image> </view>
</view> </view>
</view>
</view>
</view> </view>
<view class="code-img" v-if="mode=='add'"> <view class="code-img" v-if="mode=='add'">
<view class="" @click="updateImgFn"> <view class="" @click="updateImgFn">
<view class="carime-icon"> <view class="carime-icon">
<u-image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u-image> <u-image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u-image>
<view class=""> <view class="">
点击上传图片 点击上传图片
</view> </view>
</view> </view>
</view> </view>
</view>
</view> </view>
</view> </view>
<u-form-item label="备注" prop="remark" borderBottom >
<u--textarea v-model="formData.remark" :disabled="mode=='detail'" placeholder="请输入内容"></u--textarea> <view class="c-title">备注信息</view>
</u-form-item> <view class="c-box" style="padding: 0 20rpx;">
<u-form-item prop="remark" borderBottom>
<u--textarea v-model="formData.remark" :disabled="mode=='detail'" placeholder="请输入内容"></u--textarea>
</u-form-item>
</view>
</u--form> </u--form>
<u-button class="btn" v-if="mode=='add'" @click="addFn">完成添加</u-button>
</view>
<view class="confirm" v-if="mode=='add'">
<view class="confirm-btn" style="color: white;background-color: #0AA565;" @click="addFn">
完成添加
</view>
</view> </view>
@ -91,7 +96,8 @@
const formData = reactive({ const formData = reactive({
user: "", user: "",
remark: "", remark: "",
pic: [] pic: [],
start_date: ''
}) })
const dateConfirmfn = (e) => { const dateConfirmfn = (e) => {
console.log(e) console.log(e)
@ -232,93 +238,139 @@
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.content { page {
padding-bottom: 100rpx; background-color: #f7fffc;
} }
.tit { .card {
display: flex; background-color: #f7fffc;
justify-content: space-between; padding: 0;
} padding-bottom: 80rpx;
.card-li-tit { .c-title {
position: relative; font-weight: bold;
display: flex;
align-items: center;
padding: 30rpx;
padding-bottom: 15rpx;
span { &:before {
position: absolute; content: '';
left: -9px; display: inline-block;
color: #f56c6c; height: 0.8rem;
line-height: 20px; width: 6rpx;
font-size: 20px; margin-top: 0.2rem;
top: 3px; margin-right: 10rpx;
} background-color: #35d190;
border-radius: 6rpx;
}
}
margin-bottom: 20rpx; .c-box {
} background-color: #fff;
padding-left: 30rpx;
padding-right: 20rpx;
padding-bottom: 20rpx;
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
}
.confim-btn { .c-box-p {
margin: 0 auto; padding: 20rpx;
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 { .btn {
width: 341.71rpx margin: 20rpx auto;
} width: 694rpx;
height: 80rpx;
border-radius: 80rpx;
background-color: #4ad69b;
color: #fff;
}
}
.today-btn { .tit {
width: 588.79rpx; display: flex;
background-color: #00A15E; justify-content: space-between;
color: white; }
position: fixed;
bottom: 40rpx;
/* transform: ; */
left: 50%;
transform: translateX(-50%);
background: linear-gradient(to right, #00A15E, #4CC593);
/* margin: 0 auto; */
}
.code-img { .card-li {
background-color: #F4F4F4; position: relative;
height: 350.47rpx; margin-bottom: 0;
position: relative;
/* margin-bottom: 100rpx; */
.carime-icon { span {
position: absolute; position: absolute;
top: 50%; left: -9px;
left: 50%; color: #f56c6c;
transform: translate(-50%, -50%); line-height: 20px;
display: flex; font-size: 20px;
flex-direction: column; top: 3px;
align-items: center; }
}
} }
.confirm { .confim-btn {
position: fixed; margin: 0 auto;
height: 84.11rpx; width: 196.26rpx;
display: flex; height: 66.59rpx;
bottom: 30rpx; /* border: ; */
width: 750rpx; border: #00A15E 1px solid;
color: #00A15E;
display: flex;
align-items: center;
justify-content: center;
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
}
.confirm-btn { .up-img {
width: 315.42rpx; width: 341.71rpx
height: 84.11rpx; }
border: #00A15E 1px solid;
margin: 0 auto; .today-btn {
border-radius: 80rpx; width: 588.79rpx;
text-align: center; background-color: #00A15E;
line-height: 84rpx; 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> </style>

View File

@ -1,474 +1,520 @@
<template> <template>
<!-- 播种 --> <!-- 灌溉 -->
<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 labelWidth='100' :model="formData" :rules="rules" ref="form">
<u-form-item label="灌溉方式" prop="type" borderBottom required @click="showggai"> <view class="c-title">灌溉信息</view>
<!-- <uni-data-select v-model="formData.type" :disabled="mode=='detail'" <view class="c-box">
:localdata="range"></uni-data-select> --> <u-form-item label="灌溉方式" prop="type" borderBottom required @click="showggai">
<up-input placeholder="请选择灌溉方式" readonly border="surround" v-model="formDatatype" <!-- <uni-data-select v-model="formData.type" :disabled="mode=='detail'"
style="pointer-events: none;"></up-input> :localdata="range"></uni-data-select> -->
</u-form-item> <up-input input-align="right" placeholder="请选择灌溉方式" readonly border="none" v-model="formDatatype"
style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="灌溉面积(亩)" prop="area" borderBottom required>
<up-input input-align="right" placeholder="请输入作业面积" :disabled="mode=='detail'" type="number" border="none"
v-model="formData.area"></up-input>
</u-form-item>
<u-form-item label="参与人员" prop="user" borderBottom required>
<up-input input-align="right" placeholder="请输入参与人姓名" :disabled="mode=='detail'" type="txt" border="none"
v-model="formData.user"></up-input>
</u-form-item>
<view class="" v-if="mode=='add'">
<u-form-item label="开始日期" @click="openDate" prop="start_date" borderBottom required>
<up-input input-align="right" placeholder="请选择日期" suffixIcon="arrow-down"
suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.start_date"
style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="结束日期" prop="end_date" @click="openDate1" borderBottom required>
<up-input input-align="right" placeholder="请选择日期" suffixIcon="arrow-down"
suffix-icon-style="color: #b6b6b6;" readonly border="none" 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 input-align="right" placeholder="请选择日期" suffixIcon="arrow-down"
suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.start_date"
style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="结束日期" prop="end_date" borderBottom required>
<up-input input-align="right" placeholder="请选择日期" suffixIcon="arrow-down"
suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.end_date"
style="pointer-events: none;"></up-input>
</u-form-item>
</view>
</view>
<view class="" v-if="mode=='add'"> <view class="card-li">
<u-form-item label="开始日期" @click="openDate" prop="start_date" borderBottom required> <view class="c-title">灌溉图片</view>
<up-input placeholder="请选择日期" readonly border="surround" v-model="formData.start_date" <view class="c-box c-box-p">
style="pointer-events: none;"></up-input> <view class="code-img1">
</u-form-item> <view class="" v-if="pic.length>0"
<u-form-item label="结束日期" prop="end_date" @click="openDate1" borderBottom required> style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;">
<up-input placeholder="请选择日期" readonly border="surround" v-model="formData.end_date" <view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;">
style="pointer-events: none;"></up-input> <view class="">
</u-form-item> <u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)"
</view> v-show="mode=='add'"></u-icon>
<view class="" v-else> <u-image :src="item" width="150.85rpx" height="150.85rpx" @click="perviewFn(item)"></u-image>
<u-form-item label="开始日期" prop="start_date" borderBottom required> </view>
<up-input placeholder="请选择日期" readonly border="surround" v-model="formData.start_date" </view>
style="pointer-events: none;"></up-input> </view>
</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>
</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">
<span>*</span>
灌溉图片
</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>
<view class="code-img" v-if="mode=='add'"> <view class="code-img" v-if="mode=='add'">
<view class="" @click="updateImgFn"> <view class="" @click="updateImgFn">
<view class="carime-icon"> <view class="carime-icon">
<u-image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u-image> <u-image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u-image>
<view class=""> <view class="">
点击上传图片 点击上传图片
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<u-form-item label="备注" prop="remark" borderBottom > </view>
<u--textarea v-model="formData.remark" :disabled="mode=='detail'" placeholder="请输入内容"></u--textarea>
</u-form-item>
</u--form> <view class="c-title">备注信息</view>
<view> <view class="c-box" style="padding: 0 20rpx;">
<!-- <uni-calendar ref="calendar" :showMonth="true" :lunar="true" :insert="false" @confirm="dateConfirmfn" /> <u-form-item prop="remark" borderBottom>
<u--textarea v-model="formData.remark" :disabled="mode=='detail'" placeholder="请输入内容"></u--textarea>
</u-form-item>
</view>
</u--form>
<view>
<!-- <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" <u-action-sheet :show="showgg" :actions="range" title="请选择灌溉方式" @close="showgg = false" @select="ggSelect">
@select="ggSelect"> </u-action-sheet>
</u-action-sheet> </view>
</view> <u-button class="btn" v-if="mode=='add'" @click="addFn">完成添加</u-button>
</view> </view>
<view class="confirm" v-if="mode=='add'"> </view>
<view class="confirm-btn" style="color: white;background-color: #0AA565;" @click="addFn">
完成添加
</view>
</view>
</view>
</template> </template>
<script setup> <script setup>
import { import {
Uploads Uploads
} from "@/api/upload.js" } from "@/api/upload.js"
import { import {
reactive, reactive,
ref ref
} from "vue"; } from "vue";
import { import {
onLoad, onLoad,
onReady, onReady,
} from "@dcloudio/uni-app" } from "@dcloudio/uni-app"
import { import {
addaction, addaction,
plantdetail plantdetail
} 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('');
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 formDatatype = ref('')
const showgg = ref(false) const showgg = ref(false)
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 show2 = ref(false);
const dataobj = reactive({}) const dataobj = reactive({})
const openDate = () => { const openDate = () => {
// calendar.value.open() // calendar.value.open()
show1.value = true show1.value = true
} }
const openDate1 = () => { const openDate1 = () => {
// calendar1.value.open() // calendar1.value.open()
show2.value = true show2.value = true
} }
const formatter = (type, value) => { const formatter = (type, value) => {
if (type === 'year') { if (type === 'year') {
return `${value}`; return `${value}`;
} }
if (type === 'month') { if (type === 'month') {
return `${value}`; return `${value}`;
} }
if (type === 'day') { if (type === 'day') {
return `${value}`; return `${value}`;
} }
return value; return value;
}; };
// console.log() // console.log()
const formData = reactive({ const formData = reactive({
type: "", type: "",
}) })
// //
const ggSelect = (e) => { const ggSelect = (e) => {
formDatatype.value = e.name formDatatype.value = e.name
formData.type = e.value formData.type = e.value
} }
// //
const showggai = () => { const showggai = () => {
showgg.value = true 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) => { const dateConfirmfn1 = (e) => {
formData.end_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ') formData.end_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
show2.value = false show2.value = false
} }
const rules = { const rules = {
'type': { 'type': {
type: 'number', type: 'number',
required: true, required: true,
message: '请选择灌溉方式', message: '请选择灌溉方式',
trigger: ['change'] trigger: ['change']
}, },
'start_date': { 'start_date': {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写开始日期', message: '请填写开始日期',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
'end_date': { 'end_date': {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写结束日期', message: '请填写结束日期',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
'area': { 'area': {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写土地面积', message: '请填写土地面积',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
'user': { 'user': {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写参与人', message: '请填写参与人',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
} }
// , // ,
// 'remark': { // 'remark': {
// type: 'string', // type: 'string',
// required: true, // required: true,
// message: '', // message: '',
// trigger: ['blur', 'change'] // trigger: ['blur', 'change']
// }, // },
} }
onReady(() => { onReady(() => {
form.value.setRules(rules); form.value.setRules(rules);
}); });
const navgo = (url) => { const navgo = (url) => {
uni.navigateTo({ uni.navigateTo({
url url
}) })
} }
const addFn = () => { const addFn = () => {
// console.log(formData) // console.log(formData)
form.value.validate().then(res => { form.value.validate().then(res => {
if (res) { if (res) {
if (formData.area > dataobj.area) { if (formData.area > dataobj.area) {
uni.$u.toast('灌溉面积不能超过种植面积') uni.$u.toast('灌溉面积不能超过种植面积')
return return
} }
formData.pic = pic formData.pic = pic
let data1 = { let data1 = {
plant_id: task_id.value, plant_id: task_id.value,
type: 3, type: 3,
detail: JSON.stringify(formData) detail: JSON.stringify(formData)
}; };
if (formData.pic.length == 0) { if (formData.pic.length == 0) {
uni.$u.toast('请上传图片') uni.$u.toast('请上传图片')
return return
} }
let endTime = new Date(formData.end_date) let endTime = new Date(formData.end_date)
let startTime = new Date(formData.start_date) let startTime = new Date(formData.start_date)
let plantTime = new Date(dataobj.plant_date) let plantTime = new Date(dataobj.plant_date)
if (startTime < plantTime) { if (startTime < plantTime) {
uni.$u.toast("灌溉时间必须超过种植的时间"); uni.$u.toast("灌溉时间必须超过种植的时间");
return return
} }
if (endTime < plantTime) { if (endTime < plantTime) {
uni.$u.toast("灌溉时间必须超过种植的时间"); uni.$u.toast("灌溉时间必须超过种植的时间");
return return
} }
if (endTime < startTime) { if (endTime < startTime) {
uni.$u.toast("结束时间不能小于开始时间"); uni.$u.toast("结束时间不能小于开始时间");
return return
} else if (startTime > endTime) { } else if (startTime > endTime) {
uni.$u.toast("开始时间不能大于结束时间"); uni.$u.toast("开始时间不能大于结束时间");
return return
} else { } else {
console.log("开始时间和结束时间合法"); console.log("开始时间和结束时间合法");
} }
// //
addaction(data1).then((res) => { addaction(data1).then((res) => {
console.log(res) console.log(res)
if (res.code == 1) { if (res.code == 1) {
uni.$u.toast(res.msg) uni.$u.toast(res.msg)
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
} }
}) })
// uni.$u.toast('') // uni.$u.toast('')
} }
}).catch((err)=>{ }).catch((err) => {
uni.$u.toast(err[0].message) uni.$u.toast(err[0].message)
console.log(err) console.log(err)
}) })
} }
// //
const perviewFn = (url) => { const perviewFn = (url) => {
console.log(url) console.log(url)
uni.previewImage({ uni.previewImage({
urls: [url] urls: [url]
}) })
} }
// //
const delimg = (i) => { const delimg = (i) => {
pic.splice(i, 1); pic.splice(i, 1);
} }
// //
const updateImgFn = async () => { const updateImgFn = async () => {
uni.chooseImage({ uni.chooseImage({
count: 1, count: 1,
sizeType: ['original', 'compressed'], sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'], sourceType: ['album', 'camera'],
success: (res) => { success: (res) => {
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(data.formData)
uni.$u.toast('上传成功') uni.$u.toast('上传成功')
} }
}).catch(err => { }).catch(err => {
//console.log('err', err); //console.log('err', err);
// uni.$u.toast('') // uni.$u.toast('')
}) })
}, },
fail: function(err) { fail: function(err) {
//console.log('choose'); //console.log('choose');
uni.$u.toast('添加失败') uni.$u.toast('添加失败')
} }
}); });
// let res = await Uploads() // let res = await Uploads()
// data.formData.pic = res.data.image // data.formData.pic = res.data.image
} }
const getlist = () => { const getlist = () => {
plantdetail({ plantdetail({
plant_id: task_id.value plant_id: task_id.value
}).then((res) => { }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
// console.log(res) // console.log(res)
Object.assign(dataobj, res.data) Object.assign(dataobj, res.data)
} }
}); });
}; };
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; 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
} }
getlist() getlist()
}) })
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.content { page {
padding-bottom: 100rpx; background-color: #f7fffc;
} }
.tit { .card {
display: flex; background-color: #f7fffc;
justify-content: space-between; padding: 0;
} padding-bottom: 80rpx;
.card-li-tit { .c-title {
position: relative; font-weight: bold;
display: flex;
align-items: center;
padding: 30rpx;
padding-bottom: 15rpx;
span { &:before {
position: absolute; content: '';
left: -9px; display: inline-block;
color: #f56c6c; height: 0.8rem;
line-height: 20px; width: 6rpx;
font-size: 20px; margin-top: 0.2rem;
top: 3px; margin-right: 10rpx;
} background-color: #35d190;
border-radius: 6rpx;
}
}
margin-bottom: 20rpx; .c-box {
} background-color: #fff;
padding-left: 30rpx;
padding-right: 20rpx;
padding-bottom: 20rpx;
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
}
.confim-btn { .c-box-p {
margin: 0 auto; padding: 20rpx;
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 { .btn {
width: 341.71rpx margin: 20rpx auto;
} width: 694rpx;
height: 80rpx;
border-radius: 80rpx;
background-color: #4ad69b;
color: #fff;
}
}
.today-btn { .tit {
width: 588.79rpx; display: flex;
background-color: #00A15E; justify-content: space-between;
color: white; }
position: fixed;
bottom: 40rpx;
/* transform: ; */
left: 50%;
transform: translateX(-50%);
background: linear-gradient(to right, #00A15E, #4CC593);
/* margin: 0 auto; */
}
.code-img { .card-li {
background-color: #F4F4F4; position: relative;
height: 350.47rpx; margin-bottom: 0;
position: relative;
/* margin-bottom: 100rpx; */
.carime-icon { span {
position: absolute; position: absolute;
top: 50%; left: -9px;
left: 50%; color: #f56c6c;
transform: translate(-50%, -50%); line-height: 20px;
display: flex; font-size: 20px;
flex-direction: column; top: 3px;
align-items: center; }
}
} }
.confirm { .confim-btn {
position: fixed; margin: 0 auto;
height: 84.11rpx; width: 196.26rpx;
display: flex; height: 66.59rpx;
bottom: 30rpx; /* border: ; */
width: 750rpx; border: #00A15E 1px solid;
color: #00A15E;
display: flex;
align-items: center;
justify-content: center;
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
}
.confirm-btn { .up-img {
width: 315.42rpx; width: 341.71rpx
height: 84.11rpx; }
border: #00A15E 1px solid;
margin: 0 auto; .today-btn {
border-radius: 80rpx; width: 588.79rpx;
text-align: center; background-color: #00A15E;
line-height: 84rpx; 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> </style>

View File

@ -1,384 +1,419 @@
<template> <template>
<!-- 播种 --> <!-- 播种 -->
<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 labelWidth='100' :model="data.formData" ref="form1">
<u-form-item label="种植种类" prop="kind" borderBottom ref='item1' required> <view class="c-title">种植信息</view>
<up-input placeholder="请输入种植种类" :disabled="mode=='detail'" border="surround" <view class="c-box">
v-model="data.formData.kind"></up-input> <u-form-item label="种植种类" prop="kind" borderBottom ref='item1' required>
</u-form-item> <up-input input-align="right" placeholder="请输入种类" :disabled="mode=='detail'" border="none"
<u-form-item label="种植品种" prop="breed" borderBottom required> v-model="data.formData.kind"></up-input>
<up-input placeholder="请输入品种" :disabled="mode=='detail'" border="surround" </u-form-item>
v-model="data.formData.breed"></up-input> <u-form-item label="种植品种" prop="breed" borderBottom required>
</u-form-item> <up-input input-align="right" placeholder="请输入品种" :disabled="mode=='detail'" border="none"
<u-form-item label="开始日期" prop="date" borderBottom required @click="openDate"> v-model="data.formData.breed"></up-input>
<up-input placeholder="请选择日期" readonly border="surround" v-model="data.formData.date" </u-form-item>
style="pointer-events: none;"></up-input> <u-form-item label="种植面积(亩)" prop="area" borderBottom required>
</u-form-item> <up-input input-align="right" placeholder="请输入种植面积" :disabled="mode=='detail'" type="number" border="none"
v-model="data.formData.area"></up-input>
</u-form-item>
<u-form-item label="参与人员" prop="user" borderBottom required>
<up-input input-align="right" placeholder="请输入参与人姓名" :disabled="mode=='detail'" type="txt" border="none"
v-model="data.formData.user"></up-input>
</u-form-item>
<u-form-item label="种植开始日期" prop="date" borderBottom required @click="openDate">
<up-input input-align="right" placeholder="请选择日期" suffixIcon="arrow-down" suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="data.formData.date"
style="pointer-events: none;"></up-input>
</u-form-item>
</view>
<u-form-item label="种植面积(亩)" prop="area" borderBottom required> <view class="card-li">
<up-input placeholder="请输入种植面积" :disabled="mode=='detail'" type="number" border="surround" <view class="c-title">种植图片</view>
v-model="data.formData.area"></up-input> <view class="c-box c-box-p">
</u-form-item> <view class="code-img1">
<u-form-item label="参与人" prop="user" borderBottom required> <view class="" v-if="pic.length>0"
<up-input placeholder="请输入参与人" :disabled="mode=='detail'" type="txt" border="surround" style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;">
v-model="data.formData.user"></up-input> <view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;">
</u-form-item> <view class="">
<view class="card-li"> <u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)"
<view class="card-li-tit"> v-show="mode=='add'"></u-icon>
<span>*</span> <u-image :src="item" width="150.85rpx" height="150.85rpx" @click="perviewFn(item)"></u-image>
种植图片 </view>
</view> </view>
<view class="code-img1"> </view>
<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>
<view class="code-img"> <view class="code-img">
<view class="" @click="updateImgFn"> <view class="" @click="updateImgFn">
<view class="carime-icon"> <view class="carime-icon">
<u-image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u-image> <u-image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u-image>
<view class=""> <view class="">
点击上传图片 点击上传图片
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<u-form-item label="备注" borderBottom> </view>
<u--textarea v-model="data.formData.remark" :disabled="mode=='detail'"
placeholder="请输入内容"></u--textarea>
</u-form-item>
</u-form> <view class="c-title">备注信息</view>
<view> <view class="c-box" style="padding: 0 20rpx;">
<!-- <uni-calendar ref="calendar" :showMonth="true" :lunar="true" :insert="false" @confirm="dateConfirmfn" /> --> <u-form-item borderBottom>
<u-datetime-picker :show="show" v-model="value1" mode="datetime" @confirm="dateConfirmfn" <u--textarea v-model="data.formData.remark" :disabled="mode=='detail'" placeholder="请输入内容"></u--textarea>
:formatter="formatter" @cancel="show=false"></u-datetime-picker> </u-form-item>
</view>
</u-form>
<view>
<!-- <uni-calendar ref="calendar" :showMonth="true" :lunar="true" :insert="false" @confirm="dateConfirmfn" /> -->
<u-datetime-picker :show="show" v-model="value1" mode="date" @confirm="dateConfirmfn" :formatter="formatter"
@cancel="show=false"></u-datetime-picker>
</view>
</view> <u-button class="btn" v-if="mode=='add'" @click="addFn">完成添加</u-button>
</view> </view>
</view>
<view class="confirm" v-if="mode=='add'">
<view class="confirm-btn" style="color: white;background-color: #0AA565;" @click="addFn">
完成添加
</view>
</view>
</view>
</template> </template>
<script setup> <script setup>
import { import {
Uploads Uploads
} from "@/api/upload.js" } from "@/api/upload.js"
import { import {
reactive, reactive,
ref ref
} from "vue"; } from "vue";
import { import {
onLoad, onLoad,
onReady onReady
} from "@dcloudio/uni-app" } from "@dcloudio/uni-app"
import { import {
addplant addplant
} from '@/api/api.js' } from '@/api/api.js'
const calendar = ref(null) const calendar = ref(null)
const form1 = ref(null); const form1 = ref(null);
const task_id = ref(''); const task_id = ref('');
const pic = reactive([]); const pic = reactive([]);
const value1 = ref(Date.now()); const value1 = ref(Date.now());
const show = ref(false); const show = ref(false);
const data = reactive({ const data = reactive({
formData: { formData: {
kind: '', kind: '',
breed: '', breed: '',
area: '', area: '',
user: '', user: '',
date: '', date: '',
remark: '', remark: '',
pic: [] pic: []
}, },
rules: { rules: {
kind: [{ kind: [{
type: 'string', type: 'string',
required: true, required: true,
message: '请填写种植种类', message: '请填写种植种类',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}], }],
breed: [{ breed: [{
type: 'string', type: 'string',
required: true, required: true,
message: '请填写种植品种', message: '请填写种植品种',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}], }],
area: [{ area: [{
type: 'string', type: 'string',
required: true, required: true,
message: '请填写种植面积', message: '请填写种植面积',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}], }],
user: [{ user: [{
type: 'string', type: 'string',
required: true, required: true,
message: '请填写参与人员', message: '请填写参与人员',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}], }],
date: [{ date: [{
type: 'string', type: 'string',
required: true, required: true,
message: '请填写开始日期', message: '请填写开始日期',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}] }]
} }
}) })
onReady(() => { onReady(() => {
form1.value.setRules(data.rules); form1.value.setRules(data.rules);
}); });
const openDate = () => { const openDate = () => {
// calendar.value.open() // calendar.value.open()
show.value = true show.value = true
}
const formatter = (type, value) => {
if (type === 'year') {
return `${value}`;
} }
if (type === 'month') { const formatter = (type, value) => {
return `${value}`; if (type === 'year') {
return `${value}`;
}
if (type === 'month') {
return `${value}`;
}
if (type === 'day') {
return `${value}`;
}
return value;
};
const dateConfirmfn = (e) => {
data.formData.date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
show.value = false
} }
if (type === 'day') {
return `${value}`; //
const delimg = (i) => {
pic.splice(i, 1);
} }
return value;
};
const dateConfirmfn = (e) => { const navgo = (url) => {
data.formData.date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ') uni.navigateTo({
show.value = false url
} })
}
//
const perviewFn = (url) => {
console.log(url)
uni.previewImage({
urls: [url]
})
}
const addFn = async () => {
console.log(form1.value)
// try {
const delimg = (i) => { const valid = await form1.value.validate();
pic.splice(i, 1);
}
const navgo = (url) => {
uni.navigateTo({
url
})
}
//
const perviewFn = (url) => {
console.log(url)
uni.previewImage({
urls: [url]
})
}
const addFn = async () => {
console.log(form1.value)
try {
const valid = await form1.value.validate();
if (valid) { if (valid) {
data.formData.land_id = task_id.value data.formData.land_id = task_id.value
console.log('表单通过'); console.log('表单通过');
if (pic.length == 0) { if (pic.length == 0) {
uni.$u.toast('请上传图片') uni.$u.toast('请上传图片')
return return
} }
data.formData.pic = JSON.stringify(pic) data.formData.pic = JSON.stringify(pic)
// //
addplant(data.formData).then((res) => { addplant(data.formData).then((res) => {
if (res.code == 1) { if (res.code == 1) {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
uni.$u.toast(res.msg) uni.$u.toast(res.msg)
} }
}) })
} else { } else {
// //
console.log('表单验证未通过'); console.log('表单验证未通过');
} }
} catch (error) { } catch (error) {
// //
console.error(error); console.error(error);
} }
// form.value.validate().then(res => { // form.value.validate().then(res => {
// console.log(6) // console.log(6)
// }).catch(errors => { // }).catch(errors => {
// uni.$u.toast('') // uni.$u.toast('')
// }) // })
// console.log() // console.log()
} }
// //
const updateImgFn = async () => { const updateImgFn = async () => {
uni.chooseImage({ uni.chooseImage({
count: 1, count: 1,
sizeType: ['original', 'compressed'], sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'], sourceType: ['album', 'camera'],
success: (res) => { success: (res) => {
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(pic) console.log(pic)
uni.$u.toast('上传成功') uni.$u.toast('上传成功')
} }
}).catch(err => { }).catch(err => {
//console.log('err', err); //console.log('err', err);
// uni.$u.toast('') // uni.$u.toast('')
}) })
}, },
fail: function(err) { fail: function(err) {
//console.log('choose'); //console.log('choose');
uni.$u.toast('添加失败') uni.$u.toast('添加失败')
} }
}); });
// let res = await Uploads() // let res = await Uploads()
// data.formData.pic = res.data.image // data.formData.pic = res.data.image
} }
const mode = ref('add') const mode = ref('add')
onLoad((options) => { onLoad((options) => {
task_id.value = options.id task_id.value = options.id
// if (options.task_id) { // if (options.task_id) {
// mode.value = "detail" // mode.value = "detail"
// } // }
}) })
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.content { page{
padding-bottom: 100rpx; background-color: #f7fffc;
}
.tit { }
display: flex;
justify-content: space-between;
}
.card-li-tit { .card{
position: relative; background-color: #f7fffc;
padding: 0;
padding-bottom: 80rpx;
.c-title{
font-weight: bold;
display: flex;
align-items: center;
padding: 30rpx;
padding-bottom: 15rpx;
&:before{
content: '';
display: inline-block;
height: 0.8rem;
width: 6rpx;
margin-top: 0.2rem;
margin-right: 10rpx;
background-color: #35d190;
border-radius: 6rpx;
}
}
.c-box{
background-color: #fff;
padding-left: 30rpx;
padding-right: 20rpx;
padding-bottom: 20rpx;
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
}
.c-box-p{
padding: 20rpx;
}
.btn{
margin: 20rpx auto;
width: 694rpx;
height: 80rpx;
border-radius: 80rpx;
background-color: #4ad69b;
color: #fff;
}
}
span { .tit {
position: absolute; display: flex;
left: -9px; justify-content: space-between;
color: #f56c6c; }
line-height: 20px;
font-size: 20px;
top: 3px;
}
margin-bottom: 20rpx; .card-li {
} position: relative;
margin-bottom: 0;
.confim-btn { span {
margin: 0 auto; position: absolute;
width: 196.26rpx; left: -9px;
height: 66.59rpx; color: #f56c6c;
/* border: ; */ line-height: 20px;
border: #00A15E 1px solid; font-size: 20px;
color: #00A15E; top: 3px;
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 { .confim-btn {
width: 588.79rpx; margin: 0 auto;
background-color: #00A15E; width: 196.26rpx;
color: white; height: 66.59rpx;
position: fixed; /* border: ; */
bottom: 40rpx; border: #00A15E 1px solid;
/* transform: ; */ color: #00A15E;
left: 50%; display: flex;
transform: translateX(-50%); align-items: center;
background: linear-gradient(to right, #00A15E, #4CC593); justify-content: center;
/* margin: 0 auto; */ border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
} }
.code-img { .up-img {
background-color: #F4F4F4; width: 341.71rpx
height: 350.47rpx; }
position: relative;
/* margin-bottom: 100rpx; */
.carime-icon { .today-btn {
position: absolute; width: 588.79rpx;
top: 50%; background-color: #00A15E;
left: 50%; color: white;
transform: translate(-50%, -50%); position: fixed;
display: flex; bottom: 40rpx;
flex-direction: column; /* transform: ; */
align-items: center; 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; */
.confirm { .carime-icon {
position: fixed; position: absolute;
height: 84.11rpx; top: 50%;
display: flex; left: 50%;
bottom: 30rpx; transform: translate(-50%, -50%);
width: 750rpx; display: flex;
flex-direction: column;
align-items: center;
}
.confirm-btn { }
width: 315.42rpx;
height: 84.11rpx; .confirm {
border: #00A15E 1px solid; position: fixed;
margin: 0 auto; height: 84.11rpx;
border-radius: 80rpx; display: flex;
text-align: center; bottom: 30rpx;
line-height: 84rpx; 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> </style>

View File

@ -1,469 +1,516 @@
<template> <template>
<!-- 播种 --> <!-- 播种 -->
<view class="content"> <view class="content">
<view class="card"> <view class="card">
<u--form labelPosition="top" labelWidth='120' :model="formData" :rules="rules" ref="form"> <u--form labelWidth='120' :model="formData" :rules="rules" ref="form">
<u-form-item label="除草剂种类" prop="kind" borderBottom ref='item1' required> <view class="c-title">除草信息</view>
<up-input placeholder="请输入除草剂种类" :disabled="mode=='detail'" border="surround" <view class="c-box">
v-model="formData.kind"></up-input> <u-form-item label="除草剂种类" prop="kind" borderBottom ref='item1' required>
</u-form-item> <up-input input-align="right" placeholder="请输入除草剂种类" :disabled="mode=='detail'" border="none"
<u-form-item label="除草剂品牌" prop="breed" borderBottom required> v-model="formData.kind"></up-input>
<up-input placeholder="请输入除草剂品牌" :disabled="mode=='detail'" border="surround" </u-form-item>
v-model="formData.breed"></up-input> <u-form-item label="除草剂品牌" prop="breed" borderBottom required>
</u-form-item> <up-input input-align="right" placeholder="请输入除草剂品牌" :disabled="mode=='detail'" border="none"
<u-form-item label="除草剂用量(斤)" prop="dosage" borderBottom required> v-model="formData.breed"></up-input>
<up-input placeholder="请输入除草剂用量" border="surround" type='number' :disabled="mode=='detail'" </u-form-item>
v-model="formData.dosage"></up-input> <u-form-item label="除草剂用量(斤)" prop="dosage" borderBottom required>
</u-form-item> <up-input input-align="right" placeholder="请输入除草剂用量" border="none" type='number' :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>
</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"> <u-form-item label="作业面积(亩)" prop="area" borderBottom required>
<view class="card-li-tit"> <up-input input-align="right" placeholder="请输入作业面积" :disabled="mode=='detail'" type="number" border="none"
<span>*</span> v-model="formData.area"></up-input>
除草图片 </u-form-item>
</view> <u-form-item label="参与人员" prop="user" borderBottom required>
<view class="code-img1"> <up-input input-align="right" placeholder="请输入参与人姓名" :disabled="mode=='detail'" type="txt" border="none"
<view class="" v-if="pic.length>0" v-model="formData.user"></up-input>
style="display: flex;flex-direction: row;flex-wrap: wrap;margin-bottom: 30rpx;"> </u-form-item>
<view class="" v-for="(item,i) in pic" style="margin-right: 30rpx;"> <view class="" v-if="mode=='add'">
<view class=""> <u-form-item label="开始日期" @click="openDate" prop="start_date" borderBottom required>
<u-icon name="close" size="15" style="margin-left:120.85rpx;" @click="delimg(i)" <up-input input-align="right" placeholder="请选择日期" suffixIcon="arrow-down" suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.start_date"
v-show="mode=='add'"></u-icon> style="pointer-events: none;"></up-input>
<u-image :src="item" width="150.85rpx" height="150.85rpx" </u-form-item>
@click="perviewFn(item)"></u-image> <u-form-item label="结束日期" prop="end_date" @click="openDate1" borderBottom required>
</view> <up-input input-align="right" placeholder="请选择日期" suffixIcon="arrow-down" suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.end_date"
</view> style="pointer-events: none;"></up-input>
</view> </u-form-item>
</view>
<view class="" v-else>
<u-form-item label="开始日期" prop="start_date" borderBottom required>
<up-input input-align="right" placeholder="请选择日期" suffixIcon="arrow-down" suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.start_date"
style="pointer-events: none;"></up-input>
</u-form-item>
<u-form-item label="结束日期" prop="end_date" borderBottom required>
<up-input input-align="right" placeholder="请选择日期" suffixIcon="arrow-down" suffix-icon-style="color: #b6b6b6;" readonly border="none" v-model="formData.end_date"
style="pointer-events: none;"></up-input>
</u-form-item>
</view>
</view>
</view> <view class="card-li">
<view class="code-img" v-if="mode=='add'"> <view class="c-title">除草图片</view>
<view class="" @click="updateImgFn"> <view class="c-box c-box-p">
<view class="carime-icon"> <view class="code-img1">
<u-image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u-image> <view class="" v-if="pic.length>0"
<view class=""> 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> <view class="">
</view> <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>
<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>
<u--textarea v-model="formData.remark" :disabled="mode=='detail'" placeholder="请输入内容"></u--textarea>
</u-form-item>
</u--form> </view>
<view> </view>
<!-- <uni-calendar ref="calendar" :showMonth="true" :lunar="true" :insert="false" @confirm="dateConfirmfn" /> </view>
<view class="c-title">备注信息</view>
<view class="c-box" style="padding: 0 20rpx;">
<u-form-item prop="remark" borderBottom>
<u--textarea v-model="formData.remark" :disabled="mode=='detail'" placeholder="请输入内容"></u--textarea>
</u-form-item>
</view>
</u--form>
<view>
<!-- <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>
</view> </view>
</view> <u-button class="btn" v-if="mode=='add'" @click="addFn">完成添加</u-button>
</view>
<view class="confirm" v-if="mode=='add'">
<view class="confirm-btn" style="color: white;background-color: #0AA565;" @click="addFn">
完成添加
</view>
</view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { import {
Uploads Uploads
} from "@/api/upload.js" } from "@/api/upload.js"
import { import {
reactive, reactive,
ref ref
} from "vue"; } from "vue";
import { import {
onLoad, onLoad,
onReady onReady
} from '@dcloudio/uni-app'; } from '@dcloudio/uni-app';
import { import {
addaction, addaction,
plantdetail plantdetail
} from '@/api/api.js' } from '@/api/api.js'
const pic = reactive([]); const pic = reactive([]);
const calendar = ref(null) const calendar = ref(null)
const calendar1 = ref(null) const calendar1 = ref(null)
const form = ref(null) const form = ref(null)
const task_id = ref(''); 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);
const openDate = () => { const openDate = () => {
// calendar.value.open() // calendar.value.open()
show1.value = true show1.value = true
} }
const dataobj = reactive({}) const dataobj = reactive({})
const openDate1 = () => { const openDate1 = () => {
// calendar1.value.open() // calendar1.value.open()
show2.value = true show2.value = true
} }
const formatter = (type, value) => { const formatter = (type, value) => {
if (type === 'year') { if (type === 'year') {
return `${value}`; return `${value}`;
} }
if (type === 'month') { if (type === 'month') {
return `${value}`; return `${value}`;
} }
if (type === 'day') { if (type === 'day') {
return `${value}`; return `${value}`;
} }
return value; return value;
}; };
// console.log() // console.log()
const formData = reactive({ const formData = reactive({
kind: "", kind: "",
breed: "", breed: "",
dosage: "", dosage: "",
start_date: "", start_date: "",
dosage: "", dosage: "",
end_date: "", end_date: "",
}) })
// //
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.end_date = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM ')
show2.value = false show2.value = false
} }
const rules = ref({ const rules = ref({
'kind': { 'kind': {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写除草剂种类', message: '请填写除草剂种类',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
'breed': { 'breed': {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写除草剂品牌', message: '请填写除草剂品牌',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
'dosage': { 'dosage': {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写除草剂用量', message: '请填写除草剂用量',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
'start_date': { 'start_date': {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写开始日期', message: '请填写开始日期',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
'end_date': { 'end_date': {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写结束日期', message: '请填写结束日期',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
'area': { 'area': {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写土地面积', message: '请填写土地面积',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
'user': { 'user': {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写参与人', message: '请填写参与人',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
} }
// , // ,
// 'remark': { // 'remark': {
// type: 'string', // type: 'string',
// required: true, // required: true,
// message: '', // message: '',
// trigger: ['blur', 'change'] // trigger: ['blur', 'change']
// }, // },
}) })
onReady(() => { onReady(() => {
form.value.setRules(rules); form.value.setRules(rules);
}); });
// //
const updateImgFn = async () => { const updateImgFn = async () => {
uni.chooseImage({ uni.chooseImage({
count: 1, count: 1,
sizeType: ['original', 'compressed'], sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'], sourceType: ['album', 'camera'],
success: (res) => { success: (res) => {
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(data.formData)
uni.$u.toast('上传成功') uni.$u.toast('上传成功')
} }
}).catch(err => { }).catch(err => {
//console.log('err', err); //console.log('err', err);
// uni.$u.toast('') // uni.$u.toast('')
}) })
}, },
fail: function(err) { fail: function(err) {
//console.log('choose'); //console.log('choose');
uni.$u.toast('添加失败') uni.$u.toast('添加失败')
} }
}); });
// let res = await Uploads() // let res = await Uploads()
// data.formData.pic = res.data.image // data.formData.pic = res.data.image
} }
// //
const perviewFn = (url) => { const perviewFn = (url) => {
uni.previewImage({ uni.previewImage({
urls: [url] urls: [url]
}) })
} }
// //
const delimg = (i) => { const delimg = (i) => {
pic.splice(i, 1); pic.splice(i, 1);
} }
const addFn = () => { const addFn = () => {
form.value.validate().then(res => { form.value.validate().then(res => {
// console.log(res) // console.log(res)
if (res) { if (res) {
if (formData.area > dataobj.area) { if (formData.area > dataobj.area) {
uni.$u.toast('作业面积不能超过种植面积') uni.$u.toast('作业面积不能超过种植面积')
return return
} }
formData.pic = pic formData.pic = pic
let data1 = { let data1 = {
plant_id: task_id.value, plant_id: task_id.value,
type: 2, type: 2,
detail: JSON.stringify(formData) detail: JSON.stringify(formData)
}; };
if (formData.pic.length == 0) { if (formData.pic.length == 0) {
uni.$u.toast('请上传图片') uni.$u.toast('请上传图片')
return return
} }
let endTime = new Date(formData.end_date) let endTime = new Date(formData.end_date)
let startTime = new Date(formData.start_date) let startTime = new Date(formData.start_date)
let plantTime = new Date(dataobj.plant_date) let plantTime = new Date(dataobj.plant_date)
if (startTime < plantTime) { if (startTime < plantTime) {
uni.$u.toast("除草时间必须超过种植的时间"); uni.$u.toast("除草时间必须超过种植的时间");
return return
} }
if (endTime < plantTime) { if (endTime < plantTime) {
uni.$u.toast("除草时间必须超过种植的时间"); uni.$u.toast("除草时间必须超过种植的时间");
return return
} }
if (endTime < startTime) { if (endTime < startTime) {
uni.$u.toast("结束时间不能小于开始时间"); uni.$u.toast("结束时间不能小于开始时间");
return return
} else if (startTime > endTime) { } else if (startTime > endTime) {
uni.$u.toast("开始时间不能大于结束时间"); uni.$u.toast("开始时间不能大于结束时间");
return return
} else { } else {
console.log("开始时间和结束时间合法"); console.log("开始时间和结束时间合法");
} }
console.log('表单通过'); console.log('表单通过');
// //
addaction(data1).then((res) => { addaction(data1).then((res) => {
console.log(res) console.log(res)
if (res.code == 1) { if (res.code == 1) {
uni.$u.toast(res.msg) uni.$u.toast(res.msg)
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
} }
}) })
// uni.$u.toast('') // uni.$u.toast('')
} }
}).catch((err) => { }).catch((err) => {
uni.$u.toast(err[0].message) uni.$u.toast(err[0].message)
console.log(err) console.log(err)
}) })
} }
const getlist = () => { const getlist = () => {
plantdetail({ plantdetail({
plant_id: task_id.value plant_id: task_id.value
}).then((res) => { }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
// console.log(res) // console.log(res)
Object.assign(dataobj, res.data) Object.assign(dataobj, res.data)
} }
}); });
}; };
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);
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
} }
getlist() getlist()
}) })
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.content { page {
padding-bottom: 100rpx; background-color: #f7fffc;
} }
.tit { .card {
display: flex; background-color: #f7fffc;
justify-content: space-between; padding: 0;
} padding-bottom: 80rpx;
.card-li-tit { .c-title {
position: relative; font-weight: bold;
display: flex;
align-items: center;
padding: 30rpx;
padding-bottom: 15rpx;
span { &:before {
position: absolute; content: '';
left: -9px; display: inline-block;
color: #f56c6c; height: 0.8rem;
line-height: 20px; width: 6rpx;
font-size: 20px; margin-top: 0.2rem;
top: 3px; margin-right: 10rpx;
} background-color: #35d190;
border-radius: 6rpx;
}
}
margin-bottom: 20rpx; .c-box {
} background-color: #fff;
padding-left: 30rpx;
padding-right: 20rpx;
padding-bottom: 20rpx;
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
}
.confim-btn { .c-box-p {
margin: 0 auto; padding: 20rpx;
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 { .btn {
width: 341.71rpx margin: 20rpx auto;
} width: 694rpx;
height: 80rpx;
border-radius: 80rpx;
background-color: #4ad69b;
color: #fff;
}
}
.today-btn { .tit {
width: 588.79rpx; display: flex;
background-color: #00A15E; justify-content: space-between;
color: white; }
position: fixed;
bottom: 40rpx;
/* transform: ; */
left: 50%;
transform: translateX(-50%);
background: linear-gradient(to right, #00A15E, #4CC593);
/* margin: 0 auto; */
}
.code-img { .card-li {
background-color: #F4F4F4; position: relative;
height: 350.47rpx; margin-bottom: 0;
position: relative;
/* margin-bottom: 100rpx; */
.carime-icon { span {
position: absolute; position: absolute;
top: 50%; left: -9px;
left: 50%; color: #f56c6c;
transform: translate(-50%, -50%); line-height: 20px;
display: flex; font-size: 20px;
flex-direction: column; top: 3px;
align-items: center; }
}
} }
.confirm { .confim-btn {
position: fixed; margin: 0 auto;
height: 84.11rpx; width: 196.26rpx;
display: flex; height: 66.59rpx;
bottom: 30rpx; /* border: ; */
width: 750rpx; border: #00A15E 1px solid;
color: #00A15E;
display: flex;
align-items: center;
justify-content: center;
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
}
.confirm-btn { .up-img {
width: 315.42rpx; width: 341.71rpx
height: 84.11rpx; }
border: #00A15E 1px solid;
margin: 0 auto; .today-btn {
border-radius: 80rpx; width: 588.79rpx;
text-align: center; background-color: #00A15E;
line-height: 84rpx; 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> </style>