tab6.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. :scroll="{ x: 500 | true}"
  48. ref="table"
  49. size="middle"
  50. bordered
  51. row-key="id"
  52. :columns="columns"
  53. :data-source="dataSource"
  54. :pagination="ipagination"
  55. :loading="loading"
  56. @change="handleTableChange"
  57. />
  58. </div>
  59. <!-- table区域-end -->
  60. <!-- 表单区域 -->
  61. </div>
  62. </template>
  63. <script>
  64. import { listMixin } from '@/mixin/listMixin'
  65. import columns from './tab6Columns'
  66. import { getAction } from '@/api/request'
  67. export default {
  68. name: 'Tab6',
  69. components: {},
  70. mixins: [listMixin],
  71. data() {
  72. return {
  73. // 查询条件
  74. queryParam: {},
  75. treeData: [],
  76. // 表头
  77. columns: columns(this),
  78. url: {
  79. list: '/show/sbxj/list',
  80. delete: '/business/catenary/bus/jcb/fdfxjyq/',
  81. tree: '/system/dept/treeSelect',
  82. exportXlsUrl: '/business/catenary/bus/jcb/fdfxjyq/export'
  83. }
  84. }
  85. },
  86. created() {
  87. this.loadTree()
  88. },
  89. methods: {
  90. loadTree() {
  91. this.treeData = []
  92. getAction(this.url.tree).then((res) => {
  93. if (res.code === 200) {
  94. this.treeData = res.data
  95. }
  96. })
  97. }
  98. }
  99. }
  100. </script>
  101. <style scoped>
  102. @import '~@/assets/less/common.less'
  103. </style>