bd.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. <a-tree-select
  24. v-model="queryParam.deptId"
  25. style="width: 150px"
  26. :show-search="true"
  27. allow-clear
  28. placeholder="选择车间"
  29. :tree-data="treeData"
  30. tree-node-filter-prop="label"
  31. :replace-fields="{children:'children', title:'label', key:'id', value: 'id' }"
  32. />
  33. </a-form-item>
  34. <a-form-item>
  35. <j-list-select-tag
  36. v-model="queryParam.stationId"
  37. style="width: 150px"
  38. placeholder="选择站场区间"
  39. dict-code="station"
  40. />
  41. </a-form-item>
  42. <a-form-item>
  43. <a-input
  44. v-model="queryParam.pillarCode"
  45. style="width: 150px"
  46. placeholder="输入支柱号"
  47. />
  48. </a-form-item>
  49. <a-form-item>
  50. <a-input
  51. v-model="queryParam.checkUser"
  52. style="width: 150px"
  53. placeholder="输入检查人"
  54. />
  55. </a-form-item>
  56. <a-form-item>
  57. <a-button type="primary" @click="searchQuery">查询</a-button>
  58. <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
  59. </a-form-item>
  60. </a-form>
  61. </div>
  62. <!-- table区域-begin -->
  63. <div>
  64. <div class="ant-alert ant-alert-info" style="margin: 16px 0;">
  65. <i class="anticon anticon-info-circle ant-alert-icon"/> 已选择&nbsp;<a
  66. style="font-weight: 600"
  67. >{{ selectedRowKeys.length }}</a>项&nbsp;&nbsp;
  68. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  69. </div>
  70. <a-table
  71. ref="table"
  72. size="middle"
  73. bordered
  74. row-key="id"
  75. :columns="columns"
  76. :data-source="dataSource"
  77. :pagination="ipagination"
  78. :loading="loading"
  79. @change="handleTableChange"
  80. />
  81. </div>
  82. <!-- table区域-end -->
  83. <!-- 表单区域 -->
  84. </div>
  85. </template>
  86. <script>
  87. import {listMixin} from '@/mixin/listMixin'
  88. import columns from './bdColumns'
  89. import {getAction} from '@/api/request'
  90. export default {
  91. name: 'Bd',
  92. components: {},
  93. mixins: [listMixin],
  94. data() {
  95. return {
  96. // 查询条件
  97. queryParam: {},
  98. treeData: [],
  99. // 表头
  100. columns: columns(this),
  101. url: {
  102. list: '/business/catenary/bus/jcb/fdfxjyq/list',
  103. delete: '/business/catenary/bus/jcb/fdfxjyq/',
  104. tree: '/system/dept/treeSelect',
  105. exportXlsUrl: '/business/catenary/bus/jcb/fdfxjyq/export'
  106. }
  107. }
  108. },
  109. created() {
  110. this.loadTree()
  111. },
  112. methods: {
  113. loadTree() {
  114. this.treeData = []
  115. getAction(this.url.tree).then((res) => {
  116. if (res.code === 200) {
  117. this.treeData = res.data
  118. }
  119. })
  120. }
  121. }
  122. }
  123. </script>
  124. <style scoped>
  125. @import '~@/assets/less/common.less'
  126. </style>