| | |
| | | activityMembersPage, |
| | | auditActivity |
| | | } from "@/api/activity.js" |
| | | import Editor from '@/components/editor/index.vue' |
| | | import { uploadFileByLmk, delByKey } from "@/api/common.js" |
| | | |
| | | import { quillEditor } from 'vue-quill-editor' |
| | | import Delta from 'quill-delta' |
| | | import 'quill/dist/quill.core.css'; |
| | | import 'quill/dist/quill.snow.css'; |
| | | import 'quill/dist/quill.bubble.css'; |
| | |
| | | |
| | | export default { |
| | | name: "ActivityManagement", |
| | | components: {Editor, quillEditor}, |
| | | components: { quillEditor}, |
| | | data() { |
| | | return { |
| | | auditForm: { |
| | |
| | | } |
| | | }, |
| | | { |
| | | title: '审核', |
| | | title: '审核状态', |
| | | key: 'auditStatus', |
| | | width: 100, |
| | | align: 'center', |
| | | render: (h, params) => { |
| | | const status = params.row.auditStatus; |
| | | let tagText, tagColor; |
| | | |
| | | // 根据状态设置文案和颜色 |
| | | switch (status) { |
| | | case 0: |
| | | tagText = '审核中'; |
| | | tagColor = 'orange'; // 橙色表示进行中 |
| | | break; |
| | | case 1: |
| | | tagText = '已通过'; |
| | | tagColor = 'green'; // 绿色表示通过 |
| | | break; |
| | | case 2: |
| | | tagText = '未通过'; |
| | | tagColor = 'red'; // 红色表示拒绝 |
| | | break; |
| | | default: |
| | | tagText = '未知状态'; |
| | | tagColor = 'default'; // 默认灰色 |
| | | } |
| | | |
| | | return h('Tag', { |
| | | props: { |
| | | color: params.row.auditStatus === 0 ? 'default' : 'green' |
| | | } |
| | | }, params.row.auditStatus === 0 ? '未审核' : '已审核') |
| | | } |
| | | color: tagColor, |
| | | }, |
| | | }, tagText); |
| | | }, |
| | | }, |
| | | { |
| | | title: '状态', |
| | |
| | | |
| | | // 失去焦点 |
| | | onEditorBlur(editor) { |
| | | |
| | | }, |
| | | |
| | | // 获得焦点 |
| | |
| | | console.log(this.activityFrom.activityContent) |
| | | this.Quill.setSelection(index + 1); |
| | | this.$Message.success('上传成功') |
| | | }else{ |
| | | this.$Message.error(res.msg) |
| | | } |
| | | }).catch(() => { |
| | | this.submitLoading = false |
| | |
| | | this.$Message.success(res.msg); |
| | | this.getActivityList(); |
| | | this.closeAuditModel(); |
| | | }else{ |
| | | this.$Message.error(res.msg) |
| | | } |
| | | }) |
| | | } |
| | |
| | | statusLoading: false |
| | | })) |
| | | this.total = res.total |
| | | }else{ |
| | | this.$Message.error(res.msg) |
| | | } |
| | | }).catch(() => { |
| | | this.loading = false |
| | |
| | | this.$Message.success(res.msg) |
| | | this.modelClose() |
| | | this.getActivityList() |
| | | }else{ |
| | | this.$Message.error(res.msg) |
| | | } |
| | | }).catch(() => { |
| | | this.submitLoading = false |
| | |
| | | if (res.code === 200) { |
| | | this.$Message.success(res.msg) |
| | | this.getActivityList() |
| | | }else{ |
| | | this.$Message.error(res.msg) |
| | | } |
| | | }) |
| | | } |
| | |
| | | if (res.code === 200) { |
| | | this.$Message.success(res.msg) |
| | | row.recommend = recommend |
| | | }else{ |
| | | this.$Message.error(res.msg) |
| | | } |
| | | }).catch(() => { |
| | | row.recommendLoading = false |
| | |
| | | if (res.code === 200) { |
| | | this.$Message.success(res.msg) |
| | | row.publish = publish |
| | | }else{ |
| | | this.$Message.error(res.msg) |
| | | } |
| | | }).catch(() => { |
| | | row.statusLoading = false |
| | |
| | | if (res.code === 200) { |
| | | this.membersList = res.data |
| | | this.memberTotal = res.total |
| | | }else{ |
| | | this.$Message.error(res.msg) |
| | | } |
| | | }).catch(() => { |
| | | this.membersLoading = false |
| | |
| | | if (res.code === 200) { |
| | | this.activityFrom.cover = res.data.fileKey |
| | | this.$Message.success('上传成功') |
| | | }else{ |
| | | this.$Message.error(res.msg) |
| | | } |
| | | }).catch(() => { |
| | | this.submitLoading = false |
| | |
| | | if (res.code === 200) { |
| | | this.file = null |
| | | this.activityFrom.cover = '' |
| | | }else{ |
| | | this.$Message.error(res.msg) |
| | | } |
| | | }) |
| | | }, |