diff --git a/src/mixins/view-module.js b/src/mixins/view-module.js index 8e26f52..b668d7e 100644 --- a/src/mixins/view-module.js +++ b/src/mixins/view-module.js @@ -87,6 +87,11 @@ export default { this.page = val this.getDataList() }, + // 查询分页,重置1 + getDataListSearch () { + this.page = 1 + this.getDataList() + }, // 新增 / 修改 addOrUpdateHandle (id) { this.addOrUpdateVisible = true @@ -144,6 +149,18 @@ export default { ...this.dataForm }) window.location.href = `${window.SITE_CONFIG['apiURL']}${this.mixinViewModuleOptions.exportMoudle}?${params}` + }, + // 时间段控件取值变化事件-清空一个其他都清空 + changeTime (dateValue) { + var startTimeIsNull = this.dataForm.startTime === '' || this.dataForm.startTime === 'null' || this.dataForm.startTime === null + var endTimeIsNull = this.dataForm.endTime === '' || this.dataForm.endTime === 'null' || this.dataForm.endTime === null + if (dateValue === null || dateValue === '' || dateValue === 'null') { + this.dataForm.startTime = '' + this.dataForm.endTime = '' + } else if (startTimeIsNull || endTimeIsNull) { + this.dataForm.startTime = dateValue + this.dataForm.endTime = dateValue + } } } } diff --git a/src/views/modules/sys/dept-add-or-update.vue b/src/views/modules/sys/dept-add-or-update.vue index 79fb349..6da6384 100644 --- a/src/views/modules/sys/dept-add-or-update.vue +++ b/src/views/modules/sys/dept-add-or-update.vue @@ -6,16 +6,19 @@ + :label="$t('dept.sort')" + style="width:200px">