Compare commits
5 Commits
97330be09f
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b288342a6 | ||
|
|
33ff00ef3c | ||
|
|
5484da2602 | ||
|
|
3fc162339f | ||
|
|
536a12a20c |
@@ -76,6 +76,7 @@ interface ColumnConfig {
|
|||||||
interface Props {
|
interface Props {
|
||||||
modelValue: boolean
|
modelValue: boolean
|
||||||
columns: Record<string, any>
|
columns: Record<string, any>
|
||||||
|
fieldList?: any[] // fieldList 数据,用于获取 exportEntity.isExport
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps<Props>()
|
const props = defineProps<Props>()
|
||||||
@@ -97,16 +98,36 @@ const initColumnConfig = () => {
|
|||||||
columnConfigList.value = Object.keys(props.columns)
|
columnConfigList.value = Object.keys(props.columns)
|
||||||
.map(key => {
|
.map(key => {
|
||||||
const column = props.columns[key]
|
const column = props.columns[key]
|
||||||
|
const prop = column.prop || key
|
||||||
|
|
||||||
|
// 如果 IndexedDB 没有记录(isExport === undefined),则从 fieldList 中获取 exportEntity.isExport
|
||||||
|
let isExport = column.isExport
|
||||||
|
debugger
|
||||||
|
if (isExport === undefined) {
|
||||||
|
// 查找 fieldList 中对应的字段
|
||||||
|
if (props.fieldList && Array.isArray(props.fieldList)) {
|
||||||
|
const field = props.fieldList.find((f: any) => f.fieldCode === prop)
|
||||||
|
if (field && field.exportEntity && field.exportEntity.isExport === 'Y') {
|
||||||
|
isExport = 'Y'
|
||||||
|
} else {
|
||||||
|
// 如果 fieldList 中没有找到或不是 'Y',默认导出
|
||||||
|
isExport = 'N'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 如果没有 fieldList,默认导出
|
||||||
|
isExport = 'Y'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
prop: column.prop || key,
|
prop,
|
||||||
label: column.label || key,
|
label: column.label || key,
|
||||||
hide: column.hide || false,
|
hide: column.hide || false,
|
||||||
fixed: column.fixed || false,
|
fixed: column.fixed || false,
|
||||||
sortable: column.sortable || false,
|
sortable: column.sortable || false,
|
||||||
showColumn: column.showColumn !== false,
|
showColumn: column.showColumn !== false,
|
||||||
sortNum: column.sortNum,
|
sortNum: column.sortNum,
|
||||||
// 默认全部勾选导出,如果已有配置则使用配置值
|
isExport
|
||||||
isExport: column.isExport !== undefined ? column.isExport : 'Y'
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.sort((a, b) => {
|
.sort((a, b) => {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 列配置抽屉 -->
|
<!-- 列配置抽屉 -->
|
||||||
<ColumnConfigDialog v-if="props.model === 'default'" v-model="showColumnConfigDrawer"
|
<ColumnConfigDialog v-if="props.model === 'default'" v-model="showColumnConfigDrawer"
|
||||||
:columns="tableOption.column" @confirm="handleColumnConfigConfirm" />
|
:columns="tableOption.column" :field-list="fieldListRef" @confirm="handleColumnConfigConfirm" />
|
||||||
<div class="flex-1 w-100%" :class="{ 'table-content': tableInfo.tableType == 'treeAround' }" v-if="isInit">
|
<div class="flex-1 w-100%" :class="{ 'table-content': tableInfo.tableType == 'treeAround' }" v-if="isInit">
|
||||||
<!-- 主体表格 -->
|
<!-- 主体表格 -->
|
||||||
<avue-crud ref="crudRef" v-model="tableForm" v-model:search="tableSearch" v-bind="crudBind"
|
<avue-crud ref="crudRef" v-model="tableForm" v-model:search="tableSearch" v-bind="crudBind"
|
||||||
|
|||||||
@@ -2,8 +2,9 @@
|
|||||||
<div class="big-screen-container">
|
<div class="big-screen-container">
|
||||||
<!-- 标题栏 -->
|
<!-- 标题栏 -->
|
||||||
<div class="screen-header">
|
<div class="screen-header">
|
||||||
<h1 class="screen-title">动环监控大屏</h1>
|
<div class=" screen screen-left"></div>
|
||||||
<div class="screen-datetime">
|
<h1 class="screen screen-title">动环监控大屏</h1>
|
||||||
|
<div class="screen screen-datetime">
|
||||||
<span style="margin-top: 6%;font-size: 0.9rem;">{{ currentDate }}</span>
|
<span style="margin-top: 6%;font-size: 0.9rem;">{{ currentDate }}</span>
|
||||||
<span style="margin-top: 6%;font-size: 0.9rem;">{{ currentWeek }}</span>
|
<span style="margin-top: 6%;font-size: 0.9rem;">{{ currentWeek }}</span>
|
||||||
<span style="margin-top: 6%;font-size: 0.9rem;">{{ currentTime }}</span>
|
<span style="margin-top: 6%;font-size: 0.9rem;">{{ currentTime }}</span>
|
||||||
@@ -642,13 +643,16 @@ const handleResize = () => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
|
.screen {
|
||||||
|
width: 33.3%;
|
||||||
|
}
|
||||||
.screen-title {
|
.screen-title {
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.screen-datetime {
|
.screen-datetime {
|
||||||
@@ -738,6 +742,16 @@ background-image: url('@/assets/images/screen/left_top_img.png'),
|
|||||||
background-size: 100% 90px,
|
background-size: 100% 90px,
|
||||||
cover,
|
cover,
|
||||||
100% 68px;
|
100% 68px;
|
||||||
|
.chart-title,.card-title {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
.card-value {
|
||||||
|
// text-align: right;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
.chart-title {
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.chart-right {
|
.chart-right {
|
||||||
@@ -754,10 +768,13 @@ background-image: url('@/assets/images/screen/left_top_img.png'),
|
|||||||
cover,
|
cover,
|
||||||
100% 68px;
|
100% 68px;
|
||||||
.chart-title,.card-title {
|
.chart-title,.card-title {
|
||||||
text-align: right;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
.card-value {
|
.card-value {
|
||||||
text-align: right;
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
.chart-title {
|
||||||
|
padding-left: 30px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -933,6 +950,12 @@ background-image: url('@/assets/images/screen/left_top_img.png'),
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.chart-left,.chart-right {
|
||||||
|
.chart-title {
|
||||||
|
padding-left: 25px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.stat-card {
|
.stat-card {
|
||||||
padding: 25px;
|
padding: 25px;
|
||||||
@@ -961,6 +984,11 @@ background-image: url('@/assets/images/screen/left_top_img.png'),
|
|||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.chart-left,.chart-right {
|
||||||
|
.chart-title {
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.stat-card {
|
.stat-card {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
|||||||
Reference in New Issue
Block a user