【fix ESLint】src/views/system
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
tree-node-filter-prop="title"
|
||||
v-model="queryParam.departId"
|
||||
:maxTagCount="1"
|
||||
show-search
|
||||
:show-search="true"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
@@ -138,7 +138,7 @@
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
@change="handleTableChange">
|
||||
|
||||
<template slot="avatarslot" slot-scope="text, record, index">
|
||||
<template slot="avatarslot" slot-scope="text, record/* , index */">
|
||||
<div class="anty-img-wrap">
|
||||
<a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>
|
||||
</div>
|
||||
@@ -155,11 +155,11 @@
|
||||
</a>
|
||||
<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>
|
||||
<a href="javascript:;" @click="handleChangePassword(record.username)">密码</a>
|
||||
<a href="javascript:" @click="handleChangePassword(record.username)">密码</a>
|
||||
</a-menu-item>
|
||||
|
||||
<a-menu-item>
|
||||
@@ -168,13 +168,13 @@
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
|
||||
<a-menu-item v-if="record.status==1">
|
||||
<a-menu-item v-if="(record.status + '')==='1'">
|
||||
<a-popconfirm title="确定冻结吗?" @confirm="() => handleFrozen(record.id,2,record.username)">
|
||||
<a>冻结</a>
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
|
||||
<a-menu-item v-if="record.status==2">
|
||||
<a-menu-item v-if="(record.status + '')==='2'">
|
||||
<a-popconfirm title="确定解冻吗?" @confirm="() => handleFrozen(record.id,1,record.username)">
|
||||
<a>解冻</a>
|
||||
</a-popconfirm>
|
||||
@@ -352,7 +352,7 @@ export default {
|
||||
const that = this
|
||||
let isAdmin = false
|
||||
that.selectionRows.forEach(function (row) {
|
||||
if (row.username == 'admin') {
|
||||
if (row.username === 'admin') {
|
||||
isAdmin = true
|
||||
}
|
||||
})
|
||||
@@ -365,7 +365,7 @@ export default {
|
||||
})
|
||||
that.$confirm({
|
||||
title: '确认操作',
|
||||
content: '是否' + (status == 1 ? '解冻' : '冻结') + '选中账号?',
|
||||
content: '是否' + ((status + '') === '1' ? '解冻' : '冻结') + '选中账号?',
|
||||
onOk: function () {
|
||||
frozenBatch({ ids: ids, status: status }).then((res) => {
|
||||
if (res.success) {
|
||||
@@ -381,17 +381,17 @@ export default {
|
||||
}
|
||||
},
|
||||
handleMenuClick (e) {
|
||||
if (e.key == 1) {
|
||||
if ((e.key + '') === '1') {
|
||||
this.batchDel()
|
||||
} else if (e.key == 2) {
|
||||
this.batchFrozen(2)
|
||||
} else if (e.key == 3) {
|
||||
this.batchFrozen(1)
|
||||
} else if ((e.key + '') === '2') {
|
||||
this.batchFrozen('2')
|
||||
} else if ((e.key + '') === '3') {
|
||||
this.batchFrozen('1')
|
||||
}
|
||||
},
|
||||
handleFrozen: function (id, status, username) {
|
||||
const that = this
|
||||
if (username == 'admin') {
|
||||
if (username === 'admin') {
|
||||
that.$message.warning('管理员账号不允许此操作!')
|
||||
return
|
||||
}
|
||||
@@ -424,22 +424,21 @@ export default {
|
||||
initRoleList () {
|
||||
queryall().then((res) => {
|
||||
if (res.success) {
|
||||
this.rolesList = res.result.map((item, index, arr) => {
|
||||
const c = { text: item.roleName, value: item.id }
|
||||
return c
|
||||
this.rolesList = res.result.map((item) => {
|
||||
return { text: item.roleName, value: item.id }
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 角色配置
|
||||
roleAssignment () {
|
||||
if (this.selectedRowKeys.length == 0) {
|
||||
if (this.selectedRowKeys.length === 0) {
|
||||
this.$message.warning('请选择至少一条数据')
|
||||
} else {
|
||||
this.$refs.roleAssignmentModal.show()
|
||||
}
|
||||
},
|
||||
rolevisibleMethods (val) {
|
||||
rolevisibleMethods () {
|
||||
this.selectedRowKeys = []
|
||||
}
|
||||
}
|
||||
@@ -447,5 +446,5 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less'
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user