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