30605
This commit is contained in:
		| @@ -124,7 +124,7 @@ | ||||
|                     </ai-user-get> | ||||
|                   </div> | ||||
|                 </div> | ||||
|                 <el-button type="primary" @click="sendMsg(0)" v-if="info.status === '4'">提醒成员发送</el-button> | ||||
|                 <el-button :type="isDisabled ? '' : 'primary'" :disabled="isDisabled" @click="sendMsg(0)" v-if="info.status === '4'">{{ isDisabled ? min + '分钟后可再次提醒' : '提醒成员发送' }}</el-button> | ||||
|               </div> | ||||
|               <ai-table | ||||
|                 :tableData="tableData1" | ||||
| @@ -193,7 +193,7 @@ | ||||
|                     </ai-user-get> | ||||
|                   </div> | ||||
|                 </div> | ||||
|                 <el-button type="primary" @click="sendMsg(1)" v-if="info.status === '4'">提醒成员发送</el-button> | ||||
|                 <el-button :type="isDisabled ? '' : 'primary'" :disabled="isDisabled"  @click="sendMsg(1)" v-if="info.status === '4'">{{ isDisabled ? min + '分钟后可再次提醒' : '提醒成员发送' }}</el-button> | ||||
|               </div> | ||||
|               <ai-table | ||||
|                 :tableData="tableData2" | ||||
| @@ -303,7 +303,10 @@ | ||||
|           { prop: 'memberCount', label: '群人数', align: 'center' }, | ||||
|           { slot: 'user', label: '群主', align: 'center' }, | ||||
|         ], | ||||
|         groups: [] | ||||
|         groups: [], | ||||
|         timer: null, | ||||
|         min: 60, | ||||
|         isDisabled: false | ||||
|       } | ||||
|     }, | ||||
|  | ||||
| @@ -317,6 +320,10 @@ | ||||
|       this.getGroupInfo() | ||||
|     }, | ||||
|  | ||||
|     destroyed () { | ||||
|       clearInterval(this.timer) | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       getMemberInfo () { | ||||
|         this.instance.post(`/app/appmasssendingtask/detailStatistics`, null, { | ||||
| @@ -352,6 +359,7 @@ | ||||
|         this.instance.post(`/app/appmasssendingtask/remindSend?id=${this.params.id}`).then(res => { | ||||
|           if (res.code === 0) { | ||||
|             this.$message.success('提醒成功') | ||||
|             this.getInfo(this.params.id) | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
| @@ -376,10 +384,29 @@ | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       countdown () { | ||||
|         this.timer = setInterval(() => { | ||||
|           const nowTime = this.$moment(new Date()) | ||||
|           const min = nowTime.diff(this.info.remindTime, 'minute') | ||||
|           this.min = (60 - min) | ||||
|           console.log(nowTime.diff(this.info.remindTime, 'minute')) | ||||
|  | ||||
|           if (this.min <= 0) { | ||||
|             this.isDisabled = false | ||||
|           } else { | ||||
|             this.isDisabled = true | ||||
|             clearInterval(this.timer) | ||||
|           } | ||||
|         }, 1000) | ||||
|       }, | ||||
|  | ||||
|       getInfo (id) { | ||||
|         this.instance.post(`/app/appmasssendingtask/queryDetailById?id=${id}`).then(res => { | ||||
|           if (res.code === 0) { | ||||
|             this.info = res.data | ||||
|             if (res.data.status === '4' && res.data.remindTime) { | ||||
|               this.countdown() | ||||
|             } | ||||
|  | ||||
|             const content = res.data.contents.filter(v => v.msgType === '0') | ||||
|  | ||||
| @@ -406,10 +433,6 @@ | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       getList () { | ||||
|  | ||||
|       }, | ||||
|  | ||||
|       mapType (type) { | ||||
|         return { | ||||
|           1: '图片', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user