tab1.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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. <!-- <a-input-->
  23. <!-- v-model="queryParam.lineName"-->
  24. <!-- style="width: 150px"-->
  25. <!-- placeholder="线别"-->
  26. <!-- />-->
  27. <j-dict-select-tag
  28. ref="xbEl"
  29. v-model="queryParam.lineName"
  30. style="width: 150px"
  31. placeholder="线别"
  32. />
  33. </a-form-item>
  34. <a-form-item>
  35. <j-dict-select-tag
  36. v-model="queryParam.gravity"
  37. style="width: 150px"
  38. placeholder="缺陷等级"
  39. dict-code="dlycyzx"
  40. />
  41. </a-form-item>
  42. <a-form-item>
  43. <a-input
  44. v-model="queryParam.zrbm"
  45. style="width: 150px"
  46. placeholder="责任部门"
  47. />
  48. </a-form-item>
  49. <a-form-item>
  50. <j-dict-select-tag
  51. v-model="queryParam.ssgq"
  52. style="width: 150px"
  53. placeholder="选择工区"
  54. dict-code="dlyc_sygq"
  55. />
  56. </a-form-item>
  57. <a-form-item>
  58. <j-dict-select-tag
  59. v-model="queryParam.rectifyResult"
  60. style="width: 150px"
  61. placeholder="整改情况"
  62. dict-code="bdyc_clqk"
  63. />
  64. </a-form-item>
  65. <a-form-item>
  66. <a-button type="primary" @click="searchQuery">查询</a-button>
  67. <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
  68. </a-form-item>
  69. </a-form>
  70. </div>
  71. <!-- table区域-begin -->
  72. <div>
  73. <a-table
  74. :scroll="{ x: 500 | true,y: 'calc(100vh - 400px)'}"
  75. ref="table"
  76. size="middle"
  77. bordered
  78. row-key="id"
  79. :columns="columns"
  80. :data-source="dataSource"
  81. :pagination="ipagination"
  82. :loading="loading"
  83. @change="handleTableChange"
  84. />
  85. </div>
  86. <!-- table区域-end -->
  87. <!-- 表单区域 -->
  88. </div>
  89. </template>
  90. <script>
  91. import {listMixin} from '@/mixin/listMixin'
  92. import columns from './tab1Columns'
  93. import {getAction} from '@/api/request'
  94. export default {
  95. name: 'Tab1',
  96. components: {},
  97. mixins: [listMixin],
  98. data() {
  99. return {
  100. // 查询条件
  101. queryParam: {},
  102. treeData: [],
  103. // 表头
  104. columns: columns(this),
  105. url: {
  106. list: '/show/bdyc/list',
  107. delete: '/business/catenary/bus/jcb/fdfxjyq/',
  108. tree: '/system/dept/treeSelect',
  109. exportXlsUrl: '/business/catenary/bus/jcb/fdfxjyq/export'
  110. }
  111. }
  112. },
  113. created() {
  114. this.loadTree()
  115. },
  116. mounted() {
  117. getAction('/show/bdyc/listLine').then(res => {
  118. console.log('res', res)
  119. this.$refs.xbEl.dictOptions = res.data.map(item => {
  120. return {
  121. dictLabel: item,
  122. dictValue: item
  123. }
  124. })
  125. })
  126. },
  127. methods: {
  128. loadTree() {
  129. this.treeData = []
  130. getAction(this.url.tree).then((res) => {
  131. if (res.code === 200) {
  132. this.treeData = res.data
  133. }
  134. })
  135. }
  136. }
  137. }
  138. </script>
  139. <style scoped>
  140. @import '~@/assets/less/common.less'
  141. </style>