Commit 7bdd091c authored by WangRui's avatar WangRui

[feature]接口调整--项目查询列表根据用户输入进行查询

parent 5f88d622
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<NavBar title="项目查询" left-arrow @click-left="goBack" /> <NavBar title="项目查询" left-arrow @click-left="goBack" />
<section class="list"> <section class="list">
<Search v-model="value" placeholder="请输入项目编号/机型/代理店" /> <Search v-model="value" placeholder="请输入项目编号/机型/代理店" @search="onSearch"/>
<Notice detail="只对已关联的项目进行查询" /> <Notice detail="只对已关联的项目进行查询" />
<PullRefresh v-model="refreshing" @refresh="getList" class="scroll"> <PullRefresh v-model="refreshing" @refresh="getList" class="scroll">
<List :finished="finished" finished-text="没有更多了" @load="loadApproval"> <List :finished="finished" finished-text="没有更多了" @load="loadApproval">
...@@ -38,13 +38,19 @@ const formStore = useProjectList() ...@@ -38,13 +38,19 @@ const formStore = useProjectList()
let refreshing = $ref(true); let refreshing = $ref(true);
const finished = $ref(true); const finished = $ref(true);
const value = $ref('');
let listValue = $ref([]); let listValue = $ref([]);
const onSearch = (value) => {
const param = {
query: value
}
getList(param)
}
const getList = async () => { const getList = async (param) => {
// 下拉重置参数,重新加载 // 下拉重置参数,重新加载
let res = await api.getProjectList({userId: window.localStorage.getItem('userId')}); let res = await api.getProjectList({userId: window.localStorage.getItem('userId'), ...param});
let list = [] let list = []
if(res.success){ if(res.success){
list = res.rows.map(item => ({ list = res.rows.map(item => ({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment