From fe3ce21a469f7e2584dbcb85cb75022d149f436c Mon Sep 17 00:00:00 2001
From: zuoxiao <zuoxiao>
Date: 星期二, 25 三月 2025 19:28:56 +0800
Subject: [PATCH] 更新灌溉计划页面,添加项目选择器和总灌溉时间计算功能;优化界面样式,增加SVG图标;修复项目列表和轮灌组显示逻辑;调整配置文件,添加libVersion字段。
---
pages/home/home.js | 167 +++--
images/delete.svg | 1
pages/login/login.js | 12
miniprogram_npm/dayjs/index.js | 4
images/close.svg | 1
project.private.config.json | 3
pages/createIrrigation/createIrrigation.json | 4
pages/createIrrigation/createIrrigation.wxml | 85 +-
pages/createIrrigation/createIrrigation.wxss | 114 +++
app.js | 3
api/config.js | 6
pages/irrigationDetail/irrigationDetail.js | 295 +--------
pages/waterIntake/waterIntake.json | 6
pages/createIrrigation/createIrrigation.js | 472 ++++-----------
pages/waterIntake/waterIntake.wxss | 270 ++++++++
images/back.svg | 1
pages/waterIntake/waterIntake.js | 79 ++
pages/home/home.wxml | 6
pages/irrigationDetail/irrigationDetail.wxss | 150 ++--
pages/irrigationDetail/irrigationDetail.wxml | 72 +-
20 files changed, 906 insertions(+), 845 deletions(-)
diff --git a/api/config.js b/api/config.js
index 07885fe..3ee8e03 100644
--- a/api/config.js
+++ b/api/config.js
@@ -3,8 +3,10 @@
const PROJECT_URLS = {
JYG: 'https://irrigate.dayuyanjiuyuan.top/', // 鍢夊唱鍏抽」鐩�
- // MQ: 'https://shifanqu1.dayuyanjiuyuan.top/' // 姘戝嫟椤圭洰
- MQ: 'https://no253541tf71.vicp.fun/' // 姘戝嫟椤圭洰
+ MQ: 'https://shifanqu1.dayuyanjiuyuan.top/' , // 姘戝嫟椤圭洰
+ TEST:'https://no253541tf71.vicp.fun/'// test椤圭洰
+// TEST:'http://192.168.40.182:8087/'// test椤圭洰
+// MQ: 'https://no253541tf71.vicp.fun/' // 姘戝嫟椤圭洰
}
// 灏濊瘯浠庢湰鍦板瓨鍌ㄨ幏鍙栧凡閫夋嫨鐨勯」鐩�
diff --git a/app.js b/app.js
index ae3b8f1..22939df 100644
--- a/app.js
+++ b/app.js
@@ -24,6 +24,7 @@
isLoggedIn:false,
operator:"2025030416200600006",
clientId:"",
- AppID:"wxbc2b6a00dd904ead"
+ AppID:"wxbc2b6a00dd904ead",
+ vcId:""
}
})
diff --git a/images/back.svg b/images/back.svg
new file mode 100644
index 0000000..38f6faa
--- /dev/null
+++ b/images/back.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.79889 24H41.7989" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M17.7988 36L5.79883 24L17.7988 12" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>
\ No newline at end of file
diff --git a/images/close.svg b/images/close.svg
new file mode 100644
index 0000000..e7419b0
--- /dev/null
+++ b/images/close.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#ffffff"><path d="M0 0h24v24H0z" fill="none"/><path d="M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></svg>
\ No newline at end of file
diff --git a/images/delete.svg b/images/delete.svg
new file mode 100644
index 0000000..cab2b76
--- /dev/null
+++ b/images/delete.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="20" fill="none" stroke="#1890FF" stroke-width="4"/><path d="M17 31L31 17" stroke="#1890FF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M19 19L17 17" stroke="#1890FF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M31 31L29 29" stroke="#1890FF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>
\ No newline at end of file
diff --git a/miniprogram_npm/dayjs/index.js b/miniprogram_npm/dayjs/index.js
index 0f0fcfd..5abb536 100644
--- a/miniprogram_npm/dayjs/index.js
+++ b/miniprogram_npm/dayjs/index.js
@@ -4,10 +4,10 @@
var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
-__DEFINE__(1708314864293, function(require, module, exports) {
+__DEFINE__(1742351136645, function(require, module, exports) {
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
}, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
-return __REQUIRE__(1708314864293);
+return __REQUIRE__(1742351136645);
})()
//miniprogram-npm-outsideDeps=[]
//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/pages/createIrrigation/createIrrigation.js b/pages/createIrrigation/createIrrigation.js
index c7e8053..ce7e83b 100644
--- a/pages/createIrrigation/createIrrigation.js
+++ b/pages/createIrrigation/createIrrigation.js
@@ -10,213 +10,78 @@
startTime: '', // 鐏屾簤寮�濮嬫椂闂�
pickerValue: '', // 鏃堕棿閫夋嫨鍣ㄧ殑鍊�
timePickerVisible: false, // 鏃堕棿閫夋嫨鍣ㄦ槸鍚﹀彲瑙�
-
- // 椤圭洰鍜岃疆鐏岀粍鏁版嵁
+ // 椤圭洰閫夋嫨鍣ㄧ浉鍏�
+ projectPickerVisible: false,
+ projectPickerValue: [],
+ selectedProject: null,
+ projectOptions: [],
+ totalDuration: 0, // 娣诲姞鎬荤亴婧夋椂闂�
+ // 娴嬭瘯鏁版嵁
projectList: [
{
- id: '1',
- name: '椤圭洰涓�',
- expanded: false, // 鏄惁灞曞紑
- totalDuration: 0, // 鎬绘椂闀�
+ id: 1,
+ name: '娴嬭瘯椤圭洰涓�',
groups: [
- { id: '1-1', name: '杞亴缁�1', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 }
+ {
+ id: 101,
+ name: '杞亴缁凙',
+ duration: 30,
+ selected: false
+ },
+ {
+ id: 102,
+ name: '杞亴缁凚',
+ duration: 45,
+ selected: false
+ },
+ {
+ id: 103,
+ name: '杞亴缁凜',
+ duration: 60,
+ selected: false
+ }
]
},
{
- id: '2',
- name: '椤圭洰浜�',
- expanded: false,
- totalDuration: 0,
+ id: 2,
+ name: '娴嬭瘯椤圭洰浜�',
groups: [
- { id: '2-1', name: '杞亴缁凙', selected: false, duration: 0 },
- { id: '2-2', name: '杞亴缁凚', selected: false, duration: 0 }
+ {
+ id: 201,
+ name: '杞亴缁�1',
+ duration: 40,
+ selected: false
+ },
+ {
+ id: 202,
+ name: '杞亴缁�2',
+ duration: 50,
+ selected: false
+ }
]
},
{
- id: '4',
- name: '椤圭洰涓�',
- expanded: false, // 鏄惁灞曞紑
- totalDuration: 0, // 鎬绘椂闀�
+ id: 3,
+ name: '娴嬭瘯椤圭洰涓�',
groups: [
- { id: '1-1', name: '杞亴缁�1', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 }
- ]
- },
- {
- id: '5',
- name: '椤圭洰涓�',
- expanded: false, // 鏄惁灞曞紑
- totalDuration: 0, // 鎬绘椂闀�
- groups: [
- { id: '1-1', name: '杞亴缁�1', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 }
- ]
- },
- {
- id: '6',
- name: '椤圭洰涓�',
- expanded: false, // 鏄惁灞曞紑
- totalDuration: 0, // 鎬绘椂闀�
- groups: [
- { id: '1-1', name: '杞亴缁�1', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 }
- ]
- },
- {
- id: '7',
- name: '椤圭洰涓�',
- expanded: false, // 鏄惁灞曞紑
- totalDuration: 0, // 鎬绘椂闀�
- groups: [
- { id: '1-1', name: '杞亴缁�1', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 }
- ]
- },
- {
- id: '8',
- name: '椤圭洰8',
- expanded: false, // 鏄惁灞曞紑
- totalDuration: 0, // 鎬绘椂闀�
- groups: [
- { id: '1-1', name: '杞亴缁�1', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 },
- { id: '1-2', name: '杞亴缁�2', selected: false, duration: 0 },
- { id: '1-3', name: '杞亴缁�3', selected: false, duration: 0 }
- ]
- },
- {
- id: '3',
- name: '椤圭洰3',
- expanded: false,
- totalDuration: 0,
- groups: [
- { id: '3-1', name: '杞亴缁刋', selected: false, duration: 0 },
- { id: '3-2', name: '杞亴缁刌', selected: false, duration: 0 },
- { id: '3-3', name: '杞亴缁刏', selected: false, duration: 0 }
- ]
- },
- {
- id: '9',
- name: '椤圭洰9',
- expanded: false,
- totalDuration: 0,
- groups: [
- { id: '3-1', name: '杞亴缁刋', selected: false, duration: 0 },
- { id: '3-2', name: '杞亴缁刌', selected: false, duration: 0 },
- { id: '3-3', name: '杞亴缁刏', selected: false, duration: 0 }
- ]
- }
- ,
- {
- id: '10',
- name: '椤圭洰10',
- expanded: false,
- totalDuration: 0,
- groups: [
- { id: '3-1', name: '杞亴缁刋', selected: false, duration: 0 },
- { id: '3-2', name: '杞亴缁刌', selected: false, duration: 0 },
- { id: '3-3', name: '杞亴缁刏', selected: false, duration: 0 }
- ]
- }
- ,
- {
- id: '11',
- name: '椤圭洰11',
- expanded: false,
- totalDuration: 0,
- groups: [
- { id: '3-1', name: '杞亴缁刋', selected: false, duration: 0 },
- { id: '3-2', name: '杞亴缁刌', selected: false, duration: 0 },
- { id: '3-3', name: '杞亴缁刏', selected: false, duration: 0 }
+ {
+ id: 301,
+ name: '涓滃尯杞亴缁�',
+ duration: 35,
+ selected: false
+ },
+ {
+ id: 302,
+ name: '瑗垮尯杞亴缁�',
+ duration: 55,
+ selected: false
+ },
+ {
+ id: 303,
+ name: '鍗楀尯杞亴缁�',
+ duration: 25,
+ selected: false
+ }
]
}
]
@@ -226,8 +91,15 @@
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
*/
onLoad: function (options) {
- // 椤甸潰鍔犺浇鏃跺彲浠ヤ粠API鑾峰彇椤圭洰鍜岃疆鐏岀粍鏁版嵁
- // this.fetchProjectsAndGroups();
+ // 鍒濆鍖栭」鐩�夋嫨鍣ㄩ�夐」
+ const projectOptions = this.data.projectList.map(project => ({
+ label: project.name,
+ value: project.id
+ }));
+
+ this.setData({
+ projectOptions: projectOptions // 鐩存帴浣跨敤涓�缁存暟缁勶紝涓嶉渶瑕佸寘瑁呮垚浜岀淮鏁扮粍
+ });
},
/**
@@ -267,10 +139,10 @@
* 鏃堕棿閫夋嫨鍣ㄧ‘璁ゅ洖璋�
*/
onTimePickerConfirm: function (e) {
+ const { value } = e.detail;
this.setData({
- startTime: e.detail.formatValue,
- pickerValue: e.detail.value,
- timePickerVisible: false
+ timePickerVisible: false,
+ startTime: value
});
},
@@ -330,26 +202,18 @@
* 澶勭悊鏃堕暱杈撳叆
*/
onDurationInput: function (e) {
- const projectIndex = e.currentTarget.dataset.projectIndex;
- const groupIndex = e.currentTarget.dataset.groupIndex;
- const value = parseInt(e.detail.value) || 0;
+ const { groupIndex } = e.currentTarget.dataset;
+ const duration = parseInt(e.detail.value) || 0;
- // 鏇存柊杞亴缁勬椂闀�
- const durationKey = `projectList[${projectIndex}].groups[${groupIndex}].duration`;
+ const selectedProject = { ...this.data.selectedProject };
+ selectedProject.groups[groupIndex].duration = duration;
+
this.setData({
- [durationKey]: value
+ selectedProject
+ }, () => {
+ // 杈撳叆鏃堕暱鍚庨噸鏂拌绠楁�绘椂闂�
+ this.calculateTotalDuration();
});
-
- // 鑷姩閫変腑璇ヨ疆鐏岀粍
- const selectedKey = `projectList[${projectIndex}].groups[${groupIndex}].selected`;
- if (value > 0 && !this.data.projectList[projectIndex].groups[groupIndex].selected) {
- this.setData({
- [selectedKey]: true
- });
- }
-
- // 璁$畻骞舵洿鏂伴」鐩�绘椂闀�
- this.updateProjectTotalDuration(projectIndex);
},
/**
@@ -376,7 +240,7 @@
/**
* 闃绘浜嬩欢鍐掓场
*/
- stopPropagation: function (e) {
+ stopPropagation: function () {
// 闃绘浜嬩欢鍐掓场锛岄槻姝㈢偣鍑昏緭鍏ユ鏃惰Е鍙戠埗鍏冪礌鐨勭偣鍑讳簨浠�
},
@@ -384,155 +248,87 @@
* 璺宠浆鍒拌疆鐏岀粍璇︽儏椤�
*/
navigateToGroupDetail: function (e) {
- const projectIndex = e.currentTarget.dataset.projectIndex;
- const groupIndex = e.currentTarget.dataset.groupIndex;
- const project = this.data.projectList[projectIndex];
- const group = project.groups[groupIndex];
-
- wx.navigateTo({
- url: `/pages/groupDetail/groupDetail?projectId=${project.id}&projectName=${project.name}&groupId=${group.id}&groupName=${group.name}`
- });
+ const { groupIndex } = e.currentTarget.dataset;
+ // TODO: 瀹炵幇璺宠浆閫昏緫
},
/**
* 纭鎸夐挳鐐瑰嚮浜嬩欢
*/
onConfirm: function () {
- // 楠岃瘉琛ㄥ崟
- if (!this.validateForm()) {
- return;
- }
+ const { planCode, startTime, selectedProject } = this.data;
- // 鏀堕泦閫変腑鐨勮疆鐏岀粍
- const selectedGroups = this.getSelectedGroups();
-
- // 鏋勫缓鎻愪氦鏁版嵁
- const formData = {
- planCode: this.data.planCode,
- startTime: this.data.startTime,
- groups: selectedGroups
- };
-
- // 鎻愪氦鏁版嵁
- this.submitForm(formData);
- },
-
- /**
- * 楠岃瘉琛ㄥ崟
- */
- validateForm: function () {
- if (!this.data.planCode) {
+ if (!planCode) {
wx.showToast({
title: '璇疯緭鍏ヨ鍒掔紪鍙�',
icon: 'none'
});
- return false;
+ return;
}
- if (!this.data.startTime) {
+ if (!startTime) {
wx.showToast({
title: '璇烽�夋嫨鐏屾簤寮�濮嬫椂闂�',
icon: 'none'
});
- return false;
+ return;
}
- const selectedGroups = this.getSelectedGroups();
- if (selectedGroups.length === 0) {
+ if (!selectedProject) {
wx.showToast({
- title: '璇疯嚦灏戦�夋嫨涓�涓疆鐏岀粍',
+ title: '璇烽�夋嫨椤圭洰',
icon: 'none'
});
- return false;
+ return;
}
-
- // 妫�鏌ラ�変腑鐨勮疆鐏岀粍鏄惁閮借缃簡鏃堕暱
- const invalidGroups = selectedGroups.filter(group => !group.duration);
- if (invalidGroups.length > 0) {
- wx.showToast({
- title: '璇蜂负鎵�鏈夐�変腑鐨勮疆鐏岀粍璁剧疆鏃堕暱',
- icon: 'none'
- });
- return false;
- }
-
- return true;
+
+ // TODO: 瀹炵幇纭閫昏緫
+ console.log('鎻愪氦鏁版嵁锛�', {
+ planCode,
+ startTime,
+ project: selectedProject
+ });
},
- /**
- * 鑾峰彇閫変腑鐨勮疆鐏岀粍
- */
- getSelectedGroups: function () {
- const selectedGroups = [];
-
- this.data.projectList.forEach(project => {
- project.groups.forEach(group => {
- if (group.selected) {
- selectedGroups.push({
- projectId: project.id,
- projectName: project.name,
- groupId: group.id,
- groupName: group.name,
- duration: group.duration
- });
- }
- });
+ // 鏄剧ず椤圭洰閫夋嫨鍣�
+ showProjectPicker() {
+ this.setData({
+ projectPickerVisible: true
});
-
- return selectedGroups;
},
- /**
- * 鎻愪氦琛ㄥ崟鏁版嵁
- */
- submitForm: function (formData) {
- // 杩欓噷鍙互娣诲姞API璇锋眰閫昏緫锛屾彁浜よ〃鍗曟暟鎹�
- console.log('鎻愪氦鐨勮〃鍗曟暟鎹�:', formData);
+ // 椤圭洰閫夋嫨鍣ㄧ‘璁�
+ onProjectPickerConfirm(e) {
+ const { value } = e.detail;
+ const selectedProject = this.data.projectList.find(project => project.id === value[0]);
- // 妯℃嫙API璇锋眰
- wx.showLoading({
- title: '鎻愪氦涓�...',
+ this.setData({
+ projectPickerVisible: false,
+ selectedProject: selectedProject,
+ projectPickerValue: value
+ }, () => {
+ // 閫夋嫨椤圭洰鍚庤绠楁�绘椂闂�
+ this.calculateTotalDuration();
});
+ },
+
+ // 椤圭洰閫夋嫨鍣ㄥ彇娑�
+ onProjectPickerCancel() {
+ this.setData({
+ projectPickerVisible: false
+ });
+ },
+
+ // 璁$畻鎬荤亴婧夋椂闂�
+ calculateTotalDuration() {
+ if (!this.data.selectedProject) return;
- setTimeout(() => {
- wx.hideLoading();
-
- wx.showToast({
- title: '鍒涘缓鎴愬姛',
- icon: 'success',
- duration: 2000,
- success: () => {
- // 寤惰繜杩斿洖涓婁竴椤�
- setTimeout(() => {
- wx.navigateBack();
- }, 2000);
- }
- });
- }, 1500);
+ const totalDuration = this.data.selectedProject.groups.reduce((sum, group) => {
+ return sum + (parseInt(group.duration) || 0);
+ }, 0);
- // 瀹為檯API璇锋眰绀轰緥
- // wx.request({
- // url: 'your-api-url',
- // method: 'POST',
- // data: formData,
- // success: (res) => {
- // wx.showToast({
- // title: '鍒涘缓鎴愬姛',
- // icon: 'success',
- // duration: 2000,
- // success: () => {
- // setTimeout(() => {
- // wx.navigateBack();
- // }, 2000);
- // }
- // });
- // },
- // fail: (err) => {
- // wx.showToast({
- // title: '鍒涘缓澶辫触锛岃閲嶈瘯',
- // icon: 'none'
- // });
- // }
- // });
- }
+ this.setData({
+ totalDuration
+ });
+ },
});
\ No newline at end of file
diff --git a/pages/createIrrigation/createIrrigation.json b/pages/createIrrigation/createIrrigation.json
index 5e0bed4..e853ee7 100644
--- a/pages/createIrrigation/createIrrigation.json
+++ b/pages/createIrrigation/createIrrigation.json
@@ -1,6 +1,8 @@
{
"navigationBarTitleText": "鏂板缓鐏屾簤璁″垝",
"usingComponents": {
- "t-date-time-picker": "tdesign-miniprogram/date-time-picker/date-time-picker"
+ "t-date-time-picker": "tdesign-miniprogram/date-time-picker/date-time-picker",
+ "t-picker": "tdesign-miniprogram/picker/picker",
+ "t-picker-item": "tdesign-miniprogram/picker-item/picker-item"
}
}
\ No newline at end of file
diff --git a/pages/createIrrigation/createIrrigation.wxml b/pages/createIrrigation/createIrrigation.wxml
index 5ba5323..d4cac7e 100644
--- a/pages/createIrrigation/createIrrigation.wxml
+++ b/pages/createIrrigation/createIrrigation.wxml
@@ -16,43 +16,43 @@
</view>
</view>
- <!-- 椤圭洰鍜岃疆鐏岀粍宓屽鍒楄〃 -->
- <view class="list-container">
- <!-- 椤圭洰鍒楄〃 -->
- <scroll-view scroll-y="true" class="project-list">
- <block wx:for="{{projectList}}" wx:key="id">
- <view class="project-item">
- <!-- 椤圭洰鍚嶇О -->
- <view class="project-header" bindtap="toggleProject" data-index="{{index}}">
- <view class="project-title">
- <image class="toggle-icon {{item.expanded ? 'expanded' : ''}}" src="/images/arrow-down.svg" mode="aspectFit"></image>
- <view class="project-name">{{item.name}}</view>
- </view>
- <view class="project-duration">鎬绘椂闀�: {{item.totalDuration || 0}}鍒嗛挓</view>
+ <!-- 閫夋嫨椤圭洰 -->
+ <view class="form-item" bindtap="showProjectPicker">
+ <view class="form-label">閫夋嫨椤圭洰</view>
+ <view class="form-input">
+ <view class="picker-text {{selectedProject ? '' : 'placeholder'}}">{{selectedProject ? selectedProject.name : '璇烽�夋嫨椤圭洰'}}</view>
+ <image class="arrow-icon" src="/images/arrow-right.svg" mode="aspectFit"></image>
+ </view>
+ </view>
+
+ <!-- 杞亴缁勫垪琛� -->
+ <view class="list-container" wx:if="{{selectedProject}}">
+ <view class="list-header">
+ <view class="list-title-container">
+ <view class="list-title">杞亴缁勫垪琛�</view>
+ <view class="total-duration">
+ <text class="total-duration-label">鎬荤亴婧夋椂闂达細</text>
+ <text class="total-duration-value">{{totalDuration}}鍒嗛挓</text>
+ </view>
+ </view>
+ </view>
+ <scroll-view scroll-y="true" class="group-list">
+ <block wx:for="{{selectedProject.groups}}" wx:key="id" wx:for-item="group" wx:for-index="groupIndex">
+ <view class="group-item {{group.selected ? 'selected' : ''}}" bindtap="navigateToGroupDetail" data-group-index="{{groupIndex}}">
+ <view class="group-info">
+ <view class="group-name">{{group.name}}</view>
</view>
-
- <!-- 杞亴缁勫垪琛� -->
- <view class="group-list {{item.expanded ? 'expanded' : ''}}">
- <block wx:for="{{item.groups}}" wx:for-item="group" wx:for-index="groupIndex" wx:key="id">
- <view class="group-item {{group.selected ? 'selected' : ''}}" bindtap="navigateToGroupDetail" data-project-index="{{index}}" data-group-index="{{groupIndex}}">
- <view class="group-info" >
- <view class="group-name">{{group.name}}</view>
- </view>
- <view class="group-duration">
- <input
- class="duration-input"
- type="number"
- value="{{group.duration}}"
- bindinput="onDurationInput"
- data-project-index="{{index}}"
- data-group-index="{{groupIndex}}"
- placeholder="0"
- catchtap="stopPropagation"
- />
- <text class="duration-unit">鍒嗛挓</text>
- </view>
- </view>
- </block>
+ <view class="group-duration">
+ <input
+ class="duration-input"
+ type="number"
+ value="{{group.duration}}"
+ bindinput="onDurationInput"
+ data-group-index="{{groupIndex}}"
+ placeholder="0"
+ catchtap="stopPropagation"
+ />
+ <text class="duration-unit">鍒嗛挓</text>
</view>
</view>
</block>
@@ -74,4 +74,17 @@
bindconfirm="onTimePickerConfirm"
bindcancel="onTimePickerCancel"
/>
+
+ <!-- 椤圭洰閫夋嫨鍣ㄥ脊绐� -->
+ <t-picker
+ title="閫夋嫨椤圭洰"
+ visible="{{projectPickerVisible}}"
+ value="{{projectPickerValue}}"
+ cancelBtn="鍙栨秷"
+ confirmBtn="纭"
+ bindconfirm="onProjectPickerConfirm"
+ bindcancel="onProjectPickerCancel"
+ >
+ <t-picker-item options="{{projectOptions}}" />
+ </t-picker>
</view>
\ No newline at end of file
diff --git a/pages/createIrrigation/createIrrigation.wxss b/pages/createIrrigation/createIrrigation.wxss
index e91a1ec..3872378 100644
--- a/pages/createIrrigation/createIrrigation.wxss
+++ b/pages/createIrrigation/createIrrigation.wxss
@@ -14,7 +14,7 @@
flex-direction: row;
align-items: center;
background-color: #fff;
- padding: 30rpx;
+ padding: 15rpx 30rpx;
margin-bottom: 2rpx;
width: 100%;
box-sizing: border-box;
@@ -58,6 +58,12 @@
padding-right: 20rpx;
}
+.picker-text {
+ flex: 1;
+ text-align: right;
+ padding-right: 20rpx;
+}
+
.placeholder {
color: #999;
}
@@ -80,11 +86,28 @@
height: calc(100vh - 300rpx); /* 璁剧疆鍥哄畾楂樺害锛屽噺鍘婚《閮ㄨ〃鍗曞拰搴曢儴鎸夐挳鐨勯珮搴� */
}
+/* 鍒楄〃澶撮儴鏍峰紡 */
+.list-header {
+ padding: 30rpx;
+ border-bottom: 1rpx solid #eee;
+ background-color: #fff;
+}
+
+.list-title-container {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
.list-title {
- font-size: 28rpx;
+ font-size: 32rpx;
color: #333;
- margin-bottom: 30rpx;
font-weight: 500;
+}
+
+.list-subtitle {
+ font-size: 24rpx;
+ color: #999;
}
/* 椤圭洰鍒楄〃鏍峰紡 */
@@ -145,15 +168,11 @@
/* 杞亴缁勫垪琛ㄦ牱寮� */
.group-list {
- display: none;
+ display: flex;
flex-direction: column;
background-color: #fff;
- max-height: none; /* 绉婚櫎鏈�澶ч珮搴﹂檺鍒� */
- height: auto; /* 鑷�傚簲楂樺害 */
-}
-
-.group-list.expanded {
- display: flex;
+ height: 100%; /* 鎭㈠涓�100%楂樺害锛屽洜涓轰笉鍐嶉渶瑕佷负搴曢儴缁熻鐣欑┖闂� */
+ overflow-y: auto;
}
.group-item {
@@ -169,7 +188,7 @@
.group-item::after {
content: '';
position: absolute;
- right: 15rpx;
+ right: 30rpx; /* 淇敼涓轰笌宸︿晶padding涓�鑷� */
top: 50%;
transform: translateY(-50%);
width: 16rpx;
@@ -228,7 +247,7 @@
.group-duration {
display: flex;
align-items: center;
- margin-right: 20rpx; /* 涓哄彸渚х澶寸暀鍑虹┖闂� */
+ margin-right: 40rpx; /* 澧炲姞鍙宠竟璺濓紝涓虹澶寸暀鍑虹┖闂� */
}
.duration-input {
@@ -265,20 +284,81 @@
padding: 20rpx 30rpx;
background-color: #fff;
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
- z-index: 100; /* 鎻愰珮z-index纭繚鎸夐挳鍦ㄦ渶涓婂眰 */
+ z-index: 100;
}
.confirm-button {
width: 100%;
- height: 88rpx;
- line-height: 88rpx;
+ height: 80rpx;
+ line-height: 80rpx;
text-align: center;
background-color: #1890FF;
color: #fff;
- font-size: 30rpx;
- border-radius: 44rpx;
+ font-size: 28rpx;
+ border-radius: 8rpx;
}
.confirm-button-hover {
opacity: 0.8;
+}
+
+/* TDesign Picker 鏍峰紡瑕嗙洊 */
+.t-picker {
+ z-index: 1000;
+}
+
+.t-picker__header {
+ background-color: #fff;
+ border-bottom: 1rpx solid #eee;
+}
+
+.t-picker__title {
+ font-size: 32rpx;
+ color: #333;
+ font-weight: 500;
+}
+
+.t-picker__cancel,
+.t-picker__confirm {
+ font-size: 28rpx;
+ padding: 20rpx 30rpx;
+}
+
+.t-picker__cancel {
+ color: #999;
+}
+
+.t-picker__confirm {
+ color: #1890FF;
+}
+
+.t-picker__content {
+ background-color: #fff;
+}
+
+.t-picker__item {
+ font-size: 32rpx;
+ color: #333;
+}
+
+.t-picker__item--active {
+ color: #1890FF;
+}
+
+/* 鎬荤亴婧夋椂闂寸粺璁℃牱寮� */
+.total-duration {
+ display: flex;
+ align-items: center;
+}
+
+.total-duration-label {
+ font-size: 28rpx;
+ color: #666;
+ margin-right: 10rpx;
+}
+
+.total-duration-value {
+ font-size: 32rpx;
+ color: #1890FF;
+ font-weight: 500;
}
\ No newline at end of file
diff --git a/pages/home/home.js b/pages/home/home.js
index 080656a..944db7c 100644
--- a/pages/home/home.js
+++ b/pages/home/home.js
@@ -35,7 +35,8 @@
showProjectDialog: false,
selectedProject: '',
avatarTapCount: 0,
- isFromLogin: false
+ isFromLogin: false,
+ showTipDialog:''
},
openValve: function (e) {
@@ -91,7 +92,12 @@
*/
onLoad(options) {
console.log('home椤甸潰onLoad寮�濮嬶紝鍙傛暟:', options);
-
+ //褰撳紑闃�鎴愬姛鍚庤皟鐢ㄥ埛鏂�
+ if (options.param === "1" || options.param === "2") {
+ this.setData({
+ options: options
+ })
+ }
// 妫�鏌ユ槸鍚︿粠鐧诲綍椤甸潰杩斿洖
let fromLogin = false;
@@ -165,14 +171,46 @@
// 鏍规嵁椤圭洰璁剧疆瀵瑰簲鐨則ag
if (project === 'JYG') {
getApp().globalData.tag = 'ym'; // 鍢夊唱鍏抽」鐩搴攖ag涓簓m
+ this.setData({
+ userName: "鍢夊唱鍏抽」鐩�"
+ });
} else if (project === 'MQ') {
getApp().globalData.tag = 'mq'; // 姘戝嫟椤圭洰瀵瑰簲tag涓簃q
+ this.setData({
+ userName: "姘戝嫟椤圭洰"
+ });
+ // 鍔犺浇姘戝嫟椤圭洰鎸佷箙鍖栧弬鏁�
+ return storage.getItemSafe('MQ_params')
+ .then(params => {
+ if (params) {
+ getApp().globalData.operator = params.operator;
+ getApp().globalData.clientId = params.clientId;
+ getApp().globalData.isLoggedIn = params.isLoggedIn;
+ getApp().globalData.sessionId = params.sessionId;
+ }
+ return Promise.resolve();
+ });
+ } else if (project === 'TEST') {
+ getApp().globalData.tag = 'ym'; // 娴嬭瘯椤圭洰瀵瑰簲tag涓簍est
+ this.setData({
+ userName: "娴嬭瘯椤圭洰"
+ });
+ // 鍔犺浇娴嬭瘯椤圭洰鎸佷箙鍖栧弬鏁�
+ return storage.getItemSafe('TEST_params')
+ .then(params => {
+ if (params) {
+ getApp().globalData.operator = params.operator;
+ getApp().globalData.clientId = params.clientId;
+ getApp().globalData.isLoggedIn = params.isLoggedIn;
+ getApp().globalData.sessionId = params.sessionId;
+ getApp().globalData.vcId = params.vcId;
+ }
+ return Promise.resolve();
+ });
}
- console.log('鍔犺浇宸蹭繚瀛樼殑椤圭洰:', project, '鍩熷悕:', baseUrl, 'tag:', getApp().globalData.tag);
-
- // 妫�鏌essionId鏄惁瀛樺湪
- return storage.getItemSafe('sessionId');
+ // 缁х画鍒濆鍖栭〉闈�
+ this.continueInitPage(options);
} else {
// 棣栨杩涘叆锛屾樉绀洪」鐩�夋嫨寮圭獥
this.setData({
@@ -184,26 +222,7 @@
}); // 缁堟鍚庣画澶勭悊
}
})
- .then(sessionId => {
- if (sessionId) {
- // 濡傛灉sessionId瀛樺湪锛岃缃叏灞�鐧诲綍鐘舵��
- getApp().globalData.sessionId = sessionId;
- getApp().globalData.isLoggedIn = true;
-
- // 灏濊瘯鑾峰彇clientId
- return storage.getItemSafe('clientId');
- } else {
- return Promise.reject({
- type: 'session_not_found',
- message: '鏈壘鍒皊essionId'
- });
- }
- })
- .then(clientId => {
- if (clientId) {
- getApp().globalData.clientId = clientId;
- }
-
+ .then(() => {
// 缁х画鍒濆鍖栭〉闈�
this.continueInitPage(options);
})
@@ -231,26 +250,6 @@
return;
}
- // 澶勭悊鏈壘鍒皊essionId鐨勬儏鍐�
- if (error.type === 'session_not_found' && this.data.selectedProject) {
- // 妫�鏌ユ槸鍚﹀凡浠庣櫥褰曢〉杩斿洖
- const isReturning = this.getFromLogin();
- console.log('鏈壘鍒皊essionId锛屾槸鍚︿粠鐧诲綍椤佃繑鍥�:', isReturning);
-
- // 濡傛灉宸茬粡鏄粠鐧诲綍椤佃繑鍥炵殑锛屼笉瑕佸啀璺冲洖鍘�
- if (isReturning) {
- console.log('宸茬粡浠庣櫥褰曢〉杩斿洖锛屼笉鍐嶈烦杞洖鍘�');
- this.continueInitPage(options);
- return;
- }
-
- console.log('鏈壘鍒皊essionId锛岃烦杞埌鐧诲綍椤�');
- wx.redirectTo({
- url: `/pages/login/login?project=${this.data.selectedProject}`
- });
- return;
- }
-
// 鍏朵粬鏈煡閿欒锛屽皾璇曠户缁垵濮嬪寲椤甸潰
console.warn('鏈煡閿欒锛屽皾璇曠户缁垵濮嬪寲椤甸潰:', error);
this.continueInitPage(options);
@@ -261,7 +260,22 @@
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
*/
onReady() {
-
+ if (this.data.options.param === "1") {
+ this.setData({
+ showTipDialog: true,
+ tipData: "寮�闃�鍛戒护涓嬪彂鎴愬姛锛屽洜寮�闃�闇�瑕佹椂闂达紝绾�20-60绉掑悗鍙埛鏂板揩閫熷叧闃�鍒楄〃鏌ョ湅鎵ц缁撴灉銆�"
+ })
+ setTimeout(() => {
+ this.getOpenList();
+ }, 20000)
+
+ } else if (this.data.options.param === "2") {
+ this.setData({
+ showTipDialog: true,
+ tipData: "棰勭害寮�闃�鍛戒护涓嬪彂鎴愬姛锛屽綋鍒拌揪棰勭害鏃堕棿骞朵笖鎴愬姛寮�闃�鍚庡揩閫熷叧闃�鍒楄〃浼氭樉绀烘湭鍏抽榾璁板綍"
+ })
+ this.getOpenList();
+ }
},
/**
@@ -908,7 +922,9 @@
// 鑾峰彇褰撳墠宸查�夐」鐩拰鏂伴�夋嫨鐨勯」鐩�
const currentProject = getApp().globalData.selectedProject;
const newProject = this.data.selectedProject;
- const projectName = newProject === 'JYG' ? '鍢夊唱鍏抽」鐩�' : '姘戝嫟椤圭洰';
+ const projectName = newProject === 'JYG' ? '鍢夊唱鍏抽」鐩�' :
+ newProject === 'MQ' ? '姘戝嫟椤圭洰' :
+ newProject === 'TEST' ? '娴嬭瘯椤圭洰' : '鏈煡椤圭洰';
// 妫�鏌ユ槸鍚﹀垏鎹簡椤圭洰锛堝鏋滃綋鍓嶉」鐩笉鍚屼簬鏂伴�夋嫨鐨勯」鐩級
const isProjectChanged = currentProject && currentProject !== newProject;
@@ -955,11 +971,46 @@
getApp().globalData.baseUrl = baseUrl;
getApp().globalData.selectedProject = newProject;
- // 鏍规嵁椤圭洰璁剧疆瀵瑰簲鐨則ag
+ // 鏍规嵁椤圭洰璁剧疆瀵瑰簲鐨則ag鍜宑lientId
if (newProject === 'JYG') {
getApp().globalData.tag = 'ym'; // 鍢夊唱鍏抽」鐩搴攖ag涓簓m
+ this.setData({
+ userName: "鍢夊唱鍏抽」鐩�"
+ });
} else if (newProject === 'MQ') {
getApp().globalData.tag = 'mq'; // 姘戝嫟椤圭洰瀵瑰簲tag涓簃q
+ getApp().globalData.operator = '2025030517095000006';
+ getApp().globalData.clientId = '2025030517095000006';
+ getApp().globalData.isLoggedIn = true;
+ getApp().globalData.sessionId = '2025030517095000006';
+ this.setData({
+ userName: "姘戝嫟椤圭洰"
+ });
+ // 鎸佷箙鍖栧瓨鍌ㄦ皯鍕ら」鐩弬鏁�
+ storage.setItem('MQ_params', {
+ operator: '2025030517095000006',
+ clientId: '2025030517095000006',
+ isLoggedIn: true,
+ sessionId: '2025030517095000006'
+ });
+ } else if (newProject === 'TEST') {
+ getApp().globalData.tag = 'ym'; // 娴嬭瘯椤圭洰瀵瑰簲tag涓簍est
+ getApp().globalData.operator = '2025032411245000006';
+ getApp().globalData.clientId = '2025032411245000006';
+ getApp().globalData.isLoggedIn = true;
+ getApp().globalData.sessionId = '2025032411245000006';
+ getApp().globalData.vcId = '2024122617295800009';
+ this.setData({
+ userName: "娴嬭瘯椤圭洰"
+ });
+ // 鎸佷箙鍖栧瓨鍌ㄦ祴璇曢」鐩弬鏁�
+ storage.setItem('TEST_params', {
+ operator: '2025032411245000006',
+ clientId: '2025032411245000006',
+ isLoggedIn: true,
+ sessionId: '2025032411245000006',
+ vcId: '2024122617295800009'
+ });
}
console.log('宸插垏鎹㈠埌椤圭洰:', projectName, '鍩熷悕:', baseUrl, 'tag:', getApp().globalData.tag);
@@ -970,22 +1021,16 @@
// 鏄剧ず鍒囨崲鎴愬姛鎻愮ず
wx.showToast({
- title: isProjectChanged ? `宸插垏鎹㈣嚦${projectName}锛岃閲嶆柊鐧诲綍` : `宸查�夋嫨${projectName}`,
+ title: `宸查�夋嫨${projectName}`,
icon: 'success',
duration: 2000
});
- // 濡傛灉鍒囨崲浜嗛」鐩紝寤惰繜璺宠浆鍒扮櫥褰曢〉闈�
- if (isProjectChanged) {
- setTimeout(() => {
- console.log('椤圭洰宸插垏鎹紝姝e湪璺宠浆鍒扮櫥褰曢〉闈�');
- wx.redirectTo({
- url: `/pages/login/login?project=${newProject}`,
- success: () => console.log('鎴愬姛璺宠浆鍒扮櫥褰曢〉'),
- fail: (err) => console.error('璺宠浆鍒扮櫥褰曢〉澶辫触:', err)
- });
- }, 2000);
- }
+ // 鐩存帴鍒濆鍖栨暟鎹�
+ setTimeout(() => {
+ console.log('椤圭洰宸插垏鎹紝姝e湪鍒濆鍖栨暟鎹�');
+ this.initData();
+ }, 1000);
}).catch(err => {
console.error('淇濆瓨椤圭洰閫夋嫨澶辫触锛�', err);
wx.showToast({
diff --git a/pages/home/home.wxml b/pages/home/home.wxml
index 292b406..3b1e10a 100644
--- a/pages/home/home.wxml
+++ b/pages/home/home.wxml
@@ -93,6 +93,10 @@
<radio value="MQ" checked="{{selectedProject === 'MQ'}}" color="#1890FF" />
<text>姘戝嫟椤圭洰</text>
</label>
+ <label class="project-radio {{selectedProject === 'TEST' ? 'project-radio-selected' : ''}}">
+ <radio value="TEST" checked="{{selectedProject === 'TEST'}}" color="#1890FF" />
+ <text>娴嬭瘯椤圭洰</text>
+ </label>
</radio-group>
</view>
<view class="project-modal-footer">
@@ -100,5 +104,5 @@
</view>
</view>
</view>
-
+ <t-dialog class="dialog" title="閫氱煡缁撴灉" visible="{{showTipDialog}}" content="{{tipData}}" confirm-btn="{{ confirmBtn }}" bind:confirm="cancelDialog" />
</view>
\ No newline at end of file
diff --git a/pages/irrigationDetail/irrigationDetail.js b/pages/irrigationDetail/irrigationDetail.js
index 5b4907b..5012c84 100644
--- a/pages/irrigationDetail/irrigationDetail.js
+++ b/pages/irrigationDetail/irrigationDetail.js
@@ -5,248 +5,51 @@
data: {
planCode: '',
startTime: '',
- projects: [],
- isRefreshing: false, // 涓嬫媺鍒锋柊鐘舵��
- planId: '' // 淇濆瓨璁″垝ID
+ isRefreshing: false,
+ projects: []
},
/**
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
*/
onLoad: function (options) {
- if (options.id) {
- this.setData({
- planId: options.id
- });
- // 浠庡垪琛ㄩ〉闈㈣繘鍏ユ椂锛屾墍鏈夐」鐩粯璁ゆ敹璧�
- const fromListPage = options.fromList === 'true';
- this.loadIrrigationDetail(options.id, !fromListPage);
- }
- },
-
- /**
- * 鍔犺浇鐏屾簤璁″垝璇︽儏
- * @param {string} id 鐏屾簤璁″垝ID
- * @param {boolean} isFirstLoad 鏄惁棣栨鍔犺浇
- */
- loadIrrigationDetail: function (id, isFirstLoad = false) {
- // 寮�濮嬪姞杞斤紝璁剧疆鍒锋柊鐘舵��
+ // 妯℃嫙鏁版嵁
this.setData({
- isRefreshing: true
- });
-
- // 淇濆瓨褰撳墠椤圭洰鐨勫睍寮�鐘舵��
- const currentExpandStates = {};
- if (!isFirstLoad && this.data.projects.length > 0) {
- this.data.projects.forEach((project, index) => {
- currentExpandStates[project.id] = project.expanded;
- });
- }
-
- // 杩欓噷搴旇鏄粠API鑾峰彇鏁版嵁
- // 浠ヤ笅鏄ā鎷熸暟鎹�
- const mockData = {
- planCode: 'IRG20240317001',
- startTime: '2024-03-17 08:00',
- projects: [
- {
- id: 1,
- name: '椤圭洰A',
- expanded: isFirstLoad ? true : false, // 浠呭湪闈炲垪琛ㄩ〉杩涘叆涓旈娆″姞杞芥椂灞曞紑绗竴涓」鐩�
- groups: [
- {
- id: 1,
- name: '杞亴缁凙-1',
- status: 'irrigated', // 宸茬亴婧�
- statusText: '宸茬亴婧�',
- startTime: '2024-03-17 08:00',
- endTime: '2024-03-17 09:30',
- duration: 90
- },
- {
- id: 2,
- name: '杞亴缁凙-2',
- status: 'irrigating', // 姝e湪鐏屾簤
- statusText: '姝e湪鐏屾簤',
- startTime: '2024-03-17 09:30',
- endTime: '2024-03-17 11:00',
- duration: 90
- }
- ]
- },
- {
- id: 2,
- name: '椤圭洰B',
- expanded: false,
- groups: [
- {
- id: 3,
- name: '杞亴缁凚-1',
- status: 'waiting', // 鏈亴婧�
- statusText: '鏈亴婧�',
- startTime: '2024-03-17 11:00',
- endTime: '2024-03-17 12:30',
- duration: 90
- },
- {
- id: 4,
- name: '杞亴缁凚-2',
- status: 'waiting', // 鏈亴婧�
- statusText: '鏈亴婧�',
- startTime: '2024-03-17 12:30',
- endTime: '2024-03-17 14:00',
- duration: 90
- }
- ]
- },
- {
- id: 3,
- name: '椤圭洰C',
- expanded: false,
- groups: [
- {
- id: 5,
- name: '杞亴缁凜-1',
- status: 'waiting', // 鏈亴婧�
- statusText: '鏈亴婧�',
- startTime: '2024-03-17 14:00',
- endTime: '2024-03-17 15:30',
- duration: 90
- }
- ]
- }
- ]
- };
-
- // 璁$畻姣忎釜椤圭洰鐨勬�荤亴婧夋椂闀�
- mockData.projects = this.calculateProjectTotalDuration(mockData.projects);
-
- // 濡傛灉涓嶆槸棣栨鍔犺浇锛屾仮澶嶉」鐩殑灞曞紑鐘舵��
- if (!isFirstLoad) {
- mockData.projects.forEach(project => {
- if (currentExpandStates[project.id] !== undefined) {
- project.expanded = currentExpandStates[project.id];
- }
- });
- }
-
- // 妯℃嫙缃戠粶璇锋眰寤惰繜
- setTimeout(() => {
- // 璁剧疆椤甸潰鏁版嵁
- this.setData({
- planCode: mockData.planCode,
- startTime: mockData.startTime,
- projects: mockData.projects,
- isRefreshing: false // 缁撴潫鍒锋柊鐘舵��
- });
- }, 1000);
-
- // 瀹為檯椤圭洰涓簲璇ヤ娇鐢╳x.request鑾峰彇鏁版嵁
- // wx.request({
- // url: 'https://your-api-url/irrigation/' + id,
- // method: 'GET',
- // success: (res) => {
- // if (res.data && res.data.code === 0) {
- // // 鑾峰彇鏂版暟鎹�
- // let projects = res.data.data.projects;
- //
- // // 濡傛灉鏄娆″姞杞斤紝璁剧疆榛樿灞曞紑鐘舵��
- // if (isFirstLoad) {
- // projects = projects.map((project, index) => {
- // return {
- // ...project,
- // expanded: index === 0 // 榛樿鍙睍寮�绗竴涓」鐩�
- // };
- // });
- // } else {
- // // 濡傛灉涓嶆槸棣栨鍔犺浇锛屾仮澶嶉」鐩殑灞曞紑鐘舵��
- // projects = projects.map(project => {
- // return {
- // ...project,
- // expanded: currentExpandStates[project.id] !== undefined
- // ? currentExpandStates[project.id]
- // : false
- // };
- // });
- // }
- //
- // // 璁$畻姣忎釜椤圭洰鐨勬�荤亴婧夋椂闀�
- // projects = this.calculateProjectTotalDuration(projects);
- //
- // this.setData({
- // planCode: res.data.data.planCode,
- // startTime: res.data.data.startTime,
- // projects: projects,
- // isRefreshing: false // 缁撴潫鍒锋柊鐘舵��
- // });
- // } else {
- // wx.showToast({
- // title: '鑾峰彇鏁版嵁澶辫触',
- // icon: 'none'
- // });
- // this.setData({
- // isRefreshing: false // 缁撴潫鍒锋柊鐘舵��
- // });
- // }
- // },
- // fail: () => {
- // wx.showToast({
- // title: '缃戠粶閿欒',
- // icon: 'none'
- // });
- // this.setData({
- // isRefreshing: false // 缁撴潫鍒锋柊鐘舵��
- // });
- // }
- // });
- },
-
- /**
- * 璁$畻姣忎釜椤圭洰鐨勬�荤亴婧夋椂闀�
- */
- calculateProjectTotalDuration: function(projects) {
- return projects.map(project => {
- // 璁$畻椤圭洰涓嬫墍鏈夎疆鐏岀粍鐨勬�绘椂闀�
- const totalDuration = project.groups.reduce((total, group) => {
- return total + (group.duration || 0);
- }, 0);
-
- return {
- ...project,
- totalDuration: totalDuration
- };
- });
- },
-
- /**
- * 鍒囨崲椤圭洰灞曞紑/鏀惰捣鐘舵��
- */
- toggleProject: function (e) {
- const index = e.currentTarget.dataset.index;
- const expanded = this.data.projects[index].expanded;
-
- // 鏇存柊椤圭洰鐨勫睍寮�鐘舵��
- const key = `projects[${index}].expanded`;
- this.setData({
- [key]: !expanded
- });
- },
-
- /**
- * 瀵艰埅鍒拌疆鐏岀粍璇︽儏椤甸潰
- */
- navigateToGroupDetail: function (e) {
- const projectName = e.currentTarget.dataset.projectName;
- const groupName = e.currentTarget.dataset.groupName;
- const groupId = e.currentTarget.dataset.groupId;
- const status = e.currentTarget.dataset.status;
-
- console.log('璺宠浆鍒扮粍璇︽儏椤甸潰锛屽師濮嬬姸鎬�:', status);
-
- // 瀵艰埅鍒扮粍璇︽儏椤甸潰锛屽苟浼犻�掑弬鏁�
- // 娉ㄦ剰锛氶渶瑕佸皢status杞崲涓篿sIrrigating鍙傛暟锛屼互渚垮湪缁勮鎯呴〉闈㈡纭樉绀哄懡浠ょ姸鎬�
- wx.navigateTo({
- url: `/pages/groupDetail/groupDetail?projectName=${projectName}&groupName=${groupName}&groupId=${groupId}&status=${status}&isIrrigating=${status === 'irrigating' ? 'true' : 'false'}`
+ planCode: 'IRR-2024-001',
+ startTime: '2024-03-20 08:00',
+ projects: [{
+ id: 1,
+ name: '绀轰緥椤圭洰',
+ groups: [
+ {
+ id: 1,
+ name: '杞亴缁�1',
+ status: 'pending',
+ statusText: '寰呯亴婧�',
+ startTime: '08:00',
+ endTime: '09:00',
+ duration: 60
+ },
+ {
+ id: 2,
+ name: '杞亴缁�2',
+ status: 'in_progress',
+ statusText: '鐏屾簤涓�',
+ startTime: '09:00',
+ endTime: '10:00',
+ duration: 60
+ },
+ {
+ id: 3,
+ name: '杞亴缁�3',
+ status: 'completed',
+ statusText: '宸插畬鎴�',
+ startTime: '10:00',
+ endTime: '11:00',
+ duration: 60
+ }
+ ]
+ }]
});
},
@@ -282,14 +85,16 @@
* 涓嬫媺鍒锋柊澶勭悊鍑芥暟
*/
onPullDownRefresh: function () {
- // 閲嶆柊鍔犺浇鏁版嵁锛屼絾淇濇寔灞曞紑鐘舵��
- if (this.data.planId) {
- this.loadIrrigationDetail(this.data.planId, false);
- } else {
+ this.setData({
+ isRefreshing: true
+ });
+
+ // 妯℃嫙鍒锋柊鏁版嵁
+ setTimeout(() => {
this.setData({
isRefreshing: false
});
- }
+ }, 1000);
},
/**
@@ -304,5 +109,15 @@
*/
onShareAppMessage: function () {
+ },
+
+ /**
+ * 瀵艰埅鍒拌疆鐏岀粍璇︽儏椤甸潰
+ */
+ navigateToGroupDetail: function (e) {
+ const { projectName, groupName, groupId, status } = e.currentTarget.dataset;
+ wx.navigateTo({
+ url: `/pages/groupDetail/groupDetail?projectName=${projectName}&groupName=${groupName}&groupId=${groupId}&status=${status}`
+ });
}
})
\ No newline at end of file
diff --git a/pages/irrigationDetail/irrigationDetail.wxml b/pages/irrigationDetail/irrigationDetail.wxml
index eb682a5..cf8747a 100644
--- a/pages/irrigationDetail/irrigationDetail.wxml
+++ b/pages/irrigationDetail/irrigationDetail.wxml
@@ -8,64 +8,54 @@
</view>
<image class="status-icon" src="/images/progress.svg" mode="aspectFit"></image>
</view>
-
+ <!-- 椤圭洰淇℃伅 -->
+ <view class="project-info">
+ <text class="label">椤圭洰鍚嶇О锛�</text>
+ <text class="value">{{projects[0].name}}</text>
+ </view>
<!-- 鐏屾簤鏃堕棿淇℃伅 -->
<view class="time-info">
<text class="label">鐏屾簤寮�濮嬫椂闂达細</text>
<text class="value">{{startTime}}</text>
</view>
+
+
</view>
- <!-- 椤圭洰鍜岃疆鐏岀粍鍒楄〃 -->
+ <!-- 杞亴缁勫垪琛� -->
<scroll-view
scroll-y="true"
- class="project-list"
+ class="group-list"
refresher-enabled="{{true}}"
refresher-threshold="50"
refresher-triggered="{{isRefreshing}}"
bindrefresherrefresh="onPullDownRefresh">
<view class="scroll-content">
- <block wx:for="{{projects}}" wx:key="id" wx:for-item="project" wx:for-index="projectIndex">
- <!-- 椤圭洰淇℃伅 -->
- <view class="project-item {{project.expanded ? 'expanded' : 'collapsed'}}">
- <view class="project-header" bindtap="toggleProject" data-index="{{projectIndex}}">
- <image class="toggle-icon {{project.expanded ? 'expanded' : ''}}" src="/images/arrow-down.svg" mode="aspectFit"></image>
- <view class="project-info">
- <view class="project-name">{{project.name}}</view>
- <view class="project-duration">鎬荤亴婧夋椂闀�: {{project.totalDuration || 0}}鍒嗛挓</view>
- </view>
+ <block wx:for="{{projects[0].groups}}" wx:key="id" wx:for-item="group">
+ <view class="group-item {{group.status}}" bindtap="navigateToGroupDetail" data-project-name="{{projects[0].name}}" data-group-name="{{group.name}}" data-group-id="{{group.id}}" data-status="{{group.status}}">
+ <!-- 杞亴缁勭姸鎬佹爣璇� -->
+ <view class="group-status-indicator">
+ <view class="status-dot"></view>
+ <text class="status-text">{{group.statusText}}</text>
</view>
- <!-- 杞亴缁勫垪琛� -->
- <view class="group-list {{project.expanded ? 'expanded' : 'collapsed'}}">
- <block wx:for="{{project.groups}}" wx:key="id" wx:for-item="group">
- <view class="group-item {{group.status}}" bindtap="navigateToGroupDetail" data-project-name="{{project.name}}" data-group-name="{{group.name}}" data-group-id="{{group.id}}" data-status="{{group.status}}">
- <!-- 杞亴缁勭姸鎬佹爣璇� -->
- <view class="group-status-indicator">
- <view class="status-dot"></view>
- <text class="status-text">{{group.statusText}}</text>
- </view>
-
- <!-- 杞亴缁勪俊鎭� -->
- <view class="group-info">
- <view class="group-name">{{group.name}}</view>
- <view class="group-time-info">
- <view class="time-row">
- <text class="time-label">寮�濮嬫椂闂达細</text>
- <text class="time-value">{{group.startTime}}</text>
- </view>
- <view class="time-row">
- <text class="time-label">缁撴潫鏃堕棿锛�</text>
- <text class="time-value">{{group.endTime}}</text>
- </view>
- <view class="time-row">
- <text class="time-label">鐏屾簤鏃堕暱锛�</text>
- <text class="time-value">{{group.duration}}鍒嗛挓</text>
- </view>
- </view>
- </view>
+ <!-- 杞亴缁勪俊鎭� -->
+ <view class="group-info">
+ <view class="group-name">{{group.name}}</view>
+ <view class="group-time-info">
+ <view class="time-row">
+ <text class="time-label">寮�濮嬫椂闂达細</text>
+ <text class="time-value">{{group.startTime}}</text>
</view>
- </block>
+ <view class="time-row">
+ <text class="time-label">缁撴潫鏃堕棿锛�</text>
+ <text class="time-value">{{group.endTime}}</text>
+ </view>
+ <view class="time-row">
+ <text class="time-label">鐏屾簤鏃堕暱锛�</text>
+ <text class="time-value">{{group.duration}}鍒嗛挓</text>
+ </view>
+ </view>
</view>
</view>
</block>
diff --git a/pages/irrigationDetail/irrigationDetail.wxss b/pages/irrigationDetail/irrigationDetail.wxss
index faa1876..eb5eac0 100644
--- a/pages/irrigationDetail/irrigationDetail.wxss
+++ b/pages/irrigationDetail/irrigationDetail.wxss
@@ -2,50 +2,65 @@
display: flex;
flex-direction: column;
height: 100vh;
- background-color: #F5F5F5;
+ background-color: #f5f5f5;
}
/* 椤堕儴淇℃伅鍖哄煙鏍峰紡 */
.header-section {
- background-color: #FFFFFF;
- padding: 20rpx 30rpx;
- margin-bottom: 20rpx;
- box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+ background-color: #ffffff;
+ padding: 20rpx;
+ border-bottom: 1rpx solid #e0e0e0;
}
.plan-info {
display: flex;
justify-content: space-between;
align-items: center;
- margin-bottom: 20rpx;
+ margin-bottom: 8rpx;
+ min-height: 40rpx;
}
.plan-code {
display: flex;
align-items: center;
+ flex: 1;
+ line-height: 40rpx;
+}
+
+.plan-code .label {
+ color: #666;
+ font-size: 28rpx;
+}
+
+.plan-code .value {
+ color: #333;
+ font-size: 28rpx;
+ font-weight: 500;
}
.status-icon {
- width: 68rpx;
- height: 68rpx;
+ width: 80rpx;
+ height: 80rpx;
+ margin-left: 20rpx;
+ flex-shrink: 0;
+ margin-top: -10rpx;
+ margin-bottom: -10rpx;
}
-.time-info {
+.time-info, .project-info {
display: flex;
align-items: center;
- padding: 10rpx 0;
+ margin-top: 8rpx;
}
-.label {
- color: #666666;
+.time-info .label, .project-info .label {
+ color: #666;
font-size: 28rpx;
- margin-right: 10rpx;
}
-.value {
- color: #333333;
+.time-info .value, .project-info .value {
+ color: #333;
font-size: 28rpx;
- font-weight: 500;
}
/* 椤圭洰鍒楄〃鏍峰紡 */
@@ -55,7 +70,7 @@
}
.scroll-content {
- padding: 0 30rpx 30rpx 30rpx;
+ padding: 20rpx;
}
.project-item {
@@ -120,115 +135,78 @@
/* 杞亴缁勫垪琛ㄦ牱寮� */
.group-list {
- background-color: #FFFFFF;
- border-radius: 0 0 12rpx 12rpx;
- padding: 0 20rpx;
+ flex: 1;
overflow: hidden;
- max-height: 0;
- transition: all 0.3s ease-in-out;
- width: 100%;
- box-sizing: border-box;
-}
-
-.group-list.expanded {
- max-height: 2000rpx; /* 瓒冲澶х殑楂樺害浠ュ绾冲唴瀹� */
- padding: 0 20rpx 20rpx 20rpx;
-}
-
-.group-list.collapsed {
- max-height: 0;
- padding-top: 0;
- padding-bottom: 0;
}
.group-item {
- border-radius: 8rpx;
- margin-top: 20rpx;
+ background-color: #ffffff;
+ border-radius: 12rpx;
padding: 20rpx;
- background-color: #F9F9F9;
- position: relative;
+ margin-bottom: 20rpx;
+ box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
}
-/* 杞亴缁勭姸鎬佹牱寮� */
.group-status-indicator {
display: flex;
align-items: center;
- margin-bottom: 20rpx;
+ margin-bottom: 16rpx;
}
.status-dot {
width: 16rpx;
height: 16rpx;
border-radius: 50%;
- margin-right: 10rpx;
+ margin-right: 8rpx;
+}
+
+.group-item.pending .status-dot {
+ background-color: #ffd700;
+}
+
+.group-item.in_progress .status-dot {
+ background-color: #4CAF50;
+}
+
+.group-item.completed .status-dot {
+ background-color: #2196F3;
}
.status-text {
font-size: 26rpx;
- font-weight: 500;
-}
-
-/* 宸茬亴婧夌姸鎬� */
-.irrigated .status-dot {
- background-color: #52C41A;
-}
-
-.irrigated .status-text {
- color: #52C41A;
-}
-
-/* 姝e湪鐏屾簤鐘舵�� */
-.irrigating .status-dot {
- background-color: #D43030;
-}
-
-.irrigating .status-text {
- color: #D43030;
-}
-
-/* 鏈亴婧夌姸鎬� */
-.waiting .status-dot {
- background-color: #FAAD14;
-}
-
-.waiting .status-text {
- color: #FAAD14;
+ color: #666;
}
/* 杞亴缁勪俊鎭牱寮� */
.group-info {
- padding-left: 26rpx;
+ margin-top: 12rpx;
}
.group-name {
- font-size: 30rpx;
- font-weight: bold;
- color: #333333;
- margin-bottom: 20rpx;
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #333;
+ margin-bottom: 12rpx;
}
.group-time-info {
- background-color: #FFFFFF;
- border-radius: 8rpx;
- padding: 20rpx;
+ display: flex;
+ flex-direction: column;
+ gap: 8rpx;
}
.time-row {
display: flex;
- margin-bottom: 10rpx;
-}
-
-.time-row:last-child {
- margin-bottom: 0;
+ align-items: center;
}
.time-label {
- color: #666666;
+ color: #666;
font-size: 26rpx;
- width: 150rpx;
+ width: 160rpx;
}
.time-value {
- color: #333333;
+ color: #333;
font-size: 26rpx;
}
\ No newline at end of file
diff --git a/pages/login/login.js b/pages/login/login.js
index f7edc39..968bf60 100644
--- a/pages/login/login.js
+++ b/pages/login/login.js
@@ -188,7 +188,9 @@
// 鑾峰彇閫夋嫨鐨勯」鐩� - 浼樺厛浣跨敤URL鍙傛暟
if (options && options.project) {
const project = options.project;
- const projectName = project === 'JYG' ? '鍢夊唱鍏抽」鐩�' : '姘戝嫟椤圭洰';
+ const projectName = project === 'JYG' ? '鍢夊唱鍏抽」鐩�' :
+ project === 'MQ' ? '姘戝嫟椤圭洰' :
+ project === 'TEST' ? '娴嬭瘯椤圭洰' : '鏈煡椤圭洰';
console.log(`浠嶶RL鍙傛暟鑾峰彇椤圭洰淇℃伅: ${project} (${projectName})`);
@@ -225,7 +227,9 @@
// 浠庢湰鍦板瓨鍌ㄨ幏鍙栧凡閫夋嫨鐨勯」鐩�
storage.getItemSafe('selectedProject').then(project => {
if (project) {
- const projectName = project === 'JYG' ? '鍢夊唱鍏抽」鐩�' : '姘戝嫟椤圭洰';
+ const projectName = project === 'JYG' ? '鍢夊唱鍏抽」鐩�' :
+ project === 'MQ' ? '姘戝嫟椤圭洰' :
+ project === 'TEST' ? '娴嬭瘯椤圭洰' : '鏈煡椤圭洰';
console.log(`浠庡瓨鍌ㄨ幏鍙栭」鐩俊鎭�: ${project} (${projectName})`);
this.setData({
@@ -491,7 +495,9 @@
storage.setItem("clientId", String(data.content.clientId));
// 璁剧疆褰撳墠椤圭洰鐨則ag
- const tag = this.data.selectedProject === 'JYG' ? 'ym' : 'mq';
+ const tag = this.data.selectedProject === 'JYG' ? 'ym' :
+ this.data.selectedProject === 'MQ' ? 'mq' :
+ this.data.selectedProject === 'TEST' ? 'test' : 'unknown';
getApp().globalData.tag = tag;
// 淇濆瓨鐢ㄦ埛淇℃伅
diff --git a/pages/waterIntake/waterIntake.js b/pages/waterIntake/waterIntake.js
index 22ec85b..a1e0926 100644
--- a/pages/waterIntake/waterIntake.js
+++ b/pages/waterIntake/waterIntake.js
@@ -40,6 +40,27 @@
openTimeText: "",
openTime: "",
irrigateProfile: [], //鑾峰彇鎵�閫夌亴婧夋柟寮忕殑璇︾粏鏁版嵁
+ dialog_mode: true,
+ dialog_time: false,
+ dialog_water: false,
+ group_time: false, //鏄惁鏄剧ず閫夋嫨鍒嗛挓鎴栧皬鏃剁殑鍗曢�夋
+ openTime: "", //璁″垝寮�娉电殑寮�濮嬫椂闂�
+ openTimeText: "",
+ isShowOpenTime: "false",
+ isOpenTiming: false, //鏄惁鏄鍒掑紑闃�鏃堕棿鏍峰紡鐨勫紑闃�
+ postMinutes: 0, //瀹氱亴婧夋椂闀跨殑鏃堕棿
+ showForceConfirm: false,
+ showErrorDialog: false, //閿欒鎻愮ず
+ errorData: "",
+ confirmBtn: {
+ content: '纭'
+ },
+ radioValue: "0", //寮�闃�鏂瑰紡閫変腑鐨勭被鍨�
+ costiomTime: "", //鑷畾涔夌亴婧夋椂闂�
+ waterAmount: 0, //瀹氶噺寮�闃�鐨勬按閲�
+ costiomWater: "", //杈撳叆鐨勮嚜瀹氫箟姘撮噺
+ isWXRefreshing: false,
+ irrigateProfile: [], //鑾峰彇鎵�閫夌亴婧夋柟寮忕殑璇︾粏鏁版嵁
},
// 鍒囨崲 Tabs
@@ -73,10 +94,13 @@
choseCard(event) {
//鏄剧ず浜屾纭寮圭獥
this.setData({
- showConfirm: true,
+ // showConfirm: true,
choseItem: event.currentTarget.dataset.item,
allWaterPoints: []
+
})
+ this.initDialogData();
+
// console.log(intakeId);
// wx.navigateTo({
// url: '/pages/openCard/openCard?intakeId='+intakeId,
@@ -100,8 +124,8 @@
});
const app = getApp();
const data = {
- intakeId: intakeId, //鍙栨按鍙D
- // vcId: vcId, //铏氭嫙鍗D
+ intakeId: this.data.choseItem.intakeId, //鍙栨按鍙D
+ // vcId: app.globalData.vcId, //铏氭嫙鍗D
operator: app.globalData.clientId, //鎿嶄綔鍛�
forceOpen: !!isforce // 浣跨敤閫昏緫闈炴搷浣滅 !! 鏉ョ‘淇� isForce 鏄竷灏斿��
};
@@ -283,10 +307,14 @@
this.getcommonWaterPoints();
},
confirmDialog() {
+ // this.setData({
+ // showConfirm: false
+ // })
+ // this.postOpenValva(this.data.choseItem.intakeId);
this.setData({
- showConfirm: false
+ showConfirm: false
})
- this.postOpenValva(this.data.choseItem.intakeId);
+ this.initDialogData();
},
closeDialog() {
this.setData({
@@ -476,8 +504,8 @@
mask: true // 鏄惁鏄剧ず閫忔槑钂欏眰锛岄槻姝㈣Е鎽哥┛閫忥紝榛樿涓� false
});
const data = {
- intakeId: this.data.intakeId, //鍙栨按鍙D
- // vcId: this.data.vcId, //铏氭嫙鍗D
+ intakeId: this.data.choseItem.intakeId, //鍙栨按鍙D
+ // vcId: app.globalData.vcId, //铏氭嫙鍗D
minutes: this.data.postMinutes, //鍒嗛挓
operator: app.globalData.clientId, //鎿嶄綔鍛�
plannedOpenTime: this.data.openTime
@@ -513,8 +541,8 @@
mask: true // 鏄惁鏄剧ず閫忔槑钂欏眰锛岄槻姝㈣Е鎽哥┛閫忥紝榛樿涓� false
});
const data = {
- intakeId: this.data.intakeId, //鍙栨按鍙D
- // vcId: this.data.vcId, //铏氭嫙鍗D
+ intakeId: this.data.choseItem.intakeId, //鍙栨按鍙D
+ // vcId: app.globalData.vcId, //铏氭嫙鍗D
minutes: this.data.postMinutes, //鍒嗛挓
operator: app.globalData.clientId //鎿嶄綔鍛�
};
@@ -541,4 +569,37 @@
})
});
},
+ // 閫氳繃灏忔椂杞崲鎴愬垎閽�
+ hourToMinutes(hours) {
+ // 妫�鏌ヨ緭鍏ユ槸鍚﹀悎娉�
+ if (isNaN(hours) || hours < 0) {
+ console.error('璇疯緭鍏ユ湁鏁堢殑灏忔椂鏁�');
+ return null;
+ }
+ // 灏嗗皬鏃惰浆鎹负鍒嗛挓
+ const minutes = hours * 60;
+ return minutes;
+ },
+ minutesToHours(minutes) {
+ // 妫�鏌ヨ緭鍏ユ槸鍚﹀悎娉�
+ if (isNaN(minutes) || hours < 0) {
+ console.error('璇疯緭鍏ユ湁鏁堢殑灏忔椂鏁�');
+ return null;
+ }
+ // 灏嗗皬鏃惰浆鎹负鍒嗛挓
+ const hours = minutes / 60;
+ return hours;
+ },
+ // 閫夋嫨姘撮噺鍚庣殑澶勭悊
+ handleWaterWrapperTap(e) {
+ const index = e.currentTarget.dataset.index;
+ console.log(index)
+ if (index !== undefined) {
+ this.data.waterAmount = parseInt(this.data.irrigateProfile[index].defaultValue)
+ this.setData({
+ activeIndex: parseInt(index),
+ costiomWater: ""
+ });
+ }
+ },
})
\ No newline at end of file
diff --git a/pages/waterIntake/waterIntake.json b/pages/waterIntake/waterIntake.json
index 5d12b46..ce04389 100644
--- a/pages/waterIntake/waterIntake.json
+++ b/pages/waterIntake/waterIntake.json
@@ -4,7 +4,11 @@
"t-avatar": "tdesign-miniprogram/avatar/avatar",
"t-switch": "tdesign-miniprogram/switch/switch",
"t-button": "tdesign-miniprogram/button/button",
- "t-dialog": "tdesign-miniprogram/dialog/dialog"
+ "t-dialog": "tdesign-miniprogram/dialog/dialog",
+ "t-input": "tdesign-miniprogram/input/input",
+ "t-radio": "tdesign-miniprogram/radio/radio",
+ "t-radio-group": "tdesign-miniprogram/radio-group/radio-group",
+ "t-date-time-picker": "tdesign-miniprogram/date-time-picker/date-time-picker"
},
"navigationBarTitleText": "甯哥敤鍙栨按鍙�",
"navigationBarTextStyle": "white"
diff --git a/pages/waterIntake/waterIntake.wxss b/pages/waterIntake/waterIntake.wxss
index 948121e..58a1612 100644
--- a/pages/waterIntake/waterIntake.wxss
+++ b/pages/waterIntake/waterIntake.wxss
@@ -137,10 +137,7 @@
flex-direction: column;
padding-bottom: 10rpx; /* 澧炲姞搴曢儴濉厖 */
}
-.dialog{
- --td-dialog-content-font-size:40rpx;
- --td-dialog-content-line-height:50rpx
-}
+
.error-dialog{
--td-dialog-title-color:red;
@@ -179,4 +176,267 @@
.water-intake-name {
font-size: 50rpx !important;
margin-left: 15rpx;
-}
\ No newline at end of file
+}
+
+.item-balance-img {
+ width: 50rpx;
+ height: 40rpx;
+ }
+
+ .item-bottom {
+ display: flex;
+ margin-top: 10rpx;
+ align-items: center;
+ /* 鍨傜洿灞呬腑 */
+ }
+
+ .item-card {
+ margin-left: 10rpx;
+ }
+
+ .item-card text {
+ font-size: 35rpx;
+ color: #fff;
+ }
+
+ .item-balance-text {
+ color: #fff;
+ font-size: 50rpx;
+ margin-left: 5rpx;
+ }
+
+ .item-balance-text-red {
+ color: #FF6A6A;
+ font-size: 50rpx;
+ margin-left: 5rpx;
+ }
+
+ .item-button {
+ margin-left: auto;
+ /* 灏嗘寜閽浐瀹氬湪鍙宠竟 */
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ /* 浣挎寜閽唴閮ㄦ按骞冲拰鍨傜洿灞呬腑 */
+ background-color: #32CD32;
+ color: white;
+ padding-left: 40rpx;
+ padding-right: 40rpx;
+ padding-bottom: 10rpx;
+ padding-top: 10rpx;
+ border-radius: 30rpx;
+ font-size: 35rpx;
+ border: none;
+ }
+
+ .item-button-gray {
+ margin-left: auto;
+ /* 灏嗘寜閽浐瀹氬湪鍙宠竟 */
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ /* 浣挎寜閽唴閮ㄦ按骞冲拰鍨傜洿灞呬腑 */
+ background-color: #8B8989;
+ color: #FF6A6A;
+ padding-left: 40rpx;
+ padding-right: 40rpx;
+ padding-bottom: 10rpx;
+ padding-top: 10rpx;
+ border-radius: 30rpx;
+ font-size: 35rpx;
+ border: none;
+ }
+
+ .item-balance-text-yuan {
+ color: white;
+ margin-left: 10rpx;
+ margin-bottom: 10rpx;
+ font-size: 30rpx;
+ }
+
+ .item-balance-text-yuan-red {
+ color: #FF6A6A;
+ margin-left: 10rpx;
+ margin-bottom: 10rpx;
+ font-size: 30rpx;
+ }
+
+ .item-balance {
+ display: flex;
+ align-items: flex-end;
+ /* 搴曢儴瀵归綈 */
+ }
+
+ .list-container {
+ display: flex;
+ flex-grow: 1; /* 鍗犳弧鍓╀綑楂樺害 */
+ padding-bottom: 30rpx;
+ height: 100%;
+ flex-direction: column; /* 纭繚鍐呴儴鍏冪礌鎸夊垪鎺掑垪 */
+ }
+
+ .dialog {
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ width: 80%;
+ z-index: 999;
+ /* 淇濊瘉 Dialog 鍦ㄨ挋灞備箣涓� */
+ }
+
+ .dialog-content {
+ margin-top: 50rpx;
+ padding: 20px;
+ /* Optional: 璁剧疆鏈�澶ч珮搴︼紝浠ラ槻鍐呭杩囧 */
+ background-color: #fff;
+ border-radius: 10px;
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+ }
+
+ .dialog-title {
+ font-size: 38rpx;
+ margin-bottom: 20rpx;
+ text-align: center;
+ }
+
+ .dialog-title-text {
+ font-size: 38rpx;
+ margin-bottom: 20rpx;
+ text-align: center;
+ }
+
+ .dialog-title-img {
+ width: 50rpx;
+ height: 50rpx;
+ position: absolute;
+ left: 0; /* 闈犲乏瀵归綈 */
+ margin-left: 40rpx;
+ }
+
+ button {
+ display: block;
+ width: 100%;
+ margin: 10rpx 0;
+ padding: 10rpx;
+ border: none;
+ background-color: #007aff;
+ color: #fff;
+ border-radius: 15rpx;
+ text-align: center;
+ font-size: 30rpx;
+ }
+
+ .overlay {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.5);
+ /* 榛戣壊鍗婇�忔槑 */
+ z-index: 998;
+ /* 淇濊瘉钂欏眰鍦ㄦ渶涓婂眰 */
+ }
+
+ .close {
+ left: 50%;
+ width: 80rpx;
+ height: 80rpx;
+ z-index: 1000;
+ margin-top: -50rpx;
+ position: absolute;
+ transform: translate(-50%);
+ }
+
+ .row {
+ display: flex;
+ justify-content: space-around;
+ }
+
+ .chose-wrapper {
+ display: flex;
+ align-items: flex-end;
+ /* 搴曢儴瀵归綈 */
+ justify-content: center;
+ /* 姘村钩灞呬腑 */
+ }
+
+ .chose-number {
+ font-size: 40rpx;
+ }
+
+ .chose-label {
+ font-size: 30rpx;
+ margin-left: 5rpx;
+ margin-bottom: 5rpx;
+ }
+
+ .choseitem text {
+ color: #1890FF;
+ }
+
+
+
+
+ .choseitem {
+ background-color: rgba(80, 78, 78, 0.082);
+ border-radius: 5px;
+ width: 100%;
+ height: 5vh;
+ margin-left: 20rpx;
+ margin-top: 10rpx;
+ margin-right: 20rpx;
+ margin-bottom: 10rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+
+ .choseitemactive {
+ background-color: #1890FF;
+ border-radius: 5px;
+ width: 100%;
+ height: 5vh;
+ margin-left: 20rpx;
+ margin-top: 10rpx;
+ margin-right: 20rpx;
+ margin-bottom: 10rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+
+ .box {
+ padding: 32rpx;
+ display: flex;
+ justify-content: space-between;
+ background-color: var(--td-bg-color-container, #fff);
+ }
+
+ .open-time {
+ align-items: center;
+ justify-content: center;
+ display: flex;
+ margin-bottom: 20rpx;
+ font-size: 30rpx;
+ }
+
+ .item {
+ background-color: #1890FF;
+ margin-top: 20rpx;
+ margin-left: 20rpx;
+ margin-right: 20rpx;
+ padding: 30rpx;
+ border-radius: 30rpx;
+ }
+
+ .item-gray {
+ background-color: #D3D3D3;
+ margin-top: 20rpx;
+ margin-left: 20rpx;
+ margin-right: 20rpx;
+ padding: 30rpx;
+ border-radius: 30rpx;
+ }
+
\ No newline at end of file
diff --git a/project.private.config.json b/project.private.config.json
index 126fb63..92ec537 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -4,5 +4,6 @@
"setting": {
"compileHotReLoad": true,
"urlCheck": false
- }
+ },
+ "libVersion": "trial"
}
\ No newline at end of file
--
Gitblit v1.8.0