This commit is contained in:
yanran200730
2022-07-29 16:45:38 +08:00
parent 5008d89ee4
commit efc1a5a0b0

View File

@@ -1,5 +1,5 @@
<template> <template>
<ai-detail class="AppAnnounceAdd" v-loading="isLoading"> <ai-detail class="AppAnnounceAdd">
<template slot="title"> <template slot="title">
<ai-title :title="id ? '编辑居民群发' : '添加居民群发'" isShowBack isShowBottomBorder @onBackClick="cancel(false)"> <ai-title :title="id ? '编辑居民群发' : '添加居民群发'" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
</ai-title> </ai-title>
@@ -238,8 +238,7 @@
:visible.sync="isShowDate" :visible.sync="isShowDate"
width="590px" width="590px"
title="定时发送" title="定时发送"
@close="onClose" customFooter>
@onConfirm="onDateForm">
<el-form ref="dateForm" :model="dateForm" label-width="130px" label-position="right"> <el-form ref="dateForm" :model="dateForm" label-width="130px" label-position="right">
<div class="ai-form"> <div class="ai-form">
<el-form-item label="定时发送时间" style="width: 100%;" prop="choiceTime" :rules="[{ required: true, message: '请选择定时发送时间', trigger: 'change' }]"> <el-form-item label="定时发送时间" style="width: 100%;" prop="choiceTime" :rules="[{ required: true, message: '请选择定时发送时间', trigger: 'change' }]">
@@ -255,12 +254,16 @@
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
<div class="dialog-footer" slot="footer">
<el-button @click="onClose">取消</el-button>
<el-button @click="onDateForm" type="primary" :loading="isLoading2" style="width: 92px;">确认</el-button>
</div>
</ai-dialog> </ai-dialog>
</div> </div>
</template> </template>
<template #footer> <template #footer>
<el-button @click="cancel">取消</el-button> <el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="confirm(0)" style="width: 120px;">通知成员发送</el-button> <el-button type="primary" @click="confirm(0)" :loading="isLoading1" style="width: 120px;">通知成员发送</el-button>
<el-button type="primary" @click="confirm(1)">定时发送</el-button> <el-button type="primary" @click="confirm(1)">定时发送</el-button>
</template> </template>
</ai-detail> </ai-detail>
@@ -286,6 +289,8 @@
return { return {
info: {}, info: {},
department: [], department: [],
isLoading1: false,
isLoading2: false,
fileList: [], fileList: [],
isShowAddLink: false, isShowAddLink: false,
isShowAddMiniapp: false, isShowAddMiniapp: false,
@@ -595,7 +600,11 @@
...this.fileList ...this.fileList
] ]
this.isLoading = true if (sendType === 0) {
this.isLoading1 = true
} else {
this.isLoading2 = true
}
this.instance.post(`/app/appmasssendingtask/addOrUpdate`, { this.instance.post(`/app/appmasssendingtask/addOrUpdate`, {
...this.form, ...this.form,
id: this.params.id, id: this.params.id,
@@ -616,11 +625,14 @@
setTimeout(() => { setTimeout(() => {
this.cancel(true) this.cancel(true)
}, 600) }, 600)
} else {
this.isLoading1 = false
this.isLoading2 = false
} }
this.isLoading = false
}).catch(() => { }).catch(() => {
this.isLoading = false this.isLoading1 = false
this.isLoading2 = false
}) })
} }
}) })