Prizeulist.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <base-form slot="content" ref="ruleForm" :data="searchData">
  3. <div slot="footer">
  4. <el-button :loading="listLoading" icon="el-icon-search" class="xl-form-btn bgc1" @click="searchHandle">查询</el-button>
  5. <!-- <el-button :loading="listLoading" icon="el-icon-document" class="xl-form-btn bgc2" @click="toExportExcel">导出{{ this.$route.meta.title }}信息</el-button> -->
  6. </div>
  7. </base-form>
  8. </template>
  9. <script>
  10. export default {
  11. props: {
  12. listLoading: Boolean
  13. },
  14. inject: ['parentData'],
  15. mixins,
  16. data() {
  17. return {
  18. searchData: []
  19. }
  20. },
  21. mounted () {
  22. this.getDef()
  23. },
  24. methods: {
  25. subwayLineChange (val) {
  26. this.getDef('change')
  27. },
  28. getDef (str) {
  29. let params = { ...this.$refs.ruleForm.baseForm }
  30. this.searchData = [
  31. { label: '用户id', key: 'user_id' },
  32. { label: '手机号', key: 'phone' },
  33. { label: '奖品名称', key: 'prize' },
  34. { label: '已核销', key: 'is_handle', type: 'select', options: this.$dictData.sys_yesno},
  35. ]
  36. this.setDefaultValue(params, 'searchData')
  37. },
  38. searchHandle() {
  39. const oldform = this.$refs.ruleForm.baseForm
  40. const newForm = { ...oldform }
  41. this.$emit('change', newForm)
  42. }
  43. }
  44. }
  45. </script>