From 53b0a0b7b5594e1e4ff6036703fa00af84c5ea9f Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期一, 16 六月 2025 19:24:03 +0800 Subject: [PATCH] fix: bug --- src/components/commonView/DeclareEnterpriseTableView.vue | 113 ++++++++++---------------------------------------------- 1 files changed, 20 insertions(+), 93 deletions(-) diff --git a/src/components/commonView/DeclareEnterpriseTableView.vue b/src/components/commonView/DeclareEnterpriseTableView.vue index d067305..8fdd4d1 100644 --- a/src/components/commonView/DeclareEnterpriseTableView.vue +++ b/src/components/commonView/DeclareEnterpriseTableView.vue @@ -21,8 +21,10 @@ maxHeight: '400px', }" > + <template #licenseUrl="{ row }"> + <PreviewBtnV2 :url="setOSSLink(row.licenseUrl)"></PreviewBtnV2> + </template> </ProTableV2> - <MateriaDetailDialog v-bind="dialogProps"></MateriaDetailDialog> </template> <script setup lang="ts"> @@ -31,61 +33,31 @@ QueryFilterItem, ProTableV2, SearchInput, - useFormDialog, - useTable, defineOperationBtns, defineColumns, + PreviewBtnV2, } from '@bole-core/components'; -import MateriaDetailDialog from './MateriaDetailDialog.vue'; -import { FourStreamsMaterialFileTableItem } from './types'; -import { OrderInputType } from '@bole-core/core'; -import * as parkBountyApplyServices from '@/services/api/ParkBountyApply'; +import { setOSSLink } from '@/utils'; +import { BaseDeclareEnterpriseTableViewColumns } from '@/constants'; defineOptions({ name: 'DeclareEnterpriseTableView', }); -type Props = {}; +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>(), {}); - -const column = defineColumns([ - { - id: '1', - enCode: 'accDateTime', - name: '甯愬彿', - }, - { - id: '2', - enCode: 'enterpriseName', - name: '浼佷笟鍚嶇О', - }, - { - id: '3', - enCode: 'societyCreditCode', - name: '淇$敤浠g爜', - }, - { - id: '4', - enCode: 'contactPhone', - name: '鐢佃瘽', - }, - { - id: '5', - enCode: 'authType', - name: '浼佷笟绫诲瀷', - }, - { - id: '6', - enCode: 'licenseUrl', - name: '钀ヤ笟鎵х収', - }, - { - id: '7', - enCode: 'bankAccountInfo', - name: '鍩烘湰鎴蜂俊鎭�', - }, -]); +const props = withDefaults(defineProps<Props>(), { + column: () => BaseDeclareEnterpriseTableViewColumns, +}); const operationBtns = defineOperationBtns([ { @@ -94,55 +66,10 @@ name: '璇︽儏', }, emits: { - onClick: (role) => openDialog(role), + onClick: (role) => props.openDialog(role), }, }, ]); - -const { - getDataSource: getList, - proTableProps, - paginationState, - extraParamState, - reset, -} = useTable( - async ({ pageIndex, pageSize }, extraParamState) => { - try { - let params: API.GetParkBountyApplyInfoInput = { - pageModel: { - rows: pageSize, - page: pageIndex, - orderInput: extraParamState.orderInput, - }, - searchKeyWord: extraParamState.searchKeyWord, - }; - let res = await parkBountyApplyServices.getParkBountyApplyDetailList(params); - return res; - } catch (error) {} - }, - { - defaultExtraParams: { - orderInput: [{ property: 'creationTime', order: OrderInputType.Desc }], - searchKeyWord: '', - }, - } -); - -const { dialogProps, handleEdit, editForm } = useFormDialog({ - defaultFormParams: { - list: [] as FourStreamsMaterialFileTableItem[], - }, -}); - -function openDialog(row?: API.ParkBountyApplyDetailInfo) { - handleEdit({ - list: [], - }); -} - -defineExpose({ - getList, -}); </script> <style lang="scss" scoped> -- Gitblit v1.9.1