|
@@ -14,6 +14,34 @@
|
|
|
</van-swipe-cell>
|
|
|
</van-list>
|
|
|
</van-pull-refresh> -->
|
|
|
+ <van-sticky offset-top="1.22667rem">
|
|
|
+ <van-cell>
|
|
|
+ <van-search
|
|
|
+ style="height:35px"
|
|
|
+ v-model="popoverValue"
|
|
|
+ show-action
|
|
|
+ :placeholder="'请输入' + (popoverType == '1' ? '项目名称' : '项目编号') + '关键词'"
|
|
|
+ @search="popoverSearch"
|
|
|
+ >
|
|
|
+ <template slot="left">
|
|
|
+ <van-popover
|
|
|
+ v-model="popoverShow"
|
|
|
+ trigger="click"
|
|
|
+ :actions="popoverActions"
|
|
|
+ @select="popoverSelect"
|
|
|
+ placement="bottom-start"
|
|
|
+ >
|
|
|
+ <template slot="reference">
|
|
|
+ <span>{{popoverType == '1' ? '项目名称' : '项目编号'}}<van-icon name="arrow-down" size="10" style="margin-left:2px;" /></span>
|
|
|
+ </template>
|
|
|
+ </van-popover>
|
|
|
+ </template>
|
|
|
+ <template slot="action">
|
|
|
+ <div @click="popoverSearch">搜索</div>
|
|
|
+ </template>
|
|
|
+ </van-search>
|
|
|
+ </van-cell>
|
|
|
+ </van-sticky>
|
|
|
<van-pull-refresh v-model="isDownLoading" @refresh="onDownRefresh">
|
|
|
<van-list v-model="isUpLoading" :finished="upFinished" :immediate-check="false" :offset="100" finished-text="没有更多了" @load="onLoadList">
|
|
|
<van-swipe-cell v-for="(item,index) in list" :key="index">
|
|
@@ -39,11 +67,11 @@
|
|
|
placeholder="请选择" @click="clikls()"/>
|
|
|
</van-form>
|
|
|
</van-dialog>
|
|
|
- <van-popup v-model="showPickerUser" position="bottom">
|
|
|
+ <van-popup v-model="showPickerUser" position="bottom" ref="usersPopup">
|
|
|
<van-search v-model="userName" placeholder="输入员工姓名搜索" @search="onSearch"></van-search>
|
|
|
<div style="minHeight:300px;">
|
|
|
<van-checkbox class="userCheckbox" v-for="(item) in userList" :key="item.id" v-model="item.isChecked" >{{item.name}}</van-checkbox>
|
|
|
- <van-button style="width:100%;" @click="refreshParticipate();showPickerUser=false">确定</van-button>
|
|
|
+ <van-button style="width:100%;position: -webkit-sticky;position: sticky;bottom: 0;" @click="refreshParticipate();showPickerUser=false">确定</van-button>
|
|
|
</div>
|
|
|
</van-popup>
|
|
|
<van-popup v-model="showPickerIncharger" position="bottom">
|
|
@@ -97,11 +125,35 @@
|
|
|
pageSize: 25, // 每页条数
|
|
|
pageIndex: 1, // 页码
|
|
|
dpp: false,
|
|
|
+
|
|
|
+ popoverValue: '',
|
|
|
+ popoverShow: false,
|
|
|
+ popoverType: '1',
|
|
|
+ popoverActions: [{text: '项目名称',type: '1'},{text: '项目编号',type: '2'}],
|
|
|
+ projectVue: null,
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
},
|
|
|
methods: {
|
|
|
+ popoverSelect(action){
|
|
|
+ if(this.popoverType == action.type){
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ this.popoverType = action.type
|
|
|
+ this.popoverValue = ''
|
|
|
+ // this.isDownLoading = true
|
|
|
+ this.list = []
|
|
|
+ this.isUpLoading = true
|
|
|
+ this.onDownRefresh()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ popoverSearch(){
|
|
|
+ // this.isDownLoading = true
|
|
|
+ this.list = []
|
|
|
+ this.isUpLoading = true
|
|
|
+ this.onDownRefresh()
|
|
|
+ },
|
|
|
fuxuan() {
|
|
|
console.log(this.ause)
|
|
|
},
|
|
@@ -220,40 +272,15 @@
|
|
|
|
|
|
// 获取项目
|
|
|
getProject() {
|
|
|
- // if (this.refreshing) {
|
|
|
- // this.list = [];
|
|
|
- // this.refreshing = false;
|
|
|
- // }
|
|
|
- // if(this.total == this.list.length && this.list.length != 0) {
|
|
|
- // this.loading = false;
|
|
|
- // this.finished = true;
|
|
|
- // return false;
|
|
|
- // }
|
|
|
- // this.$axios.post("/project/getProjectPage", {
|
|
|
- // pageIndex: this.page,
|
|
|
- // pageSize: this.size,
|
|
|
- // })
|
|
|
- // .then(res => {
|
|
|
- // if(res.code == "ok") {
|
|
|
- // this.loading = false;
|
|
|
- // if (this.list.length == 0) {
|
|
|
- // this.finished = true;
|
|
|
- // }
|
|
|
- // this.list = [];
|
|
|
- // for(var i in res.data.records) {
|
|
|
- // this.list.push(res.data.records[i])
|
|
|
- // }
|
|
|
- // this.total = res.data.total;
|
|
|
- // this.page++;
|
|
|
- // } else {
|
|
|
- // this.$toast.fail('获取失败:'+res.msg);
|
|
|
- // }
|
|
|
- // }).catch(err=> {toast.clear();});
|
|
|
-
|
|
|
- this.$axios.post("/project/getProjectPage", {
|
|
|
- pageIndex: this.pageIndex,
|
|
|
- pageSize: this.pageSize,
|
|
|
- })
|
|
|
+ let parameter = {
|
|
|
+ pageIndex: this.pageIndex,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ }
|
|
|
+ if(this.popoverValue){
|
|
|
+ parameter.keyword = this.popoverValue
|
|
|
+ parameter.searchField = this.popoverType
|
|
|
+ }
|
|
|
+ this.$axios.post("/project/getProjectPage", parameter)
|
|
|
.then(res => {
|
|
|
if(res.code == "ok") {
|
|
|
this.isDownLoading = false
|
|
@@ -266,7 +293,7 @@
|
|
|
this.$toast('已全部加载完成');
|
|
|
return
|
|
|
} else {
|
|
|
- console.log(this.dpp)
|
|
|
+ // console.log(this.dpp)
|
|
|
if(this.dpp) this.list = []
|
|
|
if(this.list.length == 0) {
|
|
|
this.list = datas
|