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"> diff --git a/src/views/modules/sys/dept.vue b/src/views/modules/sys/dept.vue index c815ad4..5ae7e9b 100644 --- a/src/views/modules/sys/dept.vue +++ b/src/views/modules/sys/dept.vue @@ -1,7 +1,7 @@ - + {{ $t('add') }} diff --git a/src/views/modules/sys/role-add-or-update.vue b/src/views/modules/sys/role-add-or-update.vue index 7c9a8a1..6c83925 100644 --- a/src/views/modules/sys/role-add-or-update.vue +++ b/src/views/modules/sys/role-add-or-update.vue @@ -6,11 +6,12 @@ @@ -26,10 +27,12 @@ - + - + - + - - - - - - - - - - - - - + { if (this.dataForm.id) { @@ -194,15 +164,6 @@ export default { this.deptList = res.data }).catch(() => { }) }, - // 获取吹哨部门列表 - getWhistleDeptList () { - return this.$http.get('/sys/dept/list').then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) - } - this.whistleDeptList = res.data - }).catch(() => { }) - }, // 获取App菜单列表 getAppMenuList () { return this.$http.get('/sys/appmenu/select').then(({ data: res }) => { @@ -212,15 +173,6 @@ export default { this.appMenuList = res.data }).catch(() => { }) }, - // 获取项目处理类型授权 - getCategoryList () { - return this.$http.get('/events/handlecategory/getCategoryList').then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) - } - this.categoryList = res.data - }).catch(() => { }) - }, getAnalysisMenuList () { return this.$http.get('/sys/analysismenu/select').then(({ data: res }) => { if (res.code !== 0) { @@ -242,9 +194,7 @@ export default { this.dataForm.menuIdList.forEach(item => this.$refs.menuListTree.setChecked(item, true)) this.$refs.deptListTree.setCheckedKeys(this.dataForm.deptIdList) this.dataForm.appMenuIdList.forEach(item => this.$refs.appMenuListTree.setChecked(item, true)) - this.dataForm.categoryIdList.forEach(item => this.$refs.categoryListTree.setChecked(item, true)) this.dataForm.analysisMenuIdList.forEach(item => this.$refs.analysisMenuListTree.setChecked(item, true)) - this.$refs.whistleDeptListTree.setCheckedKeys(this.dataForm.whistleDeptIdList) }).catch(() => { }) }, // 表单提交 @@ -262,15 +212,10 @@ export default { ...this.$refs.appMenuListTree.getCheckedKeys(), ...this.$refs.appMenuListTree.getHalfCheckedKeys() ] - this.dataForm.categoryIdList = [ - ...this.$refs.categoryListTree.getCheckedKeys(), - ...this.$refs.categoryListTree.getHalfCheckedKeys() - ] this.dataForm.analysisMenuIdList = [ ...this.$refs.analysisMenuListTree.getCheckedKeys(), ...this.$refs.analysisMenuListTree.getHalfCheckedKeys() ] - this.dataForm.whistleDeptIdList = this.$refs.whistleDeptListTree.getCheckedKeys() this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/role', this.dataForm).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) @@ -298,15 +243,8 @@ export default { } } -// 添加树样式 - diff --git a/src/views/modules/sys/role.vue b/src/views/modules/sys/role.vue index 6cfc62e..b2fb680 100644 --- a/src/views/modules/sys/role.vue +++ b/src/views/modules/sys/role.vue @@ -4,19 +4,21 @@ + @keyup.enter.native="getDataListSearch()"> + clearable + @keyup.native="btKeyUpName" style="width:200px"> + clearable + @keyup.native="btKeyUpCompleteMatchName"> - {{ $t('query') }} + {{ $t('query') }} + + align="center" min-width=400 show-overflow-tooltip> + :formatter="showRoleTypeFormatter" width=180> + align="center" width=100 show-overflow-tooltip> ?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') + this.dataForm.name = e.target.value + }, + btKeyUpCompleteMatchName (e) { + e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') + this.dataForm.completeMatchName = e.target.value + }, getSysRoleTypeList () { this.$http.get(`/sys/dict/listSimple/sysRoleType`).then(({ data: res }) => { if (res.code !== 0) { diff --git a/src/views/modules/sys/user-add-or-update.vue b/src/views/modules/sys/user-add-or-update.vue index c71c168..60d9184 100644 --- a/src/views/modules/sys/user-add-or-update.vue +++ b/src/views/modules/sys/user-add-or-update.vue @@ -1,4 +1,5 @@ + + multiple filterable + placeholder="可输入进行模糊查询" popper-class='roleSelect'> {{ $t('confirm') }} +