tab2.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <div>
  3. <!-- 查询区域 -->
  4. <div class="table-page-search-wrapper">
  5. <!-- 操作按钮区域 -->
  6. <div class="table-operator" style="margin: 5px 0;float: right">
  7. <a-dropdown v-if="selectedRowKeys.length > 0">
  8. <a-menu slot="overlay">
  9. <a-menu-item key="1" @click="batchDel">
  10. <a-icon type="delete"/>
  11. 删除
  12. </a-menu-item>
  13. </a-menu>
  14. <a-button style="margin-left: 8px">
  15. 批量操作
  16. <a-icon type="down"/>
  17. </a-button>
  18. </a-dropdown>
  19. </div>
  20. <a-form layout="inline" @keyup.enter.native="searchQuery">
  21. <a-form-item>
  22. <a-input
  23. v-model="queryParam.teamName"
  24. style="width: 150px"
  25. placeholder="班组"
  26. />
  27. </a-form-item>
  28. <a-form-item>
  29. <a-button type="primary" @click="searchQuery">查询</a-button>
  30. <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
  31. </a-form-item>
  32. </a-form>
  33. </div>
  34. <!-- table区域-begin -->
  35. <div>
  36. <a-table
  37. :scroll="{ x: 500 | true,y: 'calc(100vh - 400px)'}"
  38. ref="table"
  39. size="middle"
  40. bordered
  41. row-key="id"
  42. :columns="columns"
  43. :data-source="dataSource"
  44. :pagination="ipagination"
  45. :loading="loading"
  46. @change="handleTableChange"
  47. />
  48. </div>
  49. <!-- table区域-end -->
  50. <!-- 表单区域 -->
  51. </div>
  52. </template>
  53. <script>
  54. import {listMixin} from '@/mixin/listMixin'
  55. import columns from './tab2Columns'
  56. import {getAction} from '@/api/request'
  57. export default {
  58. name: 'Tab2',
  59. components: {},
  60. mixins: [listMixin],
  61. data() {
  62. return {
  63. // 查询条件
  64. queryParam: {},
  65. treeData: [],
  66. // 表头
  67. columns: columns(this),
  68. url: {
  69. list: '/show/sbxj/listBd',
  70. delete: '/business/catenary/bus/jcb/fdfxjyq/',
  71. tree: '/system/dept/treeSelect',
  72. exportXlsUrl: '/business/catenary/bus/jcb/fdfxjyq/export'
  73. }
  74. }
  75. },
  76. created() {
  77. this.loadTree()
  78. },
  79. methods: {
  80. loadTree() {
  81. this.treeData = []
  82. getAction(this.url.tree).then((res) => {
  83. if (res.code === 200) {
  84. this.treeData = res.data
  85. }
  86. })
  87. }
  88. }
  89. }
  90. </script>
  91. <style scoped>
  92. @import '~@/assets/less/common.less'
  93. </style>