|
@@ -0,0 +1,174 @@
|
|
|
+<template>
|
|
|
+ <div class="card-search">
|
|
|
+ <a-form ref="formRef" name="advanced_search" class="ant-advanced-search-form" :model="searchParams">
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="6">
|
|
|
+ <a-form-item label="企业名称" :label-col="{span:6}" name="companyName">
|
|
|
+ <a-input v-model:value="searchParams.companyName" placeholder="" :allow-clear="true"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="6">
|
|
|
+ <a-form-item label="统一信用代码" :label-col="{span:6}" name="companyCode">
|
|
|
+ <a-input v-model:value="searchParams.companyCode" placeholder="" :allow-clear="true"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="6">
|
|
|
+ <a-form-item label="企业状态" :label-col="{span:6}" name="recordStatus">
|
|
|
+
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="6" style="text-align: left">
|
|
|
+ <a-button type="primary" html-type="submit" @click="onSearch">查询</a-button>
|
|
|
+ <a-button
|
|
|
+ style="margin: 0 8px"
|
|
|
+ @click="
|
|
|
+ () => {
|
|
|
+ formRef.resetFields();
|
|
|
+ onSearch();
|
|
|
+ }
|
|
|
+ ">重置
|
|
|
+ </a-button>
|
|
|
+ <a style="font-size: 12px" @click="expand = !expand">
|
|
|
+ <template v-if="expand">
|
|
|
+ <UpOutlined/>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <DownOutlined/>
|
|
|
+ </template>
|
|
|
+ {{ expand ? '收缩' : '展开' }}
|
|
|
+ </a>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row class="edit-operation">
|
|
|
+ <a-col :span="24" class="flex-space-between">
|
|
|
+ <div>
|
|
|
+ <!-- 表格字段筛选按钮 -->
|
|
|
+ <ColumnsSetting :table-columns="originalColumns" :checked-table-columns="columns"
|
|
|
+ @on-check="columnsCheckSub"></ColumnsSetting>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ </div>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ <div class="search-result-list">
|
|
|
+ <a-table :columns="columns" :data-source="dataList" :scroll="{ x:'100%', y: 500 }" :pagination="pagination"
|
|
|
+ :loading="formState.loading"
|
|
|
+ @change="handleTableChange"
|
|
|
+ :row-selection="{ selectedRowKeys: formState.selectedRowKeys, onChange: onSelectChange}"
|
|
|
+ :row-key="record=>record.companyID"
|
|
|
+ bordered>
|
|
|
+ <template #bodyCell="{ column, text, record }">
|
|
|
+ <template v-if="column.key === 'operation'">
|
|
|
+ <div class="table-operation">
|
|
|
+ <a-button type="link" size="small" @click='onDetail(record)' functioncode="T01020101">查看</a-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+ <PositionShowModal ref="modalShowRef"></PositionShowModal>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+import ColumnsSetting from "@/components/common/ColumnsSetting.vue";
|
|
|
+import {DownOutlined, UpOutlined} from "@ant-design/icons-vue";
|
|
|
+import {computed, reactive, ref} from "vue";
|
|
|
+import type {FormInstance, TableProps} from "ant-design-vue";
|
|
|
+import PositionShowModal from "@/views/companyService/company/show.vue";
|
|
|
+import {getPaginationTotalTitle} from "@/utils/common";
|
|
|
+import {getList} from "@/api/companyService/company";
|
|
|
+import {getGigMarketList} from "@/api/companyService/gigMarket";
|
|
|
+
|
|
|
+const formRef = ref<FormInstance>(null);
|
|
|
+const expand = ref(false);
|
|
|
+const searchParams = reactive({
|
|
|
+ pageIndex: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ companyName: '',
|
|
|
+ companyCode: '',
|
|
|
+ recordStatus: '',
|
|
|
+ regionCode: '',
|
|
|
+ streetCode: '',
|
|
|
+ siteID: "",
|
|
|
+ startDate: "",
|
|
|
+ endDate: "",
|
|
|
+ postCountSorter: "",
|
|
|
+ companyTypeID: "",
|
|
|
+ industryID: "",
|
|
|
+ createUserName: ""
|
|
|
+});
|
|
|
+// 原始表格定义数据
|
|
|
+const originalColumns = [
|
|
|
+ {
|
|
|
+ title: '序号',
|
|
|
+ align: "center",
|
|
|
+ key: 'companyID',
|
|
|
+ width: 60,
|
|
|
+ customRender: item => `${searchParams.pageSize * (searchParams.pageIndex - 1) + item.index + 1}`,
|
|
|
+ isDisabled: true
|
|
|
+ },
|
|
|
+ {title: '企业名称', dataIndex: 'companyName', key: 'companyName', width: 200, align: "center"},
|
|
|
+ {title: '操作', key: 'operation', fixed: 'right', width: 150, align: "center", isDisabled: true},
|
|
|
+];
|
|
|
+// 响应式表格定义
|
|
|
+const columns = ref<Array<any>>(originalColumns.filter(item => !item.isDefaultClose));
|
|
|
+const pagination = computed(() => ({
|
|
|
+ total: formState.total,
|
|
|
+ current: searchParams.pageIndex,
|
|
|
+ pageSize: searchParams.pageSize,
|
|
|
+ showSizeChanger: true,
|
|
|
+ showTotal: total => getPaginationTotalTitle(total)
|
|
|
+}));
|
|
|
+const handleTableChange: TableProps['onChange'] = (pag: {
|
|
|
+ pageSize: number;
|
|
|
+ current: number,
|
|
|
+}, filters, sorter: any) => {
|
|
|
+ console.log(filters);
|
|
|
+ searchParams.pageIndex = pag.current;
|
|
|
+ searchParams.pageSize = pag.pageSize;
|
|
|
+ searchParams.postCountSorter = sorter.order;
|
|
|
+ loadData();
|
|
|
+};
|
|
|
+const onSelectChange = (selectedRowKeys: any) => {
|
|
|
+ formState.selectedRowKeys = selectedRowKeys;
|
|
|
+};
|
|
|
+
|
|
|
+const dataList = ref([]);
|
|
|
+const formState = reactive({
|
|
|
+ total: 0,
|
|
|
+ selectedRowKeys: [],
|
|
|
+ loading: false
|
|
|
+});
|
|
|
+
|
|
|
+// 数据加载
|
|
|
+async function loadData() {
|
|
|
+ formState.loading = true;
|
|
|
+ getGigMarketList(searchParams).then((result) => {
|
|
|
+ console.log(result);
|
|
|
+ }).finally(() => {
|
|
|
+ formState.loading = false;
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+// 查询按钮
|
|
|
+function onSearch() {
|
|
|
+ loadData();
|
|
|
+}
|
|
|
+
|
|
|
+// 查看详情
|
|
|
+function onDetail(record) {
|
|
|
+ console.log(record)
|
|
|
+}
|
|
|
+
|
|
|
+// 字段展示列选择完毕
|
|
|
+function columnsCheckSub(columnsKeys: Array<string>) {
|
|
|
+ // 从原始表格定义数据中过滤出已选择的字段
|
|
|
+ columns.value = originalColumns.filter((item: any) => columnsKeys.includes(item.key));
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+
|
|
|
+</style>
|