listShow
This commit is contained in:
parent
b85c5fc6f7
commit
599b613af4
|
|
@ -2,8 +2,8 @@
|
|||
"name" : "曲阳金隅EHS",
|
||||
"appid" : "__UNI__B00D419",
|
||||
"description" : "曲阳金隅EHS",
|
||||
"versionName" : "1.01.08",
|
||||
"versionCode" : 10108,
|
||||
"versionName" : "1.01.09",
|
||||
"versionCode" : 10109,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
|
|
|||
|
|
@ -19,17 +19,6 @@
|
|||
<view :class="{'text-title':true, 'active':dataTypye==='all'}" @click="changeList('all')" v-if="!remployee">全部</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="my-top-search-nav">
|
||||
<view class="search-wrap">
|
||||
<view class="search-body">
|
||||
<image class="left-img" src="../../../static/home/searchIcon.png" mode=""></image>
|
||||
<input class="search-input" type="text" v-model="search" placeholder="请输入" />
|
||||
<image class="right-img" src="../../../static/my/my_apply/zuofei.png" mode="" @click="resetSearch">
|
||||
</image>
|
||||
<view class="right-btn" @click="searchHandle">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="empty-view"></view>
|
||||
<view class="content">
|
||||
<view class="item-wrap" v-for="(val,index) in lists" :key="val.id">
|
||||
|
|
@ -77,8 +66,8 @@
|
|||
return {
|
||||
params: {
|
||||
search: '',
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
page_size: 10,
|
||||
page: 1,
|
||||
create_by: ''
|
||||
},
|
||||
totalNum: 0,
|
||||
|
|
@ -94,12 +83,16 @@
|
|||
remployee:false,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.params.create_by = this.vuex_user.id;
|
||||
},
|
||||
//上拉加载
|
||||
onReachBottom() {
|
||||
const totalPage = Math.ceil(this.totalNum / this.params.pageSize);
|
||||
if (this.params.pageNum < totalPage) {
|
||||
this.params.pageNum += 1;
|
||||
|
||||
let that = this;
|
||||
let totalPage = Math.ceil(that.totalNum / that.params.page_size);
|
||||
if (that.params.page < totalPage) {
|
||||
that.params.page += 1;
|
||||
that.getLists();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "已全部加载",
|
||||
|
|
@ -111,13 +104,15 @@
|
|||
if(this.vuex_user.type==='remployee'){
|
||||
this.remployee = true;
|
||||
}
|
||||
this.lists = [];
|
||||
this.params.create_by = this.vuex_user.id;
|
||||
this.getLists();
|
||||
if(this.params.page == 1){
|
||||
this.lists = [];
|
||||
this.getLists();
|
||||
}
|
||||
|
||||
},
|
||||
//下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.params.pageNum = 1;
|
||||
this.params.page = 1;
|
||||
this.lists = [];
|
||||
this.getLists();
|
||||
},
|
||||
|
|
@ -125,8 +120,8 @@
|
|||
getLists() {
|
||||
let that = this;
|
||||
that.$u.api.operationList(that.params).then(res => {
|
||||
that.totalNum = res.count;
|
||||
that.lists = that.lists.concat(res.results);
|
||||
this.totalNum = res.count;
|
||||
})
|
||||
},
|
||||
operationHandle(val,type) {
|
||||
|
|
@ -141,7 +136,6 @@
|
|||
url: '/pages/workSpace/operation/operationCreate' + params,
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
operationDetail(val){
|
||||
let operation = val.id;//作业id
|
||||
|
|
@ -173,12 +167,12 @@
|
|||
})
|
||||
},
|
||||
searchHandle() {
|
||||
this.params.pageNum = 1;
|
||||
this.params.page = 1;
|
||||
this.lists = [];
|
||||
this.getLists()
|
||||
},
|
||||
resetSearch() {
|
||||
this.params.pageNum = 1;
|
||||
this.params.page = 1;
|
||||
this.params.search = "";
|
||||
this.lists = [];
|
||||
this.getLists();
|
||||
|
|
|
|||
|
|
@ -19,17 +19,6 @@
|
|||
<view :class="{'text-title':true, 'active':dataTypye==='all'}" @click="changeList('all')" v-if="!remployee">全部</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="my-top-search-nav">
|
||||
<view class="search-wrap">
|
||||
<view class="search-body">
|
||||
<image class="left-img" src="../../../static/home/searchIcon.png" mode=""></image>
|
||||
<input class="search-input" type="text" v-model="search" placeholder="请输入" />
|
||||
<image class="right-img" src="../../../static/my/my_apply/zuofei.png" mode="" @click="resetSearch">
|
||||
</image>
|
||||
<view class="right-btn" @click="searchHandle">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="empty-view"></view>
|
||||
<view class="content">
|
||||
<view class="item-wrap" v-for="(val,index) in lists" :key="val.id">
|
||||
|
|
@ -73,8 +62,8 @@
|
|||
return {
|
||||
params: {
|
||||
search: '',
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
page_size: 10,
|
||||
page: 1,
|
||||
create_by: ''
|
||||
},
|
||||
totalNum: 0,
|
||||
|
|
@ -97,12 +86,17 @@
|
|||
remployee:false,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.dataTypye='isMy';
|
||||
this.params.create_by = this.vuex_user.id;
|
||||
},
|
||||
//上拉加载
|
||||
onReachBottom() {
|
||||
const totalPage = Math.ceil(this.totalNum / this.params.pageSize);
|
||||
if (this.params.pageNum < totalPage) {
|
||||
this.params.pageNum += 1;
|
||||
|
||||
let that = this;
|
||||
let totalPage = Math.ceil(that.totalNum / that.params.page_size);
|
||||
if (that.params.page < totalPage) {
|
||||
that.params.page += 1;
|
||||
that.getLists();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "已全部加载",
|
||||
|
|
@ -111,20 +105,18 @@
|
|||
}
|
||||
},
|
||||
onShow() {
|
||||
debugger;
|
||||
console.log(this.vuex_user);
|
||||
debugger;
|
||||
if(this.vuex_user.type==='remployee'){
|
||||
this.remployee = true;
|
||||
}
|
||||
this.lists = [];
|
||||
this.dataTypye='isMy';
|
||||
this.params.create_by = this.vuex_user.id;
|
||||
this.getLists();
|
||||
if(this.params.page == 1){
|
||||
this.lists = [];
|
||||
this.getLists();
|
||||
}
|
||||
|
||||
},
|
||||
//下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.params.pageNum = 1;
|
||||
this.params.page = 1;
|
||||
this.lists = [];
|
||||
this.getLists();
|
||||
},
|
||||
|
|
@ -132,8 +124,8 @@
|
|||
getLists() {
|
||||
let that = this;
|
||||
that.$u.api.rpjList(that.params).then(res => {
|
||||
that.lists = that.lists.concat(res.results);
|
||||
this.totalNum = res.count;
|
||||
that.lists = that.lists.concat(res.results);
|
||||
})
|
||||
},
|
||||
rpjHandle(val, type) {
|
||||
|
|
@ -173,12 +165,12 @@
|
|||
})
|
||||
},
|
||||
searchHandle() {
|
||||
this.params.pageNum = 1;
|
||||
this.params.page = 1;
|
||||
this.lists = [];
|
||||
this.getLists()
|
||||
},
|
||||
resetSearch() {
|
||||
this.params.pageNum = 1;
|
||||
this.params.page = 1;
|
||||
this.params.search = "";
|
||||
this.lists = [];
|
||||
this.getLists();
|
||||
|
|
|
|||
|
|
@ -19,17 +19,6 @@
|
|||
<view :class="{'text-title':true, 'active':dataTypye==='all'}" @click="changeList('all')" v-if="employee">全部</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="my-top-search-nav">
|
||||
<view class="search-wrap">
|
||||
<view class="search-body">
|
||||
<image class="left-img" src="../../../static/home/searchIcon.png" mode=""></image>
|
||||
<input class="search-input" type="text" v-model="search" placeholder="请输入" />
|
||||
<image class="right-img" src="../../../static/my/my_apply/zuofei.png" mode="" @click="resetSearch">
|
||||
</image>
|
||||
<view class="right-btn" @click="searchHandle">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="empty-view"></view>
|
||||
<view class="content">
|
||||
<view class="item-wrap" v-for="(val,index) in lists" :key="val.id">
|
||||
|
|
@ -41,11 +30,6 @@
|
|||
<view class="info-details">来访事由:{{purposeOptions[val.purpose]}}</view>
|
||||
<view class="info-details">状态:{{stateOptions[val.state]}}</view>
|
||||
<view class="info-details">创建时间:{{val.create_time}}</view>
|
||||
<!-- <view class="info-details">作业区域:{{val.area_.name}} </view>
|
||||
<view class="info-details">更新时间:{{val.update_time}} </view>
|
||||
<view class="info-details">属地部门:{{val.dept_ter_.name}} </view>
|
||||
<view class="info-details">业务部门:{{val.dept_bus_.name}} </view>
|
||||
<view class="info-details">创建人:{{val.create_by_.name}} </view> -->
|
||||
</view>
|
||||
<view class="bottom-btns" style="display: flex;">
|
||||
<view class="shenhezhong shenhe-status" @click="visitHandle(val,'edit')" v-if="val.state===10&&dataTypye==='isMy'">
|
||||
|
|
@ -74,8 +58,8 @@
|
|||
return {
|
||||
params: {
|
||||
search: '',
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
page_size: 10,
|
||||
page: 1,
|
||||
create_by: ''
|
||||
},
|
||||
totalNum: 0,
|
||||
|
|
@ -102,9 +86,12 @@
|
|||
},
|
||||
//上拉加载
|
||||
onReachBottom() {
|
||||
const totalPage = Math.ceil(this.totalNum / this.params.pageSize);
|
||||
if (this.params.pageNum < totalPage) {
|
||||
this.params.pageNum += 1;
|
||||
let that = this;
|
||||
let totalPage = Math.ceil(that.totalNum / that.params.page_size);
|
||||
if (that.params.page < totalPage) {
|
||||
that.params.page += 1;
|
||||
that.getLists();
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "已全部加载",
|
||||
|
|
@ -112,17 +99,23 @@
|
|||
})
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.dataTypye='isMy';
|
||||
this.params.create_by = this.vuex_user.id;
|
||||
},
|
||||
onShow() {
|
||||
if(this.vuex_user.type==='employee'){
|
||||
this.employee = true;
|
||||
}
|
||||
this.lists = [];
|
||||
this.params.create_by = this.vuex_user.id;
|
||||
this.getLists();
|
||||
if(this.params.page == 1){
|
||||
this.lists = [];
|
||||
this.getLists();
|
||||
}
|
||||
|
||||
},
|
||||
//下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.params.pageNum = 1;
|
||||
this.params.page = 1;
|
||||
this.lists = [];
|
||||
this.getLists();
|
||||
},
|
||||
|
|
@ -130,8 +123,8 @@
|
|||
getLists() {
|
||||
let that = this;
|
||||
that.$u.api.visitList(that.params).then(res => {
|
||||
that.totalNum = res.count;
|
||||
that.lists = that.lists.concat(res.results);
|
||||
this.totalNum = res.count;
|
||||
})
|
||||
},
|
||||
visitHandle(val,type) {
|
||||
|
|
@ -148,9 +141,7 @@
|
|||
this.$u.api.visitDelete(val.id).then(res => {
|
||||
this.resetSearch()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
changeList(index){
|
||||
let that = this;
|
||||
|
|
@ -168,12 +159,12 @@
|
|||
})
|
||||
},
|
||||
searchHandle() {
|
||||
this.params.pageNum = 1;
|
||||
this.params.page = 1;
|
||||
this.lists = [];
|
||||
this.getLists()
|
||||
},
|
||||
resetSearch() {
|
||||
this.params.pageNum = 1;
|
||||
this.params.page = 1;
|
||||
this.params.search = "";
|
||||
this.lists = [];
|
||||
this.getLists();
|
||||
|
|
|
|||
Loading…
Reference in New Issue