diff --git a/src/views/permissions-manage/doctor-manage.vue b/src/views/permissions-manage/doctor-manage.vue index e37f24a..4d00492 100644 --- a/src/views/permissions-manage/doctor-manage.vue +++ b/src/views/permissions-manage/doctor-manage.vue @@ -6,7 +6,7 @@ 查询 - 重置 + 重置
@@ -14,7 +14,7 @@ 导入 删除
-
@@ -77,24 +77,31 @@ const queryParams = ref({ } as any) const tableData = ref([] as any) -queryData({ userName: '测试' }) +queryData() -function queryData(e: any) { +function queryData(e?: any) { loading.value = true - tableData.value = [] - setTimeout(() => { - while (tableData.value.length < 10) { - tableData.value.push({ - id: tableData.value.length + 1, - userName: 'cscs', - name: e.userName || '测试', - phone: '12312345678', - role: '高级管理员', - enable: true, - }) - } + if(e?.userName) { + tableData.value = tableData.value.filter((item: any) => item.name.indexOf(e.userName) !== -1) loading.value = false - }, 200); + return + }else{ + queryParams.value = {} + tableData.value = [] + setTimeout(() => { + while (tableData.value.length < 10) { + tableData.value.push({ + id: tableData.value.length + 1, + userName: 'cscs', + name: '测试' + tableData.value.length, + phone: '12312345678', + role: '高级管理员', + enable: true, + }) + } + loading.value = false + }, 200); + } } const addData = () => { isFormDialog.value = true