微调
This commit is contained in:
@@ -35,7 +35,8 @@
|
||||
</div>
|
||||
<div class="content-tree">
|
||||
<el-tree v-if="switchItem === 0" :default-expanded-keys="defaultExpandedKeys" node-key="index"
|
||||
:data="treeDataUnqualified" :props="defaultProps" @node-click="handleNodeClick" class="custom-tree">
|
||||
:data="treeDataUnqualified" :props="defaultProps" @node-click="handleNodeClick"
|
||||
class="custom-tree">
|
||||
<template #default="{ node, data }">
|
||||
<span class="custom-tree-node">{{ data.scriptTypeName }}</span>
|
||||
</template>
|
||||
@@ -51,10 +52,18 @@
|
||||
|
||||
<div class="content-right">
|
||||
<div class="content-right-title">
|
||||
<el-divider>当前检测项目</el-divider>
|
||||
<div class="content-right-title-desc">
|
||||
{{ currentDesc ? currentDesc : "无" }}
|
||||
</div>
|
||||
<span class="content-right-title-text">当前检测项目:</span>
|
||||
<el-popover trigger="hover" :content="currentDesc? currentDesc : '无'" popper-class="popover-class" width="33%" placement="right">
|
||||
<template #reference>
|
||||
<el-button type="text" style="font-size: 16px;">
|
||||
{{ currentScriptTypeName ? currentScriptTypeName : '无' }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-popover>
|
||||
<!-- <el-divider>当前检测项目</el-divider>-->
|
||||
<!-- <div class="content-right-title-desc">-->
|
||||
<!-- {{ currentDesc ? currentDesc : "无" }}-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="content-right-Tabs">
|
||||
<el-tabs type="border-card" v-model="activeTab">
|
||||
@@ -122,6 +131,9 @@ let treeDataAll: CheckData.TreeItem[] = []
|
||||
// 左侧树被选中的叶子节点id
|
||||
const checkIndex = ref<string>('')
|
||||
|
||||
// 当前检测项目名称
|
||||
const currentScriptTypeName = ref('')
|
||||
// 当前检测项目描述
|
||||
const currentDesc = ref('');
|
||||
// 右侧Tab选中项
|
||||
const activeTab = ref<string>('resultTab')
|
||||
@@ -138,6 +150,7 @@ let defaultExpandedKeys: string[] = []
|
||||
const handleNodeClick = async (data: any) => {
|
||||
if (!data.children) {
|
||||
checkIndex.value = data.index
|
||||
currentScriptTypeName.value = data.scriptTypeName
|
||||
currentDesc.value = data.sourceDesc
|
||||
|
||||
if (checkIndex.value) {
|
||||
@@ -281,10 +294,12 @@ const defaultOperate = () => {
|
||||
node = getDefaultNode(treeDataAll)
|
||||
}
|
||||
if (node) {
|
||||
currentScriptTypeName.value = node.scriptTypeName
|
||||
currentDesc.value = node.sourceDesc
|
||||
checkIndex.value = node.index
|
||||
defaultExpandedKeys = [node.index]
|
||||
} else {
|
||||
currentScriptTypeName.value = ''
|
||||
currentDesc.value = ''
|
||||
checkIndex.value = ''
|
||||
defaultExpandedKeys = []
|
||||
@@ -310,6 +325,7 @@ const updateTableData = async () => {
|
||||
maxErrVaule: 0.05774,
|
||||
result: '合格',
|
||||
}])
|
||||
|
||||
Object.assign(rawTableData, [
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:00",
|
||||
@@ -494,6 +510,7 @@ const close = () => {
|
||||
defaultExpandedKeys = []
|
||||
checkIndex.value = ''
|
||||
activeTab.value = 'resultTab'
|
||||
currentScriptTypeName.value = ''
|
||||
currentDesc.value = ''
|
||||
switchItem = 0
|
||||
|
||||
@@ -651,29 +668,44 @@ defineExpose({
|
||||
flex: 1;
|
||||
|
||||
.content-right-title {
|
||||
.el-divider--horizontal {
|
||||
//margin-top: 0px;
|
||||
margin-bottom: 5px;
|
||||
height: 20px;
|
||||
}
|
||||
margin-top: 10px;
|
||||
line-height: 1.5;
|
||||
|
||||
.content-right-title-desc {
|
||||
.content-right-title-text {
|
||||
font-size: 16px;
|
||||
height: 48px;
|
||||
max-height: 48px;
|
||||
overflow-y: auto;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.content-right-Tabs {
|
||||
box-sizing: border-box;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 10px;
|
||||
max-height: 400px;
|
||||
}
|
||||
//.el-divider--horizontal {
|
||||
// //margin-top: 0px;
|
||||
// margin-bottom: 5px;
|
||||
// height: 20px;
|
||||
//}
|
||||
|
||||
//.content-right-title-desc {
|
||||
// font-size: 16px;
|
||||
// height: 48px;
|
||||
// max-height: 48px;
|
||||
// overflow-y: auto;
|
||||
//}
|
||||
}
|
||||
|
||||
.content-right-Tabs {
|
||||
box-sizing: border-box;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
max-height: 400px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
</style>
|
||||
<!--<style lang="scss">-->
|
||||
<!--.el-popover.popover-class {-->
|
||||
<!-- .el-popover__title {-->
|
||||
<!-- color: #fff;-->
|
||||
<!-- background-color: #003078 !important;-->
|
||||
<!-- }-->
|
||||
<!--}-->
|
||||
<!--</style>-->
|
||||
Reference in New Issue
Block a user