Index.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 type="small" icon="el-icon-plus" class="xl-form-btn bgc1" @click="openPopup">添加公众号文章</el-button>
  6. <el-button type="small" icon="el-icon-plus" class="xl-form-btn bgc2" @click="openIESPopup">添加新资讯</el-button>
  7. <!-- <el-button :loading="listLoading" icon="el-icon-document" class="xl-form-btn bgc2" @click="toExportExcel">导出{{ this.$route.meta.title }}信息</el-button> -->
  8. </div>
  9. </base-form>
  10. </template>
  11. <script>
  12. export default {
  13. props: {
  14. listLoading: Boolean
  15. },
  16. inject: ['parentData'],
  17. data() {
  18. return {
  19. searchData: [
  20. { label: '标题', key: 'title' },
  21. { label: '分类', key: 'information_category', type: 'select', options: this.$dictData.information_category},
  22. { label: '状态', key: 'hide_status', type: 'select', class: 'c-3', options: this.$dictData.hide_status },
  23. { label: '文章类型', key: 'news_type', type: 'select', class: 'c-3', options: this.$dictData.news_type },
  24. ]
  25. }
  26. },
  27. methods: {
  28. openPopup () {
  29. this.parentData.openPopup()
  30. },
  31. openIESPopup () {
  32. this.parentData.openIESPopup()
  33. },
  34. searchHandle() {
  35. const oldform = this.$refs.ruleForm.baseForm
  36. const newForm = { ...oldform }
  37. this.$emit('change', newForm)
  38. }
  39. }
  40. }
  41. </script>