30605
This commit is contained in:
		| @@ -35,7 +35,6 @@ | ||||
|     }, | ||||
|  | ||||
|     mounted () { | ||||
|       console.log(this.$route) | ||||
|       if (this.$route.params.id) { | ||||
|         this.component = 'Detail' | ||||
|         this.params = { | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| <template> | ||||
|   <ai-detail class="AppAnnounceAdd"> | ||||
|   <ai-detail class="AppAnnounceAdd" v-loading="isLoading"> | ||||
|     <template slot="title"> | ||||
|       <ai-title :title="id ? '编辑居民群发' : '添加居民群发'" isShowBack isShowBottomBorder @onBackClick="cancel(false)"> | ||||
|       </ai-title> | ||||
| @@ -256,7 +256,7 @@ | ||||
|     </template> | ||||
|     <template #footer> | ||||
|       <el-button @click="cancel">取消</el-button> | ||||
|       <el-button type="primary" @click="confirm(0)" style="width: 120px;" v-loading="isLoading">通知成员发送</el-button> | ||||
|       <el-button type="primary" @click="confirm(0)" style="width: 120px;">通知成员发送</el-button> | ||||
|       <el-button type="primary" @click="confirm(1)">定时发送</el-button> | ||||
|     </template> | ||||
|   </ai-detail> | ||||
| @@ -578,9 +578,7 @@ | ||||
|               ...this.fileList | ||||
|             ] | ||||
|  | ||||
|             if (sendType === 0) { | ||||
|               this.isLoading = true | ||||
|             } | ||||
|             this.isLoading = true | ||||
|             this.instance.post(`/app/appmasssendingtask/addOrUpdate`, { | ||||
|               ...this.form, | ||||
|               id: this.params.id, | ||||
|   | ||||
| @@ -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