index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <el-card class="content-z">
  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-button ghost type="danger" icon="download" @click="handleExportXls('角色信息')">导出</a-button>-->
  9. <!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
  10. <!-- <a-menu slot="overlay">-->
  11. <!-- <a-menu-item key="1" @click="batchDel">-->
  12. <!-- <a-icon type="delete" />-->
  13. <!-- 删除-->
  14. <!-- </a-menu-item>-->
  15. <!-- </a-menu>-->
  16. <!-- <a-button style="margin-left: 8px">-->
  17. <!-- 批量操作-->
  18. <!-- <a-icon type="down" />-->
  19. <!-- </a-button>-->
  20. <!-- </a-dropdown>-->
  21. </div>
  22. <a-form layout="inline" @keyup.enter.native="searchQuery">
  23. <a-form-model-item>
  24. <j-dict-select-tag
  25. v-model="queryParam.jcebType"
  26. style="width: 200px"
  27. placeholder="选择检测记录类型"
  28. dict-code="jcebType"
  29. />
  30. </a-form-model-item>
  31. <a-form-item>
  32. <a-tree-select
  33. v-model="queryParam.deptId"
  34. style="width: 150px"
  35. :show-search="true"
  36. allow-clear
  37. placeholder="选择车间"
  38. :tree-data="treeData"
  39. tree-node-filter-prop="label"
  40. :replace-fields="{children:'children', title:'label', key:'id', value: 'id' }"
  41. />
  42. </a-form-item>
  43. <a-form-item>
  44. <j-list-select-tag
  45. v-model="queryParam.stationId"
  46. style="width: 150px"
  47. placeholder="选择站场区间"
  48. dict-code="station"
  49. />
  50. </a-form-item>
  51. <a-form-item>
  52. <a-input
  53. v-model="queryParam.operator"
  54. style="width: 150px"
  55. placeholder="输入记录人"
  56. />
  57. </a-form-item>
  58. <a-form-item>
  59. <a-button type="primary" @click="searchQuery">查询</a-button>
  60. <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
  61. </a-form-item>
  62. </a-form>
  63. </div>
  64. <!-- table区域-begin -->
  65. <div>
  66. <div class="ant-alert ant-alert-info" style="margin: 16px 0;">
  67. <i class="anticon anticon-info-circle ant-alert-icon" /> 已选择&nbsp;<a style="font-weight: 600">{{
  68. selectedRowKeys.length }}</a>项&nbsp;&nbsp;
  69. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  70. </div>
  71. <a-table
  72. ref="table"
  73. size="middle"
  74. bordered
  75. row-key="id"
  76. :columns="columns"
  77. :data-source="dataSource"
  78. :pagination="ipagination"
  79. :loading="loading"
  80. :row-selection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  81. @change="handleTableChange"
  82. />
  83. </div>
  84. <!-- table区域-end -->
  85. <!-- 表单区域 -->
  86. </el-card>
  87. </template>
  88. <script>
  89. import { listMixin } from '@/mixin/listMixin'
  90. import columns from './indexColumns'
  91. import { getAction } from '@/api/request'
  92. export default {
  93. components: {},
  94. mixins: [listMixin],
  95. data() {
  96. return {
  97. // 查询条件
  98. queryParam: { jcebType: 'gjsfx' },
  99. treeData: [],
  100. // 表头
  101. columns: columns(this),
  102. url: {
  103. list: '/business/catenary/bus/jceb/view/listByType',
  104. tree: '/system/dept/treeSelect',
  105. exportXlsUrl: '/business/catenary/bus/jceb/view/exportExcel'
  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>