|
|
@@ -1,4 +1,7 @@
|
|
|
-import { BasicType, IBestToast,
|
|
|
+import { BasicType,
|
|
|
+ IBest,
|
|
|
+ IBestNotify,
|
|
|
+ IBestToast,
|
|
|
reviseImgHeaderBuilder,
|
|
|
RouterPage, YTHeader, YTLog, YTPhotoHelper, yTRouter } from "basic"
|
|
|
import { BuilderHeader } from "../components/maincomponent/BuilderHeader"
|
|
|
@@ -20,10 +23,11 @@ import { SelectIcon } from "../components/maincomponent/BindSheetTask/SelectIcon
|
|
|
import { TaskGreenPlantsSelect } from "../components/maincomponent/BindSheetTask/TaskGreenPlantsSelect"
|
|
|
import { TextPickerRemind } from "../components/maincomponent/BindSheetTask/TextPickerRemind"
|
|
|
import { CustomNumberDay } from "../components/maincomponent/BindSheetTask/CustomNumberDay"
|
|
|
-import { formatClockData } from "../utils/dateListFormat"
|
|
|
+import { formatClockData, textTranslate, textTransLateMon, textTransLateWeek } from "../utils/dateListFormat"
|
|
|
import { FrequencyList,WeekList,MonthList, DateFrequency } from "../constants"
|
|
|
import { ButtonCom } from "../components/maincomponent/ButtonCom"
|
|
|
import { RemindItemClassComp } from "../components/maincomponent/RemindItemClassComp"
|
|
|
+import { NullBuilder } from "../components/NullCom"
|
|
|
|
|
|
@ComponentV2
|
|
|
@RouterPage
|
|
|
@@ -32,11 +36,12 @@ struct EditGreenPlantPage{
|
|
|
@Local currentSelectIndex:number=0
|
|
|
@Local timeLineList: OrderDetailBean[] = []
|
|
|
@Local remindList:RemindItemClass[]=[]
|
|
|
- @Local private greenPlantItem:GreenPlants={} as GreenPlants
|
|
|
@Local clockTaskList:ClockTaskItem[]=[]
|
|
|
@Local ClockTaskIconList:ClockTaskIcon[]=[]
|
|
|
@Local private plantsId:number=-1
|
|
|
@Local showHeaderImgRevise:boolean=false
|
|
|
+ //提醒时间在当前时间之前就会标红
|
|
|
+ @Local isShowRed:boolean=false
|
|
|
private yTPhotoHelper = new YTPhotoHelper()
|
|
|
private options: BasicType[] = [
|
|
|
{
|
|
|
@@ -47,10 +52,8 @@ struct EditGreenPlantPage{
|
|
|
this.showHeaderImgRevise = false
|
|
|
yTRouter.router2DelPhotoPage({ src: fullpath, type: 'image'},(res:PopInfo)=>{
|
|
|
let ans=res.result as string
|
|
|
- if(ans&&ans!='false'){
|
|
|
- this.greenPlantItem.plantsPicture=ans
|
|
|
- YTLog.info(this.greenPlantItem)
|
|
|
-
|
|
|
+ if(ans&&ans!=''){
|
|
|
+ this.vm.greenPlantsPicture=ans
|
|
|
}
|
|
|
})
|
|
|
} catch (e) {
|
|
|
@@ -65,10 +68,9 @@ struct EditGreenPlantPage{
|
|
|
(fullPath) => {
|
|
|
this.showHeaderImgRevise = false
|
|
|
yTRouter.router2DelPhotoPage({ src: fullPath, type: 'image' },(res:PopInfo)=>{
|
|
|
- let ans=res.result as string
|
|
|
- if(ans&&ans!='false'){
|
|
|
- this.greenPlantItem.plantsPicture=ans
|
|
|
- YTLog.info(this.greenPlantItem)
|
|
|
+ let ans=res.result['url'] as string
|
|
|
+ if(ans&&ans!=''){
|
|
|
+ this.vm.greenPlantsPicture=ans
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
@@ -94,23 +96,26 @@ struct EditGreenPlantPage{
|
|
|
if(this.plantsId!=-1){
|
|
|
this.title='编辑绿植'
|
|
|
this.getGreenPlantsById(this.plantsId)
|
|
|
- this.getClockLogList({plantsId:6,page:1,pageSizes:20})
|
|
|
- this.getRemindList({plantsId:6,page:1,pageSizes:20})
|
|
|
+ this.getClockLogList({plantsId:this.plantsId,page:1,pageSizes:20})
|
|
|
+ this.getRemindList({plantsId:this.plantsId,page:1,pageSizes:20})
|
|
|
this.getClockTaskList()
|
|
|
this.getClockTaskIconList()
|
|
|
}else{
|
|
|
}
|
|
|
}
|
|
|
async getGreenPlantsById(id:number){
|
|
|
- this.greenPlantItem=await GreenPlantsApi.getGreenPlantsDetail(id)
|
|
|
+ const ans=await GreenPlantsApi.getGreenPlantsDetail(id)
|
|
|
+ this.vm.greenPlantsName=ans.plantsName
|
|
|
+ this.vm.greenPlantsPicture=ans.plantsPicture
|
|
|
+ this.plantsId=ans.plantsId
|
|
|
}
|
|
|
async editGreenPlants(params:InsertEditGreenPlantsParams){
|
|
|
await GreenPlantsApi.editGreenPlants(params)
|
|
|
- this.onBackPressUpdateData()
|
|
|
+ this.onBackPressUpdateData('true')
|
|
|
}
|
|
|
async insertGreenPlants(params:InsertEditGreenPlantsParams){
|
|
|
await GreenPlantsApi.insertGreenPlants(params)
|
|
|
- this.onBackPressUpdateData()
|
|
|
+ this.onBackPressUpdateData('true')
|
|
|
|
|
|
}
|
|
|
async getClockLogList(params:GetClockLogParams){
|
|
|
@@ -129,7 +134,13 @@ struct EditGreenPlantPage{
|
|
|
}
|
|
|
async insertRemind(params:InsertEditRemindParams){
|
|
|
await RemindApi.insertRemind(params)
|
|
|
+ this.remindList=[]
|
|
|
+ this.getRemindList({plantsId:this.plantsId,page:1,pageSizes:20})
|
|
|
+ }
|
|
|
+ async editRemind(params:InsertEditRemindParams){
|
|
|
+ await RemindApi.updateRemind(params)
|
|
|
}
|
|
|
+
|
|
|
async getClockTaskList(){
|
|
|
//获取打卡事项
|
|
|
this.clockTaskList=await ClockTaskApi.getClockTaskList()
|
|
|
@@ -162,6 +173,9 @@ struct EditGreenPlantPage{
|
|
|
this.vm.remindPlantsId=0
|
|
|
this.vm.remindPlantsName=""
|
|
|
}
|
|
|
+ //校验
|
|
|
+
|
|
|
+
|
|
|
build() {
|
|
|
NavDestination(){
|
|
|
Column({space:20}) {
|
|
|
@@ -182,7 +196,7 @@ struct EditGreenPlantPage{
|
|
|
}.width('100%')
|
|
|
.justifyContent(FlexAlign.Start)
|
|
|
Row(){
|
|
|
- Image(this.plantsId==-1?$r('app.media.icon_plants_null_picture_'):this.greenPlantItem.plantsPicture)
|
|
|
+ Image(this.vm.greenPlantsPicture==""?$r('app.media.icon_plants_null_picture_'):this.vm.greenPlantsPicture)
|
|
|
.width(this.plantsId==-1?33:76)
|
|
|
.height(this.plantsId==-1?33:113)
|
|
|
}.width(106)
|
|
|
@@ -197,7 +211,7 @@ struct EditGreenPlantPage{
|
|
|
|
|
|
Row(){
|
|
|
Text('名称').fontSize(14).fontColor('#333333')
|
|
|
- TextInput({placeholder:"点击输入植物名称",text:this.greenPlantItem.plantsName})
|
|
|
+ TextInput({placeholder:"点击输入植物名称",text:this.vm.greenPlantsName})
|
|
|
.width(100)
|
|
|
.height(16)
|
|
|
.backgroundColor(Color.Transparent)
|
|
|
@@ -211,10 +225,10 @@ struct EditGreenPlantPage{
|
|
|
.fontColor('#206D43')
|
|
|
.onChange((value:string)=>{
|
|
|
if(value.length>7){
|
|
|
- this.greenPlantItem.plantsName=value.slice(7)
|
|
|
+ this.vm.greenPlantsName=value.slice(7)
|
|
|
return
|
|
|
}
|
|
|
- this.greenPlantItem.plantsName=value
|
|
|
+ this.vm.greenPlantsName=value
|
|
|
})
|
|
|
}.width('100%')
|
|
|
.justifyContent(FlexAlign.SpaceBetween)
|
|
|
@@ -236,19 +250,24 @@ struct EditGreenPlantPage{
|
|
|
Row(){
|
|
|
Column(){
|
|
|
Text('养护记录').fontSize(this.currentSelectIndex==0?16:14)
|
|
|
- Row()
|
|
|
- .width(20)
|
|
|
- .height(3)
|
|
|
- .backgroundColor(this.currentSelectIndex==0?'#206d43':Color.Transparent)
|
|
|
+ Column(){
|
|
|
+ if(this.currentSelectIndex==0){
|
|
|
+ Image($r('app.media.icon_edit_page_tab')).width(16).height(6)
|
|
|
+ }
|
|
|
+ }.width(16)
|
|
|
+ .height(6)
|
|
|
}.margin({right:22}).onClick(()=>{
|
|
|
this.currentSelectIndex=0
|
|
|
})
|
|
|
Column(){
|
|
|
Text('提醒设置').fontSize(this.currentSelectIndex==1?16:14)
|
|
|
- Row()
|
|
|
- .width(20)
|
|
|
- .height(3)
|
|
|
- .backgroundColor(this.currentSelectIndex==1?'#206d43':Color.Transparent)
|
|
|
+ Column(){
|
|
|
+ if(this.currentSelectIndex==1){
|
|
|
+ Image($r('app.media.icon_edit_page_tab')).width(16).height(6)
|
|
|
+ }
|
|
|
+ }.width(16)
|
|
|
+ .height(6)
|
|
|
+
|
|
|
}.onClick(()=>{
|
|
|
this.currentSelectIndex=1
|
|
|
|
|
|
@@ -256,57 +275,84 @@ struct EditGreenPlantPage{
|
|
|
}.width('100%')
|
|
|
Column() {
|
|
|
if (this.currentSelectIndex == 0) {
|
|
|
- Stack({alignContent:Alignment.BottomEnd}){
|
|
|
- List() {
|
|
|
- ForEach(this.timeLineList, (item: OrderDetailBean, index: number) => {
|
|
|
- TimeLineNode({ bean: item, index: index,totalSize:this.timeLineList.length})
|
|
|
- }, (item: object) => JSON.stringify(item))
|
|
|
- }.margin({ left: 10 }).scrollBar(BarState.Off).height('100%').alignListItem(ListItemAlign.Start)
|
|
|
- ButtonCom({
|
|
|
- marBottom:50,
|
|
|
- isShowBuilder:()=>{
|
|
|
- if(this.plantsId==-1) {
|
|
|
- IBestToast.show({
|
|
|
- message:"先添加植物"
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- this.reset()
|
|
|
- this.isShowMaintenanceBuilder = true
|
|
|
- }
|
|
|
- })
|
|
|
+ if(this.timeLineList.length==0){
|
|
|
+ NullBuilder()
|
|
|
+ }else {
|
|
|
+ Stack({ alignContent: Alignment.BottomEnd }) {
|
|
|
+ List() {
|
|
|
+ ForEach(this.timeLineList, (item: OrderDetailBean, index: number) => {
|
|
|
+ ListItem() {
|
|
|
+ TimeLineNode({ bean: item, index: index, totalSize: this.timeLineList.length })
|
|
|
+ }
|
|
|
+ }, (item: object) => JSON.stringify(item))
|
|
|
+ }.height('100%').margin({ left: 10 }).scrollBar(BarState.Off).alignListItem(ListItemAlign.Start)
|
|
|
+
|
|
|
+ // ButtonCom({
|
|
|
+ // marBottom:50,
|
|
|
+ // isShowBuilder:()=>{
|
|
|
+ // if(this.plantsId==-1) {
|
|
|
+ // IBestToast.show({
|
|
|
+ // message:"先添加植物"
|
|
|
+ // })
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // this.reset()
|
|
|
+ // this.isShowMaintenanceBuilder = true
|
|
|
+ // }
|
|
|
+ // })
|
|
|
}.layoutWeight(1)
|
|
|
+ }
|
|
|
}else{
|
|
|
- Stack({alignContent:Alignment.BottomEnd}) {
|
|
|
- List({ space: 15 }) {
|
|
|
- ForEach(this.remindList, (item: RemindItemClass, index: number) => {
|
|
|
- ListItem() {
|
|
|
- RemindItemClassComp({
|
|
|
- item:item
|
|
|
+
|
|
|
+ Stack({ alignContent: Alignment.BottomEnd }) {
|
|
|
+ Column() {
|
|
|
+ if (this.remindList.length == 0) {
|
|
|
+ NullBuilder()
|
|
|
+ } else {
|
|
|
+ List({ space: 15 }) {
|
|
|
+ ForEach(this.remindList, (item: RemindItemClass, index: number) => {
|
|
|
+ ListItem() {
|
|
|
+ RemindItemClassComp({
|
|
|
+ item: item,
|
|
|
+ isShowBuilder: () => {
|
|
|
+ this.reset()
|
|
|
+ this.vm.remindPlantsId = item.plantsId
|
|
|
+ this.vm.remindTaskItemId = item.itemId
|
|
|
+ this.vm.remindTaskName = item.itemName
|
|
|
+ this.vm.remindPlantsName = item.plantsName
|
|
|
+ this.vm.remindTaskUrl = item.itemIcon
|
|
|
+ this.vm.frequency = item.repeatType
|
|
|
+ this.vm.date = item.remindDate
|
|
|
+ this.vm.plantsId = item.plantsId
|
|
|
+ this.vm.time = item.remindTime.slice(0, 5)
|
|
|
+ this.isShowRemindClockBuilder = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
- }
|
|
|
- })
|
|
|
- }.height('100%').alignListItem(ListItemAlign.Start)
|
|
|
- ButtonCom({
|
|
|
- marBottom:50,
|
|
|
- text:"提醒设置",
|
|
|
- isShowBuilder:()=>{
|
|
|
- if(this.plantsId==-1) {
|
|
|
- IBestToast.show({
|
|
|
- message:"先添加植物"
|
|
|
- })
|
|
|
- return
|
|
|
+ }.height('100%').alignListItem(ListItemAlign.Start)
|
|
|
}
|
|
|
- this.reset()
|
|
|
- this.isShowRemindClockBuilder = true
|
|
|
-
|
|
|
- }
|
|
|
- })
|
|
|
- }.layoutWeight(1)
|
|
|
+ }.height('100%')
|
|
|
+ ButtonCom({
|
|
|
+ marBottom: 50,
|
|
|
+ text: "提醒设置",
|
|
|
+ isShowBuilder: () => {
|
|
|
+ if (this.plantsId == -1) {
|
|
|
+ IBestToast.show({
|
|
|
+ message: "先添加植物"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.reset()
|
|
|
+ this.isShowRemindClockBuilder = true
|
|
|
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }.layoutWeight(1)
|
|
|
}
|
|
|
}
|
|
|
.layoutWeight(1)
|
|
|
+ .justifyContent(FlexAlign.Start)
|
|
|
.bindSheet($$this.isShowRemindClockBuilder,this.RemindClockBuilder(),{
|
|
|
height:530,
|
|
|
showClose:false,
|
|
|
@@ -330,15 +376,15 @@ struct EditGreenPlantPage{
|
|
|
@Builder
|
|
|
rightBuilder(){
|
|
|
Text('确认').fontSize(16).fontColor('#206D43').onClick(()=>{
|
|
|
- if(this.greenPlantItem.plantsName==""||this.greenPlantItem.plantsName==null){
|
|
|
+ if(this.vm.greenPlantsName==""){
|
|
|
IBestToast.show({
|
|
|
message:"植物名称不能为空"
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if(this.greenPlantItem.plantsPicture==""||this.greenPlantItem.plantsPicture==null){
|
|
|
+ if(this.vm.greenPlantsPicture==""){
|
|
|
IBestToast.show({
|
|
|
- message:"植物名称不能为空"
|
|
|
+ message:"植物图片不能为空"
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
@@ -346,14 +392,14 @@ struct EditGreenPlantPage{
|
|
|
if(this.plantsId==-1){
|
|
|
this.insertGreenPlants({
|
|
|
plantsId:0,
|
|
|
- plantsName:this.greenPlantItem.plantsName,
|
|
|
- plantsPicture:this.greenPlantItem.plantsPicture
|
|
|
+ plantsName:this.vm.greenPlantsName,
|
|
|
+ plantsPicture:this.vm.greenPlantsPicture
|
|
|
})
|
|
|
}else{
|
|
|
- this.insertGreenPlants({
|
|
|
+ this.editGreenPlants({
|
|
|
plantsId:this.plantsId,
|
|
|
- plantsName:this.greenPlantItem.plantsName,
|
|
|
- plantsPicture:this.greenPlantItem.plantsPicture
|
|
|
+ plantsName:this.vm.greenPlantsName,
|
|
|
+ plantsPicture:this.vm.greenPlantsPicture
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -372,8 +418,33 @@ struct EditGreenPlantPage{
|
|
|
rightTitle:'设置',
|
|
|
leftClick:()=>{
|
|
|
this.isShowRemindClockBuilder=false
|
|
|
+ this.reset()
|
|
|
},
|
|
|
rightClick:()=>{
|
|
|
+ if(this.vm.remindTaskName==""){
|
|
|
+ IBestToast.show({
|
|
|
+ message:"你还没选择事项"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.vm.remindPlantsName==""){
|
|
|
+ IBestToast.show({
|
|
|
+ message:"你还没选择植物"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.vm.time==""){
|
|
|
+ IBestToast.show({
|
|
|
+ message:"时间不合法"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.vm.frequency==DateFrequency.NONE || this.vm.frequency==DateFrequency.FREE){
|
|
|
+ this.vm.date=this.vm.date
|
|
|
+ }else{
|
|
|
+ this.vm.date=dayjs(new Date()).format('YYYY-MM-DD')
|
|
|
+ }
|
|
|
+
|
|
|
this.isShowRemindClockBuilder=false
|
|
|
const params:InsertEditRemindParams={
|
|
|
plantsId:this.vm.remindPlantsId,
|
|
|
@@ -384,11 +455,14 @@ struct EditGreenPlantPage{
|
|
|
remindDate:this.vm.date,
|
|
|
remindTime:this.vm.time+":00",
|
|
|
intervalDays:Number(this.vm.dayNumber),
|
|
|
- monthlyDay:Number(this.vm.mon),
|
|
|
- weeklyWeekday:Number(this.vm.week)
|
|
|
+ monthlyDay:textTransLateMon(this.vm.mon), //Number(this.vm.mon)
|
|
|
+ weeklyWeekday:textTransLateWeek(this.vm.week),
|
|
|
+ isOpen:true,
|
|
|
+ settingId:0
|
|
|
}
|
|
|
// this.insertClockLog(params)
|
|
|
this.insertRemind(params)
|
|
|
+ this.reset()
|
|
|
}
|
|
|
})
|
|
|
|
|
|
@@ -419,7 +493,7 @@ struct EditGreenPlantPage{
|
|
|
Column() {
|
|
|
TaskItem({
|
|
|
title:"多久提醒一次",
|
|
|
- TaskText:this.vm.frequency,
|
|
|
+ TaskText:textTranslate(this.vm.frequency),
|
|
|
swiperChange:()=>{
|
|
|
this.vm.swiperController.changeIndex(3,true)
|
|
|
}
|
|
|
@@ -436,6 +510,7 @@ struct EditGreenPlantPage{
|
|
|
Row() {
|
|
|
if(this.vm.frequency==DateFrequency.NONE){
|
|
|
Text('日期')
|
|
|
+ // .fontColor(this.isShowRed?Color.Red:'#000')
|
|
|
}else if(this.vm.frequency==DateFrequency.WEEK){
|
|
|
Text('每周几提醒')
|
|
|
}else if(this.vm.frequency==DateFrequency.MONTH){
|
|
|
@@ -473,6 +548,10 @@ struct EditGreenPlantPage{
|
|
|
.padding({left:10,right:10})
|
|
|
.borderRadius(12)
|
|
|
|
|
|
+ if(this.vm.isshowRed){
|
|
|
+ Text('提醒时间不能小于当前时间哦').fontColor(Color.Red)
|
|
|
+ }
|
|
|
+
|
|
|
Column(){
|
|
|
Text('注:\n' +
|
|
|
'若已有该事项提醒,则会进行更新\n' +
|
|
|
@@ -541,6 +620,7 @@ struct EditGreenPlantPage{
|
|
|
swiperBuilder2:()=>{
|
|
|
//日期
|
|
|
this.SelectCustomRemindDate()
|
|
|
+ // this.SelectRemindDate()
|
|
|
},
|
|
|
swiperComController:this.vm.swiperComController[3]
|
|
|
})
|
|
|
@@ -738,12 +818,18 @@ struct EditGreenPlantPage{
|
|
|
backText:(value,index)=>{
|
|
|
if(index==0){
|
|
|
this.vm.frequency=DateFrequency.NONE
|
|
|
+ this.vm.date=dayjs(new Date()).format('YYYY-MM-DD')
|
|
|
}else if(index==1){
|
|
|
this.vm.frequency=DateFrequency.DAY
|
|
|
+ this.vm.date=dayjs(new Date()).format('YYYY-MM-DD')
|
|
|
}else if(index==2){
|
|
|
this.vm.frequency=DateFrequency.WEEK
|
|
|
+ this.vm.week="周一"
|
|
|
+ this.vm.date=dayjs(new Date()).format('YYYY-MM-DD')
|
|
|
}else if(index==3){
|
|
|
this.vm.frequency=DateFrequency.MONTH
|
|
|
+ this.vm.week="1号"
|
|
|
+ this.vm.date=dayjs(new Date()).format('YYYY-MM-DD')
|
|
|
}else{
|
|
|
this.vm.frequency=DateFrequency.FREE
|
|
|
}
|
|
|
@@ -784,7 +870,7 @@ struct EditGreenPlantPage{
|
|
|
this.vm.date=dayjs(date).format('YYYY-MM-DD')
|
|
|
}
|
|
|
})
|
|
|
- }.ColStyle()
|
|
|
+ }.ColStyle(Color.Transparent)
|
|
|
}
|
|
|
@Builder
|
|
|
SelectCustomRemindDate(){
|
|
|
@@ -792,15 +878,21 @@ struct EditGreenPlantPage{
|
|
|
Column(){
|
|
|
DiaryDatePicker({
|
|
|
back:()=>{
|
|
|
- this.vm.swiperController[3].changeIndex(1,true)
|
|
|
+ // this.vm.swiperController[3].changeIndex(0,true)
|
|
|
+ // this.vm.swiperController.changeIndex(4,true)
|
|
|
+ this.vm.swiperComController[3].changeIndex(0,true)
|
|
|
+
|
|
|
},
|
|
|
selectDateBack:(date: Date)=>{
|
|
|
//需要带参数确定
|
|
|
- this.vm.swiperController[3].changeIndex(1,true)
|
|
|
+ // this.vm.swiperController[3].changeIndex(0,true)
|
|
|
+ // this.vm.swiperController.changeIndex(4,true)
|
|
|
+ this.vm.swiperComController[3].changeIndex(0,true)
|
|
|
+
|
|
|
this.vm.date=dayjs(date).format('YYYY-MM-DD')
|
|
|
}
|
|
|
})
|
|
|
- }.ColStyle()
|
|
|
+ }.ColStyle(Color.Transparent)
|
|
|
}
|
|
|
|
|
|
@Builder
|
|
|
@@ -816,7 +908,10 @@ struct EditGreenPlantPage{
|
|
|
},
|
|
|
rightClick:()=>{
|
|
|
this.vm.swiperController.changeIndex(0,true)
|
|
|
- //选择植物成功,返回
|
|
|
+ if(this.vm.week=="") {
|
|
|
+ this.vm.week = "周一"
|
|
|
+ }
|
|
|
+ //选择植物成功,返回
|
|
|
//应该再这里赋值的
|
|
|
}
|
|
|
})
|
|
|
@@ -844,6 +939,9 @@ struct EditGreenPlantPage{
|
|
|
this.vm.swiperController.changeIndex(0,true)
|
|
|
//选择植物成功,返回
|
|
|
//应该再这里赋值的
|
|
|
+ if(this.vm.mon=="") {
|
|
|
+ this.vm.week = "1号"
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
TextPickerRemind({
|
|
|
@@ -869,7 +967,21 @@ struct EditGreenPlantPage{
|
|
|
this.vm.swiperController.changeIndex(0,true)
|
|
|
},
|
|
|
rightClick:()=>{
|
|
|
+ if(this.vm.date==""){
|
|
|
+ IBestToast.show({
|
|
|
+ message:"你还没选择时间"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.vm.dayNumber=="0"||this.vm.dayNumber==""){
|
|
|
+ IBestToast.show({
|
|
|
+ message:"你还没输入多少天"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
this.vm.swiperController.changeIndex(0,true)
|
|
|
+
|
|
|
+
|
|
|
//选择植物成功,返回
|
|
|
//应该再这里赋值的
|
|
|
}
|