StiflingAdmin.vue 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!--
  2. * @Author: your name
  3. * @Date: 2021-09-16 11:27:35
  4. * @LastEditTime: 2021-09-26 15:23:17
  5. * @LastEditors: Please set LastEditors
  6. * @Description: In User Settings Edit
  7. * @FilePath: \hyyfClient\src\views\BioSafety\StiflingAdmin.vue
  8. -->
  9. <template>
  10. <div class="stifling-admin">
  11. <!-- 筛选条件 -->
  12. <query-conditions :formItems="formItems" :propFormData="propFormData" @getQueryParams="handleQuery"></query-conditions>
  13. <!-- 表格 -->
  14. <new-table :title="title" :listData="listData" :tableItems="tableItems" :shows="tableShows" :height="height" @selectionChange="handleSelectChange">
  15. <!-- 按钮 -->
  16. <template v-slot:handler="scope">
  17. <el-button @click="handleClick(scope.row)">删除</el-button>
  18. </template>
  19. </new-table>
  20. </div>
  21. </template>
  22. <script>
  23. import QueryConditions from 'components/bioSafety/QueryConditions'
  24. import NewTable from 'components/newTable/NewTable'
  25. import { formItems, propFormData } from './stiflingAdmin/queryCondition.config'
  26. import { title, tableItems, tableShows } from './stiflingAdmin/table.config'
  27. export default {
  28. name: "PersonAdmin",
  29. components: {
  30. QueryConditions,
  31. NewTable
  32. },
  33. data() {
  34. return {
  35. formItems: [], // 传给 QueryCondition 组件的 formItems
  36. propFormData: {}, // 传给 QueryCondition 组件的 propFormData
  37. title: '', // 传给 BioTable 组件的 title
  38. // listData: [], // 传给 BioTable 组件的表格展示的值 listData
  39. listData: [
  40. {
  41. place: '一一一',
  42. startTime: '2222',
  43. endTime: '3333',
  44. long: '4444'
  45. }
  46. ],
  47. tableItems: [], // 传给 BioTable 组件的表格的列表 tableItems
  48. tableShows: {},
  49. height: 550
  50. }
  51. },
  52. mounted() {
  53. this.formItems = formItems
  54. this.propFormData = propFormData
  55. this.title = title
  56. this.tableItems = tableItems
  57. this.tableShows = tableShows
  58. },
  59. methods: {
  60. // 获取查询条件
  61. handleQuery(params) {
  62. console.log(params)
  63. },
  64. handleClick(row) {
  65. console.log(row)
  66. },
  67. handleSelectChange(rows) {
  68. console.log(rows)
  69. }
  70. },
  71. }
  72. </script>
  73. <style scoped>
  74. .stifling-admin {
  75. width: 100%;
  76. height: 100%;
  77. box-sizing: border-box;
  78. padding: 20px;
  79. }
  80. </style>