MultAuditModal.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template>
  2. <el-dialog
  3. :title="title"
  4. :visible.sync="modal"
  5. :close-on-click-modal="false"
  6. width="600px"
  7. @close="
  8. res => {
  9. $emit('cancel');
  10. }
  11. "
  12. >
  13. <el-form ref="form" :model="form" label-width="100px">
  14. <el-form-item label="场景" prop="kindergartenId">
  15. <SceneSelect v-model="form.kindergartenId" :clearable="false" />
  16. </el-form-item>
  17. <el-form-item label="活动">
  18. <ActivitySelect v-model="form.activityId" :firstLoad="true" />
  19. </el-form-item>
  20. <el-row style="text-align: right;">
  21. <el-button class="mt-40" size="small" type="primary" @click="saveData"
  22. >确认</el-button
  23. >
  24. </el-row>
  25. </el-form>
  26. </el-dialog>
  27. </template>
  28. <script>
  29. import { multAuditPhoto } from '@/api/photoWarehouse';
  30. import { format } from '@/utils';
  31. export default {
  32. name: 'MultFissonModal',
  33. props: {},
  34. data() {
  35. return {
  36. title: '批量一键审核',
  37. modal: true,
  38. form: {
  39. kindergartenId: null,
  40. activityId: null
  41. }
  42. };
  43. },
  44. methods: {
  45. async saveData(obj, name, size) {
  46. const params = {
  47. kindergartenId: this.form.kindergartenId,
  48. activityId: this.form.activityId
  49. };
  50. const { success, msg } = await multAuditPhoto(format(params));
  51. if (success) {
  52. this.$success('批量审核成功!');
  53. this.modal = false;
  54. this.$g_emit('photo_reload');
  55. } else {
  56. this.$error(msg);
  57. }
  58. },
  59. close() {
  60. this.modal = false;
  61. this.$g_emit('photo_reload');
  62. }
  63. }
  64. };
  65. </script>
  66. <style lang="scss" scoped></style>
  67. <style>
  68. .el-upload {
  69. width: 100%;
  70. }
  71. .el-upload-dragger {
  72. width: 100%;
  73. }
  74. </style>