tab3.vue 2.6 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-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. <j-dict-select-tag
  23. v-model="queryParam.ssgq"
  24. style="width: 150px"
  25. placeholder="选择工区"
  26. dict-code="dlyc_sygq"
  27. />
  28. </a-form-item>
  29. <a-form-item>
  30. <j-dict-select-tag
  31. v-model="queryParam.gravity"
  32. style="width: 150px"
  33. placeholder="选择严重性"
  34. dict-code="dlycyzx"
  35. />
  36. </a-form-item>
  37. <a-form-item>
  38. <a-button type="primary" @click="searchQuery">查询</a-button>
  39. <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
  40. </a-form-item>
  41. </a-form>
  42. </div>
  43. <!-- table区域-begin -->
  44. <div>
  45. <a-table
  46. :scroll="{ x: 500 | true,y: 'calc(100vh - 400px)'}"
  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: 'Tab2',
  68. components: {},
  69. mixins: [listMixin],
  70. data() {
  71. return {
  72. // 查询条件
  73. queryParam: {},
  74. treeData: [],
  75. // 表头
  76. columns: columns(this),
  77. url: {
  78. list: '/show/gsy/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>