From a3da995a882101dc2a8273ba56d520356f3f702c Mon Sep 17 00:00:00 2001
From: gaofy <1014893517@qq.com>
Date: Thu, 28 Dec 2023 14:48:45 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../permissions-manage/doctor-manage.vue | 41 +++++++++++--------
1 file changed, 24 insertions(+), 17 deletions(-)
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 @@
查询
- 重置
+ 重置
@@ -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