|
|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <view class="content">
|
|
|
+ <view class="content" @touchstart="start" @touchend="end">
|
|
|
<view class="subsection">
|
|
|
<view class="division">
|
|
|
<u-search placeholder="请输入任务处理人" v-model="name" :showAction="false" @input="search"></u-search>
|
|
|
@@ -70,7 +70,11 @@
|
|
|
start_time: "",
|
|
|
end_time: "",
|
|
|
keyword: "",
|
|
|
- name: ""
|
|
|
+ name: "",
|
|
|
+ startData:{
|
|
|
+ clientX:0,
|
|
|
+ clientY:0
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
@@ -78,8 +82,7 @@
|
|
|
this.tasklist = []
|
|
|
this.gettaskdata()
|
|
|
},
|
|
|
- onLoad() {
|
|
|
- },
|
|
|
+ onLoad() {},
|
|
|
onReachBottom() {
|
|
|
this.page++
|
|
|
this.gettaskdata()
|
|
|
@@ -119,7 +122,6 @@
|
|
|
});
|
|
|
}
|
|
|
this.gettaskdata()
|
|
|
-
|
|
|
},
|
|
|
colors(type) {
|
|
|
if (type == '未开始' || type == '未处理') {
|
|
|
@@ -174,6 +176,36 @@
|
|
|
this.page = 1
|
|
|
this.gettaskdata()
|
|
|
}, 1000)()
|
|
|
+ },
|
|
|
+ start(e) {
|
|
|
+ // console.log("滑动222")
|
|
|
+ this.startData.clientX = e.changedTouches[0].clientX;
|
|
|
+ this.startData.clientY = e.changedTouches[0].clientY;
|
|
|
+ },
|
|
|
+ end(e) {
|
|
|
+ // console.log("滑动")
|
|
|
+ const subX = e.changedTouches[0].clientX - this.startData.clientX;
|
|
|
+ const subY = e.changedTouches[0].clientY - this.startData.clientY;
|
|
|
+ if (subY > 50 || subY < -50) {
|
|
|
+ console.log('上下滑')
|
|
|
+ } else {
|
|
|
+ if (subX > 100) {
|
|
|
+ // console.log('右滑')
|
|
|
+ if(this.current!=0){
|
|
|
+ this.current--
|
|
|
+ this.sectionChange(this.current)
|
|
|
+ }
|
|
|
+
|
|
|
+ } else if (subX < -100) {
|
|
|
+ // console.log('左滑')
|
|
|
+ if(this.current!=2){
|
|
|
+ this.current++
|
|
|
+ this.sectionChange(this.current)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ console.log('无效')
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|