tab6.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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="danger" icon="download" @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. <div class="ant-alert ant-alert-info" style="margin: 16px 0;">
  47. <i class="anticon anticon-info-circle ant-alert-icon"/> 已选择&nbsp;<a
  48. style="font-weight: 600"
  49. >{{ selectedRowKeys.length }}</a>项&nbsp;&nbsp;
  50. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  51. </div>
  52. <a-table
  53. ref="table"
  54. size="middle"
  55. bordered
  56. row-key="id"
  57. :columns="columns"
  58. :data-source="dataSource"
  59. :pagination="ipagination"
  60. :loading="loading"
  61. @change="handleTableChange"
  62. />
  63. </div>
  64. <!-- table区域-end -->
  65. <!-- 表单区域 -->
  66. </div>
  67. </template>
  68. <script>
  69. import {listMixin} from '@/mixin/listMixin'
  70. import columns from './tab6Columns'
  71. import {getAction} from '@/api/request'
  72. export default {
  73. name: 'Tab6',
  74. components: {},
  75. mixins: [listMixin],
  76. data() {
  77. return {
  78. // 查询条件
  79. queryParam: {},
  80. treeData: [],
  81. // 表头
  82. columns: columns(this),
  83. url: {
  84. list: '/show/dlyc/list',
  85. delete: '/business/catenary/bus/jcb/fdfxjyq/',
  86. tree: '/system/dept/treeSelect',
  87. exportXlsUrl: '/business/catenary/bus/jcb/fdfxjyq/export'
  88. }
  89. }
  90. },
  91. created() {
  92. this.loadTree()
  93. },
  94. methods: {
  95. loadTree() {
  96. this.treeData = []
  97. getAction(this.url.tree).then((res) => {
  98. if (res.code === 200) {
  99. this.treeData = res.data
  100. }
  101. })
  102. }
  103. }
  104. }
  105. </script>
  106. <style scoped>
  107. @import '~@/assets/less/common.less'
  108. </style>