|
|
@@ -2,7 +2,7 @@
|
|
|
<!-- 实时敞口-->
|
|
|
<div class="exposure-real-time table-height"
|
|
|
:loading="loading">
|
|
|
- <filterCustomTable @search="search">
|
|
|
+ <filterCustomTable @search="updateColumn">
|
|
|
<BtnList :btnList="commonBtn" />
|
|
|
</filterCustomTable>
|
|
|
<contextMenu :contextMenuList="forDataBtn">
|
|
|
@@ -15,9 +15,12 @@
|
|
|
:data-source="tableList">
|
|
|
</a-table>
|
|
|
</contextMenu>
|
|
|
- <a-drawer placement="bottom"
|
|
|
+ <Description v-if="visibleComponent"
|
|
|
+ @close="closeComponent"
|
|
|
+ :tabList="tabList" />
|
|
|
+ <!-- <a-drawer placement="bottom"
|
|
|
:closable="false"
|
|
|
- :visible="visible"
|
|
|
+ :visible="true"
|
|
|
:get-container="false"
|
|
|
:wrap-style="{ position: 'absolute' }"
|
|
|
@close="closeDrawer">
|
|
|
@@ -31,7 +34,7 @@
|
|
|
<ThridMenu :list="tabList"
|
|
|
@selectMenu="selectMenu" />
|
|
|
</div>
|
|
|
- </a-drawer>
|
|
|
+ </a-drawer> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -50,6 +53,10 @@ import ThridMenu from '@/common/components/thirdMenu/index.vue';
|
|
|
import { ColumnType } from '@/common/methods/table';
|
|
|
import { TableKey } from '@/common/methods/table/interface';
|
|
|
import BtnList from '@/common/components/buttonList/index.vue';
|
|
|
+import Description from '@/common/components/description/index.vue';
|
|
|
+import { handleControlComponentsIsShow } from '@/common/setup/control';
|
|
|
+import { getTableColumns, getTableEvent, queryTableList } from '@/common/setup/table';
|
|
|
+import { TableEventCB } from '@/common/setup/table/interface';
|
|
|
|
|
|
// 获取表格数据
|
|
|
function getExposure() {
|
|
|
@@ -74,7 +81,7 @@ function getExposure() {
|
|
|
|
|
|
// 控制是否打开明细
|
|
|
function handleDrawer() {
|
|
|
- const visible = ref<boolean>(false);
|
|
|
+ const visible = ref<boolean>(true);
|
|
|
function closeDrawer() {
|
|
|
visible.value = !visible.value;
|
|
|
}
|
|
|
@@ -137,28 +144,44 @@ function handleDeatil(loading: Ref<boolean>, selectedRow: ErmcpRealExposureModel
|
|
|
}
|
|
|
return { tabList, selectMenu, detailTableList, detailColumns };
|
|
|
}
|
|
|
-
|
|
|
+interface Value extends ErmcpRealExposureModel {
|
|
|
+ key: string;
|
|
|
+}
|
|
|
export default defineComponent({
|
|
|
name: 'exposure-real-time',
|
|
|
components: {
|
|
|
+ Description,
|
|
|
contextMenu,
|
|
|
filterCustomTable,
|
|
|
ThridMenu,
|
|
|
BtnList,
|
|
|
},
|
|
|
setup() {
|
|
|
+ // 控制是否加载组件
|
|
|
+ const { visibleComponent, openComponent, closeComponent } = handleControlComponentsIsShow();
|
|
|
const { visible, closeDrawer } = handleDrawer();
|
|
|
- const { columns, search, getColumns } = getColumsAndSearch('table_pcweb_exposure', true);
|
|
|
+ // 表头数据
|
|
|
+ const { columns, registerColumn, updateColumn } = getTableColumns();
|
|
|
+ // const { columns, search, getColumns } = getColumsAndSearch('table_pcweb_exposure', true);
|
|
|
|
|
|
- const { expandedRowKeys, selectedRow, Rowclick } = handleTableEvent<ErmcpRealExposureModel>(closeDrawer);
|
|
|
- const { loading, tableList, queryList } = getExposure();
|
|
|
+ // const { expandedRowKeys, selectedRow, Rowclick } = handleTableEvent<ErmcpRealExposureModel>(closeDrawer);
|
|
|
+ const events: TableEventCB = {
|
|
|
+ clickCB: (value: Value) => {
|
|
|
+ openComponent();
|
|
|
+ },
|
|
|
+ };
|
|
|
+ const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<ErmcpRealExposureModel>(events);
|
|
|
+ // 表格列表数据
|
|
|
+ const { loading, tableList, queryTable } = queryTableList<ErmcpRealExposureModel>();
|
|
|
+ // const { loading, tableList, queryList } = getExposure();
|
|
|
const { commonBtn, forDataBtn } = getBtnList('exposure_realtime', false);
|
|
|
|
|
|
initData(() => {
|
|
|
- queryList();
|
|
|
- getColumns();
|
|
|
+ queryTable(QueryActualExposure);
|
|
|
+ registerColumn('table_pcweb_exposure', []);
|
|
|
+ // getColumns();
|
|
|
});
|
|
|
- return { commonBtn, forDataBtn, loading, tableList, visible, closeDrawer, columns, search, expandedRowKeys, selectedRow, Rowclick, ...handleDeatil(loading, (selectedRow as unknown) as ErmcpRealExposureModel) };
|
|
|
+ return { commonBtn, forDataBtn, loading, tableList, visible, closeDrawer, columns, updateColumn, closeComponent, expandedRowKeys, visibleComponent, selectedRow, Rowclick, ...handleDeatil(loading, (selectedRow as unknown) as ErmcpRealExposureModel) };
|
|
|
},
|
|
|
});
|
|
|
</script>
|