|
@@ -7,6 +7,7 @@ import type { TableColumnCtx, SummaryMethod } from 'element-plus'
|
|
import rangeFilter from "./rangeFilter.vue";
|
|
import rangeFilter from "./rangeFilter.vue";
|
|
import { rangeGetSql } from '../function';
|
|
import { rangeGetSql } from '../function';
|
|
import { formatDate } from '@/utils/times';
|
|
import { formatDate } from '@/utils/times';
|
|
|
|
+import { dropdownBoxFieldIntegration } from "../list"
|
|
|
|
|
|
const rangeFilterRef = ref<InstanceType<typeof rangeFilter> | null>(null);
|
|
const rangeFilterRef = ref<InstanceType<typeof rangeFilter> | null>(null);
|
|
|
|
|
|
@@ -79,6 +80,18 @@ function mergeColumns({ row, rowIndex, columnIndex }: { row: any, rowIndex: numb
|
|
return { rowspan, colspan: 1 };
|
|
return { rowspan, colspan: 1 };
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// 渲染固定数据
|
|
|
|
+function renderingLabel(row: any, item: any) {
|
|
|
|
+ const { filed } = item
|
|
|
|
+ const list = dropdownBoxFieldIntegration.filter(em => `${em.indicate}_${em.fieldName}` == filed)
|
|
|
|
+ if(list.length) {
|
|
|
|
+ const childList = list[0].list
|
|
|
|
+ return childList.find((dd: any) => dd.value == row[item.label])?.label
|
|
|
|
+ } else {
|
|
|
|
+ return row[item.label]
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
function determinationOfDataRange() {
|
|
function determinationOfDataRange() {
|
|
const rangeFilterData = rangeFilterRef.value?.getRangeData()
|
|
const rangeFilterData = rangeFilterRef.value?.getRangeData()
|
|
const rangeSQL = rangeGetSql(rangeFilterData, addEditData)
|
|
const rangeSQL = rangeGetSql(rangeFilterData, addEditData)
|
|
@@ -156,7 +169,8 @@ onMounted(() => { })
|
|
{{ scope.row[item.label] ? formatDate(new Date(scope.row[item.label])) : '' }}
|
|
{{ scope.row[item.label] ? formatDate(new Date(scope.row[item.label])) : '' }}
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
- {{ scope.row[item.label] }}
|
|
|
|
|
|
+ <!-- {{ scope.row[item.label] }} -->
|
|
|
|
+ {{ renderingLabel(scope.row, item) }}
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|