<template>
|
<ProTableQueryFilterBar @on-reset="reset">
|
<template #query>
|
<QueryFilterItem>
|
<SearchInput
|
v-model="extraParamState.searchKeyWord"
|
style="width: 250px"
|
placeholder="企业名/信用代码"
|
@on-click-search="getList"
|
>
|
</SearchInput>
|
</QueryFilterItem>
|
</template>
|
</ProTableQueryFilterBar>
|
<ProTableV2
|
v-bind="proTableProps"
|
:columns="column"
|
:operationBtns="operationBtns"
|
:autoHeight="false"
|
:tableProps="{
|
maxHeight: '400px',
|
}"
|
>
|
<template #licenseUrl="{ row }">
|
<PreviewBtnV2 :url="setOSSLink(row.licenseUrl)"></PreviewBtnV2>
|
</template>
|
</ProTableV2>
|
</template>
|
|
<script setup lang="ts">
|
import {
|
ProTableQueryFilterBar,
|
QueryFilterItem,
|
ProTableV2,
|
SearchInput,
|
defineOperationBtns,
|
defineColumns,
|
PreviewBtnV2,
|
} from '@bole-core/components';
|
import { setOSSLink } from '@/utils';
|
import { BaseDeclareEnterpriseTableViewColumns } from '@/constants';
|
|
defineOptions({
|
name: 'DeclareEnterpriseTableView',
|
});
|
|
type Props = {
|
getList: (pageIndex?: number) => Promise<void>;
|
reset: () => void;
|
proTableProps: any;
|
extraParamState: {
|
searchKeyWord: string;
|
};
|
openDialog?: (row) => void;
|
column?: API.ModuleColumnDto[];
|
};
|
|
const props = withDefaults(defineProps<Props>(), {
|
column: () => BaseDeclareEnterpriseTableViewColumns,
|
});
|
|
const operationBtns = defineOperationBtns([
|
{
|
data: {
|
enCode: 'detailBtn',
|
name: '详情',
|
},
|
emits: {
|
onClick: (role) => props.openDialog(role),
|
},
|
},
|
]);
|
</script>
|
|
<style lang="scss" scoped>
|
@use '@/style/common.scss' as *;
|
</style>
|