更新应用配置,添加AppID并修改页面路由;优化取水口界面,增加定时开阀功能和相关参数设置;修复首页反馈图标及提示信息。
| New file |
| | |
| | | # 大禹节水灌溉系统 |
| | | |
| | | ## 项目概述 |
| | | |
| | | 大禹节水灌溉系统是一个微信小程序项目,用于管理和控制农业灌溉系统。该系统允许用户查看当前灌溉计划、创建新的灌溉计划、管理轮灌组以及监控灌溉状态等功能。 |
| | | |
| | | ## 项目结构 |
| | | |
| | | ``` |
| | | irrigate_user/ |
| | | ├── api/ # API接口相关文件 |
| | | ├── images/ # 图片资源文件 |
| | | ├── miniprogram_npm/ # 小程序NPM构建目录 |
| | | │ └── tdesign-miniprogram/ # TDesign UI组件库 |
| | | ├── node_modules/ # 项目依赖 |
| | | │ ├── dayjs/ # 日期处理库 |
| | | │ └── tdesign-miniprogram/ # TDesign UI组件库源码 |
| | | ├── pages/ # 页面文件 |
| | | │ ├── createIrrigation/ # 新建灌溉计划页面 |
| | | │ ├── feedback/ # 反馈页面 |
| | | │ ├── home/ # 首页 |
| | | │ ├── index/ # 引导页 |
| | | │ ├── irrigation/ # 灌溉计划管理页面 |
| | | │ ├── login/ # 登录页面 |
| | | │ ├── my/ # 个人中心页面 |
| | | │ ├── openCard/ # 开卡页面 |
| | | │ ├── personCharge/ # 个人充值页面 |
| | | │ ├── rechargeCard/ # 充值卡页面 |
| | | │ ├── rechargeList/ # 充值记录页面 |
| | | │ ├── rechargeMoney/ # 充值金额页面 |
| | | │ ├── valveList/ # 阀门列表页面 |
| | | │ ├── wallet/ # 钱包页面 |
| | | │ ├── waterIntake/ # 取水页面 |
| | | │ ├── wxbind/ # 微信绑定页面 |
| | | │ └── wxlogin/ # 微信登录页面 |
| | | ├── utils/ # 工具函数 |
| | | ├── .cloudbase/ # 云开发配置 |
| | | ├── .eslintrc.js # ESLint配置 |
| | | ├── .gitignore # Git忽略文件 |
| | | ├── app.js # 小程序入口文件 |
| | | ├── app.json # 小程序全局配置 |
| | | ├── app.wxss # 小程序全局样式 |
| | | ├── package.json # 项目依赖配置 |
| | | ├── package-lock.json # 依赖版本锁定文件 |
| | | ├── project.config.json # 项目配置文件 |
| | | └── sitemap.json # 小程序sitemap配置 |
| | | ``` |
| | | |
| | | ## 使用的框架和库 |
| | | |
| | | 1. **微信小程序原生框架**:项目基于微信小程序原生框架开发,使用WXML、WXSS、JS和JSON文件组织代码。 |
| | | |
| | | 2. **TDesign 小程序组件库**:使用腾讯TDesign UI组件库(版本1.2.8),提供了丰富的UI组件,如日期时间选择器(t-date-time-picker)等。 |
| | | - 文档地址:https://tdesign.tencent.com/miniprogram/overview |
| | | - 组件使用方式:在页面JSON文件中引入所需组件,如: |
| | | ```json |
| | | { |
| | | "usingComponents": { |
| | | "t-date-time-picker": "tdesign-miniprogram/date-time-picker/date-time-picker", |
| | | "t-avatar": "tdesign-miniprogram/avatar/avatar", |
| | | "t-switch": "tdesign-miniprogram/switch/switch", |
| | | "t-button": "tdesign-miniprogram/button/button", |
| | | "t-dialog": "tdesign-miniprogram/dialog/dialog" |
| | | } |
| | | } |
| | | ``` |
| | | |
| | | 3. **Day.js**:轻量级的JavaScript日期处理库,用于日期格式化和操作。 |
| | | - 主要用于TDesign日期时间选择器组件内部。 |
| | | - 文档地址:https://day.js.org/ |
| | | |
| | | 4. **云开发**:项目可能使用了微信小程序云开发功能,用于数据存储和云函数。 |
| | | |
| | | ## 代码风格和规范 |
| | | |
| | | 1. **文件命名**: |
| | | - 页面目录使用驼峰命名法,如`createIrrigation` |
| | | - 页面文件与目录同名,如`createIrrigation.js` |
| | | |
| | | 2. **样式规范**: |
| | | - 使用WXSS编写样式 |
| | | - 类名使用连字符命名法,如`create-irrigation-container` |
| | | - 组件样式采用BEM命名方式的变体 |
| | | |
| | | 3. **JavaScript规范**: |
| | | - 使用ES6语法 |
| | | - 函数采用驼峰命名法,如`onPlanCodeInput` |
| | | - 页面逻辑使用微信小程序Page构造器组织 |
| | | |
| | | 4. **组件使用**: |
| | | - 第三方组件使用前缀区分,如TDesign组件使用`t-`前缀 |
| | | - 自定义组件放在对应页面目录下 |
| | | |
| | | ## 页面交互模式 |
| | | |
| | | 1. **表单交互**: |
| | | - 输入框直接输入 |
| | | - 时间选择使用弹出式选择器 |
| | | - 表单提交前进行数据验证 |
| | | |
| | | 2. **列表交互**: |
| | | - 使用可折叠的嵌套列表 |
| | | - 支持项目展开/折叠 |
| | | - 支持选择/取消选择项目 |
| | | |
| | | 3. **导航交互**: |
| | | - 使用微信小程序原生导航 |
| | | - 页面间通过`wx.navigateTo`进行跳转 |
| | | |
| | | 4. **UI风格**: |
| | | - 主色调:蓝色(#1890FF) |
| | | - 背景色:浅灰色(#f5f5f5) |
| | | - 文字颜色:深色(#333)、中等(#666)、浅色(#999) |
| | | - 圆角风格:按钮使用大圆角(44rpx),卡片使用小圆角(8rpx) |
| | | |
| | | ## 开发注意事项 |
| | | |
| | | 1. 新增页面时,需要在`app.json`的`pages`数组中添加页面路径。 |
| | | |
| | | 2. 使用TDesign组件时,需要在页面的JSON文件中引入对应组件。 |
| | | |
| | | 3. 图标使用SVG格式,存放在`images`目录下。 |
| | | |
| | | 4. 网络请求应统一管理,建议放在`api`目录下。 |
| | | |
| | | 5. 保持与现有代码风格一致,特别是命名规范和文件组织方式。 |
| | | |
| | | 6. 项目使用npm管理依赖,添加新依赖时使用: |
| | | ``` |
| | | npm install 包名 --save |
| | | ``` |
| | | 然后在微信开发者工具中构建npm。 |
| | | |
| | | ## 如何运行项目 |
| | | |
| | | 1. 安装依赖: |
| | | ``` |
| | | npm install |
| | | ``` |
| | | |
| | | 2. 使用微信开发者工具打开项目目录。 |
| | | |
| | | 3. 在工具中点击"构建npm",将npm包构建到miniprogram_npm目录。 |
| | | |
| | | 4. 在工具中点击"编译"按钮,或使用快捷键Ctrl+B(Windows)/Cmd+B(Mac)进行编译。 |
| | | |
| | | 5. 在模拟器中预览效果,或使用真机调试功能在手机上预览。 |
| | |
| | | |
| | | const PROJECT_URLS = { |
| | | JYG: 'https://irrigate.dayuyanjiuyuan.top/', // 嘉峪关项目 |
| | | MQ: 'https://minqin.dayuyanjiuyuan.top/' // 民勤项目 |
| | | // MQ: 'https://shifanqu1.dayuyanjiuyuan.top/' // 民勤项目 |
| | | MQ: 'https://no253541tf71.vicp.fun/' // 民勤项目 |
| | | } |
| | | |
| | | // 尝试从本地存储获取已选择的项目 |
| | |
| | | header.Authorization = `Bearer ${token}` |
| | | } |
| | | header.tag = app.globalData.tag; |
| | | header.appId = app.globalData.AppID; |
| | | return new Promise((resolve, reject) => { |
| | | // 获取最新的 BASEURL |
| | | let currentBaseUrl = app.globalData.baseUrl || config.BASEURL; |
| | |
| | | userCode:"", |
| | | token:"", |
| | | isLoggedIn:false, |
| | | operator:"2025030416200600006" |
| | | operator:"2025030416200600006", |
| | | AppID:"wxbc2b6a00dd904ead" |
| | | } |
| | | }) |
| | |
| | | { |
| | | "pages": [ |
| | | |
| | | "pages/irrigation/irrigation", |
| | | "pages/createIrrigation/createIrrigation", |
| | | "pages/groupDetail/groupDetail", |
| | | "pages/home/home", |
| | | "pages/valveList/valveList", |
| | | "pages/feedback/feedback", |
| | |
| | | "componentFramework": "glass-easel", |
| | | "sitemapLocation": "sitemap.json", |
| | | "lazyCodeLoading": "requiredComponents" |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| | | <path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" fill="#666666"/> |
| | | </svg> |
| New file |
| | |
| | | <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| | | <path d="M9.29 6.71a.996.996 0 0 0 0 1.41L13.17 12l-3.88 3.88a.996.996 0 1 0 1.41 1.41l4.59-4.59a.996.996 0 0 0 0-1.41L10.7 6.7c-.38-.38-1.02-.38-1.41.01z" fill="#CCCCCC"/> |
| | | </svg> |
| New file |
| | |
| | | <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| | | <rect width="18" height="18" x="3" y="3" rx="2" fill="#1890FF"/> |
| | | <path d="M9.86 14.54l-3.36-3.36-1.06 1.06L9.86 16.66l8.48-8.48-1.06-1.06-7.42 7.42z" fill="white"/> |
| | | </svg> |
| New file |
| | |
| | | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="34" height="34" viewBox="0 0 34 34" fill="none"> |
| | | <g clip-path="url(#clip-path-66_13)"> |
| | | <path d="M6.73498 30.7182C6.36243 30.7182 6.26083 30.7012 6.03222 30.5996C5.87982 30.5234 5.68508 30.3795 5.54961 30.244C5.3972 30.0916 4.71985 29.0502 2.88252 26.1376C1.48548 23.9192 0.359378 22.1412 0.266241 21.9803C-0.165572 21.2606 -0.0639686 20.4309 0.511783 19.872C0.706522 19.6858 9.7492 13.9537 13.6355 11.4898C25.3622 4.07276 26.4629 3.37847 26.5984 3.31073L26.6068 3.31073C26.6407 3.30227 26.7339 3.27686 26.827 3.25146C26.9709 3.20913 27.1233 3.1922 27.2757 3.1922C27.7414 3.1922 28.1902 3.37847 28.4696 3.68328C28.622 3.85262 33.7698 11.9978 33.9137 12.3111C34.0155 12.5312 34.0238 12.6159 34.0069 12.963C33.9815 13.4372 33.8631 13.7081 33.5581 14.0045C33.3465 14.2077 7.97115 30.3202 7.4462 30.5912C7.20912 30.7012 7.13292 30.7182 6.73498 30.7182ZM1.23994 20.8627C1.12987 21.0151 1.18067 21.1759 1.24841 21.286C1.41774 21.5739 6.26929 29.2534 6.3963 29.4227C6.48943 29.5413 6.63337 29.6259 6.74344 29.6259C6.76884 29.6259 6.78578 29.6259 6.80271 29.6175C7.03132 29.482 12.882 25.7989 19.8164 21.4046C32.2289 13.5472 32.7115 13.234 32.8046 13.0646C32.8724 12.9207 32.8724 12.8784 32.8554 12.8191C32.7454 12.5566 27.733 4.72471 27.5382 4.5215C27.5128 4.4961 27.4874 4.46223 27.4789 4.43683C27.4705 4.42837 27.462 4.41143 27.462 4.40297L27.4535 4.40297C27.1741 4.40297 25.4892 5.4698 17.4202 10.5838L14.2451 12.5989C7.28533 17.0018 1.51088 20.6764 1.23994 20.8627ZM2.26444 17.9331C2.2475 17.9331 2.23057 17.9246 2.21363 17.9246C2.20517 17.9162 2.1967 17.9162 2.18823 17.9077C2.1713 17.8908 2.13743 17.8484 2.1459 16.6631C2.1459 15.647 2.16283 15.4184 2.25597 14.7665C2.41684 13.7166 2.56078 13.1154 2.84019 12.2857C3.28047 10.9564 3.78849 9.91493 4.59284 8.6957C5.321 7.58653 6.00682 6.78217 6.86198 6.00321C9.48673 3.63248 12.3062 2.37937 15.7438 2.05763C15.9301 2.04069 16.2603 2.03223 16.6667 2.03223C17.3948 2.03223 18.3685 2.06609 18.8003 2.12536C20.2567 2.3201 21.586 2.67571 22.856 3.22606C23.0761 3.3192 23.4148 3.48007 23.7281 3.64094C24.2869 3.92035 24.2869 3.93728 24.2869 3.99655C24.2869 4.03889 24.2869 4.07276 23.762 4.3945L23.2793 4.69931C23.2624 4.70778 23.2455 4.71624 23.237 4.71624C23.2201 4.71624 23.2116 4.71624 23.1947 4.70778L22.9491 4.58077C21.967 4.08969 20.4429 3.59861 19.2406 3.38693C18.5379 3.2684 17.598 3.1922 16.7259 3.1922C16.328 3.1922 15.9639 3.20913 15.676 3.23453C13.3053 3.4716 11.341 4.17436 9.32586 5.51213C7.22606 6.90071 5.73588 8.58563 4.63518 10.8124C3.74615 12.6243 3.33127 14.3939 3.3228 16.3837L3.3228 17.2812C3.3228 17.3066 3.30587 17.3404 3.28047 17.3489L2.79785 17.6452C2.73858 17.6876 2.35757 17.9331 2.26444 17.9331Z" fill="#D43030" > |
| | | </path> |
| | | <path d="M16.963 31.8101C16.3195 31.8101 15.7269 31.7847 15.3289 31.7339C14.0927 31.5899 12.8566 31.2936 11.7559 30.8702C11.4849 30.7686 10.9346 30.5231 10.5451 30.3368C9.67301 29.9304 9.67301 29.905 9.66454 29.8542C9.65607 29.8288 9.67301 29.7949 9.68994 29.778L9.69841 29.7695C9.69841 29.7695 9.91855 29.6256 10.198 29.4478L10.6806 29.143C10.6975 29.1345 10.706 29.126 10.7229 29.126C10.7314 29.126 10.7483 29.126 10.7568 29.1345L11.2648 29.3631C12.501 29.9219 13.7456 30.286 15.0664 30.4892C15.7269 30.5823 16.3957 30.6332 17.0477 30.6332C20.1381 30.6332 23.0931 29.5748 25.5993 27.5681C26.1835 27.094 27.1741 26.1033 27.6398 25.5191C29.5025 23.1907 30.5778 20.295 30.671 17.3655L30.6964 16.5273C30.6964 16.5019 30.7133 16.4765 30.7302 16.4595L31.179 16.1547L31.6362 15.8499C31.6531 15.8414 31.6701 15.833 31.687 15.833C31.6955 15.833 31.7124 15.833 31.7209 15.8414C31.7463 15.8499 31.7632 15.8753 31.7717 15.9092L31.8055 16.1716C31.8479 16.4934 31.814 17.9328 31.7547 18.4746C31.4076 21.4211 30.3238 24.0713 28.5119 26.3404C27.7499 27.2972 26.5391 28.4148 25.5062 29.1091C23.3386 30.5908 21.1542 31.4206 18.631 31.7169C18.2331 31.7762 17.6234 31.8101 16.963 31.8101ZM8.35217 14.0126C8.33523 14.0126 8.30983 14.0041 8.30136 13.9956C8.27596 13.9702 8.25903 13.9364 8.27596 13.9025L8.35217 13.6993C8.64851 12.9542 9.08879 12.1668 9.58834 11.4725C9.96088 10.9476 10.7822 10.0924 11.2733 9.71138C12.7296 8.57681 14.3722 7.90793 16.1756 7.73012C16.2857 7.72166 16.5736 7.71319 16.9376 7.71319C17.2848 7.71319 17.6997 7.72166 17.8351 7.73859L18.0722 7.76399C18.1061 7.77246 18.1399 7.79786 18.1484 7.83173C18.1569 7.86559 18.1399 7.89946 18.1145 7.92486L16.5651 8.89009C16.5566 8.89856 16.5397 8.89856 16.5312 8.90702L16.0232 8.96629C13.5763 9.28804 11.3241 10.7189 10.1472 12.6917C9.97782 12.9796 9.93548 13.0135 9.26659 13.4368L8.91098 13.6654C8.69084 13.8094 8.52997 13.911 8.48764 13.9364L8.3945 13.9956C8.38603 14.0041 8.3691 14.0126 8.35217 14.0126ZM7.91189 13.276C7.89495 13.276 7.87802 13.2675 7.86109 13.259L7.46314 12.9457L7.09906 12.6494L6.65878 12.7764L6.43864 12.8441C6.2439 12.9034 6.1423 12.9288 6.10843 12.9373C6.09997 12.9373 6.08303 12.9457 6.07456 12.9457C6.0407 12.9457 6.00683 12.9288 5.98989 12.9034C5.94756 12.8441 5.94756 12.7425 6.13383 12.1329L6.25237 11.7773L5.98143 11.3878C5.66815 10.9476 5.66815 10.9306 5.66815 10.9052C5.66815 10.8121 5.76129 10.8121 5.85442 10.8121C5.94756 10.8121 6.09997 10.8205 6.2947 10.8205L6.78579 10.846L7.06519 10.4565C7.41234 9.99926 7.41234 9.99926 7.46314 9.99926C7.53088 9.99926 7.55628 9.99926 7.72561 10.5665L7.86109 11.0407L8.32677 11.21C8.40297 11.2354 8.75858 11.3709 8.85172 11.4217C8.86018 11.4217 8.86865 11.4302 8.87712 11.4386C8.89405 11.4556 8.90252 11.4725 8.90252 11.4894C8.91098 11.5487 8.91098 11.5487 8.4453 11.8874L8.04736 12.1753L8.00502 13.1913C8.00502 13.2252 7.98809 13.2506 7.95422 13.2675C7.93729 13.2675 7.92035 13.276 7.91189 13.276ZM10.9684 9.16103C10.9176 9.16103 10.8838 9.16103 10.6636 8.62762L10.4774 8.18734L10.2149 8.12807L10.054 8.0942C9.91855 8.0688 9.78308 8.03493 9.69841 8.018L9.47827 7.97566C9.4444 7.9672 9.419 7.9418 9.41053 7.9164C9.40207 7.88253 9.41053 7.84866 9.43593 7.83173L9.73228 7.56925C9.73228 7.56925 10.1048 7.24751 10.1387 7.22211C10.2064 7.16284 10.2064 7.16284 10.1895 6.84956C10.181 6.75643 10.1726 6.65482 10.1641 6.56169C10.1556 6.45162 10.1472 6.35848 10.1387 6.29921L10.1133 6.10447C10.1133 6.07061 10.1218 6.03674 10.1556 6.0198C10.1726 6.01134 10.181 6.00287 10.198 6.00287C10.2149 6.00287 10.2318 6.01134 10.2403 6.0198L10.6975 6.31615L11.1293 6.58709L11.5781 6.37541C11.722 6.30768 12.0691 6.14681 12.1115 6.14681C12.1284 6.14681 12.1453 6.15527 12.1623 6.16374C12.2216 6.20608 12.2216 6.20608 12.0861 6.78183L11.9675 7.25597L12.2385 7.58618C12.5094 7.89946 12.5602 7.95026 12.5602 7.95026C12.6026 7.97566 12.6364 8.02646 12.6364 8.07727C12.6364 8.1958 12.5518 8.20427 11.7897 8.27201L11.5103 8.29741L11.2902 8.69535C11.0446 9.16103 11.0192 9.16103 10.9684 9.16103ZM15.8031 7.17977C15.7523 7.17977 15.7099 7.13744 15.7099 7.08664C15.7099 7.0443 15.7438 6.79876 15.7861 6.53629L15.8539 6.10447L15.7184 5.98594C15.6337 5.90127 15.4474 5.7404 15.3035 5.62186L15.058 5.41019C15.0326 5.38478 15.0241 5.35938 15.0326 5.32552C15.041 5.29165 15.0664 5.26625 15.1003 5.26625L16.0571 5.08844L16.2687 4.64816C16.5143 4.14861 16.5312 4.14015 16.5566 4.12321C16.5651 4.11475 16.582 4.11475 16.5905 4.11475C16.6413 4.11475 16.6667 4.11475 16.9292 4.59736C17.0985 4.90217 17.1747 4.97837 17.1916 4.99531C17.3271 5.00377 18.123 5.05457 18.1907 5.11384C18.25 5.17311 18.2754 5.19851 17.869 5.63879L17.5557 5.98594L17.6573 6.46008C17.7674 7.01043 17.7674 7.01043 17.7674 7.02737C17.7674 7.07817 17.7251 7.11204 17.6827 7.11204C17.6065 7.11204 17.1578 6.8919 17.1578 6.8919C17.107 6.8665 17.0562 6.8411 17.0138 6.82416C16.8614 6.74796 16.7768 6.70562 16.709 6.70562C16.6328 6.70562 16.5397 6.76489 16.3449 6.8919C16.2941 6.92577 16.2433 6.95963 16.1841 6.9935C15.9893 7.1205 15.8623 7.17977 15.8031 7.17977Z" fill="#D43030" > |
| | | </path> |
| | | <path d="M17.4118 29.8715C17.3017 29.8715 17.2509 29.7699 17.0985 29.4905L16.8445 29.0164L16.4804 28.991L16.3534 28.9825C15.9893 28.9656 15.8708 28.9571 15.8284 28.8555C15.7946 28.7539 15.8793 28.6777 16.074 28.4745L16.1587 28.3898L16.5058 28.0342L16.4127 27.5601C16.3026 27.0351 16.3026 27.0182 16.3026 27.0097C16.3026 26.9589 16.3449 26.925 16.3873 26.925C16.4296 26.925 16.7683 27.0859 16.9037 27.1536C17.1408 27.2637 17.3186 27.3484 17.3864 27.3653C17.4372 27.3399 17.5896 27.2637 17.8182 27.1282C17.8944 27.0859 17.9706 27.0436 18.0299 27.0097C18.1315 26.9504 18.2331 26.8996 18.25 26.8827C18.2669 26.8658 18.2839 26.8573 18.3093 26.8573C18.3177 26.8573 18.3347 26.8573 18.3431 26.8658C18.377 26.8827 18.4024 26.9166 18.3939 26.9589C18.3939 26.9589 18.3601 27.1621 18.3177 27.4076L18.3008 27.5093C18.2161 28.0173 18.2161 28.0173 18.504 28.2713L18.5633 28.3221L18.9189 28.6354C18.9443 28.6608 18.9527 28.6946 18.9443 28.72C18.9358 28.7454 18.9104 28.7708 18.8765 28.7793L18.6818 28.8132C18.6225 28.8216 18.5379 28.8386 18.4447 28.847C18.3601 28.864 18.2754 28.8724 18.2077 28.8894L17.979 28.9232L17.7504 29.3889L17.6912 29.5074C17.5726 29.7615 17.5134 29.8715 17.4118 29.8715ZM23.8043 27.9919C23.7535 27.9919 23.6858 27.9665 23.4402 27.8141C23.2539 27.704 23.0423 27.5601 22.9745 27.5093L22.9068 27.4584L22.4496 27.6532C21.967 27.8479 21.9246 27.8564 21.9077 27.8564C21.8992 27.8564 21.8908 27.8564 21.8823 27.8479C21.7976 27.8225 21.7892 27.8141 21.9416 27.2214L22.0601 26.7557L21.7299 26.3831L21.3743 25.9767C21.3573 25.9513 21.3489 25.9175 21.3573 25.8921C21.3658 25.8667 21.3997 25.8413 21.4251 25.8413L21.7976 25.7989C21.967 25.782 22.1786 25.7566 22.2802 25.7481L22.458 25.7312L22.7205 25.3078C22.8729 25.0708 22.983 24.8845 22.9999 24.8591C23.0084 24.8252 23.0423 24.8083 23.0761 24.8083C23.1439 24.8083 23.1439 24.8083 23.364 25.3417C23.4656 25.6042 23.5672 25.782 23.6011 25.8243C23.6519 25.8413 23.8297 25.8836 24.1176 25.9513C24.507 26.0275 24.5917 26.0445 24.6087 26.1291C24.6256 26.1969 24.5663 26.2392 24.5409 26.2646L24.4986 26.3069C24.4224 26.3747 24.27 26.5017 24.1176 26.6287L23.8043 26.8996L23.8297 27.3399C23.8466 27.6109 23.872 27.8479 23.8805 27.8818C23.889 27.9326 23.872 27.958 23.8636 27.9749C23.872 27.9834 23.8382 27.9919 23.8043 27.9919ZM16.8275 26.1207C16.6328 26.1207 16.2772 26.1207 16.1163 26.0953L15.9216 26.0699C15.8877 26.0614 15.8623 26.036 15.8539 26.0021C15.8454 25.9683 15.8623 25.9344 15.8877 25.909L16.6582 25.4179C17.3948 24.9438 17.4541 24.9099 17.7589 24.876C18.9104 24.7575 20.2397 24.3088 21.2303 23.6907C22.2125 23.0726 23.0846 22.2174 23.762 21.2099L24.0075 20.8373L24.0329 20.8119L24.7695 20.3378C25.4215 19.9059 25.5231 19.8467 25.5993 19.8467C25.6501 19.8467 25.6924 19.889 25.7009 19.9398C25.7009 20.0414 25.286 20.8966 25.159 21.1337C24.3716 22.6238 23.2201 23.8685 21.823 24.7236C20.6885 25.4264 19.3338 25.9005 18.0045 26.0614C17.7843 26.1037 17.3017 26.1207 16.8275 26.1207ZM27.9277 24.2156C27.9108 24.2156 27.86 24.2156 27.4366 23.987C27.2165 23.8685 27.0471 23.7838 26.9879 23.7669C26.9371 23.7838 26.7593 23.86 26.5137 23.9785C26.4714 24.0039 26.0904 24.1902 26.0142 24.1902C25.9634 24.1902 25.9295 24.1479 25.9295 24.1055C25.9295 24.0886 25.9295 24.0801 25.9549 23.987C25.9634 23.9362 25.9803 23.8685 25.9888 23.7923C26.0226 23.6399 26.0565 23.4028 26.0734 23.2843L26.0988 23.081L25.7686 22.717L25.4045 22.3275C25.3791 22.3021 25.3791 22.2682 25.3876 22.2428C25.3961 22.2174 25.4215 22.192 25.4553 22.1835L25.6331 22.1582C25.7263 22.1412 25.9718 22.1073 26.175 22.0819L26.4883 22.0311L26.7169 21.5909L26.954 21.1083C26.9709 21.0829 26.9963 21.0575 27.0302 21.0575C27.0641 21.0575 27.0895 21.0744 27.1064 21.1083L27.3604 21.6163C27.4959 21.8872 27.5975 22.0565 27.6398 22.0989C27.7837 22.1243 28.4611 22.2344 28.5796 22.2852L28.5881 22.2936C28.605 22.3106 28.6135 22.3275 28.6135 22.3444C28.6135 22.3783 28.622 22.4206 28.224 22.7932L27.8769 23.1318L27.9446 23.5975C28.0293 24.1733 28.0293 24.1733 27.9616 24.2071C27.9616 24.2071 27.9446 24.2156 27.9277 24.2156Z" fill="#D43030" > |
| | | </path> |
| | | <path d="M9.02954 19.8804L9.60529 19.5078L9.05494 18.6442L9.68149 18.2378L10.2318 19.1014L10.6891 18.8051L11.0955 19.4401L10.6383 19.7364L11.1039 20.4561L11.4595 20.092L11.6628 20.4307L11.7136 19.8296L12.1708 19.838C12.0522 19.5756 11.8998 19.3046 11.7305 19.0252L11.2563 19.33L10.8499 18.695L11.3325 18.3817C11.1717 18.1277 10.9854 17.8398 10.7822 17.5181L11.4257 17.1032C11.595 17.3742 11.7813 17.662 11.976 17.9668L13.0937 17.2556C13.6694 18.17 14.1436 18.8982 14.4992 19.4232C14.8548 19.9481 15.058 20.2275 15.0919 20.2529C15.1257 20.2783 15.1596 20.2868 15.1935 20.2698C15.2443 20.2444 15.2443 20.1682 15.185 20.0412C15.1342 19.9142 15.0157 19.6856 14.8294 19.3554C15.0919 19.3639 15.3289 19.347 15.5237 19.3216C15.8031 19.855 15.9555 20.2529 15.9809 20.5239C16.0063 20.7948 15.9301 20.9895 15.7523 21.1081C15.5575 21.2351 15.3205 21.2435 15.0326 21.1335C14.7532 21.0234 14.3891 20.6424 13.9404 19.9904L13.9319 20.6932L13.2884 20.6593C13.4662 21.3621 13.4831 22.0479 13.3561 22.7168C13.0598 22.6406 12.7635 22.5813 12.4671 22.5305C12.6534 21.9294 12.6449 21.2943 12.4502 20.6085C12.2046 20.6001 11.9676 20.5916 11.7474 20.5831C11.7813 20.6424 11.8152 20.6932 11.849 20.7525L11.5188 21.0996L12.3486 22.3866C12.4502 22.5474 12.501 22.7253 12.501 22.9031C12.501 23.0809 12.247 23.3433 11.739 23.6651C11.5696 23.4873 11.3749 23.301 11.1463 23.1063C11.2563 23.047 11.3495 22.9877 11.4341 22.9369C11.5442 22.8607 11.612 22.8015 11.6204 22.7507C11.6374 22.6999 11.612 22.6237 11.5527 22.5305L10.9939 21.65L10.5536 22.1241L10.0371 21.4637C10.2149 21.3028 10.3842 21.1419 10.5621 20.9726L10.0117 20.1174L9.43595 20.49L9.02954 19.8804ZM13.8896 19.9312C13.5424 19.4316 13.1953 18.8982 12.8397 18.3309L12.374 18.6273C12.6449 19.0506 12.8651 19.474 13.0344 19.8888C13.3307 19.8973 13.6186 19.9142 13.8896 19.9312ZM14.66 15.0288C14.9564 15.0373 15.2443 15.0542 15.5152 15.0712C15.4305 15.6892 15.2443 16.4005 14.9733 17.2133C14.7362 17.1117 14.4653 17.0101 14.169 16.9169C14.4399 16.1549 14.6092 15.5199 14.66 15.0288ZM15.5491 16.2481L16.3534 16.2481C16.345 16.5529 16.3196 16.8577 16.2772 17.1625L17.8944 19.6856L17.2171 20.1174L16.0656 18.3225C16.0063 18.5595 15.947 18.8051 15.8708 19.0506C15.693 18.9067 15.4559 18.7458 15.1681 18.5426C15.3967 17.7975 15.5237 17.027 15.5491 16.2481ZM15.7523 14.8087L18.2839 13.183L18.6903 13.818L16.1587 15.4437L15.7523 14.8087ZM16.4889 16.3073L19.4015 14.4446L19.8079 15.0796L19.0459 15.5707L20.0535 17.1371C20.2228 17.3996 20.2905 17.6366 20.2567 17.8483C20.2228 18.06 20.1043 18.2463 19.8926 18.4071C19.6809 18.568 19.3592 18.7881 18.9274 19.0675C18.7411 18.8813 18.5379 18.695 18.3093 18.5003C18.6649 18.3055 18.9358 18.1446 19.1306 18.0261C19.3677 17.8737 19.41 17.6705 19.2491 17.425L18.3516 16.0279L16.9122 16.9508L16.4889 16.3073ZM20.4768 11.3034L21.2134 10.8292L21.7638 11.6929L23.5842 10.5244L25.3368 13.2592L24.6171 13.7249L24.4055 13.3862L23.3132 14.089L24.3208 15.6554L23.5842 16.1295L22.5597 14.5631L21.4675 15.2659L21.6961 15.613L20.9764 16.0787L19.2152 13.327L21.0356 12.1585L20.4768 11.3034ZM21.0356 14.597L22.1279 13.8943L21.4505 12.8444L20.3583 13.5471L21.0356 14.597ZM23.2963 11.6674L22.2041 12.3702L22.8814 13.4201L23.9737 12.7173L23.2963 11.6674Z" fill="#D43030" > |
| | | </path> |
| | | </g> |
| | | <defs> |
| | | <clipPath id="clip-path-66_13"> |
| | | <path d="M0 34L34 34L34 0L0 0L0 34Z" fill="white"/> |
| | | </clipPath> |
| | | </defs> |
| | | </svg> |
| New file |
| | |
| | | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="34" height="34" viewBox="0 0 34 34" fill="none"> |
| | | <path d="M33.7304 12.1626L28.5696 4.02431C28.1167 3.31514 27.1769 3.10582 26.4634 3.5501L0.707134 19.8438C-0.00202843 20.2966 -0.21136 21.2365 0.232935 21.9457L5.39787 30.0839C5.85071 30.7931 6.79055 31.0024 7.49972 30.5539L33.2559 14.2602C33.9653 13.8116 34.1787 12.8718 33.7304 12.1626ZM32.7007 13.3887L6.94436 29.6824C6.71792 29.8276 6.4189 29.7593 6.27364 29.5328L1.11298 21.3946C0.967731 21.1681 1.03608 20.8691 1.2625 20.7238L27.0188 4.43016C27.2452 4.28918 27.5443 4.35324 27.6852 4.58394L32.8459 12.7222C32.9912 12.9401 32.9271 13.2392 32.7007 13.3887ZM10.4987 8.22376L10.9259 9.24905L11.4813 8.28783L12.5878 8.19812L11.8402 7.37363L12.0922 6.29277L11.084 6.7499L10.1313 6.17316L10.2509 7.27963L9.40934 7.99733L10.4987 8.22376ZM17.0563 5.16921L16.5223 4.19091L16.0738 5.21193L14.9801 5.42129L15.8046 6.16034L15.6637 7.26255L16.6291 6.70718L17.6331 7.18566L17.4024 6.09627L18.1628 5.28885L17.0563 5.16921ZM27.053 21.5312L26.1729 20.8563L26.1687 21.967L25.2502 22.5907L26.3097 22.941L26.6215 24.0048L27.2794 23.1076L28.3901 23.1375L27.7365 22.2362L28.1124 21.1938L27.053 21.5312ZM23.4602 25.9529L23.0415 24.9233L22.4776 25.8802L21.3711 25.9614L22.1102 26.7902L21.8453 27.8667L22.8621 27.4224L23.8105 28.012L23.6994 26.9055L24.541 26.1878L23.4602 25.9528L23.4602 25.9529ZM16.8769 28.9604L17.4024 29.943L17.8638 28.9305L18.9574 28.734L18.1372 27.9821L18.2867 26.8799L17.3169 27.4267L16.3173 26.944L16.5394 28.0291L15.7704 28.8365L16.8769 28.9604ZM7.01698 12.5215L7.89276 13.2093L7.90558 12.0985L8.82833 11.4791L7.77315 11.1245L7.46982 10.0565L6.80337 10.9451L5.69264 10.9066L6.33771 11.8123L5.95324 12.8547L7.01698 12.5215ZM3.10804 17.3147C2.99269 12.6154 5.27826 7.96743 9.53751 5.27603C13.7968 2.58462 18.9745 2.50773 23.1825 4.61814L24.1992 3.97733C22.9561 3.28097 21.6146 2.77259 20.2049 2.45646C18.3209 2.03352 16.4027 1.97799 14.5059 2.28985C12.5408 2.61453 10.6824 3.32369 8.98641 4.40026C7.29041 5.47684 5.85497 6.84817 4.7186 8.48437C3.62069 10.0608 2.84744 11.8209 2.42451 13.7005C2.10837 15.1103 1.9973 16.5372 2.09556 17.9598L3.10804 17.3147ZM30.7654 16.597C30.885 21.2963 28.5995 25.9443 24.3445 28.6357C20.0852 31.3314 14.9075 31.4083 10.7038 29.2979L9.68703 29.943C10.9302 30.635 12.2716 31.1477 13.6814 31.4638C15.5654 31.8867 17.4836 31.9423 19.3804 31.6304C21.3455 31.3058 23.2039 30.5966 24.8956 29.5243C26.5916 28.4477 28.027 27.0764 29.1634 25.4402C30.257 23.8595 31.0303 22.1037 31.4532 20.224C31.7693 18.8142 31.8804 17.3873 31.7822 15.9648L30.7654 16.597ZM12.6048 10.1248C13.7968 9.37296 15.1083 8.97137 16.4283 8.89022L18.0005 7.8948C15.9243 7.65132 13.8437 8.11697 12.0495 9.24905C10.2595 10.3812 8.94795 12.0643 8.28153 14.0423L9.85362 13.0469C10.4902 11.8892 11.4129 10.8767 12.6048 10.1248ZM21.2686 23.7912C20.0767 24.5473 18.7652 24.9489 17.4494 25.0258L15.8772 26.0212C17.9535 26.2647 20.034 25.7991 21.8282 24.6627C23.6182 23.5306 24.9298 21.8474 25.5962 19.8694L24.0241 20.8648C23.3875 22.0225 22.4605 23.035 21.2686 23.7912Z" fill="#00AD45" > |
| | | </path> |
| | | <path d="M3.92828 21.1509L8.58483 18.1947L8.61473 17.6777L9.41791 17.7461L9.25984 18.1348C10.0074 19.3139 10.5115 20.0872 10.7721 20.446L10.4047 20.9288L10.1228 20.4845L6.07286 23.0563L7.70053 25.6238C7.87995 25.9528 8.15337 25.9869 8.52502 25.7221L12.3528 23.2912C12.7501 23.0691 12.874 22.7957 12.7288 22.4753C12.5835 22.1549 12.3485 21.7106 12.0196 21.1467L12.1777 21.0441C12.8142 22.0481 13.3055 22.4667 13.6473 22.3044C13.6814 22.7786 13.408 23.1716 12.8313 23.4835L8.39688 26.2988C7.96113 26.6021 7.59371 26.491 7.29042 25.9656C6.0045 23.9406 5.25263 22.7743 5.03049 22.4753L5.9319 22.2745L5.808 22.6419L5.95751 22.8769L10.0074 20.3051L8.75146 18.3271L5.08174 20.6554C4.80406 20.8305 4.5691 21.0228 4.3726 21.2278L3.92828 21.1509Z" fill="#00AD45" > |
| | | </path> |
| | | <path d="M7.95259 26.6792C7.62792 26.6792 7.34594 26.4784 7.11528 26.0768C5.84218 24.0732 5.08601 22.9027 4.86387 22.5994L4.67164 22.3345L6.26085 21.9799L6.06861 22.5567L9.72122 20.2369L8.69593 18.6221L5.20566 20.835C4.94506 21.0016 4.71862 21.181 4.53494 21.3776L4.45376 21.463L3.34729 21.2622L8.37979 18.0752L8.41825 17.4515L9.72977 17.5626L9.50763 18.118C10.2211 19.2415 10.7081 19.9849 10.9516 20.3266L11.0456 20.4548L10.3962 21.3049L10.0673 20.7837L6.37193 23.1249L7.89278 25.5257C7.98249 25.6881 8.05938 25.6881 8.08928 25.6881C8.14482 25.6881 8.24309 25.6625 8.40116 25.5514L8.40969 25.5471L12.246 23.112C12.6689 22.8728 12.575 22.6677 12.5322 22.5652C12.3913 22.2533 12.1563 21.809 11.8316 21.2537L11.7291 21.0742L12.2417 20.7496L12.3571 20.929C13.0406 22.0098 13.3824 22.1252 13.4935 22.1252C13.5148 22.1252 13.5362 22.1209 13.5533 22.1124L13.8352 21.9799L13.8566 22.2918C13.895 22.8557 13.5874 23.3171 12.9338 23.6717L8.50795 26.4784C8.32854 26.6109 8.1363 26.6792 7.95259 26.6792ZM5.39363 22.6165C5.73965 23.1334 6.44027 24.2185 7.47841 25.8547L7.48267 25.8632C7.63218 26.1238 7.79025 26.2563 7.95259 26.2563C8.05085 26.2563 8.15765 26.2135 8.28155 26.1281L8.29008 26.1238L8.43107 26.0341C8.31145 26.0897 8.20037 26.1153 8.09358 26.1153C7.92695 26.1153 7.69625 26.0512 7.52539 25.7351L5.78667 22.9924L5.58587 22.672L5.62004 22.5652L5.39363 22.6165ZM12.8655 22.2533C12.8868 22.3003 12.9082 22.3473 12.9295 22.39C13.0278 22.6037 13.1047 22.9881 12.6861 23.3342L12.7373 23.3C13.1389 23.0864 13.3653 22.8386 13.4251 22.5524C13.2499 22.5268 13.0663 22.4285 12.8655 22.2533ZM10.3108 20.3736L10.4261 20.553L10.5116 20.442C10.2339 20.0404 9.76394 19.3227 9.0847 18.2504L9.02489 18.1564L9.1146 17.9343L8.81554 17.9086L8.80702 18.0453L8.82836 18.0325L10.3108 20.3736ZM14.6854 16.1016C14.5487 15.747 14.3991 15.3796 14.2325 15.0036C14.0659 14.6277 13.8993 14.2817 13.737 13.9741L14.5743 13.816L14.4803 14.1663C14.8306 15.0464 15.0485 15.6017 15.1297 15.8239L18.3209 13.7989L18.5046 13.1026L19.4872 13.3076L15.2108 16.0204C15.386 16.4348 15.5312 16.8535 15.6466 17.2721L18.3893 15.5291L18.4063 15.0634L19.2308 15.1617L19.0728 15.5505C19.1027 16.4433 19.0343 17.2977 18.8677 18.1223C19.9058 18.2077 21.0507 17.9898 22.3025 17.4729L22.358 17.5626C22.0761 17.8232 21.9607 18.0881 22.0162 18.3615C20.803 18.6605 19.7307 18.7331 18.7994 18.5836C18.3807 19.7585 17.616 20.8777 16.501 21.9458L16.4113 21.8774C17.4665 20.6257 18.103 19.4936 18.3209 18.4726C17.4921 18.1992 16.7189 17.8061 16.0054 17.2935L15.7192 17.4772C15.8986 18.276 15.9627 19.0963 15.9157 19.9379C15.8687 20.7795 15.638 21.6254 15.2194 22.4712L15.0998 22.4242C15.2664 21.9329 15.3817 21.3776 15.4501 20.7538C15.5184 20.1301 15.5099 19.4808 15.4202 18.8058C15.3347 18.1308 15.1126 17.2977 14.7537 16.3109L13.2884 17.2422L13.203 17.6694L12.528 17.5199L12.6903 17.2123C12.5878 16.3921 12.4639 15.7982 12.3144 15.4223L13.1602 15.3411L13.0192 15.6786C13.1175 16.3066 13.1859 16.7595 13.2158 17.0457L14.6854 16.1016ZM15.4586 13.0898C16.2233 12.936 16.753 12.8676 17.035 12.8975C17.3212 12.9231 17.5049 13.0043 17.5946 13.141C17.6331 13.2008 17.663 13.3076 17.6844 13.4572C17.7057 13.6109 17.6972 13.6964 17.6544 13.7263C17.5904 13.7647 17.4494 13.7305 17.2315 13.6238C16.8513 13.4486 16.2618 13.3162 15.4543 13.2222L15.4586 13.0898ZM16.1763 17.1866C16.9154 17.6011 17.663 17.883 18.4192 18.0411C18.5473 17.3533 18.5772 16.5758 18.5046 15.7085L16.1763 17.1866Z" fill="#00AD45" > |
| | | </path> |
| | | <path d="M15.3347 22.7359L14.8434 22.5394L14.9075 22.3472C15.0656 21.873 15.1809 21.3261 15.245 20.7195C15.3091 20.1171 15.3005 19.4763 15.2193 18.8227C15.1425 18.2203 14.9502 17.4813 14.6555 16.6226L13.4892 17.3616L13.3781 17.9128L12.2161 17.6564L12.4767 17.1609C12.3784 16.3962 12.2588 15.8366 12.1221 15.4905L12.0153 15.2256L13.4977 15.0847L13.2414 15.6956C13.3055 16.0886 13.3525 16.4175 13.3867 16.6739L14.4205 16.016C14.3051 15.7169 14.1727 15.4094 14.036 15.089C13.8737 14.7173 13.7071 14.3755 13.5447 14.0765L13.408 13.8201L14.8648 13.5425L14.7024 14.1491C14.946 14.7642 15.1254 15.2128 15.2322 15.4991L17.6972 13.9355C17.5647 13.9825 17.3938 13.9483 17.129 13.8159C16.7744 13.6535 16.1976 13.5253 15.4201 13.4314L15.2193 13.4057L15.2493 12.9102L15.4116 12.876C16.2105 12.7137 16.7402 12.6496 17.0521 12.6795C17.4066 12.7137 17.6459 12.829 17.7698 13.0213C17.8253 13.1067 17.8638 13.2349 17.8894 13.4228C17.9022 13.5211 17.9321 13.7347 17.8125 13.8586L18.1329 13.6535L18.3465 12.8418L20.0383 13.1964L15.4714 16.0971C15.5825 16.3748 15.6807 16.6525 15.7662 16.9345L18.1756 15.4051L18.2055 14.8241L19.5341 14.9821L19.2906 15.5888C19.312 16.3919 19.2607 17.1737 19.1283 17.9213C19.1924 17.9256 19.2565 17.9256 19.3205 17.9256C20.2049 17.9256 21.1832 17.7077 22.2256 17.2719L22.3922 17.2036L22.6399 17.5923L22.5118 17.712C22.2854 17.9213 22.1957 18.1178 22.2341 18.3143L22.2725 18.5151L22.076 18.5621C21.26 18.7629 20.4954 18.8654 19.799 18.8654C19.5042 18.8654 19.218 18.8483 18.9446 18.8099C18.5046 19.9505 17.7356 21.0527 16.6548 22.0909L16.5224 22.219L16.1122 21.9029L16.2575 21.732C17.223 20.5914 17.8339 19.5404 18.0774 18.6048C17.3426 18.3442 16.6505 17.9897 16.0097 17.5411L15.967 17.5667C16.125 18.3357 16.1806 19.1346 16.1378 19.9377C16.0909 20.805 15.8473 21.685 15.4201 22.5522L15.3347 22.7359ZM14.8776 15.9775L14.9673 16.2296C15.3304 17.225 15.5568 18.0794 15.6466 18.7714C15.6936 19.1388 15.7192 19.5063 15.7192 19.8608C15.7576 19.0918 15.6978 18.3314 15.5398 17.5966L15.5227 17.6094L15.4458 17.3317C15.3347 16.9302 15.1937 16.5329 15.0314 16.1399L15.0228 16.1441L14.946 15.9348L14.9331 15.8964C14.852 15.6742 14.6341 15.1189 14.2838 14.2431L14.2581 14.179L14.2795 14.0893L14.0574 14.132C14.1812 14.3755 14.3051 14.6404 14.429 14.9181C14.5914 15.2855 14.7366 15.6443 14.869 15.9818L14.8776 15.9775ZM18.3166 18.2332C18.3465 18.2417 18.3721 18.2502 18.4021 18.2631L18.5857 18.3229L18.5473 18.5108C18.5131 18.6689 18.4704 18.827 18.4191 18.9936C18.4918 18.8312 18.5558 18.6732 18.6114 18.5108L18.6712 18.3442L18.8463 18.3741C19.1497 18.4254 19.4701 18.451 19.8033 18.451C20.4142 18.451 21.0849 18.3656 21.8026 18.199C21.8069 18.0879 21.8325 17.9811 21.8795 17.8743C20.7987 18.2588 19.7862 18.4169 18.8634 18.34L18.6242 18.3186L18.6712 18.0836C18.8335 17.2805 18.8976 16.4346 18.872 15.5631L18.872 15.5161L18.9403 15.3453L18.6242 15.3068L18.6199 15.388L18.6968 15.341L18.7267 15.6913C18.7994 16.5713 18.7695 17.3745 18.637 18.0794L18.5986 18.293L18.3849 18.2502C18.355 18.2417 18.338 18.2375 18.3166 18.2332ZM16.6035 17.1694C17.146 17.4428 17.6972 17.6479 18.2483 17.7803C18.3251 17.2634 18.3508 16.6952 18.3209 16.0801L16.6035 17.1694ZM12.8526 17.3616L13.0449 17.4044L13.0449 17.3958L13.0406 17.4001L13.0021 17.0584C12.9722 16.7807 12.9082 16.3235 12.8099 15.7041L12.8014 15.6443L12.827 15.5802L12.6091 15.6016C12.7245 15.9861 12.8227 16.503 12.9082 17.178L12.9167 17.242L12.8526 17.3616ZM17.5818 13.5296L17.5818 13.7432L17.5818 13.5296ZM18.6626 13.3502L18.59 13.6236L18.9318 13.41L18.6626 13.3502ZM16.3771 13.1451C16.7658 13.2221 17.0777 13.316 17.3169 13.4271L17.3255 13.4314C17.3896 13.4613 17.4366 13.4826 17.475 13.4997L17.475 13.4869C17.4494 13.3075 17.4195 13.2605 17.4152 13.2562C17.3682 13.1793 17.2272 13.1281 17.0179 13.111C16.8769 13.0939 16.659 13.1067 16.3771 13.1451Z" fill="#00AD45" > |
| | | </path> |
| | | <path d="M24.8785 11.0817C24.6308 10.6887 24.3915 10.3426 24.1736 10.0393L25.0964 9.86842L24.9725 10.2358L25.3271 10.7954L26.8266 9.84278L26.8949 9.38568L27.681 9.42411L27.5059 9.78297L29.0054 12.1454C29.1634 12.4872 29.0652 12.8503 28.7149 13.2391C28.5781 13.0212 28.1808 12.987 27.5229 13.1237L27.4461 13.0041C27.8647 12.8204 28.1552 12.6794 28.3175 12.5769C28.4756 12.4744 28.5055 12.3462 28.4073 12.1882L27.0017 9.97521L25.4382 10.9663L26.9548 13.3544C27.241 13.8073 27.5144 14.2131 27.775 14.572L27.3948 15.1017C26.9548 14.3584 26.5403 13.6834 26.1516 13.0767L24.9896 11.2483L23.52 12.1796L25.357 15.0718L24.9896 15.5545C24.6094 14.9137 23.9856 13.9012 23.1099 12.5256C22.9518 13.5936 22.6357 14.6232 22.1615 15.6101L22.0419 15.5631C22.4605 14.2473 22.6784 13.1707 22.6998 12.3334C22.7168 11.4918 22.7126 10.9065 22.6741 10.569L20.6962 11.825L20.4484 12.0642L20.0425 11.9916L22.6271 10.3512C22.5545 9.6249 22.4349 9.03963 22.2726 8.59106L23.3192 8.54834L23.0928 8.89864L23.1398 10.0265L26.1388 8.12114L26.3353 7.37354L27.399 7.57003L23.1868 10.2529C23.2167 10.8125 23.2167 11.3807 23.1911 11.9489L23.379 12.0343L24.8785 11.0817Z" fill="#00AD45" > |
| | | </path> |
| | | <path d="M24.9725 15.9478L24.8102 15.6744C24.4727 15.1019 23.9429 14.2432 23.2295 13.1154C23.0501 14.0083 22.7553 14.8798 22.358 15.7128L22.2726 15.8923L21.7813 15.6957L21.8411 15.5078C22.2512 14.2219 22.4691 13.1539 22.4862 12.3379C22.499 11.7526 22.499 11.287 22.4862 10.9495L20.8329 12.0004L20.521 12.3037L19.4701 12.1115L22.4007 10.2489C22.3281 9.60375 22.217 9.07403 22.0718 8.67247L21.9692 8.39905L23.7208 8.32642L23.3107 8.96724L23.3406 9.6593L25.9551 7.99746L26.1815 7.14307L27.9758 7.472L24.3018 9.80455L25.4168 9.59949L25.2075 10.2147L25.3954 10.5095L26.6301 9.7234L26.7112 9.17229L28.0142 9.23636L27.7494 9.77894L29.1933 12.0517L29.1976 12.0645C29.3941 12.4917 29.283 12.936 28.8729 13.3931L28.685 13.6024L28.5354 13.3632C28.497 13.3034 28.3645 13.2649 28.1808 13.2649C28.0185 13.2649 27.8134 13.2906 27.5699 13.3418L27.4247 13.3717L27.1385 12.9189L27.3649 12.8206C27.775 12.6412 28.057 12.5045 28.2065 12.4063C28.2406 12.3849 28.2492 12.3721 28.2535 12.3678C28.2535 12.3635 28.2492 12.3465 28.2278 12.3165L26.9377 10.283L25.7372 11.0477L27.1385 13.2564C27.4247 13.705 27.6981 14.1108 27.9501 14.4654L28.0399 14.5893L27.3777 15.5078L27.2111 15.2258C26.7668 14.4782 26.3481 13.7989 25.9722 13.2051L24.9255 11.5561L23.8191 12.2567L25.6176 15.0934L24.9725 15.9478ZM23.127 12.1542L23.2979 12.4191C24.0498 13.6067 24.6265 14.5337 25.0195 15.1831L25.1049 15.072L23.3021 12.2311L23.127 12.1542ZM25.058 10.9666L26.3353 12.9744C26.6642 13.4956 27.0274 14.0852 27.4119 14.726L27.5144 14.585C27.2837 14.2561 27.0359 13.8844 26.7796 13.4828L25.1477 10.911L24.7375 10.2659L24.7803 10.1463L24.5453 10.1891C24.7076 10.4283 24.8828 10.6889 25.058 10.9666ZM28.3047 12.8377C28.4543 12.8505 28.5824 12.8847 28.685 12.936C28.9413 12.5729 28.8558 12.3422 28.8131 12.2482L27.2623 9.80455L27.3478 9.62939L27.0786 9.61657L27.0658 9.69349L27.0701 9.69349L28.591 12.0858C28.7533 12.3422 28.6935 12.6028 28.4372 12.7694C28.3944 12.7865 28.3517 12.8121 28.3047 12.8377ZM22.8536 10.2104L22.8877 10.5522C22.9219 10.8982 22.9305 11.4835 22.9134 12.3422C22.9134 12.3764 22.9134 12.4105 22.9091 12.4447L22.9689 12.0388L22.9732 11.9363C22.9988 11.4194 22.9988 10.8982 22.9774 10.3856L22.939 10.4112L22.8749 8.84333L22.9134 8.78352L22.5631 8.80061C22.6784 9.19364 22.7681 9.67212 22.8279 10.2275L22.8536 10.2104ZM23.4089 10.3642C23.4303 10.8256 23.4303 11.2955 23.4132 11.7611L24.5837 11.0178C24.383 10.706 24.1864 10.4197 24.0028 10.1677L23.913 10.0481L23.4089 10.3642ZM26.4934 7.63007L26.4079 7.95474L26.8266 7.68987L26.4934 7.63007Z" fill="#00AD45" > |
| | | </path> |
| | | </svg> |
| New file |
| | |
| | | <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| | | <rect width="18" height="18" x="3" y="3" rx="2" stroke="#CCCCCC" stroke-width="2" fill="white"/> |
| | | </svg> |
| New file |
| | |
| | | <svg height="1006" width="1024" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" viewBox="0 0 60 59"><desc>Created with Sketch.</desc><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage"><g sketch:type="MSLayerGroup" transform="translate(1.000000, 1.000000)" stroke="#1890FF" stroke-width="2" stroke-linecap="round"><path fill="#ffffffff" d="M49,35 L55,35 L55,57 L49,57 L49,35 Z" stroke-linejoin="round" sketch:type="MSShapeGroup"></path><path fill="#ffffffff" d="M9,54 L49,54 L49,38 L9,38" sketch:type="MSShapeGroup"></path><path fill="#ffffffff" d="M55,54 L58,54 L58,38 L55,38 L55,54 Z" sketch:type="MSShapeGroup"></path><path fill="#ffffffff" d="M3,35 L9,35 L9,57 L3,57 L3,35 Z" stroke-linejoin="round" sketch:type="MSShapeGroup"></path><path fill="#ffffffff" d="M0,54 L3,54 L3,38 L0,38 L0,54 Z" sketch:type="MSShapeGroup"></path><path fill="#ffffffff" d="M14,32 L44,32 L44,38 L14,38 L14,32 Z" stroke-linejoin="round" sketch:type="MSShapeGroup"></path><path fill="#ffffffff" d="M17,29 L41,29 L41,32 L17,32 L17,29 Z" stroke-linejoin="round" sketch:type="MSShapeGroup"></path><path fill="#ffffffff" d="M24,21 L34,21 L34,29 L24,29 L24,21 Z" stroke-linejoin="round" sketch:type="MSShapeGroup"></path><path fill="#ffffffff" d="M27,12 L31,12 L31,21 L27,21 L27,12 Z" stroke-linejoin="round" sketch:type="MSShapeGroup"></path><path fill="#ffffffff" d="M32.586,2.414 L32.414,2.586 C31.509,3.491 30.281,4 29,4 C27.719,4 26.491,3.491 25.586,2.586 L25.414,2.414 C24.509,1.509 23.281,1 22,1 L16.746,1 C14.125,1 12,3.125 12,5.746 L12,10.254 C12,12.875 14.125,15 16.746,15 L24,15 L24,12 L34,12 L34,15 L41.254,15 C43.875,15 46,12.875 46,10.254 L46,5.746 C46,3.125 43.875,1 41.254,1 L36,1 C34.719,1 33.491,1.509 32.586,2.414 L32.586,2.414 Z" stroke-linejoin="round" sketch:type="MSShapeGroup"></path><path fill="#ffffffff" d="M29,4 C29.699,4 30.376,3.836 31,3.551 L31,0 L27,0 L27,3.551 C27.624,3.836 28.301,4 29,4 L29,4 Z" stroke-linejoin="round" sketch:type="MSShapeGroup"></path></g></g></svg> |
| New file |
| | |
| | | const app = getApp(); |
| | | |
| | | Page({ |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | // 表单数据 |
| | | planCode: '', // 计划编号 |
| | | startTime: '', // 灌溉开始时间 |
| | | pickerValue: '', // 时间选择器的值 |
| | | timePickerVisible: false, // 时间选择器是否可见 |
| | | |
| | | // 项目和轮灌组数据 |
| | | projectList: [ |
| | | { |
| | | id: '1', |
| | | 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: '2', |
| | | name: '项目二', |
| | | expanded: false, |
| | | totalDuration: 0, |
| | | groups: [ |
| | | { id: '2-1', name: '轮灌组A', selected: false, duration: 0 }, |
| | | { id: '2-2', name: '轮灌组B', selected: false, duration: 0 } |
| | | ] |
| | | }, |
| | | { |
| | | id: '4', |
| | | 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: '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: '轮灌组X', selected: false, duration: 0 }, |
| | | { id: '3-2', name: '轮灌组Y', selected: false, duration: 0 }, |
| | | { id: '3-3', name: '轮灌组Z', selected: false, duration: 0 } |
| | | ] |
| | | }, |
| | | { |
| | | id: '9', |
| | | name: '项目9', |
| | | expanded: false, |
| | | totalDuration: 0, |
| | | groups: [ |
| | | { id: '3-1', name: '轮灌组X', selected: false, duration: 0 }, |
| | | { id: '3-2', name: '轮灌组Y', selected: false, duration: 0 }, |
| | | { id: '3-3', name: '轮灌组Z', selected: false, duration: 0 } |
| | | ] |
| | | } |
| | | , |
| | | { |
| | | id: '10', |
| | | name: '项目10', |
| | | expanded: false, |
| | | totalDuration: 0, |
| | | groups: [ |
| | | { id: '3-1', name: '轮灌组X', selected: false, duration: 0 }, |
| | | { id: '3-2', name: '轮灌组Y', selected: false, duration: 0 }, |
| | | { id: '3-3', name: '轮灌组Z', selected: false, duration: 0 } |
| | | ] |
| | | } |
| | | , |
| | | { |
| | | id: '11', |
| | | name: '项目11', |
| | | expanded: false, |
| | | totalDuration: 0, |
| | | groups: [ |
| | | { id: '3-1', name: '轮灌组X', selected: false, duration: 0 }, |
| | | { id: '3-2', name: '轮灌组Y', selected: false, duration: 0 }, |
| | | { id: '3-3', name: '轮灌组Z', selected: false, duration: 0 } |
| | | ] |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad: function (options) { |
| | | // 页面加载时可以从API获取项目和轮灌组数据 |
| | | // this.fetchProjectsAndGroups(); |
| | | }, |
| | | |
| | | /** |
| | | * 获取项目和轮灌组数据 |
| | | */ |
| | | fetchProjectsAndGroups: function () { |
| | | // 这里可以添加API请求逻辑,获取真实数据 |
| | | // wx.request({ |
| | | // url: 'your-api-url', |
| | | // success: (res) => { |
| | | // this.setData({ |
| | | // projectList: res.data |
| | | // }); |
| | | // } |
| | | // }); |
| | | }, |
| | | |
| | | /** |
| | | * 处理计划编号输入 |
| | | */ |
| | | onPlanCodeInput: function (e) { |
| | | this.setData({ |
| | | planCode: e.detail.value |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * 显示时间选择器 |
| | | */ |
| | | showTimePicker: function () { |
| | | this.setData({ |
| | | timePickerVisible: true |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * 时间选择器确认回调 |
| | | */ |
| | | onTimePickerConfirm: function (e) { |
| | | this.setData({ |
| | | startTime: e.detail.formatValue, |
| | | pickerValue: e.detail.value, |
| | | timePickerVisible: false |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * 时间选择器取消回调 |
| | | */ |
| | | onTimePickerCancel: function () { |
| | | this.setData({ |
| | | timePickerVisible: false |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * 切换项目展开/折叠状态 |
| | | */ |
| | | toggleProject: function (e) { |
| | | const index = e.currentTarget.dataset.index; |
| | | const currentValue = this.data.projectList[index].expanded; |
| | | |
| | | // 创建新的项目列表,先将所有项目设为折叠状态 |
| | | const newProjectList = this.data.projectList.map((item, idx) => { |
| | | return { |
| | | ...item, |
| | | expanded: false |
| | | }; |
| | | }); |
| | | |
| | | // 如果当前点击的项目已经是展开状态,则保持所有项目折叠 |
| | | // 否则,将当前点击的项目设为展开状态 |
| | | if (!currentValue) { |
| | | newProjectList[index].expanded = true; |
| | | } |
| | | |
| | | this.setData({ |
| | | projectList: newProjectList |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * 切换轮灌组选中状态 |
| | | */ |
| | | toggleGroupSelection: function (e) { |
| | | const projectIndex = e.currentTarget.dataset.projectIndex; |
| | | const groupIndex = e.currentTarget.dataset.groupIndex; |
| | | const key = `projectList[${projectIndex}].groups[${groupIndex}].selected`; |
| | | const currentValue = this.data.projectList[projectIndex].groups[groupIndex].selected; |
| | | |
| | | this.setData({ |
| | | [key]: !currentValue |
| | | }); |
| | | |
| | | // 更新项目总时长 |
| | | this.updateProjectTotalDuration(projectIndex); |
| | | }, |
| | | |
| | | /** |
| | | * 处理时长输入 |
| | | */ |
| | | onDurationInput: function (e) { |
| | | const projectIndex = e.currentTarget.dataset.projectIndex; |
| | | const groupIndex = e.currentTarget.dataset.groupIndex; |
| | | const value = parseInt(e.detail.value) || 0; |
| | | |
| | | // 更新轮灌组时长 |
| | | const durationKey = `projectList[${projectIndex}].groups[${groupIndex}].duration`; |
| | | this.setData({ |
| | | [durationKey]: value |
| | | }); |
| | | |
| | | // 自动选中该轮灌组 |
| | | const selectedKey = `projectList[${projectIndex}].groups[${groupIndex}].selected`; |
| | | if (value > 0 && !this.data.projectList[projectIndex].groups[groupIndex].selected) { |
| | | this.setData({ |
| | | [selectedKey]: true |
| | | }); |
| | | } |
| | | |
| | | // 计算并更新项目总时长 |
| | | this.updateProjectTotalDuration(projectIndex); |
| | | }, |
| | | |
| | | /** |
| | | * 计算并更新项目总时长 |
| | | */ |
| | | updateProjectTotalDuration: function (projectIndex) { |
| | | const project = this.data.projectList[projectIndex]; |
| | | let totalDuration = 0; |
| | | |
| | | // 计算所有选中的轮灌组的时长总和 |
| | | project.groups.forEach(group => { |
| | | if (group.selected) { |
| | | totalDuration += parseInt(group.duration) || 0; |
| | | } |
| | | }); |
| | | |
| | | // 更新项目总时长 |
| | | const totalDurationKey = `projectList[${projectIndex}].totalDuration`; |
| | | this.setData({ |
| | | [totalDurationKey]: totalDuration |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * 阻止事件冒泡 |
| | | */ |
| | | stopPropagation: function (e) { |
| | | // 阻止事件冒泡,防止点击输入框时触发父元素的点击事件 |
| | | }, |
| | | |
| | | /** |
| | | * 跳转到轮灌组详情页 |
| | | */ |
| | | 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}` |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * 确认按钮点击事件 |
| | | */ |
| | | onConfirm: function () { |
| | | // 验证表单 |
| | | if (!this.validateForm()) { |
| | | return; |
| | | } |
| | | |
| | | // 收集选中的轮灌组 |
| | | 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) { |
| | | wx.showToast({ |
| | | title: '请输入计划编号', |
| | | icon: 'none' |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | if (!this.data.startTime) { |
| | | wx.showToast({ |
| | | title: '请选择灌溉开始时间', |
| | | icon: 'none' |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | const selectedGroups = this.getSelectedGroups(); |
| | | if (selectedGroups.length === 0) { |
| | | wx.showToast({ |
| | | title: '请至少选择一个轮灌组', |
| | | icon: 'none' |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | // 检查选中的轮灌组是否都设置了时长 |
| | | const invalidGroups = selectedGroups.filter(group => !group.duration); |
| | | if (invalidGroups.length > 0) { |
| | | wx.showToast({ |
| | | title: '请为所有选中的轮灌组设置时长', |
| | | icon: 'none' |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | }, |
| | | |
| | | /** |
| | | * 获取选中的轮灌组 |
| | | */ |
| | | 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 |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | return selectedGroups; |
| | | }, |
| | | |
| | | /** |
| | | * 提交表单数据 |
| | | */ |
| | | submitForm: function (formData) { |
| | | // 这里可以添加API请求逻辑,提交表单数据 |
| | | console.log('提交的表单数据:', formData); |
| | | |
| | | // 模拟API请求 |
| | | wx.showLoading({ |
| | | title: '提交中...', |
| | | }); |
| | | |
| | | setTimeout(() => { |
| | | wx.hideLoading(); |
| | | |
| | | wx.showToast({ |
| | | title: '创建成功', |
| | | icon: 'success', |
| | | duration: 2000, |
| | | success: () => { |
| | | // 延迟返回上一页 |
| | | setTimeout(() => { |
| | | wx.navigateBack(); |
| | | }, 2000); |
| | | } |
| | | }); |
| | | }, 1500); |
| | | |
| | | // 实际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' |
| | | // }); |
| | | // } |
| | | // }); |
| | | } |
| | | }); |
| New file |
| | |
| | | { |
| | | "navigationBarTitleText": "新建灌溉计划", |
| | | "usingComponents": { |
| | | "t-date-time-picker": "tdesign-miniprogram/date-time-picker/date-time-picker" |
| | | } |
| | | } |
| New file |
| | |
| | | <view class="create-irrigation-container"> |
| | | <!-- 计划编号 --> |
| | | <view class="form-item"> |
| | | <view class="form-label">计划编号</view> |
| | | <view class="form-input"> |
| | | <input type="text" placeholder="请输入计划编号" value="{{planCode}}" bindinput="onPlanCodeInput" /> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 灌溉开始时间 --> |
| | | <view class="form-item" bindtap="showTimePicker"> |
| | | <view class="form-label">灌溉开始时间</view> |
| | | <view class="form-input time-input"> |
| | | <view class="time-text {{startTime ? '' : 'placeholder'}}">{{startTime || '请选择灌溉开始时间'}}</view> |
| | | <image class="arrow-icon" src="/images/arrow-right.svg" mode="aspectFit"></image> |
| | | </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> |
| | | |
| | | <!-- 轮灌组列表 --> |
| | | <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' : ''}}"> |
| | | <view class="group-info" bindtap="navigateToGroupDetail" data-project-index="{{index}}" data-group-index="{{groupIndex}}"> |
| | | <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> |
| | | </view> |
| | | </block> |
| | | </scroll-view> |
| | | </view> |
| | | |
| | | <!-- 底部确认按钮 --> |
| | | <view class="bottom-button"> |
| | | <button class="confirm-button" hover-class="confirm-button-hover" bindtap="onConfirm">确认</button> |
| | | </view> |
| | | |
| | | <!-- 时间选择器弹窗 --> |
| | | <t-date-time-picker |
| | | title="选择灌溉开始时间" |
| | | visible="{{timePickerVisible}}" |
| | | mode="{{['date', 'minute']}}" |
| | | value="{{pickerValue}}" |
| | | format="YYYY-MM-DD HH:mm" |
| | | bindconfirm="onTimePickerConfirm" |
| | | bindcancel="onTimePickerCancel" |
| | | /> |
| | | </view> |
| New file |
| | |
| | | .create-irrigation-container { |
| | | display: flex; |
| | | flex-direction: column; |
| | | height: 100vh; |
| | | background-color: #f5f5f5; |
| | | position: relative; |
| | | padding-bottom: 130rpx; /* 为底部按钮留出空间 */ |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | /* 表单项样式 */ |
| | | .form-item { |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | background-color: #fff; |
| | | padding: 30rpx; |
| | | margin-bottom: 2rpx; |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .form-label { |
| | | font-size: 28rpx; |
| | | color: #333; |
| | | font-weight: 500; |
| | | width: 200rpx; /* 固定标签宽度 */ |
| | | flex-shrink: 0; /* 防止标签宽度被压缩 */ |
| | | } |
| | | |
| | | .form-input { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | height: 80rpx; |
| | | flex: 1; /* 输入框占据剩余空间 */ |
| | | } |
| | | |
| | | .form-input input { |
| | | flex: 1; |
| | | height: 100%; |
| | | font-size: 28rpx; |
| | | text-align: right; /* 文本右对齐 */ |
| | | } |
| | | |
| | | .time-input { |
| | | color: #333; |
| | | font-size: 28rpx; |
| | | text-align: right; /* 文本右对齐 */ |
| | | display: flex; |
| | | justify-content: flex-end; /* 内容靠右对齐 */ |
| | | align-items: center; |
| | | } |
| | | |
| | | .time-text { |
| | | flex: 1; |
| | | text-align: right; |
| | | padding-right: 20rpx; |
| | | } |
| | | |
| | | .placeholder { |
| | | color: #999; |
| | | } |
| | | |
| | | .arrow-icon { |
| | | width: 32rpx; |
| | | height: 32rpx; |
| | | } |
| | | |
| | | /* 列表容器样式 */ |
| | | .list-container { |
| | | background-color: #fff; |
| | | margin-top: 20rpx; |
| | | flex: 1; |
| | | box-sizing: border-box; |
| | | width: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | padding: 0; |
| | | height: calc(100vh - 300rpx); /* 设置固定高度,减去顶部表单和底部按钮的高度 */ |
| | | } |
| | | |
| | | .list-title { |
| | | font-size: 28rpx; |
| | | color: #333; |
| | | margin-bottom: 30rpx; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | /* 项目列表样式 */ |
| | | .project-list { |
| | | display: flex; |
| | | flex-direction: column; |
| | | width: 100%; |
| | | height: 100%; /* 占满容器高度 */ |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .project-item { |
| | | margin-bottom: 30rpx; /* 增加项目之间的间距 */ |
| | | border-radius: 8rpx; |
| | | overflow: visible; /* 允许内容溢出,以便轮灌组列表可以完全展开 */ |
| | | border: 1rpx solid #eee; |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .project-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 30rpx; |
| | | background-color: #f9f9f9; |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .project-title { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .project-name { |
| | | font-size: 28rpx; |
| | | color: #333; |
| | | font-weight: 500; |
| | | margin-left: 10rpx; |
| | | } |
| | | |
| | | .project-duration { |
| | | font-size: 26rpx; |
| | | color: #666; |
| | | } |
| | | |
| | | .toggle-icon { |
| | | width: 32rpx; |
| | | height: 32rpx; |
| | | transition: transform 0.3s; |
| | | } |
| | | |
| | | .toggle-icon.expanded { |
| | | transform: rotate(180deg); |
| | | } |
| | | |
| | | /* 轮灌组列表样式 */ |
| | | .group-list { |
| | | display: none; |
| | | flex-direction: column; |
| | | background-color: #fff; |
| | | max-height: none; /* 移除最大高度限制 */ |
| | | height: auto; /* 自适应高度 */ |
| | | } |
| | | |
| | | .group-list.expanded { |
| | | display: flex; |
| | | } |
| | | |
| | | .group-item { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 25rpx 30rpx; |
| | | border-top: 1rpx solid #eee; |
| | | } |
| | | |
| | | .group-item.selected { |
| | | background-color: #f0f9ff; |
| | | } |
| | | |
| | | .group-info { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .group-name { |
| | | font-size: 26rpx; |
| | | color: #666; |
| | | } |
| | | |
| | | .group-duration { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .duration-input { |
| | | width: 100rpx; |
| | | height: 60rpx; |
| | | border: 1rpx solid #ddd; |
| | | border-radius: 6rpx; |
| | | text-align: center; |
| | | font-size: 26rpx; |
| | | margin-right: 10rpx; |
| | | } |
| | | |
| | | .duration-unit { |
| | | font-size: 24rpx; |
| | | color: #999; |
| | | margin-right: 20rpx; |
| | | } |
| | | |
| | | .group-check { |
| | | margin-left: 10rpx; |
| | | } |
| | | |
| | | .check-icon { |
| | | width: 36rpx; |
| | | height: 36rpx; |
| | | } |
| | | |
| | | /* 底部按钮样式 */ |
| | | .bottom-button { |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | right: 0; |
| | | padding: 20rpx 30rpx; |
| | | background-color: #fff; |
| | | box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05); |
| | | z-index: 100; /* 提高z-index确保按钮在最上层 */ |
| | | } |
| | | |
| | | .confirm-button { |
| | | width: 100%; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |
| | | background-color: #1890FF; |
| | | color: #fff; |
| | | font-size: 30rpx; |
| | | border-radius: 44rpx; |
| | | } |
| | | |
| | | .confirm-button-hover { |
| | | opacity: 0.8; |
| | | } |
| New file |
| | |
| | | const app = getApp(); |
| | | |
| | | Page({ |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | projectId: '', |
| | | projectName: '', |
| | | groupId: '', |
| | | groupName: '', |
| | | valveList: [ |
| | | // 模拟数据,实际应从API获取 |
| | | { id: '1', name: '阀控器1', status: 'online', location: '位置A' }, |
| | | { id: '2', name: '阀控器2', status: 'offline', location: '位置B' }, |
| | | { id: '3', name: '阀控器3', status: 'online', location: '位置C' }, |
| | | { id: '4', name: '阀控器4', status: 'online', location: '位置D' }, |
| | | { id: '5', name: '阀控器5', status: 'offline', location: '位置E' } |
| | | ], |
| | | loading: false |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad: function (options) { |
| | | if (options) { |
| | | this.setData({ |
| | | projectId: options.projectId || '', |
| | | projectName: options.projectName || '', |
| | | groupId: options.groupId || '', |
| | | groupName: options.groupName || '' |
| | | }); |
| | | |
| | | wx.setNavigationBarTitle({ |
| | | title: this.data.groupName || '轮灌组详情' |
| | | }); |
| | | |
| | | // 获取阀控器列表 |
| | | this.fetchValveList(); |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 获取阀控器列表 |
| | | */ |
| | | fetchValveList: function () { |
| | | this.setData({ loading: true }); |
| | | |
| | | // 这里应该是实际的API请求 |
| | | // 模拟API请求延迟 |
| | | setTimeout(() => { |
| | | this.setData({ loading: false }); |
| | | // 实际数据已在data中初始化,这里只是模拟请求完成 |
| | | }, 1000); |
| | | |
| | | // 实际API请求示例 |
| | | // wx.request({ |
| | | // url: 'your-api-url', |
| | | // data: { |
| | | // projectId: this.data.projectId, |
| | | // groupId: this.data.groupId |
| | | // }, |
| | | // success: (res) => { |
| | | // this.setData({ |
| | | // valveList: res.data, |
| | | // loading: false |
| | | // }); |
| | | // }, |
| | | // fail: () => { |
| | | // this.setData({ loading: false }); |
| | | // wx.showToast({ |
| | | // title: '获取数据失败', |
| | | // icon: 'none' |
| | | // }); |
| | | // } |
| | | // }); |
| | | }, |
| | | |
| | | /** |
| | | * 返回上一页 |
| | | */ |
| | | goBack: function () { |
| | | wx.navigateBack(); |
| | | } |
| | | }); |
| New file |
| | |
| | | { |
| | | "navigationBarTitleText": "轮灌组详情", |
| | | "usingComponents": {} |
| | | } |
| New file |
| | |
| | | <view class="group-detail-container"> |
| | | <!-- 页面标题 --> |
| | | <view class="page-header"> |
| | | <view class="header-content"> |
| | | <view class="project-info"> |
| | | <view class="project-name">{{projectName}}</view> |
| | | <view class="group-name">{{groupName}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 阀控器列表 --> |
| | | <view class="valve-list-container"> |
| | | <view class="section-title">取水口阀控器列表</view> |
| | | |
| | | <!-- 加载中 --> |
| | | <view class="loading-container" wx:if="{{loading}}"> |
| | | <view class="loading-icon"></view> |
| | | <view class="loading-text">加载中...</view> |
| | | </view> |
| | | |
| | | <!-- 阀控器列表 --> |
| | | <view class="valve-list" wx:else> |
| | | <block wx:for="{{valveList}}" wx:key="id"> |
| | | <view class="valve-item"> |
| | | <view class="valve-info"> |
| | | <view class="valve-name">{{item.name}}</view> |
| | | <view class="valve-location">{{item.location}}</view> |
| | | </view> |
| | | <view class="valve-status {{item.status === 'online' ? 'online' : 'offline'}}"> |
| | | {{item.status === 'online' ? '在线' : '离线'}} |
| | | </view> |
| | | </view> |
| | | </block> |
| | | </view> |
| | | |
| | | <!-- 空状态 --> |
| | | <view class="empty-state" wx:if="{{!loading && valveList.length === 0}}"> |
| | | <image class="empty-icon" src="/images/empty.svg" mode="aspectFit"></image> |
| | | <view class="empty-text">暂无阀控器数据</view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 底部按钮 --> |
| | | <view class="bottom-button"> |
| | | <button class="back-button" hover-class="back-button-hover" bindtap="goBack">返回</button> |
| | | </view> |
| | | </view> |
| New file |
| | |
| | | .group-detail-container { |
| | | display: flex; |
| | | flex-direction: column; |
| | | min-height: 100vh; |
| | | background-color: #f5f5f5; |
| | | } |
| | | |
| | | /* 页面标题样式 */ |
| | | .page-header { |
| | | background-color: #1890FF; |
| | | padding: 30rpx; |
| | | color: #fff; |
| | | } |
| | | |
| | | .header-content { |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .project-info { |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .project-name { |
| | | font-size: 24rpx; |
| | | opacity: 0.8; |
| | | margin-bottom: 10rpx; |
| | | } |
| | | |
| | | .group-name { |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | /* 阀控器列表容器 */ |
| | | .valve-list-container { |
| | | flex: 1; |
| | | padding: 30rpx; |
| | | } |
| | | |
| | | .section-title { |
| | | font-size: 28rpx; |
| | | color: #333; |
| | | font-weight: 500; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | |
| | | /* 加载中样式 */ |
| | | .loading-container { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding: 60rpx 0; |
| | | } |
| | | |
| | | .loading-icon { |
| | | width: 60rpx; |
| | | height: 60rpx; |
| | | border: 4rpx solid #f3f3f3; |
| | | border-top: 4rpx solid #1890FF; |
| | | border-radius: 50%; |
| | | animation: spin 1s linear infinite; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | |
| | | @keyframes spin { |
| | | 0% { transform: rotate(0deg); } |
| | | 100% { transform: rotate(360deg); } |
| | | } |
| | | |
| | | .loading-text { |
| | | font-size: 26rpx; |
| | | color: #999; |
| | | } |
| | | |
| | | /* 阀控器列表样式 */ |
| | | .valve-list { |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .valve-item { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 30rpx; |
| | | background-color: #fff; |
| | | margin-bottom: 20rpx; |
| | | border-radius: 8rpx; |
| | | box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05); |
| | | } |
| | | |
| | | .valve-info { |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .valve-name { |
| | | font-size: 28rpx; |
| | | color: #333; |
| | | margin-bottom: 10rpx; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .valve-location { |
| | | font-size: 24rpx; |
| | | color: #999; |
| | | } |
| | | |
| | | .valve-status { |
| | | padding: 8rpx 20rpx; |
| | | border-radius: 30rpx; |
| | | font-size: 24rpx; |
| | | } |
| | | |
| | | .valve-status.online { |
| | | background-color: #e6f7ff; |
| | | color: #1890FF; |
| | | } |
| | | |
| | | .valve-status.offline { |
| | | background-color: #fff1f0; |
| | | color: #f5222d; |
| | | } |
| | | |
| | | /* 空状态样式 */ |
| | | .empty-state { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding: 100rpx 0; |
| | | } |
| | | |
| | | .empty-icon { |
| | | width: 120rpx; |
| | | height: 120rpx; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | |
| | | .empty-text { |
| | | font-size: 26rpx; |
| | | color: #999; |
| | | } |
| | | |
| | | /* 底部按钮样式 */ |
| | | .bottom-button { |
| | | padding: 20rpx 30rpx 40rpx; |
| | | } |
| | | |
| | | .back-button { |
| | | width: 100%; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |
| | | background-color: #fff; |
| | | color: #1890FF; |
| | | font-size: 30rpx; |
| | | border-radius: 44rpx; |
| | | border: 1rpx solid #1890FF; |
| | | } |
| | | |
| | | .back-button-hover { |
| | | opacity: 0.8; |
| | | } |
| | |
| | | console.error('保存项目选择失败:', err); |
| | | wx.showToast({ |
| | | title: '保存失败,请重试', |
| | | icon: 'error', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }); |
| | | }); |
| | |
| | | that.codeLogin(code); |
| | | } else { |
| | | console.log('登录失败!' + res.errMsg); |
| | | |
| | | } |
| | | } |
| | | }); |
| | |
| | | this.initData(); |
| | | } |
| | | } else { |
| | | |
| | | wx.showToast({ |
| | | title: 'title', |
| | | icon: 'error', |
| | | duration: 2000 |
| | | }) |
| | | } |
| | | }).catch(error => { |
| | | // 加载完成后隐藏加载动画 |
| | |
| | | </view> |
| | | <view class="center-view" bind:tap="feedBack"> |
| | | <image src="/images/question.svg" /> |
| | | <text>问题反馈</text> |
| | | <text>轮灌</text> |
| | | </view> |
| | | </view> |
| | | |
| New file |
| | |
| | | // pages/irrigation/irrigation.js |
| | | Page({ |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | currentTab: 0, // 当前选中的标签页索引 |
| | | activeList: [], // 进行中的轮灌列表 |
| | | completedList: [], // 已完成的轮灌列表 |
| | | currentList: [], // 当前显示的列表 |
| | | isRefreshing: false, // 是否正在刷新 |
| | | isWXRefreshing: false // 微信原生下拉刷新状态 |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad: function (options) { |
| | | this.loadIrrigationData(); |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow: function () { |
| | | this.loadIrrigationData(); |
| | | }, |
| | | |
| | | /** |
| | | * 加载轮灌数据 |
| | | */ |
| | | loadIrrigationData: function () { |
| | | // 这里应该调用API获取数据 |
| | | // 模拟数据 |
| | | const mockData = { |
| | | activeList: [ |
| | | { |
| | | id: '1', |
| | | title: 'LG-2023-001', |
| | | status: '未发布', |
| | | irrigationTime: '2023-05-20 08:00 - 17:00' |
| | | }, |
| | | { |
| | | id: '2', |
| | | title: 'LG-2023-002', |
| | | status: '已发布', |
| | | irrigationTime: '2023-05-22 09:00 - 18:00' |
| | | }, |
| | | { |
| | | id: '2', |
| | | title: 'LG-2023-002', |
| | | status: '已发布', |
| | | irrigationTime: '2023-05-22 09:00 - 18:00' |
| | | }, { |
| | | id: '2', |
| | | title: 'LG-2023-002', |
| | | status: '已发布', |
| | | irrigationTime: '2023-05-22 09:00 - 18:00' |
| | | }, { |
| | | id: '2', |
| | | title: 'LG-2023-002', |
| | | status: '已发布', |
| | | irrigationTime: '2023-05-22 09:00 - 18:00' |
| | | }, |
| | | { |
| | | id: '3', |
| | | title: 'LG-2023-003', |
| | | status: '执行中', |
| | | irrigationTime: '2023-05-18 07:30 - 16:30', |
| | | irrigatedTime: '3小时25分钟', |
| | | irrigatedGroups: '1组、2组、3组' |
| | | }, { |
| | | id: '2', |
| | | title: 'LG-2023-002', |
| | | status: '已发布', |
| | | irrigationTime: '2023-05-22 09:00 - 18:00' |
| | | }, |
| | | { |
| | | id: '3', |
| | | title: 'LG-2023-003', |
| | | status: '执行中', |
| | | irrigationTime: '2023-05-18 07:30 - 16:30', |
| | | irrigatedTime: '3小时25分钟', |
| | | irrigatedGroups: '1组、2组、3组' |
| | | }, { |
| | | id: '2', |
| | | title: 'LG-2023-002', |
| | | status: '已发布', |
| | | irrigationTime: '2023-05-22 09:00 - 18:00' |
| | | }, |
| | | { |
| | | id: '3', |
| | | title: 'LG-2023-003', |
| | | status: '执行中', |
| | | irrigationTime: '2023-05-18 07:30 - 16:30', |
| | | irrigatedTime: '3小时25分钟', |
| | | irrigatedGroups: '1组、2组、3组' |
| | | } |
| | | |
| | | ] |
| | | // completedList: [ |
| | | // { |
| | | // id: '4', |
| | | // title: 'LG-2023-004', |
| | | // status: '已完成', |
| | | // irrigationTime: '2023-05-10 10:00 - 19:00' |
| | | // } |
| | | // ] |
| | | }; |
| | | |
| | | // 模拟网络请求延迟 |
| | | setTimeout(() => { |
| | | this.setData({ |
| | | activeList: mockData.activeList || [], |
| | | completedList: mockData.completedList || [], |
| | | currentList: this.data.currentTab === 0 ? mockData.activeList || [] : mockData.completedList || [], |
| | | isRefreshing: false, // 结束刷新状态 |
| | | isWXRefreshing: false // 结束微信原生下拉刷新状态 |
| | | }); |
| | | }, 1000); |
| | | }, |
| | | |
| | | /** |
| | | * 切换标签页 |
| | | */ |
| | | switchTab: function (e) { |
| | | const index = parseInt(e.currentTarget.dataset.index); |
| | | if (this.data.currentTab === index) { |
| | | return; |
| | | } |
| | | |
| | | const activeList = this.data.activeList || []; |
| | | const completedList = this.data.completedList || []; |
| | | |
| | | this.setData({ |
| | | currentTab: index, |
| | | currentList: index === 0 ? activeList : completedList |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * 点击发布按钮 |
| | | */ |
| | | onPublish: function (e) { |
| | | const id = e.currentTarget.dataset.id; |
| | | wx.showModal({ |
| | | title: '确认发布', |
| | | content: '确定要发布该轮灌计划吗?', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | // 这里应该调用API发布轮灌计划 |
| | | wx.showToast({ |
| | | title: '发布成功', |
| | | icon: 'success' |
| | | }); |
| | | // 刷新数据 |
| | | this.loadIrrigationData(); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * 点击终止按钮 |
| | | */ |
| | | onStop: function (e) { |
| | | const id = e.currentTarget.dataset.id; |
| | | wx.showModal({ |
| | | title: '确认终止', |
| | | content: '确定要终止该轮灌计划吗?', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | // 这里应该调用API终止轮灌计划 |
| | | wx.showToast({ |
| | | title: '已终止', |
| | | icon: 'success' |
| | | }); |
| | | // 刷新数据 |
| | | this.loadIrrigationData(); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * 点击立即执行按钮 |
| | | */ |
| | | onExecute: function (e) { |
| | | const id = e.currentTarget.dataset.id; |
| | | wx.showModal({ |
| | | title: '确认执行', |
| | | content: '确定要立即执行该轮灌计划吗?', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | // 这里应该调用API立即执行轮灌计划 |
| | | wx.showToast({ |
| | | title: '执行成功', |
| | | icon: 'success' |
| | | }); |
| | | // 刷新数据 |
| | | this.loadIrrigationData(); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * 点击新建轮灌按钮 |
| | | */ |
| | | onAddIrrigation: function () { |
| | | wx.navigateTo({ |
| | | url: '/pages/createIrrigation/createIrrigation' |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * 开始下拉刷新 |
| | | */ |
| | | startPullDownRefresh: function() { |
| | | if (!this.data.isWXRefreshing) { |
| | | this.setData({ |
| | | isRefreshing: true |
| | | }); |
| | | this.loadIrrigationData(); |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh: function () { |
| | | this.setData({ |
| | | isWXRefreshing: true |
| | | }); |
| | | this.loadIrrigationData(); |
| | | } |
| | | }) |
| New file |
| | |
| | | { |
| | | "usingComponents": {}, |
| | | "navigationBarTitleText": "轮灌计划" |
| | | } |
| New file |
| | |
| | | <view class="irrigation-container"> |
| | | <!-- 顶部两个标签页 --> |
| | | <view class="tabs"> |
| | | <view class="tab {{currentTab === 0 ? 'active' : ''}}" hover-class="tab-hover" bindtap="switchTab" data-index="0"> |
| | | <text>当前灌溉计划</text> |
| | | </view> |
| | | <view class="tab {{currentTab === 1 ? 'active' : ''}}" hover-class="tab-hover" bindtap="switchTab" data-index="1"> |
| | | <text>历史计划</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 中间列表 - 使用scroll-view实现下拉刷新 --> |
| | | <scroll-view class="scroll-view" scroll-x="false" scroll-y="true" refresher-enabled="{{isRefreshing==false?true:false}}" refresher-threshold="50" bindrefresherrefresh="onPullDownRefresh" refresher-triggered="{{isWXRefreshing}}"> |
| | | <view wx:if="{{isRefreshing}}" class="refresh-view"> |
| | | <view class="dot"></view> |
| | | <view class="dot"></view> |
| | | <view class="dot"></view> |
| | | </view> |
| | | <view class="scroll-bg"> |
| | | <block wx:if="{{currentList.length > 0}}"> |
| | | <!-- 统一显示所有列表项,不再按状态分组 --> |
| | | <view class="list-item" wx:for="{{currentList}}" wx:key="id"> |
| | | <view class="item-header"> |
| | | <view class="info-row title-row"> |
| | | <view class="info-label">编号:</view> |
| | | <view class="info-value">{{item.title}}</view> |
| | | </view> |
| | | <!-- 根据状态显示不同的图标 --> |
| | | <view class="item-status"> |
| | | <block wx:if="{{item.status === '已发布'}}"> |
| | | <image class="status-icon" src="/images/published-icon.svg" mode="aspectFit"></image> |
| | | </block> |
| | | <block wx:elif="{{item.status === '执行中'}}"> |
| | | <image class="status-icon" src="/images/progress.svg" mode="aspectFit"></image> |
| | | </block> |
| | | <block wx:elif="{{item.status === '未发布'}}"> |
| | | <text>{{item.status}}</text> |
| | | </block> |
| | | </view> |
| | | </view> |
| | | <view class="item-info"> |
| | | <view class="info-row"> |
| | | <view class="info-label">灌溉时间:</view> |
| | | <view class="info-value">{{item.irrigationTime}}</view> |
| | | </view> |
| | | <!-- 仅在执行中状态显示额外信息 --> |
| | | <block wx:if="{{item.status === '执行中'}}"> |
| | | <view class="info-row irrigated-row"> |
| | | <view class="info-label">已灌溉时间:</view> |
| | | <view class="info-value-time">{{item.irrigatedTime}}</view> |
| | | </view> |
| | | <view class="info-row irrigated-row"> |
| | | <view class="info-label">已灌溉轮组:</view> |
| | | <view class="info-value-time">{{item.irrigatedGroups}}</view> |
| | | </view> |
| | | </block> |
| | | </view> |
| | | <view class="item-actions"> |
| | | <!-- 根据状态显示不同的按钮 --> |
| | | <block wx:if="{{item.status === '未发布'}}"> |
| | | <button class="action-button publish-button" hover-class="publish-button-hover" bindtap="onPublish" data-id="{{item.id}}">发布</button> |
| | | </block> |
| | | <block wx:if="{{item.status === '执行中' || item.status === '已发布'}}"> |
| | | <button class="action-button stop-button" hover-class="stop-button-hover" bindtap="onStop" data-id="{{item.id}}">终止</button> |
| | | </block> |
| | | <block wx:if="{{item.status === '已发布'}}"> |
| | | <button class="action-button execute-button" hover-class="execute-button-hover" bindtap="onExecute" data-id="{{item.id}}">立即执行</button> |
| | | </block> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | |
| | | <block wx:else> |
| | | <view class="empty-list"> |
| | | <image class="empty-icon" src="/images/no_more.svg" mode="aspectFit"></image> |
| | | <view class="empty-text">暂无轮灌记录</view> |
| | | </view> |
| | | </block> |
| | | </view> |
| | | </scroll-view> |
| | | |
| | | <!-- 底部新建按钮 --> |
| | | <view class="bottom-button"> |
| | | <button class="add-button" hover-class="add-button-hover" bindtap="onAddIrrigation">创建灌溉计划</button> |
| | | </view> |
| | | </view> |
| New file |
| | |
| | | .irrigation-container { |
| | | display: flex; |
| | | flex-direction: column; |
| | | height: 100vh; |
| | | background-color: #f5f5f5; |
| | | padding: 20rpx; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | /* 顶部标签页样式 */ |
| | | .tabs { |
| | | display: flex; |
| | | background-color: #fff; |
| | | border-radius: 12rpx; |
| | | margin-bottom: 20rpx; |
| | | overflow: hidden; |
| | | box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05); |
| | | position: relative; |
| | | } |
| | | |
| | | .tab { |
| | | flex: 1; |
| | | text-align: center; |
| | | padding: 30rpx 0; |
| | | font-size: 28rpx; |
| | | color: #666; |
| | | position: relative; |
| | | transition: all 0.2s ease; |
| | | } |
| | | |
| | | .tab-hover { |
| | | opacity: 0.8; |
| | | background-color: rgba(0, 0, 0, 0.03); |
| | | } |
| | | |
| | | .tab:active { |
| | | opacity: 0.8; |
| | | background-color: rgba(0, 0, 0, 0.03); |
| | | } |
| | | |
| | | .tab.active { |
| | | color: rgba(45, 139, 247, 1); |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .tab.active::after { |
| | | content: ''; |
| | | position: absolute; |
| | | bottom: 0; |
| | | left: 50%; |
| | | transform: translateX(-50%); |
| | | width: 50vw; |
| | | height: 6rpx; |
| | | background-color: rgba(45, 139, 247, 1); |
| | | border-radius: 3rpx; |
| | | } |
| | | |
| | | /* 刷新按钮和分隔线 */ |
| | | .refresh-header { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | padding: 10rpx 20rpx; |
| | | } |
| | | |
| | | .refresh-button { |
| | | font-size: 28rpx; |
| | | color: #fff; |
| | | background-color: rgba(45, 139, 247, 1); |
| | | border: none; |
| | | border-radius: 5px; |
| | | padding: 10rpx 20rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .refresh-button:active { |
| | | background-color: #1a6fc7; |
| | | } |
| | | |
| | | .divider { |
| | | height: 1rpx; |
| | | background-color: #e0e0e0; |
| | | margin: 10rpx 0; |
| | | } |
| | | |
| | | /* 下拉刷新动画 */ |
| | | .refresh-view { |
| | | text-align: center; |
| | | padding: 30rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | |
| | | .dot { |
| | | width: 20rpx; |
| | | height: 20rpx; |
| | | background-color: rgba(45, 139, 247, 1); |
| | | border-radius: 50%; |
| | | margin: 0 5px; |
| | | animation: blink 1.4s infinite both; |
| | | } |
| | | |
| | | .dot:nth-child(2) { |
| | | animation-delay: 0.2s; |
| | | } |
| | | |
| | | .dot:nth-child(3) { |
| | | animation-delay: 0.4s; |
| | | } |
| | | |
| | | @keyframes blink { |
| | | 0%, 80%, 100% { |
| | | opacity: 0; |
| | | } |
| | | 40% { |
| | | opacity: 1; |
| | | } |
| | | } |
| | | |
| | | /* scroll-view样式 */ |
| | | .scroll-view { |
| | | flex: 1; |
| | | overflow-y: auto; |
| | | margin-bottom: 20rpx; |
| | | height: calc(100vh - 180rpx); /* 减去顶部标签页和底部按钮的高度 */ |
| | | } |
| | | |
| | | .scroll-bg { |
| | | padding: 10rpx 0; |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | /* 中间列表样式 */ |
| | | .irrigation-list { |
| | | flex: 1; |
| | | background-color: transparent; |
| | | margin-bottom: 20rpx; |
| | | overflow: hidden; |
| | | display: flex; |
| | | flex-direction: column; |
| | | padding: 0; |
| | | } |
| | | |
| | | .list-title { |
| | | font-size: 28rpx; |
| | | font-weight: bold; |
| | | color: #333; |
| | | padding: 20rpx; |
| | | background-color: #f8f8f8; |
| | | border-bottom: 1rpx solid #eee; |
| | | } |
| | | |
| | | .list-item { |
| | | padding: 30rpx; |
| | | padding-bottom: 90rpx; |
| | | position: relative; |
| | | background-color: #fff; |
| | | border-radius: 12rpx; |
| | | margin-bottom: 16rpx; |
| | | box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05); |
| | | } |
| | | |
| | | .item-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 10rpx; |
| | | margin-top: 10rpx; |
| | | } |
| | | |
| | | .item-title { |
| | | font-size: 28rpx; |
| | | font-weight: bold; |
| | | color: #333; |
| | | } |
| | | |
| | | .item-status { |
| | | font-size: 24rpx; |
| | | color: #999; |
| | | padding: 4rpx 12rpx; |
| | | border-radius: 20rpx; |
| | | |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .status-icon { |
| | | width: 70rpx; |
| | | height: 70rpx; |
| | | |
| | | } |
| | | |
| | | .status-active { |
| | | color: #fff; |
| | | background-color: rgba(45, 139, 247, 1); |
| | | } |
| | | |
| | | .status-draft { |
| | | color: #fff; |
| | | background-color: #999; |
| | | } |
| | | |
| | | .status-published { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #00AD45; |
| | | background-color: rgba(0, 173, 69, 0.1); |
| | | } |
| | | |
| | | .status-published-icon { |
| | | width: 34rpx; |
| | | height: 34rpx; |
| | | margin-right: 6rpx; |
| | | } |
| | | |
| | | .item-info { |
| | | font-size: 24rpx; |
| | | color: #666; |
| | | margin-right: 160rpx; |
| | | } |
| | | |
| | | .info-row { |
| | | display: flex; |
| | | margin-bottom: 8rpx; |
| | | align-items: flex-end; /* 添加底部对齐 */ |
| | | } |
| | | |
| | | /* 编号行样式 - 作为标题突出显示 */ |
| | | .title-row { |
| | | margin-bottom: 10rpx; |
| | | } |
| | | |
| | | .title-row .info-label, |
| | | .title-row .info-value { |
| | | font-size: 26rpx; |
| | | font-weight: bold; |
| | | color: #333; |
| | | } |
| | | |
| | | .info-label { |
| | | color: #999; |
| | | width: 150rpx; |
| | | margin-right: 10rpx; /* 添加右侧间距 */ |
| | | } |
| | | |
| | | /* 为已灌溉时间和轮组添加特殊样式 */ |
| | | .info-row.irrigated-row { |
| | | margin-top: 12rpx; |
| | | margin-bottom: 12rpx; |
| | | align-items: center !important; /* 强制垂直居中对齐 */ |
| | | display: flex; |
| | | justify-content: flex-start; /* 水平方向起点对齐 */ |
| | | height: 50rpx; /* 固定行高 */ |
| | | } |
| | | |
| | | .info-row.irrigated-row .info-label { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 100%; /* 使用百分比高度 */ |
| | | } |
| | | |
| | | .info-value-time { |
| | | font-size: 30rpx; |
| | | font-weight: bold; |
| | | color: rgb(42, 130, 228); |
| | | display: flex; |
| | | align-items: center; |
| | | height: 100%; /* 使用与info-label相同的高度 */ |
| | | } |
| | | |
| | | /* 空列表容器 */ |
| | | .empty-list { |
| | | flex: 1; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | background-color: #fff; |
| | | border-radius: 12rpx; |
| | | box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05); |
| | | width: 100%; |
| | | height: calc(100vh - 250rpx); /* 减去顶部标签页、底部按钮和内边距的高度 */ |
| | | min-height: 500rpx; |
| | | } |
| | | |
| | | .empty-icon { |
| | | width: 200rpx; |
| | | height: 200rpx; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | |
| | | .empty-text { |
| | | font-size: 28rpx; |
| | | color: #999; |
| | | } |
| | | |
| | | /* 底部按钮样式 */ |
| | | .bottom-button { |
| | | padding: 20rpx 0; |
| | | } |
| | | |
| | | .add-button { |
| | | background-color: rgba(45, 139, 247, 1); |
| | | color: #fff; |
| | | font-size: 32rpx; |
| | | border-radius: 12rpx; |
| | | width: 100%; |
| | | transition: all 0.2s ease; |
| | | } |
| | | |
| | | .add-button-hover { |
| | | background-color: rgba(35, 110, 200, 1); |
| | | transform: scale(0.98); |
| | | } |
| | | |
| | | .add-button:active { |
| | | background-color: rgba(35, 110, 200, 1); |
| | | transform: scale(0.98); |
| | | } |
| | | |
| | | /* 列表项操作按钮 */ |
| | | .item-actions { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | align-items: center; |
| | | position: absolute; |
| | | bottom: 20rpx; |
| | | right: 30rpx; |
| | | z-index: 2; |
| | | } |
| | | |
| | | .action-button { |
| | | font-size: 24rpx; |
| | | padding: 6rpx 20rpx; |
| | | margin-left: 16rpx; |
| | | border-radius: 30rpx; |
| | | background-color: #fff; |
| | | line-height: 1.5; |
| | | min-height: auto; |
| | | box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.1); |
| | | transition: all 0.2s ease; |
| | | } |
| | | |
| | | .action-button-hover { |
| | | transform: scale(0.95); |
| | | box-shadow: 0 1rpx 3rpx rgba(0, 0, 0, 0.1); |
| | | } |
| | | |
| | | .action-button:active { |
| | | transform: scale(0.95); |
| | | box-shadow: 0 1rpx 3rpx rgba(0, 0, 0, 0.1); |
| | | } |
| | | |
| | | .publish-button { |
| | | color: rgba(45, 139, 247, 1); |
| | | border: 1rpx solid rgba(45, 139, 247, 1); |
| | | } |
| | | |
| | | .publish-button-hover { |
| | | background-color: rgba(45, 139, 247, 0.1); |
| | | } |
| | | |
| | | .publish-button:active { |
| | | background-color: rgba(45, 139, 247, 0.1); |
| | | } |
| | | |
| | | .stop-button { |
| | | color: #f56c6c; |
| | | border: 1rpx solid #f56c6c; |
| | | } |
| | | |
| | | .stop-button-hover { |
| | | background-color: rgba(245, 108, 108, 0.1); |
| | | } |
| | | |
| | | .stop-button:active { |
| | | background-color: rgba(245, 108, 108, 0.1); |
| | | } |
| | | |
| | | .execute-button { |
| | | color: rgba(45, 139, 247, 1); |
| | | border: 1rpx solid rgba(45, 139, 247, 1); |
| | | } |
| | | |
| | | .execute-button-hover { |
| | | background-color: rgba(45, 139, 247, 0.1); |
| | | } |
| | | |
| | | .execute-button:active { |
| | | background-color: rgba(45, 139, 247, 0.1); |
| | | } |
| | |
| | | }, |
| | | showForceConfirm: false, |
| | | forceIntakeId: "", //强制开阀的取水口id |
| | | inputValue:"" |
| | | inputValue: "", |
| | | //以下为开阀弹窗相关 |
| | | isShowOpenTime: "false", |
| | | isOpenTiming: false, //是否是计划开阀时间样式的开阀 |
| | | postMinutes: 0, //定灌溉时长的时间 |
| | | showForceConfirm: false, |
| | | showErrorDialog: false, //错误提示 |
| | | showDialog: false, |
| | | dialog_mode: false, |
| | | dialog_time: false, |
| | | dialog_water: false, |
| | | openTimeText: "", |
| | | openTime: "", |
| | | irrigateProfile: [], //获取所选灌溉方式的详细数据 |
| | | }, |
| | | |
| | | // 切换 Tabs |
| | |
| | | */ |
| | | postOpenValva(intakeId, isforce) { |
| | | this.setData({ |
| | | inputValue:"" |
| | | inputValue: "" |
| | | }) |
| | | console.log("intakeId:" + intakeId + " isforce:" + isforce) |
| | | wx.showLoading({ |
| | |
| | | title: '没有搜索到取水口', |
| | | icon: 'error', |
| | | }) |
| | | }else{ |
| | | } else { |
| | | this.setData({ |
| | | allWaterPoints:[data.content] |
| | | allWaterPoints: [data.content] |
| | | }); |
| | | } |
| | | |
| | | |
| | | } else { |
| | | wx.showToast({ |
| | | title: data.msg, |
| | |
| | | confirmForceDialog() { |
| | | this.postOpenValva(this.data.forceIntakeId, true); |
| | | }, |
| | | closeSearch(){ |
| | | closeSearch() { |
| | | this.setData({ |
| | | allWaterPoints:[], |
| | | inputValue:"" |
| | | allWaterPoints: [], |
| | | inputValue: "" |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | //以下为定时定量相关代码 |
| | | //初始化所有开泵的参数 |
| | | initDialogData() { |
| | | this.setData({ |
| | | isShowOpenTime: "false", |
| | | isOpenTiming: false, //是否是计划开阀时间样式的开阀 |
| | | postMinutes: 0, //定灌溉时长的时间 |
| | | showForceConfirm: false, |
| | | showErrorDialog: false, //错误提示 |
| | | showDialog: true, |
| | | dialog_mode: true, |
| | | dialog_time: false, |
| | | dialog_water: false, |
| | | openTimeText: "", |
| | | openTime: "" |
| | | }) |
| | | }, |
| | | handleClost() { |
| | | this.setData({ |
| | | showDialog: false |
| | | }) |
| | | }, |
| | | handleSetDuration() { |
| | | this.getIrrigateProfileData(1); |
| | | }, |
| | | //获取常用用水时长及用水量 |
| | | getIrrigateProfileData(type) { |
| | | get({ |
| | | url: 'wx/valve/irrigate_profile', |
| | | data: { |
| | | type: type |
| | | } |
| | | }) |
| | | .then((data) => { |
| | | if (data.success && data.code === "0001") { |
| | | const items = data.content.obj.map(item => { |
| | | return { |
| | | defaultValue: item.defaultValue, |
| | | unit: item.unit, |
| | | unitText: item.unit === "1" ? "小时" : item.unit === "2" ? "分钟" : "立方米" |
| | | }; |
| | | }); |
| | | this.setData({ |
| | | dialog_mode: false, |
| | | dialog_time: type === 1, |
| | | dialog_water: type === 2, |
| | | irrigateProfile: items |
| | | }); |
| | | } else { |
| | | wx.showToast({ |
| | | title: data.msg, |
| | | }) |
| | | } |
| | | console.log('Failed to add item:'); |
| | | }) |
| | | .catch((error) => { |
| | | console.error('Failed to add item:', error); |
| | | }); |
| | | }, |
| | | handleSetWaterVolume() { |
| | | this.getIrrigateProfileData(2); |
| | | }, |
| | | dialogBack() { |
| | | this.setData({ |
| | | dialog_time: false, |
| | | dialog_water: false, |
| | | dialog_mode: true, |
| | | group_time: false, |
| | | activeIndex: -1 |
| | | }) |
| | | }, |
| | | //选择时间后的处理 |
| | | handleTimeWrapperTap(e) { |
| | | const index = e.currentTarget.dataset.index; |
| | | console.log(index) |
| | | if (index !== undefined) { |
| | | let minutes; |
| | | if (this.data.irrigateProfile[index].unit === "1") { |
| | | minutes = this.hourToMinutes(this.data.irrigateProfile[index].defaultValue) |
| | | } else { |
| | | minutes = this.data.irrigateProfile[index].defaultValue; |
| | | } |
| | | this.setData({ |
| | | activeIndex: parseInt(index), |
| | | postMinutes: minutes, |
| | | costiomTime: "", |
| | | group_time: false, |
| | | }); |
| | | } |
| | | }, |
| | | onTimeInputChange(data) { |
| | | console.log(data.detail.value) |
| | | if (data.detail.value !== "") { |
| | | this.setData({ |
| | | group_time: true, |
| | | activeIndex: -1, |
| | | postMinutes: parseInt(data.detail.value) |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | group_time: false, |
| | | postMinutes: 0, |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | //定灌溉时长自定义输入时间时修改时间单位0:分钟,1:小时 |
| | | onGroupOpenTimeTypeChange(event) { |
| | | let value = event.detail.value; |
| | | if (value === "1") { |
| | | this.setData({ |
| | | postMinutes: this.hourToMinutes(this.data.postMinutes) |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | postMinutes: this.minutesToHours(this.data.postMinutes) |
| | | }) |
| | | } |
| | | }, |
| | | onGroupOpenTimeChange(event) { |
| | | const { |
| | | value |
| | | } = event.detail; |
| | | console.log('onGroupOpenTimeChange:' + value); |
| | | if (value == 1) { |
| | | this.showPicker(); |
| | | this.setData({ |
| | | isOpenTiming: true, |
| | | radioValue: value, |
| | | dateStartTime: new Date().getTime() |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | isShowOpenTime: false, |
| | | isOpenTiming: false, |
| | | radioValue: value, |
| | | }) |
| | | } |
| | | }, |
| | | //定时开泵按钮 |
| | | btnOpenOnTime() { |
| | | if (this.data.postMinutes > 0) { |
| | | if (this.data.isOpenTiming) { |
| | | this.timeClosePlaned(); |
| | | } else { |
| | | this.timeClose(); |
| | | } |
| | | } else { |
| | | wx.showToast({ |
| | | icon: 'error', |
| | | title: '请选择或输入灌溉时间!', |
| | | }) |
| | | } |
| | | }, |
| | | //定时关阀式计划开阀 |
| | | timeClosePlaned() { |
| | | const app = getApp(); |
| | | wx.showLoading({ |
| | | title: '正在通信请稍候...', // 加载提示文字 |
| | | mask: true // 是否显示透明蒙层,防止触摸穿透,默认为 false |
| | | }); |
| | | const data = { |
| | | intakeId: this.data.intakeId, //取水口ID |
| | | // vcId: this.data.vcId, //虚拟卡ID |
| | | minutes: this.data.postMinutes, //分钟 |
| | | operator: app.globalData.clientId, //操作员 |
| | | plannedOpenTime: this.data.openTime |
| | | }; |
| | | post({ |
| | | url: "wx/valve/planed_open_timed_close", |
| | | data: data |
| | | }).then(response => { |
| | | // 处理成功响应 |
| | | console.log('请求成功:', response); |
| | | // 加载完成后隐藏加载动画 |
| | | wx.hideLoading(); |
| | | //完成后回到首页 |
| | | wx.reLaunch({ |
| | | url: '/pages/home/home?param=2' // 首页的路径,根据实际情况填写 |
| | | }); |
| | | }).catch(error => { |
| | | // 加载完成后隐藏加载动画 |
| | | wx.hideLoading(); |
| | | // 处理错误响应 |
| | | console.error('请求失败:', error); |
| | | this.setData({ |
| | | showErrorDialog: true, |
| | | errorData: error.msg |
| | | }) |
| | | }); |
| | | }, |
| | | //定时关阀式开阀 |
| | | timeClose() { |
| | | const app = getApp(); |
| | | wx.showLoading({ |
| | | title: '正在开阀请稍候...', // 加载提示文字 |
| | | mask: true // 是否显示透明蒙层,防止触摸穿透,默认为 false |
| | | }); |
| | | const data = { |
| | | intakeId: this.data.intakeId, //取水口ID |
| | | // vcId: this.data.vcId, //虚拟卡ID |
| | | minutes: this.data.postMinutes, //分钟 |
| | | operator: app.globalData.clientId //操作员 |
| | | }; |
| | | post({ |
| | | url: "wx/valve/timed_close", |
| | | data: data |
| | | }).then(response => { |
| | | // 处理成功响应 |
| | | console.log('请求成功:', response); |
| | | // 加载完成后隐藏加载动画 |
| | | wx.hideLoading(); |
| | | //完成后回到首页 |
| | | wx.reLaunch({ |
| | | url: '/pages/home/home?param=1' // 首页的路径,根据实际情况填写 |
| | | }); |
| | | }).catch(error => { |
| | | // 加载完成后隐藏加载动画 |
| | | wx.hideLoading(); |
| | | // 处理错误响应 |
| | | console.error('请求失败:', error); |
| | | this.setData({ |
| | | showErrorDialog: true, |
| | | errorData: error.msg |
| | | }) |
| | | }); |
| | | }, |
| | | }) |
| | |
| | | <view class="container"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <view class="all-waterIntake" wx:if="{{currentTab === 0}}"> |
| | | <view class="search-container"> |
| | | <input class="search-input" value="{{inputValue}}" placeholder="请输入取水口编码后点击搜索" bindinput="onInput" /> |
| | |
| | | <block wx:for="{{commonWaterPoints}}" wx:key="index"> |
| | | <view class="item"> |
| | | <view class="item-left"> |
| | | <text>{{item.intakeNum}}</text> |
| | | <image class="item-img-left" src="/images/valve.svg" /> |
| | | <text class="water-intake-name">{{item.intakeNum}}</text> |
| | | <image class="item-img" src="{{item.isOnLine ? '/images/wifi_no.svg' : '/images/wifi_off.svg'}}" /> |
| | | </view> |
| | | <text class="item-button" bindtap="choseCard" data-item="{{item}}">开阀</text> |
| | |
| | | <t-dialog class="error-dialog" title="开阀错误" visible="{{showErrorDialog}}" content="{{errorData}}" confirm-btn="{{ confirmBtn }}" bind:confirm="closeErrorDialog" /> |
| | | |
| | | <t-dialog visible="{{showForceConfirm}}" content="当前虚拟卡被占用,是否强制开阀?" confirm-btn="{{ { content: '强制开阀', variant: 'base', theme: 'danger' } }}" cancel-btn="取消" bind:confirm="confirmForceDialog" bind:cancel="cancelDialog" /> |
| | | |
| | | <!-- 黑色蒙层 --> |
| | | <view class="overlay" wx:if="{{showDialog}}" bindtap="closeDialog"></view> |
| | | <!-- 选择灌溉模式 --> |
| | | <view class="dialog" wx:if="{{showDialog}}"> |
| | | <image class="close" src="/images/close.svg" bindtap="handleClost"></image> |
| | | <view class="dialog-content" wx:if="{{dialog_mode}}"> |
| | | <view class="dialog-title">请选择开关阀方式</view> |
| | | <button bindtap="postOpenValva">手动开阀手动关阀</button> |
| | | <button bindtap="handleSetDuration">开阀后定时长自动关阀</button> |
| | | <button bindtap="handleSetWaterVolume">开阀后定水量自动关阀</button> |
| | | </view> |
| | | <view class="dialog-content" wx:if="{{dialog_time}}"> |
| | | <view class="dialog-title"> |
| | | <image class="dialog-title-img" bind:tap="dialogBack" src="/images/back.svg"></image> |
| | | <text class="dialog-title-text">开阀后定时长自动关阀</text> |
| | | </view> |
| | | <view> |
| | | <view class="row"> |
| | | <view class="choseitem{{activeIndex === 0 ? 'active' : ''}}" bindtap="handleTimeWrapperTap" data-index="0"> |
| | | <view class="chose-wrapper"> |
| | | <text class="chose-number">{{irrigateProfile[0].defaultValue}}</text> |
| | | <text class="chose-label">{{irrigateProfile[0].unitText}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="choseitem{{activeIndex === 1 ? 'active' : ''}}" bindtap="handleTimeWrapperTap" data-index="1"> |
| | | <view class="chose-wrapper"> |
| | | <text class="chose-number">{{irrigateProfile[1].defaultValue}}</text> |
| | | <text class="chose-label">{{irrigateProfile[1].unitText}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="row"> |
| | | <view class="choseitem{{activeIndex === 2 ? 'active' : ''}}" bindtap="handleTimeWrapperTap" data-index="2"> |
| | | <view class="chose-wrapper"> |
| | | <text class="chose-number">{{irrigateProfile[2].defaultValue}}</text> |
| | | <text class="chose-label">{{irrigateProfile[2].unitText}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="choseitem{{activeIndex === 3 ? 'active' : ''}}" bindtap="handleTimeWrapperTap" data-index="3"> |
| | | <view class="chose-wrapper"> |
| | | <text class="chose-number">{{irrigateProfile[3].defaultValue}}</text> |
| | | <text class="chose-label">{{irrigateProfile[3].unitText}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view> |
| | | <t-input label="" value="{{costiomTime}}" placeholder="或在此输入自定义时间" type="number" bind:change="onTimeInputChange"> |
| | | </t-input> |
| | | <t-radio-group bind:change="onGroupOpenTimeTypeChange" wx:if="{{group_time}}" default-value="0" borderless t-class="box"> |
| | | <t-radio block="{{false}}" label="分钟" value="0" /> |
| | | <t-radio block="{{false}}" label="小时" value="1" /> |
| | | </t-radio-group> |
| | | <t-radio-group bind:change="onGroupOpenTimeChange" value="{{radioValue}}" default-value="0" borderless t-class="box"> |
| | | <t-radio block="{{false}}" label="现在开阀" value="0" /> |
| | | <t-radio block="{{false}}" label="计划开阀时间" value="1" /> |
| | | </t-radio-group> |
| | | <text class="open-time" wx:if="{{isShowOpenTime}}">{{openTimeText}}</text> |
| | | <button bindtap="btnOpenOnTime">开阀</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="dialog-content" wx:if="{{dialog_water}}"> |
| | | <view class="dialog-title"> |
| | | <image class="dialog-title-img" bind:tap="dialogBack" src="/images/back.svg"/> |
| | | <text class="dialog-title-text">开阀后定水量自动关阀</text> |
| | | </view> |
| | | <view> |
| | | <view class="row"> |
| | | <view class="choseitem{{activeIndex === 0 ? 'active' : ''}}" bindtap="handleWaterWrapperTap" data-index="0"> |
| | | <view class="chose-wrapper"> |
| | | <text class="chose-number">{{irrigateProfile[0].defaultValue}}</text> |
| | | <text class="chose-label">{{irrigateProfile[0].unitText}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="choseitem{{activeIndex === 1 ? 'active' : ''}}" bindtap="handleWaterWrapperTap" data-index="1"> |
| | | <view class="chose-wrapper"> |
| | | <text class="chose-number">{{irrigateProfile[1].defaultValue}}</text> |
| | | <text class="chose-label">{{irrigateProfile[1].unitText}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="row"> |
| | | <view class="choseitem{{activeIndex === 2 ? 'active' : ''}}" bindtap="handleWaterWrapperTap" data-index="2"> |
| | | <view class="chose-wrapper"> |
| | | <text class="chose-number">{{irrigateProfile[2].defaultValue}}</text> |
| | | <text class="chose-label">{{irrigateProfile[2].unitText}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="choseitem{{activeIndex === 3 ? 'active' : ''}}" bindtap="handleWaterWrapperTap" data-index="3"> |
| | | <view class="chose-wrapper"> |
| | | <text class="chose-number">{{irrigateProfile[3].defaultValue}}</text> |
| | | <text class="chose-label">{{irrigateProfile[3].unitText}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view> |
| | | <t-input label="" value="{{costiomWater}}" suffix="立方米" align="right" type="number" placeholder="或在此输入自定义水量" bind:change="onWaterInputChange"> |
| | | </t-input> |
| | | <t-radio-group bind:change="onGroupOpenTimeChange" value="{{radioValue}}" default-value="0" borderless t-class="box"> |
| | | <t-radio block="{{false}}" label="现在开阀" value="0" /> |
| | | <t-radio block="{{false}}" label="计划开阀时间" value="1" /> |
| | | </t-radio-group> |
| | | <text class="open-time" wx:if="{{isShowOpenTime}}">{{openTimeText}}</text> |
| | | <button bindtap="btnOpenOnWater">开阀</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- 年月日时分 --> |
| | | <t-date-time-picker title="选择日期和时间" visible="{{datetimeVisible}}" mode="minute" value="{{datetime}}" format="YYYY-MM-DD HH:mm" bindchange="onConfirm" bindpick="onColumnChange" bindcancel="hidePicker" start="{{dateStartTime}}" end="{{dateEndTime}}"/> |
| | | |
| | | </view> |
| | |
| | | .result-item { |
| | | padding: 20rpx; |
| | | border-bottom: 1px solid #eaeaea; |
| | | } |
| | | |
| | | .item-img-left { |
| | | width: 40rpx; |
| | | /* 根据需要调整图标大小 */ |
| | | height: 40rpx; |
| | | /* 根据需要调整图标大小 */ |
| | | |
| | | } |
| | | |
| | | .item-img { |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | margin-left: 20rpx; |
| | | } |
| | | .water-intake-name { |
| | | font-size: 50rpx !important; |
| | | margin-left: 15rpx; |
| | | } |