bug修复
This commit is contained in:
@@ -110,13 +110,13 @@
|
||||
<div class="online_main">
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
||||
<el-tab-pane :name="0" :lazy="true" label="数据完整性列表">
|
||||
<Table
|
||||
ref="tableRef"
|
||||
:tree-config="{ transform: true, parentField: 'uPid', rowField: 'uId' }"
|
||||
:checkbox-config="{ labelField: 'name' }"
|
||||
:scroll-y="{ enabled: true }"
|
||||
v-if="activeName == 0"
|
||||
/>
|
||||
<Table
|
||||
ref="tableRef"
|
||||
:tree-config="{ transform: true, parentField: 'uPid', rowField: 'uId' }"
|
||||
:checkbox-config="{ labelField: 'name', checkMethod: ({ row }) => true }"
|
||||
:scroll-y="{ enabled: true }"
|
||||
v-if="activeName == 0"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :name="1" :lazy="true" label="数据完整性图表">
|
||||
<charts v-if="activeName == 1" ref="chartsRef" />
|
||||
@@ -217,7 +217,6 @@ const tableStore = new TableStore({
|
||||
showPage: false,
|
||||
url: '/device-boot/LineIntegrityData/getLineIntegrityData',
|
||||
method: 'POST',
|
||||
|
||||
column: [
|
||||
{
|
||||
title: formData.value.statisticalType.name,
|
||||
@@ -230,17 +229,6 @@ const tableStore = new TableStore({
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: formData.value.statisticalType.name,
|
||||
field: 'name',
|
||||
align: 'left',
|
||||
type: 'html',
|
||||
treeNode: true,
|
||||
width: 350,
|
||||
formatter: function (row) {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '网络参数',
|
||||
field: 'ip',
|
||||
@@ -336,6 +324,7 @@ const tableStore = new TableStore({
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = tree2List(tableStore.table.data, Math.random() * 1000)
|
||||
tableStore.table.column[0].title = formData.value.statisticalType.name
|
||||
|
||||
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
||||
setTimeout(() => {
|
||||
activeName.value == 0 && tableRef.value && tableRef.value.getRef().setAllTreeExpand(true)
|
||||
@@ -450,23 +439,6 @@ watch(
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
watch(
|
||||
() => tableStore.table,
|
||||
(val) => {
|
||||
if(val.data.length > 0){
|
||||
tableStore.table.column[0].visible = true
|
||||
tableStore.table.column[1].visible = false
|
||||
}else{
|
||||
tableStore.table.column[0].visible = false
|
||||
tableStore.table.column[1].visible = true
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -483,4 +455,92 @@ watch(
|
||||
// padding: 0 10px;
|
||||
// }
|
||||
// }
|
||||
|
||||
// 修复VXE表格树表checkbox的样式问题
|
||||
:deep(.vxe-table--main-wrapper) {
|
||||
.vxe-table--body-wrapper {
|
||||
.vxe-body--row {
|
||||
.vxe-cell--checkbox {
|
||||
.vxe-checkbox--icon {
|
||||
color: var(--el-color-primary-light-3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 确保空数据状态下没有灰色遮罩层
|
||||
:deep(.vxe-table--empty-block) {
|
||||
background: transparent;
|
||||
|
||||
.vxe-table--empty-content {
|
||||
color: #909399;
|
||||
}
|
||||
}
|
||||
|
||||
// 修复树表header的样式
|
||||
:deep(.vxe-table--header-wrapper) {
|
||||
.vxe-header--row {
|
||||
.vxe-cell--checkbox {
|
||||
.vxe-checkbox--icon {
|
||||
color: var(--el-color-primary-light-3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 精确修复checkbox的disabled状态样式
|
||||
:deep(.vxe-checkbox.is--disabled) {
|
||||
.vxe-checkbox--icon {
|
||||
color: var(--el-color-primary-light-3) !important;
|
||||
}
|
||||
}
|
||||
|
||||
// 确保树表节点没有灰色背景,但保留边框
|
||||
:deep(.vxe-tree-cell) {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
// 精确修复空数据状态下的灰色背景
|
||||
:deep(.vxe-table--empty-block) {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
// 修复checkbox在空数据状态下的样式
|
||||
:deep(.vxe-table--body-wrapper:empty) {
|
||||
.vxe-cell--checkbox {
|
||||
background: transparent;
|
||||
|
||||
.vxe-checkbox--icon {
|
||||
color: var(--el-color-primary-light-3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 专门修复checkbox和treeNode组合的样式问题
|
||||
:deep(.vxe-cell--checkbox) {
|
||||
background: transparent !important;
|
||||
|
||||
.vxe-checkbox--icon {
|
||||
color: var(--el-color-primary-light-3) !important;
|
||||
}
|
||||
}
|
||||
|
||||
// 修复树表checkbox的特殊样式
|
||||
:deep(.vxe-tree-cell .vxe-cell--checkbox) {
|
||||
background: transparent !important;
|
||||
|
||||
.vxe-checkbox--icon {
|
||||
color: var(--el-color-primary-light-3) !important;
|
||||
}
|
||||
}
|
||||
|
||||
// 确保checkbox在树表中的正确显示
|
||||
:deep(.vxe-body--row .vxe-cell--checkbox) {
|
||||
background: transparent !important;
|
||||
|
||||
.vxe-checkbox--icon {
|
||||
color: var(--el-color-primary-light-3) !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -198,7 +198,7 @@ const tableStore = new TableStore({
|
||||
},
|
||||
{
|
||||
title: '网络参数',
|
||||
field: 'networkParam',
|
||||
field: 'ip',
|
||||
align: 'center',
|
||||
formatter: function (row) {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
|
||||
Reference in New Issue
Block a user