账号页面优化
This commit is contained in:
parent
515e467d5e
commit
ee8c372e9b
@ -90,17 +90,40 @@
|
||||
>启用</a-tag>
|
||||
</template>
|
||||
<template v-if="column.key === 'action'">
|
||||
<a-space>
|
||||
<a @click="handleAdd('编辑账号',record)">编辑</a>
|
||||
<a-button
|
||||
type="link"
|
||||
size="small"
|
||||
@click="handleAdd('编辑账号',record)"
|
||||
>编辑</a-button>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm
|
||||
v-if="record.state == '1'"
|
||||
title="请确认您是否要禁用该账号"
|
||||
ok-text="确定"
|
||||
cancel-text="取消"
|
||||
placement="top"
|
||||
@confirm="handleDisable(record)"
|
||||
:disabled="record.staffId == staff.staffId"
|
||||
@confirm="handleDisable(record,'0')"
|
||||
>
|
||||
<a href="#">禁用</a>
|
||||
<a-button
|
||||
type="link"
|
||||
size="small"
|
||||
:disabled="record.staffId == staff.staffId"
|
||||
>禁用</a-button>
|
||||
</a-popconfirm>
|
||||
<a-popconfirm
|
||||
v-if="record.state == '0'"
|
||||
title="请确认您是否要启用该账号"
|
||||
ok-text="确定"
|
||||
cancel-text="取消"
|
||||
placement="top"
|
||||
:disabled="record.staffId == staff.staffId"
|
||||
@confirm="handleDisable(record,'1')"
|
||||
>
|
||||
<a-button
|
||||
type="link"
|
||||
size="small"
|
||||
>启用</a-button>
|
||||
</a-popconfirm>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm
|
||||
@ -108,11 +131,15 @@
|
||||
ok-text="确定"
|
||||
cancel-text="取消"
|
||||
placement="top"
|
||||
:disabled="record.staffId == staff.staffId"
|
||||
@confirm="handleDel(record)"
|
||||
>
|
||||
<a href="#">删除</a>
|
||||
<a-button
|
||||
type="link"
|
||||
size="small"
|
||||
:disabled="record.staffId == staff.staffId"
|
||||
>删除</a-button>
|
||||
</a-popconfirm>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
@ -138,10 +165,12 @@ import { callUser } from '@/apis/call.js'
|
||||
import config from '@/utils/config.js'
|
||||
import { getGUID } from '@/utils/tools'
|
||||
import AccountManage from '@/views/form/accountmanage/AccountManage.vue';
|
||||
import { getCache } from '@/utils/authority';
|
||||
const open = ref(false);
|
||||
const openTitle = ref('');
|
||||
const modalKey = ref(getGUID())
|
||||
const formModel = ref(null);
|
||||
const staff = getCache("ebike-userinfo")
|
||||
|
||||
const columns = [
|
||||
{
|
||||
@ -287,8 +316,8 @@ const handleOkModal = () => {
|
||||
});
|
||||
}
|
||||
|
||||
const handleDisable = (record) => {
|
||||
callUser("/staff/staffInfoDisable/" + record['staffId'], {}, "get").then((res) => {
|
||||
const handleDisable = (record, state) => {
|
||||
callUser("/staff/staffInfoDisable/" + record['staffId'] + "/" + state, {}, "get").then((res) => {
|
||||
if (res.code != 200) {
|
||||
message.error(res.message)
|
||||
dataSource.value = []
|
||||
|
||||
@ -145,6 +145,9 @@ const openForm = (params = {}) => {
|
||||
return { label: item['zoneName'], value: item['zoneId'] }
|
||||
})
|
||||
options.value = data;
|
||||
if (params['staffId']) {
|
||||
changeZoneId(params['zoneId'])
|
||||
}
|
||||
});
|
||||
callUser("/roles/listByOrgId", {}, "get").then((res) => {
|
||||
if (res.code != 200) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user