tab2.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. </a-form-item>
  28. <a-form-item>
  29. <a-input
  30. v-model="queryParam.substationName"
  31. style="width: 150px"
  32. placeholder="所亭名称"
  33. />
  34. </a-form-item>
  35. <a-form-item>
  36. <a-input
  37. v-model="queryParam.sbmc"
  38. style="width: 150px"
  39. placeholder="设备名称"
  40. />
  41. </a-form-item>
  42. <a-form-item>
  43. <a-date-picker :showToday="true" :locale="localeZH" valueFormat="YYYY-MM-DD" v-model="queryParam.testPlanDateStart" placeholder="计划时间(起始)"/>
  44. </a-form-item>
  45. <a-form-item>
  46. <a-date-picker :showToday="true" :locale="localeZH" valueFormat="YYYY-MM-DD" v-model="queryParam.testPlanDateEnd" placeholder="计划时间(结束)"/>
  47. </a-form-item>
  48. <a-form-item>
  49. <a-date-picker :showToday="true" :locale="localeZH" valueFormat="YYYY-MM-DD" v-model="queryParam.completionDateStart" placeholder="实际时间(起始)"/>
  50. </a-form-item>
  51. <a-form-item>
  52. <a-date-picker :showToday="true" :locale="localeZH" valueFormat="YYYY-MM-DD" v-model="queryParam.completionDateEnd" placeholder="实际时间(结束)"/>
  53. </a-form-item>
  54. <a-form-item>
  55. <a-button type="primary" @click="searchQuery">查询</a-button>
  56. <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
  57. </a-form-item>
  58. </a-form>
  59. </div>
  60. <!-- table区域-begin -->
  61. <div>
  62. <a-table
  63. :scroll="{ x: 500 | true,y: 'calc(100vh - 400px)'}"
  64. ref="table"
  65. size="middle"
  66. bordered
  67. row-key="id"
  68. :columns="columns"
  69. :data-source="dataSource"
  70. :pagination="ipagination"
  71. :loading="loading"
  72. @change="handleTableChange"
  73. />
  74. </div>
  75. <!-- table区域-end -->
  76. <!-- 表单区域 -->
  77. </div>
  78. </template>
  79. <script>
  80. import {listMixin} from '@/mixin/listMixin'
  81. import columns from './tab2Columns'
  82. import {getAction} from '@/api/request'
  83. export default {
  84. name: 'Tab2',
  85. components: {},
  86. mixins: [listMixin],
  87. data() {
  88. return {
  89. // 查询条件
  90. queryParam: {},
  91. treeData: [],
  92. // 表头
  93. columns: columns(this),
  94. url: {
  95. list: '/show/sbxj/listBd',
  96. delete: '/business/catenary/bus/jcb/fdfxjyq/',
  97. tree: '/system/dept/treeSelect',
  98. exportXlsUrl: '/business/catenary/bus/jcb/fdfxjyq/export'
  99. }
  100. }
  101. },
  102. created() {
  103. this.loadTree()
  104. },
  105. methods: {
  106. loadTree() {
  107. this.treeData = []
  108. getAction(this.url.tree).then((res) => {
  109. if (res.code === 200) {
  110. this.treeData = res.data
  111. }
  112. })
  113. }
  114. }
  115. }
  116. </script>
  117. <style scoped>
  118. @import '~@/assets/less/common.less'
  119. </style>