tab3.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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-button ghost type="primary" icon="upload" @click="handleExportXls()">导入</a-button>
  8. <a-dropdown v-if="selectedRowKeys.length > 0">
  9. <a-menu slot="overlay">
  10. <a-menu-item key="1" @click="batchDel">
  11. <a-icon type="delete"/>
  12. 删除
  13. </a-menu-item>
  14. </a-menu>
  15. <a-button style="margin-left: 8px">
  16. 批量操作
  17. <a-icon type="down"/>
  18. </a-button>
  19. </a-dropdown>
  20. </div>
  21. <a-form layout="inline" @keyup.enter.native="searchQuery">
  22. <a-form-item>
  23. <j-dict-select-tag
  24. v-model="queryParam.ssgq"
  25. style="width: 150px"
  26. placeholder="选择工区"
  27. dict-code="dlyc_sygq"
  28. />
  29. </a-form-item>
  30. <a-form-item>
  31. <j-dict-select-tag
  32. v-model="queryParam.gravity"
  33. style="width: 150px"
  34. placeholder="选择严重性"
  35. dict-code="dlycyzx"
  36. />
  37. </a-form-item>
  38. <a-form-item>
  39. <a-button type="primary" @click="searchQuery">查询</a-button>
  40. <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
  41. </a-form-item>
  42. </a-form>
  43. </div>
  44. <!-- table区域-begin -->
  45. <div>
  46. <a-table
  47. ref="table"
  48. size="middle"
  49. bordered
  50. row-key="id"
  51. :columns="columns"
  52. :data-source="dataSource"
  53. :pagination="ipagination"
  54. :loading="loading"
  55. @change="handleTableChange"
  56. />
  57. </div>
  58. <!-- table区域-end -->
  59. <!-- 表单区域 -->
  60. </div>
  61. </template>
  62. <script>
  63. import {listMixin} from '@/mixin/listMixin'
  64. import columns from './tab3Columns'
  65. import {getAction} from '@/api/request'
  66. export default {
  67. name: 'Tab3',
  68. components: {},
  69. mixins: [listMixin],
  70. data() {
  71. return {
  72. // 查询条件
  73. queryParam: {},
  74. treeData: [],
  75. // 表头
  76. columns: columns(this),
  77. url: {
  78. list: '/show/bpdjxjh/list',
  79. delete: '/business/catenary/bus/jcb/fdfxjyq/',
  80. tree: '/system/dept/treeSelect',
  81. exportXlsUrl: '/business/catenary/bus/jcb/fdfxjyq/export'
  82. }
  83. }
  84. },
  85. created() {
  86. this.loadTree()
  87. },
  88. methods: {
  89. loadTree() {
  90. this.treeData = []
  91. getAction(this.url.tree).then((res) => {
  92. if (res.code === 200) {
  93. this.treeData = res.data
  94. }
  95. })
  96. }
  97. }
  98. }
  99. </script>
  100. <style scoped>
  101. @import '~@/assets/less/common.less'
  102. </style>