Userlist.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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: 'id' },
  32. { label: '已中奖', key: 'is_lottery', type: 'select', options: this.$dictData.sys_yesno},
  33. ]
  34. this.setDefaultValue(params, 'searchData')
  35. },
  36. searchHandle() {
  37. const oldform = this.$refs.ruleForm.baseForm
  38. const newForm = { ...oldform }
  39. this.$emit('change', newForm)
  40. }
  41. }
  42. }
  43. </script>