用户管理调整

This commit is contained in:
dong 2023-07-31 17:51:59 +08:00
parent 9511d7807c
commit c28a721940

View File

@ -16,14 +16,12 @@
@request="onRequest" @request="onRequest"
> >
<template v-slot:top-right> <template v-slot:top-right>
<q-card-section> <q-input
<q-select dense
dense debounce="1000"
debounce="1000" v-model="filter.name"
v-model="filter.roleId" label="名称"
:options="optionsSearch" ></q-input>
></q-select>
</q-card-section>
<q-btn flat round color="primary" icon="search" /> <q-btn flat round color="primary" icon="search" />
</template> </template>
@ -123,7 +121,7 @@ const operateDisabled = ref(false);
const tableRef = ref(); const tableRef = ref();
const rows = reactive([]); const rows = reactive([]);
const filter = reactive({ const filter = reactive({
roleId: '选择角色', name: '',
}); });
const loading = ref(false); const loading = ref(false);
const pagination = ref({ const pagination = ref({
@ -141,7 +139,7 @@ async function onRequest(props: any) {
loading.value = true; loading.value = true;
try { try {
let response = await pageQuery({ let response = await pageQuery({
roleId: (userRoleSearch as any)[filter.roleId], name: filter.name,
current: page, current: page,
size: rowsPerPage, size: rowsPerPage,
}); });
@ -165,7 +163,6 @@ const userRole = ref('');
const userId = ref(0); const userId = ref(0);
const options = ['管理员', '调度员', '管理员/调度员']; const options = ['管理员', '调度员', '管理员/调度员'];
const optionsSearch = ['所有角色', '管理员', '调度员'];
const userRoleAll = { const userRoleAll = {
管理员: [7], 管理员: [7],
@ -173,11 +170,6 @@ const userRoleAll = {
'管理员/调度员': [7, 8], '管理员/调度员': [7, 8],
}; };
enum userRoleSearch {
'管理员' = 7,
'调度员' = 8,
}
// //
function edieUserData(row: any) { function edieUserData(row: any) {
userName.value = row.name; userName.value = row.name;