|
@@ -5,8 +5,8 @@ import UserPreview from '@/components/UserPreview.vue';
|
|
|
import UserQRCode from '@/components/UserQRCode.vue';
|
|
import UserQRCode from '@/components/UserQRCode.vue';
|
|
|
import { type UserModel, type UserQuery } from '@/model/system.model';
|
|
import { type UserModel, type UserQuery } from '@/model/system.model';
|
|
|
|
|
|
|
|
-import { branchMethod, deleteUserMethod, userMethod, usersMethod } from '@/request/api/system.api';
|
|
|
|
|
-import { usePagination, useRequest } from 'alova/client';
|
|
|
|
|
|
|
+import { branchMethod, deleteUserMethod, usersMethod } from '@/request/api/system.api';
|
|
|
|
|
+import { usePagination, useRequest } from 'alova/client';
|
|
|
import { notification } from 'ant-design-vue';
|
|
import { notification } from 'ant-design-vue';
|
|
|
|
|
|
|
|
import {
|
|
import {
|
|
@@ -82,26 +82,33 @@ const gridOptions = reactive<VxeGridProps<UserModel>>({
|
|
|
},
|
|
},
|
|
|
columns: [
|
|
columns: [
|
|
|
{ type: 'seq', width: 70, fixed: 'left' },
|
|
{ type: 'seq', width: 70, fixed: 'left' },
|
|
|
- { field: 'userName', title: '系统账号', minWidth: 160 },
|
|
|
|
|
- { field: 'nickName', title: '姓名', minWidth: 160 },
|
|
|
|
|
- { field: 'dept.deptName', title: '医院 / 科室', minWidth: 160 },
|
|
|
|
|
- { field: 'jobnumber', title: '工号', minWidth: 160 },
|
|
|
|
|
- { field: 'phonenumber', title: '手机号码', minWidth: 160 },
|
|
|
|
|
|
|
+ { field: 'userName', title: '系统账号' },
|
|
|
|
|
+ { field: 'nickName', title: '姓名' },
|
|
|
{
|
|
{
|
|
|
- field: 'roles', title: '角色', minWidth: 160,
|
|
|
|
|
|
|
+ field: 'dept', title: '医院 / 科室',
|
|
|
|
|
+ formatter: ({ cellValue, row }) => [
|
|
|
|
|
+ row.dept?.ancestors,
|
|
|
|
|
+ row.dept?.deptName !== row.dept?.ancestors ? row.dept?.deptName : '',
|
|
|
|
|
+ ].filter(Boolean).join(' / '),
|
|
|
|
|
+ },
|
|
|
|
|
+ { field: 'jobnumber', title: '工号' },
|
|
|
|
|
+ { field: 'phonenumber', title: '手机号码' },
|
|
|
|
|
+ {
|
|
|
|
|
+ field: 'roles', title: '角色',
|
|
|
formatter: ({ cellValue, row }) => row.roles?.map?.(t => t.roleName)?.join(', ') ?? '',
|
|
formatter: ({ cellValue, row }) => row.roles?.map?.(t => t.roleName)?.join(', ') ?? '',
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '操作',
|
|
title: '操作',
|
|
|
- width: 200,
|
|
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ width: 180,
|
|
|
cellRender: {
|
|
cellRender: {
|
|
|
name: 'VxeButtonGroup',
|
|
name: 'VxeButtonGroup',
|
|
|
props: {
|
|
props: {
|
|
|
mode: 'text',
|
|
mode: 'text',
|
|
|
},
|
|
},
|
|
|
options: [
|
|
options: [
|
|
|
- { content: '小程序码', name: 'QRCode' },
|
|
|
|
|
- { content: '修改', name: 'editUser' },
|
|
|
|
|
|
|
+ { content: '小程序码', status: 'primary', name: 'QRCode' },
|
|
|
|
|
+ { content: '修改', status: 'warning', name: 'editUser' },
|
|
|
{ content: '删除', status: 'error', name: 'deleteUser' },
|
|
{ content: '删除', status: 'error', name: 'deleteUser' },
|
|
|
],
|
|
],
|
|
|
events: {
|
|
events: {
|
|
@@ -232,9 +239,9 @@ function updateUserPassword(model: UserModel, index?: number) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function QRCode(model: UserModel) {
|
|
function QRCode(model: UserModel) {
|
|
|
- const { userName } = model;
|
|
|
|
|
|
|
+ const { nickName } = model;
|
|
|
VxeUI.modal.open({
|
|
VxeUI.modal.open({
|
|
|
- title: `${ userName } 专属小程序码`,
|
|
|
|
|
|
|
+ title: `${ nickName } 专属小程序码`,
|
|
|
escClosable: true,
|
|
escClosable: true,
|
|
|
destroyOnClose: true,
|
|
destroyOnClose: true,
|
|
|
id: `user-preview-qr-code`,
|
|
id: `user-preview-qr-code`,
|