|
|
@@ -6,7 +6,7 @@
|
|
|
<div class="real-time-header"
|
|
|
v-if="isPingAnOem()">
|
|
|
<span class="dialogSpan">每隔</span>
|
|
|
- <a-select class="typeSelect"
|
|
|
+ <a-select class="typeSelect real-time-select"
|
|
|
style="width: 100px"
|
|
|
v-model:value="timer"
|
|
|
@change="timerChange"
|
|
|
@@ -33,6 +33,10 @@
|
|
|
rowKey="key"
|
|
|
:data-source="tableList"
|
|
|
:scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
|
|
|
+ <template v-if="isPingAnOem()"
|
|
|
+ #index="{ index }">
|
|
|
+ <span>{{ index + 1 }}</span>
|
|
|
+ </template>
|
|
|
<!-- <template #DiffSpotQty="{ record }">
|
|
|
<span>{{ record.DiffSpotQty.toFixed(2) + " " + record.ENUMDICNAME }}</span>
|
|
|
</template> -->
|
|
|
@@ -88,7 +92,14 @@
|
|
|
<template #middlegoodsname="{ record }">
|
|
|
<span>{{ record.middlegoodsname + "/" + record.middlegoodscode}}</span>
|
|
|
</template>
|
|
|
-
|
|
|
+ <template v-if="isPingAnOem()"
|
|
|
+ #index="{ index }">
|
|
|
+ <span>{{ index + 1 }}</span>
|
|
|
+ </template>
|
|
|
+ <template v-if="isPingAnOem()"
|
|
|
+ #goodsname="{ text, record }">
|
|
|
+ <span>{{ text }}/{{record.goodscode}}</span>
|
|
|
+ </template>
|
|
|
<!-- 类型 -->
|
|
|
<template #contracttype="{ record }">
|
|
|
<span>{{ getPlanContractType(record.contracttype) }}</span>
|
|
|
@@ -110,12 +121,13 @@ import { TabList } from '@/common/components/description/interface';
|
|
|
import { handleComposeTable_detail } from '@/common/setup/table/compose';
|
|
|
import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
import { EnumRouterName } from '@/common/constants/enumRouterName';
|
|
|
-import { formatValue } from '@/common/methods';
|
|
|
+import { formatValue, initData } from '@/common/methods';
|
|
|
import { formatNumber } from '@/common/methods/format';
|
|
|
import { getBizTypeName, getContractTypeName, getLogType } from '@/common/constants/enumsName';
|
|
|
import { getPlanContractType } from '@/views/business/plan/setup';
|
|
|
import timerUtil from '@/utils/timer/timerUtil';
|
|
|
import { isPingAnOem } from '@/common/config/projectName';
|
|
|
+import { pingan_realTime_columns } from './setup';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: EnumRouterName.exposure_realtime,
|
|
|
@@ -137,10 +149,13 @@ export default defineComponent({
|
|
|
const queryTableAction = () => queryTable(QueryActualExposure);
|
|
|
const param: ComposeTableDetailParam = {
|
|
|
queryFn: queryTableAction, // 查询表格数据
|
|
|
- tableName: 'table_pcweb_exposure', // 表头key
|
|
|
+ // tableName: 'table_pcweb_exposure', // 表头key
|
|
|
tableFilterKey: ['MiddleGoodsName'], // 表格过滤字段
|
|
|
menuType: EnumRouterName.exposure_realtime, // 当前tab页对应的code
|
|
|
};
|
|
|
+ if (!isPingAnOem()) {
|
|
|
+ param.tableName = 'table_pcweb_exposure';
|
|
|
+ }
|
|
|
// 切换间隔时间
|
|
|
function timerChange() {
|
|
|
setTimer();
|
|
|
@@ -174,15 +189,25 @@ export default defineComponent({
|
|
|
Rowclick, // 表格事件
|
|
|
tabList,
|
|
|
} = handleComposeTable_detail<ErmcpRealExposureModel>(param);
|
|
|
-
|
|
|
+ const { listColumns, spotColumns, futureColumns } = pingan_realTime_columns();
|
|
|
+ initData(() => {
|
|
|
+ if (isPingAnOem()) {
|
|
|
+ columns.value = listColumns;
|
|
|
+ }
|
|
|
+ });
|
|
|
// 切换明细
|
|
|
function changeTab(index: number, current: TabList) {
|
|
|
const { code, lable } = current;
|
|
|
let fn = null;
|
|
|
if (code === 'exposure_realtime_spot_details') {
|
|
|
// 现货明细信息
|
|
|
- // 注册表头
|
|
|
- registerColumnDetail('table_pcweb_exposure_detail', []);
|
|
|
+ if (isPingAnOem()) {
|
|
|
+ columnsDetail.value = spotColumns;
|
|
|
+ } else {
|
|
|
+ // 注册表头
|
|
|
+ registerColumnDetail('table_pcweb_exposure_detail', []);
|
|
|
+ }
|
|
|
+
|
|
|
fn = QueryActualExposureDetail;
|
|
|
|
|
|
queryResultLoadingAndInfo(fn, loading, { middlegoodsid: selectedRow.value?.MiddleGoodsID }).then((res) => {
|
|
|
@@ -190,8 +215,13 @@ export default defineComponent({
|
|
|
});
|
|
|
} else if (code === 'exposure_realtime_futures_details') {
|
|
|
// 期货明细
|
|
|
- // 注册表头
|
|
|
- registerColumnDetail('table_pcweb_exposure_futures_detail', []);
|
|
|
+ if (isPingAnOem()) {
|
|
|
+ columnsDetail.value = futureColumns;
|
|
|
+ } else {
|
|
|
+ // 注册表头
|
|
|
+ registerColumnDetail('table_pcweb_exposure_futures_detail', []);
|
|
|
+ }
|
|
|
+
|
|
|
fn = QueryAutualExposurePosition;
|
|
|
queryResultLoadingAndInfo(fn, loading, { middleGoodsId: selectedRow.value?.MiddleGoodsID }).then((res) => {
|
|
|
detailTableList.value = res;
|
|
|
@@ -234,4 +264,8 @@ export default defineComponent({
|
|
|
padding: 5px 0 5px 5px;
|
|
|
text-align: left;
|
|
|
}
|
|
|
+.real-time-select {
|
|
|
+ margin-left: 5px;
|
|
|
+ margin-right: 5px;
|
|
|
+}
|
|
|
</style>;
|