|
|
@@ -2,6 +2,10 @@
|
|
|
<view class='purchase-list'>
|
|
|
<my-tabs @change="tapChange" :modelData="modelData" :initIndex="initIndex"></my-tabs>
|
|
|
<scroll-view class="purchase-body" scroll-y="true" @scrolltolower="scrolltolower" @scrolltoupper="scrolltoupper" @scroll="scroll" @touchstart="touchstart" @touchend="touchend">
|
|
|
+ <view class="searchBox">
|
|
|
+ <uni-search-bar placeholder="请输入搜索内容" @confirm="search" @blur="blur" @cancel="cancel" @clear="clear">
|
|
|
+ </uni-search-bar>
|
|
|
+ </view>
|
|
|
<my-unit v-for="(item,index) in listData" :key="index" :info="item" :initIndex="initIndex" @faClick="handdle"></my-unit>
|
|
|
</scroll-view>
|
|
|
<!-- 底部弹窗 -->
|
|
|
@@ -28,6 +32,7 @@
|
|
|
components:{myTabs,myUnit},
|
|
|
data() {
|
|
|
return {
|
|
|
+ name:'',
|
|
|
businessKey:'',
|
|
|
initIndex:0,
|
|
|
pageNo: 1,
|
|
|
@@ -40,6 +45,26 @@
|
|
|
this.refresh();
|
|
|
},
|
|
|
methods: {
|
|
|
+ search(res) {
|
|
|
+ this.name = res.value;
|
|
|
+ this.page = 1;
|
|
|
+ this.getList(this.page,this.__pulldone)
|
|
|
+ },
|
|
|
+ clear(res) {
|
|
|
+ this.name = '';
|
|
|
+ this.page = 1;
|
|
|
+ this.getList(this.page,this.__pulldone)
|
|
|
+ },
|
|
|
+ blur(res) {
|
|
|
+ this.name = res.value;
|
|
|
+ this.page = 1;
|
|
|
+ this.getList(this.page,this.__pulldone)
|
|
|
+ },
|
|
|
+ cancel(res) {
|
|
|
+ this.name = '';
|
|
|
+ this.page = 1;
|
|
|
+ this.getList(this.page,this.__pulldone)
|
|
|
+ },
|
|
|
handdle(row) {
|
|
|
this.businessKey = row.businessKey;
|
|
|
//将业务表单,注册为动态组件
|
|
|
@@ -61,7 +86,7 @@
|
|
|
getList(page,done){
|
|
|
console.log(`获取第${page}页数据`);
|
|
|
if(this.initIndex==0){
|
|
|
- getTodoTaskPage({pageNo:page,pageSize: this.pageSize}).then(response => {
|
|
|
+ getTodoTaskPage({pageNo:page,pageSize: this.pageSize,name:this.name}).then(response => {
|
|
|
let dataList = response.data.list;
|
|
|
let list = []
|
|
|
dataList.forEach(v => {
|
|
|
@@ -78,7 +103,7 @@
|
|
|
});
|
|
|
}
|
|
|
if(this.initIndex==1){
|
|
|
- getDoneTaskPage({pageNo:page,pageSize: this.pageSize}).then(response => {
|
|
|
+ getDoneTaskPage({pageNo:page,pageSize: this.pageSize,name:this.name}).then(response => {
|
|
|
let dataList = response.data.list;
|
|
|
let list = []
|
|
|
dataList.forEach(v => {
|
|
|
@@ -95,7 +120,7 @@
|
|
|
});
|
|
|
}
|
|
|
if(this.initIndex==2){
|
|
|
- getMyProcessInstancePage({pageNo:page,pageSize: this.pageSize}).then(response => {
|
|
|
+ getMyProcessInstancePage({pageNo:page,pageSize: this.pageSize,name:this.name}).then(response => {
|
|
|
let dataList = response.data.list;
|
|
|
let list = []
|
|
|
dataList.forEach(v => {
|
|
|
@@ -148,6 +173,13 @@
|
|
|
}
|
|
|
</script>
|
|
|
<style lang='scss' scoped>
|
|
|
+ .searchBox{
|
|
|
+ background-color: #fff;
|
|
|
+ position: -webkit-sticky; /* Safari */
|
|
|
+ position: sticky;
|
|
|
+ top: 0; /* 设置元素距离顶部的位置 */
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
.popup-body{
|
|
|
z-index: 99;
|
|
|
}
|