| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <template>
- <el-card class="content-z">
- <!-- 查询区域 -->
- <div class="table-page-search-wrapper">
- <!-- 操作按钮区域 -->
- <div class="table-operator" style="margin: 5px 0;float: right">
- <a-button ghost type="danger" icon="download" @click="handleExportXls()">导出</a-button>
- <!-- <a-button ghost type="danger" icon="download" @click="handleExportXls('角色信息')">导出</a-button>-->
- <!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
- <!-- <a-menu slot="overlay">-->
- <!-- <a-menu-item key="1" @click="batchDel">-->
- <!-- <a-icon type="delete" />-->
- <!-- 删除-->
- <!-- </a-menu-item>-->
- <!-- </a-menu>-->
- <!-- <a-button style="margin-left: 8px">-->
- <!-- 批量操作-->
- <!-- <a-icon type="down" />-->
- <!-- </a-button>-->
- <!-- </a-dropdown>-->
- </div>
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-form-model-item>
- <j-dict-select-tag
- v-model="queryParam.jcebType"
- style="width: 200px"
- placeholder="选择检测记录类型"
- dict-code="jcebType"
- />
- </a-form-model-item>
- <a-form-item>
- <a-tree-select
- v-model="queryParam.deptId"
- style="width: 150px"
- :show-search="true"
- allow-clear
- placeholder="选择车间"
- :tree-data="treeData"
- tree-node-filter-prop="label"
- :replace-fields="{children:'children', title:'label', key:'id', value: 'id' }"
- />
- </a-form-item>
- <a-form-item>
- <j-list-select-tag
- v-model="queryParam.stationId"
- style="width: 150px"
- placeholder="选择站场区间"
- dict-code="station"
- />
- </a-form-item>
- <a-form-item>
- <a-input
- v-model="queryParam.operator"
- style="width: 150px"
- placeholder="输入记录人"
- />
- </a-form-item>
- <a-form-item>
- <a-button type="primary" @click="searchQuery">查询</a-button>
- <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
- </a-form-item>
- </a-form>
- </div>
- <!-- table区域-begin -->
- <div>
- <div class="ant-alert ant-alert-info" style="margin: 16px 0;">
- <i class="anticon anticon-info-circle ant-alert-icon" /> 已选择 <a style="font-weight: 600">{{
- selectedRowKeys.length }}</a>项
- <a style="margin-left: 24px" @click="onClearSelected">清空</a>
- </div>
- <a-table
- ref="table"
- size="middle"
- bordered
- row-key="id"
- :columns="columns"
- :data-source="dataSource"
- :pagination="ipagination"
- :loading="loading"
- :row-selection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
- @change="handleTableChange"
- />
- </div>
- <!-- table区域-end -->
- <!-- 表单区域 -->
- </el-card>
- </template>
- <script>
- import { listMixin } from '@/mixin/listMixin'
- import columns from './indexColumns'
- import { getAction } from '@/api/request'
- export default {
- components: {},
- mixins: [listMixin],
- data() {
- return {
- // 查询条件
- queryParam: { jcebType: 'gjsfx' },
- treeData: [],
- // 表头
- columns: columns(this),
- url: {
- list: '/business/catenary/bus/jceb/view/listByType',
- tree: '/system/dept/treeSelect',
- exportXlsUrl: '/business/catenary/bus/jceb/view/exportExcel'
- }
- }
- },
- created() {
- this.loadTree()
- },
- methods: {
- loadTree() {
- this.treeData = []
- getAction(this.url.tree).then((res) => {
- if (res.code === 200) {
- this.treeData = res.data
- }
- })
- }
- }
- }
- </script>
- <style scoped>
- @import '~@/assets/less/common.less'
- </style>
|