mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2025-08-24 04:54:58 +08:00
查询修改
This commit is contained in:
parent
d7928198ad
commit
a3da995a88
|
@ -6,7 +6,7 @@
|
||||||
<el-input v-model="queryParams.userName" placeholder="请输入用户名"></el-input>
|
<el-input v-model="queryParams.userName" placeholder="请输入用户名"></el-input>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" icon="Search" @click="queryData(queryParams)">查询</el-button>
|
<el-button type="primary" icon="Search" @click="queryData(queryParams)">查询</el-button>
|
||||||
<el-button icon="Refresh" @click="queryParams = {}">重置</el-button>
|
<el-button icon="Refresh" @click="queryData()">重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-part" style="justify-content: space-between;">
|
<div class="button-part" style="justify-content: space-between;">
|
||||||
<div>
|
<div>
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
<el-button icon="FirstAidKit" @click="importData">导入</el-button>
|
<el-button icon="FirstAidKit" @click="importData">导入</el-button>
|
||||||
<el-button icon="Delete" @click="removeData()">删除</el-button>
|
<el-button icon="Delete" @click="removeData()">删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
<TableAbility @searchBtn="isSearch = !isSearch" @refreshBtn="queryData({})"
|
<TableAbility @searchBtn="isSearch = !isSearch" @refreshBtn="queryData()"
|
||||||
@downloadBtn="exportData('医生数据', tableData)"></TableAbility>
|
@downloadBtn="exportData('医生数据', tableData)"></TableAbility>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-part">
|
<div class="table-part">
|
||||||
|
@ -77,24 +77,31 @@ const queryParams = ref({
|
||||||
} as any)
|
} as any)
|
||||||
const tableData = ref([] as any)
|
const tableData = ref([] as any)
|
||||||
|
|
||||||
queryData({ userName: '测试' })
|
queryData()
|
||||||
|
|
||||||
function queryData(e: any) {
|
function queryData(e?: any) {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
tableData.value = []
|
if(e?.userName) {
|
||||||
setTimeout(() => {
|
tableData.value = tableData.value.filter((item: any) => item.name.indexOf(e.userName) !== -1)
|
||||||
while (tableData.value.length < 10) {
|
|
||||||
tableData.value.push({
|
|
||||||
id: tableData.value.length + 1,
|
|
||||||
userName: 'cscs',
|
|
||||||
name: e.userName || '测试',
|
|
||||||
phone: '12312345678',
|
|
||||||
role: '高级管理员',
|
|
||||||
enable: true,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
loading.value = false
|
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 = () => {
|
const addData = () => {
|
||||||
isFormDialog.value = true
|
isFormDialog.value = true
|
||||||
|
|
Loading…
Reference in New Issue
Block a user