添加防抖

This commit is contained in:
shijingjing
2022-08-02 10:28:21 +08:00
parent 26ced60225
commit facd4595cc

View File

@@ -66,16 +66,6 @@
<div class="list_content">
<div class="list_card">
<!-- <div class="tab">
<u-subsection
:list="subsection"
mode="button"
activeColor="#3c9cff"
:current="subIndex"
@change="changeSub"
></u-subsection>
</div> -->
<div class="tab" v-show="update0">
<u-subsection
:list="subsection0"
@@ -124,7 +114,6 @@ export default {
tabs: ["成员统计", "居民群统计"],
tabIndex: 0,
pieEcharts: null,
// subIndex: 0,
subIndex0: 0,
subIndex1: 0,
tableData: [],
@@ -134,13 +123,8 @@ export default {
current: 1,
firstClickTime: "",
currentClickTime: "",
flag: true,
flag: false,
detail: {},
// subsection: [
// { name: "未执行" },
// { name: "已执行" },
// { name: "无法执行" },
// ],
subsection0: [
{ name: "未执行" },
@@ -215,12 +199,11 @@ export default {
},
// 提醒发送
remindSend() {
if(this.flag) return
this.firstClickTime = new Date(this.detail.remindTime).getTime() || "";
this.currentClickTime = +new Date();
let time = this.currentClickTime - this.firstClickTime;
if (time >= 3600000 && this.flag) {
console.log(time, 'time');
console.log(this.flag, 'flag');
if (time >= 3600000) {
this.$http.post("/app/appmasssendingtask/remindSend", null, {
params: {
id: this.id,
@@ -229,7 +212,7 @@ export default {
.then((res) => {
if (res?.code == 0) {
this.$u.toast("已提醒成员发送");
this.flag = false;
this.flag = true;
this.getDetail()
}
})