From 1ac082d1c409c1ec1585126b4815b90418ab4ad5 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Thu, 17 Sep 2020 10:06:44 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=B8=82=E5=8C=97=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=BF=81=E7=A7=BB=E8=87=B3=E5=AE=89=E5=AE=81=E3=80=91=E3=80=90?= =?UTF-8?q?=E6=9D=83=E9=99=90=E7=AE=A1=E7=90=86=E3=80=91-=E7=8E=8B?= =?UTF-8?q?=E5=85=AC=E5=B3=B0-2020-09-17?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mixins/view-module.js | 17 ++++ src/views/modules/sys/dept-add-or-update.vue | 8 +- src/views/modules/sys/dept.vue | 2 +- src/views/modules/sys/role-add-or-update.vue | 86 +++----------------- src/views/modules/sys/role.vue | 31 +++++-- src/views/modules/sys/user-add-or-update.vue | 35 +++++++- src/views/modules/sys/user.vue | 46 ++++++++--- 7 files changed, 125 insertions(+), 100 deletions(-) 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">