fix: 角色管理调整

This commit is contained in:
TsMask
2023-09-05 17:11:45 +08:00
parent 1ab5c4f3c6
commit 520d1ffcf9
4 changed files with 51 additions and 61 deletions

View File

@@ -87,24 +87,14 @@ let tableState: TabeStateType = reactive({
let tableColumns: ColumnsType = [
{
title: '用户编号',
dataIndex: 'userId',
dataIndex: 'id',
align: 'center',
},
{
title: '登录账号',
dataIndex: 'userName',
dataIndex: 'accountId',
align: 'center',
},
{
title: '用户昵称',
dataIndex: 'nickName',
align: 'center',
},
{
title: '手机号码',
dataIndex: 'phonenumber',
align: 'center',
},
},
{
title: '用户状态',
dataIndex: 'status',
@@ -116,8 +106,8 @@ let tableColumns: ColumnsType = [
dataIndex: 'createTime',
align: 'center',
customRender(opt) {
if (+opt.value <= 0) return '';
return parseDateToStr(+opt.value);
if (!opt.value) return '';
return parseDateToStr(opt.value);
},
},
];
@@ -160,7 +150,7 @@ function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
authUserAllocatedList(toRaw(queryParams)).then(res => {
if (res.code === 200 && Array.isArray(res.rows)) {
if (res.code === 1 && Array.isArray(res.rows)) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
@@ -233,7 +223,7 @@ watch(
></a-input>
</a-form-item>
</a-col>
<a-col :lg="8" :md="12" :xs="24">
<!-- <a-col :lg="8" :md="12" :xs="24">
<a-form-item label="手机号码" name="phonenumber">
<a-input
v-model:value="queryParams.phonenumber"
@@ -242,7 +232,7 @@ watch(
placeholder="请输入手机号码"
></a-input>
</a-form-item>
</a-col>
</a-col> -->
<a-col :lg="8" :md="12" :xs="24">
<a-form-item label="用户状态" name="status">
<a-select
@@ -273,7 +263,7 @@ watch(
<a-table
class="table"
row-key="userId"
row-key="id"
:columns="tableColumns"
:loading="tableState.loading"
:data-source="tableState.data"
@@ -285,11 +275,11 @@ watch(
onChange: fnTableSelectedRowKeys,
}"
>
<template #bodyCell="{ column, record }">
<!-- <template #bodyCell="{ column, record }">
<template v-if="column.key === 'status'">
<DictTag :options="dict.sysNormalDisable" :value="record.status" />
</template>
</template>
</template> -->
</a-table>
</a-modal>
</template>