zzBd.vue 2.6 KB

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