【fix ESLint】src/views/system/modules

This commit is contained in:
danshihao
2023-03-07 14:23:25 +08:00
parent 0e41300963
commit 9e05297813
33 changed files with 179 additions and 183 deletions
@@ -20,7 +20,7 @@
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" :md="24" :sm="24" style="margin-top: -15px">
<div class="table-operator" style="margin-top: -15px">
<!--<a-button @click="handleEdit" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
<a-button @click="handleAddUserDepart" type="primary" icon="plus">添加已有用户</a-button>
<a-button @click="handleAdd" type="primary" icon="plus" style="margin-top: 16px">新建用户</a-button>
@@ -70,7 +70,7 @@
<a-menu slot="overlay">
<a-menu-item>
<a href="javascript:;" @click="handleDetail(record)">用户详情</a>
<a href="javascript:" @click="handleDetail(record)">用户详情</a>
</a-menu-item>
<a-menu-item>
@@ -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)