| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- import dayjs from "dayjs"
- import { DateFrequency } from "../constants"
- @ObservedV2
- export class EditGreenPlantPageModel{
- @Trace
- swiperController:SwiperController=new SwiperController()
- @Trace
- swiperComController:SwiperController[]=[
- new SwiperController(),
- new SwiperController(),
- new SwiperController(),
- new SwiperController(),
- ]
- /**
- * 新增绿植
- */
- @Trace
- greenPlantsName:string=""
- @Trace
- greenPlantsPicture:string=""
- //新增提醒间隔类型
- @Trace
- frequency:string=DateFrequency.NONE //默认一次
- // @Trace
- // siw:SwiperController=new SwiperController()
- //提醒事项id
- @Trace
- remindTaskItemId:number=0
- //提醒事项名称
- @Trace
- remindTaskName:string=""
- //t提醒事项图标
- @Trace
- remindTaskUrl:string=""
- //植物id,植物名称
- @Trace
- remindPlantsId:number=0
- @Trace
- remindPlantsName:string=""
- // @Local
- // clockDate:string=""
- // @Local
- // clockTime:string=""
- /**
- * 新增事项
- */
- @Trace taskName:string=""
- @Trace taskUrl:string=""
- /**
- * 时间间隔
- */
- //时间
- @Trace
- time:string=""
- //日期
- @Trace
- date:string=dayjs(new Date).format('YYYY-MM-DD')
- //间隔天数
- @Trace
- dayNumber:string=""
- //每周几
- @Trace
- week:string=""
- //每月几号
- @Trace
- mon:string=""
- /**
- * 养护打卡方面
- */
- /**
- * 新增打卡记录
- */
- @Trace
- taskItemId:number=0
- @Trace
- taskItemName:string=""
- @Trace
- plantsId:number=0
- @Trace
- plantsName:string=""
- @Trace
- clockDate:string=""
- @Trace
- clockTime:string=""
- @Trace
- isshowRed:boolean=false
- @Monitor('date')
- onNameChangeDate(monitor: IMonitor) {
- if(dayjs(this.date+" "+this.time).valueOf()<dayjs(new Date()).valueOf()){
- //提醒的时间在当前时间之前
- this.isshowRed=true
- }else{
- this.isshowRed=false
- }
- }
- @Monitor('time')
- onNameChangeTime(monitor: IMonitor) {
- if(dayjs(this.date+" "+this.time).valueOf()<dayjs(new Date()).valueOf()){
- //提醒的时间在当前时间之前
- this.isshowRed=true
- }else{
- this.isshowRed=false
- }
- }
- }
|