后端查询列表接口实现

master
ynmlzdwsp 11 months ago
parent aa9a5dfaf1
commit b8b0c99db6

@ -33,11 +33,11 @@
</div> </div>
<div style="display: flex"> <div style="display: flex">
<input class="ais-SearchBox-input" type="text" <input class="ais-SearchBox-input" type="text"
v-model="articleSearch" v-model="queryParams.drug1"
placeholder="请输入药品A名称" maxlength="32"> placeholder="请输入药品A名称" maxlength="32">
<div style="width: 10px"></div> <div style="width: 10px"></div>
<input class="ais-SearchBox-input" type="text" <input class="ais-SearchBox-input" type="text"
v-model="articleSearch" v-model="queryParams.drug2"
placeholder="请输入药品B名称" maxlength="32"> placeholder="请输入药品B名称" maxlength="32">
<div class="ais-SearchBox-submit" @click="handleQuery()"> <div class="ais-SearchBox-submit" @click="handleQuery()">
<svg style="margin-top: 3.5px;margin-left: 18px" viewBox="0 0 1024 1024" width="20" height="20"> <svg style="margin-top: 3.5px;margin-left: 18px" viewBox="0 0 1024 1024" width="20" height="20">
@ -196,6 +196,8 @@
/** 查询药品作用管理列表 */ /** 查询药品作用管理列表 */
getList() { getList() {
this.loading = true; this.loading = true;
console.log("drug1:", this.queryParams.drug1);
console.log("drug2:", this.queryParams.drug2);
listTable1(this.queryParams).then(response => { listTable1(this.queryParams).then(response => {
this.table1List = response.rows; this.table1List = response.rows;
this.total = response.total; this.total = response.total;

@ -1,14 +1,13 @@
import request from '@/utils/request' import axios from 'axios';
// 查询药品作用管理列表
export function listTable1(query) { export function listTable1(query) {
return request({ const url = '/system/table1/list';
url: '/system/table1/list', return axios.get(url, { params: query })
method: 'get', .then(response => response.data)
params: query .catch(error => console.error(error));
})
} }
// 查询药品作用管理详细 // 查询药品作用管理详细
export function getTable1(id) { export function getTable1(id) {
return request({ return request({

Loading…
Cancel
Save