Showing
1 changed file
with
8 additions
and
2 deletions
| ... | ... | @@ -84,7 +84,8 @@ |
| 84 | 84 | </view> |
| 85 | 85 | <view class="form-item"> |
| 86 | 86 | <view class="label">创建时间</view> |
| 87 | - <uni-datetime-picker type="daterange" v-model="model.dateRange" start="2023-01-01" /> | |
| 87 | + <uni-datetime-picker type="daterange" :value="model.dateRange" start="2023-01-01" | |
| 88 | + @change="onDateChange($event, model)" /> | |
| 88 | 89 | </view> |
| 89 | 90 | </view> |
| 90 | 91 | </template> |
| ... | ... | @@ -299,11 +300,16 @@ |
| 299 | 300 | this.officeSelectVisible = true |
| 300 | 301 | }, |
| 301 | 302 | onOfficeConfirm(payload) { |
| 303 | + console.log('onOfficeConfirm__this.filterForm', this.filterForm) | |
| 302 | 304 | const val = payload && payload.value != null ? payload.value : '' |
| 303 | 305 | const label = payload && payload.label != null ? payload.label : '' |
| 304 | 306 | this.filterForm.officeId = val |
| 305 | 307 | this.filterForm.officeName = label |
| 306 | 308 | }, |
| 309 | + onDateChange(e, model) { | |
| 310 | + // 确保同步更新 filterForm,避免数据不同步 | |
| 311 | + this.filterForm.dateRange = e | |
| 312 | + }, | |
| 307 | 313 | toggleBatch() { |
| 308 | 314 | this.batchMode = !this.batchMode |
| 309 | 315 | if (!this.batchMode) this.selectedKeys = [] |
| ... | ... | @@ -456,7 +462,7 @@ |
| 456 | 462 | const query = '?id=' + encodeURIComponent(id) + '&todoType=' + encodeURIComponent(this.todoType || '') |
| 457 | 463 | uni.navigateTo({ url: '/pages/dev_manage/detail' + query }) |
| 458 | 464 | }, |
| 459 | - | |
| 465 | + | |
| 460 | 466 | } |
| 461 | 467 | } |
| 462 | 468 | </script> | ... | ... |