BaseLogic.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <div>
  3. <!--搜索-->
  4. <DynamicForm :config="config"
  5. config-key="search"
  6. inline
  7. v-model="queryData">
  8. <slot>
  9. <el-button type="primary" @click="query(1)">搜索</el-button>
  10. <el-button type="primary" @click="handleAddAndUpt">新增</el-button>
  11. </slot>
  12. </DynamicForm>
  13. <!--表格-->
  14. <DynamicTable :config="config"
  15. :default-method="defaultMethod"
  16. :default-num="defaultNum"
  17. v-loading="tableData.listLoading"
  18. :table-data="tableData.datas">
  19. </DynamicTable>
  20. <!--分页-->
  21. <div style="margin-top: 30px;position: relative;">
  22. <Page :currentPage="queryData.page"
  23. :rows="queryData.rows"
  24. :total="tableData.total"
  25. @handleCurrentChangeSub="query"
  26. style="position: absolute;top:50%;left:50%;transform: translate(-50%,-50%);"/>
  27. </div>
  28. <!--操作-->
  29. <el-dialog :title="dialogData.title"
  30. :visible.sync="dialogData.dialogVisible"
  31. @close="closeDialog"
  32. :close-on-click-modal="false">
  33. <DynamicForm :config="config"
  34. ref="test"
  35. v-loading="dialogData.formLoading"
  36. v-model="formData"
  37. :default-logic="defaultLogic">
  38. </DynamicForm>
  39. </el-dialog>
  40. </div>
  41. </template>
  42. <script>
  43. import baseLogic from '../mixins/baseLogic'
  44. export default {
  45. mixins: [baseLogic],
  46. data() {
  47. return {}
  48. },
  49. props: {
  50. },
  51. methods: {
  52. },
  53. watch: {
  54. },
  55. computed: {
  56. }
  57. }
  58. </script>
  59. <style scoped>
  60. </style>