This commit is contained in:
2026-06-10 14:47:07 +08:00
parent 08d00b05ee
commit f4c82c5c33
4 changed files with 118 additions and 32 deletions
@@ -130,6 +130,21 @@ layout("/layouts/platform.html"){
:visible.sync="notifyDialogVisible"
:close-on-click-modal="false"
width="50%">
<el-select
v-model="notifyCourseIds"
multiple
filterable
clearable
:loading="notifyCourseLoading"
placeholder="请选择要通知的分活动"
style="width: 100%; margin-bottom: 15px">
<el-option
v-for="item in notifyCourseList"
:key="item.id"
:label="item.courseName"
:value="item.id">
</el-option>
</el-select>
<el-input
type="textarea"
:rows="6"
@@ -138,7 +153,7 @@ layout("/layouts/platform.html"){
</el-input>
<span slot="footer" class="dialog-footer">
<el-button @click="notifyDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="sendNotify">发 送</el-button>
<el-button type="primary" :loading="notifyLoading" @click="sendNotify">发 送</el-button>
</span>
</el-dialog>
</guava>
@@ -175,6 +190,10 @@ layout("/layouts/platform.html"){
notifyDialogVisible: false,
notifyContent: '',
notifyActivityId: '',
notifyCourseIds: [],
notifyCourseList: [],
notifyCourseLoading: false,
notifyLoading: false,
}
},
methods: {
@@ -206,28 +225,51 @@ layout("/layouts/platform.html"){
openNotifyDialog(row) {
this.notifyActivityId = row.id
this.notifyContent = ''
this.notifyCourseIds = []
this.notifyCourseList = []
this.notifyDialogVisible = true
this.notifyCourseLoading = true
this.$axios.post("/platform/smartbenefits/manage/findOne", { id: row.id })
.then((resp) => {
if (resp.code === 0) {
this.notifyCourseList = resp.data.courseList || []
} else {
this.$message.warning(resp.msg)
}
})
.finally(() => {
this.notifyCourseLoading = false
})
},
async sendNotify() {
sendNotify() {
if (this.notifyCourseIds.length === 0) {
this.$message.warning('请选择要通知的分活动')
return
}
if (!this.notifyContent.trim()) {
this.$message.warning('请输入通知内容')
return
}
this.$confirm("确认发送通知给所报名人员吗?", "提示", {
this.$confirm("确认发送通知给所选分活动的报名人员吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(async () => {
const resp = await this.$axios.post(loc() + "/sendNotify", {
}).then(() => {
this.notifyLoading = true
this.$axios.post(loc() + "/sendNotify", {
activityId: this.notifyActivityId,
courseIds: JSON.stringify(this.notifyCourseIds),
content: this.notifyContent
}).then((resp) => {
if (resp.code === 0) {
this.$message.success(resp.msg)
this.notifyDialogVisible = false
} else {
this.$message.warning(resp.msg)
}
}).finally(() => {
this.notifyLoading = false
})
if (resp.code === 0) {
this.$message.success(resp.msg)
this.notifyDialogVisible = false
} else {
this.$message.warning(resp.msg)
}
}).catch(() => {})
},
async activityStatusChange(notice, val, id) {