From 9e05297813d609bfec666cce51b64f2a701c75b0 Mon Sep 17 00:00:00 2001 From: danshihao Date: Tue, 7 Mar 2023 14:23:25 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90fix=20ESLint=E3=80=91src/views/system/?= =?UTF-8?q?modules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/system/SysDataSourceList.vue | 6 +- .../system/modules/DataLogCompareModal.vue | 14 ++-- .../src/views/system/modules/DataLogModal.vue | 4 +- .../views/system/modules/DepartAuthModal.vue | 2 +- .../system/modules/DepartDataruleModal.vue | 2 +- .../src/views/system/modules/DepartModal.vue | 9 +-- .../src/views/system/modules/DepartWindow.vue | 2 +- .../src/views/system/modules/DeptBaseInfo.vue | 2 +- .../src/views/system/modules/DeptUserInfo.vue | 22 +++--- .../views/system/modules/DictItemModal.vue | 7 +- .../src/views/system/modules/DictModal.vue | 10 +-- .../system/modules/GateWayRouteModal.vue | 23 +++---- .../views/system/modules/PasswordModal.vue | 6 +- .../modules/PermissionDataRuleModal.vue | 10 +-- .../views/system/modules/PermissionModal.vue | 24 ++++--- .../views/system/modules/QuartzJobModal.vue | 6 +- .../views/system/modules/RoleAssignment.vue | 6 +- .../system/modules/RoleDataruleModal.vue | 2 +- .../src/views/system/modules/RoleModal.vue | 7 +- .../system/modules/SelectUserListModal.vue | 16 ++--- .../views/system/modules/SelectUserModal.vue | 12 ++-- .../system/modules/SysAnnouncementModal.vue | 24 ++++--- .../views/system/modules/SysCategoryModal.vue | 8 +-- .../system/modules/SysCheckRuleModal.vue | 12 +++- .../system/modules/SysCheckRuleTestModal.vue | 2 +- .../system/modules/SysDataSourceModal.vue | 5 +- .../views/system/modules/SysFillRuleModal.vue | 5 +- .../views/system/modules/SysPositionModal.vue | 10 +-- .../system/modules/SysUserAgentModal.vue | 4 +- .../src/views/system/modules/TenantForm.vue | 19 ++--- .../src/views/system/modules/UserModal.vue | 69 +++++++++---------- .../system/modules/UserRecycleBinModal.vue | 6 +- .../views/system/modules/UserRoleModal.vue | 6 +- 33 files changed, 179 insertions(+), 183 deletions(-) diff --git a/jero-web/src/views/system/SysDataSourceList.vue b/jero-web/src/views/system/SysDataSourceList.vue index fad45fb9..7a03823f 100644 --- a/jero-web/src/views/system/SysDataSourceList.vue +++ b/jero-web/src/views/system/SysDataSourceList.vue @@ -107,7 +107,11 @@ import SysDataSourceModal from './modules/SysDataSourceModal' export default { name: 'SysDataSourceList', mixins: [JeroListMixin], - components: { JEllipsis, SysDataSourceModal }, + components: { + // eslint-disable-next-line vue/no-unused-components + JEllipsis, + SysDataSourceModal + }, data () { const ellipsis = (v, l = 20) => () return { diff --git a/jero-web/src/views/system/modules/DataLogCompareModal.vue b/jero-web/src/views/system/modules/DataLogCompareModal.vue index c77dc234..31504522 100644 --- a/jero-web/src/views/system/modules/DataLogCompareModal.vue +++ b/jero-web/src/views/system/modules/DataLogCompareModal.vue @@ -22,7 +22,7 @@ 版本:{{dataVersion2Num}} @@ -95,9 +95,9 @@ export default { that.dataVersion2Num = res.result[1].dataVersion const json1 = JSON.parse(res.result[0].dataContent) const json2 = JSON.parse(res.result[1].dataContent) - for (var item1 in json1) { - for (var item2 in json2) { - if (item1 == item2) { + for (const item1 in json1) { + for (const item2 in json2) { + if (item1 === item2) { this.dataSource.push({ code: item1, imgshow: '', @@ -130,12 +130,12 @@ export default { const className = 'trcolor' const dataVersion1 = record.dataVersion1 const dataVersion2 = record.dataVersion2 - if (dataVersion1 != dataVersion2) { + if (dataVersion1 !== dataVersion2) { return className } }, getAvatarView: function (avatar) { - if (avatar.dataVersion1 != avatar.dataVersion2) { + if (avatar.dataVersion1 !== avatar.dataVersion2) { return '/goright.png' } else { return '' @@ -145,7 +145,7 @@ export default { } - diff --git a/jero-web/src/views/system/modules/DeptUserInfo.vue b/jero-web/src/views/system/modules/DeptUserInfo.vue index 8e2f2872..8b9bfe04 100644 --- a/jero-web/src/views/system/modules/DeptUserInfo.vue +++ b/jero-web/src/views/system/modules/DeptUserInfo.vue @@ -20,7 +20,7 @@ -
+
添加已有用户 新建用户 @@ -70,7 +70,7 @@ - 用户详情 + 用户详情 @@ -191,11 +191,11 @@ export default { if (this.selectedRowKeys.length <= 0) { this.$message.warning('请选择一条记录!') } else { - var ids = '' - for (var a = 0; a < this.selectedRowKeys.length; a++) { + let ids = '' + for (let a = 0; a < this.selectedRowKeys.length; a++) { ids += this.selectedRowKeys[a] + ',' } - var that = this + const that = this console.log(this.currentDeptId) this.$confirm({ title: '确认取消', @@ -224,13 +224,13 @@ export default { return } - var that = this + const that = this deleteAction(that.url.delete, { depId: this.currentDeptId, userId: id }).then((res) => { if (res.success) { that.$message.success('删除用户与选中部门关系成功!') if (this.selectedRowKeys.length > 0) { for (let i = 0; i < this.selectedRowKeys.length; i++) { - if (this.selectedRowKeys[i] == id) { + if (this.selectedRowKeys[i] === id) { this.selectedRowKeys.splice(i, 1) break } @@ -252,14 +252,14 @@ export default { this.dataSource = [] }, hasSelectDept () { - if (this.currentDeptId == '') { + if (!this.currentDeptId) { this.$message.error('请选择一个部门!') return false } return true }, handleAddUserDepart () { - if (this.currentDeptId == '') { + if (!this.currentDeptId) { this.$message.error('请选择一个部门!') } else { this.$refs.selectUserModal.visible = true @@ -272,7 +272,7 @@ export default { this.$refs.modalForm.edit(record) }, handleAdd: function () { - if (this.currentDeptId == '') { + if (!this.currentDeptId) { this.$message.error('请选择一个部门!') } else { this.$refs.modalForm.departDisabled = true @@ -286,7 +286,7 @@ export default { const params = {} params.depId = this.currentDeptId params.userIdList = [] - for (var a = 0; a < data.length; a++) { + for (let a = 0; a < data.length; a++) { params.userIdList.push(data[a]) } console.log(params) diff --git a/jero-web/src/views/system/modules/DictItemModal.vue b/jero-web/src/views/system/modules/DictItemModal.vue index 1fcf3cf8..f2f5d834 100644 --- a/jero-web/src/views/system/modules/DictItemModal.vue +++ b/jero-web/src/views/system/modules/DictItemModal.vue @@ -46,7 +46,7 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" label="是否启用" - hasFeedback> + :hasFeedback="true"> @@ -56,7 +56,7 @@